Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions docs/.vitepress/theme/components/IconCatalog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,24 @@ const icons = [
{ id: "webhook", subject: "Webhook endpoint" },
{ id: "identity", subject: "Identity and access" },
{ id: "observability", subject: "Observability system" },
{ id: "gateway", subject: "Network gateway" },
{ id: "load-balancer", subject: "Load balancer" },
{ id: "dns", subject: "Domain name service" },
{ id: "cdn", subject: "Content delivery network" },
{ id: "firewall", subject: "Network firewall" },
{ id: "network", subject: "Network topology" },
{ id: "event", subject: "Discrete event" },
{ id: "stream", subject: "Event stream" },
{ id: "search", subject: "Search service" },
{ id: "analytics", subject: "Analytics system" },
{ id: "repository", subject: "Source code repository" },
{ id: "pipeline", subject: "Delivery pipeline" },
{ id: "secret", subject: "Secret or credential" },
{ id: "document", subject: "Document or knowledge base" },
{ id: "task", subject: "Task or issue tracker" },
{ id: "chat", subject: "Chat or messaging tool" },
{ id: "email", subject: "Email delivery" },
{ id: "ai", subject: "Artificial intelligence system" },
] as const

const labels = {
Expand Down
22 changes: 20 additions & 2 deletions docs/ja/language/themes-and-icons.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,26 @@ Free core catalogは、次のprovider-neutralな明示iconを`default`、`light`
| `webhook` | Webhook endpoint | Inbound / outbound callback |
| `identity` | Identity and access | Authentication / authorization |
| `observability` | Observability system | Metrics / logs / traces |

下のpreviewをlight / darkへ切り替えると、実際のoutputを比較できます。各imageは公開`@stack-sh/engine@0.4.0`がlocalでrenderし、DocumentationにTheme SVG assetを複製していません。Syntaxの行を選ぶとコピーできます。
| `gateway` | Network gateway | Public / private networkの入口 |
| `load-balancer` | Load balancer | Trafficの分散 |
| `dns` | Domain name service | Hostname / service discovery |
| `cdn` | Content delivery network | Edgeでのcontent delivery |
| `firewall` | Network firewall | Network access boundary |
| `network` | Network topology | 一般的なnetwork / subnet |
| `event` | Discrete event | 個別のdomain / system event |
| `stream` | Event stream | 継続的なevent / data flow |
| `search` | Search service | Indexing / query system |
| `analytics` | Analytics system | Reporting / data analysis |
| `repository` | Source code repository | Source code / version control |
| `pipeline` | Delivery pipeline | Build / test / deploy flow |
| `secret` | Secret or credential | Secret / key / credential |
| `document` | Document or knowledge base | Documentation / knowledge |
| `task` | Task or issue tracker | Task / ticket / issue tracking |
| `chat` | Chat or messaging tool | Team chat / messaging |
| `email` | Email delivery | Email delivery / inbox |
| `ai` | Artificial intelligence system | AI model / inference service |

下のpreviewをlight / darkへ切り替えると、実際のoutputを比較できます。各imageは公開`@stack-sh/engine@0.5.0`がlocalでrenderし、DocumentationにTheme SVG assetを複製していません。Syntaxの行を選ぶとコピーできます。

<IconCatalog locale="ja" />

Expand Down
50 changes: 34 additions & 16 deletions docs/ko/language/themes-and-icons.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,22 +74,40 @@ diagram "Explicit icon" {

무료 코어 catalog는 `default`, `light`, `dark`에 다음 provider-neutral 명시적 아이콘을 제공합니다.

| ID | Stable subject | 주요 용도 |
| --------------- | --------------------------------- | ------------------------------ |
| `api` | Application programming interface | 공개 또는 내부 API |
| `web` | Web application | 브라우저용 Web 경험 |
| `mobile` | Mobile application | iOS 또는 Android 클라이언트 |
| `desktop` | Desktop application | 네이티브 데스크톱 클라이언트 |
| `server` | Server host | 가상 머신 또는 물리 호스트 |
| `container` | Application container | 컨테이너화된 워크로드 |
| `cluster` | Compute cluster | 오케스트레이션된 컴퓨팅 그룹 |
| `cloud` | Cloud environment | provider-neutral 클라우드 경계 |
| `scheduler` | Scheduled execution | Cron 작업 또는 예약 실행 |
| `webhook` | Webhook endpoint | 인바운드 또는 아웃바운드 콜백 |
| `identity` | Identity and access | 인증 또는 권한 부여 |
| `observability` | Observability system | 메트릭, 로그 또는 트레이스 |

아래 미리보기를 라이트와 다크로 전환하여 실제 출력을 비교할 수 있습니다. 각 이미지는 공개된 `@stack-sh/engine@0.4.0`이 로컬에서 렌더링하며 문서에 Theme SVG 에셋을 복제하지 않습니다. 문법 행을 선택하면 복사됩니다.
| ID | Stable subject | 주요 용도 |
| --------------- | --------------------------------- | -------------------------------- |
| `api` | Application programming interface | 공개 또는 내부 API |
| `web` | Web application | 브라우저용 Web 경험 |
| `mobile` | Mobile application | iOS 또는 Android 클라이언트 |
| `desktop` | Desktop application | 네이티브 데스크톱 클라이언트 |
| `server` | Server host | 가상 머신 또는 물리 호스트 |
| `container` | Application container | 컨테이너화된 워크로드 |
| `cluster` | Compute cluster | 오케스트레이션된 컴퓨팅 그룹 |
| `cloud` | Cloud environment | provider-neutral 클라우드 경계 |
| `scheduler` | Scheduled execution | Cron 작업 또는 예약 실행 |
| `webhook` | Webhook endpoint | 인바운드 또는 아웃바운드 콜백 |
| `identity` | Identity and access | 인증 또는 권한 부여 |
| `observability` | Observability system | 메트릭, 로그 또는 트레이스 |
| `gateway` | Network gateway | 공용 또는 사설 네트워크 진입점 |
| `load-balancer` | Load balancer | 트래픽 분산 |
| `dns` | Domain name service | 호스트 이름 및 서비스 검색 |
| `cdn` | Content delivery network | 엣지 콘텐츠 전송 |
| `firewall` | Network firewall | 네트워크 접근 경계 |
| `network` | Network topology | 일반 네트워크 또는 서브넷 |
| `event` | Discrete event | 개별 도메인 또는 시스템 이벤트 |
| `stream` | Event stream | 지속적인 이벤트 또는 데이터 흐름 |
| `search` | Search service | 인덱싱 및 쿼리 시스템 |
| `analytics` | Analytics system | 보고 또는 데이터 분석 |
| `repository` | Source code repository | 소스 코드 및 버전 관리 |
| `pipeline` | Delivery pipeline | 빌드, 테스트 또는 배포 흐름 |
| `secret` | Secret or credential | 비밀, 키 또는 자격 증명 |
| `document` | Document or knowledge base | 문서 및 지식 기반 |
| `task` | Task or issue tracker | 작업, 티켓 또는 이슈 추적 |
| `chat` | Chat or messaging tool | 팀 채팅 또는 메시징 |
| `email` | Email delivery | 이메일 전송 또는 받은편지함 |
| `ai` | Artificial intelligence system | AI 모델 또는 추론 서비스 |

아래 미리보기를 라이트와 다크로 전환하여 실제 출력을 비교할 수 있습니다. 각 이미지는 공개된 `@stack-sh/engine@0.5.0`이 로컬에서 렌더링하며 문서에 Theme SVG 에셋을 복제하지 않습니다. 문법 행을 선택하면 복사됩니다.

<IconCatalog locale="ko" />

Expand Down
22 changes: 20 additions & 2 deletions docs/language/themes-and-icons.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,26 @@ The free core catalog includes these provider-neutral explicit icons in `default
| `webhook` | Webhook endpoint | Inbound or outbound callbacks |
| `identity` | Identity and access | Authentication or authorization |
| `observability` | Observability system | Metrics, logs, or traces |

Switch the preview below between light and dark to inspect the actual output. The published `@stack-sh/engine@0.4.0` renders every image locally; the Documentation does not copy Theme SVG assets. Select a syntax row to copy it.
| `gateway` | Network gateway | Public or private network entry |
| `load-balancer` | Load balancer | Traffic distribution |
| `dns` | Domain name service | Hostname and service discovery |
| `cdn` | Content delivery network | Edge content delivery |
| `firewall` | Network firewall | Network access boundaries |
| `network` | Network topology | Generic networks or subnets |
| `event` | Discrete event | Individual domain or system events |
| `stream` | Event stream | Continuous event or data flows |
| `search` | Search service | Indexing and query systems |
| `analytics` | Analytics system | Reporting or data analysis |
| `repository` | Source code repository | Source code and version control |
| `pipeline` | Delivery pipeline | Build, test, or deployment flows |
| `secret` | Secret or credential | Secrets, keys, or credentials |
| `document` | Document or knowledge base | Documentation and knowledge |
| `task` | Task or issue tracker | Tasks, tickets, or issue tracking |
| `chat` | Chat or messaging tool | Team chat or messaging |
| `email` | Email delivery | Email delivery or inboxes |
| `ai` | Artificial intelligence system | AI models or inference services |

Switch the preview below between light and dark to inspect the actual output. The published `@stack-sh/engine@0.5.0` renders every image locally; the Documentation does not copy Theme SVG assets. Select a syntax row to copy it.

<IconCatalog locale="en" />

Expand Down
22 changes: 20 additions & 2 deletions docs/zh/language/themes-and-icons.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,26 @@ diagram "Explicit icon" {
| `webhook` | Webhook endpoint | 入站或出站回调 |
| `identity` | Identity and access | 身份验证或授权 |
| `observability` | Observability system | 指标、日志或链路追踪 |

切换下方预览的浅色与深色模式即可比较真实输出。每张图片都由已发布的 `@stack-sh/engine@0.4.0` 在本地渲染;文档没有复制 Theme SVG 资源。选择语法行即可复制。
| `gateway` | Network gateway | 公共或私有网络入口 |
| `load-balancer` | Load balancer | 流量分发 |
| `dns` | Domain name service | 主机名与服务发现 |
| `cdn` | Content delivery network | 边缘内容分发 |
| `firewall` | Network firewall | 网络访问边界 |
| `network` | Network topology | 通用网络或子网 |
| `event` | Discrete event | 单个领域或系统事件 |
| `stream` | Event stream | 连续事件或数据流 |
| `search` | Search service | 索引与查询系统 |
| `analytics` | Analytics system | 报告或数据分析 |
| `repository` | Source code repository | 源代码与版本控制 |
| `pipeline` | Delivery pipeline | 构建、测试或部署流程 |
| `secret` | Secret or credential | 密钥或凭据 |
| `document` | Document or knowledge base | 文档与知识库 |
| `task` | Task or issue tracker | 任务、工单或问题跟踪 |
| `chat` | Chat or messaging tool | 团队聊天或消息 |
| `email` | Email delivery | 邮件投递或收件箱 |
| `ai` | Artificial intelligence system | AI 模型或推理服务 |

切换下方预览的浅色与深色模式即可比较真实输出。每张图片都由已发布的 `@stack-sh/engine@0.5.0` 在本地渲染;文档没有复制 Theme SVG 资源。选择语法行即可复制。

<IconCatalog locale="zh" />

Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@fontsource/ibm-plex-mono": "^5.3.0",
"@shikijs/core": "4.4.3",
"@shikijs/engine-javascript": "4.4.3",
"@stack-sh/engine": "0.4.0",
"@stack-sh/engine": "0.5.0",
"@stack-sh/language": "0.1.0",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
Expand Down
2 changes: 1 addition & 1 deletion scripts/validate-docs-output.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ for (const locale of ["", "ja/", "zh/", "ko/"]) {
const html = await readFile(path.join(outputRoot, page), "utf8")
const cards = html.match(/class="stack-icon-card"/g)?.length ?? 0

if (cards !== 12) throw new Error(`${page} contains ${cards} icon cards instead of 12`)
if (cards !== 30) throw new Error(`${page} contains ${cards} icon cards instead of 30`)
}

const documentationAssets = await readdir(path.join(outputRoot, "assets"))
Expand Down
22 changes: 20 additions & 2 deletions scripts/validate-docs.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ const locales = ["ja", "zh", "ko"]
const docsRoot = path.resolve("docs")
const packageMetadata = JSON.parse(await readFile(path.resolve("package.json"), "utf8"))

if (packageMetadata.dependencies["@stack-sh/engine"] !== "0.4.0") {
throw new Error("Documentation must use the exact @stack-sh/engine 0.4.0 release")
if (packageMetadata.dependencies["@stack-sh/engine"] !== "0.5.0") {
throw new Error("Documentation must use the exact @stack-sh/engine 0.5.0 release")
}

const [
Expand Down Expand Up @@ -161,6 +161,24 @@ const coreIconIds = [
"webhook",
"identity",
"observability",
"gateway",
"load-balancer",
"dns",
"cdn",
"firewall",
"network",
"event",
"stream",
"search",
"analytics",
"repository",
"pipeline",
"secret",
"document",
"task",
"chat",
"email",
"ai",
]
const requiredTerms = [
"stack 1.0",
Expand Down
5 changes: 3 additions & 2 deletions src/App.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ vi.mock("@stack-sh/engine", () => ({
import App from "./App"

const metadata = {
engineVersion: "0.4.0",
engineVersion: "0.5.0",
languageVersion: { major: 1, minor: 0 },
themeCatalogRevision: "sha256:test",
themeCatalogVersion: "0.2.0",
themeCatalogVersion: "0.4.0",
}

const diagnostic = {
Expand Down Expand Up @@ -92,6 +92,7 @@ describe("Stack Playground", () => {
expect(screen.getByText("Render completed")).toBeInTheDocument()
expect(engine.render).toHaveBeenCalledOnce()
expect(engine.render).toHaveBeenCalledWith(expect.stringContaining('icon "web"'))
expect(engine.render).toHaveBeenCalledWith(expect.stringContaining('icon "gateway"'))
})

it("formats the source and refreshes the preview", async () => {
Expand Down
1 change: 1 addition & 0 deletions src/lib/example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ diagram "Commerce platform" {

node api "Commerce API" {
kind service
icon "gateway"
detail "Orders and inventory"
}

Expand Down