@vantageos/mosaic 0.1.2 → 0.2.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 (62) hide show
  1. package/dist/preact/artifacts.js +3 -0
  2. package/dist/preact/artifacts.js.map +1 -0
  3. package/dist/preact/confirmation.js +3 -0
  4. package/dist/preact/confirmation.js.map +1 -0
  5. package/dist/preact/display.js +3 -0
  6. package/dist/preact/display.js.map +1 -0
  7. package/dist/preact/index.js +3 -0
  8. package/dist/preact/index.js.map +1 -0
  9. package/dist/preact/input.js +3 -0
  10. package/dist/preact/input.js.map +1 -0
  11. package/dist/preact/media.js +3 -0
  12. package/dist/preact/media.js.map +1 -0
  13. package/dist/preact/progress.js +3 -0
  14. package/dist/preact/progress.js.map +1 -0
  15. package/dist/react/artifacts.cjs +4 -0
  16. package/dist/react/artifacts.cjs.map +1 -0
  17. package/dist/react/artifacts.d.cts +2 -0
  18. package/dist/react/artifacts.d.ts +2 -0
  19. package/dist/react/artifacts.js +3 -0
  20. package/dist/react/artifacts.js.map +1 -0
  21. package/dist/react/confirmation.cjs +4 -0
  22. package/dist/react/confirmation.cjs.map +1 -0
  23. package/dist/react/confirmation.d.cts +2 -0
  24. package/dist/react/confirmation.d.ts +2 -0
  25. package/dist/react/confirmation.js +3 -0
  26. package/dist/react/confirmation.js.map +1 -0
  27. package/dist/react/display.cjs +4 -0
  28. package/dist/react/display.cjs.map +1 -0
  29. package/dist/react/display.d.cts +2 -0
  30. package/dist/react/display.d.ts +2 -0
  31. package/dist/react/display.js +3 -0
  32. package/dist/react/display.js.map +1 -0
  33. package/dist/react/index.cjs +4 -0
  34. package/dist/react/index.cjs.map +1 -0
  35. package/dist/react/index.d.cts +2 -0
  36. package/dist/react/index.d.ts +2 -0
  37. package/dist/react/index.js +3 -0
  38. package/dist/react/index.js.map +1 -0
  39. package/dist/react/input.cjs +4 -0
  40. package/dist/react/input.cjs.map +1 -0
  41. package/dist/react/input.d.cts +2 -0
  42. package/dist/react/input.d.ts +2 -0
  43. package/dist/react/input.js +3 -0
  44. package/dist/react/input.js.map +1 -0
  45. package/dist/react/media.cjs +4 -0
  46. package/dist/react/media.cjs.map +1 -0
  47. package/dist/react/media.d.cts +2 -0
  48. package/dist/react/media.d.ts +2 -0
  49. package/dist/react/media.js +3 -0
  50. package/dist/react/media.js.map +1 -0
  51. package/dist/react/progress.cjs +4 -0
  52. package/dist/react/progress.cjs.map +1 -0
  53. package/dist/react/progress.d.cts +2 -0
  54. package/dist/react/progress.d.ts +2 -0
  55. package/dist/react/progress.js +3 -0
  56. package/dist/react/progress.js.map +1 -0
  57. package/dist/tokens.cjs +95 -0
  58. package/dist/tokens.cjs.map +1 -0
  59. package/dist/tokens.js +84 -0
  60. package/dist/tokens.js.map +1 -0
  61. package/package.json +83 -3
  62. package/registry.yaml +1 -1
