@tamagui/web 3.0.0-beta.807.1 → 3.0.0-beta.881.1
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/dist/cjs/config.cjs +1 -1
- package/dist/cjs/config.native.cjs +1 -1
- package/dist/cjs/config.native.js +1 -1
- package/dist/cjs/config.native.js.map +1 -1
- package/dist/cjs/createComponent.cjs +40 -19
- package/dist/cjs/createComponent.native.cjs +42 -21
- package/dist/cjs/createComponent.native.js +42 -21
- package/dist/cjs/createComponent.native.js.map +1 -1
- package/dist/cjs/createStyledHOC.cjs +54 -4
- package/dist/cjs/createStyledHOC.native.cjs +55 -4
- package/dist/cjs/createStyledHOC.native.js +55 -4
- package/dist/cjs/createStyledHOC.native.js.map +1 -1
- package/dist/cjs/createTokens.cjs +1 -1
- package/dist/cjs/createTokens.native.cjs +1 -1
- package/dist/cjs/createTokens.native.js +1 -1
- package/dist/cjs/createTokens.native.js.map +1 -1
- package/dist/cjs/createVariable.cjs +0 -10
- package/dist/cjs/createVariable.native.cjs +0 -10
- package/dist/cjs/createVariable.native.js +0 -10
- package/dist/cjs/createVariable.native.js.map +1 -1
- package/dist/cjs/dom/html.cjs +147 -99
- package/dist/cjs/dom/htmlRuntime.native.cjs +6 -2
- package/dist/cjs/dom/htmlRuntime.native.js +6 -2
- package/dist/cjs/dom/htmlRuntime.native.js.map +1 -1
- package/dist/cjs/dom/primitives.native.cjs +16 -13
- package/dist/cjs/dom/primitives.native.js +16 -13
- package/dist/cjs/dom/primitives.native.js.map +1 -1
- package/dist/cjs/helpers/borderComponents.cjs +62 -0
- package/dist/cjs/helpers/borderComponents.native.cjs +82 -0
- package/dist/cjs/helpers/borderComponents.native.js +84 -0
- package/dist/cjs/helpers/borderComponents.native.js.map +1 -0
- package/dist/cjs/helpers/componentDisplayName.cjs +1 -11
- package/dist/cjs/helpers/componentDisplayName.native.cjs +1 -11
- package/dist/cjs/helpers/componentDisplayName.native.js +1 -11
- package/dist/cjs/helpers/componentDisplayName.native.js.map +1 -1
- package/dist/cjs/helpers/createDesignSystem.cjs +0 -2
- package/dist/cjs/helpers/createStyledContext.cjs +10 -18
- package/dist/cjs/helpers/createStyledContext.native.cjs +14 -18
- package/dist/cjs/helpers/createStyledContext.native.js +14 -18
- package/dist/cjs/helpers/createStyledContext.native.js.map +1 -1
- package/dist/cjs/helpers/formatDiagnostic.cjs +8 -10
- package/dist/cjs/helpers/formatDiagnostic.native.cjs +8 -10
- package/dist/cjs/helpers/formatDiagnostic.native.js +8 -10
- package/dist/cjs/helpers/formatDiagnostic.native.js.map +1 -1
- package/dist/cjs/helpers/getCSSStylesAtomic.cjs +133 -114
- package/dist/cjs/helpers/getCSSStylesAtomic.native.cjs +11 -3
- package/dist/cjs/helpers/getCSSStylesAtomic.native.js +11 -3
- package/dist/cjs/helpers/getCSSStylesAtomic.native.js.map +1 -1
- package/dist/cjs/helpers/getCSSStylesAtomicCompiled.cjs +13 -1
- package/dist/cjs/helpers/getCSSStylesAtomicCompiled.native.cjs +15 -1
- package/dist/cjs/helpers/getCSSStylesAtomicCompiled.native.js +15 -1
- package/dist/cjs/helpers/getCSSStylesAtomicCompiled.native.js.map +1 -1
- package/dist/cjs/helpers/getDynamicVal.cjs +5 -1
- package/dist/cjs/helpers/getDynamicVal.native.cjs +5 -1
- package/dist/cjs/helpers/getDynamicVal.native.js +5 -1
- package/dist/cjs/helpers/getDynamicVal.native.js.map +1 -1
- package/dist/cjs/helpers/getSplitStyles.cjs +1063 -2168
- package/dist/cjs/helpers/getSplitStyles.native.cjs +1115 -2515
- package/dist/cjs/helpers/getSplitStyles.native.js +1115 -2515
- package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/cjs/helpers/grammarConfig.cjs +163 -1
- package/dist/cjs/helpers/grammarConfig.native.cjs +186 -1
- package/dist/cjs/helpers/grammarConfig.native.js +186 -1
- package/dist/cjs/helpers/grammarConfig.native.js.map +1 -1
- package/dist/cjs/helpers/insertStyleRule.cjs +5 -1
- package/dist/cjs/helpers/insertStyleRule.native.cjs +7 -1
- package/dist/cjs/helpers/insertStyleRule.native.js +7 -1
- package/dist/cjs/helpers/insertStyleRule.native.js.map +1 -1
- package/dist/cjs/helpers/log.cjs +9 -8
- package/dist/cjs/helpers/log.native.cjs +9 -8
- package/dist/cjs/helpers/log.native.js +9 -8
- package/dist/cjs/helpers/log.native.js.map +1 -1
- package/dist/cjs/helpers/mergeVariants.cjs +44 -13
- package/dist/cjs/helpers/mergeVariants.native.cjs +79 -14
- package/dist/cjs/helpers/mergeVariants.native.js +79 -14
- package/dist/cjs/helpers/mergeVariants.native.js.map +1 -1
- package/dist/cjs/helpers/nativeOnlyProps.cjs +0 -1
- package/dist/cjs/helpers/nativeOnlyProps.native.cjs +0 -1
- package/dist/cjs/helpers/nativeOnlyProps.native.js +0 -1
- package/dist/cjs/helpers/nativeOnlyProps.native.js.map +1 -1
- package/dist/cjs/helpers/nativeStyleEngine.cjs +34 -14
- package/dist/cjs/helpers/nativeStyleEngine.native.cjs +36 -14
- package/dist/cjs/helpers/nativeStyleEngine.native.js +36 -14
- package/dist/cjs/helpers/nativeStyleEngine.native.js.map +1 -1
- package/dist/cjs/helpers/normalizeValueWithProperty.cjs +7 -8
- package/dist/cjs/helpers/normalizeValueWithProperty.native.cjs +9 -8
- package/dist/cjs/helpers/normalizeValueWithProperty.native.js +9 -8
- package/dist/cjs/helpers/normalizeValueWithProperty.native.js.map +1 -1
- package/dist/cjs/helpers/parseBorderShorthand.native.cjs +25 -56
- package/dist/cjs/helpers/parseBorderShorthand.native.js +25 -56
- package/dist/cjs/helpers/parseBorderShorthand.native.js.map +1 -1
- package/dist/cjs/helpers/parseOutlineShorthand.native.cjs +9 -49
- package/dist/cjs/helpers/parseOutlineShorthand.native.js +9 -49
- package/dist/cjs/helpers/parseOutlineShorthand.native.js.map +1 -1
- package/dist/cjs/helpers/resolveSafeArea.cjs +35 -100
- package/dist/cjs/helpers/resolveVariantStyle.cjs +57 -0
- package/dist/cjs/helpers/resolveVariantStyle.native.cjs +67 -0
- package/dist/cjs/helpers/resolveVariantStyle.native.js +69 -0
- package/dist/cjs/helpers/resolveVariantStyle.native.js.map +1 -0
- package/dist/cjs/helpers/splitStyleProps.cjs +46 -0
- package/dist/cjs/helpers/splitStyleProps.native.cjs +49 -0
- package/dist/cjs/helpers/splitStyleProps.native.js +51 -0
- package/dist/cjs/helpers/splitStyleProps.native.js.map +1 -0
- package/dist/cjs/helpers/{getDefaultProps.native.cjs → styleStaticConfig.cjs} +7 -8
- package/dist/cjs/helpers/{getDefaultProps.native.js → styleStaticConfig.native.cjs} +7 -8
- package/dist/cjs/helpers/styleStaticConfig.native.js +31 -0
- package/dist/cjs/helpers/styleStaticConfig.native.js.map +1 -0
- package/dist/cjs/helpers/styleStaticConfigCore.cjs +107 -0
- package/dist/cjs/helpers/styleStaticConfigCore.native.cjs +127 -0
- package/dist/cjs/helpers/styleStaticConfigCore.native.js +129 -0
- package/dist/cjs/helpers/styleStaticConfigCore.native.js.map +1 -0
- package/dist/cjs/helpers/styledDynamic.cjs +160 -0
- package/dist/cjs/helpers/styledDynamic.native.cjs +195 -0
- package/dist/cjs/helpers/styledDynamic.native.js +197 -0
- package/dist/cjs/helpers/styledDynamic.native.js.map +1 -0
- package/dist/cjs/helpers/tokenCategories.cjs +12 -74
- package/dist/cjs/helpers/tokenCategories.native.cjs +12 -76
- package/dist/cjs/helpers/tokenCategories.native.js +12 -76
- package/dist/cjs/helpers/tokenCategories.native.js.map +1 -1
- package/dist/cjs/helpers/variableValue.cjs +17 -12
- package/dist/cjs/helpers/variableValue.native.cjs +46 -23
- package/dist/cjs/helpers/variableValue.native.js +46 -23
- package/dist/cjs/helpers/variableValue.native.js.map +1 -1
- package/dist/cjs/helpers/warnOnce.cjs +5 -4
- package/dist/cjs/helpers/warnOnce.native.cjs +6 -4
- package/dist/cjs/helpers/warnOnce.native.js +6 -4
- package/dist/cjs/helpers/warnOnce.native.js.map +1 -1
- package/dist/cjs/hooks/useAnimationDriver.cjs +2 -2
- package/dist/cjs/hooks/useAnimationDriver.native.cjs +2 -2
- package/dist/cjs/hooks/useAnimationDriver.native.js +2 -2
- package/dist/cjs/hooks/useAnimationDriver.native.js.map +1 -1
- package/dist/cjs/hooks/useComponentState.cjs +41 -82
- package/dist/cjs/hooks/useComponentState.native.cjs +45 -84
- package/dist/cjs/hooks/useComponentState.native.js +45 -84
- package/dist/cjs/hooks/useComponentState.native.js.map +1 -1
- package/dist/cjs/hooks/useMedia.cjs +2 -2
- package/dist/cjs/hooks/useMedia.native.cjs +2 -2
- package/dist/cjs/hooks/useMedia.native.js +2 -2
- package/dist/cjs/hooks/useMedia.native.js.map +1 -1
- package/dist/cjs/hooks/useSplitStyles.cjs +2 -2
- package/dist/cjs/hooks/useSplitStyles.native.cjs +2 -2
- package/dist/cjs/hooks/useSplitStyles.native.js +2 -2
- package/dist/cjs/hooks/useSplitStyles.native.js.map +1 -1
- package/dist/cjs/{helpers/getDefaultProps.cjs → hooks/useStyle.cjs} +10 -4
- package/dist/cjs/{helpers/directStyleCSS.native.js → hooks/useStyle.native.cjs} +16 -6
- package/dist/cjs/hooks/useStyle.native.js +34 -0
- package/dist/cjs/hooks/useStyle.native.js.map +1 -0
- package/dist/cjs/hooks/useThemeState.cjs +25 -90
- package/dist/cjs/hooks/useThemeState.native.cjs +34 -94
- package/dist/cjs/hooks/useThemeState.native.js +34 -94
- package/dist/cjs/hooks/useThemeState.native.js.map +1 -1
- package/dist/cjs/index.cjs +9 -12
- package/dist/cjs/index.native.cjs +9 -12
- package/dist/cjs/index.native.js +9 -12
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/internal-runtime.cjs +8 -7
- package/dist/cjs/internal-runtime.native.cjs +8 -7
- package/dist/cjs/internal-runtime.native.js +8 -7
- package/dist/cjs/internal-runtime.native.js.map +1 -1
- package/dist/cjs/static-resolve.cjs +8 -7
- package/dist/cjs/static-resolve.native.cjs +8 -7
- package/dist/cjs/static-resolve.native.js +8 -7
- package/dist/cjs/static-resolve.native.js.map +1 -1
- package/dist/cjs/style.cjs +91 -0
- package/dist/cjs/style.native.cjs +98 -0
- package/dist/cjs/style.native.js +100 -0
- package/dist/cjs/style.native.js.map +1 -0
- package/dist/cjs/styled.cjs +15 -62
- package/dist/cjs/styled.native.cjs +15 -64
- package/dist/cjs/styled.native.js +15 -64
- package/dist/cjs/styled.native.js.map +1 -1
- package/dist/cjs/types.cjs +4 -22
- package/dist/cjs/types.native.cjs +4 -22
- package/dist/cjs/types.native.js +4 -22
- package/dist/cjs/types.native.js.map +1 -1
- package/dist/cjs/views/TamaguiProvider.cjs +1 -2
- package/dist/cjs/views/TamaguiProvider.native.cjs +1 -2
- package/dist/cjs/views/TamaguiProvider.native.js +1 -2
- package/dist/cjs/views/TamaguiProvider.native.js.map +1 -1
- package/dist/cjs/views/Text.cjs +21 -14
- package/dist/cjs/views/Text.native.cjs +5 -2
- package/dist/cjs/views/Text.native.js +5 -2
- package/dist/cjs/views/Text.native.js.map +1 -1
- package/dist/cjs/views/Theme.cjs +2 -2
- package/dist/cjs/views/Theme.native.cjs +2 -2
- package/dist/cjs/views/Theme.native.js +2 -2
- package/dist/cjs/views/Theme.native.js.map +1 -1
- package/dist/cjs/views/ThemeDebug.cjs +1 -4
- package/dist/cjs/views/View.cjs +4 -2
- package/dist/cjs/views/View.native.cjs +4 -2
- package/dist/cjs/views/View.native.js +4 -2
- package/dist/cjs/views/View.native.js.map +1 -1
- package/dist/esm/config.mjs +1 -1
- package/dist/esm/config.mjs.map +1 -1
- package/dist/esm/config.native.js +1 -1
- package/dist/esm/config.native.js.map +1 -1
- package/dist/esm/createComponent.mjs +41 -20
- package/dist/esm/createComponent.mjs.map +1 -1
- package/dist/esm/createComponent.native.js +43 -22
- package/dist/esm/createComponent.native.js.map +1 -1
- package/dist/esm/createStyledHOC.mjs +55 -5
- package/dist/esm/createStyledHOC.mjs.map +1 -1
- package/dist/esm/createStyledHOC.native.js +56 -5
- package/dist/esm/createStyledHOC.native.js.map +1 -1
- package/dist/esm/createTokens.mjs +1 -1
- package/dist/esm/createTokens.mjs.map +1 -1
- package/dist/esm/createTokens.native.js +1 -1
- package/dist/esm/createTokens.native.js.map +1 -1
- package/dist/esm/createVariable.mjs +1 -9
- package/dist/esm/createVariable.mjs.map +1 -1
- package/dist/esm/createVariable.native.js +1 -9
- package/dist/esm/createVariable.native.js.map +1 -1
- package/dist/esm/dom/html.mjs +147 -99
- package/dist/esm/dom/html.mjs.map +1 -1
- package/dist/esm/dom/htmlRuntime.native.js +7 -3
- package/dist/esm/dom/htmlRuntime.native.js.map +1 -1
- package/dist/esm/dom/primitives.native.js +16 -13
- package/dist/esm/dom/primitives.native.js.map +1 -1
- package/dist/esm/helpers/borderComponents.mjs +37 -0
- package/dist/esm/helpers/borderComponents.mjs.map +1 -0
- package/dist/esm/helpers/borderComponents.native.js +55 -0
- package/dist/esm/helpers/borderComponents.native.js.map +1 -0
- package/dist/esm/helpers/componentDisplayName.mjs +1 -8
- package/dist/esm/helpers/componentDisplayName.mjs.map +1 -1
- package/dist/esm/helpers/componentDisplayName.native.js +1 -8
- package/dist/esm/helpers/componentDisplayName.native.js.map +1 -1
- package/dist/esm/helpers/createDesignSystem.mjs +0 -2
- package/dist/esm/helpers/createDesignSystem.mjs.map +1 -1
- package/dist/esm/helpers/createStyledContext.mjs +10 -18
- package/dist/esm/helpers/createStyledContext.mjs.map +1 -1
- package/dist/esm/helpers/createStyledContext.native.js +14 -18
- package/dist/esm/helpers/createStyledContext.native.js.map +1 -1
- package/dist/esm/helpers/formatDiagnostic.mjs +8 -10
- package/dist/esm/helpers/formatDiagnostic.mjs.map +1 -1
- package/dist/esm/helpers/formatDiagnostic.native.js +8 -10
- package/dist/esm/helpers/formatDiagnostic.native.js.map +1 -1
- package/dist/esm/helpers/getCSSStylesAtomic.mjs +131 -114
- package/dist/esm/helpers/getCSSStylesAtomic.mjs.map +1 -1
- package/dist/esm/helpers/getCSSStylesAtomic.native.js +7 -4
- package/dist/esm/helpers/getCSSStylesAtomic.native.js.map +1 -1
- package/dist/esm/helpers/getCSSStylesAtomicCompiled.mjs +8 -1
- package/dist/esm/helpers/getCSSStylesAtomicCompiled.mjs.map +1 -1
- package/dist/esm/helpers/getCSSStylesAtomicCompiled.native.js +10 -1
- package/dist/esm/helpers/getCSSStylesAtomicCompiled.native.js.map +1 -1
- package/dist/esm/helpers/getDynamicVal.mjs +5 -1
- package/dist/esm/helpers/getDynamicVal.mjs.map +1 -1
- package/dist/esm/helpers/getDynamicVal.native.js +5 -1
- package/dist/esm/helpers/getDynamicVal.native.js.map +1 -1
- package/dist/esm/helpers/getSplitStyles.mjs +1052 -2151
- package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
- package/dist/esm/helpers/getSplitStyles.native.js +1090 -2481
- package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/esm/helpers/grammarConfig.mjs +164 -2
- package/dist/esm/helpers/grammarConfig.mjs.map +1 -1
- package/dist/esm/helpers/grammarConfig.native.js +187 -2
- package/dist/esm/helpers/grammarConfig.native.js.map +1 -1
- package/dist/esm/helpers/insertStyleRule.mjs +5 -2
- package/dist/esm/helpers/insertStyleRule.mjs.map +1 -1
- package/dist/esm/helpers/insertStyleRule.native.js +7 -2
- package/dist/esm/helpers/insertStyleRule.native.js.map +1 -1
- package/dist/esm/helpers/log.mjs +9 -8
- package/dist/esm/helpers/log.mjs.map +1 -1
- package/dist/esm/helpers/log.native.js +9 -8
- package/dist/esm/helpers/log.native.js.map +1 -1
- package/dist/esm/helpers/mergeVariants.mjs +44 -13
- package/dist/esm/helpers/mergeVariants.mjs.map +1 -1
- package/dist/esm/helpers/mergeVariants.native.js +79 -14
- package/dist/esm/helpers/mergeVariants.native.js.map +1 -1
- package/dist/esm/helpers/nativeOnlyProps.mjs +0 -1
- package/dist/esm/helpers/nativeOnlyProps.mjs.map +1 -1
- package/dist/esm/helpers/nativeOnlyProps.native.js +0 -1
- package/dist/esm/helpers/nativeOnlyProps.native.js.map +1 -1
- package/dist/esm/helpers/nativeStyleEngine.mjs +34 -15
- package/dist/esm/helpers/nativeStyleEngine.mjs.map +1 -1
- package/dist/esm/helpers/nativeStyleEngine.native.js +36 -15
- package/dist/esm/helpers/nativeStyleEngine.native.js.map +1 -1
- package/dist/esm/helpers/normalizeValueWithProperty.mjs +7 -8
- package/dist/esm/helpers/normalizeValueWithProperty.mjs.map +1 -1
- package/dist/esm/helpers/normalizeValueWithProperty.native.js +9 -8
- package/dist/esm/helpers/normalizeValueWithProperty.native.js.map +1 -1
- package/dist/esm/helpers/parseBorderShorthand.native.js +23 -56
- package/dist/esm/helpers/parseBorderShorthand.native.js.map +1 -1
- package/dist/esm/helpers/parseOutlineShorthand.native.js +10 -49
- package/dist/esm/helpers/parseOutlineShorthand.native.js.map +1 -1
- package/dist/esm/helpers/resolveSafeArea.mjs +35 -97
- package/dist/esm/helpers/resolveSafeArea.mjs.map +1 -1
- package/dist/esm/helpers/resolveVariantStyle.mjs +38 -0
- package/dist/esm/helpers/resolveVariantStyle.mjs.map +1 -0
- package/dist/esm/helpers/resolveVariantStyle.native.js +46 -0
- package/dist/esm/helpers/resolveVariantStyle.native.js.map +1 -0
- package/dist/esm/helpers/splitStyleProps.mjs +27 -0
- package/dist/esm/helpers/splitStyleProps.mjs.map +1 -0
- package/dist/esm/helpers/splitStyleProps.native.js +28 -0
- package/dist/esm/helpers/splitStyleProps.native.js.map +1 -0
- package/dist/esm/helpers/styleStaticConfig.mjs +8 -0
- package/dist/esm/helpers/styleStaticConfig.mjs.map +1 -0
- package/dist/esm/helpers/styleStaticConfig.native.js +8 -0
- package/dist/esm/helpers/styleStaticConfig.native.js.map +1 -0
- package/dist/esm/helpers/styleStaticConfigCore.mjs +88 -0
- package/dist/esm/helpers/styleStaticConfigCore.mjs.map +1 -0
- package/dist/esm/helpers/styleStaticConfigCore.native.js +106 -0
- package/dist/esm/helpers/styleStaticConfigCore.native.js.map +1 -0
- package/dist/esm/helpers/styledDynamic.mjs +136 -0
- package/dist/esm/helpers/styledDynamic.mjs.map +1 -0
- package/dist/esm/helpers/styledDynamic.native.js +169 -0
- package/dist/esm/helpers/styledDynamic.native.js.map +1 -0
- package/dist/esm/helpers/tokenCategories.mjs +12 -72
- package/dist/esm/helpers/tokenCategories.mjs.map +1 -1
- package/dist/esm/helpers/tokenCategories.native.js +12 -74
- package/dist/esm/helpers/tokenCategories.native.js.map +1 -1
- package/dist/esm/helpers/variableValue.mjs +17 -12
- package/dist/esm/helpers/variableValue.mjs.map +1 -1
- package/dist/esm/helpers/variableValue.native.js +46 -23
- package/dist/esm/helpers/variableValue.native.js.map +1 -1
- package/dist/esm/helpers/warnOnce.mjs +5 -4
- package/dist/esm/helpers/warnOnce.mjs.map +1 -1
- package/dist/esm/helpers/warnOnce.native.js +6 -4
- package/dist/esm/helpers/warnOnce.native.js.map +1 -1
- package/dist/esm/hooks/useAnimationDriver.mjs +2 -2
- package/dist/esm/hooks/useAnimationDriver.mjs.map +1 -1
- package/dist/esm/hooks/useAnimationDriver.native.js +2 -2
- package/dist/esm/hooks/useAnimationDriver.native.js.map +1 -1
- package/dist/esm/hooks/useComponentState.mjs +41 -82
- package/dist/esm/hooks/useComponentState.mjs.map +1 -1
- package/dist/esm/hooks/useComponentState.native.js +45 -84
- package/dist/esm/hooks/useComponentState.native.js.map +1 -1
- package/dist/esm/hooks/useMedia.mjs +2 -2
- package/dist/esm/hooks/useMedia.mjs.map +1 -1
- package/dist/esm/hooks/useMedia.native.js +2 -2
- package/dist/esm/hooks/useMedia.native.js.map +1 -1
- package/dist/esm/hooks/useSplitStyles.mjs +2 -2
- package/dist/esm/hooks/useSplitStyles.mjs.map +1 -1
- package/dist/esm/hooks/useSplitStyles.native.js +2 -2
- package/dist/esm/hooks/useSplitStyles.native.js.map +1 -1
- package/dist/esm/hooks/useStyle.mjs +11 -0
- package/dist/esm/hooks/useStyle.mjs.map +1 -0
- package/dist/esm/hooks/useStyle.native.js +11 -0
- package/dist/esm/hooks/useStyle.native.js.map +1 -0
- package/dist/esm/hooks/useThemeState.mjs +25 -90
- package/dist/esm/hooks/useThemeState.mjs.map +1 -1
- package/dist/esm/hooks/useThemeState.native.js +34 -94
- package/dist/esm/hooks/useThemeState.native.js.map +1 -1
- package/dist/esm/index.js +8 -8
- package/dist/esm/index.mjs +8 -8
- package/dist/esm/index.native.js +8 -8
- package/dist/esm/internal-runtime.mjs +8 -7
- package/dist/esm/internal-runtime.mjs.map +1 -1
- package/dist/esm/internal-runtime.native.js +8 -7
- package/dist/esm/internal-runtime.native.js.map +1 -1
- package/dist/esm/static-resolve.mjs +11 -9
- package/dist/esm/static-resolve.mjs.map +1 -1
- package/dist/esm/static-resolve.native.js +11 -9
- package/dist/esm/static-resolve.native.js.map +1 -1
- package/dist/esm/style.mjs +58 -0
- package/dist/esm/style.mjs.map +1 -0
- package/dist/esm/style.native.js +63 -0
- package/dist/esm/style.native.js.map +1 -0
- package/dist/esm/styled.mjs +17 -62
- package/dist/esm/styled.mjs.map +1 -1
- package/dist/esm/styled.native.js +17 -64
- package/dist/esm/styled.native.js.map +1 -1
- package/dist/esm/types.mjs +3 -21
- package/dist/esm/types.mjs.map +1 -1
- package/dist/esm/types.native.js +3 -21
- package/dist/esm/types.native.js.map +1 -1
- package/dist/esm/views/TamaguiProvider.mjs +1 -2
- package/dist/esm/views/TamaguiProvider.mjs.map +1 -1
- package/dist/esm/views/TamaguiProvider.native.js +1 -2
- package/dist/esm/views/TamaguiProvider.native.js.map +1 -1
- package/dist/esm/views/Text.mjs +21 -14
- package/dist/esm/views/Text.mjs.map +1 -1
- package/dist/esm/views/Text.native.js +4 -2
- package/dist/esm/views/Text.native.js.map +1 -1
- package/dist/esm/views/Theme.mjs +2 -2
- package/dist/esm/views/Theme.mjs.map +1 -1
- package/dist/esm/views/Theme.native.js +2 -2
- package/dist/esm/views/Theme.native.js.map +1 -1
- package/dist/esm/views/ThemeDebug.mjs +1 -4
- package/dist/esm/views/ThemeDebug.mjs.map +1 -1
- package/dist/esm/views/View.mjs +4 -2
- package/dist/esm/views/View.mjs.map +1 -1
- package/dist/esm/views/View.native.js +4 -2
- package/dist/esm/views/View.native.js.map +1 -1
- package/package.json +15 -15
- package/src/config.ts +1 -1
- package/src/createComponent.tsx +62 -31
- package/src/createStyledHOC.tsx +56 -9
- package/src/createTokens.ts +1 -1
- package/src/createVariable.ts +0 -10
- package/src/dom/html.tsx +778 -877
- package/src/dom/htmlRuntime.native.tsx +7 -3
- package/src/dom/primitives.native.tsx +30 -39
- package/src/helpers/borderComponents.ts +62 -0
- package/src/helpers/componentDisplayName.ts +0 -11
- package/src/helpers/createDesignSystem.ts +0 -2
- package/src/helpers/createStyledContext.tsx +15 -53
- package/src/helpers/formatDiagnostic.ts +11 -13
- package/src/helpers/getCSSStylesAtomic.native.ts +6 -3
- package/src/helpers/getCSSStylesAtomic.ts +197 -206
- package/src/helpers/getCSSStylesAtomicCompiled.ts +13 -1
- package/src/helpers/getDynamicVal.ts +4 -0
- package/src/helpers/getSplitStyles.tsx +2058 -4052
- package/src/helpers/grammarConfig.ts +218 -1
- package/src/helpers/insertStyleRule.tsx +4 -2
- package/src/helpers/log.ts +12 -11
- package/src/helpers/mergeVariants.ts +55 -18
- package/src/helpers/nativeOnlyProps.ts +0 -1
- package/src/helpers/nativeStyleEngine.ts +55 -14
- package/src/helpers/normalizeValueWithProperty.ts +10 -12
- package/src/helpers/parseBorderShorthand.native.ts +23 -45
- package/src/helpers/parseOutlineShorthand.native.ts +9 -40
- package/src/helpers/resolveSafeArea.ts +34 -101
- package/src/helpers/resolveVariantStyle.ts +77 -0
- package/src/helpers/splitStyleProps.ts +166 -0
- package/src/helpers/styleFrontend.ts +16 -9
- package/src/helpers/styleStaticConfig.ts +21 -0
- package/src/helpers/styleStaticConfigCore.ts +110 -0
- package/src/helpers/styledDynamic.ts +191 -0
- package/src/helpers/tokenCategories.ts +32 -88
- package/src/helpers/variableValue.ts +20 -15
- package/src/helpers/warnOnce.ts +5 -4
- package/src/hooks/useAnimationDriver.ts +6 -2
- package/src/hooks/useComponentState.ts +55 -183
- package/src/hooks/useMedia.tsx +10 -8
- package/src/hooks/useSplitStyles.tsx +17 -2
- package/src/hooks/useStyle.ts +10 -0
- package/src/hooks/useTheme.tsx +1 -1
- package/src/hooks/useThemeState.ts +51 -264
- package/src/index.ts +14 -10
- package/src/internal-runtime.ts +10 -9
- package/src/internalRuntimeTypes.ts +1 -0
- package/src/static-resolve.ts +25 -18
- package/src/style.ts +97 -0
- package/src/styled.tsx +46 -332
- package/src/types.tsx +107 -192
- package/src/views/TamaguiProvider.tsx +0 -2
- package/src/views/Text.tsx +26 -21
- package/src/views/Theme.tsx +10 -8
- package/src/views/ThemeDebug.tsx +0 -1
- package/src/views/View.tsx +6 -7
- package/types/createComponent.d.ts.map +1 -1
- package/types/createStyledHOC.d.ts.map +1 -1
- package/types/createVariable.d.ts +0 -2
- package/types/createVariable.d.ts.map +1 -1
- package/types/dom/html.d.ts.map +1 -1
- package/types/dom/htmlRuntime.native.d.ts.map +1 -1
- package/types/dom/primitives.native.d.ts.map +1 -1
- package/types/helpers/borderComponents.d.ts +10 -0
- package/types/helpers/borderComponents.d.ts.map +1 -0
- package/types/helpers/componentDisplayName.d.ts +0 -3
- package/types/helpers/componentDisplayName.d.ts.map +1 -1
- package/types/helpers/createDesignSystem.d.ts.map +1 -1
- package/types/helpers/createStyledContext.d.ts.map +1 -1
- package/types/helpers/formatDiagnostic.d.ts.map +1 -1
- package/types/helpers/getCSSStylesAtomic.d.ts +25 -22
- package/types/helpers/getCSSStylesAtomic.d.ts.map +1 -1
- package/types/helpers/getCSSStylesAtomic.native.d.ts +5 -0
- package/types/helpers/getCSSStylesAtomic.native.d.ts.map +1 -1
- package/types/helpers/getCSSStylesAtomicCompiled.d.ts +6 -1
- package/types/helpers/getCSSStylesAtomicCompiled.d.ts.map +1 -1
- package/types/helpers/getDynamicVal.d.ts.map +1 -1
- package/types/helpers/getSplitStyles.d.ts +9 -11
- package/types/helpers/getSplitStyles.d.ts.map +1 -1
- package/types/helpers/grammarConfig.d.ts +25 -2
- package/types/helpers/grammarConfig.d.ts.map +1 -1
- package/types/helpers/insertStyleRule.d.ts +1 -0
- package/types/helpers/insertStyleRule.d.ts.map +1 -1
- package/types/helpers/log.d.ts.map +1 -1
- package/types/helpers/mergeVariants.d.ts.map +1 -1
- package/types/helpers/nativeOnlyProps.d.ts +0 -1
- package/types/helpers/nativeOnlyProps.d.ts.map +1 -1
- package/types/helpers/nativeStyleEngine.d.ts +6 -0
- package/types/helpers/nativeStyleEngine.d.ts.map +1 -1
- package/types/helpers/normalizeValueWithProperty.d.ts.map +1 -1
- package/types/helpers/parseBorderShorthand.native.d.ts +1 -0
- package/types/helpers/parseBorderShorthand.native.d.ts.map +1 -1
- package/types/helpers/parseOutlineShorthand.native.d.ts.map +1 -1
- package/types/helpers/resolveSafeArea.d.ts +0 -1
- package/types/helpers/resolveSafeArea.d.ts.map +1 -1
- package/types/helpers/resolveVariantStyle.d.ts +3 -0
- package/types/helpers/resolveVariantStyle.d.ts.map +1 -0
- package/types/helpers/splitStyleProps.d.ts +44 -0
- package/types/helpers/splitStyleProps.d.ts.map +1 -0
- package/types/helpers/styleFrontend.d.ts +7 -9
- package/types/helpers/styleFrontend.d.ts.map +1 -1
- package/types/helpers/styleStaticConfig.d.ts +14 -0
- package/types/helpers/styleStaticConfig.d.ts.map +1 -0
- package/types/helpers/styleStaticConfigCore.d.ts +4 -0
- package/types/helpers/styleStaticConfigCore.d.ts.map +1 -0
- package/types/helpers/styledDynamic.d.ts +18 -0
- package/types/helpers/styledDynamic.d.ts.map +1 -0
- package/types/helpers/tokenCategories.d.ts +0 -1
- package/types/helpers/tokenCategories.d.ts.map +1 -1
- package/types/helpers/variableValue.d.ts.map +1 -1
- package/types/helpers/warnOnce.d.ts.map +1 -1
- package/types/helpers/webPropsToSkip.native.d.ts +68 -68
- package/types/hooks/useAnimationDriver.d.ts.map +1 -1
- package/types/hooks/useComponentState.d.ts.map +1 -1
- package/types/hooks/useMedia.d.ts.map +1 -1
- package/types/hooks/useSplitStyles.d.ts.map +1 -1
- package/types/hooks/useStyle.d.ts +4 -0
- package/types/hooks/useStyle.d.ts.map +1 -0
- package/types/hooks/useThemeState.d.ts +1 -11
- package/types/hooks/useThemeState.d.ts.map +1 -1
- package/types/index.d.ts +8 -8
- package/types/index.d.ts.map +1 -1
- package/types/internal-runtime.d.ts.map +1 -1
- package/types/internalRuntimeTypes.d.ts +1 -1
- package/types/internalRuntimeTypes.d.ts.map +1 -1
- package/types/static-resolve.d.ts +2 -2
- package/types/static-resolve.d.ts.map +1 -1
- package/types/style.d.ts +18 -0
- package/types/style.d.ts.map +1 -0
- package/types/styled.d.ts +12 -48
- package/types/styled.d.ts.map +1 -1
- package/types/types.d.ts +75 -60
- package/types/types.d.ts.map +1 -1
- package/types/views/TamaguiProvider.d.ts +1 -1
- package/types/views/TamaguiProvider.d.ts.map +1 -1
- package/types/views/Text.d.ts.map +1 -1
- package/types/views/Theme.d.ts.map +1 -1
- package/types/views/ThemeDebug.d.ts.map +1 -1
- package/types/views/View.d.ts.map +1 -1
- package/dist/cjs/helpers/directStyleCSS.cjs +0 -348
- package/dist/cjs/helpers/directStyleCSS.native.cjs +0 -20
- package/dist/cjs/helpers/directStyleCSS.native.js.map +0 -1
- package/dist/cjs/helpers/directStyleCSSCompiled.cjs +0 -40
- package/dist/cjs/helpers/directStyleCSSCompiled.native.cjs +0 -46
- package/dist/cjs/helpers/directStyleCSSCompiled.native.js +0 -48
- package/dist/cjs/helpers/directStyleCSSCompiled.native.js.map +0 -1
- package/dist/cjs/helpers/getDefaultProps.native.js.map +0 -1
- package/dist/cjs/helpers/getVariantExtras.cjs +0 -91
- package/dist/cjs/helpers/getVariantExtras.native.cjs +0 -94
- package/dist/cjs/helpers/getVariantExtras.native.js +0 -96
- package/dist/cjs/helpers/getVariantExtras.native.js.map +0 -1
- package/dist/cjs/helpers/themeable.cjs +0 -92
- package/dist/cjs/helpers/themeable.native.cjs +0 -95
- package/dist/cjs/helpers/themeable.native.js +0 -97
- package/dist/cjs/helpers/themeable.native.js.map +0 -1
- package/dist/cjs/hooks/useProps.cjs +0 -129
- package/dist/cjs/hooks/useProps.native.cjs +0 -135
- package/dist/cjs/hooks/useProps.native.js +0 -137
- package/dist/cjs/hooks/useProps.native.js.map +0 -1
- package/dist/esm/helpers/directStyleCSS.mjs +0 -320
- package/dist/esm/helpers/directStyleCSS.mjs.map +0 -1
- package/dist/esm/helpers/directStyleCSS.native.js +0 -1
- package/dist/esm/helpers/directStyleCSSCompiled.mjs +0 -11
- package/dist/esm/helpers/directStyleCSSCompiled.mjs.map +0 -1
- package/dist/esm/helpers/directStyleCSSCompiled.native.js +0 -15
- package/dist/esm/helpers/directStyleCSSCompiled.native.js.map +0 -1
- package/dist/esm/helpers/getDefaultProps.mjs +0 -4
- package/dist/esm/helpers/getDefaultProps.mjs.map +0 -1
- package/dist/esm/helpers/getDefaultProps.native.js +0 -6
- package/dist/esm/helpers/getDefaultProps.native.js.map +0 -1
- package/dist/esm/helpers/getVariantExtras.mjs +0 -69
- package/dist/esm/helpers/getVariantExtras.mjs.map +0 -1
- package/dist/esm/helpers/getVariantExtras.native.js +0 -70
- package/dist/esm/helpers/getVariantExtras.native.js.map +0 -1
- package/dist/esm/helpers/themeable.mjs +0 -67
- package/dist/esm/helpers/themeable.mjs.map +0 -1
- package/dist/esm/helpers/themeable.native.js +0 -68
- package/dist/esm/helpers/themeable.native.js.map +0 -1
- package/dist/esm/hooks/useProps.mjs +0 -100
- package/dist/esm/hooks/useProps.mjs.map +0 -1
- package/dist/esm/hooks/useProps.native.js +0 -104
- package/dist/esm/hooks/useProps.native.js.map +0 -1
- package/src/helpers/directStyleCSS.native.ts +0 -1
- package/src/helpers/directStyleCSS.ts +0 -534
- package/src/helpers/directStyleCSSCompiled.ts +0 -32
- package/src/helpers/getDefaultProps.ts +0 -3
- package/src/helpers/getVariantExtras.tsx +0 -95
- package/src/helpers/themeable.tsx +0 -96
- package/src/hooks/useProps.tsx +0 -186
- package/types/helpers/directStyleCSS.d.ts +0 -28
- package/types/helpers/directStyleCSS.d.ts.map +0 -1
- package/types/helpers/directStyleCSS.native.d.ts +0 -2
- package/types/helpers/directStyleCSS.native.d.ts.map +0 -1
- package/types/helpers/directStyleCSSCompiled.d.ts +0 -10
- package/types/helpers/directStyleCSSCompiled.d.ts.map +0 -1
- package/types/helpers/getDefaultProps.d.ts +0 -3
- package/types/helpers/getDefaultProps.d.ts.map +0 -1
- package/types/helpers/getVariantExtras.d.ts +0 -4
- package/types/helpers/getVariantExtras.d.ts.map +0 -1
- package/types/helpers/themeable.d.ts +0 -3
- package/types/helpers/themeable.d.ts.map +0 -1
- package/types/hooks/useProps.d.ts +0 -39
- package/types/hooks/useProps.d.ts.map +0 -1
|
@@ -4,8 +4,8 @@ var __defProp = Object.defineProperty;
|
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (
|
|
8
|
-
for (var name in all) __defProp(
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
9
|
get: all[name],
|
|
10
10
|
enumerable: true
|
|
11
11
|
});
|
|
@@ -19,588 +19,266 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
19
19
|
}
|
|
20
20
|
return to;
|
|
21
21
|
};
|
|
22
|
-
var __reExport = (
|
|
22
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
23
23
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
24
24
|
var getSplitStyles_exports = {};
|
|
25
25
|
__export(getSplitStyles_exports, {
|
|
26
26
|
STYLE_TOKEN_PROVENANCE_KEY: () => import_styleProvenance2.STYLE_TOKEN_PROVENANCE_KEY,
|
|
27
|
-
|
|
28
|
-
contributeStyleString: () => contributeStyleString,
|
|
29
|
-
directStyleSignature: () => import_directStyleCSS2.directStyleSignature,
|
|
30
|
-
flushDirectStyles: () => import_directStyleCSS2.flushDirectStyles,
|
|
31
|
-
getContextPropSet: () => getContextPropSet,
|
|
32
|
-
getDirectDynamicThemeAccess: () => getDirectDynamicThemeAccess,
|
|
27
|
+
emitVariantStyle: () => emitVariantStyle,
|
|
33
28
|
getFontFamilyFromNameOrVariable: () => getFontFamilyFromNameOrVariable,
|
|
34
29
|
getSplitStyles: () => getSplitStyles,
|
|
30
|
+
getStyleStaticConfig: () => import_styleStaticConfig.getStyleStaticConfig,
|
|
35
31
|
getStyleTokenProvenance: () => import_styleProvenance2.getStyleTokenProvenance,
|
|
36
32
|
isValidStyleKey: () => isValidStyleKey,
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
styleOriginalValues: () => import_styleOriginalValues.styleOriginalValues,
|
|
34
|
+
walkConditionalValue: () => walkConditionalValue
|
|
39
35
|
});
|
|
40
36
|
module.exports = __toCommonJS(getSplitStyles_exports);
|
|
41
37
|
var import_constants = require("@tamagui/constants");
|
|
42
38
|
var import_helpers = require("@tamagui/helpers");
|
|
39
|
+
var import_runtime = require("@tamagui/style-grammar/runtime");
|
|
43
40
|
var import_config = require("../config.native.js");
|
|
44
|
-
var import_createVariable = require("../createVariable.native.js");
|
|
45
41
|
var import_isDevTools = require("../constants/isDevTools.native.js");
|
|
46
|
-
var
|
|
42
|
+
var import_defaultComponentState = require("../defaultComponentState.native.js");
|
|
43
|
+
var import_createVariable = require("../createVariable.native.js");
|
|
47
44
|
var import_types = require("../types.native.js");
|
|
48
|
-
var
|
|
49
|
-
var import_mediaState2 = require("./mediaState.native.js");
|
|
50
|
-
var import_warnOnce = require("./warnOnce.native.js");
|
|
45
|
+
var import_getCSSStylesAtomic = require("./getCSSStylesAtomic.native.js");
|
|
51
46
|
var import_expandStyle = require("./expandStyle.native.js");
|
|
47
|
+
var import_borderComponents = require("./borderComponents.native.js");
|
|
52
48
|
var import_expandStyles = require("./expandStyles.native.js");
|
|
53
|
-
require("./styleToCSS.native.js");
|
|
54
|
-
var import_directStyleCSS = require("./directStyleCSS.native.js");
|
|
55
|
-
var import_directStyleCSS2 = require("./directStyleCSS.native.js");
|
|
56
49
|
var import_grammarConfig = require("./grammarConfig.native.js");
|
|
50
|
+
var import_mediaState = require("./mediaState.native.js");
|
|
51
|
+
var import_styleStaticConfig = require("./styleStaticConfig.native.js");
|
|
52
|
+
var import_nativeStyleEngine = require("./nativeStyleEngine.native.js");
|
|
53
|
+
var import_warnOnce = require("./warnOnce.native.js");
|
|
57
54
|
var import_getDynamicVal = require("./getDynamicVal.native.js");
|
|
58
|
-
var
|
|
59
|
-
require("./insertStyleRule.native.js");
|
|
60
|
-
var import_isObj = require("./isObj.native.js");
|
|
61
|
-
var import_isObj2 = require("./isObj.native.js");
|
|
55
|
+
var import_styledDynamic = require("./styledDynamic.native.js");
|
|
56
|
+
var import_insertStyleRule = require("./insertStyleRule.native.js");
|
|
62
57
|
var import_log = require("./log.native.js");
|
|
63
|
-
var import_normalizeStyle = require("./normalizeStyle.native.js");
|
|
64
58
|
var import_normalizeColor = require("./normalizeColor.native.js");
|
|
65
59
|
var import_normalizeValueWithProperty = require("./normalizeValueWithProperty.native.js");
|
|
66
60
|
var import_parseNativeStyle = require("./parseNativeStyle.native.js");
|
|
67
61
|
var import_parseNativeTransform = require("./parseNativeTransform.native.js");
|
|
68
|
-
var import_getVariantExtras = require("./getVariantExtras.native.js");
|
|
69
|
-
var import_resolveRem = require("./resolveRem.native.js");
|
|
70
|
-
var import_resolveSafeArea = require("./resolveSafeArea.native.js");
|
|
71
|
-
var import_resolveSafeAreaVariable = require("./resolveSafeAreaVariable.native.js");
|
|
72
62
|
var import_resolveVariableValue = require("./resolveVariableValue.native.js");
|
|
73
|
-
var import_themeRef = require("./themeRef.native.js");
|
|
74
|
-
var import_tokenCategories = require("./tokenCategories.native.js");
|
|
75
63
|
var import_skipProps = require("./skipProps.native.js");
|
|
76
64
|
var import_styleOriginalValues = require("./styleOriginalValues.native.js");
|
|
77
65
|
var import_styleProvenance = require("./styleProvenance.native.js");
|
|
66
|
+
var import_themeRef = require("./themeRef.native.js");
|
|
78
67
|
var import_transformsToString = require("./transformsToString.native.js");
|
|
68
|
+
var import_style = require("../style.native.js");
|
|
79
69
|
var import_styleProvenance2 = require("./styleProvenance.native.js");
|
|
80
70
|
__reExport(getSplitStyles_exports, require("./tokenCategories.native.js"), module.exports);
|
|
81
71
|
function _type_of(obj) {
|
|
82
72
|
"@swc/helpers - typeof";
|
|
83
73
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
84
74
|
}
|
|
85
|
-
var TAMAGUI_CLASS_PROPS = "$$tamaguiClassProps";
|
|
86
75
|
var shouldTrackStyleTokenProvenance = process.env.NODE_ENV === "development" && process.env.TAMAGUI_ENABLE_STYLE_TOKEN_PROVENANCE === "1";
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
for (var index = 0; index < expected.length; index++) if (compoundMatcherMatchesPayload(expected[index], source, start, end)) return true;
|
|
97
|
-
return false;
|
|
98
|
-
}
|
|
99
|
-
var expectedValue = typeof expected === "string" ? expected : String(expected);
|
|
100
|
-
if (expectedValue.length !== end - start) return false;
|
|
101
|
-
for (var index1 = 0; index1 < expectedValue.length; index1++) if (expectedValue.charCodeAt(index1) !== source.charCodeAt(start + index1)) return false;
|
|
102
|
-
return true;
|
|
103
|
-
}
|
|
104
|
-
var preparedCompoundsKey = /* @__PURE__ */ Symbol();
|
|
105
|
-
function prepareStaticConfigCompounds(staticConfig) {
|
|
106
|
-
var compoundVariants = staticConfig.compoundVariants;
|
|
107
|
-
var preparedConfig = staticConfig;
|
|
108
|
-
if (!(compoundVariants === null || compoundVariants === void 0 ? void 0 : compoundVariants.length)) {
|
|
109
|
-
preparedConfig[preparedCompoundsKey] = null;
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
var selectorCounts = [];
|
|
113
|
-
var indexesByKey = /* @__PURE__ */ Object.create(null);
|
|
114
|
-
indexesByKey[preparedCompoundsKey] = selectorCounts;
|
|
115
|
-
for (var index = 0; index < compoundVariants.length; index++) {
|
|
116
|
-
var compoundVariant = compoundVariants[index];
|
|
117
|
-
var selectorCount = 0;
|
|
118
|
-
for (var key in compoundVariant) {
|
|
119
|
-
var _indexesByKey, _key;
|
|
120
|
-
if (key === "style") continue;
|
|
121
|
-
selectorCount++;
|
|
122
|
-
((_indexesByKey = indexesByKey)[_key = key] || (_indexesByKey[_key] = [])).push(index);
|
|
123
|
-
}
|
|
124
|
-
selectorCounts[index] = selectorCount;
|
|
125
|
-
}
|
|
126
|
-
preparedConfig[preparedCompoundsKey] = indexesByKey;
|
|
127
|
-
}
|
|
128
|
-
var conditionWidth = 4;
|
|
129
|
-
var conditionValueOffset = 0;
|
|
130
|
-
var conditionFlagsOffset = 1;
|
|
131
|
-
var conditionPrecedenceOffset = 2;
|
|
132
|
-
var conditionWrapperOffset = 3;
|
|
133
|
-
var conditionActiveFlag = 1;
|
|
134
|
-
var conditionEmitFlag = 2;
|
|
135
|
-
var conditionResolvedFlag = 4;
|
|
136
|
-
var conditionEnterFlag = 8;
|
|
137
|
-
var conditionExitFlag = 16;
|
|
76
|
+
var conditionValue = 0;
|
|
77
|
+
var conditionPlatform = 1;
|
|
78
|
+
var conditionKey = 2;
|
|
79
|
+
var conditionSelector = 3;
|
|
80
|
+
var conditionTheme = 4;
|
|
81
|
+
var conditionWrappers = 5;
|
|
82
|
+
var conditionAtoms = 6;
|
|
83
|
+
var conditionRanks = 7;
|
|
84
|
+
var conditionResolvedFlag = 16;
|
|
138
85
|
var conditionPlatformPseudoFlag = 32;
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
var length = conditionNumbers.length * 2;
|
|
160
|
-
while (length < required) length *= 2;
|
|
161
|
-
var previous1 = conditionNumbers;
|
|
162
|
-
conditionNumbers = new Float64Array(length);
|
|
163
|
-
conditionNumbers.set(previous1);
|
|
164
|
-
}
|
|
165
|
-
function conditionWrapperCopy(cursor) {
|
|
166
|
-
var wrapper = conditionNumbers[cursor + conditionWrapperOffset];
|
|
167
|
-
var count = wrapper & 7;
|
|
168
|
-
if (!count) return void 0;
|
|
169
|
-
var start = wrapper >> 3;
|
|
170
|
-
var wrappers = new Array(count);
|
|
171
|
-
for (var index = 0; index < count; index++) wrappers[index] = conditionWrappers[start + index];
|
|
172
|
-
return wrappers;
|
|
86
|
+
function createCondition(parent) {
|
|
87
|
+
return parent ? [
|
|
88
|
+
parent[conditionValue] & 63,
|
|
89
|
+
parent[conditionPlatform],
|
|
90
|
+
"",
|
|
91
|
+
parent[conditionSelector],
|
|
92
|
+
parent[conditionTheme],
|
|
93
|
+
parent[conditionWrappers].slice(),
|
|
94
|
+
parent[conditionAtoms].slice(),
|
|
95
|
+
parent[conditionRanks].slice()
|
|
96
|
+
] : [
|
|
97
|
+
19,
|
|
98
|
+
0,
|
|
99
|
+
"",
|
|
100
|
+
"",
|
|
101
|
+
"",
|
|
102
|
+
[],
|
|
103
|
+
[],
|
|
104
|
+
[]
|
|
105
|
+
];
|
|
173
106
|
}
|
|
174
|
-
function setConditionUnresolved(
|
|
107
|
+
function setConditionUnresolved(condition) {
|
|
175
108
|
var name = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
for (var offset1 = 0; offset1 < conditionTextWidth; offset1++) conditionTexts[target2 + offset1] = conditionTexts[source + offset1] || "";
|
|
190
|
-
var wrapper = conditionNumbers[source + conditionWrapperOffset];
|
|
191
|
-
var wrapperStart = wrapper >> 3;
|
|
192
|
-
var wrapperCount = wrapper & 7;
|
|
193
|
-
for (var index = 0; index < wrapperCount; index++) conditionWrappers[conditionWrapperTop++] = conditionWrappers[wrapperStart + index];
|
|
194
|
-
conditionNumbers[target2 + conditionWrapperOffset] += wrapperCount;
|
|
195
|
-
}
|
|
196
|
-
function resetConditionCursor(cursor, parent) {
|
|
197
|
-
conditionNumbers[cursor + conditionValueOffset] = 0;
|
|
198
|
-
conditionNumbers[cursor + conditionFlagsOffset] = conditionInitialFlags;
|
|
199
|
-
conditionNumbers[cursor + conditionPrecedenceOffset] = 0;
|
|
200
|
-
conditionNumbers[cursor + conditionWrapperOffset] = conditionWrapperTop << 3;
|
|
201
|
-
conditionTexts.fill("", cursor, cursor + conditionTextWidth);
|
|
202
|
-
if (parent) copyConditionCursor(cursor, parent);
|
|
203
|
-
}
|
|
204
|
-
function acquireConditionCursor() {
|
|
205
|
-
var parent = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
|
|
206
|
-
var cursor = conditionCursorTop;
|
|
207
|
-
conditionCursorTop += conditionWidth;
|
|
208
|
-
reserveConditionCursor(cursor);
|
|
209
|
-
resetConditionCursor(cursor, parent);
|
|
210
|
-
return cursor;
|
|
211
|
-
}
|
|
212
|
-
function releaseConditionCursors(watermark) {
|
|
213
|
-
if (watermark >= conditionCursorTop) return;
|
|
214
|
-
conditionTexts.fill("", watermark, conditionCursorTop);
|
|
215
|
-
conditionCursorTop = watermark;
|
|
216
|
-
}
|
|
217
|
-
function releaseConditionPayloads(wrapperBase) {
|
|
218
|
-
conditionWrappers.fill("", wrapperBase, conditionWrapperTop);
|
|
219
|
-
conditionWrapperTop = wrapperBase;
|
|
220
|
-
}
|
|
221
|
-
function accumulateConditionAtom(state, cursor, kind, rank, name) {
|
|
222
|
-
var keySlot = cursor + conditionKeyOffset;
|
|
223
|
-
var key = conditionTexts[keySlot];
|
|
224
|
-
if (!key) conditionTexts[keySlot] = name;
|
|
225
|
-
else {
|
|
226
|
-
var slotStart = 0;
|
|
227
|
-
var inserted = false;
|
|
228
|
-
while (slotStart <= key.length) {
|
|
229
|
-
var slotEnd = key.indexOf(":", slotStart);
|
|
230
|
-
if (slotEnd === -1) slotEnd = key.length;
|
|
231
|
-
var order = 0;
|
|
232
|
-
var compareLength = Math.min(name.length, slotEnd - slotStart);
|
|
233
|
-
for (var offset = 0; offset < compareLength; offset++) {
|
|
234
|
-
order = name.charCodeAt(offset) - key.charCodeAt(slotStart + offset);
|
|
235
|
-
if (order) break;
|
|
236
|
-
}
|
|
237
|
-
order || (order = name.length - (slotEnd - slotStart));
|
|
238
|
-
if (!order) return;
|
|
239
|
-
if (order < 0) {
|
|
240
|
-
conditionTexts[keySlot] = `${key.slice(0, slotStart)}${name}:${key.slice(slotStart)}`;
|
|
241
|
-
inserted = true;
|
|
242
|
-
break;
|
|
243
|
-
}
|
|
244
|
-
if (slotEnd === key.length) break;
|
|
245
|
-
slotStart = slotEnd + 1;
|
|
246
|
-
}
|
|
247
|
-
if (!inserted) conditionTexts[keySlot] = `${key}:${name}`;
|
|
109
|
+
var _condition;
|
|
110
|
+
condition[conditionValue] &= ~conditionResolvedFlag;
|
|
111
|
+
if (process.env.NODE_ENV !== "production") (_condition = condition).problem || (_condition.problem = name);
|
|
112
|
+
}
|
|
113
|
+
function appendConditionWrapper(condition, wrapper) {
|
|
114
|
+
var wrappers = condition[conditionWrappers];
|
|
115
|
+
if (!wrappers.includes(wrapper)) wrappers.push(wrapper);
|
|
116
|
+
}
|
|
117
|
+
function resolveConditionModifier(state, condition, authored) {
|
|
118
|
+
var modifier = (0, import_grammarConfig.getConfigRevisionState)(state.conf).resolveCondition(authored);
|
|
119
|
+
if (!modifier) {
|
|
120
|
+
setConditionUnresolved(condition, authored);
|
|
121
|
+
return;
|
|
248
122
|
}
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
123
|
+
var [name, kind, rank] = modifier;
|
|
124
|
+
var atoms = condition[conditionAtoms];
|
|
125
|
+
var atomIndex = 0;
|
|
126
|
+
while (atomIndex < atoms.length && atoms[atomIndex] < name) atomIndex++;
|
|
127
|
+
if (atoms[atomIndex] === name) return;
|
|
128
|
+
for (var index = atoms.length; index > atomIndex; index--) atoms[index] = atoms[index - 1];
|
|
129
|
+
atoms[atomIndex] = name;
|
|
130
|
+
if (kind === 3) {
|
|
131
|
+
condition[conditionPlatform] = Math.max(condition[conditionPlatform], rank);
|
|
132
|
+
if (!modifier[6]) condition[conditionValue] &= -4;
|
|
253
133
|
return;
|
|
254
134
|
}
|
|
255
|
-
var
|
|
256
|
-
var
|
|
257
|
-
var
|
|
258
|
-
|
|
259
|
-
var
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
} else if (nextCategory === categoryRank && rank > withinRank) withinRank = rank;
|
|
264
|
-
precedence1 = precedence1 & -67108864 | depth << 23 | categoryRank << 20 | withinRank;
|
|
265
|
-
conditionNumbers[cursor + conditionPrecedenceOffset] = precedence1;
|
|
266
|
-
var buildCSS = import_directStyleCSS.canGenerateCSS && state.flatShouldDoClasses;
|
|
267
|
-
if (kind === import_runtime.modifierKindMedia) {
|
|
135
|
+
var precedence = kind === 2 ? 1 + Math.min(rank, 63) : kind === 6 ? 65 + Math.min(rank, 63) : kind === 4 ? 129 : kind === 5 ? 161 + rank : 225 + rank;
|
|
136
|
+
var ranks = condition[conditionRanks];
|
|
137
|
+
var rankIndex = 0;
|
|
138
|
+
while (rankIndex < ranks.length && ranks[rankIndex] >= precedence) rankIndex++;
|
|
139
|
+
for (var index1 = ranks.length; index1 > rankIndex; index1--) ranks[index1] = ranks[index1 - 1];
|
|
140
|
+
ranks[rankIndex] = precedence;
|
|
141
|
+
var buildCSS = import_getCSSStylesAtomic.canGenerateCSS && state.flatShouldDoClasses;
|
|
142
|
+
if (kind === 2) {
|
|
268
143
|
var _state_flatMediaState;
|
|
269
144
|
var _state;
|
|
270
|
-
var query =
|
|
271
|
-
if (!query)
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
}
|
|
275
|
-
if (buildCSS) appendConditionWrapper(cursor, `@media ${query}`);
|
|
276
|
-
if (!((_state_flatMediaState = state.flatMediaState) === null || _state_flatMediaState === void 0 ? void 0 : _state_flatMediaState[name])) conditionNumbers[cursor + conditionFlagsOffset] &= ~conditionActiveFlag;
|
|
145
|
+
var query = modifier[3];
|
|
146
|
+
if (!query) return setConditionUnresolved(condition, name);
|
|
147
|
+
if (buildCSS) appendConditionWrapper(condition, `@media ${query}`);
|
|
148
|
+
if (!((_state_flatMediaState = state.flatMediaState) === null || _state_flatMediaState === void 0 ? void 0 : _state_flatMediaState[name])) condition[conditionValue] &= -2;
|
|
277
149
|
((_state = state).flatMediaKeys || (_state.flatMediaKeys = /* @__PURE__ */ new Set())).add(name);
|
|
278
|
-
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
if (kind === 4) {
|
|
279
153
|
var _state_flatThemeName;
|
|
280
|
-
|
|
281
|
-
if (buildCSS) {
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
var
|
|
288
|
-
var
|
|
289
|
-
var
|
|
290
|
-
var groupName =
|
|
291
|
-
var stateSelector = import_runtime.stateModifierSelectors[rank];
|
|
292
|
-
var conditionStateName = import_runtime.canonicalStateModifierNames[rank];
|
|
154
|
+
condition[conditionTheme] = name;
|
|
155
|
+
if (buildCSS) condition[conditionSelector] += `:where(.t_${name}, .t_${name} *)`;
|
|
156
|
+
if (state.flatThemeName !== name && ((_state_flatThemeName = state.flatThemeName) === null || _state_flatThemeName === void 0 ? void 0 : _state_flatThemeName.startsWith(`${name}_`)) !== true) condition[conditionValue] &= -2;
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
if (kind === 6) {
|
|
160
|
+
var _state_componentState_group, _state_flatGroupContext, _state_flatGroupContext1, _component_media;
|
|
161
|
+
var _state1, _state2;
|
|
162
|
+
var size = modifier[4];
|
|
163
|
+
var containerName = modifier[5];
|
|
164
|
+
var groupName = `@${containerName}`;
|
|
293
165
|
if (buildCSS) {
|
|
294
|
-
var
|
|
295
|
-
|
|
296
|
-
if (rank === 0) appendConditionWrapper(cursor, "@media (hover: hover)");
|
|
166
|
+
var query1 = modifier[3];
|
|
167
|
+
appendConditionWrapper(condition, containerName ? `@container ${containerName} ${query1}` : `@container ${query1}`);
|
|
297
168
|
}
|
|
298
169
|
var component = (_state_componentState_group = state.componentState.group) === null || _state_componentState_group === void 0 ? void 0 : _state_componentState_group[groupName];
|
|
299
170
|
var context = (_state_flatGroupContext = state.flatGroupContext) === null || _state_flatGroupContext === void 0 ? void 0 : _state_flatGroupContext[groupName];
|
|
300
|
-
|
|
301
|
-
|
|
171
|
+
if (process.env.NODE_ENV === "development" && containerName && !component && !context && ((_state_flatGroupContext1 = state.flatGroupContext) === null || _state_flatGroupContext1 === void 0 ? void 0 : _state_flatGroupContext1[containerName])) (0, import_warnOnce.warnOnce)(`group-container:${containerName}`, `@${size}/${containerName}: targets group="${containerName}", but groups no longer establish query containers. Add container="${containerName}" to that group.`);
|
|
172
|
+
var match = component === null || component === void 0 ? void 0 : (_component_media = component.media) === null || _component_media === void 0 ? void 0 : _component_media[size];
|
|
173
|
+
if (!(match !== null && match !== void 0 ? match : (context === null || context === void 0 ? void 0 : context.state.layout) && (0, import_mediaState.mediaKeyMatch)(size, context.state.layout))) condition[conditionValue] &= -2;
|
|
302
174
|
((_state1 = state).flatGroupKeys || (_state1.flatGroupKeys = /* @__PURE__ */ new Set())).add(groupName);
|
|
303
|
-
|
|
304
|
-
var _state_componentState_group1, _state_flatGroupContext1, _state_flatGroupContext2, _component_media;
|
|
305
|
-
var _state2, _state3;
|
|
306
|
-
var slash1 = name.indexOf("/");
|
|
307
|
-
var containerSize = name.slice(1, slash1 === -1 ? name.length : slash1);
|
|
308
|
-
var containerName = slash1 === -1 ? "" : name.slice(slash1 + 1);
|
|
309
|
-
var containerQuery = (0, import_grammarConfig.getConfigRevisionState)(state.conf).mediaQueries[containerSize];
|
|
310
|
-
var groupKey = `@${containerName}`;
|
|
311
|
-
if (buildCSS) appendConditionWrapper(cursor, containerName ? `@container ${containerName} ${containerQuery}` : `@container ${containerQuery}`);
|
|
312
|
-
var component1 = (_state_componentState_group1 = state.componentState.group) === null || _state_componentState_group1 === void 0 ? void 0 : _state_componentState_group1[groupKey];
|
|
313
|
-
var context1 = (_state_flatGroupContext1 = state.flatGroupContext) === null || _state_flatGroupContext1 === void 0 ? void 0 : _state_flatGroupContext1[groupKey];
|
|
314
|
-
if (process.env.NODE_ENV === "development" && containerName && !component1 && !context1 && ((_state_flatGroupContext2 = state.flatGroupContext) === null || _state_flatGroupContext2 === void 0 ? void 0 : _state_flatGroupContext2[containerName])) (0, import_warnOnce.warnOnce)(`group-container:${containerName}`, `@${containerSize}/${containerName}: targets group="${containerName}", but groups no longer establish query containers. Add container="${containerName}" to that group.`);
|
|
315
|
-
var match = component1 === null || component1 === void 0 ? void 0 : (_component_media = component1.media) === null || _component_media === void 0 ? void 0 : _component_media[containerSize];
|
|
316
|
-
if (!(match === void 0 ? (context1 === null || context1 === void 0 ? void 0 : context1.state.layout) && (0, import_mediaState2.mediaKeyMatch)(containerSize, context1.state.layout) : match)) conditionNumbers[cursor + conditionFlagsOffset] &= ~conditionActiveFlag;
|
|
317
|
-
((_state2 = state).flatGroupKeys || (_state2.flatGroupKeys = /* @__PURE__ */ new Set())).add(groupKey);
|
|
318
|
-
((_state3 = state).flatGroupMedia || (_state3.flatGroupMedia = /* @__PURE__ */ new Set())).add(containerSize);
|
|
319
|
-
} else {
|
|
320
|
-
var stateSelector1 = import_runtime.stateModifierSelectors[rank];
|
|
321
|
-
conditionNumbers[cursor + conditionFlagsOffset] += 64;
|
|
322
|
-
if (stateSelector1[0] === "[" && name !== "disabled") conditionTexts[cursor + conditionUnsupportedStateOffset] = name;
|
|
323
|
-
if (rank === 6) conditionNumbers[cursor + conditionFlagsOffset] |= conditionEnterFlag;
|
|
324
|
-
else if (rank === 7) conditionNumbers[cursor + conditionFlagsOffset] |= conditionExitFlag;
|
|
325
|
-
else if (rank === 0 || rank === 2 || rank === 4) conditionNumbers[cursor + conditionFlagsOffset] |= conditionPlatformPseudoFlag;
|
|
326
|
-
if (buildCSS) {
|
|
327
|
-
var selector2 = cursor + conditionSelectorOffset;
|
|
328
|
-
if (stateSelector1[0] === ".") conditionTexts[selector2] += `:is(${stateSelector1}, ${stateSelector1} *)`;
|
|
329
|
-
else conditionTexts[selector2] += stateSelector1;
|
|
330
|
-
if (rank === 0) appendConditionWrapper(cursor, "@media (hover: hover)");
|
|
331
|
-
}
|
|
332
|
-
var component2 = state.componentState;
|
|
333
|
-
if (!(rank === 0 ? !!component2.hover : rank === 4 ? !!(component2.press || component2.pressIn) : rank === 2 ? !!component2.focus : rank === 3 ? !!component2.focusVisible : rank === 1 ? !!component2.focusWithin : rank === 5 ? !!(component2.disabled || state.props.disabled) : rank === 6 ? !!component2.unmounted : rank === 7 ? !!state.styleProps.isExiting : false)) conditionNumbers[cursor + conditionFlagsOffset] &= ~conditionActiveFlag;
|
|
334
|
-
if (stateSelector1[0] === ":") {
|
|
335
|
-
var _state4;
|
|
336
|
-
((_state4 = state).flatStateKeys || (_state4.flatStateKeys = /* @__PURE__ */ new Set())).add(name);
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
function resolveConditionModifier(state, cursor, modifier) {
|
|
341
|
-
var compiled = (0, import_grammarConfig.getConfigRevisionState)(state.conf);
|
|
342
|
-
var code = compiled.modifiers[modifier];
|
|
343
|
-
var kind = code & 7;
|
|
344
|
-
var rank = code >> 3;
|
|
345
|
-
if (kind === import_runtime.modifierKindState) {
|
|
346
|
-
accumulateConditionAtom(state, cursor, kind, rank, import_runtime.canonicalStateModifierNames[rank]);
|
|
175
|
+
((_state2 = state).flatGroupMedia || (_state2.flatGroupMedia = /* @__PURE__ */ new Set())).add(size);
|
|
347
176
|
return;
|
|
348
177
|
}
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
var
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
var
|
|
367
|
-
if ((
|
|
368
|
-
|
|
369
|
-
return;
|
|
370
|
-
}
|
|
371
|
-
} else if (kind) {
|
|
372
|
-
accumulateConditionAtom(state, cursor, kind, rank, modifier);
|
|
373
|
-
return;
|
|
178
|
+
var selector = modifier[3];
|
|
179
|
+
if (kind === 5) {
|
|
180
|
+
var _state_componentState_group1, _state_flatGroupContext2, _this;
|
|
181
|
+
var _state3;
|
|
182
|
+
var groupName1 = modifier[4];
|
|
183
|
+
if (buildCSS) condition[conditionSelector] += `:where(.t_group_${groupName1}${selector} *)`;
|
|
184
|
+
var component1 = (_state_componentState_group1 = state.componentState.group) === null || _state_componentState_group1 === void 0 ? void 0 : _state_componentState_group1[groupName1];
|
|
185
|
+
var context1 = (_state_flatGroupContext2 = state.flatGroupContext) === null || _state_flatGroupContext2 === void 0 ? void 0 : _state_flatGroupContext2[groupName1];
|
|
186
|
+
var _component_pseudo;
|
|
187
|
+
if (!((_this = (_component_pseudo = component1 === null || component1 === void 0 ? void 0 : component1.pseudo) !== null && _component_pseudo !== void 0 ? _component_pseudo : context1 === null || context1 === void 0 ? void 0 : context1.state.pseudo) === null || _this === void 0 ? void 0 : _this[modifier[5]])) condition[conditionValue] &= -2;
|
|
188
|
+
((_state3 = state).flatGroupKeys || (_state3.flatGroupKeys = /* @__PURE__ */ new Set())).add(groupName1);
|
|
189
|
+
} else {
|
|
190
|
+
var _state4;
|
|
191
|
+
if (rank === 0 || rank === 2 || rank === 4) condition[conditionValue] |= conditionPlatformPseudoFlag;
|
|
192
|
+
else if (rank === 6) condition[conditionValue] |= 4;
|
|
193
|
+
else if (rank === 7) condition[conditionValue] |= 8;
|
|
194
|
+
if (buildCSS) condition[conditionSelector] += `:where(${selector}${selector[0] === "." ? `, ${selector} *` : ""})`;
|
|
195
|
+
var component2 = state.componentState;
|
|
196
|
+
if (!(rank === 1 ? component2.focusWithin : rank === 3 ? component2.focusVisible : rank === 4 ? component2.press || component2.pressIn : rank === 5 ? component2.disabled || state.props.disabled : rank === 6 ? component2.unmounted : rank === 7 ? state.styleProps.isExiting : component2[name])) condition[conditionValue] &= -2;
|
|
197
|
+
if (selector[0] === ":") ((_state4 = state).flatStateKeys || (_state4.flatStateKeys = /* @__PURE__ */ new Set())).add(name);
|
|
374
198
|
}
|
|
375
|
-
|
|
199
|
+
if (rank === 0 && buildCSS) appendConditionWrapper(condition, "@media (hover: hover)");
|
|
376
200
|
}
|
|
377
|
-
function resolveConditionText(state,
|
|
201
|
+
function resolveConditionText(state, condition, text) {
|
|
378
202
|
var start = 0;
|
|
379
203
|
for (var index = 0; index <= text.length; index++) {
|
|
380
204
|
if (index !== text.length && text.charCodeAt(index) !== 58) continue;
|
|
381
205
|
if (index === start) {
|
|
382
|
-
setConditionUnresolved(
|
|
206
|
+
setConditionUnresolved(condition);
|
|
383
207
|
return;
|
|
384
208
|
}
|
|
385
|
-
if (!(
|
|
386
|
-
resolveConditionModifier(state,
|
|
209
|
+
if (!(condition[conditionValue] & conditionResolvedFlag)) return;
|
|
210
|
+
resolveConditionModifier(state, condition, text.slice(start, index));
|
|
387
211
|
start = index + 1;
|
|
388
212
|
}
|
|
389
213
|
}
|
|
390
|
-
function
|
|
391
|
-
if (!(
|
|
392
|
-
|
|
214
|
+
function commitCondition(condition) {
|
|
215
|
+
if (!(condition[conditionValue] & conditionResolvedFlag)) {
|
|
216
|
+
condition[conditionValue] = 0;
|
|
393
217
|
return 0;
|
|
394
218
|
}
|
|
395
|
-
|
|
396
|
-
var
|
|
397
|
-
var depth =
|
|
398
|
-
if (depth > 5)
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
conditionNumbers[cursor + conditionValueOffset] = condition;
|
|
402
|
-
return condition;
|
|
403
|
-
}
|
|
404
|
-
function acquireConditionKeyCursor(state, key) {
|
|
405
|
-
var cursor = acquireConditionCursor();
|
|
406
|
-
if (key) {
|
|
407
|
-
resolveConditionText(state, cursor, key);
|
|
408
|
-
commitConditionCursor(state, cursor);
|
|
409
|
-
}
|
|
410
|
-
return cursor;
|
|
411
|
-
}
|
|
412
|
-
function combineConditionKeys(state, first, second) {
|
|
413
|
-
if (!first) return second;
|
|
414
|
-
if (!second || first === second) return first;
|
|
415
|
-
var watermark = conditionCursorTop;
|
|
416
|
-
var target2 = acquireConditionKeyCursor(state, first);
|
|
417
|
-
resolveConditionText(state, target2, second);
|
|
418
|
-
commitConditionCursor(state, target2);
|
|
419
|
-
var key = conditionTexts[target2 + conditionKeyOffset] || "";
|
|
420
|
-
releaseConditionCursors(watermark);
|
|
421
|
-
return key;
|
|
422
|
-
}
|
|
423
|
-
function freshCompoundState() {
|
|
424
|
-
return {
|
|
425
|
-
seen: 0,
|
|
426
|
-
failed: false,
|
|
427
|
-
matchedBase: false,
|
|
428
|
-
scanned: false,
|
|
429
|
-
pending: null,
|
|
430
|
-
combinations: null
|
|
431
|
-
};
|
|
432
|
-
}
|
|
433
|
-
function beginCompoundEdges(indexes, states) {
|
|
434
|
-
if (!indexes) return;
|
|
435
|
-
for (var index = 0; index < indexes.length; index++) {
|
|
436
|
-
var _states, _indexes_index;
|
|
437
|
-
var state = (_states = states)[_indexes_index = indexes[index]] || (_states[_indexes_index] = freshCompoundState());
|
|
438
|
-
state.pending = null;
|
|
439
|
-
state.matchedBase = false;
|
|
440
|
-
state.scanned = false;
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
function feedCompoundSegment(state, source, start, end, isBase, valid, conditionKey) {
|
|
444
|
-
if (state.flatCompoundOutputDepth) return;
|
|
445
|
-
var pass = state.flatPass;
|
|
446
|
-
var indexes = pass[passCompoundIndexes];
|
|
447
|
-
var states = pass[passCompoundStates];
|
|
448
|
-
var key = pass[passCompoundKey];
|
|
449
|
-
if (!indexes || !states || !key) return;
|
|
450
|
-
var compoundVariants = state.staticConfig.compoundVariants;
|
|
451
|
-
for (var index = 0; index < indexes.length; index++) {
|
|
452
|
-
var _states, _compoundIndex;
|
|
453
|
-
var compoundIndex = indexes[index];
|
|
454
|
-
var compoundState = (_states = states)[_compoundIndex = compoundIndex] || (_states[_compoundIndex] = freshCompoundState());
|
|
455
|
-
compoundState.scanned = true;
|
|
456
|
-
if (!valid || start === end || !compoundMatcherMatchesPayload(compoundVariants[compoundIndex][key], source, start, end)) continue;
|
|
457
|
-
if (isBase) compoundState.matchedBase = true;
|
|
458
|
-
else if (!compoundState.matchedBase) {
|
|
459
|
-
var _compoundState;
|
|
460
|
-
((_compoundState = compoundState).pending || (_compoundState.pending = [])).push(conditionKey);
|
|
461
|
-
}
|
|
219
|
+
condition[conditionKey] = condition[conditionAtoms].join(":");
|
|
220
|
+
var ranks = condition[conditionRanks];
|
|
221
|
+
var depth = ranks.length;
|
|
222
|
+
if (depth > 5) {
|
|
223
|
+
if (process.env.NODE_ENV !== "production") throw new Error(`a flat value clause supports at most 5 non-platform conditions; received ${depth} in "${condition[conditionKey]}:"`);
|
|
224
|
+
return 0;
|
|
462
225
|
}
|
|
226
|
+
var precedence = condition[conditionPlatform] * 6 + depth;
|
|
227
|
+
for (var index = 0; index < 5; index++) precedence = precedence * 256 + (ranks[index] || 0);
|
|
228
|
+
var value = precedence * 256 + condition[conditionValue];
|
|
229
|
+
condition[conditionValue] = value;
|
|
230
|
+
return value;
|
|
463
231
|
}
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
if (conditionNumbers[cursor + conditionFlagsOffset] & conditionResolvedFlag) resolveConditionModifier(state, cursor, source.slice(start, end));
|
|
486
|
-
},
|
|
487
|
-
chain(state, _start, _end, valid) {
|
|
488
|
-
var cursor = state.flatScanCursor;
|
|
489
|
-
if (cursor) {
|
|
490
|
-
if (!valid) setConditionUnresolved(cursor);
|
|
491
|
-
if (conditionNumbers[cursor + conditionFlagsOffset] & conditionResolvedFlag) commitConditionCursor(state, cursor);
|
|
492
|
-
}
|
|
493
|
-
return true;
|
|
494
|
-
}
|
|
495
|
-
};
|
|
496
|
-
function finishCompoundEdges(pass, key, value, indexes, states) {
|
|
497
|
-
if (!indexes) return;
|
|
498
|
-
var state = pass[passStyleState];
|
|
499
|
-
pass[passCompoundIndexes] = indexes;
|
|
500
|
-
pass[passCompoundKey] = key;
|
|
501
|
-
pass[passCompoundStates] = states;
|
|
502
|
-
var needsScan = false;
|
|
503
|
-
for (var index = 0; index < indexes.length; index++) {
|
|
504
|
-
var _states, _indexes_index;
|
|
505
|
-
if (!((_states = states)[_indexes_index = indexes[index]] || (_states[_indexes_index] = freshCompoundState())).scanned) {
|
|
506
|
-
needsScan = true;
|
|
507
|
-
break;
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
if (needsScan) if (typeof value === "string") {
|
|
511
|
-
var watermark = conditionCursorTop;
|
|
512
|
-
var previousCursor = state.flatScanCursor;
|
|
513
|
-
state.flatScanCursor = null;
|
|
514
|
-
try {
|
|
515
|
-
(0, import_runtime.scanFlatValue)(value, compoundOnlyHandler, state);
|
|
516
|
-
} finally {
|
|
517
|
-
state.flatScanCursor = previousCursor;
|
|
518
|
-
releaseConditionCursors(watermark);
|
|
519
|
-
}
|
|
520
|
-
} else if (value && (typeof value === "undefined" ? "undefined" : _type_of(value)) === "object" && !Array.isArray(value) && !(0, import_createVariable.isVariable)(value) && Object.prototype.hasOwnProperty.call(value, "default")) for (var conditionKey in value) {
|
|
521
|
-
var payload = value[conditionKey];
|
|
522
|
-
if (conditionKey === "default") {
|
|
523
|
-
var payloadString = String(payload);
|
|
524
|
-
feedCompoundSegment(state, payloadString, 0, payloadString.length, true, true, "");
|
|
525
|
-
} else {
|
|
526
|
-
var watermark1 = conditionCursorTop;
|
|
527
|
-
var cursor = acquireConditionCursor();
|
|
528
|
-
resolveConditionText(state, cursor, conditionKey);
|
|
529
|
-
var condition = commitConditionCursor(state, cursor);
|
|
530
|
-
var payloadString1 = String(payload);
|
|
531
|
-
feedCompoundSegment(state, payloadString1, 0, payloadString1.length, false, Boolean(condition), condition ? conditionTexts[cursor + conditionKeyOffset] || "" : "");
|
|
532
|
-
releaseConditionCursors(watermark1);
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
else {
|
|
536
|
-
var variants = state.staticConfig.compoundVariants;
|
|
537
|
-
for (var index1 = 0; index1 < indexes.length; index1++) {
|
|
538
|
-
var _states1, _compoundIndex;
|
|
539
|
-
var compoundIndex = indexes[index1];
|
|
540
|
-
var compoundState1 = (_states1 = states)[_compoundIndex = compoundIndex] || (_states1[_compoundIndex] = freshCompoundState());
|
|
541
|
-
compoundState1.scanned = true;
|
|
542
|
-
if (compoundMatcherMatches(variants[compoundIndex][key], value)) compoundState1.matchedBase = true;
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
var variants1 = state.staticConfig.compoundVariants;
|
|
546
|
-
var selectorCounts = state.staticConfig[preparedCompoundsKey][preparedCompoundsKey];
|
|
547
|
-
for (var index2 = 0; index2 < indexes.length; index2++) {
|
|
548
|
-
var compoundIndex1 = indexes[index2];
|
|
549
|
-
var compoundState2 = states[compoundIndex1];
|
|
550
|
-
if (compoundState2.failed) continue;
|
|
551
|
-
var branches = compoundState2.matchedBase ? [""] : compoundState2.pending;
|
|
552
|
-
if (!branches || !branches.length) {
|
|
553
|
-
compoundState2.failed = true;
|
|
554
|
-
continue;
|
|
555
|
-
}
|
|
556
|
-
if (!compoundState2.seen) compoundState2.combinations = branches;
|
|
557
|
-
else {
|
|
558
|
-
var previous = compoundState2.combinations;
|
|
559
|
-
var next = [];
|
|
560
|
-
for (var left = 0; left < previous.length; left++) for (var right = 0; right < branches.length; right++) {
|
|
561
|
-
var conditionKey1 = combineConditionKeys(state, previous[left], branches[right]);
|
|
562
|
-
if (!next.includes(conditionKey1)) next.push(conditionKey1);
|
|
563
|
-
}
|
|
564
|
-
compoundState2.combinations = next;
|
|
565
|
-
}
|
|
566
|
-
compoundState2.seen++;
|
|
567
|
-
if (compoundState2.seen !== selectorCounts[compoundIndex1]) continue;
|
|
568
|
-
var style = variants1[compoundIndex1].style;
|
|
569
|
-
if (!(0, import_isObj.isPlainObject)(style)) continue;
|
|
570
|
-
var combinations = compoundState2.combinations;
|
|
571
|
-
for (var combination = 0; combination < combinations.length; combination++) for (var styleKey in style) contributeProp(pass, styleKey, style[styleKey], void 0, states, combinations[combination]);
|
|
572
|
-
}
|
|
232
|
+
function conditionFromKey(state, key, parent) {
|
|
233
|
+
if (!key) return createCondition(parent);
|
|
234
|
+
if (!parent) {
|
|
235
|
+
var direct = state;
|
|
236
|
+
var cache = direct.flatConditions;
|
|
237
|
+
if (cache === void 0 || direct.flatConditionsClassed !== state.flatShouldDoClasses) {
|
|
238
|
+
cache = direct.flatConditions = /* @__PURE__ */ new Map();
|
|
239
|
+
direct.flatConditionsClassed = state.flatShouldDoClasses;
|
|
240
|
+
}
|
|
241
|
+
var known = cache.get(key);
|
|
242
|
+
if (known !== void 0) return known;
|
|
243
|
+
var resolved = createCondition(null);
|
|
244
|
+
resolveConditionText(state, resolved, key);
|
|
245
|
+
commitCondition(resolved);
|
|
246
|
+
cache.set(key, resolved);
|
|
247
|
+
return resolved;
|
|
248
|
+
}
|
|
249
|
+
var condition = createCondition(parent);
|
|
250
|
+
resolveConditionText(state, condition, key);
|
|
251
|
+
commitCondition(condition);
|
|
252
|
+
return condition;
|
|
573
253
|
}
|
|
574
|
-
function classifyConditionalObject(value, state, isChain,
|
|
575
|
-
if (
|
|
254
|
+
function classifyConditionalObject(value, state, isChain, firstCondition) {
|
|
255
|
+
if ("default" in value) return -1;
|
|
576
256
|
for (var key in value) {
|
|
577
257
|
if (!key.length) return 0;
|
|
578
258
|
if (!state) return (isChain === null || isChain === void 0 ? void 0 : isChain(key)) ? 1 : 0;
|
|
579
|
-
var
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
resolveConditionText(state, cursor, key);
|
|
583
|
-
return commitConditionCursor(state, cursor);
|
|
584
|
-
} finally {
|
|
585
|
-
if (!firstCursor) releaseConditionCursors(watermark);
|
|
586
|
-
}
|
|
259
|
+
var condition = firstCondition || createCondition();
|
|
260
|
+
resolveConditionText(state, condition, key);
|
|
261
|
+
return commitCondition(condition);
|
|
587
262
|
}
|
|
588
263
|
return 0;
|
|
589
264
|
}
|
|
590
|
-
var
|
|
591
|
-
var
|
|
592
|
-
var
|
|
593
|
-
var
|
|
594
|
-
var
|
|
595
|
-
var
|
|
596
|
-
var
|
|
597
|
-
var
|
|
598
|
-
var
|
|
599
|
-
var
|
|
600
|
-
var
|
|
601
|
-
var
|
|
602
|
-
var
|
|
603
|
-
var
|
|
265
|
+
var passClassName = 20;
|
|
266
|
+
var passShouldDoClasses = 21;
|
|
267
|
+
var passContainerValue = 22;
|
|
268
|
+
var passContainerName = 23;
|
|
269
|
+
var passContainerType = 24;
|
|
270
|
+
var passFrontendGroup = 25;
|
|
271
|
+
var passFrontendContainer = 26;
|
|
272
|
+
var passFrontendContainerType = 27;
|
|
273
|
+
var passSourceLayer = 28;
|
|
274
|
+
var passParentCursor = 29;
|
|
275
|
+
var passMapSourceKey = 30;
|
|
276
|
+
var passFlags = 13;
|
|
277
|
+
var sourceLayerBase = 0;
|
|
278
|
+
var sourceLayerVariant = 1;
|
|
279
|
+
var sourceLayerResolver = 2;
|
|
280
|
+
var sourceLayerProps = 3;
|
|
281
|
+
var sourceLayerStyle = 4;
|
|
604
282
|
var passNoSkipFlag = 1;
|
|
605
283
|
var passDisableShorthandsFlag = 2;
|
|
606
284
|
var passNoExpandFlag = 4;
|
|
@@ -609,437 +287,271 @@ var passHocFlag = 16;
|
|
|
609
287
|
var passTextFlag = 32;
|
|
610
288
|
var passInputFlag = 64;
|
|
611
289
|
var passAsChildStyleFlag = 128;
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
var prepared = styledDefaultsCache.get(staticConfig);
|
|
615
|
-
if (prepared === void 0) {
|
|
616
|
-
var entries = null;
|
|
617
|
-
var defaults = staticConfig.defaultProps;
|
|
618
|
-
if (defaults) for (var key in defaults) {
|
|
619
|
-
if (!(key in import_helpers.stylePropsAll || key in shorthands)) continue;
|
|
620
|
-
var value = defaults[key];
|
|
621
|
-
if (maybeStyleProgram(value)) (entries || (entries = [])).push(key, value);
|
|
622
|
-
}
|
|
623
|
-
prepared = entries;
|
|
624
|
-
styledDefaultsCache.set(staticConfig, prepared);
|
|
625
|
-
}
|
|
626
|
-
return prepared;
|
|
627
|
-
}
|
|
628
|
-
var maybeStyleProgram = function(value) {
|
|
629
|
-
return typeof value === "string" ? value.indexOf(":") !== -1 : !!value && (typeof value === "undefined" ? "undefined" : _type_of(value)) === "object" && !Array.isArray(value) && !(0, import_createVariable.isVariable)(value);
|
|
630
|
-
};
|
|
631
|
-
function contributeDisplacedStyledDefaults(styledDefaults, processedProps, pass) {
|
|
632
|
-
if (!styledDefaults) return;
|
|
633
|
-
for (var offset = 0; offset < styledDefaults.length; offset += 2) {
|
|
634
|
-
var key = styledDefaults[offset];
|
|
635
|
-
var value = styledDefaults[offset + 1];
|
|
636
|
-
var propValue = processedProps[key];
|
|
637
|
-
if (propValue !== void 0 && propValue !== value) contributeProp(pass, key, value);
|
|
638
|
-
}
|
|
639
|
-
}
|
|
640
|
-
function injectDisplacedStyledDefault(pass, key, value) {
|
|
641
|
-
var _pass__defaultProps;
|
|
642
|
-
var defaultValue = (_pass__defaultProps = pass[4].defaultProps) === null || _pass__defaultProps === void 0 ? void 0 : _pass__defaultProps[key];
|
|
643
|
-
if (defaultValue === void 0 || value === void 0 || value === defaultValue || maybeStyleProgram(defaultValue)) return;
|
|
644
|
-
var state = pass[passStyleState];
|
|
645
|
-
state.flatWeakContribution = true;
|
|
646
|
-
try {
|
|
647
|
-
contributeProp(pass, key, defaultValue);
|
|
648
|
-
} finally {
|
|
649
|
-
state.flatWeakContribution = false;
|
|
650
|
-
}
|
|
651
|
-
}
|
|
652
|
-
function forEachPropInForwardOrder(pass) {
|
|
653
|
-
var _staticConfig_compoundVariants;
|
|
654
|
-
var styleState = pass[passStyleState];
|
|
655
|
-
var staticConfig = styleState.staticConfig;
|
|
656
|
-
var processedProps = styleState.props;
|
|
657
|
-
var shorthands = styleState.conf.shorthands;
|
|
658
|
-
var processedBaseStyle = staticConfig.baseStyle;
|
|
659
|
-
var styledDefaults = getStyledDefaults(staticConfig, shorthands);
|
|
660
|
-
var directState = styleState;
|
|
661
|
-
var preparedCompounds = staticConfig[preparedCompoundsKey];
|
|
662
|
-
if (preparedCompounds === void 0 && ((_staticConfig_compoundVariants = staticConfig.compoundVariants) === null || _staticConfig_compoundVariants === void 0 ? void 0 : _staticConfig_compoundVariants.length)) throw new Error("A component with compoundVariants reached style resolution before its static config was prepared.");
|
|
663
|
-
var conditionWrapperBase = conditionWrapperTop;
|
|
664
|
-
if (!preparedCompounds) {
|
|
665
|
-
try {
|
|
666
|
-
if (processedBaseStyle) for (var key in processedBaseStyle) contributeProp(pass, key, processedBaseStyle[key]);
|
|
667
|
-
contributeDisplacedStyledDefaults(styledDefaults, processedProps, pass);
|
|
668
|
-
for (var key1 in processedProps) {
|
|
669
|
-
var value = processedProps[key1];
|
|
670
|
-
directState.flatPropSawCondition = false;
|
|
671
|
-
contributeProp(pass, key1, value);
|
|
672
|
-
if (directState.flatPropSawCondition) injectDisplacedStyledDefault(pass, key1, value);
|
|
673
|
-
}
|
|
674
|
-
} finally {
|
|
675
|
-
releaseConditionPayloads(conditionWrapperBase);
|
|
676
|
-
}
|
|
677
|
-
return;
|
|
678
|
-
}
|
|
679
|
-
var compoundVariants = staticConfig.compoundVariants;
|
|
680
|
-
var compoundStates = new Array(compoundVariants.length);
|
|
681
|
-
try {
|
|
682
|
-
if (processedBaseStyle) for (var key2 in processedBaseStyle) contributeProp(pass, key2, processedBaseStyle[key2]);
|
|
683
|
-
contributeDisplacedStyledDefaults(styledDefaults, processedProps, pass);
|
|
684
|
-
var selectorCounts = preparedCompounds[preparedCompoundsKey];
|
|
685
|
-
for (var compoundIndex = 0; compoundIndex < compoundVariants.length; compoundIndex++) {
|
|
686
|
-
if (selectorCounts[compoundIndex]) continue;
|
|
687
|
-
var style = compoundVariants[compoundIndex].style;
|
|
688
|
-
if (!(0, import_isObj.isPlainObject)(style)) continue;
|
|
689
|
-
for (var key3 in style) contributeProp(pass, key3, style[key3]);
|
|
690
|
-
}
|
|
691
|
-
for (var key4 in processedProps) {
|
|
692
|
-
var compoundIndexes = preparedCompounds[key4];
|
|
693
|
-
var value1 = processedProps[key4];
|
|
694
|
-
beginCompoundEdges(compoundIndexes, compoundStates);
|
|
695
|
-
directState.flatPropSawCondition = false;
|
|
696
|
-
contributeProp(pass, key4, value1, compoundIndexes, compoundStates);
|
|
697
|
-
if (directState.flatPropSawCondition) injectDisplacedStyledDefault(pass, key4, value1);
|
|
698
|
-
finishCompoundEdges(pass, key4, value1, compoundIndexes, compoundStates);
|
|
699
|
-
}
|
|
700
|
-
} finally {
|
|
701
|
-
releaseConditionPayloads(conditionWrapperBase);
|
|
702
|
-
}
|
|
703
|
-
}
|
|
704
|
-
function isValidStyleKey(key, validStyles, accept) {
|
|
705
|
-
return Boolean(key in validStyles || accept && key in accept);
|
|
706
|
-
}
|
|
707
|
-
function flushForwardStylesToClasses(pass) {
|
|
708
|
-
var styleState = pass[passStyleState];
|
|
709
|
-
if (!pass[passShouldDoClasses]) return;
|
|
710
|
-
(0, import_directStyleCSS.completeStreamingCSS)(styleState);
|
|
711
|
-
(0, import_directStyleCSS.flushDirectStyles)(styleState, true);
|
|
290
|
+
function isValidStyleKey(key, validStyles) {
|
|
291
|
+
return key in validStyles;
|
|
712
292
|
}
|
|
713
293
|
function effectiveLifecycleKeys(keys) {
|
|
714
294
|
if (!keys) return;
|
|
715
295
|
var out = /* @__PURE__ */ new Set();
|
|
716
|
-
var
|
|
296
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
717
297
|
try {
|
|
718
|
-
for (var
|
|
719
|
-
var key =
|
|
298
|
+
for (var _iterator = keys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
299
|
+
var key = _step.value;
|
|
720
300
|
out.add(key === "--t-x" || key === "--t-y" ? "translate" : key === "--t-scale-x" || key === "--t-scale-y" ? "scale" : key);
|
|
721
301
|
}
|
|
722
302
|
} catch (err) {
|
|
723
|
-
|
|
724
|
-
|
|
303
|
+
_didIteratorError = true;
|
|
304
|
+
_iteratorError = err;
|
|
725
305
|
} finally {
|
|
726
306
|
try {
|
|
727
|
-
if (!
|
|
307
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
|
|
728
308
|
} finally {
|
|
729
|
-
if (
|
|
309
|
+
if (_didIteratorError) throw _iteratorError;
|
|
730
310
|
}
|
|
731
311
|
}
|
|
732
312
|
return out;
|
|
733
313
|
}
|
|
734
|
-
function
|
|
735
|
-
var
|
|
736
|
-
var
|
|
737
|
-
var
|
|
738
|
-
var
|
|
314
|
+
function contributeProp(pass, keyOg, valOg) {
|
|
315
|
+
var originalOg = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : valOg, disabled = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false;
|
|
316
|
+
var [styleState, conf, props, viewProps, , validStyles, neverSkipProps, variants, inlineProps, parentVariants, styleFrontend, styledContext, styledContextKeys, flags, debug, , defaultProps, driverAnimations, driverOutputStyle, elementType] = pass;
|
|
317
|
+
var noSkip = Boolean(flags & passNoSkipFlag);
|
|
318
|
+
var disableExpandShorthands = Boolean(flags & passDisableShorthandsFlag);
|
|
319
|
+
var noExpand = Boolean(flags & passNoExpandFlag);
|
|
320
|
+
var noMergeStyle = Boolean(flags & passNoMergeFlag);
|
|
739
321
|
var isHOC = Boolean(flags & passHocFlag);
|
|
322
|
+
var isText = Boolean(flags & passTextFlag);
|
|
323
|
+
var isInput = Boolean(flags & passInputFlag);
|
|
324
|
+
var shorthands = conf.shorthands;
|
|
325
|
+
var shouldSkipDirectProps = !noSkip && !isHOC;
|
|
326
|
+
var shouldCheckSkipProps = !noSkip;
|
|
327
|
+
var asChildExceptStyleLike = Boolean(flags & passAsChildStyleFlag);
|
|
328
|
+
var isTextOrInput = isText || isInput;
|
|
740
329
|
var hocParentVariants = isHOC ? parentVariants : void 0;
|
|
741
|
-
var
|
|
742
|
-
var
|
|
743
|
-
if (
|
|
744
|
-
|
|
745
|
-
if (key in import_helpers.stylePropsAll && !isValidStyleKey(key, validStyles, accept)) {
|
|
746
|
-
if (process.env.NODE_ENV === "development") console.warn(`[tamagui] "${key}" is a text style prop and this component is not text \u2014 it would render on neither platform. Use a Text-based component, or html.* for raw web elements.`);
|
|
747
|
-
return;
|
|
748
|
-
}
|
|
749
|
-
viewProps[key] = val;
|
|
750
|
-
return;
|
|
751
|
-
}
|
|
752
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
753
|
-
console.groupCollapsed(" 💠 expanded", keyInit, "=>", key);
|
|
754
|
-
(0, import_log.log)(val);
|
|
755
|
-
console.groupEnd();
|
|
756
|
-
}
|
|
757
|
-
if (val == null) return;
|
|
758
|
-
if (accept && key in accept) {
|
|
759
|
-
viewProps[key] = val;
|
|
760
|
-
return;
|
|
761
|
-
}
|
|
762
|
-
var isHostStyleKey = isValidStyleKey(key, validStyles, accept) || import_constants.isAndroid && key === "elevation";
|
|
763
|
-
var isContextProgramKey = canResolveContextPrograms && Boolean(isStyledContextProp);
|
|
764
|
-
if (condition !== void 0) {
|
|
765
|
-
var conditionCursor = condition;
|
|
766
|
-
if (isHostStyleKey || isContextProgramKey) contributeValue(styleState, key, val, mergeStyle, originalVal, !isHostStyleKey, conditionCursor);
|
|
767
|
-
else if (isHOC) {
|
|
768
|
-
var structured = mergeConditionTransport(styleState, viewProps[key], conditionCursor, val);
|
|
769
|
-
if (key in viewProps) delete viewProps[key];
|
|
770
|
-
viewProps[key] = structured;
|
|
771
|
-
} else if (process.env.NODE_ENV === "development") console.warn(`[tamagui] "${key}" is not a valid style on this component; the conditional variant value is dropped.`);
|
|
772
|
-
return;
|
|
773
|
-
}
|
|
774
|
-
if (isHostStyleKey || isContextProgramKey) {
|
|
775
|
-
contributeValue(styleState, key, val, mergeStyle, originalVal, !isHostStyleKey);
|
|
776
|
-
return;
|
|
777
|
-
}
|
|
778
|
-
var isVariant = Boolean(variants && key in variants);
|
|
779
|
-
if (inlineProps === null || inlineProps === void 0 ? void 0 : inlineProps.has(key)) {
|
|
780
|
-
var _props_key;
|
|
781
|
-
viewProps[key] = (_props_key = props[key]) !== null && _props_key !== void 0 ? _props_key : val;
|
|
782
|
-
}
|
|
783
|
-
if (Boolean(hocParentVariants && hocParentVariants[keyInit])) {
|
|
784
|
-
passDownProp(viewProps, key, val);
|
|
785
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
786
|
-
console.groupCollapsed(` - passing down prop ${key}`);
|
|
787
|
-
(0, import_log.log)({
|
|
788
|
-
val,
|
|
789
|
-
after: { ...viewProps[key] }
|
|
790
|
-
});
|
|
791
|
-
console.groupEnd();
|
|
792
|
-
}
|
|
330
|
+
var keyInit = keyOg;
|
|
331
|
+
var valInit = valOg;
|
|
332
|
+
if (keyInit === "children") {
|
|
333
|
+
viewProps[keyInit] = valInit;
|
|
793
334
|
return;
|
|
794
335
|
}
|
|
795
|
-
if (
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
viewProps[key] = val;
|
|
336
|
+
if (keyInit === "ref") return;
|
|
337
|
+
if (keyInit[0] === "d" && keyInit.startsWith("data-")) return;
|
|
338
|
+
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`before-prop-${keyInit}`;
|
|
339
|
+
if (process.env.NODE_ENV === "test" && keyInit === "jestAnimatedStyle") return;
|
|
340
|
+
if (!disableExpandShorthands) {
|
|
341
|
+
if (keyInit in shorthands) keyInit = shorthands[keyInit];
|
|
802
342
|
}
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
pass[passCompoundKey] = keyOg;
|
|
809
|
-
pass[passCompoundStates] = compoundStates;
|
|
810
|
-
} else if (pass[passCompoundIndexes]) pass[passCompoundIndexes] = void 0;
|
|
811
|
-
if (parentConditionKey) pass[passParentCursor] = acquireConditionKeyCursor(pass[passStyleState], parentConditionKey);
|
|
812
|
-
try {
|
|
813
|
-
var [styleState, conf, props, viewProps, staticConfig, validStyles, accept, neverSkipProps, variants, inlineProps, parentVariants, styleFrontend, styledContext, styledContextKeys, flags, debug, parentStaticConfig, defaultProps, driverAnimations, driverOutputStyle, elementType] = pass;
|
|
814
|
-
var noSkip = Boolean(flags & passNoSkipFlag);
|
|
815
|
-
var disableExpandShorthands = Boolean(flags & passDisableShorthandsFlag);
|
|
816
|
-
var noExpand = Boolean(flags & passNoExpandFlag);
|
|
817
|
-
var noMergeStyle = Boolean(flags & passNoMergeFlag);
|
|
818
|
-
var isHOC = Boolean(flags & passHocFlag);
|
|
819
|
-
var isText = Boolean(flags & passTextFlag);
|
|
820
|
-
var isInput = Boolean(flags & passInputFlag);
|
|
821
|
-
var shorthands = conf.shorthands;
|
|
822
|
-
var shouldSkipDirectProps = !noSkip && !isHOC;
|
|
823
|
-
var shouldCheckSkipProps = !noSkip;
|
|
824
|
-
var asChildExceptStyleLike = Boolean(flags & passAsChildStyleFlag);
|
|
825
|
-
var isTextOrInput = isText || isInput;
|
|
826
|
-
var hocParentVariants = isHOC ? parentVariants : void 0;
|
|
827
|
-
var keyInit = keyOg;
|
|
828
|
-
var valInit = valOg;
|
|
829
|
-
if (keyInit === "children") {
|
|
830
|
-
viewProps[keyInit] = valInit;
|
|
831
|
-
return;
|
|
832
|
-
}
|
|
833
|
-
if (keyInit === "ref") return;
|
|
834
|
-
if (keyInit[0] === "d" && keyInit.startsWith("data-")) return;
|
|
835
|
-
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`before-prop-${keyInit}`;
|
|
836
|
-
if (process.env.NODE_ENV === "test" && keyInit === "jestAnimatedStyle") return;
|
|
837
|
-
if (accept) {
|
|
838
|
-
var accepted = accept[keyInit];
|
|
839
|
-
if ((accepted === "style" || accepted === "textStyle") && valInit && (typeof valInit === "undefined" ? "undefined" : _type_of(valInit)) === "object") {
|
|
840
|
-
viewProps[keyInit] = resolveAcceptedStyle(styleState, valInit);
|
|
343
|
+
if (keyInit === "className") {
|
|
344
|
+
if (pass[passParentCursor]) return;
|
|
345
|
+
if (typeof valInit === "string" && valInit && (styleFrontend === null || styleFrontend === void 0 ? void 0 : styleFrontend.resolveClassName)) {
|
|
346
|
+
if (noMergeStyle) {
|
|
347
|
+
viewProps.className = valInit;
|
|
841
348
|
return;
|
|
842
349
|
}
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
350
|
+
var resolveClassName = styleFrontend === null || styleFrontend === void 0 ? void 0 : styleFrontend.resolveClassName;
|
|
351
|
+
var sink = function(entry) {
|
|
352
|
+
var property2 = entry[0];
|
|
353
|
+
if (entry[2] !== void 0) {
|
|
354
|
+
if (isValidStyleKey(property2, validStyles)) contributeValue(styleState, property2, entry[1], void 0, false, entry[2]);
|
|
355
|
+
else if (process.env.NODE_ENV === "development") console.warn(`[tamagui] "${property2}" is not a valid style on this component; the frontend value is dropped.`);
|
|
356
|
+
} else {
|
|
357
|
+
if (property2 === "group") pass[passFrontendGroup] = entry[1];
|
|
358
|
+
else if (property2 === "container") pass[passFrontendContainer] = entry[1];
|
|
359
|
+
else if (property2 === "containerType") pass[passFrontendContainerType] = entry[1];
|
|
360
|
+
contributeProp(pass, property2, entry[1]);
|
|
852
361
|
}
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
clearDirectStyle(styleState, property);
|
|
861
|
-
styleState.classNames[property] = generatedClass;
|
|
862
|
-
((_pass = pass)[_passHocMappedProperties = passHocMappedProperties] || (_pass[_passHocMappedProperties] = /* @__PURE__ */ new Set())).add(property);
|
|
863
|
-
((_pass1 = pass)[_passHocMappedClasses = passHocMappedClasses] || (_pass1[_passHocMappedClasses] = /* @__PURE__ */ new Set())).add(generatedClass);
|
|
864
|
-
}
|
|
362
|
+
};
|
|
363
|
+
var start = 0;
|
|
364
|
+
for (var index = 0; index <= valInit.length; index++) {
|
|
365
|
+
if (index !== valInit.length && valInit.charCodeAt(index) > 32) continue;
|
|
366
|
+
if (index === start) {
|
|
367
|
+
start = index + 1;
|
|
368
|
+
continue;
|
|
865
369
|
}
|
|
866
|
-
var
|
|
867
|
-
var
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
if ((_pass_passHocMappedClasses = pass[passHocMappedClasses]) === null || _pass_passHocMappedClasses === void 0 ? void 0 : _pass_passHocMappedClasses.has(candidate)) {
|
|
877
|
-
start = index + 1;
|
|
878
|
-
continue;
|
|
879
|
-
}
|
|
880
|
-
var plan = getClassPlan ? getClassPlan(candidate, conf) : "raw";
|
|
881
|
-
if (plan === null) {
|
|
882
|
-
if (process.env.NODE_ENV === "development") (0, import_warnOnce.warnOnce)(`[tamagui] frontend candidate "${candidate}" is unavailable on this platform and was dropped.`);
|
|
883
|
-
} else if (plan === "raw") {
|
|
884
|
-
pass[passClassName] = pass[passClassName] ? `${pass[passClassName]} ${candidate}` : candidate;
|
|
885
|
-
if (getClassPlan) {
|
|
886
|
-
flushForwardStylesToClasses(pass);
|
|
887
|
-
pass[passShouldDoClasses] = false;
|
|
888
|
-
styleState.flatShouldDoClasses = false;
|
|
889
|
-
}
|
|
890
|
-
} else {
|
|
891
|
-
var parentPlan = plan;
|
|
892
|
-
if (!Array.isArray(plan) && parentPlan.preserveRawClass) {
|
|
893
|
-
pass[passClassName] = pass[passClassName] ? `${pass[passClassName]} ${candidate}` : candidate;
|
|
894
|
-
flushForwardStylesToClasses(pass);
|
|
895
|
-
pass[passShouldDoClasses] = false;
|
|
896
|
-
styleState.flatShouldDoClasses = false;
|
|
897
|
-
}
|
|
898
|
-
var entries = Array.isArray(plan) ? plan : parentPlan.entries;
|
|
899
|
-
for (var entryIndex = 0; entryIndex < entries.length; entryIndex++) {
|
|
900
|
-
var entry = entries[entryIndex];
|
|
901
|
-
if (entry[2] !== void 0) {
|
|
902
|
-
if (isValidStyleKey(entry[0], validStyles, accept)) contributeValue(styleState, entry[0], entry[1], mergeStyle, void 0, false, entry[2]);
|
|
903
|
-
else if (process.env.NODE_ENV === "development") console.warn(`[tamagui] "${entry[0]}" is not a valid style on this component; the frontend value is dropped.`);
|
|
904
|
-
} else {
|
|
905
|
-
if (entry[0] === "group") pass[passFrontendGroup] = entry[1];
|
|
906
|
-
else if (entry[0] === "container") pass[passFrontendContainer] = entry[1];
|
|
907
|
-
else if (entry[0] === "containerType") pass[passFrontendContainerType] = entry[1];
|
|
908
|
-
contributeProp(pass, entry[0], entry[1]);
|
|
909
|
-
}
|
|
370
|
+
var candidate = valInit.slice(start, index);
|
|
371
|
+
var preserveRaw = resolveClassName ? resolveClassName(candidate, conf, sink) : true;
|
|
372
|
+
if (preserveRaw === null) {
|
|
373
|
+
if (process.env.NODE_ENV === "development") (0, import_warnOnce.warnOnce)(`[tamagui] frontend candidate "${candidate}" is unavailable on this platform and was dropped.`);
|
|
374
|
+
} else if (preserveRaw) {
|
|
375
|
+
pass[passClassName] = pass[passClassName] ? `${pass[passClassName]} ${candidate}` : candidate;
|
|
376
|
+
if (resolveClassName) {
|
|
377
|
+
if (pass[passShouldDoClasses]) {
|
|
378
|
+
completeResolvedStyles(styleState);
|
|
379
|
+
(0, import_getCSSStylesAtomic.flushDirectStyles)(styleState, true);
|
|
910
380
|
}
|
|
381
|
+
pass[passShouldDoClasses] = false;
|
|
382
|
+
styleState.flatShouldDoClasses = false;
|
|
911
383
|
}
|
|
912
|
-
start = index + 1;
|
|
913
|
-
}
|
|
914
|
-
if (props[import_skipProps.HOC_CLASSNAME_MARKER] !== void 0) {
|
|
915
|
-
flushForwardStylesToClasses(pass);
|
|
916
|
-
pass[passShouldDoClasses] = false;
|
|
917
|
-
styleState.flatShouldDoClasses = false;
|
|
918
384
|
}
|
|
385
|
+
start = index + 1;
|
|
919
386
|
}
|
|
920
|
-
return;
|
|
921
387
|
}
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
var
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
if (!style) continue;
|
|
933
|
-
var hocClassNames1 = style[TAMAGUI_CLASS_PROPS];
|
|
934
|
-
if (hocClassNames1) {
|
|
935
|
-
for (var property1 in hocClassNames1) {
|
|
936
|
-
var _pass2, _passHocMappedProperties1;
|
|
937
|
-
clearDirectStyle(styleState, property1);
|
|
938
|
-
styleState.classNames[property1] = hocClassNames1[property1];
|
|
939
|
-
((_pass2 = pass)[_passHocMappedProperties1 = passHocMappedProperties] || (_pass2[_passHocMappedProperties1] = /* @__PURE__ */ new Set())).add(property1);
|
|
940
|
-
}
|
|
941
|
-
continue;
|
|
942
|
-
}
|
|
943
|
-
var normalized = (0, import_normalizeStyle.normalizeStyle)(style, false, true);
|
|
944
|
-
var styleOriginals = shouldTrackStyleTokenProvenance ? import_styleOriginalValues.styleOriginalValues.get(style) : void 0;
|
|
945
|
-
for (var key in normalized) {
|
|
946
|
-
var _pass_passHocMappedProperties;
|
|
947
|
-
if (normalized[key] == null) continue;
|
|
948
|
-
if ((_pass_passHocMappedProperties = pass[passHocMappedProperties]) === null || _pass_passHocMappedProperties === void 0 ? void 0 : _pass_passHocMappedProperties.delete(key)) clearDirectStyle(styleState, key);
|
|
949
|
-
contributeValue(styleState, key, normalized[key], mergeStyle, styleOriginals === null || styleOriginals === void 0 ? void 0 : styleOriginals[key]);
|
|
950
|
-
}
|
|
388
|
+
return;
|
|
389
|
+
}
|
|
390
|
+
if (keyInit === import_skipProps.HOC_CLASSNAME_MARKER) {
|
|
391
|
+
if (valInit && (typeof valInit === "undefined" ? "undefined" : _type_of(valInit)) === "object") {
|
|
392
|
+
var _direct;
|
|
393
|
+
var layers = (_direct = styleState).flatPropertyLayers || (_direct.flatPropertyLayers = /* @__PURE__ */ new Map());
|
|
394
|
+
for (var property in valInit) {
|
|
395
|
+
clearDirectStyle(styleState, property);
|
|
396
|
+
styleState.classNames[property] = valInit[property];
|
|
397
|
+
layers.set(property, pass[passSourceLayer]);
|
|
951
398
|
}
|
|
952
|
-
return;
|
|
953
399
|
}
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
400
|
+
return;
|
|
401
|
+
}
|
|
402
|
+
if (keyInit === "style") {
|
|
403
|
+
if (!valInit) return;
|
|
404
|
+
if (noMergeStyle) {
|
|
405
|
+
viewProps.style = valInit;
|
|
406
|
+
return;
|
|
958
407
|
}
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
var
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
if (
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
var _numberOfLines;
|
|
973
|
-
(_numberOfLines = (_viewProps = viewProps).numberOfLines) !== null && _numberOfLines !== void 0 || (_viewProps.numberOfLines = 1);
|
|
974
|
-
var _ellipsizeMode;
|
|
975
|
-
(_ellipsizeMode = (_viewProps1 = viewProps).ellipsizeMode) !== null && _ellipsizeMode !== void 0 || (_viewProps1.ellipsizeMode = "tail");
|
|
408
|
+
var layerBeforeStyle = pass[passSourceLayer];
|
|
409
|
+
pass[passSourceLayer] = sourceLayerStyle;
|
|
410
|
+
var isArray = Array.isArray(valInit);
|
|
411
|
+
var length = isArray ? valInit.length : 1;
|
|
412
|
+
for (var index1 = 0; index1 < length; index1++) {
|
|
413
|
+
var style = isArray ? valInit[index1] : valInit;
|
|
414
|
+
if (!style) continue;
|
|
415
|
+
if ((0, import_style.isStylePiece)(style)) {
|
|
416
|
+
var resolvedPiece = resolveStylePiece(styleState, style);
|
|
417
|
+
var pieceOriginals = shouldTrackStyleTokenProvenance ? import_styleOriginalValues.styleOriginalValues.get(style[import_types.stylePieceSymbol].styleObject) : void 0;
|
|
418
|
+
for (var key in resolvedPiece) {
|
|
419
|
+
if (resolvedPiece[key] == null) continue;
|
|
420
|
+
contributeValue(styleState, key, resolvedPiece[key], pieceOriginals === null || pieceOriginals === void 0 ? void 0 : pieceOriginals[key]);
|
|
976
421
|
}
|
|
977
|
-
|
|
978
|
-
}
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
if (isStyleProp && asChildExceptStyleLike) return;
|
|
984
|
-
var shouldPassProp = !isStyleProp && isHOC || hocParentVariants && keyInit in hocParentVariants || (inlineProps === null || inlineProps === void 0 ? void 0 : inlineProps.has(keyInit));
|
|
985
|
-
var parentVariant = parentVariants === null || parentVariants === void 0 ? void 0 : parentVariants[keyInit];
|
|
986
|
-
var isHOCShouldPassThrough = Boolean(isHOC && (parentVariant || keyInit in import_skipProps.skipProps));
|
|
987
|
-
var shouldPassThrough = shouldPassProp || isHOCShouldPassThrough;
|
|
988
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
989
|
-
console.groupCollapsed(` \u{1F511} ${keyOg}${keyInit !== keyOg ? ` (shorthand for ${keyInit})` : ""} ${shouldPassThrough ? "(pass)" : ""}`);
|
|
990
|
-
(0, import_log.log)({
|
|
991
|
-
isVariant,
|
|
992
|
-
valInit,
|
|
993
|
-
shouldPassProp
|
|
994
|
-
});
|
|
995
|
-
if (import_constants.isClient) (0, import_log.log)({
|
|
996
|
-
variants,
|
|
997
|
-
variant: variants === null || variants === void 0 ? void 0 : variants[keyInit],
|
|
998
|
-
isVariant,
|
|
999
|
-
isHOCShouldPassThrough,
|
|
1000
|
-
parentStaticConfig
|
|
1001
|
-
});
|
|
1002
|
-
}
|
|
1003
|
-
if (shouldPassThrough) {
|
|
1004
|
-
passDownProp(viewProps, keyInit, valInit);
|
|
1005
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") console.groupEnd();
|
|
1006
|
-
if (!isVariant) return;
|
|
1007
|
-
}
|
|
1008
|
-
if (shouldCheckSkipProps && !(neverSkipProps === null || neverSkipProps === void 0 ? void 0 : neverSkipProps[keyInit])) {
|
|
1009
|
-
if (keyInit in import_skipProps.skipProps && !(keyInit === "transition" && typeof valInit === "string" && !(driverAnimations === null || driverAnimations === void 0 ? void 0 : driverAnimations[valInit]))) {
|
|
1010
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") console.groupEnd();
|
|
1011
|
-
return;
|
|
422
|
+
continue;
|
|
423
|
+
}
|
|
424
|
+
var styleOriginals = shouldTrackStyleTokenProvenance ? import_styleOriginalValues.styleOriginalValues.get(style) : void 0;
|
|
425
|
+
for (var key1 in style) {
|
|
426
|
+
if (style[key1] == null) continue;
|
|
427
|
+
contributeValue(styleState, key1, style[key1], styleOriginals === null || styleOriginals === void 0 ? void 0 : styleOriginals[key1]);
|
|
1012
428
|
}
|
|
1013
429
|
}
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
430
|
+
pass[passSourceLayer] = layerBeforeStyle;
|
|
431
|
+
return;
|
|
432
|
+
}
|
|
433
|
+
if (defaultProps) {
|
|
434
|
+
var _defaultProps_keyOg;
|
|
435
|
+
var defaultVal = (_defaultProps_keyOg = defaultProps[keyOg]) !== null && _defaultProps_keyOg !== void 0 ? _defaultProps_keyOg : defaultProps[keyInit];
|
|
436
|
+
if (defaultVal !== void 0 && valInit === defaultVal) return;
|
|
437
|
+
}
|
|
438
|
+
var isNativeInputColor = isInput && keyInit in import_nativeStyleEngine.nativeTextInputColorProps;
|
|
439
|
+
if (!isNativeInputColor && keyInit in import_skipProps.skipProps && shouldSkipDirectProps && !(neverSkipProps === null || neverSkipProps === void 0 ? void 0 : neverSkipProps[keyInit])) if (keyInit === "transition" && typeof valInit === "string") return;
|
|
440
|
+
else return;
|
|
441
|
+
var isValidStyleKeyInit = isValidStyleKey(keyInit, validStyles);
|
|
442
|
+
if (!isValidStyleKeyInit) {
|
|
443
|
+
if (!import_constants.isAndroid) {
|
|
444
|
+
if (keyInit === "elevationAndroid") return;
|
|
445
|
+
}
|
|
446
|
+
if (keyInit === "userSelect") {
|
|
447
|
+
keyInit = "selectable";
|
|
448
|
+
valInit = valInit !== "none";
|
|
449
|
+
} else if (keyInit === "textOverflow") {
|
|
450
|
+
if (isText && valInit === "ellipsis") {
|
|
451
|
+
var _viewProps, _viewProps1;
|
|
452
|
+
var _numberOfLines;
|
|
453
|
+
(_numberOfLines = (_viewProps = viewProps).numberOfLines) !== null && _numberOfLines !== void 0 || (_viewProps.numberOfLines = 1);
|
|
454
|
+
var _ellipsizeMode;
|
|
455
|
+
(_ellipsizeMode = (_viewProps1 = viewProps).ellipsizeMode) !== null && _ellipsizeMode !== void 0 || (_viewProps1.ellipsizeMode = "tail");
|
|
456
|
+
}
|
|
457
|
+
return;
|
|
458
|
+
} else if (keyInit.startsWith("data-")) return;
|
|
459
|
+
}
|
|
460
|
+
var isVariant = !isValidStyleKeyInit && variants && keyInit in variants;
|
|
461
|
+
var isStyleProp = isValidStyleKeyInit || isVariant && !noExpand;
|
|
462
|
+
if (isStyleProp && asChildExceptStyleLike) return;
|
|
463
|
+
var shouldPassProp = !isStyleProp && isHOC || hocParentVariants && keyInit in hocParentVariants || (inlineProps === null || inlineProps === void 0 ? void 0 : inlineProps.has(keyInit));
|
|
464
|
+
var parentVariant = parentVariants === null || parentVariants === void 0 ? void 0 : parentVariants[keyInit];
|
|
465
|
+
var isHOCShouldPassThrough = Boolean(isHOC && (parentVariant || keyInit in import_skipProps.skipProps));
|
|
466
|
+
var shouldPassThrough = shouldPassProp || isHOCShouldPassThrough;
|
|
467
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
468
|
+
console.groupCollapsed(` \u{1F511} ${keyOg}${keyInit !== keyOg ? ` (shorthand for ${keyInit})` : ""} ${shouldPassThrough ? "(pass)" : ""}`);
|
|
469
|
+
(0, import_log.log)({
|
|
470
|
+
isVariant,
|
|
471
|
+
valInit,
|
|
472
|
+
shouldPassProp
|
|
473
|
+
});
|
|
474
|
+
if (import_constants.isClient) (0, import_log.log)({
|
|
475
|
+
variants,
|
|
476
|
+
variant: variants === null || variants === void 0 ? void 0 : variants[keyInit],
|
|
477
|
+
isVariant,
|
|
478
|
+
isHOCShouldPassThrough,
|
|
479
|
+
parentStaticConfig: pass[15]
|
|
480
|
+
});
|
|
481
|
+
}
|
|
482
|
+
if (shouldPassThrough) {
|
|
483
|
+
if (keyInit in viewProps) delete viewProps[keyInit];
|
|
484
|
+
viewProps[keyInit] = valInit;
|
|
485
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose") console.groupEnd();
|
|
486
|
+
if (!isVariant) return;
|
|
487
|
+
}
|
|
488
|
+
if (!isNativeInputColor && shouldCheckSkipProps && !(neverSkipProps === null || neverSkipProps === void 0 ? void 0 : neverSkipProps[keyInit])) {
|
|
489
|
+
if (keyInit in import_skipProps.skipProps && !(keyInit === "transition" && typeof valInit === "string" && !(driverAnimations === null || driverAnimations === void 0 ? void 0 : driverAnimations[valInit]))) {
|
|
490
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose") console.groupEnd();
|
|
1020
491
|
return;
|
|
1021
492
|
}
|
|
493
|
+
}
|
|
494
|
+
if (isTextOrInput) {
|
|
495
|
+
if (valInit && (keyInit === "fontFamily" || keyInit === shorthands["fontFamily"]) && valInit in conf.fontsParsed) styleState.fontFamily = valInit;
|
|
496
|
+
}
|
|
497
|
+
if (isValidStyleKeyInit && valInit != null && !(valInit === "unset") && !(variants && keyInit in variants) && !((styledContextKeys === null || styledContextKeys === void 0 ? void 0 : styledContextKeys.has(keyInit)) || styledContext && keyInit in styledContext)) {
|
|
498
|
+
contributeValue(styleState, keyInit, valInit, originalOg);
|
|
499
|
+
return;
|
|
500
|
+
}
|
|
501
|
+
if (variants && keyInit in variants && !noExpand && !disabled) {
|
|
502
|
+
var _variantConfig_variantStyleResolver;
|
|
503
|
+
var previousLayer = pass[passSourceLayer];
|
|
504
|
+
pass[passSourceLayer] = previousLayer ? sourceLayerVariant : sourceLayerBase;
|
|
1022
505
|
pass[passMapSourceKey] = keyInit;
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
506
|
+
var variantConfig = styleState.flatStyleStaticConfig;
|
|
507
|
+
(_variantConfig_variantStyleResolver = variantConfig.variantStyleResolver) === null || _variantConfig_variantStyleResolver === void 0 || _variantConfig_variantStyleResolver.call(variantConfig, styleState, variantConfig.variants, keyInit, valInit, keyInit, pass[passParentCursor]);
|
|
508
|
+
pass[passSourceLayer] = previousLayer;
|
|
509
|
+
return;
|
|
510
|
+
}
|
|
511
|
+
var isStyledContextProp = !isHOC && ((styledContextKeys === null || styledContextKeys === void 0 ? void 0 : styledContextKeys.has(keyInit)) || styledContext && keyInit in styledContext);
|
|
512
|
+
if (isStyledContextProp) {
|
|
513
|
+
var _styleState1, _styleState2;
|
|
514
|
+
((_styleState1 = styleState).overriddenContextProps || (_styleState1.overriddenContextProps = {}))[keyInit] = originalOg;
|
|
515
|
+
((_styleState2 = styleState).originalContextPropValues || (_styleState2.originalContextPropValues = {}))[keyInit] = originalOg;
|
|
516
|
+
}
|
|
517
|
+
var isHostStyleKey = isValidStyleKeyInit || import_constants.isAndroid && keyInit === "elevation";
|
|
518
|
+
if (isHostStyleKey || isStyledContextProp) {
|
|
519
|
+
if (valInit === "unset") {
|
|
520
|
+
var expanded = (0, import_expandStyle.expandStyle)(keyInit, valInit, conf.settings.styleCompat || "web");
|
|
521
|
+
clearDirectStyle(styleState, keyInit);
|
|
522
|
+
if (expanded) for (var index2 = 0; index2 < expanded.length; index2++) clearDirectStyle(styleState, expanded[index2][0]);
|
|
523
|
+
} else contributeValue(styleState, keyInit, valInit, originalOg, !isHostStyleKey);
|
|
524
|
+
return;
|
|
525
|
+
}
|
|
526
|
+
var condition = pass[passParentCursor];
|
|
527
|
+
if (condition) {
|
|
528
|
+
if (isHOC) {
|
|
529
|
+
var previous = viewProps[keyInit];
|
|
530
|
+
var transport = previous && (typeof previous === "undefined" ? "undefined" : _type_of(previous)) === "object" && !Array.isArray(previous) && "default" in previous ? previous : { default: previous };
|
|
531
|
+
transport[condition[conditionKey]] = valInit;
|
|
532
|
+
viewProps[keyInit] = transport;
|
|
533
|
+
} else if (process.env.NODE_ENV === "development") console.warn(`[tamagui] "${keyInit}" is not a valid style on this component; the conditional variant value is dropped.`);
|
|
534
|
+
return;
|
|
535
|
+
}
|
|
536
|
+
if (keyInit in import_helpers.stylePropsAll) {
|
|
537
|
+
if (process.env.NODE_ENV === "development") console.warn(`[tamagui] "${keyInit}" is a text style prop and this component is not text \u2014 it would render on neither platform. Use a Text-based component, or html.* for raw web elements.`);
|
|
538
|
+
return;
|
|
539
|
+
}
|
|
540
|
+
viewProps[keyInit] = valInit;
|
|
541
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
542
|
+
try {
|
|
543
|
+
(0, import_log.log)(` \u2714\uFE0F expand complete`, keyInit);
|
|
544
|
+
(0, import_log.log)("style", { ...styleState.style });
|
|
545
|
+
(0, import_log.log)("viewProps", { ...viewProps });
|
|
546
|
+
(0, import_log.log)("transforms", styleState.transformAccumulator);
|
|
547
|
+
} catch (e) {}
|
|
548
|
+
console.groupEnd();
|
|
1037
549
|
}
|
|
1038
550
|
}
|
|
1039
|
-
var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, componentContext, groupContext, elementType, startedUnhydrated, debug, animationDriver) {
|
|
1040
|
-
var
|
|
551
|
+
var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, componentContext, groupContext, elementType, startedUnhydrated, debug, animationDriver, styleStaticConfig) {
|
|
552
|
+
var _styleState_flatMediaKeys, _styleState_flatGroupKeys, _styleState_flatGroupMedia, _styleState_style;
|
|
1041
553
|
var conf = (0, import_config.getConfig)();
|
|
1042
|
-
|
|
554
|
+
styleStaticConfig || (styleStaticConfig = (0, import_styleStaticConfig.getStyleStaticConfig)(staticConfig, conf));
|
|
1043
555
|
var driver = animationDriver || (componentContext === null || componentContext === void 0 ? void 0 : componentContext.animationDriver) || conf.animations;
|
|
1044
556
|
var driverAnimations = driver === null || driver === void 0 ? void 0 : driver.animations;
|
|
1045
557
|
driver === null || driver === void 0 || driver.inputStyle;
|
|
@@ -1047,7 +559,8 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
1047
559
|
var resolvedDriver = (driver === null || driver === void 0 ? void 0 : driver.isStub) ? null : driver;
|
|
1048
560
|
if (props.passThrough) return null;
|
|
1049
561
|
var { shorthands } = conf;
|
|
1050
|
-
var { isHOC, isText, isInput,
|
|
562
|
+
var { isHOC, isText, isInput, inlineProps, parentStaticConfig, acceptsClassName } = staticConfig;
|
|
563
|
+
var variants = styleStaticConfig.variants;
|
|
1051
564
|
var viewProps = {};
|
|
1052
565
|
var mediaState = styleProps.mediaState || import_mediaState.mediaState;
|
|
1053
566
|
var shouldDoClasses = !process.env.TAMAGUI_DID_OUTPUT_CSS && acceptsClassName && false;
|
|
@@ -1059,7 +572,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
1059
572
|
var staticPassthroughClassName = "";
|
|
1060
573
|
var className = staticPassthroughClassName;
|
|
1061
574
|
if (staticPassthroughClassName) shouldDoClasses = false;
|
|
1062
|
-
var validStyles = staticConfig.validStyles || (staticConfig.
|
|
575
|
+
var validStyles = staticConfig.validStyles || (staticConfig.isInput ? import_helpers.stylePropsInput : staticConfig.isText ? import_helpers.stylePropsText : import_helpers.validStyles);
|
|
1063
576
|
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-setup`;
|
|
1064
577
|
var styleState = {
|
|
1065
578
|
classNames,
|
|
@@ -1080,7 +593,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
1080
593
|
flatGroupContext: groupContext,
|
|
1081
594
|
animationDriver: resolvedDriver
|
|
1082
595
|
};
|
|
1083
|
-
|
|
596
|
+
styleState.flatStyleStaticConfig = styleStaticConfig;
|
|
1084
597
|
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`style-state`;
|
|
1085
598
|
if (process.env.NODE_ENV === "development" && debug === "verbose" && import_constants.isClient) {
|
|
1086
599
|
if (import_isDevTools.isDevTools) {
|
|
@@ -1098,21 +611,20 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
1098
611
|
}
|
|
1099
612
|
}
|
|
1100
613
|
var { asChild } = props;
|
|
1101
|
-
var {
|
|
1102
|
-
var { noSkip, disableExpandShorthands, noExpand, noClass, noMergeStyle, noNormalize, isAnimated, styledContext
|
|
614
|
+
var { neverSkipProps } = staticConfig;
|
|
615
|
+
var { noSkip, disableExpandShorthands, noExpand, noClass, noMergeStyle, noNormalize, isAnimated, styledContext } = styleProps;
|
|
616
|
+
var styledContextKeys = styleStaticConfig.styledContextKeys;
|
|
1103
617
|
var styleFrontend = staticConfig.styleFrontend;
|
|
1104
618
|
var frontendGroup;
|
|
1105
619
|
var frontendContainer;
|
|
1106
620
|
var frontendContainerType;
|
|
1107
|
-
var
|
|
1108
|
-
var
|
|
621
|
+
var processedProps = props;
|
|
622
|
+
var parentVariants = parentStaticConfig ? (0, import_styleStaticConfig.getStyleStaticConfig)(parentStaticConfig, conf).variants : void 0;
|
|
623
|
+
var defaultProps = asChild ? styleStaticConfig.defaultProps : void 0;
|
|
1109
624
|
var asChildExceptStyleLike = asChild === "except-style" || asChild === "except-style-web";
|
|
1110
625
|
var containerValue;
|
|
1111
626
|
var containerName;
|
|
1112
627
|
var containerType;
|
|
1113
|
-
var hocMappedClassProperties;
|
|
1114
|
-
var hocMappedClasses;
|
|
1115
|
-
var stylePassFlags = (noSkip ? passNoSkipFlag : 0) | (disableExpandShorthands ? passDisableShorthandsFlag : 0) | (noExpand ? passNoExpandFlag : 0) | (noMergeStyle ? passNoMergeFlag : 0) | (isHOC ? passHocFlag : 0) | (isText ? passTextFlag : 0) | (isInput ? passInputFlag : 0) | (asChildExceptStyleLike ? passAsChildStyleFlag : 0);
|
|
1116
628
|
var pass = [
|
|
1117
629
|
styleState,
|
|
1118
630
|
conf,
|
|
@@ -1120,7 +632,6 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
1120
632
|
viewProps,
|
|
1121
633
|
staticConfig,
|
|
1122
634
|
validStyles,
|
|
1123
|
-
accept,
|
|
1124
635
|
neverSkipProps,
|
|
1125
636
|
variants,
|
|
1126
637
|
inlineProps,
|
|
@@ -1128,7 +639,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
1128
639
|
styleFrontend,
|
|
1129
640
|
styledContext,
|
|
1130
641
|
styledContextKeys,
|
|
1131
|
-
|
|
642
|
+
(noSkip ? passNoSkipFlag : 0) | (disableExpandShorthands ? passDisableShorthandsFlag : 0) | (noExpand ? passNoExpandFlag : 0) | (noMergeStyle ? passNoMergeFlag : 0) | (isHOC ? passHocFlag : 0) | (isText ? passTextFlag : 0) | (isInput ? passInputFlag : 0) | (asChildExceptStyleLike ? passAsChildStyleFlag : 0),
|
|
1132
643
|
debug,
|
|
1133
644
|
parentStaticConfig,
|
|
1134
645
|
defaultProps,
|
|
@@ -1142,107 +653,123 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
1142
653
|
containerType,
|
|
1143
654
|
frontendGroup,
|
|
1144
655
|
frontendContainer,
|
|
1145
|
-
frontendContainerType
|
|
1146
|
-
hocMappedClassProperties,
|
|
1147
|
-
hocMappedClasses
|
|
656
|
+
frontendContainerType
|
|
1148
657
|
];
|
|
1149
658
|
styleState.flatPass = pass;
|
|
1150
|
-
|
|
1151
|
-
|
|
659
|
+
var conditionalStates = null;
|
|
660
|
+
var usesSafeArea = false;
|
|
661
|
+
var baseStyle = styleStaticConfig.baseStyle;
|
|
662
|
+
var baseVariantProps = styleStaticConfig.baseVariantProps;
|
|
663
|
+
var appliesBaseStyle = baseStyle && !processedProps.asChild;
|
|
664
|
+
pass[passSourceLayer] = sourceLayerBase;
|
|
665
|
+
if (appliesBaseStyle && baseVariantProps) {
|
|
666
|
+
var callerKeys;
|
|
667
|
+
for (var key in baseVariantProps) if (Object.hasOwn(processedProps, key) && processedProps[key] !== baseVariantProps[key]) (callerKeys || (callerKeys = /* @__PURE__ */ new Set())).add(key);
|
|
668
|
+
styleState.flatCallerVariantKeys = callerKeys;
|
|
669
|
+
}
|
|
670
|
+
if (appliesBaseStyle) for (var key1 in baseStyle) {
|
|
671
|
+
var _styleStaticConfig_baseStylePieces;
|
|
672
|
+
var baseValue = baseVariantProps && Object.hasOwn(baseVariantProps, key1) && Object.hasOwn(processedProps, key1) ? processedProps[key1] : baseStyle[key1];
|
|
673
|
+
var expandedKey = shorthands[key1] || key1;
|
|
674
|
+
if ((isText || isInput) && baseValue && expandedKey === "fontFamily" && baseValue in conf.fontsParsed) styleState.fontFamily = baseValue;
|
|
675
|
+
(_styleStaticConfig_baseStylePieces = styleStaticConfig.baseStylePieces) === null || _styleStaticConfig_baseStylePieces === void 0 || _styleStaticConfig_baseStylePieces[key1];
|
|
676
|
+
contributeProp(pass, key1, baseValue);
|
|
677
|
+
}
|
|
678
|
+
pass[passSourceLayer] = sourceLayerProps;
|
|
679
|
+
for (var key2 in processedProps) {
|
|
680
|
+
if (appliesBaseStyle && baseVariantProps && Object.hasOwn(baseVariantProps, key2)) continue;
|
|
681
|
+
contributeProp(pass, key2, processedProps[key2]);
|
|
682
|
+
}
|
|
683
|
+
var resolvers = staticConfig.resolvers;
|
|
684
|
+
if (resolvers && !noExpand) {
|
|
685
|
+
pass[passSourceLayer] = sourceLayerResolver;
|
|
686
|
+
var flagsBefore = pass[passFlags];
|
|
687
|
+
pass[passFlags] = flagsBefore | passNoExpandFlag;
|
|
688
|
+
var env = (0, import_styledDynamic.getDynamicEnv)(styleState);
|
|
689
|
+
for (var index = 0; index < resolvers.length; index++) {
|
|
690
|
+
var resolved = resolvers[index](processedProps, env);
|
|
691
|
+
if (resolved) for (var key3 in resolved) {
|
|
692
|
+
if (resolved[key3] == null) continue;
|
|
693
|
+
contributeProp(pass, key3, resolved[key3]);
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
pass[passFlags] = flagsBefore;
|
|
697
|
+
}
|
|
698
|
+
className = pass[passClassName];
|
|
699
|
+
shouldDoClasses = pass[passShouldDoClasses];
|
|
700
|
+
containerValue = pass[passContainerValue];
|
|
701
|
+
containerName = pass[passContainerName];
|
|
702
|
+
containerType = pass[passContainerType];
|
|
703
|
+
frontendGroup = pass[passFrontendGroup];
|
|
704
|
+
frontendContainer = pass[passFrontendContainer];
|
|
705
|
+
frontendContainerType = pass[passFrontendContainerType];
|
|
1152
706
|
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-propsend`;
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
707
|
+
conditionalStates = styleState.flatStateKeys || null;
|
|
708
|
+
usesSafeArea = !!styleState.flatUsesSafeArea;
|
|
709
|
+
hasMedia = ((_styleState_flatMediaKeys = styleState.flatMediaKeys) === null || _styleState_flatMediaKeys === void 0 ? void 0 : _styleState_flatMediaKeys.size) ? styleState.flatMediaKeys : false;
|
|
710
|
+
pseudoGroups = ((_styleState_flatGroupKeys = styleState.flatGroupKeys) === null || _styleState_flatGroupKeys === void 0 ? void 0 : _styleState_flatGroupKeys.size) ? styleState.flatGroupKeys : void 0;
|
|
711
|
+
mediaGroups = ((_styleState_flatGroupMedia = styleState.flatGroupMedia) === null || _styleState_flatGroupMedia === void 0 ? void 0 : _styleState_flatGroupMedia.size) ? styleState.flatGroupMedia : void 0;
|
|
712
|
+
if (styleProps.canPlatformPseudo && styleState.flatHasPlatformPseudo) {
|
|
713
|
+
shouldDoClasses = false;
|
|
714
|
+
styleState.flatShouldDoClasses = false;
|
|
715
|
+
if (styleState.transformAccumulator) {
|
|
716
|
+
mergeStyle(styleState, "transform", (0, import_runtime.finalizeTransformAccumulator)(styleState.transformAccumulator), true);
|
|
717
|
+
styleState.transformAccumulator = void 0;
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
if (styleProps.stylePieceEntries) {
|
|
721
|
+
var slots = styleState.flatSlots;
|
|
722
|
+
if (slots) {
|
|
723
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
1159
724
|
try {
|
|
1160
|
-
for (var
|
|
1161
|
-
var
|
|
1162
|
-
|
|
725
|
+
for (var _iterator = slots[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
726
|
+
var [slot, entries] = _step.value;
|
|
727
|
+
styleProps.stylePieceEntries[slot] = entries;
|
|
1163
728
|
}
|
|
1164
729
|
} catch (err) {
|
|
1165
|
-
|
|
1166
|
-
|
|
730
|
+
_didIteratorError = true;
|
|
731
|
+
_iteratorError = err;
|
|
1167
732
|
} finally {
|
|
1168
733
|
try {
|
|
1169
|
-
if (!
|
|
734
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
|
|
1170
735
|
} finally {
|
|
1171
|
-
if (
|
|
736
|
+
if (_didIteratorError) throw _iteratorError;
|
|
1172
737
|
}
|
|
1173
738
|
}
|
|
1174
739
|
}
|
|
1175
740
|
}
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
var
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
}
|
|
1195
|
-
if ((
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
if (!_iteratorNormalCompletion22 && _iterator22.return != null) _iterator22.return();
|
|
1209
|
-
} finally {
|
|
1210
|
-
if (_didIteratorError22) throw _iteratorError22;
|
|
1211
|
-
}
|
|
1212
|
-
}
|
|
1213
|
-
}
|
|
1214
|
-
if (styleProps.canPlatformPseudo && styleState.flatHasPlatformPseudo) {
|
|
1215
|
-
shouldDoClasses = false;
|
|
1216
|
-
styleState.flatShouldDoClasses = false;
|
|
1217
|
-
if (styleState.transformAccumulator) {
|
|
1218
|
-
mergeStyle(styleState, "transform", (0, import_runtime.finalizeTransformAccumulator)(styleState.transformAccumulator), 1, true);
|
|
1219
|
-
styleState.transformAccumulator = void 0;
|
|
1220
|
-
}
|
|
1221
|
-
convertDeferredInline(styleState, mergeStyle);
|
|
1222
|
-
}
|
|
1223
|
-
completeStreaming(styleState, mergeStyle);
|
|
1224
|
-
var effectiveTransition = (_styleState_style = styleState.style) === null || _styleState_style === void 0 ? void 0 : _styleState_style.transition;
|
|
1225
|
-
if (effectiveTransition != null && styleState.style && true) delete styleState.style.transition;
|
|
1226
|
-
if (styleState.style) {
|
|
1227
|
-
if ("containerType" in styleState.style) delete styleState.style.containerType;
|
|
1228
|
-
if ("containerName" in styleState.style) delete styleState.style.containerName;
|
|
1229
|
-
}
|
|
1230
|
-
if (!(noNormalize === false)) {
|
|
1231
|
-
if (styleState.style) {
|
|
1232
|
-
(0, import_expandStyles.fixStyles)(styleState.style);
|
|
1233
|
-
if (!noExpand && !noMergeStyle) {}
|
|
1234
|
-
}
|
|
1235
|
-
if (styleState.transformAccumulator && !styleState.flatShouldDoClasses) {
|
|
1236
|
-
var _styleState;
|
|
1237
|
-
(_styleState = styleState).style || (_styleState.style = {});
|
|
1238
|
-
styleState.style.transform = (0, import_runtime.finalizeTransformAccumulator)(styleState.transformAccumulator);
|
|
1239
|
-
}
|
|
1240
|
-
if (parentSplitStyles) {
|
|
1241
|
-
if (!shouldDoClasses) for (var key4 in parentSplitStyles.style) {
|
|
1242
|
-
var _styleState1;
|
|
1243
|
-
if (key4 in classNames || styleState.style && key4 in styleState.style) continue;
|
|
1244
|
-
(_styleState1 = styleState).style || (_styleState1.style = {});
|
|
1245
|
-
styleState.style[key4] = parentSplitStyles.style[key4];
|
|
741
|
+
completeResolvedStyles(styleState);
|
|
742
|
+
if (styleProps.isStatic) for (var property in classNames) {
|
|
743
|
+
var identifier = classNames[property];
|
|
744
|
+
if (rulesToInsert[identifier]) continue;
|
|
745
|
+
var rules = (0, import_insertStyleRule.getRulesForIdentifier)(identifier);
|
|
746
|
+
if (rules) rulesToInsert[identifier] = [
|
|
747
|
+
property,
|
|
748
|
+
"",
|
|
749
|
+
identifier,
|
|
750
|
+
void 0,
|
|
751
|
+
rules
|
|
752
|
+
];
|
|
753
|
+
}
|
|
754
|
+
var effectiveTransition = (_styleState_style = styleState.style) === null || _styleState_style === void 0 ? void 0 : _styleState_style.transition;
|
|
755
|
+
if (effectiveTransition != null && styleState.style && true) delete styleState.style.transition;
|
|
756
|
+
if (styleState.style) {
|
|
757
|
+
if ("containerType" in styleState.style) delete styleState.style.containerType;
|
|
758
|
+
if ("containerName" in styleState.style) delete styleState.style.containerName;
|
|
759
|
+
}
|
|
760
|
+
if (!(noNormalize === false)) {
|
|
761
|
+
if (styleState.style) (0, import_expandStyles.fixStyles)(styleState.style);
|
|
762
|
+
if (styleState.transformAccumulator && !styleState.flatShouldDoClasses) {
|
|
763
|
+
var _styleState;
|
|
764
|
+
(_styleState = styleState).style || (_styleState.style = {});
|
|
765
|
+
styleState.style.transform = (0, import_runtime.finalizeTransformAccumulator)(styleState.transformAccumulator);
|
|
766
|
+
}
|
|
767
|
+
if (parentSplitStyles) {
|
|
768
|
+
if (!shouldDoClasses) for (var key5 in parentSplitStyles.style) {
|
|
769
|
+
var _styleState1;
|
|
770
|
+
if (key5 in classNames || styleState.style && key5 in styleState.style) continue;
|
|
771
|
+
(_styleState1 = styleState).style || (_styleState1.style = {});
|
|
772
|
+
styleState.style[key5] = parentSplitStyles.style[key5];
|
|
1246
773
|
}
|
|
1247
774
|
}
|
|
1248
775
|
}
|
|
@@ -1271,9 +798,9 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
1271
798
|
if (shouldTrackStyleTokenProvenance && styleState.style && styleState.tokenProvenance) {
|
|
1272
799
|
var provenance = {};
|
|
1273
800
|
var hasProvenance = false;
|
|
1274
|
-
for (var
|
|
1275
|
-
provenance[
|
|
1276
|
-
token: styleState.tokenProvenance[
|
|
801
|
+
for (var key6 in styleState.tokenProvenance) {
|
|
802
|
+
provenance[key6] = {
|
|
803
|
+
token: styleState.tokenProvenance[key6],
|
|
1277
804
|
theme: themeName
|
|
1278
805
|
};
|
|
1279
806
|
hasProvenance = true;
|
|
@@ -1294,7 +821,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
1294
821
|
if (effectiveTransition != null) result.effectiveTransition = effectiveTransition;
|
|
1295
822
|
if (conditionalStates) result.programStates = conditionalStates;
|
|
1296
823
|
if (usesSafeArea) result.usesSafeArea = true;
|
|
1297
|
-
if (
|
|
824
|
+
if (styleState.flatDynamicThemeAccess) result.dynamicThemeAccess = true;
|
|
1298
825
|
if (styleState.flatEnterKeys || styleState.flatExitKeys) result.programLifecycleStyleKeys = {
|
|
1299
826
|
enter: effectiveLifecycleKeys(styleState.flatEnterKeys),
|
|
1300
827
|
exit: effectiveLifecycleKeys(styleState.flatExitKeys)
|
|
@@ -1324,7 +851,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
1324
851
|
rulesToInsert,
|
|
1325
852
|
parentSplitStyles
|
|
1326
853
|
};
|
|
1327
|
-
for (var
|
|
854
|
+
for (var key8 in logs) (0, import_log.log)(key8, logs[key8]);
|
|
1328
855
|
} catch (e) {}
|
|
1329
856
|
console.groupEnd();
|
|
1330
857
|
}
|
|
@@ -1332,11 +859,41 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
1332
859
|
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-done`;
|
|
1333
860
|
return result;
|
|
1334
861
|
};
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
862
|
+
var stylePieceStaticConfig = {
|
|
863
|
+
acceptsClassName: true,
|
|
864
|
+
isText: true,
|
|
865
|
+
validStyles: import_helpers.stylePropsAll
|
|
866
|
+
};
|
|
867
|
+
var compileStylePieceRuntime = function(piece, layer) {};
|
|
868
|
+
(0, import_style.setStylePieceCompiler)(compileStylePieceRuntime);
|
|
869
|
+
(0, import_style.setStylePieceResolver)(function(piece, theme, themeName) {
|
|
870
|
+
var split = getSplitStyles({ style: piece }, stylePieceStaticConfig, theme, themeName, import_defaultComponentState.defaultComponentStateMounted, {
|
|
871
|
+
isAnimated: false,
|
|
872
|
+
resolveValues: "value"
|
|
873
|
+
});
|
|
874
|
+
return (split === null || split === void 0 ? void 0 : split.style) || {};
|
|
875
|
+
});
|
|
876
|
+
var resolvedStylePieceCache = /* @__PURE__ */ new WeakMap();
|
|
877
|
+
function resolveStylePiece(styleState, piece) {
|
|
878
|
+
var definition = piece[import_types.stylePieceSymbol].styleObject;
|
|
879
|
+
if (!(0, import_style.isStylePieceCacheable)(piece)) return resolveStyleObject(styleState, definition);
|
|
880
|
+
var themeCache = resolvedStylePieceCache.get(piece);
|
|
881
|
+
if (!themeCache) {
|
|
882
|
+
themeCache = /* @__PURE__ */ new WeakMap();
|
|
883
|
+
resolvedStylePieceCache.set(piece, themeCache);
|
|
884
|
+
}
|
|
885
|
+
var theme = styleState.theme;
|
|
886
|
+
var cached = themeCache.get(theme);
|
|
887
|
+
if (cached) return cached;
|
|
888
|
+
var resolved = resolveStyleObject(styleState, definition);
|
|
889
|
+
themeCache.set(theme, resolved);
|
|
890
|
+
return resolved;
|
|
891
|
+
}
|
|
892
|
+
function mergeStyle(styleState, key, val) {
|
|
893
|
+
arguments.length > 3 && arguments[3] !== void 0 && arguments[3];
|
|
894
|
+
var originalVal = arguments.length > 4 ? arguments[4] : void 0;
|
|
1338
895
|
var { viewProps, styleProps, staticConfig } = styleState;
|
|
1339
|
-
var contextPropSet =
|
|
896
|
+
var contextPropSet = styleState.flatStyleStaticConfig.styledContextKeys;
|
|
1340
897
|
if (contextPropSet === null || contextPropSet === void 0 ? void 0 : contextPropSet.has(key)) {
|
|
1341
898
|
var _styleState_originalContextPropValues;
|
|
1342
899
|
var _styleState;
|
|
@@ -1351,7 +908,7 @@ function mergeStyle(styleState, key, val, _importance) {
|
|
|
1351
908
|
(0, import_runtime.addTransformValue)(styleState.transformAccumulator, key, val);
|
|
1352
909
|
} else {
|
|
1353
910
|
var out = val;
|
|
1354
|
-
if (staticConfig.
|
|
911
|
+
if (staticConfig.isInput && key in import_nativeStyleEngine.nativeTextInputColorProps) viewProps[import_nativeStyleEngine.nativeTextInputColorProps[key]] = out;
|
|
1355
912
|
else {
|
|
1356
913
|
var _styleState2;
|
|
1357
914
|
(_styleState2 = styleState).style || (_styleState2.style = {});
|
|
@@ -1368,14 +925,14 @@ function recordStyleTokenProvenance(styleState, key, originalVal) {
|
|
|
1368
925
|
var opacity = slash === -1 ? NaN : Number(tokenName.slice(slash + 1));
|
|
1369
926
|
if (Number.isInteger(opacity) && opacity >= 0 && opacity <= 100) tokenName = tokenName.slice(0, slash);
|
|
1370
927
|
}
|
|
1371
|
-
if (tokenName !== "" && (
|
|
1372
|
-
return
|
|
928
|
+
if (tokenName !== "" && (tokenName in styleState.theme || tokenName in (((_styleState_conf_themes = styleState.conf.themes) === null || _styleState_conf_themes === void 0 ? void 0 : _styleState_conf_themes[styleState.flatThemeName || ""]) || {}) || Object.values(styleState.conf.tokensParsed).some(function(category) {
|
|
929
|
+
return tokenName in category;
|
|
1373
930
|
}))) {
|
|
1374
931
|
var _styleState;
|
|
1375
932
|
((_styleState = styleState).tokenProvenance || (_styleState.tokenProvenance = {}))[key] = originalVal;
|
|
1376
933
|
} else if (styleState.tokenProvenance && key in styleState.tokenProvenance) delete styleState.tokenProvenance[key];
|
|
1377
934
|
}
|
|
1378
|
-
var
|
|
935
|
+
var resolveStyleObject = function(styleState, styleIn) {
|
|
1379
936
|
var { conf, styleProps } = styleState;
|
|
1380
937
|
var styleOut = {};
|
|
1381
938
|
var originalValues;
|
|
@@ -1388,13 +945,10 @@ var resolveAcceptedStyle = function(styleState, styleIn) {
|
|
|
1388
945
|
style: styleOut,
|
|
1389
946
|
transformAccumulator: void 0
|
|
1390
947
|
};
|
|
1391
|
-
childState.flatUsed = void 0;
|
|
1392
|
-
childState.flatTransitions = void 0;
|
|
1393
948
|
childState.flatAtomics = void 0;
|
|
1394
|
-
childState.flatSingleEntries = void 0;
|
|
1395
949
|
childState.flatSlots = void 0;
|
|
1396
|
-
childState.
|
|
1397
|
-
var mergeAccepted = function(_state, key2, value2,
|
|
950
|
+
childState.flatPropertyLayers = void 0;
|
|
951
|
+
var mergeAccepted = function(_state, key2, value2, disableNormalize, originalValue) {
|
|
1398
952
|
styleOut[key2] = disableNormalize || styleProps.noNormalize ? value2 : (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(value2, key2);
|
|
1399
953
|
var _styleInOriginalValues_key;
|
|
1400
954
|
var trackedOriginal = (_styleInOriginalValues_key = styleInOriginalValues === null || styleInOriginalValues === void 0 ? void 0 : styleInOriginalValues[key2]) !== null && _styleInOriginalValues_key !== void 0 ? _styleInOriginalValues_key : originalValue;
|
|
@@ -1404,99 +958,63 @@ var resolveAcceptedStyle = function(styleState, styleIn) {
|
|
|
1404
958
|
var value = styleIn[key];
|
|
1405
959
|
key = conf.shorthands[key] || key;
|
|
1406
960
|
if (key in import_skipProps.skipProps || value == null) continue;
|
|
1407
|
-
contributeValue(childState, key, value
|
|
961
|
+
contributeValue(childState, key, value);
|
|
1408
962
|
}
|
|
1409
|
-
|
|
963
|
+
completeResolvedStyles(childState, mergeAccepted);
|
|
1410
964
|
if (childState.transformAccumulator) styleOut.transform = (0, import_runtime.finalizeTransformAccumulator)(childState.transformAccumulator);
|
|
1411
965
|
if (!styleProps.noNormalize) (0, import_expandStyles.fixStyles)(styleOut);
|
|
1412
966
|
if (originalValues) import_styleOriginalValues.styleOriginalValues.set(styleOut, originalValues);
|
|
1413
967
|
return styleOut;
|
|
1414
968
|
};
|
|
1415
|
-
function passDownProp(viewProps, key, val) {
|
|
1416
|
-
if (key in viewProps) delete viewProps[key];
|
|
1417
|
-
viewProps[key] = val;
|
|
1418
|
-
}
|
|
1419
969
|
var frameSequence = 0;
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
for (var index = 0; index < transitions.length; index++) if (transitions[index].property === property && transitions[index].identity === identity) {
|
|
1429
|
-
transitions[index].value = value;
|
|
1430
|
-
transitions[index].condition = condition;
|
|
1431
|
-
return;
|
|
1432
|
-
}
|
|
1433
|
-
transitions.push({
|
|
1434
|
-
property,
|
|
1435
|
-
value,
|
|
1436
|
-
condition,
|
|
1437
|
-
identity,
|
|
1438
|
-
selector: cursor ? conditionTexts[cursor + conditionSelectorOffset] || "" : "",
|
|
1439
|
-
wrappers: cursor ? conditionWrapperCopy(cursor) : void 0
|
|
1440
|
-
});
|
|
1441
|
-
return;
|
|
1442
|
-
}
|
|
1443
|
-
(0, import_directStyleCSS.streamAtomic)(state, property, value, condition, identity, cursor ? conditionTexts[cursor + conditionSelectorOffset] || "" : "", cursor ? conditionWrappers : void 0, cursor ? conditionNumbers[cursor + conditionWrapperOffset] >> 3 : 0, cursor ? conditionNumbers[cursor + conditionWrapperOffset] & 7 : 0, direct.flatWeakContribution === true, original);
|
|
1444
|
-
}
|
|
1445
|
-
function streamWriteInline(state, property, value, cursor, merge, original) {
|
|
1446
|
-
var normalize = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : false, conditionOverride = arguments.length > 7 && arguments[7] !== void 0 ? arguments[7] : -1;
|
|
1447
|
-
var _direct;
|
|
1448
|
-
var direct = state;
|
|
1449
|
-
var condition = conditionOverride !== -1 ? conditionOverride : cursor ? conditionNumbers[cursor + conditionValueOffset] : 0;
|
|
1450
|
-
var importance = condition ? Math.floor(condition / 256) + 1 : 0;
|
|
1451
|
-
var used = (_direct = direct).flatUsed || (_direct.flatUsed = {});
|
|
1452
|
-
var previous = used[property];
|
|
1453
|
-
if (previous !== void 0) {
|
|
1454
|
-
if (previous > importance) return;
|
|
1455
|
-
if (direct.flatWeakContribution === true) return;
|
|
1456
|
-
}
|
|
1457
|
-
used[property] = importance;
|
|
1458
|
-
merge(state, property, value, 1, !normalize, original);
|
|
1459
|
-
}
|
|
1460
|
-
function streamRetractInline(state, property, cursor) {
|
|
1461
|
-
var _direct;
|
|
1462
|
-
var direct = state;
|
|
1463
|
-
var condition = cursor ? conditionNumbers[cursor + conditionValueOffset] : 0;
|
|
1464
|
-
var importance = condition ? Math.floor(condition / 256) + 1 : 0;
|
|
1465
|
-
var used = (_direct = direct).flatUsed || (_direct.flatUsed = {});
|
|
1466
|
-
var previous = used[property];
|
|
1467
|
-
if (previous !== void 0 && previous > importance) return;
|
|
1468
|
-
used[property] = importance;
|
|
1469
|
-
if (state.style) delete state.style[property];
|
|
1470
|
-
}
|
|
1471
|
-
function convertDeferredInline(state, merge) {
|
|
970
|
+
var recordInline = 1;
|
|
971
|
+
var recordNormalize = 2;
|
|
972
|
+
var recordRetract = 4;
|
|
973
|
+
var recordDefault = 8;
|
|
974
|
+
var recordCSS = 16;
|
|
975
|
+
function writeStyleRecord(state, property, value, cursor, original, flags) {
|
|
976
|
+
var conditionOverride = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : -1;
|
|
977
|
+
var _state_flatPass;
|
|
1472
978
|
var _direct;
|
|
1473
|
-
var
|
|
1474
|
-
var
|
|
1475
|
-
var
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
979
|
+
var condition = conditionOverride !== -1 ? conditionOverride : cursor ? cursor[conditionValue] : 0;
|
|
980
|
+
var identity = cursor ? cursor[conditionKey] : "";
|
|
981
|
+
var slots = (_direct = state).flatSlots || (_direct.flatSlots = /* @__PURE__ */ new Map());
|
|
982
|
+
var slot = property.startsWith("transition") ? "transition" : property;
|
|
983
|
+
var list = slots.get(slot);
|
|
984
|
+
if (!list) slots.set(slot, list = []);
|
|
985
|
+
for (var index = 0; index < list.length; index++) {
|
|
986
|
+
var entry = list[index];
|
|
987
|
+
var entryFlags = entry[7];
|
|
988
|
+
if ((entryFlags & (recordInline | recordCSS)) !== (flags & (recordInline | recordCSS))) continue;
|
|
989
|
+
if (entry[0] !== property) continue;
|
|
990
|
+
if (flags & recordDefault) {
|
|
991
|
+
if (!(entryFlags & recordDefault) && (!entry[2] || entry[3] === identity)) return;
|
|
992
|
+
} else if (entryFlags & recordDefault && (!condition || entry[3] === identity)) {
|
|
993
|
+
list.splice(index--, 1);
|
|
994
|
+
continue;
|
|
995
|
+
}
|
|
996
|
+
if (entry[3] === identity) {
|
|
997
|
+
list.splice(index, 1);
|
|
998
|
+
break;
|
|
1485
999
|
}
|
|
1486
|
-
};
|
|
1487
|
-
var slots = direct.flatSlots;
|
|
1488
|
-
if (slots) {
|
|
1489
|
-
direct.flatSlots = void 0;
|
|
1490
|
-
for (var property in slots) consume(slots[property]);
|
|
1491
|
-
}
|
|
1492
|
-
var transitions = direct.flatTransitions;
|
|
1493
|
-
if (transitions) {
|
|
1494
|
-
direct.flatTransitions = void 0;
|
|
1495
|
-
consume(transitions);
|
|
1496
1000
|
}
|
|
1497
|
-
|
|
1001
|
+
list.push([
|
|
1002
|
+
property,
|
|
1003
|
+
value,
|
|
1004
|
+
condition,
|
|
1005
|
+
identity,
|
|
1006
|
+
cursor ? cursor[conditionSelector] : "",
|
|
1007
|
+
cursor ? cursor[conditionWrappers] : void 0,
|
|
1008
|
+
original,
|
|
1009
|
+
flags | (((_state_flatPass = state.flatPass) === null || _state_flatPass === void 0 ? void 0 : _state_flatPass[passSourceLayer]) || 0) << 5
|
|
1010
|
+
]);
|
|
1011
|
+
}
|
|
1012
|
+
function streamWriteInline(state, property, value, cursor, original) {
|
|
1013
|
+
var normalize = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : property === "lineHeight", conditionOverride = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : -1, force = arguments.length > 7 && arguments[7] !== void 0 ? arguments[7] : false;
|
|
1014
|
+
writeStyleRecord(state, property, value, cursor, original, (normalize ? recordNormalize : 0) | (force ? recordInline : 0), conditionOverride);
|
|
1498
1015
|
}
|
|
1499
|
-
function
|
|
1016
|
+
function completeResolvedStyles(state) {
|
|
1017
|
+
var merge = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : mergeStyle;
|
|
1500
1018
|
var direct = state;
|
|
1501
1019
|
var shadow = direct.flatWebShadow;
|
|
1502
1020
|
if (shadow && (direct.flatBoxShadowSequence || 0) <= shadow[4]) {
|
|
@@ -1508,291 +1026,116 @@ function completeStreaming(state, merge) {
|
|
|
1508
1026
|
var color = (0, import_normalizeColor.normalizeColor)(shadow[0], (_shadow_ = shadow[2]) !== null && _shadow_ !== void 0 ? _shadow_ : 1);
|
|
1509
1027
|
if (color) {
|
|
1510
1028
|
var next = `${shadowUnit(offset.width)} ${shadowUnit(offset.height)} ${shadowUnit(shadow[3])} ${color}`;
|
|
1511
|
-
emitProperty(state, "boxShadow", direct.flatBoxShadow ? `${direct.flatBoxShadow}, ${next}` : next, null,
|
|
1029
|
+
emitProperty(state, "boxShadow", direct.flatBoxShadow ? `${direct.flatBoxShadow}, ${next}` : next, null, shadow[5], shadow[6]);
|
|
1512
1030
|
}
|
|
1031
|
+
direct.flatWebShadow = void 0;
|
|
1513
1032
|
}
|
|
1514
|
-
(
|
|
1033
|
+
if (state.flatShouldDoClasses && state.transformAccumulator) {
|
|
1034
|
+
var transform = (0, import_runtime.finalizeTransformAccumulator)(state.transformAccumulator);
|
|
1035
|
+
state.transformAccumulator = void 0;
|
|
1036
|
+
writeStyleRecord(state, "transform", Array.isArray(transform) ? (0, import_transformsToString.transformsToString)(transform) : transform, null, transform, 0);
|
|
1037
|
+
}
|
|
1038
|
+
var slots = direct.flatSlots;
|
|
1039
|
+
if (!slots) return;
|
|
1040
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
1041
|
+
try {
|
|
1042
|
+
for (var _iterator = slots[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
1043
|
+
var [property, entries] = _step.value;
|
|
1044
|
+
var cssEntries = void 0;
|
|
1045
|
+
var inlineWinner = void 0;
|
|
1046
|
+
var importance = -1;
|
|
1047
|
+
for (var index = 0; index < entries.length; index++) {
|
|
1048
|
+
var entry = entries[index];
|
|
1049
|
+
var flags = entry[7];
|
|
1050
|
+
if (flags & recordCSS || state.flatShouldDoClasses && !(flags & recordInline)) {
|
|
1051
|
+
cssEntries || (cssEntries = []);
|
|
1052
|
+
var precedence = entry[2] ? Math.floor(entry[2] / 256) : -1;
|
|
1053
|
+
var layer = flags >> 5;
|
|
1054
|
+
var index1 = cssEntries.length;
|
|
1055
|
+
while (index1 > 0) {
|
|
1056
|
+
var before = cssEntries[index1 - 1];
|
|
1057
|
+
var beforeLayer = before[7] >> 5;
|
|
1058
|
+
if (beforeLayer < layer || beforeLayer === layer && (before[2] ? Math.floor(before[2] / 256) : -1) <= precedence) break;
|
|
1059
|
+
index1--;
|
|
1060
|
+
}
|
|
1061
|
+
if (index1 === cssEntries.length) cssEntries.push(entry);
|
|
1062
|
+
else cssEntries.splice(index1, 0, entry);
|
|
1063
|
+
} else if (!entry[2] || entry[2] & 1) {
|
|
1064
|
+
var next1 = entry[2] ? Math.floor(entry[2] / 256) : 0;
|
|
1065
|
+
if (next1 >= importance) {
|
|
1066
|
+
importance = next1;
|
|
1067
|
+
inlineWinner = entry;
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
if (cssEntries) (0, import_getCSSStylesAtomic.registerAtomicSlot)(direct, property, cssEntries);
|
|
1072
|
+
if (inlineWinner) if (inlineWinner[7] & recordRetract) {
|
|
1073
|
+
if (state.style) delete state.style[inlineWinner[0]];
|
|
1074
|
+
} else merge(state, inlineWinner[0], inlineWinner[1], !(inlineWinner[7] & recordNormalize), inlineWinner[6] !== void 0 ? inlineWinner[6] : inlineWinner[1]);
|
|
1075
|
+
}
|
|
1076
|
+
} catch (err) {
|
|
1077
|
+
_didIteratorError = true;
|
|
1078
|
+
_iteratorError = err;
|
|
1079
|
+
} finally {
|
|
1080
|
+
try {
|
|
1081
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
|
|
1082
|
+
} finally {
|
|
1083
|
+
if (_didIteratorError) throw _iteratorError;
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
1086
|
+
direct.flatSlots = void 0;
|
|
1515
1087
|
}
|
|
1516
|
-
function emitAtParentCondition(state, property, value,
|
|
1088
|
+
function emitAtParentCondition(state, property, value, originalValue, contextOnly) {
|
|
1517
1089
|
var _state_flatPass;
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1090
|
+
var cursor = (_state_flatPass = state.flatPass) === null || _state_flatPass === void 0 ? void 0 : _state_flatPass[passParentCursor];
|
|
1091
|
+
if (cursor) emitUnderCondition(state, property, value, cursor, originalValue, contextOnly, 0, value);
|
|
1092
|
+
else emitValue(state, property, value, null, originalValue, contextOnly);
|
|
1093
|
+
}
|
|
1094
|
+
function emitUnderCondition(state, property, value, cursor, originalValue, contextOnly, warnMode, warnSource) {
|
|
1095
|
+
var condition = cursor[conditionValue];
|
|
1096
|
+
if (!(condition & conditionResolvedFlag)) {
|
|
1097
|
+
if (warnMode && process.env.NODE_ENV !== "production") (0, import_warnOnce.warnRefusedValue)(property, warnSource, `unknown modifier "${cursor.problem}"`);
|
|
1525
1098
|
return 0;
|
|
1526
1099
|
}
|
|
1527
|
-
|
|
1528
|
-
if (
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
var flags = conditionNumbers[cursor + conditionFlagsOffset];
|
|
1532
|
-
if (flags & conditionEnterFlag) state.flatHasEnterStyle = true;
|
|
1533
|
-
if (flags & conditionPlatformPseudoFlag) state.flatHasPlatformPseudo = true;
|
|
1534
|
-
} else if (merge && property && condition & 2) {
|
|
1535
|
-
var flags1 = conditionNumbers[cursor + conditionFlagsOffset];
|
|
1536
|
-
if (flags1 & conditionEnterFlag) state.flatHasEnterStyle = true;
|
|
1537
|
-
if (flags1 & conditionPlatformPseudoFlag) state.flatHasPlatformPseudo = true;
|
|
1100
|
+
emitValue(state, property, value, cursor, warnMode === 2 ? originalValue : originalValue !== null && originalValue !== void 0 ? originalValue : value, contextOnly);
|
|
1101
|
+
if (condition & 2) {
|
|
1102
|
+
if (condition & 4) state.flatHasEnterStyle = true;
|
|
1103
|
+
if (condition & conditionPlatformPseudoFlag) state.flatHasPlatformPseudo = true;
|
|
1538
1104
|
}
|
|
1539
1105
|
return condition;
|
|
1540
1106
|
}
|
|
1541
|
-
var
|
|
1542
|
-
|
|
1543
|
-
var _directState_flatPass;
|
|
1544
|
-
if (isBase) {
|
|
1545
|
-
if (start === end) return;
|
|
1546
|
-
feedCompoundSegment(state, source, start, end, true, valid || failure === "invalid-character" || failure === "stray-comment-close", "");
|
|
1547
|
-
if (!valid) {
|
|
1548
|
-
if (failure === "invalid-character" || failure === "stray-comment-close") return 16;
|
|
1549
|
-
if (process.env.NODE_ENV === "development") (0, import_warnOnce.warnRefusedValue)(property, source, failure === "unterminated-string" ? "an unterminated string" : failure === "unterminated-comment" ? "an unterminated \"/*\" comment" : "an unterminated \"(\"");
|
|
1550
|
-
return;
|
|
1551
|
-
}
|
|
1552
|
-
var value = source.slice(start, end);
|
|
1553
|
-
emitAtParentCondition(state, property, value, merge, value, contextOnly);
|
|
1554
|
-
return 5;
|
|
1555
|
-
}
|
|
1556
|
-
if (!chainValid) {
|
|
1557
|
-
if (process.env.NODE_ENV === "development") (0, import_warnOnce.warnRefusedValue)(property, source, failure === "invalid-character" ? `"${source[failureIndex]}" would end the declaration or rule` : failure === "unterminated-string" ? "an unterminated string" : failure === "unterminated-comment" ? "an unterminated \"/*\" comment" : failure === "stray-comment-close" ? "a stray \"*/\"" : "an unterminated \"(\"");
|
|
1558
|
-
return;
|
|
1559
|
-
}
|
|
1560
|
-
if (start === end) {
|
|
1561
|
-
if (process.env.NODE_ENV === "development") (0, import_warnOnce.warnRefusedValue)(property, source, "a conditional clause has no value");
|
|
1562
|
-
return;
|
|
1563
|
-
}
|
|
1564
|
-
if (property === "aspectRatio" && chainCount === 1) {
|
|
1565
|
-
var left = Number(source.slice(chainStart, chainEnd));
|
|
1566
|
-
var right = Number(source.slice(start, end));
|
|
1567
|
-
if (chainStart < chainEnd && Number.isFinite(left) && left > 0 && Number.isFinite(right) && right > 0) return 12;
|
|
1568
|
-
}
|
|
1569
|
-
var directState = state;
|
|
1570
|
-
var cursor = directState.flatScanCursor;
|
|
1571
|
-
var condition = valid ? emitUnderCondition(state, property, source.slice(start, end), cursor, merge, void 0, contextOnly, 1, source) : conditionNumbers[cursor + conditionFlagsOffset] & conditionResolvedFlag ? conditionNumbers[cursor + conditionValueOffset] : 0;
|
|
1572
|
-
feedCompoundSegment(directState, source, start, end, false, valid && Boolean(condition), condition && ((_directState_flatPass = directState.flatPass) === null || _directState_flatPass === void 0 ? void 0 : _directState_flatPass[passCompoundIndexes]) ? conditionTexts[cursor + conditionKeyOffset] || "" : "");
|
|
1573
|
-
if (!condition) return;
|
|
1574
|
-
if (!valid) {
|
|
1575
|
-
if (process.env.NODE_ENV === "development") (0, import_warnOnce.warnRefusedValue)(property, source, failure === "invalid-character" ? `"${source[failureIndex]}" would end the declaration or rule` : failure === "unterminated-string" ? "an unterminated string" : failure === "unterminated-comment" ? "an unterminated \"/*\" comment" : failure === "stray-comment-close" ? "a stray \"*/\"" : "an unterminated \"(\"");
|
|
1576
|
-
return;
|
|
1577
|
-
}
|
|
1578
|
-
return 4 | (condition & 12 ? 2 : 0);
|
|
1579
|
-
},
|
|
1580
|
-
modifier(state, start, end, valid, first, source) {
|
|
1581
|
-
var directState = state;
|
|
1582
|
-
var cursor = directState.flatScanCursor;
|
|
1583
|
-
if (!cursor) {
|
|
1584
|
-
var _directState_flatPass;
|
|
1585
|
-
cursor = directState.flatScanCursor = acquireConditionCursor(((_directState_flatPass = directState.flatPass) === null || _directState_flatPass === void 0 ? void 0 : _directState_flatPass[passParentCursor]) || null);
|
|
1586
|
-
} else if (first) {
|
|
1587
|
-
var _directState_flatPass1;
|
|
1588
|
-
resetConditionCursor(cursor, ((_directState_flatPass1 = directState.flatPass) === null || _directState_flatPass1 === void 0 ? void 0 : _directState_flatPass1[passParentCursor]) || null);
|
|
1589
|
-
}
|
|
1590
|
-
if (!valid) {
|
|
1591
|
-
setConditionUnresolved(cursor);
|
|
1592
|
-
return;
|
|
1593
|
-
}
|
|
1594
|
-
if (conditionNumbers[cursor + conditionFlagsOffset] & conditionResolvedFlag) resolveConditionModifier(state, cursor, source.slice(start, end));
|
|
1595
|
-
},
|
|
1596
|
-
chain(state, _start, _end, valid) {
|
|
1597
|
-
var cursor = state.flatScanCursor;
|
|
1598
|
-
if (cursor) {
|
|
1599
|
-
if (!valid) setConditionUnresolved(cursor);
|
|
1600
|
-
if (conditionNumbers[cursor + conditionFlagsOffset] & conditionResolvedFlag) commitConditionCursor(state, cursor);
|
|
1601
|
-
}
|
|
1602
|
-
return true;
|
|
1603
|
-
},
|
|
1604
|
-
end(state, source, result, lastPayloadStart, chainCount, property, merge, originalValue, contextOnly, failure, failureIndex) {
|
|
1605
|
-
var hasBase = !!(result & 1);
|
|
1606
|
-
if (result & 16) {
|
|
1607
|
-
if (chainCount === 0) {
|
|
1608
|
-
emitAtParentCondition(state, property, source, merge, originalValue !== null && originalValue !== void 0 ? originalValue : source, contextOnly);
|
|
1609
|
-
hasBase = true;
|
|
1610
|
-
} else if (process.env.NODE_ENV === "development") (0, import_warnOnce.warnRefusedValue)(property, source, failure === "invalid-character" ? `"${source[failureIndex]}" would end the declaration or rule` : failure === "unterminated-string" ? "an unterminated string" : failure === "unterminated-comment" ? "an unterminated \"/*\" comment" : failure === "stray-comment-close" ? "a stray \"*/\"" : "an unterminated \"(\"");
|
|
1611
|
-
}
|
|
1612
|
-
if (result & 8 && chainCount === 1) {
|
|
1613
|
-
emitAtParentCondition(state, property, source, merge, originalValue !== null && originalValue !== void 0 ? originalValue : source, contextOnly);
|
|
1614
|
-
hasBase = true;
|
|
1615
|
-
}
|
|
1616
|
-
if (process.env.NODE_ENV === "development" && !hasBase && result & 4 && (property in import_helpers.tokenCategories.color || property in import_tokenCategories.tokenCategoryByProperty) && splitComponents(source.slice(lastPayloadStart)).length > 1) (0, import_warnOnce.warnOnce)(`${property}="${source}" has multiple values after its first conditional. Write the base value before the first conditional.`);
|
|
1617
|
-
if ((!import_directStyleCSS.canGenerateCSS || !state.flatShouldDoClasses) && result & 2 && !hasBase) {
|
|
1618
|
-
var value = implicitLifecycleBase(property);
|
|
1619
|
-
if (value !== null) emitAtParentCondition(state, property, value, merge, value, contextOnly);
|
|
1620
|
-
}
|
|
1621
|
-
}
|
|
1107
|
+
var formatScanFailure = function(failure, source, failureIndex) {
|
|
1108
|
+
return failure === "invalid-character" ? `"${source[failureIndex]}" would end the declaration or rule` : failure === "unterminated-string" ? "an unterminated string" : failure === "unterminated-comment" ? "an unterminated \"/*\" comment" : failure === "stray-comment-close" ? "a stray \"*/\"" : "an unterminated \"(\"";
|
|
1622
1109
|
};
|
|
1623
|
-
function
|
|
1624
|
-
|
|
1625
|
-
}
|
|
1626
|
-
var legacyTransformParts = /* @__PURE__ */ new Set([
|
|
1627
|
-
"matrix",
|
|
1628
|
-
"perspective",
|
|
1629
|
-
"rotateX",
|
|
1630
|
-
"rotateY",
|
|
1631
|
-
"rotateZ",
|
|
1632
|
-
"scaleZ",
|
|
1633
|
-
"skewX",
|
|
1634
|
-
"skewY"
|
|
1635
|
-
]);
|
|
1636
|
-
var webShadowParts = {
|
|
1637
|
-
shadowColor: 1,
|
|
1638
|
-
shadowOffset: 2,
|
|
1639
|
-
shadowOpacity: 3,
|
|
1640
|
-
shadowRadius: 4
|
|
1110
|
+
var warnScanFailure = function(property, source, failure, failureIndex) {
|
|
1111
|
+
if (process.env.NODE_ENV === "development") (0, import_warnOnce.warnRefusedValue)(property, source, formatScanFailure(failure, source, failureIndex));
|
|
1641
1112
|
};
|
|
1642
|
-
var webTextShadowParts = /* @__PURE__ */ new Set([
|
|
1643
|
-
"textShadowColor",
|
|
1644
|
-
"textShadowOffset",
|
|
1645
|
-
"textShadowRadius"
|
|
1646
|
-
]);
|
|
1647
|
-
var lineStyles = /* @__PURE__ */ new Set([
|
|
1648
|
-
"none",
|
|
1649
|
-
"hidden",
|
|
1650
|
-
"dotted",
|
|
1651
|
-
"dashed",
|
|
1652
|
-
"solid",
|
|
1653
|
-
"double",
|
|
1654
|
-
"groove",
|
|
1655
|
-
"ridge",
|
|
1656
|
-
"inset",
|
|
1657
|
-
"outset"
|
|
1658
|
-
]);
|
|
1659
1113
|
var borderTargets = {
|
|
1660
|
-
border:
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
color: [
|
|
1674
|
-
"borderTopColor",
|
|
1675
|
-
"borderRightColor",
|
|
1676
|
-
"borderBottomColor",
|
|
1677
|
-
"borderLeftColor"
|
|
1678
|
-
]
|
|
1679
|
-
},
|
|
1680
|
-
borderTop: {
|
|
1681
|
-
width: ["borderTopWidth"],
|
|
1682
|
-
style: ["borderTopStyle"],
|
|
1683
|
-
color: ["borderTopColor"]
|
|
1684
|
-
},
|
|
1685
|
-
borderRight: {
|
|
1686
|
-
width: ["borderRightWidth"],
|
|
1687
|
-
style: ["borderRightStyle"],
|
|
1688
|
-
color: ["borderRightColor"]
|
|
1689
|
-
},
|
|
1690
|
-
borderBottom: {
|
|
1691
|
-
width: ["borderBottomWidth"],
|
|
1692
|
-
style: ["borderBottomStyle"],
|
|
1693
|
-
color: ["borderBottomColor"]
|
|
1694
|
-
},
|
|
1695
|
-
borderLeft: {
|
|
1696
|
-
width: ["borderLeftWidth"],
|
|
1697
|
-
style: ["borderLeftStyle"],
|
|
1698
|
-
color: ["borderLeftColor"]
|
|
1699
|
-
},
|
|
1700
|
-
outline: {
|
|
1701
|
-
width: ["outlineWidth"],
|
|
1702
|
-
style: ["outlineStyle"],
|
|
1703
|
-
color: ["outlineColor"]
|
|
1704
|
-
},
|
|
1705
|
-
borderBlock: {
|
|
1706
|
-
width: ["borderBlockStartWidth", "borderBlockEndWidth"],
|
|
1707
|
-
style: ["borderBlockStartStyle", "borderBlockEndStyle"],
|
|
1708
|
-
color: ["borderBlockStartColor", "borderBlockEndColor"]
|
|
1709
|
-
},
|
|
1710
|
-
borderInline: {
|
|
1711
|
-
width: ["borderInlineStartWidth", "borderInlineEndWidth"],
|
|
1712
|
-
style: ["borderInlineStartStyle", "borderInlineEndStyle"],
|
|
1713
|
-
color: ["borderInlineStartColor", "borderInlineEndColor"]
|
|
1714
|
-
}
|
|
1715
|
-
};
|
|
1716
|
-
var tokenLookup = {
|
|
1717
|
-
value: void 0,
|
|
1718
|
-
fromTheme: false,
|
|
1719
|
-
themeKey: ""
|
|
1114
|
+
border: [
|
|
1115
|
+
"Top",
|
|
1116
|
+
"Right",
|
|
1117
|
+
"Bottom",
|
|
1118
|
+
"Left"
|
|
1119
|
+
],
|
|
1120
|
+
borderTop: ["Top"],
|
|
1121
|
+
borderRight: ["Right"],
|
|
1122
|
+
borderBottom: ["Bottom"],
|
|
1123
|
+
borderLeft: ["Left"],
|
|
1124
|
+
outline: [""],
|
|
1125
|
+
borderBlock: ["BlockStart", "BlockEnd"],
|
|
1126
|
+
borderInline: ["InlineStart", "InlineEnd"]
|
|
1720
1127
|
};
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
var _state_theme, _state_conf_themes_, _state_conf_themes, _state_conf_tokensParsed_space, _state_conf_tokensParsed_color;
|
|
1729
|
-
var lookupName = name.charCodeAt(0) === 36 ? name.slice(1) : name;
|
|
1730
|
-
if (property === "fontFamily") {
|
|
1731
|
-
var _state_conf_fontsParsed_lookupName;
|
|
1732
|
-
var family = (_state_conf_fontsParsed_lookupName = state.conf.fontsParsed[lookupName]) === null || _state_conf_fontsParsed_lookupName === void 0 ? void 0 : _state_conf_fontsParsed_lookupName.family;
|
|
1733
|
-
return family ? fillTokenLookup(family, false, lookupName) : void 0;
|
|
1734
|
-
}
|
|
1735
|
-
var fontKey = property === "fontSize" ? "size" : property === "fontWeight" ? "weight" : property === "lineHeight" || property === "letterSpacing" ? property : void 0;
|
|
1736
|
-
if (fontKey) {
|
|
1737
|
-
var _font_fontKey;
|
|
1738
|
-
var font = state.conf.fontsParsed[state.fontFamily || state.conf.defaultFontToken] || state.conf.fontsParsed[state.conf.defaultFontToken];
|
|
1739
|
-
var value = font === null || font === void 0 ? void 0 : (_font_fontKey = font[fontKey]) === null || _font_fontKey === void 0 ? void 0 : _font_fontKey[lookupName];
|
|
1740
|
-
return value ? fillTokenLookup(value, false, lookupName) : void 0;
|
|
1741
|
-
}
|
|
1742
|
-
var category = (0, import_tokenCategories.getTokenCategoryForProperty)(property);
|
|
1743
|
-
var dot = lookupName.indexOf(".");
|
|
1744
|
-
if (dot !== -1) {
|
|
1745
|
-
var prefix = lookupName.slice(0, dot);
|
|
1746
|
-
if (!category || prefix === category || prefix === "color") lookupName = lookupName.slice(dot + 1);
|
|
1747
|
-
}
|
|
1748
|
-
if (category) {
|
|
1749
|
-
var _state_conf_tokensParsed_category;
|
|
1750
|
-
var own = (_state_conf_tokensParsed_category = state.conf.tokensParsed[category]) === null || _state_conf_tokensParsed_category === void 0 ? void 0 : _state_conf_tokensParsed_category[lookupName];
|
|
1751
|
-
if (own) return fillTokenLookup(own, false, lookupName);
|
|
1752
|
-
for (var _i = 0, _iter = [
|
|
1753
|
-
"color",
|
|
1754
|
-
"space",
|
|
1755
|
-
"size",
|
|
1756
|
-
"radius",
|
|
1757
|
-
"zIndex"
|
|
1758
|
-
]; _i < _iter.length; _i++) {
|
|
1759
|
-
var sibling = _iter[_i];
|
|
1760
|
-
var _state_conf_tokensParsed_sibling;
|
|
1761
|
-
if (sibling !== category && ((_state_conf_tokensParsed_sibling = state.conf.tokensParsed[sibling]) === null || _state_conf_tokensParsed_sibling === void 0 ? void 0 : _state_conf_tokensParsed_sibling[lookupName])) return;
|
|
1762
|
-
}
|
|
1763
|
-
} else {
|
|
1764
|
-
var first = lookupName.charCodeAt(0);
|
|
1765
|
-
if (first >= 48 && first <= 57 || first === 43 || first === 45 || first === 46) return;
|
|
1766
|
-
}
|
|
1767
|
-
var theme = ((_state_theme = state.theme) === null || _state_theme === void 0 ? void 0 : _state_theme[lookupName]) || ((_state_conf_themes = state.conf.themes) === null || _state_conf_themes === void 0 ? void 0 : (_state_conf_themes_ = _state_conf_themes[state.flatThemeName || ""]) === null || _state_conf_themes_ === void 0 ? void 0 : _state_conf_themes_[lookupName]);
|
|
1768
|
-
if (theme) return fillTokenLookup(theme, true, lookupName);
|
|
1769
|
-
if (category) return;
|
|
1770
|
-
var token = ((_state_conf_tokensParsed_space = state.conf.tokensParsed.space) === null || _state_conf_tokensParsed_space === void 0 ? void 0 : _state_conf_tokensParsed_space[lookupName]) || ((_state_conf_tokensParsed_color = state.conf.tokensParsed.color) === null || _state_conf_tokensParsed_color === void 0 ? void 0 : _state_conf_tokensParsed_color[lookupName]);
|
|
1771
|
-
return token ? fillTokenLookup(token, false, lookupName) : void 0;
|
|
1772
|
-
}
|
|
1773
|
-
var literalMissConf = null;
|
|
1774
|
-
var literalMissRevision = -1;
|
|
1775
|
-
var literalMisses = /* @__PURE__ */ new WeakMap();
|
|
1776
|
-
var literalMissRootTheme = {};
|
|
1777
|
-
function isFontKeyedProperty(property) {
|
|
1778
|
-
return property === "fontFamily" || property === "fontSize" || property === "fontWeight" || property === "lineHeight" || property === "letterSpacing";
|
|
1779
|
-
}
|
|
1780
|
-
function literalMissSet(state) {
|
|
1781
|
-
var revision = (0, import_grammarConfig.getConfigRevisionState)(state.conf).revision;
|
|
1782
|
-
if (state.conf !== literalMissConf || revision !== literalMissRevision) {
|
|
1783
|
-
literalMissConf = state.conf;
|
|
1784
|
-
literalMissRevision = revision;
|
|
1785
|
-
literalMisses = /* @__PURE__ */ new WeakMap();
|
|
1786
|
-
}
|
|
1787
|
-
var themeKey = state.theme && _type_of(state.theme) === "object" ? state.theme : literalMissRootTheme;
|
|
1788
|
-
var set = literalMisses.get(themeKey);
|
|
1789
|
-
if (!set) {
|
|
1790
|
-
set = /* @__PURE__ */ new Set();
|
|
1791
|
-
literalMisses.set(themeKey, set);
|
|
1792
|
-
}
|
|
1793
|
-
return set;
|
|
1794
|
-
}
|
|
1128
|
+
var valueCacheConf;
|
|
1129
|
+
var valueCacheRevision = -1;
|
|
1130
|
+
var valueCaches = /* @__PURE__ */ new WeakMap();
|
|
1131
|
+
var valueCacheEntries = 0;
|
|
1132
|
+
var valueCacheRoot = {};
|
|
1133
|
+
var parsedSlices = /* @__PURE__ */ new WeakMap();
|
|
1134
|
+
var fontProperties = /* @__PURE__ */ new Map();
|
|
1795
1135
|
function configuredValue(state, property, raw) {
|
|
1136
|
+
var embedded = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false;
|
|
1137
|
+
var _maps;
|
|
1138
|
+
var grammar = (0, import_grammarConfig.getConfigRevisionState)(state.conf);
|
|
1796
1139
|
var name = raw;
|
|
1797
1140
|
var opacity;
|
|
1798
1141
|
var slash = raw.lastIndexOf("/");
|
|
@@ -1803,227 +1146,183 @@ function configuredValue(state, property, raw) {
|
|
|
1803
1146
|
opacity = amount;
|
|
1804
1147
|
}
|
|
1805
1148
|
}
|
|
1806
|
-
var safeArea =
|
|
1149
|
+
var safeArea = grammar.safeAreaVariable(name);
|
|
1807
1150
|
if (safeArea !== void 0) {
|
|
1808
1151
|
state.flatUsesSafeArea = true;
|
|
1809
1152
|
return safeArea;
|
|
1810
1153
|
}
|
|
1811
|
-
var
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
if (process.env.NODE_ENV === "development" && import_tokenCategories.tokenCategoryByProperty[property] && ((_state_conf_tokensParsed_color = state.conf.tokensParsed.color) === null || _state_conf_tokensParsed_color === void 0 ? void 0 : _state_conf_tokensParsed_color[name])) (0, import_warnOnce.warnOnce)(`"${name}" contributes to "color", not "${property}"; keeping it literal`);
|
|
1824
|
-
return raw;
|
|
1154
|
+
var fontProperty = fontProperties.get(property);
|
|
1155
|
+
if (fontProperty === void 0) {
|
|
1156
|
+
fontProperty = property.startsWith("font") || property === "lineHeight" || property === "letterSpacing";
|
|
1157
|
+
fontProperties.set(property, fontProperty);
|
|
1158
|
+
}
|
|
1159
|
+
var revision = grammar.revision;
|
|
1160
|
+
if (state.conf !== valueCacheConf || revision !== valueCacheRevision) {
|
|
1161
|
+
valueCacheConf = state.conf;
|
|
1162
|
+
valueCacheRevision = revision;
|
|
1163
|
+
valueCaches = /* @__PURE__ */ new WeakMap();
|
|
1164
|
+
valueCacheEntries = 0;
|
|
1165
|
+
state.flatValueScope = void 0;
|
|
1825
1166
|
}
|
|
1826
1167
|
var resolveValues = state.styleProps.resolveValues;
|
|
1827
|
-
|
|
1828
|
-
var
|
|
1829
|
-
if (
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
continue;
|
|
1846
|
-
}
|
|
1847
|
-
if (!(code === 36 || code === 95 || code >= 65 && code <= 90 || code >= 97 && code <= 122)) continue;
|
|
1848
|
-
var end = index + 1;
|
|
1849
|
-
while (end < raw.length) {
|
|
1850
|
-
var next = raw.charCodeAt(end);
|
|
1851
|
-
if (next === 36 || next === 45 || next === 46 || next === 95 || next >= 48 && next <= 57 || next >= 65 && next <= 90 || next >= 97 && next <= 122) end++;
|
|
1852
|
-
else break;
|
|
1853
|
-
}
|
|
1854
|
-
if (raw.charCodeAt(end) === 47) {
|
|
1855
|
-
var suffix = end + 1;
|
|
1856
|
-
while (suffix < raw.length) {
|
|
1857
|
-
var next1 = raw.charCodeAt(suffix);
|
|
1858
|
-
if (next1 < 48 || next1 > 57) break;
|
|
1859
|
-
suffix++;
|
|
1860
|
-
}
|
|
1861
|
-
if (suffix > end + 1) end = suffix;
|
|
1862
|
-
}
|
|
1863
|
-
var before = raw.charCodeAt(index - 1);
|
|
1864
|
-
if (code !== 36 && (before >= 48 && before <= 57 || before === 35 || before === 45 && raw.charCodeAt(index - 2) === 45 || raw.charCodeAt(end) === 40)) {
|
|
1865
|
-
index = end - 1;
|
|
1866
|
-
continue;
|
|
1867
|
-
}
|
|
1868
|
-
var word = raw.slice(index, end);
|
|
1869
|
-
var value = configuredValue(state, property, word);
|
|
1870
|
-
if (value !== word) {
|
|
1871
|
-
out += raw.slice(copyFrom, index);
|
|
1872
|
-
out += String(value);
|
|
1873
|
-
copyFrom = end;
|
|
1874
|
-
}
|
|
1875
|
-
index = end - 1;
|
|
1168
|
+
var direct = state;
|
|
1169
|
+
var scope = direct.flatValueScope;
|
|
1170
|
+
if (scope === void 0 || direct.flatValueScopeKind !== resolveValues) {
|
|
1171
|
+
var themeObject = state.theme && _type_of(state.theme) === "object" ? state.theme : valueCacheRoot;
|
|
1172
|
+
var byScope = valueCaches.get(themeObject);
|
|
1173
|
+
if (!byScope) valueCaches.set(themeObject, byScope = /* @__PURE__ */ new Map());
|
|
1174
|
+
var scopeKey = `${state.flatThemeName || ""}${resolveValues}`;
|
|
1175
|
+
scope = byScope.get(scopeKey);
|
|
1176
|
+
if (!scope) byScope.set(scopeKey, scope = /* @__PURE__ */ new Map());
|
|
1177
|
+
direct.flatValueScope = scope;
|
|
1178
|
+
direct.flatValueScopeKind = resolveValues;
|
|
1179
|
+
}
|
|
1180
|
+
var maps = scope.get(property);
|
|
1181
|
+
if (maps === void 0) scope.set(property, maps = { direct: /* @__PURE__ */ new Map() });
|
|
1182
|
+
var byRaw = embedded ? (_maps = maps).embedded || (_maps.embedded = /* @__PURE__ */ new Map()) : maps.direct;
|
|
1183
|
+
if (!fontProperty) {
|
|
1184
|
+
var known = byRaw.get(raw);
|
|
1185
|
+
if (known !== void 0 || byRaw.has(raw)) return known;
|
|
1876
1186
|
}
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
depth++;
|
|
1897
|
-
continue;
|
|
1898
|
-
}
|
|
1899
|
-
if (code === 41) {
|
|
1900
|
-
depth--;
|
|
1901
|
-
continue;
|
|
1902
|
-
}
|
|
1903
|
-
if (depth || !(code >= 65 && code <= 90 || code >= 97 && code <= 122 || code === 95) || index > 1 && raw.charCodeAt(index - 1) === 45 && raw.charCodeAt(index - 2) === 45) continue;
|
|
1904
|
-
var end = index + 1;
|
|
1905
|
-
while (end < raw.length) {
|
|
1906
|
-
var next = raw.charCodeAt(end);
|
|
1907
|
-
if (next >= 48 && next <= 57 || next >= 65 && next <= 90 || next >= 97 && next <= 122 || next === 45 || next === 95) end++;
|
|
1908
|
-
else break;
|
|
1909
|
-
}
|
|
1910
|
-
if (raw.charCodeAt(end) !== 40) {
|
|
1911
|
-
var authored = raw.slice(index, end);
|
|
1912
|
-
var property = state.conf.shorthands[authored] || authored;
|
|
1913
|
-
if (property === "x" || property === "y") property = "translate";
|
|
1914
|
-
else if (property === "scaleX" || property === "scaleY") property = "scale";
|
|
1915
|
-
else if (legacyTransformParts.has(property)) property = "transform";
|
|
1916
|
-
var hasUpper = false;
|
|
1917
|
-
for (var offset = 0; offset < property.length; offset++) {
|
|
1918
|
-
var letter = property.charCodeAt(offset);
|
|
1919
|
-
if (letter >= 65 && letter <= 90) {
|
|
1920
|
-
hasUpper = true;
|
|
1921
|
-
break;
|
|
1922
|
-
}
|
|
1187
|
+
var lookupName = name.charCodeAt(0) === 36 ? name.slice(1) : name;
|
|
1188
|
+
var value;
|
|
1189
|
+
var fromTheme = false;
|
|
1190
|
+
if (property === "fontFamily") {
|
|
1191
|
+
var _state_conf_fontsParsed_lookupName;
|
|
1192
|
+
value = (_state_conf_fontsParsed_lookupName = state.conf.fontsParsed[lookupName]) === null || _state_conf_fontsParsed_lookupName === void 0 ? void 0 : _state_conf_fontsParsed_lookupName.family;
|
|
1193
|
+
} else {
|
|
1194
|
+
var fontKey = property === "fontSize" ? "size" : property === "fontWeight" ? "weight" : property === "lineHeight" || property === "letterSpacing" ? property : "";
|
|
1195
|
+
if (fontKey) {
|
|
1196
|
+
var _font_fontKey;
|
|
1197
|
+
var font = state.conf.fontsParsed[state.fontFamily || state.conf.defaultFontToken] || state.conf.fontsParsed[state.conf.defaultFontToken];
|
|
1198
|
+
value = font === null || font === void 0 ? void 0 : (_font_fontKey = font[fontKey]) === null || _font_fontKey === void 0 ? void 0 : _font_fontKey[lookupName];
|
|
1199
|
+
} else {
|
|
1200
|
+
var _state_conf_tokensParsed_category;
|
|
1201
|
+
var category = grammar.tokenCategory(property);
|
|
1202
|
+
var dot = lookupName.indexOf(".");
|
|
1203
|
+
if (dot !== -1) {
|
|
1204
|
+
var prefix = lookupName.slice(0, dot);
|
|
1205
|
+
if (!category || prefix === category || prefix === "color") lookupName = lookupName.slice(dot + 1);
|
|
1923
1206
|
}
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1207
|
+
value = category ? (_state_conf_tokensParsed_category = state.conf.tokensParsed[category]) === null || _state_conf_tokensParsed_category === void 0 ? void 0 : _state_conf_tokensParsed_category[lookupName] : void 0;
|
|
1208
|
+
if (!value) {
|
|
1209
|
+
var first = lookupName.charCodeAt(0);
|
|
1210
|
+
if (category || !(first >= 48 && first <= 57 || first === 43 || first === 45 || first === 46)) {
|
|
1211
|
+
var _state_theme, _state_conf_themes_, _state_conf_themes;
|
|
1212
|
+
value = ((_state_theme = state.theme) === null || _state_theme === void 0 ? void 0 : _state_theme[lookupName]) || ((_state_conf_themes = state.conf.themes) === null || _state_conf_themes === void 0 ? void 0 : (_state_conf_themes_ = _state_conf_themes[state.flatThemeName || ""]) === null || _state_conf_themes_ === void 0 ? void 0 : _state_conf_themes_[lookupName]);
|
|
1213
|
+
fromTheme = !!value;
|
|
1214
|
+
if (!value && !category) {
|
|
1215
|
+
var _state_conf_tokensParsed_space, _state_conf_tokensParsed_color;
|
|
1216
|
+
value = ((_state_conf_tokensParsed_space = state.conf.tokensParsed.space) === null || _state_conf_tokensParsed_space === void 0 ? void 0 : _state_conf_tokensParsed_space[lookupName]) || ((_state_conf_tokensParsed_color = state.conf.tokensParsed.color) === null || _state_conf_tokensParsed_color === void 0 ? void 0 : _state_conf_tokensParsed_color[lookupName]);
|
|
1217
|
+
}
|
|
1929
1218
|
}
|
|
1930
|
-
copyFrom = end;
|
|
1931
1219
|
}
|
|
1932
1220
|
}
|
|
1933
|
-
index = end - 1;
|
|
1934
1221
|
}
|
|
1935
|
-
|
|
1222
|
+
if (process.env.NODE_ENV === "development") {
|
|
1223
|
+
var _state_conf_tokensParsed_color1;
|
|
1224
|
+
var category1 = grammar.tokenCategory(property);
|
|
1225
|
+
if (category1 && category1 !== "color" && ((_state_conf_tokensParsed_color1 = state.conf.tokensParsed.color) === null || _state_conf_tokensParsed_color1 === void 0 ? void 0 : _state_conf_tokensParsed_color1[name])) (0, import_warnOnce.warnOnce)(`"${name}" contributes to "color", not "${property}"`);
|
|
1226
|
+
}
|
|
1227
|
+
var out = raw;
|
|
1228
|
+
if ((0, import_createVariable.isVariable)(value)) {
|
|
1229
|
+
out = resolveValues === "except-theme" && fromTheme ? `${import_themeRef.THEME_REF_PREFIX}${lookupName}${opacity !== void 0 ? `/${opacity}` : ""}` : (0, import_resolveVariableValue.resolveVariableValue)(property, value, resolveValues);
|
|
1230
|
+
if (opacity !== void 0) {
|
|
1231
|
+
var _normalizeColor;
|
|
1232
|
+
out = (_normalizeColor = (0, import_normalizeColor.normalizeColor)(out, opacity / 100)) !== null && _normalizeColor !== void 0 ? _normalizeColor : out;
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
if (embedded && out === raw) {
|
|
1236
|
+
var usedSafeArea = state.flatUsesSafeArea;
|
|
1237
|
+
out = grammar.embeddedTokens(raw, function(word) {
|
|
1238
|
+
return configuredValue(state, property, word);
|
|
1239
|
+
});
|
|
1240
|
+
if (!usedSafeArea && state.flatUsesSafeArea) return out;
|
|
1241
|
+
}
|
|
1242
|
+
if (!fontProperty && !fromTheme) if (valueCacheEntries > 8192) {
|
|
1243
|
+
valueCaches = /* @__PURE__ */ new WeakMap();
|
|
1244
|
+
valueCacheEntries = 0;
|
|
1245
|
+
} else {
|
|
1246
|
+
valueCacheEntries++;
|
|
1247
|
+
byRaw.set(raw, out);
|
|
1248
|
+
}
|
|
1249
|
+
return out;
|
|
1936
1250
|
}
|
|
1937
|
-
function
|
|
1938
|
-
|
|
1251
|
+
function ownsSourceLayer(state, property) {
|
|
1252
|
+
var conditional = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
|
|
1253
|
+
var _direct_flatPass;
|
|
1254
|
+
var _direct;
|
|
1255
|
+
var direct = state;
|
|
1256
|
+
var layer = ((_direct_flatPass = direct.flatPass) === null || _direct_flatPass === void 0 ? void 0 : _direct_flatPass[passSourceLayer]) || 0;
|
|
1257
|
+
var layers = (_direct = direct).flatPropertyLayers || (_direct.flatPropertyLayers = /* @__PURE__ */ new Map());
|
|
1258
|
+
var previous = layers.get(property);
|
|
1259
|
+
if (previous !== void 0) {
|
|
1260
|
+
if (previous > layer) return false;
|
|
1261
|
+
if (previous < layer) {
|
|
1262
|
+
if (conditional) return true;
|
|
1263
|
+
clearDirectStyle(state, property);
|
|
1264
|
+
}
|
|
1265
|
+
} else if (conditional) return true;
|
|
1266
|
+
layers.set(property, layer);
|
|
1267
|
+
return true;
|
|
1939
1268
|
}
|
|
1940
|
-
function emitProperty(state, property, value, cursor,
|
|
1269
|
+
function emitProperty(state, property, value, cursor, originalValue, contextOnly) {
|
|
1941
1270
|
var _state_animationDriver;
|
|
1942
1271
|
var _state, _state1;
|
|
1272
|
+
if (!ownsSourceLayer(state, property, cursor !== null)) return;
|
|
1943
1273
|
var direct = state;
|
|
1944
|
-
var condition = cursor ?
|
|
1274
|
+
var condition = cursor ? cursor[conditionValue] : 0;
|
|
1275
|
+
if (condition && (!(condition & 2) || !(condition & 1) && !(import_getCSSStylesAtomic.canGenerateCSS && state.flatShouldDoClasses) && !(cursor[conditionTheme] && import_constants.supportsDynamicColorIOS && (0, import_getDynamicVal.isColorStyleKey)(property)))) return;
|
|
1945
1276
|
if (condition & 4) ((_state = state).flatEnterKeys || (_state.flatEnterKeys = /* @__PURE__ */ new Set())).add(property);
|
|
1946
1277
|
if (condition & 8) ((_state1 = state).flatExitKeys || (_state1.flatExitKeys = /* @__PURE__ */ new Set())).add(property);
|
|
1947
|
-
var theme = cursor ?
|
|
1278
|
+
var theme = cursor ? cursor[conditionTheme] : "";
|
|
1948
1279
|
if (theme) {
|
|
1949
1280
|
if (import_constants.supportsDynamicColorIOS && (0, import_getDynamicVal.isColorStyleKey)(property)) {
|
|
1950
1281
|
var _direct, _ref, _property;
|
|
1951
1282
|
var schemes = (_ref = (_direct = direct).flatDynamicColors || (_direct.flatDynamicColors = {}))[_property = property] || (_ref[_property] = {});
|
|
1952
|
-
schemes[theme] = typeof originalValue === "string" &&
|
|
1953
|
-
streamWriteInline(state, property, { dynamic: { ...schemes } }, cursor,
|
|
1283
|
+
schemes[theme] = typeof originalValue === "string" && /^[a-z]+$/i.test(originalValue) ? originalValue : value;
|
|
1284
|
+
streamWriteInline(state, property, { dynamic: { ...schemes } }, cursor, originalValue, true, condition & 1 ? condition : condition + 1);
|
|
1954
1285
|
return;
|
|
1955
1286
|
}
|
|
1956
1287
|
direct.flatDynamicThemeAccess = true;
|
|
1957
1288
|
}
|
|
1958
1289
|
if (contextOnly) {
|
|
1959
1290
|
if (!condition || condition & 1) {
|
|
1960
|
-
var
|
|
1961
|
-
((
|
|
1291
|
+
var _state3;
|
|
1292
|
+
((_state3 = state).overriddenContextProps || (_state3.overriddenContextProps = {}))[property] = originalValue;
|
|
1962
1293
|
}
|
|
1963
1294
|
return;
|
|
1964
1295
|
}
|
|
1965
|
-
if (
|
|
1966
|
-
var
|
|
1296
|
+
if (import_getCSSStylesAtomic.canGenerateCSS && state.flatShouldDoClasses && !condition && property === "transform") {
|
|
1297
|
+
var _state4;
|
|
1967
1298
|
if (process.env.NODE_ENV === "development" && state.transformAccumulator) {
|
|
1968
|
-
var
|
|
1299
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
1969
1300
|
try {
|
|
1970
|
-
for (var
|
|
1971
|
-
var
|
|
1972
|
-
(0, import_warnOnce.warnOnce)(`legacy transform part "${
|
|
1301
|
+
for (var _iterator = (0, import_runtime.getTransformPartKeys)(state.transformAccumulator)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
1302
|
+
var part = _step.value;
|
|
1303
|
+
(0, import_warnOnce.warnOnce)(`legacy transform part "${part}" is dropped because "transform" owns the property`);
|
|
1973
1304
|
}
|
|
1974
1305
|
} catch (err) {
|
|
1975
|
-
|
|
1976
|
-
|
|
1306
|
+
_didIteratorError = true;
|
|
1307
|
+
_iteratorError = err;
|
|
1977
1308
|
} finally {
|
|
1978
1309
|
try {
|
|
1979
|
-
if (!
|
|
1310
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
|
|
1980
1311
|
} finally {
|
|
1981
|
-
if (
|
|
1312
|
+
if (_didIteratorError) throw _iteratorError;
|
|
1982
1313
|
}
|
|
1983
1314
|
}
|
|
1984
1315
|
}
|
|
1985
|
-
(
|
|
1316
|
+
(_state4 = state).transformAccumulator || (_state4.transformAccumulator = (0, import_runtime.createTransformAccumulator)());
|
|
1986
1317
|
(0, import_runtime.addTransformValue)(state.transformAccumulator, property, value);
|
|
1987
1318
|
return;
|
|
1988
1319
|
}
|
|
1989
|
-
var shouldPromoteAnimatedStyle =
|
|
1990
|
-
if (
|
|
1991
|
-
|
|
1992
|
-
streamWriteCSS(state, property, value, cursor, originalValue);
|
|
1320
|
+
var shouldPromoteAnimatedStyle = import_getCSSStylesAtomic.canGenerateCSS && !condition && !state.flatShouldDoClasses && !state.styleProps.noMergeStyle && state.styleProps.isAnimated && ((_state_animationDriver = state.animationDriver) === null || _state_animationDriver === void 0 ? void 0 : _state_animationDriver.inputStyle) === "css" && property in import_helpers.nonAnimatableStyleProps;
|
|
1321
|
+
if (import_getCSSStylesAtomic.canGenerateCSS && (state.flatShouldDoClasses || shouldPromoteAnimatedStyle)) {
|
|
1322
|
+
writeStyleRecord(state, property, value, cursor, originalValue, shouldPromoteAnimatedStyle ? recordCSS : 0);
|
|
1993
1323
|
return;
|
|
1994
1324
|
}
|
|
1995
|
-
|
|
1996
|
-
streamWriteInline(state, property, value, cursor, merge, originalValue);
|
|
1997
|
-
}
|
|
1998
|
-
function splitComponents(value) {
|
|
1999
|
-
var parts = [];
|
|
2000
|
-
var start = 0;
|
|
2001
|
-
var quote = 0;
|
|
2002
|
-
var depth = 0;
|
|
2003
|
-
for (var index = 0; index <= value.length; index++) {
|
|
2004
|
-
var code = index === value.length ? 32 : value.charCodeAt(index);
|
|
2005
|
-
if (quote) {
|
|
2006
|
-
if (code === 92) index++;
|
|
2007
|
-
else if (code === quote) quote = 0;
|
|
2008
|
-
continue;
|
|
2009
|
-
}
|
|
2010
|
-
if (code === 34 || code === 39) quote = code;
|
|
2011
|
-
else if (code === 40) depth++;
|
|
2012
|
-
else if (code === 41) depth--;
|
|
2013
|
-
else if (!depth && code <= 32) {
|
|
2014
|
-
if (index > start) parts.push(value.slice(start, index));
|
|
2015
|
-
start = index + 1;
|
|
2016
|
-
}
|
|
2017
|
-
}
|
|
2018
|
-
return parts;
|
|
2019
|
-
}
|
|
2020
|
-
function isAsciiLetters(value) {
|
|
2021
|
-
if (!value) return false;
|
|
2022
|
-
for (var index = 0; index < value.length; index++) {
|
|
2023
|
-
var code = value.charCodeAt(index) | 32;
|
|
2024
|
-
if (code < 97 || code > 122) return false;
|
|
2025
|
-
}
|
|
2026
|
-
return true;
|
|
1325
|
+
streamWriteInline(state, property, value, cursor, originalValue);
|
|
2027
1326
|
}
|
|
2028
1327
|
function numericUnitValue(value, first, second) {
|
|
2029
1328
|
var unitLength = value.endsWith(first) || second !== void 0 && value.endsWith(second) ? first.length : 0;
|
|
@@ -2031,969 +1330,391 @@ function numericUnitValue(value, first, second) {
|
|
|
2031
1330
|
var numeric = Number(value.slice(0, value.length - unitLength));
|
|
2032
1331
|
return Number.isFinite(numeric) ? numeric : NaN;
|
|
2033
1332
|
}
|
|
2034
|
-
function
|
|
2035
|
-
var index = 0;
|
|
2036
|
-
if (value.charCodeAt(index) === 43 || value.charCodeAt(index) === 45) index++;
|
|
2037
|
-
var digits = 0;
|
|
2038
|
-
var dot = false;
|
|
2039
|
-
for (; index < value.length; index++) {
|
|
2040
|
-
var code = value.charCodeAt(index);
|
|
2041
|
-
if (code >= 48 && code <= 57) {
|
|
2042
|
-
digits++;
|
|
2043
|
-
continue;
|
|
2044
|
-
}
|
|
2045
|
-
if (code === 46 && !dot) {
|
|
2046
|
-
dot = true;
|
|
2047
|
-
continue;
|
|
2048
|
-
}
|
|
2049
|
-
break;
|
|
2050
|
-
}
|
|
2051
|
-
if (!digits) return false;
|
|
2052
|
-
for (; index < value.length; index++) {
|
|
2053
|
-
var code1 = value.charCodeAt(index);
|
|
2054
|
-
if (code1 !== 37 && (code1 < 97 || code1 > 122)) return false;
|
|
2055
|
-
}
|
|
2056
|
-
return true;
|
|
2057
|
-
}
|
|
2058
|
-
function startsValueFunction(value) {
|
|
2059
|
-
var index = 0;
|
|
2060
|
-
while (index < value.length) {
|
|
2061
|
-
var code = value.charCodeAt(index);
|
|
2062
|
-
if (code === 45 || code >= 97 && code <= 122) {
|
|
2063
|
-
index++;
|
|
2064
|
-
continue;
|
|
2065
|
-
}
|
|
2066
|
-
break;
|
|
2067
|
-
}
|
|
2068
|
-
return index > 0 && value.charCodeAt(index) === 40;
|
|
2069
|
-
}
|
|
2070
|
-
function emitBorder(state, property, raw, cursor, merge, originalValue, contextOnly) {
|
|
1333
|
+
function emitBorder(state, property, raw, cursor, originalValue, contextOnly) {
|
|
2071
1334
|
if (property === "borderBlock" || property === "borderInline") {
|
|
2072
1335
|
if (process.env.NODE_ENV === "development") (0, import_warnOnce.warnOnce)(`RN has no logical border shorthand "${property}"; dropping it`);
|
|
2073
1336
|
return;
|
|
2074
1337
|
}
|
|
2075
|
-
var width;
|
|
2076
|
-
var style;
|
|
2077
|
-
var color;
|
|
2078
|
-
var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = void 0;
|
|
2079
|
-
try {
|
|
2080
|
-
for (var _iterator2 = splitComponents(raw)[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
|
|
2081
|
-
var part3 = _step2.value;
|
|
2082
|
-
if (lineStyles.has(part3) || property === "outline" && part3 === "auto") style = part3;
|
|
2083
|
-
else if (part3 === "thin" || part3 === "medium" || part3 === "thick" || isNumericCSSComponent(part3) || startsValueFunction(part3)) width = part3;
|
|
2084
|
-
else color = part3;
|
|
2085
|
-
}
|
|
2086
|
-
} catch (err) {
|
|
2087
|
-
_didIteratorError2 = true;
|
|
2088
|
-
_iteratorError2 = err;
|
|
2089
|
-
} finally {
|
|
2090
|
-
try {
|
|
2091
|
-
if (!_iteratorNormalCompletion2 && _iterator2.return != null) _iterator2.return();
|
|
2092
|
-
} finally {
|
|
2093
|
-
if (_didIteratorError2) throw _iteratorError2;
|
|
2094
|
-
}
|
|
2095
|
-
}
|
|
1338
|
+
var { width, style, color } = (0, import_borderComponents.classifyBorderComponents)(raw, property === "outline");
|
|
2096
1339
|
if (style === "none" && width === void 0) width = "0";
|
|
2097
|
-
var targets = borderTargets[property];
|
|
2098
1340
|
if (width !== void 0) {
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
var target2 = _step12.value;
|
|
2103
|
-
emitResolved(state, target2, width, cursor, merge, originalValue, contextOnly);
|
|
2104
|
-
}
|
|
2105
|
-
} catch (err) {
|
|
2106
|
-
_didIteratorError12 = true;
|
|
2107
|
-
_iteratorError12 = err;
|
|
2108
|
-
} finally {
|
|
2109
|
-
try {
|
|
2110
|
-
if (!_iteratorNormalCompletion12 && _iterator12.return != null) _iterator12.return();
|
|
2111
|
-
} finally {
|
|
2112
|
-
if (_didIteratorError12) throw _iteratorError12;
|
|
2113
|
-
}
|
|
2114
|
-
}
|
|
1341
|
+
if (width === "thin") width = "1px";
|
|
1342
|
+
else if (width === "medium") width = "3px";
|
|
1343
|
+
else if (width === "thick") width = "5px";
|
|
2115
1344
|
}
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
for (var _iterator22 = styleTargets[Symbol.iterator](), _step22; !(_iteratorNormalCompletion22 = (_step22 = _iterator22.next()).done); _iteratorNormalCompletion22 = true) {
|
|
2121
|
-
var target1 = _step22.value;
|
|
2122
|
-
emitProperty(state, target1, style, cursor, merge, originalValue, contextOnly);
|
|
2123
|
-
}
|
|
2124
|
-
} catch (err) {
|
|
2125
|
-
_didIteratorError22 = true;
|
|
2126
|
-
_iteratorError22 = err;
|
|
2127
|
-
} finally {
|
|
2128
|
-
try {
|
|
2129
|
-
if (!_iteratorNormalCompletion22 && _iterator22.return != null) _iterator22.return();
|
|
2130
|
-
} finally {
|
|
2131
|
-
if (_didIteratorError22) throw _iteratorError22;
|
|
2132
|
-
}
|
|
2133
|
-
}
|
|
2134
|
-
}
|
|
2135
|
-
if (color !== void 0) {
|
|
2136
|
-
var _iteratorNormalCompletion3 = true, _didIteratorError3 = false, _iteratorError3 = void 0;
|
|
2137
|
-
try {
|
|
2138
|
-
for (var _iterator3 = targets.color[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
|
|
2139
|
-
var target22 = _step3.value;
|
|
2140
|
-
emitResolved(state, target22, color, cursor, merge, originalValue, contextOnly);
|
|
2141
|
-
}
|
|
2142
|
-
} catch (err) {
|
|
2143
|
-
_didIteratorError3 = true;
|
|
2144
|
-
_iteratorError3 = err;
|
|
2145
|
-
} finally {
|
|
2146
|
-
try {
|
|
2147
|
-
if (!_iteratorNormalCompletion3 && _iterator3.return != null) _iterator3.return();
|
|
2148
|
-
} finally {
|
|
2149
|
-
if (_didIteratorError3) throw _iteratorError3;
|
|
2150
|
-
}
|
|
2151
|
-
}
|
|
2152
|
-
}
|
|
2153
|
-
}
|
|
2154
|
-
function emitTextDecoration(state, raw, cursor, merge, originalValue, contextOnly) {
|
|
2155
|
-
var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = void 0;
|
|
1345
|
+
var targets = borderTargets[property];
|
|
1346
|
+
var prefix = property === "outline" ? "outline" : "border";
|
|
1347
|
+
if (style !== void 0 && property === "border") emitProperty(state, "borderStyle", style, cursor, originalValue, contextOnly);
|
|
1348
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
2156
1349
|
try {
|
|
2157
|
-
for (var
|
|
2158
|
-
var
|
|
2159
|
-
|
|
1350
|
+
for (var _iterator = targets[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
1351
|
+
var propBase = `${prefix}${_step.value}`;
|
|
1352
|
+
if (width !== void 0) emitResolved(state, `${propBase}Width`, width, cursor, originalValue, contextOnly);
|
|
1353
|
+
if (style !== void 0 && !(property === "border")) emitProperty(state, `${propBase}Style`, style, cursor, originalValue, contextOnly);
|
|
1354
|
+
if (color !== void 0) emitResolved(state, `${propBase}Color`, color, cursor, originalValue, contextOnly);
|
|
2160
1355
|
}
|
|
2161
1356
|
} catch (err) {
|
|
2162
|
-
|
|
2163
|
-
|
|
1357
|
+
_didIteratorError = true;
|
|
1358
|
+
_iteratorError = err;
|
|
2164
1359
|
} finally {
|
|
2165
1360
|
try {
|
|
2166
|
-
if (!
|
|
1361
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
|
|
2167
1362
|
} finally {
|
|
2168
|
-
if (
|
|
1363
|
+
if (_didIteratorError) throw _iteratorError;
|
|
2169
1364
|
}
|
|
2170
1365
|
}
|
|
2171
1366
|
}
|
|
2172
|
-
function
|
|
2173
|
-
|
|
2174
|
-
emitProperty(state, property, value, cursor, merge, originalValue, contextOnly);
|
|
2175
|
-
return;
|
|
2176
|
-
}
|
|
2177
|
-
var targets = property === "scale" ? ["--t-scale-x", "--t-scale-y"] : [property === "x" ? "--t-x" : property === "y" ? "--t-y" : property === "scaleX" ? "--t-scale-x" : property === "scaleY" ? "--t-scale-y" : "rotate"];
|
|
2178
|
-
var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = void 0;
|
|
1367
|
+
function emitTextDecoration(state, raw, cursor, originalValue, contextOnly) {
|
|
1368
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
2179
1369
|
try {
|
|
2180
|
-
for (var
|
|
2181
|
-
var
|
|
2182
|
-
|
|
2183
|
-
if (typeof targetValue === "number") {
|
|
2184
|
-
if (target2 === "--t-x" || target2 === "--t-y") targetValue = `${targetValue}px`;
|
|
2185
|
-
else if (target2 === "rotate") targetValue = `${targetValue}deg`;
|
|
2186
|
-
}
|
|
2187
|
-
emitProperty(state, target2, targetValue, cursor, merge, originalValue, contextOnly);
|
|
2188
|
-
if (target2 === "--t-x" || target2 === "--t-y") (0, import_directStyleCSS.addComposition)(state, "translate");
|
|
2189
|
-
else if (target2.startsWith("--t-scale")) (0, import_directStyleCSS.addComposition)(state, "scale");
|
|
1370
|
+
for (var _iterator = (0, import_borderComponents.splitComponents)(raw)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
1371
|
+
var part = _step.value;
|
|
1372
|
+
emitResolved(state, part === "solid" || part === "double" || part === "dotted" || part === "dashed" || part === "wavy" ? "textDecorationStyle" : part === "underline" || part === "overline" || part === "line-through" || part === "none" ? "textDecorationLine" : "textDecorationColor", part, cursor, originalValue, contextOnly);
|
|
2190
1373
|
}
|
|
2191
1374
|
} catch (err) {
|
|
2192
|
-
|
|
2193
|
-
|
|
1375
|
+
_didIteratorError = true;
|
|
1376
|
+
_iteratorError = err;
|
|
2194
1377
|
} finally {
|
|
2195
1378
|
try {
|
|
2196
|
-
if (!
|
|
1379
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
|
|
2197
1380
|
} finally {
|
|
2198
|
-
if (
|
|
1381
|
+
if (_didIteratorError) throw _iteratorError;
|
|
2199
1382
|
}
|
|
2200
1383
|
}
|
|
2201
1384
|
}
|
|
2202
|
-
function emitResolved(state, property, raw, cursor,
|
|
2203
|
-
var value = configuredValue(state, property, raw);
|
|
2204
|
-
if (value === raw) value = resolveEmbeddedTokens(state, property, raw);
|
|
1385
|
+
function emitResolved(state, property, raw, cursor, originalValue, contextOnly) {
|
|
1386
|
+
var value = configuredValue(state, property, raw, true);
|
|
2205
1387
|
if (typeof value === "string") {
|
|
2206
1388
|
var unitValue = numericUnitValue(value, "px", "dp");
|
|
2207
1389
|
if (Number.isFinite(unitValue)) value = unitValue;
|
|
2208
1390
|
else if (value !== "" && Number.isFinite(Number(value))) value = Number(value);
|
|
2209
1391
|
}
|
|
2210
|
-
emitProperty(state, property, value, cursor,
|
|
2211
|
-
}
|
|
2212
|
-
var emitKindTransition = 1;
|
|
2213
|
-
var emitKindTransformPart = 2;
|
|
2214
|
-
var emitKindWebShadow = 3;
|
|
2215
|
-
var emitKindWebTextShadow = 4;
|
|
2216
|
-
var emitKindTransform = 5;
|
|
2217
|
-
var emitKindBorder = 6;
|
|
2218
|
-
var emitKindTextDecoration = 7;
|
|
2219
|
-
var emitKindBackground = 8;
|
|
2220
|
-
var emitKindAxis = 9;
|
|
2221
|
-
var emitKindBorderRadius = 10;
|
|
2222
|
-
var emitKindBorderWidth = 11;
|
|
2223
|
-
var emitValueKinds = {
|
|
2224
|
-
transition: emitKindTransition,
|
|
2225
|
-
transitionProperty: emitKindTransition,
|
|
2226
|
-
transform: emitKindTransform,
|
|
2227
|
-
textDecoration: emitKindTextDecoration,
|
|
2228
|
-
background: emitKindBackground,
|
|
2229
|
-
x: emitKindAxis,
|
|
2230
|
-
y: emitKindAxis,
|
|
2231
|
-
scale: emitKindAxis,
|
|
2232
|
-
scaleX: emitKindAxis,
|
|
2233
|
-
scaleY: emitKindAxis,
|
|
2234
|
-
rotate: emitKindAxis,
|
|
2235
|
-
borderRadius: emitKindBorderRadius,
|
|
2236
|
-
borderWidth: emitKindBorderWidth,
|
|
2237
|
-
borderTopWidth: emitKindBorderWidth,
|
|
2238
|
-
borderRightWidth: emitKindBorderWidth,
|
|
2239
|
-
borderBottomWidth: emitKindBorderWidth,
|
|
2240
|
-
borderLeftWidth: emitKindBorderWidth
|
|
2241
|
-
};
|
|
2242
|
-
var _iteratorNormalCompletion = true;
|
|
2243
|
-
var _didIteratorError = false;
|
|
2244
|
-
var _iteratorError = void 0;
|
|
2245
|
-
try {
|
|
2246
|
-
for (var _iterator = legacyTransformParts[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
2247
|
-
var part = _step.value;
|
|
2248
|
-
emitValueKinds[part] = emitKindTransformPart;
|
|
2249
|
-
}
|
|
2250
|
-
} catch (err) {
|
|
2251
|
-
_didIteratorError = true;
|
|
2252
|
-
_iteratorError = err;
|
|
2253
|
-
} finally {
|
|
2254
|
-
try {
|
|
2255
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
|
|
2256
|
-
} finally {
|
|
2257
|
-
if (_didIteratorError) throw _iteratorError;
|
|
2258
|
-
}
|
|
2259
|
-
}
|
|
2260
|
-
for (var part1 in webShadowParts) emitValueKinds[part1] = emitKindWebShadow;
|
|
2261
|
-
var _iteratorNormalCompletion1 = true;
|
|
2262
|
-
var _didIteratorError1 = false;
|
|
2263
|
-
var _iteratorError1 = void 0;
|
|
2264
|
-
try {
|
|
2265
|
-
for (var _iterator1 = webTextShadowParts[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
|
|
2266
|
-
var part2 = _step1.value;
|
|
2267
|
-
emitValueKinds[part2] = emitKindWebTextShadow;
|
|
2268
|
-
}
|
|
2269
|
-
} catch (err) {
|
|
2270
|
-
_didIteratorError1 = true;
|
|
2271
|
-
_iteratorError1 = err;
|
|
2272
|
-
} finally {
|
|
2273
|
-
try {
|
|
2274
|
-
if (!_iteratorNormalCompletion1 && _iterator1.return != null) _iterator1.return();
|
|
2275
|
-
} finally {
|
|
2276
|
-
if (_didIteratorError1) throw _iteratorError1;
|
|
2277
|
-
}
|
|
1392
|
+
emitProperty(state, property, value, cursor, originalValue, contextOnly);
|
|
2278
1393
|
}
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
return typeof part3 === "number" ? `${part3}px` : part3 || "0px";
|
|
1394
|
+
function shadowUnit(part) {
|
|
1395
|
+
return typeof part === "number" ? `${part}px` : part || "0px";
|
|
2282
1396
|
}
|
|
2283
|
-
function emitValue(state, property, raw, cursor,
|
|
2284
|
-
var condition = cursor ?
|
|
1397
|
+
function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
|
|
1398
|
+
var condition = cursor ? cursor[conditionValue] : 0;
|
|
1399
|
+
var grammar = (0, import_grammarConfig.getConfigRevisionState)(state.conf);
|
|
2285
1400
|
if ((0, import_createVariable.isVariable)(raw)) raw = (0, import_resolveVariableValue.resolveVariableValue)(property, raw, state.styleProps.resolveValues);
|
|
2286
|
-
|
|
2287
|
-
if (
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
(
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
case emitKindWebTextShadow: break;
|
|
2305
|
-
case emitKindTransform:
|
|
2306
|
-
if (import_directStyleCSS.canGenerateCSS && state.flatShouldDoClasses && Array.isArray(raw)) raw = (0, import_transformsToString.transformsToString)(raw);
|
|
2307
|
-
if (typeof raw === "string") {
|
|
2308
|
-
var transform = (0, import_parseNativeTransform.parseNativeTransform)(raw);
|
|
2309
|
-
if (transform) {
|
|
2310
|
-
emitProperty(state, property, transform, cursor, merge, originalValue, contextOnly);
|
|
2311
|
-
return;
|
|
2312
|
-
}
|
|
2313
|
-
}
|
|
2314
|
-
break;
|
|
2315
|
-
case emitKindBorder:
|
|
2316
|
-
if (typeof raw === "string") {
|
|
2317
|
-
emitBorder(state, property, raw, cursor, merge, originalValue, contextOnly);
|
|
2318
|
-
return;
|
|
2319
|
-
}
|
|
2320
|
-
break;
|
|
2321
|
-
case emitKindTextDecoration:
|
|
2322
|
-
if (typeof raw === "string") {
|
|
2323
|
-
emitTextDecoration(state, raw, cursor, merge, originalValue, contextOnly);
|
|
1401
|
+
if (typeof raw === "string" && (property === "transition" || property === "transitionProperty")) raw = grammar.normalizeTransition(raw);
|
|
1402
|
+
if ((property === "borderWidth" || property === "borderTopWidth" || property === "borderRightWidth" || property === "borderBottomWidth" || property === "borderLeftWidth") && state.styleProps.noNormalize !== false) writeStyleRecord(state, "borderStyle", "solid", cursor, originalValue, recordDefault);
|
|
1403
|
+
if (grammar.propertyKind(property) === 5) {
|
|
1404
|
+
var value = typeof raw === "string" ? configuredValue(state, property, raw) : raw;
|
|
1405
|
+
if (import_getCSSStylesAtomic.canGenerateCSS && state.flatShouldDoClasses && !condition) {
|
|
1406
|
+
var _state;
|
|
1407
|
+
(_state = state).transformAccumulator || (_state.transformAccumulator = (0, import_runtime.createTransformAccumulator)());
|
|
1408
|
+
(0, import_runtime.addTransformValue)(state.transformAccumulator, property, value);
|
|
1409
|
+
} else if (condition && import_getCSSStylesAtomic.canGenerateCSS && state.flatShouldDoClasses) emitProperty(state, "transform", `${property}(${value})`, cursor, originalValue, contextOnly);
|
|
1410
|
+
else streamWriteInline(state, property, value, cursor, originalValue, true);
|
|
1411
|
+
return;
|
|
1412
|
+
}
|
|
1413
|
+
if (property === "transform") {
|
|
1414
|
+
if (import_getCSSStylesAtomic.canGenerateCSS && state.flatShouldDoClasses && Array.isArray(raw)) raw = (0, import_transformsToString.transformsToString)(raw);
|
|
1415
|
+
if (typeof raw === "string") {
|
|
1416
|
+
var transform = (0, import_parseNativeTransform.parseNativeTransform)(raw);
|
|
1417
|
+
if (transform) {
|
|
1418
|
+
emitProperty(state, property, transform, cursor, originalValue, contextOnly);
|
|
2324
1419
|
return;
|
|
2325
1420
|
}
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
1421
|
+
}
|
|
1422
|
+
}
|
|
1423
|
+
if (typeof raw === "string" && borderTargets[property]) {
|
|
1424
|
+
emitBorder(state, property, raw, cursor, originalValue, contextOnly);
|
|
1425
|
+
return;
|
|
1426
|
+
}
|
|
1427
|
+
if (typeof raw === "string" && property === "textDecoration") {
|
|
1428
|
+
emitTextDecoration(state, raw, cursor, originalValue, contextOnly);
|
|
1429
|
+
return;
|
|
1430
|
+
}
|
|
1431
|
+
if (typeof raw === "string" && property === "background") {
|
|
1432
|
+
var parts = (0, import_borderComponents.splitComponents)(raw);
|
|
1433
|
+
if (parts.length === 1 && !(0, import_borderComponents.startsValueFunction)(parts[0])) {
|
|
1434
|
+
emitResolved(state, "backgroundColor", parts[0], cursor, originalValue, contextOnly);
|
|
1435
|
+
return;
|
|
1436
|
+
}
|
|
1437
|
+
if (process.env.NODE_ENV === "development") (0, import_warnOnce.warnOnce)(`native background cannot represent "${raw}"; dropping it`);
|
|
1438
|
+
return;
|
|
1439
|
+
}
|
|
1440
|
+
if (property === "x" || property === "y" || property === "scale" || property === "scaleX" || property === "scaleY" || property === "rotate") {
|
|
1441
|
+
var value2 = typeof raw === "string" ? configuredValue(state, property, raw) : raw;
|
|
1442
|
+
if (typeof value2 === "string" && !value2.startsWith(import_themeRef.THEME_REF_PREFIX)) {
|
|
1443
|
+
if (property === "rotate" && !Number.isFinite(numericUnitValue(value2, "deg", "rad"))) {
|
|
1444
|
+
if (process.env.NODE_ENV === "development") (0, import_warnOnce.warnOnce)(`native transform "${property}" cannot represent "${value2}"; dropping it`);
|
|
1445
|
+
if (condition & 1) {
|
|
1446
|
+
(0, import_runtime.removeTransformValue)(state.transformAccumulator, property);
|
|
1447
|
+
writeStyleRecord(state, property, void 0, cursor, void 0, recordRetract);
|
|
2333
1448
|
}
|
|
2334
|
-
if (process.env.NODE_ENV === "development") (0, import_warnOnce.warnOnce)(`native background cannot represent "${raw}"; dropping it`);
|
|
2335
1449
|
return;
|
|
2336
1450
|
}
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
1451
|
+
var unitValue = numericUnitValue(value2, "px", "dp");
|
|
1452
|
+
if (Number.isFinite(unitValue)) value2 = unitValue;
|
|
1453
|
+
else if (Number.isFinite(Number(value2))) value2 = Number(value2);
|
|
1454
|
+
}
|
|
1455
|
+
if (!import_getCSSStylesAtomic.canGenerateCSS || !state.flatShouldDoClasses) {
|
|
1456
|
+
emitProperty(state, property, value2, cursor, originalValue, contextOnly);
|
|
1457
|
+
return;
|
|
1458
|
+
}
|
|
1459
|
+
var targets = property === "scale" ? ["--t-scale-x", "--t-scale-y"] : [property === "x" ? "--t-x" : property === "y" ? "--t-y" : property === "scaleX" ? "--t-scale-x" : property === "scaleY" ? "--t-scale-y" : "rotate"];
|
|
1460
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
1461
|
+
try {
|
|
1462
|
+
for (var _iterator = targets[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
1463
|
+
var target1 = _step.value;
|
|
1464
|
+
var targetValue = value2;
|
|
1465
|
+
if (typeof targetValue === "number") {
|
|
1466
|
+
if (target1 === "--t-x" || target1 === "--t-y") targetValue = `${targetValue}px`;
|
|
1467
|
+
else if (target1 === "rotate") targetValue = `${targetValue}deg`;
|
|
2348
1468
|
}
|
|
2349
|
-
|
|
2350
|
-
if (
|
|
2351
|
-
else if (
|
|
1469
|
+
emitProperty(state, target1, targetValue, cursor, originalValue, contextOnly);
|
|
1470
|
+
if (target1 === "--t-x" || target1 === "--t-y") (0, import_getCSSStylesAtomic.addComposition)(state, "translate");
|
|
1471
|
+
else if (target1.startsWith("--t-scale")) (0, import_getCSSStylesAtomic.addComposition)(state, "scale");
|
|
2352
1472
|
}
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
1473
|
+
} catch (err) {
|
|
1474
|
+
_didIteratorError = true;
|
|
1475
|
+
_iteratorError = err;
|
|
1476
|
+
} finally {
|
|
1477
|
+
try {
|
|
1478
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
|
|
1479
|
+
} finally {
|
|
1480
|
+
if (_didIteratorError) throw _iteratorError;
|
|
1481
|
+
}
|
|
1482
|
+
}
|
|
1483
|
+
return;
|
|
2361
1484
|
}
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
1485
|
+
var value3 = raw;
|
|
1486
|
+
if (typeof raw === "string") value3 = configuredValue(state, property, raw, true);
|
|
1487
|
+
if (typeof value3 === "string") {
|
|
1488
|
+
var unitValue1 = numericUnitValue(value3, "px", "dp");
|
|
1489
|
+
if (Number.isFinite(unitValue1)) value3 = unitValue1;
|
|
1490
|
+
else if (value3 !== "" && Number.isFinite(Number(value3))) value3 = Number(value3);
|
|
2366
1491
|
}
|
|
2367
|
-
if (
|
|
2368
|
-
state.flatBoxShadow =
|
|
1492
|
+
if (import_getCSSStylesAtomic.canGenerateCSS && state.flatShouldDoClasses && property === "boxShadow" && !condition) {
|
|
1493
|
+
state.flatBoxShadow = value3;
|
|
2369
1494
|
state.flatBoxShadowSequence = frameSequence + 1;
|
|
2370
1495
|
}
|
|
2371
|
-
if (typeof
|
|
2372
|
-
var parsed = (0, import_parseNativeStyle.parseNativeStyle)(property,
|
|
1496
|
+
if (typeof value3 === "string" && (property === "backgroundImage" || property === "boxShadow" || property === "textShadow")) {
|
|
1497
|
+
var parsed = (0, import_parseNativeStyle.parseNativeStyle)(property, value3);
|
|
2373
1498
|
if (parsed) {
|
|
2374
1499
|
if (property === "textShadow") {
|
|
2375
|
-
var
|
|
1500
|
+
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;
|
|
2376
1501
|
try {
|
|
2377
|
-
for (var
|
|
2378
|
-
var [key, parsedValue] =
|
|
2379
|
-
emitProperty(state, key, parsedValue, cursor,
|
|
1502
|
+
for (var _iterator1 = parsed[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
|
|
1503
|
+
var [key, parsedValue] = _step1.value;
|
|
1504
|
+
emitProperty(state, key, parsedValue, cursor, originalValue, contextOnly);
|
|
2380
1505
|
}
|
|
2381
1506
|
} catch (err) {
|
|
2382
|
-
|
|
2383
|
-
|
|
1507
|
+
_didIteratorError1 = true;
|
|
1508
|
+
_iteratorError1 = err;
|
|
2384
1509
|
} finally {
|
|
2385
1510
|
try {
|
|
2386
|
-
if (!
|
|
1511
|
+
if (!_iteratorNormalCompletion1 && _iterator1.return != null) _iterator1.return();
|
|
2387
1512
|
} finally {
|
|
2388
|
-
if (
|
|
1513
|
+
if (_didIteratorError1) throw _iteratorError1;
|
|
2389
1514
|
}
|
|
2390
1515
|
}
|
|
2391
|
-
} else emitProperty(state, property === "backgroundImage" ? "experimental_backgroundImage" : property, parsed, cursor,
|
|
1516
|
+
} else emitProperty(state, property === "backgroundImage" ? "experimental_backgroundImage" : property, parsed, cursor, originalValue, contextOnly);
|
|
2392
1517
|
return;
|
|
2393
1518
|
}
|
|
2394
1519
|
}
|
|
2395
|
-
if (property === "fontVariant" && typeof
|
|
1520
|
+
if (property === "fontVariant" && typeof value3 === "string") {
|
|
2396
1521
|
var variants = [];
|
|
2397
1522
|
var start = 0;
|
|
2398
|
-
for (var index = 0; index <=
|
|
2399
|
-
var code = index ===
|
|
1523
|
+
for (var index = 0; index <= value3.length; index++) {
|
|
1524
|
+
var code = index === value3.length ? 32 : value3.charCodeAt(index);
|
|
2400
1525
|
if (code !== 44 && code > 32) continue;
|
|
2401
|
-
if (start < index) variants.push(
|
|
1526
|
+
if (start < index) variants.push(value3.slice(start, index));
|
|
2402
1527
|
start = index + 1;
|
|
2403
1528
|
}
|
|
2404
|
-
|
|
1529
|
+
value3 = variants;
|
|
2405
1530
|
}
|
|
2406
|
-
var expanded = state.styleProps.noExpand ?
|
|
1531
|
+
var expanded = !state.styleProps.noExpand ? (0, import_expandStyle.expandStyle)(property, value3, state.conf.settings.styleCompat || "web") : null;
|
|
2407
1532
|
if (!expanded) {
|
|
2408
|
-
emitProperty(state, property,
|
|
1533
|
+
emitProperty(state, property, value3, cursor, originalValue, contextOnly);
|
|
2409
1534
|
return;
|
|
2410
1535
|
}
|
|
2411
1536
|
if (typeof raw === "string" && expanded.length > 1) {
|
|
2412
|
-
var parts1 = splitComponents(raw);
|
|
1537
|
+
var parts1 = (0, import_borderComponents.splitComponents)(raw);
|
|
2413
1538
|
if (parts1.length > 0 && parts1.length <= (expanded.length === 4 ? 4 : 2)) {
|
|
2414
1539
|
for (var index1 = 0; index1 < expanded.length; index1++) {
|
|
2415
1540
|
var partIndex = index1 === 0 || parts1.length === 1 ? 0 : index1 === 1 || index1 === 3 && parts1.length < 4 ? 1 : index1 === 2 && parts1.length < 3 ? 0 : index1;
|
|
2416
|
-
emitResolved(state, expanded[index1][0], parts1[partIndex], cursor,
|
|
1541
|
+
emitResolved(state, expanded[index1][0], parts1[partIndex], cursor, originalValue, contextOnly);
|
|
2417
1542
|
}
|
|
2418
1543
|
return;
|
|
2419
1544
|
}
|
|
2420
1545
|
}
|
|
2421
|
-
for (var index2 = 0; index2 < expanded.length; index2++) emitProperty(state, expanded[index2][0], expanded[index2][1], cursor,
|
|
1546
|
+
for (var index2 = 0; index2 < expanded.length; index2++) emitProperty(state, expanded[index2][0], expanded[index2][1], cursor, originalValue, contextOnly);
|
|
2422
1547
|
}
|
|
2423
|
-
function
|
|
2424
|
-
var
|
|
2425
|
-
var
|
|
2426
|
-
var watermark = conditionCursorTop;
|
|
2427
|
-
var previousCursor = directState.flatScanCursor;
|
|
2428
|
-
var previousExpectMulti = directState.flatExpectMulti;
|
|
2429
|
-
directState.flatScanCursor = null;
|
|
2430
|
-
directState.flatExpectMulti = source.indexOf(":") !== -1;
|
|
2431
|
-
try {
|
|
2432
|
-
(0, import_runtime.scanFlatValue)(source, directStyleHandler, state, property, merge, originalValue, contextOnly);
|
|
2433
|
-
} finally {
|
|
2434
|
-
directState.flatScanCursor = previousCursor;
|
|
2435
|
-
directState.flatExpectMulti = previousExpectMulti;
|
|
2436
|
-
releaseConditionCursors(watermark);
|
|
2437
|
-
}
|
|
2438
|
-
return true;
|
|
2439
|
-
}
|
|
2440
|
-
function contributeStyleObject(state, property, value, merge, contextOnly) {
|
|
2441
|
-
var outerState = state;
|
|
2442
|
-
var previousExpectMulti = outerState.flatExpectMulti;
|
|
2443
|
-
outerState.flatExpectMulti = true;
|
|
2444
|
-
try {
|
|
2445
|
-
return contributeStyleObjectInner(state, property, value, merge, contextOnly);
|
|
2446
|
-
} finally {
|
|
2447
|
-
outerState.flatExpectMulti = previousExpectMulti;
|
|
2448
|
-
}
|
|
2449
|
-
}
|
|
2450
|
-
function contributeStyleObjectInner(state, property, value, merge, contextOnly) {
|
|
2451
|
-
var _directState_flatPass;
|
|
2452
|
-
var directState = state;
|
|
2453
|
-
var parent = ((_directState_flatPass = directState.flatPass) === null || _directState_flatPass === void 0 ? void 0 : _directState_flatPass[passParentCursor]) || null;
|
|
2454
|
-
var hasDefault = Object.prototype.hasOwnProperty.call(value, "default");
|
|
1548
|
+
function walkConditionalValue(state, property, value, parent, sink) {
|
|
1549
|
+
var warnMode = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : 0;
|
|
1550
|
+
var parentCondition = parent || null;
|
|
2455
1551
|
var hasBase = false;
|
|
2456
|
-
var base = hasDefault ? value.default : void 0;
|
|
2457
|
-
if (base != null) {
|
|
2458
|
-
var baseString = String(base);
|
|
2459
|
-
feedCompoundSegment(directState, baseString, 0, baseString.length, true, true, "");
|
|
2460
|
-
emitAtParentCondition(state, property, base, merge, base, contextOnly);
|
|
2461
|
-
hasBase = true;
|
|
2462
|
-
}
|
|
2463
1552
|
var conditions = 0;
|
|
2464
|
-
var
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
var
|
|
2468
|
-
var
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
if (
|
|
2475
|
-
|
|
2476
|
-
|
|
1553
|
+
var lastPayload = "";
|
|
1554
|
+
if (typeof value === "string") {
|
|
1555
|
+
var parsed = (0, import_grammarConfig.getConfigRevisionState)(state.conf).parseFlatValue(value);
|
|
1556
|
+
var [segments, failure, failureIndex] = parsed;
|
|
1557
|
+
var slices = parsedSlices.get(parsed);
|
|
1558
|
+
if (slices === void 0) parsedSlices.set(parsed, slices = []);
|
|
1559
|
+
var chainCount = segments.length / 5 - 1;
|
|
1560
|
+
if (property === "aspectRatio" && chainCount === 1) {
|
|
1561
|
+
var left = Number(value.slice(segments[7], segments[8]));
|
|
1562
|
+
var right = Number(value.slice(segments[5], segments[6]));
|
|
1563
|
+
if (left > 0 && right > 0 && Number.isFinite(left) && Number.isFinite(right)) return false;
|
|
1564
|
+
}
|
|
1565
|
+
for (var index = 0; index < segments.length; index += 5) {
|
|
1566
|
+
var start = segments[index];
|
|
1567
|
+
var end = segments[index + 1];
|
|
1568
|
+
var flags = segments[index + 4];
|
|
1569
|
+
if (!(flags & 1)) continue;
|
|
1570
|
+
if (start === end) continue;
|
|
1571
|
+
if (flags & 2) {
|
|
1572
|
+
var _slices, _index;
|
|
1573
|
+
var _;
|
|
1574
|
+
var payload = (_ = (_slices = slices)[_index = index]) !== null && _ !== void 0 ? _ : _slices[_index] = value.slice(start, end);
|
|
1575
|
+
sink(payload, parentCondition, payload);
|
|
1576
|
+
hasBase = true;
|
|
1577
|
+
} else if (process.env.NODE_ENV !== "production" && warnMode && !chainCount && (failure === "invalid-character" || failure === "stray-comment-close")) {
|
|
1578
|
+
sink(value, parentCondition, value);
|
|
1579
|
+
hasBase = true;
|
|
1580
|
+
} else if (warnMode) warnScanFailure(property, value, failure, failureIndex);
|
|
1581
|
+
}
|
|
1582
|
+
var lastPayloadStart = 0;
|
|
1583
|
+
for (var index1 = 0; index1 < segments.length; index1 += 5) {
|
|
1584
|
+
var _slices1, _ref;
|
|
1585
|
+
var start1 = segments[index1];
|
|
1586
|
+
var end1 = segments[index1 + 1];
|
|
1587
|
+
var flags1 = segments[index1 + 4];
|
|
1588
|
+
if (flags1 & 1) continue;
|
|
1589
|
+
if (!(flags1 & 4) || !(flags1 & 2)) {
|
|
1590
|
+
if (warnMode) warnScanFailure(property, value, failure, failureIndex);
|
|
1591
|
+
continue;
|
|
1592
|
+
}
|
|
1593
|
+
lastPayloadStart = start1;
|
|
1594
|
+
if (start1 === end1) {
|
|
1595
|
+
if (warnMode && process.env.NODE_ENV === "development") (0, import_warnOnce.warnRefusedValue)(property, value, "a conditional clause has no value");
|
|
1596
|
+
continue;
|
|
1597
|
+
}
|
|
1598
|
+
var _1;
|
|
1599
|
+
var cursor = conditionFromKey(state, (_1 = (_slices1 = slices)[_ref = index1 + 2]) !== null && _1 !== void 0 ? _1 : _slices1[_ref] = value.slice(segments[index1 + 2], segments[index1 + 3]), parentCondition);
|
|
1600
|
+
conditions |= cursor[conditionValue];
|
|
1601
|
+
if (cursor[conditionValue] & conditionResolvedFlag || warnMode) {
|
|
1602
|
+
var _slices2, _index1;
|
|
1603
|
+
var _2;
|
|
1604
|
+
sink((_2 = (_slices2 = slices)[_index1 = index1]) !== null && _2 !== void 0 ? _2 : _slices2[_index1] = value.slice(start1, end1), cursor, value);
|
|
2477
1605
|
}
|
|
2478
1606
|
}
|
|
2479
|
-
if (
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
1607
|
+
if (process.env.NODE_ENV !== "production") lastPayload = value.slice(lastPayloadStart);
|
|
1608
|
+
} else {
|
|
1609
|
+
if (!value || (typeof value === "undefined" ? "undefined" : _type_of(value)) !== "object" || Array.isArray(value) || (0, import_createVariable.isVariable)(value) || !classifyConditionalObject(value, state)) return false;
|
|
1610
|
+
if (value.default != null) {
|
|
1611
|
+
sink(value.default, parentCondition, value.default);
|
|
1612
|
+
hasBase = true;
|
|
1613
|
+
}
|
|
1614
|
+
for (var key in value) {
|
|
1615
|
+
if (key === "default" || value[key] == null) continue;
|
|
1616
|
+
var cursor1 = conditionFromKey(state, key, parentCondition);
|
|
1617
|
+
conditions |= cursor1[conditionValue];
|
|
1618
|
+
if (cursor1[conditionValue] & conditionResolvedFlag || warnMode) sink(value[key], cursor1, value[key]);
|
|
2484
1619
|
}
|
|
2485
|
-
releaseConditionCursors(watermark);
|
|
2486
1620
|
}
|
|
2487
|
-
if (!
|
|
2488
|
-
if ((!
|
|
2489
|
-
var
|
|
2490
|
-
|
|
1621
|
+
if (warnMode && process.env.NODE_ENV === "development" && typeof value === "string" && !hasBase && conditions && (0, import_grammarConfig.getConfigRevisionState)(state.conf).tokenCategory(property) && (0, import_borderComponents.splitComponents)(lastPayload).length > 1) (0, import_warnOnce.warnOnce)(`${property}="${value}" has multiple values after its first conditional. Write the base value before the first conditional.`);
|
|
1622
|
+
if (warnMode === 1 && (!import_getCSSStylesAtomic.canGenerateCSS || !state.flatShouldDoClasses) && conditions & 12 && !hasBase) {
|
|
1623
|
+
var _state_flatPropertyLayers;
|
|
1624
|
+
var resting = property === "opacity" || property.startsWith("scale") ? 1 : property === "rotate" ? "0deg" : property === "x" || property === "y" ? 0 : null;
|
|
1625
|
+
if (resting !== null && !((_state_flatPropertyLayers = state.flatPropertyLayers) === null || _state_flatPropertyLayers === void 0 ? void 0 : _state_flatPropertyLayers.has(property))) sink(resting, parentCondition, resting);
|
|
2491
1626
|
}
|
|
2492
1627
|
return true;
|
|
2493
1628
|
}
|
|
2494
|
-
function contributeValue(state, property, value,
|
|
2495
|
-
var contextOnly = arguments.length >
|
|
2496
|
-
|
|
2497
|
-
if (value.hasBase) contributeValue(state, property, value.base, merge, value.base, contextOnly);
|
|
2498
|
-
for (var offset = 0; offset < value.entries.length;) {
|
|
2499
|
-
var entryValue = value.entries[offset];
|
|
2500
|
-
var watermark = conditionCursorTop;
|
|
2501
|
-
try {
|
|
2502
|
-
var _state_flatPass;
|
|
2503
|
-
emitUnderCondition(state, property, entryValue, acquireTransportCursor(state, value.entries, offset, ((_state_flatPass = state.flatPass) === null || _state_flatPass === void 0 ? void 0 : _state_flatPass[passParentCursor]) || null), merge, entryValue, contextOnly, 2, entryValue);
|
|
2504
|
-
} finally {
|
|
2505
|
-
releaseConditionCursors(watermark);
|
|
2506
|
-
}
|
|
2507
|
-
offset += transportEntryWidth;
|
|
2508
|
-
}
|
|
2509
|
-
return true;
|
|
2510
|
-
}
|
|
1629
|
+
function contributeValue(state, property, value, originalValue) {
|
|
1630
|
+
var contextOnly = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false, condition = arguments.length > 5 ? arguments[5] : void 0;
|
|
1631
|
+
var _state_flatPass;
|
|
2511
1632
|
if (condition !== void 0) {
|
|
2512
1633
|
var _directState_flatPass;
|
|
2513
1634
|
var parent = ((_directState_flatPass = state.flatPass) === null || _directState_flatPass === void 0 ? void 0 : _directState_flatPass[passParentCursor]) || null;
|
|
2514
|
-
var
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
commitConditionCursor(state, effective);
|
|
2527
|
-
} else effective = condition;
|
|
2528
|
-
var isObjectValue = value && (typeof value === "undefined" ? "undefined" : _type_of(value)) === "object" && !Array.isArray(value) && !(0, import_createVariable.isVariable)(value);
|
|
2529
|
-
var objectHasDefault = isObjectValue && Object.prototype.hasOwnProperty.call(value, "default");
|
|
2530
|
-
var firstChild = isObjectValue && !objectHasDefault ? acquireConditionCursor(effective) : null;
|
|
2531
|
-
if (isObjectValue && classifyConditionalObject(value, state, void 0, firstChild || void 0)) {
|
|
2532
|
-
var useFirstChild = firstChild !== null;
|
|
2533
|
-
for (var key in value) {
|
|
2534
|
-
var payload = value[key];
|
|
2535
|
-
if (payload == null) continue;
|
|
2536
|
-
if (key === "default") emitUnderCondition(state, property, payload, effective, merge, payload, contextOnly, 2, payload);
|
|
2537
|
-
else {
|
|
2538
|
-
var keyWatermark = conditionCursorTop;
|
|
2539
|
-
var child = useFirstChild ? firstChild : acquireConditionCursor(effective);
|
|
2540
|
-
if (useFirstChild) useFirstChild = false;
|
|
2541
|
-
else {
|
|
2542
|
-
resolveConditionText(state, child, key);
|
|
2543
|
-
commitConditionCursor(state, child);
|
|
2544
|
-
}
|
|
2545
|
-
emitUnderCondition(state, property, payload, child, merge, payload, contextOnly, 2, payload);
|
|
2546
|
-
if (child !== firstChild) releaseConditionCursors(keyWatermark);
|
|
2547
|
-
}
|
|
2548
|
-
}
|
|
2549
|
-
return true;
|
|
2550
|
-
}
|
|
2551
|
-
emitUnderCondition(state, property, value, effective, merge, originalValue, contextOnly, 2, value);
|
|
2552
|
-
return true;
|
|
2553
|
-
} finally {
|
|
2554
|
-
releaseConditionCursors(watermark1);
|
|
2555
|
-
}
|
|
1635
|
+
var effective;
|
|
1636
|
+
if (typeof condition === "string") effective = conditionFromKey(state, condition, parent);
|
|
1637
|
+
else if (parent) {
|
|
1638
|
+
effective = conditionFromKey(state, condition[conditionKey], parent);
|
|
1639
|
+
if (!(condition[conditionValue] & conditionResolvedFlag)) setConditionUnresolved(effective);
|
|
1640
|
+
commitCondition(effective);
|
|
1641
|
+
} else effective = condition;
|
|
1642
|
+
if (typeof value !== "string" && walkConditionalValue(state, property, value, effective, function(payload, cursor, source) {
|
|
1643
|
+
return emitUnderCondition(state, property, payload, cursor, payload, contextOnly, 2, source);
|
|
1644
|
+
}, 2)) return true;
|
|
1645
|
+
emitUnderCondition(state, property, value, effective, originalValue, contextOnly, 2, value);
|
|
1646
|
+
return true;
|
|
2556
1647
|
}
|
|
2557
|
-
|
|
2558
|
-
|
|
1648
|
+
var compositeKind = 0;
|
|
1649
|
+
if (compositeKind > 0 && compositeKind < 6 && (typeof value === "string" && value.indexOf(":") !== -1 || value && (typeof value === "undefined" ? "undefined" : _type_of(value)) === "object" && !Array.isArray(value) && !(0, import_createVariable.isVariable)(value) && classifyConditionalObject(value, state))) {
|
|
1650
|
+
if (process.env.NODE_ENV === "development") (0, import_warnOnce.warnOnce)(`conditional "${property}" needs its composite property; dropping it`);
|
|
1651
|
+
return true;
|
|
1652
|
+
}
|
|
1653
|
+
if (value === "safe") {
|
|
1654
|
+
var expanded = (0, import_grammarConfig.getConfigRevisionState)(state.conf).expandSafeArea(property);
|
|
2559
1655
|
if (expanded) {
|
|
2560
1656
|
state.flatUsesSafeArea = true;
|
|
2561
|
-
var
|
|
1657
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
2562
1658
|
try {
|
|
2563
|
-
for (var
|
|
2564
|
-
var [
|
|
2565
|
-
emitAtParentCondition(state,
|
|
1659
|
+
for (var _iterator = expanded[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
1660
|
+
var [key, resolved] = _step.value;
|
|
1661
|
+
emitAtParentCondition(state, key, resolved, originalValue !== null && originalValue !== void 0 ? originalValue : value, contextOnly);
|
|
2566
1662
|
}
|
|
2567
1663
|
} catch (err) {
|
|
2568
|
-
|
|
2569
|
-
|
|
1664
|
+
_didIteratorError = true;
|
|
1665
|
+
_iteratorError = err;
|
|
2570
1666
|
} finally {
|
|
2571
1667
|
try {
|
|
2572
|
-
if (!
|
|
1668
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
|
|
2573
1669
|
} finally {
|
|
2574
|
-
if (
|
|
1670
|
+
if (_didIteratorError) throw _iteratorError;
|
|
2575
1671
|
}
|
|
2576
1672
|
}
|
|
2577
1673
|
return true;
|
|
2578
1674
|
}
|
|
2579
1675
|
}
|
|
2580
|
-
if (
|
|
2581
|
-
|
|
1676
|
+
if (walkConditionalValue(state, property, value, ((_state_flatPass = state.flatPass) === null || _state_flatPass === void 0 ? void 0 : _state_flatPass[passParentCursor]) || null, function(payload, cursor, source) {
|
|
1677
|
+
return cursor ? emitUnderCondition(state, property, payload, cursor, void 0, contextOnly, 1, source) : emitValue(state, property, payload, null, payload, contextOnly);
|
|
1678
|
+
}, 1)) return true;
|
|
2582
1679
|
if (value != null) {
|
|
2583
|
-
emitAtParentCondition(state, property, value,
|
|
1680
|
+
emitAtParentCondition(state, property, value, originalValue !== null && originalValue !== void 0 ? originalValue : value, contextOnly);
|
|
2584
1681
|
return true;
|
|
2585
1682
|
}
|
|
2586
1683
|
return false;
|
|
2587
1684
|
}
|
|
2588
1685
|
function clearDirectStyle(state, property) {
|
|
1686
|
+
var _direct_flatAtomics;
|
|
2589
1687
|
var direct = state;
|
|
2590
|
-
var
|
|
2591
|
-
|
|
2592
|
-
var
|
|
2593
|
-
|
|
2594
|
-
if (
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
var
|
|
2599
|
-
function isConditionTransport(value) {
|
|
2600
|
-
return (typeof value === "undefined" ? "undefined" : _type_of(value)) === "object" && value !== null && conditionTransports.has(value);
|
|
2601
|
-
}
|
|
2602
|
-
var transportEntryWidth = 2;
|
|
2603
|
-
function appendConditionEntry(entries, cursor, value) {
|
|
2604
|
-
entries.push(value, conditionTexts[cursor + conditionKeyOffset] || "");
|
|
2605
|
-
}
|
|
2606
|
-
function acquireTransportCursor(state, entries, offset, parent) {
|
|
2607
|
-
var cursor = acquireConditionCursor(parent);
|
|
2608
|
-
var key = entries[offset + 1];
|
|
2609
|
-
if (key) resolveConditionText(state, cursor, key);
|
|
2610
|
-
commitConditionCursor(state, cursor);
|
|
2611
|
-
return cursor;
|
|
2612
|
-
}
|
|
2613
|
-
function mergeConditionTransport(state, prev, cursor, value) {
|
|
2614
|
-
var transport;
|
|
2615
|
-
if (isConditionTransport(prev)) transport = prev;
|
|
2616
|
-
else {
|
|
2617
|
-
transport = {
|
|
2618
|
-
hasBase: false,
|
|
2619
|
-
base: void 0,
|
|
2620
|
-
entries: []
|
|
2621
|
-
};
|
|
2622
|
-
conditionTransports.add(transport);
|
|
2623
|
-
if (prev != null) {
|
|
2624
|
-
var isObjectValue = (typeof prev === "undefined" ? "undefined" : _type_of(prev)) === "object" && !Array.isArray(prev) && !(0, import_createVariable.isVariable)(prev);
|
|
2625
|
-
var objectHasDefault = isObjectValue && Object.prototype.hasOwnProperty.call(prev, "default");
|
|
2626
|
-
var authoredWatermark = conditionCursorTop;
|
|
2627
|
-
try {
|
|
2628
|
-
var firstCursor = isObjectValue && !objectHasDefault ? acquireConditionCursor() : null;
|
|
2629
|
-
if (isObjectValue && classifyConditionalObject(prev, state, void 0, firstCursor || void 0)) {
|
|
2630
|
-
var useFirstCursor = firstCursor !== null;
|
|
2631
|
-
for (var key in prev) {
|
|
2632
|
-
var payload = prev[key];
|
|
2633
|
-
if (payload == null) continue;
|
|
2634
|
-
if (key === "default") {
|
|
2635
|
-
transport.hasBase = true;
|
|
2636
|
-
transport.base = payload;
|
|
2637
|
-
continue;
|
|
2638
|
-
}
|
|
2639
|
-
var watermark = conditionCursorTop;
|
|
2640
|
-
var keyCursor = useFirstCursor ? firstCursor : acquireConditionCursor();
|
|
2641
|
-
if (useFirstCursor) useFirstCursor = false;
|
|
2642
|
-
else {
|
|
2643
|
-
resolveConditionText(state, keyCursor, key);
|
|
2644
|
-
commitConditionCursor(state, keyCursor);
|
|
2645
|
-
}
|
|
2646
|
-
appendConditionEntry(transport.entries, keyCursor, payload);
|
|
2647
|
-
if (keyCursor !== firstCursor) releaseConditionCursors(watermark);
|
|
2648
|
-
}
|
|
2649
|
-
} else {
|
|
2650
|
-
transport.hasBase = true;
|
|
2651
|
-
transport.base = prev;
|
|
2652
|
-
}
|
|
2653
|
-
} finally {
|
|
2654
|
-
releaseConditionCursors(authoredWatermark);
|
|
2655
|
-
}
|
|
2656
|
-
}
|
|
2657
|
-
}
|
|
2658
|
-
var cursorKey = conditionTexts[cursor + conditionKeyOffset] || "";
|
|
2659
|
-
for (var offset = 0; offset < transport.entries.length; offset += transportEntryWidth) if (transport.entries[offset + 1] === cursorKey) {
|
|
2660
|
-
transport.entries.splice(offset, transportEntryWidth);
|
|
2661
|
-
break;
|
|
2662
|
-
}
|
|
2663
|
-
appendConditionEntry(transport.entries, cursor, value);
|
|
2664
|
-
return transport;
|
|
2665
|
-
}
|
|
2666
|
-
var variantValueHandler = {
|
|
2667
|
-
segment(ctx, start, end, isBase, valid, source, chainStart, chainEnd, chainValid) {
|
|
2668
|
-
var _directState_flatPass;
|
|
2669
|
-
var state = ctx[0];
|
|
2670
|
-
var directState = state;
|
|
2671
|
-
if (start === end) return;
|
|
2672
|
-
if (isBase) {
|
|
2673
|
-
feedCompoundSegment(directState, source, start, end, true, valid, "");
|
|
2674
|
-
if (!valid) return;
|
|
2675
|
-
emitResolvedVariant(ctx[1], source.slice(start, end), state, ctx[2], null);
|
|
2676
|
-
return;
|
|
2677
|
-
}
|
|
2678
|
-
if (!valid || !chainValid) return;
|
|
2679
|
-
var cursor = directState.flatScanCursor;
|
|
2680
|
-
var condition = cursor && conditionNumbers[cursor + conditionFlagsOffset] & conditionResolvedFlag ? conditionNumbers[cursor + conditionValueOffset] : 0;
|
|
2681
|
-
feedCompoundSegment(directState, source, start, end, false, Boolean(condition), condition && ((_directState_flatPass = directState.flatPass) === null || _directState_flatPass === void 0 ? void 0 : _directState_flatPass[passCompoundIndexes]) ? conditionTexts[cursor + conditionKeyOffset] || "" : "");
|
|
2682
|
-
if (!condition) return;
|
|
2683
|
-
emitResolvedVariant(ctx[1], source.slice(start, end), state, ctx[2], cursor);
|
|
2684
|
-
},
|
|
2685
|
-
modifier(ctx, start, end, valid, first, source) {
|
|
2686
|
-
var directState = ctx[0];
|
|
2687
|
-
var cursor = directState.flatScanCursor;
|
|
2688
|
-
if (!cursor) cursor = directState.flatScanCursor = acquireConditionCursor();
|
|
2689
|
-
else if (first) resetConditionCursor(cursor, 0);
|
|
2690
|
-
if (!valid) {
|
|
2691
|
-
setConditionUnresolved(cursor);
|
|
2692
|
-
return;
|
|
2693
|
-
}
|
|
2694
|
-
if (conditionNumbers[cursor + conditionFlagsOffset] & conditionResolvedFlag) resolveConditionModifier(ctx[0], cursor, source.slice(start, end));
|
|
2695
|
-
},
|
|
2696
|
-
chain(ctx, _start, _end, valid) {
|
|
2697
|
-
var cursor = ctx[0].flatScanCursor;
|
|
2698
|
-
if (cursor) {
|
|
2699
|
-
if (!valid) setConditionUnresolved(cursor);
|
|
2700
|
-
if (conditionNumbers[cursor + conditionFlagsOffset] & conditionResolvedFlag) commitConditionCursor(ctx[0], cursor);
|
|
2701
|
-
}
|
|
2702
|
-
return true;
|
|
2703
|
-
}
|
|
2704
|
-
};
|
|
2705
|
-
var contextPropSets = /* @__PURE__ */ new WeakMap();
|
|
2706
|
-
function getContextPropSet(staticConfig) {
|
|
2707
|
-
var _staticConfig_parentStaticConfig, _staticConfig_parentStaticConfig1, _staticConfig_parentStaticConfig2, _staticConfig_parentStaticConfig_context, _staticConfig_parentStaticConfig3;
|
|
2708
|
-
var cached = contextPropSets.get(staticConfig);
|
|
2709
|
-
if (cached !== void 0) return cached;
|
|
2710
|
-
var contextConfig = staticConfig.context || ((_staticConfig_parentStaticConfig = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig === void 0 ? void 0 : _staticConfig_parentStaticConfig.context);
|
|
2711
|
-
var inheritedContextPropKeys = !staticConfig.context || staticConfig.context === ((_staticConfig_parentStaticConfig1 = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig1 === void 0 ? void 0 : _staticConfig_parentStaticConfig1.context) ? (_staticConfig_parentStaticConfig2 = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig2 === void 0 ? void 0 : _staticConfig_parentStaticConfig2.contextProps : void 0;
|
|
2712
|
-
var contextPropKeys = staticConfig.contextProps || inheritedContextPropKeys;
|
|
2713
|
-
var set = null;
|
|
2714
|
-
if (contextConfig === null || contextConfig === void 0 ? void 0 : contextConfig.props) {
|
|
2715
|
-
set || (set = /* @__PURE__ */ new Set());
|
|
2716
|
-
for (var key in contextConfig.props) set.add(key);
|
|
2717
|
-
}
|
|
2718
|
-
if (contextPropKeys) {
|
|
2719
|
-
set || (set = /* @__PURE__ */ new Set());
|
|
2720
|
-
var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = void 0;
|
|
2721
|
-
try {
|
|
2722
|
-
for (var _iterator2 = contextPropKeys[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
|
|
2723
|
-
var key1 = _step2.value;
|
|
2724
|
-
set.add(key1);
|
|
2725
|
-
}
|
|
2726
|
-
} catch (err) {
|
|
2727
|
-
_didIteratorError2 = true;
|
|
2728
|
-
_iteratorError2 = err;
|
|
2729
|
-
} finally {
|
|
2730
|
-
try {
|
|
2731
|
-
if (!_iteratorNormalCompletion2 && _iterator2.return != null) _iterator2.return();
|
|
2732
|
-
} finally {
|
|
2733
|
-
if (_didIteratorError2) throw _iteratorError2;
|
|
1688
|
+
var propertyKind = (0, import_grammarConfig.getConfigRevisionState)(state.conf).propertyKind(property);
|
|
1689
|
+
var atomicKey = property.startsWith("transition") ? "transition" : propertyKind > 0 && propertyKind < 5 ? "boxShadow" : propertyKind === 6 ? "textShadow" : propertyKind === 5 ? "transform" : property;
|
|
1690
|
+
var slot = atomicKey;
|
|
1691
|
+
(_direct_flatAtomics = direct.flatAtomics) === null || _direct_flatAtomics === void 0 || _direct_flatAtomics.delete(slot);
|
|
1692
|
+
if (direct.flatSlots) {
|
|
1693
|
+
if (slot !== atomicKey) {
|
|
1694
|
+
var entries = direct.flatSlots.get(slot);
|
|
1695
|
+
if (entries) {
|
|
1696
|
+
for (var index = entries.length; index--;) if (entries[index][0] === atomicKey) entries.splice(index, 1);
|
|
2734
1697
|
}
|
|
2735
1698
|
}
|
|
1699
|
+
direct.flatSlots.delete(atomicKey);
|
|
2736
1700
|
}
|
|
2737
|
-
if (
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
for (var _iterator12 = contextConfig.propKeys[Symbol.iterator](), _step12; !(_iteratorNormalCompletion12 = (_step12 = _iterator12.next()).done); _iteratorNormalCompletion12 = true) {
|
|
2742
|
-
var key2 = _step12.value;
|
|
2743
|
-
set.add(key2);
|
|
2744
|
-
}
|
|
2745
|
-
} catch (err) {
|
|
2746
|
-
_didIteratorError12 = true;
|
|
2747
|
-
_iteratorError12 = err;
|
|
2748
|
-
} finally {
|
|
2749
|
-
try {
|
|
2750
|
-
if (!_iteratorNormalCompletion12 && _iterator12.return != null) _iterator12.return();
|
|
2751
|
-
} finally {
|
|
2752
|
-
if (_didIteratorError12) throw _iteratorError12;
|
|
2753
|
-
}
|
|
2754
|
-
}
|
|
2755
|
-
}
|
|
2756
|
-
var parentPropKeys = (_staticConfig_parentStaticConfig3 = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig3 === void 0 ? void 0 : (_staticConfig_parentStaticConfig_context = _staticConfig_parentStaticConfig3.context) === null || _staticConfig_parentStaticConfig_context === void 0 ? void 0 : _staticConfig_parentStaticConfig_context.propKeys;
|
|
2757
|
-
if (parentPropKeys) {
|
|
2758
|
-
set || (set = /* @__PURE__ */ new Set());
|
|
2759
|
-
var _iteratorNormalCompletion22 = true, _didIteratorError22 = false, _iteratorError22 = void 0;
|
|
2760
|
-
try {
|
|
2761
|
-
for (var _iterator22 = parentPropKeys[Symbol.iterator](), _step22; !(_iteratorNormalCompletion22 = (_step22 = _iterator22.next()).done); _iteratorNormalCompletion22 = true) {
|
|
2762
|
-
var key3 = _step22.value;
|
|
2763
|
-
set.add(key3);
|
|
2764
|
-
}
|
|
2765
|
-
} catch (err) {
|
|
2766
|
-
_didIteratorError22 = true;
|
|
2767
|
-
_iteratorError22 = err;
|
|
2768
|
-
} finally {
|
|
2769
|
-
try {
|
|
2770
|
-
if (!_iteratorNormalCompletion22 && _iterator22.return != null) _iterator22.return();
|
|
2771
|
-
} finally {
|
|
2772
|
-
if (_didIteratorError22) throw _iteratorError22;
|
|
2773
|
-
}
|
|
2774
|
-
}
|
|
2775
|
-
}
|
|
2776
|
-
contextPropSets.set(staticConfig, set);
|
|
2777
|
-
return set;
|
|
2778
|
-
}
|
|
2779
|
-
function emitMappedValue(styleState, key, value, originalValue, nestedCondition, parentCondition, fallbackOriginal) {
|
|
2780
|
-
var nested = nestedCondition;
|
|
2781
|
-
var parent = parentCondition;
|
|
2782
|
-
var resolvedCondition = nested !== null && nested !== void 0 ? nested : parent;
|
|
2783
|
-
var watermark = conditionCursorTop;
|
|
2784
|
-
if (nested && parent) {
|
|
2785
|
-
var composed = acquireConditionCursor(parent);
|
|
2786
|
-
var nestedKey = conditionTexts[nested + conditionKeyOffset] || "";
|
|
2787
|
-
if (nestedKey) resolveConditionText(styleState, composed, nestedKey);
|
|
2788
|
-
if (!(conditionNumbers[nested + conditionFlagsOffset] & conditionResolvedFlag)) setConditionUnresolved(composed);
|
|
2789
|
-
commitConditionCursor(styleState, composed);
|
|
2790
|
-
resolvedCondition = composed;
|
|
2791
|
-
}
|
|
2792
|
-
var conf = styleState.conf;
|
|
2793
|
-
if (key === "fontFamily" || key === conf.inverseShorthands.fontFamily) styleState.fontFamily = getFontFamilyFromNameOrVariable(value, conf);
|
|
2794
|
-
mapContributedProp(styleState, key, value, originalValue !== null && originalValue !== void 0 ? originalValue : fallbackOriginal, resolvedCondition);
|
|
2795
|
-
releaseConditionCursors(watermark);
|
|
2796
|
-
}
|
|
2797
|
-
var contributeMappedValue = function(key, value, styleState, disabled, parentCondition, fallbackOriginal) {
|
|
2798
|
-
if (disabled) return emitMappedValue(styleState, key, value, void 0, void 0, parentCondition, fallbackOriginal);
|
|
2799
|
-
var { conf, styleProps, staticConfig } = styleState;
|
|
2800
|
-
var { variants } = staticConfig;
|
|
2801
|
-
var { disableExpandShorthands, noExpand, resolveValues } = styleProps;
|
|
2802
|
-
var shorthands = conf.shorthands;
|
|
2803
|
-
if (value === "unset") {
|
|
2804
|
-
var expandedKey = !disableExpandShorthands && shorthands[key] || key;
|
|
2805
|
-
var expanded = noExpand ? null : (0, import_expandStyle.expandStyle)(expandedKey, value, conf.settings.styleCompat || "web");
|
|
2806
|
-
var used = styleState.flatUsed;
|
|
2807
|
-
if (expanded) {
|
|
2808
|
-
var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = void 0;
|
|
2809
|
-
try {
|
|
2810
|
-
for (var _iterator2 = expanded[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
|
|
2811
|
-
var [nkey] = _step2.value;
|
|
2812
|
-
if (used) delete used[nkey];
|
|
2813
|
-
if (styleState.style) delete styleState.style[nkey];
|
|
2814
|
-
}
|
|
2815
|
-
} catch (err) {
|
|
2816
|
-
_didIteratorError2 = true;
|
|
2817
|
-
_iteratorError2 = err;
|
|
2818
|
-
} finally {
|
|
2819
|
-
try {
|
|
2820
|
-
if (!_iteratorNormalCompletion2 && _iterator2.return != null) _iterator2.return();
|
|
2821
|
-
} finally {
|
|
2822
|
-
if (_didIteratorError2) throw _iteratorError2;
|
|
2823
|
-
}
|
|
2824
|
-
}
|
|
2825
|
-
} else {
|
|
2826
|
-
if (used) delete used[expandedKey];
|
|
2827
|
-
if (styleState.style) delete styleState.style[expandedKey];
|
|
2828
|
-
}
|
|
2829
|
-
return;
|
|
2830
|
-
}
|
|
2831
|
-
if (!noExpand) {
|
|
2832
|
-
if (variants && key in variants) {
|
|
2833
|
-
resolveVariants(key, value, styleProps, styleState, key);
|
|
2834
|
-
return;
|
|
2835
|
-
}
|
|
2836
|
-
}
|
|
2837
|
-
if (!disableExpandShorthands) {
|
|
2838
|
-
if (key in shorthands) key = shorthands[key];
|
|
2839
|
-
}
|
|
2840
|
-
var originalValue = value;
|
|
2841
|
-
if (value === "safe" && (0, import_resolveSafeArea.isSafeAreaKey)(key)) {
|
|
2842
|
-
var expanded1 = (0, import_resolveSafeArea.expandSafeAreaValue)(key);
|
|
2843
|
-
if (expanded1) {
|
|
2844
|
-
for (var i = 0; i < expanded1.length; i++) {
|
|
2845
|
-
var [nkey1, nvalue] = expanded1[i];
|
|
2846
|
-
emitMappedValue(styleState, nkey1, nvalue, originalValue, void 0, parentCondition, fallbackOriginal);
|
|
2847
|
-
}
|
|
2848
|
-
return;
|
|
2849
|
-
}
|
|
2850
|
-
}
|
|
2851
|
-
if (value != null) {
|
|
2852
|
-
if (typeof value === "string") value = (0, import_resolveRem.isRemValue)(value) ? (0, import_resolveRem.resolveRem)(value) : value;
|
|
2853
|
-
else if ((0, import_createVariable.isVariable)(value)) value = (0, import_resolveVariableValue.resolveVariableValue)(key, value, resolveValues);
|
|
2854
|
-
else if ((0, import_resolveRem.isRemValue)(value)) value = (0, import_resolveRem.resolveRem)(value);
|
|
2855
|
-
}
|
|
2856
|
-
if (value != null) {
|
|
2857
|
-
if (key === "fontFamily" && typeof originalValue === "string") {
|
|
2858
|
-
if (originalValue in conf.fontsParsed) styleState.fontFamily = originalValue;
|
|
2859
|
-
}
|
|
2860
|
-
var expanded2 = noExpand || typeof value === "string" ? null : (0, import_expandStyle.expandStyle)(key, value, conf.settings.styleCompat || "web");
|
|
2861
|
-
if (expanded2) {
|
|
2862
|
-
var max = expanded2.length;
|
|
2863
|
-
for (var i1 = 0; i1 < max; i1++) {
|
|
2864
|
-
var [nkey2, nvalue1, noriginalValue] = expanded2[i1];
|
|
2865
|
-
emitMappedValue(styleState, nkey2, nvalue1, noriginalValue !== null && noriginalValue !== void 0 ? noriginalValue : originalValue, void 0, parentCondition, fallbackOriginal);
|
|
2866
|
-
}
|
|
2867
|
-
} else emitMappedValue(styleState, key, value, originalValue, void 0, parentCondition, fallbackOriginal);
|
|
2868
|
-
}
|
|
2869
|
-
};
|
|
2870
|
-
function resolveVariants(key, value, styleProps, styleState, parentVariantKey) {
|
|
2871
|
-
var _styleState_staticConfig_variants;
|
|
2872
|
-
var variantDefinition = (_styleState_staticConfig_variants = styleState.staticConfig.variants) === null || _styleState_staticConfig_variants === void 0 ? void 0 : _styleState_staticConfig_variants[key];
|
|
2873
|
-
if (isConditionTransport(value)) {
|
|
2874
|
-
if (value.hasBase) emitResolvedVariant(key, value.base, styleState, parentVariantKey, null);
|
|
2875
|
-
for (var offset = 0; offset < value.entries.length;) {
|
|
2876
|
-
var entryValue = value.entries[offset];
|
|
2877
|
-
var watermark = conditionCursorTop;
|
|
2878
|
-
try {
|
|
2879
|
-
emitResolvedVariant(key, entryValue, styleState, parentVariantKey, acquireTransportCursor(styleState, value.entries, offset, null));
|
|
2880
|
-
} finally {
|
|
2881
|
-
releaseConditionCursors(watermark);
|
|
2882
|
-
}
|
|
2883
|
-
offset += transportEntryWidth;
|
|
2884
|
-
}
|
|
2885
|
-
return;
|
|
2886
|
-
}
|
|
2887
|
-
if (typeof value === "string" && !(variantDefinition && (typeof variantDefinition === "undefined" ? "undefined" : _type_of(variantDefinition)) === "object" && value in variantDefinition)) {
|
|
2888
|
-
var directState = styleState;
|
|
2889
|
-
var watermark1 = conditionCursorTop;
|
|
2890
|
-
var previousCursor = directState.flatScanCursor;
|
|
2891
|
-
directState.flatScanCursor = null;
|
|
2892
|
-
try {
|
|
2893
|
-
(0, import_runtime.scanFlatValue)(value, variantValueHandler, [
|
|
2894
|
-
styleState,
|
|
2895
|
-
key,
|
|
2896
|
-
parentVariantKey
|
|
2897
|
-
]);
|
|
2898
|
-
} finally {
|
|
2899
|
-
directState.flatScanCursor = previousCursor;
|
|
2900
|
-
releaseConditionCursors(watermark1);
|
|
2901
|
-
}
|
|
2902
|
-
return;
|
|
2903
|
-
}
|
|
2904
|
-
var isObjectValue = value && (typeof value === "undefined" ? "undefined" : _type_of(value)) === "object" && !Array.isArray(value) && !(0, import_createVariable.isVariable)(value);
|
|
2905
|
-
var objectHasDefault = isObjectValue && Object.prototype.hasOwnProperty.call(value, "default");
|
|
2906
|
-
var objectWatermark = conditionCursorTop;
|
|
2907
|
-
try {
|
|
2908
|
-
var firstCursor = isObjectValue && !objectHasDefault ? acquireConditionCursor() : null;
|
|
2909
|
-
if (isObjectValue && classifyConditionalObject(value, styleState, void 0, firstCursor || void 0)) {
|
|
2910
|
-
var useFirstCursor = firstCursor !== null;
|
|
2911
|
-
for (var objKey in value) {
|
|
2912
|
-
var _directState_flatPass;
|
|
2913
|
-
var payload = value[objKey];
|
|
2914
|
-
if (payload == null) continue;
|
|
2915
|
-
var directState1 = styleState;
|
|
2916
|
-
var payloadString = String(payload);
|
|
2917
|
-
if (objKey === "default") {
|
|
2918
|
-
feedCompoundSegment(directState1, payloadString, 0, payloadString.length, true, true, "");
|
|
2919
|
-
emitResolvedVariant(key, payload, styleState, parentVariantKey, null);
|
|
2920
|
-
continue;
|
|
2921
|
-
}
|
|
2922
|
-
var watermark2 = conditionCursorTop;
|
|
2923
|
-
var cursor1 = useFirstCursor ? firstCursor : acquireConditionCursor();
|
|
2924
|
-
var condition = conditionNumbers[cursor1 + conditionValueOffset];
|
|
2925
|
-
if (useFirstCursor) useFirstCursor = false;
|
|
2926
|
-
else {
|
|
2927
|
-
resolveConditionText(styleState, cursor1, objKey);
|
|
2928
|
-
condition = commitConditionCursor(styleState, cursor1);
|
|
2929
|
-
}
|
|
2930
|
-
if ((_directState_flatPass = directState1.flatPass) === null || _directState_flatPass === void 0 ? void 0 : _directState_flatPass[passCompoundIndexes]) feedCompoundSegment(directState1, payloadString, 0, payloadString.length, false, Boolean(condition), condition ? conditionTexts[cursor1 + conditionKeyOffset] || "" : "");
|
|
2931
|
-
emitResolvedVariant(key, payload, styleState, parentVariantKey, cursor1);
|
|
2932
|
-
if (cursor1 !== firstCursor) releaseConditionCursors(watermark2);
|
|
2933
|
-
}
|
|
2934
|
-
return;
|
|
2935
|
-
}
|
|
2936
|
-
} finally {
|
|
2937
|
-
releaseConditionCursors(objectWatermark);
|
|
2938
|
-
}
|
|
2939
|
-
emitResolvedVariant(key, value, styleState, parentVariantKey, null);
|
|
1701
|
+
if (atomicKey === "transform") state.transformAccumulator = void 0;
|
|
1702
|
+
if (state.style) delete state.style[atomicKey];
|
|
1703
|
+
delete state.classNames[atomicKey];
|
|
1704
|
+
delete state.classNames[slot];
|
|
2940
1705
|
}
|
|
2941
|
-
function
|
|
2942
|
-
var
|
|
2943
|
-
var
|
|
2944
|
-
|
|
2945
|
-
if (
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
2949
|
-
console.groupCollapsed(`\u2666\uFE0F\u2666\uFE0F\u2666\uFE0F resolve variant ${key}`);
|
|
2950
|
-
console.info({
|
|
2951
|
-
key,
|
|
2952
|
-
value,
|
|
2953
|
-
variantValue,
|
|
2954
|
-
variants
|
|
2955
|
-
});
|
|
2956
|
-
console.groupEnd();
|
|
2957
|
-
}
|
|
2958
|
-
if (!variantValue) {
|
|
2959
|
-
if (process.env.TAMAGUI_WARN_ON_MISSING_VARIANT === "1") {
|
|
2960
|
-
if (typeof value !== "boolean") {
|
|
2961
|
-
var name = styleState.styleProps.displayName || "[UnnamedComponent]";
|
|
2962
|
-
console.warn(`No variant found: ${name} has variant "${key}", but no matching value "${value}"`);
|
|
2963
|
-
}
|
|
2964
|
-
}
|
|
2965
|
-
return;
|
|
2966
|
-
}
|
|
2967
|
-
if (typeof variantValue === "function") {
|
|
2968
|
-
variantValue = variantValue(value, (0, import_getVariantExtras.getVariantExtras)(styleState));
|
|
2969
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose" && false);
|
|
2970
|
-
}
|
|
2971
|
-
if (!(0, import_isObj2.isObj)(variantValue)) return;
|
|
2972
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") console.info(` expanding styles from `, variantValue);
|
|
2973
|
-
var { noSkip } = styleProps;
|
|
2974
|
-
var originals = import_styleOriginalValues.styleOriginalValues.get(variantValue);
|
|
2975
|
-
var directState = styleState;
|
|
2976
|
-
directState.flatCompoundOutputDepth = (directState.flatCompoundOutputDepth || 0) + 1;
|
|
2977
|
-
try {
|
|
2978
|
-
for (var outputKey in variantValue) {
|
|
2979
|
-
if (!noSkip && outputKey in import_skipProps.skipProps) continue;
|
|
2980
|
-
var rawOutputValue = variantValue[outputKey];
|
|
2981
|
-
var outputValue = styleProps.noNormalize ? rawOutputValue : (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(rawOutputValue, conf.shorthands[outputKey] || outputKey);
|
|
2982
|
-
var _originals_outputKey;
|
|
2983
|
-
var originalValue = (_originals_outputKey = originals === null || originals === void 0 ? void 0 : originals[outputKey]) !== null && _originals_outputKey !== void 0 ? _originals_outputKey : rawOutputValue;
|
|
2984
|
-
var contextPropSet = getContextPropSet(staticConfig);
|
|
2985
|
-
if (contextPropSet === null || contextPropSet === void 0 ? void 0 : contextPropSet.has(outputKey)) {
|
|
2986
|
-
var _styleState, _styleState1;
|
|
2987
|
-
(_styleState = styleState).overriddenContextProps || (_styleState.overriddenContextProps = {});
|
|
2988
|
-
styleState.overriddenContextProps[outputKey] = originalValue;
|
|
2989
|
-
(_styleState1 = styleState).originalContextPropValues || (_styleState1.originalContextPropValues = {});
|
|
2990
|
-
styleState.originalContextPropValues[outputKey] = originalValue;
|
|
2991
|
-
}
|
|
2992
|
-
contributeMappedValue(outputKey, outputValue, styleState, parentVariantKey === key && outputKey === key, conditionCursor || void 0, originalValue);
|
|
2993
|
-
}
|
|
2994
|
-
} finally {
|
|
2995
|
-
directState.flatCompoundOutputDepth--;
|
|
1706
|
+
function emitVariantStyle(state, key, value, original, condition, disabled) {
|
|
1707
|
+
var _state_flatCallerVariantKeys, _state_flatStyleStaticConfig_styledContextKeys;
|
|
1708
|
+
var pass = state.flatPass;
|
|
1709
|
+
if (key !== pass[passMapSourceKey] && ((_state_flatCallerVariantKeys = state.flatCallerVariantKeys) === null || _state_flatCallerVariantKeys === void 0 ? void 0 : _state_flatCallerVariantKeys.has(key))) return;
|
|
1710
|
+
if ((_state_flatStyleStaticConfig_styledContextKeys = state.flatStyleStaticConfig.styledContextKeys) === null || _state_flatStyleStaticConfig_styledContextKeys === void 0 ? void 0 : _state_flatStyleStaticConfig_styledContextKeys.has(key)) {
|
|
1711
|
+
var _state, _state1;
|
|
1712
|
+
((_state = state).overriddenContextProps || (_state.overriddenContextProps = {}))[key] = ((_state1 = state).originalContextPropValues || (_state1.originalContextPropValues = {}))[key] = original;
|
|
2996
1713
|
}
|
|
1714
|
+
var parent = pass[passParentCursor];
|
|
1715
|
+
pass[passParentCursor] = condition;
|
|
1716
|
+
contributeProp(pass, key, value, original, disabled);
|
|
1717
|
+
pass[passParentCursor] = parent;
|
|
2997
1718
|
}
|
|
2998
1719
|
function getFontFamilyFromNameOrVariable(input, conf) {
|
|
2999
1720
|
if ((0, import_createVariable.isVariable)(input)) {
|
|
@@ -3009,124 +1730,3 @@ function getFontFamilyFromNameOrVariable(input, conf) {
|
|
|
3009
1730
|
} else if (typeof input === "string" && input in conf.fontsParsed) return input;
|
|
3010
1731
|
}
|
|
3011
1732
|
var variableToFontNameCache = /* @__PURE__ */ new WeakMap();
|
|
3012
|
-
function getVariantDefinition(variant, value, conf, param) {
|
|
3013
|
-
var { theme } = param;
|
|
3014
|
-
if (!variant) return;
|
|
3015
|
-
if (value === void 0) return;
|
|
3016
|
-
if (typeof variant === "function") return variant;
|
|
3017
|
-
if (Object.prototype.hasOwnProperty.call(variant, value)) return variant[value];
|
|
3018
|
-
var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = void 0;
|
|
3019
|
-
try {
|
|
3020
|
-
for (var _iterator2 = getCompiledVariantResolvers(variant)[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
|
|
3021
|
-
var { key, parts } = _step2.value;
|
|
3022
|
-
var _iteratorNormalCompletion12 = true, _didIteratorError12 = false, _iteratorError12 = void 0;
|
|
3023
|
-
try {
|
|
3024
|
-
for (var _iterator12 = parts[Symbol.iterator](), _step12; !(_iteratorNormalCompletion12 = (_step12 = _iterator12.next()).done); _iteratorNormalCompletion12 = true) {
|
|
3025
|
-
var part3 = _step12.value;
|
|
3026
|
-
if (matchesVariantResolver(part3, value, conf, theme)) return variant[key];
|
|
3027
|
-
}
|
|
3028
|
-
} catch (err) {
|
|
3029
|
-
_didIteratorError12 = true;
|
|
3030
|
-
_iteratorError12 = err;
|
|
3031
|
-
} finally {
|
|
3032
|
-
try {
|
|
3033
|
-
if (!_iteratorNormalCompletion12 && _iterator12.return != null) _iterator12.return();
|
|
3034
|
-
} finally {
|
|
3035
|
-
if (_didIteratorError12) throw _iteratorError12;
|
|
3036
|
-
}
|
|
3037
|
-
}
|
|
3038
|
-
}
|
|
3039
|
-
} catch (err) {
|
|
3040
|
-
_didIteratorError2 = true;
|
|
3041
|
-
_iteratorError2 = err;
|
|
3042
|
-
} finally {
|
|
3043
|
-
try {
|
|
3044
|
-
if (!_iteratorNormalCompletion2 && _iterator2.return != null) _iterator2.return();
|
|
3045
|
-
} finally {
|
|
3046
|
-
if (_didIteratorError2) throw _iteratorError2;
|
|
3047
|
-
}
|
|
3048
|
-
}
|
|
3049
|
-
}
|
|
3050
|
-
var variantResolverNameSet = new Set(import_types.variantResolverNames);
|
|
3051
|
-
var variantResolverCache = /* @__PURE__ */ new WeakMap();
|
|
3052
|
-
var preparedStyleStaticConfigs = /* @__PURE__ */ new WeakSet();
|
|
3053
|
-
function prepareStyleStaticConfig(staticConfig) {
|
|
3054
|
-
if (preparedStyleStaticConfigs.has(staticConfig)) return staticConfig;
|
|
3055
|
-
preparedStyleStaticConfigs.add(staticConfig);
|
|
3056
|
-
getContextPropSet(staticConfig);
|
|
3057
|
-
prepareStaticConfigCompounds(staticConfig);
|
|
3058
|
-
var variants = staticConfig.variants;
|
|
3059
|
-
if (variants) for (var key in variants) {
|
|
3060
|
-
var variant = variants[key];
|
|
3061
|
-
if (variant && (typeof variant === "undefined" ? "undefined" : _type_of(variant)) === "object") getCompiledVariantResolvers(variant);
|
|
3062
|
-
}
|
|
3063
|
-
return staticConfig;
|
|
3064
|
-
}
|
|
3065
|
-
function getCompiledVariantResolvers(variant) {
|
|
3066
|
-
var cached = variantResolverCache.get(variant);
|
|
3067
|
-
if (cached) return cached;
|
|
3068
|
-
var compiled = [];
|
|
3069
|
-
for (var key in variant) {
|
|
3070
|
-
var parts = parseVariantResolverKey(key);
|
|
3071
|
-
if (parts) compiled.push({
|
|
3072
|
-
key,
|
|
3073
|
-
parts
|
|
3074
|
-
});
|
|
3075
|
-
}
|
|
3076
|
-
variantResolverCache.set(variant, compiled);
|
|
3077
|
-
return compiled;
|
|
3078
|
-
}
|
|
3079
|
-
function parseVariantResolverKey(key) {
|
|
3080
|
-
if (!key) return null;
|
|
3081
|
-
var parts = [];
|
|
3082
|
-
var start = 0;
|
|
3083
|
-
for (var index = 0; index <= key.length; index++) {
|
|
3084
|
-
if (index !== key.length && key.charCodeAt(index) !== 124) continue;
|
|
3085
|
-
var partStart = start;
|
|
3086
|
-
var partEnd = index;
|
|
3087
|
-
while (partStart < partEnd && key.charCodeAt(partStart) <= 32) partStart++;
|
|
3088
|
-
while (partEnd > partStart && key.charCodeAt(partEnd - 1) <= 32) partEnd--;
|
|
3089
|
-
if (partStart === partEnd) return null;
|
|
3090
|
-
var part3 = key.slice(partStart, partEnd);
|
|
3091
|
-
if (!variantResolverNameSet.has(part3)) return null;
|
|
3092
|
-
parts.push(part3);
|
|
3093
|
-
start = index + 1;
|
|
3094
|
-
}
|
|
3095
|
-
return parts;
|
|
3096
|
-
}
|
|
3097
|
-
function hasNumericPrefix(value, suffixLength) {
|
|
3098
|
-
if (value.length <= suffixLength) return false;
|
|
3099
|
-
return Number.isFinite(Number(value.slice(0, value.length - suffixLength)));
|
|
3100
|
-
}
|
|
3101
|
-
function matchesVariantResolver(resolverName, value, conf, theme) {
|
|
3102
|
-
var string = typeof value === "string";
|
|
3103
|
-
var number = typeof value === "number";
|
|
3104
|
-
var rem = string && value.endsWith("rem") && hasNumericPrefix(value, 3);
|
|
3105
|
-
switch (resolverName) {
|
|
3106
|
-
case "Size":
|
|
3107
|
-
case "Space":
|
|
3108
|
-
case "Radius":
|
|
3109
|
-
case "ZIndex": return value === true || number || string || resolverName !== "Size" && (0, import_createVariable.isVariable)(value);
|
|
3110
|
-
case "Color": return value != null && value in conf.tokensParsed.color || string;
|
|
3111
|
-
case "Theme": return string && !!theme && value in theme;
|
|
3112
|
-
case "FontSize":
|
|
3113
|
-
var _conf_fontsParsed_body_size, _conf_fontsParsed_body;
|
|
3114
|
-
return value === true || !!((_conf_fontsParsed_body = conf.fontsParsed.body) === null || _conf_fontsParsed_body === void 0 ? void 0 : (_conf_fontsParsed_body_size = _conf_fontsParsed_body.size) === null || _conf_fontsParsed_body_size === void 0 ? void 0 : _conf_fontsParsed_body_size[value]) || number || rem;
|
|
3115
|
-
case "FontStyle":
|
|
3116
|
-
var _conf_fontsParsed_body_style, _conf_fontsParsed_body1;
|
|
3117
|
-
return !!((_conf_fontsParsed_body1 = conf.fontsParsed.body) === null || _conf_fontsParsed_body1 === void 0 ? void 0 : (_conf_fontsParsed_body_style = _conf_fontsParsed_body1.style) === null || _conf_fontsParsed_body_style === void 0 ? void 0 : _conf_fontsParsed_body_style[value]) || value === "normal" || value === "italic";
|
|
3118
|
-
case "FontTransform":
|
|
3119
|
-
var _conf_fontsParsed_body_transform, _conf_fontsParsed_body2;
|
|
3120
|
-
return !!((_conf_fontsParsed_body2 = conf.fontsParsed.body) === null || _conf_fontsParsed_body2 === void 0 ? void 0 : (_conf_fontsParsed_body_transform = _conf_fontsParsed_body2.transform) === null || _conf_fontsParsed_body_transform === void 0 ? void 0 : _conf_fontsParsed_body_transform[value]) || value === "none" || value === "capitalize" || value === "uppercase" || value === "lowercase";
|
|
3121
|
-
case "FontLineHeight":
|
|
3122
|
-
var _conf_fontsParsed_body_lineHeight, _conf_fontsParsed_body3;
|
|
3123
|
-
return !!((_conf_fontsParsed_body3 = conf.fontsParsed.body) === null || _conf_fontsParsed_body3 === void 0 ? void 0 : (_conf_fontsParsed_body_lineHeight = _conf_fontsParsed_body3.lineHeight) === null || _conf_fontsParsed_body_lineHeight === void 0 ? void 0 : _conf_fontsParsed_body_lineHeight[value]) || number || rem;
|
|
3124
|
-
case "FontLetterSpacing":
|
|
3125
|
-
var _conf_fontsParsed_body_letterSpacing, _conf_fontsParsed_body4;
|
|
3126
|
-
return !!((_conf_fontsParsed_body4 = conf.fontsParsed.body) === null || _conf_fontsParsed_body4 === void 0 ? void 0 : (_conf_fontsParsed_body_letterSpacing = _conf_fontsParsed_body4.letterSpacing) === null || _conf_fontsParsed_body_letterSpacing === void 0 ? void 0 : _conf_fontsParsed_body_letterSpacing[value]) || number || rem;
|
|
3127
|
-
case "number":
|
|
3128
|
-
case "string":
|
|
3129
|
-
case "boolean": return (typeof value === "undefined" ? "undefined" : _type_of(value)) === resolverName;
|
|
3130
|
-
case "any": return true;
|
|
3131
|
-
}
|
|
3132
|
-
}
|