@povio/ui 5.0.0-rc.7 → 5.0.0-rc.8

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 (142) hide show
  1. package/dist/Button-BPTvffuk.js +86 -0
  2. package/dist/{Calendar-BTjajO6i.js → Calendar-BxtOuqIM.js} +3 -3
  3. package/dist/{Checkbox-CV1ILXXO.js → Checkbox-DYxXYfKL.js} +3 -2
  4. package/dist/CheckboxCheckmark-D_uc9pon.js +44 -0
  5. package/dist/{ComponentGallery-Dp0kZVZM.js → ComponentGallery-Da70Y4_Q.js} +17 -17
  6. package/dist/{DatePicker-DOLL7mkc.js → DatePicker-wulRNGyL.js} +6 -6
  7. package/dist/{DatePickerInput-BLBcySA2.js → DatePickerInput-BB_vPlKu.js} +3 -3
  8. package/dist/{DateRangePicker-BF-1CztH.js → DateRangePicker-B0tMVREG.js} +6 -6
  9. package/dist/{DateTimePicker-Cj0qvJUz.js → DateTimePicker-WGMr0bEH.js} +6 -6
  10. package/dist/{FileInput-Br5DQaGQ.js → FileInput-DP105Iy9.js} +2 -2
  11. package/dist/{FileUpload--7ub3EZO.js → FileUpload-CgNDIvzg.js} +3 -3
  12. package/dist/{Form-BJ12MjE-.d.ts → Form-DbEWnCKc.d.ts} +1 -1
  13. package/dist/{FormField-B99dLt8o.js → FormField-AY25LzbW.js} +3 -96
  14. package/dist/{FormFieldError-DeOHHLo2.js → FormFieldError-BVAO5p7H.js} +2 -13
  15. package/dist/{InputItem-CIxbTxZu.js → InputItem-ZeN-aIz8.js} +11 -11
  16. package/dist/{Inputs-DJSKiaWY.js → Inputs-BC5q5Cvj.js} +1 -1
  17. package/dist/{Inputs-DA73LmLc.d.ts → Inputs-O84btFJL.d.ts} +1 -1
  18. package/dist/{NumberRangeInput-B8-LHfg3.js → NumberRangeInput-B_sMIpP1.js} +2 -2
  19. package/dist/{PaginationList-DtvuP63b.js → PaginationList-DptMNpNs.js} +1 -1
  20. package/dist/{Progress-B3mY9rIP.js → Progress-Du30L4_s.js} +2 -27
  21. package/dist/{RadioGroup-DOw3PRoX.js → RadioGroup-CUGNSJql.js} +3 -82
  22. package/dist/{RichTextEditor-D4yN7Wj7.js → RichTextEditor-VDOpj7sk.js} +3 -3
  23. package/dist/{Select-UR0ec2Ux.js → Select-B2pAfwRk.js} +2 -2
  24. package/dist/{Slider-CzEmKYBF.js → Slider-Clc1szFY.js} +1 -1
  25. package/dist/{Switch-CqnGEdeD.js → Switch-CimmMqEk.js} +3 -27
  26. package/dist/{Table-BN2_J_Ne.js → Table-CqepqSfe.js} +2 -1
  27. package/dist/{TextArea-D8WkKsGn.js → TextArea-B3teIhsJ.js} +3 -5
  28. package/dist/TextArea.cva-Bb73hriz.js +5 -0
  29. package/dist/{TimePicker-C4taAOFQ.js → TimePicker-CU_yL2sY.js} +4 -4
  30. package/dist/{Toast-DtG3pA61.js → Toast-DPbnLlBi.js} +1 -1
  31. package/dist/{ToggleGroup-DOk27fgI.js → ToggleGroup-BULVwErp.js} +1 -1
  32. package/dist/{Button-C5rv4Cr2.js → button.cva-rv5Uq4aW.js} +1 -84
  33. package/dist/{CheckboxCheckmark-CpC3wlMs.js → checkbox.cva-IfOByVLA.js} +1 -42
  34. package/dist/components/alert-dialog.js +1 -1
  35. package/dist/components/alert.js +116 -1
  36. package/dist/components/autocomplete.js +2 -2
  37. package/dist/components/button.js +1 -1
  38. package/dist/components/checkbox-group.js +3 -3
  39. package/dist/components/checkbox.js +1 -1
  40. package/dist/components/date-picker.js +1 -1
  41. package/dist/components/date-range-picker.js +1 -1
  42. package/dist/components/date-time-picker.js +1 -1
  43. package/dist/components/file-input.js +1 -1
  44. package/dist/components/file-upload-container.js +1 -1
  45. package/dist/components/file-upload.js +1 -1
  46. package/dist/components/form-field.js +1 -1
  47. package/dist/components/icon-button.js +1 -1
  48. package/dist/components/inline-icon-button.js +1 -1
  49. package/dist/components/input.js +3 -3
  50. package/dist/components/number-field.js +3 -3
  51. package/dist/components/number-range-input.js +1 -1
  52. package/dist/components/pagination-list.js +1 -1
  53. package/dist/components/pagination.js +1 -1
  54. package/dist/components/progress.js +1 -1
  55. package/dist/components/query-autocomplete.js +1 -1
  56. package/dist/components/query-select.js +2 -2
  57. package/dist/components/radio-group.js +1 -1
  58. package/dist/components/select.js +1 -1
  59. package/dist/components/slider.js +1 -1
  60. package/dist/components/split-button.js +1 -1
  61. package/dist/components/switch.js +1 -1
  62. package/dist/components/tag.js +93 -1
  63. package/dist/components/text-area.js +1 -1
  64. package/dist/components/text-button.js +1 -1
  65. package/dist/components/time-picker.js +1 -1
  66. package/dist/components/toast.js +1 -1
  67. package/dist/components/toggle-button.js +1 -1
  68. package/dist/components/toggle-group.js +1 -1
  69. package/dist/components/use-toast.js +2 -2
  70. package/dist/config/app-canvas.d.ts +79 -0
  71. package/dist/config/app-canvas.js +2253 -0
  72. package/dist/config/ui-config.d.ts +1 -1
  73. package/dist/config/ui-configurator.d.ts +1 -920
  74. package/dist/config/ui-configurator.js +127 -1174
  75. package/dist/configuration.context-f_FSPWhQ.d.ts +926 -0
  76. package/dist/{datePickerValue.utils-DCgoSrP3.js → datePickerValue.utils-CIFHjKwv.js} +1 -1
  77. package/dist/{dynamicInputs-iP39lVKf.d.ts → dynamicInputs-ByVMnx4Z.d.ts} +1 -1
  78. package/dist/formFieldError.cva-CsXaQRHX.js +14 -0
  79. package/dist/formFieldHelper.cva-B8F9LmsE.js +96 -0
  80. package/dist/grip-vertical-BVxcjdfr.js +54 -0
  81. package/dist/index.d.ts +2 -2
  82. package/dist/index.js +24 -19
  83. package/dist/inspection-model-LuI36xTg.js +1339 -0
  84. package/dist/progress.cva-WQB8BGbk.js +28 -0
  85. package/dist/radio.cva-DGbvTymp.js +82 -0
  86. package/dist/rhf/checkbox.js +1 -1
  87. package/dist/rhf/date-picker.js +1 -1
  88. package/dist/rhf/date-range-picker.js +1 -1
  89. package/dist/rhf/date-time-picker.js +1 -1
  90. package/dist/rhf/file-input.js +1 -1
  91. package/dist/rhf/file-upload.js +1 -1
  92. package/dist/rhf/inputs.d.ts +1 -1
  93. package/dist/rhf/number-range-input.js +1 -1
  94. package/dist/rhf/radio-group.js +1 -1
  95. package/dist/rhf/rich-text-editor.js +1 -1
  96. package/dist/rhf/select.js +1 -1
  97. package/dist/rhf/slider.js +1 -1
  98. package/dist/rhf/switch.js +1 -1
  99. package/dist/rhf/text-area.js +1 -1
  100. package/dist/rhf/time-picker.js +1 -1
  101. package/dist/rhf/toggle-group.js +1 -1
  102. package/dist/rhf.d.ts +2 -2
  103. package/dist/rhf.js +24 -19
  104. package/dist/rich-text-editor.js +1 -1
  105. package/dist/{staticDateTimeSegments-DtU63_dw.js → staticDateTimeSegments-sf_ND7zL.js} +1 -1
  106. package/dist/{staticSelect.utils-uHa8f_c6.js → staticSelect.utils-CzlnLPPd.js} +3 -3
  107. package/dist/status.cva-6HxNR4EP.js +130 -0
  108. package/dist/styles/app-canvas.css +733 -0
  109. package/dist/styles/configurator.css +19 -5
  110. package/dist/switch.cva-BX3HOxbL.js +27 -0
  111. package/dist/{table.cva-D5oQ-QvA.js → table.cva-DlMT-zLD.js} +1 -54
  112. package/dist/{Tag-DPg5sL1Z.js → tag.cva-B3MudLeC.js} +1 -92
  113. package/dist/tanstack/checkbox.js +1 -1
  114. package/dist/tanstack/date-picker.js +1 -1
  115. package/dist/tanstack/date-range-picker.js +1 -1
  116. package/dist/tanstack/date-time-picker.js +1 -1
  117. package/dist/tanstack/file-input.js +1 -1
  118. package/dist/tanstack/file-upload.js +1 -1
  119. package/dist/tanstack/form.d.ts +1 -1
  120. package/dist/tanstack/form.js +1 -1
  121. package/dist/tanstack/inputs.d.ts +2 -2
  122. package/dist/tanstack/inputs.js +1 -1
  123. package/dist/tanstack/number-range-input.js +1 -1
  124. package/dist/tanstack/radio-group.js +1 -1
  125. package/dist/tanstack/rich-text-editor.js +1 -1
  126. package/dist/tanstack/select.js +1 -1
  127. package/dist/tanstack/slider.js +1 -1
  128. package/dist/tanstack/switch.js +1 -1
  129. package/dist/tanstack/table.js +2 -2
  130. package/dist/tanstack/text-area.js +1 -1
  131. package/dist/tanstack/time-picker.js +1 -1
  132. package/dist/tanstack/toggle-group.js +1 -1
  133. package/dist/tanstack.d.ts +4 -4
  134. package/dist/tanstack.js +39 -31
  135. package/dist/{toast.runtime-cxex9e4E.js → toast.runtime-Zf-XyAC3.js} +1 -1
  136. package/dist/{useFieldAccessibility-ScC6Mtd5.js → useFieldAccessibility-CcBTgGfm.js} +1 -1
  137. package/dist/{useFormAutosave-DfuP7drj.js → useFormAutosave-BD_TFqDF.js} +1 -1
  138. package/dist/{useStaticInputHandoff-NeZVnci-.js → useStaticInputHandoff-kkQrc6DA.js} +1 -1
  139. package/dist/{useTableColumnConfig-Di0_w80v.js → useTableColumnConfig-aVUWC2Mp.js} +2 -2
  140. package/package.json +7 -1
  141. package/dist/Alert-CnvEb1D_.js +0 -244
  142. package/dist/token-classes-Bfcx0get.js +0 -163
@@ -3,14 +3,14 @@ import { t as UIConfig } from "../uiConfig.context-BS3r_kTS.js";
3
3
  import { t as Check } from "../check-DYMBkp_Z.js";
4
4
  import { t as ChevronDown } from "../chevron-down-B4Pr8bD3.js";
