react-native-css 3.0.0-nightly.fa5e95b → 3.0.0-preview.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/compiler/atRules.js +15 -2
- package/dist/commonjs/compiler/atRules.js.map +1 -1
- package/dist/commonjs/compiler/compiler.js +13 -8
- package/dist/commonjs/compiler/compiler.js.map +1 -1
- package/dist/commonjs/compiler/declarations.js +323 -176
- package/dist/commonjs/compiler/declarations.js.map +1 -1
- package/dist/commonjs/compiler/inheritance.test.js +12 -12
- package/dist/commonjs/compiler/inheritance.test.js.map +1 -1
- package/dist/commonjs/compiler/keyframes.js +1 -1
- package/dist/commonjs/compiler/keyframes.js.map +1 -1
- package/dist/commonjs/compiler/pseudo-elements.js +49 -0
- package/dist/commonjs/compiler/pseudo-elements.js.map +1 -0
- package/dist/commonjs/compiler/selector-builder.js +501 -0
- package/dist/commonjs/compiler/selector-builder.js.map +1 -0
- package/dist/commonjs/compiler/selectors.js +10 -6
- package/dist/commonjs/compiler/selectors.js.map +1 -1
- package/dist/commonjs/compiler/stylesheet.js +63 -25
- package/dist/commonjs/compiler/stylesheet.js.map +1 -1
- package/dist/commonjs/compiler/supports.js +27 -0
- package/dist/commonjs/compiler/supports.js.map +1 -0
- package/dist/commonjs/components/ActivityIndicator.js +22 -0
- package/dist/commonjs/components/ActivityIndicator.js.map +1 -0
- package/dist/commonjs/components/Button.js +22 -0
- package/dist/commonjs/components/Button.js.map +1 -0
- package/dist/commonjs/components/FlatList.js +19 -0
- package/dist/commonjs/components/FlatList.js.map +1 -0
- package/dist/commonjs/components/Image.js +17 -0
- package/dist/commonjs/components/Image.js.map +1 -0
- package/dist/commonjs/components/Switch.js +17 -0
- package/dist/commonjs/components/Switch.js.map +1 -0
- package/dist/commonjs/components/TextInput.js +17 -0
- package/dist/commonjs/components/TextInput.js.map +1 -0
- package/dist/commonjs/components/index.js +48 -0
- package/dist/commonjs/components/index.js.map +1 -1
- package/dist/commonjs/components/react-native-safe-area-context.js +17 -0
- package/dist/commonjs/components/react-native-safe-area-context.js.map +1 -0
- package/dist/commonjs/components/react-native-safe-area-context.native.js +53 -0
- package/dist/commonjs/components/react-native-safe-area-context.native.js.map +1 -0
- package/dist/commonjs/jest/index.js +24 -18
- package/dist/commonjs/jest/index.js.map +1 -1
- package/dist/commonjs/metro/index.js +7 -4
- package/dist/commonjs/metro/index.js.map +1 -1
- package/dist/commonjs/metro/injection-code.js +5 -10
- package/dist/commonjs/metro/injection-code.js.map +1 -1
- package/dist/commonjs/metro/metro-transformer.js +18 -8
- package/dist/commonjs/metro/metro-transformer.js.map +1 -1
- package/dist/commonjs/metro/resolver.js +3 -0
- package/dist/commonjs/metro/resolver.js.map +1 -1
- package/dist/commonjs/poison.pill.js +10 -10
- package/dist/commonjs/runtime/native/api.js +29 -4
- package/dist/commonjs/runtime/native/api.js.map +1 -1
- package/dist/commonjs/runtime/native/conditions/attributes.js +42 -0
- package/dist/commonjs/runtime/native/conditions/attributes.js.map +1 -0
- package/dist/commonjs/runtime/native/conditions/container-query.js +7 -0
- package/dist/commonjs/runtime/native/conditions/container-query.js.map +1 -1
- package/dist/commonjs/runtime/native/conditions/index.js +6 -40
- package/dist/commonjs/runtime/native/conditions/index.js.map +1 -1
- package/dist/commonjs/runtime/native/conditions/media-query.js +16 -11
- package/dist/commonjs/runtime/native/conditions/media-query.js.map +1 -1
- package/dist/commonjs/runtime/native/react/rules.js +26 -20
- package/dist/commonjs/runtime/native/react/rules.js.map +1 -1
- package/dist/commonjs/runtime/native/react/useNativeCss.js +2 -2
- package/dist/commonjs/runtime/native/react/useNativeCss.js.map +1 -1
- package/dist/commonjs/runtime/native/reactivity.js +12 -25
- package/dist/commonjs/runtime/native/reactivity.js.map +1 -1
- package/dist/commonjs/runtime/native/reanimated.js +17 -0
- package/dist/commonjs/runtime/native/reanimated.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/calculate-props.js +29 -9
- package/dist/commonjs/runtime/native/styles/calculate-props.js.map +1 -1
- package/dist/commonjs/runtime/native/styles/defaults.js +1 -1
- package/dist/commonjs/runtime/native/styles/defaults.js.map +1 -1
- package/dist/commonjs/runtime/native/styles/functions/animation-timing.js +34 -0
- package/dist/commonjs/runtime/native/styles/functions/animation-timing.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/functions/calc.js +125 -0
- package/dist/commonjs/runtime/native/styles/functions/calc.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/{filters.js → functions/filters.js} +3 -3
- package/dist/commonjs/runtime/native/styles/functions/filters.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/functions/index.js +83 -0
- package/dist/commonjs/runtime/native/styles/functions/index.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/functions/numeric-functions.js +32 -0
- package/dist/commonjs/runtime/native/styles/functions/numeric-functions.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/{platform-functions.js → functions/platform-functions.js} +3 -3
- package/dist/commonjs/runtime/native/styles/functions/platform-functions.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/functions/string-functions.js +23 -0
- package/dist/commonjs/runtime/native/styles/functions/string-functions.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/functions/transform-functions.js +121 -0
- package/dist/commonjs/runtime/native/styles/functions/transform-functions.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/resolve.js +21 -44
- package/dist/commonjs/runtime/native/styles/resolve.js.map +1 -1
- package/dist/commonjs/runtime/native/styles/{shorthand.js → shorthands/_handler.js} +5 -5
- package/dist/commonjs/runtime/native/styles/shorthands/_handler.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/{animation.js → shorthands/animation.js} +6 -37
- package/dist/commonjs/runtime/native/styles/shorthands/animation.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/{border.js → shorthands/border.js} +2 -2
- package/dist/commonjs/runtime/native/styles/shorthands/border.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/shorthands/box-shadow.js +50 -0
- package/dist/commonjs/runtime/native/styles/shorthands/box-shadow.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/shorthands/index.js +61 -0
- package/dist/commonjs/runtime/native/styles/shorthands/index.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/{text-shadow.js → shorthands/text-shadow.js} +2 -2
- package/dist/commonjs/runtime/native/styles/shorthands/text-shadow.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/{transform.js → shorthands/transform.js} +1 -1
- package/dist/commonjs/runtime/native/styles/shorthands/transform.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/units.js +11 -9
- package/dist/commonjs/runtime/native/styles/units.js.map +1 -1
- package/dist/commonjs/runtime/native/styles/variables.js +3 -2
- package/dist/commonjs/runtime/native/styles/variables.js.map +1 -1
- package/dist/commonjs/runtime/utils/objects.js +14 -6
- package/dist/commonjs/runtime/utils/objects.js.map +1 -1
- package/dist/commonjs/runtime/utils/specificity.js +2 -1
- package/dist/commonjs/runtime/utils/specificity.js.map +1 -1
- package/dist/commonjs/runtime/web/api.js +18 -0
- package/dist/commonjs/runtime/web/api.js.map +1 -1
- package/dist/commonjs/style-collection/index.js +110 -0
- package/dist/commonjs/style-collection/index.js.map +1 -0
- package/dist/commonjs/style-collection/root.js +29 -0
- package/dist/commonjs/style-collection/root.js.map +1 -0
- package/dist/module/compiler/atRules.js +15 -2
- package/dist/module/compiler/atRules.js.map +1 -1
- package/dist/module/compiler/compiler.js +13 -8
- package/dist/module/compiler/compiler.js.map +1 -1
- package/dist/module/compiler/compiler.types.js +1 -1
- package/dist/module/compiler/compiler.types.js.map +1 -1
- package/dist/module/compiler/declarations.js +314 -172
- package/dist/module/compiler/declarations.js.map +1 -1
- package/dist/module/compiler/inheritance.test.js +12 -12
- package/dist/module/compiler/inheritance.test.js.map +1 -1
- package/dist/module/compiler/keyframes.js +1 -1
- package/dist/module/compiler/keyframes.js.map +1 -1
- package/dist/module/compiler/pseudo-elements.js +44 -0
- package/dist/module/compiler/pseudo-elements.js.map +1 -0
- package/dist/module/compiler/selector-builder.js +496 -0
- package/dist/module/compiler/selector-builder.js.map +1 -0
- package/dist/module/compiler/selectors.js +10 -6
- package/dist/module/compiler/selectors.js.map +1 -1
- package/dist/module/compiler/stylesheet.js +61 -23
- package/dist/module/compiler/stylesheet.js.map +1 -1
- package/dist/module/compiler/supports.js +23 -0
- package/dist/module/compiler/supports.js.map +1 -0
- package/dist/module/components/ActivityIndicator.js +17 -0
- package/dist/module/components/ActivityIndicator.js.map +1 -0
- package/dist/module/components/Button.js +17 -0
- package/dist/module/components/Button.js.map +1 -0
- package/dist/module/components/FlatList.js +14 -0
- package/dist/module/components/FlatList.js.map +1 -0
- package/dist/module/components/Image.js +12 -0
- package/dist/module/components/Image.js.map +1 -0
- package/dist/module/components/Switch.js +12 -0
- package/dist/module/components/Switch.js.map +1 -0
- package/dist/module/components/TextInput.js +12 -0
- package/dist/module/components/TextInput.js.map +1 -0
- package/dist/module/components/index.js +6 -0
- package/dist/module/components/index.js.map +1 -1
- package/dist/module/components/react-native-safe-area-context.js +4 -0
- package/dist/module/components/react-native-safe-area-context.js.map +1 -0
- package/dist/module/components/react-native-safe-area-context.native.js +36 -0
- package/dist/module/components/react-native-safe-area-context.native.js.map +1 -0
- package/dist/module/jest/index.js +23 -18
- package/dist/module/jest/index.js.map +1 -1
- package/dist/module/metro/index.js +7 -4
- package/dist/module/metro/index.js.map +1 -1
- package/dist/module/metro/injection-code.js +5 -10
- package/dist/module/metro/injection-code.js.map +1 -1
- package/dist/module/metro/metro-transformer.js +18 -8
- package/dist/module/metro/metro-transformer.js.map +1 -1
- package/dist/module/metro/resolver.js +3 -0
- package/dist/module/metro/resolver.js.map +1 -1
- package/dist/module/poison.pill.js +10 -10
- package/dist/module/runtime/native/api.js +23 -4
- package/dist/module/runtime/native/api.js.map +1 -1
- package/dist/module/runtime/native/conditions/attributes.js +38 -0
- package/dist/module/runtime/native/conditions/attributes.js.map +1 -0
- package/dist/module/runtime/native/conditions/container-query.js +7 -0
- package/dist/module/runtime/native/conditions/container-query.js.map +1 -1
- package/dist/module/runtime/native/conditions/index.js +6 -40
- package/dist/module/runtime/native/conditions/index.js.map +1 -1
- package/dist/module/runtime/native/conditions/media-query.js +17 -12
- package/dist/module/runtime/native/conditions/media-query.js.map +1 -1
- package/dist/module/runtime/native/react/rules.js +24 -19
- package/dist/module/runtime/native/react/rules.js.map +1 -1
- package/dist/module/runtime/native/react/useNativeCss.js +1 -1
- package/dist/module/runtime/native/react/useNativeCss.js.map +1 -1
- package/dist/module/runtime/native/reactivity.js +11 -24
- package/dist/module/runtime/native/reactivity.js.map +1 -1
- package/dist/module/runtime/native/reanimated.js +13 -0
- package/dist/module/runtime/native/reanimated.js.map +1 -0
- package/dist/module/runtime/native/styles/calculate-props.js +30 -10
- package/dist/module/runtime/native/styles/calculate-props.js.map +1 -1
- package/dist/module/runtime/native/styles/defaults.js +1 -1
- package/dist/module/runtime/native/styles/defaults.js.map +1 -1
- package/dist/module/runtime/native/styles/functions/animation-timing.js +30 -0
- package/dist/module/runtime/native/styles/functions/animation-timing.js.map +1 -0
- package/dist/module/runtime/native/styles/functions/calc.js +120 -0
- package/dist/module/runtime/native/styles/functions/calc.js.map +1 -0
- package/dist/module/runtime/native/styles/{filters.js → functions/filters.js} +2 -2
- package/dist/module/runtime/native/styles/functions/filters.js.map +1 -0
- package/dist/module/runtime/native/styles/functions/index.js +10 -0
- package/dist/module/runtime/native/styles/functions/index.js.map +1 -0
- package/dist/module/runtime/native/styles/functions/numeric-functions.js +25 -0
- package/dist/module/runtime/native/styles/functions/numeric-functions.js.map +1 -0
- package/dist/module/runtime/native/styles/{platform-functions.js → functions/platform-functions.js} +1 -1
- package/dist/module/runtime/native/styles/functions/platform-functions.js.map +1 -0
- package/dist/module/runtime/native/styles/functions/string-functions.js +18 -0
- package/dist/module/runtime/native/styles/functions/string-functions.js.map +1 -0
- package/dist/module/runtime/native/styles/functions/transform-functions.js +114 -0
- package/dist/module/runtime/native/styles/functions/transform-functions.js.map +1 -0
- package/dist/module/runtime/native/styles/resolve.js +20 -44
- package/dist/module/runtime/native/styles/resolve.js.map +1 -1
- package/dist/module/runtime/native/styles/{shorthand.js → shorthands/_handler.js} +5 -5
- package/dist/module/runtime/native/styles/shorthands/_handler.js.map +1 -0
- package/dist/module/runtime/native/styles/{animation.js → shorthands/animation.js} +3 -34
- package/dist/module/runtime/native/styles/shorthands/animation.js.map +1 -0
- package/dist/module/runtime/native/styles/{border.js → shorthands/border.js} +1 -1
- package/dist/module/runtime/native/styles/shorthands/border.js.map +1 -0
- package/dist/module/runtime/native/styles/{box-shadow.js → shorthands/box-shadow.js} +16 -6
- package/dist/module/runtime/native/styles/shorthands/box-shadow.js.map +1 -0
- package/dist/module/runtime/native/styles/shorthands/index.js +8 -0
- package/dist/module/runtime/native/styles/shorthands/index.js.map +1 -0
- package/dist/module/runtime/native/styles/{text-shadow.js → shorthands/text-shadow.js} +1 -1
- package/dist/module/runtime/native/styles/shorthands/text-shadow.js.map +1 -0
- package/dist/module/runtime/native/styles/{transform.js → shorthands/transform.js} +1 -1
- package/dist/module/runtime/native/styles/shorthands/transform.js.map +1 -0
- package/dist/module/runtime/native/styles/units.js +12 -9
- package/dist/module/runtime/native/styles/units.js.map +1 -1
- package/dist/module/runtime/native/styles/variables.js +2 -1
- package/dist/module/runtime/native/styles/variables.js.map +1 -1
- package/dist/module/runtime/utils/objects.js +14 -6
- package/dist/module/runtime/utils/objects.js.map +1 -1
- package/dist/module/runtime/utils/specificity.js +2 -1
- package/dist/module/runtime/utils/specificity.js.map +1 -1
- package/dist/module/runtime/web/api.js +18 -1
- package/dist/module/runtime/web/api.js.map +1 -1
- package/dist/module/style-collection/index.js +95 -0
- package/dist/module/style-collection/index.js.map +1 -0
- package/dist/module/style-collection/root.js +25 -0
- package/dist/module/style-collection/root.js.map +1 -0
- package/dist/typescript/commonjs/src/compiler/atRules.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/compiler.d.ts +1 -1
- package/dist/typescript/commonjs/src/compiler/compiler.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts +11 -13
- package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/declarations.d.ts +26 -17
- package/dist/typescript/commonjs/src/compiler/declarations.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/pseudo-elements.d.ts +4 -0
- package/dist/typescript/commonjs/src/compiler/pseudo-elements.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts +24 -0
- package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/selectors.d.ts +3 -2
- package/dist/typescript/commonjs/src/compiler/selectors.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts +7 -7
- package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/supports.d.ts +3 -0
- package/dist/typescript/commonjs/src/compiler/supports.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts +13 -0
- package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/Button.d.ts +13 -0
- package/dist/typescript/commonjs/src/components/Button.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/FlatList.d.ts +10 -0
- package/dist/typescript/commonjs/src/components/FlatList.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/Image.d.ts +8 -0
- package/dist/typescript/commonjs/src/components/Image.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/Switch.d.ts +8 -0
- package/dist/typescript/commonjs/src/components/Switch.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/TextInput.d.ts +8 -0
- package/dist/typescript/commonjs/src/components/TextInput.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/index.d.ts +6 -0
- package/dist/typescript/commonjs/src/components/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/react-native-safe-area-context.d.ts +2 -0
- package/dist/typescript/commonjs/src/components/react-native-safe-area-context.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/react-native-safe-area-context.native.d.ts +4 -0
- package/dist/typescript/commonjs/src/components/react-native-safe-area-context.native.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/jest/index.d.ts +13 -3
- package/dist/typescript/commonjs/src/jest/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/metro/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/metro/injection-code.d.ts +4 -7
- package/dist/typescript/commonjs/src/metro/injection-code.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts +4 -1
- package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/metro/resolver.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/api.d.ts +16 -2
- package/dist/typescript/commonjs/src/runtime/native/api.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/conditions/attributes.d.ts +5 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/attributes.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/container-query.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/conditions/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/react/rules.d.ts +2 -2
- package/dist/typescript/commonjs/src/runtime/native/react/rules.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/react/useNativeCss.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/reactivity.d.ts +1 -11
- package/dist/typescript/commonjs/src/runtime/native/reactivity.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/reanimated.d.ts +5 -0
- package/dist/typescript/commonjs/src/runtime/native/reanimated.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/calculate-props.d.ts +1 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/calculate-props.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/defaults.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/animation-timing.d.ts +4 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/animation-timing.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/calc.d.ts +3 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/calc.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/{filters.d.ts → functions/filters.d.ts} +1 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/filters.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/index.d.ts +8 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/numeric-functions.d.ts +5 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/numeric-functions.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/{platform-functions.d.ts → functions/platform-functions.d.ts} +2 -2
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/platform-functions.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/string-functions.d.ts +3 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/string-functions.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/transform-functions.d.ts +5 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/transform-functions.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/resolve.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/{shorthand.d.ts → shorthands/_handler.d.ts} +2 -2
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/_handler.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/animation.d.ts +4 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/animation.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/border.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/border.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/box-shadow.d.ts +3 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/box-shadow.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/index.d.ts +6 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/text-shadow.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/text-shadow.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/{transform.d.ts → shorthands/transform.d.ts} +1 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/transform.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/units.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/variables.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/utils/objects.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/utils/specificity.d.ts +1 -0
- package/dist/typescript/commonjs/src/runtime/utils/specificity.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/web/api.d.ts +9 -3
- package/dist/typescript/commonjs/src/runtime/web/api.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/style-collection/index.d.ts +14 -0
- package/dist/typescript/commonjs/src/style-collection/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/style-collection/root.d.ts +11 -0
- package/dist/typescript/commonjs/src/style-collection/root.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/atRules.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/compiler.d.ts +1 -1
- package/dist/typescript/module/src/compiler/compiler.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/compiler.types.d.ts +11 -13
- package/dist/typescript/module/src/compiler/compiler.types.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/declarations.d.ts +26 -17
- package/dist/typescript/module/src/compiler/declarations.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/pseudo-elements.d.ts +4 -0
- package/dist/typescript/module/src/compiler/pseudo-elements.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/selector-builder.d.ts +24 -0
- package/dist/typescript/module/src/compiler/selector-builder.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/selectors.d.ts +3 -2
- package/dist/typescript/module/src/compiler/selectors.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/stylesheet.d.ts +7 -7
- package/dist/typescript/module/src/compiler/stylesheet.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/supports.d.ts +3 -0
- package/dist/typescript/module/src/compiler/supports.d.ts.map +1 -0
- package/dist/typescript/module/src/components/ActivityIndicator.d.ts +13 -0
- package/dist/typescript/module/src/components/ActivityIndicator.d.ts.map +1 -0
- package/dist/typescript/module/src/components/Button.d.ts +13 -0
- package/dist/typescript/module/src/components/Button.d.ts.map +1 -0
- package/dist/typescript/module/src/components/FlatList.d.ts +10 -0
- package/dist/typescript/module/src/components/FlatList.d.ts.map +1 -0
- package/dist/typescript/module/src/components/Image.d.ts +8 -0
- package/dist/typescript/module/src/components/Image.d.ts.map +1 -0
- package/dist/typescript/module/src/components/Switch.d.ts +8 -0
- package/dist/typescript/module/src/components/Switch.d.ts.map +1 -0
- package/dist/typescript/module/src/components/TextInput.d.ts +8 -0
- package/dist/typescript/module/src/components/TextInput.d.ts.map +1 -0
- package/dist/typescript/module/src/components/index.d.ts +6 -0
- package/dist/typescript/module/src/components/index.d.ts.map +1 -1
- package/dist/typescript/module/src/components/react-native-safe-area-context.d.ts +2 -0
- package/dist/typescript/module/src/components/react-native-safe-area-context.d.ts.map +1 -0
- package/dist/typescript/module/src/components/react-native-safe-area-context.native.d.ts +4 -0
- package/dist/typescript/module/src/components/react-native-safe-area-context.native.d.ts.map +1 -0
- package/dist/typescript/module/src/jest/index.d.ts +13 -3
- package/dist/typescript/module/src/jest/index.d.ts.map +1 -1
- package/dist/typescript/module/src/metro/index.d.ts.map +1 -1
- package/dist/typescript/module/src/metro/injection-code.d.ts +4 -7
- package/dist/typescript/module/src/metro/injection-code.d.ts.map +1 -1
- package/dist/typescript/module/src/metro/metro-transformer.d.ts +4 -1
- package/dist/typescript/module/src/metro/metro-transformer.d.ts.map +1 -1
- package/dist/typescript/module/src/metro/resolver.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/api.d.ts +16 -2
- package/dist/typescript/module/src/runtime/native/api.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/conditions/attributes.d.ts +5 -0
- package/dist/typescript/module/src/runtime/native/conditions/attributes.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/conditions/container-query.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/conditions/index.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/react/rules.d.ts +2 -2
- package/dist/typescript/module/src/runtime/native/react/rules.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/react/useNativeCss.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/reactivity.d.ts +1 -11
- package/dist/typescript/module/src/runtime/native/reactivity.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/reanimated.d.ts +5 -0
- package/dist/typescript/module/src/runtime/native/reanimated.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/calculate-props.d.ts +1 -1
- package/dist/typescript/module/src/runtime/native/styles/calculate-props.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/styles/defaults.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/styles/functions/animation-timing.d.ts +4 -0
- package/dist/typescript/module/src/runtime/native/styles/functions/animation-timing.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/functions/calc.d.ts +3 -0
- package/dist/typescript/module/src/runtime/native/styles/functions/calc.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/{filters.d.ts → functions/filters.d.ts} +1 -1
- package/dist/typescript/module/src/runtime/native/styles/functions/filters.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/functions/index.d.ts +8 -0
- package/dist/typescript/module/src/runtime/native/styles/functions/index.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/functions/numeric-functions.d.ts +5 -0
- package/dist/typescript/module/src/runtime/native/styles/functions/numeric-functions.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/{platform-functions.d.ts → functions/platform-functions.d.ts} +2 -2
- package/dist/typescript/module/src/runtime/native/styles/functions/platform-functions.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/functions/string-functions.d.ts +3 -0
- package/dist/typescript/module/src/runtime/native/styles/functions/string-functions.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/functions/transform-functions.d.ts +5 -0
- package/dist/typescript/module/src/runtime/native/styles/functions/transform-functions.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/resolve.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/styles/{shorthand.d.ts → shorthands/_handler.d.ts} +2 -2
- package/dist/typescript/module/src/runtime/native/styles/shorthands/_handler.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/shorthands/animation.d.ts +4 -0
- package/dist/typescript/module/src/runtime/native/styles/shorthands/animation.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/shorthands/border.d.ts +2 -0
- package/dist/typescript/module/src/runtime/native/styles/shorthands/border.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/shorthands/box-shadow.d.ts +3 -0
- package/dist/typescript/module/src/runtime/native/styles/shorthands/box-shadow.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/shorthands/index.d.ts +6 -0
- package/dist/typescript/module/src/runtime/native/styles/shorthands/index.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/shorthands/text-shadow.d.ts +2 -0
- package/dist/typescript/module/src/runtime/native/styles/shorthands/text-shadow.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/{transform.d.ts → shorthands/transform.d.ts} +1 -1
- package/dist/typescript/module/src/runtime/native/styles/shorthands/transform.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/units.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/styles/variables.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/utils/objects.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/utils/specificity.d.ts +1 -0
- package/dist/typescript/module/src/runtime/utils/specificity.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/web/api.d.ts +9 -3
- package/dist/typescript/module/src/runtime/web/api.d.ts.map +1 -1
- package/dist/typescript/module/src/style-collection/index.d.ts +14 -0
- package/dist/typescript/module/src/style-collection/index.d.ts.map +1 -0
- package/dist/typescript/module/src/style-collection/root.d.ts +11 -0
- package/dist/typescript/module/src/style-collection/root.d.ts.map +1 -0
- package/package.json +30 -15
- package/src/compiler/atRules.ts +16 -2
- package/src/compiler/compiler.ts +12 -10
- package/src/compiler/compiler.types.ts +11 -14
- package/src/compiler/declarations.ts +518 -215
- package/src/compiler/inheritance.test.ts +10 -10
- package/src/compiler/keyframes.ts +1 -1
- package/src/compiler/pseudo-elements.ts +54 -0
- package/src/compiler/selector-builder.ts +586 -0
- package/src/compiler/selectors.ts +20 -6
- package/src/compiler/stylesheet.ts +93 -33
- package/src/compiler/supports.ts +26 -0
- package/src/components/ActivityIndicator.tsx +27 -0
- package/src/components/Button.tsx +22 -0
- package/src/components/FlatList.tsx +21 -0
- package/src/components/Image.tsx +17 -0
- package/src/components/Switch.tsx +17 -0
- package/src/components/TextInput.tsx +17 -0
- package/src/components/index.tsx +6 -0
- package/src/components/react-native-safe-area-context.native.tsx +40 -0
- package/src/components/react-native-safe-area-context.tsx +1 -0
- package/src/jest/index.ts +26 -17
- package/src/metro/index.ts +12 -7
- package/src/metro/injection-code.ts +6 -10
- package/src/metro/metro-transformer.ts +27 -10
- package/src/metro/resolver.ts +8 -0
- package/src/poison.pill.ts +10 -10
- package/src/runtime/native/{api.ts → api.tsx} +34 -5
- package/src/runtime/native/conditions/attributes.ts +52 -0
- package/src/runtime/native/conditions/container-query.ts +5 -0
- package/src/runtime/native/conditions/index.ts +7 -59
- package/src/runtime/native/conditions/media-query.ts +18 -12
- package/src/runtime/native/react/rules.ts +27 -17
- package/src/runtime/native/react/useNativeCss.ts +1 -1
- package/src/runtime/native/reactivity.ts +13 -33
- package/src/runtime/native/reanimated.ts +22 -0
- package/src/runtime/native/styles/calculate-props.ts +30 -8
- package/src/runtime/native/styles/defaults.ts +1 -0
- package/src/runtime/native/styles/functions/animation-timing.ts +44 -0
- package/src/runtime/native/styles/functions/calc.ts +121 -0
- package/src/runtime/native/styles/{filters.ts → functions/filters.ts} +3 -3
- package/src/runtime/native/styles/functions/index.ts +7 -0
- package/src/runtime/native/styles/functions/numeric-functions.ts +38 -0
- package/src/runtime/native/styles/{platform-functions.ts → functions/platform-functions.ts} +2 -2
- package/src/runtime/native/styles/functions/string-functions.ts +22 -0
- package/src/runtime/native/styles/functions/transform-functions.ts +84 -0
- package/src/runtime/native/styles/resolve.ts +20 -63
- package/src/runtime/native/styles/{shorthand.ts → shorthands/_handler.ts} +5 -5
- package/src/runtime/native/styles/{animation.ts → shorthands/animation.ts} +4 -62
- package/src/runtime/native/styles/{border.ts → shorthands/border.ts} +1 -1
- package/src/runtime/native/styles/shorthands/box-shadow.ts +74 -0
- package/src/runtime/native/styles/shorthands/index.ts +5 -0
- package/src/runtime/native/styles/{text-shadow.ts → shorthands/text-shadow.ts} +1 -1
- package/src/runtime/native/styles/{transform.ts → shorthands/transform.ts} +4 -2
- package/src/runtime/native/styles/units.ts +14 -9
- package/src/runtime/native/styles/variables.ts +5 -5
- package/src/runtime/utils/objects.ts +16 -4
- package/src/runtime/utils/specificity.ts +1 -0
- package/src/runtime/web/{api.ts → api.tsx} +29 -3
- package/src/style-collection/index.ts +142 -0
- package/src/style-collection/root.ts +37 -0
- package/dist/commonjs/compiler/attributes.test.js +0 -20
- package/dist/commonjs/compiler/attributes.test.js.map +0 -1
- package/dist/commonjs/doctor/index.js +0 -6
- package/dist/commonjs/doctor/index.js.map +0 -1
- package/dist/commonjs/runtime/native/injection.js +0 -98
- package/dist/commonjs/runtime/native/injection.js.map +0 -1
- package/dist/commonjs/runtime/native/styles/animation.js.map +0 -1
- package/dist/commonjs/runtime/native/styles/border.js.map +0 -1
- package/dist/commonjs/runtime/native/styles/box-shadow.js +0 -40
- package/dist/commonjs/runtime/native/styles/box-shadow.js.map +0 -1
- package/dist/commonjs/runtime/native/styles/calc.js +0 -85
- package/dist/commonjs/runtime/native/styles/calc.js.map +0 -1
- package/dist/commonjs/runtime/native/styles/filters.js.map +0 -1
- package/dist/commonjs/runtime/native/styles/platform-functions.js.map +0 -1
- package/dist/commonjs/runtime/native/styles/shorthand.js.map +0 -1
- package/dist/commonjs/runtime/native/styles/text-shadow.js.map +0 -1
- package/dist/commonjs/runtime/native/styles/transform.js.map +0 -1
- package/dist/module/compiler/attributes.test.js +0 -20
- package/dist/module/compiler/attributes.test.js.map +0 -1
- package/dist/module/doctor/index.js +0 -4
- package/dist/module/doctor/index.js.map +0 -1
- package/dist/module/runtime/native/injection.js +0 -93
- package/dist/module/runtime/native/injection.js.map +0 -1
- package/dist/module/runtime/native/styles/animation.js.map +0 -1
- package/dist/module/runtime/native/styles/border.js.map +0 -1
- package/dist/module/runtime/native/styles/box-shadow.js.map +0 -1
- package/dist/module/runtime/native/styles/calc.js +0 -79
- package/dist/module/runtime/native/styles/calc.js.map +0 -1
- package/dist/module/runtime/native/styles/filters.js.map +0 -1
- package/dist/module/runtime/native/styles/platform-functions.js.map +0 -1
- package/dist/module/runtime/native/styles/shorthand.js.map +0 -1
- package/dist/module/runtime/native/styles/text-shadow.js.map +0 -1
- package/dist/module/runtime/native/styles/transform.js.map +0 -1
- package/dist/typescript/commonjs/src/compiler/attributes.test.d.ts +0 -2
- package/dist/typescript/commonjs/src/compiler/attributes.test.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/doctor/index.d.ts +0 -2
- package/dist/typescript/commonjs/src/doctor/index.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/injection.d.ts +0 -16
- package/dist/typescript/commonjs/src/runtime/native/injection.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/animation.d.ts +0 -9
- package/dist/typescript/commonjs/src/runtime/native/styles/animation.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/border.d.ts +0 -2
- package/dist/typescript/commonjs/src/runtime/native/styles/border.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/box-shadow.d.ts +0 -3
- package/dist/typescript/commonjs/src/runtime/native/styles/box-shadow.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/calc.d.ts +0 -3
- package/dist/typescript/commonjs/src/runtime/native/styles/calc.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/filters.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/platform-functions.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthand.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/text-shadow.d.ts +0 -2
- package/dist/typescript/commonjs/src/runtime/native/styles/text-shadow.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/transform.d.ts.map +0 -1
- package/dist/typescript/module/src/compiler/attributes.test.d.ts +0 -2
- package/dist/typescript/module/src/compiler/attributes.test.d.ts.map +0 -1
- package/dist/typescript/module/src/doctor/index.d.ts +0 -2
- package/dist/typescript/module/src/doctor/index.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/injection.d.ts +0 -16
- package/dist/typescript/module/src/runtime/native/injection.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/styles/animation.d.ts +0 -9
- package/dist/typescript/module/src/runtime/native/styles/animation.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/styles/border.d.ts +0 -2
- package/dist/typescript/module/src/runtime/native/styles/border.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/styles/box-shadow.d.ts +0 -3
- package/dist/typescript/module/src/runtime/native/styles/box-shadow.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/styles/calc.d.ts +0 -3
- package/dist/typescript/module/src/runtime/native/styles/calc.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/styles/filters.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/styles/platform-functions.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/styles/shorthand.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/styles/text-shadow.d.ts +0 -2
- package/dist/typescript/module/src/runtime/native/styles/text-shadow.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/styles/transform.d.ts.map +0 -1
- package/src/compiler/attributes.test.ts +0 -28
- package/src/doctor/index.ts +0 -1
- package/src/runtime/native/injection.ts +0 -131
- package/src/runtime/native/styles/box-shadow.ts +0 -54
- package/src/runtime/native/styles/calc.ts +0 -97
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["dirname","relative","sep","versions","connect","debug","compile","getNativeInjectionCode","getWebInjectionCode","nativeResolver","webResolver","setupTypeScript","defaultLogger","withReactNativeCSS","config","options","Number","node","split","Error","disableTypeScriptGeneration","typescriptEnvPath","globalClassNamePolyfill","logger","loggerEnabled","enabled","originalMiddleware","server","enhanceMiddleware","originalResolver","resolver","resolveRequest","
|
|
1
|
+
{"version":3,"names":["dirname","relative","sep","versions","connect","debug","compile","getNativeInjectionCode","getWebInjectionCode","nativeResolver","webResolver","setupTypeScript","defaultLogger","withReactNativeCSS","config","options","Number","node","split","Error","disableTypeScriptGeneration","typescriptEnvPath","globalClassNamePolyfill","logger","loggerEnabled","enabled","originalMiddleware","server","enhanceMiddleware","originalResolver","resolver","resolveRequest","transformerPath","require","resolve","transformer","reactNativeCSS","sourceExts","context","moduleName","platform","includes","type","parentResolver","resolved","middleware","metroServer","bundler","getBundler","__react_native_css__patched","nativeCSSFiles","Map","webCSSFiles","Set","nativeInjectionPath","nativeInjectionFilepaths","replace","webInjectionPath","webInjectionFilepaths","transformFile","bind","watcher","getWatcher","filePath","transformOptions","fileBuffer","isCss","test","add","Array","from","webTransform","customTransformOptions","lastTransform","get","last","next","output","data","css","code","toString","set","hexColors","stylesheet","emit","eventsQueue","map","metadata","modifiedTime","Date","now","size","nativeTransform","skipCache","keys","key","values","value","use"],"sourceRoot":"../../../src","sources":["metro/index.ts"],"mappings":";;AAAA;AACA,SAASA,OAAO,EAAEC,QAAQ,EAAEC,GAAG,QAAQ,WAAW;AAClD,SAASC,QAAQ,QAAQ,cAAc;AAEvC,OAAOC,OAAO,MAAM,SAAS;AAC7B,OAAOC,KAAK,MAAM,OAAO;AAIzB,SAASC,OAAO,QAAQ,yBAAsB;AAC9C,SAASC,sBAAsB,EAAEC,mBAAmB,QAAQ,qBAAkB;AAC9E,SAASC,cAAc,EAAEC,WAAW,QAAQ,eAAY;AACxD,SAASC,eAAe,QAAQ,iBAAc;AAY9C,MAAMC,aAAa,GAAGP,KAAK,CAAC,wBAAwB,CAAC;AAErD,OAAO,SAASQ,kBAAkBA,CAEhCC,MAAS,EAAEC,OAAmC,EAAK;EACnD,IAAI,OAAOD,MAAM,KAAK,UAAU,EAAE;IAChC,OAAQ,YAAY;MAClB,OAAOD,kBAAkB,CAAC,MAAMC,MAAM,CAAC,CAAC,EAAEC,OAAO,CAAC;IACpD,CAAC;EACH;EAEA,IAAIC,MAAM,CAACb,QAAQ,CAACc,IAAI,CAACC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE;IAC5C,MAAM,IAAIC,KAAK,CAAC,2CAA2C,CA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IAAI1E,aAAa,IAAIyC,UAAU,EAAE;kBAC/B1C,MAAM,CAAC,eAAewC,QAAQ,EAAE,CAAC;kBACjCxC,MAAM,CAAC0C,UAAU,EAAEgB,QAAQ,CAAC,CAAC,CAAC;gBAChC;cACF;cAEA,OAAOtB,aAAa,CAACI,QAAQ,EAAEC,gBAAgB,EAAEC,UAAU,CAAC;YAC9D;UACF,CAAC;QACH;QAEA,OAAOvC,kBAAkB,GACrBC,MAAM,CAACwE,GAAG,CAACzE,kBAAkB,CAACmB,UAAU,EAAEC,WAAW,CAAC,CAAC,GACvDnB,MAAM,CAACwE,GAAG,CAACtD,UAAU,CAAC;MAC5B;IACF;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -1,27 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* This is a hack around
|
|
4
|
+
* This is a hack around Metro's handling of bundles.
|
|
5
5
|
* When a component is inside a lazy() barrier, it is inside a different JS bundle.
|
|
6
6
|
* So when it updates, it only updates its local bundle, not the global one which contains the CSS files.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
8
|
+
* This means that the CSS file will not be re-evaluated when a component in a different bundle updates,
|
|
9
|
+
* breaking tools like Tailwind CSS
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
* which is included inside react-native-css's runtime.
|
|
13
|
-
*
|
|
14
|
-
* This is why both of these function add imports for the CSS files.
|
|
11
|
+
* To fix this, we force our code to always import the CSS files, so now the CSS files are in every bundle.
|
|
15
12
|
*/
|
|
16
|
-
|
|
17
13
|
export function getWebInjectionCode(filePaths) {
|
|
18
14
|
const importStatements = filePaths.map(filePath => `import "${filePath}";`).join("\n");
|
|
19
15
|
return Buffer.from(importStatements);
|
|
20
16
|
}
|
|
21
17
|
export function getNativeInjectionCode(cssFilePaths, values) {
|
|
22
18
|
const importStatements = cssFilePaths.map(filePath => `import "${filePath}";`).join("\n");
|
|
23
|
-
const importPath = `import { StyleCollection } from "./api";`;
|
|
24
19
|
const contents = values.map(value => `StyleCollection.inject(${JSON.stringify(value)});`).join("\n");
|
|
25
|
-
return Buffer.from(
|
|
20
|
+
return Buffer.from(`import { StyleCollection } from "react-native-css/style-collection";\n${importStatements}\n${contents};export {};`);
|
|
26
21
|
}
|
|
27
22
|
//# sourceMappingURL=injection-code.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getWebInjectionCode","filePaths","importStatements","map","filePath","join","Buffer","from","getNativeInjectionCode","cssFilePaths","values","
|
|
1
|
+
{"version":3,"names":["getWebInjectionCode","filePaths","importStatements","map","filePath","join","Buffer","from","getNativeInjectionCode","cssFilePaths","values","contents","value","JSON","stringify"],"sourceRoot":"../../../src","sources":["metro/injection-code.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,mBAAmBA,CAACC,SAAmB,EAAE;EACvD,MAAMC,gBAAgB,GAAGD,SAAS,CAC/BE,GAAG,CAAEC,QAAQ,IAAK,WAAWA,QAAQ,IAAI,CAAC,CAC1CC,IAAI,CAAC,IAAI,CAAC;EAEb,OAAOC,MAAM,CAACC,IAAI,CAACL,gBAAgB,CAAC;AACtC;AAEA,OAAO,SAASM,sBAAsBA,CACpCC,YAAsB,EACtBC,MAAiB,EACjB;EACA,MAAMR,gBAAgB,GAAGO,YAAY,CAClCN,GAAG,CAAEC,QAAQ,IAAK,WAAWA,QAAQ,IAAI,CAAC,CAC1CC,IAAI,CAAC,IAAI,CAAC;EAEb,MAAMM,QAAQ,GAAGD,MAAM,CACpBP,GAAG,CAAES,KAAK,IAAK,0BAA0BC,IAAI,CAACC,SAAS,CAACF,KAAK,CAAC,IAAI,CAAC,CACnEP,IAAI,CAAC,IAAI,CAAC;EAEb,OAAOC,MAAM,CAACC,IAAI,CAChB,yEAAyEL,gBAAgB,KAAKS,QAAQ,aACxG,CAAC;AACH","ignoreList":[]}
|
|
@@ -1,17 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
import { unstable_transformerPath } from "@expo/metro-config";
|
|
4
|
+
import { compile } from "../compiler/index.js";
|
|
5
|
+
import { getNativeInjectionCode } from "./injection-code.js";
|
|
3
6
|
const worker =
|
|
4
7
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
5
|
-
require(
|
|
6
|
-
export function transform(config, projectRoot, filePath, data, options) {
|
|
8
|
+
require(unstable_transformerPath);
|
|
9
|
+
export async function transform(config, projectRoot, filePath, data, options) {
|
|
7
10
|
const isCss = options.type !== "asset" && /\.(s?css|sass)$/.test(filePath);
|
|
8
|
-
|
|
9
|
-
if (!isCss || skipCompile) {
|
|
11
|
+
if (options.platform === "web" || !isCss) {
|
|
10
12
|
return worker.transform(config, projectRoot, filePath, data, options);
|
|
11
13
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
const cssFile = await worker.transform(config, projectRoot, filePath, data, {
|
|
15
|
+
...options,
|
|
16
|
+
platform: "web"
|
|
17
|
+
});
|
|
18
|
+
const css = cssFile.output[0].data.css.code.toString();
|
|
19
|
+
const productionJS = compile(css, {
|
|
20
|
+
...options.reactNativeCSS,
|
|
21
|
+
filename: filePath,
|
|
22
|
+
projectRoot: projectRoot
|
|
23
|
+
}).stylesheet();
|
|
24
|
+
data = Buffer.from(getNativeInjectionCode([], [productionJS]));
|
|
25
|
+
return worker.transform(config, projectRoot, `${filePath}.js`, data, options);
|
|
16
26
|
}
|
|
17
27
|
//# sourceMappingURL=metro-transformer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["worker","require","transform","config","projectRoot","filePath","data","options","isCss","type","test","
|
|
1
|
+
{"version":3,"names":["unstable_transformerPath","compile","getNativeInjectionCode","worker","require","transform","config","projectRoot","filePath","data","options","isCss","type","test","platform","cssFile","css","output","code","toString","productionJS","reactNativeCSS","filename","stylesheet","Buffer","from"],"sourceR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AGC,QAAQ,KAAK,EAAEC,IAAI,EAAEC,OAAO,CAAC;AAC/E","ignoreList":[]}
|
|
@@ -23,6 +23,9 @@ export function nativeResolver(resolver, context, moduleName, platform) {
|
|
|
23
23
|
if (moduleName === "react-native") {
|
|
24
24
|
return resolver(context, `react-native-css/components`, platform);
|
|
25
25
|
}
|
|
26
|
+
if (moduleName === "react-native-safe-area-context") {
|
|
27
|
+
return resolver(context, `react-native-css/components/react-native-safe-area-context`, platform);
|
|
28
|
+
}
|
|
26
29
|
|
|
27
30
|
// We only care about `react-native/Library/Components/<module>.js` components
|
|
28
31
|
const segments = resolution.filePath.split(sep);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["basename","resolve","sep","allowedModules","thisModuleDist","__dirname","thisModuleSrc","isFromThisModule","filename","startsWith","nativeResolver","resolver","context","moduleName","platform","resolution","originModulePath","type","endsWith","segments","filePath","split","module","at","has","webResolver","includes","isIndex"],"sourceRoot":"../../../src","sources":["metro/resolver.ts"],"mappings":";;AAAA,SAASA,QAAQ,EAAEC,OAAO,EAAEC,GAAG,QAAQ,WAAW;AAQlD,SAASC,cAAc,QAAQ,4BAAyB;AAExD,MAAMC,cAAc,GAAGH,OAAO,CAACI,SAAS,EAAE,eAAe,CAAC;AAC1D,MAAMC,aAAa,GAAGL,OAAO,CAACI,SAAS,EAAE,cAAc,CAAC;AAExD,SAASE,gBAAgBA,CAACC,QAAgB,EAAW;EACnD,OACEA,QAAQ,CAACC,UAAU,CAACL,cAAc,CAAC,IAAII,QAAQ,CAACC,UAAU,CAACH,aAAa,CAAC;AAE7E;AAEA,OAAO,SAASI,cAAcA,CAC5BC,QAAwB,EACxBC,OAAgC,EAChCC,UAAkB,EAClBC,QAAuB,EACX;EACZ,MAAMC,UAAU,GAAGJ,QAAQ,CAACC,OAAO,EAAEC,UAAU,EAAEC,QAAQ,CAAC;EAE1D;EACE;EACAP,gBAAgB,CAACK,OAAO,CAACI,gBAAgB,CAAC;EAC1C;EACAD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AAK,CAACnB,GAAG,CAAC;EAC/C,MAAMyB,OAAO,GAAGR,QAAQ,CAACI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAEd,UAAU,CAAC,QAAQ,CAAC;EACrD,MAAMa,MAAM,GAAGH,QAAQ,CAACI,EAAE,CAAC,CAAC,CAAC,CAAC;EAE9B,IAAI,CAACI,OAAO,IAAI,CAACL,MAAM,IAAI,CAACnB,cAAc,CAACqB,GAAG,CAACF,MAAM,CAAC,EAAE;IACtD,OAAOP,UAAU;EACnB;EAEA,OAAOJ,QAAQ,CAACC,OAAO,EAAE,+BAA+BU,MAAM,EAAE,EAAER,QAAQ,CAAC;AAC7E","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["basename","resolve","sep","allowedModules","thisModuleDist","__dirname","thisModuleSrc","isFromThisModule","filename","startsWith","nativeResolver","resolver","context","moduleName","platform","resolution","originModulePath","type","endsWith","segments","filePath","split","module","at","has","webResolver","includes","isIndex"],"sourceRoot":"../../../src","sources":["metro/resolver.ts"],"mappings":";;AAAA,SAASA,QAAQ,EAAEC,OAAO,EAAEC,GAAG,QAAQ,WAAW;AAQlD,SAASC,cAAc,QAAQ,4BAAyB;AAExD,MAAMC,cAAc,GAAGH,OAAO,CAACI,SAAS,EAAE,eAAe,CAAC;AAC1D,MAAMC,aAAa,GAAGL,OAAO,CAACI,SAAS,EAAE,cAAc,CAAC;AAExD,SAASE,gBAAgBA,CAACC,QAAgB,EAAW;EACnD,OACEA,QAAQ,CAACC,UAAU,CAACL,cAAc,CAAC,IAAII,QAAQ,CAACC,UAAU,CAACH,aAAa,CAAC;AAE7E;AAEA,OAAO,SAASI,cAAcA,CAC5BC,QAAwB,EACxBC,OAAgC,EAChCC,UAAkB,EAClBC,QAAuB,EACX;EACZ,MAAMC,UAAU,GAAGJ,QAAQ,CAACC,OAAO,EAAEC,UAAU,EAAEC,QAAQ,CAAC;EAE1D;EACE;EACAP,gBAAgB,CAACK,OAAO,CAACI,gBAAgB,CAAC;EAC1C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BA,GAAG,EAAE,CAAC,EAC7D;IACA,OAAOa,UAAU;EACnB;;EAEA;EACA,MAAMI,QAAQ,GAAGJ,UAAU,CAACK,QAAQ,CAACC,KAAK,CAACnB,GAAG,CAAC;EAC/C,MAAMyB,OAAO,GAAGR,QAAQ,CAACI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAEd,UAAU,CAAC,QAAQ,CAAC;EACrD,MAAMa,MAAM,GAAGH,QAAQ,CAACI,EAAE,CAAC,CAAC,CAAC,CAAC;EAE9B,IAAI,CAACI,OAAO,IAAI,CAACL,MAAM,IAAI,CAACnB,cAAc,CAACqB,GAAG,CAACF,MAAM,CAAC,EAAE;IACtD,OAAOP,UAAU;EACnB;EAEA,OAAOJ,QAAQ,CAACC,OAAO,EAAE,+BAA+BU,MAAM,EAAE,EAAER,QAAQ,CAAC;AAC7E","ignoreList":[]}
|
|
@@ -4,9 +4,9 @@ const canWarn = process.env.NODE_ENV !== "test";
|
|
|
4
4
|
if (canWarn) {
|
|
5
5
|
throw new Error(`react-native-css has encountered a setup error.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
┌───────┐
|
|
8
|
+
│ Metro │
|
|
9
|
+
└───────┘
|
|
10
10
|
|
|
11
11
|
Either your metro.config.js is missing the 'withReactNativeCSS' wrapper OR
|
|
12
12
|
the resolver.resolveRequest function of your config is being overridden, and not calling the parent resolver.
|
|
@@ -20,15 +20,15 @@ module.exports = with3rdPartyPlugin(
|
|
|
20
20
|
)
|
|
21
21
|
\`\`\`
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
┌────────────┐
|
|
24
|
+
│ NativeWind │
|
|
25
|
+
└────────────┘
|
|
26
26
|
|
|
27
|
-
If you are using NativeWind
|
|
27
|
+
If you are using NativeWind follow the Metro instructions above but use 'withNativeWind' instead of 'withReactNativeCSS'.
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
┌────────────────┐
|
|
30
|
+
│ Other bundlers │
|
|
31
|
+
└────────────────┘
|
|
32
32
|
|
|
33
33
|
If you are using another bundler (Vite, Webpack, etc), or non-Metro framework (Next.js, Remix, etc), please ensure you have included 'react-native-css/babel' as a babel preset.
|
|
34
34
|
`);
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
/* eslint-disable */
|
|
4
|
-
import { useContext, useState } from "react";
|
|
4
|
+
import { useContext, useMemo, useState } from "react";
|
|
5
5
|
import { Appearance } from "react-native";
|
|
6
6
|
import { mappingToConfig, useNativeCss } from "./react/useNativeCss.js";
|
|
7
7
|
import { usePassthrough } from "./react/usePassthrough.js";
|
|
8
8
|
import { colorScheme as colorSchemeObs, VAR_SYMBOL, VariableContext } from "./reactivity.js";
|
|
9
9
|
import { resolveValue } from "./styles/resolve.js";
|
|
10
|
-
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
export { StyleCollection } from "react-native-css/style-collection";
|
|
12
|
+
export { useNativeCss };
|
|
11
13
|
|
|
12
14
|
/**
|
|
13
15
|
* Generates a new Higher-Order component the wraps the base component and applies the styles.
|
|
@@ -68,8 +70,25 @@ export function useNativeVariable(name) {
|
|
|
68
70
|
inheritedVariables
|
|
69
71
|
});
|
|
70
72
|
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* @deprecated Use `<VariableContextProvider />` instead.
|
|
76
|
+
*/
|
|
71
77
|
export function vars(variables) {
|
|
72
|
-
|
|
73
|
-
|
|
78
|
+
return Object.assign({
|
|
79
|
+
[VAR_SYMBOL]: "inline"
|
|
80
|
+
}, Object.fromEntries(Object.entries(variables).map(([k, v]) => [k.replace(/^--/, ""), v])));
|
|
81
|
+
}
|
|
82
|
+
export function VariableContextProvider(props) {
|
|
83
|
+
const inheritedVariables = useContext(VariableContext);
|
|
84
|
+
const value = useMemo(() => ({
|
|
85
|
+
...inheritedVariables,
|
|
86
|
+
...Object.fromEntries(Object.entries(props.value).map(([k, v]) => [k.replace(/^--/, ""), v])),
|
|
87
|
+
[VAR_SYMBOL]: true
|
|
88
|
+
}), [inheritedVariables, props.value]);
|
|
89
|
+
return /*#__PURE__*/_jsx(VariableContext, {
|
|
90
|
+
value: value,
|
|
91
|
+
children: props.children
|
|
92
|
+
});
|
|
74
93
|
}
|
|
75
94
|
//# sourceMappingURL=api.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useContext","useState","Appearance","mappingToConfig","useNativeCss","usePassthrough","colorScheme","colorSchemeObs","VAR_SYMBOL","VariableContext","resolveValue","StyleCollection","styled","baseComponent","mapping","options","component","configs","passThrough","props","name","displayName","get","getColorScheme","set","value","useUnstableNativeVariable","useNativeVariable","useCssElement","incomingProps","config","startsWith","slice","inheritedVariables","effect","setState","observers","Set","run","state","observable","vars","variables"],"sourceRoot":"../../../../src","sources":["runtime/native/api.
|
|
1
|
+
{"version":3,"names":["useContext","useMemo","useState","Appearance","mappingToConfig","useNativeCss","usePassthrough","colorScheme","colorSchemeObs","VAR_SYMBOL","VariableContext","resolveValue","jsx","_jsx","StyleCollection","styled","baseComponent","mapping","options","component","configs","passThrough","props","name","displayName","get","getColorScheme","set","value","useUnstableNativeVariable","useNativeVariable","useCssElement","incomingProps","config","startsWith","slice","inheritedVariables","effect","setState","observers","Set","run","state","observable","vars","variables","Object","assign","fromEntries","entries","map","k","v","replace","VariableContextProvider","children"],"sourceRoot":"../../../../src","sources":["runtime/native/api.tsx"],"mappings":";;AAAA;AACA,SAASA,UAAU,EAAEC,OAAO,EAAEC,QAAQ,QAAgC,OAAO;AAC7E,SAASC,UAAU,QAAQ,cAAc;AAUzC,SAASC,eAAe,EAAEC,YAAY,QAAQ,yBAAsB;AACpE,SAASC,cAAc,QAAQ,2BAAwB;AACvD,SACEC,WAAW,IAAIC,cAAc,EAC7BC,UAAU,EACVC,eAAe,QAIV,iBAAc;AACrB,SAASC,YAAY,QAAQ,q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EAC3E;EACA,MAAMc,kBAAkB,GAAGpC,UAAU,CAACU,eAAe,CAAC;EAEtD,MAAMkB,KAA2B,GAAG3B,OAAO,CACzC,OAAO;IACL,GAAGmC,kBAAkB;IACrB,GAAGU,MAAM,CAACE,WAAW,CACnBF,MAAM,CAACG,OAAO,CAAC3B,KAAK,CAACM,KAAK,CAAC,CAACsB,GAAG,CAAC,CAAC,CAACC,CAAC,EAAEC,CAAC,CAAC,KAAK,CAACD,CAAC,CAACE,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,EAAED,CAAC,CAAC,CACvE,CAAC;IACD,CAAC3C,UAAU,GAAG;EAChB,CAAC,CAAC,EACF,CAAC2B,kBAAkB,EAAEd,KAAK,CAACM,KAAK,CAClC,CAAC;EAED,oBAAOf,IAAA,CAACH,eAAe;IAACkB,KAAK,EAAEA,KAAM;IAAA2B,QAAA,EAAEjC,KAAK,CAACiC;EAAQ,CAAkB,CAAC;AAC1E","ignoreList":[]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export function testAttributes(queries, props, guards) {
|
|
4
|
+
return queries.every(query => testAttribute(query, props, guards));
|
|
5
|
+
}
|
|
6
|
+
function testAttribute([type, prop, operator, testValue], props, guards) {
|
|
7
|
+
let value;
|
|
8
|
+
if (type === "a") {
|
|
9
|
+
value = props?.[prop];
|
|
10
|
+
} else {
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
12
|
+
value = props?.dataSet?.[prop];
|
|
13
|
+
}
|
|
14
|
+
guards.push([type, prop, value]);
|
|
15
|
+
if (!operator) {
|
|
16
|
+
return value !== undefined && value !== null && value !== false;
|
|
17
|
+
}
|
|
18
|
+
switch (operator) {
|
|
19
|
+
case "!":
|
|
20
|
+
return !value;
|
|
21
|
+
case "=":
|
|
22
|
+
return value == testValue;
|
|
23
|
+
case "~=":
|
|
24
|
+
return testValue && value?.toString().split(" ").includes(testValue);
|
|
25
|
+
case "|=":
|
|
26
|
+
return testValue && value?.toString().startsWith(testValue + "-");
|
|
27
|
+
case "^=":
|
|
28
|
+
return testValue && value?.toString().startsWith(testValue);
|
|
29
|
+
case "$=":
|
|
30
|
+
return testValue && value?.toString().endsWith(testValue);
|
|
31
|
+
case "*=":
|
|
32
|
+
return testValue && value?.toString().includes(testValue);
|
|
33
|
+
default:
|
|
34
|
+
operator;
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=attributes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["testAttributes","queries","props","guards","every","query","testAttribute","type","prop","operator","testValue","value","dataSet","push","undefined","toString","split","includes","startsWith","endsWith"],"sourceRoot":"../../../../../src","sources":["runtime/native/conditions/attributes.ts"],"mappings":";;AAIA,OAAO,SAASA,cAAcA,CAC5BC,OAAyB,EACzBC,KAAY,EACZC,MAAqB,EACrB;EACA,OAAOF,OAAO,CAACG,KAAK,CAAEC,KAAK,IAAKC,aAAa,CAACD,KAAK,EAAEH,KAAK,EAAEC,MAAM,CAAC,CAAC;AACtE;AAEA,SAASG,aAAaA,CACpB,CAACC,IAAI,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,SAAS,CAAiB,EACjDR,KAAY,EACZC,MAAqB,EACrB;EACA,IAAIQ,KAAc;EAElB,IAAIJ,IAAI,KAAK,GAAG,EAAE;IAChBI,KAAK,GAAGT,KAAK,GAAGM,IAAI,CAAC;EACvB,CAAC,MAAM;IACL;IACAG,KAAK,GAAGT,KAAK,EAAEU,OAAO,GAAGJ,IAAI,CAAC;EAChC;EAEAL,MAAM,CAACU,IAAI,CAAC,CAACN,IAAI,EAAEC,IAAI,EAAEG,KAAK,CAAC,CAAC;EAEhC,IAAI,CAACF,QAAQ,EAAE;IACb,OAAOE,KAAK,KAAKG,SAAS,IAAIH,KAAK,KAAK,IAAI,IAAIA,KAAK,KAAK,KAAK;EACjE;EAEA,QAAQF,QAAQ;IACd,KAAK,GAAG;MACN,OAAO,CAACE,KAAK;IACf,KAAK,GAAG;MACN,OAAOA,KAAK,IAAID,SAAS;IAC3B,KAAK,IAAI;MACP,OAAOA,SAAS,IAAIC,KAAK,EAAEI,QAAQ,CAAC,CAAC,CAACC,KAAK,CAAC,GAAG,CAAC,CAACC,QAAQ,CAACP,SAAS,CAAC;IACtE,KAAK,IAAI;MACP,OAAOA,SAAS,IAAIC,KAAK,EAAEI,QAAQ,CAAC,CAAC,CAACG,UAAU,CAACR,SAAS,GAAG,GAAG,CAAC;IACnE,KAAK,IAAI;MACP,OAAOA,SAAS,IAAIC,KAAK,EAAEI,QAAQ,CAAC,CAAC,CAACG,UAAU,CAACR,SAAS,CAAC;IAC7D,KAAK,IAAI;MACP,OAAOA,SAAS,IAAIC,KAAK,EAAEI,QAAQ,CAAC,CAAC,CAACI,QAAQ,CAACT,SAAS,CAAC;IAC3D,KAAK,IAAI;MACP,OAAOA,SAAS,IAAIC,KAAK,EAAEI,QAAQ,CAAC,CAAC,CAACE,QAAQ,CAACP,SAAS,CAAC;IAC3D;MACED,QAAQ;MACR,OAAO,KAAK;EAChB;AACF","ignoreList":[]}
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
|
|
5
5
|
import { activeFamily, containerHeightFamily, containerWidthFamily, focusFamily, hoverFamily } from "../reactivity.js";
|
|
6
|
+
// import { testAttributes } from "./attributes";
|
|
7
|
+
|
|
6
8
|
export const DEFAULT_CONTAINER_NAME = "c:___default___";
|
|
7
9
|
export function testContainerQueries(queries, inheritedContainers, guards, get) {
|
|
8
10
|
return queries.every(query => {
|
|
@@ -16,6 +18,11 @@ export function testContainerQuery(query, inheritedContainers, guards, get) {
|
|
|
16
18
|
if (!container) {
|
|
17
19
|
return false;
|
|
18
20
|
}
|
|
21
|
+
|
|
22
|
+
// if (query.a && !testAttributes(query.a, container.props, guards)) {
|
|
23
|
+
// return false;
|
|
24
|
+
// }
|
|
25
|
+
|
|
19
26
|
if (query.m && !testContainerMediaCondition(query.m, container, get)) {
|
|
20
27
|
return false;
|
|
21
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["activeFamily","containerHeightFamily","containerWidthFamily","focusFamily","hoverFamily","DEFAULT_CONTAINER_NAME","testContainerQueries","queries","inheritedContainers","guards","get","every","query","testContainerQuery","name","n","container","push","m","testContainerMediaCondition","p","testContainerPseudoCondition","containerKey","h","a","f","condition","some","left","getContainerFeatureValue","right","width","height"],"sourceRoot":"../../../../../src","sources":["runtime/native/conditions/container-query.ts"],"mappings":";;AAAA;;AASA,SACEA,YAAY,EACZC,qBAAqB,EACrBC,oBAAoB,EACpBC,WAAW,EACXC,WAAW,QAGN,kBAAe;
|
|
1
|
+
{"version":3,"names":["activeFamily","containerHeightFamily","containerWidthFamily","focusFamily","hoverFamily","DEFAULT_CONTAINER_NAME","testContainerQueries","queries","inheritedContainers","guards","get","every","query","testContainerQuery","name","n","container","push","m","testContainerMediaCondition","p","testContainerPseudoCondition","containerKey","h","a","f","condition","some","left","getContainerFeatureValue","right","width","height"],"sourceRoot":"../../../../../src","sources":["runtime/native/conditions/container-query.ts"],"mappings":";;AAAA;;AASA,SACEA,YAAY,EACZC,qBAAqB,EACrBC,oBAAoB,EACpBC,WAAW,EACXC,WAAW,QAGN,kBAAe;AACtB;;AAGA,OAAO,MAAMC,sBAAsB,GAAG,iBAAiB;AAEvD,OAAO,SAASC,oBAAoBA,CAClCC,OAAyB,EACzBC,mBAA0C,EAC1CC,MAAqB,EACrBC,GAAW,EACX;EACA,OAAOH,OAAO,CAACI,KAAK,CAAEC,KAAK,IAAK;IAC9B,OAAOC,kBAAkB,CAACD,KAAK,EAAEJ,mBAAmB,EAAEC,MAAM,EAAEC,GAAG,CAAC;EACpE,CAAC,CAAC;AACJ;AAEA,OAAO,SAASG,kBAAkBA,CAChCD,KAAqB,EACrBJ,mBAA0C,EAC1CC,MAAqB,EACrBC,GAAW,EACF;EACT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Q,YAAqB,EACrBZ,GAAW,EACM;EACjB,QAAQI,IAAI;IACV,KAAK,OAAO;MACV,OAAOJ,GAAG,CAACR,oBAAoB,CAACoB,YAAY,CAAC,CAAC;IAChD,KAAK,QAAQ;MACX,OAAOZ,GAAG,CAACT,qBAAqB,CAACqB,YAAY,CAAC,CAAC;IACjD,KAAK,cAAc;MAAE;QACnB,MAAMS,KAAK,GAAGrB,GAAG,CAACR,oBAAoB,CAACoB,YAAY,CAAC,CAAC;QACrD,MAAMU,MAAM,GAAGtB,GAAG,CAACT,qBAAqB,CAACqB,YAAY,CAAC,CAAC;QACvD,OAAOS,KAAK,GAAGC,MAAM;MACvB;IACA,KAAK,aAAa;MAChB,MAAMD,KAAK,GAAGrB,GAAG,CAACR,oBAAoB,CAACoB,YAAY,CAAC,CAAC;MACrD,MAAMU,MAAM,GAAGtB,GAAG,CAACT,qBAAqB,CAACqB,YAAY,CAAC,CAAC;MACvD,OAAOS,KAAK,GAAGC,MAAM,GAAG,WAAW,GAAG,UAAU;IAClD,KAAK,aAAa;IAClB,KAAK,YAAY;IACjB;MACE;EACJ;AACF","ignoreList":[]}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
|
|
5
3
|
import { activeFamily, focusFamily, hoverFamily } from "../reactivity.js";
|
|
4
|
+
import { testAttributes } from "./attributes.js";
|
|
6
5
|
import { testContainerQueries } from "./container-query.js";
|
|
7
6
|
import { testMediaQuery } from "./media-query.js";
|
|
8
7
|
export function testRule(rule, get, props, guards, containerContext) {
|
|
@@ -12,7 +11,7 @@ export function testRule(rule, get, props, guards, containerContext) {
|
|
|
12
11
|
if (rule.m && !testMediaQuery(rule.m, get)) {
|
|
13
12
|
return false;
|
|
14
13
|
}
|
|
15
|
-
if (rule.aq && !
|
|
14
|
+
if (rule.aq && !testAttributes(rule.aq, props, guards)) {
|
|
16
15
|
return false;
|
|
17
16
|
}
|
|
18
17
|
if (rule.cq && !testContainerQueries(rule.cq, containerContext, guards, get)) {
|
|
@@ -21,10 +20,12 @@ export function testRule(rule, get, props, guards, containerContext) {
|
|
|
21
20
|
return true;
|
|
22
21
|
}
|
|
23
22
|
function pseudoClasses(query, get) {
|
|
24
|
-
|
|
23
|
+
// IMPORTANT: active needs: to be first. Modifies a global value
|
|
24
|
+
// that we use to determine if the component should be a pressable
|
|
25
|
+
if (query.a && !get(activeFamily(get))) {
|
|
25
26
|
return false;
|
|
26
27
|
}
|
|
27
|
-
if (query.
|
|
28
|
+
if (query.h && !get(hoverFamily(get))) {
|
|
28
29
|
return false;
|
|
29
30
|
}
|
|
30
31
|
if (query.f && !get(focusFamily(get))) {
|
|
@@ -32,39 +33,4 @@ function pseudoClasses(query, get) {
|
|
|
32
33
|
}
|
|
33
34
|
return true;
|
|
34
35
|
}
|
|
35
|
-
function attributes(queries, props, guards) {
|
|
36
|
-
return queries.every(query => testAttribute(query, props, guards));
|
|
37
|
-
}
|
|
38
|
-
function testAttribute(query, props, guards) {
|
|
39
|
-
let value;
|
|
40
|
-
if (query[0] === "a") {
|
|
41
|
-
value = props?.[query[1]];
|
|
42
|
-
} else {
|
|
43
|
-
value = props?.dataSet?.[query[1]];
|
|
44
|
-
}
|
|
45
|
-
guards.push([query[0], query[1], value]);
|
|
46
|
-
const operator = query[2];
|
|
47
|
-
if (!operator) {
|
|
48
|
-
return value !== undefined && value !== null && value !== false;
|
|
49
|
-
}
|
|
50
|
-
switch (operator) {
|
|
51
|
-
case "!":
|
|
52
|
-
return !value;
|
|
53
|
-
case "=":
|
|
54
|
-
return value == query[3];
|
|
55
|
-
case "~=":
|
|
56
|
-
return value?.toString().split(" ").includes(query[3]);
|
|
57
|
-
case "|=":
|
|
58
|
-
return value?.toString().startsWith(query[3] + "-");
|
|
59
|
-
case "^=":
|
|
60
|
-
return value?.toString().startsWith(query[3]);
|
|
61
|
-
case "$=":
|
|
62
|
-
return value?.toString().endsWith(query[3]);
|
|
63
|
-
case "*=":
|
|
64
|
-
return value?.toString().includes(query[3]);
|
|
65
|
-
default:
|
|
66
|
-
operator;
|
|
67
|
-
return false;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
36
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["activeFamily","focusFamily","hoverFamily","testContainerQueries","testMediaQuery","testRule","rule","get","props","guards","containerContext","p","pseudoClasses","m","aq","
|
|
1
|
+
{"version":3,"names":["activeFamily","focusFamily","hoverFamily","testAttributes","testContainerQueries","testMediaQuery","testRule","rule","get","props","guards","containerContext","p","pseudoClasses","m","aq","cq","query","a","h","f"],"sourceRoot":"../../../../../src","sources":["runtime/native/conditions/index.ts"],"mappings":";;AAEA,SACEA,YAAY,EACZC,WAAW,EACXC,WAAW,QAGN,kBAAe;AACtB,SAASC,cAAc,QAAQ,iBAAc;AAC7C,SAASC,oBAAoB,QAAQ,sBAAmB;AAExD,SAASC,cAAc,QAAQ,kBAAe;AAE9C,OAAO,SAASC,QAAQA,CACtBC,IAAe,EACfC,GAAW,EACXC,KAAY,EACZC,MAAqB,EACrBC,gBAAuC,EACvC;EACA,IAAIJ,IAAI,CAACK,CAAC,IAAI,CAACC,aAAa,CAACN,IAAI,CAACK,CAAC,EAAEJ,GAAG,CAAC,EAAE;IACzC,OAAO,KAAK;EACd;EACA,IAAID,IAAI,CAACO,CAAC,IAAI,CAACT,cAAc,CAACE,IAAI,CAACO,CAAC,EAAEN,GAAG,CAAC,EAAE;IAC1C,OAAO,KAAK;EACd;EACA,IAAID,IAAI,CAACQ,EAAE,IAAI,CAACZ,cAAc,CAACI,IAAI,CAACQ,EAAE,EAAEN,KAAK,EAAEC,MAAM,CAAC,EAAE;IACtD,OAAO,KAAK;EACd;EACA,IACEH,IAAI,CAACS,EAAE,IACP,CAACZ,oBAAoB,CAACG,IAAI,CAACS,EAAE,EAAEL,gBAAgB,EAAED,MAAM,EAAEF,GAAG,CAAC,EAC7D;IACA,OAAO,KAAK;EACd;EAEA,OAAO,IAAI;AACb;AAEA,SAASK,aAAaA,CAACI,KAAyB,EAAET,GAAW,EAAE;EAC7D;EACA;EACA,IAAIS,KAAK,CAACC,CAAC,IAAI,CAACV,GAAG,CAACR,YAAY,CAACQ,GAAG,CAAC,CAAC,EAAE;IACtC,OAAO,KAAK;EACd;EACA,IAAIS,KAAK,CAACE,CAAC,IAAI,CAACX,GAAG,CAACN,WAAW,CAACM,GAAG,CAAC,CAAC,EAAE;IACrC,OAAO,KAAK;EACd;EACA,IAAIS,KAAK,CAACG,CAAC,IAAI,CAACZ,GAAG,CAACP,WAAW,CAACO,GAAG,CAAC,CAAC,EAAE;IACrC,OAAO,KAAK;EACd;EACA,OAAO,IAAI;AACb","ignoreList":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
/* eslint-disable */
|
|
4
|
-
import { PixelRatio, Platform } from "react-native";
|
|
4
|
+
import { I18nManager, PixelRatio, Platform } from "react-native";
|
|
5
5
|
import { colorScheme, vh, vw } from "../reactivity.js";
|
|
6
6
|
export function testMediaQuery(mediaQueries, get) {
|
|
7
7
|
return mediaQueries.every(query => test(query, get));
|
|
@@ -32,31 +32,36 @@ function test(mediaQuery, get) {
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
function testComparison(mediaQuery, get) {
|
|
35
|
-
|
|
36
|
-
const right = mediaQuery[2];
|
|
35
|
+
const value = mediaQuery[2];
|
|
37
36
|
switch (mediaQuery[1]) {
|
|
37
|
+
case "dir":
|
|
38
|
+
return I18nManager.isRTL && value === "rtl" || value === "ltr";
|
|
39
|
+
case "hover":
|
|
40
|
+
return true;
|
|
38
41
|
case "platform":
|
|
39
|
-
return
|
|
42
|
+
return value === "native" || value === Platform.OS;
|
|
40
43
|
case "prefers-color-scheme":
|
|
41
44
|
{
|
|
42
|
-
return
|
|
45
|
+
return value === get(colorScheme);
|
|
43
46
|
}
|
|
44
47
|
case "display-mode":
|
|
45
|
-
return
|
|
48
|
+
return value === "native" || Platform.OS === value;
|
|
46
49
|
case "min-width":
|
|
47
|
-
return typeof
|
|
50
|
+
return typeof value === "number" && get(vw) >= value;
|
|
48
51
|
case "max-width":
|
|
49
|
-
return typeof
|
|
52
|
+
return typeof value === "number" && get(vw) <= value;
|
|
50
53
|
case "min-height":
|
|
51
|
-
return typeof
|
|
54
|
+
return typeof value === "number" && get(vh) >= value;
|
|
52
55
|
case "max-height":
|
|
53
|
-
return typeof
|
|
56
|
+
return typeof value === "number" && get(vh) <= value;
|
|
54
57
|
case "orientation":
|
|
55
|
-
return
|
|
58
|
+
return value === "landscape" ? get(vh) < get(vw) : get(vh) >= get(vw);
|
|
56
59
|
}
|
|
57
|
-
if (typeof
|
|
60
|
+
if (typeof value !== "number") {
|
|
58
61
|
return false;
|
|
59
62
|
}
|
|
63
|
+
let left;
|
|
64
|
+
const right = value;
|
|
60
65
|
switch (mediaQuery[1]) {
|
|
61
66
|
case "width":
|
|
62
67
|
left = get(vw);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PixelRatio","Platform","colorScheme","vh","vw","testMediaQuery","mediaQueries","get","every","query","test","mediaQuery","some","testComparison","
|
|
1
|
+
{"version":3,"names":["I18nManager","PixelRatio","Platform","colorScheme","vh","vw","testMediaQuery","mediaQueries","get","every","query","test","mediaQuery","some","testComparison","value","isRTL","OS","left","right"],"sourceRoot":"../../../../../src","sources":["runtime/native/conditions/media-query.ts"],"mappings":";;AAAA;AACA,SAASA,WAAW,EAAEC,UAAU,EAAEC,QAAQ,QAAQ,cAAc;AAGhE,SAASC,WAAW,EAAEC,EAAE,EAAEC,EAAE,QAAqB,kBAAe;AAEhE,OAAO,SAASC,cAAcA,CAACC,YAA8B,EAAEC,GAAW,EAAE;EAC1E,OAAOD,YAAY,CAACE,KAAK,CAAEC,KAAK,IAAKC,IAAI,CAACD,KAAK,EAAEF,GAAG,CAAC,CAAC;AACxD;AAEA,SAASG,I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AOD,IAAI,IAAIC,KAAK;IACtB;MACE,OAAO,KAAK;EAChB;AACF","ignoreList":[]}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
/* eslint-disable */
|
|
4
|
-
|
|
4
|
+
import { StyleCollection } from "react-native-css/style-collection";
|
|
5
5
|
import { getDeepPath } from "../../utils/index.js";
|
|
6
6
|
import { testRule } from "../conditions/index.js";
|
|
7
7
|
import { DEFAULT_CONTAINER_NAME } from "../conditions/container-query.js";
|
|
8
|
-
import { StyleCollection } from "../injection.js";
|
|
9
8
|
import { activeFamily, containerLayoutFamily, focusFamily, hoverFamily, VAR_SYMBOL, weakFamily } from "../reactivity.js";
|
|
10
9
|
import { stylesFamily } from "../styles/index.js";
|
|
11
10
|
export const INLINE_RULE_SYMBOL = Symbol("react-native-css.inlineRule");
|
|
@@ -22,10 +21,11 @@ currentProps = state.currentProps, inheritedVariables = state.inheritedVariables
|
|
|
22
21
|
};
|
|
23
22
|
}
|
|
24
23
|
let usesVariables = false;
|
|
25
|
-
let variables
|
|
26
|
-
let containers
|
|
24
|
+
let variables;
|
|
25
|
+
let containers;
|
|
27
26
|
const inlineVariables = new Set();
|
|
28
27
|
let animated = false;
|
|
28
|
+
let pressable = false;
|
|
29
29
|
for (const config of state.configs) {
|
|
30
30
|
const source = currentProps?.[config.source];
|
|
31
31
|
const shallowTarget = Array.isArray(config.target) ? config.target[0] : config.target;
|
|
@@ -44,6 +44,10 @@ currentProps = state.currentProps, inheritedVariables = state.inheritedVariables
|
|
|
44
44
|
if (target) {
|
|
45
45
|
if (Array.isArray(target)) {
|
|
46
46
|
for (const item of target) {
|
|
47
|
+
// undefined or falsy is allowed in the style array
|
|
48
|
+
if (!item) {
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
47
51
|
if (VAR_SYMBOL in item) {
|
|
48
52
|
inlineVariables.add(item);
|
|
49
53
|
} else if (INLINE_RULE_SYMBOL in item && typeof item[INLINE_RULE_SYMBOL] === "string") {
|
|
@@ -57,25 +61,26 @@ currentProps = state.currentProps, inheritedVariables = state.inheritedVariables
|
|
|
57
61
|
}
|
|
58
62
|
}
|
|
59
63
|
for (let rule of styleRuleSet) {
|
|
60
|
-
// Even if a rule does not match, make sure we register that it could set
|
|
61
|
-
// a variable or container or be animated.
|
|
62
|
-
if (rule.v) usesVariables = true;
|
|
63
|
-
if (rule.c) containers ??= inheritedContainers;
|
|
64
|
-
if (rule.a) animated = true;
|
|
65
64
|
usesVariables ||= Boolean(rule.dv);
|
|
65
|
+
|
|
66
|
+
// We do this even if the rule doesn't match so we can maintain a consistent render tree
|
|
67
|
+
// We we need to inject React context
|
|
68
|
+
if (rule.a) animated = true;
|
|
69
|
+
if (rule.v) {
|
|
70
|
+
variables ??= inheritedVariables;
|
|
71
|
+
}
|
|
72
|
+
if (rule.c) {
|
|
73
|
+
containers ??= inheritedContainers;
|
|
74
|
+
activeFamily(state.ruleEffectGetter);
|
|
75
|
+
}
|
|
66
76
|
if (!testRule(rule, state.ruleEffectGetter, currentProps, guards, inheritedContainers)) {
|
|
67
77
|
continue;
|
|
68
78
|
}
|
|
69
79
|
if (rule.v) {
|
|
70
|
-
// We're going to set a value, so we need to create a new object
|
|
71
80
|
if (variables === inheritedVariables) {
|
|
72
81
|
variables = {
|
|
73
82
|
...inheritedVariables
|
|
74
83
|
};
|
|
75
|
-
} else {
|
|
76
|
-
variables ??= {
|
|
77
|
-
...inheritedVariables
|
|
78
|
-
};
|
|
79
84
|
}
|
|
80
85
|
for (const v of rule.v) {
|
|
81
86
|
variables[v[0]] = v[1];
|
|
@@ -116,7 +121,7 @@ currentProps = state.currentProps, inheritedVariables = state.inheritedVariables
|
|
|
116
121
|
}
|
|
117
122
|
if (process.env.NODE_ENV !== "production") {
|
|
118
123
|
if (isRerender) {
|
|
119
|
-
|
|
124
|
+
const pressable = activeFamily.has(state.ruleEffectGetter);
|
|
120
125
|
if (Boolean(variables) !== Boolean(state.variables)) {
|
|
121
126
|
console.log(`ReactNativeCss: className '${source}' added or removed a variable after the initial render. This causes the components state to be reset and all children be re-mounted. Use the className 'will-change-variable' to avoid this warning. If this was caused by sibling components being added/removed, use a 'key' prop so React can track the component correctly.`);
|
|
122
127
|
} else if (Boolean(containers) !== Boolean(state.containers)) {
|
|
@@ -129,16 +134,16 @@ currentProps = state.currentProps, inheritedVariables = state.inheritedVariables
|
|
|
129
134
|
}
|
|
130
135
|
}
|
|
131
136
|
}
|
|
132
|
-
|
|
133
|
-
// We only track this in development
|
|
134
|
-
let pressable = process.env.NODE_ENV === "production" ? undefined : activeFamily.has(state.ruleEffectGetter);
|
|
137
|
+
pressable = activeFamily.has(state.ruleEffectGetter);
|
|
135
138
|
if (!rules.size && !state.stylesObs && !inlineVariables.size) {
|
|
136
139
|
return {
|
|
137
140
|
...state,
|
|
138
141
|
currentProps,
|
|
139
142
|
guards,
|
|
140
143
|
animated,
|
|
141
|
-
pressable
|
|
144
|
+
pressable,
|
|
145
|
+
variables,
|
|
146
|
+
containers
|
|
142
147
|
};
|
|
143
148
|
}
|
|
144
149
|
if (usesVariables || variables) {
|