@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":"candidate.native.js","names":[],"sources":["cjs/candidate.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar candidate_exports = {};\n__export(candidate_exports, {\n classifyCandidate: () => classifyCandidate,\n decodeArbitrary: () => decodeArbitrary,\n encodeArbitrary: () => encodeArbitrary,\n formatCandidate: () => formatCandidate,\n hasTokenName: () => hasTokenName,\n parseCandidate: () => parseCandidate\n});\nmodule.exports = __toCommonJS(candidate_exports);\nvar import_registry = require(\"./registry\");\nvar import_modifierRegistry = require(\"./modifierRegistry\");\nvar import_resolvePayload = require(\"./resolvePayload\");\nvar import_safeAreaVariables = require(\"./safeAreaVariables\");\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 sizingConveniences = /* @__PURE__ */ new Set([\n \"full\",\n \"auto\",\n \"screen\",\n \"min\",\n \"max\",\n \"fit\"\n]);\nvar fontGenerics = /* @__PURE__ */ new Set([\n \"sans\",\n \"serif\",\n \"mono\"\n]);\nvar numericPattern = /^\\d+(?:\\.\\d+)?$/;\nvar extraPrefixes = [\n \"border-x\",\n \"border-y\",\n \"rounded-t\",\n \"rounded-r\",\n \"rounded-b\",\n \"rounded-l\"\n];\nvar negativeTokenProps = /* @__PURE__ */ new Set([\n \"margin\",\n \"marginTop\",\n \"marginRight\",\n \"marginBottom\",\n \"marginLeft\",\n \"marginHorizontal\",\n \"marginVertical\",\n \"top\",\n \"right\",\n \"bottom\",\n \"left\",\n \"inset\",\n \"x\",\n \"y\",\n \"letterSpacing\"\n]);\nvar borderWidthKeywords = /* @__PURE__ */ new Set([\n \"thin\",\n \"medium\",\n \"thick\"\n]);\nvar ambiguousCssKeywords = /* @__PURE__ */ new Set([\n \"auto\",\n \"dashed\",\n \"dotted\",\n \"double\",\n \"groove\",\n \"hidden\",\n \"inherit\",\n \"initial\",\n \"inset\",\n \"none\",\n \"outset\",\n \"revert\",\n \"revert-layer\",\n \"ridge\",\n \"solid\",\n \"unset\"\n]);\nvar cssLengthUnits = \"(?:px|em|rem|ex|ch|cap|ic|lh|rlh|vw|vh|vmin|vmax|svw|svh|svmin|svmax|lvw|lvh|lvmin|lvmax|dvw|dvh|dvmin|dvmax|cm|mm|q|in|pt|pc)\";\nvar cssLengthPattern = new RegExp(`^-?(?:\\\\d+|\\\\d*\\\\.\\\\d+)${cssLengthUnits}$`, \"i\");\nfunction hasName(names, name) {\n if (!names) return false;\n if (Array.isArray(names)) return names.includes(name);\n if (_instanceof(names, Set)) return names.has(name);\n return Object.prototype.hasOwnProperty.call(names, name);\n}\nfunction splitCandidate(candidate) {\n var parts = [];\n var current = \"\";\n var bracketDepth = 0;\n var escaped = false;\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = candidate[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var char = _step.value;\n if (escaped) {\n current += char;\n escaped = false;\n continue;\n }\n if (char === \"\\\\\") {\n current += char;\n escaped = true;\n continue;\n }\n if (char === \"[\") bracketDepth++;\n if (char === \"]\") bracketDepth--;\n if (char === \":\" && bracketDepth === 0) {\n parts.push(current);\n current = \"\";\n } else {\n current += char;\n }\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 if (!current || bracketDepth !== 0) return null;\n return {\n modifiers: parts,\n base: current\n };\n}\nvar modifierRegistryCache = /* @__PURE__ */ new WeakMap();\nfunction getModifierRegistry(config) {\n var registry = modifierRegistryCache.get(config);\n if (!registry) {\n registry = (0, import_modifierRegistry.createModifierRegistry)(config).registry;\n modifierRegistryCache.set(config, registry);\n }\n return registry;\n}\nfunction modifierKind(modifier, config) {\n var canonical = import_registry.modifierAliases[modifier] || modifier;\n return getModifierRegistry(config).get(canonical) || null;\n}\nfunction modifiersAreKnown(modifiers, config) {\n var seen = /* @__PURE__ */ new Set();\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = modifiers[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var modifier = _step.value;\n var kind = modifierKind(modifier, config);\n if (!kind || seen.has(kind)) return false;\n seen.add(kind);\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 true;\n}\nfunction hasTokenDomain(config, category) {\n var _config_tokenNames;\n return ((_config_tokenNames = config.tokenNames) === null || _config_tokenNames === void 0 ? void 0 : _config_tokenNames[category]) !== void 0;\n}\nfunction hasTokenName(config, category, name) {\n var _config_tokenNames;\n return hasName((_config_tokenNames = config.tokenNames) === null || _config_tokenNames === void 0 ? void 0 : _config_tokenNames[category], name);\n}\nfunction resolveEntries(prefix, config) {\n var _config_shorthands;\n var registered = import_registry.prefixToEntries[prefix];\n if (registered) return registered;\n if (prefix === \"border-x\" || prefix === \"border-y\") {\n var props = prefix === \"border-x\" ? [\n \"borderLeft\",\n \"borderRight\"\n ] : [\n \"borderTop\",\n \"borderBottom\"\n ];\n return import_registry.grammarEntries.filter(function(entry) {\n return props.some(function(prop) {\n return entry.prop === `${prop}Width` || entry.prop === `${prop}Color`;\n });\n });\n }\n if (prefix.startsWith(\"rounded-\")) {\n var props1 = import_registry.radiusCornerProps[prefix.slice(\"rounded-\".length)];\n return props1 ? import_registry.grammarEntries.filter(function(entry) {\n return props1.includes(entry.prop);\n }) : [];\n }\n var expanded = (_config_shorthands = config.shorthands) === null || _config_shorthands === void 0 ? void 0 : _config_shorthands[prefix];\n if (!expanded) return [];\n return import_registry.grammarEntries.filter(function(entry) {\n return entry.prop === expanded;\n });\n}\nfunction findPrefix(base, config) {\n var prefixes = new Set(Object.keys(import_registry.prefixToEntries));\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = extraPrefixes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var prefix = _step.value;\n prefixes.add(prefix);\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 for (var shorthand in config.shorthands) prefixes.add(shorthand);\n var found = null;\n var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;\n try {\n for (var _iterator1 = prefixes[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {\n var prefix1 = _step1.value;\n if (base.startsWith(`${prefix1}-`) && (!found || prefix1.length > found.length)) {\n found = prefix1;\n }\n }\n } catch (err) {\n _didIteratorError1 = true;\n _iteratorError1 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion1 && _iterator1.return != null) {\n _iterator1.return();\n }\n } finally {\n if (_didIteratorError1) {\n throw _iteratorError1;\n }\n }\n }\n return found;\n}\nfunction arbitraryInner(rawValue) {\n if (rawValue.length <= 2 || rawValue[0] !== \"[\" || rawValue.at(-1) !== \"]\") {\n return null;\n }\n var inner = rawValue.slice(1, -1);\n return arbitraryValueIsBalanced(decodeArbitrary(inner)) ? inner : null;\n}\nfunction arbitraryValueIsBalanced(value) {\n var opening = /* @__PURE__ */ new Set([\n \"(\",\n \"[\",\n \"{\"\n ]);\n var matching = {\n \")\": \"(\",\n \"]\": \"[\",\n \"}\": \"{\"\n };\n var stack = [];\n var quote = \"\";\n var escaped = false;\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = value[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var char = _step.value;\n if (escaped) {\n escaped = false;\n continue;\n }\n if (char === \"\\\\\") {\n escaped = true;\n continue;\n }\n if (quote) {\n if (char === quote) quote = \"\";\n continue;\n }\n if (char === '\"' || char === \"'\") {\n quote = char;\n continue;\n }\n if (opening.has(char)) {\n stack.push(char);\n continue;\n }\n var expected = matching[char];\n if (expected && stack.pop() !== expected) return false;\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 !escaped && !quote && stack.length === 0;\n}\nfunction fractionIsValid(value) {\n var fraction = /^(\\d+)\\/(\\d+)$/.exec(value);\n return !!fraction && Number(fraction[2]) !== 0;\n}\nfunction arbitraryBorderKind(value) {\n if (/^-?(?:\\d+|\\d*\\.\\d+)$/.test(value)) return \"width\";\n if (cssLengthPattern.test(value) || borderWidthKeywords.has(value)) return \"width\";\n if (/^(?:calc|min|max|clamp)\\(/.test(value)) return \"width\";\n if (ambiguousCssKeywords.has(value) || value.startsWith(\"var(\")) return null;\n if (value.startsWith(\"#\") || /^(?:rgb|hsl|hwb|lab|lch|oklab|oklch|color|color-mix|light-dark)\\(/.test(value) || /^[a-zA-Z][a-zA-Z0-9-]*$/.test(value)) {\n return \"color\";\n }\n return null;\n}\nfunction tokenLookupName(category, value) {\n if (category !== \"color\") return value;\n var suffix = (0, import_resolvePayload.splitColorOpacitySuffix)(value);\n return suffix.kind === \"none\" ? value : suffix.name;\n}\nfunction chooseEntry(entries, prefix, rawValue, negative, config) {\n if ((0, import_safeAreaVariables.getSafeAreaEdge)(rawValue)) {\n var entry = entries.find(function(param) {\n var { tokenCategory } = param;\n return tokenCategory === \"space\" || tokenCategory === \"size\" || tokenCategory === \"radius\" || tokenCategory === \"fontSize\" || tokenCategory === \"lineHeight\" || tokenCategory === \"letterSpacing\";\n });\n if (entry) {\n return {\n entry,\n valueKind: \"convenience\",\n convenience: \"safe-area\"\n };\n }\n }\n var arbitrary = arbitraryInner(rawValue);\n if (arbitrary !== null) {\n if (!arbitrary) return null;\n if (prefix.startsWith(\"border\")) {\n var width = entries.find(function(entry2) {\n return entry2.prop.endsWith(\"Width\");\n });\n var color = entries.find(function(entry2) {\n return entry2.prop.endsWith(\"Color\");\n });\n var kind = arbitraryBorderKind(decodeArbitrary(arbitrary));\n if (!kind || !width || !color) return null;\n return {\n entry: kind === \"width\" ? width : color,\n valueKind: \"arbitrary\"\n };\n }\n if (prefix === \"text\") {\n return {\n entry: entries.find(function(entry2) {\n return entry2.prop === \"fontSize\";\n }),\n valueKind: \"arbitrary\"\n };\n }\n if (prefix === \"font\") {\n return {\n entry: entries.find(function(entry2) {\n return entry2.prop === \"fontFamily\";\n }),\n valueKind: \"arbitrary\"\n };\n }\n return {\n entry: entries[0],\n valueKind: \"arbitrary\"\n };\n }\n if (prefix === \"text\") {\n var fontSize = entries.find(function(entry2) {\n return entry2.prop === \"fontSize\";\n });\n if (fontSize && hasTokenName(config, \"fontSize\", rawValue)) {\n return {\n entry: fontSize,\n valueKind: \"token\"\n };\n }\n if (import_registry.textAlignKeywords.has(rawValue)) {\n return {\n entry: entries.find(function(entry2) {\n return entry2.prop === \"textAlign\";\n }),\n valueKind: \"enum\"\n };\n }\n return null;\n }\n if (prefix === \"font\") {\n var fontFamily = entries.find(function(entry2) {\n return entry2.prop === \"fontFamily\";\n });\n var fontWeight = entries.find(function(entry2) {\n return entry2.prop === \"fontWeight\";\n });\n if (!fontFamily) return null;\n var matchesFamily = hasTokenName(config, \"fontFamily\", rawValue);\n var matchesWeight = fontWeight && hasTokenName(config, \"fontWeight\", rawValue);\n if (matchesFamily && matchesWeight) return null;\n if (matchesFamily) {\n return {\n entry: fontFamily,\n valueKind: \"token\"\n };\n }\n if (matchesWeight) {\n return {\n entry: fontWeight,\n valueKind: \"token\"\n };\n }\n return fontGenerics.has(rawValue) ? {\n entry: fontFamily,\n valueKind: \"convenience\",\n convenience: \"font-generic\"\n } : null;\n }\n if (prefix.startsWith(\"border\")) {\n var width1 = entries.find(function(entry2) {\n return entry2.prop.endsWith(\"Width\");\n });\n var color1 = entries.find(function(entry2) {\n return entry2.prop.endsWith(\"Color\");\n });\n var token = negative ? `-${rawValue}` : rawValue;\n var matchesWidth = width1 && hasTokenName(config, \"space\", token);\n var colorName = tokenLookupName(\"color\", rawValue);\n var matchesColor = color1 && hasTokenName(config, \"color\", colorName);\n if (matchesWidth && matchesColor) return null;\n if (matchesWidth) {\n return {\n entry: width1,\n valueKind: \"token\"\n };\n }\n if (matchesColor) {\n return {\n entry: color1,\n valueKind: \"token\"\n };\n }\n return null;\n }\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = entries[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var entry1 = _step.value;\n if (entry1.tokenCategory) {\n var name = negative ? `-${rawValue}` : rawValue;\n var tokenName = tokenLookupName(entry1.tokenCategory, name);\n if (hasTokenName(config, entry1.tokenCategory, tokenName)) {\n return {\n entry: entry1,\n valueKind: \"token\"\n };\n }\n if (entry1.tokenCategory === \"size\" && (sizingConveniences.has(rawValue) || fractionIsValid(rawValue))) {\n return {\n entry: entry1,\n valueKind: \"convenience\",\n convenience: \"sizing-keyword\"\n };\n }\n if (entry1.tokenCategory === \"zIndex\" && numericPattern.test(rawValue)) {\n return {\n entry: entry1,\n valueKind: \"convenience\",\n convenience: \"integer\"\n };\n }\n continue;\n }\n if (prefix === \"opacity\" || prefix === \"scale\") {\n if (numericPattern.test(rawValue)) {\n return {\n entry: entry1,\n valueKind: \"convenience\",\n convenience: \"percentage\"\n };\n }\n continue;\n }\n if (entry1.prop === \"zIndex\" && numericPattern.test(rawValue)) {\n return {\n entry: entry1,\n valueKind: \"convenience\",\n convenience: \"integer\"\n };\n }\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 null;\n}\nfunction parseCandidate(candidate, config) {\n var split = splitCandidate(candidate);\n if (!split || !modifiersAreKnown(split.modifiers, config)) {\n return null;\n }\n var modifiers = split.modifiers.map(function(modifier) {\n return import_registry.modifierAliases[modifier] || modifier;\n });\n var negative = split.base[0] === \"-\";\n var core = negative ? split.base.slice(1) : split.base;\n var prefix = findPrefix(core, config);\n var dynamic;\n if (prefix) {\n var rawValue = core.slice(prefix.length + 1);\n if (rawValue) {\n var entries = resolveEntries(prefix, config);\n var selected = chooseEntry(entries, prefix, rawValue, negative, config);\n if (selected && (!negative || selected.valueKind === \"token\" && negativeTokenProps.has(selected.entry.prop))) {\n dynamic = {\n prefix,\n rawValue,\n selected\n };\n if (selected.valueKind === \"token\") {\n return {\n candidate,\n base: split.base,\n modifiers,\n negative,\n kind: \"dynamic\",\n prefix,\n rawValue,\n arbitrary: arbitraryInner(rawValue) !== null,\n entry: selected.entry,\n valueKind: selected.valueKind,\n convenience: selected.convenience\n };\n }\n }\n }\n }\n var direct = import_registry.wholeClassUtilities[split.base];\n if (!negative && direct) {\n var convenience = import_registry.wholeClassConveniences[split.base];\n return {\n candidate,\n base: split.base,\n modifiers,\n kind: \"utility\",\n valueKind: convenience ? \"convenience\" : \"enum\",\n properties: direct,\n convenience,\n negative: false\n };\n }\n if (dynamic) {\n return {\n candidate,\n base: split.base,\n modifiers,\n negative,\n kind: \"dynamic\",\n prefix: dynamic.prefix,\n rawValue: dynamic.rawValue,\n arbitrary: arbitraryInner(dynamic.rawValue) !== null,\n entry: dynamic.selected.entry,\n valueKind: dynamic.selected.valueKind,\n convenience: dynamic.selected.convenience\n };\n }\n return null;\n}\nfunction classifyCandidate(candidate, config) {\n var parsed = parseCandidate(candidate, config);\n return parsed ? {\n kind: \"tamagui\",\n parsed\n } : {\n kind: \"passthrough\",\n reason: \"not in the configured Tamagui grammar\"\n };\n}\nfunction tokenValidationConfig(entry, value, config) {\n var tokenNames = {\n ...config === null || config === void 0 ? void 0 : config.tokenNames\n };\n var category = entry.tokenCategory;\n if (tokenNames[category] === void 0) {\n tokenNames[category] = [\n tokenLookupName(category, value)\n ];\n }\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = (import_registry.prefixToEntries[entry.prefix] || [])[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var other = _step.value;\n if (other.tokenCategory && tokenNames[other.tokenCategory] === void 0) {\n tokenNames[other.tokenCategory] = [];\n }\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 ...config,\n tokenNames\n };\n}\nfunction formatCandidate(param, config) {\n var { prop, value, valueKind, modifiers = [] } = param;\n var _parsed_entry;\n var entry = import_registry.grammarEntries.find(function(candidate3) {\n return candidate3.prop === prop;\n });\n if (!entry) return null;\n if (valueKind === \"arbitrary\" && value === \"\") return null;\n if (!modifiersAreKnown(modifiers, config || {})) return null;\n var normalizedModifiers = modifiers.map(function(modifier) {\n return import_registry.modifierAliases[modifier] || modifier;\n });\n if (valueKind === \"enum\") {\n var _standaloneValueProps_prop;\n var whole = (_standaloneValueProps_prop = import_registry.standaloneValueProps[prop]) === null || _standaloneValueProps_prop === void 0 ? void 0 : _standaloneValueProps_prop[value];\n if (whole) {\n var candidate = normalizedModifiers.length ? `${normalizedModifiers.join(\":\")}:${whole}` : whole;\n if (config) {\n var parsed = parseCandidate(candidate, config);\n if (!(parsed === null || parsed === void 0 ? void 0 : parsed.properties) || parsed.properties[prop] !== value) return null;\n }\n return candidate;\n }\n if (prop === \"fontWeight\") {\n var _wholeClassUtilities_core;\n var name = import_registry.fontWeightNames[value];\n if (!name) return null;\n var core = `font-${name}`;\n if (String((_wholeClassUtilities_core = import_registry.wholeClassUtilities[core]) === null || _wholeClassUtilities_core === void 0 ? void 0 : _wholeClassUtilities_core.fontWeight) !== value) return null;\n var candidate1 = normalizedModifiers.length ? `${normalizedModifiers.join(\":\")}:${core}` : core;\n if (config) {\n var parsed1 = parseCandidate(candidate1, config);\n if (!(parsed1 === null || parsed1 === void 0 ? void 0 : parsed1.properties) || String(parsed1.properties.fontWeight) !== value) {\n return null;\n }\n }\n return candidate1;\n }\n }\n if (!entry.prefix) return null;\n if (valueKind === \"token\") {\n if (!entry.tokenCategory) return null;\n var sourceDomainKnown = !!config && hasTokenDomain(config, entry.tokenCategory);\n var lookupName = tokenLookupName(entry.tokenCategory, value);\n if (sourceDomainKnown && !hasTokenName(config, entry.tokenCategory, lookupName)) return null;\n var colliding = import_registry.prefixToEntries[entry.prefix].filter(function(other2) {\n return other2.prop !== prop && other2.tokenCategory;\n });\n if (colliding.length) {\n if (!config || !sourceDomainKnown) return null;\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = colliding[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var other = _step.value;\n if (!hasTokenDomain(config, other.tokenCategory)) return null;\n if (hasTokenName(config, other.tokenCategory, value)) return null;\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 }\n }\n var formattedValue = valueKind === \"arbitrary\" ? `[${encodeArbitrary(value)}]` : value;\n var core1 = formattedValue[0] === \"-\" && formattedValue[1] !== \"[\" ? `-${entry.prefix}-${formattedValue.slice(1)}` : formattedValue ? `${entry.prefix}-${formattedValue}` : entry.prefix;\n var candidate2 = normalizedModifiers.length ? `${normalizedModifiers.join(\":\")}:${core1}` : core1;\n var whole1 = import_registry.wholeClassUtilities[core1];\n if (whole1) {\n if (valueKind === \"token\") {\n if (!config || !hasTokenDomain(config, entry.tokenCategory)) return null;\n } else if (config) {\n var _parsed_entry1;\n var parsed2 = parseCandidate(candidate2, config);\n if ((parsed2 === null || parsed2 === void 0 ? void 0 : parsed2.kind) === \"utility\") {\n var _parsed_properties;\n return Object.prototype.hasOwnProperty.call(parsed2.properties, prop) && String((_parsed_properties = parsed2.properties) === null || _parsed_properties === void 0 ? void 0 : _parsed_properties[prop]) === value ? candidate2 : null;\n }\n return (parsed2 === null || parsed2 === void 0 ? void 0 : (_parsed_entry1 = parsed2.entry) === null || _parsed_entry1 === void 0 ? void 0 : _parsed_entry1.prop) === prop && parsed2.valueKind === valueKind ? candidate2 : null;\n } else if (Object.prototype.hasOwnProperty.call(whole1, prop) && String(whole1[prop]) === value) {\n return candidate2;\n } else {\n return null;\n }\n }\n if (valueKind === \"token\") {\n var _parsed_entry2;\n if (!hasTokenDomain(config || {}, entry.tokenCategory) && parseCandidate(candidate2, config || {})) {\n return null;\n }\n var parsed3 = parseCandidate(candidate2, tokenValidationConfig(entry, value, config));\n var parsedValue = (parsed3 === null || parsed3 === void 0 ? void 0 : parsed3.rawValue) ? `${parsed3.negative ? \"-\" : \"\"}${parsed3.rawValue}` : null;\n if ((parsed3 === null || parsed3 === void 0 ? void 0 : parsed3.kind) !== \"dynamic\" || ((_parsed_entry2 = parsed3.entry) === null || _parsed_entry2 === void 0 ? void 0 : _parsed_entry2.prop) !== prop || parsed3.valueKind !== \"token\" || parsedValue !== value) {\n return null;\n }\n return candidate2;\n }\n var parsed4 = parseCandidate(candidate2, config || {});\n if (!parsed4 || ((_parsed_entry = parsed4.entry) === null || _parsed_entry === void 0 ? void 0 : _parsed_entry.prop) !== prop || parsed4.valueKind !== valueKind) return null;\n return candidate2;\n}\nfunction encodeArbitrary(value) {\n var encoded = \"\";\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = value[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var char = _step.value;\n if (char === \"\\\\\" || char === \"_\" || char === \"[\" || char === \"]\") {\n encoded += `\\\\${char}`;\n } else if (/\\s/.test(char)) {\n encoded += \"_\";\n } else {\n encoded += char;\n }\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 encoded;\n}\nfunction decodeArbitrary(value) {\n var decoded = \"\";\n for (var index = 0; index < value.length; index++) {\n var char = value[index];\n if (char === \"\\\\\" && index + 1 < value.length) {\n decoded += value[++index];\n } else {\n decoded += char === \"_\" ? \" \" : char;\n }\n }\n return decoded;\n}\n//# sourceMappingURL=candidate.js.map\n"],"mappings":";;;;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AK,KAAK,IAAI,GAAG;IAC1B,WAAW;GACb,OAAO;IACL,WAAW;GACb;EACF;CACF,SAAS,KAAK;EACZ,oBAAoB;EACpB,iBAAiB;CACnB,UAAU;EACR,IAAI;GACF,IAAI,CAAC,6BAA6B,UAAU,UAAU,MAAM;IAC1D,UAAU,OAAO;GACnB;EACF,UAAU;GACR,IAAI,mBAAmB;IACrB,MAAM;GACR;EACF;CACF;CACA,OAAO;AACT;AACA,SAAS,gBAAgB,OAAO;CAC9B,IAAI,UAAU;CACd,KAAK,IAAI,QAAQ,GAAG,QAAQ,MAAM,QAAQ,SAAS;EACjD,IAAI,OAAO,MAAM;EACjB,IAAI,SAAS,QAAQ,QAAQ,IAAI,MAAM,QAAQ;GAC7C,WAAW,MAAM,EAAE;EACrB,OAAO;GACL,WAAW,SAAS,MAAM,MAAM;EAClC;CACF;CACA,OAAO;AACT"}
|
|
@@ -0,0 +1,50 @@
|
|
|
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 candidateTarget_exports = {};
|
|
23
|
+
__export(candidateTarget_exports, { resolveCandidateTarget: () => resolveCandidateTarget });
|
|
24
|
+
module.exports = __toCommonJS(candidateTarget_exports);
|
|
25
|
+
function resolveCandidateTarget(property, candidate, contributions) {
|
|
26
|
+
for (const contribution of contributions) {
|
|
27
|
+
if (contribution.property === property) {
|
|
28
|
+
return {
|
|
29
|
+
ok: true,
|
|
30
|
+
contribution
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
const contributedProperties = [];
|
|
35
|
+
for (const contribution of contributions) {
|
|
36
|
+
if (!contributedProperties.includes(contribution.property)) {
|
|
37
|
+
contributedProperties.push(contribution.property);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
ok: false,
|
|
42
|
+
diagnostic: {
|
|
43
|
+
code: "candidate-property-mismatch",
|
|
44
|
+
candidate,
|
|
45
|
+
property,
|
|
46
|
+
contributedProperties,
|
|
47
|
+
message: contributedProperties.length === 0 ? `"${candidate}" does not contribute to "${property}"` : `"${candidate}" contributes to ${contributedProperties.map((name) => `"${name}"`).join(", ")}, not "${property}"`
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
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 candidateTarget_exports = {};
|
|
25
|
+
__export(candidateTarget_exports, { resolveCandidateTarget: () => resolveCandidateTarget });
|
|
26
|
+
module.exports = __toCommonJS(candidateTarget_exports);
|
|
27
|
+
function resolveCandidateTarget(property, candidate, contributions) {
|
|
28
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
29
|
+
try {
|
|
30
|
+
for (var _iterator = contributions[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
31
|
+
var contribution = _step.value;
|
|
32
|
+
if (contribution.property === property) {
|
|
33
|
+
return {
|
|
34
|
+
ok: true,
|
|
35
|
+
contribution
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
} catch (err) {
|
|
40
|
+
_didIteratorError = true;
|
|
41
|
+
_iteratorError = err;
|
|
42
|
+
} finally {
|
|
43
|
+
try {
|
|
44
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
45
|
+
_iterator.return();
|
|
46
|
+
}
|
|
47
|
+
} finally {
|
|
48
|
+
if (_didIteratorError) {
|
|
49
|
+
throw _iteratorError;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
var contributedProperties = [];
|
|
54
|
+
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;
|
|
55
|
+
try {
|
|
56
|
+
for (var _iterator1 = contributions[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
|
|
57
|
+
var contribution1 = _step1.value;
|
|
58
|
+
if (!contributedProperties.includes(contribution1.property)) {
|
|
59
|
+
contributedProperties.push(contribution1.property);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
} catch (err) {
|
|
63
|
+
_didIteratorError1 = true;
|
|
64
|
+
_iteratorError1 = err;
|
|
65
|
+
} finally {
|
|
66
|
+
try {
|
|
67
|
+
if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
|
|
68
|
+
_iterator1.return();
|
|
69
|
+
}
|
|
70
|
+
} finally {
|
|
71
|
+
if (_didIteratorError1) {
|
|
72
|
+
throw _iteratorError1;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
ok: false,
|
|
78
|
+
diagnostic: {
|
|
79
|
+
code: "candidate-property-mismatch",
|
|
80
|
+
candidate,
|
|
81
|
+
property,
|
|
82
|
+
contributedProperties,
|
|
83
|
+
message: contributedProperties.length === 0 ? `"${candidate}" does not contribute to "${property}"` : `"${candidate}" contributes to ${contributedProperties.map(function(name) {
|
|
84
|
+
return `"${name}"`;
|
|
85
|
+
}).join(", ")}, not "${property}"`
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
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 candidateTarget_exports = {};
|
|
25
|
+
__export(candidateTarget_exports, { resolveCandidateTarget: () => resolveCandidateTarget });
|
|
26
|
+
module.exports = __toCommonJS(candidateTarget_exports);
|
|
27
|
+
function resolveCandidateTarget(property, candidate, contributions) {
|
|
28
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
29
|
+
try {
|
|
30
|
+
for (var _iterator = contributions[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
31
|
+
var contribution = _step.value;
|
|
32
|
+
if (contribution.property === property) {
|
|
33
|
+
return {
|
|
34
|
+
ok: true,
|
|
35
|
+
contribution
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
} catch (err) {
|
|
40
|
+
_didIteratorError = true;
|
|
41
|
+
_iteratorError = err;
|
|
42
|
+
} finally {
|
|
43
|
+
try {
|
|
44
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
45
|
+
_iterator.return();
|
|
46
|
+
}
|
|
47
|
+
} finally {
|
|
48
|
+
if (_didIteratorError) {
|
|
49
|
+
throw _iteratorError;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
var contributedProperties = [];
|
|
54
|
+
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;
|
|
55
|
+
try {
|
|
56
|
+
for (var _iterator1 = contributions[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
|
|
57
|
+
var contribution1 = _step1.value;
|
|
58
|
+
if (!contributedProperties.includes(contribution1.property)) {
|
|
59
|
+
contributedProperties.push(contribution1.property);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
} catch (err) {
|
|
63
|
+
_didIteratorError1 = true;
|
|
64
|
+
_iteratorError1 = err;
|
|
65
|
+
} finally {
|
|
66
|
+
try {
|
|
67
|
+
if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
|
|
68
|
+
_iterator1.return();
|
|
69
|
+
}
|
|
70
|
+
} finally {
|
|
71
|
+
if (_didIteratorError1) {
|
|
72
|
+
throw _iteratorError1;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
ok: false,
|
|
78
|
+
diagnostic: {
|
|
79
|
+
code: "candidate-property-mismatch",
|
|
80
|
+
candidate,
|
|
81
|
+
property,
|
|
82
|
+
contributedProperties,
|
|
83
|
+
message: contributedProperties.length === 0 ? `"${candidate}" does not contribute to "${property}"` : `"${candidate}" contributes to ${contributedProperties.map(function(name) {
|
|
84
|
+
return `"${name}"`;
|
|
85
|
+
}).join(", ")}, not "${property}"`
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
//# sourceMappingURL=candidateTarget.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"candidateTarget.native.js","names":[],"sources":["cjs/candidateTarget.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar candidateTarget_exports = {};\n__export(candidateTarget_exports, {\n resolveCandidateTarget: () => resolveCandidateTarget\n});\nmodule.exports = __toCommonJS(candidateTarget_exports);\nfunction resolveCandidateTarget(property, candidate, contributions) {\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = contributions[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var contribution = _step.value;\n if (contribution.property === property) {\n return {\n ok: true,\n contribution\n };\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n var contributedProperties = [];\n var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;\n try {\n for (var _iterator1 = contributions[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {\n var contribution1 = _step1.value;\n if (!contributedProperties.includes(contribution1.property)) {\n contributedProperties.push(contribution1.property);\n }\n }\n } catch (err) {\n _didIteratorError1 = true;\n _iteratorError1 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion1 && _iterator1.return != null) {\n _iterator1.return();\n }\n } finally {\n if (_didIteratorError1) {\n throw _iteratorError1;\n }\n }\n }\n return {\n ok: false,\n diagnostic: {\n code: \"candidate-property-mismatch\",\n candidate,\n property,\n contributedProperties,\n message: contributedProperties.length === 0 ? `\"${candidate}\" does not contribute to \"${property}\"` : `\"${candidate}\" contributes to ${contributedProperties.map(function(name) {\n return `\"${name}\"`;\n }).join(\", \")}, not \"${property}\"`\n }\n };\n}\n//# sourceMappingURL=candidateTarget.js.map\n"],"mappings":";;;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,0BAA0B,CAAC;AAC/B,SAAS,yBAAyB,EAChC,8BAA8B,uBAChC,CAAC;AACD,OAAO,UAAU,aAAa,uBAAuB;AACrD,SAAS,uBAAuB,UAAU,WAAW,eAAe;CAClE,IAAI,4BAA4B,MAAM,oBAAoB,OAAO,iBAAiB,KAAK;CACvF,IAAI;EACF,KAAK,IAAI,YAAY,cAAc,OAAO,UAAU,GAAG,OAAO,EAAE,6BAA6B,QAAQ,UAAU,KAAK,GAAG,OAAO,4BAA4B,MAAM;GAC9J,IAAI,eAAe,MAAM;GACzB,IAAI,aAAa,aAAa,UAAU;IACtC,OAAO;KACL,IAAI;KACJ;IACF;GACF;EACF;CACF,SAAS,KAAK;EACZ,oBAAoB;EACpB,iBAAiB;CACnB,UAAU;EACR,IAAI;GACF,IAAI,CAAC,6BAA6B,UAAU,UAAU,MAAM;IAC1D,UAAU,OAAO;GACnB;EACF,UAAU;GACR,IAAI,mBAAmB;IACrB,MAAM;GACR;EACF;CACF;CACA,IAAI,wBAAwB,CAAC;CAC7B,IAAI,6BAA6B,MAAM,qBAAqB,OAAO,kBAAkB,KAAK;CAC1F,IAAI;EACF,KAAK,IAAI,aAAa,cAAc,OAAO,UAAU,GAAG,QAAQ,EAAE,8BAA8B,SAAS,WAAW,KAAK,GAAG,OAAO,6BAA6B,MAAM;GACpK,IAAI,gBAAgB,OAAO;GAC3B,IAAI,CAAC,sBAAsB,SAAS,cAAc,QAAQ,GAAG;IAC3D,sBAAsB,KAAK,cAAc,QAAQ;GACnD;EACF;CACF,SAAS,KAAK;EACZ,qBAAqB;EACrB,kBAAkB;CACpB,UAAU;EACR,IAAI;GACF,IAAI,CAAC,8BAA8B,WAAW,UAAU,MAAM;IAC5D,WAAW,OAAO;GACpB;EACF,UAAU;GACR,IAAI,oBAAoB;IACtB,MAAM;GACR;EACF;CACF;CACA,OAAO;EACL,IAAI;EACJ,YAAY;GACV,MAAM;GACN;GACA;GACA;GACA,SAAS,sBAAsB,WAAW,IAAI,IAAI,UAAU,4BAA4B,SAAS,KAAK,IAAI,UAAU,mBAAmB,sBAAsB,IAAI,SAAS,MAAM;IAC9K,OAAO,IAAI,KAAK;GAClB,CAAC,EAAE,KAAK,IAAI,EAAE,SAAS,SAAS;EAClC;CACF;AACF"}
|
|
@@ -0,0 +1,130 @@
|
|
|
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 clauseCapability_exports = {};
|
|
23
|
+
__export(clauseCapability_exports, {
|
|
24
|
+
assessFlatConversion: () => assessFlatConversion,
|
|
25
|
+
clauseCapability: () => clauseCapability
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(clauseCapability_exports);
|
|
28
|
+
var import_programEligibility = require("./programEligibility.cjs");
|
|
29
|
+
var import_lowerProgram = require("./lowerProgram.cjs");
|
|
30
|
+
var import_modifierRegistry = require("./modifierRegistry.cjs");
|
|
31
|
+
var import_clauseSources = require("./clauseSources.cjs");
|
|
32
|
+
const nativeGroupSourceable = new Set(import_clauseSources.nativeGroupSourceableStates);
|
|
33
|
+
const webLowerableStates = new Set(Object.keys(import_lowerProgram.defaultStateSelectors));
|
|
34
|
+
const bothTargets = Object.freeze({
|
|
35
|
+
web: true,
|
|
36
|
+
native: true
|
|
37
|
+
});
|
|
38
|
+
function clauseCapability(modifier, kind) {
|
|
39
|
+
if (kind === "media" || kind === "theme" || kind === "platform") {
|
|
40
|
+
return bothTargets;
|
|
41
|
+
}
|
|
42
|
+
if (kind === "container") {
|
|
43
|
+
return bothTargets;
|
|
44
|
+
}
|
|
45
|
+
if (kind === "state") {
|
|
46
|
+
const web = webLowerableStates.has(modifier);
|
|
47
|
+
const native = import_clauseSources.nativeSourceableStates.has(modifier);
|
|
48
|
+
if (web && native) return bothTargets;
|
|
49
|
+
return {
|
|
50
|
+
web,
|
|
51
|
+
native,
|
|
52
|
+
note: !web ? `"${modifier}:" cannot lower to web CSS because it has no selector` : `"${modifier}:" is a component-tier state with no native source until the behavior packages feed componentState`
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
if (kind === "group") {
|
|
56
|
+
const parsed = (0, import_modifierRegistry.parseGroupModifier)(modifier);
|
|
57
|
+
if (!parsed) return {
|
|
58
|
+
web: false,
|
|
59
|
+
native: false,
|
|
60
|
+
note: `"${modifier}:" is not a group modifier`
|
|
61
|
+
};
|
|
62
|
+
const web = webLowerableStates.has(parsed.state);
|
|
63
|
+
const native = nativeGroupSourceable.has(parsed.state);
|
|
64
|
+
if (web && native) return bothTargets;
|
|
65
|
+
return {
|
|
66
|
+
web,
|
|
67
|
+
native,
|
|
68
|
+
note: `group state "${parsed.state}" has no native source`
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
web: false,
|
|
73
|
+
native: false,
|
|
74
|
+
note: `"${modifier}:" is not a registered modifier`
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
const clean = Object.freeze({
|
|
78
|
+
verdict: "clean",
|
|
79
|
+
reasons: []
|
|
80
|
+
});
|
|
81
|
+
function assessFlatConversion(input, registry) {
|
|
82
|
+
const reasons = [];
|
|
83
|
+
if ((0, import_programEligibility.programEligibility)(input.property) === "legacy-part") {
|
|
84
|
+
reasons.push({
|
|
85
|
+
dimension: "property",
|
|
86
|
+
message: `"${input.property}" is a part prop with no flat clause spelling`,
|
|
87
|
+
remedy: `move the condition onto \`${import_programEligibility.legacyPartComposite[input.property]}\``
|
|
88
|
+
});
|
|
89
|
+
return {
|
|
90
|
+
verdict: "ineligible",
|
|
91
|
+
reasons
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
for (const modifier of input.modifiers ?? []) {
|
|
95
|
+
const capability = clauseCapability(modifier, registry.get(modifier));
|
|
96
|
+
const needsWeb = input.targets !== "native";
|
|
97
|
+
const needsNative = input.targets !== "web";
|
|
98
|
+
if (needsWeb && !capability.web || needsNative && !capability.native) {
|
|
99
|
+
const missing = needsWeb && !capability.web ? "web" : "native";
|
|
100
|
+
reasons.push({
|
|
101
|
+
dimension: "clause",
|
|
102
|
+
modifier,
|
|
103
|
+
message: capability.note ?? `"${modifier}:" is not supported on ${missing}`,
|
|
104
|
+
remedy: missing === "web" ? `keep the driver-evaluated pseudo prop, or move this usage to a .native.tsx file` : `move this usage to a .web.tsx file, or drop the clause on native`
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
if (input.host && !input.host.accepts(input.property)) {
|
|
109
|
+
reasons.push({
|
|
110
|
+
dimension: "host",
|
|
111
|
+
message: `"${input.property}" is not a valid style on ${input.host.displayName ?? "this component"} \u2014 the runtime drops it`,
|
|
112
|
+
remedy: `move this style to a component that accepts it (a Text-based component, or html.* on web)`
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
if (reasons.length) return {
|
|
116
|
+
verdict: "needs-relocation",
|
|
117
|
+
reasons
|
|
118
|
+
};
|
|
119
|
+
if (!input.host) {
|
|
120
|
+
return {
|
|
121
|
+
verdict: "unknown-host",
|
|
122
|
+
reasons: [{
|
|
123
|
+
dimension: "host",
|
|
124
|
+
message: `the component's identity could not be established, so host validity for "${input.property}" is unverified`,
|
|
125
|
+
remedy: `verify the component accepts this style prop, or supply type-aware provenance so the check can run`
|
|
126
|
+
}]
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
return clean;
|
|
130
|
+
}
|
|
@@ -0,0 +1,152 @@
|
|
|
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 clauseCapability_exports = {};
|
|
25
|
+
__export(clauseCapability_exports, {
|
|
26
|
+
assessFlatConversion: () => assessFlatConversion,
|
|
27
|
+
clauseCapability: () => clauseCapability
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(clauseCapability_exports);
|
|
30
|
+
var import_programEligibility = require("./programEligibility.native.js");
|
|
31
|
+
var import_lowerProgram = require("./lowerProgram.native.js");
|
|
32
|
+
var import_modifierRegistry = require("./modifierRegistry.native.js");
|
|
33
|
+
var import_clauseSources = require("./clauseSources.native.js");
|
|
34
|
+
var nativeGroupSourceable = new Set(import_clauseSources.nativeGroupSourceableStates);
|
|
35
|
+
var webLowerableStates = new Set(Object.keys(import_lowerProgram.defaultStateSelectors));
|
|
36
|
+
var bothTargets = Object.freeze({
|
|
37
|
+
web: true,
|
|
38
|
+
native: true
|
|
39
|
+
});
|
|
40
|
+
function clauseCapability(modifier, kind) {
|
|
41
|
+
if (kind === "media" || kind === "theme" || kind === "platform") {
|
|
42
|
+
return bothTargets;
|
|
43
|
+
}
|
|
44
|
+
if (kind === "container") {
|
|
45
|
+
return bothTargets;
|
|
46
|
+
}
|
|
47
|
+
if (kind === "state") {
|
|
48
|
+
var web = webLowerableStates.has(modifier);
|
|
49
|
+
var native = import_clauseSources.nativeSourceableStates.has(modifier);
|
|
50
|
+
if (web && native) return bothTargets;
|
|
51
|
+
return {
|
|
52
|
+
web,
|
|
53
|
+
native,
|
|
54
|
+
note: !web ? `"${modifier}:" cannot lower to web CSS because it has no selector` : `"${modifier}:" is a component-tier state with no native source until the behavior packages feed componentState`
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
if (kind === "group") {
|
|
58
|
+
var parsed = (0, import_modifierRegistry.parseGroupModifier)(modifier);
|
|
59
|
+
if (!parsed) return {
|
|
60
|
+
web: false,
|
|
61
|
+
native: false,
|
|
62
|
+
note: `"${modifier}:" is not a group modifier`
|
|
63
|
+
};
|
|
64
|
+
var web1 = webLowerableStates.has(parsed.state);
|
|
65
|
+
var native1 = nativeGroupSourceable.has(parsed.state);
|
|
66
|
+
if (web1 && native1) return bothTargets;
|
|
67
|
+
return {
|
|
68
|
+
web: web1,
|
|
69
|
+
native: native1,
|
|
70
|
+
note: `group state "${parsed.state}" has no native source`
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
web: false,
|
|
75
|
+
native: false,
|
|
76
|
+
note: `"${modifier}:" is not a registered modifier`
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
var clean = Object.freeze({
|
|
80
|
+
verdict: "clean",
|
|
81
|
+
reasons: []
|
|
82
|
+
});
|
|
83
|
+
function assessFlatConversion(input, registry) {
|
|
84
|
+
var reasons = [];
|
|
85
|
+
if ((0, import_programEligibility.programEligibility)(input.property) === "legacy-part") {
|
|
86
|
+
reasons.push({
|
|
87
|
+
dimension: "property",
|
|
88
|
+
message: `"${input.property}" is a part prop with no flat clause spelling`,
|
|
89
|
+
remedy: `move the condition onto \`${import_programEligibility.legacyPartComposite[input.property]}\``
|
|
90
|
+
});
|
|
91
|
+
return {
|
|
92
|
+
verdict: "ineligible",
|
|
93
|
+
reasons
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
var _input_modifiers;
|
|
97
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
98
|
+
try {
|
|
99
|
+
for (var _iterator = ((_input_modifiers = input.modifiers) !== null && _input_modifiers !== void 0 ? _input_modifiers : [])[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
100
|
+
var modifier = _step.value;
|
|
101
|
+
var capability = clauseCapability(modifier, registry.get(modifier));
|
|
102
|
+
var needsWeb = input.targets !== "native";
|
|
103
|
+
var needsNative = input.targets !== "web";
|
|
104
|
+
if (needsWeb && !capability.web || needsNative && !capability.native) {
|
|
105
|
+
var missing = needsWeb && !capability.web ? "web" : "native";
|
|
106
|
+
var _capability_note;
|
|
107
|
+
reasons.push({
|
|
108
|
+
dimension: "clause",
|
|
109
|
+
modifier,
|
|
110
|
+
message: (_capability_note = capability.note) !== null && _capability_note !== void 0 ? _capability_note : `"${modifier}:" is not supported on ${missing}`,
|
|
111
|
+
remedy: missing === "web" ? `keep the driver-evaluated pseudo prop, or move this usage to a .native.tsx file` : `move this usage to a .web.tsx file, or drop the clause on native`
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
} catch (err) {
|
|
116
|
+
_didIteratorError = true;
|
|
117
|
+
_iteratorError = err;
|
|
118
|
+
} finally {
|
|
119
|
+
try {
|
|
120
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
121
|
+
_iterator.return();
|
|
122
|
+
}
|
|
123
|
+
} finally {
|
|
124
|
+
if (_didIteratorError) {
|
|
125
|
+
throw _iteratorError;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
if (input.host && !input.host.accepts(input.property)) {
|
|
130
|
+
var _input_host_displayName;
|
|
131
|
+
reasons.push({
|
|
132
|
+
dimension: "host",
|
|
133
|
+
message: `"${input.property}" is not a valid style on ${(_input_host_displayName = input.host.displayName) !== null && _input_host_displayName !== void 0 ? _input_host_displayName : "this component"} \u2014 the runtime drops it`,
|
|
134
|
+
remedy: `move this style to a component that accepts it (a Text-based component, or html.* on web)`
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
if (reasons.length) return {
|
|
138
|
+
verdict: "needs-relocation",
|
|
139
|
+
reasons
|
|
140
|
+
};
|
|
141
|
+
if (!input.host) {
|
|
142
|
+
return {
|
|
143
|
+
verdict: "unknown-host",
|
|
144
|
+
reasons: [{
|
|
145
|
+
dimension: "host",
|
|
146
|
+
message: `the component's identity could not be established, so host validity for "${input.property}" is unverified`,
|
|
147
|
+
remedy: `verify the component accepts this style prop, or supply type-aware provenance so the check can run`
|
|
148
|
+
}]
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
return clean;
|
|
152
|
+
}
|