5
5
  import { t as ChevronRight } from "../chevron-right-3nKJR5Bb.js";
6
- import { a as tableHeaderTextDefinition, c as GripVertical, i as tableHeadRowDefinition, n as tableDataDefinition, o as tableRowDefinition, r as tableHeadDataDefinition, s as theadDefinition, t as tableCellTextDefinition } from "../table.cva-D5oQ-QvA.js";
6
+ import { t as GripVertical } from "../grip-vertical-BVxcjdfr.js";
7
7
  import { t as Info } from "../info-iUmX3uDk.js";
8
- import { a as checkboxDefinition, i as checkboxContentWrapperDefinition, o as checkboxGroupLabelDefinition, r as checkboxContentRowDefinition, s as checkboxIconDefinition, u as Minus } from "../CheckboxCheckmark-CpC3wlMs.js";
9
- import { i as Search, n as selectListBoxItemDefinition, r as selectInputTagsContentWrapperDefinition, t as selectPopoverDefinition } from "../selectDesktop.cva-CHAMxhfO.js";
8
+ import { n as Minus } from "../CheckboxCheckmark-D_uc9pon.js";
9
+ import { a as InspectorDetails, c as useUIConfiguration, d as cvaDefinitions, f as Sun, i as HighlightOverlay, l as exportCvaEdits, m as Moon, o as UIConfigurationProvider, p as Pin, r as getBoxHighlights, s as emptyConfiguration, t as inspectElement, u as resolveCvaDefinition } from "../inspection-model-LuI36xTg.js";
10
+ import { i as Search } from "../selectDesktop.cva-CHAMxhfO.js";
10
11
  import { t as Upload } from "../upload-CXU83BJ4.js";
11
12
  import { t as X } from "../x-B6vfz8Ps.js";
12
- import { t as clsx } from "../clsx-CnD0nOiA.js";
13
- import { n as StyleMergeUtils, r as cva, t as UIOverrides } from "../uiOverrides.context-BTCH9y5a.js";
13
+ import { r as cva, t as UIOverrides } from "../uiOverrides.context-BTCH9y5a.js";
14
14
  import { c as $7230ffa83bc0c2cf$export$ef03459518577ad4, i as $7230ffa83bc0c2cf$export$9d4c57ee4c6ffdd8, l as $7230ffa83bc0c2cf$export$fabf2dc03a41866e, n as $7230ffa83bc0c2cf$export$29f1550f4b0d4415, r as $7230ffa83bc0c2cf$export$4d86445c2cf5e3, s as $7230ffa83bc0c2cf$export$df3a06d6289f983e, t as $7230ffa83bc0c2cf$export$2881499e37b75b9a } from "../utils-Czcqspm7.js";
15
15
  import { c as $542a13ca2fa5b484$export$5b6b19405a83ff9d, d as $53e61d82d8b8611d$export$8b251419efc915eb, l as $542a13ca2fa5b484$export$9b9a0cd73afb7ca4, n as $f2ff30fde7b014be$export$3ddf2d174ce01153, r as $f2ff30fde7b014be$export$d2f961adcb0afbe } from "../Dialog-CKLkS00H.js";
16
16
  import { t as $43a3b93638fe5db9$export$75b6ee27786ba447 } from "../Label-B2-B-uFY.js";
