react-native-css 3.0.0-preview.1 → 3.0.0-preview.3
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/README.md +138 -10
- package/dist/commonjs/babel/index.js +6 -2
- package/dist/commonjs/babel/index.js.map +1 -1
- package/dist/commonjs/compiler/atRules.js +6 -26
- package/dist/commonjs/compiler/atRules.js.map +1 -1
- package/dist/commonjs/compiler/compiler.js +70 -23
- package/dist/commonjs/compiler/compiler.js.map +1 -1
- package/dist/commonjs/compiler/compiler.types.js +1 -1
- package/dist/commonjs/compiler/compiler.types.js.map +1 -1
- package/dist/commonjs/compiler/declarations.js +79 -60
- package/dist/commonjs/compiler/declarations.js.map +1 -1
- package/dist/commonjs/compiler/inline-variables.js +142 -0
- package/dist/commonjs/compiler/inline-variables.js.map +1 -0
- package/dist/commonjs/compiler/pseudo-elements.js +1 -1
- package/dist/commonjs/compiler/selector-builder.js +7 -5
- package/dist/commonjs/compiler/selector-builder.js.map +1 -1
- package/dist/commonjs/compiler/selectors.js +4 -4
- package/dist/commonjs/compiler/selectors.js.map +1 -1
- package/dist/commonjs/compiler/stylesheet.js +4 -5
- package/dist/commonjs/compiler/stylesheet.js.map +1 -1
- package/dist/commonjs/components/ActivityIndicator.js +2 -2
- package/dist/commonjs/components/ActivityIndicator.js.map +1 -1
- package/dist/commonjs/components/Button.js +2 -2
- package/dist/commonjs/components/Button.js.map +1 -1
- package/dist/commonjs/components/FlatList.js +2 -2
- package/dist/commonjs/components/FlatList.js.map +1 -1
- package/dist/commonjs/components/Image.js +2 -2
- package/dist/commonjs/components/Image.js.map +1 -1
- package/dist/commonjs/components/Switch.js +2 -2
- package/dist/commonjs/components/Switch.js.map +1 -1
- package/dist/commonjs/components/Text.js +2 -2
- package/dist/commonjs/components/Text.js.map +1 -1
- package/dist/commonjs/components/TextInput.js +2 -2
- package/dist/commonjs/components/TextInput.js.map +1 -1
- package/dist/commonjs/components/View.js +2 -2
- package/dist/commonjs/components/View.js.map +1 -1
- package/dist/commonjs/components/react-native-safe-area-context.native.js +3 -3
- package/dist/commonjs/components/react-native-safe-area-context.native.js.map +1 -1
- package/dist/commonjs/index.js +4 -4
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/jest/index.js +5 -5
- package/dist/commonjs/jest/index.js.map +1 -1
- package/dist/commonjs/metro/index.js +12 -12
- package/dist/commonjs/metro/index.js.map +1 -1
- package/dist/commonjs/metro/injection-code.js +1 -1
- package/dist/commonjs/metro/injection-code.js.map +1 -1
- package/dist/commonjs/native/api.js +113 -0
- package/dist/commonjs/native/api.js.map +1 -0
- package/dist/commonjs/native/conditions/attributes.js +44 -0
- package/dist/commonjs/native/conditions/attributes.js.map +1 -0
- package/dist/commonjs/native/conditions/container-query.js.map +1 -0
- package/dist/commonjs/native/conditions/guards.js.map +1 -0
- package/dist/commonjs/native/conditions/index.js.map +1 -0
- package/dist/commonjs/native/conditions/media-query.js.map +1 -0
- package/dist/commonjs/native/index.js.map +1 -0
- package/dist/commonjs/native/metro.js.map +1 -0
- package/dist/commonjs/native/objects.js.map +1 -0
- package/dist/commonjs/native/react/interaction.js.map +1 -0
- package/dist/commonjs/native/react/rules.js +259 -0
- package/dist/commonjs/native/react/rules.js.map +1 -0
- package/dist/commonjs/native/react/useNativeCss.js +160 -0
- package/dist/commonjs/native/react/useNativeCss.js.map +1 -0
- package/dist/commonjs/native/react/usePassthrough.js.map +1 -0
- package/dist/commonjs/native/reactivity.js +181 -0
- package/dist/commonjs/native/reactivity.js.map +1 -0
- package/dist/commonjs/native/reanimated.js.map +1 -0
- package/dist/commonjs/native/styles/calculate-props.js +162 -0
- package/dist/commonjs/native/styles/calculate-props.js.map +1 -0
- package/dist/commonjs/native/styles/constants.js.map +1 -0
- package/dist/commonjs/native/styles/defaults.js.map +1 -0
- package/dist/commonjs/native/styles/functions/animation-timing.js.map +1 -0
- package/dist/commonjs/native/styles/functions/calc.js.map +1 -0
- package/dist/commonjs/native/styles/functions/filters.js +84 -0
- package/dist/commonjs/native/styles/functions/filters.js.map +1 -0
- package/dist/commonjs/native/styles/functions/index.js.map +1 -0
- package/dist/commonjs/native/styles/functions/numeric-functions.js.map +1 -0
- package/dist/commonjs/native/styles/functions/platform-functions.js.map +1 -0
- package/dist/commonjs/native/styles/functions/string-functions.js.map +1 -0
- package/dist/commonjs/native/styles/functions/transform-functions.js +121 -0
- package/dist/commonjs/native/styles/functions/transform-functions.js.map +1 -0
- package/dist/commonjs/native/styles/index.js +115 -0
- package/dist/commonjs/native/styles/index.js.map +1 -0
- package/dist/commonjs/native/styles/line-height.js +25 -0
- package/dist/commonjs/native/styles/line-height.js.map +1 -0
- package/dist/commonjs/native/styles/resolve.js +108 -0
- package/dist/commonjs/native/styles/resolve.js.map +1 -0
- package/dist/commonjs/native/styles/shorthands/_handler.js +79 -0
- package/dist/commonjs/native/styles/shorthands/_handler.js.map +1 -0
- package/dist/commonjs/native/styles/shorthands/animation.js +57 -0
- package/dist/commonjs/native/styles/shorthands/animation.js.map +1 -0
- package/dist/commonjs/native/styles/shorthands/border.js.map +1 -0
- package/dist/commonjs/native/styles/shorthands/box-shadow.js +48 -0
- package/dist/commonjs/native/styles/shorthands/box-shadow.js.map +1 -0
- package/dist/commonjs/native/styles/shorthands/index.js.map +1 -0
- package/dist/commonjs/native/styles/shorthands/text-shadow.js.map +1 -0
- package/dist/commonjs/native/styles/shorthands/transform.js.map +1 -0
- package/dist/commonjs/native/styles/units.js.map +1 -0
- package/dist/commonjs/native/styles/variables.js +79 -0
- package/dist/commonjs/native/styles/variables.js.map +1 -0
- package/dist/commonjs/native-internal/README.md +11 -0
- package/dist/commonjs/native-internal/index.js +39 -0
- package/dist/commonjs/native-internal/index.js.map +1 -0
- package/dist/commonjs/native-internal/root.js +34 -0
- package/dist/commonjs/native-internal/root.js.map +1 -0
- package/dist/commonjs/native-internal/style-collection.js +110 -0
- package/dist/commonjs/native-internal/style-collection.js.map +1 -0
- package/dist/commonjs/native-internal/variables.js +27 -0
- package/dist/commonjs/native-internal/variables.js.map +1 -0
- package/dist/commonjs/runtime/native/injection.js +2 -0
- package/dist/commonjs/runtime/native/injection.js.map +1 -0
- package/dist/commonjs/runtime.js.map +1 -0
- package/dist/commonjs/runtime.native.js.map +1 -0
- package/dist/commonjs/runtime.types.js.map +1 -0
- package/dist/commonjs/utilities/dot-notation.types.js.map +1 -0
- package/dist/commonjs/utilities/index.js +39 -0
- package/dist/commonjs/utilities/index.js.map +1 -0
- package/dist/commonjs/utilities/specificity.js.map +1 -0
- package/dist/commonjs/utilities/style-descriptor.js +21 -0
- package/dist/commonjs/utilities/style-descriptor.js.map +1 -0
- package/dist/commonjs/web/api.js.map +1 -0
- package/dist/commonjs/web/assign-style.js.map +1 -0
- package/dist/commonjs/web/index.js.map +1 -0
- package/dist/commonjs/web/metro.js.map +1 -0
- package/dist/module/babel/index.js +2 -2
- package/dist/module/babel/index.js.map +1 -1
- package/dist/module/compiler/atRules.js +6 -26
- package/dist/module/compiler/atRules.js.map +1 -1
- package/dist/module/compiler/compiler.js +72 -25
- 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 +79 -60
- package/dist/module/compiler/declarations.js.map +1 -1
- package/dist/module/compiler/inline-variables.js +138 -0
- package/dist/module/compiler/inline-variables.js.map +1 -0
- package/dist/module/compiler/pseudo-elements.js +1 -1
- package/dist/module/compiler/pseudo-elements.js.map +1 -1
- package/dist/module/compiler/selector-builder.js +7 -5
- package/dist/module/compiler/selector-builder.js.map +1 -1
- package/dist/module/compiler/selectors.js +1 -1
- package/dist/module/compiler/selectors.js.map +1 -1
- package/dist/module/compiler/stylesheet.js +4 -5
- package/dist/module/compiler/stylesheet.js.map +1 -1
- package/dist/module/components/ActivityIndicator.js +1 -1
- package/dist/module/components/ActivityIndicator.js.map +1 -1
- package/dist/module/components/Button.js +1 -1
- package/dist/module/components/Button.js.map +1 -1
- package/dist/module/components/FlatList.js +1 -1
- package/dist/module/components/FlatList.js.map +1 -1
- package/dist/module/components/Image.js +1 -1
- package/dist/module/components/Image.js.map +1 -1
- package/dist/module/components/Switch.js +1 -1
- package/dist/module/components/Switch.js.map +1 -1
- package/dist/module/components/Text.js +1 -1
- package/dist/module/components/Text.js.map +1 -1
- package/dist/module/components/TextInput.js +1 -1
- package/dist/module/components/TextInput.js.map +1 -1
- package/dist/module/components/View.js +1 -1
- package/dist/module/components/View.js.map +1 -1
- package/dist/module/components/react-native-safe-area-context.native.js +2 -2
- package/dist/module/components/react-native-safe-area-context.native.js.map +1 -1
- package/dist/module/index.js +1 -1
- package/dist/module/index.js.map +1 -1
- package/dist/module/jest/index.js +3 -3
- package/dist/module/jest/index.js.map +1 -1
- package/dist/module/metro/index.js +11 -11
- package/dist/module/metro/index.js.map +1 -1
- package/dist/module/metro/injection-code.js +1 -1
- package/dist/module/metro/injection-code.js.map +1 -1
- package/dist/module/native/api.js +82 -0
- package/dist/module/native/api.js.map +1 -0
- package/dist/module/native/conditions/attributes.js +40 -0
- package/dist/module/native/conditions/attributes.js.map +1 -0
- package/dist/module/native/conditions/container-query.js.map +1 -0
- package/dist/module/native/conditions/guards.js.map +1 -0
- package/dist/module/native/conditions/index.js.map +1 -0
- package/dist/module/native/conditions/media-query.js.map +1 -0
- package/dist/module/native/index.js.map +1 -0
- package/dist/module/native/metro.js.map +1 -0
- package/dist/module/native/objects.js.map +1 -0
- package/dist/module/native/react/interaction.js.map +1 -0
- package/dist/module/native/react/rules.js +252 -0
- package/dist/module/native/react/rules.js.map +1 -0
- package/dist/module/native/react/useNativeCss.js +154 -0
- package/dist/module/native/react/useNativeCss.js.map +1 -0
- package/dist/module/native/react/usePassthrough.js.map +1 -0
- package/dist/module/native/reactivity.js +169 -0
- package/dist/module/native/reactivity.js.map +1 -0
- package/dist/module/native/reanimated.js.map +1 -0
- package/dist/module/native/styles/calculate-props.js +157 -0
- package/dist/module/native/styles/calculate-props.js.map +1 -0
- package/dist/module/native/styles/constants.js.map +1 -0
- package/dist/module/native/styles/defaults.js.map +1 -0
- package/dist/module/native/styles/functions/animation-timing.js.map +1 -0
- package/dist/module/native/styles/functions/calc.js.map +1 -0
- package/dist/module/native/styles/functions/filters.js +70 -0
- package/dist/module/native/styles/functions/filters.js.map +1 -0
- package/dist/module/native/styles/functions/index.js.map +1 -0
- package/dist/module/native/styles/functions/numeric-functions.js.map +1 -0
- package/dist/module/native/styles/functions/platform-functions.js.map +1 -0
- package/dist/module/native/styles/functions/string-functions.js.map +1 -0
- package/dist/module/native/styles/functions/transform-functions.js +114 -0
- package/dist/module/native/styles/functions/transform-functions.js.map +1 -0
- package/dist/module/native/styles/index.js +110 -0
- package/dist/module/native/styles/index.js.map +1 -0
- package/dist/module/native/styles/line-height.js +20 -0
- package/dist/module/native/styles/line-height.js.map +1 -0
- package/dist/module/native/styles/resolve.js +103 -0
- package/dist/module/native/styles/resolve.js.map +1 -0
- package/dist/module/native/styles/shorthands/_handler.js +74 -0
- package/dist/module/native/styles/shorthands/_handler.js.map +1 -0
- package/dist/module/native/styles/shorthands/animation.js +51 -0
- package/dist/module/native/styles/shorthands/animation.js.map +1 -0
- package/dist/module/native/styles/shorthands/border.js.map +1 -0
- package/dist/module/native/styles/shorthands/box-shadow.js +43 -0
- package/dist/module/native/styles/shorthands/box-shadow.js.map +1 -0
- package/dist/module/native/styles/shorthands/index.js.map +1 -0
- package/dist/module/native/styles/shorthands/text-shadow.js.map +1 -0
- package/dist/module/native/styles/shorthands/transform.js.map +1 -0
- package/dist/module/native/styles/units.js.map +1 -0
- package/dist/module/native/styles/variables.js +75 -0
- package/dist/module/native/styles/variables.js.map +1 -0
- package/dist/module/native-internal/README.md +11 -0
- package/dist/module/native-internal/index.js +6 -0
- package/dist/module/native-internal/index.js.map +1 -0
- package/dist/module/native-internal/root.js +30 -0
- package/dist/module/native-internal/root.js.map +1 -0
- package/dist/module/native-internal/style-collection.js +95 -0
- package/dist/module/native-internal/style-collection.js.map +1 -0
- package/dist/module/native-internal/variables.js +22 -0
- package/dist/module/native-internal/variables.js.map +1 -0
- package/dist/module/runtime/native/injection.js +2 -0
- package/dist/module/runtime/native/injection.js.map +1 -0
- package/dist/module/runtime.js.map +1 -0
- package/dist/module/runtime.native.js.map +1 -0
- package/dist/module/runtime.types.js.map +1 -0
- package/dist/module/utilities/dot-notation.types.js.map +1 -0
- package/dist/module/utilities/index.js +6 -0
- package/dist/module/utilities/index.js.map +1 -0
- package/dist/module/utilities/specificity.js.map +1 -0
- package/dist/module/utilities/style-descriptor.js +16 -0
- package/dist/module/utilities/style-descriptor.js.map +1 -0
- package/dist/module/web/api.js.map +1 -0
- package/dist/module/web/assign-style.js.map +1 -0
- package/dist/module/web/index.js.map +1 -0
- package/dist/module/web/metro.js.map +1 -0
- package/dist/typescript/commonjs/example/src/App.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/babel/index.d.ts +3 -0
- package/dist/typescript/commonjs/src/babel/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/atRules.d.ts +1 -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/compiler.types.d.ts +11 -7
- package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/declarations.d.ts +7 -7
- package/dist/typescript/commonjs/src/compiler/declarations.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/inline-variables.d.ts +4 -0
- package/dist/typescript/commonjs/src/compiler/inline-variables.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts +1 -1
- package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/Text.d.ts +2 -2
- package/dist/typescript/commonjs/src/components/Text.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/View.d.ts +2 -2
- package/dist/typescript/commonjs/src/components/View.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/react-native-safe-area-context.native.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/jest/index.d.ts +1 -1
- package/dist/typescript/commonjs/src/jest/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/metro/index.d.ts +1 -1
- package/dist/typescript/commonjs/src/metro/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/api.d.ts +26 -0
- package/dist/typescript/commonjs/src/native/api.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/conditions/attributes.d.ts +4 -0
- package/dist/typescript/commonjs/src/native/conditions/attributes.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/conditions/container-query.d.ts +7 -0
- package/dist/typescript/commonjs/src/native/conditions/container-query.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/conditions/guards.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/conditions/index.d.ts +6 -0
- package/dist/typescript/commonjs/src/native/conditions/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/conditions/media-query.d.ts +4 -0
- package/dist/typescript/commonjs/src/native/conditions/media-query.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/metro.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/objects.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/react/interaction.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/react/rules.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/react/useNativeCss.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/react/usePassthrough.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/reactivity.d.ts +52 -0
- package/dist/typescript/commonjs/src/native/reactivity.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/reanimated.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/calculate-props.d.ts +10 -0
- package/dist/typescript/commonjs/src/native/styles/calculate-props.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/constants.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/defaults.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/functions/animation-timing.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/functions/calc.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/functions/filters.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/functions/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/functions/numeric-functions.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/functions/platform-functions.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/functions/string-functions.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/functions/transform-functions.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/index.d.ts +19 -0
- package/dist/typescript/commonjs/src/native/styles/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/line-height.d.ts +3 -0
- package/dist/typescript/commonjs/src/native/styles/line-height.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/resolve.d.ts +18 -0
- package/dist/typescript/commonjs/src/native/styles/resolve.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/shorthands/_handler.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/shorthands/animation.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/shorthands/border.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/shorthands/box-shadow.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/shorthands/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/shorthands/text-shadow.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/shorthands/transform.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/units.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/variables.d.ts +5 -0
- package/dist/typescript/commonjs/src/native/styles/variables.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native-internal/index.d.ts +4 -0
- package/dist/typescript/commonjs/src/native-internal/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native-internal/root.d.ts +11 -0
- package/dist/typescript/commonjs/src/native-internal/root.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native-internal/style-collection.d.ts +16 -0
- package/dist/typescript/commonjs/src/native-internal/style-collection.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native-internal/variables.d.ts +8 -0
- package/dist/typescript/commonjs/src/native-internal/variables.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/injection.d.ts +1 -0
- package/dist/typescript/commonjs/src/runtime/native/injection.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime.native.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime.types.d.ts +49 -0
- package/dist/typescript/commonjs/src/runtime.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/utilities/dot-notation.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/utilities/index.d.ts +4 -0
- package/dist/typescript/commonjs/src/utilities/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/utilities/specificity.d.ts +13 -0
- package/dist/typescript/commonjs/src/utilities/specificity.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/utilities/style-descriptor.d.ts +4 -0
- package/dist/typescript/commonjs/src/utilities/style-descriptor.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/web/api.d.ts +16 -0
- package/dist/typescript/commonjs/src/web/api.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/web/assign-style.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/web/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/web/metro.d.ts.map +1 -0
- package/dist/typescript/module/example/src/App.d.ts.map +1 -1
- package/dist/typescript/module/src/babel/index.d.ts +3 -0
- package/dist/typescript/module/src/babel/index.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/atRules.d.ts +1 -1
- package/dist/typescript/module/src/compiler/atRules.d.ts.map +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 -7
- package/dist/typescript/module/src/compiler/compiler.types.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/declarations.d.ts +7 -7
- package/dist/typescript/module/src/compiler/declarations.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/inline-variables.d.ts +4 -0
- package/dist/typescript/module/src/compiler/inline-variables.d.ts.map +1 -0
- 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/stylesheet.d.ts.map +1 -1
- package/dist/typescript/module/src/components/Text.d.ts +2 -2
- package/dist/typescript/module/src/components/Text.d.ts.map +1 -1
- package/dist/typescript/module/src/components/View.d.ts +2 -2
- package/dist/typescript/module/src/components/View.d.ts.map +1 -1
- package/dist/typescript/module/src/components/react-native-safe-area-context.native.d.ts.map +1 -1
- package/dist/typescript/module/src/jest/index.d.ts +1 -1
- package/dist/typescript/module/src/jest/index.d.ts.map +1 -1
- 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/native/api.d.ts +26 -0
- package/dist/typescript/module/src/native/api.d.ts.map +1 -0
- package/dist/typescript/module/src/native/conditions/attributes.d.ts +4 -0
- package/dist/typescript/module/src/native/conditions/attributes.d.ts.map +1 -0
- package/dist/typescript/module/src/native/conditions/container-query.d.ts +7 -0
- package/dist/typescript/module/src/native/conditions/container-query.d.ts.map +1 -0
- package/dist/typescript/module/src/native/conditions/guards.d.ts.map +1 -0
- package/dist/typescript/module/src/native/conditions/index.d.ts +6 -0
- package/dist/typescript/module/src/native/conditions/index.d.ts.map +1 -0
- package/dist/typescript/module/src/native/conditions/media-query.d.ts +4 -0
- package/dist/typescript/module/src/native/conditions/media-query.d.ts.map +1 -0
- package/dist/typescript/module/src/native/index.d.ts.map +1 -0
- package/dist/typescript/module/src/native/metro.d.ts.map +1 -0
- package/dist/typescript/module/src/native/objects.d.ts.map +1 -0
- package/dist/typescript/module/src/native/react/interaction.d.ts.map +1 -0
- package/dist/typescript/module/src/native/react/rules.d.ts.map +1 -0
- package/dist/typescript/module/src/native/react/useNativeCss.d.ts.map +1 -0
- package/dist/typescript/module/src/native/react/usePassthrough.d.ts.map +1 -0
- package/dist/typescript/module/src/native/reactivity.d.ts +52 -0
- package/dist/typescript/module/src/native/reactivity.d.ts.map +1 -0
- package/dist/typescript/module/src/native/reanimated.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/calculate-props.d.ts +10 -0
- package/dist/typescript/module/src/native/styles/calculate-props.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/constants.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/defaults.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/functions/animation-timing.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/functions/calc.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/functions/filters.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/functions/index.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/functions/numeric-functions.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/functions/platform-functions.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/functions/string-functions.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/functions/transform-functions.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/index.d.ts +19 -0
- package/dist/typescript/module/src/native/styles/index.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/line-height.d.ts +3 -0
- package/dist/typescript/module/src/native/styles/line-height.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/resolve.d.ts +18 -0
- package/dist/typescript/module/src/native/styles/resolve.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/shorthands/_handler.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/shorthands/animation.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/shorthands/border.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/shorthands/box-shadow.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/shorthands/index.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/shorthands/text-shadow.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/shorthands/transform.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/units.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/variables.d.ts +5 -0
- package/dist/typescript/module/src/native/styles/variables.d.ts.map +1 -0
- package/dist/typescript/module/src/native-internal/index.d.ts +4 -0
- package/dist/typescript/module/src/native-internal/index.d.ts.map +1 -0
- package/dist/typescript/module/src/native-internal/root.d.ts +11 -0
- package/dist/typescript/module/src/native-internal/root.d.ts.map +1 -0
- package/dist/typescript/module/src/native-internal/style-collection.d.ts +16 -0
- package/dist/typescript/module/src/native-internal/style-collection.d.ts.map +1 -0
- package/dist/typescript/module/src/native-internal/variables.d.ts +8 -0
- package/dist/typescript/module/src/native-internal/variables.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/injection.d.ts +1 -0
- package/dist/typescript/module/src/runtime/native/injection.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime.native.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime.types.d.ts +49 -0
- package/dist/typescript/module/src/runtime.types.d.ts.map +1 -0
- package/dist/typescript/module/src/utilities/dot-notation.types.d.ts.map +1 -0
- package/dist/typescript/module/src/utilities/index.d.ts +4 -0
- package/dist/typescript/module/src/utilities/index.d.ts.map +1 -0
- package/dist/typescript/module/src/utilities/specificity.d.ts +13 -0
- package/dist/typescript/module/src/utilities/specificity.d.ts.map +1 -0
- package/dist/typescript/module/src/utilities/style-descriptor.d.ts +4 -0
- package/dist/typescript/module/src/utilities/style-descriptor.d.ts.map +1 -0
- package/dist/typescript/module/src/web/api.d.ts +16 -0
- package/dist/typescript/module/src/web/api.d.ts.map +1 -0
- package/dist/typescript/module/src/web/assign-style.d.ts.map +1 -0
- package/dist/typescript/module/src/web/index.d.ts.map +1 -0
- package/dist/typescript/module/src/web/metro.d.ts.map +1 -0
- package/package.json +85 -53
- package/src/babel/index.ts +2 -2
- package/src/compiler/atRules.ts +4 -26
- package/src/compiler/compiler.ts +89 -27
- package/src/compiler/compiler.types.ts +16 -7
- package/src/compiler/declarations.ts +116 -99
- package/src/compiler/inline-variables.ts +209 -0
- package/src/compiler/pseudo-elements.ts +1 -1
- package/src/compiler/selector-builder.ts +8 -6
- package/src/compiler/selectors.ts +1 -1
- package/src/compiler/stylesheet.ts +5 -10
- package/src/components/Text.tsx +1 -1
- package/src/components/View.tsx +1 -1
- package/src/components/react-native-safe-area-context.native.tsx +7 -3
- package/src/jest/index.ts +4 -4
- package/src/metro/index.ts +19 -17
- package/src/metro/injection-code.ts +1 -1
- package/src/native/api.tsx +120 -0
- package/src/native/conditions/attributes.ts +54 -0
- package/src/native/conditions/container-query.ts +162 -0
- package/src/native/conditions/index.ts +55 -0
- package/src/native/conditions/media-query.ts +99 -0
- package/src/native/react/rules.ts +336 -0
- package/src/native/react/useNativeCss.ts +204 -0
- package/src/native/reactivity.ts +248 -0
- package/src/native/styles/calculate-props.ts +217 -0
- package/src/native/styles/functions/filters.ts +99 -0
- package/src/native/styles/functions/transform-functions.ts +85 -0
- package/src/native/styles/index.ts +198 -0
- package/src/native/styles/line-height.ts +25 -0
- package/src/native/styles/resolve.ts +165 -0
- package/src/native/styles/shorthands/_handler.ts +122 -0
- package/src/native/styles/shorthands/animation.ts +123 -0
- package/src/native/styles/shorthands/box-shadow.ts +71 -0
- package/src/native/styles/variables.ts +88 -0
- package/src/native-internal/README.md +11 -0
- package/src/native-internal/index.ts +3 -0
- package/src/native-internal/root.ts +44 -0
- package/src/native-internal/style-collection.ts +148 -0
- package/src/native-internal/variables.tsx +36 -0
- package/src/runtime/native/injection.ts +0 -0
- package/src/runtime.types.ts +150 -0
- package/src/utilities/index.ts +3 -0
- package/src/utilities/specificity.ts +45 -0
- package/src/utilities/style-descriptor.ts +24 -0
- package/src/web/api.tsx +115 -0
- package/dist/commonjs/runtime/index.js +0 -17
- package/dist/commonjs/runtime/index.js.map +0 -1
- package/dist/commonjs/runtime/native/api.js +0 -115
- package/dist/commonjs/runtime/native/api.js.map +0 -1
- package/dist/commonjs/runtime/native/conditions/attributes.js +0 -42
- package/dist/commonjs/runtime/native/conditions/attributes.js.map +0 -1
- package/dist/commonjs/runtime/native/conditions/container-query.js.map +0 -1
- package/dist/commonjs/runtime/native/conditions/guards.js.map +0 -1
- package/dist/commonjs/runtime/native/conditions/index.js.map +0 -1
- package/dist/commonjs/runtime/native/conditions/media-query.js.map +0 -1
- package/dist/commonjs/runtime/native/index.js.map +0 -1
- package/dist/commonjs/runtime/native/metro.js.map +0 -1
- package/dist/commonjs/runtime/native/react/interaction.js.map +0 -1
- package/dist/commonjs/runtime/native/react/rules.js +0 -259
- package/dist/commonjs/runtime/native/react/rules.js.map +0 -1
- package/dist/commonjs/runtime/native/react/useNativeCss.js +0 -159
- package/dist/commonjs/runtime/native/react/useNativeCss.js.map +0 -1
- package/dist/commonjs/runtime/native/react/usePassthrough.js.map +0 -1
- package/dist/commonjs/runtime/native/reactivity.js +0 -185
- package/dist/commonjs/runtime/native/reactivity.js.map +0 -1
- package/dist/commonjs/runtime/native/reanimated.js.map +0 -1
- package/dist/commonjs/runtime/native/styles/calculate-props.js +0 -148
- package/dist/commonjs/runtime/native/styles/calculate-props.js.map +0 -1
- package/dist/commonjs/runtime/native/styles/constants.js.map +0 -1
- package/dist/commonjs/runtime/native/styles/defaults.js.map +0 -1
- package/dist/commonjs/runtime/native/styles/functions/animation-timing.js.map +0 -1
- package/dist/commonjs/runtime/native/styles/functions/calc.js.map +0 -1
- package/dist/commonjs/runtime/native/styles/functions/filters.js +0 -84
- package/dist/commonjs/runtime/native/styles/functions/filters.js.map +0 -1
- package/dist/commonjs/runtime/native/styles/functions/index.js.map +0 -1
- package/dist/commonjs/runtime/native/styles/functions/numeric-functions.js.map +0 -1
- package/dist/commonjs/runtime/native/styles/functions/platform-functions.js.map +0 -1
- package/dist/commonjs/runtime/native/styles/functions/string-functions.js.map +0 -1
- package/dist/commonjs/runtime/native/styles/functions/transform-functions.js +0 -121
- package/dist/commonjs/runtime/native/styles/functions/transform-functions.js.map +0 -1
- package/dist/commonjs/runtime/native/styles/index.js +0 -115
- package/dist/commonjs/runtime/native/styles/index.js.map +0 -1
- package/dist/commonjs/runtime/native/styles/resolve.js +0 -106
- package/dist/commonjs/runtime/native/styles/resolve.js.map +0 -1
- package/dist/commonjs/runtime/native/styles/shorthands/_handler.js +0 -79
- package/dist/commonjs/runtime/native/styles/shorthands/_handler.js.map +0 -1
- package/dist/commonjs/runtime/native/styles/shorthands/animation.js +0 -57
- package/dist/commonjs/runtime/native/styles/shorthands/animation.js.map +0 -1
- package/dist/commonjs/runtime/native/styles/shorthands/border.js.map +0 -1
- package/dist/commonjs/runtime/native/styles/shorthands/box-shadow.js +0 -50
- package/dist/commonjs/runtime/native/styles/shorthands/box-shadow.js.map +0 -1
- package/dist/commonjs/runtime/native/styles/shorthands/index.js.map +0 -1
- package/dist/commonjs/runtime/native/styles/shorthands/text-shadow.js.map +0 -1
- package/dist/commonjs/runtime/native/styles/shorthands/transform.js.map +0 -1
- package/dist/commonjs/runtime/native/styles/units.js.map +0 -1
- package/dist/commonjs/runtime/native/styles/variables.js +0 -79
- package/dist/commonjs/runtime/native/styles/variables.js.map +0 -1
- package/dist/commonjs/runtime/runtime.js.map +0 -1
- package/dist/commonjs/runtime/runtime.native.js.map +0 -1
- package/dist/commonjs/runtime/runtime.types.js.map +0 -1
- package/dist/commonjs/runtime/utils/components.js +0 -18
- package/dist/commonjs/runtime/utils/components.js.map +0 -1
- package/dist/commonjs/runtime/utils/dot-notation.types.js.map +0 -1
- package/dist/commonjs/runtime/utils/index.js +0 -61
- package/dist/commonjs/runtime/utils/index.js.map +0 -1
- package/dist/commonjs/runtime/utils/objects.js.map +0 -1
- package/dist/commonjs/runtime/utils/specificity.js.map +0 -1
- package/dist/commonjs/runtime/utils/style-value.js +0 -21
- package/dist/commonjs/runtime/utils/style-value.js.map +0 -1
- package/dist/commonjs/runtime/utils/utils.types.js +0 -6
- package/dist/commonjs/runtime/utils/utils.types.js.map +0 -1
- package/dist/commonjs/runtime/web/api.js.map +0 -1
- package/dist/commonjs/runtime/web/assign-style.js.map +0 -1
- package/dist/commonjs/runtime/web/index.js.map +0 -1
- package/dist/commonjs/runtime/web/metro.js.map +0 -1
- package/dist/commonjs/style-collection/index.js +0 -110
- package/dist/commonjs/style-collection/index.js.map +0 -1
- package/dist/commonjs/style-collection/root.js +0 -29
- package/dist/commonjs/style-collection/root.js.map +0 -1
- package/dist/module/runtime/index.js +0 -9
- package/dist/module/runtime/index.js.map +0 -1
- package/dist/module/runtime/native/api.js +0 -94
- package/dist/module/runtime/native/api.js.map +0 -1
- package/dist/module/runtime/native/conditions/attributes.js +0 -38
- package/dist/module/runtime/native/conditions/attributes.js.map +0 -1
- package/dist/module/runtime/native/conditions/container-query.js.map +0 -1
- package/dist/module/runtime/native/conditions/guards.js.map +0 -1
- package/dist/module/runtime/native/conditions/index.js.map +0 -1
- package/dist/module/runtime/native/conditions/media-query.js.map +0 -1
- package/dist/module/runtime/native/index.js.map +0 -1
- package/dist/module/runtime/native/metro.js.map +0 -1
- package/dist/module/runtime/native/react/interaction.js.map +0 -1
- package/dist/module/runtime/native/react/rules.js +0 -251
- package/dist/module/runtime/native/react/rules.js.map +0 -1
- package/dist/module/runtime/native/react/useNativeCss.js +0 -153
- package/dist/module/runtime/native/react/useNativeCss.js.map +0 -1
- package/dist/module/runtime/native/react/usePassthrough.js.map +0 -1
- package/dist/module/runtime/native/reactivity.js +0 -173
- package/dist/module/runtime/native/reactivity.js.map +0 -1
- package/dist/module/runtime/native/reanimated.js.map +0 -1
- package/dist/module/runtime/native/styles/calculate-props.js +0 -143
- package/dist/module/runtime/native/styles/calculate-props.js.map +0 -1
- package/dist/module/runtime/native/styles/constants.js.map +0 -1
- package/dist/module/runtime/native/styles/defaults.js.map +0 -1
- package/dist/module/runtime/native/styles/functions/animation-timing.js.map +0 -1
- package/dist/module/runtime/native/styles/functions/calc.js.map +0 -1
- package/dist/module/runtime/native/styles/functions/filters.js +0 -70
- package/dist/module/runtime/native/styles/functions/filters.js.map +0 -1
- package/dist/module/runtime/native/styles/functions/index.js.map +0 -1
- package/dist/module/runtime/native/styles/functions/numeric-functions.js.map +0 -1
- package/dist/module/runtime/native/styles/functions/platform-functions.js.map +0 -1
- package/dist/module/runtime/native/styles/functions/string-functions.js.map +0 -1
- package/dist/module/runtime/native/styles/functions/transform-functions.js +0 -114
- package/dist/module/runtime/native/styles/functions/transform-functions.js.map +0 -1
- package/dist/module/runtime/native/styles/index.js +0 -110
- package/dist/module/runtime/native/styles/index.js.map +0 -1
- package/dist/module/runtime/native/styles/resolve.js +0 -101
- package/dist/module/runtime/native/styles/resolve.js.map +0 -1
- package/dist/module/runtime/native/styles/shorthands/_handler.js +0 -74
- package/dist/module/runtime/native/styles/shorthands/_handler.js.map +0 -1
- package/dist/module/runtime/native/styles/shorthands/animation.js +0 -51
- package/dist/module/runtime/native/styles/shorthands/animation.js.map +0 -1
- package/dist/module/runtime/native/styles/shorthands/border.js.map +0 -1
- package/dist/module/runtime/native/styles/shorthands/box-shadow.js +0 -45
- package/dist/module/runtime/native/styles/shorthands/box-shadow.js.map +0 -1
- package/dist/module/runtime/native/styles/shorthands/index.js.map +0 -1
- package/dist/module/runtime/native/styles/shorthands/text-shadow.js.map +0 -1
- package/dist/module/runtime/native/styles/shorthands/transform.js.map +0 -1
- package/dist/module/runtime/native/styles/units.js.map +0 -1
- package/dist/module/runtime/native/styles/variables.js +0 -75
- package/dist/module/runtime/native/styles/variables.js.map +0 -1
- package/dist/module/runtime/runtime.js.map +0 -1
- package/dist/module/runtime/runtime.native.js.map +0 -1
- package/dist/module/runtime/runtime.types.js.map +0 -1
- package/dist/module/runtime/utils/components.js +0 -14
- package/dist/module/runtime/utils/components.js.map +0 -1
- package/dist/module/runtime/utils/dot-notation.types.js.map +0 -1
- package/dist/module/runtime/utils/index.js +0 -8
- package/dist/module/runtime/utils/index.js.map +0 -1
- package/dist/module/runtime/utils/objects.js.map +0 -1
- package/dist/module/runtime/utils/specificity.js.map +0 -1
- package/dist/module/runtime/utils/style-value.js +0 -16
- package/dist/module/runtime/utils/style-value.js.map +0 -1
- package/dist/module/runtime/utils/utils.types.js +0 -4
- package/dist/module/runtime/utils/utils.types.js.map +0 -1
- package/dist/module/runtime/web/api.js.map +0 -1
- package/dist/module/runtime/web/assign-style.js.map +0 -1
- package/dist/module/runtime/web/index.js.map +0 -1
- package/dist/module/runtime/web/metro.js.map +0 -1
- package/dist/module/style-collection/index.js +0 -95
- package/dist/module/style-collection/index.js.map +0 -1
- package/dist/module/style-collection/root.js +0 -25
- package/dist/module/style-collection/root.js.map +0 -1
- package/dist/typescript/commonjs/src/runtime/index.d.ts +0 -7
- package/dist/typescript/commonjs/src/runtime/index.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/api.d.ts +0 -31
- package/dist/typescript/commonjs/src/runtime/native/api.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/conditions/attributes.d.ts +0 -5
- package/dist/typescript/commonjs/src/runtime/native/conditions/attributes.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/conditions/container-query.d.ts +0 -7
- package/dist/typescript/commonjs/src/runtime/native/conditions/container-query.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/conditions/guards.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/conditions/index.d.ts +0 -6
- package/dist/typescript/commonjs/src/runtime/native/conditions/index.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/conditions/media-query.d.ts +0 -4
- package/dist/typescript/commonjs/src/runtime/native/conditions/media-query.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/index.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/metro.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/react/interaction.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/react/rules.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/react/useNativeCss.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/react/usePassthrough.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/reactivity.d.ts +0 -53
- package/dist/typescript/commonjs/src/runtime/native/reactivity.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/reanimated.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/calculate-props.d.ts +0 -10
- package/dist/typescript/commonjs/src/runtime/native/styles/calculate-props.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/constants.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/defaults.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/animation-timing.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/calc.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/filters.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/index.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/numeric-functions.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/platform-functions.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/string-functions.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/transform-functions.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/index.d.ts +0 -19
- package/dist/typescript/commonjs/src/runtime/native/styles/index.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/resolve.d.ts +0 -18
- package/dist/typescript/commonjs/src/runtime/native/styles/resolve.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/_handler.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/animation.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/border.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/box-shadow.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/index.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/text-shadow.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/transform.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/units.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/variables.d.ts +0 -5
- package/dist/typescript/commonjs/src/runtime/native/styles/variables.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/runtime.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/runtime.native.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/runtime.types.d.ts +0 -47
- package/dist/typescript/commonjs/src/runtime/runtime.types.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/utils/components.d.ts +0 -2
- package/dist/typescript/commonjs/src/runtime/utils/components.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/utils/dot-notation.types.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/utils/index.d.ts +0 -6
- package/dist/typescript/commonjs/src/runtime/utils/index.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/utils/objects.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/utils/specificity.d.ts +0 -13
- package/dist/typescript/commonjs/src/runtime/utils/specificity.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/utils/style-value.d.ts +0 -4
- package/dist/typescript/commonjs/src/runtime/utils/style-value.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/utils/utils.types.d.ts +0 -5
- package/dist/typescript/commonjs/src/runtime/utils/utils.types.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/web/api.d.ts +0 -16
- package/dist/typescript/commonjs/src/runtime/web/api.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/web/assign-style.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/web/index.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/web/metro.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/style-collection/index.d.ts +0 -14
- package/dist/typescript/commonjs/src/style-collection/index.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/style-collection/root.d.ts +0 -11
- package/dist/typescript/commonjs/src/style-collection/root.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/index.d.ts +0 -7
- package/dist/typescript/module/src/runtime/index.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/api.d.ts +0 -31
- package/dist/typescript/module/src/runtime/native/api.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/conditions/attributes.d.ts +0 -5
- package/dist/typescript/module/src/runtime/native/conditions/attributes.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/conditions/container-query.d.ts +0 -7
- package/dist/typescript/module/src/runtime/native/conditions/container-query.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/conditions/guards.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/conditions/index.d.ts +0 -6
- package/dist/typescript/module/src/runtime/native/conditions/index.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/conditions/media-query.d.ts +0 -4
- package/dist/typescript/module/src/runtime/native/conditions/media-query.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/index.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/metro.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/react/interaction.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/react/rules.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/react/useNativeCss.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/react/usePassthrough.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/reactivity.d.ts +0 -53
- package/dist/typescript/module/src/runtime/native/reactivity.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/reanimated.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/styles/calculate-props.d.ts +0 -10
- package/dist/typescript/module/src/runtime/native/styles/calculate-props.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/styles/constants.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/styles/defaults.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/styles/functions/animation-timing.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/styles/functions/calc.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/styles/functions/filters.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/styles/functions/index.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/styles/functions/numeric-functions.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/styles/functions/platform-functions.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/styles/functions/string-functions.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/styles/functions/transform-functions.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/styles/index.d.ts +0 -19
- package/dist/typescript/module/src/runtime/native/styles/index.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/styles/resolve.d.ts +0 -18
- package/dist/typescript/module/src/runtime/native/styles/resolve.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/styles/shorthands/_handler.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/styles/shorthands/animation.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/styles/shorthands/border.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/styles/shorthands/box-shadow.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/styles/shorthands/index.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/styles/shorthands/text-shadow.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/styles/shorthands/transform.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/styles/units.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/styles/variables.d.ts +0 -5
- package/dist/typescript/module/src/runtime/native/styles/variables.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/runtime.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/runtime.native.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/runtime.types.d.ts +0 -47
- package/dist/typescript/module/src/runtime/runtime.types.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/utils/components.d.ts +0 -2
- package/dist/typescript/module/src/runtime/utils/components.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/utils/dot-notation.types.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/utils/index.d.ts +0 -6
- package/dist/typescript/module/src/runtime/utils/index.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/utils/objects.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/utils/specificity.d.ts +0 -13
- package/dist/typescript/module/src/runtime/utils/specificity.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/utils/style-value.d.ts +0 -4
- package/dist/typescript/module/src/runtime/utils/style-value.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/utils/utils.types.d.ts +0 -5
- package/dist/typescript/module/src/runtime/utils/utils.types.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/web/api.d.ts +0 -16
- package/dist/typescript/module/src/runtime/web/api.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/web/assign-style.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/web/index.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/web/metro.d.ts.map +0 -1
- package/dist/typescript/module/src/style-collection/index.d.ts +0 -14
- package/dist/typescript/module/src/style-collection/index.d.ts.map +0 -1
- package/dist/typescript/module/src/style-collection/root.d.ts +0 -11
- package/dist/typescript/module/src/style-collection/root.d.ts.map +0 -1
- package/src/runtime/index.ts +0 -7
- package/src/runtime/native/api.tsx +0 -135
- package/src/runtime/native/conditions/attributes.ts +0 -52
- package/src/runtime/native/conditions/container-query.ts +0 -162
- package/src/runtime/native/conditions/index.ts +0 -54
- package/src/runtime/native/conditions/media-query.ts +0 -98
- package/src/runtime/native/react/rules.ts +0 -336
- package/src/runtime/native/react/useNativeCss.ts +0 -203
- package/src/runtime/native/reactivity.ts +0 -251
- package/src/runtime/native/styles/calculate-props.ts +0 -197
- package/src/runtime/native/styles/functions/filters.ts +0 -98
- package/src/runtime/native/styles/functions/transform-functions.ts +0 -84
- package/src/runtime/native/styles/index.ts +0 -197
- package/src/runtime/native/styles/resolve.ts +0 -162
- package/src/runtime/native/styles/shorthands/_handler.ts +0 -121
- package/src/runtime/native/styles/shorthands/animation.ts +0 -123
- package/src/runtime/native/styles/shorthands/box-shadow.ts +0 -74
- package/src/runtime/native/styles/variables.ts +0 -88
- package/src/runtime/runtime.types.ts +0 -130
- package/src/runtime/utils/components.ts +0 -15
- package/src/runtime/utils/index.ts +0 -5
- package/src/runtime/utils/specificity.ts +0 -45
- package/src/runtime/utils/style-value.ts +0 -24
- package/src/runtime/utils/utils.types.ts +0 -19
- package/src/runtime/web/api.tsx +0 -114
- package/src/style-collection/index.ts +0 -142
- package/src/style-collection/root.ts +0 -37
- /package/dist/commonjs/{runtime/native → native}/conditions/container-query.js +0 -0
- /package/dist/commonjs/{runtime/native → native}/conditions/guards.js +0 -0
- /package/dist/commonjs/{runtime/native → native}/conditions/index.js +0 -0
- /package/dist/commonjs/{runtime/native → native}/conditions/media-query.js +0 -0
- /package/dist/commonjs/{runtime/native → native}/index.js +0 -0
- /package/dist/commonjs/{runtime/native → native}/metro.js +0 -0
- /package/dist/commonjs/{runtime/utils → native}/objects.js +0 -0
- /package/dist/commonjs/{runtime/native → native}/react/interaction.js +0 -0
- /package/dist/commonjs/{runtime/native → native}/react/usePassthrough.js +0 -0
- /package/dist/commonjs/{runtime/native → native}/reanimated.js +0 -0
- /package/dist/commonjs/{runtime/native → native}/styles/constants.js +0 -0
- /package/dist/commonjs/{runtime/native → native}/styles/defaults.js +0 -0
- /package/dist/commonjs/{runtime/native → native}/styles/functions/animation-timing.js +0 -0
- /package/dist/commonjs/{runtime/native → native}/styles/functions/calc.js +0 -0
- /package/dist/commonjs/{runtime/native → native}/styles/functions/index.js +0 -0
- /package/dist/commonjs/{runtime/native → native}/styles/functions/numeric-functions.js +0 -0
- /package/dist/commonjs/{runtime/native → native}/styles/functions/platform-functions.js +0 -0
- /package/dist/commonjs/{runtime/native → native}/styles/functions/string-functions.js +0 -0
- /package/dist/commonjs/{runtime/native → native}/styles/shorthands/border.js +0 -0
- /package/dist/commonjs/{runtime/native → native}/styles/shorthands/index.js +0 -0
- /package/dist/commonjs/{runtime/native → native}/styles/shorthands/text-shadow.js +0 -0
- /package/dist/commonjs/{runtime/native → native}/styles/shorthands/transform.js +0 -0
- /package/dist/commonjs/{runtime/native → native}/styles/units.js +0 -0
- /package/dist/commonjs/{runtime/runtime.js → runtime.js} +0 -0
- /package/dist/commonjs/{runtime/runtime.native.js → runtime.native.js} +0 -0
- /package/dist/commonjs/{runtime/runtime.types.js → runtime.types.js} +0 -0
- /package/dist/commonjs/{runtime/utils → utilities}/dot-notation.types.js +0 -0
- /package/dist/commonjs/{runtime/utils → utilities}/specificity.js +0 -0
- /package/dist/commonjs/{runtime/web → web}/api.js +0 -0
- /package/dist/commonjs/{runtime/web → web}/assign-style.js +0 -0
- /package/dist/commonjs/{runtime/web → web}/index.js +0 -0
- /package/dist/commonjs/{runtime/web → web}/metro.js +0 -0
- /package/dist/module/{runtime/native → native}/conditions/container-query.js +0 -0
- /package/dist/module/{runtime/native → native}/conditions/guards.js +0 -0
- /package/dist/module/{runtime/native → native}/conditions/index.js +0 -0
- /package/dist/module/{runtime/native → native}/conditions/media-query.js +0 -0
- /package/dist/module/{runtime/native → native}/index.js +0 -0
- /package/dist/module/{runtime/native → native}/metro.js +0 -0
- /package/dist/module/{runtime/utils → native}/objects.js +0 -0
- /package/dist/module/{runtime/native → native}/react/interaction.js +0 -0
- /package/dist/module/{runtime/native → native}/react/usePassthrough.js +0 -0
- /package/dist/module/{runtime/native → native}/reanimated.js +0 -0
- /package/dist/module/{runtime/native → native}/styles/constants.js +0 -0
- /package/dist/module/{runtime/native → native}/styles/defaults.js +0 -0
- /package/dist/module/{runtime/native → native}/styles/functions/animation-timing.js +0 -0
- /package/dist/module/{runtime/native → native}/styles/functions/calc.js +0 -0
- /package/dist/module/{runtime/native → native}/styles/functions/index.js +0 -0
- /package/dist/module/{runtime/native → native}/styles/functions/numeric-functions.js +0 -0
- /package/dist/module/{runtime/native → native}/styles/functions/platform-functions.js +0 -0
- /package/dist/module/{runtime/native → native}/styles/functions/string-functions.js +0 -0
- /package/dist/module/{runtime/native → native}/styles/shorthands/border.js +0 -0
- /package/dist/module/{runtime/native → native}/styles/shorthands/index.js +0 -0
- /package/dist/module/{runtime/native → native}/styles/shorthands/text-shadow.js +0 -0
- /package/dist/module/{runtime/native → native}/styles/shorthands/transform.js +0 -0
- /package/dist/module/{runtime/native → native}/styles/units.js +0 -0
- /package/dist/module/{runtime/runtime.js → runtime.js} +0 -0
- /package/dist/module/{runtime/runtime.native.js → runtime.native.js} +0 -0
- /package/dist/module/{runtime/runtime.types.js → runtime.types.js} +0 -0
- /package/dist/module/{runtime/utils → utilities}/dot-notation.types.js +0 -0
- /package/dist/module/{runtime/utils → utilities}/specificity.js +0 -0
- /package/dist/module/{runtime/web → web}/api.js +0 -0
- /package/dist/module/{runtime/web → web}/assign-style.js +0 -0
- /package/dist/module/{runtime/web → web}/index.js +0 -0
- /package/dist/module/{runtime/web → web}/metro.js +0 -0
- /package/dist/typescript/commonjs/src/{runtime/native → native}/conditions/guards.d.ts +0 -0
- /package/dist/typescript/commonjs/src/{runtime/native → native}/index.d.ts +0 -0
- /package/dist/typescript/commonjs/src/{runtime/native → native}/metro.d.ts +0 -0
- /package/dist/typescript/commonjs/src/{runtime/utils → native}/objects.d.ts +0 -0
- /package/dist/typescript/commonjs/src/{runtime/native → native}/react/interaction.d.ts +0 -0
- /package/dist/typescript/commonjs/src/{runtime/native → native}/react/rules.d.ts +0 -0
- /package/dist/typescript/commonjs/src/{runtime/native → native}/react/useNativeCss.d.ts +0 -0
- /package/dist/typescript/commonjs/src/{runtime/native → native}/react/usePassthrough.d.ts +0 -0
- /package/dist/typescript/commonjs/src/{runtime/native → native}/reanimated.d.ts +0 -0
- /package/dist/typescript/commonjs/src/{runtime/native → native}/styles/constants.d.ts +0 -0
- /package/dist/typescript/commonjs/src/{runtime/native → native}/styles/defaults.d.ts +0 -0
- /package/dist/typescript/commonjs/src/{runtime/native → native}/styles/functions/animation-timing.d.ts +0 -0
- /package/dist/typescript/commonjs/src/{runtime/native → native}/styles/functions/calc.d.ts +0 -0
- /package/dist/typescript/commonjs/src/{runtime/native → native}/styles/functions/filters.d.ts +0 -0
- /package/dist/typescript/commonjs/src/{runtime/native → native}/styles/functions/index.d.ts +0 -0
- /package/dist/typescript/commonjs/src/{runtime/native → native}/styles/functions/numeric-functions.d.ts +0 -0
- /package/dist/typescript/commonjs/src/{runtime/native → native}/styles/functions/platform-functions.d.ts +0 -0
- /package/dist/typescript/commonjs/src/{runtime/native → native}/styles/functions/string-functions.d.ts +0 -0
- /package/dist/typescript/commonjs/src/{runtime/native → native}/styles/functions/transform-functions.d.ts +0 -0
- /package/dist/typescript/commonjs/src/{runtime/native → native}/styles/shorthands/_handler.d.ts +0 -0
- /package/dist/typescript/commonjs/src/{runtime/native → native}/styles/shorthands/animation.d.ts +0 -0
- /package/dist/typescript/commonjs/src/{runtime/native → native}/styles/shorthands/border.d.ts +0 -0
- /package/dist/typescript/commonjs/src/{runtime/native → native}/styles/shorthands/box-shadow.d.ts +0 -0
- /package/dist/typescript/commonjs/src/{runtime/native → native}/styles/shorthands/index.d.ts +0 -0
- /package/dist/typescript/commonjs/src/{runtime/native → native}/styles/shorthands/text-shadow.d.ts +0 -0
- /package/dist/typescript/commonjs/src/{runtime/native → native}/styles/shorthands/transform.d.ts +0 -0
- /package/dist/typescript/commonjs/src/{runtime/native → native}/styles/units.d.ts +0 -0
- /package/dist/typescript/commonjs/src/{runtime/runtime.d.ts → runtime.d.ts} +0 -0
- /package/dist/typescript/commonjs/src/{runtime/runtime.native.d.ts → runtime.native.d.ts} +0 -0
- /package/dist/typescript/commonjs/src/{runtime/utils → utilities}/dot-notation.types.d.ts +0 -0
- /package/dist/typescript/commonjs/src/{runtime/web → web}/assign-style.d.ts +0 -0
- /package/dist/typescript/commonjs/src/{runtime/web → web}/index.d.ts +0 -0
- /package/dist/typescript/commonjs/src/{runtime/web → web}/metro.d.ts +0 -0
- /package/dist/typescript/module/src/{runtime/native → native}/conditions/guards.d.ts +0 -0
- /package/dist/typescript/module/src/{runtime/native → native}/index.d.ts +0 -0
- /package/dist/typescript/module/src/{runtime/native → native}/metro.d.ts +0 -0
- /package/dist/typescript/module/src/{runtime/utils → native}/objects.d.ts +0 -0
- /package/dist/typescript/module/src/{runtime/native → native}/react/interaction.d.ts +0 -0
- /package/dist/typescript/module/src/{runtime/native → native}/react/rules.d.ts +0 -0
- /package/dist/typescript/module/src/{runtime/native → native}/react/useNativeCss.d.ts +0 -0
- /package/dist/typescript/module/src/{runtime/native → native}/react/usePassthrough.d.ts +0 -0
- /package/dist/typescript/module/src/{runtime/native → native}/reanimated.d.ts +0 -0
- /package/dist/typescript/module/src/{runtime/native → native}/styles/constants.d.ts +0 -0
- /package/dist/typescript/module/src/{runtime/native → native}/styles/defaults.d.ts +0 -0
- /package/dist/typescript/module/src/{runtime/native → native}/styles/functions/animation-timing.d.ts +0 -0
- /package/dist/typescript/module/src/{runtime/native → native}/styles/functions/calc.d.ts +0 -0
- /package/dist/typescript/module/src/{runtime/native → native}/styles/functions/filters.d.ts +0 -0
- /package/dist/typescript/module/src/{runtime/native → native}/styles/functions/index.d.ts +0 -0
- /package/dist/typescript/module/src/{runtime/native → native}/styles/functions/numeric-functions.d.ts +0 -0
- /package/dist/typescript/module/src/{runtime/native → native}/styles/functions/platform-functions.d.ts +0 -0
- /package/dist/typescript/module/src/{runtime/native → native}/styles/functions/string-functions.d.ts +0 -0
- /package/dist/typescript/module/src/{runtime/native → native}/styles/functions/transform-functions.d.ts +0 -0
- /package/dist/typescript/module/src/{runtime/native → native}/styles/shorthands/_handler.d.ts +0 -0
- /package/dist/typescript/module/src/{runtime/native → native}/styles/shorthands/animation.d.ts +0 -0
- /package/dist/typescript/module/src/{runtime/native → native}/styles/shorthands/border.d.ts +0 -0
- /package/dist/typescript/module/src/{runtime/native → native}/styles/shorthands/box-shadow.d.ts +0 -0
- /package/dist/typescript/module/src/{runtime/native → native}/styles/shorthands/index.d.ts +0 -0
- /package/dist/typescript/module/src/{runtime/native → native}/styles/shorthands/text-shadow.d.ts +0 -0
- /package/dist/typescript/module/src/{runtime/native → native}/styles/shorthands/transform.d.ts +0 -0
- /package/dist/typescript/module/src/{runtime/native → native}/styles/units.d.ts +0 -0
- /package/dist/typescript/module/src/{runtime/runtime.d.ts → runtime.d.ts} +0 -0
- /package/dist/typescript/module/src/{runtime/runtime.native.d.ts → runtime.native.d.ts} +0 -0
- /package/dist/typescript/module/src/{runtime/utils → utilities}/dot-notation.types.d.ts +0 -0
- /package/dist/typescript/module/src/{runtime/web → web}/assign-style.d.ts +0 -0
- /package/dist/typescript/module/src/{runtime/web → web}/index.d.ts +0 -0
- /package/dist/typescript/module/src/{runtime/web → web}/metro.d.ts +0 -0
- /package/src/{runtime/native → native}/conditions/guards.ts +0 -0
- /package/src/{runtime/native → native}/index.ts +0 -0
- /package/src/{runtime/native → native}/metro.ts +0 -0
- /package/src/{runtime/utils → native}/objects.ts +0 -0
- /package/src/{runtime/native → native}/react/interaction.ts +0 -0
- /package/src/{runtime/native → native}/react/usePassthrough.ts +0 -0
- /package/src/{runtime/native → native}/reanimated.ts +0 -0
- /package/src/{runtime/native → native}/styles/constants.ts +0 -0
- /package/src/{runtime/native → native}/styles/defaults.ts +0 -0
- /package/src/{runtime/native → native}/styles/functions/animation-timing.ts +0 -0
- /package/src/{runtime/native → native}/styles/functions/calc.ts +0 -0
- /package/src/{runtime/native → native}/styles/functions/index.ts +0 -0
- /package/src/{runtime/native → native}/styles/functions/numeric-functions.ts +0 -0
- /package/src/{runtime/native → native}/styles/functions/platform-functions.ts +0 -0
- /package/src/{runtime/native → native}/styles/functions/string-functions.ts +0 -0
- /package/src/{runtime/native → native}/styles/shorthands/border.ts +0 -0
- /package/src/{runtime/native → native}/styles/shorthands/index.ts +0 -0
- /package/src/{runtime/native → native}/styles/shorthands/text-shadow.ts +0 -0
- /package/src/{runtime/native → native}/styles/shorthands/transform.ts +0 -0
- /package/src/{runtime/native → native}/styles/units.ts +0 -0
- /package/src/{runtime/runtime.native.ts → runtime.native.ts} +0 -0
- /package/src/{runtime/runtime.ts → runtime.ts} +0 -0
- /package/src/{runtime/utils → utilities}/dot-notation.types.ts +0 -0
- /package/src/{runtime/web → web}/assign-style.ts +0 -0
- /package/src/{runtime/web → web}/index.ts +0 -0
- /package/src/{runtime/web → web}/metro.ts +0 -0
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import {
|
|
3
|
+
createElement,
|
|
4
|
+
Fragment,
|
|
5
|
+
useContext,
|
|
6
|
+
useEffect,
|
|
7
|
+
useState,
|
|
8
|
+
type ComponentType,
|
|
9
|
+
} from "react";
|
|
10
|
+
import { Pressable, View } from "react-native";
|
|
11
|
+
|
|
12
|
+
import { VariableContext } from "react-native-css/native-internal";
|
|
13
|
+
|
|
14
|
+
import type { StyledConfiguration } from "../../runtime.types";
|
|
15
|
+
import { testGuards, type RenderGuard } from "../conditions/guards";
|
|
16
|
+
import {
|
|
17
|
+
cleanupEffect,
|
|
18
|
+
ContainerContext,
|
|
19
|
+
type ContainerContextValue,
|
|
20
|
+
type Effect,
|
|
21
|
+
type Getter,
|
|
22
|
+
type VariableContextValue,
|
|
23
|
+
} from "../reactivity";
|
|
24
|
+
import { animatedComponentFamily } from "../reanimated";
|
|
25
|
+
import { getStyledProps, stylesFamily } from "../styles";
|
|
26
|
+
import { updateRules } from "./rules";
|
|
27
|
+
|
|
28
|
+
export type Config = {
|
|
29
|
+
source: string;
|
|
30
|
+
target: string[] | string | false;
|
|
31
|
+
nativeStyleMapping?: Record<string, string>;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export type ComponentState = {
|
|
35
|
+
/** The source/target for classNames */
|
|
36
|
+
configs: Config[];
|
|
37
|
+
|
|
38
|
+
/** Reactive tracking */
|
|
39
|
+
ruleEffect: Effect;
|
|
40
|
+
ruleEffectGetter: Getter;
|
|
41
|
+
styleEffect: Effect;
|
|
42
|
+
|
|
43
|
+
/** The components props */
|
|
44
|
+
currentProps?: Record<string, any> | undefined | null;
|
|
45
|
+
|
|
46
|
+
/** An observable of the normal/important props */
|
|
47
|
+
stylesObs?: ReturnType<typeof stylesFamily>;
|
|
48
|
+
guards?: RenderGuard[];
|
|
49
|
+
|
|
50
|
+
variables?: VariableContextValue;
|
|
51
|
+
containers?: ContainerContextValue;
|
|
52
|
+
|
|
53
|
+
inheritedVariables: VariableContextValue;
|
|
54
|
+
inheritedContainers: ContainerContextValue;
|
|
55
|
+
|
|
56
|
+
animated?: boolean;
|
|
57
|
+
pressable?: undefined | boolean;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* useNativeCss is the native implementation of the useCssElement hook.
|
|
62
|
+
*/
|
|
63
|
+
export function useNativeCss(
|
|
64
|
+
type: ComponentType<any>,
|
|
65
|
+
originalProps: Record<string, any> | undefined | null,
|
|
66
|
+
configs: Config[] = [{ source: "className", target: "style" }],
|
|
67
|
+
) {
|
|
68
|
+
const inheritedVariables = useContext(VariableContext);
|
|
69
|
+
const inheritedContainers = useContext(ContainerContext);
|
|
70
|
+
|
|
71
|
+
const [state, setState] = useState((): ComponentState => {
|
|
72
|
+
// Both effects share the same observers to improve memory usage
|
|
73
|
+
const observers = new Set<Effect>();
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* When fired, this effect will force the rules to be re-evaluated.
|
|
77
|
+
* This will cause a re-render if there are different rules
|
|
78
|
+
*
|
|
79
|
+
* Use this when a rule condition changes, e.g FastRefresh or media queries
|
|
80
|
+
*/
|
|
81
|
+
const ruleEffect: Effect = {
|
|
82
|
+
observers,
|
|
83
|
+
run: () => setState((state) => updateRules(state)),
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* When fired, this effect will force a re-render of the component.
|
|
88
|
+
* This will cause a re-fetch of the styles.
|
|
89
|
+
*
|
|
90
|
+
* Use this when a value changes, e.g vm units or light / dark mode
|
|
91
|
+
*/
|
|
92
|
+
const styleEffect: Effect = {
|
|
93
|
+
observers,
|
|
94
|
+
run: () => setState((state) => ({ ...state })),
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
return updateRules(
|
|
98
|
+
{
|
|
99
|
+
ruleEffect,
|
|
100
|
+
ruleEffectGetter: (observable) => observable.get(ruleEffect),
|
|
101
|
+
styleEffect,
|
|
102
|
+
configs,
|
|
103
|
+
inheritedContainers,
|
|
104
|
+
inheritedVariables,
|
|
105
|
+
pressable: type === View ? false : undefined,
|
|
106
|
+
},
|
|
107
|
+
originalProps,
|
|
108
|
+
inheritedVariables,
|
|
109
|
+
inheritedContainers,
|
|
110
|
+
false,
|
|
111
|
+
false,
|
|
112
|
+
);
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
// Both effects share the same observers, so we only need to cleanup one of them
|
|
116
|
+
useEffect(() => () => cleanupEffect(state.ruleEffect), [state.ruleEffect]);
|
|
117
|
+
|
|
118
|
+
// Check if our derived state has changed (e.g the className prop)
|
|
119
|
+
if (
|
|
120
|
+
testGuards(state, originalProps, inheritedVariables, inheritedContainers)
|
|
121
|
+
) {
|
|
122
|
+
/**
|
|
123
|
+
* Get the new state
|
|
124
|
+
* Note, this might result in the same styles, but the guards will now be different
|
|
125
|
+
*/
|
|
126
|
+
setState(
|
|
127
|
+
updateRules(
|
|
128
|
+
state,
|
|
129
|
+
originalProps,
|
|
130
|
+
inheritedVariables,
|
|
131
|
+
inheritedContainers,
|
|
132
|
+
true,
|
|
133
|
+
),
|
|
134
|
+
);
|
|
135
|
+
|
|
136
|
+
// We can bail on rendering as the result of this render will be discarded
|
|
137
|
+
return createElement(Fragment);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
let props = getStyledProps(state, originalProps);
|
|
141
|
+
|
|
142
|
+
if (type === View && props?.onPress) {
|
|
143
|
+
type = Pressable;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
if (state.animated) {
|
|
147
|
+
type = animatedComponentFamily(type);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
if (state.variables) {
|
|
151
|
+
props = {
|
|
152
|
+
value: state.variables,
|
|
153
|
+
children: createElement(type, props),
|
|
154
|
+
};
|
|
155
|
+
type = VariableContext.Provider;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
if (state.containers) {
|
|
159
|
+
props = {
|
|
160
|
+
value: state.containers,
|
|
161
|
+
children: createElement(type, props),
|
|
162
|
+
};
|
|
163
|
+
type = ContainerContext.Provider;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
return createElement(type, props);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Convert the styled() mapping to a config array
|
|
171
|
+
*/
|
|
172
|
+
export function mappingToConfig(mapping: StyledConfiguration<any>) {
|
|
173
|
+
return Object.entries(mapping).flatMap(([key, value]): Config => {
|
|
174
|
+
if (value === true) {
|
|
175
|
+
return { source: key, target: key };
|
|
176
|
+
} else if (value === false) {
|
|
177
|
+
return { source: key, target: false };
|
|
178
|
+
} else if (typeof value === "string") {
|
|
179
|
+
return { source: key, target: value.split(".") };
|
|
180
|
+
} else if (typeof value === "object") {
|
|
181
|
+
if (Array.isArray(value)) {
|
|
182
|
+
return { source: key, target: value };
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
if ("target" in value) {
|
|
186
|
+
if (value.target === false) {
|
|
187
|
+
return { source: key, target: false };
|
|
188
|
+
} else if (typeof value.target === "string") {
|
|
189
|
+
const target = value.target.split(".");
|
|
190
|
+
|
|
191
|
+
if (target.length === 1) {
|
|
192
|
+
return { source: key, target: target[0]! };
|
|
193
|
+
} else {
|
|
194
|
+
return { source: key, target };
|
|
195
|
+
}
|
|
196
|
+
} else if (Array.isArray(value.target)) {
|
|
197
|
+
return { source: key, target: value.target };
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
throw new Error(`styled(): Invalid mapping for ${key}: ${value}`);
|
|
203
|
+
});
|
|
204
|
+
}
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import { createContext } from "react";
|
|
3
|
+
import {
|
|
4
|
+
Appearance,
|
|
5
|
+
Dimensions,
|
|
6
|
+
type ColorSchemeName,
|
|
7
|
+
type LayoutRectangle,
|
|
8
|
+
} from "react-native";
|
|
9
|
+
|
|
10
|
+
import type { StyleDescriptor } from "react-native-css/compiler";
|
|
11
|
+
|
|
12
|
+
export type Effect = {
|
|
13
|
+
observers: Set<Effect>;
|
|
14
|
+
run(): void;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export type Observable<Value, Arg = Value> = {
|
|
18
|
+
observers: Set<Effect>;
|
|
19
|
+
get: (effect?: Effect) => Value;
|
|
20
|
+
set: (arg: Arg) => void;
|
|
21
|
+
run: () => void;
|
|
22
|
+
};
|
|
23
|
+
type Read<Value, Arg> = (get: Getter, arg?: Arg) => Value;
|
|
24
|
+
export type Getter = <Value>(observable: Observable<Value, any>) => Value;
|
|
25
|
+
|
|
26
|
+
export const observableBatch: {
|
|
27
|
+
current?: Set<Effect>;
|
|
28
|
+
} = {};
|
|
29
|
+
|
|
30
|
+
export function observable<Value, Arg = Value>(
|
|
31
|
+
init: Value | Read<Value, Arg>,
|
|
32
|
+
equality: (value1: Value, value2: Value) => boolean = Object.is,
|
|
33
|
+
) {
|
|
34
|
+
let value: Value;
|
|
35
|
+
let isStatic = typeof init !== "function";
|
|
36
|
+
let didInit: boolean | undefined;
|
|
37
|
+
let lastArg: Arg | undefined;
|
|
38
|
+
|
|
39
|
+
if (typeof init !== "function") {
|
|
40
|
+
value = init;
|
|
41
|
+
didInit = true;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const observers = new Set<Effect>();
|
|
45
|
+
const effect: Effect = {
|
|
46
|
+
observers,
|
|
47
|
+
run: () => {
|
|
48
|
+
if (!isStatic) {
|
|
49
|
+
const nextValue = (init as Read<Value, Arg>)(getter, lastArg);
|
|
50
|
+
if (equality(value, nextValue)) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
value = nextValue;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
notify();
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const getter: Getter = (observable) => observable.get(effect);
|
|
61
|
+
|
|
62
|
+
function get(effect?: Effect) {
|
|
63
|
+
if (effect) {
|
|
64
|
+
observers.add(effect);
|
|
65
|
+
}
|
|
66
|
+
if (!didInit) {
|
|
67
|
+
value = (init as Read<Value, Arg>)(getter, undefined);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return value;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function set(arg: Arg) {
|
|
74
|
+
if (isStatic) {
|
|
75
|
+
if (equality(value, arg as unknown as Value)) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
value = arg as unknown as Value;
|
|
79
|
+
} else {
|
|
80
|
+
const nextValue = (init as Read<Value, Arg>)(getter, arg);
|
|
81
|
+
|
|
82
|
+
didInit = true;
|
|
83
|
+
lastArg = arg;
|
|
84
|
+
|
|
85
|
+
if (equality(value, nextValue)) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
value = nextValue;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
notify();
|
|
92
|
+
|
|
93
|
+
return obs;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function notify() {
|
|
97
|
+
Array.from(observers).forEach((observer) => {
|
|
98
|
+
if (observableBatch.current) {
|
|
99
|
+
observableBatch.current.add(observer);
|
|
100
|
+
} else {
|
|
101
|
+
observer.run();
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const obs: Observable<Value, Arg> = {
|
|
107
|
+
observers,
|
|
108
|
+
get,
|
|
109
|
+
set,
|
|
110
|
+
run: effect.run,
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
return obs;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export function cleanupEffect(effect: Effect) {
|
|
117
|
+
if (!effect) return;
|
|
118
|
+
for (const dep of effect.observers) {
|
|
119
|
+
dep.observers.delete(effect);
|
|
120
|
+
}
|
|
121
|
+
effect.observers.clear();
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/** Family Helpers ************************************************************/
|
|
125
|
+
|
|
126
|
+
export function family<Key, Result = Key, Args extends any = void>(
|
|
127
|
+
fn: (key: Key, args: Args) => Result,
|
|
128
|
+
) {
|
|
129
|
+
const map = new Map<Key, Result>();
|
|
130
|
+
return Object.assign(
|
|
131
|
+
(key: Key, args: Args) => {
|
|
132
|
+
let value = map.get(key);
|
|
133
|
+
if (!value) {
|
|
134
|
+
value = fn(key, args);
|
|
135
|
+
map.set(key, value);
|
|
136
|
+
}
|
|
137
|
+
return value;
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
delete(key: Key) {
|
|
141
|
+
return map.delete(key);
|
|
142
|
+
},
|
|
143
|
+
clear() {
|
|
144
|
+
return map.clear();
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
type WeakFamilyFn<Key, Args = undefined, Result = Key> = ((
|
|
151
|
+
key: Key,
|
|
152
|
+
args: Args,
|
|
153
|
+
) => Result) & {
|
|
154
|
+
has(key: Key): boolean;
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
export function weakFamily<Key extends WeakKey, Result = Key>(
|
|
158
|
+
fn: (key: Key) => Result,
|
|
159
|
+
): WeakFamilyFn<Key, void, Result>;
|
|
160
|
+
export function weakFamily<Key extends WeakKey, Args = undefined, Result = Key>(
|
|
161
|
+
fn: (key: Key, args: Args) => Result,
|
|
162
|
+
): WeakFamilyFn<Key, Args, Result>;
|
|
163
|
+
export function weakFamily<Key extends WeakKey, Args = undefined, Result = Key>(
|
|
164
|
+
fn: (key: Key, args: Args) => Result,
|
|
165
|
+
): WeakFamilyFn<Key, Args, Result> {
|
|
166
|
+
const map = new WeakMap<Key, Result>();
|
|
167
|
+
return Object.assign(
|
|
168
|
+
(key: Key, args: Args) => {
|
|
169
|
+
let value = map.get(key);
|
|
170
|
+
if (!value) {
|
|
171
|
+
value = fn(key, args);
|
|
172
|
+
map.set(key, value);
|
|
173
|
+
}
|
|
174
|
+
return value;
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
has: (key: Key) => map.has(key),
|
|
178
|
+
},
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/********************************* Variables **********************************/
|
|
183
|
+
|
|
184
|
+
export const VAR_SYMBOL = Symbol.for("react-native-css.var");
|
|
185
|
+
export type VariableContextValue = Record<string, StyleDescriptor> & {
|
|
186
|
+
[VAR_SYMBOL]: true;
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
/** Pseudo Classes ************************************************************/
|
|
190
|
+
|
|
191
|
+
export const hoverFamily = weakFamily(() => observable(false));
|
|
192
|
+
export const activeFamily = weakFamily(() => observable<boolean>(false));
|
|
193
|
+
export const focusFamily = weakFamily(() => observable<boolean>(false));
|
|
194
|
+
|
|
195
|
+
/** Dimensions ****************************************************************/
|
|
196
|
+
|
|
197
|
+
export const dimensions = observable(Dimensions.get("window"));
|
|
198
|
+
export const vw = observable<number>(
|
|
199
|
+
(read, value) => value ?? read(dimensions)?.width,
|
|
200
|
+
);
|
|
201
|
+
export const vh = observable<number>(
|
|
202
|
+
(read, value) => value ?? read(dimensions)?.height,
|
|
203
|
+
);
|
|
204
|
+
|
|
205
|
+
Dimensions.addEventListener("change", ({ window }) => {
|
|
206
|
+
observableBatch.current = new Set();
|
|
207
|
+
vw.set(window.width);
|
|
208
|
+
vh.set(window.height);
|
|
209
|
+
|
|
210
|
+
for (const effect of observableBatch.current) {
|
|
211
|
+
effect.run();
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
observableBatch.current = undefined;
|
|
215
|
+
});
|
|
216
|
+
|
|
217
|
+
/** Color Scheme **************************************************************/
|
|
218
|
+
|
|
219
|
+
export const colorScheme = observable<ColorSchemeName>(
|
|
220
|
+
Appearance.getColorScheme(),
|
|
221
|
+
);
|
|
222
|
+
Appearance.addChangeListener((event) => colorScheme.set(event.colorScheme));
|
|
223
|
+
|
|
224
|
+
/** Containers ****************************************************************/
|
|
225
|
+
|
|
226
|
+
export type ContainerContextValue = Record<string, WeakKey>;
|
|
227
|
+
export const ContainerContext = createContext<ContainerContextValue>({});
|
|
228
|
+
|
|
229
|
+
export const containerLayoutFamily = weakFamily(() => {
|
|
230
|
+
return observable<LayoutRectangle>({
|
|
231
|
+
x: 0,
|
|
232
|
+
y: 0,
|
|
233
|
+
width: 0,
|
|
234
|
+
height: 0,
|
|
235
|
+
});
|
|
236
|
+
});
|
|
237
|
+
|
|
238
|
+
export const containerWidthFamily = weakFamily((key) => {
|
|
239
|
+
return observable((read) => {
|
|
240
|
+
return read(containerLayoutFamily(key))?.width || 0;
|
|
241
|
+
});
|
|
242
|
+
});
|
|
243
|
+
|
|
244
|
+
export const containerHeightFamily = weakFamily((key) => {
|
|
245
|
+
return observable((read) => {
|
|
246
|
+
return read(containerLayoutFamily(key))?.width || 0;
|
|
247
|
+
});
|
|
248
|
+
});
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type {
|
|
3
|
+
InlineVariable,
|
|
4
|
+
StyleDeclaration,
|
|
5
|
+
StyleRule,
|
|
6
|
+
} from "react-native-css/compiler";
|
|
7
|
+
import { Specificity as S } from "react-native-css/utilities";
|
|
8
|
+
|
|
9
|
+
import type { RenderGuard } from "../conditions/guards";
|
|
10
|
+
import { applyValue, getDeepPath } from "../objects";
|
|
11
|
+
import {
|
|
12
|
+
VAR_SYMBOL,
|
|
13
|
+
type Getter,
|
|
14
|
+
type VariableContextValue,
|
|
15
|
+
} from "../reactivity";
|
|
16
|
+
import { transformKeys } from "./defaults";
|
|
17
|
+
import { resolveValue } from "./resolve";
|
|
18
|
+
|
|
19
|
+
export function calculateProps(
|
|
20
|
+
get: Getter,
|
|
21
|
+
rules: (StyleRule | InlineVariable | VariableContextValue)[],
|
|
22
|
+
guards: RenderGuard[] = [],
|
|
23
|
+
inheritedVariables: VariableContextValue = {
|
|
24
|
+
[VAR_SYMBOL]: true,
|
|
25
|
+
},
|
|
26
|
+
inlineVariables: InlineVariable = {
|
|
27
|
+
[VAR_SYMBOL]: "inline",
|
|
28
|
+
},
|
|
29
|
+
) {
|
|
30
|
+
let normal: Record<string, any> | undefined;
|
|
31
|
+
let important: Record<string, any> | undefined;
|
|
32
|
+
|
|
33
|
+
const delayedStyles: (() => void)[] = [];
|
|
34
|
+
const transformStyles: (() => void)[] = [];
|
|
35
|
+
|
|
36
|
+
for (const rule of rules) {
|
|
37
|
+
if (VAR_SYMBOL in rule) {
|
|
38
|
+
if (typeof rule[VAR_SYMBOL] === "string") {
|
|
39
|
+
Object.assign(inlineVariables, rule);
|
|
40
|
+
} else {
|
|
41
|
+
Object.assign(inheritedVariables, rule);
|
|
42
|
+
}
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
if (rule.v) {
|
|
47
|
+
for (const variable of rule.v) {
|
|
48
|
+
inlineVariables[variable[0]] = variable[1];
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (rule.d) {
|
|
53
|
+
let topLevelTarget = rule.s?.[S.Important]
|
|
54
|
+
? (important ??= {})
|
|
55
|
+
: (normal ??= {});
|
|
56
|
+
let target = topLevelTarget;
|
|
57
|
+
|
|
58
|
+
const ruleTarget = rule.target || "style";
|
|
59
|
+
|
|
60
|
+
if (typeof ruleTarget === "string") {
|
|
61
|
+
target = target[ruleTarget] ??= {};
|
|
62
|
+
} else if (ruleTarget) {
|
|
63
|
+
for (const path of ruleTarget) {
|
|
64
|
+
target = target[path] ??= {};
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
applyDeclarations(
|
|
69
|
+
get,
|
|
70
|
+
rule.d,
|
|
71
|
+
inlineVariables,
|
|
72
|
+
inheritedVariables,
|
|
73
|
+
delayedStyles,
|
|
74
|
+
transformStyles,
|
|
75
|
+
guards,
|
|
76
|
+
target,
|
|
77
|
+
topLevelTarget,
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
for (const delayedStyle of delayedStyles) {
|
|
83
|
+
delayedStyle();
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
for (const transformStyle of transformStyles) {
|
|
87
|
+
transformStyle();
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
return {
|
|
91
|
+
normal,
|
|
92
|
+
guards,
|
|
93
|
+
important,
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function applyDeclarations(
|
|
98
|
+
get: Getter,
|
|
99
|
+
declarations: StyleDeclaration[],
|
|
100
|
+
inlineVariables: InlineVariable,
|
|
101
|
+
inheritedVariables: VariableContextValue,
|
|
102
|
+
delayedStyles: (() => void)[] = [],
|
|
103
|
+
transformStyles: (() => void)[] = [],
|
|
104
|
+
guards: RenderGuard[] = [],
|
|
105
|
+
target: Record<string, any> = {},
|
|
106
|
+
topLevelTarget = target,
|
|
107
|
+
) {
|
|
108
|
+
const originalTarget = target;
|
|
109
|
+
|
|
110
|
+
for (const declaration of declarations) {
|
|
111
|
+
target = originalTarget;
|
|
112
|
+
|
|
113
|
+
if (!Array.isArray(declaration)) {
|
|
114
|
+
// Static styles
|
|
115
|
+
Object.assign(target, declaration);
|
|
116
|
+
} else {
|
|
117
|
+
// Dynamic styles
|
|
118
|
+
let value: any = declaration[0];
|
|
119
|
+
let propPath = declaration[1];
|
|
120
|
+
let prop: string | number;
|
|
121
|
+
|
|
122
|
+
if (Array.isArray(propPath)) {
|
|
123
|
+
const [first, ...rest] = propPath;
|
|
124
|
+
|
|
125
|
+
if (!first) {
|
|
126
|
+
continue;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
const final = rest.pop();
|
|
130
|
+
|
|
131
|
+
if (final) {
|
|
132
|
+
if (first !== "*") {
|
|
133
|
+
topLevelTarget[first] ??= {};
|
|
134
|
+
target = topLevelTarget[first];
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
let previousProp: string | number = first;
|
|
138
|
+
let previousTarget = topLevelTarget;
|
|
139
|
+
|
|
140
|
+
for (prop of rest) {
|
|
141
|
+
if (prop.startsWith("[") && prop.endsWith("]")) {
|
|
142
|
+
prop = Number(prop.slice(1, -1));
|
|
143
|
+
|
|
144
|
+
if (!Array.isArray(previousTarget[previousProp])) {
|
|
145
|
+
previousTarget[previousProp] = [];
|
|
146
|
+
target = previousTarget[previousProp];
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
previousTarget = target;
|
|
150
|
+
previousProp = prop;
|
|
151
|
+
|
|
152
|
+
target[prop] ??= {};
|
|
153
|
+
target = target[prop];
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
prop = final;
|
|
157
|
+
} else {
|
|
158
|
+
target = topLevelTarget;
|
|
159
|
+
prop = first;
|
|
160
|
+
}
|
|
161
|
+
} else {
|
|
162
|
+
prop = propPath;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
const shouldDelay = declaration[2];
|
|
166
|
+
|
|
167
|
+
if (shouldDelay || transformKeys.has(prop)) {
|
|
168
|
+
/**
|
|
169
|
+
* We need to delay the resolution of this value until after all
|
|
170
|
+
* styles have been calculated. But another style might override
|
|
171
|
+
* this value. So we set a placeholder value and only override
|
|
172
|
+
* if the placeholder is preserved
|
|
173
|
+
*
|
|
174
|
+
* This also ensures the props exist, so setValue will properly
|
|
175
|
+
* mutate the props object and not create a new one
|
|
176
|
+
*/
|
|
177
|
+
const originalValue = value;
|
|
178
|
+
// This needs to be a object with the [prop] so we can discover in transform arrays
|
|
179
|
+
value = { [prop]: true };
|
|
180
|
+
|
|
181
|
+
if (transformKeys.has(prop)) {
|
|
182
|
+
transformStyles.push(() => {
|
|
183
|
+
value = resolveValue(originalValue, get, {
|
|
184
|
+
inlineVariables,
|
|
185
|
+
inheritedVariables,
|
|
186
|
+
renderGuards: guards,
|
|
187
|
+
calculateProps,
|
|
188
|
+
});
|
|
189
|
+
applyValue(target, prop, value);
|
|
190
|
+
});
|
|
191
|
+
} else {
|
|
192
|
+
delayedStyles.push(() => {
|
|
193
|
+
if (getDeepPath(target, prop) === value) {
|
|
194
|
+
delete target[prop];
|
|
195
|
+
value = resolveValue(originalValue, get, {
|
|
196
|
+
inlineVariables,
|
|
197
|
+
inheritedVariables,
|
|
198
|
+
renderGuards: guards,
|
|
199
|
+
calculateProps,
|
|
200
|
+
});
|
|
201
|
+
applyValue(target, prop, value);
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
} else {
|
|
206
|
+
value = resolveValue(value, get, {
|
|
207
|
+
inlineVariables,
|
|
208
|
+
inheritedVariables,
|
|
209
|
+
renderGuards: guards,
|
|
210
|
+
calculateProps,
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
applyValue(target, prop, value);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|