@epilot/spark-ui 0.11.1 → 0.12.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 (139) hide show
  1. package/dist/components/accordion.cjs +1 -1
  2. package/dist/components/accordion.js +1 -1
  3. package/dist/components/attachment.d.cts +1 -1
  4. package/dist/components/attachment.d.ts +1 -1
  5. package/dist/components/avatar.d.cts +1 -1
  6. package/dist/components/avatar.d.ts +1 -1
  7. package/dist/components/badge.d.cts +1 -1
  8. package/dist/components/badge.d.ts +1 -1
  9. package/dist/components/bar-chart.js +1 -1
  10. package/dist/components/box.cjs +3 -2
  11. package/dist/components/box.cjs.map +1 -1
  12. package/dist/components/box.d.cts +8 -1
  13. package/dist/components/box.d.ts +8 -1
  14. package/dist/components/box.js +3 -2
  15. package/dist/components/box.js.map +1 -1
  16. package/dist/components/bubble.d.cts +1 -1
  17. package/dist/components/bubble.d.ts +1 -1
  18. package/dist/components/button-group.d.cts +1 -1
  19. package/dist/components/button-group.d.ts +1 -1
  20. package/dist/components/button.d.cts +3 -3
  21. package/dist/components/button.d.ts +3 -3
  22. package/dist/components/calendar.cjs +2 -2
  23. package/dist/components/calendar.cjs.map +1 -1
  24. package/dist/components/calendar.js +2 -2
  25. package/dist/components/calendar.js.map +1 -1
  26. package/dist/components/callout.cjs +1 -1
  27. package/dist/components/callout.cjs.map +1 -1
  28. package/dist/components/callout.d.cts +2 -2
  29. package/dist/components/callout.d.ts +2 -2
  30. package/dist/components/callout.js +1 -1
  31. package/dist/components/callout.js.map +1 -1
  32. package/dist/components/card.cjs +3 -2
  33. package/dist/components/card.cjs.map +1 -1
  34. package/dist/components/card.d.cts +7 -1
  35. package/dist/components/card.d.ts +7 -1
  36. package/dist/components/card.js +3 -2
  37. package/dist/components/card.js.map +1 -1
  38. package/dist/components/checkbox.d.cts +1 -1
  39. package/dist/components/checkbox.d.ts +1 -1
  40. package/dist/components/field.d.cts +1 -1
  41. package/dist/components/field.d.ts +1 -1
  42. package/dist/components/icon.cjs +1 -1
  43. package/dist/components/icon.js +1 -1
  44. package/dist/components/info-block.d.cts +1 -1
  45. package/dist/components/info-block.d.ts +1 -1
  46. package/dist/components/input-group.cjs +1 -1
  47. package/dist/components/input-group.cjs.map +1 -1
  48. package/dist/components/input-group.js +1 -1
  49. package/dist/components/input-group.js.map +1 -1
  50. package/dist/components/input-otp.cjs +1 -1
  51. package/dist/components/input-otp.js +1 -1
  52. package/dist/components/input.cjs +1 -1
  53. package/dist/components/input.d.cts +1 -1
  54. package/dist/components/input.d.ts +1 -1
  55. package/dist/components/input.js +1 -1
  56. package/dist/components/line-chart.cjs +1 -1
  57. package/dist/components/line-chart.js +2 -2
  58. package/dist/components/list.d.cts +1 -1
  59. package/dist/components/list.d.ts +1 -1
  60. package/dist/components/page-header.d.cts +1 -1
  61. package/dist/components/page-header.d.ts +1 -1
  62. package/dist/components/pill.cjs +20 -13
  63. package/dist/components/pill.cjs.map +1 -1
  64. package/dist/components/pill.d.cts +1 -1
  65. package/dist/components/pill.d.ts +1 -1
  66. package/dist/components/pill.js +20 -13
  67. package/dist/components/pill.js.map +1 -1
  68. package/dist/components/power-history-chart.cjs +1 -1
  69. package/dist/components/power-history-chart.js +2 -2
  70. package/dist/components/progress.cjs +1 -1
  71. package/dist/components/progress.cjs.map +1 -1
  72. package/dist/components/progress.js +1 -1
  73. package/dist/components/progress.js.map +1 -1
  74. package/dist/components/radio-card-group.cjs.map +1 -1
  75. package/dist/components/radio-card-group.js.map +1 -1
  76. package/dist/components/radio.d.cts +1 -1
  77. package/dist/components/radio.d.ts +1 -1
  78. package/dist/components/schedule-list.cjs +10 -7
  79. package/dist/components/schedule-list.cjs.map +1 -1
  80. package/dist/components/schedule-list.js +10 -7
  81. package/dist/components/schedule-list.js.map +1 -1
  82. package/dist/components/segmented-control.d.cts +1 -1
  83. package/dist/components/segmented-control.d.ts +1 -1
  84. package/dist/components/select.cjs +1 -1
  85. package/dist/components/select.d.cts +1 -1
  86. package/dist/components/select.d.ts +1 -1
  87. package/dist/components/select.js +1 -1
  88. package/dist/components/solar-forecast-chart.cjs +1 -1
  89. package/dist/components/solar-forecast-chart.js +2 -2
  90. package/dist/components/switch.d.cts +1 -1
  91. package/dist/components/switch.d.ts +1 -1
  92. package/dist/components/textarea.cjs +1 -1
  93. package/dist/components/textarea.d.cts +1 -1
  94. package/dist/components/textarea.d.ts +1 -1
  95. package/dist/components/textarea.js +1 -1
  96. package/dist/components/theme.cjs +18 -6
  97. package/dist/components/theme.cjs.map +1 -1
  98. package/dist/components/theme.d.cts +16 -2
  99. package/dist/components/theme.d.ts +16 -2
  100. package/dist/components/theme.js +19 -7
  101. package/dist/components/theme.js.map +1 -1
  102. package/dist/{generate-radix-colors-Bw-RYaV4.d.ts → generate-radix-colors-BY4Wjsm7.d.cts} +4 -2
  103. package/dist/{generate-radix-colors-Bw-RYaV4.d.cts → generate-radix-colors-BY4Wjsm7.d.ts} +4 -2
  104. package/dist/icons/material-symbol.cjs +1 -1
  105. package/dist/icons/material-symbol.cjs.map +1 -1
  106. package/dist/icons/material-symbol.js +1 -1
  107. package/dist/icons/material-symbol.js.map +1 -1
  108. package/dist/lib/accent-theme.cjs +367 -16
  109. package/dist/lib/accent-theme.cjs.map +1 -1
  110. package/dist/lib/accent-theme.d.cts +75 -6
  111. package/dist/lib/accent-theme.d.ts +75 -6
  112. package/dist/lib/accent-theme.js +365 -18
  113. package/dist/lib/accent-theme.js.map +1 -1
  114. package/dist/lib/container-chrome.cjs +9 -7
  115. package/dist/lib/container-chrome.cjs.map +1 -1
  116. package/dist/lib/container-chrome.d.cts +4 -3
  117. package/dist/lib/container-chrome.d.ts +4 -3
  118. package/dist/lib/container-chrome.js +9 -8
  119. package/dist/lib/container-chrome.js.map +1 -1
  120. package/dist/lib/generate-radix-colors.cjs +7 -0
  121. package/dist/lib/generate-radix-colors.cjs.map +1 -1
  122. package/dist/lib/generate-radix-colors.d.cts +2 -2
  123. package/dist/lib/generate-radix-colors.d.ts +2 -2
  124. package/dist/lib/generate-radix-colors.js +6 -1
  125. package/dist/lib/generate-radix-colors.js.map +1 -1
  126. package/dist/lib/input-box-variants.d.cts +1 -1
  127. package/dist/lib/input-box-variants.d.ts +1 -1
  128. package/dist/lib/theme-types.cjs +19 -0
  129. package/dist/lib/theme-types.cjs.map +1 -0
  130. package/dist/lib/theme-types.d.cts +2 -2
  131. package/dist/lib/theme-types.d.ts +2 -2
  132. package/dist/lib/theme-types.js +17 -1
  133. package/dist/lib/theme-types.js.map +1 -0
  134. package/dist/styles/material-symbol.css +3 -0
  135. package/dist/styles/spark-default.css +148 -0
  136. package/dist/styles/utilities.css +9 -8
  137. package/dist/{theme-types-1yB0d8mp.d.ts → theme-types-Bn5E15-P.d.cts} +12 -3
  138. package/dist/{theme-types-1yB0d8mp.d.cts → theme-types-Bn5E15-P.d.ts} +12 -3
  139. package/package.json +113 -55