@@ -18,38 +18,19 @@ import { n as $7705c033048f6da7$export$353f5b6fc5456de1, t as $7705c033048f6da7$
18
18
  import { t as $2ec61d1d4f780267$export$a8a3e93435678ff9 } from "../Heading-nI1_VOaE.js";
19
19
  import { t as $efe09c6d1c304b50$export$9afb8bc826b033ea } from "../Text-D2MPZ3sY.js";
20
20
  import { n as $1f3c3b1a70cec653$export$ff05c3ac10437e03, t as $cdaed739b1139372$export$c24727297075ec6a } from "../Form-DlQcyN1f.js";
21
- import { t as Checkbox } from "../Checkbox-CV1ILXXO.js";
21
+ import { t as Checkbox } from "../Checkbox-DYxXYfKL.js";
22
22
  import { a as $928221da08ecbc62$export$dca12b0bb56e4fc, i as $928221da08ecbc62$export$a11e76429ed99b4, n as $928221da08ecbc62$export$7c5906fe4f1f2af2, r as $928221da08ecbc62$export$7ff8f37d2d81a48d, t as $928221da08ecbc62$export$41f133550aa26f48 } from "../ListBox-CL8Ar4Q_.js";
23
23
  import { n as $8b8d26808cb8cb53$export$8948f78d83984c69, t as $8b8d26808cb8cb53$export$2b77a92f1a5ad772 } from "../Modal-w60dVQcb.js";
24
- import { i as radioDefinition, n as radioContentRowDefinition, r as radioContentWrapperDefinition, t as RadioGroup } from "../RadioGroup-DOw3PRoX.js";
25
- import { n as switchDefinition, t as Switch } from "../Switch-CqnGEdeD.js";
26
- import { n as textAreaWrapperDefinition, t as TextArea } from "../TextArea-D8WkKsGn.js";
27
- import { a as breadcrumbsDefinition, i as breadcrumbSegmentDefinition, n as breadcrumbIconDefinition, r as breadcrumbItemDefinition, t as breadcrumbChevronDefinition } from "../breadcrumbs.cva-7zzdDhVR.js";
28
- import { i as menuPopoverWrapperDefinition, n as menuItemDefinition, r as menuPopoverDefinition, t as dropdownMenuDefinition } from "../dropdownMenu.cva-DvEmX0bs.js";
29
- import { i as tooltipTextDefinition, n as tooltipPointerHorizontalDefinition, r as tooltipPointerVerticalDefinition, t as tooltipDefinition } from "../tooltip.cva-BIzlOXHH.js";
30
- import { t as typographyDefinition } from "../typography.cva-iD15k56p.js";
31
- import { a as buttonSizeDefinition, i as buttonIconSizeDefinition, n as buttonContentDefinition, r as buttonDefinition, t as Button } from "../Button-C5rv4Cr2.js";
32
- import { r as badgeButtonDefinition } from "../badgeButton.cva-CvN4CTx5.js";
24
+ import { t as RadioGroup } from "../RadioGroup-CUGNSJql.js";
25
+ import { t as Switch } from "../Switch-CimmMqEk.js";
26
+ import { t as TextArea } from "../TextArea-B3teIhsJ.js";
27
+ import { t as Button } from "../Button-BPTvffuk.js";
33
28
  import { BadgeButton } from "../components/badge-button.js";
34
- import { n as formFieldErrorDefinition } from "../FormFieldError-DeOHHLo2.js";
35
- import { a as formFieldHeaderDefinition, i as labelDefinition, n as formFieldHelperDefinition } from "../FormField-B99dLt8o.js";
36
- import { n as tagDefinition, t as Tag } from "../Tag-DPg5sL1Z.js";
37
- import { a as inputSizeDefinition, i as inputSideDefinition, n as inputClearClassDefinition, r as inputContentWrapperDefinition, t as inputBaseDefinition } from "../input.cva-DJA8ovm_.js";
38
- import { t as popoverDefinition } from "../popover.cva-Bhud1wnp.js";
29
+ import { Tag } from "../components/tag.js";
39
30
  import { Input } from "../components/input.js";
40
- import { t as datePickerInputContentRowDefinition } from "../datePickerInput.cva-Cd7UUN61.js";
41
- import { a as progressTrackWrapperDefinition, i as progressTrackDefinition, n as progressDefinition, o as progressValueDefinition, r as progressFillDefinition, t as Progress } from "../Progress-B3mY9rIP.js";
42
- import { t as fileUploadDropZoneDefinition } from "../fileUpload.cva-ujmStxB1.js";
43
- import { n as toggleGroupItemDefinition, t as toggleGroupDefinition } from "../toggleGroup.cva-MbpaEBg1.js";
44
- import { a as accordionHeadingTitleDefinition, c as accordionPanelContentDefinition, i as accordionHeadingSubtitleDefinition, l as accordionPanelDefinition, n as accordionDefinition, o as accordionIconDefinition, r as accordionHeadingDefinition, s as accordionItemDefinition, t as accordionChevronDefinition, u as accordionTriggerDefinition } from "../accordion.cva-CL1bVscW.js";
45
- import { a as stepperSeparatorDefinition, i as stepperNumberDefinition, n as stepperIconDefinition, o as stepperSubtextDefinition, r as stepperItemDefinition, s as stepperTitleDefinition, t as stepperDefinition } from "../stepper.cva-CZ0Kj-s7.js";
46
- import { i as dialogOverlayDefinition, n as dialogMainDefinition, t as dialogContentDefinition } from "../dialog.cva-COhDZaVl.js";
47
- import { i as alertDefinition, n as statusIconDefinition, r as statusSeparatorDefinition, t as Alert } from "../Alert-CnvEb1D_.js";
48
- import { a as toastDefinition, i as toastContainerDefinition } from "../toast.cva-C_L_RffH.js";
49
- import { t as linkDefinition } from "../link.cva-DMTHZiJG.js";
50
- import { t as tooltipWrapperTriggerDefinition } from "../tooltipWrapper.cva-BBQ4ic3D.js";
51
- import { C as validToken, S as toRgb, _ as parseThemeCss, a as generateShades, b as spacingLevels, c as isFontSizeToken, d as layoutKindFor, f as layoutKinds, g as listedLayoutToken, h as linkedLayoutTokens, i as exportCss, l as isRgb, m as layoutScales, n as controlHeightCounterpart, o as groupFor, p as layoutLevelFor, r as emptyTheme, s as groups, t as baseColorNames, u as labelFor, v as previewTokens, x as toHex, y as runtimeCss } from "../theme-model-DtYPxNvH.js";
52
- import { n as splitVariants, t as inspectTokens } from "../token-classes-Bfcx0get.js";
31
+ import { t as Progress } from "../Progress-Du30L4_s.js";
32
+ import { Alert } from "../components/alert.js";
33
+ import { C as validToken, S as toRgb, _ as parseThemeCss, a as generateShades, b as spacingLevels, c as isFontSizeToken, d as layoutKindFor, f as layoutKinds, g as listedLayoutToken, h as linkedLayoutTokens, i as exportCss, l as isRgb, m as layoutScales, n as controlHeightCounterpart, o as groupFor, p as layoutLevelFor, r as emptyTheme, s as groups, t as baseColorNames, u as labelFor, v as previewTokens, x as toHex } from "../theme-model-DtYPxNvH.js";
53
34
  import $ahdqC$react, { Suspense, createContext, lazy, use, useCallback, useEffect, useId, useLayoutEffect, useMemo, useRef, useState } from "react";
54
35
  import { c } from "react/compiler-runtime";
55
36
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -71,7 +52,7 @@ import { UNSAFE_PortalProvider } from "react-aria";
71
52
  * This source code is licensed under the ISC license.
72
53
  * See the LICENSE file in the root directory of this source tree.
73
54
  */
74
- const __iconData$9 = {
55
+ const __iconData$6 = {
75
56
  name: "arrow-down-to-line",
76
57
  size: 24,
77
58
  node: [
@@ -89,8 +70,8 @@ const __iconData$9 = {
89
70
  }]
90
71
  ]
91
72
  };
92
- __iconData$9.node;
93
- const ArrowDownToLine = createLucideIcon(__iconData$9);
73
+ __iconData$6.node;
74
+ const ArrowDownToLine = createLucideIcon(__iconData$6);
94
75
  //#endregion
95
76
  //#region ../../node_modules/.bun/lucide-react@1.43.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/icons/chevrons-up-down.mjs
96
77
  /**
@@ -99,7 +80,7 @@ const ArrowDownToLine = createLucideIcon(__iconData$9);
99
80
  * This source code is licensed under the ISC license.
100
81
  * See the LICENSE file in the root directory of this source tree.
101
82
  */
102
- const __iconData$8 = {
83
+ const __iconData$5 = {
103
84
  name: "chevrons-up-down",
104
85
  size: 24,
105
86
  node: [["path", {
@@ -110,8 +91,8 @@ const __iconData$8 = {
110
91
  key: "sgt6xg"
111
92
  }]]
112
93
  };
113
- __iconData$8.node;
114
- const ChevronsUpDown = createLucideIcon(__iconData$8);
94
+ __iconData$5.node;
95
+ const ChevronsUpDown = createLucideIcon(__iconData$5);
115
96
  //#endregion
116
97
  //#region ../../node_modules/.bun/lucide-react@1.43.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/icons/external-link.mjs
117
98
  /**
@@ -120,7 +101,7 @@ const ChevronsUpDown = createLucideIcon(__iconData$8);
120
101
  * This source code is licensed under the ISC license.
121
102
  * See the LICENSE file in the root directory of this source tree.
122
103
  */
123
- const __iconData$7 = {
104
+ const __iconData$4 = {
124
105
  name: "external-link",
125
106
  size: 24,
126
107
  node: [
@@ -138,26 +119,8 @@ const __iconData$7 = {
138
119
  }]
139
120
  ]
140
121
  };
141
- __iconData$7.node;
142
- const ExternalLink = createLucideIcon(__iconData$7);
143
- //#endregion
144
- //#region ../../node_modules/.bun/lucide-react@1.43.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/icons/moon.mjs
145
- /**
146
- * @license lucide-react v1.43.0 - ISC
147
- *
148
- * This source code is licensed under the ISC license.
149
- * See the LICENSE file in the root directory of this source tree.
150
- */
151
- const __iconData$6 = {
152
- name: "moon",
153
- size: 24,
154
- node: [["path", {
155
- d: "M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",
156
- key: "kfwtm"
157
- }]]
158
- };
159
- __iconData$6.node;
160
- const Moon = createLucideIcon(__iconData$6);
122
+ __iconData$4.node;
123
+ const ExternalLink = createLucideIcon(__iconData$4);
161
124
  //#endregion
162
125
  //#region ../../node_modules/.bun/lucide-react@1.43.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/icons/panel-top.mjs
163
126
  /**
@@ -166,7 +129,7 @@ const Moon = createLucideIcon(__iconData$6);
166
129
  * This source code is licensed under the ISC license.
167
130
  * See the LICENSE file in the root directory of this source tree.
168
131
  */
169
- const __iconData$5 = {
132
+ const __iconData$3 = {
170
133
  name: "panel-top",
171
134
  size: 24,
172
135
  node: [["rect", {
@@ -181,29 +144,8 @@ const __iconData$5 = {
181
144
  key: "1pudct"
182
145
  }]]
183
146
  };
184
- __iconData$5.node;
185
- const PanelTop = createLucideIcon(__iconData$5);
186
- //#endregion
187
- //#region ../../node_modules/.bun/lucide-react@1.43.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/icons/pin.mjs
188
- /**
189
- * @license lucide-react v1.43.0 - ISC
190
- *
191
- * This source code is licensed under the ISC license.
192
- * See the LICENSE file in the root directory of this source tree.
193
- */
194
- const __iconData$4 = {
195
- name: "pin",
196
- size: 24,
197
- node: [["path", {
198
- d: "M12 17v5",
199
- key: "bb1du9"
200
- }], ["path", {
201
- d: "M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",
202
- key: "1nkz8b"
203
- }]]
204
- };
205
- __iconData$4.node;
206
- const Pin = createLucideIcon(__iconData$4);
147
+ __iconData$3.node;
148
+ const PanelTop = createLucideIcon(__iconData$3);
207
149
  //#endregion
208
150
  //#region ../../node_modules/.bun/lucide-react@1.43.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/icons/plus.mjs
209
151
  /**
@@ -212,7 +154,7 @@ const Pin = createLucideIcon(__iconData$4);
212
154
  * This source code is licensed under the ISC license.
213
155
  * See the LICENSE file in the root directory of this source tree.
214
156
  */
215
- const __iconData$3 = {
157
+ const __iconData$2 = {
216
158
  name: "plus",
217
159
  size: 24,
218
160
  node: [["path", {
@@ -223,8 +165,8 @@ const __iconData$3 = {
223
165
  key: "s699le"
224
166
  }]]
225
167
  };
226
- __iconData$3.node;
227
- const Plus = createLucideIcon(__iconData$3);
168
+ __iconData$2.node;
169
+ const Plus = createLucideIcon(__iconData$2);
228
170
  //#endregion
229
171
  //#region ../../node_modules/.bun/lucide-react@1.43.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/icons/rotate-ccw.mjs
230
172
  /**
@@ -233,7 +175,7 @@ const Plus = createLucideIcon(__iconData$3);
233
175
  * This source code is licensed under the ISC license.
234
176
  * See the LICENSE file in the root directory of this source tree.
235
177
  */
236
- const __iconData$2 = {
178
+ const __iconData$1 = {
237
179
  name: "rotate-ccw",
238
180
  size: 24,
239
181
  node: [["path", {
@@ -244,8 +186,8 @@ const __iconData$2 = {
244
186
  key: "1xhq8a"
245
187
  }]]
246
188
  };
247
- __iconData$2.node;
248
- const RotateCcw = createLucideIcon(__iconData$2);
189
+ __iconData$1.node;
190
+ const RotateCcw = createLucideIcon(__iconData$1);
249
191
  //#endregion
250
192
  //#region ../../node_modules/.bun/lucide-react@1.43.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/icons/sliders-horizontal.mjs
251
193
  /**
@@ -254,7 +196,7 @@ const RotateCcw = createLucideIcon(__iconData$2);
254
196
  * This source code is licensed under the ISC license.
255
197
  * See the LICENSE file in the root directory of this source tree.
256
198
  */
257
- const __iconData$1 = {
199
+ const __iconData = {
258
200
  name: "sliders-horizontal",
259
201
  size: 24,
260
202
  node: [
@@ -296,62 +238,8 @@ const __iconData$1 = {
296
238
  }]
297
239
  ]
298
240
  };
299
- __iconData$1.node;
300
- const SlidersHorizontal = createLucideIcon(__iconData$1);
301
- //#endregion
302
- //#region ../../node_modules/.bun/lucide-react@1.43.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/icons/sun.mjs
303
- /**
304
- * @license lucide-react v1.43.0 - ISC
305
- *
306
- * This source code is licensed under the ISC license.
307
- * See the LICENSE file in the root directory of this source tree.
308
- */
309
- const __iconData = {
310
- name: "sun",
311
- size: 24,
312
- node: [
313
- ["circle", {
314
- cx: "12",
315
- cy: "12",
316
- r: "4",
317
- key: "4exip2"
318
- }],
319
- ["path", {
320
- d: "M12 2v2",
321
- key: "tus03m"
322
- }],
323
- ["path", {
324
- d: "M12 20v2",
325
- key: "1lh1kg"
326
- }],
327
- ["path", {
328
- d: "m4.93 4.93 1.41 1.41",
329
- key: "149t6j"
330
- }],
331
- ["path", {
332
- d: "m17.66 17.66 1.41 1.41",
333
- key: "ptbguv"
334
- }],
335
- ["path", {
336
- d: "M2 12h2",
337
- key: "1t8f8n"
338
- }],
339
- ["path", {
340
- d: "M20 12h2",
341
- key: "1q8mjw"
342
- }],
343
- ["path", {
344
- d: "m6.34 17.66-1.41 1.41",
345
- key: "1m8zz5"
346
- }],
347
- ["path", {
348
- d: "m19.07 4.93-1.41 1.41",
349
- key: "1shlcs"
350
- }]
351
- ]
352
- };
353
241
  __iconData.node;
354
- const Sun = createLucideIcon(__iconData);
242
+ const SlidersHorizontal = createLucideIcon(__iconData);
355
243
  //#endregion
356
244
  //#region ../../node_modules/.bun/react-aria-components@1.21.1+67f6792bdf102c28/node_modules/react-aria-components/dist/private/Select.mjs
357
245
  const $c8bb816105474884$export$7540cee5be7dc19b = /*#__PURE__*/ createContext(null);
@@ -475,736 +363,6 @@ function $c8bb816105474884$var$SelectInner({ props, selectRef: ref, collection }
475
363
  }
476
364
  const $c8bb816105474884$export$f8f745c04421623f = /*#__PURE__*/ createContext(null);
477
365
  //#endregion
478
- //#region src/configurator/cva-definitions.ts
479
- const cvaDefinitions = {
480
- "datePickerInput.contentRowCva": datePickerInputContentRowDefinition,
481
- "select.tagsContentWrapperCva": selectInputTagsContentWrapperDefinition,
482
- "tooltip.pointerHorizontalCva": tooltipPointerHorizontalDefinition,
483
- "accordion.chevronCva": accordionChevronDefinition,
484
- "accordion.cva": accordionDefinition,
485
- "accordion.headingCva": accordionHeadingDefinition,
486
- "accordion.headingSubtitleCva": accordionHeadingSubtitleDefinition,
487
- "accordion.headingTitleCva": accordionHeadingTitleDefinition,
488
- "accordion.iconCva": accordionIconDefinition,
489
- "accordion.itemCva": accordionItemDefinition,
490
- "accordion.panelContentCva": accordionPanelContentDefinition,
491
- "accordion.panelCva": accordionPanelDefinition,
492
- "accordion.triggerCva": accordionTriggerDefinition,
493
- "alert.cva": alertDefinition,
494
- "breadcrumbs.chevronCva": breadcrumbChevronDefinition,
495
- "breadcrumbs.cva": breadcrumbsDefinition,
496
- "breadcrumbs.iconCva": breadcrumbIconDefinition,
497
- "breadcrumbs.itemCva": breadcrumbItemDefinition,
498
- "breadcrumbs.segmentCva": breadcrumbSegmentDefinition,
499
- "button.contentCva": buttonContentDefinition,
500
- "button.cva": buttonDefinition,
501
- "button.iconSize": buttonIconSizeDefinition,
502
- "button.sizeCva": buttonSizeDefinition,
503
- "checkbox.contentRowCva": checkboxContentRowDefinition,
504
- "checkbox.contentWrapperCva": checkboxContentWrapperDefinition,
505
- "checkbox.cva": checkboxDefinition,
506
- "checkbox.groupLabelCva": checkboxGroupLabelDefinition,
507
- "checkbox.iconCva": checkboxIconDefinition,
508
- "dialog.contentCva": dialogContentDefinition,
509
- "dialog.mainCva": dialogMainDefinition,
510
- "dialog.overlayCva": dialogOverlayDefinition,
511
- "dropdownMenu.cva": dropdownMenuDefinition,
512
- "dropdownMenu.itemCva": menuItemDefinition,
513
- "dropdownMenu.popoverCva": menuPopoverDefinition,
514
- "dropdownMenu.popoverWrapperCva": menuPopoverWrapperDefinition,
515
- "fileUpload.dropZoneCva": fileUploadDropZoneDefinition,
516
- "formField.errorLabelCva": formFieldErrorDefinition,
517
- "formField.headerCva": formFieldHeaderDefinition,
518
- "formField.helperLabelCva": formFieldHelperDefinition,
519
- "input.baseCva": inputBaseDefinition,
520
- "input.clearClassCva": inputClearClassDefinition,
521
- "input.contentWrapperCva": inputContentWrapperDefinition,
522
- "input.sideCva": inputSideDefinition,
523
- "input.sizeCva": inputSizeDefinition,
524
- "label.cva": labelDefinition,
525
- "link.cva": linkDefinition,
526
- "badgeButton.cva": badgeButtonDefinition,
527
- "popover.cva": popoverDefinition,
528
- "progress.cva": progressDefinition,
529
- "progress.fillCva": progressFillDefinition,
530
- "progress.trackCva": progressTrackDefinition,
531
- "progress.trackWrapperCva": progressTrackWrapperDefinition,
532
- "progress.valueCva": progressValueDefinition,
533
- "radio.contentRowCva": radioContentRowDefinition,
534
- "radio.contentWrapperCva": radioContentWrapperDefinition,
535
- "radio.cva": radioDefinition,
536
- "select.listBoxItemCva": selectListBoxItemDefinition,
537
- "select.popoverCva": selectPopoverDefinition,
538
- "status.iconCva": statusIconDefinition,
539
- "status.separatorCva": statusSeparatorDefinition,
540
- "stepper.cva": stepperDefinition,
541
- "stepper.iconCva": stepperIconDefinition,
542
- "stepper.itemCva": stepperItemDefinition,
543
- "stepper.numberCva": stepperNumberDefinition,
544
- "stepper.separatorCva": stepperSeparatorDefinition,
545
- "stepper.subtextCva": stepperSubtextDefinition,
546
- "stepper.titleCva": stepperTitleDefinition,
547
- "switch.cva": switchDefinition,
548
- "table.cellTextCva": tableCellTextDefinition,
549
- "table.dataCva": tableDataDefinition,
550
- "table.headDataCva": tableHeadDataDefinition,
551
- "table.headRowCva": tableHeadRowDefinition,
552
- "table.headerTextCva": tableHeaderTextDefinition,
553
- "table.rowCva": tableRowDefinition,
554
- "table.theadCva": theadDefinition,
555
- "tag.cva": tagDefinition,
556
- "textArea.wrapperCva": textAreaWrapperDefinition,
557
- "toast.containerCva": toastContainerDefinition,
558
- "toast.cva": toastDefinition,
559
- "toggleGroup.cva": toggleGroupDefinition,
560
- "toggleGroup.itemCva": toggleGroupItemDefinition,
561
- "tooltip.cva": tooltipDefinition,
562
- "tooltip.pointerVerticalCva": tooltipPointerVerticalDefinition,
563
- "tooltip.textCva": tooltipTextDefinition,
564
- "tooltipWrapper.triggerCva": tooltipWrapperTriggerDefinition,
565
- "typography.cva": typographyDefinition
566
- };
567
- //#endregion
568
- //#region src/configurator/cva-model.ts
569
- function resolveCvaDefinition(slot, inherited) {
570
- const [component, part] = slot.split(".");
571
- const override = (inherited?.[component])?.[part];
572
- if (typeof override === "function") return null;
573
- const fallback = cvaDefinitions[slot];
574
- const definition = override && typeof override === "object" && "mode" in override ? StyleMergeUtils.mergeCvaDefinition(fallback, override) : fallback;
575
- const config = definition.config;
576
- return {
577
- base: [...definition.base],
578
- config: {
579
- variants: Object.fromEntries(Object.entries(config?.variants ?? {}).map(([name, options]) => [name, Object.fromEntries(Object.entries(options).map(([value, classes]) => [value, clsx(classes)]))])),
580
- defaultVariants: config?.defaultVariants ?? {},
581
- compoundVariants: (config?.compoundVariants ?? []).map(({ class: classes, className, ...selectors }) => Object.assign(selectors, { className: clsx(classes, className) }))
582
- }
583
- };
584
- }
585
- function applyCvaEdits(inherited, edits = {}) {
586
- const result = { ...inherited };
587
- for (const [slot, definition] of Object.entries(edits)) {
588
- const [component, part] = slot.split(".");
589
- const key = component;
590
- result[key] = {
591
- ...result[key],
592
- [part]: {
593
- mode: "overrideCva",
594
- ...definition
595
- }
596
- };
597
- }
598
- return result;
599
- }
600
- function exportCvaEdits(edits = {}) {
601
- const overrides = applyCvaEdits(void 0, edits);
602
- const components = Object.keys(overrides).map((name) => ` ${name}: { ...existing.${name}, ...edited.${name} },`).join("\n");
603
- return `import { UIOverrides } from "@povio/ui/ui-overrides";\n\nconst edited = ${JSON.stringify(overrides, null, 2)} satisfies UIOverrides.Config;\n\nexport function withUIOverrides(existing: UIOverrides.Config = {}): UIOverrides.Config {\n return {\n ...existing,\n${components}\n };\n}\n\n// <UIOverrides.Provider config={withUIOverrides(appOverrides)}>{children}</UIOverrides.Provider>\n`;
604
- }
605
- //#endregion
606
- //#region src/configurator/configuration.context.tsx
607
- const emptyConfiguration = () => ({
608
- theme: emptyTheme(),
609
- config: {}
610
- });
611
- const ConfigurationContext = createContext(null);
612
- function UIConfigurationProvider(t0) {
613
- const $ = c(34);
614
- const { defaults, initialValue, onApply, children } = t0;
615
- const inheritedOverrides = UIOverrides.useConfig();
616
- const [applied, setApplied] = useState(initialValue ?? emptyConfiguration);
617
- const [draft, setDraft] = useState(applied);
618
- const [isOpen, setOpen] = useState(false);
619
- const [revision, setRevision] = useState(0);
620
- const active = isOpen ? draft : applied;
621
- let t1;
622
- if ($[0] !== applied) {
623
- t1 = () => {
624
- setDraft(structuredClone(applied));
625
- setRevision(_temp$7);
626
- setOpen(true);
627
- };
628
- $[0] = applied;
629
- $[1] = t1;
630
- } else t1 = $[1];
631
- const open = t1;
632
- let t2;
633
- if ($[2] !== applied) {
634
- t2 = () => {
635
- setDraft(structuredClone(applied));
636
- setOpen(false);
637
- };
638
- $[2] = applied;
639
- $[3] = t2;
640
- } else t2 = $[3];
641
- const cancel = t2;
642
- let t3;
643
- if ($[4] !== draft || $[5] !== onApply) {
644
- t3 = () => {
645
- onApply?.(structuredClone(draft));
646
- setApplied(structuredClone(draft));
647
- setOpen(false);
648
- };
649
- $[4] = draft;
650
- $[5] = onApply;
651
- $[6] = t3;
652
- } else t3 = $[6];
653
- const apply = t3;
654
- let t4;
655
- if ($[7] !== active.overrides || $[8] !== inheritedOverrides) {
656
- t4 = applyCvaEdits(inheritedOverrides, active.overrides);
657
- $[7] = active.overrides;
658
- $[8] = inheritedOverrides;
659
- $[9] = t4;
660
- } else t4 = $[9];
661
- const overrides = t4;
662
- let t5;
663
- if ($[10] !== apply || $[11] !== cancel || $[12] !== defaults || $[13] !== draft || $[14] !== inheritedOverrides || $[15] !== isOpen || $[16] !== open || $[17] !== revision) {
664
- t5 = {
665
- defaults,
666
- inheritedOverrides,
667
- draft,
668
- setDraft,
669
- isOpen,
670
- open,
671
- cancel,
672
- apply,
673
- revision
674
- };
675
- $[10] = apply;
676
- $[11] = cancel;
677
- $[12] = defaults;
678
- $[13] = draft;
679
- $[14] = inheritedOverrides;
680
- $[15] = isOpen;
681
- $[16] = open;
682
- $[17] = revision;
683
- $[18] = t5;
684
- } else t5 = $[18];
685
- const contextValue = t5;
686
- let t6;
687
- if ($[19] !== active.theme || $[20] !== defaults) {
688
- t6 = runtimeCss(defaults, active.theme);
689
- $[19] = active.theme;
690
- $[20] = defaults;
691
- $[21] = t6;
692
- } else t6 = $[21];
693
- let t7;
694
- if ($[22] !== t6) {
695
- t7 = /* @__PURE__ */ jsx("style", {
696
- "data-povio-ui-configuration": true,
697
- children: t6
698
- });
699
- $[22] = t6;
700
- $[23] = t7;
701
- } else t7 = $[23];
702
- let t8;
703
- if ($[24] !== active.config || $[25] !== children) {
704
- t8 = /* @__PURE__ */ jsx(UIConfig.Provider, {
705
- config: active.config,
706
- children
707
- });
708
- $[24] = active.config;
709
- $[25] = children;
710
- $[26] = t8;
711
- } else t8 = $[26];
712
- let t9;
713
- if ($[27] !== overrides || $[28] !== t8) {
714
- t9 = /* @__PURE__ */ jsx(UIOverrides.Provider, {
715
- config: overrides,
716
- children: t8
717
- });
718
- $[27] = overrides;
719
- $[28] = t8;
720
- $[29] = t9;
721
- } else t9 = $[29];
722
- let t10;
723
- if ($[30] !== contextValue || $[31] !== t7 || $[32] !== t9) {
724
- t10 = /* @__PURE__ */ jsxs(ConfigurationContext.Provider, {
725
- value: contextValue,
726
- children: [t7, t9]
727
- });
728
- $[30] = contextValue;
729
- $[31] = t7;
730
- $[32] = t9;
731
- $[33] = t10;
732
- } else t10 = $[33];
733
- return t10;
734
- }
735
- function _temp$7(value) {
736
- return value + 1;
737
- }
738
- function useUIConfiguration() {
739
- const context = use(ConfigurationContext);
740
- if (!context) throw new Error("useUIConfiguration requires UIConfigurationProvider");
741
- return context;
742
- }
743
- //#endregion
744
- //#region src/configurator/inspector/HighlightOverlay.tsx
745
- const arcs = {
746
- topLeft: "M0 100 A100 100 0 0 1 100 0",
747
- topRight: "M0 0 A100 100 0 0 1 100 100",
748
- bottomRight: "M100 0 A100 100 0 0 1 0 100",
749
- bottomLeft: "M100 100 A100 100 0 0 1 0 0"
750
- };
751
- function HighlightOverlay(t0) {
752
- const $ = c(17);
753
- const { highlight, width } = t0;
754
- const first = highlight.regions[0];
755
- let t1;
756
- if ($[0] !== highlight.key) {
757
- t1 = highlight.key.split(".");
758
- $[0] = highlight.key;
759
- $[1] = t1;
760
- } else t1 = $[1];
761
- const kind = t1[0];
762
- const t2 = highlight.key;
763
- let t3;
764
- if ($[2] !== highlight.regions || $[3] !== kind) {
765
- let t4;
766
- if ($[5] !== kind) {
767
- t4 = (region) => /* @__PURE__ */ jsx("div", {
768
- className: `studio-measure-region is-${kind}${region.line ? ` is-${region.line}` : ""}${region.corner ? " is-corner" : ""}`,
769
- style: {
770
- left: region.left,
771
- top: region.top,
772
- width: region.width,
773
- height: region.height
774
- },
775
- children: region.corner && /* @__PURE__ */ jsx("svg", {
776
- viewBox: "0 0 100 100",
777
- preserveAspectRatio: "none",
778
- "aria-hidden": "true",
779
- children: /* @__PURE__ */ jsx("path", {
780
- d: arcs[region.corner],
781
- fill: "none",
782
- stroke: "currentColor",
783
- strokeWidth: "2",
784
- vectorEffect: "non-scaling-stroke"
785
- })
786
- })
787
- }, `${region.left}:${region.top}:${region.width}:${region.height}`);
788
- $[5] = kind;
789
- $[6] = t4;
790
- } else t4 = $[6];
791
- t3 = highlight.regions.map(t4);
792
- $[2] = highlight.regions;
793
- $[3] = kind;
794
- $[4] = t3;
795
- } else t3 = $[4];
796
- const t4 = Math.max(4, Math.min(first?.left ?? 4, width - 220));
797
- const t5 = Math.max(4, (first?.top ?? 26) - 22);
798
- let t6;
799
- if ($[7] !== t4 || $[8] !== t5) {
800
- t6 = {
801
- left: t4,
802
- top: t5
803
- };
804
- $[7] = t4;
805
- $[8] = t5;
806
- $[9] = t6;
807
- } else t6 = $[9];
808
- let t7;
809
- if ($[10] !== highlight.label || $[11] !== t6) {
810
- t7 = /* @__PURE__ */ jsx("span", {
811
- className: "studio-measure-label",
812
- style: t6,
813
- children: highlight.label
814
- });
815
- $[10] = highlight.label;
816
- $[11] = t6;
817
- $[12] = t7;
818
- } else t7 = $[12];
819
- let t8;
820
- if ($[13] !== highlight.key || $[14] !== t3 || $[15] !== t7) {
821
- t8 = /* @__PURE__ */ jsxs("div", {
822
- className: "studio-measure-regions",
823
- "data-property": t2,
824
- children: [t3, t7]
825
- });
826
- $[13] = highlight.key;
827
- $[14] = t3;
828
- $[15] = t7;
829
- $[16] = t8;
830
- } else t8 = $[16];
831
- return t8;
832
- }
833
- //#endregion
834
- //#region src/configurator/inspector/box-highlights.ts
835
- const sides = [
836
- "top",
837
- "right",
838
- "bottom",
839
- "left"
840
- ];
841
- const corners = [
842
- "topLeft",
843
- "topRight",
844
- "bottomRight",
845
- "bottomLeft"
846
- ];
847
- const numeric = (value) => Number.parseFloat(value) || 0;
848
- const formatted = (value) => String(Math.round(value * 100) / 100);
849
- /** Read-only geometry in the inspected element's viewport (including pop-out documents). */
850
- function getBoxHighlights(element, key) {
851
- const view = element.ownerDocument.defaultView;
852
- if (!view) return {
853
- regions: [],
854
- label: ""
855
- };
856
- const style = view.getComputedStyle(element);
857
- const rect = element.getBoundingClientRect();
858
- const sx = element.offsetWidth ? rect.width / element.offsetWidth : 1;
859
- const sy = element.offsetHeight ? rect.height / element.offsetHeight : 1;
860
- const read = (name) => style.getPropertyValue(name);
861
- const scale = (side) => side === "left" || side === "right" ? sx : sy;
862
- const values = (prefix, suffix = "") => Object.fromEntries(sides.map((side) => [side, numeric(read(`${prefix}-${side}${suffix}`)) * scale(side)]));
863
- const border = values("border", "-width");
864
- const padding = values("padding");
865
- const inner = {
866
- left: rect.left + border.left,
867
- top: rect.top + border.top,
868
- width: Math.max(0, rect.width - border.left - border.right),
869
- height: Math.max(0, rect.height - border.top - border.bottom)
870
- };
871
- const content = {
872
- left: inner.left + padding.left,
873
- top: inner.top + padding.top,
874
- width: Math.max(0, inner.width - padding.left - padding.right),
875
- height: Math.max(0, inner.height - padding.top - padding.bottom)
876
- };
877
- const [kind, part] = key.split(".");
878
- let regions = [];
879
- let value = "";
880
- if (kind === "width" || kind === "height") {
881
- value = formatted(content[kind] / (kind === "width" ? sx : sy));
882
- regions = [{
883
- left: content.left,
884
- top: content.top,
885
- width: kind === "width" ? content.width : 1,
886
- height: kind === "height" ? content.height : 1,
887
- line: kind === "width" ? "horizontal" : "vertical"
888
- }];
889
- } else if (kind === "radius") {
890
- const radii = corners.map((corner) => {
891
- const cssCorner = corner.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);
892
- const components = read(`border-${cssCorner}-radius`).trim().split(/\s+/);
893
- const resolve = (raw, dimension, factor) => raw.endsWith("%") ? numeric(raw) / 100 * dimension : numeric(raw) * factor;
894
- return [resolve(components[0] || "0", rect.width, sx), resolve(components[1] || components[0] || "0", rect.height, sy)];
895
- });
896
- const factor = Math.min(1, rect.width / (radii[0][0] + radii[1][0] || 1), rect.width / (radii[3][0] + radii[2][0] || 1), rect.height / (radii[0][1] + radii[3][1] || 1), rect.height / (radii[1][1] + radii[2][1] || 1));
897
- const corner = part;
898
- const radius = radii[corners.indexOf(corner)];
899
- const width = Math.max(1, radius[0] * factor);
900
- const height = Math.max(1, radius[1] * factor);
901
- value = `${formatted(radius[0] * factor / sx)} × ${formatted(radius[1] * factor / sy)}`;
902
- regions = [{
903
- left: rect.left + (corner.endsWith("Right") ? rect.width - width : 0),
904
- top: rect.top + (corner.startsWith("bottom") ? rect.height - height : 0),
905
- width,
906
- height,
907
- corner
908
- }];
909
- } else if (kind === "gap") {
910
- const row = part === "row";
911
- const rawGap = read(`${part}-gap`);
912
- const gap = rawGap.endsWith("%") ? numeric(rawGap) / 100 * (row ? content.height / sy : content.width / sx) : numeric(rawGap);
913
- const size = gap * (row ? sy : sx);
914
- value = formatted(gap);
915
- if (size > 0 && /^(inline-)?(flex|grid)$/.test(read("display"))) {
916
- const children = Array.from(element.children).slice(0, 80).flatMap((child) => {
917
- const childStyle = view.getComputedStyle(child);
918
- const box = child.getBoundingClientRect();
919
- return childStyle.display === "none" || childStyle.visibility === "hidden" || /^(absolute|fixed)$/.test(childStyle.position) || !box.width || !box.height ? [] : [box];
920
- }).sort((a, b) => row ? a.top - b.top : a.left - b.left);
921
- const seen = /* @__PURE__ */ new Set();
922
- for (let i = 0; i < children.length; i++) {
923
- const a = children[i];
924
- for (let j = i + 1; j < children.length; j++) {
925
- const b = children[j];
926
- const start = row ? a.bottom : a.right;
927
- const end = row ? b.top : b.left;
928
- const crossStart = Math.max(row ? a.left : a.top, row ? b.left : b.top, row ? content.left : content.top);
929
- const crossEnd = Math.min(row ? a.right : a.bottom, row ? b.right : b.bottom, row ? content.left + content.width : content.top + content.height);
930
- if (end - start < size - .5 || crossEnd <= crossStart) continue;
931
- if (children.some((c, index) => index !== i && index !== j && (row ? c.top >= start && c.bottom <= end && c.right > crossStart && c.left < crossEnd : c.left >= start && c.right <= end && c.bottom > crossStart && c.top < crossEnd))) continue;
932
- const axisStart = Math.max((start + end - size) / 2, row ? content.top : content.left);
933
- const axisEnd = Math.min((start + end + size) / 2, row ? content.top + content.height : content.left + content.width);
934
- if (axisEnd <= axisStart) continue;
935
- const region = row ? {
936
- left: crossStart,
937
- top: axisStart,
938
- width: crossEnd - crossStart,
939
- height: axisEnd - axisStart
940
- } : {
941
- left: axisStart,
942
- top: crossStart,
943
- width: axisEnd - axisStart,
944
- height: crossEnd - crossStart
945
- };
946
- const id = Object.values(region).map(formatted).join(",");
947
- if (!seen.has(id)) {
948
- seen.add(id);
949
- regions.push(region);
950
- }
951
- }
952
- }
953
- }
954
- } else {
955
- const side = part;
956
- const horizontal = side === "top" || side === "bottom";
957
- const raw = read(kind === "position" ? side : `${kind}-${side}${kind === "border" ? "-width" : ""}`);
958
- const amount = numeric(raw) * scale(side);
959
- value = formatted(numeric(raw));
960
- const base = kind === "padding" ? inner : rect;
961
- const outward = kind === "margin" || kind === "position";
962
- const thickness = Math.max(1, Math.abs(amount));
963
- const positiveEdge = side === "bottom" || side === "right";
964
- const edge = horizontal ? base.top + (positiveEdge ? base.height : 0) : base.left + (positiveEdge ? base.width : 0);
965
- const offset = outward ? positiveEdge ? amount < 0 ? -thickness : 0 : amount < 0 ? 0 : -thickness : positiveEdge ? -thickness : 0;
966
- regions = [{
967
- left: horizontal ? base.left : edge + offset,
968
- top: horizontal ? edge + offset : base.top,
969
- width: horizontal ? base.width : thickness,
970
- height: horizontal ? thickness : base.height
971
- }];
972
- if (kind === "position") {
973
- if (raw === "auto" || read("position") === "static") regions = [];
974
- else if (read("position") === "absolute" || read("position") === "fixed") {
975
- const parent = element.offsetParent;
976
- const parentRect = parent?.getBoundingClientRect();
977
- const parentStyle = parent ? view.getComputedStyle(parent) : null;
978
- const parentScale = parent && "offsetWidth" in parent && parent.offsetWidth ? parentRect.width / Number(parent.offsetWidth) : 1;
979
- const parentScaleY = parent && "offsetHeight" in parent && parent.offsetHeight ? parentRect.height / Number(parent.offsetHeight) : 1;
980
- const referenceEdge = (parentRect ? {
981
- left: parentRect.left + numeric(parentStyle.getPropertyValue("border-left-width")) * parentScale,
982
- right: parentRect.right - numeric(parentStyle.getPropertyValue("border-right-width")) * parentScale,
983
- top: parentRect.top + numeric(parentStyle.getPropertyValue("border-top-width")) * parentScaleY,
984
- bottom: parentRect.bottom - numeric(parentStyle.getPropertyValue("border-bottom-width")) * parentScaleY
985
- } : {
986
- left: 0,
987
- top: 0,
988
- right: view.innerWidth,
989
- bottom: view.innerHeight
990
- })[side];
991
- const targetEdge = edge + (positiveEdge ? 1 : -1) * numeric(read(`margin-${side}`)) * scale(side);
992
- const start = Math.min(referenceEdge, targetEdge);
993
- const length = Math.max(1, Math.abs(referenceEdge - targetEdge));
994
- regions = [{
995
- left: horizontal ? rect.left : start,
996
- top: horizontal ? start : rect.top,
997
- width: horizontal ? rect.width : length,
998
- height: horizontal ? length : rect.height
999
- }];
1000
- }
1001
- }
1002
- }
1003
- const name = key.replace(".", " ").replace(/([a-z])([A-Z])/g, "$1 $2").toLowerCase();
1004
- return {
1005
- regions,
1006
- label: `${name}: ${value} px`
1007
- };
1008
- }
1009
- //#endregion
1010
- //#region src/configurator/inspector/inspection-model.ts
1011
- function readableColor(value) {
1012
- const rgb = value.trim().match(/^rgb\(\s*(\d+)\s*[, ]\s*(\d+)\s*[, ]\s*(\d+)\s*\)$/);
1013
- if (!rgb) return value;
1014
- return `#${rgb.slice(1).map((channel) => Number(channel).toString(16).padStart(2, "0")).join("")}`;
1015
- }
1016
- function resolveToken(style, name, seen = /* @__PURE__ */ new Set()) {
1017
- if (seen.has(name)) return "";
1018
- seen.add(name);
1019
- const value = style.getPropertyValue(name).trim();
1020
- const reference = value.match(/^var\((--[\w-]+)\)$/);
1021
- return reference ? resolveToken(style, reference[1], seen) : value;
1022
- }
1023
- /** Read-only inspection; always use the element's window, including detached previews. */
1024
- function inspectElement(element, isKnown) {
1025
- const view = element.ownerDocument.defaultView;
1026
- if (!view) throw new Error("The inspected element has no document window.");
1027
- const style = view.getComputedStyle(element);
1028
- const rootFontSize = Number.parseFloat(view.getComputedStyle(element.ownerDocument.documentElement).fontSize) || 16;
1029
- const bounds = element.getBoundingClientRect();
1030
- const sides = [
1031
- "top",
1032
- "right",
1033
- "bottom",
1034
- "left"
1035
- ];
1036
- const readSides = (prefix, suffix = "") => Object.fromEntries(sides.map((side) => [side, style.getPropertyValue(`${prefix}${side}${suffix}`) || "0px"]));
1037
- const padding = readSides("padding-");
1038
- const border = readSides("border-", "-width");
1039
- const margin = readSides("margin-");
1040
- const contentDimension = (axis) => {
1041
- const value = style.getPropertyValue(axis);
1042
- const dimension = Number.parseFloat(value);
1043
- const hasPixelDimension = /^\d+(?:\.\d+)?px$/.test(value);
1044
- if (hasPixelDimension && style.getPropertyValue("box-sizing") !== "border-box") return dimension;
1045
- const inset = (axis === "width" ? ["left", "right"] : ["top", "bottom"]).reduce((total, side) => total + (Number.parseFloat(padding[side]) || 0) + (Number.parseFloat(border[side]) || 0), 0);
1046
- return Math.max(0, (hasPixelDimension ? dimension : bounds[axis]) - inset);
1047
- };
1048
- const box = {
1049
- content: {
1050
- width: contentDimension("width"),
1051
- height: contentDimension("height")
1052
- },
1053
- padding,
1054
- border,
1055
- margin,
1056
- radius: {
1057
- topLeft: style.getPropertyValue("border-top-left-radius") || "0px",
1058
- topRight: style.getPropertyValue("border-top-right-radius") || "0px",
1059
- bottomRight: style.getPropertyValue("border-bottom-right-radius") || "0px",
1060
- bottomLeft: style.getPropertyValue("border-bottom-left-radius") || "0px"
1061
- },
1062
- gap: {
1063
- row: style.getPropertyValue("row-gap") || "normal",
1064
- column: style.getPropertyValue("column-gap") || "normal"
1065
- }
1066
- };
1067
- const position = style.getPropertyValue("position");
1068
- if (position && position !== "static") box.position = readSides("");
1069
- const classes = Array.from(element.classList);
1070
- const plainClasses = classes.filter((name) => !splitVariants(name).variants.length && !name.includes("["));
1071
- const spacing = inspectTokens(plainClasses.join(" "), isKnown);
1072
- const candidates = (prefix, namespaces) => plainClasses.flatMap((raw) => {
1073
- const utility = raw.replace(/^!|!$/g, "");
1074
- if (!utility.startsWith(`${prefix}-`)) return [];
1075
- const suffix = utility.slice(prefix.length + 1);
1076
- return namespaces.map((namespace) => `--${namespace}${suffix}`);
1077
- });
1078
- const variantsAffect = (prefixes) => classes.some((raw) => {
1079
- const { variants, utility } = splitVariants(raw);
1080
- return variants.length > 0 && prefixes.some((prefix) => utility.replace(/^!/, "").startsWith(`${prefix}-`));
1081
- });
1082
- const equivalent = (value, computed, property) => {
1083
- if (!value) return false;
1084
- if (property.includes("color")) {
1085
- if (value.match(/^\d+(?:\.\d+)?\s+\d+(?:\.\d+)?\s+\d+(?:\.\d+)?$/)) value = `rgb(${value})`;
1086
- return readableColor(value).toLowerCase() === readableColor(computed).toLowerCase();
1087
- }
1088
- const length = value.match(/^(-?\d+(?:\.\d+)?)(rem|px|em)$/);
1089
- if (length && computed.endsWith("px")) {
1090
- let factor = 1;
1091
- if (length[2] === "rem") factor = rootFontSize;
1092
- if (length[2] === "em") factor = Number.parseFloat(style.fontSize);
1093
- return Math.abs(Number(length[1]) * factor - Number.parseFloat(computed)) < .02;
1094
- }
1095
- return value.replace(/["']/g, "").replace(/\s+/g, " ") === computed.replace(/["']/g, "").replace(/\s+/g, " ");
1096
- };
1097
- const property = (label, css, tokens = [], prefixes = []) => {
1098
- const computed = style.getPropertyValue(css);
1099
- const matching = variantsAffect(prefixes) ? [] : tokens.filter((token) => !!token && isKnown(token) && equivalent(resolveToken(style, token), computed, css));
1100
- const token = [...new Set(matching)][0];
1101
- const isColor = css.includes("color");
1102
- return {
1103
- label,
1104
- value: isColor ? readableColor(computed) : computed,
1105
- ...token ? { token } : {},
1106
- ...isColor ? { color: computed } : {}
1107
- };
1108
- };
1109
- const tag = element.tagName.toLowerCase();
1110
- const role = element.getAttribute("role");
1111
- const context = element.closest("[data-inspector-name]")?.getAttribute("data-inspector-name") || element.closest(".studio-gallery-card")?.querySelector(".studio-gallery-card-title")?.textContent?.trim();
1112
- const description = (element.getAttribute("aria-label") || element.innerText || element.textContent || "").trim().replace(/\s+/g, " ").slice(0, 100);
1113
- const name = context || role || tag;
1114
- const paddingPrefixes = [
1115
- "p",
1116
- "px",
1117
- "py",
1118
- "pt",
1119
- "pr",
1120
- "pb",
1121
- "pl",
1122
- "ps",
1123
- "pe"
1124
- ];
1125
- const layout = [
1126
- {
1127
- label: "Width",
1128
- value: style.getPropertyValue("width") || `${bounds.width}px`
1129
- },
1130
- {
1131
- label: "Height",
1132
- value: style.getPropertyValue("height") || `${bounds.height}px`
1133
- },
1134
- property("Display", "display"),
1135
- property("Position", "position"),
1136
- ...sides.map((side) => property(`Padding ${side}`, `padding-${side}`, [spacing.padding[side]], paddingPrefixes)),
1137
- ...sides.map((side) => property(`Margin ${side}`, `margin-${side}`)),
1138
- property("Row gap", "row-gap", [spacing.gap.row], ["gap"]),
1139
- property("Column gap", "column-gap", [spacing.gap.column], ["gap"]),
1140
- property("Radius", "border-radius", [spacing.radius], ["rounded"]),
1141
- ...sides.map((side) => property(`Border ${side} width`, `border-${side}-width`))
1142
- ];
1143
- const typography = [
1144
- property("Font", "font-family", candidates("font", ["font-"]), ["font"]),
1145
- property("Size", "font-size", candidates("text", ["text-"]), ["text"]),
1146
- property("Weight", "font-weight", candidates("font", ["font-weight-"]), ["font"]),
1147
- property("Line height", "line-height"),
1148
- property("Letter spacing", "letter-spacing"),
1149
- property("Alignment", "text-align")
1150
- ];
1151
- const appearance = [
1152
- property("Text", "color", candidates("text", ["color-", ""]).flatMap((token) => [token, `${token}-base`]), ["text"]),
1153
- property("Fill", "background-color", candidates("bg", ["color-", ""]).flatMap((token) => [token, `${token}-base`]), ["bg"]),
1154
- property("Border", "border-top-color", candidates("border", ["color-", ""]).flatMap((token) => [token, `${token}-base`]), ["border"]),
1155
- property("Opacity", "opacity"),
1156
- property("Shadow", "box-shadow")
1157
- ];
1158
- const isZero = (value) => value.split(/\s+/).every((part) => /^-?0(?:\.0+)?(?:px|rem|em|%)?$/.test(part));
1159
- const visibleProperty = (row) => {
1160
- if (row.label === "Width" || row.label === "Height" || row.token) return true;
1161
- const value = row.value.trim();
1162
- if (!value) return false;
1163
- if (/^(Padding|Margin|Border .* width|Row gap|Column gap|Radius)/.test(row.label) && (isZero(value) || value === "normal")) return false;
1164
- if (row.label === "Position" && value === "static") return false;
1165
- if (row.label === "Display" && ["inline", "block"].includes(value)) return false;
1166
- if (row.label === "Shadow" && value === "none") return false;
1167
- if (row.label === "Opacity" && Number(value) === 1) return false;
1168
- if (row.label === "Fill" && (value === "transparent" || /^rgba?\([^)]*[,/]\s*0(?:\.0+)?%?\s*\)$/.test(value))) return false;
1169
- if (row.label === "Border" && !(Number.parseFloat(border.top) > 0)) return false;
1170
- if (row.label === "Line height" && value === "normal") return false;
1171
- if (row.label === "Letter spacing" && (value === "normal" || isZero(value))) return false;
1172
- if (row.label === "Alignment" && [
1173
- "normal",
1174
- "start",
1175
- "left"
1176
- ].includes(value)) return false;
1177
- if (row.label === "Weight" && ["400", "normal"].includes(value)) return false;
1178
- return true;
1179
- };
1180
- return {
1181
- name,
1182
- display: style.display,
1183
- tag,
1184
- description,
1185
- width: bounds.width,
1186
- height: bounds.height,
1187
- box,
1188
- groups: [
1189
- {
1190
- name: "Layout",
1191
- properties: layout
1192
- },
1193
- {
1194
- name: "Typography",
1195
- properties: typography
1196
- },
1197
- {
1198
- name: "Appearance",
1199
- properties: appearance
1200
- }
1201
- ].map((group) => ({
1202
- name: group.name,
1203
- properties: group.properties.filter(visibleProperty)
1204
- })).filter((group) => group.properties.length > 0)
1205
- };
1206
- }
1207
- //#endregion
1208
366
  //#region src/configurator/inspector/PreviewInspector.tsx
1209
367
  /** Read the real element underneath the inert gallery's stretched zoom button. */
1210
368
  function elementAtPoint(root, x, y) {
@@ -1506,41 +664,11 @@ function PreviewInspector({ children, revision, isKnown, onSelect, onScroll }) {
1506
664
  children: /* @__PURE__ */ jsx(X, { size: 15 })
1507
665
  })
1508
666
  ] }),
1509
- snapshot ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("section", {
1510
- className: "studio-inspector-layout",
1511
- children: [/* @__PURE__ */ jsxs("div", {
1512
- className: "studio-inspector-section-heading",
1513
- children: [/* @__PURE__ */ jsx("h3", { children: "Layout" }), /* @__PURE__ */ jsx("span", {
1514
- title: "CSS display",
1515
- children: snapshot.display
1516
- })]
1517
- }), /* @__PURE__ */ jsx(BoxModel, {
1518
- snapshot,
1519
- onSelect,
1520
- onHighlight: showHighlight
1521
- })]
1522
- }), snapshot.groups.map((group) => ({
1523
- name: group.name,
1524
- properties: group.properties.filter((property) => group.name !== "Layout" || ![
1525
- "Width",
1526
- "Height",
1527
- "Margin",
1528
- "Border width",
1529
- "Radius",
1530
- "Row gap",
1531
- "Column gap",
1532
- "Display"
1533
- ].includes(property.label) && !/^(Padding |Margin |Border .* width$)/.test(property.label))
1534
- })).filter((group_0) => group_0.properties.length).map((group_1) => /* @__PURE__ */ jsxs("section", { children: [group_1.name !== "Layout" && /* @__PURE__ */ jsx("h3", { children: group_1.name }), /* @__PURE__ */ jsx("dl", { children: group_1.properties.map((property_0) => /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", { children: property_0.label }), /* @__PURE__ */ jsxs("dd", { children: [
1535
- property_0.color && /* @__PURE__ */ jsx("i", { style: { background: property_0.color } }),
1536
- /* @__PURE__ */ jsx("span", { children: property_0.value }),
1537
- property_0.token && /* @__PURE__ */ jsx("button", {
1538
- type: "button",
1539
- title: `Edit ${property_0.token}`,
1540
- onClick: () => onSelect(property_0.token),
1541
- children: property_0.token.replace(/^--/, "")
1542
- })
1543
- ] })] }, property_0.label)) })] }, group_1.name))] }) : /* @__PURE__ */ jsx("p", {
667
+ snapshot ? /* @__PURE__ */ jsx(InspectorDetails, {
668
+ snapshot,
669
+ onSelect,
670
+ onHighlight: showHighlight
671
+ }) : /* @__PURE__ */ jsx("p", {
1544
672
  className: "studio-inspector-empty",
1545
673
  children: "Hover an element in the preview to inspect it. Click to pin your selection."
1546
674
  })
@@ -1549,204 +677,6 @@ function PreviewInspector({ children, revision, isKnown, onSelect, onScroll }) {
1549
677
  ]
1550
678
  });
