@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.
Files changed (115) hide show
  1. package/CHANGELOG.md +381 -0
  2. package/eslint-suppressions.json +47 -0
  3. package/locals.d.ts +14 -0
  4. package/package.json +42 -38
  5. package/plugin/buildAlgoliaIndex.ts +31 -6
  6. package/plugin/cms/server.ts +98 -56
  7. package/plugin/cms/sidebar-builder.ts +7 -26
  8. package/plugin/cms/worker.ts +3 -3
  9. package/plugin/components/MethodDescription.tsx +54 -0
  10. package/plugin/components/SDKSelect.astro +7 -87
  11. package/plugin/components/SnippetCode.tsx +11 -7
  12. package/plugin/components/search/SearchAlgolia.astro +5 -33
  13. package/plugin/components/search/SearchIsland.tsx +37 -23
  14. package/plugin/generateAPIReferenceLink.ts +2 -2
  15. package/plugin/globalJs/ai-dropdown-options.ts +235 -0
  16. package/plugin/globalJs/method-descriptions.ts +33 -0
  17. package/plugin/globalJs/navigation.ts +7 -27
  18. package/plugin/helpers/getPageLoadEvent.ts +1 -1
  19. package/plugin/index.ts +54 -34
  20. package/plugin/languages.ts +2 -2
  21. package/plugin/loadPluginConfig.ts +112 -32
  22. package/plugin/middlewareBuilder/stainlessMiddleware.d.ts +1 -1
  23. package/plugin/react/Routing.tsx +176 -80
  24. package/plugin/referencePlaceholderUtils.ts +1 -1
  25. package/plugin/replaceSidebarPlaceholderMiddleware.ts +5 -1
  26. package/plugin/routes/Docs.astro +60 -85
  27. package/plugin/routes/Overview.astro +10 -16
  28. package/plugin/routes/markdown.ts +7 -7
  29. package/plugin/vendor/preview.worker.docs.js +17973 -16561
  30. package/plugin/vendor/templates/go.md +1 -1
  31. package/plugin/vendor/templates/python.md +1 -1
  32. package/resolveSrcFile.ts +10 -0
  33. package/scripts/vendor_deps.ts +1 -1
  34. package/shared/getSharedLogger.ts +15 -0
  35. package/shared/terminalUtils.ts +3 -0
  36. package/src/content.config.ts +9 -0
  37. package/stl-docs/components/AIDropdown.tsx +63 -0
  38. package/stl-docs/components/{content-panel/ContentBreadcrumbs.tsx → ContentBreadcrumbs.tsx} +2 -2
  39. package/stl-docs/components/Head.astro +16 -0
  40. package/stl-docs/components/Header.astro +6 -8
  41. package/stl-docs/components/PageTitle.astro +82 -0
  42. package/stl-docs/components/TableOfContents.astro +34 -0
  43. package/stl-docs/components/ThemeSelect.astro +118 -141
  44. package/stl-docs/components/content-panel/ContentPanel.astro +16 -46
  45. package/stl-docs/components/headers/DefaultHeader.astro +1 -1
  46. package/stl-docs/components/headers/HeaderLinks.astro +1 -1
  47. package/stl-docs/components/headers/SplashMobileMenuToggle.astro +17 -1
  48. package/stl-docs/components/headers/StackedHeader.astro +29 -24
  49. package/stl-docs/components/icons/chat-gpt.tsx +17 -0
  50. package/stl-docs/components/icons/claude.tsx +10 -0
  51. package/stl-docs/components/icons/cursor.tsx +10 -0
  52. package/stl-docs/components/icons/gemini.tsx +19 -0
  53. package/stl-docs/components/icons/markdown.tsx +10 -0
  54. package/stl-docs/components/index.ts +1 -0
  55. package/stl-docs/components/mintlify-compat/Accordion.astro +7 -38
  56. package/stl-docs/components/mintlify-compat/AccordionGroup.astro +9 -23
  57. package/stl-docs/components/mintlify-compat/Columns.astro +40 -42
  58. package/stl-docs/components/mintlify-compat/Frame.astro +16 -18
  59. package/stl-docs/components/mintlify-compat/Step.astro +30 -32
  60. package/stl-docs/components/mintlify-compat/Steps.astro +8 -10
  61. package/stl-docs/components/mintlify-compat/callouts/Callout.astro +10 -3
  62. package/stl-docs/components/mintlify-compat/callouts/Check.astro +7 -3
  63. package/stl-docs/components/mintlify-compat/callouts/Danger.astro +7 -3
  64. package/stl-docs/components/mintlify-compat/callouts/Info.astro +7 -3
  65. package/stl-docs/components/mintlify-compat/callouts/Note.astro +7 -3
  66. package/stl-docs/components/mintlify-compat/callouts/Tip.astro +7 -3
  67. package/stl-docs/components/mintlify-compat/callouts/Warning.astro +7 -3
  68. package/stl-docs/components/mintlify-compat/card.css +33 -35
  69. package/stl-docs/components/nav-tabs/NavDropdown.astro +31 -75
  70. package/stl-docs/components/nav-tabs/NavTabs.astro +78 -80
  71. package/stl-docs/components/nav-tabs/SecondaryNavTabs.astro +15 -8
  72. package/stl-docs/components/nav-tabs/buildNavLinks.ts +4 -3
  73. package/stl-docs/components/pagination/HomeLink.astro +10 -0
  74. package/stl-docs/components/pagination/Pagination.astro +174 -0
  75. package/stl-docs/components/pagination/PaginationLinkEmphasized.astro +22 -0
  76. package/stl-docs/components/pagination/PaginationLinkQuiet.astro +13 -0
  77. package/stl-docs/components/pagination/util.ts +71 -0
  78. package/stl-docs/components/scripts.ts +1 -0
  79. package/stl-docs/components/{Sidebar.astro → sidebars/BaseSidebar.astro} +2 -3
  80. package/stl-docs/components/sidebars/SDKSelectSidebar.astro +8 -0
  81. package/stl-docs/disableCalloutSyntax.ts +36 -0
  82. package/stl-docs/index.ts +98 -26
  83. package/stl-docs/loadStlDocsConfig.ts +37 -5
  84. package/stl-docs/proseMarkdown/proseMarkdownIntegration.ts +64 -0
  85. package/stl-docs/proseMarkdown/proseMarkdownMiddleware.ts +34 -0
  86. package/stl-docs/proseMarkdown/toMarkdown.ts +158 -0
  87. package/stl-docs/tabsMiddleware.ts +12 -4
  88. package/styles/code.css +104 -141
  89. package/styles/fonts.css +32 -17
  90. package/styles/links.css +11 -48
  91. package/styles/method-descriptions.css +36 -0
  92. package/styles/overrides.css +49 -57
  93. package/styles/page.css +90 -59
  94. package/styles/sdk_select.css +9 -7
  95. package/styles/search.css +58 -69
  96. package/styles/sidebar.css +211 -131
  97. package/styles/{variables.css → sl-variables.css} +3 -2
  98. package/styles/stldocs-variables.css +6 -0
  99. package/styles/toc.css +41 -34
  100. package/theme.css +12 -2
  101. package/tsconfig.json +2 -5
  102. package/virtual-module.d.ts +8 -4
  103. package/components/variables.css +0 -139
  104. package/plugin/globalJs/ai-dropdown.ts +0 -57
  105. package/stl-docs/components/APIReferenceAIDropdown.tsx +0 -86
  106. package/stl-docs/components/content-panel/ProseAIDropdown.tsx +0 -64
  107. /package/{plugin/assets → assets}/fonts/geist/OFL.txt +0 -0
  108. /package/{plugin/assets → assets}/fonts/geist/geist-italic-latin-ext.woff2 +0 -0
  109. /package/{plugin/assets → assets}/fonts/geist/geist-italic-latin.woff2 +0 -0
  110. /package/{plugin/assets → assets}/fonts/geist/geist-latin-ext.woff2 +0 -0
  111. /package/{plugin/assets → assets}/fonts/geist/geist-latin.woff2 +0 -0
  112. /package/{plugin/assets → assets}/fonts/geist/geist-mono-italic-latin-ext.woff2 +0 -0
  113. /package/{plugin/assets → assets}/fonts/geist/geist-mono-italic-latin.woff2 +0 -0
  114. /package/{plugin/assets → assets}/fonts/geist/geist-mono-latin-ext.woff2 +0 -0
  115. /package/{plugin/assets → assets}/fonts/geist/geist-mono-latin.woff2 +0 -0
