doom-design-system 0.5.0 → 0.6.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 (211) hide show
  1. package/dist/components/Accordion/Accordion.module.css +121 -124
  2. package/dist/components/ActionRow/ActionRow.module.css +25 -24
  3. package/dist/components/Alert/Alert.module.css +74 -76
  4. package/dist/components/Avatar/Avatar.module.css +66 -66
  5. package/dist/components/Badge/Badge.module.css +50 -48
  6. package/dist/components/Breadcrumbs/Breadcrumbs.module.css +32 -33
  7. package/dist/components/Button/Button.d.ts +2 -2
  8. package/dist/components/Button/Button.js +1 -1
  9. package/dist/components/Button/Button.module.css +150 -152
  10. package/dist/components/Card/Card.module.css +37 -39
  11. package/dist/components/Chart/Chart.module.css +213 -245
  12. package/dist/components/Chart/behaviors/DraggablePuck.d.ts +36 -0
  13. package/dist/components/Chart/behaviors/DraggablePuck.js +94 -0
  14. package/dist/components/Chart/behaviors/Markers.js +6 -4
  15. package/dist/components/Chart/behaviors/SelectionUpdate.js +2 -4
  16. package/dist/components/Chart/behaviors/index.d.ts +1 -1
  17. package/dist/components/Chart/behaviors/index.js +1 -1
  18. package/dist/components/Chart/engine/CoordinateSystem.d.ts +59 -0
  19. package/dist/components/Chart/engine/CoordinateSystem.js +126 -0
  20. package/dist/components/Chart/engine/Engine.d.ts +102 -0
  21. package/dist/components/Chart/engine/Engine.js +226 -0
  22. package/dist/components/Chart/engine/Scheduler.d.ts +59 -0
  23. package/dist/components/Chart/engine/Scheduler.js +139 -0
  24. package/dist/components/Chart/engine/SpatialMap.d.ts +114 -0
  25. package/dist/components/Chart/engine/SpatialMap.js +270 -0
  26. package/dist/components/Chart/engine/index.d.ts +13 -0
  27. package/dist/components/Chart/engine/index.js +9 -0
  28. package/dist/components/Chart/engine/types.d.ts +137 -0
  29. package/dist/components/Chart/engine/types.js +47 -0
  30. package/dist/components/Chart/hooks/useEngine.d.ts +43 -0
  31. package/dist/components/Chart/hooks/useEngine.js +128 -0
  32. package/dist/components/Chart/sensors/DataHoverSensor/DataHoverSensor.d.ts +17 -19
  33. package/dist/components/Chart/sensors/DataHoverSensor/DataHoverSensor.js +38 -51
  34. package/dist/components/Chart/sensors/DragSensor/DragSensor.d.ts +38 -0
  35. package/dist/components/Chart/sensors/DragSensor/DragSensor.js +105 -0
  36. package/dist/components/Chart/sensors/DragSensor/index.d.ts +2 -0
  37. package/dist/components/Chart/sensors/DragSensor/index.js +1 -0
  38. package/dist/components/Chart/sensors/{KeyboardSensor.d.ts → KeyboardSensor/KeyboardSensor.d.ts} +1 -1
  39. package/dist/components/Chart/sensors/KeyboardSensor/KeyboardSensor.js +86 -0
  40. package/dist/components/Chart/sensors/KeyboardSensor/index.d.ts +1 -0
  41. package/dist/components/Chart/sensors/KeyboardSensor/index.js +1 -0
  42. package/dist/components/Chart/sensors/{SelectionSensor.d.ts → SelectionSensor/SelectionSensor.d.ts} +2 -2
  43. package/dist/components/Chart/sensors/SelectionSensor/SelectionSensor.js +39 -0
  44. package/dist/components/Chart/sensors/SelectionSensor/index.d.ts +1 -0
  45. package/dist/components/Chart/sensors/SelectionSensor/index.js +1 -0
  46. package/dist/components/Chart/sensors/SensorManager/SensorManager.js +36 -41
  47. package/dist/components/Chart/sensors/index.d.ts +1 -0
  48. package/dist/components/Chart/sensors/index.js +3 -2
  49. package/dist/components/Chart/sensors/utils/search.d.ts +1 -1
  50. package/dist/components/Chart/sensors/utils/search.js +25 -4
  51. package/dist/components/Chart/state/store/chart.store.js +18 -0
  52. package/dist/components/Chart/state/store/slices/series.slice.d.ts +1 -0
  53. package/dist/components/Chart/state/store/slices/series.slice.js +3 -2
  54. package/dist/components/Chart/subcomponents/Axis/Axis.module.css +32 -33
  55. package/dist/components/Chart/subcomponents/BarSeries/BarSeries.js +6 -1
  56. package/dist/components/Chart/subcomponents/BarSeries/BarSeries.module.css +11 -9
  57. package/dist/components/Chart/subcomponents/Cursor/Cursor.js +8 -1
  58. package/dist/components/Chart/subcomponents/Cursor/Cursor.module.css +14 -13
  59. package/dist/components/Chart/subcomponents/CustomSeries/CustomSeries.js +4 -0
  60. package/dist/components/Chart/subcomponents/CustomSeries/CustomSeries.module.css +5 -3
  61. package/dist/components/Chart/subcomponents/Footer/Footer.module.css +5 -3
  62. package/dist/components/Chart/subcomponents/Grid/Grid.module.css +12 -11
  63. package/dist/components/Chart/subcomponents/Header/Header.module.css +8 -7
  64. package/dist/components/Chart/subcomponents/InteractionLayer/InteractionLayer.d.ts +4 -4
  65. package/dist/components/Chart/subcomponents/InteractionLayer/InteractionLayer.js +39 -76
  66. package/dist/components/Chart/subcomponents/Legend/Legend.module.css +30 -32
  67. package/dist/components/Chart/subcomponents/LineSeries/LineSeries.js +9 -3
  68. package/dist/components/Chart/subcomponents/LineSeries/LineSeries.module.css +21 -21
  69. package/dist/components/Chart/subcomponents/Root/Root.js +113 -7
  70. package/dist/components/Chart/subcomponents/Root/Root.module.css +70 -82
  71. package/dist/components/Chart/subcomponents/ScatterSeries/ScatterSeries.js +6 -1
  72. package/dist/components/Chart/subcomponents/ScatterSeries/ScatterSeries.module.css +7 -5
  73. package/dist/components/Chart/subcomponents/Series/Series.module.css +118 -128
  74. package/dist/components/Chart/subcomponents/SeriesPoint/SeriesPoint.module.css +10 -8
  75. package/dist/components/Chart/subcomponents/Tooltip/Tooltip.js +2 -3
  76. package/dist/components/Chart/subcomponents/Tooltip/Tooltip.module.css +52 -67
  77. package/dist/components/Chart/types/context.d.ts +9 -0
  78. package/dist/components/Chart/types/events.d.ts +5 -7
  79. package/dist/components/Chart/types/interaction.d.ts +24 -2
  80. package/dist/components/Chart/types/interaction.js +1 -0
  81. package/dist/components/Checkbox/Checkbox.module.css +57 -59
  82. package/dist/components/Chip/Chip.module.css +105 -115
  83. package/dist/components/Combobox/Combobox.d.ts +2 -1
  84. package/dist/components/Combobox/Combobox.js +2 -2
  85. package/dist/components/Combobox/Combobox.module.css +233 -210
  86. package/dist/components/CopyButton/CopyButton.module.css +84 -90
  87. package/dist/components/Drawer/Drawer.module.css +126 -145
  88. package/dist/components/Dropdown/Dropdown.d.ts +3 -1
  89. package/dist/components/Dropdown/Dropdown.js +3 -3
  90. package/dist/components/Dropdown/Dropdown.module.css +52 -32
  91. package/dist/components/FileUpload/FileUpload.js +24 -0
  92. package/dist/components/FileUpload/FileUpload.module.css +295 -313
  93. package/dist/components/Form/Form.module.css +35 -39
  94. package/dist/components/Image/Image.module.css +53 -54
  95. package/dist/components/Input/Input.d.ts +4 -2
  96. package/dist/components/Input/Input.js +2 -2
  97. package/dist/components/Input/Input.module.css +135 -119
  98. package/dist/components/Label/Label.module.css +17 -15
  99. package/dist/components/Layout/Layout.module.css +95 -111
  100. package/dist/components/Link/Link.module.css +67 -65
  101. package/dist/components/Modal/Modal.module.css +112 -132
  102. package/dist/components/Page/Page.module.css +21 -21
  103. package/dist/components/Pagination/Pagination.module.css +56 -56
  104. package/dist/components/Popover/Popover.module.css +17 -16
  105. package/dist/components/ProgressBar/ProgressBar.module.css +36 -37
  106. package/dist/components/RadioGroup/RadioGroup.module.css +74 -77
  107. package/dist/components/Select/Select.d.ts +2 -1
  108. package/dist/components/Select/Select.js +2 -2
  109. package/dist/components/Select/Select.module.css +133 -98
  110. package/dist/components/Sheet/Sheet.module.css +134 -154
  111. package/dist/components/Sidebar/Sidebar.module.css +72 -74
  112. package/dist/components/Sidebar/subcomponents/Footer/Footer.module.css +7 -5
  113. package/dist/components/Sidebar/subcomponents/Group/Group.module.css +80 -85
  114. package/dist/components/Sidebar/subcomponents/Header/Header.module.css +12 -10
  115. package/dist/components/Sidebar/subcomponents/Item/Item.module.css +54 -55
  116. package/dist/components/Sidebar/subcomponents/MobileOverlay/MobileOverlay.module.css +38 -38
  117. package/dist/components/Sidebar/subcomponents/MobileTrigger/MobileTrigger.module.css +5 -3
  118. package/dist/components/Sidebar/subcomponents/Nav/Nav.module.css +13 -11
  119. package/dist/components/Sidebar/subcomponents/Rail/Rail.module.css +62 -63
  120. package/dist/components/Sidebar/subcomponents/Section/Section.module.css +86 -91
  121. package/dist/components/Skeleton/Skeleton.module.css +28 -26
  122. package/dist/components/Slat/Slat.module.css +93 -94
  123. package/dist/components/Slider/Slider.module.css +116 -121
  124. package/dist/components/Spinner/Spinner.module.css +28 -27
  125. package/dist/components/SplitButton/SplitButton.d.ts +3 -1
  126. package/dist/components/SplitButton/SplitButton.js +2 -2
  127. package/dist/components/SplitButton/SplitButton.module.css +104 -87
  128. package/dist/components/Switch/Switch.module.css +64 -63
  129. package/dist/components/Table/FilterBuilder/FilterBuilder.module.css +36 -36
  130. package/dist/components/Table/FilterBuilder/FilterConditionRow.js +1 -1
  131. package/dist/components/Table/FilterBuilder/FilterConditionRow.module.css +21 -22
  132. package/dist/components/Table/FilterBuilder/FilterGroup.js +4 -4
  133. package/dist/components/Table/FilterBuilder/FilterGroup.module.css +355 -389
  134. package/dist/components/Table/FilterBuilder/FilterSheet.module.css +68 -71
  135. package/dist/components/Table/Table.d.ts +4 -2
  136. package/dist/components/Table/Table.js +50 -13
  137. package/dist/components/Table/Table.module.css +210 -188
  138. package/dist/components/Table/TableHeaderFilter.js +1 -1
  139. package/dist/components/Table/TableHeaderFilter.module.css +51 -57
  140. package/dist/components/Tabs/Tabs.module.css +79 -80
  141. package/dist/components/Text/Text.module.css +108 -131
  142. package/dist/components/Textarea/Textarea.d.ts +3 -1
  143. package/dist/components/Textarea/Textarea.js +2 -2
  144. package/dist/components/Textarea/Textarea.module.css +114 -94
  145. package/dist/components/Toast/Toast.module.css +82 -82
  146. package/dist/components/Tooltip/Tooltip.module.css +17 -16
  147. package/dist/styles/globals.css +1677 -1691
  148. package/dist/styles/palettes.d.ts +0 -5
  149. package/dist/styles/palettes.js +0 -8
  150. package/dist/styles/themes/definitions.d.ts +0 -8
  151. package/dist/styles/themes/definitions.js +117 -5
  152. package/dist/styles/types.d.ts +2 -0
  153. package/dist/styles/types.js +1 -0
  154. package/dist/tsconfig.build.tsbuildinfo +1 -1
  155. package/package.json +4 -4
  156. package/.agent/skills/doom/a2ui/a2ui-examples.md +0 -289
  157. package/.agent/skills/doom/a2ui/a2ui-principles.md +0 -49
  158. package/.agent/skills/doom/a2ui/a2ui-protocol.md +0 -191
  159. package/.agent/skills/doom/components/a2ui.md +0 -46
  160. package/.agent/skills/doom/components/accordion.md +0 -44
  161. package/.agent/skills/doom/components/actionrow.md +0 -33
  162. package/.agent/skills/doom/components/alert.md +0 -35
  163. package/.agent/skills/doom/components/avatar.md +0 -36
  164. package/.agent/skills/doom/components/badge.md +0 -29
  165. package/.agent/skills/doom/components/breadcrumbs.md +0 -33
  166. package/.agent/skills/doom/components/button.md +0 -43
  167. package/.agent/skills/doom/components/card.md +0 -41
  168. package/.agent/skills/doom/components/chart.md +0 -106
  169. package/.agent/skills/doom/components/checkbox.md +0 -38
  170. package/.agent/skills/doom/components/chip.md +0 -35
  171. package/.agent/skills/doom/components/combobox.md +0 -50
  172. package/.agent/skills/doom/components/copybutton.md +0 -41
  173. package/.agent/skills/doom/components/drawer.md +0 -69
  174. package/.agent/skills/doom/components/dropdown.md +0 -33
  175. package/.agent/skills/doom/components/fileupload.md +0 -49
  176. package/.agent/skills/doom/components/form.md +0 -55
  177. package/.agent/skills/doom/components/icon.md +0 -47
  178. package/.agent/skills/doom/components/image.md +0 -48
  179. package/.agent/skills/doom/components/input.md +0 -54
  180. package/.agent/skills/doom/components/label.md +0 -32
  181. package/.agent/skills/doom/components/layout.md +0 -92
  182. package/.agent/skills/doom/components/link.md +0 -39
  183. package/.agent/skills/doom/components/modal.md +0 -71
  184. package/.agent/skills/doom/components/page.md +0 -41
  185. package/.agent/skills/doom/components/pagination.md +0 -32
  186. package/.agent/skills/doom/components/popover.md +0 -45
  187. package/.agent/skills/doom/components/progressbar.md +0 -37
  188. package/.agent/skills/doom/components/radiogroup.md +0 -45
  189. package/.agent/skills/doom/components/select.md +0 -43
  190. package/.agent/skills/doom/components/sheet.md +0 -71
  191. package/.agent/skills/doom/components/sidebar.md +0 -92
  192. package/.agent/skills/doom/components/skeleton.md +0 -35
  193. package/.agent/skills/doom/components/slat.md +0 -46
  194. package/.agent/skills/doom/components/slider.md +0 -51
  195. package/.agent/skills/doom/components/spinner.md +0 -34
  196. package/.agent/skills/doom/components/splitbutton.md +0 -35
  197. package/.agent/skills/doom/components/switch.md +0 -40
  198. package/.agent/skills/doom/components/table.md +0 -82
  199. package/.agent/skills/doom/components/tabs.md +0 -65
  200. package/.agent/skills/doom/components/text.md +0 -42
  201. package/.agent/skills/doom/components/textarea.md +0 -46
  202. package/.agent/skills/doom/components/toast.md +0 -59
  203. package/.agent/skills/doom/components/tooltip.md +0 -35
  204. package/.agent/skills/doom/index.md +0 -167
  205. package/.agent/skills/doom/styles/aesthetic.md +0 -151
  206. package/.agent/skills/doom/styles/css-variables.md +0 -80
  207. package/.agent/skills/doom/styles/mixins.md +0 -97
  208. package/.agent/skills/doom/styles/tokens.md +0 -129
  209. package/.agent/skills/doom/styles/utilities.md +0 -84
  210. package/dist/components/Chart/sensors/KeyboardSensor.js +0 -82
  211. package/dist/components/Chart/sensors/SelectionSensor.js +0 -41