@@ -1,2 +1,18 @@
1
1
  "use client";
2
- export {};
2
+ //#region src/lib/theme-types.ts
3
+ /** The 6 curated Radix gray families — the only values `getMatchingNeutral` ever returns. */
4
+ const SPARK_NEUTRAL_FAMILIES = [
5
+ "slate",
6
+ "mauve",
7
+ "gray",
8
+ "sage",
9
+ "olive",
10
+ "sand"
11
+ ];
12
+ function isSparkNeutralFamily(value) {
13
+ return SPARK_NEUTRAL_FAMILIES.includes(value);
14
+ }
15
+ //#endregion
16
+ export { SPARK_NEUTRAL_FAMILIES, isSparkNeutralFamily };
17
+
18
+ //# sourceMappingURL=theme-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme-types.js","names":[],"sources":["../../src/lib/theme-types.ts"],"sourcesContent":["/** The 6 curated Radix gray families — the only values `getMatchingNeutral` ever returns. */\nexport const SPARK_NEUTRAL_FAMILIES = [\n 'slate',\n 'mauve',\n 'gray',\n 'sage',\n 'olive',\n 'sand',\n] as const\nexport type SparkNeutralFamily = (typeof SPARK_NEUTRAL_FAMILIES)[number]\nexport function isSparkNeutralFamily(\n value: string,\n): value is SparkNeutralFamily {\n return (SPARK_NEUTRAL_FAMILIES as readonly string[]).includes(value)\n}\n\n/**\n * `'auto'` pairs a neutral automatically; one of the 6 curated families picks it by\n * name; any other string is a literal color seed (regenerated against `backgroundColor`\n * exactly like a custom family — see `resolveAutoNeutral`/`generateAccentScale`).\n */\nexport type SparkNeutral = 'auto' | SparkNeutralFamily | (string & {})\nexport type SparkRadius = 'none' | 'small' | 'medium' | 'large' | 'full'\nexport type SparkScaling = '90%' | '95%' | '100%' | '105%' | '110%'\nexport type SparkSpacing = 'dense' | 'default' | 'roomy'\nexport type SparkStyle = 'solid' | 'soft' | 'surface' | 'ghost' | 'outline'\n/**\n * Card chrome variants. `solid` pairs the neutral scale's own background/text\n * extremes (`--neutral-1` fill, `--neutral-12` ink) — the same pairing Radix\n * guarantees stays AA-compliant in both light and dark, so it needs no fixed\n * (non-appearance-tracking) override the way accent's solid ink does.\n */\nexport type SparkCardVariant = SparkStyle\n/**\n * Card container chrome palette. `neutral` (default) paints through the app\n * theme's neutral scale, so a card inherits the configured neutral colour;\n * `accent` tints the card's private mini-scale with the brand accent (chrome\n * only — never the content controls inside). Open union: grows into feedback\n * colours / custom palettes later.\n */\nexport type SparkCardColor = 'neutral' | 'accent'\nexport type SparkLabelPosition = 'outset' | 'inset'\nexport type SparkInputStyle = 'soft' | 'surface' | 'outlined' | 'ghost'\nexport type SparkInputColor = 'brand' | 'gray'\n"],"mappings":";;;AACA,MAAa,yBAAyB;CACpC;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,SAAgB,qBACd,OAC6B;CAC7B,OAAQ,uBAA6C,SAAS,KAAK;AACrE"}
@@ -18,5 +18,8 @@
18
18
  'wght' 400,