package/styles/fonts.css CHANGED
@@ -4,65 +4,80 @@
4
4
  font-style: normal;
5
5
  font-display: swap;
6
6
  font-weight: 100 900;
7
- src: url(../plugin/assets/fonts/geist/geist-latin.woff2) format('woff2-variations');
8
- unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
7
+ src: url(../assets/fonts/geist/geist-latin.woff2) format('woff2-variations');
8
+ unicode-range:
9
+ U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
10
+ U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
9
11
  }
10
12
  @font-face {
11
13
  font-family: 'Geist';
12
14
  font-style: italic;
13
15
  font-display: swap;
14
16
  font-weight: 100 900;
15
- src: url(../plugin/assets/fonts/geist/geist-italic-latin.woff2) format('woff2-variations');
16
- unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
17
+ src: url(../assets/fonts/geist/geist-italic-latin.woff2) format('woff2-variations');
18
+ unicode-range:
19
+ U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
20
+ U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
17
21
  }
18
22
  @font-face {
19
23
  font-family: 'Geist';
20
24
  font-style: normal;
21
25
  font-display: swap;
22
26
  font-weight: 100 900;
23
- src: url(../plugin/assets/fonts/geist/geist-latin-ext.woff2) format('woff2-variations');
24
- unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
27
+ src: url(../assets/fonts/geist/geist-latin-ext.woff2) format('woff2-variations');
28
+ unicode-range:
29
+ U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
30
+ U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
25
31
  }
