@povio/ui 5.0.0-rc.6 → 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.
- package/dist/Button-BPTvffuk.js +86 -0
- package/dist/{Calendar-BTjajO6i.js → Calendar-BxtOuqIM.js} +3 -3
- package/dist/{Checkbox-CV1ILXXO.js → Checkbox-DYxXYfKL.js} +3 -2
- package/dist/CheckboxCheckmark-D_uc9pon.js +44 -0
- package/dist/{ComponentGallery-C2tjrHWn.js → ComponentGallery-Da70Y4_Q.js} +19 -178
- package/dist/{DatePicker-DOLL7mkc.js → DatePicker-wulRNGyL.js} +6 -6
- package/dist/{DatePickerInput-BLBcySA2.js → DatePickerInput-BB_vPlKu.js} +3 -3
- package/dist/{DateRangePicker-BF-1CztH.js → DateRangePicker-B0tMVREG.js} +6 -6
- package/dist/{DateTimePicker-Cj0qvJUz.js → DateTimePicker-WGMr0bEH.js} +6 -6
- package/dist/{FileInput-Br5DQaGQ.js → FileInput-DP105Iy9.js} +2 -2
- package/dist/{FileUpload--7ub3EZO.js → FileUpload-CgNDIvzg.js} +3 -3
- package/dist/{Form-BJ12MjE-.d.ts → Form-DbEWnCKc.d.ts} +1 -1
- package/dist/{FormField-B99dLt8o.js → FormField-AY25LzbW.js} +3 -96
- package/dist/{FormFieldError-DeOHHLo2.js → FormFieldError-BVAO5p7H.js} +2 -13
- package/dist/{InputItem-CIxbTxZu.js → InputItem-ZeN-aIz8.js} +11 -11
- package/dist/{Inputs-DJSKiaWY.js → Inputs-BC5q5Cvj.js} +1 -1
- package/dist/{Inputs-DA73LmLc.d.ts → Inputs-O84btFJL.d.ts} +1 -1
- package/dist/{NumberRangeInput-B8-LHfg3.js → NumberRangeInput-B_sMIpP1.js} +2 -2
- package/dist/{PaginationList-DtvuP63b.js → PaginationList-DptMNpNs.js} +1 -1
- package/dist/{Progress-B3mY9rIP.js → Progress-Du30L4_s.js} +2 -27
- package/dist/{RadioGroup-DOw3PRoX.js → RadioGroup-CUGNSJql.js} +3 -82
- package/dist/{RichTextEditor-D4yN7Wj7.js → RichTextEditor-VDOpj7sk.js} +3 -3
- package/dist/{Select-UR0ec2Ux.js → Select-B2pAfwRk.js} +2 -2
- package/dist/{Slider-CzEmKYBF.js → Slider-Clc1szFY.js} +1 -1
- package/dist/{Switch-CqnGEdeD.js → Switch-CimmMqEk.js} +3 -27
- package/dist/{Table-BN2_J_Ne.js → Table-CqepqSfe.js} +2 -1
- package/dist/{TextArea-D8WkKsGn.js → TextArea-B3teIhsJ.js} +3 -5
- package/dist/TextArea.cva-Bb73hriz.js +5 -0
- package/dist/{TimePicker-C4taAOFQ.js → TimePicker-CU_yL2sY.js} +4 -4
- package/dist/{Toast-DtG3pA61.js → Toast-DPbnLlBi.js} +1 -1
- package/dist/{ToggleGroup-DOk27fgI.js → ToggleGroup-BULVwErp.js} +1 -1
- package/dist/{Button-C5rv4Cr2.js → button.cva-rv5Uq4aW.js} +1 -84
- package/dist/{CheckboxCheckmark-CpC3wlMs.js → checkbox.cva-IfOByVLA.js} +1 -42
- package/dist/components/alert-dialog.js +1 -1
- package/dist/components/alert.js +116 -1
- package/dist/components/autocomplete.js +2 -2
- package/dist/components/button.js +1 -1
- package/dist/components/checkbox-group.js +3 -3
- package/dist/components/checkbox.js +1 -1
- package/dist/components/date-picker.js +1 -1
- package/dist/components/date-range-picker.js +1 -1
- package/dist/components/date-time-picker.js +1 -1
- package/dist/components/file-input.js +1 -1
- package/dist/components/file-upload-container.js +1 -1
- package/dist/components/file-upload.js +1 -1
- package/dist/components/form-field.js +1 -1
- package/dist/components/icon-button.js +1 -1
- package/dist/components/inline-icon-button.js +1 -1
- package/dist/components/input.js +3 -3
- package/dist/components/number-field.js +3 -3
- package/dist/components/number-range-input.js +1 -1
- package/dist/components/pagination-list.js +1 -1
- package/dist/components/pagination.js +1 -1
- package/dist/components/progress.js +1 -1
- package/dist/components/query-autocomplete.js +1 -1
- package/dist/components/query-select.js +2 -2
- package/dist/components/radio-group.js +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/slider.js +1 -1
- package/dist/components/split-button.js +1 -1
- package/dist/components/switch.js +1 -1
- package/dist/components/tag.js +93 -1
- package/dist/components/text-area.js +1 -1
- package/dist/components/text-button.js +1 -1
- package/dist/components/time-picker.js +1 -1
- package/dist/components/toast.js +1 -1
- package/dist/components/toggle-button.js +1 -1
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/use-toast.js +2 -2
- package/dist/config/app-canvas.d.ts +79 -0
- package/dist/config/app-canvas.js +2253 -0
- package/dist/config/ui-config.d.ts +1 -1
- package/dist/config/ui-configurator.d.ts +1 -920
- package/dist/config/ui-configurator.js +457 -466
- package/dist/configuration.context-f_FSPWhQ.d.ts +926 -0
- package/dist/{datePickerValue.utils-DCgoSrP3.js → datePickerValue.utils-CIFHjKwv.js} +1 -1
- package/dist/{dynamicInputs-iP39lVKf.d.ts → dynamicInputs-ByVMnx4Z.d.ts} +1 -1
- package/dist/formFieldError.cva-CsXaQRHX.js +14 -0
- package/dist/formFieldHelper.cva-B8F9LmsE.js +96 -0
- package/dist/grip-vertical-BVxcjdfr.js +54 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +24 -19
- package/dist/inspection-model-LuI36xTg.js +1339 -0
- package/dist/progress.cva-WQB8BGbk.js +28 -0
- package/dist/radio.cva-DGbvTymp.js +82 -0
- package/dist/rhf/checkbox.js +1 -1
- package/dist/rhf/date-picker.js +1 -1
- package/dist/rhf/date-range-picker.js +1 -1
- package/dist/rhf/date-time-picker.js +1 -1
- package/dist/rhf/file-input.js +1 -1
- package/dist/rhf/file-upload.js +1 -1
- package/dist/rhf/inputs.d.ts +1 -1
- package/dist/rhf/number-range-input.js +1 -1
- package/dist/rhf/radio-group.js +1 -1
- package/dist/rhf/rich-text-editor.js +1 -1
- package/dist/rhf/select.js +1 -1
- package/dist/rhf/slider.js +1 -1
- package/dist/rhf/switch.js +1 -1
- package/dist/rhf/text-area.js +1 -1
- package/dist/rhf/time-picker.js +1 -1
- package/dist/rhf/toggle-group.js +1 -1
- package/dist/rhf.d.ts +2 -2
- package/dist/rhf.js +24 -19
- package/dist/rich-text-editor.js +1 -1
- package/dist/{staticDateTimeSegments-DtU63_dw.js → staticDateTimeSegments-sf_ND7zL.js} +1 -1
- package/dist/{staticSelect.utils-uHa8f_c6.js → staticSelect.utils-CzlnLPPd.js} +3 -3
- package/dist/status.cva-6HxNR4EP.js +130 -0
- package/dist/styles/app-canvas.css +733 -0
- package/dist/styles/configurator.css +570 -6
- package/dist/switch.cva-BX3HOxbL.js +27 -0
- package/dist/{table.cva-D5oQ-QvA.js → table.cva-DlMT-zLD.js} +1 -54
- package/dist/{Tag-DPg5sL1Z.js → tag.cva-B3MudLeC.js} +1 -92
- package/dist/tanstack/checkbox.js +1 -1
- package/dist/tanstack/date-picker.js +1 -1
- package/dist/tanstack/date-range-picker.js +1 -1
- package/dist/tanstack/date-time-picker.js +1 -1
- package/dist/tanstack/file-input.js +1 -1
- package/dist/tanstack/file-upload.js +1 -1
- package/dist/tanstack/form.d.ts +1 -1
- package/dist/tanstack/form.js +1 -1
- package/dist/tanstack/inputs.d.ts +2 -2
- package/dist/tanstack/inputs.js +1 -1
- package/dist/tanstack/number-range-input.js +1 -1
- package/dist/tanstack/radio-group.js +1 -1
- package/dist/tanstack/rich-text-editor.js +1 -1
- package/dist/tanstack/select.js +1 -1
- package/dist/tanstack/slider.js +1 -1
- package/dist/tanstack/switch.js +1 -1
- package/dist/tanstack/table.js +2 -2
- package/dist/tanstack/text-area.js +1 -1
- package/dist/tanstack/time-picker.js +1 -1
- package/dist/tanstack/toggle-group.js +1 -1
- package/dist/tanstack.d.ts +4 -4
- package/dist/tanstack.js +39 -31
- package/dist/{toast.runtime-cxex9e4E.js → toast.runtime-Zf-XyAC3.js} +1 -1
- package/dist/{useFieldAccessibility-ScC6Mtd5.js → useFieldAccessibility-CcBTgGfm.js} +1 -1
- package/dist/{useFormAutosave-DfuP7drj.js → useFormAutosave-BD_TFqDF.js} +1 -1
- package/dist/{useStaticInputHandoff-NeZVnci-.js → useStaticInputHandoff-kkQrc6DA.js} +1 -1
- package/dist/{useTableColumnConfig-Di0_w80v.js → useTableColumnConfig-aVUWC2Mp.js} +2 -2
- package/package.json +7 -1
- package/src/configurator/README.md +1 -1
- package/dist/Alert-CnvEb1D_.js +0 -244
|
@@ -3,13 +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 {
|
|
6
|
+
import { t as GripVertical } from "../grip-vertical-BVxcjdfr.js";
|
|
7
7
|
import { t as Info } from "../info-iUmX3uDk.js";
|
|
8
|
-
import {
|
|
9
|
-
import { i as
|
|
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
|
-
import { t as
|
|
12
|
-
import {
|
|
12
|
+
import { t as X } from "../x-B6vfz8Ps.js";
|
|
13
|
+
import { r as cva, t as UIOverrides } from "../uiOverrides.context-BTCH9y5a.js";
|
|
13
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";
|
|
14
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";
|
|
15
16
|
import { t as $43a3b93638fe5db9$export$75b6ee27786ba447 } from "../Label-B2-B-uFY.js";
|
|
@@ -17,38 +18,20 @@ import { n as $7705c033048f6da7$export$353f5b6fc5456de1, t as $7705c033048f6da7$
|
|
|
17
18
|
import { t as $2ec61d1d4f780267$export$a8a3e93435678ff9 } from "../Heading-nI1_VOaE.js";
|
|
18
19
|
import { t as $efe09c6d1c304b50$export$9afb8bc826b033ea } from "../Text-D2MPZ3sY.js";
|
|
19
20
|
import { n as $1f3c3b1a70cec653$export$ff05c3ac10437e03, t as $cdaed739b1139372$export$c24727297075ec6a } from "../Form-DlQcyN1f.js";
|
|
20
|
-
import { t as Checkbox } from "../Checkbox-
|
|
21
|
+
import { t as Checkbox } from "../Checkbox-DYxXYfKL.js";
|
|
21
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";
|
|
22
23
|
import { n as $8b8d26808cb8cb53$export$8948f78d83984c69, t as $8b8d26808cb8cb53$export$2b77a92f1a5ad772 } from "../Modal-w60dVQcb.js";
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import { i as menuPopoverWrapperDefinition, n as menuItemDefinition, r as menuPopoverDefinition, t as dropdownMenuDefinition } from "../dropdownMenu.cva-DvEmX0bs.js";
|
|
28
|
-
import { i as tooltipTextDefinition, n as tooltipPointerHorizontalDefinition, r as tooltipPointerVerticalDefinition, t as tooltipDefinition } from "../tooltip.cva-BIzlOXHH.js";
|
|
29
|
-
import { t as typographyDefinition } from "../typography.cva-iD15k56p.js";
|
|
30
|
-
import { a as buttonSizeDefinition, i as buttonIconSizeDefinition, n as buttonContentDefinition, r as buttonDefinition, t as Button } from "../Button-C5rv4Cr2.js";
|
|
31
|
-
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";
|
|
32
28
|
import { BadgeButton } from "../components/badge-button.js";
|
|
33
|
-
import {
|
|
34
|
-
import { a as formFieldHeaderDefinition, i as labelDefinition, n as formFieldHelperDefinition } from "../FormField-B99dLt8o.js";
|
|
35
|
-
import { n as tagDefinition, t as Tag } from "../Tag-DPg5sL1Z.js";
|
|
36
|
-
import { a as inputSizeDefinition, i as inputSideDefinition, n as inputClearClassDefinition, r as inputContentWrapperDefinition, t as inputBaseDefinition } from "../input.cva-DJA8ovm_.js";
|
|
37
|
-
import { t as popoverDefinition } from "../popover.cva-Bhud1wnp.js";
|
|
29
|
+
import { Tag } from "../components/tag.js";
|
|
38
30
|
import { Input } from "../components/input.js";
|
|
39
|
-
import { t as
|
|
40
|
-
import {
|
|
41
|
-
import { t as
|
|
42
|
-
import {
|
|
43
|
-
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";
|
|
44
|
-
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";
|
|
45
|
-
import { i as dialogOverlayDefinition, n as dialogMainDefinition, t as dialogContentDefinition } from "../dialog.cva-COhDZaVl.js";
|
|
46
|
-
import { i as alertDefinition, n as statusIconDefinition, r as statusSeparatorDefinition, t as Alert } from "../Alert-CnvEb1D_.js";
|
|
47
|
-
import { a as toastDefinition, i as toastContainerDefinition } from "../toast.cva-C_L_RffH.js";
|
|
48
|
-
import { t as linkDefinition } from "../link.cva-DMTHZiJG.js";
|
|
49
|
-
import { t as tooltipWrapperTriggerDefinition } from "../tooltipWrapper.cva-BBQ4ic3D.js";
|
|
50
|
-
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";
|
|
51
|
-
import $ahdqC$react, { Suspense, createContext, lazy, use, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
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";
|
|
34
|
+
import $ahdqC$react, { Suspense, createContext, lazy, use, useCallback, useEffect, useId, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
52
35
|
import { c } from "react/compiler-runtime";
|
|
53
36
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
54
37
|
import { mergeProps } from "react-aria/mergeProps";
|
|
@@ -69,7 +52,7 @@ import { UNSAFE_PortalProvider } from "react-aria";
|
|
|
69
52
|
* This source code is licensed under the ISC license.
|
|
70
53
|
* See the LICENSE file in the root directory of this source tree.
|
|
71
54
|
*/
|
|
72
|
-
const __iconData$
|
|
55
|
+
const __iconData$6 = {
|
|
73
56
|
name: "arrow-down-to-line",
|
|
74
57
|
size: 24,
|
|
75
58
|
node: [
|
|
@@ -87,8 +70,8 @@ const __iconData$8 = {
|
|
|
87
70
|
}]
|
|
88
71
|
]
|
|
89
72
|
};
|
|
90
|
-
__iconData$
|
|
91
|
-
const ArrowDownToLine = createLucideIcon(__iconData$
|
|
73
|
+
__iconData$6.node;
|
|
74
|
+
const ArrowDownToLine = createLucideIcon(__iconData$6);
|
|
92
75
|
//#endregion
|
|
93
76
|
//#region ../../node_modules/.bun/lucide-react@1.43.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/icons/chevrons-up-down.mjs
|
|
94
77
|
/**
|
|
@@ -97,7 +80,7 @@ const ArrowDownToLine = createLucideIcon(__iconData$8);
|
|
|
97
80
|
* This source code is licensed under the ISC license.
|
|
98
81
|
* See the LICENSE file in the root directory of this source tree.
|
|
99
82
|
*/
|
|
100
|
-
const __iconData$
|
|
83
|
+
const __iconData$5 = {
|
|
101
84
|
name: "chevrons-up-down",
|
|
102
85
|
size: 24,
|
|
103
86
|
node: [["path", {
|
|
@@ -108,8 +91,8 @@ const __iconData$7 = {
|
|
|
108
91
|
key: "sgt6xg"
|
|
109
92
|
}]]
|
|
110
93
|
};
|
|
111
|
-
__iconData$
|
|
112
|
-
const ChevronsUpDown = createLucideIcon(__iconData$
|
|
94
|
+
__iconData$5.node;
|
|
95
|
+
const ChevronsUpDown = createLucideIcon(__iconData$5);
|
|
113
96
|
//#endregion
|
|
114
97
|
//#region ../../node_modules/.bun/lucide-react@1.43.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/icons/external-link.mjs
|
|
115
98
|
/**
|
|
@@ -118,7 +101,7 @@ const ChevronsUpDown = createLucideIcon(__iconData$7);
|
|
|
118
101
|
* This source code is licensed under the ISC license.
|
|
119
102
|
* See the LICENSE file in the root directory of this source tree.
|
|
120
103
|
*/
|
|
121
|
-
const __iconData$
|
|
104
|
+
const __iconData$4 = {
|
|
122
105
|
name: "external-link",
|
|
123
106
|
size: 24,
|
|
124
107
|
node: [
|
|
@@ -136,26 +119,8 @@ const __iconData$6 = {
|
|
|
136
119
|
}]
|
|
137
120
|
]
|
|
138
121
|
};
|
|
139
|
-
__iconData$
|
|
140
|
-
const ExternalLink = createLucideIcon(__iconData$
|
|
141
|
-
//#endregion
|
|
142
|
-
//#region ../../node_modules/.bun/lucide-react@1.43.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/icons/moon.mjs
|
|
143
|
-
/**
|
|
144
|
-
* @license lucide-react v1.43.0 - ISC
|
|
145
|
-
*
|
|
146
|
-
* This source code is licensed under the ISC license.
|
|
147
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
148
|
-
*/
|
|
149
|
-
const __iconData$5 = {
|
|
150
|
-
name: "moon",
|
|
151
|
-
size: 24,
|
|
152
|
-
node: [["path", {
|
|
153
|
-
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",
|
|
154
|
-
key: "kfwtm"
|
|
155
|
-
}]]
|
|
156
|
-
};
|
|
157
|
-
__iconData$5.node;
|
|
158
|
-
const Moon = createLucideIcon(__iconData$5);
|
|
122
|
+
__iconData$4.node;
|
|
123
|
+
const ExternalLink = createLucideIcon(__iconData$4);
|
|
159
124
|
//#endregion
|
|
160
125
|
//#region ../../node_modules/.bun/lucide-react@1.43.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/icons/panel-top.mjs
|
|
161
126
|
/**
|
|
@@ -164,7 +129,7 @@ const Moon = createLucideIcon(__iconData$5);
|
|
|
164
129
|
* This source code is licensed under the ISC license.
|
|
165
130
|
* See the LICENSE file in the root directory of this source tree.
|
|
166
131
|
*/
|
|
167
|
-
const __iconData$
|
|
132
|
+
const __iconData$3 = {
|
|
168
133
|
name: "panel-top",
|
|
169
134
|
size: 24,
|
|
170
135
|
node: [["rect", {
|
|
@@ -179,8 +144,8 @@ const __iconData$4 = {
|
|
|
179
144
|
key: "1pudct"
|
|
180
145
|
}]]
|
|
181
146
|
};
|
|
182
|
-
__iconData$
|
|
183
|
-
const PanelTop = createLucideIcon(__iconData$
|
|
147
|
+
__iconData$3.node;
|
|
148
|
+
const PanelTop = createLucideIcon(__iconData$3);
|
|
184
149
|
//#endregion
|
|
185
150
|
//#region ../../node_modules/.bun/lucide-react@1.43.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/icons/plus.mjs
|
|
186
151
|
/**
|
|
@@ -189,7 +154,7 @@ const PanelTop = createLucideIcon(__iconData$4);
|
|
|
189
154
|
* This source code is licensed under the ISC license.
|
|
190
155
|
* See the LICENSE file in the root directory of this source tree.
|
|
191
156
|
*/
|
|
192
|
-
const __iconData$
|
|
157
|
+
const __iconData$2 = {
|
|
193
158
|
name: "plus",
|
|
194
159
|
size: 24,
|
|
195
160
|
node: [["path", {
|
|
@@ -200,8 +165,8 @@ const __iconData$3 = {
|
|
|
200
165
|
key: "s699le"
|
|
201
166
|
}]]
|
|
202
167
|
};
|
|
203
|
-
__iconData$
|
|
204
|
-
const Plus = createLucideIcon(__iconData$
|
|
168
|
+
__iconData$2.node;
|
|
169
|
+
const Plus = createLucideIcon(__iconData$2);
|
|
205
170
|
//#endregion
|
|
206
171
|
//#region ../../node_modules/.bun/lucide-react@1.43.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/icons/rotate-ccw.mjs
|
|
207
172
|
/**
|
|
@@ -210,7 +175,7 @@ const Plus = createLucideIcon(__iconData$3);
|
|
|
210
175
|
* This source code is licensed under the ISC license.
|
|
211
176
|
* See the LICENSE file in the root directory of this source tree.
|
|
212
177
|
*/
|
|
213
|
-
const __iconData$
|
|
178
|
+
const __iconData$1 = {
|
|
214
179
|
name: "rotate-ccw",
|
|
215
180
|
size: 24,
|
|
216
181
|
node: [["path", {
|
|
@@ -221,8 +186,8 @@ const __iconData$2 = {
|
|
|
221
186
|
key: "1xhq8a"
|
|
222
187
|
}]]
|
|
223
188
|
};
|
|
224
|
-
__iconData$
|
|
225
|
-
const RotateCcw = createLucideIcon(__iconData$
|
|
189
|
+
__iconData$1.node;
|
|
190
|
+
const RotateCcw = createLucideIcon(__iconData$1);
|
|
226
191
|
//#endregion
|
|
227
192
|
//#region ../../node_modules/.bun/lucide-react@1.43.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/icons/sliders-horizontal.mjs
|
|
228
193
|
/**
|
|
@@ -231,7 +196,7 @@ const RotateCcw = createLucideIcon(__iconData$2);
|
|
|
231
196
|
* This source code is licensed under the ISC license.
|
|
232
197
|
* See the LICENSE file in the root directory of this source tree.
|
|
233
198
|
*/
|
|
234
|
-
const __iconData
|
|
199
|
+
const __iconData = {
|
|
235
200
|
name: "sliders-horizontal",
|
|
236
201
|
size: 24,
|
|
237
202
|
node: [
|
|
@@ -273,62 +238,8 @@ const __iconData$1 = {
|
|
|
273
238
|
}]
|
|
274
239
|
]
|
|
275
240
|
};
|
|
276
|
-
__iconData$1.node;
|
|
277
|
-
const SlidersHorizontal = createLucideIcon(__iconData$1);
|
|
278
|
-
//#endregion
|
|
279
|
-
//#region ../../node_modules/.bun/lucide-react@1.43.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/icons/sun.mjs
|
|
280
|
-
/**
|
|
281
|
-
* @license lucide-react v1.43.0 - ISC
|
|
282
|
-
*
|
|
283
|
-
* This source code is licensed under the ISC license.
|
|
284
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
285
|
-
*/
|
|
286
|
-
const __iconData = {
|
|
287
|
-
name: "sun",
|
|
288
|
-
size: 24,
|
|
289
|
-
node: [
|
|
290
|
-
["circle", {
|
|
291
|
-
cx: "12",
|
|
292
|
-
cy: "12",
|
|
293
|
-
r: "4",
|
|
294
|
-
key: "4exip2"
|
|
295
|
-
}],
|
|
296
|
-
["path", {
|
|
297
|
-
d: "M12 2v2",
|
|
298
|
-
key: "tus03m"
|
|
299
|
-
}],
|
|
300
|
-
["path", {
|
|
301
|
-
d: "M12 20v2",
|
|
302
|
-
key: "1lh1kg"
|
|
303
|
-
}],
|
|
304
|
-
["path", {
|
|
305
|
-
d: "m4.93 4.93 1.41 1.41",
|
|
306
|
-
key: "149t6j"
|
|
307
|
-
}],
|
|
308
|
-
["path", {
|
|
309
|
-
d: "m17.66 17.66 1.41 1.41",
|
|
310
|
-
key: "ptbguv"
|
|
311
|
-
}],
|
|
312
|
-
["path", {
|
|
313
|
-
d: "M2 12h2",
|
|
314
|
-
key: "1t8f8n"
|
|
315
|
-
}],
|
|
316
|
-
["path", {
|
|
317
|
-
d: "M20 12h2",
|
|
318
|
-
key: "1q8mjw"
|
|
319
|
-
}],
|
|
320
|
-
["path", {
|
|
321
|
-
d: "m6.34 17.66-1.41 1.41",
|
|
322
|
-
key: "1m8zz5"
|
|
323
|
-
}],
|
|
324
|
-
["path", {
|
|
325
|
-
d: "m19.07 4.93-1.41 1.41",
|
|
326
|
-
key: "1shlcs"
|
|
327
|
-
}]
|
|
328
|
-
]
|
|
329
|
-
};
|
|
330
241
|
__iconData.node;
|
|
331
|
-
const
|
|
242
|
+
const SlidersHorizontal = createLucideIcon(__iconData);
|
|
332
243
|
//#endregion
|
|
333
244
|
//#region ../../node_modules/.bun/react-aria-components@1.21.1+67f6792bdf102c28/node_modules/react-aria-components/dist/private/Select.mjs
|
|
334
245
|
const $c8bb816105474884$export$7540cee5be7dc19b = /*#__PURE__*/ createContext(null);
|
|
@@ -452,270 +363,319 @@ function $c8bb816105474884$var$SelectInner({ props, selectRef: ref, collection }
|
|
|
452
363
|
}
|
|
453
364
|
const $c8bb816105474884$export$f8f745c04421623f = /*#__PURE__*/ createContext(null);
|
|
454
365
|
//#endregion
|
|
455
|
-
//#region src/configurator/
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
"
|
|
460
|
-
"
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
"alert.cva": alertDefinition,
|
|
471
|
-
"breadcrumbs.chevronCva": breadcrumbChevronDefinition,
|
|
472
|
-
"breadcrumbs.cva": breadcrumbsDefinition,
|
|
473
|
-
"breadcrumbs.iconCva": breadcrumbIconDefinition,
|
|
474
|
-
"breadcrumbs.itemCva": breadcrumbItemDefinition,
|
|
475
|
-
"breadcrumbs.segmentCva": breadcrumbSegmentDefinition,
|
|
476
|
-
"button.contentCva": buttonContentDefinition,
|
|
477
|
-
"button.cva": buttonDefinition,
|
|
478
|
-
"button.iconSize": buttonIconSizeDefinition,
|
|
479
|
-
"button.sizeCva": buttonSizeDefinition,
|
|
480
|
-
"checkbox.contentRowCva": checkboxContentRowDefinition,
|
|
481
|
-
"checkbox.contentWrapperCva": checkboxContentWrapperDefinition,
|
|
482
|
-
"checkbox.cva": checkboxDefinition,
|
|
483
|
-
"checkbox.groupLabelCva": checkboxGroupLabelDefinition,
|
|
484
|
-
"checkbox.iconCva": checkboxIconDefinition,
|
|
485
|
-
"dialog.contentCva": dialogContentDefinition,
|
|
486
|
-
"dialog.mainCva": dialogMainDefinition,
|
|
487
|
-
"dialog.overlayCva": dialogOverlayDefinition,
|
|
488
|
-
"dropdownMenu.cva": dropdownMenuDefinition,
|
|
489
|
-
"dropdownMenu.itemCva": menuItemDefinition,
|
|
490
|
-
"dropdownMenu.popoverCva": menuPopoverDefinition,
|
|
491
|
-
"dropdownMenu.popoverWrapperCva": menuPopoverWrapperDefinition,
|
|
492
|
-
"fileUpload.dropZoneCva": fileUploadDropZoneDefinition,
|
|
493
|
-
"formField.errorLabelCva": formFieldErrorDefinition,
|
|
494
|
-
"formField.headerCva": formFieldHeaderDefinition,
|
|
495
|
-
"formField.helperLabelCva": formFieldHelperDefinition,
|
|
496
|
-
"input.baseCva": inputBaseDefinition,
|
|
497
|
-
"input.clearClassCva": inputClearClassDefinition,
|
|
498
|
-
"input.contentWrapperCva": inputContentWrapperDefinition,
|
|
499
|
-
"input.sideCva": inputSideDefinition,
|
|
500
|
-
"input.sizeCva": inputSizeDefinition,
|
|
501
|
-
"label.cva": labelDefinition,
|
|
502
|
-
"link.cva": linkDefinition,
|
|
503
|
-
"badgeButton.cva": badgeButtonDefinition,
|
|
504
|
-
"popover.cva": popoverDefinition,
|
|
505
|
-
"progress.cva": progressDefinition,
|
|
506
|
-
"progress.fillCva": progressFillDefinition,
|
|
507
|
-
"progress.trackCva": progressTrackDefinition,
|
|
508
|
-
"progress.trackWrapperCva": progressTrackWrapperDefinition,
|
|
509
|
-
"progress.valueCva": progressValueDefinition,
|
|
510
|
-
"radio.contentRowCva": radioContentRowDefinition,
|
|
511
|
-
"radio.contentWrapperCva": radioContentWrapperDefinition,
|
|
512
|
-
"radio.cva": radioDefinition,
|
|
513
|
-
"select.listBoxItemCva": selectListBoxItemDefinition,
|
|
514
|
-
"select.popoverCva": selectPopoverDefinition,
|
|
515
|
-
"status.iconCva": statusIconDefinition,
|
|
516
|
-
"status.separatorCva": statusSeparatorDefinition,
|
|
517
|
-
"stepper.cva": stepperDefinition,
|
|
518
|
-
"stepper.iconCva": stepperIconDefinition,
|
|
519
|
-
"stepper.itemCva": stepperItemDefinition,
|
|
520
|
-
"stepper.numberCva": stepperNumberDefinition,
|
|
521
|
-
"stepper.separatorCva": stepperSeparatorDefinition,
|
|
522
|
-
"stepper.subtextCva": stepperSubtextDefinition,
|
|
523
|
-
"stepper.titleCva": stepperTitleDefinition,
|
|
524
|
-
"switch.cva": switchDefinition,
|
|
525
|
-
"table.cellTextCva": tableCellTextDefinition,
|
|
526
|
-
"table.dataCva": tableDataDefinition,
|
|
527
|
-
"table.headDataCva": tableHeadDataDefinition,
|
|
528
|
-
"table.headRowCva": tableHeadRowDefinition,
|
|
529
|
-
"table.headerTextCva": tableHeaderTextDefinition,
|
|
530
|
-
"table.rowCva": tableRowDefinition,
|
|
531
|
-
"table.theadCva": theadDefinition,
|
|
532
|
-
"tag.cva": tagDefinition,
|
|
533
|
-
"textArea.wrapperCva": textAreaWrapperDefinition,
|
|
534
|
-
"toast.containerCva": toastContainerDefinition,
|
|
535
|
-
"toast.cva": toastDefinition,
|
|
536
|
-
"toggleGroup.cva": toggleGroupDefinition,
|
|
537
|
-
"toggleGroup.itemCva": toggleGroupItemDefinition,
|
|
538
|
-
"tooltip.cva": tooltipDefinition,
|
|
539
|
-
"tooltip.pointerVerticalCva": tooltipPointerVerticalDefinition,
|
|
540
|
-
"tooltip.textCva": tooltipTextDefinition,
|
|
541
|
-
"tooltipWrapper.triggerCva": tooltipWrapperTriggerDefinition,
|
|
542
|
-
"typography.cva": typographyDefinition
|
|
543
|
-
};
|
|
544
|
-
//#endregion
|
|
545
|
-
//#region src/configurator/cva-model.ts
|
|
546
|
-
function resolveCvaDefinition(slot, inherited) {
|
|
547
|
-
const [component, part] = slot.split(".");
|
|
548
|
-
const override = (inherited?.[component])?.[part];
|
|
549
|
-
if (typeof override === "function") return null;
|
|
550
|
-
const fallback = cvaDefinitions[slot];
|
|
551
|
-
const definition = override && typeof override === "object" && "mode" in override ? StyleMergeUtils.mergeCvaDefinition(fallback, override) : fallback;
|
|
552
|
-
const config = definition.config;
|
|
553
|
-
return {
|
|
554
|
-
base: [...definition.base],
|
|
555
|
-
config: {
|
|
556
|
-
variants: Object.fromEntries(Object.entries(config?.variants ?? {}).map(([name, options]) => [name, Object.fromEntries(Object.entries(options).map(([value, classes]) => [value, clsx(classes)]))])),
|
|
557
|
-
defaultVariants: config?.defaultVariants ?? {},
|
|
558
|
-
compoundVariants: (config?.compoundVariants ?? []).map(({ class: classes, className, ...selectors }) => Object.assign(selectors, { className: clsx(classes, className) }))
|
|
559
|
-
}
|
|
560
|
-
};
|
|
561
|
-
}
|
|
562
|
-
function applyCvaEdits(inherited, edits = {}) {
|
|
563
|
-
const result = { ...inherited };
|
|
564
|
-
for (const [slot, definition] of Object.entries(edits)) {
|
|
565
|
-
const [component, part] = slot.split(".");
|
|
566
|
-
const key = component;
|
|
567
|
-
result[key] = {
|
|
568
|
-
...result[key],
|
|
569
|
-
[part]: {
|
|
570
|
-
mode: "overrideCva",
|
|
571
|
-
...definition
|
|
572
|
-
}
|
|
573
|
-
};
|
|
366
|
+
//#region src/configurator/inspector/PreviewInspector.tsx
|
|
367
|
+
/** Read the real element underneath the inert gallery's stretched zoom button. */
|
|
368
|
+
function elementAtPoint(root, x, y) {
|
|
369
|
+
const direct = root.ownerDocument.elementsFromPoint(x, y).find((element) => root.contains(element));
|
|
370
|
+
if (!direct || direct.closest(".studio-inspect-layer")) return null;
|
|
371
|
+
const demo = direct.closest(".studio-gallery-card")?.querySelector(".studio-gallery-demo");
|
|
372
|
+
let hit = direct;
|
|
373
|
+
if (demo) {
|
|
374
|
+
const found = [demo, ...demo.querySelectorAll("*")].reverse().find((element) => {
|
|
375
|
+
if (element.namespaceURI !== "http://www.w3.org/1999/xhtml" || element.closest(".sr-only")) return false;
|
|
376
|
+
const rect = element.getBoundingClientRect();
|
|
377
|
+
return rect.width > 1 && rect.height > 1 && x >= rect.left && x <= rect.right && y >= rect.top && y <= rect.bottom;
|
|
378
|
+
});
|
|
379
|
+
if (!found) return null;
|
|
380
|
+
hit = found;
|
|
574
381
|
}
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
const components = Object.keys(overrides).map((name) => ` ${name}: { ...existing.${name}, ...edited.${name} },`).join("\n");
|
|
580
|
-
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`;
|
|
382
|
+
const semantic = hit.closest("button,input,textarea,select,a,label,[role],h1,h2,h3,h4,h5,h6,p");
|
|
383
|
+
if (semantic && root.contains(semantic) && (!demo || demo.contains(semantic))) hit = semantic;
|
|
384
|
+
if (hit.namespaceURI !== "http://www.w3.org/1999/xhtml" || hit === root || hit.classList.contains("studio-gallery-card-hit")) return null;
|
|
385
|
+
return hit;
|
|
581
386
|
}
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
const
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
const
|
|
589
|
-
|
|
590
|
-
const
|
|
591
|
-
const
|
|
592
|
-
const
|
|
593
|
-
const
|
|
594
|
-
const [
|
|
595
|
-
const
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
setOpen(false);
|
|
625
|
-
};
|
|
626
|
-
$[4] = draft;
|
|
627
|
-
$[5] = onApply;
|
|
628
|
-
$[6] = t3;
|
|
629
|
-
} else t3 = $[6];
|
|
630
|
-
const apply = t3;
|
|
631
|
-
let t4;
|
|
632
|
-
if ($[7] !== active.overrides || $[8] !== inheritedOverrides) {
|
|
633
|
-
t4 = applyCvaEdits(inheritedOverrides, active.overrides);
|
|
634
|
-
$[7] = active.overrides;
|
|
635
|
-
$[8] = inheritedOverrides;
|
|
636
|
-
$[9] = t4;
|
|
637
|
-
} else t4 = $[9];
|
|
638
|
-
const overrides = t4;
|
|
639
|
-
let t5;
|
|
640
|
-
if ($[10] !== apply || $[11] !== cancel || $[12] !== defaults || $[13] !== draft || $[14] !== inheritedOverrides || $[15] !== isOpen || $[16] !== open || $[17] !== revision) {
|
|
641
|
-
t5 = {
|
|
642
|
-
defaults,
|
|
643
|
-
inheritedOverrides,
|
|
644
|
-
draft,
|
|
645
|
-
setDraft,
|
|
646
|
-
isOpen,
|
|
647
|
-
open,
|
|
648
|
-
cancel,
|
|
649
|
-
apply,
|
|
650
|
-
revision
|
|
651
|
-
};
|
|
652
|
-
$[10] = apply;
|
|
653
|
-
$[11] = cancel;
|
|
654
|
-
$[12] = defaults;
|
|
655
|
-
$[13] = draft;
|
|
656
|
-
$[14] = inheritedOverrides;
|
|
657
|
-
$[15] = isOpen;
|
|
658
|
-
$[16] = open;
|
|
659
|
-
$[17] = revision;
|
|
660
|
-
$[18] = t5;
|
|
661
|
-
} else t5 = $[18];
|
|
662
|
-
const contextValue = t5;
|
|
663
|
-
let t6;
|
|
664
|
-
if ($[19] !== active.theme || $[20] !== defaults) {
|
|
665
|
-
t6 = runtimeCss(defaults, active.theme);
|
|
666
|
-
$[19] = active.theme;
|
|
667
|
-
$[20] = defaults;
|
|
668
|
-
$[21] = t6;
|
|
669
|
-
} else t6 = $[21];
|
|
670
|
-
let t7;
|
|
671
|
-
if ($[22] !== t6) {
|
|
672
|
-
t7 = /* @__PURE__ */ jsx("style", {
|
|
673
|
-
"data-povio-ui-configuration": true,
|
|
674
|
-
children: t6
|
|
387
|
+
function PreviewInspector({ children, revision, isKnown, onSelect, onScroll }) {
|
|
388
|
+
const selectionDescriptionId = useId();
|
|
389
|
+
const rootRef = useRef(null);
|
|
390
|
+
const targetRef = useRef(null);
|
|
391
|
+
const frameRef = useRef(null);
|
|
392
|
+
const pendingPoint = useRef(null);
|
|
393
|
+
const pinnedRef = useRef(false);
|
|
394
|
+
const [pinned, setPinned] = useState(false);
|
|
395
|
+
const [inspectMode, setInspectMode] = useState(true);
|
|
396
|
+
const [snapshot, setSnapshot] = useState(null);
|
|
397
|
+
const [outline, setOutline] = useState(null);
|
|
398
|
+
const highlightKey = useRef(null);
|
|
399
|
+
const [highlight, setHighlight] = useState(null);
|
|
400
|
+
const measure = useCallback(() => {
|
|
401
|
+
const root = rootRef.current;
|
|
402
|
+
const target = targetRef.current;
|
|
403
|
+
if (!root || !target?.isConnected || !root.contains(target)) {
|
|
404
|
+
targetRef.current = null;
|
|
405
|
+
pinnedRef.current = false;
|
|
406
|
+
setPinned(false);
|
|
407
|
+
setSnapshot(null);
|
|
408
|
+
setOutline(null);
|
|
409
|
+
highlightKey.current = null;
|
|
410
|
+
setHighlight(null);
|
|
411
|
+
return;
|
|
412
|
+
}
|
|
413
|
+
const rect = target.getBoundingClientRect();
|
|
414
|
+
if (!rect.width || !rect.height) {
|
|
415
|
+
setSnapshot(null);
|
|
416
|
+
setOutline(null);
|
|
417
|
+
highlightKey.current = null;
|
|
418
|
+
setHighlight(null);
|
|
419
|
+
return;
|
|
420
|
+
}
|
|
421
|
+
const origin = root.getBoundingClientRect();
|
|
422
|
+
const next = inspectElement(target, isKnown);
|
|
423
|
+
setSnapshot((current) => JSON.stringify(current) === JSON.stringify(next) ? current : next);
|
|
424
|
+
setOutline({
|
|
425
|
+
left: rect.left - origin.left,
|
|
426
|
+
top: rect.top - origin.top,
|
|
427
|
+
width: rect.width,
|
|
428
|
+
height: rect.height
|
|
675
429
|
});
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
430
|
+
if (highlightKey.current) {
|
|
431
|
+
const details = getBoxHighlights(target, highlightKey.current);
|
|
432
|
+
setHighlight({
|
|
433
|
+
key: highlightKey.current,
|
|
434
|
+
label: details.label,
|
|
435
|
+
regions: details.regions.map((region) => ({
|
|
436
|
+
width: region.width,
|
|
437
|
+
height: region.height,
|
|
438
|
+
corner: region.corner,
|
|
439
|
+
line: region.line,
|
|
440
|
+
left: region.left - origin.left,
|
|
441
|
+
top: region.top - origin.top
|
|
442
|
+
}))
|
|
443
|
+
});
|
|
444
|
+
}
|
|
445
|
+
}, [isKnown]);
|
|
446
|
+
const schedule = useCallback(() => {
|
|
447
|
+
const owner = rootRef.current?.ownerDocument.defaultView;
|
|
448
|
+
if (!owner || frameRef.current !== null) return;
|
|
449
|
+
frameRef.current = owner.requestAnimationFrame(() => {
|
|
450
|
+
frameRef.current = null;
|
|
451
|
+
const root_0 = rootRef.current;
|
|
452
|
+
const point = pendingPoint.current;
|
|
453
|
+
pendingPoint.current = null;
|
|
454
|
+
if (root_0 && point && !pinnedRef.current) {
|
|
455
|
+
const hit = elementAtPoint(root_0, point.x, point.y);
|
|
456
|
+
if (hit) targetRef.current = hit;
|
|
457
|
+
}
|
|
458
|
+
measure();
|
|
684
459
|
});
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
460
|
+
}, [measure]);
|
|
461
|
+
useLayoutEffect(schedule, [schedule, revision]);
|
|
462
|
+
useEffect(() => {
|
|
463
|
+
const root_1 = rootRef.current;
|
|
464
|
+
const owner_0 = root_1?.ownerDocument.defaultView;
|
|
465
|
+
if (!root_1 || !owner_0) return;
|
|
466
|
+
const observer = new ResizeObserver(schedule);
|
|
467
|
+
observer.observe(root_1);
|
|
468
|
+
const modal = root_1.closest(".studio-modal");
|
|
469
|
+
if (modal) observer.observe(modal);
|
|
470
|
+
const mutations = new MutationObserver((records) => {
|
|
471
|
+
if (records.some((record) => {
|
|
472
|
+
return !(record.target.nodeType === 1 ? record.target : record.target.parentElement)?.closest(".studio-hover-outline-layer");
|
|
473
|
+
})) schedule();
|
|
694
474
|
});
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
if ($[30] !== contextValue || $[31] !== t7 || $[32] !== t9) {
|
|
701
|
-
t10 = /* @__PURE__ */ jsxs(ConfigurationContext.Provider, {
|
|
702
|
-
value: contextValue,
|
|
703
|
-
children: [t7, t9]
|
|
475
|
+
mutations.observe(root_1, {
|
|
476
|
+
subtree: true,
|
|
477
|
+
childList: true,
|
|
478
|
+
attributes: true,
|
|
479
|
+
characterData: true
|
|
704
480
|
});
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
}
|
|
715
|
-
|
|
716
|
-
const
|
|
717
|
-
|
|
718
|
-
|
|
481
|
+
owner_0.addEventListener("scroll", schedule, true);
|
|
482
|
+
owner_0.addEventListener("resize", schedule);
|
|
483
|
+
return () => {
|
|
484
|
+
observer.disconnect();
|
|
485
|
+
mutations.disconnect();
|
|
486
|
+
owner_0.removeEventListener("scroll", schedule, true);
|
|
487
|
+
owner_0.removeEventListener("resize", schedule);
|
|
488
|
+
if (frameRef.current !== null) owner_0.cancelAnimationFrame(frameRef.current);
|
|
489
|
+
frameRef.current = null;
|
|
490
|
+
};
|
|
491
|
+
}, [schedule]);
|
|
492
|
+
const showHighlight = useCallback((key) => {
|
|
493
|
+
highlightKey.current = key;
|
|
494
|
+
if (!key) {
|
|
495
|
+
setHighlight(null);
|
|
496
|
+
return;
|
|
497
|
+
}
|
|
498
|
+
const target_0 = targetRef.current;
|
|
499
|
+
const canvas = rootRef.current;
|
|
500
|
+
if (target_0 && canvas) {
|
|
501
|
+
const rect_0 = target_0.getBoundingClientRect();
|
|
502
|
+
const view = canvas.getBoundingClientRect();
|
|
503
|
+
if (rect_0.bottom < view.top || rect_0.top > view.bottom || rect_0.right < view.left || rect_0.left > view.right) target_0.scrollIntoView({
|
|
504
|
+
block: "nearest",
|
|
505
|
+
inline: "nearest"
|
|
506
|
+
});
|
|
507
|
+
}
|
|
508
|
+
schedule();
|
|
509
|
+
}, [schedule]);
|
|
510
|
+
const dismiss = () => {
|
|
511
|
+
targetRef.current = null;
|
|
512
|
+
pendingPoint.current = null;
|
|
513
|
+
pinnedRef.current = false;
|
|
514
|
+
setPinned(false);
|
|
515
|
+
setSnapshot(null);
|
|
516
|
+
setOutline(null);
|
|
517
|
+
highlightKey.current = null;
|
|
518
|
+
setHighlight(null);
|
|
519
|
+
};
|
|
520
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
521
|
+
className: `studio-hover-inspector${inspectMode || snapshot ? " has-inspector" : ""}`,
|
|
522
|
+
onPointerMoveCapture: (event) => {
|
|
523
|
+
if (event.target.closest(".studio-inspector-panel, .studio-inspector-toolbar")) return;
|
|
524
|
+
if (!inspectMode) return;
|
|
525
|
+
if (!pinnedRef.current) pendingPoint.current = {
|
|
526
|
+
x: event.clientX,
|
|
527
|
+
y: event.clientY
|
|
528
|
+
};
|
|
529
|
+
schedule();
|
|
530
|
+
},
|
|
531
|
+
onFocusCapture: (event_0) => {
|
|
532
|
+
if (event_0.target.closest(".studio-inspector-panel, .studio-inspector-toolbar") || !inspectMode) return;
|
|
533
|
+
if (pinnedRef.current || !rootRef.current) return;
|
|
534
|
+
const element_0 = event_0.target;
|
|
535
|
+
const rect_1 = element_0.getBoundingClientRect();
|
|
536
|
+
targetRef.current = elementAtPoint(rootRef.current, rect_1.left + rect_1.width / 2, rect_1.top + rect_1.height / 2) ?? element_0;
|
|
537
|
+
schedule();
|
|
538
|
+
},
|
|
539
|
+
onPointerDownCapture: (event_1) => {
|
|
540
|
+
if (!inspectMode || event_1.target.closest(".studio-inspector-panel, .studio-inspector-toolbar, .studio-inspect-region")) return;
|
|
541
|
+
event_1.preventDefault();
|
|
542
|
+
event_1.stopPropagation();
|
|
543
|
+
},
|
|
544
|
+
onClickCapture: (event_2) => {
|
|
545
|
+
const element_1 = event_2.target;
|
|
546
|
+
if (!inspectMode || element_1.closest(".studio-inspector-panel, .studio-inspector-toolbar, .studio-inspect-region")) return;
|
|
547
|
+
const root_2 = rootRef.current;
|
|
548
|
+
if (!root_2) return;
|
|
549
|
+
const rect_2 = element_1.getBoundingClientRect();
|
|
550
|
+
const hit_0 = elementAtPoint(root_2, event_2.detail ? event_2.clientX : rect_2.left + rect_2.width / 2, event_2.detail ? event_2.clientY : rect_2.top + rect_2.height / 2);
|
|
551
|
+
if (!hit_0) return;
|
|
552
|
+
event_2.preventDefault();
|
|
553
|
+
event_2.stopPropagation();
|
|
554
|
+
if (pinnedRef.current && targetRef.current === hit_0) {
|
|
555
|
+
pinnedRef.current = false;
|
|
556
|
+
setPinned(false);
|
|
557
|
+
schedule();
|
|
558
|
+
return;
|
|
559
|
+
}
|
|
560
|
+
targetRef.current = hit_0;
|
|
561
|
+
pendingPoint.current = null;
|
|
562
|
+
pinnedRef.current = true;
|
|
563
|
+
setPinned(true);
|
|
564
|
+
schedule();
|
|
565
|
+
},
|
|
566
|
+
onKeyDownCapture: (event_3) => {
|
|
567
|
+
if (inspectMode && rootRef.current?.contains(event_3.target) && [
|
|
568
|
+
"ArrowLeft",
|
|
569
|
+
"ArrowRight",
|
|
570
|
+
"ArrowUp",
|
|
571
|
+
"ArrowDown",
|
|
572
|
+
"Home",
|
|
573
|
+
"End",
|
|
574
|
+
"PageUp",
|
|
575
|
+
"PageDown"
|
|
576
|
+
].includes(event_3.key)) {
|
|
577
|
+
event_3.preventDefault();
|
|
578
|
+
event_3.stopPropagation();
|
|
579
|
+
return;
|
|
580
|
+
}
|
|
581
|
+
if (event_3.key === "Escape" && snapshot && inspectMode) {
|
|
582
|
+
event_3.preventDefault();
|
|
583
|
+
event_3.stopPropagation();
|
|
584
|
+
dismiss();
|
|
585
|
+
}
|
|
586
|
+
},
|
|
587
|
+
children: [
|
|
588
|
+
/* @__PURE__ */ jsxs("div", {
|
|
589
|
+
className: "studio-inspector-toolbar",
|
|
590
|
+
children: [/* @__PURE__ */ jsx("span", { children: pinned ? "Selection pinned" : "Hover to inspect · click to select" }), /* @__PURE__ */ jsxs("div", {
|
|
591
|
+
className: "studio-mode",
|
|
592
|
+
role: "group",
|
|
593
|
+
"aria-label": "Preview interaction",
|
|
594
|
+
children: [/* @__PURE__ */ jsx("button", {
|
|
595
|
+
type: "button",
|
|
596
|
+
"aria-pressed": inspectMode,
|
|
597
|
+
onClick: () => setInspectMode(true),
|
|
598
|
+
children: "Inspect"
|
|
599
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
600
|
+
type: "button",
|
|
601
|
+
"aria-pressed": !inspectMode,
|
|
602
|
+
onClick: () => setInspectMode(false),
|
|
603
|
+
children: "Interact"
|
|
604
|
+
})]
|
|
605
|
+
})]
|
|
606
|
+
}),
|
|
607
|
+
/* @__PURE__ */ jsxs("div", {
|
|
608
|
+
className: "studio-inspector-canvas-shell",
|
|
609
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
610
|
+
ref: rootRef,
|
|
611
|
+
className: "studio-inspector-canvas",
|
|
612
|
+
onScroll: (event_4) => onScroll?.(event_4.currentTarget.scrollTop),
|
|
613
|
+
children
|
|
614
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
615
|
+
className: "studio-hover-outline-layer",
|
|
616
|
+
"aria-hidden": "true",
|
|
617
|
+
children: [outline && snapshot && /* @__PURE__ */ jsx("div", {
|
|
618
|
+
className: "studio-hover-outline",
|
|
619
|
+
style: outline,
|
|
620
|
+
children: !highlight && /* @__PURE__ */ jsxs("span", { children: [
|
|
621
|
+
snapshot.name,
|
|
622
|
+
" · ",
|
|
623
|
+
Math.round(snapshot.width),
|
|
624
|
+
" × ",
|
|
625
|
+
Math.round(snapshot.height)
|
|
626
|
+
] })
|
|
627
|
+
}), highlight && /* @__PURE__ */ jsx(HighlightOverlay, {
|
|
628
|
+
highlight,
|
|
629
|
+
width: rootRef.current?.clientWidth ?? 0
|
|
630
|
+
})]
|
|
631
|
+
})]
|
|
632
|
+
}),
|
|
633
|
+
(inspectMode || snapshot) && /* @__PURE__ */ jsxs("aside", {
|
|
634
|
+
className: "studio-inspector-panel",
|
|
635
|
+
"aria-label": "Inspector view",
|
|
636
|
+
"aria-describedby": selectionDescriptionId,
|
|
637
|
+
children: [
|
|
638
|
+
/* @__PURE__ */ jsx("span", {
|
|
639
|
+
id: selectionDescriptionId,
|
|
640
|
+
hidden: true,
|
|
641
|
+
children: snapshot ? `Inspecting ${snapshot.name}` : "No selected element"
|
|
642
|
+
}),
|
|
643
|
+
/* @__PURE__ */ jsxs("header", { children: [
|
|
644
|
+
/* @__PURE__ */ jsx("strong", { children: "Inspector view" }),
|
|
645
|
+
/* @__PURE__ */ jsx("button", {
|
|
646
|
+
type: "button",
|
|
647
|
+
"aria-label": "Pin inspected element",
|
|
648
|
+
"aria-pressed": pinned,
|
|
649
|
+
disabled: !snapshot,
|
|
650
|
+
title: "Pin inspected element",
|
|
651
|
+
onClick: () => {
|
|
652
|
+
pinnedRef.current = !pinned;
|
|
653
|
+
setPinned(!pinned);
|
|
654
|
+
},
|
|
655
|
+
children: /* @__PURE__ */ jsx(Pin, { size: 14 })
|
|
656
|
+
}),
|
|
657
|
+
/* @__PURE__ */ jsx("button", {
|
|
658
|
+
type: "button",
|
|
659
|
+
"aria-label": "Close inspector view",
|
|
660
|
+
onClick: () => {
|
|
661
|
+
dismiss();
|
|
662
|
+
setInspectMode(false);
|
|
663
|
+
},
|
|
664
|
+
children: /* @__PURE__ */ jsx(X, { size: 15 })
|
|
665
|
+
})
|
|
666
|
+
] }),
|
|
667
|
+
snapshot ? /* @__PURE__ */ jsx(InspectorDetails, {
|
|
668
|
+
snapshot,
|
|
669
|
+
onSelect,
|
|
670
|
+
onHighlight: showHighlight
|
|
671
|
+
}) : /* @__PURE__ */ jsx("p", {
|
|
672
|
+
className: "studio-inspector-empty",
|
|
673
|
+
children: "Hover an element in the preview to inspect it. Click to pin your selection."
|
|
674
|
+
})
|
|
675
|
+
]
|
|
676
|
+
})
|
|
677
|
+
]
|
|
678
|
+
});
|
|
719
679
|
}
|
|
720
680
|
//#endregion
|
|
721
681
|
//#region src/configurator/ConfigurationLauncher.tsx
|
|
@@ -4066,7 +4026,7 @@ function groupKeyFor(section, name, defaults) {
|
|
|
4066
4026
|
const textStyle = section === "Typography" ? name.match(/^--text-(.+?)(?:--.+)?$/)?.[1] : void 0;
|
|
4067
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";
|
|
4068
4028
|
}
|
|
4069
|
-
const ComponentGallery = lazy(() => import("../ComponentGallery-
|
|
4029
|
+
const ComponentGallery = lazy(() => import("../ComponentGallery-Da70Y4_Q.js"));
|
|
4070
4030
|
function ComponentPreview(t0) {
|
|
4071
4031
|
const $ = c(14);
|
|
4072
4032
|
const { value, mode, inspector } = t0;
|
|
@@ -4311,22 +4271,24 @@ function TokenField({ name, value, original, changed, onChange, onReset, onValid
|
|
|
4311
4271
|
});
|
|
4312
4272
|
}
|
|
4313
4273
|
function PopoutOverlay(t0) {
|
|
4314
|
-
const $ = c(
|
|
4315
|
-
const { children } = t0;
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
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,
|
|
4320
4281
|
children
|
|
4321
4282
|
});
|
|
4322
4283
|
$[0] = children;
|
|
4323
4284
|
$[1] = t1;
|
|
4324
|
-
|
|
4325
|
-
|
|
4285
|
+
$[2] = t2;
|
|
4286
|
+
} else t2 = $[2];
|
|
4287
|
+
return t2;
|
|
4326
4288
|
}
|
|
4327
|
-
function ConfigurationModalContent({ memory, windowBounds, poppedOut, onPopout, onDock, onMinimize, popupBlocked }) {
|
|
4328
|
-
const Overlay = poppedOut ? PopoutOverlay : $8b8d26808cb8cb53$export$8948f78d83984c69;
|
|
4329
|
-
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;
|
|
4330
4292
|
const studioWindow = useStudioWindow(windowBounds, !poppedOut);
|
|
4331
4293
|
const [compactPreview, setCompactPreview] = useState(false);
|
|
4332
4294
|
useEffect(() => {
|
|
@@ -4401,7 +4363,7 @@ function ConfigurationModalContent({ memory, windowBounds, poppedOut, onPopout,
|
|
|
4401
4363
|
useLayoutEffect(() => {
|
|
4402
4364
|
const frame = requestAnimationFrame(() => {
|
|
4403
4365
|
editorRef.current?.scrollTo({ top: memory.current.editorScroll ?? 0 });
|
|
4404
|
-
previewRef.current?.scrollTo({ top: memory.current.previewScroll ?? 0 });
|
|
4366
|
+
previewRef.current?.querySelector(".studio-inspector-canvas")?.scrollTo({ top: memory.current.previewScroll ?? 0 });
|
|
4405
4367
|
});
|
|
4406
4368
|
return () => cancelAnimationFrame(frame);
|
|
4407
4369
|
}, [memory]);
|
|
@@ -4717,7 +4679,7 @@ function ConfigurationModalContent({ memory, windowBounds, poppedOut, onPopout,
|
|
|
4717
4679
|
})]
|
|
4718
4680
|
}, `${key_11}-${field_1}`);
|
|
4719
4681
|
return /* @__PURE__ */ jsx(Overlay, {
|
|
4720
|
-
className: "studio-overlay"
|
|
4682
|
+
className: `studio-overlay${floating && !poppedOut ? " studio-overlay-floating" : ""}`,
|
|
4721
4683
|
isOpen,
|
|
4722
4684
|
onOpenChange: (next_2) => {
|
|
4723
4685
|
if (!next_2) cancel();
|
|
@@ -5143,26 +5105,34 @@ function ConfigurationModalContent({ memory, windowBounds, poppedOut, onPopout,
|
|
|
5143
5105
|
})]
|
|
5144
5106
|
})]
|
|
5145
5107
|
}),
|
|
5146
|
-
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
|
|
5156
|
-
|
|
5157
|
-
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5108
|
+
/* @__PURE__ */ jsx(PreviewInspector, {
|
|
5109
|
+
revision: draft,
|
|
5110
|
+
isKnown: isInspectable,
|
|
5111
|
+
onSelect: focusToken,
|
|
5112
|
+
onScroll: (scrollTop) => {
|
|
5113
|
+
memory.current.previewScroll = scrollTop;
|
|
5114
|
+
},
|
|
5115
|
+
children: section === "Variants & overrides" || isTokenSection(section) && previewMode === "focused" ? /* @__PURE__ */ jsx(ContextualPreview, {
|
|
5116
|
+
variants: cvaVariants,
|
|
5117
|
+
setVariants: setCvaVariants,
|
|
5118
|
+
section,
|
|
5119
|
+
slot: cvaSlot,
|
|
5120
|
+
mode,
|
|
5121
|
+
entries: visibleGroups.flatMap(([, group_6]) => group_6.entries)
|
|
5122
|
+
}) : /* @__PURE__ */ jsx(ComponentPreview, {
|
|
5123
|
+
value: draft,
|
|
5124
|
+
mode,
|
|
5125
|
+
inspector: {
|
|
5126
|
+
isKnown: isInspectable,
|
|
5127
|
+
describe: describeToken,
|
|
5128
|
+
onSelect: focusToken,
|
|
5129
|
+
revision: draft
|
|
5130
|
+
}
|
|
5131
|
+
})
|
|
5162
5132
|
}),
|
|
5163
5133
|
/* @__PURE__ */ jsx("p", {
|
|
5164
5134
|
className: "studio-preview-note",
|
|
5165
|
-
children: section === "Variants & overrides" || previewMode === "focused" ? "Preview follows the current section. Variant controls affect only the preview." : "Click
|
|
5135
|
+
children: section === "Variants & overrides" || previewMode === "focused" ? "Preview follows the current section. Variant controls affect only the preview." : "Click to pin or unpin an element. Use Interact to try components."
|
|
5166
5136
|
})
|
|
5167
5137
|
]
|
|
5168
5138
|
}),
|
|
@@ -5281,8 +5251,8 @@ function ConfigurationModalContent({ memory, windowBounds, poppedOut, onPopout,
|
|
|
5281
5251
|
});
|
|
5282
5252
|
}
|
|
5283
5253
|
function UIConfigurationModal() {
|
|
5284
|
-
const $ = c(
|
|
5285
|
-
const { isOpen, revision, open } = useUIConfiguration();
|
|
5254
|
+
const $ = c(28);
|
|
5255
|
+
const { isOpen, revision, open, openFloating, floating } = useUIConfiguration();
|
|
5286
5256
|
const [minimized, setMinimized] = useState(false);
|
|
5287
5257
|
const [hasLauncher, setHasLauncher] = useState(false);
|
|
5288
5258
|
const restorePopout = useRef(false);
|
|
@@ -5306,88 +5276,109 @@ function UIConfigurationModal() {
|
|
|
5306
5276
|
} else t2 = $[3];
|
|
5307
5277
|
const memory = useRef(t2);
|
|
5308
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);
|
|
5309
5290
|
const popout = useStudioPopout(isOpen && !minimized);
|
|
5310
5291
|
if ((!isOpen || minimized) && hasLauncher) {
|
|
5311
|
-
let
|
|
5312
|
-
if ($[
|
|
5313
|
-
|
|
5292
|
+
let t4;
|
|
5293
|
+
if ($[5] !== floating || $[6] !== isOpen || $[7] !== open || $[8] !== openFloating || $[9] !== popout) {
|
|
5294
|
+
t4 = createPortal(/* @__PURE__ */ jsx(ConfigurationLauncher, {
|
|
5314
5295
|
position: launcherPosition,
|
|
5315
5296
|
onOpen: () => {
|
|
5316
5297
|
setMinimized(false);
|
|
5317
|
-
if (!isOpen)
|
|
5298
|
+
if (!isOpen) {
|
|
5299
|
+
if (floating) openFloating();
|
|
5300
|
+
else open();
|
|
5301
|
+
}
|
|
5318
5302
|
if (restorePopout.current) popout.open();
|
|
5319
5303
|
}
|
|
5320
5304
|
}), document.body);
|
|
5321
|
-
$[
|
|
5322
|
-
$[
|
|
5323
|
-
$[
|
|
5324
|
-
$[
|
|
5325
|
-
|
|
5326
|
-
|
|
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;
|
|
5327
5313
|
}
|
|
5328
5314
|
if (!isOpen) return null;
|
|
5329
|
-
const
|
|
5330
|
-
|
|
5331
|
-
let t5;
|
|
5315
|
+
const t4 = floating ? floatingBounds : windowBounds;
|
|
5316
|
+
const t5 = !!popout.popup;
|
|
5332
5317
|
let t6;
|
|
5333
|
-
|
|
5334
|
-
|
|
5318
|
+
let t7;
|
|
5319
|
+
let t8;
|
|
5320
|
+
if ($[11] !== popout) {
|
|
5321
|
+
t6 = () => {
|
|
5335
5322
|
restorePopout.current = true;
|
|
5336
5323
|
popout.open();
|
|
5337
5324
|
};
|
|
5338
|
-
|
|
5325
|
+
t7 = () => {
|
|
5339
5326
|
restorePopout.current = false;
|
|
5340
5327
|
popout.dock();
|
|
5341
5328
|
};
|
|
5342
|
-
|
|
5329
|
+
t8 = () => {
|
|
5343
5330
|
restorePopout.current = !!popout.popup;
|
|
5344
5331
|
setHasLauncher(true);
|
|
5345
5332
|
setMinimized(true);
|
|
5346
5333
|
popout.dock();
|
|
5347
5334
|
};
|
|
5348
|
-
$[
|
|
5349
|
-
$[
|
|
5350
|
-
$[
|
|
5351
|
-
$[
|
|
5335
|
+
$[11] = popout;
|
|
5336
|
+
$[12] = t6;
|
|
5337
|
+
$[13] = t7;
|
|
5338
|
+
$[14] = t8;
|
|
5352
5339
|
} else {
|
|
5353
|
-
|
|
5354
|
-
|
|
5355
|
-
|
|
5340
|
+
t6 = $[12];
|
|
5341
|
+
t7 = $[13];
|
|
5342
|
+
t8 = $[14];
|
|
5356
5343
|
}
|
|
5357
|
-
let
|
|
5358
|
-
if ($[
|
|
5359
|
-
|
|
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, {
|
|
5360
5347
|
memory,
|
|
5361
|
-
windowBounds,
|
|
5362
|
-
|
|
5363
|
-
|
|
5364
|
-
|
|
5365
|
-
|
|
5348
|
+
windowBounds: t4,
|
|
5349
|
+
floating,
|
|
5350
|
+
poppedOut: t5,
|
|
5351
|
+
onPopout: t6,
|
|
5352
|
+
onDock: t7,
|
|
5353
|
+
onMinimize: t8,
|
|
5366
5354
|
popupBlocked: popout.blocked
|
|
5367
5355
|
}, revision);
|
|
5368
|
-
$[
|
|
5369
|
-
$[
|
|
5370
|
-
$[
|
|
5371
|
-
$[
|
|
5372
|
-
$[
|
|
5373
|
-
$[
|
|
5374
|
-
$[
|
|
5375
|
-
|
|
5376
|
-
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
|
|
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, {
|
|
5380
5370
|
value: true,
|
|
5381
5371
|
children: /* @__PURE__ */ jsx(UNSAFE_PortalProvider, {
|
|
5382
5372
|
getContainer: () => popout.popup.document.body,
|
|
5383
5373
|
children: content
|
|
5384
5374
|
})
|
|
5385
|
-
}), popout.popup.document.body) : content;
|
|
5386
|
-
$[
|
|
5387
|
-
$[
|
|
5388
|
-
$[
|
|
5389
|
-
|
|
5390
|
-
|
|
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;
|
|
5391
5382
|
}
|
|
5392
5383
|
//#endregion
|
|
5393
5384
|
export { ColorModeSwitch, UIConfigurationModal, UIConfigurationProvider, exportCss, parseThemeCss, useUIConfiguration };
|