1551
679
  }
1552
- function BoxModel(t0) {
1553
- const $ = c(39);
1554
- const { snapshot, onSelect, onHighlight } = t0;
1555
- const box = snapshot.box;
1556
- const number = _temp2$4;
1557
- let t1;
1558
- let t2;
1559
- let t3;
1560
- let t4;
1561
- if ($[0] !== box.border || $[1] !== box.content.height || $[2] !== box.content.width || $[3] !== box.gap.column || $[4] !== box.gap.row || $[5] !== box.margin || $[6] !== box.padding || $[7] !== box.position || $[8] !== box.radius || $[9] !== onHighlight || $[10] !== onSelect || $[11] !== snapshot.groups) {
1562
- const properties = snapshot.groups.flatMap(_temp3$3);
1563
- const tokenFor = (label) => properties.find((property) => property.label === label)?.token;
1564
- const nonzero = _temp5$1;
1565
- let t5;
1566
- if ($[16] !== onHighlight || $[17] !== onSelect) {
1567
- t5 = (text, label_0, className, token, key) => /* @__PURE__ */ jsx("button", {
1568
- type: "button",
1569
- className,
1570
- title: token ? `Edit ${token}` : `${label_0}: ${text}`,
1571
- "aria-label": `${label_0}: ${text}`,
1572
- "data-token": token,
1573
- "data-box-highlight": key,
1574
- onPointerEnter: () => onHighlight(key ?? null),
1575
- onPointerLeave: () => onHighlight(null),
1576
- onFocus: () => onHighlight(key ?? null),
1577
- onBlur: () => onHighlight(null),
1578
- onClick: () => token ? onSelect(token) : onHighlight(key ?? null),
1579
- children: number(text)
1580
- });
1581
- $[16] = onHighlight;
1582
- $[17] = onSelect;
1583
- $[18] = t5;
1584
- } else t5 = $[18];
1585
- const value_1 = t5;
1586
- const layer = (name, values, children) => /* @__PURE__ */ jsxs("div", {
1587
- className: `studio-box-layer is-${name}`,
1588
- style: name === "border" ? { borderRadius: [
1589
- box.radius.topLeft,
1590
- box.radius.topRight,
1591
- box.radius.bottomRight,
1592
- box.radius.bottomLeft
1593
- ].map((radius) => nonzero(radius) ? "12px" : "0px").join(" ") } : void 0,
1594
- children: [
1595
- /* @__PURE__ */ jsx("span", {
1596
- className: "studio-box-name",
1597
- children: name
1598
- }),
1599
- [
1600
- "top",
1601
- "right",
1602
- "bottom",
1603
- "left"
1604
- ].map((side) => /* @__PURE__ */ jsx("span", { children: value_1(values[side], `${name} ${side}`, `studio-box-value is-${side}`, tokenFor(`${name[0].toUpperCase()}${name.slice(1)} ${side}`), `${name}.${side}`) }, side)),
1605
- name === "border" && Object.values(box.radius).some(nonzero) && Object.entries(box.radius).map((t6) => {
1606
- const [corner, radius_0] = t6;
1607
- return /* @__PURE__ */ jsx("span", { children: value_1(radius_0, `Radius ${corner}`, `studio-box-radius is-${corner}`, tokenFor("Radius"), `radius.${corner}`) }, corner);
1608
- }),
1609
- children
1610
- ]
1611
- });
1612
- let t7;
1613
- if ($[19] !== box.gap.row) {
1614
- t7 = nonzero(box.gap.row);
1615
- $[19] = box.gap.row;
1616
- $[20] = t7;
1617
- } else t7 = $[20];
1618
- const hasRowGap = t7;
1619
- let t8;
1620
- if ($[21] !== box.gap.column) {
1621
- t8 = nonzero(box.gap.column);
1622
- $[21] = box.gap.column;
1623
- $[22] = t8;
1624
- } else t8 = $[22];
1625
- const hasColumnGap = t8;
1626
- const t9 = `${Math.round(box.content.width * 10) / 10}px`;
1627
- let t10;
1628
- if ($[23] !== t9 || $[24] !== value_1) {
1629
- t10 = value_1(t9, "Content width", "studio-box-dimension-value", void 0, "width");
1630
- $[23] = t9;
1631
- $[24] = value_1;
1632
- $[25] = t10;
1633
- } else t10 = $[25];
1634
- let t11;
1635
- if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
1636
- t11 = /* @__PURE__ */ jsx("span", { children: "×" });
1637
- $[26] = t11;
1638
- } else t11 = $[26];
1639
- const t12 = `${Math.round(box.content.height * 10) / 10}px`;
1640
- let t13;
1641
- if ($[27] !== t12 || $[28] !== value_1) {
1642
- t13 = value_1(t12, "Content height", "studio-box-dimension-value", void 0, "height");
1643
- $[27] = t12;
1644
- $[28] = value_1;
1645
- $[29] = t13;
1646
- } else t13 = $[29];
1647
- let t14;
1648
- if ($[30] !== t10 || $[31] !== t13) {
1649
- t14 = /* @__PURE__ */ jsx("div", {
1650
- className: "studio-box-content",
1651
- title: "Content width × height",
1652
- children: /* @__PURE__ */ jsxs("div", {
1653
- className: "studio-box-dimensions",
1654
- children: [
1655
- t10,
1656
- t11,
1657
- t13
1658
- ]
1659
- })
1660
- });
1661
- $[30] = t10;
1662
- $[31] = t13;
1663
- $[32] = t14;
1664
- } else t14 = $[32];
1665
- const content = t14;
1666
- const diagram = layer("margin", box.margin, layer("border", box.border, layer("padding", box.padding, content)));
1667
- t1 = "studio-box-model";
1668
- t2 = "Box model";
1669
- t3 = box.position ? layer("position", box.position, diagram) : diagram;
1670
- t4 = (hasRowGap || hasColumnGap) && /* @__PURE__ */ jsx("div", {
1671
- className: "studio-box-gaps",
1672
- "aria-label": "Layout gaps",
1673
- children: /* @__PURE__ */ jsxs("div", {
1674
- className: "studio-gap-grid",
1675
- style: {
1676
- gridTemplateColumns: `minmax(0,1fr) ${hasColumnGap ? 28 : 0}px minmax(0,1fr)`,
1677
- gridTemplateRows: `20px ${hasRowGap ? 22 : 0}px 20px`
1678
- },
1679
- children: [
1680
- /* @__PURE__ */ jsx("i", {}),
1681
- /* @__PURE__ */ jsx("i", {}),
1682
- /* @__PURE__ */ jsx("i", {}),
1683
- /* @__PURE__ */ jsx("i", {}),
1684
- hasColumnGap && value_1(box.gap.column, "Column gap", "studio-gap-number is-column", tokenFor("Column gap"), "gap.column"),
1685
- hasRowGap && value_1(box.gap.row, "Row gap", "studio-gap-number is-row", tokenFor("Row gap"), "gap.row")
1686
- ]
1687
- })
1688
- });
1689
- $[0] = box.border;
1690
- $[1] = box.content.height;
1691
- $[2] = box.content.width;
1692
- $[3] = box.gap.column;
1693
- $[4] = box.gap.row;
1694
- $[5] = box.margin;
1695
- $[6] = box.padding;
1696
- $[7] = box.position;
1697
- $[8] = box.radius;
1698
- $[9] = onHighlight;
1699
- $[10] = onSelect;
1700
- $[11] = snapshot.groups;
1701
- $[12] = t1;
1702
- $[13] = t2;
1703
- $[14] = t3;
1704
- $[15] = t4;
1705
- } else {
1706
- t1 = $[12];
1707
- t2 = $[13];
1708
- t3 = $[14];
1709
- t4 = $[15];
1710
- }
1711
- let t5;
1712
- if ($[33] === Symbol.for("react.memo_cache_sentinel")) {
1713
- t5 = /* @__PURE__ */ jsx("figcaption", { children: "Box model · px" });
1714
- $[33] = t5;
1715
- } else t5 = $[33];
1716
- let t6;
1717
- if ($[34] !== t1 || $[35] !== t2 || $[36] !== t3 || $[37] !== t4) {
1718
- t6 = /* @__PURE__ */ jsxs("figure", {
1719
- className: t1,
1720
- "aria-label": t2,
1721
- children: [
1722
- t3,
1723
- t4,
1724
- t5
1725
- ]
1726
- });
1727
- $[34] = t1;
1728
- $[35] = t2;
1729
- $[36] = t3;
1730
- $[37] = t4;
1731
- $[38] = t6;
1732
- } else t6 = $[38];
1733
- return t6;
1734
- }
1735
- function _temp5$1(value_0) {
1736
- return value_0 !== "normal" && value_0.split(/\s+/).some(_temp4$3);
1737
- }
1738
- function _temp4$3(part) {
1739
- return parseFloat(part) !== 0 && Number.isFinite(parseFloat(part));
1740
- }
1741
- function _temp3$3(group) {
1742
- return group.properties;
1743
- }
1744
- function _temp2$4(value) {
1745
- return value.replace(/(-?\d*\.?\d+)px/g, _temp$6);
1746
- }
1747
- function _temp$6(_, amount) {
1748
- return String(Math.round(Number(amount) * 10) / 10);
1749
- }
1750
680
  //#endregion
