@hanzogui/web 2.0.0-rc.41-hanzoai.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +2 -0
- package/LICENSE +21 -0
- package/README.md +1 -0
- package/dist/cjs/Hanzogui.cjs +76 -0
- package/dist/cjs/Hanzogui.native.js +128 -0
- package/dist/cjs/Hanzogui.native.js.map +1 -0
- package/dist/cjs/_withStableStyle.cjs +75 -0
- package/dist/cjs/_withStableStyle.native.js +82 -0
- package/dist/cjs/_withStableStyle.native.js.map +1 -0
- package/dist/cjs/animationDriverTypes.test-d.cjs +77 -0
- package/dist/cjs/animationDriverTypes.test-d.native.js +80 -0
- package/dist/cjs/animationDriverTypes.test-d.native.js.map +1 -0
- package/dist/cjs/config.cjs +177 -0
- package/dist/cjs/config.native.js +199 -0
- package/dist/cjs/config.native.js.map +1 -0
- package/dist/cjs/constants/accessibilityDirectMap.cjs +36 -0
- package/dist/cjs/constants/accessibilityDirectMap.native.js +39 -0
- package/dist/cjs/constants/accessibilityDirectMap.native.js.map +1 -0
- package/dist/cjs/constants/constants.cjs +40 -0
- package/dist/cjs/constants/constants.native.js +43 -0
- package/dist/cjs/constants/constants.native.js.map +1 -0
- package/dist/cjs/constants/isDevTools.cjs +35 -0
- package/dist/cjs/constants/isDevTools.native.js +38 -0
- package/dist/cjs/constants/isDevTools.native.js.map +1 -0
- package/dist/cjs/contexts/ComponentContext.cjs +41 -0
- package/dist/cjs/contexts/ComponentContext.native.js +44 -0
- package/dist/cjs/contexts/ComponentContext.native.js.map +1 -0
- package/dist/cjs/contexts/GroupContext.cjs +29 -0
- package/dist/cjs/contexts/GroupContext.native.js +32 -0
- package/dist/cjs/contexts/GroupContext.native.js.map +1 -0
- package/dist/cjs/createComponent.cjs +1053 -0
- package/dist/cjs/createComponent.native.js +1033 -0
- package/dist/cjs/createComponent.native.js.map +1 -0
- package/dist/cjs/createFont.cjs +48 -0
- package/dist/cjs/createFont.native.js +53 -0
- package/dist/cjs/createFont.native.js.map +1 -0
- package/dist/cjs/createHanzogui.cjs +255 -0
- package/dist/cjs/createHanzogui.native.js +307 -0
- package/dist/cjs/createHanzogui.native.js.map +1 -0
- package/dist/cjs/createShorthands.cjs +30 -0
- package/dist/cjs/createShorthands.native.js +33 -0
- package/dist/cjs/createShorthands.native.js.map +1 -0
- package/dist/cjs/createTokens.cjs +31 -0
- package/dist/cjs/createTokens.native.js +35 -0
- package/dist/cjs/createTokens.native.js.map +1 -0
- package/dist/cjs/createVariable.cjs +122 -0
- package/dist/cjs/createVariable.native.js +141 -0
- package/dist/cjs/createVariable.native.js.map +1 -0
- package/dist/cjs/createVariables.cjs +74 -0
- package/dist/cjs/createVariables.native.js +83 -0
- package/dist/cjs/createVariables.native.js.map +1 -0
- package/dist/cjs/defaultComponentState.cjs +47 -0
- package/dist/cjs/defaultComponentState.native.js +50 -0
- package/dist/cjs/defaultComponentState.native.js.map +1 -0
- package/dist/cjs/eventHandling.cjs +48 -0
- package/dist/cjs/eventHandling.native.js +204 -0
- package/dist/cjs/eventHandling.native.js.map +1 -0
- package/dist/cjs/helpers/consoleLog.native.js +33 -0
- package/dist/cjs/helpers/consoleLog.native.js.map +1 -0
- package/dist/cjs/helpers/createDesignSystem.cjs +187 -0
- package/dist/cjs/helpers/createDesignSystem.native.js +235 -0
- package/dist/cjs/helpers/createDesignSystem.native.js.map +1 -0
- package/dist/cjs/helpers/createMediaStyle.cjs +127 -0
- package/dist/cjs/helpers/createMediaStyle.native.js +140 -0
- package/dist/cjs/helpers/createMediaStyle.native.js.map +1 -0
- package/dist/cjs/helpers/createStyledContext.cjs +101 -0
- package/dist/cjs/helpers/createStyledContext.native.js +109 -0
- package/dist/cjs/helpers/createStyledContext.native.js.map +1 -0
- package/dist/cjs/helpers/defaultAnimationDriver.cjs +45 -0
- package/dist/cjs/helpers/defaultAnimationDriver.native.js +64 -0
- package/dist/cjs/helpers/defaultAnimationDriver.native.js.map +1 -0
- package/dist/cjs/helpers/defaultOffset.cjs +31 -0
- package/dist/cjs/helpers/defaultOffset.native.js +34 -0
- package/dist/cjs/helpers/defaultOffset.native.js.map +1 -0
- package/dist/cjs/helpers/expandStyle.cjs +69 -0
- package/dist/cjs/helpers/expandStyle.native.js +152 -0
- package/dist/cjs/helpers/expandStyle.native.js.map +1 -0
- package/dist/cjs/helpers/expandStyles.cjs +41 -0
- package/dist/cjs/helpers/expandStyles.native.js +51 -0
- package/dist/cjs/helpers/expandStyles.native.js.map +1 -0
- package/dist/cjs/helpers/getCSSStylesAtomic.cjs +217 -0
- package/dist/cjs/helpers/getCSSStylesAtomic.native.js +38 -0
- package/dist/cjs/helpers/getCSSStylesAtomic.native.js.map +1 -0
- package/dist/cjs/helpers/getDefaultProps.cjs +43 -0
- package/dist/cjs/helpers/getDefaultProps.native.js +47 -0
- package/dist/cjs/helpers/getDefaultProps.native.js.map +1 -0
- package/dist/cjs/helpers/getDynamicVal.cjs +72 -0
- package/dist/cjs/helpers/getDynamicVal.native.js +76 -0
- package/dist/cjs/helpers/getDynamicVal.native.js.map +1 -0
- package/dist/cjs/helpers/getExpandedShorthands.cjs +42 -0
- package/dist/cjs/helpers/getExpandedShorthands.native.js +46 -0
- package/dist/cjs/helpers/getExpandedShorthands.native.js.map +1 -0
- package/dist/cjs/helpers/getFontLanguage.cjs +28 -0
- package/dist/cjs/helpers/getFontLanguage.native.js +33 -0
- package/dist/cjs/helpers/getFontLanguage.native.js.map +1 -0
- package/dist/cjs/helpers/getGroupPropParts.cjs +54 -0
- package/dist/cjs/helpers/getGroupPropParts.native.js +59 -0
- package/dist/cjs/helpers/getGroupPropParts.native.js.map +1 -0
- package/dist/cjs/helpers/getShorthandValue.cjs +33 -0
- package/dist/cjs/helpers/getShorthandValue.native.js +37 -0
- package/dist/cjs/helpers/getShorthandValue.native.js.map +1 -0
- package/dist/cjs/helpers/getSplitStyles.cjs +900 -0
- package/dist/cjs/helpers/getSplitStyles.native.js +922 -0
- package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -0
- package/dist/cjs/helpers/getThemeCSSRules.cjs +134 -0
- package/dist/cjs/helpers/getThemeCSSRules.native.js +33 -0
- package/dist/cjs/helpers/getThemeCSSRules.native.js.map +1 -0
- package/dist/cjs/helpers/getTokenForKey.cjs +174 -0
- package/dist/cjs/helpers/getTokenForKey.native.js +186 -0
- package/dist/cjs/helpers/getTokenForKey.native.js.map +1 -0
- package/dist/cjs/helpers/getVariantExtras.cjs +81 -0
- package/dist/cjs/helpers/getVariantExtras.native.js +85 -0
- package/dist/cjs/helpers/getVariantExtras.native.js.map +1 -0
- package/dist/cjs/helpers/insertStyleRule.cjs +233 -0
- package/dist/cjs/helpers/insertStyleRule.native.js +104 -0
- package/dist/cjs/helpers/insertStyleRule.native.js.map +1 -0
- package/dist/cjs/helpers/isActivePlatform.cjs +40 -0
- package/dist/cjs/helpers/isActivePlatform.native.js +43 -0
- package/dist/cjs/helpers/isActivePlatform.native.js.map +1 -0
- package/dist/cjs/helpers/isActiveTheme.cjs +31 -0
- package/dist/cjs/helpers/isActiveTheme.native.js +34 -0
- package/dist/cjs/helpers/isActiveTheme.native.js.map +1 -0
- package/dist/cjs/helpers/isHanzoguiComponent.cjs +31 -0
- package/dist/cjs/helpers/isHanzoguiComponent.native.js +34 -0
- package/dist/cjs/helpers/isHanzoguiComponent.native.js.map +1 -0
- package/dist/cjs/helpers/isHanzoguiElement.cjs +43 -0
- package/dist/cjs/helpers/isHanzoguiElement.native.js +46 -0
- package/dist/cjs/helpers/isHanzoguiElement.native.js.map +1 -0
- package/dist/cjs/helpers/isObj.cjs +28 -0
- package/dist/cjs/helpers/isObj.native.js +38 -0
- package/dist/cjs/helpers/isObj.native.js.map +1 -0
- package/dist/cjs/helpers/log.cjs +39 -0
- package/dist/cjs/helpers/log.native.js +43 -0
- package/dist/cjs/helpers/log.native.js.map +1 -0
- package/dist/cjs/helpers/mainThreadPressEvents.cjs +28 -0
- package/dist/cjs/helpers/mainThreadPressEvents.native.js +133 -0
- package/dist/cjs/helpers/mainThreadPressEvents.native.js.map +1 -0
- package/dist/cjs/helpers/matchMedia.cjs +38 -0
- package/dist/cjs/helpers/matchMedia.native.js +62 -0
- package/dist/cjs/helpers/matchMedia.native.js.map +1 -0
- package/dist/cjs/helpers/mediaObjectToString.cjs +51 -0
- package/dist/cjs/helpers/mediaObjectToString.native.js +57 -0
- package/dist/cjs/helpers/mediaObjectToString.native.js.map +1 -0
- package/dist/cjs/helpers/mediaState.cjs +49 -0
- package/dist/cjs/helpers/mediaState.native.js +54 -0
- package/dist/cjs/helpers/mediaState.native.js.map +1 -0
- package/dist/cjs/helpers/mergeProps.cjs +79 -0
- package/dist/cjs/helpers/mergeProps.native.js +87 -0
- package/dist/cjs/helpers/mergeProps.native.js.map +1 -0
- package/dist/cjs/helpers/mergeRenderElementProps.cjs +35 -0
- package/dist/cjs/helpers/mergeRenderElementProps.native.js +38 -0
- package/dist/cjs/helpers/mergeRenderElementProps.native.js.map +1 -0
- package/dist/cjs/helpers/mergeSlotStyleProps.cjs +52 -0
- package/dist/cjs/helpers/mergeSlotStyleProps.native.js +55 -0
- package/dist/cjs/helpers/mergeSlotStyleProps.native.js.map +1 -0
- package/dist/cjs/helpers/mergeVariants.cjs +52 -0
- package/dist/cjs/helpers/mergeVariants.native.js +56 -0
- package/dist/cjs/helpers/mergeVariants.native.js.map +1 -0
- package/dist/cjs/helpers/nativeOnlyProps.cjs +62 -0
- package/dist/cjs/helpers/nativeOnlyProps.native.js +65 -0
- package/dist/cjs/helpers/nativeOnlyProps.native.js.map +1 -0
- package/dist/cjs/helpers/normalizeColor.cjs +47 -0
- package/dist/cjs/helpers/normalizeColor.native.js +53 -0
- package/dist/cjs/helpers/normalizeColor.native.js.map +1 -0
- package/dist/cjs/helpers/normalizeShadow.cjs +50 -0
- package/dist/cjs/helpers/normalizeShadow.native.js +54 -0
- package/dist/cjs/helpers/normalizeShadow.native.js.map +1 -0
- package/dist/cjs/helpers/normalizeStyle.cjs +54 -0
- package/dist/cjs/helpers/normalizeStyle.native.js +58 -0
- package/dist/cjs/helpers/normalizeStyle.native.js.map +1 -0
- package/dist/cjs/helpers/normalizeStylePropKeys.cjs +28 -0
- package/dist/cjs/helpers/normalizeStylePropKeys.native.js +42 -0
- package/dist/cjs/helpers/normalizeStylePropKeys.native.js.map +1 -0
- package/dist/cjs/helpers/normalizeValueWithProperty.cjs +54 -0
- package/dist/cjs/helpers/normalizeValueWithProperty.native.js +63 -0
- package/dist/cjs/helpers/normalizeValueWithProperty.native.js.map +1 -0
- package/dist/cjs/helpers/objectIdentityKey.cjs +46 -0
- package/dist/cjs/helpers/objectIdentityKey.native.js +54 -0
- package/dist/cjs/helpers/objectIdentityKey.native.js.map +1 -0
- package/dist/cjs/helpers/parseBorderShorthand.cjs +30 -0
- package/dist/cjs/helpers/parseBorderShorthand.native.js +86 -0
- package/dist/cjs/helpers/parseBorderShorthand.native.js.map +1 -0
- package/dist/cjs/helpers/parseNativeStyle.cjs +167 -0
- package/dist/cjs/helpers/parseNativeStyle.native.js +190 -0
- package/dist/cjs/helpers/parseNativeStyle.native.js.map +1 -0
- package/dist/cjs/helpers/parseOutlineShorthand.cjs +30 -0
- package/dist/cjs/helpers/parseOutlineShorthand.native.js +80 -0
- package/dist/cjs/helpers/parseOutlineShorthand.native.js.map +1 -0
- package/dist/cjs/helpers/platformResolveValue.cjs +38 -0
- package/dist/cjs/helpers/platformResolveValue.native.js +74 -0
- package/dist/cjs/helpers/platformResolveValue.native.js.map +1 -0
- package/dist/cjs/helpers/pointerEvents.cjs +28 -0
- package/dist/cjs/helpers/pointerEvents.native.js +155 -0
- package/dist/cjs/helpers/pointerEvents.native.js.map +1 -0
- package/dist/cjs/helpers/propMapper.cjs +257 -0
- package/dist/cjs/helpers/propMapper.native.js +331 -0
- package/dist/cjs/helpers/propMapper.native.js.map +1 -0
- package/dist/cjs/helpers/proxyThemeToParents.cjs +63 -0
- package/dist/cjs/helpers/proxyThemeToParents.native.js +161 -0
- package/dist/cjs/helpers/proxyThemeToParents.native.js.map +1 -0
- package/dist/cjs/helpers/proxyThemeVariables.cjs +38 -0
- package/dist/cjs/helpers/proxyThemeVariables.native.js +43 -0
- package/dist/cjs/helpers/proxyThemeVariables.native.js.map +1 -0
- package/dist/cjs/helpers/pseudoDescriptors.cjs +82 -0
- package/dist/cjs/helpers/pseudoDescriptors.native.js +85 -0
- package/dist/cjs/helpers/pseudoDescriptors.native.js.map +1 -0
- package/dist/cjs/helpers/pseudoTransitions.cjs +83 -0
- package/dist/cjs/helpers/pseudoTransitions.native.js +88 -0
- package/dist/cjs/helpers/pseudoTransitions.native.js.map +1 -0
- package/dist/cjs/helpers/registerCSSVariable.cjs +81 -0
- package/dist/cjs/helpers/registerCSSVariable.native.js +85 -0
- package/dist/cjs/helpers/registerCSSVariable.native.js.map +1 -0
- package/dist/cjs/helpers/resolveAnimationDriver.cjs +37 -0
- package/dist/cjs/helpers/resolveAnimationDriver.native.js +41 -0
- package/dist/cjs/helpers/resolveAnimationDriver.native.js.map +1 -0
- package/dist/cjs/helpers/resolveCompoundTokens.cjs +41 -0
- package/dist/cjs/helpers/resolveCompoundTokens.native.js +44 -0
- package/dist/cjs/helpers/resolveCompoundTokens.native.js.map +1 -0
- package/dist/cjs/helpers/resolveRem.cjs +34 -0
- package/dist/cjs/helpers/resolveRem.native.js +59 -0
- package/dist/cjs/helpers/resolveRem.native.js.map +1 -0
- package/dist/cjs/helpers/resolveSafeArea.cjs +36 -0
- package/dist/cjs/helpers/resolveSafeArea.native.js +46 -0
- package/dist/cjs/helpers/resolveSafeArea.native.js.map +1 -0
- package/dist/cjs/helpers/setElementProps.cjs +31 -0
- package/dist/cjs/helpers/setElementProps.native.js +39 -0
- package/dist/cjs/helpers/setElementProps.native.js.map +1 -0
- package/dist/cjs/helpers/skipProps.cjs +46 -0
- package/dist/cjs/helpers/skipProps.native.js +49 -0
- package/dist/cjs/helpers/skipProps.native.js.map +1 -0
- package/dist/cjs/helpers/sortString.cjs +28 -0
- package/dist/cjs/helpers/sortString.native.js +33 -0
- package/dist/cjs/helpers/sortString.native.js.map +1 -0
- package/dist/cjs/helpers/subscribeToContextGroup.cjs +109 -0
- package/dist/cjs/helpers/subscribeToContextGroup.native.js +157 -0
- package/dist/cjs/helpers/subscribeToContextGroup.native.js.map +1 -0
- package/dist/cjs/helpers/themeable.cjs +114 -0
- package/dist/cjs/helpers/themeable.native.js +119 -0
- package/dist/cjs/helpers/themeable.native.js.map +1 -0
- package/dist/cjs/helpers/themes.cjs +46 -0
- package/dist/cjs/helpers/themes.native.js +49 -0
- package/dist/cjs/helpers/themes.native.js.map +1 -0
- package/dist/cjs/helpers/timer.cjs +34 -0
- package/dist/cjs/helpers/timer.native.js +37 -0
- package/dist/cjs/helpers/timer.native.js.map +1 -0
- package/dist/cjs/helpers/transformsToString.cjs +43 -0
- package/dist/cjs/helpers/transformsToString.native.js +46 -0
- package/dist/cjs/helpers/transformsToString.native.js.map +1 -0
- package/dist/cjs/helpers/useRenderElement.cjs +53 -0
- package/dist/cjs/helpers/useRenderElement.native.js +60 -0
- package/dist/cjs/helpers/useRenderElement.native.js.map +1 -0
- package/dist/cjs/helpers/webPropsToSkip.cjs +28 -0
- package/dist/cjs/helpers/webPropsToSkip.native.js +78 -0
- package/dist/cjs/helpers/webPropsToSkip.native.js.map +1 -0
- package/dist/cjs/helpers/wrapStyleTags.cjs +42 -0
- package/dist/cjs/helpers/wrapStyleTags.native.js +33 -0
- package/dist/cjs/helpers/wrapStyleTags.native.js.map +1 -0
- package/dist/cjs/hooks/doesRootSchemeMatchSystem.cjs +30 -0
- package/dist/cjs/hooks/doesRootSchemeMatchSystem.native.js +36 -0
- package/dist/cjs/hooks/doesRootSchemeMatchSystem.native.js.map +1 -0
- package/dist/cjs/hooks/getThemeProxied.cjs +78 -0
- package/dist/cjs/hooks/getThemeProxied.native.js +107 -0
- package/dist/cjs/hooks/getThemeProxied.native.js.map +1 -0
- package/dist/cjs/hooks/useComponentState.cjs +195 -0
- package/dist/cjs/hooks/useComponentState.native.js +209 -0
- package/dist/cjs/hooks/useComponentState.native.js.map +1 -0
- package/dist/cjs/hooks/useDisableSSR.cjs +31 -0
- package/dist/cjs/hooks/useDisableSSR.native.js +35 -0
- package/dist/cjs/hooks/useDisableSSR.native.js.map +1 -0
- package/dist/cjs/hooks/useIsTouchDevice.cjs +32 -0
- package/dist/cjs/hooks/useIsTouchDevice.native.js +35 -0
- package/dist/cjs/hooks/useIsTouchDevice.native.js.map +1 -0
- package/dist/cjs/hooks/useMedia.cjs +238 -0
- package/dist/cjs/hooks/useMedia.native.js +269 -0
- package/dist/cjs/hooks/useMedia.native.js.map +1 -0
- package/dist/cjs/hooks/useProps.cjs +120 -0
- package/dist/cjs/hooks/useProps.native.js +125 -0
- package/dist/cjs/hooks/useProps.native.js.map +1 -0
- package/dist/cjs/hooks/useTheme.cjs +57 -0
- package/dist/cjs/hooks/useTheme.native.js +61 -0
- package/dist/cjs/hooks/useTheme.native.js.map +1 -0
- package/dist/cjs/hooks/useThemeName.cjs +39 -0
- package/dist/cjs/hooks/useThemeName.native.js +45 -0
- package/dist/cjs/hooks/useThemeName.native.js.map +1 -0
- package/dist/cjs/hooks/useThemeState.cjs +336 -0
- package/dist/cjs/hooks/useThemeState.native.js +442 -0
- package/dist/cjs/hooks/useThemeState.native.js.map +1 -0
- package/dist/cjs/index.cjs +122 -0
- package/dist/cjs/index.native.js +125 -0
- package/dist/cjs/index.native.js.map +1 -0
- package/dist/cjs/inject-styles.cjs +42 -0
- package/dist/cjs/inject-styles.native.js +46 -0
- package/dist/cjs/inject-styles.native.js.map +1 -0
- package/dist/cjs/insertFont.cjs +84 -0
- package/dist/cjs/insertFont.native.js +81 -0
- package/dist/cjs/insertFont.native.js.map +1 -0
- package/dist/cjs/interfaces/CSSColorNames.cjs +18 -0
- package/dist/cjs/interfaces/CSSColorNames.native.js +21 -0
- package/dist/cjs/interfaces/CSSColorNames.native.js.map +1 -0
- package/dist/cjs/interfaces/GetRef.cjs +18 -0
- package/dist/cjs/interfaces/GetRef.native.js +21 -0
- package/dist/cjs/interfaces/GetRef.native.js.map +1 -0
- package/dist/cjs/interfaces/HanzoguiComponentEvents.cjs +18 -0
- package/dist/cjs/interfaces/HanzoguiComponentEvents.native.js +21 -0
- package/dist/cjs/interfaces/HanzoguiComponentEvents.native.js.map +1 -0
- package/dist/cjs/interfaces/HanzoguiComponentPropsBaseBase.cjs +18 -0
- package/dist/cjs/interfaces/HanzoguiComponentPropsBaseBase.native.js +21 -0
- package/dist/cjs/interfaces/HanzoguiComponentPropsBaseBase.native.js.map +1 -0
- package/dist/cjs/interfaces/RNExclusiveTypes.cjs +18 -0
- package/dist/cjs/interfaces/RNExclusiveTypes.native.js +21 -0
- package/dist/cjs/interfaces/RNExclusiveTypes.native.js.map +1 -0
- package/dist/cjs/setupHooks.cjs +32 -0
- package/dist/cjs/setupHooks.native.js +35 -0
- package/dist/cjs/setupHooks.native.js.map +1 -0
- package/dist/cjs/setupReactNative.cjs +54 -0
- package/dist/cjs/setupReactNative.native.js +58 -0
- package/dist/cjs/setupReactNative.native.js.map +1 -0
- package/dist/cjs/styled.cjs +159 -0
- package/dist/cjs/styled.native.js +165 -0
- package/dist/cjs/styled.native.js.map +1 -0
- package/dist/cjs/styledHtml.test-d.cjs +187 -0
- package/dist/cjs/styledHtml.test-d.native.js +190 -0
- package/dist/cjs/styledHtml.test-d.native.js.map +1 -0
- package/dist/cjs/type-utils.cjs +18 -0
- package/dist/cjs/type-utils.native.js +21 -0
- package/dist/cjs/type-utils.native.js.map +1 -0
- package/dist/cjs/types.cjs +18 -0
- package/dist/cjs/types.native.js +21 -0
- package/dist/cjs/types.native.js.map +1 -0
- package/dist/cjs/views/Configuration.cjs +52 -0
- package/dist/cjs/views/Configuration.native.js +56 -0
- package/dist/cjs/views/Configuration.native.js.map +1 -0
- package/dist/cjs/views/FontLanguage.cjs +41 -0
- package/dist/cjs/views/FontLanguage.native.js +59 -0
- package/dist/cjs/views/FontLanguage.native.js.map +1 -0
- package/dist/cjs/views/HanzoguiProvider.cjs +103 -0
- package/dist/cjs/views/HanzoguiProvider.native.js +108 -0
- package/dist/cjs/views/HanzoguiProvider.native.js.map +1 -0
- package/dist/cjs/views/HanzoguiRoot.cjs +79 -0
- package/dist/cjs/views/HanzoguiRoot.native.js +33 -0
- package/dist/cjs/views/HanzoguiRoot.native.js.map +1 -0
- package/dist/cjs/views/Slot.cjs +82 -0
- package/dist/cjs/views/Slot.native.js +86 -0
- package/dist/cjs/views/Slot.native.js.map +1 -0
- package/dist/cjs/views/Text.cjs +61 -0
- package/dist/cjs/views/Text.native.js +52 -0
- package/dist/cjs/views/Text.native.js.map +1 -0
- package/dist/cjs/views/Theme.cjs +198 -0
- package/dist/cjs/views/Theme.native.js +207 -0
- package/dist/cjs/views/Theme.native.js.map +1 -0
- package/dist/cjs/views/ThemeDebug.cjs +98 -0
- package/dist/cjs/views/ThemeDebug.native.js +39 -0
- package/dist/cjs/views/ThemeDebug.native.js.map +1 -0
- package/dist/cjs/views/ThemeProvider.cjs +55 -0
- package/dist/cjs/views/ThemeProvider.native.js +48 -0
- package/dist/cjs/views/ThemeProvider.native.js.map +1 -0
- package/dist/cjs/views/View.cjs +33 -0
- package/dist/cjs/views/View.native.js +36 -0
- package/dist/cjs/views/View.native.js.map +1 -0
- package/dist/esm/Hanzogui.mjs +38 -0
- package/dist/esm/Hanzogui.mjs.map +1 -0
- package/dist/esm/Hanzogui.native.js +87 -0
- package/dist/esm/Hanzogui.native.js.map +1 -0
- package/dist/esm/_withStableStyle.mjs +39 -0
- package/dist/esm/_withStableStyle.mjs.map +1 -0
- package/dist/esm/_withStableStyle.native.js +43 -0
- package/dist/esm/_withStableStyle.native.js.map +1 -0
- package/dist/esm/animationDriverTypes.test-d.mjs +78 -0
- package/dist/esm/animationDriverTypes.test-d.mjs.map +1 -0
- package/dist/esm/animationDriverTypes.test-d.native.js +78 -0
- package/dist/esm/animationDriverTypes.test-d.native.js.map +1 -0
- package/dist/esm/config.mjs +136 -0
- package/dist/esm/config.mjs.map +1 -0
- package/dist/esm/config.native.js +155 -0
- package/dist/esm/config.native.js.map +1 -0
- package/dist/esm/constants/accessibilityDirectMap.mjs +7 -0
- package/dist/esm/constants/accessibilityDirectMap.mjs.map +1 -0
- package/dist/esm/constants/accessibilityDirectMap.native.js +7 -0
- package/dist/esm/constants/accessibilityDirectMap.native.js.map +1 -0
- package/dist/esm/constants/constants.mjs +12 -0
- package/dist/esm/constants/constants.mjs.map +1 -0
- package/dist/esm/constants/constants.native.js +12 -0
- package/dist/esm/constants/constants.native.js.map +1 -0
- package/dist/esm/constants/isDevTools.mjs +10 -0
- package/dist/esm/constants/isDevTools.mjs.map +1 -0
- package/dist/esm/constants/isDevTools.native.js +10 -0
- package/dist/esm/constants/isDevTools.native.js.map +1 -0
- package/dist/esm/contexts/ComponentContext.mjs +15 -0
- package/dist/esm/contexts/ComponentContext.mjs.map +1 -0
- package/dist/esm/contexts/ComponentContext.native.js +15 -0
- package/dist/esm/contexts/ComponentContext.native.js.map +1 -0
- package/dist/esm/contexts/GroupContext.mjs +4 -0
- package/dist/esm/contexts/GroupContext.mjs.map +1 -0
- package/dist/esm/contexts/GroupContext.native.js +4 -0
- package/dist/esm/contexts/GroupContext.native.js.map +1 -0
- package/dist/esm/createComponent.mjs +1013 -0
- package/dist/esm/createComponent.mjs.map +1 -0
- package/dist/esm/createComponent.native.js +990 -0
- package/dist/esm/createComponent.native.js.map +1 -0
- package/dist/esm/createFont.mjs +23 -0
- package/dist/esm/createFont.mjs.map +1 -0
- package/dist/esm/createFont.native.js +25 -0
- package/dist/esm/createFont.native.js.map +1 -0
- package/dist/esm/createHanzogui.mjs +228 -0
- package/dist/esm/createHanzogui.mjs.map +1 -0
- package/dist/esm/createHanzogui.native.js +276 -0
- package/dist/esm/createHanzogui.native.js.map +1 -0
- package/dist/esm/createShorthands.mjs +5 -0
- package/dist/esm/createShorthands.mjs.map +1 -0
- package/dist/esm/createShorthands.native.js +5 -0
- package/dist/esm/createShorthands.native.js.map +1 -0
- package/dist/esm/createTokens.mjs +6 -0
- package/dist/esm/createTokens.mjs.map +1 -0
- package/dist/esm/createTokens.native.js +7 -0
- package/dist/esm/createTokens.native.js.map +1 -0
- package/dist/esm/createVariable.mjs +87 -0
- package/dist/esm/createVariable.mjs.map +1 -0
- package/dist/esm/createVariable.native.js +103 -0
- package/dist/esm/createVariable.native.js.map +1 -0
- package/dist/esm/createVariables.mjs +49 -0
- package/dist/esm/createVariables.mjs.map +1 -0
- package/dist/esm/createVariables.native.js +55 -0
- package/dist/esm/createVariables.native.js.map +1 -0
- package/dist/esm/defaultComponentState.mjs +20 -0
- package/dist/esm/defaultComponentState.mjs.map +1 -0
- package/dist/esm/defaultComponentState.native.js +20 -0
- package/dist/esm/defaultComponentState.native.js.map +1 -0
- package/dist/esm/eventHandling.mjs +21 -0
- package/dist/esm/eventHandling.mjs.map +1 -0
- package/dist/esm/eventHandling.native.js +163 -0
- package/dist/esm/eventHandling.native.js.map +1 -0
- package/dist/esm/helpers/consoleLog.native.js +4 -0
- package/dist/esm/helpers/consoleLog.native.js.map +1 -0
- package/dist/esm/helpers/createDesignSystem.mjs +157 -0
- package/dist/esm/helpers/createDesignSystem.mjs.map +1 -0
- package/dist/esm/helpers/createDesignSystem.native.js +202 -0
- package/dist/esm/helpers/createDesignSystem.native.js.map +1 -0
- package/dist/esm/helpers/createMediaStyle.mjs +100 -0
- package/dist/esm/helpers/createMediaStyle.mjs.map +1 -0
- package/dist/esm/helpers/createMediaStyle.native.js +110 -0
- package/dist/esm/helpers/createMediaStyle.native.js.map +1 -0
- package/dist/esm/helpers/createStyledContext.mjs +65 -0
- package/dist/esm/helpers/createStyledContext.mjs.map +1 -0
- package/dist/esm/helpers/createStyledContext.native.js +70 -0
- package/dist/esm/helpers/createStyledContext.native.js.map +1 -0
- package/dist/esm/helpers/defaultAnimationDriver.mjs +20 -0
- package/dist/esm/helpers/defaultAnimationDriver.mjs.map +1 -0
- package/dist/esm/helpers/defaultAnimationDriver.native.js +36 -0
- package/dist/esm/helpers/defaultAnimationDriver.native.js.map +1 -0
- package/dist/esm/helpers/defaultOffset.mjs +6 -0
- package/dist/esm/helpers/defaultOffset.mjs.map +1 -0
- package/dist/esm/helpers/defaultOffset.native.js +6 -0
- package/dist/esm/helpers/defaultOffset.native.js.map +1 -0
- package/dist/esm/helpers/expandStyle.mjs +44 -0
- package/dist/esm/helpers/expandStyle.mjs.map +1 -0
- package/dist/esm/helpers/expandStyle.native.js +124 -0
- package/dist/esm/helpers/expandStyle.native.js.map +1 -0
- package/dist/esm/helpers/expandStyles.mjs +16 -0
- package/dist/esm/helpers/expandStyles.mjs.map +1 -0
- package/dist/esm/helpers/expandStyles.native.js +23 -0
- package/dist/esm/helpers/expandStyles.native.js.map +1 -0
- package/dist/esm/helpers/getCSSStylesAtomic.mjs +190 -0
- package/dist/esm/helpers/getCSSStylesAtomic.mjs.map +1 -0
- package/dist/esm/helpers/getCSSStylesAtomic.native.js +8 -0
- package/dist/esm/helpers/getCSSStylesAtomic.native.js.map +1 -0
- package/dist/esm/helpers/getDefaultProps.mjs +18 -0
- package/dist/esm/helpers/getDefaultProps.mjs.map +1 -0
- package/dist/esm/helpers/getDefaultProps.native.js +19 -0
- package/dist/esm/helpers/getDefaultProps.native.js.map +1 -0
- package/dist/esm/helpers/getDynamicVal.mjs +44 -0
- package/dist/esm/helpers/getDynamicVal.mjs.map +1 -0
- package/dist/esm/helpers/getDynamicVal.native.js +45 -0
- package/dist/esm/helpers/getDynamicVal.native.js.map +1 -0
- package/dist/esm/helpers/getExpandedShorthands.mjs +16 -0
- package/dist/esm/helpers/getExpandedShorthands.mjs.map +1 -0
- package/dist/esm/helpers/getExpandedShorthands.native.js +17 -0
- package/dist/esm/helpers/getExpandedShorthands.native.js.map +1 -0
- package/dist/esm/helpers/getFontLanguage.mjs +3 -0
- package/dist/esm/helpers/getFontLanguage.mjs.map +1 -0
- package/dist/esm/helpers/getFontLanguage.native.js +5 -0
- package/dist/esm/helpers/getFontLanguage.native.js.map +1 -0
- package/dist/esm/helpers/getGroupPropParts.mjs +29 -0
- package/dist/esm/helpers/getGroupPropParts.mjs.map +1 -0
- package/dist/esm/helpers/getGroupPropParts.native.js +31 -0
- package/dist/esm/helpers/getGroupPropParts.native.js.map +1 -0
- package/dist/esm/helpers/getShorthandValue.mjs +8 -0
- package/dist/esm/helpers/getShorthandValue.mjs.map +1 -0
- package/dist/esm/helpers/getShorthandValue.native.js +9 -0
- package/dist/esm/helpers/getShorthandValue.native.js.map +1 -0
- package/dist/esm/helpers/getSplitStyles.mjs +859 -0
- package/dist/esm/helpers/getSplitStyles.mjs.map +1 -0
- package/dist/esm/helpers/getSplitStyles.native.js +877 -0
- package/dist/esm/helpers/getSplitStyles.native.js.map +1 -0
- package/dist/esm/helpers/getThemeCSSRules.mjs +109 -0
- package/dist/esm/helpers/getThemeCSSRules.mjs.map +1 -0
- package/dist/esm/helpers/getThemeCSSRules.native.js +5 -0
- package/dist/esm/helpers/getThemeCSSRules.native.js.map +1 -0
- package/dist/esm/helpers/getTokenForKey.mjs +146 -0
- package/dist/esm/helpers/getTokenForKey.mjs.map +1 -0
- package/dist/esm/helpers/getTokenForKey.native.js +155 -0
- package/dist/esm/helpers/getTokenForKey.native.js.map +1 -0
- package/dist/esm/helpers/getVariantExtras.mjs +55 -0
- package/dist/esm/helpers/getVariantExtras.mjs.map +1 -0
- package/dist/esm/helpers/getVariantExtras.native.js +56 -0
- package/dist/esm/helpers/getVariantExtras.native.js.map +1 -0
- package/dist/esm/helpers/insertStyleRule.mjs +201 -0
- package/dist/esm/helpers/insertStyleRule.mjs.map +1 -0
- package/dist/esm/helpers/insertStyleRule.native.js +69 -0
- package/dist/esm/helpers/insertStyleRule.native.js.map +1 -0
- package/dist/esm/helpers/isActivePlatform.mjs +14 -0
- package/dist/esm/helpers/isActivePlatform.mjs.map +1 -0
- package/dist/esm/helpers/isActivePlatform.native.js +14 -0
- package/dist/esm/helpers/isActivePlatform.native.js.map +1 -0
- package/dist/esm/helpers/isActiveTheme.mjs +6 -0
- package/dist/esm/helpers/isActiveTheme.mjs.map +1 -0
- package/dist/esm/helpers/isActiveTheme.native.js +6 -0
- package/dist/esm/helpers/isActiveTheme.native.js.map +1 -0
- package/dist/esm/helpers/isHanzoguiComponent.mjs +6 -0
- package/dist/esm/helpers/isHanzoguiComponent.mjs.map +1 -0
- package/dist/esm/helpers/isHanzoguiComponent.native.js +6 -0
- package/dist/esm/helpers/isHanzoguiComponent.native.js.map +1 -0
- package/dist/esm/helpers/isHanzoguiElement.mjs +7 -0
- package/dist/esm/helpers/isHanzoguiElement.mjs.map +1 -0
- package/dist/esm/helpers/isHanzoguiElement.native.js +7 -0
- package/dist/esm/helpers/isHanzoguiElement.native.js.map +1 -0
- package/dist/esm/helpers/isObj.mjs +3 -0
- package/dist/esm/helpers/isObj.mjs.map +1 -0
- package/dist/esm/helpers/isObj.native.js +10 -0
- package/dist/esm/helpers/isObj.native.js.map +1 -0
- package/dist/esm/helpers/log.mjs +14 -0
- package/dist/esm/helpers/log.mjs.map +1 -0
- package/dist/esm/helpers/log.native.js +15 -0
- package/dist/esm/helpers/log.native.js.map +1 -0
- package/dist/esm/helpers/mainThreadPressEvents.mjs +3 -0
- package/dist/esm/helpers/mainThreadPressEvents.mjs.map +1 -0
- package/dist/esm/helpers/mainThreadPressEvents.native.js +105 -0
- package/dist/esm/helpers/mainThreadPressEvents.native.js.map +1 -0
- package/dist/esm/helpers/matchMedia.mjs +12 -0
- package/dist/esm/helpers/matchMedia.mjs.map +1 -0
- package/dist/esm/helpers/matchMedia.native.js +33 -0
- package/dist/esm/helpers/matchMedia.native.js.map +1 -0
- package/dist/esm/helpers/mediaObjectToString.mjs +26 -0
- package/dist/esm/helpers/mediaObjectToString.mjs.map +1 -0
- package/dist/esm/helpers/mediaObjectToString.native.js +29 -0
- package/dist/esm/helpers/mediaObjectToString.native.js.map +1 -0
- package/dist/esm/helpers/mediaState.mjs +20 -0
- package/dist/esm/helpers/mediaState.mjs.map +1 -0
- package/dist/esm/helpers/mediaState.native.js +22 -0
- package/dist/esm/helpers/mediaState.native.js.map +1 -0
- package/dist/esm/helpers/mergeProps.mjs +53 -0
- package/dist/esm/helpers/mergeProps.mjs.map +1 -0
- package/dist/esm/helpers/mergeProps.native.js +58 -0
- package/dist/esm/helpers/mergeProps.native.js.map +1 -0
- package/dist/esm/helpers/mergeRenderElementProps.mjs +10 -0
- package/dist/esm/helpers/mergeRenderElementProps.mjs.map +1 -0
- package/dist/esm/helpers/mergeRenderElementProps.native.js +10 -0
- package/dist/esm/helpers/mergeRenderElementProps.native.js.map +1 -0
- package/dist/esm/helpers/mergeSlotStyleProps.mjs +27 -0
- package/dist/esm/helpers/mergeSlotStyleProps.mjs.map +1 -0
- package/dist/esm/helpers/mergeSlotStyleProps.native.js +27 -0
- package/dist/esm/helpers/mergeSlotStyleProps.native.js.map +1 -0
- package/dist/esm/helpers/mergeVariants.mjs +27 -0
- package/dist/esm/helpers/mergeVariants.mjs.map +1 -0
- package/dist/esm/helpers/mergeVariants.native.js +28 -0
- package/dist/esm/helpers/mergeVariants.native.js.map +1 -0
- package/dist/esm/helpers/nativeOnlyProps.mjs +37 -0
- package/dist/esm/helpers/nativeOnlyProps.mjs.map +1 -0
- package/dist/esm/helpers/nativeOnlyProps.native.js +37 -0
- package/dist/esm/helpers/nativeOnlyProps.native.js.map +1 -0
- package/dist/esm/helpers/normalizeColor.mjs +21 -0
- package/dist/esm/helpers/normalizeColor.mjs.map +1 -0
- package/dist/esm/helpers/normalizeColor.native.js +23 -0
- package/dist/esm/helpers/normalizeColor.native.js.map +1 -0
- package/dist/esm/helpers/normalizeShadow.mjs +25 -0
- package/dist/esm/helpers/normalizeShadow.mjs.map +1 -0
- package/dist/esm/helpers/normalizeShadow.native.js +26 -0
- package/dist/esm/helpers/normalizeShadow.native.js.map +1 -0
- package/dist/esm/helpers/normalizeStyle.mjs +29 -0
- package/dist/esm/helpers/normalizeStyle.mjs.map +1 -0
- package/dist/esm/helpers/normalizeStyle.native.js +30 -0
- package/dist/esm/helpers/normalizeStyle.native.js.map +1 -0
- package/dist/esm/helpers/normalizeStylePropKeys.mjs +3 -0
- package/dist/esm/helpers/normalizeStylePropKeys.mjs.map +1 -0
- package/dist/esm/helpers/normalizeStylePropKeys.native.js +14 -0
- package/dist/esm/helpers/normalizeStylePropKeys.native.js.map +1 -0
- package/dist/esm/helpers/normalizeValueWithProperty.mjs +29 -0
- package/dist/esm/helpers/normalizeValueWithProperty.mjs.map +1 -0
- package/dist/esm/helpers/normalizeValueWithProperty.native.js +35 -0
- package/dist/esm/helpers/normalizeValueWithProperty.native.js.map +1 -0
- package/dist/esm/helpers/objectIdentityKey.mjs +21 -0
- package/dist/esm/helpers/objectIdentityKey.mjs.map +1 -0
- package/dist/esm/helpers/objectIdentityKey.native.js +26 -0
- package/dist/esm/helpers/objectIdentityKey.native.js.map +1 -0
- package/dist/esm/helpers/parseBorderShorthand.mjs +5 -0
- package/dist/esm/helpers/parseBorderShorthand.mjs.map +1 -0
- package/dist/esm/helpers/parseBorderShorthand.native.js +58 -0
- package/dist/esm/helpers/parseBorderShorthand.native.js.map +1 -0
- package/dist/esm/helpers/parseNativeStyle.mjs +142 -0
- package/dist/esm/helpers/parseNativeStyle.mjs.map +1 -0
- package/dist/esm/helpers/parseNativeStyle.native.js +162 -0
- package/dist/esm/helpers/parseNativeStyle.native.js.map +1 -0
- package/dist/esm/helpers/parseOutlineShorthand.mjs +5 -0
- package/dist/esm/helpers/parseOutlineShorthand.mjs.map +1 -0
- package/dist/esm/helpers/parseOutlineShorthand.native.js +52 -0
- package/dist/esm/helpers/parseOutlineShorthand.native.js.map +1 -0
- package/dist/esm/helpers/platformResolveValue.mjs +13 -0
- package/dist/esm/helpers/platformResolveValue.mjs.map +1 -0
- package/dist/esm/helpers/platformResolveValue.native.js +46 -0
- package/dist/esm/helpers/platformResolveValue.native.js.map +1 -0
- package/dist/esm/helpers/pointerEvents.mjs +3 -0
- package/dist/esm/helpers/pointerEvents.mjs.map +1 -0
- package/dist/esm/helpers/pointerEvents.native.js +127 -0
- package/dist/esm/helpers/pointerEvents.native.js.map +1 -0
- package/dist/esm/helpers/propMapper.mjs +230 -0
- package/dist/esm/helpers/propMapper.mjs.map +1 -0
- package/dist/esm/helpers/propMapper.native.js +301 -0
- package/dist/esm/helpers/propMapper.native.js.map +1 -0
- package/dist/esm/helpers/proxyThemeToParents.mjs +37 -0
- package/dist/esm/helpers/proxyThemeToParents.mjs.map +1 -0
- package/dist/esm/helpers/proxyThemeToParents.native.js +132 -0
- package/dist/esm/helpers/proxyThemeToParents.native.js.map +1 -0
- package/dist/esm/helpers/proxyThemeVariables.mjs +13 -0
- package/dist/esm/helpers/proxyThemeVariables.mjs.map +1 -0
- package/dist/esm/helpers/proxyThemeVariables.native.js +15 -0
- package/dist/esm/helpers/proxyThemeVariables.native.js.map +1 -0
- package/dist/esm/helpers/pseudoDescriptors.mjs +54 -0
- package/dist/esm/helpers/pseudoDescriptors.mjs.map +1 -0
- package/dist/esm/helpers/pseudoDescriptors.native.js +54 -0
- package/dist/esm/helpers/pseudoDescriptors.native.js.map +1 -0
- package/dist/esm/helpers/pseudoTransitions.mjs +57 -0
- package/dist/esm/helpers/pseudoTransitions.mjs.map +1 -0
- package/dist/esm/helpers/pseudoTransitions.native.js +59 -0
- package/dist/esm/helpers/pseudoTransitions.native.js.map +1 -0
- package/dist/esm/helpers/registerCSSVariable.mjs +50 -0
- package/dist/esm/helpers/registerCSSVariable.mjs.map +1 -0
- package/dist/esm/helpers/registerCSSVariable.native.js +51 -0
- package/dist/esm/helpers/registerCSSVariable.native.js.map +1 -0
- package/dist/esm/helpers/resolveAnimationDriver.mjs +12 -0
- package/dist/esm/helpers/resolveAnimationDriver.mjs.map +1 -0
- package/dist/esm/helpers/resolveAnimationDriver.native.js +13 -0
- package/dist/esm/helpers/resolveAnimationDriver.native.js.map +1 -0
- package/dist/esm/helpers/resolveCompoundTokens.mjs +16 -0
- package/dist/esm/helpers/resolveCompoundTokens.mjs.map +1 -0
- package/dist/esm/helpers/resolveCompoundTokens.native.js +16 -0
- package/dist/esm/helpers/resolveCompoundTokens.native.js.map +1 -0
- package/dist/esm/helpers/resolveRem.mjs +8 -0
- package/dist/esm/helpers/resolveRem.mjs.map +1 -0
- package/dist/esm/helpers/resolveRem.native.js +30 -0
- package/dist/esm/helpers/resolveRem.native.js.map +1 -0
- package/dist/esm/helpers/resolveSafeArea.mjs +11 -0
- package/dist/esm/helpers/resolveSafeArea.mjs.map +1 -0
- package/dist/esm/helpers/resolveSafeArea.native.js +18 -0
- package/dist/esm/helpers/resolveSafeArea.native.js.map +1 -0
- package/dist/esm/helpers/setElementProps.mjs +6 -0
- package/dist/esm/helpers/setElementProps.mjs.map +1 -0
- package/dist/esm/helpers/setElementProps.native.js +11 -0
- package/dist/esm/helpers/setElementProps.native.js.map +1 -0
- package/dist/esm/helpers/skipProps.mjs +21 -0
- package/dist/esm/helpers/skipProps.mjs.map +1 -0
- package/dist/esm/helpers/skipProps.native.js +21 -0
- package/dist/esm/helpers/skipProps.native.js.map +1 -0
- package/dist/esm/helpers/sortString.mjs +3 -0
- package/dist/esm/helpers/sortString.mjs.map +1 -0
- package/dist/esm/helpers/sortString.native.js +5 -0
- package/dist/esm/helpers/sortString.native.js.map +1 -0
- package/dist/esm/helpers/subscribeToContextGroup.mjs +84 -0
- package/dist/esm/helpers/subscribeToContextGroup.mjs.map +1 -0
- package/dist/esm/helpers/subscribeToContextGroup.native.js +129 -0
- package/dist/esm/helpers/subscribeToContextGroup.native.js.map +1 -0
- package/dist/esm/helpers/themeable.mjs +79 -0
- package/dist/esm/helpers/themeable.mjs.map +1 -0
- package/dist/esm/helpers/themeable.native.js +80 -0
- package/dist/esm/helpers/themeable.native.js.map +1 -0
- package/dist/esm/helpers/themes.mjs +21 -0
- package/dist/esm/helpers/themes.mjs.map +1 -0
- package/dist/esm/helpers/themes.native.js +21 -0
- package/dist/esm/helpers/themes.native.js.map +1 -0
- package/dist/esm/helpers/timer.mjs +9 -0
- package/dist/esm/helpers/timer.mjs.map +1 -0
- package/dist/esm/helpers/timer.native.js +9 -0
- package/dist/esm/helpers/timer.native.js.map +1 -0
- package/dist/esm/helpers/transformsToString.mjs +18 -0
- package/dist/esm/helpers/transformsToString.mjs.map +1 -0
- package/dist/esm/helpers/transformsToString.native.js +18 -0
- package/dist/esm/helpers/transformsToString.native.js.map +1 -0
- package/dist/esm/helpers/useRenderElement.mjs +26 -0
- package/dist/esm/helpers/useRenderElement.mjs.map +1 -0
- package/dist/esm/helpers/useRenderElement.native.js +31 -0
- package/dist/esm/helpers/useRenderElement.native.js.map +1 -0
- package/dist/esm/helpers/webPropsToSkip.mjs +3 -0
- package/dist/esm/helpers/webPropsToSkip.mjs.map +1 -0
- package/dist/esm/helpers/webPropsToSkip.native.js +50 -0
- package/dist/esm/helpers/webPropsToSkip.native.js.map +1 -0
- package/dist/esm/helpers/wrapStyleTags.mjs +17 -0
- package/dist/esm/helpers/wrapStyleTags.mjs.map +1 -0
- package/dist/esm/helpers/wrapStyleTags.native.js +5 -0
- package/dist/esm/helpers/wrapStyleTags.native.js.map +1 -0
- package/dist/esm/hooks/doesRootSchemeMatchSystem.mjs +5 -0
- package/dist/esm/hooks/doesRootSchemeMatchSystem.mjs.map +1 -0
- package/dist/esm/hooks/doesRootSchemeMatchSystem.native.js +8 -0
- package/dist/esm/hooks/doesRootSchemeMatchSystem.native.js.map +1 -0
- package/dist/esm/hooks/getThemeProxied.mjs +53 -0
- package/dist/esm/hooks/getThemeProxied.mjs.map +1 -0
- package/dist/esm/hooks/getThemeProxied.native.js +79 -0
- package/dist/esm/hooks/getThemeProxied.native.js.map +1 -0
- package/dist/esm/hooks/useComponentState.mjs +170 -0
- package/dist/esm/hooks/useComponentState.mjs.map +1 -0
- package/dist/esm/hooks/useComponentState.native.js +181 -0
- package/dist/esm/hooks/useComponentState.native.js.map +1 -0
- package/dist/esm/hooks/useDisableSSR.mjs +6 -0
- package/dist/esm/hooks/useDisableSSR.mjs.map +1 -0
- package/dist/esm/hooks/useDisableSSR.native.js +7 -0
- package/dist/esm/hooks/useDisableSSR.native.js.map +1 -0
- package/dist/esm/hooks/useIsTouchDevice.mjs +7 -0
- package/dist/esm/hooks/useIsTouchDevice.mjs.map +1 -0
- package/dist/esm/hooks/useIsTouchDevice.native.js +7 -0
- package/dist/esm/hooks/useIsTouchDevice.native.js.map +1 -0
- package/dist/esm/hooks/useMedia.mjs +201 -0
- package/dist/esm/hooks/useMedia.mjs.map +1 -0
- package/dist/esm/hooks/useMedia.native.js +229 -0
- package/dist/esm/hooks/useMedia.native.js.map +1 -0
- package/dist/esm/hooks/useProps.mjs +82 -0
- package/dist/esm/hooks/useProps.mjs.map +1 -0
- package/dist/esm/hooks/useProps.native.js +84 -0
- package/dist/esm/hooks/useProps.native.js.map +1 -0
- package/dist/esm/hooks/useTheme.mjs +31 -0
- package/dist/esm/hooks/useTheme.mjs.map +1 -0
- package/dist/esm/hooks/useTheme.native.js +32 -0
- package/dist/esm/hooks/useTheme.native.js.map +1 -0
- package/dist/esm/hooks/useThemeName.mjs +14 -0
- package/dist/esm/hooks/useThemeName.mjs.map +1 -0
- package/dist/esm/hooks/useThemeName.native.js +17 -0
- package/dist/esm/hooks/useThemeName.native.js.map +1 -0
- package/dist/esm/hooks/useThemeState.mjs +306 -0
- package/dist/esm/hooks/useThemeState.mjs.map +1 -0
- package/dist/esm/hooks/useThemeState.native.js +409 -0
- package/dist/esm/hooks/useThemeState.native.js.map +1 -0
- package/dist/esm/index.js +74 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/index.mjs +74 -0
- package/dist/esm/index.mjs.map +1 -0
- package/dist/esm/index.native.js +74 -0
- package/dist/esm/index.native.js.map +1 -0
- package/dist/esm/inject-styles.mjs +17 -0
- package/dist/esm/inject-styles.mjs.map +1 -0
- package/dist/esm/inject-styles.native.js +18 -0
- package/dist/esm/inject-styles.native.js.map +1 -0
- package/dist/esm/insertFont.mjs +55 -0
- package/dist/esm/insertFont.mjs.map +1 -0
- package/dist/esm/insertFont.native.js +49 -0
- package/dist/esm/insertFont.native.js.map +1 -0
- package/dist/esm/interfaces/CSSColorNames.mjs +2 -0
- package/dist/esm/interfaces/CSSColorNames.mjs.map +1 -0
- package/dist/esm/interfaces/CSSColorNames.native.js +2 -0
- package/dist/esm/interfaces/CSSColorNames.native.js.map +1 -0
- package/dist/esm/interfaces/GetRef.mjs +2 -0
- package/dist/esm/interfaces/GetRef.mjs.map +1 -0
- package/dist/esm/interfaces/GetRef.native.js +2 -0
- package/dist/esm/interfaces/GetRef.native.js.map +1 -0
- package/dist/esm/interfaces/HanzoguiComponentEvents.mjs +2 -0
- package/dist/esm/interfaces/HanzoguiComponentEvents.mjs.map +1 -0
- package/dist/esm/interfaces/HanzoguiComponentEvents.native.js +2 -0
- package/dist/esm/interfaces/HanzoguiComponentEvents.native.js.map +1 -0
- package/dist/esm/interfaces/HanzoguiComponentPropsBaseBase.mjs +2 -0
- package/dist/esm/interfaces/HanzoguiComponentPropsBaseBase.mjs.map +1 -0
- package/dist/esm/interfaces/HanzoguiComponentPropsBaseBase.native.js +2 -0
- package/dist/esm/interfaces/HanzoguiComponentPropsBaseBase.native.js.map +1 -0
- package/dist/esm/interfaces/RNExclusiveTypes.mjs +2 -0
- package/dist/esm/interfaces/RNExclusiveTypes.mjs.map +1 -0
- package/dist/esm/interfaces/RNExclusiveTypes.native.js +2 -0
- package/dist/esm/interfaces/RNExclusiveTypes.native.js.map +1 -0
- package/dist/esm/setupHooks.mjs +6 -0
- package/dist/esm/setupHooks.mjs.map +1 -0
- package/dist/esm/setupHooks.native.js +6 -0
- package/dist/esm/setupHooks.native.js.map +1 -0
- package/dist/esm/setupReactNative.mjs +29 -0
- package/dist/esm/setupReactNative.mjs.map +1 -0
- package/dist/esm/setupReactNative.native.js +30 -0
- package/dist/esm/setupReactNative.native.js.map +1 -0
- package/dist/esm/styled.mjs +133 -0
- package/dist/esm/styled.mjs.map +1 -0
- package/dist/esm/styled.native.js +136 -0
- package/dist/esm/styled.native.js.map +1 -0
- package/dist/esm/styledHtml.test-d.mjs +188 -0
- package/dist/esm/styledHtml.test-d.mjs.map +1 -0
- package/dist/esm/styledHtml.test-d.native.js +188 -0
- package/dist/esm/styledHtml.test-d.native.js.map +1 -0
- package/dist/esm/type-utils.mjs +2 -0
- package/dist/esm/type-utils.mjs.map +1 -0
- package/dist/esm/type-utils.native.js +2 -0
- package/dist/esm/type-utils.native.js.map +1 -0
- package/dist/esm/types.mjs +2 -0
- package/dist/esm/types.mjs.map +1 -0
- package/dist/esm/types.native.js +2 -0
- package/dist/esm/types.native.js.map +1 -0
- package/dist/esm/views/Configuration.mjs +16 -0
- package/dist/esm/views/Configuration.mjs.map +1 -0
- package/dist/esm/views/Configuration.native.js +17 -0
- package/dist/esm/views/Configuration.native.js.map +1 -0
- package/dist/esm/views/FontLanguage.mjs +16 -0
- package/dist/esm/views/FontLanguage.mjs.map +1 -0
- package/dist/esm/views/FontLanguage.native.js +20 -0
- package/dist/esm/views/FontLanguage.native.js.map +1 -0
- package/dist/esm/views/HanzoguiProvider.mjs +67 -0
- package/dist/esm/views/HanzoguiProvider.mjs.map +1 -0
- package/dist/esm/views/HanzoguiProvider.native.js +69 -0
- package/dist/esm/views/HanzoguiProvider.native.js.map +1 -0
- package/dist/esm/views/HanzoguiRoot.mjs +43 -0
- package/dist/esm/views/HanzoguiRoot.mjs.map +1 -0
- package/dist/esm/views/HanzoguiRoot.native.js +5 -0
- package/dist/esm/views/HanzoguiRoot.native.js.map +1 -0
- package/dist/esm/views/Slot.mjs +56 -0
- package/dist/esm/views/Slot.mjs.map +1 -0
- package/dist/esm/views/Slot.native.js +57 -0
- package/dist/esm/views/Slot.native.js.map +1 -0
- package/dist/esm/views/Text.mjs +36 -0
- package/dist/esm/views/Text.mjs.map +1 -0
- package/dist/esm/views/Text.native.js +25 -0
- package/dist/esm/views/Text.native.js.map +1 -0
- package/dist/esm/views/Theme.mjs +161 -0
- package/dist/esm/views/Theme.mjs.map +1 -0
- package/dist/esm/views/Theme.native.js +167 -0
- package/dist/esm/views/Theme.native.js.map +1 -0
- package/dist/esm/views/ThemeDebug.mjs +73 -0
- package/dist/esm/views/ThemeDebug.mjs.map +1 -0
- package/dist/esm/views/ThemeDebug.native.js +11 -0
- package/dist/esm/views/ThemeDebug.native.js.map +1 -0
- package/dist/esm/views/ThemeProvider.mjs +30 -0
- package/dist/esm/views/ThemeProvider.mjs.map +1 -0
- package/dist/esm/views/ThemeProvider.native.js +20 -0
- package/dist/esm/views/ThemeProvider.native.js.map +1 -0
- package/dist/esm/views/View.mjs +8 -0
- package/dist/esm/views/View.mjs.map +1 -0
- package/dist/esm/views/View.native.js +8 -0
- package/dist/esm/views/View.native.js.map +1 -0
- package/inject-styles/index.cjs +2 -0
- package/inject-styles/index.js +2 -0
- package/inject-styles.cjs +1 -0
- package/package.json +81 -0
- package/reset.css +59 -0
- package/src/Hanzogui.ts +47 -0
- package/src/_withStableStyle.tsx +62 -0
- package/src/animationDriverTypes.test-d.ts +332 -0
- package/src/config.ts +232 -0
- package/src/constants/accessibilityDirectMap.native.tsx +10 -0
- package/src/constants/accessibilityDirectMap.tsx +11 -0
- package/src/constants/constants.ts +16 -0
- package/src/constants/isDevTools.ts +12 -0
- package/src/contexts/ComponentContext.tsx +16 -0
- package/src/contexts/GroupContext.tsx +4 -0
- package/src/createComponent.tsx +1844 -0
- package/src/createFont.ts +50 -0
- package/src/createHanzogui.ts +371 -0
- package/src/createShorthands.ts +7 -0
- package/src/createTokens.ts +31 -0
- package/src/createVariable.ts +121 -0
- package/src/createVariables.ts +78 -0
- package/src/defaultComponentState.tsx +22 -0
- package/src/eventHandling.native.ts +227 -0
- package/src/eventHandling.ts +46 -0
- package/src/helpers/consoleLog.native.ts +2 -0
- package/src/helpers/createDesignSystem.ts +264 -0
- package/src/helpers/createMediaStyle.ts +167 -0
- package/src/helpers/createStyledContext.tsx +98 -0
- package/src/helpers/defaultAnimationDriver.tsx +24 -0
- package/src/helpers/defaultOffset.ts +1 -0
- package/src/helpers/expandStyle.ts +204 -0
- package/src/helpers/expandStyles.ts +42 -0
- package/src/helpers/getCSSStylesAtomic.native.ts +7 -0
- package/src/helpers/getCSSStylesAtomic.ts +263 -0
- package/src/helpers/getDefaultProps.ts +28 -0
- package/src/helpers/getDynamicVal.ts +63 -0
- package/src/helpers/getExpandedShorthands.ts +23 -0
- package/src/helpers/getFontLanguage.ts +2 -0
- package/src/helpers/getGroupPropParts.ts +46 -0
- package/src/helpers/getShorthandValue.ts +9 -0
- package/src/helpers/getSplitStyles.tsx +1869 -0
- package/src/helpers/getThemeCSSRules.native.ts +3 -0
- package/src/helpers/getThemeCSSRules.ts +192 -0
- package/src/helpers/getTokenForKey.ts +236 -0
- package/src/helpers/getVariantExtras.tsx +67 -0
- package/src/helpers/insertStyleRule.tsx +365 -0
- package/src/helpers/isActivePlatform.ts +43 -0
- package/src/helpers/isActiveTheme.ts +4 -0
- package/src/helpers/isHanzoguiComponent.tsx +11 -0
- package/src/helpers/isHanzoguiElement.tsx +11 -0
- package/src/helpers/isObj.ts +1 -0
- package/src/helpers/log.ts +17 -0
- package/src/helpers/mainThreadPressEvents.native.ts +137 -0
- package/src/helpers/mainThreadPressEvents.ts +7 -0
- package/src/helpers/matchMedia.native.ts +34 -0
- package/src/helpers/matchMedia.ts +17 -0
- package/src/helpers/mediaObjectToString.ts +30 -0
- package/src/helpers/mediaState.ts +32 -0
- package/src/helpers/mergeProps.ts +121 -0
- package/src/helpers/mergeRenderElementProps.ts +17 -0
- package/src/helpers/mergeSlotStyleProps.ts +46 -0
- package/src/helpers/mergeVariants.ts +40 -0
- package/src/helpers/nativeOnlyProps.ts +38 -0
- package/src/helpers/normalizeColor.native.ts +29 -0
- package/src/helpers/normalizeColor.ts +29 -0
- package/src/helpers/normalizeShadow.native.ts +20 -0
- package/src/helpers/normalizeShadow.ts +21 -0
- package/src/helpers/normalizeStyle.ts +42 -0
- package/src/helpers/normalizeStylePropKeys.native.ts +12 -0
- package/src/helpers/normalizeStylePropKeys.ts +3 -0
- package/src/helpers/normalizeValueWithProperty.ts +41 -0
- package/src/helpers/objectIdentityKey.tsx +20 -0
- package/src/helpers/parseBorderShorthand.native.ts +74 -0
- package/src/helpers/parseBorderShorthand.ts +6 -0
- package/src/helpers/parseNativeStyle.ts +193 -0
- package/src/helpers/parseOutlineShorthand.native.ts +62 -0
- package/src/helpers/parseOutlineShorthand.ts +6 -0
- package/src/helpers/platformResolveValue.native.ts +72 -0
- package/src/helpers/platformResolveValue.ts +22 -0
- package/src/helpers/pointerEvents.native.ts +143 -0
- package/src/helpers/pointerEvents.ts +9 -0
- package/src/helpers/propMapper.ts +404 -0
- package/src/helpers/proxyThemeToParents.ts +52 -0
- package/src/helpers/proxyThemeVariables.tsx +13 -0
- package/src/helpers/pseudoDescriptors.ts +74 -0
- package/src/helpers/pseudoTransitions.ts +97 -0
- package/src/helpers/registerCSSVariable.ts +54 -0
- package/src/helpers/resolveAnimationDriver.ts +23 -0
- package/src/helpers/resolveCompoundTokens.ts +28 -0
- package/src/helpers/resolveRem.native.ts +44 -0
- package/src/helpers/resolveRem.ts +17 -0
- package/src/helpers/resolveSafeArea.native.ts +18 -0
- package/src/helpers/resolveSafeArea.ts +10 -0
- package/src/helpers/setElementProps.native.tsx +9 -0
- package/src/helpers/setElementProps.tsx +5 -0
- package/src/helpers/skipProps.ts +35 -0
- package/src/helpers/sortString.ts +1 -0
- package/src/helpers/subscribeToContextGroup.tsx +99 -0
- package/src/helpers/themeable.tsx +104 -0
- package/src/helpers/themes.ts +23 -0
- package/src/helpers/timer.ts +9 -0
- package/src/helpers/transformsToString.ts +20 -0
- package/src/helpers/useRenderElement.tsx +73 -0
- package/src/helpers/webPropsToSkip.native.ts +56 -0
- package/src/helpers/webPropsToSkip.ts +1 -0
- package/src/helpers/wrapStyleTags.tsx +31 -0
- package/src/hooks/doesRootSchemeMatchSystem.native.ts +7 -0
- package/src/hooks/doesRootSchemeMatchSystem.ts +4 -0
- package/src/hooks/getThemeProxied.ts +202 -0
- package/src/hooks/useComponentState.ts +269 -0
- package/src/hooks/useDisableSSR.tsx +6 -0
- package/src/hooks/useIsTouchDevice.tsx +6 -0
- package/src/hooks/useMedia.tsx +298 -0
- package/src/hooks/useProps.tsx +158 -0
- package/src/hooks/useTheme.tsx +48 -0
- package/src/hooks/useThemeName.tsx +10 -0
- package/src/hooks/useThemeState.ts +559 -0
- package/src/index.ts +103 -0
- package/src/inject-styles.ts +20 -0
- package/src/insertFont.ts +81 -0
- package/src/interfaces/CSSColorNames.tsx +149 -0
- package/src/interfaces/GetRef.tsx +24 -0
- package/src/interfaces/HanzoguiComponentEvents.tsx +18 -0
- package/src/interfaces/HanzoguiComponentPropsBaseBase.tsx +124 -0
- package/src/interfaces/RNExclusiveTypes.ts +59 -0
- package/src/setupHooks.ts +27 -0
- package/src/setupReactNative.ts +60 -0
- package/src/styled.tsx +602 -0
- package/src/styledHtml.test-d.ts +286 -0
- package/src/type-utils.ts +30 -0
- package/src/types.tsx +3372 -0
- package/src/views/Configuration.tsx +20 -0
- package/src/views/FontLanguage.native.tsx +13 -0
- package/src/views/FontLanguage.tsx +18 -0
- package/src/views/HanzoguiProvider.tsx +95 -0
- package/src/views/HanzoguiRoot.native.tsx +9 -0
- package/src/views/HanzoguiRoot.tsx +64 -0
- package/src/views/Slot.tsx +86 -0
- package/src/views/Text.tsx +72 -0
- package/src/views/Theme.tsx +246 -0
- package/src/views/ThemeDebug.native.tsx +17 -0
- package/src/views/ThemeDebug.tsx +95 -0
- package/src/views/ThemeProvider.tsx +45 -0
- package/src/views/View.tsx +25 -0
- package/tsconfig.json +44 -0
- package/tsconfig.test.json +9 -0
- package/types/Hanzogui.d.ts +15 -0
- package/types/Hanzogui.d.ts.map +1 -0
- package/types/_withStableStyle.d.ts +3 -0
- package/types/_withStableStyle.d.ts.map +1 -0
- package/types/config.d.ts +72 -0
- package/types/config.d.ts.map +1 -0
- package/types/constants/accessibilityDirectMap.d.ts +6 -0
- package/types/constants/accessibilityDirectMap.d.ts.map +1 -0
- package/types/constants/accessibilityDirectMap.native.d.ts +6 -0
- package/types/constants/accessibilityDirectMap.native.d.ts.map +1 -0
- package/types/constants/constants.d.ts +5 -0
- package/types/constants/constants.d.ts.map +1 -0
- package/types/constants/isDevTools.d.ts +2 -0
- package/types/constants/isDevTools.d.ts.map +1 -0
- package/types/contexts/ComponentContext.d.ts +4 -0
- package/types/contexts/ComponentContext.d.ts.map +1 -0
- package/types/contexts/GroupContext.d.ts +3 -0
- package/types/contexts/GroupContext.d.ts.map +1 -0
- package/types/createComponent.d.ts +7 -0
- package/types/createComponent.d.ts.map +1 -0
- package/types/createFont.d.ts +3 -0
- package/types/createFont.d.ts.map +1 -0
- package/types/createHanzogui.d.ts +3 -0
- package/types/createHanzogui.d.ts.map +1 -0
- package/types/createShorthands.d.ts +3 -0
- package/types/createShorthands.d.ts.map +1 -0
- package/types/createTokens.d.ts +22 -0
- package/types/createTokens.d.ts.map +1 -0
- package/types/createVariable.d.ts +22 -0
- package/types/createVariable.d.ts.map +1 -0
- package/types/createVariables.d.ts +10 -0
- package/types/createVariables.d.ts.map +1 -0
- package/types/defaultComponentState.d.ts +5 -0
- package/types/defaultComponentState.d.ts.map +1 -0
- package/types/eventHandling.d.ts +27 -0
- package/types/eventHandling.d.ts.map +1 -0
- package/types/eventHandling.native.d.ts +12 -0
- package/types/eventHandling.native.d.ts.map +1 -0
- package/types/helpers/consoleLog.native.d.ts +7 -0
- package/types/helpers/consoleLog.native.d.ts.map +1 -0
- package/types/helpers/createDesignSystem.d.ts +47 -0
- package/types/helpers/createDesignSystem.d.ts.map +1 -0
- package/types/helpers/createMediaStyle.d.ts +5 -0
- package/types/helpers/createMediaStyle.d.ts.map +1 -0
- package/types/helpers/createStyledContext.d.ts +3 -0
- package/types/helpers/createStyledContext.d.ts.map +1 -0
- package/types/helpers/defaultAnimationDriver.d.ts +3 -0
- package/types/helpers/defaultAnimationDriver.d.ts.map +1 -0
- package/types/helpers/defaultOffset.d.ts +5 -0
- package/types/helpers/defaultOffset.d.ts.map +1 -0
- package/types/helpers/expandStyle.d.ts +7 -0
- package/types/helpers/expandStyle.d.ts.map +1 -0
- package/types/helpers/expandStyles.d.ts +2 -0
- package/types/helpers/expandStyles.d.ts.map +1 -0
- package/types/helpers/getCSSStylesAtomic.d.ts +11 -0
- package/types/helpers/getCSSStylesAtomic.d.ts.map +1 -0
- package/types/helpers/getCSSStylesAtomic.native.d.ts +4 -0
- package/types/helpers/getCSSStylesAtomic.native.d.ts.map +1 -0
- package/types/helpers/getDefaultProps.d.ts +3 -0
- package/types/helpers/getDefaultProps.d.ts.map +1 -0
- package/types/helpers/getDynamicVal.d.ts +16 -0
- package/types/helpers/getDynamicVal.d.ts.map +1 -0
- package/types/helpers/getExpandedShorthands.d.ts +7 -0
- package/types/helpers/getExpandedShorthands.d.ts.map +1 -0
- package/types/helpers/getFontLanguage.d.ts +2 -0
- package/types/helpers/getFontLanguage.d.ts.map +1 -0
- package/types/helpers/getGroupPropParts.d.ts +7 -0
- package/types/helpers/getGroupPropParts.d.ts.map +1 -0
- package/types/helpers/getShorthandValue.d.ts +2 -0
- package/types/helpers/getShorthandValue.d.ts.map +1 -0
- package/types/helpers/getSplitStyles.d.ts +13 -0
- package/types/helpers/getSplitStyles.d.ts.map +1 -0
- package/types/helpers/getThemeCSSRules.d.ts +10 -0
- package/types/helpers/getThemeCSSRules.d.ts.map +1 -0
- package/types/helpers/getThemeCSSRules.native.d.ts +2 -0
- package/types/helpers/getThemeCSSRules.native.d.ts.map +1 -0
- package/types/helpers/getTokenForKey.d.ts +6 -0
- package/types/helpers/getTokenForKey.d.ts.map +1 -0
- package/types/helpers/getVariantExtras.d.ts +4 -0
- package/types/helpers/getVariantExtras.d.ts.map +1 -0
- package/types/helpers/insertStyleRule.d.ts +10 -0
- package/types/helpers/insertStyleRule.d.ts.map +1 -0
- package/types/helpers/isActivePlatform.d.ts +16 -0
- package/types/helpers/isActivePlatform.d.ts.map +1 -0
- package/types/helpers/isActiveTheme.d.ts +2 -0
- package/types/helpers/isActiveTheme.d.ts.map +1 -0
- package/types/helpers/isHanzoguiComponent.d.ts +5 -0
- package/types/helpers/isHanzoguiComponent.d.ts.map +1 -0
- package/types/helpers/isHanzoguiElement.d.ts +8 -0
- package/types/helpers/isHanzoguiElement.d.ts.map +1 -0
- package/types/helpers/isObj.d.ts +2 -0
- package/types/helpers/isObj.d.ts.map +1 -0
- package/types/helpers/log.d.ts +2 -0
- package/types/helpers/log.d.ts.map +1 -0
- package/types/helpers/mainThreadPressEvents.d.ts +2 -0
- package/types/helpers/mainThreadPressEvents.d.ts.map +1 -0
- package/types/helpers/mainThreadPressEvents.native.d.ts +9 -0
- package/types/helpers/mainThreadPressEvents.native.d.ts.map +1 -0
- package/types/helpers/matchMedia.d.ts +6 -0
- package/types/helpers/matchMedia.d.ts.map +1 -0
- package/types/helpers/matchMedia.native.d.ts +4 -0
- package/types/helpers/matchMedia.native.d.ts.map +1 -0
- package/types/helpers/mediaObjectToString.d.ts +3 -0
- package/types/helpers/mediaObjectToString.d.ts.map +1 -0
- package/types/helpers/mediaState.d.ts +7 -0
- package/types/helpers/mediaState.d.ts.map +1 -0
- package/types/helpers/mergeProps.d.ts +20 -0
- package/types/helpers/mergeProps.d.ts.map +1 -0
- package/types/helpers/mergeRenderElementProps.d.ts +7 -0
- package/types/helpers/mergeRenderElementProps.d.ts.map +1 -0
- package/types/helpers/mergeSlotStyleProps.d.ts +10 -0
- package/types/helpers/mergeSlotStyleProps.d.ts.map +1 -0
- package/types/helpers/mergeVariants.d.ts +3 -0
- package/types/helpers/mergeVariants.d.ts.map +1 -0
- package/types/helpers/nativeOnlyProps.d.ts +39 -0
- package/types/helpers/nativeOnlyProps.d.ts.map +1 -0
- package/types/helpers/normalizeColor.d.ts +8 -0
- package/types/helpers/normalizeColor.d.ts.map +1 -0
- package/types/helpers/normalizeColor.native.d.ts +9 -0
- package/types/helpers/normalizeColor.native.d.ts.map +1 -0
- package/types/helpers/normalizeShadow.d.ts +10 -0
- package/types/helpers/normalizeShadow.d.ts.map +1 -0
- package/types/helpers/normalizeShadow.native.d.ts +10 -0
- package/types/helpers/normalizeShadow.native.d.ts.map +1 -0
- package/types/helpers/normalizeStyle.d.ts +9 -0
- package/types/helpers/normalizeStyle.d.ts.map +1 -0
- package/types/helpers/normalizeStylePropKeys.d.ts +2 -0
- package/types/helpers/normalizeStylePropKeys.d.ts.map +1 -0
- package/types/helpers/normalizeStylePropKeys.native.d.ts +13 -0
- package/types/helpers/normalizeStylePropKeys.native.d.ts.map +1 -0
- package/types/helpers/normalizeValueWithProperty.d.ts +6 -0
- package/types/helpers/normalizeValueWithProperty.d.ts.map +1 -0
- package/types/helpers/objectIdentityKey.d.ts +2 -0
- package/types/helpers/objectIdentityKey.d.ts.map +1 -0
- package/types/helpers/parseBorderShorthand.d.ts +3 -0
- package/types/helpers/parseBorderShorthand.d.ts.map +1 -0
- package/types/helpers/parseBorderShorthand.native.d.ts +3 -0
- package/types/helpers/parseBorderShorthand.native.d.ts.map +1 -0
- package/types/helpers/parseNativeStyle.d.ts +14 -0
- package/types/helpers/parseNativeStyle.d.ts.map +1 -0
- package/types/helpers/parseOutlineShorthand.d.ts +3 -0
- package/types/helpers/parseOutlineShorthand.d.ts.map +1 -0
- package/types/helpers/parseOutlineShorthand.native.d.ts +3 -0
- package/types/helpers/parseOutlineShorthand.native.d.ts.map +1 -0
- package/types/helpers/platformResolveValue.d.ts +6 -0
- package/types/helpers/platformResolveValue.d.ts.map +1 -0
- package/types/helpers/platformResolveValue.native.d.ts +7 -0
- package/types/helpers/platformResolveValue.native.d.ts.map +1 -0
- package/types/helpers/pointerEvents.d.ts +8 -0
- package/types/helpers/pointerEvents.d.ts.map +1 -0
- package/types/helpers/pointerEvents.native.d.ts +2 -0
- package/types/helpers/pointerEvents.native.d.ts.map +1 -0
- package/types/helpers/propMapper.d.ts +5 -0
- package/types/helpers/propMapper.d.ts.map +1 -0
- package/types/helpers/proxyThemeToParents.d.ts +4 -0
- package/types/helpers/proxyThemeToParents.d.ts.map +1 -0
- package/types/helpers/proxyThemeVariables.d.ts +2 -0
- package/types/helpers/proxyThemeVariables.d.ts.map +1 -0
- package/types/helpers/pseudoDescriptors.d.ts +51 -0
- package/types/helpers/pseudoDescriptors.d.ts.map +1 -0
- package/types/helpers/pseudoTransitions.d.ts +29 -0
- package/types/helpers/pseudoTransitions.d.ts.map +1 -0
- package/types/helpers/registerCSSVariable.d.ts +9 -0
- package/types/helpers/registerCSSVariable.d.ts.map +1 -0
- package/types/helpers/resolveAnimationDriver.d.ts +7 -0
- package/types/helpers/resolveAnimationDriver.d.ts.map +1 -0
- package/types/helpers/resolveCompoundTokens.d.ts +9 -0
- package/types/helpers/resolveCompoundTokens.d.ts.map +1 -0
- package/types/helpers/resolveRem.d.ts +13 -0
- package/types/helpers/resolveRem.d.ts.map +1 -0
- package/types/helpers/resolveRem.native.d.ts +13 -0
- package/types/helpers/resolveRem.native.d.ts.map +1 -0
- package/types/helpers/resolveSafeArea.d.ts +2 -0
- package/types/helpers/resolveSafeArea.d.ts.map +1 -0
- package/types/helpers/resolveSafeArea.native.d.ts +2 -0
- package/types/helpers/resolveSafeArea.native.d.ts.map +1 -0
- package/types/helpers/setElementProps.d.ts +2 -0
- package/types/helpers/setElementProps.d.ts.map +1 -0
- package/types/helpers/setElementProps.native.d.ts +2 -0
- package/types/helpers/setElementProps.native.d.ts.map +1 -0
- package/types/helpers/skipProps.d.ts +19 -0
- package/types/helpers/skipProps.d.ts.map +1 -0
- package/types/helpers/sortString.d.ts +2 -0
- package/types/helpers/sortString.d.ts.map +1 -0
- package/types/helpers/subscribeToContextGroup.d.ts +10 -0
- package/types/helpers/subscribeToContextGroup.d.ts.map +1 -0
- package/types/helpers/themeable.d.ts +3 -0
- package/types/helpers/themeable.d.ts.map +1 -0
- package/types/helpers/themes.d.ts +2 -0
- package/types/helpers/themes.d.ts.map +1 -0
- package/types/helpers/timer.d.ts +2 -0
- package/types/helpers/timer.d.ts.map +1 -0
- package/types/helpers/transformsToString.d.ts +2 -0
- package/types/helpers/transformsToString.d.ts.map +1 -0
- package/types/helpers/useRenderElement.d.ts +13 -0
- package/types/helpers/useRenderElement.d.ts.map +1 -0
- package/types/helpers/webPropsToSkip.d.ts +2 -0
- package/types/helpers/webPropsToSkip.d.ts.map +1 -0
- package/types/helpers/webPropsToSkip.native.d.ts +104 -0
- package/types/helpers/webPropsToSkip.native.d.ts.map +1 -0
- package/types/helpers/wrapStyleTags.d.ts +3 -0
- package/types/helpers/wrapStyleTags.d.ts.map +1 -0
- package/types/hooks/doesRootSchemeMatchSystem.d.ts +2 -0
- package/types/hooks/doesRootSchemeMatchSystem.d.ts.map +1 -0
- package/types/hooks/doesRootSchemeMatchSystem.native.d.ts +2 -0
- package/types/hooks/doesRootSchemeMatchSystem.native.d.ts.map +1 -0
- package/types/hooks/getThemeProxied.d.ts +23 -0
- package/types/hooks/getThemeProxied.d.ts.map +1 -0
- package/types/hooks/useComponentState.d.ts +25 -0
- package/types/hooks/useComponentState.d.ts.map +1 -0
- package/types/hooks/useDisableSSR.d.ts +3 -0
- package/types/hooks/useDisableSSR.d.ts.map +1 -0
- package/types/hooks/useIsTouchDevice.d.ts +2 -0
- package/types/hooks/useIsTouchDevice.d.ts.map +1 -0
- package/types/hooks/useMedia.d.ts +23 -0
- package/types/hooks/useMedia.d.ts.map +1 -0
- package/types/hooks/useProps.d.ts +41 -0
- package/types/hooks/useProps.d.ts.map +1 -0
- package/types/hooks/useTheme.d.ts +9 -0
- package/types/hooks/useTheme.d.ts.map +1 -0
- package/types/hooks/useThemeName.d.ts +3 -0
- package/types/hooks/useThemeName.d.ts.map +1 -0
- package/types/hooks/useThemeState.d.ts +11 -0
- package/types/hooks/useThemeState.d.ts.map +1 -0
- package/types/index.d.ts +77 -0
- package/types/index.d.ts.map +1 -0
- package/types/inject-styles.d.ts +7 -0
- package/types/inject-styles.d.ts.map +1 -0
- package/types/insertFont.d.ts +10 -0
- package/types/insertFont.d.ts.map +1 -0
- package/types/interfaces/CSSColorNames.d.ts +2 -0
- package/types/interfaces/CSSColorNames.d.ts.map +1 -0
- package/types/interfaces/GetRef.d.ts +6 -0
- package/types/interfaces/GetRef.d.ts.map +1 -0
- package/types/interfaces/HanzoguiComponentEvents.d.ts +19 -0
- package/types/interfaces/HanzoguiComponentEvents.d.ts.map +1 -0
- package/types/interfaces/HanzoguiComponentPropsBaseBase.d.ts +95 -0
- package/types/interfaces/HanzoguiComponentPropsBaseBase.d.ts.map +1 -0
- package/types/interfaces/RNExclusiveTypes.d.ts +22 -0
- package/types/interfaces/RNExclusiveTypes.d.ts.map +1 -0
- package/types/setupHooks.d.ts +17 -0
- package/types/setupHooks.d.ts.map +1 -0
- package/types/setupReactNative.d.ts +5 -0
- package/types/setupReactNative.d.ts.map +1 -0
- package/types/styled.d.ts +53 -0
- package/types/styled.d.ts.map +1 -0
- package/types/type-utils.d.ts +13 -0
- package/types/type-utils.d.ts.map +1 -0
- package/types/types.d.ts +1936 -0
- package/types/types.d.ts.map +1 -0
- package/types/views/Configuration.d.ts +10 -0
- package/types/views/Configuration.d.ts.map +1 -0
- package/types/views/FontLanguage.d.ts +6 -0
- package/types/views/FontLanguage.d.ts.map +1 -0
- package/types/views/FontLanguage.native.d.ts +3 -0
- package/types/views/FontLanguage.native.d.ts.map +1 -0
- package/types/views/HanzoguiProvider.d.ts +3 -0
- package/types/views/HanzoguiProvider.d.ts.map +1 -0
- package/types/views/HanzoguiRoot.d.ts +15 -0
- package/types/views/HanzoguiRoot.d.ts.map +1 -0
- package/types/views/HanzoguiRoot.native.d.ts +7 -0
- package/types/views/HanzoguiRoot.native.d.ts.map +1 -0
- package/types/views/Slot.d.ts +13 -0
- package/types/views/Slot.d.ts.map +1 -0
- package/types/views/Text.d.ts +4 -0
- package/types/views/Text.d.ts.map +1 -0
- package/types/views/Theme.d.ts +16 -0
- package/types/views/Theme.d.ts.map +1 -0
- package/types/views/ThemeDebug.d.ts +10 -0
- package/types/views/ThemeDebug.d.ts.map +1 -0
- package/types/views/ThemeDebug.native.d.ts +10 -0
- package/types/views/ThemeDebug.native.d.ts.map +1 -0
- package/types/views/ThemeProvider.d.ts +3 -0
- package/types/views/ThemeProvider.d.ts.map +1 -0
- package/types/views/View.d.ts +8 -0
- package/types/views/View.d.ts.map +1 -0
- package/vitest.config.d.ts +3 -0
- package/vitest.config.d.ts.map +1 -0
- package/vitest.config.ts +14 -0
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
import { getConfigMaybe, setConfig, setTokens } from "./config.native.js";
|
|
2
|
+
import { createVariables } from "./createVariables.native.js";
|
|
3
|
+
import { defaultAnimationDriver } from "./helpers/defaultAnimationDriver.native.js";
|
|
4
|
+
import { resolveAnimationDriver } from "./helpers/resolveAnimationDriver.native.js";
|
|
5
|
+
import { buildCSSRuleSets, createFontCSS, createThemeCSS, createTokenCSS, getCSS as getCSSHelper } from "./helpers/createDesignSystem.native.js";
|
|
6
|
+
import { scanAllSheets } from "./helpers/insertStyleRule.native.js";
|
|
7
|
+
import { proxyThemesToParents } from "./helpers/proxyThemeToParents.native.js";
|
|
8
|
+
import { ensureThemeVariable } from "./helpers/themes.native.js";
|
|
9
|
+
import { configureMedia } from "./hooks/useMedia.native.js";
|
|
10
|
+
import { parseFont, registerFontVariables } from "./insertFont.native.js";
|
|
11
|
+
import { Hanzogui } from "./Hanzogui.native.js";
|
|
12
|
+
function shouldTokenCategoryHaveUnits(category) {
|
|
13
|
+
return (/* @__PURE__ */new Set(["size", "space", "radius"])).has(category);
|
|
14
|
+
}
|
|
15
|
+
function initializeHanzoguiConfig(config) {
|
|
16
|
+
setConfig(config);
|
|
17
|
+
configureMedia(config);
|
|
18
|
+
}
|
|
19
|
+
function createHanzogui(configIn) {
|
|
20
|
+
var _configIn_settings, _configIn_settings1, _process_env_DEBUG;
|
|
21
|
+
var existingConfig = getConfigMaybe();
|
|
22
|
+
if (existingConfig) configIn = {
|
|
23
|
+
...existingConfig,
|
|
24
|
+
...configIn
|
|
25
|
+
};
|
|
26
|
+
var tokensParsed = {};
|
|
27
|
+
var tokens = createVariables(configIn.tokens || {});
|
|
28
|
+
if (configIn.tokens) {
|
|
29
|
+
var tokensMerged = {};
|
|
30
|
+
for (var cat in tokens) {
|
|
31
|
+
tokensParsed[cat] = {};
|
|
32
|
+
tokensMerged[cat] = {};
|
|
33
|
+
var tokenCat = tokens[cat];
|
|
34
|
+
for (var key in tokenCat) {
|
|
35
|
+
var val = tokenCat[key];
|
|
36
|
+
var prefixedKey = `$${key}`;
|
|
37
|
+
tokensParsed[cat][prefixedKey] = val;
|
|
38
|
+
tokensMerged[cat][prefixedKey] = val;
|
|
39
|
+
tokensMerged[cat][key] = val;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
setTokens(tokensMerged);
|
|
43
|
+
}
|
|
44
|
+
var foundThemes;
|
|
45
|
+
if (configIn.themes) {
|
|
46
|
+
var noThemes = Object.keys(configIn.themes).length === 0;
|
|
47
|
+
if (noThemes && !process.env.TAMAGUI_DID_OUTPUT_CSS) foundThemes = scanAllSheets(noThemes, tokensParsed);
|
|
48
|
+
}
|
|
49
|
+
var fontSizeTokens = null;
|
|
50
|
+
var fontsParsed;
|
|
51
|
+
if (configIn.fonts) {
|
|
52
|
+
var fontTokens = Object.fromEntries(Object.entries(configIn.fonts).map(function (param) {
|
|
53
|
+
var [k, v] = param;
|
|
54
|
+
return [k, createVariables(v, "f", true)];
|
|
55
|
+
}));
|
|
56
|
+
fontsParsed = function () {
|
|
57
|
+
var res = {};
|
|
58
|
+
for (var familyName in fontTokens) {
|
|
59
|
+
var font = fontTokens[familyName];
|
|
60
|
+
var fontParsed = parseFont(font);
|
|
61
|
+
res[`$${familyName}`] = fontParsed;
|
|
62
|
+
if (!fontSizeTokens && fontParsed.size) fontSizeTokens = new Set(Object.keys(fontParsed.size));
|
|
63
|
+
}
|
|
64
|
+
return res;
|
|
65
|
+
}();
|
|
66
|
+
}
|
|
67
|
+
var specificTokens = {};
|
|
68
|
+
var themeConfig = function () {
|
|
69
|
+
var sortedTokenKeys = Object.keys(tokens).sort();
|
|
70
|
+
var _iteratorNormalCompletion = true,
|
|
71
|
+
_didIteratorError = false,
|
|
72
|
+
_iteratorError = void 0;
|
|
73
|
+
try {
|
|
74
|
+
for (var _iterator = sortedTokenKeys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
75
|
+
var key2 = _step.value;
|
|
76
|
+
var sortedSubKeys = Object.keys(tokens[key2]).sort();
|
|
77
|
+
var _iteratorNormalCompletion1 = true,
|
|
78
|
+
_didIteratorError1 = false,
|
|
79
|
+
_iteratorError1 = void 0;
|
|
80
|
+
try {
|
|
81
|
+
for (var _iterator1 = sortedSubKeys[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
|
|
82
|
+
var skey = _step1.value;
|
|
83
|
+
var variable = tokens[key2][skey];
|
|
84
|
+
specificTokens[`$${key2}.${skey}`] = variable;
|
|
85
|
+
if (process.env.NODE_ENV === "development") {
|
|
86
|
+
if (typeof variable === "undefined") throw new Error(`No value for tokens.${key2}.${skey}:
|
|
87
|
+
${JSON.stringify(variable, null, 2)}`);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
} catch (err) {
|
|
91
|
+
_didIteratorError1 = true;
|
|
92
|
+
_iteratorError1 = err;
|
|
93
|
+
} finally {
|
|
94
|
+
try {
|
|
95
|
+
if (!_iteratorNormalCompletion1 && _iterator1.return != null) _iterator1.return();
|
|
96
|
+
} finally {
|
|
97
|
+
if (_didIteratorError1) throw _iteratorError1;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
} catch (err) {
|
|
102
|
+
_didIteratorError = true;
|
|
103
|
+
_iteratorError = err;
|
|
104
|
+
} finally {
|
|
105
|
+
try {
|
|
106
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
|
|
107
|
+
} finally {
|
|
108
|
+
if (_didIteratorError) throw _iteratorError;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
var cssRuleSets = buildCSSRuleSets(createTokenCSS(tokens, shouldTokenCategoryHaveUnits), createFontCSS(fontsParsed, registerFontVariables));
|
|
112
|
+
var themesIn = configIn.themes;
|
|
113
|
+
var dedupedThemes = foundThemes !== null && foundThemes !== void 0 ? foundThemes : getThemesDeduped(themesIn, tokens.color);
|
|
114
|
+
return {
|
|
115
|
+
themes: proxyThemesToParents(dedupedThemes),
|
|
116
|
+
cssRuleSets,
|
|
117
|
+
getThemeRulesSets() {
|
|
118
|
+
return createThemeCSS(dedupedThemes, configIn);
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
}();
|
|
122
|
+
var userShorthands = configIn.shorthands || {};
|
|
123
|
+
var shorthands = {
|
|
124
|
+
...builtinShorthands,
|
|
125
|
+
...userShorthands
|
|
126
|
+
};
|
|
127
|
+
var lastCSSIndex = {
|
|
128
|
+
value: -1
|
|
129
|
+
};
|
|
130
|
+
var getCSS = function () {
|
|
131
|
+
return getCSSHelper(themeConfig, arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, lastCSSIndex);
|
|
132
|
+
};
|
|
133
|
+
var getNewCSS = function (opts) {
|
|
134
|
+
return getCSS({
|
|
135
|
+
...opts,
|
|
136
|
+
sinceLastCall: true
|
|
137
|
+
});
|
|
138
|
+
};
|
|
139
|
+
var defaultFontSetting = (_configIn_settings = configIn.settings) === null || _configIn_settings === void 0 ? void 0 : _configIn_settings.defaultFont;
|
|
140
|
+
var defaultFont = function () {
|
|
141
|
+
var val2 = defaultFontSetting;
|
|
142
|
+
if ((val2 === null || val2 === void 0 ? void 0 : val2[0]) === "$") val2 = val2.slice(1);
|
|
143
|
+
return val2;
|
|
144
|
+
}();
|
|
145
|
+
!((_configIn_settings1 = configIn.settings) === null || _configIn_settings1 === void 0) && _configIn_settings1.defaultPosition;
|
|
146
|
+
var defaultProps = configIn.defaultProps || {};
|
|
147
|
+
var defaultFontToken = defaultFont ? `$${defaultFont}` : "";
|
|
148
|
+
var inputAnimations = configIn.animations;
|
|
149
|
+
var resolvedDriver = resolveAnimationDriver(inputAnimations);
|
|
150
|
+
var isMultiDriver = resolvedDriver !== null && resolvedDriver !== inputAnimations;
|
|
151
|
+
var resolvedAnimations = resolvedDriver !== null && resolvedDriver !== void 0 ? resolvedDriver : inputAnimations;
|
|
152
|
+
var animationDrivers = isMultiDriver ? inputAnimations : void 0;
|
|
153
|
+
var config = {
|
|
154
|
+
fonts: {},
|
|
155
|
+
onlyAllowShorthands: false,
|
|
156
|
+
fontLanguages: [],
|
|
157
|
+
media: {},
|
|
158
|
+
...configIn,
|
|
159
|
+
animations: resolvedAnimations !== null && resolvedAnimations !== void 0 ? resolvedAnimations : defaultAnimationDriver,
|
|
160
|
+
animationDrivers,
|
|
161
|
+
defaultProps,
|
|
162
|
+
settings: {
|
|
163
|
+
webContainerType: "inline-size",
|
|
164
|
+
...configIn.settings
|
|
165
|
+
},
|
|
166
|
+
tokens,
|
|
167
|
+
shorthands,
|
|
168
|
+
userShorthands,
|
|
169
|
+
inverseShorthands: shorthands ? Object.fromEntries(Object.entries(shorthands).map(function (param) {
|
|
170
|
+
var [k, v] = param;
|
|
171
|
+
return [v, k];
|
|
172
|
+
})) : {},
|
|
173
|
+
themes: themeConfig.themes,
|
|
174
|
+
fontsParsed: fontsParsed || {},
|
|
175
|
+
themeConfig,
|
|
176
|
+
tokensParsed,
|
|
177
|
+
parsed: true,
|
|
178
|
+
getNewCSS,
|
|
179
|
+
getCSS,
|
|
180
|
+
defaultFont,
|
|
181
|
+
fontSizeTokens: fontSizeTokens || /* @__PURE__ */new Set(),
|
|
182
|
+
specificTokens,
|
|
183
|
+
defaultFontToken
|
|
184
|
+
};
|
|
185
|
+
initializeHanzoguiConfig(config);
|
|
186
|
+
if (process.env.NODE_ENV !== "development") return config;
|
|
187
|
+
if ((_process_env_DEBUG = process.env.DEBUG) === null || _process_env_DEBUG === void 0 ? void 0 : _process_env_DEBUG.startsWith("hanzogui")) console.info("Hanzogui config:", config);
|
|
188
|
+
if (!globalThis["Hanzogui"]) globalThis["Hanzogui"] = Hanzogui;
|
|
189
|
+
return config;
|
|
190
|
+
}
|
|
191
|
+
function getThemesDeduped(themes, colorTokens) {
|
|
192
|
+
var dedupedThemes = [];
|
|
193
|
+
var existing = /* @__PURE__ */new Map();
|
|
194
|
+
var sortedThemeNames = Object.keys(themes).sort();
|
|
195
|
+
var _iteratorNormalCompletion = true,
|
|
196
|
+
_didIteratorError = false,
|
|
197
|
+
_iteratorError = void 0;
|
|
198
|
+
try {
|
|
199
|
+
for (var _iterator = sortedThemeNames[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
200
|
+
var themeName = _step.value;
|
|
201
|
+
var darkOrLightSpecificPrefix = themeName.startsWith("dark") ? "dark" : themeName.startsWith("light") ? "light" : "";
|
|
202
|
+
var rawTheme = themes[themeName];
|
|
203
|
+
var key = darkOrLightSpecificPrefix + JSON.stringify(rawTheme);
|
|
204
|
+
if (existing.has(key)) {
|
|
205
|
+
existing.get(key).names.push(themeName);
|
|
206
|
+
continue;
|
|
207
|
+
}
|
|
208
|
+
var theme = {
|
|
209
|
+
...colorTokens,
|
|
210
|
+
...rawTheme
|
|
211
|
+
};
|
|
212
|
+
for (var key1 in theme) ensureThemeVariable(theme, key1);
|
|
213
|
+
var deduped = {
|
|
214
|
+
names: [themeName],
|
|
215
|
+
theme
|
|
216
|
+
};
|
|
217
|
+
dedupedThemes.push(deduped);
|
|
218
|
+
existing.set(key, deduped);
|
|
219
|
+
}
|
|
220
|
+
} catch (err) {
|
|
221
|
+
_didIteratorError = true;
|
|
222
|
+
_iteratorError = err;
|
|
223
|
+
} finally {
|
|
224
|
+
try {
|
|
225
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
|
|
226
|
+
} finally {
|
|
227
|
+
if (_didIteratorError) throw _iteratorError;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
return dedupedThemes;
|
|
231
|
+
}
|
|
232
|
+
var builtinShorthands = {
|
|
233
|
+
bblr: "borderBottomLeftRadius",
|
|
234
|
+
bbrr: "borderBottomRightRadius",
|
|
235
|
+
bbs: "borderBottomStyle",
|
|
236
|
+
bls: "borderLeftStyle",
|
|
237
|
+
brc: "borderRightColor",
|
|
238
|
+
brs: "borderRightStyle",
|
|
239
|
+
brw: "borderRightWidth",
|
|
240
|
+
bs: "borderStyle",
|
|
241
|
+
btc: "borderTopColor",
|
|
242
|
+
btlr: "borderTopLeftRadius",
|
|
243
|
+
btrr: "borderTopRightRadius",
|
|
244
|
+
bts: "borderTopStyle",
|
|
245
|
+
btw: "borderTopWidth",
|
|
246
|
+
bw: "borderWidth",
|
|
247
|
+
bxs: "boxSizing",
|
|
248
|
+
bxsh: "boxShadow",
|
|
249
|
+
col: "color",
|
|
250
|
+
cur: "cursor",
|
|
251
|
+
dsp: "display",
|
|
252
|
+
fb: "flexBasis",
|
|
253
|
+
fd: "flexDirection",
|
|
254
|
+
ff: "fontFamily",
|
|
255
|
+
fs: "fontSize",
|
|
256
|
+
fst: "fontStyle",
|
|
257
|
+
fw: "fontWeight",
|
|
258
|
+
fwr: "flexWrap",
|
|
259
|
+
lh: "lineHeight",
|
|
260
|
+
ls: "letterSpacing",
|
|
261
|
+
o: "opacity",
|
|
262
|
+
ov: "overflow",
|
|
263
|
+
ox: "overflowX",
|
|
264
|
+
oy: "overflowY",
|
|
265
|
+
pe: "pointerEvents",
|
|
266
|
+
pos: "position",
|
|
267
|
+
td: "textDecorationLine",
|
|
268
|
+
tr: "transform",
|
|
269
|
+
tt: "textTransform",
|
|
270
|
+
va: "verticalAlign",
|
|
271
|
+
wb: "wordBreak",
|
|
272
|
+
ws: "whiteSpace",
|
|
273
|
+
ww: "wordWrap"
|
|
274
|
+
};
|
|
275
|
+
export { createHanzogui };
|
|
276
|
+
//# sourceMappingURL=createHanzogui.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getConfigMaybe","setConfig","setTokens","createVariables","defaultAnimationDriver","resolveAnimationDriver","buildCSSRuleSets","createFontCSS","createThemeCSS","createTokenCSS","getCSS","getCSSHelper","scanAllSheets","proxyThemesToParents","ensureThemeVariable","configureMedia","parseFont","registerFontVariables","Hanzogui","shouldTokenCategoryHaveUnits","category","Set","has","initializeHanzoguiConfig","config","createHanzogui","configIn","_configIn_settings","_configIn_settings1","_process_env_DEBUG","existingConfig","tokensParsed","tokens","tokensMerged","cat","tokenCat","key","val","prefixedKey","foundThemes","themes","noThemes","Object","keys","length","process","env","TAMAGUI_DID_OUTPUT_CSS","fontSizeTokens","fontsParsed","fonts","fontTokens","fromEntries","entries","map","param","k","v","res","familyName","font","fontParsed","size","specificTokens","themeConfig","sortedTokenKeys","sort","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","Symbol","iterator","_step","next","done","key2","value","sortedSubKeys","_iteratorNormalCompletion1","_didIteratorError1","_iteratorError1","_iterator1","_step1","skey","variable","NODE_ENV","Error","JSON","stringify","err","return","cssRuleSets","themesIn","dedupedThemes","getThemesDeduped","color","getThemeRulesSets","userShorthands","shorthands","builtinShorthands","lastCSSIndex","arguments","getNewCSS","opts","sinceLastCall","defaultFontSetting","settings","defaultFont","val2","slice","defaultPosition","defaultProps","defaultFontToken","inputAnimations","animations","resolvedDriver","isMultiDriver","resolvedAnimations","animationDrivers","onlyAllowShorthands","fontLanguages","media","webContainerType","inverseShorthands","parsed","DEBUG","startsWith","console","info","globalThis","colorTokens","existing","Map","sortedThemeNames","themeName","darkOrLightSpecificPrefix","rawTheme","get","names","push","theme","key1","deduped","set","bblr","bbrr","bbs","bls","brc","brs","brw","bs","btc","btlr","btrr","bts","btw","bw","bxs","bxsh","col","cur","dsp","fb","f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uG,KAAS,CAAAC,IAAA,CAAAL,SAAA;QAAA;MACjB;MAEF,IAAAM,KAAA;QACA,GAAAV,WAAa;QACf,GAAAM;MAEA;MACF,SAAAK,IAAA,IAAAD,KAAA,EAAA/H,mBAAA,CAAA+H,KAAA,EAAAC,IAAA;MAGA,IAAMC,OAAA;QACJJ,KAAM,GAAAJ,SAAA;QACNM;MACA;MACA/C,aAAK,CAAA8C,IAAA,CAAAG,OAAA;MACLX,QAAK,CAAAY,GAAA,CAAA5G,GAAA,EAAA2G,OAAA;IACL;EAAK,CACL,QAAKrD,GAAA;IACLtB,iBAAI;IACJC,cAAK,GAAAqB,GAAA;EAAA,CACL,SAAM;IACN;MACA,IAAK,CAAAvB,yBAAA,IAAAG,SAAA,CAAAqB,MAAA,UAAArB,SAAA,CAAAqB,MAAA;IACL,UAAK;MACL,IAAIvB,iBAAA,QAAAC,cAAA;IACJ;EAAK;EACC,OACDyB,aAAA;AAAA;AACA,IACLM,iBAAK;EAAA6C,IACL,EAAI;EAAAC,IACJ,EAAI;EAAAC,GACJ,EAAI;EAAAC,GACJ,EAAI;EAAAC,GACJ,oBAAK;EAAAC,GACL,EAAI;EAAAC,GACJ,oBAAK;EAAAC,EAAA;EAAAC,GAEL,EAAI;EAAAC,IACJ,EAAI;EAAAC,IACD;EAAAC,GACH,EAAI;EAAAC,GACJ,EAAI;EAAAC,EACJ,eAAI;EAAAC,GACJ,EAAI;EAAAC,IACJ,EAAK;EAAAC,GACL,EAAI;EAAAC,GACJ,EAAI;EAAAC,GACJ,EAAI;EAAAC,EACJ,aAAI;EAAAC,EACJ,iBAAI;EAAAC,EAAA;EAAAC,EAEJ,YAAI;EAAAC,GACJ,EAAI;EACNC,EAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createShorthands","shorthands","Object","freeze"],"sources":["../../src/createShorthands.ts"],"sourcesContent":[null],"mappings":"AAIO,SAASA,iBAA6CC,UAAA,EAAkB;EAC7E,OAAOC,MAAA,CAAOC,MAAA,CAAOF,UAAU;AACjC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createShorthands","shorthands","Object","freeze"],"sources":["../../src/createShorthands.ts"],"sourcesContent":[null],"mappings":"AAIO,SAASA,iBAA6CC,UAAA,EAAkB;EAC7E,OAAOC,MAAA,CAAOC,MAAA,CAAOF,UAAU;AACjC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createVariables","createTokens","tokens","process","env","TAMAGUI_TOKEN_PREFIX"],"sources":["../../src/createTokens.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,eAAA,QAAuB;AAGzB,SAASC,aAAqCC,MAAA,EAA0B;EAC7E,OAAOF,eAAA,CAAgBE,MAAA,EAAQC,OAAA,CAAQC,GAAA,CAAIC,oBAAA,IAAwB,GAAG;AACxE","ignoreList":[]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createVariables } from "./createVariables.native.js";
|
|
2
|
+
function createTokens(tokens) {
|
|
3
|
+
var _process_env_TAMAGUI_TOKEN_PREFIX;
|
|
4
|
+
return createVariables(tokens, (_process_env_TAMAGUI_TOKEN_PREFIX = process.env.TAMAGUI_TOKEN_PREFIX) !== null && _process_env_TAMAGUI_TOKEN_PREFIX !== void 0 ? _process_env_TAMAGUI_TOKEN_PREFIX : "t");
|
|
5
|
+
}
|
|
6
|
+
export { createTokens };
|
|
7
|
+
//# sourceMappingURL=createTokens.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createVariables","createTokens","tokens","_process_env_TAMAGUI_TOKEN_PREFIX","process","env","TAMAGUI_TOKEN_PREFIX"],"sources":["../../src/createTokens.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,eAAA,QAAuB;AAGzB,SAASC,aAAqCC,MAAA,EAA0B;EAC7E,IAAAC,iCAA+B;EACjC,OAAAH,eAAA,CAAAE,MAAA,GAAAC,iCAAA,GAAAC,OAAA,CAAAC,GAAA,CAAAC,oBAAA,cAAAH,iCAAA,cAAAA,iCAAA","ignoreList":[]}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { isWeb } from "@hanzogui/constants";
|
|
2
|
+
import { simpleHash } from "@hanzogui/helpers";
|
|
3
|
+
import { getConfig } from "./config.mjs";
|
|
4
|
+
function constructCSSVariableName(name) {
|
|
5
|
+
return `var(--${process.env.TAMAGUI_CSS_VARIABLE_PREFIX || ""}${name})`;
|
|
6
|
+
}
|
|
7
|
+
const createVariable = (props, skipHash = false) => {
|
|
8
|
+
if (!skipHash && isVariable(props)) return props;
|
|
9
|
+
const {
|
|
10
|
+
key,
|
|
11
|
+
name,
|
|
12
|
+
val
|
|
13
|
+
} = props;
|
|
14
|
+
return {
|
|
15
|
+
isVar: true,
|
|
16
|
+
key,
|
|
17
|
+
name: skipHash ? name : simpleHash(name, 40),
|
|
18
|
+
val,
|
|
19
|
+
variable: isWeb ? skipHash ? constructCSSVariableName(name) : createCSSVariable(name) : ""
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
function variableToString(vrble, getValue = false) {
|
|
23
|
+
if (isVariable(vrble)) {
|
|
24
|
+
if (!getValue && isWeb && vrble.variable) {
|
|
25
|
+
return vrble.variable;
|
|
26
|
+
}
|
|
27
|
+
return `${vrble.val}`;
|
|
28
|
+
}
|
|
29
|
+
return `${vrble || ""}`;
|
|
30
|
+
}
|
|
31
|
+
function isVariable(v) {
|
|
32
|
+
return v && typeof v === "object" && "isVar" in v;
|
|
33
|
+
}
|
|
34
|
+
function getVariable(nameOrVariable, group = "size") {
|
|
35
|
+
if (nameOrVariable?.dynamic) {
|
|
36
|
+
return nameOrVariable;
|
|
37
|
+
}
|
|
38
|
+
setDidGetVariableValue(true);
|
|
39
|
+
if (isVariable(nameOrVariable)) {
|
|
40
|
+
return variableToString(nameOrVariable);
|
|
41
|
+
}
|
|
42
|
+
const tokens = getConfig().tokensParsed;
|
|
43
|
+
return variableToString(tokens[group]?.[nameOrVariable] ?? nameOrVariable);
|
|
44
|
+
}
|
|
45
|
+
let accessed = false;
|
|
46
|
+
const setDidGetVariableValue = val => accessed = val;
|
|
47
|
+
const didGetVariableValue = () => accessed;
|
|
48
|
+
function getVariableValue(v, group) {
|
|
49
|
+
if (isVariable(v)) {
|
|
50
|
+
setDidGetVariableValue(true);
|
|
51
|
+
return v.val;
|
|
52
|
+
}
|
|
53
|
+
if (group) {
|
|
54
|
+
const tokens = getConfig().tokensParsed;
|
|
55
|
+
const token = tokens[group]?.[v];
|
|
56
|
+
if (token) {
|
|
57
|
+
setDidGetVariableValue(true);
|
|
58
|
+
return token.val;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return v;
|
|
62
|
+
}
|
|
63
|
+
function getVariableName(v) {
|
|
64
|
+
if (isVariable(v)) return v.name;
|
|
65
|
+
return v;
|
|
66
|
+
}
|
|
67
|
+
function getVariableVariable(v) {
|
|
68
|
+
if (isVariable(v)) return v.variable;
|
|
69
|
+
return v;
|
|
70
|
+
}
|
|
71
|
+
const createCSSVariable = (nameProp, includeVar = true) => {
|
|
72
|
+
if (process.env.NODE_ENV === "development") {
|
|
73
|
+
if (!nameProp || typeof nameProp !== "string") {
|
|
74
|
+
throw new Error(`createCSSVariable expected string, got: ${nameProp}`);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
const name = simpleHash(nameProp, 60);
|
|
78
|
+
return includeVar ? constructCSSVariableName(name) : name;
|
|
79
|
+
};
|
|
80
|
+
function px(value) {
|
|
81
|
+
return {
|
|
82
|
+
val: value,
|
|
83
|
+
needsPx: true
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
export { createCSSVariable, createVariable, didGetVariableValue, getVariable, getVariableName, getVariableValue, getVariableVariable, isVariable, px, setDidGetVariableValue, variableToString };
|
|
87
|
+
//# sourceMappingURL=createVariable.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["isWeb","simpleHash","getConfig","constructCSSVariableName","name","process","env","TAMAGUI_CSS_VARIABLE_PREFIX","createVariable","props","skipHash","isVariable","key","val","isVar","variable","createCSSVariable","variableToString","vrble","getValue","v","getVariable","nameOrVariable","group","dynamic","setDidGetVariableValue","tokens","tokensParsed","accessed","didGetVariableValue","getVariableValue","token","getVariableName","getVariableVariable","nameProp","includeVar","NODE_ENV","Error","px","value","needsPx"],"sources":["../../src/createVariable.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,KAAA,QAAa;AACtB,SAASC,UAAA,QAAkB;AAE3B,SAASC,SAAA,QAAiB;AAQ1B,SAASC,yBAAyBC,IAAA,EAAc;EAC9C,OAAO,SAASC,OAAA,CAAQC,GAAA,CAAIC,2BAAA,IAA+B,EAAE,GAAGH,IAAI;AACtE;AAIO,MAAMI,cAAA,GAAiBA,CAC5BC,KAAA,EACAC,QAAA,GAAW,UACK;EAChB,IAAI,CAACA,QAAA,IAAYC,UAAA,CAAWF,KAAK,GAAG,OAAOA,KAAA;EAC3C,MAAM;IAAEG,GAAA;IAAKR,IAAA;IAAMS;EAAI,IAAIJ,KAAA;EAC3B,OAAO;IACLK,KAAA,EAAO;IACPF,GAAA;IACAR,IAAA,EAAMM,QAAA,GAAWN,IAAA,GAAOH,UAAA,CAAWG,IAAA,EAAM,EAAE;IAC3CS,GAAA;IACAE,QAAA,EAAUf,KAAA,GACNU,QAAA,GACEP,wBAAA,CAAyBC,IAAI,IAC7BY,iBAAA,CAAkBZ,IAAI,IACxB;EACN;AACF;AAGO,SAASa,iBAAiBC,KAAA,EAAaC,QAAA,GAAW,OAAO;EAC9D,IAAIR,UAAA,CAAWO,KAAK,GAAG;IACrB,IAAI,CAACC,QAAA,IAAYnB,KAAA,IAASkB,KAAA,CAAMH,QAAA,EAAU;MACxC,OAAOG,KAAA,CAAMH,QAAA;IACf;IACA,OAAO,GAAGG,KAAA,CAAML,GAAG;EACrB;EACA,OAAO,GAAGK,KAAA,IAAS,EAAE;A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EL,QAAA;EAC5B,OAAOK,CAAA;AACT;AAGO,MAAMJ,iBAAA,GAAoBA,CAACkB,QAAA,EAAkBC,UAAA,GAAa,SAAS;EACxE,IAAI9B,OAAA,CAAQC,GAAA,CAAI8B,QAAA,KAAa,eAAe;IAC1C,IAAI,CAACF,QAAA,IAAY,OAAOA,QAAA,KAAa,UAAU;MAC7C,MAAM,IAAIG,KAAA,CAAM,2CAA2CH,QAAQ,EAAE;IACvE;EACF;EACA,MAAM9B,IAAA,GAAOH,UAAA,CAAWiC,QAAA,EAAU,EAAE;EACpC,OAAOC,UAAA,GAAahC,wBAAA,CAAyBC,IAAI,IAAIA,IAAA;AACvD;AASO,SAASkC,GAAGC,KAAA,EAAwB;EACzC,OAAO;IACL1B,GAAA,EAAK0B,KAAA;IACLC,OAAA,EAAS;EACX;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { isWeb } from "@hanzogui/constants";
|
|
2
|
+
import { simpleHash } from "@hanzogui/helpers";
|
|
3
|
+
import { getConfig } from "./config.native.js";
|
|
4
|
+
function _type_of(obj) {
|
|
5
|
+
"@swc/helpers - typeof";
|
|
6
|
+
|
|
7
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
8
|
+
}
|
|
9
|
+
function constructCSSVariableName(name) {
|
|
10
|
+
return `var(--${process.env.TAMAGUI_CSS_VARIABLE_PREFIX || ""}${name})`;
|
|
11
|
+
}
|
|
12
|
+
var createVariable = function (props) {
|
|
13
|
+
var skipHash = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
|
14
|
+
if (!skipHash && isVariable(props)) return props;
|
|
15
|
+
var {
|
|
16
|
+
key,
|
|
17
|
+
name,
|
|
18
|
+
val
|
|
19
|
+
} = props;
|
|
20
|
+
return {
|
|
21
|
+
isVar: true,
|
|
22
|
+
key,
|
|
23
|
+
name: skipHash ? name : simpleHash(name, 40),
|
|
24
|
+
val,
|
|
25
|
+
variable: isWeb ? skipHash ? constructCSSVariableName(name) : createCSSVariable(name) : ""
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
function variableToString(vrble) {
|
|
29
|
+
var getValue = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
|
30
|
+
if (isVariable(vrble)) {
|
|
31
|
+
if (!getValue && isWeb && vrble.variable) {
|
|
32
|
+
return vrble.variable;
|
|
33
|
+
}
|
|
34
|
+
return `${vrble.val}`;
|
|
35
|
+
}
|
|
36
|
+
return `${vrble || ""}`;
|
|
37
|
+
}
|
|
38
|
+
function isVariable(v) {
|
|
39
|
+
return v && (typeof v === "undefined" ? "undefined" : _type_of(v)) === "object" && "isVar" in v;
|
|
40
|
+
}
|
|
41
|
+
function getVariable(nameOrVariable) {
|
|
42
|
+
var group = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "size";
|
|
43
|
+
var _tokens_group;
|
|
44
|
+
if (nameOrVariable === null || nameOrVariable === void 0 ? void 0 : nameOrVariable.dynamic) {
|
|
45
|
+
return nameOrVariable;
|
|
46
|
+
}
|
|
47
|
+
setDidGetVariableValue(true);
|
|
48
|
+
if (isVariable(nameOrVariable)) {
|
|
49
|
+
return variableToString(nameOrVariable);
|
|
50
|
+
}
|
|
51
|
+
var tokens = getConfig().tokensParsed;
|
|
52
|
+
var _tokens_group_nameOrVariable;
|
|
53
|
+
return variableToString((_tokens_group_nameOrVariable = (_tokens_group = tokens[group]) === null || _tokens_group === void 0 ? void 0 : _tokens_group[nameOrVariable]) !== null && _tokens_group_nameOrVariable !== void 0 ? _tokens_group_nameOrVariable : nameOrVariable);
|
|
54
|
+
}
|
|
55
|
+
var accessed = false;
|
|
56
|
+
var setDidGetVariableValue = function (val) {
|
|
57
|
+
return accessed = val;
|
|
58
|
+
};
|
|
59
|
+
var didGetVariableValue = function () {
|
|
60
|
+
return accessed;
|
|
61
|
+
};
|
|
62
|
+
function getVariableValue(v, group) {
|
|
63
|
+
if (isVariable(v)) {
|
|
64
|
+
setDidGetVariableValue(true);
|
|
65
|
+
return v.val;
|
|
66
|
+
}
|
|
67
|
+
if (group) {
|
|
68
|
+
var _tokens_group;
|
|
69
|
+
var tokens = getConfig().tokensParsed;
|
|
70
|
+
var token = (_tokens_group = tokens[group]) === null || _tokens_group === void 0 ? void 0 : _tokens_group[v];
|
|
71
|
+
if (token) {
|
|
72
|
+
setDidGetVariableValue(true);
|
|
73
|
+
return token.val;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return v;
|
|
77
|
+
}
|
|
78
|
+
function getVariableName(v) {
|
|
79
|
+
if (isVariable(v)) return v.name;
|
|
80
|
+
return v;
|
|
81
|
+
}
|
|
82
|
+
function getVariableVariable(v) {
|
|
83
|
+
if (isVariable(v)) return v.variable;
|
|
84
|
+
return v;
|
|
85
|
+
}
|
|
86
|
+
var createCSSVariable = function (nameProp) {
|
|
87
|
+
var includeVar = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;
|
|
88
|
+
if (process.env.NODE_ENV === "development") {
|
|
89
|
+
if (!nameProp || typeof nameProp !== "string") {
|
|
90
|
+
throw new Error(`createCSSVariable expected string, got: ${nameProp}`);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
var name = simpleHash(nameProp, 60);
|
|
94
|
+
return includeVar ? constructCSSVariableName(name) : name;
|
|
95
|
+
};
|
|
96
|
+
function px(value) {
|
|
97
|
+
return {
|
|
98
|
+
val: value,
|
|
99
|
+
needsPx: true
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
export { createCSSVariable, createVariable, didGetVariableValue, getVariable, getVariableName, getVariableValue, getVariableVariable, isVariable, px, setDidGetVariableValue, variableToString };
|
|
103
|
+
//# sourceMappingURL=createVariable.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["isWeb","simpleHash","getConfig","_type_of","obj","Symbol","constructor","constructCSSVariableName","name","process","env","TAMAGUI_CSS_VARIABLE_PREFIX","createVariable","props","skipHash","arguments","length","isVariable","key","val","isVar","variable","createCSSVariable","variableToString","vrble","getValue","v","getVariable","nameOrVariable","group","_tokens_group","dynamic","setDidGetVariableValue","tokens","tokensParsed","_tokens_group_nameOrVariable","accessed","didGetVariableValue","getVariableValue","token","getVariableName","getVariableVariable","nameProp"],"sources":["../../src/createVariable.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,KAAA,QAAa;AACtB,SAASC,UAAA,QAAkB;AAE3B,SAASC,SAAA,QAAiB;AAQ1B,SAASC,SAAAC,GAAA;EACP,uBAAgB;;EAClB,OAAAA,GAAA,WAAAC,MAAA,oBAAAD,GAAA,CAAAE,WAAA,KAAAD,MAAA,qBAAAD,GAAA;AAIO;AAIL,SAAKG,wBAAuBA,CAAAC,IAAQ;EACpC,OAAM,SAAOC,OAAU,CAAAC,GAAI,CAAAC,2BAAA,SAAAH,IAAA;AAC3B;AAAO,IACLI,cAAO,YAAAA,CAAAC,KAAA;EAAA,IACPC,QAAA,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,iBAAAA,SAAA;EAAA,IACA,CAAAD,QAAM,IAAAG,UAAkB,CAAAJ,KAAA,UAAiBA,KAAE;EAAA,IAC3C;IAAAK,GAAA;IAAAV,IAAA;IAAAW;EAAA,IAAAN,KAAA;EAAA,OACA;IAKFO,KAAA;IACFF,GAAA;IAGOV,IAAA,EAASM,QAAA,GAAAN,IAAA,GAAiBP,UAAa,CAAAO,IAAA,EAAW;IACvDW,GAAI;IACFE,QAAK,EAAArB,KAAA,GAAYc,QAAS,GAAAP,wBAAgB,CAAAC,IAAA,IAAAc,iBAAA,CAAAd,IAAA;EACxC;AAAa;AAEf,SAAAe,gBAAmBA,CAAAC,KAAA;EACrB,IAAAC,QAAA,GAAAV,SAAA,CAAAC,MAAA,QAAAD,SAAA,iBAAAA,SAAA;EACA,IAAAE,UAAU,CAAAO,KAAS,CAAE;IACvB,KAAAC,QAAA,IAAAzB,KAAA,IAAAwB,KAAA,CAAAH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G,MAAA,CAAAJ,KAAA,eAAAC,aAAA,uBAAAA,aAAA,CAAAJ,CAAA;IACT,IAAAa,KAAA;MAGaP,sBAAqB;MAC5B,OAAAO,KAAY,CAAApB,GAAA;IACd;EACE;EAAqE,OACvEO,CAAA;AAAA;AAEF,SAAMc,eAAOA,CAAAd,CAAW;EACxB,IAAAT,UAAO,CAAAS,CAAA,UAAaA,CAAA,CAAAlB,IAAA;EACtB,OAAAkB,CAAA;AASO;AACL,SAAOe,oBAAAf,CAAA;EAAA,IACLT,UAAK,CAAAS,CAAA,UAAAA,CAAA,CAAAL,QAAA;EAAA,OACLK,CAAA;AAAS;AAEb,IAAAJ,iBAAA,YAAAA,CAAAoB,QAAA","ignoreList":[]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { isWeb } from "@hanzogui/constants";
|
|
2
|
+
import { simpleHash } from "@hanzogui/helpers";
|
|
3
|
+
import { createVariable, isVariable } from "./createVariable.mjs";
|
|
4
|
+
const cache = /* @__PURE__ */new WeakMap();
|
|
5
|
+
const createVariables = (tokens, parentPath = "", isFont = false) => {
|
|
6
|
+
if (cache.has(tokens)) return tokens;
|
|
7
|
+
const res = {};
|
|
8
|
+
let i = 0;
|
|
9
|
+
for (let keyIn in tokens) {
|
|
10
|
+
i++;
|
|
11
|
+
const val = tokens[keyIn];
|
|
12
|
+
const isPrefixed = keyIn[0] === "$";
|
|
13
|
+
const keyWithPrefix = isPrefixed ? keyIn : `$${keyIn}`;
|
|
14
|
+
const key = isPrefixed ? keyWithPrefix.slice(1) : keyIn;
|
|
15
|
+
if (isVariable(val)) {
|
|
16
|
+
res[key] = val;
|
|
17
|
+
continue;
|
|
18
|
+
}
|
|
19
|
+
const niceKey = simpleHash(key, 1e3);
|
|
20
|
+
const name = parentPath && parentPath !== "t-color" ? `${parentPath}-${niceKey}` : `c-${niceKey}`;
|
|
21
|
+
if (val && typeof val === "object" && "needsPx" in val && "val" in val) {
|
|
22
|
+
const finalValue2 = createVariable({
|
|
23
|
+
val: val.val,
|
|
24
|
+
name,
|
|
25
|
+
key: keyWithPrefix
|
|
26
|
+
});
|
|
27
|
+
if (isWeb) {
|
|
28
|
+
finalValue2.needsPx = val.needsPx;
|
|
29
|
+
}
|
|
30
|
+
res[key] = finalValue2;
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
if (val && typeof val === "object") {
|
|
34
|
+
res[key] = createVariables(tokens[key], name, false
|
|
35
|
+
/* note: don't pass isFont down, we want to avoid it past the first level */);
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
const finalValue = isVariable(val) ? val : createVariable({
|
|
39
|
+
val,
|
|
40
|
+
name,
|
|
41
|
+
key: keyWithPrefix
|
|
42
|
+
});
|
|
43
|
+
res[key] = finalValue;
|
|
44
|
+
}
|
|
45
|
+
cache.set(res, true);
|
|
46
|
+
return res;
|
|
47
|
+
};
|
|
48
|
+
export { createVariables };
|
|
49
|
+
//# sourceMappingURL=createVariables.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["isWeb","simpleHash","createVariable","isVariable","cache","WeakMap","createVariables","tokens","parentPath","isFont","has","res","i","keyIn","val","isPrefixed","keyWithPrefix","key","slice","niceKey","name","finalValue2","needsPx","finalValue","set"],"sources":["../../src/createVariables.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,KAAA,QAAa;AACtB,SAASC,UAAA,QAAkB;AAC3B,SAASC,cAAA,EAAgBC,UAAA,QAAkB;AAe3C,MAAMC,KAAA,GAAQ,mBAAIC,OAAA,CAAQ;AAInB,MAAMC,eAAA,GAAkBA,CAC7BC,MAAA,EACAC,UAAA,GAAa,IACbC,MAAA,GAAS,UACiB;EAC1B,IAAIL,KAAA,CAAMM,GAAA,CAAIH,MAAM,GAAG,OAAOA,MAAA;EAE9B,MAAMI,GAAA,GAAW,CAAC;EAClB,IAAIC,CAAA,GAAI;EACR,SAASC,KAAA,IAASN,MAAA,EAAQ;IACxBK,CAAA;IACA,MA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OA,GAAA;AACT","ignoreList":[]}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { isWeb } from "@hanzogui/constants";
|
|
2
|
+
import { simpleHash } from "@hanzogui/helpers";
|
|
3
|
+
import { createVariable, isVariable } from "./createVariable.native.js";
|
|
4
|
+
function _type_of(obj) {
|
|
5
|
+
"@swc/helpers - typeof";
|
|
6
|
+
|
|
7
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
8
|
+
}
|
|
9
|
+
var cache = /* @__PURE__ */new WeakMap();
|
|
10
|
+
var createVariables = function (tokens) {
|
|
11
|
+
var parentPath = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "",
|
|
12
|
+
isFont = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
|
|
13
|
+
if (cache.has(tokens)) return tokens;
|
|
14
|
+
var res = {};
|
|
15
|
+
var i = 0;
|
|
16
|
+
for (var keyIn in tokens) {
|
|
17
|
+
i++;
|
|
18
|
+
var val = tokens[keyIn];
|
|
19
|
+
var isPrefixed = keyIn[0] === "$";
|
|
20
|
+
var keyWithPrefix = isPrefixed ? keyIn : `$${keyIn}`;
|
|
21
|
+
var key = isPrefixed ? keyWithPrefix.slice(1) : keyIn;
|
|
22
|
+
if (isVariable(val)) {
|
|
23
|
+
res[key] = val;
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
var niceKey = simpleHash(key, 1e3);
|
|
27
|
+
var name = parentPath && parentPath !== "t-color" ? `${parentPath}-${niceKey}` : `c-${niceKey}`;
|
|
28
|
+
if (val && (typeof val === "undefined" ? "undefined" : _type_of(val)) === "object" && "needsPx" in val && "val" in val) {
|
|
29
|
+
var finalValue = createVariable({
|
|
30
|
+
val: val.val,
|
|
31
|
+
name,
|
|
32
|
+
key: keyWithPrefix
|
|
33
|
+
});
|
|
34
|
+
if (isWeb) {
|
|
35
|
+
finalValue.needsPx = val.needsPx;
|
|
36
|
+
}
|
|
37
|
+
res[key] = finalValue;
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
if (val && (typeof val === "undefined" ? "undefined" : _type_of(val)) === "object") {
|
|
41
|
+
res[key] = createVariables(tokens[key], name, false);
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
var finalValue1 = isVariable(val) ? val : createVariable({
|
|
45
|
+
val,
|
|
46
|
+
name,
|
|
47
|
+
key: keyWithPrefix
|
|
48
|
+
});
|
|
49
|
+
res[key] = finalValue1;
|
|
50
|
+
}
|
|
51
|
+
cache.set(res, true);
|
|
52
|
+
return res;
|
|
53
|
+
};
|
|
54
|
+
export { createVariables };
|
|
55
|
+
//# sourceMappingURL=createVariables.native.js.map
|