@umami/shiso 0.55.0 → 0.61.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +9 -49
  3. package/bin/shiso.mjs +132 -0
  4. package/docs.schema.json +835 -0
  5. package/mdx.config.ts +143 -0
  6. package/package.json +73 -83
  7. package/scripts/check-package.mjs +18 -0
  8. package/scripts/generate-icon-registry.mjs +196 -0
  9. package/scripts/generate-last-modified.mjs +128 -0
  10. package/scripts/generate-search-index.mjs +252 -0
  11. package/scripts/load-docs-config.mjs +244 -0
  12. package/scripts/prerender.mjs +187 -0
  13. package/scripts/validate-config.mjs +104 -0
  14. package/scripts/vite-docs-config.mjs +60 -0
  15. package/src/App.tsx +39 -0
  16. package/src/components/Banner.tsx +69 -0
  17. package/src/components/CodeBlock.tsx +46 -0
  18. package/src/components/ConfiguredIcon.tsx +15 -0
  19. package/src/components/ContextualMenu.tsx +93 -0
  20. package/src/components/DocContent.tsx +100 -0
  21. package/src/components/Docs.tsx +126 -0
  22. package/src/components/Footer.tsx +84 -0
  23. package/src/components/Header.tsx +72 -0
  24. package/src/components/Layout.tsx +16 -0
  25. package/src/components/PageLinks.tsx +71 -0
  26. package/src/components/Search.tsx +208 -0
  27. package/src/components/SideNav.tsx +347 -0
  28. package/src/components/SocialIcon.tsx +88 -0
  29. package/src/components/ThemeToggle.tsx +34 -0
  30. package/src/components/TopNav.tsx +127 -0
  31. package/src/components/docs/Accordion.tsx +68 -0
  32. package/src/components/docs/Badge.tsx +171 -0
  33. package/src/components/docs/Callout.tsx +73 -0
  34. package/src/components/docs/Card.tsx +158 -0
  35. package/src/components/docs/CodeGroup.tsx +73 -0
  36. package/src/components/docs/Columns.tsx +20 -0
  37. package/src/components/docs/Expandable.tsx +28 -0
  38. package/src/components/docs/Frame.tsx +56 -0
  39. package/src/components/docs/Icon.tsx +30 -0
  40. package/src/components/docs/ParamField.tsx +45 -0
  41. package/src/components/docs/PropertiesTable.tsx +84 -0
  42. package/src/components/docs/ResponseField.tsx +36 -0
  43. package/src/components/docs/Steps.tsx +47 -0
  44. package/src/components/docs/Tabs.tsx +116 -0
  45. package/src/components/docs/Tooltip.tsx +21 -0
  46. package/src/components/docs/index.ts +15 -0
  47. package/src/components/docs/styles.ts +82 -0
  48. package/src/components/docs/utils.ts +118 -0
  49. package/src/components/icons/index.ts +17 -0
  50. package/src/components/ui/accordion.tsx +69 -0
  51. package/src/components/ui/alert.tsx +69 -0
  52. package/src/components/ui/badge.tsx +49 -0
  53. package/src/components/ui/button.tsx +58 -0
  54. package/src/components/ui/card.tsx +88 -0
  55. package/src/components/ui/collapsible.tsx +15 -0
  56. package/src/components/ui/command.tsx +173 -0
  57. package/src/components/ui/dialog.tsx +137 -0
  58. package/src/components/ui/dropdown-menu.tsx +257 -0
  59. package/src/components/ui/scroll-area.tsx +71 -0
  60. package/src/components/ui/sheet.tsx +124 -0
  61. package/src/components/ui/tabs.tsx +73 -0
  62. package/src/components/ui/tooltip.tsx +52 -0
  63. package/src/declarations.d.ts +9 -0
  64. package/src/entry-client.tsx +17 -0
  65. package/src/entry-server.tsx +77 -0
  66. package/src/generated/last-modified.ts +2 -0
  67. package/src/lib/content.ts +44 -0
  68. package/src/lib/docs-config.ts +682 -0
  69. package/src/lib/head.ts +220 -0
  70. package/src/lib/icon-registry.generated.ts +4 -0
  71. package/src/lib/icons.ts +29 -0
  72. package/src/lib/inline-markdown.tsx +86 -0
  73. package/src/lib/mdast.ts +56 -0
  74. package/src/lib/paths.ts +86 -0
  75. package/src/lib/remark-toc.ts +71 -0
  76. package/src/lib/search/config.ts +43 -0
  77. package/src/lib/search/provider.ts +80 -0
  78. package/src/lib/search/providers/local.ts +15 -0
  79. package/src/lib/search-index.generated.ts +4 -0
  80. package/src/lib/search.ts +100 -0
  81. package/src/lib/site-config.ts +104 -0
  82. package/src/lib/site-model.ts +221 -0
  83. package/src/lib/slug.ts +38 -0
  84. package/src/lib/types.ts +478 -0
  85. package/src/lib/utils.ts +6 -0
  86. package/src/pages/DocPage.tsx +33 -0
  87. package/src/styles/global.css +268 -0
  88. package/src/styles/tokens.css +114 -0
  89. package/types/client.d.ts +3 -0
  90. package/types/search.d.ts +17 -0
  91. package/vite.config.ts +342 -0
  92. package/LICENSE +0 -21
  93. package/dist/index.css +0 -189
  94. package/dist/index.d.ts +0 -57
  95. package/dist/index.js +0 -464
  96. package/dist/index.mjs +0 -437
  97. package/server/index.d.ts +0 -30
  98. package/server/index.js +0 -189
  99. package/styles.css +0 -4766