19
19
  'GRAD' 0,
20
20
  'opsz' 20;
21
+ width: 1em;
22
+ height: 1em;
23
+ overflow: hidden;
21
24
  }
22
25
  }
@@ -65,6 +65,21 @@
65
65
  scales don't define them (portal parity: ECP's generator used #fff). */
66
66
  --white-contrast: #ffffff;
67
67
  --black-contrast: #ffffff;
68
+
69
+ /* Elevation — an orthogonal container axis (Card/Box `elevated`), not a variant.
70
+ 1 = raised card, 2 = popover/toast, 3 = dialog/select/menu/sheet. Values match
71
+ Tailwind's own shadow-sm/md/lg so a future migration of those is pixel-identical. */
72
+ --spark-shadow-1:
73
+ 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
74
+ --spark-shadow-2:
75
+ 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
76
+ --spark-shadow-3:
77
+ 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
78
+ /* The opaque surface a lifted container sits on — --neutral-1, the same fill every
79
+ floating surface (dialog/popover/sheet/toast) already uses. Deliberately not
80
+ --spark-background: that's an alpha-ramp compositing constant, not a surface (it's
81
+ brand blue under [data-inverted]), so a card bound to it would tint unexpectedly. */
82
+ --spark-elevated: var(--neutral-1);
68
83
  }
69
84
 
