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
101 changes: 101 additions & 0 deletions docs/.vitepress/theme/components/ProviderCatalog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import catalogData from "../data/provider-catalogs.json"

type Locale = "en" | "ja" | "zh" | "ko"
type CatalogIcon = (typeof catalogData.providers)[number]["icons"][number]
type CatalogSource = (typeof catalogData.providers)[number]["source"] & { id: string }

const props = defineProps<{ locale: Locale }>()
const pageSize = 100
Expand All @@ -19,66 +20,130 @@ const labels = {
en: {
allCategories: "All categories",
allProviders: "All providers",
commandIntro: "Download, import, and render",
category: "Category",
copy: "Copy",
copied: "Copied",
download: "Download ZIP",
guidelines: "Guidelines",
hash: "Expected SHA-256",
kind: "Kind",
noResults: "No icon IDs match these filters.",
officialPage: "Official download page",
primaryArchive: "Primary archive",
product: "Product",
results: "results",
search: "Search ID, product, or category",
showMore: "Show more",
source: "Brand source",
terms: "Terms and guidance",
},
ja: {
allCategories: "すべてのcategory",
allProviders: "すべてのprovider",
commandIntro: "Download・import・render",
category: "Category",
copy: "コピー",
copied: "コピー済み",
download: "ZIPをdownload",
guidelines: "Guideline",
hash: "期待するSHA-256",
kind: "Kind",
noResults: "条件に一致するicon IDはありません。",
officialPage: "公式download page",
primaryArchive: "Primary archive",
product: "Product",
results: "件",
search: "ID、product、categoryを検索",
showMore: "さらに表示",
source: "Brand source",
terms: "Termsとguidance",
},
zh: {
allCategories: "所有分类",
allProviders: "所有提供商",
commandIntro: "下载、导入并渲染",
category: "分类",
copy: "复制",
copied: "已复制",
download: "下载 ZIP",
guidelines: "使用指南",
hash: "预期 SHA-256",
kind: "类型",
noResults: "没有符合筛选条件的图标 ID。",
officialPage: "官方下载页面",
primaryArchive: "主压缩包",
product: "产品",
results: "项结果",
search: "搜索 ID、产品或分类",
showMore: "显示更多",
source: "品牌来源",
terms: "条款与指南",
},
ko: {
allCategories: "모든 카테고리",
allProviders: "모든 제공자",
commandIntro: "다운로드, import, render",
category: "카테고리",
copy: "복사",
copied: "복사됨",
download: "ZIP 다운로드",
guidelines: "사용 지침",
hash: "예상 SHA-256",
kind: "종류",
noResults: "필터와 일치하는 아이콘 ID가 없습니다.",
officialPage: "공식 다운로드 페이지",
primaryArchive: "Primary archive",
product: "제품",
results: "개 결과",
search: "ID, 제품 또는 카테고리 검색",
showMore: "더 보기",
source: "브랜드 출처",
terms: "약관 및 지침",
},
} as const

const archiveFilenames: Record<string, Record<string, string>> = {
aws: { primary: "aws-icons.zip" },
gcp: {
primary: "gcp-core-products-icons.zip",
categories: "gcp-category-icons.zip",
},
azure: { primary: "azure-icons.zip" },
"simple-icons": { primary: "simple-icons-16.29.0.zip" },
}

