@stainless-api/docs 0.1.0-beta.1 → 0.1.0-beta.100
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 +917 -0
- package/eslint-suppressions.json +27 -0
- package/locals.d.ts +17 -0
- package/package.json +50 -40
- 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 +37 -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 -105
- package/plugin/components/SnippetCode.tsx +111 -66
- package/plugin/components/StainlessIslands.tsx +126 -0
- package/plugin/components/search/SearchAlgolia.astro +45 -35
- package/plugin/components/search/SearchIsland.tsx +47 -29
- package/plugin/generateAPIReferenceLink.ts +2 -2
- package/plugin/globalJs/ai-dropdown-options.ts +243 -0
- package/plugin/globalJs/code-snippets.ts +40 -11
- package/plugin/globalJs/copy.ts +95 -17
- package/plugin/globalJs/create-playground.shim.ts +3 -0
- package/plugin/globalJs/method-descriptions.ts +33 -0
- package/plugin/globalJs/navigation.ts +12 -33
- package/plugin/globalJs/playground-data.shim.ts +1 -0
- package/plugin/globalJs/playground-data.ts +14 -0
- package/plugin/helpers/generateDocsRoutes.ts +59 -0
- package/plugin/helpers/getPageLoadEvent.ts +1 -1
- package/plugin/helpers/multiSpec.ts +8 -0
- package/plugin/index.ts +299 -117
- package/plugin/languages.ts +8 -2
- package/plugin/loadPluginConfig.ts +254 -102
- package/plugin/middlewareBuilder/stainlessMiddleware.d.ts +1 -1
- package/plugin/react/Routing.tsx +210 -140
- package/plugin/referencePlaceholderUtils.ts +18 -15
- package/plugin/replaceSidebarPlaceholderMiddleware.ts +40 -32
- package/plugin/routes/Docs.astro +70 -119
- package/plugin/routes/DocsStatic.astro +6 -5
- package/plugin/routes/Overview.astro +37 -27
- package/plugin/routes/markdown.ts +13 -12
- package/plugin/{cms → sidebar-utils}/sidebar-builder.ts +49 -60
- 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 +146 -0
- package/plugin/{cms → specs}/worker.ts +82 -5
- package/plugin/vendor/preview.worker.docs.js +22406 -17955
- package/plugin/vendor/templates/cli.md +1 -0
- package/plugin/vendor/templates/go.md +4 -2
- package/plugin/vendor/templates/java.md +3 -1
- package/plugin/vendor/templates/kotlin.md +3 -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/getProsePages.ts +42 -0
- package/shared/getSharedLogger.ts +15 -0
- package/shared/terminalUtils.ts +3 -0
- package/shared/virtualModule.ts +54 -1
- package/src/content.config.ts +9 -0
- package/stl-docs/components/AIDropdown.tsx +63 -0
- package/stl-docs/components/AiChatIsland.tsx +14 -0
- package/stl-docs/components/{content-panel/ContentBreadcrumbs.tsx → ContentBreadcrumbs.tsx} +2 -2
- package/stl-docs/components/Head.astro +20 -0
- package/stl-docs/components/Header.astro +7 -9
- package/stl-docs/components/PageFrame.astro +18 -0
- package/stl-docs/components/PageTitle.astro +82 -0
- package/stl-docs/components/TableOfContents.astro +34 -0
- package/stl-docs/components/ThemeProvider.astro +36 -0
- package/stl-docs/components/ThemeSelect.astro +84 -144
- 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/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/mintlify-compat/index.ts +2 -4
- 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 +175 -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 +87 -0
- package/stl-docs/components/sidebars/SDKSelectSidebar.astro +8 -0
- 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 +159 -43
- package/stl-docs/loadStlDocsConfig.ts +60 -9
- package/stl-docs/proseMarkdown/proseMarkdownIntegration.ts +61 -0
- package/stl-docs/proseMarkdown/proseMarkdownMiddleware.ts +41 -0
- package/stl-docs/proseMarkdown/toMarkdown.ts +158 -0
- package/stl-docs/proseSearchIndexing.ts +606 -0
- package/stl-docs/tabsMiddleware.ts +14 -5
- package/styles/code.css +133 -136
- package/styles/links.css +11 -48
- package/styles/method-descriptions.css +36 -0
- package/styles/overrides.css +49 -57
- package/styles/page.css +100 -59
- package/styles/sdk_select.css +9 -7
- package/styles/search.css +57 -69
- package/styles/sidebar.css +26 -156
- 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 +13 -3
- package/tsconfig.json +2 -5
- package/virtual-module.d.ts +65 -7
- package/components/variables.css +0 -139
- 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 -86
- package/stl-docs/components/Sidebar.astro +0 -11
- package/stl-docs/components/content-panel/ProseAIDropdown.tsx +0 -64
- package/stl-docs/components/mintlify-compat/Step.astro +0 -58
- package/stl-docs/components/mintlify-compat/Steps.astro +0 -17
- 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,76 +1,117 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
margin: 0 auto;
|
|
7
|
-
|
|
8
|
-
.sidebar-pane {
|
|
9
|
-
left: auto;
|
|
10
|
-
}
|
|
1
|
+
.page,
|
|
2
|
+
.page > header .header,
|
|
3
|
+
.page > header .stl-secondary-nav-tabs {
|
|
4
|
+
max-width: var(--sl-page-max-width);
|
|
5
|
+
margin: 0 auto;
|
|
11
6
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
margin: 0 auto;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
7
|
+
@media (min-width: 50rem) {
|
|
8
|
+
padding-inline: var(--stl-ui-page-padding-inline);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
19
11
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
12
|
+
.page {
|
|
13
|
+
position: relative;
|
|
14
|
+
max-width: var(--sl-page-max-width);
|
|
23
15
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
16
|
+
.right-sidebar {
|
|
17
|
+
border-inline-start: unset;
|
|
27
18
|
}
|
|
28
19
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
.header,
|
|
36
|
-
.stl-secondary-nav-tabs {
|
|
37
|
-
padding: 0 1.5rem;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
20
|
+
.mobile-preferences {
|
|
21
|
+
margin-top: 1rem;
|
|
22
|
+
display: flex;
|
|
23
|
+
justify-content: flex-end;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
41
26
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
padding-inline-end: 0;
|
|
46
|
-
}
|
|
27
|
+
:root {
|
|
28
|
+
--sl-mobile-toc-height: 4rem;
|
|
29
|
+
}
|
|
47
30
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
31
|
+
@media (min-width: 50rem) {
|
|
32
|
+
.page .sidebar-pane {
|
|
33
|
+
left: unset;
|
|
34
|
+
}
|
|
35
|
+
/* on desktop, adjust sidebar so that its _text content_ aligns with the page left edge.
|
|
36
|
+
* padding (visible on hover) bleeds out beyond the page left edge, covered by --stl-ui-page-padding-inline */
|
|
37
|
+
.sidebar-pane {
|
|
38
|
+
/* 12px comes from --stl-sidebar-item-padding-inline (which is unfortunately defined deeper than
|
|
39
|
+
this component). Please keep in sync. */
|
|
40
|
+
margin-inline-start: calc(-1 * (var(--sl-sidebar-pad-x) + 12px));
|
|
54
41
|
}
|
|
55
42
|
|
|
56
|
-
.
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
43
|
+
.header,
|
|
44
|
+
.header {
|
|
45
|
+
padding-inline-start: 0;
|
|
46
|
+
padding-inline-end: 0;
|
|
60
47
|
}
|
|
61
48
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
align-items: center;
|
|
65
|
-
justify-content: space-between;
|
|
66
|
-
gap: 1rem;
|
|
67
|
-
padding: 1rem 1rem 0;
|
|
68
|
-
flex-wrap: wrap;
|
|
49
|
+
mobile-starlight-toc nav {
|
|
50
|
+
inset-inline-start: calc(var(--sl-content-inline-start, 0) + var(--sl-sidebar-pad-x));
|
|
69
51
|
}
|
|
70
52
|
}
|
|
71
53
|
|
|
72
|
-
|
|
54
|
+
.stl-content-breadcrumbs {
|
|
55
|
+
.stldocs-breadcrumbs {
|
|
56
|
+
padding-left: 0;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.stl-page-nav-container {
|
|
61
|
+
display: flex;
|
|
62
|
+
align-items: center;
|
|
63
|
+
justify-content: space-between;
|
|
64
|
+
gap: 1rem;
|
|
65
|
+
padding: 1rem 0 0 0;
|
|
66
|
+
flex-wrap: wrap;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.stl-page-nav-container {
|
|
70
|
+
display: flex;
|
|
71
|
+
align-items: center;
|
|
72
|
+
justify-content: space-between;
|
|
73
|
+
gap: 1rem;
|
|
74
|
+
padding: 1rem 0 0 0;
|
|
75
|
+
flex-wrap: wrap;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.stldocs-root .stl-page-nav-container {
|
|
79
|
+
padding: 1rem 0 0 var(--stldocs-content-padding);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
[data-has-sidebar]:not([data-has-toc]) .sl-container {
|
|
83
|
+
max-width: 1428px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.stl-overview {
|
|
87
|
+
max-width: var(--sl-content-width);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@media (min-width: 50rem) {
|
|
73
91
|
:root[data-has-sidebar] {
|
|
74
|
-
--sl-content-inline-start: calc(var(--sl-sidebar-width) +
|
|
92
|
+
--sl-content-inline-start: calc(var(--sl-sidebar-width) + 2rem);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.stldocs-root .stl-page-nav-container {
|
|
96
|
+
padding: 1rem 0 0 0;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
@media (min-width: 72rem) {
|
|
101
|
+
:root {
|
|
102
|
+
--sl-mobile-toc-height: 0rem;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.content-panel footer {
|
|
107
|
+
/* Don’t render empty footer meta, which results in extra margin getting applied on behalf of the flex gap.
|
|
108
|
+
* Instead, move its margin to its parent. */
|
|
109
|
+
margin-top: 3rem;
|
|
110
|
+
.meta {
|
|
111
|
+
margin-top: 0;
|
|
112
|
+
&:empty,
|
|
113
|
+
&:not(:has(> *)) {
|
|
114
|
+
display: none;
|
|
115
|
+
}
|
|
75
116
|
}
|
|
76
117
|
}
|
package/styles/sdk_select.css
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
.stl-
|
|
3
|
-
|
|
4
|
-
}
|
|
1
|
+
.stl-sdk-select {
|
|
2
|
+
.stl-ui-dropdown {
|
|
3
|
+
width: 100%;
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
.stl-ui-dropdown__button {
|
|
6
|
+
width: 100%;
|
|
7
|
+
justify-content: space-between;
|
|
9
8
|
}
|
|
10
9
|
}
|
|
10
|
+
.stldocs-icon.http path {
|
|
11
|
+
fill: var(--stl-color-foreground);
|
|
12
|
+
}
|
|
11
13
|
}
|
package/styles/search.css
CHANGED
|
@@ -1,84 +1,72 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
display: contents;
|
|
5
|
-
|
|
6
|
-
> astro-island > div {
|
|
7
|
-
position: absolute;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
> button {
|
|
11
|
-
padding: var(--sl-button-padding-y) var(--sl-button-padding-x);
|
|
12
|
-
min-width: unset;
|
|
13
|
-
display: flex;
|
|
14
|
-
align-items: center;
|
|
15
|
-
gap: 0.5rem;
|
|
16
|
-
padding: 0;
|
|
17
|
-
width: var(--sl-button-size);
|
|
18
|
-
justify-content: center;
|
|
19
|
-
background-color: var(--sl-color-bg-ui);
|
|
20
|
-
border: 1px solid var(--sl-color-hairline);
|
|
21
|
-
border-radius: var(--sl-button-border-radius);
|
|
22
|
-
height: var(--sl-button-size);
|
|
23
|
-
|
|
24
|
-
&:hover {
|
|
25
|
-
border-color: var(--sl-color-hairline-shade);
|
|
26
|
-
}
|
|
1
|
+
/* Search input styles for Astro and Algolia */
|
|
2
|
+
site-search {
|
|
3
|
+
display: contents;
|
|
27
4
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
line-height: 150%;
|
|
32
|
-
padding-left: var(--sl-button-icon-offset);
|
|
33
|
-
padding-right: var(--sl-button-icon-offset);
|
|
34
|
-
}
|
|
5
|
+
> astro-island > div {
|
|
6
|
+
position: absolute;
|
|
7
|
+
}
|
|
35
8
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
9
|
+
> button {
|
|
10
|
+
padding: var(--sl-button-padding-y) var(--sl-button-padding-x);
|
|
11
|
+
min-width: unset;
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
gap: 0.5rem;
|
|
15
|
+
padding: 0;
|
|
16
|
+
width: var(--sl-button-size);
|
|
17
|
+
justify-content: center;
|
|
18
|
+
background-color: var(--stl-color-ui-background);
|
|
19
|
+
border: 1px solid var(--stl-color-border);
|
|
20
|
+
border-radius: var(--sl-button-border-radius);
|
|
21
|
+
height: var(--sl-button-size);
|
|
40
22
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
23
|
+
&:hover {
|
|
24
|
+
background: var(--stl-color-ui-background-hover);
|
|
44
25
|
}
|
|
45
26
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
padding-
|
|
51
|
-
|
|
52
|
-
margin-right: -0.3rem;
|
|
27
|
+
span {
|
|
28
|
+
font-size: var(--stl-typography-scale-sm);
|
|
29
|
+
color: var(--stl-color-foreground-reduced);
|
|
30
|
+
line-height: 150%;
|
|
31
|
+
padding-left: var(--sl-button-icon-offset);
|
|
32
|
+
padding-right: var(--sl-button-icon-offset);
|
|
53
33
|
}
|
|
54
34
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
35
|
+
> svg {
|
|
36
|
+
width: var(--stl-typography-scale-sm);
|
|
37
|
+
height: var(--stl-typography-scale-sm);
|
|
58
38
|
}
|
|
59
39
|
}
|
|
60
40
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
41
|
+
button > kbd {
|
|
42
|
+
border-radius: 0.25rem;
|
|
43
|
+
font-size: var(--stl-typography-scale-xs);
|
|
44
|
+
gap: 0.25em;
|
|
45
|
+
padding-inline: 0.375rem;
|
|
46
|
+
background-color: var(--stl-color-muted-background);
|
|
47
|
+
margin-right: -0.3rem;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
kbd {
|
|
51
|
+
font-family: var(--__sl-font);
|
|
52
|
+
color: var(--stl-color-foreground-reduced);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
70
55
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
56
|
+
@media (min-width: 50rem) {
|
|
57
|
+
site-search {
|
|
58
|
+
> button {
|
|
59
|
+
border-radius: var(--sl-button-border-radius);
|
|
60
|
+
width: 100%;
|
|
61
|
+
max-width: 30rem;
|
|
62
|
+
justify-content: start;
|
|
63
|
+
padding: var(--sl-button-padding-y) var(--sl-button-padding-x);
|
|
75
64
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
65
|
+
> :last-child {
|
|
66
|
+
margin-inline-start: auto;
|
|
67
|
+
}
|
|
68
|
+
> svg {
|
|
69
|
+
margin-left: calc(-1 * var(--sl-button-icon-offset));
|
|
82
70
|
}
|
|
83
71
|
}
|
|
84
72
|
}
|
package/styles/sidebar.css
CHANGED
|
@@ -1,168 +1,38 @@
|
|
|
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;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
li {
|
|
18
|
-
margin-top: 0;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.group-label span,
|
|
22
|
-
li a span {
|
|
23
|
-
font-size: var(--sl-text-sm);
|
|
24
|
-
line-height: 150%;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
summary {
|
|
28
|
-
padding: 0.435rem var(--sl-sidebar-item-padding-inline);
|
|
29
|
-
padding-right: 4px;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.top-level > li:first-child > a,
|
|
33
|
-
.top-level li:first-child details > summary {
|
|
34
|
-
padding-top: 0;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
li a {
|
|
38
|
-
position: relative;
|
|
39
|
-
padding: 0.435rem var(--sl-sidebar-item-padding-inline);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
details > summary > svg {
|
|
43
|
-
opacity: 0.5;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
details[open] > summary > svg {
|
|
47
|
-
opacity: 1;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
a.large span {
|
|
51
|
-
font-weight: 400;
|
|
52
|
-
color: var(--sl-color-gray-2);
|
|
53
|
-
|
|
54
|
-
&:hover {
|
|
55
|
-
color: var(--sl-color-white);
|
|
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;
|
|
56
9
|
}
|
|
57
10
|
}
|
|
58
|
-
|
|
59
|
-
a.large[aria-current='page'] span {
|
|
60
|
-
color: var(--sl-color-text-accent);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.stl-mobile-only-sidebar-item-last {
|
|
64
|
-
border-bottom: 1px solid var(--sl-color-hairline-light);
|
|
65
|
-
padding-bottom: 1rem;
|
|
66
|
-
margin-bottom: 0.5rem;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.stl-sdk-select {
|
|
71
|
-
.dropdown-toggle {
|
|
72
|
-
width: 100%;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
[data-stldocs-method] {
|
|
77
|
-
display: flex;
|
|
78
|
-
gap: 0.6rem;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
[data-stldocs-method]::before {
|
|
82
|
-
content: '';
|
|
83
|
-
min-width: 20px;
|
|
84
|
-
height: 20px;
|
|
85
|
-
border-radius: 4px;
|
|
86
|
-
text-align: center;
|
|
87
|
-
margin-top: 1px;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
[aria-current='page']::after {
|
|
91
|
-
content: '';
|
|
92
|
-
position: absolute;
|
|
93
|
-
/* Shift left accounting for sidebar item padding - current item width. Sidebar border width is not a variable, it's always set to 1px */
|
|
94
|
-
left: calc(-1 * var(--sl-sidebar-item-padding-inline) - 1px);
|
|
95
|
-
top: 10%;
|
|
96
|
-
height: 80%;
|
|
97
|
-
width: 2px;
|
|
98
|
-
background-color: var(--sl-color-text-accent);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.stl-mobile-only-sidebar-item[aria-current='page']::after {
|
|
102
|
-
background-color: transparent;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
/* CSS is the only way to customize the Starlight sidebar, so the SVGs have to be here. */
|
|
106
|
-
|
|
107
|
-
:root[data-theme='dark'] {
|
|
108
|
-
[data-stldocs-method='get']::before {
|
|
109
|
-
background-color: var(--sl-color-green-low);
|
|
110
|
-
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(74, 194, 107)" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-down-left-icon lucide-arrow-down-left"><path d="M17 7 7 17"/><path d="M17 17H7V7"/></svg>');
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
[data-stldocs-method='post']::before {
|
|
114
|
-
background-color: var(--sl-color-blue-low);
|
|
115
|
-
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(84, 174, 255)" 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>');
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
[data-stldocs-method='patch']::before,
|
|
119
|
-
[data-stldocs-method='put']::before {
|
|
120
|
-
background-color: var(--sl-color-orange-low);
|
|
121
|
-
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(251, 143, 68)" 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>');
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
[data-stldocs-method='delete']::before {
|
|
125
|
-
background-color: var(--sl-color-red-low);
|
|
126
|
-
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(248, 89, 92)" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-x-icon lucide-x"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>');
|
|
127
|
-
}
|
|
128
11
|
}
|
|
12
|
+
}
|
|
129
13
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
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(31, 124, 58)" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-down-left-icon lucide-arrow-down-left"><path d="M17 7 7 17"/><path d="M17 17H7V7"/></svg>');
|
|
134
|
-
}
|
|
14
|
+
.sidebar-pane {
|
|
15
|
+
border-inline-end: 1px solid var(--stl-color-border-faint);
|
|
16
|
+
}
|
|
135
17
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
18
|
+
.sidebar-content .stl-mobile-only-sidebar-item-last {
|
|
19
|
+
margin-bottom: 2rem;
|
|
20
|
+
position: relative;
|
|
21
|
+
}
|
|
140
22
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
23
|
+
.stl-sidebar-header-links {
|
|
24
|
+
display: flex;
|
|
25
|
+
gap: 1rem;
|
|
26
|
+
flex-direction: column-reverse;
|
|
27
|
+
}
|
|
146
28
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
29
|
+
@media (min-width: 50rem) {
|
|
30
|
+
.stl-mobile-only-sidebar-item,
|
|
31
|
+
li:has(> .stl-mobile-only-sidebar-item) {
|
|
32
|
+
display: none;
|
|
151
33
|
}
|
|
152
34
|
|
|
153
35
|
.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
|
-
}
|
|
36
|
+
display: none;
|
|
167
37
|
}
|
|
168
38
|
}
|
|
@@ -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-border-strong);
|
|
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,6 @@
|
|
|
1
1
|
@layer starlight.base, starlight.reset, starlight.core, starlight.content, starlight.components, starlight.utils;
|
|
2
|
-
@layer starlight
|
|
2
|
+
@layer starlight;
|
|
3
3
|
|
|
4
|
-
@import './styles/fonts.css';
|
|
5
|
-
@import './styles/variables.css';
|
|
6
4
|
@import './styles/links.css';
|
|
7
5
|
@import './styles/sidebar.css';
|
|
8
6
|
@import './styles/search.css';
|
|
@@ -11,5 +9,17 @@
|
|
|
11
9
|
@import './styles/overrides.css';
|
|
12
10
|
@import './styles/code.css';
|
|
13
11
|
@import './styles/sdk_select.css';
|
|
12
|
+
@import './styles/method-descriptions.css';
|
|
13
|
+
|
|
14
14
|
@import '@stainless-api/ui-primitives/styles.css';
|
|
15
|
+
|
|
16
|
+
@import './styles/sl-variables.css';
|
|
17
|
+
@import '@stainless-api/ui-primitives/styles/starlight-compat.css';
|
|
15
18
|
@import './styles/mintlify-compat.css';
|
|
19
|
+
|
|
20
|
+
@import './styles/stldocs-variables.css';
|
|
21
|
+
@import '@stainless-api/docs-ui/styles/resets.css';
|
|
22
|
+
@import '@stainless-api/docs-ui/styles/primitives.css';
|
|
23
|
+
@import '@stainless-api/docs-ui/styles/main.css';
|
|
24
|
+
@import '@stainless-api/docs-ui/styles/search.css';
|
|
25
|
+
@import '@stainless-api/docs-ui/styles/sidebar.css';
|