70
85
  @supports (color: color(display-p3 1 1 1)) {
@@ -155,6 +170,23 @@
155
170
  --neutral-contrast: var(--neutral-12);
156
171
  --neutral-on-solid: #fff;
157
172
  --neutral-surface: var(--neutral-2);
173
+
174
+ /* Elevation, dark: shadow barely reads on a dark canvas, so a leading OPAQUE
175
+ hairline ring (not the translucent --neutral-a*, which would tint against
176
+ whatever backdrop sits behind it) is what actually defines the edge. */
177
+ --spark-shadow-1:
178
+ 0 0 0 1px var(--neutral-6), 0 1px 3px 0 rgb(0 0 0 / 0.3),
179
+ 0 1px 2px -1px rgb(0 0 0 / 0.3);
180
+ --spark-shadow-2:
181
+ 0 0 0 1px var(--neutral-6), 0 4px 6px -1px rgb(0 0 0 / 0.4),
182
+ 0 2px 4px -2px rgb(0 0 0 / 0.4);
183
+ --spark-shadow-3:
184
+ 0 0 0 1px var(--neutral-6), 0 10px 15px -3px rgb(0 0 0 / 0.5),
185
+ 0 4px 6px -4px rgb(0 0 0 / 0.5);
186
+ /* --neutral-1 is one step above the contract-mandated pure #000 canvas
187
+ (#111113) — not enough headroom alone. --neutral-2 (#18191b) raises the
188
+ surface a further step, the same value Radix Themes' own dark panels use. */
189
+ --spark-elevated: var(--neutral-2);
158
190
  }
159
191
 
160
192
  @supports (color: color(display-p3 1 1 1)) {
@@ -882,6 +914,122 @@
882
914
  --spark-style-border: var(--spark-a11);
883
915
  }
884
916
 
