@hanzogui/web 7.3.2 → 8.0.0
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/.turbo/turbo-build.log +2 -0
- package/dist/cjs/_withStableStyle.cjs +2 -2
- package/dist/cjs/_withStableStyle.native.js +2 -2
- package/dist/cjs/_withStableStyle.native.js.map +1 -1
- package/dist/cjs/config.cjs +18 -10
- package/dist/cjs/config.native.js +19 -10
- package/dist/cjs/config.native.js.map +1 -1
- package/dist/cjs/constants/constants.cjs +1 -1
- package/dist/cjs/constants/constants.native.js +1 -1
- package/dist/cjs/constants/constants.native.js.map +1 -1
- package/dist/cjs/createComponent.cjs +68 -28
- package/dist/cjs/createComponent.native.js +75 -30
- package/dist/cjs/createComponent.native.js.map +1 -1
- package/dist/cjs/createGui.cjs +1 -1
- package/dist/cjs/createGui.native.js +1 -1
- package/dist/cjs/createGui.native.js.map +1 -1
- package/dist/cjs/eventHandling.cjs +2 -2
- package/dist/cjs/eventHandling.native.js +73 -54
- package/dist/cjs/eventHandling.native.js.map +1 -1
- package/dist/cjs/helpers/createDesignSystem.cjs +2 -2
- package/dist/cjs/helpers/defaultAnimationDriver.cjs +1 -1
- package/dist/cjs/helpers/defaultAnimationDriver.native.js +1 -1
- package/dist/cjs/helpers/expandStyle.cjs +46 -5
- package/dist/cjs/helpers/expandStyle.native.js +36 -30
- package/dist/cjs/helpers/expandStyle.native.js.map +1 -1
- package/dist/cjs/helpers/getGroupPropParts.cjs +1 -1
- package/dist/cjs/helpers/getGroupPropParts.native.js +1 -1
- package/dist/cjs/helpers/getSplitStyles.cjs +76 -31
- package/dist/cjs/helpers/getSplitStyles.native.js +140 -85
- package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/cjs/helpers/getTokenForKey.cjs +5 -5
- package/dist/cjs/helpers/getTokenForKey.native.js +5 -5
- package/dist/cjs/helpers/getTokenForKey.native.js.map +1 -1
- package/dist/cjs/helpers/getVariantExtras.cjs +7 -3
- package/dist/cjs/helpers/getVariantExtras.native.js +7 -3
- package/dist/cjs/helpers/getVariantExtras.native.js.map +1 -1
- package/dist/cjs/helpers/insertStyleRule.cjs +4 -4
- package/dist/cjs/helpers/insertStyleRule.native.js +3 -3
- package/dist/cjs/helpers/insertStyleRule.native.js.map +1 -1
- package/dist/cjs/helpers/mainThreadPressEvents.native.js +32 -4
- package/dist/cjs/helpers/mainThreadPressEvents.native.js.map +1 -1
- package/dist/cjs/helpers/normalizeStyle.cjs +22 -1
- package/dist/cjs/helpers/normalizeStyle.native.js +41 -1
- package/dist/cjs/helpers/normalizeStyle.native.js.map +1 -1
- package/dist/cjs/helpers/platformResolveValue.cjs +1 -1
- package/dist/cjs/helpers/platformResolveValue.native.js +1 -1
- package/dist/cjs/helpers/platformResolveValue.native.js.map +1 -1
- package/dist/cjs/helpers/pointerEvents.native.js +26 -20
- package/dist/cjs/helpers/pointerEvents.native.js.map +1 -1
- package/dist/cjs/helpers/propMapper.cjs +31 -7
- package/dist/cjs/helpers/propMapper.native.js +70 -20
- package/dist/cjs/helpers/propMapper.native.js.map +1 -1
- package/dist/cjs/helpers/resolveSafeArea.native.js +1 -1
- package/dist/cjs/helpers/resolveSafeArea.native.js.map +1 -1
- package/dist/cjs/helpers/styleOriginalValues.cjs +28 -0
- package/dist/cjs/helpers/styleOriginalValues.native.js +31 -0
- package/dist/cjs/helpers/styleOriginalValues.native.js.map +1 -0
- package/dist/cjs/helpers/styleProvenance.cjs +43 -0
- package/dist/cjs/helpers/styleProvenance.native.js +46 -0
- package/dist/cjs/helpers/styleProvenance.native.js.map +1 -0
- package/dist/cjs/helpers/wrapStyleTags.cjs +35 -11
- package/dist/cjs/helpers/wrapStyleTags.native.js.map +1 -1
- package/dist/cjs/hooks/getThemeProxied.cjs +1 -1
- package/dist/cjs/hooks/getThemeProxied.native.js +4 -4
- package/dist/cjs/hooks/getThemeProxied.native.js.map +1 -1
- package/dist/cjs/hooks/useComponentState.cjs +29 -3
- package/dist/cjs/hooks/useComponentState.native.js +30 -4
- package/dist/cjs/hooks/useComponentState.native.js.map +1 -1
- package/dist/cjs/hooks/useMedia.cjs +107 -42
- package/dist/cjs/hooks/useMedia.native.js +149 -60
- package/dist/cjs/hooks/useMedia.native.js.map +1 -1
- package/dist/cjs/hooks/useTheme.cjs +18 -5
- package/dist/cjs/hooks/useTheme.native.js +19 -5
- package/dist/cjs/hooks/useTheme.native.js.map +1 -1
- package/dist/cjs/hooks/useThemeState.cjs +143 -72
- package/dist/cjs/hooks/useThemeState.native.js +155 -74
- package/dist/cjs/hooks/useThemeState.native.js.map +1 -1
- package/dist/cjs/index.cjs +3 -0
- package/dist/cjs/index.native.js +3 -0
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/opacityModifier.test-d.cjs +36 -0
- package/dist/cjs/opacityModifier.test-d.native.js +39 -0
- package/dist/cjs/opacityModifier.test-d.native.js.map +1 -0
- package/dist/cjs/styledNonStyleProps.test-d.cjs +63 -0
- package/dist/cjs/styledNonStyleProps.test-d.native.js +66 -0
- package/dist/cjs/styledNonStyleProps.test-d.native.js.map +1 -0
- package/dist/cjs/views/GuiProvider.cjs +2 -2
- package/dist/cjs/views/Text.cjs +1 -0
- package/dist/cjs/views/Text.native.js +1 -0
- package/dist/cjs/views/Text.native.js.map +1 -1
- package/dist/cjs/views/Theme.cjs +1 -1
- package/dist/cjs/views/Theme.native.js +1 -1
- package/dist/cjs/views/Theme.native.js.map +1 -1
- package/dist/esm/_withStableStyle.mjs +2 -2
- package/dist/esm/_withStableStyle.mjs.map +1 -1
- package/dist/esm/_withStableStyle.native.js +2 -2
- package/dist/esm/_withStableStyle.native.js.map +1 -1
- package/dist/esm/config.mjs +18 -11
- package/dist/esm/config.mjs.map +1 -1
- package/dist/esm/config.native.js +19 -11
- package/dist/esm/config.native.js.map +1 -1
- package/dist/esm/constants/constants.mjs +1 -1
- package/dist/esm/constants/constants.native.js +1 -1
- package/dist/esm/constants/constants.native.js.map +1 -1
- package/dist/esm/createComponent.mjs +74 -35
- package/dist/esm/createComponent.mjs.map +1 -1
- package/dist/esm/createComponent.native.js +90 -42
- package/dist/esm/createComponent.native.js.map +1 -1
- package/dist/esm/createGui.mjs +6 -6
- package/dist/esm/createGui.mjs.map +1 -1
- package/dist/esm/createGui.native.js +6 -6
- package/dist/esm/createGui.native.js.map +1 -1
- package/dist/esm/eventHandling.mjs +2 -2
- package/dist/esm/eventHandling.mjs.map +1 -1
- package/dist/esm/eventHandling.native.js +74 -55
- package/dist/esm/eventHandling.native.js.map +1 -1
- package/dist/esm/helpers/createDesignSystem.mjs +2 -2
- package/dist/esm/helpers/createDesignSystem.mjs.map +1 -1
- package/dist/esm/helpers/createDesignSystem.native.js +1 -2
- package/dist/esm/helpers/createDesignSystem.native.js.map +1 -1
- package/dist/esm/helpers/defaultAnimationDriver.mjs +1 -1
- package/dist/esm/helpers/defaultAnimationDriver.mjs.map +1 -1
- package/dist/esm/helpers/defaultAnimationDriver.native.js +1 -1
- package/dist/esm/helpers/expandStyle.mjs +47 -8
- package/dist/esm/helpers/expandStyle.mjs.map +1 -1
- package/dist/esm/helpers/expandStyle.native.js +36 -30
- package/dist/esm/helpers/expandStyle.native.js.map +1 -1
- package/dist/esm/helpers/expandStyles.mjs.map +1 -1
- package/dist/esm/helpers/expandStyles.native.js.map +1 -1
- package/dist/esm/helpers/getGroupPropParts.mjs +1 -1
- package/dist/esm/helpers/getGroupPropParts.mjs.map +1 -1
- package/dist/esm/helpers/getGroupPropParts.native.js +1 -1
- package/dist/esm/helpers/getSplitStyles.mjs +86 -45
- package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
- package/dist/esm/helpers/getSplitStyles.native.js +146 -98
- package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/esm/helpers/getThemeCSSRules.mjs +1 -1
- package/dist/esm/helpers/getThemeCSSRules.mjs.map +1 -1
- package/dist/esm/helpers/getTokenForKey.mjs +5 -5
- package/dist/esm/helpers/getTokenForKey.mjs.map +1 -1
- package/dist/esm/helpers/getTokenForKey.native.js +5 -5
- package/dist/esm/helpers/getTokenForKey.native.js.map +1 -1
- package/dist/esm/helpers/getVariantExtras.mjs +7 -3
- package/dist/esm/helpers/getVariantExtras.mjs.map +1 -1
- package/dist/esm/helpers/getVariantExtras.native.js +7 -3
- package/dist/esm/helpers/getVariantExtras.native.js.map +1 -1
- package/dist/esm/helpers/insertStyleRule.mjs +4 -6
- package/dist/esm/helpers/insertStyleRule.mjs.map +1 -1
- package/dist/esm/helpers/insertStyleRule.native.js +0 -26
- package/dist/esm/helpers/insertStyleRule.native.js.map +1 -1
- package/dist/esm/helpers/isActivePlatform.mjs.map +1 -1
- package/dist/esm/helpers/isActivePlatform.native.js.map +1 -1
- package/dist/esm/helpers/log.mjs.map +1 -1
- package/dist/esm/helpers/log.native.js.map +1 -1
- package/dist/esm/helpers/mainThreadPressEvents.native.js +32 -4
- package/dist/esm/helpers/mainThreadPressEvents.native.js.map +1 -1
- package/dist/esm/helpers/normalizeStyle.mjs +22 -1
- package/dist/esm/helpers/normalizeStyle.mjs.map +1 -1
- package/dist/esm/helpers/normalizeStyle.native.js +41 -1
- package/dist/esm/helpers/normalizeStyle.native.js.map +1 -1
- package/dist/esm/helpers/platformResolveValue.mjs +1 -1
- package/dist/esm/helpers/platformResolveValue.mjs.map +1 -1
- package/dist/esm/helpers/platformResolveValue.native.js +1 -1
- package/dist/esm/helpers/platformResolveValue.native.js.map +1 -1
- package/dist/esm/helpers/pointerEvents.native.js +26 -20
- package/dist/esm/helpers/pointerEvents.native.js.map +1 -1
- package/dist/esm/helpers/propMapper.mjs +32 -11
- package/dist/esm/helpers/propMapper.mjs.map +1 -1
- package/dist/esm/helpers/propMapper.native.js +71 -22
- package/dist/esm/helpers/propMapper.native.js.map +1 -1
- package/dist/esm/helpers/resolveSafeArea.native.js +1 -1
- package/dist/esm/helpers/resolveSafeArea.native.js.map +1 -1
- package/dist/esm/helpers/skipProps.mjs +0 -1
- package/dist/esm/helpers/skipProps.mjs.map +1 -1
- package/dist/esm/helpers/skipProps.native.js +0 -1
- package/dist/esm/helpers/skipProps.native.js.map +1 -1
- package/dist/esm/helpers/styleOriginalValues.mjs +3 -0
- package/dist/esm/helpers/styleOriginalValues.mjs.map +1 -0
- package/dist/esm/helpers/styleOriginalValues.native.js +3 -0
- package/dist/esm/helpers/styleOriginalValues.native.js.map +1 -0
- package/dist/esm/helpers/styleProvenance.mjs +16 -0
- package/dist/esm/helpers/styleProvenance.mjs.map +1 -0
- package/dist/esm/helpers/styleProvenance.native.js +16 -0
- package/dist/esm/helpers/styleProvenance.native.js.map +1 -0
- package/dist/esm/helpers/useRenderElement.mjs.map +1 -1
- package/dist/esm/helpers/useRenderElement.native.js.map +1 -1
- package/dist/esm/helpers/wrapStyleTags.mjs +35 -11
- package/dist/esm/helpers/wrapStyleTags.mjs.map +1 -1
- package/dist/esm/helpers/wrapStyleTags.native.js +0 -2
- package/dist/esm/helpers/wrapStyleTags.native.js.map +1 -1
- package/dist/esm/hooks/getThemeProxied.mjs +2 -5
- package/dist/esm/hooks/getThemeProxied.mjs.map +1 -1
- package/dist/esm/hooks/getThemeProxied.native.js +5 -5
- package/dist/esm/hooks/getThemeProxied.native.js.map +1 -1
- package/dist/esm/hooks/useComponentState.mjs +31 -5
- package/dist/esm/hooks/useComponentState.mjs.map +1 -1
- package/dist/esm/hooks/useComponentState.native.js +32 -6
- package/dist/esm/hooks/useComponentState.native.js.map +1 -1
- package/dist/esm/hooks/useMedia.mjs +108 -43
- package/dist/esm/hooks/useMedia.mjs.map +1 -1
- package/dist/esm/hooks/useMedia.native.js +150 -61
- package/dist/esm/hooks/useMedia.native.js.map +1 -1
- package/dist/esm/hooks/useTheme.mjs +18 -5
- package/dist/esm/hooks/useTheme.mjs.map +1 -1
- package/dist/esm/hooks/useTheme.native.js +19 -5
- package/dist/esm/hooks/useTheme.native.js.map +1 -1
- package/dist/esm/hooks/useThemeState.mjs +141 -70
- package/dist/esm/hooks/useThemeState.mjs.map +1 -1
- package/dist/esm/hooks/useThemeState.native.js +154 -73
- package/dist/esm/hooks/useThemeState.native.js.map +1 -1
- package/dist/esm/index.js +4 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.mjs +4 -4
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/index.native.js +4 -4
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/insertFont.mjs.map +1 -1
- package/dist/esm/insertFont.native.js +0 -1
- package/dist/esm/insertFont.native.js.map +1 -1
- package/dist/esm/opacityModifier.test-d.mjs +37 -0
- package/dist/esm/opacityModifier.test-d.mjs.map +1 -0
- package/dist/esm/opacityModifier.test-d.native.js +37 -0
- package/dist/esm/opacityModifier.test-d.native.js.map +1 -0
- package/dist/esm/styledNonStyleProps.test-d.mjs +64 -0
- package/dist/esm/styledNonStyleProps.test-d.mjs.map +1 -0
- package/dist/esm/styledNonStyleProps.test-d.native.js +64 -0
- package/dist/esm/styledNonStyleProps.test-d.native.js.map +1 -0
- package/dist/esm/views/GuiProvider.mjs +2 -2
- package/dist/esm/views/GuiProvider.mjs.map +1 -1
- package/dist/esm/views/GuiProvider.native.js +6 -6
- package/dist/esm/views/GuiProvider.native.js.map +1 -1
- package/dist/esm/views/Text.mjs +1 -0
- package/dist/esm/views/Text.mjs.map +1 -1
- package/dist/esm/views/Text.native.js +1 -0
- package/dist/esm/views/Text.native.js.map +1 -1
- package/dist/esm/views/Theme.mjs +1 -1
- package/dist/esm/views/Theme.mjs.map +1 -1
- package/dist/esm/views/Theme.native.js +1 -1
- package/dist/esm/views/Theme.native.js.map +1 -1
- package/dist/esm/views/ThemeProvider.mjs.map +1 -1
- package/dist/esm/views/ThemeProvider.native.js +2 -4
- package/dist/esm/views/ThemeProvider.native.js.map +1 -1
- package/inject-styles/index.cjs +2 -0
- package/inject-styles/index.js +2 -0
- package/package.json +27 -40
- package/src/_withStableStyle.tsx +9 -3
- package/src/config.ts +24 -14
- package/src/constants/accessibilityDirectMap.tsx +1 -1
- package/src/constants/constants.ts +1 -1
- package/src/createComponent.tsx +161 -26
- package/src/createGui.ts +2 -2
- package/src/eventHandling.native.ts +143 -52
- package/src/eventHandling.ts +4 -2
- package/src/helpers/createDesignSystem.ts +2 -2
- package/src/helpers/createMediaStyle.ts +1 -1
- package/src/helpers/defaultAnimationDriver.tsx +1 -1
- package/src/helpers/expandStyle.ts +108 -40
- package/src/helpers/getGroupPropParts.ts +1 -1
- package/src/helpers/getSplitStyles.tsx +178 -72
- package/src/helpers/getTokenForKey.ts +5 -5
- package/src/helpers/getVariantExtras.tsx +5 -4
- package/src/helpers/insertStyleRule.tsx +7 -7
- package/src/helpers/mainThreadPressEvents.native.ts +42 -2
- package/src/helpers/mergeProps.ts +1 -1
- package/src/helpers/normalizeStyle.ts +23 -1
- package/src/helpers/platformResolveValue.native.ts +4 -1
- package/src/helpers/platformResolveValue.ts +5 -1
- package/src/helpers/pointerEvents.native.ts +26 -19
- package/src/helpers/propMapper.ts +61 -6
- package/src/helpers/resolveSafeArea.native.ts +1 -1
- package/src/helpers/styleOriginalValues.ts +2 -0
- package/src/helpers/styleProvenance.ts +49 -0
- package/src/helpers/wrapStyleTags.tsx +63 -20
- package/src/hooks/getThemeProxied.ts +14 -8
- package/src/hooks/useComponentState.ts +56 -4
- package/src/hooks/useMedia.tsx +156 -43
- package/src/hooks/useTheme.tsx +28 -6
- package/src/hooks/useThemeState.ts +284 -142
- package/src/index.ts +9 -1
- package/src/interfaces/GuiComponentPropsBaseBase.tsx +2 -2
- package/src/opacityModifier.test-d.ts +65 -0
- package/src/styled.tsx +1 -1
- package/src/styledNonStyleProps.test-d.ts +106 -0
- package/src/types.tsx +120 -22
- package/src/views/GuiProvider.tsx +2 -2
- package/src/views/Text.tsx +1 -0
- package/src/views/Theme.tsx +4 -1
- package/tsconfig.json +44 -0
- package/tsconfig.test.json +9 -0
- package/types/_withStableStyle.d.ts.map +1 -1
- package/types/config.d.ts +3 -1
- package/types/config.d.ts.map +1 -1
- package/types/constants/constants.d.ts +1 -1
- package/types/constants/constants.d.ts.map +1 -1
- package/types/createComponent.d.ts.map +1 -1
- package/types/eventHandling.d.ts +2 -2
- package/types/eventHandling.d.ts.map +1 -1
- package/types/eventHandling.native.d.ts +3 -3
- package/types/eventHandling.native.d.ts.map +1 -1
- package/types/helpers/expandStyle.d.ts +2 -1
- package/types/helpers/expandStyle.d.ts.map +1 -1
- package/types/helpers/getSplitStyles.d.ts +4 -2
- package/types/helpers/getSplitStyles.d.ts.map +1 -1
- package/types/helpers/getVariantExtras.d.ts.map +1 -1
- package/types/helpers/mainThreadPressEvents.native.d.ts.map +1 -1
- package/types/helpers/normalizeStyle.d.ts.map +1 -1
- package/types/helpers/platformResolveValue.d.ts.map +1 -1
- package/types/helpers/platformResolveValue.native.d.ts.map +1 -1
- package/types/helpers/pointerEvents.native.d.ts.map +1 -1
- package/types/helpers/propMapper.d.ts.map +1 -1
- package/types/helpers/styleOriginalValues.d.ts +2 -0
- package/types/helpers/styleOriginalValues.d.ts.map +1 -0
- package/types/helpers/styleProvenance.d.ts +11 -0
- package/types/helpers/styleProvenance.d.ts.map +1 -0
- package/types/helpers/wrapStyleTags.d.ts +1 -1
- package/types/helpers/wrapStyleTags.d.ts.map +1 -1
- package/types/hooks/getThemeProxied.d.ts.map +1 -1
- package/types/hooks/useComponentState.d.ts +2 -1
- package/types/hooks/useComponentState.d.ts.map +1 -1
- package/types/hooks/useMedia.d.ts.map +1 -1
- package/types/hooks/useTheme.d.ts +1 -1
- package/types/hooks/useTheme.d.ts.map +1 -1
- package/types/hooks/useThemeState.d.ts +1 -1
- package/types/hooks/useThemeState.d.ts.map +1 -1
- package/types/index.d.ts +3 -3
- package/types/index.d.ts.map +1 -1
- package/types/interfaces/GuiComponentPropsBaseBase.d.ts +2 -2
- package/types/types.d.ts +33 -16
- package/types/types.d.ts.map +1 -1
- package/types/views/Configuration.d.ts +1 -1
- package/types/views/Configuration.d.ts.map +1 -1
- package/types/views/FontLanguage.d.ts +1 -1
- package/types/views/FontLanguage.native.d.ts +1 -2
- package/types/views/FontLanguage.native.d.ts.map +1 -1
- package/types/views/GuiProvider.d.ts +1 -2
- package/types/views/GuiProvider.d.ts.map +1 -1
- package/types/views/GuiRoot.d.ts +1 -1
- package/types/views/GuiRoot.d.ts.map +1 -1
- package/types/views/Slot.d.ts +1 -1
- package/types/views/Text.d.ts.map +1 -1
- package/types/views/Theme.d.ts.map +1 -1
- package/types/views/ThemeProvider.d.ts +1 -1
- package/types/views/ThemeProvider.d.ts.map +1 -1
- package/vitest.config.d.ts +3 -0
- package/vitest.config.d.ts.map +1 -0
- package/vitest.config.ts +14 -0
- package/LICENSE +0 -42
|
@@ -36,9 +36,11 @@ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
|
36
36
|
var getSplitStyles_exports = {};
|
|
37
37
|
__export(getSplitStyles_exports, {
|
|
38
38
|
PROP_SPLIT: () => PROP_SPLIT,
|
|
39
|
+
STYLE_TOKEN_PROVENANCE_KEY: () => import_styleProvenance2.STYLE_TOKEN_PROVENANCE_KEY,
|
|
39
40
|
getSplitStyles: () => getSplitStyles,
|
|
41
|
+
getStyleTokenProvenance: () => import_styleProvenance2.getStyleTokenProvenance,
|
|
40
42
|
getSubStyle: () => getSubStyle,
|
|
41
|
-
styleOriginalValues: () => styleOriginalValues,
|
|
43
|
+
styleOriginalValues: () => import_styleOriginalValues.styleOriginalValues,
|
|
42
44
|
useSplitStyles: () => useSplitStyles
|
|
43
45
|
});
|
|
44
46
|
module.exports = __toCommonJS(getSplitStyles_exports);
|
|
@@ -64,14 +66,17 @@ var import_propMapper = require("./propMapper.native.js");
|
|
|
64
66
|
var import_pseudoDescriptors = require("./pseudoDescriptors.native.js");
|
|
65
67
|
var import_skipProps = require("./skipProps.native.js");
|
|
66
68
|
var import_sortString = require("./sortString.native.js");
|
|
69
|
+
var import_styleOriginalValues = require("./styleOriginalValues.native.js");
|
|
70
|
+
var import_styleProvenance = require("./styleProvenance.native.js");
|
|
67
71
|
var import_transformsToString = require("./transformsToString.native.js");
|
|
72
|
+
var import_styleProvenance2 = require("./styleProvenance.native.js");
|
|
68
73
|
function _type_of(obj) {
|
|
69
74
|
"@swc/helpers - typeof";
|
|
70
75
|
|
|
71
76
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
72
77
|
}
|
|
78
|
+
var shouldTrackStyleTokenProvenance = process.env.NODE_ENV === "development" && process.env.GUI_ENABLE_STYLE_TOKEN_PROVENANCE === "1";
|
|
73
79
|
var conf;
|
|
74
|
-
var styleOriginalValues = /* @__PURE__ */new WeakMap();
|
|
75
80
|
var PROP_SPLIT = "-";
|
|
76
81
|
function normalizeGroupKey(key, groupContext) {
|
|
77
82
|
var parts = key.split("-");
|
|
@@ -85,6 +90,13 @@ function normalizeGroupKey(key, groupContext) {
|
|
|
85
90
|
function isValidStyleKey(key, validStyles, accept) {
|
|
86
91
|
return key in validStyles ? true : accept && key in accept;
|
|
87
92
|
}
|
|
93
|
+
function shouldSkipNativeHoverProp(key, isMedia) {
|
|
94
|
+
var _getPlatformDriver;
|
|
95
|
+
if ((_getPlatformDriver = (0, import_constants.getPlatformDriver)()) === null || _getPlatformDriver === void 0 ? void 0 : _getPlatformDriver.pseudo) return false;
|
|
96
|
+
if (key === "hoverStyle") return true;
|
|
97
|
+
if (isMedia === "group") return (0, import_getGroupPropParts.getGroupPropParts)(key.slice(1)).pseudo === "hover";
|
|
98
|
+
return false;
|
|
99
|
+
}
|
|
88
100
|
var getSplitStyles = function (props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, componentContext, groupContext, elementType, startedUnhydrated, debug, animationDriver) {
|
|
89
101
|
var _loop = function (keyOg2) {
|
|
90
102
|
var keyInit = keyOg2;
|
|
@@ -93,6 +105,7 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
|
|
|
93
105
|
viewProps[keyInit] = valInit;
|
|
94
106
|
return "continue";
|
|
95
107
|
}
|
|
108
|
+
if (keyInit[0] === "d" && keyInit.startsWith("data-")) return "continue";
|
|
96
109
|
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`before-prop-${keyInit}`;
|
|
97
110
|
if (process.env.NODE_ENV === "test" && keyInit === "jestAnimatedStyle") return "continue";
|
|
98
111
|
if (accept) {
|
|
@@ -115,9 +128,12 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
|
|
|
115
128
|
}
|
|
116
129
|
}
|
|
117
130
|
if (keyInit in import_skipProps.skipProps && !noSkip && !isHOC) {
|
|
118
|
-
var _driver_animations;
|
|
119
131
|
if (keyInit === "group") ;
|
|
120
|
-
if (keyInit === "transition" && typeof valInit === "string"
|
|
132
|
+
if (keyInit === "transition" && typeof valInit === "string") {
|
|
133
|
+
var _driver_animations;
|
|
134
|
+
var animationConfig = driver === null || driver === void 0 ? void 0 : (_driver_animations = driver.animations) === null || _driver_animations === void 0 ? void 0 : _driver_animations[valInit];
|
|
135
|
+
if (animationConfig && (driver === null || driver === void 0 ? void 0 : driver.outputStyle) === "css" && process.env.IS_STATIC === "is_static") valInit = `all ${animationConfig}`;else if (animationConfig) return "continue";
|
|
136
|
+
} else return "continue";
|
|
121
137
|
}
|
|
122
138
|
var isValidStyleKeyInit = isValidStyleKey(keyInit, validStyles, accept);
|
|
123
139
|
if (!isValidStyleKeyInit) {
|
|
@@ -136,6 +152,7 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
|
|
|
136
152
|
var isMediaOrPseudo = Boolean(isMedia || isPseudo);
|
|
137
153
|
if (isMediaOrPseudo && isMedia === "group") keyInit = normalizeGroupKey(keyInit, groupContext);
|
|
138
154
|
var isStyleProp = isValidStyleKeyInit || isMediaOrPseudo || isVariant && !noExpand;
|
|
155
|
+
if (shouldSkipNativeHoverProp(keyInit, isMedia)) return "continue";
|
|
139
156
|
if (isStyleProp && (asChild === "except-style" || asChild === "except-style-web")) return "continue";
|
|
140
157
|
var shouldPassProp = !isStyleProp && isHOC || isHOC && parentVariants && keyInit in parentVariants || (inlineProps === null || inlineProps === void 0 ? void 0 : inlineProps.has(keyInit));
|
|
141
158
|
var parentVariant = parentVariants === null || parentVariants === void 0 ? void 0 : parentVariants[keyInit];
|
|
@@ -175,44 +192,45 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
|
|
|
175
192
|
if (valInit && (keyInit === "fontFamily" || keyInit === shorthands["fontFamily"]) && valInit in conf.fontsParsed) styleState.fontFamily = valInit;
|
|
176
193
|
}
|
|
177
194
|
var disablePropMap = isMediaOrPseudo || !isStyleLikeKey;
|
|
178
|
-
(0, import_propMapper.propMapper)(keyInit, valInit, styleState, disablePropMap, function (
|
|
195
|
+
(0, import_propMapper.propMapper)(keyInit, valInit, styleState, disablePropMap, function (key6, val2, originalVal) {
|
|
179
196
|
var _parentStaticConfig_variants;
|
|
180
|
-
var isStyledContextProp = styledContext &&
|
|
197
|
+
var isStyledContextProp = styledContext && key6 in styledContext;
|
|
181
198
|
if (!isHOC && disablePropMap && !isStyledContextProp && !isMediaOrPseudo) {
|
|
182
|
-
viewProps[
|
|
199
|
+
viewProps[key6] = val2;
|
|
183
200
|
return;
|
|
184
201
|
}
|
|
185
202
|
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
186
|
-
console.groupCollapsed(" 💠 expanded", keyInit, "=>",
|
|
203
|
+
console.groupCollapsed(" 💠 expanded", keyInit, "=>", key6);
|
|
187
204
|
(0, import_log.log)(val2);
|
|
188
205
|
console.groupEnd();
|
|
189
206
|
}
|
|
190
207
|
if (val2 == null) return;
|
|
191
|
-
if (
|
|
192
|
-
viewProps[
|
|
208
|
+
if (key6 === "pointerEvents") {
|
|
209
|
+
viewProps[key6] = val2;
|
|
193
210
|
return;
|
|
194
211
|
}
|
|
195
|
-
if (!isHOC && isValidStyleKey(
|
|
196
|
-
mergeStyle(styleState,
|
|
212
|
+
if (!isHOC && isValidStyleKey(key6, validStyles, accept) || import_constants.isAndroid && key6 === "elevation") {
|
|
213
|
+
mergeStyle(styleState, key6, val2, 1, false, originalVal);
|
|
197
214
|
return;
|
|
198
215
|
}
|
|
199
|
-
isPseudo =
|
|
200
|
-
isMedia = isPseudo ? false : (0, import_useMedia.getMediaKey)(
|
|
216
|
+
isPseudo = key6 in import_helpers.validPseudoKeys;
|
|
217
|
+
isMedia = isPseudo ? false : (0, import_useMedia.getMediaKey)(key6);
|
|
201
218
|
isMediaOrPseudo = Boolean(isMedia || isPseudo);
|
|
202
|
-
isVariant = variants &&
|
|
203
|
-
if (isMedia === "group")
|
|
204
|
-
if ((
|
|
219
|
+
isVariant = variants && key6 in variants;
|
|
220
|
+
if (isMedia === "group") key6 = normalizeGroupKey(key6, groupContext);
|
|
221
|
+
if (shouldSkipNativeHoverProp(key6, isMedia)) return;
|
|
222
|
+
if ((inlineProps === null || inlineProps === void 0 ? void 0 : inlineProps.has(key6)) || process.env.IS_STATIC === "is_static" && (inlineWhenUnflattened === null || inlineWhenUnflattened === void 0 ? void 0 : inlineWhenUnflattened.has(key6))) {
|
|
205
223
|
var _props_key;
|
|
206
|
-
viewProps[
|
|
224
|
+
viewProps[key6] = (_props_key = props[key6]) !== null && _props_key !== void 0 ? _props_key : val2;
|
|
207
225
|
}
|
|
208
226
|
if (styleProps.noExpand && isPseudo || isHOC && (isMediaOrPseudo || (parentStaticConfig === null || parentStaticConfig === void 0 ? void 0 : (_parentStaticConfig_variants = parentStaticConfig.variants) === null || _parentStaticConfig_variants === void 0 ? void 0 : _parentStaticConfig_variants[keyInit]))) {
|
|
209
|
-
passDownProp(viewProps,
|
|
227
|
+
passDownProp(viewProps, key6, val2, isMediaOrPseudo);
|
|
210
228
|
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
211
|
-
console.groupCollapsed(` - passing down prop ${
|
|
229
|
+
console.groupCollapsed(` - passing down prop ${key6}`);
|
|
212
230
|
(0, import_log.log)({
|
|
213
231
|
val: val2,
|
|
214
232
|
after: {
|
|
215
|
-
...viewProps[
|
|
233
|
+
...viewProps[key6]
|
|
216
234
|
}
|
|
217
235
|
});
|
|
218
236
|
console.groupEnd();
|
|
@@ -221,23 +239,23 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
|
|
|
221
239
|
}
|
|
222
240
|
if (isPseudo) {
|
|
223
241
|
if (!val2) return;
|
|
224
|
-
var pseudoStyleObject = getSubStyle(styleState,
|
|
242
|
+
var pseudoStyleObject = getSubStyle(styleState, key6, val2, styleProps.noClass && !(process.env.IS_STATIC === "is_static"));
|
|
225
243
|
if (!shouldDoClasses || process.env.IS_STATIC === "is_static") {
|
|
226
244
|
var _pseudos, _key;
|
|
227
245
|
pseudos || (pseudos = {});
|
|
228
|
-
(_pseudos = pseudos)[_key =
|
|
246
|
+
(_pseudos = pseudos)[_key = key6] || (_pseudos[_key] = {});
|
|
229
247
|
if (process.env.IS_STATIC === "is_static") {
|
|
230
|
-
Object.assign(pseudos[
|
|
248
|
+
Object.assign(pseudos[key6], pseudoStyleObject);
|
|
231
249
|
return;
|
|
232
250
|
}
|
|
233
251
|
}
|
|
234
|
-
var descriptor = import_pseudoDescriptors.pseudoDescriptors[
|
|
235
|
-
var isEnter =
|
|
236
|
-
var isExit =
|
|
252
|
+
var descriptor = import_pseudoDescriptors.pseudoDescriptors[key6];
|
|
253
|
+
var isEnter = key6 === "enterStyle";
|
|
254
|
+
var isExit = key6 === "exitStyle";
|
|
237
255
|
if (!descriptor) return;
|
|
238
256
|
if (shouldDoClasses && !isExit) {
|
|
239
257
|
var pseudoStyles = (0, import_getCSSStylesAtomic.getStyleAtomic)(pseudoStyleObject, descriptor);
|
|
240
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") console.info("pseudo:",
|
|
258
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose") console.info("pseudo:", key6, pseudoStyleObject, pseudoStyles);
|
|
241
259
|
var _iteratorNormalCompletion3 = true,
|
|
242
260
|
_didIteratorError3 = false,
|
|
243
261
|
_iteratorError3 = void 0;
|
|
@@ -264,7 +282,7 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
|
|
|
264
282
|
if (isExit) isDisabled = !styleProps.isExiting;
|
|
265
283
|
if (isEnter && componentState.unmounted === false) isDisabled = true;
|
|
266
284
|
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
267
|
-
console.groupCollapsed("pseudo",
|
|
285
|
+
console.groupCollapsed("pseudo", key6, {
|
|
268
286
|
isDisabled
|
|
269
287
|
});
|
|
270
288
|
(0, import_log.log)({
|
|
@@ -276,7 +294,7 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
|
|
|
276
294
|
console.groupEnd();
|
|
277
295
|
}
|
|
278
296
|
var importance = descriptor.priority;
|
|
279
|
-
var pseudoOriginalValues = styleOriginalValues.get(pseudoStyleObject);
|
|
297
|
+
var pseudoOriginalValues = import_styleOriginalValues.styleOriginalValues.get(pseudoStyleObject);
|
|
280
298
|
for (var pkey in pseudoStyleObject) {
|
|
281
299
|
var _$val = pseudoStyleObject[pkey];
|
|
282
300
|
if (isDisabled) applyDefaultStyle(pkey, styleState);else {
|
|
@@ -286,8 +304,8 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
|
|
|
286
304
|
if (process.env.IS_STATIC === "is_static") {
|
|
287
305
|
var _pseudos1, _key1;
|
|
288
306
|
pseudos || (pseudos = {});
|
|
289
|
-
(_pseudos1 = pseudos)[_key1 =
|
|
290
|
-
pseudos[
|
|
307
|
+
(_pseudos1 = pseudos)[_key1 = key6] || (_pseudos1[_key1] = {});
|
|
308
|
+
pseudos[key6][pkey] = _$val;
|
|
291
309
|
}
|
|
292
310
|
mergeStyle(styleState, pkey, _$val, importance, false, pseudoOriginalValues === null || pseudoOriginalValues === void 0 ? void 0 : pseudoOriginalValues[pkey]);
|
|
293
311
|
}
|
|
@@ -300,25 +318,25 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
|
|
|
300
318
|
}
|
|
301
319
|
}
|
|
302
320
|
if (!isDisabled) for (var _$key in val2) {
|
|
303
|
-
var
|
|
304
|
-
styleState.usedKeys[
|
|
321
|
+
var k2 = shorthands[_$key] || _$key;
|
|
322
|
+
styleState.usedKeys[k2] = Math.max(importance, styleState.usedKeys[k2] || 0);
|
|
305
323
|
}
|
|
306
324
|
}
|
|
307
325
|
return;
|
|
308
326
|
}
|
|
309
327
|
if (isMedia) {
|
|
310
328
|
if (!val2) return;
|
|
311
|
-
var mediaKeyShort =
|
|
329
|
+
var mediaKeyShort = key6.slice(isMedia == "theme" ? 7 : 1);
|
|
312
330
|
hasMedia || (hasMedia = true);
|
|
313
331
|
if (val2["space"] || !shouldDoClasses || styleProps.willBeAnimated) {
|
|
314
332
|
if (!hasMedia || typeof hasMedia === "boolean") hasMedia = /* @__PURE__ */new Set();
|
|
315
333
|
hasMedia.add(mediaKeyShort);
|
|
316
334
|
}
|
|
317
335
|
if (isMedia === "platform") {
|
|
318
|
-
if (!(0, import_isActivePlatform.isActivePlatform)(
|
|
336
|
+
if (!(0, import_isActivePlatform.isActivePlatform)(key6)) return;
|
|
319
337
|
}
|
|
320
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") (0, import_log.log)(` \u{1F4FA} ${
|
|
321
|
-
key:
|
|
338
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose") (0, import_log.log)(` \u{1F4FA} ${key6}`, {
|
|
339
|
+
key: key6,
|
|
322
340
|
val: val2,
|
|
323
341
|
props,
|
|
324
342
|
shouldDoClasses,
|
|
@@ -329,7 +347,7 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
|
|
|
329
347
|
var priority = mediaStylesSeen;
|
|
330
348
|
mediaStylesSeen += 1;
|
|
331
349
|
if (shouldDoClasses) {
|
|
332
|
-
var mediaStyle = getSubStyle(styleState,
|
|
350
|
+
var mediaStyle = getSubStyle(styleState, key6, val2, false);
|
|
333
351
|
var mediaStyles = (0, import_getCSSStylesAtomic.getCSSStylesAtomic)(mediaStyle);
|
|
334
352
|
var _iteratorNormalCompletion12 = true,
|
|
335
353
|
_didIteratorError12 = false,
|
|
@@ -358,14 +376,14 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
|
|
|
358
376
|
}
|
|
359
377
|
}
|
|
360
378
|
} else {
|
|
361
|
-
let mergeMediaStyle2 = function (
|
|
379
|
+
let mergeMediaStyle2 = function (key7, val3, originalVal2) {
|
|
362
380
|
var _styleState4;
|
|
363
|
-
if (!isValidStyleKey(
|
|
364
|
-
viewProps[
|
|
381
|
+
if (!isValidStyleKey(key7, validStyles, accept)) {
|
|
382
|
+
viewProps[key7] = val3;
|
|
365
383
|
return;
|
|
366
384
|
}
|
|
367
385
|
(_styleState4 = styleState).style || (_styleState4.style = {});
|
|
368
|
-
if (mergeMediaByImportance(styleState, mediaKeyShort,
|
|
386
|
+
if (mergeMediaByImportance(styleState, mediaKeyShort, key7, val3, mediaState[mediaKeyShort], importanceBump, debug, originalVal2) && key7 === "fontFamily") styleState.fontFamily = mediaStyle1.fontFamily;
|
|
369
387
|
};
|
|
370
388
|
var isThemeMedia = isMedia === "theme";
|
|
371
389
|
var isGroupMedia = isMedia === "group";
|
|
@@ -377,15 +395,15 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
|
|
|
377
395
|
}
|
|
378
396
|
if (process.env.NODE_ENV === "development" && debug === "verbose") (0, import_log.log)(` \u{1F4FA} \u2705 ENABLED ${mediaKeyShort}`);
|
|
379
397
|
}
|
|
380
|
-
var mediaStyle1 = getSubStyle(styleState,
|
|
398
|
+
var mediaStyle1 = getSubStyle(styleState, key6, val2, true);
|
|
381
399
|
var importanceBump = 0;
|
|
382
400
|
if (isThemeMedia) {
|
|
383
|
-
if (import_constants.
|
|
401
|
+
if (import_constants.supportsDynamicColorIOS && (0, import_config.getSetting)("fastSchemeChange")) {
|
|
384
402
|
var _styleState3;
|
|
385
403
|
(_styleState3 = styleState).style || (_styleState3.style = {});
|
|
386
404
|
var scheme = mediaKeyShort;
|
|
387
405
|
var oppositeScheme = (0, import_getDynamicVal.getOppositeScheme)(mediaKeyShort);
|
|
388
|
-
var themeOriginalValues = styleOriginalValues.get(mediaStyle1);
|
|
406
|
+
var themeOriginalValues = import_styleOriginalValues.styleOriginalValues.get(mediaStyle1);
|
|
389
407
|
var isCurrentScheme = themeName === scheme || themeName.startsWith(scheme);
|
|
390
408
|
for (var subKey1 in mediaStyle1) {
|
|
391
409
|
var _$val1 = (0, import_getDynamicVal.extractValueFromDynamic)(mediaStyle1[subKey1], scheme);
|
|
@@ -419,6 +437,7 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
|
|
|
419
437
|
var groupState = groupContext === null || groupContext === void 0 ? void 0 : (_groupContext_groupName = groupContext[groupName]) === null || _groupContext_groupName === void 0 ? void 0 : _groupContext_groupName.state;
|
|
420
438
|
var groupPseudoKey = groupInfo.pseudo;
|
|
421
439
|
var groupMediaKey = groupInfo.media;
|
|
440
|
+
if (groupPseudoKey === "hover") return;
|
|
422
441
|
if (!groupState) {
|
|
423
442
|
if (process.env.NODE_ENV === "development" && debug) (0, import_log.log)(`No parent with group prop, skipping styles: ${groupName}`);
|
|
424
443
|
pseudoGroups || (pseudoGroups = /* @__PURE__ */new Set());
|
|
@@ -465,7 +484,7 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
|
|
|
465
484
|
importanceBump = priority1;
|
|
466
485
|
}
|
|
467
486
|
} else if (isPlatformMedia) importanceBump = (0, import_isActivePlatform.getPlatformSpecificityBump)(mediaKeyShort);
|
|
468
|
-
var mediaOriginalValues = styleOriginalValues.get(mediaStyle1);
|
|
487
|
+
var mediaOriginalValues = import_styleOriginalValues.styleOriginalValues.get(mediaStyle1);
|
|
469
488
|
if (isGroupMedia && mediaStyle1.transition) {
|
|
470
489
|
var _styleState12;
|
|
471
490
|
(_styleState12 = styleState).pseudoTransitions || (_styleState12.pseudoTransitions = {});
|
|
@@ -483,7 +502,7 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
|
|
|
483
502
|
if (!mediaState[subKey2.slice(1)]) continue;
|
|
484
503
|
}
|
|
485
504
|
var nestedVal = mediaStyle1[subKey2];
|
|
486
|
-
var subOriginalValues = styleOriginalValues.get(nestedVal);
|
|
505
|
+
var subOriginalValues = import_styleOriginalValues.styleOriginalValues.get(nestedVal);
|
|
487
506
|
var outerBase = !!mediaState[mediaKeyShort] ? (0, import_useMedia.getMediaKeyImportance)(mediaKeyShort) : import_pseudoDescriptors.defaultMediaImportance;
|
|
488
507
|
var innerBase = void 0;
|
|
489
508
|
if (subMediaType === "platform") innerBase = import_pseudoDescriptors.defaultMediaImportance + (0, import_isActivePlatform.getPlatformSpecificityBump)(subKey2.slice(1));else if (subMediaType === true) innerBase = (0, import_useMedia.getMediaKeyImportance)(subKey2.slice(1));else innerBase = import_pseudoDescriptors.defaultMediaImportance;
|
|
@@ -506,7 +525,7 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
|
|
|
506
525
|
}
|
|
507
526
|
if (!isVariant) {
|
|
508
527
|
if (isStyledContextProp) return;
|
|
509
|
-
viewProps[
|
|
528
|
+
viewProps[key6] = val2;
|
|
510
529
|
}
|
|
511
530
|
});
|
|
512
531
|
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
@@ -578,9 +597,9 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
|
|
|
578
597
|
fallbackProps
|
|
579
598
|
} = styleProps;
|
|
580
599
|
if (fallbackProps) styleState.props = new Proxy(props, {
|
|
581
|
-
get(_,
|
|
582
|
-
if (!Reflect.has(props,
|
|
583
|
-
return Reflect.get(props,
|
|
600
|
+
get(_, key6, val2) {
|
|
601
|
+
if (!Reflect.has(props, key6)) return Reflect.get(fallbackProps, key6);
|
|
602
|
+
return Reflect.get(props, key6);
|
|
584
603
|
}
|
|
585
604
|
});
|
|
586
605
|
}
|
|
@@ -650,7 +669,12 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
|
|
|
650
669
|
if (style) if (style["$$css"]) Object.assign(styleState.classNames, style);else {
|
|
651
670
|
var _styleState2;
|
|
652
671
|
(_styleState2 = styleState).style || (_styleState2.style = {});
|
|
653
|
-
|
|
672
|
+
var normalized = normalizeStyle(style);
|
|
673
|
+
Object.assign(styleState.style, normalized);
|
|
674
|
+
if (shouldTrackStyleTokenProvenance) {
|
|
675
|
+
var styleOriginals = import_styleOriginalValues.styleOriginalValues.get(normalized);
|
|
676
|
+
for (var k in normalized) recordStyleTokenProvenance(styleState, k, styleOriginals === null || styleOriginals === void 0 ? void 0 : styleOriginals[k]);
|
|
677
|
+
}
|
|
654
678
|
}
|
|
655
679
|
}
|
|
656
680
|
}
|
|
@@ -676,6 +700,18 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
|
|
|
676
700
|
if (process.env.NODE_ENV === "development" && debug && debug !== "profile") (0, import_log.log)(`Found fontFamily native: ${style1.fontFamily}`, faceInfo);
|
|
677
701
|
}
|
|
678
702
|
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-pre-result`;
|
|
703
|
+
if (shouldTrackStyleTokenProvenance && styleState.style && styleState.tokenProvenance) {
|
|
704
|
+
var provenance = {};
|
|
705
|
+
var hasProvenance = false;
|
|
706
|
+
for (var key4 in styleState.tokenProvenance) {
|
|
707
|
+
provenance[key4] = {
|
|
708
|
+
token: styleState.tokenProvenance[key4],
|
|
709
|
+
theme: themeName
|
|
710
|
+
};
|
|
711
|
+
hasProvenance = true;
|
|
712
|
+
}
|
|
713
|
+
if (hasProvenance) (0, import_styleProvenance.setStyleTokenProvenance)(styleState.style, provenance);
|
|
714
|
+
}
|
|
679
715
|
var result = {
|
|
680
716
|
hasMedia,
|
|
681
717
|
fontFamily: styleState.fontFamily,
|
|
@@ -710,7 +746,7 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
|
|
|
710
746
|
rulesToInsert,
|
|
711
747
|
parentSplitStyles
|
|
712
748
|
};
|
|
713
|
-
for (var
|
|
749
|
+
for (var key5 in logs) (0, import_log.log)(key5, logs[key5]);
|
|
714
750
|
} catch (e) {}
|
|
715
751
|
console.groupEnd();
|
|
716
752
|
}
|
|
@@ -760,38 +796,17 @@ function mergeStyle(styleState, key, val, importance) {
|
|
|
760
796
|
(_styleState2 = styleState).style || (_styleState2.style = {});
|
|
761
797
|
usedKeys[key] = importance;
|
|
762
798
|
styleState.style[key] = key === "transform" && Array.isArray(out) ? [...out] : out;
|
|
799
|
+
if (shouldTrackStyleTokenProvenance) recordStyleTokenProvenance(styleState, key, originalVal);
|
|
763
800
|
}
|
|
764
801
|
}
|
|
765
802
|
}
|
|
803
|
+
function recordStyleTokenProvenance(styleState, key, originalVal) {
|
|
804
|
+
if (typeof originalVal === "string" && originalVal[0] === "$") {
|
|
805
|
+
var _styleState;
|
|
806
|
+
((_styleState = styleState).tokenProvenance || (_styleState.tokenProvenance = {}))[key] = originalVal;
|
|
807
|
+
} else if (styleState.tokenProvenance && key in styleState.tokenProvenance) delete styleState.tokenProvenance[key];
|
|
808
|
+
}
|
|
766
809
|
var getSubStyle = function (styleState, subKey, styleIn, avoidMergeTransform) {
|
|
767
|
-
var _loop = function (key1) {
|
|
768
|
-
var val = styleIn[key1];
|
|
769
|
-
key1 = conf2.shorthands[key1] || key1;
|
|
770
|
-
if (key1 === "transition") {
|
|
771
|
-
var _driver_animations;
|
|
772
|
-
var _styleState;
|
|
773
|
-
(_styleState = styleState).pseudoTransitions || (_styleState.pseudoTransitions = {});
|
|
774
|
-
styleState.pseudoTransitions[subKey] = val;
|
|
775
|
-
var driver = styleState.animationDriver;
|
|
776
|
-
if ((driver === null || driver === void 0 ? void 0 : driver.outputStyle) === "css") {
|
|
777
|
-
var _driver_animations1;
|
|
778
|
-
var animationConfig = (_driver_animations1 = driver.animations) === null || _driver_animations1 === void 0 ? void 0 : _driver_animations1[val];
|
|
779
|
-
if (animationConfig) styleOut["transition"] = `all ${animationConfig}${subKey[0] === "$" ? " !important" : ""}`;
|
|
780
|
-
}
|
|
781
|
-
if (!styleOut["transition"] && typeof val === "string" && !(driver === null || driver === void 0 ? void 0 : (_driver_animations = driver.animations) === null || _driver_animations === void 0 ? void 0 : _driver_animations[val])) styleOut["transition"] = val;
|
|
782
|
-
return key = key1, "continue";
|
|
783
|
-
}
|
|
784
|
-
if (!staticConfig.isHOC && key1 in import_skipProps.skipProps && !styleProps.noSkip) return key = key1, "continue";
|
|
785
|
-
(0, import_propMapper.propMapper)(key1, val, styleState, false, function (skey, sval, originalVal) {
|
|
786
|
-
if (originalVal !== void 0) {
|
|
787
|
-
originalValues || (originalValues = {});
|
|
788
|
-
originalValues[skey] = originalVal;
|
|
789
|
-
}
|
|
790
|
-
if (skey in import_helpers.validPseudoKeys) sval = getSubStyle(styleState, skey, sval, avoidMergeTransform);
|
|
791
|
-
if (!avoidMergeTransform && skey in import_helpers.stylePropsTransform) mergeTransform(styleOut, skey, sval);else styleOut[skey] = styleProps.noNormalize ? sval : (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(sval, key1);
|
|
792
|
-
});
|
|
793
|
-
key = key1;
|
|
794
|
-
};
|
|
795
810
|
var {
|
|
796
811
|
staticConfig,
|
|
797
812
|
conf: conf2,
|
|
@@ -799,7 +814,47 @@ var getSubStyle = function (styleState, subKey, styleIn, avoidMergeTransform) {
|
|
|
799
814
|
} = styleState;
|
|
800
815
|
var styleOut = {};
|
|
801
816
|
var originalValues;
|
|
802
|
-
|
|
817
|
+
var styleInOriginalValues = import_styleOriginalValues.styleOriginalValues.get(styleIn);
|
|
818
|
+
var parentProps = styleState.props;
|
|
819
|
+
styleState.props = {
|
|
820
|
+
...parentProps,
|
|
821
|
+
...styleIn
|
|
822
|
+
};
|
|
823
|
+
try {
|
|
824
|
+
var _loop = function (key1) {
|
|
825
|
+
var val = styleIn[key1];
|
|
826
|
+
key1 = conf2.shorthands[key1] || key1;
|
|
827
|
+
if (key1 === "transition") {
|
|
828
|
+
var _driver_animations;
|
|
829
|
+
var _styleState;
|
|
830
|
+
(_styleState = styleState).pseudoTransitions || (_styleState.pseudoTransitions = {});
|
|
831
|
+
styleState.pseudoTransitions[subKey] = val;
|
|
832
|
+
var driver = styleState.animationDriver;
|
|
833
|
+
if ((driver === null || driver === void 0 ? void 0 : driver.outputStyle) === "css") {
|
|
834
|
+
var _driver_animations1;
|
|
835
|
+
var animationConfig = (_driver_animations1 = driver.animations) === null || _driver_animations1 === void 0 ? void 0 : _driver_animations1[val];
|
|
836
|
+
if (animationConfig) styleOut["transition"] = `all ${animationConfig}${subKey[0] === "$" ? " !important" : ""}`;
|
|
837
|
+
}
|
|
838
|
+
if (!styleOut["transition"] && typeof val === "string" && !(driver === null || driver === void 0 ? void 0 : (_driver_animations = driver.animations) === null || _driver_animations === void 0 ? void 0 : _driver_animations[val])) styleOut["transition"] = val;
|
|
839
|
+
return key = key1, "continue";
|
|
840
|
+
}
|
|
841
|
+
if (!staticConfig.isHOC && key1 in import_skipProps.skipProps && !styleProps.noSkip) return key = key1, "continue";
|
|
842
|
+
(0, import_propMapper.propMapper)(key1, val, styleState, false, function (skey, sval, originalVal) {
|
|
843
|
+
var _styleInOriginalValues_skey;
|
|
844
|
+
var trackedOriginalVal = (_styleInOriginalValues_skey = styleInOriginalValues === null || styleInOriginalValues === void 0 ? void 0 : styleInOriginalValues[skey]) !== null && _styleInOriginalValues_skey !== void 0 ? _styleInOriginalValues_skey : originalVal;
|
|
845
|
+
if (trackedOriginalVal !== void 0) {
|
|
846
|
+
originalValues || (originalValues = {});
|
|
847
|
+
originalValues[skey] = trackedOriginalVal;
|
|
848
|
+
}
|
|
849
|
+
if (skey in import_helpers.validPseudoKeys) sval = getSubStyle(styleState, skey, sval, avoidMergeTransform);
|
|
850
|
+
if (!avoidMergeTransform && skey in import_helpers.stylePropsTransform) mergeTransform(styleOut, skey, sval);else styleOut[skey] = styleProps.noNormalize ? sval : (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(sval, key1);
|
|
851
|
+
});
|
|
852
|
+
key = key1;
|
|
853
|
+
};
|
|
854
|
+
for (var key in styleIn) _loop(key);
|
|
855
|
+
} finally {
|
|
856
|
+
styleState.props = parentProps;
|
|
857
|
+
}
|
|
803
858
|
if (!avoidMergeTransform) {
|
|
804
859
|
var _styleState_style;
|
|
805
860
|
var parentTransform = (_styleState_style = styleState.style) === null || _styleState_style === void 0 ? void 0 : _styleState_style.transform;
|
|
@@ -834,7 +889,7 @@ var getSubStyle = function (styleState, subKey, styleIn, avoidMergeTransform) {
|
|
|
834
889
|
} else if (flatTransforms) mergeFlatTransforms(styleOut, flatTransforms);
|
|
835
890
|
}
|
|
836
891
|
if (!styleProps.noNormalize) (0, import_expandStyles.fixStyles)(styleOut);
|
|
837
|
-
if (originalValues) styleOriginalValues.set(styleOut, originalValues);
|
|
892
|
+
if (originalValues && Object.keys(originalValues).length) import_styleOriginalValues.styleOriginalValues.set(styleOut, originalValues);
|
|
838
893
|
return styleOut;
|
|
839
894
|
};
|
|
840
895
|
import_constants.isWeb && (import_react.default.useInsertionEffect || import_constants.useIsomorphicLayoutEffect);
|
|
@@ -900,7 +955,7 @@ function mergeMediaByImportance(styleState, mediaKey, key, value, isSizeMedia, i
|
|
|
900
955
|
var descriptor = import_pseudoDescriptors.pseudoDescriptors[key];
|
|
901
956
|
var descriptorKey = descriptor.stateKey || descriptor.name;
|
|
902
957
|
if (styleState.componentState[descriptorKey] === false) return false;
|
|
903
|
-
var pseudoOriginalValues = styleOriginalValues.get(value);
|
|
958
|
+
var pseudoOriginalValues = import_styleOriginalValues.styleOriginalValues.get(value);
|
|
904
959
|
for (var subKey in value) mergeStyle(styleState, subKey, value[subKey], importance, false, pseudoOriginalValues === null || pseudoOriginalValues === void 0 ? void 0 : pseudoOriginalValues[subKey]);
|
|
905
960
|
} else mergeStyle(styleState, key, value, importance, false, originalVal);
|
|
906
961
|
return true;
|