@plitzi/sdk-style 0.39.1 → 0.39.3
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 +19 -0
- package/dist/SdkStyleContextProvider.mjs +2 -3
- package/dist/StyleContext.mjs +1 -2
- package/dist/StyleHelper.mjs +1 -2
- package/dist/StyleMap/StyleMap.mjs +1 -2
- package/dist/StyleMap/helpers/getStyleItem.mjs +1 -2
- package/dist/StyleMap/helpers/isValueValid.mjs +1 -2
- package/dist/StyleMap/helpers/utils.mjs +1 -2
- package/dist/StyleMap/index.mjs +1 -2
- package/dist/StyleMap/methods/addSelector.mjs +2 -3
- package/dist/StyleMap/methods/updateSelector.mjs +1 -2
- package/dist/StyleReducer.mjs +1 -2
- package/dist/_virtual/_rolldown/runtime.mjs +1 -2
- package/dist/builder/BuilderStyleContextProvider.mjs +2 -3
- package/dist/builder/StyleAdvanceEditor.mjs +3 -4
- package/dist/builder/components/InputEasing/BezierEasing.mjs +1 -2
- package/dist/builder/components/InputEasing/Curve.mjs +1 -2
- package/dist/builder/components/InputEasing/Grid.mjs +1 -2
- package/dist/builder/components/InputEasing/InputEasing.mjs +1 -2
- package/dist/builder/components/InputEasing/InputEasingButton.mjs +1 -2
- package/dist/builder/components/InputEasing/InputEasingHelper.mjs +1 -2
- package/dist/builder/components/InputEasing/InputEasingList.mjs +1 -2
- package/dist/builder/components/InputEasing/Progress.mjs +1 -2
- package/dist/builder/components/InputEasing/index.mjs +1 -2
- package/dist/builder/components/Selector/Selector.mjs +1 -2
- package/dist/builder/components/Selector/SelectorHelper.mjs +1 -2
- package/dist/builder/components/Selector/SelectorItem/ItemOptions.mjs +12 -13
- package/dist/builder/components/Selector/SelectorItem/SelectorItem.mjs +1 -2
- package/dist/builder/components/Selector/SelectorItem/helpers.mjs +1 -2
- package/dist/builder/components/Selector/SelectorItem/index.mjs +1 -2
- package/dist/builder/components/Selector/SelectorSuggestions/SelectorSuggestions.mjs +1 -2
- package/dist/builder/components/Selector/SelectorSuggestions/SuggestionsCreator.mjs +1 -2
- package/dist/builder/components/Selector/SelectorSuggestions/SuggestionsList.mjs +1 -2
- package/dist/builder/components/Selector/SelectorSuggestions/index.mjs +1 -2
- package/dist/builder/components/Selector/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/Inspector.mjs +151 -152
- package/dist/builder/components/StyleInspector/InspectorSearchContext.mjs +1 -2
- package/dist/builder/components/StyleInspector/StyleInspector.mjs +14 -15
- package/dist/builder/components/StyleInspector/StyleInspectorContext.mjs +0 -1
- package/dist/builder/components/StyleInspector/StyleInspectorProvider.mjs +7 -8
- package/dist/builder/components/StyleInspector/categories/Background/Background.mjs +32 -33
- package/dist/builder/components/StyleInspector/categories/Background/components/BackgroundAttachment/BackgroundAttachment.mjs +8 -9
- package/dist/builder/components/StyleInspector/categories/Background/components/BackgroundAttachment/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Background/components/BackgroundLayer/BackgroundLayer.mjs +36 -37
- package/dist/builder/components/StyleInspector/categories/Background/components/BackgroundLayer/helpers.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Background/components/BackgroundLayer/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Background/components/BackgroundPosition/BackgroundPosition.mjs +11 -12
- package/dist/builder/components/StyleInspector/categories/Background/components/BackgroundPosition/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Background/components/BackgroundSize/BackgroundSize.mjs +18 -19
- package/dist/builder/components/StyleInspector/categories/Background/components/BackgroundSize/helpers.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Background/components/BackgroundSize/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Background/components/BackgroundTile/BackgroundTile.mjs +8 -9
- package/dist/builder/components/StyleInspector/categories/Background/components/BackgroundTile/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Background/components/GradientCenter/GradientCenter.mjs +8 -9
- package/dist/builder/components/StyleInspector/categories/Background/components/GradientCenter/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Background/components/GradientStopBar/GradientPreviewBar.mjs +6 -7
- package/dist/builder/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopBar.mjs +14 -15
- package/dist/builder/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopEditor.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopHandle.mjs +11 -12
- package/dist/builder/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopTrack.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Background/components/GradientStopBar/helpers.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Background/components/GradientStopBar/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Background/components/LayerGroup/LayerGroup.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Background/components/LayerGroup/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Background/helpers/backgroundParser.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Background/helpers/layerValues.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Background/helpers/normalizeLeft.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Background/helpers/parseToBgLayers.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Background/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Background/modes/ConicGradientMode.mjs +6 -7
- package/dist/builder/components/StyleInspector/categories/Background/modes/ImageMode.mjs +6 -7
- package/dist/builder/components/StyleInspector/categories/Background/modes/LinearGradientMode.mjs +11 -12
- package/dist/builder/components/StyleInspector/categories/Background/modes/RadialGradientMode.mjs +19 -20
- package/dist/builder/components/StyleInspector/categories/Background/modes/RawMode.mjs +6 -7
- package/dist/builder/components/StyleInspector/categories/Background/modes/helpers.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Border/Border.mjs +19 -20
- package/dist/builder/components/StyleInspector/categories/Border/BorderColor.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Border/BorderPlacements.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Border/BorderRadius.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Border/BorderStyle.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Border/BorderWidth.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Border/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Display/Display.mjs +26 -27
- package/dist/builder/components/StyleInspector/categories/Display/DisplayElements.mjs +7 -2
- package/dist/builder/components/StyleInspector/categories/Display/DisplayFlex.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Display/DisplayFlexAlignContent.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Display/DisplayFlexAlignItems.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Display/DisplayFlexDirection.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Display/DisplayFlexJustify.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Display/DisplayGap.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Display/DisplayGridTemplate.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Display/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/DisplayFlexChild/DisplayAlignSelf.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/DisplayFlexChild/DisplayFlexChild.mjs +21 -22
- package/dist/builder/components/StyleInspector/categories/DisplayFlexChild/DisplayOrder.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/DisplayFlexChild/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Effects/BoxShadow/BoxShadow.mjs +6 -7
- package/dist/builder/components/StyleInspector/categories/Effects/BoxShadow/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Effects/Effects.mjs +36 -37
- package/dist/builder/components/StyleInspector/categories/Effects/Filters/Filter.mjs +14 -15
- package/dist/builder/components/StyleInspector/categories/Effects/Filters/FilterItem.mjs +20 -21
- package/dist/builder/components/StyleInspector/categories/Effects/Filters/helpers.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Effects/Filters/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Effects/Transform/Transform.mjs +8 -9
- package/dist/builder/components/StyleInspector/categories/Effects/Transform/TransformItem.mjs +17 -18
- package/dist/builder/components/StyleInspector/categories/Effects/Transform/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Effects/Transform/transformFunctions.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Effects/Transition/Transition.mjs +9 -10
- package/dist/builder/components/StyleInspector/categories/Effects/Transition/TransitionEasing.mjs +21 -22
- package/dist/builder/components/StyleInspector/categories/Effects/Transition/TransitionItem.mjs +21 -22
- package/dist/builder/components/StyleInspector/categories/Effects/Transition/helpers.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Effects/Transition/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Effects/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/List/List.mjs +10 -11
- package/dist/builder/components/StyleInspector/categories/List/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/ListItem/ListItem.mjs +10 -11
- package/dist/builder/components/StyleInspector/categories/ListItem/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Others/Others.mjs +27 -28
- package/dist/builder/components/StyleInspector/categories/Others/OthersForm.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Others/OthersInteraction.mjs +16 -17
- package/dist/builder/components/StyleInspector/categories/Others/OthersOutline.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Others/OthersScrollSnap.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Others/OthersScrollbar.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Others/OthersSvg.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Others/OthersTable.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Others/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Position/Position.mjs +18 -19
- package/dist/builder/components/StyleInspector/categories/Position/PositionAdvanced.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Position/PositionAdvancedButtons.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Position/PositionClear.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Position/PositionFloat.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Position/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/RawStyle/RawStyle.mjs +2 -3
- package/dist/builder/components/StyleInspector/categories/RawStyle/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Size/Size.mjs +36 -37
- package/dist/builder/components/StyleInspector/categories/Size/SizeContainer.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Size/SizeFit.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Size/SizeOverflow.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Size/SizePosition.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Size/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Spacing/Spacing.mjs +7 -8
- package/dist/builder/components/StyleInspector/categories/Spacing/SpacingBox.mjs +8 -9
- package/dist/builder/components/StyleInspector/categories/Spacing/SpacingEditor.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Spacing/SpacingMargin.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Spacing/SpacingNumber.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Spacing/SpacingPadding.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Spacing/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Typography/Typography.mjs +48 -49
- package/dist/builder/components/StyleInspector/categories/Typography/TypographyAlign.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Typography/TypographyBreaking.mjs +13 -14
- package/dist/builder/components/StyleInspector/categories/Typography/TypographyClamp.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Typography/TypographyConstants.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Typography/TypographyFigures.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Typography/TypographyFont.mjs +7 -8
- package/dist/builder/components/StyleInspector/categories/Typography/TypographyStyle.mjs +10 -11
- package/dist/builder/components/StyleInspector/categories/Typography/TypographyTextShadow.mjs +8 -9
- package/dist/builder/components/StyleInspector/categories/Typography/TypographyTransform.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Typography/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Variables/Variables.mjs +7 -8
- package/dist/builder/components/StyleInspector/categories/Variables/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/blendModes.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/listMarkers.mjs +1 -2
- package/dist/builder/components/StyleInspector/categoryKeys.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/AncestorRules/AncestorRuleChip.mjs +0 -1
- package/dist/builder/components/StyleInspector/components/AncestorRules/AncestorRules.mjs +0 -1
- package/dist/builder/components/StyleInspector/components/AncestorRules/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/CategoryAdvanced/CategoryAdvanced.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/CategoryAdvanced/CategoryAdvancedContext.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/CategoryAdvanced/index.mjs +5 -6
- package/dist/builder/components/StyleInspector/components/CategoryContainer/CategoryContainer.mjs +6 -7
- package/dist/builder/components/StyleInspector/components/CategoryContainer/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/CategoryOption/CategoryOption.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/CategoryOption/categoryTypes/OptionColor.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/CategoryOption/categoryTypes/OptionIconGroup.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/CategoryOption/categoryTypes/OptionInput.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/CategoryOption/categoryTypes/OptionMetricInput.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/CategoryOption/categoryTypes/OptionSelect.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/CategoryOption/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/CategorySection/CategorySection.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/CategorySection/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/ColorSwatch/ColorSwatch.mjs +5 -6
- package/dist/builder/components/StyleInspector/components/ColorSwatch/helpers.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/ColorSwatch/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/InspectorDots/InspectorDots.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/InspectorDots/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/InspectorFooter/InspectorFooter.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/InspectorFooter/helpers.mjs +2 -10
- package/dist/builder/components/StyleInspector/components/InspectorFooter/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/InspectorLabel/InspectorLabel.mjs +3 -4
- package/dist/builder/components/StyleInspector/components/InspectorLabel/helpers.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/InspectorLabel/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/InspectorSearch/InspectorSearch.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/InspectorSearch/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/ShadowItem/ShadowItem.mjs +18 -19
- package/dist/builder/components/StyleInspector/components/ShadowItem/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/ShadowList/ShadowList.mjs +8 -9
- package/dist/builder/components/StyleInspector/components/ShadowList/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/TargetSummary/TargetSummary.mjs +0 -1
- package/dist/builder/components/StyleInspector/components/TargetSummary/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/ValueList/ValueList.mjs +0 -1
- package/dist/builder/components/StyleInspector/components/ValueList/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/ValueListItem/ValueListItem.mjs +0 -1
- package/dist/builder/components/StyleInspector/components/ValueListItem/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/cssValues.mjs +1 -2
- package/dist/builder/components/StyleInspector/helpers.mjs +1 -2
- package/dist/builder/components/StyleInspector/hooks/useInspectorValues.mjs +1 -2
- package/dist/builder/components/StyleInspector/hooks/usePropertyChange.mjs +1 -2
- package/dist/builder/components/StyleInspector/hooks/useStyleBinding.mjs +1 -2
- package/dist/builder/components/StyleInspector/hooks/useStyleInherit.mjs +1 -2
- package/dist/builder/components/StyleInspector/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/search.mjs +1 -2
- package/dist/builder/components/StyleInspector/shadowValue.mjs +1 -2
- package/dist/builder/components/StyleManager/ManagerSelector.mjs +0 -1
- package/dist/builder/components/StyleManager/StyleManager.mjs +1 -2
- package/dist/builder/components/StyleManager/StyleSelectorTag.mjs +0 -1
- package/dist/builder/components/StyleManager/index.mjs +1 -2
- package/dist/builder/components/index.mjs +1 -2
- package/dist/builder/hooks/useSpaceFonts.mjs +1 -2
- package/dist/builder/index.mjs +3 -3
- package/dist/builder/models/SelectorForm/SelectorForm.mjs +1 -2
- package/dist/builder/models/SelectorForm/index.mjs +1 -2
- package/dist/helpers/calculateInheriting.mjs +2 -3
- package/dist/helpers/formatCssFromSelector.mjs +1 -2
- package/dist/helpers/generateStyleSelector.mjs +1 -2
- package/dist/helpers/index.mjs +11 -12
- package/dist/helpers/processCssTokens.mjs +1 -2
- package/dist/helpers/processSelector.mjs +1 -2
- package/dist/helpers/processSelectorAttributes.mjs +1 -2
- package/dist/helpers/processSelectorName.mjs +1 -2
- package/dist/helpers/processSelectorVariables.mjs +1 -2
- package/dist/index.mjs +11 -11
- package/package.json +15 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @plitzi/sdk-style
|
|
2
2
|
|
|
3
|
+
## 0.39.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- @plitzi/sdk-event-bridge@0.39.3
|
|
8
|
+
- @plitzi/sdk-shared@0.39.3
|
|
9
|
+
- @plitzi/sdk-variables@0.39.3
|
|
10
|
+
|
|
11
|
+
## 0.39.2
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- fad1264: Released with every `@plitzi` package at this version. What changed in each, and what to do when you upgrade, is in
|
|
16
|
+
`@plitzi/cli`'s `CHANGELOG.md`: one copy of the notes, not one per package.
|
|
17
|
+
- Updated dependencies [fad1264]
|
|
18
|
+
- @plitzi/sdk-event-bridge@0.39.2
|
|
19
|
+
- @plitzi/sdk-shared@0.39.2
|
|
20
|
+
- @plitzi/sdk-variables@0.39.2
|
|
21
|
+
|
|
3
22
|
## 0.39.1
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import e from "./StyleContext.mjs";
|
|
2
2
|
import { use as t, useMemo as n } from "react";
|
|
3
|
-
import { NetworkInternalContext as r } from "@plitzi/sdk-shared/network";
|
|
3
|
+
import { NetworkInternalContext as r } from "@plitzi/sdk-shared/network/react";
|
|
4
4
|
import { useBuilderStoreSync as i } from "@plitzi/sdk-shared/store";
|
|
5
5
|
import { EMPTY_STYLE_SCHEMA as a } from "@plitzi/sdk-shared/style";
|
|
6
6
|
import { jsx as o } from "react/jsx-runtime";
|
|
7
|
-
|
|
7
|
+
// src/SdkStyleContextProvider.tsx
|
|
8
8
|
var s = ({ children: s, style: c }) => {
|
|
9
9
|
let { style: l } = t(r), u = n(() => ({}), []);
|
|
10
10
|
return i("style", c ?? (l || a)), /* @__PURE__ */ o(e, {
|
|
@@ -12,5 +12,4 @@ var s = ({ children: s, style: c }) => {
|
|
|
12
12
|
children: s
|
|
13
13
|
});
|
|
14
14
|
};
|
|
15
|
-
//#endregion
|
|
16
15
|
export { s as default };
|
package/dist/StyleContext.mjs
CHANGED
package/dist/StyleHelper.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DISPLAY_MODES as e, DISPLAY_MODE_MIN_WIDTH as t, displayModeWidthRem as n, isDisplayMode as r } from "@plitzi/sdk-shared/style";
|
|
2
2
|
import { makeId as i } from "@plitzi/sdk-shared/helpers";
|
|
3
3
|
import { styleVariablesToCss as a } from "@plitzi/sdk-variables";
|
|
4
|
-
|
|
4
|
+
// src/StyleHelper.ts
|
|
5
5
|
var o = (e, t = [], n = !0, r = "") => {
|
|
6
6
|
if (!e || e.length === 0) return "";
|
|
7
7
|
let i = [];
|
|
@@ -36,5 +36,4 @@ var o = (e, t = [], n = !0, r = "") => {
|
|
|
36
36
|
let r = `${e}-${i(n)}`;
|
|
37
37
|
return t !== "base" && (r = `${e}-${t}-${i(n)}`), r;
|
|
38
38
|
};
|
|
39
|
-
//#endregion
|
|
40
39
|
export { l as generateCache, u as makeSelector, o as selectorToString };
|
|
@@ -3,7 +3,7 @@ import t from "./helpers/getStyleItem.mjs";
|
|
|
3
3
|
import n from "./methods/addSelector.mjs";
|
|
4
4
|
import r from "./methods/updateSelector.mjs";
|
|
5
5
|
import { get as i, set as a } from "@plitzi/plitzi-ui/helpers";
|
|
6
|
-
|
|
6
|
+
// src/StyleMap/StyleMap.ts
|
|
7
7
|
var o = class {
|
|
8
8
|
platform;
|
|
9
9
|
variables;
|
|
@@ -79,5 +79,4 @@ var o = class {
|
|
|
79
79
|
return e.fonts = n.fonts, r;
|
|
80
80
|
};
|
|
81
81
|
};
|
|
82
|
-
//#endregion
|
|
83
82
|
export { o as default };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { canonicalCondition as e, isStylePseudo as t } from "@plitzi/sdk-shared/style";
|
|
2
2
|
import { isRecord as n } from "@plitzi/sdk-shared/helpers";
|
|
3
|
-
|
|
3
|
+
// src/StyleMap/helpers/isValueValid.ts
|
|
4
4
|
var r = (e) => typeof e == "string" || typeof e == "number" || e === void 0, i = (e) => n(e), a = (e) => i(e) && Object.values(e).every(r), o = (e) => i(e) && Object.values(e).every(a), s = (e) => i(e) && Object.values(e).every((e) => !(!i(e) || "variants" in e || "ancestors" in e || "conditions" in e || "pseudos" in e && e.pseudos && !u(e.pseudos) || "default" in e && e.default && !a(e.default) || "states" in e && e.states && !o(e.states))), c = (e) => i(e) && Object.values(e).every((e) => i(e) && (!e.default || a(e.default)) && (!e.states || o(e.states)) && (!e.variants || s(e.variants))), l = (e) => i(e) && (!e.default || a(e.default)) && (!e.states || o(e.states)), u = (e) => i(e) && Object.entries(e).every(([e, n]) => t(e) && l(n)), d = (t) => i(t) && Object.entries(t).every(([t, n]) => e(t) === t && l(n) && (!n.pseudos || u(n.pseudos))), f = (e) => !(!i(e) || !e.default || !a(e.default) || e.states && !o(e.states) || e.variants && !s(e.variants) || e.ancestors && !c(e.ancestors) || e.pseudos && !u(e.pseudos) || e.conditions && !d(e.conditions)), p = (e) => e === void 0 || i(e) && !Object.keys(e).length || i(e) && "base" in e && Object.values(e).every(f), m = (e, t, n) => {
|
|
5
5
|
let { styleSelector: c, styleVariant: l, styleState: u } = n ?? {};
|
|
6
6
|
return !e && !c && !l && !u ? p(t) : !e && !c && l && u ? !1 : !e && !c && l ? s(t) : !e && !c && u ? o(t) : e ? r(t) : c ? t === void 0 ? !0 : r(t) || !i(t) ? !1 : a(t) || f(t) || f(t[c]) : !1;
|
|
7
7
|
};
|
|
8
|
-
//#endregion
|
|
9
8
|
export { m as default, c as isStyleAncestors, p as isStyleAttributes, f as isStyleBlock, d as isStyleConditions, a as isStyleObject, u as isStylePseudos, o as isStyleStates, s as isStyleVariants };
|
|
@@ -2,7 +2,7 @@ import { isStyleObject as e } from "./isValueValid.mjs";
|
|
|
2
2
|
import { isStyleRules as t, setAtKeys as n, styleTargetKeys as r, valueAtKeys as i } from "@plitzi/sdk-shared/style";
|
|
3
3
|
import { isRecord as a } from "@plitzi/sdk-shared/helpers";
|
|
4
4
|
import { omit as o } from "@plitzi/plitzi-ui/helpers";
|
|
5
|
-
|
|
5
|
+
// src/StyleMap/helpers/utils.ts
|
|
6
6
|
var s = (t, n, r) => {
|
|
7
7
|
if (t && (typeof n == "string" || typeof n == "number")) return {
|
|
8
8
|
...r,
|
|
@@ -51,5 +51,4 @@ var s = (t, n, r) => {
|
|
|
51
51
|
let C = _.at(-1) === "default" ? _.slice(0, -1) : _;
|
|
52
52
|
C.length > 1 ? f(g, C.slice(0, -1), C[C.length - 1]) : n(g, _, {});
|
|
53
53
|
};
|
|
54
|
-
//#endregion
|
|
55
54
|
export { c as isEmptyObject, s as parseValue, p as writeStyle };
|
package/dist/StyleMap/index.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import n, { isStyleAttributes as r } from "../helpers/isValueValid.mjs";
|
|
|
4
4
|
import { writeStyle as i } from "../helpers/utils.mjs";
|
|
5
5
|
import { styleTargetProblem as a } from "@plitzi/sdk-shared/style";
|
|
6
6
|
import { set as o } from "@plitzi/plitzi-ui/helpers";
|
|
7
|
-
|
|
7
|
+
// src/StyleMap/methods/addSelector.ts
|
|
8
8
|
var s = (s, c, l, u, d, f, p) => {
|
|
9
9
|
if (!p) return !1;
|
|
10
10
|
let { componentType: m, styleSelector: h, styleState: g, styleVariant: _, styleAncestor: v, stylePseudo: y, styleCondition: b } = p;
|
|
@@ -19,7 +19,6 @@ var s = (s, c, l, u, d, f, p) => {
|
|
|
19
19
|
componentType: m,
|
|
20
20
|
cache: ""
|
|
21
21
|
};
|
|
22
|
-
return !h && r(f) ? (
|
|
22
|
+
return !h && r(f) ? (f && Object.keys(f).length || (f = { base: { default: {} } }), x.attributes = f, x.cache = e(x), o(s, `${c}.${l}`, x), !0) : (i("add", x, h ?? "base", d, f, p), x.cache = e(x), o(s, `${c}.${l}`, x), !0);
|
|
23
23
|
};
|
|
24
|
-
//#endregion
|
|
25
24
|
export { s as default };
|
|
@@ -4,11 +4,10 @@ import n from "../helpers/isValueValid.mjs";
|
|
|
4
4
|
import { writeStyle as r } from "../helpers/utils.mjs";
|
|
5
5
|
import { styleTargetProblem as i } from "@plitzi/sdk-shared/style";
|
|
6
6
|
import { set as a } from "@plitzi/plitzi-ui/helpers";
|
|
7
|
-
|
|
7
|
+
// src/StyleMap/methods/updateSelector.ts
|
|
8
8
|
var o = (o, s, c, l, u, d) => {
|
|
9
9
|
if (!d) return !1;
|
|
10
10
|
let { componentType: f, styleSelector: p } = d, m = t(o, s, c);
|
|
11
11
|
return !m || !p || !f && m.type === "element" || f && m.type !== "element" || p && typeof p != "string" || l && l.includes(".") || i(d) !== void 0 || !n(l, u, d) ? !1 : (r("update", m, p, l, u, d), a(m, "cache", e(m)), a(o, `${s}.${c}`, m), !0);
|
|
12
12
|
};
|
|
13
|
-
//#endregion
|
|
14
13
|
export { o as default };
|
package/dist/StyleReducer.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import t from "./StyleMap/index.mjs";
|
|
|
3
3
|
import { mergeSnippetStyle as n } from "@plitzi/sdk-shared/style";
|
|
4
4
|
import { set as r } from "@plitzi/plitzi-ui/helpers";
|
|
5
5
|
import { produce as i } from "immer";
|
|
6
|
-
|
|
6
|
+
// src/StyleReducer.ts
|
|
7
7
|
var a = {
|
|
8
8
|
STYLE_UPDATE: "STYLE_UPDATE",
|
|
9
9
|
STYLE_ADD_SELECTOR: "STYLE_ADD_SELECTOR",
|
|
@@ -121,5 +121,4 @@ var a = {
|
|
|
121
121
|
default: return o;
|
|
122
122
|
}
|
|
123
123
|
};
|
|
124
|
-
//#endregion
|
|
125
124
|
export { a as StyleActions, o as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// \0rolldown/runtime.js
|
|
2
2
|
var e = Object.defineProperty, t = (t, n) => {
|
|
3
3
|
let r = {};
|
|
4
4
|
for (var i in t) e(r, i, {
|
|
@@ -7,5 +7,4 @@ var e = Object.defineProperty, t = (t, n) => {
|
|
|
7
7
|
});
|
|
8
8
|
return n || e(r, Symbol.toStringTag, { value: "Module" }), r;
|
|
9
9
|
};
|
|
10
|
-
//#endregion
|
|
11
10
|
export { t as __exportAll };
|
|
@@ -2,13 +2,13 @@ import e from "../StyleContext.mjs";
|
|
|
2
2
|
import { makeSelector as t } from "../StyleHelper.mjs";
|
|
3
3
|
import n, { StyleActions as r } from "../StyleReducer.mjs";
|
|
4
4
|
import { use as i, useCallback as a, useEffect as o, useMemo as s } from "react";
|
|
5
|
-
import { NetworkContext as c } from "@plitzi/sdk-shared/network";
|
|
5
|
+
import { NetworkContext as c } from "@plitzi/sdk-shared/network/react";
|
|
6
6
|
import { useCommonStoreSync as l } from "@plitzi/sdk-shared/store";
|
|
7
7
|
import { EMPTY_STYLE_SCHEMA as u } from "@plitzi/sdk-shared/style";
|
|
8
8
|
import { jsx as d } from "react/jsx-runtime";
|
|
9
9
|
import f from "@plitzi/plitzi-ui/hooks/useReducerWithMiddleware";
|
|
10
10
|
import { useEventBridge as p } from "@plitzi/sdk-event-bridge";
|
|
11
|
-
|
|
11
|
+
// src/builder/BuilderStyleContextProvider.tsx
|
|
12
12
|
var m = ({ children: m, style: h, includeSubscriptions: g = !0, middlewares: _ = [] }) => {
|
|
13
13
|
let { subscriptionManager: v } = i(c), [y, b] = f(n, h ?? u, _);
|
|
14
14
|
l("style", y);
|
|
@@ -193,5 +193,4 @@ var m = ({ children: m, style: h, includeSubscriptions: g = !0, middlewares: _ =
|
|
|
193
193
|
children: m
|
|
194
194
|
});
|
|
195
195
|
};
|
|
196
|
-
//#endregion
|
|
197
196
|
export { m as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { use as e, useCallback as t, useMemo as n, useState as r } from "react";
|
|
2
|
-
import { NetworkContext as i } from "@plitzi/sdk-shared/network";
|
|
2
|
+
import { NetworkContext as i } from "@plitzi/sdk-shared/network/react";
|
|
3
3
|
import { useCommonStore as a } from "@plitzi/sdk-shared/store";
|
|
4
4
|
import { splitNotificationsCss as o, withNotificationsCss as s } from "@plitzi/sdk-shared/style";
|
|
5
5
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
@@ -8,8 +8,8 @@ import f from "@plitzi/plitzi-ui/Button";
|
|
|
8
8
|
import p from "@plitzi/plitzi-ui/CodeMirror";
|
|
9
9
|
import { useNetwork as m } from "@plitzi/sdk-shared/hooks";
|
|
10
10
|
import { SchemaContext as h } from "@plitzi/sdk-shared/schema/react";
|
|
11
|
-
import { useTheme as g } from "@plitzi/sdk-shared/theme";
|
|
12
|
-
|
|
11
|
+
import { useTheme as g } from "@plitzi/sdk-shared/theme/react";
|
|
12
|
+
// src/builder/StyleAdvanceEditor.tsx
|
|
13
13
|
var _ = () => {
|
|
14
14
|
let { resolvedTheme: _ } = g(), [[v = "", y = void 0]] = a(["schema.settings.customCss", "style.variables"]), { schemaUpdateSettings: b } = e(h), x = n(() => o(typeof v == "string" ? v : ""), [v]), [S, C] = r(() => x.customCss), w = n(() => b && u(b, 500), [b]), { server: T, webKey: E } = e(i), { networkQuery: D, networkLoading: O } = m({
|
|
15
15
|
initLoading: !1,
|
|
@@ -74,5 +74,4 @@ var _ = () => {
|
|
|
74
74
|
})]
|
|
75
75
|
});
|
|
76
76
|
};
|
|
77
|
-
//#endregion
|
|
78
77
|
export { _ as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/builder/components/InputEasing/BezierEasing.ts
|
|
2
2
|
var e = 11, t = 1 / (e - 1), n = typeof Float32Array == "function", r = (e, t) => 1 - 3 * t + 3 * e, i = (e, t) => 3 * t - 6 * e, a = (e) => 3 * e, o = (e, t, n) => ((r(t, n) * e + i(t, n)) * e + a(t)) * e, s = (e, t, n) => 3 * r(t, n) * e * e + 2 * i(t, n) * e + a(t), c = (e, t, n, r, i) => {
|
|
3
3
|
let a, s, c = 0;
|
|
4
4
|
do
|
|
@@ -30,5 +30,4 @@ function d(r, i, a, d) {
|
|
|
30
30
|
return e === 0 || e === 1 ? e : o(p(e), i, d);
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
//#endregion
|
|
34
33
|
export { d as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
|
|
2
|
+
// src/builder/components/InputEasing/Curve.tsx
|
|
3
3
|
var t = [], n = ({ value: n = t, xFrom: r = 0, xTo: i = 0, yFrom: a = 0, yTo: o = 0 }) => {
|
|
4
4
|
let s = (e, t, n) => e * (1 - n) + t * n, c = (e) => Math.round(s(r, i, e)), l = (e) => Math.round(s(a, o, e)), u = c(0), d = l(0), f = c(1), p = l(1), m = c(n[0]), h = l(n[1]), g = c(n[2]), _ = l(n[3]);
|
|
5
5
|
return /* @__PURE__ */ e("path", {
|
|
@@ -7,5 +7,4 @@ var t = [], n = ({ value: n = t, xFrom: r = 0, xTo: i = 0, yFrom: a = 0, yTo: o
|
|
|
7
7
|
d: `M${u},${d} C${m},${h} ${g},${_} ${f},${p}`
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
//#endregion
|
|
11
10
|
export { n as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
|
-
|
|
2
|
+
// src/builder/components/InputEasing/Grid.tsx
|
|
3
3
|
var n = ({ xFrom: n = 0, xTo: r = 0, yFrom: i = 0, yTo: a = 0 }) => {
|
|
4
4
|
let o = (e, t, n) => e * (1 - n) + t * n, s = (e) => Math.round(o(n, r, e)), c = (e) => Math.round(o(i, a, e)), l = (e, t, n) => {
|
|
5
5
|
let r = [];
|
|
@@ -53,5 +53,4 @@ var n = ({ xFrom: n = 0, xTo: r = 0, yFrom: i = 0, yTo: a = 0 }) => {
|
|
|
53
53
|
})
|
|
54
54
|
] });
|
|
55
55
|
};
|
|
56
|
-
//#endregion
|
|
57
56
|
export { n as default };
|
|
@@ -4,7 +4,7 @@ import n from "./Progress.mjs";
|
|
|
4
4
|
import { Component as r, createRef as i } from "react";
|
|
5
5
|
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
6
|
import c from "clsx";
|
|
7
|
-
|
|
7
|
+
// src/builder/components/InputEasing/InputEasing.tsx
|
|
8
8
|
var l = [
|
|
9
9
|
.25,
|
|
10
10
|
.25,
|
|
@@ -117,5 +117,4 @@ var l = [
|
|
|
117
117
|
});
|
|
118
118
|
}
|
|
119
119
|
};
|
|
120
|
-
//#endregion
|
|
121
120
|
export { d as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import t from "clsx";
|
|
3
|
-
|
|
3
|
+
// src/builder/components/InputEasing/InputEasingButton.tsx
|
|
4
4
|
var n = ({ children: n, title: r = "", className: i = "", onClick: a }) => /* @__PURE__ */ e("button", {
|
|
5
5
|
type: "button",
|
|
6
6
|
title: r,
|
|
@@ -12,5 +12,4 @@ var n = ({ children: n, title: r = "", className: i = "", onClick: a }) => /* @_
|
|
|
12
12
|
children: n
|
|
13
13
|
})
|
|
14
14
|
});
|
|
15
|
-
//#endregion
|
|
16
15
|
export { n as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/builder/components/InputEasing/InputEasingHelper.ts
|
|
2
2
|
var e = {
|
|
3
3
|
ease: [
|
|
4
4
|
.25,
|
|
@@ -175,5 +175,4 @@ var e = {
|
|
|
175
175
|
1.6
|
|
176
176
|
]
|
|
177
177
|
};
|
|
178
|
-
//#endregion
|
|
179
178
|
export { e as easingGenerics };
|
|
@@ -2,7 +2,7 @@ import e from "./InputEasingButton.mjs";
|
|
|
2
2
|
import { useCallback as t } from "react";
|
|
3
3
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
4
|
import i from "clsx";
|
|
5
|
-
|
|
5
|
+
// src/builder/components/InputEasing/InputEasingList.tsx
|
|
6
6
|
var a = ({ className: a = "", onChange: o }) => {
|
|
7
7
|
let s = t((e) => () => o?.(e), [o]);
|
|
8
8
|
return /* @__PURE__ */ r("div", {
|
|
@@ -287,5 +287,4 @@ var a = ({ className: a = "", onChange: o }) => {
|
|
|
287
287
|
]
|
|
288
288
|
});
|
|
289
289
|
};
|
|
290
|
-
//#endregion
|
|
291
290
|
export { a as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "./BezierEasing.mjs";
|
|
2
2
|
import { useMemo as t } from "react";
|
|
3
3
|
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// src/builder/components/InputEasing/Progress.tsx
|
|
5
5
|
var r = ({ progress: r = 0, xFrom: i = 0, xTo: a = 0, yFrom: o = 0, yTo: s = 0, value: c }) => {
|
|
6
6
|
let l = t(() => e(...c), [c]), u = (e, t, n) => e * (1 - n) + t * n, d = (e) => Math.round(u(i, a, e)), f = (e) => Math.round(u(o, s, e));
|
|
7
7
|
if (!r) return /* @__PURE__ */ n("path", {});
|
|
@@ -11,5 +11,4 @@ var r = ({ progress: r = 0, xFrom: i = 0, xTo: a = 0, yFrom: o = 0, yTo: s = 0,
|
|
|
11
11
|
d: _
|
|
12
12
|
});
|
|
13
13
|
};
|
|
14
|
-
//#endregion
|
|
15
14
|
export { r as default };
|
|
@@ -9,7 +9,7 @@ import _ from "@plitzi/plitzi-ui/Button";
|
|
|
9
9
|
import v from "clsx";
|
|
10
10
|
import y, { useFloating as b } from "@plitzi/plitzi-ui/ContainerFloating";
|
|
11
11
|
import { usePopup as x } from "@plitzi/plitzi-ui/Popup";
|
|
12
|
-
|
|
12
|
+
// src/builder/components/Selector/Selector.tsx
|
|
13
13
|
var S = "Classes apply left to right, in the order the stylesheet lists them: where two set the same property, the one further right wins.", C = s(({ className: s = "", value: C = "", selectors: w, selector: T, componentType: E, disabled: D = !1, onChange: O, onSelectorSelected: k, onAdd: A, onRemove: j }) => {
|
|
14
14
|
let M = u(null), [N, P] = d(""), [F, I, , L, R] = b({ disabled: D }), { existsPopup: z, addPopup: B } = x("floating"), V = l(() => Object.values(w ?? {}).find((e) => e.type === "element" && e.componentType === E), [E, w]), H = l(() => Object.values(g(w ?? {}, C.split(" "))).map((e) => g(e, ["name", "type"])), [w, C]), U = l(() => e(H.map((e, t) => ({
|
|
15
15
|
...e,
|
|
@@ -188,5 +188,4 @@ var S = "Classes apply left to right, in the order the stylesheet lists them: wh
|
|
|
188
188
|
})]
|
|
189
189
|
});
|
|
190
190
|
});
|
|
191
|
-
//#endregion
|
|
192
191
|
export { C as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/builder/components/Selector/SelectorHelper.ts
|
|
2
2
|
var e = (e) => (e.match(/^[0-9]/) && (e = `_${e}`), e.replace(" ", "-").replace(/[^a-zA-Z0-9_-]+/, "")), t = (e, t) => {
|
|
3
3
|
let n = (e) => {
|
|
4
4
|
let n = t.indexOf(e);
|
|
@@ -37,5 +37,4 @@ var e = (e) => (e.match(/^[0-9]/) && (e = `_${e}`), e.replace(" ", "-").replace(
|
|
|
37
37
|
let n = e ? t[e] : void 0;
|
|
38
38
|
if (n) return n.map(({ by: e, properties: t }) => `${a(t).join(", ")} overridden by ${e}`).join(" · ");
|
|
39
39
|
};
|
|
40
|
-
//#endregion
|
|
41
40
|
export { t as inStylesheetOrder, r as overriddenProperties, o as overrideNote, e as selectorFormatter, a as summarizeProperties };
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { ITEM_CLASS as e } from "./helpers.mjs";
|
|
2
2
|
import { useCallback as t } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
import { makeId as i } from "@plitzi/sdk-shared/helpers";
|
|
5
5
|
import a from "@plitzi/plitzi-ui/ContainerFloating";
|
|
6
6
|
import o from "@plitzi/plitzi-ui/Icon";
|
|
7
7
|
import s, { useModal as c } from "@plitzi/plitzi-ui/Modal";
|
|
8
|
-
|
|
8
|
+
// src/builder/components/Selector/SelectorItem/ItemOptions.tsx
|
|
9
9
|
var l = ({ selector: l = "", type: u = "class", onAction: d }) => {
|
|
10
10
|
let { showDialog: f } = c(), p = t(() => d?.("duplicate", {
|
|
11
|
-
name: `${l}-${
|
|
11
|
+
name: `${l}-${i(4)}`,
|
|
12
12
|
type: u
|
|
13
13
|
}), [
|
|
14
14
|
d,
|
|
15
15
|
l,
|
|
16
16
|
u
|
|
17
17
|
]), m = t(() => d?.("remove"), [d]), h = t(async () => {
|
|
18
|
-
await f(/* @__PURE__ */
|
|
18
|
+
await f(/* @__PURE__ */ r(s.Header, { children: ["Delete .", l] }), /* @__PURE__ */ n(s.Body, { children: /* @__PURE__ */ n("p", {
|
|
19
19
|
className: "m-0 text-sm",
|
|
20
20
|
children: "The class is deleted from the space, and every element that wears it loses the styles it gives. To take it off this element only, use “Remove from this element”."
|
|
21
21
|
}) }), void 0, { size: "sm" }, l) && d?.("delete");
|
|
@@ -24,29 +24,29 @@ var l = ({ selector: l = "", type: u = "class", onAction: d }) => {
|
|
|
24
24
|
l,
|
|
25
25
|
f
|
|
26
26
|
]);
|
|
27
|
-
return /* @__PURE__ */
|
|
27
|
+
return /* @__PURE__ */ r(a, { children: [/* @__PURE__ */ n(a.Trigger, { children: /* @__PURE__ */ n(o, {
|
|
28
28
|
icon: "fa-solid fa-ellipsis-vertical",
|
|
29
29
|
className: "h-4 w-4 !min-w-4"
|
|
30
|
-
}) }), /* @__PURE__ */
|
|
30
|
+
}) }), /* @__PURE__ */ n(a.Content, {
|
|
31
31
|
className: "text-xs text-zinc-700 dark:text-zinc-300",
|
|
32
|
-
children: /* @__PURE__ */
|
|
32
|
+
children: /* @__PURE__ */ n("div", {
|
|
33
33
|
className: "min-w-44 rounded-md border border-gray-200 bg-white p-1 shadow-lg dark:border-zinc-700 dark:bg-zinc-800",
|
|
34
|
-
children: /* @__PURE__ */
|
|
34
|
+
children: /* @__PURE__ */ r("ul", {
|
|
35
35
|
className: "m-0 flex list-none flex-col p-0",
|
|
36
36
|
children: [
|
|
37
|
-
/* @__PURE__ */
|
|
37
|
+
/* @__PURE__ */ n("li", { children: /* @__PURE__ */ n("button", {
|
|
38
38
|
type: "button",
|
|
39
39
|
className: e,
|
|
40
40
|
onClick: p,
|
|
41
41
|
children: "Duplicate class"
|
|
42
42
|
}) }),
|
|
43
|
-
/* @__PURE__ */
|
|
43
|
+
/* @__PURE__ */ n("li", { children: /* @__PURE__ */ n("button", {
|
|
44
44
|
type: "button",
|
|
45
45
|
className: e,
|
|
46
46
|
onClick: m,
|
|
47
47
|
children: "Remove from this element"
|
|
48
48
|
}) }),
|
|
49
|
-
/* @__PURE__ */
|
|
49
|
+
/* @__PURE__ */ n("li", { children: /* @__PURE__ */ n("button", {
|
|
50
50
|
type: "button",
|
|
51
51
|
className: `${e} text-red-600 dark:text-red-400`,
|
|
52
52
|
onClick: h,
|
|
@@ -57,5 +57,4 @@ var l = ({ selector: l = "", type: u = "class", onAction: d }) => {
|
|
|
57
57
|
})
|
|
58
58
|
})] });
|
|
59
59
|
};
|
|
60
|
-
//#endregion
|
|
61
60
|
export { l as default };
|
|
@@ -4,7 +4,7 @@ import { useCallback as n } from "react";
|
|
|
4
4
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
5
|
import a from "clsx";
|
|
6
6
|
import o from "@plitzi/plitzi-ui/ContentEditable";
|
|
7
|
-
|
|
7
|
+
// src/builder/components/Selector/SelectorItem/SelectorItem.tsx
|
|
8
8
|
var s = ({ className: s = "", selector: c = "", type: l = "class", editable: u = !0, active: d = !1, readOnly: f = !1, onClick: p, onChange: m, onAction: h }) => {
|
|
9
9
|
let g = n((e) => {
|
|
10
10
|
e.preventDefault(), f || e.stopPropagation(), p?.({
|
|
@@ -46,5 +46,4 @@ var s = ({ className: s = "", selector: c = "", type: l = "class", editable: u =
|
|
|
46
46
|
})]
|
|
47
47
|
});
|
|
48
48
|
};
|
|
49
|
-
//#endregion
|
|
50
49
|
export { s as default };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
// src/builder/components/Selector/SelectorItem/helpers.ts
|
|
2
2
|
var e = "w-full cursor-pointer rounded px-2 py-1.5 text-left hover:bg-gray-100 focus-visible:bg-gray-100 focus-visible:outline-none dark:hover:bg-zinc-700 dark:focus-visible:bg-zinc-700";
|
|
3
|
-
//#endregion
|
|
4
3
|
export { e as ITEM_CLASS };
|
|
@@ -2,7 +2,7 @@ import e from "./SuggestionsCreator.mjs";
|
|
|
2
2
|
import t from "./SuggestionsList.mjs";
|
|
3
3
|
import { useCallback as n, useMemo as r } from "react";
|
|
4
4
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
|
-
|
|
5
|
+
// src/builder/components/Selector/SelectorSuggestions/SelectorSuggestions.tsx
|
|
6
6
|
var o = ({ onSelect: o, onCreate: s, selector: c = "", selectors: l = [] }) => {
|
|
7
7
|
let u = r(() => c && l.find((e) => e.name === c), [c, l]), d = n((e) => o?.(e), [o]), f = n((e) => s?.(e), [s]), p = r(() => {
|
|
8
8
|
let e = l;
|
|
@@ -19,5 +19,4 @@ var o = ({ onSelect: o, onCreate: s, selector: c = "", selectors: l = [] }) => {
|
|
|
19
19
|
})]
|
|
20
20
|
});
|
|
21
21
|
};
|
|
22
|
-
//#endregion
|
|
23
22
|
export { o as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import e from "../SelectorItem/index.mjs";
|
|
2
2
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
-
|
|
3
|
+
// src/builder/components/Selector/SelectorSuggestions/SuggestionsCreator.tsx
|
|
4
4
|
var r = ({ selector: r, onClick: i }) => /* @__PURE__ */ n("div", {
|
|
5
5
|
className: "flex flex-col",
|
|
6
6
|
children: [/* @__PURE__ */ t("div", {
|
|
@@ -16,5 +16,4 @@ var r = ({ selector: r, onClick: i }) => /* @__PURE__ */ n("div", {
|
|
|
16
16
|
})]
|
|
17
17
|
})]
|
|
18
18
|
});
|
|
19
|
-
//#endregion
|
|
20
19
|
export { r as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import e from "../SelectorItem/index.mjs";
|
|
2
2
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
-
|
|
3
|
+
// src/builder/components/Selector/SelectorSuggestions/SuggestionsList.tsx
|
|
4
4
|
var r = ({ selectors: r = [], onSelect: i }) => /* @__PURE__ */ n("div", {
|
|
5
5
|
className: "flex w-full flex-col",
|
|
6
6
|
children: [/* @__PURE__ */ t("div", {
|
|
@@ -21,5 +21,4 @@ var r = ({ selectors: r = [], onSelect: i }) => /* @__PURE__ */ n("div", {
|
|
|
21
21
|
})]
|
|
22
22
|
})]
|
|
23
23
|
});
|
|
24
|
-
//#endregion
|
|
25
24
|
export { r as default };
|