@marianmeres/design-tokens 1.0.0 → 1.0.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.
Files changed (66) hide show
  1. package/dist/generate.d.ts +1 -2
  2. package/dist/reboot-bridge.js +31 -27
  3. package/dist/themes/blue-orange.d.ts +1 -0
  4. package/dist/themes/blue-orange.js +1 -0
  5. package/dist/themes/cyan-red.d.ts +1 -0
  6. package/dist/themes/cyan-red.js +1 -0
  7. package/dist/themes/cyan-slate.d.ts +1 -0
  8. package/dist/themes/cyan-slate.js +1 -0
  9. package/dist/themes/emerald-amber-forest.d.ts +1 -0
  10. package/dist/themes/emerald-amber-forest.js +1 -0
  11. package/dist/themes/emerald-pink.d.ts +1 -0
  12. package/dist/themes/emerald-pink.js +1 -0
  13. package/dist/themes/fuchsia-emerald.d.ts +1 -0
  14. package/dist/themes/fuchsia-emerald.js +1 -0
  15. package/dist/themes/gray.d.ts +1 -0
  16. package/dist/themes/gray.js +1 -0
  17. package/dist/themes/indigo-amber.d.ts +1 -0
  18. package/dist/themes/indigo-amber.js +1 -0
  19. package/dist/themes/lime-fuchsia-neon.d.ts +1 -0
  20. package/dist/themes/lime-fuchsia-neon.js +1 -0
  21. package/dist/themes/mod.d.ts +1 -0
  22. package/dist/themes/monokai-cyan.d.ts +1 -0
  23. package/dist/themes/monokai-cyan.js +1 -0
  24. package/dist/themes/monokai-green.d.ts +1 -0
  25. package/dist/themes/monokai-green.js +1 -0
  26. package/dist/themes/monokai-pink.d.ts +1 -0
  27. package/dist/themes/monokai-pink.js +1 -0
  28. package/dist/themes/orange-pink-sunset.d.ts +1 -0
  29. package/dist/themes/orange-pink-sunset.js +1 -0
  30. package/dist/themes/pink-emerald.d.ts +1 -0
  31. package/dist/themes/pink-emerald.js +1 -0
  32. package/dist/themes/pink-teal.d.ts +1 -0
  33. package/dist/themes/pink-teal.js +1 -0
  34. package/dist/themes/purple-yellow.d.ts +1 -0
  35. package/dist/themes/purple-yellow.js +1 -0
  36. package/dist/themes/rainbow.d.ts +1 -0
  37. package/dist/themes/rainbow.js +1 -0
  38. package/dist/themes/red-blue.d.ts +1 -0
  39. package/dist/themes/red-blue.js +1 -0
  40. package/dist/themes/red-cyan.d.ts +1 -0
  41. package/dist/themes/red-cyan.js +1 -0
  42. package/dist/themes/red-sky-slate.d.ts +1 -0
  43. package/dist/themes/red-sky-slate.js +1 -0
  44. package/dist/themes/red-sky.d.ts +1 -0
  45. package/dist/themes/red-sky.js +1 -0
  46. package/dist/themes/rose-teal.d.ts +1 -0
  47. package/dist/themes/rose-teal.js +1 -0
  48. package/dist/themes/sky-amber.d.ts +1 -0
  49. package/dist/themes/sky-amber.js +1 -0
  50. package/dist/themes/slate-cyan.d.ts +1 -0
  51. package/dist/themes/slate-cyan.js +1 -0
  52. package/dist/themes/slate-teal-ocean.d.ts +1 -0
  53. package/dist/themes/slate-teal-ocean.js +1 -0
  54. package/dist/themes/stone-orange-earth.d.ts +1 -0
  55. package/dist/themes/stone-orange-earth.js +1 -0
  56. package/dist/themes/stone.d.ts +1 -0
  57. package/dist/themes/stone.js +1 -0
  58. package/dist/themes/teal-rose.d.ts +1 -0
  59. package/dist/themes/teal-rose.js +1 -0
  60. package/dist/themes/violet-lime.d.ts +1 -0
  61. package/dist/themes/violet-lime.js +1 -0
  62. package/dist/themes/violet-rose-dusk.d.ts +1 -0
  63. package/dist/themes/violet-rose-dusk.js +1 -0
  64. package/dist/themes/zinc.d.ts +1 -0
  65. package/dist/themes/zinc.js +1 -0
  66. package/package.json +1 -1
