@weasel-js/ui 1.4.0-pre.1 → 1.4.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 (181) hide show
  1. package/dist/chunks/{Badge-BXTDs-zi.js → Badge-7yQseqZb.js} +233 -263
  2. package/dist/chunks/Badge-7yQseqZb.js.map +1 -0
  3. package/dist/chunks/BandEditor-DjOi4ldl.js +252 -0
  4. package/dist/chunks/BandEditor-DjOi4ldl.js.map +1 -0
  5. package/dist/chunks/{Callout-DAFusbzz.js → Callout-wRyevt8I.js} +1 -1
  6. package/dist/chunks/{Callout-DAFusbzz.js.map → Callout-wRyevt8I.js.map} +1 -1
  7. package/dist/chunks/{Checkbox-BePa_djO.js → Checkbox-D_GCnoJ0.js} +1 -1
  8. package/dist/chunks/{Checkbox-BePa_djO.js.map → Checkbox-D_GCnoJ0.js.map} +1 -1
  9. package/dist/chunks/{ColorField-CKbnsEUN.js → ColorField-pEkaSppg.js} +7 -7
  10. package/dist/chunks/ColorField-pEkaSppg.js.map +1 -0
  11. package/dist/chunks/{ComboBox-B6QS8y3j.js → ComboBox-inno5gt1.js} +9 -9
  12. package/dist/chunks/ComboBox-inno5gt1.js.map +1 -0
  13. package/dist/chunks/{CurveEditor-COJ6WK9K.js → CurveEditor-DoX5Q0_V.js} +193 -196
  14. package/dist/chunks/CurveEditor-DoX5Q0_V.js.map +1 -0
  15. package/dist/chunks/{DataGrid-BWZZUekH.js → DataGrid-DHV0chfL.js} +2 -5
  16. package/dist/chunks/DataGrid-DHV0chfL.js.map +1 -0
  17. package/dist/chunks/{DetentSlider-CXIeTHaM.js → DetentSlider-Cd5360U3.js} +2 -2
  18. package/dist/chunks/{DetentSlider-CXIeTHaM.js.map → DetentSlider-Cd5360U3.js.map} +1 -1
  19. package/dist/chunks/{Dialog-CQAZ7hS7.js → Dialog-CX2B8PIp.js} +1 -1
  20. package/dist/chunks/{Dialog-CQAZ7hS7.js.map → Dialog-CX2B8PIp.js.map} +1 -1
  21. package/dist/chunks/{Field-BCcTt6Fd.js → Field-Bc6Nuc3p.js} +1 -1
  22. package/dist/chunks/{Field-BCcTt6Fd.js.map → Field-Bc6Nuc3p.js.map} +1 -1
  23. package/dist/chunks/{FontFamilySelect-DwkwRYrr.js → FontFamilySelect-CvrXKVwv.js} +2 -2
  24. package/dist/chunks/{FontFamilySelect-DwkwRYrr.js.map → FontFamilySelect-CvrXKVwv.js.map} +1 -1
  25. package/dist/chunks/{GradientEditor-FwNdxxf-.js → GradientEditor-CPeTbkFE.js} +12 -10
  26. package/dist/chunks/{GradientEditor-FwNdxxf-.js.map → GradientEditor-CPeTbkFE.js.map} +1 -1
  27. package/dist/chunks/{Icon-CxoJb_bw.js → Icon-DBXtBB1f.js} +8 -2
  28. package/dist/chunks/{Icon-CxoJb_bw.js.map → Icon-DBXtBB1f.js.map} +1 -1
  29. package/dist/chunks/InlineRange-CBt_SBsC.js +29 -0
  30. package/dist/chunks/InlineRange-CBt_SBsC.js.map +1 -0
  31. package/dist/chunks/{Input-DRUeowbz.js → Input-CSAECs_T.js} +5 -5
  32. package/dist/chunks/Input-CSAECs_T.js.map +1 -0
  33. package/dist/chunks/{ItemList-BUTk9E8-.js → ItemList-POiCvUDx.js} +7 -7
  34. package/dist/chunks/ItemList-POiCvUDx.js.map +1 -0
  35. package/dist/chunks/{LayerStack-htMwIsJ6.js → LayerStack-BVdwhAhG.js} +2 -5
  36. package/dist/chunks/{LayerStack-htMwIsJ6.js.map → LayerStack-BVdwhAhG.js.map} +1 -1
  37. package/dist/chunks/{NumberField-CQ7OJORF.js → NumberField-Byw1iaIJ.js} +12 -11
  38. package/dist/chunks/NumberField-Byw1iaIJ.js.map +1 -0
  39. package/dist/chunks/{PaintInput-CgZR3B0r.js → PaintInput-6HTUAFL1.js} +5 -5
  40. package/dist/chunks/{PaintInput-CgZR3B0r.js.map → PaintInput-6HTUAFL1.js.map} +1 -1
  41. package/dist/chunks/{PatternPicker-v9BFsaMM.js → PatternPicker-G9e0CU5H.js} +1 -1
  42. package/dist/chunks/{PatternPicker-v9BFsaMM.js.map → PatternPicker-G9e0CU5H.js.map} +1 -1
  43. package/dist/chunks/{Plot2D-B08SYGQV.js → Plot2D-D63D5w6c.js} +1 -1
  44. package/dist/chunks/{Plot2D-B08SYGQV.js.map → Plot2D-D63D5w6c.js.map} +1 -1
  45. package/dist/chunks/{PointPlotter-DEh7a3xB.js → PointPlotter-CZJE8Ccu.js} +2 -2
  46. package/dist/chunks/{PointPlotter-DEh7a3xB.js.map → PointPlotter-CZJE8Ccu.js.map} +1 -1
  47. package/dist/chunks/{Powerline-M1Q3Hx5E.js → Powerline-BY_ADnqq.js} +2 -2
  48. package/dist/chunks/{Powerline-M1Q3Hx5E.js.map → Powerline-BY_ADnqq.js.map} +1 -1
  49. package/dist/chunks/{Prefs-C2qhxnmt.js → Prefs-ByKG3ylD.js} +10 -10
  50. package/dist/chunks/{Prefs-C2qhxnmt.js.map → Prefs-ByKG3ylD.js.map} +1 -1
  51. package/dist/chunks/Properties-BuNzy7Hb.js +662 -0
  52. package/dist/chunks/Properties-BuNzy7Hb.js.map +1 -0
  53. package/dist/chunks/{RadioGroup-B8eMJ6lu.js → RadioGroup-XjbfUb7S.js} +2 -2
  54. package/dist/chunks/{RadioGroup-B8eMJ6lu.js.map → RadioGroup-XjbfUb7S.js.map} +1 -1
  55. package/dist/chunks/{RangeSlider-JczhglgA.js → RangeSlider-D0hFbx_Z.js} +1 -1
  56. package/dist/chunks/{RangeSlider-JczhglgA.js.map → RangeSlider-D0hFbx_Z.js.map} +1 -1
  57. package/dist/chunks/ResizeHandle-DfqqfaZz.js +79 -0
  58. package/dist/chunks/ResizeHandle-DfqqfaZz.js.map +1 -0
  59. package/dist/chunks/{Select-g8PhE010.js → Select-D1uP21db.js} +2 -2
  60. package/dist/chunks/{Select-g8PhE010.js.map → Select-D1uP21db.js.map} +1 -1
  61. package/dist/chunks/{SelectionPanel-Cl18SdD6.js → SelectionPanel-BU2cmRtp.js} +10 -10
  62. package/dist/chunks/{SelectionPanel-Cl18SdD6.js.map → SelectionPanel-BU2cmRtp.js.map} +1 -1
  63. package/dist/chunks/{Sidebar-mWGsndWw.js → Sidebar-Du0yp1S0.js} +1 -1
  64. package/dist/chunks/{Sidebar-mWGsndWw.js.map → Sidebar-Du0yp1S0.js.map} +1 -1
  65. package/dist/chunks/{SidebarPanel-B2d0erLv.js → SidebarPanel-Cuq__FIC.js} +2 -2
  66. package/dist/chunks/{SidebarPanel-B2d0erLv.js.map → SidebarPanel-Cuq__FIC.js.map} +1 -1
  67. package/dist/chunks/Slider-BE6jaxyU.js +303 -0
  68. package/dist/chunks/Slider-BE6jaxyU.js.map +1 -0
  69. package/dist/chunks/{StatusBar-xxCcWsfq.js → StatusBar-DLYwh5sb.js} +1 -1
  70. package/dist/chunks/{StatusBar-xxCcWsfq.js.map → StatusBar-DLYwh5sb.js.map} +1 -1
  71. package/dist/chunks/{Switch-QviBb61l.js → Switch-B521iN3m.js} +1 -1
  72. package/dist/chunks/{Switch-QviBb61l.js.map → Switch-B521iN3m.js.map} +1 -1
  73. package/dist/chunks/{Tabs-DT-dIt6d.js → Tabs-BuifAv0p.js} +1 -1
  74. package/dist/chunks/{Tabs-DT-dIt6d.js.map → Tabs-BuifAv0p.js.map} +1 -1
  75. package/dist/chunks/{Timeline-DsLeV5I1.js → Timeline-CWuh0nV0.js} +254 -240
  76. package/dist/chunks/Timeline-CWuh0nV0.js.map +1 -0
  77. package/dist/chunks/{Toast-CfkiN0Nv.js → Toast-B75V2gqL.js} +1 -1
  78. package/dist/chunks/{Toast-CfkiN0Nv.js.map → Toast-B75V2gqL.js.map} +1 -1
  79. package/dist/chunks/{ToolButton-CLoR9Z4o.js → ToolButton-D5VwD47i.js} +1 -1
  80. package/dist/chunks/{ToolButton-CLoR9Z4o.js.map → ToolButton-D5VwD47i.js.map} +1 -1
  81. package/dist/chunks/{ToolGroup-BnE23mcA.js → ToolGroup-B2PlMKQ-.js} +1 -1
  82. package/dist/chunks/{ToolGroup-BnE23mcA.js.map → ToolGroup-B2PlMKQ-.js.map} +1 -1
  83. package/dist/chunks/{ToolPalette-W-rAsomq.js → ToolPalette-Bi5ezkO6.js} +3 -3
  84. package/dist/chunks/{ToolPalette-W-rAsomq.js.map → ToolPalette-Bi5ezkO6.js.map} +1 -1
  85. package/dist/chunks/{icons-CdLHgzV8.js → icons-BV27dhKB.js} +58 -40
  86. package/dist/chunks/icons-BV27dhKB.js.map +1 -0
  87. package/dist/chunks/range.module-CttzfN6a.js +8 -0
  88. package/dist/chunks/range.module-CttzfN6a.js.map +1 -0
  89. package/dist/chunks/useReorderDragList-UvHJFjTZ.js +106 -0
  90. package/dist/chunks/useReorderDragList-UvHJFjTZ.js.map +1 -0
  91. package/dist/components/Badge/Badge.d.ts.map +1 -1
  92. package/dist/components/Badge/index.js +1 -1
  93. package/dist/components/Badge/shapes/Perforated.d.ts.map +1 -1
  94. package/dist/components/Badge/shapes/Shield.d.ts.map +1 -1
  95. package/dist/components/Badge/useSvgBox.d.ts +10 -0
  96. package/dist/components/Badge/useSvgBox.d.ts.map +1 -0
  97. package/dist/components/BandEditor/BandEditor.d.ts.map +1 -1
  98. package/dist/components/BandEditor/index.js +1 -1
  99. package/dist/components/Callout/index.js +1 -1
  100. package/dist/components/Checkbox/index.js +1 -1
  101. package/dist/components/ColorField/index.js +1 -1
  102. package/dist/components/ComboBox/index.js +1 -1
  103. package/dist/components/CurveEditor/LayeredCurveEditor.d.ts.map +1 -1
  104. package/dist/components/CurveEditor/index.js +1 -1
  105. package/dist/components/DataGrid/DataGrid.d.ts.map +1 -1
  106. package/dist/components/DataGrid/index.js +1 -1
  107. package/dist/components/DetentSlider/index.js +1 -1
  108. package/dist/components/Dialog/index.js +1 -1
  109. package/dist/components/Field/index.js +1 -1
  110. package/dist/components/FontFamilySelect/index.js +1 -1
  111. package/dist/components/GradientEditor/index.js +1 -1
  112. package/dist/components/InlineRange/InlineRange.d.ts.map +1 -1
  113. package/dist/components/InlineRange/index.js +1 -1
  114. package/dist/components/Input/index.js +1 -1
  115. package/dist/components/ItemList/index.js +1 -1
  116. package/dist/components/LayerStack/LayerStack.d.ts.map +1 -1
  117. package/dist/components/LayerStack/index.js +1 -1
  118. package/dist/components/NumberField/NumberField.d.ts +6 -0
  119. package/dist/components/NumberField/NumberField.d.ts.map +1 -1
  120. package/dist/components/NumberField/index.js +1 -1
  121. package/dist/components/PaintInput/index.js +1 -1
  122. package/dist/components/PatternPicker/index.js +1 -1
  123. package/dist/components/Plot2D/index.js +1 -1
  124. package/dist/components/PointPlotter/index.js +1 -1
  125. package/dist/components/Powerline/index.js +2 -2
  126. package/dist/components/Prefs/index.js +1 -1
  127. package/dist/components/Properties/PropertyPanel.d.ts +7 -1
  128. package/dist/components/Properties/PropertyPanel.d.ts.map +1 -1
  129. package/dist/components/Properties/index.js +1 -1
  130. package/dist/components/RadioGroup/index.js +1 -1
  131. package/dist/components/RangeSlider/index.js +1 -1
  132. package/dist/components/ResizeHandle/ResizeHandle.d.ts.map +1 -1
  133. package/dist/components/ResizeHandle/index.js +1 -1
  134. package/dist/components/Select/index.js +1 -1
  135. package/dist/components/SelectionPanel/index.js +1 -1
  136. package/dist/components/Sidebar/index.js +1 -1
  137. package/dist/components/SidebarPanel/index.js +1 -1
  138. package/dist/components/Slider/Slider.d.ts +3 -0
  139. package/dist/components/Slider/Slider.d.ts.map +1 -1
  140. package/dist/components/Slider/index.js +1 -1
  141. package/dist/components/StatusBar/index.js +1 -1
  142. package/dist/components/Switch/index.js +1 -1
  143. package/dist/components/Tabs/index.js +1 -1
  144. package/dist/components/Timeline/Lane.d.ts.map +1 -1
  145. package/dist/components/Timeline/Ruler.d.ts.map +1 -1
  146. package/dist/components/Timeline/index.js +1 -1
  147. package/dist/components/Toast/index.js +1 -1
  148. package/dist/components/ToolButton/index.js +1 -1
  149. package/dist/components/ToolGroup/index.js +1 -1
  150. package/dist/components/ToolPalette/index.js +1 -1
  151. package/dist/icons/index.d.ts +6 -0
  152. package/dist/icons/index.d.ts.map +1 -1
  153. package/dist/icons/paths.d.ts +6 -0
  154. package/dist/icons/paths.d.ts.map +1 -1
  155. package/dist/index.js +62 -62
  156. package/dist/style.css +1 -1
  157. package/dist/useReorderDragList.d.ts +20 -7
  158. package/dist/useReorderDragList.d.ts.map +1 -1
  159. package/package.json +8 -5
  160. package/dist/chunks/Badge-BXTDs-zi.js.map +0 -1
  161. package/dist/chunks/BandEditor-D13ybQN_.js +0 -248
  162. package/dist/chunks/BandEditor-D13ybQN_.js.map +0 -1
  163. package/dist/chunks/ColorField-CKbnsEUN.js.map +0 -1
  164. package/dist/chunks/ComboBox-B6QS8y3j.js.map +0 -1
  165. package/dist/chunks/CurveEditor-COJ6WK9K.js.map +0 -1
  166. package/dist/chunks/DataGrid-BWZZUekH.js.map +0 -1
  167. package/dist/chunks/InlineRange-mb19EGOI.js +0 -24
  168. package/dist/chunks/InlineRange-mb19EGOI.js.map +0 -1
  169. package/dist/chunks/Input-DRUeowbz.js.map +0 -1
  170. package/dist/chunks/ItemList-BUTk9E8-.js.map +0 -1
  171. package/dist/chunks/NumberField-CQ7OJORF.js.map +0 -1
  172. package/dist/chunks/Properties-CFRJ8mYH.js +0 -655
  173. package/dist/chunks/Properties-CFRJ8mYH.js.map +0 -1
  174. package/dist/chunks/ResizeHandle-CXBXV6Px.js +0 -81
  175. package/dist/chunks/ResizeHandle-CXBXV6Px.js.map +0 -1
  176. package/dist/chunks/Slider-BbbmHE0c.js +0 -291
  177. package/dist/chunks/Slider-BbbmHE0c.js.map +0 -1
  178. package/dist/chunks/Timeline-DsLeV5I1.js.map +0 -1
  179. package/dist/chunks/icons-CdLHgzV8.js.map +0 -1
  180. package/dist/chunks/useReorderDragList-nQMVwNBd.js +0 -109
  181. package/dist/chunks/useReorderDragList-nQMVwNBd.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"Input-DRUeowbz.js","names":[],"sources":["../../src/components/Input/Input.module.css","../../src/components/Input/Input.tsx"],"sourcesContent":[".field {\n display: flex;\n flex-direction: column;\n width: 100%;\n min-width: 0;\n gap: 4px;\n}\n\n.frame {\n display: flex;\n align-items: center;\n gap: 6px;\n height: var(--wzl-control-h);\n padding: 0 8px;\n background: var(--wzl-surface-sunken);\n border: 1px solid var(--wzl-border);\n border-radius: var(--wzl-radius-sm);\n color: var(--wzl-fg);\n font-family: var(--wzl-font-ui);\n font-size: var(--wzl-font-size);\n line-height: 1;\n transition: border-color var(--wzl-motion-fast), box-shadow var(--wzl-motion-fast);\n}\n\n.frame:focus-within {\n border-color: var(--wzl-focus-ring);\n box-shadow: 0 0 0 1px var(--wzl-focus-ring);\n}\n\n.field[data-invalid] .frame {\n border-color: var(--wzl-danger);\n}\n\n.field[data-disabled] .frame {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.frame input {\n flex: 1;\n min-width: 0;\n background: transparent;\n border: none;\n outline: none;\n color: inherit;\n font: inherit;\n padding: 0;\n}\n\n.frame input::placeholder {\n color: var(--wzl-fg-subtle);\n}\n\n.adornment {\n display: inline-flex;\n align-items: center;\n color: var(--wzl-fg-subtle);\n font-size: var(--wzl-font-size-sm);\n pointer-events: none;\n}\n","import { forwardRef, type ReactNode, type Ref } from 'react';\nimport {\n TextField,\n Label,\n Input as RACInput,\n Text,\n FieldError,\n type TextFieldProps as RACTextFieldProps,\n type ValidationResult,\n} from 'react-aria-components';\nimport { fieldClasses } from '../Field/Field';\nimport s from './Input.module.css';\n\n/** Props for {@link Input}, on top of React Aria's `TextField` props. */\nexport type InputProps = Omit<RACTextFieldProps, 'children' | 'className'> & {\n label?: ReactNode;\n description?: ReactNode;\n errorMessage?: ReactNode | ((v: ValidationResult) => ReactNode);\n placeholder?: string;\n leadingAdornment?: ReactNode;\n trailingAdornment?: ReactNode;\n className?: string;\n};\n\n/**\n * Single-line text input wrapping React Aria's TextField. Supplies a\n * default skin against the `--wzl-*` token system, and exposes the\n * familiar label / description / errorMessage / adornment slot shape.\n *\n * `ref` forwards to the underlying `<input>`.\n */\nexport const Input = forwardRef(function Input(\n props: InputProps,\n ref: Ref<HTMLInputElement>,\n) {\n const {\n label,\n description,\n errorMessage,\n placeholder,\n leadingAdornment,\n trailingAdornment,\n className,\n ...textFieldProps\n } = props;\n\n return (\n <TextField {...textFieldProps} className={[s.field, fieldClasses.root, className].filter(Boolean).join(' ')}>\n {label !== undefined && <Label className={fieldClasses.label}>{label}</Label>}\n <div className={s.frame}>\n {leadingAdornment !== undefined && <span className={s.adornment}>{leadingAdornment}</span>}\n <RACInput ref={ref} placeholder={placeholder} />\n {trailingAdornment !== undefined && <span className={s.adornment}>{trailingAdornment}</span>}\n </div>\n {description !== undefined && (\n <Text slot=\"description\" className={fieldClasses.hint}>\n {description}\n </Text>\n )}\n <FieldError className={fieldClasses.error}>{errorMessage}</FieldError>\n </TextField>\n );\n});\n"],"mappings":";;;;;;;;GC+Ba,IAAQ,EAAW,SAC9B,GACA,GACA;CACA,IAAM,EACJ,UACA,gBACA,iBACA,gBACA,qBACA,sBACA,cACA,GAAG,MACD;AAEJ,QACE,kBAAC,GAAD;EAAW,GAAI;EAAgB,WAAW;GAAC,EAAE;GAAO,EAAa;GAAM;GAAU,CAAC,OAAO,QAAQ,CAAC,KAAK,IAAI;YAA3G;GACG,MAAU,KAAA,KAAa,kBAAC,GAAD;IAAO,WAAW,EAAa;cAAQ;IAAc,CAAA;GAC7E,kBAAC,OAAD;IAAK,WAAW,EAAE;cAAlB;KACG,MAAqB,KAAA,KAAa,kBAAC,QAAD;MAAM,WAAW,EAAE;gBAAY;MAAwB,CAAA;KAC1F,kBAAC,GAAD;MAAe;MAAkB;MAAe,CAAA;KAC/C,MAAsB,KAAA,KAAa,kBAAC,QAAD;MAAM,WAAW,EAAE;gBAAY;MAAyB,CAAA;KACxF;;GACL,MAAgB,KAAA,KACf,kBAAC,GAAD;IAAM,MAAK;IAAc,WAAW,EAAa;cAC9C;IACI,CAAA;GAET,kBAAC,GAAD;IAAY,WAAW,EAAa;cAAQ;IAA0B,CAAA;GAC5D;;EAEd"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ItemList-BUTk9E8-.js","names":[],"sources":["../../src/components/ItemList/ItemList.module.css","../../src/components/ItemList/ItemList.tsx"],"sourcesContent":["/* One height and one inset for every sidebar list. A panel stacking two of\n them has to have their rows line up, which is what a private copy of this\n file per list stopped happening. */\n.list {\n display: flex;\n flex-direction: column;\n gap: 1px;\n user-select: none;\n -webkit-user-select: none;\n position: relative;\n width: 100%;\n}\n\n.row {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 0 8px;\n height: 24px;\n font-size: 12px;\n color: var(--wzl-fg);\n background: transparent;\n border-radius: 2px;\n cursor: default;\n overflow: hidden;\n white-space: nowrap;\n}\n\n.row:hover {\n background: var(--wzl-surface);\n}\n\n.label {\n flex: 1 1 auto;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.selected,\n.selected:hover {\n background: var(--wzl-border);\n color: var(--wzl-fg);\n}\n\n/* Present but not in effect. */\n.muted {\n color: var(--wzl-fg-subtle);\n}\n\n.empty {\n padding: 12px 8px;\n font-size: 12px;\n color: var(--wzl-fg-subtle);\n font-style: italic;\n}\n","/**\n * The row chrome behind a sidebar list — layers, history, anything that is a\n * flat column of selectable rows in a panel.\n *\n * It owns the container, the row box and the empty state, and nothing else:\n * what a row *means* stays with the consumer. History dims its redo entries\n * and rules a line under the current one; a layer list drags to reorder and\n * leads each row with a swatch. Both reach that through `className` and\n * `rowProps` rather than through options here, so this does not grow a flag\n * per consumer.\n *\n * Rows are one height and one inset for every list, which is the point: two\n * panels stacked in the same sidebar have to agree, and they did not while\n * each owned a private copy of the same CSS.\n */\nimport { forwardRef, type HTMLAttributes, type ReactNode, type Ref } from 'react';\nimport s from './ItemList.module.css';\n\n/** One row. `id` is the React key. */\nexport interface ItemListRow {\n id: string;\n label: ReactNode;\n /** Fixed-size content before the label — a color swatch, a checkbox. */\n leading?: ReactNode;\n /** The row the list considers current. */\n selected?: boolean;\n /** Present but not in effect — history's redo entries. */\n muted?: boolean;\n /** Consumer classes for states this component has no opinion about. */\n className?: string;\n /** Handlers and data attributes for this row's element. `data-*` is\n * spelled out because `HTMLAttributes` does not admit it, and every\n * consumer here marks its rows up with one. */\n rowProps?: HTMLAttributes<HTMLDivElement> & Record<`data-${string}`, unknown>;\n}\n\nexport interface ItemListProps {\n rows: readonly ItemListRow[];\n /** Shown in place of the rows when there are none. */\n empty?: ReactNode;\n className?: string;\n /** Rendered inside the container above the rows — a drop indicator. */\n overlay?: ReactNode;\n /** Spread onto the container: pointer handlers for a drag, `aria-label`. */\n containerProps?: HTMLAttributes<HTMLDivElement>;\n}\n\nexport const ItemList = forwardRef(function ItemList(\n { rows, empty, className, overlay, containerProps }: ItemListProps,\n ref: Ref<HTMLDivElement>,\n) {\n const cls = [s.list, className].filter(Boolean).join(' ');\n if (rows.length === 0) {\n return (\n <div className={cls} ref={ref} {...containerProps}>\n <div className={s.empty}>{empty ?? '—'}</div>\n </div>\n );\n }\n return (\n <div className={cls} ref={ref} {...containerProps}>\n {overlay}\n {rows.map((row) => (\n <div\n key={row.id}\n className={[\n s.row,\n row.selected && s.selected,\n row.muted && s.muted,\n row.className,\n ].filter(Boolean).join(' ')}\n {...row.rowProps}\n >\n {row.leading}\n <span className={s.label}>{row.label}</span>\n </div>\n ))}\n </div>\n );\n});\n"],"mappings":";;;;;;;;;GC+Ca,IAAW,EAAW,SACjC,EAAE,SAAM,UAAO,cAAW,YAAS,qBACnC,GACA;CACA,IAAM,IAAM,CAAC,EAAE,MAAM,EAAU,CAAC,OAAO,QAAQ,CAAC,KAAK,IAAI;AAQzD,QAPI,EAAK,WAAW,IAEhB,kBAAC,OAAD;EAAK,WAAW;EAAU;EAAK,GAAI;YACjC,kBAAC,OAAD;GAAK,WAAW,EAAE;aAAQ,KAAS;GAAU,CAAA;EACzC,CAAA,GAIR,kBAAC,OAAD;EAAK,WAAW;EAAU;EAAK,GAAI;YAAnC,CACG,GACA,EAAK,KAAK,MACT,kBAAC,OAAD;GAEE,WAAW;IACT,EAAE;IACF,EAAI,YAAY,EAAE;IAClB,EAAI,SAAS,EAAE;IACf,EAAI;IACL,CAAC,OAAO,QAAQ,CAAC,KAAK,IAAI;GAC3B,GAAI,EAAI;aARV,CAUG,EAAI,SACL,kBAAC,QAAD;IAAM,WAAW,EAAE;cAAQ,EAAI;IAAa,CAAA,CACxC;KAXC,EAAI,GAWL,CACN,CACE;;EAER"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"NumberField-CQ7OJORF.js","names":[],"sources":["../../src/components/NumberField/NumberField.module.css","../../src/components/NumberField/NumberField.tsx"],"sourcesContent":[".field {\n display: flex;\n flex-direction: column;\n width: 100%;\n min-width: 0;\n gap: 4px;\n}\n\n.frame {\n display: flex;\n align-items: stretch;\n height: var(--wzl-control-h);\n background: var(--wzl-surface-sunken);\n border: 1px solid var(--wzl-border);\n border-radius: var(--wzl-radius-sm);\n color: var(--wzl-fg);\n font-family: var(--wzl-font-ui);\n font-size: var(--wzl-font-size);\n line-height: 1;\n overflow: hidden;\n transition: border-color var(--wzl-motion-fast), box-shadow var(--wzl-motion-fast);\n}\n\n.frame:focus-within {\n border-color: var(--wzl-focus-ring);\n box-shadow: 0 0 0 1px var(--wzl-focus-ring);\n}\n\n.field[data-invalid] .frame {\n border-color: var(--wzl-danger);\n}\n\n.field[data-disabled] .frame {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.frame input {\n flex: 1;\n min-width: 0;\n background: transparent;\n border: none;\n outline: none;\n color: inherit;\n font: inherit;\n padding: 0 8px;\n text-align: right;\n -moz-appearance: textfield;\n}\n\n.frame input::-webkit-outer-spin-button,\n.frame input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n.steppers {\n display: flex;\n flex-direction: column;\n border-left: 1px solid var(--wzl-border);\n}\n\n.stepper {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 18px;\n flex: 1;\n background: transparent;\n border: none;\n color: var(--wzl-fg-muted);\n cursor: pointer;\n padding: 0;\n font-size: var(--wzl-font-size-2xs);\n line-height: 1;\n}\n\n.stepper:not(:last-child) {\n border-bottom: 1px solid var(--wzl-border);\n}\n\n.stepper[data-hovered]:not([data-disabled]) {\n background: var(--wzl-surface-hover);\n color: var(--wzl-fg);\n}\n\n.stepper[data-pressed]:not([data-disabled]) {\n background: var(--wzl-surface-pressed);\n}\n\n.stepper[data-disabled] {\n opacity: 0.4;\n cursor: not-allowed;\n}\n","import { forwardRef, type ReactNode, type Ref } from 'react';\nimport {\n NumberField as RACNumberField,\n Label,\n Input as RACInput,\n Group,\n Button as RACButton,\n Text,\n FieldError,\n type NumberFieldProps as RACNumberFieldProps,\n type ValidationResult,\n} from 'react-aria-components';\nimport { fieldClasses } from '../Field/Field';\nimport s from './NumberField.module.css';\n\n/** Props for {@link NumberField}, on top of React Aria's `NumberField` props. */\nexport type NumberFieldProps = Omit<RACNumberFieldProps, 'children' | 'className'> & {\n label?: ReactNode;\n description?: ReactNode;\n errorMessage?: ReactNode | ((v: ValidationResult) => ReactNode);\n /** Hide the up/down stepper buttons. Defaults to false. */\n hideSteppers?: boolean;\n /** Native input placeholder — e.g. `'Mixed'` for a multi-selection\n * editor with no shared value. */\n placeholder?: string;\n className?: string;\n};\n\n/**\n * Numeric input with stepper buttons, wrapping React Aria's NumberField and\n * supplying the same label / description / errorMessage slots as `Input`.\n * Arrow keys and scroll step the value; parsing and formatting are React\n * Aria's.\n *\n * `ref` forwards to the underlying `<input>`.\n */\nexport const NumberField = forwardRef(function NumberField(\n props: NumberFieldProps,\n ref: Ref<HTMLInputElement>,\n) {\n const { label, description, errorMessage, hideSteppers, placeholder, className, ...rest } = props;\n return (\n <RACNumberField\n {...rest}\n className={[s.field, fieldClasses.root, className].filter(Boolean).join(' ')}\n >\n {label !== undefined && <Label className={fieldClasses.label}>{label}</Label>}\n <Group className={s.frame}>\n <RACInput ref={ref} placeholder={placeholder} />\n {!hideSteppers && (\n <div className={s.steppers}>\n <RACButton slot=\"increment\" className={s.stepper} aria-label=\"Increment\">▲</RACButton>\n <RACButton slot=\"decrement\" className={s.stepper} aria-label=\"Decrement\">▼</RACButton>\n </div>\n )}\n </Group>\n {description !== undefined && (\n <Text slot=\"description\" className={fieldClasses.hint}>\n {description}\n </Text>\n )}\n <FieldError className={fieldClasses.error}>{errorMessage}</FieldError>\n </RACNumberField>\n );\n});\n"],"mappings":";;;;;;;;;GCoCa,IAAc,EAAW,SACpC,GACA,GACA;CACA,IAAM,EAAE,UAAO,gBAAa,iBAAc,iBAAc,gBAAa,cAAW,GAAG,MAAS;AAC5F,QACE,kBAAC,GAAD;EACE,GAAI;EACJ,WAAW;GAAC,EAAE;GAAO,EAAa;GAAM;GAAU,CAAC,OAAO,QAAQ,CAAC,KAAK,IAAI;YAF9E;GAIG,MAAU,KAAA,KAAa,kBAAC,GAAD;IAAO,WAAW,EAAa;cAAQ;IAAc,CAAA;GAC7E,kBAAC,GAAD;IAAO,WAAW,EAAE;cAApB,CACE,kBAAC,GAAD;KAAe;KAAkB;KAAe,CAAA,EAC/C,CAAC,KACA,kBAAC,OAAD;KAAK,WAAW,EAAE;eAAlB,CACE,kBAAC,GAAD;MAAW,MAAK;MAAY,WAAW,EAAE;MAAS,cAAW;gBAAY;MAAa,CAAA,EACtF,kBAAC,GAAD;MAAW,MAAK;MAAY,WAAW,EAAE;MAAS,cAAW;gBAAY;MAAa,CAAA,CAClF;OAEF;;GACP,MAAgB,KAAA,KACf,kBAAC,GAAD;IAAM,MAAK;IAAc,WAAW,EAAa;cAC9C;IACI,CAAA;GAET,kBAAC,GAAD;IAAY,WAAW,EAAa;cAAQ;IAA0B,CAAA;GACvD;;EAEnB"}
@@ -1,655 +0,0 @@
1
- import { t as e } from "./dlog-CMYiRF3Q.js";
2
- import { n as t, t as n } from "./Tooltip-Bq8Hvj4r.js";
3
- import { i as r, n as i } from "./number-D3TDawLC.js";
4
- import { n as a } from "./CurveEditor-COJ6WK9K.js";
5
- import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
6
- import { useCallback as l, useMemo as u, useState as d } from "react";
7
- import { Focusable as f } from "react-aria-components";
8
- var p = {
9
- field: "_field_17u88_1",
10
- plot: "_plot_17u88_12",
11
- marks: "_marks_17u88_17",
12
- actions: "_actions_17u88_23",
13
- action: "_action_17u88_23"
14
- };
15
- //#endregion
16
- //#region src/components/Properties/CurveField.tsx
17
- function m({ values: t, min: n, max: r, step: i, width: o, height: d = 110, defaults: f, onChange: m, marks: h }) {
18
- let g = u(() => {
19
- let e = [];
20
- for (let n = 0; n + 1 < t.length; n += 2) e.push({
21
- x: t[n],
22
- y: t[n + 1]
23
- });
24
- return e;
25
- }, [t]), _ = l((t) => {
26
- let a = Array(t.length * 2);
27
- for (let e = 0; e < t.length; e++) {
28
- let o = Math.round(t[e].y / i) * i, s = Math.max(n, Math.min(r, o));
29
- a[e * 2] = t[e].x, a[e * 2 + 1] = s;
30
- }
31
- e("curve-field", "handleChange", {
32
- nLen: t.length,
33
- flatLen: a.length,
34
- sample: a.slice(0, 4)
35
- }), m(a);
36
- }, [
37
- m,
38
- n,
39
- r,
40
- i
41
- ]), v = l(() => {
42
- let e = [];
43
- for (let n = 0; n + 1 < t.length; n += 2) e.push({
44
- x: 1 - t[n],
45
- y: t[n + 1]
46
- });
47
- e.sort((e, t) => e.x - t.x);
48
- let n = [];
49
- for (let t of e) n.push(t.x, t.y);
50
- m(n);
51
- }, [t, m]), y = l(() => {
52
- let e = (n + r) / 2, i = Array(t.length);
53
- for (let n = 0; n + 1 < t.length; n += 2) i[n] = t[n], i[n + 1] = 2 * e - t[n + 1];
54
- m(i);
55
- }, [
56
- t,
57
- n,
58
- r,
59
- m
60
- ]);
61
- return /* @__PURE__ */ c("div", {
62
- className: p.field,
63
- children: [/* @__PURE__ */ c("div", {
64
- className: p.plot,
65
- children: [/* @__PURE__ */ s(a, {
66
- value: g,
67
- onInput: _,
68
- domain: "1d",
69
- constrain: "function",
70
- xRange: [0, 1],
71
- yRange: [n, r],
72
- width: o,
73
- height: d,
74
- endpoints: "pinned-x",
75
- addPointMode: "click-curve",
76
- minPoints: 2,
77
- grid: {},
78
- history: !1
79
- }), h && h.length > 0 && /* @__PURE__ */ s("svg", {
80
- className: p.marks,
81
- width: o,
82
- height: d,
83
- viewBox: `0 0 ${o} ${d}`,
84
- "aria-hidden": "true",
85
- children: h.map((e) => {
86
- let t = e.color ?? "#ffcc00";
87
- if (e.kind === "band") {
88
- let n = Math.max(0, Math.min(1, e.x[0])) * o, r = Math.max(0, Math.min(1, e.x[1])) * o, i = Math.min(n, r), a = Math.abs(r - n);
89
- return /* @__PURE__ */ c("g", { children: [
90
- /* @__PURE__ */ s("rect", {
91
- x: i,
92
- y: 0,
93
- width: a,
94
- height: d,
95
- fill: t,
96
- fillOpacity: .4
97
- }),
98
- /* @__PURE__ */ s("line", {
99
- x1: i,
100
- y1: 0,
101
- x2: i,
102
- y2: d,
103
- stroke: t,
104
- strokeOpacity: .85,
105
- strokeWidth: 1
106
- }),
107
- /* @__PURE__ */ s("line", {
108
- x1: i + a,
109
- y1: 0,
110
- x2: i + a,
111
- y2: d,
112
- stroke: t,
113
- strokeOpacity: .85,
114
- strokeWidth: 1
115
- })
116
- ] }, `band-${e.x[0]}-${e.x[1]}-${t}`);
117
- }
118
- let n = Math.max(0, Math.min(1, e.x)) * o;
119
- return /* @__PURE__ */ s("line", {
120
- x1: n,
121
- y1: 0,
122
- x2: n,
123
- y2: d,
124
- stroke: t,
125
- strokeWidth: 1
126
- }, `mark-${e.x}-${t}`);
127
- })
128
- })]
129
- }), /* @__PURE__ */ c("div", {
130
- className: p.actions,
131
- children: [
132
- /* @__PURE__ */ s("button", {
133
- type: "button",
134
- className: p.action,
135
- onClick: v,
136
- children: "Flip horizontally"
137
- }),
138
- /* @__PURE__ */ s("button", {
139
- type: "button",
140
- className: p.action,
141
- onClick: y,
142
- children: "Flip vertically"
143
- }),
144
- f && /* @__PURE__ */ s("button", {
145
- type: "button",
146
- className: p.action,
147
- onClick: () => m([...f]),
148
- children: "Reset"
149
- })
150
- ]
151
- })]
152
- });
153
- }
154
- var h = {
155
- panel: "_panel_1t04m_9",
156
- list: "_list_1t04m_3",
157
- row: "_row_1t04m_4",
158
- group: "_group_1t04m_4",
159
- subpanel: "_subpanel_1t04m_3",
160
- card: "_card_1t04m_14",
161
- cardList: "_cardList_1t04m_15",
162
- panelTitle: "_panelTitle_1t04m_35",
163
- listPairs: "_listPairs_1t04m_3",
164
- rowColor: "_rowColor_1t04m_4",
165
- span: "_span_1t04m_66",
166
- rowLabel: "_rowLabel_1t04m_94",
167
- readout: "_readout_1t04m_120",
168
- help: "_help_1t04m_132",
169
- readoutInput: "_readoutInput_1t04m_164",
170
- readoutGroup: "_readoutGroup_1t04m_202",
171
- readoutUnit: "_readoutUnit_1t04m_208",
172
- rowInline: "_rowInline_1t04m_268",
173
- toggle: "_toggle_1t04m_286",
174
- alpha: "_alpha_1t04m_401",
175
- alphaDisabled: "_alphaDisabled_1t04m_419",
176
- rowCheckbox: "_rowCheckbox_1t04m_441",
177
- toggleButton: "_toggleButton_1t04m_473",
178
- toggleButtonSelected: "_toggleButtonSelected_1t04m_499",
179
- groupTitle: "_groupTitle_1t04m_518",
180
- groupBody: "_groupBody_1t04m_4",
181
- groupPairs: "_groupPairs_1t04m_549",
182
- subpanelTitle: "_subpanelTitle_1t04m_581",
183
- cardDragging: "_cardDragging_1t04m_625",
184
- cardExpanded: "_cardExpanded_1t04m_629",
185
- cardAccented: "_cardAccented_1t04m_633",
186
- cardHead: "_cardHead_1t04m_648",
187
- cardHandle: "_cardHandle_1t04m_669",
188
- cardIndexBadge: "_cardIndexBadge_1t04m_682",
189
- cardTitle: "_cardTitle_1t04m_700",
190
- cardPrimary: "_cardPrimary_1t04m_710",
191
- cardRemove: "_cardRemove_1t04m_725",
192
- cardBody: "_cardBody_1t04m_754",
193
- cardListWrap: "_cardListWrap_1t04m_766",
194
- cardDropHint: "_cardDropHint_1t04m_770",
195
- cardListEmpty: "_cardListEmpty_1t04m_778"
196
- };
197
- //#endregion
198
- //#region src/components/Properties/EffectCard.tsx
199
- function g({ title: e, children: t, className: n }) {
200
- return /* @__PURE__ */ c("div", {
201
- className: n ? `${h.subpanel} ${n}` : h.subpanel,
202
- children: [/* @__PURE__ */ c("h4", {
203
- className: h.subpanelTitle,
204
- children: [/* @__PURE__ */ s("span", { children: e }), /* @__PURE__ */ s("hr", {})]
205
- }), t]
206
- });
207
- }
208
- function _({ title: e, primary: t, accent: n, index: r, expanded: i = !0, onToggleExpanded: a, onRemove: o, draggable: l, onPressHandle: u, onReleaseHandle: d, onDragStart: f, onDragEnd: p, onDragOver: m, onDragLeave: g, onDrop: _, dragging: y, children: b, className: x }) {
209
- let S = `${i ? ` ${h.cardExpanded}` : ""}${y ? ` ${h.cardDragging}` : ""}${n ? ` ${h.cardAccented}` : ""}`, C = `${h.card}${S}${x ? ` ${x}` : ""}`, w = n ? { "--wzl-effect-card-accent": n } : void 0, T = a ? {
210
- role: "button",
211
- tabIndex: 0,
212
- onClick: a,
213
- onKeyDown: (e) => {
214
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), a());
215
- }
216
- } : {};
217
- return /* @__PURE__ */ c("div", {
218
- className: C,
219
- style: w,
220
- draggable: l,
221
- onDragStart: f,
222
- onDragEnd: p,
223
- onDragOver: m,
224
- onDragLeave: g,
225
- onDrop: _,
226
- children: [/* @__PURE__ */ c("div", {
227
- className: h.cardHead,
228
- ...T,
229
- children: [
230
- r == null ? /* @__PURE__ */ s("span", {
231
- className: h.cardHandle,
232
- "aria-hidden": "true",
233
- title: "Drag to reorder",
234
- onMouseDown: u,
235
- onMouseUp: d,
236
- children: /* @__PURE__ */ s(v, {})
237
- }) : /* @__PURE__ */ s("button", {
238
- type: "button",
239
- className: `${h.cardIndexBadge} ${h.cardHandle}`,
240
- title: "Drag to reorder · click to toggle",
241
- "aria-label": `Item ${r + 1} — drag to reorder, click to toggle`,
242
- onMouseDown: u,
243
- onMouseUp: d,
244
- onClick: (e) => {
245
- e.stopPropagation(), a?.();
246
- },
247
- children: r + 1
248
- }),
249
- /* @__PURE__ */ s("span", {
250
- className: h.cardTitle,
251
- children: e
252
- }),
253
- t != null && /* @__PURE__ */ s("span", {
254
- className: h.cardPrimary,
255
- children: t
256
- }),
257
- o && /* @__PURE__ */ s("button", {
258
- type: "button",
259
- className: h.cardRemove,
260
- onClick: (e) => {
261
- e.stopPropagation(), o();
262
- },
263
- title: "Remove",
264
- "aria-label": "Remove",
265
- children: "✕"
266
- })
267
- ]
268
- }), i && /* @__PURE__ */ s("div", {
269
- className: h.cardBody,
270
- children: b
271
- })]
272
- });
273
- }
274
- function v() {
275
- return /* @__PURE__ */ c("svg", {
276
- width: "10",
277
- height: "14",
278
- viewBox: "0 0 10 14",
279
- "aria-hidden": "true",
280
- children: [
281
- /* @__PURE__ */ s("circle", {
282
- cx: "3",
283
- cy: "3",
284
- r: "1.3",
285
- fill: "currentColor"
286
- }),
287
- /* @__PURE__ */ s("circle", {
288
- cx: "7",
289
- cy: "3",
290
- r: "1.3",
291
- fill: "currentColor"
292
- }),
293
- /* @__PURE__ */ s("circle", {
294
- cx: "3",
295
- cy: "7",
296
- r: "1.3",
297
- fill: "currentColor"
298
- }),
299
- /* @__PURE__ */ s("circle", {
300
- cx: "7",
301
- cy: "7",
302
- r: "1.3",
303
- fill: "currentColor"
304
- }),
305
- /* @__PURE__ */ s("circle", {
306
- cx: "3",
307
- cy: "11",
308
- r: "1.3",
309
- fill: "currentColor"
310
- }),
311
- /* @__PURE__ */ s("circle", {
312
- cx: "7",
313
- cy: "11",
314
- r: "1.3",
315
- fill: "currentColor"
316
- })
317
- ]
318
- });
319
- }
320
- function y({ items: e, renderItem: t, onReorder: n, empty: r, defaultExpandedIds: i }) {
321
- let [a, l] = d(() => new Set(i ?? [])), [u, f] = d(null), [p, m] = d(null), [g, _] = d(null);
322
- return e.length === 0 ? /* @__PURE__ */ s(o, { children: r ?? /* @__PURE__ */ s("div", {
323
- className: h.cardListEmpty,
324
- children: "No items."
325
- }) }) : /* @__PURE__ */ s("div", {
326
- className: h.cardList,
327
- children: e.map((e) => {
328
- let r = a.has(e.id), i = u === e.id, o = p === e.id, d = g && g.id === e.id && g.position === "before", v = g && g.id === e.id && g.position === "after", y = () => l((t) => {
329
- let n = new Set(t);
330
- return n.has(e.id) ? n.delete(e.id) : n.add(e.id), n;
331
- });
332
- return /* @__PURE__ */ c("div", {
333
- className: h.cardListWrap,
334
- children: [
335
- d && /* @__PURE__ */ s("div", { className: h.cardDropHint }),
336
- t(e, {
337
- isExpanded: r,
338
- isDragging: i,
339
- toggleExpanded: y,
340
- cardProps: {
341
- expanded: r,
342
- dragging: i,
343
- draggable: o,
344
- onToggleExpanded: y,
345
- onPressHandle: () => m(e.id),
346
- onReleaseHandle: () => m(null),
347
- onDragStart: (t) => {
348
- t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData("text/plain", String(e.id)), f(e.id);
349
- },
350
- onDragEnd: () => {
351
- f(null), m(null), _(null);
352
- },
353
- onDragOver: (t) => {
354
- if (u === null || u === e.id) return;
355
- t.preventDefault(), t.dataTransfer.dropEffect = "move";
356
- let n = t.currentTarget.getBoundingClientRect(), r = t.clientY < n.top + n.height / 2 ? "before" : "after";
357
- _({
358
- id: e.id,
359
- position: r
360
- });
361
- },
362
- onDragLeave: () => {
363
- _((t) => t && t.id === e.id ? null : t);
364
- },
365
- onDrop: (t) => {
366
- if (t.preventDefault(), u === null || u === e.id) {
367
- _(null);
368
- return;
369
- }
370
- let r = t.currentTarget.getBoundingClientRect(), i = t.clientY < r.top + r.height / 2 ? "before" : "after";
371
- n(u, e.id, i), _(null);
372
- }
373
- }
374
- }),
375
- v && /* @__PURE__ */ s("div", { className: h.cardDropHint })
376
- ]
377
- }, String(e.id));
378
- })
379
- });
380
- }
381
- //#endregion
382
- //#region src/components/Properties/PropertyGroup.tsx
383
- function b({ title: e, hidden: t, children: n, className: r, pack: i = "auto-color" }) {
384
- if (t) return null;
385
- let a = i === "pairs" ? ` ${h.groupPairs}` : "";
386
- return /* @__PURE__ */ c("div", {
387
- className: `${h.group}${a}${r ? ` ${r}` : ""}`,
388
- children: [/* @__PURE__ */ c("h3", {
389
- className: h.groupTitle,
390
- children: [
391
- /* @__PURE__ */ s("hr", {}),
392
- /* @__PURE__ */ s("span", { children: e }),
393
- /* @__PURE__ */ s("hr", {})
394
- ]
395
- }), /* @__PURE__ */ s("div", {
396
- className: h.groupBody,
397
- children: n
398
- })]
399
- });
400
- }
401
- //#endregion
402
- //#region src/components/Properties/PropertyPanel.tsx
403
- function x({ title: e, children: t, className: n }) {
404
- return /* @__PURE__ */ c("div", {
405
- className: n ? `${h.panel} ${n}` : h.panel,
406
- children: [e != null && /* @__PURE__ */ s("h2", {
407
- className: h.panelTitle,
408
- children: e
409
- }), t]
410
- });
411
- }
412
- function S({ children: e, className: t, pack: n = "auto-color" }) {
413
- let r = n === "pairs" ? ` ${h.listPairs}` : "";
414
- return /* @__PURE__ */ s("div", {
415
- className: `${h.list}${r}${t ? ` ${t}` : ""}`,
416
- children: e
417
- });
418
- }
419
- function C({ children: e, className: t }) {
420
- return /* @__PURE__ */ s("div", {
421
- className: t ? `${h.span} ${t}` : h.span,
422
- children: e
423
- });
424
- }
425
- function w({ label: e, readout: t, description: n, variant: r = "default", layout: i = "block", span: a, children: o, htmlFor: l, className: u }) {
426
- let d = r === "color" ? ` ${h.rowColor}` : r === "checkbox" ? ` ${h.rowCheckbox}` : "", f = r === "default" && i === "inline" ? ` ${h.rowInline}` : "", p = a ? ` ${h.span}` : "";
427
- return /* @__PURE__ */ c("label", {
428
- className: `${h.row}${d}${f}${p}${u ? ` ${u}` : ""}`,
429
- htmlFor: l,
430
- children: [/* @__PURE__ */ c("span", {
431
- className: h.rowLabel,
432
- children: [
433
- e,
434
- n ? /* @__PURE__ */ s(T, {
435
- label: e,
436
- description: n
437
- }) : null,
438
- t != null && /* @__PURE__ */ s("em", {
439
- className: h.readout,
440
- children: t
441
- })
442
- ]
443
- }), o]
444
- });
445
- }
446
- function T({ label: e, description: r }) {
447
- let i = typeof e == "string" ? e : "this setting";
448
- return /* @__PURE__ */ c(t, { children: [/* @__PURE__ */ s(f, { children: /* @__PURE__ */ s("button", {
449
- type: "button",
450
- className: h.help,
451
- "aria-label": `About ${i}`,
452
- onClick: (e) => {
453
- e.preventDefault(), e.stopPropagation();
454
- },
455
- onMouseDown: (e) => e.stopPropagation(),
456
- children: "ⓘ"
457
- }) }), /* @__PURE__ */ s(n, { children: r })] });
458
- }
459
- function E({ label: t, value: n, min: r, max: a, step: o = 1, onChange: c, format: l, unit: u, layout: d, description: f, span: p }) {
460
- let m = o >= 1 ? 0 : Math.min(6, Math.max(0, Math.ceil(-Math.log10(o))));
461
- return /* @__PURE__ */ s(w, {
462
- span: p,
463
- label: t,
464
- readout: /* @__PURE__ */ s(D, {
465
- value: n,
466
- min: r,
467
- max: a,
468
- format: l ?? ((e) => i(e, {
469
- useGrouping: !1,
470
- minimumFractionDigits: m,
471
- maximumFractionDigits: m
472
- })),
473
- unit: u,
474
- onCommit: c
475
- }),
476
- layout: d,
477
- description: f,
478
- children: /* @__PURE__ */ s("input", {
479
- type: "range",
480
- tabIndex: -1,
481
- min: r,
482
- max: a,
483
- step: o,
484
- value: n,
485
- onChange: (n) => {
486
- let r = Number(n.target.value);
487
- e("property-panel", "slider", {
488
- label: t,
489
- value: r
490
- }), c(r);
491
- }
492
- })
493
- });
494
- }
495
- function D({ value: e, min: t, max: n, format: a, unit: o, onCommit: l }) {
496
- let [u, f] = d(null), p = (e) => a ? a(e) : i(e, {
497
- useGrouping: !1,
498
- maximumFractionDigits: 20
499
- }), m = u === null ? (() => {
500
- let t = p(e);
501
- return typeof t == "string" ? t : String(t);
502
- })() : u, g = o == null ? null : typeof o == "string" ? /* @__PURE__ */ s("span", {
503
- className: h.readoutUnit,
504
- children: o
505
- }) : o, _ = () => {
506
- if (u !== null) {
507
- let e = r(u);
508
- Number.isFinite(e) && l(Math.min(n, Math.max(t, e)));
509
- }
510
- f(null);
511
- };
512
- return /* @__PURE__ */ c("span", {
513
- className: h.readoutGroup,
514
- children: [/* @__PURE__ */ s("input", {
515
- type: "text",
516
- inputMode: "decimal",
517
- className: h.readoutInput,
518
- value: m,
519
- onFocus: (t) => {
520
- let n = p(e);
521
- f(typeof n == "string" ? n : String(n)), t.currentTarget.select();
522
- },
523
- onChange: (e) => f(e.target.value.replace(/-/g, "−")),
524
- onBlur: _,
525
- onClick: (e) => {
526
- e.preventDefault(), e.stopPropagation(), e.currentTarget.focus();
527
- },
528
- onMouseDown: (e) => e.stopPropagation(),
529
- onKeyDown: (e) => {
530
- e.key === "Enter" ? (_(), e.currentTarget.blur()) : e.key === "Escape" && (f(null), e.currentTarget.blur());
531
- }
532
- }), g]
533
- });
534
- }
535
- function O({ label: e, value: t, onChange: n, alpha: r, onAlphaChange: i, alphaDisabled: a, description: o, span: l }) {
536
- let u = r != null;
537
- return /* @__PURE__ */ c(w, {
538
- span: l,
539
- label: e,
540
- variant: "color",
541
- className: a ? h.alphaDisabled : void 0,
542
- description: o,
543
- children: [/* @__PURE__ */ s("input", {
544
- type: "color",
545
- value: t,
546
- onChange: (e) => n(e.target.value)
547
- }), u && /* @__PURE__ */ s("input", {
548
- type: "range",
549
- className: h.alpha,
550
- min: 0,
551
- max: 1,
552
- step: .01,
553
- value: r,
554
- disabled: a,
555
- onChange: (e) => i?.(Number(e.target.value))
556
- })]
557
- });
558
- }
559
- function k({ label: e, value: t, onChange: n, span: r, description: i }) {
560
- return /* @__PURE__ */ s(w, {
561
- span: r,
562
- label: e,
563
- variant: "checkbox",
564
- description: i,
565
- children: /* @__PURE__ */ s("input", {
566
- type: "checkbox",
567
- checked: t,
568
- onChange: (e) => n(e.target.checked)
569
- })
570
- });
571
- }
572
- function A({ label: e, value: t, onChange: n, placeholder: r, maxLength: i, layout: a, description: o, span: c }) {
573
- return /* @__PURE__ */ s(w, {
574
- span: c,
575
- label: e,
576
- layout: a,
577
- description: o,
578
- children: /* @__PURE__ */ s("input", {
579
- type: "text",
580
- value: t,
581
- placeholder: r,
582
- maxLength: i,
583
- onChange: (e) => n(e.target.value)
584
- })
585
- });
586
- }
587
- function j({ label: e, value: t, onChange: n, min: r, max: i, step: a, placeholder: o, layout: c, description: l, span: u }) {
588
- return /* @__PURE__ */ s(w, {
589
- span: u,
590
- label: e,
591
- layout: c,
592
- description: l,
593
- children: /* @__PURE__ */ s("input", {
594
- type: "number",
595
- value: t,
596
- min: r,
597
- max: i,
598
- step: a,
599
- placeholder: o,
600
- onChange: (e) => {
601
- let t = e.target.value;
602
- if (t === "") return;
603
- let r = Number(t);
604
- Number.isFinite(r) && n(r);
605
- }
606
- })
607
- });
608
- }
609
- function M({ label: t, value: n, options: r, onChange: i, layout: a, description: o, span: c }) {
610
- return /* @__PURE__ */ s(w, {
611
- span: c,
612
- label: t,
613
- layout: a,
614
- description: o,
615
- children: /* @__PURE__ */ s("select", {
616
- value: n,
617
- onChange: (n) => {
618
- let r = n.target.value;
619
- e("property-panel", "select", {
620
- label: t,
621
- value: r
622
- }), i(r);
623
- },
624
- children: r.map((e) => /* @__PURE__ */ s("option", {
625
- value: e.value,
626
- children: e.label
627
- }, e.value))
628
- })
629
- });
630
- }
631
- function N({ label: e, value: t, options: n, onChange: r, layout: i, description: a, span: o }) {
632
- return /* @__PURE__ */ s(w, {
633
- span: o,
634
- label: e,
635
- layout: i,
636
- description: a,
637
- children: /* @__PURE__ */ s("div", {
638
- className: h.toggle,
639
- children: n.map((e) => {
640
- let n = e.value === t;
641
- return /* @__PURE__ */ s("button", {
642
- type: "button",
643
- "aria-pressed": n,
644
- className: n ? `${h.toggleButton} ${h.toggleButtonSelected}` : h.toggleButton,
645
- onClick: () => r(e.value),
646
- children: e.label
647
- }, e.value);
648
- })
649
- })
650
- });
651
- }
652
- //#endregion
653
- export { x as a, M as c, N as d, b as f, m as g, g as h, S as i, E as l, y as m, O as n, w as o, _ as p, j as r, C as s, k as t, A as u };
654
-
655
- //# sourceMappingURL=Properties-CFRJ8mYH.js.map