@stainless-api/docs 0.1.0-beta.5 → 0.1.0-beta.50
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 +381 -0
- package/eslint-suppressions.json +47 -0
- package/locals.d.ts +14 -0
- package/package.json +42 -38
- package/plugin/buildAlgoliaIndex.ts +31 -6
- package/plugin/cms/server.ts +98 -56
- package/plugin/cms/sidebar-builder.ts +7 -26
- package/plugin/cms/worker.ts +3 -3
- package/plugin/components/MethodDescription.tsx +54 -0
- package/plugin/components/SDKSelect.astro +7 -87
- package/plugin/components/SnippetCode.tsx +11 -7
- package/plugin/components/search/SearchAlgolia.astro +5 -33
- package/plugin/components/search/SearchIsland.tsx +37 -23
- package/plugin/generateAPIReferenceLink.ts +2 -2
- package/plugin/globalJs/ai-dropdown-options.ts +235 -0
- package/plugin/globalJs/method-descriptions.ts +33 -0
- package/plugin/globalJs/navigation.ts +7 -27
- package/plugin/helpers/getPageLoadEvent.ts +1 -1
- package/plugin/index.ts +54 -34
- package/plugin/languages.ts +2 -2
- package/plugin/loadPluginConfig.ts +112 -32
- package/plugin/middlewareBuilder/stainlessMiddleware.d.ts +1 -1
- package/plugin/react/Routing.tsx +176 -80
- package/plugin/referencePlaceholderUtils.ts +1 -1
- package/plugin/replaceSidebarPlaceholderMiddleware.ts +5 -1
- package/plugin/routes/Docs.astro +60 -85
- package/plugin/routes/Overview.astro +10 -16
- package/plugin/routes/markdown.ts +7 -7
- package/plugin/vendor/preview.worker.docs.js +17973 -16561
- package/plugin/vendor/templates/go.md +1 -1
- package/plugin/vendor/templates/python.md +1 -1
- package/resolveSrcFile.ts +10 -0
- package/scripts/vendor_deps.ts +1 -1
- package/shared/getSharedLogger.ts +15 -0
- package/shared/terminalUtils.ts +3 -0
- package/src/content.config.ts +9 -0
- package/stl-docs/components/AIDropdown.tsx +63 -0
- package/stl-docs/components/{content-panel/ContentBreadcrumbs.tsx → ContentBreadcrumbs.tsx} +2 -2
- package/stl-docs/components/Head.astro +16 -0
- package/stl-docs/components/Header.astro +6 -8
- package/stl-docs/components/PageTitle.astro +82 -0
- package/stl-docs/components/TableOfContents.astro +34 -0
- package/stl-docs/components/ThemeSelect.astro +118 -141
- package/stl-docs/components/content-panel/ContentPanel.astro +16 -46
- package/stl-docs/components/headers/DefaultHeader.astro +1 -1
- package/stl-docs/components/headers/HeaderLinks.astro +1 -1
- package/stl-docs/components/headers/SplashMobileMenuToggle.astro +17 -1
- package/stl-docs/components/headers/StackedHeader.astro +29 -24
- package/stl-docs/components/icons/chat-gpt.tsx +17 -0
- package/stl-docs/components/icons/claude.tsx +10 -0
- 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 +10 -0
- package/stl-docs/components/index.ts +1 -0
- package/stl-docs/components/mintlify-compat/Accordion.astro +7 -38
- package/stl-docs/components/mintlify-compat/AccordionGroup.astro +9 -23
- package/stl-docs/components/mintlify-compat/Columns.astro +40 -42
- package/stl-docs/components/mintlify-compat/Frame.astro +16 -18
- package/stl-docs/components/mintlify-compat/Step.astro +30 -32
- package/stl-docs/components/mintlify-compat/Steps.astro +8 -10
- package/stl-docs/components/mintlify-compat/callouts/Callout.astro +10 -3
- package/stl-docs/components/mintlify-compat/callouts/Check.astro +7 -3
- package/stl-docs/components/mintlify-compat/callouts/Danger.astro +7 -3
- package/stl-docs/components/mintlify-compat/callouts/Info.astro +7 -3
- package/stl-docs/components/mintlify-compat/callouts/Note.astro +7 -3
- package/stl-docs/components/mintlify-compat/callouts/Tip.astro +7 -3
- package/stl-docs/components/mintlify-compat/callouts/Warning.astro +7 -3
- package/stl-docs/components/mintlify-compat/card.css +33 -35
- package/stl-docs/components/nav-tabs/NavDropdown.astro +31 -75
- package/stl-docs/components/nav-tabs/NavTabs.astro +78 -80
- package/stl-docs/components/nav-tabs/SecondaryNavTabs.astro +15 -8
- package/stl-docs/components/nav-tabs/buildNavLinks.ts +4 -3
- package/stl-docs/components/pagination/HomeLink.astro +10 -0
- package/stl-docs/components/pagination/Pagination.astro +174 -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/{Sidebar.astro → sidebars/BaseSidebar.astro} +2 -3
- package/stl-docs/components/sidebars/SDKSelectSidebar.astro +8 -0
- package/stl-docs/disableCalloutSyntax.ts +36 -0
- package/stl-docs/index.ts +98 -26
- package/stl-docs/loadStlDocsConfig.ts +37 -5
- package/stl-docs/proseMarkdown/proseMarkdownIntegration.ts +64 -0
- package/stl-docs/proseMarkdown/proseMarkdownMiddleware.ts +34 -0
- package/stl-docs/proseMarkdown/toMarkdown.ts +158 -0
- package/stl-docs/tabsMiddleware.ts +12 -4
- package/styles/code.css +104 -141
- package/styles/fonts.css +32 -17
- package/styles/links.css +11 -48
- package/styles/method-descriptions.css +36 -0
- package/styles/overrides.css +49 -57
- package/styles/page.css +90 -59
- package/styles/sdk_select.css +9 -7
- package/styles/search.css +58 -69
- package/styles/sidebar.css +211 -131
- package/styles/{variables.css → sl-variables.css} +3 -2
- package/styles/stldocs-variables.css +6 -0
- package/styles/toc.css +41 -34
- package/theme.css +12 -2
- package/tsconfig.json +2 -5
- package/virtual-module.d.ts +8 -4
- package/components/variables.css +0 -139
- package/plugin/globalJs/ai-dropdown.ts +0 -57
- package/stl-docs/components/APIReferenceAIDropdown.tsx +0 -86
- package/stl-docs/components/content-panel/ProseAIDropdown.tsx +0 -64
- /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/sidebar.css
CHANGED
|
@@ -1,168 +1,248 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
background-color: unset;
|
|
10
|
-
color: var(--sl-color-text-accent);
|
|
11
|
-
|
|
12
|
-
span {
|
|
13
|
-
font-weight: normal;
|
|
1
|
+
/* reset starlight styles */
|
|
2
|
+
@layer starlight.core {
|
|
3
|
+
.sidebar .sidebar-pane .sidebar-content {
|
|
4
|
+
* {
|
|
5
|
+
all: revert-layer;
|
|
6
|
+
&::before,
|
|
7
|
+
&::after {
|
|
8
|
+
all: revert-layer;
|
|
14
9
|
}
|
|
15
10
|
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
16
13
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
font-size: var(--sl-text-sm);
|
|
24
|
-
line-height: 150%;
|
|
25
|
-
}
|
|
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-typography-scale-sm);
|
|
19
|
+
}
|
|
26
20
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
21
|
+
.sidebar-pane {
|
|
22
|
+
border-inline-end: 1px solid var(--stl-color-border-faint);
|
|
23
|
+
}
|
|
31
24
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
25
|
+
.sidebar-content {
|
|
26
|
+
ul,
|
|
27
|
+
summary {
|
|
28
|
+
list-style-type: none;
|
|
29
|
+
}
|
|
36
30
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
31
|
+
/* collapsible sections */
|
|
32
|
+
details > summary {
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
font-weight: 500;
|
|
41
36
|
|
|
42
|
-
|
|
43
|
-
|
|
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
44
|
}
|
|
45
|
+
}
|
|
46
|
+
details[open] > summary .caret {
|
|
47
|
+
opacity: 1;
|
|
48
|
+
transform: rotate(90deg);
|
|
49
|
+
}
|
|
45
50
|
|
|
46
|
-
|
|
47
|
-
|
|
51
|
+
/* list items */
|
|
52
|
+
summary,
|
|
53
|
+
li {
|
|
54
|
+
margin: 0;
|
|
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-color-foreground);
|
|
48
64
|
}
|
|
65
|
+
}
|
|
49
66
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
67
|
+
li a {
|
|
68
|
+
color: var(--stl-color-foreground-reduced);
|
|
69
|
+
font-weight: 400;
|
|
70
|
+
display: flex;
|
|
71
|
+
text-decoration: none;
|
|
72
|
+
span {
|
|
73
|
+
font-weight: inherit;
|
|
57
74
|
}
|
|
58
75
|
|
|
59
|
-
|
|
60
|
-
|
|
76
|
+
&:hover {
|
|
77
|
+
text-decoration: underline;
|
|
78
|
+
text-decoration-color: var(--stl-color-foreground-reduced);
|
|
61
79
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
border-bottom: 1px solid var(--sl-color-hairline-light);
|
|
65
|
-
padding-bottom: 1rem;
|
|
66
|
-
margin-bottom: 0.5rem;
|
|
80
|
+
&[aria-current='page'] {
|
|
81
|
+
font-weight: 500;
|
|
67
82
|
}
|
|
68
83
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
width: 100%;
|
|
73
|
-
}
|
|
84
|
+
li:has(> a:is(:hover, [aria-current='page'])),
|
|
85
|
+
summary:hover {
|
|
86
|
+
background-color: var(--stl-color-background-hover);
|
|
74
87
|
}
|
|
75
88
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
89
|
+
/* nested list items have flat left edge */
|
|
90
|
+
ul ul :is(summary, li) {
|
|
91
|
+
border-start-start-radius: 0;
|
|
92
|
+
border-end-start-radius: 0;
|
|
79
93
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
content: '';
|
|
83
|
-
min-width: 20px;
|
|
84
|
-
height: 20px;
|
|
85
|
-
border-radius: 4px;
|
|
86
|
-
text-align: center;
|
|
87
|
-
margin-top: 1px;
|
|
94
|
+
ul {
|
|
95
|
+
padding: 0;
|
|
88
96
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
background-color: var(--sl-color-text-accent);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.stl-mobile-only-sidebar-item[aria-current='page']::after {
|
|
102
|
-
background-color: transparent;
|
|
97
|
+
ul ul li {
|
|
98
|
+
border-inline-start: 1px solid var(--stl-color-border-faint);
|
|
99
|
+
margin-inline-start: var(--stl-sidebar-indent);
|
|
100
|
+
&:has(> a[aria-current='page']) {
|
|
101
|
+
border-inline-start: 2px solid var(--stl-color-accent-foreground);
|
|
102
|
+
& > a {
|
|
103
|
+
margin-left: -1px;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
103
106
|
}
|
|
104
107
|
|
|
105
|
-
/*
|
|
108
|
+
/* Method & resource icons */
|
|
106
109
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
110
|
+
a[data-stldocs-method],
|
|
111
|
+
a[data-stldocs-resource] {
|
|
112
|
+
--stl-ui-sidebar-icon-size-outer: 18px;
|
|
113
|
+
--stl-ui-sidebar-icon-margin: 8px;
|
|
114
|
+
}
|
|
115
|
+
a[data-stldocs-method] {
|
|
116
|
+
--stl-ui-sidebar-icon-size-inner: 16px;
|
|
117
|
+
--stl-ui-sidebar-icon-color-inverse-background: var(--stl-ui-sidebar-icon-color);
|
|
118
|
+
|
|
119
|
+
&[data-stldocs-method='get'] {
|
|
120
|
+
--stl-ui-sidebar-icon-color: var(--stl-color-green-foreground);
|
|
121
|
+
--stl-ui-sidebar-icon-color-border: var(--stl-color-green-border);
|
|
122
|
+
--stl-ui-sidebar-icon-color-background: var(--stl-color-green-muted-background);
|
|
123
|
+
--stl-ui-sidebar-icon-color-background-hover: var(--stl-color-green-muted-background-hover);
|
|
124
|
+
--stl-ui-sidebar-icon-color-inverse-background: var(--stl-color-green-inverse-background);
|
|
125
|
+
--stl-ui-sidebar-icon-color-inverse-foreground: var(--stl-color-green-inverse-foreground);
|
|
126
|
+
}
|
|
127
|
+
&[data-stldocs-method='post'] {
|
|
128
|
+
--stl-ui-sidebar-icon-color: var(--stl-color-blue-foreground);
|
|
129
|
+
--stl-ui-sidebar-icon-color-border: var(--stl-color-blue-border);
|
|
130
|
+
--stl-ui-sidebar-icon-color-background: var(--stl-color-blue-muted-background);
|
|
131
|
+
--stl-ui-sidebar-icon-color-background-hover: var(--stl-color-blue-muted-background-hover);
|
|
132
|
+
--stl-ui-sidebar-icon-color-inverse-background: var(--stl-color-blue-inverse-background);
|
|
133
|
+
--stl-ui-sidebar-icon-color-inverse-foreground: var(--stl-color-blue-inverse-foreground);
|
|
134
|
+
}
|
|
135
|
+
&[data-stldocs-method='patch'],
|
|
136
|
+
&[data-stldocs-method='put'] {
|
|
137
|
+
--stl-ui-sidebar-icon-color: var(--stl-color-orange-foreground);
|
|
138
|
+
--stl-ui-sidebar-icon-color-border: var(--stl-color-orange-border);
|
|
139
|
+
--stl-ui-sidebar-icon-color-background: var(--stl-color-orange-muted-background);
|
|
140
|
+
--stl-ui-sidebar-icon-color-background-hover: var(--stl-color-orange-muted-background-hover);
|
|
141
|
+
--stl-ui-sidebar-icon-color-inverse-background: var(--stl-color-orange-inverse-background);
|
|
142
|
+
--stl-ui-sidebar-icon-color-inverse-foreground: var(--stl-color-orange-inverse-foreground);
|
|
143
|
+
}
|
|
144
|
+
&[data-stldocs-method='delete'] {
|
|
145
|
+
--stl-ui-sidebar-icon-color: var(--stl-color-red-foreground);
|
|
146
|
+
--stl-ui-sidebar-icon-color-border: var(--stl-color-red-border);
|
|
147
|
+
--stl-ui-sidebar-icon-color-background: var(--stl-color-red-muted-background);
|
|
148
|
+
--stl-ui-sidebar-icon-color-background-hover: var(--stl-color-red-muted-background-hover);
|
|
149
|
+
--stl-ui-sidebar-icon-color-inverse-background: var(--stl-color-red-inverse-background);
|
|
150
|
+
--stl-ui-sidebar-icon-color-inverse-foreground: var(--stl-color-red-inverse-foreground);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
&[data-stldocs-method='get'] {
|
|
154
|
+
--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>');
|
|
155
|
+
}
|
|
156
|
+
&[data-stldocs-method='post'],
|
|
157
|
+
&[data-stldocs-method='put'],
|
|
158
|
+
&[data-stldocs-method='patch'] {
|
|
159
|
+
--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>');
|
|
160
|
+
}
|
|
161
|
+
&[data-stldocs-method='delete'] {
|
|
162
|
+
--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>');
|
|
111
163
|
}
|
|
164
|
+
}
|
|
112
165
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
166
|
+
a[data-stldocs-resource] {
|
|
167
|
+
/* not yet implemented in markup */
|
|
168
|
+
--stl-ui-sidebar-icon-color: var(--stl-color-foreground-muted);
|
|
169
|
+
--stl-ui-sidebar-icon-color-border: var(--stl-color-border);
|
|
170
|
+
--stl-ui-sidebar-icon-color-background: var(--stl-color-faint-background);
|
|
171
|
+
--stl-ui-sidebar-icon-color-background-hover: var(--stl-color-faint-background-hover);
|
|
172
|
+
--stl-ui-sidebar-icon-color-inverse-background: var(--stl-color-inverse-background);
|
|
173
|
+
--stl-ui-sidebar-icon-color-inverse-foreground: var(--stl-color-inverse-foreground);
|
|
174
|
+
|
|
175
|
+
--stl-ui-sidebar-icon-size-inner: 14px;
|
|
176
|
+
--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>');
|
|
177
|
+
}
|
|
117
178
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
179
|
+
a[data-stldocs-method],
|
|
180
|
+
a[data-stldocs-resource] {
|
|
181
|
+
display: flex;
|
|
182
|
+
gap: var(--stl-ui-sidebar-icon-margin);
|
|
183
|
+
align-items: center;
|
|
184
|
+
position: relative;
|
|
185
|
+
|
|
186
|
+
&::before,
|
|
187
|
+
&::after {
|
|
188
|
+
content: '';
|
|
189
|
+
width: var(--stl-ui-sidebar-icon-size-outer);
|
|
190
|
+
height: var(--stl-ui-sidebar-icon-size-outer);
|
|
191
|
+
display: block;
|
|
192
|
+
}
|
|
193
|
+
&::before {
|
|
194
|
+
border-radius: 4px;
|
|
195
|
+
background-color: var(--stl-ui-sidebar-icon-color-background);
|
|
196
|
+
flex: 0 0 auto;
|
|
197
|
+
border: 1px solid var(--stl-ui-sidebar-icon-color-border, transparent);
|
|
198
|
+
}
|
|
199
|
+
/* yuck (we can clean this up once we are changing sidebar markup) */
|
|
200
|
+
&::after {
|
|
201
|
+
background-color: var(--stl-ui-sidebar-icon-color);
|
|
202
|
+
mask-image: var(--stl-ui-sidebar-icon-url);
|
|
203
|
+
mask-size: var(--stl-ui-sidebar-icon-size-inner) var(--stl-ui-sidebar-icon-size-inner);
|
|
204
|
+
mask-repeat: no-repeat;
|
|
205
|
+
mask-position: center;
|
|
206
|
+
position: absolute;
|
|
207
|
+
left: var(--stl-sidebar-item-padding-inline);
|
|
208
|
+
top: 50%;
|
|
209
|
+
transform: translateY(-50%);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
&:hover {
|
|
213
|
+
&::before {
|
|
214
|
+
background-color: var(--stl-ui-sidebar-icon-color-background-hover);
|
|
215
|
+
}
|
|
122
216
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
217
|
+
&[aria-current='page'] {
|
|
218
|
+
&::before {
|
|
219
|
+
background-color: var(--stl-ui-sidebar-icon-color-inverse-background);
|
|
220
|
+
}
|
|
221
|
+
&::after {
|
|
222
|
+
background-color: var(--stl-ui-sidebar-icon-color-inverse-foreground);
|
|
223
|
+
}
|
|
127
224
|
}
|
|
128
225
|
}
|
|
226
|
+
}
|
|
129
227
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
[data-stldocs-method='post']::before {
|
|
137
|
-
background-color: var(--sl-color-blue-low);
|
|
138
|
-
content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 -2 24 24" fill="none" stroke="rgba(9, 105, 218)" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-right-icon lucide-arrow-up-right"><path d="M7 7h10v10"/><path d="M7 17 17 7"/></svg>');
|
|
139
|
-
}
|
|
228
|
+
.sidebar-content .stl-mobile-only-sidebar-item-last {
|
|
229
|
+
margin-bottom: 2rem;
|
|
230
|
+
position: relative;
|
|
231
|
+
}
|
|
140
232
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
233
|
+
.stl-sidebar-header-links {
|
|
234
|
+
display: flex;
|
|
235
|
+
gap: 1rem;
|
|
236
|
+
flex-direction: column-reverse;
|
|
237
|
+
}
|
|
146
238
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
239
|
+
@media (min-width: 50rem) {
|
|
240
|
+
.stl-mobile-only-sidebar-item,
|
|
241
|
+
li:has(> .stl-mobile-only-sidebar-item) {
|
|
242
|
+
display: none;
|
|
151
243
|
}
|
|
152
244
|
|
|
153
245
|
.stl-sidebar-header-links {
|
|
154
|
-
display:
|
|
155
|
-
gap: 1rem;
|
|
156
|
-
flex-direction: column-reverse;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
@media (min-width: 50rem) {
|
|
160
|
-
.stl-mobile-only-sidebar-item {
|
|
161
|
-
display: none;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.stl-sidebar-header-links {
|
|
165
|
-
display: none;
|
|
166
|
-
}
|
|
246
|
+
display: none;
|
|
167
247
|
}
|
|
168
248
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
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
4
|
--sl-content-width: 52rem;
|
|
6
5
|
--sl-nav-pad-y: 0.5rem;
|
|
7
6
|
--sl-nav-height: 56px;
|
|
@@ -13,6 +12,8 @@
|
|
|
13
12
|
--sl-menu-button-size: var(--sl-button-size);
|
|
14
13
|
|
|
15
14
|
--sl-nav-gap: 0.5rem;
|
|
16
|
-
--sl-icon-color: var(--
|
|
15
|
+
--sl-icon-color: var(--stl-color-foreground);
|
|
17
16
|
--sl-page-max-width: unset;
|
|
17
|
+
|
|
18
|
+
--sl-content-pad-x: 1rem;
|
|
18
19
|
}
|
package/styles/toc.css
CHANGED
|
@@ -1,42 +1,49 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
nav > ul {
|
|
4
|
-
padding-top: 0;
|
|
5
|
-
border-left: 1px solid var(--sl-color-hairline-light);
|
|
6
|
-
}
|
|
7
|
-
ul ul {
|
|
8
|
-
padding-top: 0;
|
|
9
|
-
}
|
|
1
|
+
.right-sidebar-panel {
|
|
2
|
+
font-size: var(--stl-typography-scale-sm);
|
|
10
3
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
padding-block: 0.32rem;
|
|
16
|
-
color: var(--sl-color-text-secondary);
|
|
17
|
-
position: relative;
|
|
4
|
+
nav > ul {
|
|
5
|
+
padding-top: 0;
|
|
6
|
+
border-left: 1px solid var(--stl-color-border);
|
|
7
|
+
}
|
|
18
8
|
|
|
19
|
-
|
|
20
|
-
|
|
9
|
+
ul ul {
|
|
10
|
+
padding-top: 0;
|
|
11
|
+
}
|
|
21
12
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
13
|
+
ul > li > a {
|
|
14
|
+
--pad-inline: 1rem;
|
|
15
|
+
font-weight: 400;
|
|
16
|
+
padding-block: 0.32rem;
|
|
17
|
+
color: var(--stl-color-foreground-reduced);
|
|
18
|
+
position: relative;
|
|
19
|
+
font-size: inherit;
|
|
20
|
+
|
|
21
|
+
&:hover {
|
|
22
|
+
text-decoration: underline;
|
|
23
|
+
color: var(--stl-color-foreground);
|
|
24
|
+
text-decoration-color: var(--stl-color-foreground-reduced);
|
|
32
25
|
}
|
|
33
26
|
|
|
34
|
-
|
|
35
|
-
color: var(--
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
27
|
+
&[aria-current='true'] {
|
|
28
|
+
color: var(--stl-color-accent-foreground);
|
|
29
|
+
|
|
30
|
+
&::after {
|
|
31
|
+
content: '';
|
|
32
|
+
position: absolute;
|
|
33
|
+
height: 100%;
|
|
34
|
+
width: 2px;
|
|
35
|
+
background-color: var(--stl-color-accent-foreground);
|
|
36
|
+
left: -1px;
|
|
37
|
+
top: 0;
|
|
38
|
+
}
|
|
40
39
|
}
|
|
41
40
|
}
|
|
41
|
+
|
|
42
|
+
h2 {
|
|
43
|
+
color: var(--stl-color-foreground-reduced);
|
|
44
|
+
font-size: inherit;
|
|
45
|
+
line-height: 150%;
|
|
46
|
+
text-decoration: none;
|
|
47
|
+
font-weight: 400;
|
|
48
|
+
}
|
|
42
49
|
}
|
package/theme.css
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
@layer starlight.base, starlight.reset, starlight.core, starlight.content, starlight.components, starlight.utils;
|
|
2
|
-
@layer starlight
|
|
2
|
+
@layer starlight;
|
|
3
3
|
|
|
4
4
|
@import './styles/fonts.css';
|
|
5
|
-
@import './styles/variables.css';
|
|
6
5
|
@import './styles/links.css';
|
|
7
6
|
@import './styles/sidebar.css';
|
|
8
7
|
@import './styles/search.css';
|
|
@@ -11,5 +10,16 @@
|
|
|
11
10
|
@import './styles/overrides.css';
|
|
12
11
|
@import './styles/code.css';
|
|
13
12
|
@import './styles/sdk_select.css';
|
|
13
|
+
@import './styles/method-descriptions.css';
|
|
14
|
+
|
|
14
15
|
@import '@stainless-api/ui-primitives/styles.css';
|
|
16
|
+
|
|
17
|
+
@import './styles/sl-variables.css';
|
|
18
|
+
@import '@stainless-api/ui-primitives/styles/starlight-compat.css';
|
|
15
19
|
@import './styles/mintlify-compat.css';
|
|
20
|
+
|
|
21
|
+
@import './styles/stldocs-variables.css';
|
|
22
|
+
@import '@stainless-api/docs-ui/styles/resets.css';
|
|
23
|
+
@import '@stainless-api/docs-ui/styles/primitives.css';
|
|
24
|
+
@import '@stainless-api/docs-ui/styles/main.css';
|
|
25
|
+
@import '@stainless-api/docs-ui/styles/search.css';
|
package/tsconfig.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"extends": "
|
|
2
|
+
"extends": "../../tsconfig.base.json",
|
|
3
3
|
"include": [
|
|
4
4
|
".astro/*",
|
|
5
5
|
"node_modules/@astrojs/starlight/**/*.d.ts",
|
|
@@ -7,11 +7,8 @@
|
|
|
7
7
|
".stl-docs/**/*",
|
|
8
8
|
"./plugin/**/*"
|
|
9
9
|
],
|
|
10
|
-
"exclude": ["dist"],
|
|
10
|
+
"exclude": ["dist", "**/preview.worker.docs.js"],
|
|
11
11
|
"compilerOptions": {
|
|
12
|
-
"paths": {
|
|
13
|
-
"~/*": ["../../../stainless/legacy-dir-root/*"]
|
|
14
|
-
},
|
|
15
12
|
"jsx": "react-jsx",
|
|
16
13
|
"jsxImportSource": "react"
|
|
17
14
|
}
|
package/virtual-module.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
declare module 'virtual:stl-starlight-virtual-module' {
|
|
2
2
|
import type { CreateShikiHighlighterOptions } from '@astrojs/markdown-remark';
|
|
3
|
-
import type { PropertySettingsType } from '@stainless-api/docs-ui/
|
|
3
|
+
import type { PropertySettingsType } from '@stainless-api/docs-ui/contexts';
|
|
4
4
|
import type { StlStarlightMiddleware } from '@stainless-api/docs/plugin/MiddlewareTypes';
|
|
5
|
-
import type { StainlessStarlightUserConfig } from './plugin/loadPluginConfig';
|
|
6
5
|
|
|
7
6
|
export const BASE_PATH: string;
|
|
8
7
|
export const CMS_PORT: number;
|
|
@@ -15,12 +14,13 @@ declare module 'virtual:stl-starlight-virtual-module' {
|
|
|
15
14
|
export const HIGHLIGHT_THEMES: CreateShikiHighlighterOptions['themes'];
|
|
16
15
|
export const CONTENT_PANEL_LAYOUT: 'double-pane' | 'single-pane';
|
|
17
16
|
export const EXPERIMENTAL_COLLAPSIBLE_SNIPPETS: boolean | undefined;
|
|
17
|
+
export const EXPERIMENTAL_COLLAPSIBLE_METHOD_DESCRIPTIONS: boolean | undefined;
|
|
18
18
|
export const PROPERTY_SETTINGS: PropertySettingsType;
|
|
19
19
|
export const MIDDLEWARE: StlStarlightMiddleware;
|
|
20
|
-
export const
|
|
20
|
+
export const ENABLE_CONTEXT_MENU: boolean;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
declare module 'virtual:stl-
|
|
23
|
+
declare module 'virtual:stl-docs-virtual-module' {
|
|
24
24
|
import type { ButtonVariant } from '@stainless-api/ui-primitives';
|
|
25
25
|
import type { AnchorHTMLAttributes } from 'react';
|
|
26
26
|
|
|
@@ -40,4 +40,8 @@ declare module 'virtual:stl-stl-starlight-virtual-module' {
|
|
|
40
40
|
export const SPLIT_TABS_ENABLED: boolean;
|
|
41
41
|
export const HEADER_LAYOUT: 'default' | 'stacked';
|
|
42
42
|
export const ENABLE_CLIENT_ROUTER: boolean;
|
|
43
|
+
export const API_REFERENCE_BASE_PATH: string | null;
|
|
44
|
+
export const ENABLE_PROSE_MARKDOWN_RENDERING: boolean;
|
|
45
|
+
export const ENABLE_CONTEXT_MENU: boolean;
|
|
46
|
+
export const RENDER_PAGE_DESCRIPTIONS: boolean;
|
|
43
47
|
}
|