@weasel-js/ui 1.5.2 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (565) hide show
  1. package/dist/chunks/ActionBar-DCq16yFA.js +57 -0
  2. package/dist/chunks/ActionBar-DCq16yFA.js.map +1 -0
  3. package/dist/chunks/{Badge-CW9pBPFl.js → Badge-CyAIZSDo.js} +758 -741
  4. package/dist/chunks/Badge-CyAIZSDo.js.map +1 -0
  5. package/dist/chunks/{BandEditor-jY-PFKY6.js → BandEditor-Dhm_Xrlr.js} +37 -36
  6. package/dist/chunks/BandEditor-Dhm_Xrlr.js.map +1 -0
  7. package/dist/chunks/Button-BIdXHQOx.js +111 -0
  8. package/dist/chunks/Button-BIdXHQOx.js.map +1 -0
  9. package/dist/chunks/ButtonBar-D5Vi0aj_.js +46 -0
  10. package/dist/chunks/ButtonBar-D5Vi0aj_.js.map +1 -0
  11. package/dist/chunks/Callout-yEn9iPlh.js +119 -0
  12. package/dist/chunks/Callout-yEn9iPlh.js.map +1 -0
  13. package/dist/chunks/{Checkbox-BOsDAY2F.js → Checkbox-DHXTUHO9.js} +1 -1
  14. package/dist/chunks/Checkbox-DHXTUHO9.js.map +1 -0
  15. package/dist/chunks/Code-AsKpgnv6.js +24 -0
  16. package/dist/chunks/Code-AsKpgnv6.js.map +1 -0
  17. package/dist/chunks/{ColorField-BYzgZM9o.js → ColorField-BcMcW8Sa.js} +16 -16
  18. package/dist/chunks/ColorField-BcMcW8Sa.js.map +1 -0
  19. package/dist/chunks/ColorModeControl-ke5PXbBa.js +47 -0
  20. package/dist/chunks/ColorModeControl-ke5PXbBa.js.map +1 -0
  21. package/dist/chunks/{ComboBox-Cz3f0Y_8.js → ComboBox-DpT8lc3p.js} +3 -3
  22. package/dist/chunks/ComboBox-DpT8lc3p.js.map +1 -0
  23. package/dist/chunks/{CurveEditor-DXwSP-iA.js → CurveEditor-BDJXjEvK.js} +35 -35
  24. package/dist/chunks/CurveEditor-BDJXjEvK.js.map +1 -0
  25. package/dist/chunks/DataGrid-D-dZj1BD.js +152 -0
  26. package/dist/chunks/DataGrid-D-dZj1BD.js.map +1 -0
  27. package/dist/chunks/DetailList-BMER1LUZ.js +43 -0
  28. package/dist/chunks/DetailList-BMER1LUZ.js.map +1 -0
  29. package/dist/chunks/{DetentSlider-CAubVX0J.js → DetentSlider-CL8TlX3S.js} +2 -2
  30. package/dist/chunks/DetentSlider-CL8TlX3S.js.map +1 -0
  31. package/dist/chunks/Dialog-BWyNMgpf.js +66 -0
  32. package/dist/chunks/Dialog-BWyNMgpf.js.map +1 -0
  33. package/dist/chunks/Disclosure-0G0uh2fa.js +58 -0
  34. package/dist/chunks/Disclosure-0G0uh2fa.js.map +1 -0
  35. package/dist/chunks/DragGhost-B5_hb9W9.js +30 -0
  36. package/dist/chunks/DragGhost-B5_hb9W9.js.map +1 -0
  37. package/dist/chunks/{DragHandleGlyph-CppAz4_8.js → DragHandleGlyph-Dr7Fgo0I.js} +1 -1
  38. package/dist/chunks/DragHandleGlyph-Dr7Fgo0I.js.map +1 -0
  39. package/dist/chunks/{Field-DWnV8WZY.js → Field--onYxXTF.js} +7 -6
  40. package/dist/chunks/Field--onYxXTF.js.map +1 -0
  41. package/dist/chunks/FillStrokeSwatch-DNb0KXPk.js +111 -0
  42. package/dist/chunks/FillStrokeSwatch-DNb0KXPk.js.map +1 -0
  43. package/dist/chunks/{FontFamilySelect-DxfgTC3G.js → FontFamilySelect-DXlMKWfK.js} +2 -2
  44. package/dist/chunks/FontFamilySelect-DXlMKWfK.js.map +1 -0
  45. package/dist/chunks/GradientEditor-B3a-MsVJ.js +335 -0
  46. package/dist/chunks/GradientEditor-B3a-MsVJ.js.map +1 -0
  47. package/dist/chunks/{Icon-DT0x6HaQ.js → Icon-Cgzy8VgC.js} +28 -20
  48. package/dist/chunks/Icon-Cgzy8VgC.js.map +1 -0
  49. package/dist/chunks/InlineRange-eOj6JpJl.js +29 -0
  50. package/dist/chunks/InlineRange-eOj6JpJl.js.map +1 -0
  51. package/dist/chunks/{Input-DbMKpkXy.js → Input-CHmkfYaD.js} +24 -19
  52. package/dist/chunks/Input-CHmkfYaD.js.map +1 -0
  53. package/dist/chunks/ItemList-Cm-HUWCi.js +174 -0
  54. package/dist/chunks/ItemList-Cm-HUWCi.js.map +1 -0
  55. package/dist/chunks/ItemList.module-BSpCSxan.js +14 -0
  56. package/dist/chunks/ItemList.module-BSpCSxan.js.map +1 -0
  57. package/dist/chunks/{Jog-DkkTlL3_.js → Jog-DESxZ44P.js} +6 -6
  58. package/dist/chunks/Jog-DESxZ44P.js.map +1 -0
  59. package/dist/chunks/{Keycaps-DunVpejA.js → Keycaps-C0H_v2gO.js} +71 -65
  60. package/dist/chunks/Keycaps-C0H_v2gO.js.map +1 -0
  61. package/dist/chunks/LayerList-nz-QYvTF.js +427 -0
  62. package/dist/chunks/LayerList-nz-QYvTF.js.map +1 -0
  63. package/dist/chunks/ListEditor-BQ6AV3Ac.js +74 -0
  64. package/dist/chunks/ListEditor-BQ6AV3Ac.js.map +1 -0
  65. package/dist/chunks/MenuButton-DtaGenKf.js +70 -0
  66. package/dist/chunks/MenuButton-DtaGenKf.js.map +1 -0
  67. package/dist/chunks/MeshEditor-qqGc6hlD.js +87 -0
  68. package/dist/chunks/MeshEditor-qqGc6hlD.js.map +1 -0
  69. package/dist/chunks/{NumberField-CCjEDZCg.js → NumberField-CwJOMmQR.js} +27 -22
  70. package/dist/chunks/NumberField-CwJOMmQR.js.map +1 -0
  71. package/dist/chunks/{OptionsBar-DeQ-vUeZ.js → OptionsBar-DbzAgIln.js} +3 -3
  72. package/dist/chunks/OptionsBar-DbzAgIln.js.map +1 -0
  73. package/dist/chunks/{PaintField-jBOJ32rL.js → PaintField-DaJukRc6.js} +21 -21
  74. package/dist/chunks/PaintField-DaJukRc6.js.map +1 -0
  75. package/dist/chunks/{PaintInput-Qs7Rul5R.js → PaintInput-Byhna3H-.js} +24 -24
  76. package/dist/chunks/PaintInput-Byhna3H-.js.map +1 -0
  77. package/dist/chunks/{PatternPicker-BMpXWboq.js → PatternPicker-B-cUt-JT.js} +2 -2
  78. package/dist/chunks/PatternPicker-B-cUt-JT.js.map +1 -0
  79. package/dist/chunks/{Plot2D-CXf_f7QD.js → Plot2D-CTXHkL5p.js} +13 -13
  80. package/dist/chunks/Plot2D-CTXHkL5p.js.map +1 -0
  81. package/dist/chunks/{PointPlotter-S_gz7VYt.js → PointPlotter-Bxo6haKe.js} +5 -4
  82. package/dist/chunks/PointPlotter-Bxo6haKe.js.map +1 -0
  83. package/dist/chunks/Powerline-ExO5GwEr.js +42 -0
  84. package/dist/chunks/Powerline-ExO5GwEr.js.map +1 -0
  85. package/dist/chunks/Prefs-DpqFKiwY.js +476 -0
  86. package/dist/chunks/Prefs-DpqFKiwY.js.map +1 -0
  87. package/dist/chunks/Properties-D_KzDN9K.js +282 -0
  88. package/dist/chunks/Properties-D_KzDN9K.js.map +1 -0
  89. package/dist/chunks/PropertyField-DGCecAnV.js +758 -0
  90. package/dist/chunks/PropertyField-DGCecAnV.js.map +1 -0
  91. package/dist/chunks/{RadioGroup-CsVp3SEu.js → RadioGroup-Bh4-12e-.js} +2 -2
  92. package/dist/chunks/RadioGroup-Bh4-12e-.js.map +1 -0
  93. package/dist/chunks/{RangeSlider-DNr-pJpZ.js → RangeSlider-BKRRTPTZ.js} +1 -1
  94. package/dist/chunks/RangeSlider-BKRRTPTZ.js.map +1 -0
  95. package/dist/chunks/{ResizeHandle-RXFf5fXr.js → ResizeHandle-BKT0XYpx.js} +15 -15
  96. package/dist/chunks/ResizeHandle-BKT0XYpx.js.map +1 -0
  97. package/dist/chunks/Select-CzyfaXzp.js +225 -0
  98. package/dist/chunks/Select-CzyfaXzp.js.map +1 -0
  99. package/dist/chunks/{SelectionPanel-CEbLS-0D.js → SelectionPanel-BgUM1h03.js} +21 -20
  100. package/dist/chunks/SelectionPanel-BgUM1h03.js.map +1 -0
  101. package/dist/chunks/{Sidebar-qn_oSCNX.js → Sidebar-BZ0m4afn.js} +8 -8
  102. package/dist/chunks/Sidebar-BZ0m4afn.js.map +1 -0
  103. package/dist/chunks/{SidebarPanel-Bs6V21hg.js → SidebarPanel-aoIqxbtq.js} +15 -19
  104. package/dist/chunks/SidebarPanel-aoIqxbtq.js.map +1 -0
  105. package/dist/chunks/{Slider-CIIrqiFS.js → Slider-CFwQYQ10.js} +94 -92
  106. package/dist/chunks/Slider-CFwQYQ10.js.map +1 -0
  107. package/dist/chunks/{StatusBar-B4L15DSm.js → StatusBar-DzoPDY4k.js} +8 -8
  108. package/dist/chunks/StatusBar-DzoPDY4k.js.map +1 -0
  109. package/dist/chunks/SwatchGrid-BARC3rnF.js +73 -0
  110. package/dist/chunks/SwatchGrid-BARC3rnF.js.map +1 -0
  111. package/dist/chunks/{Switch-DH5POG0T.js → Switch-CSYmcM8y.js} +1 -1
  112. package/dist/chunks/Switch-CSYmcM8y.js.map +1 -0
  113. package/dist/chunks/{Tabs-BFHikpml.js → Tabs-BbpzLLdY.js} +1 -1
  114. package/dist/chunks/Tabs-BbpzLLdY.js.map +1 -0
  115. package/dist/chunks/{Timeline-DNKY_yiK.js → Timeline--58F7MED.js} +141 -145
  116. package/dist/chunks/Timeline--58F7MED.js.map +1 -0
  117. package/dist/chunks/{Toast-CI1UDuK6.js → Toast-DNBb-24H.js} +1 -1
  118. package/dist/chunks/Toast-DNBb-24H.js.map +1 -0
  119. package/dist/chunks/ToggleBar-DTjGeS0Q.js +82 -0
  120. package/dist/chunks/ToggleBar-DTjGeS0Q.js.map +1 -0
  121. package/dist/chunks/{TokenPanel-BPHq24dc.js → TokenPanel-CMq7uydV.js} +50 -47
  122. package/dist/chunks/TokenPanel-CMq7uydV.js.map +1 -0
  123. package/dist/chunks/{ToolButton-9QzJCmuM.js → ToolButton-CR4sQlxF.js} +4 -4
  124. package/dist/chunks/ToolButton-CR4sQlxF.js.map +1 -0
  125. package/dist/chunks/{ToolGroup-BJiDrH_i.js → ToolGroup-Dpg1LN0l.js} +7 -7
  126. package/dist/chunks/ToolGroup-Dpg1LN0l.js.map +1 -0
  127. package/dist/chunks/{ToolOptionsBar-CAM6RcUH.js → ToolOptionsBar-CtzTlaN2.js} +6 -5
  128. package/dist/chunks/ToolOptionsBar-CtzTlaN2.js.map +1 -0
  129. package/dist/chunks/ToolPalette-CKG9qY6P.js +83 -0
  130. package/dist/chunks/ToolPalette-CKG9qY6P.js.map +1 -0
  131. package/dist/chunks/Tooltip-Clg2mhSt.js +42 -0
  132. package/dist/chunks/Tooltip-Clg2mhSt.js.map +1 -0
  133. package/dist/chunks/Tree-DVOtc9R5.js +203 -0
  134. package/dist/chunks/Tree-DVOtc9R5.js.map +1 -0
  135. package/dist/chunks/{createKeyframeLayer-DKtO0Sw_.js → createKeyframeLayer-Czj6Y235.js} +86 -86
  136. package/dist/chunks/createKeyframeLayer-Czj6Y235.js.map +1 -0
  137. package/dist/chunks/{dlog-CMYiRF3Q.js → dlog-F0I8KsIW.js} +2 -2
  138. package/dist/chunks/dlog-F0I8KsIW.js.map +1 -0
  139. package/dist/chunks/formatShortcut-DRQrVThu.js +15 -0
  140. package/dist/chunks/formatShortcut-DRQrVThu.js.map +1 -0
  141. package/dist/chunks/icons-Dk8SRS8g.js +162 -0
  142. package/dist/chunks/icons-Dk8SRS8g.js.map +1 -0
  143. package/dist/chunks/interactiveTarget-BNZmTow2.js +24 -0
  144. package/dist/chunks/interactiveTarget-BNZmTow2.js.map +1 -0
  145. package/dist/chunks/{keyGlyph-Bp0wnLHn.js → keyGlyph-C0qTakG-.js} +1 -1
  146. package/dist/chunks/keyGlyph-C0qTakG-.js.map +1 -0
  147. package/dist/chunks/model-Du7Lta4C.js +360 -0
  148. package/dist/chunks/model-Du7Lta4C.js.map +1 -0
  149. package/dist/chunks/{number-BHz66zQO.js → number-D3NEx_8r.js} +3 -3
  150. package/dist/chunks/number-D3NEx_8r.js.map +1 -0
  151. package/dist/chunks/paintPreview-CuSZiHpR.js +42 -0
  152. package/dist/chunks/paintPreview-CuSZiHpR.js.map +1 -0
  153. package/dist/chunks/paintValue-BpaGPjV3.js +18 -0
  154. package/dist/chunks/paintValue-BpaGPjV3.js.map +1 -0
  155. package/dist/chunks/{portalHost-CjpCnuGU.js → portalHost-yTOVuCej.js} +1 -1
  156. package/dist/chunks/portalHost-yTOVuCej.js.map +1 -0
  157. package/dist/chunks/prefField-Dnl7nmjQ.js +197 -0
  158. package/dist/chunks/prefField-Dnl7nmjQ.js.map +1 -0
  159. package/dist/chunks/segmentTooltip-CStYHKzd.js +29 -0
  160. package/dist/chunks/segmentTooltip-CStYHKzd.js.map +1 -0
  161. package/dist/chunks/segmentedControl.module-Bv7DEg8f.js +11 -0
  162. package/dist/chunks/segmentedControl.module-Bv7DEg8f.js.map +1 -0
  163. package/dist/chunks/{snap-CEjuWOhN.js → snap-DRjbOiG9.js} +1 -1
  164. package/dist/chunks/snap-DRjbOiG9.js.map +1 -0
  165. package/dist/chunks/stance-BFQpS_fL.js +17 -0
  166. package/dist/chunks/stance-BFQpS_fL.js.map +1 -0
  167. package/dist/chunks/useReorderDragList-B_-5L5Gu.js +131 -0
  168. package/dist/chunks/useReorderDragList-B_-5L5Gu.js.map +1 -0
  169. package/dist/chunks/{useRovingTabIndex-Dkpf_KhN.js → useRovingTabIndex-Bp_hYm_h.js} +1 -1
  170. package/dist/chunks/useRovingTabIndex-Bp_hYm_h.js.map +1 -0
  171. package/dist/color/ramp.d.ts +38 -0
  172. package/dist/color/ramp.d.ts.map +1 -0
  173. package/dist/components/ActionBar/ActionBar.d.ts +7 -5
  174. package/dist/components/ActionBar/ActionBar.d.ts.map +1 -1
  175. package/dist/components/ActionBar/index.js +1 -1
  176. package/dist/components/Badge/Badge.d.ts +21 -7
  177. package/dist/components/Badge/Badge.d.ts.map +1 -1
  178. package/dist/components/Badge/effects/Aqua.d.ts +1 -1
  179. package/dist/components/Badge/effects/Aqua.d.ts.map +1 -1
  180. package/dist/components/Badge/index.d.ts +1 -1
  181. package/dist/components/Badge/index.d.ts.map +1 -1
  182. package/dist/components/Badge/index.js +1 -1
  183. package/dist/components/Badge/types.d.ts +6 -5
  184. package/dist/components/Badge/types.d.ts.map +1 -1
  185. package/dist/components/BandEditor/index.js +1 -1
  186. package/dist/components/Button/Button.d.ts +17 -3
  187. package/dist/components/Button/Button.d.ts.map +1 -1
  188. package/dist/components/Button/index.d.ts +1 -1
  189. package/dist/components/Button/index.d.ts.map +1 -1
  190. package/dist/components/Button/index.js +1 -1
  191. package/dist/components/ButtonBar/ButtonBar.d.ts +36 -0
  192. package/dist/components/ButtonBar/ButtonBar.d.ts.map +1 -0
  193. package/dist/components/ButtonBar/index.d.ts +3 -0
  194. package/dist/components/ButtonBar/index.d.ts.map +1 -0
  195. package/dist/components/ButtonBar/index.js +2 -0
  196. package/dist/components/Callout/Callout.d.ts +3 -6
  197. package/dist/components/Callout/Callout.d.ts.map +1 -1
  198. package/dist/components/Callout/index.d.ts +1 -1
  199. package/dist/components/Callout/index.d.ts.map +1 -1
  200. package/dist/components/Callout/index.js +1 -1
  201. package/dist/components/Checkbox/index.js +1 -1
  202. package/dist/components/Code/Code.d.ts +28 -0
  203. package/dist/components/Code/Code.d.ts.map +1 -0
  204. package/dist/components/Code/index.d.ts +3 -0
  205. package/dist/components/Code/index.d.ts.map +1 -0
  206. package/dist/components/Code/index.js +2 -0
  207. package/dist/components/ColorField/ColorField.d.ts +1 -1
  208. package/dist/components/ColorField/ColorField.d.ts.map +1 -1
  209. package/dist/components/ColorField/index.js +1 -1
  210. package/dist/components/ColorModeControl/ColorModeControl.d.ts +21 -0
  211. package/dist/components/ColorModeControl/ColorModeControl.d.ts.map +1 -0
  212. package/dist/components/ColorModeControl/index.d.ts +3 -0
  213. package/dist/components/ColorModeControl/index.d.ts.map +1 -0
  214. package/dist/components/ColorModeControl/index.js +2 -0
  215. package/dist/components/ComboBox/ComboBox.d.ts +2 -2
  216. package/dist/components/ComboBox/ComboBox.d.ts.map +1 -1
  217. package/dist/components/ComboBox/index.js +1 -1
  218. package/dist/components/CurveEditor/CurveEditor.d.ts +1 -1
  219. package/dist/components/CurveEditor/CurveEditor.d.ts.map +1 -1
  220. package/dist/components/CurveEditor/LayeredCurveEditor.d.ts +1 -1
  221. package/dist/components/CurveEditor/LayeredCurveEditor.d.ts.map +1 -1
  222. package/dist/components/CurveEditor/index.js +3 -3
  223. package/dist/components/DataGrid/DataGrid.d.ts +23 -1
  224. package/dist/components/DataGrid/DataGrid.d.ts.map +1 -1
  225. package/dist/components/DataGrid/index.js +1 -1
  226. package/dist/components/DetailList/DetailList.d.ts +36 -0
  227. package/dist/components/DetailList/DetailList.d.ts.map +1 -0
  228. package/dist/components/DetailList/index.d.ts +3 -0
  229. package/dist/components/DetailList/index.d.ts.map +1 -0
  230. package/dist/components/DetailList/index.js +2 -0
  231. package/dist/components/DetentSlider/index.js +1 -1
  232. package/dist/components/Dialog/Dialog.d.ts +9 -3
  233. package/dist/components/Dialog/Dialog.d.ts.map +1 -1
  234. package/dist/components/Dialog/index.js +1 -1
  235. package/dist/components/Disclosure/Disclosure.d.ts +26 -18
  236. package/dist/components/Disclosure/Disclosure.d.ts.map +1 -1
  237. package/dist/components/Disclosure/index.d.ts +2 -2
  238. package/dist/components/Disclosure/index.d.ts.map +1 -1
  239. package/dist/components/Disclosure/index.js +2 -2
  240. package/dist/components/DragGhost/DragGhost.d.ts +21 -0
  241. package/dist/components/DragGhost/DragGhost.d.ts.map +1 -0
  242. package/dist/components/DragGhost/index.d.ts +3 -0
  243. package/dist/components/DragGhost/index.d.ts.map +1 -0
  244. package/dist/components/DragGhost/index.js +2 -0
  245. package/dist/components/DragHandleGlyph/DragHandleGlyph.d.ts +1 -1
  246. package/dist/components/DragHandleGlyph/DragHandleGlyph.d.ts.map +1 -1
  247. package/dist/components/DragHandleGlyph/index.js +1 -1
  248. package/dist/components/Field/Field.d.ts +1 -1
  249. package/dist/components/Field/Field.d.ts.map +1 -1
  250. package/dist/components/Field/index.js +1 -1
  251. package/dist/components/FillStrokeSwatch/FillStrokeSwatch.d.ts +45 -0
  252. package/dist/components/FillStrokeSwatch/FillStrokeSwatch.d.ts.map +1 -0
  253. package/dist/components/FillStrokeSwatch/index.d.ts +3 -0
  254. package/dist/components/FillStrokeSwatch/index.d.ts.map +1 -0
  255. package/dist/components/FillStrokeSwatch/index.js +2 -0
  256. package/dist/components/FontFamilySelect/FontFamilySelect.d.ts +1 -1
  257. package/dist/components/FontFamilySelect/FontFamilySelect.d.ts.map +1 -1
  258. package/dist/components/FontFamilySelect/index.js +1 -1
  259. package/dist/components/GradientEditor/SceneGradientHandles.d.ts.map +1 -1
  260. package/dist/components/GradientEditor/index.js +1 -1
  261. package/dist/components/InlineRange/InlineRange.d.ts +6 -2
  262. package/dist/components/InlineRange/InlineRange.d.ts.map +1 -1
  263. package/dist/components/InlineRange/index.js +1 -1
  264. package/dist/components/Input/Input.d.ts +13 -0
  265. package/dist/components/Input/Input.d.ts.map +1 -1
  266. package/dist/components/Input/index.js +1 -1
  267. package/dist/components/ItemList/ItemList.d.ts +70 -10
  268. package/dist/components/ItemList/ItemList.d.ts.map +1 -1
  269. package/dist/components/ItemList/index.js +1 -1
  270. package/dist/components/Jog/Jog.d.ts +1 -1
  271. package/dist/components/Jog/Jog.d.ts.map +1 -1
  272. package/dist/components/Jog/index.js +1 -1
  273. package/dist/components/Keycaps/Keycap.d.ts +1 -1
  274. package/dist/components/Keycaps/Keycap.d.ts.map +1 -1
  275. package/dist/components/Keycaps/Keycaps.d.ts +1 -1
  276. package/dist/components/Keycaps/Keycaps.d.ts.map +1 -1
  277. package/dist/components/Keycaps/index.d.ts +1 -0
  278. package/dist/components/Keycaps/index.d.ts.map +1 -1
  279. package/dist/components/Keycaps/index.js +3 -3
  280. package/dist/components/Keycaps/keySpecsFromMods.d.ts +2 -0
  281. package/dist/components/Keycaps/keySpecsFromMods.d.ts.map +1 -1
  282. package/dist/components/Keycaps/keySpecsFromShortcut.d.ts +16 -0
  283. package/dist/components/Keycaps/keySpecsFromShortcut.d.ts.map +1 -0
  284. package/dist/components/LayerList/LayerList.d.ts +79 -0
  285. package/dist/components/LayerList/LayerList.d.ts.map +1 -0
  286. package/dist/components/LayerList/index.d.ts +3 -0
  287. package/dist/components/LayerList/index.d.ts.map +1 -0
  288. package/dist/components/LayerList/index.js +2 -0
  289. package/dist/components/LayerList/useSceneLayerList.d.ts +20 -0
  290. package/dist/components/LayerList/useSceneLayerList.d.ts.map +1 -0
  291. package/dist/components/ListEditor/ListEditor.d.ts +23 -0
  292. package/dist/components/ListEditor/ListEditor.d.ts.map +1 -0
  293. package/dist/components/ListEditor/index.d.ts +3 -0
  294. package/dist/components/ListEditor/index.d.ts.map +1 -0
  295. package/dist/components/ListEditor/index.js +2 -0
  296. package/dist/components/MenuButton/MenuButton.d.ts +6 -2
  297. package/dist/components/MenuButton/MenuButton.d.ts.map +1 -1
  298. package/dist/components/MenuButton/index.js +1 -1
  299. package/dist/components/MeshEditor/index.js +1 -1
  300. package/dist/components/NumberField/NumberField.d.ts +13 -0
  301. package/dist/components/NumberField/NumberField.d.ts.map +1 -1
  302. package/dist/components/NumberField/UnitField.d.ts +1 -1
  303. package/dist/components/NumberField/UnitField.d.ts.map +1 -1
  304. package/dist/components/NumberField/index.js +1 -1
  305. package/dist/components/OptionsBar/index.js +1 -1
  306. package/dist/components/PaintField/index.js +1 -1
  307. package/dist/components/PaintInput/index.js +1 -1
  308. package/dist/components/PatternPicker/index.js +1 -1
  309. package/dist/components/Plot2D/index.js +1 -1
  310. package/dist/components/PointPlotter/PointPlotter.d.ts +1 -1
  311. package/dist/components/PointPlotter/PointPlotter.d.ts.map +1 -1
  312. package/dist/components/PointPlotter/index.js +1 -1
  313. package/dist/components/Powerline/Powerline.d.ts +5 -4
  314. package/dist/components/Powerline/Powerline.d.ts.map +1 -1
  315. package/dist/components/Powerline/index.js +2 -2
  316. package/dist/components/Prefs/PrefsDialog.d.ts +11 -3
  317. package/dist/components/Prefs/PrefsDialog.d.ts.map +1 -1
  318. package/dist/components/Prefs/PrefsForm.d.ts +27 -26
  319. package/dist/components/Prefs/PrefsForm.d.ts.map +1 -1
  320. package/dist/components/Prefs/PrefsPane.d.ts +24 -0
  321. package/dist/components/Prefs/PrefsPane.d.ts.map +1 -0
  322. package/dist/components/Prefs/PrefsRail.d.ts +32 -0
  323. package/dist/components/Prefs/PrefsRail.d.ts.map +1 -0
  324. package/dist/components/Prefs/PrefsRow.d.ts +32 -0
  325. package/dist/components/Prefs/PrefsRow.d.ts.map +1 -0
  326. package/dist/components/Prefs/index.d.ts +5 -2
  327. package/dist/components/Prefs/index.d.ts.map +1 -1
  328. package/dist/components/Prefs/index.js +3 -3
  329. package/dist/components/Prefs/prefField.d.ts +36 -0
  330. package/dist/components/Prefs/prefField.d.ts.map +1 -0
  331. package/dist/components/Prefs/schema.d.ts +30 -0
  332. package/dist/components/Prefs/schema.d.ts.map +1 -1
  333. package/dist/components/Properties/CurveField.d.ts +1 -1
  334. package/dist/components/Properties/CurveField.d.ts.map +1 -1
  335. package/dist/components/Properties/DialogRow.d.ts +33 -0
  336. package/dist/components/Properties/DialogRow.d.ts.map +1 -0
  337. package/dist/components/Properties/PropertyField.d.ts +238 -0
  338. package/dist/components/Properties/PropertyField.d.ts.map +1 -0
  339. package/dist/components/Properties/PropertyGroup.d.ts +12 -3
  340. package/dist/components/Properties/PropertyGroup.d.ts.map +1 -1
  341. package/dist/components/Properties/PropertyPanel.d.ts +34 -238
  342. package/dist/components/Properties/PropertyPanel.d.ts.map +1 -1
  343. package/dist/components/Properties/Subpanel.d.ts +14 -0
  344. package/dist/components/Properties/Subpanel.d.ts.map +1 -0
  345. package/dist/components/Properties/index.d.ts +8 -4
  346. package/dist/components/Properties/index.d.ts.map +1 -1
  347. package/dist/components/Properties/index.js +3 -2
  348. package/dist/components/Properties/storyLayouts.d.ts +1 -1
  349. package/dist/components/Properties/storyLayouts.d.ts.map +1 -1
  350. package/dist/components/RadioGroup/RadioGroup.d.ts +2 -2
  351. package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -1
  352. package/dist/components/RadioGroup/index.js +1 -1
  353. package/dist/components/RangeSlider/RangeSlider.d.ts +1 -1
  354. package/dist/components/RangeSlider/RangeSlider.d.ts.map +1 -1
  355. package/dist/components/RangeSlider/index.js +1 -1
  356. package/dist/components/ResizeHandle/ResizeHandle.d.ts +1 -1
  357. package/dist/components/ResizeHandle/ResizeHandle.d.ts.map +1 -1
  358. package/dist/components/ResizeHandle/index.js +1 -1
  359. package/dist/components/Select/Select.d.ts +40 -7
  360. package/dist/components/Select/Select.d.ts.map +1 -1
  361. package/dist/components/Select/index.d.ts +2 -2
  362. package/dist/components/Select/index.d.ts.map +1 -1
  363. package/dist/components/Select/index.js +2 -2
  364. package/dist/components/SelectionPanel/SelectionPanel.d.ts +1 -1
  365. package/dist/components/SelectionPanel/SelectionPanel.d.ts.map +1 -1
  366. package/dist/components/SelectionPanel/index.js +2 -2
  367. package/dist/components/SelectionPanel/renderLeaf.d.ts +14 -8
  368. package/dist/components/SelectionPanel/renderLeaf.d.ts.map +1 -1
  369. package/dist/components/Sidebar/Sidebar.d.ts +1 -1
  370. package/dist/components/Sidebar/Sidebar.d.ts.map +1 -1
  371. package/dist/components/Sidebar/index.js +1 -1
  372. package/dist/components/SidebarPanel/SidebarPanel.d.ts +3 -3
  373. package/dist/components/SidebarPanel/SidebarPanel.d.ts.map +1 -1
  374. package/dist/components/SidebarPanel/index.js +1 -1
  375. package/dist/components/Slider/Slider.d.ts +2 -1
  376. package/dist/components/Slider/Slider.d.ts.map +1 -1
  377. package/dist/components/Slider/index.js +1 -1
  378. package/dist/components/StatusBar/StatusBar.d.ts +3 -3
  379. package/dist/components/StatusBar/StatusBar.d.ts.map +1 -1
  380. package/dist/components/StatusBar/index.js +1 -1
  381. package/dist/components/SwatchGrid/SwatchGrid.d.ts +34 -0
  382. package/dist/components/SwatchGrid/SwatchGrid.d.ts.map +1 -0
  383. package/dist/components/SwatchGrid/index.d.ts +3 -0
  384. package/dist/components/SwatchGrid/index.d.ts.map +1 -0
  385. package/dist/components/SwatchGrid/index.js +2 -0
  386. package/dist/components/Switch/index.js +1 -1
  387. package/dist/components/Tabs/Tabs.d.ts +4 -4
  388. package/dist/components/Tabs/Tabs.d.ts.map +1 -1
  389. package/dist/components/Tabs/index.js +1 -1
  390. package/dist/components/Timeline/Lane.d.ts.map +1 -1
  391. package/dist/components/Timeline/index.js +1 -1
  392. package/dist/components/Toast/Toast.d.ts +1 -1
  393. package/dist/components/Toast/Toast.d.ts.map +1 -1
  394. package/dist/components/Toast/index.js +1 -1
  395. package/dist/components/ToggleBar/ToggleBar.d.ts +2 -1
  396. package/dist/components/ToggleBar/ToggleBar.d.ts.map +1 -1
  397. package/dist/components/ToggleBar/index.js +1 -1
  398. package/dist/components/TokenPanel/TokenPanel.d.ts +1 -1
  399. package/dist/components/TokenPanel/TokenPanel.d.ts.map +1 -1
  400. package/dist/components/TokenPanel/index.js +1 -1
  401. package/dist/components/ToolButton/ToolButton.d.ts +1 -1
  402. package/dist/components/ToolButton/ToolButton.d.ts.map +1 -1
  403. package/dist/components/ToolButton/index.js +1 -1
  404. package/dist/components/ToolGroup/ToolGroup.d.ts +1 -1
  405. package/dist/components/ToolGroup/ToolGroup.d.ts.map +1 -1
  406. package/dist/components/ToolGroup/index.js +1 -1
  407. package/dist/components/ToolOptionsBar/ToolOptionsBar.d.ts +1 -1
  408. package/dist/components/ToolOptionsBar/ToolOptionsBar.d.ts.map +1 -1
  409. package/dist/components/ToolOptionsBar/index.js +1 -1
  410. package/dist/components/ToolPalette/ToolPalette.d.ts +1 -1
  411. package/dist/components/ToolPalette/ToolPalette.d.ts.map +1 -1
  412. package/dist/components/ToolPalette/index.d.ts +1 -0
  413. package/dist/components/ToolPalette/index.d.ts.map +1 -1
  414. package/dist/components/ToolPalette/index.js +3 -2
  415. package/dist/components/Tooltip/Tooltip.d.ts +8 -4
  416. package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
  417. package/dist/components/Tooltip/index.d.ts +1 -1
  418. package/dist/components/Tooltip/index.d.ts.map +1 -1
  419. package/dist/components/Tooltip/index.js +2 -2
  420. package/dist/components/Tree/Tree.d.ts +84 -0
  421. package/dist/components/Tree/Tree.d.ts.map +1 -0
  422. package/dist/components/Tree/index.d.ts +3 -0
  423. package/dist/components/Tree/index.d.ts.map +1 -0
  424. package/dist/components/Tree/index.js +2 -0
  425. package/dist/components/segmentTooltip.d.ts +30 -0
  426. package/dist/components/segmentTooltip.d.ts.map +1 -0
  427. package/dist/components/stance.d.ts +30 -0
  428. package/dist/components/stance.d.ts.map +1 -0
  429. package/dist/components/stanceCss.d.ts +31 -0
  430. package/dist/components/stanceCss.d.ts.map +1 -0
  431. package/dist/components/stanceSurfaces.d.ts +4 -0
  432. package/dist/components/stanceSurfaces.d.ts.map +1 -0
  433. package/dist/format/number.d.ts +3 -2
  434. package/dist/format/number.d.ts.map +1 -1
  435. package/dist/icons/Icon.d.ts +1 -1
  436. package/dist/icons/Icon.d.ts.map +1 -1
  437. package/dist/icons/ShapeKindIcon.d.ts +10 -0
  438. package/dist/icons/ShapeKindIcon.d.ts.map +1 -0
  439. package/dist/icons/index.d.ts +55 -53
  440. package/dist/icons/index.d.ts.map +1 -1
  441. package/dist/icons/paths.d.ts +2 -0
  442. package/dist/icons/paths.d.ts.map +1 -1
  443. package/dist/index.d.ts +17 -3
  444. package/dist/index.d.ts.map +1 -1
  445. package/dist/index.js +130 -79
  446. package/dist/index.js.map +1 -1
  447. package/dist/interactiveTarget.d.ts +9 -0
  448. package/dist/interactiveTarget.d.ts.map +1 -0
  449. package/dist/overlays/portalHost.d.ts +1 -1
  450. package/dist/overlays/portalHost.d.ts.map +1 -1
  451. package/dist/style.css +1 -1
  452. package/dist/useReorderDragList.d.ts +36 -7
  453. package/dist/useReorderDragList.d.ts.map +1 -1
  454. package/dist/useRovingTabIndex.d.ts +1 -1
  455. package/dist/useScrollSpy.d.ts +48 -0
  456. package/dist/useScrollSpy.d.ts.map +1 -0
  457. package/package.json +8 -8
  458. package/dist/chunks/ActionBar-CLwiY3Jg.js +0 -62
  459. package/dist/chunks/ActionBar-CLwiY3Jg.js.map +0 -1
  460. package/dist/chunks/ActionsBar-D84a4eGy.js +0 -41
  461. package/dist/chunks/ActionsBar-D84a4eGy.js.map +0 -1
  462. package/dist/chunks/Badge-CW9pBPFl.js.map +0 -1
  463. package/dist/chunks/BandEditor-jY-PFKY6.js.map +0 -1
  464. package/dist/chunks/Button-DRSApvnK.js +0 -90
  465. package/dist/chunks/Button-DRSApvnK.js.map +0 -1
  466. package/dist/chunks/Callout-DrNu-9Qr.js +0 -122
  467. package/dist/chunks/Callout-DrNu-9Qr.js.map +0 -1
  468. package/dist/chunks/Checkbox-BOsDAY2F.js.map +0 -1
  469. package/dist/chunks/ColorField-BYzgZM9o.js.map +0 -1
  470. package/dist/chunks/ComboBox-Cz3f0Y_8.js.map +0 -1
  471. package/dist/chunks/CurveEditor-DXwSP-iA.js.map +0 -1
  472. package/dist/chunks/DataGrid-C8KrYtw7.js +0 -104
  473. package/dist/chunks/DataGrid-C8KrYtw7.js.map +0 -1
  474. package/dist/chunks/DetentSlider-CAubVX0J.js.map +0 -1
  475. package/dist/chunks/Dialog-fGqqQ6o_.js +0 -61
  476. package/dist/chunks/Dialog-fGqqQ6o_.js.map +0 -1
  477. package/dist/chunks/Disclosure-CILDfWsU.js +0 -47
  478. package/dist/chunks/Disclosure-CILDfWsU.js.map +0 -1
  479. package/dist/chunks/DragHandleGlyph-CppAz4_8.js.map +0 -1
  480. package/dist/chunks/Field-DWnV8WZY.js.map +0 -1
  481. package/dist/chunks/FontFamilySelect-DxfgTC3G.js.map +0 -1
  482. package/dist/chunks/GradientEditor-rRBmf3G0.js +0 -333
  483. package/dist/chunks/GradientEditor-rRBmf3G0.js.map +0 -1
  484. package/dist/chunks/Icon-DT0x6HaQ.js.map +0 -1
  485. package/dist/chunks/InlineRange-DdIlfGqG.js +0 -29
  486. package/dist/chunks/InlineRange-DdIlfGqG.js.map +0 -1
  487. package/dist/chunks/Input-DbMKpkXy.js.map +0 -1
  488. package/dist/chunks/ItemList-B9zYb0GE.js +0 -42
  489. package/dist/chunks/ItemList-B9zYb0GE.js.map +0 -1
  490. package/dist/chunks/Jog-DkkTlL3_.js.map +0 -1
  491. package/dist/chunks/Keycaps-DunVpejA.js.map +0 -1
  492. package/dist/chunks/LayerStack-CfQ6GsRz.js +0 -142
  493. package/dist/chunks/LayerStack-CfQ6GsRz.js.map +0 -1
  494. package/dist/chunks/MenuButton-C_4nox39.js +0 -60
  495. package/dist/chunks/MenuButton-C_4nox39.js.map +0 -1
  496. package/dist/chunks/MeshEditor-Bipz-Ocl.js +0 -123
  497. package/dist/chunks/MeshEditor-Bipz-Ocl.js.map +0 -1
  498. package/dist/chunks/NumberField-CCjEDZCg.js.map +0 -1
  499. package/dist/chunks/OptionsBar-DeQ-vUeZ.js.map +0 -1
  500. package/dist/chunks/PaintField-jBOJ32rL.js.map +0 -1
  501. package/dist/chunks/PaintInput-Qs7Rul5R.js.map +0 -1
  502. package/dist/chunks/PatternPicker-BMpXWboq.js.map +0 -1
  503. package/dist/chunks/Plot2D-CXf_f7QD.js.map +0 -1
  504. package/dist/chunks/PointPlotter-S_gz7VYt.js.map +0 -1
  505. package/dist/chunks/Powerline-Ak5AWUlK.js +0 -36
  506. package/dist/chunks/Powerline-Ak5AWUlK.js.map +0 -1
  507. package/dist/chunks/Prefs-CNC8tzyN.js +0 -308
  508. package/dist/chunks/Prefs-CNC8tzyN.js.map +0 -1
  509. package/dist/chunks/Properties-Rnb6TAbN.js +0 -891
  510. package/dist/chunks/Properties-Rnb6TAbN.js.map +0 -1
  511. package/dist/chunks/RadioGroup-CsVp3SEu.js.map +0 -1
  512. package/dist/chunks/RangeSlider-DNr-pJpZ.js.map +0 -1
  513. package/dist/chunks/ResizeHandle-RXFf5fXr.js.map +0 -1
  514. package/dist/chunks/Select-BEope086.js +0 -190
  515. package/dist/chunks/Select-BEope086.js.map +0 -1
  516. package/dist/chunks/SelectionPanel-CEbLS-0D.js.map +0 -1
  517. package/dist/chunks/Sidebar-qn_oSCNX.js.map +0 -1
  518. package/dist/chunks/SidebarPanel-Bs6V21hg.js.map +0 -1
  519. package/dist/chunks/Slider-CIIrqiFS.js.map +0 -1
  520. package/dist/chunks/StatusBar-B4L15DSm.js.map +0 -1
  521. package/dist/chunks/Switch-DH5POG0T.js.map +0 -1
  522. package/dist/chunks/Tabs-BFHikpml.js.map +0 -1
  523. package/dist/chunks/Timeline-DNKY_yiK.js.map +0 -1
  524. package/dist/chunks/Toast-CI1UDuK6.js.map +0 -1
  525. package/dist/chunks/ToggleBar-CClus5Cd.js +0 -75
  526. package/dist/chunks/ToggleBar-CClus5Cd.js.map +0 -1
  527. package/dist/chunks/TokenPanel-BPHq24dc.js.map +0 -1
  528. package/dist/chunks/ToolButton-9QzJCmuM.js.map +0 -1
  529. package/dist/chunks/ToolGroup-BJiDrH_i.js.map +0 -1
  530. package/dist/chunks/ToolOptionsBar-CAM6RcUH.js.map +0 -1
  531. package/dist/chunks/ToolPalette-DGkKwE7D.js +0 -97
  532. package/dist/chunks/ToolPalette-DGkKwE7D.js.map +0 -1
  533. package/dist/chunks/Tooltip-C4YBczLq.js +0 -42
  534. package/dist/chunks/Tooltip-C4YBczLq.js.map +0 -1
  535. package/dist/chunks/createKeyframeLayer-DKtO0Sw_.js.map +0 -1
  536. package/dist/chunks/dlog-CMYiRF3Q.js.map +0 -1
  537. package/dist/chunks/icons-DFLytcui.js +0 -165
  538. package/dist/chunks/icons-DFLytcui.js.map +0 -1
  539. package/dist/chunks/keyGlyph-Bp0wnLHn.js.map +0 -1
  540. package/dist/chunks/model-13kZ_-mE.js +0 -483
  541. package/dist/chunks/model-13kZ_-mE.js.map +0 -1
  542. package/dist/chunks/number-BHz66zQO.js.map +0 -1
  543. package/dist/chunks/portalHost-CjpCnuGU.js.map +0 -1
  544. package/dist/chunks/range.module-DSsOIq1R.js +0 -8
  545. package/dist/chunks/range.module-DSsOIq1R.js.map +0 -1
  546. package/dist/chunks/schema-Dft4Cu2p.js +0 -47
  547. package/dist/chunks/schema-Dft4Cu2p.js.map +0 -1
  548. package/dist/chunks/segmentedControl.module-DS72X1ns.js +0 -11
  549. package/dist/chunks/segmentedControl.module-DS72X1ns.js.map +0 -1
  550. package/dist/chunks/snap-CEjuWOhN.js.map +0 -1
  551. package/dist/chunks/useReorderDragList-CSQGd7zQ.js +0 -102
  552. package/dist/chunks/useReorderDragList-CSQGd7zQ.js.map +0 -1
  553. package/dist/chunks/useRovingTabIndex-Dkpf_KhN.js.map +0 -1
  554. package/dist/components/ActionsBar/ActionsBar.d.ts +0 -35
  555. package/dist/components/ActionsBar/ActionsBar.d.ts.map +0 -1
  556. package/dist/components/ActionsBar/index.d.ts +0 -3
  557. package/dist/components/ActionsBar/index.d.ts.map +0 -1
  558. package/dist/components/ActionsBar/index.js +0 -2
  559. package/dist/components/LayerStack/LayerStack.d.ts +0 -62
  560. package/dist/components/LayerStack/LayerStack.d.ts.map +0 -1
  561. package/dist/components/LayerStack/index.d.ts +0 -2
  562. package/dist/components/LayerStack/index.d.ts.map +0 -1
  563. package/dist/components/LayerStack/index.js +0 -2
  564. package/dist/components/Properties/EffectCard.d.ts +0 -69
  565. package/dist/components/Properties/EffectCard.d.ts.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"model-13kZ_-mE.js","names":[],"sources":["../../src/components/SelectionPanel/SelectionPanel.module.css","../../src/components/SelectionPanel/renderLeaf.tsx","../../src/components/SelectionPanel/model.ts"],"sourcesContent":[".root {\n display: flex;\n flex-direction: column;\n font-size: var(--wzl-font-size-sm);\n color: var(--wzl-fg);\n}\n\n.header {\n display: flex;\n align-items: baseline;\n gap: var(--wzl-space-4);\n padding: var(--wzl-space-4) 0;\n border-block-end: 1px solid var(--wzl-border);\n}\n\n.kind {\n font-weight: var(--wzl-font-weight-bold);\n font-size: var(--wzl-font-size);\n}\n\n.breakdown {\n font-size: var(--wzl-font-size-sm);\n opacity: 0.6;\n}\n\n.section {\n padding: var(--wzl-space-3) 0 var(--wzl-space-4);\n border-block-end: 1px solid var(--wzl-border);\n}\n\n.section:last-child {\n border-block-end: none;\n}\n\n.sectionTitle {\n margin: 0 0 var(--wzl-space-3);\n font-size: var(--wzl-font-size-xs);\n font-weight: var(--wzl-font-weight-bold);\n text-transform: uppercase;\n letter-spacing: 0.06em;\n opacity: 0.55;\n}\n\n.row {\n display: grid;\n grid-template-columns: 64px 1fr;\n gap: var(--wzl-space-3);\n align-items: center;\n margin-block-end: 5px;\n}\n\n.rowLabel {\n opacity: 0.75;\n}\n\n.rowControls {\n display: flex;\n flex-wrap: wrap;\n gap: var(--wzl-space-3);\n align-items: center;\n min-inline-size: 0;\n}\n\n/* Glyph plus its control, held together so the pair row wraps between\n fields rather than between a field and the icon naming it. */\n.namedField {\n display: flex;\n align-items: center;\n gap: var(--wzl-space-2);\n min-inline-size: 0;\n}\n\n.namedField > svg {\n flex: none;\n opacity: 0.75;\n}\n\n.blockRow {\n margin-block-end: 5px;\n}\n\n/* Fields paired into one row split it evenly, the way Position's x/y do. */\n.rowControls > .namedField {\n flex: 1 1 0;\n}\n\n/* Except around a segmented bar, which is sized by its segments: an equal\n share of the row is wider than the buttons want to be. */\n.rowControls > .namedField:has(> .toggle) {\n flex: 0 1 auto;\n}\n\n.rowControls > * {\n flex: 1;\n min-inline-size: 0;\n}\n\n/* Bars sharing a row split the leftover between them, so the gap stays fixed\n and the width lands on the segments. A bar with the row to itself is sized\n by its segments instead — a third of 240px is a plate, not a button. */\n.rowControls > .toggle {\n flex: 1 1 auto;\n}\n\n.rowControls > .toggle:only-child {\n flex: 0 1 auto;\n}\n\n/* A flag bar is sized by its glyphs rather than by a share of the row: an\n even split would fling one-letter segments to the margins. */\n.rowControls > .flagToggle {\n flex: 0 0 auto;\n}\n\n.number :global(input),\n.select {\n font-size: var(--wzl-font-size-sm);\n}\n\n.unitSuffix {\n flex: none;\n font-size: var(--wzl-font-size-sm);\n opacity: 0.6;\n}\n\n.mixedSwitch {\n opacity: 0.55;\n}\n\n.unrenderable {\n font-size: var(--wzl-font-size-sm);\n opacity: 0.5;\n font-style: italic;\n}\n\n/* A `block` leaf that renders its own rows — an object leaf's fields. */\n.objectLeaf {\n margin-block: var(--wzl-space-4) var(--wzl-space-2);\n}\n\n.objectLeaf .sectionTitle {\n margin-block: 7px 5px;\n}\n\n/* Fields under a heading inside an object read as belonging to it. */\n.objectGroup {\n padding-inline-start: var(--wzl-space-4);\n border-inline-start: 1px solid var(--wzl-border);\n margin-block-end: var(--wzl-space-2);\n}\n\n/* `InlineRange` owns the track; the row only says how it shares the space. */\n.slider {\n flex: 1;\n}\n\n.sliderReadout {\n flex: none;\n min-inline-size: 3ch;\n text-align: end;\n font-size: var(--wzl-font-size-sm);\n opacity: 0.7;\n}\n","/**\n * The leaf → control mapping: one `ToolPrefLeaf` and its value in, one\n * rendered control out, plus the run logic that turns a row of paired\n * toggles into a single segmented bar.\n *\n * It lives beside `SelectionPanel` because it grew there and still draws on\n * that stylesheet, but it is not the panel's: `ToolOptionsBar` renders a\n * tool's options through the same function, so a leaf kind gets its control\n * decided once rather than once per surface.\n */\nimport { Fragment, useState, type ReactNode } from 'react';\nimport {\n isBuiltinToolPref,\n type FillStyle,\n type ToolPrefBoolean,\n type ToolPrefColor,\n type ToolPrefEnum,\n type ToolPrefLeaf,\n type ToolPrefNumber,\n type ToolPrefPaint,\n type ToolPrefGroup,\n type ToolPrefObject,\n} from '@weasel-js/core';\nimport { prefDisplayBounds, prefUnitAccepts } from '../Prefs/schema';\nimport { ColorField } from '../ColorField';\nimport { FontFamilySelect } from '../FontFamilySelect';\nimport { PaintInput } from '../PaintInput';\nimport { InlineRange } from '../InlineRange';\nimport { Input } from '../Input';\nimport { NumberField, UnitField } from '../NumberField';\nimport { Select } from '../Select';\nimport { Switch } from '../Switch';\nimport { ToggleBar } from '../ToggleBar';\nimport { Icon } from '../../icons/Icon';\nimport { ICON_PATHS, type IconName } from '../../icons/paths';\nimport s from './SelectionPanel.module.css';\n\n\n/** What a {@link PropertyRenderer} is given for the property it is rendering. */\nexport interface PropertyRenderContext {\n /** Dotted node path of the leaf (`pose.x`, `data.fill`). */\n path: string;\n /** The schema leaf. App renderers narrow it to their own kind shape. */\n pref: ToolPrefLeaf;\n /** Aggregated value across the selection; `undefined` when mixed or unset. */\n value: unknown;\n /** True when selected nodes disagree at this path. */\n mixed: boolean;\n /**\n * True when the nodes agree and what they agree on is nothing — the field\n * is absent, and whatever paints comes from a fallback further down.\n *\n * Distinct from `mixed`, and both leave `value` undefined. A control must\n * not substitute its schema default here: doing so shows a value the node\n * does not hold, and the next edit writes that invention back.\n */\n unset: boolean;\n /**\n * The fields of the object this leaf is a field of — `undefined` for a\n * top-level leaf, and for a field of an object the node does not hold.\n *\n * What a control needs when its own field doesn't carry the whole answer:\n * a stroke's dash lengths are multiples of the stroke's width, so reading\n * the array as a style takes both.\n */\n siblings?: Record<string, unknown>;\n /** Commit a value — fans out to every selected node in one undo step. */\n setValue: (value: unknown) => void;\n /**\n * The aggregated value at another node path — what `value` and `mixed` are\n * for this leaf's own path, for any path.\n *\n * A control whose subject spans more than one field needs it: a font picker\n * reporting which variant will actually paint has to read the node's weight\n * and style. Reading it off `value` is impossible — a leaf is handed one\n * field.\n */\n valueAt: (path: string) => { value: unknown; mixed: boolean };\n}\n\n/**\n * Renders the control for one property across the whole selection.\n * Returning `null` collapses the leaf.\n */\nexport type PropertyRenderer = (ctx: PropertyRenderContext) => ReactNode;\n\n\n/**\n * One leaf with its context built but nothing rendered yet.\n *\n * Deferring the render is what lets a run of sibling flags become one bar:\n * whether a leaf joins its neighbors is a fact about the run, which no leaf\n * rendering itself can see.\n */\nexport interface LeafCell {\n key: string;\n leaf: ToolPrefLeaf;\n ctx: PropertyRenderContext;\n /** The accessible name this leaf's control carries — qualified by the row's\n * pair where the row holds more than one leaf. */\n ariaLabel: string;\n /** Renders the leaf on its own, chrome and all. */\n render: () => ReactNode;\n}\n\n/** A cell's content, once the run it belongs to has been decided. */\nexport interface RenderedCell {\n key: string;\n /** The leaf that names the cell — the run's first, for a flag bar. */\n leaf: ToolPrefLeaf;\n block: boolean;\n content: ReactNode;\n}\n\n/**\n * True for a leaf that can join a flag bar: a paired toggle boolean the\n * consumer has not claimed with a renderer of its own.\n */\nexport function isFlagCell(cell: LeafCell, renderers?: Record<string, PropertyRenderer>): boolean {\n const { leaf } = cell;\n return (\n leaf.kind === 'boolean' &&\n (leaf as ToolPrefBoolean).control === 'toggle' &&\n leaf.pair !== undefined &&\n renderers?.[cell.ctx.path] === undefined &&\n renderers?.[leaf.kind] === undefined\n );\n}\n\n/**\n * Renders a row's cells, collapsing each run of adjacent same-`pair` toggle\n * booleans into one segmented bar — the idiom the enum toggle a row away\n * already uses, rather than one detached pill per flag.\n */\nexport function renderCells(\n cells: readonly LeafCell[],\n renderers?: Record<string, PropertyRenderer>,\n): RenderedCell[] {\n const out: RenderedCell[] = [];\n for (let i = 0; i < cells.length; ) {\n const cell = cells[i];\n if (!isFlagCell(cell, renderers)) {\n const content = cell.render();\n if (content != null) {\n out.push({ key: cell.key, leaf: cell.leaf, block: cell.leaf.block === true, content });\n }\n i += 1;\n continue;\n }\n let j = i + 1;\n while (\n j < cells.length &&\n isFlagCell(cells[j], renderers) &&\n cells[j].leaf.pair === cell.leaf.pair\n ) {\n j += 1;\n }\n const run = cells.slice(i, j);\n out.push({\n key: cell.key,\n leaf: cell.leaf,\n block: run.every((c) => c.leaf.block === true),\n content: <FlagBar run={run} ariaLabel={cell.leaf.pair as string} />,\n });\n i = j;\n }\n return out;\n}\n\n/**\n * A run of paired boolean flags as one multi-select bar — U / S / O, the way\n * every text editor draws them.\n */\nfunction FlagBar({ run, ariaLabel }: { run: readonly LeafCell[]; ariaLabel: string }): ReactNode {\n const on = run.filter((c) => c.ctx.value === true).map((c) => c.key);\n return (\n <ToggleBar<string>\n mode=\"multiple\"\n size=\"sm\"\n variant=\"flat\"\n className={s.flagToggle}\n ariaLabel={ariaLabel}\n items={run.map((c) => {\n const p = c.leaf as ToolPrefBoolean;\n return {\n value: c.key,\n label:\n p.icon && p.icon in ICON_PATHS ? (\n <Icon name={p.icon as IconName} size={14} />\n ) : (\n (p.short ?? p.name.slice(0, 1))\n ),\n ariaLabel: c.ariaLabel,\n };\n })}\n value={on}\n // Each flag owns its own path, so only the segment that moved is\n // written — committing the run would write two fields nobody touched,\n // and inside an object leaf would fabricate values for the other two.\n mixedValues={run.filter((c) => c.ctx.mixed).map((c) => c.key)}\n onChange={(next) => {\n for (const c of run) {\n const now = next.includes(c.key);\n if (now !== on.includes(c.key)) c.ctx.setValue(now);\n }\n }}\n />\n );\n}\n\nexport function renderBuiltin(\n ctx: PropertyRenderContext,\n ariaLabel: string,\n renderers?: Record<string, PropertyRenderer>,\n /** Identifies the current selection, so a control holding per-selection\n * scratch (the paint kind memory) is remounted rather than carried over. */\n selectionKey = '',\n /** True for a field of an object leaf. Such a field writes itself into its\n * parent, so it can only hold values its parent's type permits — which is\n * what rules \"none\" out for a nested paint. */\n nested = false,\n): ReactNode {\n const { pref, value, mixed, unset, setValue } = ctx;\n if (pref.kind === 'font-family') {\n // Not a `ToolPref` kind: its options are the live font registry, which no\n // static schema can carry. Core's own text schema still declares it, so\n // the panel ships the control rather than leaving every consumer to.\n //\n // The substitution probe runs at the node's own weight and style, so the\n // label names the variant that will actually paint. A mixed selection has\n // no single one; the probe falls back to 400/normal there.\n const weight = ctx.valueAt('data.style.fontWeight');\n const style = ctx.valueAt('data.style.fontStyle');\n return (\n <FontFamilySelect\n className={s.select}\n value={mixed || typeof value !== 'string' ? undefined : value}\n mixed={mixed}\n onChange={setValue}\n weight={typeof weight.value === 'number' ? weight.value : undefined}\n fontStyle={style.value === 'italic' ? 'italic' : undefined}\n aria-label={ariaLabel}\n />\n );\n }\n if (!isBuiltinToolPref(pref)) {\n return <span className={s.unrenderable}>({pref.kind}: no renderer)</span>;\n }\n switch (pref.kind) {\n case 'number': {\n const p = pref as ToolPrefNumber;\n const stored = typeof value === 'number' && Number.isFinite(value) ? value : undefined;\n const display = stored !== undefined ? (p.unit ? p.unit.toDisplay(stored) : stored) : NaN;\n // `min`/`max`/`step` are declared in the stored unit, like the value, so\n // they convert with it — a leaf storing radians and showing degrees was\n // clamping typed degrees against 0..6.28. Only declared bounds convert:\n // the slider's 0..100 fallback is a display-space number with no stored\n // counterpart to put through the conversion.\n const bounds = prefDisplayBounds(p);\n if (p.control === 'slider') {\n const min = bounds.min ?? 0;\n const max = bounds.max ?? 100;\n const known = !mixed && stored !== undefined;\n return (\n <>\n <InlineRange\n min={min}\n max={max}\n step={bounds.step}\n // The thumb clamps to the track; the readout beside it does not,\n // so a value past `max` is still reported as what it is.\n value={known ? Math.min(Math.max(display, min), max) : min}\n disabled={mixed}\n className={s.slider}\n aria-label={ariaLabel}\n onChange={(e) => {\n const next = Number(e.target.value);\n setValue(p.unit ? p.unit.fromDisplay(next) : next);\n }}\n />\n <span className={s.sliderReadout} aria-hidden=\"true\">\n {known\n ? (p.unit?.format?.(stored as number) ?? `${display}${p.unit?.suffix ?? ''}`)\n : '—'}\n </span>\n </>\n );\n }\n const unit = p.unit;\n const field = unit ? (\n <UnitField\n className={s.number}\n value={mixed || stored === undefined ? NaN : display}\n placeholder={mixed ? 'Mixed' : undefined}\n minValue={bounds.min}\n maxValue={bounds.max}\n step={bounds.step}\n accepts={prefUnitAccepts(unit)}\n aria-label={ariaLabel}\n onChange={(n) => setValue(unit.fromDisplay(n))}\n />\n ) : (\n <NumberField\n className={s.number}\n value={mixed || stored === undefined ? NaN : display}\n placeholder={mixed ? 'Mixed' : undefined}\n minValue={bounds.min}\n maxValue={bounds.max}\n step={bounds.step}\n hideSteppers\n aria-label={ariaLabel}\n onChange={(n) => {\n if (Number.isNaN(n)) return;\n setValue(n);\n }}\n />\n );\n if (unit?.suffix === undefined) return field;\n return (\n <>\n {field}\n <span className={s.unitSuffix} aria-hidden=\"true\">\n {unit.suffix}\n </span>\n </>\n );\n }\n case 'string': {\n return (\n <DraftInput\n text={mixed ? undefined : typeof value === 'string' ? value : ''}\n placeholder={mixed ? 'Mixed' : undefined}\n ariaLabel={ariaLabel}\n onCommit={setValue}\n />\n );\n }\n case 'boolean': {\n const p = pref as ToolPrefBoolean;\n if (p.control === 'toggle') {\n // One segment, so the bar is the flag: `short` (else the initial of\n // `name`) is all a paired row has room for, and `name` stays the\n // accessible name.\n //\n // No dimming wrapper here. Unselected already *is* how a toggle button\n // says \"not set\", and dimming it reads as disabled; mixed has an ARIA\n // form on a toggle — `mixedValues` — which the `Switch` below has to\n // fake for want of one.\n return (\n <ToggleBar<string>\n mode=\"multiple\"\n size=\"sm\"\n variant=\"flat\"\n className={s.flagToggle}\n ariaLabel={ariaLabel}\n items={[{\n value: ctx.path,\n label:\n p.icon && p.icon in ICON_PATHS ? (\n <Icon name={p.icon as IconName} size={14} />\n ) : (\n (p.short ?? p.name.slice(0, 1))\n ),\n ariaLabel,\n }]}\n value={value === true ? [ctx.path] : []}\n mixedValues={mixed ? [ctx.path] : []}\n onChange={(next) => setValue(next.includes(ctx.path))}\n />\n );\n }\n const control = <Switch isSelected={Boolean(value)} onChange={setValue} aria-label={ariaLabel} />;\n // Neither `Switch`'s indeterminate gap nor \"unset\" has an ARIA form, so\n // a reduced-opacity wrapper with a title is the cue for both — a mixed\n // selection, and a field the node leaves to its fallback.\n if (!mixed && !unset) return control;\n return (\n <span className={s.mixedSwitch} title={mixed ? 'Mixed' : 'Not set'}>\n {control}\n </span>\n );\n }\n case 'enum': {\n const p = pref as ToolPrefEnum;\n // An encoded leaf stores something other than the option string, so the\n // option comes from the encoding rather than from the value — and an\n // absent field is one of the things it reads (no dash is `solid`), which\n // is why `unset` doesn't blank the control here.\n const option = p.encoding\n ? (mixed ? undefined : p.encoding.read(value, ctx.siblings))\n : mixed || unset\n ? undefined\n : typeof value === 'string'\n ? value\n : p.default;\n const choose = (next: string): void =>\n setValue(p.encoding ? p.encoding.write(next, ctx.siblings) : next);\n if (p.control === 'toggle') {\n // Every option visible at once, which is the point of a segmented\n // control: a glyph, else `short`, keeps it to the width a property row\n // has, and the full label stays the accessible name. A mixed selection\n // selects nothing rather than picking a winner.\n return (\n <ToggleBar<string>\n size=\"sm\"\n variant=\"flat\"\n className={s.toggle}\n ariaLabel={ariaLabel}\n items={p.options.map((o) => ({\n value: o.value,\n label:\n o.icon && o.icon in ICON_PATHS ? (\n <Icon name={o.icon as IconName} size={14} />\n ) : (\n (o.short ?? o.label)\n ),\n ariaLabel: o.label,\n disabled: o.disabled,\n }))}\n value={option ?? null}\n onChange={(next) => { if (next !== null) choose(next); }}\n />\n );\n }\n return (\n <Select<string>\n className={s.select}\n options={p.options.map((o) => ({ value: o.value, label: o.label, isDisabled: o.disabled }))}\n selectedKey={option ?? null}\n placeholder={mixed ? 'Mixed' : unset ? '—' : undefined}\n onSelectionChange={choose}\n aria-label={ariaLabel}\n />\n );\n }\n case 'color': {\n const p = pref as ToolPrefColor;\n return (\n <ColorField\n value={mixed ? undefined : typeof value === 'string' ? value : p.default}\n mixed={mixed}\n alpha={p.alpha}\n onChange={setValue}\n aria-label={ariaLabel}\n />\n );\n }\n case 'paint': {\n // The value is a whole `FillStyle`, and `PaintInput` edits it as one —\n // previewing a gradient as a gradient rather than degrading it to the\n // indeterminate chip. That leaves the checkerboard meaning `mixed` and\n // nothing else.\n const p = pref as ToolPrefPaint;\n // `??` would read an explicit `null` — \"no paint\" — as absent and show\n // the schema default over it, so the None segment could never stay lit.\n // Unset shows the fallback that is actually on the canvas, dimmed: true,\n // but not chosen, which is what the dimming says.\n const paint = (value === null\n ? null\n : (value ?? (mixed ? undefined : p.default))) as FillStyle | null | undefined;\n return (\n <PaintInput\n // Per-kind switch memory is scratch for one selection; carrying it\n // across would recall the previous node's gradient.\n key={selectionKey}\n value={paint}\n mixed={mixed}\n unset={unset}\n // A nested paint writes one field of its parent, and no kit paint\n // field is optional — `Stroke.paint` is required. Removing the\n // whole parent is a different edit than repainting it, so the\n // control must not offer one as the other. A consumer whose\n // renderer owns the parent key (WeaselDraw's `setStroke`) can.\n allowNone={!nested}\n onChange={setValue}\n aria-label={ariaLabel}\n />\n );\n }\n case 'object': {\n // One value with fields hanging off it. Each child writes the parent\n // whole, so a field is never set on a half-built object.\n return <ObjectLeaf ctx={ctx} renderers={renderers} selectionKey={selectionKey} />;\n }\n default: {\n // Not reachable while every built-in kind has an arm — and a new kind\n // that lacks one is a compile error here, never a blank cell.\n const _exhaustive: never = pref;\n throw new Error(\n `SelectionPanel: no control for built-in pref kind \"${(_exhaustive as { kind: string }).kind}\"`,\n );\n }\n }\n}\n\n/**\n * Renders an object leaf: a titled block whose rows are the object's own\n * fields. A child's edit commits the parent object, never the child's path —\n * writing into a path whose value is not an object yet would corrupt it.\n */\n/** One labeled row inside an object leaf; `pair` merges adjacent fields into\n * it, exactly as the section rows merge theirs. */\ninterface ObjectRow {\n key: string;\n pair?: string;\n label: string;\n title?: string;\n /** Every field in the row brought its own chrome, so the row drops the\n * label column and spans the block. One unlabeled field in an otherwise\n * labeled pair would leave the row named after half of itself. */\n block: boolean;\n controls: ReactNode[];\n}\n\n/**\n * Renders an object leaf: the object's own fields, as rows. A child's edit\n * commits the parent object, never the child's path — writing into a path\n * whose value is not an object yet would corrupt it.\n */\nfunction ObjectLeaf({\n ctx,\n renderers,\n selectionKey = '',\n}: {\n ctx: PropertyRenderContext;\n renderers?: Record<string, PropertyRenderer>;\n selectionKey?: string;\n}): ReactNode {\n const pref = ctx.pref as ToolPrefObject;\n const held = typeof ctx.value === 'object' && ctx.value !== null\n ? (ctx.value as Record<string, unknown>)\n : undefined;\n\n // A value whose fields are entirely grouped is titled by those groups — its\n // own heading would stack onto the first one and name nothing new.\n const allGrouped = Object.values(pref.children).every((child) => !('kind' in child));\n\n // `indent` is false when nothing visible sits above these rows: depth is\n // drawn only where a label marks it.\n const rowsOf = (\n children: Record<string, ToolPrefLeaf | ToolPrefGroup>,\n indent: boolean,\n ): ReactNode[] => {\n const out: (ReactNode | ObjectRow)[] = [];\n const isRow = (v: ReactNode | ObjectRow): v is ObjectRow =>\n typeof v === 'object' && v !== null && 'controls' in v;\n\n // Cells accumulate unrendered so a run of adjacent same-`pair` flags can\n // be seen as a run before any of them draws; a group heading between two\n // fields ends the run, exactly as it ends a paired row.\n let pending: LeafCell[] = [];\n const flush = (): void => {\n for (const { key, leaf, block, content } of renderCells(pending, renderers)) {\n const prev = out[out.length - 1];\n if (leaf.pair !== undefined && isRow(prev) && prev.pair === leaf.pair) {\n prev.controls.push(<Fragment key={key}>{content}</Fragment>);\n prev.block &&= block;\n continue;\n }\n out.push({\n key,\n pair: leaf.pair,\n label: leaf.pair ?? leaf.name,\n title: leaf.description,\n block,\n controls: [<Fragment key={key}>{content}</Fragment>],\n });\n }\n pending = [];\n };\n\n for (const [key, child] of Object.entries(children)) {\n // A group among the children organises the fields under a heading\n // without contributing to the path — the rule group keys follow at the\n // top level.\n if (!('kind' in child)) {\n const labeled = child.name !== '';\n const inner = rowsOf(child.children, labeled);\n if (inner.length === 0) continue;\n flush();\n out.push(\n <div key={`group:${key}`} className={labeled && indent ? s.objectGroup : undefined}>\n {labeled && <h5 className={s.sectionTitle}>{child.name}</h5>}\n {inner}\n </div>,\n );\n continue;\n }\n const childPath = `${ctx.path}.${key}`;\n const childCtx: PropertyRenderContext = {\n path: childPath,\n pref: child,\n value: held?.[key],\n mixed: ctx.mixed,\n // A field of an object the node does not hold is unset, and so is one\n // the object omits — `data.stroke` absent leaves every stroke field\n // with nothing behind it, not with the schema's defaults.\n unset: !ctx.mixed && held?.[key] === undefined,\n siblings: held,\n valueAt: ctx.valueAt,\n setValue: (v) => {\n // The node holds no object yet, so writing one field has to\n // materialize the rest: the leaf's `default` is what a complete\n // value looks like. Starting from `{}` instead committed the one\n // field on its own — a `data.stroke` of `{ width: 2 }` with no\n // `paint`, which the type forbids and the painter threw on, taking\n // the whole frame and the visible document with it.\n const base = held\n ?? pref.fromScalar?.(ctx.value)\n ?? (typeof pref.default === 'object' && pref.default !== null\n ? { ...(pref.default as Record<string, unknown>) }\n : {});\n if (v === undefined) {\n // A field written as absent is absent — leaving the key holding\n // `undefined` says the object has a dash of nothing.\n const { [key]: _dropped, ...rest } = base;\n ctx.setValue(rest);\n return;\n }\n ctx.setValue({ ...base, [key]: v });\n },\n };\n pending.push({\n key: childPath,\n leaf: child,\n ctx: childCtx,\n ariaLabel: child.name,\n render: () => {\n const custom = renderers?.[childPath] ?? renderers?.[child.kind];\n const rendered = custom\n ? custom(childCtx)\n : renderBuiltin(childCtx, child.name, renderers, selectionKey, true);\n if (rendered == null) return null;\n // Neither a paired row nor a block one gives a field its own label\n // column, so the glyph is all that names it on screen. The control\n // already carries `name` as its accessible name, which leaves the\n // glyph decorative.\n const unlabeled = child.pair !== undefined || child.block === true;\n const glyph = unlabeled && child.icon && child.icon in ICON_PATHS;\n if (!glyph) return rendered;\n return (\n <span className={s.namedField}>\n <Icon name={child.icon as IconName} size={14} />\n {rendered}\n </span>\n );\n },\n });\n }\n flush();\n return out.map((entry) =>\n typeof entry === 'object' && entry !== null && 'controls' in entry ? (\n entry.block ? (\n <div key={entry.key} className={`${s.rowControls} ${s.blockRow}`} title={entry.title}>\n {entry.controls}\n </div>\n ) : (\n <div key={entry.key} className={s.row}>\n <span className={s.rowLabel} title={entry.title}>{entry.label}</span>\n <span className={s.rowControls}>{entry.controls}</span>\n </div>\n )\n ) : (\n entry\n ),\n );\n };\n\n const rows = rowsOf(pref.children, !allGrouped);\n if (rows.length === 0) return null;\n return (\n <div className={s.objectLeaf}>\n {!allGrouped && <h4 className={s.sectionTitle}>{pref.name}</h4>}\n {rows}\n </div>\n );\n}\n\n/** Text input with commit-on-blur/Enter semantics — live-per-keystroke\n * writes would emit one undo step per character. */\nfunction DraftInput({\n text,\n placeholder,\n ariaLabel,\n onCommit,\n}: {\n text: string | undefined;\n placeholder?: string;\n ariaLabel: string;\n onCommit: (v: string) => void;\n}) {\n const [draft, setDraft] = useState<string | null>(null);\n return (\n <Input\n value={draft ?? text ?? ''}\n placeholder={placeholder}\n aria-label={ariaLabel}\n onChange={setDraft}\n onBlur={() => {\n if (draft !== null && draft !== text) onCommit(draft);\n setDraft(null);\n }}\n onKeyDown={(e) => {\n if (e.key === 'Enter') (e.target as HTMLInputElement).blur();\n }}\n />\n );\n}\n","// Pure selection→panel derivations for SelectionPanel. Kept free of\n// React so intersection/aggregation semantics are unit-testable.\n//\n// Path convention (see core `NodePropertiesEntry`): a leaf's OWN KEY in\n// the schema is its node path — a dotted path of any depth rooted at\n// `pose` or `data` (`pose.x`, `data.fill`, `data.style.fontSize`). Group\n// keys are organizational only.\n\nimport {\n MIXED,\n type Mixed,\n type NodePropertiesEntry,\n type NodeRoutingEntry,\n type SceneNode,\n type ToolPrefGroup,\n type ToolPrefLeaf,\n} from '@weasel-js/core';\n\n// Re-exported under its existing public name here: the kit-wide \"these\n// values disagree\" sentinel (`@weasel-js/core`'s `MIXED`) also covers\n// multi-node aggregation, so this panel doesn't get its own symbol.\nexport { MIXED };\nexport type { Mixed };\n\nexport type AnyNode = SceneNode<unknown, string, unknown>;\n\n/**\n * One editable property in a {@link SelectionPanel}, paired with the dotted\n * node path it reads and writes.\n */\nexport interface PanelLeaf {\n /** Dotted node path — the leaf's key in the schema. */\n path: string;\n leaf: ToolPrefLeaf;\n}\n\n/**\n * One labeled row of a panel section. Holds several leaves when the schema\n * paired them.\n */\nexport interface PanelRow {\n label: string;\n leaves: PanelLeaf[];\n}\n\n/**\n * A titled block of rows, derived from one top-level group of a properties\n * schema. `key` is that group's schema key.\n */\nexport interface PanelSection {\n key: string;\n name: string;\n rows: PanelRow[];\n}\n\n/** Derive a node's kind: containers are `'group'`; leaves classify their\n * `data` through the routing entries (first match wins, `'unknown'`\n * otherwise) — same semantics as core's `NodeRouting.classify`. */\nexport function classifyKind(\n node: AnyNode,\n routing: readonly NodeRoutingEntry[],\n): string {\n if (node.kind === 'container') return 'group';\n for (const entry of routing) {\n if (entry.matches(node.data)) return entry.name;\n }\n return 'unknown';\n}\n\nexport function isGroup(n: ToolPrefLeaf | ToolPrefGroup): n is ToolPrefGroup {\n return !('kind' in n);\n}\n\n/** Flatten a schema to sections of leaves. Nested groups fold into their\n * top-level section; top-level leaves get an untitled leading section. */\nfunction flatten(schema: ToolPrefGroup): PanelSection[] {\n const sections: PanelSection[] = [];\n const untitled: PanelLeaf[] = [];\n\n const collect = (group: ToolPrefGroup, into: PanelLeaf[]): void => {\n for (const [key, child] of Object.entries(group.children)) {\n if (isGroup(child)) collect(child, into);\n else into.push({ path: key, leaf: child });\n }\n };\n\n for (const [key, child] of Object.entries(schema.children)) {\n if (isGroup(child)) {\n const leaves: PanelLeaf[] = [];\n collect(child, leaves);\n sections.push({ key, name: child.name, rows: pairRows(leaves) });\n } else {\n untitled.push({ path: key, leaf: child });\n }\n }\n if (untitled.length > 0) {\n sections.unshift({ key: '', name: '', rows: pairRows(untitled) });\n }\n return sections;\n}\n\n/** Merge consecutive leaves sharing a `pair` id into one labeled row. */\nexport function pairRows(leaves: readonly PanelLeaf[]): PanelRow[] {\n const rows: PanelRow[] = [];\n for (const item of leaves) {\n const pair = item.leaf.pair;\n const prev = rows[rows.length - 1];\n if (pair !== undefined && prev !== undefined && prev.label === pair) {\n prev.leaves.push(item);\n } else {\n rows.push({ label: pair ?? item.leaf.name, leaves: [item] });\n }\n }\n return rows;\n}\n\n/**\n * The schema the panel shows for a set of kinds: one kind → its full\n * schema; several → the intersection by (path, leaf kind), shaped by the\n * first kind's section/row layout. Kinds without a registered schema\n * contribute nothing, so their presence collapses the intersection.\n */\nexport function effectiveSections(\n kinds: readonly string[],\n entries: readonly NodePropertiesEntry[],\n): PanelSection[] {\n const uniq = [...new Set(kinds)];\n if (uniq.length === 0) return [];\n const byName = new Map(entries.map((e) => [e.name, e]));\n const schemas = uniq.map((k) => byName.get(k)?.schema);\n if (schemas.some((s) => s === undefined)) return [];\n const [first, ...rest] = schemas as ToolPrefGroup[];\n\n const flatFirst = flatten(first);\n if (rest.length === 0) return flatFirst;\n\n // '\\0' delimiter: path and kind strings are unconstrained, so a\n // printable separator could collide with real content.\n const leafKey = (l: PanelLeaf): string => `${l.path}\\0${l.leaf.kind}`;\n const restKeys = rest.map(\n (schema) =>\n new Set(\n flatten(schema)\n .flatMap((s) => s.rows)\n .flatMap((r) => r.leaves)\n .map(leafKey),\n ),\n );\n const keep = (l: PanelLeaf): boolean =>\n restKeys.every((set) => set.has(leafKey(l)));\n\n return flatFirst\n .map((section) => ({\n ...section,\n rows: section.rows\n .map((row) => ({ ...row, leaves: row.leaves.filter(keep) }))\n .filter((row) => row.leaves.length > 0),\n }))\n .filter((section) => section.rows.length > 0);\n}\n\n/** Read a node value at a dotted path of any depth (`pose.x`,\n * `data.style.fontSize`, `data.style.fill.color`). Returns `undefined` if\n * the path is dotless (mirrors `commit`'s no-op on a malformed schema\n * key) or if any intermediate segment is missing or not an object. */\nexport function nodeValueAt(node: AnyNode, path: string): unknown {\n const segments = path.split('.');\n if (segments.length < 2) return undefined;\n const head = segments[0];\n let cursor: unknown = head === 'pose' ? node.pose : head === 'data' ? node.data : undefined;\n for (let i = 1; i < segments.length; i++) {\n if (cursor == null || typeof cursor !== 'object') return undefined;\n cursor = (cursor as Record<string, unknown>)[segments[i]];\n }\n return cursor;\n}\n\n/** Immutably set `value` at a dotted path within `root`, cloning each level\n * on the way down so React sees new object identities. Arrays stay arrays\n * (an array intermediate is shallow-copied, not flattened into `{0: ...}`)\n * — this is the write-side twin of `nodeValueAt`, so a schema author who\n * gets a working read gets a working write. */\nexport function setAtPath(root: object, segments: readonly string[], value: unknown): object {\n const [head, ...rest] = segments;\n if (rest.length === 0) {\n return Array.isArray(root)\n ? Object.assign([...root], { [head]: value })\n : { ...root, [head]: value };\n }\n const child = (root as Record<string, unknown>)[head];\n const childObj = Array.isArray(child)\n ? [...child]\n : child != null && typeof child === 'object'\n ? { ...child }\n : {};\n const nested = setAtPath(childObj, rest, value);\n return Array.isArray(root)\n ? Object.assign([...root], { [head]: nested })\n : { ...root, [head]: nested };\n}\n\n/** Aggregate a path across nodes: the shared value, or `MIXED`. */\nexport function aggregateValue(\n nodes: readonly AnyNode[],\n path: string,\n): unknown | Mixed {\n let value: unknown;\n let first = true;\n for (const node of nodes) {\n const v = nodeValueAt(node, path);\n if (first) {\n value = v;\n first = false;\n } else if (!Object.is(v, value)) {\n return MIXED;\n }\n }\n return value;\n}\n\n/** `'rect ×2 · text'` — kinds in first-seen order with counts. */\nexport function kindBreakdown(kinds: readonly string[]): string {\n const counts = new Map<string, number>();\n for (const k of kinds) counts.set(k, (counts.get(k) ?? 0) + 1);\n return [...counts.entries()]\n .map(([k, n]) => (n > 1 ? `${k} ×${n}` : k))\n .join(' · ');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACsHA,SAAgB,EAAW,GAAgB,GAAuD;CAChG,IAAM,EAAE,YAAS;AACjB,QACE,EAAK,SAAS,aACb,EAAyB,YAAY,YACtC,EAAK,SAAS,KAAA,KACd,IAAY,EAAK,IAAI,UAAU,KAAA,KAC/B,IAAY,EAAK,UAAU,KAAA;;AAS/B,SAAgB,EACd,GACA,GACgB;CAChB,IAAM,IAAsB,EAAE;AAC9B,MAAK,IAAI,IAAI,GAAG,IAAI,EAAM,SAAU;EAClC,IAAM,IAAO,EAAM;AACnB,MAAI,CAAC,EAAW,GAAM,EAAU,EAAE;GAChC,IAAM,IAAU,EAAK,QAAQ;AAI7B,GAHI,KAAW,QACb,EAAI,KAAK;IAAE,KAAK,EAAK;IAAK,MAAM,EAAK;IAAM,OAAO,EAAK,KAAK,UAAU;IAAM;IAAS,CAAC,EAExF,KAAK;AACL;;EAEF,IAAI,IAAI,IAAI;AACZ,SACE,IAAI,EAAM,UACV,EAAW,EAAM,IAAI,EAAU,IAC/B,EAAM,GAAG,KAAK,SAAS,EAAK,KAAK,MAEjC,MAAK;EAEP,IAAM,IAAM,EAAM,MAAM,GAAG,EAAE;AAO7B,EANA,EAAI,K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AAO,CAAC,GAAG,EAAK,EAAE,GAAG,IAAO,GAAO,CAAC,GAC3C;EAAE,GAAG;GAAO,IAAO;EAAO;CAEhC,IAAM,IAAS,EAAiC,IAM1C,IAAS,EALE,MAAM,QAAQ,EAAM,GACjC,CAAC,GAAG,EAAM,GACO,OAAO,KAAU,YAAlC,IACE,EAAE,GAAG,GAAO,GACZ,EAAE,EAC2B,GAAM,EAAM;AAC/C,QAAO,MAAM,QAAQ,EAAK,GACtB,OAAO,OAAO,CAAC,GAAG,EAAK,EAAE,GAAG,IAAO,GAAQ,CAAC,GAC5C;EAAE,GAAG;GAAO,IAAO;EAAQ;;AAIjC,SAAgB,EACd,GACA,GACiB;CACjB,IAAI,GACA,IAAQ;AACZ,MAAK,IAAM,KAAQ,GAAO;EACxB,IAAM,IAAI,EAAY,GAAM,EAAK;AACjC,MAAI,EAEF,CADA,IAAQ,GACR,IAAQ;WACC,CAAC,OAAO,GAAG,GAAG,EAAM,CAC7B,QAAO;;AAGX,QAAO;;AAIT,SAAgB,EAAc,GAAkC;CAC9D,IAAM,oBAAS,IAAI,KAAqB;AACxC,MAAK,IAAM,KAAK,EAAO,GAAO,IAAI,IAAI,EAAO,IAAI,EAAE,IAAI,KAAK,EAAE;AAC9D,QAAO,CAAC,GAAG,EAAO,SAAS,CAAC,CACzB,KAAK,CAAC,GAAG,OAAQ,IAAI,IAAI,GAAG,EAAE,IAAI,MAAM,EAAG,CAC3C,KAAK,MAAM"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"number-BHz66zQO.js","names":[],"sources":["../../src/format/number.ts"],"sourcesContent":["/**\n * Display-formatter for numbers. Use this anywhere a number is shown to\n * a user. The whole point: negative values get prefixed with the real\n * MINUS SIGN (U+2212) instead of the ASCII HYPHEN-MINUS (U+002D) that\n * `toLocaleString` and template literals produce by default.\n *\n * U+2212 is the same visual width as `+` and reads as a sign rather\n * than a hyphen — columns of signed numbers align cleanly and the\n * glyph doesn't get confused with a bullet or list dash.\n */\nexport const MINUS_SIGN = '−';\n\n/**\n * Formats a number for display, substituting {@link MINUS_SIGN} for the ASCII\n * hyphen `toLocaleString` emits. Non-finite values stringify as-is.\n */\nexport function formatNumber(value: number, options?: Intl.NumberFormatOptions): string {\n const formatted = Number.isFinite(value)\n ? value.toLocaleString(undefined, options)\n : String(value);\n return formatted.replace(/^-/, MINUS_SIGN);\n}\n\n/**\n * Parses a string that may carry {@link MINUS_SIGN} in place of the ASCII\n * hyphen. The inverse of {@link formatNumber} for any editing surface that\n * renders its value through it and reads the edited text back.\n */\nexport function parseSignedNumber(text: string): number {\n return Number(text.replace(MINUS_SIGN, '-'));\n}\n\n/** Powers of ten a typed magnitude suffix stands for. */\nconst EXPONENTS: Record<string, number> = { k: 3, m: 6, b: 9, t: 12 };\n\n/**\n * Formats a number the way a `compact` readout shows it: below 1,000 at\n * `decimals` places, from 1,000 up at one decimal with a magnitude suffix\n * (`40.0K`, `2.0M`). Always `en-US`, so {@link parseNumber} reads it back.\n */\nexport function formatCompact(value: number, decimals = 0): string {\n if (!Number.isFinite(value)) return formatNumber(value);\n const options: Intl.NumberFormatOptions =\n Math.abs(value) < 1000\n ? { useGrouping: false, minimumFractionDigits: decimals, maximumFractionDigits: decimals }\n : { notation: 'compact', minimumFractionDigits: 1, maximumFractionDigits: 1 };\n return value.toLocaleString('en-US', options).replace(/^-/, MINUS_SIGN);\n}\n\n/**\n * Reads a typed number: anything {@link parseSignedNumber} reads, plus\n * thousands commas in the `40,000` shape and a `k`/`m`/`b`/`t` suffix in either\n * case (`2.5m` is 2,500,000). Empty text is NaN rather than zero.\n *\n * Given `units` — a suffix mapped to the factor it scales by — a trailing unit\n * name is read first: the longest match wins, exact case before any case, and\n * a unit beats a magnitude suffix, so with `m` accepted `2m` is `2 * units.m`.\n */\nexport function parseNumber(text: string, units?: Readonly<UnitTable>): number {\n if (units) {\n const trimmed = text.trim();\n const name = unitSuffixOf(trimmed, units);\n if (name !== undefined) {\n const terms = compoundTermsOf(trimmed, units);\n if (terms !== undefined && terms.length > 1) return compoundValue(terms, trimmed, units);\n const { factor, offset } = scaleOf(units[name]!);\n return scaled(parseNumber(trimmed.slice(0, -name.length)), factor) + offset;\n }\n }\n let t = text.trim().replace(MINUS_SIGN, '-');\n const exponent = EXPONENTS[t.slice(-1).toLowerCase()];\n if (exponent !== undefined) t = t.slice(0, -1).trimEnd();\n if (/^[-+]?\\d{1,3}(,\\d{3})+(\\.\\d*)?$/.test(t)) t = t.replace(/,/g, '');\n if (!/\\d/.test(t)) return Number.NaN;\n // Scaled through the exponent rather than by multiplying: 1.1 * 1000 is 1100.0000000000002.\n return Number(exponent === undefined ? t : `${t}e${exponent}`);\n}\n\n/** One unit's conversion into the shown unit: a bare factor, or a scale that\n * also moves zero. Structurally the kit's `UnitEntry`, kept local so this\n * formatting helper stays free of the scene vocabulary. */\nexport type UnitTableEntry = number | { factor: number; offset?: number };\n/** Suffixes a person may type, each mapped to its conversion. */\nexport type UnitTable = Record<string, UnitTableEntry>;\n\n/** Divided by the reciprocal below 1: 12 * 0.1 is 1.2000000000000002, 12 / 10 is 1.2. */\nfunction scaled(n: number, factor: number): number {\n return factor < 1 ? n / (1 / factor) : n * factor;\n}\n\n/** A unit table entry's scale, with the bare-factor shorthand widened. */\nfunction scaleOf(entry: UnitTableEntry): { factor: number; offset: number } {\n return typeof entry === 'number'\n ? { factor: entry, offset: 0 }\n : { factor: entry.factor, offset: entry.offset ?? 0 };\n}\n\n/**\n * The unit names in `text`, in reading order, when every one of them closes a\n * `<number><unit>` term — which is what tells `5ft 3in` from a malformed\n * `5ft 3`. Undefined when the text is not a run of whole terms.\n */\nfunction compoundTermsOf(text: string, units: Readonly<UnitTable>): string[] | undefined {\n const names: string[] = [];\n let rest = text.trimEnd();\n while (rest !== '') {\n const name = unitSuffixOf(rest, units);\n if (name === undefined) return undefined;\n names.push(name);\n const before = rest.slice(0, -name.length);\n const m = /(\\d+(?:\\.\\d+)?|\\.\\d+)\\s*$/.exec(before);\n if (!m) return undefined;\n rest = before.slice(0, m.index).trimEnd();\n // A sign leads the whole value, so it ends the walk rather than a term.\n if (rest === '-' || rest === '+' || rest === MINUS_SIGN) rest = '';\n }\n return names.length === 0 ? undefined : names.reverse();\n}\n\n/**\n * `5ft 3in` as one number in the shown unit. Every term scales and they sum;\n * a leading sign carries across all of them, so `-5ft 3in` is −63in and not\n * −57. Offsets have no meaning in a sum — 1K + 2degC is not a temperature —\n * so a term carrying one makes the whole value unreadable.\n */\nfunction compoundValue(names: string[], text: string, units: Readonly<UnitTable>): number {\n const digits = text.match(/\\d+(?:\\.\\d+)?|\\.\\d+/g);\n if (!digits || digits.length !== names.length) return Number.NaN;\n const sign = /^\\s*[-\\u2212]/.test(text) ? -1 : 1;\n let total = 0;\n for (const [i, name] of names.entries()) {\n const { factor, offset } = scaleOf(units[name]!);\n if (offset !== 0) return Number.NaN;\n total += scaled(Number(digits[i]), factor);\n }\n return sign * total;\n}\n\n/** The longest unit name `text` ends with — exact case first, then any case. */\nfunction unitSuffixOf(text: string, units: Readonly<UnitTable>): string | undefined {\n const names = Object.keys(units).filter((n) => n !== '').sort((a, b) => b.length - a.length);\n const lower = text.toLowerCase();\n return names.find((n) => text.endsWith(n)) ?? names.find((n) => lower.endsWith(n.toLowerCase()));\n}\n\n/** {@link String} with the leading ASCII hyphen swapped for {@link MINUS_SIGN}.\n * Locale-independent, unlike `toLocaleString`. */\nfunction signedString(value: number): string {\n return String(value).replace(/^-/, MINUS_SIGN);\n}\n\n/**\n * Formats a zoom factor for display. Below 2x a percentage reads naturally;\n * past it the numbers get long and a multiplier is what people say out loud,\n * so 250% shows as `2.5x`. Past 100x a tenth is noise, so the decimal is\n * dropped and thousands are grouped: `1009.74` reads as `1,010x`.\n */\nexport function formatZoom(zoom: number): string {\n if (!Number.isFinite(zoom)) return String(zoom);\n if (zoom <= 2) return `${signedString(Math.round(zoom * 100))}%`;\n if (zoom >= 100) return `${Math.round(zoom).toLocaleString('en-US')}x`;\n return `${signedString(Math.round(zoom * 10) /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AAE,EAAO;;AAE5C,QAAO,IAAO;;AAIhB,SAAS,EAAa,GAAc,GAAgD;CAClF,IAAM,IAAQ,OAAO,KAAK,EAAM,CAAC,QAAQ,MAAM,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,EAAE,SAAS,EAAE,OAAO,EACtF,IAAQ,EAAK,aAAa;AAChC,QAAO,EAAM,MAAM,MAAM,EAAK,SAAS,EAAE,CAAC,IAAI,EAAM,MAAM,MAAM,EAAM,SAAS,EAAE,aAAa,CAAC,CAAC;;AAKlG,SAAS,EAAa,GAAuB;AAC3C,QAAO,OAAO,EAAM,CAAC,QAAQ,MAAA,IAAiB;;AAShD,SAAgB,EAAW,GAAsB;AAI/C,QAHK,OAAO,SAAS,EAAK,GACtB,KAAQ,IAAU,GAAG,EAAa,KAAK,MAAM,IAAO,IAAI,CAAC,CAAC,KAC1D,KAAQ,MAAY,GAAG,KAAK,MAAM,EAAK,CAAC,eAAe,QAAQ,CAAC,KAC7D,GAAG,EAAa,KAAK,MAAM,IAAO,GAAG,GAAG,GAAG,CAAC,KAHhB,OAAO,EAAK"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"portalHost-CjpCnuGU.js","names":[],"sources":["../../src/overlays/portalHost.tsx"],"sourcesContent":["import { createContext, useContext, useState, type ReactElement, type ReactNode } from 'react';\n\n/**\n * Elements an overlay may portal into: anything a theme has been stamped on\n * (`applyTheme` / `<ThemeProvider>` write both attributes), plus anything\n * opting in with `data-wzl-portal-host`. The opt-in exists for a styling root\n * that sits *below* the themed element — labkit's `.lk-root` carries element\n * defaults the themed wrapper does not.\n */\nconst HOST_SELECTOR = '[data-wzl-portal-host],[data-wzl-theme],[data-wzl-mode]';\n\n/**\n * The nearest element `from` sits inside that can host a portalled overlay,\n * or `null` when there is none and the body is the only answer.\n */\nexport function nearestPortalHost(from: Element | null | undefined): HTMLElement | null {\n return (from?.closest(HOST_SELECTOR) as HTMLElement | null) ?? null;\n}\n\n/** `undefined` distinguishes \"no provider\" from a provider saying `null`. */\nconst OverlayPortalContext = createContext<Element | null | undefined>(undefined);\n\n/** Props for {@link OverlayPortalProvider}. */\nexport interface OverlayPortalProviderProps {\n /** Where overlays in this subtree portal. `null` means `document.body`. */\n container: Element | null;\n children: ReactNode;\n}\n\n/**\n * Sets the portal container for every weasel overlay rendered below it,\n * overriding the nearest-themed-ancestor default. An individual overlay's\n * own `portalContainer` prop still wins.\n */\nexport function OverlayPortalProvider({ container, children }: OverlayPortalProviderProps) {\n return (\n <OverlayPortalContext.Provider value={container}>{children}</OverlayPortalContext.Provider>\n );\n}\n\n/** The `portalContainer` prop every weasel overlay accepts. */\nexport interface OverlayPortalProps {\n /**\n * Where the overlay's portal mounts. Defaults to the nearest ancestor of\n * the overlay's own position that carries a weasel theme, so the overlay\n * resolves the same `--wzl-*` tokens as the control it belongs to. Pass\n * `null` for `document.body`.\n */\n portalContainer?: Element | null;\n}\n\n/** React Aria props minus the portal key a weasel overlay owns. */\nexport type WithoutPortalTarget<T> = Omit<T, 'UNSTABLE_portalContainer'>;\n\n/** Spread onto the React Aria overlay. The unstable key is spelled here and\n * nowhere else in the package, so an upstream rename lands in one file. */\nexport interface OverlayPortalTarget {\n UNSTABLE_portalContainer: Element | undefined;\n}\n\n/**\n * Resolves where an overlay should portal, and the anchor that answers it.\n *\n * The result goes to React Aria as `UNSTABLE_portalContainer`. Its documented\n * replacement, `UNSAFE_PortalProvider`, is not re-exported by\n * react-aria-components 1.18, and reaching past it to `react-aria` for the\n * provider risks a second copy of that package whose context the overlays\n * never read — a failure that shows up as an unthemed overlay, not an error.\n *\n * Render `anchor` at the component's own position in the tree — outside the\n * portal — and spread `portalProps` onto the React Aria overlay. The anchor\n * is what \"nearest themed ancestor\" is measured from; the first render has\n * none yet, so an overlay that mounts already open lands in its host on the\n * following render, before paint.\n */\nexport function useOverlayPortal(explicit?: Element | null): {\n anchor: ReactElement;\n portalProps: OverlayPortalTarget;\n} {\n const [anchorEl, setAnchorEl] = useState<HTMLElement | null>(null);\n const fromProvider = useContext(OverlayPortalContext);\n\n const resolved =\n explicit !== undefined\n ? explicit\n : fromProvider !== undefined\n ? fromProvider\n : nearestPortalHost(anchorEl);\n\n return {\n anchor: <span hidden ref={setAnchorEl} />,\n portalProps: { UNSTABLE_portalContainer: resolved ?? undefined },\n };\n}\n"],"mappings":";;;AASA,IAAM,IAAgB;AAMtB,SAAgB,EAAkB,GAAsD;AACtF,QAAQ,GAAM,QAAQ,EAAc,IAA2B;;AAIjE,IAAM,IAAuB,EAA0C,KAAA,EAAU;AAcjF,SAAgB,EAAsB,EAAE,cAAW,eAAwC;AACzF,QACE,kBAAC,EAAqB,UAAtB;EAA+B,OAAO;EAAY;EAAyC,CAAA;;AAuC/F,SAAgB,EAAiB,GAG/B;CACA,IAAM,CAAC,GAAU,KAAe,EAA6B,KAAK,EAC5D,IAAe,EAAW,EAAqB,EAE/C,IACJ,MAAa,KAAA,IAET,MAAiB,KAAA,IAEf,EAAkB,EAAS,GAD3B,IAFF;AAKN,QAAO;EACL,QAAQ,kBAAC,QAAD;GAAM,QAAA;GAAO,KAAK;GAAe,CAAA;EACzC,aAAa,EAAE,0BAA0B,KAAY,KAAA,GAAW;EACjE"}
@@ -1,8 +0,0 @@
1
- var e = {
2
- range: "_range_g7ip1_9",
3
- alpha: "_alpha_g7ip1_74"
4
- };
5
- //#endregion
6
- export { e as t };
7
-
8
- //# sourceMappingURL=range.module-DSsOIq1R.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"range.module-DSsOIq1R.js","names":[],"sources":["../../src/components/range.module.css"],"sourcesContent":["/* The one skin for a native <input type=\"range\">. Imported by InlineRange and\n by the property rows, which render the same DOM and used to carry three\n independently authored copies of these rules.\n\n The track is painted here rather than left to `accent-color`: a UA fills the\n left of the track with the accent but draws the remainder near-white on a\n dark surface whatever `color-scheme` says, and overriding the track's\n background removes the accent fill instead of recolouring the remainder. */\n.range {\n appearance: none;\n -webkit-appearance: none;\n width: 100%;\n min-inline-size: 48px;\n /* The box is taller than the track so the thumb has room to spill; a surface\n where the element itself IS the track overrides this. */\n height: var(--wzl-range-box-h, 12px);\n margin: 0;\n padding: 0;\n /* Transparent so the track pseudo-element shows; a surface that paints the element itself overrides it. */\n background: var(--wzl-range-bg, transparent);\n cursor: pointer;\n}\n\n.range::-webkit-slider-runnable-track {\n height: var(--wzl-slider-track-h, 4px);\n border-radius: var(--wzl-radius-sm);\n background: var(\n --wzl-range-track-bg,\n color-mix(in srgb, var(--wzl-accent) var(--wzl-slider-track-mix, 18%), transparent)\n );\n}\n\n.range::-moz-range-track {\n height: var(--wzl-slider-track-h, 4px);\n border-radius: var(--wzl-radius-sm);\n background: var(\n --wzl-range-track-bg,\n color-mix(in srgb, var(--wzl-accent) var(--wzl-slider-track-mix, 18%), transparent)\n );\n}\n\n.range::-webkit-slider-thumb {\n appearance: none;\n -webkit-appearance: none;\n width: var(--wzl-slider-thumb-size, 8px);\n height: var(--wzl-slider-thumb-size, 8px);\n border: none;\n border-radius: 50%;\n background: color-mix(in srgb, var(--wzl-accent) var(--wzl-slider-thumb-mix, 70%), transparent);\n /* Centres an 8px thumb on a 4px track. Webkit does not centre it for you. */\n margin-top: calc((var(--wzl-slider-track-h, 4px) - var(--wzl-slider-thumb-size, 8px)) / 2);\n}\n\n.range::-moz-range-thumb {\n width: var(--wzl-slider-thumb-size, 8px);\n height: var(--wzl-slider-thumb-size, 8px);\n border: none;\n border-radius: 50%;\n background: color-mix(in srgb, var(--wzl-accent) var(--wzl-slider-thumb-mix, 70%), transparent);\n}\n\n.range:focus-visible {\n outline: 2px solid var(--wzl-focus-ring);\n outline-offset: 2px;\n}\n\n.range:disabled {\n cursor: not-allowed;\n opacity: 0.55;\n}\n\n/* Alpha variant: a fainter track, used where the row already carries a colour\n swatch and the slider must not compete with it. */\n.alpha::-webkit-slider-runnable-track {\n background: var(--wzl-range-track-bg, color-mix(in srgb, var(--wzl-accent) 10%, transparent));\n}\n\n.alpha::-moz-range-track {\n background: var(--wzl-range-track-bg, color-mix(in srgb, var(--wzl-accent) 10%, transparent));\n}\n\n/* A dead alpha track keeps its groove but loses its thumb, so the affordance\n reads inert rather than merely dimmed. Keyed off `:disabled`, which ColorRow\n already sets on the input — not off a class on the row. */\n.alpha:disabled::-webkit-slider-runnable-track,\n.alpha:disabled::-moz-range-track {\n background: color-mix(in srgb, var(--wzl-fg) 5%, transparent);\n}\n\n.alpha:disabled::-webkit-slider-thumb,\n.alpha:disabled::-moz-range-thumb {\n background: transparent;\n}\n"],"mappings":""}
@@ -1,47 +0,0 @@
1
- //#region src/components/Prefs/schema.ts
2
- function e(e) {
3
- if (!e.unit) return {
4
- min: e.min,
5
- max: e.max,
6
- step: e.step ?? 1
7
- };
8
- let { toDisplay: t } = e.unit, n = e.min === void 0 ? void 0 : t(e.min), r = e.max === void 0 ? void 0 : t(e.max), i = n !== void 0 && r !== void 0 && n > r, a = e.step === void 0 ? 1 : Math.abs(t(e.step) - t(0)) || e.step;
9
- return {
10
- min: i ? r : n,
11
- max: i ? n : r,
12
- step: a
13
- };
14
- }
15
- function t(e) {
16
- return e.suffix === void 0 ? { ...e.accepts } : {
17
- [e.suffix]: 1,
18
- ...e.accepts
19
- };
20
- }
21
- function n(e) {
22
- return "kind" in e;
23
- }
24
- function r(e, t) {
25
- let n = e;
26
- for (let e of t.split(".")) {
27
- if (typeof n != "object" || !n) return;
28
- n = n[e];
29
- }
30
- return n;
31
- }
32
- function i(e, t) {
33
- if (n(e)) return e.hidden && !t ? null : e;
34
- let r = e, a = {};
35
- for (let [e, n] of Object.entries(r.children)) {
36
- let r = i(n, t);
37
- r && (a[e] = r);
38
- }
39
- return Object.keys(a).length === 0 ? null : {
40
- ...e,
41
- children: a
42
- };
43
- }
44
- //#endregion
45
- export { i as a, r as i, e as n, t as r, n as t };
46
-
47
- //# sourceMappingURL=schema-Dft4Cu2p.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema-Dft4Cu2p.js","names":[],"sources":["../../src/components/Prefs/schema.ts"],"sourcesContent":["// Preference-schema vocabulary for PrefsForm / PrefsDialog / SelectionPanel:\n// core's `ToolPref*` family under this package's names. Never re-declare them\n// here — this was a hand-kept structural copy until it drifted, and the\n// independence from `@weasel-js/core` it bought is long gone anyway.\n\nexport type {\n ToolPref as BuiltinPref,\n ToolPrefBoolean as PrefBoolean,\n ToolPrefBooleanControl as PrefBooleanControl,\n ToolPrefColor as PrefColor,\n ToolPrefCustom as PrefCustom,\n ToolPrefEnum as PrefEnum,\n ToolPrefEnumControl as PrefEnumControl,\n ToolPrefEnumEncoding as PrefEnumEncoding,\n ToolPrefGroup as PrefGroup,\n ToolPrefKind as PrefKind,\n ToolPrefLeaf as PrefLeaf,\n ToolPrefNumber as PrefNumber,\n ToolPrefNumberControl as PrefNumberControl,\n ToolPrefNumberFormat as PrefNumberFormat,\n ToolPrefNumberUnit as PrefNumberUnit,\n ToolPrefObject as PrefObject,\n ToolPrefPaint as PrefPaint,\n ToolPrefString as PrefString,\n ToolPrefStringControl as PrefStringControl,\n} from '@weasel-js/core';\n\nimport type { UnitTable } from '../../format/number';\nimport type { ToolPrefGroup, ToolPrefLeaf, ToolPrefNumber, ToolPrefNumberUnit as PrefNumberUnitType } from '@weasel-js/core';\n\n/**\n * A number leaf's bounds in the unit it is displayed in.\n *\n * Only what the leaf declares converts: an omitted bound has no stored\n * counterpart to put through the conversion, and its fallback — 0..100 for a\n * slider's track, a step of 1 — is a display-space number already. `min` and\n * `max` are points, so they convert the way the value does; `step` is a\n * distance, and a unit with an offset maps zero somewhere else, so converting\n * it as a point would scale it wrong. A decreasing conversion swaps which end\n * is the lower one.\n */\nexport function prefDisplayBounds(\n p: ToolPrefNumber,\n): { min?: number; max?: number; step: number } {\n if (!p.unit) return { min: p.min, max: p.max, step: p.step ?? 1 };\n const { toDisplay } = p.unit;\n const lo = p.min === undefined ? undefined : toDisplay(p.min);\n const hi = p.max === undefined ? undefined : toDisplay(p.max);\n const flipped = lo !== undefined && hi !== undefined && lo > hi;\n const step = p.step === undefined\n ? 1\n : Math.abs(toDisplay(p.step) - toDisplay(0)) || p.step;\n return { min: flipped ? hi : lo, max: flipped ? lo : hi, step };\n}\n\n/** What a unit leaf's field reads as typed text: its `accepts` table, and its\n * `suffix` as the display unit itself. */\nexport function prefUnitAccepts(unit: PrefNumberUnitType): Readonly<UnitTable> {\n return unit.suffix === undefined ? { ...unit.accepts } : { [unit.suffix]: 1, ...unit.accepts };\n}\n\n/** Distinguishes a leaf from a group while walking a schema tree. */\nexport function isPrefLeaf(node: ToolPrefLeaf | ToolPrefGroup): node is ToolPrefLeaf {\n return 'kind' in node;\n}\n\n/** Get the value at a dotted path inside a nested value tree. Returns\n * `undefined` when a segment is missing or hits a non-object. */\nexport function prefValueAtPath(values: unknown, path: string): unknown {\n let cur: unknown = values;\n for (const seg of path.split('.')) {\n if (cur == null || typeof cur !== 'object') return undefined;\n cur = (cur as Record<string, unknown>)[seg];\n }\n return cur;\n}\n\n/**\n * Recursively drop `hidden` leaves (unless `showHidden`), pruning groups\n * that end up empty. Returns null when the entire subtree is hidden.\n */\nexport function visiblePrefSubtree<T extends ToolPrefLeaf | ToolPrefGroup>(\n node: T,\n showHidden: boolean,\n): T | null {\n if (isPrefLeaf(node)) return node.hidden && !showHidden ? null : node;\n const group = node as ToolPrefGroup;\n const children: Record<string, ToolPrefLeaf | ToolPrefGroup> = {};\n for (const [key, child] of Object.entries(group.children)) {\n const kept = visiblePrefSubtree(child, showHidden);\n if (kept) children[key] = kept;\n }\n if (Object.keys(children).length === 0) return null;\n return { ...node, children };\n}\n"],"mappings":";AAyCA,SAAgB,EACd,GAC8C;AAC9C,KAAI,CAAC,EAAE,KAAM,QAAO;EAAE,KAAK,EAAE;EAAK,KAAK,EAAE;EAAK,MAAM,EAAE,QAAQ;EAAG;CACjE,IAAM,EAAE,iBAAc,EAAE,MAClB,IAAK,EAAE,QAAQ,KAAA,IAAY,KAAA,IAAY,EAAU,EAAE,IAAI,EACvD,IAAK,EAAE,QAAQ,KAAA,IAAY,KAAA,IAAY,EAAU,EAAE,IAAI,EACvD,IAAU,MAAO,KAAA,KAAa,MAAO,KAAA,KAAa,IAAK,GACvD,IAAO,EAAE,SAAS,KAAA,IACpB,IACA,KAAK,IAAI,EAAU,EAAE,KAAK,GAAG,EAAU,EAAE,CAAC,IAAI,EAAE;AACpD,QAAO;EAAE,KAAK,IAAU,IAAK;EAAI,KAAK,IAAU,IAAK;EAAI;EAAM;;AAKjE,SAAgB,EAAgB,GAA+C;AAC7E,QAAO,EAAK,WAAW,KAAA,IAAY,EAAE,GAAG,EAAK,SAAS,GAAG;GAAG,EAAK,SAAS;EAAG,GAAG,EAAK;EAAS;;AAIhG,SAAgB,EAAW,GAA0D;AACnF,QAAO,UAAU;;AAKnB,SAAgB,EAAgB,GAAiB,GAAuB;CACtE,IAAI,IAAe;AACnB,MAAK,IAAM,KAAO,EAAK,MAAM,IAAI,EAAE;AACjC,MAAmB,OAAO,KAAQ,aAA9B,EAAwC;AAC5C,MAAO,EAAgC;;AAEzC,QAAO;;AAOT,SAAgB,EACd,GACA,GACU;AACV,KAAI,EAAW,EAAK,CAAE,QAAO,EAAK,UAAU,CAAC,IAAa,OAAO;CACjE,IAAM,IAAQ,GACR,IAAyD,EAAE;AACjE,MAAK,IAAM,CAAC,GAAK,MAAU,OAAO,QAAQ,EAAM,SAAS,EAAE;EACzD,IAAM,IAAO,EAAmB,GAAO,EAAW;AAClD,EAAI,MAAM,EAAS,KAAO;;AAG5B,QADI,OAAO,KAAK,EAAS,CAAC,WAAW,IAAU,OACxC;EAAE,GAAG;EAAM;EAAU"}
@@ -1,11 +0,0 @@
1
- var e = {
2
- root: "_root_9a0rv_10",
3
- segment: "_segment_9a0rv_32",
4
- segmentSelected: "_segmentSelected_9a0rv_81",
5
- size_sm: "_size_sm_9a0rv_139",
6
- variant_minimal: "_variant_minimal_9a0rv_152"
7
- };
8
- //#endregion
9
- export { e as t };
10
-
11
- //# sourceMappingURL=segmentedControl.module-DS72X1ns.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"segmentedControl.module-DS72X1ns.js","names":[],"sources":["../../src/components/segmentedControl.module.css"],"sourcesContent":["/* Shared by ActionsBar and OptionsBar, which look identical and differ only\n in what a segment does. Lives here rather than in either component so\n neither owns the other's styling.\n\n Aqua-glass segmented control. The track is a pill-shaped well; the\n selected segment becomes a tinted glass cylinder that reads as the same\n \"lozenge\" family as the standalone Button. Visual params come from the\n `--btn-*` custom properties (see Button.module.css) so the Button Lab\n can tune both surfaces with one set of sliders. */\n.root {\n display: inline-flex;\n height: var(--tb-h, var(--wzl-control-h, 24px));\n padding: var(--wzl-space-1);\n background: linear-gradient(\n 180deg,\n rgba(0, 0, 0, 0.18) 0%,\n rgba(0, 0, 0, 0.05) 100%\n );\n border-radius: var(--wzl-radius-pill);\n /* Clip segments to the track outline so interior corners read crisp and\n the selected segment's glass treatment doesn't paint over the rounded\n outer pixels. */\n overflow: hidden;\n box-shadow:\n inset 0 1px 2px rgba(0, 0, 0, 0.4),\n 0 1px 0 rgba(255, 255, 255, 0.06);\n user-select: none;\n -webkit-user-select: none;\n touch-action: none;\n}\n\n.segment {\n position: relative;\n flex: 1 1 0;\n min-width: 0;\n /* The track's stretch sizes a segment; without this, labkit's :where(button) height wins and overflows a small bar. */\n height: auto;\n padding: 0 var(--wzl-space-6);\n display: inline-flex;\n align-items: center;\n justify-content: center;\n background: transparent;\n border: none;\n margin: 0;\n font-family: var(--wzl-font-ui);\n font-weight: var(--wzl-font-weight-normal);\n font-size: var(--btn-fontsize, var(--wzl-font-size));\n line-height: 1;\n color: var(--wzl-fg-muted);\n cursor: pointer;\n /* Only round the outer corners of the bar — middle segments stay square\n so the seams between them don't render as facing parentheses. */\n border-radius: 0;\n isolation: isolate;\n overflow: hidden;\n transition: color var(--wzl-motion-fast);\n}\n\n.segment:first-child {\n border-radius: var(--wzl-radius-pill) 0 0 var(--wzl-radius-pill);\n}\n\n.segment:last-child {\n border-radius: 0 var(--wzl-radius-pill) var(--wzl-radius-pill) 0;\n}\n\n.segment:only-child {\n border-radius: var(--wzl-radius-pill);\n}\n\n.segment:focus-visible {\n outline: 2px solid var(--wzl-accent);\n outline-offset: -2px;\n}\n\n.segment:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.segment:hover:not(:disabled):not(.segmentSelected) {\n color: var(--wzl-fg);\n}\n\n/* Selected segment — full Aqua glass cylinder. Mirrors Button.variant_primary. */\n.segmentSelected {\n background: linear-gradient(\n 180deg,\n color-mix(in srgb, var(--wzl-accent) var(--btn-top-alpha, 45%), transparent) 0%,\n color-mix(in srgb, var(--wzl-accent) var(--btn-upper-alpha, 70%), transparent) calc(var(--btn-equator, 52%) - var(--btn-equator-spread, 12%)),\n color-mix(in srgb, var(--wzl-accent) var(--btn-equator-tint, 95%), white) var(--btn-equator, 52%),\n var(--wzl-accent) calc(var(--btn-equator, 52%) + var(--btn-equator-spread, 12%) * 1.6),\n color-mix(in srgb, var(--wzl-accent) var(--btn-base-tint, 70%), black) 100%\n );\n backdrop-filter: blur(var(--btn-blur, 6px)) saturate(var(--btn-saturate, 1.3));\n -webkit-backdrop-filter: blur(var(--btn-blur, 6px)) saturate(var(--btn-saturate, 1.3));\n color: var(--wzl-fg-on-accent);\n text-shadow:\n 0 1px 0 rgba(0, 0, 0, var(--btn-text-shadow, 0.35)),\n var(--btn-text-inset-x, 0px) var(--btn-text-inset-y, 1px) 0 rgba(0, 0, 0, var(--btn-text-inset, 0.55)),\n 0 0 6px rgba(0, 0, 0, calc(var(--btn-text-shadow, 0.35) * 0.5));\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, var(--btn-inset-hi, 0.42)),\n inset 0 -1px 2px rgba(0, 0, 0, var(--btn-inset-lo, 0.3)),\n 0 0 0 1px rgba(0, 0, 0, var(--btn-rim, 0.22)),\n 0 1px 2px rgba(0, 0, 0, var(--btn-drop-near, 0.3)),\n 0 2px 4px rgba(0, 0, 0, calc(var(--btn-drop-far, 0.18) * 0.8));\n}\n\n/* Specular gloss on the selected segment. Top corners inherit the\n segment's radius so they hug the upper edge cleanly; bottom corners\n are flattened so the gloss ends in a straight line at the equator\n instead of two little curves that read as `)(` brackets. */\n.segmentSelected::before {\n content: '';\n position: absolute;\n inset: 1px 1px var(--btn-gloss-bottom, 50%) 1px;\n border-radius: inherit;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n background: linear-gradient(\n 180deg,\n rgba(255, 255, 255, var(--btn-gloss-top, 0.42)) 0%,\n rgba(255, 255, 255, var(--btn-gloss-mid, 0.12)) 60%,\n rgba(255, 255, 255, 0) 100%\n );\n pointer-events: none;\n z-index: 1;\n}\n\n.segmentSelected > * {\n position: relative;\n z-index: 2;\n}\n\n/* Small variant — ~60% of the default height, with proportionally reduced\n padding and font. Sized for dense surfaces (lab control panels, inline\n filters, etc.). */\n.size_sm {\n height: 17px;\n padding: 1px;\n}\n\n.size_sm .segment {\n padding: 0 var(--wzl-space-4);\n font-size: var(--wzl-font-size-sm);\n}\n\n/* Minimal variant — strips the pill track, glass selected state, inset\n shadows, and outer padding. Used in dense diagnostic surfaces (dispatch\n trace, lab inspectors) where the bar must read as plain text controls. */\n.variant_minimal {\n height: auto;\n padding: 0;\n background: none;\n border-radius: 0;\n box-shadow: none;\n gap: var(--wzl-space-1);\n}\n\n.variant_minimal .segment {\n padding: 0 var(--wzl-space-2);\n font-size: var(--wzl-font-size-sm);\n font-weight: var(--wzl-font-weight-medium);\n line-height: 1.4;\n border-radius: var(--wzl-radius-sm);\n color: var(--wzl-fg-muted);\n transition: none;\n}\n\n.variant_minimal .segment:first-child,\n.variant_minimal .segment:last-child,\n.variant_minimal .segment:only-child {\n border-radius: var(--wzl-radius-sm);\n}\n\n.variant_minimal .segment:hover:not(:disabled):not(.segmentSelected) {\n color: var(--wzl-fg);\n background: var(--wzl-surface-hover);\n}\n\n.variant_minimal .segmentSelected {\n background: none;\n backdrop-filter: none;\n -webkit-backdrop-filter: none;\n color: var(--wzl-accent-fg, var(--wzl-accent));\n text-shadow: none;\n box-shadow: none;\n font-weight: var(--wzl-font-weight-medium);\n}\n\n.variant_minimal .segmentSelected::before {\n content: none;\n}\n"],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"snap-CEjuWOhN.js","names":[],"sources":["../../src/snap.ts"],"sourcesContent":["/** How close, in screen pixels, a drag has to come to a candidate to snap to it. */\nexport const SNAP_RADIUS_PX = 6;\n\n/** Snap `value` to the nearest candidate within `tolerance`, else return it. */\nexport function snapToNearest(value: number, candidates: readonly number[], tolerance: number): number {\n let best = value;\n let bestDist = tolerance;\n for (const c of candidates) {\n const d = Math.abs(c - value);\n if (d <= bestDist) {\n best = c;\n bestDist = d;\n }\n }\n return best;\n}\n"],"mappings":";AAIA,SAAgB,EAAc,GAAe,GAA+B,GAA2B;CACrG,IAAI,IAAO,GACP,IAAW;AACf,MAAK,IAAM,KAAK,GAAY;EAC1B,IAAM,IAAI,KAAK,IAAI,IAAI,EAAM;AAC7B,EAAI,KAAK,MACP,IAAO,GACP,IAAW;;AAGf,QAAO"}
@@ -1,102 +0,0 @@
1
- import { startThresholdDrag as e } from "@weasel-js/core";
2
- import { useCallback as t, useEffect as n, useRef as r, useState as i } from "react";
3
- //#region src/useReorderDragList.ts
4
- function a(e, t) {
5
- let n = 0;
6
- for (let r = t - 1; r >= 0; r--) if (e[r]?.locked) {
7
- n = r + 1;
8
- break;
9
- }
10
- let r = e.length;
11
- for (let n = t + 1; n < e.length; n++) if (e[n]?.locked) {
12
- r = n;
13
- break;
14
- }
15
- return [n, r];
16
- }
17
- function o(e, t, n) {
18
- let r = t.map((t) => e.findIndex((e) => e.id === t)).filter((e) => e >= 0).sort((e, t) => e - t), i = r.length > 0 && r.every((e, t) => {
19
- if (t === 0) return !0;
20
- let n = r[t - 1];
21
- return n !== void 0 && e === n + 1;
22
- }), a = r[0], o = r[r.length - 1];
23
- return i && a !== void 0 && o !== void 0 && n >= a && n <= o + 1;
24
- }
25
- function s(s) {
26
- let c = r(s);
27
- c.current = s;
28
- let l = r(null), u = r(null), [d, f] = i({
29
- draggedIds: null,
30
- targetIndex: null
31
- });
32
- n(() => () => {
33
- u.current?.cancel();
34
- }, []);
35
- let p = t((e, t) => {
36
- let [n, r] = a(c.current.items, t), i = l.current;
37
- if (!i) return n;
38
- let o = Array.from(i.children), s = o.length;
39
- for (let t = 0; t < o.length; t++) {
40
- let n = o[t];
41
- if (n && e < n.getBoundingClientRect().bottom) {
42
- s = t;
43
- break;
44
- }
45
- }
46
- return Math.max(n, Math.min(s, r));
47
- }, []), m = t((e) => {
48
- l.current = e;
49
- }, []), h = t(() => {
50
- u.current = null, f({
51
- draggedIds: null,
52
- targetIndex: null
53
- });
54
- }, []), g = t((t, n, r) => {
55
- let i = l.current;
56
- if (!i || u.current) return;
57
- let s = {
58
- shiftKey: r.shiftKey,
59
- ctrlKey: r.ctrlKey,
60
- metaKey: r.metaKey,
61
- altKey: r.altKey
62
- }, d = [], m = 0;
63
- u.current = e(r, {
64
- origin: i,
65
- threshold: c.current.items[n]?.locked ? Infinity : c.current.threshold ?? 4,
66
- onActivate: (e) => {
67
- let r = c.current.selectedIds, [i, o] = a(c.current.items, n);
68
- d = (r.includes(t) ? [...r] : [t]).filter((e) => {
69
- let t = c.current.items.findIndex((t) => t.id === e);
70
- return t >= i && t < o;
71
- }), m = p(e.clientY, n), f({
72
- draggedIds: d,
73
- targetIndex: m
74
- });
75
- },
76
- onMove: (e) => {
77
- let t = p(e.clientY, n);
78
- t !== m && (m = t, f({
79
- draggedIds: d,
80
- targetIndex: m
81
- }));
82
- },
83
- onCommit: (e) => {
84
- let t = p(e.clientY, n);
85
- o(c.current.items, d, t) || c.current.onReorder(d, t), h();
86
- },
87
- onClick: () => {
88
- c.current.onPress?.(t, s), h();
89
- },
90
- onCancel: h
91
- });
92
- }, [p, h]);
93
- return {
94
- rowProps: (e, t) => ({ onPointerDown: (n) => g(e, t, n) }),
95
- containerProps: { ref: m },
96
- state: d
97
- };
98
- }
99
- //#endregion
100
- export { s as t };
101
-
102
- //# sourceMappingURL=useReorderDragList-CSQGd7zQ.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useReorderDragList-CSQGd7zQ.js","names":[],"sources":["../../src/useReorderDragList.ts"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react';\nimport type { ReactNode, PointerEvent as ReactPointerEvent, RefCallback } from 'react';\nimport { startThresholdDrag, type ThresholdDragHandle } from '@weasel-js/core';\n\n/** One row in a reorderable list. */\nexport interface LayerListItem {\n id: string;\n label: ReactNode;\n /** Locked rows cannot be dragged, cannot be crossed by drops, and\n * never combine with other rows in a multi-selection. */\n locked?: boolean;\n /** Optional color swatch rendered before the label. Any CSS color string. */\n swatch?: string;\n}\n\n/**\n * Options for {@link useReorderDragList}. `onReorder` receives the dragged ids\n * and the index they were dropped at, measured against the pre-drag `items`.\n */\nexport interface UseReorderDragListOptions {\n items: LayerListItem[];\n selectedIds: string[];\n onReorder(ids: string[], targetIndex: number): void;\n /** A press that was released without ever engaging a drag — the click a\n * list row means by it. Fires for locked rows too, which can be selected\n * but not dragged. Modifiers are read at press, not at release. */\n onPress?(id: string, mods: PressModifiers): void;\n /** Pointer-move distance (px) before pending drag engages. Default 4. */\n threshold?: number;\n}\n\n/** Modifier keys held when a press began. */\nexport interface PressModifiers {\n shiftKey: boolean;\n ctrlKey: boolean;\n metaKey: boolean;\n altKey: boolean;\n}\n\n/**\n * Live drag state for rendering feedback: which ids are being dragged and the\n * insertion index the drop would use. Both `null` when no drag is engaged.\n */\nexport interface ReorderDragState {\n draggedIds: string[] | null;\n targetIndex: number | null;\n}\n\n/**\n * A `ref` for the list container, an `onPointerDown` for each row, and the\n * live {@link ReorderDragState}. The container ref is required, not optional\n * decoration: it is what the drop index is measured against and what the\n * pointer session is opened on.\n */\nexport interface ReorderDragHandlers {\n rowProps(id: string, index: number): { onPointerDown(e: ReactPointerEvent): void };\n containerProps: {\n ref: RefCallback<HTMLElement>;\n };\n state: ReorderDragState;\n}\n\n/**\n * The half-open run of indices a row at `sourceIndex` may be dropped into:\n * bounded by the nearest locked row above and below it, so a locked row is a\n * wall in both directions rather than a global ceiling.\n */\nfunction unlockedSegment(items: readonly LayerListItem[], sourceIndex: number): [number, number] {\n let lo = 0;\n for (let i = sourceIndex - 1; i >= 0; i--) {\n if (items[i]?.locked) { lo = i + 1; break; }\n }\n let hi = items.length;\n for (let i = sourceIndex + 1; i < items.length; i++) {\n if (items[i]?.locked) { hi = i; break; }\n }\n return [lo, hi];\n}\n\n/** Would dropping `draggedIds` at `targetIndex` leave a contiguous block where it already is? */\nfunction isNoopDrop(items: readonly LayerListItem[], draggedIds: readonly string[], targetIndex: number): boolean {\n const indices = draggedIds\n .map((id) => items.findIndex((it) => it.id === id))\n .filter((i) => i >= 0)\n .sort((a, b) => a - b);\n const contiguous =\n indices.length > 0 &&\n indices.every((v, i) => {\n if (i === 0) return true;\n const prev = indices[i - 1];\n return prev !== undefined && v === prev + 1;\n });\n const first = indices[0];\n const last = indices[indices.length - 1];\n return contiguous\n && first !== undefined\n && last !== undefined\n && targetIndex >= first\n && targetIndex <= last + 1;\n}\n\n/**\n * Drag-to-reorder for a vertical list of rows. Dragging a row that is part of\n * the current selection drags the whole selection; dragging any other row\n * drags just that row. Locked rows can neither be dragged nor crossed by a\n * drop. A drop that would leave a contiguous block where it already is does\n * not call `onReorder`.\n *\n * A press opens a `startThresholdDrag` on the *container*, which owns the\n * rest of the gesture: a drag that leaves the list still tracks, a release\n * anywhere still drops, and a release the window never delivered still ends\n * the drag. The container is the origin rather than the row because rows come\n * and go as the list re-renders, and a drag must outlive the row it grabbed.\n */\nexport function useReorderDragList(opts: UseReorderDragListOptions): ReorderDragHandlers {\n const optsRef = useRef(opts);\n optsRef.current = opts;\n const containerRef = useRef<HTMLElement | null>(null);\n const dragRef = useRef<ThresholdDragHandle | null>(null);\n const [state, setState] = useState<ReorderDragState>({ draggedIds: null, targetIndex: null });\n\n useEffect(() => () => { dragRef.current?.cancel(); }, []);\n\n const computeTargetIndex = useCallback((clientY: number, sourceIndex: number): number => {\n const [lo, hi] = unlockedSegment(optsRef.current.items, sourceIndex);\n const c = containerRef.current;\n if (!c) return lo;\n const rows = Array.from(c.children) as HTMLElement[];\n let raw = rows.length;\n for (let i = 0; i < rows.length; i++) {\n const row = rows[i];\n if (!row) continue;\n const r = row.getBoundingClientRect();\n if (clientY < r.bottom) { raw = i; break; }\n }\n return Math.max(lo, Math.min(raw, hi));\n }, []);\n\n const refCb = useCallback<RefCallback<HTMLElement>>((el) => {\n containerRef.current = el;\n }, []);\n\n const reset = useCallback(() => {\n dragRef.current = null;\n setState({ draggedIds: null, targetIndex: null });\n }, []);\n\n const onPointerDownRow = useCallback((id: string, index: number, e: ReactPointerEvent) => {\n const container = containerRef.current;\n if (!container || dragRef.current) return;\n\n const mods: PressModifiers = {\n shiftKey: e.shiftKey, ctrlKey: e.ctrlKey, metaKey: e.metaKey, altKey: e.altKey,\n };\n let draggedIds: string[] = [];\n let targetIndex = 0;\n\n dragRef.current = startThresholdDrag(e, {\n origin: container,\n // A locked row still opens a drag so its release reaches `onPress`, and\n // a threshold nothing can cross is what keeps it from ever engaging.\n threshold: optsRef.current.items[index]?.locked\n ? Number.POSITIVE_INFINITY\n : (optsRef.current.threshold ?? 4),\n onActivate: (ev) => {\n const selected = optsRef.current.selectedIds;\n const [lo, hi] = unlockedSegment(optsRef.current.items, index);\n draggedIds = (selected.includes(id) ? [...selected] : [id]).filter((x) => {\n const i = optsRef.current.items.findIndex((it) => it.id === x);\n return i >= lo && i < hi;\n });\n targetIndex = computeTargetIndex(ev.clientY, index);\n setState({ draggedIds, targetIndex });\n },\n onMove: (ev) => {\n const next = computeTargetIndex(ev.clientY, index);\n if (next === targetIndex) return;\n targetIndex = next;\n setState({ draggedIds, targetIndex });\n },\n onCommit: (ev) => {\n const drop = computeTargetIndex(ev.clientY, index);\n if (!isNoopDrop(optsRef.current.items, draggedIds, drop)) {\n optsRef.current.onReorder(draggedIds, drop);\n }\n reset();\n },\n onClick: () => {\n optsRef.current.onPress?.(id, mods);\n reset();\n },\n // Every cancel reason — the browser's, a lost capture, an unmount —\n // says the gesture was interrupted rather than aimed, so the rows stay\n // where they were.\n onCancel: reset,\n });\n }, [computeTargetIndex, reset]);\n\n return {\n rowProps: (id, index) => ({\n onPointerDown: (e) => onPointerDownRow(id, index, e),\n }),\n containerProps: {\n ref: refCb,\n },\n state,\n };\n}\n"],"mappings":";;;AAmEA,SAAS,EAAgB,GAAiC,GAAuC;CAC/F,IAAI,IAAK;AACT,MAAK,IAAI,IAAI,IAAc,GAAG,KAAK,GAAG,IACpC,KAAI,EAAM,IAAI,QAAQ;AAAE,MAAK,IAAI;AAAG;;CAEtC,IAAI,IAAK,EAAM;AACf,MAAK,IAAI,IAAI,IAAc,GAAG,IAAI,EAAM,QAAQ,IAC9C,KAAI,EAAM,IAAI,QAAQ;AAAE,MAAK;AAAG;;AAElC,QAAO,CAAC,GAAI,EAAG;;AAIjB,SAAS,EAAW,GAAiC,GAA+B,GAA8B;CAChH,IAAM,IAAU,EACb,KAAK,MAAO,EAAM,WAAW,MAAO,EAAG,OAAO,EAAG,CAAC,CAClD,QAAQ,MAAM,KAAK,EAAE,CACrB,MAAM,GAAG,MAAM,IAAI,EAAE,EAClB,IACJ,EAAQ,SAAS,KACjB,EAAQ,OAAO,GAAG,MAAM;AACtB,MAAI,MAAM,EAAG,QAAO;EACpB,IAAM,IAAO,EAAQ,IAAI;AACzB,SAAO,MAAS,KAAA,KAAa,MAAM,IAAO;GAC1C,EACE,IAAQ,EAAQ,IAChB,IAAO,EAAQ,EAAQ,SAAS;AACtC,QAAO,KACF,MAAU,KAAA,KACV,MAAS,KAAA,KACT,KAAe,KACf,KAAe,IAAO;;AAgB7B,SAAgB,EAAmB,GAAsD;CACvF,IAAM,IAAU,EAAO,EAAK;AAC5B,GAAQ,UAAU;CAClB,IAAM,IAAe,EAA2B,KAAK,EAC/C,IAAU,EAAmC,KAAK,EAClD,CAAC,GAAO,KAAY,EAA2B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C,EAAG,EAAE,QAAQ,MAAM;KACxE,IAAM,IAAI,EAAQ,QAAQ,MAAM,WAAW,MAAO,EAAG,OAAO,EAAE;AAC9D,YAAO,KAAK,KAAM,IAAI;MACtB,EACF,IAAc,EAAmB,EAAG,SAAS,EAAM,EACnD,EAAS;KAAE;KAAY;KAAa,CAAC;;GAEvC,SAAS,MAAO;IACd,IAAM,IAAO,EAAmB,EAAG,SAAS,EAAM;AAC9C,UAAS,MACb,IAAc,GACd,EAAS;KAAE;KAAY;KAAa,CAAC;;GAEvC,WAAW,MAAO;IAChB,IAAM,IAAO,EAAmB,EAAG,SAAS,EAAM;AAIlD,IAHK,EAAW,EAAQ,QAAQ,OAAO,GAAY,EAAK,IACtD,EAAQ,QAAQ,UAAU,GAAY,EAAK,EAE7C,GAAO;;GAET,eAAe;AAEb,IADA,EAAQ,QAAQ,UAAU,GAAI,EAAK,EACnC,GAAO;;GAKT,UAAU;GACX,CAAC;IACD,CAAC,GAAoB,EAAM,CAAC;AAE/B,QAAO;EACL,WAAW,GAAI,OAAW,EACxB,gBAAgB,MAAM,EAAiB,GAAI,GAAO,EAAE,EACrD;EACD,gBAAgB,EACd,KAAK,GACN;EACD;EACD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useRovingTabIndex-Dkpf_KhN.js","names":[],"sources":["../../src/useRovingTabIndex.ts"],"sourcesContent":["import { useRef, type KeyboardEvent as ReactKeyboardEvent, type RefObject } from 'react';\n\n/** The only thing the hook needs to know about a bar's items: which are\n * skipped by arrow navigation. */\nexport type RovingItem = { disabled?: boolean };\n\n/** Options for {@link useRovingTabIndex}. */\nexport type UseRovingTabIndexOptions = {\n /** In the same order as the elements carrying `itemClassName`. */\n items: readonly RovingItem[];\n /** Class on the focusable element of each item, inside the container the\n * returned `rootRef` is attached to. Their DOM order must match `items`. */\n itemClassName: string;\n /** Index that carries `tabIndex=0`. Defaults to the first enabled item; a\n * radiogroup-style bar passes its selected index so Tab lands on the\n * current value. */\n tabStopIndex?: number;\n /** Called with the new index as arrow/Home/End focus moves, before focus\n * moves. This is where a selection-follows-focus bar commits the value. */\n onNavigate?: (index: number) => void;\n /** Space/Enter on the item at `index`. When omitted the keypress is left\n * alone, which on a native `<button>` produces an ordinary click. */\n onActivate?: (index: number) => void;\n};\n\n/**\n * What {@link useRovingTabIndex} returns: a container ref plus the per-item\n * `tabIndex` and `onKeyDown` values to spread onto each item.\n */\nexport type RovingTabIndex<T extends HTMLElement = HTMLDivElement> = {\n /** Attach to the container element that holds the items. */\n rootRef: RefObject<T | null>;\n /** `tabIndex` value for the item at `index`. */\n tabIndexFor: (index: number) => 0 | -1;\n /** `onKeyDown` for the item at `index`. */\n onKeyDown: (index: number) => (e: ReactKeyboardEvent<HTMLElement>) => void;\n};\n\nfunction firstEnabledIndex(items: readonly RovingItem[]): number {\n for (let i = 0; i < items.length; i++) if (!items[i].disabled) return i;\n return -1;\n}\n\nfunction lastEnabledIndex(items: readonly RovingItem[]): number {\n for (let i = items.length - 1; i >= 0; i--) if (!items[i].disabled) return i;\n return -1;\n}\n\nfunction nextEnabledIndex(items: readonly RovingItem[], from: number): number {\n const n = items.length;\n for (let k = 1; k <= n; k++) {\n const i = (from + k + n) % n;\n if (!items[i].disabled) return i;\n }\n return from;\n}\n\nfunction prevEnabledIndex(items: readonly RovingItem[], from: number): number {\n const n = items.length;\n for (let k = 1; k <= n; k++) {\n const i = (from - k + n) % n;\n if (!items[i].disabled) return i;\n }\n return from;\n}\n\n/**\n * Roving tabindex for a bar of items: one item is in the tab order, and the\n * arrow keys move focus among the rest, skipping disabled ones and wrapping\n * at both ends. Home and End go to the first and last enabled item. Both axes\n * navigate, so the same bar works laid out either way.\n *\n * Backs `ActionsBar`, `OptionsBar`, and `ToggleBar`.\n *\n * **When a bar should not use this.** What decides it is the items, not who\n * owns them. A container of compound controls — a number field, a select, a\n * color field — must leave the arrow keys alone, because those controls edit\n * their own value with them; taking the arrows over would break the control\n * to navigate between controls. `ToolOptionsBar` is that case: it draws its\n * own controls from a tool's schema now rather than taking arbitrary\n * children, and a schema-drawn number field eats arrows exactly as a\n * hand-placed one did, so it keeps plain DOM tab order. A bar whose items are\n * all simple buttons is the case this hook is for.\n *\n * With every item disabled there is no tab stop and the bar drops out of the\n * tab order entirely.\n */\nexport function useRovingTabIndex<T extends HTMLElement = HTMLDivElement>(\n options: UseRovingTabIndexOptions,\n): RovingTabIndex<T> {\n const { items, itemClassName, onNavigate, onActivate } = options;\n const rootRef = useRef<T | null>(null);\n\n const tabStopIndex = options.tabStopIndex ?? firstEnabledIndex(items);\n\n const focusItem = (index: number): void => {\n const root = rootRef.current;\n if (!root) return;\n const elements = root.querySelectorAll<HTMLElement>(`.${itemClassName}`);\n elements[index]?.focus();\n };\n\n const onKeyDown = (index: number) => (e: ReactKeyboardEvent<HTMLElement>): void => {\n let nextIndex = -1;\n switch (e.key) {\n case 'ArrowLeft':\n case 'ArrowUp':\n nextIndex = prevEnabledIndex(items, index);\n break;\n case 'ArrowRight':\n case 'ArrowDown':\n nextIndex = nextEnabledIndex(items, index);\n break;\n case 'Home':\n nextIndex = firstEnabledIndex(items);\n break;\n case 'End':\n nextIndex = lastEnabledIndex(items);\n break;\n case ' ':\n case 'Enter':\n if (onActivate) {\n e.preventDefault();\n onActivate(index);\n }\n return;\n default:\n return;\n }\n if (nextIndex < 0 || nextIndex === index) return;\n e.preventDefault();\n onNavigate?.(nextIndex);\n focusItem(nextIndex);\n };\n\n return {\n rootRef,\n tabIndexFor: (index: number) => (index === tabStopIndex ? 0 : -1),\n onKeyDown,\n };\n}\n"],"mappings":";;AAsCA,SAAS,EAAkB,GAAsC;AAC/D,MAAK,IAAI,IAAI,GAAG,IAAI,EAAM,QAAQ,IAAK,KAAI,CAAC,EAAM,GAAG,SAAU,QAAO;AACtE,QAAO;;AAGT,SAAS,EAAiB,GAAsC;AAC9D,MAAK,IAAI,IAAI,EAAM,SAAS,GAAG,KAAK,GAAG,IAAK,KAAI,CAAC,EAAM,GAAG,SAAU,QAAO;A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an {@link ActionsBar}. `value` is only a React key; the item
4
- * carries no selected state.
5
- */
6
- export type ActionsBarItem<V extends string | number = string> = {
7
- value: V;
8
- label?: ReactNode;
9
- ariaLabel?: string;
10
- disabled?: boolean;
11
- onAction: () => void;
12
- };
13
- /** Segment height and type scale for an {@link ActionsBar}. */
14
- export type ActionsBarSize = 'sm' | 'md';
15
- /** Visual treatment of an {@link ActionsBar}. */
16
- export type ActionsBarVariant = 'default' | 'minimal';
17
- /** Props for {@link ActionsBar}. */
18
- export type ActionsBarProps<V extends string | number = string> = {
19
- items: readonly ActionsBarItem<V>[];
20
- ariaLabel?: string;
21
- className?: string;
22
- height?: number;
23
- size?: ActionsBarSize;
24
- variant?: ActionsBarVariant;
25
- };
26
- /**
27
- * Segmented strip of momentary buttons — each press fires and nothing stays
28
- * selected. Shares the look and the arrow-key navigation of `ToggleBar` and
29
- * `OptionsBar`.
30
- *
31
- * This is a plain callback bar. For buttons driven by the kit's actions
32
- * registry, use `ActionBar` instead.
33
- */
34
- export declare function ActionsBar<V extends string | number = string>(props: ActionsBarProps<V>): ReactElement;
35
- //# sourceMappingURL=ActionsBar.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ActionsBar.d.ts","sourceRoot":"","sources":["../../../src/components/ActionsBar/ActionsBar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAI9E;;;GAGG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,IAAI;IAC/D,KAAK,EAAE,CAAC,CAAC;IACT,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF,+DAA+D;AAC/D,MAAM,MAAM,cAAc,GAAG,IAAI,GAAG,IAAI,CAAC;AACzC,iDAAiD;AACjD,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,SAAS,CAAC;AAEtD,oCAAoC;AACpC,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,IAAI;IAChE,KAAK,EAAE,SAAS,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,OAAO,CAAC,EAAE,iBAAiB,CAAC;CAC7B,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,YAAY,CA8CtG"}
@@ -1,3 +0,0 @@
1
- export { ActionsBar } from './ActionsBar';
2
- export type { ActionsBarItem, ActionsBarProps, ActionsBarSize, ActionsBarVariant } from './ActionsBar';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ActionsBar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC"}
@@ -1,2 +0,0 @@
1
- import { t as e } from "../../chunks/ActionsBar-D84a4eGy.js";
2
- export { e as ActionsBar };
@@ -1,62 +0,0 @@
1
- import { type ReactNode } from 'react';
2
- /** One card in a layer stack: its identity, the label shown when collapsed,
3
- * and the optional select hoisted into its header. */
4
- export interface LayerStackItem {
5
- /** Stable id used for keys, onRemove, onReorder. Numeric to match
6
- * common id-from-nextId conventions; string ids also work. */
7
- id: number | string;
8
- /** Short kind label rendered in the header when no primary select
9
- * is hoisted (e.g. "shadow", "stroke"). Omit it for items that have no
10
- * kind; `label` then names the card. */
11
- kind?: string;
12
- /** Header text, when the item's name is not its kind. Falls back to
13
- * `kind`. */
14
- label?: string;
15
- /** When present, hoist this select into the card header so the user
16
- * can switch mode/shape without expanding. */
17
- primaryValue?: string;
18
- primaryOptions?: string[];
19
- /** Accent CSS color used as the left border / index-badge fill. Sets
20
- * --wzl-layer-stack-accent on the card, which re-binds --wzl-accent
21
- * for everything inside it. */
22
- accent?: string;
23
- /** Optional badge text rendered before the primary control
24
- * (e.g. tail index "1", "2", "3"). When omitted a drag handle
25
- * glyph renders in its place. */
26
- badge?: string;
27
- /** Initial expanded state. Defaults to true for newly-added items. */
28
- defaultExpanded?: boolean;
29
- }
30
- /** Props for `<LayerStack>`. */
31
- export interface LayerStackProps {
32
- /** Heading above the list. Omit it, along with the palette, for a stack
33
- * whose surroundings already name it. */
34
- title?: string;
35
- items: LayerStackItem[];
36
- /** Kinds the user can add via the header palette. Omit both this and
37
- * `onAdd` for a stack the user cannot add to. */
38
- paletteKinds?: string[];
39
- onAdd?: (kind: string) => void;
40
- /** Omit for items the user cannot remove; the card then has no ✕. */
41
- onRemove?: (id: number | string) => void;
42
- onReorder: (orderedIds: Array<number | string>) => void;
43
- /** Required for `primaryValue` to render as a select — without a handler
44
- * the control could not be changed. */
45
- onPrimaryChange?: (id: number | string, nextValue: string) => void;
46
- /** Render the body controls for each item. */
47
- renderBody: (item: LayerStackItem) => ReactNode;
48
- /** Shown in place of the list when `items` is empty. Defaults to a line
49
- * that points at the palette, or a bare one when there is no palette. */
50
- emptyLabel?: ReactNode;
51
- /** Hide the title + palette row (used when an outer wrap renders its
52
- * own head — see speech-balloons Tails panel). */
53
- hideHead?: boolean;
54
- /** Appended to the root element's class list. The module's own class names
55
- * are hashed, so this is the supported way to reach the stack from a
56
- * consumer stylesheet. */
57
- className?: string;
58
- }
59
- /** A drag-reorderable stack of expandable cards, with a palette in the header
60
- * for adding more. The body of each card is the caller's to render. */
61
- export declare function LayerStack({ className, title, items, paletteKinds, onAdd, onRemove, onReorder, onPrimaryChange, renderBody, emptyLabel, hideHead, }: LayerStackProps): import("react/jsx-runtime").JSX.Element;
62
- //# sourceMappingURL=LayerStack.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LayerStack.d.ts","sourceRoot":"","sources":["../../../src/components/LayerStack/LayerStack.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,SAAS,EAAyC,MAAM,OAAO,CAAC;AAMlG;uDACuD;AACvD,MAAM,WAAW,cAAc;IAC7B;mEAC+D;IAC/D,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB;;6CAEyC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;kBACc;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;mDAC+C;IAC/C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B;;oCAEgC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;sCAEkC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sEAAsE;IACtE,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,gCAAgC;AAChC,MAAM,WAAW,eAAe;IAC9B;8CAC0C;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB;sDACkD;IAClD,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,qEAAqE;IACrE,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAC;IACzC,SAAS,EAAE,CAAC,UAAU,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,KAAK,IAAI,CAAC;IACxD;4CACwC;IACxC,eAAe,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACnE,8CAA8C;IAC9C,UAAU,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,SAAS,CAAC;IAChD;8EAC0E;IAC1E,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB;uDACmD;IACnD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;+BAE2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;wEACwE;AACxE,wBAAgB,UAAU,CAAC,EACzB,SAAS,EACT,KAAK,EACL,KAAK,EACL,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,SAAS,EACT,eAAe,EACf,UAAU,EACV,UAAU,EACV,QAAQ,GACT,EAAE,eAAe,2CA6JjB"}
@@ -1,2 +0,0 @@
1
- export { LayerStack, type LayerStackItem, type LayerStackProps } from './LayerStack';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/LayerStack/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,cAAc,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC"}
@@ -1,2 +0,0 @@
1
- import { t as e } from "../../chunks/LayerStack-CfQ6GsRz.js";
2
- export { e as LayerStack };