@natsuneko-laboratory/makit-theme-product 0.5.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.
Files changed (64) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +69 -0
  3. package/dist/components/breadcrumbs.d.mts +6 -0
  4. package/dist/components/breadcrumbs.d.mts.map +1 -0
  5. package/dist/components/breadcrumbs.mjs +30 -0
  6. package/dist/components/breadcrumbs.mjs.map +1 -0
  7. package/dist/components/docs-page.d.mts +6 -0
  8. package/dist/components/docs-page.d.mts.map +1 -0
  9. package/dist/components/docs-page.mjs +93 -0
  10. package/dist/components/docs-page.mjs.map +1 -0
  11. package/dist/components/footer.d.mts +6 -0
  12. package/dist/components/footer.d.mts.map +1 -0
  13. package/dist/components/footer.mjs +32 -0
  14. package/dist/components/footer.mjs.map +1 -0
  15. package/dist/components/header.d.mts +6 -0
  16. package/dist/components/header.d.mts.map +1 -0
  17. package/dist/components/header.mjs +97 -0
  18. package/dist/components/header.mjs.map +1 -0
  19. package/dist/components/icons.mjs +73 -0
  20. package/dist/components/icons.mjs.map +1 -0
  21. package/dist/components/navigation-items.d.mts +6 -0
  22. package/dist/components/navigation-items.d.mts.map +1 -0
  23. package/dist/components/navigation-items.mjs +95 -0
  24. package/dist/components/navigation-items.mjs.map +1 -0
  25. package/dist/components/not-found-page.d.mts +9 -0
  26. package/dist/components/not-found-page.d.mts.map +1 -0
  27. package/dist/components/not-found-page.mjs +39 -0
  28. package/dist/components/not-found-page.mjs.map +1 -0
  29. package/dist/components/page-header.d.mts +6 -0
  30. package/dist/components/page-header.d.mts.map +1 -0
  31. package/dist/components/page-header.mjs +26 -0
  32. package/dist/components/page-header.mjs.map +1 -0
  33. package/dist/components/portal-home-page.d.mts +6 -0
  34. package/dist/components/portal-home-page.d.mts.map +1 -0
  35. package/dist/components/portal-home-page.mjs +117 -0
  36. package/dist/components/portal-home-page.mjs.map +1 -0
  37. package/dist/components/prev-next-links.d.mts +6 -0
  38. package/dist/components/prev-next-links.d.mts.map +1 -0
  39. package/dist/components/prev-next-links.mjs +39 -0
  40. package/dist/components/prev-next-links.mjs.map +1 -0
  41. package/dist/components/root-layout.d.mts +10 -0
  42. package/dist/components/root-layout.d.mts.map +1 -0
  43. package/dist/components/root-layout.mjs +21 -0
  44. package/dist/components/root-layout.mjs.map +1 -0
  45. package/dist/components/sidebar.d.mts +6 -0
  46. package/dist/components/sidebar.d.mts.map +1 -0
  47. package/dist/components/sidebar.mjs +35 -0
  48. package/dist/components/sidebar.mjs.map +1 -0
  49. package/dist/components/table-of-contents.d.mts +6 -0
  50. package/dist/components/table-of-contents.d.mts.map +1 -0
  51. package/dist/components/table-of-contents.mjs +76 -0
  52. package/dist/components/table-of-contents.mjs.map +1 -0
  53. package/dist/components/theme-variables.d.mts +6 -0
  54. package/dist/components/theme-variables.d.mts.map +1 -0
  55. package/dist/components/theme-variables.mjs +92 -0
  56. package/dist/components/theme-variables.mjs.map +1 -0
  57. package/dist/index.d.mts +14 -0
  58. package/dist/index.mjs +14 -0
  59. package/dist/manifest.d.mts +5 -0
  60. package/dist/manifest.d.mts.map +1 -0
  61. package/dist/manifest.mjs +15 -0
  62. package/dist/manifest.mjs.map +1 -0
  63. package/package.json +57 -0
  64. package/styles/theme.css +93 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Makit contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,69 @@
