@umami/shiso 0.50.0 → 0.51.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.js CHANGED
@@ -195,9 +195,9 @@ function TopNav({ tabs }) {
195
195
  const pathname = (0, import_navigation2.usePathname)();
196
196
  const tab = tabs?.find(({ id, url }) => id !== "docs" ? pathname.startsWith(url) : false);
197
197
  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 }) => {
198
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_zen4.Box, { marginBottom: "6", 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
199
  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
- } }) });
200
+ } }) }) });
201
201
  }
202
202
 
203
203
  // src/components/DocContent.tsx
@@ -247,7 +247,7 @@ var import_jsx_runtime6 = require("react/jsx-runtime");
247
247
  function DocContent({ section, title, description, code, next, prev }) {
248
248
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_react_zen6.Box, { flexGrow: "1", children: [
249
249
  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: "2", as: "h1", marginY: "3", children: title }),
250
+ title && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_zen6.Heading, { size: "5", as: "h1", marginY: "3", children: title }),
251
251
  description && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_zen6.Text, { color: "muted", size: "3", children: description }),
252
252
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Markdown, { code }),
253
253
  /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_react_zen6.Row, { justifyContent: "space-between", children: [
@@ -378,7 +378,7 @@ var import_link4 = __toESM(require("next/link"));
378
378
  var import_date_fns = require("date-fns");
379
379
  var import_jsx_runtime8 = require("react/jsx-runtime");
380
380
  function Card({ title, description, date, author, url, image }) {
381
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_zen8.Column, { borderSize: "1", borderRadius: "3", overflow: "hidden", children: [
381
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_zen8.Column, { border: true, borderRadius: "3", overflow: "hidden", children: [
382
382
  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
383
  /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_zen8.Column, { padding: "6", gap: "4", flexGrow: "1", children: [
384
384
  /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_zen8.Row, { justifyContent: "space-between", children: [
@@ -389,7 +389,7 @@ function Card({ title, description, date, author, url, image }) {
389
389
  ] })
390
390
  ] }),
391
391
  /* @__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: "4", as: "header", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_link4.default, { href: url, children: title }) }),
392
+ /* @__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
393
  /* @__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
394
  ] }),
395
395
  /* @__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: [
@@ -453,7 +453,7 @@ function Blog({ title, code, author, date, image, anchors, backUrl }) {
453
453
  xl: "block"
454
454
  };
455
455
  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: "1", as: "h1", align: "center", children: title }) }),
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: "6", as: "h1", align: "center", children: title }) }),
457
457
  /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_zen11.Row, { justifyContent: "space-between", children: [
458
458
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_zen11.Text, { color: "muted", children: date && (0, import_date_fns2.format)(new Date(date), "PPP") }),
459
459
  /* @__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 Box6, Text as Text6, Row as Row4, Column as Column4, Image as Image2, Icon as Icon5, Icons as Icons5, Button as Button3 } from "@umami/react-zen";
4
+ import { Heading as Heading4, Box as Box7, Text as Text6, Row as Row4, Column as Column4, 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
@@ -86,7 +86,7 @@ function CodeBlock(props) {
86
86
 
87
87
  // src/components/Docs.tsx
88
88
  import {
89
- Box as Box4,
89
+ Box as Box5,
90
90
  Heading as Heading2,
91
91
  Button,
92
92
  Icon as Icon3,
@@ -162,24 +162,24 @@ function SideNav({
162
162
 
163
163
  // src/components/TopNav.tsx
164
164
  import { usePathname as usePathname2 } from "next/navigation";
165
- import { Tabs, TabList, Tab } from "@umami/react-zen";
165
+ import { Box as Box2, Tabs, TabList, Tab } from "@umami/react-zen";
166
166
  import Link2 from "next/link";
167
167
  import { jsx as jsx4 } from "react/jsx-runtime";
168
168
  function TopNav({ tabs }) {
169
169
  const pathname = usePathname2();
170
170
  const tab = tabs?.find(({ id, url }) => id !== "docs" ? pathname.startsWith(url) : false);
171
171
  const selected = tab?.id || "docs";
172
- return /* @__PURE__ */ jsx4(Tabs, { selectedKey: selected, children: /* @__PURE__ */ jsx4(TabList, { items: tabs, children: ({ id, label, url }) => {
172
+ return /* @__PURE__ */ jsx4(Box2, { marginBottom: "6", children: /* @__PURE__ */ jsx4(Tabs, { selectedKey: selected, children: /* @__PURE__ */ jsx4(TabList, { items: tabs, children: ({ id, label, url }) => {
173
173
  return /* @__PURE__ */ jsx4(Tab, { id, children: /* @__PURE__ */ jsx4(Link2, { href: url, children: label }) });
174
- } }) });
174
+ } }) }) });
175
175
  }
176
176
 
177
177
  // src/components/DocContent.tsx
178
- import { Heading, Box as Box3, Text as Text3, Row, Icon as Icon2, Icons as Icons2 } from "@umami/react-zen";
178
+ import { Heading, Box as Box4, Text as Text3, Row, Icon as Icon2, Icons as Icons2 } from "@umami/react-zen";
179
179
  import Link3 from "next/link";
180
180
 
181
181
  // src/components/Markdown.tsx
182
- import { Box as Box2 } from "@umami/react-zen";
182
+ import { Box as Box3 } from "@umami/react-zen";
183
183
  import { runSync } from "@mdx-js/mdx";
184
184
  import { useMDXComponents } from "@mdx-js/react";
185
185
  import * as runtime from "react/jsx-runtime";
@@ -212,15 +212,15 @@ function Markdown({ code }) {
212
212
  if (!Component) {
213
213
  return null;
214
214
  }
215
- return /* @__PURE__ */ jsx5(Box2, { className: Markdown_default.content, children: /* @__PURE__ */ jsx5(Component, { components }) });
215
+ return /* @__PURE__ */ jsx5(Box3, { className: Markdown_default.content, children: /* @__PURE__ */ jsx5(Component, { components }) });
216
216
  }
217
217
 
218
218
  // src/components/DocContent.tsx
219
219
  import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
220
220
  function DocContent({ section, title, description, code, next, prev }) {
221
- return /* @__PURE__ */ jsxs5(Box3, { flexGrow: "1", children: [
221
+ return /* @__PURE__ */ jsxs5(Box4, { flexGrow: "1", children: [
222
222
  section && /* @__PURE__ */ jsx6(Text3, { color: "primary", weight: "bold", children: section }),
223
- title && /* @__PURE__ */ jsx6(Heading, { size: "2", as: "h1", marginY: "3", children: title }),
223
+ title && /* @__PURE__ */ jsx6(Heading, { size: "5", as: "h1", marginY: "3", children: title }),
224
224
  description && /* @__PURE__ */ jsx6(Text3, { color: "muted", size: "3", children: description }),
225
225
  /* @__PURE__ */ jsx6(Markdown, { code }),
226
226
  /* @__PURE__ */ jsxs5(Row, { justifyContent: "space-between", children: [
@@ -235,7 +235,7 @@ var NavigationButton = ({
235
235
  isPrev
236
236
  }) => {
237
237
  if (!url || !label) {
238
- return /* @__PURE__ */ jsx6(Box3, {});
238
+ return /* @__PURE__ */ jsx6(Box4, {});
239
239
  }
240
240
  return /* @__PURE__ */ jsx6(Link3, { href: url, children: /* @__PURE__ */ jsxs5(Row, { alignItems: "center", gap: "3", marginY: "3", children: [
241
241
  isPrev && /* @__PURE__ */ jsx6(Icon2, { size: "sm", rotate: 180, children: /* @__PURE__ */ jsx6(Icons2.Chevron, {}) }),
@@ -307,11 +307,11 @@ function Docs({ content, config }) {
307
307
  /* @__PURE__ */ jsx7(Modal, { position: "bottom", offset: "40px", children: /* @__PURE__ */ jsx7(Dialog, { variant: "sheet", children: ({ close }) => {
308
308
  return /* @__PURE__ */ jsxs6(Fragment, { children: [
309
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 }) })
310
+ /* @__PURE__ */ jsx7(Box5, { height: "100%", overflow: "auto", children: /* @__PURE__ */ jsx7(SideNav, { tabs, navigation }) })
311
311
  ] });
312
312
  } }) })
313
313
  ] });
314
- return /* @__PURE__ */ jsxs6(Box4, { flexGrow: "1", children: [
314
+ return /* @__PURE__ */ jsxs6(Box5, { flexGrow: "1", children: [
315
315
  /* @__PURE__ */ jsx7(Row2, { display: menuDisplay, justifyContent: "flex-end", children: /* @__PURE__ */ jsx7(MobileMenuButton, {}) }),
316
316
  tabs && /* @__PURE__ */ jsx7(TopNav, { tabs }),
317
317
  /* @__PURE__ */ jsxs6(Row2, { gap: "6", children: [
@@ -346,13 +346,13 @@ function Docs({ content, config }) {
346
346
  import { Grid } from "@umami/react-zen";
347
347
 
348
348
  // src/components/Card.tsx
349
- import { Box as Box5, Image, Column as Column3, Row as Row3, Heading as Heading3, Text as Text5, Button as Button2, Icon as Icon4, Icons as Icons4 } from "@umami/react-zen";
349
+ import { Box as Box6, Image, Column as Column3, Row as Row3, Heading as Heading3, Text as Text5, Button as Button2, Icon as Icon4, Icons as Icons4 } from "@umami/react-zen";
350
350
  import Link4 from "next/link";
351
351
  import { format } from "date-fns";
352
352
  import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
353
353
  function Card({ title, description, date, author, url, image }) {
354
- return /* @__PURE__ */ jsxs7(Column3, { borderSize: "1", borderRadius: "3", overflow: "hidden", children: [
355
- image && /* @__PURE__ */ jsx8(Box5, { height: "240px", children: /* @__PURE__ */ jsx8(Image, { src: image, alt: title, objectFit: "cover" }) }),
354
+ return /* @__PURE__ */ jsxs7(Column3, { border: true, borderRadius: "3", overflow: "hidden", children: [
355
+ image && /* @__PURE__ */ jsx8(Box6, { height: "240px", children: /* @__PURE__ */ jsx8(Image, { src: image, alt: title, objectFit: "cover" }) }),
356
356
  /* @__PURE__ */ jsxs7(Column3, { padding: "6", gap: "4", flexGrow: "1", children: [
357
357
  /* @__PURE__ */ jsxs7(Row3, { justifyContent: "space-between", children: [
358
358
  /* @__PURE__ */ jsx8(Text5, { color: "muted", children: date && format(new Date(date), "PP") }),
@@ -362,8 +362,8 @@ function Card({ title, description, date, author, url, image }) {
362
362
  ] })
363
363
  ] }),
364
364
  /* @__PURE__ */ jsxs7(Column3, { gap: "4", flexGrow: "1", children: [
365
- /* @__PURE__ */ jsx8(Heading3, { size: "4", as: "header", children: /* @__PURE__ */ jsx8(Link4, { href: url, children: title }) }),
366
- /* @__PURE__ */ jsx8(Box5, { marginY: "5", as: "p", children: /* @__PURE__ */ jsx8(Text5, { color: "muted", size: "3", children: description }) })
365
+ /* @__PURE__ */ jsx8(Heading3, { size: "3", as: "header", children: /* @__PURE__ */ jsx8(Link4, { href: url, children: title }) }),
366
+ /* @__PURE__ */ jsx8(Box6, { marginY: "5", as: "p", children: /* @__PURE__ */ jsx8(Text5, { color: "muted", size: "3", children: description }) })
367
367
  ] }),
368
368
  /* @__PURE__ */ jsx8(Button2, { asChild: true, children: /* @__PURE__ */ jsxs7(Link4, { href: url, children: [
369
369
  /* @__PURE__ */ jsx8(Text5, { children: "Read more" }),
@@ -426,7 +426,7 @@ function Blog({ title, code, author, date, image, anchors, backUrl }) {
426
426
  xl: "block"
427
427
  };
428
428
  return /* @__PURE__ */ jsxs8(Column4, { gap: "8", maxWidth: "960px", style: { margin: "0 auto" }, children: [
429
- /* @__PURE__ */ jsx11(Box6, { flexGrow: "1", paddingY: "6", children: title && /* @__PURE__ */ jsx11(Heading4, { size: "1", as: "h1", align: "center", children: title }) }),
429
+ /* @__PURE__ */ jsx11(Box7, { flexGrow: "1", paddingY: "6", children: title && /* @__PURE__ */ jsx11(Heading4, { size: "6", as: "h1", align: "center", children: title }) }),
430
430
  /* @__PURE__ */ jsxs8(Row4, { justifyContent: "space-between", children: [
431
431
  /* @__PURE__ */ jsx11(Text6, { color: "muted", children: date && format2(new Date(date), "PPP") }),
432
432
  /* @__PURE__ */ jsxs8(Text6, { color: "muted", children: [
@@ -434,7 +434,7 @@ function Blog({ title, code, author, date, image, anchors, backUrl }) {
434
434
  author
435
435
  ] })
436
436
  ] }),
437
- image && /* @__PURE__ */ jsx11(Box6, { height: "480px", children: /* @__PURE__ */ jsx11(Image2, { src: image, alt: title, objectFit: "cover", borderRadius: "3" }) }),
437
+ image && /* @__PURE__ */ jsx11(Box7, { height: "480px", children: /* @__PURE__ */ jsx11(Image2, { src: image, alt: title, objectFit: "cover", borderRadius: "3" }) }),
438
438
  /* @__PURE__ */ jsxs8(Row4, { gap: "6", children: [
439
439
  /* @__PURE__ */ jsx11(Markdown, { code }),
440
440
  /* @__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.50.0",
3
+ "version": "0.51.0",
4
4
  "description": "A content layer for Next.js",
5
- "homepage": "https://umami.is/shiso",
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 3100 --turbo",
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 ./src/components/icons --typescript",
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.63.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",