react-native-css 3.0.6 → 3.1.0-rc.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/CHANGELOG.md +21 -0
- package/dist/commonjs/babel/import-plugin.js +9 -3
- package/dist/commonjs/babel/import-plugin.js.map +1 -1
- package/dist/commonjs/babel/react-native-web.js +16 -3
- package/dist/commonjs/babel/react-native-web.js.map +1 -1
- package/dist/commonjs/babel/react-native.js +7 -2
- package/dist/commonjs/babel/react-native.js.map +1 -1
- package/dist/commonjs/compiler/atRules.js +35 -0
- package/dist/commonjs/compiler/atRules.js.map +1 -1
- package/dist/commonjs/compiler/compiler.js +43 -30
- package/dist/commonjs/compiler/compiler.js.map +1 -1
- package/dist/commonjs/compiler/container-query.js +6 -1
- package/dist/commonjs/compiler/container-query.js.map +1 -1
- package/dist/commonjs/compiler/declarations.js +102 -61
- package/dist/commonjs/compiler/declarations.js.map +1 -1
- package/dist/commonjs/compiler/lightningcss-loader.js +11 -8
- package/dist/commonjs/compiler/lightningcss-loader.js.map +1 -1
- package/dist/commonjs/compiler/media-query.js +16 -6
- package/dist/commonjs/compiler/media-query.js.map +1 -1
- package/dist/commonjs/compiler/selector-builder.js +13 -3
- package/dist/commonjs/compiler/selector-builder.js.map +1 -1
- package/dist/commonjs/components/FlatList.js +1 -0
- package/dist/commonjs/components/FlatList.js.map +1 -1
- package/dist/commonjs/components/ImageBackground.js +2 -6
- package/dist/commonjs/components/ImageBackground.js.map +1 -1
- package/dist/commonjs/components/KeyboardAvoidingView.js +2 -3
- package/dist/commonjs/components/KeyboardAvoidingView.js.map +1 -1
- package/dist/commonjs/components/index.cjs +46 -1
- package/dist/commonjs/components/index.cjs.map +1 -1
- package/dist/commonjs/jest/index.js +1 -1
- package/dist/commonjs/jest/index.js.map +1 -1
- package/dist/commonjs/metro/cache-version.js +43 -0
- package/dist/commonjs/metro/cache-version.js.map +1 -0
- package/dist/commonjs/metro/index.js +2 -0
- package/dist/commonjs/metro/index.js.map +1 -1
- package/dist/commonjs/metro/metro-transformer.js +1 -1
- package/dist/commonjs/metro/metro-transformer.js.map +1 -1
- package/dist/commonjs/metro/typescript.js +26 -6
- package/dist/commonjs/metro/typescript.js.map +1 -1
- package/dist/commonjs/native/api.js +12 -8
- package/dist/commonjs/native/api.js.map +1 -1
- package/dist/commonjs/native/conditions/attributes.js +16 -9
- package/dist/commonjs/native/conditions/attributes.js.map +1 -1
- package/dist/commonjs/native/conditions/container-query.js +11 -11
- package/dist/commonjs/native/conditions/container-query.js.map +1 -1
- package/dist/commonjs/native/conditions/media-query.js +1 -1
- package/dist/commonjs/native/conditions/media-query.js.map +1 -1
- package/dist/commonjs/native/react/interaction.js +10 -5
- package/dist/commonjs/native/react/interaction.js.map +1 -1
- package/dist/commonjs/native/react/rules.js +12 -5
- package/dist/commonjs/native/react/rules.js.map +1 -1
- package/dist/commonjs/native/react/useNativeCss.js +48 -12
- package/dist/commonjs/native/react/useNativeCss.js.map +1 -1
- package/dist/commonjs/native/react/usePassthrough.js +5 -2
- package/dist/commonjs/native/react/usePassthrough.js.map +1 -1
- package/dist/commonjs/native/reactivity.js +32 -22
- package/dist/commonjs/native/reactivity.js.map +1 -1
- package/dist/commonjs/native/reanimated.js +15 -3
- package/dist/commonjs/native/reanimated.js.map +1 -1
- package/dist/commonjs/native/styles/functions/color-mix.js +43 -29
- package/dist/commonjs/native/styles/functions/color-mix.js.map +1 -1
- package/dist/commonjs/native/styles/functions/filters.js +18 -5
- package/dist/commonjs/native/styles/functions/filters.js.map +1 -1
- package/dist/commonjs/native/styles/functions/numeric-functions.js +4 -3
- package/dist/commonjs/native/styles/functions/numeric-functions.js.map +1 -1
- package/dist/commonjs/native/styles/functions/string-functions.js +16 -1
- package/dist/commonjs/native/styles/functions/string-functions.js.map +1 -1
- package/dist/commonjs/native/styles/functions/transform-functions.js +5 -4
- package/dist/commonjs/native/styles/functions/transform-functions.js.map +1 -1
- package/dist/commonjs/native/styles/index.js +140 -14
- package/dist/commonjs/native/styles/index.js.map +1 -1
- package/dist/commonjs/native/styles/resolve.js +10 -6
- package/dist/commonjs/native/styles/resolve.js.map +1 -1
- package/dist/commonjs/native/styles/scale-factor.js +13 -0
- package/dist/commonjs/native/styles/scale-factor.js.map +1 -0
- package/dist/commonjs/native/styles/shorthands/animation.js +6 -3
- package/dist/commonjs/native/styles/shorthands/animation.js.map +1 -1
- package/dist/commonjs/native/styles/shorthands/index.js +11 -0
- package/dist/commonjs/native/styles/shorthands/index.js.map +1 -1
- package/dist/commonjs/native/styles/shorthands/logical-border-width.js +22 -0
- package/dist/commonjs/native/styles/shorthands/logical-border-width.js.map +1 -0
- package/dist/commonjs/native/styles/variables.js +55 -43
- package/dist/commonjs/native/styles/variables.js.map +1 -1
- package/dist/commonjs/native-internal/style-collection.js +1 -1
- package/dist/commonjs/native-internal/style-collection.js.map +1 -1
- package/dist/commonjs/utilities/dot-notation.types.js +4 -0
- package/dist/commonjs/utilities/style-descriptor.js +4 -9
- package/dist/commonjs/utilities/style-descriptor.js.map +1 -1
- package/dist/commonjs/web/api.js +1 -1
- package/dist/commonjs/web/api.js.map +1 -1
- package/dist/commonjs/web/assign-style.js +4 -1
- package/dist/commonjs/web/assign-style.js.map +1 -1
- package/dist/module/babel/import-plugin.js +11 -5
- package/dist/module/babel/import-plugin.js.map +1 -1
- package/dist/module/babel/react-native-web.js +16 -4
- package/dist/module/babel/react-native-web.js.map +1 -1
- package/dist/module/babel/react-native.js +7 -2
- package/dist/module/babel/react-native.js.map +1 -1
- package/dist/module/compiler/atRules.js +33 -0
- package/dist/module/compiler/atRules.js.map +1 -1
- package/dist/module/compiler/compiler.js +44 -31
- package/dist/module/compiler/compiler.js.map +1 -1
- package/dist/module/compiler/container-query.js +6 -1
- package/dist/module/compiler/container-query.js.map +1 -1
- package/dist/module/compiler/declarations.js +102 -61
- package/dist/module/compiler/declarations.js.map +1 -1
- package/dist/module/compiler/lightningcss-loader.js +10 -8
- package/dist/module/compiler/lightningcss-loader.js.map +1 -1
- package/dist/module/compiler/media-query.js +16 -6
- package/dist/module/compiler/media-query.js.map +1 -1
- package/dist/module/compiler/selector-builder.js +13 -3
- package/dist/module/compiler/selector-builder.js.map +1 -1
- package/dist/module/components/FlatList.js +1 -0
- package/dist/module/components/FlatList.js.map +1 -1
- package/dist/module/components/ImageBackground.js +2 -6
- package/dist/module/components/ImageBackground.js.map +1 -1
- package/dist/module/components/KeyboardAvoidingView.js +2 -3
- package/dist/module/components/KeyboardAvoidingView.js.map +1 -1
- package/dist/module/components/index.cjs +46 -1
- package/dist/module/components/index.cjs.map +1 -1
- package/dist/module/jest/index.js +1 -1
- package/dist/module/jest/index.js.map +1 -1
- package/dist/module/metro/cache-version.js +39 -0
- package/dist/module/metro/cache-version.js.map +1 -0
- package/dist/module/metro/index.js +2 -0
- package/dist/module/metro/index.js.map +1 -1
- package/dist/module/metro/metro-transformer.js +1 -1
- package/dist/module/metro/metro-transformer.js.map +1 -1
- package/dist/module/metro/typescript.js +26 -6
- package/dist/module/metro/typescript.js.map +1 -1
- package/dist/module/native/api.js +14 -10
- package/dist/module/native/api.js.map +1 -1
- package/dist/module/native/conditions/attributes.js +16 -9
- package/dist/module/native/conditions/attributes.js.map +1 -1
- package/dist/module/native/conditions/container-query.js +11 -11
- package/dist/module/native/conditions/container-query.js.map +1 -1
- package/dist/module/native/conditions/media-query.js +1 -1
- package/dist/module/native/conditions/media-query.js.map +1 -1
- package/dist/module/native/react/interaction.js +10 -5
- package/dist/module/native/react/interaction.js.map +1 -1
- package/dist/module/native/react/rules.js +13 -6
- package/dist/module/native/react/rules.js.map +1 -1
- package/dist/module/native/react/useNativeCss.js +49 -13
- package/dist/module/native/react/useNativeCss.js.map +1 -1
- package/dist/module/native/react/usePassthrough.js +5 -2
- package/dist/module/native/react/usePassthrough.js.map +1 -1
- package/dist/module/native/reactivity.js +32 -22
- package/dist/module/native/reactivity.js.map +1 -1
- package/dist/module/native/reanimated.js +15 -3
- package/dist/module/native/reanimated.js.map +1 -1
- package/dist/module/native/styles/functions/color-mix.js +43 -29
- package/dist/module/native/styles/functions/color-mix.js.map +1 -1
- package/dist/module/native/styles/functions/filters.js +16 -4
- package/dist/module/native/styles/functions/filters.js.map +1 -1
- package/dist/module/native/styles/functions/numeric-functions.js +4 -3
- package/dist/module/native/styles/functions/numeric-functions.js.map +1 -1
- package/dist/module/native/styles/functions/string-functions.js +13 -0
- package/dist/module/native/styles/functions/string-functions.js.map +1 -1
- package/dist/module/native/styles/functions/transform-functions.js +5 -4
- package/dist/module/native/styles/functions/transform-functions.js.map +1 -1
- package/dist/module/native/styles/index.js +140 -14
- package/dist/module/native/styles/index.js.map +1 -1
- package/dist/module/native/styles/resolve.js +10 -6
- package/dist/module/native/styles/resolve.js.map +1 -1
- package/dist/module/native/styles/scale-factor.js +9 -0
- package/dist/module/native/styles/scale-factor.js.map +1 -0
- package/dist/module/native/styles/shorthands/animation.js +6 -3
- package/dist/module/native/styles/shorthands/animation.js.map +1 -1
- package/dist/module/native/styles/shorthands/index.js +1 -0
- package/dist/module/native/styles/shorthands/index.js.map +1 -1
- package/dist/module/native/styles/shorthands/logical-border-width.js +18 -0
- package/dist/module/native/styles/shorthands/logical-border-width.js.map +1 -0
- package/dist/module/native/styles/variables.js +55 -43
- package/dist/module/native/styles/variables.js.map +1 -1
- package/dist/module/native-internal/style-collection.js +1 -1
- package/dist/module/native-internal/style-collection.js.map +1 -1
- package/dist/module/utilities/dot-notation.types.js +2 -0
- package/dist/module/utilities/style-descriptor.js +4 -9
- package/dist/module/utilities/style-descriptor.js.map +1 -1
- package/dist/module/web/api.js +1 -1
- package/dist/module/web/api.js.map +1 -1
- package/dist/module/web/assign-style.js +4 -1
- package/dist/module/web/assign-style.js.map +1 -1
- package/dist/typescript/commonjs/src/babel/import-plugin.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/babel/react-native-web.d.ts +2 -1
- package/dist/typescript/commonjs/src/babel/react-native-web.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/babel/react-native.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/atRules.d.ts +4 -1
- package/dist/typescript/commonjs/src/compiler/atRules.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/compiler.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/declarations.d.ts +2 -2
- package/dist/typescript/commonjs/src/compiler/declarations.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/lightningcss-loader.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/media-query.d.ts +1 -1
- package/dist/typescript/commonjs/src/compiler/media-query.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/FlatList.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/ImageBackground.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/KeyboardAvoidingView.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/react-native-safe-area-context.native.d.ts +1 -1
- package/dist/typescript/commonjs/src/components/react-native-safe-area-context.native.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/metro/cache-version.d.ts +8 -0
- package/dist/typescript/commonjs/src/metro/cache-version.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts +5 -3
- package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/metro/typescript.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/api.d.ts +4 -8
- package/dist/typescript/commonjs/src/native/api.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/conditions/container-query.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/react/interaction.d.ts +1 -1
- package/dist/typescript/commonjs/src/native/react/interaction.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/react/rules.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/react/useNativeCss.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/react/usePassthrough.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/reactivity.d.ts +7 -3
- package/dist/typescript/commonjs/src/native/reactivity.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/reanimated.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/functions/color-mix.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/functions/filters.d.ts +2 -0
- package/dist/typescript/commonjs/src/native/styles/functions/filters.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/functions/numeric-functions.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/functions/string-functions.d.ts +2 -0
- package/dist/typescript/commonjs/src/native/styles/functions/string-functions.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/functions/transform-functions.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/index.d.ts +2 -2
- package/dist/typescript/commonjs/src/native/styles/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/resolve.d.ts +1 -0
- package/dist/typescript/commonjs/src/native/styles/resolve.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/scale-factor.d.ts +2 -0
- package/dist/typescript/commonjs/src/native/styles/scale-factor.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/shorthands/animation.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/shorthands/index.d.ts +1 -0
- package/dist/typescript/commonjs/src/native/styles/shorthands/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/shorthands/logical-border-width.d.ts +4 -0
- package/dist/typescript/commonjs/src/native/styles/shorthands/logical-border-width.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/variables.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native-internal/variables.d.ts +1 -1
- package/dist/typescript/commonjs/src/native-internal/variables.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime.types.d.ts +11 -6
- package/dist/typescript/commonjs/src/runtime.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/utilities/dot-notation.types.d.ts +2 -1
- package/dist/typescript/commonjs/src/utilities/dot-notation.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/utilities/style-descriptor.d.ts +1 -1
- package/dist/typescript/commonjs/src/utilities/style-descriptor.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/web/api.d.ts +5 -5
- package/dist/typescript/commonjs/src/web/api.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/web/assign-style.d.ts.map +1 -1
- package/dist/typescript/module/src/babel/import-plugin.d.ts +1 -1
- package/dist/typescript/module/src/babel/import-plugin.d.ts.map +1 -1
- package/dist/typescript/module/src/babel/react-native-web.d.ts +2 -1
- package/dist/typescript/module/src/babel/react-native-web.d.ts.map +1 -1
- package/dist/typescript/module/src/babel/react-native.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/atRules.d.ts +6 -3
- package/dist/typescript/module/src/compiler/atRules.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/compiler.d.ts +2 -2
- package/dist/typescript/module/src/compiler/compiler.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/compiler.types.d.ts +1 -1
- package/dist/typescript/module/src/compiler/compiler.types.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/container-query.d.ts +2 -2
- package/dist/typescript/module/src/compiler/container-query.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/declarations.d.ts +4 -4
- package/dist/typescript/module/src/compiler/declarations.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/index.d.ts +2 -2
- package/dist/typescript/module/src/compiler/index.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/inline-variables.d.ts +1 -1
- package/dist/typescript/module/src/compiler/inline-variables.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/keyframes.d.ts +2 -2
- package/dist/typescript/module/src/compiler/keyframes.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/lightningcss-loader.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/media-query.d.ts +3 -3
- package/dist/typescript/module/src/compiler/media-query.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/pseudo-elements.d.ts +1 -1
- package/dist/typescript/module/src/compiler/pseudo-elements.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/selector-builder.d.ts +1 -1
- package/dist/typescript/module/src/compiler/selector-builder.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/selectors.d.ts +2 -2
- package/dist/typescript/module/src/compiler/selectors.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/stylesheet.d.ts +1 -1
- package/dist/typescript/module/src/compiler/stylesheet.d.ts.map +1 -1
- package/dist/typescript/module/src/components/FlatList.d.ts.map +1 -1
- package/dist/typescript/module/src/components/ImageBackground.d.ts.map +1 -1
- package/dist/typescript/module/src/components/KeyboardAvoidingView.d.ts.map +1 -1
- package/dist/typescript/module/src/components/index.d.ts +16 -16
- package/dist/typescript/module/src/components/index.d.ts.map +1 -1
- package/dist/typescript/module/src/components/react-native-safe-area-context.native.d.ts +1 -1
- package/dist/typescript/module/src/components/react-native-safe-area-context.native.d.ts.map +1 -1
- package/dist/typescript/module/src/metro/cache-version.d.ts +8 -0
- package/dist/typescript/module/src/metro/cache-version.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/index.d.ts +1 -1
- package/dist/typescript/module/src/metro/index.d.ts.map +1 -1
- package/dist/typescript/module/src/metro/metro-transformer.d.ts +6 -4
- package/dist/typescript/module/src/metro/metro-transformer.d.ts.map +1 -1
- package/dist/typescript/module/src/metro/typescript.d.ts.map +1 -1
- package/dist/typescript/module/src/native/api.d.ts +5 -9
- package/dist/typescript/module/src/native/api.d.ts.map +1 -1
- package/dist/typescript/module/src/native/conditions/attributes.d.ts +1 -1
- package/dist/typescript/module/src/native/conditions/attributes.d.ts.map +1 -1
- package/dist/typescript/module/src/native/conditions/container-query.d.ts +2 -2
- package/dist/typescript/module/src/native/conditions/container-query.d.ts.map +1 -1
- package/dist/typescript/module/src/native/conditions/guards.d.ts +2 -2
- package/dist/typescript/module/src/native/conditions/guards.d.ts.map +1 -1
- package/dist/typescript/module/src/native/conditions/index.d.ts +3 -3
- package/dist/typescript/module/src/native/conditions/index.d.ts.map +1 -1
- package/dist/typescript/module/src/native/conditions/media-query.d.ts +1 -1
- package/dist/typescript/module/src/native/conditions/media-query.d.ts.map +1 -1
- package/dist/typescript/module/src/native/index.d.ts +3 -3
- package/dist/typescript/module/src/native/index.d.ts.map +1 -1
- package/dist/typescript/module/src/native/react/interaction.d.ts +2 -2
- package/dist/typescript/module/src/native/react/interaction.d.ts.map +1 -1
- package/dist/typescript/module/src/native/react/rules.d.ts +2 -2
- package/dist/typescript/module/src/native/react/rules.d.ts.map +1 -1
- package/dist/typescript/module/src/native/react/useNativeCss.d.ts +4 -4
- package/dist/typescript/module/src/native/react/useNativeCss.d.ts.map +1 -1
- package/dist/typescript/module/src/native/react/usePassthrough.d.ts +1 -1
- package/dist/typescript/module/src/native/react/usePassthrough.d.ts.map +1 -1
- package/dist/typescript/module/src/native/reactivity.d.ts +7 -3
- package/dist/typescript/module/src/native/reactivity.d.ts.map +1 -1
- package/dist/typescript/module/src/native/reanimated.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/calculate-props.d.ts +2 -2
- package/dist/typescript/module/src/native/styles/calculate-props.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/animation-timing.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/functions/animation-timing.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/calc.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/functions/calc.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/color-mix.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/functions/color-mix.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/filters.d.ts +3 -1
- package/dist/typescript/module/src/native/styles/functions/filters.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/index.d.ts +8 -8
- package/dist/typescript/module/src/native/styles/functions/index.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/numeric-functions.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/functions/numeric-functions.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/platform-functions.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/functions/platform-functions.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/string-functions.d.ts +3 -1
- package/dist/typescript/module/src/native/styles/functions/string-functions.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/transform-functions.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/functions/transform-functions.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/index.d.ts +7 -7
- package/dist/typescript/module/src/native/styles/index.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/line-height.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/line-height.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/resolve.d.ts +4 -3
- package/dist/typescript/module/src/native/styles/resolve.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/scale-factor.d.ts +2 -0
- package/dist/typescript/module/src/native/styles/scale-factor.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/shorthands/_handler.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/_handler.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/animation.d.ts +2 -2
- package/dist/typescript/module/src/native/styles/shorthands/animation.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/border.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/border.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/box-shadow.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/box-shadow.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/index.d.ts +6 -5
- package/dist/typescript/module/src/native/styles/shorthands/index.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/logical-border-width.d.ts +4 -0
- package/dist/typescript/module/src/native/styles/shorthands/logical-border-width.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/shorthands/text-shadow.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/text-shadow.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/transform.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/transform.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/units.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/units.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/variables.d.ts +2 -2
- package/dist/typescript/module/src/native/styles/variables.d.ts.map +1 -1
- package/dist/typescript/module/src/native-internal/index.d.ts +3 -3
- package/dist/typescript/module/src/native-internal/index.d.ts.map +1 -1
- package/dist/typescript/module/src/native-internal/root.d.ts +1 -1
- package/dist/typescript/module/src/native-internal/root.d.ts.map +1 -1
- package/dist/typescript/module/src/native-internal/style-collection.d.ts +2 -2
- package/dist/typescript/module/src/native-internal/style-collection.d.ts.map +1 -1
- package/dist/typescript/module/src/native-internal/variables.d.ts +2 -2
- package/dist/typescript/module/src/native-internal/variables.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime.d.ts +1 -1
- package/dist/typescript/module/src/runtime.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime.native.d.ts +1 -1
- package/dist/typescript/module/src/runtime.native.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime.types.d.ts +11 -6
- package/dist/typescript/module/src/runtime.types.d.ts.map +1 -1
- package/dist/typescript/module/src/utilities/dot-notation.types.d.ts +2 -1
- package/dist/typescript/module/src/utilities/dot-notation.types.d.ts.map +1 -1
- package/dist/typescript/module/src/utilities/index.d.ts +3 -3
- package/dist/typescript/module/src/utilities/index.d.ts.map +1 -1
- package/dist/typescript/module/src/utilities/specificity.d.ts +2 -2
- package/dist/typescript/module/src/utilities/specificity.d.ts.map +1 -1
- package/dist/typescript/module/src/utilities/style-descriptor.d.ts +1 -1
- package/dist/typescript/module/src/utilities/style-descriptor.d.ts.map +1 -1
- package/dist/typescript/module/src/web/api.d.ts +5 -5
- package/dist/typescript/module/src/web/api.d.ts.map +1 -1
- package/dist/typescript/module/src/web/assign-style.d.ts.map +1 -1
- package/dist/typescript/module/src/web/index.d.ts +3 -3
- package/dist/typescript/module/src/web/index.d.ts.map +1 -1
- package/node/babel.mjs +4 -0
- package/node/compiler.mjs +2 -0
- package/node/metro.mjs +2 -0
- package/package.json +61 -27
- package/src/babel/import-plugin.ts +15 -4
- package/src/babel/react-native-web.ts +32 -3
- package/src/babel/react-native.ts +7 -1
- package/src/compiler/atRules.ts +44 -0
- package/src/compiler/compiler.ts +73 -49
- package/src/compiler/container-query.ts +8 -3
- package/src/compiler/declarations.ts +189 -100
- package/src/compiler/lightningcss-loader.ts +16 -15
- package/src/compiler/media-query.ts +20 -9
- package/src/compiler/selector-builder.ts +29 -3
- package/src/components/FlatList.tsx +1 -0
- package/src/components/ImageBackground.tsx +2 -6
- package/src/components/KeyboardAvoidingView.tsx +2 -3
- package/src/components/index.cts +46 -1
- package/src/jest/index.ts +1 -1
- package/src/metro/cache-version.ts +48 -0
- package/src/metro/index.ts +2 -0
- package/src/metro/metro-transformer.ts +9 -6
- package/src/metro/typescript.ts +53 -6
- package/src/native/api.tsx +20 -14
- package/src/native/conditions/attributes.ts +26 -9
- package/src/native/conditions/container-query.ts +11 -9
- package/src/native/conditions/media-query.ts +1 -1
- package/src/native/react/interaction.ts +11 -6
- package/src/native/react/rules.ts +13 -5
- package/src/native/react/useNativeCss.ts +54 -14
- package/src/native/react/usePassthrough.ts +3 -2
- package/src/native/reactivity.ts +42 -24
- package/src/native/reanimated.ts +24 -5
- package/src/native/styles/functions/color-mix.ts +45 -39
- package/src/native/styles/functions/filters.ts +20 -6
- package/src/native/styles/functions/numeric-functions.ts +7 -6
- package/src/native/styles/functions/string-functions.ts +18 -0
- package/src/native/styles/functions/transform-functions.ts +5 -4
- package/src/native/styles/index.ts +146 -15
- package/src/native/styles/resolve.ts +15 -11
- package/src/native/styles/scale-factor.ts +6 -0
- package/src/native/styles/shorthands/animation.ts +8 -2
- package/src/native/styles/shorthands/index.ts +1 -0
- package/src/native/styles/shorthands/logical-border-width.ts +32 -0
- package/src/native/styles/variables.ts +48 -38
- package/src/native-internal/style-collection.ts +1 -1
- package/src/runtime.types.ts +17 -15
- package/src/utilities/dot-notation.types.ts +4 -3
- package/src/utilities/style-descriptor.ts +11 -16
- package/src/web/api.tsx +6 -11
- package/src/web/assign-style.ts +2 -1
- package/types.d.ts +0 -20
- package/dist/commonjs/compiler/inheritance.test.js +0 -78
- package/dist/commonjs/compiler/inheritance.test.js.map +0 -1
- package/dist/module/compiler/inheritance.test.js +0 -78
- package/dist/module/compiler/inheritance.test.js.map +0 -1
- package/dist/typescript/commonjs/.config/eslint.config.d.mts +0 -3
- package/dist/typescript/commonjs/.config/eslint.config.d.mts.map +0 -1
- package/dist/typescript/commonjs/eslint.config.d.mts +0 -2
- package/dist/typescript/commonjs/eslint.config.d.mts.map +0 -1
- package/dist/typescript/commonjs/example/app.config.d.ts +0 -4
- package/dist/typescript/commonjs/example/app.config.d.ts.map +0 -1
- package/dist/typescript/commonjs/example/index.d.ts +0 -2
- package/dist/typescript/commonjs/example/index.d.ts.map +0 -1
- package/dist/typescript/commonjs/example/metro.config.d.ts +0 -3
- package/dist/typescript/commonjs/example/metro.config.d.ts.map +0 -1
- package/dist/typescript/commonjs/example/postcss.config.d.mts +0 -7
- package/dist/typescript/commonjs/example/postcss.config.d.mts.map +0 -1
- package/dist/typescript/commonjs/example/src/App.d.ts +0 -3
- package/dist/typescript/commonjs/example/src/App.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/compiler/inheritance.test.d.ts +0 -2
- package/dist/typescript/commonjs/src/compiler/inheritance.test.d.ts.map +0 -1
- package/dist/typescript/module/.config/eslint.config.d.mts +0 -3
- package/dist/typescript/module/.config/eslint.config.d.mts.map +0 -1
- package/dist/typescript/module/eslint.config.d.mts +0 -2
- package/dist/typescript/module/eslint.config.d.mts.map +0 -1
- package/dist/typescript/module/example/app.config.d.ts +0 -4
- package/dist/typescript/module/example/app.config.d.ts.map +0 -1
- package/dist/typescript/module/example/index.d.ts +0 -2
- package/dist/typescript/module/example/index.d.ts.map +0 -1
- package/dist/typescript/module/example/metro.config.d.ts +0 -3
- package/dist/typescript/module/example/metro.config.d.ts.map +0 -1
- package/dist/typescript/module/example/postcss.config.d.mts +0 -7
- package/dist/typescript/module/example/postcss.config.d.mts.map +0 -1
- package/dist/typescript/module/example/src/App.d.ts +0 -3
- package/dist/typescript/module/example/src/App.d.ts.map +0 -1
- package/dist/typescript/module/src/compiler/inheritance.test.d.ts +0 -2
- package/dist/typescript/module/src/compiler/inheritance.test.d.ts.map +0 -1
- package/src/compiler/inheritance.test.ts +0 -121
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_utilities","require","_defaults","functions","_interopRequireWildcard","_lineHeight","_scaleFactor","shorthands","_units","_variables","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","functionResolvers","lineHeight","em","rem","vh","vw","resolveValue","value","options","castToArray","endsWith","parseFloat","slice","Array","isArray","isStyleDescriptorArray","map","d","filter","undefined","name","simpleResolve","varResolver","fn","Error","transformKeys","resolved","scaleFactor","args","joinedArgs","arg","flat","join","replace"],"sourceRoot":"../../../../src","sources":["native/styles/resolve.ts"],"mappings":";;;;;;AAOA,IAAAA,UAAA,GAAAC,OAAA;AAKA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAH,uBAAA,CAAAH,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;A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C7B;cACA,OAAOF,GAAG;YACZ,CAAC,CAAC,CACDZ,MAAM,CAAEX,KAAK,IAAKA,KAAK,KAAK,GAAG,CAAC,CAChCyB,IAAI,CAAC,IAAI,CAAC;YAEb,IAAIZ,IAAI,KAAK,iBAAiB,EAAE;cAC9B;cACAS,UAAU,GAAGA,UAAU,CAACI,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC;YACnD;YAEA1B,KAAK,GAAG,GAAGa,IAAI,IAAIS,UAAU,GAAG;UAClC,CAAC,MAAM;YACLtB,KAAK,GAAG,GAAGa,IAAI,IAAIQ,IAAI,GAAG;UAC5B;QACF;QAEA,OAAOnB,WAAW,IAAIF,KAAK,IAAI,CAACM,KAAK,CAACC,OAAO,CAACP,KAAK,CAAC,GAAG,CAACA,KAAK,CAAC,GAAGA,KAAK;MACxE;EACF;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.scaleFactor = scaleFactor;
|
|
7
|
+
function scaleFactor(value) {
|
|
8
|
+
if (typeof value === "string" && value.endsWith("%")) {
|
|
9
|
+
return Number(value.slice(0, -1)) / 100;
|
|
10
|
+
}
|
|
11
|
+
return value;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=scale-factor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["scaleFactor","value","endsWith","Number","slice"],"sourceRoot":"../../../../src","sources":["native/styles/scale-factor.ts"],"mappings":";;;;;;AAAO,SAASA,WAAWA,CAACC,KAAc,EAAE;EAC1C,IAAI,OAAOA,KAAK,KAAK,QAAQ,IAAIA,KAAK,CAACC,QAAQ,CAAC,GAAG,CAAC,EAAE;IACpD,OAAOC,MAAM,CAACF,KAAK,CAACG,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG;EACzC;EACA,OAAOH,KAAK;AACd","ignoreList":[]}
|
|
@@ -17,9 +17,9 @@ const fill = ["animationFillMode", ["none", "forwards", "backwards", "both"], "n
|
|
|
17
17
|
const playState = ["animationPlayState", ["running", "paused"], "running"];
|
|
18
18
|
const direction = ["animationDirection", ["normal", "reverse", "alternate", "alternate-reverse"], "normal"];
|
|
19
19
|
const timingFunction = ["animationTimingFunction", ["linear", "ease", "ease-in", "ease-out", "ease-in-out", "object"], "ease"];
|
|
20
|
-
const animationShorthand = exports.animationShorthand = (0, _handler.shorthandHandler)([[name], [duration, name], [name, duration], [name, duration, iteration], [name, duration, timingFunction, iteration], [duration, delay, name], [duration, delay, iteration, name], [duration, delay, iteration, timingFunction, name], [name, duration, timingFunction, delay, iteration, fill]], [name, delay, direction, duration, fill, iteration, playState, timingFunction], "tuples");
|
|
20
|
+
const animationShorthand = exports.animationShorthand = (0, _handler.shorthandHandler)([[name], [duration, name], [name, duration], [name, duration, timingFunction], [duration, timingFunction, name], [name, duration, iteration], [name, duration, timingFunction, iteration], [duration, delay, name], [duration, delay, iteration, name], [duration, delay, iteration, timingFunction, name], [name, duration, timingFunction, delay, iteration, fill]], [name, delay, direction, duration, fill, iteration, playState, timingFunction], "tuples");
|
|
21
21
|
const animation = (resolveValue, value, get, options) => {
|
|
22
|
-
const animationShortHandTuples = animationShorthand(resolveValue, value, get, options);
|
|
22
|
+
const animationShortHandTuples = animationShorthand(resolveValue, [value[2]], get, options);
|
|
23
23
|
if (!Array.isArray(animationShortHandTuples)) {
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
@@ -28,6 +28,9 @@ const animation = (resolveValue, value, get, options) => {
|
|
|
28
28
|
if (!nameTuple || typeof name !== "string") {
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
|
+
if (name === "none") {
|
|
32
|
+
return (0, _objects.applyShorthand)(animationShortHandTuples);
|
|
33
|
+
}
|
|
31
34
|
const keyframes = get(_nativeInternal.StyleCollection.keyframes(name));
|
|
32
35
|
const animation = {};
|
|
33
36
|
for (const [progress, declarations] of keyframes) {
|
|
@@ -55,7 +58,7 @@ const animation = (resolveValue, value, get, options) => {
|
|
|
55
58
|
exports.animation = animation;
|
|
56
59
|
const animationName = (resolveValue, value, get, options) => {
|
|
57
60
|
const shorthand = animation(resolveValue, value, get, options);
|
|
58
|
-
return shorthand
|
|
61
|
+
return shorthand?.animationName;
|
|
59
62
|
};
|
|
60
63
|
exports.animationName = animationName;
|
|
61
64
|
//# sourceMappingURL=animation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_nativeInternal","require","_objects","_handler","name","delay","duration","iteration","fill","playState","direction","timingFunction","animationShorthand","exports","shorthandHandler","animation","resolveValue","value","get","options","animationShortHandTuples","Array","isArray","nameTuple","find","tuple","keyframes","StyleCollection","progress","declarations","props","calculateProps","s","d","renderGuards","inheritedVariables","inlineVariables","normal","Object","assign","important","style","
|
|
1
|
+
{"version":3,"names":["_nativeInternal","require","_objects","_handler","name","delay","duration","iteration","fill","playState","direction","timingFunction","animationShorthand","exports","shorthandHandler","animation","resolveValue","value","get","options","animationShortHandTuples","Array","isArray","nameTuple","find","tuple","applyShorthand","keyframes","StyleCollection","progress","declarations","props","calculateProps","s","d","renderGuards","inheritedVariables","inlineVariables","normal","Object","assign","important","style","animationName","shorthand"],"sourceRoot":"../../../../../src","sources":["native/styles/shorthands/animation.ts"],"mappings":";;;;;;AACA,IAAAA,eAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AAEA,IAAAE,QAAA,GAAAF,OAAA;AALA;;AAOA,MAAMG,IAAI,GAAG,CAAC,eAAe,EAAE,QAAQ,EAAE,MAAM,CAAU;AACzD,MAAMC,KAAK,GAAG,CAAC,gBAAgB,EAAE,QAAQ,EAAE,CAAC,CAAU;AACtD,MAAMC,QAAQ,GAAG,CAAC,mBAAmB,EAAE,QAAQ,EAAE,CAAC,CAAU;AAC5D,MAAMC,SAAS,GAAG,CAChB,yBAA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;MACV;IACF;IAEA,IAAIA,KAAK,CAACO,MAAM,EAAE;MAChBC,MAAM,CAACC,MAAM,CAACzB,SAAS,CAACc,QAAQ,CAAC,EAAEE,KAAK,CAACO,MAAM,CAAC;IAClD;IACA,IAAIP,KAAK,CAACU,SAAS,EAAE;MACnBF,MAAM,CAACC,MAAM,CAACzB,SAAS,CAACc,QAAQ,CAAC,EAAEE,KAAK,CAACU,SAAS,CAAC;IACrD;IAEA1B,SAAS,CAACc,QAAQ,CAAC,GAAGd,SAAS,CAACc,QAAQ,CAAC,CAACa,KAAK;EACjD;EAEAnB,SAAS,CAAC,CAAC,CAAC,GAAGR,SAAS;EAExB,OAAO,IAAAW,uBAAc,EAACN,wBAAwB,CAAC;AACjD,CAAC;AAACP,OAAA,CAAAE,SAAA,GAAAA,SAAA;AAEK,MAAM4B,aAAoC,GAAGA,CAClD3B,YAAY,EACZC,KAAK,EACLC,GAAG,EACHC,OAAO,KACJ;EACH,MAAMyB,SAAc,GAAG7B,SAAS,CAACC,YAAY,EAAEC,KAAK,EAAEC,GAAG,EAAEC,OAAO,CAAC;EACnE,OAAOyB,SAAS,EAAED,aAAa;AACjC,CAAC;AAAC9B,OAAA,CAAA8B,aAAA,GAAAA,aAAA","ignoreList":[]}
|
|
@@ -25,6 +25,17 @@ Object.keys(_border).forEach(function (key) {
|
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
27
|
});
|
|
28
|
+
var _logicalBorderWidth = require("./logical-border-width.js");
|
|
29
|
+
Object.keys(_logicalBorderWidth).forEach(function (key) {
|
|
30
|
+
if (key === "default" || key === "__esModule") return;
|
|
31
|
+
if (key in exports && exports[key] === _logicalBorderWidth[key]) return;
|
|
32
|
+
Object.defineProperty(exports, key, {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () {
|
|
35
|
+
return _logicalBorderWidth[key];
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
});
|
|
28
39
|
var _boxShadow = require("./box-shadow.js");
|
|
29
40
|
Object.keys(_boxShadow).forEach(function (key) {
|
|
30
41
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_animation","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_border","_boxShadow","_textShadow","_transform"],"sourceRoot":"../../../../../src","sources":["native/styles/shorthands/index.ts"],"mappings":";;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,UAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,UAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,UAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,OAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,OAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,OAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,OAAA,CAAAL,GAAA;IAAA;EAAA;AAAA;AACA,IAAAM,
|
|
1
|
+
{"version":3,"names":["_animation","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_border","_logicalBorderWidth","_boxShadow","_textShadow","_transform"],"sourceRoot":"../../../../../src","sources":["native/styles/shorthands/index.ts"],"mappings":";;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,UAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAA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A,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAG,UAAA,CAAAP,GAAA;IAAA;EAAA;AAAA;AACA,IAAAQ,WAAA,GAAAZ,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAU,WAAA,EAAAT,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAQ,WAAA,CAAAR,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAI,WAAA,CAAAR,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,UAAA,GAAAb,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAW,UAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAS,UAAA,CAAAT,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAK,UAAA,CAAAT,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.borderInlineWidth = exports.borderBlockWidth = void 0;
|
|
7
|
+
var _constants = require("../constants.js");
|
|
8
|
+
function logicalWidth(start, end) {
|
|
9
|
+
return (resolve, descriptor) => {
|
|
10
|
+
const resolved = resolve(descriptor[2]);
|
|
11
|
+
const values = Array.isArray(resolved) ? resolved : [resolved];
|
|
12
|
+
if (values.length < 1 || values.length > 2 || !values.every(value => typeof value === "number" && Number.isFinite(value) && value >= 0)) return;
|
|
13
|
+
return {
|
|
14
|
+
[_constants.ShortHandSymbol]: true,
|
|
15
|
+
[start]: values[0],
|
|
16
|
+
[end]: values[1] ?? values[0]
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
const borderBlockWidth = exports.borderBlockWidth = logicalWidth("borderTopWidth", "borderBottomWidth");
|
|
21
|
+
const borderInlineWidth = exports.borderInlineWidth = logicalWidth("borderStartWidth", "borderEndWidth");
|
|
22
|
+
//# sourceMappingURL=logical-border-width.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_constants","require","logicalWidth","start","end","resolve","descriptor","resolved","values","Array","isArray","length","every","value","Number","isFinite","ShortHandSymbol","borderBlockWidth","exports","borderInlineWidth"],"sourceRoot":"../../../../../src","sources":["native/styles/shorthands/logical-border-width.ts"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAGA,SAASC,YAAYA,CAACC,KAAa,EAAEC,GAAW,EAAyB;EACvE,OAAO,CAACC,OAAO,EAAEC,UAAU,KAAK;IAC9B,MAAMC,QAAQ,GAAGF,OAAO,CAACC,UAAU,CAAC,CAAC,CAAC,CAAC;IACvC,MAAME,MAAiB,GAAGC,KAAK,CAACC,OAAO,CAACH,QAAQ,CAAC,GAAGA,QAAQ,GAAG,CAACA,QAAQ,CAAC;IACzE,IACEC,MAAM,CAACG,MAAM,GAAG,CAAC,IACjBH,MAAM,CAACG,MAAM,GAAG,CAAC,IACjB,CAACH,MAAM,CAACI,KAAK,CACVC,KAAK,IACJ,OAAOA,KAAK,KAAK,QAAQ,IAAIC,MAAM,CAACC,QAAQ,CAACF,KAAK,CAAC,IAAIA,KAAK,IAAI,CACpE,CAAC,EAED;IACF,OAAO;MACL,CAACG,0BAAe,GAAG,IAAI;MACvB,CAACb,KAAK,GAAGK,MAAM,CAAC,CAAC,CAAC;MAClB,CAACJ,GAAG,GAAGI,MAAM,CAAC,CAAC,CAAC,IAAIA,MAAM,CAAC,CAAC;IAC9B,CAAC;EACH,CAAC;AACH;AAEO,MAAMS,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAGf,YAAY,CAC1C,gBAAgB,EAChB,mBACF,CAAC;AACM,MAAMiB,iBAAiB,GAAAD,OAAA,CAAAC,iBAAA,GAAGjB,YAAY,CAC3C,kBAAkB,EAClB,gBACF,CAAC","ignoreList":[]}
|
|
@@ -14,7 +14,8 @@ function varResolver(resolve, fn, get, options) {
|
|
|
14
14
|
[_reactivity.VAR_SYMBOL]: true
|
|
15
15
|
},
|
|
16
16
|
inlineVariables,
|
|
17
|
-
variableHistory = new Set()
|
|
17
|
+
variableHistory = options.variableHistory ??= new Set(),
|
|
18
|
+
variableCycles = options.variableCycles ??= new Set()
|
|
18
19
|
} = options;
|
|
19
20
|
const args = fn[2];
|
|
20
21
|
let name;
|
|
@@ -22,58 +23,69 @@ function varResolver(resolve, fn, get, options) {
|
|
|
22
23
|
if (typeof args === "string") {
|
|
23
24
|
name = args;
|
|
24
25
|
} else {
|
|
25
|
-
|
|
26
|
-
if ((0, _utilities.isStyleDescriptorArray)(
|
|
27
|
-
name =
|
|
28
|
-
fallback =
|
|
26
|
+
// Fallbacks are substituted only when needed, after reading the variable.
|
|
27
|
+
if ((0, _utilities.isStyleDescriptorArray)(args)) {
|
|
28
|
+
name = args[0];
|
|
29
|
+
fallback = args[1];
|
|
29
30
|
}
|
|
30
31
|
}
|
|
31
32
|
if (typeof name !== "string") {
|
|
32
33
|
return;
|
|
33
34
|
}
|
|
35
|
+
if (variableCycles.has(name)) return resolve(fallback);
|
|
34
36
|
|
|
35
|
-
//
|
|
37
|
+
// Share the active resolution path with recursive calls. Mark only the
|
|
38
|
+
// actual cycle, so a dependent variable can still use its own fallback.
|
|
36
39
|
if (variableHistory.has(name)) {
|
|
40
|
+
let inCycle = false;
|
|
41
|
+
for (const dependency of variableHistory) {
|
|
42
|
+
if (dependency === name) inCycle = true;
|
|
43
|
+
if (inCycle) variableCycles.add(dependency);
|
|
44
|
+
}
|
|
37
45
|
return;
|
|
38
46
|
}
|
|
39
|
-
if (name in variables) {
|
|
40
|
-
renderGuards?.push(["v", name, variables[name]]);
|
|
41
|
-
return resolve(variables[name]);
|
|
42
|
-
}
|
|
43
47
|
variableHistory.add(name);
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
48
|
+
try {
|
|
49
|
+
let value = resolve(inlineVariables?.[name]);
|
|
50
|
+
if (variableCycles.has(name)) return resolve(fallback);
|
|
51
|
+
if (value !== undefined) {
|
|
52
|
+
options.inlineVariables ??= {
|
|
53
|
+
[_reactivity.VAR_SYMBOL]: "inline"
|
|
54
|
+
};
|
|
55
|
+
options.inlineVariables[name] = value;
|
|
56
|
+
return value;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// A universal selector declares the variable on this element. It has lower
|
|
60
|
+
// specificity than the element's class declarations, but beats inheritance.
|
|
61
|
+
value = resolve(get((0, _nativeInternal.universalVariables)(name)));
|
|
62
|
+
if (variableCycles.has(name)) return resolve(fallback);
|
|
63
|
+
if (value !== undefined) {
|
|
64
|
+
options.inlineVariables ??= {
|
|
65
|
+
[_reactivity.VAR_SYMBOL]: "inline"
|
|
66
|
+
};
|
|
67
|
+
options.inlineVariables[name] = value;
|
|
68
|
+
return value;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Guards retain the ancestor's raw descriptor, matching the context value.
|
|
72
|
+
if (name in variables) {
|
|
73
|
+
renderGuards?.push(["v", name, variables[name]]);
|
|
74
|
+
value = resolve(variables[name]);
|
|
75
|
+
return variableCycles.has(name) ? resolve(fallback) : value;
|
|
76
|
+
}
|
|
77
|
+
value = resolve(get((0, _nativeInternal.rootVariables)(name)));
|
|
78
|
+
if (variableCycles.has(name)) return resolve(fallback);
|
|
79
|
+
if (value !== undefined) {
|
|
80
|
+
options.inlineVariables ??= {
|
|
81
|
+
[_reactivity.VAR_SYMBOL]: "inline"
|
|
82
|
+
};
|
|
83
|
+
options.inlineVariables[name] = value;
|
|
84
|
+
return value;
|
|
85
|
+
}
|
|
86
|
+
return resolve(fallback);
|
|
87
|
+
} finally {
|
|
88
|
+
variableHistory.delete(name);
|
|
76
89
|
}
|
|
77
|
-
return resolve(fallback);
|
|
78
90
|
}
|
|
79
91
|
//# sourceMappingURL=variables.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_nativeInternal","require","_utilities","_reactivity","varResolver","resolve","fn","get","options","renderGuards","inheritedVariables","variables","VAR_SYMBOL","inlineVariables","variableHistory","Set","args","name","fallback","
|
|
1
|
+
{"version":3,"names":["_nativeInternal","require","_utilities","_reactivity","varResolver","resolve","fn","get","options","renderGuards","inheritedVariables","variables","VAR_SYMBOL","inlineVariables","variableHistory","Set","variableCycles","args","name","fallback","isStyleDescriptorArray","has","inCycle","dependency","add","value","undefined","universalVariables","push","rootVariables","delete"],"sourceRoot":"../../../../src","sources":["native/styles/variables.ts"],"mappings":";;;;;;AACA,IAAAA,eAAA,GAAAC,OAAA;AAIA,IAAAC,UAAA,GAAAD,OAAA;AAEA,IAAAE,WAAA,GAAAF,OAAA;AAGO,SAASG,WAAWA,CACzBC,OAA2B,EAC3BC,EAAiB,EACjBC,GAAW,EACXC,OAA4B,EAC5B;EACA,MAAM;IACJC,YAAY;IACZC,kBAAkB,EAAEC,SAAS,GAAG;MAAE,CAACC,sBAAU,GAAG;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1B,CAAC,SAAS;IACRL,eAAe,CAACgB,MAAM,CAACZ,IAAI,CAAC;EAC9B;AACF","ignoreList":[]}
|
|
@@ -63,7 +63,7 @@ globalThis.__react_native_css_style_collection ??= {
|
|
|
63
63
|
}
|
|
64
64
|
if (options.vu) {
|
|
65
65
|
for (const entry of options.vu) {
|
|
66
|
-
(0, _root.
|
|
66
|
+
(0, _root.universalVariables)(entry[0]).set(entry[1]);
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
for (const effect of _reactivity.observableBatch.current) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_containerQuery","require","_reactivity","_root","globalThis","__react_native_css_style_collection","styles","family","observable","isDeepEqual","keyframes","inject","options","observableBatch","current","Set","StyleCollection","set","s","v","c","DEFAULT_CONTAINER_NAME","a","p","h","style","k","vr","entry","rootVariables","vu","effect","run","undefined","exports","b","aArray","Array","isArray","bArray","requiresKeyComparison","length","key"],"sourceRoot":"../../../src","sources":["native-internal/style-collection.ts"],"mappings":";;;;;;;;;;;;;;;;;;AAQA,IAAAA,eAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAOA,IAAAE,KAAA,GAAAF,OAAA;AAiBAG,UAAU,CAACC,mCAAmC,KAAK;EACjDC,MAAM,EAAE,IAAAC,kBAAM,EAAmC,MAAM;IACrD,OAAO,IAAAC,sBAAU,EAAC,EAAE,EAAEC,WAAW,CAAC;EACpC,CAAC,CAAC;EACFC,SAAS,EAAE,IAAAH,kBAAM,EAAmC,MAAM;IACxD,OAAO,IAAAC,sBAAU,EAAC,EAAE,EAAEC,WAAW,CAAC;EACpC,CAAC,CAAC;EACFE,MAAM,EAAE,SAAAA,CAAUC,OAAiC,EAAE;IACnDC,2BAAe,CAACC,OAAO,GAAG,IAAIC,GAAG,CAAC,CAAC;IAEnCC,eAAe,CAACV,MAAM,CAAC,sBAAsB,CAAC,CAACW,GAAG,CAAC,CACjD;MACEC,CAAC,EAAE,CAAC,CA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,IAAIhB,OAAO,CAACkB,EAAE,EAAE;QAC9B,
|
|
1
|
+
{"version":3,"names":["_containerQuery","require","_reactivity","_root","globalThis","__react_native_css_style_collection","styles","family","observable","isDeepEqual","keyframes","inject","options","observableBatch","current","Set","StyleCollection","set","s","v","c","DEFAULT_CONTAINER_NAME","a","p","h","style","k","vr","entry","rootVariables","vu","universalVariables","effect","run","undefined","exports","b","aArray","Array","isArray","bArray","requiresKeyComparison","length","key"],"sourceRoot":"../../../src","sources":["native-internal/style-collection.ts"],"mappings":";;;;;;;;;;;;;;;;;;AAQA,IAAAA,eAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAOA,IAAAE,KAAA,GAAAF,OAAA;AAiBAG,UAAU,CAACC,mCAAmC,KAAK;EACjDC,MAAM,EAAE,IAAAC,kBAAM,EAAmC,MAAM;IACrD,OAAO,IAAAC,sBAAU,EAAC,EAAE,EAAEC,WAAW,CAAC;EACpC,CAAC,CAAC;EACFC,SAAS,EAAE,IAAAH,kBAAM,EAAmC,MAAM;IACxD,OAAO,IAAAC,sBAAU,EAAC,EAAE,EAAEC,WAAW,CAAC;EACpC,CAAC,CAAC;EACFE,MAAM,EAAE,SAAAA,CAAUC,OAAiC,EAAE;IACnDC,2BAAe,CAACC,OAAO,GAAG,IAAIC,GAAG,CAAC,CAAC;IAEnCC,eAAe,CAACV,MAAM,CAAC,sBAAsB,CAAC,CAACW,GAAG,CAAC,CACjD;MACEC,CAAC,EAAE,CAAC,CAAC,CAAC;MACNC,CAAC,EAAE;IACL,CAAC,CACF,CAAC;IAEFH,eAAe,CAACV,MAAM,CAAC,uBAAuB,CAAC,CAACW,GAAG,CAAC,CAClD;MACEC,CAAC,EAAE,CAAC,CAAC,CAAC;MACNE,CAAC,EAAE,CAACC,sCAAsB;IAC5B,CAAC,CACF,CAAC;IAEFL,eAAe,CAACV,MAAM,CAAC,uBAAuB,CAAC,CAACW,GAAG,CAAC,CAClD;MACEC,CAAC,EAAE,CAAC,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F,CAAC;AAEM,MAAMlB,eAAe,GAAAmB,OAAA,CAAAnB,eAAA,GAAGZ,UAAU,CAACC,mCAAmC;AAE7E,SAASI,WAAWA,CAACa,CAAU,EAAEc,CAAU,EAAW;EACpD,MAAMC,MAAM,GAAGC,KAAK,CAACC,OAAO,CAACjB,CAAC,CAAC;EAC/B,MAAMkB,MAAM,GAAGF,KAAK,CAACC,OAAO,CAACH,CAAC,CAAC;EAC/B,MAAMK,qBAAqB,GACzB,OAAOnB,CAAC,KAAK,QAAQ,IAAI,OAAOc,CAAC,KAAK,QAAQ,IAAIC,MAAM,KAAKG,MAAM;;EAErE;EACA;EACA,IAAI,CAACC,qBAAqB,EAAE,OAAOnB,CAAC,KAAKc,CAAC;;EAE1C;EACA,IAAI,CAACd,CAAC,IAAI,CAACc,CAAC,EAAE;IACZ,OAAOd,CAAC,KAAKc,CAAC;EAChB;;EAEA;EACA,IAAIC,MAAM,IAAIG,MAAM,IAAIlB,CAAC,CAACoB,MAAM,KAAKN,CAAC,CAACM,MAAM,EAAE;IAC7C,OAAO,KAAK;EACd;;EAEA;EACA,KAAK,MAAMC,GAAG,IAAIrB,CAAC,EAAE;IACnB,IACE,CAACb,WAAW,CACTa,CAAC,CAA6BqB,GAAG,CAAC,EAClCP,CAAC,CAA6BO,GAAG,CACpC,CAAC,EACD;MACA,OAAO,KAAK;IACd;EACF;;EAEA;EACA,KAAK,MAAMA,GAAG,IAAIP,CAAC,EAAE;IACnB,IAAI,EAAEO,GAAG,IAAIrB,CAAC,CAAC,EAAE;MACf,OAAO,KAAK;IACd;EACF;EAEA,OAAO,IAAI;AACb","ignoreList":[]}
|
|
@@ -6,16 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.isStyleDescriptorArray = isStyleDescriptorArray;
|
|
7
7
|
exports.isStyleFunction = isStyleFunction;
|
|
8
8
|
function isStyleDescriptorArray(value) {
|
|
9
|
-
|
|
10
|
-
// If its an array and the first item is an object, the only allowed value is an array
|
|
11
|
-
return typeof value[0] === "object" ? Array.isArray(value[0]) : true;
|
|
12
|
-
}
|
|
13
|
-
return false;
|
|
9
|
+
return Array.isArray(value) && !isStyleFunction(value);
|
|
14
10
|
}
|
|
15
11
|
function isStyleFunction(value) {
|
|
16
|
-
if (Array.isArray(value))
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return false;
|
|
12
|
+
if (!Array.isArray(value)) return false;
|
|
13
|
+
const marker = value[0];
|
|
14
|
+
return marker !== null && typeof marker === "object" && !Array.isArray(marker) && Object.keys(marker).length === 0 && typeof value[1] === "string";
|
|
20
15
|
}
|
|
21
16
|
//# sourceMappingURL=style-descriptor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["isStyleDescriptorArray","value","Array","isArray","isStyleFunction","Object","keys","length"],"sourceRoot":"../../../src","sources":["utilities/style-descriptor.ts"],"mappings":";;;;;;;AAEO,SAASA,sBAAsBA,CACpCC,KAAc,EACc;EAC5B,
|
|
1
|
+
{"version":3,"names":["isStyleDescriptorArray","value","Array","isArray","isStyleFunction","marker","Object","keys","length"],"sourceRoot":"../../../src","sources":["utilities/style-descriptor.ts"],"mappings":";;;;;;;AAEO,SAASA,sBAAsBA,CACpCC,KAAc,EACc;EAC5B,OAAOC,KAAK,CAACC,OAAO,CAACF,KAAK,CAAC,IAAI,CAACG,eAAe,CAACH,KAAK,CAAC;AACxD;AAEO,SAASG,eAAeA,CAACH,KAAc,EAA0B;EACtE,IAAI,CAACC,KAAK,CAACC,OAAO,CAACF,KAAK,CAAC,EAAE,OAAO,KAAK;EACvC,MAAMI,MAAe,GAAGJ,KAAK,CAAC,CAAC,CAAC;EAChC,OACEI,MAAM,KAAK,IAAI,IACf,OAAOA,MAAM,KAAK,QAAQ,IAC1B,CAACH,KAAK,CAACC,OAAO,CAACE,MAAM,CAAC,IACtBC,MAAM,CAACC,IAAI,CAACF,MAAM,CAAC,CAACG,MAAM,KAAK,CAAC,IAChC,OAAOP,KAAK,CAAC,CAAC,CAAC,KAAK,QAAQ;AAEhC","ignoreList":[]}
|
package/dist/commonjs/web/api.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_assignStyle","_jsxRuntime","defaultMapping","className","styled","baseComponent","mapping","_options","props","useCssElement","exports","component","incomingProps","key","value","Object","entries","source","target","assignStyle","$$css","split","createElement","colorScheme","get","Appearance","getColorScheme","set","name","setColorScheme","vars","variables","$variables","startsWith","toString","VariableContextProvider","style","useMemo","display","fromEntries","map","jsx","children","useNativeVariable","Error","useUnstableNativeVariable"],"sourceRoot":"../../../src","sources":["web/api.tsx"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_assignStyle","_jsxRuntime","defaultMapping","className","styled","baseComponent","mapping","_options","props","useCssElement","exports","component","incomingProps","key","value","Object","entries","source","target","assignStyle","$$css","split","createElement","colorScheme","get","Appearance","getColorScheme","set","name","setColorScheme","vars","variables","$variables","startsWith","toString","VariableContextProvider","style","useMemo","display","fromEntries","map","jsx","children","useNativeVariable","Error","useUnstableNativeVariable"],"sourceRoot":"../../../src","sources":["web/api.tsx"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAMA,IAAAC,YAAA,GAAAD,OAAA;AAUA,IAAAE,YAAA,GAAAF,OAAA;AAA6C,IAAAG,WAAA,GAAAH,OAAA;AAE7C,MAAMI,cAAsE,GAAG;EAC7EC,SAAS,EAAE;AACb,CAAC;AAEM,MAAMC,MAAc,GAAGA,CAC5BC,aAA6B,EAC7BC,OAA4C,GAAGJ,cAAc,EAC7DK,QAAwB,KACrB;EACH,OAAQC,KAAY,IAAK;IACvB,OAAOC,aAAa,CAACJ,aAAa,EAAEG,KAAK,EAAEF,OAAO,CAAC;EACrD,CAAC;AACH,CAAC;AAACI,OAAA,CAAAN,MAAA,GAAAA,MAAA;AAEK,MAAMK,aAAa,GAAGA,CAC3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|
-
props[target]
|
|
22
|
+
const existing = props[target];
|
|
23
|
+
props[target] = Array.isArray(existing) ? [...existing] : {
|
|
24
|
+
...existing
|
|
25
|
+
};
|
|
23
26
|
assignStyle(value, targets, props[target]);
|
|
24
27
|
return props;
|
|
25
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["assignStyle","value","targets","props","target","shift","length","cb","args"],"sourceRoot":"../../../src","sources":["web/assign-style.ts"],"mappings":";;;;;;AAAA;AACO,SAASA,WAAWA,CACzBC,KAA0B,EAC1BC,OAAiB,EACjBC,KAA0B,EAC1B;EACA,MAAMC,MAAM,GAAGF,OAAO,CAACG,KAAK,CAAC,CAAC;EAE9B,IAAI,CAACD,MAAM,EAAE,OAAO,CAAC,CAAC;EAEtB,IAAIF,OAAO,CAACI,MAAM,KAAK,CAAC,EAAE;IACxB,IAAI,OAAOH,KAAK,CAACC,MAAM,CAAC,KAAK,UAAU,EAAE;MACvC,MAAMG,EAAE,GAAGJ,KAAK,CAACC,MAAM,CAAC;MACxBD,KAAK,CAACC,MAAM,CAAC,GAAG,CAAC,GAAGI,IAAW,KAAK;QAClC,OAAO,CAACD,EAAE,CAAC,GAAGC,IAAI,CAAC,EAAEP,KAAK,CAAC;MAC7B,CAAC;IACH,CAAC,MAAM;MACLE,KAAK,CAACC,MAAM,CAAC,GAAG,CAACD,KAAK,CAACC,MAAM,CAAC,EAAEH,KAAK,CAAC;IACxC;IACA,OAAOE,KAAK;EACd,CAAC,MAAM;
|
|
1
|
+
{"version":3,"names":["assignStyle","value","targets","props","target","shift","length","cb","args","existing","Array","isArray"],"sourceRoot":"../../../src","sources":["web/assign-style.ts"],"mappings":";;;;;;AAAA;AACO,SAASA,WAAWA,CACzBC,KAA0B,EAC1BC,OAAiB,EACjBC,KAA0B,EAC1B;EACA,MAAMC,MAAM,GAAGF,OAAO,CAACG,KAAK,CAAC,CAAC;EAE9B,IAAI,CAACD,MAAM,EAAE,OAAO,CAAC,CAAC;EAEtB,IAAIF,OAAO,CAACI,MAAM,KAAK,CAAC,EAAE;IACxB,IAAI,OAAOH,KAAK,CAACC,MAAM,CAAC,KAAK,UAAU,EAAE;MACvC,MAAMG,EAAE,GAAGJ,KAAK,CAACC,MAAM,CAAC;MACxBD,KAAK,CAACC,MAAM,CAAC,GAAG,CAAC,GAAGI,IAAW,KAAK;QAClC,OAAO,CAACD,EAAE,CAAC,GAAGC,IAAI,CAAC,EAAEP,KAAK,CAAC;MAC7B,CAAC;IACH,CAAC,MAAM;MACLE,KAAK,CAACC,MAAM,CAAC,GAAG,CAACD,KAAK,CAACC,MAAM,CAAC,EAAEH,KAAK,CAAC;IACxC;IACA,OAAOE,KAAK;EACd,CAAC,MAAM;IACL,MAAMM,QAAQ,GAAGN,KAAK,CAACC,MAAM,CAAC;IAC9BD,KAAK,CAACC,MAAM,CAAC,GAAGM,KAAK,CAACC,OAAO,CAACF,QAAQ,CAAC,GAAG,CAAC,GAAGA,QAAQ,CAAC,GAAG;MAAE,GAAGA;IAAS,CAAC;IACzET,WAAW,CAACC,KAAK,EAAEC,OAAO,EAAEC,KAAK,CAACC,MAAM,CAAC,CAAC;IAC1C,OAAOD,KAAK;EACd;AACF","ignoreList":[]}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { resolve } from "path";
|
|
3
|
+
import { basename, dirname, resolve, sep } from "path";
|
|
4
4
|
import { getInteropRequireDefaultSource } from "./helpers.js";
|
|
5
5
|
import { handleReactNativeIdentifierRequire, handleReactNativeImport, handleReactNativeObjectPatternRequire } from "./react-native.js";
|
|
6
|
-
import { handleReactNativeWebIdentifierRequire, handleReactNativeWebImport, handleReactNativeWebObjectPatternRequire } from "./react-native-web.js";
|
|
6
|
+
import { handleReactNativeWebIdentifierRequire, handleReactNativeWebImport, handleReactNativeWebInteropRequireDefault, handleReactNativeWebObjectPatternRequire } from "./react-native-web.js";
|
|
7
7
|
export default function ({
|
|
8
8
|
types: t
|
|
9
9
|
}) {
|
|
10
10
|
const processed = new WeakSet();
|
|
11
|
-
const
|
|
12
|
-
const
|
|
11
|
+
const packageRoot = resolve(__dirname, basename(dirname(__dirname)) === "src" ? "../.." : "../../..");
|
|
12
|
+
const thisModuleDist = resolve(packageRoot, "dist") + sep;
|
|
13
|
+
const thisModuleSrc = resolve(packageRoot, "src") + sep;
|
|
13
14
|
function isFromThisModule(filename) {
|
|
14
15
|
return filename.startsWith(thisModuleDist) || filename.startsWith(thisModuleSrc);
|
|
15
16
|
}
|
|
@@ -58,6 +59,11 @@ export default function ({
|
|
|
58
59
|
if (!(t.isIdentifier(id) || t.isObjectPattern(id))) {
|
|
59
60
|
return;
|
|
60
61
|
}
|
|
62
|
+
|
|
63
|
+
// A local function called require is not the module loader.
|
|
64
|
+
if (path.scope.getBinding("require")) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
61
67
|
const initArg = init.arguments.at(0);
|
|
62
68
|
if (!initArg) {
|
|
63
69
|
return;
|
|
@@ -81,7 +87,7 @@ export default function ({
|
|
|
81
87
|
if (!source) {
|
|
82
88
|
return;
|
|
83
89
|
}
|
|
84
|
-
statements =
|
|
90
|
+
statements = handleReactNativeWebInteropRequireDefault(path, t, id.name, init, source, state.filename);
|
|
85
91
|
}
|
|
86
92
|
if (!statements) {
|
|
87
93
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["resolve","getInteropRequireDefaultSource","handleReactNativeIdentifierRequire","handleReactNativeImport","handleReactNativeObjectPatternRequire","handleReactNativeWebIdentifierRequire","handleReactNativeWebImport","handleReactNativeWebObjectPatternRequire","types","t","processed","WeakSet","
|
|
1
|
+
{"version":3,"names":["basename","dirname","resolve","sep","getInteropRequireDefaultSource","handleReactNativeIdentifierRequire","handleReactNativeImport","handleReactNativeObjectPatternRequire","handleReactNativeWebIdentifierRequire","handleReactNativeWebImport","handleReactNativeWebInteropRequireDefault","handleReactNativeWebObjectPatternRequire","types","t","processed","WeakSet","packageRoot","__dirname","thisModuleDist","thisModuleSrc","isFromThisModule","filename","startsWith","name","visitor","ImportDeclaration","path","state","has","node","statements","statement","add","replaceWithMultiple","VariableDeclaration","firstDeclaration","declarations","at","length","init","id","isCallExpression","isIdentifier","isObjectPattern","scope","getBinding","initArg","arguments","callee","isStringLiteral","value","source"],"sourceRoot":"../../../src","sources":["babel/import-plugin.ts"],"mappings":";;AAAA,SAASA,QAAQ,EAAEC,OAAO,EAAEC,OAAO,EAAEC,GAAG,QAAQ,MAAM;AAKtD,SACEC,8BAA8B,QAGzB,cAAW;AAClB,SACEC,kCAAkC,EAClCC,uBAAuB,EACvBC,qCAAqC,QAChC,mBAAgB;AACvB,SACEC,qCAAqC,EACrCC,0BAA0B,EAC1BC,yCAAyC,EACzCC,wCAAwC,QACnC,uBAAoB;AAE3B,eAAe,UAAU;EACvBC,KAAK,EAAEC;AAGT,CAAC,EAA0B;EACzB,MAAMC,SAAS,GAAG,IAAIC,OAAO,CAAC,CAAC;EAE/B,MAAMC,WAAW,GAAGd,OAAO,CACzBe,SAAS,EACTjB,QAAQ,CAACC,OAAO,CAACgB,SAAS,CAAC,CAAC,KAAK,KAAK,GAAG,OAAO,GAAG,UACrD,CAAC;EACD,MAAMC,cAAc,GAAGhB,OAAO,CAACc,WAAW,EAAE,MAAM,CAAC,GAAGb,GAAG;EACzD,MAAMgB,aAAa,GAAGjB,OAAO,CAACc,WAAW,EAAE,KAAK,CAAC,GAAGb,GAAG;EAEvD,SAASiB,gBAAgBA,CAACC,QAAgB,EAAW;IACnD,OACEA,QAAQ,CAACC,UAAU,CAACJ,cAAc,CAAC,IAAIG,QAAQ,CAACC,UAAU,CAACH,aAAa,CAAC;EAE7E;EAEA,OAAO;IACLI,IAAI,EAAE,0CAA0C;IAChDC,OAAO,EAAE;MACPC,iBAAiBA,CAACC,IAAI,EAAEC,KAAK,EAAQ;QACnC,IACEb,SAAS,CAACc,GAAG,CAACF,IAAI,CAAC,IACnBZ,SAAS,CAACc,GAAG,CA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EAAE;UAAEzB,IAAI,EAAE;QAAyB,CAAC,CAAC,EAC/D;UACA;UACA,MAAM4B,MAAM,GAAG/C,8BAA8B,CAACmC,IAAI,EAAE1B,CAAC,CAAC;UACtD,IAAI,CAACsC,MAAM,EAAE;YACX;UACF;UACArB,UAAU,GAAGpB,yCAAyC,CACpDgB,IAAI,EACJb,CAAC,EACD2B,EAAE,CAACjB,IAAI,EACPgB,IAAI,EACJY,MAAM,EACNxB,KAAK,CAACN,QACR,CAAC;QACH;QAEA,IAAI,CAACS,UAAU,EAAE;UACf;QACF;QAEA,KAAK,MAAMC,SAAS,IAAID,UAAU,EAAE;UAClChB,SAAS,CAACkB,GAAG,CAACD,SAAS,CAAC;QAC1B;QAEAL,IAAI,CAACO,mBAAmB,CAACH,UAAU,CAAC;MACtC;IACF;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { resolve } from "path";
|
|
3
|
+
import { dirname, resolve } from "path";
|
|
4
4
|
import { allowedModules } from "./allowedModules.js";
|
|
5
5
|
function parseReactNativeWebSource(source, filename) {
|
|
6
6
|
if (source.startsWith(".")) {
|
|
7
|
-
source = resolve(filename, source);
|
|
7
|
+
source = resolve(dirname(filename), source);
|
|
8
8
|
const internalPath = source.split("react-native-web/dist")[1];
|
|
9
9
|
if (!internalPath) {
|
|
10
10
|
return;
|
|
@@ -34,6 +34,7 @@ export function handleReactNativeWebImport(declaration, t, filename) {
|
|
|
34
34
|
specifiers,
|
|
35
35
|
source
|
|
36
36
|
} = declaration;
|
|
37
|
+
if (declaration.importKind && declaration.importKind !== "value") return;
|
|
37
38
|
const rnwSource = parseReactNativeWebSource(source.value, filename);
|
|
38
39
|
if (!rnwSource) {
|
|
39
40
|
return;
|
|
@@ -51,11 +52,15 @@ export function handleReactNativeWebImport(declaration, t, filename) {
|
|
|
51
52
|
if (!name) {
|
|
52
53
|
statements.push(t.importDeclaration([t.importDefaultSpecifier(specifier.local)], t.stringLiteral(newSource)));
|
|
53
54
|
} else {
|
|
54
|
-
statements.push(t.importDeclaration([t.importSpecifier(specifier.local,
|
|
55
|
+
statements.push(t.importDeclaration([t.importSpecifier(specifier.local, t.identifier(name))], t.stringLiteral(`react-native-css/components/${name}`)));
|
|
55
56
|
}
|
|
56
57
|
} else if (t.isImportNamespaceSpecifier(specifier)) {
|
|
57
58
|
statements.push(t.importDeclaration([specifier], t.stringLiteral("react-native-css/components")));
|
|
58
59
|
} else {
|
|
60
|
+
if (specifier.importKind && specifier.importKind !== "value") {
|
|
61
|
+
statements.push(t.importDeclaration([specifier], source));
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
59
64
|
const localName = t.isStringLiteral(specifier.imported) ? specifier.imported.value : specifier.imported.name;
|
|
60
65
|
if (!allowedModules.has(localName)) {
|
|
61
66
|
statements.push(t.importDeclaration([specifier], source));
|
|
@@ -81,6 +86,13 @@ export function handleReactNativeWebIdentifierRequire(path, t, id, source, filen
|
|
|
81
86
|
return [t.variableDeclaration(path.node.kind, [t.variableDeclarator(t.identifier(id), t.callExpression(t.identifier("require"), [t.stringLiteral(newSource)]))])];
|
|
82
87
|
}
|
|
83
88
|
}
|
|
89
|
+
export function handleReactNativeWebInteropRequireDefault(path, t, id, init, source, filename) {
|
|
90
|
+
const parsed = parseReactNativeWebSource(source, filename);
|
|
91
|
+
if (!parsed) return;
|
|
92
|
+
const wrapped = t.cloneNode(init);
|
|
93
|
+
wrapped.arguments = [t.callExpression(t.identifier("require"), [t.stringLiteral(parsed.source)])];
|
|
94
|
+
return [t.variableDeclaration(path.node.kind, [t.variableDeclarator(t.identifier(id), wrapped)])];
|
|
95
|
+
}
|
|
84
96
|
export function handleReactNativeWebObjectPatternRequire(path, t, id, source, filename) {
|
|
85
97
|
const parsedSource = parseReactNativeWebSource(source, filename);
|
|
86
98
|
|
|
@@ -94,7 +106,7 @@ export function handleReactNativeWebObjectPatternRequire(path, t, id, source, fi
|
|
|
94
106
|
// Bail out on `const { ...rest } = require('react-native-web');`
|
|
95
107
|
// We need to exit as we do not handle `const { Text, ...rest } = require('react-native-web');`
|
|
96
108
|
return;
|
|
97
|
-
} else if (!(t.isIdentifier(identifier.value) && t.isIdentifier(identifier.key))) {
|
|
109
|
+
} else if (identifier.computed || !(t.isIdentifier(identifier.value) && t.isIdentifier(identifier.key))) {
|
|
98
110
|
// Bail out on anything that isn't `const { <key>: <identifier> } = require('react-native-web');`
|
|
99
111
|
return;
|
|
100
112
|
} else {
|