react-native-css 0.0.0-nightly.da5ce0f → 0.0.0-nightly.df32ce3
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 +24 -0
- package/dist/commonjs/babel/helpers.js +7 -0
- package/dist/commonjs/babel/helpers.js.map +1 -1
- package/dist/commonjs/babel/import-plugin.js +20 -8
- package/dist/commonjs/babel/import-plugin.js.map +1 -1
- package/dist/commonjs/babel/react-native-web.js +17 -4
- package/dist/commonjs/babel/react-native-web.js.map +1 -1
- package/dist/commonjs/babel/react-native.js +9 -4
- package/dist/commonjs/babel/react-native.js.map +1 -1
- package/dist/commonjs/compiler/atRules.js +35 -0
- package/dist/commonjs/compiler/atRules.js.map +1 -1
- package/dist/commonjs/compiler/compiler.js +107 -32
- package/dist/commonjs/compiler/compiler.js.map +1 -1
- package/dist/commonjs/compiler/container-query.js +6 -1
- package/dist/commonjs/compiler/container-query.js.map +1 -1
- package/dist/commonjs/compiler/declarations.js +103 -62
- package/dist/commonjs/compiler/declarations.js.map +1 -1
- package/dist/commonjs/compiler/lightningcss-loader.js +11 -8
- package/dist/commonjs/compiler/lightningcss-loader.js.map +1 -1
- package/dist/commonjs/compiler/media-query.js +16 -6
- package/dist/commonjs/compiler/media-query.js.map +1 -1
- package/dist/commonjs/compiler/selector-builder.js +15 -4
- package/dist/commonjs/compiler/selector-builder.js.map +1 -1
- package/dist/commonjs/compiler/stylesheet.js +16 -3
- package/dist/commonjs/compiler/stylesheet.js.map +1 -1
- package/dist/commonjs/compiler/supports.js +1 -3
- package/dist/commonjs/compiler/supports.js.map +1 -1
- package/dist/commonjs/components/FlatList.js +1 -0
- package/dist/commonjs/components/FlatList.js.map +1 -1
- package/dist/commonjs/components/ImageBackground.js +2 -6
- package/dist/commonjs/components/ImageBackground.js.map +1 -1
- package/dist/commonjs/components/KeyboardAvoidingView.js +2 -3
- package/dist/commonjs/components/KeyboardAvoidingView.js.map +1 -1
- package/dist/commonjs/components/index.cjs +46 -1
- package/dist/commonjs/components/index.cjs.map +1 -1
- package/dist/commonjs/jest/index.js +1 -1
- package/dist/commonjs/jest/index.js.map +1 -1
- package/dist/commonjs/metro/cache-version.js +43 -0
- package/dist/commonjs/metro/cache-version.js.map +1 -0
- package/dist/commonjs/metro/index.js +2 -0
- package/dist/commonjs/metro/index.js.map +1 -1
- package/dist/commonjs/metro/metro-transformer.js +16 -3
- package/dist/commonjs/metro/metro-transformer.js.map +1 -1
- package/dist/commonjs/metro/typescript.js +26 -6
- package/dist/commonjs/metro/typescript.js.map +1 -1
- package/dist/commonjs/metro/warnings.js +135 -0
- package/dist/commonjs/metro/warnings.js.map +1 -0
- package/dist/commonjs/native/api.js +13 -9
- package/dist/commonjs/native/api.js.map +1 -1
- package/dist/commonjs/native/conditions/attributes.js +16 -9
- package/dist/commonjs/native/conditions/attributes.js.map +1 -1
- package/dist/commonjs/native/conditions/container-query.js +11 -11
- package/dist/commonjs/native/conditions/container-query.js.map +1 -1
- package/dist/commonjs/native/conditions/media-query.js +1 -1
- package/dist/commonjs/native/conditions/media-query.js.map +1 -1
- package/dist/commonjs/native/react/interaction.js +10 -5
- package/dist/commonjs/native/react/interaction.js.map +1 -1
- package/dist/commonjs/native/react/rules.js +12 -5
- package/dist/commonjs/native/react/rules.js.map +1 -1
- package/dist/commonjs/native/react/useNativeCss.js +60 -11
- package/dist/commonjs/native/react/useNativeCss.js.map +1 -1
- package/dist/commonjs/native/react/usePassthrough.js +5 -2
- package/dist/commonjs/native/react/usePassthrough.js.map +1 -1
- package/dist/commonjs/native/reactivity.js +61 -24
- package/dist/commonjs/native/reactivity.js.map +1 -1
- package/dist/commonjs/native/reanimated.js +15 -3
- package/dist/commonjs/native/reanimated.js.map +1 -1
- package/dist/commonjs/native/styles/functions/color-mix.js +43 -29
- package/dist/commonjs/native/styles/functions/color-mix.js.map +1 -1
- package/dist/commonjs/native/styles/functions/filters.js +18 -5
- package/dist/commonjs/native/styles/functions/filters.js.map +1 -1
- package/dist/commonjs/native/styles/functions/numeric-functions.js +4 -3
- package/dist/commonjs/native/styles/functions/numeric-functions.js.map +1 -1
- package/dist/commonjs/native/styles/functions/string-functions.js +16 -1
- package/dist/commonjs/native/styles/functions/string-functions.js.map +1 -1
- package/dist/commonjs/native/styles/functions/transform-functions.js +5 -4
- package/dist/commonjs/native/styles/functions/transform-functions.js.map +1 -1
- package/dist/commonjs/native/styles/index.js +140 -14
- package/dist/commonjs/native/styles/index.js.map +1 -1
- package/dist/commonjs/native/styles/resolve.js +10 -6
- package/dist/commonjs/native/styles/resolve.js.map +1 -1
- package/dist/commonjs/native/styles/scale-factor.js +13 -0
- package/dist/commonjs/native/styles/scale-factor.js.map +1 -0
- package/dist/commonjs/native/styles/shorthands/_handler.js +10 -0
- package/dist/commonjs/native/styles/shorthands/_handler.js.map +1 -1
- package/dist/commonjs/native/styles/shorthands/animation.js +6 -3
- package/dist/commonjs/native/styles/shorthands/animation.js.map +1 -1
- package/dist/commonjs/native/styles/shorthands/box-shadow.js +45 -12
- package/dist/commonjs/native/styles/shorthands/box-shadow.js.map +1 -1
- package/dist/commonjs/native/styles/shorthands/index.js +11 -0
- package/dist/commonjs/native/styles/shorthands/index.js.map +1 -1
- package/dist/commonjs/native/styles/shorthands/logical-border-width.js +22 -0
- package/dist/commonjs/native/styles/shorthands/logical-border-width.js.map +1 -0
- package/dist/commonjs/native/styles/variables.js +55 -43
- package/dist/commonjs/native/styles/variables.js.map +1 -1
- package/dist/commonjs/native-internal/root.js +18 -7
- package/dist/commonjs/native-internal/root.js.map +1 -1
- package/dist/commonjs/native-internal/style-collection.js +1 -1
- package/dist/commonjs/native-internal/style-collection.js.map +1 -1
- package/dist/commonjs/native-internal/variables.js +1 -1
- package/dist/commonjs/native-internal/variables.js.map +1 -1
- package/dist/commonjs/utilities/dot-notation.types.js +4 -0
- package/dist/commonjs/utilities/style-descriptor.js +4 -9
- package/dist/commonjs/utilities/style-descriptor.js.map +1 -1
- package/dist/commonjs/web/api.js +1 -1
- package/dist/commonjs/web/api.js.map +1 -1
- package/dist/commonjs/web/assign-style.js +4 -1
- package/dist/commonjs/web/assign-style.js.map +1 -1
- package/dist/module/babel/helpers.js +6 -0
- package/dist/module/babel/helpers.js.map +1 -1
- package/dist/module/babel/import-plugin.js +22 -10
- package/dist/module/babel/import-plugin.js.map +1 -1
- package/dist/module/babel/react-native-web.js +16 -4
- package/dist/module/babel/react-native-web.js.map +1 -1
- package/dist/module/babel/react-native.js +9 -4
- package/dist/module/babel/react-native.js.map +1 -1
- package/dist/module/compiler/atRules.js +33 -0
- package/dist/module/compiler/atRules.js.map +1 -1
- package/dist/module/compiler/compiler.js +109 -34
- package/dist/module/compiler/compiler.js.map +1 -1
- package/dist/module/compiler/compiler.types.js +2 -0
- package/dist/module/compiler/compiler.types.js.map +1 -1
- package/dist/module/compiler/container-query.js +6 -1
- package/dist/module/compiler/container-query.js.map +1 -1
- package/dist/module/compiler/declarations.js +103 -62
- package/dist/module/compiler/declarations.js.map +1 -1
- package/dist/module/compiler/lightningcss-loader.js +10 -8
- package/dist/module/compiler/lightningcss-loader.js.map +1 -1
- package/dist/module/compiler/media-query.js +16 -6
- package/dist/module/compiler/media-query.js.map +1 -1
- package/dist/module/compiler/selector-builder.js +15 -4
- package/dist/module/compiler/selector-builder.js.map +1 -1
- package/dist/module/compiler/stylesheet.js +16 -3
- package/dist/module/compiler/stylesheet.js.map +1 -1
- package/dist/module/compiler/supports.js +1 -3
- package/dist/module/compiler/supports.js.map +1 -1
- package/dist/module/components/FlatList.js +1 -0
- package/dist/module/components/FlatList.js.map +1 -1
- package/dist/module/components/ImageBackground.js +2 -6
- package/dist/module/components/ImageBackground.js.map +1 -1
- package/dist/module/components/KeyboardAvoidingView.js +2 -3
- package/dist/module/components/KeyboardAvoidingView.js.map +1 -1
- package/dist/module/components/index.cjs +46 -1
- package/dist/module/components/index.cjs.map +1 -1
- package/dist/module/jest/index.js +1 -1
- package/dist/module/jest/index.js.map +1 -1
- package/dist/module/metro/cache-version.js +39 -0
- package/dist/module/metro/cache-version.js.map +1 -0
- package/dist/module/metro/index.js +2 -0
- package/dist/module/metro/index.js.map +1 -1
- package/dist/module/metro/metro-transformer.js +16 -3
- package/dist/module/metro/metro-transformer.js.map +1 -1
- package/dist/module/metro/typescript.js +26 -6
- package/dist/module/metro/typescript.js.map +1 -1
- package/dist/module/metro/warnings.js +131 -0
- package/dist/module/metro/warnings.js.map +1 -0
- package/dist/module/native/api.js +15 -11
- package/dist/module/native/api.js.map +1 -1
- package/dist/module/native/conditions/attributes.js +16 -9
- package/dist/module/native/conditions/attributes.js.map +1 -1
- package/dist/module/native/conditions/container-query.js +11 -11
- package/dist/module/native/conditions/container-query.js.map +1 -1
- package/dist/module/native/conditions/media-query.js +1 -1
- package/dist/module/native/conditions/media-query.js.map +1 -1
- package/dist/module/native/react/interaction.js +10 -5
- package/dist/module/native/react/interaction.js.map +1 -1
- package/dist/module/native/react/rules.js +13 -6
- package/dist/module/native/react/rules.js.map +1 -1
- package/dist/module/native/react/useNativeCss.js +63 -14
- package/dist/module/native/react/useNativeCss.js.map +1 -1
- package/dist/module/native/react/usePassthrough.js +5 -2
- package/dist/module/native/react/usePassthrough.js.map +1 -1
- package/dist/module/native/reactivity.js +55 -22
- package/dist/module/native/reactivity.js.map +1 -1
- package/dist/module/native/reanimated.js +15 -3
- package/dist/module/native/reanimated.js.map +1 -1
- package/dist/module/native/styles/functions/color-mix.js +43 -29
- package/dist/module/native/styles/functions/color-mix.js.map +1 -1
- package/dist/module/native/styles/functions/filters.js +16 -4
- package/dist/module/native/styles/functions/filters.js.map +1 -1
- package/dist/module/native/styles/functions/numeric-functions.js +4 -3
- package/dist/module/native/styles/functions/numeric-functions.js.map +1 -1
- package/dist/module/native/styles/functions/string-functions.js +13 -0
- package/dist/module/native/styles/functions/string-functions.js.map +1 -1
- package/dist/module/native/styles/functions/transform-functions.js +5 -4
- package/dist/module/native/styles/functions/transform-functions.js.map +1 -1
- package/dist/module/native/styles/index.js +140 -14
- package/dist/module/native/styles/index.js.map +1 -1
- package/dist/module/native/styles/resolve.js +10 -6
- package/dist/module/native/styles/resolve.js.map +1 -1
- package/dist/module/native/styles/scale-factor.js +9 -0
- package/dist/module/native/styles/scale-factor.js.map +1 -0
- package/dist/module/native/styles/shorthands/_handler.js +11 -1
- package/dist/module/native/styles/shorthands/_handler.js.map +1 -1
- package/dist/module/native/styles/shorthands/animation.js +6 -3
- package/dist/module/native/styles/shorthands/animation.js.map +1 -1
- package/dist/module/native/styles/shorthands/box-shadow.js +46 -12
- package/dist/module/native/styles/shorthands/box-shadow.js.map +1 -1
- package/dist/module/native/styles/shorthands/index.js +1 -0
- package/dist/module/native/styles/shorthands/index.js.map +1 -1
- package/dist/module/native/styles/shorthands/logical-border-width.js +18 -0
- package/dist/module/native/styles/shorthands/logical-border-width.js.map +1 -0
- package/dist/module/native/styles/variables.js +55 -43
- package/dist/module/native/styles/variables.js.map +1 -1
- package/dist/module/native-internal/root.js +18 -7
- package/dist/module/native-internal/root.js.map +1 -1
- package/dist/module/native-internal/style-collection.js +1 -1
- package/dist/module/native-internal/style-collection.js.map +1 -1
- package/dist/module/native-internal/variables.js +2 -2
- package/dist/module/native-internal/variables.js.map +1 -1
- package/dist/module/utilities/dot-notation.types.js +2 -0
- package/dist/module/utilities/style-descriptor.js +4 -9
- package/dist/module/utilities/style-descriptor.js.map +1 -1
- package/dist/module/web/api.js +1 -1
- package/dist/module/web/api.js.map +1 -1
- package/dist/module/web/assign-style.js +4 -1
- package/dist/module/web/assign-style.js.map +1 -1
- package/dist/typescript/commonjs/src/babel/helpers.d.ts +2 -1
- package/dist/typescript/commonjs/src/babel/helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/babel/import-plugin.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/babel/react-native-web.d.ts +2 -1
- package/dist/typescript/commonjs/src/babel/react-native-web.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/babel/react-native.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/atRules.d.ts +4 -1
- package/dist/typescript/commonjs/src/compiler/atRules.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/compiler.d.ts +1 -5
- package/dist/typescript/commonjs/src/compiler/compiler.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts +6 -0
- package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/declarations.d.ts +2 -2
- package/dist/typescript/commonjs/src/compiler/declarations.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/lightningcss-loader.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/media-query.d.ts +1 -1
- package/dist/typescript/commonjs/src/compiler/media-query.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts +7 -8
- package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/FlatList.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/ImageBackground.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/KeyboardAvoidingView.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/react-native-safe-area-context.native.d.ts +1 -1
- package/dist/typescript/commonjs/src/components/react-native-safe-area-context.native.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/jest/index.d.ts +2 -10
- package/dist/typescript/commonjs/src/jest/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/metro/cache-version.d.ts +8 -0
- package/dist/typescript/commonjs/src/metro/cache-version.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/index.d.ts +4 -0
- package/dist/typescript/commonjs/src/metro/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts +9 -4
- package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/metro/typescript.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/metro/warnings.d.ts +13 -0
- package/dist/typescript/commonjs/src/metro/warnings.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/api.d.ts +4 -8
- package/dist/typescript/commonjs/src/native/api.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/conditions/container-query.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/react/interaction.d.ts +1 -1
- package/dist/typescript/commonjs/src/native/react/interaction.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/react/rules.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/react/useNativeCss.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/react/usePassthrough.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/reactivity.d.ts +14 -3
- package/dist/typescript/commonjs/src/native/reactivity.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/reanimated.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/functions/color-mix.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/functions/filters.d.ts +2 -0
- package/dist/typescript/commonjs/src/native/styles/functions/filters.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/functions/numeric-functions.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/functions/string-functions.d.ts +2 -0
- package/dist/typescript/commonjs/src/native/styles/functions/string-functions.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/functions/transform-functions.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/index.d.ts +2 -2
- package/dist/typescript/commonjs/src/native/styles/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/resolve.d.ts +1 -0
- package/dist/typescript/commonjs/src/native/styles/resolve.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/scale-factor.d.ts +2 -0
- package/dist/typescript/commonjs/src/native/styles/scale-factor.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/shorthands/_handler.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/shorthands/animation.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/shorthands/box-shadow.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/shorthands/index.d.ts +1 -0
- package/dist/typescript/commonjs/src/native/styles/shorthands/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/shorthands/logical-border-width.d.ts +4 -0
- package/dist/typescript/commonjs/src/native/styles/shorthands/logical-border-width.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/variables.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native-internal/root.d.ts +12 -0
- package/dist/typescript/commonjs/src/native-internal/root.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native-internal/variables.d.ts +1 -1
- package/dist/typescript/commonjs/src/native-internal/variables.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime.types.d.ts +11 -6
- package/dist/typescript/commonjs/src/runtime.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/utilities/dot-notation.types.d.ts +2 -1
- package/dist/typescript/commonjs/src/utilities/dot-notation.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/utilities/style-descriptor.d.ts +1 -1
- package/dist/typescript/commonjs/src/utilities/style-descriptor.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/web/api.d.ts +5 -5
- package/dist/typescript/commonjs/src/web/api.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/web/assign-style.d.ts.map +1 -1
- package/dist/typescript/module/src/babel/helpers.d.ts +2 -1
- package/dist/typescript/module/src/babel/helpers.d.ts.map +1 -1
- package/dist/typescript/module/src/babel/import-plugin.d.ts +1 -1
- package/dist/typescript/module/src/babel/import-plugin.d.ts.map +1 -1
- package/dist/typescript/module/src/babel/react-native-web.d.ts +2 -1
- package/dist/typescript/module/src/babel/react-native-web.d.ts.map +1 -1
- package/dist/typescript/module/src/babel/react-native.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/atRules.d.ts +6 -3
- package/dist/typescript/module/src/compiler/atRules.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/compiler.d.ts +3 -7
- package/dist/typescript/module/src/compiler/compiler.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/compiler.types.d.ts +7 -1
- package/dist/typescript/module/src/compiler/compiler.types.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/container-query.d.ts +2 -2
- package/dist/typescript/module/src/compiler/container-query.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/declarations.d.ts +4 -4
- package/dist/typescript/module/src/compiler/declarations.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/index.d.ts +2 -2
- package/dist/typescript/module/src/compiler/index.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/inline-variables.d.ts +1 -1
- package/dist/typescript/module/src/compiler/inline-variables.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/keyframes.d.ts +2 -2
- package/dist/typescript/module/src/compiler/keyframes.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/lightningcss-loader.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/media-query.d.ts +3 -3
- package/dist/typescript/module/src/compiler/media-query.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/pseudo-elements.d.ts +1 -1
- package/dist/typescript/module/src/compiler/pseudo-elements.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/selector-builder.d.ts +1 -1
- package/dist/typescript/module/src/compiler/selector-builder.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/selectors.d.ts +2 -2
- package/dist/typescript/module/src/compiler/selectors.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/stylesheet.d.ts +7 -8
- package/dist/typescript/module/src/compiler/stylesheet.d.ts.map +1 -1
- package/dist/typescript/module/src/components/FlatList.d.ts.map +1 -1
- package/dist/typescript/module/src/components/ImageBackground.d.ts.map +1 -1
- package/dist/typescript/module/src/components/KeyboardAvoidingView.d.ts.map +1 -1
- package/dist/typescript/module/src/components/index.d.ts +16 -16
- package/dist/typescript/module/src/components/index.d.ts.map +1 -1
- package/dist/typescript/module/src/components/react-native-safe-area-context.native.d.ts +1 -1
- package/dist/typescript/module/src/components/react-native-safe-area-context.native.d.ts.map +1 -1
- package/dist/typescript/module/src/jest/index.d.ts +2 -10
- package/dist/typescript/module/src/jest/index.d.ts.map +1 -1
- package/dist/typescript/module/src/metro/cache-version.d.ts +8 -0
- package/dist/typescript/module/src/metro/cache-version.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/index.d.ts +5 -1
- package/dist/typescript/module/src/metro/index.d.ts.map +1 -1
- package/dist/typescript/module/src/metro/metro-transformer.d.ts +10 -5
- package/dist/typescript/module/src/metro/metro-transformer.d.ts.map +1 -1
- package/dist/typescript/module/src/metro/typescript.d.ts.map +1 -1
- package/dist/typescript/module/src/metro/warnings.d.ts +13 -0
- package/dist/typescript/module/src/metro/warnings.d.ts.map +1 -0
- package/dist/typescript/module/src/native/api.d.ts +5 -9
- package/dist/typescript/module/src/native/api.d.ts.map +1 -1
- package/dist/typescript/module/src/native/conditions/attributes.d.ts +1 -1
- package/dist/typescript/module/src/native/conditions/attributes.d.ts.map +1 -1
- package/dist/typescript/module/src/native/conditions/container-query.d.ts +2 -2
- package/dist/typescript/module/src/native/conditions/container-query.d.ts.map +1 -1
- package/dist/typescript/module/src/native/conditions/guards.d.ts +2 -2
- package/dist/typescript/module/src/native/conditions/guards.d.ts.map +1 -1
- package/dist/typescript/module/src/native/conditions/index.d.ts +3 -3
- package/dist/typescript/module/src/native/conditions/index.d.ts.map +1 -1
- package/dist/typescript/module/src/native/conditions/media-query.d.ts +1 -1
- package/dist/typescript/module/src/native/conditions/media-query.d.ts.map +1 -1
- package/dist/typescript/module/src/native/index.d.ts +3 -3
- package/dist/typescript/module/src/native/index.d.ts.map +1 -1
- package/dist/typescript/module/src/native/react/interaction.d.ts +2 -2
- package/dist/typescript/module/src/native/react/interaction.d.ts.map +1 -1
- package/dist/typescript/module/src/native/react/rules.d.ts +2 -2
- package/dist/typescript/module/src/native/react/rules.d.ts.map +1 -1
- package/dist/typescript/module/src/native/react/useNativeCss.d.ts +4 -4
- package/dist/typescript/module/src/native/react/useNativeCss.d.ts.map +1 -1
- package/dist/typescript/module/src/native/react/usePassthrough.d.ts +1 -1
- package/dist/typescript/module/src/native/react/usePassthrough.d.ts.map +1 -1
- package/dist/typescript/module/src/native/reactivity.d.ts +14 -3
- package/dist/typescript/module/src/native/reactivity.d.ts.map +1 -1
- package/dist/typescript/module/src/native/reanimated.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/calculate-props.d.ts +2 -2
- package/dist/typescript/module/src/native/styles/calculate-props.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/animation-timing.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/functions/animation-timing.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/calc.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/functions/calc.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/color-mix.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/functions/color-mix.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/filters.d.ts +3 -1
- package/dist/typescript/module/src/native/styles/functions/filters.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/index.d.ts +8 -8
- package/dist/typescript/module/src/native/styles/functions/index.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/numeric-functions.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/functions/numeric-functions.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/platform-functions.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/functions/platform-functions.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/string-functions.d.ts +3 -1
- package/dist/typescript/module/src/native/styles/functions/string-functions.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/transform-functions.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/functions/transform-functions.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/index.d.ts +7 -7
- package/dist/typescript/module/src/native/styles/index.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/line-height.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/line-height.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/resolve.d.ts +4 -3
- package/dist/typescript/module/src/native/styles/resolve.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/scale-factor.d.ts +2 -0
- package/dist/typescript/module/src/native/styles/scale-factor.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/shorthands/_handler.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/_handler.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/animation.d.ts +2 -2
- package/dist/typescript/module/src/native/styles/shorthands/animation.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/border.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/border.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/box-shadow.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/box-shadow.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/index.d.ts +6 -5
- package/dist/typescript/module/src/native/styles/shorthands/index.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/logical-border-width.d.ts +4 -0
- package/dist/typescript/module/src/native/styles/shorthands/logical-border-width.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/shorthands/text-shadow.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/text-shadow.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/transform.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/transform.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/units.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/units.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/variables.d.ts +2 -2
- package/dist/typescript/module/src/native/styles/variables.d.ts.map +1 -1
- package/dist/typescript/module/src/native-internal/index.d.ts +3 -3
- package/dist/typescript/module/src/native-internal/index.d.ts.map +1 -1
- package/dist/typescript/module/src/native-internal/root.d.ts +13 -1
- package/dist/typescript/module/src/native-internal/root.d.ts.map +1 -1
- package/dist/typescript/module/src/native-internal/style-collection.d.ts +2 -2
- package/dist/typescript/module/src/native-internal/style-collection.d.ts.map +1 -1
- package/dist/typescript/module/src/native-internal/variables.d.ts +2 -2
- package/dist/typescript/module/src/native-internal/variables.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime.d.ts +1 -1
- package/dist/typescript/module/src/runtime.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime.native.d.ts +1 -1
- package/dist/typescript/module/src/runtime.native.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime.types.d.ts +11 -6
- package/dist/typescript/module/src/runtime.types.d.ts.map +1 -1
- package/dist/typescript/module/src/utilities/dot-notation.types.d.ts +2 -1
- package/dist/typescript/module/src/utilities/dot-notation.types.d.ts.map +1 -1
- package/dist/typescript/module/src/utilities/index.d.ts +3 -3
- package/dist/typescript/module/src/utilities/index.d.ts.map +1 -1
- package/dist/typescript/module/src/utilities/specificity.d.ts +2 -2
- package/dist/typescript/module/src/utilities/specificity.d.ts.map +1 -1
- package/dist/typescript/module/src/utilities/style-descriptor.d.ts +1 -1
- package/dist/typescript/module/src/utilities/style-descriptor.d.ts.map +1 -1
- package/dist/typescript/module/src/web/api.d.ts +5 -5
- package/dist/typescript/module/src/web/api.d.ts.map +1 -1
- package/dist/typescript/module/src/web/assign-style.d.ts.map +1 -1
- package/dist/typescript/module/src/web/index.d.ts +3 -3
- package/dist/typescript/module/src/web/index.d.ts.map +1 -1
- package/node/babel.mjs +4 -0
- package/node/compiler.mjs +2 -0
- package/node/metro.mjs +2 -0
- package/package.json +65 -29
- package/src/babel/helpers.ts +8 -1
- package/src/babel/import-plugin.ts +31 -16
- package/src/babel/react-native-web.ts +32 -4
- package/src/babel/react-native.ts +9 -4
- package/src/compiler/atRules.ts +44 -0
- package/src/compiler/compiler.ts +159 -43
- package/src/compiler/compiler.types.ts +9 -0
- package/src/compiler/container-query.ts +8 -3
- package/src/compiler/declarations.ts +190 -101
- package/src/compiler/lightningcss-loader.ts +16 -15
- package/src/compiler/media-query.ts +20 -9
- package/src/compiler/selector-builder.ts +31 -4
- package/src/compiler/stylesheet.ts +23 -10
- package/src/compiler/supports.ts +1 -3
- package/src/components/FlatList.tsx +1 -0
- package/src/components/ImageBackground.tsx +2 -6
- package/src/components/KeyboardAvoidingView.tsx +2 -3
- package/src/components/index.cts +46 -1
- package/src/jest/index.ts +1 -1
- package/src/metro/cache-version.ts +48 -0
- package/src/metro/index.ts +7 -0
- package/src/metro/metro-transformer.ts +26 -8
- package/src/metro/typescript.ts +53 -6
- package/src/metro/warnings.ts +187 -0
- package/src/native/api.tsx +22 -17
- package/src/native/conditions/attributes.ts +26 -9
- package/src/native/conditions/container-query.ts +11 -9
- package/src/native/conditions/media-query.ts +1 -1
- package/src/native/react/interaction.ts +11 -6
- package/src/native/react/rules.ts +13 -5
- package/src/native/react/useNativeCss.ts +69 -14
- package/src/native/react/usePassthrough.ts +3 -2
- package/src/native/reactivity.ts +76 -24
- package/src/native/reanimated.ts +24 -5
- package/src/native/styles/functions/color-mix.ts +45 -39
- package/src/native/styles/functions/filters.ts +20 -6
- package/src/native/styles/functions/numeric-functions.ts +7 -6
- package/src/native/styles/functions/string-functions.ts +18 -0
- package/src/native/styles/functions/transform-functions.ts +5 -4
- package/src/native/styles/index.ts +146 -15
- package/src/native/styles/resolve.ts +15 -11
- package/src/native/styles/scale-factor.ts +6 -0
- package/src/native/styles/shorthands/_handler.ts +14 -1
- package/src/native/styles/shorthands/animation.ts +8 -2
- package/src/native/styles/shorthands/box-shadow.ts +50 -15
- package/src/native/styles/shorthands/index.ts +1 -0
- package/src/native/styles/shorthands/logical-border-width.ts +32 -0
- package/src/native/styles/variables.ts +48 -38
- package/src/native-internal/root.ts +40 -13
- package/src/native-internal/style-collection.ts +1 -1
- package/src/native-internal/variables.tsx +6 -4
- package/src/runtime.types.ts +17 -15
- package/src/utilities/dot-notation.types.ts +4 -3
- package/src/utilities/style-descriptor.ts +11 -16
- package/src/web/api.tsx +6 -11
- package/src/web/assign-style.ts +2 -1
- package/types.d.ts +0 -20
- package/dist/commonjs/compiler/inheritance.test.js +0 -78
- package/dist/commonjs/compiler/inheritance.test.js.map +0 -1
- package/dist/module/compiler/inheritance.test.js +0 -78
- package/dist/module/compiler/inheritance.test.js.map +0 -1
- package/dist/typescript/commonjs/.config/eslint.config.d.mts +0 -3
- package/dist/typescript/commonjs/.config/eslint.config.d.mts.map +0 -1
- package/dist/typescript/commonjs/eslint.config.d.mts +0 -2
- package/dist/typescript/commonjs/eslint.config.d.mts.map +0 -1
- package/dist/typescript/commonjs/example/app.config.d.ts +0 -4
- package/dist/typescript/commonjs/example/app.config.d.ts.map +0 -1
- package/dist/typescript/commonjs/example/index.d.ts +0 -2
- package/dist/typescript/commonjs/example/index.d.ts.map +0 -1
- package/dist/typescript/commonjs/example/metro.config.d.ts +0 -3
- package/dist/typescript/commonjs/example/metro.config.d.ts.map +0 -1
- package/dist/typescript/commonjs/example/postcss.config.d.mts +0 -7
- package/dist/typescript/commonjs/example/postcss.config.d.mts.map +0 -1
- package/dist/typescript/commonjs/example/src/App.d.ts +0 -3
- package/dist/typescript/commonjs/example/src/App.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/compiler/inheritance.test.d.ts +0 -2
- package/dist/typescript/commonjs/src/compiler/inheritance.test.d.ts.map +0 -1
- package/dist/typescript/module/.config/eslint.config.d.mts +0 -3
- package/dist/typescript/module/.config/eslint.config.d.mts.map +0 -1
- package/dist/typescript/module/eslint.config.d.mts +0 -2
- package/dist/typescript/module/eslint.config.d.mts.map +0 -1
- package/dist/typescript/module/example/app.config.d.ts +0 -4
- package/dist/typescript/module/example/app.config.d.ts.map +0 -1
- package/dist/typescript/module/example/index.d.ts +0 -2
- package/dist/typescript/module/example/index.d.ts.map +0 -1
- package/dist/typescript/module/example/metro.config.d.ts +0 -3
- package/dist/typescript/module/example/metro.config.d.ts.map +0 -1
- package/dist/typescript/module/example/postcss.config.d.mts +0 -7
- package/dist/typescript/module/example/postcss.config.d.mts.map +0 -1
- package/dist/typescript/module/example/src/App.d.ts +0 -3
- package/dist/typescript/module/example/src/App.d.ts.map +0 -1
- package/dist/typescript/module/src/compiler/inheritance.test.d.ts +0 -2
- package/dist/typescript/module/src/compiler/inheritance.test.d.ts.map +0 -1
- package/src/compiler/inheritance.test.ts +0 -121
|
@@ -2,27 +2,45 @@
|
|
|
2
2
|
|
|
3
3
|
import { isStyleDescriptorArray } from "react-native-css/utilities";
|
|
4
4
|
import { shorthandHandler } from "./_handler.js";
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
// "color" type accepts both strings ("#fff") and objects (PlatformColor from currentcolor).
|
|
7
|
+
// Using "string" here would reject platform color objects and silently drop the shadow.
|
|
8
|
+
const color = ["color", "color"];
|
|
6
9
|
const offsetX = ["offsetX", "number"];
|
|
7
10
|
const offsetY = ["offsetY", "number"];
|
|
8
11
|
const blurRadius = ["blurRadius", "number"];
|
|
9
12
|
const spreadDistance = ["spreadDistance", "number"];
|
|
10
|
-
//
|
|
11
|
-
|
|
12
|
-
const handler = shorthandHandler([
|
|
13
|
+
// Match the literal string "inset" - the array type checks if value is in array
|
|
14
|
+
const inset = ["inset", ["inset"]];
|
|
15
|
+
const handler = shorthandHandler([
|
|
16
|
+
// Standard patterns (without inset)
|
|
17
|
+
[offsetX, offsetY, blurRadius, spreadDistance], [offsetX, offsetY, blurRadius, spreadDistance, color], [color, offsetX, offsetY], [color, offsetX, offsetY, blurRadius, spreadDistance], [offsetX, offsetY, color], [offsetX, offsetY, blurRadius, color],
|
|
18
|
+
// Inset patterns - "inset" keyword at the beginning
|
|
19
|
+
[inset, offsetX, offsetY, blurRadius, spreadDistance], [inset, offsetX, offsetY, blurRadius, spreadDistance, color], [inset, offsetX, offsetY, blurRadius, color], [inset, color, offsetX, offsetY, blurRadius, spreadDistance]], [], "object");
|
|
13
20
|
export const boxShadow = (resolveValue, func, get, options) => {
|
|
14
21
|
const args = resolveValue(func[2]);
|
|
15
22
|
if (!isStyleDescriptorArray(args)) {
|
|
16
23
|
return args;
|
|
17
|
-
} else {
|
|
18
|
-
return args.flatMap(flattenShadowDescriptor).map(shadows => {
|
|
19
|
-
if (shadows === undefined) {
|
|
20
|
-
return;
|
|
21
|
-
} else {
|
|
22
|
-
return omitTransparentShadows(handler(resolveValue, shadows, get, options));
|
|
23
|
-
}
|
|
24
|
-
}).filter(v => v !== undefined);
|
|
25
24
|
}
|
|
25
|
+
|
|
26
|
+
// A flat array of primitives (e.g. [0, 4, 6, -1, "#000"]) is a single shadow
|
|
27
|
+
// resolved from a runtime variable. Pass it directly to the pattern handler.
|
|
28
|
+
// A nested array (e.g. [[0, 4, 6, -1, "#000"], [...]]) is multiple shadows.
|
|
29
|
+
if (args.length > 0 && !Array.isArray(args[0])) {
|
|
30
|
+
const result = handler(resolveValue, args, get, options);
|
|
31
|
+
if (result === undefined) {
|
|
32
|
+
return [];
|
|
33
|
+
}
|
|
34
|
+
const filtered = omitTransparentShadows(result);
|
|
35
|
+
return filtered !== undefined ? [normalizeInsetValue(filtered)] : [];
|
|
36
|
+
}
|
|
37
|
+
return args.flatMap(flattenShadowDescriptor).map(shadows => {
|
|
38
|
+
if (shadows === undefined) {
|
|
39
|
+
return;
|
|
40
|
+
} else {
|
|
41
|
+
return normalizeInsetValue(omitTransparentShadows(handler(resolveValue, shadows, get, options)));
|
|
42
|
+
}
|
|
43
|
+
}).filter(v => v !== undefined);
|
|
26
44
|
};
|
|
27
45
|
function flattenShadowDescriptor(arg) {
|
|
28
46
|
if (isStyleDescriptorArray(arg) && isStyleDescriptorArray(arg[0])) {
|
|
@@ -40,4 +58,20 @@ function omitTransparentShadows(style) {
|
|
|
40
58
|
}
|
|
41
59
|
return style;
|
|
42
60
|
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Convert inset: "inset" to inset: true for React Native boxShadow.
|
|
64
|
+
*
|
|
65
|
+
* The shorthand handler matches the literal "inset" string and assigns it as the value.
|
|
66
|
+
* React Native's boxShadow expects inset to be a boolean.
|
|
67
|
+
*/
|
|
68
|
+
function normalizeInsetValue(style) {
|
|
69
|
+
if (typeof style === "object" && style && "inset" in style) {
|
|
70
|
+
return {
|
|
71
|
+
...style,
|
|
72
|
+
inset: true
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
return style;
|
|
76
|
+
}
|
|
43
77
|
//# sourceMappingURL=box-shadow.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["isStyleDescriptorArray","shorthandHandler","color","offsetX","offsetY","blurRadius","spreadDistance","handler","boxShadow","resolveValue","func","get","options","args","
|
|
1
|
+
{"version":3,"names":["isStyleDescriptorArray","shorthandHandler","color","offsetX","offsetY","blurRadius","spreadDistance","inset","handler","boxShadow","resolveValue","func","get","options","args","length","Array","isArray","result","undefined","filtered","omitTransparentShadows","normalizeInsetValue","flatMap","flattenShadowDescriptor","map","shadows","filter","v","arg","style"],"sourceRoot":"../../../../../src","sources":["native/styles/shorthands/box-shadow.ts"],"mappings":";;AACA,SAASA,sBAAsB,QAAQ,4BAA4B;AAGnE,SAASC,gBAAgB,QAAQ,eAAY;;AAE7C;AACA;AACA,MAAMC,KAAK,GAAG,CAAC,OAAO,EAAE,OAAO,CAAU;AACzC,MAAMC,OAAO,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAU;AAC9C,MAAMC,OAAO,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAU;AAC9C,MAAMC,UAAU,GAAG,CAAC,YAAY,EAAE,QAAQ,CAAU;AACpD,MAAMC,cAAc,GAAG,CAAC,gBAAgB,EAAE,QAAQ,CAAU;AAC5D;AACA,MAAMC,KAAK,GAAG,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,CAAU;AAE3C,MA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,OAAOA,KAAK,KAAK,QAAQ,IAAIA,KAAK,IAAI,OAAO,IAAIA,KAAK,EAAE;IAC1D,OAAO;MAAE,GAAGA,KAAK;MAAEvB,KAAK,EAAE;IAAK,CAAC;EAClC;EAEA,OAAOuB,KAAK;AACd","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["native/styles/shorthands/index.ts"],"mappings":";;AAAA,cAAc,gBAAa;AAC3B,cAAc,aAAU;AACxB,cAAc,iBAAc;AAC5B,cAAc,kBAAe;AAC7B,cAAc,gBAAa","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["native/styles/shorthands/index.ts"],"mappings":";;AAAA,cAAc,gBAAa;AAC3B,cAAc,aAAU;AACxB,cAAc,2BAAwB;AACtC,cAAc,iBAAc;AAC5B,cAAc,kBAAe;AAC7B,cAAc,gBAAa","ignoreList":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { ShortHandSymbol } from "../constants.js";
|
|
4
|
+
function logicalWidth(start, end) {
|
|
5
|
+
return (resolve, descriptor) => {
|
|
6
|
+
const resolved = resolve(descriptor[2]);
|
|
7
|
+
const values = Array.isArray(resolved) ? resolved : [resolved];
|
|
8
|
+
if (values.length < 1 || values.length > 2 || !values.every(value => typeof value === "number" && Number.isFinite(value) && value >= 0)) return;
|
|
9
|
+
return {
|
|
10
|
+
[ShortHandSymbol]: true,
|
|
11
|
+
[start]: values[0],
|
|
12
|
+
[end]: values[1] ?? values[0]
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export const borderBlockWidth = logicalWidth("borderTopWidth", "borderBottomWidth");
|
|
17
|
+
export const borderInlineWidth = logicalWidth("borderStartWidth", "borderEndWidth");
|
|
18
|
+
//# sourceMappingURL=logical-border-width.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ShortHandSymbol","logicalWidth","start","end","resolve","descriptor","resolved","values","Array","isArray","length","every","value","Number","isFinite","borderBlockWidth","borderInlineWidth"],"sourceRoot":"../../../../../src","sources":["native/styles/shorthands/logical-border-width.ts"],"mappings":";;AAAA,SAASA,eAAe,QAAQ,iBAAc;AAG9C,SAASC,YAAYA,CAACC,KAAa,EAAEC,GAAW,EAAyB;EACvE,OAAO,CAACC,OAAO,EAAEC,UAAU,KAAK;IAC9B,MAAMC,QAAQ,GAAGF,OAAO,CAACC,UAAU,CAAC,CAAC,CAAC,CAAC;IACvC,MAAME,MAAiB,GAAGC,KAAK,CAACC,OAAO,CAACH,QAAQ,CAAC,GAAGA,QAAQ,GAAG,CAACA,QAAQ,CAAC;IACzE,IACEC,MAAM,CAACG,MAAM,GAAG,CAAC,IACjBH,MAAM,CAACG,MAAM,GAAG,CAAC,IACjB,CAACH,MAAM,CAACI,KAAK,CACVC,KAAK,IACJ,OAAOA,KAAK,KAAK,QAAQ,IAAIC,MAAM,CAACC,QAAQ,CAACF,KAAK,CAAC,IAAIA,KAAK,IAAI,CACpE,CAAC,EAED;IACF,OAAO;MACL,CAACZ,eAAe,GAAG,IAAI;MACvB,CAACE,KAAK,GAAGK,MAAM,CAAC,CAAC,CAAC;MAClB,CAACJ,GAAG,GAAGI,MAAM,CAAC,CAAC,CAAC,IAAIA,MAAM,CAAC,CAAC;IAC9B,CAAC;EACH,CAAC;AACH;AAEA,OAAO,MAAMQ,gBAAgB,GAAGd,YAAY,CAC1C,gBAAgB,EAChB,mBACF,CAAC;AACD,OAAO,MAAMe,iBAAiB,GAAGf,YAAY,CAC3C,kBAAkB,EAClB,gBACF,CAAC","ignoreList":[]}
|
|
@@ -10,7 +10,8 @@ export function varResolver(resolve, fn, get, options) {
|
|
|
10
10
|
[VAR_SYMBOL]: true
|
|
11
11
|
},
|
|
12
12
|
inlineVariables,
|
|
13
|
-
variableHistory = new Set()
|
|
13
|
+
variableHistory = options.variableHistory ??= new Set(),
|
|
14
|
+
variableCycles = options.variableCycles ??= new Set()
|
|
14
15
|
} = options;
|
|
15
16
|
const args = fn[2];
|
|
16
17
|
let name;
|
|
@@ -18,58 +19,69 @@ export function varResolver(resolve, fn, get, options) {
|
|
|
18
19
|
if (typeof args === "string") {
|
|
19
20
|
name = args;
|
|
20
21
|
} else {
|
|
21
|
-
|
|
22
|
-
if (isStyleDescriptorArray(
|
|
23
|
-
name =
|
|
24
|
-
fallback =
|
|
22
|
+
// Fallbacks are substituted only when needed, after reading the variable.
|
|
23
|
+
if (isStyleDescriptorArray(args)) {
|
|
24
|
+
name = args[0];
|
|
25
|
+
fallback = args[1];
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
28
|
if (typeof name !== "string") {
|
|
28
29
|
return;
|
|
29
30
|
}
|
|
31
|
+
if (variableCycles.has(name)) return resolve(fallback);
|
|
30
32
|
|
|
31
|
-
//
|
|
33
|
+
// Share the active resolution path with recursive calls. Mark only the
|
|
34
|
+
// actual cycle, so a dependent variable can still use its own fallback.
|
|
32
35
|
if (variableHistory.has(name)) {
|
|
36
|
+
let inCycle = false;
|
|
37
|
+
for (const dependency of variableHistory) {
|
|
38
|
+
if (dependency === name) inCycle = true;
|
|
39
|
+
if (inCycle) variableCycles.add(dependency);
|
|
40
|
+
}
|
|
33
41
|
return;
|
|
34
42
|
}
|
|
35
|
-
if (name in variables) {
|
|
36
|
-
renderGuards?.push(["v", name, variables[name]]);
|
|
37
|
-
return resolve(variables[name]);
|
|
38
|
-
}
|
|
39
43
|
variableHistory.add(name);
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
44
|
+
try {
|
|
45
|
+
let value = resolve(inlineVariables?.[name]);
|
|
46
|
+
if (variableCycles.has(name)) return resolve(fallback);
|
|
47
|
+
if (value !== undefined) {
|
|
48
|
+
options.inlineVariables ??= {
|
|
49
|
+
[VAR_SYMBOL]: "inline"
|
|
50
|
+
};
|
|
51
|
+
options.inlineVariables[name] = value;
|
|
52
|
+
return value;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// A universal selector declares the variable on this element. It has lower
|
|
56
|
+
// specificity than the element's class declarations, but beats inheritance.
|
|
57
|
+
value = resolve(get(universalVariables(name)));
|
|
58
|
+
if (variableCycles.has(name)) return resolve(fallback);
|
|
59
|
+
if (value !== undefined) {
|
|
60
|
+
options.inlineVariables ??= {
|
|
61
|
+
[VAR_SYMBOL]: "inline"
|
|
62
|
+
};
|
|
63
|
+
options.inlineVariables[name] = value;
|
|
64
|
+
return value;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Guards retain the ancestor's raw descriptor, matching the context value.
|
|
68
|
+
if (name in variables) {
|
|
69
|
+
renderGuards?.push(["v", name, variables[name]]);
|
|
70
|
+
value = resolve(variables[name]);
|
|
71
|
+
return variableCycles.has(name) ? resolve(fallback) : value;
|
|
72
|
+
}
|
|
73
|
+
value = resolve(get(rootVariables(name)));
|
|
74
|
+
if (variableCycles.has(name)) return resolve(fallback);
|
|
75
|
+
if (value !== undefined) {
|
|
76
|
+
options.inlineVariables ??= {
|
|
77
|
+
[VAR_SYMBOL]: "inline"
|
|
78
|
+
};
|
|
79
|
+
options.inlineVariables[name] = value;
|
|
80
|
+
return value;
|
|
81
|
+
}
|
|
82
|
+
return resolve(fallback);
|
|
83
|
+
} finally {
|
|
84
|
+
variableHistory.delete(name);
|
|
72
85
|
}
|
|
73
|
-
return resolve(fallback);
|
|
74
86
|
}
|
|
75
87
|
//# sourceMappingURL=variables.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["rootVariables","universalVariables","isStyleDescriptorArray","VAR_SYMBOL","varResolver","resolve","fn","get","options","renderGuards","inheritedVariables","variables","inlineVariables","variableHistory","Set","args","name","fallback","
|
|
1
|
+
{"version":3,"names":["rootVariables","universalVariables","isStyleDescriptorArray","VAR_SYMBOL","varResolver","resolve","fn","get","options","renderGuards","inheritedVariables","variables","inlineVariables","variableHistory","Set","variableCycles","args","name","fallback","has","inCycle","dependency","add","value","undefined","push","delete"],"sourceRoot":"../../../../src","sources":["native/styles/variables.ts"],"mappings":";;AACA,SACEA,aAAa,EACbC,kBAAkB,QACb,kCAAkC;AACzC,SAASC,sBAAsB,QAAQ,4BAA4B;AAEnE,SAASC,UAAU,QAAqB,kBAAe;AAGvD,OAAO,SAASC,WAAWA,CACzBC,OAA2B,EAC3BC,EAAiB,EACjBC,GAAW,EACXC,OAA4B,EAC5B;EACA,MAAM;IACJC,YAAY;IACZC,kBAAkB,EAAEC,SAAS,GAAG;MAAE,CAACR,UAAU,GAAG;IAAK,CAAC;IACtDS,eAAe;IACfC,eAAe,GAAIL,OAAO,CAACK,eAAe,KAAK,IAAIC,GAAG,CAAC,CAAE;IACzDC,cAAc,GAAIP,OAAO,CAACO,cAAc,KAAK,IAAID,GAAG,CAAC;EACvD,CAAC,GAAGN,OAAO;EAEX,MAAMQ,IAAI,GAAGV,EAAE,CAAC,CAAC,CAAC;EAElB,IAAIW,IAAwB;EAC5B,IAAIC,QAAqC;EAEzC,IAAI,OAAOF,IAAI,KAAK,QAAQ,EAAE;IAC5BC,IAAI,GAAGD,IAAI;EACb,CAAC,MAAM;IACL;IACA,IAAId,sBAAsB,CAACc,IAAI,CAAC,EAAE;MAChCC,IAAI,GAAGD,IAAI,CAAC,CAAC,CAAW;MACxBE,QAAQ,GAAGF,IAAI,CAAC,CAAC,CAAC;IACpB;EACF;E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,IAAIN,SAAS,EAAE;MACrBF,YAAY,EAAEgB,IAAI,CAAC,CAAC,GAAG,EAAER,IAAI,EAAEN,SAAS,CAACM,IAAI,CAAC,CAAC,CAAC;MAChDM,KAAK,GAAGlB,OAAO,CAACM,SAAS,CAACM,IAAI,CAAC,CAAC;MAChC,OAAOF,cAAc,CAACI,GAAG,CAACF,IAAI,CAAC,GAAGZ,OAAO,CAACa,QAAQ,CAAC,GAAGK,KAAK;IAC7D;IAEAA,KAAK,GAAGlB,OAAO,CAACE,GAAG,CAACP,aAAa,CAACiB,IAAI,CAAC,CAAC,CAAC;IACzC,IAAIF,cAAc,CAACI,GAAG,CAACF,IAAI,CAAC,EAAE,OAAOZ,OAAO,CAACa,QAAQ,CAAC;IACtD,IAAIK,KAAK,KAAKC,SAAS,EAAE;MACvBhB,OAAO,CAACI,eAAe,KAAK;QAAE,CAACT,UAAU,GAAG;MAAS,CAAC;MACtDK,OAAO,CAACI,eAAe,CAACK,IAAI,CAAC,GAAGM,KAAK;MACrC,OAAOA,KAAK;IACd;IAEA,OAAOlB,OAAO,CAACa,QAAQ,CAAC;EAC1B,CAAC,SAAS;IACRL,eAAe,CAACa,MAAM,CAACT,IAAI,CAAC;EAC9B;AACF","ignoreList":[]}
|
|
@@ -20,11 +20,22 @@ const rootVariableFamily = () => {
|
|
|
20
20
|
return obs;
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
]);
|
|
23
|
+
// Seeded with the registries, so a copy that loads after the stylesheet inject keeps the project's rem
|
|
24
|
+
function createRootVariableRegistries() {
|
|
25
|
+
const registries = {
|
|
26
|
+
root: rootVariableFamily(),
|
|
27
|
+
universal: rootVariableFamily()
|
|
28
|
+
};
|
|
29
|
+
registries.root("__rn-css-rem").set([[14]]);
|
|
30
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
31
|
+
registries.root("__rn-css-color").set([[Platform.OS === "ios" ? PlatformColor("label", "labelColor") : PlatformColor("?attr/textColorPrimary", "SystemBaseHighColor")]
|
|
32
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
33
|
+
]);
|
|
34
|
+
return registries;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// The exports map gives import and require different builds, and Metro resolves each per requesting module
|
|
38
|
+
globalThis.__react_native_css_root_variable_registries ??= createRootVariableRegistries();
|
|
39
|
+
export const rootVariables = globalThis.__react_native_css_root_variable_registries.root;
|
|
40
|
+
export const universalVariables = globalThis.__react_native_css_root_variable_registries.universal;
|
|
30
41
|
//# sourceMappingURL=root.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","PlatformColor","testMediaQuery","family","observable","rootVariableFamily","obs","read","variableValue","undefined","value","mediaQuery","
|
|
1
|
+
{"version":3,"names":["Platform","PlatformColor","testMediaQuery","family","observable","rootVariableFamily","obs","read","variableValue","undefined","value","mediaQuery","createRootVariableRegistries","registries","root","universal","set","OS","globalThis","__react_native_css_root_variable_registries","rootVariables","universalVariables"],"sourceRoot":"../../../src","sources":["native-internal/root.ts"],"mappings":";;AAAA,SAASA,QAAQ,EAAEC,aAAa,QAAQ,cAAc;AAItD,SAASC,cAAc,QAAQ,qCAAkC;AACjE,SAASC,MAAM,EAAEC,UAAU,QAAyB,yBAAsB;AAE1E,MAAMC,kBAAkB,GAAGA,CAAA,KAAM;EAC/B,OAAOF,MAAM,CAAuD,MAAM;IACxE,MAAMG,GAAG,GAAGF,UAAU,CACpB,CAACG,IAAI,EAAEC,aAAa,KAAK;MACvB,IAAI,CAACA,aAAa,EAAE,OAAOC,SAAS;MAEpC,KAAK,MAAM,CAACC,KAAK,EAAEC,UAAU,CAAC,IAAIH,aAAa,EAAE;QAC/C,IAAI,CAACG,UAAU,EAAE;UACf,OAAOD,KAAK;QACd;QAEA,IAAIR,cAAc,CAACS,UAAU,EAAEJ,IAAI,CAAC,EAAE;UACpC,OAAOG,KAAK;QACd;MACF;MAEA,OAAOD,SAAS;IAClB,CACF,CAAC;IAED,OAAOH,GAAG;EACZ,CAAC,CAAC;AACJ,CAAC;AAaD;AACA,SAASM,4BAA4BA,CAAA,EAA2B;EAC9D,MAAMC,UAAkC,GAAG;IACzCC,IAAI,EAAET,kBAAkB,CAAC,CAAC;IAC1BU,SAAS,EAAEV,kBAAkB,CAAC;EAChC,CAAC;EAEDQ,UAAU,CAACC,IAAI,CAAC,cAAc,CAAC,CAACE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;EAC3C;EACAH,UAAU,CAACC,IAAI,CAAC,gBAAgB,CAAC,CAACE,GAAG,CAAC,CACpC,CACEhB,QAAQ,CAACiB,EAAE,KAAK,KAAK,GACjBhB,aAAa,CAAC,OAAO,EAAE,YAAY,CAAC,GACpCA,aAAa,CAAC,wBAAwB,EAAE,qBAAqB,CAAC;EAEpE;EAAA,CACM,CAAC;EAET,OAAOY,UAAU;AACnB;;AAEA;AACAK,UAAU,CAACC,2CAA2C,KACpDP,4BAA4B,CAAC,CAAC;AAEhC,OAAO,MAAMQ,aAAa,GACxBF,UAAU,CAACC,2CAA2C,CAACL,IAAI;AAC7D,OAAO,MAAMO,kBAAkB,GAC7BH,UAAU,CAACC,2CAA2C,CAACJ,SAAS","ignoreList":[]}
|
|
@@ -48,7 +48,7 @@ globalThis.__react_native_css_style_collection ??= {
|
|
|
48
48
|
}
|
|
49
49
|
if (options.vu) {
|
|
50
50
|
for (const entry of options.vu) {
|
|
51
|
-
|
|
51
|
+
universalVariables(entry[0]).set(entry[1]);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
for (const effect of observableBatch.current) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DEFAULT_CONTAINER_NAME","family","observable","observableBatch","rootVariables","universalVariables","globalThis","__react_native_css_style_collection","styles","isDeepEqual","keyframes","inject","options","current","Set","StyleCollection","set","s","v","c","a","p","h","style","k","vr","entry","vu","effect","run","undefined","b","aArray","Array","isArray","bArray","requiresKeyComparison","length","key"],"sourceRoot":"../../../src","sources":["native-internal/style-collection.ts"],"mappings":";;AAQA,SAASA,sBAAsB,QAAQ,yCAAsC;AAC7E,SACEC,MAAM,EACNC,UAAU,EACVC,eAAe,QAGV,yBAAsB;AAC7B,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,WAAQ;AAE1D,SAASD,aAAa,EAAEC,kBAAkB;AAe1CC,UAAU,CAACC,mCAAmC,KAAK;EACjDC,MAAM,EAAEP,MAAM,CAAmC,MAAM;IACrD,OAAOC,UAAU,CAAC,EAAE,EAAEO,WAAW,CAAC;EACpC,CAAC,CAAC;EACFC,SAAS,EAAET,MAAM,CAAmC,MAAM;IACxD,OAAOC,UAAU,CAAC,EAAE,EAAEO,WAAW,CAAC;EACpC,CAAC,CAAC;EACFE,MAAM,EAAE,SAAAA,CAAUC,OAAiC,EAAE;IACnDT,eAAe,CAACU,OAAO,GAAG,IAAIC,GAAG,CAAC,CAAC;IAEnCC,eAAe,CAACP,MAAM,CAAC,sBAAsB,CAAC,CAACQ,GAAG,CAAC,CACjD;MACEC,CAAC,EAAE,CAAC,CAAC,CAAC;MACNC,CAAC,EAAE;IACL,CAAC,CACF,CAAC;IAEFH,eAAe,CAACP,MAAM,CAAC,uBAAuB,CAAC,CAACQ,GAAG,CAAC,CAClD;MACEC,CAAC,EAAE,CAAC,CAAC,CAAC;MACNE,CAAC,EAAE,CAACnB,sBAAsB;IAC5B,CAAC,CACF,CAAC;IAEFe,eAAe,CAACP,MAAM,CAAC,uBAAuB,CAAC,CAACQ,GAAG,CAAC,CAClD;MACEC,CAAC,EAAE,CAAC,CAAC,CAAC;MACNG,CAAC,EAAE;IACL,CAAC,CACF,CAAC;IAEFL,eAAe,CAACP,MAAM,CAAC,uBAAuB,CAAC,CAACQ,GAAG,CAAC,CAClD;MACEC,CAAC,EAAE,CAAC,CAAC,CAAC;MACNI,CAAC,EAAE;QACDC,CAAC,EAAE;MACL;IACF,CAAC,CACF,CAAC;IAEF,IAAIV,OAAO,CAACK,CAAC,EAAE;MACb,KAAK,MAAMM,KAAK,IAAIX,OAAO,CAACK,CAAC,EAAE;QAC7BF,eAAe,CAACP,MAAM,CAACe,KAAK,CAAC,CAAC,CAAC,CAAC,CAACP,GAAG,CAACO,KAAK,CAAC,CAAC,CAAC,CAAC;MAChD;IACF;IAEA,IAAIX,OAAO,CAACY,CAAC,EAAE;MACb,KAAK,MAAMd,SAAS,IAAIE,OAAO,CAACY,CAAC,EAAE;QACjCT,eAAe,CAACL,SAAS,CAACA,SAAS,CAAC,CAAC,CAAC,CAAC,CAACM,GAAG,CAACN,SAAS,CAAC,CAAC,CAAC,CAAC;MAC3D;IACF;IAEA,IAAIE,OAAO,CAACa,EAAE,EAAE;MACd,KAAK,MAAMC,KAAK,IAAId,OAAO,CAACa,EAAE,EAAE;QAC9BrB,aAAa,CAACsB,KAAK,CAAC,CAAC,CAAC,CAAC,CAACV,GAAG,CAACU,KAAK,CAAC,CAAC,CAAC,CAAC;MACvC;IACF;IAEA,IAAId,OAAO,CAACe,EAAE,EAAE;MACd,KAAK,MAAMD,KAAK,IAAId,OAAO,CAACe,EAAE,EAAE;
|
|
1
|
+
{"version":3,"names":["DEFAULT_CONTAINER_NAME","family","observable","observableBatch","rootVariables","universalVariables","globalThis","__react_native_css_style_collection","styles","isDeepEqual","keyframes","inject","options","current","Set","StyleCollection","set","s","v","c","a","p","h","style","k","vr","entry","vu","effect","run","undefined","b","aArray","Array","isArray","bArray","requiresKeyComparison","length","key"],"sourceRoot":"../../../src","sources":["native-internal/style-collection.ts"],"mappings":";;AAQA,SAASA,sBAAsB,QAAQ,yCAAsC;AAC7E,SACEC,MAAM,EACNC,UAAU,EACVC,eAAe,QAGV,yBAAsB;AAC7B,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,WAAQ;AAE1D,SAASD,aAAa,EAAEC,kBAAkB;AAe1CC,UAAU,CAACC,mCAA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AEA;EACA,IAAIC,MAAM,IAAIG,MAAM,IAAIf,CAAC,CAACiB,MAAM,KAAKN,CAAC,CAACM,MAAM,EAAE;IAC7C,OAAO,KAAK;EACd;;EAEA;EACA,KAAK,MAAMC,GAAG,IAAIlB,CAAC,EAAE;IACnB,IACE,CAACX,WAAW,CACTW,CAAC,CAA6BkB,GAAG,CAAC,EAClCP,CAAC,CAA6BO,GAAG,CACpC,CAAC,EACD;MACA,OAAO,KAAK;IACd;EACF;;EAEA;EACA,KAAK,MAAMA,GAAG,IAAIP,CAAC,EAAE;IACnB,IAAI,EAAEO,GAAG,IAAIlB,CAAC,CAAC,EAAE;MACf,OAAO,KAAK;IACd;EACF;EAEA,OAAO,IAAI;AACb","ignoreList":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { createContext, useContext, useMemo } from "react";
|
|
4
|
-
import { VAR_SYMBOL } from "../native/reactivity.js";
|
|
4
|
+
import { toVariableRecord, VAR_SYMBOL } from "../native/reactivity.js";
|
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
6
|
globalThis.__react_native_css_variable_context ??= /*#__PURE__*/createContext({
|
|
7
7
|
[VAR_SYMBOL]: true
|
|
@@ -11,7 +11,7 @@ export function VariableContextProvider(props) {
|
|
|
11
11
|
const inheritedVariables = useContext(VariableContext);
|
|
12
12
|
const value = useMemo(() => ({
|
|
13
13
|
...inheritedVariables,
|
|
14
|
-
...
|
|
14
|
+
...toVariableRecord(props.value),
|
|
15
15
|
[VAR_SYMBOL]: true
|
|
16
16
|
}), [inheritedVariables, props.value]);
|
|
17
17
|
return /*#__PURE__*/_jsx(VariableContext, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createContext","useContext","useMemo","VAR_SYMBOL","jsx","_jsx","globalThis","__react_native_css_variable_context","VariableContext","VariableContextProvider","props","inheritedVariables","value","
|
|
1
|
+
{"version":3,"names":["createContext","useContext","useMemo","toVariableRecord","VAR_SYMBOL","jsx","_jsx","globalThis","__react_native_css_variable_context","VariableContext","VariableContextProvider","props","inheritedVariables","value","children"],"sourceRoot":"../../../src","sources":["native-internal/variables.tsx"],"mappings":";;AAAA,SACEA,aAAa,EACbC,UAAU,EACVC,OAAO,QAEF,OAAO;AAId,SACEC,gBAAgB,EAChBC,UAAU,QAEL,yBAAsB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE9BC,UAAU,CAACC,mCAAmC,kBAC5CR,aAAa,CAAuB;EAClC,CAACI,UAAU,GAAG;AAChB,CAAC,CAAC;AAEJ,OAAO,MAAMK,eAAe,GAAGF,UAAU,CAACC,mCAAmC;AAE7E,OAAO,SAASE,uBAAuBA,CACrCC,KAA2E,EAC3E;EACA,MAAMC,kBAAkB,GAAGX,UAAU,CAACQ,eAAe,CAAC;EAEtD,MAAMI,KAA2B,GAAGX,OAAO,CACzC,OAAO;IACL,GAAGU,kBAAkB;IACrB,GAAGT,gBAAgB,CAACQ,KAAK,CAACE,KAAK,CAAC;IAChC,CAACT,UAAU,GAAG;EAChB,CAAC,CAAC,EACF,CAACQ,kBAAkB,EAAED,KAAK,CAACE,KAAK,CAClC,CAAC;EAED,oBAAOP,IAAA,CAACG,eAAe;IAACI,KAAK,EAAEA,KAAM;IAAAC,QAAA,EAAEH,KAAK,CAACG;EAAQ,CAAkB,CAAC;AAC1E","ignoreList":[]}
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
export function isStyleDescriptorArray(value) {
|
|
4
|
-
|
|
5
|
-
// If its an array and the first item is an object, the only allowed value is an array
|
|
6
|
-
return typeof value[0] === "object" ? Array.isArray(value[0]) : true;
|
|
7
|
-
}
|
|
8
|
-
return false;
|
|
4
|
+
return Array.isArray(value) && !isStyleFunction(value);
|
|
9
5
|
}
|
|
10
6
|
export function isStyleFunction(value) {
|
|
11
|
-
if (Array.isArray(value))
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return false;
|
|
7
|
+
if (!Array.isArray(value)) return false;
|
|
8
|
+
const marker = value[0];
|
|
9
|
+
return marker !== null && typeof marker === "object" && !Array.isArray(marker) && Object.keys(marker).length === 0 && typeof value[1] === "string";
|
|
15
10
|
}
|
|
16
11
|
//# sourceMappingURL=style-descriptor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["isStyleDescriptorArray","value","Array","isArray","isStyleFunction","Object","keys","length"],"sourceRoot":"../../../src","sources":["utilities/style-descriptor.ts"],"mappings":";;AAEA,OAAO,SAASA,sBAAsBA,CACpCC,KAAc,EACc;EAC5B,
|
|
1
|
+
{"version":3,"names":["isStyleDescriptorArray","value","Array","isArray","isStyleFunction","marker","Object","keys","length"],"sourceRoot":"../../../src","sources":["utilities/style-descriptor.ts"],"mappings":";;AAEA,OAAO,SAASA,sBAAsBA,CACpCC,KAAc,EACc;EAC5B,OAAOC,KAAK,CAACC,OAAO,CAACF,KAAK,CAAC,IAAI,CAACG,eAAe,CAACH,KAAK,CAAC;AACxD;AAEA,OAAO,SAASG,eAAeA,CAACH,KAAc,EAA0B;EACtE,IAAI,CAACC,KAAK,CAACC,OAAO,CAACF,KAAK,CAAC,EAAE,OAAO,KAAK;EACvC,MAAMI,MAAe,GAAGJ,KAAK,CAAC,CAAC,CAAC;EAChC,OACEI,MAAM,KAAK,IAAI,IACf,OAAOA,MAAM,KAAK,QAAQ,IAC1B,CAACH,KAAK,CAACC,OAAO,CAACE,MAAM,CAAC,IACtBC,MAAM,CAACC,IAAI,CAACF,MAAM,CAAC,CAACG,MAAM,KAAK,CAAC,IAChC,OAAOP,KAAK,CAAC,CAAC,CAAC,KAAK,QAAQ;AAEhC","ignoreList":[]}
|
package/dist/module/web/api.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createElement","useMemo","Appearance","assignStyle","jsx","_jsx","defaultMapping","className","styled","baseComponent","mapping","_options","props","useCssElement","component","incomingProps","key","value","Object","entries","source","target","$$css","split","colorScheme","get","getColorScheme","set","name","setColorScheme","vars","variables","$variables","startsWith","toString","VariableContextProvider","style","display","fromEntries","map","children","useNativeVariable","Error","useUnstableNativeVariable"],"sourceRoot":"../../../src","sources":["web/api.tsx"],"mappings":";;AAAA,SACEA,aAAa,EACbC,OAAO,
|
|
1
|
+
{"version":3,"names":["createElement","useMemo","Appearance","assignStyle","jsx","_jsx","defaultMapping","className","styled","baseComponent","mapping","_options","props","useCssElement","component","incomingProps","key","value","Object","entries","source","target","$$css","split","colorScheme","get","getColorScheme","set","name","setColorScheme","vars","variables","$variables","startsWith","toString","VariableContextProvider","style","display","fromEntries","map","children","useNativeVariable","Error","useUnstableNativeVariable"],"sourceRoot":"../../../src","sources":["web/api.tsx"],"mappings":";;AAAA,SACEA,aAAa,EACbC,OAAO,QAGF,OAAO;AACd,SAASC,UAAU,QAAQ,cAAc;AAUzC,SAASC,WAAW,QAAQ,mBAAgB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE7C,MAAMC,cAAsE,GAAG;EAC7EC,SAAS,EAAE;AACb,CAAC;AAED,OAAO,MAAMC,MAAc,GAAGA,CAC5BC,aAA6B,EAC7BC,OAA4C,GAAGJ,cAAc,EAC7DK,QAAwB,KACrB;EACH,OAAQC,KAAY,IAAK;IACvB,OAAOC,aAAa,CAACJ,aAAa,EAAEG,KAAK,EAAEF,OAAO,CAAC;EACrD,CAAC;AACH,CAAC;AAED,OAAO,MAAMG,aAAa,GAAGA,CAC3BC,SAAY,EACZC,aAAoB,EACpBL,OAA+B,KAC5B;EACH,IAAIE,KAAK,GAAG;IAAE,GAAGG;EAAc,CAAC;EAEhC,KAAK,MAAM,CAACC,GAAG,EAAEC,KAAK,CAAC,IAAIC,MAAM,CAACC,OAAO,CAACT,OAAO,CAAC,EAAE;IAClD,MAAMU,MAAe,GAAGR,KAAK,CAACI,GAAG,CAAC;IAClC,IAAI,CAACI,MAAM,EAAE;MACX;IACF;;IAEA;IACA,OAAOR,KAAK,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AAE,UAAU;MACnB,GAAGnB,MAAM,CAACoB,WAAW,CACnBpB,MAAM,CAACC,OAAO,CAACP,KAAK,CAACK,KAAK,CAAC,CAACsB,GAAG,CAAC,CAAC,CAACvB,GAAG,EAAEC,KAAK,CAAC,KAAK,CAChDD,GAAG,CAACiB,UAAU,CAAC,IAAI,CAAC,GAAGjB,GAAG,GAAG,KAAKA,GAAG,EAAE,EACvCC,KAAK,CACN,CACH;IACF,CAAC;EACH,CAAC,EAAE,CAACL,KAAK,CAACK,KAAK,CAAC,CAAC;EAEjB,oBAAOZ,IAAA;IAAK+B,KAAK,EAAEA,KAAM;IAAAI,QAAA,EAAE5B,KAAK,CAAC4B;EAAQ,CAAM,CAAC;AAClD;AAEA,OAAO,MAAMC,iBAAiB,GAAGA,CAAA,KAAM;EACrC,MAAM,IAAIC,KAAK,CAAC,2CAA2C,CAAC;AAC9D,CAAC;AAED,OAAO,MAAMC,yBAAyB,GAAGA,CAAA,KAAM;EAC7C,MAAM,IAAID,KAAK,CAAC,mDAAmD,CAAC;AACtE,CAAC","ignoreList":[]}
|
|
@@ -15,7 +15,10 @@ export function assignStyle(value, targets, props) {
|
|
|
15
15
|
}
|
|
16
16
|
return props;
|
|
17
17
|
} else {
|
|
18
|
-
props[target]
|
|
18
|
+
const existing = props[target];
|
|
19
|
+
props[target] = Array.isArray(existing) ? [...existing] : {
|
|
20
|
+
...existing
|
|
21
|
+
};
|
|
19
22
|
assignStyle(value, targets, props[target]);
|
|
20
23
|
return props;
|
|
21
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["assignStyle","value","targets","props","target","shift","length","cb","args"],"sourceRoot":"../../../src","sources":["web/assign-style.ts"],"mappings":";;AAAA;AACA,OAAO,SAASA,WAAWA,CACzBC,KAA0B,EAC1BC,OAAiB,EACjBC,KAA0B,EAC1B;EACA,MAAMC,MAAM,GAAGF,OAAO,CAACG,KAAK,CAAC,CAAC;EAE9B,IAAI,CAACD,MAAM,EAAE,OAAO,CAAC,CAAC;EAEtB,IAAIF,OAAO,CAACI,MAAM,KAAK,CAAC,EAAE;IACxB,IAAI,OAAOH,KAAK,CAACC,MAAM,CAAC,KAAK,UAAU,EAAE;MACvC,MAAMG,EAAE,GAAGJ,KAAK,CAACC,MAAM,CAAC;MACxBD,KAAK,CAACC,MAAM,CAAC,GAAG,CAAC,GAAGI,IAAW,KAAK;QAClC,OAAO,CAACD,EAAE,CAAC,GAAGC,IAAI,CAAC,EAAEP,KAAK,CAAC;MAC7B,CAAC;IACH,CAAC,MAAM;MACLE,KAAK,CAACC,MAAM,CAAC,GAAG,CAACD,KAAK,CAACC,MAAM,CAAC,EAAEH,KAAK,CAAC;IACxC;IACA,OAAOE,KAAK;EACd,CAAC,MAAM;
|
|
1
|
+
{"version":3,"names":["assignStyle","value","targets","props","target","shift","length","cb","args","existing","Array","isArray"],"sourceRoot":"../../../src","sources":["web/assign-style.ts"],"mappings":";;AAAA;AACA,OAAO,SAASA,WAAWA,CACzBC,KAA0B,EAC1BC,OAAiB,EACjBC,KAA0B,EAC1B;EACA,MAAMC,MAAM,GAAGF,OAAO,CAACG,KAAK,CAAC,CAAC;EAE9B,IAAI,CAACD,MAAM,EAAE,OAAO,CAAC,CAAC;EAEtB,IAAIF,OAAO,CAACI,MAAM,KAAK,CAAC,EAAE;IACxB,IAAI,OAAOH,KAAK,CAACC,MAAM,CAAC,KAAK,UAAU,EAAE;MACvC,MAAMG,EAAE,GAAGJ,KAAK,CAACC,MAAM,CAAC;MACxBD,KAAK,CAACC,MAAM,CAAC,GAAG,CAAC,GAAGI,IAAW,KAAK;QAClC,OAAO,CAACD,EAAE,CAAC,GAAGC,IAAI,CAAC,EAAEP,KAAK,CAAC;MAC7B,CAAC;IACH,CAAC,MAAM;MACLE,KAAK,CAACC,MAAM,CAAC,GAAG,CAACD,KAAK,CAACC,MAAM,CAAC,EAAEH,KAAK,CAAC;IACxC;IACA,OAAOE,KAAK;EACd,CAAC,MAAM;IACL,MAAMM,QAAQ,GAAGN,KAAK,CAACC,MAAM,CAAC;IAC9BD,KAAK,CAACC,MAAM,CAAC,GAAGM,KAAK,CAACC,OAAO,CAACF,QAAQ,CAAC,GAAG,CAAC,GAAGA,QAAQ,CAAC,GAAG;MAAE,GAAGA;IAAS,CAAC;IACzET,WAAW,CAACC,KAAK,EAAEC,OAAO,EAAEC,KAAK,CAACC,MAAM,CAAC,CAAC;IAC1C,OAAOD,KAAK;EACd;AACF","ignoreList":[]}
|
|
@@ -7,7 +7,8 @@ export interface PluginOpts {
|
|
|
7
7
|
}
|
|
8
8
|
export interface PluginState {
|
|
9
9
|
opts?: PluginOpts;
|
|
10
|
-
filename: string;
|
|
10
|
+
filename: string | undefined;
|
|
11
11
|
}
|
|
12
12
|
export declare function getInteropRequireDefaultSource(init: CallExpression, t: BabelTypes): string | undefined;
|
|
13
|
+
export declare function resolveImportSource(filename: string, source: string): string;
|
|
13
14
|
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/babel/helpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/babel/helpers.ts"],"names":[],"mappings":"AAEA,OAAO,WAAW,EAAE,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAEhE,MAAM,MAAM,UAAU,GAAG,OAAO,WAAW,CAAC;AAE5C,MAAM,WAAW,UAAU;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B;AAED,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE,cAAc,EACpB,CAAC,EAAE,UAAU,sBAsBd;AAGD,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAE5E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"import-plugin.d.ts","sourceRoot":"","sources":["../../../../../src/babel/import-plugin.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAG7C,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,WAAW,EACjB,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"import-plugin.d.ts","sourceRoot":"","sources":["../../../../../src/babel/import-plugin.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAG7C,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,WAAW,EACjB,MAAM,WAAW,CAAC;AAanB,MAAM,CAAC,OAAO,WAAW,EACvB,KAAK,EAAE,CAAC,GACT,EAAE;IACD,KAAK,EAAE,UAAU,CAAC;CACnB,GAAG,SAAS,CAAC,WAAW,CAAC,CAoKzB"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { type NodePath } from "@babel/traverse";
|
|
2
|
-
import tBabelTypes, { type ImportDeclaration, type ObjectPattern, type Statement, type VariableDeclaration } from "@babel/types";
|
|
2
|
+
import tBabelTypes, { type CallExpression, type ImportDeclaration, type ObjectPattern, type Statement, type VariableDeclaration } from "@babel/types";
|
|
3
3
|
type BabelTypes = typeof tBabelTypes;
|
|
4
4
|
export declare function handleReactNativeWebImport(declaration: ImportDeclaration, t: BabelTypes, filename: string): Statement[] | undefined;
|
|
5
5
|
export declare function handleReactNativeWebIdentifierRequire(path: NodePath<VariableDeclaration>, t: BabelTypes, id: string, source: string, filename: string): tBabelTypes.VariableDeclaration[] | undefined;
|
|
6
|
+
export declare function handleReactNativeWebInteropRequireDefault(path: NodePath<VariableDeclaration>, t: BabelTypes, id: string, init: CallExpression, source: string, filename: string): tBabelTypes.VariableDeclaration[] | undefined;
|
|
6
7
|
export declare function handleReactNativeWebObjectPatternRequire(path: NodePath<VariableDeclaration>, t: BabelTypes, id: ObjectPattern, source: string, filename: string): tBabelTypes.Statement[] | undefined;
|
|
7
8
|
export {};
|
|
8
9
|
//# sourceMappingURL=react-native-web.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-native-web.d.ts","sourceRoot":"","sources":["../../../../../src/babel/react-native-web.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"react-native-web.d.ts","sourceRoot":"","sources":["../../../../../src/babel/react-native-web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,WAAW,EAAE,EAClB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,mBAAmB,EACzB,MAAM,cAAc,CAAC;AAKtB,KAAK,UAAU,GAAG,OAAO,WAAW,CAAC;AAgCrC,wBAAgB,0BAA0B,CACxC,WAAW,EAAE,iBAAiB,EAC9B,CAAC,EAAE,UAAU,EACb,QAAQ,EAAE,MAAM,GACf,SAAS,EAAE,GAAG,SAAS,CAkEzB;AAED,wBAAgB,qCAAqC,CACnD,IAAI,EAAE,QAAQ,CAAC,mBAAmB,CAAC,EACnC,CAAC,EAAE,UAAU,EACb,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,iDA0CjB;AAED,wBAAgB,yCAAyC,CACvD,IAAI,EAAE,QAAQ,CAAC,mBAAmB,CAAC,EACnC,CAAC,EAAE,UAAU,EACb,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,cAAc,EACpB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,iDAcjB;AAED,wBAAgB,wCAAwC,CACtD,IAAI,EAAE,QAAQ,CAAC,mBAAmB,CAAC,EACnC,CAAC,EAAE,UAAU,EACb,EAAE,EAAE,aAAa,EACjB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,uCA6DjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-native.d.ts","sourceRoot":"","sources":["../../../../../src/babel/react-native.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"react-native.d.ts","sourceRoot":"","sources":["../../../../../src/babel/react-native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,WAAW,EAAE,EAClB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,mBAAmB,EACzB,MAAM,cAAc,CAAC;AAKtB,KAAK,UAAU,GAAG,OAAO,WAAW,CAAC;AAgCrC,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,iBAAiB,EAC9B,CAAC,EAAE,UAAU,EACb,QAAQ,EAAE,MAAM,GACf,SAAS,EAAE,GAAG,SAAS,CAkEzB;AAED,wBAAgB,kCAAkC,CAChD,IAAI,EAAE,QAAQ,CAAC,mBAAmB,CAAC,EACnC,CAAC,EAAE,UAAU,EACb,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,iDA0CjB;AAED,wBAAgB,qCAAqC,CACnD,IAAI,EAAE,QAAQ,CAAC,mBAAmB,CAAC,EACnC,CAAC,EAAE,UAAU,EACb,EAAE,EAAE,aAAa,EACjB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,uCA6DjB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DeclarationBlock, ParsedComponent, Rule, TokenOrValue } from "lightningcss";
|
|
1
|
+
import type { Declaration, DeclarationBlock, ParsedComponent, Rule, TokenOrValue } from "lightningcss";
|
|
2
2
|
import type { StyleRuleMapping } from "./compiler.types";
|
|
3
3
|
import type { StylesheetBuilder } from "./stylesheet";
|
|
4
4
|
export interface PropAtRule {
|
|
@@ -31,4 +31,7 @@ export interface ReactNativeAtRule {
|
|
|
31
31
|
}
|
|
32
32
|
export declare function maybeMutateReactNativeOptions(rule: Rule | ReactNativeAtRule, _builder: StylesheetBuilder): void;
|
|
33
33
|
export declare function parsePropAtRule(rules?: (Rule | PropAtRule)[]): StyleRuleMapping;
|
|
34
|
+
export declare function isMappingProperty(name: string): boolean;
|
|
35
|
+
/** Declaration metadata survives the optimizer flattening nested at rules. */
|
|
36
|
+
export declare function parsePropDeclarations(declarations?: Declaration[]): StyleRuleMapping;
|
|
34
37
|
//# sourceMappingURL=atRules.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atRules.d.ts","sourceRoot":"","sources":["../../../../../src/compiler/atRules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,IAAI,EACJ,YAAY,EACb,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAGzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtD,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,OAAO,CAAC,YAAY,EAAE;YAAE,IAAI,EAAE,OAAO,CAAA;SAAE,CAAC,EAAE,CAAC;QACpD,KAAK,EAAE,OAAO,CAAC,YAAY,EAAE;YAAE,IAAI,EAAE,OAAO,CAAA;SAAE,CAAC,EAAE,GAAG,IAAI,CAAC;KAC1D,CAAC;CACH;AAED;;iDAEiD;AAEjD,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE;QACL,IAAI,EAAE,cAAc,CAAC;QACrB,OAAO,EAAE,IAAI,GAAG,OAAO,CAAC,eAAe,EAAE;YAAE,IAA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I,EAAE;YACJ,IAAI,EAAE,kBAAkB,CAAC;YACzB,KAAK,EAAE,IAAI,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC;SAC/C,CAAC;KACH,CAAC;CACH;AAED,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,IAAI,GAAG,iBAAiB,EAC9B,QAAQ,EAAE,iBAAiB,QAO5B;AAUD,wBAAgB,eAAe,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,GAAG,UAAU,CAAC,EAAE,oBA2C5D;AAID,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,WAE7C;AAED,8EAA8E;AAC9E,wBAAgB,qBAAqB,CAAC,YAAY,GAAE,WAAW,EAAO,oBAkCrE"}
|
|
@@ -8,10 +8,6 @@ import type { CompilerOptions } from "./compiler.types";
|
|
|
8
8
|
*/
|
|
9
9
|
export declare function compile(code: Buffer | string, options?: CompilerOptions): {
|
|
10
10
|
stylesheet: () => import("./compiler.types").ReactNativeCssStyleSheet;
|
|
11
|
-
warnings: () =>
|
|
12
|
-
properties?: string[];
|
|
13
|
-
values?: Record<string, unknown[]>;
|
|
14
|
-
functions?: string[];
|
|
15
|
-
};
|
|
11
|
+
warnings: () => import("./compiler.types").CompilerWarnings;
|
|
16
12
|
};
|
|
17
13
|
//# sourceMappingURL=compiler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compiler.d.ts","sourceRoot":"","sources":["../../../../../src/compiler/compiler.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"compiler.d.ts","sourceRoot":"","sources":["../../../../../src/compiler/compiler.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EACV,eAAe,EAKhB,MAAM,kBAAkB,CAAC;AAkC1B;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,OAAO,GAAE,eAAoB;;;EA4L3E"}
|
|
@@ -16,6 +16,12 @@ export interface CompilerOptions {
|
|
|
16
16
|
export interface InlineVariableOptions {
|
|
17
17
|
exclude?: `--${string}`[];
|
|
18
18
|
}
|
|
19
|
+
export interface CompilerWarnings {
|
|
20
|
+
properties?: string[];
|
|
21
|
+
values?: Record<string, string[]>;
|
|
22
|
+
functions?: string[];
|
|
23
|
+
syntax?: string[];
|
|
24
|
+
}
|
|
19
25
|
/**
|
|
20
26
|
* A `react-native-css` StyleSheet
|
|
21
27
|
*/
|