@plitzi/sdk-style 0.30.19
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 +1398 -0
- package/dist/BuilderStyleContextProvider.d.ts +12 -0
- package/dist/BuilderStyleContextProvider.mjs +209 -0
- package/dist/SdkStyleContextProvider.d.ts +8 -0
- package/dist/SdkStyleContextProvider.mjs +16 -0
- package/dist/StyleAdvanceEditor.d.ts +2 -0
- package/dist/StyleAdvanceEditor.mjs +88 -0
- package/dist/StyleContext.d.ts +3 -0
- package/dist/StyleContext.mjs +5 -0
- package/dist/StyleHelper.d.ts +7 -0
- package/dist/StyleHelper.mjs +45 -0
- package/dist/StyleMap/StyleMap.d.ts +52 -0
- package/dist/StyleMap/StyleMap.mjs +61 -0
- package/dist/StyleMap/helpers/getStyleItem.d.ts +3 -0
- package/dist/StyleMap/helpers/getStyleItem.mjs +5 -0
- package/dist/StyleMap/helpers/isValueValid.d.ts +12 -0
- package/dist/StyleMap/helpers/isValueValid.mjs +7 -0
- package/dist/StyleMap/helpers/utils.d.ts +6 -0
- package/dist/StyleMap/helpers/utils.mjs +51 -0
- package/dist/StyleMap/index.d.ts +3 -0
- package/dist/StyleMap/index.mjs +5 -0
- package/dist/StyleMap/methods/addSelector.d.ts +8 -0
- package/dist/StyleMap/methods/addSelector.mjs +24 -0
- package/dist/StyleMap/methods/updateSelector.d.ts +8 -0
- package/dist/StyleMap/methods/updateSelector.mjs +13 -0
- package/dist/StyleReducer.d.ts +82 -0
- package/dist/StyleReducer.mjs +101 -0
- package/dist/_virtual/_rolldown/runtime.mjs +11 -0
- package/dist/components/InputEasing/BezierEasing.d.ts +1 -0
- package/dist/components/InputEasing/BezierEasing.mjs +34 -0
- package/dist/components/InputEasing/Curve.d.ts +9 -0
- package/dist/components/InputEasing/Curve.mjs +11 -0
- package/dist/components/InputEasing/Grid.d.ts +8 -0
- package/dist/components/InputEasing/Grid.mjs +51 -0
- package/dist/components/InputEasing/InputEasing.d.ts +31 -0
- package/dist/components/InputEasing/InputEasing.mjs +121 -0
- package/dist/components/InputEasing/InputEasingButton.d.ts +9 -0
- package/dist/components/InputEasing/InputEasingButton.mjs +16 -0
- package/dist/components/InputEasing/InputEasingHelper.d.ts +1 -0
- package/dist/components/InputEasing/InputEasingHelper.mjs +179 -0
- package/dist/components/InputEasing/InputEasingList.d.ts +6 -0
- package/dist/components/InputEasing/InputEasingList.mjs +291 -0
- package/dist/components/InputEasing/Progress.d.ts +10 -0
- package/dist/components/InputEasing/Progress.mjs +15 -0
- package/dist/components/InputEasing/index.d.ts +3 -0
- package/dist/components/InputEasing/index.mjs +5 -0
- package/dist/components/Selector/Selector.d.ts +16 -0
- package/dist/components/Selector/Selector.mjs +171 -0
- package/dist/components/Selector/SelectorHelper.d.ts +1 -0
- package/dist/components/Selector/SelectorHelper.mjs +4 -0
- package/dist/components/Selector/SelectorItem/ItemOptions.d.ts +9 -0
- package/dist/components/Selector/SelectorItem/ItemOptions.mjs +57 -0
- package/dist/components/Selector/SelectorItem/SelectorItem.d.ts +15 -0
- package/dist/components/Selector/SelectorItem/SelectorItem.mjs +50 -0
- package/dist/components/Selector/SelectorItem/index.d.ts +3 -0
- package/dist/components/Selector/SelectorItem/index.mjs +5 -0
- package/dist/components/Selector/SelectorSuggestions/SelectorSuggestions.d.ts +9 -0
- package/dist/components/Selector/SelectorSuggestions/SelectorSuggestions.mjs +23 -0
- package/dist/components/Selector/SelectorSuggestions/SuggestionsCreator.d.ts +7 -0
- package/dist/components/Selector/SelectorSuggestions/SuggestionsCreator.mjs +20 -0
- package/dist/components/Selector/SelectorSuggestions/SuggestionsList.d.ts +7 -0
- package/dist/components/Selector/SelectorSuggestions/SuggestionsList.mjs +25 -0
- package/dist/components/Selector/SelectorSuggestions/index.d.ts +3 -0
- package/dist/components/Selector/SelectorSuggestions/index.mjs +5 -0
- package/dist/components/Selector/index.d.ts +3 -0
- package/dist/components/Selector/index.mjs +5 -0
- package/dist/components/StyleInspector/Inspector.d.ts +15 -0
- package/dist/components/StyleInspector/Inspector.mjs +178 -0
- package/dist/components/StyleInspector/StyleInspector.d.ts +21 -0
- package/dist/components/StyleInspector/StyleInspector.mjs +201 -0
- package/dist/components/StyleInspector/StyleInspectorContext.d.ts +23 -0
- package/dist/components/StyleInspector/StyleInspectorContext.mjs +5 -0
- package/dist/components/StyleInspector/StyleInspectorProvider.d.ts +17 -0
- package/dist/components/StyleInspector/StyleInspectorProvider.mjs +86 -0
- package/dist/components/StyleInspector/categories/Background/Background.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Background/Background.mjs +142 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundLayer/BackgroundLayer.d.ts +12 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundLayer/BackgroundLayer.mjs +171 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundLayer/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundLayer/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundPosition/BackgroundPosition.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundPosition/BackgroundPosition.mjs +39 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundPosition/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundPosition/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundSize/BackgroundSize.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundSize/BackgroundSize.mjs +86 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundSize/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundSize/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundTile/BackgroundTile.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundTile/BackgroundTile.mjs +47 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundTile/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundTile/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientPreviewBar.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientPreviewBar.mjs +20 -0
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopBar.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopBar.mjs +94 -0
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopEditor.d.ts +10 -0
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopEditor.mjs +48 -0
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopHandle.d.ts +11 -0
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopHandle.mjs +44 -0
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopTrack.d.ts +9 -0
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopTrack.mjs +27 -0
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/Background/helpers/backgroundParser.d.ts +56 -0
- package/dist/components/StyleInspector/categories/Background/helpers/backgroundParser.mjs +182 -0
- package/dist/components/StyleInspector/categories/Background/helpers/normalizeLeft.d.ts +2 -0
- package/dist/components/StyleInspector/categories/Background/helpers/normalizeLeft.mjs +10 -0
- package/dist/components/StyleInspector/categories/Background/helpers/parseToBgLayers.d.ts +5 -0
- package/dist/components/StyleInspector/categories/Background/helpers/parseToBgLayers.mjs +19 -0
- package/dist/components/StyleInspector/categories/Background/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Background/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/Background/modes/ConicGradientMode.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Background/modes/ConicGradientMode.mjs +100 -0
- package/dist/components/StyleInspector/categories/Background/modes/ImageMode.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Background/modes/ImageMode.mjs +80 -0
- package/dist/components/StyleInspector/categories/Background/modes/LinearGradientMode.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Background/modes/LinearGradientMode.mjs +76 -0
- package/dist/components/StyleInspector/categories/Background/modes/RadialGradientMode.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Background/modes/RadialGradientMode.mjs +120 -0
- package/dist/components/StyleInspector/categories/Border/Border.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Border/Border.mjs +126 -0
- package/dist/components/StyleInspector/categories/Border/BorderColor.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Border/BorderColor.mjs +34 -0
- package/dist/components/StyleInspector/categories/Border/BorderPlacements.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Border/BorderPlacements.mjs +55 -0
- package/dist/components/StyleInspector/categories/Border/BorderRadius.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Border/BorderRadius.mjs +132 -0
- package/dist/components/StyleInspector/categories/Border/BorderStyle.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Border/BorderStyle.mjs +63 -0
- package/dist/components/StyleInspector/categories/Border/BorderWidth.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Border/BorderWidth.mjs +34 -0
- package/dist/components/StyleInspector/categories/Border/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Border/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/Display/Display.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Display/Display.mjs +120 -0
- package/dist/components/StyleInspector/categories/Display/DisplayElements.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Display/DisplayElements.mjs +64 -0
- package/dist/components/StyleInspector/categories/Display/DisplayFlex.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Display/DisplayFlex.mjs +46 -0
- package/dist/components/StyleInspector/categories/Display/DisplayFlexAlignContent.d.ts +9 -0
- package/dist/components/StyleInspector/categories/Display/DisplayFlexAlignContent.mjs +97 -0
- package/dist/components/StyleInspector/categories/Display/DisplayFlexAlignItems.d.ts +9 -0
- package/dist/components/StyleInspector/categories/Display/DisplayFlexAlignItems.mjs +102 -0
- package/dist/components/StyleInspector/categories/Display/DisplayFlexDirection.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Display/DisplayFlexDirection.mjs +46 -0
- package/dist/components/StyleInspector/categories/Display/DisplayFlexJustify.d.ts +9 -0
- package/dist/components/StyleInspector/categories/Display/DisplayFlexJustify.mjs +88 -0
- package/dist/components/StyleInspector/categories/Display/DisplayGap.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Display/DisplayGap.mjs +27 -0
- package/dist/components/StyleInspector/categories/Display/DisplayGridGap.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Display/DisplayGridGap.mjs +27 -0
- package/dist/components/StyleInspector/categories/Display/DisplayGridTemplate.d.ts +12 -0
- package/dist/components/StyleInspector/categories/Display/DisplayGridTemplate.mjs +83 -0
- package/dist/components/StyleInspector/categories/Display/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Display/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/DisplayFlexChild/DisplayAlignSelf.d.ts +8 -0
- package/dist/components/StyleInspector/categories/DisplayFlexChild/DisplayAlignSelf.mjs +60 -0
- package/dist/components/StyleInspector/categories/DisplayFlexChild/DisplayFlexChild.d.ts +8 -0
- package/dist/components/StyleInspector/categories/DisplayFlexChild/DisplayFlexChild.mjs +125 -0
- package/dist/components/StyleInspector/categories/DisplayFlexChild/DisplayOrder.d.ts +7 -0
- package/dist/components/StyleInspector/categories/DisplayFlexChild/DisplayOrder.mjs +51 -0
- package/dist/components/StyleInspector/categories/DisplayFlexChild/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/DisplayFlexChild/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/Effects/BoxShadow/BoxShadow.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Effects/BoxShadow/BoxShadow.mjs +37 -0
- package/dist/components/StyleInspector/categories/Effects/BoxShadow/BoxShadowItem.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Effects/BoxShadow/BoxShadowItem.mjs +130 -0
- package/dist/components/StyleInspector/categories/Effects/BoxShadow/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Effects/BoxShadow/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/Effects/Effects.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Effects/Effects.mjs +247 -0
- package/dist/components/StyleInspector/categories/Effects/Filters/Filter.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Effects/Filters/Filter.mjs +37 -0
- package/dist/components/StyleInspector/categories/Effects/Filters/FilterItem.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Effects/Filters/FilterItem.mjs +129 -0
- package/dist/components/StyleInspector/categories/Effects/Filters/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Effects/Filters/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/Effects/Transform/Transform.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Effects/Transform/Transform.mjs +37 -0
- package/dist/components/StyleInspector/categories/Effects/Transform/TransformItem.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Effects/Transform/TransformItem.mjs +148 -0
- package/dist/components/StyleInspector/categories/Effects/Transform/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Effects/Transform/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/Effects/Transition/Transition.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Effects/Transition/Transition.mjs +41 -0
- package/dist/components/StyleInspector/categories/Effects/Transition/TransitionItem.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Effects/Transition/TransitionItem.mjs +365 -0
- package/dist/components/StyleInspector/categories/Effects/Transition/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Effects/Transition/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/Effects/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Effects/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/List/List.d.ts +7 -0
- package/dist/components/StyleInspector/categories/List/List.mjs +82 -0
- package/dist/components/StyleInspector/categories/List/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/List/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/ListItem/ListItem.d.ts +7 -0
- package/dist/components/StyleInspector/categories/ListItem/ListItem.mjs +82 -0
- package/dist/components/StyleInspector/categories/ListItem/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/ListItem/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/Position/Position.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Position/Position.mjs +129 -0
- package/dist/components/StyleInspector/categories/Position/PositionAdvanced.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Position/PositionAdvanced.mjs +88 -0
- package/dist/components/StyleInspector/categories/Position/PositionAdvancedButtons.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Position/PositionAdvancedButtons.mjs +132 -0
- package/dist/components/StyleInspector/categories/Position/PositionClear.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Position/PositionClear.mjs +45 -0
- package/dist/components/StyleInspector/categories/Position/PositionFloat.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Position/PositionFloat.mjs +38 -0
- package/dist/components/StyleInspector/categories/Position/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Position/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/RawStyle/RawStyle.d.ts +8 -0
- package/dist/components/StyleInspector/categories/RawStyle/RawStyle.mjs +27 -0
- package/dist/components/StyleInspector/categories/RawStyle/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/RawStyle/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/Size/Size.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Size/Size.mjs +101 -0
- package/dist/components/StyleInspector/categories/Size/SizeFit.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Size/SizeFit.mjs +39 -0
- package/dist/components/StyleInspector/categories/Size/SizeOverflow.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Size/SizeOverflow.mjs +49 -0
- package/dist/components/StyleInspector/categories/Size/SizePosition.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Size/SizePosition.mjs +30 -0
- package/dist/components/StyleInspector/categories/Size/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Size/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/Spacing/Spacing.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Spacing/Spacing.mjs +72 -0
- package/dist/components/StyleInspector/categories/Spacing/SpacingEditor.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Spacing/SpacingEditor.mjs +155 -0
- package/dist/components/StyleInspector/categories/Spacing/SpacingMargin.d.ts +19 -0
- package/dist/components/StyleInspector/categories/Spacing/SpacingMargin.mjs +72 -0
- package/dist/components/StyleInspector/categories/Spacing/SpacingNumber.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Spacing/SpacingNumber.mjs +17 -0
- package/dist/components/StyleInspector/categories/Spacing/SpacingPadding.d.ts +15 -0
- package/dist/components/StyleInspector/categories/Spacing/SpacingPadding.mjs +69 -0
- package/dist/components/StyleInspector/categories/Spacing/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Spacing/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/Typography/Typography.d.ts +11 -0
- package/dist/components/StyleInspector/categories/Typography/Typography.mjs +224 -0
- package/dist/components/StyleInspector/categories/Typography/TypographyAlign.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Typography/TypographyAlign.mjs +41 -0
- package/dist/components/StyleInspector/categories/Typography/TypographyConstants.d.ts +5 -0
- package/dist/components/StyleInspector/categories/Typography/TypographyConstants.mjs +172 -0
- package/dist/components/StyleInspector/categories/Typography/TypographyFont.d.ts +10 -0
- package/dist/components/StyleInspector/categories/Typography/TypographyFont.mjs +22 -0
- package/dist/components/StyleInspector/categories/Typography/TypographyStyle.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Typography/TypographyStyle.mjs +64 -0
- package/dist/components/StyleInspector/categories/Typography/TypographyTextShadow.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Typography/TypographyTextShadow.mjs +43 -0
- package/dist/components/StyleInspector/categories/Typography/TypographyTextShadowItem.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Typography/TypographyTextShadowItem.mjs +83 -0
- package/dist/components/StyleInspector/categories/Typography/TypographyTransform.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Typography/TypographyTransform.mjs +68 -0
- package/dist/components/StyleInspector/categories/Typography/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Typography/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/Variables/Variables.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Variables/Variables.mjs +55 -0
- package/dist/components/StyleInspector/categories/Variables/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Variables/index.mjs +5 -0
- package/dist/components/StyleInspector/components/CategoryContainer/CategoryContainer.d.ts +13 -0
- package/dist/components/StyleInspector/components/CategoryContainer/CategoryContainer.mjs +27 -0
- package/dist/components/StyleInspector/components/CategoryContainer/index.d.ts +3 -0
- package/dist/components/StyleInspector/components/CategoryContainer/index.mjs +5 -0
- package/dist/components/StyleInspector/components/CategoryOption/CategoryOption.d.ts +39 -0
- package/dist/components/StyleInspector/components/CategoryOption/CategoryOption.mjs +30 -0
- package/dist/components/StyleInspector/components/CategoryOption/categoryTypes/OptionColor.d.ts +8 -0
- package/dist/components/StyleInspector/components/CategoryOption/categoryTypes/OptionColor.mjs +16 -0
- package/dist/components/StyleInspector/components/CategoryOption/categoryTypes/OptionIconGroup.d.ts +15 -0
- package/dist/components/StyleInspector/components/CategoryOption/categoryTypes/OptionIconGroup.mjs +27 -0
- package/dist/components/StyleInspector/components/CategoryOption/categoryTypes/OptionInput.d.ts +8 -0
- package/dist/components/StyleInspector/components/CategoryOption/categoryTypes/OptionInput.mjs +14 -0
- package/dist/components/StyleInspector/components/CategoryOption/categoryTypes/OptionMetricInput.d.ts +18 -0
- package/dist/components/StyleInspector/components/CategoryOption/categoryTypes/OptionMetricInput.mjs +69 -0
- package/dist/components/StyleInspector/components/CategoryOption/categoryTypes/OptionSelect.d.ts +10 -0
- package/dist/components/StyleInspector/components/CategoryOption/categoryTypes/OptionSelect.mjs +13 -0
- package/dist/components/StyleInspector/components/CategoryOption/index.d.ts +3 -0
- package/dist/components/StyleInspector/components/CategoryOption/index.mjs +5 -0
- package/dist/components/StyleInspector/components/CategorySection/CategorySection.d.ts +12 -0
- package/dist/components/StyleInspector/components/CategorySection/CategorySection.mjs +18 -0
- package/dist/components/StyleInspector/components/CategorySection/index.d.ts +3 -0
- package/dist/components/StyleInspector/components/CategorySection/index.mjs +5 -0
- package/dist/components/StyleInspector/components/InspectorDots/InspectorDots.d.ts +6 -0
- package/dist/components/StyleInspector/components/InspectorDots/InspectorDots.mjs +32 -0
- package/dist/components/StyleInspector/components/InspectorDots/index.d.ts +3 -0
- package/dist/components/StyleInspector/components/InspectorDots/index.mjs +5 -0
- package/dist/components/StyleInspector/components/InspectorLabel/InspectorLabel.d.ts +11 -0
- package/dist/components/StyleInspector/components/InspectorLabel/InspectorLabel.mjs +40 -0
- package/dist/components/StyleInspector/components/InspectorLabel/index.d.ts +3 -0
- package/dist/components/StyleInspector/components/InspectorLabel/index.mjs +5 -0
- package/dist/components/StyleInspector/hooks/useInspectorValues.d.ts +21 -0
- package/dist/components/StyleInspector/hooks/useInspectorValues.mjs +55 -0
- package/dist/components/StyleInspector/hooks/useStyleBinding.d.ts +6 -0
- package/dist/components/StyleInspector/hooks/useStyleBinding.mjs +20 -0
- package/dist/components/StyleInspector/hooks/useStyleInherit.d.ts +12 -0
- package/dist/components/StyleInspector/hooks/useStyleInherit.mjs +33 -0
- package/dist/components/StyleInspector/index.d.ts +3 -0
- package/dist/components/StyleInspector/index.mjs +5 -0
- package/dist/components/StyleManager/ManagerSelector.d.ts +11 -0
- package/dist/components/StyleManager/ManagerSelector.mjs +137 -0
- package/dist/components/StyleManager/StyleManager.d.ts +2 -0
- package/dist/components/StyleManager/StyleManager.mjs +47 -0
- package/dist/components/StyleManager/StyleSelectorTag.d.ts +12 -0
- package/dist/components/StyleManager/StyleSelectorTag.mjs +43 -0
- package/dist/components/StyleManager/index.d.ts +3 -0
- package/dist/components/StyleManager/index.mjs +5 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.mjs +6 -0
- package/dist/helpers/calculateInheriting.d.ts +121 -0
- package/dist/helpers/calculateInheriting.mjs +141 -0
- package/dist/helpers/formatCssFromSelector.d.ts +8 -0
- package/dist/helpers/formatCssFromSelector.mjs +54 -0
- package/dist/helpers/generateStyleSelector.d.ts +9 -0
- package/dist/helpers/generateStyleSelector.mjs +19 -0
- package/dist/helpers/index.d.ts +10 -0
- package/dist/helpers/index.mjs +18 -0
- package/dist/helpers/processCssTokens.d.ts +8 -0
- package/dist/helpers/processCssTokens.mjs +16 -0
- package/dist/helpers/processSelector.d.ts +4 -0
- package/dist/helpers/processSelector.mjs +39 -0
- package/dist/helpers/processSelectorAttributes.d.ts +17 -0
- package/dist/helpers/processSelectorAttributes.mjs +94 -0
- package/dist/helpers/processSelectorName.d.ts +3 -0
- package/dist/helpers/processSelectorName.mjs +19 -0
- package/dist/helpers/processSelectorVariables.d.ts +7 -0
- package/dist/helpers/processSelectorVariables.mjs +30 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.mjs +16 -0
- package/dist/models/SelectorForm/SelectorForm.d.ts +21 -0
- package/dist/models/SelectorForm/SelectorForm.mjs +73 -0
- package/dist/models/SelectorForm/index.d.ts +3 -0
- package/dist/models/SelectorForm/index.mjs +5 -0
- package/package.json +849 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import e from "../../hooks/useInspectorValues.mjs";
|
|
2
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/StyleInspector/components/InspectorDots/InspectorDots.tsx
|
|
4
|
+
var r = ({ styleKeys: r }) => {
|
|
5
|
+
let { hasInherit: i, hasBinding: a, hasVariables: o, hasValues: s } = e({
|
|
6
|
+
keys: r,
|
|
7
|
+
asValue: !1
|
|
8
|
+
});
|
|
9
|
+
return /* @__PURE__ */ n("div", {
|
|
10
|
+
className: "flex items-center gap-1.5",
|
|
11
|
+
children: [
|
|
12
|
+
i && /* @__PURE__ */ t("div", {
|
|
13
|
+
className: "h-1.5 w-1.5 rounded-full bg-orange-300",
|
|
14
|
+
title: "Has Inherit"
|
|
15
|
+
}),
|
|
16
|
+
s && /* @__PURE__ */ t("div", {
|
|
17
|
+
className: "h-1.5 w-1.5 rounded-full bg-blue-300",
|
|
18
|
+
title: "Has Value"
|
|
19
|
+
}),
|
|
20
|
+
a && /* @__PURE__ */ t("div", {
|
|
21
|
+
className: "h-1.5 w-1.5 rounded-full bg-purple-300",
|
|
22
|
+
title: "Has Binding"
|
|
23
|
+
}),
|
|
24
|
+
o && /* @__PURE__ */ t("div", {
|
|
25
|
+
className: "h-1.5 w-1.5 rounded-full bg-green-300",
|
|
26
|
+
title: "Has Variables"
|
|
27
|
+
})
|
|
28
|
+
]
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
//#endregion
|
|
32
|
+
export { r as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { StyleCategory } from '@plitzi/sdk-shared';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export type InspectorLabelProps = {
|
|
4
|
+
className?: string;
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
keyValue?: StyleCategory[];
|
|
7
|
+
size?: 'small' | 'medium' | 'normal' | 'custom';
|
|
8
|
+
sectionTitle?: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare const _default: import('react').MemoExoticComponent<({ keyValue, children, className, size, sectionTitle }: InspectorLabelProps) => import("react/jsx-runtime").JSX.Element>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import e from "../../StyleInspectorContext.mjs";
|
|
2
|
+
import t from "../../hooks/useInspectorValues.mjs";
|
|
3
|
+
import n from "clsx";
|
|
4
|
+
import { memo as r, use as i, useCallback as a } from "react";
|
|
5
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
6
|
+
var s = r(({ keyValue: r, children: s, className: c = "", size: l = "small", sectionTitle: u = !1 }) => {
|
|
7
|
+
let { resetValue: d } = i(e), { hasValues: f, hasInherit: p, hasBinding: m, hasVariables: h } = t({
|
|
8
|
+
keys: r,
|
|
9
|
+
asValue: !1
|
|
10
|
+
}), g = a(() => {
|
|
11
|
+
!f || !r || d(r);
|
|
12
|
+
}, [
|
|
13
|
+
d,
|
|
14
|
+
f,
|
|
15
|
+
r
|
|
16
|
+
]);
|
|
17
|
+
return /* @__PURE__ */ o("div", {
|
|
18
|
+
className: n("inspector__label flex min-w-[50px] shrink-0 items-center select-none", c, {
|
|
19
|
+
"text-xs": l === "small",
|
|
20
|
+
"text-sm": l === "medium",
|
|
21
|
+
"text-base": l === "normal",
|
|
22
|
+
"mb-[-1px] p-0": u
|
|
23
|
+
}),
|
|
24
|
+
title: typeof s == "string" ? s : void 0,
|
|
25
|
+
children: /* @__PURE__ */ o("label", {
|
|
26
|
+
className: n("m-0 truncate", {
|
|
27
|
+
"px-1": !u,
|
|
28
|
+
"rounded-tl rounded-tr border border-gray-300 bg-gray-100 px-2 font-bold text-zinc-700 dark:border-zinc-600 dark:bg-zinc-700 dark:text-zinc-200": u,
|
|
29
|
+
"cursor-pointer bg-blue-200 text-blue-600 dark:bg-blue-900/50 dark:text-blue-400": f && !m && !h,
|
|
30
|
+
"cursor-pointer bg-green-200 text-green-600 dark:bg-green-900/50 dark:text-green-400": h,
|
|
31
|
+
"cursor-pointer bg-purple-200 text-purple-600 dark:bg-purple-900/50 dark:text-purple-400": m,
|
|
32
|
+
"bg-orange-200 text-orange-600 dark:bg-orange-900/50 dark:text-orange-400": p && !f && !h
|
|
33
|
+
}),
|
|
34
|
+
onClick: g,
|
|
35
|
+
children: s
|
|
36
|
+
})
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
//#endregion
|
|
40
|
+
export { s as default };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { StyleInspectorContextValue } from '../StyleInspectorContext';
|
|
2
|
+
import { StyleCategory, StyleValue } from '@plitzi/sdk-shared';
|
|
3
|
+
export type UseInspectorValuesProps<TAsValue extends boolean> = {
|
|
4
|
+
keys?: StyleCategory[];
|
|
5
|
+
skipContext?: boolean;
|
|
6
|
+
context?: StyleInspectorContextValue;
|
|
7
|
+
skipValidations?: boolean;
|
|
8
|
+
asValue?: TAsValue;
|
|
9
|
+
defaultValues?: Partial<Record<StyleCategory, StyleValue>>;
|
|
10
|
+
strictMode?: boolean;
|
|
11
|
+
replaceTokens?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export type UseInspectorValuesReturn<TAsValue extends boolean> = TAsValue extends true ? Record<StyleCategory, StyleValue> : {
|
|
14
|
+
values: Record<StyleCategory, StyleValue>;
|
|
15
|
+
hasInherit: boolean;
|
|
16
|
+
hasBinding: boolean;
|
|
17
|
+
hasVariables: boolean;
|
|
18
|
+
hasValues: boolean;
|
|
19
|
+
};
|
|
20
|
+
declare const useInspectorValues: <TAsValue extends boolean>({ keys, skipContext, context, asValue, defaultValues, strictMode, replaceTokens }: UseInspectorValuesProps<TAsValue>) => UseInspectorValuesReturn<TAsValue>;
|
|
21
|
+
export default useInspectorValues;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import e from "../StyleInspectorContext.mjs";
|
|
2
|
+
import { get as t, pick as n } from "@plitzi/plitzi-ui/helpers";
|
|
3
|
+
import { use as r, useMemo as i } from "react";
|
|
4
|
+
import { baseDefaultValue as a } from "@plitzi/sdk-shared";
|
|
5
|
+
import { VARIABLE_REGEX as o } from "@plitzi/sdk-shared/schema/schemaConstants";
|
|
6
|
+
//#region src/components/StyleInspector/hooks/useInspectorValues.ts
|
|
7
|
+
var s = ({ keys: s, skipContext: c = !1, context: l = {}, asValue: u = !1, defaultValues: d, strictMode: f = !1, replaceTokens: p = !1 }) => {
|
|
8
|
+
let { inheritData: m, bindingData: h, variables: g, getValues: _ } = {};
|
|
9
|
+
c ? {inheritData: m, bindingData: h, variables: g, getValues: _} = l : {inheritData: m, bindingData: h, variables: g, getValues: _} = r(e);
|
|
10
|
+
let v = _(), y = i(() => !!s && !u && Object.keys(m).filter((e) => s.includes(e) || s.length === 0).length > 0, [
|
|
11
|
+
s,
|
|
12
|
+
m,
|
|
13
|
+
u
|
|
14
|
+
]), b = i(() => !!s && !u && Object.keys(h).filter((e) => s.includes(e) || s.length === 0).length > 0, [
|
|
15
|
+
s,
|
|
16
|
+
h,
|
|
17
|
+
u
|
|
18
|
+
]), x = i(() => !!s && !u && Object.keys(n(v, s)).filter((e) => typeof v[e] == "string" && o.test(v[e])).length > 0, [
|
|
19
|
+
s,
|
|
20
|
+
v,
|
|
21
|
+
u
|
|
22
|
+
]), S = i(() => s ? s.length > 0 ? !u && Object.keys(n(v, s)).length > 0 : !u && Object.keys(v).length > 0 : !1, [
|
|
23
|
+
s,
|
|
24
|
+
u,
|
|
25
|
+
v
|
|
26
|
+
]), C = i(() => {
|
|
27
|
+
let e = {};
|
|
28
|
+
if (!s) return e;
|
|
29
|
+
let n = new RegExp(o, "g");
|
|
30
|
+
return s.forEach((r) => {
|
|
31
|
+
let i;
|
|
32
|
+
i = f ? t(v, r, t(d ?? {}, r)) : t(v, r, t(h, r, t(m, `${r}.0.value`, t(d ?? {}, r, a[r])))), p && typeof i == "string" && o.test(i) && [...i.matchAll(n)].forEach((e) => {
|
|
33
|
+
i = i.replace(e[0], t(g, e[1] ? e[1] : e[2], e[0]));
|
|
34
|
+
}), e[r] = i;
|
|
35
|
+
}), e;
|
|
36
|
+
}, [
|
|
37
|
+
s,
|
|
38
|
+
f,
|
|
39
|
+
p,
|
|
40
|
+
v,
|
|
41
|
+
d,
|
|
42
|
+
m,
|
|
43
|
+
h,
|
|
44
|
+
g
|
|
45
|
+
]);
|
|
46
|
+
return u ? C : {
|
|
47
|
+
values: C,
|
|
48
|
+
hasInherit: y,
|
|
49
|
+
hasBinding: b,
|
|
50
|
+
hasVariables: x,
|
|
51
|
+
hasValues: S
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
//#endregion
|
|
55
|
+
export { s as default };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Element, StyleCategory, StyleValue } from '@plitzi/sdk-shared';
|
|
2
|
+
export type UseStyleBindingProps = {
|
|
3
|
+
element?: Element;
|
|
4
|
+
};
|
|
5
|
+
declare const useStyleBinding: ({ element }: UseStyleBindingProps) => Partial<Record<StyleCategory, StyleValue>>;
|
|
6
|
+
export default useStyleBinding;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { get as e, set as t } from "@plitzi/plitzi-ui/helpers";
|
|
2
|
+
import { useMemo as n } from "react";
|
|
3
|
+
import r from "@plitzi/sdk-shared/dataSource/hooks/useDataSource";
|
|
4
|
+
//#region src/components/StyleInspector/hooks/useStyleBinding.ts
|
|
5
|
+
var i = ({ element: i }) => {
|
|
6
|
+
let a = r({
|
|
7
|
+
id: "",
|
|
8
|
+
mode: "read"
|
|
9
|
+
});
|
|
10
|
+
return n(() => {
|
|
11
|
+
let n = {};
|
|
12
|
+
if (!i) return n;
|
|
13
|
+
let { definition: { bindings: r } } = i;
|
|
14
|
+
return r?.style && r.style.forEach((r) => {
|
|
15
|
+
e(a, `${r.source}.${r.fromPath}`) === void 0 || !r.enabled || t(n, r.toPath, e(a, `${r.source}.${r.fromPath}`));
|
|
16
|
+
}), n;
|
|
17
|
+
}, [a, i]);
|
|
18
|
+
};
|
|
19
|
+
//#endregion
|
|
20
|
+
export { i as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Element, StyleState } from '@plitzi/sdk-shared';
|
|
2
|
+
export type UseStyleInheritProps = {
|
|
3
|
+
element?: Element;
|
|
4
|
+
componentType?: string;
|
|
5
|
+
componentSubType?: string;
|
|
6
|
+
selector?: string;
|
|
7
|
+
styleSelector?: string;
|
|
8
|
+
styleState?: StyleState;
|
|
9
|
+
styleVariant?: string;
|
|
10
|
+
};
|
|
11
|
+
declare const useStyleInherit: ({ element, componentType, componentSubType, selector, styleSelector, styleState, styleVariant }: UseStyleInheritProps) => import('../../..').InheritData;
|
|
12
|
+
export default useStyleInherit;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import e from "../../../helpers/calculateInheriting.mjs";
|
|
2
|
+
import { use as t, useMemo as n } from "react";
|
|
3
|
+
import r from "@plitzi/sdk-shared/elements/ComponentContext";
|
|
4
|
+
import { createStoreHook as i } from "@plitzi/sdk-store/createStore";
|
|
5
|
+
//#region src/components/StyleInspector/hooks/useStyleInherit.ts
|
|
6
|
+
var a = ({ element: a, componentType: o, componentSubType: s, selector: c, styleSelector: l = "base", styleState: u, styleVariant: d }) => {
|
|
7
|
+
let { useStore: f } = i(), [[p, m]] = f(["schema.flat", "style.platform"]), { componentDefinitions: h } = t(r);
|
|
8
|
+
return n(() => {
|
|
9
|
+
let t = [], n = [], r = (a?.definition.styleSelectors[l] ?? "").split(" ");
|
|
10
|
+
return c && r.length > 1 && t.push(c), e(a, o, p, m, h.current, {
|
|
11
|
+
componentSubType: s,
|
|
12
|
+
styleSelector: l,
|
|
13
|
+
styleState: u,
|
|
14
|
+
styleVariant: d,
|
|
15
|
+
includeSelf: r.length > 1,
|
|
16
|
+
skipSelectors: t,
|
|
17
|
+
addSelectors: n
|
|
18
|
+
});
|
|
19
|
+
}, [
|
|
20
|
+
a,
|
|
21
|
+
l,
|
|
22
|
+
c,
|
|
23
|
+
o,
|
|
24
|
+
p,
|
|
25
|
+
m,
|
|
26
|
+
h,
|
|
27
|
+
s,
|
|
28
|
+
u,
|
|
29
|
+
d
|
|
30
|
+
]);
|
|
31
|
+
};
|
|
32
|
+
//#endregion
|
|
33
|
+
export { a as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DisplayMode, Element, StyleItem } from '@plitzi/sdk-shared';
|
|
2
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
3
|
+
export type ManagerSelectorProps = {
|
|
4
|
+
displayMode: DisplayMode;
|
|
5
|
+
flatList: Element[];
|
|
6
|
+
selected?: string;
|
|
7
|
+
onSelect?: Dispatch<SetStateAction<StyleItem | undefined>>;
|
|
8
|
+
selectors?: Record<string, StyleItem>;
|
|
9
|
+
};
|
|
10
|
+
declare const _default: import('react').MemoExoticComponent<({ displayMode, flatList, selectors, selected, onSelect }: ManagerSelectorProps) => import("react/jsx-runtime").JSX.Element>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import e from "./StyleSelectorTag.mjs";
|
|
2
|
+
import t from "../../models/SelectorForm/index.mjs";
|
|
3
|
+
import { memo as n, use as r, useCallback as i, useMemo as a, useState as o } from "react";
|
|
4
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
5
|
+
import l from "@plitzi/plitzi-ui/Modal";
|
|
6
|
+
import u from "@plitzi/plitzi-ui/Button";
|
|
7
|
+
import d from "@plitzi/sdk-shared/elements/ComponentContext";
|
|
8
|
+
import { get as f, isEmpty as p, set as m } from "@plitzi/plitzi-ui/helpers/lodash";
|
|
9
|
+
import h from "@plitzi/plitzi-ui/hooks/useDisclosure";
|
|
10
|
+
import g from "@plitzi/plitzi-ui/Input";
|
|
11
|
+
import { produce as _ } from "immer";
|
|
12
|
+
import v from "@plitzi/sdk-shared/builder/contexts/BuilderContext";
|
|
13
|
+
var y = n(({ displayMode: n, flatList: y, selectors: b, selected: x, onSelect: S }) => {
|
|
14
|
+
let C = a(() => Object.values(b ?? {}), [b]), [w, T] = o(""), { builderHandler: E } = r(v), { components: D } = r(d), O = a(() => C.filter((e) => !!e.componentType).map((e) => e.componentType), [C]), k = a(() => {
|
|
15
|
+
let e = C;
|
|
16
|
+
return p(w) || (e = C.filter((e) => e.name.toLowerCase().includes(w.toLowerCase()))), e.sort((e, t) => {
|
|
17
|
+
let n = Number(e.type === "element"), r = Number(t.type === "element");
|
|
18
|
+
return n === r ? e.name.localeCompare(t.name) : r - n;
|
|
19
|
+
});
|
|
20
|
+
}, [C, w]), A = i((e) => T(e), [T]), [j, M, N, P] = h({
|
|
21
|
+
id: "add-selector",
|
|
22
|
+
onClose: i((e, t) => {
|
|
23
|
+
if (t) if (t.mode === "default") {
|
|
24
|
+
let { name: e } = t;
|
|
25
|
+
E("styleAddSelector", n, e, "class", void 0, void 0, {
|
|
26
|
+
styleSelector: void 0,
|
|
27
|
+
componentType: void 0
|
|
28
|
+
});
|
|
29
|
+
} else {
|
|
30
|
+
let { componentType: e } = t;
|
|
31
|
+
E("styleAddSelector", n, e, "element", void 0, void 0, {
|
|
32
|
+
styleSelector: void 0,
|
|
33
|
+
componentType: e
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}, [E, n])
|
|
37
|
+
}), F = i((e) => {
|
|
38
|
+
S?.((t) => t?.name === e ? void 0 : C.find((t) => t.name === e));
|
|
39
|
+
}, [S, C]), I = i((e, t) => t ? Object.values(f(e, "definition.styleSelectors", {})).find((e) => (t.includes(":") && (t = f(t.split(":"), "0", t)), e && t && e.split(" ").includes(t))) : [], []), [L, R, z, B] = h({
|
|
40
|
+
id: "delete-selector",
|
|
41
|
+
onClose: i((e, t, r) => {
|
|
42
|
+
!t || !r || (y.filter((e) => I(e, r)).forEach((e) => {
|
|
43
|
+
E("schemaUpdateElement", _(e, (t) => {
|
|
44
|
+
Object.keys(e.definition.styleSelectors).forEach((e) => {
|
|
45
|
+
f(t, `definition.styleSelectors.${e}`, "") === r && m(t, `definition.styleSelectors.${e}`, "");
|
|
46
|
+
});
|
|
47
|
+
}));
|
|
48
|
+
}), E("styleRemoveSelector", n, r), S?.(void 0));
|
|
49
|
+
}, [
|
|
50
|
+
E,
|
|
51
|
+
n,
|
|
52
|
+
I,
|
|
53
|
+
y,
|
|
54
|
+
S
|
|
55
|
+
])
|
|
56
|
+
}), V = i((e) => z(void 0, e), [z]), H = a(() => k.reduce((e, t) => ({
|
|
57
|
+
...e,
|
|
58
|
+
[t.name]: y.filter((e) => I(e, t.name)).length
|
|
59
|
+
}), {}), [
|
|
60
|
+
k,
|
|
61
|
+
y,
|
|
62
|
+
I
|
|
63
|
+
]), U = i(() => void B(void 0, !1), [B]), W = i(() => void B(void 0, !0), [B]);
|
|
64
|
+
return /* @__PURE__ */ c("div", {
|
|
65
|
+
className: "flex max-w-[350px] grow basis-0 flex-col gap-2 overflow-auto border-r border-gray-300 pt-2 pr-2 dark:border-zinc-700",
|
|
66
|
+
children: [
|
|
67
|
+
/* @__PURE__ */ c(u, {
|
|
68
|
+
intent: "primary",
|
|
69
|
+
size: "sm",
|
|
70
|
+
className: "w-full",
|
|
71
|
+
iconPlacement: "before",
|
|
72
|
+
onClick: N,
|
|
73
|
+
children: [/* @__PURE__ */ s(u.Icon, {
|
|
74
|
+
icon: "fas fa-tint",
|
|
75
|
+
size: "md",
|
|
76
|
+
className: "text-base"
|
|
77
|
+
}), "New Selector"]
|
|
78
|
+
}),
|
|
79
|
+
/* @__PURE__ */ s(g, {
|
|
80
|
+
placeholder: "Search Selector",
|
|
81
|
+
value: w,
|
|
82
|
+
onChange: A,
|
|
83
|
+
size: "xs"
|
|
84
|
+
}),
|
|
85
|
+
/* @__PURE__ */ s("div", {
|
|
86
|
+
className: "flex grow basis-0 flex-col overflow-y-auto",
|
|
87
|
+
children: k.map((t) => {
|
|
88
|
+
let { name: n, type: r } = t;
|
|
89
|
+
return /* @__PURE__ */ s(e, {
|
|
90
|
+
id: n,
|
|
91
|
+
active: n === x,
|
|
92
|
+
label: n,
|
|
93
|
+
type: r,
|
|
94
|
+
elementsCount: H[n],
|
|
95
|
+
onSelect: F,
|
|
96
|
+
onDelete: V
|
|
97
|
+
}, n);
|
|
98
|
+
})
|
|
99
|
+
}),
|
|
100
|
+
/* @__PURE__ */ c(l, {
|
|
101
|
+
id: j,
|
|
102
|
+
open: M,
|
|
103
|
+
onClose: P,
|
|
104
|
+
size: "sm",
|
|
105
|
+
children: [/* @__PURE__ */ s(l.Header, { children: /* @__PURE__ */ s("h4", { children: "Add Selector" }) }), /* @__PURE__ */ s(l.Body, { children: /* @__PURE__ */ s(t, {
|
|
106
|
+
componentsNotAvailables: O,
|
|
107
|
+
components: D.current,
|
|
108
|
+
onSubmit: P,
|
|
109
|
+
onClose: P
|
|
110
|
+
}) })]
|
|
111
|
+
}),
|
|
112
|
+
/* @__PURE__ */ c(l, {
|
|
113
|
+
id: L,
|
|
114
|
+
open: R,
|
|
115
|
+
onClose: B,
|
|
116
|
+
children: [
|
|
117
|
+
/* @__PURE__ */ s(l.Header, { children: /* @__PURE__ */ s("h4", { children: "Remove Selector" }) }),
|
|
118
|
+
/* @__PURE__ */ s(l.Body, { children: /* @__PURE__ */ s("h4", { children: "Do you want to remove this item ?" }) }),
|
|
119
|
+
/* @__PURE__ */ c(l.Footer, {
|
|
120
|
+
justify: "end",
|
|
121
|
+
children: [/* @__PURE__ */ s(u, {
|
|
122
|
+
onClick: U,
|
|
123
|
+
size: "sm",
|
|
124
|
+
children: "Cancel"
|
|
125
|
+
}), /* @__PURE__ */ s(u, {
|
|
126
|
+
onClick: W,
|
|
127
|
+
size: "sm",
|
|
128
|
+
children: "Submit"
|
|
129
|
+
})]
|
|
130
|
+
})
|
|
131
|
+
]
|
|
132
|
+
})
|
|
133
|
+
]
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
//#endregion
|
|
137
|
+
export { y as default };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import e from "./ManagerSelector.mjs";
|
|
2
|
+
import t from "../StyleInspector/index.mjs";
|
|
3
|
+
import { get as n } from "@plitzi/plitzi-ui/helpers";
|
|
4
|
+
import { use as r, useMemo as i, useState as a } from "react";
|
|
5
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
|
+
import c from "@plitzi/sdk-shared/elements/ComponentContext";
|
|
7
|
+
import { createStoreHook as l } from "@plitzi/sdk-store/createStore";
|
|
8
|
+
//#region src/components/StyleManager/StyleManager.tsx
|
|
9
|
+
var u = () => {
|
|
10
|
+
let { componentDefinitions: u } = r(c), [d, f] = a(void 0), { useStore: p } = l(), [[m, h]] = p(["schema.flat", "displayMode"]), [g] = p(`style.platform.${h}`), _ = i(() => Object.values(m), [m]), v = i(() => d?.type === "element" ? Object.keys(n(u.current, `${d.componentType}.definition.styleSelectors`, {})) : ["base"], [u, d]), y = i(() => d?.type === "element" ? Object.keys(n(u.current, `${d.componentType}.defaultStyle.subTypes`, {})) : [], [u, d]), b = i(() => {
|
|
11
|
+
if (d) return d.type === "element" && v.length > 1 ? v.reduce((e, t) => ({
|
|
12
|
+
...e,
|
|
13
|
+
[t]: d.componentType
|
|
14
|
+
}), {}) : { base: d.name };
|
|
15
|
+
}, [d, v]);
|
|
16
|
+
return /* @__PURE__ */ o("div", {
|
|
17
|
+
className: "flex h-full grow flex-col overflow-auto",
|
|
18
|
+
children: /* @__PURE__ */ s("div", {
|
|
19
|
+
className: "flex grow overflow-auto",
|
|
20
|
+
children: [/* @__PURE__ */ o(e, {
|
|
21
|
+
displayMode: h,
|
|
22
|
+
selectors: g,
|
|
23
|
+
flatList: _,
|
|
24
|
+
selected: d?.name,
|
|
25
|
+
onSelect: f
|
|
26
|
+
}), /* @__PURE__ */ s("div", {
|
|
27
|
+
className: "flex grow basis-0 flex-col overflow-auto",
|
|
28
|
+
children: [d && /* @__PURE__ */ o(t, {
|
|
29
|
+
mode: "manager",
|
|
30
|
+
displayMode: h,
|
|
31
|
+
selectors: g,
|
|
32
|
+
styleSelectors: b,
|
|
33
|
+
styleSelectorsAvailables: v,
|
|
34
|
+
componentSubTypesAvailables: y,
|
|
35
|
+
allowStyleSelector: d.type === "element",
|
|
36
|
+
componentType: d.componentType,
|
|
37
|
+
value: d.name
|
|
38
|
+
}), !d && /* @__PURE__ */ o("div", {
|
|
39
|
+
className: "m-3 rounded-sm border-2 border-dashed border-gray-300 p-3 text-center text-zinc-500 select-none dark:border-zinc-600 dark:text-zinc-400",
|
|
40
|
+
children: "No selector or element selected. Click on one to select it."
|
|
41
|
+
})]
|
|
42
|
+
})]
|
|
43
|
+
})
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
//#endregion
|
|
47
|
+
export { u as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TagType } from '@plitzi/sdk-shared';
|
|
2
|
+
export type StyleSelectorTagProps = {
|
|
3
|
+
id: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
active?: boolean;
|
|
6
|
+
elementsCount?: number;
|
|
7
|
+
type?: TagType;
|
|
8
|
+
onSelect?: (id: string) => void;
|
|
9
|
+
onDelete?: (id: string) => void;
|
|
10
|
+
};
|
|
11
|
+
declare const _default: import('react').MemoExoticComponent<({ id, label, active, elementsCount, type, onSelect, onDelete }: StyleSelectorTagProps) => import("react/jsx-runtime").JSX.Element>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import e from "../Selector/SelectorItem/index.mjs";
|
|
2
|
+
import t from "clsx";
|
|
3
|
+
import { memo as n, useCallback as r } from "react";
|
|
4
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
|
+
import o from "@plitzi/plitzi-ui/Button";
|
|
6
|
+
var s = n(({ id: n, label: s = "Selector", active: c = !1, elementsCount: l = 0, type: u = "class", onSelect: d, onDelete: f }) => {
|
|
7
|
+
let p = r(() => d?.(n), [n, d]), m = r((e) => {
|
|
8
|
+
e.stopPropagation(), n && f?.(n);
|
|
9
|
+
}, [n, f]);
|
|
10
|
+
return /* @__PURE__ */ a("div", {
|
|
11
|
+
className: t("group flex cursor-pointer items-center justify-between gap-2 border-t border-gray-300 p-1 dark:border-zinc-700", {
|
|
12
|
+
"hover:bg-gray-100 dark:hover:bg-zinc-700/60": !c,
|
|
13
|
+
"bg-gray-200 dark:bg-zinc-700": c
|
|
14
|
+
}),
|
|
15
|
+
onClick: p,
|
|
16
|
+
children: [/* @__PURE__ */ i(e, {
|
|
17
|
+
editable: !1,
|
|
18
|
+
selector: s,
|
|
19
|
+
type: u,
|
|
20
|
+
active: !0,
|
|
21
|
+
readOnly: !0
|
|
22
|
+
}), /* @__PURE__ */ a("div", {
|
|
23
|
+
className: "flex",
|
|
24
|
+
children: [/* @__PURE__ */ i("div", {
|
|
25
|
+
className: t("mr-1", {
|
|
26
|
+
flex: c,
|
|
27
|
+
"hidden group-hover:flex": !c
|
|
28
|
+
}),
|
|
29
|
+
children: /* @__PURE__ */ i(o, {
|
|
30
|
+
intent: "danger",
|
|
31
|
+
size: "xs",
|
|
32
|
+
onClick: m,
|
|
33
|
+
children: /* @__PURE__ */ i(o.Icon, { icon: "fas fa-trash" })
|
|
34
|
+
})
|
|
35
|
+
}), l > 0 && /* @__PURE__ */ i("div", {
|
|
36
|
+
className: "bg-secondary-400 flex items-center justify-center rounded-sm px-1.5 py-1 text-xs text-white",
|
|
37
|
+
children: l
|
|
38
|
+
})]
|
|
39
|
+
})]
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
//#endregion
|
|
43
|
+
export { s as default };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { __exportAll as e } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import t from "./StyleInspector/index.mjs";
|
|
3
|
+
//#region src/components/index.ts
|
|
4
|
+
var n = /* @__PURE__ */ e({ StyleInspector: () => t });
|
|
5
|
+
//#endregion
|
|
6
|
+
export { t as StyleInspector, n as components_exports };
|