917
+ /*
918
+ * Inverted — an ORTHOGONAL modifier, sibling to [data-high-contrast], for controls sitting
919
+ * ON a solid accent surface (a `<Card variant="solid" color="accent">`). There, a solid
920
+ * control paints the same --spark-9 as the card and vanishes.
921
+ *
922
+ * Unlike high-contrast, this needs NO per-style rules: it re-points the accent scale itself
923
+ * (the [data-accent-color] pattern), so all five [data-style] recipes — and their
924
+ * high-contrast variants — re-colour from it for free. One block instead of styles × modifiers.
925
+ *
926
+ * Step 9 swaps with its contrast ink, which makes the solid pair safe by construction:
927
+ * --spark-contrast is already the WCAG-checked ink for step 9.
928
+ *
929
+ * Fills (1-5) then run the OTHER way — toward the scrim, the lightness pole opposite the
930
+ * ink — because the ink is also the text colour, so a fill blended toward it drags the
931
+ * background into the foreground. Borders (6-8) keep stepping toward the ink from a solved
932
+ * 3:1 floor; a scrim-side border can't clear 1.4.11 on light accents. Measured across all
933
+ * 13 curated accents: text 4.81:1 worst case, borders 3.01:1 worst case.
934
+ *
935
+ * No `.dark` twin: the generator pins step 9 to the accent itself, so the surface — and
936
+ * therefore this whole scale — is identical in both appearances.
937
+ *
938
+ * Literals, not var(--spark-N) aliases: a scale can't re-point to itself without a cycle.
939
+ * These are the DEFAULT accent's values; <Theme accentColor inverted> emits its own inline.
940
+ */
941
+ [data-inverted] {
942
+ --spark-1: #0059aa;
943
+ --spark-2: #0053a0;
944
+ --spark-3: #004c93;
945
+ --spark-4: #014482;
946
+ --spark-5: #013b71;
947
+ --spark-6: #8cb6dd;
948
+ --spark-7: #afcce7;
949
+ --spark-8: #d1e2f2;
950
+ --spark-9: #fff;
951
+ --spark-10: #e0ecf6;
952
+ --spark-11: #fff;
953
+ --spark-12: #fff;
954
+ --spark-a1: #02060d0f;
955
+ --spark-a2: #02060d1f;
956
+ --spark-a3: #02060d33;
957
+ --spark-a4: #02060d4d;
958
+ --spark-a5: #02060d66;
959
+ --spark-a6: #ffffff8c;
960
+ --spark-a7: #ffffffaf;
961
+ --spark-a8: #ffffffd1;
962
+ --spark-a9: #fff;
963
+ --spark-a10: #ffffffe0;
964
+ --spark-a11: #fff;
965
+ --spark-a12: #fff;
966
+ --spark-contrast: #005eb4;
967
+ --spark-on-solid: #005eb4;
968
+ --spark-surface: #0053a0;
969
+ --spark-background: #005eb4;
970
+ --spark-indicator: #fff;
971
+ --spark-track: #fff;
972
+ }
973
+
974
+ @supports (color: color(display-p3 1 1 1)) {
975
+ @media (color-gamut: p3) {
976
+ [data-inverted] {
977
+ --spark-1: oklch(46.7% 0.1487 254);
978
+ --spark-2: oklch(44.7% 0.1418 253.9);
979
+ --spark-3: oklch(42% 0.1324 253.8);
980
+ --spark-4: oklch(38.7% 0.1204 253.5);
981
+ --spark-5: oklch(35.2% 0.1082 253.2);
982
+ --spark-6: oklch(76.1% 0.0722 246.5);
983
+ --spark-7: oklch(83.3% 0.0498 246.1);
984
+ --spark-8: oklch(90.5% 0.0279 245.7);
985
+ --spark-9: oklch(100% 0 none);
986
+ --spark-10: oklch(93.7% 0.0185 245.6);
987
+ --spark-11: oklch(100% 0 none);
988
+ --spark-12: oklch(100% 0 none);
989
+ --spark-a1: color(display-p3 0.0118 0.0229 0.0479 / 0.06);
990
+ --spark-a2: color(display-p3 0.0118 0.0229 0.0479 / 0.12);
991
+ --spark-a3: color(display-p3 0.0118 0.0229 0.0479 / 0.2);
992
+ --spark-a4: color(display-p3 0.0118 0.0229 0.0479 / 0.3);
993
+ --spark-a5: color(display-p3 0.0118 0.0229 0.0479 / 0.4);
994
+ --spark-a6: color(display-p3 1 1 1 / 0.5487);
995
+ --spark-a7: color(display-p3 1 1 1 / 0.6843);
996
+ --spark-a8: color(display-p3 1 1 1 / 0.82);
997
+ --spark-a9: color(display-p3 1 1 1);
998
+ --spark-a10: color(display-p3 1 1 1 / 0.88);
999
+ --spark-a11: color(display-p3 1 1 1);
1000
+ --spark-a12: color(display-p3 1 1 1);
1001
+ --spark-contrast: #005eb4;
1002
+ --spark-on-solid: #005eb4;
1003
+ --spark-surface: oklch(44.7% 0.1418 253.9);
1004
+ --spark-background: #005eb4;
1005
+ --spark-indicator: oklch(100% 0 none);
1006
+ --spark-track: oklch(100% 0 none);
1007
+ }
1008
+ }
1009
+ }
1010
+
1011
+ /*
1012
+ * An accent Card/Box nested inside [data-inverted] (task 16): soft/surface/outline/
1013
+ * ghost fill from --spark-card-c-soft/-surface/-border, which read the accent scale
1014
+ * and DO swing to the inverted extreme — but --spark-card-fg/-fg-muted stay hardcoded
1015
+ * to --neutral-a12/-a11, because the normal (non-inverted) accent surface/soft fill is
1016
+ * always a gentle Radix pastel, safe under neutral ink by construction. Inverted fills
1017
+ * are not gentle — they're the same scrim/ink extremes invertAccentScale swaps in for
1018
+ * controls — so the neutral-ink assumption breaks (measured 1.92–2.14:1). Re-pointing
1019
+ * the ink to the accent scale here restores the exact pairing invertAccentScale already
1020
+ * guarantees (measured 4.81–8.55:1 across the curated set) — the same fix `solid`
1021
+ * already has for free, since its fg is accent-derived (--spark-card-c-contrast) to
1022
+ * begin with. `solid` itself is untouched: its own utility-layer override
1023
+ * ([--spark-card-fg:...] in container-chrome.ts) always outranks this components-layer
1024
+ * rule regardless of selector specificity (AGENTS.md, "utilities beat components").
1025
+ * --spark-card-icon already reads --spark-a11 unconditionally (all colours), so it
1026
+ * needs no override here.
1027
+ */
1028
+ :where([data-inverted] [data-card-color='accent']) {
1029
+ --spark-card-fg: var(--spark-a12);
1030
+ --spark-card-fg-muted: var(--spark-a11);
1031
+ }
1032
+
885
1033
  /*
886
1034
  * Switch ON-track intensity (Radix-aligned). Unlike a checkbox (fill varies
887
1035
  * per style), a switch's "on" needs a visibly filled track — so it reads
@@ -511,6 +511,15 @@
511
511
  &:where([dir='rtl'], [dir='rtl'] *) {
512
512
  animation-direction: reverse;
513
513
  }
514
+
515
+ /* Gated inside the utility, not as a separate `.shimmer` rule: a variant-scoped
516
+ application (attachment's `group-data-[state=uploading]:shimmer`) emits a
517
+ different class, which an outer `.shimmer` selector never matches. */
518
+ @media (prefers-reduced-motion: reduce) {
519
+ animation: none;
520
+ background-image: none;
521
+ -webkit-text-fill-color: currentColor;
522
+ }
514
523
  }
515
524
 