1751
681
  //#region src/configurator/ConfigurationLauncher.tsx
1752
682
  function ConfigurationLauncher({ position, onOpen }) {
@@ -5096,7 +4026,7 @@ function groupKeyFor(section, name, defaults) {
5096
4026
  const textStyle = section === "Typography" ? name.match(/^--text-(.+?)(?:--.+)?$/)?.[1] : void 0;
5097
4027
  return textStyle ? `--text-${textStyle}` : section === "Typography" ? name.startsWith("--font-weight-") ? "Font weights" : name.startsWith("--font-") ? "Font families" : "Letter spacing" : section === "Colors" ? baseColorNames(defaults).has(name) ? `Base system · ${name.slice(2).split("-")[0]}` : colorNamespaces[name.slice(2).split("-")[0]] ?? "Other" : section === "Spacing" || section === "Radius" || section === "Sizing" ? componentToken(name).title : section === "Effects" ? effectToken(name).title : "tokens";
5098
4028
  }
5099
- const ComponentGallery = lazy(() => import("../ComponentGallery-Dp0kZVZM.js"));
4029
+ const ComponentGallery = lazy(() => import("../ComponentGallery-Da70Y4_Q.js"));
5100
4030
  function ComponentPreview(t0) {
5101
4031
  const $ = c(14);
5102
4032
  const { value, mode, inspector } = t0;
@@ -5341,22 +4271,24 @@ function TokenField({ name, value, original, changed, onChange, onReset, onValid
5341
4271
  });
5342
4272
  }
5343
4273
  function PopoutOverlay(t0) {
5344
- const $ = c(2);
5345
- const { children } = t0;
5346
- let t1;
5347
- if ($[0] !== children) {
5348
- t1 = /* @__PURE__ */ jsx("div", {
5349
- className: "studio-overlay",
4274
+ const $ = c(3);
4275
+ const { children, className } = t0;
4276
+ const t1 = className ?? "studio-overlay";
4277
+ let t2;
4278
+ if ($[0] !== children || $[1] !== t1) {
4279
+ t2 = /* @__PURE__ */ jsx("div", {
4280
+ className: t1,
5350
4281
  children
5351
4282
  });
5352
4283
  $[0] = children;
5353
4284
  $[1] = t1;
5354
- } else t1 = $[1];
5355
- return t1;
4285
+ $[2] = t2;
4286
+ } else t2 = $[2];
4287
+ return t2;
5356
4288
  }
5357
- function ConfigurationModalContent({ memory, windowBounds, poppedOut, onPopout, onDock, onMinimize, popupBlocked }) {
5358
- const Overlay = poppedOut ? PopoutOverlay : $8b8d26808cb8cb53$export$8948f78d83984c69;
5359
- const Surface = poppedOut ? "div" : $8b8d26808cb8cb53$export$2b77a92f1a5ad772;
4289
+ function ConfigurationModalContent({ memory, windowBounds, poppedOut, floating, onPopout, onDock, onMinimize, popupBlocked }) {
4290
+ const Overlay = poppedOut || floating ? PopoutOverlay : $8b8d26808cb8cb53$export$8948f78d83984c69;
4291
+ const Surface = poppedOut || floating ? "div" : $8b8d26808cb8cb53$export$2b77a92f1a5ad772;
5360
4292
  const studioWindow = useStudioWindow(windowBounds, !poppedOut);
5361
4293
  const [compactPreview, setCompactPreview] = useState(false);
5362
4294
  useEffect(() => {
@@ -5747,7 +4679,7 @@ function ConfigurationModalContent({ memory, windowBounds, poppedOut, onPopout,
5747
4679
  })]
5748
4680
  }, `${key_11}-${field_1}`);
5749
4681
  return /* @__PURE__ */ jsx(Overlay, {
5750
- className: "studio-overlay",
4682
+ className: `studio-overlay${floating && !poppedOut ? " studio-overlay-floating" : ""}`,
5751
4683
  isOpen,
5752
4684
  onOpenChange: (next_2) => {
5753
4685
  if (!next_2) cancel();
@@ -6319,8 +5251,8 @@ function ConfigurationModalContent({ memory, windowBounds, poppedOut, onPopout,
6319
5251
  });
6320
5252
  }
6321
5253
  function UIConfigurationModal() {
6322
- const $ = c(22);
6323
- const { isOpen, revision, open } = useUIConfiguration();
5254
+ const $ = c(28);
5255
+ const { isOpen, revision, open, openFloating, floating } = useUIConfiguration();
6324
5256
  const [minimized, setMinimized] = useState(false);
6325
5257
  const [hasLauncher, setHasLauncher] = useState(false);
6326
5258
  const restorePopout = useRef(false);
@@ -6344,88 +5276,109 @@ function UIConfigurationModal() {
6344
5276
  } else t2 = $[3];
6345
5277
  const memory = useRef(t2);
6346
5278
  const windowBounds = useRef(null);
5279
+ let t3;
5280
+ if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
5281
+ t3 = {
5282
+ left: 32,
5283
+ top: 80,
5284
+ width: 640,
5285
+ height: 720
5286
+ };
5287
+ $[4] = t3;
5288
+ } else t3 = $[4];
5289
+ const floatingBounds = useRef(t3);
6347
5290
  const popout = useStudioPopout(isOpen && !minimized);
6348
5291
  if ((!isOpen || minimized) && hasLauncher) {
6349
- let t3;
6350
- if ($[4] !== isOpen || $[5] !== open || $[6] !== popout) {
6351
- t3 = createPortal(/* @__PURE__ */ jsx(ConfigurationLauncher, {
5292
+ let t4;
5293
+ if ($[5] !== floating || $[6] !== isOpen || $[7] !== open || $[8] !== openFloating || $[9] !== popout) {
5294
+ t4 = createPortal(/* @__PURE__ */ jsx(ConfigurationLauncher, {
6352
5295
  position: launcherPosition,
6353
5296
  onOpen: () => {
6354
5297
  setMinimized(false);
6355
- if (!isOpen) open();
5298
+ if (!isOpen) {
5299
+ if (floating) openFloating();
5300
+ else open();
5301
+ }
6356
5302
  if (restorePopout.current) popout.open();
6357
5303
  }
6358
5304
  }), document.body);
6359
- $[4] = isOpen;
6360
- $[5] = open;
6361
- $[6] = popout;
6362
- $[7] = t3;
6363
- } else t3 = $[7];
6364
- return t3;
5305
+ $[5] = floating;
5306
+ $[6] = isOpen;
5307
+ $[7] = open;
5308
+ $[8] = openFloating;
5309
+ $[9] = popout;
5310
+ $[10] = t4;
5311
+ } else t4 = $[10];
5312
+ return t4;
6365
5313
  }
6366
5314
  if (!isOpen) return null;
6367
- const t3 = !!popout.popup;
6368
- let t4;
6369
- let t5;
5315
+ const t4 = floating ? floatingBounds : windowBounds;
5316
+ const t5 = !!popout.popup;
6370
5317
  let t6;
6371
- if ($[8] !== popout) {
6372
- t4 = () => {
5318
+ let t7;
5319
+ let t8;
5320
+ if ($[11] !== popout) {
5321
+ t6 = () => {
6373
5322
  restorePopout.current = true;
6374
5323
  popout.open();
6375
5324
  };
6376
- t5 = () => {
5325
+ t7 = () => {
6377
5326
  restorePopout.current = false;
6378
5327
  popout.dock();
6379
5328
  };
6380
- t6 = () => {
5329
+ t8 = () => {
6381
5330
  restorePopout.current = !!popout.popup;
6382
5331
  setHasLauncher(true);
6383
5332
  setMinimized(true);
6384
5333
  popout.dock();
6385
5334
  };
6386
- $[8] = popout;
6387
- $[9] = t4;
6388
- $[10] = t5;
6389
- $[11] = t6;
5335
+ $[11] = popout;
5336
+ $[12] = t6;
5337
+ $[13] = t7;
5338
+ $[14] = t8;
6390
5339
  } else {
6391
- t4 = $[9];
6392
- t5 = $[10];
6393
- t6 = $[11];
5340
+ t6 = $[12];
5341
+ t7 = $[13];
5342
+ t8 = $[14];
6394
5343
  }
6395
- let t7;
6396
- if ($[12] !== popout.blocked || $[13] !== revision || $[14] !== t3 || $[15] !== t4 || $[16] !== t5 || $[17] !== t6) {
6397
- t7 = /* @__PURE__ */ jsx(ConfigurationModalContent, {
5344
+ let t9;
5345
+ if ($[15] !== floating || $[16] !== popout.blocked || $[17] !== revision || $[18] !== t4 || $[19] !== t5 || $[20] !== t6 || $[21] !== t7 || $[22] !== t8) {
5346
+ t9 = /* @__PURE__ */ jsx(ConfigurationModalContent, {
6398
5347
  memory,
6399
- windowBounds,
6400
- poppedOut: t3,
6401
- onPopout: t4,
6402
- onDock: t5,
6403
- onMinimize: t6,
5348
+ windowBounds: t4,
5349
+ floating,
5350
+ poppedOut: t5,
5351
+ onPopout: t6,
5352
+ onDock: t7,
5353
+ onMinimize: t8,
6404
5354
  popupBlocked: popout.blocked
6405
5355
  }, revision);
6406
- $[12] = popout.blocked;
6407
- $[13] = revision;
6408
- $[14] = t3;
6409
- $[15] = t4;
6410
- $[16] = t5;
6411
- $[17] = t6;
6412
- $[18] = t7;
6413
- } else t7 = $[18];
6414
- const content = t7;
6415
- let t8;
6416
- if ($[19] !== content || $[20] !== popout.popup) {
6417
- t8 = popout.popup ? createPortal(/* @__PURE__ */ jsx(StudioPopoutContext, {
5356
+ $[15] = floating;
5357
+ $[16] = popout.blocked;
5358
+ $[17] = revision;
5359
+ $[18] = t4;
5360
+ $[19] = t5;
5361
+ $[20] = t6;
5362
+ $[21] = t7;
5363
+ $[22] = t8;
5364
+ $[23] = t9;
5365
+ } else t9 = $[23];
5366
+ const content = t9;
5367
+ let t10;
5368
+ if ($[24] !== content || $[25] !== floating || $[26] !== popout.popup) {
5369
+ t10 = popout.popup ? createPortal(/* @__PURE__ */ jsx(StudioPopoutContext, {
6418
5370
  value: true,
6419
5371
  children: /* @__PURE__ */ jsx(UNSAFE_PortalProvider, {
6420
5372
  getContainer: () => popout.popup.document.body,
6421
5373
  children: content
6422
5374
  })
6423
- }), popout.popup.document.body) : content;
6424
- $[19] = content;
6425
- $[20] = popout.popup;
6426
- $[21] = t8;
6427
- } else t8 = $[21];
6428
- return t8;
5375
+ }), popout.popup.document.body) : floating ? createPortal(content, document.body) : content;
5376
+ $[24] = content;
5377
+ $[25] = floating;
5378
+ $[26] = popout.popup;
5379
+ $[27] = t10;
5380
+ } else t10 = $[27];
5381
+ return t10;
6429
5382
  }
6430
5383
  //#endregion
6431
5384
  export { ColorModeSwitch, UIConfigurationModal, UIConfigurationProvider, exportCss, parseThemeCss, useUIConfiguration };