@@ -1,5 +1,4 @@
1
- import type { ColorPair, ColorValue, GeneratedTokens, SingleColor, ThemeSchema, TokenSchema } from "./types.js";
2
- export type { ColorPair, ColorValue, GeneratedTokens, SingleColor, ThemeSchema, TokenSchema, };
1
+ import type { GeneratedTokens, ThemeSchema, TokenSchema } from "./types.js";
3
2
  /**
4
3
  * Generate CSS token key-value pairs from a TokenSchema.
5
4
  *
@@ -21,50 +21,54 @@ import { hexToRgbTriplet } from "./utils.js";
21
21
  export function generateRebootBridge(tokens, prefix) {
22
22
  const bridge = {};
23
23
  const get = (key) => tokens[`${prefix}color-${key}`];
24
- // Helper: set a --bs-* var and optionally its -rgb triplet companion
25
- const set = (bsKey, value) => {
26
- if (value === undefined)
24
+ const ref = (key) => `var(--${prefix}color-${key})`;
25
+ // Helper: set a --bs-* var to a var() reference
26
+ const set = (bsKey, tokenKey) => {
27
+ if (get(tokenKey) === undefined)
27
28
  return;
28
- bridge[`bs-${bsKey}`] = value;
29
+ bridge[`bs-${bsKey}`] = ref(tokenKey);
29
30
  };
30
- const setWithRgb = (bsKey, value) => {
31
+ // Helper: set a --bs-* var to a var() reference and its -rgb companion
32
+ // to a raw triplet (CSS cannot derive r,g,b from a var() reference)
33
+ const setWithRgb = (bsKey, tokenKey) => {
34
+ const value = get(tokenKey);
31
35
  if (value === undefined)
32
36
  return;
33
- bridge[`bs-${bsKey}`] = value;
37
+ bridge[`bs-${bsKey}`] = ref(tokenKey);
34
38
  const triplet = hexToRgbTriplet(value);
35
39
  if (triplet)
36
40
  bridge[`bs-${bsKey}-rgb`] = triplet;
37
41
  };
38
42
  // Body
39
- setWithRgb("body-bg", get("background"));
40
- setWithRgb("body-color", get("background-foreground"));
43
+ setWithRgb("body-bg", "background");
44
+ setWithRgb("body-color", "background-foreground");
41
45
  // Links
42
- setWithRgb("link-color", get("primary"));
43
- set("link-decoration", undefined); // leave as reboot default
44
- // Link hover — use primary-hover token value
45
- const primaryHover = tokens[`${prefix}color-primary-hover`];
46
- if (primaryHover) {
47
- setWithRgb("link-hover-color", primaryHover);
46
+ setWithRgb("link-color", "primary");
47
+ // Link hover — use primary-hover token
48
+ if (tokens[`${prefix}color-primary-hover`]) {
49
+ bridge[`bs-link-hover-color`] = ref("primary-hover");
50
+ const triplet = hexToRgbTriplet(tokens[`${prefix}color-primary-hover`]);
51
+ if (triplet)
52
+ bridge[`bs-link-hover-color-rgb`] = triplet;
48
53
  }
49
54
  // Border
50
- set("border-color", get("border"));
55
+ set("border-color", "border");
51
56
  // Heading
52
- set("heading-color", get("background-foreground"));
57
+ set("heading-color", "background-foreground");
53
58
  // Code
54
- const accent = get("accent");
55
- if (accent)
56
- set("code-color", accent);
59
+ if (get("accent"))
60
+ set("code-color", "accent");
57
61
  // Semantic colors
58
- set("primary", get("primary"));
59
- set("danger", get("destructive"));
60
- set("warning", get("warning"));
61
- set("success", get("success"));
62
+ set("primary", "primary");
63
+ set("danger", "destructive");
64
+ set("warning", "warning");
65
+ set("success", "success");
62
66
  // Secondary (muted)
63
- set("secondary-color", get("muted-foreground"));
64
- set("secondary-bg", get("muted"));
67
+ set("secondary-color", "muted-foreground");
68
+ set("secondary-bg", "muted");
65
69
  // Highlight
66
- set("highlight-color", get("background-foreground"));
67
- set("highlight-bg", get("warning"));
70
+ set("highlight-color", "background-foreground");
71
+ set("highlight-bg", "warning");
68
72
  return bridge;
69
73
  }
70
74
  /**
@@ -1,3 +1,4 @@
1
1
  import type { ThemeSchema } from "../types.js";
2
2
  declare const theme: ThemeSchema;
3
+ /** Blue primary / orange accent theme. */
3
4
  export default theme;
@@ -114,4 +114,5 @@ const dark = {
114
114
  },
115
115
  };
116
116
  const theme = { light, dark };
117
+ /** Blue primary / orange accent theme. */
117
118
  export default theme;
