@stainless-api/docs 0.1.0-beta.13 → 0.1.0-beta.130
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/CHANGELOG.md +1102 -0
- package/ambient.d.ts +6 -0
- package/eslint-suppressions.json +90 -0
- package/{eslint.config.js → eslint.config.ts} +0 -2
- package/locals.d.ts +17 -0
- package/package.json +62 -44
- package/playground-virtual-modules.d.ts +96 -0
- package/plugin/assets/languages/cli.svg +14 -0
- package/plugin/assets/languages/csharp.svg +1 -0
- package/plugin/assets/languages/php.svg +4 -0
- package/plugin/buildAlgoliaIndex.ts +40 -39
- package/plugin/components/MethodDescription.tsx +54 -0
- package/plugin/components/RequestBuilder/ParamEditor.tsx +55 -0
- package/plugin/components/RequestBuilder/SnippetStainlessIsland.tsx +107 -0
- package/plugin/components/RequestBuilder/index.tsx +40 -0
- package/plugin/components/RequestBuilder/props.ts +9 -0
- package/plugin/components/RequestBuilder/spec-helpers.ts +47 -0
- package/plugin/components/RequestBuilder/styles.css +67 -0
- package/plugin/components/SDKSelect.astro +18 -111
- package/plugin/components/SnippetCode.tsx +112 -70
- package/plugin/components/StainlessIslands.tsx +126 -0
- package/plugin/components/search/SearchAlgolia.astro +46 -29
- package/plugin/components/search/SearchIsland.tsx +61 -37
- package/plugin/generateAPIReferenceLink.ts +0 -40
- package/plugin/globalJs/ai-dropdown-options.ts +248 -0
- package/plugin/globalJs/code-snippets.ts +45 -16
- package/plugin/globalJs/copy.ts +115 -27
- package/plugin/globalJs/create-playground.shim.ts +3 -0
- package/plugin/globalJs/method-descriptions.ts +33 -0
- package/plugin/globalJs/navigation.ts +24 -44
- package/plugin/globalJs/playground-data.shim.ts +1 -0
- package/plugin/globalJs/playground-data.ts +14 -0
- package/plugin/globalJs/summary-selection-tweak.ts +29 -0
- package/plugin/helpers/generateDocsRoutes.ts +59 -0
- package/plugin/helpers/multiSpec.ts +8 -0
- package/plugin/index.ts +317 -141
- package/plugin/languages.ts +8 -2
- package/plugin/loadPluginConfig.ts +284 -109
- package/plugin/markdown/highlighter.ts +100 -0
- package/plugin/markdown/index.ts +39 -0
- package/plugin/middlewareBuilder/stainlessMiddleware.d.ts +3 -1
- package/plugin/react/Routing.tsx +98 -263
- package/plugin/referencePlaceholderUtils.ts +17 -14
- package/plugin/replaceSidebarPlaceholderMiddleware.ts +39 -35
- package/plugin/routes/Docs.astro +72 -111
- package/plugin/routes/DocsStatic.astro +6 -5
- package/plugin/routes/Overview.astro +46 -22
- package/plugin/routes/llms.ts +186 -0
- package/plugin/routes/markdown.ts +13 -12
- package/plugin/{cms → sidebar-utils}/sidebar-builder.ts +84 -69
- package/plugin/specs/FileCache.ts +99 -0
- package/plugin/specs/fetchSpecSSR.ts +27 -0
- package/plugin/specs/generateSpec.ts +112 -0
- package/plugin/specs/index.ts +132 -0
- package/plugin/specs/inputResolver.ts +148 -0
- package/plugin/{cms → specs}/worker.ts +82 -5
- package/plugin/vendor/preview.worker.docs.js +27121 -16890
- package/plugin/vendor/templates/cli.md +1 -0
- package/plugin/vendor/templates/go.md +4 -2
- package/plugin/vendor/templates/java.md +5 -1
- package/plugin/vendor/templates/kotlin.md +5 -1
- package/plugin/vendor/templates/node.md +4 -2
- package/plugin/vendor/templates/python.md +4 -2
- package/plugin/vendor/templates/ruby.md +4 -2
- package/plugin/vendor/templates/terraform.md +1 -1
- package/plugin/vendor/templates/typescript.md +3 -1
- package/resolveSrcFile.ts +10 -0
- package/scripts/vendor_deps.ts +5 -5
- package/shared/conditionalIntegration.ts +28 -0
- package/shared/getProsePages.ts +41 -0
- package/shared/getSharedLogger.ts +15 -0
- package/shared/terminalUtils.ts +3 -0
- package/shared/virtualModule.ts +46 -1
- package/src/content.config.ts +9 -0
- package/stl-docs/aiChatExamples.ts +95 -0
- package/stl-docs/chat/docs-chat-handler.ts +18 -0
- package/stl-docs/chat/hook.ts +215 -0
- package/stl-docs/chat/schemas.ts +70 -0
- package/stl-docs/chat/stainless-handler/index.ts +126 -0
- package/stl-docs/chat/stream-util.ts +16 -0
- package/stl-docs/chat/ui/AiChat.module.css +591 -0
- package/stl-docs/chat/ui/AiChat.tsx +188 -0
- package/stl-docs/chat/ui/Trigger.tsx +154 -0
- package/stl-docs/chat/ui/components/ChatControls.tsx +51 -0
- package/stl-docs/chat/ui/components/ChatEmpty.tsx +42 -0
- package/stl-docs/chat/ui/components/ChatLog.tsx +96 -0
- package/stl-docs/chat/ui/components/ChatMessage.tsx +47 -0
- package/stl-docs/chat/ui/components/CodeBlock.tsx +33 -0
- package/stl-docs/chat/ui/components/MessageFeedback.tsx +109 -0
- package/stl-docs/chat/ui/components/Table.tsx +15 -0
- package/stl-docs/chat/ui/components/ToolCall.tsx +34 -0
- package/stl-docs/chat/ui/components/hljs-github.css +81 -0
- package/stl-docs/chat/ui/scroll-manager.ts +86 -0
- package/stl-docs/chat/ui/types.ts +45 -0
- package/stl-docs/components/AIDropdown.tsx +63 -0
- package/stl-docs/components/AiChatIsland.tsx +16 -0
- package/stl-docs/components/{content-panel/ContentBreadcrumbs.tsx → ContentBreadcrumbs.tsx} +2 -2
- package/stl-docs/components/ContentPanel.astro +9 -0
- package/stl-docs/components/Footer.astro +89 -0
- package/stl-docs/components/Head.astro +20 -0
- package/stl-docs/components/Header.astro +3 -9
- package/stl-docs/components/PageFrame.astro +37 -0
- package/stl-docs/components/PageSidebar.astro +11 -0
- package/stl-docs/components/PageTitle.astro +82 -0
- package/stl-docs/components/StainlessLogo.svg +4 -0
- package/stl-docs/components/ThemeProvider.astro +36 -0
- package/stl-docs/components/ThemeSelect.astro +84 -146
- package/stl-docs/components/TwoColumnContent.astro +2 -0
- package/stl-docs/components/headers/DefaultHeader.astro +6 -8
- package/stl-docs/components/headers/StackedHeader.astro +10 -53
- package/stl-docs/components/icons/chat-gpt.tsx +2 -2
- package/stl-docs/components/icons/cursor.tsx +10 -0
- package/stl-docs/components/icons/gemini.tsx +19 -0
- package/stl-docs/components/icons/markdown.tsx +1 -1
- package/stl-docs/components/index.ts +1 -0
- package/stl-docs/components/mintlify-compat/Accordion.astro +2 -2
- package/stl-docs/components/mintlify-compat/AccordionGroup.astro +0 -4
- package/stl-docs/components/mintlify-compat/Columns.astro +2 -2
- package/stl-docs/components/mintlify-compat/Frame.astro +6 -6
- package/stl-docs/components/mintlify-compat/Tab.astro +2 -2
- package/stl-docs/components/mintlify-compat/callouts/Callout.astro +2 -2
- package/stl-docs/components/mintlify-compat/callouts/Check.astro +0 -4
- package/stl-docs/components/mintlify-compat/callouts/Danger.astro +0 -4
- package/stl-docs/components/mintlify-compat/callouts/Info.astro +0 -4
- package/stl-docs/components/mintlify-compat/callouts/Note.astro +0 -4
- package/stl-docs/components/mintlify-compat/callouts/Tip.astro +0 -4
- package/stl-docs/components/mintlify-compat/callouts/Warning.astro +0 -4
- package/stl-docs/components/mintlify-compat/card.css +4 -4
- package/stl-docs/components/mintlify-compat/index.ts +2 -4
- package/stl-docs/components/nav-tabs/NavDropdown.astro +38 -77
- package/stl-docs/components/nav-tabs/NavTabs.astro +81 -81
- package/stl-docs/components/nav-tabs/SecondaryNavTabs.astro +1 -2
- package/stl-docs/components/nav-tabs/buildNavLinks.ts +5 -2
- package/stl-docs/components/pagination/HomeLink.astro +10 -0
- package/stl-docs/components/pagination/Pagination.astro +177 -0
- package/stl-docs/components/pagination/PaginationLinkEmphasized.astro +22 -0
- package/stl-docs/components/pagination/PaginationLinkQuiet.astro +13 -0
- package/stl-docs/components/pagination/util.ts +71 -0
- package/stl-docs/components/scripts.ts +1 -0
- package/stl-docs/components/sidebars/BaseSidebar.astro +80 -2
- package/stl-docs/components/sidebars/SidebarWithComponents.tsx +10 -0
- package/stl-docs/components/sidebars/convertAstroSidebarToStl.tsx +62 -0
- package/stl-docs/disableCalloutSyntax.ts +36 -0
- package/stl-docs/fonts.ts +186 -0
- package/stl-docs/index.ts +176 -58
- package/stl-docs/loadStlDocsConfig.ts +73 -8
- package/stl-docs/proseDocSync.test.ts +74 -0
- package/stl-docs/proseDocSync.ts +344 -0
- package/stl-docs/proseMarkdown/proseMarkdownIntegration.ts +53 -0
- package/stl-docs/proseMarkdown/proseMarkdownMiddleware.ts +41 -0
- package/stl-docs/proseMarkdown/toMarkdown.ts +158 -0
- package/stl-docs/proseSearchIndexing.ts +218 -0
- package/stl-docs/tabsMiddleware.ts +14 -5
- package/styles/code.css +53 -49
- package/styles/links.css +2 -37
- package/styles/method-descriptions.css +36 -0
- package/styles/overrides.css +28 -46
- package/styles/page.css +228 -38
- package/styles/sdk_select.css +9 -6
- package/styles/search.css +11 -21
- package/styles/sidebar.css +28 -215
- package/styles/{variables.css → sl-variables.css} +4 -8
- package/styles/stldocs-variables.css +6 -0
- package/styles/toc.css +19 -8
- package/theme.css +11 -9
- package/tsconfig.json +1 -4
- package/virtual-module.d.ts +66 -8
- package/components/variables.css +0 -112
- package/plugin/cms/client.ts +0 -62
- package/plugin/cms/server.ts +0 -268
- package/plugin/globalJs/ai-dropdown.ts +0 -57
- package/stl-docs/components/APIReferenceAIDropdown.tsx +0 -58
- package/stl-docs/components/ClientRouterHead.astro +0 -41
- package/stl-docs/components/content-panel/ContentPanel.astro +0 -69
- package/stl-docs/components/content-panel/ProseAIDropdown.tsx +0 -55
- package/stl-docs/components/headers/SplashMobileMenuToggle.astro +0 -49
- package/stl-docs/components/mintlify-compat/Step.astro +0 -56
- package/stl-docs/components/mintlify-compat/Steps.astro +0 -15
- package/styles/fonts.css +0 -68
- /package/{plugin/assets → assets}/fonts/geist/OFL.txt +0 -0
- /package/{plugin/assets → assets}/fonts/geist/geist-italic-latin-ext.woff2 +0 -0
- /package/{plugin/assets → assets}/fonts/geist/geist-italic-latin.woff2 +0 -0
- /package/{plugin/assets → assets}/fonts/geist/geist-latin-ext.woff2 +0 -0
- /package/{plugin/assets → assets}/fonts/geist/geist-latin.woff2 +0 -0
- /package/{plugin/assets → assets}/fonts/geist/geist-mono-italic-latin-ext.woff2 +0 -0
- /package/{plugin/assets → assets}/fonts/geist/geist-mono-italic-latin.woff2 +0 -0
- /package/{plugin/assets → assets}/fonts/geist/geist-mono-latin-ext.woff2 +0 -0
- /package/{plugin/assets → assets}/fonts/geist/geist-mono-latin.woff2 +0 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export const GeminiIcon = () => (
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 192 192" width="16" height="16">
|
|
3
|
+
<defs>
|
|
4
|
+
<clipPath id="clippath">
|
|
5
|
+
<path
|
|
6
|
+
d="M164.93 86.68c-13.56-5.84-25.42-13.84-35.6-24.01-10.17-10.17-18.18-22.04-24.01-35.6-2.23-5.19-4.04-10.54-5.42-16.02C99.45 9.26 97.85 8 96 8s-3.45 1.26-3.9 3.05c-1.38 5.48-3.18 10.81-5.42 16.02-5.84 13.56-13.84 25.43-24.01 35.6-10.17 10.16-22.04 18.17-35.6 24.01-5.19 2.23-10.54 4.04-16.02 5.42C9.26 92.55 8 94.15 8 96s1.26 3.45 3.05 3.9c5.48 1.38 10.81 3.18 16.02 5.42 13.56 5.84 25.42 13.84 35.6 24.01 10.17 10.17 18.18 22.04 24.01 35.6 2.24 5.2 4.04 10.54 5.42 16.02A4.03 4.03 0 0 0 96 184c1.85 0 3.45-1.26 3.9-3.05 1.38-5.48 3.18-10.81 5.42-16.02 5.84-13.56 13.84-25.42 24.01-35.6 10.17-10.17 22.04-18.18 35.6-24.01 5.2-2.24 10.54-4.04 16.02-5.42A4.03 4.03 0 0 0 184 96c0-1.85-1.26-3.45-3.05-3.9-5.48-1.38-10.81-3.18-16.02-5.42"
|
|
7
|
+
className="st0"
|
|
8
|
+
/>
|
|
9
|
+
</clipPath>
|
|
10
|
+
</defs>
|
|
11
|
+
<g style={{ clipPath: 'url(#clippath)' }}>
|
|
12
|
+
<image
|
|
13
|
+
xlinkHref="data:image/webp;base64,UklGRoQQAABXRUJQVlA4IHgQAABwggCdASoAAQABPhUKhEGhBFYZfAQAUSxtxh9NbBxnu+sP619jnmvye/Mr5XuP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h8O+ceR+VLDFvENFkRXg1b2jYK6BPH4iweK9cn930tHzdfrjQo99O6UolsA0o7fsgAIiLPiV8+pZ0WS98IAQ+2ZUJ7RSDX/bQSGqUt+7Slciebr8g12tT5icQC2Y3DrJfDAP4YLLay96tFE1Uqecn6gsm0WR01D6oiUSwiDTMyeAAAA"
|
|
14
|
+
width={192}
|
|
15
|
+
height={192}
|
|
16
|
+
/>
|
|
17
|
+
</g>
|
|
18
|
+
</svg>
|
|
19
|
+
);
|
|
@@ -3,7 +3,7 @@ export function MarkdownIcon() {
|
|
|
3
3
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
|
4
4
|
<path
|
|
5
5
|
d="M14.8447 3.33301C15.151 3.33301 15.4455 3.45527 15.6621 3.67188C15.8785 3.88844 16 4.18213 16 4.48828V12.0254C15.9997 12.3315 15.8777 12.6254 15.6611 12.8418C15.4446 13.0581 15.1508 13.1797 14.8447 13.1797H1.15527C0.848967 13.1797 0.55449 13.0584 0.337891 12.8418C0.121288 12.6252 0 12.3307 0 12.0244V4.48828C1.09706e-05 4.18213 0.121501 3.88844 0.337891 3.67188C0.554493 3.45527 0.848951 3.33301 1.15527 3.33301H14.8447ZM1.15527 4.10254C1.10457 4.10245 1.0537 4.11247 1.00684 4.13184C0.960202 4.15116 0.917554 4.17917 0.881836 4.21484C0.845984 4.2507 0.817213 4.29396 0.797852 4.34082C0.778601 4.38756 0.769447 4.43773 0.769531 4.48828V12.0254C0.76962 12.0759 0.779409 12.1262 0.798828 12.1729C0.81827 12.2196 0.846978 12.2621 0.882812 12.2979C0.918602 12.3335 0.961134 12.3616 1.00781 12.3809C1.05454 12.4001 1.10474 12.4102 1.15527 12.4102H14.8447C14.9467 12.4101 15.045 12.3699 15.1172 12.2979C15.1893 12.2258 15.2293 12.1274 15.2295 12.0254V4.48828C15.2296 4.43774 15.2204 4.38755 15.2012 4.34082C15.1819 4.29403 15.1529 4.25166 15.1172 4.21582C15.0814 4.17999 15.0389 4.15126 14.9922 4.13184C14.9455 4.11249 14.8952 4.10258 14.8447 4.10254H1.15527ZM5.38477 7.56348L6.92285 5.64062H8.46094V10.8721H6.92285V7.87109L5.38477 9.79492L3.8457 7.87109V10.8711H2.30762V5.63965H3.8457L5.38477 7.56348ZM12.6924 8.33301H14.2305L11.9229 10.8711L9.61523 8.33301H11.1533V5.64062H12.6924V8.33301Z"
|
|
6
|
-
fill="
|
|
6
|
+
fill="currentColor"
|
|
7
7
|
/>
|
|
8
8
|
</svg>
|
|
9
9
|
);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@stainless-api/ui-primitives';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
2
|
+
type Props = {
|
|
3
3
|
caption?: string;
|
|
4
|
-
}
|
|
4
|
+
};
|
|
5
5
|
|
|
6
6
|
const { caption } = Astro.props;
|
|
7
7
|
---
|
|
@@ -15,8 +15,8 @@ const { caption } = Astro.props;
|
|
|
15
15
|
.stl-ui-mintlify-compat-frame {
|
|
16
16
|
padding: 6px;
|
|
17
17
|
border-radius: 10px;
|
|
18
|
-
background-color: var(--
|
|
19
|
-
border: 1px solid var(--
|
|
18
|
+
background-color: var(--stl-color-ui-background);
|
|
19
|
+
border: 1px solid var(--stl-color-border);
|
|
20
20
|
|
|
21
21
|
.stl-ui-mintlify-compat-frame-content {
|
|
22
22
|
border-radius: 8px;
|
|
@@ -27,8 +27,8 @@ const { caption } = Astro.props;
|
|
|
27
27
|
text-align: center;
|
|
28
28
|
padding-top: 12px;
|
|
29
29
|
padding-bottom: 6px;
|
|
30
|
-
font-size: var(--
|
|
31
|
-
color: var(--
|
|
30
|
+
font-size: var(--stl-typography-scale-base);
|
|
31
|
+
color: var(--stl-color-foreground-reduced);
|
|
32
32
|
line-height: 100%;
|
|
33
33
|
}
|
|
34
34
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
import { Callout as StainlessCallout, type CalloutVariant } from '@stainless-api/ui-primitives';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
type Props = {
|
|
5
5
|
variant?: CalloutVariant;
|
|
6
6
|
children: astroHTML.JSX.Children;
|
|
7
|
-
}
|
|
7
|
+
};
|
|
8
8
|
|
|
9
9
|
const { variant } = Astro.props;
|
|
10
10
|
---
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
.stl-ui-mintlify-compat-card {
|
|
2
2
|
border-radius: 12px;
|
|
3
3
|
padding: 16px;
|
|
4
|
-
font-size: var(--
|
|
4
|
+
font-size: var(--stl-typography-scale-base);
|
|
5
5
|
display: flex;
|
|
6
6
|
gap: 8px;
|
|
7
|
-
border: 1px solid var(--
|
|
7
|
+
border: 1px solid var(--stl-color-border);
|
|
8
8
|
flex-direction: column;
|
|
9
9
|
|
|
10
10
|
.stl-ui-mintlify-compat-card-icon svg {
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
|
|
23
23
|
.stl-ui-mintlify-compat-card-content {
|
|
24
24
|
margin-top: 0;
|
|
25
|
-
color: var(--
|
|
25
|
+
color: var(--stl-color-foreground-reduced);
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
a.stl-ui-mintlify-compat-card {
|
|
30
30
|
text-decoration: none;
|
|
31
|
-
color: var(--
|
|
31
|
+
color: var(--stl-color-foreground-reduced);
|
|
32
32
|
|
|
33
33
|
&:hover {
|
|
34
34
|
border-color: var(--sl-color-accent);
|
|
@@ -3,13 +3,11 @@ import Tab from './Tab.astro';
|
|
|
3
3
|
import Tabs from './Tabs.astro';
|
|
4
4
|
import Frame from './Frame.astro';
|
|
5
5
|
import Columns from './Columns.astro';
|
|
6
|
-
import Steps from './Steps.astro';
|
|
7
|
-
import Step from './Step.astro';
|
|
8
6
|
import Accordion from './Accordion.astro';
|
|
9
7
|
import AccordionGroup from './AccordionGroup.astro';
|
|
10
8
|
|
|
11
9
|
export * from './callouts';
|
|
12
10
|
export * from './Card';
|
|
13
11
|
|
|
14
|
-
export { Tab, Tabs, Frame, Columns,
|
|
15
|
-
export { Button } from '@stainless-api/ui-primitives';
|
|
12
|
+
export { Tab, Tabs, Frame, Columns, AccordionGroup, Accordion };
|
|
13
|
+
export { Button, Steps, Step } from '@stainless-api/ui-primitives';
|
|
@@ -1,81 +1,57 @@
|
|
|
1
1
|
---
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
DropdownTrigger,
|
|
5
|
-
DropdownMenu,
|
|
6
|
-
DropdownItem,
|
|
7
|
-
} from '@stainless-api/docs-ui/src/components/dropdown';
|
|
8
|
-
import { Icon } from '@astrojs/starlight/components';
|
|
9
|
-
import { buildNavLinks } from './buildNavLinks';
|
|
2
|
+
import { ChevronsUpDownIcon } from 'lucide-react';
|
|
3
|
+
import { Dropdown } from '@stainless-api/docs/components';
|
|
10
4
|
|
|
11
|
-
|
|
12
|
-
useHamburgerIcon?: boolean;
|
|
13
|
-
}
|
|
5
|
+
import type { NavLink } from './buildNavLinks';
|
|
14
6
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const buttonText = (navLinks.find((item) => item.active) ?? navLinks[0]).label;
|
|
7
|
+
type Props = {
|
|
8
|
+
links: NavLink[];
|
|
9
|
+
currentItem: NavLink | null;
|
|
10
|
+
};
|
|
21
11
|
---
|
|
22
12
|
|
|
23
|
-
<
|
|
24
|
-
<Dropdown
|
|
25
|
-
<
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
13
|
+
<Dropdown id="nav-dropdown" className="nav-dropdown-root">
|
|
14
|
+
<Dropdown.Trigger>
|
|
15
|
+
<Dropdown.TriggerSelectedItem>
|
|
16
|
+
{Astro.props.currentItem ? Astro.props.currentItem.label : 'Navigation'}
|
|
17
|
+
</Dropdown.TriggerSelectedItem>
|
|
18
|
+
<Dropdown.TriggerIcon>
|
|
19
|
+
<ChevronsUpDownIcon size={16} />
|
|
20
|
+
</Dropdown.TriggerIcon>
|
|
21
|
+
</Dropdown.Trigger>
|
|
22
|
+
<Dropdown.Menu className="dropdown-menu">
|
|
23
|
+
{
|
|
24
|
+
Astro.props.links.map((item) => (
|
|
25
|
+
<Dropdown.MenuItem
|
|
26
|
+
key={item.link}
|
|
27
|
+
href={item.link}
|
|
28
|
+
className="dropdown-item"
|
|
29
|
+
value={item.label}
|
|
30
|
+
isSelected={item.active}
|
|
31
|
+
>
|
|
32
|
+
{item.label}
|
|
33
|
+
<Dropdown.MenuItemTemplate>{item.label}</Dropdown.MenuItemTemplate>
|
|
34
|
+
</Dropdown.MenuItem>
|
|
35
|
+
))
|
|
36
|
+
}
|
|
37
|
+
</Dropdown.Menu>
|
|
38
|
+
</Dropdown>
|
|
46
39
|
|
|
47
40
|
<script>
|
|
48
|
-
import { initDropdown } from '@stainless-api/docs
|
|
41
|
+
import { initDropdown } from '@stainless-api/docs/components/scripts';
|
|
49
42
|
import { getPageLoadEvent } from '../../../plugin/helpers/getPageLoadEvent';
|
|
50
43
|
|
|
51
44
|
document.addEventListener(getPageLoadEvent(), () => {
|
|
52
45
|
initDropdown({
|
|
53
|
-
|
|
54
|
-
|
|
46
|
+
initialValue: null,
|
|
47
|
+
root: document.getElementById('nav-dropdown'),
|
|
55
48
|
});
|
|
56
49
|
});
|
|
57
50
|
</script>
|
|
58
|
-
<style is:global>
|
|
59
|
-
.nav-dropdown-root .dropdown-menu.stldocs-dropdown-menu {
|
|
60
|
-
display: none;
|
|
61
|
-
position: fixed;
|
|
62
|
-
z-index: 1000;
|
|
63
|
-
width: 200px;
|
|
64
|
-
margin: 0.125rem 0 0;
|
|
65
|
-
font-size: 1rem;
|
|
66
|
-
text-align: left;
|
|
67
|
-
list-style: none;
|
|
68
|
-
background-clip: padding-box;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.nav-dropdown-root .dropdown-menu.open {
|
|
72
|
-
display: block;
|
|
73
|
-
}
|
|
74
|
-
</style>
|
|
75
51
|
|
|
76
52
|
<style>
|
|
77
53
|
:root {
|
|
78
|
-
--menu-font-size: calc(var(--
|
|
54
|
+
--menu-font-size: calc(var(--stl-typography-scale-base) * 0.9);
|
|
79
55
|
}
|
|
80
56
|
|
|
81
57
|
.dropdown {
|
|
@@ -83,24 +59,9 @@ const buttonText = (navLinks.find((item) => item.active) ?? navLinks[0]).label;
|
|
|
83
59
|
}
|
|
84
60
|
|
|
85
61
|
.dropdown-item {
|
|
86
|
-
|
|
87
|
-
color: var(--sl-color-text);
|
|
62
|
+
color: inherit;
|
|
88
63
|
text-align: inherit;
|
|
89
64
|
text-decoration: none;
|
|
90
65
|
white-space: nowrap;
|
|
91
66
|
}
|
|
92
|
-
|
|
93
|
-
.dropdown-item:focus {
|
|
94
|
-
color: #1e2125;
|
|
95
|
-
background-color: #e9ecef;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.nav-dropdown-root {
|
|
99
|
-
background-color: var(--sl-color-bg-nav);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.nav-dropdown-button {
|
|
103
|
-
color: var(--sl-color-text);
|
|
104
|
-
font-weight: 500;
|
|
105
|
-
}
|
|
106
67
|
</style>
|
|
@@ -5,82 +5,102 @@ import NavDropdown from './NavDropdown.astro';
|
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
|
|
7
7
|
const navLinks = buildNavLinks(Astro.locals.starlightRoute);
|
|
8
|
+
|
|
9
|
+
const currentItem = navLinks.find((item) => item.active) ?? null;
|
|
8
10
|
---
|
|
9
11
|
|
|
10
|
-
<div id="nav-links-container">
|
|
11
|
-
<
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
<ul class="nav-links" id="nav-links-test-container">
|
|
32
|
-
{
|
|
33
|
-
navLinks.map((item) => (
|
|
34
|
-
<li>
|
|
35
|
-
<Button href={item.link} className={clsx('nav-link')} variant={item.active ? 'accent' : 'ghost'}>
|
|
36
|
-
<span>{item.label}</span>
|
|
37
|
-
</Button>
|
|
38
|
-
</li>
|
|
39
|
-
))
|
|
40
|
-
}
|
|
41
|
-
</ul>
|
|
12
|
+
<div id="nav-links-container" class="nav-links-container">
|
|
13
|
+
<div class="desktop-nav-links-container">
|
|
14
|
+
<ul class="nav-links" id="nav-links-list">
|
|
15
|
+
{
|
|
16
|
+
navLinks.map((item) => (
|
|
17
|
+
<li data-desktop-only>
|
|
18
|
+
<Button
|
|
19
|
+
href={item.link}
|
|
20
|
+
className={clsx('nav-link')}
|
|
21
|
+
variant={item.active ? 'accent-muted' : 'ghost'}
|
|
22
|
+
>
|
|
23
|
+
<span>{item.label}</span>
|
|
24
|
+
</Button>
|
|
25
|
+
</li>
|
|
26
|
+
))
|
|
27
|
+
}
|
|
28
|
+
</ul>
|
|
29
|
+
</div>
|
|
30
|
+
<div class="mobile-nav-dropdown" data-mobile-only>
|
|
31
|
+
{navLinks.length > 0 && <NavDropdown links={navLinks} currentItem={currentItem} />}
|
|
32
|
+
</div>
|
|
42
33
|
</div>
|
|
43
34
|
|
|
44
35
|
<script>
|
|
45
36
|
import { getPageLoadEvent } from '../../../plugin/helpers/getPageLoadEvent';
|
|
46
37
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
38
|
+
// We need to measure the nav links to see if they fit. We create an offscreen hidden clone for measurement.
|
|
39
|
+
function createOffscreenClone(element: HTMLElement): HTMLElement {
|
|
40
|
+
const clone = element.cloneNode(true) as HTMLElement;
|
|
41
|
+
clone.removeAttribute('id');
|
|
42
|
+
clone.id = 'cloned-nav-links-measurement';
|
|
43
|
+
clone.style.position = 'absolute';
|
|
44
|
+
clone.style.visibility = 'hidden';
|
|
45
|
+
clone.style.top = '0';
|
|
46
|
+
clone.style.left = '0';
|
|
47
|
+
clone.style.width = 'auto';
|
|
48
|
+
clone.style.whiteSpace = 'nowrap';
|
|
49
|
+
clone.style.pointerEvents = 'none';
|
|
50
|
+
clone.style.zIndex = '-9999';
|
|
51
|
+
|
|
52
|
+
clone.querySelectorAll('[data-desktop-only], [data-mobile-only]').forEach((el) => {
|
|
53
|
+
el.removeAttribute('data-desktop-only');
|
|
54
|
+
});
|
|
50
55
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
return rw;
|
|
56
|
+
document.body.appendChild(clone);
|
|
57
|
+
return clone;
|
|
54
58
|
}
|
|
55
59
|
|
|
56
60
|
function initNavbar() {
|
|
57
|
-
const
|
|
58
|
-
if (!
|
|
61
|
+
const navLinksContainer = document.getElementById('nav-links-container');
|
|
62
|
+
if (!navLinksContainer) {
|
|
63
|
+
console.error(`NavTabs: #nav-links-container not found`);
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const navLinksList = document.getElementById('nav-links-list');
|
|
68
|
+
if (!navLinksList) {
|
|
69
|
+
console.error(`NavTabs: #nav-links-list not found`);
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
59
72
|
|
|
60
|
-
const
|
|
61
|
-
|
|
73
|
+
const measurementClone = createOffscreenClone(navLinksList);
|
|
74
|
+
const requiredWidth = measurementClone.clientWidth;
|
|
62
75
|
|
|
63
|
-
|
|
76
|
+
let currentMode: 'desktop' | 'mobile' | null = null;
|
|
64
77
|
|
|
65
78
|
function checkIfFits() {
|
|
66
|
-
if (!masterContainer) return;
|
|
67
79
|
if (!navLinksContainer) return;
|
|
68
|
-
|
|
69
|
-
|
|
80
|
+
|
|
81
|
+
// 16px buffer helps it feel less crowded before switching modes
|
|
82
|
+
const bufferSpace = 16;
|
|
83
|
+
const availableWidth = navLinksContainer.clientWidth;
|
|
84
|
+
const canFit = availableWidth - bufferSpace >= requiredWidth;
|
|
70
85
|
|
|
71
86
|
const mode = canFit ? 'desktop' : 'mobile';
|
|
72
87
|
|
|
73
|
-
|
|
88
|
+
// Only update if mode actually changed
|
|
89
|
+
if (mode === currentMode) return;
|
|
90
|
+
|
|
91
|
+
currentMode = mode;
|
|
74
92
|
|
|
75
|
-
|
|
76
|
-
document.documentElement.classList.remove('stl-nav-links-mode-mobile');
|
|
93
|
+
localStorage.setItem('stl-nav-links-mode', mode);
|
|
77
94
|
|
|
78
|
-
document.documentElement.classList.
|
|
95
|
+
document.documentElement.classList.toggle('stl-nav-links-mode-desktop', mode === 'desktop');
|
|
96
|
+
document.documentElement.classList.toggle('stl-nav-links-mode-mobile', mode === 'mobile');
|
|
79
97
|
}
|
|
80
98
|
|
|
81
|
-
|
|
99
|
+
const resizeObserver = new ResizeObserver(() => {
|
|
82
100
|
checkIfFits();
|
|
83
101
|
});
|
|
102
|
+
|
|
103
|
+
resizeObserver.observe(navLinksContainer);
|
|
84
104
|
checkIfFits();
|
|
85
105
|
}
|
|
86
106
|
|
|
@@ -109,55 +129,35 @@ const navLinks = buildNavLinks(Astro.locals.starlightRoute);
|
|
|
109
129
|
</style>
|
|
110
130
|
|
|
111
131
|
<style>
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
132
|
+
.nav-links-container {
|
|
133
|
+
flex-grow: 1;
|
|
134
|
+
margin-left: 1rem;
|
|
135
|
+
margin-right: 1rem;
|
|
136
|
+
}
|
|
115
137
|
|
|
116
|
-
|
|
117
|
-
visibility: hidden;
|
|
138
|
+
.desktop-nav-links-container {
|
|
118
139
|
display: flex;
|
|
119
140
|
flex-grow: 1;
|
|
120
141
|
justify-content: flex-start;
|
|
121
142
|
overflow: hidden;
|
|
122
|
-
margin-left: 1rem;
|
|
123
|
-
margin-right: 1rem;
|
|
124
143
|
}
|
|
125
144
|
|
|
126
145
|
.nav-links {
|
|
127
146
|
display: flex;
|
|
128
147
|
list-style: none;
|
|
129
|
-
gap:
|
|
148
|
+
gap: 4px;
|
|
130
149
|
padding: 0;
|
|
131
150
|
margin: 0;
|
|
132
151
|
white-space: nowrap;
|
|
133
152
|
overflow: hidden;
|
|
134
153
|
}
|
|
135
154
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
top: 0;
|
|
139
|
-
left: 0;
|
|
140
|
-
visibility: hidden;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
.nav-links li {
|
|
144
|
-
display: flex;
|
|
145
|
-
align-items: center;
|
|
146
|
-
justify-content: center;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.nav-link {
|
|
150
|
-
text-decoration: none;
|
|
151
|
-
flex: 1;
|
|
152
|
-
|
|
153
|
-
&.stl-ui-button--ghost:hover {
|
|
154
|
-
color: var(--sl-color-text-accent);
|
|
155
|
-
background-color: transparent;
|
|
156
|
-
}
|
|
155
|
+
.mobile-nav-dropdown {
|
|
156
|
+
flex-grow: 1;
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
@media (min-width: 50rem) {
|
|
160
|
-
|
|
160
|
+
.desktop-nav-links-container {
|
|
161
161
|
display: flex;
|
|
162
162
|
visibility: visible;
|
|
163
163
|
}
|
|
@@ -35,7 +35,6 @@ const navLinks = buildNavLinks(Astro.locals.starlightRoute);
|
|
|
35
35
|
padding: 0;
|
|
36
36
|
list-style: none;
|
|
37
37
|
margin-bottom: -1px;
|
|
38
|
-
gap: 4px;
|
|
39
38
|
}
|
|
40
39
|
|
|
41
40
|
li {
|
|
@@ -43,7 +42,7 @@ const navLinks = buildNavLinks(Astro.locals.starlightRoute);
|
|
|
43
42
|
border-bottom: 2px solid transparent;
|
|
44
43
|
|
|
45
44
|
&.active {
|
|
46
|
-
border-color: var(--
|
|
45
|
+
border-color: var(--stl-color-accent-border-strong);
|
|
47
46
|
}
|
|
48
47
|
|
|
49
48
|
.stl-ui-button {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { StarlightRouteData } from '@astrojs/starlight/route-data';
|
|
2
2
|
import { TABS } from 'virtual:stl-docs-virtual-module';
|
|
3
|
+
import type { StarlightRouteWithStlDocs } from '../../tabsMiddleware';
|
|
3
4
|
|
|
4
5
|
export function buildNavLinks(starlightRoute: StarlightRouteData) {
|
|
5
|
-
|
|
6
|
-
const activeTabIndex =
|
|
6
|
+
const routeData: StarlightRouteWithStlDocs = starlightRoute;
|
|
7
|
+
const activeTabIndex = routeData?._stlDocs?.activeTabIndex;
|
|
7
8
|
|
|
8
9
|
const navLinks = TABS.map((item, index) => ({
|
|
9
10
|
...item,
|
|
@@ -12,3 +13,5 @@ export function buildNavLinks(starlightRoute: StarlightRouteData) {
|
|
|
12
13
|
|
|
13
14
|
return navLinks;
|
|
14
15
|
}
|
|
16
|
+
|
|
17
|
+
export type NavLink = ReturnType<typeof buildNavLinks>[number];
|