@hanzogui/web 7.3.3 → 8.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/_withStableStyle.cjs +2 -2
- package/dist/cjs/_withStableStyle.native.js +2 -2
- package/dist/cjs/_withStableStyle.native.js.map +1 -1
- package/dist/cjs/config.cjs +18 -14
- package/dist/cjs/config.native.js +19 -10
- package/dist/cjs/config.native.js.map +1 -1
- package/dist/cjs/constants/constants.cjs +1 -1
- package/dist/cjs/constants/constants.native.js +1 -1
- package/dist/cjs/constants/constants.native.js.map +1 -1
- package/dist/cjs/createComponent.cjs +68 -28
- package/dist/cjs/createComponent.native.js +75 -30
- package/dist/cjs/createComponent.native.js.map +1 -1
- package/dist/cjs/createGui.cjs +1 -1
- package/dist/cjs/createGui.native.js +1 -1
- package/dist/cjs/createGui.native.js.map +1 -1
- package/dist/cjs/eventHandling.cjs +2 -2
- package/dist/cjs/eventHandling.native.js +73 -54
- package/dist/cjs/eventHandling.native.js.map +1 -1
- package/dist/cjs/helpers/createDesignSystem.cjs +2 -2
- package/dist/cjs/helpers/defaultAnimationDriver.cjs +1 -1
- package/dist/cjs/helpers/defaultAnimationDriver.native.js +1 -1
- package/dist/cjs/helpers/expandStyle.cjs +46 -5
- package/dist/cjs/helpers/expandStyle.native.js +36 -30
- package/dist/cjs/helpers/expandStyle.native.js.map +1 -1
- package/dist/cjs/helpers/getGroupPropParts.cjs +1 -1
- package/dist/cjs/helpers/getGroupPropParts.native.js +1 -1
- package/dist/cjs/helpers/getSplitStyles.cjs +76 -31
- package/dist/cjs/helpers/getSplitStyles.native.js +140 -85
- package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/cjs/helpers/getTokenForKey.cjs +5 -5
- package/dist/cjs/helpers/getTokenForKey.native.js +5 -5
- package/dist/cjs/helpers/getTokenForKey.native.js.map +1 -1
- package/dist/cjs/helpers/getVariantExtras.cjs +7 -3
- package/dist/cjs/helpers/getVariantExtras.native.js +7 -3
- package/dist/cjs/helpers/getVariantExtras.native.js.map +1 -1
- package/dist/cjs/helpers/insertStyleRule.cjs +4 -4
- package/dist/cjs/helpers/insertStyleRule.native.js +3 -3
- package/dist/cjs/helpers/insertStyleRule.native.js.map +1 -1
- package/dist/cjs/helpers/mainThreadPressEvents.native.js +32 -4
- package/dist/cjs/helpers/mainThreadPressEvents.native.js.map +1 -1
- package/dist/cjs/helpers/normalizeStyle.cjs +22 -1
- package/dist/cjs/helpers/normalizeStyle.native.js +41 -1
- package/dist/cjs/helpers/normalizeStyle.native.js.map +1 -1
- package/dist/cjs/helpers/platformResolveValue.cjs +1 -1
- package/dist/cjs/helpers/platformResolveValue.native.js +1 -1
- package/dist/cjs/helpers/platformResolveValue.native.js.map +1 -1
- package/dist/cjs/helpers/pointerEvents.native.js +26 -20
- package/dist/cjs/helpers/pointerEvents.native.js.map +1 -1
- package/dist/cjs/helpers/propMapper.cjs +31 -7
- package/dist/cjs/helpers/propMapper.native.js +70 -20
- package/dist/cjs/helpers/propMapper.native.js.map +1 -1
- package/dist/cjs/helpers/resolveSafeArea.native.js +1 -1
- package/dist/cjs/helpers/resolveSafeArea.native.js.map +1 -1
- package/dist/cjs/helpers/styleOriginalValues.cjs +28 -0
- package/dist/cjs/helpers/styleOriginalValues.native.js +31 -0
- package/dist/cjs/helpers/styleOriginalValues.native.js.map +1 -0
- package/dist/cjs/helpers/styleProvenance.cjs +43 -0
- package/dist/cjs/helpers/styleProvenance.native.js +46 -0
- package/dist/cjs/helpers/styleProvenance.native.js.map +1 -0
- package/dist/cjs/helpers/useRenderElement.native.js.map +1 -1
- package/dist/cjs/helpers/wrapStyleTags.cjs +35 -11
- package/dist/cjs/helpers/wrapStyleTags.native.js.map +1 -1
- package/dist/cjs/hooks/getThemeProxied.cjs +1 -1
- package/dist/cjs/hooks/getThemeProxied.native.js +4 -4
- package/dist/cjs/hooks/getThemeProxied.native.js.map +1 -1
- package/dist/cjs/hooks/useComponentState.cjs +29 -3
- package/dist/cjs/hooks/useComponentState.native.js +30 -4
- package/dist/cjs/hooks/useComponentState.native.js.map +1 -1
- package/dist/cjs/hooks/useMedia.cjs +107 -42
- package/dist/cjs/hooks/useMedia.native.js +149 -60
- package/dist/cjs/hooks/useMedia.native.js.map +1 -1
- package/dist/cjs/hooks/useTheme.cjs +18 -5
- package/dist/cjs/hooks/useTheme.native.js +19 -5
- package/dist/cjs/hooks/useTheme.native.js.map +1 -1
- package/dist/cjs/hooks/useThemeState.cjs +143 -72
- package/dist/cjs/hooks/useThemeState.native.js +155 -74
- package/dist/cjs/hooks/useThemeState.native.js.map +1 -1
- package/dist/cjs/index.cjs +3 -0
- package/dist/cjs/index.native.js +3 -0
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/opacityModifier.test-d.cjs +36 -0
- package/dist/cjs/opacityModifier.test-d.native.js +39 -0
- package/dist/cjs/opacityModifier.test-d.native.js.map +1 -0
- package/dist/cjs/styledNonStyleProps.test-d.cjs +63 -0
- package/dist/cjs/styledNonStyleProps.test-d.native.js +66 -0
- package/dist/cjs/styledNonStyleProps.test-d.native.js.map +1 -0
- package/dist/cjs/views/GuiProvider.cjs +2 -2
- package/dist/cjs/views/Text.cjs +1 -0
- package/dist/cjs/views/Text.native.js +1 -0
- package/dist/cjs/views/Text.native.js.map +1 -1
- package/dist/cjs/views/Theme.cjs +1 -1
- package/dist/cjs/views/Theme.native.js +1 -1
- package/dist/cjs/views/Theme.native.js.map +1 -1
- package/dist/cjs/views/View.native.js.map +1 -1
- package/dist/esm/_withStableStyle.mjs +2 -2
- package/dist/esm/_withStableStyle.mjs.map +1 -1
- package/dist/esm/_withStableStyle.native.js +2 -2
- package/dist/esm/_withStableStyle.native.js.map +1 -1
- package/dist/esm/config.mjs +18 -20
- package/dist/esm/config.mjs.map +1 -1
- package/dist/esm/config.native.js +19 -11
- package/dist/esm/config.native.js.map +1 -1
- package/dist/esm/constants/constants.mjs +1 -1
- package/dist/esm/constants/constants.native.js +1 -1
- package/dist/esm/constants/constants.native.js.map +1 -1
- package/dist/esm/createComponent.mjs +74 -35
- package/dist/esm/createComponent.mjs.map +1 -1
- package/dist/esm/createComponent.native.js +90 -42
- package/dist/esm/createComponent.native.js.map +1 -1
- package/dist/esm/createGui.mjs +6 -6
- package/dist/esm/createGui.mjs.map +1 -1
- package/dist/esm/createGui.native.js +6 -6
- package/dist/esm/createGui.native.js.map +1 -1
- package/dist/esm/eventHandling.mjs +2 -2
- package/dist/esm/eventHandling.mjs.map +1 -1
- package/dist/esm/eventHandling.native.js +74 -55
- package/dist/esm/eventHandling.native.js.map +1 -1
- package/dist/esm/helpers/createDesignSystem.mjs +2 -2
- package/dist/esm/helpers/createDesignSystem.mjs.map +1 -1
- package/dist/esm/helpers/createDesignSystem.native.js +1 -2
- package/dist/esm/helpers/createDesignSystem.native.js.map +1 -1
- package/dist/esm/helpers/defaultAnimationDriver.mjs +1 -1
- package/dist/esm/helpers/defaultAnimationDriver.mjs.map +1 -1
- package/dist/esm/helpers/defaultAnimationDriver.native.js +1 -1
- package/dist/esm/helpers/expandStyle.mjs +47 -8
- package/dist/esm/helpers/expandStyle.mjs.map +1 -1
- package/dist/esm/helpers/expandStyle.native.js +36 -30
- package/dist/esm/helpers/expandStyle.native.js.map +1 -1
- package/dist/esm/helpers/expandStyles.mjs.map +1 -1
- package/dist/esm/helpers/expandStyles.native.js.map +1 -1
- package/dist/esm/helpers/getGroupPropParts.mjs +1 -1
- package/dist/esm/helpers/getGroupPropParts.mjs.map +1 -1
- package/dist/esm/helpers/getGroupPropParts.native.js +1 -1
- package/dist/esm/helpers/getSplitStyles.mjs +86 -45
- package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
- package/dist/esm/helpers/getSplitStyles.native.js +146 -98
- package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/esm/helpers/getThemeCSSRules.mjs +1 -1
- package/dist/esm/helpers/getThemeCSSRules.mjs.map +1 -1
- package/dist/esm/helpers/getTokenForKey.mjs +5 -5
- package/dist/esm/helpers/getTokenForKey.mjs.map +1 -1
- package/dist/esm/helpers/getTokenForKey.native.js +5 -5
- package/dist/esm/helpers/getTokenForKey.native.js.map +1 -1
- package/dist/esm/helpers/getVariantExtras.mjs +7 -3
- package/dist/esm/helpers/getVariantExtras.mjs.map +1 -1
- package/dist/esm/helpers/getVariantExtras.native.js +7 -3
- package/dist/esm/helpers/getVariantExtras.native.js.map +1 -1
- package/dist/esm/helpers/insertStyleRule.mjs +4 -6
- package/dist/esm/helpers/insertStyleRule.mjs.map +1 -1
- package/dist/esm/helpers/insertStyleRule.native.js +0 -26
- package/dist/esm/helpers/insertStyleRule.native.js.map +1 -1
- package/dist/esm/helpers/isActivePlatform.mjs.map +1 -1
- package/dist/esm/helpers/isActivePlatform.native.js.map +1 -1
- package/dist/esm/helpers/log.mjs.map +1 -1
- package/dist/esm/helpers/log.native.js.map +1 -1
- package/dist/esm/helpers/mainThreadPressEvents.native.js +32 -4
- package/dist/esm/helpers/mainThreadPressEvents.native.js.map +1 -1
- package/dist/esm/helpers/normalizeStyle.mjs +22 -1
- package/dist/esm/helpers/normalizeStyle.mjs.map +1 -1
- package/dist/esm/helpers/normalizeStyle.native.js +41 -1
- package/dist/esm/helpers/normalizeStyle.native.js.map +1 -1
- package/dist/esm/helpers/platformResolveValue.mjs +1 -1
- package/dist/esm/helpers/platformResolveValue.mjs.map +1 -1
- package/dist/esm/helpers/platformResolveValue.native.js +1 -1
- package/dist/esm/helpers/platformResolveValue.native.js.map +1 -1
- package/dist/esm/helpers/pointerEvents.native.js +26 -20
- package/dist/esm/helpers/pointerEvents.native.js.map +1 -1
- package/dist/esm/helpers/propMapper.mjs +32 -11
- package/dist/esm/helpers/propMapper.mjs.map +1 -1
- package/dist/esm/helpers/propMapper.native.js +71 -22
- package/dist/esm/helpers/propMapper.native.js.map +1 -1
- package/dist/esm/helpers/resolveSafeArea.native.js +1 -1
- package/dist/esm/helpers/resolveSafeArea.native.js.map +1 -1
- package/dist/esm/helpers/skipProps.mjs +0 -1
- package/dist/esm/helpers/skipProps.mjs.map +1 -1
- package/dist/esm/helpers/skipProps.native.js +0 -1
- package/dist/esm/helpers/skipProps.native.js.map +1 -1
- package/dist/esm/helpers/styleOriginalValues.mjs +3 -0
- package/dist/esm/helpers/styleOriginalValues.mjs.map +1 -0
- package/dist/esm/helpers/styleOriginalValues.native.js +3 -0
- package/dist/esm/helpers/styleOriginalValues.native.js.map +1 -0
- package/dist/esm/helpers/styleProvenance.mjs +16 -0
- package/dist/esm/helpers/styleProvenance.mjs.map +1 -0
- package/dist/esm/helpers/styleProvenance.native.js +16 -0
- package/dist/esm/helpers/styleProvenance.native.js.map +1 -0
- package/dist/esm/helpers/useRenderElement.mjs.map +1 -1
- package/dist/esm/helpers/useRenderElement.native.js.map +1 -1
- package/dist/esm/helpers/wrapStyleTags.mjs +35 -11
- package/dist/esm/helpers/wrapStyleTags.mjs.map +1 -1
- package/dist/esm/helpers/wrapStyleTags.native.js +0 -2
- package/dist/esm/helpers/wrapStyleTags.native.js.map +1 -1
- package/dist/esm/hooks/getThemeProxied.mjs +2 -5
- package/dist/esm/hooks/getThemeProxied.mjs.map +1 -1
- package/dist/esm/hooks/getThemeProxied.native.js +5 -5
- package/dist/esm/hooks/getThemeProxied.native.js.map +1 -1
- package/dist/esm/hooks/useComponentState.mjs +31 -5
- package/dist/esm/hooks/useComponentState.mjs.map +1 -1
- package/dist/esm/hooks/useComponentState.native.js +32 -6
- package/dist/esm/hooks/useComponentState.native.js.map +1 -1
- package/dist/esm/hooks/useMedia.mjs +108 -43
- package/dist/esm/hooks/useMedia.mjs.map +1 -1
- package/dist/esm/hooks/useMedia.native.js +150 -61
- package/dist/esm/hooks/useMedia.native.js.map +1 -1
- package/dist/esm/hooks/useTheme.mjs +18 -5
- package/dist/esm/hooks/useTheme.mjs.map +1 -1
- package/dist/esm/hooks/useTheme.native.js +19 -5
- package/dist/esm/hooks/useTheme.native.js.map +1 -1
- package/dist/esm/hooks/useThemeState.mjs +142 -71
- package/dist/esm/hooks/useThemeState.mjs.map +1 -1
- package/dist/esm/hooks/useThemeState.native.js +154 -73
- package/dist/esm/hooks/useThemeState.native.js.map +1 -1
- package/dist/esm/index.js +4 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.mjs +4 -4
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/index.native.js +4 -4
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/insertFont.mjs.map +1 -1
- package/dist/esm/insertFont.native.js +0 -1
- package/dist/esm/insertFont.native.js.map +1 -1
- package/dist/esm/opacityModifier.test-d.mjs +37 -0
- package/dist/esm/opacityModifier.test-d.mjs.map +1 -0
- package/dist/esm/opacityModifier.test-d.native.js +37 -0
- package/dist/esm/opacityModifier.test-d.native.js.map +1 -0
- package/dist/esm/styledNonStyleProps.test-d.mjs +64 -0
- package/dist/esm/styledNonStyleProps.test-d.mjs.map +1 -0
- package/dist/esm/styledNonStyleProps.test-d.native.js +64 -0
- package/dist/esm/styledNonStyleProps.test-d.native.js.map +1 -0
- package/dist/esm/views/GuiProvider.mjs +2 -2
- package/dist/esm/views/GuiProvider.mjs.map +1 -1
- package/dist/esm/views/GuiProvider.native.js +6 -6
- package/dist/esm/views/GuiProvider.native.js.map +1 -1
- package/dist/esm/views/Text.mjs +1 -0
- package/dist/esm/views/Text.mjs.map +1 -1
- package/dist/esm/views/Text.native.js +1 -0
- package/dist/esm/views/Text.native.js.map +1 -1
- package/dist/esm/views/Theme.mjs +1 -1
- package/dist/esm/views/Theme.mjs.map +1 -1
- package/dist/esm/views/Theme.native.js +1 -1
- package/dist/esm/views/Theme.native.js.map +1 -1
- package/dist/esm/views/ThemeProvider.mjs.map +1 -1
- package/dist/esm/views/ThemeProvider.native.js +2 -4
- package/dist/esm/views/ThemeProvider.native.js.map +1 -1
- package/dist/esm/views/View.mjs.map +1 -1
- package/dist/esm/views/View.native.js.map +1 -1
- package/inject-styles/index.cjs +2 -0
- package/inject-styles/index.js +2 -0
- package/package.json +43 -42
- package/src/_withStableStyle.tsx +9 -3
- package/src/config.ts +24 -14
- package/src/constants/accessibilityDirectMap.tsx +1 -1
- package/src/constants/constants.ts +1 -1
- package/src/createComponent.tsx +162 -33
- package/src/createGui.ts +2 -2
- package/src/eventHandling.native.ts +143 -52
- package/src/eventHandling.ts +4 -2
- package/src/helpers/createDesignSystem.ts +2 -2
- package/src/helpers/createMediaStyle.ts +1 -1
- package/src/helpers/defaultAnimationDriver.tsx +1 -1
- package/src/helpers/expandStyle.ts +108 -40
- package/src/helpers/getGroupPropParts.ts +1 -1
- package/src/helpers/getSplitStyles.tsx +178 -72
- package/src/helpers/getTokenForKey.ts +5 -5
- package/src/helpers/getVariantExtras.tsx +5 -4
- package/src/helpers/insertStyleRule.tsx +7 -7
- package/src/helpers/mainThreadPressEvents.native.ts +42 -2
- package/src/helpers/mergeProps.ts +1 -1
- package/src/helpers/normalizeStyle.ts +23 -1
- package/src/helpers/platformResolveValue.native.ts +4 -1
- package/src/helpers/platformResolveValue.ts +5 -1
- package/src/helpers/pointerEvents.native.ts +26 -19
- package/src/helpers/propMapper.ts +61 -6
- package/src/helpers/resolveSafeArea.native.ts +1 -1
- package/src/helpers/styleOriginalValues.ts +2 -0
- package/src/helpers/styleProvenance.ts +49 -0
- package/src/helpers/useRenderElement.tsx +1 -4
- package/src/helpers/wrapStyleTags.tsx +63 -20
- package/src/hooks/getThemeProxied.ts +14 -8
- package/src/hooks/useComponentState.ts +56 -4
- package/src/hooks/useMedia.tsx +156 -43
- package/src/hooks/useTheme.tsx +28 -6
- package/src/hooks/useThemeState.ts +284 -142
- package/src/index.ts +9 -1
- package/src/interfaces/GuiComponentPropsBaseBase.tsx +3 -9
- package/src/opacityModifier.test-d.ts +65 -0
- package/src/styled.tsx +1 -1
- package/src/styledNonStyleProps.test-d.ts +106 -0
- package/src/types.tsx +125 -36
- package/src/views/GuiProvider.tsx +2 -2
- package/src/views/Text.tsx +1 -0
- package/src/views/Theme.tsx +4 -1
- package/src/views/View.tsx +1 -6
- package/types/_withStableStyle.d.ts.map +1 -1
- package/types/config.d.ts +3 -1
- package/types/config.d.ts.map +1 -1
- package/types/constants/constants.d.ts +1 -1
- package/types/constants/constants.d.ts.map +1 -1
- package/types/contexts/ComponentContext.d.ts +1 -1
- package/types/contexts/ComponentContext.d.ts.map +1 -1
- package/types/createComponent.d.ts.map +1 -1
- package/types/eventHandling.d.ts +2 -2
- package/types/eventHandling.d.ts.map +1 -1
- package/types/eventHandling.native.d.ts +3 -3
- package/types/eventHandling.native.d.ts.map +1 -1
- package/types/helpers/expandStyle.d.ts +2 -1
- package/types/helpers/expandStyle.d.ts.map +1 -1
- package/types/helpers/getSplitStyles.d.ts +4 -2
- package/types/helpers/getSplitStyles.d.ts.map +1 -1
- package/types/helpers/getVariantExtras.d.ts.map +1 -1
- package/types/helpers/mainThreadPressEvents.native.d.ts.map +1 -1
- package/types/helpers/normalizeStyle.d.ts.map +1 -1
- package/types/helpers/platformResolveValue.d.ts.map +1 -1
- package/types/helpers/platformResolveValue.native.d.ts.map +1 -1
- package/types/helpers/pointerEvents.native.d.ts.map +1 -1
- package/types/helpers/propMapper.d.ts.map +1 -1
- package/types/helpers/styleOriginalValues.d.ts +2 -0
- package/types/helpers/styleOriginalValues.d.ts.map +1 -0
- package/types/helpers/styleProvenance.d.ts +11 -0
- package/types/helpers/styleProvenance.d.ts.map +1 -0
- package/types/helpers/useRenderElement.d.ts.map +1 -1
- package/types/helpers/wrapStyleTags.d.ts +1 -1
- package/types/helpers/wrapStyleTags.d.ts.map +1 -1
- package/types/hooks/getThemeProxied.d.ts.map +1 -1
- package/types/hooks/useComponentState.d.ts +4 -3
- package/types/hooks/useComponentState.d.ts.map +1 -1
- package/types/hooks/useMedia.d.ts.map +1 -1
- package/types/hooks/useTheme.d.ts +1 -1
- package/types/hooks/useTheme.d.ts.map +1 -1
- package/types/hooks/useThemeState.d.ts +1 -1
- package/types/hooks/useThemeState.d.ts.map +1 -1
- package/types/index.d.ts +3 -3
- package/types/index.d.ts.map +1 -1
- package/types/interfaces/GuiComponentPropsBaseBase.d.ts +2 -2
- package/types/interfaces/GuiComponentPropsBaseBase.d.ts.map +1 -1
- package/types/types.d.ts +33 -16
- package/types/types.d.ts.map +1 -1
- package/types/views/Configuration.d.ts +1 -1
- package/types/views/Configuration.d.ts.map +1 -1
- package/types/views/FontLanguage.d.ts +1 -1
- package/types/views/FontLanguage.native.d.ts +1 -2
- package/types/views/FontLanguage.native.d.ts.map +1 -1
- package/types/views/GuiProvider.d.ts +1 -2
- package/types/views/GuiProvider.d.ts.map +1 -1
- package/types/views/GuiRoot.d.ts +1 -1
- package/types/views/GuiRoot.d.ts.map +1 -1
- package/types/views/Slot.d.ts +1 -1
- package/types/views/Text.d.ts +1 -1
- package/types/views/Text.d.ts.map +1 -1
- package/types/views/Theme.d.ts.map +1 -1
- package/types/views/ThemeProvider.d.ts +1 -1
- package/types/views/ThemeProvider.d.ts.map +1 -1
- package/types/views/View.d.ts +1 -1
- package/types/views/View.d.ts.map +1 -1
- package/LICENSE +0 -42
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Regression type tests for issue #4010.
|
|
3
|
+
*
|
|
4
|
+
* When a config's `Themes` type carries a string index signature (which the generic
|
|
5
|
+
* config and many real configs do, e.g. @hanzogui/config), `keyof Themes` resolves to
|
|
6
|
+
* `string` and `ThemeMediaKeys` used to become `$theme-${string}`. that template-literal
|
|
7
|
+
* key collapsed the whole `WithMediaProps` mapped type into a `[key: string]` index
|
|
8
|
+
* signature, which then swallowed every non-style prop on a styled() component (onPress,
|
|
9
|
+
* onPressIn, children, ...) and even the styled() options object. the public type then
|
|
10
|
+
* typed `onPress`/`children` as the style token union instead of a function / react node.
|
|
11
|
+
*
|
|
12
|
+
* the index-signature collapse only surfaces against the built declarations a downstream
|
|
13
|
+
* project consumes (where `keyof Themes` becomes literally `string`). these tests pin the
|
|
14
|
+
* root-cause type (`ThemeMediaKeys`) directly so the regression is caught from source, and
|
|
15
|
+
* also assert the resulting styled() public props stay correct.
|
|
16
|
+
*
|
|
17
|
+
* Run with: bun run test:web
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import { describe, expectTypeOf, test } from 'vitest'
|
|
21
|
+
import { styled } from './styled'
|
|
22
|
+
import { createStyledContext } from './helpers/createStyledContext'
|
|
23
|
+
import { View } from './views/View'
|
|
24
|
+
import { Text } from './views/Text'
|
|
25
|
+
import type { GetProps, ThemeMediaKeys } from './types'
|
|
26
|
+
|
|
27
|
+
// builds a mapped type from a key union, mirroring how WithMediaProps maps over its keys
|
|
28
|
+
type IndexedBy<K extends PropertyKey> = { [P in K]?: number }
|
|
29
|
+
type HasStringIndex<T> = string extends keyof T ? true : false
|
|
30
|
+
|
|
31
|
+
describe('issue #4010 - ThemeMediaKeys must not collapse to a string index', () => {
|
|
32
|
+
test('a loose Themes (keyof = string) yields no theme media keys', () => {
|
|
33
|
+
// root cause: without the guard this was `$theme-${string}`, a template-literal key
|
|
34
|
+
// that turns any mapped type over it into a `[key: string]` index signature
|
|
35
|
+
expectTypeOf<ThemeMediaKeys<string>>().toEqualTypeOf<never>()
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
test('mapping over the loose-Themes result introduces no string index signature', () => {
|
|
39
|
+
expectTypeOf<
|
|
40
|
+
HasStringIndex<IndexedBy<ThemeMediaKeys<string>>>
|
|
41
|
+
>().toEqualTypeOf<false>()
|
|
42
|
+
})
|
|
43
|
+
|
|
44
|
+
test('concrete themes still produce usable $theme- keys, sub-themes excluded', () => {
|
|
45
|
+
expectTypeOf<ThemeMediaKeys<'light' | 'dark' | 'light_red'>>().toEqualTypeOf<
|
|
46
|
+
'$theme-light' | '$theme-dark'
|
|
47
|
+
>()
|
|
48
|
+
})
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
describe('issue #4010 - non-style props survive styled()', () => {
|
|
52
|
+
// exact repro shape from the official "how to build a button" guide
|
|
53
|
+
const ButtonContext = createStyledContext({ size: '$md' as any })
|
|
54
|
+
|
|
55
|
+
const ButtonFrame = styled(View, {
|
|
56
|
+
name: 'Button',
|
|
57
|
+
context: ButtonContext,
|
|
58
|
+
variants: { size: { $md: { padding: '$3' } } } as const,
|
|
59
|
+
defaultVariants: { size: '$md' },
|
|
60
|
+
})
|
|
61
|
+
|
|
62
|
+
const ButtonText = styled(Text, { name: 'ButtonText', context: ButtonContext })
|
|
63
|
+
|
|
64
|
+
type ButtonFrameProps = GetProps<typeof ButtonFrame>
|
|
65
|
+
type ButtonTextProps = GetProps<typeof ButtonText>
|
|
66
|
+
|
|
67
|
+
test('styled() public props have no string index signature', () => {
|
|
68
|
+
expectTypeOf<HasStringIndex<ButtonFrameProps>>().toEqualTypeOf<false>()
|
|
69
|
+
expectTypeOf<HasStringIndex<ButtonTextProps>>().toEqualTypeOf<false>()
|
|
70
|
+
})
|
|
71
|
+
|
|
72
|
+
test('onPress and press handlers are functions, not style values', () => {
|
|
73
|
+
expectTypeOf<ButtonFrameProps['onPress']>().toMatchTypeOf<
|
|
74
|
+
((event: any) => void) | null | undefined
|
|
75
|
+
>()
|
|
76
|
+
expectTypeOf<ButtonFrameProps['onPressIn']>().toMatchTypeOf<
|
|
77
|
+
((event: any) => void) | null | undefined
|
|
78
|
+
>()
|
|
79
|
+
expectTypeOf<ButtonFrameProps['onPressOut']>().toMatchTypeOf<
|
|
80
|
+
((event: any) => void) | null | undefined
|
|
81
|
+
>()
|
|
82
|
+
expectTypeOf<ButtonFrameProps['onLongPress']>().toMatchTypeOf<
|
|
83
|
+
((event: any) => void) | null | undefined
|
|
84
|
+
>()
|
|
85
|
+
})
|
|
86
|
+
|
|
87
|
+
test('children accepts react nodes on styled(Text) and styled(View)', () => {
|
|
88
|
+
expectTypeOf<'hello'>().toMatchTypeOf<ButtonTextProps['children']>()
|
|
89
|
+
expectTypeOf<'hello'>().toMatchTypeOf<ButtonFrameProps['children']>()
|
|
90
|
+
})
|
|
91
|
+
|
|
92
|
+
test('plain styled(View) without context/variants keeps onPress + children', () => {
|
|
93
|
+
const Plain = styled(View, {})
|
|
94
|
+
type PlainProps = GetProps<typeof Plain>
|
|
95
|
+
expectTypeOf<HasStringIndex<PlainProps>>().toEqualTypeOf<false>()
|
|
96
|
+
expectTypeOf<PlainProps['onPress']>().toMatchTypeOf<
|
|
97
|
+
((event: any) => void) | null | undefined
|
|
98
|
+
>()
|
|
99
|
+
expectTypeOf<'child'>().toMatchTypeOf<PlainProps['children']>()
|
|
100
|
+
})
|
|
101
|
+
|
|
102
|
+
test('style + variant props still resolve', () => {
|
|
103
|
+
expectTypeOf<ButtonFrameProps>().toHaveProperty('size')
|
|
104
|
+
expectTypeOf<ButtonFrameProps>().toHaveProperty('hoverStyle')
|
|
105
|
+
})
|
|
106
|
+
})
|
package/src/types.tsx
CHANGED
|
@@ -298,13 +298,13 @@ export type GuiComponentPropsBaseBase = {
|
|
|
298
298
|
|
|
299
299
|
/**
|
|
300
300
|
* Marks this component as a group for use in styling children based on parents named group
|
|
301
|
-
* See: https://
|
|
301
|
+
* See: https://hanzogui.dev/docs/intro/props
|
|
302
302
|
*/
|
|
303
303
|
group?: GroupNames | boolean
|
|
304
304
|
|
|
305
305
|
/**
|
|
306
306
|
* Works only alongside group, when children of the group are using container based sizing on native you can hide them until parent is measured.
|
|
307
|
-
* See: https://
|
|
307
|
+
* See: https://hanzogui.dev/docs/intro/props
|
|
308
308
|
*/
|
|
309
309
|
untilMeasured?: 'hide' | 'show'
|
|
310
310
|
|
|
@@ -441,6 +441,13 @@ export type ThemeState = {
|
|
|
441
441
|
theme: ThemeParsed
|
|
442
442
|
parentName?: string
|
|
443
443
|
isInverse?: boolean
|
|
444
|
+
// cumulative count of scheme inversions from the root down to this state.
|
|
445
|
+
// isInverse only compares to the immediate parent, so a sub-theme that keeps
|
|
446
|
+
// its parent's scheme (e.g. dark_blue under dark) has isInverse=false even
|
|
447
|
+
// though the whole subtree is inverted vs the root/OS. `inverses > 0` means
|
|
448
|
+
// "this subtree forced a scheme away from the OS somewhere above" and must not
|
|
449
|
+
// use the DynamicColorIOS scheme-optimization (which always follows the OS).
|
|
450
|
+
inverses?: number
|
|
444
451
|
isNew?: boolean
|
|
445
452
|
parentId?: string
|
|
446
453
|
scheme?: 'light' | 'dark'
|
|
@@ -528,8 +535,7 @@ export type GuiTextElement = (HTMLElement & GuiElementMethods) | RNText
|
|
|
528
535
|
* const ref = useRef<GuiWebElement<HTMLInputElement>>(null)
|
|
529
536
|
* // ref.current has both HTMLInputElement props and GuiElementMethods
|
|
530
537
|
*/
|
|
531
|
-
export type GuiWebElement<T extends HTMLElement = HTMLElement> = T &
|
|
532
|
-
GuiElementMethods
|
|
538
|
+
export type GuiWebElement<T extends HTMLElement = HTMLElement> = T & GuiElementMethods
|
|
533
539
|
|
|
534
540
|
export type DebugProp = boolean | 'break' | 'verbose' | 'visualize' | 'profile'
|
|
535
541
|
|
|
@@ -556,7 +562,7 @@ export type LoadedComponents = {
|
|
|
556
562
|
|
|
557
563
|
export type GuiProjectInfo = {
|
|
558
564
|
components: LoadedComponents[]
|
|
559
|
-
|
|
565
|
+
hanzoguiConfig: GuiInternalConfig
|
|
560
566
|
nameToPaths: NameToPaths
|
|
561
567
|
}
|
|
562
568
|
|
|
@@ -596,9 +602,14 @@ export type GuiComponentStateRef = {
|
|
|
596
602
|
hasEverThemed?: boolean | 'wrapped'
|
|
597
603
|
hasEverResetPresence?: boolean
|
|
598
604
|
hasHadEvents?: boolean
|
|
605
|
+
hasRealPressEvents?: boolean
|
|
599
606
|
isListeningToTheme?: boolean
|
|
600
607
|
unPress?: Function
|
|
601
608
|
setStateShallow?: ComponentSetStateShallow
|
|
609
|
+
// hoisted base shallow-setter that always calls the real React setState.
|
|
610
|
+
// kept on its own field so the avoidReRenders wrapper (which overwrites
|
|
611
|
+
// `setStateShallow`) can capture this as its real-re-render escape hatch.
|
|
612
|
+
baseSetStateShallow?: ComponentSetStateShallow
|
|
602
613
|
useStyleListener?: UseStyleListener
|
|
603
614
|
updateStyleListener?: () => void
|
|
604
615
|
|
|
@@ -721,7 +732,7 @@ type TokenifyRecord<A extends object> = {
|
|
|
721
732
|
type CoerceToVariable<A> = A extends Variable ? A : Variable<A>
|
|
722
733
|
|
|
723
734
|
export type GuiBaseTheme = {
|
|
724
|
-
// defined for our
|
|
735
|
+
// defined for our hanzogui kit , we could do this inside `hanzogui`
|
|
725
736
|
// but maybe helpful to have some sort of universally shared things +
|
|
726
737
|
// + enforce if they want their own, redefine in their design sys
|
|
727
738
|
background: VariableColorVal
|
|
@@ -1074,10 +1085,15 @@ type AutocompleteSpecificTokensSetting = boolean | 'except-special'
|
|
|
1074
1085
|
|
|
1075
1086
|
export interface GenericGuiSettings {
|
|
1076
1087
|
/**
|
|
1077
|
-
*
|
|
1078
|
-
*
|
|
1088
|
+
* controls style semantics where React Native/Yoga and CSS differ.
|
|
1089
|
+
*
|
|
1090
|
+
* - "legacy": preserves Gui v1 flex expansion.
|
|
1091
|
+
* - "react-native": follows React Native/Yoga flex and raw numeric lineHeight semantics.
|
|
1092
|
+
* - "web": follows CSS flex and unitless numeric lineHeight semantics.
|
|
1093
|
+
*
|
|
1094
|
+
* @default "web"
|
|
1079
1095
|
*/
|
|
1080
|
-
styleCompat?: 'react-native' | '
|
|
1096
|
+
styleCompat?: 'legacy' | 'react-native' | 'web'
|
|
1081
1097
|
|
|
1082
1098
|
// TODO
|
|
1083
1099
|
/**
|
|
@@ -1087,7 +1103,7 @@ export interface GenericGuiSettings {
|
|
|
1087
1103
|
* By default, Gui processes all style props in order of definition on the
|
|
1088
1104
|
* object. This is a bit strange to most people, but it gets around many
|
|
1089
1105
|
* annoying issues with specificity. You can see our docs on this here:
|
|
1090
|
-
* https://
|
|
1106
|
+
* https://hanzogui.dev/docs/intro/styles#style-order-is-important
|
|
1091
1107
|
*
|
|
1092
1108
|
* But this can be confusing in simple cases, like when you do:
|
|
1093
1109
|
*
|
|
@@ -1390,8 +1406,18 @@ export type MediaQueryKey = keyof Media
|
|
|
1390
1406
|
export type MediaPropKeys = `$${MediaQueryKey}`
|
|
1391
1407
|
export type MediaQueryState = { [key in MediaQueryKey]: boolean }
|
|
1392
1408
|
|
|
1393
|
-
|
|
1394
|
-
|
|
1409
|
+
// guard against a loose `Themes` whose `keyof` collapses to `string` (e.g. a config
|
|
1410
|
+
// whose themes type carries a string index signature). without this, TK becomes `string`
|
|
1411
|
+
// and ThemeMediaKeys becomes `$theme-${string}`, which collapses the whole WithMediaProps
|
|
1412
|
+
// mapped type into a `[key: string]` index signature that then swallows non-style props
|
|
1413
|
+
// like onPress/children. see issue #4010
|
|
1414
|
+
export type ThemeMediaKeys<TK extends keyof Themes = keyof Themes> = TK extends string
|
|
1415
|
+
? string extends TK
|
|
1416
|
+
? never
|
|
1417
|
+
: TK extends `${string}_${string}`
|
|
1418
|
+
? never
|
|
1419
|
+
: `$theme-${TK}`
|
|
1420
|
+
: never
|
|
1395
1421
|
|
|
1396
1422
|
export type PlatformMediaKeys = `$platform-${AllPlatforms}`
|
|
1397
1423
|
|
|
@@ -1552,10 +1578,7 @@ type WebOnlySizeValue =
|
|
|
1552
1578
|
| 'max-content'
|
|
1553
1579
|
| 'min-content'
|
|
1554
1580
|
|
|
1555
|
-
type UserAllowedStyleValuesSetting = Exclude<
|
|
1556
|
-
GuiSettings['allowedStyleValues'],
|
|
1557
|
-
undefined
|
|
1558
|
-
>
|
|
1581
|
+
type UserAllowedStyleValuesSetting = Exclude<GuiSettings['allowedStyleValues'], undefined>
|
|
1559
1582
|
|
|
1560
1583
|
export type GetThemeValueSettingForCategory<
|
|
1561
1584
|
Cat extends keyof AllowedStyleValuesSettingPerCategory,
|
|
@@ -1585,8 +1608,7 @@ export type GetThemeValueFallbackFor<
|
|
|
1585
1608
|
export type ThemeValueFallback =
|
|
1586
1609
|
// for backwards compat with overriding the type we make this either UnionableString
|
|
1587
1610
|
// or never if they don't define any UserAllowedStyleValuesSetting
|
|
1588
|
-
|
|
1589
|
-
| Variable
|
|
1611
|
+
(GuiSettings extends { allowedStyleValues: any } ? never : UnionableString) | Variable
|
|
1590
1612
|
|
|
1591
1613
|
export type AllowedValueSettingSpace = GetThemeValueSettingForCategory<'space'>
|
|
1592
1614
|
export type AllowedValueSettingSize = GetThemeValueSettingForCategory<'size'>
|
|
@@ -1683,11 +1705,21 @@ export type SpaceTokens =
|
|
|
1683
1705
|
| GetTokenString<keyof Tokens['space']>
|
|
1684
1706
|
| ThemeValueFallbackSpace
|
|
1685
1707
|
|
|
1686
|
-
|
|
1708
|
+
// base color token strings (before opacity modifier)
|
|
1709
|
+
type ColorTokenBase =
|
|
1687
1710
|
| SpecificTokensSpecial
|
|
1688
1711
|
| GetTokenString<keyof Tokens['color']>
|
|
1689
1712
|
| GetTokenString<keyof ThemeParsed>
|
|
1713
|
+
|
|
1714
|
+
// keep this non-expanded. using `${ColorTokenBase}/${number}` preserves stricter
|
|
1715
|
+
// token names, but large user token/theme unions hit TS2590.
|
|
1716
|
+
type TokenWithOpacity = `$${string}/${number}`
|
|
1717
|
+
|
|
1718
|
+
export type ColorTokens =
|
|
1719
|
+
| ColorTokenBase
|
|
1690
1720
|
| CSSColorNames
|
|
1721
|
+
// opacity modifier: $token/50 → parsed at runtime in getTokenForKey
|
|
1722
|
+
| TokenWithOpacity
|
|
1691
1723
|
|
|
1692
1724
|
export type ZIndexTokens =
|
|
1693
1725
|
| SpecificTokensSpecial
|
|
@@ -1711,18 +1743,14 @@ export type NonSpecificTokens =
|
|
|
1711
1743
|
|
|
1712
1744
|
export type Token =
|
|
1713
1745
|
| NonSpecificTokens
|
|
1714
|
-
| (GuiSettings extends { autocompleteSpecificTokens: false }
|
|
1715
|
-
? never
|
|
1716
|
-
: SpecificTokens)
|
|
1746
|
+
| (GuiSettings extends { autocompleteSpecificTokens: false } ? never : SpecificTokens)
|
|
1717
1747
|
|
|
1718
1748
|
export type ColorStyleProp = ThemeValueFallbackColor | ColorTokens
|
|
1719
1749
|
|
|
1720
1750
|
// fonts
|
|
1721
1751
|
type DefaultFont = GuiSettings['defaultFont']
|
|
1722
1752
|
|
|
1723
|
-
export type Fonts = DefaultFont extends string
|
|
1724
|
-
? GuiConfig['fonts'][DefaultFont]
|
|
1725
|
-
: never
|
|
1753
|
+
export type Fonts = DefaultFont extends string ? GuiConfig['fonts'][DefaultFont] : never
|
|
1726
1754
|
|
|
1727
1755
|
export type Font = ParseFont<Fonts>
|
|
1728
1756
|
|
|
@@ -1753,7 +1781,9 @@ export type FontWeightValues =
|
|
|
1753
1781
|
| 'bold'
|
|
1754
1782
|
| 'normal'
|
|
1755
1783
|
export type FontWeightTokens = `$${GetTokenFontKeysFor<'weight'>}` | FontWeightValues
|
|
1756
|
-
|
|
1784
|
+
// font color tokens also support the opacity modifier
|
|
1785
|
+
type FontColorTokenBase = `$${GetTokenFontKeysFor<'color'>}`
|
|
1786
|
+
export type FontColorTokens = FontColorTokenBase | number | TokenWithOpacity
|
|
1757
1787
|
export type FontLetterSpacingTokens =
|
|
1758
1788
|
| `$${GetTokenFontKeysFor<'letterSpacing'>}`
|
|
1759
1789
|
| number
|
|
@@ -1856,12 +1886,56 @@ export type GetThemeValueForKey<K extends string | symbol | number> =
|
|
|
1856
1886
|
: never
|
|
1857
1887
|
: never)
|
|
1858
1888
|
|
|
1889
|
+
// keys that accept the first-class "safe" value (-> env(safe-area-inset-*) on
|
|
1890
|
+
// web, numeric insets on native). must mirror propEdges in resolveSafeArea.ts.
|
|
1891
|
+
// only the longhands are listed; shorthands (pt, mt, ...) inherit via WithShorthands.
|
|
1892
|
+
export type SafeAreaValueKeys =
|
|
1893
|
+
| 'padding'
|
|
1894
|
+
| 'paddingTop'
|
|
1895
|
+
| 'paddingBottom'
|
|
1896
|
+
| 'paddingLeft'
|
|
1897
|
+
| 'paddingRight'
|
|
1898
|
+
| 'paddingHorizontal'
|
|
1899
|
+
| 'paddingVertical'
|
|
1900
|
+
| 'paddingStart'
|
|
1901
|
+
| 'paddingEnd'
|
|
1902
|
+
| 'paddingBlock'
|
|
1903
|
+
| 'paddingInline'
|
|
1904
|
+
| 'paddingBlockStart'
|
|
1905
|
+
| 'paddingBlockEnd'
|
|
1906
|
+
| 'paddingInlineStart'
|
|
1907
|
+
| 'paddingInlineEnd'
|
|
1908
|
+
| 'margin'
|
|
1909
|
+
| 'marginTop'
|
|
1910
|
+
| 'marginBottom'
|
|
1911
|
+
| 'marginLeft'
|
|
1912
|
+
| 'marginRight'
|
|
1913
|
+
| 'marginHorizontal'
|
|
1914
|
+
| 'marginVertical'
|
|
1915
|
+
| 'marginStart'
|
|
1916
|
+
| 'marginEnd'
|
|
1917
|
+
| 'marginBlock'
|
|
1918
|
+
| 'marginInline'
|
|
1919
|
+
| 'marginBlockStart'
|
|
1920
|
+
| 'marginBlockEnd'
|
|
1921
|
+
| 'marginInlineStart'
|
|
1922
|
+
| 'marginInlineEnd'
|
|
1923
|
+
| 'inset'
|
|
1924
|
+
| 'top'
|
|
1925
|
+
| 'bottom'
|
|
1926
|
+
| 'left'
|
|
1927
|
+
| 'right'
|
|
1928
|
+
| 'start'
|
|
1929
|
+
| 'end'
|
|
1930
|
+
|
|
1859
1931
|
export type WithThemeValues<T extends object> = {
|
|
1860
|
-
[K in keyof T]:
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1932
|
+
[K in keyof T]:
|
|
1933
|
+
| (ThemeValueGet<K> extends never
|
|
1934
|
+
? K extends keyof ExtraBaseProps
|
|
1935
|
+
? T[K]
|
|
1936
|
+
: T[K] | 'unset'
|
|
1937
|
+
: GetThemeValueForKey<K> | Exclude<T[K], string> | 'unset')
|
|
1938
|
+
| (K extends SafeAreaValueKeys ? 'safe' : never)
|
|
1865
1939
|
}
|
|
1866
1940
|
|
|
1867
1941
|
export type NarrowShorthands = Narrow<Shorthands>
|
|
@@ -2427,10 +2501,10 @@ export interface ExtendBaseTextProps {}
|
|
|
2427
2501
|
|
|
2428
2502
|
interface ExtraBaseProps {
|
|
2429
2503
|
/**
|
|
2430
|
-
* Transitions are defined using `createGui` typically in a
|
|
2504
|
+
* Transitions are defined using `createGui` typically in a hanzogui.config.ts file.
|
|
2431
2505
|
* Pass a string transition name here and it uses an animation driver to execute it.
|
|
2432
2506
|
*
|
|
2433
|
-
* See: https://
|
|
2507
|
+
* See: https://hanzogui.dev/docs/core/animations
|
|
2434
2508
|
*/
|
|
2435
2509
|
transition?: TransitionProp | null
|
|
2436
2510
|
|
|
@@ -2677,7 +2751,14 @@ export type GetNonStyledProps<A extends StylableComponent> = A extends {
|
|
|
2677
2751
|
export type GetBaseStyles<A, B> = A extends {
|
|
2678
2752
|
__tama: [any, any, any, infer C, any, any]
|
|
2679
2753
|
}
|
|
2680
|
-
?
|
|
2754
|
+
? // when extending an existing hanzogui component (e.g. styled(View, ...)), it
|
|
2755
|
+
// contributes its base styles. but isText/isInput in the config still means
|
|
2756
|
+
// "this accepts text styles" (it drives runtime validStyles too), so merge
|
|
2757
|
+
// text style props in, otherwise text-only props and their shorthands (e.g.
|
|
2758
|
+
// the `text` shorthand for `textAlign`) get dropped from the type.
|
|
2759
|
+
B extends { isText: true } | { isInput: true }
|
|
2760
|
+
? C & TextStylePropsBase
|
|
2761
|
+
: C
|
|
2681
2762
|
: B extends { isText: true }
|
|
2682
2763
|
? TextStylePropsBase
|
|
2683
2764
|
: B extends { isInput: true }
|
|
@@ -2733,7 +2814,7 @@ export type GuiProviderProps = Omit<ThemeProviderProps, 'children'> & {
|
|
|
2733
2814
|
insets?: { top: number; right: number; bottom: number; left: number }
|
|
2734
2815
|
}
|
|
2735
2816
|
|
|
2736
|
-
export type PropMappedValue = [string, any][] | undefined
|
|
2817
|
+
export type PropMappedValue = [string, any, any?][] | undefined
|
|
2737
2818
|
|
|
2738
2819
|
export type GetStyleState = {
|
|
2739
2820
|
style: TextStyle | null
|
|
@@ -2756,6 +2837,10 @@ export type GetStyleState = {
|
|
|
2756
2837
|
// Track original token values (like '$8') before they get resolved to CSS vars
|
|
2757
2838
|
// This is used to preserve token strings in overriddenContextProps
|
|
2758
2839
|
originalContextPropValues?: Record<string, any>
|
|
2840
|
+
// opt-in dev-tools token provenance: original token string (like '$background')
|
|
2841
|
+
// for each winning base style key, cleared on literal override. stamped onto
|
|
2842
|
+
// the final style object as non-enumerable metadata (see helpers/styleProvenance).
|
|
2843
|
+
tokenProvenance?: Record<string, string>
|
|
2759
2844
|
// Transitions extracted from pseudo-style props (e.g., hoverStyle.transition)
|
|
2760
2845
|
pseudoTransitions?: PseudoTransitions | null
|
|
2761
2846
|
// Resolved animation driver (respects animatedBy prop)
|
|
@@ -3230,7 +3315,11 @@ export type UseAnimationProps = GuiComponentPropsBase & Record<string, any>
|
|
|
3230
3315
|
|
|
3231
3316
|
type UseStyleListener = (
|
|
3232
3317
|
nextStyle: Record<string, unknown>,
|
|
3233
|
-
effectiveTransition?: TransitionProp | null
|
|
3318
|
+
effectiveTransition?: TransitionProp | null,
|
|
3319
|
+
// true while a self pseudo (hover/press/focus) is active. lets avoidReRenders drivers know
|
|
3320
|
+
// the emitted style is a transient pseudo override that a real re-render must not be allowed
|
|
3321
|
+
// to reconcile away, vs the no-pseudo base which renders own again.
|
|
3322
|
+
pseudoActive?: boolean
|
|
3234
3323
|
) => void
|
|
3235
3324
|
export type UseStyleEmitter = (cb: UseStyleListener) => void
|
|
3236
3325
|
|
package/src/views/Text.tsx
CHANGED
package/src/views/Theme.tsx
CHANGED
|
@@ -26,7 +26,10 @@ export const Theme = forwardRef(function Theme(props: ThemeComponentPropsOnly, r
|
|
|
26
26
|
|
|
27
27
|
const isRoot = !!props['_isRoot']
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
// pass forThemeView=true so the descendant-cascade effect is installed —
|
|
30
|
+
// <Theme> pushes themeState.id into ThemeStateContext, so children subscribe
|
|
31
|
+
// under this id and need to be notified when our propsKey changes.
|
|
32
|
+
const [_, themeState] = useThemeWithState(props, isRoot, true)
|
|
30
33
|
|
|
31
34
|
const disableDirectChildTheme = props['disable-child-theme']
|
|
32
35
|
|
package/src/views/View.tsx
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import { validStyles } from '@hanzogui/helpers'
|
|
2
2
|
|
|
3
3
|
import { createComponent } from '../createComponent'
|
|
4
|
-
import type {
|
|
5
|
-
StackNonStyleProps,
|
|
6
|
-
StackStyle,
|
|
7
|
-
StackStyleBase,
|
|
8
|
-
GuiElement,
|
|
9
|
-
} from '../types'
|
|
4
|
+
import type { StackNonStyleProps, StackStyle, StackStyleBase, GuiElement } from '../types'
|
|
10
5
|
|
|
11
6
|
export type View = GuiElement
|
|
12
7
|
export type ViewNonStyleProps = StackNonStyleProps
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_withStableStyle.d.ts","sourceRoot":"","sources":["../src/_withStableStyle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAWzC,eAAO,MAAM,gBAAgB,GAC3B,WAAW,GAAG,EACd,aAAa,CAAC,KAAK,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,KAAK,MAAM,EACvD,eAAe,OAAO,EACtB,eAAe,OAAO,
|
|
1
|
+
{"version":3,"file":"_withStableStyle.d.ts","sourceRoot":"","sources":["../src/_withStableStyle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAWzC,eAAO,MAAM,gBAAgB,GAC3B,WAAW,GAAG,EACd,aAAa,CAAC,KAAK,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,KAAK,MAAM,EACvD,eAAe,OAAO,EACtB,eAAe,OAAO,gFAoDrB,CAAA"}
|
package/types/config.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { AnimationDriver, GenericGuiSettings, GuiInternalConfig, Token, Tokens, TokensMerged } from './types';
|
|
2
|
+
export type StyleCompat = 'legacy' | 'react-native' | 'web';
|
|
2
3
|
export declare const getSetting: <Key extends keyof GenericGuiSettings>(key: Key) => GenericGuiSettings[Key];
|
|
4
|
+
export declare function getStyleCompat(): StyleCompat;
|
|
3
5
|
export declare const setConfig: (next: GuiInternalConfig) => void;
|
|
4
6
|
export declare const setConfigFont: (name: string, font: any, fontParsed: any) => void;
|
|
5
7
|
export declare const getConfig: () => GuiInternalConfig;
|
|
@@ -60,7 +62,7 @@ export declare function setupDev(conf: DevConfig): void;
|
|
|
60
62
|
*
|
|
61
63
|
* @example
|
|
62
64
|
* ```tsx
|
|
63
|
-
* // import loadAnimationDriver from
|
|
65
|
+
* // import loadAnimationDriver from hanzogui
|
|
64
66
|
* // import createAnimations from your preferred driver (e.g. animations-reanimated)
|
|
65
67
|
*
|
|
66
68
|
* const driver = createAnimations({ bouncy: { type: 'spring', damping: 10 } })
|
package/types/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,eAAe,EAEf,kBAAkB,EAClB,iBAAiB,EACjB,KAAK,EACL,MAAM,EACN,YAAY,EACb,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,eAAe,EAEf,kBAAkB,EAClB,iBAAiB,EACjB,KAAK,EACL,MAAM,EACN,YAAY,EACb,MAAM,SAAS,CAAA;AAEhB,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,cAAc,GAAG,KAAK,CAAA;AAoD3D,eAAO,MAAM,UAAU,GAAI,GAAG,SAAS,MAAM,kBAAkB,EAC7D,KAAK,GAAG,KACP,kBAAkB,CAAC,GAAG,CAUxB,CAAA;AAED,wBAAgB,cAAc,IAAI,WAAW,CAG5C;AAED,eAAO,MAAM,SAAS,GAAI,MAAM,iBAAiB,SAIhD,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,MAAM,MAAM,EAAE,MAAM,GAAG,EAAE,YAAY,GAAG,SAOrE,CAAA;AAED,eAAO,MAAM,SAAS,yBAUrB,CAAA;AAED,eAAO,MAAM,cAAc,gCAE1B,CAAA;AAGD,wBAAgB,SAAS,CAAC,CAAC,EAAE,YAAY,QAExC;AAED,eAAO,MAAM,SAAS,GAAI,gBAEvB;IACD;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CACd,KAAG,YASR,CAAA;AAED,eAAO,MAAM,cAAc,GAAI,OAAO,KAAK,EAAE,QAAQ,MAAM,MAAM,oCAUhE,CAAA;AAED,eAAO,MAAM,QAAQ,GAAI,OAAO,KAAK,EAAE,QAAQ,MAAM,MAAM,EAAE,qBAAmB,QAG/E,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,OAAO,KAAK,GAAG,OAAO,GAAG,MAAM,EAAE,QAAQ,MAAM,MAAM,QAGlF,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,SAAS,mBAzCnB;IACD;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,KAAQ,YAoCyB,CAAA;AAElC,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;CAA6C,CAAA;AAEnE,eAAO,MAAM,YAAY,GAAI,KAAK,MAAM,EAAE,OAAO,GAAG,SAOnD,CAAA;AAGD,eAAO,MAAM,OAAO,GAAI,MAAM,MAAM,4DAQnC,CAAA;AAED,KAAK,SAAS,GAAG;IACf,UAAU,CAAC,EACP,OAAO,GACP;QACE,GAAG,CAAC,EAAE,MAAM,CAAA;QACZ,KAAK,CAAC,EAAE,MAAM,CAAA;KACf,CAAA;CACN,CAAA;AAED,eAAO,IAAI,SAAS,EAAE,SAAS,GAAG,SAAS,CAAA;AAE3C,wBAAgB,QAAQ,CAAC,IAAI,EAAE,SAAS,QAIvC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,QAyBxE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const THEME_NAME_SEPARATOR = "_";
|
|
2
2
|
export declare const THEME_CLASSNAME_PREFIX = "t_";
|
|
3
|
-
export declare const FONT_DATA_ATTRIBUTE_NAME = "data-
|
|
3
|
+
export declare const FONT_DATA_ATTRIBUTE_NAME = "data-hanzogui-font";
|
|
4
4
|
export declare const MISSING_THEME_MESSAGE: string;
|
|
5
5
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,MAAM,CAAA;AACvC,eAAO,MAAM,sBAAsB,OAAO,CAAA;AAC1C,eAAO,MAAM,wBAAwB,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,MAAM,CAAA;AACvC,eAAO,MAAM,sBAAsB,OAAO,CAAA;AAC1C,eAAO,MAAM,wBAAwB,uBAAuB,CAAA;AAE5D,eAAO,MAAM,qBAAqB,QASZ,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { ComponentContextI } from '../types';
|
|
2
|
-
export declare const ComponentContext: import("
|
|
2
|
+
export declare const ComponentContext: import("..").StyledContext<ComponentContextI>;
|
|
3
3
|
export declare const useConfiguration: () => ComponentContextI;
|
|
4
4
|
//# sourceMappingURL=ComponentContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentContext.d.ts","sourceRoot":"","sources":["../../src/contexts/ComponentContext.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAEjD,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"ComponentContext.d.ts","sourceRoot":"","sources":["../../src/contexts/ComponentContext.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAEjD,eAAO,MAAM,gBAAgB,+CAO3B,CAAA;AAEF,eAAO,MAAM,gBAAgB,yBAE5B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createComponent.d.ts","sourceRoot":"","sources":["../src/createComponent.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createComponent.d.ts","sourceRoot":"","sources":["../src/createComponent.tsx"],"names":[],"mappings":"AAaA,OAAO,KAA2C,MAAM,OAAO,CAAA;AA6B/D,OAAO,KAAK,EAQV,YAAY,EAEZ,YAAY,EACZ,iBAAiB,EACjB,UAAU,EAOX,MAAM,SAAS,CAAA;AAkChB,KAAK,iBAAiB,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC,CAAA;AAEhF,eAAO,MAAM,kBAAkB,wBAA+B,CAAA;AAwK9D,wBAAgB,eAAe,CAC7B,kBAAkB,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,EAAE,EACnD,GAAG,SAAS,UAAU,GAAG,UAAU,EACnC,SAAS,GAAG,KAAK,EACjB,UAAU,SAAS,MAAM,GAAG,KAAK,EACjC,YAAY,EAAE,YAAY,oEAyoD3B"}
|
package/types/eventHandling.d.ts
CHANGED
|
@@ -19,9 +19,9 @@ export declare function getWebEvents<E extends EventLikeObject>(events: E, webSt
|
|
|
19
19
|
};
|
|
20
20
|
export declare function wrapWithGestureDetector(content: any, _gesture: any, _stateRef: {
|
|
21
21
|
current: any;
|
|
22
|
-
}, _isHOC?: boolean, _isCompositeComponent?: boolean): any;
|
|
22
|
+
}, _isHOC?: boolean, _isCompositeComponent?: boolean, _hasRealPressEvents?: boolean): any;
|
|
23
23
|
export declare function useEvents(_events: any, _viewProps: any, _stateRef: {
|
|
24
24
|
current: any;
|
|
25
|
-
}, _staticConfig: any, _isHOC?: boolean, _isInsideNativeMenu?: boolean, _debugName?: string | null): null;
|
|
25
|
+
}, _staticConfig: any, _isHOC?: boolean, _isInsideNativeMenu?: boolean, _debugName?: string | null, _hasRealPressEvents?: boolean): null;
|
|
26
26
|
export {};
|
|
27
27
|
//# sourceMappingURL=eventHandling.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eventHandling.d.ts","sourceRoot":"","sources":["../src/eventHandling.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAA;AAEzE,KAAK,SAAS,GAAG,MAAM,kBAAkB,CAAA;AACzC,KAAK,eAAe,GAAG;KAAG,GAAG,IAAI,SAAS,CAAC,CAAC,EAAE,GAAG;CAAE,CAAA;AAEnD,wBAAgB,YAAY,CAAC,CAAC,SAAS,eAAe,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,UAAO;;;;;;;;;;EAYjF;AAGD,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,GAAG,EACZ,QAAQ,EAAE,GAAG,EACb,SAAS,EAAE;IAAE,OAAO,EAAE,GAAG,CAAA;CAAE,EAC3B,MAAM,CAAC,EAAE,OAAO,EAChB,qBAAqB,CAAC,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"eventHandling.d.ts","sourceRoot":"","sources":["../src/eventHandling.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAA;AAEzE,KAAK,SAAS,GAAG,MAAM,kBAAkB,CAAA;AACzC,KAAK,eAAe,GAAG;KAAG,GAAG,IAAI,SAAS,CAAC,CAAC,EAAE,GAAG;CAAE,CAAA;AAEnD,wBAAgB,YAAY,CAAC,CAAC,SAAS,eAAe,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,UAAO;;;;;;;;;;EAYjF;AAGD,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,GAAG,EACZ,QAAQ,EAAE,GAAG,EACb,SAAS,EAAE;IAAE,OAAO,EAAE,GAAG,CAAA;CAAE,EAC3B,MAAM,CAAC,EAAE,OAAO,EAChB,qBAAqB,CAAC,EAAE,OAAO,EAC/B,mBAAmB,CAAC,EAAE,OAAO,OAG9B;AAGD,wBAAgB,SAAS,CACvB,OAAO,EAAE,GAAG,EACZ,UAAU,EAAE,GAAG,EACf,SAAS,EAAE;IAAE,OAAO,EAAE,GAAG,CAAA;CAAE,EAC3B,aAAa,EAAE,GAAG,EAClB,MAAM,CAAC,EAAE,OAAO,EAChB,mBAAmB,CAAC,EAAE,OAAO,EAC7B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,EAC1B,mBAAmB,CAAC,EAAE,OAAO,QAG9B"}
|
|
@@ -5,8 +5,8 @@ import type { StaticConfig, GuiComponentStateRef } from './types';
|
|
|
5
5
|
export declare function getWebEvents(): {};
|
|
6
6
|
export declare function useEvents(events: any, viewProps: any, stateRef: {
|
|
7
7
|
current: GuiComponentStateRef;
|
|
8
|
-
}, staticConfig: StaticConfig, isHOC?: boolean, isInsideNativeMenu?: boolean, debugName?: string | null): any;
|
|
9
|
-
export declare function wrapWithGestureDetector(content: any, gesture: any,
|
|
8
|
+
}, staticConfig: StaticConfig, isHOC?: boolean, isInsideNativeMenu?: boolean, debugName?: string | null, hasRealPressEvents?: boolean): any;
|
|
9
|
+
export declare function wrapWithGestureDetector(content: any, gesture: any, _stateRef: {
|
|
10
10
|
current: GuiComponentStateRef;
|
|
11
|
-
}, isHOC?: boolean, isCompositeComponent?: boolean): any;
|
|
11
|
+
}, isHOC?: boolean, isCompositeComponent?: boolean, hasRealPressEvents?: boolean): any;
|
|
12
12
|
//# sourceMappingURL=eventHandling.native.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eventHandling.native.d.ts","sourceRoot":"","sources":["../src/eventHandling.native.ts"],"names":[],"mappings":"AAAA;;GAEG;AAOH,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"eventHandling.native.d.ts","sourceRoot":"","sources":["../src/eventHandling.native.ts"],"names":[],"mappings":"AAAA;;GAEG;AAOH,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAoCjE,wBAAgB,YAAY,OAE3B;AAED,wBAAgB,SAAS,CACvB,MAAM,EAAE,GAAG,EACX,SAAS,EAAE,GAAG,EACd,QAAQ,EAAE;IAAE,OAAO,EAAE,oBAAoB,CAAA;CAAE,EAC3C,YAAY,EAAE,YAAY,EAC1B,KAAK,CAAC,EAAE,OAAO,EACf,kBAAkB,CAAC,EAAE,OAAO,EAC5B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,EACzB,kBAAkB,CAAC,EAAE,OAAO,OA6L7B;AAED,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,GAAG,EACZ,OAAO,EAAE,GAAG,EACZ,SAAS,EAAE;IAAE,OAAO,EAAE,oBAAoB,CAAA;CAAE,EAC5C,KAAK,CAAC,EAAE,OAAO,EACf,oBAAoB,CAAC,EAAE,OAAO,EAC9B,kBAAkB,CAAC,EAAE,OAAO,OA+D7B"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Some parts adapted from react-native-web
|
|
3
3
|
* Copyright (c) Nicolas Gallagher licensed under the MIT license.
|
|
4
4
|
*/
|
|
5
|
+
import { type StyleCompat } from '../config';
|
|
5
6
|
import type { PropMappedValue } from '../types';
|
|
6
|
-
export declare function expandStyle(key: string, value: any): PropMappedValue;
|
|
7
|
+
export declare function expandStyle(key: string, value: any, styleCompat?: StyleCompat): PropMappedValue;
|
|
7
8
|
//# sourceMappingURL=expandStyle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expandStyle.d.ts","sourceRoot":"","sources":["../../src/helpers/expandStyle.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"expandStyle.d.ts","sourceRoot":"","sources":["../../src/helpers/expandStyle.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAkB,KAAK,WAAW,EAAE,MAAM,WAAW,CAAA;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AA8D/C,wBAAgB,WAAW,CACzB,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,GAAG,EACV,WAAW,GAAE,WAA8B,GAC1C,eAAe,CAsFjB"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { AllGroupContexts, AnimationDriver, ComponentContextI, DebugProp, GetStyleResult, GetStyleState, SplitStyleProps, StaticConfig, GuiComponentState, TextStyle, ThemeParsed } from '../types';
|
|
2
|
+
import { styleOriginalValues } from './styleOriginalValues';
|
|
3
|
+
export { styleOriginalValues };
|
|
4
|
+
export { getStyleTokenProvenance, STYLE_TOKEN_PROVENANCE_KEY } from './styleProvenance';
|
|
5
|
+
export type { StyleTokenBinding, StyleTokenProvenance } from './styleProvenance';
|
|
2
6
|
export type SplitStyles = ReturnType<typeof getSplitStyles>;
|
|
3
7
|
export type SplitStyleResult = ReturnType<typeof getSplitStyles>;
|
|
4
|
-
export declare const styleOriginalValues: WeakMap<object, Record<string, any>>;
|
|
5
8
|
type StyleSplitter = (props: {
|
|
6
9
|
[key: string]: any;
|
|
7
10
|
}, staticConfig: StaticConfig, theme: ThemeParsed, themeName: string, componentState: GuiComponentState, styleProps: SplitStyleProps, parentSplitStyles?: GetStyleResult | null, context?: ComponentContextI, groupContext?: AllGroupContexts | null, elementType?: string, startedUnhydrated?: boolean, debug?: DebugProp, animationDriver?: AnimationDriver | null) => null | GetStyleResult;
|
|
@@ -9,5 +12,4 @@ export declare const PROP_SPLIT = "-";
|
|
|
9
12
|
export declare const getSplitStyles: StyleSplitter;
|
|
10
13
|
export declare const getSubStyle: (styleState: GetStyleState, subKey: string, styleIn: object, avoidMergeTransform?: boolean) => TextStyle;
|
|
11
14
|
export declare const useSplitStyles: StyleSplitter;
|
|
12
|
-
export {};
|
|
13
15
|
//# sourceMappingURL=getSplitStyles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSplitStyles.d.ts","sourceRoot":"","sources":["../../src/helpers/getSplitStyles.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getSplitStyles.d.ts","sourceRoot":"","sources":["../../src/helpers/getSplitStyles.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EAEf,iBAAiB,EACjB,SAAS,EACT,cAAc,EACd,aAAa,EAIb,eAAe,EACf,YAAY,EAEZ,iBAAiB,EAEjB,SAAS,EACT,WAAW,EAEZ,MAAM,UAAU,CAAA;AA0BjB,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAI3D,OAAO,EAAE,mBAAmB,EAAE,CAAA;AAC9B,OAAO,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAA;AACvF,YAAY,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAEhF,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAA;AAM3D,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAA;AAIhE,KAAK,aAAa,GAAG,CACnB,KAAK,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,EAC7B,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,WAAW,EAClB,SAAS,EAAE,MAAM,EACjB,cAAc,EAAE,iBAAiB,EACjC,UAAU,EAAE,eAAe,EAC3B,iBAAiB,CAAC,EAAE,cAAc,GAAG,IAAI,EACzC,OAAO,CAAC,EAAE,iBAAiB,EAC3B,YAAY,CAAC,EAAE,gBAAgB,GAAG,IAAI,EAEtC,WAAW,CAAC,EAAE,MAAM,EACpB,iBAAiB,CAAC,EAAE,OAAO,EAC3B,KAAK,CAAC,EAAE,SAAS,EAEjB,eAAe,CAAC,EAAE,eAAe,GAAG,IAAI,KACrC,IAAI,GAAG,cAAc,CAAA;AAE1B,eAAO,MAAM,UAAU,MAAM,CAAA;AA8D7B,eAAO,MAAM,cAAc,EAAE,aA63C5B,CAAA;AAqFD,eAAO,MAAM,WAAW,GACtB,YAAY,aAAa,EACzB,QAAQ,MAAM,EACd,SAAS,MAAM,EACf,sBAAsB,OAAO,KAC5B,SA6HF,CAAA;AAQD,eAAO,MAAM,cAAc,EAAE,aAc5B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getVariantExtras.d.ts","sourceRoot":"","sources":["../../src/helpers/getVariantExtras.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAIhF,eAAO,MAAM,gBAAgB,GAAI,YAAY,aAAa,
|
|
1
|
+
{"version":3,"file":"getVariantExtras.d.ts","sourceRoot":"","sources":["../../src/helpers/getVariantExtras.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAIhF,eAAO,MAAM,gBAAgB,GAAI,YAAY,aAAa,QAuCzD,CAAA;AAID,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,mBAAmB,OAkBrF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mainThreadPressEvents.native.d.ts","sourceRoot":"","sources":["../../src/helpers/mainThreadPressEvents.native.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"mainThreadPressEvents.native.d.ts","sourceRoot":"","sources":["../../src/helpers/mainThreadPressEvents.native.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAuBH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,GAAG,EACX,SAAS,EAAE,GAAG,EACd,OAAO,UAAO,EACd,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,QA+I1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalizeStyle.d.ts","sourceRoot":"","sources":["../../src/helpers/normalizeStyle.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"normalizeStyle.d.ts","sourceRoot":"","sources":["../../src/helpers/normalizeStyle.ts"],"names":[],"mappings":"AAOA;;;;;;GAMG;AAEH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,gBAAgB,UAAQ,uBAgDlF"}
|