@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
package/styles/page.css
CHANGED
|
@@ -1,66 +1,256 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
.page > header .stl-secondary-nav-tabs {
|
|
4
|
-
max-width: var(--sl-page-max-width);
|
|
5
|
-
margin: 0 auto;
|
|
1
|
+
:root {
|
|
2
|
+
--stl-page-max-width: 90rem;
|
|
6
3
|
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
/* 0.75rem at 25rem width (phone); 1.5rem at 72rem width (desktop) */
|
|
5
|
+
--_stl-page-min-padding-mobile-rem: 0.75;
|
|
6
|
+
--_stl-page-min-padding-desktop-rem: 1.5;
|
|
7
|
+
--_stl-page-min-padding-slope: (
|
|
8
|
+
(var(--_stl-page-min-padding-desktop-rem) - var(--_stl-page-min-padding-mobile-rem)) / (72 - 25)
|
|
9
|
+
);
|
|
10
|
+
--stl-page-min-padding: clamp(
|
|
11
|
+
var(--_stl-page-min-padding-mobile-rem) * 1rem,
|
|
12
|
+
var(--_stl-page-min-padding-slope) * (100vw - 25rem) + var(--_stl-page-min-padding-mobile-rem) * 1rem,
|
|
13
|
+
var(--_stl-page-min-padding-desktop-rem) * 1rem
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
--stl-content-max-width: 52rem;
|
|
17
|
+
--stl-content-padding: 2rem;
|
|
18
|
+
--stl-two-column-content-max-width: 80rem;
|
|
19
|
+
|
|
20
|
+
--stl-sidebar-width: 16.5rem;
|
|
21
|
+
--stl-nav-height: 3.5rem; /* has to be statically sized in order to correctly position the viewport-end grid area :( */
|
|
22
|
+
--stl-nav-gap: 0.5rem;
|
|
23
|
+
|
|
24
|
+
--stl-page-width: min(var(--stl-page-max-width), 100vw);
|
|
25
|
+
--vw: calc(var(--stl-page-width) / 100);
|
|
26
|
+
|
|
27
|
+
scroll-padding-top: calc(var(--stl-nav-height) + 1rem);
|
|
28
|
+
}
|
|
29
|
+
@media (min-width: 50rem) {
|
|
30
|
+
:root:has(.stl-secondary-nav-tabs) {
|
|
31
|
+
--stl-nav-height: 5.5rem;
|
|
32
|
+
header {
|
|
33
|
+
padding-top: 0.25rem;
|
|
34
|
+
}
|
|
9
35
|
}
|
|
10
36
|
}
|
|
11
37
|
|
|
38
|
+
/* Grid layout */
|
|
12
39
|
|
|
13
40
|
.page {
|
|
14
|
-
|
|
15
|
-
max-width: var(--sl-page-max-width);
|
|
41
|
+
display: grid;
|
|
16
42
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
43
|
+
/* TODO: verify that env-safe-area-inset is behaving as we expect */
|
|
44
|
+
--stl-viewport-width: calc(
|
|
45
|
+
100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px) -
|
|
46
|
+
var(--stl-chat-panel-width, 0px)
|
|
47
|
+
);
|
|
48
|
+
--stl-page-gutter-left: calc(
|
|
49
|
+
env(safe-area-inset-left, 0px) +
|
|
50
|
+
max(var(--stl-page-min-padding), (var(--stl-viewport-width) - var(--stl-page-max-width)) / 2)
|
|
51
|
+
);
|
|
52
|
+
--stl-page-gutter-right: calc(
|
|
53
|
+
env(safe-area-inset-right, 0px) +
|
|
54
|
+
max(var(--stl-page-min-padding), (var(--stl-viewport-width) - var(--stl-page-max-width)) / 2)
|
|
55
|
+
);
|
|
20
56
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
57
|
+
/* prettier-ignore */
|
|
58
|
+
grid:
|
|
59
|
+
/* header + content have two identical columns because in mobile layout the menu trigger takes up the latter */
|
|
60
|
+
' gutter-left header header header header gutter-right chat' var(--stl-nav-height) /* nav */
|
|
61
|
+
' gutter-left sidebar content content toc gutter-right chat' calc(100dvh - var(--stl-nav-height)) /* viewport (above the fold) */
|
|
62
|
+
[viewport-end]
|
|
63
|
+
' gutter-left . content content . gutter-right . ' auto /* rest of page height */
|
|
64
|
+
/ var(--stl-page-gutter-left) var(--stl-sidebar-width) minmax(0, 1fr) auto auto var(--stl-page-gutter-right) auto;
|
|
65
|
+
}
|
|
24
66
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
67
|
+
.page > main,
|
|
68
|
+
.page > .sidebar > .sidebar-pane,
|
|
69
|
+
.page > .right-sidebar-panel nav {
|
|
70
|
+
padding-block-start: 1rem;
|
|
28
71
|
}
|
|
29
72
|
|
|
30
|
-
|
|
31
|
-
/* on desktop, adjust sidebar so that its _text content_ aligns with the page left edge.
|
|
32
|
-
* padding (visible on hover) bleeds out beyond the page left edge, covered by --stl-ui-page-padding-inline */
|
|
33
|
-
.sidebar-pane {
|
|
34
|
-
margin-inline-start: calc(-1 * (var(--sl-sidebar-pad-x) + var(--stl-sidebar-item-padding-inline)));
|
|
35
|
-
}
|
|
73
|
+
/* Sticky header and tabs */
|
|
36
74
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
75
|
+
.page > header {
|
|
76
|
+
grid-area: header;
|
|
77
|
+
margin-left: calc(-1 * var(--stl-page-gutter-left));
|
|
78
|
+
margin-right: calc(-1 * var(--stl-page-gutter-right));
|
|
79
|
+
padding-left: var(--stl-page-gutter-left);
|
|
80
|
+
padding-right: var(--stl-page-gutter-right);
|
|
81
|
+
}
|
|
42
82
|
|
|
43
|
-
|
|
44
|
-
|
|
83
|
+
header {
|
|
84
|
+
display: flex;
|
|
85
|
+
flex-direction: column;
|
|
86
|
+
border-bottom: 1px solid var(--stl-color-border-faint);
|
|
87
|
+
position: sticky;
|
|
88
|
+
top: 0;
|
|
89
|
+
z-index: 10;
|
|
90
|
+
background: var(--stl-color-background);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@layer starlight.core {
|
|
94
|
+
header > .header {
|
|
95
|
+
all: revert-layer;
|
|
45
96
|
}
|
|
46
97
|
}
|
|
47
98
|
|
|
48
|
-
.
|
|
49
|
-
|
|
50
|
-
|
|
99
|
+
header > .header {
|
|
100
|
+
flex: 1;
|
|
101
|
+
display: flex;
|
|
102
|
+
gap: var(--stl-nav-gap);
|
|
103
|
+
align-items: center;
|
|
104
|
+
justify-content: space-between;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.header site-search > button {
|
|
108
|
+
@media (min-width: 50rem) {
|
|
109
|
+
margin-inline: 2rem;
|
|
110
|
+
flex: 1 1 12rem;
|
|
51
111
|
}
|
|
52
112
|
}
|
|
53
113
|
|
|
114
|
+
.header .right-group {
|
|
115
|
+
display: flex;
|
|
116
|
+
align-items: stretch;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/* Sticky sidebar and toc. Outer wrapper “sticks” to top of page, subgrid pushes child down below header */
|
|
120
|
+
.page > .sidebar {
|
|
121
|
+
grid-area: sidebar;
|
|
122
|
+
/* sidebar should bleed to left edge of page in case people want to color it */
|
|
123
|
+
margin-left: calc(-1 * var(--stl-page-gutter-left));
|
|
124
|
+
padding-left: var(--stl-page-gutter-left);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.page > .right-sidebar-panel {
|
|
128
|
+
grid-area: toc;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.page > .sidebar,
|
|
132
|
+
.page > .right-sidebar-panel {
|
|
133
|
+
align-self: start;
|
|
134
|
+
grid-row-start: header-start;
|
|
135
|
+
display: grid;
|
|
136
|
+
grid-template-rows: subgrid;
|
|
137
|
+
grid-template-columns: subgrid;
|
|
138
|
+
position: sticky;
|
|
139
|
+
top: 0;
|
|
140
|
+
}
|
|
141
|
+
.page > .sidebar > .sidebar-pane,
|
|
142
|
+
.page > .right-sidebar-panel > starlight-toc {
|
|
143
|
+
grid-area: inherit;
|
|
144
|
+
grid-row-start: header-end;
|
|
145
|
+
overflow-y: auto;
|
|
146
|
+
overflow-x: clip;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/* Page content */
|
|
150
|
+
|
|
151
|
+
.page > main {
|
|
152
|
+
grid-area: content;
|
|
153
|
+
width: 100%;
|
|
154
|
+
max-width: min(var(--stl-content-max-width), 100%);
|
|
155
|
+
justify-self: center;
|
|
156
|
+
padding-inline: var(--stl-content-padding);
|
|
157
|
+
}
|
|
158
|
+
|
|
54
159
|
.stl-page-nav-container {
|
|
55
160
|
display: flex;
|
|
56
161
|
align-items: center;
|
|
57
162
|
justify-content: space-between;
|
|
58
163
|
gap: 1rem;
|
|
59
|
-
padding: 1rem 0 0 1rem;
|
|
60
164
|
flex-wrap: wrap;
|
|
61
165
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
166
|
+
|
|
167
|
+
.mobile-preferences {
|
|
168
|
+
margin-top: 1rem;
|
|
169
|
+
display: flex;
|
|
170
|
+
justify-content: flex-end;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/* Two-column layouts go wider */
|
|
174
|
+
.page > main:where(:has(.stldocs-method-double-pane)) {
|
|
175
|
+
max-width: min(var(--stl-two-column-content-max-width), 100%);
|
|
176
|
+
padding-inline-start: clamp(
|
|
177
|
+
var(--stl-content-padding),
|
|
178
|
+
var(--stl-page-gutter-right) - env(safe-area-inset-right, 0px),
|
|
179
|
+
var(--stl-content-padding) * 2
|
|
180
|
+
);
|
|
181
|
+
padding-inline-end: 0;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/* Responsive page layout */
|
|
185
|
+
|
|
186
|
+
/* On smaller screens, the main panel takes up the full width and the TOC is hidden */
|
|
187
|
+
@media not (min-width: 72rem) {
|
|
188
|
+
.page > main {
|
|
189
|
+
/* right edge of content goes up to right gutter to align with header */
|
|
190
|
+
padding-inline-end: 0;
|
|
191
|
+
max-width: 100%;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.page > .right-sidebar-panel {
|
|
195
|
+
display: none;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/* On mobile screens, the sidebar and nav links collapse */
|
|
200
|
+
@media not (min-width: 50rem) {
|
|
201
|
+
header {
|
|
202
|
+
padding-top: 0;
|
|
203
|
+
display: grid;
|
|
204
|
+
grid-template-columns: subgrid;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
header > .header {
|
|
208
|
+
grid-column: span 2;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/* Sidebar moves to cover content area, hidden by default */
|
|
212
|
+
:root {
|
|
213
|
+
--stl-sidebar-width: 0px;
|
|
214
|
+
}
|
|
215
|
+
.page > .sidebar,
|
|
216
|
+
.page > .sidebar.hidden {
|
|
217
|
+
display: contents;
|
|
218
|
+
}
|
|
219
|
+
.page > .sidebar > .sidebar-pane {
|
|
220
|
+
visibility: hidden;
|
|
221
|
+
grid-area: content;
|
|
222
|
+
grid-row-end: viewport-end;
|
|
223
|
+
z-index: 9;
|
|
224
|
+
/* extend to right edge of page */
|
|
225
|
+
margin-inline-end: calc(-1 * var(--stl-page-gutter-right));
|
|
226
|
+
padding-inline-end: var(--stl-page-gutter-right);
|
|
227
|
+
border-inline-end: 0;
|
|
228
|
+
}
|
|
229
|
+
.page > .sidebar > starlight-menu-button[aria-expanded='true'] ~ .sidebar-pane {
|
|
230
|
+
visibility: visible;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/* left padding becomes the left gutter when there’s no sidebar */
|
|
234
|
+
.page > main {
|
|
235
|
+
padding-inline-start: 0;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/* Sidebar menu button moves to end of header; takes up space in layout (not absolutely positioned as in starlight) */
|
|
239
|
+
.sidebar starlight-menu-button {
|
|
240
|
+
grid-column: span 1 / content-end;
|
|
241
|
+
grid-row: header;
|
|
242
|
+
display: flex;
|
|
243
|
+
align-items: center;
|
|
244
|
+
position: sticky;
|
|
245
|
+
top: 0;
|
|
246
|
+
padding-left: var(--stl-nav-gap);
|
|
247
|
+
z-index: 11;
|
|
248
|
+
}
|
|
249
|
+
.sidebar starlight-menu-button button {
|
|
250
|
+
position: static;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.header .right-group {
|
|
254
|
+
display: none;
|
|
65
255
|
}
|
|
66
256
|
}
|
package/styles/sdk_select.css
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
.stldocs-root {
|
|
2
|
-
.stldocs-dropdown-menu.stl-sdk-select-dropdown-menu {
|
|
3
|
-
min-width: 200px;
|
|
4
|
-
}
|
|
5
|
-
}
|
|
6
1
|
.stl-sdk-select {
|
|
2
|
+
.stl-ui-dropdown {
|
|
3
|
+
width: 100%;
|
|
4
|
+
|
|
5
|
+
.stl-ui-dropdown__button {
|
|
6
|
+
width: 100%;
|
|
7
|
+
justify-content: space-between;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
7
10
|
.stldocs-icon.http path {
|
|
8
|
-
fill: var(--
|
|
11
|
+
fill: var(--stl-color-foreground);
|
|
9
12
|
}
|
|
10
13
|
}
|
package/styles/search.css
CHANGED
|
@@ -15,45 +15,41 @@ site-search {
|
|
|
15
15
|
padding: 0;
|
|
16
16
|
width: var(--sl-button-size);
|
|
17
17
|
justify-content: center;
|
|
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
|
border-radius: var(--sl-button-border-radius);
|
|
21
21
|
height: var(--sl-button-size);
|
|
22
22
|
|
|
23
23
|
&:hover {
|
|
24
|
-
|
|
24
|
+
background: var(--stl-color-ui-background-hover);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
span {
|
|
28
|
-
font-size: var(--
|
|
29
|
-
color: var(--
|
|
28
|
+
font-size: var(--stl-typography-scale-sm);
|
|
29
|
+
color: var(--stl-color-foreground-reduced);
|
|
30
30
|
line-height: 150%;
|
|
31
31
|
padding-left: var(--sl-button-icon-offset);
|
|
32
32
|
padding-right: var(--sl-button-icon-offset);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
> svg {
|
|
36
|
-
width: var(--
|
|
37
|
-
height: var(--
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
&.stldocs-button {
|
|
41
|
-
padding: 0;
|
|
36
|
+
width: var(--stl-typography-scale-sm);
|
|
37
|
+
height: var(--stl-typography-scale-sm);
|
|
42
38
|
}
|
|
43
39
|
}
|
|
44
40
|
|
|
45
41
|
button > kbd {
|
|
46
42
|
border-radius: 0.25rem;
|
|
47
|
-
font-size: var(--
|
|
43
|
+
font-size: var(--stl-typography-scale-xs);
|
|
48
44
|
gap: 0.25em;
|
|
49
45
|
padding-inline: 0.375rem;
|
|
50
|
-
background-color: var(--
|
|
46
|
+
background-color: var(--stl-color-muted-background);
|
|
51
47
|
margin-right: -0.3rem;
|
|
52
48
|
}
|
|
53
49
|
|
|
54
50
|
kbd {
|
|
55
51
|
font-family: var(--__sl-font);
|
|
56
|
-
color: var(--
|
|
52
|
+
color: var(--stl-color-foreground-reduced);
|
|
57
53
|
}
|
|
58
54
|
}
|
|
59
55
|
|
|
@@ -61,16 +57,10 @@ site-search {
|
|
|
61
57
|
site-search {
|
|
62
58
|
> button {
|
|
63
59
|
border-radius: var(--sl-button-border-radius);
|
|
64
|
-
padding-inline-start: var(--sl-button-padding-x);
|
|
65
|
-
padding-inline-end: var(--sl-button-padding-x);
|
|
66
60
|
width: 100%;
|
|
67
61
|
max-width: 30rem;
|
|
68
62
|
justify-content: start;
|
|
69
|
-
|
|
70
|
-
&.stldocs-button {
|
|
71
|
-
padding-inline-start: var(--sl-button-padding-x);
|
|
72
|
-
padding-inline-end: var(--sl-button-padding-x);
|
|
73
|
-
}
|
|
63
|
+
padding: var(--sl-button-padding-y) var(--sl-button-padding-x);
|
|
74
64
|
|
|
75
65
|
> :last-child {
|
|
76
66
|
margin-inline-start: auto;
|
package/styles/sidebar.css
CHANGED
|
@@ -1,223 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
all: revert-layer;
|
|
6
|
-
&::before,
|
|
7
|
-
&::after {
|
|
8
|
-
all: revert-layer;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.sidebar {
|
|
15
|
-
--stl-sidebar-item-padding-inline: 12px;
|
|
16
|
-
--stl-sidebar-item-padding-block: 6px;
|
|
17
|
-
--stl-sidebar-indent: 12px;
|
|
18
|
-
font-size: var(--stl-ui-type-scale-text-sm);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.sidebar-pane {
|
|
22
|
-
border-inline-end: 1px solid var(--sl-color-hairline-light);
|
|
23
|
-
}
|
|
1
|
+
.page > .sidebar > .sidebar-pane {
|
|
2
|
+
padding-inline-end: 1rem;
|
|
3
|
+
border-inline-end: 1px solid var(--stl-color-border-faint);
|
|
4
|
+
padding-block-end: calc(2rem + env(safe-area-inset-bottom));
|
|
24
5
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
list-style-type: none;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/* collapsible sections */
|
|
32
|
-
details > summary {
|
|
33
|
-
display: flex;
|
|
34
|
-
align-items: center;
|
|
35
|
-
font-weight: 500;
|
|
36
|
-
|
|
37
|
-
.caret {
|
|
38
|
-
margin-left: auto;
|
|
39
|
-
margin-right: -4px;
|
|
40
|
-
opacity: 0.65;
|
|
41
|
-
transition:
|
|
42
|
-
opacity 0.1s ease-out,
|
|
43
|
-
transform 0.1s ease-out;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
details[open] > summary .caret {
|
|
47
|
-
opacity: 1;
|
|
48
|
-
transform: rotate(90deg);
|
|
49
|
-
}
|
|
6
|
+
/* make sure the sidebar doesn’t get clipped on the left by overflow */
|
|
7
|
+
margin-inline-start: calc(-1 * var(--stl-page-gutter-left));
|
|
8
|
+
padding-inline-start: var(--stl-page-gutter-left);
|
|
50
9
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
border-radius: 8px;
|
|
56
|
-
}
|
|
57
|
-
summary,
|
|
58
|
-
li a {
|
|
59
|
-
cursor: pointer;
|
|
60
|
-
padding: var(--stl-sidebar-item-padding-block) var(--stl-sidebar-item-padding-inline);
|
|
61
|
-
&:hover,
|
|
62
|
-
&[aria-current='page'] {
|
|
63
|
-
color: var(--stl-ui-foreground);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
.stl-sdk-select .stldocs-dropdown-trigger {
|
|
67
|
-
/* dropdown should match link padding, accounting for 1px border */
|
|
68
|
-
padding: calc(var(--stl-sidebar-item-padding-block) - 1px) calc(var(--stl-sidebar-item-padding-inline) - 1px);
|
|
69
|
-
}
|
|
70
|
-
li a {
|
|
71
|
-
color: var(--stl-ui-foreground-secondary);
|
|
72
|
-
font-weight: 400;
|
|
73
|
-
display: flex;
|
|
74
|
-
text-decoration: none;
|
|
75
|
-
span {
|
|
76
|
-
font-weight: inherit;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
&:hover {
|
|
80
|
-
text-decoration: underline;
|
|
81
|
-
text-decoration-color: var(--stl-ui-foreground-secondary);
|
|
82
|
-
}
|
|
83
|
-
&[aria-current='page'] {
|
|
84
|
-
font-weight: 500;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
li:has(> a:is(:hover, [aria-current='page'])),
|
|
88
|
-
summary:hover {
|
|
89
|
-
background-color: var(--stl-ui-muted-background);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/* nested list items have flat left edge */
|
|
93
|
-
ul ul :is(summary, li) {
|
|
94
|
-
border-start-start-radius: 0;
|
|
95
|
-
border-end-start-radius: 0;
|
|
96
|
-
}
|
|
97
|
-
ul {
|
|
98
|
-
padding: 0;
|
|
99
|
-
}
|
|
100
|
-
ul ul li {
|
|
101
|
-
border-inline-start: 1px solid var(--stl-ui-border-muted);
|
|
102
|
-
margin-inline-start: var(--stl-sidebar-indent);
|
|
103
|
-
&:has(> a[aria-current='page']) {
|
|
104
|
-
border-inline-start: 2px solid var(--stl-ui-foreground-accent);
|
|
105
|
-
& > a {
|
|
106
|
-
margin-left: -1px;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
10
|
+
background-color: var(--stl-color-background);
|
|
11
|
+
/* work around chrome bug where the background-color isn’t getting painted in the overscroll? */
|
|
12
|
+
background-image: linear-gradient(to bottom, var(--stl-color-background), var(--stl-color-background));
|
|
13
|
+
background-attachment: fixed;
|
|
110
14
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
a[data-stldocs-resource] {
|
|
115
|
-
--stl-ui-sidebar-icon-size-outer: 18px;
|
|
116
|
-
--stl-ui-sidebar-icon-margin: 8px;
|
|
117
|
-
}
|
|
118
|
-
a[data-stldocs-method] {
|
|
119
|
-
--stl-ui-sidebar-icon-size-inner: 16px;
|
|
120
|
-
--stl-ui-sidebar-icon-color-inverse: var(--stl-ui-swatch-gray-white);
|
|
121
|
-
|
|
122
|
-
&[data-stldocs-method='get'] {
|
|
123
|
-
--stl-ui-sidebar-icon-color: var(--stl-ui-swatch-green-base);
|
|
124
|
-
--stl-ui-sidebar-icon-color-faint: var(--stl-ui-swatch-green-faint);
|
|
125
|
-
--stl-ui-sidebar-icon-color-muted: var(--stl-ui-swatch-green-muted);
|
|
126
|
-
}
|
|
127
|
-
&[data-stldocs-method='post'] {
|
|
128
|
-
--stl-ui-sidebar-icon-color: var(--stl-ui-swatch-blue-base);
|
|
129
|
-
--stl-ui-sidebar-icon-color-faint: var(--stl-ui-swatch-blue-faint);
|
|
130
|
-
--stl-ui-sidebar-icon-color-muted: var(--stl-ui-swatch-blue-muted);
|
|
131
|
-
}
|
|
132
|
-
&[data-stldocs-method='patch'],
|
|
133
|
-
&[data-stldocs-method='put'] {
|
|
134
|
-
--stl-ui-sidebar-icon-color: var(--stl-ui-swatch-orange-base);
|
|
135
|
-
--stl-ui-sidebar-icon-color-faint: var(--stl-ui-swatch-orange-faint);
|
|
136
|
-
--stl-ui-sidebar-icon-color-muted: var(--stl-ui-swatch-orange-muted);
|
|
137
|
-
}
|
|
138
|
-
&[data-stldocs-method='delete'] {
|
|
139
|
-
--stl-ui-sidebar-icon-color: var(--stl-ui-swatch-red-base);
|
|
140
|
-
--stl-ui-sidebar-icon-color-faint: var(--stl-ui-swatch-red-faint);
|
|
141
|
-
--stl-ui-sidebar-icon-color-muted: var(--stl-ui-swatch-red-muted);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
&[data-stldocs-method='get'] {
|
|
145
|
-
--stl-ui-sidebar-icon-url: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17 7 7 17"/><path d="M17 17H7V7"/></svg>');
|
|
146
|
-
}
|
|
147
|
-
&[data-stldocs-method='post'],
|
|
148
|
-
&[data-stldocs-method='put'],
|
|
149
|
-
&[data-stldocs-method='patch'] {
|
|
150
|
-
--stl-ui-sidebar-icon-url: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M7 7h10v10"/><path d="M7 17 17 7"/></svg>');
|
|
151
|
-
}
|
|
152
|
-
&[data-stldocs-method='delete'] {
|
|
153
|
-
--stl-ui-sidebar-icon-url: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>');
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
a[data-stldocs-resource] {
|
|
158
|
-
/* not yet implemented in markup */
|
|
159
|
-
--stl-ui-sidebar-icon-color: var(--stl-ui-foreground-muted);
|
|
160
|
-
--stl-ui-sidebar-icon-color-faint: var(--stl-ui-muted-background);
|
|
161
|
-
--stl-ui-sidebar-icon-color-inverse: var(--stl-ui-inverse-foreground);
|
|
162
|
-
--stl-ui-sidebar-icon-size-inner: 14px;
|
|
163
|
-
--stl-ui-sidebar-icon-url: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1"/><path d="M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1"/></svg>');
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
a[data-stldocs-method],
|
|
167
|
-
a[data-stldocs-resource] {
|
|
168
|
-
display: flex;
|
|
169
|
-
gap: var(--stl-ui-sidebar-icon-margin);
|
|
170
|
-
align-items: center;
|
|
171
|
-
position: relative;
|
|
172
|
-
|
|
173
|
-
&::before,
|
|
174
|
-
&::after {
|
|
175
|
-
content: '';
|
|
176
|
-
width: var(--stl-ui-sidebar-icon-size-outer);
|
|
177
|
-
height: var(--stl-ui-sidebar-icon-size-outer);
|
|
178
|
-
display: block;
|
|
179
|
-
}
|
|
180
|
-
&::before {
|
|
181
|
-
border-radius: 4px;
|
|
182
|
-
background-color: var(--stl-ui-sidebar-icon-color-faint);
|
|
183
|
-
flex: 0 0 auto;
|
|
184
|
-
}
|
|
185
|
-
/* yuck (we can clean this up once we are changing sidebar markup) */
|
|
186
|
-
&::after {
|
|
187
|
-
background-color: var(--stl-ui-sidebar-icon-color);
|
|
188
|
-
mask-image: var(--stl-ui-sidebar-icon-url);
|
|
189
|
-
mask-size: var(--stl-ui-sidebar-icon-size-inner) var(--stl-ui-sidebar-icon-size-inner);
|
|
190
|
-
mask-repeat: no-repeat;
|
|
191
|
-
mask-position: center;
|
|
192
|
-
position: absolute;
|
|
193
|
-
left: var(--stl-sidebar-item-padding-inline);
|
|
194
|
-
top: 50%;
|
|
195
|
-
transform: translateY(-50%);
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
&:hover {
|
|
199
|
-
&::before {
|
|
200
|
-
background-color: var(--stl-ui-sidebar-icon-color-muted);
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
&[aria-current='page'] {
|
|
204
|
-
&::before {
|
|
205
|
-
background-color: var(--stl-ui-sidebar-icon-color);
|
|
206
|
-
}
|
|
207
|
-
&::after {
|
|
208
|
-
background-color: var(--stl-ui-sidebar-icon-color-inverse);
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
.sidebar-content .stl-mobile-only-sidebar-item-last {
|
|
215
|
-
margin-bottom: 2rem;
|
|
216
|
-
position: relative;
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
gap: 1rem;
|
|
217
18
|
}
|
|
218
19
|
|
|
219
|
-
|
|
220
|
-
|
|
20
|
+
@media (min-width: 50rem) {
|
|
21
|
+
.page > .sidebar :is(.stl-sdk-select, .stldocs-sidebar) {
|
|
22
|
+
/* align left edge of text with container */
|
|
23
|
+
margin-inline-start: calc(-1 * var(--stldocs-sidebar-item-padding-inline));
|
|
24
|
+
}
|
|
221
25
|
}
|
|
222
26
|
|
|
223
27
|
.stl-sidebar-header-links {
|
|
@@ -236,3 +40,12 @@
|
|
|
236
40
|
display: none;
|
|
237
41
|
}
|
|
238
42
|
}
|
|
43
|
+
|
|
44
|
+
/* No sidebar on splash pages */
|
|
45
|
+
.page > .sidebar.hidden {
|
|
46
|
+
/* Note: on mobile, this will be overridden to display: contents; in order to show the mobile menu */
|
|
47
|
+
display: none;
|
|
48
|
+
}
|
|
49
|
+
:root:has(.page > .sidebar.hidden) {
|
|
50
|
+
--stl-sidebar-width: 0px;
|
|
51
|
+
}
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
--sl-color-bg-table-row: #ffffff0a;
|
|
3
3
|
--sl-button-border-radius: 8px;
|
|
4
|
-
--sl-text-body-sm: 0.86rem;
|
|
5
|
-
--sl-content-width: 52rem;
|
|
6
|
-
--sl-nav-pad-y: 0.5rem;
|
|
7
|
-
--sl-nav-height: 56px;
|
|
8
|
-
--sl-sidebar-width: 19rem;
|
|
9
4
|
--sl-button-size: 32px;
|
|
10
5
|
--sl-button-padding-x: 0.75rem;
|
|
11
6
|
--sl-button-padding-y: 0.5rem;
|
|
12
7
|
--sl-button-icon-offset: 0.2rem;
|
|
13
|
-
|
|
8
|
+
|
|
9
|
+
/* TODO: remove --sl-nav-height dependencies */
|
|
10
|
+
--sl-nav-height: 56px;
|
|
14
11
|
|
|
15
12
|
--sl-nav-gap: 0.5rem;
|
|
16
|
-
--sl-icon-color: var(--
|
|
17
|
-
--sl-page-max-width: unset;
|
|
13
|
+
--sl-icon-color: var(--stl-color-foreground);
|
|
18
14
|
}
|