@weasel-js/ui 0.5.0 → 0.5.1

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 (297) hide show
  1. package/dist/color/oklch.d.ts +14 -0
  2. package/dist/color/oklch.d.ts.map +1 -0
  3. package/dist/components/ActionBar/ActionBar.d.ts +36 -0
  4. package/dist/components/ActionBar/ActionBar.d.ts.map +1 -0
  5. package/dist/components/ActionBar/index.d.ts +3 -0
  6. package/dist/components/ActionBar/index.d.ts.map +1 -0
  7. package/dist/components/ActionsBar/ActionsBar.d.ts +20 -0
  8. package/dist/components/ActionsBar/ActionsBar.d.ts.map +1 -0
  9. package/dist/components/ActionsBar/index.d.ts +3 -0
  10. package/dist/components/ActionsBar/index.d.ts.map +1 -0
  11. package/dist/components/Badge/Badge.d.ts +50 -0
  12. package/dist/components/Badge/Badge.d.ts.map +1 -0
  13. package/dist/components/Badge/bases/ChamferedRect.d.ts +8 -0
  14. package/dist/components/Badge/bases/ChamferedRect.d.ts.map +1 -0
  15. package/dist/components/Badge/bases/OctantBSpline.d.ts +71 -0
  16. package/dist/components/Badge/bases/OctantBSpline.d.ts.map +1 -0
  17. package/dist/components/Badge/bases/OctantSpline.d.ts +79 -0
  18. package/dist/components/Badge/bases/OctantSpline.d.ts.map +1 -0
  19. package/dist/components/Badge/bases/Polygon.d.ts +8 -0
  20. package/dist/components/Badge/bases/Polygon.d.ts.map +1 -0
  21. package/dist/components/Badge/bases/Powerline.d.ts +13 -0
  22. package/dist/components/Badge/bases/Powerline.d.ts.map +1 -0
  23. package/dist/components/Badge/bases/Puzzle.d.ts +15 -0
  24. package/dist/components/Badge/bases/Puzzle.d.ts.map +1 -0
  25. package/dist/components/Badge/bases/Quatrefoil.d.ts +46 -0
  26. package/dist/components/Badge/bases/Quatrefoil.d.ts.map +1 -0
  27. package/dist/components/Badge/bases/Ribbon.d.ts +12 -0
  28. package/dist/components/Badge/bases/Ribbon.d.ts.map +1 -0
  29. package/dist/components/Badge/bases/RoundedRect.d.ts +14 -0
  30. package/dist/components/Badge/bases/RoundedRect.d.ts.map +1 -0
  31. package/dist/components/Badge/bases/edgeProfiles.d.ts +6 -0
  32. package/dist/components/Badge/bases/edgeProfiles.d.ts.map +1 -0
  33. package/dist/components/Badge/bases/index.d.ts +24 -0
  34. package/dist/components/Badge/bases/index.d.ts.map +1 -0
  35. package/dist/components/Badge/bases/polygonSampler.d.ts +4 -0
  36. package/dist/components/Badge/bases/polygonSampler.d.ts.map +1 -0
  37. package/dist/components/Badge/bases/types.d.ts +69 -0
  38. package/dist/components/Badge/bases/types.d.ts.map +1 -0
  39. package/dist/components/Badge/effects/Aqua.d.ts +49 -0
  40. package/dist/components/Badge/effects/Aqua.d.ts.map +1 -0
  41. package/dist/components/Badge/effects/Bevel.d.ts +11 -0
  42. package/dist/components/Badge/effects/Bevel.d.ts.map +1 -0
  43. package/dist/components/Badge/effects/Bevel2.d.ts +11 -0
  44. package/dist/components/Badge/effects/Bevel2.d.ts.map +1 -0
  45. package/dist/components/Badge/effects/Bites.d.ts +10 -0
  46. package/dist/components/Badge/effects/Bites.d.ts.map +1 -0
  47. package/dist/components/Badge/effects/Metal.d.ts +41 -0
  48. package/dist/components/Badge/effects/Metal.d.ts.map +1 -0
  49. package/dist/components/Badge/effects/Outline.d.ts +17 -0
  50. package/dist/components/Badge/effects/Outline.d.ts.map +1 -0
  51. package/dist/components/Badge/effects/Perforations.d.ts +11 -0
  52. package/dist/components/Badge/effects/Perforations.d.ts.map +1 -0
  53. package/dist/components/Badge/effects/Puffs.d.ts +10 -0
  54. package/dist/components/Badge/effects/Puffs.d.ts.map +1 -0
  55. package/dist/components/Badge/effects/Rivets.d.ts +13 -0
  56. package/dist/components/Badge/effects/Rivets.d.ts.map +1 -0
  57. package/dist/components/Badge/effects/Scallops.d.ts +10 -0
  58. package/dist/components/Badge/effects/Scallops.d.ts.map +1 -0
  59. package/dist/components/Badge/effects/Shadow.d.ts +11 -0
  60. package/dist/components/Badge/effects/Shadow.d.ts.map +1 -0
  61. package/dist/components/Badge/effects/Sheen.d.ts +10 -0
  62. package/dist/components/Badge/effects/Sheen.d.ts.map +1 -0
  63. package/dist/components/Badge/effects/Spikes.d.ts +20 -0
  64. package/dist/components/Badge/effects/Spikes.d.ts.map +1 -0
  65. package/dist/components/Badge/effects/Sunbeams.d.ts +29 -0
  66. package/dist/components/Badge/effects/Sunbeams.d.ts.map +1 -0
  67. package/dist/components/Badge/effects/Woodgrain.d.ts +12 -0
  68. package/dist/components/Badge/effects/Woodgrain.d.ts.map +1 -0
  69. package/dist/components/Badge/effects/index.d.ts +40 -0
  70. package/dist/components/Badge/effects/index.d.ts.map +1 -0
  71. package/dist/components/Badge/effects/rangeMask.d.ts +13 -0
  72. package/dist/components/Badge/effects/rangeMask.d.ts.map +1 -0
  73. package/dist/components/Badge/index.d.ts +4 -0
  74. package/dist/components/Badge/index.d.ts.map +1 -0
  75. package/dist/components/Badge/shapeControls.d.ts +29 -0
  76. package/dist/components/Badge/shapeControls.d.ts.map +1 -0
  77. package/dist/components/Badge/shapes/Beavis.d.ts +11 -0
  78. package/dist/components/Badge/shapes/Beavis.d.ts.map +1 -0
  79. package/dist/components/Badge/shapes/Cloud.d.ts +11 -0
  80. package/dist/components/Badge/shapes/Cloud.d.ts.map +1 -0
  81. package/dist/components/Badge/shapes/Coffin.d.ts +12 -0
  82. package/dist/components/Badge/shapes/Coffin.d.ts.map +1 -0
  83. package/dist/components/Badge/shapes/Crest.d.ts +8 -0
  84. package/dist/components/Badge/shapes/Crest.d.ts.map +1 -0
  85. package/dist/components/Badge/shapes/Hexagon.d.ts +10 -0
  86. package/dist/components/Badge/shapes/Hexagon.d.ts.map +1 -0
  87. package/dist/components/Badge/shapes/House.d.ts +9 -0
  88. package/dist/components/Badge/shapes/House.d.ts.map +1 -0
  89. package/dist/components/Badge/shapes/Notched.d.ts +10 -0
  90. package/dist/components/Badge/shapes/Notched.d.ts.map +1 -0
  91. package/dist/components/Badge/shapes/Perforated.d.ts +8 -0
  92. package/dist/components/Badge/shapes/Perforated.d.ts.map +1 -0
  93. package/dist/components/Badge/shapes/Pill.d.ts +4 -0
  94. package/dist/components/Badge/shapes/Pill.d.ts.map +1 -0
  95. package/dist/components/Badge/shapes/Plain.d.ts +4 -0
  96. package/dist/components/Badge/shapes/Plain.d.ts.map +1 -0
  97. package/dist/components/Badge/shapes/Plaque.d.ts +12 -0
  98. package/dist/components/Badge/shapes/Plaque.d.ts.map +1 -0
  99. package/dist/components/Badge/shapes/Postage.d.ts +9 -0
  100. package/dist/components/Badge/shapes/Postage.d.ts.map +1 -0
  101. package/dist/components/Badge/shapes/Quatrefoil.d.ts +19 -0
  102. package/dist/components/Badge/shapes/Quatrefoil.d.ts.map +1 -0
  103. package/dist/components/Badge/shapes/Receipt.d.ts +9 -0
  104. package/dist/components/Badge/shapes/Receipt.d.ts.map +1 -0
  105. package/dist/components/Badge/shapes/Ribbon.d.ts +13 -0
  106. package/dist/components/Badge/shapes/Ribbon.d.ts.map +1 -0
  107. package/dist/components/Badge/shapes/Scalloped.d.ts +9 -0
  108. package/dist/components/Badge/shapes/Scalloped.d.ts.map +1 -0
  109. package/dist/components/Badge/shapes/Shield.d.ts +11 -0
  110. package/dist/components/Badge/shapes/Shield.d.ts.map +1 -0
  111. package/dist/components/Badge/shapes/Sparkler.d.ts +10 -0
  112. package/dist/components/Badge/shapes/Sparkler.d.ts.map +1 -0
  113. package/dist/components/Badge/shapes/Square.d.ts +8 -0
  114. package/dist/components/Badge/shapes/Square.d.ts.map +1 -0
  115. package/dist/components/Badge/shapes/Starburst.d.ts +11 -0
  116. package/dist/components/Badge/shapes/Starburst.d.ts.map +1 -0
  117. package/dist/components/Badge/shapes/Urn.d.ts +4 -0
  118. package/dist/components/Badge/shapes/Urn.d.ts.map +1 -0
  119. package/dist/components/Badge/shapes/Wood.d.ts +4 -0
  120. package/dist/components/Badge/shapes/Wood.d.ts.map +1 -0
  121. package/dist/components/Badge/shapes/index.d.ts +46 -0
  122. package/dist/components/Badge/shapes/index.d.ts.map +1 -0
  123. package/dist/components/Badge/types.d.ts +39 -0
  124. package/dist/components/Badge/types.d.ts.map +1 -0
  125. package/dist/components/Button/Button.d.ts +29 -0
  126. package/dist/components/Button/Button.d.ts.map +1 -0
  127. package/dist/components/Button/index.d.ts +3 -0
  128. package/dist/components/Button/index.d.ts.map +1 -0
  129. package/dist/components/Callout/Callout.d.ts +67 -0
  130. package/dist/components/Callout/Callout.d.ts.map +1 -0
  131. package/dist/components/Callout/index.d.ts +3 -0
  132. package/dist/components/Callout/index.d.ts.map +1 -0
  133. package/dist/components/Checkbox/Checkbox.d.ts +15 -0
  134. package/dist/components/Checkbox/Checkbox.d.ts.map +1 -0
  135. package/dist/components/Checkbox/index.d.ts +3 -0
  136. package/dist/components/Checkbox/index.d.ts.map +1 -0
  137. package/dist/components/ColorField/ColorField.d.ts +28 -0
  138. package/dist/components/ColorField/ColorField.d.ts.map +1 -0
  139. package/dist/components/ColorField/index.d.ts +2 -0
  140. package/dist/components/ColorField/index.d.ts.map +1 -0
  141. package/dist/components/ComboBox/ComboBox.d.ts +36 -0
  142. package/dist/components/ComboBox/ComboBox.d.ts.map +1 -0
  143. package/dist/components/ComboBox/index.d.ts +3 -0
  144. package/dist/components/ComboBox/index.d.ts.map +1 -0
  145. package/dist/components/CurveEditor/CurveEditor.d.ts +41 -0
  146. package/dist/components/CurveEditor/CurveEditor.d.ts.map +1 -0
  147. package/dist/components/CurveEditor/LayeredCurveEditor.d.ts +40 -0
  148. package/dist/components/CurveEditor/LayeredCurveEditor.d.ts.map +1 -0
  149. package/dist/components/CurveEditor/catmullRom.d.ts +35 -0
  150. package/dist/components/CurveEditor/catmullRom.d.ts.map +1 -0
  151. package/dist/components/CurveEditor/createFunctionLayer.d.ts +72 -0
  152. package/dist/components/CurveEditor/createFunctionLayer.d.ts.map +1 -0
  153. package/dist/components/CurveEditor/hitTest.d.ts +29 -0
  154. package/dist/components/CurveEditor/hitTest.d.ts.map +1 -0
  155. package/dist/components/CurveEditor/index.d.ts +7 -0
  156. package/dist/components/CurveEditor/index.d.ts.map +1 -0
  157. package/dist/components/CurveEditor/interpolation.d.ts +15 -0
  158. package/dist/components/CurveEditor/interpolation.d.ts.map +1 -0
  159. package/dist/components/CurveEditor/layerTypes.d.ts +103 -0
  160. package/dist/components/CurveEditor/layerTypes.d.ts.map +1 -0
  161. package/dist/components/CurveEditor/monotone.d.ts +25 -0
  162. package/dist/components/CurveEditor/monotone.d.ts.map +1 -0
  163. package/dist/components/CurveEditor/setCurveOp.d.ts +35 -0
  164. package/dist/components/CurveEditor/setCurveOp.d.ts.map +1 -0
  165. package/dist/components/DataGrid/DataGrid.d.ts +34 -0
  166. package/dist/components/DataGrid/DataGrid.d.ts.map +1 -0
  167. package/dist/components/DataGrid/index.d.ts +3 -0
  168. package/dist/components/DataGrid/index.d.ts.map +1 -0
  169. package/dist/components/Dialog/Dialog.d.ts +29 -0
  170. package/dist/components/Dialog/Dialog.d.ts.map +1 -0
  171. package/dist/components/Dialog/index.d.ts +3 -0
  172. package/dist/components/Dialog/index.d.ts.map +1 -0
  173. package/dist/components/Field/Field.d.ts +25 -0
  174. package/dist/components/Field/Field.d.ts.map +1 -0
  175. package/dist/components/Field/index.d.ts +3 -0
  176. package/dist/components/Field/index.d.ts.map +1 -0
  177. package/dist/components/Input/Input.d.ts +28 -0
  178. package/dist/components/Input/Input.d.ts.map +1 -0
  179. package/dist/components/Input/index.d.ts +3 -0
  180. package/dist/components/Input/index.d.ts.map +1 -0
  181. package/dist/components/Keycaps/Keycap.d.ts +34 -0
  182. package/dist/components/Keycaps/Keycap.d.ts.map +1 -0
  183. package/dist/components/Keycaps/Keycaps.d.ts +29 -0
  184. package/dist/components/Keycaps/Keycaps.d.ts.map +1 -0
  185. package/dist/components/Keycaps/index.d.ts +8 -0
  186. package/dist/components/Keycaps/index.d.ts.map +1 -0
  187. package/dist/components/Keycaps/keyGlyph.d.ts +7 -0
  188. package/dist/components/Keycaps/keyGlyph.d.ts.map +1 -0
  189. package/dist/components/Keycaps/keySpecsFromMods.d.ts +81 -0
  190. package/dist/components/Keycaps/keySpecsFromMods.d.ts.map +1 -0
  191. package/dist/components/NumberField/NumberField.d.ts +25 -0
  192. package/dist/components/NumberField/NumberField.d.ts.map +1 -0
  193. package/dist/components/NumberField/index.d.ts +3 -0
  194. package/dist/components/NumberField/index.d.ts.map +1 -0
  195. package/dist/components/OptionsBar/OptionsBar.d.ts +25 -0
  196. package/dist/components/OptionsBar/OptionsBar.d.ts.map +1 -0
  197. package/dist/components/OptionsBar/index.d.ts +3 -0
  198. package/dist/components/OptionsBar/index.d.ts.map +1 -0
  199. package/dist/components/Plot2D/Plot2D.d.ts +60 -0
  200. package/dist/components/Plot2D/Plot2D.d.ts.map +1 -0
  201. package/dist/components/Plot2D/geometry.d.ts +24 -0
  202. package/dist/components/Plot2D/geometry.d.ts.map +1 -0
  203. package/dist/components/Plot2D/index.d.ts +3 -0
  204. package/dist/components/Plot2D/index.d.ts.map +1 -0
  205. package/dist/components/PointPlotter/PointPlotter.d.ts +51 -0
  206. package/dist/components/PointPlotter/PointPlotter.d.ts.map +1 -0
  207. package/dist/components/PointPlotter/index.d.ts +2 -0
  208. package/dist/components/PointPlotter/index.d.ts.map +1 -0
  209. package/dist/components/Powerline/Powerline.d.ts +32 -0
  210. package/dist/components/Powerline/Powerline.d.ts.map +1 -0
  211. package/dist/components/Powerline/index.d.ts +5 -0
  212. package/dist/components/Powerline/index.d.ts.map +1 -0
  213. package/dist/components/Prefs/PrefsDialog.d.ts +21 -0
  214. package/dist/components/Prefs/PrefsDialog.d.ts.map +1 -0
  215. package/dist/components/Prefs/PrefsForm.d.ts +42 -0
  216. package/dist/components/Prefs/PrefsForm.d.ts.map +1 -0
  217. package/dist/components/Prefs/index.d.ts +4 -0
  218. package/dist/components/Prefs/index.d.ts.map +1 -0
  219. package/dist/components/Prefs/schema.d.ts +85 -0
  220. package/dist/components/Prefs/schema.d.ts.map +1 -0
  221. package/dist/components/RadioGroup/RadioGroup.d.ts +16 -0
  222. package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -0
  223. package/dist/components/RadioGroup/index.d.ts +3 -0
  224. package/dist/components/RadioGroup/index.d.ts.map +1 -0
  225. package/dist/components/RangeSlider/RangeSlider.d.ts +18 -0
  226. package/dist/components/RangeSlider/RangeSlider.d.ts.map +1 -0
  227. package/dist/components/RangeSlider/index.d.ts +3 -0
  228. package/dist/components/RangeSlider/index.d.ts.map +1 -0
  229. package/dist/components/Select/Select.d.ts +39 -0
  230. package/dist/components/Select/Select.d.ts.map +1 -0
  231. package/dist/components/Select/index.d.ts +3 -0
  232. package/dist/components/Select/index.d.ts.map +1 -0
  233. package/dist/components/SelectionPanel/SelectionPanel.d.ts +46 -0
  234. package/dist/components/SelectionPanel/SelectionPanel.d.ts.map +1 -0
  235. package/dist/components/SelectionPanel/index.d.ts +3 -0
  236. package/dist/components/SelectionPanel/index.d.ts.map +1 -0
  237. package/dist/components/SelectionPanel/model.d.ts +43 -0
  238. package/dist/components/SelectionPanel/model.d.ts.map +1 -0
  239. package/dist/components/Sidebar/Sidebar.d.ts +31 -0
  240. package/dist/components/Sidebar/Sidebar.d.ts.map +1 -0
  241. package/dist/components/Sidebar/index.d.ts +3 -0
  242. package/dist/components/Sidebar/index.d.ts.map +1 -0
  243. package/dist/components/SidebarPanel/SidebarPanel.d.ts +35 -0
  244. package/dist/components/SidebarPanel/SidebarPanel.d.ts.map +1 -0
  245. package/dist/components/SidebarPanel/index.d.ts +3 -0
  246. package/dist/components/SidebarPanel/index.d.ts.map +1 -0
  247. package/dist/components/Slider/Slider.d.ts +43 -0
  248. package/dist/components/Slider/Slider.d.ts.map +1 -0
  249. package/dist/components/Slider/index.d.ts +3 -0
  250. package/dist/components/Slider/index.d.ts.map +1 -0
  251. package/dist/components/Switch/Switch.d.ts +11 -0
  252. package/dist/components/Switch/Switch.d.ts.map +1 -0
  253. package/dist/components/Switch/index.d.ts +3 -0
  254. package/dist/components/Switch/index.d.ts.map +1 -0
  255. package/dist/components/Tabs/Tabs.d.ts +22 -0
  256. package/dist/components/Tabs/Tabs.d.ts.map +1 -0
  257. package/dist/components/Tabs/index.d.ts +3 -0
  258. package/dist/components/Tabs/index.d.ts.map +1 -0
  259. package/dist/components/Toast/Toast.d.ts +18 -0
  260. package/dist/components/Toast/Toast.d.ts.map +1 -0
  261. package/dist/components/Toast/index.d.ts +5 -0
  262. package/dist/components/Toast/index.d.ts.map +1 -0
  263. package/dist/components/Toast/queue.d.ts +56 -0
  264. package/dist/components/Toast/queue.d.ts.map +1 -0
  265. package/dist/components/ToggleBar/ToggleBar.d.ts +35 -0
  266. package/dist/components/ToggleBar/ToggleBar.d.ts.map +1 -0
  267. package/dist/components/ToggleBar/index.d.ts +3 -0
  268. package/dist/components/ToggleBar/index.d.ts.map +1 -0
  269. package/dist/components/ToolButton/ToolButton.d.ts +41 -0
  270. package/dist/components/ToolButton/ToolButton.d.ts.map +1 -0
  271. package/dist/components/ToolButton/index.d.ts +3 -0
  272. package/dist/components/ToolButton/index.d.ts.map +1 -0
  273. package/dist/components/ToolGroup/ToolGroup.d.ts +25 -0
  274. package/dist/components/ToolGroup/ToolGroup.d.ts.map +1 -0
  275. package/dist/components/ToolGroup/index.d.ts +3 -0
  276. package/dist/components/ToolGroup/index.d.ts.map +1 -0
  277. package/dist/components/ToolPalette/ToolPalette.d.ts +27 -0
  278. package/dist/components/ToolPalette/ToolPalette.d.ts.map +1 -0
  279. package/dist/components/ToolPalette/formatShortcut.d.ts +17 -0
  280. package/dist/components/ToolPalette/formatShortcut.d.ts.map +1 -0
  281. package/dist/components/ToolPalette/index.d.ts +4 -0
  282. package/dist/components/ToolPalette/index.d.ts.map +1 -0
  283. package/dist/components/Tooltip/Tooltip.d.ts +24 -0
  284. package/dist/components/Tooltip/Tooltip.d.ts.map +1 -0
  285. package/dist/components/Tooltip/index.d.ts +3 -0
  286. package/dist/components/Tooltip/index.d.ts.map +1 -0
  287. package/dist/dlog.d.ts +33 -0
  288. package/dist/dlog.d.ts.map +1 -0
  289. package/dist/format/number.d.ts +13 -0
  290. package/dist/format/number.d.ts.map +1 -0
  291. package/dist/index.d.ts +44 -0
  292. package/dist/index.d.ts.map +1 -0
  293. package/dist/paintGradientTrack.d.ts +15 -0
  294. package/dist/paintGradientTrack.d.ts.map +1 -0
  295. package/dist/useReorderDragList.d.ts +35 -0
  296. package/dist/useReorderDragList.d.ts.map +1 -0
  297. package/package.json +2 -2