@@ -0,0 +1,3 @@
1
+
2
+ //# sourceMappingURL=artifacts.js.map
3
+ //# sourceMappingURL=artifacts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"artifacts.js"}
@@ -0,0 +1,3 @@
1
+
2
+ //# sourceMappingURL=confirmation.js.map
3
+ //# sourceMappingURL=confirmation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"confirmation.js"}
@@ -0,0 +1,3 @@
1
+
2
+ //# sourceMappingURL=display.js.map
3
+ //# sourceMappingURL=display.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"display.js"}
@@ -0,0 +1,3 @@
1
+
2
+ //# sourceMappingURL=index.js.map
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
@@ -0,0 +1,3 @@
1
+
2
+ //# sourceMappingURL=input.js.map
3
+ //# sourceMappingURL=input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"input.js"}
@@ -0,0 +1,3 @@
1
+
2
+ //# sourceMappingURL=media.js.map
3
+ //# sourceMappingURL=media.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"media.js"}
@@ -0,0 +1,3 @@
1
+
2
+ //# sourceMappingURL=progress.js.map
3
+ //# sourceMappingURL=progress.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"progress.js"}
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ //# sourceMappingURL=artifacts.cjs.map
4
+ //# sourceMappingURL=artifacts.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"artifacts.cjs"}
@@ -0,0 +1,2 @@
1
+
2
+ export { }
@@ -0,0 +1,2 @@
1
+
2
+ export { }
@@ -0,0 +1,3 @@
1
+
2
+ //# sourceMappingURL=artifacts.js.map
3
+ //# sourceMappingURL=artifacts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"artifacts.js"}
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ //# sourceMappingURL=confirmation.cjs.map
4
+ //# sourceMappingURL=confirmation.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"confirmation.cjs"}
@@ -0,0 +1,2 @@
1
+
2
+ export { }
@@ -0,0 +1,2 @@
1
+
2
+ export { }
@@ -0,0 +1,3 @@
1
+
2
+ //# sourceMappingURL=confirmation.js.map
3
+ //# sourceMappingURL=confirmation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"confirmation.js"}
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ //# sourceMappingURL=display.cjs.map
4
+ //# sourceMappingURL=display.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"display.cjs"}
@@ -0,0 +1,2 @@
1
+
2
+ export { }
@@ -0,0 +1,2 @@
1
+
2
+ export { }
@@ -0,0 +1,3 @@
1
+
2
+ //# sourceMappingURL=display.js.map
3
+ //# sourceMappingURL=display.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"display.js"}
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ //# sourceMappingURL=index.cjs.map
4
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
@@ -0,0 +1,2 @@
1
+
2
+ export { }
@@ -0,0 +1,2 @@
1
+
2
+ export { }
@@ -0,0 +1,3 @@
1
+
2
+ //# sourceMappingURL=index.js.map
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ //# sourceMappingURL=input.cjs.map
4
+ //# sourceMappingURL=input.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"input.cjs"}
@@ -0,0 +1,2 @@
1
+
2
+ export { }
@@ -0,0 +1,2 @@
1
+
2
+ export { }
@@ -0,0 +1,3 @@
1
+
2
+ //# sourceMappingURL=input.js.map
3
+ //# sourceMappingURL=input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"input.js"}
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ //# sourceMappingURL=media.cjs.map
4
+ //# sourceMappingURL=media.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"media.cjs"}
@@ -0,0 +1,2 @@
1
+
2
+ export { }
@@ -0,0 +1,2 @@
1
+
2
+ export { }
@@ -0,0 +1,3 @@
1
+
2
+ //# sourceMappingURL=media.js.map
3
+ //# sourceMappingURL=media.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"media.js"}
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ //# sourceMappingURL=progress.cjs.map
4
+ //# sourceMappingURL=progress.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"progress.cjs"}
@@ -0,0 +1,2 @@
1
+
2
+ export { }
@@ -0,0 +1,2 @@
1
+
2
+ export { }
@@ -0,0 +1,3 @@
1
+
2
+ //# sourceMappingURL=progress.js.map
3
+ //# sourceMappingURL=progress.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"progress.js"}
@@ -0,0 +1,95 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ // ../mosaic-tokens/src/tokens.ts
6
+ var colors = Object.freeze({
7
+ "success-50": "oklch(0.965 0.040 145)",
8
+ "success-500": "oklch(0.660 0.180 145)",
9
+ "success-700": "oklch(0.470 0.140 145)",
10
+ "warning-50": "oklch(0.975 0.045 85)",
11
+ "warning-500": "oklch(0.770 0.170 85)",
12
+ "warning-700": "oklch(0.560 0.145 65)",
13
+ "danger-50": "oklch(0.965 0.035 25)",
14
+ "danger-500": "oklch(0.640 0.205 25)",
15
+ "danger-700": "oklch(0.460 0.180 25)",
16
+ "info-50": "oklch(0.970 0.035 250)",
17
+ "info-500": "oklch(0.650 0.170 250)",
18
+ "info-700": "oklch(0.460 0.150 250)",
19
+ "neutral-50": "oklch(0.980 0.005 250)",
20
+ "neutral-500": "oklch(0.580 0.012 250)",
21
+ "neutral-700": "oklch(0.380 0.010 250)"
22
+ });
23
+ var spacing = Object.freeze({
24
+ "1": "4px",
25
+ "2": "8px",
26
+ "3": "12px",
27
+ "4": "16px",
28
+ "6": "24px",
29
+ "8": "32px",
30
+ "12": "48px",
31
+ "16": "64px"
32
+ });
33
+ var typography = Object.freeze({
34
+ "size-xs": "12px",
35
+ "size-sm": "14px",
36
+ "size-base": "16px",
37
+ "size-lg": "20px",
38
+ "size-xl": "24px",
39
+ "size-2xl": "30px",
40
+ "size-3xl": "38px",
41
+ "lh-tight": "1.2",
42
+ "lh-normal": "1.5",
43
+ "lh-relaxed": "1.6",
44
+ "weight-regular": "400",
45
+ "weight-medium": "500",
46
+ "weight-semibold": "600",
47
+ "weight-bold": "700"
48
+ });
49
+ var shadows = Object.freeze({
50
+ "0": "none",
51
+ "1": "0 1px 2px 0 oklch(0.200 0.010 250 / 0.05)",
52
+ "2": "0 2px 4px -1px oklch(0.200 0.010 250 / 0.08), 0 1px 2px -1px oklch(0.200 0.010 250 / 0.06)",
53
+ "3": "0 4px 8px -2px oklch(0.200 0.010 250 / 0.10), 0 2px 4px -2px oklch(0.200 0.010 250 / 0.06)",
54
+ "4": "0 8px 16px -4px oklch(0.200 0.010 250 / 0.12), 0 4px 8px -4px oklch(0.200 0.010 250 / 0.08)",
55
+ "5": "0 16px 32px -8px oklch(0.200 0.010 250 / 0.16), 0 8px 16px -8px oklch(0.200 0.010 250 / 0.10)"
56
+ });
57
+ var radii = Object.freeze({
58
+ none: "0px",
59
+ xs: "2px",
60
+ sm: "4px",
61
+ md: "6px",
62
+ lg: "8px",
63
+ xl: "12px",
64
+ full: "9999px"
65
+ });
66
+ var motion = Object.freeze({
67
+ "duration-fast": "75ms",
68
+ "duration-base": "150ms",
69
+ "duration-slow": "300ms",
70
+ "easing-linear": "linear",
71
+ "easing-ease": "cubic-bezier(0.4, 0, 0.2, 1)",
72
+ "easing-in": "cubic-bezier(0.4, 0, 1, 1)",
73
+ "easing-out": "cubic-bezier(0, 0, 0.2, 1)",
74
+ "easing-in-out": "cubic-bezier(0.4, 0, 0.2, 1)"
75
+ });
76
+ var tokens = Object.freeze({
77
+ colors,
78
+ spacing,
79
+ typography,
80
+ shadows,
81
+ radii,
82
+ motion
83
+ });
84
+ var tokens_default = tokens;
85
+
86
+ exports.colors = colors;
87
+ exports.default = tokens_default;
88
+ exports.motion = motion;
89
+ exports.radii = radii;
90
+ exports.shadows = shadows;
91
+ exports.spacing = spacing;
92
+ exports.tokens = tokens;
93
+ exports.typography = typography;
94
+ //# sourceMappingURL=tokens.cjs.map
95
+ //# sourceMappingURL=tokens.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../mosaic-tokens/src/tokens.ts"],"names":[],"mappings":";;;;;AA8BO,IAAM,MAAA,GAAiC,OAAO,MAAA,CAAO;AAAA,EAC1D,YAAA,EAAc,wBAAA;AAAA,EACd,aAAA,EAAe,wBAAA;AAAA,EACf,aAAA,EAAe,wBAAA;AAAA,EACf,YAAA,EAAc,uBAAA;AAAA,EACd,aAAA,EAAe,uBAAA;AAAA,EACf,aAAA,EAAe,uBAAA;AAAA,EACf,WAAA,EAAa,uBAAA;AAAA,EACb,YAAA,EAAc,uBAAA;AAAA,EACd,YAAA,EAAc,uBAAA;AAAA,EACd,SAAA,EAAW,wBAAA;AAAA,EACX,UAAA,EAAY,wBAAA;AAAA,EACZ,UAAA,EAAY,wBAAA;AAAA,EACZ,YAAA,EAAc,wBAAA;AAAA,EACd,aAAA,EAAe,wBAAA;AAAA,EACf,aAAA,EAAe;AACjB,CAAC;AAGM,IAAM,OAAA,GAAmC,OAAO,MAAA,CAAO;AAAA,EAC5D,GAAA,EAAK,KAAA;AAAA,EACL,GAAA,EAAK,KAAA;AAAA,EACL,GAAA,EAAK,MAAA;AAAA,EACL,GAAA,EAAK,MAAA;AAAA,EACL,GAAA,EAAK,MAAA;AAAA,EACL,GAAA,EAAK,MAAA;AAAA,EACL,IAAA,EAAM,MAAA;AAAA,EACN,IAAA,EAAM;AACR,CAAC;AAGM,IAAM,UAAA,GAAyC,OAAO,MAAA,CAAO;AAAA,EAClE,SAAA,EAAW,MAAA;AAAA,EACX,SAAA,EAAW,MAAA;AAAA,EACX,WAAA,EAAa,MAAA;AAAA,EACb,SAAA,EAAW,MAAA;AAAA,EACX,SAAA,EAAW,MAAA;AAAA,EACX,UAAA,EAAY,MAAA;AAAA,EACZ,UAAA,EAAY,MAAA;AA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B implementation).\n *\n * Framework-free, OKLCH-based, mirror of the CSS custom properties in\n * tokens.css. Consumers can opt for either the CSS surface (Tailwind v4\n * + @theme inline) or the JS surface (typed runtime access in JSX styles,\n * Storybook stories, Playwright assertions, snapshot tests).\n *\n * Size targets (.size-limit.json): JS bundle ≤5 KB gz, CSS ≤3 KB gz.\n *\n * Schema invariants (enforced by mosaic-tokens-coherence-test in T3-C):\n * - Every CSS var has a JS counterpart (and vice versa).\n * - Color shades 50 < 500 < 700 monotonic luminance.\n * - Spacing scale ascending, ratio 1.5x average (4 → 64 px).\n * - Typography scale uses 1.25x ratio (12 → 38 px).\n * - Shadow elevation 0 < 1 < 2 < 3 < 4 < 5 monotonic blur radius.\n * - Radii strictly ascending (none → full).\n */\n\nexport interface MosaicTokens {\n readonly colors: Readonly<Record<string, string>>;\n readonly spacing: Readonly<Record<string, string>>;\n readonly typography: Readonly<Record<string, string>>;\n readonly shadows: Readonly<Record<string, string>>;\n readonly radii: Readonly<Record<string, string>>;\n readonly motion: Readonly<Record<string, string>>;\n}\n\n// Colors — semantic statuses × 3 shades (50/500/700), OKLCH.\n// 50 = surface tint, 500 = brand body, 700 = accessible contrast on light bg.\nexport const colors: MosaicTokens[\"colors\"] = Object.freeze({\n \"success-50\": \"oklch(0.965 0.040 145)\",\n \"success-500\": \"oklch(0.660 0.180 145)\",\n \"success-700\": \"oklch(0.470 0.140 145)\",\n \"warning-50\": \"oklch(0.975 0.045 85)\",\n \"warning-500\": \"oklch(0.770 0.170 85)\",\n \"warning-700\": \"oklch(0.560 0.145 65)\",\n \"danger-50\": \"oklch(0.965 0.035 25)\",\n \"danger-500\": \"oklch(0.640 0.205 25)\",\n \"danger-700\": \"oklch(0.460 0.180 25)\",\n \"info-50\": \"oklch(0.970 0.035 250)\",\n \"info-500\": \"oklch(0.650 0.170 250)\",\n \"info-700\": \"oklch(0.460 0.150 250)\",\n \"neutral-50\": \"oklch(0.980 0.005 250)\",\n \"neutral-500\": \"oklch(0.580 0.012 250)\",\n \"neutral-700\": \"oklch(0.380 0.010 250)\",\n});\n\n// Spacing — 4 → 64 px scale.\nexport const spacing: MosaicTokens[\"spacing\"] = Object.freeze({\n \"1\": \"4px\",\n \"2\": \"8px\",\n \"3\": \"12px\",\n \"4\": \"16px\",\n \"6\": \"24px\",\n \"8\": \"32px\",\n \"12\": \"48px\",\n \"16\": \"64px\",\n});\n\n// Typography — 1.25x font-size scale + line-height + weight.\nexport const typography: MosaicTokens[\"typography\"] = Object.freeze({\n \"size-xs\": \"12px\",\n \"size-sm\": \"14px\",\n \"size-base\": \"16px\",\n \"size-lg\": \"20px\",\n \"size-xl\": \"24px\",\n \"size-2xl\": \"30px\",\n \"size-3xl\": \"38px\",\n \"lh-tight\": \"1.2\",\n \"lh-normal\": \"1.5\",\n \"lh-relaxed\": \"1.6\",\n \"weight-regular\": \"400\",\n \"weight-medium\": \"500\",\n \"weight-semibold\": \"600\",\n \"weight-bold\": \"700\",\n});\n\n// Shadows — 6 elevation steps, OKLCH neutral tint.\nexport const shadows: MosaicTokens[\"shadows\"] = Object.freeze({\n \"0\": \"none\",\n \"1\": \"0 1px 2px 0 oklch(0.200 0.010 250 / 0.05)\",\n \"2\": \"0 2px 4px -1px oklch(0.200 0.010 250 / 0.08), 0 1px 2px -1px oklch(0.200 0.010 250 / 0.06)\",\n \"3\": \"0 4px 8px -2px oklch(0.200 0.010 250 / 0.10), 0 2px 4px -2px oklch(0.200 0.010 250 / 0.06)\",\n \"4\": \"0 8px 16px -4px oklch(0.200 0.010 250 / 0.12), 0 4px 8px -4px oklch(0.200 0.010 250 / 0.08)\",\n \"5\": \"0 16px 32px -8px oklch(0.200 0.010 250 / 0.16), 0 8px 16px -8px oklch(0.200 0.010 250 / 0.10)\",\n});\n\n// Radii — strictly ascending (none → full).\nexport const radii: MosaicTokens[\"radii\"] = Object.freeze({\n none: \"0px\",\n xs: \"2px\",\n sm: \"4px\",\n md: \"6px\",\n lg: \"8px\",\n xl: \"12px\",\n full: \"9999px\",\n});\n\n// Motion — durations + easing curves.\nexport const motion: MosaicTokens[\"motion\"] = Object.freeze({\n \"duration-fast\": \"75ms\",\n \"duration-base\": \"150ms\",\n \"duration-slow\": \"300ms\",\n \"easing-linear\": \"linear\",\n \"easing-ease\": \"cubic-bezier(0.4, 0, 0.2, 1)\",\n \"easing-in\": \"cubic-bezier(0.4, 0, 1, 1)\",\n \"easing-out\": \"cubic-bezier(0, 0, 0.2, 1)\",\n \"easing-in-out\": \"cubic-bezier(0.4, 0, 0.2, 1)\",\n});\n\nexport const tokens: MosaicTokens = Object.freeze({\n colors,\n spacing,\n typography,\n shadows,\n radii,\n motion,\n});\n\nexport default tokens;\n"]}
package/dist/tokens.js ADDED
@@ -0,0 +1,84 @@
1
+ // ../mosaic-tokens/src/tokens.ts
2
+ var colors = Object.freeze({
3
+ "success-50": "oklch(0.965 0.040 145)",
4
+ "success-500": "oklch(0.660 0.180 145)",
5
+ "success-700": "oklch(0.470 0.140 145)",
6
+ "warning-50": "oklch(0.975 0.045 85)",
7
+ "warning-500": "oklch(0.770 0.170 85)",
8
+ "warning-700": "oklch(0.560 0.145 65)",
9
+ "danger-50": "oklch(0.965 0.035 25)",
10
+ "danger-500": "oklch(0.640 0.205 25)",
11
+ "danger-700": "oklch(0.460 0.180 25)",
12
+ "info-50": "oklch(0.970 0.035 250)",
13
+ "info-500": "oklch(0.650 0.170 250)",
14
+ "info-700": "oklch(0.460 0.150 250)",
15
+ "neutral-50": "oklch(0.980 0.005 250)",
16
+ "neutral-500": "oklch(0.580 0.012 250)",
17
+ "neutral-700": "oklch(0.380 0.010 250)"
18
+ });
19
+ var spacing = Object.freeze({
20
+ "1": "4px",
21
+ "2": "8px",
22
+ "3": "12px",
23
+ "4": "16px",
24
+ "6": "24px",
25
+ "8": "32px",
26
+ "12": "48px",
27
+ "16": "64px"
28
+ });
29
+ var typography = Object.freeze({
30
+ "size-xs": "12px",
31
+ "size-sm": "14px",
32
+ "size-base": "16px",
33
+ "size-lg": "20px",
34
+ "size-xl": "24px",
35
+ "size-2xl": "30px",
36
+ "size-3xl": "38px",
37
+ "lh-tight": "1.2",
38
+ "lh-normal": "1.5",
39
+ "lh-relaxed": "1.6",
40
+ "weight-regular": "400",
41
+ "weight-medium": "500",
42
+ "weight-semibold": "600",
43
+ "weight-bold": "700"
44
+ });
45
+ var shadows = Object.freeze({
46
+ "0": "none",
47
+ "1": "0 1px 2px 0 oklch(0.200 0.010 250 / 0.05)",
48
+ "2": "0 2px 4px -1px oklch(0.200 0.010 250 / 0.08), 0 1px 2px -1px oklch(0.200 0.010 250 / 0.06)",
49
+ "3": "0 4px 8px -2px oklch(0.200 0.010 250 / 0.10), 0 2px 4px -2px oklch(0.200 0.010 250 / 0.06)",
50
+ "4": "0 8px 16px -4px oklch(0.200 0.010 250 / 0.12), 0 4px 8px -4px oklch(0.200 0.010 250 / 0.08)",
51
+ "5": "0 16px 32px -8px oklch(0.200 0.010 250 / 0.16), 0 8px 16px -8px oklch(0.200 0.010 250 / 0.10)"
52
+ });
53
+ var radii = Object.freeze({
54
+ none: "0px",
55
+ xs: "2px",
56
+ sm: "4px",
57
+ md: "6px",
58
+ lg: "8px",
59
+ xl: "12px",
60
+ full: "9999px"
61
+ });
62
+ var motion = Object.freeze({
63
+ "duration-fast": "75ms",
64
+ "duration-base": "150ms",
65
+ "duration-slow": "300ms",
66
+ "easing-linear": "linear",
67
+ "easing-ease": "cubic-bezier(0.4, 0, 0.2, 1)",
68
+ "easing-in": "cubic-bezier(0.4, 0, 1, 1)",
69
+ "easing-out": "cubic-bezier(0, 0, 0.2, 1)",
70
+ "easing-in-out": "cubic-bezier(0.4, 0, 0.2, 1)"
71
+ });
72
+ var tokens = Object.freeze({
73
+ colors,
74
+ spacing,
75
+ typography,
76
+ shadows,
77
+ radii,
78
+ motion
79
+ });
80
+ var tokens_default = tokens;
81
+
82
+ export { colors, tokens_default as default, motion, radii, shadows, spacing, tokens, typography };
83
+ //# sourceMappingURL=tokens.js.map
84
+ //# sourceMapping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kB,KAAA;AAAA,EAClB,eAAA,EAAiB,KAAA;AAAA,EACjB,iBAAA,EAAmB,KAAA;AAAA,EACnB,aAAA,EAAe;AACjB,CAAC;AAGM,IAAM,OAAA,GAAmC,OAAO,MAAA,CAAO;AAAA,EAC5D,GAAA,EAAK,MAAA;AAAA,EACL,GAAA,EAAK,2CAAA;AAAA,EACL,GAAA,EAAK,4FAAA;AAAA,EACL,GAAA,EAAK,4FAAA;AAAA,EACL,GAAA,EAAK,6FAAA;AAAA,EACL,GAAA,EAAK;AACP,CAAC;AAGM,IAAM,KAAA,GAA+B,OAAO,MAAA,CAAO;AAAA,EACxD,IAAA,EAAM,KAAA;AAAA,EACN,EAAA,EAAI,KAAA;AAAA,EACJ,EAAA,EAAI,KAAA;AAAA,EACJ,EAAA,EAAI,KAAA;AAAA,EACJ,EAAA,EAAI,KAAA;AAAA,EACJ,EAAA,EAAI,MAAA;AAAA,EACJ,IAAA,EAAM;AACR,CAAC;AAGM,IAAM,MAAA,GAAiC,OAAO,MAAA,CAAO;AAAA,EAC1D,eAAA,EAAiB,MAAA;AAAA,EACjB,eAAA,EAAiB,OAAA;AAAA,EACjB,eAAA,EAAiB,OAAA;AAAA,EACjB,eAAA,EAAiB,QAAA;AAAA,EACjB,aAAA,EAAe,8BAAA;AAAA,EACf,WAAA,EAAa,4BAAA;AAAA,EACb,YAAA,EAAc,4BAAA;AAAA,EACd,eAAA,EAAiB;AACnB,CAAC;AAEM,IAAM,MAAA,GAAuB,OAAO,MAAA,CAAO;AAAA,EAChD,MAAA;AAAA,EACA,OAAA;AAAA,EACA,UAAA;AAAA,EACA,OAAA;AAAA,EACA,KAAA;AAAA,EACA;AACF,CAAC;AAED,IAAO,cAAA,GAAQ","file":"tokens.js","sourcesContent":["/**\n * @vantageos/mosaic-tokens — design tokens (T3-B implementation).\n *\n * Framework-free, OKLCH-based, mirror of the CSS custom properties in\n * tokens.css. Consumers can opt for either the CSS surface (Tailwind v4\n * + @theme inline) or the JS surface (typed runtime access in JSX styles,\n * Storybook stories, Playwright assertions, snapshot tests).\n *\n * Size targets (.size-limit.json): JS bundle ≤5 KB gz, CSS ≤3 KB gz.\n *\n * Schema invariants (enforced by mosaic-tokens-coherence-test in T3-C):\n * - Every CSS var has a JS counterpart (and vice versa).\n * - Color shades 50 < 500 < 700 monotonic luminance.\n * - Spacing scale ascending, ratio 1.5x average (4 → 64 px).\n * - Typography scale uses 1.25x ratio (12 → 38 px).\n * - Shadow elevation 0 < 1 < 2 < 3 < 4 < 5 monotonic blur radius.\n * - Radii strictly ascending (none → full).\n */\n\nexport interface MosaicTokens {\n readonly colors: Readonly<Record<string, string>>;\n readonly spacing: Readonly<Record<string, string>>;\n readonly typography: Readonly<Record<string, string>>;\n readonly shadows: Readonly<Record<string, string>>;\n readonly radii: Readonly<Record<string, string>>;\n readonly motion: Readonly<Record<string, string>>;\n}\n\n// Colors — semantic statuses × 3 shades (50/500/700), OKLCH.\n// 50 = surface tint, 500 = brand body, 700 = accessible contrast on light bg.\nexport const colors: MosaicTokens[\"colors\"] = Object.freeze({\n \"success-50\": \"oklch(0.965 0.040 145)\",\n \"success-500\": \"oklch(0.660 0.180 145)\",\n \"success-700\": \"oklch(0.470 0.140 145)\",\n \"warning-50\": \"oklch(0.975 0.045 85)\",\n \"warning-500\": \"oklch(0.770 0.170 85)\",\n \"warning-700\": \"oklch(0.560 0.145 65)\",\n \"danger-50\": \"oklch(0.965 0.035 25)\",\n \"danger-500\": \"oklch(0.640 0.205 25)\",\n \"danger-700\": \"oklch(0.460 0.180 25)\",\n \"info-50\": \"oklch(0.970 0.035 250)\",\n \"info-500\": \"oklch(0.650 0.170 250)\",\n \"info-700\": \"oklch(0.460 0.150 250)\",\n \"neutral-50\": \"oklch(0.980 0.005 250)\",\n \"neutral-500\": \"oklch(0.580 0.012 250)\",\n \"neutral-700\": \"oklch(0.380 0.010 250)\",\n});\n\n// Spacing — 4 → 64 px scale.\nexport const spacing: MosaicTokens[\"spacing\"] = Object.freeze({\n \"1\": \"4px\",\n \"2\": \"8px\",\n \"3\": \"12px\",\n \"4\": \"16px\",\n \"6\": \"24px\",\n \"8\": \"32px\",\n \"12\": \"48px\",\n \"16\": \"64px\",\n});\n\n// Typography — 1.25x font-size scale + line-height + weight.\nexport const typography: MosaicTokens[\"typography\"] = Object.freeze({\n \"size-xs\": \"12px\",\n \"size-sm\": \"14px\",\n \"size-base\": \"16px\",\n \"size-lg\": \"20px\",\n \"size-xl\": \"24px\",\n \"size-2xl\": \"30px\",\n \"size-3xl\": \"38px\",\n \"lh-tight\": \"1.2\",\n \"lh-normal\": \"1.5\",\n \"lh-relaxed\": \"1.6\",\n \"weight-regular\": \"400\",\n \"weight-medium\": \"500\",\n \"weight-semibold\": \"600\",\n \"weight-bold\": \"700\",\n});\n\n// Shadows — 6 elevation steps, OKLCH neutral tint.\nexport const shadows: MosaicTokens[\"shadows\"] = Object.freeze({\n \"0\": \"none\",\n \"1\": \"0 1px 2px 0 oklch(0.200 0.010 250 / 0.05)\",\n \"2\": \"0 2px 4px -1px oklch(0.200 0.010 250 / 0.08), 0 1px 2px -1px oklch(0.200 0.010 250 / 0.06)\",\n \"3\": \"0 4px 8px -2px oklch(0.200 0.010 250 / 0.10), 0 2px 4px -2px oklch(0.200 0.010 250 / 0.06)\",\n \"4\": \"0 8px 16px -4px oklch(0.200 0.010 250 / 0.12), 0 4px 8px -4px oklch(0.200 0.010 250 / 0.08)\",\n \"5\": \"0 16px 32px -8px oklch(0.200 0.010 250 / 0.16), 0 8px 16px -8px oklch(0.200 0.010 250 / 0.10)\",\n});\n\n// Radii — strictly ascending (none → full).\nexport const radii: MosaicTokens[\"radii\"] = Object.freeze({\n none: \"0px\",\n xs: \"2px\",\n sm: \"4px\",\n md: \"6px\",\n lg: \"8px\",\n xl: \"12px\",\n full: \"9999px\",\n});\n\n// Motion — durations + easing curves.\nexport const motion: MosaicTokens[\"motion\"] = Object.freeze({\n \"duration-fast\": \"75ms\",\n \"duration-base\": \"150ms\",\n \"duration-slow\": \"300ms\",\n \"easing-linear\": \"linear\",\n \"easing-ease\": \"cubic-bezier(0.4, 0, 0.2, 1)\",\n \"easing-in\": \"cubic-bezier(0.4, 0, 1, 1)\",\n \"easing-out\": \"cubic-bezier(0, 0, 0.2, 1)\",\n \"easing-in-out\": \"cubic-bezier(0.4, 0, 0.2, 1)\",\n});\n\nexport const tokens: MosaicTokens = Object.freeze({\n colors,\n spacing,\n typography,\n shadows,\n radii,\n motion,\n});\n\nexport default tokens;\n"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vantageos/mosaic",
3
- "version": "0.1.2",
4
- "description": "Fleet-wide MCP UI design system — 6-category taxonomy, Zod-validated, registry-gated, streaming-ready.",
3
+ "version": "0.2.0",
4
+ "description": "Fleet-wide MCP UI design system — 6-category taxonomy, Zod-validated, registry-gated, streaming-ready, cross-runtime (React 19 + Preact 10).",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.js",
@@ -42,6 +42,74 @@
42
42
  "require": "./dist/media.cjs",
