@umami/shiso 0.36.0 → 0.38.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 CHANGED
@@ -1,40 +1,39 @@
1
1
  /* virtual-css:css:e01d9571088b882a03b91eb2755da783 */
2
- .PageLinks_links__M2M5N {
2
+ .PageLinks_links__NmJhO {
3
3
  position: sticky;
4
4
  top: var(--spacing-8);
5
5
  height: max-content;
6
6
  min-width: 240px;
7
7
  }
8
- .PageLinks_links__M2M5N a.PageLinks_link__MmRhZ {
8
+ .PageLinks_links__NmJhO a.PageLinks_link__OGI3M {
9
9
  display: block;
10
10
  color: var(--font-color-muted);
11
11
  font-size: var(--font-size);
12
- text-wrap: nowrap;
13
12
  text-decoration: none;
14
13
  }
15
- .PageLinks_links__M2M5N a.PageLinks_link__MmRhZ:hover {
14
+ .PageLinks_links__NmJhO a.PageLinks_link__OGI3M:hover {
16
15
  color: var(--primary-color);
17
16
  text-decoration: none;
18
17
  }
19
- .PageLinks_indent-1__NmJiN {
18
+ .PageLinks_indent-1__M2IxZ {
20
19
  margin-left: 0;
21
20
  }
22
- .PageLinks_indent-2__ZjE5M {
21
+ .PageLinks_indent-2__YTBlM {
23
22
  margin-left: 0;
24
23
  }
25
- .PageLinks_indent-3__ODkyO {
24
+ .PageLinks_indent-3__YzJlZ {
26
25
  margin-left: 10px;
27
26
  }
28
- .PageLinks_indent-4__MGRkZ {
27
+ .PageLinks_indent-4__NDg3Z {
29
28
  margin-left: 20px;
30
29
  }
31
- .PageLinks_indent-5__NDgyZ {
30
+ .PageLinks_indent-5__ZTE4M {
32
31
  margin-left: 30px;
33
32
  }
34
- .PageLinks_indent-6__ZDkyN {
33
+ .PageLinks_indent-6__NTRjM {
35
34
  margin-left: 40px;
36
35
  }
37
- .PageLinks_links__M2M5N a.PageLinks_selected__N2RkZ {
36
+ .PageLinks_links__NmJhO a.PageLinks_selected__ZjhkN {
38
37
  color: var(--primary-color);
39
38
  }
40
39
 
@@ -73,62 +72,53 @@ pre.CodeBlock_container__ZTkxY code {
73
72
  }
74
73
 
75
74
  /* virtual-css:css:62c31e195181c97259fa56b13d20ea6d */
76
- .SideNav_nav__ZjMzZ {
75
+ .SideNav_nav__NTkxM {
77
76
  overflow-y: auto;
78
77
  min-width: 240px;
79
78
  }
80
- .SideNav_nav__ZjMzZ::-webkit-scrollbar {
79
+ .SideNav_nav__NTkxM::-webkit-scrollbar {
81
80
  width: 15px;
82
81
  background: transparent;
83
82
  display: none;
84
83
  }
85
- .SideNav_nav__ZjMzZ:hover::-webkit-scrollbar {
84
+ .SideNav_nav__NTkxM:hover::-webkit-scrollbar {
86
85
  display: block;
87
86
  }
88
- .SideNav_nav__ZjMzZ::-webkit-scrollbar-track {
87
+ .SideNav_nav__NTkxM::-webkit-scrollbar-track {
89
88
  border: 7px solid rgba(0, 0, 0, 0);
90
89
  background-color: var(--border-color);
91
90
  background-clip: padding-box;
92
91
  }
93
- .SideNav_nav__ZjMzZ::-webkit-scrollbar-thumb {
92
+ .SideNav_nav__NTkxM::-webkit-scrollbar-thumb {
94
93
  border: 7px solid rgba(0, 0, 0, 0);
95
94
  background-color: var(--primary-color);
96
95
  background-clip: padding-box;
97
96
  }
98
- .SideNav_nav__ZjMzZ::-webkit-scrollbar-thumb:hover {
97
+ .SideNav_nav__NTkxM::-webkit-scrollbar-thumb:hover {
99
98
  border: 5px solid rgba(0, 0, 0, 0);
100
99
  background-color: var(--primary-color);
101
100
  background-clip: padding-box;
102
101
  }
103
- .SideNav_nav__ZjMzZ.SideNav_sticky__MWMxZ {
102
+ .SideNav_nav__NTkxM.SideNav_sticky__YTdmY {
104
103
  position: sticky;
105
104
  top: var(--spacing-8);
106
105
  }
107
- .SideNav_nav__ZjMzZ .SideNav_item__ZGQ0M {
106
+ .SideNav_nav__NTkxM .SideNav_item__MDk5Z {
108
107
  color: var(--font-color-muted);
109
- padding: 0;
110
- border-radius: 0;
111
- }
112
- .SideNav_nav__ZjMzZ .SideNav_item__ZGQ0M a {
113
- color: currentColor;
114
- width: 100%;
115
- padding: var(--padding-y) var(--padding-x);
108
+ border-left: 1px solid var(--border-color);
109
+ padding: var(--padding);
116
110
  text-decoration: none;
117
111
  }
118
- .SideNav_nav__ZjMzZ .SideNav_item__ZGQ0M a:hover {
112
+ .SideNav_nav__NTkxM .SideNav_item__MDk5Z:hover {
119
113
  color: var(--primary-color);
120
114
  }
121
- .SideNav_nav__ZjMzZ .SideNav_item__ZGQ0M.SideNav_selected__ZTI4Y {
115
+ .SideNav_nav__NTkxM .SideNav_item__MDk5Z.SideNav_selected__ZjVkZ {
122
116
  color: var(--font-color);
123
- font-weight: 600;
117
+ font-weight: 500;
124
118
  border-color: var(--primary-color);
125
119
  background-color: var(--highlight-color);
126
120
  }
127
- .SideNav_items__ZWU5O {
128
- display: grid;
129
- gap: var(--spacing-1);
130
- }
131
- .SideNav_items__ZWU5O header {
121
+ .SideNav_header__Y2YyY {
132
122
  padding: var(--padding-y) 0;
133
123
  }
134
124
 
package/dist/index.js CHANGED
@@ -49,7 +49,7 @@ var import_react_zen = require("@umami/react-zen");
49
49
  var import_classnames = __toESM(require("classnames"));
50
50
 
51
51
  // css-modules:E:\dev\umami-shiso\src\components\PageLinks.module.css
52
- var PageLinks_default = { "links": "PageLinks_links__M2M5N", "link": "PageLinks_link__MmRhZ", "indent-1": "PageLinks_indent-1__NmJiN", "indent-2": "PageLinks_indent-2__ZjE5M", "indent-3": "PageLinks_indent-3__ODkyO", "indent-4": "PageLinks_indent-4__MGRkZ", "indent-5": "PageLinks_indent-5__NDgyZ", "indent-6": "PageLinks_indent-6__ZDkyN", "selected": "PageLinks_selected__N2RkZ" };
52
+ var PageLinks_default = { "links": "PageLinks_links__NmJhO", "link": "PageLinks_link__OGI3M", "indent-1": "PageLinks_indent-1__M2IxZ", "indent-2": "PageLinks_indent-2__YTBlM", "indent-3": "PageLinks_indent-3__YzJlZ", "indent-4": "PageLinks_indent-4__NDg3Z", "indent-5": "PageLinks_indent-5__ZTE4M", "indent-6": "PageLinks_indent-6__NTRjM", "selected": "PageLinks_selected__ZjhkN" };
53
53
 
54
54
  // src/components/PageLinks.tsx
55
55
  var import_jsx_runtime = require("react/jsx-runtime");
@@ -130,10 +130,9 @@ var import_react3 = require("react");
130
130
  var import_react_zen3 = require("@umami/react-zen");
131
131
  var import_classnames2 = __toESM(require("classnames"));
132
132
  var import_navigation = require("next/navigation");
133
- var import_link = __toESM(require("next/link"));
134
133
 
135
134
  // css-modules:E:\dev\umami-shiso\src\components\SideNav.module.css
136
- var SideNav_default = { "nav": "SideNav_nav__ZjMzZ", "sticky": "SideNav_sticky__MWMxZ", "item": "SideNav_item__ZGQ0M", "selected": "SideNav_selected__ZTI4Y", "items": "SideNav_items__ZWU5O" };
135
+ var SideNav_default = { "nav": "SideNav_nav__NTkxM", "sticky": "SideNav_sticky__YTdmY", "item": "SideNav_item__MDk5Z", "selected": "SideNav_selected__ZjVkZ", "header": "SideNav_header__Y2YyY" };
137
136
 
138
137
  // src/components/SideNav.tsx
139
138
  var import_jsx_runtime3 = require("react/jsx-runtime");
@@ -159,32 +158,35 @@ function SideNav({
159
158
  }
160
159
  }, [autoHeight]);
161
160
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
162
- import_react_zen3.Box,
161
+ import_react_zen3.Column,
163
162
  {
164
163
  ...props,
165
164
  id: "shiso_docs_sidenav",
166
165
  className: (0, import_classnames2.default)(SideNav_default.nav, isSticky && SideNav_default.sticky, className),
167
166
  style: { ...style, height },
168
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_zen3.List, { items: navigation, "aria-label": "nav", children: menu.map(({ section, pages }) => {
169
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_zen3.ListSection, { title: section, className: SideNav_default.items, children: pages.map(({ label: text, url }, index) => {
170
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
171
- import_react_zen3.ListItem,
172
- {
173
- className: (0, import_classnames2.default)(SideNav_default.item, {
174
- [SideNav_default.selected]: url === pathname
175
- }),
176
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_link.default, { href: url, prefetch: false, children: text })
177
- },
178
- index
179
- );
180
- }) }, section);
167
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_zen3.Column, { "aria-label": "nav", gap: "6", children: menu.map(({ section, pages }) => {
168
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_zen3.Column, { title: section, className: SideNav_default.items, children: [
169
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_zen3.Text, { weight: "bold", className: SideNav_default.header, children: section }),
170
+ pages.map(({ label: text, url }, index) => {
171
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
172
+ "a",
173
+ {
174
+ className: (0, import_classnames2.default)(SideNav_default.item, {
175
+ [SideNav_default.selected]: url === pathname
176
+ }),
177
+ href: url,
178
+ children: text
179
+ },
180
+ index
181
+ );
182
+ })
183
+ ] }, section);
181
184
  }) })
182
185
  }
183
186
  );
184
187
  }
185
188
 
186
189
  // src/components/TopNav.tsx
187
- var import_link2 = __toESM(require("next/link"));
188
190
  var import_navigation2 = require("next/navigation");
189
191
  var import_react_zen4 = require("@umami/react-zen");
190
192
  var import_jsx_runtime4 = require("react/jsx-runtime");
@@ -193,13 +195,13 @@ function TopNav({ tabs }) {
193
195
  const tab = tabs?.find(({ id, url }) => id !== "docs" ? pathname.startsWith(url) : false);
194
196
  const selected = tab?.id || "docs";
195
197
  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 }) => {
196
- 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 }) });
198
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_zen4.Tab, { id, href: url, children: label });
197
199
  } }) });
198
200
  }
199
201
 
200
202
  // src/components/DocContent.tsx
201
203
  var import_react_zen6 = require("@umami/react-zen");
202
- var import_link3 = __toESM(require("next/link"));
204
+ var import_link = __toESM(require("next/link"));
203
205
 
204
206
  // src/components/Markdown.tsx
205
207
  var import_react_zen5 = require("@umami/react-zen");
@@ -242,7 +244,7 @@ function Markdown({ code }) {
242
244
  // src/components/DocContent.tsx
243
245
  var import_jsx_runtime6 = require("react/jsx-runtime");
244
246
  function DocContent({ section, title, description, code, next, prev }) {
245
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_react_zen6.Box, { flexGrow: 1, children: [
247
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_react_zen6.Box, { flexGrow: "1", children: [
246
248
  section && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_zen6.Text, { color: "primary", weight: "bold", children: section }),
247
249
  title && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_zen6.Heading, { size: "2", as: "h1", marginY: "3", children: title }),
248
250
  description && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_zen6.Text, { color: "muted", size: "3", children: description }),
@@ -261,7 +263,7 @@ var NavigationButton = ({
261
263
  if (!url || !label) {
262
264
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_zen6.Box, {});
263
265
  }
264
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_link3.default, { href: url, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_react_zen6.Row, { alignItems: "center", gap: "3", marginY: "3", children: [
266
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_link.default, { href: url, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_react_zen6.Row, { alignItems: "center", gap: "3", marginY: "3", children: [
265
267
  isPrev && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_zen6.Icon, { size: "sm", rotate: 180, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_zen6.Icons.Chevron, {}) }),
266
268
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_zen6.Text, { size: "3", weight: "bold", children: label }),
267
269
  !isPrev && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_zen6.Icon, { size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_zen6.Icons.Chevron, {}) })
@@ -279,7 +281,7 @@ function parseContent(content, config = {}) {
279
281
  const groups = navigation[key];
280
282
  found = groups?.find((group, groupIndex) => {
281
283
  return group.pages.find((page, pageIndex) => {
282
- const match = page.url.endsWith(content.slug);
284
+ const match = page.url.endsWith(content.slug) || content.slug === "index" && content.path.endsWith("index.mdx");
283
285
  if (match) {
284
286
  const prevGroup = groups[groupIndex - 1];
285
287
  const nextGroup = groups[groupIndex + 1];
@@ -371,20 +373,25 @@ var import_react_zen9 = require("@umami/react-zen");
371
373
 
372
374
  // src/components/Card.tsx
373
375
  var import_react_zen8 = require("@umami/react-zen");
374
- var import_link4 = __toESM(require("next/link"));
376
+ var import_link2 = __toESM(require("next/link"));
375
377
  var import_date_fns = require("date-fns");
376
378
  var import_jsx_runtime8 = require("react/jsx-runtime");
377
379
  function Card({ title, description, date, author, url, image }) {
378
380
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_zen8.Column, { borderSize: "1", borderRadius: "3", overflow: "hidden", children: [
379
381
  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" }) }),
380
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_zen8.Column, { padding: "6", gap: "4", children: [
381
- /* @__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 }) }),
382
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_zen8.Column, { padding: "6", gap: "4", flexGrow: "1", children: [
382
383
  /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_zen8.Row, { justifyContent: "space-between", children: [
383
384
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_zen8.Text, { color: "muted", children: date && (0, import_date_fns.format)(new Date(date), "PP") }),
384
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_zen8.Text, { color: "muted", children: author })
385
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_zen8.Text, { color: "muted", children: [
386
+ "Posted by ",
387
+ author
388
+ ] })
385
389
  ] }),
386
- /* @__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, { size: "3", children: description }) }),
387
- /* @__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: [
390
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_zen8.Column, { gap: "4", flexGrow: "1", children: [
391
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_zen8.Heading, { size: "4", as: "header", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_link2.default, { href: url, children: title }) }),
392
+ /* @__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 }) })
393
+ ] }),
394
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_zen8.Button, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_link2.default, { href: url, children: [
388
395
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_zen8.Text, { children: "Read more" }),
389
396
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_zen8.Icon, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_zen8.Icons.Arrow, {}) })
390
397
  ] }) })
@@ -437,13 +444,16 @@ function Blog({ title, code, author, date, image, anchors }) {
437
444
  lg: "block",
438
445
  xl: "block"
439
446
  };
440
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_zen11.Column, { gap: "8", maxWidth: "900px", style: { margin: "0 auto" }, children: [
441
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_zen11.Box, { flexGrow: 1, children: title && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_zen11.Heading, { size: "1", as: "h1", align: "center", children: title }) }),
442
- image && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_zen11.Box, { height: "480px", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_zen11.Image, { src: image, alt: title, objectFit: "cover", borderRadius: "3" }) }),
447
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_zen11.Column, { gap: "8", maxWidth: "960px", style: { margin: "0 auto" }, children: [
448
+ /* @__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 }) }),
443
449
  /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_zen11.Row, { justifyContent: "space-between", children: [
444
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_zen11.Text, { children: author }),
445
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_zen11.Text, { children: date && (0, import_date_fns2.format)(new Date(date), "PP") })
450
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_zen11.Text, { color: "muted", children: date && (0, import_date_fns2.format)(new Date(date), "PPP") }),
451
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_zen11.Text, { color: "muted", children: [
452
+ "Posted by ",
453
+ author
454
+ ] })
446
455
  ] }),
456
+ image && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_zen11.Box, { height: "480px", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_zen11.Image, { src: image, alt: title, objectFit: "cover", borderRadius: "3" }) }),
447
457
  /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_zen11.Row, { gap: "6", children: [
448
458
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Markdown, { code }),
449
459
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PageLinks, { display: linksDisplay, items: anchors, style: { top } })
package/dist/index.mjs CHANGED
@@ -5,7 +5,7 @@ import "@umami/react-zen/styles.css";
5
5
  import "highlight.js/styles/github-dark.css";
6
6
 
7
7
  // src/components/Blog.tsx
8
- import { Heading as Heading5, Box as Box8, Text as Text5, Row as Row5, Column as Column4, Image as Image2 } from "@umami/react-zen";
8
+ import { Heading as Heading5, Box as Box8, Text as Text6, Row as Row5, Column as Column5, Image as Image2 } from "@umami/react-zen";
9
9
  import { format as format2 } from "date-fns";
10
10
 
11
11
  // src/components/PageLinks.tsx
@@ -14,7 +14,7 @@ import { Column, Text, Box } from "@umami/react-zen";
14
14
  import classNames from "classnames";
15
15
 
16
16
  // css-modules:E:\dev\umami-shiso\src\components\PageLinks.module.css
17
- var PageLinks_default = { "links": "PageLinks_links__M2M5N", "link": "PageLinks_link__MmRhZ", "indent-1": "PageLinks_indent-1__NmJiN", "indent-2": "PageLinks_indent-2__ZjE5M", "indent-3": "PageLinks_indent-3__ODkyO", "indent-4": "PageLinks_indent-4__MGRkZ", "indent-5": "PageLinks_indent-5__NDgyZ", "indent-6": "PageLinks_indent-6__ZDkyN", "selected": "PageLinks_selected__N2RkZ" };
17
+ var PageLinks_default = { "links": "PageLinks_links__NmJhO", "link": "PageLinks_link__OGI3M", "indent-1": "PageLinks_indent-1__M2IxZ", "indent-2": "PageLinks_indent-2__YTBlM", "indent-3": "PageLinks_indent-3__YzJlZ", "indent-4": "PageLinks_indent-4__NDg3Z", "indent-5": "PageLinks_indent-5__ZTE4M", "indent-6": "PageLinks_indent-6__NTRjM", "selected": "PageLinks_selected__ZjhkN" };
18
18
 
19
19
  // src/components/PageLinks.tsx
20
20
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -98,21 +98,20 @@ import {
98
98
  Modal,
99
99
  DialogTrigger,
100
100
  Dialog,
101
- Text as Text3
101
+ Text as Text4
102
102
  } from "@umami/react-zen";
103
103
 
104
104
  // src/components/SideNav.tsx
105
105
  import { useEffect as useEffect2, useState as useState3 } from "react";
106
- import { Box as Box2, List, ListItem, ListSection } from "@umami/react-zen";
106
+ import { Text as Text2, Column as Column2 } from "@umami/react-zen";
107
107
  import classNames2 from "classnames";
108
108
  import { usePathname } from "next/navigation";
109
- import Link from "next/link";
110
109
 
111
110
  // css-modules:E:\dev\umami-shiso\src\components\SideNav.module.css
112
- var SideNav_default = { "nav": "SideNav_nav__ZjMzZ", "sticky": "SideNav_sticky__MWMxZ", "item": "SideNav_item__ZGQ0M", "selected": "SideNav_selected__ZTI4Y", "items": "SideNav_items__ZWU5O" };
111
+ var SideNav_default = { "nav": "SideNav_nav__NTkxM", "sticky": "SideNav_sticky__YTdmY", "item": "SideNav_item__MDk5Z", "selected": "SideNav_selected__ZjVkZ", "header": "SideNav_header__Y2YyY" };
113
112
 
114
113
  // src/components/SideNav.tsx
115
- import { jsx as jsx3 } from "react/jsx-runtime";
114
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
116
115
  function SideNav({
117
116
  tabs,
118
117
  navigation,
@@ -135,32 +134,35 @@ function SideNav({
135
134
  }
136
135
  }, [autoHeight]);
137
136
  return /* @__PURE__ */ jsx3(
138
- Box2,
137
+ Column2,
139
138
  {
140
139
  ...props,
141
140
  id: "shiso_docs_sidenav",
142
141
  className: classNames2(SideNav_default.nav, isSticky && SideNav_default.sticky, className),
143
142
  style: { ...style, height },
144
- children: /* @__PURE__ */ jsx3(List, { items: navigation, "aria-label": "nav", children: menu.map(({ section, pages }) => {
145
- return /* @__PURE__ */ jsx3(ListSection, { title: section, className: SideNav_default.items, children: pages.map(({ label: text, url }, index) => {
146
- return /* @__PURE__ */ jsx3(
147
- ListItem,
148
- {
149
- className: classNames2(SideNav_default.item, {
150
- [SideNav_default.selected]: url === pathname
151
- }),
152
- children: /* @__PURE__ */ jsx3(Link, { href: url, prefetch: false, children: text })
153
- },
154
- index
155
- );
156
- }) }, section);
143
+ children: /* @__PURE__ */ jsx3(Column2, { "aria-label": "nav", gap: "6", children: menu.map(({ section, pages }) => {
144
+ return /* @__PURE__ */ jsxs3(Column2, { title: section, className: SideNav_default.items, children: [
145
+ /* @__PURE__ */ jsx3(Text2, { weight: "bold", className: SideNav_default.header, children: section }),
146
+ pages.map(({ label: text, url }, index) => {
147
+ return /* @__PURE__ */ jsx3(
148
+ "a",
149
+ {
150
+ className: classNames2(SideNav_default.item, {
151
+ [SideNav_default.selected]: url === pathname
152
+ }),
153
+ href: url,
154
+ children: text
155
+ },
156
+ index
157
+ );
158
+ })
159
+ ] }, section);
157
160
  }) })
158
161
  }
159
162
  );
160
163
  }
161
164
 
162
165
  // src/components/TopNav.tsx
163
- import Link2 from "next/link";
164
166
  import { usePathname as usePathname2 } from "next/navigation";
165
167
  import { Tabs, TabList, Tab } from "@umami/react-zen";
166
168
  import { jsx as jsx4 } from "react/jsx-runtime";
@@ -169,13 +171,13 @@ function TopNav({ tabs }) {
169
171
  const tab = tabs?.find(({ id, url }) => id !== "docs" ? pathname.startsWith(url) : false);
170
172
  const selected = tab?.id || "docs";
171
173
  return /* @__PURE__ */ jsx4(Tabs, { selectedKey: selected, children: /* @__PURE__ */ jsx4(TabList, { items: tabs, children: ({ id, label, url }) => {
172
- return /* @__PURE__ */ jsx4(Tab, { id, children: /* @__PURE__ */ jsx4(Link2, { href: url, children: label }) });
174
+ return /* @__PURE__ */ jsx4(Tab, { id, href: url, children: label });
173
175
  } }) });
174
176
  }
175
177
 
176
178
  // src/components/DocContent.tsx
177
- import { Heading, Box as Box4, Text as Text2, Row, Icon as Icon2, Icons as Icons2 } from "@umami/react-zen";
178
- import Link3 from "next/link";
179
+ import { Heading, Box as Box4, Text as Text3, Row, Icon as Icon2, Icons as Icons2 } from "@umami/react-zen";
180
+ import Link from "next/link";
179
181
 
180
182
  // src/components/Markdown.tsx
181
183
  import { Box as Box3 } from "@umami/react-zen";
@@ -187,7 +189,7 @@ import * as runtime from "react/jsx-runtime";
187
189
  var Markdown_default = { "content": "Markdown_content__NmE1Z" };
188
190
 
189
191
  // src/components/Markdown.tsx
190
- import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
192
+ import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
191
193
  var parseMdx = (code) => {
192
194
  try {
193
195
  const result = runSync(code, {
@@ -203,7 +205,7 @@ function Markdown({ code }) {
203
205
  const components = useMDXComponents();
204
206
  const { Component, error } = parseMdx(code);
205
207
  if (error) {
206
- return /* @__PURE__ */ jsxs3("h1", { children: [
208
+ return /* @__PURE__ */ jsxs4("h1", { children: [
207
209
  "Error rendering MDX: ",
208
210
  error
209
211
  ] });
@@ -215,14 +217,14 @@ function Markdown({ code }) {
215
217
  }
216
218
 
217
219
  // src/components/DocContent.tsx
218
- import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
220
+ import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
219
221
  function DocContent({ section, title, description, code, next, prev }) {
220
- return /* @__PURE__ */ jsxs4(Box4, { flexGrow: 1, children: [
221
- section && /* @__PURE__ */ jsx6(Text2, { color: "primary", weight: "bold", children: section }),
222
+ return /* @__PURE__ */ jsxs5(Box4, { flexGrow: "1", children: [
223
+ section && /* @__PURE__ */ jsx6(Text3, { color: "primary", weight: "bold", children: section }),
222
224
  title && /* @__PURE__ */ jsx6(Heading, { size: "2", as: "h1", marginY: "3", children: title }),
223
- description && /* @__PURE__ */ jsx6(Text2, { color: "muted", size: "3", children: description }),
225
+ description && /* @__PURE__ */ jsx6(Text3, { color: "muted", size: "3", children: description }),
224
226
  /* @__PURE__ */ jsx6(Markdown, { code }),
225
- /* @__PURE__ */ jsxs4(Row, { justifyContent: "space-between", children: [
227
+ /* @__PURE__ */ jsxs5(Row, { justifyContent: "space-between", children: [
226
228
  /* @__PURE__ */ jsx6(NavigationButton, { ...prev, isPrev: true }),
227
229
  /* @__PURE__ */ jsx6(NavigationButton, { ...next })
228
230
  ] })
@@ -236,15 +238,15 @@ var NavigationButton = ({
236
238
  if (!url || !label) {
237
239
  return /* @__PURE__ */ jsx6(Box4, {});
238
240
  }
239
- return /* @__PURE__ */ jsx6(Link3, { href: url, children: /* @__PURE__ */ jsxs4(Row, { alignItems: "center", gap: "3", marginY: "3", children: [
241
+ return /* @__PURE__ */ jsx6(Link, { href: url, children: /* @__PURE__ */ jsxs5(Row, { alignItems: "center", gap: "3", marginY: "3", children: [
240
242
  isPrev && /* @__PURE__ */ jsx6(Icon2, { size: "sm", rotate: 180, children: /* @__PURE__ */ jsx6(Icons2.Chevron, {}) }),
241
- /* @__PURE__ */ jsx6(Text2, { size: "3", weight: "bold", children: label }),
243
+ /* @__PURE__ */ jsx6(Text3, { size: "3", weight: "bold", children: label }),
242
244
  !isPrev && /* @__PURE__ */ jsx6(Icon2, { size: "sm", children: /* @__PURE__ */ jsx6(Icons2.Chevron, {}) })
243
245
  ] }) });
244
246
  };
245
247
 
246
248
  // src/components/Docs.tsx
247
- import { Fragment, jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
249
+ import { Fragment, jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
248
250
  function parseContent(content, config = {}) {
249
251
  const { tabs, navigation } = config;
250
252
  const keys = Object.keys(navigation);
@@ -254,7 +256,7 @@ function parseContent(content, config = {}) {
254
256
  const groups = navigation[key];
255
257
  found = groups?.find((group, groupIndex) => {
256
258
  return group.pages.find((page, pageIndex) => {
257
- const match = page.url.endsWith(content.slug);
259
+ const match = page.url.endsWith(content.slug) || content.slug === "index" && content.path.endsWith("index.mdx");
258
260
  if (match) {
259
261
  const prevGroup = groups[groupIndex - 1];
260
262
  const nextGroup = groups[groupIndex + 1];
@@ -298,22 +300,22 @@ function Docs({ content, config }) {
298
300
  lg: "none",
299
301
  xl: "none"
300
302
  };
301
- const MobileMenuButton = () => /* @__PURE__ */ jsxs5(DialogTrigger, { children: [
302
- /* @__PURE__ */ jsxs5(Button, { children: [
303
+ const MobileMenuButton = () => /* @__PURE__ */ jsxs6(DialogTrigger, { children: [
304
+ /* @__PURE__ */ jsxs6(Button, { children: [
303
305
  /* @__PURE__ */ jsx7(Icon3, { children: /* @__PURE__ */ jsx7(Icons3.Menu, {}) }),
304
- /* @__PURE__ */ jsx7(Text3, { children: "Menu" })
306
+ /* @__PURE__ */ jsx7(Text4, { children: "Menu" })
305
307
  ] }),
306
308
  /* @__PURE__ */ jsx7(Modal, { position: "bottom", offset: "40px", children: /* @__PURE__ */ jsx7(Dialog, { variant: "sheet", children: ({ close }) => {
307
- return /* @__PURE__ */ jsxs5(Fragment, { children: [
309
+ return /* @__PURE__ */ jsxs6(Fragment, { children: [
308
310
  /* @__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, {}) }) }) }),
309
311
  /* @__PURE__ */ jsx7(Box5, { height: "100%", overflow: "auto", children: /* @__PURE__ */ jsx7(SideNav, { tabs, navigation }) })
310
312
  ] });
311
313
  } }) })
312
314
  ] });
313
- return /* @__PURE__ */ jsxs5(Box5, { flexGrow: "1", children: [
315
+ return /* @__PURE__ */ jsxs6(Box5, { flexGrow: "1", children: [
314
316
  /* @__PURE__ */ jsx7(Row2, { display: menuDisplay, justifyContent: "flex-end", children: /* @__PURE__ */ jsx7(MobileMenuButton, {}) }),
315
317
  tabs && /* @__PURE__ */ jsx7(TopNav, { tabs }),
316
- /* @__PURE__ */ jsxs5(Row2, { gap: "6", children: [
318
+ /* @__PURE__ */ jsxs6(Row2, { gap: "6", children: [
317
319
  /* @__PURE__ */ jsx7(
318
320
  SideNav,
319
321
  {
@@ -345,22 +347,27 @@ function Docs({ content, config }) {
345
347
  import { Grid } from "@umami/react-zen";
346
348
 
347
349
  // src/components/Card.tsx
348
- import { Box as Box6, Image, Column as Column2, Row as Row3, Heading as Heading3, Text as Text4, Button as Button2, Icon as Icon4, Icons as Icons4 } from "@umami/react-zen";
349
- import Link4 from "next/link";
350
+ 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";
351
+ import Link2 from "next/link";
350
352
  import { format } from "date-fns";
351
- import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
353
+ import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
352
354
  function Card({ title, description, date, author, url, image }) {
353
- return /* @__PURE__ */ jsxs6(Column2, { borderSize: "1", borderRadius: "3", overflow: "hidden", children: [
355
+ return /* @__PURE__ */ jsxs7(Column3, { borderSize: "1", borderRadius: "3", overflow: "hidden", children: [
354
356
  image && /* @__PURE__ */ jsx8(Box6, { height: "240px", children: /* @__PURE__ */ jsx8(Image, { src: image, alt: title, objectFit: "cover" }) }),
355
- /* @__PURE__ */ jsxs6(Column2, { padding: "6", gap: "4", children: [
356
- /* @__PURE__ */ jsx8(Heading3, { size: "4", as: "header", children: /* @__PURE__ */ jsx8(Link4, { href: url, children: title }) }),
357
- /* @__PURE__ */ jsxs6(Row3, { justifyContent: "space-between", children: [
358
- /* @__PURE__ */ jsx8(Text4, { color: "muted", children: date && format(new Date(date), "PP") }),
359
- /* @__PURE__ */ jsx8(Text4, { color: "muted", children: author })
357
+ /* @__PURE__ */ jsxs7(Column3, { padding: "6", gap: "4", flexGrow: "1", children: [
358
+ /* @__PURE__ */ jsxs7(Row3, { justifyContent: "space-between", children: [
359
+ /* @__PURE__ */ jsx8(Text5, { color: "muted", children: date && format(new Date(date), "PP") }),
360
+ /* @__PURE__ */ jsxs7(Text5, { color: "muted", children: [
361
+ "Posted by ",
362
+ author
363
+ ] })
360
364
  ] }),
361
- /* @__PURE__ */ jsx8(Box6, { marginY: "5", as: "p", children: /* @__PURE__ */ jsx8(Text4, { size: "3", children: description }) }),
362
- /* @__PURE__ */ jsx8(Button2, { asChild: true, children: /* @__PURE__ */ jsxs6(Link4, { href: url, children: [
363
- /* @__PURE__ */ jsx8(Text4, { children: "Read more" }),
365
+ /* @__PURE__ */ jsxs7(Column3, { gap: "4", flexGrow: "1", children: [
366
+ /* @__PURE__ */ jsx8(Heading3, { size: "4", as: "header", children: /* @__PURE__ */ jsx8(Link2, { href: url, children: title }) }),
367
+ /* @__PURE__ */ jsx8(Box6, { marginY: "5", as: "p", children: /* @__PURE__ */ jsx8(Text5, { color: "muted", size: "3", children: description }) })
368
+ ] }),
369
+ /* @__PURE__ */ jsx8(Button2, { asChild: true, children: /* @__PURE__ */ jsxs7(Link2, { href: url, children: [
370
+ /* @__PURE__ */ jsx8(Text5, { children: "Read more" }),
364
371
  /* @__PURE__ */ jsx8(Icon4, { children: /* @__PURE__ */ jsx8(Icons4.Arrow, {}) })
365
372
  ] }) })
366
373
  ] })
@@ -400,7 +407,7 @@ function useShiso() {
400
407
  }
401
408
 
402
409
  // src/components/Blog.tsx
403
- import { jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
410
+ import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
404
411
  function Blog({ title, code, author, date, image, anchors }) {
405
412
  const { config } = useShiso();
406
413
  const { top } = config?.blog || {};
@@ -412,14 +419,17 @@ function Blog({ title, code, author, date, image, anchors }) {
412
419
  lg: "block",
413
420
  xl: "block"
414
421
  };
415
- return /* @__PURE__ */ jsxs7(Column4, { gap: "8", maxWidth: "900px", style: { margin: "0 auto" }, children: [
416
- /* @__PURE__ */ jsx11(Box8, { flexGrow: 1, children: title && /* @__PURE__ */ jsx11(Heading5, { size: "1", as: "h1", align: "center", children: title }) }),
417
- image && /* @__PURE__ */ jsx11(Box8, { height: "480px", children: /* @__PURE__ */ jsx11(Image2, { src: image, alt: title, objectFit: "cover", borderRadius: "3" }) }),
418
- /* @__PURE__ */ jsxs7(Row5, { justifyContent: "space-between", children: [
419
- /* @__PURE__ */ jsx11(Text5, { children: author }),
420
- /* @__PURE__ */ jsx11(Text5, { children: date && format2(new Date(date), "PP") })
422
+ return /* @__PURE__ */ jsxs8(Column5, { gap: "8", maxWidth: "960px", style: { margin: "0 auto" }, children: [
423
+ /* @__PURE__ */ jsx11(Box8, { flexGrow: "1", paddingY: "6", children: title && /* @__PURE__ */ jsx11(Heading5, { size: "1", as: "h1", align: "center", children: title }) }),
424
+ /* @__PURE__ */ jsxs8(Row5, { justifyContent: "space-between", children: [
425
+ /* @__PURE__ */ jsx11(Text6, { color: "muted", children: date && format2(new Date(date), "PPP") }),
426
+ /* @__PURE__ */ jsxs8(Text6, { color: "muted", children: [
427
+ "Posted by ",
428
+ author
429
+ ] })
421
430
  ] }),
422
- /* @__PURE__ */ jsxs7(Row5, { gap: "6", children: [
431
+ image && /* @__PURE__ */ jsx11(Box8, { height: "480px", children: /* @__PURE__ */ jsx11(Image2, { src: image, alt: title, objectFit: "cover", borderRadius: "3" }) }),
432
+ /* @__PURE__ */ jsxs8(Row5, { gap: "6", children: [
423
433
  /* @__PURE__ */ jsx11(Markdown, { code }),
424
434
  /* @__PURE__ */ jsx11(PageLinks, { display: linksDisplay, items: anchors, style: { top } })
425
435
  ] })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umami/shiso",
3
- "version": "0.36.0",
3
+ "version": "0.38.0",
4
4
  "description": "A content layer for Next.js",
5
5
  "homepage": "https://umami.is/shiso",
6
6
  "repository": {
@@ -46,7 +46,7 @@
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.42.0",
49
+ "@umami/react-zen": "^0.45.0",
50
50
  "classnames": "^2.5.1",
51
51
  "date-fns": "^4.1.0",
52
52
  "glob": "^10.3.10",
package/server/index.js CHANGED
@@ -87,7 +87,7 @@ export var parseFile = cache(function (file) { return __awaiter(void 0, void 0,
87
87
  }); });
88
88
  export function next(type, config) {
89
89
  var _this = this;
90
- var dir = path.join(config.contentDir, type);
90
+ var dir = path.resolve(config.contentDir, type);
91
91
  var _a = config[type].title, title = _a === void 0 ? 'Shiso' : _a;
92
92
  var getContent = function (file) { return __awaiter(_this, void 0, void 0, function () {
93
93
  var content;