@weasel-js/ui 1.6.1 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (340) hide show
  1. package/dist/chunks/Badge-CTc9Lkwn.js +14 -0
  2. package/dist/chunks/Badge-CTc9Lkwn.js.map +1 -0
  3. package/dist/chunks/{Badge-CyAIZSDo.js → Badge-D2aD7xVL.js} +277 -228
  4. package/dist/chunks/Badge-D2aD7xVL.js.map +1 -0
  5. package/dist/chunks/BandEditor-Dd0egAgE.js +292 -0
  6. package/dist/chunks/BandEditor-Dd0egAgE.js.map +1 -0
  7. package/dist/chunks/{ButtonBar-D5Vi0aj_.js → ButtonBar-DIQTe5GQ.js} +2 -2
  8. package/dist/chunks/{ButtonBar-D5Vi0aj_.js.map → ButtonBar-DIQTe5GQ.js.map} +1 -1
  9. package/dist/chunks/Callout-ndW5_Bqx.js +116 -0
  10. package/dist/chunks/Callout-ndW5_Bqx.js.map +1 -0
  11. package/dist/chunks/CloseButton-C2J7wVfo.js +26 -0
  12. package/dist/chunks/CloseButton-C2J7wVfo.js.map +1 -0
  13. package/dist/chunks/ColorField-Yz_BkcCT.js +69 -0
  14. package/dist/chunks/ColorField-Yz_BkcCT.js.map +1 -0
  15. package/dist/chunks/{ColorModeControl-ke5PXbBa.js → ColorModeControl-BewxA0rX.js} +3 -3
  16. package/dist/chunks/{ColorModeControl-ke5PXbBa.js.map → ColorModeControl-BewxA0rX.js.map} +1 -1
  17. package/dist/chunks/{ComboBox-DpT8lc3p.js → ComboBox-B34H76CW.js} +12 -12
  18. package/dist/chunks/ComboBox-B34H76CW.js.map +1 -0
  19. package/dist/chunks/{CurveEditor-BDJXjEvK.js → CurveEditor-DUVjd25R.js} +2 -2
  20. package/dist/chunks/{CurveEditor-BDJXjEvK.js.map → CurveEditor-DUVjd25R.js.map} +1 -1
  21. package/dist/chunks/{DataGrid-D-dZj1BD.js → DataGrid-LZ2JgY2Y.js} +17 -17
  22. package/dist/chunks/DataGrid-LZ2JgY2Y.js.map +1 -0
  23. package/dist/chunks/DetailList-BKomDzg5.js +52 -0
  24. package/dist/chunks/DetailList-BKomDzg5.js.map +1 -0
  25. package/dist/chunks/{DetentSlider-CL8TlX3S.js → DetentSlider-5uQPFucv.js} +2 -2
  26. package/dist/chunks/{DetentSlider-CL8TlX3S.js.map → DetentSlider-5uQPFucv.js.map} +1 -1
  27. package/dist/chunks/Dialog-DGFutQ--.js +63 -0
  28. package/dist/chunks/Dialog-DGFutQ--.js.map +1 -0
  29. package/dist/chunks/{Disclosure-0G0uh2fa.js → Disclosure-Ch2KxYuB.js} +7 -7
  30. package/dist/chunks/Disclosure-Ch2KxYuB.js.map +1 -0
  31. package/dist/chunks/{DragHandleGlyph-Dr7Fgo0I.js → DragGrip-AoIZXfZb.js} +2 -2
  32. package/dist/chunks/DragGrip-AoIZXfZb.js.map +1 -0
  33. package/dist/chunks/FallthroughDiagram-BEHiM5IS.js +284 -0
  34. package/dist/chunks/FallthroughDiagram-BEHiM5IS.js.map +1 -0
  35. package/dist/chunks/{FontFamilySelect-DXlMKWfK.js → FontFamilySelect-DkRgNtag.js} +2 -2
  36. package/dist/chunks/{FontFamilySelect-DXlMKWfK.js.map → FontFamilySelect-DkRgNtag.js.map} +1 -1
  37. package/dist/chunks/GestureRoute-C_YGl7bJ.js +82 -0
  38. package/dist/chunks/GestureRoute-C_YGl7bJ.js.map +1 -0
  39. package/dist/chunks/GradientEditor-b7v4Ph3i.js +363 -0
  40. package/dist/chunks/GradientEditor-b7v4Ph3i.js.map +1 -0
  41. package/dist/chunks/{Icon-Cgzy8VgC.js → Icon-CcVjdq2C.js} +31 -1
  42. package/dist/chunks/Icon-CcVjdq2C.js.map +1 -0
  43. package/dist/chunks/{InlineRange-eOj6JpJl.js → InlineRange-P01ABSzo.js} +3 -3
  44. package/dist/chunks/InlineRange-P01ABSzo.js.map +1 -0
  45. package/dist/chunks/{Jog-DESxZ44P.js → Jog-DRmfrkCg.js} +3 -3
  46. package/dist/chunks/{Jog-DESxZ44P.js.map → Jog-DRmfrkCg.js.map} +1 -1
  47. package/dist/chunks/{Keycaps-C0H_v2gO.js → Keycaps-C-FJyG8k.js} +14 -14
  48. package/dist/chunks/Keycaps-C-FJyG8k.js.map +1 -0
  49. package/dist/chunks/{LayerList-nz-QYvTF.js → LayerList-wCI1EueM.js} +148 -152
  50. package/dist/chunks/LayerList-wCI1EueM.js.map +1 -0
  51. package/dist/chunks/ListEditor-BeA60TAA.js +71 -0
  52. package/dist/chunks/ListEditor-BeA60TAA.js.map +1 -0
  53. package/dist/chunks/{MenuButton-DtaGenKf.js → MenuButton-BSqEChJE.js} +7 -7
  54. package/dist/chunks/MenuButton-BSqEChJE.js.map +1 -0
  55. package/dist/chunks/{MeshEditor-qqGc6hlD.js → MeshEditor-D1HLZcAh.js} +3 -3
  56. package/dist/chunks/{MeshEditor-qqGc6hlD.js.map → MeshEditor-D1HLZcAh.js.map} +1 -1
  57. package/dist/chunks/NumberField-BnJxcazc.js +206 -0
  58. package/dist/chunks/NumberField-BnJxcazc.js.map +1 -0
  59. package/dist/chunks/{OptionsBar-DbzAgIln.js → OptionsBar-ujxYidhj.js} +2 -2
  60. package/dist/chunks/{OptionsBar-DbzAgIln.js.map → OptionsBar-ujxYidhj.js.map} +1 -1
  61. package/dist/chunks/{PaintField-DaJukRc6.js → PaintField-DadOELMg.js} +2 -2
  62. package/dist/chunks/{PaintField-DaJukRc6.js.map → PaintField-DadOELMg.js.map} +1 -1
  63. package/dist/chunks/PaintInput-v8Y7MDbH.js +121 -0
  64. package/dist/chunks/PaintInput-v8Y7MDbH.js.map +1 -0
  65. package/dist/chunks/{PatternPicker-B-cUt-JT.js → PatternPicker-R_EQtw2Q.js} +2 -2
  66. package/dist/chunks/{PatternPicker-B-cUt-JT.js.map → PatternPicker-R_EQtw2Q.js.map} +1 -1
  67. package/dist/chunks/{PointPlotter-Bxo6haKe.js → PointPlotter-ldI4RrU1.js} +2 -2
  68. package/dist/chunks/{PointPlotter-Bxo6haKe.js.map → PointPlotter-ldI4RrU1.js.map} +1 -1
  69. package/dist/chunks/{Powerline-ExO5GwEr.js → Powerline-DNyH885r.js} +2 -2
  70. package/dist/chunks/{Powerline-ExO5GwEr.js.map → Powerline-DNyH885r.js.map} +1 -1
  71. package/dist/chunks/{Prefs-DpqFKiwY.js → Prefs-ByA-x51i.js} +46 -34
  72. package/dist/chunks/Prefs-ByA-x51i.js.map +1 -0
  73. package/dist/chunks/{Properties-D_KzDN9K.js → Properties-DmAeQ3mk.js} +35 -29
  74. package/dist/chunks/Properties-DmAeQ3mk.js.map +1 -0
  75. package/dist/chunks/PropertyField-DfIJJ5GS.js +673 -0
  76. package/dist/chunks/PropertyField-DfIJJ5GS.js.map +1 -0
  77. package/dist/chunks/{RangeSlider-BKRRTPTZ.js → RangeSlider-SEGE-7VF.js} +8 -8
  78. package/dist/chunks/RangeSlider-SEGE-7VF.js.map +1 -0
  79. package/dist/chunks/{ResizeHandle-BKT0XYpx.js → ResizeHandle-rKVWyeTG.js} +3 -3
  80. package/dist/chunks/ResizeHandle-rKVWyeTG.js.map +1 -0
  81. package/dist/chunks/Select-ClmKtyWg.js +229 -0
  82. package/dist/chunks/Select-ClmKtyWg.js.map +1 -0
  83. package/dist/chunks/SelectionPanel-BaQnX4Bs.js +106 -0
  84. package/dist/chunks/SelectionPanel-BaQnX4Bs.js.map +1 -0
  85. package/dist/chunks/SidebarPanel-BblDEz4G.js +53 -0
  86. package/dist/chunks/SidebarPanel-BblDEz4G.js.map +1 -0
  87. package/dist/chunks/Slider-YofwGOI4.js +389 -0
  88. package/dist/chunks/Slider-YofwGOI4.js.map +1 -0
  89. package/dist/chunks/{StatusBar-DzoPDY4k.js → StatusBar-Ca9Dvhhq.js} +6 -6
  90. package/dist/chunks/StatusBar-Ca9Dvhhq.js.map +1 -0
  91. package/dist/chunks/{SwatchGrid-BARC3rnF.js → SwatchGrid-BYvA8Bmh.js} +3 -3
  92. package/dist/chunks/SwatchGrid-BYvA8Bmh.js.map +1 -0
  93. package/dist/chunks/ThemeSwitcher-BlsInAmR.js +38 -0
  94. package/dist/chunks/ThemeSwitcher-BlsInAmR.js.map +1 -0
  95. package/dist/chunks/{Timeline--58F7MED.js → Timeline-B39cwfMB.js} +207 -203
  96. package/dist/chunks/Timeline-B39cwfMB.js.map +1 -0
  97. package/dist/chunks/{Toast-DNBb-24H.js → Toast-BF9GE0HC.js} +25 -27
  98. package/dist/chunks/Toast-BF9GE0HC.js.map +1 -0
  99. package/dist/chunks/{ToggleBar-DTjGeS0Q.js → ToggleBar-BTYkBXU9.js} +8 -8
  100. package/dist/chunks/ToggleBar-BTYkBXU9.js.map +1 -0
  101. package/dist/chunks/{TokenPanel-CMq7uydV.js → TokenPanel-CMDAOfYH.js} +5 -5
  102. package/dist/chunks/{TokenPanel-CMq7uydV.js.map → TokenPanel-CMDAOfYH.js.map} +1 -1
  103. package/dist/chunks/{ToolButton-CR4sQlxF.js → ToolButton-CAHBa08P.js} +6 -6
  104. package/dist/chunks/ToolButton-CAHBa08P.js.map +1 -0
  105. package/dist/chunks/{ToolOptionsBar-CtzTlaN2.js → ToolOptionsBar-D_GCrBAN.js} +8 -7
  106. package/dist/chunks/ToolOptionsBar-D_GCrBAN.js.map +1 -0
  107. package/dist/chunks/{ToolPalette-CKG9qY6P.js → ToolPalette-OOWN51Xx.js} +3 -3
  108. package/dist/chunks/ToolPalette-OOWN51Xx.js.map +1 -0
  109. package/dist/chunks/{Tree-DVOtc9R5.js → Tree-Cc8lIzgM.js} +2 -2
  110. package/dist/chunks/{Tree-DVOtc9R5.js.map → Tree-Cc8lIzgM.js.map} +1 -1
  111. package/dist/chunks/{createKeyframeLayer-Czj6Y235.js → createKeyframeLayer-DVl321_l.js} +15 -16
  112. package/dist/chunks/createKeyframeLayer-DVl321_l.js.map +1 -0
  113. package/dist/chunks/{icons-Dk8SRS8g.js → icons-BhcR1l64.js} +2 -2
  114. package/dist/chunks/icons-BhcR1l64.js.map +1 -0
  115. package/dist/chunks/{model-Du7Lta4C.js → model-BaF65rnX.js} +95 -90
  116. package/dist/chunks/model-BaF65rnX.js.map +1 -0
  117. package/dist/chunks/{prefField-Dnl7nmjQ.js → prefField-BopW9bjx.js} +17 -13
  118. package/dist/chunks/prefField-BopW9bjx.js.map +1 -0
  119. package/dist/chunks/segmentedControl.module-D6SzYJD7.js +11 -0
  120. package/dist/chunks/segmentedControl.module-D6SzYJD7.js.map +1 -0
  121. package/dist/chunks/{useReorderDragList-B_-5L5Gu.js → useReorderDragList-FCMoFIzH.js} +2 -2
  122. package/dist/chunks/useReorderDragList-FCMoFIzH.js.map +1 -0
  123. package/dist/components/Badge/bases/Powerline.d.ts.map +1 -1
  124. package/dist/components/Badge/bases/edgeProfiles.d.ts +31 -4
  125. package/dist/components/Badge/bases/edgeProfiles.d.ts.map +1 -1
  126. package/dist/components/Badge/index.d.ts +1 -0
  127. package/dist/components/Badge/index.d.ts.map +1 -1
  128. package/dist/components/Badge/index.js +3 -2
  129. package/dist/components/Badge/statusIcons.d.ts +5 -0
  130. package/dist/components/Badge/statusIcons.d.ts.map +1 -0
  131. package/dist/components/BandEditor/BandEditor.d.ts +16 -7
  132. package/dist/components/BandEditor/BandEditor.d.ts.map +1 -1
  133. package/dist/components/BandEditor/bands.d.ts +5 -2
  134. package/dist/components/BandEditor/bands.d.ts.map +1 -1
  135. package/dist/components/BandEditor/index.js +1 -1
  136. package/dist/components/ButtonBar/index.js +1 -1
  137. package/dist/components/Callout/Callout.d.ts +2 -2
  138. package/dist/components/Callout/Callout.d.ts.map +1 -1
  139. package/dist/components/Callout/index.js +1 -1
  140. package/dist/components/CloseButton/CloseButton.d.ts +21 -0
  141. package/dist/components/CloseButton/CloseButton.d.ts.map +1 -0
  142. package/dist/components/CloseButton/index.d.ts +3 -0
  143. package/dist/components/CloseButton/index.d.ts.map +1 -0
  144. package/dist/components/CloseButton/index.js +2 -0
  145. package/dist/components/ColorField/ColorField.d.ts +5 -1
  146. package/dist/components/ColorField/ColorField.d.ts.map +1 -1
  147. package/dist/components/ColorField/index.js +1 -1
  148. package/dist/components/ColorModeControl/index.js +1 -1
  149. package/dist/components/ComboBox/index.js +1 -1
  150. package/dist/components/CurveEditor/index.js +2 -2
  151. package/dist/components/DataGrid/index.js +1 -1
  152. package/dist/components/DetailList/DetailList.d.ts +31 -5
  153. package/dist/components/DetailList/DetailList.d.ts.map +1 -1
  154. package/dist/components/DetailList/index.d.ts +1 -1
  155. package/dist/components/DetailList/index.d.ts.map +1 -1
  156. package/dist/components/DetailList/index.js +1 -1
  157. package/dist/components/DetentSlider/index.js +1 -1
  158. package/dist/components/Dialog/Dialog.d.ts.map +1 -1
  159. package/dist/components/Dialog/index.js +1 -1
  160. package/dist/components/Disclosure/Disclosure.d.ts +1 -1
  161. package/dist/components/Disclosure/index.js +1 -1
  162. package/dist/components/{DragHandleGlyph/DragHandleGlyph.d.ts → DragGrip/DragGrip.d.ts} +4 -4
  163. package/dist/components/DragGrip/DragGrip.d.ts.map +1 -0
  164. package/dist/components/DragGrip/index.d.ts +3 -0
  165. package/dist/components/DragGrip/index.d.ts.map +1 -0
  166. package/dist/components/DragGrip/index.js +2 -0
  167. package/dist/components/FallthroughDiagram/FallthroughDiagram.d.ts +14 -0
  168. package/dist/components/FallthroughDiagram/FallthroughDiagram.d.ts.map +1 -0
  169. package/dist/components/FallthroughDiagram/fixtures.d.ts +17 -0
  170. package/dist/components/FallthroughDiagram/fixtures.d.ts.map +1 -0
  171. package/dist/components/FallthroughDiagram/index.d.ts +3 -0
  172. package/dist/components/FallthroughDiagram/index.d.ts.map +1 -0
  173. package/dist/components/FallthroughDiagram/index.js +2 -0
  174. package/dist/components/FontFamilySelect/index.js +1 -1
  175. package/dist/components/GestureRoute/GestureRoute.d.ts +19 -0
  176. package/dist/components/GestureRoute/GestureRoute.d.ts.map +1 -0
  177. package/dist/components/GestureRoute/index.d.ts +3 -0
  178. package/dist/components/GestureRoute/index.d.ts.map +1 -0
  179. package/dist/components/GestureRoute/index.js +2 -0
  180. package/dist/components/GradientEditor/GradientEditor.d.ts +22 -8
  181. package/dist/components/GradientEditor/GradientEditor.d.ts.map +1 -1
  182. package/dist/components/GradientEditor/index.js +1 -1
  183. package/dist/components/InlineRange/index.js +1 -1
  184. package/dist/components/Jog/index.js +1 -1
  185. package/dist/components/Keycaps/Keycaps.d.ts +11 -5
  186. package/dist/components/Keycaps/Keycaps.d.ts.map +1 -1
  187. package/dist/components/Keycaps/index.d.ts +1 -1
  188. package/dist/components/Keycaps/index.d.ts.map +1 -1
  189. package/dist/components/Keycaps/index.js +1 -1
  190. package/dist/components/LayerList/LayerList.d.ts +1 -1
  191. package/dist/components/LayerList/LayerList.d.ts.map +1 -1
  192. package/dist/components/LayerList/index.js +1 -1
  193. package/dist/components/ListEditor/ListEditor.d.ts.map +1 -1
  194. package/dist/components/ListEditor/index.js +1 -1
  195. package/dist/components/MenuButton/index.js +1 -1
  196. package/dist/components/MeshEditor/index.js +1 -1
  197. package/dist/components/NumberField/UnitField.d.ts +20 -7
  198. package/dist/components/NumberField/UnitField.d.ts.map +1 -1
  199. package/dist/components/NumberField/index.js +1 -1
  200. package/dist/components/OptionsBar/index.js +1 -1
  201. package/dist/components/PaintField/index.js +1 -1
  202. package/dist/components/PaintInput/PaintInput.d.ts.map +1 -1
  203. package/dist/components/PaintInput/index.js +1 -1
  204. package/dist/components/PatternPicker/index.js +1 -1
  205. package/dist/components/PointPlotter/index.js +1 -1
  206. package/dist/components/Powerline/index.d.ts +1 -1
  207. package/dist/components/Powerline/index.d.ts.map +1 -1
  208. package/dist/components/Powerline/index.js +2 -2
  209. package/dist/components/Prefs/PrefsRow.d.ts.map +1 -1
  210. package/dist/components/Prefs/index.d.ts +1 -1
  211. package/dist/components/Prefs/index.d.ts.map +1 -1
  212. package/dist/components/Prefs/index.js +2 -2
  213. package/dist/components/Prefs/prefField.d.ts.map +1 -1
  214. package/dist/components/Prefs/schema.d.ts +2 -2
  215. package/dist/components/Prefs/schema.d.ts.map +1 -1
  216. package/dist/components/Properties/PropertyField.d.ts +22 -30
  217. package/dist/components/Properties/PropertyField.d.ts.map +1 -1
  218. package/dist/components/Properties/PropertyGroup.d.ts.map +1 -1
  219. package/dist/components/Properties/PropertyPanel.d.ts +1 -8
  220. package/dist/components/Properties/PropertyPanel.d.ts.map +1 -1
  221. package/dist/components/Properties/index.d.ts +1 -1
  222. package/dist/components/Properties/index.d.ts.map +1 -1
  223. package/dist/components/Properties/index.js +2 -2
  224. package/dist/components/RangeSlider/index.js +1 -1
  225. package/dist/components/ResizeHandle/index.js +1 -1
  226. package/dist/components/Select/Select.d.ts.map +1 -1
  227. package/dist/components/Select/index.js +1 -1
  228. package/dist/components/SelectionPanel/SelectionPanel.d.ts.map +1 -1
  229. package/dist/components/SelectionPanel/index.js +2 -2
  230. package/dist/components/SelectionPanel/renderLeaf.d.ts +7 -0
  231. package/dist/components/SelectionPanel/renderLeaf.d.ts.map +1 -1
  232. package/dist/components/SidebarPanel/SidebarPanel.d.ts +1 -1
  233. package/dist/components/SidebarPanel/SidebarPanel.d.ts.map +1 -1
  234. package/dist/components/SidebarPanel/index.js +1 -1
  235. package/dist/components/Slider/Slider.d.ts +19 -2
  236. package/dist/components/Slider/Slider.d.ts.map +1 -1
  237. package/dist/components/Slider/index.js +1 -1
  238. package/dist/components/StatusBar/index.js +1 -1
  239. package/dist/components/SwatchGrid/index.js +1 -1
  240. package/dist/components/ThemeSwitcher/ThemeSwitcher.d.ts +38 -0
  241. package/dist/components/ThemeSwitcher/ThemeSwitcher.d.ts.map +1 -0
  242. package/dist/components/ThemeSwitcher/index.d.ts +3 -0
  243. package/dist/components/ThemeSwitcher/index.d.ts.map +1 -0
  244. package/dist/components/ThemeSwitcher/index.js +2 -0
  245. package/dist/components/Timeline/Transport.d.ts.map +1 -1
  246. package/dist/components/Timeline/index.js +1 -1
  247. package/dist/components/Toast/Toast.d.ts.map +1 -1
  248. package/dist/components/Toast/index.js +1 -1
  249. package/dist/components/ToggleBar/index.js +1 -1
  250. package/dist/components/TokenPanel/index.js +1 -1
  251. package/dist/components/ToolButton/index.js +1 -1
  252. package/dist/components/ToolOptionsBar/index.js +1 -1
  253. package/dist/components/ToolPalette/ToolPalette.d.ts +2 -1
  254. package/dist/components/ToolPalette/ToolPalette.d.ts.map +1 -1
  255. package/dist/components/ToolPalette/index.js +1 -1
  256. package/dist/components/Tree/index.js +1 -1
  257. package/dist/components/spin.d.ts +16 -0
  258. package/dist/components/spin.d.ts.map +1 -0
  259. package/dist/components/stanceSurfaces.d.ts.map +1 -1
  260. package/dist/icons/index.d.ts +0 -2
  261. package/dist/icons/index.d.ts.map +1 -1
  262. package/dist/icons/paths.d.ts +10 -0
  263. package/dist/icons/paths.d.ts.map +1 -1
  264. package/dist/index.d.ts +5 -2
  265. package/dist/index.d.ts.map +1 -1
  266. package/dist/index.js +83 -99
  267. package/dist/index.js.map +1 -1
  268. package/dist/paintGradientTrack.d.ts +5 -2
  269. package/dist/paintGradientTrack.d.ts.map +1 -1
  270. package/dist/style.css +1 -1
  271. package/dist/useReorderDragList.d.ts +1 -1
  272. package/dist/useReorderDragList.d.ts.map +1 -1
  273. package/package.json +9 -8
  274. package/dist/chunks/Badge-CyAIZSDo.js.map +0 -1
  275. package/dist/chunks/BandEditor-Dhm_Xrlr.js +0 -248
  276. package/dist/chunks/BandEditor-Dhm_Xrlr.js.map +0 -1
  277. package/dist/chunks/Callout-yEn9iPlh.js +0 -119
  278. package/dist/chunks/Callout-yEn9iPlh.js.map +0 -1
  279. package/dist/chunks/ColorField-BcMcW8Sa.js +0 -60
  280. package/dist/chunks/ColorField-BcMcW8Sa.js.map +0 -1
  281. package/dist/chunks/ComboBox-DpT8lc3p.js.map +0 -1
  282. package/dist/chunks/DataGrid-D-dZj1BD.js.map +0 -1
  283. package/dist/chunks/DetailList-BMER1LUZ.js +0 -43
  284. package/dist/chunks/DetailList-BMER1LUZ.js.map +0 -1
  285. package/dist/chunks/Dialog-BWyNMgpf.js +0 -66
  286. package/dist/chunks/Dialog-BWyNMgpf.js.map +0 -1
  287. package/dist/chunks/Disclosure-0G0uh2fa.js.map +0 -1
  288. package/dist/chunks/DragHandleGlyph-Dr7Fgo0I.js.map +0 -1
  289. package/dist/chunks/GradientEditor-B3a-MsVJ.js +0 -335
  290. package/dist/chunks/GradientEditor-B3a-MsVJ.js.map +0 -1
  291. package/dist/chunks/Icon-Cgzy8VgC.js.map +0 -1
  292. package/dist/chunks/InlineRange-eOj6JpJl.js.map +0 -1
  293. package/dist/chunks/Keycaps-C0H_v2gO.js.map +0 -1
  294. package/dist/chunks/LayerList-nz-QYvTF.js.map +0 -1
  295. package/dist/chunks/ListEditor-BQ6AV3Ac.js +0 -74
  296. package/dist/chunks/ListEditor-BQ6AV3Ac.js.map +0 -1
  297. package/dist/chunks/MenuButton-DtaGenKf.js.map +0 -1
  298. package/dist/chunks/NumberField-CwJOMmQR.js +0 -117
  299. package/dist/chunks/NumberField-CwJOMmQR.js.map +0 -1
  300. package/dist/chunks/PaintInput-Byhna3H-.js +0 -131
  301. package/dist/chunks/PaintInput-Byhna3H-.js.map +0 -1
  302. package/dist/chunks/Prefs-DpqFKiwY.js.map +0 -1
  303. package/dist/chunks/Properties-D_KzDN9K.js.map +0 -1
  304. package/dist/chunks/PropertyField-DGCecAnV.js +0 -758
  305. package/dist/chunks/PropertyField-DGCecAnV.js.map +0 -1
  306. package/dist/chunks/RangeSlider-BKRRTPTZ.js.map +0 -1
  307. package/dist/chunks/ResizeHandle-BKT0XYpx.js.map +0 -1
  308. package/dist/chunks/Select-CzyfaXzp.js +0 -225
  309. package/dist/chunks/Select-CzyfaXzp.js.map +0 -1
  310. package/dist/chunks/SelectionPanel-BgUM1h03.js +0 -103
  311. package/dist/chunks/SelectionPanel-BgUM1h03.js.map +0 -1
  312. package/dist/chunks/SidebarPanel-aoIqxbtq.js +0 -55
  313. package/dist/chunks/SidebarPanel-aoIqxbtq.js.map +0 -1
  314. package/dist/chunks/Slider-CFwQYQ10.js +0 -383
  315. package/dist/chunks/Slider-CFwQYQ10.js.map +0 -1
  316. package/dist/chunks/StatusBar-DzoPDY4k.js.map +0 -1
  317. package/dist/chunks/SwatchGrid-BARC3rnF.js.map +0 -1
  318. package/dist/chunks/Timeline--58F7MED.js.map +0 -1
  319. package/dist/chunks/Toast-DNBb-24H.js.map +0 -1
  320. package/dist/chunks/ToggleBar-DTjGeS0Q.js.map +0 -1
  321. package/dist/chunks/ToolButton-CR4sQlxF.js.map +0 -1
  322. package/dist/chunks/ToolOptionsBar-CtzTlaN2.js.map +0 -1
  323. package/dist/chunks/ToolPalette-CKG9qY6P.js.map +0 -1
  324. package/dist/chunks/createKeyframeLayer-Czj6Y235.js.map +0 -1
  325. package/dist/chunks/icons-Dk8SRS8g.js.map +0 -1
  326. package/dist/chunks/model-Du7Lta4C.js.map +0 -1
  327. package/dist/chunks/number-D3NEx_8r.js +0 -89
  328. package/dist/chunks/number-D3NEx_8r.js.map +0 -1
  329. package/dist/chunks/prefField-Dnl7nmjQ.js.map +0 -1
  330. package/dist/chunks/segmentedControl.module-Bv7DEg8f.js +0 -11
  331. package/dist/chunks/segmentedControl.module-Bv7DEg8f.js.map +0 -1
  332. package/dist/chunks/useReorderDragList-B_-5L5Gu.js.map +0 -1
  333. package/dist/components/DragHandleGlyph/DragHandleGlyph.d.ts.map +0 -1
  334. package/dist/components/DragHandleGlyph/index.d.ts +0 -3
  335. package/dist/components/DragHandleGlyph/index.d.ts.map +0 -1
  336. package/dist/components/DragHandleGlyph/index.js +0 -2
  337. package/dist/format/number.d.ts +0 -56
  338. package/dist/format/number.d.ts.map +0 -1
  339. package/dist/icons/ShapeKindIcon.d.ts +0 -10
  340. package/dist/icons/ShapeKindIcon.d.ts.map +0 -1