516
525
  @utility shimmer-once {
@@ -547,11 +556,3 @@
547
556
  @utility shimmer-angle-* {
548
557
  --shimmer-angle: calc(--value(integer) * 1deg);
549
558
  }
550
-
551
- @media (prefers-reduced-motion: reduce) {
552
- .shimmer {
553
- animation: none;
554
- background-image: none;
555
- -webkit-text-fill-color: currentColor;
556
- }
557
- }
@@ -1,7 +1,16 @@
1
1
  "use client";
2
2
 
3
3
  //#region src/lib/theme-types.d.ts
4
- type SparkNeutral = 'auto' | 'slate' | 'mauve' | 'gray' | 'sage' | 'olive' | 'sand';
4
+ /** The 6 curated Radix gray families — the only values `getMatchingNeutral` ever returns. */
5
+ declare const SPARK_NEUTRAL_FAMILIES: readonly ["slate", "mauve", "gray", "sage", "olive", "sand"];
6
+ type SparkNeutralFamily = (typeof SPARK_NEUTRAL_FAMILIES)[number];
7
+ declare function isSparkNeutralFamily(value: string): value is SparkNeutralFamily;
8
+ /**
9
+ * `'auto'` pairs a neutral automatically; one of the 6 curated families picks it by
10
+ * name; any other string is a literal color seed (regenerated against `backgroundColor`
11
+ * exactly like a custom family — see `resolveAutoNeutral`/`generateAccentScale`).
12
+ */
13
+ type SparkNeutral = 'auto' | SparkNeutralFamily | (string & {});
5
14
  type SparkRadius = 'none' | 'small' | 'medium' | 'large' | 'full';
6
15
  type SparkScaling = '90%' | '95%' | '100%' | '105%' | '110%';
7
16
  type SparkSpacing = 'dense' | 'default' | 'roomy';
@@ -25,5 +34,5 @@ type SparkLabelPosition = 'outset' | 'inset';
25
34
  type SparkInputStyle = 'soft' | 'surface' | 'outlined' | 'ghost';
26
35
  type SparkInputColor = 'brand' | 'gray';
27
36
  //#endregion
28
- export { SparkLabelPosition as a, SparkScaling as c, SparkInputStyle as i, SparkSpacing as l, SparkCardVariant as n, SparkNeutral as o, SparkInputColor as r, SparkRadius as s, SparkCardColor as t, SparkStyle as u };
29
- //# sourceMappingURL=theme-types-1yB0d8mp.d.ts.map
37
+ export { SparkInputStyle as a, SparkNeutralFamily as c, SparkSpacing as d, SparkStyle as f, SparkInputColor as i, SparkRadius as l, SparkCardColor as n, SparkLabelPosition as o, isSparkNeutralFamily as p, SparkCardVariant as r, SparkNeutral as s, SPARK_NEUTRAL_FAMILIES as t, SparkScaling as u };
38
+ //# sourceMappingURL=theme-types-Bn5E15-P.d.cts.map
@@ -1,7 +1,16 @@
1
1
  "use client";
2
2
 
3
3
  //#region src/lib/theme-types.d.ts
4
- type SparkNeutral = 'auto' | 'slate' | 'mauve' | 'gray' | 'sage' | 'olive' | 'sand';
4
+ /** The 6 curated Radix gray families — the only values `getMatchingNeutral` ever returns. */
5
+ declare const SPARK_NEUTRAL_FAMILIES: readonly ["slate", "mauve", "gray", "sage", "olive", "sand"];
6
+ type SparkNeutralFamily = (typeof SPARK_NEUTRAL_FAMILIES)[number];
7
+ declare function isSparkNeutralFamily(value: string): value is SparkNeutralFamily;
8
+ /**
9
+ * `'auto'` pairs a neutral automatically; one of the 6 curated families picks it by
10
+ * name; any other string is a literal color seed (regenerated against `backgroundColor`
11
+ * exactly like a custom family — see `resolveAutoNeutral`/`generateAccentScale`).
12
+ */
13
+ type SparkNeutral = 'auto' | SparkNeutralFamily | (string & {});
5
14
  type SparkRadius = 'none' | 'small' | 'medium' | 'large' | 'full';
6
15
  type SparkScaling = '90%' | '95%' | '100%' | '105%' | '110%';
7
16
  type SparkSpacing = 'dense' | 'default' | 'roomy';
@@ -25,5 +34,5 @@ type SparkLabelPosition = 'outset' | 'inset';
25
34
  type SparkInputStyle = 'soft' | 'surface' | 'outlined' | 'ghost';
26
35
  type SparkInputColor = 'brand' | 'gray';
27
36
  //#endregion
28
- export { SparkLabelPosition as a, SparkScaling as c, SparkInputStyle as i, SparkSpacing as l, SparkCardVariant as n, SparkNeutral as o, SparkInputColor as r, SparkRadius as s, SparkCardColor as t, SparkStyle as u };
29
- //# sourceMappingURL=theme-types-1yB0d8mp.d.cts.map
37
+ export { SparkInputStyle as a, SparkNeutralFamily as c, SparkSpacing as d, SparkStyle as f, SparkInputColor as i, SparkRadius as l, SparkCardColor as n, SparkLabelPosition as o, isSparkNeutralFamily as p, SparkCardVariant as r, SparkNeutral as s, SPARK_NEUTRAL_FAMILIES as t, SparkScaling as u };
38
+ //# sourceMappingURL=theme-types-Bn5E15-P.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/spark-ui",
3
- "version": "0.11.1",
3
+ "version": "0.12.0",
4
4
  "description": "React UI component library from Spark SDK",
5
5
  "homepage": "https://spark-ui.epilot.io/docs/ui",
6
6
  "license": "Apache-2.0",
@@ -21,89 +21,147 @@
21
21
  "**/*.css"
22
22
  ],
