@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,91 @@
|
|
|
1
|
+
import { grammarPlatformGroups } from './config'
|
|
2
|
+
import {
|
|
3
|
+
canonicalClauseModifier,
|
|
4
|
+
compareClausePrecedence,
|
|
5
|
+
createClausePrecedenceOrder,
|
|
6
|
+
getClausePrecedenceKeyFromKinds,
|
|
7
|
+
type ClausePrecedenceKey,
|
|
8
|
+
type ClausePrecedenceOrder,
|
|
9
|
+
} from './clausePrecedence'
|
|
10
|
+
import type { ModifierKind, ModifierRegistryView, ParsedValue } from './valueTypes'
|
|
11
|
+
|
|
12
|
+
export interface ActiveConditions {
|
|
13
|
+
states: ReadonlySet<string>
|
|
14
|
+
themes: ReadonlySet<string>
|
|
15
|
+
media: ReadonlySet<string>
|
|
16
|
+
/** config declaration order; falls back to `media` insertion order in tests */
|
|
17
|
+
mediaOrder?: ClausePrecedenceOrder
|
|
18
|
+
platform: string
|
|
19
|
+
groups: (modifier: string) => boolean
|
|
20
|
+
/**
|
|
21
|
+
* whether a container query modifier (`@sm`, `@sm/card`) currently holds.
|
|
22
|
+
* Like groups, this is a callback because the answer lives with the component
|
|
23
|
+
* tree: resolving it needs the measured size of the nearest or named
|
|
24
|
+
* container, whose measurement timing is its own design item.
|
|
25
|
+
*/
|
|
26
|
+
containers: (modifier: string) => boolean
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Resolves a program to one payload using the shared fixed precedence key.
|
|
31
|
+
* Authored order only breaks exact-key ties, so a later restatement of the
|
|
32
|
+
* same normalized condition set wins while distinct condition sets are stable
|
|
33
|
+
* under reordering.
|
|
34
|
+
*/
|
|
35
|
+
export function evaluateProgram(
|
|
36
|
+
value: ParsedValue,
|
|
37
|
+
registry: ModifierRegistryView,
|
|
38
|
+
active: ActiveConditions
|
|
39
|
+
): string | null {
|
|
40
|
+
let payload: string | null = null
|
|
41
|
+
let found = false
|
|
42
|
+
let best: ClausePrecedenceKey | undefined
|
|
43
|
+
const order = active.mediaOrder ?? createClausePrecedenceOrder(active.media)
|
|
44
|
+
|
|
45
|
+
for (let clauseIndex = 0; clauseIndex < value.clauses.length; clauseIndex++) {
|
|
46
|
+
const clause = value.clauses[clauseIndex]
|
|
47
|
+
let matches = true
|
|
48
|
+
const kinds: (ModifierKind | undefined)[] = []
|
|
49
|
+
|
|
50
|
+
for (
|
|
51
|
+
let modifierIndex = 0;
|
|
52
|
+
modifierIndex < clause.modifiers.length;
|
|
53
|
+
modifierIndex++
|
|
54
|
+
) {
|
|
55
|
+
const modifier = canonicalClauseModifier(clause.modifiers[modifierIndex])
|
|
56
|
+
const kind = registry.get(modifier)
|
|
57
|
+
kinds.push(kind)
|
|
58
|
+
|
|
59
|
+
if (kind === 'state') {
|
|
60
|
+
matches = active.states.has(modifier)
|
|
61
|
+
} else if (kind === 'theme') {
|
|
62
|
+
matches = active.themes.has(modifier)
|
|
63
|
+
} else if (kind === 'media') {
|
|
64
|
+
matches = active.media.has(modifier)
|
|
65
|
+
} else if (kind === 'platform') {
|
|
66
|
+
matches =
|
|
67
|
+
modifier === active.platform ||
|
|
68
|
+
(grammarPlatformGroups.get(modifier)?.has(active.platform) ?? false)
|
|
69
|
+
} else if (kind === 'group') {
|
|
70
|
+
matches = active.groups(modifier)
|
|
71
|
+
} else if (kind === 'container') {
|
|
72
|
+
matches = active.containers(modifier)
|
|
73
|
+
} else {
|
|
74
|
+
matches = false
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if (!matches) break
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if (!matches) continue
|
|
81
|
+
|
|
82
|
+
const precedence = getClausePrecedenceKeyFromKinds(clause.modifiers, kinds, order)
|
|
83
|
+
if (best && compareClausePrecedence(precedence, best) < 0) continue
|
|
84
|
+
|
|
85
|
+
payload = clause.payload
|
|
86
|
+
best = precedence
|
|
87
|
+
found = true
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
return found ? payload : value.base
|
|
91
|
+
}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
// The font shorthand: value-dependent splitting of the resetting CSS `font`
|
|
2
|
+
// shorthand into per-longhand programs, completing the family model. The
|
|
3
|
+
// micro-syntax is positional — optional style/weight components, then the
|
|
4
|
+
// size (optionally `size/line-height`), then the family tail, which is joined
|
|
5
|
+
// verbatim so comma lists and quoted names survive.
|
|
6
|
+
//
|
|
7
|
+
// Conservative by design: ambiguous or unsupported components (`normal`,
|
|
8
|
+
// `small-caps`, stretch keywords, system font keywords, size keywords) error
|
|
9
|
+
// so the whole value stays on the legacy path rather than converting into a
|
|
10
|
+
// subtly different meaning.
|
|
11
|
+
|
|
12
|
+
import { splitTopLevelComponents } from './backgroundFamily'
|
|
13
|
+
import type { ParsedClause, ParsedValue } from './valueTypes'
|
|
14
|
+
|
|
15
|
+
interface FontShorthandTargets {
|
|
16
|
+
style: readonly string[]
|
|
17
|
+
weight: readonly string[]
|
|
18
|
+
size: readonly string[]
|
|
19
|
+
lineHeight: readonly string[]
|
|
20
|
+
family: readonly string[]
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** authored prop -> the true longhands each component kind lands on */
|
|
24
|
+
export const fontShorthandTargets: Readonly<Record<string, FontShorthandTargets>> = {
|
|
25
|
+
font: {
|
|
26
|
+
style: ['fontStyle'],
|
|
27
|
+
weight: ['fontWeight'],
|
|
28
|
+
size: ['fontSize'],
|
|
29
|
+
lineHeight: ['lineHeight'],
|
|
30
|
+
family: ['fontFamily'],
|
|
31
|
+
},
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const styleKeywords = new Set(['italic', 'oblique'])
|
|
35
|
+
const weightKeywords = new Set(['bold', 'bolder', 'lighter'])
|
|
36
|
+
// `normal` is ambiguous (style, variant, or weight), and these have no
|
|
37
|
+
// cross-platform longhand contribution
|
|
38
|
+
const unsupportedKeywords = new Set([
|
|
39
|
+
'normal',
|
|
40
|
+
'small-caps',
|
|
41
|
+
'ultra-condensed',
|
|
42
|
+
'extra-condensed',
|
|
43
|
+
'condensed',
|
|
44
|
+
'semi-condensed',
|
|
45
|
+
'semi-expanded',
|
|
46
|
+
'expanded',
|
|
47
|
+
'extra-expanded',
|
|
48
|
+
'ultra-expanded',
|
|
49
|
+
// system font keywords have no longhand equivalent at all
|
|
50
|
+
'caption',
|
|
51
|
+
'icon',
|
|
52
|
+
'menu',
|
|
53
|
+
'message-box',
|
|
54
|
+
'small-caption',
|
|
55
|
+
'status-bar',
|
|
56
|
+
])
|
|
57
|
+
|
|
58
|
+
const sizePattern = /^-?(\d+\.?\d*|\.\d+)(?:[a-z%]+)?$/i
|
|
59
|
+
const weightNumberPattern = /^[1-9]00$/
|
|
60
|
+
|
|
61
|
+
export interface FontShorthandError {
|
|
62
|
+
code: 'unsupported-font-component'
|
|
63
|
+
component: string
|
|
64
|
+
where: 'base' | number
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
type FontKind = keyof FontShorthandTargets
|
|
68
|
+
|
|
69
|
+
interface MutableProgram {
|
|
70
|
+
base: string | null
|
|
71
|
+
clauses: ParsedClause[]
|
|
72
|
+
present: boolean
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function splitFontValue(value: ParsedValue): {
|
|
76
|
+
entries: Array<{ property: string; value: ParsedValue }>
|
|
77
|
+
errors: FontShorthandError[]
|
|
78
|
+
} {
|
|
79
|
+
const targets = fontShorthandTargets.font
|
|
80
|
+
const errors: FontShorthandError[] = []
|
|
81
|
+
const kinds: readonly FontKind[] = ['style', 'weight', 'size', 'lineHeight', 'family']
|
|
82
|
+
const programs: Record<FontKind, MutableProgram> = {
|
|
83
|
+
style: { base: null, clauses: [], present: false },
|
|
84
|
+
weight: { base: null, clauses: [], present: false },
|
|
85
|
+
size: { base: null, clauses: [], present: false },
|
|
86
|
+
lineHeight: { base: null, clauses: [], present: false },
|
|
87
|
+
family: { base: null, clauses: [], present: false },
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
for (let clauseIndex = -1; clauseIndex < value.clauses.length; clauseIndex++) {
|
|
91
|
+
const isBase = clauseIndex === -1
|
|
92
|
+
const payload = isBase ? value.base : value.clauses[clauseIndex].payload
|
|
93
|
+
if (payload === null) continue
|
|
94
|
+
const where = isBase ? ('base' as const) : clauseIndex
|
|
95
|
+
|
|
96
|
+
const components = splitTopLevelComponents(payload)
|
|
97
|
+
const found: Partial<Record<FontKind, string>> = {}
|
|
98
|
+
let sizeIndex = -1
|
|
99
|
+
|
|
100
|
+
for (let index = 0; index < components.length; index++) {
|
|
101
|
+
const component = components[index]
|
|
102
|
+
const lower = component.toLowerCase()
|
|
103
|
+
if (unsupportedKeywords.has(lower)) {
|
|
104
|
+
errors.push({ code: 'unsupported-font-component', component, where })
|
|
105
|
+
continue
|
|
106
|
+
}
|
|
107
|
+
if (styleKeywords.has(lower)) {
|
|
108
|
+
if (found.style !== undefined) {
|
|
109
|
+
errors.push({ code: 'unsupported-font-component', component, where })
|
|
110
|
+
continue
|
|
111
|
+
}
|
|
112
|
+
found.style = component
|
|
113
|
+
continue
|
|
114
|
+
}
|
|
115
|
+
if (weightKeywords.has(lower) || weightNumberPattern.test(component)) {
|
|
116
|
+
if (found.weight !== undefined) {
|
|
117
|
+
errors.push({ code: 'unsupported-font-component', component, where })
|
|
118
|
+
continue
|
|
119
|
+
}
|
|
120
|
+
found.weight = component
|
|
121
|
+
continue
|
|
122
|
+
}
|
|
123
|
+
const slash = component.indexOf('/')
|
|
124
|
+
const sizePart = slash === -1 ? component : component.slice(0, slash)
|
|
125
|
+
if (sizePattern.test(sizePart)) {
|
|
126
|
+
if (found.size !== undefined) {
|
|
127
|
+
errors.push({ code: 'unsupported-font-component', component, where })
|
|
128
|
+
continue
|
|
129
|
+
}
|
|
130
|
+
found.size = sizePart
|
|
131
|
+
if (slash !== -1) found.lineHeight = component.slice(slash + 1)
|
|
132
|
+
sizeIndex = index
|
|
133
|
+
// everything after the size is the family, joined verbatim
|
|
134
|
+
const family = components.slice(index + 1).join(' ')
|
|
135
|
+
if (family) found.family = family
|
|
136
|
+
break
|
|
137
|
+
}
|
|
138
|
+
// a component before the size that nothing classified
|
|
139
|
+
errors.push({ code: 'unsupported-font-component', component, where })
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
if (sizeIndex === -1) {
|
|
143
|
+
errors.push({
|
|
144
|
+
code: 'unsupported-font-component',
|
|
145
|
+
component: payload,
|
|
146
|
+
where,
|
|
147
|
+
})
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
for (const kind of kinds) {
|
|
151
|
+
const component = found[kind]
|
|
152
|
+
if (component === undefined) continue
|
|
153
|
+
const program = programs[kind]
|
|
154
|
+
program.present = true
|
|
155
|
+
if (isBase) {
|
|
156
|
+
program.base = component
|
|
157
|
+
} else {
|
|
158
|
+
program.clauses.push({
|
|
159
|
+
modifiers: value.clauses[clauseIndex].modifiers,
|
|
160
|
+
payload: component,
|
|
161
|
+
})
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
const entries: Array<{ property: string; value: ParsedValue }> = []
|
|
167
|
+
for (const kind of kinds) {
|
|
168
|
+
const program = programs[kind]
|
|
169
|
+
if (!program.present) continue
|
|
170
|
+
const shared: ParsedValue = { base: program.base, clauses: program.clauses }
|
|
171
|
+
for (const longhand of targets[kind]) {
|
|
172
|
+
entries.push({ property: longhand, value: shared })
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
return { entries, errors }
|
|
177
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
// Geometric shorthand slot semantics for program values (design record,
|
|
2
|
+
// "Bare numbers resolve config-first ... and per component value:
|
|
3
|
+
// `p="4 8"` resolves both"). A multi-component payload on a geometric
|
|
4
|
+
// shorthand distributes by the CSS slot pattern — sides alternate for two
|
|
5
|
+
// values, three values mirror the second, four map directly — producing one
|
|
6
|
+
// SINGLE-component program per longhand. Without this, every side received
|
|
7
|
+
// the whole multi-value payload and the browser dropped the declaration
|
|
8
|
+
// silently.
|
|
9
|
+
//
|
|
10
|
+
// Function values and slash syntax (`borderRadius="8px / 4px"`) do not
|
|
11
|
+
// distribute faithfully and return an error, which keeps the value on the
|
|
12
|
+
// single-program path where the payload-shape diagnostic reports it.
|
|
13
|
+
|
|
14
|
+
import { splitTopLevelComponents } from './backgroundFamily'
|
|
15
|
+
import { longhandExpansionTable } from './programs'
|
|
16
|
+
import type { ParsedClause, ParsedValue } from './valueTypes'
|
|
17
|
+
|
|
18
|
+
// identical index patterns for box sides (T/R/B/L) and radius corners
|
|
19
|
+
// (TL/TR/BR/BL); two-slot pairs (horizontal/vertical, gap) take one or two
|
|
20
|
+
const slotPatterns: Record<number, Record<number, readonly number[]>> = {
|
|
21
|
+
4: { 1: [0, 0, 0, 0], 2: [0, 1, 0, 1], 3: [0, 1, 2, 1], 4: [0, 1, 2, 3] },
|
|
22
|
+
2: { 1: [0, 0], 2: [0, 1] },
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface GeometricShorthandError {
|
|
26
|
+
code: 'unsupported-geometric-payload'
|
|
27
|
+
payload: string
|
|
28
|
+
where: 'base' | number
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Splits a geometric shorthand's parsed program into per-longhand programs by
|
|
33
|
+
* slot. Returns null when `prop` is not a geometric shorthand, or when every
|
|
34
|
+
* payload is single-component (nothing to distribute — the caller's ordinary
|
|
35
|
+
* expansion handles that identically and cheaper).
|
|
36
|
+
*/
|
|
37
|
+
export function splitGeometricShorthandValue(
|
|
38
|
+
prop: string,
|
|
39
|
+
value: ParsedValue
|
|
40
|
+
): {
|
|
41
|
+
entries: Array<{ property: string; value: ParsedValue }>
|
|
42
|
+
errors: GeometricShorthandError[]
|
|
43
|
+
} | null {
|
|
44
|
+
const longhands = longhandExpansionTable[prop]
|
|
45
|
+
if (!longhands) return null
|
|
46
|
+
const patterns = slotPatterns[longhands.length]
|
|
47
|
+
if (!patterns) return null
|
|
48
|
+
|
|
49
|
+
// fast path: nothing multi-component, nothing to do
|
|
50
|
+
let hasMulti = false
|
|
51
|
+
const payloadComponents: string[][] = []
|
|
52
|
+
for (let index = -1; index < value.clauses.length; index++) {
|
|
53
|
+
const payload = index === -1 ? value.base : value.clauses[index].payload
|
|
54
|
+
if (payload === null) {
|
|
55
|
+
payloadComponents.push([])
|
|
56
|
+
continue
|
|
57
|
+
}
|
|
58
|
+
if (payload.includes('/')) return null
|
|
59
|
+
const components = splitTopLevelComponents(payload)
|
|
60
|
+
payloadComponents.push(components)
|
|
61
|
+
if (components.length > 1) hasMulti = true
|
|
62
|
+
}
|
|
63
|
+
if (!hasMulti) return null
|
|
64
|
+
|
|
65
|
+
const errors: GeometricShorthandError[] = []
|
|
66
|
+
// per longhand: pick this slot's component from every payload
|
|
67
|
+
const perLonghand: Array<{ base: string | null; clauses: ParsedClause[] }> =
|
|
68
|
+
longhands.map(() => ({ base: null, clauses: [] }))
|
|
69
|
+
|
|
70
|
+
for (let index = -1; index < value.clauses.length; index++) {
|
|
71
|
+
const payload = index === -1 ? value.base : value.clauses[index].payload
|
|
72
|
+
if (payload === null) continue
|
|
73
|
+
const components = payloadComponents[index + 1]
|
|
74
|
+
const pattern = patterns[components.length]
|
|
75
|
+
if (!pattern) {
|
|
76
|
+
errors.push({
|
|
77
|
+
code: 'unsupported-geometric-payload',
|
|
78
|
+
payload,
|
|
79
|
+
where: index === -1 ? 'base' : index,
|
|
80
|
+
})
|
|
81
|
+
continue
|
|
82
|
+
}
|
|
83
|
+
for (let slot = 0; slot < longhands.length; slot++) {
|
|
84
|
+
const component = components[pattern[slot]]
|
|
85
|
+
if (index === -1) {
|
|
86
|
+
perLonghand[slot].base = component
|
|
87
|
+
} else {
|
|
88
|
+
perLonghand[slot].clauses.push({
|
|
89
|
+
modifiers: value.clauses[index].modifiers,
|
|
90
|
+
payload: component,
|
|
91
|
+
})
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if (errors.length) return { entries: [], errors }
|
|
97
|
+
|
|
98
|
+
return {
|
|
99
|
+
entries: longhands.map((longhand, slot) => ({
|
|
100
|
+
property: longhand,
|
|
101
|
+
value: { base: perLonghand[slot].base, clauses: perLonghand[slot].clauses },
|
|
102
|
+
})),
|
|
103
|
+
errors,
|
|
104
|
+
}
|
|
105
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './runtime'
|