@stainless-api/docs 0.1.0-beta.2 → 0.1.0-beta.21
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 +153 -0
- package/components/variables.css +1 -27
- package/eslint-suppressions.json +47 -0
- package/locals.d.ts +14 -0
- package/package.json +30 -27
- package/plugin/buildAlgoliaIndex.ts +29 -4
- package/plugin/cms/server.ts +97 -54
- package/plugin/cms/sidebar-builder.ts +6 -25
- package/plugin/cms/worker.ts +2 -2
- package/plugin/components/SnippetCode.tsx +7 -4
- package/plugin/components/search/SearchAlgolia.astro +0 -7
- package/plugin/components/search/SearchIsland.tsx +30 -17
- package/plugin/generateAPIReferenceLink.ts +1 -1
- package/plugin/globalJs/ai-dropdown-options.ts +161 -0
- package/plugin/globalJs/navigation.ts +0 -23
- package/plugin/helpers/getPageLoadEvent.ts +1 -1
- package/plugin/index.ts +48 -17
- package/plugin/languages.ts +1 -1
- package/plugin/loadPluginConfig.ts +100 -13
- package/plugin/react/Routing.tsx +30 -33
- package/plugin/referencePlaceholderUtils.ts +1 -1
- package/plugin/replaceSidebarPlaceholderMiddleware.ts +4 -0
- package/plugin/routes/Docs.astro +59 -85
- package/plugin/routes/Overview.astro +9 -15
- package/plugin/routes/markdown.ts +1 -1
- package/plugin/vendor/preview.worker.docs.js +6357 -6132
- package/resolveSrcFile.ts +10 -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 +52 -0
- package/stl-docs/components/Head.astro +9 -0
- package/stl-docs/components/Header.astro +3 -2
- package/stl-docs/components/PageTitle.astro +64 -0
- package/stl-docs/components/TableOfContents.astro +34 -0
- package/stl-docs/components/ThemeSelect.astro +4 -2
- package/stl-docs/components/content-panel/ContentPanel.astro +9 -39
- package/stl-docs/components/headers/DefaultHeader.astro +1 -1
- package/stl-docs/components/headers/HeaderLinks.astro +1 -1
- package/stl-docs/components/headers/StackedHeader.astro +30 -25
- package/stl-docs/components/icons/chat-gpt.tsx +17 -0
- package/stl-docs/components/icons/claude.tsx +10 -0
- package/stl-docs/components/icons/markdown.tsx +10 -0
- package/stl-docs/components/index.ts +2 -0
- package/stl-docs/components/mintlify-compat/Accordion.astro +7 -38
- package/stl-docs/components/mintlify-compat/AccordionGroup.astro +9 -23
- package/stl-docs/components/mintlify-compat/Columns.astro +40 -42
- package/stl-docs/components/mintlify-compat/Frame.astro +16 -18
- package/stl-docs/components/mintlify-compat/Step.astro +30 -32
- package/stl-docs/components/mintlify-compat/Steps.astro +8 -10
- package/stl-docs/components/mintlify-compat/callouts/Callout.astro +10 -3
- package/stl-docs/components/mintlify-compat/callouts/Check.astro +7 -3
- package/stl-docs/components/mintlify-compat/callouts/Danger.astro +7 -3
- package/stl-docs/components/mintlify-compat/callouts/Info.astro +7 -3
- package/stl-docs/components/mintlify-compat/callouts/Note.astro +7 -3
- package/stl-docs/components/mintlify-compat/callouts/Tip.astro +7 -3
- package/stl-docs/components/mintlify-compat/callouts/Warning.astro +7 -3
- package/stl-docs/components/mintlify-compat/card.css +33 -35
- package/stl-docs/components/nav-tabs/NavDropdown.astro +1 -1
- package/stl-docs/components/nav-tabs/SecondaryNavTabs.astro +15 -7
- 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 +173 -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/{Sidebar.astro → sidebars/BaseSidebar.astro} +2 -3
- package/stl-docs/components/sidebars/SDKSelectSidebar.astro +8 -0
- package/stl-docs/disableCalloutSyntax.ts +36 -0
- package/stl-docs/index.ts +77 -13
- package/stl-docs/loadStlDocsConfig.ts +25 -3
- package/stl-docs/proseMarkdown/proseMarkdownIntegration.ts +64 -0
- package/stl-docs/proseMarkdown/proseMarkdownMiddleware.ts +34 -0
- package/stl-docs/proseMarkdown/toMarkdown.ts +158 -0
- package/stl-docs/tabsMiddleware.ts +12 -4
- package/styles/code.css +115 -127
- package/styles/fonts.css +24 -9
- package/styles/links.css +10 -49
- package/styles/overrides.css +55 -57
- package/styles/page.css +89 -59
- package/styles/sdk_select.css +6 -7
- package/styles/search.css +65 -67
- package/styles/sidebar.css +199 -128
- package/styles/toc.css +37 -33
- package/theme.css +9 -1
- package/tsconfig.json +2 -5
- package/virtual-module.d.ts +5 -1
- package/plugin/globalJs/ai-dropdown.ts +0 -57
- package/stl-docs/components/APIReferenceAIDropdown.tsx +0 -86
- package/stl-docs/components/content-panel/ProseAIDropdown.tsx +0 -64
- /package/stl-docs/components/{content-panel/ContentBreadcrumbs.tsx → ContentBreadcrumbs.tsx} +0 -0
|
@@ -16,51 +16,49 @@ const { cols } = Astro.props;
|
|
|
16
16
|
</div>
|
|
17
17
|
|
|
18
18
|
<style>
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
grid-template-columns: 1fr;
|
|
19
|
+
.stl-ui-mintlify-compat-columns {
|
|
20
|
+
display: grid;
|
|
21
|
+
gap: 1rem;
|
|
22
|
+
grid-template-columns: 1fr;
|
|
24
23
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
24
|
+
> [data-stl-ui-element] {
|
|
25
|
+
margin: 0;
|
|
28
26
|
}
|
|
27
|
+
}
|
|
29
28
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
29
|
+
@media (min-width: 50rem) {
|
|
30
|
+
.stl-ui-mintlify-compat-columns--2 {
|
|
31
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
32
|
+
}
|
|
33
|
+
.stl-ui-mintlify-compat-columns--3 {
|
|
34
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
35
|
+
}
|
|
36
|
+
.stl-ui-mintlify-compat-columns--4 {
|
|
37
|
+
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
38
|
+
}
|
|
39
|
+
.stl-ui-mintlify-compat-columns--5 {
|
|
40
|
+
grid-template-columns: repeat(5, minmax(0, 1fr));
|
|
41
|
+
}
|
|
42
|
+
.stl-ui-mintlify-compat-columns--6 {
|
|
43
|
+
grid-template-columns: repeat(6, minmax(0, 1fr));
|
|
44
|
+
}
|
|
45
|
+
.stl-ui-mintlify-compat-columns--7 {
|
|
46
|
+
grid-template-columns: repeat(7, minmax(0, 1fr));
|
|
47
|
+
}
|
|
48
|
+
.stl-ui-mintlify-compat-columns--8 {
|
|
49
|
+
grid-template-columns: repeat(8, minmax(0, 1fr));
|
|
50
|
+
}
|
|
51
|
+
.stl-ui-mintlify-compat-columns--9 {
|
|
52
|
+
grid-template-columns: repeat(9, minmax(0, 1fr));
|
|
53
|
+
}
|
|
54
|
+
.stl-ui-mintlify-compat-columns--10 {
|
|
55
|
+
grid-template-columns: repeat(10, minmax(0, 1fr));
|
|
56
|
+
}
|
|
57
|
+
.stl-ui-mintlify-compat-columns--11 {
|
|
58
|
+
grid-template-columns: repeat(11, minmax(0, 1fr));
|
|
59
|
+
}
|
|
60
|
+
.stl-ui-mintlify-compat-columns--12 {
|
|
61
|
+
grid-template-columns: repeat(12, minmax(0, 1fr));
|
|
64
62
|
}
|
|
65
63
|
}
|
|
66
64
|
</style>
|
|
@@ -12,26 +12,24 @@ const { caption } = Astro.props;
|
|
|
12
12
|
</div>
|
|
13
13
|
|
|
14
14
|
<style>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
border: 1px solid var(--sl-color-gray-6);
|
|
15
|
+
.stl-ui-mintlify-compat-frame {
|
|
16
|
+
padding: 6px;
|
|
17
|
+
border-radius: 10px;
|
|
18
|
+
background-color: var(--sl-color-gray-7);
|
|
19
|
+
border: 1px solid var(--sl-color-gray-6);
|
|
21
20
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
.stl-ui-mintlify-compat-frame-content {
|
|
22
|
+
border-radius: 8px;
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
}
|
|
26
25
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
26
|
+
.stl-ui-mintlify-compat-frame-caption {
|
|
27
|
+
text-align: center;
|
|
28
|
+
padding-top: 12px;
|
|
29
|
+
padding-bottom: 6px;
|
|
30
|
+
font-size: var(--sl-text-body);
|
|
31
|
+
color: var(--sl-color-gray-3);
|
|
32
|
+
line-height: 100%;
|
|
35
33
|
}
|
|
36
34
|
}
|
|
37
35
|
</style>
|
|
@@ -15,44 +15,42 @@ const { title } = Astro.props;
|
|
|
15
15
|
</li>
|
|
16
16
|
|
|
17
17
|
<style>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
display: flex;
|
|
18
|
+
.stl-ui-mintlify-compat-step {
|
|
19
|
+
display: flex;
|
|
21
20
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
21
|
+
&:not(:first-child) {
|
|
22
|
+
margin-top: 1rem;
|
|
25
23
|
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.stl-ui-mintlify-compat-step-step-number {
|
|
27
|
+
margin-right: 1rem;
|
|
28
|
+
display: flex;
|
|
29
|
+
align-items: top;
|
|
30
|
+
justify-content: center;
|
|
31
|
+
margin-top: 4px;
|
|
26
32
|
|
|
27
|
-
|
|
28
|
-
|
|
33
|
+
&::before {
|
|
34
|
+
counter-increment: ui-steps;
|
|
35
|
+
content: counter(ui-steps);
|
|
36
|
+
border-radius: 50%;
|
|
37
|
+
height: 1.5rem;
|
|
38
|
+
width: 1.5rem;
|
|
39
|
+
font-size: 0.8rem;
|
|
40
|
+
color: var(--sl-color-text);
|
|
41
|
+
font-weight: 600;
|
|
42
|
+
background-color: var(--sl-color-gray-5);
|
|
29
43
|
display: flex;
|
|
30
|
-
align-items:
|
|
44
|
+
align-items: center;
|
|
31
45
|
justify-content: center;
|
|
32
|
-
margin-top: 4px;
|
|
33
|
-
|
|
34
|
-
&::before {
|
|
35
|
-
counter-increment: ui-steps;
|
|
36
|
-
content: counter(ui-steps);
|
|
37
|
-
border-radius: 50%;
|
|
38
|
-
height: 1.5rem;
|
|
39
|
-
width: 1.5rem;
|
|
40
|
-
font-size: 0.8rem;
|
|
41
|
-
color: var(--sl-color-text);
|
|
42
|
-
font-weight: 600;
|
|
43
|
-
background-color: var(--sl-color-gray-5);
|
|
44
|
-
display: flex;
|
|
45
|
-
align-items: center;
|
|
46
|
-
justify-content: center;
|
|
47
|
-
}
|
|
48
46
|
}
|
|
47
|
+
}
|
|
49
48
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
49
|
+
.stl-ui-mintlify-compat-step-title {
|
|
50
|
+
font-weight: 600;
|
|
51
|
+
color: var(--sl-color-text);
|
|
52
|
+
}
|
|
53
|
+
.stl-ui-mintlify-compat-step-content {
|
|
54
|
+
margin-top: 0.5rem;
|
|
57
55
|
}
|
|
58
56
|
</style>
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
<ol class="stl-ui-mintlify-compat-steps"><slot /></ol>
|
|
2
2
|
|
|
3
3
|
<style>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
margin-top: 1rem;
|
|
4
|
+
.stl-ui-mintlify-compat-steps {
|
|
5
|
+
counter-reset: ui-steps;
|
|
6
|
+
list-style: none;
|
|
7
|
+
margin: 0;
|
|
8
|
+
padding: 0;
|
|
9
|
+
margin-top: 1rem;
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
11
|
+
* {
|
|
12
|
+
margin: 0;
|
|
15
13
|
}
|
|
16
14
|
}
|
|
17
15
|
</style>
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
---
|
|
2
|
-
import {
|
|
2
|
+
import { Callout as StainlessCallout, type CalloutVariant } from '@stainless-api/ui-primitives';
|
|
3
|
+
|
|
4
|
+
export interface Props {
|
|
5
|
+
variant?: CalloutVariant;
|
|
6
|
+
children: astroHTML.JSX.Children;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const { variant } = Astro.props;
|
|
3
10
|
---
|
|
4
11
|
|
|
5
|
-
<
|
|
12
|
+
<StainlessCallout variant={variant}>
|
|
6
13
|
<slot />
|
|
7
|
-
</
|
|
14
|
+
</StainlessCallout>
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
import {
|
|
2
|
+
import { Callout } from '@stainless-api/ui-primitives';
|
|
3
|
+
|
|
4
|
+
export interface Props {
|
|
5
|
+
children: astroHTML.JSX.Children;
|
|
6
|
+
}
|
|
3
7
|
---
|
|
4
8
|
|
|
5
|
-
<
|
|
9
|
+
<Callout variant="success">
|
|
6
10
|
<slot />
|
|
7
|
-
</
|
|
11
|
+
</Callout>
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
import {
|
|
2
|
+
import { Callout } from '@stainless-api/ui-primitives';
|
|
3
|
+
|
|
4
|
+
export interface Props {
|
|
5
|
+
children: astroHTML.JSX.Children;
|
|
6
|
+
}
|
|
3
7
|
---
|
|
4
8
|
|
|
5
|
-
<
|
|
9
|
+
<Callout variant="danger">
|
|
6
10
|
<slot />
|
|
7
|
-
</
|
|
11
|
+
</Callout>
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
import {
|
|
2
|
+
import { Callout } from '@stainless-api/ui-primitives';
|
|
3
|
+
|
|
4
|
+
export interface Props {
|
|
5
|
+
children: astroHTML.JSX.Children;
|
|
6
|
+
}
|
|
3
7
|
---
|
|
4
8
|
|
|
5
|
-
<
|
|
9
|
+
<Callout variant="info">
|
|
6
10
|
<slot />
|
|
7
|
-
</
|
|
11
|
+
</Callout>
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
import {
|
|
2
|
+
import { Callout } from '@stainless-api/ui-primitives';
|
|
3
|
+
|
|
4
|
+
export interface Props {
|
|
5
|
+
children: astroHTML.JSX.Children;
|
|
6
|
+
}
|
|
3
7
|
---
|
|
4
8
|
|
|
5
|
-
<
|
|
9
|
+
<Callout variant="note">
|
|
6
10
|
<slot />
|
|
7
|
-
</
|
|
11
|
+
</Callout>
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
import {
|
|
2
|
+
import { Callout } from '@stainless-api/ui-primitives';
|
|
3
|
+
|
|
4
|
+
export interface Props {
|
|
5
|
+
children: astroHTML.JSX.Children;
|
|
6
|
+
}
|
|
3
7
|
---
|
|
4
8
|
|
|
5
|
-
<
|
|
9
|
+
<Callout variant="tip">
|
|
6
10
|
<slot />
|
|
7
|
-
</
|
|
11
|
+
</Callout>
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
import {
|
|
2
|
+
import { Callout } from '@stainless-api/ui-primitives';
|
|
3
|
+
|
|
4
|
+
export interface Props {
|
|
5
|
+
children: astroHTML.JSX.Children;
|
|
6
|
+
}
|
|
3
7
|
---
|
|
4
8
|
|
|
5
|
-
<
|
|
9
|
+
<Callout variant="warning">
|
|
6
10
|
<slot />
|
|
7
|
-
</
|
|
11
|
+
</Callout>
|
|
@@ -1,44 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
flex-direction: column;
|
|
10
|
-
|
|
11
|
-
.stl-ui-mintlify-compat-card-icon svg {
|
|
12
|
-
color: var(--sl-color-accent);
|
|
13
|
-
}
|
|
1
|
+
.stl-ui-mintlify-compat-card {
|
|
2
|
+
border-radius: 12px;
|
|
3
|
+
padding: 16px;
|
|
4
|
+
font-size: var(--sl-text-body);
|
|
5
|
+
display: flex;
|
|
6
|
+
gap: 8px;
|
|
7
|
+
border: 1px solid var(--sl-color-hairline);
|
|
8
|
+
flex-direction: column;
|
|
14
9
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
display: flex;
|
|
19
|
-
align-items: center;
|
|
20
|
-
gap: 8px;
|
|
21
|
-
margin-top: 8px;
|
|
22
|
-
}
|
|
10
|
+
.stl-ui-mintlify-compat-card-icon svg {
|
|
11
|
+
color: var(--sl-color-accent);
|
|
12
|
+
}
|
|
23
13
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
14
|
+
.stl-ui-mintlify-compat-card-title {
|
|
15
|
+
font-weight: 600;
|
|
16
|
+
font-size: 1.125rem;
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
gap: 8px;
|
|
20
|
+
margin-top: 8px;
|
|
28
21
|
}
|
|
29
22
|
|
|
30
|
-
|
|
31
|
-
|
|
23
|
+
.stl-ui-mintlify-compat-card-content {
|
|
24
|
+
margin-top: 0;
|
|
32
25
|
color: var(--sl-color-text-secondary);
|
|
33
|
-
|
|
34
|
-
&:hover {
|
|
35
|
-
border-color: var(--sl-color-accent);
|
|
36
|
-
}
|
|
37
26
|
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
a.stl-ui-mintlify-compat-card {
|
|
30
|
+
text-decoration: none;
|
|
31
|
+
color: var(--sl-color-text-secondary);
|
|
38
32
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
gap: 1rem;
|
|
42
|
-
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
33
|
+
&:hover {
|
|
34
|
+
border-color: var(--sl-color-accent);
|
|
43
35
|
}
|
|
44
36
|
}
|
|
37
|
+
|
|
38
|
+
.stl-ui-mintlify-compat-card-group {
|
|
39
|
+
display: grid;
|
|
40
|
+
gap: 1rem;
|
|
41
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
42
|
+
}
|
|
@@ -17,7 +17,7 @@ const BUTTON_ID = 'nav-dropdown-button';
|
|
|
17
17
|
|
|
18
18
|
const navLinks = buildNavLinks(Astro.locals.starlightRoute);
|
|
19
19
|
|
|
20
|
-
const buttonText = (navLinks.find((item) => item.active) ?? navLinks[0]).label;
|
|
20
|
+
const buttonText = (navLinks.find((item) => item.active) ?? navLinks[0]!).label;
|
|
21
21
|
---
|
|
22
22
|
|
|
23
23
|
<div class="stldocs-root nav-dropdown-root">
|
|
@@ -34,13 +34,8 @@ const navLinks = buildNavLinks(Astro.locals.starlightRoute);
|
|
|
34
34
|
align-items: center;
|
|
35
35
|
padding: 0;
|
|
36
36
|
list-style: none;
|
|
37
|
-
overflow-x: auto;
|
|
38
37
|
margin-bottom: -1px;
|
|
39
|
-
gap:
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.stl-active-secondary-link:hover {
|
|
43
|
-
background-color: transparent;
|
|
38
|
+
gap: 4px;
|
|
44
39
|
}
|
|
45
40
|
|
|
46
41
|
li {
|
|
@@ -50,13 +45,26 @@ const navLinks = buildNavLinks(Astro.locals.starlightRoute);
|
|
|
50
45
|
&.active {
|
|
51
46
|
border-color: var(--sl-color-text-accent);
|
|
52
47
|
}
|
|
48
|
+
|
|
49
|
+
.stl-ui-button {
|
|
50
|
+
/* match sidebar. TODO: hoist sidebar variables to use those instead of hardcoding? */
|
|
51
|
+
border-width: 0;
|
|
52
|
+
padding: 8px 12px;
|
|
53
|
+
margin-inline: -12px;
|
|
54
|
+
}
|
|
55
|
+
/* cover for button’s negative margin */
|
|
56
|
+
&:not(:first-child) {
|
|
57
|
+
margin-inline-start: 12px;
|
|
58
|
+
}
|
|
59
|
+
&:not(:last-child) {
|
|
60
|
+
margin-inline-end: 12px;
|
|
61
|
+
}
|
|
53
62
|
}
|
|
54
63
|
}
|
|
55
64
|
|
|
56
65
|
@media (min-width: 50rem) {
|
|
57
66
|
.stl-secondary-nav-tabs {
|
|
58
67
|
display: block;
|
|
59
|
-
padding-left: 0.55rem;
|
|
60
68
|
}
|
|
61
69
|
}
|
|
62
70
|
</style>
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { StarlightRouteData } from '@astrojs/starlight/route-data';
|
|
2
|
-
import { TABS } from 'virtual:stl-
|
|
2
|
+
import { TABS } from 'virtual:stl-docs-virtual-module';
|
|
3
|
+
import type { StarlightRouteWithStlDocs } from '../../tabsMiddleware';
|
|
3
4
|
|
|
4
5
|
export function buildNavLinks(starlightRoute: StarlightRouteData) {
|
|
5
|
-
|
|
6
|
-
const activeTabIndex =
|
|
6
|
+
const routeData: StarlightRouteWithStlDocs = starlightRoute;
|
|
7
|
+
const activeTabIndex = routeData?._stlDocs?.activeTabIndex;
|
|
7
8
|
|
|
8
9
|
const navLinks = TABS.map((item, index) => ({
|
|
9
10
|
...item,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { base } from 'astro:config/client';
|
|
3
|
+
import { HomeIcon } from 'lucide-react';
|
|
4
|
+
import PaginationLinkQuiet from './PaginationLinkQuiet.astro';
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<PaginationLinkQuiet href={base}>
|
|
8
|
+
<HomeIcon slot="icon" />
|
|
9
|
+
Home
|
|
10
|
+
</PaginationLinkQuiet>
|