zyzz 0.0.0 → 0.0.2
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/LICENSE +21 -0
- package/README.md +380 -0
- package/dist/Config.d.ts +170 -0
- package/dist/Config.d.ts.map +1 -0
- package/dist/Config.js +249 -0
- package/dist/Config.js.map +1 -0
- package/dist/Props.d.ts +7 -0
- package/dist/Props.d.ts.map +1 -0
- package/dist/Props.js +3 -0
- package/dist/Props.js.map +1 -0
- package/dist/Style.d.ts +167 -0
- package/dist/Style.d.ts.map +1 -0
- package/dist/Style.js +284 -0
- package/dist/Style.js.map +1 -0
- package/dist/Theme.d.ts +154 -0
- package/dist/Theme.d.ts.map +1 -0
- package/dist/Theme.js +257 -0
- package/dist/Theme.js.map +1 -0
- package/dist/babel/NativeEdits.d.ts +8 -0
- package/dist/babel/NativeEdits.d.ts.map +1 -0
- package/dist/babel/NativeEdits.js +233 -0
- package/dist/babel/NativeEdits.js.map +1 -0
- package/dist/babel/NativeJsx.d.ts +10 -0
- package/dist/babel/NativeJsx.d.ts.map +1 -0
- package/dist/babel/NativeJsx.js +204 -0
- package/dist/babel/NativeJsx.js.map +1 -0
- package/dist/babel/index.d.ts +51 -0
- package/dist/babel/index.d.ts.map +1 -0
- package/dist/babel/index.js +220 -0
- package/dist/babel/index.js.map +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +178 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/compiler/Graph.d.ts +64 -0
- package/dist/compiler/Graph.d.ts.map +1 -0
- package/dist/compiler/Graph.js +1111 -0
- package/dist/compiler/Graph.js.map +1 -0
- package/dist/compiler/Native.d.ts +53 -0
- package/dist/compiler/Native.d.ts.map +1 -0
- package/dist/compiler/Native.js +617 -0
- package/dist/compiler/Native.js.map +1 -0
- package/dist/compiler/Source.d.ts +165 -0
- package/dist/compiler/Source.d.ts.map +1 -0
- package/dist/compiler/Source.js +990 -0
- package/dist/compiler/Source.js.map +1 -0
- package/dist/compiler/Transform.d.ts +57 -0
- package/dist/compiler/Transform.d.ts.map +1 -0
- package/dist/compiler/Transform.js +884 -0
- package/dist/compiler/Transform.js.map +1 -0
- package/dist/compiler/index.d.ts +13 -0
- package/dist/compiler/index.d.ts.map +1 -0
- package/dist/compiler/index.js +13 -0
- package/dist/compiler/index.js.map +1 -0
- package/dist/compiler/internal/Applications.d.ts +35 -0
- package/dist/compiler/internal/Applications.d.ts.map +1 -0
- package/dist/compiler/internal/Applications.js +248 -0
- package/dist/compiler/internal/Applications.js.map +1 -0
- package/dist/compiler/internal/AtRules.d.ts +8 -0
- package/dist/compiler/internal/AtRules.d.ts.map +1 -0
- package/dist/compiler/internal/AtRules.js +180 -0
- package/dist/compiler/internal/AtRules.js.map +1 -0
- package/dist/compiler/internal/Catalogs.d.ts +19 -0
- package/dist/compiler/internal/Catalogs.d.ts.map +1 -0
- package/dist/compiler/internal/Catalogs.js +68 -0
- package/dist/compiler/internal/Catalogs.js.map +1 -0
- package/dist/compiler/internal/ColorProfiles.d.ts +3 -0
- package/dist/compiler/internal/ColorProfiles.d.ts.map +1 -0
- package/dist/compiler/internal/ColorProfiles.js +84 -0
- package/dist/compiler/internal/ColorProfiles.js.map +1 -0
- package/dist/compiler/internal/CompositionBindings.d.ts +16 -0
- package/dist/compiler/internal/CompositionBindings.d.ts.map +1 -0
- package/dist/compiler/internal/CompositionBindings.js +89 -0
- package/dist/compiler/internal/CompositionBindings.js.map +1 -0
- package/dist/compiler/internal/Compositions.d.ts +32 -0
- package/dist/compiler/internal/Compositions.d.ts.map +1 -0
- package/dist/compiler/internal/Compositions.js +464 -0
- package/dist/compiler/internal/Compositions.js.map +1 -0
- package/dist/compiler/internal/Configurations.d.ts +21 -0
- package/dist/compiler/internal/Configurations.d.ts.map +1 -0
- package/dist/compiler/internal/Configurations.js +171 -0
- package/dist/compiler/internal/Configurations.js.map +1 -0
- package/dist/compiler/internal/Contract.d.ts +27 -0
- package/dist/compiler/internal/Contract.d.ts.map +1 -0
- package/dist/compiler/internal/Contract.js +600 -0
- package/dist/compiler/internal/Contract.js.map +1 -0
- package/dist/compiler/internal/Contributions.d.ts +54 -0
- package/dist/compiler/internal/Contributions.d.ts.map +1 -0
- package/dist/compiler/internal/Contributions.js +1109 -0
- package/dist/compiler/internal/Contributions.js.map +1 -0
- package/dist/compiler/internal/Descriptors.d.ts +15 -0
- package/dist/compiler/internal/Descriptors.d.ts.map +1 -0
- package/dist/compiler/internal/Descriptors.js +183 -0
- package/dist/compiler/internal/Descriptors.js.map +1 -0
- package/dist/compiler/internal/Dynamic.d.ts +14 -0
- package/dist/compiler/internal/Dynamic.d.ts.map +1 -0
- package/dist/compiler/internal/Dynamic.js +172 -0
- package/dist/compiler/internal/Dynamic.js.map +1 -0
- package/dist/compiler/internal/Edits.d.ts +12 -0
- package/dist/compiler/internal/Edits.d.ts.map +1 -0
- package/dist/compiler/internal/Edits.js +5 -0
- package/dist/compiler/internal/Edits.js.map +1 -0
- package/dist/compiler/internal/Expression.d.ts +12 -0
- package/dist/compiler/internal/Expression.d.ts.map +1 -0
- package/dist/compiler/internal/Expression.js +98 -0
- package/dist/compiler/internal/Expression.js.map +1 -0
- package/dist/compiler/internal/Functions.d.ts +5 -0
- package/dist/compiler/internal/Functions.d.ts.map +1 -0
- package/dist/compiler/internal/Functions.js +191 -0
- package/dist/compiler/internal/Functions.js.map +1 -0
- package/dist/compiler/internal/Identifiers.d.ts +9 -0
- package/dist/compiler/internal/Identifiers.d.ts.map +1 -0
- package/dist/compiler/internal/Identifiers.js +106 -0
- package/dist/compiler/internal/Identifiers.js.map +1 -0
- package/dist/compiler/internal/Keyframes.d.ts +5 -0
- package/dist/compiler/internal/Keyframes.d.ts.map +1 -0
- package/dist/compiler/internal/Keyframes.js +51 -0
- package/dist/compiler/internal/Keyframes.js.map +1 -0
- package/dist/compiler/internal/Namespaces.d.ts +17 -0
- package/dist/compiler/internal/Namespaces.d.ts.map +1 -0
- package/dist/compiler/internal/Namespaces.js +265 -0
- package/dist/compiler/internal/Namespaces.js.map +1 -0
- package/dist/compiler/internal/NativeBindings.d.ts +74 -0
- package/dist/compiler/internal/NativeBindings.d.ts.map +1 -0
- package/dist/compiler/internal/NativeBindings.js +117 -0
- package/dist/compiler/internal/NativeBindings.js.map +1 -0
- package/dist/compiler/internal/PackedStyles.d.ts +35 -0
- package/dist/compiler/internal/PackedStyles.d.ts.map +1 -0
- package/dist/compiler/internal/PackedStyles.js +345 -0
- package/dist/compiler/internal/PackedStyles.js.map +1 -0
- package/dist/compiler/internal/Properties.d.ts +5 -0
- package/dist/compiler/internal/Properties.d.ts.map +1 -0
- package/dist/compiler/internal/Properties.js +82 -0
- package/dist/compiler/internal/Properties.js.map +1 -0
- package/dist/compiler/internal/RecipeConditions.d.ts +41 -0
- package/dist/compiler/internal/RecipeConditions.d.ts.map +1 -0
- package/dist/compiler/internal/RecipeConditions.js +82 -0
- package/dist/compiler/internal/RecipeConditions.js.map +1 -0
- package/dist/compiler/internal/RecipePayloads.d.ts +31 -0
- package/dist/compiler/internal/RecipePayloads.d.ts.map +1 -0
- package/dist/compiler/internal/RecipePayloads.js +99 -0
- package/dist/compiler/internal/RecipePayloads.js.map +1 -0
- package/dist/compiler/internal/Recipes.d.ts +32 -0
- package/dist/compiler/internal/Recipes.d.ts.map +1 -0
- package/dist/compiler/internal/Recipes.js +339 -0
- package/dist/compiler/internal/Recipes.js.map +1 -0
- package/dist/compiler/internal/Relative.d.ts +19 -0
- package/dist/compiler/internal/Relative.d.ts.map +1 -0
- package/dist/compiler/internal/Relative.js +62 -0
- package/dist/compiler/internal/Relative.js.map +1 -0
- package/dist/compiler/internal/Scope.d.ts +10 -0
- package/dist/compiler/internal/Scope.d.ts.map +1 -0
- package/dist/compiler/internal/Scope.js +28 -0
- package/dist/compiler/internal/Scope.js.map +1 -0
- package/dist/compiler/internal/Selectors.d.ts +12 -0
- package/dist/compiler/internal/Selectors.d.ts.map +1 -0
- package/dist/compiler/internal/Selectors.js +265 -0
- package/dist/compiler/internal/Selectors.js.map +1 -0
- package/dist/compiler/internal/Static.d.ts +39 -0
- package/dist/compiler/internal/Static.d.ts.map +1 -0
- package/dist/compiler/internal/Static.js +532 -0
- package/dist/compiler/internal/Static.js.map +1 -0
- package/dist/compiler/internal/Stylesheets.d.ts +47 -0
- package/dist/compiler/internal/Stylesheets.d.ts.map +1 -0
- package/dist/compiler/internal/Stylesheets.js +272 -0
- package/dist/compiler/internal/Stylesheets.js.map +1 -0
- package/dist/compiler/internal/Syntax.d.ts +17 -0
- package/dist/compiler/internal/Syntax.d.ts.map +1 -0
- package/dist/compiler/internal/Syntax.js +19 -0
- package/dist/compiler/internal/Syntax.js.map +1 -0
- package/dist/compiler/internal/Themes.d.ts +158 -0
- package/dist/compiler/internal/Themes.d.ts.map +1 -0
- package/dist/compiler/internal/Themes.js +1169 -0
- package/dist/compiler/internal/Themes.js.map +1 -0
- package/dist/compiler/internal/Variables.d.ts +31 -0
- package/dist/compiler/internal/Variables.d.ts.map +1 -0
- package/dist/compiler/internal/Variables.js +376 -0
- package/dist/compiler/internal/Variables.js.map +1 -0
- package/dist/compiler/internal/ViewTransitions.d.ts +3 -0
- package/dist/compiler/internal/ViewTransitions.d.ts.map +1 -0
- package/dist/compiler/internal/ViewTransitions.js +68 -0
- package/dist/compiler/internal/ViewTransitions.js.map +1 -0
- package/dist/cx.d.ts +18 -0
- package/dist/cx.d.ts.map +1 -0
- package/dist/cx.js +60 -0
- package/dist/cx.js.map +1 -0
- package/dist/default.d.ts +2008 -0
- package/dist/default.d.ts.map +1 -0
- package/dist/default.js +243 -0
- package/dist/default.js.map +7 -0
- package/dist/default.js.zyzz.json +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/Authoring.d.ts +26 -0
- package/dist/internal/Authoring.d.ts.map +1 -0
- package/dist/internal/Authoring.js +134 -0
- package/dist/internal/Authoring.js.map +1 -0
- package/dist/internal/Binding.d.ts +64 -0
- package/dist/internal/Binding.d.ts.map +1 -0
- package/dist/internal/Binding.js +27 -0
- package/dist/internal/Binding.js.map +1 -0
- package/dist/internal/BindingDomains.d.ts +11 -0
- package/dist/internal/BindingDomains.d.ts.map +1 -0
- package/dist/internal/BindingDomains.js +459 -0
- package/dist/internal/BindingDomains.js.map +1 -0
- package/dist/internal/Cascade.d.ts +45 -0
- package/dist/internal/Cascade.d.ts.map +1 -0
- package/dist/internal/Cascade.js +165 -0
- package/dist/internal/Cascade.js.map +1 -0
- package/dist/internal/Compound.d.ts +132 -0
- package/dist/internal/Compound.d.ts.map +1 -0
- package/dist/internal/Compound.js +2 -0
- package/dist/internal/Compound.js.map +1 -0
- package/dist/internal/Condition.d.ts +33 -0
- package/dist/internal/Condition.d.ts.map +1 -0
- package/dist/internal/Condition.js +180 -0
- package/dist/internal/Condition.js.map +1 -0
- package/dist/internal/Corner.d.ts +9 -0
- package/dist/internal/Corner.d.ts.map +1 -0
- package/dist/internal/Corner.js +14 -0
- package/dist/internal/Corner.js.map +1 -0
- package/dist/internal/FunctionSyntax.d.ts +27 -0
- package/dist/internal/FunctionSyntax.d.ts.map +1 -0
- package/dist/internal/FunctionSyntax.js +91 -0
- package/dist/internal/FunctionSyntax.js.map +1 -0
- package/dist/internal/FunctionValue.d.ts +19 -0
- package/dist/internal/FunctionValue.d.ts.map +1 -0
- package/dist/internal/FunctionValue.js +2 -0
- package/dist/internal/FunctionValue.js.map +1 -0
- package/dist/internal/Geometry.d.ts +8 -0
- package/dist/internal/Geometry.d.ts.map +1 -0
- package/dist/internal/Geometry.js +2 -0
- package/dist/internal/Geometry.js.map +1 -0
- package/dist/internal/Grid.d.ts +15 -0
- package/dist/internal/Grid.d.ts.map +1 -0
- package/dist/internal/Grid.js +2 -0
- package/dist/internal/Grid.js.map +1 -0
- package/dist/internal/Identifier.d.ts +15 -0
- package/dist/internal/Identifier.d.ts.map +1 -0
- package/dist/internal/Identifier.js +2 -0
- package/dist/internal/Identifier.js.map +1 -0
- package/dist/internal/Identity.d.ts +16 -0
- package/dist/internal/Identity.d.ts.map +1 -0
- package/dist/internal/Identity.js +78 -0
- package/dist/internal/Identity.js.map +1 -0
- package/dist/internal/Lexical.d.ts +89 -0
- package/dist/internal/Lexical.d.ts.map +1 -0
- package/dist/internal/Lexical.js +15 -0
- package/dist/internal/Lexical.js.map +1 -0
- package/dist/internal/Literal.d.ts +3459 -0
- package/dist/internal/Literal.d.ts.map +1 -0
- package/dist/internal/Literal.js +3371 -0
- package/dist/internal/Literal.js.map +1 -0
- package/dist/internal/NativeProperties.d.ts +596 -0
- package/dist/internal/NativeProperties.d.ts.map +1 -0
- package/dist/internal/NativeProperties.js +2 -0
- package/dist/internal/NativeProperties.js.map +1 -0
- package/dist/internal/Numeric.d.ts +23 -0
- package/dist/internal/Numeric.d.ts.map +1 -0
- package/dist/internal/Numeric.js +2 -0
- package/dist/internal/Numeric.js.map +1 -0
- package/dist/internal/Query.d.ts +15 -0
- package/dist/internal/Query.d.ts.map +1 -0
- package/dist/internal/Query.js +58 -0
- package/dist/internal/Query.js.map +1 -0
- package/dist/internal/Recipe.d.ts +17 -0
- package/dist/internal/Recipe.d.ts.map +1 -0
- package/dist/internal/Recipe.js +2 -0
- package/dist/internal/Recipe.js.map +1 -0
- package/dist/internal/RuleReference.d.ts +23 -0
- package/dist/internal/RuleReference.d.ts.map +1 -0
- package/dist/internal/RuleReference.js +65 -0
- package/dist/internal/RuleReference.js.map +1 -0
- package/dist/internal/Scheme.d.ts +12 -0
- package/dist/internal/Scheme.d.ts.map +1 -0
- package/dist/internal/Scheme.js +16 -0
- package/dist/internal/Scheme.js.map +1 -0
- package/dist/internal/Shorthands.d.ts +20 -0
- package/dist/internal/Shorthands.d.ts.map +1 -0
- package/dist/internal/Shorthands.js +49 -0
- package/dist/internal/Shorthands.js.map +1 -0
- package/dist/internal/Targets.d.ts +43 -0
- package/dist/internal/Targets.d.ts.map +1 -0
- package/dist/internal/Targets.js +60 -0
- package/dist/internal/Targets.js.map +1 -0
- package/dist/internal/Token.d.ts +104 -0
- package/dist/internal/Token.d.ts.map +1 -0
- package/dist/internal/Token.js +162 -0
- package/dist/internal/Token.js.map +1 -0
- package/dist/internal/Tuple.d.ts +23 -0
- package/dist/internal/Tuple.d.ts.map +1 -0
- package/dist/internal/Tuple.js +2 -0
- package/dist/internal/Tuple.js.map +1 -0
- package/dist/internal/Value.d.ts +74 -0
- package/dist/internal/Value.d.ts.map +1 -0
- package/dist/internal/Value.js +60 -0
- package/dist/internal/Value.js.map +1 -0
- package/dist/metro/Graph.d.ts +8 -0
- package/dist/metro/Graph.d.ts.map +1 -0
- package/dist/metro/Graph.js +63 -0
- package/dist/metro/Graph.js.map +1 -0
- package/dist/metro/Watch.d.ts +21 -0
- package/dist/metro/Watch.d.ts.map +1 -0
- package/dist/metro/Watch.js +51 -0
- package/dist/metro/Watch.js.map +1 -0
- package/dist/metro/index.d.ts +30 -0
- package/dist/metro/index.d.ts.map +1 -0
- package/dist/metro/index.js +52 -0
- package/dist/metro/index.js.map +1 -0
- package/dist/metro/transformer.d.ts +21 -0
- package/dist/metro/transformer.d.ts.map +1 -0
- package/dist/metro/transformer.js +71 -0
- package/dist/metro/transformer.js.map +1 -0
- package/dist/next/index.d.ts +18 -0
- package/dist/next/index.d.ts.map +1 -0
- package/dist/next/index.js +92 -0
- package/dist/next/index.js.map +1 -0
- package/dist/next/loader.d.ts +16 -0
- package/dist/next/loader.d.ts.map +1 -0
- package/dist/next/loader.js +282 -0
- package/dist/next/loader.js.map +1 -0
- package/dist/node/Host.d.ts +80 -0
- package/dist/node/Host.d.ts.map +1 -0
- package/dist/node/Host.js +882 -0
- package/dist/node/Host.js.map +1 -0
- package/dist/node/index.d.ts +7 -0
- package/dist/node/index.d.ts.map +1 -0
- package/dist/node/index.js +7 -0
- package/dist/node/index.js.map +1 -0
- package/dist/react-native/Host.d.ts +76 -0
- package/dist/react-native/Host.d.ts.map +1 -0
- package/dist/react-native/Host.js +209 -0
- package/dist/react-native/Host.js.map +1 -0
- package/dist/react-native/StyleSheet.d.ts +226 -0
- package/dist/react-native/StyleSheet.d.ts.map +1 -0
- package/dist/react-native/StyleSheet.js +606 -0
- package/dist/react-native/StyleSheet.js.map +1 -0
- package/dist/react-native/Variants.d.ts +38 -0
- package/dist/react-native/Variants.d.ts.map +1 -0
- package/dist/react-native/Variants.js +66 -0
- package/dist/react-native/Variants.js.map +1 -0
- package/dist/react-native/index.d.ts +8 -0
- package/dist/react-native/index.d.ts.map +1 -0
- package/dist/react-native/index.js +8 -0
- package/dist/react-native/index.js.map +1 -0
- package/dist/react-native/internal/Color.d.ts +7 -0
- package/dist/react-native/internal/Color.d.ts.map +1 -0
- package/dist/react-native/internal/Color.js +93 -0
- package/dist/react-native/internal/Color.js.map +1 -0
- package/dist/react-native/internal/NativeSchema.d.ts +5138 -0
- package/dist/react-native/internal/NativeSchema.d.ts.map +1 -0
- package/dist/react-native/internal/NativeSchema.js +3097 -0
- package/dist/react-native/internal/NativeSchema.js.map +1 -0
- package/dist/react-native/internal/Scalar.d.ts +95 -0
- package/dist/react-native/internal/Scalar.d.ts.map +1 -0
- package/dist/react-native/internal/Scalar.js +199 -0
- package/dist/react-native/internal/Scalar.js.map +1 -0
- package/dist/react-native/internal/Values.d.ts +5 -0
- package/dist/react-native/internal/Values.d.ts.map +1 -0
- package/dist/react-native/internal/Values.js +65 -0
- package/dist/react-native/internal/Values.js.map +1 -0
- package/dist/react-native/react.d.ts +22 -0
- package/dist/react-native/react.d.ts.map +1 -0
- package/dist/react-native/react.js +26 -0
- package/dist/react-native/react.js.map +1 -0
- package/dist/reset.css +244 -0
- package/dist/runtime/Appearance.d.ts +55 -0
- package/dist/runtime/Appearance.d.ts.map +1 -0
- package/dist/runtime/Appearance.js +84 -0
- package/dist/runtime/Appearance.js.map +1 -0
- package/dist/runtime/Composition.d.ts +46 -0
- package/dist/runtime/Composition.d.ts.map +1 -0
- package/dist/runtime/Composition.js +52 -0
- package/dist/runtime/Composition.js.map +1 -0
- package/dist/runtime/CompositionHtml.d.ts +15 -0
- package/dist/runtime/CompositionHtml.d.ts.map +1 -0
- package/dist/runtime/CompositionHtml.js +20 -0
- package/dist/runtime/CompositionHtml.js.map +1 -0
- package/dist/runtime/ConditionalRecipe.d.ts +30 -0
- package/dist/runtime/ConditionalRecipe.d.ts.map +1 -0
- package/dist/runtime/ConditionalRecipe.js +39 -0
- package/dist/runtime/ConditionalRecipe.js.map +1 -0
- package/dist/runtime/Dynamic.d.ts +19 -0
- package/dist/runtime/Dynamic.d.ts.map +1 -0
- package/dist/runtime/Dynamic.js +22 -0
- package/dist/runtime/Dynamic.js.map +1 -0
- package/dist/runtime/Html.d.ts +32 -0
- package/dist/runtime/Html.d.ts.map +1 -0
- package/dist/runtime/Html.js +63 -0
- package/dist/runtime/Html.js.map +1 -0
- package/dist/runtime/Native.d.ts +48 -0
- package/dist/runtime/Native.d.ts.map +1 -0
- package/dist/runtime/Native.js +78 -0
- package/dist/runtime/Native.js.map +1 -0
- package/dist/runtime/NativeContext.d.ts +17 -0
- package/dist/runtime/NativeContext.d.ts.map +1 -0
- package/dist/runtime/NativeContext.js +47 -0
- package/dist/runtime/NativeContext.js.map +1 -0
- package/dist/runtime/NativeDynamic.d.ts +47 -0
- package/dist/runtime/NativeDynamic.d.ts.map +1 -0
- package/dist/runtime/NativeDynamic.js +141 -0
- package/dist/runtime/NativeDynamic.js.map +1 -0
- package/dist/runtime/PayloadRecipe.d.ts +22 -0
- package/dist/runtime/PayloadRecipe.d.ts.map +1 -0
- package/dist/runtime/PayloadRecipe.js +59 -0
- package/dist/runtime/PayloadRecipe.js.map +1 -0
- package/dist/runtime/Props.d.ts +21 -0
- package/dist/runtime/Props.d.ts.map +1 -0
- package/dist/runtime/Props.js +17 -0
- package/dist/runtime/Props.js.map +1 -0
- package/dist/runtime/Recipe.d.ts +52 -0
- package/dist/runtime/Recipe.d.ts.map +1 -0
- package/dist/runtime/Recipe.js +30 -0
- package/dist/runtime/Recipe.js.map +1 -0
- package/dist/runtime/Selection.d.ts +31 -0
- package/dist/runtime/Selection.d.ts.map +1 -0
- package/dist/runtime/Selection.js +30 -0
- package/dist/runtime/Selection.js.map +1 -0
- package/dist/runtime/Variable.d.ts +6 -0
- package/dist/runtime/Variable.d.ts.map +1 -0
- package/dist/runtime/Variable.js +10 -0
- package/dist/runtime/Variable.js.map +1 -0
- package/dist/runtime/index.d.ts +33 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/index.js +33 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/styleFunction.d.ts +72 -0
- package/dist/styleFunction.d.ts.map +1 -0
- package/dist/styleFunction.js +18 -0
- package/dist/styleFunction.js.map +1 -0
- package/dist/themes/LICENSE.tailwind +21 -0
- package/dist/variable.d.ts +50 -0
- package/dist/variable.d.ts.map +1 -0
- package/dist/variable.js +20 -0
- package/dist/variable.js.map +1 -0
- package/dist/variants.d.ts +84 -0
- package/dist/variants.d.ts.map +1 -0
- package/dist/variants.js +21 -0
- package/dist/variants.js.map +1 -0
- package/dist/vite/index.d.ts +24 -0
- package/dist/vite/index.d.ts.map +1 -0
- package/dist/vite/index.js +1089 -0
- package/dist/vite/index.js.map +1 -0
- package/dist/web/Css.d.ts +81 -0
- package/dist/web/Css.d.ts.map +1 -0
- package/dist/web/Css.js +593 -0
- package/dist/web/Css.js.map +1 -0
- package/dist/web/colorProfile.d.ts +28 -0
- package/dist/web/colorProfile.d.ts.map +1 -0
- package/dist/web/colorProfile.js +8 -0
- package/dist/web/colorProfile.js.map +1 -0
- package/dist/web/counterStyle.d.ts +48 -0
- package/dist/web/counterStyle.d.ts.map +1 -0
- package/dist/web/counterStyle.js +8 -0
- package/dist/web/counterStyle.js.map +1 -0
- package/dist/web/cssFunction.d.ts +80 -0
- package/dist/web/cssFunction.d.ts.map +1 -0
- package/dist/web/cssFunction.js +18 -0
- package/dist/web/cssFunction.js.map +1 -0
- package/dist/web/customMedia.d.ts +12 -0
- package/dist/web/customMedia.d.ts.map +1 -0
- package/dist/web/customMedia.js +7 -0
- package/dist/web/customMedia.js.map +1 -0
- package/dist/web/fontFace.d.ts +26 -0
- package/dist/web/fontFace.d.ts.map +1 -0
- package/dist/web/fontFace.js +7 -0
- package/dist/web/fontFace.js.map +1 -0
- package/dist/web/fontFeatureValues.d.ts +40 -0
- package/dist/web/fontFeatureValues.d.ts.map +1 -0
- package/dist/web/fontFeatureValues.js +7 -0
- package/dist/web/fontFeatureValues.js.map +1 -0
- package/dist/web/fontPaletteValues.d.ts +21 -0
- package/dist/web/fontPaletteValues.d.ts.map +1 -0
- package/dist/web/fontPaletteValues.js +9 -0
- package/dist/web/fontPaletteValues.js.map +1 -0
- package/dist/web/global.d.ts +19 -0
- package/dist/web/global.d.ts.map +1 -0
- package/dist/web/global.js +6 -0
- package/dist/web/global.js.map +1 -0
- package/dist/web/importCss.d.ts +18 -0
- package/dist/web/importCss.d.ts.map +1 -0
- package/dist/web/importCss.js +7 -0
- package/dist/web/importCss.js.map +1 -0
- package/dist/web/index.d.ts +22 -0
- package/dist/web/index.d.ts.map +1 -0
- package/dist/web/index.js +22 -0
- package/dist/web/index.js.map +1 -0
- package/dist/web/internal/Block.d.ts +18 -0
- package/dist/web/internal/Block.d.ts.map +1 -0
- package/dist/web/internal/Block.js +13 -0
- package/dist/web/internal/Block.js.map +1 -0
- package/dist/web/internal/ClassName.d.ts +19 -0
- package/dist/web/internal/ClassName.d.ts.map +1 -0
- package/dist/web/internal/ClassName.js +77 -0
- package/dist/web/internal/ClassName.js.map +1 -0
- package/dist/web/internal/Context.d.ts +11 -0
- package/dist/web/internal/Context.d.ts.map +1 -0
- package/dist/web/internal/Context.js +2 -0
- package/dist/web/internal/Context.js.map +1 -0
- package/dist/web/internal/Contributions.d.ts +70 -0
- package/dist/web/internal/Contributions.d.ts.map +1 -0
- package/dist/web/internal/Contributions.js +109 -0
- package/dist/web/internal/Contributions.js.map +1 -0
- package/dist/web/internal/Namespace.d.ts +13 -0
- package/dist/web/internal/Namespace.d.ts.map +1 -0
- package/dist/web/internal/Namespace.js +13 -0
- package/dist/web/internal/Namespace.js.map +1 -0
- package/dist/web/internal/Themes.d.ts +13 -0
- package/dist/web/internal/Themes.d.ts.map +1 -0
- package/dist/web/internal/Themes.js +96 -0
- package/dist/web/internal/Themes.js.map +1 -0
- package/dist/web/keyframes.d.ts +14 -0
- package/dist/web/keyframes.d.ts.map +1 -0
- package/dist/web/keyframes.js +8 -0
- package/dist/web/keyframes.js.map +1 -0
- package/dist/web/layers.d.ts +4 -0
- package/dist/web/layers.d.ts.map +1 -0
- package/dist/web/layers.js +7 -0
- package/dist/web/layers.js.map +1 -0
- package/dist/web/namespace.d.ts +14 -0
- package/dist/web/namespace.d.ts.map +1 -0
- package/dist/web/namespace.js +7 -0
- package/dist/web/namespace.js.map +1 -0
- package/dist/web/page.d.ts +38 -0
- package/dist/web/page.d.ts.map +1 -0
- package/dist/web/page.js +7 -0
- package/dist/web/page.js.map +1 -0
- package/dist/web/positionTry.d.ts +14 -0
- package/dist/web/positionTry.d.ts.map +1 -0
- package/dist/web/positionTry.js +9 -0
- package/dist/web/positionTry.js.map +1 -0
- package/dist/web/property.d.ts +24 -0
- package/dist/web/property.d.ts.map +1 -0
- package/dist/web/property.js +7 -0
- package/dist/web/property.js.map +1 -0
- package/dist/web/viewTransition.d.ts +29 -0
- package/dist/web/viewTransition.d.ts.map +1 -0
- package/dist/web/viewTransition.js +7 -0
- package/dist/web/viewTransition.js.map +1 -0
- package/package.json +136 -10
- package/src/Config.ts +690 -0
- package/src/Props.ts +8 -0
- package/src/Style.ts +748 -0
- package/src/Theme.ts +713 -0
- package/src/babel/NativeEdits.ts +273 -0
- package/src/babel/NativeJsx.ts +260 -0
- package/src/babel/index.ts +332 -0
- package/src/cli/index.ts +196 -0
- package/src/compiler/Graph.ts +1586 -0
- package/src/compiler/Native.ts +801 -0
- package/src/compiler/Source.ts +1550 -0
- package/src/compiler/Transform.ts +1235 -0
- package/src/compiler/index.ts +12 -0
- package/src/compiler/internal/Applications.ts +378 -0
- package/src/compiler/internal/AtRules.ts +202 -0
- package/src/compiler/internal/Catalogs.ts +114 -0
- package/src/compiler/internal/ColorProfiles.ts +93 -0
- package/src/compiler/internal/CompositionBindings.ts +120 -0
- package/src/compiler/internal/Compositions.ts +629 -0
- package/src/compiler/internal/Configurations.ts +244 -0
- package/src/compiler/internal/Contract.ts +846 -0
- package/src/compiler/internal/Contributions.ts +1507 -0
- package/src/compiler/internal/Descriptors.ts +238 -0
- package/src/compiler/internal/Dynamic.ts +266 -0
- package/src/compiler/internal/Edits.ts +13 -0
- package/src/compiler/internal/Expression.ts +135 -0
- package/src/compiler/internal/Functions.ts +206 -0
- package/src/compiler/internal/Identifiers.ts +124 -0
- package/src/compiler/internal/Keyframes.ts +62 -0
- package/src/compiler/internal/Namespaces.ts +296 -0
- package/src/compiler/internal/NativeBindings.ts +151 -0
- package/src/compiler/internal/PackedStyles.ts +464 -0
- package/src/compiler/internal/Properties.ts +121 -0
- package/src/compiler/internal/RecipeConditions.ts +139 -0
- package/src/compiler/internal/RecipePayloads.ts +132 -0
- package/src/compiler/internal/Recipes.ts +531 -0
- package/src/compiler/internal/Relative.ts +87 -0
- package/src/compiler/internal/Scope.ts +36 -0
- package/src/compiler/internal/Selectors.ts +334 -0
- package/src/compiler/internal/Static.ts +783 -0
- package/src/compiler/internal/Stylesheets.ts +361 -0
- package/src/compiler/internal/Syntax.ts +31 -0
- package/src/compiler/internal/Themes.ts +1794 -0
- package/src/compiler/internal/Variables.ts +497 -0
- package/src/compiler/internal/ViewTransitions.ts +82 -0
- package/src/cx.ts +98 -0
- package/src/default.ts +484 -0
- package/src/index.ts +20 -0
- package/src/internal/Authoring.ts +199 -0
- package/src/internal/Binding.ts +187 -0
- package/src/internal/BindingDomains.ts +458 -0
- package/src/internal/Cascade.ts +165 -0
- package/src/internal/Compound.ts +522 -0
- package/src/internal/Condition.ts +283 -0
- package/src/internal/Corner.ts +17 -0
- package/src/internal/FunctionSyntax.ts +271 -0
- package/src/internal/FunctionValue.ts +96 -0
- package/src/internal/Geometry.ts +30 -0
- package/src/internal/Grid.ts +67 -0
- package/src/internal/Identifier.ts +14 -0
- package/src/internal/Identity.ts +89 -0
- package/src/internal/Lexical.ts +202 -0
- package/src/internal/Literal.ts +3820 -0
- package/src/internal/NativeProperties.ts +936 -0
- package/src/internal/Numeric.ts +77 -0
- package/src/internal/Query.ts +87 -0
- package/src/internal/Recipe.ts +17 -0
- package/src/internal/RuleReference.ts +102 -0
- package/src/internal/Scheme.ts +20 -0
- package/src/internal/Shorthands.ts +120 -0
- package/src/internal/Targets.ts +162 -0
- package/src/internal/Token.ts +380 -0
- package/src/internal/Tuple.ts +29 -0
- package/src/internal/Value.ts +320 -0
- package/src/metro/Graph.ts +78 -0
- package/src/metro/Watch.ts +88 -0
- package/src/metro/index.ts +99 -0
- package/src/metro/transformer.ts +97 -0
- package/src/next/index.ts +114 -0
- package/src/next/loader.ts +369 -0
- package/src/node/Host.ts +1204 -0
- package/src/node/index.ts +6 -0
- package/src/react-native/Host.ts +289 -0
- package/src/react-native/StyleSheet.ts +1084 -0
- package/src/react-native/Variants.ts +122 -0
- package/src/react-native/index.ts +7 -0
- package/src/react-native/internal/Color.ts +110 -0
- package/src/react-native/internal/NativeSchema.ts +3096 -0
- package/src/react-native/internal/Scalar.ts +253 -0
- package/src/react-native/internal/Values.ts +87 -0
- package/src/react-native/react.ts +47 -0
- package/src/reset.css +244 -0
- package/src/runtime/Appearance.ts +155 -0
- package/src/runtime/Composition.ts +87 -0
- package/src/runtime/CompositionHtml.ts +38 -0
- package/src/runtime/ConditionalRecipe.ts +70 -0
- package/src/runtime/Dynamic.ts +51 -0
- package/src/runtime/Html.ts +91 -0
- package/src/runtime/Native.ts +144 -0
- package/src/runtime/NativeContext.ts +74 -0
- package/src/runtime/NativeDynamic.ts +246 -0
- package/src/runtime/PayloadRecipe.ts +96 -0
- package/src/runtime/Props.ts +33 -0
- package/src/runtime/Recipe.ts +74 -0
- package/src/runtime/Selection.ts +82 -0
- package/src/runtime/Variable.ts +15 -0
- package/src/runtime/index.ts +45 -0
- package/src/styleFunction.ts +138 -0
- package/src/themes/LICENSE.tailwind +21 -0
- package/src/variable.ts +105 -0
- package/src/variants.ts +218 -0
- package/src/vite/index.ts +1473 -0
- package/src/web/Css.ts +801 -0
- package/src/web/colorProfile.ts +60 -0
- package/src/web/counterStyle.ts +82 -0
- package/src/web/cssFunction.ts +181 -0
- package/src/web/customMedia.ts +16 -0
- package/src/web/fontFace.ts +41 -0
- package/src/web/fontFeatureValues.ts +79 -0
- package/src/web/fontPaletteValues.ts +42 -0
- package/src/web/global.ts +39 -0
- package/src/web/importCss.ts +23 -0
- package/src/web/index.ts +22 -0
- package/src/web/internal/Block.ts +29 -0
- package/src/web/internal/ClassName.ts +112 -0
- package/src/web/internal/Context.ts +16 -0
- package/src/web/internal/Contributions.ts +219 -0
- package/src/web/internal/Namespace.ts +21 -0
- package/src/web/internal/Themes.ts +133 -0
- package/src/web/keyframes.ts +43 -0
- package/src/web/layers.ts +6 -0
- package/src/web/namespace.ts +19 -0
- package/src/web/page.ts +140 -0
- package/src/web/positionTry.ts +71 -0
- package/src/web/property.ts +35 -0
- package/src/web/viewTransition.ts +89 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StyleSheet.d.ts","sourceRoot":"","sources":["../../src/react-native/StyleSheet.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,OAAO,KAAK,KAAK,KAAK,MAAM,aAAa,CAAA;AACzC,OAAO,KAAK,KAAK,KAAK,MAAM,aAAa,CAAA;AACzC,OAAO,KAAK,KAAK,MAAM,sBAAsB,CAAA;AAC7C,OAAO,KAAK,KAAK,MAAM,MAAM,iCAAiC,CAAA;AAE9D,OAAO,KAAK,KAAK,MAAM,qBAAqB,CAAA;AAG5C,QAAA,MAAM,UAAU;;;;;;;;;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,MAAM,GAAG,GAAG,MAAM,GAAG,GAAG,MAAM,GAC9B,IAAI,SAAS,WAAW,GAAG,QAAQ,GACjC,MAAM,GAAG,GAAG,MAAM,GAAG,GACrB,IAAI,SAAS,SAAS,GAAG,QAAQ,GAAG,SAAS,GAC3C,MAAM,GACN,IAAI,SAAS,OAAO,GAClB,MAAM,GAAG,GAAG,MAAM,MAAM,MAAM,EAAE,GAChC,IAAI,SAAS,QAAQ,GACnB,MAAM,GACN,IAAI,SAAS,MAAM,GACjB,MAAM,GAAG,MAAM,GACf,IAAI,SAAS,KAAK,GAAG,WAAW,GAC9B,GAAG,GACH,MAAM,CAAA;AAElC,KAAK,SAAS,CAAC,QAAQ,SAAS,MAAM,OAAO,UAAU,IAAI;KACxD,KAAK,IAAI,KAAK,CAAC,KAAK,GAAG,QAAQ,SAAS,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,GAC5D,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG;QAAE,QAAQ,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAA;KAAE,GACzD,KAAK;CACV,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA"}
|
|
@@ -0,0 +1,606 @@
|
|
|
1
|
+
import * as Token from '../internal/Token.js';
|
|
2
|
+
import * as Values from './internal/Values.js';
|
|
3
|
+
import * as Color from './internal/Color.js';
|
|
4
|
+
import * as Scalar from './internal/Scalar.js';
|
|
5
|
+
const properties = Scalar.properties;
|
|
6
|
+
/** Frozen native overlay style with zero physical offsets. */
|
|
7
|
+
export const absoluteFill = Object.freeze({
|
|
8
|
+
bottom: 0,
|
|
9
|
+
left: 0,
|
|
10
|
+
position: 'absolute',
|
|
11
|
+
right: 0,
|
|
12
|
+
top: 0,
|
|
13
|
+
});
|
|
14
|
+
/** Failure to represent the supplied definitions on the native target. */
|
|
15
|
+
export class CompileError extends Error {
|
|
16
|
+
/** Copies and freezes diagnostic paths in authored order. */
|
|
17
|
+
constructor(diagnostics) {
|
|
18
|
+
super(diagnostics
|
|
19
|
+
.map(({ message, path }) => `${JSON.stringify(path)}: ${message}`)
|
|
20
|
+
.join('\n'));
|
|
21
|
+
this.diagnostics = Object.freeze(diagnostics.map((diagnostic) => Object.freeze({
|
|
22
|
+
...diagnostic,
|
|
23
|
+
path: Object.freeze([...diagnostic.path]),
|
|
24
|
+
})));
|
|
25
|
+
}
|
|
26
|
+
/** Target capability failures, including the selected table when relevant. */
|
|
27
|
+
diagnostics;
|
|
28
|
+
/** Stable namespaced error identifier. */
|
|
29
|
+
name = 'StyleSheet.CompileError';
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Resolves portable tokens into two static scheme tables per supplied theme.
|
|
33
|
+
* px defaults to one native logical unit. rem and font families require mappings.
|
|
34
|
+
* No device state, CSS parser, stylesheet registration, or runtime binding is used.
|
|
35
|
+
* @throws {CompileError} For unsupported semantics or invalid conversion inputs.
|
|
36
|
+
*/
|
|
37
|
+
export function compile(options) {
|
|
38
|
+
for (const key of Object.keys(options))
|
|
39
|
+
if (!['fonts', 'platform', 'styles', 'themes', 'units'].includes(key))
|
|
40
|
+
fail('invalid_options', 'Unknown native compiler option.', [key]);
|
|
41
|
+
if (options.platform !== undefined &&
|
|
42
|
+
!['android', 'ios'].includes(options.platform))
|
|
43
|
+
fail('invalid_options', 'Expected an explicit ios or android platform.', [
|
|
44
|
+
'platform',
|
|
45
|
+
]);
|
|
46
|
+
for (const [unit, scale] of Object.entries(options.units ?? {}))
|
|
47
|
+
if (!['px', 'rem'].includes(unit) ||
|
|
48
|
+
(scale !== undefined &&
|
|
49
|
+
(typeof scale !== 'number' || !Number.isFinite(scale) || scale <= 0)))
|
|
50
|
+
fail('invalid_options', 'Unit scales must be positive finite px or rem conversions.', ['units', unit]);
|
|
51
|
+
for (const [family, mapped] of Object.entries(options.fonts ?? {}))
|
|
52
|
+
if (!family || typeof mapped !== 'string' || !mapped.trim())
|
|
53
|
+
fail('invalid_options', 'Font mappings require nonempty family names.', [
|
|
54
|
+
'fonts',
|
|
55
|
+
family,
|
|
56
|
+
]);
|
|
57
|
+
if (!options.styles || !Array.isArray(options.styles.styles))
|
|
58
|
+
fail('invalid_options', 'Expected a Style.define result.', ['styles']);
|
|
59
|
+
const names = new Set();
|
|
60
|
+
let scalar = true;
|
|
61
|
+
for (const style of options.styles.styles) {
|
|
62
|
+
if (!style.name || names.has(style.name))
|
|
63
|
+
fail('invalid_options', 'Style names must be nonempty and unique.', [
|
|
64
|
+
style.name,
|
|
65
|
+
]);
|
|
66
|
+
names.add(style.name);
|
|
67
|
+
for (const part of sequence(style)) {
|
|
68
|
+
if ((part.targets?.android || part.targets?.ios) && !options.platform)
|
|
69
|
+
fail('invalid_options', 'Platform branches require an explicit platform.', [style.name, 'targets']);
|
|
70
|
+
const declared = new Set();
|
|
71
|
+
for (const declaration of part.declarations) {
|
|
72
|
+
if (typeof declaration.value !== 'number' &&
|
|
73
|
+
typeof declaration.value !== 'string')
|
|
74
|
+
scalar = false;
|
|
75
|
+
const path = [style.name, declaration.property];
|
|
76
|
+
if (!Object.hasOwn(properties, declaration.property))
|
|
77
|
+
fail('unsupported_feature', 'Property is outside the native subset.', path);
|
|
78
|
+
if (declaration.important || declared.has(declaration.property))
|
|
79
|
+
fail('unsupported_feature', 'Importance and fallback declarations are not supported on native.', path);
|
|
80
|
+
declared.add(declaration.property);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
const themes = options.themes === undefined
|
|
85
|
+
? [['default', undefined]]
|
|
86
|
+
: Object.entries(options.themes);
|
|
87
|
+
if (!themes.length)
|
|
88
|
+
fail('invalid_options', 'Supply at least one theme, or omit themes for a default table.', ['themes']);
|
|
89
|
+
const tables = Object.create(null);
|
|
90
|
+
const interned = new Map();
|
|
91
|
+
const diagnostics = [];
|
|
92
|
+
let independent;
|
|
93
|
+
for (const [label, theme] of themes) {
|
|
94
|
+
if (!label)
|
|
95
|
+
fail('invalid_options', 'Theme labels must be nonempty.', [
|
|
96
|
+
'themes',
|
|
97
|
+
label,
|
|
98
|
+
]);
|
|
99
|
+
const metadata = theme &&
|
|
100
|
+
Object.getOwnPropertyDescriptor(theme, Token.definition)?.value;
|
|
101
|
+
if (options.themes !== undefined && !metadata)
|
|
102
|
+
fail('invalid_options', 'Expected a Theme.define or Config theme handle.', ['themes', label]);
|
|
103
|
+
const schemes = {};
|
|
104
|
+
const resolution = { schemeIndependent: true };
|
|
105
|
+
for (const scheme of ['light', 'dark']) {
|
|
106
|
+
if (independent) {
|
|
107
|
+
schemes[scheme] = independent;
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
if (scheme === 'dark' &&
|
|
111
|
+
resolution.schemeIndependent &&
|
|
112
|
+
!diagnostics.length) {
|
|
113
|
+
schemes.dark = schemes.light;
|
|
114
|
+
continue;
|
|
115
|
+
}
|
|
116
|
+
const compiled = Object.create(null);
|
|
117
|
+
for (const style of options.styles.styles) {
|
|
118
|
+
const output = {};
|
|
119
|
+
let lineHeight;
|
|
120
|
+
for (const part of sequence(style)) {
|
|
121
|
+
for (const declaration of part.declarations) {
|
|
122
|
+
const property = declaration.property;
|
|
123
|
+
const path = [label, scheme, style.name, property];
|
|
124
|
+
try {
|
|
125
|
+
const value = resolve(declaration.value, metadata, scheme, path, resolution);
|
|
126
|
+
if (property === 'lineHeight') {
|
|
127
|
+
lineHeight = value;
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
if (property === 'fontVariant') {
|
|
131
|
+
if (typeof value !== 'string')
|
|
132
|
+
fail('unsupported_value', 'Expected static font variants.', path);
|
|
133
|
+
try {
|
|
134
|
+
output.fontVariant = Values.parse({
|
|
135
|
+
fontVariant: value === 'normal' ? [] : value.trim().split(/\s+/),
|
|
136
|
+
}).fontVariant;
|
|
137
|
+
}
|
|
138
|
+
catch {
|
|
139
|
+
fail('unsupported_value', 'Font variant keywords require an explicit native equivalent.', path);
|
|
140
|
+
}
|
|
141
|
+
continue;
|
|
142
|
+
}
|
|
143
|
+
if (property === 'textShadow') {
|
|
144
|
+
const entries = shadows(value, options, path, true);
|
|
145
|
+
if (entries.length > 1)
|
|
146
|
+
fail('unsupported_value', 'Native text supports one shadow.', path);
|
|
147
|
+
const shadow = entries[0];
|
|
148
|
+
output.textShadowColor = shadow?.color ?? 'transparent';
|
|
149
|
+
output.textShadowOffset = Object.freeze({
|
|
150
|
+
width: shadow?.offsetX ?? 0,
|
|
151
|
+
height: shadow?.offsetY ?? 0,
|
|
152
|
+
});
|
|
153
|
+
output.textShadowRadius = shadow?.blurRadius ?? 0;
|
|
154
|
+
continue;
|
|
155
|
+
}
|
|
156
|
+
if (property === 'boxShadow') {
|
|
157
|
+
output.boxShadow = shadows(value, options, path);
|
|
158
|
+
continue;
|
|
159
|
+
}
|
|
160
|
+
if (property === 'transform') {
|
|
161
|
+
output.transform = transform(value, options, path);
|
|
162
|
+
continue;
|
|
163
|
+
}
|
|
164
|
+
if (property === 'transformOrigin') {
|
|
165
|
+
output.transformOrigin = origin(value, options, path);
|
|
166
|
+
continue;
|
|
167
|
+
}
|
|
168
|
+
const kind = properties[property];
|
|
169
|
+
const converted = convert(kind, value, options, path);
|
|
170
|
+
if (property === 'padding' || property === 'margin') {
|
|
171
|
+
const values = typeof value === 'string'
|
|
172
|
+
? value.trim().split(/\s+/)
|
|
173
|
+
: [value];
|
|
174
|
+
const [top, right = top, bottom = top, left = right] = values.map((value) => length(value, options, property === 'margin', path));
|
|
175
|
+
output[`${property}Top`] = top;
|
|
176
|
+
output[`${property}Right`] = right;
|
|
177
|
+
output[`${property}Bottom`] = bottom;
|
|
178
|
+
output[`${property}Left`] = left;
|
|
179
|
+
}
|
|
180
|
+
else if (property === 'borderColor' ||
|
|
181
|
+
property === 'borderWidth') {
|
|
182
|
+
for (const side of ['Top', 'Right', 'Bottom', 'Left'])
|
|
183
|
+
output[`border${side}${property === 'borderColor' ? 'Color' : 'Width'}`] = converted;
|
|
184
|
+
}
|
|
185
|
+
else if (property === 'borderRadius') {
|
|
186
|
+
for (const corner of [
|
|
187
|
+
'TopLeft',
|
|
188
|
+
'TopRight',
|
|
189
|
+
'BottomRight',
|
|
190
|
+
'BottomLeft',
|
|
191
|
+
])
|
|
192
|
+
output[`border${corner}Radius`] = converted;
|
|
193
|
+
}
|
|
194
|
+
else if (property === 'gap') {
|
|
195
|
+
output.columnGap = converted;
|
|
196
|
+
output.rowGap = converted;
|
|
197
|
+
}
|
|
198
|
+
else
|
|
199
|
+
output[property] = converted;
|
|
200
|
+
}
|
|
201
|
+
catch (error) {
|
|
202
|
+
if (!(error instanceof CompileError))
|
|
203
|
+
throw error;
|
|
204
|
+
diagnostics.push(...error.diagnostics);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
for (const branch of ['native', options.platform]) {
|
|
208
|
+
if (!branch || !part.targets?.[branch])
|
|
209
|
+
continue;
|
|
210
|
+
try {
|
|
211
|
+
const native = Values.parse(part.targets[branch]);
|
|
212
|
+
Object.assign(output, native);
|
|
213
|
+
if (native.lineHeight !== undefined)
|
|
214
|
+
lineHeight = undefined;
|
|
215
|
+
}
|
|
216
|
+
catch (error) {
|
|
217
|
+
if (error instanceof CompileError)
|
|
218
|
+
throw error;
|
|
219
|
+
diagnostics.push({
|
|
220
|
+
code: 'unsupported_value',
|
|
221
|
+
message: error.message,
|
|
222
|
+
path: [label, scheme, style.name, 'targets', branch],
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
if (lineHeight !== undefined) {
|
|
228
|
+
const path = [label, scheme, style.name, 'lineHeight'];
|
|
229
|
+
try {
|
|
230
|
+
if (typeof lineHeight === 'number') {
|
|
231
|
+
if (!Number.isFinite(lineHeight) ||
|
|
232
|
+
lineHeight < 0 ||
|
|
233
|
+
typeof output.fontSize !== 'number')
|
|
234
|
+
fail('unsupported_value', 'Numeric lineHeight requires an explicit fontSize in the same style.', path);
|
|
235
|
+
output.lineHeight = lineHeight * output.fontSize;
|
|
236
|
+
if (!Number.isFinite(output.lineHeight))
|
|
237
|
+
fail('unsupported_value', 'Converted lineHeight must be finite.', path);
|
|
238
|
+
}
|
|
239
|
+
else
|
|
240
|
+
output.lineHeight = length(lineHeight, options, false, path);
|
|
241
|
+
}
|
|
242
|
+
catch (error) {
|
|
243
|
+
if (!(error instanceof CompileError))
|
|
244
|
+
throw error;
|
|
245
|
+
diagnostics.push(...error.diagnostics);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
const key = JSON.stringify(Object.entries(output).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0));
|
|
249
|
+
let shared = interned.get(key);
|
|
250
|
+
if (!shared) {
|
|
251
|
+
shared = Object.freeze(output);
|
|
252
|
+
interned.set(key, shared);
|
|
253
|
+
}
|
|
254
|
+
compiled[style.name] = shared;
|
|
255
|
+
}
|
|
256
|
+
schemes[scheme] = Object.freeze(compiled);
|
|
257
|
+
if (scalar && !diagnostics.length)
|
|
258
|
+
independent = schemes[scheme];
|
|
259
|
+
}
|
|
260
|
+
tables[label] = Object.freeze(schemes);
|
|
261
|
+
}
|
|
262
|
+
if (diagnostics.length)
|
|
263
|
+
throw new CompileError(diagnostics);
|
|
264
|
+
return Object.freeze({
|
|
265
|
+
styles: Object.freeze(tables),
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
export function compose(first, second) {
|
|
269
|
+
if (!first)
|
|
270
|
+
return second;
|
|
271
|
+
if (!second)
|
|
272
|
+
return first;
|
|
273
|
+
return [first, second];
|
|
274
|
+
}
|
|
275
|
+
export function flatten(styles) {
|
|
276
|
+
if (!styles || typeof styles !== 'object')
|
|
277
|
+
return undefined;
|
|
278
|
+
if (!Array.isArray(styles))
|
|
279
|
+
return styles;
|
|
280
|
+
const result = {};
|
|
281
|
+
for (const style of styles) {
|
|
282
|
+
const flattened = flatten(style);
|
|
283
|
+
if (!flattened)
|
|
284
|
+
continue;
|
|
285
|
+
// Native flattening includes enumerable inherited declarations.
|
|
286
|
+
for (const key in flattened)
|
|
287
|
+
Object.defineProperty(result, key, {
|
|
288
|
+
configurable: true,
|
|
289
|
+
enumerable: true,
|
|
290
|
+
value: flattened[key],
|
|
291
|
+
writable: true,
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
return result;
|
|
295
|
+
}
|
|
296
|
+
export function select(styles, options) {
|
|
297
|
+
if (!styles ||
|
|
298
|
+
!options ||
|
|
299
|
+
(options.colorScheme !== 'light' && options.colorScheme !== 'dark') ||
|
|
300
|
+
!Object.hasOwn(styles, options.theme))
|
|
301
|
+
throw new SelectionError('Select an existing theme label and light or dark colorScheme.');
|
|
302
|
+
return styles[options.theme][options.colorScheme];
|
|
303
|
+
}
|
|
304
|
+
/** Rejected lookup of a precompiled native table. */
|
|
305
|
+
export class SelectionError extends Error {
|
|
306
|
+
/** Explains the invalid selection without compiling replacement styles. */
|
|
307
|
+
constructor(message) {
|
|
308
|
+
super(message);
|
|
309
|
+
}
|
|
310
|
+
/** Stable namespaced error identifier. */
|
|
311
|
+
name = 'StyleSheet.SelectionError';
|
|
312
|
+
}
|
|
313
|
+
function convert(kind, value, options, path) {
|
|
314
|
+
try {
|
|
315
|
+
return Scalar.convert(kind, value, options, path);
|
|
316
|
+
}
|
|
317
|
+
catch (error) {
|
|
318
|
+
fail('unsupported_value', error.message, path);
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
function fail(code, message, path) {
|
|
322
|
+
throw new CompileError([{ code, message, path }]);
|
|
323
|
+
}
|
|
324
|
+
function length(value, options, signed, path) {
|
|
325
|
+
try {
|
|
326
|
+
return Scalar.length(value, options, signed, path);
|
|
327
|
+
}
|
|
328
|
+
catch (error) {
|
|
329
|
+
fail('unsupported_value', error.message, path);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
function origin(value, options, path) {
|
|
333
|
+
const parts = String(value).trim().toLowerCase().split(/\s+/);
|
|
334
|
+
if (!parts[0] || parts.length > 3)
|
|
335
|
+
fail('unsupported_value', 'Expected one to three transform-origin values.', path);
|
|
336
|
+
let [x, y = 'center', z = '0'] = parts;
|
|
337
|
+
const horizontal = ['left', 'center', 'right'];
|
|
338
|
+
const vertical = ['top', 'center', 'bottom'];
|
|
339
|
+
if (parts.length === 1 && (x === 'top' || x === 'bottom'))
|
|
340
|
+
[x, y] = ['center', x];
|
|
341
|
+
else if (x === 'top' || x === 'bottom' || y === 'left' || y === 'right') {
|
|
342
|
+
if (!vertical.includes(x) || !horizontal.includes(y))
|
|
343
|
+
fail('unsupported_value', 'Transform-origin keywords must identify different axes.', path);
|
|
344
|
+
[x, y] = [y, x];
|
|
345
|
+
}
|
|
346
|
+
const values = [x, y].map((part, index) => {
|
|
347
|
+
const keywords = index === 0 ? horizontal : vertical;
|
|
348
|
+
const keyword = keywords.indexOf(part);
|
|
349
|
+
if (keyword !== -1)
|
|
350
|
+
return `${keyword * 50}%`;
|
|
351
|
+
if (/^[+-]?(?:\d+(?:\.\d+)?|\.\d+)%$/.test(part)) {
|
|
352
|
+
if (!Number.isFinite(Number(part.slice(0, -1))))
|
|
353
|
+
fail('unsupported_value', 'Transform-origin percentages must be finite.', path);
|
|
354
|
+
return part;
|
|
355
|
+
}
|
|
356
|
+
return length(part, options, true, path);
|
|
357
|
+
});
|
|
358
|
+
// Native declares mutable origin arrays but reads them without mutation. Compiler-owned tuples remain frozen.
|
|
359
|
+
return Object.freeze([
|
|
360
|
+
values[0],
|
|
361
|
+
values[1],
|
|
362
|
+
length(z, options, true, path),
|
|
363
|
+
]);
|
|
364
|
+
}
|
|
365
|
+
function resolve(value, metadata, scheme, path, resolution) {
|
|
366
|
+
if (typeof value === 'number' || typeof value === 'string')
|
|
367
|
+
return value;
|
|
368
|
+
if (!Token.is(value) ||
|
|
369
|
+
Object.getOwnPropertyDescriptor(value, Token.web)?.value)
|
|
370
|
+
fail('unsupported_feature', 'Web variables, expressions, and dynamic bindings are not native scalar tokens.', path);
|
|
371
|
+
const shared = metadata &&
|
|
372
|
+
(metadata.contract === value.contract ||
|
|
373
|
+
(metadata.contract[Token.identity] !== undefined &&
|
|
374
|
+
metadata.contract[Token.identity] === value.contract[Token.identity]));
|
|
375
|
+
const resolved = shared
|
|
376
|
+
? Object.hasOwn(metadata.values, value.path)
|
|
377
|
+
? metadata.values[value.path]
|
|
378
|
+
: undefined
|
|
379
|
+
: value.value;
|
|
380
|
+
if (resolved === undefined)
|
|
381
|
+
fail('unsupported_value', 'Theme is missing a live token.', path);
|
|
382
|
+
if (typeof resolved === 'object' && resolved.light !== resolved.dark)
|
|
383
|
+
resolution.schemeIndependent = false;
|
|
384
|
+
const scalar = typeof resolved === 'object' ? resolved[scheme] : resolved;
|
|
385
|
+
if (typeof scalar !== 'string' && typeof scalar !== 'number')
|
|
386
|
+
fail('unsupported_value', 'Expected a complete scalar color-scheme pair.', path);
|
|
387
|
+
return scalar;
|
|
388
|
+
}
|
|
389
|
+
function transform(value, options, path) {
|
|
390
|
+
if (typeof value !== 'string' || !value.trim())
|
|
391
|
+
fail('unsupported_value', 'Expected a static transform list.', path);
|
|
392
|
+
let remaining = value.trim();
|
|
393
|
+
const output = [];
|
|
394
|
+
if (remaining === 'none')
|
|
395
|
+
return Object.freeze(output);
|
|
396
|
+
while (remaining) {
|
|
397
|
+
const match = /^([a-z][a-z0-9]*)\(([^()]*)\)/i.exec(remaining);
|
|
398
|
+
if (!match)
|
|
399
|
+
fail('unsupported_value', 'Expected literal transform arguments.', path);
|
|
400
|
+
const name = match[1].toLowerCase();
|
|
401
|
+
const args = match[2].split(',').map((argument) => argument.trim());
|
|
402
|
+
const limit = name === 'matrix'
|
|
403
|
+
? 6
|
|
404
|
+
: name === 'matrix3d'
|
|
405
|
+
? 16
|
|
406
|
+
: name === 'translate' || name === 'scale'
|
|
407
|
+
? 2
|
|
408
|
+
: 1;
|
|
409
|
+
if (!args[0] || args.length > limit || args.some((arg) => !arg))
|
|
410
|
+
fail('unsupported_value', 'Invalid transform argument count.', path);
|
|
411
|
+
const argument = args[0];
|
|
412
|
+
if (name === 'matrix' || name === 'matrix3d') {
|
|
413
|
+
if (args.length !== limit ||
|
|
414
|
+
args.some((arg) => !/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i.test(arg) ||
|
|
415
|
+
!Number.isFinite(Number(arg))))
|
|
416
|
+
fail('unsupported_value', 'Matrices require six or sixteen finite numbers.', path);
|
|
417
|
+
const values = args.map(Number);
|
|
418
|
+
const matrix = name === 'matrix'
|
|
419
|
+
? [
|
|
420
|
+
values[0],
|
|
421
|
+
values[1],
|
|
422
|
+
0,
|
|
423
|
+
0,
|
|
424
|
+
values[2],
|
|
425
|
+
values[3],
|
|
426
|
+
0,
|
|
427
|
+
0,
|
|
428
|
+
0,
|
|
429
|
+
0,
|
|
430
|
+
1,
|
|
431
|
+
0,
|
|
432
|
+
values[4],
|
|
433
|
+
values[5],
|
|
434
|
+
0,
|
|
435
|
+
1,
|
|
436
|
+
]
|
|
437
|
+
: values;
|
|
438
|
+
const px = options.units?.px ?? 1;
|
|
439
|
+
// Conjugate the matrix by the length scale, including projective components.
|
|
440
|
+
for (const index of [12, 13, 14])
|
|
441
|
+
matrix[index] = matrix[index] * px;
|
|
442
|
+
for (const index of [3, 7, 11])
|
|
443
|
+
matrix[index] = matrix[index] / px;
|
|
444
|
+
if (!matrix.every(Number.isFinite))
|
|
445
|
+
fail('unsupported_value', 'Converted matrix values must be finite.', path);
|
|
446
|
+
Object.freeze(matrix);
|
|
447
|
+
output.push({ matrix });
|
|
448
|
+
}
|
|
449
|
+
else if (name === 'translate' ||
|
|
450
|
+
name === 'translatex' ||
|
|
451
|
+
name === 'translatey') {
|
|
452
|
+
const values = args.map((arg) => {
|
|
453
|
+
if (/^[+-]?(?:\d+(?:\.\d+)?|\.\d+)%$/.test(arg)) {
|
|
454
|
+
if (!Number.isFinite(Number(arg.slice(0, -1))))
|
|
455
|
+
fail('unsupported_value', 'Transform percentages must be finite.', path);
|
|
456
|
+
return arg;
|
|
457
|
+
}
|
|
458
|
+
return length(arg, options, true, path);
|
|
459
|
+
});
|
|
460
|
+
if (name === 'translatey')
|
|
461
|
+
output.push({ translateY: values[0] });
|
|
462
|
+
else {
|
|
463
|
+
output.push({ translateX: values[0] });
|
|
464
|
+
if (name === 'translate')
|
|
465
|
+
output.push({ translateY: values[1] ?? 0 });
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
else if (name === 'scale' || name === 'scalex' || name === 'scaley') {
|
|
469
|
+
const values = args.map((arg) => {
|
|
470
|
+
if (!/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i.test(arg) ||
|
|
471
|
+
!Number.isFinite(Number(arg)))
|
|
472
|
+
fail('unsupported_value', 'Scale requires finite numbers.', path);
|
|
473
|
+
return Number(arg);
|
|
474
|
+
});
|
|
475
|
+
if (name === 'scale' && values.length === 1)
|
|
476
|
+
output.push({ scale: values[0] });
|
|
477
|
+
else if (name === 'scaley')
|
|
478
|
+
output.push({ scaleY: values[0] });
|
|
479
|
+
else {
|
|
480
|
+
output.push({ scaleX: values[0] });
|
|
481
|
+
if (name === 'scale')
|
|
482
|
+
output.push({ scaleY: values[1] });
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
else if (['rotate', 'rotatex', 'rotatey', 'rotatez', 'skewx', 'skewy'].includes(name)) {
|
|
486
|
+
const angle = /^([+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?)(deg|grad|rad|turn)$/i.exec(argument);
|
|
487
|
+
if (!angle && argument !== '0')
|
|
488
|
+
fail('unsupported_value', 'Rotation and skew require literal angles.', path);
|
|
489
|
+
const unit = angle?.[2]?.toLowerCase() ?? 'deg';
|
|
490
|
+
const number = Number(angle?.[1] ?? 0) *
|
|
491
|
+
(unit === 'turn' ? 360 : unit === 'grad' ? 0.9 : 1);
|
|
492
|
+
if (!Number.isFinite(number))
|
|
493
|
+
fail('unsupported_value', 'Transform angles must be finite.', path);
|
|
494
|
+
const converted = `${number}${unit === 'rad' ? 'rad' : 'deg'}`;
|
|
495
|
+
const property = name === 'rotate'
|
|
496
|
+
? name
|
|
497
|
+
: `${name.slice(0, -1)}${name.at(-1).toUpperCase()}`;
|
|
498
|
+
// Native transform entries have one key. Normalize CSS's case-insensitive function names.
|
|
499
|
+
output.push({ [property]: converted });
|
|
500
|
+
}
|
|
501
|
+
else if (name === 'perspective') {
|
|
502
|
+
const distance = length(argument, options, false, path);
|
|
503
|
+
// CSS clamps perspective distances below one CSS pixel before unit conversion.
|
|
504
|
+
output.push({ perspective: Math.max(distance, options.units?.px ?? 1) });
|
|
505
|
+
}
|
|
506
|
+
else
|
|
507
|
+
fail('unsupported_feature', 'Transform function is outside the native subset.', [...path, match[1]]);
|
|
508
|
+
remaining = remaining.slice(match[0].length).trimStart();
|
|
509
|
+
}
|
|
510
|
+
if (output.length > 1 && output.some((entry) => 'matrix' in entry)) {
|
|
511
|
+
let combined = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
|
|
512
|
+
for (const entry of output) {
|
|
513
|
+
const matrix = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
|
|
514
|
+
const [key, value] = Object.entries(entry)[0];
|
|
515
|
+
if (key === 'matrix')
|
|
516
|
+
matrix.splice(0, 16, ...value);
|
|
517
|
+
else if (key.startsWith('translate')) {
|
|
518
|
+
if (typeof value !== 'number')
|
|
519
|
+
fail('unsupported_value', 'Matrix composition requires absolute translations.', path);
|
|
520
|
+
matrix[key === 'translateX' ? 12 : 13] = value;
|
|
521
|
+
}
|
|
522
|
+
else if (key === 'perspective')
|
|
523
|
+
matrix[11] = -1 / value;
|
|
524
|
+
else if (key.startsWith('scale')) {
|
|
525
|
+
if (key !== 'scaleY')
|
|
526
|
+
matrix[0] = value;
|
|
527
|
+
if (key !== 'scaleX')
|
|
528
|
+
matrix[5] = value;
|
|
529
|
+
}
|
|
530
|
+
else {
|
|
531
|
+
const angle = Number.parseFloat(value) *
|
|
532
|
+
(value.endsWith('rad') ? 1 : Math.PI / 180);
|
|
533
|
+
if (key === 'skewX')
|
|
534
|
+
matrix[4] = Math.tan(angle);
|
|
535
|
+
else if (key === 'skewY')
|
|
536
|
+
matrix[1] = Math.tan(angle);
|
|
537
|
+
else {
|
|
538
|
+
const [a, b] = key === 'rotateX' ? [1, 2] : key === 'rotateY' ? [2, 0] : [0, 1];
|
|
539
|
+
matrix[a * 4 + a] = Math.cos(angle);
|
|
540
|
+
matrix[b * 4 + b] = Math.cos(angle);
|
|
541
|
+
matrix[a * 4 + b] = Math.sin(angle);
|
|
542
|
+
matrix[b * 4 + a] = -Math.sin(angle);
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
combined = combined.map((_, index) => {
|
|
546
|
+
const row = index % 4;
|
|
547
|
+
const column = Math.floor(index / 4);
|
|
548
|
+
return [0, 1, 2, 3].reduce((sum, k) => sum + combined[k * 4 + row] * matrix[column * 4 + k], 0);
|
|
549
|
+
});
|
|
550
|
+
}
|
|
551
|
+
if (!combined.every(Number.isFinite))
|
|
552
|
+
fail('unsupported_value', 'Converted matrix values must be finite.', path);
|
|
553
|
+
Object.freeze(combined);
|
|
554
|
+
// React Native requires a matrix to be the only transform entry.
|
|
555
|
+
return Object.freeze([Object.freeze({ matrix: combined })]);
|
|
556
|
+
}
|
|
557
|
+
return Object.freeze(output.map((entry) => Object.freeze(entry)));
|
|
558
|
+
}
|
|
559
|
+
function shadows(value, options, path, text = false) {
|
|
560
|
+
if (value === 'none')
|
|
561
|
+
return Object.freeze([]);
|
|
562
|
+
if (typeof value !== 'string')
|
|
563
|
+
fail('unsupported_value', 'Expected a static shadow list.', path);
|
|
564
|
+
return Object.freeze(value.split(/,(?![^()]*\))/).map((shadow) => {
|
|
565
|
+
const parts = shadow.trim().match(/[a-z]+\([^()]*\)|[^\s]+/gi) ?? [];
|
|
566
|
+
const lengths = [];
|
|
567
|
+
let color;
|
|
568
|
+
let inset = false;
|
|
569
|
+
for (const part of parts) {
|
|
570
|
+
if (part === 'inset' && !inset) {
|
|
571
|
+
inset = true;
|
|
572
|
+
continue;
|
|
573
|
+
}
|
|
574
|
+
const parsed = Color.parse(part);
|
|
575
|
+
if (parsed !== undefined && color === undefined) {
|
|
576
|
+
color = parsed;
|
|
577
|
+
continue;
|
|
578
|
+
}
|
|
579
|
+
lengths.push(length(part, options, true, path));
|
|
580
|
+
}
|
|
581
|
+
if (lengths.length < 2 ||
|
|
582
|
+
lengths.length > (text ? 3 : 4) ||
|
|
583
|
+
(text && inset) ||
|
|
584
|
+
(lengths[2] ?? 0) < 0 ||
|
|
585
|
+
color === undefined)
|
|
586
|
+
fail('unsupported_value', 'Shadows require two to four lengths, a nonnegative blur, and an explicit absolute color.', path);
|
|
587
|
+
return Object.freeze({
|
|
588
|
+
offsetX: lengths[0],
|
|
589
|
+
offsetY: lengths[1],
|
|
590
|
+
blurRadius: lengths[2] ?? 0,
|
|
591
|
+
spreadDistance: lengths[3] ?? 0,
|
|
592
|
+
color,
|
|
593
|
+
inset,
|
|
594
|
+
});
|
|
595
|
+
}));
|
|
596
|
+
}
|
|
597
|
+
function sequence(style) {
|
|
598
|
+
const parts = [style];
|
|
599
|
+
for (const rule of style.rules ?? []) {
|
|
600
|
+
if (rule.condition !== undefined)
|
|
601
|
+
fail('unsupported_feature', 'Selectors, queries, and nested rules are not supported on native.', [style.name]);
|
|
602
|
+
parts.push(...sequence(rule.style));
|
|
603
|
+
}
|
|
604
|
+
return parts;
|
|
605
|
+
}
|
|
606
|
+
//# sourceMappingURL=StyleSheet.js.map
|