@stainless-api/docs 0.1.0-beta.4 → 0.1.0-beta.40

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 (108) hide show
  1. package/CHANGELOG.md +289 -0
  2. package/components/variables.css +2 -32
  3. package/eslint-suppressions.json +47 -0
  4. package/locals.d.ts +14 -0
  5. package/package.json +34 -30
  6. package/plugin/buildAlgoliaIndex.ts +31 -6
  7. package/plugin/cms/server.ts +98 -55
  8. package/plugin/cms/sidebar-builder.ts +7 -26
  9. package/plugin/cms/worker.ts +3 -3
  10. package/plugin/components/SDKSelect.astro +7 -5
  11. package/plugin/components/SnippetCode.tsx +11 -7
  12. package/plugin/components/search/SearchAlgolia.astro +5 -11
  13. package/plugin/components/search/SearchIsland.tsx +35 -22
  14. package/plugin/generateAPIReferenceLink.ts +2 -2
  15. package/plugin/globalJs/ai-dropdown-options.ts +235 -0
  16. package/plugin/globalJs/navigation.ts +7 -27
  17. package/plugin/helpers/getPageLoadEvent.ts +1 -1
  18. package/plugin/index.ts +52 -24
  19. package/plugin/languages.ts +2 -2
  20. package/plugin/loadPluginConfig.ts +105 -18
  21. package/plugin/middlewareBuilder/stainlessMiddleware.d.ts +1 -1
  22. package/plugin/react/Routing.tsx +60 -57
  23. package/plugin/referencePlaceholderUtils.ts +1 -1
  24. package/plugin/replaceSidebarPlaceholderMiddleware.ts +5 -1
  25. package/plugin/routes/Docs.astro +59 -85
  26. package/plugin/routes/Overview.astro +10 -16
  27. package/plugin/routes/markdown.ts +7 -7
  28. package/plugin/vendor/preview.worker.docs.js +7566 -6784
  29. package/resolveSrcFile.ts +10 -0
  30. package/scripts/vendor_deps.ts +1 -1
  31. package/shared/getSharedLogger.ts +15 -0
  32. package/shared/terminalUtils.ts +3 -0
  33. package/src/content.config.ts +9 -0
  34. package/stl-docs/components/AIDropdown.tsx +63 -0
  35. package/stl-docs/components/{content-panel/ContentBreadcrumbs.tsx → ContentBreadcrumbs.tsx} +2 -2
  36. package/stl-docs/components/Head.astro +16 -0
  37. package/stl-docs/components/Header.astro +3 -2
  38. package/stl-docs/components/PageTitle.astro +82 -0
  39. package/stl-docs/components/TableOfContents.astro +34 -0
  40. package/stl-docs/components/ThemeSelect.astro +80 -112
  41. package/stl-docs/components/content-panel/ContentPanel.astro +9 -39
  42. package/stl-docs/components/headers/DefaultHeader.astro +1 -1
  43. package/stl-docs/components/headers/HeaderLinks.astro +1 -1
  44. package/stl-docs/components/headers/SplashMobileMenuToggle.astro +19 -0
  45. package/stl-docs/components/headers/StackedHeader.astro +29 -24
  46. package/stl-docs/components/icons/chat-gpt.tsx +17 -0
  47. package/stl-docs/components/icons/claude.tsx +10 -0
  48. package/stl-docs/components/icons/cursor.tsx +10 -0
  49. package/stl-docs/components/icons/gemini.tsx +19 -0
  50. package/stl-docs/components/icons/markdown.tsx +10 -0
  51. package/stl-docs/components/index.ts +1 -0
  52. package/stl-docs/components/mintlify-compat/Accordion.astro +7 -38
  53. package/stl-docs/components/mintlify-compat/AccordionGroup.astro +9 -23
  54. package/stl-docs/components/mintlify-compat/Columns.astro +40 -42
  55. package/stl-docs/components/mintlify-compat/Frame.astro +16 -18
  56. package/stl-docs/components/mintlify-compat/Step.astro +30 -32
  57. package/stl-docs/components/mintlify-compat/Steps.astro +8 -10
  58. package/stl-docs/components/mintlify-compat/callouts/Callout.astro +10 -3
  59. package/stl-docs/components/mintlify-compat/callouts/Check.astro +7 -3
  60. package/stl-docs/components/mintlify-compat/callouts/Danger.astro +7 -3
  61. package/stl-docs/components/mintlify-compat/callouts/Info.astro +7 -3
  62. package/stl-docs/components/mintlify-compat/callouts/Note.astro +7 -3
  63. package/stl-docs/components/mintlify-compat/callouts/Tip.astro +7 -3
  64. package/stl-docs/components/mintlify-compat/callouts/Warning.astro +7 -3
  65. package/stl-docs/components/mintlify-compat/card.css +33 -35
  66. package/stl-docs/components/nav-tabs/NavDropdown.astro +29 -63
  67. package/stl-docs/components/nav-tabs/NavTabs.astro +79 -65
  68. package/stl-docs/components/nav-tabs/SecondaryNavTabs.astro +15 -7
  69. package/stl-docs/components/nav-tabs/buildNavLinks.ts +4 -3
  70. package/stl-docs/components/pagination/HomeLink.astro +10 -0
  71. package/stl-docs/components/pagination/Pagination.astro +173 -0
  72. package/stl-docs/components/pagination/PaginationLinkEmphasized.astro +22 -0
  73. package/stl-docs/components/pagination/PaginationLinkQuiet.astro +13 -0
  74. package/stl-docs/components/pagination/util.ts +71 -0
  75. package/stl-docs/components/scripts.ts +1 -0
  76. package/stl-docs/components/{Sidebar.astro → sidebars/BaseSidebar.astro} +2 -3
  77. package/stl-docs/components/sidebars/SDKSelectSidebar.astro +8 -0
  78. package/stl-docs/disableCalloutSyntax.ts +36 -0
  79. package/stl-docs/index.ts +76 -27
  80. package/stl-docs/loadStlDocsConfig.ts +35 -5
  81. package/stl-docs/proseMarkdown/proseMarkdownIntegration.ts +64 -0
  82. package/stl-docs/proseMarkdown/proseMarkdownMiddleware.ts +34 -0
  83. package/stl-docs/proseMarkdown/toMarkdown.ts +158 -0
  84. package/stl-docs/tabsMiddleware.ts +12 -4
  85. package/styles/code.css +115 -127
  86. package/styles/fonts.css +32 -17
  87. package/styles/links.css +10 -49
  88. package/styles/overrides.css +53 -57
  89. package/styles/page.css +90 -59
  90. package/styles/sdk_select.css +9 -7
  91. package/styles/search.css +59 -69
  92. package/styles/sidebar.css +190 -127
  93. package/styles/toc.css +37 -33
  94. package/theme.css +9 -1
  95. package/tsconfig.json +2 -5
  96. package/virtual-module.d.ts +7 -2
  97. package/plugin/globalJs/ai-dropdown.ts +0 -57
  98. package/stl-docs/components/APIReferenceAIDropdown.tsx +0 -86
  99. package/stl-docs/components/content-panel/ProseAIDropdown.tsx +0 -64
  100. /package/{plugin/assets → assets}/fonts/geist/OFL.txt +0 -0
  101. /package/{plugin/assets → assets}/fonts/geist/geist-italic-latin-ext.woff2 +0 -0
  102. /package/{plugin/assets → assets}/fonts/geist/geist-italic-latin.woff2 +0 -0
  103. /package/{plugin/assets → assets}/fonts/geist/geist-latin-ext.woff2 +0 -0
  104. /package/{plugin/assets → assets}/fonts/geist/geist-latin.woff2 +0 -0
  105. /package/{plugin/assets → assets}/fonts/geist/geist-mono-italic-latin-ext.woff2 +0 -0
  106. /package/{plugin/assets → assets}/fonts/geist/geist-mono-italic-latin.woff2 +0 -0
  107. /package/{plugin/assets → assets}/fonts/geist/geist-mono-latin-ext.woff2 +0 -0
  108. /package/{plugin/assets → assets}/fonts/geist/geist-mono-latin.woff2 +0 -0