26
32
  @font-face {
27
33
  font-family: 'Geist';
28
34
  font-style: italic;
29
35
  font-display: swap;
30
36
  font-weight: 100 900;
31
- src: url(../plugin/assets/fonts/geist/geist-italic-latin-ext.woff2) format('woff2-variations');
32
- unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
37
+ src: url(../assets/fonts/geist/geist-italic-latin-ext.woff2) format('woff2-variations');
38
+ unicode-range:
39
+ U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
40
+ U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
33
41
  }
34
42
 
35
-
36
43
  /* Geist Mono */
37
44
  @font-face {
38
45
  font-family: 'Geist Mono';
39
46
  font-style: normal;
40
47
  font-display: swap;
41
48
  font-weight: 100 900;
42
- src: url(../plugin/assets/fonts/geist/geist-mono-latin.woff2) format('woff2-variations');
43
- unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
49
+ src: url(../assets/fonts/geist/geist-mono-latin.woff2) format('woff2-variations');
50
+ unicode-range:
51
+ U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
52
+ U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
44
53
  }
45
54
  @font-face {
46
55
  font-family: 'Geist Mono';
47
56
  font-style: italic;
48
57
  font-display: swap;
49
58
  font-weight: 100 900;
50
- src: url(../plugin/assets/fonts/geist/geist-mono-italic-latin.woff2) format('woff2-variations');
51
- unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
59
+ src: url(../assets/fonts/geist/geist-mono-italic-latin.woff2) format('woff2-variations');
60
+ unicode-range:
61
+ U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
62
+ U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
52
63
  }
53
64
  @font-face {
54
65
  font-family: 'Geist Mono';
55
66
  font-style: normal;
56
67
  font-display: swap;
57
68
  font-weight: 100 900;
58
- src: url(../plugin/assets/fonts/geist/geist-mono-latin-ext.woff2) format('woff2-variations');
59
- unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
69
+ src: url(../assets/fonts/geist/geist-mono-latin-ext.woff2) format('woff2-variations');
70
+ unicode-range:
71
+ U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
72
+ U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
60
73
  }
61
74
  @font-face {
62
75
  font-family: 'Geist Mono';
63
76
  font-style: italic;
64
77
  font-display: swap;
65
78
  font-weight: 100 900;
66
- src: url(../plugin/assets/fonts/geist/geist-mono-italic-latin-ext.woff2) format('woff2-variations');
67
- unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
79
+ src: url(../assets/fonts/geist/geist-mono-italic-latin-ext.woff2) format('woff2-variations');
80
+ unicode-range:
81
+ U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
82
+ U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
68
83
  }