@@ -0,0 +1,40 @@
1
+ import { type CSSProperties, type ReactNode } from 'react';
2
+ import { type GridSettings, type AxesSettings } from '../Plot2D';
3
+ import type { CurveLayer } from './layerTypes';
4
+ export interface LayerBinding<S = unknown> {
5
+ layer: CurveLayer<S>;
6
+ state: S;
7
+ }
8
+ export interface LayeredCurveEditorProps {
9
+ /** Bottom-to-top render order: `layers[0]` paints first, `layers[N-1]`
10
+ * paints on top. Hit-testing runs in reverse (topmost claim wins). */
11
+ layers: ReadonlyArray<LayerBinding<any>>;
12
+ /** Fires every frame during a gesture with the live in-flight state
13
+ * for the layer that owns the gesture. */
14
+ onLayerChange(id: string, next: unknown): void;
15
+ /** Fires once per discrete user action (drag-end, one-shot insert,
16
+ * delete) for the layer that produced the change. `prev` is the
17
+ * layer's state at gesture start. */
18
+ onLayerCommit?(id: string, next: unknown, prev: unknown): void;
19
+ width: number;
20
+ height: number;
21
+ /** Model-space x range. Default [0, 1]. */
22
+ xRange?: readonly [number, number];
23
+ /** Model-space y range. Default [0, 1]. */
24
+ yRange?: readonly [number, number];
25
+ grid?: GridSettings | false | null;
26
+ axes?: AxesSettings | false | null;
27
+ /** Built-in undo/redo via Cmd/Ctrl+Z (Shift+Z or Y for redo) on the
28
+ * focused SVG. Snapshots every layer's state on each commit; undo
29
+ * fires `onLayerChange(id, prevState)` for each layer whose state
30
+ * changed. Default `true`. */
31
+ history?: boolean;
32
+ className?: string;
33
+ style?: CSSProperties;
34
+ /** Extra SVG content rendered behind all layers (under the lowest
35
+ * layer but above grid/axes). Use this for static chrome that isn't
36
+ * worth modeling as a layer. */
37
+ children?: ReactNode;
38
+ }
39
+ export declare function LayeredCurveEditor(props: LayeredCurveEditorProps): import("react/jsx-runtime").JSX.Element;
40
+ //# sourceMappingURL=LayeredCurveEditor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LayeredCurveEditor.d.ts","sourceRoot":"","sources":["../../../src/components/CurveEditor/LayeredCurveEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,aAAa,EAGlB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAGL,KAAK,YAAY,EACjB,KAAK,YAAY,EAClB,MAAM,WAAW,CAAC;AAOnB,OAAO,KAAK,EACV,UAAU,EACX,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,YAAY,CAAC,CAAC,GAAG,OAAO;IACvC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IACrB,KAAK,EAAE,CAAC,CAAC;CACV;AAED,MAAM,WAAW,uBAAuB;IACtC;2EACuE;IACvE,MAAM,EAAE,aAAa,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;IAEzC;+CAC2C;IAC3C,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IAE/C;;0CAEsC;IACtC,aAAa,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IAE/D,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,2CAA2C;IAC3C,MAAM,CAAC,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,2CAA2C;IAC3C,MAAM,CAAC,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,IAAI,CAAC,EAAE,YAAY,GAAG,KAAK,GAAG,IAAI,CAAC;IACnC,IAAI,CAAC,EAAE,YAAY,GAAG,KAAK,GAAG,IAAI,CAAC;IAEnC;;;mCAG+B;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;IAEtB;;qCAEiC;IACjC,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAmBD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,2CA0UhE"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Catmull-Rom spline sampling, parameterized by α.
3
+ *
4
+ * α = 0 → uniform parameterization (original Catmull-Rom). Fast, can
5
+ * produce cusps and self-intersections at sharp 2D angles.
6
+ * α = 0.5 → centripetal (Yuksel/Schneider 2011). No cusps, no
7
+ * self-intersection. The "safe default" for 2D.
8
+ * α = 1 → chordal. Smoother than uniform, different artifacts.
9
+ *
10
+ * `sampleCurve(...)` is the convenience alias for centripetal (α=0.5).
11
+ */
12
+ export interface Point {
13
+ x: number;
14
+ y: number;
15
+ }
16
+ /**
17
+ * Sample the Catmull-Rom segment between p1 and p2 at parameter
18
+ * t ∈ [0, 1]. p0 and p3 are the surrounding control points (use phantom
19
+ * reflection at endpoints — see sampleCatmullRom below).
20
+ *
21
+ * Returns p1 at t=0 and p2 at t=1. `alpha` controls parameterization.
22
+ */
23
+ export declare function segmentSampleAt(p0: Point, p1: Point, p2: Point, p3: Point, t: number, alpha?: number): Point;
24
+ /**
25
+ * Sample the whole curve through `anchors` using Catmull-Rom with the
26
+ * given α. Returns `(n-1) * samplesPerSegment + 1` points. Phantom
27
+ * endpoints by reflection so the first/last segments are tangent to
28
+ * the chord into/out of the endpoints. Returns `[]` for fewer than 2
29
+ * anchors.
30
+ */
31
+ export declare function sampleCatmullRom(anchors: readonly Point[], samplesPerSegment: number, alpha?: number): Point[];
32
+ /** Convenience alias for centripetal Catmull-Rom (α=0.5). The most
33
+ * common choice; safe default for 2D paths. */
34
+ export declare function sampleCurve(anchors: readonly Point[], samplesPerSegment: number): Point[];
35
+ //# sourceMappingURL=catmullRom.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catmullRom.d.ts","sourceRoot":"","sources":["../../../src/components/CurveEditor/catmullRom.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,WAAW,KAAK;IACpB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAQD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EACrD,KAAK,GAAE,MAAY,GAClB,KAAK,CA4BP;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,SAAS,KAAK,EAAE,EACzB,iBAAiB,EAAE,MAAM,EACzB,KAAK,GAAE,MAAY,GAClB,KAAK,EAAE,CAoCT;AAED;gDACgD;AAChD,wBAAgB,WAAW,CACzB,OAAO,EAAE,SAAS,KAAK,EAAE,EACzB,iBAAiB,EAAE,MAAM,GACxB,KAAK,EAAE,CAET"}
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Built-in function/curve layer for LayeredCurveEditor. Bundles the
3
+ * curve-render + anchor-render + drag/insert/delete gestures that were
4
+ * the entirety of the original `CurveEditor`. Multiple instances coexist
5
+ * by id; consumers can compose several to plot e.g. a primary function
6
+ * and a derived (read-only) curve on the same chart.
7
+ */
8
+ import type { ReactNode } from 'react';
9
+ import { type InterpolationMode } from './interpolation';
10
+ import type { CurveLayer } from './layerTypes';
11
+ export interface ControlPoint {
12
+ x: number;
13
+ y: number;
14
+ /** When true, this control point can't be moved or deleted by the
15
+ * user. Render as a smaller diamond with locked styling. */
16
+ locked?: boolean;
17
+ }
18
+ export type CurveDomain = '1d' | '2d';
19
+ export type EndpointMode = 'free' | 'pinned-x' | 'pinned-both';
20
+ export type AddPointMode = 'click-curve' | 'click-empty' | 'never';
21
+ export interface AnchorRenderProps {
22
+ point: ControlPoint;
23
+ index: number;
24
+ cx: number;
25
+ cy: number;
26
+ isActive: boolean;
27
+ isLocked: boolean;
28
+ isPinnedEndpoint: boolean;
29
+ isEndpoint: boolean;
30
+ }
31
+ export interface CurveSettings {
32
+ }
33
+ export interface FillSettings {
34
+ side: 'below' | 'above';
35
+ color?: string;
36
+ }
37
+ export interface FunctionLayerConfig {
38
+ /** Layer id; default `'function'`. Two instances on the same editor
39
+ * must have distinct ids. */
40
+ id?: string;
41
+ domain?: CurveDomain;
42
+ endpoints?: EndpointMode;
43
+ interpolation?: InterpolationMode;
44
+ constrain?: 'none' | 'function';
45
+ addPointMode?: AddPointMode;
46
+ minPoints?: number;
47
+ maxPoints?: number;
48
+ curve?: CurveSettings | false | null;
49
+ fill?: FillSettings | false | null;
50
+ hideNonInteractive?: boolean;
51
+ renderAnchor?: (info: AnchorRenderProps) => ReactNode;
52
+ /** When false, the layer renders the curve+fill but doesn't render
53
+ * anchors and doesn't accept pointer input. For derived read-only
54
+ * curves (e.g. plotting f'(x) alongside f(x)). Default true. */
55
+ interactive?: boolean;
56
+ /** Override x clamp range for drags and pinned endpoints. Defaults
57
+ * to the editor's modelRange x. Use this to constrain a layer to a
58
+ * sub-range of the plot (e.g. a bevel curve occupying x ∈ [0, b]
59
+ * while the editor's xRange is [0, halfWidth]). */
60
+ xClamp?: readonly [number, number];
61
+ }
62
+ export interface FunctionLayerState {
63
+ points: readonly ControlPoint[];
64
+ /** Layer-internal: the index of the anchor currently being dragged.
65
+ * Cleared between gestures. Consumers treat the whole state as
66
+ * opaque and round-trip it via onLayerChange. */
67
+ activeIndex: number | null;
68
+ }
69
+ export declare function createFunctionLayer(cfg?: FunctionLayerConfig): CurveLayer<FunctionLayerState>;
70
+ /** Convenience: build a function-layer state from a points array. */
71
+ export declare function functionLayerState(points: readonly ControlPoint[]): FunctionLayerState;
72
+ //# sourceMappingURL=createFunctionLayer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createFunctionLayer.d.ts","sourceRoot":"","sources":["../../../src/components/CurveEditor/createFunctionLayer.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAyB,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAIhF,OAAO,KAAK,EACV,UAAU,EAEX,MAAM,cAAc,CAAC;AAItB,MAAM,WAAW,YAAY;IAC3B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV;iEAC6D;IAC7D,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,CAAC;AACtC,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,UAAU,GAAG,aAAa,CAAC;AAC/D,MAAM,MAAM,YAAY,GAAG,aAAa,GAAG,aAAa,GAAG,OAAO,CAAC;AAEnE,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,YAAY,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;CAE7B;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,mBAAmB;IAClC;kCAC8B;IAC9B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,SAAS,CAAC,EAAE,YAAY,CAAC;IACzB,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAClC,SAAS,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAChC,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,GAAG,KAAK,GAAG,IAAI,CAAC;IACrC,IAAI,CAAC,EAAE,YAAY,GAAG,KAAK,GAAG,IAAI,CAAC;IACnC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,SAAS,CAAC;IACtD;;qEAEiE;IACjE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;wDAGoD;IACpD,MAAM,CAAC,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACpC;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,SAAS,YAAY,EAAE,CAAC;IAChC;;sDAEkD;IAClD,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAsDD,wBAAgB,mBAAmB,CAAC,GAAG,GAAE,mBAAwB,GAAG,UAAU,CAAC,kBAAkB,CAAC,CAkQjG;AAED,qEAAqE;AACrE,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,GAAG,kBAAkB,CAEtF"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Curve-specific hit tests. Generic coord transforms live in
3
+ * `../Plot2D/geometry`; what's here is curve-only (anchor / polyline
4
+ * proximity).
5
+ */
6
+ import type { Point } from '../Plot2D/geometry';
7
+ /**
8
+ * Nearest-anchor hit test. Anchors are already in plot/screen coords.
9
+ * Returns the index of the nearest anchor whose squared distance to
10
+ * the pointer is ≤ radius². Null if no anchor is within radius.
11
+ */
12
+ export declare function hitTestAnchor(anchors: readonly Point[], pointer: Point, radius: number): {
13
+ index: number;
14
+ } | null;
15
+ /**
16
+ * Hit test against a per-segment sampled polyline. Each entry in
17
+ * `segments` is the sample list for one segment (inclusive of
18
+ * endpoints). Returns segment index + t (∈ [0, 1]) of the closest
19
+ * point on the polyline within radius. Null if nothing is in range.
20
+ *
21
+ * Distance is measured to the line-segment chords between adjacent
22
+ * samples, not just to the samples themselves — so sparse sampling
23
+ * still produces accurate hits along the chord.
24
+ */
25
+ export declare function hitTestCurve(segments: readonly (readonly Point[])[], pointer: Point, radius: number): {
26
+ segIdx: number;
27
+ t: number;
28
+ } | null;
29
+ //# sourceMappingURL=hitTest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hitTest.d.ts","sourceRoot":"","sources":["../../../src/components/CurveEditor/hitTest.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAEhD;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,SAAS,KAAK,EAAE,EACzB,OAAO,EAAE,KAAK,EACd,MAAM,EAAE,MAAM,GACb;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAY1B;AAED;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,SAAS,CAAC,SAAS,KAAK,EAAE,CAAC,EAAE,EACvC,OAAO,EAAE,KAAK,EACd,MAAM,EAAE,MAAM,GACb;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CA6BtC"}
@@ -0,0 +1,7 @@
1
+ export { CurveEditor, type CurveEditorProps, } from './CurveEditor';
2
+ export { type ControlPoint, type CurveDomain, type EndpointMode, type AddPointMode, type FillSettings, type CurveSettings, type AnchorRenderProps, createFunctionLayer, functionLayerState, type FunctionLayerConfig, type FunctionLayerState, } from './createFunctionLayer';
3
+ export { LayeredCurveEditor, type LayeredCurveEditorProps, type LayerBinding, } from './LayeredCurveEditor';
4
+ export type { CurveLayer, LayerCtx, LayerRenderCtx, LayerHit, LayerGesture, LayerModifiers, EmptyDownArgs, ModelPoint, PlotPoint, } from './layerTypes';
5
+ export { createSetCurveOp, type SetCurveAdapter, type CreateSetCurveOpArgs, } from './setCurveOp';
6
+ export { sampleByInterpolation, type InterpolationMode, } from './interpolation';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/CurveEditor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,KAAK,gBAAgB,GACtB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,mBAAmB,EACnB,kBAAkB,EAClB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,GACxB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,kBAAkB,EAClB,KAAK,uBAAuB,EAC5B,KAAK,YAAY,GAClB,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EACV,UAAU,EACV,QAAQ,EACR,cAAc,EACd,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,aAAa,EACb,UAAU,EACV,SAAS,GACV,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,gBAAgB,EAChB,KAAK,eAAe,EACpB,KAAK,oBAAoB,GAC1B,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,qBAAqB,EACrB,KAAK,iBAAiB,GACvB,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Interpolation mode dispatcher for CurveEditor. The vocabulary of
3
+ * supported algorithms and the unified `sample(...)` entry point that
4
+ * picks the right one. All algorithms produce
5
+ * `(n-1) * samplesPerSegment + 1` points and pass through every
6
+ * anchor — CurveEditor is strictly interpolating, never approximating.
7
+ */
8
+ import { type Point } from './catmullRom';
9
+ /** Supported interpolation modes. All are interpolating (pass through
10
+ * every anchor); the differences are in tangent computation and
11
+ * parameterization. */
12
+ export type InterpolationMode = 'linear' | 'catmull-rom' | 'catmull-rom-uniform' | 'catmull-rom-chordal' | 'monotone';
13
+ /** Sample `anchors` using the chosen interpolation mode. */
14
+ export declare function sampleByInterpolation(anchors: readonly Point[], samplesPerSegment: number, mode: InterpolationMode): Point[];
15
+ //# sourceMappingURL=interpolation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interpolation.d.ts","sourceRoot":"","sources":["../../../src/components/CurveEditor/interpolation.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAoB,KAAK,KAAK,EAAE,MAAM,cAAc,CAAC;AAG5D;;wBAEwB;AACxB,MAAM,MAAM,iBAAiB,GACzB,QAAQ,GACR,aAAa,GACb,qBAAqB,GACrB,qBAAqB,GACrB,UAAU,CAAC;AA2Bf,4DAA4D;AAC5D,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,SAAS,KAAK,EAAE,EACzB,iBAAiB,EAAE,MAAM,EACzB,IAAI,EAAE,iBAAiB,GACtB,KAAK,EAAE,CAcT"}
@@ -0,0 +1,103 @@
1
+ /**
2
+ * Layered curve editor contract.
3
+ *
4
+ * A `CurveLayer` is a pure-value description of one composable layer
5
+ * inside `LayeredCurveEditor`. State lives outside the layer (held by
6
+ * the consumer); the layer only provides render + hit-test + gesture
7
+ * starters. This lets the editor coordinate cross-layer reactivity —
8
+ * when one layer's gesture updates its state, the consumer can update
9
+ * other layers' states in the same render, and the in-flight gesture
10
+ * keeps reading the latest state.
11
+ */
12
+ import type { ReactNode } from 'react';
13
+ import type { Point as PlotPoint, ModelRange } from '../Plot2D/geometry';
14
+ /** Convenience aliases — both are `{ x, y }` but with different units. */
15
+ export type ModelPoint = PlotPoint;
16
+ export type { PlotPoint };
17
+ export interface LayerModifiers {
18
+ shift: boolean;
19
+ alt: boolean;
20
+ meta: boolean;
21
+ ctrl: boolean;
22
+ }
23
+ /** Read-only context passed to every layer hook. Layers use this to
24
+ * convert between plot (SVG-pixel) and model (data) coordinates. */
25
+ export interface LayerCtx {
26
+ readonly modelRange: ModelRange;
27
+ readonly plotSize: {
28
+ readonly width: number;
29
+ readonly height: number;
30
+ };
31
+ toPlot(p: ModelPoint): PlotPoint;
32
+ toModel(p: PlotPoint): ModelPoint;
33
+ readonly modifiers: LayerModifiers;
34
+ }
35
+ export interface LayerRenderCtx extends LayerCtx {
36
+ /** True when this layer owns the currently-active gesture. Useful for
37
+ * surfacing "active anchor" visuals without threading the index. */
38
+ readonly isActive: boolean;
39
+ }
40
+ /** Layer-private payload returned from `hitTest`. The editor doesn't
41
+ * read it — it just round-trips it back into `onPointerDown`. */
42
+ export interface LayerHit {
43
+ /** Layer-local discriminator (e.g. `'anchor'`, `'curve'`). */
44
+ kind: string;
45
+ payload?: unknown;
46
+ }
47
+ /** A live gesture installed by a successful `onPointerDown`. The editor
48
+ * routes window-level pointermove/up/cancel into these callbacks until
49
+ * the gesture ends.
50
+ *
51
+ * `onMove` is pure: it takes the layer's *current* state (which may
52
+ * have been updated by upstream re-renders since the gesture started)
53
+ * and returns the next state. The editor publishes that next state via
54
+ * `onLayerChange`. */
55
+ export interface LayerGesture<S> {
56
+ onMove(state: S, model: ModelPoint, e: PointerEvent, ctx: LayerCtx): S;
57
+ /** Pointerup. Return the final state. The editor uses this as the
58
+ * `next` value passed to `onLayerCommit`. Default: return state
59
+ * unchanged. */
60
+ onCommit?(state: S, ctx: LayerCtx): S;
61
+ /** Pointercancel. Return the state to restore (usually the
62
+ * pre-gesture snapshot). Default: return state unchanged. */
63
+ onCancel?(state: S, ctx: LayerCtx): S;
64
+ }
65
+ /** Pure-value layer description. Multiple instances of the same factory
66
+ * output (e.g. two `createFunctionLayer` results) coexist by `id`. */
67
+ export interface CurveLayer<S> {
68
+ /** Stable identifier — used as the key when the editor calls back
69
+ * with state updates. Must be unique within an editor instance. */
70
+ readonly id: string;
71
+ /** Render the layer's visuals as SVG children inside the editor's
72
+ * Plot2D. Coordinates the layer renders into are plot-space. */
73
+ render(state: S, ctx: LayerRenderCtx): ReactNode;
74
+ /** Plot-space hit test. Return null to pass the point to the next
75
+ * layer (top-to-bottom). Topmost-claimed wins. */
76
+ hitTest?(state: S, plot: PlotPoint, ctx: LayerCtx): LayerHit | null;
77
+ /** A positive hit-test starts a gesture, absorbs the click with no
78
+ * gesture by returning void, or publishes a one-shot edit via
79
+ * `extra.commit(next)` and returns void (e.g. shift-click delete). */
80
+ onPointerDown?(state: S, hit: LayerHit, e: PointerEvent, ctx: LayerCtx, extra: EmptyDownArgs<S>): LayerGesture<S> | void;
81
+ /** Pointerdown landed where no layer claimed a hit. Layers get a
82
+ * turn top-to-bottom; first non-void return wins. Either start a
83
+ * gesture or commit a one-shot edit (return void after publishing
84
+ * state via the editor — see `EmptyDownArgs.commit`). */
85
+ onEmptyPointerDown?(state: S, model: ModelPoint, e: PointerEvent, ctx: LayerCtx, extra: EmptyDownArgs<S>): LayerGesture<S> | void;
86
+ /** Keyboard while the editor has focus. Top-to-bottom; call
87
+ * `e.preventDefault()` to stop propagation. */
88
+ onKeyDown?(state: S, e: KeyboardEvent, ctx: LayerCtx): void;
89
+ }
90
+ /** Helpers handed to `onPointerDown` and `onEmptyPointerDown` so a
91
+ * layer can publish a one-shot edit (shift-click delete, empty-click
92
+ * insert) without a drag gesture, and read the click's plot+model
93
+ * coords without re-deriving them from the DOM event. */
94
+ export interface EmptyDownArgs<S> {
95
+ /** Pointer in plot space. */
96
+ readonly plot: PlotPoint;
97
+ /** Pointer in model space. */
98
+ readonly model: ModelPoint;
99
+ /** Publish a state update *and* mark the action as committed. Use
100
+ * this when the click results in an immediate, undoable edit. */
101
+ commit(next: S): void;
102
+ }
103
+ //# sourceMappingURL=layerTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layerTypes.d.ts","sourceRoot":"","sources":["../../../src/components/CurveEditor/layerTypes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,KAAK,IAAI,SAAS,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEzE,0EAA0E;AAC1E,MAAM,MAAM,UAAU,GAAG,SAAS,CAAC;AACnC,YAAY,EAAE,SAAS,EAAE,CAAC;AAE1B,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,EAAE,OAAO,CAAC;IACb,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;CACf;AAED;qEACqE;AACrE,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE;QAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACvE,MAAM,CAAC,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IACjC,OAAO,CAAC,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;IAClC,QAAQ,CAAC,SAAS,EAAE,cAAc,CAAC;CACpC;AAED,MAAM,WAAW,cAAe,SAAQ,QAAQ;IAC9C;yEACqE;IACrE,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;CAC5B;AAED;kEACkE;AAClE,MAAM,WAAW,QAAQ;IACvB,8DAA8D;IAC9D,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;uBAOuB;AACvB,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B,MAAM,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,EAAE,YAAY,EAAE,GAAG,EAAE,QAAQ,GAAG,CAAC,CAAC;IACvE;;qBAEiB;IACjB,QAAQ,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,QAAQ,GAAG,CAAC,CAAC;IACtC;kEAC8D;IAC9D,QAAQ,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,QAAQ,GAAG,CAAC,CAAC;CACvC;AAED;uEACuE;AACvE,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B;wEACoE;IACpE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAEpB;qEACiE;IACjE,MAAM,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,cAAc,GAAG,SAAS,CAAC;IAEjD;uDACmD;IACnD,OAAO,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,QAAQ,GAAG,QAAQ,GAAG,IAAI,CAAC;IAEpE;;2EAEuE;IACvE,aAAa,CAAC,CACZ,KAAK,EAAE,CAAC,EACR,GAAG,EAAE,QAAQ,EACb,CAAC,EAAE,YAAY,EACf,GAAG,EAAE,QAAQ,EACb,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GACtB,YAAY,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAE1B;;;8DAG0D;IAC1D,kBAAkB,CAAC,CACjB,KAAK,EAAE,CAAC,EACR,KAAK,EAAE,UAAU,EACjB,CAAC,EAAE,YAAY,EACf,GAAG,EAAE,QAAQ,EACb,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GACtB,YAAY,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAE1B;oDACgD;IAChD,SAAS,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,aAAa,EAAE,GAAG,EAAE,QAAQ,GAAG,IAAI,CAAC;CAC7D;AAED;;;0DAG0D;AAC1D,MAAM,WAAW,aAAa,CAAC,CAAC;IAC9B,6BAA6B;IAC7B,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,8BAA8B;IAC9B,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B;sEACkE;IAClE,MAAM,CAAC,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC;CACvB"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Monotone cubic interpolation (Fritsch-Carlson / Steffen variant).
3
+ *
4
+ * Passes through every anchor and guarantees the curve never
5
+ * overshoots `min(neighbors)` / `max(neighbors)` along either axis.
6
+ * The right choice for animation timing curves (no anticipation) or
7
+ * audio envelopes (no out-of-range values).
8
+ *
9
+ * Parameterized by index — works for both 1D (function-shaped) and
10
+ * 2D (parametric) anchor sequences. The x and y coordinates are
11
+ * interpolated independently as functions of the anchor index.
12
+ *
13
+ * Reference: Fritsch & Carlson 1980, "Monotone piecewise cubic
14
+ * interpolation." Steffen's 1990 refinement is conceptually the same;
15
+ * we use a min-clamp variant that's monotonicity-preserving by
16
+ * construction.
17
+ */
18
+ import type { Point } from './catmullRom';
19
+ /**
20
+ * Sample the monotone-cubic curve through `anchors`. Returns
21
+ * `(n-1) * samplesPerSegment + 1` points (same shape as
22
+ * `sampleCatmullRom`). `[]` for fewer than 2 anchors.
23
+ */
24
+ export declare function sampleMonotone(anchors: readonly Point[], samplesPerSegment: number): Point[];
25
+ //# sourceMappingURL=monotone.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"monotone.d.ts","sourceRoot":"","sources":["../../../src/components/CurveEditor/monotone.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAkD1C;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,SAAS,KAAK,EAAE,EACzB,iBAAiB,EAAE,MAAM,GACxB,KAAK,EAAE,CAwBT"}
@@ -0,0 +1,35 @@
1
+ import type { Op } from '@weasel-js/core';
2
+ import type { ControlPoint } from './CurveEditor';
3
+ /**
4
+ * The adapter contract for {@link createSetCurveOp}. Consumers wire
5
+ * this to whatever state container holds the curve's value — typically
6
+ * a small callback that calls a React state setter or dispatches a
7
+ * Redux/Zustand action.
8
+ */
9
+ export interface SetCurveAdapter {
10
+ setValue(id: string, next: readonly ControlPoint[]): void;
11
+ }
12
+ export interface CreateSetCurveOpArgs {
13
+ /** Stable id the consumer uses for this curve. Used so a single
14
+ * adapter can handle multiple curves; the op's apply routes by id. */
15
+ id: string;
16
+ from: readonly ControlPoint[];
17
+ to: readonly ControlPoint[];
18
+ label?: string;
19
+ coalesceKey?: string;
20
+ }
21
+ /**
22
+ * Op factory for editing a CurveEditor's value through weasel-history.
23
+ *
24
+ * history.applyOps(
25
+ * [createSetCurveOp({ id: 'easing', from, to, label: 'Edit easing' })],
26
+ * 'Edit easing',
27
+ * );
28
+ *
29
+ * The op's `apply(adapter)` calls `adapter.setValue(id, to)`. `invert()`
30
+ * returns a mirror op with `from`/`to` swapped. When `from` and `to`
31
+ * are structurally equal, `apply` returns `false` so history can skip
32
+ * the entry — same convention as `createSetPathOp`.
33
+ */
34
+ export declare function createSetCurveOp(args: CreateSetCurveOpArgs): Op;
35
+ //# sourceMappingURL=setCurveOp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setCurveOp.d.ts","sourceRoot":"","sources":["../../../src/components/CurveEditor/setCurveOp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,YAAY,EAAE,GAAG,IAAI,CAAC;CAC3D;AAED,MAAM,WAAW,oBAAoB;IACnC;2EACuE;IACvE,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,SAAS,YAAY,EAAE,CAAC;IAC9B,EAAE,EAAE,SAAS,YAAY,EAAE,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,oBAAoB,GAAG,EAAE,CAgB/D"}
@@ -0,0 +1,34 @@
1
+ import type { ReactNode } from 'react';
2
+ export interface DataGridColumn<Row> {
3
+ id: string;
4
+ header: ReactNode;
5
+ /** Pull a sortable value from the row. Defaults to `(row as any)[column.id]`. */
6
+ accessor?: (row: Row) => string | number | null | undefined;
7
+ /** Render the cell. Defaults to `String(accessor(row) ?? '')`. */
8
+ render?: (row: Row) => ReactNode;
9
+ /** Default true. Set false to suppress the sort affordance on this column. */
10
+ sortable?: boolean;
11
+ /** Optional CSS class on every <td> in this column. */
12
+ className?: string;
13
+ }
14
+ export interface DataGridProps<Row extends {
15
+ id: string;
16
+ }> {
17
+ rows: readonly Row[];
18
+ columns: readonly DataGridColumn<Row>[];
19
+ /** Initial sort. Omit for unsorted (rows render in input order). */
20
+ defaultSort?: {
21
+ columnId: string;
22
+ direction: 'asc' | 'desc';
23
+ };
24
+ /** Enable drag handles in a leading column. Receives the reorder spec
25
+ * (the existing `useReorderDragList` semantics — see weasel-ui). */
26
+ onReorder?: (ids: string[], targetIndex: number) => void;
27
+ /** Empty-state row text. Default `'—'`. */
28
+ empty?: ReactNode;
29
+ className?: string;
30
+ }
31
+ export declare function DataGrid<Row extends {
32
+ id: string;
33
+ }>(props: DataGridProps<Row>): import("react/jsx-runtime").JSX.Element;
34
+ //# sourceMappingURL=DataGrid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataGrid.d.ts","sourceRoot":"","sources":["../../../src/components/DataGrid/DataGrid.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,MAAM,WAAW,cAAc,CAAC,GAAG;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,SAAS,CAAC;IAClB,iFAAiF;IACjF,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC5D,kEAAkE;IAClE,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,SAAS,CAAC;IACjC,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,aAAa,CAAC,GAAG,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE;IACvD,IAAI,EAAE,SAAS,GAAG,EAAE,CAAC;IACrB,OAAO,EAAE,SAAS,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC;IACxC,oEAAoE;IACpE,WAAW,CAAC,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,KAAK,GAAG,MAAM,CAAA;KAAE,CAAC;IAC9D;yEACqE;IACrE,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IACzD,2CAA2C;IAC3C,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID,wBAAgB,QAAQ,CAAC,GAAG,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,EAAE,KAAK,EAAE,aAAa,CAAC,GAAG,CAAC,2CAmH7E"}
@@ -0,0 +1,3 @@
1
+ export { DataGrid } from './DataGrid';
2
+ export type { DataGridColumn, DataGridProps } from './DataGrid';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DataGrid/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,29 @@
1
+ import type { ReactNode } from 'react';
2
+ import { type ModalOverlayProps, type DialogProps as RACDialogProps } from 'react-aria-components';
3
+ export type DialogProps = Omit<ModalOverlayProps, 'children' | 'className'> & {
4
+ /** Heading rendered in the dialog's default header. Omit when supplying
5
+ * a custom `header` slot via children. */
6
+ title?: ReactNode;
7
+ /** Show the built-in close button. Defaults to true when `onOpenChange`
8
+ * is wired so the user has an escape hatch. */
9
+ showCloseButton?: boolean;
10
+ /** Body content. */
11
+ children?: ReactNode;
12
+ /** Footer slot — typically action buttons. */
13
+ footer?: ReactNode;
14
+ /** ARIA role. Defaults to `dialog`. Use `alertdialog` for confirms. */
15
+ role?: RACDialogProps['role'];
16
+ /** Class applied to the modal box (inside the overlay). */
17
+ className?: string;
18
+ };
19
+ /**
20
+ * Modal dialog wrapping React Aria. Supplies a default header (title +
21
+ * close), scrollable body, and footer slot. Pass `isOpen` + `onOpenChange`
22
+ * for controlled visibility, or omit both and use a `<DialogTrigger>` from
23
+ * `react-aria-components` upstream of this component.
24
+ *
25
+ * Escape, click-outside, focus trap, and scroll lock all come from the
26
+ * underlying primitives.
27
+ */
28
+ export declare function Dialog(props: DialogProps): import("react/jsx-runtime").JSX.Element;
29
+ //# sourceMappingURL=Dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAKL,KAAK,iBAAiB,EACtB,KAAK,WAAW,IAAI,cAAc,EACnC,MAAM,uBAAuB,CAAC;AAG/B,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,iBAAiB,EAAE,UAAU,GAAG,WAAW,CAAC,GAAG;IAC5E;+CAC2C;IAC3C,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;oDACgD;IAChD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,oBAAoB;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,8CAA8C;IAC9C,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,uEAAuE;IACvE,IAAI,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IAC9B,2DAA2D;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,2CA8CxC"}
@@ -0,0 +1,3 @@
1
+ export { Dialog } from './Dialog';
2
+ export type { DialogProps } from './Dialog';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,25 @@
1
+ import type { ReactNode } from 'react';
2
+ export type FieldOrientation = 'stacked' | 'row';
3
+ export type FieldProps = {
4
+ orientation?: FieldOrientation;
5
+ className?: string;
6
+ children?: ReactNode;
7
+ };
8
+ /**
9
+ * Layout primitive that arranges a label, control, hint, and error in the
10
+ * canonical weasel-ui form-row shape. The control itself owns its semantics
11
+ * (RAC `TextField`, `Checkbox`, etc.); this just paints the layout.
12
+ *
13
+ * Most users will instead reach for `Input` / `Checkbox` / `Switch`, which
14
+ * compose Field internally. Use Field directly when you need a custom
15
+ * control to sit in the same visual rhythm.
16
+ */
17
+ export declare function Field({ orientation, className, children }: FieldProps): import("react/jsx-runtime").JSX.Element;
18
+ export declare const fieldClasses: {
19
+ root: string;
20
+ row: string;
21
+ label: string;
22
+ hint: string;
23
+ error: string;
24
+ };
25
+ //# sourceMappingURL=Field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Field.d.ts","sourceRoot":"","sources":["../../../src/components/Field/Field.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,KAAK,CAAC;AAEjD,MAAM,MAAM,UAAU,GAAG;IACvB,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,KAAK,CAAC,EAAE,WAAuB,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,UAAU,2CAGjF;AAED,eAAO,MAAM,YAAY;;;;;;CAMxB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { Field, fieldClasses } from './Field';
2
+ export type { FieldProps, FieldOrientation } from './Field';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Field/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC9C,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { type ReactNode } from 'react';
2
+ import { type TextFieldProps as RACTextFieldProps, type ValidationResult } from 'react-aria-components';
3
+ export type InputProps = Omit<RACTextFieldProps, 'children' | 'className'> & {
4
+ label?: ReactNode;
5
+ description?: ReactNode;
6
+ errorMessage?: ReactNode | ((v: ValidationResult) => ReactNode);
7
+ placeholder?: string;
8
+ leadingAdornment?: ReactNode;
9
+ trailingAdornment?: ReactNode;
10
+ className?: string;
11
+ };
12
+ /**
13
+ * Single-line text input wrapping React Aria's TextField. Supplies a
14
+ * default skin against the `--wzl-*` token system, and exposes the
15
+ * familiar label / description / errorMessage / adornment slot shape.
16
+ *
17
+ * `ref` forwards to the underlying `<input>`.
18
+ */
19
+ export declare const Input: import("react").ForwardRefExoticComponent<Omit<RACTextFieldProps, "children" | "className"> & {
20
+ label?: ReactNode;
21
+ description?: ReactNode;
22
+ errorMessage?: ReactNode | ((v: ValidationResult) => ReactNode);
23
+ placeholder?: string;
24
+ leadingAdornment?: ReactNode;
25
+ trailingAdornment?: ReactNode;
26
+ className?: string;
27
+ } & import("react").RefAttributes<HTMLInputElement>>;
28
+ //# sourceMappingURL=Input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AAC7D,OAAO,EAML,KAAK,cAAc,IAAI,iBAAiB,EACxC,KAAK,gBAAgB,EACtB,MAAM,uBAAuB,CAAC;AAI/B,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,iBAAiB,EAAE,UAAU,GAAG,WAAW,CAAC,GAAG;IAC3E,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,YAAY,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC,CAAC,EAAE,gBAAgB,KAAK,SAAS,CAAC,CAAC;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAC7B,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,KAAK;YAhBR,SAAS;kBACH,SAAS;mBACR,SAAS,GAAG,CAAC,CAAC,CAAC,EAAE,gBAAgB,KAAK,SAAS,CAAC;kBACjD,MAAM;uBACD,SAAS;wBACR,SAAS;gBACjB,MAAM;oDAyClB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { Input } from './Input';
2
+ export type { InputProps } from './Input';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Input/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,34 @@
1
+ import type { CSSProperties } from 'react';
2
+ export type KeycapKind = 'modifier' | 'wide' | 'square';
3
+ export declare function inferKeycapKind(label: string): KeycapKind;
4
+ export type KeyCapVariant = 'default' | 'minimal';
5
+ export interface KeyCapProps {
6
+ /** Glyph rendered in the chip (modifier or key). */
7
+ label: string;
8
+ /** Marks the chip as not required to trigger the action. In the default
9
+ * variant the chip face inverts (dark face / light glyph) for
10
+ * emphasis. In the `'minimal'` variant the chip's border becomes
11
+ * dotted to read as "may be held, but isn't required." */
12
+ inverted?: boolean;
13
+ /** Visual style. `'default'` (default) renders a filled chip; `'minimal'`
14
+ * renders an unfilled chip whose border and legend are `currentColor`
15
+ * — useful inline in colored prose / next to colored badges where the
16
+ * chip should take the surrounding text color. */
17
+ variant?: KeyCapVariant;
18
+ className?: string;
19
+ /** Optional inline style. Useful for one-off width overrides (e.g.
20
+ * building a keyboard-layout where the space bar spans several
21
+ * standard-key widths). The component sets no inline styles of its
22
+ * own — everything else comes from the CSS module. */
23
+ style?: CSSProperties;
24
+ /** Override the chip's font-family. Accepts any CSS font-family
25
+ * string. When omitted, the chip inherits from the design-system
26
+ * UI font token (`--wzl-font-ui`). Useful for one-off cases where
27
+ * a different face is desired — though the canonical move is to
28
+ * override the CSS variable at the consumer's scope, not the prop. */
29
+ font?: string;
30
+ }
31
+ /** Single bordered keycap chip for one glyph (modifier or key). Use
32
+ * `KeySequence` to render a full shortcut. */
33
+ export declare function KeyCap({ label, inverted, variant, className, style, font }: KeyCapProps): import("react/jsx-runtime").JSX.Element;
34
+ //# sourceMappingURL=Keycap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Keycap.d.ts","sourceRoot":"","sources":["../../../src/components/Keycaps/Keycap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAM3C,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,MAAM,GAAG,QAAQ,CAAC;AAExD,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,CAKzD;AAED,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,SAAS,CAAC;AAElD,MAAM,WAAW,WAAW;IAC1B,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC;IACd;;;+DAG2D;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;uDAGmD;IACnD,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;2DAGuD;IACvD,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB;;;;2EAIuE;IACvE,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;+CAC+C;AAC/C,wBAAgB,MAAM,CAAC,EAAE,KAAK,EAAE,QAAgB,EAAE,OAAmB,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,WAAW,2CAa3G"}