@tamagui/react-native-web-internals 2.7.7 → 3.0.0-beta.637.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/dist/cjs/StyleSheet/compiler/createReactDOMStyle.cjs +151 -136
- package/dist/cjs/StyleSheet/compiler/hash.cjs +15 -18
- package/dist/cjs/StyleSheet/compiler/hyphenateStyleName.cjs +21 -24
- package/dist/cjs/StyleSheet/compiler/index.cjs +295 -321
- package/dist/cjs/StyleSheet/compiler/normalizeColor.cjs +20 -23
- package/dist/cjs/StyleSheet/compiler/normalizeValueWithProperty.cjs +32 -35
- package/dist/cjs/StyleSheet/compiler/resolveShadowValue.cjs +27 -38
- package/dist/cjs/StyleSheet/dom/createCSSStyleSheet.cjs +37 -40
- package/dist/cjs/StyleSheet/dom/createOrderedCSSStyleSheet.cjs +108 -111
- package/dist/cjs/StyleSheet/dom/index.cjs +70 -72
- package/dist/cjs/StyleSheet/index.cjs +33 -34
- package/dist/cjs/StyleSheet/preprocess.cjs +74 -94
- package/dist/cjs/StyleSheet/validate.cjs +72 -75
- package/dist/cjs/TextAncestorContext.cjs +15 -18
- package/dist/cjs/colorProps.cjs +25 -28
- package/dist/cjs/index.cjs +49 -50
- package/dist/cjs/modules/AccessibilityUtil/index.cjs +18 -21
- package/dist/cjs/modules/AccessibilityUtil/isDisabled.cjs +15 -18
- package/dist/cjs/modules/AccessibilityUtil/propsToAccessibilityComponent.cjs +46 -49
- package/dist/cjs/modules/AccessibilityUtil/propsToAriaRole.cjs +34 -39
- package/dist/cjs/modules/AssetRegistry/index.cjs +18 -19
- package/dist/cjs/modules/ImageLoader/index.cjs +135 -141
- package/dist/cjs/modules/InteractionManager.cjs +212 -219
- package/dist/cjs/modules/Platform/index.cjs +18 -21
- package/dist/cjs/modules/TextInputState/index.cjs +55 -58
- package/dist/cjs/modules/UIManager/index.cjs +46 -51
- package/dist/cjs/modules/canUseDOM.cjs +15 -18
- package/dist/cjs/modules/createDOMProps/index.cjs +289 -358
- package/dist/cjs/modules/createEventHandle/index.cjs +57 -62
- package/dist/cjs/modules/dismissKeyboard/index.cjs +16 -19
- package/dist/cjs/modules/forwardedProps/index.cjs +128 -130
- package/dist/cjs/modules/getBoundingClientRect/index.cjs +22 -25
- package/dist/cjs/modules/invariant.cjs +26 -27
- package/dist/cjs/modules/isSelectionValid/index.cjs +22 -25
- package/dist/cjs/modules/isWebColor/index.cjs +15 -18
- package/dist/cjs/modules/mergeRefs/index.cjs +31 -34
- package/dist/cjs/modules/modality/index.cjs +131 -134
- package/dist/cjs/modules/multiplyStyleLengthValue/index.cjs +25 -28
- package/dist/cjs/modules/normalizeColor/index.cjs +28 -31
- package/dist/cjs/modules/pick/index.cjs +24 -27
- package/dist/cjs/modules/processColor/index.cjs +28 -36
- package/dist/cjs/modules/requestIdleCallback/index.cjs +28 -29
- package/dist/cjs/modules/setValueForStyles/dangerousStyleValue.cjs +39 -42
- package/dist/cjs/modules/setValueForStyles/index.cjs +31 -34
- package/dist/cjs/modules/unitlessNumbers/index.cjs +74 -75
- package/dist/cjs/modules/useElementLayout/index.cjs +24 -31
- package/dist/cjs/modules/useEvent/index.cjs +40 -43
- package/dist/cjs/modules/useHover/index.cjs +113 -118
- package/dist/cjs/modules/useLayoutEffect/index.cjs +18 -26
- package/dist/cjs/modules/useLocale/index.cjs +33 -43
- package/dist/cjs/modules/useLocale/isLocaleRTL.cjs +66 -76
- package/dist/cjs/modules/useMergeRefs/index.cjs +19 -29
- package/dist/cjs/modules/usePlatformMethods/index.cjs +24 -30
- package/dist/cjs/modules/useStable/index.cjs +24 -32
- package/dist/cjs/styleTypes.cjs +10 -11
- package/dist/cjs/types.cjs +10 -11
- package/dist/esm/StyleSheet/compiler/createReactDOMStyle.mjs +137 -119
- package/dist/esm/StyleSheet/compiler/createReactDOMStyle.mjs.map +1 -1
- package/dist/esm/StyleSheet/compiler/hash.mjs +2 -2
- package/dist/esm/StyleSheet/compiler/hyphenateStyleName.mjs +7 -6
- package/dist/esm/StyleSheet/compiler/hyphenateStyleName.mjs.map +1 -1
- package/dist/esm/StyleSheet/compiler/index.mjs +279 -302
- package/dist/esm/StyleSheet/compiler/index.mjs.map +1 -1
- package/dist/esm/StyleSheet/compiler/normalizeColor.mjs +7 -5
- package/dist/esm/StyleSheet/compiler/normalizeColor.mjs.map +1 -1
- package/dist/esm/StyleSheet/compiler/normalizeValueWithProperty.mjs +19 -17
- package/dist/esm/StyleSheet/compiler/normalizeValueWithProperty.mjs.map +1 -1
- package/dist/esm/StyleSheet/compiler/resolveShadowValue.mjs +14 -20
- package/dist/esm/StyleSheet/compiler/resolveShadowValue.mjs.map +1 -1
- package/dist/esm/StyleSheet/dom/createCSSStyleSheet.mjs +24 -22
- package/dist/esm/StyleSheet/dom/createCSSStyleSheet.mjs.map +1 -1
- package/dist/esm/StyleSheet/dom/createOrderedCSSStyleSheet.mjs +94 -93
- package/dist/esm/StyleSheet/dom/createOrderedCSSStyleSheet.mjs.map +1 -1
- package/dist/esm/StyleSheet/dom/index.mjs +57 -54
- package/dist/esm/StyleSheet/dom/index.mjs.map +1 -1
- package/dist/esm/StyleSheet/index.mjs +18 -17
- package/dist/esm/StyleSheet/index.mjs.map +1 -1
- package/dist/esm/StyleSheet/preprocess.mjs +58 -75
- package/dist/esm/StyleSheet/preprocess.mjs.map +1 -1
- package/dist/esm/StyleSheet/validate.mjs +58 -57
- package/dist/esm/StyleSheet/validate.mjs.map +1 -1
- package/dist/esm/TextAncestorContext.mjs +2 -0
- package/dist/esm/TextAncestorContext.mjs.map +1 -1
- package/dist/esm/colorProps.mjs +11 -10
- package/dist/esm/colorProps.mjs.map +1 -1
- package/dist/esm/index.js +22 -15
- package/dist/esm/index.mjs +22 -15
- package/dist/esm/modules/AccessibilityUtil/index.mjs +5 -3
- package/dist/esm/modules/AccessibilityUtil/index.mjs.map +1 -1
- package/dist/esm/modules/AccessibilityUtil/isDisabled.mjs +2 -1
- package/dist/esm/modules/AccessibilityUtil/isDisabled.mjs.map +1 -1
- package/dist/esm/modules/AccessibilityUtil/propsToAccessibilityComponent.mjs +33 -31
- package/dist/esm/modules/AccessibilityUtil/propsToAccessibilityComponent.mjs.map +1 -1
- package/dist/esm/modules/AccessibilityUtil/propsToAriaRole.mjs +20 -21
- package/dist/esm/modules/AccessibilityUtil/propsToAriaRole.mjs.map +1 -1
- package/dist/esm/modules/AssetRegistry/index.mjs +3 -2
- package/dist/esm/modules/AssetRegistry/index.mjs.map +1 -1
- package/dist/esm/modules/ImageLoader/index.mjs +120 -124
- package/dist/esm/modules/ImageLoader/index.mjs.map +1 -1
- package/dist/esm/modules/InteractionManager.mjs +199 -201
- package/dist/esm/modules/InteractionManager.mjs.map +1 -1
- package/dist/esm/modules/Platform/index.mjs +4 -3
- package/dist/esm/modules/Platform/index.mjs.map +1 -1
- package/dist/esm/modules/TextInputState/index.mjs +42 -40
- package/dist/esm/modules/TextInputState/index.mjs.map +1 -1
- package/dist/esm/modules/UIManager/index.mjs +33 -33
- package/dist/esm/modules/UIManager/index.mjs.map +1 -1
- package/dist/esm/modules/canUseDOM.mjs +1 -0
- package/dist/esm/modules/canUseDOM.mjs.map +1 -1
- package/dist/esm/modules/createDOMProps/index.mjs +275 -341
- package/dist/esm/modules/createDOMProps/index.mjs.map +1 -1
- package/dist/esm/modules/createEventHandle/index.mjs +44 -44
- package/dist/esm/modules/createEventHandle/index.mjs.map +1 -1
- package/dist/esm/modules/dismissKeyboard/index.mjs +3 -1
- package/dist/esm/modules/dismissKeyboard/index.mjs.map +1 -1
- package/dist/esm/modules/forwardedProps/index.mjs +104 -104
- package/dist/esm/modules/forwardedProps/index.mjs.map +1 -1
- package/dist/esm/modules/getBoundingClientRect/index.mjs +8 -7
- package/dist/esm/modules/getBoundingClientRect/index.mjs.map +1 -1
- package/dist/esm/modules/invariant.mjs +11 -10
- package/dist/esm/modules/invariant.mjs.map +1 -1
- package/dist/esm/modules/isSelectionValid/index.mjs +8 -7
- package/dist/esm/modules/isSelectionValid/index.mjs.map +1 -1
- package/dist/esm/modules/isWebColor/index.mjs +2 -1
- package/dist/esm/modules/isWebColor/index.mjs.map +1 -1
- package/dist/esm/modules/mergeRefs/index.mjs +17 -16
- package/dist/esm/modules/mergeRefs/index.mjs.map +1 -1
- package/dist/esm/modules/modality/index.mjs +115 -115
- package/dist/esm/modules/modality/index.mjs.map +1 -1
- package/dist/esm/modules/multiplyStyleLengthValue/index.mjs +11 -10
- package/dist/esm/modules/multiplyStyleLengthValue/index.mjs.map +1 -1
- package/dist/esm/modules/normalizeColor/index.mjs +15 -13
- package/dist/esm/modules/normalizeColor/index.mjs.map +1 -1
- package/dist/esm/modules/pick/index.mjs +10 -9
- package/dist/esm/modules/pick/index.mjs.map +1 -1
- package/dist/esm/modules/processColor/index.mjs +12 -10
- package/dist/esm/modules/processColor/index.mjs.map +1 -1
- package/dist/esm/modules/requestIdleCallback/index.mjs +14 -12
- package/dist/esm/modules/requestIdleCallback/index.mjs.map +1 -1
- package/dist/esm/modules/setValueForStyles/dangerousStyleValue.mjs +27 -25
- package/dist/esm/modules/setValueForStyles/dangerousStyleValue.mjs.map +1 -1
- package/dist/esm/modules/setValueForStyles/index.mjs +18 -16
- package/dist/esm/modules/setValueForStyles/index.mjs.map +1 -1
- package/dist/esm/modules/unitlessNumbers/index.mjs +60 -57
- package/dist/esm/modules/unitlessNumbers/index.mjs.map +1 -1
- package/dist/esm/modules/useElementLayout/index.mjs +12 -14
- package/dist/esm/modules/useElementLayout/index.mjs.map +1 -1
- package/dist/esm/modules/useEvent/index.mjs +28 -26
- package/dist/esm/modules/useEvent/index.mjs.map +1 -1
- package/dist/esm/modules/useHover/index.mjs +101 -101
- package/dist/esm/modules/useHover/index.mjs.map +1 -1
- package/dist/esm/modules/useLayoutEffect/index.mjs +2 -0
- package/dist/esm/modules/useLayoutEffect/index.mjs.map +1 -1
- package/dist/esm/modules/useLocale/index.mjs +15 -17
- package/dist/esm/modules/useLocale/index.mjs.map +1 -1
- package/dist/esm/modules/useLocale/isLocaleRTL.mjs +52 -58
- package/dist/esm/modules/useLocale/isLocaleRTL.mjs.map +1 -1
- package/dist/esm/modules/useMergeRefs/index.mjs +3 -3
- package/dist/esm/modules/useMergeRefs/index.mjs.map +1 -1
- package/dist/esm/modules/usePlatformMethods/index.mjs +11 -12
- package/dist/esm/modules/usePlatformMethods/index.mjs.map +1 -1
- package/dist/esm/modules/useStable/index.mjs +8 -6
- package/dist/esm/modules/useStable/index.mjs.map +1 -1
- package/dist/esm/styleTypes.mjs +0 -2
- package/dist/esm/types.mjs +0 -2
- package/package.json +8 -8
- package/src/modules/createDOMProps/index.tsx +3 -12
- package/src/modules/forwardedProps/index.tsx +0 -1
- package/src/modules/mergeRefs/index.tsx +1 -1
- package/types/StyleSheet/compiler/createReactDOMStyle.d.ts.map +1 -1
- package/types/StyleSheet/compiler/normalizeColor.d.ts.map +1 -1
- package/types/StyleSheet/compiler/resolveShadowValue.d.ts.map +1 -1
- package/types/StyleSheet/index.d.ts +15 -16
- package/types/StyleSheet/index.d.ts.map +1 -1
- package/types/StyleSheet/preprocess.d.ts +1 -1
- package/types/StyleSheet/preprocess.d.ts.map +1 -1
- package/types/colorProps.d.ts.map +1 -1
- package/types/modules/AccessibilityUtil/index.d.ts +6 -5
- package/types/modules/AccessibilityUtil/index.d.ts.map +1 -1
- package/types/modules/AccessibilityUtil/isDisabled.d.ts.map +1 -1
- package/types/modules/AccessibilityUtil/propsToAccessibilityComponent.d.ts.map +1 -1
- package/types/modules/AccessibilityUtil/propsToAriaRole.d.ts.map +1 -1
- package/types/modules/ImageLoader/index.d.ts +1 -1
- package/types/modules/ImageLoader/index.d.ts.map +1 -1
- package/types/modules/InteractionManager.d.ts +3 -3
- package/types/modules/InteractionManager.d.ts.map +1 -1
- package/types/modules/Platform/index.d.ts.map +1 -1
- package/types/modules/TextInputState/index.d.ts.map +1 -1
- package/types/modules/createDOMProps/index.d.ts.map +1 -1
- package/types/modules/forwardedProps/index.d.ts +70 -74
- package/types/modules/forwardedProps/index.d.ts.map +1 -1
- package/types/modules/getBoundingClientRect/index.d.ts.map +1 -1
- package/types/modules/isWebColor/index.d.ts.map +1 -1
- package/types/modules/multiplyStyleLengthValue/index.d.ts.map +1 -1
- package/types/modules/normalizeColor/index.d.ts.map +1 -1
- package/types/modules/processColor/index.d.ts.map +1 -1
- package/types/modules/requestIdleCallback/index.d.ts +3 -1
- package/types/modules/requestIdleCallback/index.d.ts.map +1 -1
- package/types/modules/unitlessNumbers/index.d.ts.map +1 -1
- package/types/modules/useLayoutEffect/index.d.ts +1 -1
- package/types/modules/useLayoutEffect/index.d.ts.map +1 -1
- package/dist/cjs/StyleSheet/__tests__/compiler-createReactDOMStyle-test.cjs +0 -265
- package/dist/cjs/StyleSheet/__tests__/compiler-test.cjs +0 -419
- package/dist/cjs/StyleSheet/__tests__/dom-createOrderedCSSStyleSheet-test.cjs +0 -160
- package/dist/cjs/StyleSheet/__tests__/index-test.cjs +0 -436
- package/dist/cjs/StyleSheet/__tests__/preprocess-test.cjs +0 -121
- package/dist/cjs/StyleSheet/__tests__/validate-test.cjs +0 -51
- package/dist/cjs/modules/AccessibilityUtil/__tests__/propsToAccessibilityComponent-test.cjs +0 -57
- package/dist/cjs/modules/AccessibilityUtil/__tests__/propsToAriaRole-test.cjs +0 -46
- package/dist/cjs/modules/Platform/__tests__/index-test.cjs +0 -56
- package/dist/cjs/modules/UIManager/__tests__/index-test.cjs +0 -111
- package/dist/cjs/modules/createDOMProps/__tests__/index-test.cjs +0 -177
- package/dist/cjs/modules/createEventHandle/__tests__/index-test.cjs +0 -422
- package/dist/cjs/modules/mergeRefs/__tests__/index-test.cjs +0 -48
- package/dist/cjs/modules/modality/__tests__/index-test.cjs +0 -59
- package/dist/cjs/modules/multiplyStyleLengthValue/__tests__/index-test.cjs +0 -38
- package/dist/cjs/modules/processColor/__tests__/index-test.cjs +0 -85
- package/dist/cjs/modules/useEvent/__tests__/index-test.cjs +0 -490
- package/dist/cjs/modules/useHover/__tests__/index-test.cjs +0 -382
- package/dist/cjs/modules/useMergeRefs/__tests__/index-test.cjs +0 -125
- package/dist/cjs/modules/useStable/__tests__/index-test.cjs +0 -122
- package/dist/esm/StyleSheet/__tests__/compiler-createReactDOMStyle-test.mjs +0 -242
- package/dist/esm/StyleSheet/__tests__/compiler-createReactDOMStyle-test.mjs.map +0 -1
- package/dist/esm/StyleSheet/__tests__/compiler-test.mjs +0 -420
- package/dist/esm/StyleSheet/__tests__/compiler-test.mjs.map +0 -1
- package/dist/esm/StyleSheet/__tests__/dom-createOrderedCSSStyleSheet-test.mjs +0 -137
- package/dist/esm/StyleSheet/__tests__/dom-createOrderedCSSStyleSheet-test.mjs.map +0 -1
- package/dist/esm/StyleSheet/__tests__/index-test.mjs +0 -413
- package/dist/esm/StyleSheet/__tests__/index-test.mjs.map +0 -1
- package/dist/esm/StyleSheet/__tests__/preprocess-test.mjs +0 -122
- package/dist/esm/StyleSheet/__tests__/preprocess-test.mjs.map +0 -1
- package/dist/esm/StyleSheet/__tests__/validate-test.mjs +0 -52
- package/dist/esm/StyleSheet/__tests__/validate-test.mjs.map +0 -1
- package/dist/esm/StyleSheet/compiler/hash.mjs.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/modules/AccessibilityUtil/__tests__/propsToAccessibilityComponent-test.mjs +0 -34
- package/dist/esm/modules/AccessibilityUtil/__tests__/propsToAccessibilityComponent-test.mjs.map +0 -1
- package/dist/esm/modules/AccessibilityUtil/__tests__/propsToAriaRole-test.mjs +0 -23
- package/dist/esm/modules/AccessibilityUtil/__tests__/propsToAriaRole-test.mjs.map +0 -1
- package/dist/esm/modules/Platform/__tests__/index-test.mjs +0 -33
- package/dist/esm/modules/Platform/__tests__/index-test.mjs.map +0 -1
- package/dist/esm/modules/UIManager/__tests__/index-test.mjs +0 -88
- package/dist/esm/modules/UIManager/__tests__/index-test.mjs.map +0 -1
- package/dist/esm/modules/createDOMProps/__tests__/index-test.mjs +0 -154
- package/dist/esm/modules/createDOMProps/__tests__/index-test.mjs.map +0 -1
- package/dist/esm/modules/createEventHandle/__tests__/index-test.mjs +0 -399
- package/dist/esm/modules/createEventHandle/__tests__/index-test.mjs.map +0 -1
- package/dist/esm/modules/mergeRefs/__tests__/index-test.mjs +0 -25
- package/dist/esm/modules/mergeRefs/__tests__/index-test.mjs.map +0 -1
- package/dist/esm/modules/modality/__tests__/index-test.mjs +0 -60
- package/dist/esm/modules/modality/__tests__/index-test.mjs.map +0 -1
- package/dist/esm/modules/multiplyStyleLengthValue/__tests__/index-test.mjs +0 -15
- package/dist/esm/modules/multiplyStyleLengthValue/__tests__/index-test.mjs.map +0 -1
- package/dist/esm/modules/processColor/__tests__/index-test.mjs +0 -62
- package/dist/esm/modules/processColor/__tests__/index-test.mjs.map +0 -1
- package/dist/esm/modules/useEvent/__tests__/index-test.mjs +0 -467
- package/dist/esm/modules/useEvent/__tests__/index-test.mjs.map +0 -1
- package/dist/esm/modules/useHover/__tests__/index-test.mjs +0 -359
- package/dist/esm/modules/useHover/__tests__/index-test.mjs.map +0 -1
- package/dist/esm/modules/useMergeRefs/__tests__/index-test.mjs +0 -102
- package/dist/esm/modules/useMergeRefs/__tests__/index-test.mjs.map +0 -1
- package/dist/esm/modules/useStable/__tests__/index-test.mjs +0 -99
- package/dist/esm/modules/useStable/__tests__/index-test.mjs.map +0 -1
- package/dist/esm/styleTypes.mjs.map +0 -1
- package/dist/esm/types.mjs.map +0 -1
- package/src/StyleSheet/__tests__/compiler-createReactDOMStyle-test.tsx +0 -236
- package/src/StyleSheet/__tests__/compiler-test.tsx +0 -426
- package/src/StyleSheet/__tests__/dom-createOrderedCSSStyleSheet-test.tsx +0 -169
- package/src/StyleSheet/__tests__/index-test.tsx +0 -406
- package/src/StyleSheet/__tests__/preprocess-test.tsx +0 -107
- package/src/StyleSheet/__tests__/validate-test.tsx +0 -42
- package/src/modules/AccessibilityUtil/__tests__/propsToAccessibilityComponent-test.tsx +0 -44
- package/src/modules/AccessibilityUtil/__tests__/propsToAriaRole-test.tsx +0 -25
- package/src/modules/Platform/__tests__/index-test.tsx +0 -45
- package/src/modules/UIManager/__tests__/index-test.tsx +0 -87
- package/src/modules/createDOMProps/__tests__/index-test.tsx +0 -138
- package/src/modules/createEventHandle/__tests__/index-test.tsx +0 -459
- package/src/modules/mergeRefs/__tests__/index-test.tsx +0 -32
- package/src/modules/modality/__tests__/index-test.tsx +0 -66
- package/src/modules/multiplyStyleLengthValue/__tests__/index-test.tsx +0 -23
- package/src/modules/processColor/__tests__/index-test.tsx +0 -78
- package/src/modules/useEvent/__tests__/index-test.tsx +0 -511
- package/src/modules/useHover/__tests__/index-test.tsx +0 -342
- package/src/modules/useMergeRefs/__tests__/index-test.tsx +0 -91
- package/src/modules/useStable/__tests__/index-test.tsx +0 -101
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["simpleHash","createReactDOMStyle","hyphenateStyleName","normalizeValueWithProperty","cache","Map","emptyObject","classicGroup","atomicGroup","customGroup","borderColor","borderRadius","borderStyle","borderWidth","display","flex","margin","overflow","overscrollBehavior","padding","marginHorizontal","marginVertical","paddingHorizontal","paddingVertical","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRightColor","borderRightStyle","borderRightWidth","right","marginLeft","marginRight","paddingLeft","paddingRight","left","PROPERTIES_FLIP","PROPERTIES_I18N","borderTopStartRadius","borderTopEndRadius","borderBottomStartRadius","borderBottomEndRadius","borderStartColor","borderStartStyle","borderStartWidth","borderEndColor","borderEndStyle","borderEndWidth","end","marginStart","marginEnd","paddingStart","paddingEnd","start","PROPERTIES_VALUE","atomic","style","compiledStyle","$$css","compiledRules","atomicCompile","prop","value","valueString","stringifyValueWithProperty","cacheKey","cachedResult","get","identifier","push","createIdentifier","order","rules","createAtomicRules","orderedRules","set","Object","keys","sort","forEach","localizeableValue","indexOf","left2","right2","propPolyfill","ltr","rtl","values","Array","isArray","polyfillIndices","i","length","val","ltrPolyfillValues","rtlPolyfillValues","ltrVal","ltrPolyfill","rtlPolyfill","classic","name","animationKeyframes","rest","selector","animationName","animationNames","keyframesRules","processKeyframesValue","join","block","createDeclarationBlock","inline","originalStyle","isRTL","frozenProps","nextStyle","originalProp","originalValue","prototype","hasOwnProperty","call","originalValues","valuePolyfill","property","normalizedValue","JSON","stringify","color","opacity","finalValue","pointerEvents","scrollbarWidth","domStyle","declarationsString","map","v","prefix","hashedString","process","env","NODE_ENV","createKeyframes","keyframes","prefixes","steps","stepName","rule","keyframesValue","Error"],"sources":["../../../../src/StyleSheet/compiler/index.tsx"],"sourcesContent":[null],"mappings":"AAUA,SAASA,UAAA,QAAkB;AAE3B,SAASC,mBAAA,QAA2B;AACpC,SAASC,kBAAA,QAA0B;AACnC,SAASC,0BAAA,QAAkC;AAkB3C,MAAMC,KAAA,GAAQ,mBAAIC,GAAA,CAAI;AACtB,MAAMC,WAAA,GAAc,CAAC;AAErB,MAAMC,YAAA,GAAe;AACrB,MAAMC,WAAA,GAAc;AACpB,MAAMC,WAAA,GAEF;EACFC,WAAA,EAAa;EACbC,YAAA,EAAc;EACdC,WAAA,EAAa;EACbC,WAAA,EAAa;EACbC,OAAA,EAAS;EACTC,IAAA,EAAM;EACNC,MAAA,EAAQ;EACRC,QAAA,EAAU;EACVC,kBAAA,EAAoB;EACpBC,OAAA,EAAS;EACTC,gBAAA,EAAkB;EAClBC,cAAA,EAAgB;EAChBC,iBAAA,EAAmB;EACnBC,eAAA,EAAiB;AACnB;AAEA,MAAMC,mBAAA,GAAsB;AAC5B,MAAMC,oBAAA,GAAuB;AAC7B,MAAMC,sBAAA,GAAyB;AAC/B,MAAMC,uBAAA,GAA0B;AAChC,MAAMC,eAAA,GAAkB;AACxB,MAAMC,eAAA,GAAkB;AACxB,MAAMC,eAAA,GAAkB;AACxB,MAAMC,gBAAA,GAAmB;AACzB,MAAMC,gBAAA,GAAmB;AACzB,MAAMC,gBAAA,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/StyleSheet/compiler/index.js"],"sourcesContent":["import { simpleHash } from \"@tamagui/simple-hash\";\nimport { createReactDOMStyle } from \"./createReactDOMStyle\";\nimport { hyphenateStyleName } from \"./hyphenateStyleName\";\nimport { normalizeValueWithProperty } from \"./normalizeValueWithProperty\";\nconst cache = /* @__PURE__ */ new Map();\nconst emptyObject = {};\nconst classicGroup = 1;\nconst atomicGroup = 2.2;\nconst customGroup = {\n borderColor: 2,\n borderRadius: 2,\n borderStyle: 2,\n borderWidth: 2,\n display: 2,\n flex: 2,\n margin: 2,\n overflow: 2,\n overscrollBehavior: 2,\n padding: 2,\n marginHorizontal: 2.1,\n marginVertical: 2.1,\n paddingHorizontal: 2.1,\n paddingVertical: 2.1\n};\nconst borderTopLeftRadius = \"borderTopLeftRadius\";\nconst borderTopRightRadius = \"borderTopRightRadius\";\nconst borderBottomLeftRadius = \"borderBottomLeftRadius\";\nconst borderBottomRightRadius = \"borderBottomRightRadius\";\nconst borderLeftColor = \"borderLeftColor\";\nconst borderLeftStyle = \"borderLeftStyle\";\nconst borderLeftWidth = \"borderLeftWidth\";\nconst borderRightColor = \"borderRightColor\";\nconst borderRightStyle = \"borderRightStyle\";\nconst borderRightWidth = \"borderRightWidth\";\nconst right = \"right\";\nconst marginLeft = \"marginLeft\";\nconst marginRight = \"marginRight\";\nconst paddingLeft = \"paddingLeft\";\nconst paddingRight = \"paddingRight\";\nconst left = \"left\";\nconst PROPERTIES_FLIP = {\n [borderTopLeftRadius]: borderTopRightRadius,\n [borderTopRightRadius]: borderTopLeftRadius,\n [borderBottomLeftRadius]: borderBottomRightRadius,\n [borderBottomRightRadius]: borderBottomLeftRadius,\n [borderLeftColor]: borderRightColor,\n [borderLeftStyle]: borderRightStyle,\n [borderLeftWidth]: borderRightWidth,\n [borderRightColor]: borderLeftColor,\n [borderRightStyle]: borderLeftStyle,\n [borderRightWidth]: borderLeftWidth,\n [left]: right,\n [marginLeft]: marginRight,\n [marginRight]: marginLeft,\n [paddingLeft]: paddingRight,\n [paddingRight]: paddingLeft,\n [right]: left\n};\nconst PROPERTIES_I18N = {\n borderTopStartRadius: borderTopLeftRadius,\n borderTopEndRadius: borderTopRightRadius,\n borderBottomStartRadius: borderBottomLeftRadius,\n borderBottomEndRadius: borderBottomRightRadius,\n borderStartColor: borderLeftColor,\n borderStartStyle: borderLeftStyle,\n borderStartWidth: borderLeftWidth,\n borderEndColor: borderRightColor,\n borderEndStyle: borderRightStyle,\n borderEndWidth: borderRightWidth,\n end: right,\n marginStart: marginLeft,\n marginEnd: marginRight,\n paddingStart: paddingLeft,\n paddingEnd: paddingRight,\n start: left\n};\nconst PROPERTIES_VALUE = [\"clear\", \"float\", \"textAlign\"];\nfunction atomic(style) {\n const compiledStyle = { $$css: true };\n const compiledRules = [];\n function atomicCompile(prop, value) {\n const valueString = stringifyValueWithProperty(value, prop);\n const cacheKey = prop + valueString;\n const cachedResult = cache.get(cacheKey);\n let identifier;\n if (cachedResult != null) {\n identifier = cachedResult[0];\n compiledRules.push(cachedResult[1]);\n } else {\n identifier = createIdentifier(\"r\", prop, value);\n const order = customGroup[prop] || atomicGroup;\n const rules = createAtomicRules(identifier, prop, value);\n const orderedRules = [rules, order];\n compiledRules.push(orderedRules);\n cache.set(cacheKey, [identifier, orderedRules]);\n }\n return identifier;\n }\n Object.keys(style).sort().forEach((prop) => {\n const value = style[prop];\n if (value != null) {\n let localizeableValue;\n if (PROPERTIES_VALUE.indexOf(prop) > -1) {\n const left2 = atomicCompile(prop, \"left\");\n const right2 = atomicCompile(prop, \"right\");\n if (value === \"start\") {\n localizeableValue = [left2, right2];\n } else if (value === \"end\") {\n localizeableValue = [right2, left2];\n }\n }\n const propPolyfill = PROPERTIES_I18N[prop];\n if (propPolyfill != null) {\n const ltr = atomicCompile(propPolyfill, value);\n const rtl = atomicCompile(PROPERTIES_FLIP[propPolyfill], value);\n localizeableValue = [ltr, rtl];\n }\n if (prop === \"transitionProperty\") {\n const values = Array.isArray(value) ? value : [value];\n const polyfillIndices = [];\n for (let i = 0; i < values.length; i++) {\n const val = values[i];\n if (typeof val === \"string\" && PROPERTIES_I18N[val] != null) {\n polyfillIndices.push(i);\n }\n }\n if (polyfillIndices.length > 0) {\n const ltrPolyfillValues = [...values];\n const rtlPolyfillValues = [...values];\n polyfillIndices.forEach((i) => {\n const ltrVal = ltrPolyfillValues[i];\n if (typeof ltrVal === \"string\") {\n const ltrPolyfill = PROPERTIES_I18N[ltrVal];\n const rtlPolyfill = PROPERTIES_FLIP[ltrPolyfill];\n ltrPolyfillValues[i] = ltrPolyfill;\n rtlPolyfillValues[i] = rtlPolyfill;\n const ltr = atomicCompile(prop, ltrPolyfillValues);\n const rtl = atomicCompile(prop, rtlPolyfillValues);\n localizeableValue = [ltr, rtl];\n }\n });\n }\n }\n if (localizeableValue == null) {\n localizeableValue = atomicCompile(prop, value);\n } else {\n compiledStyle[\"$$css$localize\"] = true;\n }\n compiledStyle[prop] = localizeableValue;\n }\n });\n return [compiledStyle, compiledRules];\n}\nfunction classic(style, name) {\n const compiledStyle = { $$css: true };\n const compiledRules = [];\n const { animationKeyframes, ...rest } = style;\n const identifier = createIdentifier(\"css\", name, style);\n const selector = `.${identifier}`;\n let animationName;\n if (animationKeyframes != null) {\n const [animationNames, keyframesRules] = processKeyframesValue(animationKeyframes);\n animationName = animationNames.join(\",\");\n compiledRules.push(...keyframesRules);\n }\n const block = createDeclarationBlock({ ...rest, animationName });\n compiledRules.push(`${selector}${block}`);\n compiledStyle[identifier] = identifier;\n return [compiledStyle, [[compiledRules, classicGroup]]];\n}\nfunction inline(originalStyle, isRTL) {\n const style = originalStyle || emptyObject;\n const frozenProps = {};\n const nextStyle = {};\n for (const originalProp in style) {\n const originalValue = style[originalProp];\n let prop = originalProp;\n let value = originalValue;\n if (!Object.prototype.hasOwnProperty.call(style, originalProp) || originalValue == null) {\n continue;\n }\n if (PROPERTIES_VALUE.indexOf(originalProp) > -1) {\n if (originalValue === \"start\") {\n value = isRTL ? \"right\" : \"left\";\n } else if (originalValue === \"end\") {\n value = isRTL ? \"left\" : \"right\";\n }\n }\n const propPolyfill = PROPERTIES_I18N[originalProp];\n if (propPolyfill != null) {\n prop = isRTL ? PROPERTIES_FLIP[propPolyfill] : propPolyfill;\n }\n if (originalProp === \"transitionProperty\") {\n const originalValues = Array.isArray(originalValue) ? originalValue : [originalValue];\n originalValues.forEach((val, i) => {\n if (typeof val === \"string\") {\n const valuePolyfill = PROPERTIES_I18N[val];\n if (valuePolyfill != null) {\n originalValues[i] = isRTL ? PROPERTIES_FLIP[valuePolyfill] : valuePolyfill;\n }\n }\n });\n }\n if (!frozenProps[prop]) {\n nextStyle[prop] = value;\n }\n if (PROPERTIES_I18N.hasOwnProperty(originalProp)) {\n frozenProps[prop] = true;\n }\n }\n return createReactDOMStyle(nextStyle, true);\n}\nfunction stringifyValueWithProperty(value, property) {\n const normalizedValue = normalizeValueWithProperty(value, property);\n return typeof normalizedValue !== \"string\" ? JSON.stringify(normalizedValue || \"\") : normalizedValue;\n}\nfunction createAtomicRules(identifier, property, value) {\n const rules = [];\n const selector = `.${identifier}`;\n switch (property) {\n case \"animationKeyframes\": {\n const [animationNames, keyframesRules] = processKeyframesValue(value);\n const block = createDeclarationBlock({\n animationName: animationNames.join(\",\")\n });\n rules.push(`${selector}${block}`, ...keyframesRules);\n break;\n }\n // Equivalent to using '::placeholder'\n case \"placeholderTextColor\": {\n const block = createDeclarationBlock({ color: value, opacity: 1 });\n rules.push(\n `${selector}::-webkit-input-placeholder${block}`,\n `${selector}::-moz-placeholder${block}`,\n `${selector}:-ms-input-placeholder${block}`,\n `${selector}::placeholder${block}`\n );\n break;\n }\n // Polyfill for additional 'pointer-events' values\n // See d13f78622b233a0afc0c7a200c0a0792c8ca9e58\n case \"pointerEvents\": {\n let finalValue = value;\n if (value === \"auto\" || value === \"box-only\") {\n finalValue = \"auto!important\";\n if (value === \"box-only\") {\n const block2 = createDeclarationBlock({ pointerEvents: \"none\" });\n rules.push(`${selector}>*${block2}`);\n }\n } else if (value === \"none\" || value === \"box-none\") {\n finalValue = \"none!important\";\n if (value === \"box-none\") {\n const block2 = createDeclarationBlock({ pointerEvents: \"auto\" });\n rules.push(`${selector}>*${block2}`);\n }\n }\n const block = createDeclarationBlock({ pointerEvents: finalValue });\n rules.push(`${selector}${block}`);\n break;\n }\n // Polyfill for draft spec\n // https://drafts.csswg.org/css-scrollbars-1/\n case \"scrollbarWidth\": {\n if (value === \"none\") {\n rules.push(`${selector}::-webkit-scrollbar{display:none}`);\n }\n const block = createDeclarationBlock({ scrollbarWidth: value });\n rules.push(`${selector}${block}`);\n break;\n }\n default: {\n const block = createDeclarationBlock({ [property]: value });\n rules.push(`${selector}${block}`);\n break;\n }\n }\n return rules;\n}\nfunction createDeclarationBlock(style) {\n const domStyle = createReactDOMStyle(style);\n const declarationsString = Object.keys(domStyle).map((property) => {\n const value = domStyle[property];\n const prop = hyphenateStyleName(property);\n if (Array.isArray(value)) {\n return value.map((v) => `${prop}:${v}`).join(\";\");\n } else {\n return `${prop}:${value}`;\n }\n }).sort().join(\";\");\n return `{${declarationsString};}`;\n}\nfunction createIdentifier(prefix, name, value) {\n const hashedString = simpleHash(name + stringifyValueWithProperty(value, name));\n return process.env.NODE_ENV !== \"production\" ? `${prefix}-${name}-${hashedString}` : `${prefix}-${hashedString}`;\n}\nfunction createKeyframes(keyframes) {\n const prefixes = [\"-webkit-\", \"\"];\n const identifier = createIdentifier(\"r\", \"animation\", keyframes);\n const steps = \"{\" + Object.keys(keyframes).map((stepName) => {\n const rule = keyframes[stepName];\n const block = createDeclarationBlock(rule);\n return `${stepName}${block}`;\n }).join(\"\") + \"}\";\n const rules = prefixes.map((prefix) => {\n return `@${prefix}keyframes ${identifier}${steps}`;\n });\n return [identifier, rules];\n}\nfunction processKeyframesValue(keyframesValue) {\n if (typeof keyframesValue === \"number\") {\n throw new Error(`Invalid CSS keyframes type: ${typeof keyframesValue}`);\n }\n const animationNames = [];\n const rules = [];\n const value = Array.isArray(keyframesValue) ? keyframesValue : [keyframesValue];\n value.forEach((keyframes) => {\n if (typeof keyframes === \"string\") {\n animationNames.push(keyframes);\n } else {\n const [identifier, keyframesRules] = createKeyframes(keyframes);\n animationNames.push(identifier);\n rules.push(...keyframesRules);\n }\n });\n return [animationNames, rules];\n}\nexport {\n atomic,\n classic,\n inline,\n stringifyValueWithProperty\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;;;AAIA,MAAM,wBAAwB,IAAI,IAAI;AACtC,MAAM,cAAc,CAAC;AACrB,MAAM,eAAe;AACrB,MAAM,cAAc;AACpB,MAAM,cAAc;CAClB,aAAa;CACb,cAAc;CACd,aAAa;CACb,aAAa;CACb,SAAS;CACT,MAAM;CACN,QAAQ;CACR,UAAU;CACV,oBAAoB;CACpB,SAAS;CACT,kBAAkB;CAClB,gBAAgB;CAChB,mBAAmB;CACnB,iBAAiB;AACnB;AACA,MAAM,sBAAsB;AAC5B,MAAM,uBAAuB;AAC7B,MAAM,yBAAyB;AAC/B,MAAM,0BAA0B;AAChC,MAAM,kBAAkB;AACxB,MAAM,kBAAkB;AACxB,MAAM,kBAAkB;AACxB,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;AACzB,MAAM,QAAQ;AACd,MAAM,aAAa;AACnB,MAAM,cAAc;AACpB,MAAM,cAAc;AACpB,MAAM,eAAe;AACrB,MAAM,OAAO;AACb,MAAM,kBAAkB;EACrB,sBAAsB;EACtB,uBAAuB;EACvB,yBAAyB;EACzB,0BAA0B;EAC1B,kBAAkB;EAClB,kBAAkB;EAClB,kBAAkB;EAClB,mBAAmB;EACnB,mBAAmB;EACnB,mBAAmB;EACnB,OAAO;EACP,aAAa;EACb,cAAc;EACd,cAAc;EACd,eAAe;EACf,QAAQ;AACX;AACA,MAAM,kBAAkB;CACtB,sBAAsB;CACtB,oBAAoB;CACpB,yBAAyB;CACzB,uBAAuB;CACvB,kBAAkB;CAClB,kBAAkB;CAClB,kBAAkB;CAClB,gBAAgB;CAChB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C3B;AACA,SAAS,sBAAsB,gBAAgB;CAC7C,IAAI,OAAO,mBAAmB,UAAU;EACtC,MAAM,IAAI,MAAM,+BAA+B,OAAO,gBAAgB;CACxE;CACA,MAAM,iBAAiB,CAAC;CACxB,MAAM,QAAQ,CAAC;CACf,MAAM,QAAQ,MAAM,QAAQ,cAAc,IAAI,iBAAiB,CAAC,cAAc;CAC9E,MAAM,SAAS,cAAc;EAC3B,IAAI,OAAO,cAAc,UAAU;GACjC,eAAe,KAAK,SAAS;EAC/B,OAAO;GACL,MAAM,CAAC,YAAY,kBAAkB,gBAAgB,SAAS;GAC9D,eAAe,KAAK,UAAU;GAC9B,MAAM,KAAK,GAAG,cAAc;EAC9B;CACF,CAAC;CACD,OAAO,CAAC,gBAAgB,KAAK;AAC/B"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { isWebColor } from "../../modules/isWebColor/index.mjs";
|
|
2
2
|
import { processColor } from "../../modules/processColor/index.mjs";
|
|
3
|
+
|
|
3
4
|
const normalizeColor = (color, opacity = 1) => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
if (color == null) return;
|
|
6
|
+
if (typeof color === "string" && isWebColor(color)) return color;
|
|
7
|
+
const colorInt = processColor(color);
|
|
8
|
+
if (colorInt != null) return `rgba(${colorInt >> 16 & 255},${colorInt >> 8 & 255},${colorInt & 255},${((colorInt >> 24 & 255) / 255 * opacity).toFixed(2)})`;
|
|
9
|
+
if (typeof color === "string") return color;
|
|
9
10
|
};
|
|
11
|
+
|
|
10
12
|
export { normalizeColor };
|
|
11
13
|
//# sourceMappingURL=normalizeColor.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"normalizeColor.js","names":[],"sources":["esm/StyleSheet/compiler/normalizeColor.js"],"sourcesContent":["import { isWebColor } from \"../../modules/isWebColor\";\nimport { processColor } from \"../../modules/processColor\";\n\nconst normalizeColor = (color, opacity = 1) => {\n\tif (color == null) return;\n\tif (typeof color === \"string\" && isWebColor(color)) return color;\n\tconst colorInt = processColor(color);\n\tif (colorInt != null) return `rgba(${colorInt >> 16 & 255},${colorInt >> 8 & 255},${colorInt & 255},${((colorInt >> 24 & 255) / 255 * opacity).toFixed(2)})`;\n\tif (typeof color === \"string\") return color;\n};\n\nexport { normalizeColor };"],"mappings":";;;;AAGA,MAAM,kBAAkB,OAAO,UAAU,MAAM;CAC9C,IAAI,SAAS,MAAM;CACnB,IAAI,OAAO,UAAU,YAAY,WAAW,KAAK,GAAG,OAAO;CAC3D,MAAM,WAAW,aAAa,KAAK;CACnC,IAAI,YAAY,MAAM,OAAO,QAAQ,YAAY,KAAK,IAAI,GAAG,YAAY,IAAI,IAAI,GAAG,WAAW,IAAI,KAAK,YAAY,KAAK,OAAO,MAAM,SAAS,QAAQ,CAAC,EAAE;CAC1J,IAAI,OAAO,UAAU,UAAU,OAAO;AACvC"}
|
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
import { unitlessNumbers } from "../../modules/unitlessNumbers/index.mjs";
|
|
2
2
|
import { normalizeColor } from "./normalizeColor.mjs";
|
|
3
|
+
|
|
3
4
|
const colorProps = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
backgroundColor: true,
|
|
6
|
+
borderColor: true,
|
|
7
|
+
borderTopColor: true,
|
|
8
|
+
borderRightColor: true,
|
|
9
|
+
borderBottomColor: true,
|
|
10
|
+
borderLeftColor: true,
|
|
11
|
+
color: true,
|
|
12
|
+
shadowColor: true,
|
|
13
|
+
textDecorationColor: true,
|
|
14
|
+
textShadowColor: true
|
|
14
15
|
};
|
|
15
16
|
function normalizeValueWithProperty(value, property) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
let returnValue = value;
|
|
18
|
+
if ((property == null || !unitlessNumbers[property]) && typeof value === "number") {
|
|
19
|
+
returnValue = `${value}px`;
|
|
20
|
+
} else if (property != null && colorProps[property]) {
|
|
21
|
+
returnValue = normalizeColor(value);
|
|
22
|
+
}
|
|
23
|
+
return returnValue;
|
|
23
24
|
}
|
|
25
|
+
|
|
24
26
|
export { normalizeValueWithProperty };
|
|
25
27
|
//# sourceMappingURL=normalizeValueWithProperty.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"normalizeValueWithProperty.js","names":[],"sources":["esm/StyleSheet/compiler/normalizeValueWithProperty.js"],"sourcesContent":["import { unitlessNumbers } from \"../../modules/unitlessNumbers/index\";\nimport { normalizeColor } from \"./normalizeColor\";\nconst colorProps = {\n backgroundColor: true,\n borderColor: true,\n borderTopColor: true,\n borderRightColor: true,\n borderBottomColor: true,\n borderLeftColor: true,\n color: true,\n shadowColor: true,\n textDecorationColor: true,\n textShadowColor: true\n};\nfunction normalizeValueWithProperty(value, property) {\n let returnValue = value;\n if ((property == null || !unitlessNumbers[property]) && typeof value === \"number\") {\n returnValue = `${value}px`;\n } else if (property != null && colorProps[property]) {\n returnValue = normalizeColor(value);\n }\n return returnValue;\n}\nexport {\n normalizeValueWithProperty\n};\n//# sourceMappingURL=normalizeValueWithProperty.js.map\n"],"mappings":";;;;AAEA,MAAM,aAAa;CACjB,iBAAiB;CACjB,aAAa;CACb,gBAAgB;CAChB,kBAAkB;CAClB,mBAAmB;CACnB,iBAAiB;CACjB,OAAO;CACP,aAAa;CACb,qBAAqB;CACrB,iBAAiB;AACnB;AACA,SAAS,2BAA2B,OAAO,UAAU;CACnD,IAAI,cAAc;CAClB,KAAK,YAAY,QAAQ,CAAC,gBAAgB,cAAc,OAAO,UAAU,UAAU;EACjF,cAAc,GAAG,MAAM;CACzB,OAAO,IAAI,YAAY,QAAQ,WAAW,WAAW;EACnD,cAAc,eAAe,KAAK;CACpC;CACA,OAAO;AACT"}
|
|
@@ -1,27 +1,21 @@
|
|
|
1
1
|
import { normalizeColor } from "./normalizeColor.mjs";
|
|
2
2
|
import { normalizeValueWithProperty } from "./normalizeValueWithProperty.mjs";
|
|
3
|
+
|
|
3
4
|
const defaultOffset = {
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
height: 0,
|
|
6
|
+
width: 0
|
|
6
7
|
};
|
|
7
|
-
const resolveShadowValue = style => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} = shadowOffset || defaultOffset;
|
|
18
|
-
const offsetX = normalizeValueWithProperty(width);
|
|
19
|
-
const offsetY = normalizeValueWithProperty(height);
|
|
20
|
-
const blurRadius = normalizeValueWithProperty(shadowRadius || 0);
|
|
21
|
-
const color = normalizeColor(shadowColor || "black", shadowOpacity);
|
|
22
|
-
if (color != null && offsetX != null && offsetY != null && blurRadius != null) {
|
|
23
|
-
return `${offsetX} ${offsetY} ${blurRadius} ${color}`;
|
|
24
|
-
}
|
|
8
|
+
const resolveShadowValue = (style) => {
|
|
9
|
+
const { shadowColor, shadowOffset, shadowOpacity, shadowRadius } = style;
|
|
10
|
+
const { height, width } = shadowOffset || defaultOffset;
|
|
11
|
+
const offsetX = normalizeValueWithProperty(width);
|
|
12
|
+
const offsetY = normalizeValueWithProperty(height);
|
|
13
|
+
const blurRadius = normalizeValueWithProperty(shadowRadius || 0);
|
|
14
|
+
const color = normalizeColor(shadowColor || "black", shadowOpacity);
|
|
15
|
+
if (color != null && offsetX != null && offsetY != null && blurRadius != null) {
|
|
16
|
+
return `${offsetX} ${offsetY} ${blurRadius} ${color}`;
|
|
17
|
+
}
|
|
25
18
|
};
|
|
19
|
+
|
|
26
20
|
export { resolveShadowValue };
|
|
27
21
|
//# sourceMappingURL=resolveShadowValue.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"resolveShadowValue.js","names":[],"sources":["esm/StyleSheet/compiler/resolveShadowValue.js"],"sourcesContent":["import { normalizeColor } from \"./normalizeColor\";\nimport { normalizeValueWithProperty } from \"./normalizeValueWithProperty\";\nconst defaultOffset = { height: 0, width: 0 };\nconst resolveShadowValue = (style) => {\n const { shadowColor, shadowOffset, shadowOpacity, shadowRadius } = style;\n const { height, width } = shadowOffset || defaultOffset;\n const offsetX = normalizeValueWithProperty(width);\n const offsetY = normalizeValueWithProperty(height);\n const blurRadius = normalizeValueWithProperty(shadowRadius || 0);\n const color = normalizeColor(shadowColor || \"black\", shadowOpacity);\n if (color != null && offsetX != null && offsetY != null && blurRadius != null) {\n return `${offsetX} ${offsetY} ${blurRadius} ${color}`;\n }\n};\nexport {\n resolveShadowValue\n};\n//# sourceMappingURL=resolveShadowValue.js.map\n"],"mappings":";;;;AAEA,MAAM,gBAAgB;CAAE,QAAQ;CAAG,OAAO;AAAE;AAC5C,MAAM,sBAAsB,UAAU;CACpC,MAAM,EAAE,aAAa,cAAc,eAAe,iBAAiB;CACnE,MAAM,EAAE,QAAQ,UAAU,gBAAgB;CAC1C,MAAM,UAAU,2BAA2B,KAAK;CAChD,MAAM,UAAU,2BAA2B,MAAM;CACjD,MAAM,aAAa,2BAA2B,gBAAgB,CAAC;CAC/D,MAAM,QAAQ,eAAe,eAAe,SAAS,aAAa;CAClE,IAAI,SAAS,QAAQ,WAAW,QAAQ,WAAW,QAAQ,cAAc,MAAM;EAC7E,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,GAAG;CAChD;AACF"}
|
|
@@ -1,27 +1,29 @@
|
|
|
1
1
|
import { canUseDOM } from "../../modules/canUseDOM.mjs";
|
|
2
|
+
|
|
2
3
|
function createCSSStyleSheet(id, rootNode, textContent) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
4
|
+
if (canUseDOM) {
|
|
5
|
+
const root = rootNode != null ? rootNode : document;
|
|
6
|
+
let element = root.getElementById(id);
|
|
7
|
+
if (element == null) {
|
|
8
|
+
element = document.createElement("style");
|
|
9
|
+
element.setAttribute("id", id);
|
|
10
|
+
if (typeof textContent === "string") {
|
|
11
|
+
element.appendChild(document.createTextNode(textContent));
|
|
12
|
+
}
|
|
13
|
+
if (root instanceof ShadowRoot) {
|
|
14
|
+
root.insertBefore(element, root.firstChild);
|
|
15
|
+
} else {
|
|
16
|
+
const head = root.head;
|
|
17
|
+
if (head) {
|
|
18
|
+
head.appendChild(element);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return element.sheet;
|
|
23
|
+
} else {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
25
26
|
}
|
|
27
|
+
|
|
26
28
|
export { createCSSStyleSheet };
|
|
27
29
|
//# sourceMappingURL=createCSSStyleSheet.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"createCSSStyleSheet.js","names":[],"sources":["esm/StyleSheet/dom/createCSSStyleSheet.js"],"sourcesContent":["import { canUseDOM } from \"../../modules/canUseDOM\";\nfunction createCSSStyleSheet(id, rootNode, textContent) {\n if (canUseDOM) {\n const root = rootNode != null ? rootNode : document;\n let element = root.getElementById(id);\n if (element == null) {\n element = document.createElement(\"style\");\n element.setAttribute(\"id\", id);\n if (typeof textContent === \"string\") {\n element.appendChild(document.createTextNode(textContent));\n }\n if (root instanceof ShadowRoot) {\n root.insertBefore(element, root.firstChild);\n } else {\n const head = root.head;\n if (head) {\n head.appendChild(element);\n }\n }\n }\n return element.sheet;\n } else {\n return null;\n }\n}\nexport {\n createCSSStyleSheet\n};\n//# sourceMappingURL=createCSSStyleSheet.js.map\n"],"mappings":";;;AACA,SAAS,oBAAoB,IAAI,UAAU,aAAa;CACtD,IAAI,WAAW;EACb,MAAM,OAAO,YAAY,OAAO,WAAW;EAC3C,IAAI,UAAU,KAAK,eAAe,EAAE;EACpC,IAAI,WAAW,MAAM;GACnB,UAAU,SAAS,cAAc,OAAO;GACxC,QAAQ,aAAa,MAAM,EAAE;GAC7B,IAAI,OAAO,gBAAgB,UAAU;IACnC,QAAQ,YAAY,SAAS,eAAe,WAAW,CAAC;GAC1D;GACA,IAAI,gBAAgB,YAAY;IAC9B,KAAK,aAAa,SAAS,KAAK,UAAU;GAC5C,OAAO;IACL,MAAM,OAAO,KAAK;IAClB,IAAI,MAAM;KACR,KAAK,YAAY,OAAO;IAC1B;GACF;EACF;EACA,OAAO,QAAQ;CACjB,OAAO;EACL,OAAO;CACT;AACF"}
|
|
@@ -1,110 +1,111 @@
|
|
|
1
1
|
const slice = Array.prototype.slice;
|
|
2
2
|
function createOrderedCSSStyleSheet(sheet) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
3
|
+
const groups = {};
|
|
4
|
+
const selectors = {};
|
|
5
|
+
if (sheet != null) {
|
|
6
|
+
let group;
|
|
7
|
+
slice.call(sheet.cssRules).forEach((cssRule, i) => {
|
|
8
|
+
const cssText = cssRule.cssText;
|
|
9
|
+
if (cssText.indexOf("stylesheet-group") > -1) {
|
|
10
|
+
group = decodeGroupRule(cssRule);
|
|
11
|
+
groups[group] = {
|
|
12
|
+
start: i,
|
|
13
|
+
rules: [cssText]
|
|
14
|
+
};
|
|
15
|
+
} else {
|
|
16
|
+
const selectorText = getSelectorText(cssText);
|
|
17
|
+
if (selectorText != null) {
|
|
18
|
+
selectors[selectorText] = true;
|
|
19
|
+
groups[group].rules.push(cssText);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function sheetInsert(sheet2, group, text) {
|
|
25
|
+
const orderedGroups = getOrderedGroups(groups);
|
|
26
|
+
const groupIndex = orderedGroups.indexOf(group);
|
|
27
|
+
const nextGroupIndex = groupIndex + 1;
|
|
28
|
+
const nextGroup = orderedGroups[nextGroupIndex];
|
|
29
|
+
const position = nextGroup != null && groups[nextGroup].start != null ? groups[nextGroup].start : sheet2.cssRules.length;
|
|
30
|
+
const isInserted = insertRuleAt(sheet2, text, position);
|
|
31
|
+
if (isInserted) {
|
|
32
|
+
if (groups[group].start == null) {
|
|
33
|
+
groups[group].start = position;
|
|
34
|
+
}
|
|
35
|
+
for (let i = nextGroupIndex; i < orderedGroups.length; i += 1) {
|
|
36
|
+
const groupNumber = orderedGroups[i];
|
|
37
|
+
const previousStart = groups[groupNumber].start || 0;
|
|
38
|
+
groups[groupNumber].start = previousStart + 1;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return isInserted;
|
|
42
|
+
}
|
|
43
|
+
const OrderedCSSStyleSheet = {
|
|
44
|
+
/**
|
|
45
|
+
* The textContent of the style sheet.
|
|
46
|
+
*/
|
|
47
|
+
getTextContent() {
|
|
48
|
+
return getOrderedGroups(groups).map((group) => {
|
|
49
|
+
const rules = groups[group].rules;
|
|
50
|
+
const marker = rules.shift();
|
|
51
|
+
rules.sort();
|
|
52
|
+
rules.unshift(marker);
|
|
53
|
+
return rules.join("\n");
|
|
54
|
+
}).join("\n");
|
|
55
|
+
},
|
|
56
|
+
/**
|
|
57
|
+
* Insert a rule into the style sheet
|
|
58
|
+
*/
|
|
59
|
+
insert(cssText, groupValue) {
|
|
60
|
+
const group = Number(groupValue);
|
|
61
|
+
if (groups[group] == null) {
|
|
62
|
+
const markerRule = encodeGroupRule(group);
|
|
63
|
+
groups[group] = {
|
|
64
|
+
start: null,
|
|
65
|
+
rules: [markerRule]
|
|
66
|
+
};
|
|
67
|
+
if (sheet != null) {
|
|
68
|
+
sheetInsert(sheet, group, markerRule);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
const selectorText = getSelectorText(cssText);
|
|
72
|
+
if (selectorText != null && selectors[selectorText] == null) {
|
|
73
|
+
selectors[selectorText] = true;
|
|
74
|
+
groups[group].rules.push(cssText);
|
|
75
|
+
if (sheet != null) {
|
|
76
|
+
const isInserted = sheetInsert(sheet, group, cssText);
|
|
77
|
+
if (!isInserted) {
|
|
78
|
+
groups[group].rules.pop();
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
return OrderedCSSStyleSheet;
|
|
85
85
|
}
|
|
86
86
|
function encodeGroupRule(group) {
|
|
87
|
-
|
|
87
|
+
return `[stylesheet-group="${group}"]{}`;
|
|
88
88
|
}
|
|
89
89
|
const groupPattern = /["']/g;
|
|
90
90
|
function decodeGroupRule(cssRule) {
|
|
91
|
-
|
|
91
|
+
return Number(cssRule.selectorText.split(groupPattern)[1]);
|
|
92
92
|
}
|
|
93
93
|
function getOrderedGroups(obj) {
|
|
94
|
-
|
|
94
|
+
return Object.keys(obj).map(Number).sort((a, b) => a > b ? 1 : -1);
|
|
95
95
|
}
|
|
96
96
|
const selectorPattern = /\s*([,])\s*/g;
|
|
97
97
|
function getSelectorText(cssText) {
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
const selector = cssText.split("{")[0].trim();
|
|
99
|
+
return selector !== "" ? selector.replace(selectorPattern, "$1") : null;
|
|
100
100
|
}
|
|
101
101
|
function insertRuleAt(root, cssText, position) {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
102
|
+
try {
|
|
103
|
+
root.insertRule(cssText, position);
|
|
104
|
+
return true;
|
|
105
|
+
} catch (e) {
|
|
106
|
+
return false;
|
|
107
|
+
}
|
|
108
108
|
}
|
|
109
|
+
|
|
109
110
|
export { createOrderedCSSStyleSheet };
|
|
110
111
|
//# sourceMappingURL=createOrderedCSSStyleSheet.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"createOrderedCSSStyleSheet.js","names":[],"sources":["esm/StyleSheet/dom/createOrderedCSSStyleSheet.js"],"sourcesContent":["const slice = Array.prototype.slice;\nfunction createOrderedCSSStyleSheet(sheet) {\n const groups = {};\n const selectors = {};\n if (sheet != null) {\n let group;\n slice.call(sheet.cssRules).forEach((cssRule, i) => {\n const cssText = cssRule.cssText;\n if (cssText.indexOf(\"stylesheet-group\") > -1) {\n group = decodeGroupRule(cssRule);\n groups[group] = { start: i, rules: [cssText] };\n } else {\n const selectorText = getSelectorText(cssText);\n if (selectorText != null) {\n selectors[selectorText] = true;\n groups[group].rules.push(cssText);\n }\n }\n });\n }\n function sheetInsert(sheet2, group, text) {\n const orderedGroups = getOrderedGroups(groups);\n const groupIndex = orderedGroups.indexOf(group);\n const nextGroupIndex = groupIndex + 1;\n const nextGroup = orderedGroups[nextGroupIndex];\n const position = nextGroup != null && groups[nextGroup].start != null ? groups[nextGroup].start : sheet2.cssRules.length;\n const isInserted = insertRuleAt(sheet2, text, position);\n if (isInserted) {\n if (groups[group].start == null) {\n groups[group].start = position;\n }\n for (let i = nextGroupIndex; i < orderedGroups.length; i += 1) {\n const groupNumber = orderedGroups[i];\n const previousStart = groups[groupNumber].start || 0;\n groups[groupNumber].start = previousStart + 1;\n }\n }\n return isInserted;\n }\n const OrderedCSSStyleSheet = {\n /**\n * The textContent of the style sheet.\n */\n getTextContent() {\n return getOrderedGroups(groups).map((group) => {\n const rules = groups[group].rules;\n const marker = rules.shift();\n rules.sort();\n rules.unshift(marker);\n return rules.join(\"\\n\");\n }).join(\"\\n\");\n },\n /**\n * Insert a rule into the style sheet\n */\n insert(cssText, groupValue) {\n const group = Number(groupValue);\n if (groups[group] == null) {\n const markerRule = encodeGroupRule(group);\n groups[group] = { start: null, rules: [markerRule] };\n if (sheet != null) {\n sheetInsert(sheet, group, markerRule);\n }\n }\n const selectorText = getSelectorText(cssText);\n if (selectorText != null && selectors[selectorText] == null) {\n selectors[selectorText] = true;\n groups[group].rules.push(cssText);\n if (sheet != null) {\n const isInserted = sheetInsert(sheet, group, cssText);\n if (!isInserted) {\n groups[group].rules.pop();\n }\n }\n }\n }\n };\n return OrderedCSSStyleSheet;\n}\nfunction encodeGroupRule(group) {\n return `[stylesheet-group=\"${group}\"]{}`;\n}\nconst groupPattern = /[\"']/g;\nfunction decodeGroupRule(cssRule) {\n return Number(cssRule.selectorText.split(groupPattern)[1]);\n}\nfunction getOrderedGroups(obj) {\n return Object.keys(obj).map(Number).sort((a, b) => a > b ? 1 : -1);\n}\nconst selectorPattern = /\\s*([,])\\s*/g;\nfunction getSelectorText(cssText) {\n const selector = cssText.split(\"{\")[0].trim();\n return selector !== \"\" ? selector.replace(selectorPattern, \"$1\") : null;\n}\nfunction insertRuleAt(root, cssText, position) {\n try {\n root.insertRule(cssText, position);\n return true;\n } catch (e) {\n return false;\n }\n}\nexport {\n createOrderedCSSStyleSheet\n};\n//# sourceMappingURL=createOrderedCSSStyleSheet.js.map\n"],"mappings":";AAAA,MAAM,QAAQ,MAAM,UAAU;AAC9B,SAAS,2BAA2B,OAAO;CACzC,MAAM,SAAS,CAAC;CAChB,MAAM,YAAY,CAAC;CACnB,IAAI,SAAS,MAAM;EACjB,IAAI;EACJ,MAAM,KAAK,MAAM,QAAQ,EAAE,SAAS,SAAS,MAAM;GACjD,MAAM,UAAU,QAAQ;GACxB,IAAI,QAAQ,QAAQ,kBAAkB,IAAI,CAAC,GAAG;IAC5C,QAAQ,gBAAgB,OAAO;IAC/B,OAAO,SAAS;KAAE,OAAO;KAAG,OAAO,CAAC,OAAO;IAAE;GAC/C,OAAO;IACL,MAAM,eAAe,gBAAgB,OAAO;IAC5C,IAAI,gBAAgB,MAAM;KACxB,UAAU,gBAAgB;KAC1B,OAAO,OAAO,MAAM,KAAK,OAAO;IAClC;GACF;EACF,CAAC;CACH;CACA,SAAS,YAAY,QAAQ,OAAO,MAAM;EACxC,MAAM,gBAAgB,iBAAiB,MAAM;EAC7C,MAAM,aAAa,cAAc,QAAQ,KAAK;EAC9C,MAAM,iBAAiB,aAAa;EACpC,MAAM,YAAY,cAAc;EAChC,MAAM,WAAW,aAAa,QAAQ,OAAO,WAAW,SAAS,OAAO,OAAO,WAAW,QAAQ,OAAO,SAAS;EAClH,MAAM,aAAa,aAAa,Q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