package/styles/links.css CHANGED
@@ -1,51 +1,14 @@
1
- @layer stainless {
2
- .sl-link-card {
3
- box-shadow: none;
4
- border-radius: var(--sl-button-border-radius);
5
- padding: 1.5rem;
6
- margin-top: 16px;
7
- }
1
+ /* TODO: remove for real card component */
8
2
 
9
- .sl-link-card:hover {
10
- transition: 0.3s;
11
- border: 1px solid var(--sl-color-accent-high);
12
- background-color: var(--sl-color-accent-low);
13
- }
14
-
15
- .pagination-links {
16
- margin-bottom: 2rem;
17
-
18
- > a {
19
- border-radius: var(--sl-button-border-radius);
20
- border: 1px solid transparent;
21
- box-shadow: none;
22
- max-width: 90%;
23
- text-decoration: none;
24
-
25
- svg {
26
- margin-top: 0;
27
- transform: translateY(6px);
28
- }
29
- }
30
-
31
- > a:hover {
32
- transition: 0.3s;
33
- border: 1px solid var(--sl-color-accent-high);
34
- background-color: var(--sl-color-accent-low);
35
- box-shadow: none;
36
- }
37
-
38
- /* if only one pagination direction */
39
- > a:first-child:nth-last-child(1) {
40
- max-width: 45%;
41
- }
42
-
43
- > a[rel='next'] {
44
- margin-left: auto;
45
- }
3
+ .sl-link-card {
4
+ box-shadow: none;
5
+ border-radius: var(--sl-button-border-radius);
6
+ padding: 1.5rem;
7
+ margin-top: 16px;
8
+ }
46
9
 
47
- > a[rel='prev'] {
48
- margin-right: auto;
49
- }
50
- }
10
+ .sl-link-card:hover {
11
+ transition: 0.3s;
12
+ border: 1px solid var(--sl-color-accent-high);
13
+ background-color: var(--sl-color-accent-low);
51
14
  }
@@ -0,0 +1,36 @@
1
+ .stldocs-root {
2
+ .stl-method-description-overflow-wrapper {
3
+ display: flex;
4
+ align-items: center;
5
+ justify-content: center;
6
+ /* Minimum height to minimize layout shift */
7
+ min-height: 24px;
8
+ }
9
+ .stl-method-description {
10
+ .stldocs-method-description {
11
+ overflow: hidden;
12
+ max-height: 170px;
13
+ transition: max-height 0.3s ease;
14
+ position: relative;
15
+
16
+ &::after {
17
+ content: '';
18
+ position: absolute;
19
+ left: 0;
20
+ right: 0;
21
+ bottom: 0;
22
+ height: 3rem;
23
+ background: linear-gradient(to bottom, transparent, var(--stl-color-background));
24
+ pointer-events: none;
25
+ }
26
+
27
+ &[data-collapsed='false'] {
28
+ max-height: none;
29
+ }
30
+
31
+ &[data-collapsed='false']::after {
32
+ display: none;
33
+ }
34
+ }
35
+ }
36
+ }
@@ -1,79 +1,71 @@
1
- @layer stainless {
2
- html {
3
- font-size: 16px;
4
- }
1
+ html {
2
+ font-size: 16px;
3
+ }
5
4
 
6
- .site-title {
7
- color: var(--sl-color-white);
8
- max-width: 144px;
5
+ .site-title {
6
+ color: var(--stl-color-foreground);
9
7
 
10
- img {
11
- height: 32px;
12
- width: auto;
13
- }
8
+ img {
9
+ height: 32px;
10
+ width: auto;
14
11
  }
12
+ }
15
13
 
16
- /* Hide the text in the theme select dropdown */
17
- starlight-theme-select select {
18
- width: 0;
19
- overflow: hidden;
20
- }
14
+ /* TODO: apply real button classes here */
15
+ starlight-menu-button button {
16
+ box-shadow: none;
17
+ background-color: var(--stl-color-ui-background);
18
+ border: 1px solid var(--stl-color-border);
19
+ border-radius: var(--stl-ui-layout-border-radius-sml);
20
+ height: 32px;
21
+ width: 32px;
22
+ display: flex;
23
+ align-items: center;
24
+ justify-content: center;
21
25
 
22
- .custom-select-wrapper select,
23
- .stldocs-button-secondary {
24
- background-color: var(--sl-color-bg-ui);
25
- border: 1px solid var(--sl-color-hairline);
26
- border-radius: var(--sl-button-border-radius);
26
+ &:hover {
27
+ background-color: var(--stl-color-ui-background-hover);
28
+ }
29
+ }
27
30
 
31
+ mobile-starlight-toc {
32
+ nav {
33
+ background-color: var(--stl-color-background);
34
+ }
35
+ .toggle {
36
+ background-color: var(--stl-color-ui-background);
37
+ border: 1px solid var(--stl-color-border);
38
+ border-radius: var(--stl-ui-layout-border-radius-sml);
28
39
  &:hover {
29
- border-color: var(--sl-color-hairline-shade);
40
+ background-color: var(--stl-color-ui-background-hover);
41
+ border-color: var(--stl-color-border); /* unchanged */
30
42
  }
31
43
  }
32
-
33
- .content-panel {
34
- border-top: 0;
44
+ .dropdown {
45
+ background-color: var(--stl-color-background);
46
+ border-color: var(--stl-color-border-faint);
47
+ }
48
+ summary {
49
+ padding: 2rem 1rem;
50
+ border-color: var(--stl-color-border-faint);
51
+ }
52
+ a {
53
+ border-color: var(--stl-color-border-faint);
35
54
  }
55
+ }
36
56
 
57
+ @media (min-width: 50rem) {
37
58
  starlight-menu-button button {
38
- box-shadow: none;
39
- background-color: var(--sl-color-bg-ui);
40
- border: 1px solid var(--sl-color-hairline);
41
- border-radius: var(--sl-button-border-radius);
42
- height: var(--sl-button-size);
43
- width: var(--sl-button-size);
44
- display: flex;
45
- align-items: center;
46
- justify-content: center;
47
-
48
- &:hover {
49
- border-color: var(--sl-color-hairline-shade);
50
- }
59
+ display: none;
51
60
  }
52
61
 
53
62
  mobile-starlight-toc {
54
63
  nav {
55
- background-color: var(--sl-color-bg);
64
+ inset-inline-start: calc(var(--sl-content-inline-start, 0));
56
65
  }
57
66
 
58
67
  summary {
59
- padding: 2rem 1rem;
60
- border-bottom-color: var(--sl-color-hairline-light);
61
- }
62
- }
63
-
64
- @media (min-width: 50rem) {
65
- starlight-menu-button button {
66
- display: none;
67
- }
68
-
69
- mobile-starlight-toc {
70
- nav {
71
- inset-inline-start: calc(var(--sl-content-inline-start, 0));
72
- }
73
-
74
- summary {
75
- padding: 2rem 2rem;
76
- }
68
+ padding: 2rem 2rem;
77
69
  }
78
70
  }
79
71
  }
package/styles/page.css CHANGED
@@ -1,76 +1,107 @@
1
- /* Styles for supporting a max-width layout */
2
- @layer stainless {
3
- .page {
4
- position: relative;
5
- max-width: var(--sl-page-max-width);
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
- > header {
13
- .stl-secondary-nav-tabs,
14
- .header {
15
- max-width: var(--sl-page-max-width);
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
- .right-sidebar {
21
- border-inline-start: unset;
22
- }
12
+ .page {
13
+ position: relative;
14
+ max-width: var(--sl-page-max-width);
23
15
 
24
- .mobile-preferences {
25
- margin-top: 1rem;
26
- }
16
+ .right-sidebar {
17
+ border-inline-start: unset;
27
18
  }
28
19
 
29
- @media (min-width: 50rem) {
30
- .page {
31
- padding-left: var(--sl-sidebar-pad-x);
32
- padding-right: var(--sl-sidebar-pad-x);
33
-
34
- > header {
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
- .header,
43
- .header {
44
- padding-inline-start: 0;
45
- padding-inline-end: 0;
46
- }
27
+ :root {
28
+ --sl-mobile-toc-height: 4rem;
29
+ }
47
30
 
48
- mobile-starlight-toc nav {
49
- inset-inline-start: calc(var(--sl-content-inline-start, 0) + var(--sl-sidebar-pad-x));
50
- }
51
- .sidebar-content {
52
- padding-left: 0;
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
- .stl-content-breadcrumbs {
57
- .stldocs-breadcrumbs {
58
- padding-left: 0;
59
- }
41
+ .header,
42
+ .header {
43
+ padding-inline-start: 0;
44
+ padding-inline-end: 0;
60
45
  }
61
46
 
62
- .stl-page-nav-container {
63
- display: flex;
64
- align-items: center;
65
- justify-content: space-between;
66
- gap: 1rem;
67
- padding: 1rem 1rem 0;
68
- flex-wrap: wrap;
47
+ mobile-starlight-toc nav {
48
+ inset-inline-start: calc(var(--sl-content-inline-start, 0) + var(--sl-sidebar-pad-x));
69
49
  }
70
50
  }
71
51
 
72
- @media (min-width: 50em) {
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) {
73
81
  :root[data-has-sidebar] {
74
- --sl-content-inline-start: calc(var(--sl-sidebar-width) + 1rem);
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
+ }
75
106
  }
76
107
  }
@@ -1,11 +1,13 @@
1
- @layer stainless {
2
- .stl-sdk-select-dropdown-menu {
3
- min-width: 200px;
4
- }
1
+ .stl-sdk-select {
2
+ .stl-ui-dropdown {
3
+ width: 100%;
5
4
 
6
- .stl-sdk-select {
7
- .stldocs-icon.http path {
8
- fill: var(--stldocs-color-text);
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,73 @@
1
- @layer stainless {
2
- /* Search input styles for Astro and Algolia */
3
- site-search {
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
- &:hover {
25
- border-color: var(--sl-color-hairline-shade);
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
- > svg {
37
- width: var(--sl-text-sm);
38
- height: var(--sl-text-sm);
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
- &.stldocs-button {
42
- padding: 0;
43
- }
23
+ &:hover {
24
+ background: var(--stl-color-ui-background-hover);
44
25
  }
45
26
 
46
- button > kbd {
47
- border-radius: 0.25rem;
48
- font-size: var(--sl-text-2xs);
49
- gap: 0.25em;
50
- padding-inline: 0.375rem;
51
- background-color: var(--sl-color-gray-6);
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
- kbd {
56
- font-family: var(--__sl-font);
57
- color: var(--sl-color-text);
35
+ > svg {
36
+ width: var(--stl-typography-scale-sm);
37
+ height: var(--stl-typography-scale-sm);
58
38
  }
59
39
  }
60
40
 
61
- @media (min-width: 50rem) {
62
- site-search {
63
- > button {
64
- border-radius: var(--sl-button-border-radius);
65
- padding-inline-start: var(--sl-button-padding-x);
66
- padding-inline-end: var(--sl-button-padding-x);
67
- width: 100%;
68
- max-width: 30rem;
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
- &.stldocs-button {
72
- padding-inline-start: var(--sl-button-padding-x);
73
- padding-inline-end: var(--sl-button-padding-x);
74
- }
50
+ kbd {
51
+ font-family: var(--__sl-font);
52
+ color: var(--stl-color-foreground-reduced);
53
+ }
54
+ }
75
55
 
76
- > :last-child {
77
- margin-inline-start: auto;
78
- }
79
- > svg {
80
- margin-left: calc(-1 * var(--sl-button-icon-offset));
81
- }
56
+ @media (min-width: 50rem) {
57
+ site-search {
58
+ > button {
59
+ border-radius: var(--sl-button-border-radius);
60
+ padding-inline-start: var(--sl-button-padding-x);
61
+ padding-inline-end: var(--sl-button-padding-x);
62
+ width: 100%;
63
+ max-width: 30rem;
64
+ justify-content: start;
65
+
66
+ > :last-child {
67
+ margin-inline-start: auto;
68
+ }
69
+ > svg {
70
+ margin-left: calc(-1 * var(--sl-button-icon-offset));
82
71
  }
83
72
  }
84
73
  }