@@ -1,758 +0,0 @@
1
- import { t as e } from "./dlog-F0I8KsIW.js";
2
- import { n as t, r as n } from "./Tooltip-Clg2mhSt.js";
3
- import { t as r } from "./stance-BFQpS_fL.js";
4
- import { a as i, n as a, r as o } from "./number-D3NEx_8r.js";
5
- import { t as s } from "./Checkbox-DHXTUHO9.js";
6
- import { n as c, t as l } from "./InlineRange-eOj6JpJl.js";
7
- import { t as u } from "./ColorField-BcMcW8Sa.js";
8
- import { t as d } from "./Select-CzyfaXzp.js";
9
- import { t as f } from "./FontFamilySelect-DXlMKWfK.js";
10
- import { t as p } from "./Input-CHmkfYaD.js";
11
- import { n as m, t as h } from "./NumberField-CwJOMmQR.js";
12
- import { t as g } from "./ToggleBar-DTjGeS0Q.js";
13
- import { t as _ } from "./PaintInput-Byhna3H-.js";
14
- import { t as v } from "./PaintField-DaJukRc6.js";
15
- import { n as y, t as b } from "./RadioGroup-Bh4-12e-.js";
16
- import { t as x } from "./Switch-CSYmcM8y.js";
17
- import { getAlpha01 as S, toHex8 as ee, withAlpha01 as C } from "@weasel-js/core";
18
- import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
19
- import { createContext as D, forwardRef as te, useContext as O, useEffect as k, useId as ne, useRef as A, useState as j } from "react";
20
- import { Focusable as M } from "react-aria-components";
21
- var N = {
22
- panel: "_panel_1pt5q_9",
23
- list: "_list_1pt5q_3",
24
- row: "_row_1pt5q_4",
25
- group: "_group_1pt5q_4",
26
- subpanel: "_subpanel_1pt5q_3",
27
- card: "_card_1pt5q_37",
28
- cardList: "_cardList_1pt5q_37",
29
- readout: "_readout_1pt5q_42",
30
- readoutInput: "_readoutInput_1pt5q_43",
31
- panelTitle: "_panelTitle_1pt5q_72",
32
- panelHeader: "_panelHeader_1pt5q_84",
33
- panelActions: "_panelActions_1pt5q_97",
34
- listPairs: "_listPairs_1pt5q_3",
35
- rowColor: "_rowColor_1pt5q_4",
36
- span: "_span_1pt5q_505",
37
- listOneUp: "_listOneUp_1pt5q_513",
38
- densityTight: "_densityTight_1pt5q_524",
39
- densityNormal: "_densityNormal_1pt5q_536",
40
- densityRoomy: "_densityRoomy_1pt5q_548",
41
- alignStart: "_alignStart_1pt5q_574",
42
- alignCenter: "_alignCenter_1pt5q_580",
43
- alignEnd: "_alignEnd_1pt5q_586",
44
- alignBaseline: "_alignBaseline_1pt5q_592",
45
- rowInline: "_rowInline_1pt5q_623",
46
- rowLabel: "_rowLabel_1pt5q_629",
47
- rowBlock: "_rowBlock_1pt5q_654",
48
- rowCheckbox: "_rowCheckbox_1pt5q_655",
49
- readoutAfter: "_readoutAfter_1pt5q_674",
50
- readoutText: "_readoutText_1pt5q_685",
51
- help: "_help_1pt5q_702",
52
- autoToggle: "_autoToggle_1pt5q_739",
53
- readoutGroup: "_readoutGroup_1pt5q_680",
54
- readoutUnit: "_readoutUnit_1pt5q_816",
55
- fieldUnitGroup: "_fieldUnitGroup_1pt5q_840",
56
- toggle: "_toggle_1pt5q_879",
57
- rowFramed: "_rowFramed_1pt5q_888",
58
- select: "_select_1pt5q_911",
59
- dialogTrigger: "_dialogTrigger_1pt5q_986",
60
- dialogSummary: "_dialogSummary_1pt5q_1021",
61
- dialogGlyph: "_dialogGlyph_1pt5q_1029",
62
- alpha: "_alpha_1pt5q_1101",
63
- dimmed: "_dimmed_1pt5q_1158",
64
- cellReadout: "_cellReadout_1pt5q_1164",
65
- unitSuffix: "_unitSuffix_1pt5q_1171",
66
- textarea: "_textarea_1pt5q_1177",
67
- toggleButton: "_toggleButton_1pt5q_1198",
68
- toggleButtonSelected: "_toggleButtonSelected_1pt5q_1224",
69
- groupHeadRow: "_groupHeadRow_1pt5q_1249",
70
- groupTitle: "_groupTitle_1pt5q_1257",
71
- groupLeading: "_groupLeading_1pt5q_1263",
72
- groupActions: "_groupActions_1pt5q_1264",
73
- note: "_note_1pt5q_1461",
74
- groupHead: "_groupHead_1pt5q_1249",
75
- groupBody: "_groupBody_1pt5q_4",
76
- groupPairs: "_groupPairs_1pt5q_1515",
77
- groupOneUp: "_groupOneUp_1pt5q_1528",
78
- subpanelTitle: "_subpanelTitle_1pt5q_1668",
79
- rowAuto: "_rowAuto_1pt5q_1705"
80
- }, re = {
81
- tight: N.densityTight,
82
- normal: N.densityNormal,
83
- roomy: N.densityRoomy
84
- }, ie = {
85
- start: N.alignStart,
86
- center: N.alignCenter,
87
- end: N.alignEnd,
88
- baseline: N.alignBaseline
89
- };
90
- function P(e, { density: t, align: n }, r) {
91
- return [
92
- e,
93
- t && re[t],
94
- n && ie[n],
95
- r
96
- ].filter(Boolean).join(" ");
97
- }
98
- var F = D(!1);
99
- function ae({ title: e, actions: t, selectable: n, children: i, className: a, density: o, align: s, stance: c, tone: l }) {
100
- let u = O(F), d = r({
101
- stance: c,
102
- tone: l
103
- }), f = e != null && /* @__PURE__ */ T("h2", {
104
- className: N.panelTitle,
105
- children: e
106
- });
107
- return /* @__PURE__ */ E("div", {
108
- className: P(N.panel, {
109
- density: o,
110
- align: s
111
- }, a),
112
- ...d,
113
- "data-nested": u || void 0,
114
- "data-selectable": (n ?? c === "debug") || void 0,
115
- children: [t == null ? f : /* @__PURE__ */ E("div", {
116
- className: N.panelHeader,
117
- children: [f, /* @__PURE__ */ T("div", {
118
- className: N.panelActions,
119
- children: t
120
- })]
121
- }), /* @__PURE__ */ T(F.Provider, {
122
- value: !0,
123
- children: i
124
- })]
125
- });
126
- }
127
- var oe = te(function({ children: e, className: t, pack: n = "auto-color", density: r, align: i }, a) {
128
- let o = `${N.list}${n === "pairs" ? ` ${N.listPairs}` : n === "one-up" ? ` ${N.listOneUp}` : ""}`;
129
- return /* @__PURE__ */ T("div", {
130
- ref: a,
131
- className: P(o, {
132
- density: r,
133
- align: i
134
- }, t),
135
- children: e
136
- });
137
- });
138
- function se({ children: e, className: t }) {
139
- return /* @__PURE__ */ T("div", {
140
- className: t ? `${N.span} ${t}` : N.span,
141
- children: e
142
- });
143
- }
144
- function I({ children: e, className: t }) {
145
- return /* @__PURE__ */ T("p", {
146
- className: t ? `${N.note} ${t}` : N.note,
147
- children: e
148
- });
149
- }
150
- function L({ label: e, readout: t, description: n, variant: r = "default", layout: i, span: a, children: o, htmlFor: s, group: c, className: l, density: u, align: d, auto: f, onAutoChange: p, chrome: m }) {
151
- let h = r === "color" ? N.rowColor : r === "checkbox" ? N.rowCheckbox : "", g = r === "default" ? "block" : "inline", _ = i ?? g, v = _ === g ? "" : _ === "inline" ? N.rowInline : N.rowBlock, y = P([
152
- N.row,
153
- h,
154
- v,
155
- a && N.span,
156
- f && N.rowAuto,
157
- m === "framed" && N.rowFramed
158
- ].filter(Boolean).join(" "), {
159
- density: u,
160
- align: d
161
- }, l), b = _ === "inline" && t != null, x = /* @__PURE__ */ E("span", {
162
- className: N.rowLabel,
163
- children: [
164
- p ? /* @__PURE__ */ T(R, {
165
- auto: f ?? !1,
166
- label: e,
167
- onChange: p
168
- }) : e,
169
- n ? /* @__PURE__ */ T(z, {
170
- label: e,
171
- description: n
172
- }) : null,
173
- t != null && !b && /* @__PURE__ */ T("em", {
174
- className: N.readout,
175
- children: t
176
- })
177
- ]
178
- }), S = b ? /* @__PURE__ */ T("em", {
179
- className: `${N.readout} ${N.readoutAfter}`,
180
- children: t
181
- }) : null;
182
- return c ? /* @__PURE__ */ E("div", {
183
- className: y,
184
- children: [
185
- x,
186
- o,
187
- S
188
- ]
189
- }) : /* @__PURE__ */ E("label", {
190
- className: y,
191
- htmlFor: s,
192
- children: [
193
- x,
194
- o,
195
- S
196
- ]
197
- });
198
- }
199
- function R({ auto: e, label: t, onChange: n }) {
200
- let r = typeof t == "string" ? t : "this setting", i = (t) => {
201
- t.preventDefault(), t.stopPropagation(), n(!e);
202
- };
203
- return /* @__PURE__ */ T("span", {
204
- role: "button",
205
- tabIndex: 0,
206
- className: N.autoToggle,
207
- "aria-pressed": !e,
208
- "aria-label": `Pin ${r}`,
209
- onClick: i,
210
- onKeyDown: (e) => {
211
- (e.key === "Enter" || e.key === " ") && i(e);
212
- },
213
- onMouseDown: (e) => e.stopPropagation(),
214
- children: t
215
- });
216
- }
217
- function z({ label: e, description: r }) {
218
- let i = typeof e == "string" ? e : "this setting";
219
- return /* @__PURE__ */ E(n, { children: [/* @__PURE__ */ T(M, { children: /* @__PURE__ */ T("button", {
220
- type: "button",
221
- className: N.help,
222
- "aria-label": `About ${i}`,
223
- onClick: (e) => {
224
- e.preventDefault(), e.stopPropagation();
225
- },
226
- onMouseDown: (e) => e.stopPropagation(),
227
- children: "ⓘ"
228
- }) }), /* @__PURE__ */ T(t, { children: r })] });
229
- }
230
- //#endregion
231
- //#region src/components/Properties/PropertyField.tsx
232
- function B(e) {
233
- let { label: t, readout: n, description: r, layout: i, span: a, density: o, align: s, auto: c, onAutoChange: l, rowClassName: u, controlClassName: d, ...f } = e, p = ne(), m = {
234
- ...f,
235
- name: f.name ?? Q(t),
236
- className: d,
237
- id: p
238
- }, h = m.chrome === "framed", g = H(m), _ = {
239
- label: t,
240
- description: r,
241
- layout: i,
242
- span: a,
243
- density: o,
244
- align: s,
245
- auto: c,
246
- onAutoChange: l,
247
- className: u,
248
- chrome: m.chrome,
249
- variant: g.variant,
250
- group: g.group,
251
- htmlFor: g.group || h || m.kind === "font-family" ? void 0 : p
252
- };
253
- return m.kind === "number" && m.control === "slider" ? /* @__PURE__ */ T(L, {
254
- ..._,
255
- readout: Z(n) ?? /* @__PURE__ */ T(X, { ...m }),
256
- children: /* @__PURE__ */ T(Y, { ...m })
257
- }) : /* @__PURE__ */ T(L, {
258
- ..._,
259
- readout: n,
260
- children: /* @__PURE__ */ T(U, { ...m })
261
- });
262
- }
263
- function V(e) {
264
- let t = e;
265
- return t.kind === "number" && t.control === "slider" ? /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T(Y, { ...t }), /* @__PURE__ */ T("span", {
266
- className: N.cellReadout,
267
- children: /* @__PURE__ */ T(X, { ...t })
268
- })] }) : /* @__PURE__ */ T(U, { ...t });
269
- }
270
- function H(e) {
271
- switch (e.kind) {
272
- case "boolean": return {
273
- variant: "checkbox",
274
- group: e.control === "switch" || e.control === "toggle"
275
- };
276
- case "enum": return {
277
- variant: "default",
278
- group: e.control === "radio" || e.control === "toggle"
279
- };
280
- case "color": return {
281
- variant: "color",
282
- group: !1
283
- };
284
- case "paint": return {
285
- variant: "default",
286
- group: !0
287
- };
288
- default: return {
289
- variant: "default",
290
- group: !1
291
- };
292
- }
293
- }
294
- function U(e) {
295
- switch (e.kind) {
296
- case "boolean": return /* @__PURE__ */ T(G, { ...e });
297
- case "number": return /* @__PURE__ */ T(ce, { ...e });
298
- case "string": return /* @__PURE__ */ T(de, { ...e });
299
- case "enum": return /* @__PURE__ */ T(fe, { ...e });
300
- case "color": return /* @__PURE__ */ T(pe, { ...e });
301
- case "paint": return /* @__PURE__ */ T(he, { ...e });
302
- case "font-family": return /* @__PURE__ */ T(f, {
303
- className: e.className,
304
- value: e.mixed ? void 0 : e.value,
305
- mixed: e.mixed,
306
- onChange: e.onChange,
307
- weight: e.weight,
308
- fontStyle: e.fontStyle,
309
- "aria-label": e.name
310
- });
311
- default: throw Error(`PropertyControl: no control for kind "${e.kind}"`);
312
- }
313
- }
314
- function W({ mixed: e, unset: t, children: n }) {
315
- return !e && !t ? /* @__PURE__ */ T(w, { children: n }) : /* @__PURE__ */ T("span", {
316
- className: N.dimmed,
317
- title: e ? "Mixed" : "Not set",
318
- children: n
319
- });
320
- }
321
- function G(e) {
322
- let t = !e.mixed && e.value === !0, n = A(null);
323
- if (k(() => {
324
- n.current && (n.current.indeterminate = e.mixed === !0);
325
- }), e.control === "toggle") return /* @__PURE__ */ T(g, {
326
- mode: "multiple",
327
- size: "sm",
328
- variant: "flat",
329
- className: e.className,
330
- ariaLabel: e.name,
331
- items: [{
332
- value: "on",
333
- label: e.glyph ?? e.name?.slice(0, 1),
334
- ariaLabel: e.name
335
- }],
336
- value: t ? ["on"] : [],
337
- mixedValues: e.mixed ? ["on"] : [],
338
- onChange: (t) => e.onChange(t.includes("on"))
339
- });
340
- if (e.control === "switch") return /* @__PURE__ */ T(W, {
341
- mixed: e.mixed,
342
- unset: e.unset,
343
- children: /* @__PURE__ */ T(x, {
344
- className: e.className,
345
- isSelected: t,
346
- onChange: e.onChange,
347
- "aria-label": e.name
348
- })
349
- });
350
- let r = e.chrome === "framed" ? /* @__PURE__ */ T(s, {
351
- className: e.className,
352
- isSelected: t,
353
- isIndeterminate: e.mixed,
354
- onChange: e.onChange,
355
- "aria-label": e.name
356
- }) : /* @__PURE__ */ T("input", {
357
- ref: n,
358
- id: e.id,
359
- type: "checkbox",
360
- className: e.className,
361
- "aria-label": e.name,
362
- checked: t,
363
- onChange: (t) => e.onChange(t.target.checked)
364
- });
365
- return /* @__PURE__ */ T(W, {
366
- unset: e.unset,
367
- children: r
368
- });
369
- }
370
- function K(e) {
371
- let t = A(null), n = A(e);
372
- return k(() => {
373
- n.current = e;
374
- }), k(() => {
375
- let e = t.current;
376
- if (!e) return;
377
- let r = () => n.current?.(e.value);
378
- return e.addEventListener("change", r), () => e.removeEventListener("change", r);
379
- }, []), t;
380
- }
381
- function q(e, t) {
382
- return e == null ? null : typeof e == "string" ? /* @__PURE__ */ T("span", {
383
- className: t,
384
- children: e
385
- }) : e;
386
- }
387
- function ce(e) {
388
- let t = e.onInput ?? e.onChange, n = K(e.onInput && ((t) => {
389
- if (t === "") return;
390
- let n = Number(t);
391
- Number.isFinite(n) && e.onChange(n);
392
- })), r = !e.mixed && typeof e.value == "number" && Number.isFinite(e.value), i = e.mixed ? "Mixed" : e.placeholder;
393
- if (e.chrome === "framed") {
394
- let t = (t) => {
395
- Number.isNaN(t) || e.onChange(t);
396
- }, n = r ? e.value : NaN, a = e.accepts ? /* @__PURE__ */ T(h, {
397
- className: e.className,
398
- value: n,
399
- placeholder: i,
400
- minValue: e.min,
401
- maxValue: e.max,
402
- step: e.step,
403
- accepts: e.accepts,
404
- "aria-label": e.name,
405
- onChange: t
406
- }) : /* @__PURE__ */ T(m, {
407
- className: e.className,
408
- value: n,
409
- placeholder: i,
410
- minValue: e.min,
411
- maxValue: e.max,
412
- step: e.step,
413
- hideSteppers: e.steppers === !1,
414
- "aria-label": e.name,
415
- onChange: t
416
- });
417
- return e.unit == null ? a : /* @__PURE__ */ E(w, { children: [a, /* @__PURE__ */ T("span", {
418
- className: N.unitSuffix,
419
- "aria-hidden": "true",
420
- children: e.unit
421
- })] });
422
- }
423
- let a = /* @__PURE__ */ T("input", {
424
- ref: n,
425
- id: e.id,
426
- type: "number",
427
- className: e.className,
428
- "aria-label": e.name,
429
- value: r ? e.value : "",
430
- min: e.min,
431
- max: e.max,
432
- step: e.step,
433
- placeholder: i,
434
- onChange: (e) => {
435
- let n = e.target.value;
436
- if (n === "") return;
437
- let r = Number(n);
438
- Number.isFinite(r) && t(r);
439
- }
440
- });
441
- return e.unit == null ? a : /* @__PURE__ */ E("span", {
442
- className: N.fieldUnitGroup,
443
- children: [a, q(e.unit, N.readoutUnit)]
444
- });
445
- }
446
- function J(e) {
447
- return {
448
- min: e.min ?? 0,
449
- max: e.max ?? 100,
450
- step: e.step ?? 1
451
- };
452
- }
453
- function Y(t) {
454
- let { min: n, max: r, step: i } = J(t), a = t.onInput ?? t.onChange, o = t.onInput ? t.onChange : void 0, s = K(o && ((e) => o(Number(e)))), u = !t.mixed && typeof t.value == "number" && Number.isFinite(t.value) ? Math.min(Math.max(t.value, n), r) : n, d = (n) => {
455
- let r = Number(n);
456
- e("property-panel", "slider", {
457
- name: t.name,
458
- value: r
459
- }), a(r);
460
- };
461
- return t.chrome === "framed" ? /* @__PURE__ */ T(l, {
462
- ref: s,
463
- className: t.className,
464
- "aria-label": t.name,
465
- min: n,
466
- max: r,
467
- step: i,
468
- value: u,
469
- disabled: t.mixed,
470
- onChange: (e) => d(e.target.value)
471
- }) : /* @__PURE__ */ T("input", {
472
- ref: s,
473
- id: t.id,
474
- type: "range",
475
- "aria-label": t.name,
476
- className: t.className ? `${c.range} ${t.className}` : c.range,
477
- tabIndex: -1,
478
- min: n,
479
- max: r,
480
- step: i,
481
- value: u,
482
- disabled: t.mixed,
483
- onChange: (e) => d(e.target.value)
484
- });
485
- }
486
- function X(e) {
487
- let { min: t, max: n, step: r } = J(e);
488
- if (e.mixed || typeof e.value != "number" || !Number.isFinite(e.value)) return /* @__PURE__ */ T(w, { children: Z("—") });
489
- let i = r >= 1 ? 0 : Math.min(6, Math.max(0, Math.ceil(-Math.log10(r)))), s = e.format ?? (e.notation === "compact" ? (e) => a(e, i) : (e) => o(e, {
490
- useGrouping: !1,
491
- minimumFractionDigits: i,
492
- maximumFractionDigits: i
493
- }));
494
- return /* @__PURE__ */ T(le, {
495
- name: e.name,
496
- value: e.value,
497
- min: t,
498
- max: n,
499
- format: s,
500
- unit: e.unit,
501
- onCommit: (t) => {
502
- e.onInput?.(t), e.onChange(t);
503
- }
504
- });
505
- }
506
- function Z(e) {
507
- return typeof e != "string" && typeof e != "number" ? e : /* @__PURE__ */ T("span", {
508
- className: N.readoutGroup,
509
- children: /* @__PURE__ */ T("span", {
510
- className: N.readoutText,
511
- children: e
512
- })
513
- });
514
- }
515
- function le({ name: e, value: t, min: n, max: r, format: a, unit: o, onCommit: s }) {
516
- let [c, l] = j(null), u = (e) => {
517
- let t = a(e);
518
- return typeof t == "string" ? t : String(t);
519
- }, d = c === null ? u(t) : c, f = { "--wzl-property-readout-fit": `${Math.max(u(n).length, u(r).length)}ch` }, p = () => {
520
- if (c !== null) {
521
- let e = i(c);
522
- Number.isFinite(e) && s(Math.min(r, Math.max(n, e)));
523
- }
524
- l(null);
525
- };
526
- return /* @__PURE__ */ E("span", {
527
- className: N.readoutGroup,
528
- children: [/* @__PURE__ */ T("input", {
529
- type: "text",
530
- "aria-label": e,
531
- inputMode: "decimal",
532
- className: N.readoutInput,
533
- style: f,
534
- value: d,
535
- onFocus: (e) => {
536
- l(u(t)), e.currentTarget.select();
537
- },
538
- onChange: (e) => l(e.target.value.replace(/-/g, "−")),
539
- onBlur: p,
540
- onClick: (e) => {
541
- e.preventDefault(), e.stopPropagation(), e.currentTarget.focus();
542
- },
543
- onMouseDown: (e) => e.stopPropagation(),
544
- onKeyDown: (e) => {
545
- e.key === "Enter" ? (p(), e.currentTarget.blur()) : e.key === "Escape" && (l(null), e.currentTarget.blur());
546
- }
547
- }), q(o, N.readoutUnit)]
548
- });
549
- }
550
- function ue(e) {
551
- let [t, n] = j(null), r = e.mixed ? "" : e.value ?? "", i = e.onInput !== void 0;
552
- return {
553
- shown: t ?? r,
554
- type: (t) => {
555
- if (!i) {
556
- e.onChange(t);
557
- return;
558
- }
559
- n(t), e.onInput?.(t);
560
- },
561
- settle: () => {
562
- t !== null && t !== r && e.onChange(t), n(null);
563
- }
564
- };
565
- }
566
- function de(e) {
567
- let t = ue(e), n = e.mixed ? "Mixed" : e.placeholder, r = (t) => {
568
- t.key === "Enter" && e.control !== "textarea" && t.currentTarget.blur();
569
- };
570
- return e.control === "textarea" ? /* @__PURE__ */ T("textarea", {
571
- id: e.id,
572
- className: [e.chrome === "framed" && N.textarea, e.className].filter(Boolean).join(" ") || void 0,
573
- "aria-label": e.name,
574
- value: t.shown,
575
- placeholder: n,
576
- maxLength: e.maxLength,
577
- rows: 3,
578
- onChange: (e) => t.type(e.target.value),
579
- onBlur: t.settle
580
- }) : e.chrome === "framed" ? /* @__PURE__ */ T(p, {
581
- className: e.className,
582
- value: t.shown,
583
- placeholder: n,
584
- maxLength: e.maxLength,
585
- "aria-label": e.name,
586
- onChange: t.type,
587
- onBlur: t.settle,
588
- onKeyDown: r
589
- }) : /* @__PURE__ */ T("input", {
590
- id: e.id,
591
- type: "text",
592
- className: e.className,
593
- "aria-label": e.name,
594
- value: t.shown,
595
- placeholder: n,
596
- maxLength: e.maxLength,
597
- onChange: (e) => t.type(e.target.value),
598
- onBlur: t.settle,
599
- onKeyDown: r
600
- });
601
- }
602
- function Q(e) {
603
- return typeof e == "string" ? e : void 0;
604
- }
605
- function fe(t) {
606
- let n = !t.mixed && t.options.some((e) => e.value === t.value) ? t.value : null;
607
- if (t.control === "radio" || t.control === "toggle") {
608
- if (t.chrome === "framed") return t.control === "radio" ? /* @__PURE__ */ T(y, {
609
- className: t.className,
610
- value: n,
611
- onChange: t.onChange,
612
- "aria-label": t.name,
613
- children: t.options.map((e) => /* @__PURE__ */ T(b, {
614
- value: e.value,
615
- isDisabled: e.disabled,
616
- children: e.label
617
- }, e.value))
618
- }) : /* @__PURE__ */ T(g, {
619
- size: "sm",
620
- variant: "flat",
621
- className: t.className,
622
- ariaLabel: t.name,
623
- items: t.options.map((e) => ({
624
- value: e.value,
625
- label: e.glyph ?? e.label,
626
- ariaLabel: Q(e.label),
627
- disabled: e.disabled
628
- })),
629
- value: n,
630
- onChange: (e) => {
631
- e !== null && t.onChange(e);
632
- }
633
- });
634
- let e = t.control === "radio";
635
- return /* @__PURE__ */ T("div", {
636
- className: t.className ? `${N.toggle} ${t.className}` : N.toggle,
637
- role: e ? "radiogroup" : "group",
638
- "aria-label": t.name,
639
- children: t.options.map((r) => {
640
- let i = r.value === n;
641
- return /* @__PURE__ */ T("button", {
642
- type: "button",
643
- role: e ? "radio" : void 0,
644
- "aria-checked": e ? i : void 0,
645
- "aria-pressed": e ? void 0 : i,
646
- "aria-label": Q(r.label),
647
- disabled: r.disabled,
648
- className: i ? `${N.toggleButton} ${N.toggleButtonSelected}` : N.toggleButton,
649
- onClick: () => t.onChange(r.value),
650
- children: r.glyph ?? r.label
651
- }, r.value);
652
- })
653
- });
654
- }
655
- let r = t.chrome !== "framed";
656
- return /* @__PURE__ */ T(d, {
657
- className: r ? t.className ? `${N.select} ${t.className}` : N.select : t.className,
658
- variant: r ? "bare" : void 0,
659
- triggerId: r ? t.id : void 0,
660
- "aria-label": t.name,
661
- placeholder: t.mixed ? "Mixed" : t.placeholder ?? (t.unset ? "—" : "Choose option…"),
662
- selectedKey: n,
663
- options: t.options.map((e) => ({
664
- value: e.value,
665
- label: e.label,
666
- isDisabled: e.disabled
667
- })),
668
- onSelectionChange: (n) => {
669
- e("property-panel", "select", {
670
- name: t.name,
671
- value: n
672
- }), t.onChange(n);
673
- }
674
- });
675
- }
676
- function $(e) {
677
- let t = ee(e?.trim() ?? "");
678
- return /^#[0-9a-f]{8}$/i.test(t) ? {
679
- rgb: t.slice(0, 7).toLowerCase(),
680
- alpha: S(t)
681
- } : {
682
- rgb: "#000000",
683
- alpha: 1
684
- };
685
- }
686
- function pe(e) {
687
- let t = e.alpha === !0, n = $(e.value), r = typeof e.alpha == "number" ? e.alpha : n.alpha, i = (e, n) => t ? C(e, n) : e, a = (e) => (t) => e(i(t, r)), o = (e, r) => t ? e && ((t) => e(C(n.rgb, t))) : r, s = o(e.onChange, e.onAlphaChange), c = o(e.onInput, e.onAlphaInput);
688
- if (e.chrome === "framed") {
689
- let t = e.alpha !== void 0 && e.alpha !== !1, i = (t, i) => t && ((a) => {
690
- if (typeof e.alpha != "number") {
691
- t(a);
692
- return;
693
- }
694
- let o = $(a);
695
- (o.rgb !== n.rgb || !i) && t(o.rgb), o.alpha !== r && i?.(o.alpha);
696
- });
697
- return /* @__PURE__ */ T(u, {
698
- className: e.className,
699
- value: e.mixed ? void 0 : t ? C(n.rgb, r) : e.value ?? "#000000",
700
- mixed: e.mixed,
701
- alpha: t,
702
- onChange: i(e.onChange, e.onAlphaChange) ?? e.onChange,
703
- onInput: i(e.onInput, e.onAlphaInput),
704
- "aria-label": e.name
705
- });
706
- }
707
- return /* @__PURE__ */ T(me, {
708
- p: e,
709
- rgb: n.rgb,
710
- alpha: e.alpha === void 0 || e.alpha === !1 ? void 0 : r,
711
- onColorChange: a(e.onChange),
712
- onColorInput: e.onInput && a(e.onInput),
713
- onAlphaChange: s,
714
- onAlphaInput: c
715
- });
716
- }
717
- function me({ p: e, rgb: t, alpha: n, onColorChange: r, onColorInput: i, onAlphaChange: a, onAlphaInput: o }) {
718
- let s = i ?? r, l = K(i && ((e) => r(e))), u = o ?? a, d = K(o && a && ((e) => a(Number(e))));
719
- return /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("input", {
720
- ref: l,
721
- id: e.id,
722
- type: "color",
723
- className: e.className,
724
- "aria-label": e.name,
725
- value: t,
726
- "data-mixed": e.mixed || void 0,
727
- onChange: (e) => s(e.target.value)
728
- }), n !== void 0 && /* @__PURE__ */ T("input", {
729
- ref: d,
730
- type: "range",
731
- "aria-label": e.name ? `${e.name} opacity` : void 0,
732
- className: `${c.range} ${c.alpha} ${N.alpha}`,
733
- min: 0,
734
- max: 1,
735
- step: .01,
736
- value: n,
737
- disabled: e.alphaDisabled,
738
- onChange: (e) => u?.(Number(e.target.value))
739
- })] });
740
- }
741
- function he(e) {
742
- let t = e.control === "inline" ? _ : v;
743
- return /* @__PURE__ */ T(t, {
744
- className: e.className,
745
- value: e.value,
746
- mixed: e.mixed,
747
- unset: e.unset,
748
- kinds: e.kinds,
749
- allowNone: e.allowNone,
750
- onChange: e.onChange,
751
- onInput: e.onInput,
752
- "aria-label": e.name
753
- });
754
- }
755
- //#endregion
756
- export { ae as a, P as c, I as i, N as l, B as n, L as o, oe as r, se as s, V as t };
757
-
758
- //# sourceMappingURL=PropertyField-DGCecAnV.js.map