@nafisazizir/ziiz 0.1.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/CHANGELOG.md ADDED
@@ -0,0 +1,27 @@
1
+ # @nafisazizir/ziiz
2
+
3
+ ## 0.1.0
4
+
5
+ First release, a beta preview. Expect breaking changes in 0.x minors.
6
+
7
+ - `theme.css`: the design layer. The Geist-style ramp as `--ds-*` tokens and
8
+ Tailwind v4 utilities, the stock Tailwind palette disabled, the radius and
9
+ shadow scales, 31 named type roles, eight `material-*` utilities, the
10
+ `typeset` prose layer and the code block chrome. The prose `details`
11
+ marker is the Tabler chevron, matching the components.
12
+ - `shadcn.css`: the optional slot bridge that maps shadcn/ui's names
13
+ (`bg-background`, `text-muted-foreground`, `--sidebar-*`, `--chart-*`) onto
14
+ the ramp.
15
+ - `shiki`: `ziizShikiTheme` and `ziizShikiOptions`, a Shiki theme that
16
+ resolves to the ramp's CSS variables so highlighted code follows the page
17
+ theme.
18
+ - `.` resolves to `theme.css`, so `@import "@nafisazizir/ziiz"` is the same as
19
+ `@import "@nafisazizir/ziiz/theme.css"`.
20
+ - `cn`: `cn`, `twMerge`, `typeRoles` and `materials`, built on the `cn`
21
+ package (`createCn`/`createTwMerge` from `cn/config`). The merger treats
22
+ the 31 type roles as one font-size group and the eight materials as one
23
+ group, so a later `text-copy-16` replaces an earlier `text-label-14` the
24
+ way `text-lg` replaces `text-sm`. The stock `cn` keeps both.
25
+ - Fonts: `theme.css` does not redeclare `--font-sans` or `--font-mono`. An
26
+ app that sets neither gets Tailwind's default stacks; an app that sets
27
+ them on `html` or `:root` wins.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Nafis Azizi Riza
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,58 @@
1
+ # @nafisazizir/ziiz
2
+
3
+ The ziiz design layer as one import-free stylesheet: the Geist-style ramp,
4
+ 31 named type roles, eight materials and the `typeset` prose layer, all as
5
+ Tailwind v4 utilities and CSS custom properties. Docs and the component
6
+ registry live at [ziiz.vercel.app](https://ziiz.vercel.app).
7
+
8
+ Beta preview: 0.x minors may break things, patches will not.
9
+
10
+ ```bash
11
+ npm install @nafisazizir/ziiz
12
+ ```
13
+
14
+ ```css
15
+ @import "tailwindcss";
16
+ @import "@nafisazizir/ziiz";
17
+ @import "@nafisazizir/ziiz/shadcn.css"; /* only if you run stock shadcn/ui components */
18
+ ```
19
+
20
+ ## Entry points
21
+
22
+ | Import | What it is |
23
+ | ------------------------------ | -------------------------------------------------------------------------------------------------- |
24
+ | `@nafisazizir/ziiz` | The design layer. Ramp tokens, type roles, materials, prose. Disables the stock Tailwind palette. |
25
+ | `@nafisazizir/ziiz/theme.css` | The same file by its full path. |
26
+ | `@nafisazizir/ziiz/shadcn.css` | Maps shadcn's slot names (`bg-background`, `text-muted-foreground`) onto the ramp. Optional. |
27
+ | `@nafisazizir/ziiz/cn` | `cn`, `twMerge`, `typeRoles`, `materials`: a class merger that knows the type roles and materials. |
28
+ | `@nafisazizir/ziiz/shiki` | `ziizShikiTheme` and `ziizShikiOptions`: a Shiki theme that resolves to the ramp's CSS variables. |
29
+
30
+ ## Fonts
31
+
32
+ Set `--font-sans` and `--font-mono` on `html` or `:root`, however the app
33
+ loads fonts (next/font's `variable` option does this). ziiz uses Inter with
34
+ `ss03` for sans and Geist Mono for mono. An app that sets neither gets
35
+ Tailwind's default stacks.
36
+
37
+ ## cn
38
+
39
+ Type roles are single utilities (`text-label-14`, `text-copy-16`), so the
40
+ stock `cn` does not know they conflict: it keeps both, and stylesheet order
41
+ decides which one paints. This `cn` is built on the `cn` package with the
42
+ 31 roles as one font-size group and the eight `material-*` utilities as
43
+ another, so the last one in the class list wins. Re-export it from the
44
+ app's `lib/utils.ts`; the registry's `utils` item does exactly that.
45
+
46
+ ```ts
47
+ export { cn } from "@nafisazizir/ziiz/cn"
48
+ ```
49
+
50
+ ## Components
51
+
52
+ Components are not in this package. They come from the ziiz registry as
53
+ source files you own: `npx shadcn@latest add @ziiz/button`. See the
54
+ [installation guide](https://ziiz.vercel.app/installation).
55
+
56
+ ## License
57
+
58
+ MIT. See [CHANGELOG.md](./CHANGELOG.md) for releases.
package/dist/cn.d.ts ADDED
@@ -0,0 +1,20 @@
1
+ /** tailwind-merge `twJoin`/`twMerge` argument shape (strings + nested arrays) */
2
+ type ClassNameValue = ClassNameArray | string | null | undefined | 0 | 0n | false;
3
+ type ClassNameArray = readonly ClassNameValue[];
4
+ /** clsx argument shape (adds numbers and object syntax) */
5
+ type ClassValue = ClassArray | ClassDictionary | string | number | bigint | null | boolean | undefined;
6
+ type ClassArray = ClassValue[];
7
+ interface ClassDictionary {
8
+ [id: string]: any;
9
+ }
10
+ /** the `cn` function shape: clsx arguments, merged output */
11
+ type CnFunction = (...inputs: ClassValue[]) => string;
12
+
13
+ declare const typeRoles: readonly ["heading-72", "heading-64", "heading-56", "heading-48", "heading-40", "heading-32", "heading-24", "heading-20", "heading-16", "heading-14", "button-16", "button-14", "button-12", "label-20", "label-18", "label-16", "label-16-mono", "label-14", "label-14-mono", "label-13", "label-13-mono", "label-12", "label-12-mono", "copy-24", "copy-20", "copy-18", "copy-16", "copy-14", "copy-14-mono", "copy-13", "copy-13-mono"];
14
+ declare const materials: readonly ["base", "small", "medium", "large", "tooltip", "menu", "modal", "fullscreen"];
15
+ type TypeRole = (typeof typeRoles)[number];
16
+ type Material = (typeof materials)[number];
17
+ declare const twMerge: (...inputs: ClassNameValue[]) => string;
18
+ declare const cn: CnFunction;
19
+
20
+ export { type Material, type TypeRole, cn, materials, twMerge, typeRoles };
package/dist/cn.js ADDED
@@ -0,0 +1,60 @@
1
+ import { createTwMerge, createCn } from 'cn/config';
2
+
3
+ // src/cn.ts
4
+ var typeRoles = [
5
+ "heading-72",
6
+ "heading-64",
7
+ "heading-56",
8
+ "heading-48",
9
+ "heading-40",
10
+ "heading-32",
11
+ "heading-24",
12
+ "heading-20",
13
+ "heading-16",
14
+ "heading-14",
15
+ "button-16",
16
+ "button-14",
17
+ "button-12",
18
+ "label-20",
19
+ "label-18",
20
+ "label-16",
21
+ "label-16-mono",
22
+ "label-14",
23
+ "label-14-mono",
24
+ "label-13",
25
+ "label-13-mono",
26
+ "label-12",
27
+ "label-12-mono",
28
+ "copy-24",
29
+ "copy-20",
30
+ "copy-18",
31
+ "copy-16",
32
+ "copy-14",
33
+ "copy-14-mono",
34
+ "copy-13",
35
+ "copy-13-mono"
36
+ ];
37
+ var materials = [
38
+ "base",
39
+ "small",
40
+ "medium",
41
+ "large",
42
+ "tooltip",
43
+ "menu",
44
+ "modal",
45
+ "fullscreen"
46
+ ];
47
+ var config = {
48
+ extend: {
49
+ classGroups: {
50
+ "font-size": [{ text: [...typeRoles] }],
51
+ material: [{ material: [...materials] }]
52
+ }
53
+ }
54
+ };
55
+ var twMerge = createTwMerge(config);
56
+ var cn = createCn(config);
57
+
58
+ export { cn, materials, twMerge, typeRoles };
59
+ //# sourceMappingURL=cn.js.map
60
+ //# sourceMappingURL=cn.js.map
package/dist/cn.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/cn.ts"],"names":[],"mappings":";;;AAKO,IAAM,SAAA,GAAY;AAAA,EACvB,YAAA;AAAA,EACA,YAAA;AAAA,EACA,YAAA;AAAA,EACA,YAAA;AAAA,EACA,YAAA;AAAA,EACA,YAAA;AAAA,EACA,YAAA;AAAA,EACA,YAAA;AAAA,EACA,YAAA;AAAA,EACA,YAAA;AAAA,EACA,WAAA;AAAA,EACA,WAAA;AAAA,EACA,WAAA;AAAA,EACA,UAAA;AAAA,EACA,UAAA;AAAA,EACA,UAAA;AAAA,EACA,eAAA;AAAA,EACA,UAAA;AAAA,EACA,eAAA;AAAA,EACA,UAAA;AAAA,EACA,eAAA;AAAA,EACA,UAAA;AAAA,EACA,eAAA;AAAA,EACA,SAAA;AAAA,EACA,SAAA;AAAA,EACA,SAAA;AAAA,EACA,SAAA;AAAA,EACA,SAAA;AAAA,EACA,cAAA;AAAA,EACA,SAAA;AAAA,EACA;AACF;AAGO,IAAM,SAAA,GAAY;AAAA,EACvB,MAAA;AAAA,EACA,OAAA;AAAA,EACA,QAAA;AAAA,EACA,OAAA;AAAA,EACA,SAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA;AAAA,EACA;AACF;AAKA,IAAM,MAAA,GAAS;AAAA,EACb,MAAA,EAAQ;AAAA,IACN,WAAA,EAAa;AAAA,MACX,WAAA,EAAa,CAAC,EAAE,IAAA,EAAM,CAAC,GAAG,SAAS,GAAG,CAAA;AAAA,MACtC,QAAA,EAAU,CAAC,EAAE,QAAA,EAAU,CAAC,GAAG,SAAS,GAAG;AAAA;AACzC;AAEJ,CAAA;AAEO,IAAM,OAAA,GAAU,cAAc,MAAM;AAEpC,IAAM,EAAA,GAAK,SAAS,MAAM","file":"cn.js","sourcesContent":["import { createCn, createTwMerge } from \"cn/config\"\n\n// The 31 type roles theme.css defines as `text-<role>` utilities. Listed here\n// so the merge treats them as one font-size group: the last role in a\n// class list wins, the same way `text-sm` and `text-lg` resolve.\nexport const typeRoles = [\n \"heading-72\",\n \"heading-64\",\n \"heading-56\",\n \"heading-48\",\n \"heading-40\",\n \"heading-32\",\n \"heading-24\",\n \"heading-20\",\n \"heading-16\",\n \"heading-14\",\n \"button-16\",\n \"button-14\",\n \"button-12\",\n \"label-20\",\n \"label-18\",\n \"label-16\",\n \"label-16-mono\",\n \"label-14\",\n \"label-14-mono\",\n \"label-13\",\n \"label-13-mono\",\n \"label-12\",\n \"label-12-mono\",\n \"copy-24\",\n \"copy-20\",\n \"copy-18\",\n \"copy-16\",\n \"copy-14\",\n \"copy-14-mono\",\n \"copy-13\",\n \"copy-13-mono\",\n] as const\n\n// The eight `material-*` utilities, likewise one group.\nexport const materials = [\n \"base\",\n \"small\",\n \"medium\",\n \"large\",\n \"tooltip\",\n \"menu\",\n \"modal\",\n \"fullscreen\",\n] as const\n\nexport type TypeRole = (typeof typeRoles)[number]\nexport type Material = (typeof materials)[number]\n\nconst config = {\n extend: {\n classGroups: {\n \"font-size\": [{ text: [...typeRoles] }],\n material: [{ material: [...materials] }],\n },\n },\n}\n\nexport const twMerge = createTwMerge(config)\n\nexport const cn = createCn(config)\n"]}
@@ -0,0 +1,64 @@
1
+ declare const ziizShikiTheme: {
2
+ name: string;
3
+ type: "dark";
4
+ colors: {
5
+ "editor.foreground": string;
6
+ "editor.background": string;
7
+ };
8
+ settings: ({
9
+ scope: string[];
10
+ settings: {
11
+ foreground: string;
12
+ };
13
+ } | {
14
+ scope: string;
15
+ settings: {
16
+ foreground: string;
17
+ };
18
+ })[];
19
+ };
20
+ declare const ziizShikiOptions: {
21
+ themes: {
22
+ light: {
23
+ name: string;
24
+ type: "dark";
25
+ colors: {
26
+ "editor.foreground": string;
27
+ "editor.background": string;
28
+ };
29
+ settings: ({
30
+ scope: string[];
31
+ settings: {
32
+ foreground: string;
33
+ };
34
+ } | {
35
+ scope: string;
36
+ settings: {
37
+ foreground: string;
38
+ };
39
+ })[];
40
+ };
41
+ dark: {
42
+ name: string;
43
+ type: "dark";
44
+ colors: {
45
+ "editor.foreground": string;
46
+ "editor.background": string;
47
+ };
48
+ settings: ({
49
+ scope: string[];
50
+ settings: {
51
+ foreground: string;
52
+ };
53
+ } | {
54
+ scope: string;
55
+ settings: {
56
+ foreground: string;
57
+ };
58
+ })[];
59
+ };
60
+ };
61
+ defaultColor: "light";
62
+ };
63
+
64
+ export { ziizShikiOptions, ziizShikiTheme };
package/dist/shiki.js ADDED
@@ -0,0 +1,115 @@
1
+ // src/shiki.ts
2
+ var ziizShikiTheme = {
3
+ name: "ziiz",
4
+ type: "dark",
5
+ colors: {
6
+ "editor.foreground": "var(--shiki-color-text, inherit)",
7
+ "editor.background": "var(--shiki-color-background, transparent)"
8
+ },
9
+ settings: [
10
+ {
11
+ scope: ["comment", "punctuation.definition.comment", "string.comment"],
12
+ settings: { foreground: "var(--shiki-token-comment)" }
13
+ },
14
+ {
15
+ scope: [
16
+ "constant",
17
+ "entity.name.constant",
18
+ "variable.other.constant",
19
+ "variable.other.enummember",
20
+ "variable.language",
21
+ "entity"
22
+ ],
23
+ settings: { foreground: "var(--shiki-token-constant)" }
24
+ },
25
+ {
26
+ scope: ["entity.name", "meta.export.default", "meta.definition.variable"],
27
+ settings: { foreground: "var(--shiki-token-function)" }
28
+ },
29
+ {
30
+ scope: [
31
+ "variable.parameter.function",
32
+ "meta.jsx.children",
33
+ "meta.block",
34
+ "meta.tag.attributes",
35
+ "entity.name.section",
36
+ "text",
37
+ "punctuation.definition.tag",
38
+ "punctuation.separator.inheritance.php",
39
+ "punctuation.definition.tag.html",
40
+ "punctuation.definition.tag.begin.html",
41
+ "punctuation.definition.tag.end.html",
42
+ "punctuation.section.embedded",
43
+ "variable.parameter"
44
+ ],
45
+ settings: { foreground: "var(--shiki-token-parameter)" }
46
+ },
47
+ {
48
+ scope: ["entity.name.tag", "support.class.component"],
49
+ settings: { foreground: "var(--shiki-token-function)" }
50
+ },
51
+ {
52
+ scope: "keyword",
53
+ settings: { foreground: "var(--shiki-token-keyword)" }
54
+ },
55
+ {
56
+ scope: ["storage", "storage.type", "storage.modifier"],
57
+ settings: { foreground: "var(--shiki-token-keyword)" }
58
+ },
59
+ {
60
+ scope: [
61
+ "string",
62
+ "string punctuation.section.embedded source",
63
+ "attribute.value"
64
+ ],
65
+ settings: { foreground: "var(--shiki-token-string)" }
66
+ },
67
+ {
68
+ scope: [
69
+ "punctuation",
70
+ "punctuation.definition.string",
71
+ "punctuation.definition.variable",
72
+ "punctuation.definition.string.begin",
73
+ "punctuation.definition.string.end",
74
+ "punctuation.section.embedded.begin",
75
+ "punctuation.section.embedded.end"
76
+ ],
77
+ settings: { foreground: "var(--shiki-token-punctuation)" }
78
+ },
79
+ {
80
+ scope: "string.regexp",
81
+ settings: { foreground: "var(--shiki-token-string-expression)" }
82
+ },
83
+ {
84
+ scope: [
85
+ "support.function",
86
+ "entity.name.function",
87
+ "meta.function-call.generic"
88
+ ],
89
+ settings: { foreground: "var(--shiki-token-function)" }
90
+ },
91
+ {
92
+ scope: "markup.underline.link",
93
+ settings: { foreground: "var(--shiki-token-link)" }
94
+ },
95
+ {
96
+ scope: [
97
+ "markup.list",
98
+ "string.other.link.title.markdown",
99
+ "string.other.link.description.markdown"
100
+ ],
101
+ settings: { foreground: "var(--shiki-token-parameter)" }
102
+ }
103
+ ]
104
+ };
105
+ var ziizShikiOptions = {
106
+ themes: {
107
+ light: ziizShikiTheme,
108
+ dark: ziizShikiTheme
109
+ },
110
+ defaultColor: "light"
111
+ };
112
+
113
+ export { ziizShikiOptions, ziizShikiTheme };
114
+ //# sourceMappingURL=shiki.js.map
115
+ //# sourceMappingURL=shiki.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/shiki.ts"],"names":[],"mappings":"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","file":"shiki.js","sourcesContent":["import type { ThemeRegistrationRaw } from \"shiki\"\n\nexport const ziizShikiTheme = {\n name: \"ziiz\",\n type: \"dark\" as const,\n colors: {\n \"editor.foreground\": \"var(--shiki-color-text, inherit)\",\n \"editor.background\": \"var(--shiki-color-background, transparent)\",\n },\n settings: [\n {\n scope: [\"comment\", \"punctuation.definition.comment\", \"string.comment\"],\n settings: { foreground: \"var(--shiki-token-comment)\" },\n },\n {\n scope: [\n \"constant\",\n \"entity.name.constant\",\n \"variable.other.constant\",\n \"variable.other.enummember\",\n \"variable.language\",\n \"entity\",\n ],\n settings: { foreground: \"var(--shiki-token-constant)\" },\n },\n {\n scope: [\"entity.name\", \"meta.export.default\", \"meta.definition.variable\"],\n settings: { foreground: \"var(--shiki-token-function)\" },\n },\n {\n scope: [\n \"variable.parameter.function\",\n \"meta.jsx.children\",\n \"meta.block\",\n \"meta.tag.attributes\",\n \"entity.name.section\",\n \"text\",\n \"punctuation.definition.tag\",\n \"punctuation.separator.inheritance.php\",\n \"punctuation.definition.tag.html\",\n \"punctuation.definition.tag.begin.html\",\n \"punctuation.definition.tag.end.html\",\n \"punctuation.section.embedded\",\n \"variable.parameter\",\n ],\n settings: { foreground: \"var(--shiki-token-parameter)\" },\n },\n {\n scope: [\"entity.name.tag\", \"support.class.component\"],\n settings: { foreground: \"var(--shiki-token-function)\" },\n },\n {\n scope: \"keyword\",\n settings: { foreground: \"var(--shiki-token-keyword)\" },\n },\n {\n scope: [\"storage\", \"storage.type\", \"storage.modifier\"],\n settings: { foreground: \"var(--shiki-token-keyword)\" },\n },\n {\n scope: [\n \"string\",\n \"string punctuation.section.embedded source\",\n \"attribute.value\",\n ],\n settings: { foreground: \"var(--shiki-token-string)\" },\n },\n {\n scope: [\n \"punctuation\",\n \"punctuation.definition.string\",\n \"punctuation.definition.variable\",\n \"punctuation.definition.string.begin\",\n \"punctuation.definition.string.end\",\n \"punctuation.section.embedded.begin\",\n \"punctuation.section.embedded.end\",\n ],\n settings: { foreground: \"var(--shiki-token-punctuation)\" },\n },\n {\n scope: \"string.regexp\",\n settings: { foreground: \"var(--shiki-token-string-expression)\" },\n },\n {\n scope: [\n \"support.function\",\n \"entity.name.function\",\n \"meta.function-call.generic\",\n ],\n settings: { foreground: \"var(--shiki-token-function)\" },\n },\n {\n scope: \"markup.underline.link\",\n settings: { foreground: \"var(--shiki-token-link)\" },\n },\n {\n scope: [\n \"markup.list\",\n \"string.other.link.title.markdown\",\n \"string.other.link.description.markdown\",\n ],\n settings: { foreground: \"var(--shiki-token-parameter)\" },\n },\n ],\n} satisfies ThemeRegistrationRaw\n\nexport const ziizShikiOptions = {\n themes: {\n light: ziizShikiTheme,\n dark: ziizShikiTheme,\n },\n defaultColor: \"light\" as const,\n}\n"]}
package/package.json ADDED
@@ -0,0 +1,69 @@
1
+ {
2
+ "name": "@nafisazizir/ziiz",
3
+ "version": "0.1.0",
4
+ "description": "ziiz design layer: ramp tokens, type roles, materials, prose, Shiki, and the shadcn slot bridge.",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/nafisazizir/ziiz.git",
9
+ "directory": "packages/theme"
10
+ },
11
+ "homepage": "https://ziiz.vercel.app",
12
+ "publishConfig": {
13
+ "access": "public"
14
+ },
15
+ "type": "module",
16
+ "sideEffects": [
17
+ "./theme.css",
18
+ "./shadcn.css"
19
+ ],
20
+ "files": [
21
+ "dist",
22
+ "theme.css",
23
+ "shadcn.css",
24
+ "README.md",
25
+ "CHANGELOG.md",
26
+ "LICENSE"
27
+ ],
28
+ "exports": {
29
+ ".": {
30
+ "style": "./theme.css",
31
+ "default": "./theme.css"
32
+ },
33
+ "./theme.css": "./theme.css",
34
+ "./shadcn.css": "./shadcn.css",
35
+ "./cn": {
36
+ "types": "./dist/cn.d.ts",
37
+ "import": "./dist/cn.js",
38
+ "default": "./dist/cn.js"
39
+ },
40
+ "./shiki": {
41
+ "types": "./dist/shiki.d.ts",
42
+ "import": "./dist/shiki.js",
43
+ "default": "./dist/shiki.js"
44
+ },
45
+ "./package.json": "./package.json"
46
+ },
47
+ "dependencies": {
48
+ "cn": "0.4.0"
49
+ },
50
+ "peerDependencies": {
51
+ "shiki": ">=3",
52
+ "tailwindcss": "^4"
53
+ },
54
+ "peerDependenciesMeta": {
55
+ "shiki": {
56
+ "optional": true
57
+ }
58
+ },
59
+ "devDependencies": {
60
+ "shiki": "4.4.3",
61
+ "tsup": "8.5.1",
62
+ "typescript": "5.9.3"
63
+ },
64
+ "scripts": {
65
+ "build": "tsup",
66
+ "dev": "tsup --watch",
67
+ "typecheck": "tsc --noEmit"
68
+ }
69
+ }
package/shadcn.css ADDED
@@ -0,0 +1,73 @@
1
+ /* shadcn slot bridge. Maps the stock shadcn/ui slot vocabulary (--background,
2
+ --muted-foreground, --sidebar-*, --chart-*) onto the ziiz ramp so components
3
+ written against shadcn's names pick up the ramp unchanged. Optional: a
4
+ consumer whose components speak ramp vocabulary directly does not need it.
5
+ Requires ./theme.css for the --ds-* tokens it points at. */
6
+
7
+ @theme inline {
8
+ --color-sidebar-ring: var(--sidebar-ring);
9
+ --color-sidebar-border: var(--sidebar-border);
10
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
11
+ --color-sidebar-accent: var(--sidebar-accent);
12
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
13
+ --color-sidebar-primary: var(--sidebar-primary);
14
+ --color-sidebar-foreground: var(--sidebar-foreground);
15
+ --color-sidebar: var(--sidebar);
16
+ --color-chart-5: var(--chart-5);
17
+ --color-chart-4: var(--chart-4);
18
+ --color-chart-3: var(--chart-3);
19
+ --color-chart-2: var(--chart-2);
20
+ --color-chart-1: var(--chart-1);
21
+ --color-ring: var(--ring);
22
+ --color-input: var(--input);
23
+ --color-border: var(--border);
24
+ --color-destructive: var(--destructive);
25
+ --color-accent-foreground: var(--accent-foreground);
26
+ --color-accent: var(--accent);
27
+ --color-muted-foreground: var(--muted-foreground);
28
+ --color-muted: var(--muted);
29
+ --color-secondary-foreground: var(--secondary-foreground);
30
+ --color-secondary: var(--secondary);
31
+ --color-primary-foreground: var(--primary-foreground);
32
+ --color-primary: var(--primary);
33
+ --color-popover-foreground: var(--popover-foreground);
34
+ --color-popover: var(--popover);
35
+ --color-card-foreground: var(--card-foreground);
36
+ --color-card: var(--card);
37
+ --color-foreground: var(--foreground);
38
+ --color-background: var(--background);
39
+ }
40
+
41
+ :root {
42
+ --background: var(--ds-background-100);
43
+ --foreground: var(--ds-gray-1000);
44
+ --card: var(--ds-background-100);
45
+ --card-foreground: var(--ds-gray-1000);
46
+ --popover: var(--ds-background-100);
47
+ --popover-foreground: var(--ds-gray-1000);
48
+ --primary: var(--ds-gray-1000);
49
+ --primary-foreground: var(--ds-background-100);
50
+ --secondary: var(--ds-gray-100);
51
+ --secondary-foreground: var(--ds-gray-1000);
52
+ --muted: var(--ds-gray-100);
53
+ --muted-foreground: var(--ds-gray-900);
54
+ --accent: var(--ds-gray-100);
55
+ --accent-foreground: var(--ds-gray-1000);
56
+ --destructive: var(--ds-red-800);
57
+ --border: var(--ds-gray-alpha-400);
58
+ --input: var(--ds-gray-alpha-400);
59
+ --ring: var(--ds-gray-600);
60
+ --chart-1: var(--ds-blue-700);
61
+ --chart-2: var(--ds-amber-700);
62
+ --chart-3: var(--ds-green-700);
63
+ --chart-4: var(--ds-purple-700);
64
+ --chart-5: var(--ds-pink-700);
65
+ --sidebar: var(--ds-background-200);
66
+ --sidebar-foreground: var(--ds-gray-1000);
67
+ --sidebar-primary: var(--ds-gray-1000);
68
+ --sidebar-primary-foreground: var(--ds-background-200);
69
+ --sidebar-accent: var(--ds-gray-100);
70
+ --sidebar-accent-foreground: var(--ds-gray-1000);
71
+ --sidebar-border: var(--ds-gray-alpha-400);
72
+ --sidebar-ring: var(--ds-gray-600);
73
+ }