@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,106 @@
|
|
|
1
|
+
import { classifyComponent, splitTopLevelComponents } from "./backgroundFamily.mjs";
|
|
2
|
+
|
|
3
|
+
const textDecorationFamilyTargets = { textDecoration: {
|
|
4
|
+
line: ["textDecorationLine"],
|
|
5
|
+
style: ["textDecorationStyle"],
|
|
6
|
+
color: ["textDecorationColor"]
|
|
7
|
+
} };
|
|
8
|
+
const lineKeywords = /* @__PURE__ */ new Set([
|
|
9
|
+
"none",
|
|
10
|
+
"underline",
|
|
11
|
+
"overline",
|
|
12
|
+
"line-through"
|
|
13
|
+
]);
|
|
14
|
+
const styleKeywords = /* @__PURE__ */ new Set([
|
|
15
|
+
"solid",
|
|
16
|
+
"double",
|
|
17
|
+
"dotted",
|
|
18
|
+
"dashed",
|
|
19
|
+
"wavy"
|
|
20
|
+
]);
|
|
21
|
+
function splitTextDecorationValue(value, colorTokens) {
|
|
22
|
+
const targets = textDecorationFamilyTargets.textDecoration;
|
|
23
|
+
const errors = [];
|
|
24
|
+
const kinds = [
|
|
25
|
+
"line",
|
|
26
|
+
"style",
|
|
27
|
+
"color"
|
|
28
|
+
];
|
|
29
|
+
const programs = {
|
|
30
|
+
line: {
|
|
31
|
+
base: null,
|
|
32
|
+
clauses: [],
|
|
33
|
+
present: false
|
|
34
|
+
},
|
|
35
|
+
style: {
|
|
36
|
+
base: null,
|
|
37
|
+
clauses: [],
|
|
38
|
+
present: false
|
|
39
|
+
},
|
|
40
|
+
color: {
|
|
41
|
+
base: null,
|
|
42
|
+
clauses: [],
|
|
43
|
+
present: false
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
for (let clauseIndex = -1; clauseIndex < value.clauses.length; clauseIndex++) {
|
|
47
|
+
const isBase = clauseIndex === -1;
|
|
48
|
+
const payload = isBase ? value.base : value.clauses[clauseIndex].payload;
|
|
49
|
+
if (payload === null) continue;
|
|
50
|
+
const where = isBase ? "base" : clauseIndex;
|
|
51
|
+
const found = {};
|
|
52
|
+
for (const component of splitTopLevelComponents(payload)) {
|
|
53
|
+
const lower = component.toLowerCase();
|
|
54
|
+
if (lineKeywords.has(lower)) {
|
|
55
|
+
found.line = found.line === void 0 ? component : `${found.line} ${component}`;
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
const kind = styleKeywords.has(lower) ? "style" : classifyComponent(component, colorTokens) === "color" ? "color" : null;
|
|
59
|
+
if (kind === null || found[kind] !== void 0) {
|
|
60
|
+
errors.push({
|
|
61
|
+
code: "unsupported-text-decoration-component",
|
|
62
|
+
component,
|
|
63
|
+
where
|
|
64
|
+
});
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
found[kind] = component;
|
|
68
|
+
}
|
|
69
|
+
for (const kind of kinds) {
|
|
70
|
+
const component = found[kind];
|
|
71
|
+
if (component === void 0) continue;
|
|
72
|
+
const program = programs[kind];
|
|
73
|
+
program.present = true;
|
|
74
|
+
if (isBase) {
|
|
75
|
+
program.base = component;
|
|
76
|
+
} else {
|
|
77
|
+
program.clauses.push({
|
|
78
|
+
modifiers: value.clauses[clauseIndex].modifiers,
|
|
79
|
+
payload: component
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
const entries = [];
|
|
85
|
+
for (const kind of kinds) {
|
|
86
|
+
const program = programs[kind];
|
|
87
|
+
if (!program.present) continue;
|
|
88
|
+
const shared = {
|
|
89
|
+
base: program.base,
|
|
90
|
+
clauses: program.clauses
|
|
91
|
+
};
|
|
92
|
+
for (const longhand of targets[kind]) {
|
|
93
|
+
entries.push({
|
|
94
|
+
property: longhand,
|
|
95
|
+
value: shared
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return {
|
|
100
|
+
entries,
|
|
101
|
+
errors
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export { splitTextDecorationValue, textDecorationFamilyTargets };
|
|
106
|
+
//# sourceMappingURL=textDecorationFamily.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textDecorationFamily.js","names":[],"sources":["esm/textDecorationFamily.js"],"sourcesContent":["import { classifyComponent, splitTopLevelComponents } from \"./backgroundFamily\";\nconst textDecorationFamilyTargets = {\n textDecoration: {\n line: [\"textDecorationLine\"],\n style: [\"textDecorationStyle\"],\n color: [\"textDecorationColor\"]\n }\n};\nconst lineKeywords = /* @__PURE__ */ new Set([\"none\", \"underline\", \"overline\", \"line-through\"]);\nconst styleKeywords = /* @__PURE__ */ new Set([\"solid\", \"double\", \"dotted\", \"dashed\", \"wavy\"]);\nfunction splitTextDecorationValue(value, colorTokens) {\n const targets = textDecorationFamilyTargets.textDecoration;\n const errors = [];\n const kinds = [\"line\", \"style\", \"color\"];\n const programs = {\n line: { base: null, clauses: [], present: false },\n style: { base: null, clauses: [], present: false },\n color: { base: null, clauses: [], present: false }\n };\n for (let clauseIndex = -1; clauseIndex < value.clauses.length; clauseIndex++) {\n const isBase = clauseIndex === -1;\n const payload = isBase ? value.base : value.clauses[clauseIndex].payload;\n if (payload === null) continue;\n const where = isBase ? \"base\" : clauseIndex;\n const found = {};\n for (const component of splitTopLevelComponents(payload)) {\n const lower = component.toLowerCase();\n if (lineKeywords.has(lower)) {\n found.line = found.line === void 0 ? component : `${found.line} ${component}`;\n continue;\n }\n const kind = styleKeywords.has(lower) ? \"style\" : classifyComponent(component, colorTokens) === \"color\" ? \"color\" : null;\n if (kind === null || found[kind] !== void 0) {\n errors.push({\n code: \"unsupported-text-decoration-component\",\n component,\n where\n });\n continue;\n }\n found[kind] = component;\n }\n for (const kind of kinds) {\n const component = found[kind];\n if (component === void 0) continue;\n const program = programs[kind];\n program.present = true;\n if (isBase) {\n program.base = component;\n } else {\n program.clauses.push({\n modifiers: value.clauses[clauseIndex].modifiers,\n payload: component\n });\n }\n }\n }\n const entries = [];\n for (const kind of kinds) {\n const program = programs[kind];\n if (!program.present) continue;\n const shared = { base: program.base, clauses: program.clauses };\n for (const longhand of targets[kind]) {\n entries.push({ property: longhand, value: shared });\n }\n }\n return { entries, errors };\n}\nexport {\n splitTextDecorationValue,\n textDecorationFamilyTargets\n};\n//# sourceMappingURL=textDecorationFamily.js.map\n"],"mappings":";;;AACA,MAAM,8BAA8B,EAClC,gBAAgB;CACd,MAAM,CAAC,oBAAoB;CAC3B,OAAO,CAAC,qBAAqB;CAC7B,OAAO,CAAC,qBAAqB;AAC/B,EACF;AACA,MAAM,+BAA+B,IAAI,IAAI;CAAC;CAAQ;CAAa;CAAY;AAAc,CAAC;AAC9F,MAAM,gCAAgC,IAAI,IAAI;CAAC;CAAS;CAAU;CAAU;CAAU;AAAM,CAAC;AAC7F,SAAS,yBAAyB,OAAO,aAAa;CACpD,MAAM,UAAU,4BAA4B;CAC5C,MAAM,SAAS,CAAC;CAChB,MAAM,QAAQ;EAAC;EAAQ;EAAS;CAAO;CACvC,MAAM,WAAW;EACf,MAAM;GAAE,MAAM;GAAM,SAAS,CAAC;GAAG,SAAS;EAAM;EAChD,OAAO;GAAE,MAAM;GAAM,SAAS,CAAC;GAAG,SAAS;EAAM;EACjD,OAAO;GAAE,MAAM;GAAM,SAAS,CAAC;GAAG,SAAS;EAAM;CACnD;CACA,KAAK,IAAI,cAAc,CAAC,GAAG,cAAc,MAAM,QAAQ,QAAQ,eAAe;EAC5E,MAAM,SAAS,gBAAgB,CAAC;EAChC,MAAM,UAAU,SAAS,MAAM,OAAO,MAAM,QAAQ,aAAa;EACjE,IAAI,YAAY,MAAM;EACtB,MAAM,QAAQ,SAAS,SAAS;EAChC,MAAM,QAAQ,CAAC;EACf,KAAK,MAAM,aAAa,wBAAwB,OAAO,GAAG;GACxD,MAAM,QAAQ,UAAU,YAAY;GACpC,IAAI,aAAa,IAAI,KAAK,GAAG;IAC3B,MAAM,OAAO,MAAM,SAAS,KAAK,IAAI,YAAY,GAAG,MAAM,KAAK,GAAG;IAClE;GACF;GACA,MAAM,OAAO,cAAc,IAAI,KAAK,IAAI,UAAU,kBAAkB,WAAW,WAAW,MAAM,UAAU,UAAU;GACpH,IAAI,SAAS,QAAQ,MAAM,UAAU,KAAK,GAAG;IAC3C,OAAO,KAAK;KACV,MAAM;KACN;KACA;IACF,CAAC;IACD;GACF;GACA,MAAM,QAAQ;EAChB;EACA,KAAK,MAAM,QAAQ,OAAO;GACxB,MAAM,YAAY,MAAM;GACxB,IAAI,cAAc,KAAK,GAAG;GAC1B,MAAM,UAAU,SAAS;GACzB,QAAQ,UAAU;GAClB,IAAI,QAAQ;IACV,QAAQ,OAAO;GACjB,OAAO;IACL,QAAQ,QAAQ,KAAK;KACnB,WAAW,MAAM,QAAQ,aAAa;KACtC,SAAS;IACX,CAAC;GACH;EACF;CACF;CACA,MAAM,UAAU,CAAC;CACjB,KAAK,MAAM,QAAQ,OAAO;EACxB,MAAM,UAAU,SAAS;EACzB,IAAI,CAAC,QAAQ,SAAS;EACtB,MAAM,SAAS;GAAE,MAAM,QAAQ;GAAM,SAAS,QAAQ;EAAQ;EAC9D,KAAK,MAAM,YAAY,QAAQ,OAAO;GACpC,QAAQ,KAAK;IAAE,UAAU;IAAU,OAAO;GAAO,CAAC;EACpD;CACF;CACA,OAAO;EAAE;EAAS;CAAO;AAC3B"}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { classifyComponent, splitTopLevelComponents } from "./backgroundFamily.native.js";
|
|
2
|
+
|
|
3
|
+
var textDecorationFamilyTargets = { textDecoration: {
|
|
4
|
+
line: ["textDecorationLine"],
|
|
5
|
+
style: ["textDecorationStyle"],
|
|
6
|
+
color: ["textDecorationColor"]
|
|
7
|
+
} };
|
|
8
|
+
var lineKeywords = /* @__PURE__ */ new Set([
|
|
9
|
+
"none",
|
|
10
|
+
"underline",
|
|
11
|
+
"overline",
|
|
12
|
+
"line-through"
|
|
13
|
+
]);
|
|
14
|
+
var styleKeywords = /* @__PURE__ */ new Set([
|
|
15
|
+
"solid",
|
|
16
|
+
"double",
|
|
17
|
+
"dotted",
|
|
18
|
+
"dashed",
|
|
19
|
+
"wavy"
|
|
20
|
+
]);
|
|
21
|
+
function splitTextDecorationValue(value, colorTokens) {
|
|
22
|
+
var targets = textDecorationFamilyTargets.textDecoration;
|
|
23
|
+
var errors = [];
|
|
24
|
+
var kinds = [
|
|
25
|
+
"line",
|
|
26
|
+
"style",
|
|
27
|
+
"color"
|
|
28
|
+
];
|
|
29
|
+
var programs = {
|
|
30
|
+
line: {
|
|
31
|
+
base: null,
|
|
32
|
+
clauses: [],
|
|
33
|
+
present: false
|
|
34
|
+
},
|
|
35
|
+
style: {
|
|
36
|
+
base: null,
|
|
37
|
+
clauses: [],
|
|
38
|
+
present: false
|
|
39
|
+
},
|
|
40
|
+
color: {
|
|
41
|
+
base: null,
|
|
42
|
+
clauses: [],
|
|
43
|
+
present: false
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
for (var clauseIndex = -1; clauseIndex < value.clauses.length; clauseIndex++) {
|
|
47
|
+
var isBase = clauseIndex === -1;
|
|
48
|
+
var payload = isBase ? value.base : value.clauses[clauseIndex].payload;
|
|
49
|
+
if (payload === null) continue;
|
|
50
|
+
var where = isBase ? "base" : clauseIndex;
|
|
51
|
+
var found = {};
|
|
52
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
53
|
+
try {
|
|
54
|
+
for (var _iterator = splitTopLevelComponents(payload)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
55
|
+
var component = _step.value;
|
|
56
|
+
var lower = component.toLowerCase();
|
|
57
|
+
if (lineKeywords.has(lower)) {
|
|
58
|
+
found.line = found.line === void 0 ? component : `${found.line} ${component}`;
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
var kind = styleKeywords.has(lower) ? "style" : classifyComponent(component, colorTokens) === "color" ? "color" : null;
|
|
62
|
+
if (kind === null || found[kind] !== void 0) {
|
|
63
|
+
errors.push({
|
|
64
|
+
code: "unsupported-text-decoration-component",
|
|
65
|
+
component,
|
|
66
|
+
where
|
|
67
|
+
});
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
found[kind] = component;
|
|
71
|
+
}
|
|
72
|
+
} catch (err) {
|
|
73
|
+
_didIteratorError = true;
|
|
74
|
+
_iteratorError = err;
|
|
75
|
+
} finally {
|
|
76
|
+
try {
|
|
77
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
78
|
+
_iterator.return();
|
|
79
|
+
}
|
|
80
|
+
} finally {
|
|
81
|
+
if (_didIteratorError) {
|
|
82
|
+
throw _iteratorError;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;
|
|
87
|
+
try {
|
|
88
|
+
for (var _iterator1 = kinds[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
|
|
89
|
+
var kind1 = _step1.value;
|
|
90
|
+
var component1 = found[kind1];
|
|
91
|
+
if (component1 === void 0) continue;
|
|
92
|
+
var program = programs[kind1];
|
|
93
|
+
program.present = true;
|
|
94
|
+
if (isBase) {
|
|
95
|
+
program.base = component1;
|
|
96
|
+
} else {
|
|
97
|
+
program.clauses.push({
|
|
98
|
+
modifiers: value.clauses[clauseIndex].modifiers,
|
|
99
|
+
payload: component1
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
} catch (err) {
|
|
104
|
+
_didIteratorError1 = true;
|
|
105
|
+
_iteratorError1 = err;
|
|
106
|
+
} finally {
|
|
107
|
+
try {
|
|
108
|
+
if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
|
|
109
|
+
_iterator1.return();
|
|
110
|
+
}
|
|
111
|
+
} finally {
|
|
112
|
+
if (_didIteratorError1) {
|
|
113
|
+
throw _iteratorError1;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
var entries = [];
|
|
119
|
+
var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = void 0;
|
|
120
|
+
try {
|
|
121
|
+
for (var _iterator2 = kinds[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
|
|
122
|
+
var kind2 = _step2.value;
|
|
123
|
+
var program1 = programs[kind2];
|
|
124
|
+
if (!program1.present) continue;
|
|
125
|
+
var shared = {
|
|
126
|
+
base: program1.base,
|
|
127
|
+
clauses: program1.clauses
|
|
128
|
+
};
|
|
129
|
+
var _iteratorNormalCompletion3 = true, _didIteratorError3 = false, _iteratorError3 = void 0;
|
|
130
|
+
try {
|
|
131
|
+
for (var _iterator3 = targets[kind2][Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
|
|
132
|
+
var longhand = _step3.value;
|
|
133
|
+
entries.push({
|
|
134
|
+
property: longhand,
|
|
135
|
+
value: shared
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
} catch (err) {
|
|
139
|
+
_didIteratorError3 = true;
|
|
140
|
+
_iteratorError3 = err;
|
|
141
|
+
} finally {
|
|
142
|
+
try {
|
|
143
|
+
if (!_iteratorNormalCompletion3 && _iterator3.return != null) {
|
|
144
|
+
_iterator3.return();
|
|
145
|
+
}
|
|
146
|
+
} finally {
|
|
147
|
+
if (_didIteratorError3) {
|
|
148
|
+
throw _iteratorError3;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
} catch (err) {
|
|
154
|
+
_didIteratorError2 = true;
|
|
155
|
+
_iteratorError2 = err;
|
|
156
|
+
} finally {
|
|
157
|
+
try {
|
|
158
|
+
if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
|
|
159
|
+
_iterator2.return();
|
|
160
|
+
}
|
|
161
|
+
} finally {
|
|
162
|
+
if (_didIteratorError2) {
|
|
163
|
+
throw _iteratorError2;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
return {
|
|
168
|
+
entries,
|
|
169
|
+
errors
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export { splitTextDecorationValue, textDecorationFamilyTargets };
|
|
174
|
+
//# sourceMappingURL=textDecorationFamily.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textDecorationFamily.native.js","names":[],"sources":["esm/textDecorationFamily.native.js"],"sourcesContent":["import { classifyComponent, splitTopLevelComponents } from \"./backgroundFamily\";\nvar textDecorationFamilyTargets = {\n textDecoration: {\n line: [\n \"textDecorationLine\"\n ],\n style: [\n \"textDecorationStyle\"\n ],\n color: [\n \"textDecorationColor\"\n ]\n }\n};\nvar lineKeywords = /* @__PURE__ */ new Set([\n \"none\",\n \"underline\",\n \"overline\",\n \"line-through\"\n]);\nvar styleKeywords = /* @__PURE__ */ new Set([\n \"solid\",\n \"double\",\n \"dotted\",\n \"dashed\",\n \"wavy\"\n]);\nfunction splitTextDecorationValue(value, colorTokens) {\n var targets = textDecorationFamilyTargets.textDecoration;\n var errors = [];\n var kinds = [\n \"line\",\n \"style\",\n \"color\"\n ];\n var programs = {\n line: {\n base: null,\n clauses: [],\n present: false\n },\n style: {\n base: null,\n clauses: [],\n present: false\n },\n color: {\n base: null,\n clauses: [],\n present: false\n }\n };\n for (var clauseIndex = -1; clauseIndex < value.clauses.length; clauseIndex++) {\n var isBase = clauseIndex === -1;\n var payload = isBase ? value.base : value.clauses[clauseIndex].payload;\n if (payload === null) continue;\n var where = isBase ? \"base\" : clauseIndex;\n var found = {};\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = splitTopLevelComponents(payload)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var component = _step.value;\n var lower = component.toLowerCase();\n if (lineKeywords.has(lower)) {\n found.line = found.line === void 0 ? component : `${found.line} ${component}`;\n continue;\n }\n var kind = styleKeywords.has(lower) ? \"style\" : classifyComponent(component, colorTokens) === \"color\" ? \"color\" : null;\n if (kind === null || found[kind] !== void 0) {\n errors.push({\n code: \"unsupported-text-decoration-component\",\n component,\n where\n });\n continue;\n }\n found[kind] = component;\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;\n try {\n for (var _iterator1 = kinds[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {\n var kind1 = _step1.value;\n var component1 = found[kind1];\n if (component1 === void 0) continue;\n var program = programs[kind1];\n program.present = true;\n if (isBase) {\n program.base = component1;\n } else {\n program.clauses.push({\n modifiers: value.clauses[clauseIndex].modifiers,\n payload: component1\n });\n }\n }\n } catch (err) {\n _didIteratorError1 = true;\n _iteratorError1 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion1 && _iterator1.return != null) {\n _iterator1.return();\n }\n } finally {\n if (_didIteratorError1) {\n throw _iteratorError1;\n }\n }\n }\n }\n var entries = [];\n var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = void 0;\n try {\n for (var _iterator2 = kinds[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n var kind2 = _step2.value;\n var program1 = programs[kind2];\n if (!program1.present) continue;\n var shared = {\n base: program1.base,\n clauses: program1.clauses\n };\n var _iteratorNormalCompletion3 = true, _didIteratorError3 = false, _iteratorError3 = void 0;\n try {\n for (var _iterator3 = targets[kind2][Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {\n var longhand = _step3.value;\n entries.push({\n property: longhand,\n value: shared\n });\n }\n } catch (err) {\n _didIteratorError3 = true;\n _iteratorError3 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion3 && _iterator3.return != null) {\n _iterator3.return();\n }\n } finally {\n if (_didIteratorError3) {\n throw _iteratorError3;\n }\n }\n }\n }\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion2 && _iterator2.return != null) {\n _iterator2.return();\n }\n } finally {\n if (_didIteratorError2) {\n throw _iteratorError2;\n }\n }\n }\n return {\n entries,\n errors\n };\n}\nexport {\n splitTextDecorationValue,\n textDecorationFamilyTargets\n};\n//# sourceMappingURL=textDecorationFamily.js.map\n"],"mappings":";;;AACA,IAAI,8BAA8B,EAChC,gBAAgB;CACd,MAAM,CACJ,oBACF;CACA,OAAO,CACL,qBACF;CACA,OAAO,CACL,qBACF;AACF,EACF;AACA,IAAI,+BAA+B,IAAI,IAAI;CACzC;CACA;CACA;CACA;AACF,CAAC;AACD,IAAI,gCAAgC,IAAI,IAAI;CAC1C;CACA;CACA;CACA;CACA;AACF,CAAC;AACD,SAAS,yBAAyB,OAAO,aAAa;CACpD,IAAI,UAAU,4BAA4B;CAC1C,IAAI,SAAS,CAAC;CACd,IAAI,QAAQ;EACV;EACA;EACA;CACF;CACA,IAAI,WAAW;EACb,MAAM;GACJ,MAAM;GACN,SAAS,CAAC;GACV,SAAS;EACX;EACA,OAAO;GACL,MAAM;GACN,SAAS,CAAC;GACV,SAAS;EACX;EACA,OAAO;GACL,MAAM;GACN,SAAS,CAAC;GACV,SAAS;EACX;CACF;CACA,KAAK,IAAI,cAAc,CAAC,GAAG,cAAc,MAAM,QAAQ,QAAQ,eAAe;EAC5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IAAI;GACF,IAAI,CAAC,8BAA8B,WAAW,UAAU,MAAM;IAC5D,WAAW,OAAO;GACpB;EACF,UAAU;GACR,IAAI,oBAAoB;IACtB,MAAM;GACR;EACF;CACF;CACA,OAAO;EACL;EACA;CACF;AACF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from "./runtime.mjs"
|
|
2
|
+
|
|
3
|
+
export * from "./clauseCapability.mjs"
|
|
4
|
+
|
|
5
|
+
export * from "./table.mjs"
|
|
6
|
+
|
|
7
|
+
export * from "./toolingAnnotations.mjs"
|
|
8
|
+
|
|
9
|
+
export * from "./toolingDiagnostics.mjs"
|
|
10
|
+
|
|
11
|
+
export * from "./toolingRegistry.mjs"
|
|
12
|
+
|
|
13
|
+
export * from "./transitionLegacy.mjs"
|
|
14
|
+
|
|
15
|
+
export * from "./v6ThemeNames.mjs"
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from "./runtime.native.js"
|
|
2
|
+
|
|
3
|
+
export * from "./clauseCapability.native.js"
|
|
4
|
+
|
|
5
|
+
export * from "./table.native.js"
|
|
6
|
+
|
|
7
|
+
export * from "./toolingAnnotations.native.js"
|
|
8
|
+
|
|
9
|
+
export * from "./toolingDiagnostics.native.js"
|
|
10
|
+
|
|
11
|
+
export * from "./toolingRegistry.native.js"
|
|
12
|
+
|
|
13
|
+
export * from "./transitionLegacy.native.js"
|
|
14
|
+
|
|
15
|
+
export * from "./v6ThemeNames.native.js"
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { resolveCandidateTarget } from "./candidateTarget.mjs";
|
|
2
|
+
import { resolvePayload } from "./resolvePayload.mjs";
|
|
3
|
+
import { fontWeightNames, grammarEntries, standaloneValueProps } from "./registry.mjs";
|
|
4
|
+
import { createCandidatePropertyVocabulary, modifierChainBefore, referenceKindFor } from "./toolingDiagnostics.mjs";
|
|
5
|
+
import { parseValueWithSourceSpans } from "./valueParser.mjs";
|
|
6
|
+
import { reservedCssIdents } from "./valueTypes.mjs";
|
|
7
|
+
|
|
8
|
+
const grammarEntryByProp = new Map(grammarEntries.map((entry) => [entry.prop, entry]));
|
|
9
|
+
const numericCategories = /* @__PURE__ */ new Set([
|
|
10
|
+
"space",
|
|
11
|
+
"size",
|
|
12
|
+
"radius",
|
|
13
|
+
"zIndex"
|
|
14
|
+
]);
|
|
15
|
+
const reservedFolded = new Set(Array.from(reservedCssIdents, (ident) => ident.toLowerCase()));
|
|
16
|
+
function annotateStyleValue(property, input, options) {
|
|
17
|
+
const targetProperty = options.config.shorthands?.[property] || property;
|
|
18
|
+
const entry = grammarEntryByProp.get(targetProperty);
|
|
19
|
+
const candidates = options.candidates || createCandidatePropertyVocabulary(options.config);
|
|
20
|
+
const { spans } = parseValueWithSourceSpans(input, options.registry);
|
|
21
|
+
const annotations = [];
|
|
22
|
+
for (const span of spans) {
|
|
23
|
+
if (span.kind === "modifier") {
|
|
24
|
+
const name = input.slice(span.start, span.end);
|
|
25
|
+
const modifierKind = options.registry.get(name);
|
|
26
|
+
if (modifierKind) {
|
|
27
|
+
annotations.push({
|
|
28
|
+
kind: "modifier",
|
|
29
|
+
start: span.start,
|
|
30
|
+
end: span.end,
|
|
31
|
+
text: name,
|
|
32
|
+
modifierKind
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
37
|
+
if (span.kind !== "base" && span.kind !== "payload") continue;
|
|
38
|
+
if (span.start >= span.end) continue;
|
|
39
|
+
const modifiers = span.kind === "payload" ? modifierChainBefore(input, spans, span.start) : [];
|
|
40
|
+
const payload = input.slice(span.start, span.end);
|
|
41
|
+
resolvePayload(payload, {
|
|
42
|
+
resolveNumbers: entry?.tokenCategory !== void 0 && numericCategories.has(entry.tokenCategory),
|
|
43
|
+
lookup(name) {
|
|
44
|
+
const contributions = candidates.get(name);
|
|
45
|
+
if (!contributions) return void 0;
|
|
46
|
+
return {
|
|
47
|
+
name,
|
|
48
|
+
kind: referenceKindFor(contributions, targetProperty)
|
|
49
|
+
};
|
|
50
|
+
},
|
|
51
|
+
onCandidate(start, end, name, reference) {
|
|
52
|
+
const at = {
|
|
53
|
+
start: span.start + start,
|
|
54
|
+
end: span.start + end,
|
|
55
|
+
text: payload.slice(start, end),
|
|
56
|
+
modifiers
|
|
57
|
+
};
|
|
58
|
+
const contributions = reference && candidates.get(name);
|
|
59
|
+
if (reference && contributions) {
|
|
60
|
+
const target = resolveCandidateTarget(targetProperty, name, contributions);
|
|
61
|
+
const contribution = target.ok ? target.contribution : contributions[0];
|
|
62
|
+
annotations.push({
|
|
63
|
+
kind: target.ok ? "token" : "identifier",
|
|
64
|
+
...at,
|
|
65
|
+
tokenCategory: contribution.tokenCategory,
|
|
66
|
+
...target.ok && { property: targetProperty },
|
|
67
|
+
...reference.opacity !== void 0 && { opacity: reference.opacity }
|
|
68
|
+
});
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
const keyword = standaloneValueProps[targetProperty]?.[name] !== void 0 || targetProperty === "fontWeight" && fontWeightNames[name] !== void 0 || reservedFolded.has(name.toLowerCase());
|
|
72
|
+
annotations.push({
|
|
73
|
+
kind: keyword ? "keyword" : "identifier",
|
|
74
|
+
...at,
|
|
75
|
+
...keyword && { property: targetProperty }
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
annotations.sort((a, b) => a.start - b.start);
|
|
81
|
+
return annotations;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export { annotateStyleValue };
|
|
85
|
+
//# sourceMappingURL=toolingAnnotations.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolingAnnotations.js","names":[],"sources":["esm/toolingAnnotations.js"],"sourcesContent":["import { resolveCandidateTarget } from \"./candidateTarget\";\nimport { resolvePayload } from \"./resolvePayload\";\nimport {\n fontWeightNames,\n grammarEntries,\n standaloneValueProps\n} from \"./registry\";\nimport {\n createCandidatePropertyVocabulary,\n modifierChainBefore,\n referenceKindFor\n} from \"./toolingDiagnostics\";\nimport { parseValueWithSourceSpans } from \"./valueParser\";\nimport { reservedCssIdents } from \"./valueTypes\";\nconst grammarEntryByProp = new Map(grammarEntries.map((entry) => [entry.prop, entry]));\nconst numericCategories = /* @__PURE__ */ new Set([\n \"space\",\n \"size\",\n \"radius\",\n \"zIndex\"\n]);\nconst reservedFolded = new Set(\n Array.from(reservedCssIdents, (ident) => ident.toLowerCase())\n);\nfunction annotateStyleValue(property, input, options) {\n const targetProperty = options.config.shorthands?.[property] || property;\n const entry = grammarEntryByProp.get(targetProperty);\n const candidates = options.candidates || createCandidatePropertyVocabulary(options.config);\n const { spans } = parseValueWithSourceSpans(input, options.registry);\n const annotations = [];\n for (const span of spans) {\n if (span.kind === \"modifier\") {\n const name = input.slice(span.start, span.end);\n const modifierKind = options.registry.get(name);\n if (modifierKind) {\n annotations.push({\n kind: \"modifier\",\n start: span.start,\n end: span.end,\n text: name,\n modifierKind\n });\n }\n continue;\n }\n if (span.kind !== \"base\" && span.kind !== \"payload\") continue;\n if (span.start >= span.end) continue;\n const modifiers = span.kind === \"payload\" ? modifierChainBefore(input, spans, span.start) : [];\n const payload = input.slice(span.start, span.end);\n resolvePayload(payload, {\n resolveNumbers: entry?.tokenCategory !== void 0 && numericCategories.has(entry.tokenCategory),\n lookup(name) {\n const contributions = candidates.get(name);\n if (!contributions) return void 0;\n return { name, kind: referenceKindFor(contributions, targetProperty) };\n },\n onCandidate(start, end, name, reference) {\n const at = {\n start: span.start + start,\n end: span.start + end,\n text: payload.slice(start, end),\n modifiers\n };\n const contributions = reference && candidates.get(name);\n if (reference && contributions) {\n const target = resolveCandidateTarget(targetProperty, name, contributions);\n const contribution = target.ok ? target.contribution : contributions[0];\n annotations.push({\n kind: target.ok ? \"token\" : \"identifier\",\n ...at,\n tokenCategory: contribution.tokenCategory,\n ...target.ok && { property: targetProperty },\n ...reference.opacity !== void 0 && { opacity: reference.opacity }\n });\n return;\n }\n const keyword = standaloneValueProps[targetProperty]?.[name] !== void 0 || targetProperty === \"fontWeight\" && fontWeightNames[name] !== void 0 || reservedFolded.has(name.toLowerCase());\n annotations.push({\n kind: keyword ? \"keyword\" : \"identifier\",\n ...at,\n ...keyword && { property: targetProperty }\n });\n }\n });\n }\n annotations.sort((a, b) => a.start - b.start);\n return annotations;\n}\nexport {\n annotateStyleValue\n};\n//# sourceMappingURL=toolingAnnotations.js.map\n"],"mappings":";;;;;;;;AAcA,MAAM,qBAAqB,IAAI,IAAI,eAAe,KAAK,UAAU,CAAC,MAAM,MAAM,KAAK,CAAC,CAAC;AACrF,MAAM,oCAAoC,IAAI,IAAI;CAChD;CACA;CACA;CACA;AACF,CAAC;AACD,MAAM,iBAAiB,IAAI,IACzB,MAAM,KAAK,oBAAoB,UAAU,MAAM,YAAY,CAAC,CAC9D;AACA,SAAS,mBAAmB,UAAU,OAAO,SAAS;CACpD,MAAM,iBAAiB,QAAQ,OAAO,aAAa,aAAa;CAChE,MAAM,QAAQ,mBAAmB,IAAI,cAAc;CACnD,MAAM,aAAa,QAAQ,cAAc,kCAAkC,QAAQ,MAAM;CACzF,MAAM,EAAE,UAAU,0BAA0B,OAAO,QAAQ,QAAQ;CACnE,MAAM,cAAc,CAAC;CACrB,KAAK,MAAM,QAAQ,OAAO;EACxB,IAAI,KAAK,SAAS,YAAY;GAC5B,MAAM,OAAO,MAAM,MAAM,KAAK,OAAO,KAAK,GAAG;GAC7C,MAAM,eAAe,QAAQ,SAAS,IAAI,IAAI;GAC9C,IAAI,cAAc;IAChB,YAAY,KAAK;KACf,MAAM;KACN,OAAO,KAAK;KACZ,KAAK,KAAK;KACV,MAAM;KACN;IACF,CAAC;GACH;GACA;EACF;EACA,IAAI,KAAK,SAAS,UAAU,KAAK,SAAS,WAAW;EACrD,IAAI,KAAK,SAAS,KAAK,KAAK;EAC5B,MAAM,YAAY,KAAK,SAAS,YAAY,oBAAoB,OAAO,OAAO,KAAK,KAAK,IAAI,CAAC;EAC7F,MAAM,UAAU,MAAM,MAAM,KAAK,OAAO,KAAK,GAAG;EAChD,eAAe,SAAS;GACtB,gBAAgB,OAAO,kBAAkB,KAAK,KAAK,kBAAkB,IAAI,MAAM,aAAa;GAC5F,OAAO,MAAM;IACX,MAAM,gBAAgB,WAAW,IAAI,IAAI;IACzC,IAAI,CAAC,eAAe,OAAO,KAAK;IAChC,OAAO;KAAE;KAAM,MAAM,iBAAiB,eAAe,cAAc;IAAE;GACvE;GACA,YAAY,OAAO,KAAK,MAAM,WAAW;IACvC,MAAM,KAAK;KACT,OAAO,KAAK,QAAQ;KACpB,KAAK,KAAK,QAAQ;KAClB,MAAM,QAAQ,MAAM,OAAO,GAAG;KAC9B;IACF;IACA,MAAM,gBAAgB,aAAa,WAAW,IAAI,IAAI;IACtD,IAAI,aAAa,eAAe;KAC9B,MAAM,SAAS,uBAAuB,gBAAgB,MAAM,aAAa;KACzE,MAAM,eAAe,OAAO,KAAK,OAAO,eAAe,cAAc;KACrE,YAAY,KAAK;MACf,MAAM,OAAO,KAAK,UAAU;MAC5B,GAAG;MACH,eAAe,aAAa;MAC5B,GAAG,OAAO,MAAM,EAAE,UAAU,eAAe;MAC3C,GAAG,UAAU,YAAY,KAAK,KAAK,EAAE,SAAS,UAAU,QAAQ;KAClE,CAAC;KACD;IACF;IACA,MAAM,UAAU,qBAAqB,kBAAkB,UAAU,KAAK,KAAK,mBAAmB,gBAAgB,gBAAgB,UAAU,KAAK,KAAK,eAAe,IAAI,KAAK,YAAY,CAAC;IACvL,YAAY,KAAK;KACf,MAAM,UAAU,YAAY;KAC5B,GAAG;KACH,GAAG,WAAW,EAAE,UAAU,eAAe;IAC3C,CAAC;GACH;EACF,CAAC;CACH;CACA,YAAY,MAAM,GAAG,MAAM,EAAE,QAAQ,EAAE,KAAK;CAC5C,OAAO;AACT"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { resolveCandidateTarget } from "./candidateTarget.native.js";
|
|
2
|
+
import { resolvePayload } from "./resolvePayload.native.js";
|
|
3
|
+
import { fontWeightNames, grammarEntries, standaloneValueProps } from "./registry.native.js";
|
|
4
|
+
import { createCandidatePropertyVocabulary, modifierChainBefore, referenceKindFor } from "./toolingDiagnostics.native.js";
|
|
5
|
+
import { parseValueWithSourceSpans } from "./valueParser.native.js";
|
|
6
|
+
import { reservedCssIdents } from "./valueTypes.native.js";
|
|
7
|
+
|
|
8
|
+
var grammarEntryByProp = new Map(grammarEntries.map(function(entry) {
|
|
9
|
+
return [entry.prop, entry];
|
|
10
|
+
}));
|
|
11
|
+
var numericCategories = /* @__PURE__ */ new Set([
|
|
12
|
+
"space",
|
|
13
|
+
"size",
|
|
14
|
+
"radius",
|
|
15
|
+
"zIndex"
|
|
16
|
+
]);
|
|
17
|
+
var reservedFolded = new Set(Array.from(reservedCssIdents, function(ident) {
|
|
18
|
+
return ident.toLowerCase();
|
|
19
|
+
}));
|
|
20
|
+
function annotateStyleValue(property, input, options) {
|
|
21
|
+
var _options_config_shorthands;
|
|
22
|
+
var targetProperty = ((_options_config_shorthands = options.config.shorthands) === null || _options_config_shorthands === void 0 ? void 0 : _options_config_shorthands[property]) || property;
|
|
23
|
+
var entry = grammarEntryByProp.get(targetProperty);
|
|
24
|
+
var candidates = options.candidates || createCandidatePropertyVocabulary(options.config);
|
|
25
|
+
var { spans } = parseValueWithSourceSpans(input, options.registry);
|
|
26
|
+
var annotations = [];
|
|
27
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
28
|
+
try {
|
|
29
|
+
var _loop = function() {
|
|
30
|
+
var span = _step.value;
|
|
31
|
+
if (span.kind === "modifier") {
|
|
32
|
+
var name = input.slice(span.start, span.end);
|
|
33
|
+
var modifierKind = options.registry.get(name);
|
|
34
|
+
if (modifierKind) {
|
|
35
|
+
annotations.push({
|
|
36
|
+
kind: "modifier",
|
|
37
|
+
start: span.start,
|
|
38
|
+
end: span.end,
|
|
39
|
+
text: name,
|
|
40
|
+
modifierKind
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
return "continue";
|
|
44
|
+
}
|
|
45
|
+
if (span.kind !== "base" && span.kind !== "payload") return "continue";
|
|
46
|
+
if (span.start >= span.end) return "continue";
|
|
47
|
+
var modifiers = span.kind === "payload" ? modifierChainBefore(input, spans, span.start) : [];
|
|
48
|
+
var payload = input.slice(span.start, span.end);
|
|
49
|
+
resolvePayload(payload, {
|
|
50
|
+
resolveNumbers: (entry === null || entry === void 0 ? void 0 : entry.tokenCategory) !== void 0 && numericCategories.has(entry.tokenCategory),
|
|
51
|
+
lookup(name2) {
|
|
52
|
+
var contributions = candidates.get(name2);
|
|
53
|
+
if (!contributions) return void 0;
|
|
54
|
+
return {
|
|
55
|
+
name: name2,
|
|
56
|
+
kind: referenceKindFor(contributions, targetProperty)
|
|
57
|
+
};
|
|
58
|
+
},
|
|
59
|
+
onCandidate(start, end, name2, reference) {
|
|
60
|
+
var _standaloneValueProps_targetProperty;
|
|
61
|
+
var at = {
|
|
62
|
+
start: span.start + start,
|
|
63
|
+
end: span.start + end,
|
|
64
|
+
text: payload.slice(start, end),
|
|
65
|
+
modifiers
|
|
66
|
+
};
|
|
67
|
+
var contributions = reference && candidates.get(name2);
|
|
68
|
+
if (reference && contributions) {
|
|
69
|
+
var target = resolveCandidateTarget(targetProperty, name2, contributions);
|
|
70
|
+
var contribution = target.ok ? target.contribution : contributions[0];
|
|
71
|
+
annotations.push({
|
|
72
|
+
kind: target.ok ? "token" : "identifier",
|
|
73
|
+
...at,
|
|
74
|
+
tokenCategory: contribution.tokenCategory,
|
|
75
|
+
...target.ok && { property: targetProperty },
|
|
76
|
+
...reference.opacity !== void 0 && { opacity: reference.opacity }
|
|
77
|
+
});
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
var keyword = ((_standaloneValueProps_targetProperty = standaloneValueProps[targetProperty]) === null || _standaloneValueProps_targetProperty === void 0 ? void 0 : _standaloneValueProps_targetProperty[name2]) !== void 0 || targetProperty === "fontWeight" && fontWeightNames[name2] !== void 0 || reservedFolded.has(name2.toLowerCase());
|
|
81
|
+
annotations.push({
|
|
82
|
+
kind: keyword ? "keyword" : "identifier",
|
|
83
|
+
...at,
|
|
84
|
+
...keyword && { property: targetProperty }
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
for (var _iterator = spans[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) _loop();
|
|
90
|
+
} catch (err) {
|
|
91
|
+
_didIteratorError = true;
|
|
92
|
+
_iteratorError = err;
|
|
93
|
+
} finally {
|
|
94
|
+
try {
|
|
95
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
96
|
+
_iterator.return();
|
|
97
|
+
}
|
|
98
|
+
} finally {
|
|
99
|
+
if (_didIteratorError) {
|
|
100
|
+
throw _iteratorError;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
annotations.sort(function(a, b) {
|
|
105
|
+
return a.start - b.start;
|
|
106
|
+
});
|
|
107
|
+
return annotations;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export { annotateStyleValue };
|
|
111
|
+
//# sourceMappingURL=toolingAnnotations.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolingAnnotations.native.js","names":[],"sources":["esm/toolingAnnotations.native.js"],"sourcesContent":["import { resolveCandidateTarget } from \"./candidateTarget\";\nimport { resolvePayload } from \"./resolvePayload\";\nimport { fontWeightNames, grammarEntries, standaloneValueProps } from \"./registry\";\nimport { createCandidatePropertyVocabulary, modifierChainBefore, referenceKindFor } from \"./toolingDiagnostics\";\nimport { parseValueWithSourceSpans } from \"./valueParser\";\nimport { reservedCssIdents } from \"./valueTypes\";\nvar grammarEntryByProp = new Map(grammarEntries.map(function(entry) {\n return [\n entry.prop,\n entry\n ];\n}));\nvar numericCategories = /* @__PURE__ */ new Set([\n \"space\",\n \"size\",\n \"radius\",\n \"zIndex\"\n]);\nvar reservedFolded = new Set(Array.from(reservedCssIdents, function(ident) {\n return ident.toLowerCase();\n}));\nfunction annotateStyleValue(property, input, options) {\n var _options_config_shorthands;\n var targetProperty = ((_options_config_shorthands = options.config.shorthands) === null || _options_config_shorthands === void 0 ? void 0 : _options_config_shorthands[property]) || property;\n var entry = grammarEntryByProp.get(targetProperty);\n var candidates = options.candidates || createCandidatePropertyVocabulary(options.config);\n var { spans } = parseValueWithSourceSpans(input, options.registry);\n var annotations = [];\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n var _loop = function() {\n var span = _step.value;\n if (span.kind === \"modifier\") {\n var name = input.slice(span.start, span.end);\n var modifierKind = options.registry.get(name);\n if (modifierKind) {\n annotations.push({\n kind: \"modifier\",\n start: span.start,\n end: span.end,\n text: name,\n modifierKind\n });\n }\n return \"continue\";\n }\n if (span.kind !== \"base\" && span.kind !== \"payload\") return \"continue\";\n if (span.start >= span.end) return \"continue\";\n var modifiers = span.kind === \"payload\" ? modifierChainBefore(input, spans, span.start) : [];\n var payload = input.slice(span.start, span.end);\n resolvePayload(payload, {\n resolveNumbers: (entry === null || entry === void 0 ? void 0 : entry.tokenCategory) !== void 0 && numericCategories.has(entry.tokenCategory),\n lookup(name2) {\n var contributions = candidates.get(name2);\n if (!contributions) return void 0;\n return {\n name: name2,\n kind: referenceKindFor(contributions, targetProperty)\n };\n },\n onCandidate(start, end, name2, reference) {\n var _standaloneValueProps_targetProperty;\n var at = {\n start: span.start + start,\n end: span.start + end,\n text: payload.slice(start, end),\n modifiers\n };\n var contributions = reference && candidates.get(name2);\n if (reference && contributions) {\n var target = resolveCandidateTarget(targetProperty, name2, contributions);\n var contribution = target.ok ? target.contribution : contributions[0];\n annotations.push({\n kind: target.ok ? \"token\" : \"identifier\",\n ...at,\n tokenCategory: contribution.tokenCategory,\n ...target.ok && {\n property: targetProperty\n },\n ...reference.opacity !== void 0 && {\n opacity: reference.opacity\n }\n });\n return;\n }\n var keyword = ((_standaloneValueProps_targetProperty = standaloneValueProps[targetProperty]) === null || _standaloneValueProps_targetProperty === void 0 ? void 0 : _standaloneValueProps_targetProperty[name2]) !== void 0 || targetProperty === \"fontWeight\" && fontWeightNames[name2] !== void 0 || reservedFolded.has(name2.toLowerCase());\n annotations.push({\n kind: keyword ? \"keyword\" : \"identifier\",\n ...at,\n ...keyword && {\n property: targetProperty\n }\n });\n }\n });\n };\n for (var _iterator = spans[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) _loop();\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n annotations.sort(function(a, b) {\n return a.start - b.start;\n });\n return annotations;\n}\nexport {\n annotateStyleValue\n};\n//# sourceMappingURL=toolingAnnotations.js.map\n"],"mappings":";;;;;;;;AAMA,IAAI,qBAAqB,IAAI,IAAI,eAAe,IAAI,SAAS,OAAO;CAClE,OAAO,CACL,MAAM,MACN,KACF;AACF,CAAC,CAAC;AACF,IAAI,oCAAoC,IAAI,IAAI;CAC9C;CACA;CACA;CACA;AACF,CAAC;AACD,IAAI,iBAAiB,IAAI,IAAI,MAAM,KAAK,mBAAmB,SAAS,OAAO;CACzE,OAAO,MAAM,YAAY;AAC3B,CAAC,CAAC;AACF,SAAS,mBAAmB,UAAU,OAAO,SAAS;CACpD,IAAI;CACJ,IAAI,mBAAmB,6BAA6B,QAAQ,OAAO,gBAAgB,QAAQ,+BAA+B,KAAK,IAAI,KAAK,IAAI,2BAA2B,cAAc;CACrL,IAAI,QAAQ,mBAAmB,IAAI,cAAc;CACjD,IAAI,aAAa,QAAQ,cAAc,kCAAkC,QAAQ,MAAM;CACvF,IAAI,EAAE,UAAU,0BAA0B,OAAO,QAAQ,QAAQ;CACjE,IAAI,cAAc,CAAC;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