@weasel-js/ui 1.6.0 → 1.7.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 (530) hide show
  1. package/dist/chunks/{ActionBar-CYvfmEz0.js → ActionBar-DCq16yFA.js} +9 -9
  2. package/dist/chunks/ActionBar-DCq16yFA.js.map +1 -0
  3. package/dist/chunks/Badge-CTc9Lkwn.js +14 -0
  4. package/dist/chunks/Badge-CTc9Lkwn.js.map +1 -0
  5. package/dist/chunks/{Badge-DZ0lFs14.js → Badge-D2aD7xVL.js} +418 -369
  6. package/dist/chunks/Badge-D2aD7xVL.js.map +1 -0
  7. package/dist/chunks/BandEditor-Dd0egAgE.js +292 -0
  8. package/dist/chunks/BandEditor-Dd0egAgE.js.map +1 -0
  9. package/dist/chunks/{Button-Dyp31jMt.js → Button-BIdXHQOx.js} +3 -3
  10. package/dist/chunks/Button-BIdXHQOx.js.map +1 -0
  11. package/dist/chunks/{ButtonBar-smZzFuEo.js → ButtonBar-DIQTe5GQ.js} +4 -4
  12. package/dist/chunks/ButtonBar-DIQTe5GQ.js.map +1 -0
  13. package/dist/chunks/Callout-ndW5_Bqx.js +116 -0
  14. package/dist/chunks/Callout-ndW5_Bqx.js.map +1 -0
  15. package/dist/chunks/{Checkbox-ChZz30Ds.js → Checkbox-DHXTUHO9.js} +1 -1
  16. package/dist/chunks/Checkbox-DHXTUHO9.js.map +1 -0
  17. package/dist/chunks/CloseButton-C2J7wVfo.js +26 -0
  18. package/dist/chunks/CloseButton-C2J7wVfo.js.map +1 -0
  19. package/dist/chunks/{Code-v4tDWuuN.js → Code-AsKpgnv6.js} +3 -3
  20. package/dist/chunks/Code-AsKpgnv6.js.map +1 -0
  21. package/dist/chunks/ColorField-Yz_BkcCT.js +69 -0
  22. package/dist/chunks/ColorField-Yz_BkcCT.js.map +1 -0
  23. package/dist/chunks/{ColorModeControl-JOEiqtE0.js → ColorModeControl-BewxA0rX.js} +3 -3
  24. package/dist/chunks/ColorModeControl-BewxA0rX.js.map +1 -0
  25. package/dist/chunks/{ComboBox-C1JgIpML.js → ComboBox-B34H76CW.js} +14 -14
  26. package/dist/chunks/ComboBox-B34H76CW.js.map +1 -0
  27. package/dist/chunks/{CurveEditor-f1R4kSbD.js → CurveEditor-DUVjd25R.js} +35 -35
  28. package/dist/chunks/CurveEditor-DUVjd25R.js.map +1 -0
  29. package/dist/chunks/{DataGrid-CZPrB_3a.js → DataGrid-LZ2JgY2Y.js} +27 -27
  30. package/dist/chunks/DataGrid-LZ2JgY2Y.js.map +1 -0
  31. package/dist/chunks/DetailList-BKomDzg5.js +52 -0
  32. package/dist/chunks/DetailList-BKomDzg5.js.map +1 -0
  33. package/dist/chunks/{DetentSlider-BYyaZha6.js → DetentSlider-5uQPFucv.js} +2 -2
  34. package/dist/chunks/DetentSlider-5uQPFucv.js.map +1 -0
  35. package/dist/chunks/Dialog-DGFutQ--.js +63 -0
  36. package/dist/chunks/Dialog-DGFutQ--.js.map +1 -0
  37. package/dist/chunks/{Disclosure-D79jhmh2.js → Disclosure-Ch2KxYuB.js} +7 -7
  38. package/dist/chunks/Disclosure-Ch2KxYuB.js.map +1 -0
  39. package/dist/chunks/{DragGhost-DcU7cOwy.js → DragGhost-B5_hb9W9.js} +2 -2
  40. package/dist/chunks/DragGhost-B5_hb9W9.js.map +1 -0
  41. package/dist/chunks/{DragHandleGlyph-BtBxHjZS.js → DragGrip-AoIZXfZb.js} +2 -2
  42. package/dist/chunks/DragGrip-AoIZXfZb.js.map +1 -0
  43. package/dist/chunks/FallthroughDiagram-BEHiM5IS.js +284 -0
  44. package/dist/chunks/FallthroughDiagram-BEHiM5IS.js.map +1 -0
  45. package/dist/chunks/{Field-xbqRmjsI.js → Field--onYxXTF.js} +7 -6
  46. package/dist/chunks/Field--onYxXTF.js.map +1 -0
  47. package/dist/chunks/{FillStrokeSwatch-BViKXIPx.js → FillStrokeSwatch-DNb0KXPk.js} +11 -11
  48. package/dist/chunks/FillStrokeSwatch-DNb0KXPk.js.map +1 -0
  49. package/dist/chunks/{FontFamilySelect-r9TV_xIH.js → FontFamilySelect-DkRgNtag.js} +2 -2
  50. package/dist/chunks/FontFamilySelect-DkRgNtag.js.map +1 -0
  51. package/dist/chunks/GestureRoute-C_YGl7bJ.js +82 -0
  52. package/dist/chunks/GestureRoute-C_YGl7bJ.js.map +1 -0
  53. package/dist/chunks/GradientEditor-b7v4Ph3i.js +363 -0
  54. package/dist/chunks/GradientEditor-b7v4Ph3i.js.map +1 -0
  55. package/dist/chunks/{Icon-BW0qv_U7.js → Icon-CcVjdq2C.js} +32 -2
  56. package/dist/chunks/Icon-CcVjdq2C.js.map +1 -0
  57. package/dist/chunks/{InlineRange-BwGFDhpT.js → InlineRange-P01ABSzo.js} +3 -3
  58. package/dist/chunks/InlineRange-P01ABSzo.js.map +1 -0
  59. package/dist/chunks/{Input-Bx2cuUbS.js → Input-CHmkfYaD.js} +2 -2
  60. package/dist/chunks/Input-CHmkfYaD.js.map +1 -0
  61. package/dist/chunks/{ItemList-DzJ2lK0R.js → ItemList-Cm-HUWCi.js} +6 -7
  62. package/dist/chunks/ItemList-Cm-HUWCi.js.map +1 -0
  63. package/dist/chunks/{ItemList.module-DDUXfuZL.js → ItemList.module-BSpCSxan.js} +1 -1
  64. package/dist/chunks/ItemList.module-BSpCSxan.js.map +1 -0
  65. package/dist/chunks/{Jog-LPoac9s4.js → Jog-DRmfrkCg.js} +4 -4
  66. package/dist/chunks/Jog-DRmfrkCg.js.map +1 -0
  67. package/dist/chunks/{Keycaps-CKiKOJnJ.js → Keycaps-C-FJyG8k.js} +15 -15
  68. package/dist/chunks/Keycaps-C-FJyG8k.js.map +1 -0
  69. package/dist/chunks/{LayerList-BeGrkLb9.js → LayerList-wCI1EueM.js} +150 -154
  70. package/dist/chunks/LayerList-wCI1EueM.js.map +1 -0
  71. package/dist/chunks/ListEditor-BeA60TAA.js +71 -0
  72. package/dist/chunks/ListEditor-BeA60TAA.js.map +1 -0
  73. package/dist/chunks/{MenuButton-BcdhrNGh.js → MenuButton-BSqEChJE.js} +9 -9
  74. package/dist/chunks/MenuButton-BSqEChJE.js.map +1 -0
  75. package/dist/chunks/{MeshEditor-BOOIFWnz.js → MeshEditor-D1HLZcAh.js} +4 -4
  76. package/dist/chunks/MeshEditor-D1HLZcAh.js.map +1 -0
  77. package/dist/chunks/NumberField-BnJxcazc.js +206 -0
  78. package/dist/chunks/NumberField-BnJxcazc.js.map +1 -0
  79. package/dist/chunks/{OptionsBar-DlcagPYK.js → OptionsBar-ujxYidhj.js} +3 -3
  80. package/dist/chunks/OptionsBar-ujxYidhj.js.map +1 -0
  81. package/dist/chunks/{PaintField-B2mLRZa4.js → PaintField-DadOELMg.js} +4 -4
  82. package/dist/chunks/PaintField-DadOELMg.js.map +1 -0
  83. package/dist/chunks/PaintInput-v8Y7MDbH.js +121 -0
  84. package/dist/chunks/PaintInput-v8Y7MDbH.js.map +1 -0
  85. package/dist/chunks/{PatternPicker-DdfpxoQy.js → PatternPicker-R_EQtw2Q.js} +2 -2
  86. package/dist/chunks/PatternPicker-R_EQtw2Q.js.map +1 -0
  87. package/dist/chunks/{Plot2D-lyO7waPQ.js → Plot2D-CTXHkL5p.js} +13 -13
  88. package/dist/chunks/Plot2D-CTXHkL5p.js.map +1 -0
  89. package/dist/chunks/{PointPlotter-DGs9i5P-.js → PointPlotter-ldI4RrU1.js} +5 -4
  90. package/dist/chunks/PointPlotter-ldI4RrU1.js.map +1 -0
  91. package/dist/chunks/Powerline-DNyH885r.js +42 -0
  92. package/dist/chunks/Powerline-DNyH885r.js.map +1 -0
  93. package/dist/chunks/{Prefs-Ctu0H4-b.js → Prefs-ByA-x51i.js} +60 -47
  94. package/dist/chunks/Prefs-ByA-x51i.js.map +1 -0
  95. package/dist/chunks/{Properties-Bbneh1ws.js → Properties-DmAeQ3mk.js} +43 -36
  96. package/dist/chunks/Properties-DmAeQ3mk.js.map +1 -0
  97. package/dist/chunks/PropertyField-DfIJJ5GS.js +673 -0
  98. package/dist/chunks/PropertyField-DfIJJ5GS.js.map +1 -0
  99. package/dist/chunks/{RadioGroup-BK2mD6Q0.js → RadioGroup-Bh4-12e-.js} +2 -2
  100. package/dist/chunks/RadioGroup-Bh4-12e-.js.map +1 -0
  101. package/dist/chunks/{RangeSlider-BiRAOsTh.js → RangeSlider-SEGE-7VF.js} +8 -8
  102. package/dist/chunks/RangeSlider-SEGE-7VF.js.map +1 -0
  103. package/dist/chunks/{ResizeHandle-Cc6EOehs.js → ResizeHandle-rKVWyeTG.js} +9 -9
  104. package/dist/chunks/ResizeHandle-rKVWyeTG.js.map +1 -0
  105. package/dist/chunks/Select-ClmKtyWg.js +229 -0
  106. package/dist/chunks/Select-ClmKtyWg.js.map +1 -0
  107. package/dist/chunks/SelectionPanel-BaQnX4Bs.js +106 -0
  108. package/dist/chunks/SelectionPanel-BaQnX4Bs.js.map +1 -0
  109. package/dist/chunks/{Sidebar-DKKd4R-x.js → Sidebar-BZ0m4afn.js} +8 -8
  110. package/dist/chunks/Sidebar-BZ0m4afn.js.map +1 -0
  111. package/dist/chunks/SidebarPanel-BblDEz4G.js +53 -0
  112. package/dist/chunks/SidebarPanel-BblDEz4G.js.map +1 -0
  113. package/dist/chunks/Slider-YofwGOI4.js +389 -0
  114. package/dist/chunks/Slider-YofwGOI4.js.map +1 -0
  115. package/dist/chunks/{StatusBar-CdPdmmda.js → StatusBar-Ca9Dvhhq.js} +13 -13
  116. package/dist/chunks/StatusBar-Ca9Dvhhq.js.map +1 -0
  117. package/dist/chunks/{SwatchGrid-C-Zx2Exd.js → SwatchGrid-BYvA8Bmh.js} +3 -3
  118. package/dist/chunks/{SwatchGrid-C-Zx2Exd.js.map → SwatchGrid-BYvA8Bmh.js.map} +1 -1
  119. package/dist/chunks/{Switch-DxF7TsEu.js → Switch-CSYmcM8y.js} +1 -1
  120. package/dist/chunks/Switch-CSYmcM8y.js.map +1 -0
  121. package/dist/chunks/{Tabs-GXEfoe3o.js → Tabs-BbpzLLdY.js} +1 -1
  122. package/dist/chunks/Tabs-BbpzLLdY.js.map +1 -0
  123. package/dist/chunks/ThemeSwitcher-BlsInAmR.js +38 -0
  124. package/dist/chunks/ThemeSwitcher-BlsInAmR.js.map +1 -0
  125. package/dist/chunks/{Timeline-SgmpQtUV.js → Timeline-B39cwfMB.js} +213 -209
  126. package/dist/chunks/Timeline-B39cwfMB.js.map +1 -0
  127. package/dist/chunks/{Toast-BfcljZz6.js → Toast-BF9GE0HC.js} +25 -27
  128. package/dist/chunks/Toast-BF9GE0HC.js.map +1 -0
  129. package/dist/chunks/{ToggleBar-Btnl5r7F.js → ToggleBar-BTYkBXU9.js} +20 -18
  130. package/dist/chunks/ToggleBar-BTYkBXU9.js.map +1 -0
  131. package/dist/chunks/{TokenPanel-5ajHEHha.js → TokenPanel-CMDAOfYH.js} +21 -18
  132. package/dist/chunks/TokenPanel-CMDAOfYH.js.map +1 -0
  133. package/dist/chunks/{ToolButton-rzqlFlAc.js → ToolButton-CAHBa08P.js} +7 -7
  134. package/dist/chunks/ToolButton-CAHBa08P.js.map +1 -0
  135. package/dist/chunks/{ToolGroup-4bUBV5k6.js → ToolGroup-Dpg1LN0l.js} +7 -7
  136. package/dist/chunks/ToolGroup-Dpg1LN0l.js.map +1 -0
  137. package/dist/chunks/{ToolOptionsBar-BF3TNXA3.js → ToolOptionsBar-D_GCrBAN.js} +12 -10
  138. package/dist/chunks/ToolOptionsBar-D_GCrBAN.js.map +1 -0
  139. package/dist/chunks/{ToolPalette-Uw4PvWwa.js → ToolPalette-OOWN51Xx.js} +7 -7
  140. package/dist/chunks/ToolPalette-OOWN51Xx.js.map +1 -0
  141. package/dist/chunks/{Tooltip-9XiJF937.js → Tooltip-Clg2mhSt.js} +2 -2
  142. package/dist/chunks/Tooltip-Clg2mhSt.js.map +1 -0
  143. package/dist/chunks/{Tree-BGt6P8tI.js → Tree-Cc8lIzgM.js} +3 -3
  144. package/dist/chunks/Tree-Cc8lIzgM.js.map +1 -0
  145. package/dist/chunks/{createKeyframeLayer-BzDRCrrh.js → createKeyframeLayer-DVl321_l.js} +46 -47
  146. package/dist/chunks/createKeyframeLayer-DVl321_l.js.map +1 -0
  147. package/dist/chunks/{dlog-CMYiRF3Q.js → dlog-F0I8KsIW.js} +2 -2
  148. package/dist/chunks/dlog-F0I8KsIW.js.map +1 -0
  149. package/dist/chunks/{formatShortcut-BoGqUoWi.js → formatShortcut-DRQrVThu.js} +2 -2
  150. package/dist/chunks/formatShortcut-DRQrVThu.js.map +1 -0
  151. package/dist/chunks/icons-BhcR1l64.js +162 -0
  152. package/dist/chunks/icons-BhcR1l64.js.map +1 -0
  153. package/dist/chunks/{interactiveTarget-C7QUBaJN.js → interactiveTarget-BNZmTow2.js} +1 -1
  154. package/dist/chunks/{interactiveTarget-C7QUBaJN.js.map → interactiveTarget-BNZmTow2.js.map} +1 -1
  155. package/dist/chunks/{keyGlyph-CLvUHU8c.js → keyGlyph-C0qTakG-.js} +1 -1
  156. package/dist/chunks/keyGlyph-C0qTakG-.js.map +1 -0
  157. package/dist/chunks/{model-BQMvTLnW.js → model-BaF65rnX.js} +95 -90
  158. package/dist/chunks/model-BaF65rnX.js.map +1 -0
  159. package/dist/chunks/{paintPreview-DPtZS4yU.js → paintPreview-CuSZiHpR.js} +1 -1
  160. package/dist/chunks/paintPreview-CuSZiHpR.js.map +1 -0
  161. package/dist/chunks/{paintValue-Bz6AVuh3.js → paintValue-BpaGPjV3.js} +3 -3
  162. package/dist/chunks/paintValue-BpaGPjV3.js.map +1 -0
  163. package/dist/chunks/{portalHost-CjpCnuGU.js → portalHost-yTOVuCej.js} +1 -1
  164. package/dist/chunks/portalHost-yTOVuCej.js.map +1 -0
  165. package/dist/chunks/{prefField-CLkhrvYl.js → prefField-BopW9bjx.js} +18 -14
  166. package/dist/chunks/prefField-BopW9bjx.js.map +1 -0
  167. package/dist/chunks/{segmentTooltip-CAkZlW-t.js → segmentTooltip-CStYHKzd.js} +2 -2
  168. package/dist/chunks/segmentTooltip-CStYHKzd.js.map +1 -0
  169. package/dist/chunks/segmentedControl.module-D6SzYJD7.js +11 -0
  170. package/dist/chunks/segmentedControl.module-D6SzYJD7.js.map +1 -0
  171. package/dist/chunks/{snap-DC4Km8xG.js → snap-DRjbOiG9.js} +1 -1
  172. package/dist/chunks/snap-DRjbOiG9.js.map +1 -0
  173. package/dist/chunks/{stance-CarrcbbP.js → stance-BFQpS_fL.js} +1 -1
  174. package/dist/chunks/stance-BFQpS_fL.js.map +1 -0
  175. package/dist/chunks/{useReorderDragList-Dcezzgix.js → useReorderDragList-FCMoFIzH.js} +3 -3
  176. package/dist/chunks/useReorderDragList-FCMoFIzH.js.map +1 -0
  177. package/dist/chunks/{useRovingTabIndex-B4uJqiKP.js → useRovingTabIndex-Bp_hYm_h.js} +1 -1
  178. package/dist/chunks/useRovingTabIndex-Bp_hYm_h.js.map +1 -0
  179. package/dist/components/ActionBar/ActionBar.d.ts +1 -1
  180. package/dist/components/ActionBar/ActionBar.d.ts.map +1 -1
  181. package/dist/components/ActionBar/index.js +1 -1
  182. package/dist/components/Badge/bases/Powerline.d.ts.map +1 -1
  183. package/dist/components/Badge/bases/edgeProfiles.d.ts +31 -4
  184. package/dist/components/Badge/bases/edgeProfiles.d.ts.map +1 -1
  185. package/dist/components/Badge/index.d.ts +1 -0
  186. package/dist/components/Badge/index.d.ts.map +1 -1
  187. package/dist/components/Badge/index.js +3 -2
  188. package/dist/components/Badge/statusIcons.d.ts +5 -0
  189. package/dist/components/Badge/statusIcons.d.ts.map +1 -0
  190. package/dist/components/BandEditor/BandEditor.d.ts +16 -7
  191. package/dist/components/BandEditor/BandEditor.d.ts.map +1 -1
  192. package/dist/components/BandEditor/bands.d.ts +5 -2
  193. package/dist/components/BandEditor/bands.d.ts.map +1 -1
  194. package/dist/components/BandEditor/index.js +1 -1
  195. package/dist/components/Button/index.js +1 -1
  196. package/dist/components/ButtonBar/index.js +1 -1
  197. package/dist/components/Callout/Callout.d.ts +3 -3
  198. package/dist/components/Callout/Callout.d.ts.map +1 -1
  199. package/dist/components/Callout/index.js +1 -1
  200. package/dist/components/Checkbox/index.js +1 -1
  201. package/dist/components/CloseButton/CloseButton.d.ts +21 -0
  202. package/dist/components/CloseButton/CloseButton.d.ts.map +1 -0
  203. package/dist/components/CloseButton/index.d.ts +3 -0
  204. package/dist/components/CloseButton/index.d.ts.map +1 -0
  205. package/dist/components/CloseButton/index.js +2 -0
  206. package/dist/components/Code/Code.d.ts +1 -1
  207. package/dist/components/Code/Code.d.ts.map +1 -1
  208. package/dist/components/Code/index.js +1 -1
  209. package/dist/components/ColorField/ColorField.d.ts +6 -2
  210. package/dist/components/ColorField/ColorField.d.ts.map +1 -1
  211. package/dist/components/ColorField/index.js +1 -1
  212. package/dist/components/ColorModeControl/index.js +1 -1
  213. package/dist/components/ComboBox/ComboBox.d.ts +2 -2
  214. package/dist/components/ComboBox/ComboBox.d.ts.map +1 -1
  215. package/dist/components/ComboBox/index.js +1 -1
  216. package/dist/components/CurveEditor/CurveEditor.d.ts +1 -1
  217. package/dist/components/CurveEditor/CurveEditor.d.ts.map +1 -1
  218. package/dist/components/CurveEditor/LayeredCurveEditor.d.ts +1 -1
  219. package/dist/components/CurveEditor/LayeredCurveEditor.d.ts.map +1 -1
  220. package/dist/components/CurveEditor/index.js +3 -3
  221. package/dist/components/DataGrid/DataGrid.d.ts +1 -1
  222. package/dist/components/DataGrid/DataGrid.d.ts.map +1 -1
  223. package/dist/components/DataGrid/index.js +1 -1
  224. package/dist/components/DetailList/DetailList.d.ts +31 -5
  225. package/dist/components/DetailList/DetailList.d.ts.map +1 -1
  226. package/dist/components/DetailList/index.d.ts +1 -1
  227. package/dist/components/DetailList/index.d.ts.map +1 -1
  228. package/dist/components/DetailList/index.js +1 -1
  229. package/dist/components/DetentSlider/index.js +1 -1
  230. package/dist/components/Dialog/Dialog.d.ts +1 -1
  231. package/dist/components/Dialog/Dialog.d.ts.map +1 -1
  232. package/dist/components/Dialog/index.js +1 -1
  233. package/dist/components/Disclosure/Disclosure.d.ts +4 -4
  234. package/dist/components/Disclosure/Disclosure.d.ts.map +1 -1
  235. package/dist/components/Disclosure/index.js +1 -1
  236. package/dist/components/DragGhost/index.js +1 -1
  237. package/dist/components/{DragHandleGlyph/DragHandleGlyph.d.ts → DragGrip/DragGrip.d.ts} +4 -4
  238. package/dist/components/DragGrip/DragGrip.d.ts.map +1 -0
  239. package/dist/components/DragGrip/index.d.ts +3 -0
  240. package/dist/components/DragGrip/index.d.ts.map +1 -0
  241. package/dist/components/DragGrip/index.js +2 -0
  242. package/dist/components/FallthroughDiagram/FallthroughDiagram.d.ts +14 -0
  243. package/dist/components/FallthroughDiagram/FallthroughDiagram.d.ts.map +1 -0
  244. package/dist/components/FallthroughDiagram/fixtures.d.ts +17 -0
  245. package/dist/components/FallthroughDiagram/fixtures.d.ts.map +1 -0
  246. package/dist/components/FallthroughDiagram/index.d.ts +3 -0
  247. package/dist/components/FallthroughDiagram/index.d.ts.map +1 -0
  248. package/dist/components/FallthroughDiagram/index.js +2 -0
  249. package/dist/components/Field/Field.d.ts +1 -1
  250. package/dist/components/Field/Field.d.ts.map +1 -1
  251. package/dist/components/Field/index.js +1 -1
  252. package/dist/components/FillStrokeSwatch/index.js +1 -1
  253. package/dist/components/FontFamilySelect/FontFamilySelect.d.ts +1 -1
  254. package/dist/components/FontFamilySelect/FontFamilySelect.d.ts.map +1 -1
  255. package/dist/components/FontFamilySelect/index.js +1 -1
  256. package/dist/components/GestureRoute/GestureRoute.d.ts +19 -0
  257. package/dist/components/GestureRoute/GestureRoute.d.ts.map +1 -0
  258. package/dist/components/GestureRoute/index.d.ts +3 -0
  259. package/dist/components/GestureRoute/index.d.ts.map +1 -0
  260. package/dist/components/GestureRoute/index.js +2 -0
  261. package/dist/components/GradientEditor/GradientEditor.d.ts +22 -8
  262. package/dist/components/GradientEditor/GradientEditor.d.ts.map +1 -1
  263. package/dist/components/GradientEditor/index.js +1 -1
  264. package/dist/components/InlineRange/index.js +1 -1
  265. package/dist/components/Input/index.js +1 -1
  266. package/dist/components/ItemList/index.js +1 -1
  267. package/dist/components/Jog/Jog.d.ts +1 -1
  268. package/dist/components/Jog/Jog.d.ts.map +1 -1
  269. package/dist/components/Jog/index.js +1 -1
  270. package/dist/components/Keycaps/Keycap.d.ts +1 -1
  271. package/dist/components/Keycaps/Keycap.d.ts.map +1 -1
  272. package/dist/components/Keycaps/Keycaps.d.ts +11 -5
  273. package/dist/components/Keycaps/Keycaps.d.ts.map +1 -1
  274. package/dist/components/Keycaps/index.d.ts +1 -1
  275. package/dist/components/Keycaps/index.d.ts.map +1 -1
  276. package/dist/components/Keycaps/index.js +2 -2
  277. package/dist/components/LayerList/LayerList.d.ts +2 -2
  278. package/dist/components/LayerList/LayerList.d.ts.map +1 -1
  279. package/dist/components/LayerList/index.js +1 -1
  280. package/dist/components/ListEditor/ListEditor.d.ts +1 -1
  281. package/dist/components/ListEditor/ListEditor.d.ts.map +1 -1
  282. package/dist/components/ListEditor/index.js +1 -1
  283. package/dist/components/MenuButton/MenuButton.d.ts +1 -1
  284. package/dist/components/MenuButton/MenuButton.d.ts.map +1 -1
  285. package/dist/components/MenuButton/index.js +1 -1
  286. package/dist/components/MeshEditor/index.js +1 -1
  287. package/dist/components/NumberField/UnitField.d.ts +20 -7
  288. package/dist/components/NumberField/UnitField.d.ts.map +1 -1
  289. package/dist/components/NumberField/index.js +1 -1
  290. package/dist/components/OptionsBar/index.js +1 -1
  291. package/dist/components/PaintField/index.js +1 -1
  292. package/dist/components/PaintInput/PaintInput.d.ts.map +1 -1
  293. package/dist/components/PaintInput/index.js +1 -1
  294. package/dist/components/PatternPicker/index.js +1 -1
  295. package/dist/components/Plot2D/index.js +1 -1
  296. package/dist/components/PointPlotter/PointPlotter.d.ts +1 -1
  297. package/dist/components/PointPlotter/PointPlotter.d.ts.map +1 -1
  298. package/dist/components/PointPlotter/index.js +1 -1
  299. package/dist/components/Powerline/Powerline.d.ts +1 -1
  300. package/dist/components/Powerline/Powerline.d.ts.map +1 -1
  301. package/dist/components/Powerline/index.d.ts +1 -1
  302. package/dist/components/Powerline/index.d.ts.map +1 -1
  303. package/dist/components/Powerline/index.js +2 -2
  304. package/dist/components/Prefs/PrefsDialog.d.ts +1 -1
  305. package/dist/components/Prefs/PrefsDialog.d.ts.map +1 -1
  306. package/dist/components/Prefs/PrefsForm.d.ts +1 -1
  307. package/dist/components/Prefs/PrefsForm.d.ts.map +1 -1
  308. package/dist/components/Prefs/PrefsPane.d.ts +1 -1
  309. package/dist/components/Prefs/PrefsPane.d.ts.map +1 -1
  310. package/dist/components/Prefs/PrefsRail.d.ts +1 -1
  311. package/dist/components/Prefs/PrefsRail.d.ts.map +1 -1
  312. package/dist/components/Prefs/PrefsRow.d.ts +1 -1
  313. package/dist/components/Prefs/PrefsRow.d.ts.map +1 -1
  314. package/dist/components/Prefs/index.d.ts +1 -1
  315. package/dist/components/Prefs/index.d.ts.map +1 -1
  316. package/dist/components/Prefs/index.js +2 -2
  317. package/dist/components/Prefs/prefField.d.ts.map +1 -1
  318. package/dist/components/Prefs/schema.d.ts +2 -2
  319. package/dist/components/Prefs/schema.d.ts.map +1 -1
  320. package/dist/components/Properties/CurveField.d.ts +1 -1
  321. package/dist/components/Properties/CurveField.d.ts.map +1 -1
  322. package/dist/components/Properties/DialogRow.d.ts +1 -1
  323. package/dist/components/Properties/DialogRow.d.ts.map +1 -1
  324. package/dist/components/Properties/PropertyField.d.ts +24 -32
  325. package/dist/components/Properties/PropertyField.d.ts.map +1 -1
  326. package/dist/components/Properties/PropertyGroup.d.ts +1 -1
  327. package/dist/components/Properties/PropertyGroup.d.ts.map +1 -1
  328. package/dist/components/Properties/PropertyPanel.d.ts +4 -11
  329. package/dist/components/Properties/PropertyPanel.d.ts.map +1 -1
  330. package/dist/components/Properties/Subpanel.d.ts +1 -1
  331. package/dist/components/Properties/Subpanel.d.ts.map +1 -1
  332. package/dist/components/Properties/index.d.ts +1 -1
  333. package/dist/components/Properties/index.d.ts.map +1 -1
  334. package/dist/components/Properties/index.js +2 -2
  335. package/dist/components/Properties/storyLayouts.d.ts +1 -1
  336. package/dist/components/Properties/storyLayouts.d.ts.map +1 -1
  337. package/dist/components/RadioGroup/RadioGroup.d.ts +2 -2
  338. package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -1
  339. package/dist/components/RadioGroup/index.js +1 -1
  340. package/dist/components/RangeSlider/RangeSlider.d.ts +1 -1
  341. package/dist/components/RangeSlider/RangeSlider.d.ts.map +1 -1
  342. package/dist/components/RangeSlider/index.js +1 -1
  343. package/dist/components/ResizeHandle/ResizeHandle.d.ts +1 -1
  344. package/dist/components/ResizeHandle/ResizeHandle.d.ts.map +1 -1
  345. package/dist/components/ResizeHandle/index.js +1 -1
  346. package/dist/components/Select/Select.d.ts +3 -3
  347. package/dist/components/Select/Select.d.ts.map +1 -1
  348. package/dist/components/Select/index.js +1 -1
  349. package/dist/components/SelectionPanel/SelectionPanel.d.ts +1 -1
  350. package/dist/components/SelectionPanel/SelectionPanel.d.ts.map +1 -1
  351. package/dist/components/SelectionPanel/index.js +2 -2
  352. package/dist/components/SelectionPanel/renderLeaf.d.ts +7 -0
  353. package/dist/components/SelectionPanel/renderLeaf.d.ts.map +1 -1
  354. package/dist/components/Sidebar/Sidebar.d.ts +1 -1
  355. package/dist/components/Sidebar/Sidebar.d.ts.map +1 -1
  356. package/dist/components/Sidebar/index.js +1 -1
  357. package/dist/components/SidebarPanel/SidebarPanel.d.ts +2 -2
  358. package/dist/components/SidebarPanel/SidebarPanel.d.ts.map +1 -1
  359. package/dist/components/SidebarPanel/index.js +1 -1
  360. package/dist/components/Slider/Slider.d.ts +21 -3
  361. package/dist/components/Slider/Slider.d.ts.map +1 -1
  362. package/dist/components/Slider/index.js +1 -1
  363. package/dist/components/StatusBar/StatusBar.d.ts +3 -3
  364. package/dist/components/StatusBar/StatusBar.d.ts.map +1 -1
  365. package/dist/components/StatusBar/index.js +1 -1
  366. package/dist/components/SwatchGrid/index.js +1 -1
  367. package/dist/components/Switch/index.js +1 -1
  368. package/dist/components/Tabs/Tabs.d.ts +4 -4
  369. package/dist/components/Tabs/Tabs.d.ts.map +1 -1
  370. package/dist/components/Tabs/index.js +1 -1
  371. package/dist/components/ThemeSwitcher/ThemeSwitcher.d.ts +38 -0
  372. package/dist/components/ThemeSwitcher/ThemeSwitcher.d.ts.map +1 -0
  373. package/dist/components/ThemeSwitcher/index.d.ts +3 -0
  374. package/dist/components/ThemeSwitcher/index.d.ts.map +1 -0
  375. package/dist/components/ThemeSwitcher/index.js +2 -0
  376. package/dist/components/Timeline/Transport.d.ts.map +1 -1
  377. package/dist/components/Timeline/index.js +1 -1
  378. package/dist/components/Toast/Toast.d.ts +1 -1
  379. package/dist/components/Toast/Toast.d.ts.map +1 -1
  380. package/dist/components/Toast/index.js +1 -1
  381. package/dist/components/ToggleBar/index.js +1 -1
  382. package/dist/components/TokenPanel/TokenPanel.d.ts +1 -1
  383. package/dist/components/TokenPanel/TokenPanel.d.ts.map +1 -1
  384. package/dist/components/TokenPanel/index.js +1 -1
  385. package/dist/components/ToolButton/ToolButton.d.ts +1 -1
  386. package/dist/components/ToolButton/ToolButton.d.ts.map +1 -1
  387. package/dist/components/ToolButton/index.js +1 -1
  388. package/dist/components/ToolGroup/ToolGroup.d.ts +1 -1
  389. package/dist/components/ToolGroup/ToolGroup.d.ts.map +1 -1
  390. package/dist/components/ToolGroup/index.js +1 -1
  391. package/dist/components/ToolOptionsBar/ToolOptionsBar.d.ts +1 -1
  392. package/dist/components/ToolOptionsBar/ToolOptionsBar.d.ts.map +1 -1
  393. package/dist/components/ToolOptionsBar/index.js +1 -1
  394. package/dist/components/ToolPalette/ToolPalette.d.ts +3 -2
  395. package/dist/components/ToolPalette/ToolPalette.d.ts.map +1 -1
  396. package/dist/components/ToolPalette/index.js +2 -2
  397. package/dist/components/Tooltip/Tooltip.d.ts +2 -2
  398. package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
  399. package/dist/components/Tooltip/index.js +1 -1
  400. package/dist/components/Tree/index.js +1 -1
  401. package/dist/components/spin.d.ts +16 -0
  402. package/dist/components/spin.d.ts.map +1 -0
  403. package/dist/components/stanceSurfaces.d.ts.map +1 -1
  404. package/dist/icons/Icon.d.ts +1 -1
  405. package/dist/icons/Icon.d.ts.map +1 -1
  406. package/dist/icons/index.d.ts +52 -54
  407. package/dist/icons/index.d.ts.map +1 -1
  408. package/dist/icons/paths.d.ts +10 -0
  409. package/dist/icons/paths.d.ts.map +1 -1
  410. package/dist/index.d.ts +6 -2
  411. package/dist/index.d.ts.map +1 -1
  412. package/dist/index.js +86 -83
  413. package/dist/index.js.map +1 -1
  414. package/dist/overlays/portalHost.d.ts +1 -1
  415. package/dist/overlays/portalHost.d.ts.map +1 -1
  416. package/dist/paintGradientTrack.d.ts +5 -2
  417. package/dist/paintGradientTrack.d.ts.map +1 -1
  418. package/dist/style.css +1 -1
  419. package/dist/useReorderDragList.d.ts +1 -1
  420. package/dist/useReorderDragList.d.ts.map +1 -1
  421. package/package.json +9 -8
  422. package/dist/chunks/ActionBar-CYvfmEz0.js.map +0 -1
  423. package/dist/chunks/Badge-DZ0lFs14.js.map +0 -1
  424. package/dist/chunks/BandEditor-D-nVrVO4.js +0 -247
  425. package/dist/chunks/BandEditor-D-nVrVO4.js.map +0 -1
  426. package/dist/chunks/Button-Dyp31jMt.js.map +0 -1
  427. package/dist/chunks/ButtonBar-smZzFuEo.js.map +0 -1
  428. package/dist/chunks/Callout-xLjnx7Mp.js +0 -119
  429. package/dist/chunks/Callout-xLjnx7Mp.js.map +0 -1
  430. package/dist/chunks/Checkbox-ChZz30Ds.js.map +0 -1
  431. package/dist/chunks/Code-v4tDWuuN.js.map +0 -1
  432. package/dist/chunks/ColorField-DJSCuSJv.js +0 -60
  433. package/dist/chunks/ColorField-DJSCuSJv.js.map +0 -1
  434. package/dist/chunks/ColorModeControl-JOEiqtE0.js.map +0 -1
  435. package/dist/chunks/ComboBox-C1JgIpML.js.map +0 -1
  436. package/dist/chunks/CurveEditor-f1R4kSbD.js.map +0 -1
  437. package/dist/chunks/DataGrid-CZPrB_3a.js.map +0 -1
  438. package/dist/chunks/DetailList-DHaXX4TG.js +0 -43
  439. package/dist/chunks/DetailList-DHaXX4TG.js.map +0 -1
  440. package/dist/chunks/DetentSlider-BYyaZha6.js.map +0 -1
  441. package/dist/chunks/Dialog-GIvjoDQj.js +0 -66
  442. package/dist/chunks/Dialog-GIvjoDQj.js.map +0 -1
  443. package/dist/chunks/Disclosure-D79jhmh2.js.map +0 -1
  444. package/dist/chunks/DragGhost-DcU7cOwy.js.map +0 -1
  445. package/dist/chunks/DragHandleGlyph-BtBxHjZS.js.map +0 -1
  446. package/dist/chunks/Field-xbqRmjsI.js.map +0 -1
  447. package/dist/chunks/FillStrokeSwatch-BViKXIPx.js.map +0 -1
  448. package/dist/chunks/FontFamilySelect-r9TV_xIH.js.map +0 -1
  449. package/dist/chunks/GradientEditor-BRTxHG-W.js +0 -333
  450. package/dist/chunks/GradientEditor-BRTxHG-W.js.map +0 -1
  451. package/dist/chunks/Icon-BW0qv_U7.js.map +0 -1
  452. package/dist/chunks/InlineRange-BwGFDhpT.js.map +0 -1
  453. package/dist/chunks/Input-Bx2cuUbS.js.map +0 -1
  454. package/dist/chunks/ItemList-DzJ2lK0R.js.map +0 -1
  455. package/dist/chunks/ItemList.module-DDUXfuZL.js.map +0 -1
  456. package/dist/chunks/Jog-LPoac9s4.js.map +0 -1
  457. package/dist/chunks/Keycaps-CKiKOJnJ.js.map +0 -1
  458. package/dist/chunks/LayerList-BeGrkLb9.js.map +0 -1
  459. package/dist/chunks/ListEditor-C6zLzCsJ.js +0 -74
  460. package/dist/chunks/ListEditor-C6zLzCsJ.js.map +0 -1
  461. package/dist/chunks/MenuButton-BcdhrNGh.js.map +0 -1
  462. package/dist/chunks/MeshEditor-BOOIFWnz.js.map +0 -1
  463. package/dist/chunks/NumberField-C1Y7zP-a.js +0 -117
  464. package/dist/chunks/NumberField-C1Y7zP-a.js.map +0 -1
  465. package/dist/chunks/OptionsBar-DlcagPYK.js.map +0 -1
  466. package/dist/chunks/PaintField-B2mLRZa4.js.map +0 -1
  467. package/dist/chunks/PaintInput-BFKhd83I.js +0 -131
  468. package/dist/chunks/PaintInput-BFKhd83I.js.map +0 -1
  469. package/dist/chunks/PatternPicker-DdfpxoQy.js.map +0 -1
  470. package/dist/chunks/Plot2D-lyO7waPQ.js.map +0 -1
  471. package/dist/chunks/PointPlotter-DGs9i5P-.js.map +0 -1
  472. package/dist/chunks/Powerline-DBEPceLE.js +0 -38
  473. package/dist/chunks/Powerline-DBEPceLE.js.map +0 -1
  474. package/dist/chunks/Prefs-Ctu0H4-b.js.map +0 -1
  475. package/dist/chunks/Properties-Bbneh1ws.js.map +0 -1
  476. package/dist/chunks/PropertyField-CDb19d3F.js +0 -756
  477. package/dist/chunks/PropertyField-CDb19d3F.js.map +0 -1
  478. package/dist/chunks/RadioGroup-BK2mD6Q0.js.map +0 -1
  479. package/dist/chunks/RangeSlider-BiRAOsTh.js.map +0 -1
  480. package/dist/chunks/ResizeHandle-Cc6EOehs.js.map +0 -1
  481. package/dist/chunks/Select-DVValBe1.js +0 -225
  482. package/dist/chunks/Select-DVValBe1.js.map +0 -1
  483. package/dist/chunks/SelectionPanel-C5LmZA7b.js +0 -103
  484. package/dist/chunks/SelectionPanel-C5LmZA7b.js.map +0 -1
  485. package/dist/chunks/Sidebar-DKKd4R-x.js.map +0 -1
  486. package/dist/chunks/SidebarPanel-u5NsuAZY.js +0 -55
  487. package/dist/chunks/SidebarPanel-u5NsuAZY.js.map +0 -1
  488. package/dist/chunks/Slider-BwRrWHFW.js +0 -381
  489. package/dist/chunks/Slider-BwRrWHFW.js.map +0 -1
  490. package/dist/chunks/StatusBar-CdPdmmda.js.map +0 -1
  491. package/dist/chunks/Switch-DxF7TsEu.js.map +0 -1
  492. package/dist/chunks/Tabs-GXEfoe3o.js.map +0 -1
  493. package/dist/chunks/Timeline-SgmpQtUV.js.map +0 -1
  494. package/dist/chunks/Toast-BfcljZz6.js.map +0 -1
  495. package/dist/chunks/ToggleBar-Btnl5r7F.js.map +0 -1
  496. package/dist/chunks/TokenPanel-5ajHEHha.js.map +0 -1
  497. package/dist/chunks/ToolButton-rzqlFlAc.js.map +0 -1
  498. package/dist/chunks/ToolGroup-4bUBV5k6.js.map +0 -1
  499. package/dist/chunks/ToolOptionsBar-BF3TNXA3.js.map +0 -1
  500. package/dist/chunks/ToolPalette-Uw4PvWwa.js.map +0 -1
  501. package/dist/chunks/Tooltip-9XiJF937.js.map +0 -1
  502. package/dist/chunks/Tree-BGt6P8tI.js.map +0 -1
  503. package/dist/chunks/createKeyframeLayer-BzDRCrrh.js.map +0 -1
  504. package/dist/chunks/dlog-CMYiRF3Q.js.map +0 -1
  505. package/dist/chunks/formatShortcut-BoGqUoWi.js.map +0 -1
  506. package/dist/chunks/icons-DbScMMqX.js +0 -179
  507. package/dist/chunks/icons-DbScMMqX.js.map +0 -1
  508. package/dist/chunks/keyGlyph-CLvUHU8c.js.map +0 -1
  509. package/dist/chunks/model-BQMvTLnW.js.map +0 -1
  510. package/dist/chunks/number-6S8IzXVt.js +0 -89
  511. package/dist/chunks/number-6S8IzXVt.js.map +0 -1
  512. package/dist/chunks/paintPreview-DPtZS4yU.js.map +0 -1
  513. package/dist/chunks/paintValue-Bz6AVuh3.js.map +0 -1
  514. package/dist/chunks/portalHost-CjpCnuGU.js.map +0 -1
  515. package/dist/chunks/prefField-CLkhrvYl.js.map +0 -1
  516. package/dist/chunks/segmentTooltip-CAkZlW-t.js.map +0 -1
  517. package/dist/chunks/segmentedControl.module-D2nw68Yo.js +0 -11
  518. package/dist/chunks/segmentedControl.module-D2nw68Yo.js.map +0 -1
  519. package/dist/chunks/snap-DC4Km8xG.js.map +0 -1
  520. package/dist/chunks/stance-CarrcbbP.js.map +0 -1
  521. package/dist/chunks/useReorderDragList-Dcezzgix.js.map +0 -1
  522. package/dist/chunks/useRovingTabIndex-B4uJqiKP.js.map +0 -1
  523. package/dist/components/DragHandleGlyph/DragHandleGlyph.d.ts.map +0 -1
  524. package/dist/components/DragHandleGlyph/index.d.ts +0 -3
  525. package/dist/components/DragHandleGlyph/index.d.ts.map +0 -1
  526. package/dist/components/DragHandleGlyph/index.js +0 -2
  527. package/dist/format/number.d.ts +0 -56
  528. package/dist/format/number.d.ts.map +0 -1
  529. package/dist/icons/ShapeKindIcon.d.ts +0 -10
  530. package/dist/icons/ShapeKindIcon.d.ts.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PaintInput-v8Y7MDbH.js","names":["s","ICON_PATHS","ColorField","ToggleBar","GradientEditor","PatternPicker","PaintInput_module_default","FALLBACK_COLOR","NONE","solidHex8","hex8","toHex8","paint","withAlpha01","getAlpha01","paintAlpha","solidFromField","solid","color","isPattern","kindOf","PaintInput","props","ariaLabel","remembered","useRef","active","mixed","value","entries","listPaintKinds","kinds","entry","segment","icon","id","Icon","label","items","allowNone","currentColor","useCallback","getPaintKind","switchKind","kind","seen","converted","switchGradientKind","onChange","unset","className","renderBody","Editor","onInput"],"sources":["../../src/components/PaintInput/PaintInput.module.css","../../src/components/PaintInput/PaintInput.tsx"],"sourcesContent":["/* Kind switch stacked over whichever paint body it selects. */\n.root {\n display: flex;\n flex-direction: column;\n gap: var(--wzl-space-3);\n min-inline-size: 0;\n}\n\n/* A value is in effect but nobody chose it. Never louder than mixed. */\n.unset {\n opacity: 0.55;\n}\n\n/* A kind with no editor: named, not editable. */\n.noEditor {\n font-size: var(--wzl-font-size-sm);\n color: var(--wzl-fg-muted);\n}\n","import { useCallback, useRef, type ReactElement } from 'react';\nimport {\n getAlpha01,\n getPaintKind,\n listPaintKinds,\n paintAlpha,\n solid,\n switchGradientKind,\n toHex8,\n withAlpha01,\n type FillStyle,\n type PaintKind,\n} from '@weasel-js/core';\nimport { Icon } from '../../icons/Icon';\nimport { ICON_PATHS, type IconName } from '../../icons/paths';\nimport { ColorField } from '../ColorField';\nimport { GradientEditor } from '../GradientEditor';\nimport { PatternPicker, type PatternFill } from '../PatternPicker';\nimport { ToggleBar, type ToggleBarItem } from '../ToggleBar';\nimport s from './PaintInput.module.css';\n\n/** What a kind with no color of its own seeds from. */\nconst FALLBACK_COLOR = '#000000ff';\n\n/** The bar's answer for \"no paint at all\". Not a registered kind — absence\n * has no seed, no color and nothing to render — so it is this control's own\n * segment rather than a registry entry. */\nconst NONE = 'none';\n\n/** A solid paint as the one `#rrggbbaa` a color field edits. Its alpha lives\n * in `opacity`; a hex alpha left in `color` multiplies with it when painted,\n * so both fold in. */\nfunction solidHex8(paint: FillStyle): string {\n const hex8 = toHex8((paint as { color: string }).color);\n return withAlpha01(hex8.slice(0, 7), getAlpha01(hex8) * paintAlpha(paint));\n}\n\n/** `solid(color)` at the slider's own 1% resolution: the alpha arrives\n * through a hex channel, which would turn 70% into 0.70196. */\nfunction solidFromField(color: string): FillStyle {\n const paint = solid(color);\n return paint.opacity === undefined\n ? paint\n : { ...paint, opacity: Math.round(paint.opacity * 100) / 100 };\n}\n\nfunction isPattern(paint: FillStyle | undefined): paint is PatternFill {\n return paint?.fill === 'pattern';\n}\n\n/** A paint's own discriminant. The solid member leaves `fill` off, and an\n * explicit `null` is the absence of paint rather than an unknown one. */\nfunction kindOf(paint: FillStyle | null | undefined): PaintKind | null {\n if (paint === null) return NONE;\n if (paint === undefined) return null;\n return paint.fill ?? 'solid';\n}\n\n/** Props for {@link PaintInput}. `onInput` fires throughout a gesture and\n * `onChange` once at its end. */\nexport interface PaintInputProps {\n /** The paint being edited. `null` is an explicit \"no paint\"; `undefined`\n * is no value to show. */\n value: FillStyle | null | undefined;\n /** Indeterminate presentation: no kind lit, and the body withheld because\n * there is no single paint to show. */\n mixed?: boolean;\n /** Dim the control — a value is in effect but was never chosen. */\n unset?: boolean;\n /** Restrict the kind bar. Default: every registered kind. */\n kinds?: readonly PaintKind[];\n /** Offer \"None\". Default `true` — the bar answers \"what kind of paint is\n * this?\" and no-paint is one of the answers. Turn it off where the slot\n * cannot express absence. */\n allowNone?: boolean;\n onInput?: (next: FillStyle | null) => void;\n onChange: (next: FillStyle | null) => void;\n /** Names the paint this control edits — `Fill`, `Color`. Carried by the\n * solid body's swatch, which is the part with a value to announce. */\n 'aria-label'?: string;\n className?: string;\n}\n\n/**\n * Editor for a whole `FillStyle` — a kind bar over whichever body that kind\n * wants.\n *\n * The bar is driven by the paint-kind registry rather than a fixed list, so a\n * consumer's registered kind appears in it and renders that entry's `Editor`.\n * The five built-in kinds keep their branch here: their editors live in this\n * package and `@weasel-js/core`, which owns the registry, cannot import it.\n *\n * Geometry is deliberately absent — on a canvas it belongs on the artwork,\n * via `<SceneGradientHandles>`.\n */\nexport function PaintInput(props: PaintInputProps): ReactElement {\n const {\n value, mixed = false, unset = false, kinds, allowNone = true,\n onInput, onChange, className,\n } = props;\n const ariaLabel = props['aria-label'];\n\n // Per-kind memory, so linear → solid → linear comes back with its stops.\n // A ref, not state: it must not survive the control being pointed at a\n // different selection, and nothing renders off it directly.\n const remembered = useRef(new Map<PaintKind, FillStyle>());\n\n const active = mixed ? null : kindOf(value);\n if (value != null && active !== null) remembered.current.set(active, value);\n\n const entries = listPaintKinds().filter(\n (entry) => kinds === undefined || kinds.includes(entry.id),\n );\n const segment = (id: string, label: string, icon: string | undefined): ToggleBarItem<PaintKind> =>\n icon && icon in ICON_PATHS\n // Icon-only: six labelled segments do not fit a property row, and the\n // full label stays the accessible name.\n // 14 to match the panel's other glyph segments. A `sm` bar is 17px tall\n // over 1px of padding, so 15 fills the segment box edge to edge.\n ? { value: id, label: <Icon name={icon as IconName} size={14} />, ariaLabel: label }\n : { value: id, label };\n\n const items: readonly ToggleBarItem<PaintKind>[] = [\n ...(allowNone ? [segment(NONE, 'None', 'paintNone')] : []),\n ...entries.map((entry) => segment(entry.id, entry.label, entry.icon)),\n ];\n\n /** The color a switch seeds from: whatever the current paint shows. */\n const currentColor = useCallback((): string => {\n if (value == null) return FALLBACK_COLOR;\n return getPaintKind(kindOf(value) ?? 'solid')?.colorOf(value) ?? FALLBACK_COLOR;\n }, [value]);\n\n const switchKind = (kind: PaintKind): void => {\n if (kind === active) return;\n if (kind === NONE) {\n onChange(null);\n return;\n }\n const seen = remembered.current.get(kind);\n if (seen !== undefined) {\n onChange(seen);\n return;\n }\n const converted = value != null ? switchGradientKind(value, kind) : undefined;\n if (converted !== undefined) {\n onChange(converted);\n return;\n }\n const entry = getPaintKind(kind);\n if (entry) onChange(entry.seed(currentColor()));\n };\n\n return (\n <div\n className={[s.root, unset && s.unset, className].filter(Boolean).join(' ')}\n title={unset ? 'Not set' : undefined}\n >\n <ToggleBar<PaintKind>\n items={items}\n value={active}\n size=\"sm\"\n ariaLabel=\"Paint kind\"\n onChange={(kind) => kind && switchKind(kind)}\n />\n {renderBody()}\n </div>\n );\n\n function renderBody(): ReactElement | null {\n if (mixed || value === undefined) {\n return (\n <ColorField\n mixed\n aria-label={ariaLabel}\n onChange={(color) => onChange(solidFromField(color))}\n />\n );\n }\n // Absence has nothing to edit. The lit segment is the whole statement.\n if (value === null) return null;\n // A registered `Editor` wins even for a built-in id: re-registering one is\n // how a consumer replaces a kit control, and the built-in branches below\n // are the fallback for the ids that ship without an entry editor.\n const entry = getPaintKind(kindOf(value) ?? 'solid');\n if (entry?.Editor) {\n const Editor = entry.Editor;\n return <Editor value={value} onInput={onInput} onChange={onChange} />;\n }\n if (entry?.stopsOf) {\n return (\n <GradientEditor\n value={value}\n kindSwitch={false}\n onInput={onInput}\n onChange={onChange}\n />\n );\n }\n if (isPattern(value)) {\n return <PatternPicker value={value} color={currentColor()} onChange={onChange} />;\n }\n const kind = kindOf(value);\n if (kind !== 'solid') {\n // Editing a paint this control cannot represent would overwrite it, so\n // a kind with no editor is shown and left alone.\n return <div className={s.noEditor}>{entry?.label ?? kind}: no editor</div>;\n }\n return (\n <ColorField\n value={solidHex8(value)}\n alpha\n aria-label={ariaLabel}\n onInput={(color) => onInput?.(solidFromField(color))}\n onChange={(color) => onChange(solidFromField(color))}\n />\n );\n }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,KAAK,OAAO;EACnD,IAAII,GAAO,QAAQ;GACjB,IAAMoB,IAASpB,EAAM;GACrB,OAAO,kBAACoB,GAAD;IAAe;IAAgB;IAAmB;GAAW,CAAA;EACtE;EACA,IAAIpB,GAAO,SACT,OACE,kBAAC5B,GAAD;GACS;GACP,YAAY;GACH;GACC;EACX,CAAA;EAGL,IAAIe,EAAUS,CAAK,GACjB,OAAO,kBAACvB,GAAD;GAAsB;GAAO,OAAOmC,EAAa;GAAa;EAAW,CAAA;EAElF,IAAMI,IAAOxB,EAAOQ,CAAK;EAMzB,OALIgB,MAAS,UAMX,kBAAC1C,GAAD;GACE,OAAOO,EAAUmB,CAAK;GACtB,OAAA;GACA,cAAYL;GACZ,UAAU,MAAU8B,IAAUrC,EAAeE,CAAK,CAAC;GACnD,WAAW,MAAU8B,EAAShC,EAAeE,CAAK,CAAC;EACpD,CAAA,IATM,kBAAC,OAAD;GAAK,WAAWlB,EAAE;GAAlB,UAAA,CAA6BgC,GAAO,SAASY,GAAK,aAAgB;;CAW7E;AACF"}
@@ -1,4 +1,4 @@
1
- import { t as e } from "./ToggleBar-Btnl5r7F.js";
1
+ import { t as e } from "./ToggleBar-BTYkBXU9.js";
2
2
  import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
3
  import { tilePreviewCssUrl as r } from "@weasel-js/svg";
4
4
  var i = {
@@ -90,4 +90,4 @@ function d(d) {
90
90
  //#endregion
91
91
  export { u as n, d as t };
92
92
 
93
- //# sourceMappingURL=PatternPicker-DdfpxoQy.js.map
93
+ //# sourceMappingURL=PatternPicker-R_EQtw2Q.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PatternPicker-R_EQtw2Q.js","names":["s","ToggleBar","PatternPicker_module_default","TILES","TILE_SIZES","DEFAULT_TILE_SIZE","PREVIEW_SIZE","specOf","fill","seedPattern","spec","from","tile","PatternPicker","props","value","size","pick","color","resize","onChange","nextSize","className","preview","selected","tilePreviewCssUrl","v"],"sources":["../../src/components/PatternPicker/PatternPicker.module.css","../../src/components/PatternPicker/PatternPicker.tsx"],"sourcesContent":["/* Tile grid over the size switch. */\n.root {\n display: flex;\n flex-direction: column;\n gap: var(--wzl-space-3);\n min-inline-size: 0;\n}\n\n.grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(var(--wzl-swatch-size, 28px), 1fr));\n gap: 0;\n}\n\n/* The swatch's whole face is its own tile, so it must not carry a flat\n background — and the tile repeats at its own scale, not the swatch's. */\n.swatch {\n width: 100%;\n aspect-ratio: 1 / 1;\n min-width: 0;\n padding: 0;\n border: 0.5px solid var(--wzl-border);\n border-radius: 0;\n cursor: pointer;\n background-color: var(--wzl-surface-sunken);\n background-image: var(--tile-preview);\n background-repeat: repeat;\n background-size: 16px 16px;\n background-clip: padding-box;\n}\n\n.swatch:hover {\n border-color: var(--wzl-fg-muted);\n}\n\n.swatchActive {\n border-color: var(--wzl-accent);\n box-shadow: 0 0 0 1px var(--wzl-accent);\n}\n","import type { ReactElement } from 'react';\nimport type { CSSProperties } from 'react';\nimport type { FillStyle, TilePatternSpec } from '@weasel-js/core';\nimport { tilePreviewCssUrl } from '@weasel-js/svg';\nimport { ToggleBar } from '../ToggleBar';\nimport s from './PatternPicker.module.css';\n\n/** The `pattern` member of the paint union. */\nexport type PatternFill = Extract<FillStyle, { fill: 'pattern' }>;\n\nconst TILES: readonly TilePatternSpec['tile'][] = ['hatch', 'crosshatch', 'dots', 'chunks'];\n\n/** Tile sizes the picker offers, coarse enough that each reads as a\n * distinct texture rather than a nudge. */\nconst TILE_SIZES: readonly { value: number; label: string }[] = [\n { value: 4, label: 'S' },\n { value: 8, label: 'M' },\n { value: 16, label: 'L' },\n { value: 32, label: 'XL' },\n];\n\nconst DEFAULT_TILE_SIZE = 8;\n\n/** Every swatch previews at one size so the grid compares tiles, not scales. */\nconst PREVIEW_SIZE = 16;\n\n/** The spec a pattern paint carries, if it carries one. A consumer-built\n * `TextureHandle` has no spec, so the picker shows no tile selected and\n * replaces it wholesale on the next click. */\nfunction specOf(fill: PatternFill): TilePatternSpec | null {\n return 'tile' in fill.pattern ? fill.pattern : null;\n}\n\n/**\n * A pattern seeded from a color. `units: 'bounds'` anchors the tile to the\n * node's box, so the texture travels with the shape.\n */\nexport function seedPattern(\n tile: TilePatternSpec['tile'],\n from: string,\n size: number = DEFAULT_TILE_SIZE,\n): PatternFill {\n const spec: TilePatternSpec = { tile, color: from, size };\n // `chunks` is a scatter over a ground rather than a line texture; without a\n // background it reads as loose specks on whatever sits beneath.\n if (tile === 'chunks') spec.bg = '#00000000';\n return { fill: 'pattern', pattern: spec, units: 'bounds' };\n}\n\n/** Props for {@link PatternPicker}. */\nexport interface PatternPickerProps {\n /** The pattern paint being edited. */\n value: PatternFill;\n /** The color new tiles are seeded with — the paint's own, normally. */\n color: string;\n /** Committed value: one call per click. A tile pick and a size change are\n * each a complete gesture, so there is no `onInput`. */\n onChange: (next: PatternFill) => void;\n className?: string;\n}\n\n/**\n * Grid of tile swatches over a size switch, each swatch previewing the real\n * tile at the current color.\n *\n * The preview shares its shape mapper with what the renderer paints, so a\n * swatch cannot drift from the texture it selects.\n */\nexport function PatternPicker(props: PatternPickerProps): ReactElement {\n const { value, color, onChange, className } = props;\n const spec = specOf(value);\n const size = spec?.size ?? DEFAULT_TILE_SIZE;\n\n const pick = (tile: TilePatternSpec['tile']): void => {\n onChange(seedPattern(tile, color, size));\n };\n\n const resize = (nextSize: number): void => {\n if (!spec) return;\n onChange({ ...value, pattern: { ...spec, size: nextSize } });\n };\n\n return (\n <div className={[s.root, className].filter(Boolean).join(' ')}>\n <div className={s.grid}>\n {TILES.map((tile) => {\n const preview: TilePatternSpec = { tile, color, size: PREVIEW_SIZE };\n if (tile === 'chunks') preview.bg = '#00000000';\n const selected = spec?.tile === tile;\n return (\n <button\n key={tile}\n type=\"button\"\n className={[s.swatch, selected && s.swatchActive].filter(Boolean).join(' ')}\n style={{ ['--tile-preview' as string]: tilePreviewCssUrl(preview) } as CSSProperties}\n title={tile}\n aria-label={tile}\n aria-pressed={selected}\n onClick={() => pick(tile)}\n />\n );\n })}\n </div>\n <ToggleBar<number>\n items={TILE_SIZES}\n value={size}\n size=\"sm\"\n ariaLabel=\"Tile size\"\n onChange={(v) => v != null && resize(v)}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;GCUMG,IAA4C;CAAC;CAAS;CAAc;CAAQ;AAAQ,GAIpFC,IAA0D;CAC9D;EAAE,OAAO;EAAG,OAAO;CAAI;CACvB;EAAE,OAAO;EAAG,OAAO;CAAI;CACvB;EAAE,OAAO;EAAI,OAAO;CAAI;CACxB;EAAE,OAAO;EAAI,OAAO;CAAK;AAC3B,GAEMC,IAAoB,GAGpBC,IAAe;AAKrB,SAASC,EAAO,GAA2C;CACzD,OAAO,UAAUC,EAAK,UAAUA,EAAK,UAAU;AACjD;AAMA,SAAgBC,EACd,GACA,GACA,IAAeJ,GACF;CACb,IAAMK,IAAwB;EAAE;EAAM,OAAOC;EAAM;CAAK;CAIxD,OADIC,MAAS,aAAU,EAAK,KAAK,cAC1B;EAAE,MAAM;EAAW,SAASF;EAAM,OAAO;CAAS;AAC3D;AAqBA,SAAgBG,EAAc,GAAyC;CACrE,IAAM,EAAE,UAAO,UAAO,aAAU,iBAAcC,GACxCJ,IAAOH,EAAOQ,CAAK,GACnBC,IAAON,GAAM,QAAQL,GAErBY,KAAQ,MAAwC;EACpD,EAASR,EAAYG,GAAMM,GAAOF,CAAI,CAAC;CACzC,GAEMG,KAAU,MAA2B;EACzC,AAAKT,KACLU,EAAS;GAAE,GAAGL;GAAO,SAAS;IAAE,GAAGL;IAAM,MAAMW;GAAS;EAAE,CAAC;CAC7D;CAEA,OACE,kBAAC,OAAD;EAAK,WAAW,CAACrB,EAAE,MAAMsB,CAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;EAA5D,UAAA,CACE,kBAAC,OAAD;GAAK,WAAWtB,EAAE;GACf,UAAAG,EAAM,KAAK,MAAS;IACnB,IAAMoB,IAA2B;KAAE;KAAM;KAAO,MAAMjB;IAAa;IACnE,AAAIM,MAAS,aAAU,EAAQ,KAAK;IACpC,IAAMY,IAAWd,GAAM,SAASE;IAChC,OACE,kBAAC,UAAD;KAEE,MAAK;KACL,WAAW,CAACZ,EAAE,QAAQwB,KAAYxB,EAAE,YAAY,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;KAC1E,OAAO,EAAG,kBAA6ByB,EAAkBF,CAAO,EAAE;KAClE,OAAOX;KACP,cAAYA;KACZ,gBAAcY;KACd,eAAeP,EAAKL,CAAI;IACzB,GARMA,CAQN;GAEL,CAAC;EACE,CAAA,GACL,kBAACX,GAAD;GACE,OAAOG;GACP,OAAOY;GACP,MAAK;GACL,WAAU;GACV,WAAW,MAAMU,KAAK,QAAQP,EAAOO,CAAC;EACvC,CAAA,CACE;;AAET"}
@@ -1,4 +1,4 @@
1
- import { t as e } from "./dlog-CMYiRF3Q.js";
1
+ import { t as e } from "./dlog-F0I8KsIW.js";
2
2
  import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
3
  import { forwardRef as r, useCallback as i, useEffect as a, useImperativeHandle as o, useLayoutEffect as s, useMemo as c, useRef as l, useState as u } from "react";
4
4
  //#region src/components/Plot2D/geometry.ts
@@ -136,10 +136,10 @@ var w = r(function(r, p) {
136
136
  ]);
137
137
  let I = i((e) => {
138
138
  if (!k) return;
139
- let t = F(e);
139
+ let t = F(e), n = f(t, N, P);
140
140
  k(e, {
141
141
  plot: t,
142
- model: f(t, N, P)
142
+ model: n
143
143
  });
144
144
  }, [
145
145
  k,
@@ -152,7 +152,7 @@ var w = r(function(r, p) {
152
152
  }, N, P).x) : [], R = w ? C(w, "y", _, h, (e) => d({
153
153
  x: g[0],
154
154
  y: e
155
- }, N, P).y) : [], z = !!w && (w.labels ?? "inside") === "inside", B = l(null), [V, H] = u(0);
155
+ }, N, P).y) : [], z = !!w && (w.labels ?? "inside") === "inside", B = l(null), [V, H] = u(0), U = z ? R.map((e) => e.label).join("\n") : "";
156
156
  s(() => {
157
157
  if (!z) return;
158
158
  let e = () => {
@@ -167,8 +167,8 @@ var w = r(function(r, p) {
167
167
  }), () => {
168
168
  t = !1;
169
169
  };
170
- }, [z, z ? R.map((e) => e.label).join("\n") : ""]);
171
- let U = [y.root, D].filter(Boolean).join(" "), W = (e, n, r) => !r || r.lines === !1 || n.length === 0 ? null : /* @__PURE__ */ t("g", { children: n.map((n) => /* @__PURE__ */ t("line", {
170
+ }, [z, U]);
171
+ let W = [y.root, D].filter(Boolean).join(" "), G = (e, n, r) => !r || r.lines === !1 || n.length === 0 ? null : /* @__PURE__ */ t("g", { children: n.map((n) => /* @__PURE__ */ t("line", {
172
172
  "data-plot-element": "tick",
173
173
  "data-axis": e,
174
174
  className: y.tick,
@@ -183,7 +183,7 @@ var w = r(function(r, p) {
183
183
  y1: n.at,
184
184
  y2: n.at
185
185
  }
186
- }, `t${e}-${n.value}`)) }), G = (e, n, r) => {
186
+ }, `t${e}-${n.value}`)) }), K = (e, n, r) => {
187
187
  if (!r || n.length === 0) return null;
188
188
  let i = r.labels ?? "inside";
189
189
  if (i === !1) return null;
@@ -226,7 +226,7 @@ var w = r(function(r, p) {
226
226
  };
227
227
  return /* @__PURE__ */ n("svg", {
228
228
  ref: M,
229
- className: U,
229
+ className: W,
230
230
  style: O,
231
231
  width: m,
232
232
  height: h,
@@ -258,8 +258,8 @@ var w = r(function(r, p) {
258
258
  y2: e * h
259
259
  }, `gy-${e}`))] });
260
260
  })(),