@@ -1,3 +1,4 @@
1
1
  import type { ThemeSchema } from "../types.js";
2
2
  declare const theme: ThemeSchema;
3
+ /** Cyan primary / red accent theme. */
3
4
  export default theme;
@@ -114,4 +114,5 @@ const dark = {
114
114
  },
115
115
  };
116
116
  const theme = { light, dark };
117
+ /** Cyan primary / red accent theme. */
117
118
  export default theme;
@@ -1,3 +1,4 @@
1
1
  import type { ThemeSchema } from "../types.js";
2
2
  declare const theme: ThemeSchema;
3
+ /** Cyan primary / slate accent theme. */
3
4
  export default theme;
@@ -114,4 +114,5 @@ const dark = {
114
114
  },
115
115
  };
116
116
  const theme = { light, dark };
117
+ /** Cyan primary / slate accent theme. */
117
118
  export default theme;
@@ -1,3 +1,4 @@
1
1
  import type { ThemeSchema } from "../types.js";
2
2
  declare const theme: ThemeSchema;
3
+ /** Emerald primary / amber accent forest theme. */
3
4
  export default theme;
@@ -114,4 +114,5 @@ const dark = {
114
114
  },
115
115
  };
116
116
  const theme = { light, dark };
117
+ /** Emerald primary / amber accent forest theme. */
117
118
  export default theme;
@@ -1,3 +1,4 @@
1
1
  import type { ThemeSchema } from "../types.js";
2
2
  declare const theme: ThemeSchema;
3
+ /** Emerald primary / pink accent theme. */
3
4
  export default theme;
@@ -114,4 +114,5 @@ const dark = {
114
114
  },
115
115
  };
116
116
  const theme = { light, dark };
117
+ /** Emerald primary / pink accent theme. */
117
118
  export default theme;
@@ -1,3 +1,4 @@
1
1
  import type { ThemeSchema } from "../types.js";
2
2
  declare const theme: ThemeSchema;
3
+ /** Fuchsia primary / emerald accent theme. */
3
4
  export default theme;
@@ -114,4 +114,5 @@ const dark = {
114
114
  },
115
115
  };
116
116
  const theme = { light, dark };
117
+ /** Fuchsia primary / emerald accent theme. */
117
118
  export default theme;
@@ -1,3 +1,4 @@
1
1
  import type { ThemeSchema } from "../types.js";
2
2
  declare const theme: ThemeSchema;
3
+ /** Neutral gray monochrome theme. */
3
4
  export default theme;
@@ -63,4 +63,5 @@ const theme = {
63
63
  },
64
64
  },
65
65
  };
66
+ /** Neutral gray monochrome theme. */
66
67
  export default theme;
@@ -1,3 +1,4 @@
1
1
  import type { ThemeSchema } from "../types.js";
2
2
  declare const theme: ThemeSchema;
3
+ /** Indigo primary / amber accent theme. */
3
4
  export default theme;
@@ -114,4 +114,5 @@ const dark = {
114
114
  },
115
115
  };
116
116
  const theme = { light, dark };
117
+ /** Indigo primary / amber accent theme. */
117
118
  export default theme;
@@ -1,3 +1,4 @@
1
1
  import type { ThemeSchema } from "../types.js";
2
2
  declare const theme: ThemeSchema;
3
+ /** Lime primary / fuchsia accent neon theme. */
3
4
  export default theme;
@@ -114,4 +114,5 @@ const dark = {
114
114
  },
115
115
  };
116
116
  const theme = { light, dark };
117
+ /** Lime primary / fuchsia accent neon theme. */
117
118
  export default theme;
@@ -7,6 +7,7 @@
7
7
  *
8
8
  * @module
9
9
  */
10
+ /** A complete theme definition with required light mode and optional dark mode. */
10
11
  export type { ThemeSchema } from "../types.js";
11
12
  /** Blue primary / orange accent theme. */
12
13
  export { default as blueOrange } from "./blue-orange.js";
@@ -1,3 +1,4 @@
1
1
  import type { ThemeSchema } from "../types.js";
2
2
  declare const theme: ThemeSchema;
3
+ /** Monokai-inspired theme with cyan accent. */
3
4
  export default theme;
@@ -116,4 +116,5 @@ const dark = {
116
116
  },
117
117
  };
118
118
  const theme = { light, dark };
119
+ /** Monokai-inspired theme with cyan accent. */
119
120
  export default theme;
@@ -1,3 +1,4 @@
1
1
  import type { ThemeSchema } from "../types.js";
2
2
  declare const theme: ThemeSchema;
3
+ /** Monokai-inspired theme with green accent. */
3
4
  export default theme;
