@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 @@
|
|
|
1
|
+
{"version":3,"file":"modifierRegistry.native.js","names":[],"sources":["esm/modifierRegistry.native.js"],"sourcesContent":["import { grammarPlatformNames } from \"./config\";\nimport { coreStateModifierNames, modifierAliases } from \"./stateModifiers\";\nimport { componentStateNames } from \"./states\";\nimport { grammarMaxNonPlatformDepth } from \"./valueTypes\";\nfunction _instanceof(left, right) {\n if (right != null && typeof Symbol !== \"undefined\" && right[Symbol.hasInstance]) {\n return !!right[Symbol.hasInstance](left);\n } else {\n return left instanceof right;\n }\n}\nvar stateModifierNames = Object.freeze([\n ...coreStateModifierNames,\n ...Object.keys(modifierAliases),\n ...componentStateNames\n]);\nvar stateModifierSet = new Set(stateModifierNames);\nvar groupPrefixLength = \"group-\".length;\nfunction isRootThemeName(name) {\n return name.length > 0 && !name.includes(\"_\");\n}\nfunction canonicalClauseModifier(name) {\n var direct = modifierAliases[name];\n if (direct) return direct;\n if (name.startsWith(\"group-\")) {\n var group = parseGroupModifier(name);\n if (group) {\n var _modifierAliases_group_state;\n var state = (_modifierAliases_group_state = modifierAliases[group.state]) !== null && _modifierAliases_group_state !== void 0 ? _modifierAliases_group_state : group.state;\n if (state !== group.state) {\n return group.group === null ? `group-${state}` : `group-${state}/${group.group}`;\n }\n }\n }\n return name;\n}\nfunction parseGroupModifier(name) {\n if (!name.startsWith(\"group-\")) return null;\n var slash = name.indexOf(\"/\");\n if (slash === -1) {\n var state = name.slice(groupPrefixLength);\n return stateModifierSet.has(state) ? {\n state,\n group: null\n } : null;\n }\n if (!isModifierName(name, slash + 1, name.length)) return null;\n var state1 = name.slice(groupPrefixLength, slash);\n return stateModifierSet.has(state1) ? {\n state: state1,\n group: name.slice(slash + 1)\n } : null;\n}\nfunction parseContainerModifier(name) {\n if (name.charCodeAt(0) !== 64) return null;\n var slash = name.indexOf(\"/\");\n if (slash === -1) {\n return isModifierName(name, 1, name.length) ? {\n size: name.slice(1),\n container: null\n } : null;\n }\n if (!isModifierName(name, 1, slash) || !isModifierName(name, slash + 1, name.length)) {\n return null;\n }\n return {\n size: name.slice(1, slash),\n container: name.slice(slash + 1)\n };\n}\nfunction isModifierName(text, start, end) {\n if (start >= end) return false;\n for (var index = start; index < end; index++) {\n var code = text.charCodeAt(index);\n if (!(code >= 97 && code <= 122) && // a-z\n !(code >= 65 && code <= 90) && // A-Z\n !(code >= 48 && code <= 57) && // 0-9\n code !== 45 && // -\n code !== 95) {\n return false;\n }\n }\n return true;\n}\nfunction forEachName(source, visit) {\n if (!source) return;\n if (Array.isArray(source)) {\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = source[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var name = _step.value;\n visit(name);\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 return;\n }\n if (_instanceof(source, Set)) {\n var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;\n try {\n for (var _iterator1 = source[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {\n var name1 = _step1.value;\n visit(name1);\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 return;\n }\n for (var name2 in source) visit(name2);\n}\nfunction createModifierRegistry(view) {\n var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n var names = /* @__PURE__ */ new Map();\n var diagnostics = [];\n var completionNames = [];\n var _options_containerSizeNames;\n var sizeSource = (_options_containerSizeNames = options.containerSizeNames) !== null && _options_containerSizeNames !== void 0 ? _options_containerSizeNames : view.containerSizeNames;\n var containerSizes = null;\n if (sizeSource !== void 0) {\n containerSizes = /* @__PURE__ */ new Set();\n forEachName(sizeSource, function(name3) {\n return containerSizes.add(name3);\n });\n }\n var register = function(name3, kind) {\n if (name3.charCodeAt(0) === 64) {\n diagnostics.push(`modifier \"${name3}\" is not registered: the \"@\" prefix is reserved for container query modifiers, so it cannot be a ${kind} name`);\n return;\n }\n var existing = names.get(name3);\n if (existing !== void 0) {\n if (existing !== kind) {\n diagnostics.push(`modifier \"${name3}\" is already registered as a ${existing} modifier, so the ${kind} name is ignored`);\n }\n return;\n }\n if (parseGroupModifier(name3) !== null) {\n diagnostics.push(`modifier \"${name3}\" shadows the group modifier of the same spelling, which can no longer be used as a ${kind} name`);\n }\n names.set(name3, kind);\n completionNames.push(name3);\n };\n var isContainerSize = function(size2) {\n return containerSizes ? containerSizes.has(size2) : names.get(size2) === \"media\";\n };\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = stateModifierNames[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var name = _step.value;\n register(name, \"state\");\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 forEachName(view.mediaNames, function(name3) {\n return register(name3, \"media\");\n });\n var _view_platformNames;\n forEachName((_view_platformNames = view.platformNames) !== null && _view_platformNames !== void 0 ? _view_platformNames : grammarPlatformNames, function(name3) {\n return register(name3, \"platform\");\n });\n forEachName(view.themeNames, function(name3) {\n if (isRootThemeName(name3)) register(name3, \"theme\");\n });\n var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;\n try {\n for (var _iterator1 = stateModifierNames[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {\n var name1 = _step1.value;\n var group = `group-${name1}`;\n if (names.get(group) === void 0) completionNames.push(group);\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 if (containerSizes) {\n var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = void 0;\n try {\n for (var _iterator2 = containerSizes[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n var size = _step2.value;\n if (isContainerSize(size)) completionNames.push(`@${size}`);\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 } else {\n var _iteratorNormalCompletion3 = true, _didIteratorError3 = false, _iteratorError3 = void 0;\n try {\n for (var _iterator3 = completionNames.slice()[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {\n var name2 = _step3.value;\n if (names.get(name2) === \"media\") completionNames.push(`@${name2}`);\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 var kindOrder = {\n platform: 0,\n theme: 1,\n container: 2,\n media: 3,\n group: 4,\n state: 5\n };\n var modifierTrie = {\n modifiers: [],\n children: /* @__PURE__ */ new Map()\n };\n var get = function(name3) {\n var kind = names.get(name3);\n if (kind !== void 0) return kind;\n if (parseGroupModifier(name3) !== null) return \"group\";\n var container = parseContainerModifier(name3);\n if (container !== null && isContainerSize(container.size)) return \"container\";\n return void 0;\n };\n return {\n registry: {\n get,\n next(modifiers) {\n var node = modifierTrie;\n var _iteratorNormalCompletion4 = true, _didIteratorError4 = false, _iteratorError4 = void 0;\n try {\n for (var _iterator4 = modifiers[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {\n var authored = _step4.value;\n var canonical = canonicalClauseModifier(authored);\n var child = node.children.get(canonical);\n if (!child) {\n child = {\n modifiers: [\n ...node.modifiers,\n canonical\n ],\n children: /* @__PURE__ */ new Map()\n };\n node.children.set(canonical, child);\n }\n node = child;\n }\n } catch (err) {\n _didIteratorError4 = true;\n _iteratorError4 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion4 && _iterator4.return != null) {\n _iterator4.return();\n }\n } finally {\n if (_didIteratorError4) {\n throw _iteratorError4;\n }\n }\n }\n if (node.next) return node.next;\n var used = /* @__PURE__ */ new Set();\n var usedKinds = /* @__PURE__ */ new Set();\n var highestOrder = -1;\n var nonPlatformDepth = 0;\n var _iteratorNormalCompletion12 = true, _didIteratorError12 = false, _iteratorError12 = void 0;\n try {\n for (var _iterator12 = node.modifiers[Symbol.iterator](), _step12; !(_iteratorNormalCompletion12 = (_step12 = _iterator12.next()).done); _iteratorNormalCompletion12 = true) {\n var canonical1 = _step12.value;\n if (used.has(canonical1)) {\n node.next = [];\n return node.next;\n }\n used.add(canonical1);\n var kind = get(canonical1);\n if (!kind || usedKinds.has(kind) || kindOrder[kind] < highestOrder) {\n node.next = [];\n return node.next;\n }\n usedKinds.add(kind);\n highestOrder = kindOrder[kind];\n if (kind !== \"platform\") {\n nonPlatformDepth++;\n if (nonPlatformDepth > grammarMaxNonPlatformDepth) {\n node.next = [];\n return node.next;\n }\n }\n }\n } catch (err) {\n _didIteratorError12 = true;\n _iteratorError12 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion12 && _iterator12.return != null) {\n _iterator12.return();\n }\n } finally {\n if (_didIteratorError12) {\n throw _iteratorError12;\n }\n }\n }\n var next = [];\n var _iteratorNormalCompletion22 = true, _didIteratorError22 = false, _iteratorError22 = void 0;\n try {\n for (var _iterator22 = completionNames[Symbol.iterator](), _step22; !(_iteratorNormalCompletion22 = (_step22 = _iterator22.next()).done); _iteratorNormalCompletion22 = true) {\n var name3 = _step22.value;\n var canonical2 = canonicalClauseModifier(name3);\n if (canonical2 !== name3) continue;\n if (used.has(canonical2)) continue;\n var kind1 = get(name3);\n if (!kind1 || kindOrder[kind1] < highestOrder) continue;\n if (usedKinds.has(kind1)) continue;\n if (kind1 !== \"platform\" && nonPlatformDepth >= grammarMaxNonPlatformDepth) {\n continue;\n }\n next.push(name3);\n }\n } catch (err) {\n _didIteratorError22 = true;\n _iteratorError22 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion22 && _iterator22.return != null) {\n _iterator22.return();\n }\n } finally {\n if (_didIteratorError22) {\n throw _iteratorError22;\n }\n }\n }\n node.next = next;\n return node.next;\n }\n },\n diagnostics\n };\n}\nexport {\n canonicalClauseModifier,\n createModifierRegistry,\n isRootThemeName,\n parseContainerModifier,\n parseGroupModifier,\n stateModifierNames\n};\n//# sourceMappingURL=modifierRegistry.js.map\n"],"mappings":";;;;;;AAIA,SAAS,YAAY,MAAM,OAAO;CAChC,IAAI,SAAS,QAAQ,OAAO,WAAW,eAAe,MAAM,OAAO,cAAc;EAC/E,OAAO,CAAC,CAAC,MAAM,OAAO,aAAa,IAAI;CACzC,OAAO;EACL,OAAO,gBAAgB;CACzB;AACF;AACA,IAAI,qBAAqB,OAAO,OAAO;CACrC,GAAG;CACH,GAAG,OAAO,KAAK,eAAe;CAC9B,GAAG;AACL,CAAC;AACD,IAAI,mBAAmB,IAAI,IAAI,kBAAkB;AACjD,IAAI,oBAAoB,SAAS;AACjC,SA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;IACF,SAAS,KAAK;KACZ,sBAAsB;KACtB,mBAAmB;IACrB,UAAU;KACR,IAAI;MACF,IAAI,CAAC,+BAA+B,YAAY,UAAU,MAAM;OAC9D,YAAY,OAAO;MACrB;KACF,UAAU;MACR,IAAI,qBAAqB;OACvB,MAAM;MACR;KACF;IACF;IACA,KAAK,OAAO;IACZ,OAAO,KAAK;GACd;EACF;EACA;CACF;AACF"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { splitTopLevelComponents } from "./backgroundFamily.mjs";
|
|
2
|
+
|
|
3
|
+
const listValuedLonghands = /* @__PURE__ */ new Set([
|
|
4
|
+
"boxShadow",
|
|
5
|
+
"textShadow",
|
|
6
|
+
"transform",
|
|
7
|
+
"transition",
|
|
8
|
+
"transitionProperty",
|
|
9
|
+
"animation",
|
|
10
|
+
"animationName",
|
|
11
|
+
"backgroundImage",
|
|
12
|
+
"backgroundPosition",
|
|
13
|
+
"backgroundSize",
|
|
14
|
+
"backgroundRepeat",
|
|
15
|
+
"fontFamily",
|
|
16
|
+
"fontVariant",
|
|
17
|
+
"filter",
|
|
18
|
+
"backdropFilter",
|
|
19
|
+
"willChange",
|
|
20
|
+
"quotes",
|
|
21
|
+
"textDecorationLine",
|
|
22
|
+
"containIntrinsicSize",
|
|
23
|
+
"strokeDasharray",
|
|
24
|
+
"gridTemplateColumns",
|
|
25
|
+
"gridTemplateRows",
|
|
26
|
+
"gridTemplateAreas",
|
|
27
|
+
"gridArea",
|
|
28
|
+
"gridColumn",
|
|
29
|
+
"gridRow",
|
|
30
|
+
"inset",
|
|
31
|
+
"mask",
|
|
32
|
+
"maskImage",
|
|
33
|
+
"maskPosition",
|
|
34
|
+
"maskSize"
|
|
35
|
+
]);
|
|
36
|
+
function validatePayloadShape(property, payload, hasBase) {
|
|
37
|
+
if (listValuedLonghands.has(property)) return null;
|
|
38
|
+
const components = splitTopLevelComponents(payload);
|
|
39
|
+
if (components.length <= 1) return null;
|
|
40
|
+
return {
|
|
41
|
+
code: "multi-component-single-value",
|
|
42
|
+
property,
|
|
43
|
+
payload,
|
|
44
|
+
message: `"${payload}" holds ${components.length} values but "${property}" takes one.` + (hasBase ? "" : ` A value written after a conditional joins that conditional's payload \u2014 write the base value before the first conditional.`)
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export { validatePayloadShape };
|
|
49
|
+
//# sourceMappingURL=payloadShape.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payloadShape.js","names":[],"sources":["esm/payloadShape.js"],"sourcesContent":["import { splitTopLevelComponents } from \"./backgroundFamily\";\nconst listValuedLonghands = /* @__PURE__ */ new Set([\n \"boxShadow\",\n \"textShadow\",\n \"transform\",\n \"transition\",\n \"transitionProperty\",\n \"animation\",\n \"animationName\",\n \"backgroundImage\",\n \"backgroundPosition\",\n \"backgroundSize\",\n \"backgroundRepeat\",\n \"fontFamily\",\n \"fontVariant\",\n \"filter\",\n \"backdropFilter\",\n \"willChange\",\n \"quotes\",\n \"textDecorationLine\",\n \"containIntrinsicSize\",\n \"strokeDasharray\",\n \"gridTemplateColumns\",\n \"gridTemplateRows\",\n \"gridTemplateAreas\",\n \"gridArea\",\n \"gridColumn\",\n \"gridRow\",\n \"inset\",\n \"mask\",\n \"maskImage\",\n \"maskPosition\",\n \"maskSize\"\n]);\nfunction validatePayloadShape(property, payload, hasBase) {\n if (listValuedLonghands.has(property)) return null;\n const components = splitTopLevelComponents(payload);\n if (components.length <= 1) return null;\n return {\n code: \"multi-component-single-value\",\n property,\n payload,\n message: `\"${payload}\" holds ${components.length} values but \"${property}\" takes one.` + (hasBase ? \"\" : ` A value written after a conditional joins that conditional's payload \\u2014 write the base value before the first conditional.`)\n };\n}\nexport {\n validatePayloadShape\n};\n//# sourceMappingURL=payloadShape.js.map\n"],"mappings":";;;AACA,MAAM,sCAAsC,IAAI,IAAI;CAClD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;AACD,SAAS,qBAAqB,UAAU,SAAS,SAAS;CACxD,IAAI,oBAAoB,IAAI,QAAQ,GAAG,OAAO;CAC9C,MAAM,aAAa,wBAAwB,OAAO;CAClD,IAAI,WAAW,UAAU,GAAG,OAAO;CACnC,OAAO;EACL,MAAM;EACN;EACA;EACA,SAAS,IAAI,QAAQ,UAAU,WAAW,OAAO,eAAe,SAAS,iBAAiB,UAAU,KAAK;CAC3G;AACF"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { splitTopLevelComponents } from "./backgroundFamily.native.js";
|
|
2
|
+
|
|
3
|
+
var listValuedLonghands = /* @__PURE__ */ new Set([
|
|
4
|
+
"boxShadow",
|
|
5
|
+
"textShadow",
|
|
6
|
+
"transform",
|
|
7
|
+
"transition",
|
|
8
|
+
"transitionProperty",
|
|
9
|
+
"animation",
|
|
10
|
+
"animationName",
|
|
11
|
+
"backgroundImage",
|
|
12
|
+
"backgroundPosition",
|
|
13
|
+
"backgroundSize",
|
|
14
|
+
"backgroundRepeat",
|
|
15
|
+
"fontFamily",
|
|
16
|
+
"fontVariant",
|
|
17
|
+
"filter",
|
|
18
|
+
"backdropFilter",
|
|
19
|
+
"willChange",
|
|
20
|
+
"quotes",
|
|
21
|
+
"textDecorationLine",
|
|
22
|
+
"containIntrinsicSize",
|
|
23
|
+
"strokeDasharray",
|
|
24
|
+
"gridTemplateColumns",
|
|
25
|
+
"gridTemplateRows",
|
|
26
|
+
"gridTemplateAreas",
|
|
27
|
+
"gridArea",
|
|
28
|
+
"gridColumn",
|
|
29
|
+
"gridRow",
|
|
30
|
+
"inset",
|
|
31
|
+
"mask",
|
|
32
|
+
"maskImage",
|
|
33
|
+
"maskPosition",
|
|
34
|
+
"maskSize"
|
|
35
|
+
]);
|
|
36
|
+
function validatePayloadShape(property, payload, hasBase) {
|
|
37
|
+
if (listValuedLonghands.has(property)) return null;
|
|
38
|
+
var components = splitTopLevelComponents(payload);
|
|
39
|
+
if (components.length <= 1) return null;
|
|
40
|
+
return {
|
|
41
|
+
code: "multi-component-single-value",
|
|
42
|
+
property,
|
|
43
|
+
payload,
|
|
44
|
+
message: `"${payload}" holds ${components.length} values but "${property}" takes one.` + (hasBase ? "" : ` A value written after a conditional joins that conditional's payload \u2014 write the base value before the first conditional.`)
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export { validatePayloadShape };
|
|
49
|
+
//# sourceMappingURL=payloadShape.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payloadShape.native.js","names":[],"sources":["esm/payloadShape.native.js"],"sourcesContent":["import { splitTopLevelComponents } from \"./backgroundFamily\";\nvar listValuedLonghands = /* @__PURE__ */ new Set([\n \"boxShadow\",\n \"textShadow\",\n \"transform\",\n \"transition\",\n \"transitionProperty\",\n \"animation\",\n \"animationName\",\n \"backgroundImage\",\n \"backgroundPosition\",\n \"backgroundSize\",\n \"backgroundRepeat\",\n \"fontFamily\",\n \"fontVariant\",\n \"filter\",\n \"backdropFilter\",\n \"willChange\",\n \"quotes\",\n \"textDecorationLine\",\n \"containIntrinsicSize\",\n \"strokeDasharray\",\n \"gridTemplateColumns\",\n \"gridTemplateRows\",\n \"gridTemplateAreas\",\n \"gridArea\",\n \"gridColumn\",\n \"gridRow\",\n \"inset\",\n \"mask\",\n \"maskImage\",\n \"maskPosition\",\n \"maskSize\"\n]);\nfunction validatePayloadShape(property, payload, hasBase) {\n if (listValuedLonghands.has(property)) return null;\n var components = splitTopLevelComponents(payload);\n if (components.length <= 1) return null;\n return {\n code: \"multi-component-single-value\",\n property,\n payload,\n message: `\"${payload}\" holds ${components.length} values but \"${property}\" takes one.` + (hasBase ? \"\" : ` A value written after a conditional joins that conditional's payload \\u2014 write the base value before the first conditional.`)\n };\n}\nexport {\n validatePayloadShape\n};\n//# sourceMappingURL=payloadShape.js.map\n"],"mappings":";;;AACA,IAAI,sCAAsC,IAAI,IAAI;CAChD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;AACD,SAAS,qBAAqB,UAAU,SAAS,SAAS;CACxD,IAAI,oBAAoB,IAAI,QAAQ,GAAG,OAAO;CAC9C,IAAI,aAAa,wBAAwB,OAAO;CAChD,IAAI,WAAW,UAAU,GAAG,OAAO;CACnC,OAAO;EACL,MAAM;EACN;EACA;EACA,SAAS,IAAI,QAAQ,UAAU,WAAW,OAAO,eAAe,SAAS,iBAAiB,UAAU,KAAK;CAC3G;AACF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const legacyPartComposite = Object.freeze({
|
|
2
|
+
shadowColor: "boxShadow",
|
|
3
|
+
shadowOffset: "boxShadow",
|
|
4
|
+
shadowOpacity: "boxShadow",
|
|
5
|
+
shadowRadius: "boxShadow",
|
|
6
|
+
textShadowColor: "textShadow",
|
|
7
|
+
textShadowOffset: "textShadow",
|
|
8
|
+
textShadowRadius: "textShadow",
|
|
9
|
+
perspective: "transform",
|
|
10
|
+
skewX: "transform",
|
|
11
|
+
skewY: "transform",
|
|
12
|
+
matrix: "transform",
|
|
13
|
+
rotateX: "transform",
|
|
14
|
+
rotateY: "transform",
|
|
15
|
+
rotateZ: "transform"
|
|
16
|
+
});
|
|
17
|
+
function programEligibility(prop) {
|
|
18
|
+
return prop in legacyPartComposite ? "legacy-part" : "program";
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { legacyPartComposite, programEligibility };
|
|
22
|
+
//# sourceMappingURL=programEligibility.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"programEligibility.js","names":[],"sources":["esm/programEligibility.js"],"sourcesContent":["const legacyPartComposite = Object.freeze({\n shadowColor: \"boxShadow\",\n shadowOffset: \"boxShadow\",\n shadowOpacity: \"boxShadow\",\n shadowRadius: \"boxShadow\",\n textShadowColor: \"textShadow\",\n textShadowOffset: \"textShadow\",\n textShadowRadius: \"textShadow\",\n perspective: \"transform\",\n skewX: \"transform\",\n skewY: \"transform\",\n matrix: \"transform\",\n rotateX: \"transform\",\n rotateY: \"transform\",\n rotateZ: \"transform\"\n});\nfunction programEligibility(prop) {\n return prop in legacyPartComposite ? \"legacy-part\" : \"program\";\n}\nexport {\n legacyPartComposite,\n programEligibility\n};\n//# sourceMappingURL=programEligibility.js.map\n"],"mappings":";AAAA,MAAM,sBAAsB,OAAO,OAAO;CACxC,aAAa;CACb,cAAc;CACd,eAAe;CACf,cAAc;CACd,iBAAiB;CACjB,kBAAkB;CAClB,kBAAkB;CAClB,aAAa;CACb,OAAO;CACP,OAAO;CACP,QAAQ;CACR,SAAS;CACT,SAAS;CACT,SAAS;AACX,CAAC;AACD,SAAS,mBAAmB,MAAM;CAChC,OAAO,QAAQ,sBAAsB,gBAAgB;AACvD"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
var legacyPartComposite = Object.freeze({
|
|
2
|
+
shadowColor: "boxShadow",
|
|
3
|
+
shadowOffset: "boxShadow",
|
|
4
|
+
shadowOpacity: "boxShadow",
|
|
5
|
+
shadowRadius: "boxShadow",
|
|
6
|
+
textShadowColor: "textShadow",
|
|
7
|
+
textShadowOffset: "textShadow",
|
|
8
|
+
textShadowRadius: "textShadow",
|
|
9
|
+
perspective: "transform",
|
|
10
|
+
skewX: "transform",
|
|
11
|
+
skewY: "transform",
|
|
12
|
+
matrix: "transform",
|
|
13
|
+
rotateX: "transform",
|
|
14
|
+
rotateY: "transform",
|
|
15
|
+
rotateZ: "transform"
|
|
16
|
+
});
|
|
17
|
+
function programEligibility(prop) {
|
|
18
|
+
return prop in legacyPartComposite ? "legacy-part" : "program";
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { legacyPartComposite, programEligibility };
|
|
22
|
+
//# sourceMappingURL=programEligibility.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"programEligibility.native.js","names":[],"sources":["esm/programEligibility.native.js"],"sourcesContent":["var legacyPartComposite = Object.freeze({\n shadowColor: \"boxShadow\",\n shadowOffset: \"boxShadow\",\n shadowOpacity: \"boxShadow\",\n shadowRadius: \"boxShadow\",\n textShadowColor: \"textShadow\",\n textShadowOffset: \"textShadow\",\n textShadowRadius: \"textShadow\",\n perspective: \"transform\",\n skewX: \"transform\",\n skewY: \"transform\",\n matrix: \"transform\",\n rotateX: \"transform\",\n rotateY: \"transform\",\n rotateZ: \"transform\"\n});\nfunction programEligibility(prop) {\n return prop in legacyPartComposite ? \"legacy-part\" : \"program\";\n}\nexport {\n legacyPartComposite,\n programEligibility\n};\n//# sourceMappingURL=programEligibility.js.map\n"],"mappings":";AAAA,IAAI,sBAAsB,OAAO,OAAO;CACtC,aAAa;CACb,cAAc;CACd,eAAe;CACf,cAAc;CACd,iBAAiB;CACjB,kBAAkB;CAClB,kBAAkB;CAClB,aAAa;CACb,OAAO;CACP,OAAO;CACP,QAAQ;CACR,SAAS;CACT,SAAS;CACT,SAAS;AACX,CAAC;AACD,SAAS,mBAAmB,MAAM;CAChC,OAAO,QAAQ,sBAAsB,gBAAgB;AACvD"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { canonicalClauseModifier } from "./clausePrecedence.mjs";
|
|
2
|
+
|
|
3
|
+
function hashChar(hash, char) {
|
|
4
|
+
return Math.imul(31, hash) + char.charCodeAt(0) | 0;
|
|
5
|
+
}
|
|
6
|
+
function isValidCssCharCode(code) {
|
|
7
|
+
return code >= 65 && code <= 90 || code >= 97 && code <= 122 || code === 95 || code === 45 || code >= 48 && code <= 57;
|
|
8
|
+
}
|
|
9
|
+
function simpleHash(input, hashMin = 10) {
|
|
10
|
+
let str = input;
|
|
11
|
+
if (str[0] === "v" && str.startsWith("var(")) {
|
|
12
|
+
str = str.slice(6, str.length - 1);
|
|
13
|
+
}
|
|
14
|
+
let hash = 0;
|
|
15
|
+
let valids = "";
|
|
16
|
+
let added = 0;
|
|
17
|
+
const len = str.length;
|
|
18
|
+
for (let i = 0; i < len; i++) {
|
|
19
|
+
if (hashMin !== "strict" && added <= hashMin) {
|
|
20
|
+
const char = str.charCodeAt(i);
|
|
21
|
+
if (char === 46) {
|
|
22
|
+
valids += "--";
|
|
23
|
+
continue;
|
|
24
|
+
}
|
|
25
|
+
if (isValidCssCharCode(char)) {
|
|
26
|
+
added++;
|
|
27
|
+
valids += str[i];
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
hash = hashChar(hash, str[i]);
|
|
32
|
+
}
|
|
33
|
+
return valids + (hash ? Math.abs(hash) : "");
|
|
34
|
+
}
|
|
35
|
+
function normalizeProgramKey(property, value, configRevision) {
|
|
36
|
+
let key = `${configRevision.length}:${configRevision}${property.length}:${property}`;
|
|
37
|
+
key += value.base === null ? "n" : `b${value.base.length}:${value.base}`;
|
|
38
|
+
for (const clause of value.clauses) {
|
|
39
|
+
const canonical = clause.modifiers.map(canonicalClauseModifier);
|
|
40
|
+
const modifiers = canonical.length > 1 ? canonical.sort().join(",") : canonical.join(",");
|
|
41
|
+
key += `c${modifiers.length}:${modifiers}${clause.payload.length}:${clause.payload}`;
|
|
42
|
+
}
|
|
43
|
+
return key;
|
|
44
|
+
}
|
|
45
|
+
function propertyAbbreviation(property) {
|
|
46
|
+
let out = "";
|
|
47
|
+
for (let index = 0; index < property.length; index++) {
|
|
48
|
+
const code = property.charCodeAt(index);
|
|
49
|
+
const isWordStart = index === 0 || code >= 65 && code <= 90 || property.charCodeAt(index - 1) === 45;
|
|
50
|
+
if (isWordStart && (code >= 65 && code <= 90 || code >= 97 && code <= 122)) {
|
|
51
|
+
out += property[index].toLowerCase();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return out || "x";
|
|
55
|
+
}
|
|
56
|
+
function programClassName(property, value, configRevision) {
|
|
57
|
+
const hash = simpleHash(normalizeProgramKey(property, value, configRevision), "strict");
|
|
58
|
+
return `_${propertyAbbreviation(property)}-${hash || "0"}`;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export { normalizeProgramKey, programClassName, propertyAbbreviation };
|
|
62
|
+
//# sourceMappingURL=programHash.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"programHash.js","names":[],"sources":["esm/programHash.js"],"sourcesContent":["import { canonicalClauseModifier } from \"./clausePrecedence\";\nfunction hashChar(hash, char) {\n return Math.imul(31, hash) + char.charCodeAt(0) | 0;\n}\nfunction isValidCssCharCode(code) {\n return code >= 65 && code <= 90 || // A-Z\n code >= 97 && code <= 122 || // a-z\n code === 95 || // _\n code === 45 || // -\n code >= 48 && code <= 57;\n}\nfunction simpleHash(input, hashMin = 10) {\n let str = input;\n if (str[0] === \"v\" && str.startsWith(\"var(\")) {\n str = str.slice(6, str.length - 1);\n }\n let hash = 0;\n let valids = \"\";\n let added = 0;\n const len = str.length;\n for (let i = 0; i < len; i++) {\n if (hashMin !== \"strict\" && added <= hashMin) {\n const char = str.charCodeAt(i);\n if (char === 46) {\n valids += \"--\";\n continue;\n }\n if (isValidCssCharCode(char)) {\n added++;\n valids += str[i];\n continue;\n }\n }\n hash = hashChar(hash, str[i]);\n }\n return valids + (hash ? Math.abs(hash) : \"\");\n}\nfunction normalizeProgramKey(property, value, configRevision) {\n let key = `${configRevision.length}:${configRevision}${property.length}:${property}`;\n key += value.base === null ? \"n\" : `b${value.base.length}:${value.base}`;\n for (const clause of value.clauses) {\n const canonical = clause.modifiers.map(canonicalClauseModifier);\n const modifiers = canonical.length > 1 ? canonical.sort().join(\",\") : canonical.join(\",\");\n key += `c${modifiers.length}:${modifiers}${clause.payload.length}:${clause.payload}`;\n }\n return key;\n}\nfunction propertyAbbreviation(property) {\n let out = \"\";\n for (let index = 0; index < property.length; index++) {\n const code = property.charCodeAt(index);\n const isWordStart = index === 0 || code >= 65 && code <= 90 || // a dash also starts a word, so the transform family's custom properties\n // read as `--t-x` -> `tx` rather than collapsing to the fallback\n property.charCodeAt(index - 1) === 45;\n if (isWordStart && (code >= 65 && code <= 90 || code >= 97 && code <= 122)) {\n out += property[index].toLowerCase();\n }\n }\n return out || \"x\";\n}\nfunction programClassName(property, value, configRevision) {\n const hash = simpleHash(normalizeProgramKey(property, value, configRevision), \"strict\");\n return `_${propertyAbbreviation(property)}-${hash || \"0\"}`;\n}\nexport {\n normalizeProgramKey,\n programClassName,\n propertyAbbreviation\n};\n//# sourceMappingURL=programHash.js.map\n"],"mappings":";;;AACA,SAAS,SAAS,MAAM,MAAM;CAC5B,OAAO,KAAK,KAAK,IAAI,IAAI,IAAI,KAAK,WAAW,CAAC,IAAI;AACpD;AACA,SAAS,mBAAmB,MAAM;CAChC,OAAO,QAAQ,MAAM,QAAQ,MAC7B,QAAQ,MAAM,QAAQ,OACtB,SAAS,MACT,SAAS,MACT,QAAQ,MAAM,QAAQ;AACxB;AACA,SAAS,WAAW,OAAO,UAAU,IAAI;CACvC,IAAI,MAAM;CACV,IAAI,IAAI,OAAO,OAAO,IAAI,WAAW,MAAM,GAAG;EAC5C,MAAM,IAAI,MAAM,GAAG,IAAI,SAAS,CAAC;CACnC;CACA,IAAI,OAAO;CACX,IAAI,SAAS;CACb,IAAI,QAAQ;CACZ,MAAM,MAAM,IAAI;CAChB,KAAK,IAAI,IAAI,GAAG,IAAI,KAAK,KAAK;EAC5B,IAAI,YAAY,YAAY,SAAS,SAAS;GAC5C,MAAM,OAAO,IAAI,WAAW,CAAC;GAC7B,IAAI,SAAS,IAAI;IACf,UAAU;IACV;GACF;GACA,IAAI,mBAAmB,IAAI,GAAG;IAC5B;IACA,UAAU,IAAI;IACd;GACF;EACF;EACA,OAAO,SAAS,MAAM,IAAI,EAAE;CAC9B;CACA,OAAO,UAAU,OAAO,KAAK,IAAI,IAAI,IAAI;AAC3C;AACA,SAAS,oBAAoB,UAAU,OAAO,gBAAgB;CAC5D,IAAI,MAAM,GAAG,eAAe,OAAO,GAAG,iBAAiB,SAAS,OAAO,GAAG;CAC1E,OAAO,MAAM,SAAS,OAAO,MAAM,IAAI,MAAM,KAAK,OAAO,GAAG,MAAM;CAClE,KAAK,MAAM,UAAU,MAAM,SAAS;EAClC,MAAM,YAAY,OAAO,UAAU,IAAI,uBAAuB;EAC9D,MAAM,YAAY,UAAU,SAAS,IAAI,UAAU,KAAK,EAAE,KAAK,GAAG,IAAI,UAAU,KAAK,GAAG;EACxF,OAAO,IAAI,UAAU,OAAO,GAAG,YAAY,OAAO,QAAQ,OAAO,GAAG,OAAO;CAC7E;CACA,OAAO;AACT;AACA,SAAS,qBAAqB,UAAU;CACtC,IAAI,MAAM;CACV,KAAK,IAAI,QAAQ,GAAG,QAAQ,SAAS,QAAQ,SAAS;EACpD,MAAM,OAAO,SAAS,WAAW,KAAK;EACtC,MAAM,cAAc,UAAU,KAAK,QAAQ,MAAM,QAAQ,MAEzD,SAAS,WAAW,QAAQ,CAAC,MAAM;EACnC,IAAI,gBAAgB,QAAQ,MAAM,QAAQ,MAAM,QAAQ,MAAM,QAAQ,MAAM;GAC1E,OAAO,SAAS,OAAO,YAAY;EACrC;CACF;CACA,OAAO,OAAO;AAChB;AACA,SAAS,iBAAiB,UAAU,OAAO,gBAAgB;CACzD,MAAM,OAAO,WAAW,oBAAoB,UAAU,OAAO,cAAc,GAAG,QAAQ;CACtF,OAAO,IAAI,qBAAqB,QAAQ,EAAE,GAAG,QAAQ;AACvD"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { canonicalClauseModifier } from "./clausePrecedence.native.js";
|
|
2
|
+
|
|
3
|
+
function hashChar(hash, char) {
|
|
4
|
+
return Math.imul(31, hash) + char.charCodeAt(0) | 0;
|
|
5
|
+
}
|
|
6
|
+
function isValidCssCharCode(code) {
|
|
7
|
+
return code >= 65 && code <= 90 || code >= 97 && code <= 122 || code === 95 || code === 45 || code >= 48 && code <= 57;
|
|
8
|
+
}
|
|
9
|
+
function simpleHash(input) {
|
|
10
|
+
var hashMin = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 10;
|
|
11
|
+
var str = input;
|
|
12
|
+
if (str[0] === "v" && str.startsWith("var(")) {
|
|
13
|
+
str = str.slice(6, str.length - 1);
|
|
14
|
+
}
|
|
15
|
+
var hash = 0;
|
|
16
|
+
var valids = "";
|
|
17
|
+
var added = 0;
|
|
18
|
+
var len = str.length;
|
|
19
|
+
for (var i = 0; i < len; i++) {
|
|
20
|
+
if (hashMin !== "strict" && added <= hashMin) {
|
|
21
|
+
var char = str.charCodeAt(i);
|
|
22
|
+
if (char === 46) {
|
|
23
|
+
valids += "--";
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
if (isValidCssCharCode(char)) {
|
|
27
|
+
added++;
|
|
28
|
+
valids += str[i];
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
hash = hashChar(hash, str[i]);
|
|
33
|
+
}
|
|
34
|
+
return valids + (hash ? Math.abs(hash) : "");
|
|
35
|
+
}
|
|
36
|
+
function normalizeProgramKey(property, value, configRevision) {
|
|
37
|
+
var key = `${configRevision.length}:${configRevision}${property.length}:${property}`;
|
|
38
|
+
key += value.base === null ? "n" : `b${value.base.length}:${value.base}`;
|
|
39
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
40
|
+
try {
|
|
41
|
+
for (var _iterator = value.clauses[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
42
|
+
var clause = _step.value;
|
|
43
|
+
var canonical = clause.modifiers.map(canonicalClauseModifier);
|
|
44
|
+
var modifiers = canonical.length > 1 ? canonical.sort().join(",") : canonical.join(",");
|
|
45
|
+
key += `c${modifiers.length}:${modifiers}${clause.payload.length}:${clause.payload}`;
|
|
46
|
+
}
|
|
47
|
+
} catch (err) {
|
|
48
|
+
_didIteratorError = true;
|
|
49
|
+
_iteratorError = err;
|
|
50
|
+
} finally {
|
|
51
|
+
try {
|
|
52
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
53
|
+
_iterator.return();
|
|
54
|
+
}
|
|
55
|
+
} finally {
|
|
56
|
+
if (_didIteratorError) {
|
|
57
|
+
throw _iteratorError;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return key;
|
|
62
|
+
}
|
|
63
|
+
function propertyAbbreviation(property) {
|
|
64
|
+
var out = "";
|
|
65
|
+
for (var index = 0; index < property.length; index++) {
|
|
66
|
+
var code = property.charCodeAt(index);
|
|
67
|
+
var isWordStart = index === 0 || code >= 65 && code <= 90 || property.charCodeAt(index - 1) === 45;
|
|
68
|
+
if (isWordStart && (code >= 65 && code <= 90 || code >= 97 && code <= 122)) {
|
|
69
|
+
out += property[index].toLowerCase();
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return out || "x";
|
|
73
|
+
}
|
|
74
|
+
function programClassName(property, value, configRevision) {
|
|
75
|
+
var hash = simpleHash(normalizeProgramKey(property, value, configRevision), "strict");
|
|
76
|
+
return `_${propertyAbbreviation(property)}-${hash || "0"}`;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export { normalizeProgramKey, programClassName, propertyAbbreviation };
|
|
80
|
+
//# sourceMappingURL=programHash.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"programHash.native.js","names":[],"sources":["esm/programHash.native.js"],"sourcesContent":["import { canonicalClauseModifier } from \"./clausePrecedence\";\nfunction hashChar(hash, char) {\n return Math.imul(31, hash) + char.charCodeAt(0) | 0;\n}\nfunction isValidCssCharCode(code) {\n return code >= 65 && code <= 90 || // A-Z\n code >= 97 && code <= 122 || // a-z\n code === 95 || // _\n code === 45 || // -\n code >= 48 && code <= 57;\n}\nfunction simpleHash(input) {\n var hashMin = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 10;\n var str = input;\n if (str[0] === \"v\" && str.startsWith(\"var(\")) {\n str = str.slice(6, str.length - 1);\n }\n var hash = 0;\n var valids = \"\";\n var added = 0;\n var len = str.length;\n for (var i = 0; i < len; i++) {\n if (hashMin !== \"strict\" && added <= hashMin) {\n var char = str.charCodeAt(i);\n if (char === 46) {\n valids += \"--\";\n continue;\n }\n if (isValidCssCharCode(char)) {\n added++;\n valids += str[i];\n continue;\n }\n }\n hash = hashChar(hash, str[i]);\n }\n return valids + (hash ? Math.abs(hash) : \"\");\n}\nfunction normalizeProgramKey(property, value, configRevision) {\n var key = `${configRevision.length}:${configRevision}${property.length}:${property}`;\n key += value.base === null ? \"n\" : `b${value.base.length}:${value.base}`;\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = value.clauses[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var clause = _step.value;\n var canonical = clause.modifiers.map(canonicalClauseModifier);\n var modifiers = canonical.length > 1 ? canonical.sort().join(\",\") : canonical.join(\",\");\n key += `c${modifiers.length}:${modifiers}${clause.payload.length}:${clause.payload}`;\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 return key;\n}\nfunction propertyAbbreviation(property) {\n var out = \"\";\n for (var index = 0; index < property.length; index++) {\n var code = property.charCodeAt(index);\n var isWordStart = index === 0 || code >= 65 && code <= 90 || // a dash also starts a word, so the transform family's custom properties\n // read as `--t-x` -> `tx` rather than collapsing to the fallback\n property.charCodeAt(index - 1) === 45;\n if (isWordStart && (code >= 65 && code <= 90 || code >= 97 && code <= 122)) {\n out += property[index].toLowerCase();\n }\n }\n return out || \"x\";\n}\nfunction programClassName(property, value, configRevision) {\n var hash = simpleHash(normalizeProgramKey(property, value, configRevision), \"strict\");\n return `_${propertyAbbreviation(property)}-${hash || \"0\"}`;\n}\nexport {\n normalizeProgramKey,\n programClassName,\n propertyAbbreviation\n};\n//# sourceMappingURL=programHash.js.map\n"],"mappings":";;;AACA,SAAS,SAAS,MAAM,MAAM;CAC5B,OAAO,KAAK,KAAK,IAAI,IAAI,IAAI,KAAK,WAAW,CAAC,IAAI;AACpD;AACA,SAAS,mBAAmB,MAAM;CAChC,OAAO,QAAQ,MAAM,QAAQ,MAC7B,QAAQ,MAAM,QAAQ,OACtB,SAAS,MACT,SAAS,MACT,QAAQ,MAAM,QAAQ;AACxB;AACA,SAAS,WAAW,OAAO;CACzB,IAAI,UAAU,UAAU,SAAS,KAAK,UAAU,OAAO,KAAK,IAAI,UAAU,KAAK;CAC/E,IAAI,MAAM;CACV,IAAI,IAAI,OAAO,OAAO,IAAI,WAAW,MAAM,GAAG;EAC5C,MAAM,IAAI,MAAM,GAAG,IAAI,SAAS,CAAC;CACnC;CACA,IAAI,OAAO;CACX,IAAI,SAAS;CACb,IAAI,QAAQ;CACZ,IAAI,MAAM,IAAI;CACd,KAAK,IAAI,IAAI,GAAG,IAAI,KAAK,KAAK;EAC5B,IAAI,YAAY,YAAY,SAAS,SAAS;GAC5C,IAAI,OAAO,IAAI,WAAW,CAAC;GAC3B,IAAI,SAAS,IAAI;IACf,UAAU;IACV;GACF;GACA,IAAI,mBAAmB,IAAI,GAAG;IAC5B;IACA,UAAU,IAAI;IACd;GACF;EACF;EACA,OAAO,SAAS,MAAM,IAAI,EAAE;CAC9B;CACA,OAAO,UAAU,OAAO,KAAK,IAAI,IAAI,IAAI;AAC3C;AACA,SAAS,oBAAoB,UAAU,OAAO,gBAAgB;CAC5D,IAAI,MAAM,GAAG,eAAe,OAAO,GAAG,iBAAiB,SAAS,OAAO,GAAG;CAC1E,OAAO,MAAM,SAAS,OAAO,MAAM,IAAI,MAAM,KAAK,OAAO,GAAG,MAAM;CAClE,IAAI,4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2
|
+
|
|
3
|
+
const longhandExpansionTable = {
|
|
4
|
+
padding: [
|
|
5
|
+
"paddingTop",
|
|
6
|
+
"paddingRight",
|
|
7
|
+
"paddingBottom",
|
|
8
|
+
"paddingLeft"
|
|
9
|
+
],
|
|
10
|
+
paddingHorizontal: ["paddingLeft", "paddingRight"],
|
|
11
|
+
paddingVertical: ["paddingTop", "paddingBottom"],
|
|
12
|
+
margin: [
|
|
13
|
+
"marginTop",
|
|
14
|
+
"marginRight",
|
|
15
|
+
"marginBottom",
|
|
16
|
+
"marginLeft"
|
|
17
|
+
],
|
|
18
|
+
marginHorizontal: ["marginLeft", "marginRight"],
|
|
19
|
+
marginVertical: ["marginTop", "marginBottom"],
|
|
20
|
+
inset: [
|
|
21
|
+
"top",
|
|
22
|
+
"right",
|
|
23
|
+
"bottom",
|
|
24
|
+
"left"
|
|
25
|
+
],
|
|
26
|
+
borderWidth: [
|
|
27
|
+
"borderTopWidth",
|
|
28
|
+
"borderRightWidth",
|
|
29
|
+
"borderBottomWidth",
|
|
30
|
+
"borderLeftWidth"
|
|
31
|
+
],
|
|
32
|
+
borderColor: [
|
|
33
|
+
"borderTopColor",
|
|
34
|
+
"borderRightColor",
|
|
35
|
+
"borderBottomColor",
|
|
36
|
+
"borderLeftColor"
|
|
37
|
+
],
|
|
38
|
+
borderStyle: [
|
|
39
|
+
"borderTopStyle",
|
|
40
|
+
"borderRightStyle",
|
|
41
|
+
"borderBottomStyle",
|
|
42
|
+
"borderLeftStyle"
|
|
43
|
+
],
|
|
44
|
+
borderRadius: [
|
|
45
|
+
"borderTopLeftRadius",
|
|
46
|
+
"borderTopRightRadius",
|
|
47
|
+
"borderBottomRightRadius",
|
|
48
|
+
"borderBottomLeftRadius"
|
|
49
|
+
],
|
|
50
|
+
overflow: ["overflowX", "overflowY"],
|
|
51
|
+
gap: ["rowGap", "columnGap"]
|
|
52
|
+
};
|
|
53
|
+
function expandToLonghands(prop, shorthands) {
|
|
54
|
+
const resolvedProp = shorthands?.[prop] ?? prop;
|
|
55
|
+
return longhandExpansionTable[resolvedProp] ?? [resolvedProp];
|
|
56
|
+
}
|
|
57
|
+
function mergeProgramValues(earlier, later) {
|
|
58
|
+
const base = later.base ?? earlier.base;
|
|
59
|
+
if (!earlier.clauses.length) {
|
|
60
|
+
return base === later.base ? later : {
|
|
61
|
+
base,
|
|
62
|
+
clauses: later.clauses
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
if (!later.clauses.length) {
|
|
66
|
+
return base === earlier.base ? earlier : {
|
|
67
|
+
base,
|
|
68
|
+
clauses: earlier.clauses
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
const restated = /* @__PURE__ */ new Set();
|
|
72
|
+
for (const clause of later.clauses) {
|
|
73
|
+
restated.add(clauseConditionSetKey(clause.modifiers));
|
|
74
|
+
}
|
|
75
|
+
const clauses = [];
|
|
76
|
+
for (const clause of earlier.clauses) {
|
|
77
|
+
if (!restated.has(clauseConditionSetKey(clause.modifiers))) clauses.push(clause);
|
|
78
|
+
}
|
|
79
|
+
for (const clause of later.clauses) clauses.push(clause);
|
|
80
|
+
return {
|
|
81
|
+
base,
|
|
82
|
+
clauses
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
function mergePrograms(entries, shorthands) {
|
|
86
|
+
const programs = /* @__PURE__ */ new Map();
|
|
87
|
+
for (const { prop, value } of entries) {
|
|
88
|
+
for (const property of expandToLonghands(prop, shorthands)) {
|
|
89
|
+
const existing = programs.get(property);
|
|
90
|
+
const merged = existing ? mergeProgramValues(existing.value, value) : value;
|
|
91
|
+
programs.delete(property);
|
|
92
|
+
programs.set(property, {
|
|
93
|
+
property,
|
|
94
|
+
value: merged,
|
|
95
|
+
sourceProp: prop
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return programs;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export { expandToLonghands, longhandExpansionTable, mergeProgramValues, mergePrograms };
|
|
103
|
+
//# sourceMappingURL=programs.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"programs.js","names":[],"sources":["esm/programs.js"],"sourcesContent":["import { clauseConditionSetKey } from \"./clausePrecedence\";\nconst longhandExpansionTable = {\n padding: [\"paddingTop\", \"paddingRight\", \"paddingBottom\", \"paddingLeft\"],\n paddingHorizontal: [\"paddingLeft\", \"paddingRight\"],\n paddingVertical: [\"paddingTop\", \"paddingBottom\"],\n margin: [\"marginTop\", \"marginRight\", \"marginBottom\", \"marginLeft\"],\n marginHorizontal: [\"marginLeft\", \"marginRight\"],\n marginVertical: [\"marginTop\", \"marginBottom\"],\n inset: [\"top\", \"right\", \"bottom\", \"left\"],\n borderWidth: [\n \"borderTopWidth\",\n \"borderRightWidth\",\n \"borderBottomWidth\",\n \"borderLeftWidth\"\n ],\n borderColor: [\n \"borderTopColor\",\n \"borderRightColor\",\n \"borderBottomColor\",\n \"borderLeftColor\"\n ],\n borderStyle: [\n \"borderTopStyle\",\n \"borderRightStyle\",\n \"borderBottomStyle\",\n \"borderLeftStyle\"\n ],\n borderRadius: [\n \"borderTopLeftRadius\",\n \"borderTopRightRadius\",\n \"borderBottomRightRadius\",\n \"borderBottomLeftRadius\"\n ],\n overflow: [\"overflowX\", \"overflowY\"],\n gap: [\"rowGap\", \"columnGap\"]\n};\nfunction expandToLonghands(prop, shorthands) {\n const resolvedProp = shorthands?.[prop] ?? prop;\n return longhandExpansionTable[resolvedProp] ?? [resolvedProp];\n}\nfunction mergeProgramValues(earlier, later) {\n const base = later.base ?? earlier.base;\n if (!earlier.clauses.length) {\n return base === later.base ? later : { base, clauses: later.clauses };\n }\n if (!later.clauses.length) {\n return base === earlier.base ? earlier : { base, clauses: earlier.clauses };\n }\n const restated = /* @__PURE__ */ new Set();\n for (const clause of later.clauses) {\n restated.add(clauseConditionSetKey(clause.modifiers));\n }\n const clauses = [];\n for (const clause of earlier.clauses) {\n if (!restated.has(clauseConditionSetKey(clause.modifiers))) clauses.push(clause);\n }\n for (const clause of later.clauses) clauses.push(clause);\n return { base, clauses };\n}\nfunction mergePrograms(entries, shorthands) {\n const programs = /* @__PURE__ */ new Map();\n for (const { prop, value } of entries) {\n for (const property of expandToLonghands(prop, shorthands)) {\n const existing = programs.get(property);\n const merged = existing ? mergeProgramValues(existing.value, value) : value;\n programs.delete(property);\n programs.set(property, { property, value: merged, sourceProp: prop });\n }\n }\n return programs;\n}\nexport {\n expandToLonghands,\n longhandExpansionTable,\n mergeProgramValues,\n mergePrograms\n};\n//# sourceMappingURL=programs.js.map\n"],"mappings":";;;AACA,MAAM,yBAAyB;CAC7B,SAAS;EAAC;EAAc;EAAgB;EAAiB;CAAa;CACtE,mBAAmB,CAAC,eAAe,cAAc;CACjD,iBAAiB,CAAC,cAAc,eAAe;CAC/C,QAAQ;EAAC;EAAa;EAAe;EAAgB;CAAY;CACjE,kBAAkB,CAAC,cAAc,aAAa;CAC9C,gBAAgB,CAAC,aAAa,cAAc;CAC5C,OAAO;EAAC;EAAO;EAAS;EAAU;CAAM;CACxC,aAAa;EACX;EACA;EACA;EACA;CACF;CACA,aAAa;EACX;EACA;EACA;EACA;CACF;CACA,aAAa;EACX;EACA;EACA;EACA;CACF;CACA,cAAc;EACZ;EACA;EACA;EACA;CACF;CACA,UAAU,CAAC,aAAa,WAAW;CACnC,KAAK,CAAC,UAAU,WAAW;AAC7B;AACA,SAAS,kBAAkB,MAAM,YAAY;CAC3C,MAAM,eAAe,aAAa,SAAS;CAC3C,OAAO,uBAAuB,iBAAiB,CAAC,YAAY;AAC9D;AACA,SAAS,mBAAmB,SAAS,OAAO;CAC1C,MAAM,OAAO,MAAM,QAAQ,QAAQ;CACnC,IAAI,CAAC,QAAQ,QAAQ,QAAQ;EAC3B,OAAO,SAAS,MAAM,OAAO,QAAQ;GAAE;GAAM,SAAS,MAAM;EAAQ;CACtE;CACA,IAAI,CAAC,MAAM,QAAQ,QAAQ;EACzB,OAAO,SAAS,QAAQ,OAAO,UAAU;GA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