261
- W("x", L, x),
262
- W("y", R, w),
261
+ G("x", L, x),
262
+ G("y", R, w),
263
263
  b !== !1 && b !== null && (() => {
264
264
  let e = b?.color;
265
265
  return /* @__PURE__ */ n("g", { children: [/* @__PURE__ */ t("line", {
@@ -280,8 +280,8 @@ var w = r(function(r, p) {
280
280
  y2: h
281
281
  })] });
282
282
  })(),
283
- G("x", L, x),
284
- G("y", R, w),
283
+ K("x", L, x),
284
+ K("y", R, w),
285
285
  j
286
286
  ]
287
287
  });
@@ -289,4 +289,4 @@ var w = r(function(r, p) {
289
289
  //#endregion
290
290
  export { h as a, f as c, _ as i, v as n, g as o, m as r, d as s, w as t };
291
291
 
292
- //# sourceMappingURL=Plot2D-lyO7waPQ.js.map
292
+ //# sourceMappingURL=Plot2D-CTXHkL5p.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Plot2D-CTXHkL5p.js","names":["s","dlog","modelToPlot","xFrac","p","m","yFrac","plot","plotToModel","MAX_DECIMALS","niceStep","mag","rough","norm","stepDecimals","step","tickDecimals","most","v","values","d","niceTicks","none","lo","range","hi","span","options","pixels","minSpacing","unitsPerPx","decimals","from","inset","to","first","last","i","formatTick","text","value","ctx","Plot2D_module_default","TICK_SPACING_PX","TICK_INSET_PX","LABEL_GAP_PX","resolveTicks","settings","eps","gaps","even","g","set","axis","format","toPlot","Plot2D","forwardRef","props","svgRef","useRef","modelRange","useMemo","xRange","yRange","plotSize","width","height","clientToPlot","useCallback","rect","left","top","useEffect","useImperativeHandle","ref","pt","handlePointerDown","onPointerDown","model","xTickList","xTicks","yTickList","yTicks","yInside","yLabelsRef","yLabelWidth","setYLabelWidth","useState","yLabelKey","t","measure","widest","el","prev","live","cls","className","renderTickLines","list","renderTickLabels","placement","outside","gap","place","grid","divisions","stroke","fractions","f","axes","children"],"sources":["../../src/components/Plot2D/geometry.ts","../../src/components/Plot2D/ticks.ts","../../src/components/Plot2D/Plot2D.module.css","../../src/components/Plot2D/Plot2D.tsx"],"sourcesContent":["/**\n * Coordinate transforms (model ↔ plot) for Plot2D. Pure / deterministic —\n * no DOM, no React, no state.\n *\n * Model space: caller-defined xRange × yRange. Y axis goes UP.\n * Plot space: 0..width × 0..height in CSS pixels. Y axis goes DOWN (SVG).\n */\n\nexport interface Point {\n x: number;\n y: number;\n}\n\n/**\n * The caller-defined extent of model space, the coordinate system a plot's\n * data lives in.\n */\nexport interface ModelRange {\n xMin: number;\n xMax: number;\n yMin: number;\n yMax: number;\n}\n\n/** The plot's drawing area in CSS pixels. */\nexport interface PlotSize {\n width: number;\n height: number;\n}\n\n/**\n * Maps a model-space point into plot space, flipping the y axis so model y\n * grows upward while SVG y grows downward.\n */\nexport function modelToPlot(p: Point, m: ModelRange, plot: PlotSize): Point {\n const xFrac = (p.x - m.xMin) / (m.xMax - m.xMin);\n const yFrac = (p.y - m.yMin) / (m.yMax - m.yMin);\n return {\n x: xFrac * plot.width,\n // Invert y so model y=0 sits at plot bottom (SVG y grows downward).\n y: (1 - yFrac) * plot.height,\n };\n}\n\n/** The inverse of {@link modelToPlot}. */\nexport function plotToModel(p: Point, m: ModelRange, plot: PlotSize): Point {\n const xFrac = p.x / plot.width;\n const yFrac = 1 - p.y / plot.height;\n return {\n x: m.xMin + xFrac * (m.xMax - m.xMin),\n y: m.yMin + yFrac * (m.yMax - m.yMin),\n };\n}\n","/**\n * Tick placement for a numeric axis. Pure — no DOM, no React.\n */\n\n/** What a tick label formatter knows about the column it is part of. */\nexport interface TickFormatCtx {\n /** Places after the point that every label in the column shares. */\n decimals: number;\n /** Distance between neighboring ticks, or 0 when the ticks were given\n * explicitly and are not evenly spaced. */\n step: number;\n}\n\n/** Turns a tick value into its label. */\nexport type TickFormatter = (value: number, ctx: TickFormatCtx) => string;\n\n/** A column of ticks and the facts its labels share. */\nexport interface TickSet {\n values: number[];\n step: number;\n decimals: number;\n}\n\n/** Options for {@link niceTicks}. */\nexport interface NiceTickOptions {\n /** Smallest gap between neighboring ticks, in px. */\n minSpacing: number;\n /** Ticks closer than this to either end of the axis are dropped, in px.\n * Default 0. */\n inset?: number;\n}\n\nconst MAX_DECIMALS = 20;\n\n/** The smallest of 1, 2 or 5 times a power of ten that is at least `rough`. */\nexport function niceStep(rough: number): number {\n const mag = Math.pow(10, Math.floor(Math.log10(rough)));\n const norm = rough / mag;\n const step = norm <= 1 ? 1 : norm <= 2 ? 2 : norm <= 5 ? 5 : 10;\n return step * mag;\n}\n\n/** Places after the point a multiple of `step` needs, for a 1/2/5 step. */\nexport function stepDecimals(step: number): number {\n if (!(step > 0) || !Number.isFinite(step)) return 0;\n return Math.min(MAX_DECIMALS, Math.max(0, -Math.floor(Math.log10(step) + 1e-9)));\n}\n\n/** The most places after the point any of `values` needs. */\nexport function tickDecimals(values: readonly number[]): number {\n let most = 0;\n for (const v of values) {\n if (!Number.isFinite(v)) continue;\n let d = 0;\n while (d < MAX_DECIMALS && Math.abs(Number(v.toFixed(d)) - v) > 1e-9 * Math.max(1, Math.abs(v))) d++;\n most = Math.max(most, d);\n }\n return most;\n}\n\n/**\n * Ticks at round values across `range`, drawn `pixels` long: the finest\n * 1/2/5 step that keeps neighbors `minSpacing` px apart, so a taller plot\n * gets more of them.\n */\nexport function niceTicks(\n range: readonly [number, number],\n pixels: number,\n options: NiceTickOptions,\n): TickSet {\n const none: TickSet = { values: [], step: 0, decimals: 0 };\n const lo = Math.min(range[0], range[1]);\n const hi = Math.max(range[0], range[1]);\n const span = hi - lo;\n const { minSpacing, inset = 0 } = options;\n if (!(span > 0) || !Number.isFinite(span) || !(pixels > 0) || !(minSpacing > 0)) return none;\n\n const unitsPerPx = span / pixels;\n const step = niceStep(minSpacing * unitsPerPx);\n const decimals = stepDecimals(step);\n const from = lo + inset * unitsPerPx;\n const to = hi - inset * unitsPerPx;\n // A tolerance in step units, so a tick sitting exactly on a bound survives\n // the float error in `from / step`.\n const first = Math.ceil(from / step - 1e-9);\n const last = Math.floor(to / step + 1e-9);\n const values: number[] = [];\n for (let i = first; i <= last; i++) values.push(Number((i * step).toFixed(decimals)) + 0);\n return { values, step, decimals };\n}\n\n/** The default label: `value` fixed to the column's shared decimals, with\n * no negative zero. */\nexport function formatTick(value: number, ctx: TickFormatCtx): string {\n const text = value.toFixed(ctx.decimals);\n return /^-0(\\.0*)?$/.test(text) ? text.slice(1) : text;\n}\n",".root {\n /* Component-local vars layered over theme tokens. Consumers override\n * either the plot-* var (component scope) or the wzl-* token (app\n * scope). */\n --plot-bg: var(--wzl-surface-sunken);\n --plot-grid: var(--wzl-line);\n /* Axes get full foreground contrast — they're the plot frame, the\n * most prominent structural element after caller-rendered content. */\n --plot-axis: var(--wzl-fg);\n --plot-tick: var(--wzl-line-subtle);\n --plot-tick-label: var(--wzl-fg-muted);\n /* Knocks the tick line out from behind an inside label. */\n --plot-tick-label-halo: var(--plot-bg);\n\n display: block;\n /* Caller-rendered marks at the very edge (e.g. CurveEditor anchors)\n * extend past the SVG box by their radius — let them paint over the\n * host page instead of being half-clipped. */\n overflow: visible;\n background: var(--plot-bg);\n user-select: none;\n touch-action: none;\n outline: none;\n}\n\n/* Keyboard-only focus ring. Caller opts in via `tabIndex`. */\n.root:focus-visible {\n outline: 2px solid var(--wzl-focus-ring);\n outline-offset: 2px;\n}\n\n.grid {\n stroke: var(--plot-grid);\n stroke-width: 1;\n fill: none;\n}\n\n.axis {\n stroke: var(--plot-axis);\n stroke-width: var(--wzl-line-width);\n fill: none;\n}\n\n.tick {\n stroke: var(--plot-tick);\n stroke-width: 1;\n fill: none;\n}\n\n.tickLabels { pointer-events: none; }\n\n.tickLabel {\n fill: var(--plot-tick-label);\n font-size: var(--wzl-font-size-xs);\n font-variant-numeric: tabular-nums;\n}\n\n.tickLabel[data-placement='inside'] {\n stroke: var(--plot-tick-label-halo);\n stroke-width: 3px;\n stroke-linejoin: round;\n paint-order: stroke;\n}\n","import {\n forwardRef, useCallback, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState,\n type CSSProperties,\n type KeyboardEvent as ReactKeyboardEvent,\n type PointerEvent as ReactPointerEvent,\n type ReactNode,\n} from 'react';\nimport {\n modelToPlot, plotToModel,\n type ModelRange, type Point,\n} from './geometry';\nimport {\n formatTick, niceTicks, tickDecimals,\n type TickFormatCtx, type TickFormatter,\n} from './ticks';\nimport s from './Plot2D.module.css';\nimport { dlog } from '../../dlog';\n\n/** Background grid configuration for a {@link Plot2D}. */\nexport interface GridSettings {\n /** Number of evenly-spaced internal grid lines per axis (excluding\n * the edges). Applied to both x and y. Default 3. */\n divisions?: number;\n /** Stroke color override. When omitted, uses `var(--plot-grid)`. */\n color?: string;\n}\n\n/** Axis-line configuration for a {@link Plot2D}. */\nexport interface AxesSettings {\n /** Stroke color override. When omitted, uses `var(--plot-axis)`. */\n color?: string;\n}\n\n/**\n * Ticks along one axis of a {@link Plot2D}: a line across the plot at each\n * tick value, and a label naming it. Every label in a column is formatted\n * to the same number of decimal places.\n */\nexport interface TickSettings {\n /** Tick values in model space; any outside the range are skipped.\n * Omitted = round 1/2/5 steps, as many as `minSpacing` allows at the\n * plot's current size. */\n values?: readonly number[];\n /** Smallest gap between generated ticks, in px. Default 24 on y, 64 on x. */\n minSpacing?: number;\n /** A generated tick nearer either end of the axis than this is dropped,\n * so its label stays on the plot, in px. Default 4 on y, 16 on x. */\n inset?: number;\n /** Draw a line across the plot at each tick. Default true. */\n lines?: boolean;\n /** Where labels sit: `'inside'` the plot along its left (y) or bottom (x)\n * edge, `'outside'` it past that edge in space the caller leaves free,\n * or `false` for none. Default `'inside'`. */\n labels?: 'inside' | 'outside' | false;\n /** Space between a label and the plot edge it sits against, in px.\n * Default 4. */\n gap?: number;\n /** Label text for a tick. Default {@link formatTick}. */\n format?: TickFormatter;\n}\n\n/** A pointer position given in both of the plot's coordinate systems. */\nexport interface Plot2DCoords {\n plot: Point;\n model: Point;\n}\n\n/** Props for {@link Plot2D}. */\nexport interface Plot2DProps {\n width: number;\n height: number;\n /** Model-space x range. Default [0, 1]. */\n xRange?: readonly [number, number];\n /** Model-space y range. Default [0, 1]. */\n yRange?: readonly [number, number];\n /** Background grid. `false` / `null` / omitted = no grid. Pass `{}`\n * for default (3 divisions per axis) or populated GridSettings. */\n grid?: GridSettings | false | null;\n /** Axis lines. `false` / `null` = no axes. Omitted = default-styled\n * axes (on). Pass AxesSettings to customize. */\n axes?: AxesSettings | false | null;\n /** Ticks at x values. `false` / `null` / omitted = none; `{}` = defaults. */\n xTicks?: TickSettings | false | null;\n /** Ticks at y values. `false` / `null` / omitted = none; `{}` = defaults. */\n yTicks?: TickSettings | false | null;\n /** Forwarded to the underlying svg. Consumer opts into focus this way. */\n tabIndex?: number;\n /** Default `'img'`. A plot holding focusable marks must not be an image,\n * whose children are presentational to assistive technology. */\n role?: string;\n 'aria-label'?: string;\n className?: string;\n style?: CSSProperties;\n /** Pointer down on the SVG. Receives both plot- and model-space coords\n * pre-computed so consumers don't repeat the rect/transform dance. */\n onPointerDown?: (e: ReactPointerEvent<SVGSVGElement>, coords: Plot2DCoords) => void;\n onKeyDown?: (e: ReactKeyboardEvent<SVGSVGElement>) => void;\n children?: ReactNode;\n}\n\n/**\n * Imperative handle on a {@link Plot2D}: the SVG element, its size, and the\n * coordinate conversions, including ones that start from a raw DOM event so a\n * drag tracked on `window` can still map back into the plot.\n */\nexport interface Plot2DHandle {\n readonly svg: SVGSVGElement | null;\n plotToModel(pt: Point): Point;\n modelToPlot(pt: Point): Point;\n /** Convert a DOM event's clientX/clientY (e.g. from a window-attached\n * pointermove during drag) to plot-space. */\n clientToPlot(e: { clientX: number; clientY: number }): Point;\n /** Convenience: clientToPlot → plotToModel. */\n clientToModel(e: { clientX: number; clientY: number }): Point;\n readonly width: number;\n readonly height: number;\n}\n\ntype Axis = 'x' | 'y';\n\nconst TICK_SPACING_PX: Record<Axis, number> = { x: 64, y: 24 };\nconst TICK_INSET_PX: Record<Axis, number> = { x: 16, y: 4 };\nconst LABEL_GAP_PX = 4;\n\ninterface ResolvedTick {\n value: number;\n /** Plot-space position along the axis. */\n at: number;\n label: string;\n}\n\nfunction resolveTicks(\n settings: TickSettings,\n axis: Axis,\n range: readonly [number, number],\n pixels: number,\n toPlot: (v: number) => number,\n): ResolvedTick[] {\n let values: number[];\n let ctx: TickFormatCtx;\n if (settings.values) {\n const lo = Math.min(range[0], range[1]);\n const hi = Math.max(range[0], range[1]);\n const eps = (hi - lo) * 1e-9;\n values = settings.values.filter((v) => v >= lo - eps && v <= hi + eps);\n const gaps = values.slice(1).map((v, i) => v - values[i]);\n const even = gaps.length > 0 && gaps.every((g) => Math.abs(g - gaps[0]) <= Math.abs(gaps[0]) * 1e-9);\n ctx = { decimals: tickDecimals(values), step: even ? gaps[0] : 0 };\n } else {\n const set = niceTicks(range, pixels, {\n minSpacing: settings.minSpacing ?? TICK_SPACING_PX[axis],\n inset: settings.inset ?? TICK_INSET_PX[axis],\n });\n values = set.values;\n ctx = { decimals: set.decimals, step: set.step };\n }\n const format = settings.format ?? formatTick;\n return values.map((value) => ({ value, at: toPlot(value), label: format(value, ctx) }));\n}\n\n/**\n * An SVG plotting surface with an optional grid, axes and ticks. It draws the\n * frame and owns the model-space to plot-space mapping; the plotted content is\n * whatever children are passed, positioned in plot space.\n */\nexport const Plot2D = forwardRef<Plot2DHandle, Plot2DProps>(function Plot2D(props, ref) {\n const {\n width, height,\n xRange = [0, 1],\n yRange = [0, 1],\n grid,\n axes,\n xTicks,\n yTicks,\n tabIndex,\n role = 'img',\n className,\n style,\n onPointerDown,\n onKeyDown,\n children,\n } = props;\n\n const svgRef = useRef<SVGSVGElement | null>(null);\n\n const modelRange: ModelRange = useMemo(\n () => ({ xMin: xRange[0], xMax: xRange[1], yMin: yRange[0], yMax: yRange[1] }),\n [xRange, yRange],\n );\n\n const plotSize = useMemo(() => ({ width, height }), [width, height]);\n\n const clientToPlot = useCallback((e: { clientX: number; clientY: number }): Point => {\n const rect = svgRef.current?.getBoundingClientRect();\n const left = rect?.left ?? 0;\n const top = rect?.top ?? 0;\n return { x: e.clientX - left, y: e.clientY - top };\n }, []);\n\n useEffect(() => {\n dlog('plot2d', 'mount', { width, height });\n return () => dlog('plot2d', 'unmount');\n // Mount/unmount trace: re-running on a resize would log a spurious mount.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n useImperativeHandle(ref, () => ({\n get svg() { return svgRef.current; },\n plotToModel: (pt: Point) => plotToModel(pt, modelRange, plotSize),\n modelToPlot: (pt: Point) => modelToPlot(pt, modelRange, plotSize),\n clientToPlot,\n clientToModel: (e) => plotToModel(clientToPlot(e), modelRange, plotSize),\n get width() { return plotSize.width; },\n get height() { return plotSize.height; },\n }), [modelRange, plotSize, clientToPlot]);\n\n const handlePointerDown = useCallback((e: ReactPointerEvent<SVGSVGElement>) => {\n if (!onPointerDown) return;\n const plot = clientToPlot(e);\n const model = plotToModel(plot, modelRange, plotSize);\n onPointerDown(e, { plot, model });\n }, [onPointerDown, clientToPlot, modelRange, plotSize]);\n\n const xTickList = xTicks\n ? resolveTicks(xTicks, 'x', xRange, width, (v) => modelToPlot({ x: v, y: yRange[0] }, modelRange, plotSize).x)\n : [];\n const yTickList = yTicks\n ? resolveTicks(yTicks, 'y', yRange, height, (v) => modelToPlot({ x: xRange[0], y: v }, modelRange, plotSize).y)\n : [];\n\n // An inside y column is right-aligned against its widest label, which only\n // the rendered text can say.\n const yInside = !!yTicks && (yTicks.labels ?? 'inside') === 'inside';\n const yLabelsRef = useRef<SVGGElement | null>(null);\n const [yLabelWidth, setYLabelWidth] = useState(0);\n const yLabelKey = yInside ? yTickList.map((t) => t.label).join('\\n') : '';\n useLayoutEffect(() => {\n if (!yInside) return;\n const measure = (): void => {\n let widest = 0;\n for (const el of yLabelsRef.current?.querySelectorAll('text') ?? []) {\n if (typeof el.getComputedTextLength === 'function') widest = Math.max(widest, el.getComputedTextLength());\n }\n setYLabelWidth((prev) => (prev === widest ? prev : widest));\n };\n measure();\n let live = true;\n // A web font landing after the first measure changes every width.\n document.fonts?.ready.then(() => { if (live) measure(); });\n return () => { live = false; };\n }, [yInside, yLabelKey]);\n\n const cls = [s.root, className].filter(Boolean).join(' ');\n\n const renderTickLines = (axis: Axis, list: ResolvedTick[], settings: TickSettings | false | null | undefined) => {\n if (!settings || settings.lines === false || list.length === 0) return null;\n return (\n <g>\n {list.map((t) => (\n <line\n key={`t${axis}-${t.value}`}\n data-plot-element=\"tick\"\n data-axis={axis}\n className={s.tick}\n {...(axis === 'x'\n ? { x1: t.at, x2: t.at, y1: 0, y2: height }\n : { x1: 0, x2: width, y1: t.at, y2: t.at })}\n />\n ))}\n </g>\n );\n };\n\n const renderTickLabels = (axis: Axis, list: ResolvedTick[], settings: TickSettings | false | null | undefined) => {\n if (!settings || list.length === 0) return null;\n const placement = settings.labels ?? 'inside';\n if (placement === false) return null;\n const outside = placement === 'outside';\n const gap = settings.gap ?? LABEL_GAP_PX;\n let place: { x?: number; y?: number; textAnchor: 'start' | 'middle' | 'end'; dominantBaseline?: 'central' | 'hanging' };\n if (axis === 'y') {\n place = outside\n ? { x: -gap, textAnchor: 'end', dominantBaseline: 'central' }\n : yLabelWidth > 0\n ? { x: gap + yLabelWidth, textAnchor: 'end', dominantBaseline: 'central' }\n : { x: gap, textAnchor: 'start', dominantBaseline: 'central' };\n } else {\n place = outside\n ? { y: height + gap, textAnchor: 'middle', dominantBaseline: 'hanging' }\n : { y: height - gap, textAnchor: 'middle' };\n }\n return (\n <g ref={axis === 'y' ? yLabelsRef : undefined} className={s.tickLabels} aria-hidden=\"true\">\n {list.map((t) => (\n <text\n key={`l${axis}-${t.value}`}\n data-plot-element=\"tick-label\"\n data-axis={axis}\n data-placement={placement}\n className={s.tickLabel}\n x={axis === 'x' ? t.at : place.x}\n y={axis === 'y' ? t.at : place.y}\n textAnchor={place.textAnchor}\n dominantBaseline={place.dominantBaseline}\n >\n {t.label}\n </text>\n ))}\n </g>\n );\n };\n\n return (\n <svg\n ref={svgRef}\n className={cls}\n style={style}\n width={width}\n height={height}\n viewBox={`0 0 ${width} ${height}`}\n role={role}\n aria-label={props['aria-label']}\n tabIndex={tabIndex}\n onPointerDown={onPointerDown ? handlePointerDown : undefined}\n onKeyDown={onKeyDown}\n >\n {grid && (() => {\n const divisions = grid.divisions ?? 3;\n const stroke = grid.color;\n // Evenly-spaced internal divisions, excluding the edges (which\n // belong to the axes). For divisions=3, fractions are 1/4, 2/4, 3/4.\n const fractions: number[] = [];\n for (let i = 1; i <= divisions; i++) fractions.push(i / (divisions + 1));\n return (\n <g>\n {fractions.map((f) => (\n <line\n key={`gx-${f}`}\n data-plot-element=\"grid\"\n className={s.grid}\n stroke={stroke}\n x1={f * width} x2={f * width}\n y1={0} y2={height}\n />\n ))}\n {fractions.map((f) => (\n <line\n key={`gy-${f}`}\n data-plot-element=\"grid\"\n className={s.grid}\n stroke={stroke}\n x1={0} x2={width}\n y1={f * height} y2={f * height}\n />\n ))}\n </g>\n );\n })()}\n {renderTickLines('x', xTickList, xTicks)}\n {renderTickLines('y', yTickList, yTicks)}\n {axes !== false && axes !== null && (() => {\n const stroke = axes?.color;\n return (\n <g>\n <line\n data-plot-element=\"axis\"\n className={s.axis}\n stroke={stroke}\n x1={0} x2={width}\n y1={height} y2={height}\n />\n <line\n data-plot-element=\"axis\"\n className={s.axis}\n stroke={stroke}\n x1={0} x2={0}\n y1={0} y2={height}\n />\n </g>\n );\n })()}\n {renderTickLabels('x', xTickList, xTicks)}\n {renderTickLabels('y', yTickList, yTicks)}\n {children}\n </svg>\n );\n});\n"],"mappings":";;;;AAkCA,SAAgBE,EAAY,GAAU,GAAe,GAAuB;CAC1E,IAAMC,KAASC,EAAE,IAAIC,EAAE,SAASA,EAAE,OAAOA,EAAE,OACrCC,KAASF,EAAE,IAAIC,EAAE,SAASA,EAAE,OAAOA,EAAE;CAC3C,OAAO;EACL,GAAGF,IAAQI,EAAK;EAEhB,IAAI,IAAID,KAASC,EAAK;CACxB;AACF;AAGA,SAAgBC,EAAY,GAAU,GAAe,GAAuB;CAC1E,IAAML,IAAQC,EAAE,IAAIG,EAAK,OACnBD,IAAQ,IAAIF,EAAE,IAAIG,EAAK;CAC7B,OAAO;EACL,GAAGF,EAAE,OAAOF,KAASE,EAAE,OAAOA,EAAE;EAChC,GAAGA,EAAE,OAAOC,KAASD,EAAE,OAAOA,EAAE;CAClC;AACF;;;ACpBA,IAAMI,IAAe;AAGrB,SAAgBC,EAAS,GAAuB;CAC9C,IAAMC,IAAe,MAAI,KAAK,MAAM,KAAK,MAAMC,CAAK,CAAC,GAC/CC,IAAOD,IAAQD;CAErB,QADaE,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AWC,CAAM;GACtC2B,MAAS,MAASA,MAAS,eAAe;IACzC,IAAMH,IAASG,GAAM;IACrB,OACE,kBAAC,KAAD,EAAA,UAAA,CACE,kBAAC,QAAD;KACE,qBAAkB;KAClB,WAAW9G,EAAE;KACL;KACR,IAAI;KAAG,IAAIkE;KACX,IAAIC;KAAQ,IAAIA;IACjB,CAAA,GACD,kBAAC,QAAD;KACE,qBAAkB;KAClB,WAAWnE,EAAE;KACL;KACR,IAAI;KAAG,IAAI;KACX,IAAI;KAAG,IAAImE;IACZ,CAAA,CACA,EAAA,CAAA;GAEP,EAAA,CAAG;GACFiC,EAAiB,KAAKpB,GAAWC,CAAM;GACvCmB,EAAiB,KAAKlB,GAAWC,CAAM;GACvC4B;EACE;;AAET,CAAC"}
@@ -1,16 +1,17 @@
1
- import { n as e } from "./CurveEditor-f1R4kSbD.js";
1
+ import { n as e } from "./CurveEditor-DUVjd25R.js";
2
2
  import { jsx as t } from "react/jsx-runtime";
3
3
  //#region src/components/PointPlotter/PointPlotter.tsx
4
4
  function n(n) {
5
- return /* @__PURE__ */ t(e, {
5
+ let r = {
6
6
  ...n,
7
7
  addPointMode: n.addPointMode ?? "click-empty",
8
8
  curve: !1,
9
9
  fill: !1,
10
10
  endpoints: "free"
11
- });
11
+ };
12
+ return /* @__PURE__ */ t(e, { ...r });
12
13
  }
13
14
  //#endregion
14
15
  export { n as t };
15
16
 
16
- //# sourceMappingURL=PointPlotter-DGs9i5P-.js.map
17
+ //# sourceMappingURL=PointPlotter-ldI4RrU1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PointPlotter-ldI4RrU1.js","names":["CurveEditor","PointPlotter","curveProps","props"],"sources":["../../src/components/PointPlotter/PointPlotter.tsx"],"sourcesContent":["import type { CSSProperties, ReactNode } from 'react';\nimport {\n CurveEditor,\n type AnchorRenderProps,\n type ControlPoint,\n type CurveEditorProps,\n} from '../CurveEditor';\nimport type { GridSettings, AxesSettings, TickSettings } from '../Plot2D';\n\n/** Props for {@link PointPlotter}. */\nexport interface PointPlotterProps {\n /** Plotted points; caller-owned. */\n value: readonly ControlPoint[];\n /** Fires every frame during drag with the live in-flight value. */\n onInput: (next: ControlPoint[]) => void;\n /** Fires once per discrete user action (drag-end, add, delete) with\n * the new value and the value at gesture start. Wire history here. */\n onChange?: (next: ControlPoint[], prev: readonly ControlPoint[]) => void;\n /** Model-space x range. Default [0, 1]. */\n xRange?: readonly [number, number];\n /** Model-space y range. Default [0, 1]. */\n yRange?: readonly [number, number];\n width: number;\n height: number;\n grid?: GridSettings | false | null;\n axes?: AxesSettings | false | null;\n xTicks?: TickSettings | false | null;\n yTicks?: TickSettings | false | null;\n /** Minimum allowed point count. User-initiated deletion is refused\n * while `value.length <= minPoints`. */\n minPoints?: number;\n /** Maximum allowed point count. User-initiated insertion is refused\n * while `value.length >= maxPoints`. */\n maxPoints?: number;\n /** How new points are added. Default `'click-empty'`. Set to `'never'`\n * to disable insertion entirely. */\n addPointMode?: 'click-empty' | 'never';\n /** Built-in undo/redo via keyboard when the component has focus.\n * Default `true`. See `CurveEditor.history` for details. */\n history?: boolean;\n /** Custom per-anchor renderer. See `CurveEditor.renderAnchor`. */\n renderAnchor?: (info: AnchorRenderProps) => ReactNode;\n /** Extra SVG content beneath the anchors. See `CurveEditor.decorations`. */\n decorations?: ReactNode;\n className?: string;\n style?: CSSProperties;\n}\n\n/**\n * 2D point plotter — a CurveEditor with the curve hidden. Anchors,\n * drag, shift+click delete, right-click delete, and click-empty insert\n * are inherited from CurveEditor verbatim, so the two components share\n * gesture semantics and stay in sync as CurveEditor evolves.\n *\n * Differences from CurveEditor: no curve `<path>` drawn, no fill, no\n * endpoint pinning, no interpolation, default `addPointMode` is\n * `'click-empty'` (CurveEditor defaults to `'click-curve'`, which\n * doesn't make sense without a curve to hit-test against).\n */\nexport function PointPlotter(props: PointPlotterProps) {\n const curveProps: CurveEditorProps = {\n ...props,\n addPointMode: props.addPointMode ?? 'click-empty',\n curve: false,\n fill: false,\n endpoints: 'free',\n };\n return <CurveEditor {...curveProps} />;\n}\n"],"mappings":";;;AA2DA,SAAgBC,EAAa,GAA0B;CACrD,IAAMC,IAA+B;EACnC,GAAGC;EACH,cAAcA,EAAM,gBAAgB;EACpC,OAAO;EACP,MAAM;EACN,WAAW;CACb;CACA,OAAO,kBAACH,GAAD,EAAa,GAAIE,EAAa,CAAA;AACvC"}
@@ -0,0 +1,42 @@
1
+ import { t as e } from "./Badge-D2aD7xVL.js";
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ var n = {
4
+ row: "_row_1a09e_1",
5
+ matrix: "_matrix_1a09e_7",
6
+ segment: "_segment_1a09e_15"
7
+ };
8
+ //#endregion
9
+ //#region src/components/Powerline/Powerline.tsx
10
+ function r({ segments: r, startCap: i = "flat", size: a, variant: o, depth: s, gap: c, className: l, ...u }) {
11
+ let d = [n.row, l].filter(Boolean).join(" "), f = c === void 0 ? void 0 : { "--powerline-gap": typeof c == "number" ? `${c}px` : c };
12
+ return /* @__PURE__ */ t("span", {
13
+ className: d,
14
+ style: f,
15
+ "aria-label": u["aria-label"],
16
+ children: r.map((c, l) => {
17
+ let u = l === 0 ? i : r[l - 1].endCap ?? "flat", d = c.endCap ?? "flat";
18
+ return /* @__PURE__ */ t(e, {
19
+ base: "powerline",
20
+ baseParams: {
21
+ leftEdge: u,
22
+ rightEdge: d,
23
+ ...s !== void 0 && { depth: s }
24
+ },
25
+ status: c.status,
26
+ stance: c.stance,
27
+ tone: c.tone,
28
+ variant: c.variant ?? o,
29
+ size: c.size ?? a,
30
+ onClick: c.onClick,
31
+ href: c.href,
32
+ "aria-label": c["aria-label"],
33
+ className: n.segment,
34
+ children: c.text
35
+ }, l);
36
+ })
37
+ });
38
+ }
39
+ //#endregion
40
+ export { r as t };
41
+
42
+ //# sourceMappingURL=Powerline-DNyH885r.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Powerline-DNyH885r.js","names":["s","Badge","Powerline_module_default","Powerline","rest","cls","className","style","gap","segments","leftEdge","i","startCap","rightEdge","seg","depth","variant","size"],"sources":["../../src/components/Powerline/Powerline.module.css","../../src/components/Powerline/Powerline.tsx"],"sourcesContent":[".row {\n display: inline-flex;\n align-items: stretch;\n gap: var(--powerline-gap, 0.2em);\n}\n\n.matrix {\n display: grid;\n gap: var(--wzl-space-6);\n}\n\n/* Reset Badge's opinionated text defaults — Powerline segments should pick up\n * the surrounding text style instead of forcing uppercase / 10px / extra\n * tracking. Consumers can still override via className on Powerline. */\n.segment {\n font-size: inherit;\n text-transform: none;\n letter-spacing: normal;\n}\n","import type { CSSProperties, ReactNode } from 'react';\nimport { Badge } from '../Badge/Badge';\nimport type { BadgeSize, BadgeStatus, BadgeVariant } from '../Badge/types';\nimport type { StanceProps } from '../stance';\nimport type { EdgeCap } from '../Badge/bases/edgeProfiles';\nimport s from './Powerline.module.css';\n\n/**\n * One segment of a {@link Powerline}. Giving it `onClick` or `href` makes it\n * interactive, the same way it does on a `Badge`.\n */\nexport interface PowerlineSegment extends StanceProps {\n text: ReactNode;\n /** Cap on this segment's right edge. Next segment's left edge adopts the same profile. */\n endCap?: EdgeCap;\n status?: BadgeStatus;\n variant?: BadgeVariant;\n size?: BadgeSize;\n onClick?: () => void;\n href?: string;\n 'aria-label'?: string;\n}\n\n/** Props for {@link Powerline}. */\nexport interface PowerlineProps {\n segments: PowerlineSegment[];\n /** Left edge of the first segment. Defaults to 'flat'. */\n startCap?: EdgeCap;\n /** Default size for every segment (per-segment `size` wins). */\n size?: BadgeSize;\n /** Default variant for every segment (per-segment `variant` wins). */\n variant?: BadgeVariant;\n /** Protrusion depth in CSS px, passed through to every segment's base. */\n depth?: number;\n /** Visible gap between adjacent segments. Number → px; string → literal CSS length.\n * Default: `0.2em` (scales with the row's font size). Pass `0` for flush. */\n gap?: number | string;\n className?: string;\n 'aria-label'?: string;\n}\n\n/**\n * A row of chevron-linked badge segments, in the style of a shell powerline\n * prompt. Each segment's `endCap` shapes both its own right edge and the next\n * segment's left edge, so the run reads as one continuous chain.\n *\n * Built for showing a path through a sequence of steps — the inspector uses\n * it to display how input routes from tool to gesture to action to target.\n */\nexport function Powerline({\n segments,\n startCap = 'flat',\n size,\n variant,\n depth,\n gap,\n className,\n ...rest\n}: PowerlineProps) {\n const cls = [s.row, className].filter(Boolean).join(' ');\n const style: CSSProperties | undefined = gap !== undefined\n ? { ['--powerline-gap' as never]: typeof gap === 'number' ? `${gap}px` : gap }\n : undefined;\n return (\n <span className={cls} style={style} aria-label={rest['aria-label']}>\n {segments.map((seg, i) => {\n const leftEdge: EdgeCap = i === 0 ? startCap : (segments[i - 1].endCap ?? 'flat');\n const rightEdge: EdgeCap = seg.endCap ?? 'flat';\n return (\n <Badge\n key={i}\n base=\"powerline\"\n baseParams={{ leftEdge, rightEdge, ...(depth !== undefined && { depth }) }}\n status={seg.status}\n stance={seg.stance}\n tone={seg.tone}\n variant={seg.variant ?? variant}\n size={seg.size ?? size}\n onClick={seg.onClick}\n href={seg.href}\n aria-label={seg['aria-label']}\n className={s.segment}\n >\n {seg.text}\n </Badge>\n );\n })}\n </span>\n );\n}\n"],"mappings":";;;;;;;;;ACiDA,SAAgBG,EAAU,EACxB,aACA,cAAW,QACX,SACA,YACA,UACA,QACA,cACA,GAAGC,KACc;CACjB,IAAMC,IAAM,CAACL,EAAE,KAAKM,CAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,GACjDC,IAAmCC,MAAQ,KAAA,IAE7C,KAAA,IADA,EAAG,mBAA6B,OAAOA,KAAQ,WAAW,GAAGA,EAAI,MAAMA,EAAI;CAE/E,OACE,kBAAC,QAAD;EAAM,WAAWH;EAAY;EAAO,cAAYD,EAAK;EAClD,UAAAK,EAAS,KAAK,GAAK,MAAM;GACxB,IAAMC,IAAoBC,MAAM,IAAIC,IAAYH,EAASE,IAAI,EAAE,CAAC,UAAU,QACpEE,IAAqBC,EAAI,UAAU;GACzC,OACE,kBAACb,GAAD;IAEE,MAAK;IACL,YAAY;KAAE;KAAU;KAAW,GAAIc,MAAU,KAAA,KAAa,EAAE,SAAM;IAAG;IACzE,QAAQD,EAAI;IACZ,QAAQA,EAAI;IACZ,MAAMA,EAAI;IACV,SAASA,EAAI,WAAWE;IACxB,MAAMF,EAAI,QAAQG;IAClB,SAASH,EAAI;IACb,MAAMA,EAAI;IACV,cAAYA,EAAI;IAChB,WAAWd,EAAE;IAEZ,UAAAc,EAAI;GACA,GAdAH,CAcA;EAEX,CAAC;CACG,CAAA;AAEV"}
@@ -1,8 +1,8 @@
1
- import { t as e } from "./Dialog-GIvjoDQj.js";
2
- import { o as t, t as n } from "./PropertyField-CDb19d3F.js";
3
- import { t as r } from "./Input-Bx2cuUbS.js";
4
- import { t as i } from "./useRovingTabIndex-B4uJqiKP.js";
5
- import { a, n as o, o as s, r as c, s as l, t as u } from "./prefField-CLkhrvYl.js";
1
+ import { t as e } from "./Dialog-DGFutQ--.js";
2
+ import { o as t, t as n } from "./PropertyField-DfIJJ5GS.js";
3
+ import { t as r } from "./Input-CHmkfYaD.js";
4
+ import { t as i } from "./useRovingTabIndex-Bp_hYm_h.js";
5
+ import { a, n as o, o as s, r as c, s as l, t as u } from "./prefField-BopW9bjx.js";
6
6
  import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
7
7
  import { useCallback as m, useEffect as h, useMemo as g, useRef as _, useState as v } from "react";
8
8
  //#region src/useScrollSpy.ts
@@ -16,7 +16,7 @@ function y(e, t = 8) {
16
16
  }
17
17
  var b = 700;
18
18
  function x(e) {
19
- let { rootRef: t, ids: n, slack: r } = e, [i, a] = v(null), o = _(null), s = _(null), c = _(null), l = m(() => {
19
+ let { rootRef: t, ids: n, slack: r } = e, [i, a] = v(null), o = _(null), s = _(null), c = _(null), l = n.join("\0"), u = m(() => {
20
20
  let e = t.current;
21
21
  if (!e) return;
22
22
  if (o.current !== null) {
@@ -34,33 +34,33 @@ function x(e) {
34
34
  a(y(s, r));
35
35
  }, [
36
36
  t,
37
- n.join("\0"),
37
+ l,
38
38
  r
39
39
  ]);
40
40
  h(() => {
41
41
  let e = t.current;
42
- if (e) return l(), e.addEventListener("scroll", l, { passive: !0 }), () => e.removeEventListener("scroll", l);
43
- }, [t, l]);
44
- let u = m((e) => {
42
+ if (e) return u(), e.addEventListener("scroll", u, { passive: !0 }), () => e.removeEventListener("scroll", u);
43
+ }, [t, u]);
44
+ let d = m((e) => {
45
45
  let n = t.current;
46
46
  if (!n) return;
47
47
  let r = n.querySelector(`[data-spy-section="${CSS.escape(e)}"]`);
48
48
  o.current = e, a(e);
49
49
  let i = () => {
50
- o.current = null, n.removeEventListener("scrollend", i), l();
50
+ o.current = null, n.removeEventListener("scrollend", i), u();
51
51
  };
52
52
  if (c.current?.(), s.current !== null && clearTimeout(s.current), c.current = i, s.current = setTimeout(i, b), n.addEventListener("scrollend", i), !r) return;
53
- let u = r.getBoundingClientRect().top - n.getBoundingClientRect().top + n.scrollTop;
53
+ let l = r.getBoundingClientRect().top - n.getBoundingClientRect().top + n.scrollTop;
54
54
  n.scrollTo?.({
55
- top: u,
55
+ top: l,
56
56
  behavior: S() ? "auto" : "smooth"
57
57
  });
58
- }, [t, l]);
58
+ }, [t, u]);
59
59
  return h(() => () => {
60
60
  s.current !== null && clearTimeout(s.current), c.current?.();
61
61
  }, []), {
62
62
  active: i,
63
- scrollTo: u
63
+ scrollTo: d
64
64
  };
65
65
  }
66
66
  function S() {
@@ -120,7 +120,6 @@ function w({ ctx: e, path: n, pref: r }) {
120
120
  label: r.name,
121
121
  description: r.description,
122
122
  layout: "inline",
123
- chrome: "framed",
124
123
  className: C.row,
125
124
  children: /* @__PURE__ */ f("span", {
126
125
  className: C.rowControl,
@@ -130,26 +129,40 @@ function w({ ctx: e, path: n, pref: r }) {
130
129
  }
131
130
  function T(e, t) {
132
131
  let { pref: r, value: i, setValue: a } = e;
133
- if (r.kind === "object") return /* @__PURE__ */ f(E, { ctx: e });
132
+ if (r.kind === "object") return /* @__PURE__ */ f(D, { ctx: e });
134
133
  let o = u(r, {
135
134
  value: i,
136
135
  siblings: t,
137
136
  setValue: a
138
137
  });
139
- return o === null ? /* @__PURE__ */ p("span", {
138
+ if (o === null) return /* @__PURE__ */ p("span", {
140
139
  className: C.unrenderable,
141
140
  children: [
142
141
  "(",
143
142
  r.kind,
144
143
  ": no renderer)"
145
144
  ]
146
- }) : /* @__PURE__ */ f(n, {
147
- ...o,
148
- chrome: "framed",
149
- name: r.name
150
145
  });
146
+ switch (o.kind) {
147
+ case "number": return /* @__PURE__ */ f(n, {
148
+ ...o,
149
+ name: r.name,
150
+ onInput: E,
151
+ steppers: o.accepts === void 0
152
+ });
153
+ case "color": return /* @__PURE__ */ f(n, {
154
+ ...o,
155
+ name: r.name,
156
+ onInput: E
157
+ });
158
+ default: return /* @__PURE__ */ f(n, {
159
+ ...o,
160
+ name: r.name
161
+ });
162
+ }
151
163
  }
152
- function E({ ctx: e }) {
164
+ var E = () => {};
165
+ function D({ ctx: e }) {
153
166
  let n = e.pref, { value: r, setValue: i } = e, a = typeof r == "object" && r ? r : void 0, o = (s) => {
154
167
  let l = [];
155
168
  for (let [u, d] of Object.entries(s)) {
@@ -165,7 +178,6 @@ function E({ ctx: e }) {
165
178
  l.push(/* @__PURE__ */ f(t, {
166
179
  label: d.name,
167
180
  layout: "inline",
168
- chrome: "framed",
169
181
  className: C.objectRow,
170
182
  children: /* @__PURE__ */ f("span", {
171
183
  className: C.rowControl,
@@ -174,8 +186,9 @@ function E({ ctx: e }) {
174
186
  pref: d,
175
187
  value: a?.[u],
176
188
  setValue: (e) => {
189
+ let t = a ?? n.fromScalar?.(r) ?? {};
177
190
  i({
178
- ...a ?? n.fromScalar?.(r) ?? {},
191
+ ...t,
179
192
  [u]: e
180
193
  });
181
194
  },
@@ -194,7 +207,7 @@ function E({ ctx: e }) {
194
207
  }
195
208
  //#endregion
196
209
  //#region src/components/Prefs/PrefsPane.tsx
197
- function D(e) {
210
+ function O(e) {
198
211
  let { ctx: t, group: n, path: r, scrollRef: i, className: a } = e, o = Object.entries(n.children).filter((e) => c(e[1])), s = Object.entries(n.children).filter((e) => !c(e[1])), l = (e) => r === "" ? e : `${r}.${e}`;
199
212
  return /* @__PURE__ */ p("div", {
200
213
  className: [C.pane, a].filter(Boolean).join(" "),
@@ -218,7 +231,7 @@ function D(e) {
218
231
  pref: n
219
232
  }, e))
220
233
  }),
221
- s.map(([e, n]) => /* @__PURE__ */ f(O, {
234
+ s.map(([e, n]) => /* @__PURE__ */ f(k, {
222
235
  ctx: t,
223
236
  group: n,
224
237
  path: l(e),
@@ -227,7 +240,7 @@ function D(e) {
227
240
  ]
228
241
  });
229
242
  }
230
- function O({ ctx: e, group: t, path: n, depth: r }) {
243
+ function k({ ctx: e, group: t, path: n, depth: r }) {
231
244
  let i = r === 0 ? "h4" : "h5";
232
245
  return /* @__PURE__ */ p("section", {
233
246
  className: r === 0 ? C.paneSection : C.paneSubsection,
@@ -250,7 +263,7 @@ function O({ ctx: e, group: t, path: n, depth: r }) {
250
263
  ctx: e,
251
264
  path: a,
252
265
  pref: i
253
- }, t) : /* @__PURE__ */ f(O, {
266
+ }, t) : /* @__PURE__ */ f(k, {
254
267
  ctx: e,
255
268
  group: i,
256
269
  path: a,
@@ -263,7 +276,7 @@ function O({ ctx: e, group: t, path: n, depth: r }) {
263
276
  }
264
277
  //#endregion
265
278
  //#region src/components/Prefs/PrefsRail.tsx
266
- function k(e) {
279
+ function A(e) {
267
280
  let { items: t, section: n, current: r, onOpen: a, onScrollTo: o, ariaLabel: s, header: c, showCounts: l } = e, u = (e) => {
268
281
  let n = t[e];
269
282
  n && (n.depth === 0 ? a(n.path) : o(n.path));
@@ -306,7 +319,7 @@ function k(e) {
306
319
  }
307
320
  //#endregion
308
321
  //#region src/components/Prefs/PrefsForm.tsx
309
- function A(e) {
322
+ function j(e) {
310
323
  let { schema: t, values: n, onChange: i, renderers: a, showHidden: s = !1, layout: u = "columns", filterable: d = !1, className: m } = e, [h, _] = v(""), y = g(() => {
311
324
  let e = l(t, s);
312
325
  return e === null ? null : o(e, h);
@@ -327,7 +340,7 @@ function A(e) {
327
340
  placeholder: "Filter settings"
328
341
  })
329
342
  }) : null;
330
- return u === "rail" ? /* @__PURE__ */ f(j, {
343
+ return u === "rail" ? /* @__PURE__ */ f(M, {
331
344
  ...e,
332
345
  root: y,
333
346
  ctx: b,
@@ -336,7 +349,7 @@ function A(e) {
336
349
  onClearFilter: () => _("")
337
350
  }) : /* @__PURE__ */ p("div", {
338
351
  className: [C.columnsLayout, m].filter(Boolean).join(" "),
339
- children: [x, y === null ? /* @__PURE__ */ f(N, {
352
+ children: [x, y === null ? /* @__PURE__ */ f(P, {
340
353
  query: h,
341
354
  onClear: () => _("")
342
355
  }) : /* @__PURE__ */ f("div", {
@@ -347,7 +360,7 @@ function A(e) {
347
360
  ctx: b,
348
361
  path: e,
349
362
  pref: t
350
- }) : /* @__PURE__ */ f(P, {
363
+ }) : /* @__PURE__ */ f(F, {
351
364
  ctx: b,
352
365
  group: t,
353
366
  path: e,
@@ -357,16 +370,16 @@ function A(e) {
357
370
  })]
358
371
  });
359
372
  }
360
- function j(e) {
373
+ function M(e) {
361
374
  let { schema: t, root: n, ctx: r, query: i, filterField: o, onClearFilter: s, className: c } = e, l = g(() => n === null ? [] : a(n), [n]), [u, d] = v(() => e.defaultSection ?? ""), m = e.section ?? u, h = l.some((e) => e.path === m && e.depth === 0) ? m : l.find((e) => e.depth === 0)?.path ?? "", y = _(null), b = x({
362
375
  rootRef: y,
363
376
  ids: g(() => l.filter((e) => e.depth === 1 && e.section === h).map((e) => e.path), [l, h])
364
377
  }), S = (t) => {
365
378
  e.section === void 0 && d(t), e.onSectionChange?.(t), y.current?.scrollTo?.({ top: 0 });
366
- }, w = n === null ? null : M(n, h, t.name);
379
+ }, w = n === null ? null : N(n, h, t.name);
367
380
  return /* @__PURE__ */ p("div", {
368
381
  className: [C.railLayout, c].filter(Boolean).join(" "),
369
- children: [/* @__PURE__ */ f(k, {
382
+ children: [/* @__PURE__ */ f(A, {
370
383
  items: l,
371
384
  section: h,
372
385
  current: b.active,
@@ -377,11 +390,11 @@ function j(e) {
377
390
  showCounts: i.trim() !== ""
378
391
  }), w === null ? /* @__PURE__ */ f("div", {
379
392
  className: C.pane,
380
- children: /* @__PURE__ */ f(N, {
393
+ children: /* @__PURE__ */ f(P, {
381
394
  query: i,
382
395
  onClear: s
383
396
  })
384
- }) : /* @__PURE__ */ f(D, {
397
+ }) : /* @__PURE__ */ f(O, {
385
398
  ctx: r,
386
399
  group: w,
387
400
  path: h,
@@ -389,7 +402,7 @@ function j(e) {
389
402
  })]
390
403
  });
391
404
  }
392
- function M(e, t, n) {
405
+ function N(e, t, n) {
393
406
  if (t === "") {
394
407
  let t = Object.fromEntries(Object.entries(e.children).filter(([, e]) => c(e)));
395
408
  return Object.keys(t).length === 0 ? null : {
@@ -406,7 +419,7 @@ function M(e, t, n) {
406
419
  }
407
420
  return r ?? null;
408
421
  }
409
- function N({ query: e, onClear: t }) {
422
+ function P({ query: e, onClear: t }) {
410
423
  return /* @__PURE__ */ p("div", {
411
424
  className: C.noMatches,
412
425
  children: [/* @__PURE__ */ p("p", { children: [
@@ -421,7 +434,7 @@ function N({ query: e, onClear: t }) {
421
434
  })]
422
435
  });
423
436
  }
424
- function P({ ctx: e, group: t, path: n, depth: r }) {
437
+ function F({ ctx: e, group: t, path: n, depth: r }) {
425
438
  return /* @__PURE__ */ p("div", {
426
439
  className: r === 0 ? C.panel : C.subpanel,
427
440
  children: [/* @__PURE__ */ p("div", {
@@ -441,7 +454,7 @@ function P({ ctx: e, group: t, path: n, depth: r }) {
441
454
  ctx: e,
442
455
  path: a,
443
456
  pref: i
444
- }, t) : /* @__PURE__ */ f(P, {
457
+ }, t) : /* @__PURE__ */ f(F, {
445
458
  ctx: e,
446
459
  group: i,
447
460
  path: a,
@@ -453,7 +466,7 @@ function P({ ctx: e, group: t, path: n, depth: r }) {
453
466
  }
454
467
  //#endregion
455
468
  //#region src/components/Prefs/PrefsDialog.tsx
456
- function F(t) {
469
+ function I(t) {
457
470
  let { isOpen: n, onOpenChange: r, title: i, headerExtra: a, footer: o, dialogClassName: s, ...c } = t, l = c.layout === "rail";
458
471
  return /* @__PURE__ */ f(e, {
459
472
  isOpen: n,
@@ -466,10 +479,10 @@ function F(t) {
466
479
  className: C.titleRow,
467
480
  children: [/* @__PURE__ */ f("span", { children: i ?? c.schema.name }), a]
468
481
  }),
469
- children: /* @__PURE__ */ f(A, { ...c })
482
+ children: /* @__PURE__ */ f(j, { ...c })
470
483
  });
471
484
  }
472
485
  //#endregion
473
- export { y as a, D as i, A as n, x as o, k as r, F as t };
486
+ export { y as a, O as i, j as n, x as o, A as r, I as t };
474
487
 
475
- //# sourceMappingURL=Prefs-Ctu0H4-b.js.map
488
+ //# sourceMappingURL=Prefs-ByA-x51i.js.map