@plitzi/sdk-style 0.38.10 → 0.38.11
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/CHANGELOG.md +180 -0
- package/dist/components/InputEasing/InputEasingButton.mjs +1 -1
- package/dist/components/InputEasing/InputEasingList.mjs +5 -5
- package/dist/components/Selector/Selector.mjs +2 -1
- package/dist/components/Selector/SelectorItem/ItemOptions.mjs +45 -41
- package/dist/components/Selector/SelectorItem/SelectorItem.mjs +4 -4
- package/dist/components/Selector/SelectorItem/helpers.d.ts +2 -0
- package/dist/components/Selector/SelectorItem/helpers.mjs +4 -0
- package/dist/components/StyleInspector/Inspector.mjs +185 -171
- package/dist/components/StyleInspector/InspectorSearchContext.d.ts +3 -0
- package/dist/components/StyleInspector/InspectorSearchContext.mjs +6 -0
- package/dist/components/StyleInspector/StyleInspector.mjs +154 -128
- package/dist/components/StyleInspector/categories/Background/Background.mjs +82 -114
- package/dist/components/StyleInspector/categories/Background/components/BackgroundAttachment/BackgroundAttachment.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundAttachment/BackgroundAttachment.mjs +53 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundAttachment/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundAttachment/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundLayer/BackgroundLayer.mjs +159 -153
- package/dist/components/StyleInspector/categories/Background/components/BackgroundLayer/helpers.d.ts +11 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundLayer/helpers.mjs +45 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundPosition/BackgroundPosition.mjs +26 -23
- package/dist/components/StyleInspector/categories/Background/components/BackgroundSize/BackgroundSize.mjs +65 -56
- package/dist/components/StyleInspector/categories/Background/components/BackgroundSize/helpers.d.ts +4 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundSize/helpers.mjs +8 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundTile/BackgroundTile.mjs +28 -27
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientPreviewBar.d.ts +4 -2
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientPreviewBar.mjs +19 -18
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopBar.d.ts +4 -0
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopBar.mjs +48 -80
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopEditor.d.ts +5 -3
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopEditor.mjs +51 -41
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopHandle.d.ts +5 -1
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopHandle.mjs +54 -32
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopTrack.d.ts +3 -1
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopTrack.mjs +14 -13
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/helpers.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/helpers.mjs +8 -0
- package/dist/components/StyleInspector/categories/Background/components/LayerGroup/LayerGroup.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Background/components/LayerGroup/LayerGroup.mjs +11 -0
- package/dist/components/StyleInspector/categories/Background/components/LayerGroup/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Background/components/LayerGroup/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/Background/helpers/backgroundParser.d.ts +21 -7
- package/dist/components/StyleInspector/categories/Background/helpers/backgroundParser.mjs +114 -113
- package/dist/components/StyleInspector/categories/Background/helpers/layerValues.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Background/helpers/layerValues.mjs +11 -0
- package/dist/components/StyleInspector/categories/Background/modes/ConicGradientMode.mjs +52 -87
- package/dist/components/StyleInspector/categories/Background/modes/ImageMode.mjs +16 -77
- package/dist/components/StyleInspector/categories/Background/modes/LinearGradientMode.mjs +19 -62
- package/dist/components/StyleInspector/categories/Background/modes/RadialGradientMode.mjs +79 -97
- package/dist/components/StyleInspector/categories/Background/modes/RawMode.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Background/modes/RawMode.mjs +22 -0
- package/dist/components/StyleInspector/categories/Background/modes/helpers.d.ts +19 -0
- package/dist/components/StyleInspector/categories/Background/modes/helpers.mjs +54 -0
- package/dist/components/StyleInspector/categories/Border/Border.mjs +26 -43
- package/dist/components/StyleInspector/categories/Border/BorderPlacements.mjs +60 -51
- package/dist/components/StyleInspector/categories/Display/Display.mjs +32 -49
- package/dist/components/StyleInspector/categories/DisplayFlexChild/DisplayFlexChild.mjs +33 -38
- package/dist/components/StyleInspector/categories/Effects/BoxShadow/BoxShadow.mjs +21 -33
- package/dist/components/StyleInspector/categories/Effects/Effects.mjs +131 -154
- package/dist/components/StyleInspector/categories/Effects/Filters/Filter.mjs +23 -31
- package/dist/components/StyleInspector/categories/Effects/Filters/FilterItem.d.ts +9 -5
- package/dist/components/StyleInspector/categories/Effects/Filters/FilterItem.mjs +57 -124
- package/dist/components/StyleInspector/categories/Effects/Filters/helpers.d.ts +25 -0
- package/dist/components/StyleInspector/categories/Effects/Filters/helpers.mjs +87 -0
- package/dist/components/StyleInspector/categories/Effects/Transform/Transform.mjs +18 -28
- package/dist/components/StyleInspector/categories/Effects/Transform/TransformItem.d.ts +1 -2
- package/dist/components/StyleInspector/categories/Effects/Transform/TransformItem.mjs +52 -76
- package/dist/components/StyleInspector/categories/Effects/Transform/transformFunctions.d.ts +5 -0
- package/dist/components/StyleInspector/categories/Effects/Transform/transformFunctions.mjs +8 -2
- package/dist/components/StyleInspector/categories/Effects/Transition/Transition.mjs +21 -37
- package/dist/components/StyleInspector/categories/Effects/Transition/TransitionEasing.d.ts +10 -0
- package/dist/components/StyleInspector/categories/Effects/Transition/TransitionEasing.mjs +92 -0
- package/dist/components/StyleInspector/categories/Effects/Transition/TransitionItem.d.ts +4 -4
- package/dist/components/StyleInspector/categories/Effects/Transition/TransitionItem.mjs +78 -359
- package/dist/components/StyleInspector/categories/Effects/Transition/helpers.d.ts +39 -0
- package/dist/components/StyleInspector/categories/Effects/Transition/helpers.mjs +268 -0
- package/dist/components/StyleInspector/categories/List/List.mjs +39 -38
- package/dist/components/StyleInspector/categories/ListItem/ListItem.mjs +29 -29
- package/dist/components/StyleInspector/categories/Others/Others.mjs +66 -88
- package/dist/components/StyleInspector/categories/Position/Position.mjs +67 -75
- package/dist/components/StyleInspector/categories/RawStyle/RawStyle.mjs +19 -18
- package/dist/components/StyleInspector/categories/Size/Size.mjs +68 -88
- package/dist/components/StyleInspector/categories/Spacing/Spacing.mjs +18 -27
- package/dist/components/StyleInspector/categories/Spacing/SpacingMargin.mjs +2 -2
- package/dist/components/StyleInspector/categories/Spacing/SpacingPadding.mjs +4 -3
- package/dist/components/StyleInspector/categories/Typography/Typography.mjs +88 -98
- package/dist/components/StyleInspector/categories/Typography/TypographyFont.mjs +1 -1
- package/dist/components/StyleInspector/categories/Typography/TypographyStyle.mjs +1 -1
- package/dist/components/StyleInspector/categories/Typography/TypographyTextShadow.mjs +26 -39
- package/dist/components/StyleInspector/categories/Variables/Variables.mjs +38 -37
- package/dist/components/StyleInspector/categoryKeys.d.ts +45 -0
- package/dist/components/StyleInspector/categoryKeys.mjs +220 -0
- package/dist/components/StyleInspector/components/CategoryContainer/CategoryContainer.mjs +43 -38
- package/dist/components/StyleInspector/components/CategoryOption/categoryTypes/OptionIconGroup.mjs +2 -1
- package/dist/components/StyleInspector/components/CategorySection/CategorySection.mjs +30 -15
- package/dist/components/StyleInspector/components/ColorSwatch/ColorSwatch.d.ts +8 -0
- package/dist/components/StyleInspector/components/ColorSwatch/ColorSwatch.mjs +23 -0
- package/dist/components/StyleInspector/components/ColorSwatch/helpers.d.ts +3 -0
- package/dist/components/StyleInspector/components/ColorSwatch/helpers.mjs +9 -0
- package/dist/components/StyleInspector/components/ColorSwatch/index.d.ts +3 -0
- package/dist/components/StyleInspector/components/ColorSwatch/index.mjs +5 -0
- package/dist/components/StyleInspector/components/InspectorDots/InspectorDots.d.ts +1 -0
- package/dist/components/StyleInspector/components/InspectorDots/InspectorDots.mjs +11 -11
- package/dist/components/StyleInspector/components/InspectorFooter/InspectorFooter.d.ts +11 -0
- package/dist/components/StyleInspector/components/InspectorFooter/InspectorFooter.mjs +38 -0
- package/dist/components/StyleInspector/components/InspectorFooter/helpers.d.ts +2 -0
- package/dist/components/StyleInspector/components/InspectorFooter/helpers.mjs +11 -0
- package/dist/components/StyleInspector/components/InspectorFooter/index.d.ts +3 -0
- package/dist/components/StyleInspector/components/InspectorFooter/index.mjs +5 -0
- package/dist/components/StyleInspector/components/InspectorLabel/InspectorLabel.mjs +34 -31
- package/dist/components/StyleInspector/components/InspectorLabel/helpers.d.ts +17 -0
- package/dist/components/StyleInspector/components/InspectorLabel/helpers.mjs +16 -0
- package/dist/components/StyleInspector/components/InspectorSearch/InspectorSearch.d.ts +7 -0
- package/dist/components/StyleInspector/components/InspectorSearch/InspectorSearch.mjs +24 -0
- package/dist/components/StyleInspector/components/InspectorSearch/index.d.ts +3 -0
- package/dist/components/StyleInspector/components/InspectorSearch/index.mjs +5 -0
- package/dist/components/StyleInspector/components/ShadowItem/ShadowItem.d.ts +9 -0
- package/dist/components/StyleInspector/components/ShadowItem/ShadowItem.mjs +110 -0
- package/dist/components/StyleInspector/components/ShadowItem/index.d.ts +3 -0
- package/dist/components/StyleInspector/components/ShadowItem/index.mjs +5 -0
- package/dist/components/StyleInspector/components/TargetSummary/TargetSummary.d.ts +7 -0
- package/dist/components/StyleInspector/components/TargetSummary/TargetSummary.mjs +24 -0
- package/dist/components/StyleInspector/components/TargetSummary/index.d.ts +3 -0
- package/dist/components/StyleInspector/components/TargetSummary/index.mjs +5 -0
- package/dist/components/StyleInspector/components/ValueList/ValueList.d.ts +12 -0
- package/dist/components/StyleInspector/components/ValueList/ValueList.mjs +25 -0
- package/dist/components/StyleInspector/components/ValueList/index.d.ts +3 -0
- package/dist/components/StyleInspector/components/ValueList/index.mjs +5 -0
- package/dist/components/StyleInspector/components/ValueListItem/ValueListItem.d.ts +16 -0
- package/dist/components/StyleInspector/components/ValueListItem/ValueListItem.mjs +71 -0
- package/dist/components/StyleInspector/components/ValueListItem/index.d.ts +3 -0
- package/dist/components/StyleInspector/components/ValueListItem/index.mjs +5 -0
- package/dist/components/StyleInspector/cssValues.d.ts +15 -0
- package/dist/components/StyleInspector/cssValues.mjs +27 -0
- package/dist/components/StyleInspector/helpers.d.ts +17 -1
- package/dist/components/StyleInspector/helpers.mjs +9 -2
- package/dist/components/StyleInspector/hooks/useInspectorValues.mjs +42 -45
- package/dist/components/StyleInspector/search.d.ts +11 -0
- package/dist/components/StyleInspector/search.mjs +14 -0
- package/dist/components/StyleInspector/shadowValue.d.ts +20 -0
- package/dist/components/StyleInspector/shadowValue.mjs +36 -0
- package/dist/components/StyleManager/StyleSelectorTag.mjs +1 -1
- package/package.json +185 -17
- package/dist/components/StyleInspector/categories/Effects/BoxShadow/BoxShadowItem.d.ts +0 -8
- package/dist/components/StyleInspector/categories/Effects/BoxShadow/BoxShadowItem.mjs +0 -132
- package/dist/components/StyleInspector/categories/Effects/BoxShadow/helpers.d.ts +0 -2
- package/dist/components/StyleInspector/categories/Effects/BoxShadow/helpers.mjs +0 -18
- package/dist/components/StyleInspector/categories/Typography/TypographyTextShadowItem.d.ts +0 -8
- package/dist/components/StyleInspector/categories/Typography/TypographyTextShadowItem.mjs +0 -83
|
@@ -1,58 +1,68 @@
|
|
|
1
|
-
import { STYLE_STATE_OPTIONS as e, ancestorClasses as t, ancestorConditions as n, ancestorOptions as r, ancestorRemovals as i, conditionOptions as ee, pseudoOptions as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
1
|
+
import { STYLE_STATE_OPTIONS as e, ancestorClasses as t, ancestorConditions as n, ancestorOptions as r, ancestorRemovals as i, conditionOptions as ee, moreTargetsHint as te, pseudoOptions as ne, targetParts as re, unusedAncestors as ie } from "./helpers.mjs";
|
|
2
|
+
import ae from "../Selector/index.mjs";
|
|
3
|
+
import oe from "./components/AncestorRules/index.mjs";
|
|
4
|
+
import se from "./components/TargetSummary/index.mjs";
|
|
5
|
+
import ce from "./Inspector.mjs";
|
|
6
|
+
import { use as le, useCallback as a, useEffect as ue, useMemo as o, useState as s } from "react";
|
|
7
|
+
import { useBuilderStore as de, useBuilderStoreSync as c } from "@plitzi/sdk-shared/store";
|
|
8
|
+
import { get as l, pick as fe, set as pe } from "@plitzi/plitzi-ui/helpers";
|
|
9
|
+
import { produce as me } from "immer";
|
|
10
|
+
import { canonicalCondition as he } from "@plitzi/sdk-shared/style/styleConditions";
|
|
11
|
+
import { isParentAncestor as ge } from "@plitzi/sdk-shared/style/styleStates";
|
|
12
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
13
|
+
import { clsx as f } from "clsx";
|
|
14
|
+
import _e from "@plitzi/plitzi-ui/Icon";
|
|
15
|
+
import ve from "@plitzi/sdk-shared/builder/contexts/BuilderContext";
|
|
14
16
|
import p from "@plitzi/plitzi-ui/hooks/useDidUpdateEffect";
|
|
17
|
+
import ye from "@plitzi/plitzi-ui/hooks/useStorage";
|
|
15
18
|
import m from "@plitzi/plitzi-ui/Select";
|
|
16
19
|
import h from "@plitzi/plitzi-ui/Select2";
|
|
17
20
|
//#region src/components/StyleInspector/StyleInspector.tsx
|
|
18
|
-
var g = ({ displayMode: g, selectors: _, value: v, element: y, mode: b = "element", componentType: x, styleSelectors: S, styleSelectorsAvailables: C, componentSubTypesAvailables: w, allowStyleSelector:
|
|
19
|
-
let [
|
|
20
|
-
|
|
21
|
-
let [I, L] =
|
|
22
|
-
|
|
23
|
-
let [[H, U]] =
|
|
21
|
+
var g = ({ displayMode: g, selectors: _, value: v, element: y, mode: b = "element", componentType: x, styleSelectors: S, styleSelectorsAvailables: C, componentSubTypesAvailables: w, allowStyleSelector: be = !0, allowStyleState: T = !0, allowStyleVariant: E = !0, onChange: D, onRemoveVariant: O }) => {
|
|
22
|
+
let [xe, k] = s(void 0), [A, j] = s("base"), [M, N] = s(void 0), [P, F] = s(void 0);
|
|
23
|
+
c("styleSelector", A, { enabled: b === "element" }), c("styleVariant", M, { enabled: b === "element" });
|
|
24
|
+
let [I, L] = s(void 0), [R, z] = s(void 0), [B, V] = s(void 0);
|
|
25
|
+
c("styleState", P, { enabled: b === "element" }), c("styleAncestor", I, { enabled: b === "element" }), c("stylePseudo", R, { enabled: b === "element" }), c("styleCondition", B, { enabled: b === "element" });
|
|
26
|
+
let [[H, U]] = de(["schema.flat", "style.platform"]), [Se, W] = ye("builder-state.styleInspector.moreTargets", !1), { builderHandler: G } = le(ve), K = o(() => l(S, A, ""), [S, A]), Ce = o(() => Object.values(fe(_ ?? {}, y ? [y.definition.type, ...K.split(" ")] : K.split(" "))), [
|
|
24
27
|
_,
|
|
25
28
|
y,
|
|
26
|
-
|
|
27
|
-
]),
|
|
29
|
+
K
|
|
30
|
+
]), q = o(() => v ? l(_, v) : void 0, [_, v]), J = q?.attributes[A]?.ancestors, Y = o(() => b === "element" ? t(H, y) : Object.values(_ ?? {}).filter((e) => e.type === "class" && e.name !== v).map((e) => e.name).sort((e, t) => e.localeCompare(t)), [
|
|
28
31
|
y,
|
|
29
32
|
H,
|
|
30
33
|
b,
|
|
31
34
|
_,
|
|
32
35
|
v
|
|
33
|
-
]),
|
|
34
|
-
let e = Object.keys(
|
|
36
|
+
]), we = o(() => r(Y, J), [Y, J]), Te = o(() => n(J), [J]), X = o(() => q ? ie(H, q) : /* @__PURE__ */ new Set(), [H, q]), Ee = o(() => {
|
|
37
|
+
let e = Object.keys(J ?? {}).length;
|
|
35
38
|
return e ? `When an ancestor is… (${e} set)` : "When an ancestor is…";
|
|
36
|
-
}, [
|
|
37
|
-
let e =
|
|
39
|
+
}, [J]), De = o(() => {
|
|
40
|
+
let e = q?.attributes[A], t = I ? [...Object.keys(_?.[I]?.attributes.base.variants ?? {}), ...Object.keys(e?.ancestors?.[I]?.variants ?? {})] : Object.keys(e?.variants ?? {});
|
|
38
41
|
return [...new Set(t)].map((e) => ({
|
|
39
42
|
label: e,
|
|
40
43
|
value: e
|
|
41
44
|
}));
|
|
42
45
|
}, [
|
|
43
|
-
|
|
46
|
+
q?.attributes,
|
|
44
47
|
_,
|
|
45
48
|
I,
|
|
46
49
|
A
|
|
47
|
-
]),
|
|
48
|
-
|
|
50
|
+
]), Oe = o(() => ne(q?.attributes[A]), [q?.attributes, A]), ke = o(() => ee(q?.attributes[A]), [q?.attributes, A]), Ae = !!I && ge(I), Z = !!I || !!R || !!B, Q = Se || Z, je = re({
|
|
51
|
+
styleSelector: A,
|
|
52
|
+
styleVariant: M,
|
|
53
|
+
styleState: P,
|
|
54
|
+
styleAncestor: I,
|
|
55
|
+
stylePseudo: R,
|
|
56
|
+
styleCondition: B
|
|
57
|
+
});
|
|
58
|
+
ue(() => {
|
|
49
59
|
if (j("base"), b !== "element") return;
|
|
50
|
-
let e =
|
|
60
|
+
let e = l(S, "base", "").split(" "), t = e[e.length - 1];
|
|
51
61
|
D?.(t || ""), F(void 0), L(void 0), z(void 0), V(void 0), k(void 0);
|
|
52
62
|
}, [D, S]), p(() => {
|
|
53
63
|
if (b === "element") {
|
|
54
64
|
if (v !== y?.definition.type) {
|
|
55
|
-
let e =
|
|
65
|
+
let e = l(S, A, "").split(" ");
|
|
56
66
|
D?.(e[e.length - 1]);
|
|
57
67
|
}
|
|
58
68
|
F(void 0), N(void 0), L(void 0), z(void 0), V(void 0), k(void 0);
|
|
@@ -60,249 +70,265 @@ var g = ({ displayMode: g, selectors: _, value: v, element: y, mode: b = "elemen
|
|
|
60
70
|
}, [A]), p(() => {
|
|
61
71
|
F(void 0), N(void 0), L(void 0), z(void 0), V(void 0), k(void 0);
|
|
62
72
|
}, [v]);
|
|
63
|
-
let
|
|
73
|
+
let Me = a((e, t, n) => {
|
|
64
74
|
if (t && !n) return;
|
|
65
75
|
let { name: r, type: i } = e;
|
|
66
|
-
!t && r !== "" && !_?.[r] ?
|
|
76
|
+
!t && r !== "" && !_?.[r] ? G("styleAddSelector", g, r, i, void 0, void 0, {
|
|
67
77
|
styleSelector: A,
|
|
68
78
|
componentType: i === "element" ? x : void 0
|
|
69
|
-
}) : t && n && n.name !== r && _?.[n.name] && !_[r] &&
|
|
79
|
+
}) : t && n && n.name !== r && _?.[n.name] && !_[r] && G("styleAddSelector", g, r, i, void 0, l(_, `${n.name}.attributes.${A}.default`, {}), {
|
|
70
80
|
styleSelector: A,
|
|
71
81
|
componentType: i === "element" ? x : void 0
|
|
72
82
|
});
|
|
73
83
|
}, [
|
|
74
|
-
|
|
84
|
+
G,
|
|
75
85
|
x,
|
|
76
86
|
g,
|
|
77
87
|
_,
|
|
78
88
|
A
|
|
79
|
-
]),
|
|
89
|
+
]), Ne = a((e) => {
|
|
80
90
|
if (!e || v && v === e.name) {
|
|
81
91
|
D?.(void 0);
|
|
82
92
|
return;
|
|
83
93
|
}
|
|
84
94
|
D?.(e.name);
|
|
85
|
-
}, [D, v]),
|
|
86
|
-
y &&
|
|
87
|
-
|
|
95
|
+
}, [D, v]), Pe = a((e) => {
|
|
96
|
+
y && G("schemaUpdateElement", me(y, (t) => {
|
|
97
|
+
pe(t, `definition.styleSelectors.${A}`, e);
|
|
88
98
|
}));
|
|
89
99
|
}, [
|
|
90
100
|
y,
|
|
91
|
-
|
|
101
|
+
G,
|
|
92
102
|
A
|
|
93
|
-
]),
|
|
94
|
-
|
|
95
|
-
}, [
|
|
103
|
+
]), Fe = a((e) => {
|
|
104
|
+
G("styleRemoveSelector", g, e.name);
|
|
105
|
+
}, [G, g]), Ie = a(() => W((e) => !e), [W]), Le = a(() => {
|
|
106
|
+
j("base"), F(void 0), N(void 0), L(void 0), z(void 0), V(void 0);
|
|
107
|
+
}, []), Re = a((e) => k(e), []), ze = a((e) => {
|
|
96
108
|
j(e);
|
|
97
|
-
}, []),
|
|
109
|
+
}, []), Be = a((e) => F(e?.value), []), Ve = a((e) => {
|
|
98
110
|
L(e?.value), F(void 0), N(void 0), z(void 0), V(void 0);
|
|
99
|
-
}, []),
|
|
100
|
-
let t = e ?
|
|
111
|
+
}, []), He = a((e) => z(e?.value), []), Ue = a((e) => {
|
|
112
|
+
let t = e ? he(e.value) : void 0;
|
|
101
113
|
(!e || t) && (V(t), t && (N(void 0), L(void 0)));
|
|
102
|
-
}, []),
|
|
103
|
-
e.value === B && (V(void 0), F(void 0)),
|
|
114
|
+
}, []), We = a((e) => {
|
|
115
|
+
e.value === B && (V(void 0), F(void 0)), q?.attributes[A]?.conditions?.[e.value] && G("styleUpdateSelector", g, q.name, void 0, void 0, {
|
|
104
116
|
styleSelector: A,
|
|
105
117
|
styleCondition: e.value,
|
|
106
|
-
componentType:
|
|
118
|
+
componentType: q.componentType
|
|
107
119
|
});
|
|
108
120
|
}, [
|
|
109
|
-
|
|
121
|
+
G,
|
|
110
122
|
g,
|
|
111
|
-
|
|
123
|
+
q,
|
|
112
124
|
B,
|
|
113
125
|
A
|
|
114
|
-
]),
|
|
115
|
-
e.value === I && (L(void 0), F(void 0), N(void 0)),
|
|
126
|
+
]), Ge = a((e) => {
|
|
127
|
+
e.value === I && (L(void 0), F(void 0), N(void 0)), q?.attributes[A]?.ancestors?.[e.value] && G("styleUpdateSelector", g, q.name, void 0, void 0, {
|
|
116
128
|
styleSelector: A,
|
|
117
129
|
styleAncestor: e.value,
|
|
118
|
-
componentType:
|
|
130
|
+
componentType: q.componentType
|
|
119
131
|
});
|
|
120
132
|
}, [
|
|
121
|
-
|
|
133
|
+
G,
|
|
122
134
|
g,
|
|
123
|
-
|
|
135
|
+
q,
|
|
124
136
|
I,
|
|
125
137
|
A
|
|
126
|
-
]),
|
|
138
|
+
]), Ke = a((e) => {
|
|
127
139
|
L(e.ancestor), N(e.variant), F(e.state), z(void 0), V(void 0);
|
|
128
|
-
}, []),
|
|
129
|
-
if (!
|
|
140
|
+
}, []), qe = a((e) => {
|
|
141
|
+
if (!q) return;
|
|
130
142
|
let { ancestor: t, state: n, variant: r } = e;
|
|
131
|
-
t === I && n === P && r === M && (F(void 0), N(void 0)),
|
|
143
|
+
t === I && n === P && r === M && (F(void 0), N(void 0)), G("styleUpdateSelector", g, q.name, void 0, n || r ? void 0 : {}, {
|
|
132
144
|
styleSelector: A,
|
|
133
145
|
styleAncestor: t,
|
|
134
146
|
styleState: n,
|
|
135
147
|
styleVariant: r,
|
|
136
|
-
componentType:
|
|
148
|
+
componentType: q.componentType
|
|
137
149
|
});
|
|
138
150
|
}, [
|
|
139
|
-
|
|
151
|
+
G,
|
|
140
152
|
g,
|
|
141
|
-
|
|
153
|
+
q,
|
|
142
154
|
I,
|
|
143
155
|
A,
|
|
144
156
|
P,
|
|
145
157
|
M
|
|
146
|
-
]),
|
|
147
|
-
if (
|
|
148
|
-
I &&
|
|
149
|
-
for (let e of i(U,
|
|
158
|
+
]), Je = a(() => {
|
|
159
|
+
if (q) {
|
|
160
|
+
I && X.has(I) && (L(void 0), F(void 0), N(void 0));
|
|
161
|
+
for (let e of i(U, q.name, X)) G("styleUpdateSelector", e.displayMode, q.name, void 0, void 0, {
|
|
150
162
|
styleSelector: e.styleSelector,
|
|
151
163
|
styleAncestor: e.styleAncestor,
|
|
152
|
-
componentType:
|
|
164
|
+
componentType: q.componentType
|
|
153
165
|
});
|
|
154
166
|
}
|
|
155
167
|
}, [
|
|
156
|
-
|
|
168
|
+
G,
|
|
157
169
|
U,
|
|
158
|
-
|
|
170
|
+
q,
|
|
159
171
|
I,
|
|
160
|
-
|
|
161
|
-
]),
|
|
172
|
+
X
|
|
173
|
+
]), Ye = a((e) => {
|
|
162
174
|
N(e?.value), e && V(void 0);
|
|
163
|
-
}, []),
|
|
164
|
-
O?.(e.value), P && F(void 0), e.value === M && N(void 0),
|
|
175
|
+
}, []), Xe = a((e) => {
|
|
176
|
+
O?.(e.value), P && F(void 0), e.value === M && N(void 0), G("styleUpdateSelector", g, q?.name, void 0, void 0, {
|
|
165
177
|
styleSelector: A,
|
|
166
178
|
styleVariant: e.value,
|
|
167
179
|
styleAncestor: I,
|
|
168
|
-
componentType:
|
|
180
|
+
componentType: q?.componentType
|
|
169
181
|
});
|
|
170
182
|
}, [
|
|
171
|
-
|
|
183
|
+
G,
|
|
172
184
|
g,
|
|
173
185
|
O,
|
|
174
|
-
|
|
175
|
-
|
|
186
|
+
q?.componentType,
|
|
187
|
+
q?.name,
|
|
176
188
|
A,
|
|
177
189
|
P,
|
|
178
190
|
M,
|
|
179
191
|
I
|
|
180
192
|
]), $ = E || T || !!C?.length || !!w?.length;
|
|
181
|
-
return /* @__PURE__ */
|
|
193
|
+
return /* @__PURE__ */ d("div", {
|
|
182
194
|
className: "flex w-full grow flex-col gap-2",
|
|
183
|
-
children: [/* @__PURE__ */
|
|
195
|
+
children: [/* @__PURE__ */ d("div", {
|
|
184
196
|
className: "flex w-full flex-col gap-2 px-1",
|
|
185
197
|
children: [
|
|
186
|
-
b === "element" && /* @__PURE__ */
|
|
198
|
+
b === "element" && /* @__PURE__ */ u(ae, {
|
|
187
199
|
className: "min-h-0 w-full",
|
|
188
|
-
value:
|
|
200
|
+
value: K,
|
|
189
201
|
selectors: _,
|
|
190
|
-
selector:
|
|
202
|
+
selector: q,
|
|
191
203
|
componentType: x,
|
|
192
|
-
onAdd:
|
|
193
|
-
onChange:
|
|
194
|
-
onRemove:
|
|
195
|
-
onSelectorSelected:
|
|
204
|
+
onAdd: Me,
|
|
205
|
+
onChange: Pe,
|
|
206
|
+
onRemove: Fe,
|
|
207
|
+
onSelectorSelected: Ne
|
|
196
208
|
}),
|
|
197
|
-
$ && /* @__PURE__ */
|
|
198
|
-
className:
|
|
209
|
+
$ && /* @__PURE__ */ d("div", {
|
|
210
|
+
className: f("flex w-full items-center gap-2", { "mt-2": b === "manager" }),
|
|
199
211
|
children: [
|
|
200
|
-
!!w?.length && /* @__PURE__ */
|
|
212
|
+
!!w?.length && /* @__PURE__ */ u(m, {
|
|
201
213
|
className: "grow basis-0",
|
|
202
214
|
size: "xs",
|
|
203
|
-
value:
|
|
204
|
-
onChange:
|
|
205
|
-
children: w.map((e) => /* @__PURE__ */
|
|
215
|
+
value: xe,
|
|
216
|
+
onChange: Re,
|
|
217
|
+
children: w.map((e) => /* @__PURE__ */ u("option", {
|
|
206
218
|
value: e,
|
|
207
219
|
children: e
|
|
208
220
|
}, e))
|
|
209
221
|
}),
|
|
210
|
-
|
|
222
|
+
be && C && C.length > 1 && /* @__PURE__ */ u(m, {
|
|
211
223
|
className: "grow basis-0",
|
|
212
224
|
size: "xs",
|
|
213
|
-
onChange:
|
|
225
|
+
onChange: ze,
|
|
214
226
|
value: A,
|
|
215
|
-
children: C.map((e) => /* @__PURE__ */
|
|
227
|
+
children: C.map((e) => /* @__PURE__ */ u("option", {
|
|
216
228
|
value: e,
|
|
217
229
|
children: e
|
|
218
230
|
}, e))
|
|
219
231
|
}),
|
|
220
|
-
E && !
|
|
232
|
+
E && !Ae && /* @__PURE__ */ u("div", {
|
|
221
233
|
className: "grow basis-0",
|
|
222
|
-
children: /* @__PURE__ */
|
|
234
|
+
children: /* @__PURE__ */ u(h, {
|
|
223
235
|
className: "grow basis-0",
|
|
224
236
|
value: M,
|
|
225
|
-
options:
|
|
237
|
+
options: De,
|
|
226
238
|
placeholder: "Variant",
|
|
227
239
|
size: "xs",
|
|
228
240
|
allowCreateOptions: !0,
|
|
229
241
|
allowRemoveOptions: !0,
|
|
230
242
|
clearable: !0,
|
|
231
|
-
onChange:
|
|
232
|
-
onRemove:
|
|
243
|
+
onChange: Ye,
|
|
244
|
+
onRemove: Xe
|
|
233
245
|
})
|
|
234
246
|
}),
|
|
235
|
-
T && /* @__PURE__ */
|
|
247
|
+
T && /* @__PURE__ */ u("div", {
|
|
236
248
|
className: "grow basis-0",
|
|
237
|
-
children: /* @__PURE__ */
|
|
249
|
+
children: /* @__PURE__ */ u(h, {
|
|
238
250
|
className: "grow basis-0",
|
|
239
251
|
value: P,
|
|
240
252
|
options: e,
|
|
241
253
|
placeholder: "State",
|
|
242
254
|
size: "xs",
|
|
243
255
|
clearable: !0,
|
|
244
|
-
onChange:
|
|
256
|
+
onChange: Be
|
|
245
257
|
})
|
|
258
|
+
}),
|
|
259
|
+
T && /* @__PURE__ */ u(_e, {
|
|
260
|
+
className: f("shrink-0 cursor-pointer rounded-sm p-1 text-xs", {
|
|
261
|
+
"bg-primary-500/15 text-primary-600 dark:text-primary-300": Q,
|
|
262
|
+
"text-zinc-500 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-zinc-100": !Q
|
|
263
|
+
}),
|
|
264
|
+
icon: "fa-solid fa-crosshairs",
|
|
265
|
+
title: te(Z, Q),
|
|
266
|
+
onClick: Z ? void 0 : Ie
|
|
246
267
|
})
|
|
247
268
|
]
|
|
248
269
|
}),
|
|
249
|
-
$ && T && !!
|
|
270
|
+
$ && T && Q && !!we.length && /* @__PURE__ */ u(h, {
|
|
250
271
|
className: "w-full",
|
|
251
272
|
value: I,
|
|
252
|
-
options:
|
|
253
|
-
placeholder:
|
|
273
|
+
options: we,
|
|
274
|
+
placeholder: Ee,
|
|
254
275
|
size: "xs",
|
|
255
276
|
clearable: !0,
|
|
256
277
|
allowRemoveOptions: !0,
|
|
257
|
-
onChange:
|
|
258
|
-
onRemove:
|
|
278
|
+
onChange: Ve,
|
|
279
|
+
onRemove: Ge
|
|
259
280
|
}),
|
|
260
|
-
$ && T && !I && /* @__PURE__ */
|
|
281
|
+
$ && T && Q && !I && /* @__PURE__ */ d("div", {
|
|
261
282
|
className: "flex w-full items-center gap-2",
|
|
262
|
-
children: [/* @__PURE__ */
|
|
283
|
+
children: [/* @__PURE__ */ u("div", {
|
|
263
284
|
className: "grow basis-0",
|
|
264
|
-
children: /* @__PURE__ */
|
|
285
|
+
children: /* @__PURE__ */ u(h, {
|
|
265
286
|
className: "grow basis-0",
|
|
266
287
|
value: R,
|
|
267
|
-
options:
|
|
288
|
+
options: Oe,
|
|
268
289
|
placeholder: "Pseudo-element",
|
|
269
290
|
size: "xs",
|
|
270
291
|
clearable: !0,
|
|
271
|
-
onChange:
|
|
292
|
+
onChange: He
|
|
272
293
|
})
|
|
273
|
-
}), /* @__PURE__ */
|
|
294
|
+
}), /* @__PURE__ */ u("div", {
|
|
274
295
|
className: "grow basis-0",
|
|
275
|
-
children: /* @__PURE__ */
|
|
296
|
+
children: /* @__PURE__ */ u(h, {
|
|
276
297
|
className: "grow basis-0",
|
|
277
298
|
value: B,
|
|
278
|
-
options:
|
|
299
|
+
options: ke,
|
|
279
300
|
placeholder: "Condition",
|
|
280
301
|
size: "xs",
|
|
281
302
|
clearable: !0,
|
|
282
303
|
allowCreateOptions: !0,
|
|
283
304
|
allowRemoveOptions: !0,
|
|
284
|
-
onChange:
|
|
285
|
-
onRemove:
|
|
305
|
+
onChange: Ue,
|
|
306
|
+
onRemove: We
|
|
286
307
|
})
|
|
287
308
|
})]
|
|
288
309
|
}),
|
|
289
|
-
T &&
|
|
290
|
-
conditions:
|
|
291
|
-
unused:
|
|
310
|
+
T && Te.length > 0 && /* @__PURE__ */ u(oe, {
|
|
311
|
+
conditions: Te,
|
|
312
|
+
unused: X,
|
|
292
313
|
activeAncestor: I,
|
|
293
314
|
activeState: P,
|
|
294
315
|
activeVariant: M,
|
|
295
|
-
onSelect:
|
|
296
|
-
onRemove:
|
|
297
|
-
onRemoveUnused:
|
|
316
|
+
onSelect: Ke,
|
|
317
|
+
onRemove: qe,
|
|
318
|
+
onRemoveUnused: Je
|
|
319
|
+
}),
|
|
320
|
+
je.length > 0 && /* @__PURE__ */ u(se, {
|
|
321
|
+
selectorName: v,
|
|
322
|
+
parts: je,
|
|
323
|
+
onReset: Le
|
|
298
324
|
})
|
|
299
325
|
]
|
|
300
|
-
}), /* @__PURE__ */
|
|
326
|
+
}), /* @__PURE__ */ u("div", {
|
|
301
327
|
className: "flex grow basis-0 flex-col overflow-auto border-t border-gray-300 dark:border-zinc-700",
|
|
302
|
-
children: /* @__PURE__ */
|
|
303
|
-
selectors:
|
|
328
|
+
children: /* @__PURE__ */ u(ce, {
|
|
329
|
+
selectors: Ce,
|
|
304
330
|
componentType: x,
|
|
305
|
-
selector:
|
|
331
|
+
selector: q,
|
|
306
332
|
styleSelector: A,
|
|
307
333
|
styleState: P,
|
|
308
334
|
styleVariant: M,
|