@tamagui/web 3.0.0-beta.669.1 → 3.0.0-beta.719.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/Tamagui.cjs +0 -1
- package/dist/cjs/Tamagui.native.cjs +0 -1
- package/dist/cjs/Tamagui.native.js +0 -1
- package/dist/cjs/Tamagui.native.js.map +1 -1
- package/dist/cjs/_withNativeStyle.cjs +0 -1
- package/dist/cjs/_withNativeStyle.native.cjs +0 -1
- package/dist/cjs/_withNativeStyle.native.js +0 -1
- package/dist/cjs/_withNativeStyle.native.js.map +1 -1
- package/dist/cjs/_withStableStyle.cjs +0 -1
- package/dist/cjs/_withStableStyle.native.cjs +0 -1
- package/dist/cjs/_withStableStyle.native.js +0 -1
- package/dist/cjs/_withStableStyle.native.js.map +1 -1
- package/dist/cjs/config.cjs +7 -1
- package/dist/cjs/config.native.cjs +7 -1
- package/dist/cjs/config.native.js +7 -1
- package/dist/cjs/config.native.js.map +1 -1
- package/dist/cjs/constants/accessibilityDirectMap.cjs +0 -1
- package/dist/cjs/constants/accessibilityDirectMap.native.cjs +0 -1
- package/dist/cjs/constants/accessibilityDirectMap.native.js +0 -1
- package/dist/cjs/constants/accessibilityDirectMap.native.js.map +1 -1
- package/dist/cjs/constants/constants.cjs +0 -1
- package/dist/cjs/constants/constants.native.cjs +0 -1
- package/dist/cjs/constants/constants.native.js +0 -1
- package/dist/cjs/constants/constants.native.js.map +1 -1
- package/dist/cjs/constants/isDevTools.cjs +0 -1
- package/dist/cjs/constants/isDevTools.native.cjs +0 -1
- package/dist/cjs/constants/isDevTools.native.js +0 -1
- package/dist/cjs/constants/isDevTools.native.js.map +1 -1
- package/dist/cjs/contexts/ComponentContext.cjs +0 -1
- package/dist/cjs/contexts/ComponentContext.native.cjs +0 -1
- package/dist/cjs/contexts/ComponentContext.native.js +0 -1
- package/dist/cjs/contexts/ComponentContext.native.js.map +1 -1
- package/dist/cjs/contexts/GroupContext.cjs +0 -1
- package/dist/cjs/contexts/GroupContext.native.cjs +0 -1
- package/dist/cjs/contexts/GroupContext.native.js +0 -1
- package/dist/cjs/contexts/GroupContext.native.js.map +1 -1
- package/dist/cjs/createComponent.cjs +1 -2
- package/dist/cjs/createComponent.native.cjs +1 -2
- package/dist/cjs/createComponent.native.js +1 -2
- package/dist/cjs/createComponent.native.js.map +1 -1
- package/dist/cjs/createFont.cjs +0 -1
- package/dist/cjs/createFont.native.cjs +0 -1
- package/dist/cjs/createFont.native.js +0 -1
- package/dist/cjs/createFont.native.js.map +1 -1
- package/dist/cjs/createShorthands.cjs +0 -1
- package/dist/cjs/createShorthands.native.cjs +0 -1
- package/dist/cjs/createShorthands.native.js +0 -1
- package/dist/cjs/createShorthands.native.js.map +1 -1
- package/dist/cjs/createStyledHOC.cjs +0 -1
- package/dist/cjs/createStyledHOC.native.cjs +0 -1
- package/dist/cjs/createStyledHOC.native.js +0 -1
- package/dist/cjs/createStyledHOC.native.js.map +1 -1
- package/dist/cjs/createTamagui.cjs +3 -4
- package/dist/cjs/createTamagui.native.cjs +3 -4
- package/dist/cjs/createTamagui.native.js +3 -4
- package/dist/cjs/createTamagui.native.js.map +1 -1
- package/dist/cjs/createTokens.cjs +0 -1
- package/dist/cjs/createTokens.native.cjs +0 -1
- package/dist/cjs/createTokens.native.js +0 -1
- package/dist/cjs/createTokens.native.js.map +1 -1
- package/dist/cjs/createVariable.cjs +0 -1
- package/dist/cjs/createVariable.native.cjs +0 -1
- package/dist/cjs/createVariable.native.js +0 -1
- package/dist/cjs/createVariable.native.js.map +1 -1
- package/dist/cjs/createVariables.cjs +0 -1
- package/dist/cjs/createVariables.native.cjs +0 -1
- package/dist/cjs/createVariables.native.js +0 -1
- package/dist/cjs/createVariables.native.js.map +1 -1
- package/dist/cjs/defaultComponentState.cjs +0 -1
- package/dist/cjs/defaultComponentState.native.cjs +0 -1
- package/dist/cjs/defaultComponentState.native.js +0 -1
- package/dist/cjs/defaultComponentState.native.js.map +1 -1
- package/dist/cjs/dom/adapters.cjs +0 -1
- package/dist/cjs/dom/adapters.native.cjs +0 -1
- package/dist/cjs/dom/adapters.native.js +0 -1
- package/dist/cjs/dom/adapters.native.js.map +1 -1
- package/dist/cjs/dom/contract.cjs +0 -1
- package/dist/cjs/dom/contract.native.cjs +0 -1
- package/dist/cjs/dom/contract.native.js +0 -1
- package/dist/cjs/dom/contract.native.js.map +1 -1
- package/dist/cjs/dom/domEventProps.native.cjs +0 -1
- package/dist/cjs/dom/domEventProps.native.js +0 -1
- package/dist/cjs/dom/domEventProps.native.js.map +1 -1
- package/dist/cjs/dom/html.cjs +0 -1
- package/dist/cjs/dom/html.native.cjs +0 -1
- package/dist/cjs/dom/html.native.js +0 -1
- package/dist/cjs/dom/html.native.js.map +1 -1
- package/dist/cjs/dom/htmlRuntime.native.cjs +0 -1
- package/dist/cjs/dom/htmlRuntime.native.js +0 -1
- package/dist/cjs/dom/htmlRuntime.native.js.map +1 -1
- package/dist/cjs/dom/index.cjs +0 -1
- package/dist/cjs/dom/index.native.cjs +0 -1
- package/dist/cjs/dom/index.native.js +0 -1
- package/dist/cjs/dom/index.native.js.map +1 -1
- package/dist/cjs/dom/primitives.native.cjs +2 -3
- package/dist/cjs/dom/primitives.native.js +2 -3
- package/dist/cjs/dom/primitives.native.js.map +1 -1
- package/dist/cjs/dom/standalone.cjs +0 -1
- package/dist/cjs/dom/standalone.native.cjs +0 -1
- package/dist/cjs/dom/standalone.native.js +0 -1
- package/dist/cjs/dom/standalone.native.js.map +1 -1
- package/dist/cjs/dom/standaloneHtml.cjs +0 -1
- package/dist/cjs/dom/standaloneHtml.native.cjs +0 -1
- package/dist/cjs/dom/standaloneHtml.native.js +0 -1
- package/dist/cjs/dom/standaloneHtml.native.js.map +1 -1
- package/dist/cjs/dom/styleTypes.cjs +0 -1
- package/dist/cjs/dom/styleTypes.native.cjs +0 -1
- package/dist/cjs/dom/styleTypes.native.js +0 -1
- package/dist/cjs/dom/styleTypes.native.js.map +1 -1
- package/dist/cjs/eventDetails.cjs +0 -1
- package/dist/cjs/eventDetails.native.cjs +0 -1
- package/dist/cjs/eventDetails.native.js +0 -1
- package/dist/cjs/eventDetails.native.js.map +1 -1
- package/dist/cjs/eventHandling.cjs +0 -1
- package/dist/cjs/eventHandling.native.cjs +0 -1
- package/dist/cjs/eventHandling.native.js +0 -1
- package/dist/cjs/eventHandling.native.js.map +1 -1
- package/dist/cjs/helpers/componentDisplayName.cjs +0 -1
- package/dist/cjs/helpers/componentDisplayName.native.cjs +0 -1
- package/dist/cjs/helpers/componentDisplayName.native.js +0 -1
- package/dist/cjs/helpers/componentDisplayName.native.js.map +1 -1
- package/dist/cjs/helpers/configVariables.cjs +79 -0
- package/dist/cjs/helpers/configVariables.native.cjs +86 -0
- package/dist/cjs/helpers/configVariables.native.js +88 -0
- package/dist/cjs/helpers/configVariables.native.js.map +1 -0
- package/dist/cjs/helpers/consoleLog.native.cjs +0 -1
- package/dist/cjs/helpers/consoleLog.native.js +0 -1
- package/dist/cjs/helpers/consoleLog.native.js.map +1 -1
- package/dist/cjs/helpers/createDesignSystem.cjs +0 -1
- package/dist/cjs/helpers/createDesignSystem.native.cjs +0 -1
- package/dist/cjs/helpers/createDesignSystem.native.js +0 -1
- package/dist/cjs/helpers/createDesignSystem.native.js.map +1 -1
- package/dist/cjs/helpers/createStyledContext.cjs +0 -1
- package/dist/cjs/helpers/createStyledContext.native.cjs +0 -1
- package/dist/cjs/helpers/createStyledContext.native.js +0 -1
- package/dist/cjs/helpers/createStyledContext.native.js.map +1 -1
- package/dist/cjs/helpers/defaultAnimationDriver.cjs +1 -6
- package/dist/cjs/helpers/defaultAnimationDriver.native.cjs +0 -13
- package/dist/cjs/helpers/defaultAnimationDriver.native.js +0 -13
- package/dist/cjs/helpers/defaultAnimationDriver.native.js.map +1 -1
- package/dist/cjs/helpers/defaultOffset.cjs +0 -1
- package/dist/cjs/helpers/defaultOffset.native.cjs +0 -1
- package/dist/cjs/helpers/defaultOffset.native.js +0 -1
- package/dist/cjs/helpers/defaultOffset.native.js.map +1 -1
- package/dist/cjs/helpers/directStyle.cjs +258 -284
- package/dist/cjs/helpers/directStyle.native.cjs +274 -306
- package/dist/cjs/helpers/directStyle.native.js +274 -306
- package/dist/cjs/helpers/directStyle.native.js.map +1 -1
- package/dist/cjs/helpers/expandStyle.cjs +0 -1
- package/dist/cjs/helpers/expandStyle.native.cjs +0 -1
- package/dist/cjs/helpers/expandStyle.native.js +0 -1
- package/dist/cjs/helpers/expandStyle.native.js.map +1 -1
- package/dist/cjs/helpers/expandStyles.cjs +0 -1
- package/dist/cjs/helpers/expandStyles.native.cjs +0 -1
- package/dist/cjs/helpers/expandStyles.native.js +0 -1
- package/dist/cjs/helpers/expandStyles.native.js.map +1 -1
- package/dist/cjs/helpers/extractPseudoState.cjs +0 -1
- package/dist/cjs/helpers/extractPseudoState.native.cjs +0 -1
- package/dist/cjs/helpers/extractPseudoState.native.js +0 -1
- package/dist/cjs/helpers/extractPseudoState.native.js.map +1 -1
- package/dist/cjs/helpers/formatDiagnostic.cjs +0 -1
- package/dist/cjs/helpers/formatDiagnostic.native.cjs +0 -1
- package/dist/cjs/helpers/formatDiagnostic.native.js +0 -1
- package/dist/cjs/helpers/formatDiagnostic.native.js.map +1 -1
- package/dist/cjs/helpers/frontendProgram.cjs +0 -1
- package/dist/cjs/helpers/frontendProgram.native.cjs +0 -1
- package/dist/cjs/helpers/frontendProgram.native.js +0 -1
- package/dist/cjs/helpers/frontendProgram.native.js.map +1 -1
- package/dist/cjs/helpers/getCSSStylesAtomic.cjs +5 -2
- package/dist/cjs/helpers/getCSSStylesAtomic.native.cjs +0 -1
- package/dist/cjs/helpers/getCSSStylesAtomic.native.js +0 -1
- package/dist/cjs/helpers/getCSSStylesAtomic.native.js.map +1 -1
- package/dist/cjs/helpers/getDefaultProps.cjs +0 -1
- package/dist/cjs/helpers/getDefaultProps.native.cjs +0 -1
- package/dist/cjs/helpers/getDefaultProps.native.js +0 -1
- package/dist/cjs/helpers/getDefaultProps.native.js.map +1 -1
- package/dist/cjs/helpers/getDynamicVal.cjs +0 -1
- package/dist/cjs/helpers/getDynamicVal.native.cjs +0 -1
- package/dist/cjs/helpers/getDynamicVal.native.js +0 -1
- package/dist/cjs/helpers/getDynamicVal.native.js.map +1 -1
- package/dist/cjs/helpers/getExpandedShorthands.cjs +0 -1
- package/dist/cjs/helpers/getExpandedShorthands.native.cjs +0 -1
- package/dist/cjs/helpers/getExpandedShorthands.native.js +0 -1
- package/dist/cjs/helpers/getExpandedShorthands.native.js.map +1 -1
- package/dist/cjs/helpers/getFontLanguage.cjs +0 -1
- package/dist/cjs/helpers/getFontLanguage.native.cjs +0 -1
- package/dist/cjs/helpers/getFontLanguage.native.js +0 -1
- package/dist/cjs/helpers/getFontLanguage.native.js.map +1 -1
- package/dist/cjs/helpers/getShorthandValue.cjs +0 -1
- package/dist/cjs/helpers/getShorthandValue.native.cjs +0 -1
- package/dist/cjs/helpers/getShorthandValue.native.js +0 -1
- package/dist/cjs/helpers/getShorthandValue.native.js.map +1 -1
- package/dist/cjs/helpers/getSplitStyles.cjs +2 -10
- package/dist/cjs/helpers/getSplitStyles.native.cjs +2 -10
- package/dist/cjs/helpers/getSplitStyles.native.js +2 -10
- package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/cjs/helpers/getThemeCSSRules.cjs +0 -1
- package/dist/cjs/helpers/getThemeCSSRules.native.cjs +0 -1
- package/dist/cjs/helpers/getThemeCSSRules.native.js +0 -1
- package/dist/cjs/helpers/getThemeCSSRules.native.js.map +1 -1
- package/dist/cjs/helpers/getVariantExtras.cjs +0 -1
- package/dist/cjs/helpers/getVariantExtras.native.cjs +0 -1
- package/dist/cjs/helpers/getVariantExtras.native.js +0 -1
- package/dist/cjs/helpers/getVariantExtras.native.js.map +1 -1
- package/dist/cjs/helpers/grammarConfig.cjs +63 -14
- package/dist/cjs/helpers/grammarConfig.native.cjs +84 -18
- package/dist/cjs/helpers/grammarConfig.native.js +84 -18
- package/dist/cjs/helpers/grammarConfig.native.js.map +1 -1
- package/dist/cjs/helpers/insertStyleRule.cjs +0 -1
- package/dist/cjs/helpers/insertStyleRule.native.cjs +0 -1
- package/dist/cjs/helpers/insertStyleRule.native.js +0 -1
- package/dist/cjs/helpers/insertStyleRule.native.js.map +1 -1
- package/dist/cjs/helpers/isObj.cjs +0 -1
- package/dist/cjs/helpers/isObj.native.cjs +0 -1
- package/dist/cjs/helpers/isObj.native.js +0 -1
- package/dist/cjs/helpers/isObj.native.js.map +1 -1
- package/dist/cjs/helpers/isTamaguiComponent.cjs +0 -1
- package/dist/cjs/helpers/isTamaguiComponent.native.cjs +0 -1
- package/dist/cjs/helpers/isTamaguiComponent.native.js +0 -1
- package/dist/cjs/helpers/isTamaguiComponent.native.js.map +1 -1
- package/dist/cjs/helpers/isTamaguiElement.cjs +0 -1
- package/dist/cjs/helpers/isTamaguiElement.native.cjs +0 -1
- package/dist/cjs/helpers/isTamaguiElement.native.js +0 -1
- package/dist/cjs/helpers/isTamaguiElement.native.js.map +1 -1
- package/dist/cjs/helpers/log.cjs +0 -1
- package/dist/cjs/helpers/log.native.cjs +0 -1
- package/dist/cjs/helpers/log.native.js +0 -1
- package/dist/cjs/helpers/log.native.js.map +1 -1
- package/dist/cjs/helpers/mainThreadPressEvents.cjs +0 -1
- package/dist/cjs/helpers/mainThreadPressEvents.native.cjs +0 -1
- package/dist/cjs/helpers/mainThreadPressEvents.native.js +0 -1
- package/dist/cjs/helpers/mainThreadPressEvents.native.js.map +1 -1
- package/dist/cjs/helpers/matchMedia.cjs +0 -1
- package/dist/cjs/helpers/matchMedia.native.cjs +0 -1
- package/dist/cjs/helpers/matchMedia.native.js +0 -1
- package/dist/cjs/helpers/matchMedia.native.js.map +1 -1
- package/dist/cjs/helpers/mediaObjectToString.cjs +0 -1
- package/dist/cjs/helpers/mediaObjectToString.native.cjs +0 -1
- package/dist/cjs/helpers/mediaObjectToString.native.js +0 -1
- package/dist/cjs/helpers/mediaObjectToString.native.js.map +1 -1
- package/dist/cjs/helpers/mediaState.cjs +0 -1
- package/dist/cjs/helpers/mediaState.native.cjs +0 -1
- package/dist/cjs/helpers/mediaState.native.js +0 -1
- package/dist/cjs/helpers/mediaState.native.js.map +1 -1
- package/dist/cjs/helpers/mergeProps.cjs +0 -1
- package/dist/cjs/helpers/mergeProps.native.cjs +0 -1
- package/dist/cjs/helpers/mergeProps.native.js +0 -1
- package/dist/cjs/helpers/mergeProps.native.js.map +1 -1
- package/dist/cjs/helpers/mergeRenderElementProps.cjs +0 -1
- package/dist/cjs/helpers/mergeRenderElementProps.native.cjs +0 -1
- package/dist/cjs/helpers/mergeRenderElementProps.native.js +0 -1
- package/dist/cjs/helpers/mergeRenderElementProps.native.js.map +1 -1
- package/dist/cjs/helpers/mergeSlotStyleProps.cjs +0 -1
- package/dist/cjs/helpers/mergeSlotStyleProps.native.cjs +0 -1
- package/dist/cjs/helpers/mergeSlotStyleProps.native.js +0 -1
- package/dist/cjs/helpers/mergeSlotStyleProps.native.js.map +1 -1
- package/dist/cjs/helpers/mergeVariants.cjs +1 -2
- package/dist/cjs/helpers/mergeVariants.native.cjs +1 -2
- package/dist/cjs/helpers/mergeVariants.native.js +1 -2
- 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 +0 -1
- package/dist/cjs/helpers/nativeStyleEngine.native.cjs +0 -1
- package/dist/cjs/helpers/nativeStyleEngine.native.js +0 -1
- package/dist/cjs/helpers/nativeStyleEngine.native.js.map +1 -1
- package/dist/cjs/helpers/nativeTransitionTarget.cjs +0 -1
- package/dist/cjs/helpers/nativeTransitionTarget.native.cjs +0 -1
- package/dist/cjs/helpers/nativeTransitionTarget.native.js +0 -1
- package/dist/cjs/helpers/nativeTransitionTarget.native.js.map +1 -1
- package/dist/cjs/helpers/normalizeColor.cjs +0 -1
- package/dist/cjs/helpers/normalizeColor.native.cjs +0 -1
- package/dist/cjs/helpers/normalizeColor.native.js +0 -1
- package/dist/cjs/helpers/normalizeColor.native.js.map +1 -1
- package/dist/cjs/helpers/normalizeShadow.cjs +0 -1
- package/dist/cjs/helpers/normalizeShadow.native.cjs +0 -1
- package/dist/cjs/helpers/normalizeShadow.native.js +0 -1
- package/dist/cjs/helpers/normalizeShadow.native.js.map +1 -1
- package/dist/cjs/helpers/normalizeStyle.cjs +0 -1
- package/dist/cjs/helpers/normalizeStyle.native.cjs +0 -1
- package/dist/cjs/helpers/normalizeStyle.native.js +0 -1
- package/dist/cjs/helpers/normalizeStyle.native.js.map +1 -1
- package/dist/cjs/helpers/normalizeStylePropKeys.cjs +0 -1
- package/dist/cjs/helpers/normalizeStylePropKeys.native.cjs +0 -1
- package/dist/cjs/helpers/normalizeStylePropKeys.native.js +0 -1
- package/dist/cjs/helpers/normalizeStylePropKeys.native.js.map +1 -1
- package/dist/cjs/helpers/normalizeValueWithProperty.cjs +0 -1
- package/dist/cjs/helpers/normalizeValueWithProperty.native.cjs +0 -1
- package/dist/cjs/helpers/normalizeValueWithProperty.native.js +0 -1
- package/dist/cjs/helpers/normalizeValueWithProperty.native.js.map +1 -1
- package/dist/cjs/helpers/noteOnce.cjs +0 -1
- package/dist/cjs/helpers/noteOnce.native.cjs +0 -1
- package/dist/cjs/helpers/noteOnce.native.js +0 -1
- package/dist/cjs/helpers/noteOnce.native.js.map +1 -1
- package/dist/cjs/helpers/objectIdentityKey.cjs +0 -1
- package/dist/cjs/helpers/objectIdentityKey.native.cjs +0 -1
- package/dist/cjs/helpers/objectIdentityKey.native.js +0 -1
- package/dist/cjs/helpers/objectIdentityKey.native.js.map +1 -1
- package/dist/cjs/helpers/parseBorderShorthand.cjs +0 -1
- package/dist/cjs/helpers/parseBorderShorthand.native.cjs +0 -1
- package/dist/cjs/helpers/parseBorderShorthand.native.js +0 -1
- package/dist/cjs/helpers/parseBorderShorthand.native.js.map +1 -1
- package/dist/cjs/helpers/parseNativeStyle.native.cjs +0 -1
- package/dist/cjs/helpers/parseNativeStyle.native.js +0 -1
- package/dist/cjs/helpers/parseNativeStyle.native.js.map +1 -1
- package/dist/cjs/helpers/parseNativeTransform.native.cjs +0 -1
- package/dist/cjs/helpers/parseNativeTransform.native.js +0 -1
- package/dist/cjs/helpers/parseNativeTransform.native.js.map +1 -1
- package/dist/cjs/helpers/parseOutlineShorthand.cjs +0 -1
- package/dist/cjs/helpers/parseOutlineShorthand.native.cjs +0 -1
- package/dist/cjs/helpers/parseOutlineShorthand.native.js +0 -1
- package/dist/cjs/helpers/parseOutlineShorthand.native.js.map +1 -1
- package/dist/cjs/helpers/pointerEvents.cjs +0 -1
- package/dist/cjs/helpers/pointerEvents.native.cjs +0 -1
- package/dist/cjs/helpers/pointerEvents.native.js +0 -1
- package/dist/cjs/helpers/pointerEvents.native.js.map +1 -1
- package/dist/cjs/helpers/propMapper.cjs +30 -39
- package/dist/cjs/helpers/propMapper.native.cjs +30 -39
- package/dist/cjs/helpers/propMapper.native.js +30 -39
- package/dist/cjs/helpers/propMapper.native.js.map +1 -1
- package/dist/cjs/helpers/proxyThemeToParents.cjs +0 -1
- package/dist/cjs/helpers/proxyThemeToParents.native.cjs +0 -1
- package/dist/cjs/helpers/proxyThemeToParents.native.js +0 -1
- package/dist/cjs/helpers/proxyThemeToParents.native.js.map +1 -1
- package/dist/cjs/helpers/registerCSSVariable.cjs +0 -1
- package/dist/cjs/helpers/registerCSSVariable.native.cjs +0 -1
- package/dist/cjs/helpers/registerCSSVariable.native.js +0 -1
- package/dist/cjs/helpers/registerCSSVariable.native.js.map +1 -1
- package/dist/cjs/helpers/resolveAnimationDriver.cjs +0 -1
- package/dist/cjs/helpers/resolveAnimationDriver.native.cjs +0 -1
- package/dist/cjs/helpers/resolveAnimationDriver.native.js +0 -1
- package/dist/cjs/helpers/resolveAnimationDriver.native.js.map +1 -1
- package/dist/cjs/helpers/resolveRem.cjs +0 -1
- package/dist/cjs/helpers/resolveRem.native.cjs +0 -1
- package/dist/cjs/helpers/resolveRem.native.js +0 -1
- package/dist/cjs/helpers/resolveRem.native.js.map +1 -1
- package/dist/cjs/helpers/resolveSafeArea.cjs +0 -1
- package/dist/cjs/helpers/resolveSafeArea.native.cjs +0 -1
- package/dist/cjs/helpers/resolveSafeArea.native.js +0 -1
- package/dist/cjs/helpers/resolveSafeArea.native.js.map +1 -1
- package/dist/cjs/helpers/resolveSafeAreaVariable.cjs +0 -1
- package/dist/cjs/helpers/resolveSafeAreaVariable.native.cjs +0 -1
- package/dist/cjs/helpers/resolveSafeAreaVariable.native.js +0 -1
- package/dist/cjs/helpers/resolveSafeAreaVariable.native.js.map +1 -1
- package/dist/cjs/helpers/resolveVariableValue.cjs +0 -1
- package/dist/cjs/helpers/resolveVariableValue.native.cjs +0 -1
- package/dist/cjs/helpers/resolveVariableValue.native.js +0 -1
- package/dist/cjs/helpers/resolveVariableValue.native.js.map +1 -1
- package/dist/cjs/helpers/setElementProps.cjs +0 -1
- package/dist/cjs/helpers/setElementProps.native.cjs +0 -1
- package/dist/cjs/helpers/setElementProps.native.js +0 -1
- package/dist/cjs/helpers/setElementProps.native.js.map +1 -1
- package/dist/cjs/helpers/skipProps.cjs +0 -1
- package/dist/cjs/helpers/skipProps.native.cjs +0 -1
- package/dist/cjs/helpers/skipProps.native.js +0 -1
- package/dist/cjs/helpers/skipProps.native.js.map +1 -1
- package/dist/cjs/helpers/sortString.cjs +0 -1
- package/dist/cjs/helpers/sortString.native.cjs +0 -1
- package/dist/cjs/helpers/sortString.native.js +0 -1
- package/dist/cjs/helpers/sortString.native.js.map +1 -1
- package/dist/cjs/helpers/styleFrontend.cjs +0 -1
- package/dist/cjs/helpers/styleFrontend.native.cjs +0 -1
- package/dist/cjs/helpers/styleFrontend.native.js +0 -1
- package/dist/cjs/helpers/styleFrontend.native.js.map +1 -1
- package/dist/cjs/helpers/styleOriginalValues.cjs +0 -1
- package/dist/cjs/helpers/styleOriginalValues.native.cjs +0 -1
- package/dist/cjs/helpers/styleOriginalValues.native.js +0 -1
- package/dist/cjs/helpers/styleOriginalValues.native.js.map +1 -1
- package/dist/cjs/helpers/styleProvenance.cjs +0 -1
- package/dist/cjs/helpers/styleProvenance.native.cjs +0 -1
- package/dist/cjs/helpers/styleProvenance.native.js +0 -1
- package/dist/cjs/helpers/styleProvenance.native.js.map +1 -1
- package/dist/cjs/helpers/subscribeToContextGroup.cjs +0 -1
- package/dist/cjs/helpers/subscribeToContextGroup.native.cjs +0 -1
- package/dist/cjs/helpers/subscribeToContextGroup.native.js +0 -1
- package/dist/cjs/helpers/subscribeToContextGroup.native.js.map +1 -1
- package/dist/cjs/helpers/themeRef.cjs +0 -1
- package/dist/cjs/helpers/themeRef.native.cjs +0 -1
- package/dist/cjs/helpers/themeRef.native.js +0 -1
- package/dist/cjs/helpers/themeRef.native.js.map +1 -1
- package/dist/cjs/helpers/themeUpdateState.cjs +24 -0
- package/dist/cjs/helpers/themeUpdateState.native.cjs +26 -0
- package/dist/cjs/helpers/themeUpdateState.native.js +28 -0
- package/dist/cjs/helpers/themeUpdateState.native.js.map +1 -0
- package/dist/cjs/helpers/themeable.cjs +0 -1
- package/dist/cjs/helpers/themeable.native.cjs +0 -1
- package/dist/cjs/helpers/themeable.native.js +0 -1
- package/dist/cjs/helpers/themeable.native.js.map +1 -1
- package/dist/cjs/helpers/themes.cjs +0 -1
- package/dist/cjs/helpers/themes.native.cjs +0 -1
- package/dist/cjs/helpers/themes.native.js +0 -1
- package/dist/cjs/helpers/themes.native.js.map +1 -1
- package/dist/cjs/helpers/timer.cjs +0 -1
- package/dist/cjs/helpers/timer.native.cjs +0 -1
- package/dist/cjs/helpers/timer.native.js +0 -1
- package/dist/cjs/helpers/timer.native.js.map +1 -1
- package/dist/cjs/helpers/tokenCategories.cjs +0 -1
- package/dist/cjs/helpers/tokenCategories.native.cjs +0 -1
- package/dist/cjs/helpers/tokenCategories.native.js +0 -1
- package/dist/cjs/helpers/tokenCategories.native.js.map +1 -1
- package/dist/cjs/helpers/transformsToString.cjs +0 -1
- package/dist/cjs/helpers/transformsToString.native.cjs +0 -1
- package/dist/cjs/helpers/transformsToString.native.js +0 -1
- package/dist/cjs/helpers/transformsToString.native.js.map +1 -1
- package/dist/cjs/helpers/useRenderElement.cjs +0 -1
- package/dist/cjs/helpers/useRenderElement.native.cjs +0 -1
- package/dist/cjs/helpers/useRenderElement.native.js +0 -1
- package/dist/cjs/helpers/useRenderElement.native.js.map +1 -1
- package/dist/cjs/helpers/variableValue.cjs +66 -0
- package/dist/cjs/helpers/variableValue.native.cjs +88 -0
- package/dist/cjs/helpers/variableValue.native.js +90 -0
- package/dist/cjs/helpers/variableValue.native.js.map +1 -0
- package/dist/cjs/helpers/variables.cjs +95 -139
- package/dist/cjs/helpers/variables.native.cjs +97 -161
- package/dist/cjs/helpers/variables.native.js +97 -161
- package/dist/cjs/helpers/variables.native.js.map +1 -1
- package/dist/cjs/helpers/warnOnce.cjs +1 -2
- package/dist/cjs/helpers/warnOnce.native.cjs +1 -2
- package/dist/cjs/helpers/warnOnce.native.js +1 -2
- package/dist/cjs/helpers/warnOnce.native.js.map +1 -1
- package/dist/cjs/helpers/webPropsToSkip.cjs +0 -1
- package/dist/cjs/helpers/webPropsToSkip.native.cjs +0 -1
- package/dist/cjs/helpers/webPropsToSkip.native.js +0 -1
- package/dist/cjs/helpers/webPropsToSkip.native.js.map +1 -1
- package/dist/cjs/helpers/wrapStyleTags.cjs +0 -1
- package/dist/cjs/helpers/wrapStyleTags.native.cjs +0 -1
- package/dist/cjs/helpers/wrapStyleTags.native.js +0 -1
- package/dist/cjs/helpers/wrapStyleTags.native.js.map +1 -1
- package/dist/cjs/hooks/doesRootSchemeMatchSystem.cjs +0 -1
- package/dist/cjs/hooks/doesRootSchemeMatchSystem.native.cjs +0 -1
- package/dist/cjs/hooks/doesRootSchemeMatchSystem.native.js +0 -1
- package/dist/cjs/hooks/doesRootSchemeMatchSystem.native.js.map +1 -1
- package/dist/cjs/hooks/getThemeProxied.cjs +1 -2
- package/dist/cjs/hooks/getThemeProxied.native.cjs +2 -3
- package/dist/cjs/hooks/getThemeProxied.native.js +2 -3
- package/dist/cjs/hooks/getThemeProxied.native.js.map +1 -1
- package/dist/cjs/hooks/isOptimizedForFirstRender.cjs +0 -1
- package/dist/cjs/hooks/isOptimizedForFirstRender.native.cjs +0 -1
- package/dist/cjs/hooks/isOptimizedForFirstRender.native.js +0 -1
- package/dist/cjs/hooks/isOptimizedForFirstRender.native.js.map +1 -1
- package/dist/cjs/hooks/useAnimationDriver.cjs +14 -9
- package/dist/cjs/hooks/useAnimationDriver.native.cjs +14 -9
- package/dist/cjs/hooks/useAnimationDriver.native.js +14 -9
- package/dist/cjs/hooks/useAnimationDriver.native.js.map +1 -1
- package/dist/cjs/hooks/useComponentState.cjs +27 -25
- package/dist/cjs/hooks/useComponentState.native.cjs +28 -25
- package/dist/cjs/hooks/useComponentState.native.js +28 -25
- package/dist/cjs/hooks/useComponentState.native.js.map +1 -1
- package/dist/cjs/hooks/useDisableSSR.cjs +0 -1
- package/dist/cjs/hooks/useDisableSSR.native.cjs +0 -1
- package/dist/cjs/hooks/useDisableSSR.native.js +0 -1
- package/dist/cjs/hooks/useDisableSSR.native.js.map +1 -1
- package/dist/cjs/hooks/useIsTouchDevice.cjs +0 -1
- package/dist/cjs/hooks/useIsTouchDevice.native.cjs +0 -1
- package/dist/cjs/hooks/useIsTouchDevice.native.js +0 -1
- package/dist/cjs/hooks/useIsTouchDevice.native.js.map +1 -1
- package/dist/cjs/hooks/useMedia.cjs +0 -1
- package/dist/cjs/hooks/useMedia.native.cjs +0 -1
- package/dist/cjs/hooks/useMedia.native.js +0 -1
- package/dist/cjs/hooks/useMedia.native.js.map +1 -1
- package/dist/cjs/hooks/usePortalThemeState.cjs +1 -2
- package/dist/cjs/hooks/usePortalThemeState.native.cjs +1 -2
- package/dist/cjs/hooks/usePortalThemeState.native.js +1 -2
- package/dist/cjs/hooks/usePortalThemeState.native.js.map +1 -1
- package/dist/cjs/hooks/useProps.cjs +1 -2
- package/dist/cjs/hooks/useProps.native.cjs +1 -2
- package/dist/cjs/hooks/useProps.native.js +1 -2
- package/dist/cjs/hooks/useProps.native.js.map +1 -1
- package/dist/cjs/hooks/useTheme.cjs +0 -1
- package/dist/cjs/hooks/useTheme.native.cjs +0 -1
- package/dist/cjs/hooks/useTheme.native.js +0 -1
- package/dist/cjs/hooks/useTheme.native.js.map +1 -1
- package/dist/cjs/hooks/useThemeName.cjs +0 -1
- package/dist/cjs/hooks/useThemeName.native.cjs +0 -1
- package/dist/cjs/hooks/useThemeName.native.js +0 -1
- package/dist/cjs/hooks/useThemeName.native.js.map +1 -1
- package/dist/cjs/hooks/useThemeState.cjs +11 -16
- package/dist/cjs/hooks/useThemeState.native.cjs +13 -18
- package/dist/cjs/hooks/useThemeState.native.js +13 -18
- package/dist/cjs/hooks/useThemeState.native.js.map +1 -1
- package/dist/cjs/index.cjs +0 -2
- package/dist/cjs/index.native.cjs +0 -2
- package/dist/cjs/index.native.js +0 -2
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/inject-styles.cjs +0 -1
- package/dist/cjs/inject-styles.native.cjs +0 -1
- package/dist/cjs/inject-styles.native.js +0 -1
- package/dist/cjs/inject-styles.native.js.map +1 -1
- package/dist/cjs/insertFont.cjs +0 -1
- package/dist/cjs/insertFont.native.cjs +0 -1
- package/dist/cjs/insertFont.native.js +0 -1
- package/dist/cjs/insertFont.native.js.map +1 -1
- package/dist/cjs/interfaces/CSSColorNames.cjs +0 -1
- package/dist/cjs/interfaces/CSSColorNames.native.cjs +0 -1
- package/dist/cjs/interfaces/CSSColorNames.native.js +0 -1
- package/dist/cjs/interfaces/CSSColorNames.native.js.map +1 -1
- package/dist/cjs/interfaces/GetRef.cjs +0 -1
- package/dist/cjs/interfaces/GetRef.native.cjs +0 -1
- package/dist/cjs/interfaces/GetRef.native.js +0 -1
- package/dist/cjs/interfaces/GetRef.native.js.map +1 -1
- package/dist/cjs/interfaces/RNExclusiveTypes.cjs +0 -1
- package/dist/cjs/interfaces/RNExclusiveTypes.native.cjs +0 -1
- package/dist/cjs/interfaces/RNExclusiveTypes.native.js +0 -1
- package/dist/cjs/interfaces/RNExclusiveTypes.native.js.map +1 -1
- package/dist/cjs/interfaces/TamaguiComponentEvents.cjs +0 -1
- package/dist/cjs/interfaces/TamaguiComponentEvents.native.cjs +0 -1
- package/dist/cjs/interfaces/TamaguiComponentEvents.native.js +0 -1
- package/dist/cjs/interfaces/TamaguiComponentEvents.native.js.map +1 -1
- package/dist/cjs/interfaces/TamaguiComponentPropsBaseBase.cjs +0 -1
- package/dist/cjs/interfaces/TamaguiComponentPropsBaseBase.native.cjs +0 -1
- package/dist/cjs/interfaces/TamaguiComponentPropsBaseBase.native.js +0 -1
- package/dist/cjs/interfaces/TamaguiComponentPropsBaseBase.native.js.map +1 -1
- package/dist/cjs/internal-runtime.cjs +1 -4
- package/dist/cjs/internal-runtime.native.cjs +1 -4
- package/dist/cjs/internal-runtime.native.js +1 -4
- package/dist/cjs/internal-runtime.native.js.map +1 -1
- package/dist/cjs/internalRuntimeTypes.cjs +0 -1
- package/dist/cjs/internalRuntimeTypes.native.cjs +0 -1
- package/dist/cjs/internalRuntimeTypes.native.js +0 -1
- package/dist/cjs/internalRuntimeTypes.native.js.map +1 -1
- package/dist/cjs/setupHooks.cjs +0 -1
- package/dist/cjs/setupHooks.native.cjs +0 -1
- package/dist/cjs/setupHooks.native.js +0 -1
- package/dist/cjs/setupHooks.native.js.map +1 -1
- package/dist/cjs/setupReactNative.cjs +0 -1
- package/dist/cjs/setupReactNative.native.cjs +0 -1
- package/dist/cjs/setupReactNative.native.js +0 -1
- package/dist/cjs/setupReactNative.native.js.map +1 -1
- package/dist/cjs/styled.cjs +0 -1
- package/dist/cjs/styled.native.cjs +0 -1
- package/dist/cjs/styled.native.js +0 -1
- package/dist/cjs/styled.native.js.map +1 -1
- package/dist/cjs/theme-update.cjs +19 -0
- package/dist/cjs/theme-update.native.cjs +21 -0
- package/dist/cjs/theme-update.native.js +23 -0
- package/dist/cjs/theme-update.native.js.map +1 -0
- package/dist/cjs/type-utils.cjs +0 -1
- package/dist/cjs/type-utils.native.cjs +0 -1
- package/dist/cjs/type-utils.native.js +0 -1
- package/dist/cjs/type-utils.native.js.map +1 -1
- package/dist/cjs/types.cjs +0 -1
- package/dist/cjs/types.native.cjs +0 -1
- package/dist/cjs/types.native.js +0 -1
- package/dist/cjs/types.native.js.map +1 -1
- package/dist/cjs/views/ConfigRevisionCheck.cjs +0 -1
- package/dist/cjs/views/ConfigRevisionCheck.native.cjs +0 -1
- package/dist/cjs/views/ConfigRevisionCheck.native.js +0 -1
- package/dist/cjs/views/ConfigRevisionCheck.native.js.map +1 -1
- package/dist/cjs/views/Configuration.cjs +0 -1
- package/dist/cjs/views/Configuration.native.cjs +0 -1
- package/dist/cjs/views/Configuration.native.js +0 -1
- package/dist/cjs/views/Configuration.native.js.map +1 -1
- package/dist/cjs/views/FontLanguage.cjs +0 -1
- package/dist/cjs/views/FontLanguage.native.cjs +0 -1
- package/dist/cjs/views/FontLanguage.native.js +0 -1
- package/dist/cjs/views/FontLanguage.native.js.map +1 -1
- package/dist/cjs/views/SafeAreaTracker.cjs +0 -1
- package/dist/cjs/views/SafeAreaTracker.native.cjs +0 -1
- package/dist/cjs/views/SafeAreaTracker.native.js +0 -1
- package/dist/cjs/views/SafeAreaTracker.native.js.map +1 -1
- package/dist/cjs/views/Slot.cjs +0 -1
- package/dist/cjs/views/Slot.native.cjs +0 -1
- package/dist/cjs/views/Slot.native.js +0 -1
- package/dist/cjs/views/Slot.native.js.map +1 -1
- package/dist/cjs/views/TamaguiProvider.cjs +0 -1
- package/dist/cjs/views/TamaguiProvider.native.cjs +0 -1
- package/dist/cjs/views/TamaguiProvider.native.js +0 -1
- package/dist/cjs/views/TamaguiProvider.native.js.map +1 -1
- package/dist/cjs/views/TamaguiRoot.cjs +0 -1
- package/dist/cjs/views/TamaguiRoot.native.cjs +0 -1
- package/dist/cjs/views/TamaguiRoot.native.js +0 -1
- package/dist/cjs/views/TamaguiRoot.native.js.map +1 -1
- package/dist/cjs/views/Text.cjs +0 -1
- package/dist/cjs/views/Text.native.cjs +0 -1
- package/dist/cjs/views/Text.native.js +0 -1
- package/dist/cjs/views/Text.native.js.map +1 -1
- package/dist/cjs/views/Theme.cjs +7 -33
- package/dist/cjs/views/Theme.native.cjs +8 -20
- package/dist/cjs/views/Theme.native.js +8 -20
- package/dist/cjs/views/Theme.native.js.map +1 -1
- package/dist/cjs/views/ThemeDebug.cjs +0 -1
- package/dist/cjs/views/ThemeDebug.native.cjs +0 -1
- package/dist/cjs/views/ThemeDebug.native.js +0 -1
- package/dist/cjs/views/ThemeDebug.native.js.map +1 -1
- package/dist/cjs/views/ThemeProvider.cjs +0 -1
- package/dist/cjs/views/ThemeProvider.native.cjs +0 -1
- package/dist/cjs/views/ThemeProvider.native.js +0 -1
- package/dist/cjs/views/ThemeProvider.native.js.map +1 -1
- package/dist/cjs/views/ThemeUpdate.cjs +82 -0
- package/dist/cjs/views/ThemeUpdate.native.cjs +84 -0
- package/dist/cjs/views/ThemeUpdate.native.js +86 -0
- package/dist/cjs/views/ThemeUpdate.native.js.map +1 -0
- package/dist/cjs/views/View.cjs +0 -1
- package/dist/cjs/views/View.native.cjs +0 -1
- package/dist/cjs/views/View.native.js +0 -1
- package/dist/cjs/views/View.native.js.map +1 -1
- package/dist/esm/Tamagui.mjs.map +1 -1
- package/dist/esm/Tamagui.native.js.map +1 -1
- package/dist/esm/_withNativeStyle.mjs.map +1 -1
- package/dist/esm/config.mjs +7 -0
- package/dist/esm/config.mjs.map +1 -1
- package/dist/esm/config.native.js +7 -0
- package/dist/esm/config.native.js.map +1 -1
- package/dist/esm/constants/isDevTools.mjs.map +1 -1
- package/dist/esm/constants/isDevTools.native.js.map +1 -1
- package/dist/esm/createComponent.mjs +1 -1
- package/dist/esm/createComponent.mjs.map +1 -1
- package/dist/esm/createComponent.native.js +1 -1
- package/dist/esm/createComponent.native.js.map +1 -1
- package/dist/esm/createFont.mjs.map +1 -1
- package/dist/esm/createFont.native.js.map +1 -1
- package/dist/esm/createTamagui.mjs +2 -2
- package/dist/esm/createTamagui.mjs.map +1 -1
- package/dist/esm/createTamagui.native.js +2 -2
- package/dist/esm/createTamagui.native.js.map +1 -1
- package/dist/esm/createVariable.mjs.map +1 -1
- package/dist/esm/createVariable.native.js.map +1 -1
- package/dist/esm/dom/primitives.native.js +1 -1
- package/dist/esm/dom/primitives.native.js.map +1 -1
- package/dist/esm/eventHandling.native.js.map +1 -1
- package/dist/esm/helpers/configVariables.mjs +60 -0
- package/dist/esm/helpers/configVariables.mjs.map +1 -0
- package/dist/esm/helpers/configVariables.native.js +65 -0
- package/dist/esm/helpers/configVariables.native.js.map +1 -0
- package/dist/esm/helpers/createDesignSystem.mjs.map +1 -1
- package/dist/esm/helpers/createDesignSystem.native.js.map +1 -1
- package/dist/esm/helpers/createStyledContext.mjs.map +1 -1
- package/dist/esm/helpers/createStyledContext.native.js.map +1 -1
- package/dist/esm/helpers/defaultAnimationDriver.mjs +1 -5
- package/dist/esm/helpers/defaultAnimationDriver.mjs.map +1 -1
- package/dist/esm/helpers/defaultAnimationDriver.native.js +0 -12
- package/dist/esm/helpers/defaultAnimationDriver.native.js.map +1 -1
- package/dist/esm/helpers/directStyle.mjs +258 -283
- package/dist/esm/helpers/directStyle.mjs.map +1 -1
- package/dist/esm/helpers/directStyle.native.js +274 -305
- package/dist/esm/helpers/directStyle.native.js.map +1 -1
- package/dist/esm/helpers/expandStyle.mjs.map +1 -1
- package/dist/esm/helpers/expandStyle.native.js.map +1 -1
- package/dist/esm/helpers/expandStyles.native.js.map +1 -1
- package/dist/esm/helpers/extractPseudoState.mjs.map +1 -1
- package/dist/esm/helpers/formatDiagnostic.mjs.map +1 -1
- package/dist/esm/helpers/formatDiagnostic.native.js.map +1 -1
- package/dist/esm/helpers/getCSSStylesAtomic.mjs +5 -1
- package/dist/esm/helpers/getCSSStylesAtomic.mjs.map +1 -1
- package/dist/esm/helpers/getDynamicVal.mjs.map +1 -1
- package/dist/esm/helpers/getDynamicVal.native.js.map +1 -1
- package/dist/esm/helpers/getExpandedShorthands.mjs.map +1 -1
- package/dist/esm/helpers/getExpandedShorthands.native.js.map +1 -1
- package/dist/esm/helpers/getFontLanguage.mjs.map +1 -1
- package/dist/esm/helpers/getFontLanguage.native.js.map +1 -1
- package/dist/esm/helpers/getShorthandValue.mjs.map +1 -1
- package/dist/esm/helpers/getShorthandValue.native.js.map +1 -1
- package/dist/esm/helpers/getSplitStyles.mjs +2 -9
- package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
- package/dist/esm/helpers/getSplitStyles.native.js +2 -9
- package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/esm/helpers/getThemeCSSRules.mjs.map +1 -1
- package/dist/esm/helpers/getVariantExtras.mjs.map +1 -1
- package/dist/esm/helpers/getVariantExtras.native.js.map +1 -1
- package/dist/esm/helpers/grammarConfig.mjs +59 -13
- package/dist/esm/helpers/grammarConfig.mjs.map +1 -1
- package/dist/esm/helpers/grammarConfig.native.js +80 -17
- package/dist/esm/helpers/grammarConfig.native.js.map +1 -1
- package/dist/esm/helpers/insertStyleRule.mjs.map +1 -1
- package/dist/esm/helpers/insertStyleRule.native.js.map +1 -1
- package/dist/esm/helpers/matchMedia.native.js.map +1 -1
- package/dist/esm/helpers/mediaObjectToString.mjs.map +1 -1
- package/dist/esm/helpers/mediaObjectToString.native.js.map +1 -1
- package/dist/esm/helpers/mergeVariants.mjs +1 -1
- package/dist/esm/helpers/mergeVariants.mjs.map +1 -1
- package/dist/esm/helpers/mergeVariants.native.js +1 -1
- package/dist/esm/helpers/mergeVariants.native.js.map +1 -1
- package/dist/esm/helpers/nativeStyleEngine.mjs.map +1 -1
- package/dist/esm/helpers/nativeStyleEngine.native.js.map +1 -1
- package/dist/esm/helpers/normalizeStyle.native.js.map +1 -1
- package/dist/esm/helpers/parseBorderShorthand.native.js.map +1 -1
- package/dist/esm/helpers/parseNativeStyle.native.js.map +1 -1
- package/dist/esm/helpers/parseNativeTransform.native.js.map +1 -1
- package/dist/esm/helpers/parseOutlineShorthand.native.js.map +1 -1
- package/dist/esm/helpers/propMapper.mjs +31 -39
- package/dist/esm/helpers/propMapper.mjs.map +1 -1
- package/dist/esm/helpers/propMapper.native.js +31 -39
- package/dist/esm/helpers/propMapper.native.js.map +1 -1
- package/dist/esm/helpers/proxyThemeToParents.mjs.map +1 -1
- package/dist/esm/helpers/proxyThemeToParents.native.js.map +1 -1
- package/dist/esm/helpers/registerCSSVariable.mjs.map +1 -1
- package/dist/esm/helpers/registerCSSVariable.native.js.map +1 -1
- package/dist/esm/helpers/resolveSafeAreaVariable.native.js.map +1 -1
- package/dist/esm/helpers/subscribeToContextGroup.native.js.map +1 -1
- package/dist/esm/helpers/themeRef.mjs.map +1 -1
- package/dist/esm/helpers/themeRef.native.js.map +1 -1
- package/dist/esm/helpers/themeUpdateState.mjs +4 -0
- package/dist/esm/helpers/themeUpdateState.mjs.map +1 -0
- package/dist/esm/helpers/themeUpdateState.native.js +4 -0
- package/dist/esm/helpers/themeUpdateState.native.js.map +1 -0
- package/dist/esm/helpers/timer.mjs.map +1 -1
- package/dist/esm/helpers/timer.native.js.map +1 -1
- package/dist/esm/helpers/tokenCategories.mjs.map +1 -1
- package/dist/esm/helpers/tokenCategories.native.js.map +1 -1
- package/dist/esm/helpers/transformsToString.native.js.map +1 -1
- package/dist/esm/helpers/useRenderElement.mjs.map +1 -1
- package/dist/esm/helpers/useRenderElement.native.js.map +1 -1
- package/dist/esm/helpers/variableValue.mjs +44 -0
- package/dist/esm/helpers/variableValue.mjs.map +1 -0
- package/dist/esm/helpers/variableValue.native.js +64 -0
- package/dist/esm/helpers/variableValue.native.js.map +1 -0
- package/dist/esm/helpers/variables.mjs +96 -136
- package/dist/esm/helpers/variables.mjs.map +1 -1
- package/dist/esm/helpers/variables.native.js +98 -158
- package/dist/esm/helpers/variables.native.js.map +1 -1
- package/dist/esm/helpers/warnOnce.mjs +1 -1
- package/dist/esm/helpers/warnOnce.mjs.map +1 -1
- package/dist/esm/helpers/warnOnce.native.js +1 -1
- package/dist/esm/helpers/warnOnce.native.js.map +1 -1
- package/dist/esm/hooks/getThemeProxied.mjs.map +1 -1
- package/dist/esm/hooks/getThemeProxied.native.js +2 -2
- package/dist/esm/hooks/getThemeProxied.native.js.map +1 -1
- package/dist/esm/hooks/useAnimationDriver.mjs +14 -8
- package/dist/esm/hooks/useAnimationDriver.mjs.map +1 -1
- package/dist/esm/hooks/useAnimationDriver.native.js +14 -8
- package/dist/esm/hooks/useAnimationDriver.native.js.map +1 -1
- package/dist/esm/hooks/useComponentState.mjs +27 -24
- package/dist/esm/hooks/useComponentState.mjs.map +1 -1
- package/dist/esm/hooks/useComponentState.native.js +28 -24
- package/dist/esm/hooks/useComponentState.native.js.map +1 -1
- package/dist/esm/hooks/useMedia.mjs.map +1 -1
- package/dist/esm/hooks/useMedia.native.js.map +1 -1
- package/dist/esm/hooks/usePortalThemeState.mjs +2 -2
- package/dist/esm/hooks/usePortalThemeState.mjs.map +1 -1
- package/dist/esm/hooks/usePortalThemeState.native.js +2 -2
- package/dist/esm/hooks/usePortalThemeState.native.js.map +1 -1
- package/dist/esm/hooks/useProps.mjs +1 -1
- package/dist/esm/hooks/useProps.mjs.map +1 -1
- package/dist/esm/hooks/useProps.native.js +1 -1
- package/dist/esm/hooks/useProps.native.js.map +1 -1
- package/dist/esm/hooks/useThemeName.mjs.map +1 -1
- package/dist/esm/hooks/useThemeState.mjs +12 -15
- package/dist/esm/hooks/useThemeState.mjs.map +1 -1
- package/dist/esm/hooks/useThemeState.native.js +14 -17
- package/dist/esm/hooks/useThemeState.native.js.map +1 -1
- package/dist/esm/index.js +0 -2
- package/dist/esm/index.mjs +0 -2
- package/dist/esm/index.native.js +0 -2
- package/dist/esm/insertFont.mjs.map +1 -1
- package/dist/esm/insertFont.native.js.map +1 -1
- package/dist/esm/internal-runtime.mjs +1 -3
- package/dist/esm/internal-runtime.mjs.map +1 -1
- package/dist/esm/internal-runtime.native.js +1 -3
- package/dist/esm/internal-runtime.native.js.map +1 -1
- package/dist/esm/styled.mjs.map +1 -1
- package/dist/esm/styled.native.js.map +1 -1
- package/dist/esm/theme-update.mjs +3 -0
- package/dist/esm/theme-update.native.js +3 -0
- package/dist/esm/views/FontLanguage.mjs.map +1 -1
- package/dist/esm/views/SafeAreaTracker.native.js.map +1 -1
- package/dist/esm/views/TamaguiProvider.mjs.map +1 -1
- package/dist/esm/views/TamaguiProvider.native.js.map +1 -1
- package/dist/esm/views/Theme.mjs +8 -33
- package/dist/esm/views/Theme.mjs.map +1 -1
- package/dist/esm/views/Theme.native.js +9 -20
- package/dist/esm/views/Theme.native.js.map +1 -1
- package/dist/esm/views/ThemeUpdate.mjs +54 -0
- package/dist/esm/views/ThemeUpdate.mjs.map +1 -0
- package/dist/esm/views/ThemeUpdate.native.js +53 -0
- package/dist/esm/views/ThemeUpdate.native.js.map +1 -0
- package/package.json +26 -17
- package/src/config.ts +7 -0
- package/src/createComponent.tsx +1 -4
- package/src/createTamagui.ts +3 -8
- package/src/dom/primitives.native.tsx +1 -1
- package/src/helpers/configVariables.ts +64 -0
- package/src/helpers/defaultAnimationDriver.tsx +0 -4
- package/src/helpers/directStyle.ts +876 -477
- package/src/helpers/getCSSStylesAtomic.ts +5 -1
- package/src/helpers/getSplitStyles.tsx +2 -23
- package/src/helpers/grammarConfig.ts +82 -12
- package/src/helpers/mergeVariants.ts +1 -3
- package/src/helpers/nativeTransitionTarget.native.ts +1 -1
- package/src/helpers/nativeTransitionTarget.ts +1 -1
- package/src/helpers/propMapper.ts +42 -49
- package/src/helpers/themeUpdateState.ts +27 -0
- package/src/helpers/variableValue.ts +45 -0
- package/src/helpers/variables.ts +149 -195
- package/src/helpers/warnOnce.ts +2 -2
- package/src/hooks/getThemeProxied.ts +9 -7
- package/src/hooks/useAnimationDriver.ts +26 -11
- package/src/hooks/useComponentState.ts +44 -34
- package/src/hooks/usePortalThemeState.ts +8 -8
- package/src/hooks/useProps.tsx +1 -4
- package/src/hooks/useThemeState.ts +16 -37
- package/src/index.ts +0 -1
- package/src/internal-runtime.ts +1 -8
- package/src/theme-update.ts +2 -0
- package/src/types.tsx +13 -21
- package/src/views/Theme.tsx +18 -80
- package/src/views/ThemeUpdate.tsx +88 -0
- package/types/config.d.ts.map +1 -1
- package/types/createComponent.d.ts.map +1 -1
- package/types/helpers/configVariables.d.ts +3 -0
- package/types/helpers/configVariables.d.ts.map +1 -0
- package/types/helpers/defaultAnimationDriver.d.ts.map +1 -1
- package/types/helpers/directStyle.d.ts +2 -23
- package/types/helpers/directStyle.d.ts.map +1 -1
- package/types/helpers/getCSSStylesAtomic.d.ts.map +1 -1
- package/types/helpers/getSplitStyles.d.ts.map +1 -1
- package/types/helpers/grammarConfig.d.ts +9 -0
- package/types/helpers/grammarConfig.d.ts.map +1 -1
- package/types/helpers/mergeVariants.d.ts.map +1 -1
- package/types/helpers/nativeTransitionTarget.d.ts +1 -1
- package/types/helpers/nativeTransitionTarget.d.ts.map +1 -1
- package/types/helpers/nativeTransitionTarget.native.d.ts +1 -1
- package/types/helpers/nativeTransitionTarget.native.d.ts.map +1 -1
- package/types/helpers/propMapper.d.ts.map +1 -1
- package/types/helpers/themeUpdateState.d.ts +23 -0
- package/types/helpers/themeUpdateState.d.ts.map +1 -0
- package/types/helpers/variableValue.d.ts +4 -0
- package/types/helpers/variableValue.d.ts.map +1 -0
- package/types/helpers/variables.d.ts +7 -24
- package/types/helpers/variables.d.ts.map +1 -1
- package/types/helpers/warnOnce.d.ts +1 -1
- package/types/hooks/getThemeProxied.d.ts.map +1 -1
- package/types/hooks/useAnimationDriver.d.ts.map +1 -1
- package/types/hooks/useComponentState.d.ts.map +1 -1
- package/types/hooks/usePortalThemeState.d.ts +5 -5
- package/types/hooks/usePortalThemeState.d.ts.map +1 -1
- package/types/hooks/useProps.d.ts.map +1 -1
- package/types/hooks/useThemeState.d.ts +2 -5
- package/types/hooks/useThemeState.d.ts.map +1 -1
- package/types/index.d.ts +0 -1
- package/types/index.d.ts.map +1 -1
- package/types/internal-runtime.d.ts.map +1 -1
- package/types/theme-update.d.ts +3 -0
- package/types/theme-update.d.ts.map +1 -0
- package/types/types.d.ts +6 -17
- package/types/types.d.ts.map +1 -1
- package/types/views/Theme.d.ts +2 -15
- package/types/views/Theme.d.ts.map +1 -1
- package/types/views/ThemeUpdate.d.ts +15 -0
- package/types/views/ThemeUpdate.d.ts.map +1 -0
|
@@ -13,16 +13,17 @@ import {
|
|
|
13
13
|
type StyleObject,
|
|
14
14
|
} from '@tamagui/helpers'
|
|
15
15
|
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
canonicalStateModifierNames,
|
|
17
|
+
isContainerSizeQueryText,
|
|
18
|
+
isModifierName,
|
|
19
|
+
modifierKindMedia,
|
|
20
|
+
modifierKindPlatform,
|
|
21
|
+
modifierKindState,
|
|
22
|
+
modifierKindTheme,
|
|
22
23
|
scanFlatValue,
|
|
24
|
+
stateModifierSelectors,
|
|
23
25
|
type ClausePrecedenceKey,
|
|
24
|
-
type
|
|
25
|
-
type ModifierKind,
|
|
26
|
+
type FlatValueHandler,
|
|
26
27
|
type ParsedValue,
|
|
27
28
|
} from '@tamagui/style-grammar/runtime'
|
|
28
29
|
|
|
@@ -32,9 +33,9 @@ import type { GetStyleState } from '../types'
|
|
|
32
33
|
import { warnOnce, warnRefusedValue } from './warnOnce'
|
|
33
34
|
import { expandStyle } from './expandStyle'
|
|
34
35
|
import { getCSSStyleAtomic } from './getCSSStylesAtomic'
|
|
36
|
+
import { getConfigRevisionState } from './grammarConfig'
|
|
35
37
|
import { isColorStyleKey } from './getDynamicVal'
|
|
36
38
|
import { shouldInsertStyleRules, updateRules } from './insertStyleRule'
|
|
37
|
-
import { mediaObjectToString } from './mediaObjectToString'
|
|
38
39
|
import { normalizeColor } from './normalizeColor'
|
|
39
40
|
import { parseNativeStyle } from './parseNativeStyle.native'
|
|
40
41
|
import { parseNativeTransform } from './parseNativeTransform.native'
|
|
@@ -54,20 +55,6 @@ export type MergeStyle = (
|
|
|
54
55
|
originalValue?: any
|
|
55
56
|
) => void
|
|
56
57
|
|
|
57
|
-
type Condition = {
|
|
58
|
-
key: string
|
|
59
|
-
active: boolean
|
|
60
|
-
emit: boolean
|
|
61
|
-
selector: string
|
|
62
|
-
wrappers?: string[]
|
|
63
|
-
enter?: true
|
|
64
|
-
exit?: true
|
|
65
|
-
theme?: string
|
|
66
|
-
precedence: ClausePrecedenceKey
|
|
67
|
-
classRepetitions: number
|
|
68
|
-
unsupportedState?: string
|
|
69
|
-
}
|
|
70
|
-
|
|
71
58
|
type DirectAtomic = {
|
|
72
59
|
baseRules: number
|
|
73
60
|
conditions?: Record<
|
|
@@ -94,21 +81,204 @@ type DirectState = GetStyleState & {
|
|
|
94
81
|
flatWebShadow?: Record<string, any>
|
|
95
82
|
}
|
|
96
83
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
84
|
+
const directStyleHandler: FlatValueHandler<GetStyleState> = {
|
|
85
|
+
segment(
|
|
86
|
+
state,
|
|
87
|
+
start,
|
|
88
|
+
end,
|
|
89
|
+
isBase,
|
|
90
|
+
valid,
|
|
91
|
+
source,
|
|
92
|
+
chainStart,
|
|
93
|
+
chainEnd,
|
|
94
|
+
chainValid,
|
|
95
|
+
chainCount,
|
|
96
|
+
_result,
|
|
97
|
+
failure,
|
|
98
|
+
failureIndex,
|
|
99
|
+
property,
|
|
100
|
+
merge,
|
|
101
|
+
originalValue,
|
|
102
|
+
contextOnly
|
|
103
|
+
) {
|
|
104
|
+
if (isBase) {
|
|
105
|
+
if (start === end) return
|
|
106
|
+
if (!valid) {
|
|
107
|
+
if (process.env.NODE_ENV === 'development') {
|
|
108
|
+
warnRefusedValue(
|
|
109
|
+
property,
|
|
110
|
+
source,
|
|
111
|
+
failure === 'invalid-character'
|
|
112
|
+
? `"${source[failureIndex]}" would end the declaration or rule`
|
|
113
|
+
: failure === 'unterminated-string'
|
|
114
|
+
? 'an unterminated string'
|
|
115
|
+
: failure === 'unterminated-comment'
|
|
116
|
+
? 'an unterminated "/*" comment'
|
|
117
|
+
: failure === 'stray-comment-close'
|
|
118
|
+
? 'a stray "*/"'
|
|
119
|
+
: 'an unterminated "("'
|
|
120
|
+
)
|
|
121
|
+
}
|
|
122
|
+
return
|
|
123
|
+
}
|
|
124
|
+
const value = source.slice(start, end)
|
|
125
|
+
emitValue(
|
|
126
|
+
state,
|
|
127
|
+
property,
|
|
128
|
+
value,
|
|
129
|
+
0,
|
|
130
|
+
'',
|
|
131
|
+
undefined,
|
|
132
|
+
'',
|
|
133
|
+
'',
|
|
134
|
+
merge,
|
|
135
|
+
value,
|
|
136
|
+
contextOnly
|
|
137
|
+
)
|
|
138
|
+
return 5
|
|
139
|
+
}
|
|
140
|
+
if (!chainValid) {
|
|
141
|
+
if (process.env.NODE_ENV === 'development') {
|
|
142
|
+
warnRefusedValue(
|
|
143
|
+
property,
|
|
144
|
+
source,
|
|
145
|
+
failure === 'invalid-character'
|
|
146
|
+
? `"${source[failureIndex]}" would end the declaration or rule`
|
|
147
|
+
: failure === 'unterminated-string'
|
|
148
|
+
? 'an unterminated string'
|
|
149
|
+
: failure === 'unterminated-comment'
|
|
150
|
+
? 'an unterminated "/*" comment'
|
|
151
|
+
: failure === 'stray-comment-close'
|
|
152
|
+
? 'a stray "*/"'
|
|
153
|
+
: 'an unterminated "("'
|
|
154
|
+
)
|
|
155
|
+
}
|
|
156
|
+
return
|
|
157
|
+
}
|
|
158
|
+
if (start === end) {
|
|
159
|
+
if (process.env.NODE_ENV === 'development') {
|
|
160
|
+
warnRefusedValue(property, source, 'a conditional clause has no value')
|
|
161
|
+
}
|
|
162
|
+
return
|
|
163
|
+
}
|
|
164
|
+
if (property === 'aspectRatio' && chainCount === 1) {
|
|
165
|
+
const left = Number(source.slice(chainStart, chainEnd))
|
|
166
|
+
const right = Number(source.slice(start, end))
|
|
167
|
+
if (
|
|
168
|
+
chainStart < chainEnd &&
|
|
169
|
+
Number.isFinite(left) &&
|
|
170
|
+
left > 0 &&
|
|
171
|
+
Number.isFinite(right) &&
|
|
172
|
+
right > 0
|
|
173
|
+
) {
|
|
174
|
+
return 12
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
const condition = resolveClauseChain(
|
|
178
|
+
state,
|
|
179
|
+
source,
|
|
180
|
+
chainStart,
|
|
181
|
+
chainEnd,
|
|
182
|
+
property,
|
|
183
|
+
undefined,
|
|
184
|
+
valid ? merge : undefined,
|
|
185
|
+
undefined,
|
|
186
|
+
contextOnly,
|
|
187
|
+
start,
|
|
188
|
+
end,
|
|
189
|
+
1
|
|
190
|
+
)
|
|
191
|
+
if (!condition) return
|
|
192
|
+
if (!valid) {
|
|
193
|
+
if (process.env.NODE_ENV === 'development') {
|
|
194
|
+
warnRefusedValue(
|
|
195
|
+
property,
|
|
196
|
+
source,
|
|
197
|
+
failure === 'invalid-character'
|
|
198
|
+
? `"${source[failureIndex]}" would end the declaration or rule`
|
|
199
|
+
: failure === 'unterminated-string'
|
|
200
|
+
? 'an unterminated string'
|
|
201
|
+
: failure === 'unterminated-comment'
|
|
202
|
+
? 'an unterminated "/*" comment'
|
|
203
|
+
: failure === 'stray-comment-close'
|
|
204
|
+
? 'a stray "*/"'
|
|
205
|
+
: 'an unterminated "("'
|
|
206
|
+
)
|
|
207
|
+
}
|
|
208
|
+
return
|
|
209
|
+
}
|
|
210
|
+
return 4 | (condition & 12 ? 2 : 0)
|
|
211
|
+
},
|
|
212
|
+
chain() {
|
|
213
|
+
return true
|
|
214
|
+
},
|
|
215
|
+
end(
|
|
216
|
+
state,
|
|
217
|
+
source,
|
|
218
|
+
result,
|
|
219
|
+
lastPayloadStart,
|
|
220
|
+
chainCount,
|
|
221
|
+
property,
|
|
222
|
+
merge,
|
|
223
|
+
originalValue,
|
|
224
|
+
contextOnly
|
|
225
|
+
) {
|
|
226
|
+
let hasBase = !!(result & 1)
|
|
227
|
+
if (result & 8 && chainCount === 1) {
|
|
228
|
+
emitValue(
|
|
229
|
+
state,
|
|
230
|
+
property,
|
|
231
|
+
source,
|
|
232
|
+
0,
|
|
233
|
+
'',
|
|
234
|
+
undefined,
|
|
235
|
+
'',
|
|
236
|
+
'',
|
|
237
|
+
merge,
|
|
238
|
+
originalValue ?? source,
|
|
239
|
+
contextOnly
|
|
240
|
+
)
|
|
241
|
+
hasBase = true
|
|
242
|
+
}
|
|
243
|
+
if (
|
|
244
|
+
process.env.NODE_ENV === 'development' &&
|
|
245
|
+
!hasBase &&
|
|
246
|
+
result & 4 &&
|
|
247
|
+
(property in tokenCategories.color || property in tokenCategoryByProperty) &&
|
|
248
|
+
splitComponents(source.slice(lastPayloadStart)).length > 1
|
|
249
|
+
) {
|
|
250
|
+
warnOnce(
|
|
251
|
+
`${property}="${source}" has multiple values after its first conditional. Write the base value before the first conditional.`
|
|
252
|
+
)
|
|
253
|
+
}
|
|
254
|
+
if ((!isWeb || !state.flatShouldDoClasses) && result & 2 && !hasBase) {
|
|
255
|
+
const value =
|
|
256
|
+
property === 'opacity'
|
|
257
|
+
? 1
|
|
258
|
+
: property === 'scale' || property === 'scaleX' || property === 'scaleY'
|
|
259
|
+
? 1
|
|
260
|
+
: property === 'rotate'
|
|
261
|
+
? '0deg'
|
|
262
|
+
: property === 'x' || property === 'y'
|
|
263
|
+
? 0
|
|
264
|
+
: null
|
|
265
|
+
if (value !== null) {
|
|
266
|
+
emitValue(
|
|
267
|
+
state,
|
|
268
|
+
property,
|
|
269
|
+
value,
|
|
270
|
+
0,
|
|
271
|
+
'',
|
|
272
|
+
undefined,
|
|
273
|
+
'',
|
|
274
|
+
'',
|
|
275
|
+
merge,
|
|
276
|
+
value,
|
|
277
|
+
contextOnly
|
|
278
|
+
)
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
},
|
|
112
282
|
}
|
|
113
283
|
|
|
114
284
|
const legacyTransformParts = new Set([
|
|
@@ -202,41 +372,6 @@ const borderStyleDefaults: Record<string, string> = {
|
|
|
202
372
|
borderLeftWidth: 'borderLeftStyle',
|
|
203
373
|
}
|
|
204
374
|
|
|
205
|
-
const mediaQueries = new WeakMap<object, Record<string, string>>()
|
|
206
|
-
const clausePrecedenceOrders = new WeakMap<object, ClausePrecedenceOrder>()
|
|
207
|
-
function queryFor(state: GetStyleState, name: string): string | undefined {
|
|
208
|
-
let queries = mediaQueries.get(state.conf)
|
|
209
|
-
if (!queries) {
|
|
210
|
-
queries = {}
|
|
211
|
-
const media = state.conf.media || {}
|
|
212
|
-
for (const key in media) queries[key] = mediaObjectToString(media[key])
|
|
213
|
-
mediaQueries.set(state.conf, queries)
|
|
214
|
-
}
|
|
215
|
-
return queries[name]
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
function precedenceOrderFor(state: GetStyleState): ClausePrecedenceOrder {
|
|
219
|
-
let order = clausePrecedenceOrders.get(state.conf)
|
|
220
|
-
if (!order) {
|
|
221
|
-
order = createClausePrecedenceOrder(state.conf.media)
|
|
222
|
-
clausePrecedenceOrders.set(state.conf, order)
|
|
223
|
-
}
|
|
224
|
-
return order
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
function stateIsActive(state: GetStyleState, name: string): boolean {
|
|
228
|
-
const component = state.componentState
|
|
229
|
-
if (name === 'hover') return !!component.hover
|
|
230
|
-
if (name === 'press') return !!(component.press || component.pressIn)
|
|
231
|
-
if (name === 'focus') return !!component.focus
|
|
232
|
-
if (name === 'focus-visible') return !!component.focusVisible
|
|
233
|
-
if (name === 'focus-within') return !!component.focusWithin
|
|
234
|
-
if (name === 'disabled') return !!(component.disabled || state.props.disabled)
|
|
235
|
-
if (name === 'enter') return !!component.unmounted
|
|
236
|
-
if (name === 'exit') return !!state.styleProps.isExiting
|
|
237
|
-
return false
|
|
238
|
-
}
|
|
239
|
-
|
|
240
375
|
export function platformMatches(name: string): boolean {
|
|
241
376
|
if (name === 'web') return isWeb
|
|
242
377
|
if (name === 'native') return !isWeb
|
|
@@ -247,164 +382,278 @@ export function platformMatches(name: string): boolean {
|
|
|
247
382
|
return name === 'tv' && isTV
|
|
248
383
|
}
|
|
249
384
|
|
|
250
|
-
function
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
active === undefined
|
|
280
|
-
? !!(context?.state.layout && mediaKeyMatch(size, context.state.layout))
|
|
281
|
-
: !!active
|
|
282
|
-
;(state.flatGroupKeys ||= new Set()).add(key)
|
|
283
|
-
;(state.flatGroupMedia ||= new Set()).add(size)
|
|
284
|
-
return true
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
/**
|
|
288
|
-
* Resolve one modifier chain against the live state, or null when the runtime
|
|
289
|
-
* has no such modifier. Exported because the variant scanner in `propMapper`
|
|
290
|
-
* has to refuse exactly the chains this one refuses; two answers to "is this a
|
|
291
|
-
* modifier" is how the prop and variant paths came to disagree about how much
|
|
292
|
-
* of a bad value survives.
|
|
293
|
-
*/
|
|
294
|
-
export function getCondition(state: GetStyleState, source: string): Condition | null {
|
|
295
|
-
const out = { key: '', active: true, emit: true, selector: '' } as Condition
|
|
296
|
-
const canonical: string[] = []
|
|
297
|
-
const kinds: ModifierKind[] = []
|
|
298
|
-
const seenModifiers = new Set<string>()
|
|
385
|
+
export function resolveClauseChain(
|
|
386
|
+
state: GetStyleState,
|
|
387
|
+
source: string,
|
|
388
|
+
start: number,
|
|
389
|
+
end: number,
|
|
390
|
+
property?: string,
|
|
391
|
+
raw?: any,
|
|
392
|
+
merge?: MergeStyle,
|
|
393
|
+
originalValue?: any,
|
|
394
|
+
contextOnly = false,
|
|
395
|
+
payloadStart = -1,
|
|
396
|
+
payloadEnd = -1,
|
|
397
|
+
warning = 0
|
|
398
|
+
): number {
|
|
399
|
+
const compiled = getConfigRevisionState(state.conf)
|
|
400
|
+
const sourceStart = start
|
|
401
|
+
let key = ''
|
|
402
|
+
let active = true
|
|
403
|
+
let emit = true
|
|
404
|
+
let selector = ''
|
|
405
|
+
let wrappers: string[] | undefined
|
|
406
|
+
let theme = ''
|
|
407
|
+
let enter = false
|
|
408
|
+
let exit = false
|
|
409
|
+
let unsupportedState = ''
|
|
410
|
+
let platformRank = 0
|
|
411
|
+
let depth = 0
|
|
412
|
+
let categoryRank = 0
|
|
413
|
+
let withinRank = 0
|
|
299
414
|
let selfStateSpecificity = 0
|
|
300
|
-
let
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
let modifier = canonicalClauseModifier(source.slice(start, index))
|
|
415
|
+
for (let index = start; index <= end; index++) {
|
|
416
|
+
if (index !== end && source.charCodeAt(index) !== 58) continue
|
|
417
|
+
let modifier = source.slice(start, index)
|
|
304
418
|
start = index + 1
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
419
|
+
let code = compiled.modifiers[modifier]
|
|
420
|
+
let kind = code & 7
|
|
421
|
+
let rank = code >> 3
|
|
422
|
+
let stateSelector = ''
|
|
423
|
+
let conditionStateName = ''
|
|
424
|
+
let groupName = ''
|
|
425
|
+
let containerSize = ''
|
|
426
|
+
let containerName = ''
|
|
427
|
+
let containerQuery = ''
|
|
428
|
+
if (kind === modifierKindState) {
|
|
429
|
+
modifier = canonicalStateModifierNames[rank]
|
|
430
|
+
stateSelector = stateModifierSelectors[rank]
|
|
431
|
+
} else if (!kind && modifier.startsWith('group-')) {
|
|
432
|
+
const slash = modifier.indexOf('/')
|
|
433
|
+
const authoredState = modifier.slice(6, slash === -1 ? undefined : slash)
|
|
434
|
+
code = compiled.modifiers[authoredState]
|
|
435
|
+
if ((code & 7) !== modifierKindState) kind = 0
|
|
436
|
+
else {
|
|
437
|
+
rank = code >> 3
|
|
438
|
+
groupName = slash === -1 ? 'true' : modifier.slice(slash + 1)
|
|
439
|
+
if (
|
|
440
|
+
rank === 6 ||
|
|
441
|
+
rank === 7 ||
|
|
442
|
+
(slash !== -1 && !isModifierName(groupName, 0, groupName.length))
|
|
443
|
+
) {
|
|
444
|
+
kind = 0
|
|
445
|
+
} else {
|
|
446
|
+
kind = 5
|
|
447
|
+
const stateName = canonicalStateModifierNames[rank]
|
|
448
|
+
conditionStateName = stateName
|
|
449
|
+
stateSelector = stateModifierSelectors[rank]
|
|
450
|
+
modifier = `group-${stateName}${slash === -1 ? '' : modifier.slice(slash)}`
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
} else if (!kind && modifier.charCodeAt(0) === 64) {
|
|
454
|
+
const slash = modifier.indexOf('/')
|
|
455
|
+
containerSize = modifier.slice(1, slash === -1 ? undefined : slash)
|
|
456
|
+
containerName = slash === -1 ? '' : modifier.slice(slash + 1)
|
|
326
457
|
if (
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
modifier !== 'focus-within' &&
|
|
333
|
-
modifier !== 'disabled' &&
|
|
334
|
-
modifier !== 'enter' &&
|
|
335
|
-
modifier !== 'exit'
|
|
458
|
+
isModifierName(containerSize, 0, containerSize.length) &&
|
|
459
|
+
(slash === -1 || isModifierName(containerName, 0, containerName.length)) &&
|
|
460
|
+
((code = compiled.modifiers[containerSize]) & 7) === modifierKindMedia &&
|
|
461
|
+
(containerQuery = compiled.mediaQueries[containerSize]) &&
|
|
462
|
+
isContainerSizeQueryText(containerQuery)
|
|
336
463
|
) {
|
|
337
|
-
|
|
464
|
+
kind = 6
|
|
465
|
+
rank = code >> 3
|
|
338
466
|
}
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
467
|
+
}
|
|
468
|
+
if (!kind) {
|
|
469
|
+
if (warning && process.env.NODE_ENV === 'development') {
|
|
470
|
+
warnRefusedValue(
|
|
471
|
+
property!,
|
|
472
|
+
warning === 1 ? source : raw,
|
|
473
|
+
`unknown modifier "${source.slice(sourceStart, end)}"`
|
|
474
|
+
)
|
|
345
475
|
}
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
) {
|
|
355
|
-
|
|
476
|
+
return 0
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
let slotStart = 0
|
|
480
|
+
let duplicate = false
|
|
481
|
+
let inserted = !key
|
|
482
|
+
if (!key) key = modifier
|
|
483
|
+
else {
|
|
484
|
+
while (slotStart <= key.length) {
|
|
485
|
+
let slotEnd = key.indexOf(':', slotStart)
|
|
486
|
+
if (slotEnd === -1) slotEnd = key.length
|
|
487
|
+
let order = 0
|
|
488
|
+
const compareLength = Math.min(modifier.length, slotEnd - slotStart)
|
|
489
|
+
for (let offset = 0; offset < compareLength; offset++) {
|
|
490
|
+
order = modifier.charCodeAt(offset) - key.charCodeAt(slotStart + offset)
|
|
491
|
+
if (order) break
|
|
492
|
+
}
|
|
493
|
+
order ||= modifier.length - (slotEnd - slotStart)
|
|
494
|
+
if (!order) {
|
|
495
|
+
duplicate = true
|
|
496
|
+
break
|
|
497
|
+
}
|
|
498
|
+
if (order < 0) {
|
|
499
|
+
key = `${key.slice(0, slotStart)}${modifier}:${key.slice(slotStart)}`
|
|
500
|
+
inserted = true
|
|
501
|
+
break
|
|
502
|
+
}
|
|
503
|
+
if (slotEnd === key.length) break
|
|
504
|
+
slotStart = slotEnd + 1
|
|
356
505
|
}
|
|
357
|
-
|
|
506
|
+
if (!duplicate && !inserted) key += `:${modifier}`
|
|
358
507
|
}
|
|
359
|
-
if (
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
;(state.flatMediaKeys ||= new Set()).add(modifier)
|
|
508
|
+
if (duplicate) continue
|
|
509
|
+
|
|
510
|
+
if (kind === modifierKindPlatform) {
|
|
511
|
+
if (rank > platformRank) platformRank = rank
|
|
512
|
+
const matches = platformMatches(modifier)
|
|
513
|
+
active &&= matches
|
|
514
|
+
emit &&= matches
|
|
367
515
|
continue
|
|
368
516
|
}
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
517
|
+
depth++
|
|
518
|
+
const nextCategory =
|
|
519
|
+
kind === modifierKindMedia
|
|
520
|
+
? 0
|
|
521
|
+
: kind === 6
|
|
522
|
+
? 1
|
|
523
|
+
: kind === modifierKindTheme
|
|
524
|
+
? 2
|
|
525
|
+
: kind === 5
|
|
526
|
+
? 3
|
|
527
|
+
: 4
|
|
528
|
+
if (nextCategory > categoryRank) {
|
|
529
|
+
categoryRank = nextCategory
|
|
530
|
+
withinRank = rank
|
|
531
|
+
} else if (nextCategory === categoryRank && rank > withinRank) {
|
|
532
|
+
withinRank = rank
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
if (kind === modifierKindMedia) {
|
|
536
|
+
const query = compiled.mediaQueries[modifier]
|
|
537
|
+
if (!query) return 0
|
|
538
|
+
;(wrappers ||= []).push(`@media ${query}`)
|
|
539
|
+
active &&= !!state.flatMediaState?.[modifier]
|
|
540
|
+
;(state.flatMediaKeys ||= new Set()).add(modifier)
|
|
541
|
+
} else if (kind === modifierKindTheme) {
|
|
542
|
+
theme = modifier
|
|
543
|
+
selector += `:where(.t_${modifier}, .t_${modifier} *)`
|
|
544
|
+
active &&=
|
|
375
545
|
state.flatThemeName === modifier ||
|
|
376
546
|
state.flatThemeName?.startsWith(`${modifier}_`) === true
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
547
|
+
} else if (kind === 5) {
|
|
548
|
+
selector += `:where(.t_group_${groupName}${stateSelector} *)`
|
|
549
|
+
if (rank === 0) (wrappers ||= []).push('@media (hover: hover)')
|
|
550
|
+
const component = state.componentState.group?.[groupName]
|
|
551
|
+
const context = state.flatGroupContext?.[groupName]
|
|
552
|
+
active &&= !!(component?.pseudo ?? context?.state.pseudo)?.[conditionStateName]
|
|
553
|
+
;(state.flatGroupKeys ||= new Set()).add(groupName)
|
|
554
|
+
} else if (kind === 6) {
|
|
555
|
+
const groupKey = `@${containerName}`
|
|
556
|
+
;(wrappers ||= []).push(
|
|
557
|
+
containerName
|
|
558
|
+
? `@container ${containerName} ${containerQuery}`
|
|
559
|
+
: `@container ${containerQuery}`
|
|
560
|
+
)
|
|
561
|
+
const component = state.componentState.group?.[groupKey]
|
|
562
|
+
const context = state.flatGroupContext?.[groupKey]
|
|
563
|
+
const match = component?.media?.[containerSize]
|
|
564
|
+
active &&=
|
|
565
|
+
match === undefined
|
|
566
|
+
? !!(
|
|
567
|
+
context?.state.layout && mediaKeyMatch(containerSize, context.state.layout)
|
|
568
|
+
)
|
|
569
|
+
: !!match
|
|
570
|
+
;(state.flatGroupKeys ||= new Set()).add(groupKey)
|
|
571
|
+
;(state.flatGroupMedia ||= new Set()).add(containerSize)
|
|
572
|
+
} else {
|
|
573
|
+
selfStateSpecificity++
|
|
574
|
+
if (!isWeb && stateSelector[0] === '[' && modifier !== 'disabled') {
|
|
575
|
+
unsupportedState = modifier
|
|
576
|
+
}
|
|
577
|
+
if (stateSelector[0] === '.') {
|
|
578
|
+
selector += `:is(${stateSelector}, ${stateSelector} *)`
|
|
579
|
+
if (rank === 6) enter = true
|
|
580
|
+
else exit = true
|
|
581
|
+
} else {
|
|
582
|
+
selector += stateSelector
|
|
583
|
+
}
|
|
584
|
+
if (rank === 0) (wrappers ||= []).push('@media (hover: hover)')
|
|
585
|
+
const component = state.componentState
|
|
586
|
+
active &&=
|
|
587
|
+
rank === 0
|
|
588
|
+
? !!component.hover
|
|
589
|
+
: rank === 4
|
|
590
|
+
? !!(component.press || component.pressIn)
|
|
591
|
+
: rank === 2
|
|
592
|
+
? !!component.focus
|
|
593
|
+
: rank === 3
|
|
594
|
+
? !!component.focusVisible
|
|
595
|
+
: rank === 1
|
|
596
|
+
? !!component.focusWithin
|
|
597
|
+
: rank === 5
|
|
598
|
+
? !!(component.disabled || state.props.disabled)
|
|
599
|
+
: rank === 6
|
|
600
|
+
? !!component.unmounted
|
|
601
|
+
: rank === 7
|
|
602
|
+
? !!state.styleProps.isExiting
|
|
603
|
+
: false
|
|
604
|
+
if (stateSelector[0] === ':') {
|
|
605
|
+
;(state.flatStateKeys ||= new Set()).add(modifier)
|
|
606
|
+
}
|
|
394
607
|
}
|
|
395
|
-
return null
|
|
396
608
|
}
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
609
|
+
if (depth > 5) {
|
|
610
|
+
throw new Error(
|
|
611
|
+
`a flat value clause supports at most 5 non-platform conditions; received ${depth} in "${source.slice(sourceStart, end)}:"`
|
|
612
|
+
)
|
|
613
|
+
}
|
|
614
|
+
const precedence =
|
|
615
|
+
(platformRank << 26) | (depth << 23) | (categoryRank << 20) | withinRank
|
|
616
|
+
const condition =
|
|
617
|
+
precedence * 256 +
|
|
618
|
+
selfStateSpecificity * 32 +
|
|
619
|
+
16 +
|
|
620
|
+
(active ? 1 : 0) +
|
|
621
|
+
(emit ? 2 : 0) +
|
|
622
|
+
(enter ? 4 : 0) +
|
|
623
|
+
(exit ? 8 : 0)
|
|
624
|
+
if (warning && unsupportedState && process.env.NODE_ENV === 'development') {
|
|
625
|
+
warnOnce(
|
|
626
|
+
`${property}: "${unsupportedState}:" has no native component-state source; dropping the clause`
|
|
627
|
+
)
|
|
628
|
+
}
|
|
629
|
+
if (
|
|
630
|
+
merge &&
|
|
631
|
+
property &&
|
|
632
|
+
condition & 2 &&
|
|
633
|
+
(condition & 1 ||
|
|
634
|
+
(isWeb && state.flatShouldDoClasses) ||
|
|
635
|
+
(warning === 1 &&
|
|
636
|
+
!isWeb &&
|
|
637
|
+
theme &&
|
|
638
|
+
supportsDynamicColorIOS &&
|
|
639
|
+
isColorStyleKey(property)))
|
|
640
|
+
) {
|
|
641
|
+
const value = payloadStart === -1 ? raw : source.slice(payloadStart, payloadEnd)
|
|
642
|
+
emitValue(
|
|
643
|
+
state,
|
|
644
|
+
property,
|
|
645
|
+
value,
|
|
646
|
+
condition,
|
|
647
|
+
key,
|
|
648
|
+
wrappers,
|
|
649
|
+
selector,
|
|
650
|
+
theme,
|
|
651
|
+
merge,
|
|
652
|
+
warning === 2 ? originalValue : (originalValue ?? value),
|
|
653
|
+
contextOnly
|
|
654
|
+
)
|
|
655
|
+
}
|
|
656
|
+
return condition
|
|
408
657
|
}
|
|
409
658
|
|
|
410
659
|
interface TokenLookup {
|
|
@@ -499,10 +748,7 @@ function configuredValue(state: GetStyleState, property: string, raw: string): a
|
|
|
499
748
|
}
|
|
500
749
|
}
|
|
501
750
|
|
|
502
|
-
const safeArea =
|
|
503
|
-
process.env.TAMAGUI_RUNTIME_SAFE_AREA === 'disabled'
|
|
504
|
-
? undefined
|
|
505
|
-
: resolveSafeAreaVariable(name)
|
|
751
|
+
const safeArea = resolveSafeAreaVariable(name)
|
|
506
752
|
if (safeArea !== undefined) {
|
|
507
753
|
state.flatUsesSafeArea = true
|
|
508
754
|
return safeArea
|
|
@@ -639,23 +885,31 @@ function directAtomic(
|
|
|
639
885
|
state: DirectState,
|
|
640
886
|
property: string,
|
|
641
887
|
value: any,
|
|
642
|
-
condition:
|
|
888
|
+
condition: number,
|
|
889
|
+
conditionKey: string,
|
|
890
|
+
conditionWrappers: string[] | undefined,
|
|
891
|
+
conditionSelector: string,
|
|
643
892
|
isDefault = false
|
|
644
893
|
) {
|
|
645
894
|
const atomics = (state.flatAtomics ||= {})
|
|
646
895
|
const atomicKey = property.startsWith('transition') ? 'transition' : property
|
|
647
896
|
const existing = atomics[atomicKey]
|
|
648
|
-
const contribution = directStyleSignature(property, value,
|
|
897
|
+
const contribution = directStyleSignature(property, value, conditionKey)
|
|
649
898
|
const signature = existing ? existing.signature + contribution : contribution
|
|
650
899
|
const next = getCSSStyleAtomic(
|
|
651
900
|
property,
|
|
652
901
|
value,
|
|
653
|
-
|
|
654
|
-
|
|
902
|
+
conditionSelector,
|
|
903
|
+
conditionWrappers,
|
|
655
904
|
signature,
|
|
656
905
|
true,
|
|
657
906
|
atomicKey,
|
|
658
|
-
condition
|
|
907
|
+
condition
|
|
908
|
+
? 1 +
|
|
909
|
+
((Math.floor(condition / 256) >>> 23) & 7) +
|
|
910
|
+
(Math.floor(condition / 256) >>> 26) * 6 -
|
|
911
|
+
((condition >>> 5) & 7)
|
|
912
|
+
: undefined
|
|
659
913
|
)
|
|
660
914
|
if (!next) return
|
|
661
915
|
const identifier = next[StyleObjectIdentifier]
|
|
@@ -675,12 +929,10 @@ function directAtomic(
|
|
|
675
929
|
}
|
|
676
930
|
if (slotted) {
|
|
677
931
|
atomic.conditions = {
|
|
678
|
-
[atomicKey === 'transition'
|
|
679
|
-
? `${condition?.key || ''}\0${property}`
|
|
680
|
-
: condition!.key]: {
|
|
932
|
+
[atomicKey === 'transition' ? `${conditionKey}\0${property}` : conditionKey]: {
|
|
681
933
|
count: nextRules.length,
|
|
682
934
|
index: 0,
|
|
683
|
-
precedence: condition
|
|
935
|
+
precedence: condition ? Math.floor(condition / 256) : 0,
|
|
684
936
|
default: isDefault,
|
|
685
937
|
},
|
|
686
938
|
}
|
|
@@ -710,9 +962,7 @@ function directAtomic(
|
|
|
710
962
|
}
|
|
711
963
|
if (slotted) {
|
|
712
964
|
const slot =
|
|
713
|
-
atomicKey === 'transition'
|
|
714
|
-
? `${condition?.key || ''}\0${property}`
|
|
715
|
-
: condition!.key
|
|
965
|
+
atomicKey === 'transition' ? `${conditionKey}\0${property}` : conditionKey
|
|
716
966
|
const previous = existing.conditions?.[slot]
|
|
717
967
|
if (previous) {
|
|
718
968
|
rules.splice(previous.index, previous.count)
|
|
@@ -726,7 +976,7 @@ function directAtomic(
|
|
|
726
976
|
}
|
|
727
977
|
delete existing.conditions![slot]
|
|
728
978
|
}
|
|
729
|
-
const precedence = condition
|
|
979
|
+
const precedence = condition ? Math.floor(condition / 256) : 0
|
|
730
980
|
let insertionIndex = rules.length
|
|
731
981
|
if (existing.conditions) {
|
|
732
982
|
for (const key in existing.conditions) {
|
|
@@ -766,7 +1016,10 @@ function directAtomic(
|
|
|
766
1016
|
function emitBorderStyleDefault(
|
|
767
1017
|
state: GetStyleState,
|
|
768
1018
|
property: string,
|
|
769
|
-
condition:
|
|
1019
|
+
condition: number,
|
|
1020
|
+
conditionKey: string,
|
|
1021
|
+
conditionWrappers: string[] | undefined,
|
|
1022
|
+
conditionSelector: string
|
|
770
1023
|
) {
|
|
771
1024
|
if (!isWeb || !state.flatShouldDoClasses || state.styleProps.noNormalize === false) {
|
|
772
1025
|
return
|
|
@@ -777,11 +1030,20 @@ function emitBorderStyleDefault(
|
|
|
777
1030
|
if (
|
|
778
1031
|
atomic?.baseRules ||
|
|
779
1032
|
(state.classNames[target] && !atomic) ||
|
|
780
|
-
(condition && atomic?.conditions?.[
|
|
1033
|
+
(condition && atomic?.conditions?.[conditionKey])
|
|
781
1034
|
) {
|
|
782
1035
|
return
|
|
783
1036
|
}
|
|
784
|
-
directAtomic(
|
|
1037
|
+
directAtomic(
|
|
1038
|
+
state as DirectState,
|
|
1039
|
+
target,
|
|
1040
|
+
'solid',
|
|
1041
|
+
condition,
|
|
1042
|
+
conditionKey,
|
|
1043
|
+
conditionWrappers,
|
|
1044
|
+
conditionSelector,
|
|
1045
|
+
true
|
|
1046
|
+
)
|
|
785
1047
|
}
|
|
786
1048
|
|
|
787
1049
|
export function flushDirectStyles(state: GetStyleState, clear = false) {
|
|
@@ -807,19 +1069,23 @@ function emitProperty(
|
|
|
807
1069
|
state: GetStyleState,
|
|
808
1070
|
property: string,
|
|
809
1071
|
value: any,
|
|
810
|
-
condition:
|
|
1072
|
+
condition: number,
|
|
1073
|
+
conditionKey: string,
|
|
1074
|
+
conditionWrappers: string[] | undefined,
|
|
1075
|
+
conditionSelector: string,
|
|
1076
|
+
conditionTheme: string,
|
|
811
1077
|
merge: MergeStyle,
|
|
812
1078
|
originalValue: any,
|
|
813
1079
|
contextOnly: boolean
|
|
814
1080
|
) {
|
|
815
1081
|
const direct = state as DirectState
|
|
816
|
-
if (condition
|
|
817
|
-
if (condition
|
|
1082
|
+
if (condition & 4) (state.flatEnterKeys ||= new Set()).add(property)
|
|
1083
|
+
if (condition & 8) (state.flatExitKeys ||= new Set()).add(property)
|
|
818
1084
|
|
|
819
|
-
if (!isWeb &&
|
|
1085
|
+
if (!isWeb && conditionTheme) {
|
|
820
1086
|
if (supportsDynamicColorIOS && isColorStyleKey(property)) {
|
|
821
1087
|
const schemes = ((direct.flatDynamicColors ||= {})[property] ||= {})
|
|
822
|
-
schemes[
|
|
1088
|
+
schemes[conditionTheme] =
|
|
823
1089
|
typeof originalValue === 'string' && /^[a-z]+$/i.test(originalValue)
|
|
824
1090
|
? originalValue
|
|
825
1091
|
: value
|
|
@@ -830,7 +1096,7 @@ function emitProperty(
|
|
|
830
1096
|
}
|
|
831
1097
|
|
|
832
1098
|
if (contextOnly) {
|
|
833
|
-
if (!condition || condition
|
|
1099
|
+
if (!condition || condition & 1) {
|
|
834
1100
|
;(state.overriddenContextProps ||= {})[property] = originalValue
|
|
835
1101
|
}
|
|
836
1102
|
return
|
|
@@ -849,15 +1115,24 @@ function emitProperty(
|
|
|
849
1115
|
if (!condition) {
|
|
850
1116
|
if (state.style) delete state.style[property]
|
|
851
1117
|
}
|
|
852
|
-
directAtomic(
|
|
1118
|
+
directAtomic(
|
|
1119
|
+
state as DirectState,
|
|
1120
|
+
property,
|
|
1121
|
+
value,
|
|
1122
|
+
condition,
|
|
1123
|
+
conditionKey,
|
|
1124
|
+
conditionWrappers,
|
|
1125
|
+
conditionSelector
|
|
1126
|
+
)
|
|
853
1127
|
return
|
|
854
1128
|
}
|
|
855
1129
|
|
|
856
1130
|
if (condition) {
|
|
857
|
-
if (!condition
|
|
1131
|
+
if (!(condition & 1)) return
|
|
1132
|
+
const precedence = Math.floor(condition / 256)
|
|
858
1133
|
const previous = direct.flatPrecedence?.[property]
|
|
859
|
-
if (previous !== undefined &&
|
|
860
|
-
;(direct.flatPrecedence ||= {})[property] =
|
|
1134
|
+
if (previous !== undefined && precedence < previous) return
|
|
1135
|
+
;(direct.flatPrecedence ||= {})[property] = precedence
|
|
861
1136
|
;(state.flatActiveConditions ||= {})[property] = true
|
|
862
1137
|
} else if (state.flatActiveConditions?.[property]) {
|
|
863
1138
|
return
|
|
@@ -892,7 +1167,11 @@ function emitBorder(
|
|
|
892
1167
|
state: GetStyleState,
|
|
893
1168
|
property: string,
|
|
894
1169
|
raw: string,
|
|
895
|
-
condition:
|
|
1170
|
+
condition: number,
|
|
1171
|
+
conditionKey: string,
|
|
1172
|
+
conditionWrappers: string[] | undefined,
|
|
1173
|
+
conditionSelector: string,
|
|
1174
|
+
conditionTheme: string,
|
|
896
1175
|
merge: MergeStyle,
|
|
897
1176
|
originalValue: any,
|
|
898
1177
|
contextOnly: boolean
|
|
@@ -926,18 +1205,54 @@ function emitBorder(
|
|
|
926
1205
|
if (style === 'none' && width === undefined) width = '0'
|
|
927
1206
|
if (width !== undefined) {
|
|
928
1207
|
for (const target of targets.width) {
|
|
929
|
-
emitResolved(
|
|
1208
|
+
emitResolved(
|
|
1209
|
+
state,
|
|
1210
|
+
target,
|
|
1211
|
+
width,
|
|
1212
|
+
condition,
|
|
1213
|
+
conditionKey,
|
|
1214
|
+
conditionWrappers,
|
|
1215
|
+
conditionSelector,
|
|
1216
|
+
conditionTheme,
|
|
1217
|
+
merge,
|
|
1218
|
+
originalValue,
|
|
1219
|
+
contextOnly
|
|
1220
|
+
)
|
|
930
1221
|
}
|
|
931
1222
|
}
|
|
932
1223
|
if (style !== undefined) {
|
|
933
1224
|
const styleTargets = !isWeb && property === 'border' ? ['borderStyle'] : targets.style
|
|
934
1225
|
for (const target of styleTargets) {
|
|
935
|
-
emitProperty(
|
|
1226
|
+
emitProperty(
|
|
1227
|
+
state,
|
|
1228
|
+
target,
|
|
1229
|
+
style,
|
|
1230
|
+
condition,
|
|
1231
|
+
conditionKey,
|
|
1232
|
+
conditionWrappers,
|
|
1233
|
+
conditionSelector,
|
|
1234
|
+
conditionTheme,
|
|
1235
|
+
merge,
|
|
1236
|
+
originalValue,
|
|
1237
|
+
contextOnly
|
|
1238
|
+
)
|
|
936
1239
|
}
|
|
937
1240
|
}
|
|
938
1241
|
if (color !== undefined) {
|
|
939
1242
|
for (const target of targets.color) {
|
|
940
|
-
emitResolved(
|
|
1243
|
+
emitResolved(
|
|
1244
|
+
state,
|
|
1245
|
+
target,
|
|
1246
|
+
color,
|
|
1247
|
+
condition,
|
|
1248
|
+
conditionKey,
|
|
1249
|
+
conditionWrappers,
|
|
1250
|
+
conditionSelector,
|
|
1251
|
+
conditionTheme,
|
|
1252
|
+
merge,
|
|
1253
|
+
originalValue,
|
|
1254
|
+
contextOnly
|
|
1255
|
+
)
|
|
941
1256
|
}
|
|
942
1257
|
}
|
|
943
1258
|
}
|
|
@@ -945,7 +1260,11 @@ function emitBorder(
|
|
|
945
1260
|
function emitTextDecoration(
|
|
946
1261
|
state: GetStyleState,
|
|
947
1262
|
raw: string,
|
|
948
|
-
condition:
|
|
1263
|
+
condition: number,
|
|
1264
|
+
conditionKey: string,
|
|
1265
|
+
conditionWrappers: string[] | undefined,
|
|
1266
|
+
conditionSelector: string,
|
|
1267
|
+
conditionTheme: string,
|
|
949
1268
|
merge: MergeStyle,
|
|
950
1269
|
originalValue: any,
|
|
951
1270
|
contextOnly: boolean
|
|
@@ -964,7 +1283,19 @@ function emitTextDecoration(
|
|
|
964
1283
|
part === 'none'
|
|
965
1284
|
? 'textDecorationLine'
|
|
966
1285
|
: 'textDecorationColor'
|
|
967
|
-
emitResolved(
|
|
1286
|
+
emitResolved(
|
|
1287
|
+
state,
|
|
1288
|
+
property,
|
|
1289
|
+
part,
|
|
1290
|
+
condition,
|
|
1291
|
+
conditionKey,
|
|
1292
|
+
conditionWrappers,
|
|
1293
|
+
conditionSelector,
|
|
1294
|
+
conditionTheme,
|
|
1295
|
+
merge,
|
|
1296
|
+
originalValue,
|
|
1297
|
+
contextOnly
|
|
1298
|
+
)
|
|
968
1299
|
}
|
|
969
1300
|
}
|
|
970
1301
|
|
|
@@ -990,17 +1321,57 @@ function emitTransform(
|
|
|
990
1321
|
state: GetStyleState,
|
|
991
1322
|
property: string,
|
|
992
1323
|
value: any,
|
|
993
|
-
condition:
|
|
1324
|
+
condition: number,
|
|
1325
|
+
conditionKey: string,
|
|
1326
|
+
conditionWrappers: string[] | undefined,
|
|
1327
|
+
conditionSelector: string,
|
|
1328
|
+
conditionTheme: string,
|
|
994
1329
|
merge: MergeStyle,
|
|
995
1330
|
originalValue: any,
|
|
996
1331
|
contextOnly: boolean
|
|
997
1332
|
) {
|
|
998
1333
|
if (!isWeb || !state.flatShouldDoClasses) {
|
|
999
1334
|
if (!isWeb && property === 'scale') {
|
|
1000
|
-
emitProperty(
|
|
1001
|
-
|
|
1335
|
+
emitProperty(
|
|
1336
|
+
state,
|
|
1337
|
+
'scaleX',
|
|
1338
|
+
value,
|
|
1339
|
+
condition,
|
|
1340
|
+
conditionKey,
|
|
1341
|
+
conditionWrappers,
|
|
1342
|
+
conditionSelector,
|
|
1343
|
+
conditionTheme,
|
|
1344
|
+
merge,
|
|
1345
|
+
originalValue,
|
|
1346
|
+
contextOnly
|
|
1347
|
+
)
|
|
1348
|
+
emitProperty(
|
|
1349
|
+
state,
|
|
1350
|
+
'scaleY',
|
|
1351
|
+
value,
|
|
1352
|
+
condition,
|
|
1353
|
+
conditionKey,
|
|
1354
|
+
conditionWrappers,
|
|
1355
|
+
conditionSelector,
|
|
1356
|
+
conditionTheme,
|
|
1357
|
+
merge,
|
|
1358
|
+
originalValue,
|
|
1359
|
+
contextOnly
|
|
1360
|
+
)
|
|
1002
1361
|
} else {
|
|
1003
|
-
emitProperty(
|
|
1362
|
+
emitProperty(
|
|
1363
|
+
state,
|
|
1364
|
+
property,
|
|
1365
|
+
value,
|
|
1366
|
+
condition,
|
|
1367
|
+
conditionKey,
|
|
1368
|
+
conditionWrappers,
|
|
1369
|
+
conditionSelector,
|
|
1370
|
+
conditionTheme,
|
|
1371
|
+
merge,
|
|
1372
|
+
originalValue,
|
|
1373
|
+
contextOnly
|
|
1374
|
+
)
|
|
1004
1375
|
}
|
|
1005
1376
|
return
|
|
1006
1377
|
}
|
|
@@ -1025,7 +1396,19 @@ function emitTransform(
|
|
|
1025
1396
|
if (target === '--t-x' || target === '--t-y') targetValue = `${targetValue}px`
|
|
1026
1397
|
else if (target === 'rotate') targetValue = `${targetValue}deg`
|
|
1027
1398
|
}
|
|
1028
|
-
emitProperty(
|
|
1399
|
+
emitProperty(
|
|
1400
|
+
state,
|
|
1401
|
+
target,
|
|
1402
|
+
targetValue,
|
|
1403
|
+
condition,
|
|
1404
|
+
conditionKey,
|
|
1405
|
+
conditionWrappers,
|
|
1406
|
+
conditionSelector,
|
|
1407
|
+
conditionTheme,
|
|
1408
|
+
merge,
|
|
1409
|
+
originalValue,
|
|
1410
|
+
contextOnly
|
|
1411
|
+
)
|
|
1029
1412
|
if (target === '--t-x' || target === '--t-y') addComposition(state, 'translate')
|
|
1030
1413
|
else if (target.startsWith('--t-scale')) addComposition(state, 'scale')
|
|
1031
1414
|
}
|
|
@@ -1035,7 +1418,11 @@ function emitResolved(
|
|
|
1035
1418
|
state: GetStyleState,
|
|
1036
1419
|
property: string,
|
|
1037
1420
|
raw: string,
|
|
1038
|
-
condition:
|
|
1421
|
+
condition: number,
|
|
1422
|
+
conditionKey: string,
|
|
1423
|
+
conditionWrappers: string[] | undefined,
|
|
1424
|
+
conditionSelector: string,
|
|
1425
|
+
conditionTheme: string,
|
|
1039
1426
|
merge: MergeStyle,
|
|
1040
1427
|
originalValue: any,
|
|
1041
1428
|
contextOnly: boolean
|
|
@@ -1051,7 +1438,19 @@ function emitResolved(
|
|
|
1051
1438
|
value = Number(value)
|
|
1052
1439
|
}
|
|
1053
1440
|
}
|
|
1054
|
-
emitProperty(
|
|
1441
|
+
emitProperty(
|
|
1442
|
+
state,
|
|
1443
|
+
property,
|
|
1444
|
+
value,
|
|
1445
|
+
condition,
|
|
1446
|
+
conditionKey,
|
|
1447
|
+
conditionWrappers,
|
|
1448
|
+
conditionSelector,
|
|
1449
|
+
conditionTheme,
|
|
1450
|
+
merge,
|
|
1451
|
+
originalValue,
|
|
1452
|
+
contextOnly
|
|
1453
|
+
)
|
|
1055
1454
|
}
|
|
1056
1455
|
|
|
1057
1456
|
function shadowUnit(part: any) {
|
|
@@ -1076,7 +1475,11 @@ function emitWebShadow(
|
|
|
1076
1475
|
state,
|
|
1077
1476
|
'boxShadow',
|
|
1078
1477
|
state.flatBoxShadow ? `${state.flatBoxShadow}, ${next}` : next,
|
|
1079
|
-
|
|
1478
|
+
0,
|
|
1479
|
+
'',
|
|
1480
|
+
undefined,
|
|
1481
|
+
'',
|
|
1482
|
+
'',
|
|
1080
1483
|
merge,
|
|
1081
1484
|
originalValue,
|
|
1082
1485
|
contextOnly
|
|
@@ -1099,7 +1502,11 @@ function emitWebTextShadow(
|
|
|
1099
1502
|
state,
|
|
1100
1503
|
'textShadow',
|
|
1101
1504
|
`${shadowUnit(offset.width)} ${shadowUnit(offset.height)} ${shadowUnit(shadow.textShadowRadius)} ${shadow.textShadowColor}`,
|
|
1102
|
-
|
|
1505
|
+
0,
|
|
1506
|
+
'',
|
|
1507
|
+
undefined,
|
|
1508
|
+
'',
|
|
1509
|
+
'',
|
|
1103
1510
|
merge,
|
|
1104
1511
|
originalValue,
|
|
1105
1512
|
contextOnly
|
|
@@ -1110,7 +1517,11 @@ function emitValue(
|
|
|
1110
1517
|
state: GetStyleState,
|
|
1111
1518
|
property: string,
|
|
1112
1519
|
raw: any,
|
|
1113
|
-
condition:
|
|
1520
|
+
condition: number,
|
|
1521
|
+
conditionKey: string,
|
|
1522
|
+
conditionWrappers: string[] | undefined,
|
|
1523
|
+
conditionSelector: string,
|
|
1524
|
+
conditionTheme: string,
|
|
1114
1525
|
merge: MergeStyle,
|
|
1115
1526
|
originalValue: any,
|
|
1116
1527
|
contextOnly: boolean
|
|
@@ -1129,7 +1540,14 @@ function emitValue(
|
|
|
1129
1540
|
)
|
|
1130
1541
|
}
|
|
1131
1542
|
|
|
1132
|
-
emitBorderStyleDefault(
|
|
1543
|
+
emitBorderStyleDefault(
|
|
1544
|
+
state,
|
|
1545
|
+
property,
|
|
1546
|
+
condition,
|
|
1547
|
+
conditionKey,
|
|
1548
|
+
conditionWrappers,
|
|
1549
|
+
conditionSelector
|
|
1550
|
+
)
|
|
1133
1551
|
|
|
1134
1552
|
if (
|
|
1135
1553
|
typeof raw === 'string' &&
|
|
@@ -1159,7 +1577,11 @@ function emitValue(
|
|
|
1159
1577
|
.sort()
|
|
1160
1578
|
.map((key) => ({ [key]: direct.flatLegacyTransforms![key] }))
|
|
1161
1579
|
),
|
|
1162
|
-
|
|
1580
|
+
0,
|
|
1581
|
+
'',
|
|
1582
|
+
undefined,
|
|
1583
|
+
'',
|
|
1584
|
+
'',
|
|
1163
1585
|
merge,
|
|
1164
1586
|
originalValue,
|
|
1165
1587
|
contextOnly
|
|
@@ -1170,6 +1592,10 @@ function emitValue(
|
|
|
1170
1592
|
'transform',
|
|
1171
1593
|
`${property}(${value})`,
|
|
1172
1594
|
condition,
|
|
1595
|
+
conditionKey,
|
|
1596
|
+
conditionWrappers,
|
|
1597
|
+
conditionSelector,
|
|
1598
|
+
conditionTheme,
|
|
1173
1599
|
merge,
|
|
1174
1600
|
originalValue,
|
|
1175
1601
|
contextOnly
|
|
@@ -1248,11 +1674,34 @@ function emitValue(
|
|
|
1248
1674
|
}
|
|
1249
1675
|
|
|
1250
1676
|
if (typeof raw === 'string' && property in borderTargets) {
|
|
1251
|
-
emitBorder(
|
|
1677
|
+
emitBorder(
|
|
1678
|
+
state,
|
|
1679
|
+
property,
|
|
1680
|
+
raw,
|
|
1681
|
+
condition,
|
|
1682
|
+
conditionKey,
|
|
1683
|
+
conditionWrappers,
|
|
1684
|
+
conditionSelector,
|
|
1685
|
+
conditionTheme,
|
|
1686
|
+
merge,
|
|
1687
|
+
originalValue,
|
|
1688
|
+
contextOnly
|
|
1689
|
+
)
|
|
1252
1690
|
return
|
|
1253
1691
|
}
|
|
1254
1692
|
if (typeof raw === 'string' && property === 'textDecoration') {
|
|
1255
|
-
emitTextDecoration(
|
|
1693
|
+
emitTextDecoration(
|
|
1694
|
+
state,
|
|
1695
|
+
raw,
|
|
1696
|
+
condition,
|
|
1697
|
+
conditionKey,
|
|
1698
|
+
conditionWrappers,
|
|
1699
|
+
conditionSelector,
|
|
1700
|
+
conditionTheme,
|
|
1701
|
+
merge,
|
|
1702
|
+
originalValue,
|
|
1703
|
+
contextOnly
|
|
1704
|
+
)
|
|
1256
1705
|
return
|
|
1257
1706
|
}
|
|
1258
1707
|
if (typeof raw === 'string' && property === 'background') {
|
|
@@ -1263,6 +1712,10 @@ function emitValue(
|
|
|
1263
1712
|
'backgroundColor',
|
|
1264
1713
|
parts[0],
|
|
1265
1714
|
condition,
|
|
1715
|
+
conditionKey,
|
|
1716
|
+
conditionWrappers,
|
|
1717
|
+
conditionSelector,
|
|
1718
|
+
conditionTheme,
|
|
1266
1719
|
merge,
|
|
1267
1720
|
originalValue,
|
|
1268
1721
|
contextOnly
|
|
@@ -1301,7 +1754,7 @@ function emitValue(
|
|
|
1301
1754
|
`native transform "${property}" cannot represent "${value}"; dropping it`
|
|
1302
1755
|
)
|
|
1303
1756
|
}
|
|
1304
|
-
if (condition
|
|
1757
|
+
if (condition & 1 && state.flatTransforms) {
|
|
1305
1758
|
delete state.flatTransforms[property]
|
|
1306
1759
|
}
|
|
1307
1760
|
return
|
|
@@ -1312,7 +1765,19 @@ function emitValue(
|
|
|
1312
1765
|
value = Number(value)
|
|
1313
1766
|
}
|
|
1314
1767
|
}
|
|
1315
|
-
emitTransform(
|
|
1768
|
+
emitTransform(
|
|
1769
|
+
state,
|
|
1770
|
+
property,
|
|
1771
|
+
value,
|
|
1772
|
+
condition,
|
|
1773
|
+
conditionKey,
|
|
1774
|
+
conditionWrappers,
|
|
1775
|
+
conditionSelector,
|
|
1776
|
+
conditionTheme,
|
|
1777
|
+
merge,
|
|
1778
|
+
originalValue,
|
|
1779
|
+
contextOnly
|
|
1780
|
+
)
|
|
1316
1781
|
return
|
|
1317
1782
|
}
|
|
1318
1783
|
|
|
@@ -1320,9 +1785,33 @@ function emitValue(
|
|
|
1320
1785
|
// css reads the shorthand, so skip the four-corner expansion here. a string
|
|
1321
1786
|
// value still needs its token resolved, which is what emitResolved does.
|
|
1322
1787
|
if (typeof raw === 'string') {
|
|
1323
|
-
emitResolved(
|
|
1788
|
+
emitResolved(
|
|
1789
|
+
state,
|
|
1790
|
+
property,
|
|
1791
|
+
raw,
|
|
1792
|
+
condition,
|
|
1793
|
+
conditionKey,
|
|
1794
|
+
conditionWrappers,
|
|
1795
|
+
conditionSelector,
|
|
1796
|
+
conditionTheme,
|
|
1797
|
+
merge,
|
|
1798
|
+
originalValue,
|
|
1799
|
+
contextOnly
|
|
1800
|
+
)
|
|
1324
1801
|
} else {
|
|
1325
|
-
emitProperty(
|
|
1802
|
+
emitProperty(
|
|
1803
|
+
state,
|
|
1804
|
+
property,
|
|
1805
|
+
raw,
|
|
1806
|
+
condition,
|
|
1807
|
+
conditionKey,
|
|
1808
|
+
conditionWrappers,
|
|
1809
|
+
conditionSelector,
|
|
1810
|
+
conditionTheme,
|
|
1811
|
+
merge,
|
|
1812
|
+
originalValue,
|
|
1813
|
+
contextOnly
|
|
1814
|
+
)
|
|
1326
1815
|
}
|
|
1327
1816
|
return
|
|
1328
1817
|
}
|
|
@@ -1339,6 +1828,10 @@ function emitValue(
|
|
|
1339
1828
|
property,
|
|
1340
1829
|
transform,
|
|
1341
1830
|
condition,
|
|
1831
|
+
conditionKey,
|
|
1832
|
+
conditionWrappers,
|
|
1833
|
+
conditionSelector,
|
|
1834
|
+
conditionTheme,
|
|
1342
1835
|
merge,
|
|
1343
1836
|
originalValue,
|
|
1344
1837
|
contextOnly
|
|
@@ -1382,6 +1875,10 @@ function emitValue(
|
|
|
1382
1875
|
key,
|
|
1383
1876
|
parsedValue,
|
|
1384
1877
|
condition,
|
|
1878
|
+
conditionKey,
|
|
1879
|
+
conditionWrappers,
|
|
1880
|
+
conditionSelector,
|
|
1881
|
+
conditionTheme,
|
|
1385
1882
|
merge,
|
|
1386
1883
|
originalValue,
|
|
1387
1884
|
contextOnly
|
|
@@ -1393,6 +1890,10 @@ function emitValue(
|
|
|
1393
1890
|
property === 'backgroundImage' ? 'experimental_backgroundImage' : property,
|
|
1394
1891
|
parsed,
|
|
1395
1892
|
condition,
|
|
1893
|
+
conditionKey,
|
|
1894
|
+
conditionWrappers,
|
|
1895
|
+
conditionSelector,
|
|
1896
|
+
conditionTheme,
|
|
1396
1897
|
merge,
|
|
1397
1898
|
originalValue,
|
|
1398
1899
|
contextOnly
|
|
@@ -1410,7 +1911,19 @@ function emitValue(
|
|
|
1410
1911
|
? null
|
|
1411
1912
|
: expandStyle(property, value, state.conf.settings.styleCompat || 'web')
|
|
1412
1913
|
if (!expanded) {
|
|
1413
|
-
emitProperty(
|
|
1914
|
+
emitProperty(
|
|
1915
|
+
state,
|
|
1916
|
+
property,
|
|
1917
|
+
value,
|
|
1918
|
+
condition,
|
|
1919
|
+
conditionKey,
|
|
1920
|
+
conditionWrappers,
|
|
1921
|
+
conditionSelector,
|
|
1922
|
+
conditionTheme,
|
|
1923
|
+
merge,
|
|
1924
|
+
originalValue,
|
|
1925
|
+
contextOnly
|
|
1926
|
+
)
|
|
1414
1927
|
return
|
|
1415
1928
|
}
|
|
1416
1929
|
|
|
@@ -1431,6 +1944,10 @@ function emitValue(
|
|
|
1431
1944
|
expanded[index][0],
|
|
1432
1945
|
parts[partIndex],
|
|
1433
1946
|
condition,
|
|
1947
|
+
conditionKey,
|
|
1948
|
+
conditionWrappers,
|
|
1949
|
+
conditionSelector,
|
|
1950
|
+
conditionTheme,
|
|
1434
1951
|
merge,
|
|
1435
1952
|
originalValue,
|
|
1436
1953
|
contextOnly
|
|
@@ -1445,6 +1962,10 @@ function emitValue(
|
|
|
1445
1962
|
expanded[index][0],
|
|
1446
1963
|
expanded[index][1],
|
|
1447
1964
|
condition,
|
|
1965
|
+
conditionKey,
|
|
1966
|
+
conditionWrappers,
|
|
1967
|
+
conditionSelector,
|
|
1968
|
+
conditionTheme,
|
|
1448
1969
|
merge,
|
|
1449
1970
|
originalValue,
|
|
1450
1971
|
contextOnly
|
|
@@ -1452,36 +1973,6 @@ function emitValue(
|
|
|
1452
1973
|
}
|
|
1453
1974
|
}
|
|
1454
1975
|
|
|
1455
|
-
function emitSegment(
|
|
1456
|
-
state: GetStyleState,
|
|
1457
|
-
property: string,
|
|
1458
|
-
source: string,
|
|
1459
|
-
start: number,
|
|
1460
|
-
end: number,
|
|
1461
|
-
condition: Condition | null,
|
|
1462
|
-
merge: MergeStyle,
|
|
1463
|
-
originalValue: any,
|
|
1464
|
-
contextOnly: boolean
|
|
1465
|
-
) {
|
|
1466
|
-
while (start < end && source.charCodeAt(start) <= 32) start++
|
|
1467
|
-
while (end > start && source.charCodeAt(end - 1) <= 32) end--
|
|
1468
|
-
if (start === end) return false
|
|
1469
|
-
if (
|
|
1470
|
-
!condition ||
|
|
1471
|
-
(condition.emit &&
|
|
1472
|
-
(condition.active ||
|
|
1473
|
-
(isWeb && state.flatShouldDoClasses) ||
|
|
1474
|
-
(!isWeb &&
|
|
1475
|
-
condition.theme &&
|
|
1476
|
-
supportsDynamicColorIOS &&
|
|
1477
|
-
isColorStyleKey(property))))
|
|
1478
|
-
) {
|
|
1479
|
-
const value = source.slice(start, end)
|
|
1480
|
-
emitValue(state, property, value, condition, merge, value, contextOnly)
|
|
1481
|
-
}
|
|
1482
|
-
return true
|
|
1483
|
-
}
|
|
1484
|
-
|
|
1485
1976
|
export function contributeStyleString(
|
|
1486
1977
|
state: GetStyleState,
|
|
1487
1978
|
property: string,
|
|
@@ -1490,10 +1981,6 @@ export function contributeStyleString(
|
|
|
1490
1981
|
originalValue?: any,
|
|
1491
1982
|
contextOnly = false
|
|
1492
1983
|
) {
|
|
1493
|
-
if (process.env.TAMAGUI_RUNTIME_STYLE_VALUE_GRAMMAR === 'disabled') {
|
|
1494
|
-
emitValue(state, property, source, null, merge, originalValue ?? source, contextOnly)
|
|
1495
|
-
return true
|
|
1496
|
-
}
|
|
1497
1984
|
if (
|
|
1498
1985
|
isWeb &&
|
|
1499
1986
|
source.indexOf(':') !== -1 &&
|
|
@@ -1510,140 +1997,31 @@ export function contributeStyleString(
|
|
|
1510
1997
|
// with no colon is emitted verbatim by contract. Keep the two paths in mind
|
|
1511
1998
|
// together when reading a bug report about one of them.
|
|
1512
1999
|
if (source.indexOf(':') === -1) {
|
|
1513
|
-
emitValue(
|
|
1514
|
-
return true
|
|
1515
|
-
}
|
|
1516
|
-
|
|
1517
|
-
// The scan collects and the emit happens after it, because `parseValue`
|
|
1518
|
-
// reports a refused modifier or a rule-breaking character as one failure over
|
|
1519
|
-
// the WHOLE value: there is no such thing as the good half of a value the
|
|
1520
|
-
// grammar rejects. Emitting as the scan went is what used to make this path
|
|
1521
|
-
// lose the base it had already read while the variant path kept it.
|
|
1522
|
-
const conditions: (Condition | null)[] = []
|
|
1523
|
-
const starts: number[] = []
|
|
1524
|
-
const ends: number[] = []
|
|
1525
|
-
let pending: Condition | null = null
|
|
1526
|
-
// the first thing that made the value unusable, and the whole refusal test
|
|
1527
|
-
let refused = ''
|
|
1528
|
-
let lifecycle = false
|
|
1529
|
-
|
|
1530
|
-
scanFlatValue(source, {
|
|
1531
|
-
segment(start, end, isBase) {
|
|
1532
|
-
if (start === end) {
|
|
1533
|
-
// an empty base is simply no base; an empty clause payload is a clause
|
|
1534
|
-
// with nothing in it, which parseValue reports as `empty-payload`
|
|
1535
|
-
if (!isBase && !refused) refused = 'a conditional clause has no value'
|
|
1536
|
-
return
|
|
1537
|
-
}
|
|
1538
|
-
conditions.push(pending)
|
|
1539
|
-
starts.push(start)
|
|
1540
|
-
ends.push(end)
|
|
1541
|
-
},
|
|
1542
|
-
chain(start, end) {
|
|
1543
|
-
if (refused) return false
|
|
1544
|
-
const next = getCondition(state, source.slice(start, end))
|
|
1545
|
-
if (!next) {
|
|
1546
|
-
refused = `unknown modifier "${source.slice(start, end)}"`
|
|
1547
|
-
return false
|
|
1548
|
-
}
|
|
1549
|
-
if (process.env.NODE_ENV === 'development' && next.unsupportedState) {
|
|
1550
|
-
warnOnce(
|
|
1551
|
-
`${property}: "${next.unsupportedState}:" has no native component-state source; dropping the clause`
|
|
1552
|
-
)
|
|
1553
|
-
}
|
|
1554
|
-
pending = next
|
|
1555
|
-
lifecycle ||= !!(next.enter || next.exit)
|
|
1556
|
-
return true
|
|
1557
|
-
},
|
|
1558
|
-
error(code, index) {
|
|
1559
|
-
if (refused) return
|
|
1560
|
-
refused =
|
|
1561
|
-
code === 'invalid-character'
|
|
1562
|
-
? `"${source[index]}" would end the declaration or rule`
|
|
1563
|
-
: code === 'unterminated-string'
|
|
1564
|
-
? 'an unterminated string'
|
|
1565
|
-
: code === 'unterminated-comment'
|
|
1566
|
-
? 'an unterminated "/*" comment'
|
|
1567
|
-
: code === 'stray-comment-close'
|
|
1568
|
-
? 'a stray "*/"'
|
|
1569
|
-
: 'an unterminated "("'
|
|
1570
|
-
},
|
|
1571
|
-
})
|
|
1572
|
-
|
|
1573
|
-
if (refused) {
|
|
1574
|
-
// `16:9` is the one value whose top-level colon is content rather than a
|
|
1575
|
-
// clause, and only this property can hold it
|
|
1576
|
-
if (property === 'aspectRatio') {
|
|
1577
|
-
emitValue(
|
|
1578
|
-
state,
|
|
1579
|
-
property,
|
|
1580
|
-
source,
|
|
1581
|
-
null,
|
|
1582
|
-
merge,
|
|
1583
|
-
originalValue ?? source,
|
|
1584
|
-
contextOnly
|
|
1585
|
-
)
|
|
1586
|
-
return true
|
|
1587
|
-
}
|
|
1588
|
-
if (process.env.NODE_ENV === 'development') {
|
|
1589
|
-
warnRefusedValue(property, source, refused)
|
|
1590
|
-
}
|
|
1591
|
-
return true
|
|
1592
|
-
}
|
|
1593
|
-
|
|
1594
|
-
let hasBase = false
|
|
1595
|
-
let lastPayloadStart = 0
|
|
1596
|
-
for (let index = 0; index < conditions.length; index++) {
|
|
1597
|
-
const condition = conditions[index]
|
|
1598
|
-
lastPayloadStart = starts[index]
|
|
1599
|
-
const emitted = emitSegment(
|
|
2000
|
+
emitValue(
|
|
1600
2001
|
state,
|
|
1601
2002
|
property,
|
|
1602
2003
|
source,
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
2004
|
+
0,
|
|
2005
|
+
'',
|
|
2006
|
+
undefined,
|
|
2007
|
+
'',
|
|
2008
|
+
'',
|
|
1606
2009
|
merge,
|
|
1607
|
-
originalValue,
|
|
2010
|
+
originalValue ?? source,
|
|
1608
2011
|
contextOnly
|
|
1609
2012
|
)
|
|
1610
|
-
|
|
1611
|
-
}
|
|
1612
|
-
|
|
1613
|
-
if (
|
|
1614
|
-
process.env.NODE_ENV === 'development' &&
|
|
1615
|
-
!hasBase &&
|
|
1616
|
-
conditions.length > 0 &&
|
|
1617
|
-
(property in tokenCategories.color || property in tokenCategoryByProperty) &&
|
|
1618
|
-
splitComponents(source.slice(lastPayloadStart)).length > 1
|
|
1619
|
-
) {
|
|
1620
|
-
warnOnce(
|
|
1621
|
-
`${property}="${source}" has multiple values after its first conditional. Write the base value before the first conditional.`
|
|
1622
|
-
)
|
|
2013
|
+
return true
|
|
1623
2014
|
}
|
|
1624
2015
|
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
property === 'opacity'
|
|
1635
|
-
? 1
|
|
1636
|
-
: property === 'scale' || property === 'scaleX' || property === 'scaleY'
|
|
1637
|
-
? 1
|
|
1638
|
-
: property === 'rotate'
|
|
1639
|
-
? '0deg'
|
|
1640
|
-
: property === 'x' || property === 'y'
|
|
1641
|
-
? 0
|
|
1642
|
-
: null
|
|
1643
|
-
if (value !== null) {
|
|
1644
|
-
emitValue(state, property, value, null, merge, value, contextOnly)
|
|
1645
|
-
}
|
|
1646
|
-
}
|
|
2016
|
+
scanFlatValue(
|
|
2017
|
+
source,
|
|
2018
|
+
directStyleHandler,
|
|
2019
|
+
state,
|
|
2020
|
+
property,
|
|
2021
|
+
merge,
|
|
2022
|
+
originalValue,
|
|
2023
|
+
contextOnly
|
|
2024
|
+
)
|
|
1647
2025
|
return true
|
|
1648
2026
|
}
|
|
1649
2027
|
|
|
@@ -1654,29 +2032,34 @@ export function contributeFrontendValue(
|
|
|
1654
2032
|
merge: MergeStyle,
|
|
1655
2033
|
contextOnly = false
|
|
1656
2034
|
) {
|
|
1657
|
-
if (process.env.TAMAGUI_RUNTIME_STYLE_VALUE_GRAMMAR === 'disabled') {
|
|
1658
|
-
return false
|
|
1659
|
-
}
|
|
1660
2035
|
if (value.base !== null) {
|
|
1661
|
-
emitValue(
|
|
2036
|
+
emitValue(
|
|
2037
|
+
state,
|
|
2038
|
+
property,
|
|
2039
|
+
value.base,
|
|
2040
|
+
0,
|
|
2041
|
+
'',
|
|
2042
|
+
undefined,
|
|
2043
|
+
'',
|
|
2044
|
+
'',
|
|
2045
|
+
merge,
|
|
2046
|
+
value.base,
|
|
2047
|
+
contextOnly
|
|
2048
|
+
)
|
|
1662
2049
|
}
|
|
1663
2050
|
for (const clause of value.clauses) {
|
|
1664
|
-
const
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
clause.payload,
|
|
1677
|
-
contextOnly
|
|
1678
|
-
)
|
|
1679
|
-
}
|
|
2051
|
+
const source = clause.modifiers.join(':')
|
|
2052
|
+
resolveClauseChain(
|
|
2053
|
+
state,
|
|
2054
|
+
source,
|
|
2055
|
+
0,
|
|
2056
|
+
source.length,
|
|
2057
|
+
property,
|
|
2058
|
+
clause.payload,
|
|
2059
|
+
merge,
|
|
2060
|
+
clause.payload,
|
|
2061
|
+
contextOnly
|
|
2062
|
+
)
|
|
1680
2063
|
}
|
|
1681
2064
|
return true
|
|
1682
2065
|
}
|
|
@@ -1690,24 +2073,20 @@ export function contributeVariantClauseValue(
|
|
|
1690
2073
|
originalValue?: any,
|
|
1691
2074
|
contextOnly = false
|
|
1692
2075
|
) {
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
}
|
|
1708
|
-
if (condition.emit && (condition.active || (isWeb && state.flatShouldDoClasses))) {
|
|
1709
|
-
emitValue(state, property, value, condition, merge, originalValue, contextOnly)
|
|
1710
|
-
}
|
|
2076
|
+
resolveClauseChain(
|
|
2077
|
+
state,
|
|
2078
|
+
conditionSource,
|
|
2079
|
+
0,
|
|
2080
|
+
conditionSource.length,
|
|
2081
|
+
property,
|
|
2082
|
+
value,
|
|
2083
|
+
merge,
|
|
2084
|
+
originalValue,
|
|
2085
|
+
contextOnly,
|
|
2086
|
+
-1,
|
|
2087
|
+
-1,
|
|
2088
|
+
2
|
|
2089
|
+
)
|
|
1711
2090
|
}
|
|
1712
2091
|
|
|
1713
2092
|
export function contributeStyleValue(
|
|
@@ -1718,16 +2097,24 @@ export function contributeStyleValue(
|
|
|
1718
2097
|
originalValue?: any,
|
|
1719
2098
|
contextOnly = false
|
|
1720
2099
|
) {
|
|
1721
|
-
if (
|
|
1722
|
-
process.env.TAMAGUI_RUNTIME_SAFE_AREA !== 'disabled' &&
|
|
1723
|
-
value === 'safe' &&
|
|
1724
|
-
isSafeAreaKey(property)
|
|
1725
|
-
) {
|
|
2100
|
+
if (value === 'safe' && isSafeAreaKey(property)) {
|
|
1726
2101
|
const expanded = expandSafeAreaValue(property)
|
|
1727
2102
|
if (expanded) {
|
|
1728
2103
|
state.flatUsesSafeArea = true
|
|
1729
2104
|
for (const [key, resolved] of expanded) {
|
|
1730
|
-
emitValue(
|
|
2105
|
+
emitValue(
|
|
2106
|
+
state,
|
|
2107
|
+
key,
|
|
2108
|
+
resolved,
|
|
2109
|
+
0,
|
|
2110
|
+
'',
|
|
2111
|
+
undefined,
|
|
2112
|
+
'',
|
|
2113
|
+
'',
|
|
2114
|
+
merge,
|
|
2115
|
+
originalValue ?? value,
|
|
2116
|
+
contextOnly
|
|
2117
|
+
)
|
|
1731
2118
|
}
|
|
1732
2119
|
return true
|
|
1733
2120
|
}
|
|
@@ -1743,7 +2130,19 @@ export function contributeStyleValue(
|
|
|
1743
2130
|
)
|
|
1744
2131
|
}
|
|
1745
2132
|
if (value != null) {
|
|
1746
|
-
emitValue(
|
|
2133
|
+
emitValue(
|
|
2134
|
+
state,
|
|
2135
|
+
property,
|
|
2136
|
+
value,
|
|
2137
|
+
0,
|
|
2138
|
+
'',
|
|
2139
|
+
undefined,
|
|
2140
|
+
'',
|
|
2141
|
+
'',
|
|
2142
|
+
merge,
|
|
2143
|
+
originalValue ?? value,
|
|
2144
|
+
contextOnly
|
|
2145
|
+
)
|
|
1747
2146
|
return true
|
|
1748
2147
|
}
|
|
1749
2148
|
return false
|