@umami/shiso 0.28.0 → 0.30.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.
- package/dist/index.css +45 -41
- package/dist/index.d.ts +48 -48
- package/dist/index.js +19 -12
- package/dist/index.mjs +19 -12
- package/package.json +1 -2
- package/server/index.d.ts +45 -45
- package/dist/server.d.ts +0 -45
- package/dist/server.js +0 -159
package/dist/index.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/* virtual-css:css:
|
|
2
|
-
/* virtual-css:css:
|
|
3
|
-
.
|
|
1
|
+
/* virtual-css:css:32abd77818c5161a011a843897f34903 */
|
|
2
|
+
/* virtual-css:css:2dd9c1a25bf05a14c9a7ab7ce1da6aef */
|
|
3
|
+
.CodeBlock_container__ZTkxY {
|
|
4
4
|
position: relative;
|
|
5
5
|
background: var(--base-color-900);
|
|
6
6
|
padding: var(--spacing-5);
|
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
white-space: pre-wrap;
|
|
9
9
|
word-wrap: break-word;
|
|
10
10
|
}
|
|
11
|
-
pre.
|
|
11
|
+
pre.CodeBlock_container__ZTkxY code {
|
|
12
12
|
font-family: var(--font-family-code);
|
|
13
13
|
color: var(--base-color-300);
|
|
14
14
|
padding: 0;
|
|
15
15
|
border: 0;
|
|
16
16
|
background: transparent;
|
|
17
17
|
}
|
|
18
|
-
.
|
|
18
|
+
.CodeBlock_button__MmZkO {
|
|
19
19
|
border: 0;
|
|
20
20
|
position: absolute;
|
|
21
21
|
right: var(--spacing-5);
|
|
@@ -23,135 +23,139 @@ pre.CodeBlock_container__YmFmN code {
|
|
|
23
23
|
cursor: pointer;
|
|
24
24
|
background: transparent;
|
|
25
25
|
}
|
|
26
|
-
.
|
|
26
|
+
.CodeBlock_copy__M2I0N {
|
|
27
27
|
color: var(--base-color-300);
|
|
28
28
|
}
|
|
29
|
-
.
|
|
29
|
+
.CodeBlock_copy__M2I0N:hover {
|
|
30
30
|
color: var(--base-color-50);
|
|
31
31
|
}
|
|
32
|
-
.
|
|
32
|
+
.CodeBlock_check__MjkzY {
|
|
33
33
|
color: var(--success-color);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
/* virtual-css:css:
|
|
37
|
-
.
|
|
36
|
+
/* virtual-css:css:e01d9571088b882a03b91eb2755da783 */
|
|
37
|
+
.PageLinks_links__YmMzM {
|
|
38
38
|
position: sticky;
|
|
39
39
|
top: 30px;
|
|
40
40
|
height: max-content;
|
|
41
41
|
}
|
|
42
|
-
.
|
|
42
|
+
.PageLinks_links__YmMzM a.PageLinks_link__MjIyN {
|
|
43
43
|
display: block;
|
|
44
44
|
color: var(--font-color-muted);
|
|
45
45
|
font-size: var(--font-size);
|
|
46
46
|
text-wrap: nowrap;
|
|
47
47
|
text-decoration: none;
|
|
48
48
|
}
|
|
49
|
-
.
|
|
49
|
+
.PageLinks_links__YmMzM a.PageLinks_link__MjIyN:hover {
|
|
50
50
|
color: var(--primary-color);
|
|
51
51
|
text-decoration: none;
|
|
52
52
|
}
|
|
53
|
-
.PageLinks_indent-
|
|
53
|
+
.PageLinks_indent-1__MDg5M {
|
|
54
54
|
margin-left: 0;
|
|
55
55
|
}
|
|
56
|
-
.PageLinks_indent-
|
|
56
|
+
.PageLinks_indent-2__YTU4M {
|
|
57
57
|
margin-left: 0;
|
|
58
58
|
}
|
|
59
|
-
.PageLinks_indent-
|
|
59
|
+
.PageLinks_indent-3__NTYxY {
|
|
60
60
|
margin-left: 10px;
|
|
61
61
|
}
|
|
62
|
-
.PageLinks_indent-
|
|
62
|
+
.PageLinks_indent-4__NjhmY {
|
|
63
63
|
margin-left: 20px;
|
|
64
64
|
}
|
|
65
|
-
.PageLinks_indent-
|
|
65
|
+
.PageLinks_indent-5__ZmFiY {
|
|
66
66
|
margin-left: 30px;
|
|
67
67
|
}
|
|
68
|
-
.PageLinks_indent-
|
|
68
|
+
.PageLinks_indent-6__MmRkN {
|
|
69
69
|
margin-left: 40px;
|
|
70
70
|
}
|
|
71
|
-
.
|
|
71
|
+
.PageLinks_links__YmMzM a.PageLinks_selected__NDQxY {
|
|
72
72
|
color: var(--primary-color);
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
/* virtual-css:css:
|
|
76
|
-
.
|
|
75
|
+
/* virtual-css:css:62c31e195181c97259fa56b13d20ea6d */
|
|
76
|
+
.SideNav_nav__YjU1O {
|
|
77
77
|
overflow-y: auto;
|
|
78
|
+
scrollbar-width: thin;
|
|
79
|
+
scrollbar-color: var(--border-color) var(--background-color);
|
|
80
|
+
scrollbar-gutter: stable;
|
|
78
81
|
}
|
|
79
|
-
.
|
|
82
|
+
.SideNav_nav__YjU1O.SideNav_sticky__NjhmY {
|
|
80
83
|
position: sticky;
|
|
84
|
+
top: 30px;
|
|
81
85
|
}
|
|
82
|
-
.
|
|
86
|
+
.SideNav_nav__YjU1O .SideNav_item__ZGRlM {
|
|
83
87
|
color: var(--font-color-muted);
|
|
84
88
|
padding: 0;
|
|
85
89
|
border-radius: 0;
|
|
86
90
|
border-left: var(--border-size-1) solid var(--border-color);
|
|
87
91
|
}
|
|
88
|
-
.
|
|
92
|
+
.SideNav_nav__YjU1O .SideNav_item__ZGRlM a {
|
|
89
93
|
color: currentColor;
|
|
90
94
|
width: 100%;
|
|
91
95
|
padding: var(--padding-y) var(--padding-x);
|
|
92
96
|
text-decoration: none;
|
|
93
97
|
}
|
|
94
|
-
.
|
|
98
|
+
.SideNav_nav__YjU1O .SideNav_item__ZGRlM a:hover {
|
|
95
99
|
color: var(--primary-color);
|
|
96
100
|
}
|
|
97
|
-
.
|
|
101
|
+
.SideNav_nav__YjU1O .SideNav_item__ZGRlM.SideNav_selected__NTMzY {
|
|
98
102
|
color: var(--font-color);
|
|
99
103
|
border-color: var(--primary-color);
|
|
100
104
|
}
|
|
101
|
-
.
|
|
105
|
+
.SideNav_items__MWI3O header {
|
|
102
106
|
padding: var(--padding-y) 0;
|
|
103
107
|
}
|
|
104
108
|
|
|
105
|
-
/* virtual-css:css:
|
|
106
|
-
.
|
|
109
|
+
/* virtual-css:css:71a58b2dae0a60276640236977b24d42 */
|
|
110
|
+
.ContentArea_content__MTM4Z {
|
|
107
111
|
font-size: 16px;
|
|
108
112
|
margin-bottom: 60px;
|
|
109
113
|
}
|
|
110
|
-
.
|
|
114
|
+
.ContentArea_content__MTM4Z > p {
|
|
111
115
|
color: var(--font-color);
|
|
112
116
|
line-height: 1.8;
|
|
113
117
|
}
|
|
114
|
-
.
|
|
118
|
+
.ContentArea_content__MTM4Z a {
|
|
115
119
|
color: var(--font-color);
|
|
116
120
|
font-weight: 600;
|
|
117
121
|
text-decoration: underline var(--border-color);
|
|
118
122
|
text-underline-offset: 4px;
|
|
119
123
|
}
|
|
120
|
-
.
|
|
124
|
+
.ContentArea_content__MTM4Z a:hover {
|
|
121
125
|
color: var(--font-color);
|
|
122
126
|
text-decoration: underline var(--primary-color);
|
|
123
127
|
}
|
|
124
|
-
.
|
|
128
|
+
.ContentArea_content__MTM4Z h1 {
|
|
125
129
|
font-size: var(--font-size-8);
|
|
126
130
|
letter-spacing: var(--letter-spacing-1);
|
|
127
131
|
margin: 0 0 var(--spacing-4) 0;
|
|
128
132
|
}
|
|
129
|
-
.
|
|
133
|
+
.ContentArea_content__MTM4Z h2 {
|
|
130
134
|
font-size: var(--font-size-6);
|
|
131
135
|
letter-spacing: var(--letter-spacing-1);
|
|
132
136
|
margin: var(--spacing-8) 0 var(--spacing-4) 0;
|
|
133
137
|
}
|
|
134
|
-
.
|
|
138
|
+
.ContentArea_content__MTM4Z h3 {
|
|
135
139
|
font-size: var(--font-size-5);
|
|
136
140
|
letter-spacing: var(--letter-spacing-1);
|
|
137
141
|
margin: var(--spacing-7) 0 var(--spacing-4) 0;
|
|
138
142
|
}
|
|
139
|
-
.
|
|
143
|
+
.ContentArea_content__MTM4Z *[id] {
|
|
140
144
|
scroll-margin-top: var(--spacing-4);
|
|
141
145
|
}
|
|
142
|
-
.
|
|
146
|
+
.ContentArea_content__MTM4Z ul {
|
|
143
147
|
list-style: disc;
|
|
144
148
|
}
|
|
145
|
-
.
|
|
149
|
+
.ContentArea_content__MTM4Z ol {
|
|
146
150
|
list-style: decimal;
|
|
147
151
|
}
|
|
148
|
-
.
|
|
152
|
+
.ContentArea_content__MTM4Z pre {
|
|
149
153
|
margin: var(--spacing-5) 0;
|
|
150
154
|
}
|
|
151
|
-
.
|
|
155
|
+
.ContentArea_content__MTM4Z code {
|
|
152
156
|
font-size: 14px;
|
|
153
157
|
}
|
|
154
|
-
.
|
|
158
|
+
.ContentArea_content__MTM4Z code:not([class]) {
|
|
155
159
|
font-family: var(--font-family-code);
|
|
156
160
|
color: var(--font-color);
|
|
157
161
|
padding: var(--spacing-1);
|
package/dist/index.d.ts
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
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
|
-
content: any;
|
|
18
|
-
config: any;
|
|
19
|
-
}
|
|
20
|
-
export function Blog({ content }: BlogProps): import("react").JSX.Element;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
declare module '@umami/shiso/Docs' {
|
|
24
|
-
export function Docs(): import("react").JSX.Element;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
declare module '@umami/shiso/Shiso' {
|
|
28
|
-
import { JSX } from 'react';
|
|
29
|
-
import type { ShisoConfig, ShisoContent } from '@/lib/types';
|
|
30
|
-
export interface ShisoProps {
|
|
31
|
-
content: ShisoContent;
|
|
32
|
-
type: string;
|
|
33
|
-
config: ShisoConfig;
|
|
34
|
-
components?: {
|
|
35
|
-
[key: string]: any;
|
|
36
|
-
};
|
|
37
|
-
templates?: {
|
|
38
|
-
[key: string]: any;
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
export type ShisoTemplateComponent = ({ content, config, }: {
|
|
42
|
-
content: any;
|
|
43
|
-
config: ShisoConfig;
|
|
44
|
-
}) => JSX.Element;
|
|
45
|
-
export const ShisoContext: import("react").Context<any>;
|
|
46
|
-
export function Shiso({ content, type, config, components, templates }: ShisoProps): JSX.Element;
|
|
47
|
-
}
|
|
48
|
-
|
|
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
|
+
content: any;
|
|
18
|
+
config: any;
|
|
19
|
+
}
|
|
20
|
+
export function Blog({ content }: BlogProps): import("react").JSX.Element;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
declare module '@umami/shiso/Docs' {
|
|
24
|
+
export function Docs(): import("react").JSX.Element;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
declare module '@umami/shiso/Shiso' {
|
|
28
|
+
import { JSX } from 'react';
|
|
29
|
+
import type { ShisoConfig, ShisoContent } from '@/lib/types';
|
|
30
|
+
export interface ShisoProps {
|
|
31
|
+
content: ShisoContent;
|
|
32
|
+
type: string;
|
|
33
|
+
config: ShisoConfig;
|
|
34
|
+
components?: {
|
|
35
|
+
[key: string]: any;
|
|
36
|
+
};
|
|
37
|
+
templates?: {
|
|
38
|
+
[key: string]: any;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export type ShisoTemplateComponent = ({ content, config, }: {
|
|
42
|
+
content: any;
|
|
43
|
+
config: ShisoConfig;
|
|
44
|
+
}) => JSX.Element;
|
|
45
|
+
export const ShisoContext: import("react").Context<any>;
|
|
46
|
+
export function Shiso({ content, type, config, components, templates }: ShisoProps): JSX.Element;
|
|
47
|
+
}
|
|
48
|
+
|
package/dist/index.js
CHANGED
|
@@ -42,7 +42,7 @@ var import_github_dark = require("highlight.js/styles/github-dark.css");
|
|
|
42
42
|
// src/components/Blog.tsx
|
|
43
43
|
var import_react_zen2 = require("@umami/react-zen");
|
|
44
44
|
|
|
45
|
-
// css-modules
|
|
45
|
+
// css-modules:E:\dev\umami-shiso\src\components\Blog.module.css
|
|
46
46
|
var Blog_default = {};
|
|
47
47
|
|
|
48
48
|
// src/components/Markdown.tsx
|
|
@@ -112,8 +112,8 @@ var import_react_zen4 = require("@umami/react-zen");
|
|
|
112
112
|
var import_react2 = require("react");
|
|
113
113
|
var import_react_zen3 = require("@umami/react-zen");
|
|
114
114
|
|
|
115
|
-
// css-modules
|
|
116
|
-
var CodeBlock_default = { "container": "
|
|
115
|
+
// css-modules:E:\dev\umami-shiso\src\components\CodeBlock.module.css
|
|
116
|
+
var CodeBlock_default = { "container": "CodeBlock_container__ZTkxY", "button": "CodeBlock_button__MmZkO", "copy": "CodeBlock_copy__M2I0N", "check": "CodeBlock_check__MjkzY" };
|
|
117
117
|
|
|
118
118
|
// src/components/CodeBlock.tsx
|
|
119
119
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
@@ -159,8 +159,8 @@ var import_react6 = require("react");
|
|
|
159
159
|
var import_react_zen5 = require("@umami/react-zen");
|
|
160
160
|
var import_classnames = __toESM(require("classnames"));
|
|
161
161
|
|
|
162
|
-
// css-modules
|
|
163
|
-
var PageLinks_default = { "links": "
|
|
162
|
+
// css-modules:E:\dev\umami-shiso\src\components\PageLinks.module.css
|
|
163
|
+
var PageLinks_default = { "links": "PageLinks_links__YmMzM", "link": "PageLinks_link__MjIyN", "indent-1": "PageLinks_indent-1__MDg5M", "indent-2": "PageLinks_indent-2__YTU4M", "indent-3": "PageLinks_indent-3__NTYxY", "indent-4": "PageLinks_indent-4__NjhmY", "indent-5": "PageLinks_indent-5__ZmFiY", "indent-6": "PageLinks_indent-6__MmRkN", "selected": "PageLinks_selected__NDQxY" };
|
|
164
164
|
|
|
165
165
|
// src/components/PageLinks.tsx
|
|
166
166
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
@@ -182,7 +182,7 @@ function PageLinks({ items = [], className, ...props }) {
|
|
|
182
182
|
if (!items?.length) {
|
|
183
183
|
return null;
|
|
184
184
|
}
|
|
185
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_zen5.Box, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_react_zen5.Column, { gap: "3", minWidth: "240px",
|
|
185
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_zen5.Box, { ...props, className: (0, import_classnames.default)(PageLinks_default.links, className), children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_react_zen5.Column, { gap: "3", minWidth: "240px", children: [
|
|
186
186
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_zen5.Text, { size: "2", weight: "bold", children: "On this page" }),
|
|
187
187
|
items.map(({ name, id, size }) => {
|
|
188
188
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
@@ -207,8 +207,8 @@ var import_classnames2 = __toESM(require("classnames"));
|
|
|
207
207
|
var import_navigation = require("next/navigation");
|
|
208
208
|
var import_link = __toESM(require("next/link"));
|
|
209
209
|
|
|
210
|
-
// css-modules
|
|
211
|
-
var SideNav_default = { "nav": "
|
|
210
|
+
// css-modules:E:\dev\umami-shiso\src\components\SideNav.module.css
|
|
211
|
+
var SideNav_default = { "nav": "SideNav_nav__YjU1O", "sticky": "SideNav_sticky__NjhmY", "item": "SideNav_item__ZGRlM", "selected": "SideNav_selected__NTMzY", "items": "SideNav_items__MWI3O" };
|
|
212
212
|
|
|
213
213
|
// src/components/SideNav.tsx
|
|
214
214
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
@@ -275,8 +275,8 @@ function TopNav({ tabs }) {
|
|
|
275
275
|
// src/components/ContentArea.tsx
|
|
276
276
|
var import_react_zen8 = require("@umami/react-zen");
|
|
277
277
|
|
|
278
|
-
// css-modules
|
|
279
|
-
var ContentArea_default = { "content": "
|
|
278
|
+
// css-modules:E:\dev\umami-shiso\src\components\ContentArea.module.css
|
|
279
|
+
var ContentArea_default = { "content": "ContentArea_content__MTM4Z" };
|
|
280
280
|
|
|
281
281
|
// src/components/ContentArea.tsx
|
|
282
282
|
var import_link3 = __toESM(require("next/link"));
|
|
@@ -352,8 +352,15 @@ function Docs() {
|
|
|
352
352
|
lg: "block",
|
|
353
353
|
xl: "block"
|
|
354
354
|
};
|
|
355
|
+
const linksDisplay = {
|
|
356
|
+
default: "none",
|
|
357
|
+
xs: "none",
|
|
358
|
+
sm: "none",
|
|
359
|
+
md: "none",
|
|
360
|
+
lg: "block",
|
|
361
|
+
xl: "block"
|
|
362
|
+
};
|
|
355
363
|
const menuDisplay = {
|
|
356
|
-
default: "block",
|
|
357
364
|
lg: "none",
|
|
358
365
|
xl: "none"
|
|
359
366
|
};
|
|
@@ -400,7 +407,7 @@ function Docs() {
|
|
|
400
407
|
prev
|
|
401
408
|
}
|
|
402
409
|
),
|
|
403
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(PageLinks, { display:
|
|
410
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(PageLinks, { display: linksDisplay, items: anchors, style: { top } })
|
|
404
411
|
]
|
|
405
412
|
}
|
|
406
413
|
)
|
package/dist/index.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import "highlight.js/styles/github-dark.css";
|
|
|
7
7
|
// src/components/Blog.tsx
|
|
8
8
|
import { Column as Column2 } from "@umami/react-zen";
|
|
9
9
|
|
|
10
|
-
// css-modules
|
|
10
|
+
// css-modules:E:\dev\umami-shiso\src\components\Blog.module.css
|
|
11
11
|
var Blog_default = {};
|
|
12
12
|
|
|
13
13
|
// src/components/Markdown.tsx
|
|
@@ -88,8 +88,8 @@ import { Code } from "@umami/react-zen";
|
|
|
88
88
|
import { useState, useRef } from "react";
|
|
89
89
|
import { Icon, Icons } from "@umami/react-zen";
|
|
90
90
|
|
|
91
|
-
// css-modules
|
|
92
|
-
var CodeBlock_default = { "container": "
|
|
91
|
+
// css-modules:E:\dev\umami-shiso\src\components\CodeBlock.module.css
|
|
92
|
+
var CodeBlock_default = { "container": "CodeBlock_container__ZTkxY", "button": "CodeBlock_button__MmZkO", "copy": "CodeBlock_copy__M2I0N", "check": "CodeBlock_check__MjkzY" };
|
|
93
93
|
|
|
94
94
|
// src/components/CodeBlock.tsx
|
|
95
95
|
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
@@ -135,8 +135,8 @@ import { useEffect, useState as useState2 } from "react";
|
|
|
135
135
|
import { Column as Column3, Text, Box } from "@umami/react-zen";
|
|
136
136
|
import classNames from "classnames";
|
|
137
137
|
|
|
138
|
-
// css-modules
|
|
139
|
-
var PageLinks_default = { "links": "
|
|
138
|
+
// css-modules:E:\dev\umami-shiso\src\components\PageLinks.module.css
|
|
139
|
+
var PageLinks_default = { "links": "PageLinks_links__YmMzM", "link": "PageLinks_link__MjIyN", "indent-1": "PageLinks_indent-1__MDg5M", "indent-2": "PageLinks_indent-2__YTU4M", "indent-3": "PageLinks_indent-3__NTYxY", "indent-4": "PageLinks_indent-4__NjhmY", "indent-5": "PageLinks_indent-5__ZmFiY", "indent-6": "PageLinks_indent-6__MmRkN", "selected": "PageLinks_selected__NDQxY" };
|
|
140
140
|
|
|
141
141
|
// src/components/PageLinks.tsx
|
|
142
142
|
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
@@ -158,7 +158,7 @@ function PageLinks({ items = [], className, ...props }) {
|
|
|
158
158
|
if (!items?.length) {
|
|
159
159
|
return null;
|
|
160
160
|
}
|
|
161
|
-
return /* @__PURE__ */ jsx6(Box, { ...props, children: /* @__PURE__ */ jsxs4(Column3, { gap: "3", minWidth: "240px",
|
|
161
|
+
return /* @__PURE__ */ jsx6(Box, { ...props, className: classNames(PageLinks_default.links, className), children: /* @__PURE__ */ jsxs4(Column3, { gap: "3", minWidth: "240px", children: [
|
|
162
162
|
/* @__PURE__ */ jsx6(Text, { size: "2", weight: "bold", children: "On this page" }),
|
|
163
163
|
items.map(({ name, id, size }) => {
|
|
164
164
|
return /* @__PURE__ */ jsx6(
|
|
@@ -183,8 +183,8 @@ import classNames2 from "classnames";
|
|
|
183
183
|
import { usePathname } from "next/navigation";
|
|
184
184
|
import Link from "next/link";
|
|
185
185
|
|
|
186
|
-
// css-modules
|
|
187
|
-
var SideNav_default = { "nav": "
|
|
186
|
+
// css-modules:E:\dev\umami-shiso\src\components\SideNav.module.css
|
|
187
|
+
var SideNav_default = { "nav": "SideNav_nav__YjU1O", "sticky": "SideNav_sticky__NjhmY", "item": "SideNav_item__ZGRlM", "selected": "SideNav_selected__NTMzY", "items": "SideNav_items__MWI3O" };
|
|
188
188
|
|
|
189
189
|
// src/components/SideNav.tsx
|
|
190
190
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
@@ -251,8 +251,8 @@ function TopNav({ tabs }) {
|
|
|
251
251
|
// src/components/ContentArea.tsx
|
|
252
252
|
import { Heading, Box as Box3, Text as Text2, Row, Icon as Icon2, Icons as Icons2 } from "@umami/react-zen";
|
|
253
253
|
|
|
254
|
-
// css-modules
|
|
255
|
-
var ContentArea_default = { "content": "
|
|
254
|
+
// css-modules:E:\dev\umami-shiso\src\components\ContentArea.module.css
|
|
255
|
+
var ContentArea_default = { "content": "ContentArea_content__MTM4Z" };
|
|
256
256
|
|
|
257
257
|
// src/components/ContentArea.tsx
|
|
258
258
|
import Link3 from "next/link";
|
|
@@ -328,8 +328,15 @@ function Docs() {
|
|
|
328
328
|
lg: "block",
|
|
329
329
|
xl: "block"
|
|
330
330
|
};
|
|
331
|
+
const linksDisplay = {
|
|
332
|
+
default: "none",
|
|
333
|
+
xs: "none",
|
|
334
|
+
sm: "none",
|
|
335
|
+
md: "none",
|
|
336
|
+
lg: "block",
|
|
337
|
+
xl: "block"
|
|
338
|
+
};
|
|
331
339
|
const menuDisplay = {
|
|
332
|
-
default: "block",
|
|
333
340
|
lg: "none",
|
|
334
341
|
xl: "none"
|
|
335
342
|
};
|
|
@@ -376,7 +383,7 @@ function Docs() {
|
|
|
376
383
|
prev
|
|
377
384
|
}
|
|
378
385
|
),
|
|
379
|
-
/* @__PURE__ */ jsx10(PageLinks, { display:
|
|
386
|
+
/* @__PURE__ */ jsx10(PageLinks, { display: linksDisplay, items: anchors, style: { top } })
|
|
380
387
|
]
|
|
381
388
|
}
|
|
382
389
|
)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umami/shiso",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.30.0",
|
|
4
4
|
"description": "A content layer for Next.js",
|
|
5
5
|
"homepage": "https://umami.is/shiso",
|
|
6
6
|
"repository": {
|
|
@@ -62,7 +62,6 @@
|
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@svgr/cli": "^8.1.0",
|
|
65
|
-
"@svgr/webpack": "^8.1.0",
|
|
66
65
|
"@types/css-modules": "^1.0.5",
|
|
67
66
|
"@types/mdx": "^2.0.11",
|
|
68
67
|
"@types/node": "^22.10.4",
|
package/server/index.d.ts
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
// Generated by dts-bundle v0.7.3
|
|
2
|
-
// Dependencies for this module:
|
|
3
|
-
// ../../react
|
|
4
|
-
// ../../@/lib/types
|
|
5
|
-
|
|
6
|
-
declare module '@umami/shiso/server' {
|
|
7
|
-
import { ReactElement } from 'react';
|
|
8
|
-
import type { ShisoConfig } from '@/lib/types';
|
|
9
|
-
export const getContent: (file: string) => Promise<{
|
|
10
|
-
path: string;
|
|
11
|
-
meta: {
|
|
12
|
-
[key: string]: any;
|
|
13
|
-
};
|
|
14
|
-
content: string;
|
|
15
|
-
code: string;
|
|
16
|
-
anchors: {
|
|
17
|
-
name: string;
|
|
18
|
-
id: string;
|
|
19
|
-
size: number;
|
|
20
|
-
}[];
|
|
21
|
-
} | null>;
|
|
22
|
-
export function next(type: string, config: ShisoConfig): {
|
|
23
|
-
generateMetadata: ({ params }: {
|
|
24
|
-
params: Promise<{
|
|
25
|
-
slug: string[];
|
|
26
|
-
}>;
|
|
27
|
-
}) => Promise<{
|
|
28
|
-
title: {
|
|
29
|
-
absolute: string;
|
|
30
|
-
default: any;
|
|
31
|
-
};
|
|
32
|
-
}>;
|
|
33
|
-
generateStaticParams: () => Promise<any>;
|
|
34
|
-
renderPage: (render: ({ type, content, config, }: {
|
|
35
|
-
type: string;
|
|
36
|
-
content: any;
|
|
37
|
-
config: ShisoConfig;
|
|
38
|
-
}) => ReactElement) => ({ params }: {
|
|
39
|
-
params: Promise<{
|
|
40
|
-
slug: string[];
|
|
41
|
-
}>;
|
|
42
|
-
}) => Promise<ReactElement<unknown, string | import("react").JSXElementConstructor<any>>>;
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
|
|
1
|
+
// Generated by dts-bundle v0.7.3
|
|
2
|
+
// Dependencies for this module:
|
|
3
|
+
// ../../react
|
|
4
|
+
// ../../@/lib/types
|
|
5
|
+
|
|
6
|
+
declare module '@umami/shiso/server' {
|
|
7
|
+
import { ReactElement } from 'react';
|
|
8
|
+
import type { ShisoConfig } from '@/lib/types';
|
|
9
|
+
export const getContent: (file: string) => Promise<{
|
|
10
|
+
path: string;
|
|
11
|
+
meta: {
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
};
|
|
14
|
+
content: string;
|
|
15
|
+
code: string;
|
|
16
|
+
anchors: {
|
|
17
|
+
name: string;
|
|
18
|
+
id: string;
|
|
19
|
+
size: number;
|
|
20
|
+
}[];
|
|
21
|
+
} | null>;
|
|
22
|
+
export function next(type: string, config: ShisoConfig): {
|
|
23
|
+
generateMetadata: ({ params }: {
|
|
24
|
+
params: Promise<{
|
|
25
|
+
slug: string[];
|
|
26
|
+
}>;
|
|
27
|
+
}) => Promise<{
|
|
28
|
+
title: {
|
|
29
|
+
absolute: string;
|
|
30
|
+
default: any;
|
|
31
|
+
};
|
|
32
|
+
}>;
|
|
33
|
+
generateStaticParams: () => Promise<any>;
|
|
34
|
+
renderPage: (render: ({ type, content, config, }: {
|
|
35
|
+
type: string;
|
|
36
|
+
content: any;
|
|
37
|
+
config: ShisoConfig;
|
|
38
|
+
}) => ReactElement) => ({ params }: {
|
|
39
|
+
params: Promise<{
|
|
40
|
+
slug: string[];
|
|
41
|
+
}>;
|
|
42
|
+
}) => Promise<ReactElement<unknown, string | import("react").JSXElementConstructor<any>>>;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
package/dist/server.d.ts
DELETED
|
@@ -1,45 +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/server' {
|
|
7
|
-
import { ReactElement } from 'react';
|
|
8
|
-
import type { ShisoConfig } from '@/lib/types';
|
|
9
|
-
export const getContent: (file: string) => Promise<{
|
|
10
|
-
path: string;
|
|
11
|
-
meta: {
|
|
12
|
-
[key: string]: any;
|
|
13
|
-
};
|
|
14
|
-
content: string;
|
|
15
|
-
code: string;
|
|
16
|
-
anchors: {
|
|
17
|
-
name: string;
|
|
18
|
-
id: string;
|
|
19
|
-
size: number;
|
|
20
|
-
}[];
|
|
21
|
-
} | null>;
|
|
22
|
-
export function next(type: string, config: ShisoConfig): {
|
|
23
|
-
generateMetadata: ({ params }: {
|
|
24
|
-
params: Promise<{
|
|
25
|
-
slug: string[];
|
|
26
|
-
}>;
|
|
27
|
-
}) => Promise<{
|
|
28
|
-
title: {
|
|
29
|
-
absolute: string;
|
|
30
|
-
default: any;
|
|
31
|
-
};
|
|
32
|
-
}>;
|
|
33
|
-
generateStaticParams: () => Promise<any>;
|
|
34
|
-
renderPage: (render: ({ type, content, config, }: {
|
|
35
|
-
type: string;
|
|
36
|
-
content: any;
|
|
37
|
-
config: ShisoConfig;
|
|
38
|
-
}) => ReactElement) => ({ params }: {
|
|
39
|
-
params: Promise<{
|
|
40
|
-
slug: string[];
|
|
41
|
-
}>;
|
|
42
|
-
}) => Promise<ReactElement<unknown, string | import("react").JSXElementConstructor<any>>>;
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
|
package/dist/server.js
DELETED
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
12
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
-
function step(op) {
|
|
15
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
-
switch (op[0]) {
|
|
20
|
-
case 0: case 1: t = op; break;
|
|
21
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
-
default:
|
|
25
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
-
if (t[2]) _.ops.pop();
|
|
30
|
-
_.trys.pop(); continue;
|
|
31
|
-
}
|
|
32
|
-
op = body.call(thisArg, _);
|
|
33
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
import { cache } from 'react';
|
|
38
|
-
import { compile } from '@mdx-js/mdx';
|
|
39
|
-
import remarkGfm from 'remark-gfm';
|
|
40
|
-
import rehypeHighlight from 'rehype-highlight';
|
|
41
|
-
import matter from 'gray-matter';
|
|
42
|
-
import fs from 'node:fs/promises';
|
|
43
|
-
import path from 'node:path';
|
|
44
|
-
import recursive from 'recursive-readdir';
|
|
45
|
-
export var getContent = cache(function (file) { return __awaiter(void 0, void 0, void 0, function () {
|
|
46
|
-
var postContent, _a, frontmatter, mdxContent, anchors_1, modifiedContent, code, _b, _c;
|
|
47
|
-
return __generator(this, function (_d) {
|
|
48
|
-
switch (_d.label) {
|
|
49
|
-
case 0:
|
|
50
|
-
_d.trys.push([0, 3, , 4]);
|
|
51
|
-
return [4 /*yield*/, fs.readFile(file, 'utf8')];
|
|
52
|
-
case 1:
|
|
53
|
-
postContent = _d.sent();
|
|
54
|
-
_a = matter(postContent), frontmatter = _a.data, mdxContent = _a.content;
|
|
55
|
-
anchors_1 = [];
|
|
56
|
-
modifiedContent = mdxContent
|
|
57
|
-
.split('\n')
|
|
58
|
-
.map(function (line) {
|
|
59
|
-
var match = line.match(/^(#+)\s+(.*)/);
|
|
60
|
-
if (match) {
|
|
61
|
-
var num = match[1], name_1 = match[2];
|
|
62
|
-
var id = name_1.toLowerCase().replace(/\s+/g, '-');
|
|
63
|
-
var size = num.length;
|
|
64
|
-
anchors_1.push({ name: name_1, id: id, size: size });
|
|
65
|
-
return "<h".concat(size, " id=\"").concat(id, "\">").concat(name_1.replace(/\{|\}/g, ''), "</h").concat(size, ">");
|
|
66
|
-
}
|
|
67
|
-
return line;
|
|
68
|
-
})
|
|
69
|
-
.join('\n');
|
|
70
|
-
_b = String;
|
|
71
|
-
return [4 /*yield*/, compile(modifiedContent, {
|
|
72
|
-
outputFormat: 'function-body',
|
|
73
|
-
remarkPlugins: [remarkGfm],
|
|
74
|
-
rehypePlugins: [rehypeHighlight],
|
|
75
|
-
})];
|
|
76
|
-
case 2:
|
|
77
|
-
code = _b.apply(void 0, [_d.sent()]);
|
|
78
|
-
return [2 /*return*/, {
|
|
79
|
-
path: file,
|
|
80
|
-
meta: frontmatter,
|
|
81
|
-
content: postContent,
|
|
82
|
-
code: code,
|
|
83
|
-
anchors: anchors_1,
|
|
84
|
-
}];
|
|
85
|
-
case 3:
|
|
86
|
-
_c = _d.sent();
|
|
87
|
-
return [2 /*return*/, null];
|
|
88
|
-
case 4: return [2 /*return*/];
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
}); });
|
|
92
|
-
export function next(type, config) {
|
|
93
|
-
var dir = path.join(config.contentDir, type);
|
|
94
|
-
var _a = config[type].title, title = _a === void 0 ? 'Shiso' : _a;
|
|
95
|
-
function generateMetadata(_a) {
|
|
96
|
-
return __awaiter(this, arguments, void 0, function (_b) {
|
|
97
|
-
var name, file, content;
|
|
98
|
-
var _c, _d, _e;
|
|
99
|
-
var params = _b.params;
|
|
100
|
-
return __generator(this, function (_f) {
|
|
101
|
-
switch (_f.label) {
|
|
102
|
-
case 0: return [4 /*yield*/, params];
|
|
103
|
-
case 1:
|
|
104
|
-
name = ((_d = (_c = (_f.sent())) === null || _c === void 0 ? void 0 : _c.slug) === null || _d === void 0 ? void 0 : _d.join('/')) || 'index';
|
|
105
|
-
file = path.join(dir, "".concat(name, ".mdx"));
|
|
106
|
-
return [4 /*yield*/, getContent(file)];
|
|
107
|
-
case 2:
|
|
108
|
-
content = _f.sent();
|
|
109
|
-
return [2 /*return*/, {
|
|
110
|
-
title: {
|
|
111
|
-
absolute: "".concat((_e = content === null || content === void 0 ? void 0 : content.meta) === null || _e === void 0 ? void 0 : _e.title, " \u2013 ").concat(title),
|
|
112
|
-
default: title,
|
|
113
|
-
},
|
|
114
|
-
}];
|
|
115
|
-
}
|
|
116
|
-
});
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
function generateStaticParams() {
|
|
120
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
121
|
-
var files;
|
|
122
|
-
return __generator(this, function (_a) {
|
|
123
|
-
switch (_a.label) {
|
|
124
|
-
case 0: return [4 /*yield*/, recursive(dir)];
|
|
125
|
-
case 1:
|
|
126
|
-
files = _a.sent();
|
|
127
|
-
return [2 /*return*/, files
|
|
128
|
-
.map(function (file) {
|
|
129
|
-
return file.replace('.mdx', '').replace(dir, '').replace(/\\/g, '/').replace(/^\//, '');
|
|
130
|
-
})
|
|
131
|
-
.map(function (id) { return ({
|
|
132
|
-
id: id.split('/'),
|
|
133
|
-
}); })];
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
function renderPage(render) {
|
|
139
|
-
var _this = this;
|
|
140
|
-
return function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
|
|
141
|
-
var name, file, content;
|
|
142
|
-
var _c, _d;
|
|
143
|
-
var params = _b.params;
|
|
144
|
-
return __generator(this, function (_e) {
|
|
145
|
-
switch (_e.label) {
|
|
146
|
-
case 0: return [4 /*yield*/, params];
|
|
147
|
-
case 1:
|
|
148
|
-
name = ((_d = (_c = (_e.sent())) === null || _c === void 0 ? void 0 : _c.slug) === null || _d === void 0 ? void 0 : _d.join('/')) || 'index';
|
|
149
|
-
file = path.join(dir, "".concat(name, ".mdx"));
|
|
150
|
-
return [4 /*yield*/, getContent(file)];
|
|
151
|
-
case 2:
|
|
152
|
-
content = _e.sent();
|
|
153
|
-
return [2 /*return*/, render({ type: type, content: content, config: config })];
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
}); };
|
|
157
|
-
}
|
|
158
|
-
return { generateMetadata: generateMetadata, generateStaticParams: generateStaticParams, renderPage: renderPage };
|
|
159
|
-
}
|