@stainless-api/docs 0.1.0-beta.7 → 0.1.0-beta.70
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 +554 -0
- package/README.md +1 -1
- package/eslint-suppressions.json +52 -0
- package/locals.d.ts +17 -0
- package/package.json +51 -40
- package/plugin/assets/languages/csharp.svg +1 -0
- package/plugin/buildAlgoliaIndex.ts +32 -7
- package/plugin/cms/server.ts +130 -58
- package/plugin/cms/sidebar-builder.ts +7 -26
- package/plugin/cms/worker.ts +83 -5
- package/plugin/components/MethodDescription.tsx +54 -0
- package/plugin/components/SDKSelect.astro +7 -87
- package/plugin/components/SnippetCode.tsx +53 -8
- package/plugin/components/search/SearchAlgolia.astro +45 -28
- package/plugin/components/search/SearchIsland.tsx +38 -24
- package/plugin/create-playground.shim.tsx +3 -0
- package/plugin/generateAPIReferenceLink.ts +2 -2
- package/plugin/globalJs/ai-dropdown-options.ts +243 -0
- package/plugin/globalJs/code-snippets.ts +15 -8
- package/plugin/globalJs/copy.ts +81 -16
- package/plugin/globalJs/method-descriptions.ts +33 -0
- package/plugin/globalJs/navigation.ts +7 -4
- package/plugin/helpers/generateDocsRoutes.ts +27 -0
- package/plugin/index.ts +178 -35
- package/plugin/languages.ts +5 -2
- package/plugin/loadPluginConfig.ts +121 -32
- package/plugin/middlewareBuilder/stainlessMiddleware.d.ts +1 -1
- package/plugin/react/Routing.tsx +208 -129
- package/plugin/referencePlaceholderUtils.ts +1 -1
- package/plugin/replaceSidebarPlaceholderMiddleware.ts +5 -1
- package/plugin/routes/Docs.astro +62 -89
- package/plugin/routes/DocsStatic.astro +1 -1
- package/plugin/routes/Overview.astro +10 -16
- package/plugin/routes/markdown.ts +9 -8
- package/plugin/vendor/preview.worker.docs.js +19768 -17702
- 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 +5 -5
- package/shared/getProsePages.ts +42 -0
- 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/AiChatIsland.tsx +14 -0
- package/stl-docs/components/{content-panel/ContentBreadcrumbs.tsx → ContentBreadcrumbs.tsx} +10 -18
- package/stl-docs/components/Head.astro +16 -0
- package/stl-docs/components/Header.astro +6 -8
- 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 -139
- package/stl-docs/components/content-panel/ContentPanel.astro +16 -25
- 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 -5
- package/stl-docs/components/mintlify-compat/AccordionGroup.astro +7 -3
- 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 +1 -1
- package/stl-docs/components/mintlify-compat/callouts/Check.astro +1 -1
- package/stl-docs/components/mintlify-compat/callouts/Danger.astro +1 -1
- package/stl-docs/components/mintlify-compat/callouts/Info.astro +1 -1
- package/stl-docs/components/mintlify-compat/callouts/Note.astro +1 -1
- package/stl-docs/components/mintlify-compat/callouts/Tip.astro +1 -1
- package/stl-docs/components/mintlify-compat/callouts/Warning.astro +1 -1
- 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 -70
- 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 +3 -2
- 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/disableCalloutSyntax.ts +36 -0
- package/stl-docs/index.ts +141 -50
- package/stl-docs/loadStlDocsConfig.ts +45 -5
- package/stl-docs/proseMarkdown/proseMarkdownIntegration.ts +61 -0
- package/stl-docs/proseMarkdown/proseMarkdownMiddleware.ts +39 -0
- package/stl-docs/proseMarkdown/toMarkdown.ts +158 -0
- package/stl-docs/proseSearchIndexing.ts +450 -0
- package/stl-docs/tabsMiddleware.ts +11 -3
- package/styles/code.css +108 -140
- package/styles/fonts.css +32 -17
- package/styles/links.css +11 -48
- package/styles/method-descriptions.css +36 -0
- package/styles/overrides.css +48 -60
- package/styles/page.css +92 -52
- package/styles/sdk_select.css +9 -7
- package/styles/search.css +56 -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 +10 -10
- package/tsconfig.json +2 -5
- package/virtual-module.d.ts +26 -4
- package/components/variables.css +0 -135
- package/stl-docs/components/mintlify-compat/Step.astro +0 -58
- package/stl-docs/components/mintlify-compat/Steps.astro +0 -17
- /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,67 +1,107 @@
|
|
|
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
|
+
margin-inline-start: calc(-1 * (var(--sl-sidebar-pad-x) + var(--stl-sidebar-item-padding-inline)));
|
|
54
39
|
}
|
|
55
40
|
|
|
56
|
-
.
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
41
|
+
.header,
|
|
42
|
+
.header {
|
|
43
|
+
padding-inline-start: 0;
|
|
44
|
+
padding-inline-end: 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
mobile-starlight-toc nav {
|
|
48
|
+
inset-inline-start: calc(var(--sl-content-inline-start, 0) + var(--sl-sidebar-pad-x));
|
|
60
49
|
}
|
|
61
50
|
}
|
|
62
51
|
|
|
63
|
-
|
|
52
|
+
.stl-content-breadcrumbs {
|
|
53
|
+
.stldocs-breadcrumbs {
|
|
54
|
+
padding-left: 0;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.stl-page-nav-container {
|
|
59
|
+
display: flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
justify-content: space-between;
|
|
62
|
+
gap: 1rem;
|
|
63
|
+
padding: 1rem 0 0 0;
|
|
64
|
+
flex-wrap: wrap;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.stl-page-nav-container {
|
|
68
|
+
display: flex;
|
|
69
|
+
align-items: center;
|
|
70
|
+
justify-content: space-between;
|
|
71
|
+
gap: 1rem;
|
|
72
|
+
padding: 1rem 0 0 0;
|
|
73
|
+
flex-wrap: wrap;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.stldocs-root .stl-page-nav-container {
|
|
77
|
+
padding: 1rem 0 0 var(--stldocs-content-padding);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@media (min-width: 50rem) {
|
|
64
81
|
:root[data-has-sidebar] {
|
|
65
|
-
--sl-content-inline-start: calc(var(--sl-sidebar-width) +
|
|
82
|
+
--sl-content-inline-start: calc(var(--sl-sidebar-width) + 2rem);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.stldocs-root .stl-page-nav-container {
|
|
86
|
+
padding: 1rem 0 0 0;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@media (min-width: 72rem) {
|
|
91
|
+
:root {
|
|
92
|
+
--sl-mobile-toc-height: 0rem;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.content-panel footer {
|
|
97
|
+
/* Don’t render empty footer meta, which results in extra margin getting applied on behalf of the flex gap.
|
|
98
|
+
* Instead, move its margin to its parent. */
|
|
99
|
+
margin-top: 3rem;
|
|
100
|
+
.meta {
|
|
101
|
+
margin-top: 0;
|
|
102
|
+
&:empty,
|
|
103
|
+
&:not(:has(> *)) {
|
|
104
|
+
display: none;
|
|
105
|
+
}
|
|
66
106
|
}
|
|
67
107
|
}
|
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,71 @@
|
|
|
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);
|
|
1
|
+
/* Search input styles for Astro and Algolia */
|
|
2
|
+
site-search {
|
|
3
|
+
display: contents;
|
|
23
4
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
span {
|
|
29
|
-
font-size: var(--sl-text-sm);
|
|
30
|
-
color: var(--sl-color-text-secondary);
|
|
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
|
-
justify-content: start;
|
|
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
|
+
}
|
|
70
49
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
50
|
+
kbd {
|
|
51
|
+
font-family: var(--__sl-font);
|
|
52
|
+
color: var(--stl-color-foreground-reduced);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
75
55
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
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
|
+
|
|
64
|
+
> :last-child {
|
|
65
|
+
margin-inline-start: auto;
|
|
66
|
+
}
|
|
67
|
+
> svg {
|
|
68
|
+
margin-left: calc(-1 * var(--sl-button-icon-offset));
|
|
82
69
|
}
|
|
83
70
|
}
|
|
84
71
|
}
|