@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,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mappings": "AAAA,YAAY,qBAAqB,WAAW;AAE5C,iBAAiB,oBAAoB;CACnC,MAAM;CACN;CACA;;AAGF,iBAAiB,uBAAuB;CACtC,MAAM;CACN;CACA,SAAS,SAAS;;AAGpB,YAAY,mBAAmB,sBAAsB;AAErD,iBAAiB,gBAAgB;CAC/B;CACA,QAAQ;CACR;CACA,UAAU;;AAGZ,iBAAiB,aAAa;CAC5B,MAAM;CACN,kBAAkB;CAClB,QAAQ;CACR,OAAO;CACP,SAAS,SAAS;;AAGpB,iBAAiB,mBAAmB;CAClC,MAAM;CACN,OAAO,YAAY,YAAY,WAAW,iBAAiB;;AAG7D,YAAY,mBAAmB,eAAe;AAE9C,iBAAiB,qBAAqB;CACpC,MACI,0BACA,6BACA,mCACA,gCACA;CACJ;CACA;CACA;;AAGF,YAAY,wBACR;CACE,IAAI;CACJ,OAAO;IAET;CACE,IAAI;CACJ,sBAAsB;;AAG5B,iBAAiB,oBAAoB;CACnC;CACA;CACA;CACA;CACA;;;;;;;;AAmPF,OAAO,iBAAS,gBACd,eACA,cAAa,sBACZ;;;;;AA2GH,OAAO,iBAAS,yBACd,OAAO,sBACN;AAyGH,OAAO,iBAAS,oBAAoB,OAAO",
|
|
3
|
+
"names": [],
|
|
4
|
+
"sources": [
|
|
5
|
+
"src/transition.ts"
|
|
6
|
+
],
|
|
7
|
+
"version": 3,
|
|
8
|
+
"sourcesContent": [
|
|
9
|
+
"export type TransitionBehavior = 'normal' | 'allow-discrete'\n\nexport interface CSSTransitionTiming {\n type: 'css'\n duration: string\n timingFunction: string\n}\n\nexport interface PresetTransitionTiming {\n type: 'preset'\n name: string\n config?: Readonly<Record<string, unknown>>\n}\n\nexport type TransitionTiming = CSSTransitionTiming | PresetTransitionTiming\n\nexport interface TransitionEntry {\n property: string\n timing: TransitionTiming\n delay: string\n behavior: TransitionBehavior\n}\n\nexport interface TransitionIR {\n kind: 'transition'\n entries: readonly TransitionEntry[]\n enter?: TransitionEntry\n exit?: TransitionEntry\n config?: Readonly<Record<string, unknown>>\n}\n\nexport interface TransitionGlobalIR {\n kind: 'global'\n value: 'inherit' | 'initial' | 'revert' | 'revert-layer' | 'unset'\n}\n\nexport type ParsedTransition = TransitionIR | TransitionGlobalIR\n\nexport interface TransitionDiagnostic {\n code:\n | 'transition-empty-item'\n | 'transition-invalid-token'\n | 'transition-duplicate-component'\n | 'transition-invalid-duration'\n | 'transition-invalid-list'\n message: string\n item?: string\n token?: string\n}\n\nexport type TransitionParseResult =\n | {\n ok: true\n value: ParsedTransition\n }\n | {\n ok: false\n diagnostics: readonly TransitionDiagnostic[]\n }\n\nexport interface TransitionLonghands {\n transitionProperty?: string\n transitionDuration?: string\n transitionTimingFunction?: string\n transitionDelay?: string\n transitionBehavior?: string\n}\n\nconst globalValues = new Set(['inherit', 'initial', 'revert', 'revert-layer', 'unset'])\nconst timingKeywords = new Set([\n 'ease',\n 'linear',\n 'ease-in',\n 'ease-out',\n 'ease-in-out',\n 'step-start',\n 'step-end',\n])\nconst behaviorValues = new Set(['normal', 'allow-discrete'])\nconst reservedPresetNames = new Set([\n ...globalValues,\n ...timingKeywords,\n ...behaviorValues,\n 'all',\n 'none',\n])\nconst noPresetNames: ReadonlySet<string> = new Set()\nconst identifierPattern = /^-?(?:[_a-zA-Z]|[^\\0-\\x7f])(?:[-_a-zA-Z0-9]|[^\\0-\\x7f])*$/\nconst timePattern = /^([+-]?(?:\\d+(?:\\.\\d*)?|\\.\\d+))(ms|s)$/\n\nfunction splitTopLevel(input: string, separator: ',' | ' '): string[] | null {\n const values: string[] = []\n let start = 0\n let depth = 0\n let quote = ''\n\n for (let index = 0; index < input.length; index++) {\n const character = input[index]\n if (quote) {\n if (character === '\\\\') index++\n else if (character === quote) quote = ''\n continue\n }\n if (character === '\"' || character === \"'\") {\n quote = character\n continue\n }\n if (character === '(') {\n depth++\n continue\n }\n if (character === ')') {\n depth--\n if (depth < 0) return null\n continue\n }\n if (depth !== 0) continue\n\n const matches = separator === ',' ? character === ',' : /\\s/.test(character)\n if (!matches) continue\n\n const value = input.slice(start, index).trim()\n if (value) values.push(value)\n else if (separator === ',') values.push('')\n start = index + 1\n if (separator === ' ') {\n while (start < input.length && /\\s/.test(input[start])) start++\n index = start - 1\n }\n }\n\n if (depth !== 0 || quote) return null\n values.push(input.slice(start).trim())\n return values\n}\n\nfunction isTime(value: string): boolean {\n return timePattern.test(value)\n}\n\nfunction isTimingFunction(value: string): boolean {\n if (timingKeywords.has(value)) return true\n if (/^cubic-bezier\\(\\s*[^)]+\\s*\\)$/.test(value)) {\n const values = value.slice(value.indexOf('(') + 1, -1).split(',')\n if (values.length !== 4) return false\n const numbers: number[] = []\n for (let index = 0; index < values.length; index++) {\n const number = Number(values[index].trim())\n if (!Number.isFinite(number)) return false\n numbers.push(number)\n }\n return numbers[0] >= 0 && numbers[0] <= 1 && numbers[2] >= 0 && numbers[2] <= 1\n }\n if (/^steps\\(\\s*[^)]+\\s*\\)$/.test(value)) {\n const parts = value.slice(value.indexOf('(') + 1, -1).split(',')\n if (parts.length > 2) return false\n const count = Number(parts[0].trim())\n if (!Number.isInteger(count) || count <= 0) return false\n const position = parts[1]?.trim()\n if (\n position !== undefined &&\n !/^(jump-start|jump-end|jump-none|jump-both|start|end)$/.test(position)\n ) {\n return false\n }\n return position !== 'jump-none' || count > 1\n }\n if (/^linear\\(\\s*[^)]+\\s*\\)$/.test(value)) return true\n return false\n}\n\nfunction parseSingleTransition(item: string): TransitionEntry | TransitionDiagnostic {\n const tokens = splitTopLevel(item, ' ')\n if (tokens === null || tokens.length === 0) {\n return {\n code: 'transition-invalid-token',\n item,\n message: `\"${item}\" is not a balanced CSS transition`,\n }\n }\n for (let index = 0; index < tokens.length; index++) {\n if (!tokens[index]) {\n return {\n code: 'transition-invalid-token',\n item,\n message: `\"${item}\" is not a balanced CSS transition`,\n }\n }\n }\n\n let property: string | undefined\n let duration: string | undefined\n let delay: string | undefined\n let timingFunction: string | undefined\n let behavior: TransitionBehavior | undefined\n\n for (const token of tokens) {\n if (globalValues.has(token)) {\n return {\n code: 'transition-invalid-list',\n item,\n token,\n message: `CSS-wide value \"${token}\" must be the whole transition`,\n }\n }\n if (isTime(token)) {\n if (duration === undefined) {\n if (Number(token.match(timePattern)?.[1]) < 0) {\n return {\n code: 'transition-invalid-duration',\n item,\n token,\n message: `transition duration \"${token}\" cannot be negative`,\n }\n }\n duration = token\n } else if (delay === undefined) {\n delay = token\n } else {\n return {\n code: 'transition-duplicate-component',\n item,\n token,\n message: `\"${item}\" has more than two time values`,\n }\n }\n continue\n }\n\n if (isTimingFunction(token)) {\n if (timingFunction !== undefined) {\n return {\n code: 'transition-duplicate-component',\n item,\n token,\n message: `\"${item}\" has more than one timing function`,\n }\n }\n timingFunction = token\n continue\n }\n\n if (behaviorValues.has(token)) {\n if (behavior !== undefined) {\n return {\n code: 'transition-duplicate-component',\n item,\n token,\n message: `\"${item}\" has more than one transition behavior`,\n }\n }\n behavior = token as TransitionBehavior\n continue\n }\n\n if (identifierPattern.test(token) || /^--[-_a-zA-Z0-9]+$/.test(token)) {\n if (property !== undefined) {\n return {\n code: 'transition-duplicate-component',\n item,\n token,\n message: `\"${item}\" has more than one transition property`,\n }\n }\n property = token\n continue\n }\n\n return {\n code: 'transition-invalid-token',\n item,\n token,\n message: `\"${token}\" is not valid in a CSS transition`,\n }\n }\n\n if (\n property === 'none' &&\n (duration !== undefined ||\n delay !== undefined ||\n timingFunction !== undefined ||\n behavior !== undefined)\n ) {\n return {\n code: 'transition-invalid-list',\n item,\n message: '\"none\" cannot be combined with other transition components',\n }\n }\n\n return {\n property: property ?? 'all',\n timing: {\n type: 'css',\n duration: duration ?? '0s',\n timingFunction: timingFunction ?? 'ease',\n },\n delay: delay ?? '0s',\n behavior: behavior ?? 'normal',\n }\n}\n\n/**\n * parses CSS transition shorthand or an exact configured preset name.\n *\n * duration-shaped values and css-reserved names always use css semantics.\n * preset matching is exact and never infers aliases.\n */\nexport function parseTransition(\n input: string,\n presetNames: ReadonlySet<string> = noPresetNames\n): TransitionParseResult {\n const value = input.trim()\n if (!value) {\n return {\n ok: false,\n diagnostics: [\n {\n code: 'transition-empty-item',\n message: 'transition cannot be empty',\n },\n ],\n }\n }\n\n if (globalValues.has(value)) {\n return {\n ok: true,\n value: {\n kind: 'global',\n value: value as TransitionGlobalIR['value'],\n },\n }\n }\n\n if (\n identifierPattern.test(value) &&\n !reservedPresetNames.has(value) &&\n presetNames.has(value)\n ) {\n return {\n ok: true,\n value: {\n kind: 'transition',\n entries: [\n {\n property: 'all',\n timing: { type: 'preset', name: value },\n delay: '0s',\n behavior: 'normal',\n },\n ],\n },\n }\n }\n\n const items = splitTopLevel(value, ',')\n if (items === null) {\n return {\n ok: false,\n diagnostics: [\n {\n code: 'transition-invalid-token',\n item: value,\n message: `\"${value}\" is not a balanced CSS transition`,\n },\n ],\n }\n }\n\n const entries: TransitionEntry[] = []\n const diagnostics: TransitionDiagnostic[] = []\n for (const item of items) {\n if (!item) {\n diagnostics.push({\n code: 'transition-empty-item',\n message: 'transition lists cannot contain an empty item',\n })\n continue\n }\n const parsed = parseSingleTransition(item)\n if ('code' in parsed) diagnostics.push(parsed)\n else entries.push(parsed)\n }\n\n let hasNone = false\n for (let index = 0; index < entries.length; index++) {\n if (entries[index].property === 'none') {\n hasNone = true\n break\n }\n }\n if (hasNone && entries.length > 1) {\n diagnostics.push({\n code: 'transition-invalid-list',\n message: '\"none\" cannot be combined with other transition items',\n })\n }\n\n return diagnostics.length\n ? { ok: false, diagnostics }\n : { ok: true, value: { kind: 'transition', entries } }\n}\n\nfunction parseLonghandList(value: string | undefined, fallback: string): string[] | null {\n if (value === undefined) return [fallback]\n const values = splitTopLevel(value, ',')\n if (!values?.length) return null\n for (let index = 0; index < values.length; index++) {\n if (!values[index]) return null\n }\n return values\n}\n\n/**\n * lowers the five CSS transition longhands into the same IR as the shorthand.\n * css list repetition is based on transition-property, as in the browser.\n */\nexport function parseTransitionLonghands(\n input: TransitionLonghands\n): TransitionParseResult {\n const properties = parseLonghandList(input.transitionProperty, 'all')\n const durations = parseLonghandList(input.transitionDuration, '0s')\n const timings = parseLonghandList(input.transitionTimingFunction, 'ease')\n const delays = parseLonghandList(input.transitionDelay, '0s')\n const behaviors = parseLonghandList(input.transitionBehavior, 'normal')\n\n if (!properties || !durations || !timings || !delays || !behaviors) {\n return {\n ok: false,\n diagnostics: [\n {\n code: 'transition-invalid-list',\n message: 'transition longhands must be non-empty comma-separated lists',\n },\n ],\n }\n }\n\n const entries: TransitionEntry[] = []\n const diagnostics: TransitionDiagnostic[] = []\n for (let index = 0; index < properties.length; index++) {\n const property = properties[index]\n const duration = durations[index % durations.length]\n const timingFunction = timings[index % timings.length]\n const delay = delays[index % delays.length]\n const behavior = behaviors[index % behaviors.length]\n\n if (\n globalValues.has(property) ||\n globalValues.has(duration) ||\n globalValues.has(timingFunction) ||\n globalValues.has(delay) ||\n globalValues.has(behavior)\n ) {\n diagnostics.push({\n code: 'transition-invalid-list',\n message:\n 'CSS-wide values cannot be mixed into transition longhand lists; use the transition shorthand global value',\n })\n break\n }\n if (!(identifierPattern.test(property) || /^--[-_a-zA-Z0-9]+$/.test(property))) {\n diagnostics.push({\n code: 'transition-invalid-token',\n token: property,\n message: `\"${property}\" is not a transition property`,\n })\n }\n if (!isTime(duration) || Number(duration.match(timePattern)?.[1]) < 0) {\n diagnostics.push({\n code: 'transition-invalid-duration',\n token: duration,\n message: `\"${duration}\" is not a non-negative transition duration`,\n })\n }\n if (!isTimingFunction(timingFunction)) {\n diagnostics.push({\n code: 'transition-invalid-token',\n token: timingFunction,\n message: `\"${timingFunction}\" is not a transition timing function`,\n })\n }\n if (!isTime(delay)) {\n diagnostics.push({\n code: 'transition-invalid-token',\n token: delay,\n message: `\"${delay}\" is not a transition delay`,\n })\n }\n if (!behaviorValues.has(behavior)) {\n diagnostics.push({\n code: 'transition-invalid-token',\n token: behavior,\n message: `\"${behavior}\" is not a transition behavior`,\n })\n }\n\n entries.push({\n property,\n timing: { type: 'css', duration, timingFunction },\n delay,\n behavior: behavior as TransitionBehavior,\n })\n }\n\n let hasNone = false\n for (let index = 0; index < properties.length; index++) {\n if (properties[index] === 'none') {\n hasNone = true\n break\n }\n }\n if (hasNone && properties.length > 1) {\n diagnostics.push({\n code: 'transition-invalid-list',\n message: '\"none\" cannot be combined with other transition properties',\n })\n }\n\n return diagnostics.length\n ? { ok: false, diagnostics }\n : { ok: true, value: { kind: 'transition', entries } }\n}\n\nexport function serializeTransition(value: ParsedTransition): string | null {\n if (value.kind === 'global') return value.value\n if (value.enter || value.exit || value.config) return null\n for (let index = 0; index < value.entries.length; index++) {\n if (value.entries[index].timing.type === 'preset') return null\n }\n\n let serialized = ''\n for (let index = 0; index < value.entries.length; index++) {\n const entry = value.entries[index]\n if (index) serialized += ', '\n if (entry.timing.type !== 'css') return null\n if (entry.property === 'none') {\n if (\n entry.timing.duration !== '0s' ||\n entry.timing.timingFunction !== 'ease' ||\n entry.delay !== '0s' ||\n entry.behavior !== 'normal'\n ) {\n return null\n }\n serialized += 'none'\n continue\n }\n serialized += `${entry.property} ${entry.timing.duration} ${entry.timing.timingFunction} ${entry.delay} ${entry.behavior}`\n }\n return serialized\n}\n"
|
|
10
|
+
]
|
|
11
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type TransitionParseResult } from "./transition";
|
|
2
|
+
export type TransitionLonghandName = "transitionProperty" | "transitionDuration" | "transitionTimingFunction" | "transitionDelay" | "transitionBehavior";
|
|
3
|
+
export interface TransitionContribution {
|
|
4
|
+
/** the authored prop, in authored order */
|
|
5
|
+
prop: "transition" | TransitionLonghandName;
|
|
6
|
+
value: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Merges any mix of `transition` shorthand and longhand contributions, in
|
|
10
|
+
* authored order, into one TransitionIR. Last-wins per longhand; the
|
|
11
|
+
* shorthand resets all five.
|
|
12
|
+
*/
|
|
13
|
+
export declare function alignTransitionContributions(contributions: readonly TransitionContribution[], presetNames?: ReadonlySet<string>): TransitionParseResult;
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=transitionAlign.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mappings": "AA0BA,cAMO,6BACA;AAEP,YAAY,yBACR,uBACA,uBACA,6BACA,oBACA;AAEJ,iBAAiB,uBAAuB;;CAEtC,MAAM,eAAe;CACrB;;;;;;;AAwBF,OAAO,iBAAS,6BACd,wBAAwB,0BACxB,cAAc,sBACb",
|
|
3
|
+
"names": [],
|
|
4
|
+
"sources": [
|
|
5
|
+
"src/transitionAlign.ts"
|
|
6
|
+
],
|
|
7
|
+
"version": 3,
|
|
8
|
+
"sourcesContent": [
|
|
9
|
+
"// Phase 6 item 4: align transition shorthand and longhand behavior.\n//\n// Ruling (2026-07-31, design record \"Web-aligned transitions\"): transitions\n// follow the border-family precedent — last-wins per longhand in authored\n// order, the shorthand expands-and-resets — because the five transition\n// longhands are real independent CSS longhands whose composition CSS fully\n// defines. The merge SUBSTRATE is the five longhand LISTS, not the zipped\n// entries: `transition=\"opacity 200ms\"` followed by `transitionDelay=\"50ms\"`\n// must yield opacity/200ms/50ms, which only works when delay replaces the\n// delay list and the zip (property list drives, shorter lists cycle) happens\n// at the end. Zipping and validation have one owner: final assembly goes\n// through parseTransitionLonghands.\n//\n// The one preset exception, where the transform no-invented-composition rule\n// applies: a preset occupies the fused duration+timingFunction pair and is\n// not decomposable into CSS components, so a duration or timing-function\n// longhand AFTER a preset shorthand is a diagnostic naming the fix.\n// property/delay/behavior compose freely around a preset. A longhand after a\n// global-value shorthand (`transition=\"inherit\"`) is a diagnostic for the\n// same reason: the global is whole-value and per-longhand override of it is\n// not representable without pretending to decompose it.\n//\n// Conditional transition clauses (`transition=\"200ms hover:400ms\"`) are\n// EXPLICITLY DEFERRED, not unconsidered: the record does not promise them and\n// they would pull the program engine into the transition IR.\n\nimport {\n parseTransition,\n parseTransitionLonghands,\n type PresetTransitionTiming,\n type TransitionEntry,\n type TransitionLonghands,\n type TransitionParseResult,\n} from './transition'\n\nexport type TransitionLonghandName =\n | 'transitionProperty'\n | 'transitionDuration'\n | 'transitionTimingFunction'\n | 'transitionDelay'\n | 'transitionBehavior'\n\nexport interface TransitionContribution {\n /** the authored prop, in authored order */\n prop: 'transition' | TransitionLonghandName\n value: string\n}\n\ninterface MergeState {\n global: string | null\n preset: PresetTransitionTiming | null\n /** each slot holds the LAST contribution's list text, or undefined = CSS default */\n lists: Partial<Record<TransitionLonghandName, string>>\n}\n\nconst timingLonghands: ReadonlySet<TransitionLonghandName> = new Set([\n 'transitionDuration',\n 'transitionTimingFunction',\n])\n\nfunction listText(values: readonly string[]): string {\n return values.join(', ')\n}\n\n/**\n * Merges any mix of `transition` shorthand and longhand contributions, in\n * authored order, into one TransitionIR. Last-wins per longhand; the\n * shorthand resets all five.\n */\nexport function alignTransitionContributions(\n contributions: readonly TransitionContribution[],\n presetNames?: ReadonlySet<string>\n): TransitionParseResult {\n const state: MergeState = { global: null, preset: null, lists: {} }\n\n for (const contribution of contributions) {\n if (contribution.prop === 'transition') {\n const parsed = parseTransition(contribution.value, presetNames)\n if (!parsed.ok) return parsed\n\n // a shorthand resets everything that came before it\n state.global = null\n state.preset = null\n state.lists = {}\n\n if (parsed.value.kind === 'global') {\n state.global = parsed.value.value\n continue\n }\n const entries = parsed.value.entries\n const presetEntry = entries.find((entry) => entry.timing.type === 'preset')\n if (presetEntry) {\n state.preset = presetEntry.timing as PresetTransitionTiming\n state.lists.transitionProperty = listText(entries.map((entry) => entry.property))\n state.lists.transitionDelay = listText(entries.map((entry) => entry.delay))\n state.lists.transitionBehavior = listText(entries.map((entry) => entry.behavior))\n continue\n }\n state.lists.transitionProperty = listText(entries.map((entry) => entry.property))\n state.lists.transitionDuration = listText(\n entries.map((entry) => (entry.timing as { duration: string }).duration)\n )\n state.lists.transitionTimingFunction = listText(\n entries.map(\n (entry) => (entry.timing as { timingFunction: string }).timingFunction\n )\n )\n state.lists.transitionDelay = listText(entries.map((entry) => entry.delay))\n state.lists.transitionBehavior = listText(entries.map((entry) => entry.behavior))\n continue\n }\n\n if (state.global) {\n return {\n ok: false,\n diagnostics: [\n {\n code: 'transition-invalid-list',\n token: contribution.prop,\n message: `\"${contribution.prop}\" cannot override the CSS-wide transition \"${state.global}\" per longhand; restate the whole transition`,\n },\n ],\n }\n }\n if (state.preset && timingLonghands.has(contribution.prop)) {\n return {\n ok: false,\n diagnostics: [\n {\n code: 'transition-invalid-list',\n token: contribution.prop,\n message: `\"${contribution.prop}\" cannot partially override the \"${state.preset.name}\" preset — a preset's timing is not decomposable into CSS components; restate \\`transition\\` with CSS timing or change the preset`,\n },\n ],\n }\n }\n state.lists[contribution.prop] = contribution.value\n }\n\n if (state.global) {\n return {\n ok: true,\n value: { kind: 'global', value: state.global as any },\n }\n }\n\n if (state.preset) {\n // validate and zip the three CSS-shaped slots through the one owner, then\n // transplant the preset timing onto every zipped entry\n const zipped = parseTransitionLonghands({\n transitionProperty: state.lists.transitionProperty,\n transitionDelay: state.lists.transitionDelay,\n transitionBehavior: state.lists.transitionBehavior,\n })\n if (!zipped.ok || zipped.value.kind !== 'transition') return zipped\n const preset = state.preset\n const entries: TransitionEntry[] = zipped.value.entries.map((entry) => ({\n ...entry,\n timing: preset,\n }))\n return { ok: true, value: { kind: 'transition', entries } }\n }\n\n return parseTransitionLonghands(state.lists as TransitionLonghands)\n}\n"
|
|
10
|
+
]
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { TransitionParseResult } from "./transition";
|
|
2
|
+
export type LegacyTransitionValue = string | Readonly<Record<string, unknown>> | readonly [string, Readonly<Record<string, unknown>>];
|
|
3
|
+
/**
|
|
4
|
+
* lowers the legacy array and per-property object forms into transition IR.
|
|
5
|
+
* per-property presets and spring overrides remain explicit driver config.
|
|
6
|
+
*/
|
|
7
|
+
export declare function migrateLegacyTransition(input: LegacyTransitionValue, presetNames: ReadonlySet<string>): TransitionParseResult;
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=transitionLegacy.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mappings": "AAAA,cAIE,6BACK;AAGP,YAAY,iCAER,SAAS,6CACS,SAAS;;;;;AAmC/B,OAAO,iBAAS,wBACd,OAAO,uBACP,aAAa,sBACZ",
|
|
3
|
+
"names": [],
|
|
4
|
+
"sources": [
|
|
5
|
+
"src/transitionLegacy.ts"
|
|
6
|
+
],
|
|
7
|
+
"version": 3,
|
|
8
|
+
"sourcesContent": [
|
|
9
|
+
"import type {\n TransitionDiagnostic,\n TransitionEntry,\n TransitionIR,\n TransitionParseResult,\n} from './transition'\nimport { parseTransition } from './transition'\n\nexport type LegacyTransitionValue =\n | string\n | Readonly<Record<string, unknown>>\n | readonly [string, Readonly<Record<string, unknown>>]\n\nconst legacyControlKeys = new Set([\n 'default',\n 'enter',\n 'exit',\n 'delay',\n 'stiffness',\n 'damping',\n 'mass',\n 'tension',\n 'friction',\n 'velocity',\n 'overshootClamping',\n 'duration',\n 'bounciness',\n 'speed',\n])\nconst springConfigKeys = new Set([\n 'stiffness',\n 'damping',\n 'mass',\n 'tension',\n 'friction',\n 'velocity',\n 'overshootClamping',\n 'duration',\n 'bounciness',\n 'speed',\n])\n\n/**\n * lowers the legacy array and per-property object forms into transition IR.\n * per-property presets and spring overrides remain explicit driver config.\n */\nexport function migrateLegacyTransition(\n input: LegacyTransitionValue,\n presetNames: ReadonlySet<string>\n): TransitionParseResult {\n if (typeof input === 'string') return parseTransition(input, presetNames)\n\n const inputIsTuple = Array.isArray(input)\n const options = (\n inputIsTuple\n ? (input as readonly [string, Readonly<Record<string, unknown>>])[1]\n : input\n ) as Readonly<Record<string, unknown>>\n const defaultValue = inputIsTuple\n ? (input as readonly [string, Readonly<Record<string, unknown>>])[0]\n : options.default\n const diagnostics: TransitionDiagnostic[] = []\n\n const delay =\n options.delay === undefined\n ? undefined\n : typeof options.delay === 'number' && Number.isFinite(options.delay)\n ? `${options.delay}ms`\n : null\n\n if (delay === null) {\n diagnostics.push({\n code: 'transition-invalid-token',\n token: String(options.delay),\n message: 'legacy transition delay must be a finite number of milliseconds',\n })\n }\n\n const resolveTiming = (\n rawValue: string,\n field: string\n ): TransitionEntry | undefined => {\n const parsed = parseTransition(rawValue, presetNames)\n if (!parsed.ok) {\n for (let index = 0; index < parsed.diagnostics.length; index++) {\n const diagnostic = parsed.diagnostics[index]\n diagnostics.push({\n ...diagnostic,\n message: `legacy transition ${field}: ${diagnostic.message}`,\n })\n }\n return\n }\n if (\n parsed.value.kind !== 'transition' ||\n parsed.value.entries.length !== 1 ||\n parsed.value.entries[0].property !== 'all'\n ) {\n diagnostics.push({\n code: 'transition-invalid-token',\n token: rawValue,\n message: `legacy transition ${field} must be a preset or CSS timing value`,\n })\n return\n }\n return parsed.value.entries[0]\n }\n\n let defaultTransition: TransitionEntry | undefined\n if (defaultValue !== undefined) {\n if (typeof defaultValue === 'string') {\n defaultTransition = resolveTiming(defaultValue, 'default')\n } else {\n diagnostics.push({\n code: 'transition-invalid-token',\n token: String(defaultValue),\n message: 'legacy transition default must be a preset or CSS timing value',\n })\n }\n }\n\n const resolveLifecycle = (field: 'enter' | 'exit'): TransitionEntry | undefined => {\n const rawValue = options[field]\n if (rawValue === undefined) return\n if (typeof rawValue === 'string') return resolveTiming(rawValue, field)\n diagnostics.push({\n code: 'transition-invalid-token',\n token: String(rawValue),\n message: `legacy transition ${field} must be a preset or CSS timing value`,\n })\n return\n }\n const enter = resolveLifecycle('enter')\n const exit = resolveLifecycle('exit')\n\n const config: Record<string, unknown> = {}\n for (const key of springConfigKeys) {\n if (options[key] !== undefined) config[key] = options[key]\n }\n const hasConfig = Object.keys(config).length > 0\n\n const entries: TransitionEntry[] = []\n if (defaultTransition) {\n if (defaultTransition.timing.type === 'css' && hasConfig) {\n diagnostics.push({\n code: 'transition-invalid-token',\n token: String(defaultValue),\n message: 'spring overrides cannot be applied to CSS transition timing',\n })\n }\n entries.push({\n ...defaultTransition,\n delay: delay ?? defaultTransition.delay,\n timing:\n defaultTransition.timing.type === 'preset' && hasConfig\n ? { ...defaultTransition.timing, config }\n : defaultTransition.timing,\n })\n }\n\n for (const [property, rawValue] of Object.entries(options)) {\n if (legacyControlKeys.has(property)) continue\n\n let transition: TransitionEntry | undefined\n let propertyConfig: Readonly<Record<string, unknown>> | undefined\n if (typeof rawValue === 'string') {\n transition = resolveTiming(rawValue, property)\n if (!transition) continue\n } else if (rawValue && typeof rawValue === 'object' && !Array.isArray(rawValue)) {\n propertyConfig = rawValue as Readonly<Record<string, unknown>>\n if (propertyConfig.type === undefined) {\n transition = defaultTransition\n } else if (typeof propertyConfig.type === 'string') {\n transition = resolveTiming(propertyConfig.type, property)\n if (!transition) continue\n } else {\n diagnostics.push({\n code: 'transition-invalid-token',\n token: property,\n message: `legacy transition property \"${property}\" has a non-string type`,\n })\n continue\n }\n } else {\n diagnostics.push({\n code: 'transition-invalid-token',\n token: property,\n message: `legacy transition property \"${property}\" needs a preset, CSS timing value, or default`,\n })\n continue\n }\n\n if (!transition) {\n diagnostics.push({\n code: 'transition-invalid-token',\n token: property,\n message: `legacy transition property \"${property}\" needs a preset, CSS timing value, or default`,\n })\n continue\n }\n\n const propertyOverrides = propertyConfig\n ? Object.fromEntries(\n Object.entries(propertyConfig).filter(([key]) => key !== 'type')\n )\n : undefined\n const hasPropertyOverrides =\n propertyOverrides !== undefined && Object.keys(propertyOverrides).length > 0\n if (hasPropertyOverrides && transition.timing.type === 'css') {\n diagnostics.push({\n code: 'transition-invalid-token',\n token: property,\n message: `legacy transition property \"${property}\" cannot apply spring overrides to CSS timing`,\n })\n continue\n }\n entries.push({\n ...transition,\n property,\n timing:\n transition.timing.type === 'preset' && propertyOverrides && hasPropertyOverrides\n ? { ...transition.timing, config: propertyOverrides }\n : transition.timing,\n delay: delay ?? transition.delay,\n })\n }\n\n if (diagnostics.length) return { ok: false, diagnostics }\n const value: TransitionIR = {\n kind: 'transition',\n entries,\n ...(enter ? { enter: { ...enter, delay: delay ?? enter.delay } } : {}),\n ...(exit ? { exit: { ...exit, delay: delay ?? exit.delay } } : {}),\n ...(hasConfig ? { config } : {}),\n }\n return { ok: true, value }\n}\n"
|
|
10
|
+
]
|
|
11
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { ParsedTransition } from "./transition";
|
|
2
|
+
export type NativeTransitionPlatform = "android" | "ios";
|
|
3
|
+
export interface NativeTransitionTarget {
|
|
4
|
+
platform: NativeTransitionPlatform;
|
|
5
|
+
reactNativeMinor: number;
|
|
6
|
+
androidApi?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface NativeTransitionCapability {
|
|
9
|
+
properties: readonly string[];
|
|
10
|
+
minimumReactNativeMinor: number;
|
|
11
|
+
platforms: readonly NativeTransitionPlatform[];
|
|
12
|
+
interpolation: "continuous" | "discrete";
|
|
13
|
+
note: string;
|
|
14
|
+
}
|
|
15
|
+
export interface NativeTransitionDiagnostic {
|
|
16
|
+
code: "native-transition-css-global" | "native-transition-property" | "native-transition-timing" | "native-transition-delay" | "native-transition-behavior" | "native-transition-filter";
|
|
17
|
+
property?: string;
|
|
18
|
+
message: string;
|
|
19
|
+
}
|
|
20
|
+
export type NativeTransitionValidationResult = {
|
|
21
|
+
ok: true;
|
|
22
|
+
} | {
|
|
23
|
+
ok: false;
|
|
24
|
+
diagnostics: readonly NativeTransitionDiagnostic[];
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* rn animated capability changes relevant to the v3 rn >= 0.82 target.
|
|
28
|
+
*
|
|
29
|
+
* 0.84 added broad non-layout native-driver coverage. 0.85 added layout
|
|
30
|
+
* properties through the shared Animated/Reanimated backend.
|
|
31
|
+
*/
|
|
32
|
+
export declare const nativeTransitionCapabilities: readonly NativeTransitionCapability[];
|
|
33
|
+
/**
|
|
34
|
+
* validates a normalized transition for a concrete native target.
|
|
35
|
+
*
|
|
36
|
+
* pass the resolved destination values when property support depends on the
|
|
37
|
+
* value, as with filter functions.
|
|
38
|
+
*/
|
|
39
|
+
export declare function validateNativeTransition(transition: ParsedTransition, target: NativeTransitionTarget, transitionedValues?: Readonly<Record<string, string>>): NativeTransitionValidationResult;
|
|
40
|
+
|
|
41
|
+
//# sourceMappingURL=transitionNative.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mappings": "AAAA,cAAc,wBAAyC;AAEvD,YAAY,2BAA2B,YAAY;AAEnD,iBAAiB,uBAAuB;CACtC,UAAU;CACV;CACA;;AAGF,iBAAiB,2BAA2B;CAC1C;CACA;CACA,oBAAoB;CACpB,eAAe,eAAe;CAC9B;;AAGF,iBAAiB,2BAA2B;CAC1C,MACI,iCACA,+BACA,6BACA,4BACA,+BACA;CACJ;CACA;;AAGF,YAAY,mCACR;CAAE,IAAI;IACN;CAAE,IAAI;CAAO,sBAAsB;;;;;;;;AAWvC,OAAO,cAAM,uCAAuC;;;;;;;AAoRpD,OAAO,iBAAS,yBACd,YAAY,kBACZ,QAAQ,wBACR,qBAAoB,SAAS,0BAC5B",
|
|
3
|
+
"names": [],
|
|
4
|
+
"sources": [
|
|
5
|
+
"src/transitionNative.ts"
|
|
6
|
+
],
|
|
7
|
+
"version": 3,
|
|
8
|
+
"sourcesContent": [
|
|
9
|
+
"import type { ParsedTransition, TransitionEntry } from './transition'\n\nexport type NativeTransitionPlatform = 'android' | 'ios'\n\nexport interface NativeTransitionTarget {\n platform: NativeTransitionPlatform\n reactNativeMinor: number\n androidApi?: number\n}\n\nexport interface NativeTransitionCapability {\n properties: readonly string[]\n minimumReactNativeMinor: number\n platforms: readonly NativeTransitionPlatform[]\n interpolation: 'continuous' | 'discrete'\n note: string\n}\n\nexport interface NativeTransitionDiagnostic {\n code:\n | 'native-transition-css-global'\n | 'native-transition-property'\n | 'native-transition-timing'\n | 'native-transition-delay'\n | 'native-transition-behavior'\n | 'native-transition-filter'\n property?: string\n message: string\n}\n\nexport type NativeTransitionValidationResult =\n | { ok: true }\n | { ok: false; diagnostics: readonly NativeTransitionDiagnostic[] }\n\nconst bothPlatforms: readonly NativeTransitionPlatform[] = ['android', 'ios']\nconst iosPlatform: readonly NativeTransitionPlatform[] = ['ios']\n\n/**\n * rn animated capability changes relevant to the v3 rn >= 0.82 target.\n *\n * 0.84 added broad non-layout native-driver coverage. 0.85 added layout\n * properties through the shared Animated/Reanimated backend.\n */\nexport const nativeTransitionCapabilities: readonly NativeTransitionCapability[] = [\n {\n properties: ['opacity', 'transform', 'x', 'y', 'rotate', 'scale', 'filter'],\n minimumReactNativeMinor: 82,\n platforms: bothPlatforms,\n interpolation: 'continuous',\n note: 'baseline native-driver properties; filter animation landed in RN 0.82',\n },\n {\n properties: [\n 'backgroundColor',\n 'borderRadius',\n 'borderTopLeftRadius',\n 'borderTopRightRadius',\n 'borderBottomRightRadius',\n 'borderBottomLeftRadius',\n 'boxShadow',\n 'outlineColor',\n 'outlineOffset',\n 'outlineWidth',\n 'transformOrigin',\n 'zIndex',\n ],\n minimumReactNativeMinor: 84,\n platforms: bothPlatforms,\n interpolation: 'continuous',\n note: 'continuous properties explicitly recorded for the RN 0.84 backend',\n },\n {\n properties: [\n 'backfaceVisibility',\n 'isolation',\n 'mixBlendMode',\n 'outlineStyle',\n 'overflow',\n 'pointerEvents',\n 'position',\n ],\n minimumReactNativeMinor: 84,\n platforms: bothPlatforms,\n interpolation: 'discrete',\n note: 'the RN 0.84 backend can set these values, but native has no CSS allow-discrete transition semantics',\n },\n {\n properties: ['cursor'],\n minimumReactNativeMinor: 84,\n platforms: iosPlatform,\n interpolation: 'discrete',\n note: 'cursor is limited to auto and pointer on iOS 17 or newer',\n },\n {\n // the capability survey verifies width as the representative RN 0.85\n // layout animation. Keep the matrix conservative until the rest of the\n // layout property set has matching source evidence.\n properties: ['width'],\n minimumReactNativeMinor: 85,\n platforms: bothPlatforms,\n interpolation: 'continuous',\n note: 'layout animation explicitly verified for the RN 0.85 shared backend',\n },\n]\n\nfunction capabilityFor(property: string): NativeTransitionCapability | undefined {\n for (let index = 0; index < nativeTransitionCapabilities.length; index++) {\n const capability = nativeTransitionCapabilities[index]\n for (\n let propertyIndex = 0;\n propertyIndex < capability.properties.length;\n propertyIndex++\n ) {\n if (capability.properties[propertyIndex] === property) return capability\n }\n }\n return undefined\n}\n\nconst baseFilterFunctions: ReadonlySet<string> = new Set(['brightness', 'opacity'])\nconst expandedAndroidFilterFunctions: ReadonlySet<string> = new Set([\n 'blur',\n 'contrast',\n 'drop-shadow',\n 'grayscale',\n 'hue-rotate',\n 'saturate',\n])\nconst filterFunctionPattern = /([a-z-]+)\\s*\\(/g\n\nfunction appendDiagnostics(\n target: NativeTransitionDiagnostic[],\n source: readonly NativeTransitionDiagnostic[]\n): void {\n for (let index = 0; index < source.length; index++) target.push(source[index])\n}\n\nfunction validateFilter(\n value: string,\n target: NativeTransitionTarget\n): NativeTransitionDiagnostic | undefined {\n filterFunctionPattern.lastIndex = 0\n for (\n let match = filterFunctionPattern.exec(value);\n match;\n match = filterFunctionPattern.exec(value)\n ) {\n const name = match[1]\n if (baseFilterFunctions.has(name)) continue\n\n if (target.platform === 'ios') {\n return {\n code: 'native-transition-filter',\n property: 'filter',\n message: `filter function \"${name}()\" is not supported on iOS`,\n }\n }\n\n if (!expandedAndroidFilterFunctions.has(name)) {\n return {\n code: 'native-transition-filter',\n property: 'filter',\n message: `filter function \"${name}()\" is not supported on Android`,\n }\n }\n if (target.reactNativeMinor < 83) {\n return {\n code: 'native-transition-filter',\n property: 'filter',\n message: `filter function \"${name}()\" requires React Native 0.83 or newer`,\n }\n }\n if ((target.androidApi ?? 0) < 31) {\n return {\n code: 'native-transition-filter',\n property: 'filter',\n message: 'expanded filter functions require Android API 31 or newer',\n }\n }\n }\n return undefined\n}\n\nfunction validateProperty(\n property: string,\n target: NativeTransitionTarget,\n transitionedValues: Readonly<Record<string, string>>\n): NativeTransitionDiagnostic[] {\n const diagnostics: NativeTransitionDiagnostic[] = []\n\n if (property.startsWith('--')) {\n diagnostics.push({\n code: 'native-transition-property',\n property,\n message: 'CSS custom properties are not supported on native',\n })\n return diagnostics\n }\n\n const capability = capabilityFor(property)\n if (!capability) {\n diagnostics.push({\n code: 'native-transition-property',\n property,\n message: `\"${property}\" transitions are not supported on native`,\n })\n return diagnostics\n }\n if (!capability.platforms.includes(target.platform)) {\n diagnostics.push({\n code: 'native-transition-property',\n property,\n message: `\"${property}\" transitions are not supported on ${target.platform}`,\n })\n return diagnostics\n }\n if (target.reactNativeMinor < capability.minimumReactNativeMinor) {\n diagnostics.push({\n code: 'native-transition-property',\n property,\n message: `\"${property}\" transitions require React Native 0.${capability.minimumReactNativeMinor} or newer`,\n })\n return diagnostics\n }\n\n if (capability.interpolation === 'discrete') {\n diagnostics.push({\n code: 'native-transition-property',\n property,\n message: `\"${property}\" is discrete and native has no allow-discrete transition semantics`,\n })\n return diagnostics\n }\n\n if (property === 'filter') {\n const value = transitionedValues.filter\n if (value === undefined) {\n diagnostics.push({\n code: 'native-transition-filter',\n property,\n message: 'filter transition validation requires the resolved destination value',\n })\n return diagnostics\n }\n const diagnostic = validateFilter(value, target)\n if (diagnostic) diagnostics.push(diagnostic)\n }\n return diagnostics\n}\n\nfunction validateEntry(\n entry: TransitionEntry,\n target: NativeTransitionTarget,\n transitionedValues: Readonly<Record<string, string>>\n): NativeTransitionDiagnostic[] {\n const diagnostics: NativeTransitionDiagnostic[] = []\n\n if (entry.property === 'none') return diagnostics\n\n if (entry.behavior === 'allow-discrete') {\n diagnostics.push({\n code: 'native-transition-behavior',\n property: entry.property,\n message: 'allow-discrete transition behavior is not supported on native',\n })\n }\n\n if (entry.timing.type === 'css') {\n if (\n /^(?:steps|linear)\\(/.test(entry.timing.timingFunction) ||\n entry.timing.timingFunction === 'step-start' ||\n entry.timing.timingFunction === 'step-end'\n ) {\n diagnostics.push({\n code: 'native-transition-timing',\n property: entry.property,\n message: `timing function \"${entry.timing.timingFunction}\" is not supported on native`,\n })\n }\n }\n if (Number.parseFloat(entry.delay) < 0) {\n diagnostics.push({\n code: 'native-transition-delay',\n property: entry.property,\n message: `negative transition delay \"${entry.delay}\" is not supported on native`,\n })\n }\n\n if (entry.property !== 'all') {\n appendDiagnostics(\n diagnostics,\n validateProperty(entry.property, target, transitionedValues)\n )\n return diagnostics\n }\n\n let hasProperty = false\n for (const property in transitionedValues) {\n if (!Object.prototype.hasOwnProperty.call(transitionedValues, property)) continue\n hasProperty = true\n appendDiagnostics(diagnostics, validateProperty(property, target, transitionedValues))\n }\n if (!hasProperty) {\n diagnostics.push({\n code: 'native-transition-property',\n property: 'all',\n message:\n '\"all\" transition validation requires the concrete changed native properties',\n })\n }\n return diagnostics\n}\n\n/**\n * validates a normalized transition for a concrete native target.\n *\n * pass the resolved destination values when property support depends on the\n * value, as with filter functions.\n */\nexport function validateNativeTransition(\n transition: ParsedTransition,\n target: NativeTransitionTarget,\n transitionedValues: Readonly<Record<string, string>> = {}\n): NativeTransitionValidationResult {\n if (transition.kind === 'global') {\n return {\n ok: false,\n diagnostics: [\n {\n code: 'native-transition-css-global',\n message: `CSS-wide value \"${transition.value}\" is not supported on native`,\n },\n ],\n }\n }\n\n const diagnostics: NativeTransitionDiagnostic[] = []\n if (transition.enter) {\n appendDiagnostics(\n diagnostics,\n validateEntry(transition.enter, target, transitionedValues)\n )\n }\n if (transition.exit) {\n appendDiagnostics(\n diagnostics,\n validateEntry(transition.exit, target, transitionedValues)\n )\n }\n for (let index = 0; index < transition.entries.length; index++) {\n appendDiagnostics(\n diagnostics,\n validateEntry(transition.entries[index], target, transitionedValues)\n )\n }\n return diagnostics.length ? { ok: false, diagnostics } : { ok: true }\n}\n"
|
|
10
|
+
]
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mappings": "AA4DA,OAAO,cAAM,0BAA0B",
|
|
3
|
+
"names": [],
|
|
4
|
+
"sources": [
|
|
5
|
+
"src/unitlessNumbers.ts"
|
|
6
|
+
],
|
|
7
|
+
"version": 3,
|
|
8
|
+
"sourcesContent": [
|
|
9
|
+
"const unitlessNumberPropertyNames = [\n 'animationIterationCount',\n 'aspectRatio',\n 'borderImageOutset',\n 'borderImageSlice',\n 'borderImageWidth',\n 'boxFlex',\n 'boxFlexGroup',\n 'boxOrdinalGroup',\n 'columnCount',\n 'flex',\n 'flexGrow',\n 'flexOrder',\n 'flexPositive',\n 'flexShrink',\n 'flexNegative',\n 'fontWeight',\n 'gap',\n 'columnGap',\n 'rowGap',\n 'gridRow',\n 'gridRowEnd',\n 'gridRowGap',\n 'gridRowStart',\n 'gridColumn',\n 'gridColumnEnd',\n 'gridColumnGap',\n 'gridColumnStart',\n 'lineClamp',\n 'opacity',\n 'order',\n 'orphans',\n 'tabSize',\n 'widows',\n 'zIndex',\n 'zoom',\n 'fillOpacity',\n 'floodOpacity',\n 'stopOpacity',\n 'strokeDasharray',\n 'strokeDashoffset',\n 'strokeMiterlimit',\n 'strokeOpacity',\n 'strokeWidth',\n 'scale',\n 'scaleX',\n 'scaleY',\n 'scaleZ',\n 'shadowOpacity',\n] as const\n\n// Mirrored from react-native-web-internals/src/modules/unitlessNumbers/index.tsx;\n// this package cannot import across that runtime boundary.\nconst unitlessNumbers = new Set<string>(unitlessNumberPropertyNames)\nfor (const prefix of ['ms', 'Moz', 'O', 'Webkit']) {\n for (const property of unitlessNumberPropertyNames) {\n unitlessNumbers.add(prefix + property[0].toUpperCase() + property.slice(1))\n }\n}\n\nexport const unitlessNumberProperties: ReadonlySet<string> = unitlessNumbers\n"
|
|
10
|
+
]
|
|
11
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
type KebabCase<Name extends string> = Name extends `${infer First}${infer Rest}` ? First extends Lowercase<First> ? `${First}${KebabCase<Rest>}` : `-${Lowercase<First>}${KebabCase<Rest>}` : Name;
|
|
2
|
+
declare const v6RenamedThemeNames: readonly ["accentBackground", "accentColor", "colorHover", "colorPress", "colorFocus", "backgroundHover", "backgroundPress", "backgroundFocus", "borderColor", "borderColorHover", "borderColorFocus", "borderColorPress", "outlineColor", "placeholderColor", "colorTransparent", "shadowColor"];
|
|
3
|
+
export declare const v6ThemeNameReplacements: { readonly [Name in (typeof v6RenamedThemeNames)[number]] : KebabCase<Name> };
|
|
4
|
+
export declare const v6RemovedThemeNames: readonly ["backgroundActive"];
|
|
5
|
+
export {};
|
|
6
|
+
|
|
7
|
+
//# sourceMappingURL=v6ThemeNames.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mappings": "KAAK,UAAU,uBAAuB,sBAAsB,cAAc,SACtE,cAAc,UAAU,YACnB,QAAQ,UAAU,cACjB,UAAU,SAAS,UAAU,UACnC;AAKJ,cAAM,+BACJ,oBACA,eACA,cACA,cACA,cACA,mBACA,mBACA,mBACA,eACA,oBACA,oBACA,oBACA,gBACA,oBACA,oBACA;AAGF,OAAO,cAAM,qCAQD,gBAAgB,gCAA+B,UAAU;AAGrE,OAAO,cAAM,+BAAuB",
|
|
3
|
+
"names": [],
|
|
4
|
+
"sources": [
|
|
5
|
+
"src/v6ThemeNames.ts"
|
|
6
|
+
],
|
|
7
|
+
"version": 3,
|
|
8
|
+
"sourcesContent": [
|
|
9
|
+
"type KebabCase<Name extends string> = Name extends `${infer First}${infer Rest}`\n ? First extends Lowercase<First>\n ? `${First}${KebabCase<Rest>}`\n : `-${Lowercase<First>}${KebabCase<Rest>}`\n : Name\n\n// style-grammar cannot import the theme package without reversing the dependency\n// graph. This tuple is the zero-dependency vocabulary; the config test compares it\n// exhaustively with every actual v5 theme key so a new camel-case built-in fails.\nconst v6RenamedThemeNames = [\n 'accentBackground',\n 'accentColor',\n 'colorHover',\n 'colorPress',\n 'colorFocus',\n 'backgroundHover',\n 'backgroundPress',\n 'backgroundFocus',\n 'borderColor',\n 'borderColorHover',\n 'borderColorFocus',\n 'borderColorPress',\n 'outlineColor',\n 'placeholderColor',\n 'colorTransparent',\n 'shadowColor',\n] as const\n\nexport const v6ThemeNameReplacements = Object.freeze(\n Object.fromEntries(\n v6RenamedThemeNames.map((name) => [\n name,\n name.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`),\n ])\n )\n) as {\n readonly [Name in (typeof v6RenamedThemeNames)[number]]: KebabCase<Name>\n}\n\nexport const v6RemovedThemeNames = ['backgroundActive'] as const\n"
|
|
10
|
+
]
|
|
11
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { ModifierRegistryView, ValueParseResult } from "./valueTypes";
|
|
2
|
+
export interface ValueSourceSpan {
|
|
3
|
+
kind: "base" | "payload" | "modifier" | "word";
|
|
4
|
+
start: number;
|
|
5
|
+
end: number;
|
|
6
|
+
}
|
|
7
|
+
export interface ValueParseWithSourceSpans {
|
|
8
|
+
result: ValueParseResult;
|
|
9
|
+
spans: readonly ValueSourceSpan[];
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* NOT A SAFETY CHECK. A successful parse says the value is well-formed FLAT
|
|
13
|
+
* VALUE SYNTAX. It does not say the value is safe to interpolate into CSS.
|
|
14
|
+
*
|
|
15
|
+
* `scanFlatValue` tracks the same constructs CSS's tokenizer does (comments,
|
|
16
|
+
* strings that a newline ends, `url()`, paren nesting), so a value whose
|
|
17
|
+
* delimiters do not actually close is an error rather than silently trusted.
|
|
18
|
+
* That covers the constructs a value can leave OPEN; it is not an injection
|
|
19
|
+
* guard. `emitValue` and `getStyleObject` used to call a
|
|
20
|
+
* `carriesTopLevelInjection` guard independently; it was removed by owner
|
|
21
|
+
* decision, on the grounds that a style value is authored rather than user
|
|
22
|
+
* input, and the web lowering emits payloads verbatim by contract.
|
|
23
|
+
*
|
|
24
|
+
* So the rule lives upstream of this file: never put a user-controlled string
|
|
25
|
+
* in a style value. A payload carrying `;}` closes its own rule and everything
|
|
26
|
+
* after it is a selector block the author never wrote. Do not gate emission on
|
|
27
|
+
* `parseValue(...).ok` either; it answers a syntax question, not a safety one.
|
|
28
|
+
*/
|
|
29
|
+
export declare function parseValue(input: string, registry: ModifierRegistryView): ValueParseResult;
|
|
30
|
+
/**
|
|
31
|
+
* Parses through the runtime scanner while also retaining source boundaries for
|
|
32
|
+
* editor tooling. The ordinary runtime path does not allocate these spans.
|
|
33
|
+
*/
|
|
34
|
+
export declare function parseValueWithSourceSpans(input: string, registry: ModifierRegistryView): ValueParseWithSourceSpans;
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=valueParser.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mappings": "AAoBA,cACE,sBAIA,wBACK;AAMP,iBAAiB,gBAAgB;CAC/B,MAAM,SAAS,YAAY,aAAa;CACxC;CACA;;AAGF,iBAAiB,0BAA0B;CACzC,QAAQ;CACR,gBAAgB;;;;;;;;;;;;;;;;;;;;AAqBlB,OAAO,iBAAS,WACd,eACA,UAAU,uBACT;;;;;AAQH,OAAO,iBAAS,0BACd,eACA,UAAU,uBACT",
|
|
3
|
+
"names": [],
|
|
4
|
+
"sources": [
|
|
5
|
+
"src/valueParser.ts"
|
|
6
|
+
],
|
|
7
|
+
"version": 3,
|
|
8
|
+
"sourcesContent": [
|
|
9
|
+
"// The universal flat value parser.\n//\n// value := base? clause*\n// clause := modifier (\":\" modifier)* \":\" payload\n//\n// See plans/dom-tailwind-flat-values.md — \"The universal value grammar\". The\n// parser only splits: `base` and every `payload` come back as trimmed raw CSS\n// component-value sequences with no interpretation and no token resolution.\n//\n// The split itself is `scanFlatValue`, the one lexer every implementation of\n// this grammar drives; this file is what that split MEANS, which is the part\n// the registry decides. Read `scanFlatValue.ts` for why a top-level colon,\n// brace or semicolon is structural and everything inside a string or a paren is\n// not.\n\nimport {\n scanFlatValue,\n type FlatScanErrorCode,\n type FlatValueVisitor,\n} from './scanFlatValue'\nimport type {\n ModifierRegistryView,\n ParsedClause,\n ValueParseError,\n ValueParseErrorCode,\n ValueParseResult,\n} from './valueTypes'\n\nconst CHAR_COLON = 58\n\nconst noClauses: readonly ParsedClause[] = Object.freeze([])\n\nexport interface ValueSourceSpan {\n kind: 'base' | 'payload' | 'modifier' | 'word'\n start: number\n end: number\n}\n\nexport interface ValueParseWithSourceSpans {\n result: ValueParseResult\n spans: readonly ValueSourceSpan[]\n}\n\n/**\n * NOT A SAFETY CHECK. A successful parse says the value is well-formed FLAT\n * VALUE SYNTAX. It does not say the value is safe to interpolate into CSS.\n *\n * `scanFlatValue` tracks the same constructs CSS's tokenizer does (comments,\n * strings that a newline ends, `url()`, paren nesting), so a value whose\n * delimiters do not actually close is an error rather than silently trusted.\n * That covers the constructs a value can leave OPEN; it is not an injection\n * guard. `emitValue` and `getStyleObject` used to call a\n * `carriesTopLevelInjection` guard independently; it was removed by owner\n * decision, on the grounds that a style value is authored rather than user\n * input, and the web lowering emits payloads verbatim by contract.\n *\n * So the rule lives upstream of this file: never put a user-controlled string\n * in a style value. A payload carrying `;}` closes its own rule and everything\n * after it is a selector block the author never wrote. Do not gate emission on\n * `parseValue(...).ok` either; it answers a syntax question, not a safety one.\n */\nexport function parseValue(\n input: string,\n registry: ModifierRegistryView\n): ValueParseResult {\n return parseValueInternal(input, registry)\n}\n\n/**\n * Parses through the runtime scanner while also retaining source boundaries for\n * editor tooling. The ordinary runtime path does not allocate these spans.\n */\nexport function parseValueWithSourceSpans(\n input: string,\n registry: ModifierRegistryView\n): ValueParseWithSourceSpans {\n const spans: ValueSourceSpan[] = []\n return {\n result: parseValueInternal(input, registry, spans),\n spans,\n }\n}\n\nfunction scanErrorMessage(code: FlatScanErrorCode, input: string, index: number): string {\n if (code === 'invalid-character') {\n return `\"${input[index]}\" cannot appear in a value: it would end the declaration or rule`\n }\n if (code === 'unterminated-string') {\n return `unterminated ${input[index]} string`\n }\n if (code === 'unterminated-comment') {\n return 'unterminated \"/*\" comment: it would swallow the rules after this one'\n }\n if (code === 'stray-comment-close') {\n return 'stray \"*/\": it would close a comment opened somewhere else'\n }\n return 'unterminated \"(\" in value'\n}\n\nfunction parseValueInternal(\n input: string,\n registry: ModifierRegistryView,\n sourceSpans?: ValueSourceSpan[]\n): ValueParseResult {\n let errors: ValueParseError[] | null = null\n let base: string | null = null\n let clauses: ParsedClause[] | null = null\n // modifiers of the clause whose payload is currently being collected\n let pending: string[] | null = null\n // where the base, or the current payload, starts before trimming, which is\n // what an empty payload has to point its diagnostic at\n let segmentStart = 0\n\n const addError = (\n code: ValueParseErrorCode,\n index: number,\n message: string,\n modifier?: string\n ): void => {\n ;(errors ||= []).push(\n modifier === undefined\n ? { code, index, message }\n : { code, index, message, modifier }\n )\n }\n\n const visitor: FlatValueVisitor = {\n segment(start, end, isBase) {\n sourceSpans?.push({ kind: isBase ? 'base' : 'payload', start, end })\n if (isBase) {\n base = start < end ? input.slice(start, end) : null\n return\n }\n if (start >= end) {\n addError(\n 'empty-payload',\n segmentStart,\n `the \"${pending!.join(':')}:\" clause has no value`\n )\n return\n }\n ;(clauses ||= []).push({ modifiers: pending!, payload: input.slice(start, end) })\n },\n\n // a clause word ended: everything before its last top-level colon is the\n // modifier chain, everything after it begins the payload\n chain(chainStart, chainEnd) {\n const modifiers: string[] = []\n let nameStart = chainStart\n for (let index = chainStart; index <= chainEnd; index++) {\n if (index !== chainEnd && input.charCodeAt(index) !== CHAR_COLON) continue\n if (index === nameStart) {\n addError('empty-modifier', index, 'a modifier chain has an empty segment')\n } else {\n const name = input.slice(nameStart, index)\n sourceSpans?.push({ kind: 'modifier', start: nameStart, end: index })\n if (registry.get(name) === undefined) {\n addError(\n 'unregistered-modifier',\n nameStart,\n `\"${name}\" is not a registered modifier`,\n name\n )\n }\n modifiers.push(name)\n }\n nameStart = index + 1\n }\n pending = modifiers\n segmentStart = chainEnd + 1\n return true\n },\n\n error(code, index) {\n addError(code, index, scanErrorMessage(code, input, index))\n },\n }\n\n if (sourceSpans) {\n // only the trailing bare word is a completion position the spans have no\n // other name for: every earlier word is inside a base or a payload span\n visitor.word = (start, end, isChain) => {\n if (!isChain && end === input.length) {\n sourceSpans.push({ kind: 'word', start, end })\n }\n }\n }\n\n scanFlatValue(input, visitor)\n\n if (errors !== null) return { ok: false, errors }\n return { ok: true, value: { base, clauses: clauses ?? noClauses } }\n}\n"
|
|
10
|
+
]
|
|
11
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export type ModifierKind = "state" | "theme" | "media" | "platform" | "group" | "container";
|
|
2
|
+
/** Maximum distinct non-platform conditions one emitted clause can encode. */
|
|
3
|
+
export declare const grammarMaxNonPlatformDepth = 5;
|
|
4
|
+
/**
|
|
5
|
+
* What the parser needs to know about registered modifiers. Implementations
|
|
6
|
+
* project the user config (media keys, root themes, platform names) plus the
|
|
7
|
+
* built-in state vocabulary into this view. Parameterized modifiers
|
|
8
|
+
* (`group-<name>-<state>`) are the implementation's concern — `get` receives
|
|
9
|
+
* the full authored spelling.
|
|
10
|
+
*/
|
|
11
|
+
export interface ModifierRegistryView {
|
|
12
|
+
get(name: string): ModifierKind | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Config-derived modifier trie lookup for authoring one canonical chain.
|
|
15
|
+
* Implementations that only parse values may omit it; tooling refuses to
|
|
16
|
+
* invent a completion vocabulary when it is absent.
|
|
17
|
+
*/
|
|
18
|
+
next?(modifiers: readonly string[]): readonly string[];
|
|
19
|
+
}
|
|
20
|
+
/** one `modifiers ":" payload` clause, modifiers in authored order */
|
|
21
|
+
export interface ParsedClause {
|
|
22
|
+
modifiers: readonly string[];
|
|
23
|
+
/** trimmed raw CSS component-value sequence; never empty */
|
|
24
|
+
payload: string;
|
|
25
|
+
}
|
|
26
|
+
export interface ParsedValue {
|
|
27
|
+
/** trimmed unconditional leading value, or null when the string starts with a clause */
|
|
28
|
+
base: string | null;
|
|
29
|
+
clauses: readonly ParsedClause[];
|
|
30
|
+
}
|
|
31
|
+
export type ValueParseErrorCode = "unregistered-modifier" | "empty-payload" | "empty-modifier" | "unterminated-string" | "unterminated-function" | "unterminated-comment" | "stray-comment-close" | "invalid-character";
|
|
32
|
+
export interface ValueParseError {
|
|
33
|
+
code: ValueParseErrorCode;
|
|
34
|
+
/** character offset into the source string where the error was detected */
|
|
35
|
+
index: number;
|
|
36
|
+
message: string;
|
|
37
|
+
/** the offending modifier spelling, for unregistered-modifier */
|
|
38
|
+
modifier?: string;
|
|
39
|
+
}
|
|
40
|
+
export type ValueParseResult = {
|
|
41
|
+
ok: true;
|
|
42
|
+
value: ParsedValue;
|
|
43
|
+
} | {
|
|
44
|
+
ok: false;
|
|
45
|
+
errors: readonly ValueParseError[];
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* CSS-wide keywords and universal values that resolve as literal CSS even when
|
|
49
|
+
* ident resolution is config-first. A token may never take one of these names;
|
|
50
|
+
* config creation must reject it. Shared by the parser's ident resolution and
|
|
51
|
+
* config-time validation.
|
|
52
|
+
*/
|
|
53
|
+
export declare const reservedCssIdents: ReadonlySet<string>;
|
|
54
|
+
/**
|
|
55
|
+
* One longhand's merged program: which CSS longhand, the parsed value that owns
|
|
56
|
+
* it, and which authored prop contributed it (for diagnostics and devtools).
|
|
57
|
+
*/
|
|
58
|
+
export interface LonghandProgram {
|
|
59
|
+
/** camelCase longhand matching React Native / react style keys */
|
|
60
|
+
property: string;
|
|
61
|
+
value: ParsedValue;
|
|
62
|
+
/** the authored prop name that won this longhand */
|
|
63
|
+
sourceProp: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
//# sourceMappingURL=valueTypes.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mappings": "AAgCA,YAAY,eACR,UACA,UACA,UACA,aACA,UAEA;;AAGJ,OAAO,cAAM,6BAA6B;;;;;;;;AAS1C,iBAAiB,qBAAqB;CACpC,IAAI,eAAe;;;;;;CAMnB,MAAM;;;AAIR,iBAAiB,aAAa;CAC5B;;CAEA;;AAGF,iBAAiB,YAAY;;CAE3B;CACA,kBAAkB;;AAGpB,YAAY,sBACR,0BACA,kBACA,mBACA,wBACA,0BAMA,yBAEA,wBAMA;AAEJ,iBAAiB,gBAAgB;CAC/B,MAAM;;CAEN;CACA;;CAEA;;AAGF,YAAY,mBACR;CAAE,IAAI;CAAM,OAAO;IACnB;CAAE,IAAI;CAAO,iBAAiB;;;;;;;;AAQlC,OAAO,cAAM,mBAAmB;;;;;AAehC,iBAAiB,gBAAgB;;CAE/B;CACA,OAAO;;CAEP",
|
|
3
|
+
"names": [],
|
|
4
|
+
"sources": [
|
|
5
|
+
"src/valueTypes.ts"
|
|
6
|
+
],
|
|
7
|
+
"version": 3,
|
|
8
|
+
"sourcesContent": [
|
|
9
|
+
"// The shared IR for the universal flat value grammar.\n//\n// This file is the contract between the value parser, the per-longhand program\n// merge engine, the compiler, and every frontend (props, Tailwind classes,\n// styled skins). See plans/dom-tailwind-flat-values.md on main — \"The universal\n// value grammar\" and \"Programs and merging\" — for the full design. The rules\n// that matter are restated here so this file can be read standalone.\n//\n// Grammar:\n//\n// value := base? clause*\n// clause := modifier (\":\" modifier)* \":\" payload\n//\n// - `base` and each `payload` are plain CSS component-value sequences. They are\n// NOT interpreted here; the parser only splits, it never resolves.\n// - Clause detection is purely syntactic: a top-level colon (outside strings\n// and outside any paren nesting, url() included) always starts a clause. A\n// top-level colon is never valid inside a CSS component value, so this is\n// unambiguous with zero configuration.\n// - The identifier chain before the colon must be entirely registered\n// modifiers. An unregistered modifier is a hard parse error (`hver:` never\n// silently becomes part of a value).\n// - An empty payload is a parse error. A clause with no preceding base is fine\n// (`bg=\"hover:red\"`).\n//\n// Programs:\n//\n// - Every authored prop expands (via shorthand + family tables) to one or more\n// CSS longhands. Each longhand accumulates one program in authored order.\n// Contributions merge by base or normalized condition-set slot, so a later\n// clause replaces only that slot and unrelated earlier clauses persist.\n\nexport type ModifierKind =\n | 'state'\n | 'theme'\n | 'media'\n | 'platform'\n | 'group'\n /** container queries: `@sm:` nearest container, `@sm/card:` named */\n | 'container'\n\n/** Maximum distinct non-platform conditions one emitted clause can encode. */\nexport const grammarMaxNonPlatformDepth = 5\n\n/**\n * What the parser needs to know about registered modifiers. Implementations\n * project the user config (media keys, root themes, platform names) plus the\n * built-in state vocabulary into this view. Parameterized modifiers\n * (`group-<name>-<state>`) are the implementation's concern — `get` receives\n * the full authored spelling.\n */\nexport interface ModifierRegistryView {\n get(name: string): ModifierKind | undefined\n /**\n * Config-derived modifier trie lookup for authoring one canonical chain.\n * Implementations that only parse values may omit it; tooling refuses to\n * invent a completion vocabulary when it is absent.\n */\n next?(modifiers: readonly string[]): readonly string[]\n}\n\n/** one `modifiers \":\" payload` clause, modifiers in authored order */\nexport interface ParsedClause {\n modifiers: readonly string[]\n /** trimmed raw CSS component-value sequence; never empty */\n payload: string\n}\n\nexport interface ParsedValue {\n /** trimmed unconditional leading value, or null when the string starts with a clause */\n base: string | null\n clauses: readonly ParsedClause[]\n}\n\nexport type ValueParseErrorCode =\n | 'unregistered-modifier'\n | 'empty-payload'\n | 'empty-modifier'\n | 'unterminated-string'\n | 'unterminated-function'\n /**\n * an opened comment that never closes. `getAllRules()` joins rules into one\n * blob for SSR, so an open comment blanks the rules after it until some later\n * close delimiter turns them back on\n */\n | 'unterminated-comment'\n /** a close delimiter with nothing open, which closes another rule's comment */\n | 'stray-comment-close'\n /**\n * a top-level `{`, `}`, or `;` — never valid in a CSS component value, and\n * rejecting them here is what makes rule/selector injection through a\n * payload structurally impossible in the web lowering\n */\n | 'invalid-character'\n\nexport interface ValueParseError {\n code: ValueParseErrorCode\n /** character offset into the source string where the error was detected */\n index: number\n message: string\n /** the offending modifier spelling, for unregistered-modifier */\n modifier?: string\n}\n\nexport type ValueParseResult =\n | { ok: true; value: ParsedValue }\n | { ok: false; errors: readonly ValueParseError[] }\n\n/**\n * CSS-wide keywords and universal values that resolve as literal CSS even when\n * ident resolution is config-first. A token may never take one of these names;\n * config creation must reject it. Shared by the parser's ident resolution and\n * config-time validation.\n */\nexport const reservedCssIdents: ReadonlySet<string> = new Set([\n 'inherit',\n 'initial',\n 'unset',\n 'revert',\n 'none',\n 'auto',\n 'transparent',\n 'currentColor',\n])\n\n/**\n * One longhand's merged program: which CSS longhand, the parsed value that owns\n * it, and which authored prop contributed it (for diagnostics and devtools).\n */\nexport interface LonghandProgram {\n /** camelCase longhand matching React Native / react style keys */\n property: string\n value: ParsedValue\n /** the authored prop name that won this longhand */\n sourceProp: string\n}\n"
|
|
10
|
+
]
|
|
11
|
+
}
|