@@ -1,7 +1,7 @@
1
1
  import type { StarlightRouteData } from '@astrojs/starlight/route-data';
2
2
  import { defineRouteMiddleware } from '@astrojs/starlight/route-data';
3
3
 
4
- import { SPLIT_TABS_ENABLED, TABS } from 'virtual:stl-stl-starlight-virtual-module';
4
+ import { SPLIT_TABS_ENABLED, TABS } from 'virtual:stl-docs-virtual-module';
5
5
  import clsx from 'clsx';
6
6
 
7
7
  // this fn is loaded in the plugin via addRouteMiddleware
@@ -58,7 +58,7 @@ function getTabIndexForSlug(
58
58
  match: 'exact' | 'prefix';
59
59
  } | null {
60
60
  // ↓ exact match eg. slug = "/blog" and there is a link containing "/blog"
61
- let tab = linksByTab.get(slug);
61
+ const tab = linksByTab.get(slug)!;
62
62
  if (typeof tab === 'string') {
63
63
  return {
64
64
  match: 'exact',
@@ -88,13 +88,19 @@ function getNonSplitLinksByTab() {
88
88
  const linksByTab = new Map<string, string>();
89
89
 
90
90
  for (let i = 0; i < TABS.length; i++) {
91
- const tab = TABS[i];
91
+ const tab = TABS[i]!;
92
92
  linksByTab.set(tab.link, String(i));
93
93
  }
94
94
 
95
95
  return linksByTab;
96
96
  }
97
97
 
98
+ export interface StarlightRouteWithStlDocs extends StarlightRouteData {
99
+ _stlDocs?: {
100
+ activeTabIndex: number;
101
+ };
102
+ }
103
+
98
104
  export const onRequest = defineRouteMiddleware(async (context) => {
99
105
  // if using content collection schema, use: context.locals.starlightRoute.entry.data.stainlessStarlight
100
106
  // this worked without collections but relied on hijacking starlightRoute: context.props.frontmatter.stainlessStarlight
@@ -143,7 +149,8 @@ export const onRequest = defineRouteMiddleware(async (context) => {
143
149
  }
144
150
 
145
151
  // We store the active tab index so we can use it in our nav tabs component
146
- context.locals.starlightRoute._stlStarlight = {
152
+ const routeData: StarlightRouteWithStlDocs = context.locals.starlightRoute;
153
+ routeData._stlDocs = {
147
154
  activeTabIndex: activeTabIndex.index,
148
155
  };
149
156
 
@@ -179,5 +186,6 @@ export const onRequest = defineRouteMiddleware(async (context) => {
179
186
 
180
187
  matchingGroup?.entries.unshift(...mobileLinks);
181
188
 
189
+ (context.locals._stlStarlightPage ??= {}).fullSidebar = context.locals.starlightRoute.sidebar;
182
190
  context.locals.starlightRoute.sidebar = matchingGroup.entries;
183
191
  });
package/styles/code.css CHANGED
@@ -1,72 +1,90 @@
1
- @layer stainless {
2
- .expressive-code {
3
- .frame {
4
- --code-background: var(--sl-color-bg-inline-code);
5
- }
1
+ .expressive-code {
2
+ .frame {
3
+ --code-background: var(--sl-color-bg-inline-code);
4
+ }
6
5
 
7
- figure.frame {
8
- box-shadow: none;
6
+ figure.frame {
7
+ box-shadow: none;
8
+ }
9
+
10
+ figure,
11
+ pre {
12
+ border-radius: var(--sl-button-border-radius);
13
+ border-color: var(--sl-color-hairline);
14
+ }
15
+
16
+ .frame.has-title:not(.is-terminal),
17
+ .frame.is-terminal {
18
+ figcaption {
19
+ border-radius: var(--sl-button-border-radius) var(--sl-button-border-radius) 0 0;
20
+ border-color: var(--sl-color-hairline);
9
21
  }
10
22
 
11
- figure,
12
23
  pre {
13
- border-radius: var(--sl-button-border-radius);
24
+ border-radius: 0 0 var(--sl-button-border-radius) var(--sl-button-border-radius);
14
25
  border-color: var(--sl-color-hairline);
15
26
  }
27
+ }
16
28
 
17
- .frame.has-title:not(.is-terminal),
18
- .frame.is-terminal {
19
- figcaption {
20
- border-radius: var(--sl-button-border-radius) var(--sl-button-border-radius) 0 0;
21
- border-color: var(--sl-color-hairline);
22
- }
23
-
24
- pre {
25
- border-radius: 0 0 var(--sl-button-border-radius) var(--sl-button-border-radius);
26
- border-color: var(--sl-color-hairline);
27
- }
29
+ .frame.has-title:not(.is-terminal) {
30
+ figcaption span:first-child {
31
+ border-top-left-radius: var(--sl-button-border-radius);
28
32
  }
29
33
 
30
- .frame.has-title:not(.is-terminal) {
31
- figcaption span:first-child {
32
- border-top-left-radius: var(--sl-button-border-radius);
33
- }
34
-
35
- .header::before {
36
- border-color: var(--sl-color-hairline);
37
- }
34
+ .header::before {
35
+ border-color: var(--sl-color-hairline);
36
+ }
38
37
 
39
- .title::after {
40
- bottom: -1px;
41
- top: unset;
42
- }
38
+ .title::after {
39
+ bottom: -1px;
40
+ top: unset;
43
41
  }
44
42
  }
43
+ }
45
44
 
46
- .astro-code {
47
- border-radius: var(--sl-button-border-radius);
48
- border-color: var(--sl-color-hairline);
49
- }
45
+ .astro-code {
46
+ border-radius: var(--sl-button-border-radius);
47
+ border-color: var(--sl-color-hairline);
48
+ }
49
+
50
+ .stl-snippet-request-container {
51
+ position: relative;
52
+ }
53
+
54
+ .stl-snippet-expand-button {
55
+ display: none;
50
56
 
51
- .stl-snippet-request-container {
52
- position: relative;
57
+ position: relative;
58
+ left: 50%;
59
+ transform: translateX(-50%);
60
+ bottom: 12px;
61
+ cursor: pointer;
62
+ height: auto;
63
+ }
64
+
65
+ .stl-snippet-code-is-expanded {
66
+ .ellipsis {
67
+ display: none;
53
68
  }
69
+ }
54
70
 
71
+ .stl-snippet-collapsible {
55
72
  .stl-snippet-expand-button {
56
- display: none;
73
+ display: block;
74
+ margin-bottom: -23px;
75
+ /* Prevent clipping of the button with the container below */
76
+ z-index: 100;
77
+ }
57
78
 
58
- position: relative;
59
- left: 50%;
60
- transform: translateX(-50%);
61
- bottom: 12px;
62
- background-color: var(--stldocs-color-bg-inline-code);
63
- cursor: pointer;
64
- font-weight: 500;
65
- line-height: 100%;
66
- font-size: var(--stldocs-font-size-body-sm);
67
- font-family: var(--stldocs-font);
68
- padding: 4px 7px 4px 7px;
69
- height: auto;
79
+ .stl-snippet-code-is-collapsed {
80
+ .hidden {
81
+ display: none;
82
+ opacity: 0;
83
+ }
84
+
85
+ .leading-ws {
86
+ display: none;
87
+ }
70
88
  }
71
89
 
72
90
  .stl-snippet-code-is-expanded {
@@ -74,116 +92,86 @@
74
92
  display: none;
75
93
  }
76
94
  }
95
+ }
77
96
 
78
- .stl-snippet-collapsible {
79
- .stl-snippet-expand-button {
80
- display: block;
81
- margin-bottom: -23px;
82
- /* Prevent clipping of the button with the container below */
83
- z-index: 100;
97
+ .stldocs-root {
98
+ .stl-snippets-non-collapsible {
99
+ .shiki {
100
+ counter-reset: codeblock-line 0 !important;
84
101
  }
85
102
 
86
- .stl-snippet-code-is-collapsed {
103
+ .stldocs-snippet {
87
104
  .hidden {
88
- display: none;
89
- opacity: 0;
105
+ display: inline;
106
+ opacity: 1;
90
107
  }
91
108
 
92
109
  .leading-ws {
93
- display: none;
110
+ display: inline;
94
111
  }
95
- }
96
112
 
97
- .stl-snippet-code-is-expanded {
98
113
  .ellipsis {
99
114
  display: none;
100
115
  }
101
116
  }
102
117
  }
118
+ }
103
119
 
104
- .stldocs-root {
105
- .stl-snippets-non-collapsible {
106
- .shiki {
107
- counter-reset: codeblock-line 0 !important;
108
- }
109
-
110
- .stldocs-snippet {
111
- .hidden {
112
- display: inline;
113
- opacity: 1;
114
- }
115
-
116
- .leading-ws {
117
- display: inline;
118
- }
119
-
120
- .ellipsis {
121
- display: none;
122
- }
123
- }
124
- }
125
- }
120
+ .stldocs-root .stl-snippet-dropdown-button-text,
121
+ .stl-snippet-dropdown-button-text {
122
+ font-weight: 500;
123
+ font-style: normal;
124
+ font-family: var(--stldocs-font);
125
+ line-height: 100%;
126
+ font-size: var(--sl-text-body-sm);
127
+ color: var(--sl-color-text);
128
+ }
126
129
 
127
- .stl-snippet-dropdown-button-text {
128
- font-weight: 500;
129
- font-style: normal;
130
- font-family: var(--stldocs-font);
131
- line-height: 100%;
132
- font-size: var(--sl-text-body-sm);
133
- color: var(--sl-color-text);
134
- text-transform: capitalize;
135
-
136
- &.http {
137
- text-transform: uppercase;
138
- }
130
+ :root[data-theme='light'] {
131
+ .astro-code,
132
+ .astro-code span {
133
+ background-color: var(--sl-color-bg-inline-code) !important;
139
134
  }
140
135
 
141
- :root[data-theme='light'] {
136
+ .stldocs-snippet-response-pane {
137
+ .shiki,
138
+ .shiki span,
142
139
  .astro-code,
143
140
  .astro-code span {
144
141
  background-color: var(--sl-color-bg-inline-code) !important;
145
142
  }
146
-
147
- .stldocs-snippet-response-pane {
148
- .shiki,
149
- .shiki span,
150
- .astro-code,
151
- .astro-code span {
152
- background-color: var(--sl-color-bg-inline-code) !important;
153
- }
154
- }
155
143
  }
144
+ }
156
145
 
157
- :root[data-theme='dark'] {
158
- /*
146
+ :root[data-theme='dark'] {
147
+ /*
159
148
  Need to use important to override inline variables. This is the
160
149
  recommended pattern in the shiki docs.
161
150
 
162
151
  https://shiki.style/guide/dual-themes#query-based-dark-mode
163
152
  */
153
+ .shiki,
154
+ .shiki span,
155
+ .astro-code,
156
+ .astro-code span {
157
+ color: var(--shiki-dark) !important;
158
+ background-color: var(--sl-color-bg) !important;
159
+ font-style: var(--shiki-dark-font-style) !important;
160
+ font-weight: var(--shiki-dark-font-weight) !important;
161
+ text-decoration: var(--shiki-dark-text-decoration) !important;
162
+ }
163
+
164
+ .astro-code,
165
+ .astro-code span {
166
+ background-color: var(--sl-color-bg-inline-code) !important;
167
+ }
168
+
169
+ .stldocs-snippet-response-pane {
164
170
  .shiki,
165
171
  .shiki span,
166
- .astro-code,
167
- .astro-code span {
168
- color: var(--shiki-dark) !important;
169
- background-color: var(--sl-color-bg) !important;
170
- font-style: var(--shiki-dark-font-style) !important;
171
- font-weight: var(--shiki-dark-font-weight) !important;
172
- text-decoration: var(--shiki-dark-text-decoration) !important;
173
- }
174
-
175
172
  .astro-code,
176
173
  .astro-code span {
177
174
  background-color: var(--sl-color-bg-inline-code) !important;
178
175
  }
179
-
180
- .stldocs-snippet-response-pane {
181
- .shiki,
182
- .shiki span,
183
- .astro-code,
184
- .astro-code span {
185
- background-color: var(--sl-color-bg-inline-code) !important;
186
- }
187
- }
188
176
  }
189
177
  }
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,12 @@
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
- }
8
-
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
- }
1
+ .sl-link-card {
2
+ box-shadow: none;
3
+ border-radius: var(--sl-button-border-radius);
4
+ padding: 1.5rem;
5
+ margin-top: 16px;
6
+ }
46
7
 
47
- > a[rel='prev'] {
48
- margin-right: auto;
49
- }
50
- }
8
+ .sl-link-card:hover {
9
+ transition: 0.3s;
10
+ border: 1px solid var(--sl-color-accent-high);
11
+ background-color: var(--sl-color-accent-low);
51
12
  }
@@ -1,79 +1,75 @@
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(--sl-color-white);
9
7
 
10
- img {
11
- height: 32px;
12
- width: auto;
13
- }
8
+ img {
9
+ height: 32px;
10
+ width: auto;
14
11
  }
12
+ }
13
+
14
+ /* Hide the text in the theme select dropdown */
15
+ starlight-theme-select select {
16
+ width: 0;
17
+ overflow: hidden;
18
+ }
15
19
 
16
- /* Hide the text in the theme select dropdown */
17
- starlight-theme-select select {
18
- width: 0;
19
- overflow: hidden;
20
+ .custom-select-wrapper select {
21
+ background-color: var(--sl-color-bg-ui);
22
+ border: 1px solid var(--sl-color-hairline);
23
+ border-radius: var(--sl-button-border-radius);
24
+
25
+ &:hover {
26
+ border-color: var(--sl-color-hairline-shade);
20
27
  }
28
+ }
29
+
30
+ .content-panel {
31
+ border-top: 0;
32
+ }
21
33
 
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);
34
+ starlight-menu-button button {
35
+ box-shadow: none;
36
+ background-color: var(--sl-color-bg-ui);
37
+ border: 1px solid var(--sl-color-hairline);
38
+ border-radius: var(--sl-button-border-radius);
39
+ height: var(--sl-button-size);
40
+ width: var(--sl-button-size);
41
+ display: flex;
42
+ align-items: center;
43
+ justify-content: center;
27
44
 
28
- &:hover {
29
- border-color: var(--sl-color-hairline-shade);
30
- }
45
+ &:hover {
46
+ border-color: var(--sl-color-hairline-shade);
31
47
  }
48
+ }
32
49
 
33
- .content-panel {
34
- border-top: 0;
50
+ mobile-starlight-toc {
51
+ nav {
52
+ background-color: var(--sl-color-bg);
35
53
  }
36
54
 
37
- 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;
55
+ summary {
56
+ padding: 2rem 1rem;
57
+ border-bottom-color: var(--sl-color-hairline-light);
58
+ }
59
+ }
47
60
 
48
- &:hover {
49
- border-color: var(--sl-color-hairline-shade);
50
- }
61
+ @media (min-width: 50rem) {
62
+ starlight-menu-button button {
63
+ display: none;
51
64
  }
52
65
 
53
66
  mobile-starlight-toc {
54
67
  nav {
55
- background-color: var(--sl-color-bg);
68
+ inset-inline-start: calc(var(--sl-content-inline-start, 0));
56
69
  }
57
70
 
58
71
  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
- }
72
+ padding: 2rem 2rem;
77
73
  }
78
74
  }
79
75
  }