@@ -1,83 +1,71 @@
1
- .chartContainer {
2
- position: relative;
3
- background-color: var(--card-bg);
4
- border: var(--border-width) solid var(--card-border);
5
- border-radius: var(--radius);
6
- box-shadow: var(--shadow-hard);
7
- padding: var(--spacing-6);
8
- overflow: visible;
9
- display: flex;
10
- flex-direction: column;
11
- }
12
- .chartContainer.flat {
13
- box-shadow: none;
14
- }
15
- .chartContainer.frameless {
16
- background-color: transparent;
17
- border: none;
18
- box-shadow: none;
19
- padding: 0;
20
- }
21
- .chartContainer.solid {
22
- /* ROOT CONTEXT (The Field) */
23
- background-color: var(--solid-bg);
24
- color: var(--solid-fg);
25
- /* Root Variables */
26
- --background: var(--solid-bg);
27
- --foreground: var(--solid-fg);
28
- --muted-foreground: color-mix(in srgb, var(--solid-fg) 70%, transparent);
29
- /*
30
- * Standardized Brand Surface Logic
31
- * Decouples Modals (Surface) from Buttons (Action)
32
- */
33
- --surface-brand: var(--solid-bg);
34
- --surface-brand-foreground: var(--solid-fg);
35
- /* SEMANTICS (True Semantic Colors) */
36
- --success: var(--solid-success);
37
- --success-foreground: var(--solid-fg);
38
- --error: var(--solid-error);
39
- --error-foreground: var(--solid-fg);
40
- --warning: var(--solid-warning);
41
- --warning-foreground: var(--solid-fg);
42
- /* SURFACE COLORS */
43
- --on-surface: var(--solid-bg);
44
- --on-surface-muted: var(--solid-bg);
45
- /* COMPONENT TOKENS */
46
- --card-bg: color-mix(in srgb, var(--solid-fg) 95%, var(--solid-bg) 5%);
47
- --card-border: var(--solid-fg);
48
- --card-foreground: var(--solid-fg);
49
- /* POPOVER TOKENS */
50
- --popover: color-mix(in srgb, var(--solid-fg) 95%, var(--solid-bg) 5%);
51
- --popover-foreground: var(--solid-bg);
52
- /* INPUT TOKENS */
53
- --input: color-mix(in srgb, var(--solid-fg) 95%, var(--solid-bg) 5%);
54
- --border-strong: var(--solid-fg);
55
- /* BUTTON TOKENS */
56
- --primary: var(--solid-fg);
57
- --primary-foreground: var(--solid-bg);
58
- /* SECONDARY TOKENS */
59
- --secondary: color-mix(in srgb, var(--solid-bg) 90%, transparent);
60
- --secondary-foreground: var(--solid-fg);
61
- /* MUTED TOKENS */
62
- --muted: color-mix(in srgb, var(--solid-fg) 20%, transparent);
63
- border-color: var(--border-strong);
64
- }
65
- .chartContainer.solid :global(.tick) text {
66
- fill: var(--solid-fg);
67
- }
68
- .chartContainer.solid :global(.domain),
69
- .chartContainer.solid :global(.tick) line {
70
- stroke: var(--solid-fg);
71
- }
72
- .chartContainer.mobile {
73
- padding: var(--spacing-2);
74
- }
75
-
76
- .responsiveWrapper {
77
- width: 100%;
78
- flex: 1;
79
- height: 100%;
80
- min-height: 0;
81
- position: relative;
82
- overflow: visible;
1
+ @layer doom.components {
2
+ .chartContainer {
3
+ position: relative;
4
+ background-color: var(--card-bg);
5
+ border: var(--surface-border-width) solid var(--card-border);
6
+ border-radius: var(--radius-md);
7
+ box-shadow: var(--shadow-md);
8
+ padding: var(--space-6);
9
+ overflow: visible;
10
+ user-select: none;
11
+ display: flex;
12
+ flex-direction: column;
13
+ }
14
+ .chartContainer.flat {
15
+ box-shadow: none;
16
+ }
17
+ .chartContainer.frameless {
18
+ background-color: transparent;
19
+ border: none;
20
+ box-shadow: none;
21
+ padding: 0;
22
+ }
23
+ .chartContainer.solid {
24
+ background-color: var(--solid-bg);
25
+ color: var(--solid-fg);
26
+ --background: var(--solid-bg);
27
+ --foreground: var(--solid-fg);
28
+ --muted-foreground: color-mix(in srgb, var(--solid-fg) 70%, transparent);
29
+ --surface-brand: var(--solid-bg);
30
+ --surface-brand-foreground: var(--solid-fg);
31
+ --success: var(--solid-success);
32
+ --success-foreground: var(--solid-fg);
33
+ --error: var(--solid-error);
34
+ --error-foreground: var(--solid-fg);
35
+ --warning: var(--solid-warning);
36
+ --warning-foreground: var(--solid-fg);
37
+ --on-surface: var(--solid-bg);
38
+ --on-surface-muted: var(--solid-bg);
39
+ --card-bg: color-mix(in srgb, var(--solid-fg) 95%, var(--solid-bg) 5%);
40
+ --card-border: var(--solid-fg);
41
+ --card-foreground: var(--solid-fg);
42
+ --popover: color-mix(in srgb, var(--solid-fg) 95%, var(--solid-bg) 5%);
43
+ --popover-foreground: var(--solid-bg);
44
+ --input: color-mix(in srgb, var(--solid-fg) 95%, var(--solid-bg) 5%);
45
+ --border-strong: var(--solid-fg);
46
+ --primary: var(--solid-fg);
47
+ --primary-foreground: var(--solid-bg);
48
+ --secondary: color-mix(in srgb, var(--solid-bg) 90%, transparent);
49
+ --secondary-foreground: var(--solid-fg);
50
+ --muted: color-mix(in srgb, var(--solid-fg) 20%, transparent);
51
+ border-color: var(--border-strong);
52
+ }
53
+ .chartContainer.solid :global(.tick) text {
54
+ fill: var(--solid-fg);
55
+ }
56
+ .chartContainer.solid :global(.domain),
57
+ .chartContainer.solid :global(.tick) line {
58
+ stroke: var(--solid-fg);
59
+ }
60
+ .chartContainer.mobile {
61
+ padding: var(--space-2);
62
+ }
63
+ .responsiveWrapper {
64
+ width: 100%;
65
+ flex: 1;
66
+ height: 100%;
67
+ min-height: 0;
68
+ position: relative;
69
+ overflow: visible;
70
+ }
83
71
  }
@@ -2,6 +2,7 @@
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import React, { useEffect, useId, useMemo } from "react";
4
4
  import { useChartContext } from "../../context.js";
5
+ import { CHART_DATA_ATTRS } from "../../engine/index.js";
5
6
  import { registerSeries, unregisterSeries, } from "../../state/store/chart.store.js";
6
7
  import { resolveAccessor } from "../../utils/accessors.js";
7
8
  import { SeriesPoint } from "../SeriesPoint/SeriesPoint.js";
@@ -35,6 +36,7 @@ const ScatterSeriesComponent = ({ data: localData, x: localX, y: localY, size: l
35
36
  }
36
37
  registerSeries(chartStore, seriesId, [
37
38
  {
39
+ id: seriesId,
38
40
  label: label || "Scatter Series",
39
41
  color: strokeColor,
40
42
  x: xAccessor,
@@ -71,7 +73,10 @@ const ScatterSeriesComponent = ({ data: localData, x: localX, y: localY, size: l
71
73
  if (rScale && sizeAccessor) {
72
74
  radius = rScale(sizeAccessor(d));
73
75
  }
74
- return (_jsx(SeriesPoint, { color: strokeColor, "data-index": i, datum: d, hoverRadius: radius + 4, radius: radius, x: cx, y: cy }, i));
76
+ return (_jsx(SeriesPoint, { color: strokeColor, datum: d, hoverRadius: radius + 4, radius: radius, x: cx, y: cy, [CHART_DATA_ATTRS.TYPE]: "scatter",
77
+ [CHART_DATA_ATTRS.SERIES_ID]: seriesId,
78
+ [CHART_DATA_ATTRS.INDEX]: i,
79
+ [CHART_DATA_ATTRS.DRAGGABLE]: false }, i));
75
80
  }) }));
76
81
  };
77
82
  export const ScatterSeries = React.memo(ScatterSeriesComponent);
@@ -1,6 +1,8 @@
1
- .dot {
2
- fill: var(--background);
3
- stroke: var(--primary);
4
- stroke-width: calc(var(--border-width) * 1.5);
5
- transition: r 0.2s ease, fill 0.2s;
1
+ @layer doom.components {
2
+ .dot {
3
+ fill: var(--background);
4
+ stroke: var(--primary);
5
+ stroke-width: calc(var(--surface-border-width) * 1.5);
6
+ transition: r 0.2s ease, fill 0.2s;
7
+ }
6
8
  }
@@ -1,129 +1,119 @@
1
- .chart {
2
- width: 100%;
3
- height: 100%;
4
- position: absolute;
5
- top: 0;
6
- left: 0;
7
- overflow: visible;
8
- pointer-events: auto;
9
- }
10
- .chart :global .domain {
11
- stroke: var(--card-border);
12
- stroke-width: var(--border-width);
13
- }
14
- .chart :global .domain.hideDomain {
15
- stroke: none;
16
- }
17
- .chart :global .tick line {
18
- stroke: var(--card-border);
19
- stroke-width: var(--border-width);
20
- opacity: 1;
21
- }
22
- .chart :global .tick text {
23
- fill: var(--foreground);
24
- font-size: var(--text-xs);
25
- font-weight: var(--font-bold);
26
- text-transform: uppercase;
27
- }
28
-
29
- .grid :global(.tick) line {
30
- stroke: var(--muted);
31
- stroke-opacity: 0.5;
32
- }
33
- .grid path {
34
- display: none;
35
- }
36
-
37
- .path {
38
- fill: none;
39
- stroke: var(--primary);
40
- stroke-width: calc(var(--border-width) * 1.5);
41
- stroke-linecap: round;
42
- stroke-linejoin: round;
43
- }
44
-
45
- .area {
46
- fill: var(--primary);
47
- stroke: none;
48
- }
49
-
50
- .bar {
51
- fill: var(--primary);
52
- stroke: var(--card-border);
53
- stroke-width: var(--border-width);
54
- stroke-linejoin: round;
55
- transition: opacity 0.2s;
56
- }
57
- .bar:hover {
58
- cursor: crosshair;
59
- filter: brightness(1.1);
60
- }
61
-
62
- .cursorLine {
63
- stroke: var(--muted-foreground);
64
- stroke-width: var(--border-width);
65
- stroke-dasharray: 4 4;
66
- opacity: 0;
67
- transition: opacity 0.1s ease-out;
68
- pointer-events: none;
69
- }
70
-
71
- .cursorPoint {
72
- fill: var(--primary);
73
- stroke: var(--border-strong);
74
- stroke-width: var(--border-width);
75
- transition: opacity 0.1s ease-out;
76
- pointer-events: none;
77
- }
78
-
79
- .dot {
80
- fill: var(--primary);
81
- stroke: var(--border-strong);
82
- stroke-width: var(--border-width);
83
- transition: r 0.2s;
84
- z-index: var(--z-overlay);
85
- }
86
- .dot:hover {
87
- r: 8;
88
- stroke-width: calc(var(--border-width) * 1.5);
89
- }
90
-
91
- .responsiveWrapper {
92
- width: 100%;
93
- flex: 1;
94
- height: 100%;
95
- min-height: 300px;
96
- position: relative;
97
- overflow: visible;
98
- }
99
-
100
- .tooltipWrapper {
101
- position: absolute;
102
- top: 0;
103
- left: 0;
104
- pointer-events: none;
105
- z-index: var(--z-tooltip);
106
- will-change: transform;
107
- }
108
-
109
- .tooltipCard {
110
- padding: var(--spacing-3) var(--spacing-4);
111
- font-size: var(--text-xs);
112
- white-space: nowrap;
113
- }
114
-
115
- .tooltipLabel {
116
- color: var(--muted-foreground);
117
- text-transform: uppercase;
118
- font-size: var(--text-2xs);
119
- letter-spacing: 0.05em;
120
- margin-bottom: var(--spacing-1);
121
- }
122
-
123
- .axisLabel {
124
- fill: var(--foreground);
125
- font-size: var(--text-xs);
126
- font-weight: var(--font-bold);
127
- text-transform: uppercase;
128
- text-anchor: middle;
1
+ @layer doom.components {
2
+ .chart {
3
+ width: 100%;
4
+ height: 100%;
5
+ position: absolute;
6
+ top: 0;
7
+ left: 0;
8
+ overflow: visible;
9
+ pointer-events: auto;
10
+ }
11
+ .chart :global .domain {
12
+ stroke: var(--card-border);
13
+ stroke-width: var(--surface-border-width);
14
+ }
15
+ .chart :global .domain.hideDomain {
16
+ stroke: none;
17
+ }
18
+ .chart :global .tick line {
19
+ stroke: var(--card-border);
20
+ stroke-width: var(--surface-border-width);
21
+ opacity: 1;
22
+ }
23
+ .chart :global .tick text {
24
+ fill: var(--foreground);
25
+ font-size: var(--text-xs);
26
+ font-weight: var(--font-bold);
27
+ text-transform: uppercase;
28
+ }
29
+ .grid :global(.tick) line {
30
+ stroke: var(--muted);
31
+ stroke-opacity: 0.5;
32
+ }
33
+ .grid path {
34
+ display: none;
35
+ }
36
+ .path {
37
+ fill: none;
38
+ stroke: var(--primary);
39
+ stroke-width: calc(var(--surface-border-width) * 1.5);
40
+ stroke-linecap: round;
41
+ stroke-linejoin: round;
42
+ }
43
+ .area {
44
+ fill: var(--primary);
45
+ stroke: none;
46
+ }
47
+ .bar {
48
+ fill: var(--primary);
49
+ stroke: var(--card-border);
50
+ stroke-width: var(--surface-border-width);
51
+ stroke-linejoin: round;
52
+ transition: opacity 0.2s;
53
+ }
54
+ .bar:hover {
55
+ cursor: crosshair;
56
+ filter: brightness(1.1);
57
+ }
58
+ .cursorLine {
59
+ stroke: var(--muted-foreground);
60
+ stroke-width: var(--surface-border-width);
61
+ stroke-dasharray: 4 4;
62
+ opacity: 0;
63
+ transition: opacity 0.1s ease-out;
64
+ pointer-events: none;
65
+ }
66
+ .cursorPoint {
67
+ fill: var(--primary);
68
+ stroke: var(--border-strong);
69
+ stroke-width: var(--surface-border-width);
70
+ transition: opacity 0.1s ease-out;
71
+ pointer-events: none;
72
+ }
73
+ .dot {
74
+ fill: var(--primary);
75
+ stroke: var(--border-strong);
76
+ stroke-width: var(--surface-border-width);
77
+ transition: r 0.2s;
78
+ z-index: var(--z-overlay);
79
+ }
80
+ .dot:hover {
81
+ r: 8;
82
+ stroke-width: calc(var(--surface-border-width) * 1.5);
83
+ }
84
+ .responsiveWrapper {
85
+ width: 100%;
86
+ flex: 1;
87
+ height: 100%;
88
+ min-height: 300px;
89
+ position: relative;
90
+ overflow: visible;
91
+ }
92
+ .tooltipWrapper {
93
+ position: absolute;
94
+ top: 0;
95
+ left: 0;
96
+ pointer-events: none;
97
+ z-index: var(--z-tooltip);
98
+ will-change: transform;
99
+ }
100
+ .tooltipCard {
101
+ padding: var(--space-3) var(--space-4);
102
+ font-size: var(--text-xs);
103
+ white-space: nowrap;
104
+ }
105
+ .tooltipLabel {
106
+ color: var(--muted-foreground);
107
+ text-transform: uppercase;
108
+ font-size: var(--text-2xs);
109
+ letter-spacing: 0.05em;
110
+ margin-bottom: var(--space-1);
111
+ }
112
+ .axisLabel {
113
+ fill: var(--foreground);
114
+ font-size: var(--text-xs);
115
+ font-weight: var(--font-bold);
116
+ text-transform: uppercase;
117
+ text-anchor: middle;
118
+ }
129
119
  }
@@ -1,9 +1,11 @@
1
- .point {
2
- fill: var(--primary);
3
- stroke: var(--card-border);
4
- stroke-width: 2;
5
- transition: r 0.15s ease, stroke-width 0.15s ease, opacity 0.2s;
6
- z-index: var(--z-overlay);
7
- /* Ensure it sits above lines */
8
- position: relative;
1
+ @layer doom.components {
2
+ .point {
3
+ fill: var(--primary);
4
+ stroke: var(--card-border);
5
+ stroke-width: 2;
6
+ transition: r 0.15s ease, stroke-width 0.15s ease, opacity 0.2s;
7
+ z-index: var(--z-overlay);
8
+ /* Ensure it sits above lines */
9
+ position: relative;
10
+ }
9
11
  }
@@ -7,7 +7,7 @@ import { Text } from "../../../Text/Text.js";
7
7
  import { useChartContext } from "../../context.js";
8
8
  import { resolveAccessor } from "../../types/index.js";
9
9
  import { InteractionChannel } from "../../types/interaction.js";
10
- import { Reposition, TOOLTIP_GAP_X, TOOLTIP_GAP_Y, TOUCH_OFFSET_Y, } from "../../utils/Reposition/index.js";
10
+ import { Reposition, TOOLTIP_GAP_X, TOOLTIP_GAP_Y, } from "../../utils/Reposition/index.js";
11
11
  import styles from "./Tooltip.module.css";
12
12
  /**
13
13
  * The Tooltip component is a pure reactor that renders the chart's tooltip.
@@ -31,7 +31,7 @@ export function Tooltip({ containerRef, }) {
31
31
  const position = hover === null || hover === void 0 ? void 0 : hover.pointer;
32
32
  const [layout, setLayout] = useState({ x: 0, y: 0, visible: false });
33
33
  useLayoutEffect(() => {
34
- var _a, _b, _c;
34
+ var _a, _b;
35
35
  if (!tooltipRef.current || !target || !position) {
36
36
  return;
37
37
  }
@@ -42,7 +42,6 @@ export function Tooltip({ containerRef, }) {
42
42
  })
43
43
  .gap({ x: TOOLTIP_GAP_X, y: TOOLTIP_GAP_Y })
44
44
  .align({ vertical: "center" })
45
- .touchOffset(TOUCH_OFFSET_Y, (_c = position.isTouch) !== null && _c !== void 0 ? _c : false)
46
45
  .edgeDetect({ container: containerRef })
47
46
  .resolve();
48
47
  setLayout({ x, y, visible: true });
@@ -1,68 +1,53 @@
1
- .tooltipWrapper {
2
- position: absolute;
3
- top: 0;
4
- left: 0;
5
- pointer-events: none;
6
- z-index: var(--z-tooltip);
7
- will-change: transform;
8
- }
9
-
10
- .solid {
11
- /* ROOT CONTEXT (The Field) */
12
- background-color: var(--solid-bg);
13
- color: var(--solid-fg);
14
- /* Root Variables */
15
- --background: var(--solid-bg);
16
- --foreground: var(--solid-fg);
17
- --muted-foreground: color-mix(in srgb, var(--solid-fg) 70%, transparent);
18
- /*
19
- * Standardized Brand Surface Logic
20
- * Decouples Modals (Surface) from Buttons (Action)
21
- */
22
- --surface-brand: var(--solid-bg);
23
- --surface-brand-foreground: var(--solid-fg);
24
- /* SEMANTICS (True Semantic Colors) */
25
- --success: var(--solid-success);
26
- --success-foreground: var(--solid-fg);
27
- --error: var(--solid-error);
28
- --error-foreground: var(--solid-fg);
29
- --warning: var(--solid-warning);
30
- --warning-foreground: var(--solid-fg);
31
- /* SURFACE COLORS */
32
- --on-surface: var(--solid-bg);
33
- --on-surface-muted: var(--solid-bg);
34
- /* COMPONENT TOKENS */
35
- --card-bg: color-mix(in srgb, var(--solid-fg) 95%, var(--solid-bg) 5%);
36
- --card-border: var(--solid-fg);
37
- --card-foreground: var(--solid-fg);
38
- /* POPOVER TOKENS */
39
- --popover: color-mix(in srgb, var(--solid-fg) 95%, var(--solid-bg) 5%);
40
- --popover-foreground: var(--solid-bg);
41
- /* INPUT TOKENS */
42
- --input: color-mix(in srgb, var(--solid-fg) 95%, var(--solid-bg) 5%);
43
- --border-strong: var(--solid-fg);
44
- /* BUTTON TOKENS */
45
- --primary: var(--solid-fg);
46
- --primary-foreground: var(--solid-bg);
47
- /* SECONDARY TOKENS */
48
- --secondary: color-mix(in srgb, var(--solid-bg) 90%, transparent);
49
- --secondary-foreground: var(--solid-fg);
50
- /* MUTED TOKENS */
51
- --muted: color-mix(in srgb, var(--solid-fg) 20%, transparent);
52
- }
53
-
54
- .tooltipCard {
55
- padding: var(--spacing-3) var(--spacing-4);
56
- font-size: var(--text-xs);
57
- white-space: nowrap;
58
- border-radius: var(--radius);
59
- box-shadow: var(--shadow-hard);
60
- }
61
-
62
- .tooltipLabel {
63
- color: var(--muted-foreground);
64
- text-transform: uppercase;
65
- font-size: var(--text-2xs);
66
- letter-spacing: 0.05em;
67
- margin-bottom: var(--spacing-1);
1
+ @layer doom.components {
2
+ .tooltipWrapper {
3
+ position: absolute;
4
+ top: 0;
5
+ left: 0;
6
+ pointer-events: none;
7
+ z-index: var(--z-tooltip);
8
+ will-change: transform;
9
+ }
10
+ .solid {
11
+ background-color: var(--solid-bg);
12
+ color: var(--solid-fg);
13
+ --background: var(--solid-bg);
14
+ --foreground: var(--solid-fg);
15
+ --muted-foreground: color-mix(in srgb, var(--solid-fg) 70%, transparent);
16
+ --surface-brand: var(--solid-bg);
17
+ --surface-brand-foreground: var(--solid-fg);
18
+ --success: var(--solid-success);
19
+ --success-foreground: var(--solid-fg);
20
+ --error: var(--solid-error);
21
+ --error-foreground: var(--solid-fg);
22
+ --warning: var(--solid-warning);
23
+ --warning-foreground: var(--solid-fg);
24
+ --on-surface: var(--solid-bg);
25
+ --on-surface-muted: var(--solid-bg);
26
+ --card-bg: color-mix(in srgb, var(--solid-fg) 95%, var(--solid-bg) 5%);
27
+ --card-border: var(--solid-fg);
28
+ --card-foreground: var(--solid-fg);
29
+ --popover: color-mix(in srgb, var(--solid-fg) 95%, var(--solid-bg) 5%);
30
+ --popover-foreground: var(--solid-bg);
31
+ --input: color-mix(in srgb, var(--solid-fg) 95%, var(--solid-bg) 5%);
32
+ --border-strong: var(--solid-fg);
33
+ --primary: var(--solid-fg);
34
+ --primary-foreground: var(--solid-bg);
35
+ --secondary: color-mix(in srgb, var(--solid-bg) 90%, transparent);
36
+ --secondary-foreground: var(--solid-fg);
37
+ --muted: color-mix(in srgb, var(--solid-fg) 20%, transparent);
38
+ }
39
+ .tooltipCard {
40
+ padding: var(--space-3) var(--space-4);
41
+ font-size: var(--text-xs);
42
+ white-space: nowrap;
43
+ border-radius: var(--radius-md);
44
+ box-shadow: var(--shadow-md);
45
+ }
46
+ .tooltipLabel {
47
+ color: var(--muted-foreground);
48
+ text-transform: uppercase;
49
+ font-size: var(--text-2xs);
50
+ letter-spacing: 0.05em;
51
+ margin-bottom: var(--space-1);
52
+ }
68
53
  }
@@ -1,3 +1,4 @@
1
+ import { Engine } from "../engine";
1
2
  import { Store } from "../state/store/chart.store";
2
3
  import { Accessor, Config, SeriesType } from "./index";
3
4
  import { XScale, YScale } from "./scales";
@@ -23,6 +24,13 @@ export interface RenderFrame<T = unknown> {
23
24
  element: Element;
24
25
  data: T;
25
26
  } | null;
27
+ seriesId: string;
28
+ chartDataAttrs: {
29
+ TYPE: string;
30
+ SERIES_ID: string;
31
+ INDEX: string;
32
+ DRAGGABLE: string;
33
+ };
26
34
  }
27
35
  /**
28
36
  * Main context value for the Chart system.
@@ -30,6 +38,7 @@ export interface RenderFrame<T = unknown> {
30
38
  */
31
39
  export interface ContextValue<T = unknown> {
32
40
  chartStore: Store;
41
+ engine: Engine<T>;
33
42
  config: Config;
34
43
  isMobile: boolean;
35
44
  colorPalette: string[];