radiant-docs 0.1.60 → 0.1.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/template/package-lock.json +10 -4
- package/template/package.json +11 -2
- package/template/scripts/generate-proxy-allowed-origins.mjs +14 -6
- package/template/scripts/publish-shiki-platform-assets.mjs +1151 -0
- package/template/src/components/Header.astro +6 -1
- package/template/src/components/NavigationTabList.astro +65 -0
- package/template/src/components/NavigationTabs.astro +109 -0
- package/template/src/components/OpenApiPage.astro +178 -14
- package/template/src/components/Sidebar.astro +2 -2
- package/template/src/components/SidebarDropdown.astro +105 -44
- package/template/src/components/SidebarMenu.astro +3 -0
- package/template/src/components/SidebarSegmented.astro +87 -52
- package/template/src/components/SidebarTabs.astro +86 -0
- package/template/src/components/chat/AssistantDocsWidget.tsx +127 -2
- package/template/src/components/chat/AssistantEmbedPanel.tsx +287 -290
- package/template/src/components/endpoint/PlaygroundBar.astro +54 -9
- package/template/src/components/endpoint/PlaygroundForm.astro +1 -1
- package/template/src/components/endpoint/RequestSnippets.astro +6 -1
- package/template/src/components/endpoint/ResponseFieldTree.astro +17 -13
- package/template/src/components/endpoint/ResponseFields.astro +4 -6
- package/template/src/components/endpoint/ResponseSnippets.astro +6 -1
- package/template/src/components/sidebar/SidebarEndpointLink.astro +9 -12
- package/template/src/components/sidebar/SidebarOpenApi.astro +3 -9
- package/template/src/components/ui/Field.astro +18 -15
- package/template/src/components/ui/Tag.astro +16 -2
- package/template/src/components/user/Accordion.astro +1 -1
- package/template/src/components/user/Callout.astro +2 -2
- package/template/src/components/user/CodeBlock.astro +58 -7
- package/template/src/components/user/CodeGroup.astro +52 -1
- package/template/src/components/user/Column.astro +1 -1
- package/template/src/components/user/Step.astro +1 -1
- package/template/src/components/user/Tabs.astro +1 -1
- package/template/src/generated/shiki-platform-assets.json +24 -0
- package/template/src/layouts/Layout.astro +111 -8
- package/template/src/lib/assistant-panel-config.ts +59 -0
- package/template/src/lib/assistant-shiki-client.ts +506 -0
- package/template/src/lib/mdx/remark-resolve-internal-links.ts +334 -17
- package/template/src/lib/routes.ts +66 -24
- package/template/src/lib/utils.ts +11 -0
- package/template/src/styles/global.css +12 -0
package/package.json
CHANGED
|
@@ -35,6 +35,10 @@
|
|
|
35
35
|
"@preact/preset-vite": "^2.10.3",
|
|
36
36
|
"@readme/oas-to-snippet": "^29.3.0",
|
|
37
37
|
"@resvg/resvg-js": "^2.6.2",
|
|
38
|
+
"@shikijs/core": "3.23.0",
|
|
39
|
+
"@shikijs/engine-javascript": "3.23.0",
|
|
40
|
+
"@shikijs/langs": "3.23.0",
|
|
41
|
+
"@shikijs/themes": "3.23.0",
|
|
38
42
|
"@stoplight/spectral-core": "^1.20.0",
|
|
39
43
|
"@stoplight/spectral-rulesets": "^1.22.0",
|
|
40
44
|
"@tailwindcss/typography": "^0.5.19",
|
|
@@ -53,10 +57,11 @@
|
|
|
53
57
|
"preact": "^10.29.0",
|
|
54
58
|
"prism-themes": "^1.9.0",
|
|
55
59
|
"prismjs": "^1.30.0",
|
|
56
|
-
"radiant-docs-validator": "^0.1.
|
|
60
|
+
"radiant-docs-validator": "^0.1.28",
|
|
57
61
|
"rehype-autolink-headings": "^7.1.0",
|
|
58
62
|
"rehype-slug": "^6.0.0",
|
|
59
63
|
"remark-gfm": "^4.0.1",
|
|
64
|
+
"shiki": "3.23.0",
|
|
60
65
|
"simple-git": "^3.30.0",
|
|
61
66
|
"tailwindcss": "^4.2.2",
|
|
62
67
|
"wawoff2": "^2.0.1",
|
|
@@ -67,6 +72,7 @@
|
|
|
67
72
|
"@types/fs-extra": "^11.0.4",
|
|
68
73
|
"@types/mime-types": "^3.0.1",
|
|
69
74
|
"@types/prismjs": "^1.26.5",
|
|
75
|
+
"esbuild": "^0.25.12",
|
|
70
76
|
"pagefind": "^1.4.0",
|
|
71
77
|
"tsx": "^4.21.0"
|
|
72
78
|
}
|
|
@@ -11442,9 +11448,9 @@
|
|
|
11442
11448
|
"license": "MIT"
|
|
11443
11449
|
},
|
|
11444
11450
|
"node_modules/radiant-docs-validator": {
|
|
11445
|
-
"version": "0.1.
|
|
11446
|
-
"resolved": "https://registry.npmjs.org/radiant-docs-validator/-/radiant-docs-validator-0.1.
|
|
11447
|
-
"integrity": "sha512-
|
|
11451
|
+
"version": "0.1.28",
|
|
11452
|
+
"resolved": "https://registry.npmjs.org/radiant-docs-validator/-/radiant-docs-validator-0.1.28.tgz",
|
|
11453
|
+
"integrity": "sha512-gpYz0Fsz+yMbhDGSoNYx+lABVfdPVx+rhtZW+hJ7D1ewnbH0xgx9ZB7dfElWxqRwaPcArhuyJHM7kCm4J7kE6A==",
|
|
11448
11454
|
"license": "MIT",
|
|
11449
11455
|
"dependencies": {
|
|
11450
11456
|
"@iconify-json/fluent": "^1.2.47",
|
package/template/package.json
CHANGED
|
@@ -9,7 +9,10 @@
|
|
|
9
9
|
"build": "astro build && node scripts/remove-assistant-for-non-pro.mjs && node scripts/generate-og-metadata.mjs && node scripts/generate-og-images.mjs && node scripts/stamp-og-image-versions.mjs && node scripts/stamp-image-versions.mjs && pagefind --site dist && node scripts/stamp-pagefind-runtime-version.mjs && node scripts/generate-proxy-allowed-origins.mjs && node scripts/generate-robots-txt.mjs",
|
|
10
10
|
"preview": "astro preview",
|
|
11
11
|
"astro": "astro",
|
|
12
|
-
"search:index": "astro build && node scripts/remove-assistant-for-non-pro.mjs && node scripts/generate-og-metadata.mjs && node scripts/generate-og-images.mjs && node scripts/stamp-og-image-versions.mjs && node scripts/stamp-image-versions.mjs && pagefind --site dist && node scripts/stamp-pagefind-runtime-version.mjs && node scripts/generate-proxy-allowed-origins.mjs && node scripts/generate-robots-txt.mjs && cp -r dist/pagefind public/"
|
|
12
|
+
"search:index": "astro build && node scripts/remove-assistant-for-non-pro.mjs && node scripts/generate-og-metadata.mjs && node scripts/generate-og-images.mjs && node scripts/stamp-og-image-versions.mjs && node scripts/stamp-image-versions.mjs && pagefind --site dist && node scripts/stamp-pagefind-runtime-version.mjs && node scripts/generate-proxy-allowed-origins.mjs && node scripts/generate-robots-txt.mjs && cp -r dist/pagefind public/",
|
|
13
|
+
"shiki:publish-platform-assets": "node scripts/publish-shiki-platform-assets.mjs",
|
|
14
|
+
"shiki:publish-platform-assets:dev": "node scripts/publish-shiki-platform-assets.mjs --env-file .env --check-current",
|
|
15
|
+
"shiki:publish-platform-assets:dev:dry-run": "node scripts/publish-shiki-platform-assets.mjs --env-file .env --check-current --dry-run"
|
|
13
16
|
},
|
|
14
17
|
"dependencies": {
|
|
15
18
|
"@alpinejs/collapse": "^3.15.2",
|
|
@@ -39,6 +42,10 @@
|
|
|
39
42
|
"@preact/preset-vite": "^2.10.3",
|
|
40
43
|
"@readme/oas-to-snippet": "^29.3.0",
|
|
41
44
|
"@resvg/resvg-js": "^2.6.2",
|
|
45
|
+
"@shikijs/core": "3.23.0",
|
|
46
|
+
"@shikijs/engine-javascript": "3.23.0",
|
|
47
|
+
"@shikijs/langs": "3.23.0",
|
|
48
|
+
"@shikijs/themes": "3.23.0",
|
|
42
49
|
"@stoplight/spectral-core": "^1.20.0",
|
|
43
50
|
"@stoplight/spectral-rulesets": "^1.22.0",
|
|
44
51
|
"@tailwindcss/typography": "^0.5.19",
|
|
@@ -57,11 +64,12 @@
|
|
|
57
64
|
"preact": "^10.29.0",
|
|
58
65
|
"prism-themes": "^1.9.0",
|
|
59
66
|
"prismjs": "^1.30.0",
|
|
60
|
-
"radiant-docs-validator": "^0.1.
|
|
67
|
+
"radiant-docs-validator": "^0.1.28",
|
|
61
68
|
"rehype-autolink-headings": "^7.1.0",
|
|
62
69
|
"rehype-slug": "^6.0.0",
|
|
63
70
|
"remark-gfm": "^4.0.1",
|
|
64
71
|
"simple-git": "^3.30.0",
|
|
72
|
+
"shiki": "3.23.0",
|
|
65
73
|
"tailwindcss": "^4.2.2",
|
|
66
74
|
"wawoff2": "^2.0.1",
|
|
67
75
|
"yaml": "^2.8.2",
|
|
@@ -71,6 +79,7 @@
|
|
|
71
79
|
"@types/fs-extra": "^11.0.4",
|
|
72
80
|
"@types/mime-types": "^3.0.1",
|
|
73
81
|
"@types/prismjs": "^1.26.5",
|
|
82
|
+
"esbuild": "^0.25.12",
|
|
74
83
|
"pagefind": "^1.4.0",
|
|
75
84
|
"tsx": "^4.21.0"
|
|
76
85
|
}
|
|
@@ -38,15 +38,23 @@ function collectOpenApiSourcesFromNavigation(navigationNode, target) {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
const menu = navigationNode.menu;
|
|
41
|
-
if (
|
|
42
|
-
|
|
41
|
+
if (isRecord(menu) && Array.isArray(menu.items)) {
|
|
42
|
+
for (const menuItem of menu.items) {
|
|
43
|
+
if (!isRecord(menuItem)) {
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
collectOpenApiSourcesFromNavigation(menuItem, target);
|
|
47
|
+
}
|
|
43
48
|
}
|
|
44
49
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
50
|
+
const tabs = navigationNode.tabs;
|
|
51
|
+
if (isRecord(tabs) && Array.isArray(tabs.items)) {
|
|
52
|
+
for (const tabItem of tabs.items) {
|
|
53
|
+
if (!isRecord(tabItem)) {
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
collectOpenApiSourcesFromNavigation(tabItem, target);
|
|
48
57
|
}
|
|
49
|
-
collectOpenApiSourcesFromNavigation(menuItem.submenu, target);
|
|
50
58
|
}
|
|
51
59
|
}
|
|
52
60
|
|