@umami/shiso 0.50.0 → 0.52.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 +7 -6
- package/dist/index.js +19 -33
- package/dist/index.mjs +36 -49
- package/package.json +16 -16
- package/styles.css +1348 -1096
package/dist/index.css
CHANGED
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
/* virtual-css:css:2dd9c1a25bf05a14c9a7ab7ce1da6aef */
|
|
41
|
-
.
|
|
41
|
+
.CodeBlock_container__OGZlM {
|
|
42
42
|
position: relative;
|
|
43
43
|
background: var(--background-color);
|
|
44
44
|
border: 1px solid var(--base-color-1);
|
|
@@ -47,14 +47,15 @@
|
|
|
47
47
|
white-space: pre-wrap;
|
|
48
48
|
word-wrap: break-word;
|
|
49
49
|
}
|
|
50
|
-
pre.
|
|
50
|
+
pre.CodeBlock_container__OGZlM code {
|
|
51
51
|
font-family: var(--font-family-code);
|
|
52
52
|
color: var(--font-color);
|
|
53
|
+
font-size: var(--font-size);
|
|
53
54
|
padding: 0;
|
|
54
55
|
border: 0;
|
|
55
56
|
background: transparent;
|
|
56
57
|
}
|
|
57
|
-
.
|
|
58
|
+
.CodeBlock_button__Y2Y2Z {
|
|
58
59
|
border: 0;
|
|
59
60
|
position: absolute;
|
|
60
61
|
right: var(--spacing-5);
|
|
@@ -62,13 +63,13 @@ pre.CodeBlock_container__YzkwN code {
|
|
|
62
63
|
cursor: pointer;
|
|
63
64
|
background: transparent;
|
|
64
65
|
}
|
|
65
|
-
.
|
|
66
|
+
.CodeBlock_copy__NWI2Y {
|
|
66
67
|
color: var(--base-color-4);
|
|
67
68
|
}
|
|
68
|
-
.
|
|
69
|
+
.CodeBlock_copy__NWI2Y:hover {
|
|
69
70
|
color: var(--base-color-1);
|
|
70
71
|
}
|
|
71
|
-
.
|
|
72
|
+
.CodeBlock_check__YzQzO {
|
|
72
73
|
color: var(--success-color);
|
|
73
74
|
}
|
|
74
75
|
|
package/dist/index.js
CHANGED
|
@@ -98,13 +98,15 @@ var import_react_zen10 = require("@umami/react-zen");
|
|
|
98
98
|
// src/components/CodeBlock.tsx
|
|
99
99
|
var import_react2 = require("react");
|
|
100
100
|
var import_react_zen2 = require("@umami/react-zen");
|
|
101
|
+
var import_google = require("next/font/google");
|
|
101
102
|
|
|
102
103
|
// css-modules:E:\dev\umami-shiso\src\components\CodeBlock.module.css
|
|
103
|
-
var CodeBlock_default = { "container": "
|
|
104
|
+
var CodeBlock_default = { "container": "CodeBlock_container__OGZlM", "button": "CodeBlock_button__Y2Y2Z", "copy": "CodeBlock_copy__NWI2Y", "check": "CodeBlock_check__YzQzO" };
|
|
104
105
|
|
|
105
106
|
// src/components/CodeBlock.tsx
|
|
106
107
|
var import_classnames2 = __toESM(require("classnames"));
|
|
107
108
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
109
|
+
var mono = (0, import_google.JetBrains_Mono)({ subsets: ["latin"] });
|
|
108
110
|
function CodeBlock(props) {
|
|
109
111
|
const textInput = (0, import_react2.useRef)(null);
|
|
110
112
|
const [copied, setCopied] = (0, import_react2.useState)(false);
|
|
@@ -115,7 +117,7 @@ function CodeBlock(props) {
|
|
|
115
117
|
setCopied(false);
|
|
116
118
|
}, 1e3);
|
|
117
119
|
};
|
|
118
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("pre", { ref: textInput, className: (0, import_classnames2.default)(CodeBlock_default.container, "dark-theme"), children: [
|
|
120
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("pre", { ref: textInput, className: (0, import_classnames2.default)(CodeBlock_default.container, mono.className, "dark-theme"), children: [
|
|
119
121
|
props.children,
|
|
120
122
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("button", { "aria-label": "Copy code", className: CodeBlock_default.button, onClick: handleCopy, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_zen2.Icon, { size: "sm", className: copied ? CodeBlock_default.check : CodeBlock_default.copy, children: copied ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_zen2.Icons.Check, {}) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_zen2.Icons.Copy, {}) }) })
|
|
121
123
|
] });
|
|
@@ -195,9 +197,9 @@ function TopNav({ tabs }) {
|
|
|
195
197
|
const pathname = (0, import_navigation2.usePathname)();
|
|
196
198
|
const tab = tabs?.find(({ id, url }) => id !== "docs" ? pathname.startsWith(url) : false);
|
|
197
199
|
const selected = tab?.id || "docs";
|
|
198
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_zen4.Tabs, { selectedKey: selected, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_zen4.TabList, { items: tabs, children: ({ id, label, url }) => {
|
|
200
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_zen4.Box, { maxWidth: "100vw", overflowX: "auto", overflowY: "hidden", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_zen4.Tabs, { selectedKey: selected, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_zen4.TabList, { items: tabs, children: ({ id, label, url }) => {
|
|
199
201
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_zen4.Tab, { id, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_link2.default, { href: url, children: label }) });
|
|
200
|
-
} }) });
|
|
202
|
+
} }) }) });
|
|
201
203
|
}
|
|
202
204
|
|
|
203
205
|
// src/components/DocContent.tsx
|
|
@@ -247,7 +249,7 @@ var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
|
247
249
|
function DocContent({ section, title, description, code, next, prev }) {
|
|
248
250
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_react_zen6.Box, { flexGrow: "1", children: [
|
|
249
251
|
section && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_zen6.Text, { color: "primary", weight: "bold", children: section }),
|
|
250
|
-
title && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_zen6.Heading, { size: "
|
|
252
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_zen6.Heading, { size: "5", as: "h1", marginY: "3", children: title }),
|
|
251
253
|
description && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_zen6.Text, { color: "muted", size: "3", children: description }),
|
|
252
254
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Markdown, { code }),
|
|
253
255
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_react_zen6.Row, { justifyContent: "space-between", children: [
|
|
@@ -307,40 +309,28 @@ function Docs({ content, config }) {
|
|
|
307
309
|
);
|
|
308
310
|
const { top } = config?.docs || {};
|
|
309
311
|
const navDisplay = {
|
|
310
|
-
default: "none",
|
|
311
312
|
xs: "none",
|
|
312
|
-
|
|
313
|
-
md: "none",
|
|
314
|
-
lg: "block",
|
|
315
|
-
xl: "block"
|
|
313
|
+
lg: "block"
|
|
316
314
|
};
|
|
317
315
|
const linksDisplay = {
|
|
318
|
-
default: "none",
|
|
319
316
|
xs: "none",
|
|
320
|
-
|
|
321
|
-
md: "none",
|
|
322
|
-
lg: "block",
|
|
323
|
-
xl: "block"
|
|
317
|
+
lg: "block"
|
|
324
318
|
};
|
|
325
319
|
const menuDisplay = {
|
|
326
|
-
lg: "none"
|
|
327
|
-
xl: "none"
|
|
320
|
+
lg: "none"
|
|
328
321
|
};
|
|
329
322
|
const MobileMenuButton = () => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react_zen7.DialogTrigger, { children: [
|
|
330
323
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react_zen7.Button, { children: [
|
|
331
324
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_zen7.Icon, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_zen7.Icons.Menu, {}) }),
|
|
332
325
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_zen7.Text, { children: "Menu" })
|
|
333
326
|
] }),
|
|
334
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_zen7.Modal, { position: "
|
|
335
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.
|
|
336
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_zen7.Row, { justifyContent: "flex-end", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_zen7.Button, { onPress: () => close(), variant: "quiet", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_zen7.Icon, { size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_zen7.Icons.Close, {}) }) }) }),
|
|
337
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_zen7.Box, { height: "100%", overflow: "auto", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SideNav, { tabs, navigation }) })
|
|
338
|
-
] });
|
|
327
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_zen7.Modal, { position: "left", offset: "70px", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_zen7.Dialog, { variant: "sheet", children: ({ close }) => {
|
|
328
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_zen7.Box, { overflow: "auto", padding: "4", onClick: close, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SideNav, { tabs, navigation }) });
|
|
339
329
|
} }) })
|
|
340
330
|
] });
|
|
341
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react_zen7.
|
|
342
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_zen7.Row, { display: menuDisplay, justifyContent: "flex-end", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(MobileMenuButton, {}) }),
|
|
331
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react_zen7.Column, { gap: "6", children: [
|
|
343
332
|
tabs && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(TopNav, { tabs }),
|
|
333
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_zen7.Row, { display: menuDisplay, justifyContent: "flex-end", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(MobileMenuButton, {}) }),
|
|
344
334
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react_zen7.Row, { gap: "6", children: [
|
|
345
335
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
346
336
|
SideNav,
|
|
@@ -378,7 +368,7 @@ var import_link4 = __toESM(require("next/link"));
|
|
|
378
368
|
var import_date_fns = require("date-fns");
|
|
379
369
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
380
370
|
function Card({ title, description, date, author, url, image }) {
|
|
381
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_zen8.Column, {
|
|
371
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_zen8.Column, { border: true, borderRadius: "3", overflow: "hidden", children: [
|
|
382
372
|
image && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_zen8.Box, { height: "240px", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_zen8.Image, { src: image, alt: title, objectFit: "cover" }) }),
|
|
383
373
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_zen8.Column, { padding: "6", gap: "4", flexGrow: "1", children: [
|
|
384
374
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_zen8.Row, { justifyContent: "space-between", children: [
|
|
@@ -389,7 +379,7 @@ function Card({ title, description, date, author, url, image }) {
|
|
|
389
379
|
] })
|
|
390
380
|
] }),
|
|
391
381
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_zen8.Column, { gap: "4", flexGrow: "1", children: [
|
|
392
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_zen8.Heading, { size: "
|
|
382
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_zen8.Heading, { size: "3", as: "header", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_link4.default, { href: url, children: title }) }),
|
|
393
383
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_zen8.Box, { marginY: "5", as: "p", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_zen8.Text, { color: "muted", size: "3", children: description }) })
|
|
394
384
|
] }),
|
|
395
385
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_zen8.Button, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_link4.default, { href: url, children: [
|
|
@@ -410,7 +400,7 @@ function Blogs({ content, config, ...props }) {
|
|
|
410
400
|
const items = content.sort(
|
|
411
401
|
(a, b) => new Date(b?.meta?.date).getTime() - new Date(a?.meta?.date).getTime()
|
|
412
402
|
);
|
|
413
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_zen9.Grid, { gap: "5", columns: "repeat(auto-fit, minmax(400px, 1fr)", children: items?.map(({ meta, slug }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Card, { url: `/blog/${slug}`, ...meta }, slug)) });
|
|
403
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_zen9.Grid, { gap: "5", columns: { xs: "1fr", lg: "repeat(auto-fit, minmax(400px, 1fr))" }, children: items?.map(({ meta, slug }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Card, { url: `/blog/${slug}`, ...meta }, slug)) });
|
|
414
404
|
}
|
|
415
405
|
|
|
416
406
|
// src/components/Shiso.tsx
|
|
@@ -445,15 +435,11 @@ function Blog({ title, code, author, date, image, anchors, backUrl }) {
|
|
|
445
435
|
const { config } = useShiso();
|
|
446
436
|
const { top } = config?.blog || {};
|
|
447
437
|
const linksDisplay = {
|
|
448
|
-
default: "none",
|
|
449
438
|
xs: "none",
|
|
450
|
-
|
|
451
|
-
md: "none",
|
|
452
|
-
lg: "block",
|
|
453
|
-
xl: "block"
|
|
439
|
+
lg: "block"
|
|
454
440
|
};
|
|
455
441
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_zen11.Column, { gap: "8", maxWidth: "960px", style: { margin: "0 auto" }, children: [
|
|
456
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_zen11.Box, { flexGrow: "1", paddingY: "6", children: title && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_zen11.Heading, { size: "
|
|
442
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_zen11.Box, { flexGrow: "1", paddingY: "6", children: title && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_zen11.Heading, { size: "6", as: "h1", align: "center", children: title }) }),
|
|
457
443
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_zen11.Row, { justifyContent: "space-between", children: [
|
|
458
444
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_zen11.Text, { color: "muted", children: date && (0, import_date_fns2.format)(new Date(date), "PPP") }),
|
|
459
445
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_zen11.Text, { color: "muted", children: [
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
// src/components/Blog.tsx
|
|
4
|
-
import { Heading as Heading4, Box as
|
|
4
|
+
import { Heading as Heading4, Box as Box7, Text as Text6, Row as Row4, Column as Column5, Image as Image2, Icon as Icon5, Icons as Icons5, Button as Button3 } from "@umami/react-zen";
|
|
5
5
|
import { format as format2 } from "date-fns";
|
|
6
6
|
|
|
7
7
|
// src/components/PageLinks.tsx
|
|
@@ -61,13 +61,15 @@ import { Code } from "@umami/react-zen";
|
|
|
61
61
|
// src/components/CodeBlock.tsx
|
|
62
62
|
import { useState as useState2, useRef } from "react";
|
|
63
63
|
import { Icon, Icons } from "@umami/react-zen";
|
|
64
|
+
import { JetBrains_Mono } from "next/font/google";
|
|
64
65
|
|
|
65
66
|
// css-modules:E:\dev\umami-shiso\src\components\CodeBlock.module.css
|
|
66
|
-
var CodeBlock_default = { "container": "
|
|
67
|
+
var CodeBlock_default = { "container": "CodeBlock_container__OGZlM", "button": "CodeBlock_button__Y2Y2Z", "copy": "CodeBlock_copy__NWI2Y", "check": "CodeBlock_check__YzQzO" };
|
|
67
68
|
|
|
68
69
|
// src/components/CodeBlock.tsx
|
|
69
70
|
import classNames2 from "classnames";
|
|
70
71
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
72
|
+
var mono = JetBrains_Mono({ subsets: ["latin"] });
|
|
71
73
|
function CodeBlock(props) {
|
|
72
74
|
const textInput = useRef(null);
|
|
73
75
|
const [copied, setCopied] = useState2(false);
|
|
@@ -78,7 +80,7 @@ function CodeBlock(props) {
|
|
|
78
80
|
setCopied(false);
|
|
79
81
|
}, 1e3);
|
|
80
82
|
};
|
|
81
|
-
return /* @__PURE__ */ jsxs2("pre", { ref: textInput, className: classNames2(CodeBlock_default.container, "dark-theme"), children: [
|
|
83
|
+
return /* @__PURE__ */ jsxs2("pre", { ref: textInput, className: classNames2(CodeBlock_default.container, mono.className, "dark-theme"), children: [
|
|
82
84
|
props.children,
|
|
83
85
|
/* @__PURE__ */ jsx2("button", { "aria-label": "Copy code", className: CodeBlock_default.button, onClick: handleCopy, children: /* @__PURE__ */ jsx2(Icon, { size: "sm", className: copied ? CodeBlock_default.check : CodeBlock_default.copy, children: copied ? /* @__PURE__ */ jsx2(Icons.Check, {}) : /* @__PURE__ */ jsx2(Icons.Copy, {}) }) })
|
|
84
86
|
] });
|
|
@@ -86,12 +88,13 @@ function CodeBlock(props) {
|
|
|
86
88
|
|
|
87
89
|
// src/components/Docs.tsx
|
|
88
90
|
import {
|
|
89
|
-
Box as
|
|
91
|
+
Box as Box5,
|
|
90
92
|
Heading as Heading2,
|
|
91
93
|
Button,
|
|
92
94
|
Icon as Icon3,
|
|
93
95
|
Icons as Icons3,
|
|
94
96
|
Row as Row2,
|
|
97
|
+
Column as Column3,
|
|
95
98
|
Modal,
|
|
96
99
|
DialogTrigger,
|
|
97
100
|
Dialog,
|
|
@@ -162,24 +165,24 @@ function SideNav({
|
|
|
162
165
|
|
|
163
166
|
// src/components/TopNav.tsx
|
|
164
167
|
import { usePathname as usePathname2 } from "next/navigation";
|
|
165
|
-
import { Tabs, TabList, Tab } from "@umami/react-zen";
|
|
168
|
+
import { Box as Box2, Tabs, TabList, Tab } from "@umami/react-zen";
|
|
166
169
|
import Link2 from "next/link";
|
|
167
170
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
168
171
|
function TopNav({ tabs }) {
|
|
169
172
|
const pathname = usePathname2();
|
|
170
173
|
const tab = tabs?.find(({ id, url }) => id !== "docs" ? pathname.startsWith(url) : false);
|
|
171
174
|
const selected = tab?.id || "docs";
|
|
172
|
-
return /* @__PURE__ */ jsx4(Tabs, { selectedKey: selected, children: /* @__PURE__ */ jsx4(TabList, { items: tabs, children: ({ id, label, url }) => {
|
|
175
|
+
return /* @__PURE__ */ jsx4(Box2, { maxWidth: "100vw", overflowX: "auto", overflowY: "hidden", children: /* @__PURE__ */ jsx4(Tabs, { selectedKey: selected, children: /* @__PURE__ */ jsx4(TabList, { items: tabs, children: ({ id, label, url }) => {
|
|
173
176
|
return /* @__PURE__ */ jsx4(Tab, { id, children: /* @__PURE__ */ jsx4(Link2, { href: url, children: label }) });
|
|
174
|
-
} }) });
|
|
177
|
+
} }) }) });
|
|
175
178
|
}
|
|
176
179
|
|
|
177
180
|
// src/components/DocContent.tsx
|
|
178
|
-
import { Heading, Box as
|
|
181
|
+
import { Heading, Box as Box4, Text as Text3, Row, Icon as Icon2, Icons as Icons2 } from "@umami/react-zen";
|
|
179
182
|
import Link3 from "next/link";
|
|
180
183
|
|
|
181
184
|
// src/components/Markdown.tsx
|
|
182
|
-
import { Box as
|
|
185
|
+
import { Box as Box3 } from "@umami/react-zen";
|
|
183
186
|
import { runSync } from "@mdx-js/mdx";
|
|
184
187
|
import { useMDXComponents } from "@mdx-js/react";
|
|
185
188
|
import * as runtime from "react/jsx-runtime";
|
|
@@ -212,15 +215,15 @@ function Markdown({ code }) {
|
|
|
212
215
|
if (!Component) {
|
|
213
216
|
return null;
|
|
214
217
|
}
|
|
215
|
-
return /* @__PURE__ */ jsx5(
|
|
218
|
+
return /* @__PURE__ */ jsx5(Box3, { className: Markdown_default.content, children: /* @__PURE__ */ jsx5(Component, { components }) });
|
|
216
219
|
}
|
|
217
220
|
|
|
218
221
|
// src/components/DocContent.tsx
|
|
219
222
|
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
220
223
|
function DocContent({ section, title, description, code, next, prev }) {
|
|
221
|
-
return /* @__PURE__ */ jsxs5(
|
|
224
|
+
return /* @__PURE__ */ jsxs5(Box4, { flexGrow: "1", children: [
|
|
222
225
|
section && /* @__PURE__ */ jsx6(Text3, { color: "primary", weight: "bold", children: section }),
|
|
223
|
-
title && /* @__PURE__ */ jsx6(Heading, { size: "
|
|
226
|
+
title && /* @__PURE__ */ jsx6(Heading, { size: "5", as: "h1", marginY: "3", children: title }),
|
|
224
227
|
description && /* @__PURE__ */ jsx6(Text3, { color: "muted", size: "3", children: description }),
|
|
225
228
|
/* @__PURE__ */ jsx6(Markdown, { code }),
|
|
226
229
|
/* @__PURE__ */ jsxs5(Row, { justifyContent: "space-between", children: [
|
|
@@ -235,7 +238,7 @@ var NavigationButton = ({
|
|
|
235
238
|
isPrev
|
|
236
239
|
}) => {
|
|
237
240
|
if (!url || !label) {
|
|
238
|
-
return /* @__PURE__ */ jsx6(
|
|
241
|
+
return /* @__PURE__ */ jsx6(Box4, {});
|
|
239
242
|
}
|
|
240
243
|
return /* @__PURE__ */ jsx6(Link3, { href: url, children: /* @__PURE__ */ jsxs5(Row, { alignItems: "center", gap: "3", marginY: "3", children: [
|
|
241
244
|
isPrev && /* @__PURE__ */ jsx6(Icon2, { size: "sm", rotate: 180, children: /* @__PURE__ */ jsx6(Icons2.Chevron, {}) }),
|
|
@@ -245,7 +248,7 @@ var NavigationButton = ({
|
|
|
245
248
|
};
|
|
246
249
|
|
|
247
250
|
// src/components/Docs.tsx
|
|
248
|
-
import {
|
|
251
|
+
import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
249
252
|
function parseContent(content, config = {}) {
|
|
250
253
|
const { tabs, navigation } = config;
|
|
251
254
|
const keys = Object.keys(navigation);
|
|
@@ -280,40 +283,28 @@ function Docs({ content, config }) {
|
|
|
280
283
|
);
|
|
281
284
|
const { top } = config?.docs || {};
|
|
282
285
|
const navDisplay = {
|
|
283
|
-
default: "none",
|
|
284
286
|
xs: "none",
|
|
285
|
-
|
|
286
|
-
md: "none",
|
|
287
|
-
lg: "block",
|
|
288
|
-
xl: "block"
|
|
287
|
+
lg: "block"
|
|
289
288
|
};
|
|
290
289
|
const linksDisplay = {
|
|
291
|
-
default: "none",
|
|
292
290
|
xs: "none",
|
|
293
|
-
|
|
294
|
-
md: "none",
|
|
295
|
-
lg: "block",
|
|
296
|
-
xl: "block"
|
|
291
|
+
lg: "block"
|
|
297
292
|
};
|
|
298
293
|
const menuDisplay = {
|
|
299
|
-
lg: "none"
|
|
300
|
-
xl: "none"
|
|
294
|
+
lg: "none"
|
|
301
295
|
};
|
|
302
296
|
const MobileMenuButton = () => /* @__PURE__ */ jsxs6(DialogTrigger, { children: [
|
|
303
297
|
/* @__PURE__ */ jsxs6(Button, { children: [
|
|
304
298
|
/* @__PURE__ */ jsx7(Icon3, { children: /* @__PURE__ */ jsx7(Icons3.Menu, {}) }),
|
|
305
299
|
/* @__PURE__ */ jsx7(Text4, { children: "Menu" })
|
|
306
300
|
] }),
|
|
307
|
-
/* @__PURE__ */ jsx7(Modal, { position: "
|
|
308
|
-
return /* @__PURE__ */
|
|
309
|
-
/* @__PURE__ */ jsx7(Row2, { justifyContent: "flex-end", children: /* @__PURE__ */ jsx7(Button, { onPress: () => close(), variant: "quiet", children: /* @__PURE__ */ jsx7(Icon3, { size: "sm", children: /* @__PURE__ */ jsx7(Icons3.Close, {}) }) }) }),
|
|
310
|
-
/* @__PURE__ */ jsx7(Box4, { height: "100%", overflow: "auto", children: /* @__PURE__ */ jsx7(SideNav, { tabs, navigation }) })
|
|
311
|
-
] });
|
|
301
|
+
/* @__PURE__ */ jsx7(Modal, { position: "left", offset: "70px", children: /* @__PURE__ */ jsx7(Dialog, { variant: "sheet", children: ({ close }) => {
|
|
302
|
+
return /* @__PURE__ */ jsx7(Box5, { overflow: "auto", padding: "4", onClick: close, children: /* @__PURE__ */ jsx7(SideNav, { tabs, navigation }) });
|
|
312
303
|
} }) })
|
|
313
304
|
] });
|
|
314
|
-
return /* @__PURE__ */ jsxs6(
|
|
315
|
-
/* @__PURE__ */ jsx7(Row2, { display: menuDisplay, justifyContent: "flex-end", children: /* @__PURE__ */ jsx7(MobileMenuButton, {}) }),
|
|
305
|
+
return /* @__PURE__ */ jsxs6(Column3, { gap: "6", children: [
|
|
316
306
|
tabs && /* @__PURE__ */ jsx7(TopNav, { tabs }),
|
|
307
|
+
/* @__PURE__ */ jsx7(Row2, { display: menuDisplay, justifyContent: "flex-end", children: /* @__PURE__ */ jsx7(MobileMenuButton, {}) }),
|
|
317
308
|
/* @__PURE__ */ jsxs6(Row2, { gap: "6", children: [
|
|
318
309
|
/* @__PURE__ */ jsx7(
|
|
319
310
|
SideNav,
|
|
@@ -346,14 +337,14 @@ function Docs({ content, config }) {
|
|
|
346
337
|
import { Grid } from "@umami/react-zen";
|
|
347
338
|
|
|
348
339
|
// src/components/Card.tsx
|
|
349
|
-
import { Box as
|
|
340
|
+
import { Box as Box6, Image, Column as Column4, Row as Row3, Heading as Heading3, Text as Text5, Button as Button2, Icon as Icon4, Icons as Icons4 } from "@umami/react-zen";
|
|
350
341
|
import Link4 from "next/link";
|
|
351
342
|
import { format } from "date-fns";
|
|
352
343
|
import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
353
344
|
function Card({ title, description, date, author, url, image }) {
|
|
354
|
-
return /* @__PURE__ */ jsxs7(
|
|
355
|
-
image && /* @__PURE__ */ jsx8(
|
|
356
|
-
/* @__PURE__ */ jsxs7(
|
|
345
|
+
return /* @__PURE__ */ jsxs7(Column4, { border: true, borderRadius: "3", overflow: "hidden", children: [
|
|
346
|
+
image && /* @__PURE__ */ jsx8(Box6, { height: "240px", children: /* @__PURE__ */ jsx8(Image, { src: image, alt: title, objectFit: "cover" }) }),
|
|
347
|
+
/* @__PURE__ */ jsxs7(Column4, { padding: "6", gap: "4", flexGrow: "1", children: [
|
|
357
348
|
/* @__PURE__ */ jsxs7(Row3, { justifyContent: "space-between", children: [
|
|
358
349
|
/* @__PURE__ */ jsx8(Text5, { color: "muted", children: date && format(new Date(date), "PP") }),
|
|
359
350
|
/* @__PURE__ */ jsxs7(Text5, { color: "muted", children: [
|
|
@@ -361,9 +352,9 @@ function Card({ title, description, date, author, url, image }) {
|
|
|
361
352
|
author
|
|
362
353
|
] })
|
|
363
354
|
] }),
|
|
364
|
-
/* @__PURE__ */ jsxs7(
|
|
365
|
-
/* @__PURE__ */ jsx8(Heading3, { size: "
|
|
366
|
-
/* @__PURE__ */ jsx8(
|
|
355
|
+
/* @__PURE__ */ jsxs7(Column4, { gap: "4", flexGrow: "1", children: [
|
|
356
|
+
/* @__PURE__ */ jsx8(Heading3, { size: "3", as: "header", children: /* @__PURE__ */ jsx8(Link4, { href: url, children: title }) }),
|
|
357
|
+
/* @__PURE__ */ jsx8(Box6, { marginY: "5", as: "p", children: /* @__PURE__ */ jsx8(Text5, { color: "muted", size: "3", children: description }) })
|
|
367
358
|
] }),
|
|
368
359
|
/* @__PURE__ */ jsx8(Button2, { asChild: true, children: /* @__PURE__ */ jsxs7(Link4, { href: url, children: [
|
|
369
360
|
/* @__PURE__ */ jsx8(Text5, { children: "Read more" }),
|
|
@@ -383,7 +374,7 @@ function Blogs({ content, config, ...props }) {
|
|
|
383
374
|
const items = content.sort(
|
|
384
375
|
(a, b) => new Date(b?.meta?.date).getTime() - new Date(a?.meta?.date).getTime()
|
|
385
376
|
);
|
|
386
|
-
return /* @__PURE__ */ jsx9(Grid, { gap: "5", columns: "repeat(auto-fit, minmax(400px, 1fr)", children: items?.map(({ meta, slug }) => /* @__PURE__ */ jsx9(Card, { url: `/blog/${slug}`, ...meta }, slug)) });
|
|
377
|
+
return /* @__PURE__ */ jsx9(Grid, { gap: "5", columns: { xs: "1fr", lg: "repeat(auto-fit, minmax(400px, 1fr))" }, children: items?.map(({ meta, slug }) => /* @__PURE__ */ jsx9(Card, { url: `/blog/${slug}`, ...meta }, slug)) });
|
|
387
378
|
}
|
|
388
379
|
|
|
389
380
|
// src/components/Shiso.tsx
|
|
@@ -418,15 +409,11 @@ function Blog({ title, code, author, date, image, anchors, backUrl }) {
|
|
|
418
409
|
const { config } = useShiso();
|
|
419
410
|
const { top } = config?.blog || {};
|
|
420
411
|
const linksDisplay = {
|
|
421
|
-
default: "none",
|
|
422
412
|
xs: "none",
|
|
423
|
-
|
|
424
|
-
md: "none",
|
|
425
|
-
lg: "block",
|
|
426
|
-
xl: "block"
|
|
413
|
+
lg: "block"
|
|
427
414
|
};
|
|
428
|
-
return /* @__PURE__ */ jsxs8(
|
|
429
|
-
/* @__PURE__ */ jsx11(
|
|
415
|
+
return /* @__PURE__ */ jsxs8(Column5, { gap: "8", maxWidth: "960px", style: { margin: "0 auto" }, children: [
|
|
416
|
+
/* @__PURE__ */ jsx11(Box7, { flexGrow: "1", paddingY: "6", children: title && /* @__PURE__ */ jsx11(Heading4, { size: "6", as: "h1", align: "center", children: title }) }),
|
|
430
417
|
/* @__PURE__ */ jsxs8(Row4, { justifyContent: "space-between", children: [
|
|
431
418
|
/* @__PURE__ */ jsx11(Text6, { color: "muted", children: date && format2(new Date(date), "PPP") }),
|
|
432
419
|
/* @__PURE__ */ jsxs8(Text6, { color: "muted", children: [
|
|
@@ -434,7 +421,7 @@ function Blog({ title, code, author, date, image, anchors, backUrl }) {
|
|
|
434
421
|
author
|
|
435
422
|
] })
|
|
436
423
|
] }),
|
|
437
|
-
image && /* @__PURE__ */ jsx11(
|
|
424
|
+
image && /* @__PURE__ */ jsx11(Box7, { height: "480px", children: /* @__PURE__ */ jsx11(Image2, { src: image, alt: title, objectFit: "cover", borderRadius: "3" }) }),
|
|
438
425
|
/* @__PURE__ */ jsxs8(Row4, { gap: "6", children: [
|
|
439
426
|
/* @__PURE__ */ jsx11(Markdown, { code }),
|
|
440
427
|
/* @__PURE__ */ jsx11(PageLinks, { display: linksDisplay, items: anchors, style: { top } })
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umami/shiso",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.52.0",
|
|
4
4
|
"description": "A content layer for Next.js",
|
|
5
|
-
"homepage": "https://umami.is
|
|
5
|
+
"homepage": "https://shiso.umami.is",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/umami-software/shiso.git"
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"access": "public"
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
|
-
"dev": "next dev --port
|
|
22
|
+
"dev": "next dev --port 8001 --turbo",
|
|
23
23
|
"build": "next build",
|
|
24
24
|
"start": "next start",
|
|
25
25
|
"lint": "next lint",
|
|
26
|
-
"icons": "svgr ./src/assets --out-dir
|
|
26
|
+
"icons": "svgr ./src/assets --out-dir src/components/svg --typescript",
|
|
27
27
|
"components": "tsc -p tsconfig.components.json",
|
|
28
28
|
"server": "tsc -p tsconfig.server.json",
|
|
29
29
|
"esbuild": "node esbuild.mjs",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@mdx-js/loader": "^3.0.0",
|
|
49
49
|
"@mdx-js/mdx": "^3.1.0",
|
|
50
50
|
"@mdx-js/react": "^3.0.0",
|
|
51
|
-
"@umami/react-zen": "^0.
|
|
51
|
+
"@umami/react-zen": "^0.88.0",
|
|
52
52
|
"classnames": "^2.5.1",
|
|
53
53
|
"date-fns": "^4.1.0",
|
|
54
54
|
"glob": "^10.3.10",
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
"highlight.js": "^11.11.1",
|
|
57
57
|
"next": "15.2.1",
|
|
58
58
|
"next-mdx-remote": "^5.0.0",
|
|
59
|
-
"react": "^19.
|
|
60
|
-
"react-dom": "^19.
|
|
59
|
+
"react": "^19.1.0",
|
|
60
|
+
"react-dom": "^19.1.0",
|
|
61
61
|
"recursive-readdir": "^2.2.3",
|
|
62
62
|
"rehype-highlight": "^7.0.1",
|
|
63
63
|
"rehype-slug": "^6.0.0",
|
|
@@ -68,29 +68,29 @@
|
|
|
68
68
|
"@svgr/cli": "^8.1.0",
|
|
69
69
|
"@types/css-modules": "^1.0.5",
|
|
70
70
|
"@types/mdx": "^2.0.11",
|
|
71
|
-
"@types/node": "^22.
|
|
72
|
-
"@types/react": "^19.
|
|
73
|
-
"@types/react-dom": "^19.
|
|
71
|
+
"@types/node": "^22.15.3",
|
|
72
|
+
"@types/react": "^19.1.2",
|
|
73
|
+
"@types/react-dom": "^19.1.3",
|
|
74
74
|
"@umami/esbuild-plugin-css-modules": "^0.4.0",
|
|
75
75
|
"dts-bundle": "^0.7.3",
|
|
76
|
-
"esbuild": "^0.25.
|
|
76
|
+
"esbuild": "^0.25.3",
|
|
77
77
|
"esbuild-plugin-css-modules": "^0.3.0",
|
|
78
|
-
"eslint": "^9.
|
|
78
|
+
"eslint": "^9.25.1",
|
|
79
79
|
"eslint-config-next": "15.1.3",
|
|
80
80
|
"eslint-config-prettier": "^9.1.0",
|
|
81
81
|
"eslint-import-resolver-alias": "^1.1.2",
|
|
82
82
|
"eslint-plugin-import": "^2.29.1",
|
|
83
|
-
"eslint-plugin-prettier": "^5.
|
|
83
|
+
"eslint-plugin-prettier": "^5.2.6",
|
|
84
84
|
"husky": "^9.1.1",
|
|
85
|
-
"lint-staged": "^15.
|
|
85
|
+
"lint-staged": "^15.5.1",
|
|
86
86
|
"npm-run-all": "^4.1.5",
|
|
87
87
|
"prettier": "^3.2.5",
|
|
88
88
|
"remark-frontmatter": "^5.0.0",
|
|
89
|
-
"remark-mdx-frontmatter": "^5.
|
|
89
|
+
"remark-mdx-frontmatter": "^5.1.0",
|
|
90
90
|
"stylelint": "^15.10.1",
|
|
91
91
|
"stylelint-config-prettier": "^9.0.5",
|
|
92
92
|
"stylelint-config-recommended": "^14.0.1",
|
|
93
|
-
"typescript": "^5"
|
|
93
|
+
"typescript": "^5.8.3"
|
|
94
94
|
},
|
|
95
95
|
"pnpm": {
|
|
96
96
|
"onlyBuiltDependencies": [
|