@kornorg/design-system 0.8.0 → 0.8.2

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/tokens.mjs CHANGED
@@ -1,47 +1,55 @@
1
1
  // src/tokens.ts
2
- var spacing = {
3
- 0: "0rem",
4
- 0.5: "0.125rem",
5
- // 2px
6
- 1: "0.25rem",
7
- // 4px
8
- 2: "0.5rem",
9
- // 8px
10
- 3: "0.75rem",
11
- // 12px
12
- 4: "1rem",
13
- // 16px
14
- 5: "1.25rem",
15
- // 20px
16
- 6: "1.5rem",
17
- // 24px
18
- 8: "2rem",
19
- // 32px
20
- 10: "2.5rem",
21
- // 40px
22
- 12: "3rem",
23
- // 48px
24
- 16: "4rem"
25
- // 64px
2
+ /**
3
+ * Design tokens — typed source of truth for the values that have no CSS
4
+ * backing (spacing scale, type scale, font weights).
5
+ *
6
+ * Color, radius, and font-family values live in a theme's CSS custom
7
+ * properties (`src/styles/themes/<feel>.css`) instead — components consume
8
+ * those through Tailwind utility classes (e.g. `bg-primary`), which is the
9
+ * only place a `var(--x)` reference resolves. The published `tokens` export
10
+ * needs to work without a DOM (chart libraries, canvas/SVG rendering, email
11
+ * templates), so `scripts/build-css.mjs` resolves the default theme's CSS to
12
+ * literal values at build time and appends them to this file's build output
13
+ * as `light` / `dark` (see `scripts/generate-tokens.mjs`), plus `radii` and
14
+ * `fontFamily`. Import them from `@kornorg/design-system/tokens` alongside
15
+ * the tokens defined here — this source file only has the pieces below.
16
+ */
17
+ /**
18
+ * Spacing scale (rem). Matches Tailwind's default 4px step so utility classes
19
+ * (`p-4`, `gap-2`, …) and token references stay aligned.
20
+ */
21
+ const spacing = {
22
+ 0: "0rem",
23
+ .5: "0.125rem",
24
+ 1: "0.25rem",
25
+ 2: "0.5rem",
26
+ 3: "0.75rem",
27
+ 4: "1rem",
28
+ 5: "1.25rem",
29
+ 6: "1.5rem",
30
+ 8: "2rem",
31
+ 10: "2.5rem",
32
+ 12: "3rem",
33
+ 16: "4rem"
26
34
  };
27
- var fontSize = {
28
- xs: ["0.75rem", "1rem"],
29
- sm: ["0.875rem", "1.25rem"],
30
- base: ["1rem", "1.5rem"],
31
- lg: ["1.125rem", "1.75rem"],
32
- xl: ["1.25rem", "1.75rem"],
33
- "2xl": ["1.5rem", "2rem"],
34
- "3xl": ["1.875rem", "2.25rem"],
35
- "4xl": ["2.25rem", "2.5rem"],
36
- "5xl": ["3rem", "1"]
35
+ /** Typography scale: [font-size, line-height]. */
36
+ const fontSize = {
37
+ xs: ["0.75rem", "1rem"],
38
+ sm: ["0.875rem", "1.25rem"],
39
+ base: ["1rem", "1.5rem"],
40
+ lg: ["1.125rem", "1.75rem"],
41
+ xl: ["1.25rem", "1.75rem"],
42
+ "2xl": ["1.5rem", "2rem"],
43
+ "3xl": ["1.875rem", "2.25rem"],
44
+ "4xl": ["2.25rem", "2.5rem"],
45
+ "5xl": ["3rem", "1"]
37
46
  };
38
- var fontWeight = {
39
- normal: "400",
40
- medium: "500",
41
- semibold: "600",
42
- bold: "700"
47
+ const fontWeight = {
48
+ normal: "400",
49
+ medium: "500",
50
+ semibold: "600",
51
+ bold: "700"
43
52
  };
44
-
45
53
  export { fontSize, fontWeight, spacing };
46
54
 
47
55
  // --- Generated by scripts/build-css.mjs from src/styles/themes/modern-neutral.css. ---
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@kornorg/design-system",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
4
  "description": "Modern Neutral — a React + Tailwind CSS design system (components, tokens, Geist fonts).",
5
5
  "license": "MIT",
6
- "homepage": "https://kornsour.github.io/design-system/",
6
+ "homepage": "https://lurking-walrus.github.io/design-system/",
7
7
  "repository": {
8
8
  "type": "git",
9
- "url": "git+https://github.com/kornsour/design-system.git"
9
+ "url": "git+https://github.com/lurking-walrus/design-system.git"
10
10
  },
11
11
  "keywords": [
12
12
  "design-system",
@@ -43,7 +43,7 @@
43
43
  ],
44
44
  "scripts": {
45
45
  "dev": "next dev --turbopack",
46
- "build": "tsup && node scripts/postbuild.mjs && pnpm run build:css",
46
+ "build": "tsdown && node scripts/postbuild.mjs && pnpm run build:css",
47
47
  "build:css": "node scripts/build-css.mjs",
48
48
  "build:showcase": "next build",
49
49
  "prepack": "pnpm run build",
@@ -83,20 +83,19 @@
83
83
  "@types/react-dom": "^19",
84
84
  "@vitejs/plugin-react": "^6.1.0",
85
85
  "geist": "^1.7.2",
86
- "jsdom": "^30.0.1",
87
- "next": "16.3.2",
88
- "react": "19.2.8",
89
- "react-dom": "19.2.8",
86
+ "jsdom": "^31.0.1",
87
+ "next": "16.4.6",
88
+ "react": "19.3.1",
89
+ "react-dom": "19.3.1",
90
90
  "tailwindcss": "^4",
91
- "tsup": "^8.5.0",
91
+ "tsdown": "^0.23.7",
92
92
  "tw-animate-css": "^1.4.0",
93
- "typescript": "^6",
94
- "vitest": "^4.1.9"
93
+ "typescript": "^7.0.2",
94
+ "vitest": "^5.0.1"
95
95
  },
96
96
  "pnpm": {
97
97
  "overrides": {
98
- "sharp": "0.35.0",
99
- "vite": "^8.0.16",
98
+ "vite": "^8.1.6",
100
99
  "esbuild@>=0.27.3 <0.28.1": "^0.28.1",
101
100
  "postcss@<8.5.10": "^8.5.10"
102
101
  }