@tamagui/web 3.0.0-beta.831.1 → 3.0.0-beta.889.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/createComponent.cjs +12 -1
- package/dist/cjs/createComponent.native.cjs +12 -1
- package/dist/cjs/createComponent.native.js +12 -1
- package/dist/cjs/createComponent.native.js.map +1 -1
- package/dist/cjs/createStyledHOC.cjs +1 -1
- package/dist/cjs/createStyledHOC.native.cjs +1 -1
- package/dist/cjs/createStyledHOC.native.js +1 -1
- package/dist/cjs/createStyledHOC.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/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/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 +6 -6
- package/dist/cjs/helpers/formatDiagnostic.native.cjs +6 -6
- package/dist/cjs/helpers/formatDiagnostic.native.js +6 -6
- package/dist/cjs/helpers/formatDiagnostic.native.js.map +1 -1
- package/dist/cjs/helpers/getCSSStylesAtomic.cjs +128 -109
- 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 +1042 -1715
- package/dist/cjs/helpers/getSplitStyles.native.cjs +1081 -1887
- package/dist/cjs/helpers/getSplitStyles.native.js +1081 -1887
- 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/styleStaticConfig.cjs +1 -50
- package/dist/cjs/helpers/styleStaticConfig.native.cjs +1 -51
- package/dist/cjs/helpers/styleStaticConfig.native.js +1 -51
- package/dist/cjs/helpers/styleStaticConfig.native.js.map +1 -1
- 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 +15 -38
- package/dist/cjs/helpers/tokenCategories.native.cjs +15 -40
- package/dist/cjs/helpers/tokenCategories.native.js +15 -40
- 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/{helpers/directStyleCSS.native.js → hooks/useStyle.cjs} +16 -8
- package/dist/cjs/{helpers/directStyleCSS.native.cjs → hooks/useStyle.native.cjs} +16 -4
- 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 +6 -3
- package/dist/cjs/index.native.cjs +6 -3
- package/dist/cjs/index.native.js +6 -3
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/static-resolve.cjs +2 -2
- package/dist/cjs/static-resolve.native.cjs +2 -2
- package/dist/cjs/static-resolve.native.js +2 -2
- 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 +11 -6
- package/dist/cjs/styled.native.cjs +11 -6
- package/dist/cjs/styled.native.js +11 -6
- package/dist/cjs/styled.native.js.map +1 -1
- package/dist/cjs/types.cjs +6 -4
- package/dist/cjs/types.native.cjs +6 -4
- package/dist/cjs/types.native.js +6 -4
- 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 +17 -12
- package/dist/cjs/views/Text.native.cjs +1 -0
- package/dist/cjs/views/Text.native.js +1 -0
- package/dist/cjs/views/Text.native.js.map +1 -1
- package/dist/cjs/views/Theme.cjs +3 -3
- package/dist/cjs/views/Theme.native.cjs +3 -3
- package/dist/cjs/views/Theme.native.js +3 -3
- package/dist/cjs/views/Theme.native.js.map +1 -1
- package/dist/cjs/views/ThemeDebug.cjs +1 -4
- package/dist/esm/createComponent.mjs +12 -1
- package/dist/esm/createComponent.mjs.map +1 -1
- package/dist/esm/createComponent.native.js +12 -1
- package/dist/esm/createComponent.native.js.map +1 -1
- package/dist/esm/createStyledHOC.mjs +1 -1
- package/dist/esm/createStyledHOC.mjs.map +1 -1
- package/dist/esm/createStyledHOC.native.js +1 -1
- package/dist/esm/createStyledHOC.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/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/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 +6 -6
- package/dist/esm/helpers/formatDiagnostic.mjs.map +1 -1
- package/dist/esm/helpers/formatDiagnostic.native.js +6 -6
- package/dist/esm/helpers/formatDiagnostic.native.js.map +1 -1
- package/dist/esm/helpers/getCSSStylesAtomic.mjs +126 -109
- 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 +1034 -1705
- package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
- package/dist/esm/helpers/getSplitStyles.native.js +1071 -1871
- 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/styleStaticConfig.mjs +1 -50
- package/dist/esm/helpers/styleStaticConfig.mjs.map +1 -1
- package/dist/esm/helpers/styleStaticConfig.native.js +1 -51
- package/dist/esm/helpers/styleStaticConfig.native.js.map +1 -1
- 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 +15 -36
- package/dist/esm/helpers/tokenCategories.mjs.map +1 -1
- package/dist/esm/helpers/tokenCategories.native.js +15 -38
- 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/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 +6 -4
- package/dist/esm/index.mjs +6 -4
- package/dist/esm/index.native.js +6 -4
- package/dist/esm/static-resolve.mjs +3 -3
- package/dist/esm/static-resolve.mjs.map +1 -1
- package/dist/esm/static-resolve.native.js +3 -3
- 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 +12 -6
- package/dist/esm/styled.mjs.map +1 -1
- package/dist/esm/styled.native.js +12 -6
- package/dist/esm/styled.native.js.map +1 -1
- package/dist/esm/types.mjs +3 -4
- package/dist/esm/types.mjs.map +1 -1
- package/dist/esm/types.native.js +3 -4
- 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 +17 -12
- package/dist/esm/views/Text.mjs.map +1 -1
- package/dist/esm/views/Theme.mjs +3 -3
- package/dist/esm/views/Theme.mjs.map +1 -1
- package/dist/esm/views/Theme.native.js +3 -3
- 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/package.json +15 -15
- package/src/createComponent.tsx +21 -1
- package/src/createStyledHOC.tsx +4 -2
- package/src/createVariable.ts +0 -10
- package/src/helpers/borderComponents.ts +62 -0
- package/src/helpers/createDesignSystem.ts +0 -2
- package/src/helpers/createStyledContext.tsx +15 -53
- package/src/helpers/formatDiagnostic.ts +9 -9
- package/src/helpers/getCSSStylesAtomic.native.ts +6 -3
- package/src/helpers/getCSSStylesAtomic.ts +192 -207
- package/src/helpers/getCSSStylesAtomicCompiled.ts +13 -1
- package/src/helpers/getDynamicVal.ts +4 -0
- package/src/helpers/getSplitStyles.tsx +2080 -3270
- 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/styleFrontend.ts +8 -5
- package/src/helpers/styleStaticConfig.ts +5 -72
- package/src/helpers/styleStaticConfigCore.ts +110 -0
- package/src/helpers/styledDynamic.ts +191 -0
- package/src/helpers/tokenCategories.ts +40 -65
- 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/useStyle.ts +10 -0
- package/src/hooks/useThemeState.ts +51 -264
- package/src/index.ts +6 -6
- package/src/internalRuntimeTypes.ts +1 -0
- package/src/static-resolve.ts +7 -4
- package/src/style.ts +97 -0
- package/src/styled.tsx +39 -68
- package/src/types.tsx +105 -169
- package/src/views/TamaguiProvider.tsx +0 -2
- package/src/views/Text.tsx +20 -14
- package/src/views/Theme.tsx +13 -9
- package/src/views/ThemeDebug.tsx +0 -1
- package/types/createComponent.d.ts.map +1 -1
- package/types/createStyledHOC.d.ts +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/helpers/borderComponents.d.ts +10 -0
- package/types/helpers/borderComponents.d.ts.map +1 -0
- package/types/helpers/createDesignSystem.d.ts.map +1 -1
- package/types/helpers/createStyledContext.d.ts.map +1 -1
- package/types/helpers/getCSSStylesAtomic.d.ts +20 -19
- 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 +3 -5
- 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/styleFrontend.d.ts +3 -5
- package/types/helpers/styleFrontend.d.ts.map +1 -1
- package/types/helpers/styleStaticConfig.d.ts +4 -9
- package/types/helpers/styleStaticConfig.d.ts.map +1 -1
- 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/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 +6 -4
- package/types/index.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.map +1 -1
- package/types/style.d.ts +18 -0
- package/types/style.d.ts.map +1 -0
- package/types/styled.d.ts +10 -10
- package/types/styled.d.ts.map +1 -1
- package/types/types.d.ts +74 -49
- 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/dist/cjs/helpers/directStyleCSS.cjs +0 -345
- 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/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/variantResolvers.cjs +0 -87
- package/dist/cjs/helpers/variantResolvers.native.cjs +0 -140
- package/dist/cjs/helpers/variantResolvers.native.js +0 -142
- package/dist/cjs/helpers/variantResolvers.native.js.map +0 -1
- package/dist/esm/helpers/directStyleCSS.mjs +0 -317
- 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/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/variantResolvers.mjs +0 -65
- package/dist/esm/helpers/variantResolvers.mjs.map +0 -1
- package/dist/esm/helpers/variantResolvers.native.js +0 -116
- package/dist/esm/helpers/variantResolvers.native.js.map +0 -1
- package/src/helpers/directStyleCSS.native.ts +0 -1
- package/src/helpers/directStyleCSS.ts +0 -513
- package/src/helpers/directStyleCSSCompiled.ts +0 -32
- package/src/helpers/getVariantExtras.tsx +0 -95
- package/src/helpers/variantResolvers.ts +0 -121
- 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/getVariantExtras.d.ts +0 -4
- package/types/helpers/getVariantExtras.d.ts.map +0 -1
- package/types/helpers/variantResolvers.d.ts +0 -9
- package/types/helpers/variantResolvers.d.ts.map +0 -1
|
@@ -1,345 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all) __defProp(target, name, {
|
|
7
|
-
get: all[name],
|
|
8
|
-
enumerable: true
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
-
get: () => from[key],
|
|
15
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
-
var directStyleCSS_exports = {};
|
|
22
|
-
__export(directStyleCSS_exports, {
|
|
23
|
-
addComposition: () => addComposition,
|
|
24
|
-
canGenerateCSS: () => canGenerateCSS,
|
|
25
|
-
clearFrameAtomic: () => clearFrameAtomic,
|
|
26
|
-
completeStreamingCSS: () => completeStreamingCSS,
|
|
27
|
-
directStyleSignature: () => directStyleSignature,
|
|
28
|
-
flushDirectStyles: () => flushDirectStyles,
|
|
29
|
-
requestBorderStyleDefault: () => requestBorderStyleDefault,
|
|
30
|
-
streamAtomic: () => streamAtomic
|
|
31
|
-
});
|
|
32
|
-
module.exports = __toCommonJS(directStyleCSS_exports);
|
|
33
|
-
var import_helpers = require("@tamagui/helpers");
|
|
34
|
-
var import_runtime = require("@tamagui/style-grammar/runtime");
|
|
35
|
-
var import_getCSSStylesAtomic = require("./getCSSStylesAtomic.cjs");
|
|
36
|
-
var import_normalizeValueWithProperty = require("./normalizeValueWithProperty.cjs");
|
|
37
|
-
var import_insertStyleRule = require("./insertStyleRule.cjs");
|
|
38
|
-
var import_transformsToString = require("./transformsToString.cjs");
|
|
39
|
-
const canGenerateCSS = !process.env.TAMAGUI_DID_OUTPUT_CSS;
|
|
40
|
-
function requestBorderStyleDefault(state, property, condition, identity, selector, wrapperSource, wrapperStart, wrapperCount) {
|
|
41
|
-
if (!canGenerateCSS || !state.flatShouldDoClasses) return;
|
|
42
|
-
if (state.styleProps.noNormalize === false) return;
|
|
43
|
-
const target = borderStyleDefaults[property];
|
|
44
|
-
if (!target) return;
|
|
45
|
-
const requests = state.flatBorderDefaultRequests ||= [];
|
|
46
|
-
for (let index = 0; index < requests.length; index++) if (requests[index][0] === target && requests[index][3] === identity) return;
|
|
47
|
-
requests.push([
|
|
48
|
-
target,
|
|
49
|
-
"solid",
|
|
50
|
-
condition,
|
|
51
|
-
identity,
|
|
52
|
-
selector,
|
|
53
|
-
wrapperSource,
|
|
54
|
-
wrapperStart,
|
|
55
|
-
wrapperCount
|
|
56
|
-
]);
|
|
57
|
-
}
|
|
58
|
-
function directStyleSignature(property, value, conditionKey = "") {
|
|
59
|
-
return `${property}${conditionKey}${String(value)}`;
|
|
60
|
-
}
|
|
61
|
-
const borderStyleDefaults = {
|
|
62
|
-
borderWidth: "borderStyle",
|
|
63
|
-
borderTopWidth: "borderTopStyle",
|
|
64
|
-
borderRightWidth: "borderRightStyle",
|
|
65
|
-
borderBottomWidth: "borderBottomStyle",
|
|
66
|
-
borderLeftWidth: "borderLeftStyle"
|
|
67
|
-
};
|
|
68
|
-
function registerSlot(state, atomicKey, entries) {
|
|
69
|
-
const ordered = [];
|
|
70
|
-
for (let index = 0; index < entries.length; index++) {
|
|
71
|
-
const entry = entries[index];
|
|
72
|
-
let value = entry[1];
|
|
73
|
-
if (entry[0] === "transform" && Array.isArray(value)) value = (0, import_transformsToString.transformsToString)(value);
|
|
74
|
-
entry[1] = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(value, entry[0]);
|
|
75
|
-
const precedence = entry[2] ? Math.floor(entry[2] / 256) : -1;
|
|
76
|
-
let insertAt = ordered.length;
|
|
77
|
-
while (insertAt > 0) {
|
|
78
|
-
const before = ordered[insertAt - 1];
|
|
79
|
-
if ((before[2] ? Math.floor(before[2] / 256) : -1) <= precedence) break;
|
|
80
|
-
insertAt--;
|
|
81
|
-
}
|
|
82
|
-
ordered.splice(insertAt, 0, entry);
|
|
83
|
-
}
|
|
84
|
-
let signature = "";
|
|
85
|
-
for (let index = 0; index < ordered.length; index++) {
|
|
86
|
-
const entry = ordered[index];
|
|
87
|
-
signature += directStyleSignature(entry[0], entry[1], entry[3]);
|
|
88
|
-
}
|
|
89
|
-
const built = (0, import_getCSSStylesAtomic.buildAtomicSlotCSS)(atomicKey, ordered, signature);
|
|
90
|
-
if (!built) return;
|
|
91
|
-
const styleObject = built[3] ||= [
|
|
92
|
-
atomicKey,
|
|
93
|
-
built[2],
|
|
94
|
-
built[0],
|
|
95
|
-
void 0,
|
|
96
|
-
built[1]
|
|
97
|
-
];
|
|
98
|
-
(state.flatAtomics ||= {})[atomicKey] = styleObject;
|
|
99
|
-
state.classNames[atomicKey] = built[0];
|
|
100
|
-
}
|
|
101
|
-
const scratchEntry = [
|
|
102
|
-
"",
|
|
103
|
-
"",
|
|
104
|
-
0,
|
|
105
|
-
"",
|
|
106
|
-
"",
|
|
107
|
-
void 0,
|
|
108
|
-
0,
|
|
109
|
-
0
|
|
110
|
-
];
|
|
111
|
-
const singleSlot = [scratchEntry];
|
|
112
|
-
function appendSlotEntry(list, property, value, condition, identity, selector, wrapperSource, wrapperStart, wrapperCount, weak, original) {
|
|
113
|
-
for (let index = 0; index < list.length; index++) if (list[index][3] === identity) {
|
|
114
|
-
if (weak) return;
|
|
115
|
-
list[index][1] = value;
|
|
116
|
-
list[index][2] = condition;
|
|
117
|
-
list[index][8] = original;
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
120
|
-
list.push([
|
|
121
|
-
property,
|
|
122
|
-
value,
|
|
123
|
-
condition,
|
|
124
|
-
identity,
|
|
125
|
-
selector,
|
|
126
|
-
wrapperSource,
|
|
127
|
-
wrapperStart,
|
|
128
|
-
wrapperCount,
|
|
129
|
-
original
|
|
130
|
-
]);
|
|
131
|
-
}
|
|
132
|
-
function streamAtomic(state, property, value, condition, identity, selector, wrapperSource, wrapperStart, wrapperCount, weak, original) {
|
|
133
|
-
if (!canGenerateCSS) return;
|
|
134
|
-
const direct = state;
|
|
135
|
-
const slots = direct.flatSlots;
|
|
136
|
-
if (slots) {
|
|
137
|
-
const slot = slots[property];
|
|
138
|
-
if (slot) {
|
|
139
|
-
appendSlotEntry(slot, property, value, condition, identity, selector, wrapperSource, wrapperStart, wrapperCount, weak, original);
|
|
140
|
-
return;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
const singleEntries = direct.flatSingleEntries;
|
|
144
|
-
const singleEntry = singleEntries ? singleEntries[property] : void 0;
|
|
145
|
-
const atomics = direct.flatAtomics;
|
|
146
|
-
const streamed = atomics ? atomics[property] : void 0;
|
|
147
|
-
if (singleEntry) {
|
|
148
|
-
if (singleEntry[3] !== identity) {
|
|
149
|
-
delete singleEntries[property];
|
|
150
|
-
appendSlotEntry((direct.flatSlots ||= {})[property] = [singleEntry], property, value, condition, identity, selector, wrapperSource, wrapperStart, wrapperCount, weak, original);
|
|
151
|
-
return;
|
|
152
|
-
}
|
|
153
|
-
if (weak) return;
|
|
154
|
-
} else if (streamed !== void 0) {
|
|
155
|
-
if (identity) {
|
|
156
|
-
appendSlotEntry((direct.flatSlots ||= {})[property] = [[
|
|
157
|
-
property,
|
|
158
|
-
streamed[1],
|
|
159
|
-
0,
|
|
160
|
-
"",
|
|
161
|
-
"",
|
|
162
|
-
void 0,
|
|
163
|
-
0,
|
|
164
|
-
0
|
|
165
|
-
]], property, value, condition, identity, selector, wrapperSource, wrapperStart, wrapperCount, weak, original);
|
|
166
|
-
return;
|
|
167
|
-
}
|
|
168
|
-
if (weak) return;
|
|
169
|
-
} else if (weak && state.classNames[property] !== void 0) return;
|
|
170
|
-
else if (direct.flatExpectMulti === true || direct.flatDeferCSS === true) {
|
|
171
|
-
appendSlotEntry((direct.flatSlots ||= {})[property] = [], property, value, condition, identity, selector, wrapperSource, wrapperStart, wrapperCount, weak, original);
|
|
172
|
-
return;
|
|
173
|
-
}
|
|
174
|
-
if (!identity) {
|
|
175
|
-
const memo = (0, import_getCSSStylesAtomic.probeRawSlotIdentity)(property, value);
|
|
176
|
-
if (memo) {
|
|
177
|
-
const styleObject2 = memo[3] ||= [
|
|
178
|
-
property,
|
|
179
|
-
memo[2],
|
|
180
|
-
memo[0],
|
|
181
|
-
void 0,
|
|
182
|
-
memo[1]
|
|
183
|
-
];
|
|
184
|
-
(direct.flatAtomics ||= {})[property] = styleObject2;
|
|
185
|
-
state.classNames[property] = memo[0];
|
|
186
|
-
return;
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
const rawValue = value;
|
|
190
|
-
if (property === "transform" && Array.isArray(value)) value = (0, import_transformsToString.transformsToString)(value);
|
|
191
|
-
const normalized = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(value, property);
|
|
192
|
-
scratchEntry[0] = property;
|
|
193
|
-
scratchEntry[1] = normalized;
|
|
194
|
-
scratchEntry[2] = condition;
|
|
195
|
-
scratchEntry[3] = identity;
|
|
196
|
-
scratchEntry[4] = selector;
|
|
197
|
-
scratchEntry[5] = wrapperSource;
|
|
198
|
-
scratchEntry[6] = wrapperStart;
|
|
199
|
-
scratchEntry[7] = wrapperCount;
|
|
200
|
-
const built = (0, import_getCSSStylesAtomic.buildAtomicSlotCSS)(property, singleSlot, directStyleSignature(property, normalized, identity));
|
|
201
|
-
scratchEntry[5] = void 0;
|
|
202
|
-
scratchEntry[1] = "";
|
|
203
|
-
if (!built) return;
|
|
204
|
-
if (!identity) (0, import_getCSSStylesAtomic.storeRawSlotIdentity)(property, rawValue, built);
|
|
205
|
-
if (identity) (direct.flatSingleEntries ||= {})[property] = [
|
|
206
|
-
property,
|
|
207
|
-
normalized,
|
|
208
|
-
condition,
|
|
209
|
-
identity,
|
|
210
|
-
selector,
|
|
211
|
-
wrapperSource,
|
|
212
|
-
wrapperStart,
|
|
213
|
-
wrapperCount
|
|
214
|
-
];
|
|
215
|
-
const styleObject = built[3] ||= [
|
|
216
|
-
property,
|
|
217
|
-
built[2],
|
|
218
|
-
built[0],
|
|
219
|
-
void 0,
|
|
220
|
-
built[1]
|
|
221
|
-
];
|
|
222
|
-
(direct.flatAtomics ||= {})[property] = styleObject;
|
|
223
|
-
state.classNames[property] = built[0];
|
|
224
|
-
}
|
|
225
|
-
function completeStreamingCSS(state) {
|
|
226
|
-
if (!canGenerateCSS) return;
|
|
227
|
-
const direct = state;
|
|
228
|
-
const cssMode = !!state.flatShouldDoClasses;
|
|
229
|
-
const singleEntries = direct.flatSingleEntries;
|
|
230
|
-
const requests = direct.flatBorderDefaultRequests;
|
|
231
|
-
if (cssMode && requests) {
|
|
232
|
-
direct.flatBorderDefaultRequests = void 0;
|
|
233
|
-
for (let index = 0; index < requests.length; index++) {
|
|
234
|
-
const request = requests[index];
|
|
235
|
-
const target = request[0];
|
|
236
|
-
const targetSingle = singleEntries ? singleEntries[target] : void 0;
|
|
237
|
-
if (targetSingle) {
|
|
238
|
-
if (targetSingle[3] === request[3]) continue;
|
|
239
|
-
delete singleEntries[target];
|
|
240
|
-
((direct.flatSlots ||= {})[target] = [targetSingle]).push(request);
|
|
241
|
-
continue;
|
|
242
|
-
}
|
|
243
|
-
const slot = direct.flatSlots ? direct.flatSlots[target] : void 0;
|
|
244
|
-
if (slot) {
|
|
245
|
-
let covered = false;
|
|
246
|
-
for (let t = 0; t < slot.length; t++) if (!slot[t][2] || slot[t][3] === request[3]) {
|
|
247
|
-
covered = true;
|
|
248
|
-
break;
|
|
249
|
-
}
|
|
250
|
-
if (!covered) slot.push(request);
|
|
251
|
-
continue;
|
|
252
|
-
}
|
|
253
|
-
if (direct.flatAtomics && direct.flatAtomics[target] !== void 0) continue;
|
|
254
|
-
if (state.classNames[target] !== void 0) continue;
|
|
255
|
-
registerSlot(direct, target, [request]);
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
if (cssMode && state.transformAccumulator) {
|
|
259
|
-
const transform = (0, import_runtime.finalizeTransformAccumulator)(state.transformAccumulator);
|
|
260
|
-
state.transformAccumulator = void 0;
|
|
261
|
-
const accumulated = [
|
|
262
|
-
"transform",
|
|
263
|
-
Array.isArray(transform) ? (0, import_transformsToString.transformsToString)(transform) : transform,
|
|
264
|
-
0,
|
|
265
|
-
"",
|
|
266
|
-
"",
|
|
267
|
-
void 0,
|
|
268
|
-
0,
|
|
269
|
-
0
|
|
270
|
-
];
|
|
271
|
-
const slot = direct.flatSlots ? direct.flatSlots.transform : void 0;
|
|
272
|
-
const transformSingle = singleEntries ? singleEntries.transform : void 0;
|
|
273
|
-
if (slot) slot.unshift(accumulated);
|
|
274
|
-
else if (transformSingle) {
|
|
275
|
-
delete singleEntries.transform;
|
|
276
|
-
(direct.flatSlots ||= {}).transform = [accumulated, transformSingle];
|
|
277
|
-
} else (direct.flatSlots ||= {}).transform = [accumulated];
|
|
278
|
-
}
|
|
279
|
-
const slots = direct.flatSlots;
|
|
280
|
-
if (slots) {
|
|
281
|
-
direct.flatSlots = void 0;
|
|
282
|
-
for (const property in slots) registerSlot(direct, property, slots[property]);
|
|
283
|
-
}
|
|
284
|
-
const transitions = direct.flatTransitions;
|
|
285
|
-
if (transitions) {
|
|
286
|
-
direct.flatTransitions = void 0;
|
|
287
|
-
registerSlot(direct, "transition", transitions);
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
function flushDirectStyles(state, clear = false) {
|
|
291
|
-
if (!canGenerateCSS) {
|
|
292
|
-
if (clear) state.flatAtomics = void 0;
|
|
293
|
-
return;
|
|
294
|
-
}
|
|
295
|
-
const direct = state;
|
|
296
|
-
const atomics = direct.flatAtomics;
|
|
297
|
-
if (!atomics) return;
|
|
298
|
-
for (const property in atomics) {
|
|
299
|
-
const styleObject = atomics[property];
|
|
300
|
-
const identifier = styleObject[import_helpers.StyleObjectIdentifier];
|
|
301
|
-
if ((0, import_insertStyleRule.shouldInsertStyleRules)(identifier)) {
|
|
302
|
-
const rules = styleObject[import_helpers.StyleObjectRules].slice();
|
|
303
|
-
styleObject[import_helpers.StyleObjectRules] = rules;
|
|
304
|
-
(0, import_insertStyleRule.updateRules)(identifier, rules);
|
|
305
|
-
state.flatRulesToInsert[identifier] = styleObject;
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
if (clear) direct.flatAtomics = void 0;
|
|
309
|
-
}
|
|
310
|
-
function addComposition(state, property) {
|
|
311
|
-
if (!canGenerateCSS || state.classNames[property]) return;
|
|
312
|
-
const value = property === "translate" ? "var(--t-x, 0px) var(--t-y, 0px)" : "var(--t-scale-x, 1) var(--t-scale-y, 1)";
|
|
313
|
-
const defaults = property === "translate" ? "--t-x:0px;--t-y:0px" : "--t-scale-x:1;--t-scale-y:1";
|
|
314
|
-
scratchEntry[0] = property;
|
|
315
|
-
scratchEntry[1] = value;
|
|
316
|
-
scratchEntry[2] = 0;
|
|
317
|
-
scratchEntry[3] = "";
|
|
318
|
-
scratchEntry[4] = "";
|
|
319
|
-
scratchEntry[5] = void 0;
|
|
320
|
-
scratchEntry[6] = 0;
|
|
321
|
-
scratchEntry[7] = 0;
|
|
322
|
-
const built = (0, import_getCSSStylesAtomic.buildAtomicSlotCSS)(property, singleSlot, directStyleSignature(property, value, ""));
|
|
323
|
-
if (!built) return;
|
|
324
|
-
const identifier = built[0];
|
|
325
|
-
const rules = built[1].slice();
|
|
326
|
-
rules.unshift(`:where(.${identifier}){${defaults}}`);
|
|
327
|
-
if ((0, import_insertStyleRule.shouldInsertStyleRules)(identifier)) {
|
|
328
|
-
(0, import_insertStyleRule.updateRules)(identifier, rules);
|
|
329
|
-
state.flatRulesToInsert[identifier] = [
|
|
330
|
-
property,
|
|
331
|
-
built[2],
|
|
332
|
-
identifier,
|
|
333
|
-
void 0,
|
|
334
|
-
rules
|
|
335
|
-
];
|
|
336
|
-
}
|
|
337
|
-
state.classNames[property] = identifier;
|
|
338
|
-
}
|
|
339
|
-
function clearFrameAtomic(state, atomicKey) {
|
|
340
|
-
const direct = state;
|
|
341
|
-
if (direct.flatAtomics) delete direct.flatAtomics[atomicKey];
|
|
342
|
-
if (direct.flatSingleEntries) delete direct.flatSingleEntries[atomicKey];
|
|
343
|
-
if (direct.flatSlots) delete direct.flatSlots[atomicKey];
|
|
344
|
-
if (atomicKey === "transition") direct.flatTransitions = void 0;
|
|
345
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"directStyleCSS.native.js","names":[],"sources":["cjs/helpers/directStyleCSS.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar directStyleCSS_native_exports = {};\nmodule.exports = __toCommonJS(directStyleCSS_native_exports);\n__reExport(directStyleCSS_native_exports, require(\"./directStyleCSSCompiled\"), module.exports);\n//# sourceMappingURL=directStyleCSS.native.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,cAAc,QAAQ,KAAK,kBAAkB,YAAY,QAAQ,KAAK,SAAS,GAAG,gBAAgB,YAAY,cAAc,KAAK,SAAS;AAC9I,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,gCAAgC,CAAC;AACrC,OAAO,UAAU,aAAa,6BAA6B;AAC3D,WAAW,+BAA+B,QAAQ,oCAA0B,GAAG,OAAO,OAAO"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all) __defProp(target, name, {
|
|
7
|
-
get: all[name],
|
|
8
|
-
enumerable: true
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
-
get: () => from[key],
|
|
15
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
-
var directStyleCSSCompiled_exports = {};
|
|
22
|
-
__export(directStyleCSSCompiled_exports, {
|
|
23
|
-
addComposition: () => addComposition,
|
|
24
|
-
canGenerateCSS: () => canGenerateCSS,
|
|
25
|
-
clearFrameAtomic: () => clearFrameAtomic,
|
|
26
|
-
completeStreamingCSS: () => completeStreamingCSS,
|
|
27
|
-
directStyleSignature: () => directStyleSignature,
|
|
28
|
-
flushDirectStyles: () => flushDirectStyles,
|
|
29
|
-
requestBorderStyleDefault: () => requestBorderStyleDefault,
|
|
30
|
-
streamAtomic: () => streamAtomic
|
|
31
|
-
});
|
|
32
|
-
module.exports = __toCommonJS(directStyleCSSCompiled_exports);
|
|
33
|
-
const canGenerateCSS = false;
|
|
34
|
-
const directStyleSignature = () => "";
|
|
35
|
-
function streamAtomic(_state, _property, _value, _condition, _identity, _selector, _wrapperSource, _wrapperStart, _wrapperCount, _weak, _original) {}
|
|
36
|
-
function completeStreamingCSS(_state) {}
|
|
37
|
-
function requestBorderStyleDefault(_state, _property, _condition, _identity, _selector, _wrapperSource, _wrapperStart, _wrapperCount) {}
|
|
38
|
-
function flushDirectStyles(_state, _clear = false) {}
|
|
39
|
-
function addComposition(_state, _property) {}
|
|
40
|
-
function clearFrameAtomic(_state, _atomicKey) {}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all) __defProp(target, name, {
|
|
9
|
-
get: all[name],
|
|
10
|
-
enumerable: true
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
-
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
-
get: () => from[key],
|
|
17
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
return to;
|
|
21
|
-
};
|
|
22
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
|
-
var directStyleCSSCompiled_exports = {};
|
|
24
|
-
__export(directStyleCSSCompiled_exports, {
|
|
25
|
-
addComposition: () => addComposition,
|
|
26
|
-
canGenerateCSS: () => canGenerateCSS,
|
|
27
|
-
clearFrameAtomic: () => clearFrameAtomic,
|
|
28
|
-
completeStreamingCSS: () => completeStreamingCSS,
|
|
29
|
-
directStyleSignature: () => directStyleSignature,
|
|
30
|
-
flushDirectStyles: () => flushDirectStyles,
|
|
31
|
-
requestBorderStyleDefault: () => requestBorderStyleDefault,
|
|
32
|
-
streamAtomic: () => streamAtomic
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(directStyleCSSCompiled_exports);
|
|
35
|
-
var canGenerateCSS = false;
|
|
36
|
-
var directStyleSignature = function() {
|
|
37
|
-
return "";
|
|
38
|
-
};
|
|
39
|
-
function streamAtomic(_state, _property, _value, _condition, _identity, _selector, _wrapperSource, _wrapperStart, _wrapperCount, _weak, _original) {}
|
|
40
|
-
function completeStreamingCSS(_state) {}
|
|
41
|
-
function requestBorderStyleDefault(_state, _property, _condition, _identity, _selector, _wrapperSource, _wrapperStart, _wrapperCount) {}
|
|
42
|
-
function flushDirectStyles(_state) {
|
|
43
|
-
var _clear = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
|
44
|
-
}
|
|
45
|
-
function addComposition(_state, _property) {}
|
|
46
|
-
function clearFrameAtomic(_state, _atomicKey) {}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all) __defProp(target, name, {
|
|
9
|
-
get: all[name],
|
|
10
|
-
enumerable: true
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
-
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
-
get: () => from[key],
|
|
17
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
return to;
|
|
21
|
-
};
|
|
22
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
|
-
var directStyleCSSCompiled_exports = {};
|
|
24
|
-
__export(directStyleCSSCompiled_exports, {
|
|
25
|
-
addComposition: () => addComposition,
|
|
26
|
-
canGenerateCSS: () => canGenerateCSS,
|
|
27
|
-
clearFrameAtomic: () => clearFrameAtomic,
|
|
28
|
-
completeStreamingCSS: () => completeStreamingCSS,
|
|
29
|
-
directStyleSignature: () => directStyleSignature,
|
|
30
|
-
flushDirectStyles: () => flushDirectStyles,
|
|
31
|
-
requestBorderStyleDefault: () => requestBorderStyleDefault,
|
|
32
|
-
streamAtomic: () => streamAtomic
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(directStyleCSSCompiled_exports);
|
|
35
|
-
var canGenerateCSS = false;
|
|
36
|
-
var directStyleSignature = function() {
|
|
37
|
-
return "";
|
|
38
|
-
};
|
|
39
|
-
function streamAtomic(_state, _property, _value, _condition, _identity, _selector, _wrapperSource, _wrapperStart, _wrapperCount, _weak, _original) {}
|
|
40
|
-
function completeStreamingCSS(_state) {}
|
|
41
|
-
function requestBorderStyleDefault(_state, _property, _condition, _identity, _selector, _wrapperSource, _wrapperStart, _wrapperCount) {}
|
|
42
|
-
function flushDirectStyles(_state) {
|
|
43
|
-
var _clear = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
|
44
|
-
}
|
|
45
|
-
function addComposition(_state, _property) {}
|
|
46
|
-
function clearFrameAtomic(_state, _atomicKey) {}
|
|
47
|
-
|
|
48
|
-
//# sourceMappingURL=directStyleCSSCompiled.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"directStyleCSSCompiled.native.js","names":[],"sources":["cjs/helpers/directStyleCSSCompiled.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar directStyleCSSCompiled_exports = {};\n__export(directStyleCSSCompiled_exports, {\n addComposition: () => addComposition,\n canGenerateCSS: () => canGenerateCSS,\n clearFrameAtomic: () => clearFrameAtomic,\n completeStreamingCSS: () => completeStreamingCSS,\n directStyleSignature: () => directStyleSignature,\n flushDirectStyles: () => flushDirectStyles,\n requestBorderStyleDefault: () => requestBorderStyleDefault,\n streamAtomic: () => streamAtomic\n});\nmodule.exports = __toCommonJS(directStyleCSSCompiled_exports);\nvar canGenerateCSS = false;\nvar directStyleSignature = function() {\n return \"\";\n};\nfunction streamAtomic(_state, _property, _value, _condition, _identity, _selector, _wrapperSource, _wrapperStart, _wrapperCount, _weak, _original) {\n}\nfunction completeStreamingCSS(_state) {\n}\nfunction requestBorderStyleDefault(_state, _property, _condition, _identity, _selector, _wrapperSource, _wrapperStart, _wrapperCount) {\n}\nfunction flushDirectStyles(_state) {\n var _clear = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;\n}\nfunction addComposition(_state, _property) {\n}\nfunction clearFrameAtomic(_state, _atomicKey) {\n}\n//# sourceMappingURL=directStyleCSSCompiled.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,iCAAiC,CAAC;AACtC,SAAS,gCAAgC;CACvC,sBAAsB;CACtB,sBAAsB;CACtB,wBAAwB;CACxB,4BAA4B;CAC5B,4BAA4B;CAC5B,yBAAyB;CACzB,iCAAiC;CACjC,oBAAoB;AACtB,CAAC;AACD,OAAO,UAAU,aAAa,8BAA8B;AAC5D,IAAI,iBAAiB;AACrB,IAAI,uBAAuB,WAAW;CACpC,OAAO;AACT;AACA,SAAS,aAAa,QAAQ,WAAW,QAAQ,YAAY,WAAW,WAAW,gBAAgB,eAAe,eAAe,OAAO,WAAW,CACnJ;AACA,SAAS,qBAAqB,QAAQ,CACtC;AACA,SAAS,0BAA0B,QAAQ,WAAW,YAAY,WAAW,WAAW,gBAAgB,eAAe,eAAe,CACtI;AACA,SAAS,kBAAkB,QAAQ;CACjC,IAAI,SAAS,UAAU,SAAS,KAAK,UAAU,OAAO,KAAK,IAAI,UAAU,KAAK;AAChF;AACA,SAAS,eAAe,QAAQ,WAAW,CAC3C;AACA,SAAS,iBAAiB,QAAQ,YAAY,CAC9C"}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all) __defProp(target, name, {
|
|
7
|
-
get: all[name],
|
|
8
|
-
enumerable: true
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
-
get: () => from[key],
|
|
15
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
-
var getVariantExtras_exports = {};
|
|
22
|
-
__export(getVariantExtras_exports, {
|
|
23
|
-
getFontsForLanguage: () => getFontsForLanguage,
|
|
24
|
-
getVariantExtras: () => getVariantExtras
|
|
25
|
-
});
|
|
26
|
-
module.exports = __toCommonJS(getVariantExtras_exports);
|
|
27
|
-
var import_config = require("../config.cjs");
|
|
28
|
-
var import_createVariable = require("../createVariable.cjs");
|
|
29
|
-
const cache = /* @__PURE__ */ new WeakMap();
|
|
30
|
-
const getVariantExtras = (styleState) => {
|
|
31
|
-
const cached = cache.get(styleState);
|
|
32
|
-
if (cached?.props === styleState.props) {
|
|
33
|
-
return cached.value;
|
|
34
|
-
}
|
|
35
|
-
const { props, conf, context, theme, styleProps } = styleState;
|
|
36
|
-
const styledContext = styleProps.styledContext;
|
|
37
|
-
let fonts = conf.fontsParsed;
|
|
38
|
-
if (context?.language) {
|
|
39
|
-
fonts = getFontsForLanguage(conf.fontsParsed, context.language);
|
|
40
|
-
}
|
|
41
|
-
const next = {
|
|
42
|
-
fonts,
|
|
43
|
-
tokens: conf.tokensParsed,
|
|
44
|
-
theme,
|
|
45
|
-
context: styledContext,
|
|
46
|
-
get fontFamily() {
|
|
47
|
-
return (0, import_createVariable.getVariableValue)(styleState.fontFamily || styleState.props.fontFamily) || props.fontFamily || (0, import_createVariable.getVariableValue)((0, import_config.getSetting)("defaultFont"));
|
|
48
|
-
},
|
|
49
|
-
get font() {
|
|
50
|
-
const found = fonts[this.fontFamily];
|
|
51
|
-
if (found) return found;
|
|
52
|
-
const className = props.className;
|
|
53
|
-
if (typeof className === "string") {
|
|
54
|
-
let start = 0;
|
|
55
|
-
for (let index = 0; index <= className.length; index++) {
|
|
56
|
-
if (index !== className.length && className.charCodeAt(index) > 32) continue;
|
|
57
|
-
if (index - start > 5 && className.charCodeAt(start) === 102 && className.charCodeAt(start + 1) === 111 && className.charCodeAt(start + 2) === 110 && className.charCodeAt(start + 3) === 116 && className.charCodeAt(start + 4) === 95) {
|
|
58
|
-
const name = className.slice(start + 5, index);
|
|
59
|
-
if (fonts[name]) return fonts[name];
|
|
60
|
-
}
|
|
61
|
-
start = index + 1;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
return fonts[conf.defaultFontToken];
|
|
65
|
-
},
|
|
66
|
-
props
|
|
67
|
-
};
|
|
68
|
-
cache.set(styleState, {
|
|
69
|
-
props,
|
|
70
|
-
value: next
|
|
71
|
-
});
|
|
72
|
-
return next;
|
|
73
|
-
};
|
|
74
|
-
const fontLanguageCache = /* @__PURE__ */ new WeakMap();
|
|
75
|
-
function getFontsForLanguage(fonts, language) {
|
|
76
|
-
if (fontLanguageCache.has(language)) {
|
|
77
|
-
return fontLanguageCache.get(language);
|
|
78
|
-
}
|
|
79
|
-
const next = {
|
|
80
|
-
...fonts,
|
|
81
|
-
...Object.fromEntries(Object.entries(language).flatMap(([name, lang]) => {
|
|
82
|
-
if (lang === "default") {
|
|
83
|
-
return [];
|
|
84
|
-
}
|
|
85
|
-
const langKey = `${name}_${lang}`;
|
|
86
|
-
return [[name, fonts[langKey]]];
|
|
87
|
-
}))
|
|
88
|
-
};
|
|
89
|
-
fontLanguageCache.set(language, next);
|
|
90
|
-
return next;
|
|
91
|
-
}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all) __defProp(target, name, {
|
|
9
|
-
get: all[name],
|
|
10
|
-
enumerable: true
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
-
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
-
get: () => from[key],
|
|
17
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
return to;
|
|
21
|
-
};
|
|
22
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
|
-
var getVariantExtras_exports = {};
|
|
24
|
-
__export(getVariantExtras_exports, {
|
|
25
|
-
getFontsForLanguage: () => getFontsForLanguage,
|
|
26
|
-
getVariantExtras: () => getVariantExtras
|
|
27
|
-
});
|
|
28
|
-
module.exports = __toCommonJS(getVariantExtras_exports);
|
|
29
|
-
var import_config = require("../config.native.js");
|
|
30
|
-
var import_createVariable = require("../createVariable.native.js");
|
|
31
|
-
var cache = /* @__PURE__ */ new WeakMap();
|
|
32
|
-
var getVariantExtras = function(styleState) {
|
|
33
|
-
var cached = cache.get(styleState);
|
|
34
|
-
if ((cached === null || cached === void 0 ? void 0 : cached.props) === styleState.props) {
|
|
35
|
-
return cached.value;
|
|
36
|
-
}
|
|
37
|
-
var { props, conf, context, theme, styleProps } = styleState;
|
|
38
|
-
var styledContext = styleProps.styledContext;
|
|
39
|
-
var fonts = conf.fontsParsed;
|
|
40
|
-
if (context === null || context === void 0 ? void 0 : context.language) {
|
|
41
|
-
fonts = getFontsForLanguage(conf.fontsParsed, context.language);
|
|
42
|
-
}
|
|
43
|
-
var next = {
|
|
44
|
-
fonts,
|
|
45
|
-
tokens: conf.tokensParsed,
|
|
46
|
-
theme,
|
|
47
|
-
context: styledContext,
|
|
48
|
-
get fontFamily() {
|
|
49
|
-
return (0, import_createVariable.getVariableValue)(styleState.fontFamily || styleState.props.fontFamily) || props.fontFamily || (0, import_createVariable.getVariableValue)((0, import_config.getSetting)("defaultFont"));
|
|
50
|
-
},
|
|
51
|
-
get font() {
|
|
52
|
-
var found = fonts[this.fontFamily];
|
|
53
|
-
if (found) return found;
|
|
54
|
-
var className = props.className;
|
|
55
|
-
if (typeof className === "string") {
|
|
56
|
-
var start = 0;
|
|
57
|
-
for (var index = 0; index <= className.length; index++) {
|
|
58
|
-
if (index !== className.length && className.charCodeAt(index) > 32) continue;
|
|
59
|
-
if (index - start > 5 && className.charCodeAt(start) === 102 && className.charCodeAt(start + 1) === 111 && className.charCodeAt(start + 2) === 110 && className.charCodeAt(start + 3) === 116 && className.charCodeAt(start + 4) === 95) {
|
|
60
|
-
var name = className.slice(start + 5, index);
|
|
61
|
-
if (fonts[name]) return fonts[name];
|
|
62
|
-
}
|
|
63
|
-
start = index + 1;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
return fonts[conf.defaultFontToken];
|
|
67
|
-
},
|
|
68
|
-
props
|
|
69
|
-
};
|
|
70
|
-
cache.set(styleState, {
|
|
71
|
-
props,
|
|
72
|
-
value: next
|
|
73
|
-
});
|
|
74
|
-
return next;
|
|
75
|
-
};
|
|
76
|
-
var fontLanguageCache = /* @__PURE__ */ new WeakMap();
|
|
77
|
-
function getFontsForLanguage(fonts, language) {
|
|
78
|
-
if (fontLanguageCache.has(language)) {
|
|
79
|
-
return fontLanguageCache.get(language);
|
|
80
|
-
}
|
|
81
|
-
var next = {
|
|
82
|
-
...fonts,
|
|
83
|
-
...Object.fromEntries(Object.entries(language).flatMap(function(param) {
|
|
84
|
-
var [name, lang] = param;
|
|
85
|
-
if (lang === "default") {
|
|
86
|
-
return [];
|
|
87
|
-
}
|
|
88
|
-
var langKey = `${name}_${lang}`;
|
|
89
|
-
return [[name, fonts[langKey]]];
|
|
90
|
-
}))
|
|
91
|
-
};
|
|
92
|
-
fontLanguageCache.set(language, next);
|
|
93
|
-
return next;
|
|
94
|
-
}
|