@@ -116,4 +116,5 @@ const dark = {
116
116
  },
117
117
  };
118
118
  const theme = { light, dark };
119
+ /** Monokai-inspired theme with green accent. */
119
120
  export default theme;
@@ -1,3 +1,4 @@
1
1
  import type { ThemeSchema } from "../types.js";
2
2
  declare const theme: ThemeSchema;
3
+ /** Monokai-inspired theme with pink accent. */
3
4
  export default theme;
@@ -116,4 +116,5 @@ const dark = {
116
116
  },
117
117
  };
118
118
  const theme = { light, dark };
119
+ /** Monokai-inspired theme with pink accent. */
119
120
  export default theme;
@@ -1,3 +1,4 @@
1
1
  import type { ThemeSchema } from "../types.js";
2
2
  declare const theme: ThemeSchema;
3
+ /** Orange primary / pink accent sunset theme. */
3
4
  export default theme;
@@ -114,4 +114,5 @@ const dark = {
114
114
  },
115
115
  };
116
116
  const theme = { light, dark };
117
+ /** Orange primary / pink accent sunset theme. */
117
118
  export default theme;
@@ -1,3 +1,4 @@
1
1
  import type { ThemeSchema } from "../types.js";
2
2
  declare const theme: ThemeSchema;
3
+ /** Pink primary / emerald accent theme. */
3
4
  export default theme;
@@ -114,4 +114,5 @@ const dark = {
114
114
  },
115
115
  };
116
116
  const theme = { light, dark };
117
+ /** Pink primary / emerald accent theme. */
117
118
  export default theme;
@@ -1,3 +1,4 @@
1
1
  import type { ThemeSchema } from "../types.js";
2
2
  declare const theme: ThemeSchema;
3
+ /** Pink primary / teal accent theme. */
3
4
  export default theme;
@@ -114,4 +114,5 @@ const dark = {
114
114
  },
115
115
  };
116
116
  const theme = { light, dark };
117
+ /** Pink primary / teal accent theme. */
117
118
  export default theme;
@@ -1,3 +1,4 @@
1
1
  import type { ThemeSchema } from "../types.js";
2
2
  declare const theme: ThemeSchema;
3
+ /** Purple primary / yellow accent theme. */
3
4
  export default theme;
@@ -114,4 +114,5 @@ const dark = {
114
114
  },
115
115
  };
116
116
  const theme = { light, dark };
117
+ /** Purple primary / yellow accent theme. */
117
118
  export default theme;
@@ -1,3 +1,4 @@
1
1
  import type { ThemeSchema } from "../types.js";
2
2
  declare const theme: ThemeSchema;
3
+ /** Multi-color rainbow theme. */
3
4
  export default theme;
@@ -119,4 +119,5 @@ const dark = {
119
119
  },
120
120
  };
121
121
  const theme = { light, dark };
122
+ /** Multi-color rainbow theme. */
122
123
  export default theme;
@@ -1,3 +1,4 @@
1
1
  import type { ThemeSchema } from "../types.js";
2
2
  declare const theme: ThemeSchema;
3
+ /** Red primary / blue accent theme. */
3
4
  export default theme;
@@ -114,4 +114,5 @@ const dark = {
114
114
  },
115
115
  };
116
116
  const theme = { light, dark };
117
+ /** Red primary / blue accent theme. */
117
118
  export default theme;
@@ -1,3 +1,4 @@
1
1
  import type { ThemeSchema } from "../types.js";
2
2
  declare const theme: ThemeSchema;
3
+ /** Red primary / cyan accent theme. */
3
4
  export default theme;
@@ -114,4 +114,5 @@ const dark = {
114
114
  },
115
115
  };
116
116
  const theme = { light, dark };
117
+ /** Red primary / cyan accent theme. */
117
118
  export default theme;
@@ -1,3 +1,4 @@
1
1
  import type { ThemeSchema } from "../types.js";
2
2
  declare const theme: ThemeSchema;
3
+ /** Red primary / sky accent / slate base theme. */
3
4
  export default theme;
@@ -114,4 +114,5 @@ const dark = {
114
114
  },
115
115
  };
116
116
  const theme = { light, dark };
117
+ /** Red primary / sky accent / slate base theme. */
117
118
  export default theme;
@@ -1,3 +1,4 @@
1
1
  import type { ThemeSchema } from "../types.js";
2
2
  declare const theme: ThemeSchema;
3
+ /** Red primary / sky accent theme. */
3
4
  export default theme;
@@ -114,4 +114,5 @@ const dark = {
114
114
  },
115
115
  };
116
116
  const theme = { light, dark };
