@nikala-ui/folio 0.14.0 → 0.15.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/README.md +16 -0
- package/dist/cli/commands/init.js +105 -51
- package/dist/client/app.jsx +6 -3
- package/dist/client/components/docs-layout-shell.d.ts +1 -0
- package/dist/client/components/docs-layout-shell.jsx +1 -1
- package/dist/client/components/docs-page-content.jsx +9 -5
- package/dist/client/navigation/page-navigation.js +10 -27
- package/dist/client/public/algolia-logo.svg +15 -0
- package/dist/client/public/favicon.ico +0 -0
- package/dist/client/public/logo.svg +11 -0
- package/dist/client/routing/use-docs-router.d.ts +1 -0
- package/dist/client/routing/use-docs-router.js +12 -3
- package/dist/client/style.css +139 -55
- package/dist/components/ui/api-table.jsx +6 -4
- package/dist/components/ui/code-block.jsx +6 -4
- package/dist/components/ui/command.jsx +9 -5
- package/dist/components/ui/list.jsx +3 -1
- package/dist/components/ui/logo.d.ts +4 -1
- package/dist/components/ui/logo.jsx +8 -22
- package/dist/components/ui/package-manager-tabs.jsx +4 -2
- package/dist/components/ui/pager.jsx +4 -2
- package/dist/components/ui/section-heading.jsx +1 -1
- package/dist/components/ui/sidebar.jsx +6 -3
- package/dist/components/ui/spinner.jsx +3 -1
- package/dist/components/ui/theme-toggle.jsx +14 -12
- package/dist/config.d.ts +1 -0
- package/dist/config.js +84 -29
- package/dist/core/content-scanner.d.ts +2 -1
- package/dist/core/content-scanner.js +2 -9
- package/dist/core/plugin/index.d.ts +2 -0
- package/dist/core/plugin/index.js +1 -0
- package/dist/core/plugin/lifecycle-error.d.ts +19 -0
- package/dist/core/plugin/lifecycle-error.js +28 -0
- package/dist/core/plugin/lifecycle-snapshot.d.ts +1 -0
- package/dist/core/plugin/lifecycle-snapshot.js +156 -0
- package/dist/core/plugin/lifecycle.d.ts +34 -0
- package/dist/core/plugin/lifecycle.js +170 -0
- package/dist/core/route-tree.d.ts +3 -2
- package/dist/core/route-tree.js +40 -10
- package/dist/index.d.ts +7 -4
- package/dist/index.js +4 -3
- package/dist/plugin.d.ts +60 -0
- package/dist/plugin.js +51 -0
- package/dist/plugins/i18n/components/site-language-switcher.d.ts +10 -0
- package/dist/plugins/i18n/components/site-language-switcher.jsx +39 -0
- package/dist/plugins/i18n/constants.d.ts +1 -0
- package/dist/plugins/i18n/constants.js +1 -0
- package/dist/plugins/i18n/index.d.ts +11 -0
- package/dist/plugins/i18n/index.js +89 -0
- package/dist/plugins/i18n/navigation.d.ts +5 -0
- package/dist/plugins/i18n/navigation.js +33 -0
- package/dist/plugins/i18n/runtime.d.ts +19 -0
- package/dist/plugins/i18n/runtime.jsx +65 -0
- package/dist/plugins/i18n/site-locale.d.ts +12 -0
- package/dist/plugins/i18n/site-locale.js +119 -0
- package/dist/search/provider.d.ts +9 -0
- package/dist/search/provider.js +4 -2
- package/dist/server/index.d.ts +4 -1
- package/dist/server/index.js +69 -33
- package/dist/server/module-serialization.d.ts +6 -0
- package/dist/server/module-serialization.js +26 -0
- package/dist/server/plugin/components.d.ts +7 -0
- package/dist/server/plugin/components.js +82 -0
- package/dist/server/plugin/constants.d.ts +17 -0
- package/dist/server/plugin/constants.js +21 -0
- package/dist/server/{plugin.d.ts → plugin/index.d.ts} +3 -1
- package/dist/server/plugin/index.js +166 -0
- package/dist/server/plugin/lifecycle.d.ts +32 -0
- package/dist/server/plugin/lifecycle.js +110 -0
- package/dist/server/plugin/styles.d.ts +3 -0
- package/dist/server/plugin/styles.js +22 -0
- package/dist/server/plugin/virtual-modules.d.ts +11 -0
- package/dist/server/plugin/virtual-modules.js +121 -0
- package/dist/server/seo.d.ts +4 -0
- package/dist/server/seo.js +87 -0
- package/dist/templates/env.d.ts +26 -0
- package/dist/templates/locales/en.json +77 -0
- package/dist/themes/default/components/docs-landing-body.d.ts +17 -0
- package/dist/themes/default/components/docs-landing-body.jsx +17 -0
- package/dist/themes/default/components/docs-page-body.d.ts +21 -0
- package/dist/themes/default/components/docs-page-body.jsx +36 -0
- package/dist/themes/default/components/page-actions.d.ts +15 -0
- package/dist/themes/default/components/page-actions.jsx +60 -0
- package/dist/themes/default/components/page-header.d.ts +7 -0
- package/dist/themes/default/components/page-header.jsx +3 -0
- package/dist/themes/default/components/sidebar-footer.d.ts +6 -0
- package/dist/themes/default/components/sidebar-footer.jsx +12 -0
- package/dist/themes/default/components/sidebar-header.d.ts +8 -0
- package/dist/themes/default/components/sidebar-header.jsx +17 -0
- package/dist/themes/default/components/sidebar-mobile-nav.d.ts +7 -0
- package/dist/themes/default/components/sidebar-mobile-nav.jsx +17 -0
- package/dist/themes/default/components/sidebar-promo.d.ts +8 -0
- package/dist/themes/default/components/sidebar-promo.jsx +20 -0
- package/dist/themes/default/content/breadcrumbs.jsx +5 -2
- package/dist/themes/default/content/table-of-contents.jsx +3 -1
- package/dist/themes/default/hooks/use-page-copy.d.ts +6 -0
- package/dist/themes/default/hooks/use-page-copy.js +26 -0
- package/dist/themes/default/layout.jsx +30 -127
- package/dist/themes/default/lib/layout-visibility.d.ts +8 -0
- package/dist/themes/default/lib/layout-visibility.js +24 -0
- package/dist/themes/default/navbar.jsx +14 -7
- package/dist/themes/default/navigation/mobile-table-of-contents.jsx +5 -3
- package/dist/themes/default/navigation/sidebar-tree.d.ts +2 -0
- package/dist/themes/default/navigation/sidebar-tree.jsx +11 -2
- package/dist/themes/default/overlays/search-dialog.jsx +14 -3
- package/dist/themes/default/sidebar.jsx +21 -49
- package/dist/themes/types.d.ts +5 -0
- package/dist/types.d.ts +36 -0
- package/dist/utils/format-title.d.ts +1 -0
- package/dist/utils/format-title.js +11 -0
- package/dist/vendor/docs-src/client/page-actions.ts +69 -0
- package/dist/vendor/docs-src/components/ui/api-table.tsx +6 -4
- package/dist/vendor/docs-src/components/ui/code-block.tsx +6 -4
- package/dist/vendor/docs-src/components/ui/command.tsx +9 -5
- package/dist/vendor/docs-src/components/ui/list.tsx +4 -2
- package/dist/vendor/docs-src/components/ui/logo.tsx +19 -48
- package/dist/vendor/docs-src/components/ui/package-manager-tabs.tsx +4 -2
- package/dist/vendor/docs-src/components/ui/pager.tsx +4 -2
- package/dist/vendor/docs-src/components/ui/section-heading.tsx +5 -1
- package/dist/vendor/docs-src/components/ui/sidebar.tsx +7 -4
- package/dist/vendor/docs-src/components/ui/spinner.tsx +3 -1
- package/dist/vendor/docs-src/components/ui/theme-toggle.tsx +15 -13
- package/dist/vendor/docs-src/navigation/index.ts +2 -0
- package/dist/vendor/docs-src/navigation/repository-links.ts +43 -0
- package/dist/vendor/docs-src/navigation/sidebar-state.ts +22 -0
- package/dist/vendor/docs-src/navigation/sidebar-tree.ts +15 -0
- package/dist/vendor/docs-src/plugins/i18n/components/site-language-switcher.tsx +56 -0
- package/dist/vendor/docs-src/plugins/i18n/constants.ts +1 -0
- package/dist/vendor/docs-src/plugins/i18n/index.ts +110 -0
- package/dist/vendor/docs-src/plugins/i18n/navigation.ts +49 -0
- package/dist/vendor/docs-src/plugins/i18n/runtime.tsx +91 -0
- package/dist/vendor/docs-src/plugins/i18n/site-locale.ts +140 -0
- package/dist/vendor/docs-src/search/provider.ts +83 -0
- package/dist/vendor/docs-src/themes/default/components/docs-landing-body.tsx +30 -0
- package/dist/vendor/docs-src/themes/default/components/docs-page-body.tsx +53 -0
- package/dist/vendor/docs-src/themes/default/components/page-actions.tsx +105 -0
- package/dist/vendor/docs-src/themes/default/components/page-header.tsx +31 -0
- package/dist/vendor/docs-src/themes/default/components/sidebar-footer.tsx +21 -0
- package/dist/vendor/docs-src/themes/default/components/sidebar-header.tsx +30 -0
- package/dist/vendor/docs-src/themes/default/components/sidebar-mobile-nav.tsx +33 -0
- package/dist/vendor/docs-src/themes/default/components/sidebar-promo.tsx +37 -0
- package/dist/vendor/docs-src/themes/default/content/breadcrumbs.tsx +43 -0
- package/dist/vendor/docs-src/themes/default/content/pager.tsx +19 -0
- package/dist/vendor/docs-src/themes/default/content/table-of-contents.tsx +32 -0
- package/dist/vendor/docs-src/themes/default/hooks/use-page-copy.ts +29 -0
- package/dist/vendor/docs-src/themes/default/icons.ts +16 -0
- package/dist/vendor/docs-src/themes/default/index.ts +46 -0
- package/dist/vendor/docs-src/themes/default/layout.tsx +176 -0
- package/dist/vendor/docs-src/themes/default/lib/layout-visibility.ts +39 -0
- package/dist/vendor/docs-src/themes/default/navbar.tsx +130 -0
- package/dist/vendor/docs-src/themes/default/navigation/mobile-table-of-contents.tsx +61 -0
- package/dist/vendor/docs-src/themes/default/navigation/sidebar-tree.tsx +202 -0
- package/dist/vendor/docs-src/themes/default/overlays/search-dialog.tsx +106 -0
- package/dist/vendor/docs-src/themes/default/sidebar.tsx +86 -0
- package/dist/vendor/docs-src/themes/index.ts +4 -0
- package/dist/vendor/docs-src/themes/types.ts +87 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +11 -4
- package/dist/server/plugin.js +0 -521
package/dist/client/style.css
CHANGED
|
@@ -7,65 +7,110 @@
|
|
|
7
7
|
|
|
8
8
|
:root {
|
|
9
9
|
--background: oklch(1 0 0);
|
|
10
|
-
--foreground: oklch(0.
|
|
10
|
+
--foreground: oklch(0.13 0.028 261.692);
|
|
11
11
|
--card: oklch(1 0 0);
|
|
12
|
-
--card-foreground: oklch(0.
|
|
12
|
+
--card-foreground: oklch(0.13 0.028 261.692);
|
|
13
13
|
--popover: oklch(1 0 0);
|
|
14
|
-
--popover-foreground: oklch(0.
|
|
15
|
-
--primary: oklch(0.
|
|
16
|
-
--primary-foreground: oklch(0.
|
|
17
|
-
--secondary: oklch(0.
|
|
18
|
-
--secondary-foreground: oklch(0.
|
|
19
|
-
--muted: oklch(0.
|
|
20
|
-
--muted-foreground: oklch(0.
|
|
21
|
-
--accent: oklch(0.
|
|
22
|
-
--accent-foreground: oklch(0.
|
|
14
|
+
--popover-foreground: oklch(0.13 0.028 261.692);
|
|
15
|
+
--primary: oklch(0.60 0.16 230);
|
|
16
|
+
--primary-foreground: oklch(0.9850 0 0);
|
|
17
|
+
--secondary: oklch(0.965 0.007 247.896);
|
|
18
|
+
--secondary-foreground: oklch(0.13 0.028 261.692);
|
|
19
|
+
--muted: oklch(0.965 0.007 247.896);
|
|
20
|
+
--muted-foreground: oklch(0.552 0.016 285.938);
|
|
21
|
+
--accent: oklch(0.965 0.007 247.896);
|
|
22
|
+
--accent-foreground: oklch(0.13 0.028 261.692);
|
|
23
23
|
--destructive: oklch(0.5770 0.2450 27.3250);
|
|
24
24
|
--destructive-foreground: oklch(1 0 0);
|
|
25
|
-
--border: oklch(0.
|
|
26
|
-
--input: oklch(0.
|
|
27
|
-
--ring: oklch(0.
|
|
28
|
-
--
|
|
29
|
-
--
|
|
30
|
-
--
|
|
31
|
-
--
|
|
32
|
-
--
|
|
33
|
-
--sidebar
|
|
34
|
-
--sidebar-
|
|
35
|
-
--sidebar-
|
|
36
|
-
--
|
|
37
|
-
--
|
|
38
|
-
--
|
|
25
|
+
--border: oklch(0.92 0.008 286.32);
|
|
26
|
+
--input: oklch(0.92 0.008 286.32);
|
|
27
|
+
--ring: oklch(0.7 0.015 286.067);
|
|
28
|
+
--chart-1: oklch(0.70 0.16 230);
|
|
29
|
+
--chart-2: oklch(0.60 0.14 210);
|
|
30
|
+
--chart-3: oklch(0.50 0.15 250);
|
|
31
|
+
--chart-4: oklch(0.80 0.10 220);
|
|
32
|
+
--chart-5: oklch(0.40 0.12 240);
|
|
33
|
+
--sidebar: oklch(0.985 0.002 247.839);
|
|
34
|
+
--sidebar-foreground: oklch(0.13 0.028 261.692);
|
|
35
|
+
--sidebar-primary: oklch(0.60 0.16 230);
|
|
36
|
+
--sidebar-primary-foreground: oklch(0.9850 0 0);
|
|
37
|
+
--sidebar-accent: oklch(0.965 0.007 247.896);
|
|
38
|
+
--sidebar-accent-foreground: oklch(0.13 0.028 261.692);
|
|
39
|
+
--sidebar-border: oklch(0.92 0.008 286.32);
|
|
40
|
+
--sidebar-ring: oklch(0.7 0.015 286.067);
|
|
41
|
+
--font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
|
|
42
|
+
--font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
|
|
43
|
+
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
|
44
|
+
--radius: 0.625rem;
|
|
45
|
+
--shadow-x: 0;
|
|
46
|
+
--shadow-y: 1px;
|
|
47
|
+
--shadow-blur: 3px;
|
|
48
|
+
--shadow-spread: 0px;
|
|
49
|
+
--shadow-opacity: 0.1;
|
|
50
|
+
--shadow-color: oklch(0 0 0);
|
|
51
|
+
--shadow-2xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05);
|
|
52
|
+
--shadow-xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05);
|
|
53
|
+
--shadow-sm: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 1px 2px -1px hsl(0 0% 0% / 0.10);
|
|
54
|
+
--shadow: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 1px 2px -1px hsl(0 0% 0% / 0.10);
|
|
55
|
+
--shadow-md: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 2px 4px -1px hsl(0 0% 0% / 0.10);
|
|
56
|
+
--shadow-lg: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 4px 6px -1px hsl(0 0% 0% / 0.10);
|
|
57
|
+
--shadow-xl: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 8px 10px -1px hsl(0 0% 0% / 0.10);
|
|
58
|
+
--shadow-2xl: 0 1px 3px 0px hsl(0 0% 0% / 0.25);
|
|
59
|
+
--tracking-normal: 0em;
|
|
60
|
+
--spacing: 0.25rem;
|
|
39
61
|
}
|
|
40
62
|
|
|
41
63
|
.dark {
|
|
42
|
-
--background: oklch(0.
|
|
43
|
-
--foreground: oklch(0.985 0
|
|
44
|
-
--card: oklch(0.
|
|
45
|
-
--card-foreground: oklch(0.985 0
|
|
46
|
-
--popover: oklch(0.
|
|
47
|
-
--popover-foreground: oklch(0.985 0
|
|
48
|
-
--primary: oklch(0.
|
|
49
|
-
--primary-foreground: oklch(0.
|
|
50
|
-
--secondary: oklch(0.
|
|
51
|
-
--secondary-foreground: oklch(0.985 0
|
|
52
|
-
--muted: oklch(0.
|
|
53
|
-
--muted-foreground: oklch(0.
|
|
54
|
-
--accent: oklch(0.
|
|
55
|
-
--accent-foreground: oklch(0.985 0
|
|
56
|
-
--destructive: oklch(0.
|
|
57
|
-
--destructive-foreground: oklch(0.985 0
|
|
58
|
-
--border: oklch(0.
|
|
59
|
-
--input: oklch(0.
|
|
60
|
-
--ring: oklch(0.
|
|
61
|
-
--
|
|
62
|
-
--
|
|
63
|
-
--
|
|
64
|
-
--
|
|
65
|
-
--
|
|
66
|
-
--sidebar
|
|
67
|
-
--sidebar-
|
|
68
|
-
--sidebar-
|
|
64
|
+
--background: oklch(0.13 0.028 261.692);
|
|
65
|
+
--foreground: oklch(0.985 0.002 247.839);
|
|
66
|
+
--card: oklch(0.18 0.025 261.692);
|
|
67
|
+
--card-foreground: oklch(0.985 0.002 247.839);
|
|
68
|
+
--popover: oklch(0.24 0.025 261.692);
|
|
69
|
+
--popover-foreground: oklch(0.985 0.002 247.839);
|
|
70
|
+
--primary: oklch(0.70 0.14 230);
|
|
71
|
+
--primary-foreground: oklch(0.1450 0 0);
|
|
72
|
+
--secondary: oklch(0.24 0.025 261.692);
|
|
73
|
+
--secondary-foreground: oklch(0.985 0.002 247.839);
|
|
74
|
+
--muted: oklch(0.24 0.025 261.692);
|
|
75
|
+
--muted-foreground: oklch(0.704 0.015 286.067);
|
|
76
|
+
--accent: oklch(0.34 0.025 261.692);
|
|
77
|
+
--accent-foreground: oklch(0.985 0.002 247.839);
|
|
78
|
+
--destructive: oklch(0.7040 0.1910 22.2160);
|
|
79
|
+
--destructive-foreground: oklch(0.985 0.002 247.839);
|
|
80
|
+
--border: oklch(0.27 0.02 261.692);
|
|
81
|
+
--input: oklch(0.32 0.02 261.692);
|
|
82
|
+
--ring: oklch(0.55 0.016 285.938);
|
|
83
|
+
--chart-1: oklch(0.70 0.16 230);
|
|
84
|
+
--chart-2: oklch(0.60 0.14 210);
|
|
85
|
+
--chart-3: oklch(0.50 0.15 250);
|
|
86
|
+
--chart-4: oklch(0.80 0.10 220);
|
|
87
|
+
--chart-5: oklch(0.40 0.12 240);
|
|
88
|
+
--sidebar: oklch(0.18 0.025 261.692);
|
|
89
|
+
--sidebar-foreground: oklch(0.985 0.002 247.839);
|
|
90
|
+
--sidebar-primary: oklch(0.70 0.14 230);
|
|
91
|
+
--sidebar-primary-foreground: oklch(0.1450 0 0);
|
|
92
|
+
--sidebar-accent: oklch(0.24 0.025 261.692);
|
|
93
|
+
--sidebar-accent-foreground: oklch(0.985 0.002 247.839);
|
|
94
|
+
--sidebar-border: oklch(0.27 0.02 261.692);
|
|
95
|
+
--sidebar-ring: oklch(0.55 0.016 285.938);
|
|
96
|
+
--font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
|
|
97
|
+
--font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
|
|
98
|
+
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
|
99
|
+
--radius: 0.625rem;
|
|
100
|
+
--shadow-x: 0;
|
|
101
|
+
--shadow-y: 1px;
|
|
102
|
+
--shadow-blur: 3px;
|
|
103
|
+
--shadow-spread: 0px;
|
|
104
|
+
--shadow-opacity: 0.1;
|
|
105
|
+
--shadow-color: oklch(0 0 0);
|
|
106
|
+
--shadow-2xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05);
|
|
107
|
+
--shadow-xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05);
|
|
108
|
+
--shadow-sm: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 1px 2px -1px hsl(0 0% 0% / 0.10);
|
|
109
|
+
--shadow: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 1px 2px -1px hsl(0 0% 0% / 0.10);
|
|
110
|
+
--shadow-md: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 2px 4px -1px hsl(0 0% 0% / 0.10);
|
|
111
|
+
--shadow-lg: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 4px 6px -1px hsl(0 0% 0% / 0.10);
|
|
112
|
+
--shadow-xl: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 8px 10px -1px hsl(0 0% 0% / 0.10);
|
|
113
|
+
--shadow-2xl: 0 1px 3px 0px hsl(0 0% 0% / 0.25);
|
|
69
114
|
}
|
|
70
115
|
|
|
71
116
|
@theme inline {
|
|
@@ -88,6 +133,11 @@
|
|
|
88
133
|
--color-border: var(--border);
|
|
89
134
|
--color-input: var(--input);
|
|
90
135
|
--color-ring: var(--ring);
|
|
136
|
+
--color-chart-1: var(--chart-1);
|
|
137
|
+
--color-chart-2: var(--chart-2);
|
|
138
|
+
--color-chart-3: var(--chart-3);
|
|
139
|
+
--color-chart-4: var(--chart-4);
|
|
140
|
+
--color-chart-5: var(--chart-5);
|
|
91
141
|
--color-sidebar: var(--sidebar);
|
|
92
142
|
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
93
143
|
--color-sidebar-primary: var(--sidebar-primary);
|
|
@@ -99,26 +149,60 @@
|
|
|
99
149
|
|
|
100
150
|
--font-sans: var(--font-sans);
|
|
101
151
|
--font-mono: var(--font-mono);
|
|
152
|
+
--font-serif: var(--font-serif);
|
|
102
153
|
|
|
103
154
|
--radius-sm: calc(var(--radius) - 4px);
|
|
104
155
|
--radius-md: calc(var(--radius) - 2px);
|
|
105
156
|
--radius-lg: var(--radius);
|
|
106
157
|
--radius-xl: calc(var(--radius) + 4px);
|
|
158
|
+
|
|
159
|
+
--shadow-2xs: var(--shadow-2xs);
|
|
160
|
+
--shadow-xs: var(--shadow-xs);
|
|
161
|
+
--shadow-sm: var(--shadow-sm);
|
|
162
|
+
--shadow: var(--shadow);
|
|
163
|
+
--shadow-md: var(--shadow-md);
|
|
164
|
+
--shadow-lg: var(--shadow-lg);
|
|
165
|
+
--shadow-xl: var(--shadow-xl);
|
|
166
|
+
--shadow-2xl: var(--shadow-2xl);
|
|
107
167
|
}
|
|
108
168
|
|
|
109
169
|
@layer base {
|
|
110
170
|
* {
|
|
111
171
|
border-color: var(--border);
|
|
112
172
|
}
|
|
173
|
+
|
|
174
|
+
* {
|
|
175
|
+
scrollbar-color: color-mix(in oklch, var(--primary) 42%, var(--border)) transparent;
|
|
176
|
+
scrollbar-width: thin;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
*::-webkit-scrollbar {
|
|
180
|
+
width: 6px;
|
|
181
|
+
height: 6px;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
*::-webkit-scrollbar-track {
|
|
185
|
+
background: transparent;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
*::-webkit-scrollbar-thumb {
|
|
189
|
+
background: color-mix(in oklch, var(--primary) 42%, var(--border));
|
|
190
|
+
border: 1px solid transparent;
|
|
191
|
+
border-radius: 999px;
|
|
192
|
+
background-clip: padding-box;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
*::-webkit-scrollbar-thumb:hover {
|
|
196
|
+
background: var(--primary);
|
|
197
|
+
}
|
|
198
|
+
|
|
113
199
|
body {
|
|
114
200
|
background-color: var(--background);
|
|
115
201
|
color: var(--foreground);
|
|
116
|
-
font-family: var(--font-sans);
|
|
117
|
-
min-height: 100vh;
|
|
118
|
-
margin: 0;
|
|
119
202
|
}
|
|
120
203
|
}
|
|
121
204
|
|
|
205
|
+
|
|
122
206
|
/* --- Shiki Syntax Highlighting Dual Theme --- */
|
|
123
207
|
pre.shiki,
|
|
124
208
|
pre.nikala-code-block {
|
|
@@ -2,10 +2,12 @@ import { splitProps, For, Show, } from "solid-js";
|
|
|
2
2
|
import { SectionHeading } from "@/components/ui/section-heading";
|
|
3
3
|
import { Table, TableHeader, TableBody, TableRow, TableHead, TableCell, } from "@/components/ui/table";
|
|
4
4
|
import { cn } from "@/lib/cn";
|
|
5
|
+
import { useSiteLocale } from "../../plugins/i18n/runtime.jsx";
|
|
5
6
|
/**
|
|
6
7
|
* Clean, structured API reference table component composed from Table and Badge primitives.
|
|
7
8
|
*/
|
|
8
9
|
export const ApiTable = (props) => {
|
|
10
|
+
const siteLocale = useSiteLocale();
|
|
9
11
|
const [local, rest] = splitProps(props, [
|
|
10
12
|
"title",
|
|
11
13
|
"description",
|
|
@@ -24,10 +26,10 @@ export const ApiTable = (props) => {
|
|
|
24
26
|
<Table class="text-xs">
|
|
25
27
|
<TableHeader class="bg-muted/40 font-mono text-[11px] uppercase tracking-wider text-muted-foreground select-none">
|
|
26
28
|
<TableRow class="hover:bg-transparent">
|
|
27
|
-
<TableHead class="h-9 px-4 font-semibold">
|
|
28
|
-
<TableHead class="h-9 px-4 font-semibold">
|
|
29
|
-
<TableHead class="h-9 px-4 font-semibold">
|
|
30
|
-
<TableHead class="h-9 px-4 font-semibold">
|
|
29
|
+
<TableHead class="h-9 px-4 font-semibold">{siteLocale.t("apiTable.property")}</TableHead>
|
|
30
|
+
<TableHead class="h-9 px-4 font-semibold">{siteLocale.t("apiTable.type")}</TableHead>
|
|
31
|
+
<TableHead class="h-9 px-4 font-semibold">{siteLocale.t("apiTable.default")}</TableHead>
|
|
32
|
+
<TableHead class="h-9 px-4 font-semibold">{siteLocale.t("apiTable.description")}</TableHead>
|
|
31
33
|
</TableRow>
|
|
32
34
|
</TableHeader>
|
|
33
35
|
<TableBody class="font-mono text-xs">
|
|
@@ -5,6 +5,7 @@ import { Badge } from "@/components/ui/badge";
|
|
|
5
5
|
import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
|
6
6
|
import { Tooltip, TooltipTrigger, TooltipContent } from "@/components/ui/tooltip";
|
|
7
7
|
import { createClipboard } from "@/hooks/create-clipboard";
|
|
8
|
+
import { useSiteLocale } from "../../plugins/i18n/runtime.jsx";
|
|
8
9
|
import { cn } from "@/lib/cn";
|
|
9
10
|
let shikiHighlighterPromise = null;
|
|
10
11
|
async function getShikiHighlighter() {
|
|
@@ -114,6 +115,7 @@ function escapeHtml(str) {
|
|
|
114
115
|
.replace(/'/g, "'");
|
|
115
116
|
}
|
|
116
117
|
export const CodeBlock = (props) => {
|
|
118
|
+
const siteLocale = useSiteLocale();
|
|
117
119
|
const [local, rest] = splitProps(props, [
|
|
118
120
|
"id",
|
|
119
121
|
"code",
|
|
@@ -221,13 +223,13 @@ export const CodeBlock = (props) => {
|
|
|
221
223
|
|
|
222
224
|
<Show when={copyable() && (local.code || cleanCode())}>
|
|
223
225
|
<Tooltip>
|
|
224
|
-
<TooltipTrigger as={Button} variant="ghost" size="icon" onClick={handleCopy} aria-label={clipboard.copied() ? "
|
|
226
|
+
<TooltipTrigger as={Button} variant="ghost" size="icon" onClick={handleCopy} aria-label={clipboard.copied() ? siteLocale.t("code.copied") : siteLocale.t("code.copy")} class="size-6 p-0 rounded-xs text-muted-foreground hover:bg-background hover:text-foreground cursor-pointer">
|
|
225
227
|
<Show when={clipboard.copied()} fallback={<Copy class="size-3.5"/>}>
|
|
226
228
|
<Check class="size-3.5 text-emerald-500 dark:text-emerald-400"/>
|
|
227
229
|
</Show>
|
|
228
230
|
</TooltipTrigger>
|
|
229
231
|
<TooltipContent class="text-[10px] py-1 px-2">
|
|
230
|
-
{clipboard.copied() ? "
|
|
232
|
+
{clipboard.copied() ? siteLocale.t("actions.copied") : siteLocale.t("code.copy")}
|
|
231
233
|
</TooltipContent>
|
|
232
234
|
</Tooltip>
|
|
233
235
|
</Show>
|
|
@@ -238,13 +240,13 @@ export const CodeBlock = (props) => {
|
|
|
238
240
|
<Show when={!hasHeader() && copyable() && (local.code || cleanCode())}>
|
|
239
241
|
<div class="absolute right-2.5 top-2.5 z-10 opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100">
|
|
240
242
|
<Tooltip>
|
|
241
|
-
<TooltipTrigger as={Button} variant="outline" size="icon" onClick={handleCopy} aria-label={clipboard.copied() ? "
|
|
243
|
+
<TooltipTrigger as={Button} variant="outline" size="icon" onClick={handleCopy} aria-label={clipboard.copied() ? siteLocale.t("code.copied") : siteLocale.t("code.copy")} class="size-7 rounded-md border-border/80 bg-background/90 text-muted-foreground backdrop-blur-xs hover:bg-muted hover:text-foreground cursor-pointer shadow-2xs">
|
|
242
244
|
<Show when={clipboard.copied()} fallback={<Copy class="size-3.5"/>}>
|
|
243
245
|
<Check class="size-3.5 text-emerald-500 dark:text-emerald-400"/>
|
|
244
246
|
</Show>
|
|
245
247
|
</TooltipTrigger>
|
|
246
248
|
<TooltipContent class="text-[10px] py-1 px-2">
|
|
247
|
-
|
|
249
|
+
{clipboard.copied() ? siteLocale.t("actions.copied") : siteLocale.t("code.copy")}
|
|
248
250
|
</TooltipContent>
|
|
249
251
|
</Tooltip>
|
|
250
252
|
</div>
|
|
@@ -3,6 +3,7 @@ import { createKeybindings } from "@/hooks/create-keybindings";
|
|
|
3
3
|
import { Dialog } from "@kobalte/core/dialog";
|
|
4
4
|
import { Search, ArrowUp, ArrowDown, CornerDownLeft } from "lucide-solid";
|
|
5
5
|
import { cn } from "@/lib/cn";
|
|
6
|
+
import { useSiteLocale } from "../../plugins/i18n/runtime.jsx";
|
|
6
7
|
import { Kbd, KbdGroup } from "../ui/kbd";
|
|
7
8
|
import { InputGroup, InputGroupInput, InputGroupAddon } from "../ui/input-group";
|
|
8
9
|
import { List, ListGroup, ListHeader, ListItem } from "../ui/list";
|
|
@@ -123,6 +124,7 @@ export const CommandDialog = (props) => {
|
|
|
123
124
|
export const CommandInput = (props) => {
|
|
124
125
|
const [local, rest] = splitProps(props, ["class", "value", "onInput"]);
|
|
125
126
|
const { search, setSearch } = useCommand();
|
|
127
|
+
const siteLocale = useSiteLocale();
|
|
126
128
|
return (<InputGroup class="border-0 border-b border-border rounded-none bg-transparent px-3 py-1 shadow-none focus-within:ring-0 focus-within:border-border">
|
|
127
129
|
<InputGroupAddon align="inline-start">
|
|
128
130
|
<Search class="w-4 h-4 text-muted-foreground"/>
|
|
@@ -133,7 +135,7 @@ export const CommandInput = (props) => {
|
|
|
133
135
|
if (typeof local.onInput === "function") {
|
|
134
136
|
local.onInput(e);
|
|
135
137
|
}
|
|
136
|
-
}} placeholder="
|
|
138
|
+
}} placeholder={siteLocale.t("search.commandPlaceholder")} class="h-11 text-base sm:text-sm font-medium" {...rest}/>
|
|
137
139
|
</InputGroup>);
|
|
138
140
|
};
|
|
139
141
|
export const CommandList = (props) => {
|
|
@@ -145,9 +147,10 @@ export const CommandList = (props) => {
|
|
|
145
147
|
export const CommandEmpty = (props) => {
|
|
146
148
|
const [local, rest] = splitProps(props, ["class", "children"]);
|
|
147
149
|
const { search } = useCommand();
|
|
150
|
+
const siteLocale = useSiteLocale();
|
|
148
151
|
return (<Show when={search().trim().length > 0}>
|
|
149
152
|
<div class={cn("py-8 text-center text-sm text-muted-foreground font-medium select-none", local.class)} {...rest}>
|
|
150
|
-
{local.children ||
|
|
153
|
+
{local.children || siteLocale.t("search.noResults", { query: search() })}
|
|
151
154
|
</div>
|
|
152
155
|
</Show>);
|
|
153
156
|
};
|
|
@@ -197,6 +200,7 @@ export const CommandItem = (props) => {
|
|
|
197
200
|
};
|
|
198
201
|
export const CommandFooter = (props) => {
|
|
199
202
|
const [local, rest] = splitProps(props, ["class", "children"]);
|
|
203
|
+
const siteLocale = useSiteLocale();
|
|
200
204
|
return (<div class={cn("flex items-center justify-between border-t border-border bg-muted/30 px-3 py-2 text-xs text-muted-foreground select-none", local.class)} {...rest}>
|
|
201
205
|
<div class="flex items-center gap-3">
|
|
202
206
|
<span class="flex items-center gap-1">
|
|
@@ -204,17 +208,17 @@ export const CommandFooter = (props) => {
|
|
|
204
208
|
<Kbd size="sm"><ArrowUp class="w-2.5 h-2.5"/></Kbd>
|
|
205
209
|
<Kbd size="sm"><ArrowDown class="w-2.5 h-2.5"/></Kbd>
|
|
206
210
|
</KbdGroup>
|
|
207
|
-
<span>
|
|
211
|
+
<span>{siteLocale.t("command.navigate")}</span>
|
|
208
212
|
</span>
|
|
209
213
|
|
|
210
214
|
<span class="flex items-center gap-1">
|
|
211
215
|
<Kbd size="sm"><CornerDownLeft class="w-2.5 h-2.5"/></Kbd>
|
|
212
|
-
<span>
|
|
216
|
+
<span>{siteLocale.t("command.select")}</span>
|
|
213
217
|
</span>
|
|
214
218
|
|
|
215
219
|
<span class="flex items-center gap-1">
|
|
216
220
|
<Kbd size="sm">Esc</Kbd>
|
|
217
|
-
<span>
|
|
221
|
+
<span>{siteLocale.t("command.close")}</span>
|
|
218
222
|
</span>
|
|
219
223
|
</div>
|
|
220
224
|
|
|
@@ -4,6 +4,7 @@ import { Dynamic } from "solid-js/web";
|
|
|
4
4
|
import { cva } from "class-variance-authority";
|
|
5
5
|
import { ChevronRight } from "lucide-solid";
|
|
6
6
|
import { cn } from "@/lib/cn";
|
|
7
|
+
import { useSiteLocale } from "../../plugins/i18n/runtime.jsx";
|
|
7
8
|
export const List = (props) => {
|
|
8
9
|
const [local, rest] = splitProps(props, ["class", "children"]);
|
|
9
10
|
return (<div role="list" class={cn("flex flex-col gap-1 w-full p-1", local.class)} {...rest}>
|
|
@@ -67,11 +68,12 @@ export const ListItem = (props) => {
|
|
|
67
68
|
"class",
|
|
68
69
|
"children",
|
|
69
70
|
]);
|
|
71
|
+
const siteLocale = useSiteLocale();
|
|
70
72
|
const content = () => (<>
|
|
71
73
|
{/* Left Visual: Icon, Avatar, or Image */}
|
|
72
74
|
<div class="flex items-center gap-2.5 min-w-0">
|
|
73
75
|
<Show when={local.avatar}>
|
|
74
|
-
<img src={local.avatar} alt={local.title || "
|
|
76
|
+
<img src={local.avatar} alt={local.title || siteLocale.t("image.avatar")} class="w-10 h-10 rounded-lg object-cover shrink-0 border border-border"/>
|
|
75
77
|
</Show>
|
|
76
78
|
|
|
77
79
|
<Show when={!local.avatar && local.avatarFallback}>
|
|
@@ -3,6 +3,9 @@ export interface LogoProps extends JSX.SvgSVGAttributes<SVGSVGElement> {
|
|
|
3
3
|
class?: string;
|
|
4
4
|
}
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Folio mark with a theme-aware accent fill.
|
|
7
|
+
*
|
|
8
|
+
* The paths intentionally use currentColor so the mark follows the
|
|
9
|
+
* consuming project's primary theme token instead of a fixed brand color.
|
|
7
10
|
*/
|
|
8
11
|
export declare const Logo: Component<LogoProps>;
|
|
@@ -1,30 +1,16 @@
|
|
|
1
1
|
import { splitProps } from "solid-js";
|
|
2
2
|
import { cn } from "@/lib/cn";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Folio mark with a theme-aware accent fill.
|
|
5
|
+
*
|
|
6
|
+
* The paths intentionally use currentColor so the mark follows the
|
|
7
|
+
* consuming project's primary theme token instead of a fixed brand color.
|
|
5
8
|
*/
|
|
6
9
|
export const Logo = (props) => {
|
|
7
10
|
const [local, rest] = splitProps(props, ["class"]);
|
|
8
|
-
return (<svg viewBox="0 0
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
<g clip-path="url(#nikala-logo-clip1)">
|
|
13
|
-
{/* Paintbrush Vector Paths Adapting to --primary-foreground */}
|
|
14
|
-
<path d="M304.406 364.173C303.147 366.03 301.738 366.903 299.847 368.109C299.093 368.594 298.339 369.08 297.563 369.58C296.746 370.096 295.929 370.613 295.087 371.145C294.245 371.684 293.402 372.224 292.56 372.764C290.346 374.183 288.127 375.594 285.907 377.003C283.642 378.443 281.381 379.891 279.119 381.338C274.684 384.175 270.243 387.003 265.799 389.826C263.196 387.86 261.543 385.492 259.734 382.813C257.432 379.465 255.089 376.207 252.52 373.055C249.122 368.864 246.081 364.457 243.017 360.02C240.337 356.141 237.507 352.385 234.645 348.639C233.944 347.722 233.244 346.804 232.544 345.886C232.19 345.421 231.836 344.956 231.471 344.477C228.856 341.031 226.35 337.519 223.876 333.97C222.068 331.395 220.171 328.922 218.188 326.48C214.782 322.267 211.726 317.844 208.65 313.389C205.969 309.51 203.14 305.755 200.277 302.009C199.577 301.091 198.877 300.173 198.177 299.255C197.823 298.79 197.468 298.326 197.103 297.847C194.79 294.798 192.553 291.706 190.364 288.567C188.267 285.56 186.094 282.644 183.786 279.794C179.935 275.035 176.476 270.016 173.005 264.978C176.445 262.305 179.941 259.802 183.612 257.457C184.099 257.143 184.587 256.829 185.089 256.505C186.679 255.481 188.271 254.461 189.863 253.441C190.975 252.726 192.086 252.011 193.197 251.296C196.106 249.425 199.016 247.557 201.927 245.689C204.903 243.779 207.878 241.866 210.853 239.953C216.678 236.208 222.505 232.466 228.333 228.726C230.86 230.623 232.252 232.791 233.788 235.512C234.053 235.974 234.319 236.435 234.592 236.911C236.235 239.797 237.775 242.723 239.261 245.694C241.392 249.953 243.79 254.007 246.245 258.083C248.04 261.081 249.715 264.098 251.272 267.229C253.667 272.041 256.413 276.612 259.173 281.219C261.596 285.264 263.845 289.394 266.071 293.549C266.617 294.566 267.163 295.584 267.709 296.601C267.986 297.115 268.262 297.63 268.547 298.161C270.366 301.528 272.256 304.843 274.208 308.135C276.068 311.27 277.812 314.435 279.438 317.698C281.864 322.542 284.628 327.154 287.41 331.798C289.839 335.853 292.092 339.995 294.328 344.159C294.597 344.658 294.866 345.158 295.143 345.673C295.7 346.71 296.256 347.748 296.81 348.786C298.15 351.28 299.518 353.74 300.998 356.154C301.259 356.583 301.519 357.012 301.788 357.454C302.503 358.619 303.23 359.775 303.958 360.931C304.8 362.85 304.8 362.85 304.406 364.173Z" fill="var(--primary-foreground, #ffffff)"/>
|
|
15
|
-
<path d="M147.908 159.434C143.029 162.624 138.255 165.222 132.524 166.53C131.568 166.759 131.568 166.759 130.593 166.992C117.641 169.419 104.681 165.652 93.8424 158.557C84.6301 151.709 78.5873 142.443 75.2903 131.528C75.0234 130.675 75.0234 130.675 74.7511 129.804C72.9741 122.986 73.9008 115.665 74.4194 108.713C75.7267 91.1539 72.9686 78.0313 62.8484 63.365C61.808 61.5353 61.808 61.5353 62.2756 59.3756C74.2777 52.1095 87.8993 50.9005 101.359 53.9904C102.212 54.1829 103.066 54.3753 103.945 54.5736C110.197 56.0433 115.833 57.7788 121.484 60.8918C121.926 61.1331 122.368 61.3745 122.823 61.6232C141.727 72.123 158.382 89.1592 164.804 110.159C170.072 129.189 164.608 147.982 147.908 159.434Z" fill="var(--primary-foreground, #ffffff)"/>
|
|
16
|
-
<path d="M224.945 222.724C223.467 224.948 221.157 226.154 218.937 227.554C218.142 228.066 218.142 228.067 217.331 228.589C215.58 229.716 213.822 230.833 212.065 231.95C210.849 232.73 209.634 233.51 208.418 234.291C205.22 236.344 202.016 238.389 198.811 240.432C195.542 242.519 192.277 244.613 189.012 246.706C182.605 250.813 176.192 254.911 169.776 259.003C163.425 254.055 159.038 246.461 154.501 239.887C151.859 236.063 149.162 232.301 146.129 228.777C140.59 220.962 138.709 211.47 139.907 202.042C141.806 192.774 145.937 185.415 153.125 179.281C153.821 178.654 154.516 178.028 155.232 177.382C161.199 173.349 167.362 171.636 174.492 171.096C175.187 171.029 175.187 171.029 175.896 170.961C185.36 171.183 194.837 174.7 201.562 181.385C202.406 182.334 203.235 183.298 204.044 184.277C204.596 184.933 204.596 184.933 205.159 185.602C207.879 189.006 209.907 192.696 211.94 196.538C212.966 198.458 213.996 200.376 215.027 202.293C215.301 202.803 215.574 203.312 215.856 203.837C218.216 208.207 220.709 212.489 223.254 216.754C225.579 220.827 225.579 220.827 224.945 222.724Z" fill="var(--primary-foreground, #ffffff)"/>
|
|
17
|
-
<path d="M346.445 469.84C341.579 473.016 337.792 473.996 331.992 473.069C323.666 471.041 319.697 464.544 315.142 457.786C314.41 456.773 313.671 455.764 312.923 454.762C312.555 454.269 312.187 453.775 311.808 453.267C310.744 451.858 309.676 450.454 308.605 449.052C304.588 443.792 300.674 438.482 296.873 433.064C294.268 429.365 291.554 425.754 288.807 422.16C288.108 421.244 287.41 420.328 286.711 419.412C286.181 418.717 286.181 418.717 285.639 418.007C283.312 414.94 281.064 411.828 278.863 408.669C275.954 404.511 272.86 400.557 269.591 396.676C270.596 393.987 272.077 392.99 274.463 391.469C275.568 390.758 275.568 390.758 276.694 390.032C277.891 389.276 277.891 389.276 279.111 388.505C279.926 387.983 280.74 387.461 281.58 386.923C283.742 385.538 285.909 384.16 288.077 382.784C290.29 381.378 292.498 379.965 294.707 378.552C299.039 375.782 303.376 373.02 307.716 370.264C310.189 371.73 310.549 372.854 311.779 375.43C313.714 379.343 315.815 383.09 318.072 386.826C320.626 391.064 322.954 395.349 325.158 399.782C326.672 402.673 328.329 405.458 330.013 408.252C332.566 412.491 334.894 416.776 337.098 421.209C338.613 424.099 340.27 426.884 341.953 429.678C344.974 434.704 347.722 439.785 350.305 445.052C350.628 445.646 350.95 446.239 351.282 446.851C355.467 454.895 353.749 464.19 346.445 469.84Z" fill="var(--primary-foreground, #ffffff)"/>
|
|
18
|
-
<path d="M175.175 164.461C174.611 164.495 174.047 164.529 173.466 164.565C161.822 165.517 151.451 170.117 143.632 178.98C141.188 182.058 138.963 185.278 136.798 188.557C134.916 187.16 133.636 185.817 132.364 183.853C132.04 183.352 131.717 182.852 131.383 182.336C131.053 181.817 130.724 181.297 130.384 180.762C130.043 180.241 129.703 179.719 129.351 179.182C129.031 178.682 128.711 178.182 128.381 177.668C128.089 177.211 127.796 176.755 127.495 176.285C126.898 175.109 126.898 175.109 127.21 173.669C127.885 173.594 127.885 173.594 128.573 173.517C144.325 171.353 156.368 162.585 166.151 150.449C168.977 152.315 170.506 155.002 172.283 157.806C172.597 158.285 172.911 158.765 173.234 159.26C175.527 162.839 175.527 162.839 175.175 164.461Z" fill="var(--primary-foreground, #ffffff)"/>
|
|
19
|
-
</g>
|
|
20
|
-
</g>
|
|
21
|
-
<defs>
|
|
22
|
-
<clipPath id="nikala-logo-clip0">
|
|
23
|
-
<rect width="223" height="223" rx="10" fill="white"/>
|
|
24
|
-
</clipPath>
|
|
25
|
-
<clipPath id="nikala-logo-clip1">
|
|
26
|
-
<rect width="377.121" height="377.121" fill="white" transform="translate(431.932 116.81) rotate(102.218)"/>
|
|
27
|
-
</clipPath>
|
|
28
|
-
</defs>
|
|
11
|
+
return (<svg viewBox="0 0 111 134" fill="none" xmlns="http://www.w3.org/2000/svg" class={cn("h-7 w-auto shrink-0 select-none text-primary", local.class)} {...rest}>
|
|
12
|
+
<path d="M36.1777 0.00543119C36.9886 0.00499311 37.7994 0.00455503 38.6349 0.00410368C41.2808 0.00617229 43.9262 0.0294108 46.572 0.0530386C48.42 0.0586414 50.268 0.0629083 52.1161 0.0659018C56.9543 0.0772964 61.7923 0.106717 66.6305 0.140014C71.5778 0.170831 76.5251 0.184432 81.4724 0.199523C91.1607 0.231592 100.849 0.282723 110.537 0.346007C110.61 3.53599 110.654 6.72575 110.693 9.91632C110.725 11.2608 110.725 11.2608 110.757 12.6324C110.828 20.4476 109.466 26.0515 104.537 32.346C98.5344 38.2899 92.6817 40.5932 84.2432 40.6014C83.527 40.605 82.8108 40.6086 82.0729 40.6124C80.5233 40.6192 78.9737 40.6218 77.4242 40.6204C74.9635 40.6194 72.503 40.6324 70.0426 40.6494C63.0485 40.6955 56.0544 40.7202 49.06 40.7269C44.7747 40.7319 40.4898 40.7563 36.2046 40.7922C34.5801 40.8019 32.9555 40.8044 31.331 40.799C19.2921 40.7614 9.61779 41.743 0.536854 50.346C0.448685 46.7003 0.396074 43.0549 0.349354 39.4085C0.324217 38.3869 0.29908 37.3653 0.273182 36.3128C0.173253 25.8869 2.62732 17.3394 9.53685 9.34601C17.2641 2.66649 26.0794 -0.141013 36.1777 0.00543119Z" fill="currentColor"/>
|
|
13
|
+
<path d="M22.0491 48.169C22.9608 48.1562 23.8728 48.1434 24.8118 48.1301C26.2884 48.119 26.2884 48.119 27.7947 48.1077C28.8123 48.0997 29.83 48.0916 30.8784 48.0833C33.0354 48.0694 35.1924 48.0587 37.3494 48.0509C40.6285 48.0337 43.9065 47.9898 47.1853 47.9456C49.2843 47.9355 51.3833 47.927 53.4822 47.9202C54.4544 47.9027 55.4266 47.8852 56.4283 47.8672C63.3556 47.889 69.7844 49.012 75.1263 53.7582C79.2822 58.4605 81.032 62.8674 80.8533 69.1585C80.0862 74.4616 77.9359 78.9471 74.1619 82.721C73.2957 83.2573 72.4295 83.7935 71.5369 84.346C70.7322 84.8676 69.9275 85.3892 69.0984 85.9266C64.0178 87.9514 59.3464 87.7288 53.9275 87.682C51.6228 87.6945 49.3182 87.7075 47.0135 87.721C43.4017 87.7249 39.7902 87.721 36.1785 87.7064C32.6778 87.6978 29.1782 87.7196 25.6775 87.7445C24.6105 87.7311 23.5435 87.7178 22.4442 87.704C13.6607 87.7897 7.75397 90.5347 0.536912 95.346C0.386963 91.1144 0.278963 86.8842 0.207322 82.6507C0.177416 81.2152 0.136674 79.7799 0.0842755 78.345C-0.242774 69.1492 0.0895104 61.5914 6.53691 54.346C11.3525 50.524 15.8247 48.2455 22.0491 48.169Z" fill="currentColor"/>
|
|
14
|
+
<path d="M20.8612 95.2484C21.8892 95.2516 22.9173 95.2548 23.9764 95.2581C25.5842 95.2707 25.5842 95.2707 27.2245 95.2835C28.3079 95.288 29.3912 95.2926 30.5077 95.2972C33.1842 95.309 35.8606 95.3255 38.537 95.346C38.6543 99.0124 38.7246 102.678 38.787 106.346C38.8205 107.376 38.854 108.406 38.8885 109.467C38.9806 116.694 38.1397 122.373 33.1595 127.865C28.2702 132.292 23.1029 133.85 16.5526 133.662C10.763 132.754 6.1827 128.721 2.53699 124.346C0.114874 119.156 -0.478718 113.766 1.15417 108.268C3.56015 102.689 7.36624 99.4145 12.537 96.346C15.5962 95.3263 17.6612 95.2307 20.8612 95.2484Z" fill="currentColor"/>
|
|
29
15
|
</svg>);
|
|
30
16
|
};
|
|
@@ -4,6 +4,7 @@ import { Button } from "@/components/ui/button";
|
|
|
4
4
|
import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
|
5
5
|
import { Tooltip, TooltipTrigger, TooltipContent } from "@/components/ui/tooltip";
|
|
6
6
|
import { createClipboard } from "@/hooks/create-clipboard";
|
|
7
|
+
import { useSiteLocale } from "../../plugins/i18n/runtime.jsx";
|
|
7
8
|
import { cn } from "@/lib/cn";
|
|
8
9
|
/**
|
|
9
10
|
* Automatically formats a command string for a specific package manager.
|
|
@@ -125,6 +126,7 @@ export const PackageManagerTabs = (props) => {
|
|
|
125
126
|
return "";
|
|
126
127
|
});
|
|
127
128
|
const clipboard = createClipboard();
|
|
129
|
+
const siteLocale = useSiteLocale();
|
|
128
130
|
const copyable = () => local.copyable ?? true;
|
|
129
131
|
const handleCopy = async () => {
|
|
130
132
|
const text = currentCommand();
|
|
@@ -149,13 +151,13 @@ export const PackageManagerTabs = (props) => {
|
|
|
149
151
|
{/* Copy Button */}
|
|
150
152
|
<Show when={copyable() && currentCommand()}>
|
|
151
153
|
<Tooltip>
|
|
152
|
-
<TooltipTrigger as={Button} variant="ghost" size="icon" onClick={handleCopy} aria-label={clipboard.copied() ? "
|
|
154
|
+
<TooltipTrigger as={Button} variant="ghost" size="icon" onClick={handleCopy} aria-label={clipboard.copied() ? siteLocale.t("code.copied") : siteLocale.t("code.copy")} class="size-6 p-0 rounded-xs text-muted-foreground hover:bg-background hover:text-foreground cursor-pointer">
|
|
153
155
|
<Show when={clipboard.copied()} fallback={<Copy class="size-3.5"/>}>
|
|
154
156
|
<Check class="size-3.5 text-emerald-500 dark:text-emerald-400"/>
|
|
155
157
|
</Show>
|
|
156
158
|
</TooltipTrigger>
|
|
157
159
|
<TooltipContent class="text-[10px] py-1 px-2">
|
|
158
|
-
{clipboard.copied() ? "
|
|
160
|
+
{clipboard.copied() ? siteLocale.t("actions.copied") : siteLocale.t("code.copy")}
|
|
159
161
|
</TooltipContent>
|
|
160
162
|
</Tooltip>
|
|
161
163
|
</Show>
|
|
@@ -2,11 +2,13 @@ import { splitProps, Show, children } from "solid-js";
|
|
|
2
2
|
import { ChevronLeft, ChevronRight } from "lucide-solid";
|
|
3
3
|
import { Card, CardHeader, CardTitle, CardDescription, } from "@/components/ui/card";
|
|
4
4
|
import { cn } from "@/lib/cn";
|
|
5
|
+
import { useSiteLocale } from "../../plugins/i18n/runtime.jsx";
|
|
5
6
|
/**
|
|
6
7
|
* Individual Next or Previous page navigation card.
|
|
7
8
|
*/
|
|
8
9
|
export const PagerLink = (props) => {
|
|
9
10
|
const [local, rest] = splitProps(props, ["title", "href", "type", "class"]);
|
|
11
|
+
const siteLocale = useSiteLocale();
|
|
10
12
|
const isNext = () => local.type === "next";
|
|
11
13
|
return (<a href={local.href} class={cn("group block rounded-lg transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring", isNext() && "sm:col-start-2", local.class)} {...rest}>
|
|
12
14
|
<Card class="h-full transition-all group-hover:bg-accent/40 group-hover:shadow-2xs">
|
|
@@ -14,10 +16,10 @@ export const PagerLink = (props) => {
|
|
|
14
16
|
<CardDescription class="flex items-center gap-1 text-xs font-medium text-muted-foreground">
|
|
15
17
|
<Show when={!isNext()}>
|
|
16
18
|
<ChevronLeft class="size-3.5 transition-transform group-hover:-translate-x-0.5"/>
|
|
17
|
-
<span>
|
|
19
|
+
<span>{siteLocale.t("pagination.previous")}</span>
|
|
18
20
|
</Show>
|
|
19
21
|
<Show when={isNext()}>
|
|
20
|
-
<span>
|
|
22
|
+
<span>{siteLocale.t("pagination.next")}</span>
|
|
21
23
|
<ChevronRight class="size-3.5 transition-transform group-hover:translate-x-0.5"/>
|
|
22
24
|
</Show>
|
|
23
25
|
</CardDescription>
|
|
@@ -42,7 +42,7 @@ export const SectionHeading = (props) => {
|
|
|
42
42
|
]);
|
|
43
43
|
const v = () => local.variant || "section";
|
|
44
44
|
return (<div class={cn("space-y-2", local.class)} {...rest}>
|
|
45
|
-
<div class={cn("flex
|
|
45
|
+
<div class={cn("flex justify-between gap-2", v() === "page" ? "flex-col items-start sm:flex-row sm:items-center" : "items-center", v() === "section" && "w-full")}>
|
|
46
46
|
<div class="flex min-w-0 items-center gap-2">
|
|
47
47
|
<Show when={v() === "page"}>
|
|
48
48
|
<h1 class={headingVariants({ variant: v() })}>
|
|
@@ -5,6 +5,7 @@ import { Tooltip, TooltipTrigger, TooltipContent } from "@/components/ui/tooltip
|
|
|
5
5
|
import { Skeleton } from "@/components/ui/skeleton";
|
|
6
6
|
import { Separator } from "@/components/ui/separator";
|
|
7
7
|
import { cn } from "@/lib/cn";
|
|
8
|
+
import { useSiteLocale } from "../../plugins/i18n/runtime.jsx";
|
|
8
9
|
/* --- Constants --- */
|
|
9
10
|
const SIDEBAR_COOKIE_NAME = "nikala_sidebar_state";
|
|
10
11
|
const SIDEBAR_WIDTH = "17rem";
|
|
@@ -140,7 +141,8 @@ export const Sidebar = (props) => {
|
|
|
140
141
|
export const SidebarTrigger = (props) => {
|
|
141
142
|
const [local, rest] = splitProps(props, ["class", "onClick"]);
|
|
142
143
|
const { toggleSidebar, side, isMobile, openMobile, setOpenMobile } = useSidebar();
|
|
143
|
-
|
|
144
|
+
const siteLocale = useSiteLocale();
|
|
145
|
+
return (<button type="button" aria-label={siteLocale.t("navigation.sidebar")} onClick={(e) => {
|
|
144
146
|
if (typeof local.onClick === "function")
|
|
145
147
|
local.onClick(e);
|
|
146
148
|
if (isMobile())
|
|
@@ -151,13 +153,14 @@ export const SidebarTrigger = (props) => {
|
|
|
151
153
|
<Show when={side() === "right"} fallback={<PanelLeft class="size-4"/>}>
|
|
152
154
|
<PanelRight class="size-4"/>
|
|
153
155
|
</Show>
|
|
154
|
-
<span class="sr-only">
|
|
156
|
+
<span class="sr-only">{siteLocale.t("navigation.sidebar")}</span>
|
|
155
157
|
</button>);
|
|
156
158
|
};
|
|
157
159
|
export const SidebarRail = (props) => {
|
|
158
160
|
const [local, rest] = splitProps(props, ["class"]);
|
|
159
161
|
const { toggleSidebar } = useSidebar();
|
|
160
|
-
|
|
162
|
+
const siteLocale = useSiteLocale();
|
|
163
|
+
return (<button type="button" data-sidebar="rail" aria-label={siteLocale.t("navigation.toggleSidebarRail")} tabIndex={-1} onClick={toggleSidebar} title={siteLocale.t("navigation.sidebar")} class={cn("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex cursor-w-resize", local.class)} {...rest}/>);
|
|
161
164
|
};
|
|
162
165
|
export const SidebarInset = (props) => {
|
|
163
166
|
const [local, rest] = splitProps(props, ["class", "children"]);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { splitProps } from "solid-js";
|
|
2
2
|
import { cva } from "class-variance-authority";
|
|
3
3
|
import { cn } from "@/lib/cn";
|
|
4
|
+
import { useSiteLocale } from "../../plugins/i18n/runtime.jsx";
|
|
4
5
|
export const spinnerVariants = cva("inline-block animate-spin rounded-lg border-2 border-current border-r-transparent text-primary", {
|
|
5
6
|
variants: {
|
|
6
7
|
size: {
|
|
@@ -16,5 +17,6 @@ export const spinnerVariants = cva("inline-block animate-spin rounded-lg border-
|
|
|
16
17
|
/** A compact, accessible loading indicator for async UI states. */
|
|
17
18
|
export const Spinner = (props) => {
|
|
18
19
|
const [local, rest] = splitProps(props, ["size", "label", "class"]);
|
|
19
|
-
|
|
20
|
+
const siteLocale = useSiteLocale();
|
|
21
|
+
return (<span role="status" aria-label={local.label || siteLocale.t("status.loadingLabel")} class={cn(spinnerVariants({ size: local.size }), local.class)} {...rest}/>);
|
|
20
22
|
};
|