package/vite.config.ts ADDED
@@ -0,0 +1,342 @@
1
+ import path from 'node:path';
2
+ import { fileURLToPath } from 'node:url';
3
+ import tailwindcss from '@tailwindcss/vite';
4
+ import react from '@vitejs/plugin-react';
5
+ import { defineConfig, type Plugin } from 'vite';
6
+ import { shisoMdx } from './mdx.config.ts';
7
+ import { generateIconRegistry } from './scripts/generate-icon-registry.mjs';
8
+ import { shisoLastModified } from './scripts/generate-last-modified.mjs';
9
+ import { generateSearchIndex } from './scripts/generate-search-index.mjs';
10
+ import { createDocsConfigModule } from './scripts/vite-docs-config.mjs';
11
+ import type { DocsConfig } from './src/lib/types.ts';
12
+
13
+ /**
14
+ * Keeps src/lib/icon-registry.generated.ts in sync with the `icon="name"` values
15
+ * used in content, so string icon names resolve without bundling all of lucide.
16
+ */
17
+ function shisoIconRegistry(getDocsConfig: () => DocsConfig, root: string, output: string): Plugin {
18
+ return {
19
+ name: 'shiso-icon-registry',
20
+ async buildStart() {
21
+ const { unknown } = await generateIconRegistry({ config: getDocsConfig(), root, output });
22
+
23
+ if (unknown.length) {
24
+ this.warn(`Unknown icon names (not in lucide): ${unknown.join(', ')}`);
25
+ }
26
+ },
27
+ async handleHotUpdate({ file }) {
28
+ if (/\.(md|mdx|tsx)$/.test(file) || file.endsWith('docs.json')) {
29
+ await generateIconRegistry({ config: getDocsConfig(), root, output });
30
+ }
31
+ },
32
+ };
33
+ }
34
+
35
+ /**
36
+ * Keeps src/lib/search-index.generated.ts in sync with content, so the search
37
+ * dialog can query page text without a server.
38
+ */
39
+ function shisoSearchIndex(getDocsConfig: () => DocsConfig, root: string, output: string): Plugin {
40
+ return {
41
+ name: 'shiso-search-index',
42
+ async buildStart() {
43
+ await generateSearchIndex({ config: getDocsConfig(), root, output });
44
+ },
45
+ async handleHotUpdate({ file }) {
46
+ if (/\.(md|mdx)$/.test(file) || file.endsWith('docs.json')) {
47
+ await generateSearchIndex({ config: getDocsConfig(), root, output });
48
+ }
49
+ },
50
+ };
51
+ }
52
+
53
+ /**
54
+ * Injects site-level metadata from docs.json into index.html: the fallback
55
+ * title, favicon, and theme color CSS variables.
56
+ *
57
+ * The title/description defaults are wrapped in marker comments because
58
+ * prerendered pages supply their own (src/lib/head.ts) and the duplicates have
59
+ * to be removed. Deleting a delimited block is deterministic; the regex over
60
+ * `<title>` this replaced was not.
61
+ */
62
+ const DEFAULT_HEAD_OPEN = '<!--shiso-default-head-->';
63
+ const DEFAULT_HEAD_CLOSE = '<!--/shiso-default-head-->';
64
+
65
+ interface FontSpec {
66
+ family?: string;
67
+ weight?: number;
68
+ source?: string;
69
+ format?: string;
70
+ }
71
+
72
+ interface FontsOption extends FontSpec {
73
+ heading?: FontSpec;
74
+ body?: FontSpec;
75
+ }
76
+
77
+ /** Stylesheet URL for every configured Google Font (any spec without a `source`). */
78
+ function googleFontsUrl(specs: FontSpec[]): string | null {
79
+ const families = new Map<string, Set<number>>();
80
+
81
+ for (const spec of specs) {
82
+ if (!spec.family || spec.source) {
83
+ continue;
84
+ }
85
+
86
+ const weights = families.get(spec.family) || new Set([400, 700]);
87
+
88
+ if (spec.weight) {
89
+ weights.add(spec.weight);
90
+ }
91
+
92
+ families.set(spec.family, weights);
93
+ }
94
+
95
+ if (!families.size) {
96
+ return null;
97
+ }
98
+
99
+ const query = [...families]
100
+ .map(([family, weights]) => {
101
+ const sorted = [...weights].sort((a, b) => a - b);
102
+ return `family=${family.trim().replace(/ +/g, '+')}:wght@${sorted.join(';')}`;
103
+ })
104
+ .join('&');
105
+
106
+ return `https://fonts.googleapis.com/css2?${query}&display=swap`;
107
+ }
108
+
109
+ /** @font-face rule for a self-hosted font spec. */
110
+ function fontFaceRule(spec: FontSpec): string {
111
+ const format = spec.format || (spec.source?.endsWith('.woff') ? 'woff' : 'woff2');
112
+
113
+ return (
114
+ `@font-face{font-family:'${spec.family}';src:url(${spec.source}) format('${format}');` +
115
+ `font-weight:${spec.weight || 400};font-display:swap;}`
116
+ );
117
+ }
118
+
119
+ /** CSS custom-property overrides from `colors`, `fonts`, and `background`. */
120
+ function buildThemeCss(config: DocsConfig): string {
121
+ const { colors, background } = config as {
122
+ colors?: { primary?: string; light?: string; dark?: string };
123
+ background?: {
124
+ image?: string | { light?: string; dark?: string };
125
+ color?: { light?: string; dark?: string };
126
+ };
127
+ };
128
+ const fonts = (config as { fonts?: FontsOption }).fonts;
129
+
130
+ const root: string[] = [];
131
+ const dark: string[] = [];
132
+ const extra: string[] = [];
133
+
134
+ const lightModePrimary = colors?.primary || colors?.dark;
135
+
136
+ if (lightModePrimary) {
137
+ root.push(`--primary:${lightModePrimary};`);
138
+ root.push(`--ring:${lightModePrimary};`);
139
+ root.push(`--sidebar-primary:${lightModePrimary};`);
140
+ root.push(`--sidebar-ring:${lightModePrimary};`);
141
+ }
142
+
143
+ // Shadcn uses one semantic primary token for high-emphasis actions and
144
+ // active accents. `dark` supplies the accent when `primary` is omitted.
145
+ const darkModeAccent = colors?.light || colors?.primary || colors?.dark;
146
+
147
+ if (darkModeAccent) {
148
+ dark.push(`--primary:${darkModeAccent};`);
149
+ dark.push(`--ring:${darkModeAccent};`);
150
+ dark.push(`--sidebar-primary:${darkModeAccent};`);
151
+ dark.push(`--sidebar-ring:${darkModeAccent};`);
152
+ }
153
+
154
+ if (fonts) {
155
+ const body = fonts.body?.family ? fonts.body : fonts;
156
+ const heading = fonts.heading?.family ? fonts.heading : fonts;
157
+
158
+ for (const spec of [fonts, fonts.heading, fonts.body]) {
159
+ if (spec?.family && spec.source) {
160
+ extra.push(fontFaceRule(spec));
161
+ }
162
+ }
163
+
164
+ if (body.family) {
165
+ root.push(`--font-sans:'${body.family}',system-ui,-apple-system,'Segoe UI',sans-serif;`);
166
+ }
167
+
168
+ if (body.weight) {
169
+ root.push(`--font-body-weight:${body.weight};`);
170
+ }
171
+
172
+ if (heading.family) {
173
+ root.push(
174
+ `--font-heading:'${heading.family}',system-ui,-apple-system,'Segoe UI',sans-serif;`,
175
+ );
176
+ }
177
+
178
+ if (heading.weight) {
179
+ root.push(`--font-heading-weight:${heading.weight};`);
180
+ }
181
+ }
182
+
183
+ if (background?.color?.light) {
184
+ root.push(`--background:${background.color.light};`);
185
+ }
186
+
187
+ if (background?.color?.dark) {
188
+ dark.push(`--background:${background.color.dark};`);
189
+ }
190
+
191
+ if (background?.image) {
192
+ const image = background.image;
193
+ const base = 'background-size:cover;background-attachment:fixed;background-position:center;';
194
+
195
+ if (typeof image === 'string') {
196
+ extra.push(`body{background-image:url(${image});${base}}`);
197
+ } else {
198
+ if (image.light) {
199
+ extra.push(`body{background-image:url(${image.light});${base}}`);
200
+ }
201
+
202
+ if (image.dark) {
203
+ extra.push(`[data-theme="dark"] body{background-image:url(${image.dark});${base}}`);
204
+ }
205
+ }
206
+ }
207
+
208
+ return [
209
+ root.length ? `:root{${root.join('')}}` : '',
210
+ dark.length ? `[data-theme="dark"]{${dark.join('')}}` : '',
211
+ ...extra,
212
+ ]
213
+ .filter(Boolean)
214
+ .join('');
215
+ }
216
+
217
+ function shisoHtml(getDocsConfig: () => DocsConfig): Plugin {
218
+ return {
219
+ name: 'shiso-html',
220
+ transformIndexHtml(html) {
221
+ const docsConfig = getDocsConfig();
222
+ const name = docsConfig.name?.trim();
223
+ const description = docsConfig.description;
224
+ const favicon = docsConfig.favicon;
225
+ const appearance = docsConfig.appearance;
226
+ const fonts = docsConfig.fonts;
227
+
228
+ const defaults = [
229
+ DEFAULT_HEAD_OPEN,
230
+ name ? `<title>${name}</title>` : '',
231
+ description ? `<meta name="description" content="${description}" />` : '',
232
+ DEFAULT_HEAD_CLOSE,
233
+ ]
234
+ .filter(Boolean)
235
+ .join('');
236
+
237
+ const tags: unknown[] = [];
238
+
239
+ if (favicon) {
240
+ tags.push({ tag: 'link', attrs: { rel: 'icon', href: favicon }, injectTo: 'head' });
241
+ }
242
+
243
+ const fontsUrl = googleFontsUrl(
244
+ [fonts, fonts?.heading, fonts?.body].filter(Boolean) as FontSpec[],
245
+ );
246
+
247
+ if (fontsUrl) {
248
+ tags.push(
249
+ {
250
+ tag: 'link',
251
+ attrs: { rel: 'preconnect', href: 'https://fonts.googleapis.com' },
252
+ injectTo: 'head',
253
+ },
254
+ {
255
+ tag: 'link',
256
+ attrs: { rel: 'preconnect', href: 'https://fonts.gstatic.com', crossorigin: '' },
257
+ injectTo: 'head',
258
+ },
259
+ { tag: 'link', attrs: { rel: 'stylesheet', href: fontsUrl }, injectTo: 'head' },
260
+ );
261
+ }
262
+
263
+ const themeCss = buildThemeCss(docsConfig);
264
+
265
+ if (themeCss) {
266
+ tags.push({ tag: 'style', children: themeCss, injectTo: 'head' });
267
+ }
268
+
269
+ // Fill the appearance placeholders in the theme init script.
270
+ const withAppearance = html
271
+ .replace('__SHISO_APPEARANCE_DEFAULT__', appearance?.default || 'system')
272
+ .replace('__SHISO_APPEARANCE_STRICT__', appearance?.strict === true ? 'true' : 'false');
273
+
274
+ // The marker block goes in as raw HTML rather than as a `tags` entry so
275
+ // the comments survive: Vite's tag descriptors cannot express them.
276
+ return {
277
+ html: withAppearance.replace('</head>', `${defaults}\n</head>`),
278
+ tags: tags as never,
279
+ };
280
+ },
281
+ };
282
+ }
283
+
284
+ const PACKAGE_ROOT = fileURLToPath(new URL('.', import.meta.url));
285
+ const MDX_REACT_ENTRY = fileURLToPath(import.meta.resolve('@mdx-js/react'));
286
+ const LUCIDE_REACT_ENTRY = path.join(
287
+ path.dirname(fileURLToPath(import.meta.resolve('lucide-react/package.json'))),
288
+ 'dist/esm/lucide-react.mjs',
289
+ );
290
+
291
+ export default defineConfig(async () => {
292
+ const projectRoot = process.cwd();
293
+ const generatedRoot = path.join(projectRoot, '.shiso');
294
+ const configModule = await createDocsConfigModule({
295
+ root: projectRoot,
296
+ });
297
+ const getDocsConfig = configModule.getConfig as () => DocsConfig;
298
+
299
+ return {
300
+ plugins: [
301
+ configModule.plugin,
302
+ tailwindcss(),
303
+ shisoIconRegistry(
304
+ getDocsConfig,
305
+ projectRoot,
306
+ path.join(generatedRoot, 'icon-registry.generated.ts'),
307
+ ),
308
+ shisoLastModified({
309
+ root: projectRoot,
310
+ output: path.join(generatedRoot, 'last-modified.ts'),
311
+ }),
312
+ shisoSearchIndex(
313
+ getDocsConfig,
314
+ projectRoot,
315
+ path.join(generatedRoot, 'search-index.generated.ts'),
316
+ ),
317
+ shisoHtml(getDocsConfig),
318
+ shisoMdx(),
319
+ react({ include: /\.(mdx|md|tsx|ts|jsx|js)$/ }),
320
+ ],
321
+ resolve: {
322
+ alias: [
323
+ { find: '@mdx-js/react', replacement: MDX_REACT_ENTRY },
324
+ { find: 'lucide-react', replacement: LUCIDE_REACT_ENTRY },
325
+ {
326
+ find: '@/lib/icon-registry.generated',
327
+ replacement: path.join(generatedRoot, 'icon-registry.generated.ts'),
328
+ },
329
+ {
330
+ find: '@/lib/search-index.generated',
331
+ replacement: path.join(generatedRoot, 'search-index.generated.ts'),
332
+ },
333
+ {
334
+ find: '@/generated/last-modified',
335
+ replacement: path.join(generatedRoot, 'last-modified.ts'),
336
+ },
337
+ { find: '@', replacement: path.join(PACKAGE_ROOT, 'src') },
338
+ ],
339
+ dedupe: ['react', 'react-dom'],
340
+ },
341
+ };
342
+ });
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2022 Umami Software, Inc. <hello@umami.is>
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
package/dist/index.css DELETED
@@ -1,189 +0,0 @@
1
- /* virtual-css:css:e01d9571088b882a03b91eb2755da783 */
2
- .PageLinks_links__NmJhO {
3
- position: sticky;
4
- top: var(--spacing-8);
5
- height: max-content;
6
- min-width: 240px;
7
- }
8
- .PageLinks_links__NmJhO a.PageLinks_link__OGI3M {
9
- display: block;
10
- color: var(--font-color-muted);
11
- font-size: var(--font-size);
12
- text-decoration: none;
13
- }
14
- .PageLinks_links__NmJhO a.PageLinks_link__OGI3M:hover {
15
- color: var(--primary-color);
16
- text-decoration: none;
17
- }
18
- .PageLinks_indent-1__M2IxZ {
19
- margin-left: 0;
20
- }
21
- .PageLinks_indent-2__YTBlM {
22
- margin-left: 0;
23
- }
24
- .PageLinks_indent-3__YzJlZ {
25
- margin-left: 10px;
26
- }
27
- .PageLinks_indent-4__NDg3Z {
28
- margin-left: 20px;
29
- }
30
- .PageLinks_indent-5__ZTE4M {
31
- margin-left: 30px;
32
- }
33
- .PageLinks_indent-6__NTRjM {
34
- margin-left: 40px;
35
- }
36
- .PageLinks_links__NmJhO a.PageLinks_selected__ZjhkN {
37
- color: var(--primary-color);
38
- }
39
-
40
- /* virtual-css:css:2dd9c1a25bf05a14c9a7ab7ce1da6aef */
41
- .CodeBlock_container__OGZlM {
42
- position: relative;
43
- background: var(--background-color);
44
- border: 1px solid var(--base-color-1);
45
- padding: var(--spacing-5);
46
- border-radius: 6px;
47
- white-space: pre-wrap;
48
- word-wrap: break-word;
49
- }
50
- pre.CodeBlock_container__OGZlM code {
51
- font-family: var(--font-family-code);
52
- color: var(--font-color);
53
- font-size: var(--font-size);
54
- padding: 0;
55
- border: 0;
56
- background: transparent;
57
- }
58
- .CodeBlock_button__Y2Y2Z {
59
- border: 0;
60
- position: absolute;
61
- right: var(--spacing-5);
62
- top: var(--spacing-5);
63
- cursor: pointer;
64
- background: transparent;
65
- }
66
- .CodeBlock_copy__NWI2Y {
67
- color: var(--base-color-4);
68
- }
69
- .CodeBlock_copy__NWI2Y:hover {
70
- color: var(--base-color-1);
71
- }
72
- .CodeBlock_check__YzQzO {
73
- color: var(--success-color);
74
- }
75
-
76
- /* virtual-css:css:62c31e195181c97259fa56b13d20ea6d */
77
- .SideNav_nav__YjQxN {
78
- overflow-y: auto;
79
- min-width: 240px;
80
- }
81
- .SideNav_nav__YjQxN::-webkit-scrollbar {
82
- width: 15px;
83
- background: transparent;
84
- display: none;
85
- }
86
- .SideNav_nav__YjQxN:hover::-webkit-scrollbar {
87
- display: block;
88
- }
89
- .SideNav_nav__YjQxN::-webkit-scrollbar-track {
90
- border: 7px solid rgba(0, 0, 0, 0);
91
- background-color: var(--border-color);
92
- background-clip: padding-box;
93
- }
94
- .SideNav_nav__YjQxN::-webkit-scrollbar-thumb {
95
- border: 7px solid rgba(0, 0, 0, 0);
96
- background-color: var(--font-color);
97
- background-clip: padding-box;
98
- }
99
- .SideNav_nav__YjQxN::-webkit-scrollbar-thumb:hover {
100
- border: 5px solid rgba(0, 0, 0, 0);
101
- background-color: var(--font-color);
102
- background-clip: padding-box;
103
- }
104
- .SideNav_nav__YjQxN.SideNav_sticky__ZTI5N {
105
- position: sticky;
106
- top: var(--spacing-8);
107
- }
108
- .SideNav_nav__YjQxN .SideNav_item__NWU0N {
109
- color: var(--font-color-muted);
110
- border-left: 1px solid var(--border-color);
111
- padding: var(--padding);
112
- text-decoration: none;
113
- }
114
- .SideNav_nav__YjQxN .SideNav_item__NWU0N:hover {
115
- color: var(--font-color);
116
- }
117
- .SideNav_nav__YjQxN .SideNav_item__NWU0N.SideNav_selected__OTY3O {
118
- color: var(--font-color);
119
- font-weight: 500;
120
- border-color: var(--primary-color);
121
- background-color: var(--highlight-color);
122
- }
123
- .SideNav_header__NDZjN {
124
- padding: var(--padding-y) 0;
125
- }
126
-
127
- /* virtual-css:css:4d0931c84adfae5533b067ea199724f8 */
128
- .Markdown_content__YzRmN {
129
- font-size: 16px;
130
- margin-bottom: 60px;
131
- }
132
- .Markdown_content__YzRmN > p {
133
- color: var(--font-color);
134
- line-height: 1.8;
135
- }
136
- .Markdown_content__YzRmN a {
137
- color: var(--font-color);
138
- font-weight: 600;
139
- text-decoration: underline var(--border-color);
140
- text-underline-offset: 4px;
141
- }
142
- .Markdown_content__YzRmN a:hover {
143
- color: var(--font-color);
144
- text-decoration: underline var(--primary-color);
145
- }
146
- .Markdown_content__YzRmN img {
147
- display: block;
148
- max-width: 100%;
149
- margin: 4rem auto;
150
- box-shadow: 2px 2px 16px rgba(0, 0, 0, .1);
151
- }
152
- .Markdown_content__YzRmN h1 {
153
- font-size: var(--font-size-8);
154
- letter-spacing: var(--letter-spacing-1);
155
- margin: 0 0 var(--spacing-4) 0;
156
- }
157
- .Markdown_content__YzRmN h2 {
158
- font-size: var(--font-size-6);
159
- letter-spacing: var(--letter-spacing-1);
160
- margin: var(--spacing-8) 0 var(--spacing-4) 0;
161
- }
162
- .Markdown_content__YzRmN h3 {
163
- font-size: var(--font-size-5);
164
- letter-spacing: var(--letter-spacing-1);
165
- margin: var(--spacing-7) 0 var(--spacing-4) 0;
166
- }
167
- .Markdown_content__YzRmN *[id] {
168
- scroll-margin-top: var(--spacing-4);
169
- }
170
- .Markdown_content__YzRmN ul {
171
- list-style: disc;
172
- }
173
- .Markdown_content__YzRmN ol {
174
- list-style: decimal;
175
- }
176
- .Markdown_content__YzRmN pre {
177
- margin: var(--spacing-5) 0;
178
- }
179
- .Markdown_content__YzRmN code {
180
- font-size: 14px;
181
- }
182
- .Markdown_content__YzRmN code:not([class]) {
183
- font-family: var(--font-family-code);
184
- color: var(--font-color);
185
- padding: var(--spacing-1);
186
- border-radius: var(--border-radius);
187
- background: var(--base-color-1);
188
- font-weight: var(--font-weight-bold);
189
- }
package/dist/index.d.ts DELETED
@@ -1,57 +0,0 @@
1
- // Generated by dts-bundle v0.7.3
2
- // Dependencies for this module:
3
- // ../../react
4
- // ../../@/lib/types
5
-
6
- declare module '@umami/shiso' {
7
- import '@umami/react-zen/styles.css';
8
- import 'highlight.js/styles/github-dark.css';
9
- import { Blog } from '@umami/shiso/Blog';
10
- import { Docs } from '@umami/shiso/Docs';
11
- import { Shiso } from '@umami/shiso/Shiso';
12
- export { Blog, Docs, Shiso };
13
- }
14
-
15
- declare module '@umami/shiso/Blog' {
16
- export interface BlogProps {
17
- title: string;
18
- description?: string;
19
- code: string;
20
- author?: string;
21
- date?: string;
22
- image?: string;
23
- anchors?: any[];
24
- backUrl?: string;
25
- }
26
- export function Blog({ title, code, author, date, image, anchors, backUrl }: BlogProps): import("react").JSX.Element;
27
- }
28
-
29
- declare module '@umami/shiso/Docs' {
30
- export function Docs({ content, config }: {
31
- content: any;
32
- config: any;
33
- }): import("react").JSX.Element;
34
- }
35
-
36
- declare module '@umami/shiso/Shiso' {
37
- import { JSX } from 'react';
38
- import type { ShisoConfig, ShisoContent } from '@/lib/types';
39
- export interface ShisoProps {
40
- type: string;
41
- config: ShisoConfig;
42
- content: ShisoContent;
43
- components?: {
44
- [key: string]: any;
45
- };
46
- templates?: {
47
- [key: string]: any;
48
- };
49
- }
50
- export type ShisoTemplateComponent = ({ content, config, }: {
51
- content: any;
52
- config: ShisoConfig;
53
- }) => JSX.Element;
54
- export const ShisoContext: import("react").Context<any>;
55
- export function Shiso({ type, config, content, components, templates }: ShisoProps): JSX.Element;
56
- }
57
-