@tamagui/style-grammar 0.0.0-bootstrap.0 → 3.0.0-beta.643.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +33 -1
- package/dist/cjs/backgroundFamily.cjs +176 -0
- package/dist/cjs/backgroundFamily.native.cjs +195 -0
- package/dist/cjs/backgroundFamily.native.js +197 -0
- package/dist/cjs/backgroundFamily.native.js.map +1 -0
- package/dist/cjs/borderFamily.cjs +169 -0
- package/dist/cjs/borderFamily.native.cjs +247 -0
- package/dist/cjs/borderFamily.native.js +249 -0
- package/dist/cjs/borderFamily.native.js.map +1 -0
- package/dist/cjs/candidate.cjs +608 -0
- package/dist/cjs/candidate.native.cjs +821 -0
- package/dist/cjs/candidate.native.js +823 -0
- package/dist/cjs/candidate.native.js.map +1 -0
- package/dist/cjs/candidateTarget.cjs +50 -0
- package/dist/cjs/candidateTarget.native.cjs +88 -0
- package/dist/cjs/candidateTarget.native.js +90 -0
- package/dist/cjs/candidateTarget.native.js.map +1 -0
- package/dist/cjs/clauseCapability.cjs +130 -0
- package/dist/cjs/clauseCapability.native.cjs +152 -0
- package/dist/cjs/clauseCapability.native.js +154 -0
- package/dist/cjs/clauseCapability.native.js.map +1 -0
- package/dist/cjs/clausePrecedence.cjs +153 -0
- package/dist/cjs/clausePrecedence.native.cjs +204 -0
- package/dist/cjs/clausePrecedence.native.js +206 -0
- package/dist/cjs/clausePrecedence.native.js.map +1 -0
- package/dist/cjs/clauseSources.cjs +47 -0
- package/dist/cjs/clauseSources.native.cjs +49 -0
- package/dist/cjs/clauseSources.native.js +51 -0
- package/dist/cjs/clauseSources.native.js.map +1 -0
- package/dist/cjs/config.cjs +130 -0
- package/dist/cjs/config.native.cjs +185 -0
- package/dist/cjs/config.native.js +187 -0
- package/dist/cjs/config.native.js.map +1 -0
- package/dist/cjs/evaluateProgram.cjs +65 -0
- package/dist/cjs/evaluateProgram.native.cjs +70 -0
- package/dist/cjs/evaluateProgram.native.js +72 -0
- package/dist/cjs/evaluateProgram.native.js.map +1 -0
- package/dist/cjs/fontShorthand.cjs +207 -0
- package/dist/cjs/fontShorthand.native.cjs +260 -0
- package/dist/cjs/fontShorthand.native.js +262 -0
- package/dist/cjs/fontShorthand.native.js.map +1 -0
- package/dist/cjs/geometricShorthand.cjs +122 -0
- package/dist/cjs/geometricShorthand.native.cjs +128 -0
- package/dist/cjs/geometricShorthand.native.js +130 -0
- package/dist/cjs/geometricShorthand.native.js.map +1 -0
- package/dist/cjs/index.cjs +19 -0
- package/dist/cjs/index.native.cjs +21 -0
- package/dist/cjs/index.native.js +23 -0
- package/dist/cjs/index.native.js.map +1 -0
- package/dist/cjs/lowerProgram.cjs +205 -0
- package/dist/cjs/lowerProgram.native.cjs +257 -0
- package/dist/cjs/lowerProgram.native.js +259 -0
- package/dist/cjs/lowerProgram.native.js.map +1 -0
- package/dist/cjs/mergeFlatValues.cjs +50 -0
- package/dist/cjs/mergeFlatValues.native.cjs +71 -0
- package/dist/cjs/mergeFlatValues.native.js +73 -0
- package/dist/cjs/mergeFlatValues.native.js.map +1 -0
- package/dist/cjs/modifierRegistry.cjs +246 -0
- package/dist/cjs/modifierRegistry.native.cjs +426 -0
- package/dist/cjs/modifierRegistry.native.js +428 -0
- package/dist/cjs/modifierRegistry.native.js.map +1 -0
- package/dist/cjs/payloadShape.cjs +69 -0
- package/dist/cjs/payloadShape.native.cjs +71 -0
- package/dist/cjs/payloadShape.native.js +73 -0
- package/dist/cjs/payloadShape.native.js.map +1 -0
- package/dist/cjs/programEligibility.cjs +46 -0
- package/dist/cjs/programEligibility.native.cjs +48 -0
- package/dist/cjs/programEligibility.native.js +50 -0
- package/dist/cjs/programEligibility.native.js.map +1 -0
- package/dist/cjs/programHash.cjs +86 -0
- package/dist/cjs/programHash.native.cjs +106 -0
- package/dist/cjs/programHash.native.js +108 -0
- package/dist/cjs/programHash.native.js.map +1 -0
- package/dist/cjs/programs.cjs +128 -0
- package/dist/cjs/programs.native.cjs +220 -0
- package/dist/cjs/programs.native.js +222 -0
- package/dist/cjs/programs.native.js.map +1 -0
- package/dist/cjs/registry.cjs +629 -0
- package/dist/cjs/registry.native.cjs +635 -0
- package/dist/cjs/registry.native.js +637 -0
- package/dist/cjs/registry.native.js.map +1 -0
- package/dist/cjs/resolvePayload.cjs +296 -0
- package/dist/cjs/resolvePayload.native.cjs +302 -0
- package/dist/cjs/resolvePayload.native.js +304 -0
- package/dist/cjs/resolvePayload.native.js.map +1 -0
- package/dist/cjs/runtime.cjs +50 -0
- package/dist/cjs/runtime.native.cjs +52 -0
- package/dist/cjs/runtime.native.js +54 -0
- package/dist/cjs/runtime.native.js.map +1 -0
- package/dist/cjs/safeAreaVariables.cjs +42 -0
- package/dist/cjs/safeAreaVariables.native.cjs +44 -0
- package/dist/cjs/safeAreaVariables.native.js +46 -0
- package/dist/cjs/safeAreaVariables.native.js.map +1 -0
- package/dist/cjs/scanFlatValue.cjs +181 -0
- package/dist/cjs/scanFlatValue.native.cjs +183 -0
- package/dist/cjs/scanFlatValue.native.js +185 -0
- package/dist/cjs/scanFlatValue.native.js.map +1 -0
- package/dist/cjs/serializePayload.cjs +149 -0
- package/dist/cjs/serializePayload.native.cjs +187 -0
- package/dist/cjs/serializePayload.native.js +189 -0
- package/dist/cjs/serializePayload.native.js.map +1 -0
- package/dist/cjs/stateModifiers.cjs +43 -0
- package/dist/cjs/stateModifiers.native.cjs +45 -0
- package/dist/cjs/stateModifiers.native.js +47 -0
- package/dist/cjs/stateModifiers.native.js.map +1 -0
- package/dist/cjs/states.cjs +97 -0
- package/dist/cjs/states.native.cjs +131 -0
- package/dist/cjs/states.native.js +133 -0
- package/dist/cjs/states.native.js.map +1 -0
- package/dist/cjs/table.cjs +54 -0
- package/dist/cjs/table.native.cjs +135 -0
- package/dist/cjs/table.native.js +137 -0
- package/dist/cjs/table.native.js.map +1 -0
- package/dist/cjs/textDecorationFamily.cjs +129 -0
- package/dist/cjs/textDecorationFamily.native.cjs +199 -0
- package/dist/cjs/textDecorationFamily.native.js +201 -0
- package/dist/cjs/textDecorationFamily.native.js.map +1 -0
- package/dist/cjs/tooling.cjs +26 -0
- package/dist/cjs/tooling.native.cjs +28 -0
- package/dist/cjs/tooling.native.js +30 -0
- package/dist/cjs/tooling.native.js.map +1 -0
- package/dist/cjs/toolingAnnotations.cjs +105 -0
- package/dist/cjs/toolingAnnotations.native.cjs +133 -0
- package/dist/cjs/toolingAnnotations.native.js +135 -0
- package/dist/cjs/toolingAnnotations.native.js.map +1 -0
- package/dist/cjs/toolingDiagnostics.cjs +459 -0
- package/dist/cjs/toolingDiagnostics.native.cjs +788 -0
- package/dist/cjs/toolingDiagnostics.native.js +790 -0
- package/dist/cjs/toolingDiagnostics.native.js.map +1 -0
- package/dist/cjs/toolingRegistry.cjs +159 -0
- package/dist/cjs/toolingRegistry.native.cjs +164 -0
- package/dist/cjs/toolingRegistry.native.js +166 -0
- package/dist/cjs/toolingRegistry.native.js.map +1 -0
- package/dist/cjs/transformFamily.cjs +425 -0
- package/dist/cjs/transformFamily.native.cjs +517 -0
- package/dist/cjs/transformFamily.native.js +519 -0
- package/dist/cjs/transformFamily.native.js.map +1 -0
- package/dist/cjs/transition.cjs +459 -0
- package/dist/cjs/transition.native.cjs +499 -0
- package/dist/cjs/transition.native.js +501 -0
- package/dist/cjs/transition.native.js.map +1 -0
- package/dist/cjs/transitionAlign.cjs +115 -0
- package/dist/cjs/transitionAlign.native.cjs +154 -0
- package/dist/cjs/transitionAlign.native.js +156 -0
- package/dist/cjs/transitionAlign.native.js.map +1 -0
- package/dist/cjs/transitionLegacy.cjs +217 -0
- package/dist/cjs/transitionLegacy.native.cjs +260 -0
- package/dist/cjs/transitionLegacy.native.js +262 -0
- package/dist/cjs/transitionLegacy.native.js.map +1 -0
- package/dist/cjs/transitionNative.cjs +281 -0
- package/dist/cjs/transitionNative.native.cjs +285 -0
- package/dist/cjs/transitionNative.native.js +287 -0
- package/dist/cjs/transitionNative.native.js.map +1 -0
- package/dist/cjs/unitlessNumbers.cjs +86 -0
- package/dist/cjs/unitlessNumbers.native.cjs +106 -0
- package/dist/cjs/unitlessNumbers.native.js +108 -0
- package/dist/cjs/unitlessNumbers.native.js.map +1 -0
- package/dist/cjs/v6ThemeNames.cjs +47 -0
- package/dist/cjs/v6ThemeNames.native.cjs +53 -0
- package/dist/cjs/v6ThemeNames.native.js +55 -0
- package/dist/cjs/v6ThemeNames.native.js.map +1 -0
- package/dist/cjs/valueParser.cjs +148 -0
- package/dist/cjs/valueParser.native.cjs +150 -0
- package/dist/cjs/valueParser.native.js +152 -0
- package/dist/cjs/valueParser.native.js.map +1 -0
- package/dist/cjs/valueTypes.cjs +38 -0
- package/dist/cjs/valueTypes.native.cjs +40 -0
- package/dist/cjs/valueTypes.native.js +42 -0
- package/dist/cjs/valueTypes.native.js.map +1 -0
- package/dist/esm/backgroundFamily.mjs +150 -0
- package/dist/esm/backgroundFamily.mjs.map +1 -0
- package/dist/esm/backgroundFamily.native.js +167 -0
- package/dist/esm/backgroundFamily.native.js.map +1 -0
- package/dist/esm/borderFamily.mjs +146 -0
- package/dist/esm/borderFamily.mjs.map +1 -0
- package/dist/esm/borderFamily.native.js +222 -0
- package/dist/esm/borderFamily.native.js.map +1 -0
- package/dist/esm/candidate.mjs +581 -0
- package/dist/esm/candidate.mjs.map +1 -0
- package/dist/esm/candidate.native.js +792 -0
- package/dist/esm/candidate.native.js.map +1 -0
- package/dist/esm/candidateTarget.mjs +29 -0
- package/dist/esm/candidateTarget.mjs.map +1 -0
- package/dist/esm/candidateTarget.native.js +65 -0
- package/dist/esm/candidateTarget.native.js.map +1 -0
- package/dist/esm/clauseCapability.mjs +107 -0
- package/dist/esm/clauseCapability.mjs.map +1 -0
- package/dist/esm/clauseCapability.native.js +127 -0
- package/dist/esm/clauseCapability.native.js.map +1 -0
- package/dist/esm/clausePrecedence.mjs +121 -0
- package/dist/esm/clausePrecedence.mjs.map +1 -0
- package/dist/esm/clausePrecedence.native.js +170 -0
- package/dist/esm/clausePrecedence.native.js.map +1 -0
- package/dist/esm/clauseSources.mjs +23 -0
- package/dist/esm/clauseSources.mjs.map +1 -0
- package/dist/esm/clauseSources.native.js +23 -0
- package/dist/esm/clauseSources.native.js.map +1 -0
- package/dist/esm/config.mjs +103 -0
- package/dist/esm/config.mjs.map +1 -0
- package/dist/esm/config.native.js +156 -0
- package/dist/esm/config.native.js.map +1 -0
- package/dist/esm/evaluateProgram.mjs +45 -0
- package/dist/esm/evaluateProgram.mjs.map +1 -0
- package/dist/esm/evaluateProgram.native.js +48 -0
- package/dist/esm/evaluateProgram.native.js.map +1 -0
- package/dist/esm/fontShorthand.mjs +184 -0
- package/dist/esm/fontShorthand.mjs.map +1 -0
- package/dist/esm/fontShorthand.native.js +235 -0
- package/dist/esm/fontShorthand.native.js.map +1 -0
- package/dist/esm/geometricShorthand.mjs +102 -0
- package/dist/esm/geometricShorthand.mjs.map +1 -0
- package/dist/esm/geometricShorthand.native.js +106 -0
- package/dist/esm/geometricShorthand.native.js.map +1 -0
- package/dist/esm/index.mjs +1 -0
- package/dist/esm/index.native.js +1 -0
- package/dist/esm/lowerProgram.mjs +182 -0
- package/dist/esm/lowerProgram.mjs.map +1 -0
- package/dist/esm/lowerProgram.native.js +232 -0
- package/dist/esm/lowerProgram.native.js.map +1 -0
- package/dist/esm/mergeFlatValues.mjs +27 -0
- package/dist/esm/mergeFlatValues.mjs.map +1 -0
- package/dist/esm/mergeFlatValues.native.js +46 -0
- package/dist/esm/mergeFlatValues.native.js.map +1 -0
- package/dist/esm/modifierRegistry.mjs +219 -0
- package/dist/esm/modifierRegistry.mjs.map +1 -0
- package/dist/esm/modifierRegistry.native.js +397 -0
- package/dist/esm/modifierRegistry.native.js.map +1 -0
- package/dist/esm/payloadShape.mjs +49 -0
- package/dist/esm/payloadShape.mjs.map +1 -0
- package/dist/esm/payloadShape.native.js +49 -0
- package/dist/esm/payloadShape.native.js.map +1 -0
- package/dist/esm/programEligibility.mjs +22 -0
- package/dist/esm/programEligibility.mjs.map +1 -0
- package/dist/esm/programEligibility.native.js +22 -0
- package/dist/esm/programEligibility.native.js.map +1 -0
- package/dist/esm/programHash.mjs +62 -0
- package/dist/esm/programHash.mjs.map +1 -0
- package/dist/esm/programHash.native.js +80 -0
- package/dist/esm/programHash.native.js.map +1 -0
- package/dist/esm/programs.mjs +103 -0
- package/dist/esm/programs.mjs.map +1 -0
- package/dist/esm/programs.native.js +193 -0
- package/dist/esm/programs.native.js.map +1 -0
- package/dist/esm/registry.mjs +595 -0
- package/dist/esm/registry.mjs.map +1 -0
- package/dist/esm/registry.native.js +599 -0
- package/dist/esm/registry.native.js.map +1 -0
- package/dist/esm/resolvePayload.mjs +273 -0
- package/dist/esm/resolvePayload.mjs.map +1 -0
- package/dist/esm/resolvePayload.native.js +277 -0
- package/dist/esm/resolvePayload.native.js.map +1 -0
- package/dist/esm/runtime.mjs +63 -0
- package/dist/esm/runtime.native.js +63 -0
- package/dist/esm/safeAreaVariables.mjs +18 -0
- package/dist/esm/safeAreaVariables.mjs.map +1 -0
- package/dist/esm/safeAreaVariables.native.js +18 -0
- package/dist/esm/safeAreaVariables.native.js.map +1 -0
- package/dist/esm/scanFlatValue.mjs +160 -0
- package/dist/esm/scanFlatValue.mjs.map +1 -0
- package/dist/esm/scanFlatValue.native.js +160 -0
- package/dist/esm/scanFlatValue.native.js.map +1 -0
- package/dist/esm/serializePayload.mjs +125 -0
- package/dist/esm/serializePayload.mjs.map +1 -0
- package/dist/esm/serializePayload.native.js +161 -0
- package/dist/esm/serializePayload.native.js.map +1 -0
- package/dist/esm/stateModifiers.mjs +19 -0
- package/dist/esm/stateModifiers.mjs.map +1 -0
- package/dist/esm/stateModifiers.native.js +19 -0
- package/dist/esm/stateModifiers.native.js.map +1 -0
- package/dist/esm/states.mjs +69 -0
- package/dist/esm/states.mjs.map +1 -0
- package/dist/esm/states.native.js +101 -0
- package/dist/esm/states.native.js.map +1 -0
- package/dist/esm/table.mjs +31 -0
- package/dist/esm/table.mjs.map +1 -0
- package/dist/esm/table.native.js +110 -0
- package/dist/esm/table.native.js.map +1 -0
- package/dist/esm/textDecorationFamily.mjs +106 -0
- package/dist/esm/textDecorationFamily.mjs.map +1 -0
- package/dist/esm/textDecorationFamily.native.js +174 -0
- package/dist/esm/textDecorationFamily.native.js.map +1 -0
- package/dist/esm/tooling.mjs +15 -0
- package/dist/esm/tooling.native.js +15 -0
- package/dist/esm/toolingAnnotations.mjs +85 -0
- package/dist/esm/toolingAnnotations.mjs.map +1 -0
- package/dist/esm/toolingAnnotations.native.js +111 -0
- package/dist/esm/toolingAnnotations.native.js.map +1 -0
- package/dist/esm/toolingDiagnostics.mjs +428 -0
- package/dist/esm/toolingDiagnostics.mjs.map +1 -0
- package/dist/esm/toolingDiagnostics.native.js +755 -0
- package/dist/esm/toolingDiagnostics.native.js.map +1 -0
- package/dist/esm/toolingRegistry.mjs +135 -0
- package/dist/esm/toolingRegistry.mjs.map +1 -0
- package/dist/esm/toolingRegistry.native.js +138 -0
- package/dist/esm/toolingRegistry.native.js.map +1 -0
- package/dist/esm/transformFamily.mjs +392 -0
- package/dist/esm/transformFamily.mjs.map +1 -0
- package/dist/esm/transformFamily.native.js +482 -0
- package/dist/esm/transformFamily.native.js.map +1 -0
- package/dist/esm/transition.mjs +434 -0
- package/dist/esm/transition.mjs.map +1 -0
- package/dist/esm/transition.native.js +472 -0
- package/dist/esm/transition.native.js.map +1 -0
- package/dist/esm/transitionAlign.mjs +95 -0
- package/dist/esm/transitionAlign.mjs.map +1 -0
- package/dist/esm/transitionAlign.native.js +132 -0
- package/dist/esm/transitionAlign.native.js.map +1 -0
- package/dist/esm/transitionLegacy.mjs +197 -0
- package/dist/esm/transitionLegacy.mjs.map +1 -0
- package/dist/esm/transitionLegacy.native.js +238 -0
- package/dist/esm/transitionLegacy.native.js.map +1 -0
- package/dist/esm/transitionNative.mjs +257 -0
- package/dist/esm/transitionNative.mjs.map +1 -0
- package/dist/esm/transitionNative.native.js +259 -0
- package/dist/esm/transitionNative.native.js.map +1 -0
- package/dist/esm/unitlessNumbers.mjs +65 -0
- package/dist/esm/unitlessNumbers.mjs.map +1 -0
- package/dist/esm/unitlessNumbers.native.js +83 -0
- package/dist/esm/unitlessNumbers.native.js.map +1 -0
- package/dist/esm/v6ThemeNames.mjs +23 -0
- package/dist/esm/v6ThemeNames.mjs.map +1 -0
- package/dist/esm/v6ThemeNames.native.js +27 -0
- package/dist/esm/v6ThemeNames.native.js.map +1 -0
- package/dist/esm/valueParser.mjs +125 -0
- package/dist/esm/valueParser.mjs.map +1 -0
- package/dist/esm/valueParser.native.js +125 -0
- package/dist/esm/valueParser.native.js.map +1 -0
- package/dist/esm/valueTypes.mjs +14 -0
- package/dist/esm/valueTypes.mjs.map +1 -0
- package/dist/esm/valueTypes.native.js +14 -0
- package/dist/esm/valueTypes.native.js.map +1 -0
- package/package.json +98 -4
- package/src/backgroundFamily.ts +182 -0
- package/src/borderFamily.ts +172 -0
- package/src/candidate.ts +691 -0
- package/src/candidateTarget.ts +67 -0
- package/src/clauseCapability.ts +209 -0
- package/src/clausePrecedence.ts +198 -0
- package/src/clauseSources.ts +29 -0
- package/src/config.ts +169 -0
- package/src/evaluateProgram.ts +91 -0
- package/src/fontShorthand.ts +177 -0
- package/src/geometricShorthand.ts +105 -0
- package/src/index.ts +1 -0
- package/src/lowerProgram.ts +398 -0
- package/src/modifierRegistry.ts +340 -0
- package/src/payloadShape.ts +92 -0
- package/src/programEligibility.ts +46 -0
- package/src/programHash.ts +128 -0
- package/src/programs.ts +95 -0
- package/src/registry.ts +367 -0
- package/src/resolvePayload.ts +480 -0
- package/src/runtime.ts +32 -0
- package/src/safeAreaVariables.ts +19 -0
- package/src/scanFlatValue.ts +327 -0
- package/src/serializePayload.ts +199 -0
- package/src/stateModifiers.ts +36 -0
- package/src/states.ts +128 -0
- package/src/table.ts +47 -0
- package/src/textDecorationFamily.ts +119 -0
- package/src/tooling.ts +8 -0
- package/src/toolingAnnotations.ts +151 -0
- package/src/toolingDiagnostics.ts +735 -0
- package/src/toolingRegistry.ts +130 -0
- package/src/transformFamily.ts +590 -0
- package/src/transition.ts +553 -0
- package/src/transitionAlign.ts +165 -0
- package/src/transitionLegacy.ts +237 -0
- package/src/transitionNative.ts +357 -0
- package/src/unitlessNumbers.ts +61 -0
- package/src/v6ThemeNames.ts +40 -0
- package/src/valueParser.ts +193 -0
- package/src/valueTypes.ts +136 -0
- package/types/backgroundFamily.d.ts +17 -0
- package/types/backgroundFamily.d.ts.map +11 -0
- package/types/borderFamily.d.ts +23 -0
- package/types/borderFamily.d.ts.map +11 -0
- package/types/candidate.d.ts +52 -0
- package/types/candidate.d.ts.map +11 -0
- package/types/candidateTarget.d.ts +32 -0
- package/types/candidateTarget.d.ts.map +11 -0
- package/types/clauseCapability.d.ts +69 -0
- package/types/clauseCapability.d.ts.map +11 -0
- package/types/clausePrecedence.d.ts +30 -0
- package/types/clausePrecedence.d.ts.map +11 -0
- package/types/clauseSources.d.ts +12 -0
- package/types/clauseSources.d.ts.map +11 -0
- package/types/config.d.ts +44 -0
- package/types/config.d.ts.map +11 -0
- package/types/evaluateProgram.d.ts +27 -0
- package/types/evaluateProgram.d.ts.map +11 -0
- package/types/fontShorthand.d.ts +25 -0
- package/types/fontShorthand.d.ts.map +11 -0
- package/types/geometricShorthand.d.ts +21 -0
- package/types/geometricShorthand.d.ts.map +11 -0
- package/types/index.d.ts +3 -0
- package/types/index.d.ts.map +11 -0
- package/types/lowerProgram.d.ts +73 -0
- package/types/lowerProgram.d.ts.map +11 -0
- package/types/mergeFlatValues.d.ts +14 -0
- package/types/mergeFlatValues.d.ts.map +11 -0
- package/types/modifierRegistry.d.ts +70 -0
- package/types/modifierRegistry.d.ts.map +11 -0
- package/types/payloadShape.d.ts +15 -0
- package/types/payloadShape.d.ts.map +11 -0
- package/types/programEligibility.d.ts +23 -0
- package/types/programEligibility.d.ts.map +11 -0
- package/types/programHash.d.ts +20 -0
- package/types/programHash.d.ts.map +11 -0
- package/types/programs.d.ts +18 -0
- package/types/programs.d.ts.map +11 -0
- package/types/registry.d.ts +24 -0
- package/types/registry.d.ts.map +11 -0
- package/types/resolvePayload.d.ts +75 -0
- package/types/resolvePayload.d.ts.map +11 -0
- package/types/runtime.d.ts +34 -0
- package/types/runtime.d.ts.map +11 -0
- package/types/safeAreaVariables.d.ts +5 -0
- package/types/safeAreaVariables.d.ts.map +11 -0
- package/types/scanFlatValue.d.ts +29 -0
- package/types/scanFlatValue.d.ts.map +11 -0
- package/types/serializePayload.d.ts +13 -0
- package/types/serializePayload.d.ts.map +11 -0
- package/types/stateModifiers.d.ts +14 -0
- package/types/stateModifiers.d.ts.map +11 -0
- package/types/states.d.ts +22 -0
- package/types/states.d.ts.map +11 -0
- package/types/table.d.ts +4 -0
- package/types/table.d.ts.map +11 -0
- package/types/textDecorationFamily.d.ts +23 -0
- package/types/textDecorationFamily.d.ts.map +11 -0
- package/types/tooling.d.ts +10 -0
- package/types/tooling.d.ts.map +11 -0
- package/types/toolingAnnotations.d.ts +29 -0
- package/types/toolingAnnotations.d.ts.map +11 -0
- package/types/toolingDiagnostics.d.ts +114 -0
- package/types/toolingDiagnostics.d.ts.map +11 -0
- package/types/toolingRegistry.d.ts +10 -0
- package/types/toolingRegistry.d.ts.map +11 -0
- package/types/transformFamily.d.ts +83 -0
- package/types/transformFamily.d.ts.map +11 -0
- package/types/transition.d.ts +65 -0
- package/types/transition.d.ts.map +11 -0
- package/types/transitionAlign.d.ts +15 -0
- package/types/transitionAlign.d.ts.map +11 -0
- package/types/transitionLegacy.d.ts +9 -0
- package/types/transitionLegacy.d.ts.map +11 -0
- package/types/transitionNative.d.ts +41 -0
- package/types/transitionNative.d.ts.map +11 -0
- package/types/unitlessNumbers.d.ts +3 -0
- package/types/unitlessNumbers.d.ts.map +11 -0
- package/types/v6ThemeNames.d.ts +7 -0
- package/types/v6ThemeNames.d.ts.map +11 -0
- package/types/valueParser.d.ts +36 -0
- package/types/valueParser.d.ts.map +11 -0
- package/types/valueTypes.d.ts +66 -0
- package/types/valueTypes.d.ts.map +11 -0
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import type { ParsedClause, ParsedValue } from './valueTypes'
|
|
2
|
+
|
|
3
|
+
export const namedCssColors: ReadonlySet<string> = new Set(
|
|
4
|
+
'aliceblue antiquewhite aqua aquamarine azure beige bisque black blanchedalmond blue blueviolet brown burlywood cadetblue chartreuse chocolate coral cornflowerblue cornsilk crimson cyan darkblue darkcyan darkgoldenrod darkgray darkgreen darkgrey darkkhaki darkmagenta darkolivegreen darkorange darkorchid darkred darksalmon darkseagreen darkslateblue darkslategray darkslategrey darkturquoise darkviolet deeppink deepskyblue dimgray dimgrey dodgerblue firebrick floralwhite forestgreen fuchsia gainsboro ghostwhite gold goldenrod gray green greenyellow grey honeydew hotpink indianred indigo ivory khaki lavender lavenderblush lawngreen lemonchiffon lightblue lightcoral lightcyan lightgoldenrodyellow lightgray lightgreen lightgrey lightpink lightsalmon lightseagreen lightskyblue lightslategray lightslategrey lightsteelblue lightyellow lime limegreen linen magenta maroon mediumaquamarine mediumblue mediumorchid mediumpurple mediumseagreen mediumslateblue mediumspringgreen mediumturquoise mediumvioletred midnightblue mintcream mistyrose moccasin navajowhite navy oldlace olive olivedrab orange orangered orchid palegoldenrod palegreen paleturquoise palevioletred papayawhip peachpuff peru pink plum powderblue purple rebeccapurple red rosybrown royalblue saddlebrown salmon sandybrown seagreen seashell sienna silver skyblue slateblue slategray slategrey snow springgreen steelblue tan teal thistle tomato turquoise violet wheat white whitesmoke yellow yellowgreen'.split(
|
|
5
|
+
' '
|
|
6
|
+
)
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
const colorFunctions = new Set([
|
|
10
|
+
'rgb',
|
|
11
|
+
'rgba',
|
|
12
|
+
'hsl',
|
|
13
|
+
'hsla',
|
|
14
|
+
'hwb',
|
|
15
|
+
'lab',
|
|
16
|
+
'lch',
|
|
17
|
+
'oklab',
|
|
18
|
+
'oklch',
|
|
19
|
+
'color',
|
|
20
|
+
])
|
|
21
|
+
|
|
22
|
+
export function splitTopLevelComponents(value: string): string[] {
|
|
23
|
+
const components: string[] = []
|
|
24
|
+
let current = ''
|
|
25
|
+
let depth = 0
|
|
26
|
+
let quote = ''
|
|
27
|
+
let escaped = false
|
|
28
|
+
|
|
29
|
+
for (let index = 0; index < value.length; index++) {
|
|
30
|
+
const char = value[index]
|
|
31
|
+
if (escaped) {
|
|
32
|
+
current += char
|
|
33
|
+
escaped = false
|
|
34
|
+
continue
|
|
35
|
+
}
|
|
36
|
+
if (char === '\\') {
|
|
37
|
+
current += char
|
|
38
|
+
escaped = true
|
|
39
|
+
continue
|
|
40
|
+
}
|
|
41
|
+
if (quote) {
|
|
42
|
+
current += char
|
|
43
|
+
if (char === quote) quote = ''
|
|
44
|
+
continue
|
|
45
|
+
}
|
|
46
|
+
if (char === '"' || char === "'") {
|
|
47
|
+
current += char
|
|
48
|
+
quote = char
|
|
49
|
+
continue
|
|
50
|
+
}
|
|
51
|
+
if (char === '(') depth++
|
|
52
|
+
if (char === ')') depth--
|
|
53
|
+
|
|
54
|
+
const code = value.charCodeAt(index)
|
|
55
|
+
const whitespace =
|
|
56
|
+
code === 9 || code === 10 || code === 12 || code === 13 || code === 32
|
|
57
|
+
if (depth === 0 && whitespace) {
|
|
58
|
+
if (current) {
|
|
59
|
+
components.push(current)
|
|
60
|
+
current = ''
|
|
61
|
+
}
|
|
62
|
+
} else {
|
|
63
|
+
current += char
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (current) components.push(current)
|
|
68
|
+
return components
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function classifyComponent(
|
|
72
|
+
component: string,
|
|
73
|
+
colorTokens: ReadonlySet<string>
|
|
74
|
+
): 'color' | 'image' | null {
|
|
75
|
+
const functionMatch = /^([a-z][a-z0-9-]*)\([\s\S]*\)$/i.exec(component)
|
|
76
|
+
if (functionMatch) {
|
|
77
|
+
const name = functionMatch[1].toLowerCase()
|
|
78
|
+
if (name === 'url' || name === 'image-set' || name.endsWith('-gradient')) {
|
|
79
|
+
return 'image'
|
|
80
|
+
}
|
|
81
|
+
if (colorFunctions.has(name)) return 'color'
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if (/^#[\da-f]{3}(?:[\da-f]{1}|[\da-f]{3}(?:[\da-f]{2})?)?$/i.test(component)) {
|
|
85
|
+
return 'color'
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const tokenName = component.replace(/\/\d+$/, '')
|
|
89
|
+
if (colorTokens.has(tokenName)) return 'color'
|
|
90
|
+
|
|
91
|
+
const lower = component.toLowerCase()
|
|
92
|
+
if (lower === 'transparent' || lower === 'currentcolor' || namedCssColors.has(lower)) {
|
|
93
|
+
return 'color'
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
return null
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export function splitBackgroundValue(
|
|
100
|
+
value: ParsedValue,
|
|
101
|
+
colorTokens: ReadonlySet<string>
|
|
102
|
+
): {
|
|
103
|
+
entries: Array<{
|
|
104
|
+
property: 'backgroundColor' | 'backgroundImage'
|
|
105
|
+
value: ParsedValue
|
|
106
|
+
}>
|
|
107
|
+
errors: Array<{
|
|
108
|
+
code: 'unsupported-bg-component'
|
|
109
|
+
component: string
|
|
110
|
+
where: 'base' | number
|
|
111
|
+
}>
|
|
112
|
+
} {
|
|
113
|
+
const colorProgram: { base: string | null; clauses: ParsedClause[] } = {
|
|
114
|
+
base: null,
|
|
115
|
+
clauses: [],
|
|
116
|
+
}
|
|
117
|
+
const imageProgram: { base: string | null; clauses: ParsedClause[] } = {
|
|
118
|
+
base: null,
|
|
119
|
+
clauses: [],
|
|
120
|
+
}
|
|
121
|
+
const errors: Array<{
|
|
122
|
+
code: 'unsupported-bg-component'
|
|
123
|
+
component: string
|
|
124
|
+
where: 'base' | number
|
|
125
|
+
}> = []
|
|
126
|
+
let hasColor = false
|
|
127
|
+
let hasImage = false
|
|
128
|
+
|
|
129
|
+
for (let clauseIndex = -1; clauseIndex < value.clauses.length; clauseIndex++) {
|
|
130
|
+
const isBase = clauseIndex === -1
|
|
131
|
+
const payload = isBase ? value.base : value.clauses[clauseIndex].payload
|
|
132
|
+
if (payload === null) continue
|
|
133
|
+
|
|
134
|
+
let colorComponent: string | null = null
|
|
135
|
+
let imageComponent: string | null = null
|
|
136
|
+
const where = isBase ? 'base' : clauseIndex
|
|
137
|
+
|
|
138
|
+
for (const component of splitTopLevelComponents(payload)) {
|
|
139
|
+
const kind = classifyComponent(component, colorTokens)
|
|
140
|
+
if (kind === 'image' && imageComponent === null) {
|
|
141
|
+
imageComponent = component
|
|
142
|
+
} else if (kind === 'color' && colorComponent === null) {
|
|
143
|
+
colorComponent = component
|
|
144
|
+
} else {
|
|
145
|
+
errors.push({ code: 'unsupported-bg-component', component, where })
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
if (colorComponent !== null) {
|
|
150
|
+
hasColor = true
|
|
151
|
+
if (isBase) {
|
|
152
|
+
colorProgram.base = colorComponent
|
|
153
|
+
} else {
|
|
154
|
+
colorProgram.clauses.push({
|
|
155
|
+
modifiers: value.clauses[clauseIndex].modifiers,
|
|
156
|
+
payload: colorComponent,
|
|
157
|
+
})
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
if (imageComponent !== null) {
|
|
162
|
+
hasImage = true
|
|
163
|
+
if (isBase) {
|
|
164
|
+
imageProgram.base = imageComponent
|
|
165
|
+
} else {
|
|
166
|
+
imageProgram.clauses.push({
|
|
167
|
+
modifiers: value.clauses[clauseIndex].modifiers,
|
|
168
|
+
payload: imageComponent,
|
|
169
|
+
})
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
const entries: Array<{
|
|
175
|
+
property: 'backgroundColor' | 'backgroundImage'
|
|
176
|
+
value: ParsedValue
|
|
177
|
+
}> = []
|
|
178
|
+
if (hasColor) entries.push({ property: 'backgroundColor', value: colorProgram })
|
|
179
|
+
if (hasImage) entries.push({ property: 'backgroundImage', value: imageProgram })
|
|
180
|
+
|
|
181
|
+
return { entries, errors }
|
|
182
|
+
}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
// The border family: value-dependent splitting of the resetting CSS border
|
|
2
|
+
// shorthands into per-longhand programs, the background family's model applied
|
|
3
|
+
// to width/style/color. A program must never sit on a resetting shorthand —
|
|
4
|
+
// the order-free cross-program encoding depends on every program owning one
|
|
5
|
+
// true longhand — so `border="2px solid red hover:blue"` becomes width, style,
|
|
6
|
+
// and color programs per side, and a later `borderColor` restates exactly the
|
|
7
|
+
// color longhands.
|
|
8
|
+
|
|
9
|
+
import { classifyComponent, splitTopLevelComponents } from './backgroundFamily'
|
|
10
|
+
import type { ParsedClause, ParsedValue } from './valueTypes'
|
|
11
|
+
|
|
12
|
+
interface BorderFamilyTargets {
|
|
13
|
+
width: readonly string[]
|
|
14
|
+
style: readonly string[]
|
|
15
|
+
color: readonly string[]
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const sides = ['Top', 'Right', 'Bottom', 'Left'] as const
|
|
19
|
+
|
|
20
|
+
/** authored prop -> the true longhands each component kind lands on */
|
|
21
|
+
export const borderFamilyTargets: Readonly<Record<string, BorderFamilyTargets>> = {
|
|
22
|
+
border: {
|
|
23
|
+
width: sides.map((side) => `border${side}Width`),
|
|
24
|
+
style: sides.map((side) => `border${side}Style`),
|
|
25
|
+
color: sides.map((side) => `border${side}Color`),
|
|
26
|
+
},
|
|
27
|
+
...Object.fromEntries(
|
|
28
|
+
sides.map((side) => [
|
|
29
|
+
`border${side}`,
|
|
30
|
+
{
|
|
31
|
+
width: [`border${side}Width`],
|
|
32
|
+
style: [`border${side}Style`],
|
|
33
|
+
color: [`border${side}Color`],
|
|
34
|
+
},
|
|
35
|
+
])
|
|
36
|
+
),
|
|
37
|
+
outline: {
|
|
38
|
+
width: ['outlineWidth'],
|
|
39
|
+
style: ['outlineStyle'],
|
|
40
|
+
color: ['outlineColor'],
|
|
41
|
+
},
|
|
42
|
+
// logical shorthands split into CSS logical longhands. web lowers them
|
|
43
|
+
// verbatim; RN has no logical block/inline border properties, so native
|
|
44
|
+
// evaluation diagnoses and drops these longhands (no silent physical
|
|
45
|
+
// approximation — the mapping depends on writing mode)
|
|
46
|
+
borderBlock: {
|
|
47
|
+
width: ['borderBlockStartWidth', 'borderBlockEndWidth'],
|
|
48
|
+
style: ['borderBlockStartStyle', 'borderBlockEndStyle'],
|
|
49
|
+
color: ['borderBlockStartColor', 'borderBlockEndColor'],
|
|
50
|
+
},
|
|
51
|
+
borderInline: {
|
|
52
|
+
width: ['borderInlineStartWidth', 'borderInlineEndWidth'],
|
|
53
|
+
style: ['borderInlineStartStyle', 'borderInlineEndStyle'],
|
|
54
|
+
color: ['borderInlineStartColor', 'borderInlineEndColor'],
|
|
55
|
+
},
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const lineStyles = new Set([
|
|
59
|
+
'none',
|
|
60
|
+
'hidden',
|
|
61
|
+
'dotted',
|
|
62
|
+
'dashed',
|
|
63
|
+
'solid',
|
|
64
|
+
'double',
|
|
65
|
+
'groove',
|
|
66
|
+
'ridge',
|
|
67
|
+
'inset',
|
|
68
|
+
'outset',
|
|
69
|
+
])
|
|
70
|
+
|
|
71
|
+
const widthKeywords = new Set(['thin', 'medium', 'thick'])
|
|
72
|
+
|
|
73
|
+
// a length: bare number (RN spelling), number+unit, or a width keyword.
|
|
74
|
+
// calc() and var() also measure as widths when nothing else claims them
|
|
75
|
+
const lengthPattern = /^-?(\d+\.?\d*|\.\d+)([a-z%]+)?$/i
|
|
76
|
+
|
|
77
|
+
function classifyBorderComponent(
|
|
78
|
+
component: string,
|
|
79
|
+
property: string,
|
|
80
|
+
colorTokens: ReadonlySet<string>
|
|
81
|
+
): 'width' | 'style' | 'color' | null {
|
|
82
|
+
const lower = component.toLowerCase()
|
|
83
|
+
if (lineStyles.has(lower)) return 'style'
|
|
84
|
+
// outline-style additionally allows auto
|
|
85
|
+
if (lower === 'auto' && property === 'outline') return 'style'
|
|
86
|
+
if (widthKeywords.has(lower) || lengthPattern.test(component)) return 'width'
|
|
87
|
+
if (classifyComponent(component, colorTokens) === 'color') return 'color'
|
|
88
|
+
if (/^(calc|var|min|max|clamp)\(/i.test(component)) return 'width'
|
|
89
|
+
return null
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export interface BorderFamilyError {
|
|
93
|
+
code: 'unsupported-border-component'
|
|
94
|
+
component: string
|
|
95
|
+
where: 'base' | number
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
interface MutableProgram {
|
|
99
|
+
base: string | null
|
|
100
|
+
clauses: ParsedClause[]
|
|
101
|
+
present: boolean
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function splitBorderValue(
|
|
105
|
+
property: string,
|
|
106
|
+
value: ParsedValue,
|
|
107
|
+
colorTokens: ReadonlySet<string>
|
|
108
|
+
): {
|
|
109
|
+
entries: Array<{ property: string; value: ParsedValue }>
|
|
110
|
+
errors: BorderFamilyError[]
|
|
111
|
+
} {
|
|
112
|
+
const targets = borderFamilyTargets[property]
|
|
113
|
+
const errors: BorderFamilyError[] = []
|
|
114
|
+
const kinds = ['width', 'style', 'color'] as const
|
|
115
|
+
const programs: Record<(typeof kinds)[number], MutableProgram> = {
|
|
116
|
+
width: { base: null, clauses: [], present: false },
|
|
117
|
+
style: { base: null, clauses: [], present: false },
|
|
118
|
+
color: { base: null, clauses: [], present: false },
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
for (let clauseIndex = -1; clauseIndex < value.clauses.length; clauseIndex++) {
|
|
122
|
+
const isBase = clauseIndex === -1
|
|
123
|
+
const payload = isBase ? value.base : value.clauses[clauseIndex].payload
|
|
124
|
+
if (payload === null) continue
|
|
125
|
+
const where = isBase ? ('base' as const) : clauseIndex
|
|
126
|
+
|
|
127
|
+
const found: Partial<Record<(typeof kinds)[number], string>> = {}
|
|
128
|
+
for (const component of splitTopLevelComponents(payload)) {
|
|
129
|
+
const kind = classifyBorderComponent(component, property, colorTokens)
|
|
130
|
+
if (kind === null || found[kind] !== undefined) {
|
|
131
|
+
errors.push({ code: 'unsupported-border-component', component, where })
|
|
132
|
+
continue
|
|
133
|
+
}
|
|
134
|
+
found[kind] = component
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// Carry the shorthand's effective zero width explicitly. Web receives an
|
|
138
|
+
// equivalent reset, and native does not have to rely on style `none` alone
|
|
139
|
+
// to hide an edge whose width was supplied by another contribution.
|
|
140
|
+
if (found.style === 'none' && found.width === undefined) {
|
|
141
|
+
found.width = '0'
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
for (const kind of kinds) {
|
|
145
|
+
const component = found[kind]
|
|
146
|
+
if (component === undefined) continue
|
|
147
|
+
const program = programs[kind]
|
|
148
|
+
program.present = true
|
|
149
|
+
if (isBase) {
|
|
150
|
+
program.base = component
|
|
151
|
+
} else {
|
|
152
|
+
program.clauses.push({
|
|
153
|
+
modifiers: value.clauses[clauseIndex].modifiers,
|
|
154
|
+
payload: component,
|
|
155
|
+
})
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
const entries: Array<{ property: string; value: ParsedValue }> = []
|
|
161
|
+
for (const kind of kinds) {
|
|
162
|
+
const program = programs[kind]
|
|
163
|
+
if (!program.present) continue
|
|
164
|
+
const shared: ParsedValue = { base: program.base, clauses: program.clauses }
|
|
165
|
+
for (const longhand of targets[kind]) {
|
|
166
|
+
// programs are immutable, so every side may alias the same value
|
|
167
|
+
entries.push({ property: longhand, value: shared })
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
return { entries, errors }
|
|
172
|
+
}
|