@plitzi/sdk-style 0.38.10 → 0.38.12
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 +289 -0
- package/dist/StyleMap/helpers/isValueValid.mjs +5 -4
- package/dist/StyleMap/helpers/utils.mjs +13 -12
- 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 +213 -187
- package/dist/components/StyleInspector/categories/Background/Background.mjs +84 -177
- 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/GradientCenter/GradientCenter.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Background/components/GradientCenter/GradientCenter.mjs +28 -0
- package/dist/components/StyleInspector/categories/Background/components/GradientCenter/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Background/components/GradientCenter/index.mjs +5 -0
- 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 +22 -79
- 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 +58 -98
- 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 +65 -81
- package/dist/components/StyleInspector/categories/Display/DisplayGap.d.ts +14 -1
- package/dist/components/StyleInspector/categories/Display/DisplayGap.mjs +26 -13
- package/dist/components/StyleInspector/categories/DisplayFlexChild/DisplayFlexChild.mjs +33 -38
- package/dist/components/StyleInspector/categories/Effects/BoxShadow/BoxShadow.mjs +13 -36
- package/dist/components/StyleInspector/categories/Effects/Effects.mjs +120 -204
- 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 +21 -70
- package/dist/components/StyleInspector/categories/ListItem/ListItem.mjs +21 -70
- package/dist/components/StyleInspector/categories/Others/Others.mjs +63 -85
- 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 +65 -85
- package/dist/components/StyleInspector/categories/Spacing/Spacing.mjs +18 -27
- package/dist/components/StyleInspector/categories/Spacing/SpacingBox.d.ts +15 -0
- package/dist/components/StyleInspector/categories/Spacing/SpacingBox.mjs +63 -0
- package/dist/components/StyleInspector/categories/Spacing/SpacingMargin.d.ts +3 -11
- package/dist/components/StyleInspector/categories/Spacing/SpacingMargin.mjs +18 -70
- package/dist/components/StyleInspector/categories/Spacing/SpacingPadding.d.ts +3 -7
- package/dist/components/StyleInspector/categories/Spacing/SpacingPadding.mjs +16 -67
- package/dist/components/StyleInspector/categories/Typography/Typography.mjs +58 -67
- 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 +16 -40
- package/dist/components/StyleInspector/categories/Variables/Variables.mjs +38 -37
- package/dist/components/StyleInspector/categories/blendModes.d.ts +2 -0
- package/dist/components/StyleInspector/categories/blendModes.mjs +21 -0
- package/dist/components/StyleInspector/categories/listMarkers.d.ts +8 -0
- package/dist/components/StyleInspector/categories/listMarkers.mjs +25 -0
- 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/ShadowList/ShadowList.d.ts +15 -0
- package/dist/components/StyleInspector/components/ShadowList/ShadowList.mjs +25 -0
- package/dist/components/StyleInspector/components/ShadowList/index.d.ts +3 -0
- package/dist/components/StyleInspector/components/ShadowList/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 +13 -0
- package/dist/components/StyleInspector/cssValues.mjs +23 -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/hooks/usePropertyChange.d.ts +6 -0
- package/dist/components/StyleInspector/hooks/usePropertyChange.mjs +9 -0
- 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 +225 -21
- package/dist/components/StyleInspector/categories/Display/DisplayGridGap.d.ts +0 -8
- package/dist/components/StyleInspector/categories/Display/DisplayGridGap.mjs +0 -27
- 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,135 +1,147 @@
|
|
|
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
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
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, useEffectEvent as de, useMemo as o, useState as s } from "react";
|
|
7
|
+
import { useBuilderStore as fe, useBuilderStoreSync as c } from "@plitzi/sdk-shared/store";
|
|
8
|
+
import { get as l, pick as pe, set as me } from "@plitzi/plitzi-ui/helpers";
|
|
9
|
+
import { produce as he } from "immer";
|
|
10
|
+
import { canonicalCondition as ge } from "@plitzi/sdk-shared/style/styleConditions";
|
|
11
|
+
import { isParentAncestor as _e } from "@plitzi/sdk-shared/style/styleStates";
|
|
12
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
13
|
+
import { clsx as ve } from "clsx";
|
|
14
|
+
import ye from "@plitzi/plitzi-ui/Icon";
|
|
15
|
+
import be from "@plitzi/sdk-shared/builder/contexts/BuilderContext";
|
|
16
|
+
import f from "@plitzi/plitzi-ui/hooks/useDidUpdateEffect";
|
|
17
|
+
import xe from "@plitzi/plitzi-ui/hooks/useStorage";
|
|
18
|
+
import p from "@plitzi/plitzi-ui/Select";
|
|
19
|
+
import m from "@plitzi/plitzi-ui/Select2";
|
|
17
20
|
//#region src/components/StyleInspector/StyleInspector.tsx
|
|
18
|
-
var
|
|
19
|
-
let [
|
|
20
|
-
|
|
21
|
-
let [
|
|
22
|
-
|
|
23
|
-
let [[
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
var h = ({ displayMode: h, selectors: g, value: _, element: v, mode: y = "element", componentType: b, styleSelectors: x, styleSelectorsAvailables: S, componentSubTypesAvailables: C, allowStyleSelector: Se = !0, allowStyleState: w = !0, allowStyleVariant: T = !0, onChange: E, onRemoveVariant: D }) => {
|
|
22
|
+
let [Ce, O] = s(void 0), [k, A] = s("base"), [j, M] = s(void 0), [N, P] = s(void 0);
|
|
23
|
+
c("styleSelector", k, { enabled: y === "element" }), c("styleVariant", j, { enabled: y === "element" });
|
|
24
|
+
let [F, I] = s(void 0), [L, R] = s(void 0), [z, B] = s(void 0);
|
|
25
|
+
c("styleState", N, { enabled: y === "element" }), c("styleAncestor", F, { enabled: y === "element" }), c("stylePseudo", L, { enabled: y === "element" }), c("styleCondition", z, { enabled: y === "element" });
|
|
26
|
+
let [[V, H]] = fe(["schema.flat", "style.platform"]), [we, U] = xe("builder-state.styleInspector.moreTargets", !1), { builderHandler: W } = le(be), G = o(() => l(x, k, ""), [x, k]), Te = o(() => Object.values(pe(g ?? {}, v ? [v.definition.type, ...G.split(" ")] : G.split(" "))), [
|
|
27
|
+
g,
|
|
28
|
+
v,
|
|
26
29
|
G
|
|
27
|
-
]), K =
|
|
30
|
+
]), K = o(() => _ ? l(g, _) : void 0, [g, _]), q = K?.attributes[k]?.ancestors, J = o(() => y === "element" ? t(V, v) : Object.values(g ?? {}).filter((e) => e.type === "class" && e.name !== _).map((e) => e.name).sort((e, t) => e.localeCompare(t)), [
|
|
31
|
+
v,
|
|
32
|
+
V,
|
|
28
33
|
y,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
v
|
|
33
|
-
]), Y = s(() => r(J, q), [J, q]), X = s(() => n(q), [q]), Z = s(() => K ? te(H, K) : /* @__PURE__ */ new Set(), [H, K]), ve = s(() => {
|
|
34
|
+
g,
|
|
35
|
+
_
|
|
36
|
+
]), Y = o(() => r(J, q), [J, q]), Ee = o(() => n(q), [q]), X = o(() => K ? ie(V, K) : /* @__PURE__ */ new Set(), [V, K]), De = o(() => {
|
|
34
37
|
let e = Object.keys(q ?? {}).length;
|
|
35
38
|
return e ? `When an ancestor is… (${e} set)` : "When an ancestor is…";
|
|
36
|
-
}, [q]),
|
|
37
|
-
let e = K?.attributes[
|
|
39
|
+
}, [q]), Oe = o(() => {
|
|
40
|
+
let e = K?.attributes[k], t = F ? [...Object.keys(g?.[F]?.attributes.base.variants ?? {}), ...Object.keys(e?.ancestors?.[F]?.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
|
K?.attributes,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
]),
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
47
|
+
g,
|
|
48
|
+
F,
|
|
49
|
+
k
|
|
50
|
+
]), ke = o(() => ne(K?.attributes[k]), [K?.attributes, k]), Ae = o(() => ee(K?.attributes[k]), [K?.attributes, k]), je = !!F && _e(F), Z = !!F || !!L || !!z, Q = we || Z, Me = re({
|
|
51
|
+
styleSelector: k,
|
|
52
|
+
styleVariant: j,
|
|
53
|
+
styleState: N,
|
|
54
|
+
styleAncestor: F,
|
|
55
|
+
stylePseudo: L,
|
|
56
|
+
styleCondition: z
|
|
57
|
+
}), Ne = de(() => {
|
|
58
|
+
if (A("base"), y !== "element") return;
|
|
59
|
+
let e = l(x, "base", "").split(" "), t = e[e.length - 1];
|
|
60
|
+
E?.(t || ""), P(void 0), I(void 0), R(void 0), B(void 0), O(void 0);
|
|
61
|
+
});
|
|
62
|
+
ue(() => Ne(), [E, x]), f(() => {
|
|
63
|
+
if (y === "element") {
|
|
64
|
+
if (_ !== v?.definition.type) {
|
|
65
|
+
let e = l(x, k, "").split(" ");
|
|
66
|
+
E?.(e[e.length - 1]);
|
|
57
67
|
}
|
|
58
|
-
|
|
68
|
+
P(void 0), M(void 0), I(void 0), R(void 0), B(void 0), O(void 0);
|
|
59
69
|
}
|
|
60
|
-
}, [
|
|
61
|
-
|
|
62
|
-
}, [
|
|
63
|
-
let
|
|
70
|
+
}, [k]), f(() => {
|
|
71
|
+
P(void 0), M(void 0), I(void 0), R(void 0), B(void 0), O(void 0);
|
|
72
|
+
}, [_]);
|
|
73
|
+
let Pe = a((e, t, n) => {
|
|
64
74
|
if (t && !n) return;
|
|
65
75
|
let { name: r, type: i } = e;
|
|
66
|
-
!t && r !== "" && !
|
|
67
|
-
styleSelector:
|
|
68
|
-
componentType: i === "element" ?
|
|
69
|
-
}) : t && n && n.name !== r &&
|
|
70
|
-
styleSelector:
|
|
71
|
-
componentType: i === "element" ?
|
|
76
|
+
!t && r !== "" && !g?.[r] ? W("styleAddSelector", h, r, i, void 0, void 0, {
|
|
77
|
+
styleSelector: k,
|
|
78
|
+
componentType: i === "element" ? b : void 0
|
|
79
|
+
}) : t && n && n.name !== r && g?.[n.name] && !g[r] && W("styleAddSelector", h, r, i, void 0, l(g, `${n.name}.attributes.${k}.default`, {}), {
|
|
80
|
+
styleSelector: k,
|
|
81
|
+
componentType: i === "element" ? b : void 0
|
|
72
82
|
});
|
|
73
83
|
}, [
|
|
74
84
|
W,
|
|
75
|
-
|
|
85
|
+
b,
|
|
86
|
+
h,
|
|
76
87
|
g,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
D?.(void 0);
|
|
88
|
+
k
|
|
89
|
+
]), Fe = a((e) => {
|
|
90
|
+
if (!e || _ && _ === e.name) {
|
|
91
|
+
E?.(void 0);
|
|
82
92
|
return;
|
|
83
93
|
}
|
|
84
|
-
|
|
85
|
-
}, [
|
|
86
|
-
|
|
87
|
-
|
|
94
|
+
E?.(e.name);
|
|
95
|
+
}, [E, _]), Ie = a((e) => {
|
|
96
|
+
v && W("schemaUpdateElement", he(v, (t) => {
|
|
97
|
+
me(t, `definition.styleSelectors.${k}`, e);
|
|
88
98
|
}));
|
|
89
99
|
}, [
|
|
90
|
-
|
|
100
|
+
v,
|
|
91
101
|
W,
|
|
92
|
-
|
|
93
|
-
]),
|
|
94
|
-
W("styleRemoveSelector",
|
|
95
|
-
}, [W,
|
|
96
|
-
|
|
97
|
-
}, []),
|
|
98
|
-
|
|
99
|
-
}, []),
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
e
|
|
104
|
-
|
|
102
|
+
k
|
|
103
|
+
]), Le = a((e) => {
|
|
104
|
+
W("styleRemoveSelector", h, e.name);
|
|
105
|
+
}, [W, h]), Re = a(() => U((e) => !e), [U]), ze = a(() => {
|
|
106
|
+
A("base"), P(void 0), M(void 0), I(void 0), R(void 0), B(void 0);
|
|
107
|
+
}, []), Be = a((e) => O(e), []), Ve = a((e) => {
|
|
108
|
+
A(e);
|
|
109
|
+
}, []), He = a((e) => P(e?.value), []), Ue = a((e) => {
|
|
110
|
+
I(e?.value), P(void 0), M(void 0), R(void 0), B(void 0);
|
|
111
|
+
}, []), We = a((e) => R(e?.value), []), Ge = a((e) => {
|
|
112
|
+
let t = e ? ge(e.value) : void 0;
|
|
113
|
+
(!e || t) && (B(t), t && (M(void 0), I(void 0)));
|
|
114
|
+
}, []), Ke = a((e) => {
|
|
115
|
+
e.value === z && (B(void 0), P(void 0)), K?.attributes[k]?.conditions?.[e.value] && W("styleUpdateSelector", h, K.name, void 0, void 0, {
|
|
116
|
+
styleSelector: k,
|
|
105
117
|
styleCondition: e.value,
|
|
106
118
|
componentType: K.componentType
|
|
107
119
|
});
|
|
108
120
|
}, [
|
|
109
121
|
W,
|
|
110
|
-
|
|
122
|
+
h,
|
|
111
123
|
K,
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
]),
|
|
115
|
-
e.value ===
|
|
116
|
-
styleSelector:
|
|
124
|
+
z,
|
|
125
|
+
k
|
|
126
|
+
]), qe = a((e) => {
|
|
127
|
+
e.value === F && (I(void 0), P(void 0), M(void 0)), K?.attributes[k]?.ancestors?.[e.value] && W("styleUpdateSelector", h, K.name, void 0, void 0, {
|
|
128
|
+
styleSelector: k,
|
|
117
129
|
styleAncestor: e.value,
|
|
118
130
|
componentType: K.componentType
|
|
119
131
|
});
|
|
120
132
|
}, [
|
|
121
133
|
W,
|
|
122
|
-
|
|
134
|
+
h,
|
|
123
135
|
K,
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
]),
|
|
127
|
-
|
|
128
|
-
}, []),
|
|
136
|
+
F,
|
|
137
|
+
k
|
|
138
|
+
]), Je = a((e) => {
|
|
139
|
+
I(e.ancestor), M(e.variant), P(e.state), R(void 0), B(void 0);
|
|
140
|
+
}, []), Ye = a((e) => {
|
|
129
141
|
if (!K) return;
|
|
130
142
|
let { ancestor: t, state: n, variant: r } = e;
|
|
131
|
-
t ===
|
|
132
|
-
styleSelector:
|
|
143
|
+
t === F && n === N && r === j && (P(void 0), M(void 0)), W("styleUpdateSelector", h, K.name, void 0, n || r ? void 0 : {}, {
|
|
144
|
+
styleSelector: k,
|
|
133
145
|
styleAncestor: t,
|
|
134
146
|
styleState: n,
|
|
135
147
|
styleVariant: r,
|
|
@@ -137,16 +149,16 @@ var g = ({ displayMode: g, selectors: _, value: v, element: y, mode: b = "elemen
|
|
|
137
149
|
});
|
|
138
150
|
}, [
|
|
139
151
|
W,
|
|
140
|
-
|
|
152
|
+
h,
|
|
141
153
|
K,
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
]),
|
|
154
|
+
F,
|
|
155
|
+
k,
|
|
156
|
+
N,
|
|
157
|
+
j
|
|
158
|
+
]), Xe = a(() => {
|
|
147
159
|
if (K) {
|
|
148
|
-
|
|
149
|
-
for (let e of i(
|
|
160
|
+
F && X.has(F) && (I(void 0), P(void 0), M(void 0));
|
|
161
|
+
for (let e of i(H, K.name, X)) W("styleUpdateSelector", e.displayMode, K.name, void 0, void 0, {
|
|
150
162
|
styleSelector: e.styleSelector,
|
|
151
163
|
styleAncestor: e.styleAncestor,
|
|
152
164
|
componentType: K.componentType
|
|
@@ -154,167 +166,181 @@ var g = ({ displayMode: g, selectors: _, value: v, element: y, mode: b = "elemen
|
|
|
154
166
|
}
|
|
155
167
|
}, [
|
|
156
168
|
W,
|
|
157
|
-
|
|
169
|
+
H,
|
|
158
170
|
K,
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
]),
|
|
162
|
-
|
|
163
|
-
}, []),
|
|
164
|
-
|
|
165
|
-
styleSelector:
|
|
171
|
+
F,
|
|
172
|
+
X
|
|
173
|
+
]), Ze = a((e) => {
|
|
174
|
+
M(e?.value), e && B(void 0);
|
|
175
|
+
}, []), Qe = a((e) => {
|
|
176
|
+
D?.(e.value), N && P(void 0), e.value === j && M(void 0), W("styleUpdateSelector", h, K?.name, void 0, void 0, {
|
|
177
|
+
styleSelector: k,
|
|
166
178
|
styleVariant: e.value,
|
|
167
|
-
styleAncestor:
|
|
179
|
+
styleAncestor: F,
|
|
168
180
|
componentType: K?.componentType
|
|
169
181
|
});
|
|
170
182
|
}, [
|
|
171
183
|
W,
|
|
172
|
-
|
|
173
|
-
|
|
184
|
+
h,
|
|
185
|
+
D,
|
|
174
186
|
K?.componentType,
|
|
175
187
|
K?.name,
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
]), $ =
|
|
181
|
-
return /* @__PURE__ */
|
|
188
|
+
k,
|
|
189
|
+
N,
|
|
190
|
+
j,
|
|
191
|
+
F
|
|
192
|
+
]), $ = T || w || !!S?.length || !!C?.length;
|
|
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
|
-
|
|
198
|
+
y === "element" && /* @__PURE__ */ u(ae, {
|
|
187
199
|
className: "min-h-0 w-full",
|
|
188
200
|
value: G,
|
|
189
|
-
selectors:
|
|
201
|
+
selectors: g,
|
|
190
202
|
selector: K,
|
|
191
|
-
componentType:
|
|
192
|
-
onAdd:
|
|
193
|
-
onChange:
|
|
194
|
-
onRemove:
|
|
195
|
-
onSelectorSelected:
|
|
203
|
+
componentType: b,
|
|
204
|
+
onAdd: Pe,
|
|
205
|
+
onChange: Ie,
|
|
206
|
+
onRemove: Le,
|
|
207
|
+
onSelectorSelected: Fe
|
|
196
208
|
}),
|
|
197
|
-
$ && /* @__PURE__ */
|
|
198
|
-
className:
|
|
209
|
+
$ && /* @__PURE__ */ d("div", {
|
|
210
|
+
className: ve("flex w-full items-center gap-2", { "mt-2": y === "manager" }),
|
|
199
211
|
children: [
|
|
200
|
-
!!
|
|
212
|
+
!!C?.length && /* @__PURE__ */ u(p, {
|
|
201
213
|
className: "grow basis-0",
|
|
202
214
|
size: "xs",
|
|
203
|
-
value:
|
|
204
|
-
onChange:
|
|
205
|
-
children:
|
|
215
|
+
value: Ce,
|
|
216
|
+
onChange: Be,
|
|
217
|
+
children: C.map((e) => /* @__PURE__ */ u("option", {
|
|
206
218
|
value: e,
|
|
207
219
|
children: e
|
|
208
220
|
}, e))
|
|
209
221
|
}),
|
|
210
|
-
|
|
222
|
+
Se && S && S.length > 1 && /* @__PURE__ */ u(p, {
|
|
211
223
|
className: "grow basis-0",
|
|
212
224
|
size: "xs",
|
|
213
|
-
onChange:
|
|
214
|
-
value:
|
|
215
|
-
children:
|
|
225
|
+
onChange: Ve,
|
|
226
|
+
value: k,
|
|
227
|
+
children: S.map((e) => /* @__PURE__ */ u("option", {
|
|
216
228
|
value: e,
|
|
217
229
|
children: e
|
|
218
230
|
}, e))
|
|
219
231
|
}),
|
|
220
|
-
|
|
232
|
+
T && !je && /* @__PURE__ */ u("div", {
|
|
221
233
|
className: "grow basis-0",
|
|
222
|
-
children: /* @__PURE__ */
|
|
234
|
+
children: /* @__PURE__ */ u(m, {
|
|
223
235
|
className: "grow basis-0",
|
|
224
|
-
value:
|
|
225
|
-
options:
|
|
236
|
+
value: j,
|
|
237
|
+
options: Oe,
|
|
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: Ze,
|
|
244
|
+
onRemove: Qe
|
|
233
245
|
})
|
|
234
246
|
}),
|
|
235
|
-
|
|
247
|
+
w && /* @__PURE__ */ u("div", {
|
|
236
248
|
className: "grow basis-0",
|
|
237
|
-
children: /* @__PURE__ */
|
|
249
|
+
children: /* @__PURE__ */ u(m, {
|
|
238
250
|
className: "grow basis-0",
|
|
239
|
-
value:
|
|
251
|
+
value: N,
|
|
240
252
|
options: e,
|
|
241
253
|
placeholder: "State",
|
|
242
254
|
size: "xs",
|
|
243
255
|
clearable: !0,
|
|
244
|
-
onChange:
|
|
256
|
+
onChange: He
|
|
245
257
|
})
|
|
258
|
+
}),
|
|
259
|
+
w && /* @__PURE__ */ u(ye, {
|
|
260
|
+
className: ve("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 : Re
|
|
246
267
|
})
|
|
247
268
|
]
|
|
248
269
|
}),
|
|
249
|
-
$ &&
|
|
270
|
+
$ && w && Q && !!Y.length && /* @__PURE__ */ u(m, {
|
|
250
271
|
className: "w-full",
|
|
251
|
-
value:
|
|
272
|
+
value: F,
|
|
252
273
|
options: Y,
|
|
253
|
-
placeholder:
|
|
274
|
+
placeholder: De,
|
|
254
275
|
size: "xs",
|
|
255
276
|
clearable: !0,
|
|
256
277
|
allowRemoveOptions: !0,
|
|
257
|
-
onChange:
|
|
258
|
-
onRemove:
|
|
278
|
+
onChange: Ue,
|
|
279
|
+
onRemove: qe
|
|
259
280
|
}),
|
|
260
|
-
$ &&
|
|
281
|
+
$ && w && Q && !F && /* @__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(m, {
|
|
265
286
|
className: "grow basis-0",
|
|
266
|
-
value:
|
|
267
|
-
options:
|
|
287
|
+
value: L,
|
|
288
|
+
options: ke,
|
|
268
289
|
placeholder: "Pseudo-element",
|
|
269
290
|
size: "xs",
|
|
270
291
|
clearable: !0,
|
|
271
|
-
onChange:
|
|
292
|
+
onChange: We
|
|
272
293
|
})
|
|
273
|
-
}), /* @__PURE__ */
|
|
294
|
+
}), /* @__PURE__ */ u("div", {
|
|
274
295
|
className: "grow basis-0",
|
|
275
|
-
children: /* @__PURE__ */
|
|
296
|
+
children: /* @__PURE__ */ u(m, {
|
|
276
297
|
className: "grow basis-0",
|
|
277
|
-
value:
|
|
278
|
-
options:
|
|
298
|
+
value: z,
|
|
299
|
+
options: Ae,
|
|
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: Ge,
|
|
306
|
+
onRemove: Ke
|
|
286
307
|
})
|
|
287
308
|
})]
|
|
288
309
|
}),
|
|
289
|
-
|
|
290
|
-
conditions:
|
|
291
|
-
unused:
|
|
292
|
-
activeAncestor:
|
|
293
|
-
activeState:
|
|
294
|
-
activeVariant:
|
|
295
|
-
onSelect:
|
|
296
|
-
onRemove:
|
|
297
|
-
onRemoveUnused:
|
|
310
|
+
w && Ee.length > 0 && /* @__PURE__ */ u(oe, {
|
|
311
|
+
conditions: Ee,
|
|
312
|
+
unused: X,
|
|
313
|
+
activeAncestor: F,
|
|
314
|
+
activeState: N,
|
|
315
|
+
activeVariant: j,
|
|
316
|
+
onSelect: Je,
|
|
317
|
+
onRemove: Ye,
|
|
318
|
+
onRemoveUnused: Xe
|
|
319
|
+
}),
|
|
320
|
+
Me.length > 0 && /* @__PURE__ */ u(se, {
|
|
321
|
+
selectorName: _,
|
|
322
|
+
parts: Me,
|
|
323
|
+
onReset: ze
|
|
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:
|
|
304
|
-
componentType:
|
|
328
|
+
children: /* @__PURE__ */ u(ce, {
|
|
329
|
+
selectors: Te,
|
|
330
|
+
componentType: b,
|
|
305
331
|
selector: K,
|
|
306
|
-
styleSelector:
|
|
307
|
-
styleState:
|
|
308
|
-
styleVariant:
|
|
309
|
-
styleAncestor:
|
|
310
|
-
stylePseudo:
|
|
311
|
-
styleCondition:
|
|
312
|
-
element:
|
|
313
|
-
displayMode:
|
|
314
|
-
mode:
|
|
332
|
+
styleSelector: k,
|
|
333
|
+
styleState: N,
|
|
334
|
+
styleVariant: j,
|
|
335
|
+
styleAncestor: F,
|
|
336
|
+
stylePseudo: L,
|
|
337
|
+
styleCondition: z,
|
|
338
|
+
element: v,
|
|
339
|
+
displayMode: h,
|
|
340
|
+
mode: y
|
|
315
341
|
})
|
|
316
342
|
})]
|
|
317
343
|
});
|
|
318
344
|
};
|
|
319
345
|
//#endregion
|
|
320
|
-
export {
|
|
346
|
+
export { h as default };
|