@umami/shiso 0.25.0 → 0.27.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 +17 -22
- package/dist/index.js +64 -24
- package/dist/index.mjs +80 -34
- package/package.json +7 -7
package/dist/index.css
CHANGED
|
@@ -34,76 +34,71 @@ pre.CodeBlock_container__YmFmN code {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
/* virtual-css:css:0ed498f49b21d225f1b5a4e1685cf2e5 */
|
|
37
|
-
.
|
|
38
|
-
position: sticky;
|
|
39
|
-
top: 0;
|
|
40
|
-
}
|
|
41
|
-
.PageLinks_links__ODM4N {
|
|
37
|
+
.PageLinks_links__MjgyM {
|
|
42
38
|
position: sticky;
|
|
43
39
|
top: 30px;
|
|
44
40
|
height: max-content;
|
|
45
41
|
}
|
|
46
|
-
.
|
|
42
|
+
.PageLinks_links__MjgyM a.PageLinks_link__YWRjO {
|
|
47
43
|
display: block;
|
|
48
44
|
color: var(--font-color-muted);
|
|
49
45
|
font-size: var(--font-size);
|
|
50
46
|
text-wrap: nowrap;
|
|
51
47
|
text-decoration: none;
|
|
52
48
|
}
|
|
53
|
-
.
|
|
49
|
+
.PageLinks_links__MjgyM a.PageLinks_link__YWRjO:hover {
|
|
54
50
|
color: var(--primary-color);
|
|
55
51
|
text-decoration: none;
|
|
56
52
|
}
|
|
57
|
-
.PageLinks_indent-
|
|
53
|
+
.PageLinks_indent-1__MDcyM {
|
|
58
54
|
margin-left: 0;
|
|
59
55
|
}
|
|
60
|
-
.PageLinks_indent-
|
|
56
|
+
.PageLinks_indent-2__OWYxZ {
|
|
61
57
|
margin-left: 0;
|
|
62
58
|
}
|
|
63
|
-
.PageLinks_indent-
|
|
59
|
+
.PageLinks_indent-3__ZmYwM {
|
|
64
60
|
margin-left: 10px;
|
|
65
61
|
}
|
|
66
|
-
.PageLinks_indent-
|
|
62
|
+
.PageLinks_indent-4__NzU2Y {
|
|
67
63
|
margin-left: 20px;
|
|
68
64
|
}
|
|
69
|
-
.PageLinks_indent-
|
|
65
|
+
.PageLinks_indent-5__NmVkY {
|
|
70
66
|
margin-left: 30px;
|
|
71
67
|
}
|
|
72
|
-
.PageLinks_indent-
|
|
68
|
+
.PageLinks_indent-6__NzQ4N {
|
|
73
69
|
margin-left: 40px;
|
|
74
70
|
}
|
|
75
|
-
.
|
|
71
|
+
.PageLinks_links__MjgyM a.PageLinks_selected__YmZhY {
|
|
76
72
|
color: var(--primary-color);
|
|
77
73
|
}
|
|
78
74
|
|
|
79
75
|
/* virtual-css:css:72ce2cfbba7b635b2ff1a5f4f5eeabf3 */
|
|
80
|
-
.
|
|
81
|
-
height: max-content;
|
|
76
|
+
.SideNav_nav__MDQ3Z {
|
|
82
77
|
overflow-y: auto;
|
|
83
78
|
}
|
|
84
|
-
.
|
|
79
|
+
.SideNav_nav__MDQ3Z.SideNav_sticky__ZjQ5Y {
|
|
85
80
|
position: sticky;
|
|
86
81
|
}
|
|
87
|
-
.
|
|
82
|
+
.SideNav_nav__MDQ3Z .SideNav_item__ZWU3Z {
|
|
88
83
|
color: var(--font-color-muted);
|
|
89
84
|
padding: 0;
|
|
90
85
|
border-radius: 0;
|
|
91
86
|
border-left: var(--border-size-1) solid var(--border-color);
|
|
92
87
|
}
|
|
93
|
-
.
|
|
88
|
+
.SideNav_nav__MDQ3Z .SideNav_item__ZWU3Z a {
|
|
94
89
|
color: currentColor;
|
|
95
90
|
width: 100%;
|
|
96
91
|
padding: var(--padding-y) var(--padding-x);
|
|
97
92
|
text-decoration: none;
|
|
98
93
|
}
|
|
99
|
-
.
|
|
94
|
+
.SideNav_nav__MDQ3Z .SideNav_item__ZWU3Z a:hover {
|
|
100
95
|
color: var(--primary-color);
|
|
101
96
|
}
|
|
102
|
-
.
|
|
97
|
+
.SideNav_nav__MDQ3Z .SideNav_item__ZWU3Z.SideNav_selected__NDgxN {
|
|
103
98
|
color: var(--font-color);
|
|
104
99
|
border-color: var(--primary-color);
|
|
105
100
|
}
|
|
106
|
-
.
|
|
101
|
+
.SideNav_items__MzBhY header {
|
|
107
102
|
padding: var(--padding-y) 0;
|
|
108
103
|
}
|
|
109
104
|
|
package/dist/index.js
CHANGED
|
@@ -160,7 +160,7 @@ var import_react_zen5 = require("@umami/react-zen");
|
|
|
160
160
|
var import_classnames = __toESM(require("classnames"));
|
|
161
161
|
|
|
162
162
|
// css-modules:/Users/mikecao/Development/umami-software/shiso/src/components/PageLinks.module.css
|
|
163
|
-
var PageLinks_default = { "
|
|
163
|
+
var PageLinks_default = { "links": "PageLinks_links__MjgyM", "link": "PageLinks_link__YWRjO", "indent-1": "PageLinks_indent-1__MDcyM", "indent-2": "PageLinks_indent-2__OWYxZ", "indent-3": "PageLinks_indent-3__ZmYwM", "indent-4": "PageLinks_indent-4__NzU2Y", "indent-5": "PageLinks_indent-5__NmVkY", "indent-6": "PageLinks_indent-6__NzQ4N", "selected": "PageLinks_selected__YmZhY" };
|
|
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.
|
|
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", className: (0, import_classnames.default)(PageLinks_default.links, className), 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)(
|
|
@@ -197,38 +197,65 @@ function PageLinks({ items = [], className, ...props }) {
|
|
|
197
197
|
id
|
|
198
198
|
);
|
|
199
199
|
})
|
|
200
|
-
] });
|
|
200
|
+
] }) });
|
|
201
201
|
}
|
|
202
202
|
|
|
203
203
|
// src/components/SideNav.tsx
|
|
204
|
+
var import_react7 = require("react");
|
|
204
205
|
var import_react_zen6 = require("@umami/react-zen");
|
|
205
206
|
var import_classnames2 = __toESM(require("classnames"));
|
|
206
207
|
var import_navigation = require("next/navigation");
|
|
207
208
|
var import_link = __toESM(require("next/link"));
|
|
208
209
|
|
|
209
210
|
// css-modules:/Users/mikecao/Development/umami-software/shiso/src/components/SideNav.module.css
|
|
210
|
-
var SideNav_default = { "nav": "
|
|
211
|
+
var SideNav_default = { "nav": "SideNav_nav__MDQ3Z", "sticky": "SideNav_sticky__ZjQ5Y", "item": "SideNav_item__ZWU3Z", "selected": "SideNav_selected__NDgxN", "items": "SideNav_items__MzBhY" };
|
|
211
212
|
|
|
212
213
|
// src/components/SideNav.tsx
|
|
213
214
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
214
|
-
function SideNav({
|
|
215
|
+
function SideNav({
|
|
216
|
+
tabs,
|
|
217
|
+
navigation,
|
|
218
|
+
isSticky,
|
|
219
|
+
autoHeight,
|
|
220
|
+
className,
|
|
221
|
+
style,
|
|
222
|
+
...props
|
|
223
|
+
}) {
|
|
215
224
|
const pathname = (0, import_navigation.usePathname)();
|
|
216
225
|
const tab = tabs?.find(({ url, id }) => id !== "docs" ? pathname.startsWith(url) : false);
|
|
217
226
|
const menu = navigation[tab?.id || "docs"];
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
227
|
+
const [height, setHeight] = (0, import_react7.useState)();
|
|
228
|
+
(0, import_react7.useEffect)(() => {
|
|
229
|
+
if (autoHeight) {
|
|
230
|
+
const rect = document.getElementById("shiso_docs_sidenav")?.getBoundingClientRect();
|
|
231
|
+
if (rect) {
|
|
232
|
+
setHeight(`${window.innerHeight - rect.top - 10}px`);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}, [autoHeight]);
|
|
236
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
237
|
+
import_react_zen6.Box,
|
|
238
|
+
{
|
|
239
|
+
...props,
|
|
240
|
+
id: "shiso_docs_sidenav",
|
|
241
|
+
className: (0, import_classnames2.default)(SideNav_default.nav, isSticky && SideNav_default.sticky, className),
|
|
242
|
+
style: { ...style, height },
|
|
243
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_zen6.List, { items: navigation, "aria-label": "nav", children: menu.map(({ section, pages }) => {
|
|
244
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_zen6.ListSection, { title: section, className: SideNav_default.items, children: pages.map(({ label: text, url }, index) => {
|
|
245
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
246
|
+
import_react_zen6.ListItem,
|
|
247
|
+
{
|
|
248
|
+
className: (0, import_classnames2.default)(SideNav_default.item, {
|
|
249
|
+
[SideNav_default.selected]: url === pathname
|
|
250
|
+
}),
|
|
251
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_link.default, { href: url, prefetch: false, children: text })
|
|
252
|
+
},
|
|
253
|
+
index
|
|
254
|
+
);
|
|
255
|
+
}) }, section);
|
|
256
|
+
}) })
|
|
257
|
+
}
|
|
258
|
+
);
|
|
232
259
|
}
|
|
233
260
|
|
|
234
261
|
// src/components/TopNav.tsx
|
|
@@ -322,16 +349,28 @@ function Docs() {
|
|
|
322
349
|
xs: "none",
|
|
323
350
|
sm: "none",
|
|
324
351
|
md: "none",
|
|
325
|
-
lg: "
|
|
326
|
-
xl: "
|
|
352
|
+
lg: "block",
|
|
353
|
+
xl: "block"
|
|
327
354
|
};
|
|
328
355
|
const menuDisplay = {
|
|
329
|
-
default: "
|
|
356
|
+
default: "block",
|
|
330
357
|
lg: "none",
|
|
331
358
|
xl: "none"
|
|
332
359
|
};
|
|
360
|
+
const MobileMenuButton = () => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react_zen9.DialogTrigger, { children: [
|
|
361
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react_zen9.Button, { children: [
|
|
362
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_zen9.Icon, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_zen9.Icons.Menu, {}) }),
|
|
363
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_zen9.Text, { children: "Menu" })
|
|
364
|
+
] }),
|
|
365
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_zen9.Modal, { position: "bottom", offset: "40px", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_zen9.Dialog, { variant: "sheet", children: ({ close }) => {
|
|
366
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
|
|
367
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_zen9.Row, { justifyContent: "flex-end", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_zen9.Button, { onPress: () => close(), variant: "quiet", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_zen9.Icon, { size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_zen9.Icons.Close, {}) }) }) }),
|
|
368
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_zen9.Box, { height: "100%", overflow: "auto", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SideNav, { tabs, navigation }) })
|
|
369
|
+
] });
|
|
370
|
+
} }) })
|
|
371
|
+
] });
|
|
333
372
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react_zen9.Box, { flexGrow: "1", children: [
|
|
334
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_zen9.Row, { display: menuDisplay, justifyContent: "flex-end", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
373
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_zen9.Row, { display: menuDisplay, justifyContent: "flex-end", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(MobileMenuButton, {}) }),
|
|
335
374
|
tabs && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(TopNav, { tabs }),
|
|
336
375
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
337
376
|
import_react_zen9.Grid,
|
|
@@ -346,7 +385,8 @@ function Docs() {
|
|
|
346
385
|
tabs,
|
|
347
386
|
navigation,
|
|
348
387
|
style: { top },
|
|
349
|
-
isSticky: true
|
|
388
|
+
isSticky: true,
|
|
389
|
+
autoHeight: true
|
|
350
390
|
}
|
|
351
391
|
),
|
|
352
392
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
package/dist/index.mjs
CHANGED
|
@@ -64,10 +64,16 @@ function Blog({ content }) {
|
|
|
64
64
|
// src/components/Docs.tsx
|
|
65
65
|
import {
|
|
66
66
|
Grid,
|
|
67
|
-
Box as
|
|
67
|
+
Box as Box4,
|
|
68
68
|
Heading as Heading2,
|
|
69
|
+
Button,
|
|
70
|
+
Icon as Icon3,
|
|
71
|
+
Icons as Icons3,
|
|
69
72
|
Row as Row2,
|
|
70
|
-
|
|
73
|
+
Modal,
|
|
74
|
+
DialogTrigger,
|
|
75
|
+
Dialog,
|
|
76
|
+
Text as Text3
|
|
71
77
|
} from "@umami/react-zen";
|
|
72
78
|
|
|
73
79
|
// src/components/hooks/useShiso.ts
|
|
@@ -126,11 +132,11 @@ function useShiso() {
|
|
|
126
132
|
|
|
127
133
|
// src/components/PageLinks.tsx
|
|
128
134
|
import { useEffect, useState as useState2 } from "react";
|
|
129
|
-
import { Column as Column3, Text } from "@umami/react-zen";
|
|
135
|
+
import { Column as Column3, Text, Box } from "@umami/react-zen";
|
|
130
136
|
import classNames from "classnames";
|
|
131
137
|
|
|
132
138
|
// css-modules:/Users/mikecao/Development/umami-software/shiso/src/components/PageLinks.module.css
|
|
133
|
-
var PageLinks_default = { "
|
|
139
|
+
var PageLinks_default = { "links": "PageLinks_links__MjgyM", "link": "PageLinks_link__YWRjO", "indent-1": "PageLinks_indent-1__MDcyM", "indent-2": "PageLinks_indent-2__OWYxZ", "indent-3": "PageLinks_indent-3__ZmYwM", "indent-4": "PageLinks_indent-4__NzU2Y", "indent-5": "PageLinks_indent-5__NmVkY", "indent-6": "PageLinks_indent-6__NzQ4N", "selected": "PageLinks_selected__YmZhY" };
|
|
134
140
|
|
|
135
141
|
// src/components/PageLinks.tsx
|
|
136
142
|
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
@@ -152,7 +158,7 @@ function PageLinks({ items = [], className, ...props }) {
|
|
|
152
158
|
if (!items?.length) {
|
|
153
159
|
return null;
|
|
154
160
|
}
|
|
155
|
-
return /* @__PURE__ */
|
|
161
|
+
return /* @__PURE__ */ jsx6(Box, { ...props, children: /* @__PURE__ */ jsxs4(Column3, { gap: "3", minWidth: "240px", className: classNames(PageLinks_default.links, className), children: [
|
|
156
162
|
/* @__PURE__ */ jsx6(Text, { size: "2", weight: "bold", children: "On this page" }),
|
|
157
163
|
items.map(({ name, id, size }) => {
|
|
158
164
|
return /* @__PURE__ */ jsx6(
|
|
@@ -167,38 +173,65 @@ function PageLinks({ items = [], className, ...props }) {
|
|
|
167
173
|
id
|
|
168
174
|
);
|
|
169
175
|
})
|
|
170
|
-
] });
|
|
176
|
+
] }) });
|
|
171
177
|
}
|
|
172
178
|
|
|
173
179
|
// src/components/SideNav.tsx
|
|
174
|
-
import {
|
|
180
|
+
import { useEffect as useEffect2, useState as useState3 } from "react";
|
|
181
|
+
import { Box as Box2, List, ListItem, ListSection } from "@umami/react-zen";
|
|
175
182
|
import classNames2 from "classnames";
|
|
176
183
|
import { usePathname } from "next/navigation";
|
|
177
184
|
import Link from "next/link";
|
|
178
185
|
|
|
179
186
|
// css-modules:/Users/mikecao/Development/umami-software/shiso/src/components/SideNav.module.css
|
|
180
|
-
var SideNav_default = { "nav": "
|
|
187
|
+
var SideNav_default = { "nav": "SideNav_nav__MDQ3Z", "sticky": "SideNav_sticky__ZjQ5Y", "item": "SideNav_item__ZWU3Z", "selected": "SideNav_selected__NDgxN", "items": "SideNav_items__MzBhY" };
|
|
181
188
|
|
|
182
189
|
// src/components/SideNav.tsx
|
|
183
190
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
184
|
-
function SideNav({
|
|
191
|
+
function SideNav({
|
|
192
|
+
tabs,
|
|
193
|
+
navigation,
|
|
194
|
+
isSticky,
|
|
195
|
+
autoHeight,
|
|
196
|
+
className,
|
|
197
|
+
style,
|
|
198
|
+
...props
|
|
199
|
+
}) {
|
|
185
200
|
const pathname = usePathname();
|
|
186
201
|
const tab = tabs?.find(({ url, id }) => id !== "docs" ? pathname.startsWith(url) : false);
|
|
187
202
|
const menu = navigation[tab?.id || "docs"];
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
203
|
+
const [height, setHeight] = useState3();
|
|
204
|
+
useEffect2(() => {
|
|
205
|
+
if (autoHeight) {
|
|
206
|
+
const rect = document.getElementById("shiso_docs_sidenav")?.getBoundingClientRect();
|
|
207
|
+
if (rect) {
|
|
208
|
+
setHeight(`${window.innerHeight - rect.top - 10}px`);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}, [autoHeight]);
|
|
212
|
+
return /* @__PURE__ */ jsx7(
|
|
213
|
+
Box2,
|
|
214
|
+
{
|
|
215
|
+
...props,
|
|
216
|
+
id: "shiso_docs_sidenav",
|
|
217
|
+
className: classNames2(SideNav_default.nav, isSticky && SideNav_default.sticky, className),
|
|
218
|
+
style: { ...style, height },
|
|
219
|
+
children: /* @__PURE__ */ jsx7(List, { items: navigation, "aria-label": "nav", children: menu.map(({ section, pages }) => {
|
|
220
|
+
return /* @__PURE__ */ jsx7(ListSection, { title: section, className: SideNav_default.items, children: pages.map(({ label: text, url }, index) => {
|
|
221
|
+
return /* @__PURE__ */ jsx7(
|
|
222
|
+
ListItem,
|
|
223
|
+
{
|
|
224
|
+
className: classNames2(SideNav_default.item, {
|
|
225
|
+
[SideNav_default.selected]: url === pathname
|
|
226
|
+
}),
|
|
227
|
+
children: /* @__PURE__ */ jsx7(Link, { href: url, prefetch: false, children: text })
|
|
228
|
+
},
|
|
229
|
+
index
|
|
230
|
+
);
|
|
231
|
+
}) }, section);
|
|
232
|
+
}) })
|
|
233
|
+
}
|
|
234
|
+
);
|
|
202
235
|
}
|
|
203
236
|
|
|
204
237
|
// src/components/TopNav.tsx
|
|
@@ -216,7 +249,7 @@ function TopNav({ tabs }) {
|
|
|
216
249
|
}
|
|
217
250
|
|
|
218
251
|
// src/components/ContentArea.tsx
|
|
219
|
-
import { Heading, Box as
|
|
252
|
+
import { Heading, Box as Box3, Text as Text2, Row, Icon as Icon2, Icons as Icons2 } from "@umami/react-zen";
|
|
220
253
|
|
|
221
254
|
// css-modules:/Users/mikecao/Development/umami-software/shiso/src/components/ContentArea.module.css
|
|
222
255
|
var ContentArea_default = { "content": "ContentArea_content__NDVhM" };
|
|
@@ -225,11 +258,11 @@ var ContentArea_default = { "content": "ContentArea_content__NDVhM" };
|
|
|
225
258
|
import Link3 from "next/link";
|
|
226
259
|
import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
227
260
|
function ContentArea({ section, title, description, code, next, prev }) {
|
|
228
|
-
return /* @__PURE__ */ jsxs5(
|
|
261
|
+
return /* @__PURE__ */ jsxs5(Box3, { flexGrow: 1, children: [
|
|
229
262
|
section && /* @__PURE__ */ jsx9(Text2, { color: "primary", weight: "bold", children: section }),
|
|
230
263
|
title && /* @__PURE__ */ jsx9(Heading, { size: "2", as: "h1", children: title }),
|
|
231
264
|
description && /* @__PURE__ */ jsx9(Text2, { color: "muted", children: description }),
|
|
232
|
-
/* @__PURE__ */ jsx9(
|
|
265
|
+
/* @__PURE__ */ jsx9(Box3, { className: ContentArea_default.content, children: /* @__PURE__ */ jsx9(Markdown, { code }) }),
|
|
233
266
|
/* @__PURE__ */ jsxs5(Row, { justifyContent: "space-between", children: [
|
|
234
267
|
/* @__PURE__ */ jsx9(NavigationButton, { ...prev, isPrev: true }),
|
|
235
268
|
/* @__PURE__ */ jsx9(NavigationButton, { ...next })
|
|
@@ -242,7 +275,7 @@ var NavigationButton = ({
|
|
|
242
275
|
isPrev
|
|
243
276
|
}) => {
|
|
244
277
|
if (!url || !label) {
|
|
245
|
-
return /* @__PURE__ */ jsx9(
|
|
278
|
+
return /* @__PURE__ */ jsx9(Box3, {});
|
|
246
279
|
}
|
|
247
280
|
return /* @__PURE__ */ jsx9(Link3, { href: url, children: /* @__PURE__ */ jsxs5(Row, { alignItems: "center", gap: "3", marginY: "3", children: [
|
|
248
281
|
isPrev && /* @__PURE__ */ jsx9(Icon2, { size: "sm", rotate: 180, children: /* @__PURE__ */ jsx9(Icons2.Chevron, {}) }),
|
|
@@ -252,7 +285,7 @@ var NavigationButton = ({
|
|
|
252
285
|
};
|
|
253
286
|
|
|
254
287
|
// src/components/Docs.tsx
|
|
255
|
-
import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
288
|
+
import { Fragment, jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
256
289
|
function parseContent(content, config = {}) {
|
|
257
290
|
const { tabs, navigation } = config;
|
|
258
291
|
const keys = Object.keys(navigation);
|
|
@@ -292,16 +325,28 @@ function Docs() {
|
|
|
292
325
|
xs: "none",
|
|
293
326
|
sm: "none",
|
|
294
327
|
md: "none",
|
|
295
|
-
lg: "
|
|
296
|
-
xl: "
|
|
328
|
+
lg: "block",
|
|
329
|
+
xl: "block"
|
|
297
330
|
};
|
|
298
331
|
const menuDisplay = {
|
|
299
|
-
default: "
|
|
332
|
+
default: "block",
|
|
300
333
|
lg: "none",
|
|
301
334
|
xl: "none"
|
|
302
335
|
};
|
|
303
|
-
|
|
304
|
-
/* @__PURE__ */
|
|
336
|
+
const MobileMenuButton = () => /* @__PURE__ */ jsxs6(DialogTrigger, { children: [
|
|
337
|
+
/* @__PURE__ */ jsxs6(Button, { children: [
|
|
338
|
+
/* @__PURE__ */ jsx10(Icon3, { children: /* @__PURE__ */ jsx10(Icons3.Menu, {}) }),
|
|
339
|
+
/* @__PURE__ */ jsx10(Text3, { children: "Menu" })
|
|
340
|
+
] }),
|
|
341
|
+
/* @__PURE__ */ jsx10(Modal, { position: "bottom", offset: "40px", children: /* @__PURE__ */ jsx10(Dialog, { variant: "sheet", children: ({ close }) => {
|
|
342
|
+
return /* @__PURE__ */ jsxs6(Fragment, { children: [
|
|
343
|
+
/* @__PURE__ */ jsx10(Row2, { justifyContent: "flex-end", children: /* @__PURE__ */ jsx10(Button, { onPress: () => close(), variant: "quiet", children: /* @__PURE__ */ jsx10(Icon3, { size: "sm", children: /* @__PURE__ */ jsx10(Icons3.Close, {}) }) }) }),
|
|
344
|
+
/* @__PURE__ */ jsx10(Box4, { height: "100%", overflow: "auto", children: /* @__PURE__ */ jsx10(SideNav, { tabs, navigation }) })
|
|
345
|
+
] });
|
|
346
|
+
} }) })
|
|
347
|
+
] });
|
|
348
|
+
return /* @__PURE__ */ jsxs6(Box4, { flexGrow: "1", children: [
|
|
349
|
+
/* @__PURE__ */ jsx10(Row2, { display: menuDisplay, justifyContent: "flex-end", children: /* @__PURE__ */ jsx10(MobileMenuButton, {}) }),
|
|
305
350
|
tabs && /* @__PURE__ */ jsx10(TopNav, { tabs }),
|
|
306
351
|
/* @__PURE__ */ jsxs6(
|
|
307
352
|
Grid,
|
|
@@ -316,7 +361,8 @@ function Docs() {
|
|
|
316
361
|
tabs,
|
|
317
362
|
navigation,
|
|
318
363
|
style: { top },
|
|
319
|
-
isSticky: true
|
|
364
|
+
isSticky: true,
|
|
365
|
+
autoHeight: true
|
|
320
366
|
}
|
|
321
367
|
),
|
|
322
368
|
/* @__PURE__ */ jsx10(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umami/shiso",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.0",
|
|
4
4
|
"description": "A content layer for Next.js",
|
|
5
5
|
"homepage": "https://umami.is/shiso",
|
|
6
6
|
"repository": {
|
|
@@ -46,12 +46,12 @@
|
|
|
46
46
|
"@mdx-js/loader": "^3.0.0",
|
|
47
47
|
"@mdx-js/mdx": "^3.1.0",
|
|
48
48
|
"@mdx-js/react": "^3.0.0",
|
|
49
|
-
"@umami/react-zen": "^0.
|
|
49
|
+
"@umami/react-zen": "^0.41.0",
|
|
50
50
|
"classnames": "^2.5.1",
|
|
51
51
|
"glob": "^10.3.10",
|
|
52
52
|
"gray-matter": "^4.0.3",
|
|
53
|
-
"highlight.js": "^11.11.
|
|
54
|
-
"next": "15.1.
|
|
53
|
+
"highlight.js": "^11.11.1",
|
|
54
|
+
"next": "15.1.3",
|
|
55
55
|
"next-mdx-remote": "^5.0.0",
|
|
56
56
|
"react": "^19.0.0",
|
|
57
57
|
"react-dom": "^19.0.0",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"@svgr/webpack": "^8.1.0",
|
|
66
66
|
"@types/css-modules": "^1.0.5",
|
|
67
67
|
"@types/mdx": "^2.0.11",
|
|
68
|
-
"@types/node": "^22.10.
|
|
68
|
+
"@types/node": "^22.10.4",
|
|
69
69
|
"@types/react": "^19.0.2",
|
|
70
70
|
"@types/react-dom": "^19.0.2",
|
|
71
71
|
"@umami/esbuild-plugin-css-modules": "^0.4.0",
|
|
@@ -73,13 +73,13 @@
|
|
|
73
73
|
"esbuild": "^0.24.2",
|
|
74
74
|
"esbuild-plugin-css-modules": "^0.3.0",
|
|
75
75
|
"eslint": "^8",
|
|
76
|
-
"eslint-config-next": "15.
|
|
76
|
+
"eslint-config-next": "15.1.3",
|
|
77
77
|
"eslint-config-prettier": "^9.1.0",
|
|
78
78
|
"eslint-import-resolver-alias": "^1.1.2",
|
|
79
79
|
"eslint-plugin-import": "^2.29.1",
|
|
80
80
|
"eslint-plugin-prettier": "^5.1.3",
|
|
81
81
|
"husky": "^9.1.1",
|
|
82
|
-
"lint-staged": "^15.
|
|
82
|
+
"lint-staged": "^15.3.0",
|
|
83
83
|
"npm-run-all": "^4.1.5",
|
|
84
84
|
"prettier": "^3.2.5",
|
|
85
85
|
"remark-frontmatter": "^5.0.0",
|