@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,207 @@
|
|
|
1
|
+
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all) __defProp(target, name, {
|
|
8
|
+
get: all[name],
|
|
9
|
+
enumerable: true
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
|
+
var fontShorthand_exports = {};
|
|
23
|
+
__export(fontShorthand_exports, {
|
|
24
|
+
fontShorthandTargets: () => fontShorthandTargets,
|
|
25
|
+
splitFontValue: () => splitFontValue
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(fontShorthand_exports);
|
|
28
|
+
var import_backgroundFamily = require("./backgroundFamily.cjs");
|
|
29
|
+
const fontShorthandTargets = { font: {
|
|
30
|
+
style: ["fontStyle"],
|
|
31
|
+
weight: ["fontWeight"],
|
|
32
|
+
size: ["fontSize"],
|
|
33
|
+
lineHeight: ["lineHeight"],
|
|
34
|
+
family: ["fontFamily"]
|
|
35
|
+
} };
|
|
36
|
+
const styleKeywords = /* @__PURE__ */ new Set(["italic", "oblique"]);
|
|
37
|
+
const weightKeywords = /* @__PURE__ */ new Set([
|
|
38
|
+
"bold",
|
|
39
|
+
"bolder",
|
|
40
|
+
"lighter"
|
|
41
|
+
]);
|
|
42
|
+
const unsupportedKeywords = /* @__PURE__ */ new Set([
|
|
43
|
+
"normal",
|
|
44
|
+
"small-caps",
|
|
45
|
+
"ultra-condensed",
|
|
46
|
+
"extra-condensed",
|
|
47
|
+
"condensed",
|
|
48
|
+
"semi-condensed",
|
|
49
|
+
"semi-expanded",
|
|
50
|
+
"expanded",
|
|
51
|
+
"extra-expanded",
|
|
52
|
+
"ultra-expanded",
|
|
53
|
+
"caption",
|
|
54
|
+
"icon",
|
|
55
|
+
"menu",
|
|
56
|
+
"message-box",
|
|
57
|
+
"small-caption",
|
|
58
|
+
"status-bar"
|
|
59
|
+
]);
|
|
60
|
+
const sizePattern = /^-?(\d+\.?\d*|\.\d+)(?:[a-z%]+)?$/i;
|
|
61
|
+
const weightNumberPattern = /^[1-9]00$/;
|
|
62
|
+
function splitFontValue(value) {
|
|
63
|
+
const targets = fontShorthandTargets.font;
|
|
64
|
+
const errors = [];
|
|
65
|
+
const kinds = [
|
|
66
|
+
"style",
|
|
67
|
+
"weight",
|
|
68
|
+
"size",
|
|
69
|
+
"lineHeight",
|
|
70
|
+
"family"
|
|
71
|
+
];
|
|
72
|
+
const programs = {
|
|
73
|
+
style: {
|
|
74
|
+
base: null,
|
|
75
|
+
clauses: [],
|
|
76
|
+
present: false
|
|
77
|
+
},
|
|
78
|
+
weight: {
|
|
79
|
+
base: null,
|
|
80
|
+
clauses: [],
|
|
81
|
+
present: false
|
|
82
|
+
},
|
|
83
|
+
size: {
|
|
84
|
+
base: null,
|
|
85
|
+
clauses: [],
|
|
86
|
+
present: false
|
|
87
|
+
},
|
|
88
|
+
lineHeight: {
|
|
89
|
+
base: null,
|
|
90
|
+
clauses: [],
|
|
91
|
+
present: false
|
|
92
|
+
},
|
|
93
|
+
family: {
|
|
94
|
+
base: null,
|
|
95
|
+
clauses: [],
|
|
96
|
+
present: false
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
for (let clauseIndex = -1; clauseIndex < value.clauses.length; clauseIndex++) {
|
|
100
|
+
const isBase = clauseIndex === -1;
|
|
101
|
+
const payload = isBase ? value.base : value.clauses[clauseIndex].payload;
|
|
102
|
+
if (payload === null) continue;
|
|
103
|
+
const where = isBase ? "base" : clauseIndex;
|
|
104
|
+
const components = (0, import_backgroundFamily.splitTopLevelComponents)(payload);
|
|
105
|
+
const found = {};
|
|
106
|
+
let sizeIndex = -1;
|
|
107
|
+
for (let index = 0; index < components.length; index++) {
|
|
108
|
+
const component = components[index];
|
|
109
|
+
const lower = component.toLowerCase();
|
|
110
|
+
if (unsupportedKeywords.has(lower)) {
|
|
111
|
+
errors.push({
|
|
112
|
+
code: "unsupported-font-component",
|
|
113
|
+
component,
|
|
114
|
+
where
|
|
115
|
+
});
|
|
116
|
+
continue;
|
|
117
|
+
}
|
|
118
|
+
if (styleKeywords.has(lower)) {
|
|
119
|
+
if (found.style !== void 0) {
|
|
120
|
+
errors.push({
|
|
121
|
+
code: "unsupported-font-component",
|
|
122
|
+
component,
|
|
123
|
+
where
|
|
124
|
+
});
|
|
125
|
+
continue;
|
|
126
|
+
}
|
|
127
|
+
found.style = component;
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
if (weightKeywords.has(lower) || weightNumberPattern.test(component)) {
|
|
131
|
+
if (found.weight !== void 0) {
|
|
132
|
+
errors.push({
|
|
133
|
+
code: "unsupported-font-component",
|
|
134
|
+
component,
|
|
135
|
+
where
|
|
136
|
+
});
|
|
137
|
+
continue;
|
|
138
|
+
}
|
|
139
|
+
found.weight = component;
|
|
140
|
+
continue;
|
|
141
|
+
}
|
|
142
|
+
const slash = component.indexOf("/");
|
|
143
|
+
const sizePart = slash === -1 ? component : component.slice(0, slash);
|
|
144
|
+
if (sizePattern.test(sizePart)) {
|
|
145
|
+
if (found.size !== void 0) {
|
|
146
|
+
errors.push({
|
|
147
|
+
code: "unsupported-font-component",
|
|
148
|
+
component,
|
|
149
|
+
where
|
|
150
|
+
});
|
|
151
|
+
continue;
|
|
152
|
+
}
|
|
153
|
+
found.size = sizePart;
|
|
154
|
+
if (slash !== -1) found.lineHeight = component.slice(slash + 1);
|
|
155
|
+
sizeIndex = index;
|
|
156
|
+
const family = components.slice(index + 1).join(" ");
|
|
157
|
+
if (family) found.family = family;
|
|
158
|
+
break;
|
|
159
|
+
}
|
|
160
|
+
errors.push({
|
|
161
|
+
code: "unsupported-font-component",
|
|
162
|
+
component,
|
|
163
|
+
where
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
if (sizeIndex === -1) {
|
|
167
|
+
errors.push({
|
|
168
|
+
code: "unsupported-font-component",
|
|
169
|
+
component: payload,
|
|
170
|
+
where
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
for (const kind of kinds) {
|
|
174
|
+
const component = found[kind];
|
|
175
|
+
if (component === void 0) continue;
|
|
176
|
+
const program = programs[kind];
|
|
177
|
+
program.present = true;
|
|
178
|
+
if (isBase) {
|
|
179
|
+
program.base = component;
|
|
180
|
+
} else {
|
|
181
|
+
program.clauses.push({
|
|
182
|
+
modifiers: value.clauses[clauseIndex].modifiers,
|
|
183
|
+
payload: component
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
const entries = [];
|
|
189
|
+
for (const kind of kinds) {
|
|
190
|
+
const program = programs[kind];
|
|
191
|
+
if (!program.present) continue;
|
|
192
|
+
const shared = {
|
|
193
|
+
base: program.base,
|
|
194
|
+
clauses: program.clauses
|
|
195
|
+
};
|
|
196
|
+
for (const longhand of targets[kind]) {
|
|
197
|
+
entries.push({
|
|
198
|
+
property: longhand,
|
|
199
|
+
value: shared
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
return {
|
|
204
|
+
entries,
|
|
205
|
+
errors
|
|
206
|
+
};
|
|
207
|
+
}
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all) __defProp(target, name, {
|
|
10
|
+
get: all[name],
|
|
11
|
+
enumerable: true
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
var __copyProps = (to, from, except, desc) => {
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
17
|
+
get: () => from[key],
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return to;
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
24
|
+
var fontShorthand_exports = {};
|
|
25
|
+
__export(fontShorthand_exports, {
|
|
26
|
+
fontShorthandTargets: () => fontShorthandTargets,
|
|
27
|
+
splitFontValue: () => splitFontValue
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(fontShorthand_exports);
|
|
30
|
+
var import_backgroundFamily = require("./backgroundFamily.native.js");
|
|
31
|
+
var fontShorthandTargets = { font: {
|
|
32
|
+
style: ["fontStyle"],
|
|
33
|
+
weight: ["fontWeight"],
|
|
34
|
+
size: ["fontSize"],
|
|
35
|
+
lineHeight: ["lineHeight"],
|
|
36
|
+
family: ["fontFamily"]
|
|
37
|
+
} };
|
|
38
|
+
var styleKeywords = /* @__PURE__ */ new Set(["italic", "oblique"]);
|
|
39
|
+
var weightKeywords = /* @__PURE__ */ new Set([
|
|
40
|
+
"bold",
|
|
41
|
+
"bolder",
|
|
42
|
+
"lighter"
|
|
43
|
+
]);
|
|
44
|
+
var unsupportedKeywords = /* @__PURE__ */ new Set([
|
|
45
|
+
"normal",
|
|
46
|
+
"small-caps",
|
|
47
|
+
"ultra-condensed",
|
|
48
|
+
"extra-condensed",
|
|
49
|
+
"condensed",
|
|
50
|
+
"semi-condensed",
|
|
51
|
+
"semi-expanded",
|
|
52
|
+
"expanded",
|
|
53
|
+
"extra-expanded",
|
|
54
|
+
"ultra-expanded",
|
|
55
|
+
"caption",
|
|
56
|
+
"icon",
|
|
57
|
+
"menu",
|
|
58
|
+
"message-box",
|
|
59
|
+
"small-caption",
|
|
60
|
+
"status-bar"
|
|
61
|
+
]);
|
|
62
|
+
var sizePattern = /^-?(\d+\.?\d*|\.\d+)(?:[a-z%]+)?$/i;
|
|
63
|
+
var weightNumberPattern = /^[1-9]00$/;
|
|
64
|
+
function splitFontValue(value) {
|
|
65
|
+
var targets = fontShorthandTargets.font;
|
|
66
|
+
var errors = [];
|
|
67
|
+
var kinds = [
|
|
68
|
+
"style",
|
|
69
|
+
"weight",
|
|
70
|
+
"size",
|
|
71
|
+
"lineHeight",
|
|
72
|
+
"family"
|
|
73
|
+
];
|
|
74
|
+
var programs = {
|
|
75
|
+
style: {
|
|
76
|
+
base: null,
|
|
77
|
+
clauses: [],
|
|
78
|
+
present: false
|
|
79
|
+
},
|
|
80
|
+
weight: {
|
|
81
|
+
base: null,
|
|
82
|
+
clauses: [],
|
|
83
|
+
present: false
|
|
84
|
+
},
|
|
85
|
+
size: {
|
|
86
|
+
base: null,
|
|
87
|
+
clauses: [],
|
|
88
|
+
present: false
|
|
89
|
+
},
|
|
90
|
+
lineHeight: {
|
|
91
|
+
base: null,
|
|
92
|
+
clauses: [],
|
|
93
|
+
present: false
|
|
94
|
+
},
|
|
95
|
+
family: {
|
|
96
|
+
base: null,
|
|
97
|
+
clauses: [],
|
|
98
|
+
present: false
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
for (var clauseIndex = -1; clauseIndex < value.clauses.length; clauseIndex++) {
|
|
102
|
+
var isBase = clauseIndex === -1;
|
|
103
|
+
var payload = isBase ? value.base : value.clauses[clauseIndex].payload;
|
|
104
|
+
if (payload === null) continue;
|
|
105
|
+
var where = isBase ? "base" : clauseIndex;
|
|
106
|
+
var components = (0, import_backgroundFamily.splitTopLevelComponents)(payload);
|
|
107
|
+
var found = {};
|
|
108
|
+
var sizeIndex = -1;
|
|
109
|
+
for (var index = 0; index < components.length; index++) {
|
|
110
|
+
var component = components[index];
|
|
111
|
+
var lower = component.toLowerCase();
|
|
112
|
+
if (unsupportedKeywords.has(lower)) {
|
|
113
|
+
errors.push({
|
|
114
|
+
code: "unsupported-font-component",
|
|
115
|
+
component,
|
|
116
|
+
where
|
|
117
|
+
});
|
|
118
|
+
continue;
|
|
119
|
+
}
|
|
120
|
+
if (styleKeywords.has(lower)) {
|
|
121
|
+
if (found.style !== void 0) {
|
|
122
|
+
errors.push({
|
|
123
|
+
code: "unsupported-font-component",
|
|
124
|
+
component,
|
|
125
|
+
where
|
|
126
|
+
});
|
|
127
|
+
continue;
|
|
128
|
+
}
|
|
129
|
+
found.style = component;
|
|
130
|
+
continue;
|
|
131
|
+
}
|
|
132
|
+
if (weightKeywords.has(lower) || weightNumberPattern.test(component)) {
|
|
133
|
+
if (found.weight !== void 0) {
|
|
134
|
+
errors.push({
|
|
135
|
+
code: "unsupported-font-component",
|
|
136
|
+
component,
|
|
137
|
+
where
|
|
138
|
+
});
|
|
139
|
+
continue;
|
|
140
|
+
}
|
|
141
|
+
found.weight = component;
|
|
142
|
+
continue;
|
|
143
|
+
}
|
|
144
|
+
var slash = component.indexOf("/");
|
|
145
|
+
var sizePart = slash === -1 ? component : component.slice(0, slash);
|
|
146
|
+
if (sizePattern.test(sizePart)) {
|
|
147
|
+
if (found.size !== void 0) {
|
|
148
|
+
errors.push({
|
|
149
|
+
code: "unsupported-font-component",
|
|
150
|
+
component,
|
|
151
|
+
where
|
|
152
|
+
});
|
|
153
|
+
continue;
|
|
154
|
+
}
|
|
155
|
+
found.size = sizePart;
|
|
156
|
+
if (slash !== -1) found.lineHeight = component.slice(slash + 1);
|
|
157
|
+
sizeIndex = index;
|
|
158
|
+
var family = components.slice(index + 1).join(" ");
|
|
159
|
+
if (family) found.family = family;
|
|
160
|
+
break;
|
|
161
|
+
}
|
|
162
|
+
errors.push({
|
|
163
|
+
code: "unsupported-font-component",
|
|
164
|
+
component,
|
|
165
|
+
where
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
if (sizeIndex === -1) {
|
|
169
|
+
errors.push({
|
|
170
|
+
code: "unsupported-font-component",
|
|
171
|
+
component: payload,
|
|
172
|
+
where
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
176
|
+
try {
|
|
177
|
+
for (var _iterator = kinds[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
178
|
+
var kind = _step.value;
|
|
179
|
+
var component1 = found[kind];
|
|
180
|
+
if (component1 === void 0) continue;
|
|
181
|
+
var program = programs[kind];
|
|
182
|
+
program.present = true;
|
|
183
|
+
if (isBase) {
|
|
184
|
+
program.base = component1;
|
|
185
|
+
} else {
|
|
186
|
+
program.clauses.push({
|
|
187
|
+
modifiers: value.clauses[clauseIndex].modifiers,
|
|
188
|
+
payload: component1
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
} catch (err) {
|
|
193
|
+
_didIteratorError = true;
|
|
194
|
+
_iteratorError = err;
|
|
195
|
+
} finally {
|
|
196
|
+
try {
|
|
197
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
198
|
+
_iterator.return();
|
|
199
|
+
}
|
|
200
|
+
} finally {
|
|
201
|
+
if (_didIteratorError) {
|
|
202
|
+
throw _iteratorError;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
var entries = [];
|
|
208
|
+
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;
|
|
209
|
+
try {
|
|
210
|
+
for (var _iterator1 = kinds[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
|
|
211
|
+
var kind1 = _step1.value;
|
|
212
|
+
var program1 = programs[kind1];
|
|
213
|
+
if (!program1.present) continue;
|
|
214
|
+
var shared = {
|
|
215
|
+
base: program1.base,
|
|
216
|
+
clauses: program1.clauses
|
|
217
|
+
};
|
|
218
|
+
var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = void 0;
|
|
219
|
+
try {
|
|
220
|
+
for (var _iterator2 = targets[kind1][Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
|
|
221
|
+
var longhand = _step2.value;
|
|
222
|
+
entries.push({
|
|
223
|
+
property: longhand,
|
|
224
|
+
value: shared
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
} catch (err) {
|
|
228
|
+
_didIteratorError2 = true;
|
|
229
|
+
_iteratorError2 = err;
|
|
230
|
+
} finally {
|
|
231
|
+
try {
|
|
232
|
+
if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
|
|
233
|
+
_iterator2.return();
|
|
234
|
+
}
|
|
235
|
+
} finally {
|
|
236
|
+
if (_didIteratorError2) {
|
|
237
|
+
throw _iteratorError2;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
} catch (err) {
|
|
243
|
+
_didIteratorError1 = true;
|
|
244
|
+
_iteratorError1 = err;
|
|
245
|
+
} finally {
|
|
246
|
+
try {
|
|
247
|
+
if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
|
|
248
|
+
_iterator1.return();
|
|
249
|
+
}
|
|
250
|
+
} finally {
|
|
251
|
+
if (_didIteratorError1) {
|
|
252
|
+
throw _iteratorError1;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
return {
|
|
257
|
+
entries,
|
|
258
|
+
errors
|
|
259
|
+
};
|
|
260
|
+
}
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all) __defProp(target, name, {
|
|
10
|
+
get: all[name],
|
|
11
|
+
enumerable: true
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
var __copyProps = (to, from, except, desc) => {
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
17
|
+
get: () => from[key],
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return to;
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
24
|
+
var fontShorthand_exports = {};
|
|
25
|
+
__export(fontShorthand_exports, {
|
|
26
|
+
fontShorthandTargets: () => fontShorthandTargets,
|
|
27
|
+
splitFontValue: () => splitFontValue
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(fontShorthand_exports);
|
|
30
|
+
var import_backgroundFamily = require("./backgroundFamily.native.js");
|
|
31
|
+
var fontShorthandTargets = { font: {
|
|
32
|
+
style: ["fontStyle"],
|
|
33
|
+
weight: ["fontWeight"],
|
|
34
|
+
size: ["fontSize"],
|
|
35
|
+
lineHeight: ["lineHeight"],
|
|
36
|
+
family: ["fontFamily"]
|
|
37
|
+
} };
|
|
38
|
+
var styleKeywords = /* @__PURE__ */ new Set(["italic", "oblique"]);
|
|
39
|
+
var weightKeywords = /* @__PURE__ */ new Set([
|
|
40
|
+
"bold",
|
|
41
|
+
"bolder",
|
|
42
|
+
"lighter"
|
|
43
|
+
]);
|
|
44
|
+
var unsupportedKeywords = /* @__PURE__ */ new Set([
|
|
45
|
+
"normal",
|
|
46
|
+
"small-caps",
|
|
47
|
+
"ultra-condensed",
|
|
48
|
+
"extra-condensed",
|
|
49
|
+
"condensed",
|
|
50
|
+
"semi-condensed",
|
|
51
|
+
"semi-expanded",
|
|
52
|
+
"expanded",
|
|
53
|
+
"extra-expanded",
|
|
54
|
+
"ultra-expanded",
|
|
55
|
+
"caption",
|
|
56
|
+
"icon",
|
|
57
|
+
"menu",
|
|
58
|
+
"message-box",
|
|
59
|
+
"small-caption",
|
|
60
|
+
"status-bar"
|
|
61
|
+
]);
|
|
62
|
+
var sizePattern = /^-?(\d+\.?\d*|\.\d+)(?:[a-z%]+)?$/i;
|
|
63
|
+
var weightNumberPattern = /^[1-9]00$/;
|
|
64
|
+
function splitFontValue(value) {
|
|
65
|
+
var targets = fontShorthandTargets.font;
|
|
66
|
+
var errors = [];
|
|
67
|
+
var kinds = [
|
|
68
|
+
"style",
|
|
69
|
+
"weight",
|
|
70
|
+
"size",
|
|
71
|
+
"lineHeight",
|
|
72
|
+
"family"
|
|
73
|
+
];
|
|
74
|
+
var programs = {
|
|
75
|
+
style: {
|
|
76
|
+
base: null,
|
|
77
|
+
clauses: [],
|
|
78
|
+
present: false
|
|
79
|
+
},
|
|
80
|
+
weight: {
|
|
81
|
+
base: null,
|
|
82
|
+
clauses: [],
|
|
83
|
+
present: false
|
|
84
|
+
},
|
|
85
|
+
size: {
|
|
86
|
+
base: null,
|
|
87
|
+
clauses: [],
|
|
88
|
+
present: false
|
|
89
|
+
},
|
|
90
|
+
lineHeight: {
|
|
91
|
+
base: null,
|
|
92
|
+
clauses: [],
|
|
93
|
+
present: false
|
|
94
|
+
},
|
|
95
|
+
family: {
|
|
96
|
+
base: null,
|
|
97
|
+
clauses: [],
|
|
98
|
+
present: false
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
for (var clauseIndex = -1; clauseIndex < value.clauses.length; clauseIndex++) {
|
|
102
|
+
var isBase = clauseIndex === -1;
|
|
103
|
+
var payload = isBase ? value.base : value.clauses[clauseIndex].payload;
|
|
104
|
+
if (payload === null) continue;
|
|
105
|
+
var where = isBase ? "base" : clauseIndex;
|
|
106
|
+
var components = (0, import_backgroundFamily.splitTopLevelComponents)(payload);
|
|
107
|
+
var found = {};
|
|
108
|
+
var sizeIndex = -1;
|
|
109
|
+
for (var index = 0; index < components.length; index++) {
|
|
110
|
+
var component = components[index];
|
|
111
|
+
var lower = component.toLowerCase();
|
|
112
|
+
if (unsupportedKeywords.has(lower)) {
|
|
113
|
+
errors.push({
|
|
114
|
+
code: "unsupported-font-component",
|
|
115
|
+
component,
|
|
116
|
+
where
|
|
117
|
+
});
|
|
118
|
+
continue;
|
|
119
|
+
}
|
|
120
|
+
if (styleKeywords.has(lower)) {
|
|
121
|
+
if (found.style !== void 0) {
|
|
122
|
+
errors.push({
|
|
123
|
+
code: "unsupported-font-component",
|
|
124
|
+
component,
|
|
125
|
+
where
|
|
126
|
+
});
|
|
127
|
+
continue;
|
|
128
|
+
}
|
|
129
|
+
found.style = component;
|
|
130
|
+
continue;
|
|
131
|
+
}
|
|
132
|
+
if (weightKeywords.has(lower) || weightNumberPattern.test(component)) {
|
|
133
|
+
if (found.weight !== void 0) {
|
|
134
|
+
errors.push({
|
|
135
|
+
code: "unsupported-font-component",
|
|
136
|
+
component,
|
|
137
|
+
where
|
|
138
|
+
});
|
|
139
|
+
continue;
|
|
140
|
+
}
|
|
141
|
+
found.weight = component;
|
|
142
|
+
continue;
|
|
143
|
+
}
|
|
144
|
+
var slash = component.indexOf("/");
|
|
145
|
+
var sizePart = slash === -1 ? component : component.slice(0, slash);
|
|
146
|
+
if (sizePattern.test(sizePart)) {
|
|
147
|
+
if (found.size !== void 0) {
|
|
148
|
+
errors.push({
|
|
149
|
+
code: "unsupported-font-component",
|
|
150
|
+
component,
|
|
151
|
+
where
|
|
152
|
+
});
|
|
153
|
+
continue;
|
|
154
|
+
}
|
|
155
|
+
found.size = sizePart;
|
|
156
|
+
if (slash !== -1) found.lineHeight = component.slice(slash + 1);
|
|
157
|
+
sizeIndex = index;
|
|
158
|
+
var family = components.slice(index + 1).join(" ");
|
|
159
|
+
if (family) found.family = family;
|
|
160
|
+
break;
|
|
161
|
+
}
|
|
162
|
+
errors.push({
|
|
163
|
+
code: "unsupported-font-component",
|
|
164
|
+
component,
|
|
165
|
+
where
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
if (sizeIndex === -1) {
|
|
169
|
+
errors.push({
|
|
170
|
+
code: "unsupported-font-component",
|
|
171
|
+
component: payload,
|
|
172
|
+
where
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
176
|
+
try {
|
|
177
|
+
for (var _iterator = kinds[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
178
|
+
var kind = _step.value;
|
|
179
|
+
var component1 = found[kind];
|
|
180
|
+
if (component1 === void 0) continue;
|
|
181
|
+
var program = programs[kind];
|
|
182
|
+
program.present = true;
|
|
183
|
+
if (isBase) {
|
|
184
|
+
program.base = component1;
|
|
185
|
+
} else {
|
|
186
|
+
program.clauses.push({
|
|
187
|
+
modifiers: value.clauses[clauseIndex].modifiers,
|
|
188
|
+
payload: component1
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
} catch (err) {
|
|
193
|
+
_didIteratorError = true;
|
|
194
|
+
_iteratorError = err;
|
|
195
|
+
} finally {
|
|
196
|
+
try {
|
|
197
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
198
|
+
_iterator.return();
|
|
199
|
+
}
|
|
200
|
+
} finally {
|
|
201
|
+
if (_didIteratorError) {
|
|
202
|
+
throw _iteratorError;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
var entries = [];
|
|
208
|
+
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;
|
|
209
|
+
try {
|
|
210
|
+
for (var _iterator1 = kinds[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
|
|
211
|
+
var kind1 = _step1.value;
|
|
212
|
+
var program1 = programs[kind1];
|
|
213
|
+
if (!program1.present) continue;
|
|
214
|
+
var shared = {
|
|
215
|
+
base: program1.base,
|
|
216
|
+
clauses: program1.clauses
|
|
217
|
+
};
|
|
218
|
+
var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = void 0;
|
|
219
|
+
try {
|
|
220
|
+
for (var _iterator2 = targets[kind1][Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
|
|
221
|
+
var longhand = _step2.value;
|
|
222
|
+
entries.push({
|
|
223
|
+
property: longhand,
|
|
224
|
+
value: shared
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
} catch (err) {
|
|
228
|
+
_didIteratorError2 = true;
|
|
229
|
+
_iteratorError2 = err;
|
|
230
|
+
} finally {
|
|
231
|
+
try {
|
|
232
|
+
if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
|
|
233
|
+
_iterator2.return();
|
|
234
|
+
}
|
|
235
|
+
} finally {
|
|
236
|
+
if (_didIteratorError2) {
|
|
237
|
+
throw _iteratorError2;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
} catch (err) {
|
|
243
|
+
_didIteratorError1 = true;
|
|
244
|
+
_iteratorError1 = err;
|
|
245
|
+
} finally {
|
|
246
|
+
try {
|
|
247
|
+
if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
|
|
248
|
+
_iterator1.return();
|
|
249
|
+
}
|
|
250
|
+
} finally {
|
|
251
|
+
if (_didIteratorError1) {
|
|
252
|
+
throw _iteratorError1;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
return {
|
|
257
|
+
entries,
|
|
258
|
+
errors
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
//# sourceMappingURL=fontShorthand.native.js.map
|