@stainless-api/docs 0.1.0-beta.3 → 0.1.0-beta.30
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 +214 -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 -18
- 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 +7566 -6784
- 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 +16 -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 +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/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 +76 -26
- 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 +32 -17
- package/styles/links.css +10 -49
- package/styles/overrides.css +54 -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/{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/stl-docs/components/{content-panel/ContentBreadcrumbs.tsx → ContentBreadcrumbs.tsx} +0 -0
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { unified } from 'unified';
|
|
2
|
+
import rehypeParse from 'rehype-parse';
|
|
3
|
+
import rehypeRemark from 'rehype-remark';
|
|
4
|
+
import remarkGfm from 'remark-gfm';
|
|
5
|
+
import remarkStringify from 'remark-stringify';
|
|
6
|
+
import { HTMLElement, parse } from 'node-html-parser';
|
|
7
|
+
|
|
8
|
+
type PaginationLink = {
|
|
9
|
+
href: string;
|
|
10
|
+
label: string;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
type PaginationItems = {
|
|
14
|
+
prev: PaginationLink | null;
|
|
15
|
+
next: PaginationLink | null;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
function parsePaginationLink(footer: HTMLElement, rel: 'next' | 'prev'): PaginationLink | null {
|
|
19
|
+
const link = footer.querySelector(`.pagination-links a[rel="${rel}"]`);
|
|
20
|
+
if (!link) {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const title = link.querySelector('.link-title');
|
|
25
|
+
if (!title) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const href = link.getAttribute('href');
|
|
30
|
+
if (!href) {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return {
|
|
35
|
+
href,
|
|
36
|
+
label: title.text,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function isRelativeLink(href: string) {
|
|
41
|
+
return href.startsWith('/');
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function hasExtension(href: string) {
|
|
45
|
+
return href.includes('.');
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function removeTrailingSlash(href: string) {
|
|
49
|
+
return href.replace(/\/$/, '');
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function makeMarkdownLinks(el: HTMLElement) {
|
|
53
|
+
el.querySelectorAll('a').forEach((a) => {
|
|
54
|
+
const href = a.getAttribute('href');
|
|
55
|
+
if (!href) {
|
|
56
|
+
return a;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (isRelativeLink(href) && !hasExtension(href)) {
|
|
60
|
+
if (href === '/') {
|
|
61
|
+
a.setAttribute('href', '/index.md');
|
|
62
|
+
} else {
|
|
63
|
+
a.setAttribute('href', `${removeTrailingSlash(href)}/index.md`);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return a;
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function removeHiddenElements(el: HTMLElement) {
|
|
71
|
+
const hiddenSelectors = ['.sl-anchor-link'];
|
|
72
|
+
for (const selector of hiddenSelectors) {
|
|
73
|
+
const hiddenElements = el.querySelectorAll(selector);
|
|
74
|
+
for (const hiddenElement of hiddenElements) {
|
|
75
|
+
hiddenElement.remove();
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export async function toMarkdown(html: string) {
|
|
81
|
+
const root = parse(html);
|
|
82
|
+
|
|
83
|
+
const mainEl = root.querySelector('main');
|
|
84
|
+
|
|
85
|
+
if (!mainEl) {
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
makeMarkdownLinks(mainEl);
|
|
90
|
+
|
|
91
|
+
const footer = mainEl.querySelector('footer');
|
|
92
|
+
|
|
93
|
+
const markdownContentEl = mainEl.querySelector('.sl-markdown-content');
|
|
94
|
+
if (!markdownContentEl) {
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
removeHiddenElements(markdownContentEl);
|
|
99
|
+
|
|
100
|
+
const articleContent = markdownContentEl.innerHTML;
|
|
101
|
+
|
|
102
|
+
const paginationLinks: PaginationItems = {
|
|
103
|
+
prev: null,
|
|
104
|
+
next: null,
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
if (footer) {
|
|
108
|
+
paginationLinks.prev = parsePaginationLink(footer, 'prev');
|
|
109
|
+
paginationLinks.next = parsePaginationLink(footer, 'next');
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
let md = (
|
|
113
|
+
await unified()
|
|
114
|
+
.use(rehypeParse, { fragment: true }) // parse HTML
|
|
115
|
+
.use(rehypeRemark) // rehype (HTML) -> remark (MD AST)
|
|
116
|
+
.use(remarkGfm) // tables, strikethrough, autolinks, etc.
|
|
117
|
+
.use(remarkStringify, {
|
|
118
|
+
fences: true,
|
|
119
|
+
bullet: '-',
|
|
120
|
+
listItemIndent: 'one',
|
|
121
|
+
rule: '-',
|
|
122
|
+
})
|
|
123
|
+
.process(articleContent)
|
|
124
|
+
).toString();
|
|
125
|
+
|
|
126
|
+
const title = root.querySelector('title')?.textContent;
|
|
127
|
+
const description = root.querySelector('meta[name="description"]')?.attributes.content;
|
|
128
|
+
const lastUpdated = root.querySelector('.meta time')?.attributes.datetime;
|
|
129
|
+
|
|
130
|
+
// let htmlUrl = url.toString().replace('.md', '');
|
|
131
|
+
// if (htmlUrl.endsWith('/index')) {
|
|
132
|
+
// htmlUrl = htmlUrl.replace('/index', '');
|
|
133
|
+
// }
|
|
134
|
+
|
|
135
|
+
md = [
|
|
136
|
+
'---',
|
|
137
|
+
`title: ${title}`,
|
|
138
|
+
description ? `description: ${description}` : [],
|
|
139
|
+
lastUpdated ? `lastUpdated: ${lastUpdated}` : [],
|
|
140
|
+
// `source_url:`,
|
|
141
|
+
// ` html: ${htmlUrl}`,
|
|
142
|
+
// ` md: ${url.toString()}`,
|
|
143
|
+
'---\n',
|
|
144
|
+
md,
|
|
145
|
+
]
|
|
146
|
+
.flat()
|
|
147
|
+
.join('\n');
|
|
148
|
+
|
|
149
|
+
if (paginationLinks.prev) {
|
|
150
|
+
md += `\n\n[Previous](${paginationLinks.prev.href})`;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
if (paginationLinks.next) {
|
|
154
|
+
md += `\n\n[Next](${paginationLinks.next.href})`;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
return md;
|
|
158
|
+
}
|
|
@@ -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-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
2
|
-
.
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
1
|
+
.expressive-code {
|
|
2
|
+
.frame {
|
|
3
|
+
--code-background: var(--sl-color-bg-inline-code);
|
|
4
|
+
}
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
.
|
|
31
|
-
|
|
32
|
-
|
|
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
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
38
|
+
.title::after {
|
|
39
|
+
bottom: -1px;
|
|
40
|
+
top: unset;
|
|
43
41
|
}
|
|
44
42
|
}
|
|
43
|
+
}
|
|
45
44
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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
|
-
|
|
52
|
-
|
|
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:
|
|
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
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
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
|
-
.
|
|
103
|
+
.stldocs-snippet {
|
|
87
104
|
.hidden {
|
|
88
|
-
display:
|
|
89
|
-
opacity:
|
|
105
|
+
display: inline;
|
|
106
|
+
opacity: 1;
|
|
90
107
|
}
|
|
91
108
|
|
|
92
109
|
.leading-ws {
|
|
93
|
-
display:
|
|
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
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
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
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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(../
|
|
8
|
-
unicode-range:
|
|
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(../
|
|
16
|
-
unicode-range:
|
|
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(../
|
|
24
|
-
unicode-range:
|
|
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(../
|
|
32
|
-
unicode-range:
|
|
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(../
|
|
43
|
-
unicode-range:
|
|
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(../
|
|
51
|
-
unicode-range:
|
|
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(../
|
|
59
|
-
unicode-range:
|
|
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(../
|
|
67
|
-
unicode-range:
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
48
|
-
|
|
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
|
}
|