@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.
- package/LICENSE +21 -0
- package/README.md +69 -0
- package/dist/components/breadcrumbs.d.mts +6 -0
- package/dist/components/breadcrumbs.d.mts.map +1 -0
- package/dist/components/breadcrumbs.mjs +30 -0
- package/dist/components/breadcrumbs.mjs.map +1 -0
- package/dist/components/docs-page.d.mts +6 -0
- package/dist/components/docs-page.d.mts.map +1 -0
- package/dist/components/docs-page.mjs +93 -0
- package/dist/components/docs-page.mjs.map +1 -0
- package/dist/components/footer.d.mts +6 -0
- package/dist/components/footer.d.mts.map +1 -0
- package/dist/components/footer.mjs +32 -0
- package/dist/components/footer.mjs.map +1 -0
- package/dist/components/header.d.mts +6 -0
- package/dist/components/header.d.mts.map +1 -0
- package/dist/components/header.mjs +97 -0
- package/dist/components/header.mjs.map +1 -0
- package/dist/components/icons.mjs +73 -0
- package/dist/components/icons.mjs.map +1 -0
- package/dist/components/navigation-items.d.mts +6 -0
- package/dist/components/navigation-items.d.mts.map +1 -0
- package/dist/components/navigation-items.mjs +95 -0
- package/dist/components/navigation-items.mjs.map +1 -0
- package/dist/components/not-found-page.d.mts +9 -0
- package/dist/components/not-found-page.d.mts.map +1 -0
- package/dist/components/not-found-page.mjs +39 -0
- package/dist/components/not-found-page.mjs.map +1 -0
- package/dist/components/page-header.d.mts +6 -0
- package/dist/components/page-header.d.mts.map +1 -0
- package/dist/components/page-header.mjs +26 -0
- package/dist/components/page-header.mjs.map +1 -0
- package/dist/components/portal-home-page.d.mts +6 -0
- package/dist/components/portal-home-page.d.mts.map +1 -0
- package/dist/components/portal-home-page.mjs +117 -0
- package/dist/components/portal-home-page.mjs.map +1 -0
- package/dist/components/prev-next-links.d.mts +6 -0
- package/dist/components/prev-next-links.d.mts.map +1 -0
- package/dist/components/prev-next-links.mjs +39 -0
- package/dist/components/prev-next-links.mjs.map +1 -0
- package/dist/components/root-layout.d.mts +10 -0
- package/dist/components/root-layout.d.mts.map +1 -0
- package/dist/components/root-layout.mjs +21 -0
- package/dist/components/root-layout.mjs.map +1 -0
- package/dist/components/sidebar.d.mts +6 -0
- package/dist/components/sidebar.d.mts.map +1 -0
- package/dist/components/sidebar.mjs +35 -0
- package/dist/components/sidebar.mjs.map +1 -0
- package/dist/components/table-of-contents.d.mts +6 -0
- package/dist/components/table-of-contents.d.mts.map +1 -0
- package/dist/components/table-of-contents.mjs +76 -0
- package/dist/components/table-of-contents.mjs.map +1 -0
- package/dist/components/theme-variables.d.mts +6 -0
- package/dist/components/theme-variables.d.mts.map +1 -0
- package/dist/components/theme-variables.mjs +92 -0
- package/dist/components/theme-variables.mjs.map +1 -0
- package/dist/index.d.mts +14 -0
- package/dist/index.mjs +14 -0
- package/dist/manifest.d.mts +5 -0
- package/dist/manifest.d.mts.map +1 -0
- package/dist/manifest.mjs +15 -0
- package/dist/manifest.mjs.map +1 -0
- package/package.json +57 -0
- package/styles/theme.css +93 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme-variables.mjs","names":[],"sources":["../../src/components/theme-variables.tsx"],"sourcesContent":["import type { ThemeVariablesProps } from \"@natsuneko-laboratory/makit-runtime\";\r\n\r\ninterface AccentValue {\r\n light: string;\r\n dark: string;\r\n}\r\n\r\n/**\r\n * The accent drives the logo mark, the active navigation pill, and the home\r\n * page's gradient, so each name carries a pair tuned for contrast against\r\n * this theme's two backgrounds rather than a single hue.\r\n */\r\nconst ACCENTS: Record<string, AccentValue> = {\r\n indigo: { light: \"#4f46e5\", dark: \"#818cf8\" },\r\n violet: { light: \"#7c3aed\", dark: \"#a78bfa\" },\r\n blue: { light: \"#2563eb\", dark: \"#60a5fa\" },\r\n sky: { light: \"#0284c7\", dark: \"#38bdf8\" },\r\n teal: { light: \"#0d9488\", dark: \"#2dd4bf\" },\r\n emerald: { light: \"#059669\", dark: \"#34d399\" },\r\n rose: { light: \"#e11d48\", dark: \"#fb7185\" },\r\n amber: { light: \"#d97706\", dark: \"#fbbf24\" },\r\n};\r\n\r\nfunction resolveAccent(accentColor: string | undefined): AccentValue {\r\n if (!accentColor) return ACCENTS.indigo!;\r\n const named = ACCENTS[accentColor.toLowerCase()];\r\n if (named) return named;\r\n return { light: accentColor, dark: accentColor };\r\n}\r\n\r\nconst RADIUS: Record<string, string> = {\r\n none: \"0px\",\r\n small: \"0.375rem\",\r\n medium: \"0.625rem\",\r\n large: \"0.875rem\",\r\n};\r\n\r\n/**\r\n * Replaces the standard palette (THEME §13.3). The grays are slightly\r\n * blue-tinted (slate rather than zinc) so they sit under a saturated accent\r\n * without looking muddy, and `--makit-color-surface` is deliberately lifted\r\n * off the background in both schemes — this theme leans on cards.\r\n */\r\nconst LIGHT = [\r\n \"--makit-color-background:#ffffff\",\r\n \"--makit-color-surface:#ffffff\",\r\n \"--makit-color-foreground:#0f172a\",\r\n \"--makit-color-subtle:#64748b\",\r\n \"--makit-color-muted:#f1f5f9\",\r\n \"--makit-color-border:#e2e8f0\",\r\n \"--makit-color-border-strong:#cbd5e1\",\r\n].join(\";\");\r\n\r\nconst DARK = [\r\n \"--makit-color-background:#0b1120\",\r\n \"--makit-color-surface:#131c2f\",\r\n \"--makit-color-foreground:#e8edf7\",\r\n \"--makit-color-subtle:#94a3b8\",\r\n \"--makit-color-muted:#1c273d\",\r\n \"--makit-color-border:#22304a\",\r\n \"--makit-color-border-strong:#38486a\",\r\n].join(\";\");\r\n\r\nexport function ThemeVariables({ theme }: ThemeVariablesProps) {\r\n const accent = resolveAccent(theme.accentColor);\r\n const radius = RADIUS[theme.radius] ?? RADIUS.large!;\r\n\r\n const css = `:root{--makit-color-accent:${accent.light};${LIGHT};--makit-radius:${radius};--makit-product-shadow:0 1px 2px rgb(15 23 42 / 0.04),0 8px 24px -12px rgb(15 23 42 / 0.12);}\r\n:root[data-theme=\"dark\"]{--makit-color-accent:${accent.dark};${DARK};--makit-product-shadow:0 1px 2px rgb(0 0 0 / 0.3),0 8px 24px -12px rgb(0 0 0 / 0.6);}\r\n@media (prefers-color-scheme: dark){:root:not([data-theme=\"light\"]):not([data-theme=\"dark\"]){--makit-color-accent:${accent.dark};${DARK};--makit-product-shadow:0 1px 2px rgb(0 0 0 / 0.3),0 8px 24px -12px rgb(0 0 0 / 0.6);}}\r\n.makit-header-logo-dark{display:none}:root[data-theme=\"dark\"] .makit-header-logo-light{display:none}:root[data-theme=\"dark\"] .makit-header-logo-dark{display:block}@media (prefers-color-scheme: dark){:root:not([data-theme=\"light\"]):not([data-theme=\"dark\"]) .makit-header-logo-light{display:none}:root:not([data-theme=\"light\"]):not([data-theme=\"dark\"]) .makit-header-logo-dark{display:block}}`;\r\n\r\n return <style dangerouslySetInnerHTML={{ __html: css }} />;\r\n}\r\n"],"mappings":";;;;;;;AAYA,MAAM,UAAuC;CAC3C,QAAQ;EAAE,OAAO;EAAW,MAAM;CAAU;CAC5C,QAAQ;EAAE,OAAO;EAAW,MAAM;CAAU;CAC5C,MAAM;EAAE,OAAO;EAAW,MAAM;CAAU;CAC1C,KAAK;EAAE,OAAO;EAAW,MAAM;CAAU;CACzC,MAAM;EAAE,OAAO;EAAW,MAAM;CAAU;CAC1C,SAAS;EAAE,OAAO;EAAW,MAAM;CAAU;CAC7C,MAAM;EAAE,OAAO;EAAW,MAAM;CAAU;CAC1C,OAAO;EAAE,OAAO;EAAW,MAAM;CAAU;AAC7C;AAEA,SAAS,cAAc,aAA8C;CACnE,IAAI,CAAC,aAAa,OAAO,QAAQ;CACjC,MAAM,QAAQ,QAAQ,YAAY,YAAY;CAC9C,IAAI,OAAO,OAAO;CAClB,OAAO;EAAE,OAAO;EAAa,MAAM;CAAY;AACjD;AAEA,MAAM,SAAiC;CACrC,MAAM;CACN,OAAO;CACP,QAAQ;CACR,OAAO;AACT;;;;;;;AAQA,MAAM,QAAQ;CACZ;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC,CAAC,KAAK,GAAG;AAEV,MAAM,OAAO;CACX;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC,CAAC,KAAK,GAAG;AAEV,SAAgB,eAAe,EAAE,SAA8B;CAC7D,MAAM,SAAS,cAAc,MAAM,WAAW;CAC9C,MAAM,SAAS,OAAO,MAAM,WAAW,OAAO;CAO9C,OAAO,oBAAC,SAAD,EAAO,yBAAyB,EAAE,QAAQ,8BALP,OAAO,MAAM,GAAG,MAAM,kBAAkB,OAAO;gDAC3C,OAAO,KAAK,GAAG,KAAK;oHACgD,OAAO,KAAK,GAAG,KAAK;wYAGjF,EAAI,CAAA;AAC3D"}
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { RootLayout } from "./components/root-layout.mjs";
|
|
2
|
+
import { DocsPage } from "./components/docs-page.mjs";
|
|
3
|
+
import { PortalHomePage } from "./components/portal-home-page.mjs";
|
|
4
|
+
import { NotFoundPage } from "./components/not-found-page.mjs";
|
|
5
|
+
import { Header } from "./components/header.mjs";
|
|
6
|
+
import { Sidebar } from "./components/sidebar.mjs";
|
|
7
|
+
import { NavigationItems } from "./components/navigation-items.mjs";
|
|
8
|
+
import { Breadcrumbs } from "./components/breadcrumbs.mjs";
|
|
9
|
+
import { PageHeader } from "./components/page-header.mjs";
|
|
10
|
+
import { PrevNextLinks } from "./components/prev-next-links.mjs";
|
|
11
|
+
import { TableOfContents } from "./components/table-of-contents.mjs";
|
|
12
|
+
import { Footer } from "./components/footer.mjs";
|
|
13
|
+
import { ThemeVariables } from "./components/theme-variables.mjs";
|
|
14
|
+
export { Breadcrumbs, DocsPage, Footer, Header, NavigationItems, NotFoundPage, PageHeader, PortalHomePage, PrevNextLinks, RootLayout, Sidebar, TableOfContents, ThemeVariables };
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { RootLayout } from "./components/root-layout.mjs";
|
|
2
|
+
import { DocsPage } from "./components/docs-page.mjs";
|
|
3
|
+
import { PortalHomePage } from "./components/portal-home-page.mjs";
|
|
4
|
+
import { NotFoundPage } from "./components/not-found-page.mjs";
|
|
5
|
+
import { Header } from "./components/header.mjs";
|
|
6
|
+
import { NavigationItems } from "./components/navigation-items.mjs";
|
|
7
|
+
import { Sidebar } from "./components/sidebar.mjs";
|
|
8
|
+
import { Breadcrumbs } from "./components/breadcrumbs.mjs";
|
|
9
|
+
import { PageHeader } from "./components/page-header.mjs";
|
|
10
|
+
import { PrevNextLinks } from "./components/prev-next-links.mjs";
|
|
11
|
+
import { TableOfContents } from "./components/table-of-contents.mjs";
|
|
12
|
+
import { Footer } from "./components/footer.mjs";
|
|
13
|
+
import { ThemeVariables } from "./components/theme-variables.mjs";
|
|
14
|
+
export { Breadcrumbs, DocsPage, Footer, Header, NavigationItems, NotFoundPage, PageHeader, PortalHomePage, PrevNextLinks, RootLayout, Sidebar, TableOfContents, ThemeVariables };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.d.mts","names":[],"sources":["../src/manifest.ts"],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { defineTheme } from "@natsuneko-laboratory/makit/theme";
|
|
2
|
+
//#region src/manifest.ts
|
|
3
|
+
var manifest_default = defineTheme({
|
|
4
|
+
name: "@natsuneko-laboratory/makit-theme-product",
|
|
5
|
+
styles: ["./styles/theme.css"],
|
|
6
|
+
tailwindSources: ["./dist/**/*.mjs"],
|
|
7
|
+
defaults: {
|
|
8
|
+
radius: "large",
|
|
9
|
+
accentColor: "indigo"
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
//#endregion
|
|
13
|
+
export { manifest_default as default };
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=manifest.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.mjs","names":[],"sources":["../src/manifest.ts"],"sourcesContent":["import { defineTheme } from \"@natsuneko-laboratory/makit/theme\";\r\n\r\nexport default defineTheme({\r\n name: \"@natsuneko-laboratory/makit-theme-product\",\r\n styles: [\"./styles/theme.css\"],\r\n // Only the built components carry class names; scanning the package root\r\n // would drag `node_modules` in (THEME §13.1).\r\n tailwindSources: [\"./dist/**/*.mjs\"],\r\n defaults: {\r\n radius: \"large\",\r\n accentColor: \"indigo\",\r\n },\r\n});\r\n"],"mappings":";;AAEA,IAAA,mBAAe,YAAY;CACzB,MAAM;CACN,QAAQ,CAAC,oBAAoB;CAG7B,iBAAiB,CAAC,iBAAiB;CACnC,UAAU;EACR,QAAQ;EACR,aAAa;CACf;AACF,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@natsuneko-laboratory/makit-theme-product",
|
|
3
|
+
"version": "0.5.0",
|
|
4
|
+
"description": "A polished, product-documentation Makit theme with soft cards, pill navigation, and a gradient home.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": "https://github.com/mika-f/makit.git",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist",
|
|
9
|
+
"styles"
|
|
10
|
+
],
|
|
11
|
+
"type": "module",
|
|
12
|
+
"sideEffects": false,
|
|
13
|
+
"main": "./dist/index.mjs",
|
|
14
|
+
"types": "./dist/index.d.mts",
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./dist/index.d.mts",
|
|
18
|
+
"import": "./dist/index.mjs"
|
|
19
|
+
},
|
|
20
|
+
"./makit-theme": {
|
|
21
|
+
"types": "./dist/manifest.d.mts",
|
|
22
|
+
"import": "./dist/manifest.mjs"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"publishConfig": {
|
|
26
|
+
"access": "public"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@types/node": "^26.1.1",
|
|
30
|
+
"@types/react": "^19.2.17",
|
|
31
|
+
"@types/react-dom": "^19.2.3",
|
|
32
|
+
"next": "^16.2.10",
|
|
33
|
+
"react": "^19.2.7",
|
|
34
|
+
"react-dom": "^19.2.7",
|
|
35
|
+
"tsdown": "^0.22.8",
|
|
36
|
+
"typescript": "^7.0.2",
|
|
37
|
+
"vitest": "^4.1.10",
|
|
38
|
+
"@natsuneko-laboratory/makit": "0.5.0",
|
|
39
|
+
"@natsuneko-laboratory/makit-runtime": "0.5.0"
|
|
40
|
+
},
|
|
41
|
+
"peerDependencies": {
|
|
42
|
+
"@natsuneko-laboratory/makit": "^0.4.0",
|
|
43
|
+
"@natsuneko-laboratory/makit-runtime": "^0.4.0",
|
|
44
|
+
"next": "^16.0.0",
|
|
45
|
+
"react": "^19.0.0",
|
|
46
|
+
"react-dom": "^19.0.0"
|
|
47
|
+
},
|
|
48
|
+
"engines": {
|
|
49
|
+
"node": ">=20.0.0"
|
|
50
|
+
},
|
|
51
|
+
"scripts": {
|
|
52
|
+
"build": "tsdown",
|
|
53
|
+
"dev": "tsdown --watch",
|
|
54
|
+
"test": "vitest run --passWithNoTests",
|
|
55
|
+
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
56
|
+
}
|
|
57
|
+
}
|
package/styles/theme.css
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Product theme (THEME §13.2). Imported after Makit's base stylesheet and
|
|
3
|
+
* before the project's own `styles`, so a project can still override anything
|
|
4
|
+
* here from `config.styles`.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
.makit-product {
|
|
8
|
+
font-family:
|
|
9
|
+
Inter,
|
|
10
|
+
"Inter Variable",
|
|
11
|
+
ui-sans-serif,
|
|
12
|
+
system-ui,
|
|
13
|
+
-apple-system,
|
|
14
|
+
BlinkMacSystemFont,
|
|
15
|
+
"Segoe UI",
|
|
16
|
+
"Hiragino Sans",
|
|
17
|
+
"Noto Sans JP",
|
|
18
|
+
sans-serif;
|
|
19
|
+
font-feature-settings: "cv02", "cv03", "cv04", "cv11";
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* Cards and popovers sit on the surface color, which is lifted off the page. */
|
|
23
|
+
.makit-product .makit-product-card {
|
|
24
|
+
box-shadow: var(--makit-product-shadow);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* The nav chevron points down when the section is open (no JS involved). */
|
|
28
|
+
.makit-product details[open] > summary .makit-product-marker {
|
|
29
|
+
transform: rotate(180deg);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/*
|
|
33
|
+
* The reading column is generous rather than dense — this theme is aimed at
|
|
34
|
+
* marketing-adjacent product docs, not API reference.
|
|
35
|
+
*/
|
|
36
|
+
.makit-product .makit-prose {
|
|
37
|
+
font-size: 1.0625rem;
|
|
38
|
+
line-height: 1.8;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.makit-product .makit-prose :where(h2) {
|
|
42
|
+
margin-top: 3rem;
|
|
43
|
+
padding-top: 2rem;
|
|
44
|
+
border-top: 1px solid var(--makit-color-border);
|
|
45
|
+
font-size: 1.5rem;
|
|
46
|
+
letter-spacing: -0.02em;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.makit-product .makit-prose :where(h2:first-child) {
|
|
50
|
+
margin-top: 0;
|
|
51
|
+
padding-top: 0;
|
|
52
|
+
border-top: 0;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.makit-product .makit-prose :where(h3) {
|
|
56
|
+
margin-top: 2.25rem;
|
|
57
|
+
font-size: 1.175rem;
|
|
58
|
+
letter-spacing: -0.015em;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.makit-product .makit-prose :where(a) {
|
|
62
|
+
color: var(--makit-color-accent);
|
|
63
|
+
font-weight: 500;
|
|
64
|
+
text-decoration-color: color-mix(in srgb, var(--makit-color-accent) 35%, transparent);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.makit-product .makit-prose :where(blockquote) {
|
|
68
|
+
border-left-width: 3px;
|
|
69
|
+
border-radius: 0 var(--makit-radius) var(--makit-radius) 0;
|
|
70
|
+
background: var(--makit-color-muted);
|
|
71
|
+
padding: 0.25rem 1.25rem;
|
|
72
|
+
font-style: normal;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.makit-product .makit-prose .makit-alert {
|
|
76
|
+
border-left-width: 3px;
|
|
77
|
+
border-radius: var(--makit-radius);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.makit-product .makit-prose :where(table) {
|
|
81
|
+
font-size: 0.9375rem;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.makit-product pre.shiki {
|
|
85
|
+
border-radius: var(--makit-radius);
|
|
86
|
+
box-shadow: var(--makit-product-shadow);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* Anchor targets clear the taller header. Must sit on the scrolling element
|
|
90
|
+
(`<html>`), not on the body class. */
|
|
91
|
+
:root[data-makit-theme="product"] {
|
|
92
|
+
scroll-padding-top: 7rem;
|
|
93
|
+
}
|