23
23
  "exports": {
24
- "./styles": "./dist/styles/index.css",
25
- "./spark-default": "./dist/styles/spark-default.css",
24
+ "./styles": {
25
+ "development": "./src/styles/index.css",
26
+ "default": "./dist/styles/index.css"
27
+ },
28
+ "./spark-default": {
29
+ "development": "./src/styles/spark-default.css",
30
+ "default": "./dist/styles/spark-default.css"
31
+ },
26
32
  "./utils/*": {
27
- "types": "./dist/utils/*.d.ts",
33
+ "types": {
34
+ "development": "./src/utils/*.ts",
35
+ "default": "./dist/utils/*.d.ts"
36
+ },
37
+ "development": "./src/utils/*.ts",
28
38
  "default": "./dist/utils/*.js"
29
39
  },
30
40
  "./hooks/*": {
31
- "types": "./dist/hooks/*.d.ts",
41
+ "types": {
42
+ "development": "./src/hooks/*.ts",
43
+ "default": "./dist/hooks/*.d.ts"
44
+ },
45
+ "development": "./src/hooks/*.ts",
32
46
  "default": "./dist/hooks/*.js"
33
47
  },
34
48
  "./icons": {
35
- "types": "./dist/icons/index.d.ts",
49
+ "types": {
50
+ "development": "./src/icons/index.tsx",
51
+ "default": "./dist/icons/index.d.ts"
52
+ },
53
+ "development": "./src/icons/index.tsx",
36
54
  "default": "./dist/icons/index.js"
37
55
  },
38
56
  "./icons/*": {
39
- "types": "./dist/icons/*.d.ts",
57
+ "types": {
58
+ "development": "./src/icons/*.tsx",
59
+ "default": "./dist/icons/*.d.ts"
60
+ },
61
+ "development": "./src/icons/*.tsx",
40
62
  "default": "./dist/icons/*.js"
41
63
  },
42
64
  "./lib/*": {
43
- "types": "./dist/lib/*.d.ts",
65
+ "types": {
66
+ "development": "./src/lib/*.ts",
67
+ "default": "./dist/lib/*.d.ts"
68
+ },
69
+ "development": "./src/lib/*.ts",
44
70
  "default": "./dist/lib/*.js"
45
71
  },
46
72
  "./*": {
47
- "types": "./dist/components/*.d.ts",
73
+ "types": {
74
+ "development": "./src/components/*.tsx",
75
+ "default": "./dist/components/*.d.ts"
76
+ },
77
+ "development": "./src/components/*.tsx",
48
78
  "default": "./dist/components/*.js"
49
79
  }
50
80
  },
51
81
  "publishConfig": {
82
+ "exports": {
83
+ "./styles": "./dist/styles/index.css",
84
+ "./spark-default": "./dist/styles/spark-default.css",
85
+ "./utils/*": {
86
+ "types": "./dist/utils/*.d.ts",
87
+ "default": "./dist/utils/*.js"
88
+ },
89
+ "./hooks/*": {
90
+ "types": "./dist/hooks/*.d.ts",
91
+ "default": "./dist/hooks/*.js"
92
+ },
93
+ "./icons": {
94
+ "types": "./dist/icons/index.d.ts",
95
+ "default": "./dist/icons/index.js"
96
+ },
97
+ "./icons/*": {
98
+ "types": "./dist/icons/*.d.ts",
99
+ "default": "./dist/icons/*.js"
100
+ },
101
+ "./lib/*": {
102
+ "types": "./dist/lib/*.d.ts",
103
+ "default": "./dist/lib/*.js"
104
+ },
105
+ "./*": {
106
+ "types": "./dist/components/*.d.ts",
107
+ "default": "./dist/components/*.js"
108
+ }
109
+ },
52
110
  "access": "public"
53
111
  },