const text = computed(() => labels[props.locale])
const selectedProvider = computed(() =>
catalogData.providers.find((item) => item.id === provider.value),
)
const selectedProviderSources = computed<CatalogSource[]>(() => {
const item = selectedProvider.value
if (!item) return []
return [
{ ...item.source, id: "primary" },
...item.additionalSources.map((source) => ({ ...source, id: source.id })),
]
})
const selectedProviderCommands = computed(() => {
const item = selectedProvider.value
if (!item) return ""

const filenames = archiveFilenames[item.id]
const lines = selectedProviderSources.value.map(
(source) => `$ curl -fL "${source.archiveUrl}" -o ${filenames[source.id]}`,
)
const importLines = [`$ stack icons import ${item.id} ./${filenames.primary} \\`]
for (const source of item.additionalSources) {
importLines.push(` --source ${source.id}=./${filenames[source.id]} \\`)
}
importLines.push(` --accept-terms -o .stack-icons/${item.id}`)
lines.push(
importLines.join("\n"),
`$ stack render architecture.stack --provider-pack .stack-icons/${item.id} -o architecture.svg`,
)
return lines.join("\n")
})
const allIcons = computed(() =>
catalogData.providers.flatMap((item) =>
item.icons.map((icon) => ({ ...icon, providerId: item.id })),
Expand Down Expand Up @@ -143,6 +208,42 @@ onBeforeUnmount(() => window.clearTimeout(copyTimer))
</button>
</div>

<section
v-if="selectedProvider"
class="stack-provider-setup"
aria-labelledby="stack-provider-setup-title"
>
<div class="stack-provider-setup__heading">
<h3 id="stack-provider-setup-title">{{ selectedProvider.name }}</h3>
<span>{{ selectedProvider.source.release }}</span>
</div>
<div class="stack-provider-setup__links">
<a :href="selectedProvider.source.pageUrl" rel="noreferrer" target="_blank">
{{ text.officialPage }}
</a>
<a :href="selectedProvider.source.termsUrl" rel="noreferrer" target="_blank">
{{ text.terms }}
</a>
</div>
<div class="stack-provider-setup__sources">
<article v-for="sourceItem in selectedProviderSources" :key="sourceItem.id">
<strong>
{{ sourceItem.id === "primary" ? text.primaryArchive : sourceItem.id }}
</strong>
<span>{{ sourceItem.release }}</span>
<a :href="sourceItem.archiveUrl" rel="noreferrer" target="_blank">
{{ text.download }}
</a>
<small>
{{ text.hash }}
<code>{{ sourceItem.archiveSha256.replace("sha256:", "") }}</code>
</small>
</article>
</div>
<p>{{ text.commandIntro }}</p>
<pre tabindex="0"><code>{{ selectedProviderCommands }}</code></pre>
</section>

<div class="stack-provider-filters">
<label>
<span class="sr-only">{{ text.search }}</span>
Expand Down
53 changes: 41 additions & 12 deletions docs/.vitepress/theme/data/provider-catalogs.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@
{
"id": "aws",
"name": "Amazon Web Services",
"release": "Icon-package_07312026",
"sourcePageUrl": "https://aws.amazon.com/architecture/icons/",
"termsUrl": "https://aws.amazon.com/trademark-guidelines/",
"source": {
"pageUrl": "https://aws.amazon.com/architecture/icons/",
"archiveUrl": "https://d1.awsstatic.com/onedam/marketing-channels/website/public/shared/architecture-icon-release/Icon-package_07312026.5846e92413caa21490223536cc97f1269e44fa92.zip",
"archiveSha256": "sha256:d2d166c453526471749d520e0db022c459abef759d2946cf2dd1d1c992dc6526",
"release": "Icon-package_07312026",
"termsUrl": "https://aws.amazon.com/trademark-guidelines/"
},
"additionalSources": [],
"icons": [
{
"id": "aws:amazon-api-gateway",
Expand Down Expand Up @@ -1846,9 +1851,23 @@
{
"id": "gcp",
"name": "Google Cloud",
"release": "Core product icons (May 2026 guide)",
"sourcePageUrl": "https://cloud.google.com/icons",
"termsUrl": "https://about.google/brand-resource-center/",
"source": {
"pageUrl": "https://cloud.google.com/icons",
"archiveUrl": "https://services.google.com/fh/files/misc/core-products-icons.zip",
"archiveSha256": "sha256:6531a10f58bc599c24d9a455d81dd757c1a03c3c43da9cddf639b859c1c1eece",
"release": "Core product icons (May 2026 guide)",
"termsUrl": "https://about.google/brand-resource-center/"
},
"additionalSources": [
{
"id": "categories",
"pageUrl": "https://cloud.google.com/icons",
"archiveUrl": "https://services.google.com/fh/files/misc/category-icons.zip",
"archiveSha256": "sha256:e5bc3abd3527dc2500e9bff7f15870783e2c764129c49b7cd4c1b4e105345002",
"release": "Product category icons (May 2026 guide)",
"termsUrl": "https://about.google/brand-resource-center/"
}
],
"icons": [
{
"id": "gcp:agents",
Expand Down Expand Up @@ -2125,9 +2144,14 @@
{
"id": "azure",
"name": "Microsoft Azure",
"release": "Azure_Public_Service_Icons_V24",
"sourcePageUrl": "https://learn.microsoft.com/azure/architecture/icons/",
"termsUrl": "https://learn.microsoft.com/azure/architecture/icons/",
"source": {
"pageUrl": "https://learn.microsoft.com/azure/architecture/icons/",
"archiveUrl": "https://arch-center.azureedge.net/icons/Azure_Public_Service_Icons_V24.zip",
"archiveSha256": "sha256:921594ccd1bf3d9c0a1bd7b6d924e050551a59342f2b353bb74bdcf761c35141",
"release": "Azure_Public_Service_Icons_V24",
"termsUrl": "https://learn.microsoft.com/azure/architecture/icons/"
},
"additionalSources": [],
"icons": [
{
"id": "azure:030777508-icon-service-service-group-relationships",
Expand Down Expand Up @@ -5968,9 +5992,14 @@
{
"id": "simple-icons",
"name": "Simple Icons (curated tools)",
"release": "16.29.0",
"sourcePageUrl": "https://simpleicons.org/",
"termsUrl": "https://github.com/simple-icons/simple-icons/blob/16.29.0/DISCLAIMER.md",
"source": {
"pageUrl": "https://simpleicons.org/",
"archiveUrl": "https://github.com/simple-icons/simple-icons/archive/refs/tags/16.29.0.zip",
"archiveSha256": "sha256:99f30fabd5be19dab51e09b2adebb6fe54fce1f3709ddfdc936a1338dfebc68d",
"release": "16.29.0",
"termsUrl": "https://github.com/simple-icons/simple-icons/blob/16.29.0/DISCLAIMER.md"
},
"additionalSources": [],
"icons": [
{
"id": "simple-icons:1password",
Expand Down
109 changes: 109 additions & 0 deletions docs/.vitepress/theme/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,105 @@ body {
border-color: var(--vp-c-brand-1);
}

.stack-provider-setup {
padding: 1rem;
margin-top: 0.75rem;
background: var(--vp-c-bg-soft);
border: 1px solid var(--vp-c-divider);
border-radius: 0.375rem;
}

.stack-provider-setup__heading,
.stack-provider-setup__links {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 0.75rem;
}

.stack-provider-setup__heading h3,
.stack-provider-setup p {
margin: 0;
}

.stack-provider-setup__heading h3 {
font-size: 1rem;
}

.stack-provider-setup__heading span,
.stack-provider-setup__links,
.stack-provider-setup__sources article > span,
.stack-provider-setup__sources small {
color: var(--vp-c-text-2);
font-size: 0.75rem;
}

.stack-provider-setup__links {
justify-content: flex-start;
margin-top: 0.35rem;
flex-wrap: wrap;
}

.stack-provider-setup__sources {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 0.5rem;
margin-top: 0.75rem;
}

.stack-provider-setup__sources article {
display: grid;
min-width: 0;
padding: 0.65rem;
background: var(--vp-c-bg);
border: 1px solid var(--vp-c-divider);
border-radius: 0.25rem;
gap: 0.2rem;
}

.stack-provider-setup__sources article > strong {
font-size: 0.8125rem;
}

.stack-provider-setup__sources article > span {
min-width: 0;
overflow-wrap: anywhere;
}

.stack-provider-setup__sources small {
display: grid;
min-width: 0;
gap: 0.1rem;
}

.stack-provider-setup__sources code {
overflow-wrap: anywhere;
}

.stack-provider-setup > p {
margin-top: 0.9rem;
color: var(--vp-c-text-2);
font-size: 0.8125rem;
font-weight: 600;
}

.stack-provider-setup pre {
overflow-x: auto;
padding: 0.75rem;
margin: 0.35rem 0 0;
color: var(--vp-code-block-color);
font-size: 0.75rem;
line-height: 1.5;
background: var(--vp-code-block-bg);
border-radius: 0.25rem;
}

.stack-provider-setup pre code {
padding: 0;
color: inherit;
background: transparent;
}

.stack-provider-filters {
display: grid;
grid-template-columns: minmax(12rem, 1fr) minmax(9rem, auto) minmax(9rem, auto);
Expand Down Expand Up @@ -320,6 +419,16 @@ body {
grid-template-columns: 1fr;
}

.stack-provider-setup__heading {
align-items: flex-start;
flex-direction: column;
gap: 0.15rem;
}

.stack-provider-setup__sources {
grid-template-columns: 1fr;
}

.stack-provider-table__header {
display: none;
}
Expand Down
Loading