@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,247 @@
|
|
|
1
|
+
import e from "../../StyleInspectorContext.mjs";
|
|
2
|
+
import t from "../../hooks/useInspectorValues.mjs";
|
|
3
|
+
import n from "../../components/CategoryOption/index.mjs";
|
|
4
|
+
import r from "../../components/CategorySection/index.mjs";
|
|
5
|
+
import i from "../../components/CategoryContainer/index.mjs";
|
|
6
|
+
import a from "./BoxShadow/index.mjs";
|
|
7
|
+
import o from "./Filters/Filter.mjs";
|
|
8
|
+
import s from "./Transform/index.mjs";
|
|
9
|
+
import c from "./Transition/index.mjs";
|
|
10
|
+
import { memo as l, use as u, useCallback as d } from "react";
|
|
11
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
12
|
+
//#region src/components/StyleInspector/categories/Effects/Effects.tsx
|
|
13
|
+
var m = [
|
|
14
|
+
"opacity",
|
|
15
|
+
"cursor",
|
|
16
|
+
"transition",
|
|
17
|
+
"box-shadow",
|
|
18
|
+
"filter",
|
|
19
|
+
"transform"
|
|
20
|
+
], h = l(({ replaceTokens: l = !1, isCollapsed: h = !0, onCollapse: g }) => {
|
|
21
|
+
let { setValue: _ } = u(e), { opacity: v, cursor: y, transition: b, "box-shadow": x, filter: S, transform: C } = t({
|
|
22
|
+
keys: m,
|
|
23
|
+
asValue: !0,
|
|
24
|
+
strictMode: !0,
|
|
25
|
+
defaultValues: {
|
|
26
|
+
opacity: "1",
|
|
27
|
+
cursor: "auto",
|
|
28
|
+
transition: void 0,
|
|
29
|
+
"box-shadow": void 0,
|
|
30
|
+
filter: void 0,
|
|
31
|
+
transform: void 0
|
|
32
|
+
},
|
|
33
|
+
replaceTokens: l
|
|
34
|
+
}), w = d((e) => g?.("effects", e), [g]), T = d((e) => (t) => _(e, t), [_]);
|
|
35
|
+
return /* @__PURE__ */ f(i, {
|
|
36
|
+
title: "Effects",
|
|
37
|
+
dotKeys: m,
|
|
38
|
+
isCollapsed: h,
|
|
39
|
+
onCollapse: w,
|
|
40
|
+
children: /* @__PURE__ */ p("div", {
|
|
41
|
+
className: "flex flex-col gap-2",
|
|
42
|
+
children: [
|
|
43
|
+
/* @__PURE__ */ f(r, {
|
|
44
|
+
label: "Opacity",
|
|
45
|
+
keys: ["opacity"],
|
|
46
|
+
children: /* @__PURE__ */ f(n, {
|
|
47
|
+
value: v,
|
|
48
|
+
onChange: T("opacity"),
|
|
49
|
+
type: "metric"
|
|
50
|
+
})
|
|
51
|
+
}),
|
|
52
|
+
/* @__PURE__ */ f(r, {
|
|
53
|
+
label: "Cursor",
|
|
54
|
+
keys: ["cursor"],
|
|
55
|
+
children: /* @__PURE__ */ p(n, {
|
|
56
|
+
value: y,
|
|
57
|
+
onChange: T("cursor"),
|
|
58
|
+
type: "select",
|
|
59
|
+
children: [
|
|
60
|
+
/* @__PURE__ */ p("optgroup", {
|
|
61
|
+
label: "General",
|
|
62
|
+
children: [
|
|
63
|
+
/* @__PURE__ */ f("option", {
|
|
64
|
+
value: "auto",
|
|
65
|
+
children: "Auto"
|
|
66
|
+
}),
|
|
67
|
+
/* @__PURE__ */ f("option", {
|
|
68
|
+
value: "default",
|
|
69
|
+
children: "Default"
|
|
70
|
+
}),
|
|
71
|
+
/* @__PURE__ */ f("option", {
|
|
72
|
+
value: "none",
|
|
73
|
+
children: "None"
|
|
74
|
+
})
|
|
75
|
+
]
|
|
76
|
+
}),
|
|
77
|
+
/* @__PURE__ */ p("optgroup", {
|
|
78
|
+
label: "Links & Status",
|
|
79
|
+
children: [
|
|
80
|
+
/* @__PURE__ */ f("option", {
|
|
81
|
+
value: "pointer",
|
|
82
|
+
children: "Pointer"
|
|
83
|
+
}),
|
|
84
|
+
/* @__PURE__ */ f("option", {
|
|
85
|
+
value: "not-allowed",
|
|
86
|
+
children: "Not Allowed"
|
|
87
|
+
}),
|
|
88
|
+
/* @__PURE__ */ f("option", {
|
|
89
|
+
value: "wait",
|
|
90
|
+
children: "Wait"
|
|
91
|
+
}),
|
|
92
|
+
/* @__PURE__ */ f("option", {
|
|
93
|
+
value: "progress",
|
|
94
|
+
children: "Progress"
|
|
95
|
+
}),
|
|
96
|
+
/* @__PURE__ */ f("option", {
|
|
97
|
+
value: "help",
|
|
98
|
+
children: "Help"
|
|
99
|
+
}),
|
|
100
|
+
/* @__PURE__ */ f("option", {
|
|
101
|
+
value: "context-menu",
|
|
102
|
+
children: "Context Menu"
|
|
103
|
+
})
|
|
104
|
+
]
|
|
105
|
+
}),
|
|
106
|
+
/* @__PURE__ */ p("optgroup", {
|
|
107
|
+
label: "Selection",
|
|
108
|
+
children: [
|
|
109
|
+
/* @__PURE__ */ f("option", {
|
|
110
|
+
value: "cell",
|
|
111
|
+
children: "Cell"
|
|
112
|
+
}),
|
|
113
|
+
/* @__PURE__ */ f("option", {
|
|
114
|
+
value: "crosshair",
|
|
115
|
+
children: "Crosshair"
|
|
116
|
+
}),
|
|
117
|
+
/* @__PURE__ */ f("option", {
|
|
118
|
+
value: "text",
|
|
119
|
+
children: "Text"
|
|
120
|
+
}),
|
|
121
|
+
/* @__PURE__ */ f("option", {
|
|
122
|
+
value: "vertical-text",
|
|
123
|
+
children: "Vertical Text"
|
|
124
|
+
})
|
|
125
|
+
]
|
|
126
|
+
}),
|
|
127
|
+
/* @__PURE__ */ p("optgroup", {
|
|
128
|
+
label: "Drag & Drop",
|
|
129
|
+
children: [
|
|
130
|
+
/* @__PURE__ */ f("option", {
|
|
131
|
+
value: "grab",
|
|
132
|
+
children: "Grab"
|
|
133
|
+
}),
|
|
134
|
+
/* @__PURE__ */ f("option", {
|
|
135
|
+
value: "grabbing",
|
|
136
|
+
children: "Grabbing"
|
|
137
|
+
}),
|
|
138
|
+
/* @__PURE__ */ f("option", {
|
|
139
|
+
value: "alias",
|
|
140
|
+
children: "Alias"
|
|
141
|
+
}),
|
|
142
|
+
/* @__PURE__ */ f("option", {
|
|
143
|
+
value: "copy",
|
|
144
|
+
children: "Copy"
|
|
145
|
+
}),
|
|
146
|
+
/* @__PURE__ */ f("option", {
|
|
147
|
+
value: "move",
|
|
148
|
+
children: "Move"
|
|
149
|
+
})
|
|
150
|
+
]
|
|
151
|
+
}),
|
|
152
|
+
/* @__PURE__ */ p("optgroup", {
|
|
153
|
+
label: "Zoom",
|
|
154
|
+
children: [/* @__PURE__ */ f("option", {
|
|
155
|
+
value: "zoom-in",
|
|
156
|
+
children: "Zoom In"
|
|
157
|
+
}), /* @__PURE__ */ f("option", {
|
|
158
|
+
value: "zoom-out",
|
|
159
|
+
children: "Zoom Out"
|
|
160
|
+
})]
|
|
161
|
+
}),
|
|
162
|
+
/* @__PURE__ */ p("optgroup", {
|
|
163
|
+
label: "Resize",
|
|
164
|
+
children: [
|
|
165
|
+
/* @__PURE__ */ f("option", {
|
|
166
|
+
value: "col-resize",
|
|
167
|
+
children: "Col Resize"
|
|
168
|
+
}),
|
|
169
|
+
/* @__PURE__ */ f("option", {
|
|
170
|
+
value: "row-resize",
|
|
171
|
+
children: "Row Resize"
|
|
172
|
+
}),
|
|
173
|
+
/* @__PURE__ */ f("option", {
|
|
174
|
+
value: "nesw-resize",
|
|
175
|
+
children: "NESW Resize"
|
|
176
|
+
}),
|
|
177
|
+
/* @__PURE__ */ f("option", {
|
|
178
|
+
value: "nwse-resize",
|
|
179
|
+
children: "NWSE Resize"
|
|
180
|
+
}),
|
|
181
|
+
/* @__PURE__ */ f("option", {
|
|
182
|
+
value: "ew-resize",
|
|
183
|
+
children: "EW Resize"
|
|
184
|
+
}),
|
|
185
|
+
/* @__PURE__ */ f("option", {
|
|
186
|
+
value: "ns-resize",
|
|
187
|
+
children: "NS Resize"
|
|
188
|
+
}),
|
|
189
|
+
/* @__PURE__ */ f("option", {
|
|
190
|
+
value: "n-resize",
|
|
191
|
+
children: "N Resize"
|
|
192
|
+
}),
|
|
193
|
+
/* @__PURE__ */ f("option", {
|
|
194
|
+
value: "w-resize",
|
|
195
|
+
children: "W Resize"
|
|
196
|
+
}),
|
|
197
|
+
/* @__PURE__ */ f("option", {
|
|
198
|
+
value: "s-resize",
|
|
199
|
+
children: "S Resize"
|
|
200
|
+
}),
|
|
201
|
+
/* @__PURE__ */ f("option", {
|
|
202
|
+
value: "e-resize",
|
|
203
|
+
children: "E Resize"
|
|
204
|
+
}),
|
|
205
|
+
/* @__PURE__ */ f("option", {
|
|
206
|
+
value: "nw-resize",
|
|
207
|
+
children: "NW Resize"
|
|
208
|
+
}),
|
|
209
|
+
/* @__PURE__ */ f("option", {
|
|
210
|
+
value: "ne-resize",
|
|
211
|
+
children: "NE Resize"
|
|
212
|
+
}),
|
|
213
|
+
/* @__PURE__ */ f("option", {
|
|
214
|
+
value: "sw-resize",
|
|
215
|
+
children: "SW Resize"
|
|
216
|
+
}),
|
|
217
|
+
/* @__PURE__ */ f("option", {
|
|
218
|
+
value: "se-resize",
|
|
219
|
+
children: "SE Resize"
|
|
220
|
+
})
|
|
221
|
+
]
|
|
222
|
+
})
|
|
223
|
+
]
|
|
224
|
+
})
|
|
225
|
+
}),
|
|
226
|
+
/* @__PURE__ */ f(a, {
|
|
227
|
+
onChange: T("box-shadow"),
|
|
228
|
+
value: x
|
|
229
|
+
}),
|
|
230
|
+
/* @__PURE__ */ f(s, {
|
|
231
|
+
onChange: T("transform"),
|
|
232
|
+
value: C
|
|
233
|
+
}),
|
|
234
|
+
/* @__PURE__ */ f(c, {
|
|
235
|
+
onChange: T("transition"),
|
|
236
|
+
value: b
|
|
237
|
+
}),
|
|
238
|
+
/* @__PURE__ */ f(o, {
|
|
239
|
+
onChange: T("filter"),
|
|
240
|
+
value: S
|
|
241
|
+
})
|
|
242
|
+
]
|
|
243
|
+
})
|
|
244
|
+
});
|
|
245
|
+
});
|
|
246
|
+
//#endregion
|
|
247
|
+
export { h as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { StyleCategory, StyleValue } from '@plitzi/sdk-shared';
|
|
2
|
+
export type FilterProps = {
|
|
3
|
+
value?: StyleValue;
|
|
4
|
+
onChange?: (value: StyleValue | Record<StyleCategory, StyleValue> | boolean) => void;
|
|
5
|
+
};
|
|
6
|
+
declare const Filter: ({ value, onChange }: FilterProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default Filter;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import e from "../../../components/InspectorLabel/index.mjs";
|
|
2
|
+
import t from "./FilterItem.mjs";
|
|
3
|
+
import { useCallback as n } from "react";
|
|
4
|
+
import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
|
+
import o from "@plitzi/plitzi-ui/Icon";
|
|
6
|
+
//#region src/components/StyleInspector/categories/Effects/Filters/Filter.tsx
|
|
7
|
+
var s = ({ value: s, onChange: c }) => {
|
|
8
|
+
let l = [];
|
|
9
|
+
s && s !== "" && (l = s.split(" "));
|
|
10
|
+
let u = (e) => (t) => {
|
|
11
|
+
t.stopPropagation(), t.preventDefault(), l.splice(e, 1), l.length > 0 ? c?.(l.join(" ")) : c?.("");
|
|
12
|
+
}, d = (e) => (t) => {
|
|
13
|
+
t !== l[e] && (l[e] = t, c?.(l.join(" ")));
|
|
14
|
+
}, f = n(() => {
|
|
15
|
+
s ? c?.(`${s} blur(5px)`) : c?.("blur(5px)");
|
|
16
|
+
}, [s, c]);
|
|
17
|
+
return /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ a("div", {
|
|
18
|
+
className: "flex w-full justify-between",
|
|
19
|
+
children: [/* @__PURE__ */ i(e, {
|
|
20
|
+
keyValue: ["filter"],
|
|
21
|
+
children: "Filters"
|
|
22
|
+
}), /* @__PURE__ */ i(o, {
|
|
23
|
+
className: "cursor-pointer",
|
|
24
|
+
icon: "fas fa-plus",
|
|
25
|
+
onClick: f
|
|
26
|
+
})]
|
|
27
|
+
}), l.length > 0 && /* @__PURE__ */ i("div", {
|
|
28
|
+
className: "flex flex-col",
|
|
29
|
+
children: l.map((e, n) => /* @__PURE__ */ i(t, {
|
|
30
|
+
value: e,
|
|
31
|
+
onChange: d(n),
|
|
32
|
+
onRemove: u(n)
|
|
33
|
+
}, n))
|
|
34
|
+
})] });
|
|
35
|
+
};
|
|
36
|
+
//#endregion
|
|
37
|
+
export { s as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { MouseEvent } from 'react';
|
|
2
|
+
export type FilterItemProps = {
|
|
3
|
+
value?: string;
|
|
4
|
+
onChange?: (value: string) => void;
|
|
5
|
+
onRemove?: (e: MouseEvent) => void;
|
|
6
|
+
};
|
|
7
|
+
declare const FilterItem: ({ value, onRemove, onChange }: FilterItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default FilterItem;
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import e from "../../../components/CategoryOption/index.mjs";
|
|
2
|
+
import t from "../../../components/CategorySection/index.mjs";
|
|
3
|
+
import { useCallback as n, useMemo as r, useRef as i } from "react";
|
|
4
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
|
+
import s from "@plitzi/plitzi-ui/ContainerFloating";
|
|
6
|
+
import c from "@plitzi/plitzi-ui/Icon";
|
|
7
|
+
//#region src/components/StyleInspector/categories/Effects/Filters/FilterItem.tsx
|
|
8
|
+
var l = ({ value: l = "blur(5px)", onRemove: u, onChange: d }) => {
|
|
9
|
+
let f = l.match(/[a-z-]+|[0-9.-]+(px|%|deg|)/gim), { propType: p = "blur", amount: m = "5px" } = {};
|
|
10
|
+
f?.length === 2 && ([p, m] = f);
|
|
11
|
+
let h = i({
|
|
12
|
+
propType: p,
|
|
13
|
+
amount: m
|
|
14
|
+
});
|
|
15
|
+
h.current = {
|
|
16
|
+
propType: p,
|
|
17
|
+
amount: m
|
|
18
|
+
};
|
|
19
|
+
let g = n((e) => (t) => {
|
|
20
|
+
let n = { ...h.current };
|
|
21
|
+
n[e] = t;
|
|
22
|
+
let { propType: r } = n, { amount: i } = n;
|
|
23
|
+
e === "propType" && h.current.amount !== t && (i = t === "blur" ? "5px" : t === "hue-rotate" ? "0deg" : "0.5"), d?.(`${r}(${i})`);
|
|
24
|
+
}, [d]), _ = r(() => p === "hue-rotate" ? { units: [{
|
|
25
|
+
label: "DEG",
|
|
26
|
+
value: "deg"
|
|
27
|
+
}] } : p === "blur" ? { units: [{
|
|
28
|
+
label: "PX",
|
|
29
|
+
value: "px"
|
|
30
|
+
}] } : {
|
|
31
|
+
units: void 0,
|
|
32
|
+
max: 1,
|
|
33
|
+
step: .1
|
|
34
|
+
}, [p]);
|
|
35
|
+
return /* @__PURE__ */ o(s, {
|
|
36
|
+
className: "w-full",
|
|
37
|
+
closeOnClick: !1,
|
|
38
|
+
children: [/* @__PURE__ */ o(s.Trigger, {
|
|
39
|
+
className: "flex w-full cursor-pointer items-center justify-between rounded-sm border border-gray-300 bg-white px-2 py-0.5 select-none hover:bg-gray-100 dark:border-zinc-600 dark:bg-zinc-800 dark:hover:bg-zinc-700/60",
|
|
40
|
+
children: [/* @__PURE__ */ a("div", {
|
|
41
|
+
className: "flex items-center",
|
|
42
|
+
children: /* @__PURE__ */ a("div", {
|
|
43
|
+
className: "flex",
|
|
44
|
+
children: l
|
|
45
|
+
})
|
|
46
|
+
}), /* @__PURE__ */ a("div", {
|
|
47
|
+
className: "flex",
|
|
48
|
+
children: /* @__PURE__ */ a(c, {
|
|
49
|
+
size: "xs",
|
|
50
|
+
icon: "fas fa-trash-alt",
|
|
51
|
+
onClick: u,
|
|
52
|
+
intent: "danger",
|
|
53
|
+
title: "Remove"
|
|
54
|
+
})
|
|
55
|
+
})]
|
|
56
|
+
}), /* @__PURE__ */ a(s.Content, {
|
|
57
|
+
className: "w-[260px]",
|
|
58
|
+
children: /* @__PURE__ */ a("div", {
|
|
59
|
+
className: "flex w-full flex-col gap-2 p-2",
|
|
60
|
+
children: /* @__PURE__ */ o(t, {
|
|
61
|
+
label: "Type",
|
|
62
|
+
children: [/* @__PURE__ */ o(e, {
|
|
63
|
+
label: "Property",
|
|
64
|
+
onChange: g("propType"),
|
|
65
|
+
type: "select",
|
|
66
|
+
value: p,
|
|
67
|
+
children: [
|
|
68
|
+
/* @__PURE__ */ a("optgroup", {
|
|
69
|
+
label: "General",
|
|
70
|
+
children: /* @__PURE__ */ a("option", {
|
|
71
|
+
value: "blur",
|
|
72
|
+
children: "Blur"
|
|
73
|
+
})
|
|
74
|
+
}),
|
|
75
|
+
/* @__PURE__ */ o("optgroup", {
|
|
76
|
+
label: "Color Adjustments",
|
|
77
|
+
children: [
|
|
78
|
+
/* @__PURE__ */ a("option", {
|
|
79
|
+
value: "brightness",
|
|
80
|
+
children: "Brightness"
|
|
81
|
+
}),
|
|
82
|
+
/* @__PURE__ */ a("option", {
|
|
83
|
+
value: "contrast",
|
|
84
|
+
children: "Contrast"
|
|
85
|
+
}),
|
|
86
|
+
/* @__PURE__ */ a("option", {
|
|
87
|
+
value: "hue-rotate",
|
|
88
|
+
children: "Hue Rotate"
|
|
89
|
+
}),
|
|
90
|
+
/* @__PURE__ */ a("option", {
|
|
91
|
+
value: "saturate",
|
|
92
|
+
children: "Saturation"
|
|
93
|
+
})
|
|
94
|
+
]
|
|
95
|
+
}),
|
|
96
|
+
/* @__PURE__ */ o("optgroup", {
|
|
97
|
+
label: "Color Effects",
|
|
98
|
+
children: [
|
|
99
|
+
/* @__PURE__ */ a("option", {
|
|
100
|
+
value: "grayscale",
|
|
101
|
+
children: "Grayscale"
|
|
102
|
+
}),
|
|
103
|
+
/* @__PURE__ */ a("option", {
|
|
104
|
+
value: "invert",
|
|
105
|
+
children: "Invert"
|
|
106
|
+
}),
|
|
107
|
+
/* @__PURE__ */ a("option", {
|
|
108
|
+
value: "sepia",
|
|
109
|
+
children: "Sepia"
|
|
110
|
+
})
|
|
111
|
+
]
|
|
112
|
+
})
|
|
113
|
+
]
|
|
114
|
+
}), /* @__PURE__ */ a(e, {
|
|
115
|
+
label: "Amount",
|
|
116
|
+
value: m,
|
|
117
|
+
onChange: g("amount"),
|
|
118
|
+
type: "metric",
|
|
119
|
+
units: _.units,
|
|
120
|
+
step: _.step,
|
|
121
|
+
max: _.max
|
|
122
|
+
})]
|
|
123
|
+
})
|
|
124
|
+
})
|
|
125
|
+
})]
|
|
126
|
+
});
|
|
127
|
+
};
|
|
128
|
+
//#endregion
|
|
129
|
+
export { l as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { StyleCategory, StyleValue } from '@plitzi/sdk-shared';
|
|
2
|
+
export type TransformProps = {
|
|
3
|
+
value?: StyleValue;
|
|
4
|
+
onChange?: (value: StyleValue | Record<StyleCategory, StyleValue> | boolean) => void;
|
|
5
|
+
};
|
|
6
|
+
declare const Transform: ({ value, onChange }: TransformProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default Transform;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import e from "../../../components/InspectorLabel/index.mjs";
|
|
2
|
+
import t from "./TransformItem.mjs";
|
|
3
|
+
import { useCallback as n } from "react";
|
|
4
|
+
import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
|
+
import o from "@plitzi/plitzi-ui/Icon";
|
|
6
|
+
//#region src/components/StyleInspector/categories/Effects/Transform/Transform.tsx
|
|
7
|
+
var s = ({ value: s, onChange: c }) => {
|
|
8
|
+
let l = [];
|
|
9
|
+
s && s !== "" && (l = s.match(/((translate3d|scale3d|skew)\([0-9a-z-, .%]+\))|(rotateX.*rotateZ\([0-9a-z%]+\))/gim) ?? []);
|
|
10
|
+
let u = (e) => (t) => {
|
|
11
|
+
t.stopPropagation(), t.preventDefault(), l.splice(e, 1), l.length > 0 ? c?.(l.join(" ")) : c?.("");
|
|
12
|
+
}, d = (e) => (t) => {
|
|
13
|
+
t !== l[e] && (l[e] = t, c?.(l.join(" ")));
|
|
14
|
+
}, f = n(() => {
|
|
15
|
+
s ? c?.(`${s} translate3d(0px, 0px, 0px)`) : c?.("translate3d(0px, 0px, 0px)");
|
|
16
|
+
}, [c, s]);
|
|
17
|
+
return /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ a("div", {
|
|
18
|
+
className: "flex justify-between",
|
|
19
|
+
children: [/* @__PURE__ */ i(e, {
|
|
20
|
+
keyValue: ["transform"],
|
|
21
|
+
children: "2D & 3D Transforms"
|
|
22
|
+
}), /* @__PURE__ */ i(o, {
|
|
23
|
+
className: "cursor-pointer",
|
|
24
|
+
icon: "fas fa-plus",
|
|
25
|
+
onClick: f
|
|
26
|
+
})]
|
|
27
|
+
}), l.length > 0 && /* @__PURE__ */ i("div", {
|
|
28
|
+
className: "flex flex-col",
|
|
29
|
+
children: l.map((e, n) => /* @__PURE__ */ i(t, {
|
|
30
|
+
value: e,
|
|
31
|
+
onChange: d(n),
|
|
32
|
+
onRemove: u(n)
|
|
33
|
+
}, n))
|
|
34
|
+
})] });
|
|
35
|
+
};
|
|
36
|
+
//#endregion
|
|
37
|
+
export { s as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { MouseEvent } from 'react';
|
|
2
|
+
export type TransformItemProps = {
|
|
3
|
+
value?: string;
|
|
4
|
+
onChange?: (value: string) => void;
|
|
5
|
+
onRemove?: (e: MouseEvent) => void;
|
|
6
|
+
};
|
|
7
|
+
declare const TransformItem: ({ value, onRemove, onChange }: TransformItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default TransformItem;
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import e from "../../../components/CategoryOption/index.mjs";
|
|
2
|
+
import t from "../../../components/CategorySection/index.mjs";
|
|
3
|
+
import { useCallback as n, useMemo as r, useRef as i } from "react";
|
|
4
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
|
+
import s from "@plitzi/plitzi-ui/ContainerFloating";
|
|
6
|
+
import c from "@plitzi/plitzi-ui/Icon";
|
|
7
|
+
//#region src/components/StyleInspector/categories/Effects/Transform/TransformItem.tsx
|
|
8
|
+
var l = ({ value: l = "translate3d(0px, 0px, 0px)", onRemove: u, onChange: d }) => {
|
|
9
|
+
let f = l.match(/[a-x0-9-.%]+/gim), { type: p = "translate3d", posX: m = "0px", posY: h = "0px", posZ: g = "0px" } = {};
|
|
10
|
+
f?.length === 6 ? [, m, p, h, , g] = f : f?.length === 4 ? [p, m, h, g] = f : f?.length === 3 && ([p, m, h] = f);
|
|
11
|
+
let _ = i({
|
|
12
|
+
type: p,
|
|
13
|
+
posX: m,
|
|
14
|
+
posY: h,
|
|
15
|
+
posZ: g
|
|
16
|
+
});
|
|
17
|
+
_.current = {
|
|
18
|
+
type: p,
|
|
19
|
+
posX: m,
|
|
20
|
+
posY: h,
|
|
21
|
+
posZ: g
|
|
22
|
+
};
|
|
23
|
+
let v = n((e) => (t) => {
|
|
24
|
+
let n = { ..._.current };
|
|
25
|
+
n[e] = t;
|
|
26
|
+
let { type: r } = n, { posX: i, posY: a, posZ: o } = n;
|
|
27
|
+
e === "type" && _.current.type !== t && (t === "rotate" || t === "skew" ? {posX: i, posY: a, posZ: o} = {
|
|
28
|
+
posX: "0deg",
|
|
29
|
+
posY: "0deg",
|
|
30
|
+
posZ: "0deg"
|
|
31
|
+
} : t === "scale3d" ? {posX: i, posY: a, posZ: o} = {
|
|
32
|
+
posX: "1",
|
|
33
|
+
posY: "1",
|
|
34
|
+
posZ: "1"
|
|
35
|
+
} : {posX: i, posY: a, posZ: o} = {
|
|
36
|
+
posX: "0px",
|
|
37
|
+
posY: "0px",
|
|
38
|
+
posZ: "0px"
|
|
39
|
+
}), r === "rotate" ? d?.(`${r}X(${i}) ${r}Y(${a}) ${r}Z(${o})`) : r === "skew" ? d?.(`${r}(${i}, ${a})`) : d?.(`${r}(${i}, ${a}, ${o})`);
|
|
40
|
+
}, [d]), y = r(() => [
|
|
41
|
+
{
|
|
42
|
+
value: "translate3d",
|
|
43
|
+
icon: /* @__PURE__ */ a("div", {
|
|
44
|
+
className: "px-1 text-xs select-none",
|
|
45
|
+
children: "Move"
|
|
46
|
+
}),
|
|
47
|
+
description: "",
|
|
48
|
+
active: p === "translate3d",
|
|
49
|
+
size: "custom"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
value: "scale3d",
|
|
53
|
+
icon: /* @__PURE__ */ a("div", {
|
|
54
|
+
className: "px-1 text-xs select-none",
|
|
55
|
+
children: "Scale"
|
|
56
|
+
}),
|
|
57
|
+
description: "",
|
|
58
|
+
active: p === "scale3d",
|
|
59
|
+
size: "custom"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
value: "rotate",
|
|
63
|
+
icon: /* @__PURE__ */ a("div", {
|
|
64
|
+
className: "px-1 text-xs select-none",
|
|
65
|
+
children: "Rotate"
|
|
66
|
+
}),
|
|
67
|
+
description: "",
|
|
68
|
+
active: p === "rotate",
|
|
69
|
+
size: "custom"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
value: "skew",
|
|
73
|
+
icon: /* @__PURE__ */ a("div", {
|
|
74
|
+
className: "px-1 text-xs select-none",
|
|
75
|
+
children: "Skew"
|
|
76
|
+
}),
|
|
77
|
+
description: "",
|
|
78
|
+
active: p === "skew",
|
|
79
|
+
size: "custom"
|
|
80
|
+
}
|
|
81
|
+
], [p]), b = r(() => p === "rotate" || p === "skew" ? { units: [{
|
|
82
|
+
label: "DEG",
|
|
83
|
+
value: "deg"
|
|
84
|
+
}] } : p === "scale3d" ? { units: void 0 } : { units: [{
|
|
85
|
+
label: "PX",
|
|
86
|
+
value: "px"
|
|
87
|
+
}] }, [p]);
|
|
88
|
+
return /* @__PURE__ */ o(s, {
|
|
89
|
+
className: "w-full",
|
|
90
|
+
closeOnClick: !1,
|
|
91
|
+
children: [/* @__PURE__ */ o(s.Trigger, {
|
|
92
|
+
className: "flex w-full cursor-pointer items-center justify-between rounded-sm border border-gray-300 bg-white px-2 py-0.5 select-none hover:bg-gray-100 dark:border-zinc-600 dark:bg-zinc-800 dark:hover:bg-zinc-700/60",
|
|
93
|
+
children: [/* @__PURE__ */ a("div", {
|
|
94
|
+
className: "flex items-center",
|
|
95
|
+
children: l
|
|
96
|
+
}), /* @__PURE__ */ a("div", {
|
|
97
|
+
className: "flex",
|
|
98
|
+
children: /* @__PURE__ */ a(c, {
|
|
99
|
+
size: "xs",
|
|
100
|
+
icon: "fas fa-trash-alt",
|
|
101
|
+
onClick: u,
|
|
102
|
+
intent: "danger",
|
|
103
|
+
title: "Remove"
|
|
104
|
+
})
|
|
105
|
+
})]
|
|
106
|
+
}), /* @__PURE__ */ a(s.Content, {
|
|
107
|
+
className: "w-[260px]",
|
|
108
|
+
children: /* @__PURE__ */ o("div", {
|
|
109
|
+
className: "flex w-full flex-col gap-2 p-2",
|
|
110
|
+
children: [/* @__PURE__ */ a(t, {
|
|
111
|
+
label: "Type",
|
|
112
|
+
children: /* @__PURE__ */ a(e, {
|
|
113
|
+
onChange: v("type"),
|
|
114
|
+
type: "iconGroup",
|
|
115
|
+
items: y
|
|
116
|
+
})
|
|
117
|
+
}), /* @__PURE__ */ o(t, {
|
|
118
|
+
label: "Position",
|
|
119
|
+
children: [
|
|
120
|
+
/* @__PURE__ */ a(e, {
|
|
121
|
+
label: "X",
|
|
122
|
+
value: m,
|
|
123
|
+
onChange: v("posX"),
|
|
124
|
+
type: "metric",
|
|
125
|
+
...b
|
|
126
|
+
}),
|
|
127
|
+
/* @__PURE__ */ a(e, {
|
|
128
|
+
label: "Y",
|
|
129
|
+
value: m,
|
|
130
|
+
onChange: v("posY"),
|
|
131
|
+
type: "metric",
|
|
132
|
+
...b
|
|
133
|
+
}),
|
|
134
|
+
p !== "skew" && /* @__PURE__ */ a(e, {
|
|
135
|
+
label: "Z",
|
|
136
|
+
value: m,
|
|
137
|
+
onChange: v("posZ"),
|
|
138
|
+
type: "metric",
|
|
139
|
+
...b
|
|
140
|
+
})
|
|
141
|
+
]
|
|
142
|
+
})]
|
|
143
|
+
})
|
|
144
|
+
})]
|
|
145
|
+
});
|
|
146
|
+
};
|
|
147
|
+
//#endregion
|
|
148
|
+
export { l as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { StyleCategory, StyleValue } from '@plitzi/sdk-shared';
|
|
2
|
+
export type TransitionProps = {
|
|
3
|
+
value?: StyleValue;
|
|
4
|
+
onChange?: (value: StyleValue | Record<StyleCategory, StyleValue> | boolean) => void;
|
|
5
|
+
};
|
|
6
|
+
declare const Transition: ({ value, onChange }: TransitionProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default Transition;
|