1
+ # @natsuneko-laboratory/makit-theme-product
2
+
3
+ A Makit theme for product documentation — the kind that sits one click from a
4
+ marketing site. Soft cards, pill navigation, a gradient home page, and a
5
+ reading column with room to breathe.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ pnpm add @natsuneko-laboratory/makit-theme-product
11
+ ```
12
+
13
+ ```ts
14
+ // makit.config.ts
15
+ import { defineConfig } from "@natsuneko-laboratory/makit";
16
+
17
+ export default defineConfig({
18
+ theme: {
19
+ extends: "@natsuneko-laboratory/makit-theme-product",
20
+ },
21
+ });
22
+ ```
23
+
24
+ The theme's manifest supplies `radius: "large"` and `accentColor: "indigo"`.
25
+ Anything set in `makit.config.ts` takes priority over those defaults.
26
+
27
+ ## Accents
28
+
29
+ `theme.accentColor` accepts the names below, or any CSS color (used as-is for
30
+ both schemes). Each name carries a light/dark pair, because the theme's two
31
+ backgrounds — white and a deep navy — need different weights to stay legible.
32
+
33
+ | Name | Light | Dark |
34
+ | --------- | --------- | --------- |
35
+ | `indigo` | `#4f46e5` | `#818cf8` |
36
+ | `violet` | `#7c3aed` | `#a78bfa` |
37
+ | `blue` | `#2563eb` | `#60a5fa` |
38
+ | `sky` | `#0284c7` | `#38bdf8` |
39
+ | `teal` | `#0d9488` | `#2dd4bf` |
40
+ | `emerald` | `#059669` | `#34d399` |
41
+ | `rose` | `#e11d48` | `#fb7185` |
42
+ | `amber` | `#d97706` | `#fbbf24` |
43
+
44
+ Both palettes meet WCAG AA against their background for body, subtle, and
45
+ accent text.
46
+
47
+ Unlike the terminal theme, this one honors `theme.radius` throughout.
48
+
49
+ ## Slots
50
+
51
+ The theme implements thirteen slots:
52
+
53
+ `RootLayout`, `DocsPage`, `PortalHomePage`, `NotFoundPage`, `Header`,
54
+ `Sidebar`, `NavigationItems`, `Breadcrumbs`, `PageHeader`, `PrevNextLinks`,
55
+ `TableOfContents`, `Footer`, `ThemeVariables`.
56
+
57
+ Everything else falls back to Makit's standard theme — its rounded,
58
+ variable-driven styling already matches, so rewriting it would only add
59
+ surface area.
60
+
61
+ ## Notes
62
+
63
+ `PageHeader` renders an eyebrow above the title, taken from the page's nearest
64
+ ancestor in the canonical navigation hierarchy. No configuration is involved:
65
+ a page under `guides/` gets "Guides".
66
+
67
+ ## License
68
+
69
+ MIT
@@ -0,0 +1,6 @@
1
+ import { BreadcrumbsProps } from "@natsuneko-laboratory/makit-runtime";
2
+ //#region src/components/breadcrumbs.d.ts
3
+ declare function Breadcrumbs({ items }: BreadcrumbsProps): import("react").JSX.Element | null;
4
+ //#endregion
5
+ export { Breadcrumbs };
6
+ //# sourceMappingURL=breadcrumbs.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breadcrumbs.d.mts","names":[],"sources":["../../src/components/breadcrumbs.tsx"],"mappings":";;iBAIgB,cAAc,SAAS,mCAAgB,IAAA"}
@@ -0,0 +1,30 @@
1
+ import { ChevronRight } from "./icons.mjs";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import Link from "next/link.js";
4
+ //#region src/components/breadcrumbs.tsx
5
+ function Breadcrumbs({ items }) {
6
+ if (items.length === 0) return null;
7
+ return /* @__PURE__ */ jsx("nav", {
8
+ "aria-label": "Breadcrumb",
9
+ className: "mb-6 flex flex-wrap items-center gap-1 text-[13px] text-[var(--makit-color-subtle)]",
10
+ children: items.map((item, index) => {
11
+ const isLast = index === items.length - 1;
12
+ return /* @__PURE__ */ jsxs("span", {
13
+ className: "flex items-center gap-1",
14
+ children: [index > 0 && /* @__PURE__ */ jsx(ChevronRight, { className: "size-3.5 opacity-50" }), item.href && !isLast ? /* @__PURE__ */ jsx(Link, {
15
+ href: item.href,
16
+ className: "transition hover:text-[var(--makit-color-foreground)]",
17
+ children: item.title
18
+ }) : /* @__PURE__ */ jsx("span", {
19
+ "aria-current": isLast ? "page" : void 0,
20
+ className: isLast ? "font-medium text-[var(--makit-color-foreground)]" : void 0,
21
+ children: item.title
22
+ })]
23
+ }, `${item.title}-${index}`);
24
+ })
25
+ });
26
+ }
27
+ //#endregion
28
+ export { Breadcrumbs };
29
+
30
+ //# sourceMappingURL=breadcrumbs.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breadcrumbs.mjs","names":[],"sources":["../../src/components/breadcrumbs.tsx"],"sourcesContent":["import Link from \"next/link\";\r\nimport type { BreadcrumbsProps } from \"@natsuneko-laboratory/makit-runtime\";\r\nimport { ChevronRight } from \"./icons.js\";\r\n\r\nexport function Breadcrumbs({ items }: BreadcrumbsProps) {\r\n if (items.length === 0) return null;\r\n\r\n return (\r\n <nav\r\n aria-label=\"Breadcrumb\"\r\n className=\"mb-6 flex flex-wrap items-center gap-1 text-[13px] text-[var(--makit-color-subtle)]\"\r\n >\r\n {items.map((item, index) => {\r\n const isLast = index === items.length - 1;\r\n return (\r\n <span key={`${item.title}-${index}`} className=\"flex items-center gap-1\">\r\n {index > 0 && <ChevronRight className=\"size-3.5 opacity-50\" />}\r\n {item.href && !isLast ? (\r\n <Link\r\n href={item.href}\r\n className=\"transition hover:text-[var(--makit-color-foreground)]\"\r\n >\r\n {item.title}\r\n </Link>\r\n ) : (\r\n <span\r\n aria-current={isLast ? \"page\" : undefined}\r\n className={isLast ? \"font-medium text-[var(--makit-color-foreground)]\" : undefined}\r\n >\r\n {item.title}\r\n </span>\r\n )}\r\n </span>\r\n );\r\n })}\r\n </nav>\r\n );\r\n}\r\n"],"mappings":";;;;AAIA,SAAgB,YAAY,EAAE,SAA2B;CACvD,IAAI,MAAM,WAAW,GAAG,OAAO;CAE/B,OACE,oBAAC,OAAD;EACE,cAAW;EACX,WAAU;YAET,MAAM,KAAK,MAAM,UAAU;GAC1B,MAAM,SAAS,UAAU,MAAM,SAAS;GACxC,OACE,qBAAC,QAAD;IAAqC,WAAU;cAA/C,CACG,QAAQ,KAAK,oBAAC,cAAD,EAAc,WAAU,sBAAuB,CAAA,GAC5D,KAAK,QAAQ,CAAC,SACb,oBAAC,MAAD;KACE,MAAM,KAAK;KACX,WAAU;eAET,KAAK;IACF,CAAA,IAEN,oBAAC,QAAD;KACE,gBAAc,SAAS,SAAS,KAAA;KAChC,WAAW,SAAS,qDAAqD,KAAA;eAExE,KAAK;IACF,CAAA,CAEJ;MAjBK,GAAG,KAAK,MAAM,GAAG,OAiBtB;EAEV,CAAC;CACE,CAAA;AAET"}
@@ -0,0 +1,6 @@
1
+ import { DocsPageProps } from "@natsuneko-laboratory/makit-runtime";
2
+ //#region src/components/docs-page.d.ts
3
+ declare function DocsPage({ page, site, i18n, navigation, components: C }: DocsPageProps): Promise<import("react").JSX.Element>;
4
+ //#endregion
5
+ export { DocsPage };
6
+ //# sourceMappingURL=docs-page.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"docs-page.d.mts","names":[],"sources":["../../src/components/docs-page.tsx"],"mappings":";;iBAQsB,WAAW,MAAM,MAAM,MAAM,YAAY,YAAY,KAAK,gBAAa,wBAAA,IAAA"}
@@ -0,0 +1,93 @@
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import { getCollections, getGlobalNavigation, getHomeRoute, getSearchIndex } from "@natsuneko-laboratory/makit-runtime";
3
+ //#region src/components/docs-page.tsx
4
+ async function DocsPage({ page, site, i18n, navigation, components: C }) {
5
+ const [homeHref, collections, globalNavigation, searchEntries] = await Promise.all([
6
+ getHomeRoute(page.locale).then((href) => href ?? `${site.basePath}/`),
7
+ getCollections(),
8
+ getGlobalNavigation(page.locale),
9
+ getSearchIndex(page.locale)
10
+ ]);
11
+ const prev = page.navigationPosition?.prev;
12
+ const next = page.navigationPosition?.next;
13
+ const shellColumns = page.sidebar ? page.tableOfContents ? "md:grid-cols-[17rem_minmax(0,1fr)] xl:grid-cols-[17rem_minmax(0,1fr)_17rem]" : "md:grid-cols-[17rem_minmax(0,1fr)]" : page.tableOfContents ? "xl:grid-cols-[minmax(0,1fr)_17rem]" : "grid-cols-1";
14
+ const headerActions = /* @__PURE__ */ jsxs(Fragment, { children: [
15
+ /* @__PURE__ */ jsx(C.SearchDialog, {
16
+ entries: searchEntries,
17
+ pagefindEnabled: process.env.NODE_ENV === "production",
18
+ pagefindBundlePath: `${site.basePath}/pagefind/`
19
+ }),
20
+ /* @__PURE__ */ jsx(C.CollectionSwitcher, {
21
+ collections,
22
+ currentCollectionId: page.collectionId,
23
+ locale: page.locale
24
+ }),
25
+ i18n.enabled && /* @__PURE__ */ jsx(C.LocaleSwitcher, {
26
+ page,
27
+ locales: i18n.locales,
28
+ missingPageBehavior: i18n.localeSwitcher.missingPage
29
+ }),
30
+ site.theme.colorScheme === "system" && /* @__PURE__ */ jsx(C.ThemeToggle, {})
31
+ ] });
32
+ return /* @__PURE__ */ jsxs("div", {
33
+ className: "flex min-h-screen flex-col bg-[var(--makit-color-background)] text-[var(--makit-color-foreground)]",
34
+ children: [
35
+ /* @__PURE__ */ jsx(C.Header, {
36
+ header: site.header,
37
+ siteTitle: site.title,
38
+ homeHref,
39
+ actions: headerActions,
40
+ globalNavigation
41
+ }),
42
+ /* @__PURE__ */ jsxs("div", {
43
+ className: `mx-auto grid w-full max-w-[92rem] flex-1 grid-cols-1 ${shellColumns}`,
44
+ children: [
45
+ page.sidebar && /* @__PURE__ */ jsx(C.Sidebar, {
46
+ navigation,
47
+ currentRoute: page.route,
48
+ components: C
49
+ }),
50
+ /* @__PURE__ */ jsx("main", {
51
+ "data-pagefind-body": true,
52
+ className: "min-w-0 px-5 py-12 sm:px-10 md:py-16",
53
+ children: /* @__PURE__ */ jsxs("div", {
54
+ className: "mx-auto max-w-3xl",
55
+ children: [
56
+ /* @__PURE__ */ jsx(C.FallbackNotice, {
57
+ page,
58
+ i18n
59
+ }),
60
+ /* @__PURE__ */ jsx(C.Breadcrumbs, { items: page.breadcrumbs }),
61
+ /* @__PURE__ */ jsx(C.PageHeader, { page }),
62
+ /* @__PURE__ */ jsx(C.PageContent, {
63
+ html: page.html,
64
+ copyButton: site.markdown.code.copyButton
65
+ }),
66
+ /* @__PURE__ */ jsx(C.PrevNextLinks, {
67
+ prev,
68
+ next
69
+ })
70
+ ]
71
+ })
72
+ }),
73
+ page.tableOfContents && /* @__PURE__ */ jsx(C.TableOfContents, {
74
+ headings: page.headings,
75
+ minDepth: site.markdown.tableOfContents.minDepth,
76
+ maxDepth: site.markdown.tableOfContents.maxDepth,
77
+ actions: /* @__PURE__ */ jsx(C.PageActions, {
78
+ route: page.route,
79
+ editUrl: page.isFallback ? void 0 : page.editUrl,
80
+ markdownEnabled: site.llms.enabled && !page.isFallback && !page.draft,
81
+ placement: "table-of-contents"
82
+ })
83
+ })
84
+ ]
85
+ }),
86
+ /* @__PURE__ */ jsx(C.Footer, { footer: site.footer })
87
+ ]
88
+ });
89
+ }
90
+ //#endregion
91
+ export { DocsPage };
92
+
93
+ //# sourceMappingURL=docs-page.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"docs-page.mjs","names":[],"sources":["../../src/components/docs-page.tsx"],"sourcesContent":["import {\r\n getCollections,\r\n getGlobalNavigation,\r\n getHomeRoute,\r\n getSearchIndex,\r\n} from \"@natsuneko-laboratory/makit-runtime\";\r\nimport type { DocsPageProps } from \"@natsuneko-laboratory/makit-runtime\";\r\n\r\nexport async function DocsPage({ page, site, i18n, navigation, components: C }: DocsPageProps) {\r\n const [homeHref, collections, globalNavigation, searchEntries] = await Promise.all([\r\n getHomeRoute(page.locale).then((href) => href ?? `${site.basePath}/`),\r\n getCollections(),\r\n getGlobalNavigation(page.locale),\r\n getSearchIndex(page.locale),\r\n ]);\r\n\r\n const prev = page.navigationPosition?.prev;\r\n const next = page.navigationPosition?.next;\r\n const shellColumns = page.sidebar\r\n ? page.tableOfContents\r\n ? \"md:grid-cols-[17rem_minmax(0,1fr)] xl:grid-cols-[17rem_minmax(0,1fr)_17rem]\"\r\n : \"md:grid-cols-[17rem_minmax(0,1fr)]\"\r\n : page.tableOfContents\r\n ? \"xl:grid-cols-[minmax(0,1fr)_17rem]\"\r\n : \"grid-cols-1\";\r\n\r\n const headerActions = (\r\n <>\r\n <C.SearchDialog\r\n entries={searchEntries}\r\n pagefindEnabled={process.env.NODE_ENV === \"production\"}\r\n pagefindBundlePath={`${site.basePath}/pagefind/`}\r\n />\r\n <C.CollectionSwitcher\r\n collections={collections}\r\n currentCollectionId={page.collectionId}\r\n locale={page.locale}\r\n />\r\n {i18n.enabled && (\r\n <C.LocaleSwitcher\r\n page={page}\r\n locales={i18n.locales}\r\n missingPageBehavior={i18n.localeSwitcher.missingPage}\r\n />\r\n )}\r\n {site.theme.colorScheme === \"system\" && <C.ThemeToggle />}\r\n </>\r\n );\r\n\r\n return (\r\n <div className=\"flex min-h-screen flex-col bg-[var(--makit-color-background)] text-[var(--makit-color-foreground)]\">\r\n <C.Header\r\n header={site.header}\r\n siteTitle={site.title}\r\n homeHref={homeHref}\r\n actions={headerActions}\r\n globalNavigation={globalNavigation}\r\n />\r\n <div className={`mx-auto grid w-full max-w-[92rem] flex-1 grid-cols-1 ${shellColumns}`}>\r\n {page.sidebar && (\r\n <C.Sidebar navigation={navigation} currentRoute={page.route} components={C} />\r\n )}\r\n <main data-pagefind-body className=\"min-w-0 px-5 py-12 sm:px-10 md:py-16\">\r\n <div className=\"mx-auto max-w-3xl\">\r\n <C.FallbackNotice page={page} i18n={i18n} />\r\n <C.Breadcrumbs items={page.breadcrumbs} />\r\n <C.PageHeader page={page} />\r\n <C.PageContent html={page.html} copyButton={site.markdown.code.copyButton} />\r\n <C.PrevNextLinks prev={prev} next={next} />\r\n </div>\r\n </main>\r\n {page.tableOfContents && (\r\n <C.TableOfContents\r\n headings={page.headings}\r\n minDepth={site.markdown.tableOfContents.minDepth}\r\n maxDepth={site.markdown.tableOfContents.maxDepth}\r\n actions={\r\n <C.PageActions\r\n route={page.route}\r\n editUrl={page.isFallback ? undefined : page.editUrl}\r\n markdownEnabled={site.llms.enabled && !page.isFallback && !page.draft}\r\n placement=\"table-of-contents\"\r\n />\r\n }\r\n />\r\n )}\r\n </div>\r\n <C.Footer footer={site.footer} />\r\n </div>\r\n );\r\n}\r\n"],"mappings":";;;AAQA,eAAsB,SAAS,EAAE,MAAM,MAAM,MAAM,YAAY,YAAY,KAAoB;CAC7F,MAAM,CAAC,UAAU,aAAa,kBAAkB,iBAAiB,MAAM,QAAQ,IAAI;EACjF,aAAa,KAAK,MAAM,CAAC,CAAC,MAAM,SAAS,QAAQ,GAAG,KAAK,SAAS,EAAE;EACpE,eAAe;EACf,oBAAoB,KAAK,MAAM;EAC/B,eAAe,KAAK,MAAM;CAC5B,CAAC;CAED,MAAM,OAAO,KAAK,oBAAoB;CACtC,MAAM,OAAO,KAAK,oBAAoB;CACtC,MAAM,eAAe,KAAK,UACtB,KAAK,kBACH,gFACA,uCACF,KAAK,kBACH,uCACA;CAEN,MAAM,gBACJ,qBAAA,UAAA,EAAA,UAAA;EACE,oBAAC,EAAE,cAAH;GACE,SAAS;GACT,iBAAiB,QAAQ,IAAI,aAAa;GAC1C,oBAAoB,GAAG,KAAK,SAAS;EACtC,CAAA;EACD,oBAAC,EAAE,oBAAH;GACe;GACb,qBAAqB,KAAK;GAC1B,QAAQ,KAAK;EACd,CAAA;EACA,KAAK,WACJ,oBAAC,EAAE,gBAAH;GACQ;GACN,SAAS,KAAK;GACd,qBAAqB,KAAK,eAAe;EAC1C,CAAA;EAEF,KAAK,MAAM,gBAAgB,YAAY,oBAAC,EAAE,aAAH,CAAgB,CAAA;CACxD,EAAA,CAAA;CAGJ,OACE,qBAAC,OAAD;EAAK,WAAU;YAAf;GACE,oBAAC,EAAE,QAAH;IACE,QAAQ,KAAK;IACb,WAAW,KAAK;IACN;IACV,SAAS;IACS;GACnB,CAAA;GACD,qBAAC,OAAD;IAAK,WAAW,wDAAwD;cAAxE;KACG,KAAK,WACJ,oBAAC,EAAE,SAAH;MAAuB;MAAY,cAAc,KAAK;MAAO,YAAY;KAAI,CAAA;KAE/E,oBAAC,QAAD;MAAM,sBAAA;MAAmB,WAAU;gBACjC,qBAAC,OAAD;OAAK,WAAU;iBAAf;QACE,oBAAC,EAAE,gBAAH;SAAwB;SAAY;QAAO,CAAA;QAC3C,oBAAC,EAAE,aAAH,EAAe,OAAO,KAAK,YAAc,CAAA;QACzC,oBAAC,EAAE,YAAH,EAAoB,KAAO,CAAA;QAC3B,oBAAC,EAAE,aAAH;SAAe,MAAM,KAAK;SAAM,YAAY,KAAK,SAAS,KAAK;QAAa,CAAA;QAC5E,oBAAC,EAAE,eAAH;SAAuB;SAAY;QAAO,CAAA;OACvC;;KACD,CAAA;KACL,KAAK,mBACJ,oBAAC,EAAE,iBAAH;MACE,UAAU,KAAK;MACf,UAAU,KAAK,SAAS,gBAAgB;MACxC,UAAU,KAAK,SAAS,gBAAgB;MACxC,SACE,oBAAC,EAAE,aAAH;OACE,OAAO,KAAK;OACZ,SAAS,KAAK,aAAa,KAAA,IAAY,KAAK;OAC5C,iBAAiB,KAAK,KAAK,WAAW,CAAC,KAAK,cAAc,CAAC,KAAK;OAChE,WAAU;MACX,CAAA;KAEJ,CAAA;IAEA;;GACL,oBAAC,EAAE,QAAH,EAAU,QAAQ,KAAK,OAAS,CAAA;EAC7B;;AAET"}
@@ -0,0 +1,6 @@
1
+ import { FooterProps } from "@natsuneko-laboratory/makit-runtime";
2
+ //#region src/components/footer.d.ts
3
+ declare function Footer({ footer }: FooterProps): import("react").JSX.Element | null;
4
+ //#endregion
5
+ export { Footer };
6
+ //# sourceMappingURL=footer.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"footer.d.mts","names":[],"sources":["../../src/components/footer.tsx"],"mappings":";;iBAIgB,SAAS,UAAU,8BAAW,IAAA"}
@@ -0,0 +1,32 @@
1
+ import { ExternalArrow } from "./icons.mjs";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import Link from "next/link.js";
4
+ //#region src/components/footer.tsx
5
+ function Footer({ footer }) {
6
+ if (!footer.copyright && (!footer.links || footer.links.length === 0)) return null;
7
+ return /* @__PURE__ */ jsx("footer", {
8
+ className: "border-t border-[var(--makit-color-border)] bg-[var(--makit-color-muted)] px-6 py-10 text-sm text-[var(--makit-color-subtle)]",
9
+ children: /* @__PURE__ */ jsxs("div", {
10
+ className: "mx-auto flex max-w-[92rem] flex-wrap items-center justify-between gap-4",
11
+ children: [footer.copyright && /* @__PURE__ */ jsx("span", { children: footer.copyright }), /* @__PURE__ */ jsx("nav", {
12
+ className: "flex flex-wrap items-center gap-5",
13
+ "aria-label": "Footer links",
14
+ children: (footer.links ?? []).map((link) => link.external ? /* @__PURE__ */ jsxs("a", {
15
+ href: link.href,
16
+ target: "_blank",
17
+ rel: "noopener noreferrer",
18
+ className: "flex items-center gap-1 transition hover:text-[var(--makit-color-foreground)]",
19
+ children: [link.label, /* @__PURE__ */ jsx(ExternalArrow, { className: "size-3 opacity-60" })]
20
+ }, link.href) : /* @__PURE__ */ jsx(Link, {
21
+ href: link.href,
22
+ className: "transition hover:text-[var(--makit-color-foreground)]",
23
+ children: link.label
24
+ }, link.href))
25
+ })]
26
+ })
27
+ });
28
+ }
29
+ //#endregion
30
+ export { Footer };
31
+
32
+ //# sourceMappingURL=footer.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"footer.mjs","names":[],"sources":["../../src/components/footer.tsx"],"sourcesContent":["import Link from \"next/link\";\r\nimport type { FooterProps } from \"@natsuneko-laboratory/makit-runtime\";\r\nimport { ExternalArrow } from \"./icons.js\";\r\n\r\nexport function Footer({ footer }: FooterProps) {\r\n if (!footer.copyright && (!footer.links || footer.links.length === 0)) return null;\r\n\r\n return (\r\n <footer className=\"border-t border-[var(--makit-color-border)] bg-[var(--makit-color-muted)] px-6 py-10 text-sm text-[var(--makit-color-subtle)]\">\r\n <div className=\"mx-auto flex max-w-[92rem] flex-wrap items-center justify-between gap-4\">\r\n {footer.copyright && <span>{footer.copyright}</span>}\r\n <nav className=\"flex flex-wrap items-center gap-5\" aria-label=\"Footer links\">\r\n {(footer.links ?? []).map((link) =>\r\n link.external ? (\r\n <a\r\n key={link.href}\r\n href={link.href}\r\n target=\"_blank\"\r\n rel=\"noopener noreferrer\"\r\n className=\"flex items-center gap-1 transition hover:text-[var(--makit-color-foreground)]\"\r\n >\r\n {link.label}\r\n <ExternalArrow className=\"size-3 opacity-60\" />\r\n </a>\r\n ) : (\r\n <Link\r\n key={link.href}\r\n href={link.href}\r\n className=\"transition hover:text-[var(--makit-color-foreground)]\"\r\n >\r\n {link.label}\r\n </Link>\r\n ),\r\n )}\r\n </nav>\r\n </div>\r\n </footer>\r\n );\r\n}\r\n"],"mappings":";;;;AAIA,SAAgB,OAAO,EAAE,UAAuB;CAC9C,IAAI,CAAC,OAAO,cAAc,CAAC,OAAO,SAAS,OAAO,MAAM,WAAW,IAAI,OAAO;CAE9E,OACE,oBAAC,UAAD;EAAQ,WAAU;YAChB,qBAAC,OAAD;GAAK,WAAU;aAAf,CACG,OAAO,aAAa,oBAAC,QAAD,EAAA,UAAO,OAAO,UAAgB,CAAA,GACnD,oBAAC,OAAD;IAAK,WAAU;IAAoC,cAAW;eAC1D,OAAO,SAAS,CAAC,EAAA,CAAG,KAAK,SACzB,KAAK,WACH,qBAAC,KAAD;KAEE,MAAM,KAAK;KACX,QAAO;KACP,KAAI;KACJ,WAAU;eALZ,CAOG,KAAK,OACN,oBAAC,eAAD,EAAe,WAAU,oBAAqB,CAAA,CAC7C;OARI,KAAK,IAQT,IAEH,oBAAC,MAAD;KAEE,MAAM,KAAK;KACX,WAAU;eAET,KAAK;IACF,GALC,KAAK,IAKN,CAEV;GACG,CAAA,CACF;;CACC,CAAA;AAEZ"}
@@ -0,0 +1,6 @@
1
+ import { HeaderProps } from "@natsuneko-laboratory/makit-runtime";
2
+ //#region src/components/header.d.ts
3
+ declare function Header({ header, siteTitle, homeHref, actions, globalNavigation }: HeaderProps): import("react").JSX.Element;
4
+ //#endregion
5
+ export { Header };
6
+ //# sourceMappingURL=header.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"header.d.mts","names":[],"sources":["../../src/components/header.tsx"],"mappings":";;iBAqEgB,SAAS,QAAQ,WAAW,UAAU,SAAS,oBAAoB,8BAAW,IAAA"}
@@ -0,0 +1,97 @@
1
+ import { ChevronDown, ExternalArrow } from "./icons.mjs";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import Link from "next/link.js";
4
+ //#region src/components/header.tsx
5
+ const PILL = "flex items-center gap-1 rounded-full px-3 py-1.5 text-sm font-medium text-[var(--makit-color-subtle)] transition hover:bg-[var(--makit-color-muted)] hover:text-[var(--makit-color-foreground)]";
6
+ function NavLink({ title, href, external }) {
7
+ return external ? /* @__PURE__ */ jsxs("a", {
8
+ href,
9
+ target: "_blank",
10
+ rel: "noopener noreferrer",
11
+ className: PILL,
12
+ children: [title, /* @__PURE__ */ jsx(ExternalArrow, { className: "size-3 opacity-60" })]
13
+ }) : /* @__PURE__ */ jsx(Link, {
14
+ href,
15
+ className: PILL,
16
+ children: title
17
+ });
18
+ }
19
+ /** A `navigation.global` item, with children rendered as a JS-free disclosure. */
20
+ function GlobalNavItem({ item }) {
21
+ if (item.items && item.items.length > 0) return /* @__PURE__ */ jsxs("details", {
22
+ className: "relative inline-block",
23
+ children: [/* @__PURE__ */ jsxs("summary", {
24
+ className: `${PILL} cursor-pointer list-none`,
25
+ children: [item.title, /* @__PURE__ */ jsx(ChevronDown, { className: "size-3.5 opacity-60" })]
26
+ }), /* @__PURE__ */ jsx("div", {
27
+ className: "makit-product-card absolute z-20 mt-2 min-w-52 rounded-2xl border border-[var(--makit-color-border)] bg-[var(--makit-color-surface)] p-1.5",
28
+ children: item.items.map((child) => /* @__PURE__ */ jsx("span", {
29
+ className: "block",
30
+ children: /* @__PURE__ */ jsx(NavLink, {
31
+ title: child.title,
32
+ href: child.href ?? "#",
33
+ external: child.external
34
+ })
35
+ }, child.title))
36
+ })]
37
+ });
38
+ return /* @__PURE__ */ jsx(NavLink, {
39
+ title: item.title,
40
+ href: item.href ?? "#",
41
+ external: item.external
42
+ });
43
+ }
44
+ function LogoMark({ header, siteTitle }) {
45
+ if (header.logo) return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("img", {
46
+ src: header.logo,
47
+ alt: "",
48
+ className: "makit-header-logo-light h-7 w-7 rounded-lg"
49
+ }), header.logoDark ? /* @__PURE__ */ jsx("img", {
50
+ src: header.logoDark,
51
+ alt: "",
52
+ className: "makit-header-logo-dark h-7 w-7 rounded-lg"
53
+ }) : null] });
54
+ return /* @__PURE__ */ jsx("span", {
55
+ "aria-hidden": "true",
56
+ className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-lg bg-linear-to-br from-[var(--makit-color-accent)] to-[color-mix(in_srgb,var(--makit-color-accent)_55%,#000)] text-[13px] font-bold text-white",
57
+ children: (header.title ?? siteTitle).slice(0, 1).toUpperCase()
58
+ });
59
+ }
60
+ function Header({ header, siteTitle, homeHref, actions, globalNavigation }) {
61
+ const globalItems = (globalNavigation ?? []).flatMap((group) => group.items);
62
+ return /* @__PURE__ */ jsx("header", {
63
+ className: "sticky top-0 z-40 border-b border-[var(--makit-color-border)] bg-[color-mix(in_srgb,var(--makit-color-background)_82%,transparent)] backdrop-blur-xl",
64
+ children: /* @__PURE__ */ jsxs("div", {
65
+ className: "mx-auto flex h-16 w-full max-w-[92rem] items-center justify-between gap-4 px-4 sm:px-6",
66
+ children: [/* @__PURE__ */ jsxs("div", {
67
+ className: "flex min-w-0 items-center gap-6",
68
+ children: [/* @__PURE__ */ jsxs(Link, {
69
+ href: homeHref,
70
+ className: "flex min-w-0 items-center gap-2.5 text-[15px] font-semibold tracking-[-0.01em] text-[var(--makit-color-foreground)]",
71
+ children: [/* @__PURE__ */ jsx(LogoMark, {
72
+ header,
73
+ siteTitle
74
+ }), /* @__PURE__ */ jsx("span", {
75
+ className: "truncate",
76
+ children: header.title ?? siteTitle
77
+ })]
78
+ }), /* @__PURE__ */ jsx("nav", {
79
+ className: "hidden items-center gap-1 md:flex",
80
+ "aria-label": "Global navigation",
81
+ children: globalItems.length > 0 ? globalItems.map((item) => /* @__PURE__ */ jsx(GlobalNavItem, { item }, item.title)) : (header.links ?? []).map((link) => /* @__PURE__ */ jsx(NavLink, {
82
+ title: link.label,
83
+ href: link.href,
84
+ external: link.external
85
+ }, link.href))
86
+ })]
87
+ }), /* @__PURE__ */ jsx("div", {
88
+ className: "flex shrink-0 items-center gap-2",
89
+ children: actions
90
+ })]
91
+ })
92
+ });
93
+ }
94
+ //#endregion
95
+ export { Header };
96
+
97
+ //# sourceMappingURL=header.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"header.mjs","names":[],"sources":["../../src/components/header.tsx"],"sourcesContent":["import Link from \"next/link\";\r\nimport type { ReactNode } from \"react\";\r\nimport type {\r\n GlobalNavigationGroup,\r\n GlobalNavigationItem,\r\n HeaderData,\r\n HeaderProps,\r\n} from \"@natsuneko-laboratory/makit-runtime\";\r\nimport { ChevronDown, ExternalArrow } from \"./icons.js\";\r\n\r\nconst PILL =\r\n \"flex items-center gap-1 rounded-full px-3 py-1.5 text-sm font-medium text-[var(--makit-color-subtle)] transition hover:bg-[var(--makit-color-muted)] hover:text-[var(--makit-color-foreground)]\";\r\n\r\nfunction NavLink({ title, href, external }: { title: string; href: string; external?: boolean }) {\r\n return external ? (\r\n <a href={href} target=\"_blank\" rel=\"noopener noreferrer\" className={PILL}>\r\n {title}\r\n <ExternalArrow className=\"size-3 opacity-60\" />\r\n </a>\r\n ) : (\r\n <Link href={href} className={PILL}>\r\n {title}\r\n </Link>\r\n );\r\n}\r\n\r\n/** A `navigation.global` item, with children rendered as a JS-free disclosure. */\r\nfunction GlobalNavItem({ item }: { item: GlobalNavigationItem }) {\r\n if (item.items && item.items.length > 0) {\r\n return (\r\n <details className=\"relative inline-block\">\r\n <summary className={`${PILL} cursor-pointer list-none`}>\r\n {item.title}\r\n <ChevronDown className=\"size-3.5 opacity-60\" />\r\n </summary>\r\n <div className=\"makit-product-card absolute z-20 mt-2 min-w-52 rounded-2xl border border-[var(--makit-color-border)] bg-[var(--makit-color-surface)] p-1.5\">\r\n {item.items.map((child) => (\r\n <span key={child.title} className=\"block\">\r\n <NavLink title={child.title} href={child.href ?? \"#\"} external={child.external} />\r\n </span>\r\n ))}\r\n </div>\r\n </details>\r\n );\r\n }\r\n return <NavLink title={item.title} href={item.href ?? \"#\"} external={item.external} />;\r\n}\r\n\r\nfunction LogoMark({ header, siteTitle }: { header: HeaderData; siteTitle: string }) {\r\n if (header.logo) {\r\n return (\r\n <>\r\n <img src={header.logo} alt=\"\" className=\"makit-header-logo-light h-7 w-7 rounded-lg\" />\r\n {header.logoDark ? (\r\n <img src={header.logoDark} alt=\"\" className=\"makit-header-logo-dark h-7 w-7 rounded-lg\" />\r\n ) : null}\r\n </>\r\n );\r\n }\r\n return (\r\n <span\r\n aria-hidden=\"true\"\r\n className=\"flex h-7 w-7 shrink-0 items-center justify-center rounded-lg bg-linear-to-br from-[var(--makit-color-accent)] to-[color-mix(in_srgb,var(--makit-color-accent)_55%,#000)] text-[13px] font-bold text-white\"\r\n >\r\n {(header.title ?? siteTitle).slice(0, 1).toUpperCase()}\r\n </span>\r\n );\r\n}\r\n\r\nexport function Header({ header, siteTitle, homeHref, actions, globalNavigation }: HeaderProps) {\r\n const globalItems: GlobalNavigationItem[] = (\r\n globalNavigation ?? ([] as readonly GlobalNavigationGroup[])\r\n ).flatMap((group) => group.items);\r\n\r\n return (\r\n <header className=\"sticky top-0 z-40 border-b border-[var(--makit-color-border)] bg-[color-mix(in_srgb,var(--makit-color-background)_82%,transparent)] backdrop-blur-xl\">\r\n <div className=\"mx-auto flex h-16 w-full max-w-[92rem] items-center justify-between gap-4 px-4 sm:px-6\">\r\n <div className=\"flex min-w-0 items-center gap-6\">\r\n <Link\r\n href={homeHref}\r\n className=\"flex min-w-0 items-center gap-2.5 text-[15px] font-semibold tracking-[-0.01em] text-[var(--makit-color-foreground)]\"\r\n >\r\n <LogoMark header={header} siteTitle={siteTitle} />\r\n <span className=\"truncate\">{header.title ?? siteTitle}</span>\r\n </Link>\r\n <nav className=\"hidden items-center gap-1 md:flex\" aria-label=\"Global navigation\">\r\n {globalItems.length > 0\r\n ? globalItems.map((item) => <GlobalNavItem key={item.title} item={item} />)\r\n : (header.links ?? []).map((link) => (\r\n <NavLink\r\n key={link.href}\r\n title={link.label}\r\n href={link.href}\r\n external={link.external}\r\n />\r\n ))}\r\n </nav>\r\n </div>\r\n <div className=\"flex shrink-0 items-center gap-2\">{actions as ReactNode}</div>\r\n </div>\r\n </header>\r\n );\r\n}\r\n"],"mappings":";;;;AAUA,MAAM,OACJ;AAEF,SAAS,QAAQ,EAAE,OAAO,MAAM,YAAiE;CAC/F,OAAO,WACL,qBAAC,KAAD;EAAS;EAAM,QAAO;EAAS,KAAI;EAAsB,WAAW;YAApE,CACG,OACD,oBAAC,eAAD,EAAe,WAAU,oBAAqB,CAAA,CAC7C;MAEH,oBAAC,MAAD;EAAY;EAAM,WAAW;YAC1B;CACG,CAAA;AAEV;;AAGA,SAAS,cAAc,EAAE,QAAwC;CAC/D,IAAI,KAAK,SAAS,KAAK,MAAM,SAAS,GACpC,OACE,qBAAC,WAAD;EAAS,WAAU;YAAnB,CACE,qBAAC,WAAD;GAAS,WAAW,GAAG,KAAK;aAA5B,CACG,KAAK,OACN,oBAAC,aAAD,EAAa,WAAU,sBAAuB,CAAA,CACvC;MACT,oBAAC,OAAD;GAAK,WAAU;aACZ,KAAK,MAAM,KAAK,UACf,oBAAC,QAAD;IAAwB,WAAU;cAChC,oBAAC,SAAD;KAAS,OAAO,MAAM;KAAO,MAAM,MAAM,QAAQ;KAAK,UAAU,MAAM;IAAW,CAAA;GAC7E,GAFK,MAAM,KAEX,CACP;EACE,CAAA,CACE;;CAGb,OAAO,oBAAC,SAAD;EAAS,OAAO,KAAK;EAAO,MAAM,KAAK,QAAQ;EAAK,UAAU,KAAK;CAAW,CAAA;AACvF;AAEA,SAAS,SAAS,EAAE,QAAQ,aAAwD;CAClF,IAAI,OAAO,MACT,OACE,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,OAAD;EAAK,KAAK,OAAO;EAAM,KAAI;EAAG,WAAU;CAA8C,CAAA,GACrF,OAAO,WACN,oBAAC,OAAD;EAAK,KAAK,OAAO;EAAU,KAAI;EAAG,WAAU;CAA6C,CAAA,IACvF,IACJ,EAAA,CAAA;CAGN,OACE,oBAAC,QAAD;EACE,eAAY;EACZ,WAAU;aAER,OAAO,SAAS,UAAA,CAAW,MAAM,GAAG,CAAC,CAAC,CAAC,YAAY;CACjD,CAAA;AAEV;AAEA,SAAgB,OAAO,EAAE,QAAQ,WAAW,UAAU,SAAS,oBAAiC;CAC9F,MAAM,eACJ,oBAAqB,CAAC,EAAA,CACtB,SAAS,UAAU,MAAM,KAAK;CAEhC,OACE,oBAAC,UAAD;EAAQ,WAAU;YAChB,qBAAC,OAAD;GAAK,WAAU;aAAf,CACE,qBAAC,OAAD;IAAK,WAAU;cAAf,CACE,qBAAC,MAAD;KACE,MAAM;KACN,WAAU;eAFZ,CAIE,oBAAC,UAAD;MAAkB;MAAmB;KAAY,CAAA,GACjD,oBAAC,QAAD;MAAM,WAAU;gBAAY,OAAO,SAAS;KAAgB,CAAA,CACxD;QACN,oBAAC,OAAD;KAAK,WAAU;KAAoC,cAAW;eAC3D,YAAY,SAAS,IAClB,YAAY,KAAK,SAAS,oBAAC,eAAD,EAAsC,KAAO,GAAzB,KAAK,KAAoB,CAAC,KACvE,OAAO,SAAS,CAAC,EAAA,CAAG,KAAK,SACxB,oBAAC,SAAD;MAEE,OAAO,KAAK;MACZ,MAAM,KAAK;MACX,UAAU,KAAK;KAChB,GAJM,KAAK,IAIX,CACF;IACF,CAAA,CACF;OACL,oBAAC,OAAD;IAAK,WAAU;cAAoC;GAA0B,CAAA,CAC1E;;CACC,CAAA;AAEZ"}
@@ -0,0 +1,73 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ //#region src/components/icons.tsx
3
+ /**
4
+ * Not a slot name, so Makit ignores this module — it is a helper the theme's
5
+ * own components import (THEME §8).
6
+ *
7
+ * Inline rather than `lucide-react` so the package carries no icon dependency
8
+ * of its own.
9
+ */
10
+ function ChevronRight({ className }) {
11
+ return /* @__PURE__ */ jsx("svg", {
12
+ "aria-hidden": "true",
13
+ viewBox: "0 0 16 16",
14
+ fill: "none",
15
+ className,
16
+ children: /* @__PURE__ */ jsx("path", {
17
+ d: "m6 3.5 4.5 4.5L6 12.5",
18
+ stroke: "currentColor",
19
+ strokeWidth: "1.6",
20
+ strokeLinecap: "round",
21
+ strokeLinejoin: "round"
22
+ })
23
+ });
24
+ }
25
+ function ChevronDown({ className }) {
26
+ return /* @__PURE__ */ jsx("svg", {
27
+ "aria-hidden": "true",
28
+ viewBox: "0 0 16 16",
29
+ fill: "none",
30
+ className,
31
+ children: /* @__PURE__ */ jsx("path", {
32
+ d: "M3.5 6 8 10.5 12.5 6",
33
+ stroke: "currentColor",
34
+ strokeWidth: "1.6",
35
+ strokeLinecap: "round",
36
+ strokeLinejoin: "round"
37
+ })
38
+ });
39
+ }
40
+ function ArrowRight({ className }) {
41
+ return /* @__PURE__ */ jsx("svg", {
42
+ "aria-hidden": "true",
43
+ viewBox: "0 0 16 16",
44
+ fill: "none",
45
+ className,
46
+ children: /* @__PURE__ */ jsx("path", {
47
+ d: "M3 8h10m0 0-4-4m4 4-4 4",
48
+ stroke: "currentColor",
49
+ strokeWidth: "1.6",
50
+ strokeLinecap: "round",
51
+ strokeLinejoin: "round"
52
+ })
53
+ });
54
+ }
55
+ function ExternalArrow({ className }) {
56
+ return /* @__PURE__ */ jsx("svg", {
57
+ "aria-hidden": "true",
58
+ viewBox: "0 0 16 16",
59
+ fill: "none",
60
+ className,
61
+ children: /* @__PURE__ */ jsx("path", {
62
+ d: "M6 3h7v7M13 3 4 12",
63
+ stroke: "currentColor",
64
+ strokeWidth: "1.6",
65
+ strokeLinecap: "round",
66
+ strokeLinejoin: "round"
67
+ })
68
+ });
69
+ }
70
+ //#endregion
71
+ export { ArrowRight, ChevronDown, ChevronRight, ExternalArrow };
72
+
73
+ //# sourceMappingURL=icons.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icons.mjs","names":[],"sources":["../../src/components/icons.tsx"],"sourcesContent":["/**\r\n * Not a slot name, so Makit ignores this module — it is a helper the theme's\r\n * own components import (THEME §8).\r\n *\r\n * Inline rather than `lucide-react` so the package carries no icon dependency\r\n * of its own.\r\n */\r\n\r\nexport function ChevronRight({ className }: { className?: string }) {\r\n return (\r\n <svg aria-hidden=\"true\" viewBox=\"0 0 16 16\" fill=\"none\" className={className}>\r\n <path\r\n d=\"m6 3.5 4.5 4.5L6 12.5\"\r\n stroke=\"currentColor\"\r\n strokeWidth=\"1.6\"\r\n strokeLinecap=\"round\"\r\n strokeLinejoin=\"round\"\r\n />\r\n </svg>\r\n );\r\n}\r\n\r\nexport function ChevronDown({ className }: { className?: string }) {\r\n return (\r\n <svg aria-hidden=\"true\" viewBox=\"0 0 16 16\" fill=\"none\" className={className}>\r\n <path\r\n d=\"M3.5 6 8 10.5 12.5 6\"\r\n stroke=\"currentColor\"\r\n strokeWidth=\"1.6\"\r\n strokeLinecap=\"round\"\r\n strokeLinejoin=\"round\"\r\n />\r\n </svg>\r\n );\r\n}\r\n\r\nexport function ArrowRight({ className }: { className?: string }) {\r\n return (\r\n <svg aria-hidden=\"true\" viewBox=\"0 0 16 16\" fill=\"none\" className={className}>\r\n <path\r\n d=\"M3 8h10m0 0-4-4m4 4-4 4\"\r\n stroke=\"currentColor\"\r\n strokeWidth=\"1.6\"\r\n strokeLinecap=\"round\"\r\n strokeLinejoin=\"round\"\r\n />\r\n </svg>\r\n );\r\n}\r\n\r\nexport function ExternalArrow({ className }: { className?: string }) {\r\n return (\r\n <svg aria-hidden=\"true\" viewBox=\"0 0 16 16\" fill=\"none\" className={className}>\r\n <path\r\n d=\"M6 3h7v7M13 3 4 12\"\r\n stroke=\"currentColor\"\r\n strokeWidth=\"1.6\"\r\n strokeLinecap=\"round\"\r\n strokeLinejoin=\"round\"\r\n />\r\n </svg>\r\n );\r\n}\r\n"],"mappings":";;;;;;;;;AAQA,SAAgB,aAAa,EAAE,aAAqC;CAClE,OACE,oBAAC,OAAD;EAAK,eAAY;EAAO,SAAQ;EAAY,MAAK;EAAkB;YACjE,oBAAC,QAAD;GACE,GAAE;GACF,QAAO;GACP,aAAY;GACZ,eAAc;GACd,gBAAe;EAChB,CAAA;CACE,CAAA;AAET;AAEA,SAAgB,YAAY,EAAE,aAAqC;CACjE,OACE,oBAAC,OAAD;EAAK,eAAY;EAAO,SAAQ;EAAY,MAAK;EAAkB;YACjE,oBAAC,QAAD;GACE,GAAE;GACF,QAAO;GACP,aAAY;GACZ,eAAc;GACd,gBAAe;EAChB,CAAA;CACE,CAAA;AAET;AAEA,SAAgB,WAAW,EAAE,aAAqC;CAChE,OACE,oBAAC,OAAD;EAAK,eAAY;EAAO,SAAQ;EAAY,MAAK;EAAkB;YACjE,oBAAC,QAAD;GACE,GAAE;GACF,QAAO;GACP,aAAY;GACZ,eAAc;GACd,gBAAe;EAChB,CAAA;CACE,CAAA;AAET;AAEA,SAAgB,cAAc,EAAE,aAAqC;CACnE,OACE,oBAAC,OAAD;EAAK,eAAY;EAAO,SAAQ;EAAY,MAAK;EAAkB;YACjE,oBAAC,QAAD;GACE,GAAE;GACF,QAAO;GACP,aAAY;GACZ,eAAc;GACd,gBAAe;EAChB,CAAA;CACE,CAAA;AAET"}
@@ -0,0 +1,6 @@
1
+ import { NavigationItemsProps } from "@natsuneko-laboratory/makit-runtime";
2
+ //#region src/components/navigation-items.d.ts
3
+ declare function NavigationItems({ items, currentRoute, depth }: NavigationItemsProps): import("react").JSX.Element;
4
+ //#endregion
5
+ export { NavigationItems };
6
+ //# sourceMappingURL=navigation-items.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigation-items.d.mts","names":[],"sources":["../../src/components/navigation-items.tsx"],"mappings":";;iBA4GgB,kBAAkB,OAAO,cAAc,SAAa,uCAAoB,IAAA"}
@@ -0,0 +1,95 @@
1
+ import { ChevronDown, ExternalArrow } from "./icons.mjs";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import Link from "next/link.js";
4
+ //#region src/components/navigation-items.tsx
5
+ function containsRoute(node, currentRoute) {
6
+ if (node.type === "page") return node.href === currentRoute;
7
+ if (node.type === "link") return false;
8
+ if (node.href === currentRoute) return true;
9
+ return node.items.some((item) => containsRoute(item, currentRoute));
10
+ }
11
+ function ItemLink({ title, href, external, currentRoute }) {
12
+ if (!href) return /* @__PURE__ */ jsx("span", {
13
+ className: "block px-3 py-1.5 text-sm font-medium text-[var(--makit-color-foreground)]",
14
+ children: title
15
+ });
16
+ const isActive = href === currentRoute;
17
+ const className = isActive ? "flex items-center gap-1.5 rounded-lg bg-[color-mix(in_srgb,var(--makit-color-accent)_12%,transparent)] px-3 py-1.5 text-sm font-medium text-[var(--makit-color-accent)]" : "flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-sm text-[var(--makit-color-subtle)] transition hover:bg-[var(--makit-color-muted)] hover:text-[var(--makit-color-foreground)]";
18
+ const body = /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
19
+ className: "truncate",
20
+ children: title
21
+ }), external && /* @__PURE__ */ jsx(ExternalArrow, { className: "size-3 shrink-0 opacity-60" })] });
22
+ return external ? /* @__PURE__ */ jsx("a", {
23
+ href,
24
+ target: "_blank",
25
+ rel: "noopener noreferrer",
26
+ "aria-current": isActive ? "page" : void 0,
27
+ className,
28
+ children: body
29
+ }) : /* @__PURE__ */ jsx(Link, {
30
+ href,
31
+ "aria-current": isActive ? "page" : void 0,
32
+ className,
33
+ children: body
34
+ });
35
+ }
36
+ /**
37
+ * A section/group. Ancestors of the current page open regardless of the
38
+ * authored `collapsed` default, and the disclosure is a plain `<details>` so
39
+ * navigation works with JavaScript disabled — same contract as the standard
40
+ * theme, different chrome.
41
+ */
42
+ function NavContainer({ node, currentRoute, depth }) {
43
+ const label = node.title ?? "";
44
+ const heading = /* @__PURE__ */ jsx("span", {
45
+ className: "text-[11px] font-semibold tracking-[0.1em] text-[var(--makit-color-foreground)] uppercase",
46
+ children: label
47
+ });
48
+ const children = node.items.length > 0 && /* @__PURE__ */ jsx(NavigationItems, {
49
+ items: node.items,
50
+ currentRoute,
51
+ depth: depth + 1
52
+ });
53
+ if (!node.collapsible) return /* @__PURE__ */ jsxs("div", {
54
+ className: "mb-1",
55
+ children: [label && /* @__PURE__ */ jsx("div", {
56
+ className: "mt-6 mb-2 px-3",
57
+ children: heading
58
+ }), children]
59
+ });
60
+ return /* @__PURE__ */ jsxs("details", {
61
+ className: "mb-1",
62
+ open: !node.collapsed || containsRoute(node, currentRoute),
63
+ children: [/* @__PURE__ */ jsxs("summary", {
64
+ className: "mt-6 mb-2 flex cursor-pointer list-none items-center justify-between gap-2 px-3",
65
+ children: [heading, /* @__PURE__ */ jsx(ChevronDown, { className: "makit-product-marker size-3.5 text-[var(--makit-color-subtle)] transition-transform" })]
66
+ }), children]
67
+ });
68
+ }
69
+ function NavigationItems({ items, currentRoute, depth = 0 }) {
70
+ return /* @__PURE__ */ jsx("ul", {
71
+ className: depth === 0 ? "space-y-0.5" : "mt-0.5 ml-3 space-y-0.5 border-l border-[var(--makit-color-border)] pl-2",
72
+ children: items.map((node, index) => /* @__PURE__ */ jsxs("li", { children: [
73
+ node.type === "page" && /* @__PURE__ */ jsx(ItemLink, {
74
+ title: node.title,
75
+ href: node.href,
76
+ currentRoute
77
+ }),
78
+ node.type === "link" && /* @__PURE__ */ jsx(ItemLink, {
79
+ title: node.title,
80
+ href: node.href,
81
+ external: node.external,
82
+ currentRoute
83
+ }),
84
+ (node.type === "section" || node.type === "group") && /* @__PURE__ */ jsx(NavContainer, {
85
+ node,
86
+ currentRoute,
87
+ depth
88
+ })
89
+ ] }, node.type === "page" ? node.pageId : `${node.type}-${node.title ?? index}`))
90
+ });
91
+ }
92
+ //#endregion
93
+ export { NavigationItems };
94
+
95
+ //# sourceMappingURL=navigation-items.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigation-items.mjs","names":[],"sources":["../../src/components/navigation-items.tsx"],"sourcesContent":["import Link from \"next/link\";\r\nimport type {\r\n NavigationItemsProps,\r\n ResolvedNavContainerNode,\r\n ResolvedNavNode,\r\n} from \"@natsuneko-laboratory/makit-runtime\";\r\nimport { ChevronDown, ExternalArrow } from \"./icons.js\";\r\n\r\nfunction containsRoute(node: ResolvedNavNode, currentRoute: string): boolean {\r\n if (node.type === \"page\") return node.href === currentRoute;\r\n if (node.type === \"link\") return false;\r\n if (node.href === currentRoute) return true;\r\n return node.items.some((item) => containsRoute(item, currentRoute));\r\n}\r\n\r\nfunction ItemLink({\r\n title,\r\n href,\r\n external,\r\n currentRoute,\r\n}: {\r\n title: string;\r\n href: string | undefined;\r\n external?: boolean;\r\n currentRoute: string;\r\n}) {\r\n if (!href) {\r\n return (\r\n <span className=\"block px-3 py-1.5 text-sm font-medium text-[var(--makit-color-foreground)]\">\r\n {title}\r\n </span>\r\n );\r\n }\r\n\r\n const isActive = href === currentRoute;\r\n const className = isActive\r\n ? \"flex items-center gap-1.5 rounded-lg bg-[color-mix(in_srgb,var(--makit-color-accent)_12%,transparent)] px-3 py-1.5 text-sm font-medium text-[var(--makit-color-accent)]\"\r\n : \"flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-sm text-[var(--makit-color-subtle)] transition hover:bg-[var(--makit-color-muted)] hover:text-[var(--makit-color-foreground)]\";\r\n\r\n const body = (\r\n <>\r\n <span className=\"truncate\">{title}</span>\r\n {external && <ExternalArrow className=\"size-3 shrink-0 opacity-60\" />}\r\n </>\r\n );\r\n\r\n return external ? (\r\n <a\r\n href={href}\r\n target=\"_blank\"\r\n rel=\"noopener noreferrer\"\r\n aria-current={isActive ? \"page\" : undefined}\r\n className={className}\r\n >\r\n {body}\r\n </a>\r\n ) : (\r\n <Link href={href} aria-current={isActive ? \"page\" : undefined} className={className}>\r\n {body}\r\n </Link>\r\n );\r\n}\r\n\r\n/**\r\n * A section/group. Ancestors of the current page open regardless of the\r\n * authored `collapsed` default, and the disclosure is a plain `<details>` so\r\n * navigation works with JavaScript disabled — same contract as the standard\r\n * theme, different chrome.\r\n */\r\nfunction NavContainer({\r\n node,\r\n currentRoute,\r\n depth,\r\n}: {\r\n node: ResolvedNavContainerNode;\r\n currentRoute: string;\r\n depth: number;\r\n}) {\r\n const label = node.title ?? \"\";\r\n const heading = (\r\n <span className=\"text-[11px] font-semibold tracking-[0.1em] text-[var(--makit-color-foreground)] uppercase\">\r\n {label}\r\n </span>\r\n );\r\n const children = node.items.length > 0 && (\r\n <NavigationItems items={node.items} currentRoute={currentRoute} depth={depth + 1} />\r\n );\r\n\r\n if (!node.collapsible) {\r\n return (\r\n <div className=\"mb-1\">\r\n {label && <div className=\"mt-6 mb-2 px-3\">{heading}</div>}\r\n {children}\r\n </div>\r\n );\r\n }\r\n\r\n return (\r\n <details className=\"mb-1\" open={!node.collapsed || containsRoute(node, currentRoute)}>\r\n <summary className=\"mt-6 mb-2 flex cursor-pointer list-none items-center justify-between gap-2 px-3\">\r\n {heading}\r\n <ChevronDown className=\"makit-product-marker size-3.5 text-[var(--makit-color-subtle)] transition-transform\" />\r\n </summary>\r\n {children}\r\n </details>\r\n );\r\n}\r\n\r\nexport function NavigationItems({ items, currentRoute, depth = 0 }: NavigationItemsProps) {\r\n return (\r\n <ul\r\n className={\r\n depth === 0\r\n ? \"space-y-0.5\"\r\n : \"mt-0.5 ml-3 space-y-0.5 border-l border-[var(--makit-color-border)] pl-2\"\r\n }\r\n >\r\n {items.map((node, index) => (\r\n <li key={node.type === \"page\" ? node.pageId : `${node.type}-${node.title ?? index}`}>\r\n {node.type === \"page\" && (\r\n <ItemLink title={node.title} href={node.href} currentRoute={currentRoute} />\r\n )}\r\n {node.type === \"link\" && (\r\n <ItemLink\r\n title={node.title}\r\n href={node.href}\r\n external={node.external}\r\n currentRoute={currentRoute}\r\n />\r\n )}\r\n {(node.type === \"section\" || node.type === \"group\") && (\r\n <NavContainer node={node} currentRoute={currentRoute} depth={depth} />\r\n )}\r\n </li>\r\n ))}\r\n </ul>\r\n );\r\n}\r\n"],"mappings":";;;;AAQA,SAAS,cAAc,MAAuB,cAA+B;CAC3E,IAAI,KAAK,SAAS,QAAQ,OAAO,KAAK,SAAS;CAC/C,IAAI,KAAK,SAAS,QAAQ,OAAO;CACjC,IAAI,KAAK,SAAS,cAAc,OAAO;CACvC,OAAO,KAAK,MAAM,MAAM,SAAS,cAAc,MAAM,YAAY,CAAC;AACpE;AAEA,SAAS,SAAS,EAChB,OACA,MACA,UACA,gBAMC;CACD,IAAI,CAAC,MACH,OACE,oBAAC,QAAD;EAAM,WAAU;YACb;CACG,CAAA;CAIV,MAAM,WAAW,SAAS;CAC1B,MAAM,YAAY,WACd,4KACA;CAEJ,MAAM,OACJ,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,QAAD;EAAM,WAAU;YAAY;CAAY,CAAA,GACvC,YAAY,oBAAC,eAAD,EAAe,WAAU,6BAA8B,CAAA,CACpE,EAAA,CAAA;CAGJ,OAAO,WACL,oBAAC,KAAD;EACQ;EACN,QAAO;EACP,KAAI;EACJ,gBAAc,WAAW,SAAS,KAAA;EACvB;YAEV;CACA,CAAA,IAEH,oBAAC,MAAD;EAAY;EAAM,gBAAc,WAAW,SAAS,KAAA;EAAsB;YACvE;CACG,CAAA;AAEV;;;;;;;AAQA,SAAS,aAAa,EACpB,MACA,cACA,SAKC;CACD,MAAM,QAAQ,KAAK,SAAS;CAC5B,MAAM,UACJ,oBAAC,QAAD;EAAM,WAAU;YACb;CACG,CAAA;CAER,MAAM,WAAW,KAAK,MAAM,SAAS,KACnC,oBAAC,iBAAD;EAAiB,OAAO,KAAK;EAAqB;EAAc,OAAO,QAAQ;CAAI,CAAA;CAGrF,IAAI,CAAC,KAAK,aACR,OACE,qBAAC,OAAD;EAAK,WAAU;YAAf,CACG,SAAS,oBAAC,OAAD;GAAK,WAAU;aAAkB;EAAa,CAAA,GACvD,QACE;;CAIT,OACE,qBAAC,WAAD;EAAS,WAAU;EAAO,MAAM,CAAC,KAAK,aAAa,cAAc,MAAM,YAAY;YAAnF,CACE,qBAAC,WAAD;GAAS,WAAU;aAAnB,CACG,SACD,oBAAC,aAAD,EAAa,WAAU,sFAAuF,CAAA,CACvG;MACR,QACM;;AAEb;AAEA,SAAgB,gBAAgB,EAAE,OAAO,cAAc,QAAQ,KAA2B;CACxF,OACE,oBAAC,MAAD;EACE,WACE,UAAU,IACN,gBACA;YAGL,MAAM,KAAK,MAAM,UAChB,qBAAC,MAAD,EAAA,UAAA;GACG,KAAK,SAAS,UACb,oBAAC,UAAD;IAAU,OAAO,KAAK;IAAO,MAAM,KAAK;IAAoB;GAAe,CAAA;GAE5E,KAAK,SAAS,UACb,oBAAC,UAAD;IACE,OAAO,KAAK;IACZ,MAAM,KAAK;IACX,UAAU,KAAK;IACD;GACf,CAAA;IAED,KAAK,SAAS,aAAa,KAAK,SAAS,YACzC,oBAAC,cAAD;IAAoB;IAAoB;IAAqB;GAAQ,CAAA;EAErE,EAAA,GAfK,KAAK,SAAS,SAAS,KAAK,SAAS,GAAG,KAAK,KAAK,GAAG,KAAK,SAAS,OAexE,CACL;CACC,CAAA;AAER"}