@raystack/chronicle 0.10.0 → 0.10.1
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/dist/cli/index.js +24 -0
- package/package.json +2 -2
- package/src/cli/commands/dev.ts +12 -0
- package/src/cli/commands/start.ts +12 -0
- package/src/components/api/playground-dialog.tsx +14 -14
- package/src/components/mdx/link.tsx +5 -31
- package/src/server/entry-server.tsx +2 -0
- package/src/server/routes/[...slug].md.ts +5 -1
- package/src/server/{routes/apis/[...slug].md.ts → utils/api-markdown.ts} +3 -6
- package/src/themes/default/ContentDirButtons.tsx +1 -1
- package/src/themes/default/Layout.tsx +18 -6
- package/src/themes/default/Page.module.css +9 -0
- package/src/themes/default/Skeleton.tsx +5 -15
- package/src/themes/default/VersionSwitcher.tsx +2 -2
- package/src/themes/paper/VersionSwitcher.tsx +2 -2
- package/src/components/common/breadcrumb.tsx +0 -3
- package/src/components/common/button.tsx +0 -3
- package/src/components/common/code-block.tsx +0 -3
- package/src/components/common/dialog.tsx +0 -3
- package/src/components/common/index.ts +0 -10
- package/src/components/common/input-field.tsx +0 -3
- package/src/components/common/sidebar.tsx +0 -3
- package/src/components/common/switch.tsx +0 -3
- package/src/components/common/table.tsx +0 -3
- package/src/components/common/tabs.tsx +0 -3
package/dist/cli/index.js
CHANGED
|
@@ -822,6 +822,18 @@ var devCommand = new Command2("dev").description("Start development server").opt
|
|
|
822
822
|
});
|
|
823
823
|
await server.listen();
|
|
824
824
|
server.printUrls();
|
|
825
|
+
let shuttingDown = false;
|
|
826
|
+
const shutdown = async () => {
|
|
827
|
+
if (shuttingDown)
|
|
828
|
+
return;
|
|
829
|
+
shuttingDown = true;
|
|
830
|
+
try {
|
|
831
|
+
await server.close();
|
|
832
|
+
} catch {}
|
|
833
|
+
process.exit(0);
|
|
834
|
+
};
|
|
835
|
+
process.once("SIGINT", shutdown);
|
|
836
|
+
process.once("SIGTERM", shutdown);
|
|
825
837
|
});
|
|
826
838
|
|
|
827
839
|
// src/cli/commands/init.ts
|
|
@@ -953,6 +965,18 @@ var startCommand = new Command5("start").description("Start production server").
|
|
|
953
965
|
preview: { port, host: options.host }
|
|
954
966
|
});
|
|
955
967
|
server.printUrls();
|
|
968
|
+
let shuttingDown = false;
|
|
969
|
+
const shutdown = async () => {
|
|
970
|
+
if (shuttingDown)
|
|
971
|
+
return;
|
|
972
|
+
shuttingDown = true;
|
|
973
|
+
try {
|
|
974
|
+
await server.close();
|
|
975
|
+
} catch {}
|
|
976
|
+
process.exit(0);
|
|
977
|
+
};
|
|
978
|
+
process.once("SIGINT", shutdown);
|
|
979
|
+
process.once("SIGTERM", shutdown);
|
|
956
980
|
});
|
|
957
981
|
|
|
958
982
|
// src/cli/index.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@raystack/chronicle",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"description": "Config-driven documentation framework",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@opentelemetry/sdk-metrics": "^2.6.1",
|
|
48
48
|
"@opentelemetry/semantic-conventions": "^1.40.0",
|
|
49
49
|
"@radix-ui/react-icons": "^1.3.2",
|
|
50
|
-
"@raystack/apsara": "1.0.0-rc.
|
|
50
|
+
"@raystack/apsara": "1.0.0-rc.7",
|
|
51
51
|
"@shikijs/rehype": "^4.0.2",
|
|
52
52
|
"@vitejs/plugin-react": "^6.0.1",
|
|
53
53
|
"chalk": "^5.6.2",
|
package/src/cli/commands/dev.ts
CHANGED
|
@@ -28,4 +28,16 @@ export const devCommand = new Command('dev')
|
|
|
28
28
|
|
|
29
29
|
await server.listen();
|
|
30
30
|
server.printUrls();
|
|
31
|
+
|
|
32
|
+
let shuttingDown = false;
|
|
33
|
+
const shutdown = async () => {
|
|
34
|
+
if (shuttingDown) return;
|
|
35
|
+
shuttingDown = true;
|
|
36
|
+
try {
|
|
37
|
+
await server.close();
|
|
38
|
+
} catch { /* ignore close errors */ }
|
|
39
|
+
process.exit(0);
|
|
40
|
+
};
|
|
41
|
+
process.once('SIGINT', shutdown);
|
|
42
|
+
process.once('SIGTERM', shutdown);
|
|
31
43
|
});
|
|
@@ -26,4 +26,16 @@ export const startCommand = new Command('start')
|
|
|
26
26
|
});
|
|
27
27
|
|
|
28
28
|
server.printUrls();
|
|
29
|
+
|
|
30
|
+
let shuttingDown = false;
|
|
31
|
+
const shutdown = async () => {
|
|
32
|
+
if (shuttingDown) return;
|
|
33
|
+
shuttingDown = true;
|
|
34
|
+
try {
|
|
35
|
+
await server.close();
|
|
36
|
+
} catch { /* ignore close errors */ }
|
|
37
|
+
process.exit(0);
|
|
38
|
+
};
|
|
39
|
+
process.once('SIGINT', shutdown);
|
|
40
|
+
process.once('SIGTERM', shutdown);
|
|
29
41
|
});
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { useState, useCallback, useMemo } from 'react'
|
|
4
4
|
import type { OpenAPIV3 } from 'openapi-types'
|
|
5
|
-
import { Dialog, Button, Badge, IconButton,
|
|
5
|
+
import { Dialog, Button, Badge, IconButton, Input, CopyButton, Select, Menu } from '@raystack/apsara'
|
|
6
6
|
import { Cross2Icon, ChevronDownIcon, ChevronUpIcon, PlayIcon, PlusIcon } from '@radix-ui/react-icons'
|
|
7
7
|
import { CounterClockwiseClockIcon, CodeIcon } from '@radix-ui/react-icons'
|
|
8
8
|
import { MethodBadge } from '@/components/api/method-badge'
|
|
@@ -263,13 +263,13 @@ export function PlaygroundDialog({
|
|
|
263
263
|
<div className={styles.fieldRow}>
|
|
264
264
|
<span className={styles.fieldLabel}>Username</span>
|
|
265
265
|
<div className={styles.fieldInput}>
|
|
266
|
-
<
|
|
266
|
+
<Input size="small" placeholder="Enter username" value={basicUser} onValueChange={setBasicUser} />
|
|
267
267
|
</div>
|
|
268
268
|
</div>
|
|
269
269
|
<div className={styles.fieldRow}>
|
|
270
270
|
<span className={styles.fieldLabel}>Password</span>
|
|
271
271
|
<div className={styles.fieldInput}>
|
|
272
|
-
<
|
|
272
|
+
<Input size="small" type="password" placeholder="Enter password" value={basicPass} onValueChange={setBasicPass} />
|
|
273
273
|
</div>
|
|
274
274
|
</div>
|
|
275
275
|
</>
|
|
@@ -277,7 +277,7 @@ export function PlaygroundDialog({
|
|
|
277
277
|
<div className={styles.fieldRow}>
|
|
278
278
|
<span className={styles.fieldLabel}>{currentScheme.headerName}</span>
|
|
279
279
|
<div className={styles.fieldInput}>
|
|
280
|
-
<
|
|
280
|
+
<Input size="small" placeholder={currentScheme.placeholder} value={authToken} onValueChange={setAuthToken} />
|
|
281
281
|
</div>
|
|
282
282
|
</div>
|
|
283
283
|
) : null}
|
|
@@ -285,7 +285,7 @@ export function PlaygroundDialog({
|
|
|
285
285
|
<div key={f.name} className={styles.fieldRow}>
|
|
286
286
|
<span className={styles.fieldLabel}>{f.name}</span>
|
|
287
287
|
<div className={styles.fieldInput}>
|
|
288
|
-
<
|
|
288
|
+
<Input size="small" placeholder="Enter value" value={headerValues[f.name] ?? ''} onValueChange={(v) => setHeaderValues({ ...headerValues, [f.name]: v })} />
|
|
289
289
|
</div>
|
|
290
290
|
</div>
|
|
291
291
|
))}
|
|
@@ -307,11 +307,11 @@ export function PlaygroundDialog({
|
|
|
307
307
|
<div key={f.name} className={styles.fieldRow}>
|
|
308
308
|
<span className={styles.fieldLabel}>{f.name}</span>
|
|
309
309
|
<div className={styles.fieldInput}>
|
|
310
|
-
<
|
|
310
|
+
<Input
|
|
311
311
|
size="small"
|
|
312
312
|
placeholder="Enter value"
|
|
313
313
|
value={pathValues[f.name] ?? ''}
|
|
314
|
-
|
|
314
|
+
onValueChange={(v) => setPathValues({ ...pathValues, [f.name]: v })}
|
|
315
315
|
/>
|
|
316
316
|
</div>
|
|
317
317
|
</div>
|
|
@@ -332,11 +332,11 @@ export function PlaygroundDialog({
|
|
|
332
332
|
<div key={f.name} className={styles.fieldRow}>
|
|
333
333
|
<span className={styles.fieldLabel}>{f.name}</span>
|
|
334
334
|
<div className={styles.fieldInput}>
|
|
335
|
-
<
|
|
335
|
+
<Input
|
|
336
336
|
size="small"
|
|
337
337
|
placeholder={f.description ?? 'Enter value'}
|
|
338
338
|
value={queryValues[f.name] ?? ''}
|
|
339
|
-
|
|
339
|
+
onValueChange={(v) => setQueryValues({ ...queryValues, [f.name]: v })}
|
|
340
340
|
/>
|
|
341
341
|
</div>
|
|
342
342
|
</div>
|
|
@@ -494,13 +494,13 @@ function BodyFieldRow({ field, value, onChange }: {
|
|
|
494
494
|
{items.map((item, i) => (
|
|
495
495
|
<div key={i} className={styles.arrayItemRow}>
|
|
496
496
|
<div className={styles.fieldInput}>
|
|
497
|
-
<
|
|
497
|
+
<Input
|
|
498
498
|
size="small"
|
|
499
499
|
placeholder={`${field.name}[${i}]`}
|
|
500
500
|
value={String(item)}
|
|
501
|
-
|
|
501
|
+
onValueChange={(v) => {
|
|
502
502
|
const updated = [...items]
|
|
503
|
-
updated[i] =
|
|
503
|
+
updated[i] = v
|
|
504
504
|
onChange(updated)
|
|
505
505
|
}}
|
|
506
506
|
/>
|
|
@@ -539,11 +539,11 @@ function BodyFieldRow({ field, value, onChange }: {
|
|
|
539
539
|
<div className={styles.fieldRow}>
|
|
540
540
|
<span className={styles.fieldLabel}>{field.name} {field.required && <Badge variant="danger" size="micro">required</Badge>}</span>
|
|
541
541
|
<div className={styles.fieldInput}>
|
|
542
|
-
<
|
|
542
|
+
<Input
|
|
543
543
|
size="small"
|
|
544
544
|
placeholder={field.description ?? 'Enter value'}
|
|
545
545
|
value={String(value ?? '')}
|
|
546
|
-
|
|
546
|
+
onValueChange={(v) => onChange(v)}
|
|
547
547
|
/>
|
|
548
548
|
</div>
|
|
549
549
|
</div>
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { Link as ApsaraLink } from '@raystack/apsara';
|
|
2
|
-
import type { ComponentProps
|
|
3
|
-
import {
|
|
2
|
+
import type { ComponentProps } from 'react';
|
|
3
|
+
import { Link as RouterLink } from 'react-router';
|
|
4
4
|
|
|
5
5
|
type LinkProps = ComponentProps<'a'>;
|
|
6
6
|
|
|
7
|
-
export function Link({ href, children,
|
|
8
|
-
const navigate = useNavigate();
|
|
9
|
-
|
|
7
|
+
export function Link({ href, children, ...props }: LinkProps) {
|
|
10
8
|
if (!href) {
|
|
11
9
|
return <span {...props}>{children}</span>;
|
|
12
10
|
}
|
|
@@ -16,12 +14,7 @@ export function Link({ href, children, onClick: onClickProp, ...props }: LinkPro
|
|
|
16
14
|
|
|
17
15
|
if (isExternal) {
|
|
18
16
|
return (
|
|
19
|
-
<ApsaraLink
|
|
20
|
-
href={href}
|
|
21
|
-
target='_blank'
|
|
22
|
-
rel='noopener noreferrer'
|
|
23
|
-
{...props}
|
|
24
|
-
>
|
|
17
|
+
<ApsaraLink href={href} external {...props}>
|
|
25
18
|
{children}
|
|
26
19
|
</ApsaraLink>
|
|
27
20
|
);
|
|
@@ -35,27 +28,8 @@ export function Link({ href, children, onClick: onClickProp, ...props }: LinkPro
|
|
|
35
28
|
);
|
|
36
29
|
}
|
|
37
30
|
|
|
38
|
-
const onClick = (e: MouseEvent<HTMLAnchorElement>) => {
|
|
39
|
-
if (
|
|
40
|
-
e.defaultPrevented ||
|
|
41
|
-
e.button !== 0 ||
|
|
42
|
-
e.metaKey ||
|
|
43
|
-
e.ctrlKey ||
|
|
44
|
-
e.shiftKey ||
|
|
45
|
-
e.altKey
|
|
46
|
-
) {
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
onClickProp?.(e);
|
|
51
|
-
if (e.defaultPrevented) return;
|
|
52
|
-
|
|
53
|
-
e.preventDefault();
|
|
54
|
-
navigate(href);
|
|
55
|
-
};
|
|
56
|
-
|
|
57
31
|
return (
|
|
58
|
-
<ApsaraLink
|
|
32
|
+
<ApsaraLink render={<RouterLink to={href} />} {...props}>
|
|
59
33
|
{children}
|
|
60
34
|
</ApsaraLink>
|
|
61
35
|
);
|
|
@@ -115,6 +115,8 @@ export default {
|
|
|
115
115
|
<head>
|
|
116
116
|
<meta charSet="UTF-8" />
|
|
117
117
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
118
|
+
<link rel="icon" href="/favicon.ico" />
|
|
119
|
+
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
|
|
118
120
|
{assets.css.map((attr: { href: string }) => (
|
|
119
121
|
<link key={attr.href} rel="stylesheet" {...attr} />
|
|
120
122
|
))}
|
|
@@ -3,11 +3,15 @@ import matter from 'gray-matter';
|
|
|
3
3
|
import { defineHandler, HTTPError } from 'nitro';
|
|
4
4
|
import { getPage, getOriginalPath } from '@/lib/source';
|
|
5
5
|
import { safePath } from '@/server/utils/safe-path';
|
|
6
|
+
import { handleApiMarkdown } from '@/server/utils/api-markdown';
|
|
6
7
|
|
|
7
8
|
export default defineHandler(async event => {
|
|
8
9
|
const pathname = event.path || event.req.url?.split('?')[0] || '';
|
|
9
10
|
if (!pathname.endsWith('.md')) return;
|
|
10
|
-
|
|
11
|
+
|
|
12
|
+
if (pathname.startsWith('/apis/')) {
|
|
13
|
+
return handleApiMarkdown(pathname);
|
|
14
|
+
}
|
|
11
15
|
|
|
12
16
|
const stripped = pathname.replace(/\.md$/, '');
|
|
13
17
|
const parts = stripped === '/index' || stripped === '/'
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import type { OpenAPIV3 } from 'openapi-types'
|
|
2
|
-
import {
|
|
2
|
+
import { HTTPError } from 'nitro'
|
|
3
3
|
import { loadConfig } from '@/lib/config'
|
|
4
4
|
import { loadApiSpecs } from '@/lib/openapi'
|
|
5
5
|
import { findApiOperation } from '@/lib/api-routes'
|
|
6
6
|
import { flattenSchema, generateExampleJson, type SchemaField } from '@/lib/schema'
|
|
7
7
|
import { generateCurl } from '@/lib/snippet-generators'
|
|
8
8
|
|
|
9
|
-
export
|
|
10
|
-
const pathname = event.path || event.req.url?.split('?')[0] || ''
|
|
11
|
-
if (!pathname.endsWith('.md')) return
|
|
12
|
-
|
|
9
|
+
export async function handleApiMarkdown(pathname: string) {
|
|
13
10
|
const stripped = pathname.replace(/\.md$/, '').replace(/^\/apis\//, '')
|
|
14
11
|
const slug = stripped.split('/').filter(Boolean)
|
|
15
12
|
if (slug.length < 2) {
|
|
@@ -26,7 +23,7 @@ export default defineHandler(async event => {
|
|
|
26
23
|
|
|
27
24
|
const md = generateApiMarkdown(match.method, match.path, match.operation, match.spec.server.url, match.spec.auth)
|
|
28
25
|
return new Response(md, { headers: { 'Content-Type': 'text/markdown; charset=utf-8' } })
|
|
29
|
-
}
|
|
26
|
+
}
|
|
30
27
|
|
|
31
28
|
function generateApiMarkdown(
|
|
32
29
|
method: string,
|
|
@@ -19,7 +19,7 @@ export function ContentDirButtons() {
|
|
|
19
19
|
const { visible, overflow } = splitContentButtons(entries, MAX_VISIBLE);
|
|
20
20
|
|
|
21
21
|
return (
|
|
22
|
-
<Flex gap=
|
|
22
|
+
<Flex gap={3} align='center'>
|
|
23
23
|
{visible.map(entry => (
|
|
24
24
|
<RouterLink
|
|
25
25
|
key={entry.href}
|
|
@@ -22,6 +22,7 @@ import { getLandingEntries } from '@/lib/config';
|
|
|
22
22
|
import { getActiveContentDir } from '@/lib/navigation';
|
|
23
23
|
import { usePageContext } from '@/lib/page-context';
|
|
24
24
|
import type { Node, Root } from 'fumadocs-core/page-tree';
|
|
25
|
+
import { NodeType } from '@/lib/tree-utils';
|
|
25
26
|
import type { ThemeLayoutProps } from '@/types';
|
|
26
27
|
import styles from './Layout.module.css';
|
|
27
28
|
import { OpenInAI } from './OpenInAI';
|
|
@@ -117,7 +118,7 @@ export function Layout({
|
|
|
117
118
|
>
|
|
118
119
|
<Sidebar.Header className={styles.sidebarHeader}>
|
|
119
120
|
<SidebarLogo config={config} />
|
|
120
|
-
<Flex gap=
|
|
121
|
+
<Flex gap={3} align='center'>
|
|
121
122
|
{config.search?.enabled && <Search />}
|
|
122
123
|
<ClientThemeSwitcher size={16} />
|
|
123
124
|
</Flex>
|
|
@@ -186,8 +187,8 @@ export function Layout({
|
|
|
186
187
|
<div className={styles.cardWrapper}>
|
|
187
188
|
<div className={styles.card}>
|
|
188
189
|
<nav className={styles.subNav}>
|
|
189
|
-
<Flex align='center' gap=
|
|
190
|
-
<Flex align='center' gap=
|
|
190
|
+
<Flex align='center' gap={3} className={styles.subNavLeft}>
|
|
191
|
+
<Flex align='center' gap={2}>
|
|
191
192
|
<IconButton
|
|
192
193
|
size={2}
|
|
193
194
|
disabled={!prev}
|
|
@@ -207,7 +208,7 @@ export function Layout({
|
|
|
207
208
|
</Flex>
|
|
208
209
|
<Breadcrumbs slug={slug} tree={tree} />
|
|
209
210
|
</Flex>
|
|
210
|
-
<Flex align='center' gap=
|
|
211
|
+
<Flex align='center' gap={3}>
|
|
211
212
|
{isApiRoute && <TestRequestButton />}
|
|
212
213
|
{isApiRoute && <ViewDocsButton />}
|
|
213
214
|
<OpenInAI />
|
|
@@ -224,6 +225,15 @@ export function Layout({
|
|
|
224
225
|
);
|
|
225
226
|
}
|
|
226
227
|
|
|
228
|
+
function hasActiveDescendant(node: Node, pathname: string): boolean {
|
|
229
|
+
if (node.type === NodeType.Page) return pathname === node.url;
|
|
230
|
+
if (node.type === NodeType.Folder) {
|
|
231
|
+
if (node.index && pathname === node.index.url) return true;
|
|
232
|
+
return node.children.some(child => hasActiveDescendant(child, pathname));
|
|
233
|
+
}
|
|
234
|
+
return false;
|
|
235
|
+
}
|
|
236
|
+
|
|
227
237
|
function SidebarNode({
|
|
228
238
|
item,
|
|
229
239
|
pathname,
|
|
@@ -240,6 +250,7 @@ function SidebarNode({
|
|
|
240
250
|
if (item.type === 'folder') {
|
|
241
251
|
if (depth > 1) return null;
|
|
242
252
|
const icon = typeof item.icon === 'string' ? iconMap[item.icon] : item.icon;
|
|
253
|
+
const hasActiveChild = hasActiveDescendant(item, pathname);
|
|
243
254
|
return (
|
|
244
255
|
<Sidebar.Group
|
|
245
256
|
className={styles.navGroup}
|
|
@@ -247,6 +258,7 @@ function SidebarNode({
|
|
|
247
258
|
label={item.name?.toString() ?? ''}
|
|
248
259
|
leadingIcon={icon ?? undefined}
|
|
249
260
|
collapsible={depth === 1}
|
|
261
|
+
defaultOpen={hasActiveChild}
|
|
250
262
|
classNames={{
|
|
251
263
|
items: styles.groupItems,
|
|
252
264
|
header: styles.navGroupHeader,
|
|
@@ -305,7 +317,7 @@ function ApiSidebarNode({ item, pathname }: { item: Node; pathname: string }) {
|
|
|
305
317
|
|
|
306
318
|
if (item.type === 'folder') {
|
|
307
319
|
return (
|
|
308
|
-
<Flex direction='column' gap=
|
|
320
|
+
<Flex direction='column' gap={3} className={styles.apiGroup}>
|
|
309
321
|
<span className={styles.apiGroupLabel}>{item.name?.toString()}</span>
|
|
310
322
|
<Flex direction='column'>
|
|
311
323
|
{item.children.map((child, i) => (
|
|
@@ -329,7 +341,7 @@ function ApiSidebarNode({ item, pathname }: { item: Node; pathname: string }) {
|
|
|
329
341
|
return (
|
|
330
342
|
<Flex
|
|
331
343
|
align='center'
|
|
332
|
-
gap=
|
|
344
|
+
gap={3}
|
|
333
345
|
className={`${styles.apiItem} ${isActive ? styles.apiItemActive : ''}`}
|
|
334
346
|
render={<RouterLink to={href} />}
|
|
335
347
|
>
|
|
@@ -6,21 +6,11 @@ export function PageSkeleton() {
|
|
|
6
6
|
return (
|
|
7
7
|
<Flex className={styles.page}>
|
|
8
8
|
<article className={styles.article}>
|
|
9
|
-
<Skeleton width="40%" height="
|
|
10
|
-
<Skeleton
|
|
11
|
-
|
|
12
|
-
<Skeleton width="
|
|
13
|
-
|
|
14
|
-
<Skeleton width="100%" height="16px" />
|
|
15
|
-
<Skeleton width="60%" height="16px" />
|
|
16
|
-
</Skeleton.Provider>
|
|
17
|
-
<Skeleton width="30%" height="24px" />
|
|
18
|
-
<Skeleton.Provider duration={2}>
|
|
19
|
-
<Skeleton width="100%" height="16px" />
|
|
20
|
-
<Skeleton width="90%" height="16px" />
|
|
21
|
-
<Skeleton width="100%" height="16px" />
|
|
22
|
-
<Skeleton width="70%" height="16px" />
|
|
23
|
-
</Skeleton.Provider>
|
|
9
|
+
<Skeleton width="40%" height="var(--rs-line-height-t2)" containerClassName={styles.headerLoader} />
|
|
10
|
+
<Skeleton width="60%" height="var(--rs-line-height-regular)" containerClassName={styles.headerLoader} />
|
|
11
|
+
{[...new Array(20)].map((_, i) => (
|
|
12
|
+
<Skeleton key={i} width="100%" height="var(--rs-line-height-regular)" containerClassName={styles.loader} />
|
|
13
|
+
))}
|
|
24
14
|
</article>
|
|
25
15
|
</Flex>
|
|
26
16
|
);
|
|
@@ -28,7 +28,7 @@ export function VersionSwitcher() {
|
|
|
28
28
|
/>
|
|
29
29
|
}
|
|
30
30
|
>
|
|
31
|
-
<Flex gap=
|
|
31
|
+
<Flex gap={3} align='center'>
|
|
32
32
|
{active?.label ?? 'Version'}
|
|
33
33
|
{active?.badge ? (
|
|
34
34
|
<Badge variant={active.badge.variant} size='micro'>
|
|
@@ -43,7 +43,7 @@ export function VersionSwitcher() {
|
|
|
43
43
|
key={v.dir ?? '_latest'}
|
|
44
44
|
onClick={() => navigate(getVersionHomeHref(config, v.dir))}
|
|
45
45
|
>
|
|
46
|
-
<Flex gap=
|
|
46
|
+
<Flex gap={3} align='center'>
|
|
47
47
|
{v.label}
|
|
48
48
|
{v.badge ? (
|
|
49
49
|
<Badge variant={v.badge.variant} size='micro'>
|
|
@@ -29,7 +29,7 @@ export function VersionSwitcher() {
|
|
|
29
29
|
/>
|
|
30
30
|
}
|
|
31
31
|
>
|
|
32
|
-
<Flex gap=
|
|
32
|
+
<Flex gap={3} align='center' justify='start'>
|
|
33
33
|
{active?.label ?? 'Version'}
|
|
34
34
|
{active?.badge ? (
|
|
35
35
|
<Badge variant={active.badge.variant} size='micro'>
|
|
@@ -44,7 +44,7 @@ export function VersionSwitcher() {
|
|
|
44
44
|
key={v.dir ?? '_latest'}
|
|
45
45
|
onClick={() => navigate(getVersionHomeHref(config, v.dir))}
|
|
46
46
|
>
|
|
47
|
-
<Flex gap=
|
|
47
|
+
<Flex gap={3} align='center'>
|
|
48
48
|
{v.label}
|
|
49
49
|
{v.badge ? (
|
|
50
50
|
<Badge variant={v.badge.variant} size='micro'>
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export { Sidebar } from './sidebar'
|
|
2
|
-
export { Table } from './table'
|
|
3
|
-
export { Dialog } from './dialog'
|
|
4
|
-
export { InputField } from './input-field'
|
|
5
|
-
export { Tabs } from './tabs'
|
|
6
|
-
export { Breadcrumb } from './breadcrumb'
|
|
7
|
-
export { Button } from './button'
|
|
8
|
-
export { CodeBlock } from './code-block'
|
|
9
|
-
export { Callout } from './callout'
|
|
10
|
-
export { Switch } from './switch'
|