@plitzi/sdk-style 0.39.3 → 0.39.6
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 +30 -0
- package/dist/StyleMap/StyleMap.d.ts +9 -4
- package/dist/StyleMap/StyleMap.mjs +4 -4
- package/dist/StyleMap/helpers/utils.mjs +1 -1
- package/dist/StyleReducer.d.ts +4 -3
- package/dist/builder/StyleAdvanceEditor.mjs +4 -3
- package/dist/builder/components/InputEasing/Curve.mjs +1 -1
- package/dist/builder/components/InputEasing/Grid.mjs +3 -3
- package/dist/builder/components/InputEasing/InputEasing.mjs +2 -2
- package/dist/builder/components/InputEasing/InputEasingButton.mjs +1 -1
- package/dist/builder/components/InputEasing/InputEasingList.mjs +4 -4
- package/dist/builder/components/Selector/Selector.d.ts +3 -1
- package/dist/builder/components/Selector/Selector.mjs +153 -132
- package/dist/builder/components/Selector/SelectorItem/ItemOptions.mjs +4 -3
- package/dist/builder/components/Selector/SelectorItem/SelectorItem.d.ts +6 -1
- package/dist/builder/components/Selector/SelectorItem/SelectorItem.mjs +51 -39
- package/dist/builder/components/Selector/SelectorItem/helpers.d.ts +1 -1
- package/dist/builder/components/Selector/SelectorItem/helpers.mjs +1 -1
- package/dist/builder/components/Selector/SelectorSuggestions/SelectorSuggestions.d.ts +6 -3
- package/dist/builder/components/Selector/SelectorSuggestions/SelectorSuggestions.mjs +56 -18
- package/dist/builder/components/Selector/SelectorSuggestions/helpers.d.ts +8 -0
- package/dist/builder/components/Selector/SelectorSuggestions/helpers.mjs +9 -0
- package/dist/builder/components/Selector/SelectorSuggestions/index.d.ts +1 -0
- package/dist/builder/components/Selector/SelectorSuggestions/index.mjs +3 -2
- package/dist/builder/components/StyleInspector/Inspector.mjs +1 -1
- package/dist/builder/components/StyleInspector/StyleInspector.mjs +4 -3
- package/dist/builder/components/StyleInspector/StyleInspectorProvider.mjs +1 -1
- package/dist/builder/components/StyleInspector/categories/Background/Background.mjs +1 -1
- package/dist/builder/components/StyleInspector/categories/Background/components/BackgroundLayer/BackgroundLayer.mjs +6 -6
- package/dist/builder/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopEditor.mjs +3 -3
- package/dist/builder/components/StyleInspector/categories/Background/components/LayerGroup/LayerGroup.mjs +1 -1
- package/dist/builder/components/StyleInspector/categories/Background/modes/RawMode.mjs +1 -1
- package/dist/builder/components/StyleInspector/categories/Effects/Filters/FilterItem.mjs +1 -1
- package/dist/builder/components/StyleInspector/categories/Effects/Transition/TransitionEasing.mjs +4 -4
- package/dist/builder/components/StyleInspector/categories/Effects/Transition/TransitionItem.mjs +1 -1
- package/dist/builder/components/StyleInspector/categories/Position/PositionAdvanced.mjs +5 -5
- package/dist/builder/components/StyleInspector/categories/Spacing/SpacingEditor.mjs +1 -1
- package/dist/builder/components/StyleInspector/categories/Spacing/SpacingMargin.mjs +1 -1
- package/dist/builder/components/StyleInspector/categories/Spacing/SpacingPadding.mjs +2 -2
- package/dist/builder/components/StyleInspector/components/AncestorRules/AncestorRuleChip.mjs +1 -1
- package/dist/builder/components/StyleInspector/components/AncestorRules/AncestorRules.mjs +1 -1
- package/dist/builder/components/StyleInspector/components/CategoryContainer/CategoryContainer.mjs +5 -5
- package/dist/builder/components/StyleInspector/components/CategoryOption/categoryTypes/OptionIconGroup.mjs +1 -1
- package/dist/builder/components/StyleInspector/components/InspectorFooter/InspectorFooter.mjs +3 -3
- package/dist/builder/components/StyleInspector/components/InspectorLabel/InspectorLabel.mjs +2 -2
- package/dist/builder/components/StyleInspector/components/InspectorSearch/InspectorSearch.mjs +1 -1
- package/dist/builder/components/StyleInspector/components/ShadowItem/ShadowItem.mjs +1 -1
- package/dist/builder/components/StyleInspector/components/TargetSummary/TargetSummary.mjs +2 -2
- package/dist/builder/components/StyleInspector/components/ValueList/ValueList.mjs +1 -1
- package/dist/builder/components/StyleInspector/components/ValueListItem/ValueListItem.mjs +6 -6
- package/dist/builder/components/StyleManager/ManagerSelector.mjs +272 -116
- package/dist/builder/components/StyleManager/StyleManager.mjs +75 -35
- package/dist/builder/components/StyleManager/StyleSelectorTag.d.ts +5 -1
- package/dist/builder/components/StyleManager/StyleSelectorTag.mjs +81 -63
- package/dist/builder/hooks/useWindowedList.d.ts +19 -0
- package/dist/builder/hooks/useWindowedList.mjs +38 -0
- package/dist/helpers/processSelectorVariables.mjs +12 -13
- package/package.json +8 -8
- package/dist/builder/components/Selector/SelectorSuggestions/SuggestionsCreator.d.ts +0 -7
- package/dist/builder/components/Selector/SelectorSuggestions/SuggestionsCreator.mjs +0 -19
- package/dist/builder/components/Selector/SelectorSuggestions/SuggestionsList.d.ts +0 -7
- package/dist/builder/components/Selector/SelectorSuggestions/SuggestionsList.mjs +0 -24
|
@@ -3,6 +3,11 @@ import { TagType } from '@plitzi/sdk-shared';
|
|
|
3
3
|
export type SelectorItemProps = {
|
|
4
4
|
className?: string;
|
|
5
5
|
selector?: string;
|
|
6
|
+
/**
|
|
7
|
+
* What the chip reads as instead of the class's name, when the name says nothing to a person — a class the builder
|
|
8
|
+
* named after its element (`container-2f16`) reads as the element's label. Double-clicking still edits the name.
|
|
9
|
+
*/
|
|
10
|
+
label?: string;
|
|
6
11
|
type?: TagType;
|
|
7
12
|
editable?: boolean;
|
|
8
13
|
active?: boolean;
|
|
@@ -11,5 +16,5 @@ export type SelectorItemProps = {
|
|
|
11
16
|
onChange?: (selector: SelectorValue) => void;
|
|
12
17
|
onAction?: (action: 'duplicate' | 'remove' | 'delete', data?: SelectorValue) => void;
|
|
13
18
|
};
|
|
14
|
-
declare const SelectorItem: ({ className, selector, type, editable, active, readOnly, onClick, onChange, onAction }: SelectorItemProps) => import('react').JSX.Element;
|
|
19
|
+
declare const SelectorItem: ({ className, selector, label, type, editable, active, readOnly, onClick, onChange, onAction }: SelectorItemProps) => import('react').JSX.Element;
|
|
15
20
|
export default SelectorItem;
|
|
@@ -1,49 +1,61 @@
|
|
|
1
1
|
import { selectorFormatter as e } from "../SelectorHelper.mjs";
|
|
2
2
|
import t from "./ItemOptions.mjs";
|
|
3
|
-
import { useCallback as n } from "react";
|
|
4
|
-
import { jsx as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
3
|
+
import { useCallback as n, useState as r } from "react";
|
|
4
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
|
+
import o from "clsx";
|
|
6
|
+
import s from "@plitzi/plitzi-ui/ContentEditable";
|
|
7
7
|
// src/builder/components/Selector/SelectorItem/SelectorItem.tsx
|
|
8
|
-
var
|
|
9
|
-
let
|
|
10
|
-
e.preventDefault(),
|
|
11
|
-
name:
|
|
12
|
-
type:
|
|
8
|
+
var c = ({ className: c = "", selector: l = "", label: u, type: d = "class", editable: f = !0, active: p = !1, readOnly: m = !1, onClick: h, onChange: g, onAction: _ }) => {
|
|
9
|
+
let v = n((e) => {
|
|
10
|
+
e.preventDefault(), m || e.stopPropagation(), h?.({
|
|
11
|
+
name: l,
|
|
12
|
+
type: d
|
|
13
13
|
});
|
|
14
14
|
}, [
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
]),
|
|
20
|
-
|
|
15
|
+
h,
|
|
16
|
+
m,
|
|
17
|
+
l,
|
|
18
|
+
d
|
|
19
|
+
]), [y, b] = r(!1), x = y || !u ? l : u, S = n(() => b(!0), []), C = n(() => b(!1), []), w = n((t) => {
|
|
20
|
+
g?.({
|
|
21
21
|
name: e(t),
|
|
22
|
-
type:
|
|
22
|
+
type: d
|
|
23
23
|
});
|
|
24
|
-
}, [
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
-
className:
|
|
27
|
-
"bg-primary-600 text-white":
|
|
28
|
-
"bg-primary-500/
|
|
29
|
-
"bg-
|
|
30
|
-
"max-w-full min-w-0": !
|
|
24
|
+
}, [d, g]);
|
|
25
|
+
return /* @__PURE__ */ a("div", {
|
|
26
|
+
className: o("relative flex h-6 cursor-pointer items-center gap-1 rounded px-1.5 select-none", c, {
|
|
27
|
+
"bg-primary-600 text-white shadow-sm": d !== "element" && p,
|
|
28
|
+
"bg-primary-500/15 text-primary-800 ring-primary-500/40 dark:text-primary-200 ring-1": d === "element" && p,
|
|
29
|
+
"bg-ui-raised text-ui-fg ring-ui-line hover:bg-ui-hover ring-1": !p,
|
|
30
|
+
"max-w-full min-w-0": !f
|
|
31
31
|
}),
|
|
32
|
-
onClick:
|
|
33
|
-
title: `${
|
|
34
|
-
children: [
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
32
|
+
onClick: v,
|
|
33
|
+
title: `${d}: ${l}`,
|
|
34
|
+
children: [
|
|
35
|
+
d === "element" && /* @__PURE__ */ i("i", {
|
|
36
|
+
className: "fa-solid fa-cube text-[9px] opacity-70",
|
|
37
|
+
"aria-hidden": !0
|
|
38
|
+
}),
|
|
39
|
+
/* @__PURE__ */ a("div", {
|
|
40
|
+
className: "flex min-w-0 grow basis-0 font-mono text-[11px]",
|
|
41
|
+
children: [f && /* @__PURE__ */ i(s, {
|
|
42
|
+
className: "inline text-nowrap focus-visible:m-[1px] focus-visible:px-1 focus-visible:outline-1 focus-visible:outline-dashed",
|
|
43
|
+
value: x,
|
|
44
|
+
openMode: "doubleClick",
|
|
45
|
+
onChange: w,
|
|
46
|
+
onEditOpen: S,
|
|
47
|
+
onEditClose: C
|
|
48
|
+
}), !f && /* @__PURE__ */ i("span", {
|
|
49
|
+
className: "truncate",
|
|
50
|
+
children: x
|
|
51
|
+
})]
|
|
52
|
+
}),
|
|
53
|
+
f && d !== "element" && /* @__PURE__ */ i(t, {
|
|
54
|
+
selector: l,
|
|
55
|
+
type: d,
|
|
56
|
+
onAction: _
|
|
57
|
+
})
|
|
58
|
+
]
|
|
47
59
|
});
|
|
48
60
|
};
|
|
49
|
-
export {
|
|
61
|
+
export { c as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** An entry of a class's actions menu: a full-width button, highlighted under the pointer and the keyboard alike. */
|
|
2
|
-
export declare const ITEM_CLASS = "w-full cursor-pointer rounded px-2 py-1.5 text-left hover:bg-
|
|
2
|
+
export declare const ITEM_CLASS = "w-full cursor-pointer rounded px-2 py-1.5 text-left hover:bg-ui-hover focus-visible:bg-ui-hover focus-visible:outline-none";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// src/builder/components/Selector/SelectorItem/helpers.ts
|
|
2
|
-
var e = "w-full cursor-pointer rounded px-2 py-1.5 text-left hover:bg-
|
|
2
|
+
var e = "w-full cursor-pointer rounded px-2 py-1.5 text-left hover:bg-ui-hover focus-visible:bg-ui-hover focus-visible:outline-none";
|
|
3
3
|
export { e as ITEM_CLASS };
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import { Suggestions } from './helpers';
|
|
1
2
|
import { SelectorValue } from '../Selector';
|
|
2
3
|
export type SelectorSuggestionsProps = {
|
|
3
|
-
|
|
4
|
+
suggestions: Suggestions;
|
|
5
|
+
/** The option the keys are on: 0 is the class to create when there is one, then the list. */
|
|
6
|
+
highlighted?: number;
|
|
4
7
|
onSelect?: (tag: SelectorValue) => void;
|
|
5
8
|
onCreate?: (tag: SelectorValue) => void;
|
|
6
|
-
selectors?: SelectorValue[];
|
|
7
9
|
};
|
|
8
|
-
|
|
10
|
+
/** The classes to add, filtered by what is typed, and the one to create when nothing has that name. */
|
|
11
|
+
declare const SelectorSuggestions: ({ suggestions, highlighted, onSelect, onCreate }: SelectorSuggestionsProps) => import('react').JSX.Element;
|
|
9
12
|
export default SelectorSuggestions;
|
|
@@ -1,22 +1,60 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import t from "
|
|
3
|
-
import
|
|
4
|
-
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
1
|
+
import { useCallback as e } from "react";
|
|
2
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
import r from "clsx";
|
|
5
4
|
// src/builder/components/Selector/SelectorSuggestions/SelectorSuggestions.tsx
|
|
6
|
-
var
|
|
7
|
-
let
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
var i = "flex w-full cursor-pointer items-center gap-2 rounded px-2 py-1 text-left text-xs text-ui-fg", a = ({ suggestions: a, highlighted: o = -1, onSelect: s, onCreate: c }) => {
|
|
6
|
+
let { creates: l, list: u } = a, d = +!!l, f = e(() => {
|
|
7
|
+
l && c?.({
|
|
8
|
+
name: l,
|
|
9
|
+
type: "class"
|
|
10
|
+
});
|
|
10
11
|
}, [l, c]);
|
|
11
|
-
return /* @__PURE__ */
|
|
12
|
-
className: "flex w-full flex-col gap-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
return /* @__PURE__ */ n("div", {
|
|
13
|
+
className: "border-ui-line bg-ui-overlay flex max-h-72 w-full flex-col gap-0.5 overflow-y-auto rounded-md border p-1 shadow-lg",
|
|
14
|
+
role: "listbox",
|
|
15
|
+
"aria-label": "Classes",
|
|
16
|
+
children: [
|
|
17
|
+
l && /* @__PURE__ */ n("button", {
|
|
18
|
+
type: "button",
|
|
19
|
+
role: "option",
|
|
20
|
+
"aria-selected": o === 0,
|
|
21
|
+
className: r(i, {
|
|
22
|
+
"bg-primary-50 dark:bg-primary-400/15": o === 0,
|
|
23
|
+
"hover:bg-ui-hover": o !== 0
|
|
24
|
+
}),
|
|
25
|
+
onMouseDown: f,
|
|
26
|
+
children: [/* @__PURE__ */ t("i", { className: "fa-solid fa-plus text-primary-600 dark:text-primary-300 w-3 text-[10px]" }), /* @__PURE__ */ n("span", { children: ["Create class ", /* @__PURE__ */ n("b", {
|
|
27
|
+
className: "font-mono",
|
|
28
|
+
children: [".", l]
|
|
29
|
+
})] })]
|
|
30
|
+
}),
|
|
31
|
+
u.length > 0 && /* @__PURE__ */ t("span", {
|
|
32
|
+
className: "text-ui-fg-subtle px-2 pt-1 pb-0.5 text-[10px] font-semibold tracking-wider uppercase",
|
|
33
|
+
children: "Classes"
|
|
34
|
+
}),
|
|
35
|
+
u.map((e, a) => /* @__PURE__ */ n("button", {
|
|
36
|
+
type: "button",
|
|
37
|
+
role: "option",
|
|
38
|
+
"aria-selected": o === a + d,
|
|
39
|
+
className: r(i, {
|
|
40
|
+
"bg-primary-50 dark:bg-primary-400/15": o === a + d,
|
|
41
|
+
"hover:bg-ui-hover": o !== a + d
|
|
42
|
+
}),
|
|
43
|
+
title: `${e.type}: ${e.name}`,
|
|
44
|
+
onMouseDown: () => s?.(e),
|
|
45
|
+
children: [/* @__PURE__ */ t("span", {
|
|
46
|
+
className: "text-ui-fg-subtle w-3 text-center font-mono font-bold",
|
|
47
|
+
children: "."
|
|
48
|
+
}), /* @__PURE__ */ t("span", {
|
|
49
|
+
className: "truncate font-mono",
|
|
50
|
+
children: e.name
|
|
51
|
+
})]
|
|
52
|
+
}, e.name)),
|
|
53
|
+
!l && u.length === 0 && /* @__PURE__ */ t("span", {
|
|
54
|
+
className: "text-ui-fg-subtle px-2 py-3 text-center text-xs",
|
|
55
|
+
children: "No other class in the space. Type a name to create one."
|
|
56
|
+
})
|
|
57
|
+
]
|
|
20
58
|
});
|
|
21
59
|
};
|
|
22
|
-
export {
|
|
60
|
+
export { a as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SelectorValue } from '../Selector';
|
|
2
|
+
/** What the list offers for what is typed: a class to create — none when one of that name is offered — and the rest. */
|
|
3
|
+
export type Suggestions = {
|
|
4
|
+
creates?: string;
|
|
5
|
+
list: SelectorValue[];
|
|
6
|
+
};
|
|
7
|
+
/** The classes an element can take for what is typed, the new one first: what the list shows and the keys move through. */
|
|
8
|
+
export declare const suggestionsFor: (typed: string, available: readonly SelectorValue[]) => Suggestions;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// src/builder/components/Selector/SelectorSuggestions/helpers.ts
|
|
2
|
+
var e = (e, t) => {
|
|
3
|
+
let n = e.trim().toLowerCase(), r = n ? t.filter((e) => e.type === "class" && e.name.toLowerCase().includes(n)) : [...t], i = t.some((t) => t.name === e.trim());
|
|
4
|
+
return {
|
|
5
|
+
creates: n && !i ? e.trim() : void 0,
|
|
6
|
+
list: r
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export { e as suggestionsFor };
|
|
@@ -118,7 +118,7 @@ var T = ({ selectors: T, componentType: E, componentSubType: ue, selector: D, st
|
|
|
118
118
|
onChange: de
|
|
119
119
|
}),
|
|
120
120
|
ge && /* @__PURE__ */ x("p", {
|
|
121
|
-
className: "m-0 px-3 py-4 text-xs
|
|
121
|
+
className: "text-ui-fg-subtle m-0 px-3 py-4 text-xs",
|
|
122
122
|
children: [
|
|
123
123
|
"No property here matches “",
|
|
124
124
|
W.trim(),
|
|
@@ -184,7 +184,7 @@ var h = ({ displayMode: h, selectors: g, value: _, element: v, mode: y = "elemen
|
|
|
184
184
|
N,
|
|
185
185
|
j,
|
|
186
186
|
F
|
|
187
|
-
]), $ = T || w || !!S?.length || !!C?.length;
|
|
187
|
+
]), $e = o(() => v?.definition.label ? { [v.id]: v.definition.label } : void 0, [v?.id, v?.definition.label]), $ = T || w || !!S?.length || !!C?.length;
|
|
188
188
|
return /* @__PURE__ */ u("div", {
|
|
189
189
|
className: "flex w-full grow flex-col gap-2",
|
|
190
190
|
children: [/* @__PURE__ */ u("div", {
|
|
@@ -196,6 +196,7 @@ var h = ({ displayMode: h, selectors: g, value: _, element: v, mode: y = "elemen
|
|
|
196
196
|
selectors: g,
|
|
197
197
|
selector: K,
|
|
198
198
|
componentType: b,
|
|
199
|
+
labels: $e,
|
|
199
200
|
onAdd: Pe,
|
|
200
201
|
onChange: Ie,
|
|
201
202
|
onRemove: Le,
|
|
@@ -254,7 +255,7 @@ var h = ({ displayMode: h, selectors: g, value: _, element: v, mode: y = "elemen
|
|
|
254
255
|
w && /* @__PURE__ */ l(ye, {
|
|
255
256
|
className: ve("shrink-0 cursor-pointer rounded-sm p-1 text-xs", {
|
|
256
257
|
"bg-primary-500/15 text-primary-600 dark:text-primary-300": Q,
|
|
257
|
-
"text-
|
|
258
|
+
"text-ui-fg-subtle hover:text-ui-fg": !Q
|
|
258
259
|
}),
|
|
259
260
|
icon: "fa-solid fa-crosshairs",
|
|
260
261
|
title: ie(Z, Q),
|
|
@@ -319,7 +320,7 @@ var h = ({ displayMode: h, selectors: g, value: _, element: v, mode: y = "elemen
|
|
|
319
320
|
})
|
|
320
321
|
]
|
|
321
322
|
}), /* @__PURE__ */ l("div", {
|
|
322
|
-
className: "flex grow basis-0 flex-col overflow-auto border-t
|
|
323
|
+
className: "border-ui-line-strong flex grow basis-0 flex-col overflow-auto border-t",
|
|
323
324
|
children: /* @__PURE__ */ l(ce, {
|
|
324
325
|
selectors: Te,
|
|
325
326
|
componentType: b,
|
|
@@ -83,7 +83,7 @@ var E = ["background-color"], D = v(({ replaceTokens: v = !1, isCollapsed: D = !
|
|
|
83
83
|
addLabel: "Add a layer — the first one is drawn on top",
|
|
84
84
|
onAdd: G,
|
|
85
85
|
children: [!L.length && /* @__PURE__ */ C("p", {
|
|
86
|
-
className: "m-0 rounded-md border border-dashed
|
|
86
|
+
className: "border-ui-line-strong text-ui-fg-subtle m-0 rounded-md border border-dashed px-3 py-2.5 text-center text-xs",
|
|
87
87
|
children: "No layers. Add one for a gradient or an image."
|
|
88
88
|
}), L.length > 0 && L.map((e, n) => /* @__PURE__ */ C(t, {
|
|
89
89
|
index: n,
|
|
@@ -51,7 +51,7 @@ var k = b(({ layer: b, index: k, expanded: A, onExpand: j, onChange: M, onRemove
|
|
|
51
51
|
className: D("rounded-md border transition-colors duration-150", {
|
|
52
52
|
"border-primary-500 bg-primary-500/5 dark:border-primary-400 dark:bg-primary-400/10": F,
|
|
53
53
|
"border-primary-500/60 dark:border-primary-400/60": A && !F,
|
|
54
|
-
"border-
|
|
54
|
+
"border-ui-line": !A && !F
|
|
55
55
|
}),
|
|
56
56
|
onDragOver: q,
|
|
57
57
|
onDragLeave: J,
|
|
@@ -66,7 +66,7 @@ var k = b(({ layer: b, index: k, expanded: A, onExpand: j, onChange: M, onRemove
|
|
|
66
66
|
children: [
|
|
67
67
|
/* @__PURE__ */ w("span", {
|
|
68
68
|
draggable: !0,
|
|
69
|
-
className: "flex h-5 w-4 cursor-grab items-center justify-center
|
|
69
|
+
className: "text-ui-fg-subtle hover:text-ui-fg flex h-5 w-4 cursor-grab items-center justify-center active:cursor-grabbing",
|
|
70
70
|
title: "Drag to reorder — the first layer is drawn on top",
|
|
71
71
|
onClick: U,
|
|
72
72
|
onDragStart: G,
|
|
@@ -79,17 +79,17 @@ var k = b(({ layer: b, index: k, expanded: A, onExpand: j, onChange: M, onRemove
|
|
|
79
79
|
property: "background"
|
|
80
80
|
}),
|
|
81
81
|
/* @__PURE__ */ w("span", {
|
|
82
|
-
className: "min-w-0 grow truncate text-xs
|
|
82
|
+
className: "text-ui-fg min-w-0 grow truncate text-xs",
|
|
83
83
|
title: i(b),
|
|
84
84
|
children: i(b)
|
|
85
85
|
}),
|
|
86
|
-
/* @__PURE__ */ w("i", { className: D("fa-solid text-
|
|
86
|
+
/* @__PURE__ */ w("i", { className: D("fa-solid text-ui-fg-subtle text-xs", {
|
|
87
87
|
"fa-angle-up": A,
|
|
88
88
|
"fa-angle-down": !A
|
|
89
89
|
}) }),
|
|
90
90
|
/* @__PURE__ */ w("button", {
|
|
91
91
|
type: "button",
|
|
92
|
-
className: "flex h-5 w-5 shrink-0 cursor-pointer items-center justify-center rounded
|
|
92
|
+
className: "text-ui-fg-subtle flex h-5 w-5 shrink-0 cursor-pointer items-center justify-center rounded hover:bg-red-500/10 hover:text-red-600 dark:hover:text-red-400",
|
|
93
93
|
title: "Remove layer",
|
|
94
94
|
"aria-label": "Remove layer",
|
|
95
95
|
onClick: W,
|
|
@@ -97,7 +97,7 @@ var k = b(({ layer: b, index: k, expanded: A, onExpand: j, onChange: M, onRemove
|
|
|
97
97
|
})
|
|
98
98
|
]
|
|
99
99
|
}), A && /* @__PURE__ */ T("div", {
|
|
100
|
-
className: "flex flex-col gap-4 border-t
|
|
100
|
+
className: "border-ui-line flex flex-col gap-4 border-t p-2.5",
|
|
101
101
|
children: [/* @__PURE__ */ T(y, {
|
|
102
102
|
title: X ? "Gradient" : n[b.type],
|
|
103
103
|
children: [
|
|
@@ -21,7 +21,7 @@ var i = [{
|
|
|
21
21
|
className: "flex items-center gap-1.5",
|
|
22
22
|
children: [
|
|
23
23
|
/* @__PURE__ */ e("span", {
|
|
24
|
-
className: "text-
|
|
24
|
+
className: "text-ui-fg-subtle text-xs",
|
|
25
25
|
children: "At"
|
|
26
26
|
}),
|
|
27
27
|
/* @__PURE__ */ e(r, {
|
|
@@ -36,7 +36,7 @@ var i = [{
|
|
|
36
36
|
/* @__PURE__ */ e("span", { className: "grow" }),
|
|
37
37
|
/* @__PURE__ */ e("button", {
|
|
38
38
|
type: "button",
|
|
39
|
-
className: "flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-md
|
|
39
|
+
className: "text-ui-fg-subtle hover:bg-ui-hover hover:text-ui-fg flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-md",
|
|
40
40
|
title: "Add a stop",
|
|
41
41
|
"aria-label": "Add a stop",
|
|
42
42
|
onClick: l,
|
|
@@ -44,7 +44,7 @@ var i = [{
|
|
|
44
44
|
}),
|
|
45
45
|
/* @__PURE__ */ e("button", {
|
|
46
46
|
type: "button",
|
|
47
|
-
className: "flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-md
|
|
47
|
+
className: "text-ui-fg-subtle disabled:hover:text-ui-fg flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-md hover:bg-red-500/10 hover:text-red-600 disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent dark:hover:text-red-400",
|
|
48
48
|
title: o ? "Remove this stop" : "A gradient needs two stops",
|
|
49
49
|
"aria-label": "Remove this stop",
|
|
50
50
|
disabled: !o,
|
|
@@ -3,7 +3,7 @@ import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
|
3
3
|
var n = ({ title: n, children: r }) => /* @__PURE__ */ t("div", {
|
|
4
4
|
className: "flex flex-col gap-2",
|
|
5
5
|
children: [/* @__PURE__ */ e("span", {
|
|
6
|
-
className: "text-[11px] font-semibold tracking-wide
|
|
6
|
+
className: "text-ui-fg-subtle text-[11px] font-semibold tracking-wide uppercase",
|
|
7
7
|
children: n
|
|
8
8
|
}), r]
|
|
9
9
|
});
|
|
@@ -14,7 +14,7 @@ var o = ({ layer: o, onChange: s }) => {
|
|
|
14
14
|
value: o.raw,
|
|
15
15
|
onChange: c
|
|
16
16
|
}), /* @__PURE__ */ i("p", {
|
|
17
|
-
className: "m-0 text-[11px]
|
|
17
|
+
className: "text-ui-fg-subtle m-0 text-[11px]",
|
|
18
18
|
children: "Any image CSS accepts: a token such as var(--hero-bg), image-set(…), cross-fade(…)."
|
|
19
19
|
})] });
|
|
20
20
|
};
|
|
@@ -31,7 +31,7 @@ var f = Object.entries(t), p = ({ value: p, title: m, onRemove: h, onChange: g }
|
|
|
31
31
|
value: p,
|
|
32
32
|
onChange: S
|
|
33
33
|
}), /* @__PURE__ */ u("p", {
|
|
34
|
-
className: "m-0 text-[11px]
|
|
34
|
+
className: "text-ui-fg-subtle m-0 text-[11px]",
|
|
35
35
|
children: "A function the editor has no control for, so it is edited as written."
|
|
36
36
|
})] }), _ && y && /* @__PURE__ */ d("div", {
|
|
37
37
|
className: "grid grid-cols-2 gap-2",
|
package/dist/builder/components/StyleInspector/categories/Effects/Transition/TransitionEasing.mjs
CHANGED
|
@@ -50,7 +50,7 @@ var h = r(a), g = 1600, _ = ({ value: r, onChange: _ }) => {
|
|
|
50
50
|
})
|
|
51
51
|
}), /* @__PURE__ */ p("button", {
|
|
52
52
|
type: "button",
|
|
53
|
-
className: "aria-pressed:border-primary-500 aria-pressed:text-primary-600 dark:aria-pressed:text-primary-300 flex h-7 w-7 shrink-0 cursor-pointer items-center justify-center rounded-md border
|
|
53
|
+
className: "aria-pressed:border-primary-500 aria-pressed:text-primary-600 dark:aria-pressed:text-primary-300 border-ui-line text-ui-fg-subtle hover:text-ui-fg flex h-7 w-7 shrink-0 cursor-pointer items-center justify-center rounded-md border",
|
|
54
54
|
"aria-pressed": v,
|
|
55
55
|
title: v ? "Hide the curve" : "Edit the curve",
|
|
56
56
|
"aria-label": v ? "Hide the curve" : "Edit the curve",
|
|
@@ -59,11 +59,11 @@ var h = r(a), g = 1600, _ = ({ value: r, onChange: _ }) => {
|
|
|
59
59
|
})]
|
|
60
60
|
}),
|
|
61
61
|
v && !w && /* @__PURE__ */ m("p", {
|
|
62
|
-
className: "m-0 text-[11px]
|
|
62
|
+
className: "text-ui-fg-subtle m-0 text-[11px]",
|
|
63
63
|
children: [r, " is not a curve, so there is nothing to drag. Pick a preset to start from one."]
|
|
64
64
|
}),
|
|
65
65
|
v && w && /* @__PURE__ */ m("div", {
|
|
66
|
-
className: "flex flex-col items-center gap-2 rounded-md border
|
|
66
|
+
className: "border-ui-line flex flex-col items-center gap-2 rounded-md border p-2",
|
|
67
67
|
children: [
|
|
68
68
|
/* @__PURE__ */ p(i, {
|
|
69
69
|
value: w,
|
|
@@ -75,7 +75,7 @@ var h = r(a), g = 1600, _ = ({ value: r, onChange: _ }) => {
|
|
|
75
75
|
}),
|
|
76
76
|
/* @__PURE__ */ m("button", {
|
|
77
77
|
type: "button",
|
|
78
|
-
className: "flex cursor-pointer items-center gap-1.5 text-xs
|
|
78
|
+
className: "text-ui-fg-muted hover:text-ui-fg flex cursor-pointer items-center gap-1.5 text-xs",
|
|
79
79
|
onClick: A,
|
|
80
80
|
children: [/* @__PURE__ */ p("i", { className: b ? "fa-solid fa-pause" : "fa-solid fa-play" }), b ? "Pause preview" : "Preview"]
|
|
81
81
|
}),
|
package/dist/builder/components/StyleInspector/categories/Effects/Transition/TransitionItem.mjs
CHANGED
|
@@ -34,7 +34,7 @@ var m = [{
|
|
|
34
34
|
value: h,
|
|
35
35
|
onChange: S
|
|
36
36
|
}), /* @__PURE__ */ f("p", {
|
|
37
|
-
className: "m-0 text-[11px]
|
|
37
|
+
className: "text-ui-fg-subtle m-0 text-[11px]",
|
|
38
38
|
children: "Not a single transition the editor can split into parts (a token, for one), so it is edited as written."
|
|
39
39
|
})] }),
|
|
40
40
|
v && /* @__PURE__ */ p(o, {
|
|
@@ -49,11 +49,11 @@ var i = [{
|
|
|
49
49
|
/* @__PURE__ */ r("div", {
|
|
50
50
|
className: "row-start-2 grid h-24 w-full auto-rows-fr grid-cols-3 place-items-center gap-2",
|
|
51
51
|
children: [
|
|
52
|
-
/* @__PURE__ */ n("div", { className: "col-start-2 h-full w-0.5
|
|
53
|
-
/* @__PURE__ */ n("div", { className: "row-start-2 h-0.5 w-full
|
|
54
|
-
/* @__PURE__ */ n("div", { className: "row-start-2 h-8 w-8 rounded
|
|
55
|
-
/* @__PURE__ */ n("div", { className: "row-start-2 h-0.5 w-full
|
|
56
|
-
/* @__PURE__ */ n("div", { className: "col-start-2 row-start-3 h-full w-0.5
|
|
52
|
+
/* @__PURE__ */ n("div", { className: "bg-ui-line-strong col-start-2 h-full w-0.5" }),
|
|
53
|
+
/* @__PURE__ */ n("div", { className: "bg-ui-line-strong row-start-2 h-0.5 w-full" }),
|
|
54
|
+
/* @__PURE__ */ n("div", { className: "bg-ui-line-strong row-start-2 h-8 w-8 rounded" }),
|
|
55
|
+
/* @__PURE__ */ n("div", { className: "bg-ui-line-strong row-start-2 h-0.5 w-full" }),
|
|
56
|
+
/* @__PURE__ */ n("div", { className: "bg-ui-line-strong col-start-2 row-start-3 h-full w-0.5" })
|
|
57
57
|
]
|
|
58
58
|
}),
|
|
59
59
|
/* @__PURE__ */ n("div", {
|
|
@@ -27,7 +27,7 @@ var p = {
|
|
|
27
27
|
s?.(a, e);
|
|
28
28
|
}, u = a.split("-")[0];
|
|
29
29
|
return /* @__PURE__ */ t("div", {
|
|
30
|
-
className: "mt-2 rounded-sm border
|
|
30
|
+
className: "border-ui-line-strong bg-ui-raised mt-2 rounded-sm border select-none",
|
|
31
31
|
children: [/* @__PURE__ */ t("div", {
|
|
32
32
|
className: "grid grid-cols-2 items-center gap-2 px-1 pt-1",
|
|
33
33
|
children: [/* @__PURE__ */ t("div", {
|
|
@@ -4,7 +4,7 @@ import { jsx as n } from "react/jsx-runtime";
|
|
|
4
4
|
// src/builder/components/StyleInspector/categories/Spacing/SpacingMargin.tsx
|
|
5
5
|
var r = ({ fragmentSelected: r, values: i, isLinked: a = !1, onLinkSelected: o, onSelectFragment: s }) => /* @__PURE__ */ n(e, {
|
|
6
6
|
property: "margin",
|
|
7
|
-
className: "relative flex cursor-pointer flex-col rounded-md border border-dashed
|
|
7
|
+
className: "border-ui-line-strong relative flex cursor-pointer flex-col rounded-md border border-dashed select-none",
|
|
8
8
|
values: i,
|
|
9
9
|
fragmentSelected: r,
|
|
10
10
|
onSelectFragment: s,
|
|
@@ -3,12 +3,12 @@ import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
|
3
3
|
// src/builder/components/StyleInspector/categories/Spacing/SpacingPadding.tsx
|
|
4
4
|
var r = ({ fragmentSelected: r, values: i, isLinked: a = !1, onLinkSelected: o, onSelectFragment: s }) => /* @__PURE__ */ t(e, {
|
|
5
5
|
property: "padding",
|
|
6
|
-
className: "
|
|
6
|
+
className: "border-ui-line-strong bg-ui-raised relative grow rounded-md border",
|
|
7
7
|
values: i,
|
|
8
8
|
fragmentSelected: r,
|
|
9
9
|
onSelectFragment: s,
|
|
10
10
|
children: /* @__PURE__ */ n("div", {
|
|
11
|
-
className: "
|
|
11
|
+
className: "border-ui-line-strong bg-ui-panel text-ui-fg-subtle hover:text-ui-fg flex grow items-center justify-center rounded border py-1",
|
|
12
12
|
title: a ? "Sides linked: a change applies to all four" : "Link the four sides",
|
|
13
13
|
onClick: o,
|
|
14
14
|
children: [a && /* @__PURE__ */ t("i", { className: "fa-solid fa-link text-sm" }), !a && /* @__PURE__ */ t("i", { className: "fa-solid fa-link-slash text-sm" })]
|
package/dist/builder/components/StyleInspector/components/AncestorRules/AncestorRuleChip.mjs
CHANGED
|
@@ -8,7 +8,7 @@ var o = t(({ condition: t, active: o = !1, unused: s = !1, onSelect: c, onRemove
|
|
|
8
8
|
className: a("flex max-w-full items-center overflow-hidden rounded-sm border text-[11px] leading-none", {
|
|
9
9
|
"border-primary-500 bg-primary-500/15 text-primary-700 dark:text-primary-200": o,
|
|
10
10
|
"border-amber-500/70 bg-amber-500/10 text-amber-700 dark:text-amber-300": s && !o,
|
|
11
|
-
"border-
|
|
11
|
+
"border-ui-line-strong bg-ui-raised text-ui-fg-muted": !s && !o
|
|
12
12
|
}),
|
|
13
13
|
children: [/* @__PURE__ */ i("button", {
|
|
14
14
|
type: "button",
|
|
@@ -4,7 +4,7 @@ import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
|
4
4
|
var i = t(({ conditions: t, unused: i, activeAncestor: a, activeState: o, activeVariant: s, onSelect: c, onRemove: l, onRemoveUnused: u }) => /* @__PURE__ */ r("div", {
|
|
5
5
|
className: "flex flex-col gap-1",
|
|
6
6
|
children: [/* @__PURE__ */ r("div", {
|
|
7
|
-
className: "flex items-center justify-between gap-2 text-[11px]
|
|
7
|
+
className: "text-ui-fg-subtle flex items-center justify-between gap-2 text-[11px]",
|
|
8
8
|
children: [/* @__PURE__ */ r("span", { children: [
|
|
9
9
|
/* @__PURE__ */ n("i", { className: "fas fa-sitemap mr-1" }),
|
|
10
10
|
"Ancestor rules (",
|
package/dist/builder/components/StyleInspector/components/CategoryContainer/CategoryContainer.mjs
CHANGED
|
@@ -23,11 +23,11 @@ var p = ({ className: p, classNameContent: m, children: h, title: g = "Title", d
|
|
|
23
23
|
onChange: b,
|
|
24
24
|
children: [/* @__PURE__ */ s(f.Header, {
|
|
25
25
|
className: l("h-8 px-2.5", {
|
|
26
|
-
"border-
|
|
27
|
-
"bg-
|
|
26
|
+
"border-ui-line border-b": y,
|
|
27
|
+
"bg-ui-raised": !y
|
|
28
28
|
}),
|
|
29
29
|
title: /* @__PURE__ */ s("span", {
|
|
30
|
-
className: "text-[13px] font-medium
|
|
30
|
+
className: "text-ui-fg text-[13px] font-medium",
|
|
31
31
|
children: g
|
|
32
32
|
}),
|
|
33
33
|
placement: "right",
|
|
@@ -39,7 +39,7 @@ var p = ({ className: p, classNameContent: m, children: h, title: g = "Title", d
|
|
|
39
39
|
className: l("cursor-pointer text-xs", {
|
|
40
40
|
"text-primary-500 dark:text-primary-400": E,
|
|
41
41
|
"text-sky-600 dark:text-sky-400": !E && C,
|
|
42
|
-
"text-
|
|
42
|
+
"text-ui-fg-subtle hover:text-ui-fg": !E && !C
|
|
43
43
|
}),
|
|
44
44
|
icon: "fa-solid fa-sliders",
|
|
45
45
|
title: x ? "Hide advanced properties" : "Show advanced properties",
|
|
@@ -47,7 +47,7 @@ var p = ({ className: p, classNameContent: m, children: h, title: g = "Title", d
|
|
|
47
47
|
})]
|
|
48
48
|
})
|
|
49
49
|
}), /* @__PURE__ */ s(f.Content, {
|
|
50
|
-
className: l("flex flex-col gap-3 px-2.5 py-3", { "border-
|
|
50
|
+
className: l("flex flex-col gap-3 px-2.5 py-3", { "border-ui-line border-b": !y }, m),
|
|
51
51
|
children: /* @__PURE__ */ s(r, {
|
|
52
52
|
value: E,
|
|
53
53
|
children: h
|
|
@@ -12,7 +12,7 @@ var a = ({ items: a = [], onChange: o }) => {
|
|
|
12
12
|
children: s.map((e, t) => /* @__PURE__ */ n(i.Icon, {
|
|
13
13
|
size: e.size,
|
|
14
14
|
className: r("cursor-pointer rounded-sm p-0.5", {
|
|
15
|
-
"bg-
|
|
15
|
+
"bg-ui-raised": e.active,
|
|
16
16
|
"text-xs": typeof e.icon == "string",
|
|
17
17
|
"h-5 w-5": e.size !== "custom",
|
|
18
18
|
"flex-1 justify-center": e.size === "custom"
|