117
+ /** Red primary / sky accent theme. */
117
118
  export default theme;
@@ -1,3 +1,4 @@
1
1
  import type { ThemeSchema } from "../types.js";
2
2
  declare const theme: ThemeSchema;
3
+ /** Rose primary / teal accent theme. */
3
4
  export default theme;
@@ -114,4 +114,5 @@ const dark = {
114
114
  },
115
115
  };
116
116
  const theme = { light, dark };
117
+ /** Rose primary / teal accent theme. */
117
118
  export default theme;
@@ -1,3 +1,4 @@
1
1
  import type { ThemeSchema } from "../types.js";
2
2
  declare const theme: ThemeSchema;
3
+ /** Sky primary / amber accent theme. */
3
4
  export default theme;
@@ -114,4 +114,5 @@ const dark = {
114
114
  },
115
115
  };
116
116
  const theme = { light, dark };
117
+ /** Sky primary / amber accent theme. */
117
118
  export default theme;
@@ -1,3 +1,4 @@
1
1
  import type { ThemeSchema } from "../types.js";
2
2
  declare const theme: ThemeSchema;
3
+ /** Slate primary / cyan accent theme. */
3
4
  export default theme;
@@ -114,4 +114,5 @@ const dark = {
114
114
  },
115
115
  };
116
116
  const theme = { light, dark };
117
+ /** Slate primary / cyan accent theme. */
117
118
  export default theme;
@@ -1,3 +1,4 @@
1
1
  import type { ThemeSchema } from "../types.js";
2
2
  declare const theme: ThemeSchema;
3
+ /** Slate primary / teal accent ocean theme. */
3
4
  export default theme;
@@ -114,4 +114,5 @@ const dark = {
114
114
  },
115
115
  };
116
116
  const theme = { light, dark };
117
+ /** Slate primary / teal accent ocean theme. */
117
118
  export default theme;
@@ -1,3 +1,4 @@
1
1
  import type { ThemeSchema } from "../types.js";
2
2
  declare const theme: ThemeSchema;
3
+ /** Stone primary / orange accent earth theme. */
3
4
  export default theme;
@@ -114,4 +114,5 @@ const dark = {
114
114
  },
115
115
  };
116
116
  const theme = { light, dark };
117
+ /** Stone primary / orange accent earth theme. */
117
118
  export default theme;
@@ -1,3 +1,4 @@
1
1
  import type { ThemeSchema } from "../types.js";
2
2
  declare const theme: ThemeSchema;
3
+ /** Neutral stone monochrome theme. */
3
4
  export default theme;
@@ -69,4 +69,5 @@ const theme = {
69
69
  },
70
70
  },
71
71
  };
72
+ /** Neutral stone monochrome theme. */
72
73
  export default theme;
@@ -1,3 +1,4 @@
1
1
  import type { ThemeSchema } from "../types.js";
2
2
  declare const theme: ThemeSchema;
3
+ /** Teal primary / rose accent theme. */
3
4
  export default theme;
@@ -114,4 +114,5 @@ const dark = {
114
114
  },
115
115
  };
116
116
  const theme = { light, dark };
117
+ /** Teal primary / rose accent theme. */
117
118
  export default theme;
@@ -1,3 +1,4 @@
1
1
  import type { ThemeSchema } from "../types.js";
2
2
  declare const theme: ThemeSchema;
3
+ /** Violet primary / lime accent theme. */
3
4
  export default theme;
@@ -114,4 +114,5 @@ const dark = {
114
114
  },
115
115
  };
116
116
  const theme = { light, dark };
117
+ /** Violet primary / lime accent theme. */
117
118
  export default theme;
@@ -1,3 +1,4 @@
1
1
  import type { ThemeSchema } from "../types.js";
2
2
  declare const theme: ThemeSchema;
3
+ /** Violet primary / rose accent dusk theme. */
3
4
  export default theme;
@@ -114,4 +114,5 @@ const dark = {
114
114
  },
115
115
  };
116
116
  const theme = { light, dark };
117
+ /** Violet primary / rose accent dusk theme. */
117
118
  export default theme;
@@ -1,3 +1,4 @@
1
1
  import type { ThemeSchema } from "../types.js";
2
2
  declare const theme: ThemeSchema;
3
+ /** Neutral zinc monochrome theme. */
3
4
  export default theme;
@@ -63,4 +63,5 @@ const theme = {
63
63
  },
64
64
  },
65
65
  };
66
+ /** Neutral zinc monochrome theme. */
66
67
  export default theme;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marianmeres/design-tokens",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "type": "module",
5
5
  "main": "dist/mod.js",
6
6
  "types": "dist/mod.d.ts",