43
43
  "types": "./dist/media.d.ts"
44
44
  },
45
+ "./react": {
46
+ "import": "./dist/react/index.js",
47
+ "require": "./dist/react/index.cjs",
48
+ "types": "./dist/react/index.d.ts"
49
+ },
50
+ "./react/progress": {
51
+ "import": "./dist/react/progress.js",
52
+ "require": "./dist/react/progress.cjs",
53
+ "types": "./dist/react/progress.d.ts"
54
+ },
55
+ "./react/input": {
56
+ "import": "./dist/react/input.js",
57
+ "require": "./dist/react/input.cjs",
58
+ "types": "./dist/react/input.d.ts"
59
+ },
60
+ "./react/display": {
61
+ "import": "./dist/react/display.js",
62
+ "require": "./dist/react/display.cjs",
63
+ "types": "./dist/react/display.d.ts"
64
+ },
65
+ "./react/artifacts": {
66
+ "import": "./dist/react/artifacts.js",
67
+ "require": "./dist/react/artifacts.cjs",
68
+ "types": "./dist/react/artifacts.d.ts"
69
+ },
70
+ "./react/confirmation": {
71
+ "import": "./dist/react/confirmation.js",
72
+ "require": "./dist/react/confirmation.cjs",
73
+ "types": "./dist/react/confirmation.d.ts"
74
+ },
75
+ "./react/media": {
76
+ "import": "./dist/react/media.js",
77
+ "require": "./dist/react/media.cjs",
78
+ "types": "./dist/react/media.d.ts"
79
+ },
80
+ "./preact": {
81
+ "import": "./dist/preact/index.js",
82
+ "types": "./dist/preact/index.d.ts"
83
+ },
84
+ "./preact/progress": {
85
+ "import": "./dist/preact/progress.js",
86
+ "types": "./dist/preact/progress.d.ts"
87
+ },
88
+ "./preact/input": {
89
+ "import": "./dist/preact/input.js",
90
+ "types": "./dist/preact/input.d.ts"
91
+ },
92
+ "./preact/display": {
93
+ "import": "./dist/preact/display.js",
94
+ "types": "./dist/preact/display.d.ts"
95
+ },
96
+ "./preact/artifacts": {
97
+ "import": "./dist/preact/artifacts.js",
98
+ "types": "./dist/preact/artifacts.d.ts"
99
+ },
100
+ "./preact/confirmation": {
101
+ "import": "./dist/preact/confirmation.js",
102
+ "types": "./dist/preact/confirmation.d.ts"
103
+ },
104
+ "./preact/media": {
105
+ "import": "./dist/preact/media.js",
106
+ "types": "./dist/preact/media.d.ts"
107
+ },
108
+ "./tokens": {
109
+ "import": "./dist/tokens.js",
110
+ "require": "./dist/tokens.cjs",
111
+ "types": "./dist/tokens.d.ts"
112
+ },
45
113
  "./server": {
46
114
  "import": "./dist/server.js",
47
115
  "require": "./dist/server.cjs",
@@ -57,6 +125,7 @@
57
125
  "sideEffects": false,
58
126
  "peerDependencies": {
59
127
  "@mcp-ui/client": "7.1.1",
128
+ "preact": "^10.25.0",
60
129
  "react": "^19.1.0",
61
130
  "react-dom": "^19.1.0",
62
131
  "react-i18next": "15.5.2",
@@ -66,6 +135,15 @@
66
135
  "@mcp-ui/client": {
67
136
  "optional": true
68
137
  },
138
+ "preact": {
139
+ "optional": true
140
+ },
141
+ "react": {
142
+ "optional": true
143
+ },
144
+ "react-dom": {
145
+ "optional": true
146
+ },
69
147
  "react-i18next": {
70
148
  "optional": true
71
149
  },
@@ -79,7 +157,8 @@
79
157
  "@tanstack/react-virtual": "3.13.6",
80
158
  "dompurify": "3.2.4",
81
159
  "marked": "15.0.7",
82
- "zod": "3.25.28"
160
+ "zod": "3.25.28",
161
+ "@vantageos/mosaic-tokens": "0.2.0"
83
162
  },
84
163
  "devDependencies": {
85
164
  "@babel/parser": "7.29.7",
@@ -102,6 +181,7 @@
102
181
  "@vitejs/plugin-react": "4.3.4",
103
182
  "@vitest/coverage-v8": "3.2.2",
104
183
  "jsdom": "26.0.0",
184
+ "preact": "10.27.1",
105
185
  "react": "19.1.0",
106
186
  "react-dom": "19.1.0",
107
187
  "size-limit": "11.2.0",
package/registry.yaml CHANGED
@@ -1,4 +1,4 @@
1
- version: "0.1.0"
1
+ version: "0.2.0"
2
2
  components:
3
3
  - name: ProgressBar
4
4
  category: progress