@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
package/src/table.ts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { grammarEntries, wholeClassConveniences, wholeClassUtilities } from './registry'
|
|
2
|
+
import { grammarDecisions } from './toolingRegistry'
|
|
3
|
+
|
|
4
|
+
export function generateGrammarTable(): string {
|
|
5
|
+
const rows = [
|
|
6
|
+
'| Candidate | Props | Token category | Convenience |',
|
|
7
|
+
'| --- | --- | --- | --- |',
|
|
8
|
+
]
|
|
9
|
+
const byPrefix = new Map<string, (typeof grammarEntries)[number][]>()
|
|
10
|
+
for (const entry of grammarEntries) {
|
|
11
|
+
if (!entry.prefix) continue
|
|
12
|
+
const entries = byPrefix.get(entry.prefix) || []
|
|
13
|
+
entries.push(entry)
|
|
14
|
+
byPrefix.set(entry.prefix, entries)
|
|
15
|
+
}
|
|
16
|
+
for (const [prefix, entries] of [...byPrefix].sort(([a], [b]) => a.localeCompare(b))) {
|
|
17
|
+
rows.push(
|
|
18
|
+
`| \`${prefix}-<value>\` | ${entries.map((entry) => `\`${entry.prop}\``).join(', ')} | ${
|
|
19
|
+
[...new Set(entries.map((entry) => entry.tokenCategory).filter(Boolean))].join(
|
|
20
|
+
', '
|
|
21
|
+
) || 'raw/enum'
|
|
22
|
+
} | ${
|
|
23
|
+
[...new Set(entries.flatMap((entry) => entry.conveniences || []))].join(', ') ||
|
|
24
|
+
'none'
|
|
25
|
+
} |`
|
|
26
|
+
)
|
|
27
|
+
}
|
|
28
|
+
rows.push(
|
|
29
|
+
'| arbitrary values | `<prefix>-[<value>]` | none | canonical raw-value form |'
|
|
30
|
+
)
|
|
31
|
+
rows.push('', '| Whole-class utility | Props | Kind |', '| --- | --- | --- |')
|
|
32
|
+
for (const candidate of Object.keys(wholeClassUtilities).sort()) {
|
|
33
|
+
const properties = Object.keys(wholeClassUtilities[candidate])
|
|
34
|
+
.map((prop) => `\`${prop}\``)
|
|
35
|
+
.join(', ')
|
|
36
|
+
rows.push(
|
|
37
|
+
`| \`${candidate}\` | ${properties} | ${wholeClassConveniences[candidate] || 'enum'} |`
|
|
38
|
+
)
|
|
39
|
+
}
|
|
40
|
+
rows.push('', '| Convenience syntax | Decision | Reason |', '| --- | --- | --- |')
|
|
41
|
+
for (const decision of grammarDecisions) {
|
|
42
|
+
rows.push(`| \`${decision.syntax}\` | ${decision.decision} | ${decision.reason} |`)
|
|
43
|
+
}
|
|
44
|
+
return rows.join('\n')
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export const grammarTable: string = generateGrammarTable()
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
// The text-decoration family: value-dependent splitting of the resetting CSS
|
|
2
|
+
// `text-decoration` shorthand into per-longhand programs, the border family's
|
|
3
|
+
// model applied to line/style/color. `text-decoration-line` is the one CSS
|
|
4
|
+
// longhand here whose value is itself a keyword LIST (`underline overline`),
|
|
5
|
+
// so multiple line keywords accumulate into one payload instead of erroring
|
|
6
|
+
// as duplicates.
|
|
7
|
+
|
|
8
|
+
import { classifyComponent, splitTopLevelComponents } from './backgroundFamily'
|
|
9
|
+
import type { ParsedClause, ParsedValue } from './valueTypes'
|
|
10
|
+
|
|
11
|
+
interface TextDecorationFamilyTargets {
|
|
12
|
+
line: readonly string[]
|
|
13
|
+
style: readonly string[]
|
|
14
|
+
color: readonly string[]
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** authored prop -> the true longhands each component kind lands on */
|
|
18
|
+
export const textDecorationFamilyTargets: Readonly<
|
|
19
|
+
Record<string, TextDecorationFamilyTargets>
|
|
20
|
+
> = {
|
|
21
|
+
textDecoration: {
|
|
22
|
+
line: ['textDecorationLine'],
|
|
23
|
+
style: ['textDecorationStyle'],
|
|
24
|
+
color: ['textDecorationColor'],
|
|
25
|
+
},
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const lineKeywords = new Set(['none', 'underline', 'overline', 'line-through'])
|
|
29
|
+
|
|
30
|
+
const styleKeywords = new Set(['solid', 'double', 'dotted', 'dashed', 'wavy'])
|
|
31
|
+
|
|
32
|
+
export interface TextDecorationFamilyError {
|
|
33
|
+
code: 'unsupported-text-decoration-component'
|
|
34
|
+
component: string
|
|
35
|
+
where: 'base' | number
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
interface MutableProgram {
|
|
39
|
+
base: string | null
|
|
40
|
+
clauses: ParsedClause[]
|
|
41
|
+
present: boolean
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function splitTextDecorationValue(
|
|
45
|
+
value: ParsedValue,
|
|
46
|
+
colorTokens: ReadonlySet<string>
|
|
47
|
+
): {
|
|
48
|
+
entries: Array<{ property: string; value: ParsedValue }>
|
|
49
|
+
errors: TextDecorationFamilyError[]
|
|
50
|
+
} {
|
|
51
|
+
const targets = textDecorationFamilyTargets.textDecoration
|
|
52
|
+
const errors: TextDecorationFamilyError[] = []
|
|
53
|
+
const kinds = ['line', 'style', 'color'] as const
|
|
54
|
+
const programs: Record<(typeof kinds)[number], MutableProgram> = {
|
|
55
|
+
line: { base: null, clauses: [], present: false },
|
|
56
|
+
style: { base: null, clauses: [], present: false },
|
|
57
|
+
color: { base: null, clauses: [], present: false },
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
for (let clauseIndex = -1; clauseIndex < value.clauses.length; clauseIndex++) {
|
|
61
|
+
const isBase = clauseIndex === -1
|
|
62
|
+
const payload = isBase ? value.base : value.clauses[clauseIndex].payload
|
|
63
|
+
if (payload === null) continue
|
|
64
|
+
const where = isBase ? ('base' as const) : clauseIndex
|
|
65
|
+
|
|
66
|
+
const found: Partial<Record<(typeof kinds)[number], string>> = {}
|
|
67
|
+
for (const component of splitTopLevelComponents(payload)) {
|
|
68
|
+
const lower = component.toLowerCase()
|
|
69
|
+
if (lineKeywords.has(lower)) {
|
|
70
|
+
// the line longhand's value is a keyword list, so repeats accumulate
|
|
71
|
+
found.line = found.line === undefined ? component : `${found.line} ${component}`
|
|
72
|
+
continue
|
|
73
|
+
}
|
|
74
|
+
const kind = styleKeywords.has(lower)
|
|
75
|
+
? ('style' as const)
|
|
76
|
+
: classifyComponent(component, colorTokens) === 'color'
|
|
77
|
+
? ('color' as const)
|
|
78
|
+
: null
|
|
79
|
+
if (kind === null || found[kind] !== undefined) {
|
|
80
|
+
// thickness (a length) has no cross-platform longhand, so it errors
|
|
81
|
+
// like any unknown component and the whole value stays legacy
|
|
82
|
+
errors.push({
|
|
83
|
+
code: 'unsupported-text-decoration-component',
|
|
84
|
+
component,
|
|
85
|
+
where,
|
|
86
|
+
})
|
|
87
|
+
continue
|
|
88
|
+
}
|
|
89
|
+
found[kind] = component
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
for (const kind of kinds) {
|
|
93
|
+
const component = found[kind]
|
|
94
|
+
if (component === undefined) continue
|
|
95
|
+
const program = programs[kind]
|
|
96
|
+
program.present = true
|
|
97
|
+
if (isBase) {
|
|
98
|
+
program.base = component
|
|
99
|
+
} else {
|
|
100
|
+
program.clauses.push({
|
|
101
|
+
modifiers: value.clauses[clauseIndex].modifiers,
|
|
102
|
+
payload: component,
|
|
103
|
+
})
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
const entries: Array<{ property: string; value: ParsedValue }> = []
|
|
109
|
+
for (const kind of kinds) {
|
|
110
|
+
const program = programs[kind]
|
|
111
|
+
if (!program.present) continue
|
|
112
|
+
const shared: ParsedValue = { base: program.base, clauses: program.clauses }
|
|
113
|
+
for (const longhand of targets[kind]) {
|
|
114
|
+
entries.push({ property: longhand, value: shared })
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
return { entries, errors }
|
|
119
|
+
}
|
package/src/tooling.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './runtime'
|
|
2
|
+
export * from './clauseCapability'
|
|
3
|
+
export * from './table'
|
|
4
|
+
export * from './toolingAnnotations'
|
|
5
|
+
export * from './toolingDiagnostics'
|
|
6
|
+
export * from './toolingRegistry'
|
|
7
|
+
export * from './transitionLegacy'
|
|
8
|
+
export * from './v6ThemeNames'
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
// Classified source spans for one authored flat value.
|
|
2
|
+
//
|
|
3
|
+
// This is the read side of the tooling pipeline: where diagnostics say what is
|
|
4
|
+
// wrong, annotations say what everything IS — which spans are modifiers, which
|
|
5
|
+
// resolve to configured tokens (and through which category), which are style
|
|
6
|
+
// keywords, and which stay literal CSS. Hover, inline color swatches, and
|
|
7
|
+
// semantic highlighting all consume this one projection so no host re-derives
|
|
8
|
+
// candidate resolution on its own.
|
|
9
|
+
|
|
10
|
+
import { resolveCandidateTarget } from './candidateTarget'
|
|
11
|
+
import { resolvePayload } from './resolvePayload'
|
|
12
|
+
import {
|
|
13
|
+
fontWeightNames,
|
|
14
|
+
grammarEntries,
|
|
15
|
+
standaloneValueProps,
|
|
16
|
+
type TokenCategory,
|
|
17
|
+
} from './registry'
|
|
18
|
+
import {
|
|
19
|
+
createCandidatePropertyVocabulary,
|
|
20
|
+
modifierChainBefore,
|
|
21
|
+
referenceKindFor,
|
|
22
|
+
type DiagnoseStyleValueOptions,
|
|
23
|
+
} from './toolingDiagnostics'
|
|
24
|
+
import { parseValueWithSourceSpans } from './valueParser'
|
|
25
|
+
import { reservedCssIdents, type ModifierKind } from './valueTypes'
|
|
26
|
+
|
|
27
|
+
export type StyleValueAnnotationKind =
|
|
28
|
+
/** a registered clause modifier (`hover`, `sm`, `dark`, `@md`) */
|
|
29
|
+
| 'modifier'
|
|
30
|
+
/** a candidate that resolves to a configured token or theme value */
|
|
31
|
+
| 'token'
|
|
32
|
+
/** a style keyword the grammar accepts for the target property, or a CSS-wide keyword */
|
|
33
|
+
| 'keyword'
|
|
34
|
+
/** an ident or hex color the config does not resolve; passes through as CSS */
|
|
35
|
+
| 'identifier'
|
|
36
|
+
|
|
37
|
+
export interface StyleValueAnnotation {
|
|
38
|
+
kind: StyleValueAnnotationKind
|
|
39
|
+
/** character span within the authored value */
|
|
40
|
+
start: number
|
|
41
|
+
end: number
|
|
42
|
+
text: string
|
|
43
|
+
/** the clause modifier chain owning this slot; empty for the base value */
|
|
44
|
+
modifiers?: readonly string[]
|
|
45
|
+
/** for kind `modifier` */
|
|
46
|
+
modifierKind?: ModifierKind
|
|
47
|
+
/** for kind `token`: the category binding it to the target property */
|
|
48
|
+
tokenCategory?: TokenCategory
|
|
49
|
+
/** the resolved target property, when the candidate or keyword targets it */
|
|
50
|
+
property?: string
|
|
51
|
+
/** authored color opacity suffix percentage */
|
|
52
|
+
opacity?: number
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const grammarEntryByProp = new Map(grammarEntries.map((entry) => [entry.prop, entry]))
|
|
56
|
+
|
|
57
|
+
// the categories whose bare numbers resolve as tokens, per the resolver contract
|
|
58
|
+
const numericCategories: ReadonlySet<TokenCategory> = new Set([
|
|
59
|
+
'space',
|
|
60
|
+
'size',
|
|
61
|
+
'radius',
|
|
62
|
+
'zIndex',
|
|
63
|
+
])
|
|
64
|
+
|
|
65
|
+
const reservedFolded: ReadonlySet<string> = new Set(
|
|
66
|
+
Array.from(reservedCssIdents, (ident) => ident.toLowerCase())
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Classifies every meaningful span in one authored value. Works on partially
|
|
71
|
+
* invalid values too: whatever the parser could segment gets annotated, so
|
|
72
|
+
* hover and colors keep working while the author types.
|
|
73
|
+
*/
|
|
74
|
+
export function annotateStyleValue(
|
|
75
|
+
property: string,
|
|
76
|
+
input: string,
|
|
77
|
+
options: DiagnoseStyleValueOptions
|
|
78
|
+
): readonly StyleValueAnnotation[] {
|
|
79
|
+
const targetProperty = options.config.shorthands?.[property] || property
|
|
80
|
+
const entry = grammarEntryByProp.get(targetProperty)
|
|
81
|
+
const candidates =
|
|
82
|
+
options.candidates || createCandidatePropertyVocabulary(options.config)
|
|
83
|
+
const { spans } = parseValueWithSourceSpans(input, options.registry)
|
|
84
|
+
const annotations: StyleValueAnnotation[] = []
|
|
85
|
+
|
|
86
|
+
for (const span of spans) {
|
|
87
|
+
if (span.kind === 'modifier') {
|
|
88
|
+
const name = input.slice(span.start, span.end)
|
|
89
|
+
const modifierKind = options.registry.get(name)
|
|
90
|
+
if (modifierKind) {
|
|
91
|
+
annotations.push({
|
|
92
|
+
kind: 'modifier',
|
|
93
|
+
start: span.start,
|
|
94
|
+
end: span.end,
|
|
95
|
+
text: name,
|
|
96
|
+
modifierKind,
|
|
97
|
+
})
|
|
98
|
+
}
|
|
99
|
+
continue
|
|
100
|
+
}
|
|
101
|
+
if (span.kind !== 'base' && span.kind !== 'payload') continue
|
|
102
|
+
if (span.start >= span.end) continue
|
|
103
|
+
|
|
104
|
+
const modifiers =
|
|
105
|
+
span.kind === 'payload' ? modifierChainBefore(input, spans, span.start) : []
|
|
106
|
+
const payload = input.slice(span.start, span.end)
|
|
107
|
+
|
|
108
|
+
resolvePayload(payload, {
|
|
109
|
+
resolveNumbers:
|
|
110
|
+
entry?.tokenCategory !== undefined && numericCategories.has(entry.tokenCategory),
|
|
111
|
+
lookup(name) {
|
|
112
|
+
const contributions = candidates.get(name)
|
|
113
|
+
if (!contributions) return undefined
|
|
114
|
+
return { name, kind: referenceKindFor(contributions, targetProperty) }
|
|
115
|
+
},
|
|
116
|
+
onCandidate(start, end, name, reference) {
|
|
117
|
+
const at = {
|
|
118
|
+
start: span.start + start,
|
|
119
|
+
end: span.start + end,
|
|
120
|
+
text: payload.slice(start, end),
|
|
121
|
+
modifiers,
|
|
122
|
+
}
|
|
123
|
+
const contributions = reference && candidates.get(name)
|
|
124
|
+
if (reference && contributions) {
|
|
125
|
+
const target = resolveCandidateTarget(targetProperty, name, contributions)
|
|
126
|
+
const contribution = target.ok ? target.contribution : contributions[0]
|
|
127
|
+
annotations.push({
|
|
128
|
+
kind: target.ok ? 'token' : 'identifier',
|
|
129
|
+
...at,
|
|
130
|
+
tokenCategory: contribution.tokenCategory,
|
|
131
|
+
...(target.ok && { property: targetProperty }),
|
|
132
|
+
...(reference.opacity !== undefined && { opacity: reference.opacity }),
|
|
133
|
+
})
|
|
134
|
+
return
|
|
135
|
+
}
|
|
136
|
+
const keyword =
|
|
137
|
+
standaloneValueProps[targetProperty]?.[name] !== undefined ||
|
|
138
|
+
(targetProperty === 'fontWeight' && fontWeightNames[name] !== undefined) ||
|
|
139
|
+
reservedFolded.has(name.toLowerCase())
|
|
140
|
+
annotations.push({
|
|
141
|
+
kind: keyword ? 'keyword' : 'identifier',
|
|
142
|
+
...at,
|
|
143
|
+
...(keyword && { property: targetProperty }),
|
|
144
|
+
})
|
|
145
|
+
},
|
|
146
|
+
})
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
annotations.sort((a, b) => a.start - b.start)
|
|
150
|
+
return annotations
|
|
151
|
+
}
|