112
+ "scripts": {
113
+ "build": "vp pack",
114
+ "clean": "rm -rf dist",
115
+ "dev": "vp pack --watch",
116
+ "test": "vp test run",
117
+ "typecheck": "tsc --noEmit"
118
+ },
54
119
  "dependencies": {
55
- "@base-ui/react": "^1.6.0",
56
- "@daypicker/react": "^10.0.1",
57
- "@dnd-kit/core": "^6.3.1",
58
- "@dnd-kit/modifiers": "^9.0.0",
59
- "@dnd-kit/sortable": "^10.0.0",
60
- "@dnd-kit/utilities": "^3.2.2",
61
- "@number-flow/react": "^0.6.0",
62
- "@radix-ui/colors": "^3.0.0",
63
- "@shadcn/react": "^0.2.1",
64
- "@visx/curve": "^4.0.0-alpha.11",
65
- "@visx/event": "^4.0.0-alpha.11",
66
- "@visx/group": "^4.0.0-alpha.11",
67
- "@visx/sankey": "^4.0.0-alpha.11",
68
- "@visx/scale": "^4.0.0-alpha.11",
69
- "@visx/shape": "^4.0.0-alpha.11",
70
- "@visx/tooltip": "^4.0.0-alpha.11",
71
- "@visx/vendor": "^4.0.0-alpha.11",
72
- "bezier-easing": "^2.1.0",
73
- "class-variance-authority": "^0.7.1",
74
- "cnfast": "^0.0.8",
75
- "colorjs.io": "^0.5.2",
76
- "vaul": "^1.1.2"
120
+ "@base-ui/react": "catalog:",
121
+ "@daypicker/react": "catalog:",
122
+ "@dnd-kit/core": "catalog:",
123
+ "@dnd-kit/modifiers": "catalog:",
124
+ "@dnd-kit/sortable": "catalog:",
125
+ "@dnd-kit/utilities": "catalog:",
126
+ "@number-flow/react": "catalog:",
127
+ "@radix-ui/colors": "catalog:",
128
+ "@shadcn/react": "catalog:",
129
+ "@visx/curve": "catalog:",
130
+ "@visx/event": "catalog:",
131
+ "@visx/group": "catalog:",
132
+ "@visx/sankey": "catalog:",
133
+ "@visx/scale": "catalog:",
134
+ "@visx/shape": "catalog:",
135
+ "@visx/tooltip": "catalog:",
136
+ "@visx/vendor": "catalog:",
137
+ "bezier-easing": "catalog:",
138
+ "class-variance-authority": "catalog:",
139
+ "cnfast": "catalog:",
140
+ "colorjs.io": "catalog:",
141
+ "vaul": "catalog:"
77
142
  },
78
143
  "devDependencies": {
79
- "@tailwindcss/postcss": "^4.2.4",
80
- "@testing-library/dom": "^10.4.0",
81
- "@testing-library/react": "^16.3.0",
82
- "@types/react": "^19.2.14",
83
- "@types/react-dom": "^19.2.3",
84
- "jsdom": "^29.1.1",
85
- "postcss": "^8.5.23",
86
- "react": "^19.2.5",
87
- "react-dom": "^19.2.5",
88
- "tailwindcss": "^4.2.4",
89
- "tw-animate-css": "^1.4.0",
90
- "typescript": "^6.0.2",
91
- "vite": "npm:@voidzero-dev/vite-plus-core@latest",
92
- "vite-plus": "^0.1.24",
93
- "vitest": "npm:@voidzero-dev/vite-plus-test@latest",
94
- "vitest-axe": "^0.1.0"
144
+ "@tailwindcss/postcss": "catalog:",
145
+ "@testing-library/dom": "catalog:",
146
+ "@testing-library/react": "catalog:",
147
+ "@types/react": "catalog:",
148
+ "@types/react-dom": "catalog:",
149
+ "jsdom": "catalog:",
150
+ "postcss": "catalog:",
151
+ "react": "catalog:",
152
+ "react-dom": "catalog:",
153
+ "tailwindcss": "catalog:",
154
+ "tw-animate-css": "catalog:",
155
+ "typescript": "catalog:",
156
+ "vite": "catalog:",
157
+ "vite-plus": "catalog:",
158
+ "vitest": "catalog:",
159
+ "vitest-axe": "catalog:"
95
160
  },
96
161
  "peerDependencies": {
97
162
  "react": ">=18.0.0",
98
163
  "react-dom": ">=18.0.0",
99
164
  "tailwindcss": ">=4.1.0",
100
165
  "tw-animate-css": ">=1.4.0"
101
- },
102
- "scripts": {
103
- "build": "vp pack",
104
- "clean": "rm -rf dist",
105
- "dev": "vp pack --watch",
106
- "test": "vp test run",
107
- "typecheck": "tsc --noEmit"
108
166
  }
109
- }
167
+ }