@tamagui/react-native-web-internals 2.7.7 → 3.0.0-beta.1093.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 +150 -136
- package/dist/cjs/StyleSheet/compiler/hash.cjs +14 -18
- package/dist/cjs/StyleSheet/compiler/hyphenateStyleName.cjs +20 -24
- package/dist/cjs/StyleSheet/compiler/index.cjs +294 -321
- package/dist/cjs/StyleSheet/compiler/normalizeColor.cjs +19 -23
- package/dist/cjs/StyleSheet/compiler/normalizeValueWithProperty.cjs +31 -35
- package/dist/cjs/StyleSheet/compiler/resolveShadowValue.cjs +26 -38
- package/dist/cjs/StyleSheet/dom/createCSSStyleSheet.cjs +36 -40
- package/dist/cjs/StyleSheet/dom/createOrderedCSSStyleSheet.cjs +107 -111
- package/dist/cjs/StyleSheet/dom/index.cjs +69 -72
- package/dist/cjs/StyleSheet/index.cjs +32 -34
- package/dist/cjs/StyleSheet/preprocess.cjs +73 -94
- package/dist/cjs/StyleSheet/validate.cjs +71 -75
- package/dist/cjs/TextAncestorContext.cjs +14 -18
- package/dist/cjs/colorProps.cjs +24 -28
- package/dist/cjs/index.cjs +48 -50
- package/dist/cjs/modules/AccessibilityUtil/index.cjs +17 -21
- package/dist/cjs/modules/AccessibilityUtil/isDisabled.cjs +14 -18
- package/dist/cjs/modules/AccessibilityUtil/propsToAccessibilityComponent.cjs +45 -49
- package/dist/cjs/modules/AccessibilityUtil/propsToAriaRole.cjs +33 -39
- package/dist/cjs/modules/AssetRegistry/index.cjs +17 -19
- package/dist/cjs/modules/ImageLoader/index.cjs +134 -141
- package/dist/cjs/modules/InteractionManager.cjs +211 -219
- package/dist/cjs/modules/Platform/index.cjs +17 -21
- package/dist/cjs/modules/TextInputState/index.cjs +54 -58
- package/dist/cjs/modules/UIManager/index.cjs +45 -51
- package/dist/cjs/modules/canUseDOM.cjs +14 -18
- package/dist/cjs/modules/createDOMProps/index.cjs +284 -359
- package/dist/cjs/modules/createEventHandle/index.cjs +56 -62
- package/dist/cjs/modules/dismissKeyboard/index.cjs +15 -19
- package/dist/cjs/modules/forwardedProps/index.cjs +127 -130
- package/dist/cjs/modules/getBoundingClientRect/index.cjs +21 -25
- package/dist/cjs/modules/invariant.cjs +25 -27
- package/dist/cjs/modules/isSelectionValid/index.cjs +21 -25
- package/dist/cjs/modules/isWebColor/index.cjs +14 -18
- package/dist/cjs/modules/mergeRefs/index.cjs +30 -34
- package/dist/cjs/modules/modality/index.cjs +130 -134
- package/dist/cjs/modules/multiplyStyleLengthValue/index.cjs +24 -28
- package/dist/cjs/modules/normalizeColor/index.cjs +27 -31
- package/dist/cjs/modules/pick/index.cjs +21 -27
- package/dist/cjs/modules/processColor/index.cjs +27 -36
- package/dist/cjs/modules/requestIdleCallback/index.cjs +27 -29
- package/dist/cjs/modules/setValueForStyles/dangerousStyleValue.cjs +38 -42
- package/dist/cjs/modules/setValueForStyles/index.cjs +27 -34
- package/dist/cjs/modules/unitlessNumbers/index.cjs +73 -75
- package/dist/cjs/modules/useElementLayout/index.cjs +23 -31
- package/dist/cjs/modules/useEvent/index.cjs +39 -43
- package/dist/cjs/modules/useHover/index.cjs +112 -118
- package/dist/cjs/modules/useLayoutEffect/index.cjs +17 -26
- package/dist/cjs/modules/useLocale/index.cjs +32 -43
- package/dist/cjs/modules/useLocale/isLocaleRTL.cjs +65 -76
- package/dist/cjs/modules/useMergeRefs/index.cjs +18 -29
- package/dist/cjs/modules/usePlatformMethods/index.cjs +23 -30
- package/dist/cjs/modules/useStable/index.cjs +23 -32
- package/dist/cjs/styleTypes.cjs +9 -11
- package/dist/cjs/types.cjs +9 -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 +271 -342
- 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 +8 -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 +15 -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 +10 -10
- package/src/StyleSheet/compiler/index.tsx +2 -5
- package/src/StyleSheet/preprocess.tsx +1 -4
- package/src/modules/createDOMProps/index.tsx +8 -22
- package/src/modules/forwardedProps/index.tsx +0 -1
- package/src/modules/mergeRefs/index.tsx +1 -1
- package/src/modules/pick/index.tsx +2 -4
- package/src/modules/setValueForStyles/dangerousStyleValue.tsx +1 -1
- package/src/modules/setValueForStyles/index.tsx +0 -3
- package/types/StyleSheet/compiler/createReactDOMStyle.d.ts.map +1 -1
- package/types/StyleSheet/compiler/index.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/UIManager/index.d.ts +1 -6
- package/types/modules/UIManager/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/pick/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/setValueForStyles/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
|
@@ -3,26 +3,22 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
5
|
var __export = (target, all) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
10
|
};
|
|
11
11
|
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value: true
|
|
22
|
-
}), mod);
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
21
|
var isWebColor_exports = {};
|
|
24
|
-
__export(isWebColor_exports, {
|
|
25
|
-
isWebColor: () => isWebColor
|
|
26
|
-
});
|
|
22
|
+
__export(isWebColor_exports, { isWebColor: () => isWebColor });
|
|
27
23
|
module.exports = __toCommonJS(isWebColor_exports);
|
|
28
|
-
const isWebColor = color => color === "currentcolor" || color === "currentColor" || color === "inherit" || color.startsWith("var(");
|
|
24
|
+
const isWebColor = (color) => color === "currentcolor" || color === "currentColor" || color === "inherit" || color.startsWith("var(");
|
|
@@ -3,43 +3,39 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
5
|
var __export = (target, all) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
10
|
};
|
|
11
11
|
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value: true
|
|
22
|
-
}), mod);
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
21
|
var mergeRefs_exports = {};
|
|
24
|
-
__export(mergeRefs_exports, {
|
|
25
|
-
mergeRefs: () => mergeRefs
|
|
26
|
-
});
|
|
22
|
+
__export(mergeRefs_exports, { mergeRefs: () => mergeRefs });
|
|
27
23
|
module.exports = __toCommonJS(mergeRefs_exports);
|
|
28
24
|
function mergeRefs(...args) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
25
|
+
return function mergedRef(node) {
|
|
26
|
+
args.forEach((ref) => {
|
|
27
|
+
if (ref == null) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
if (typeof ref === "function") {
|
|
31
|
+
ref(node);
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
if (typeof ref === "object") {
|
|
35
|
+
ref.current = node;
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
console.error(`mergeRefs cannot handle Refs of type boolean, number or string, received ref ${String(ref)}`);
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
}
|
|
@@ -3,29 +3,27 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
5
|
var __export = (target, all) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
10
|
};
|
|
11
11
|
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value: true
|
|
22
|
-
}), mod);
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
21
|
var modality_exports = {};
|
|
24
22
|
__export(modality_exports, {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
addModalityListener: () => addModalityListener,
|
|
24
|
+
getActiveModality: () => getActiveModality,
|
|
25
|
+
getModality: () => getModality,
|
|
26
|
+
testOnly_resetActiveModality: () => testOnly_resetActiveModality
|
|
29
27
|
});
|
|
30
28
|
module.exports = __toCommonJS(modality_exports);
|
|
31
29
|
var import_canUseDOM = require("../canUseDOM.cjs");
|
|
@@ -36,7 +34,7 @@ let modality = "keyboard";
|
|
|
36
34
|
let previousModality;
|
|
37
35
|
let previousActiveModality;
|
|
38
36
|
let isEmulatingMouseEvents = false;
|
|
39
|
-
const listeners = /* @__PURE__ */new Set();
|
|
37
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
40
38
|
const KEYBOARD = "keyboard";
|
|
41
39
|
const MOUSE = "mouse";
|
|
42
40
|
const TOUCH = "touch";
|
|
@@ -55,12 +53,10 @@ const TOUCHCANCEL = "touchcancel";
|
|
|
55
53
|
const TOUCHMOVE = "touchmove";
|
|
56
54
|
const TOUCHSTART = "touchstart";
|
|
57
55
|
const VISIBILITYCHANGE = "visibilitychange";
|
|
58
|
-
const bubbleOptions = {
|
|
59
|
-
passive: true
|
|
60
|
-
};
|
|
56
|
+
const bubbleOptions = { passive: true };
|
|
61
57
|
const captureOptions = {
|
|
62
|
-
|
|
63
|
-
|
|
58
|
+
capture: true,
|
|
59
|
+
passive: true
|
|
64
60
|
};
|
|
65
61
|
const addBlurListener = (0, import_createEventHandle.createEventHandle)(BLUR, bubbleOptions);
|
|
66
62
|
const addFocusListener = (0, import_createEventHandle.createEventHandle)(FOCUS, bubbleOptions);
|
|
@@ -78,135 +74,135 @@ const addTouchCancelListener = (0, import_createEventHandle.createEventHandle)(T
|
|
|
78
74
|
const addTouchMoveListener = (0, import_createEventHandle.createEventHandle)(TOUCHMOVE, captureOptions);
|
|
79
75
|
const addTouchStartListener = (0, import_createEventHandle.createEventHandle)(TOUCHSTART, captureOptions);
|
|
80
76
|
function restoreModality() {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
77
|
+
if (previousModality != null || previousActiveModality != null) {
|
|
78
|
+
if (previousModality != null) {
|
|
79
|
+
modality = previousModality;
|
|
80
|
+
previousModality = null;
|
|
81
|
+
}
|
|
82
|
+
if (previousActiveModality != null) {
|
|
83
|
+
activeModality = previousActiveModality;
|
|
84
|
+
previousActiveModality = null;
|
|
85
|
+
}
|
|
86
|
+
callListeners();
|
|
87
|
+
}
|
|
92
88
|
}
|
|
93
89
|
function onBlurWindow() {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
90
|
+
previousModality = modality;
|
|
91
|
+
previousActiveModality = activeModality;
|
|
92
|
+
activeModality = KEYBOARD;
|
|
93
|
+
modality = KEYBOARD;
|
|
94
|
+
callListeners();
|
|
95
|
+
isEmulatingMouseEvents = false;
|
|
100
96
|
}
|
|
101
97
|
function onFocusWindow() {
|
|
102
|
-
|
|
98
|
+
restoreModality();
|
|
103
99
|
}
|
|
104
100
|
function onKeyDown(event) {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
101
|
+
if (event.metaKey || event.altKey || event.ctrlKey) {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
if (modality !== KEYBOARD) {
|
|
105
|
+
modality = KEYBOARD;
|
|
106
|
+
activeModality = KEYBOARD;
|
|
107
|
+
callListeners();
|
|
108
|
+
}
|
|
113
109
|
}
|
|
114
110
|
function onVisibilityChange() {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
111
|
+
if (document.visibilityState !== "hidden") {
|
|
112
|
+
restoreModality();
|
|
113
|
+
}
|
|
118
114
|
}
|
|
119
115
|
function onPointerish(event) {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
116
|
+
const eventType = event.type;
|
|
117
|
+
if (supportsPointerEvent()) {
|
|
118
|
+
if (eventType === POINTERDOWN) {
|
|
119
|
+
if (activeModality !== event.pointerType) {
|
|
120
|
+
modality = event.pointerType;
|
|
121
|
+
activeModality = event.pointerType;
|
|
122
|
+
callListeners();
|
|
123
|
+
}
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
if (eventType === POINTERMOVE) {
|
|
127
|
+
if (modality !== event.pointerType) {
|
|
128
|
+
modality = event.pointerType;
|
|
129
|
+
callListeners();
|
|
130
|
+
}
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
} else {
|
|
134
|
+
if (!isEmulatingMouseEvents) {
|
|
135
|
+
if (eventType === MOUSEDOWN) {
|
|
136
|
+
if (activeModality !== MOUSE) {
|
|
137
|
+
modality = MOUSE;
|
|
138
|
+
activeModality = MOUSE;
|
|
139
|
+
callListeners();
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
if (eventType === MOUSEMOVE) {
|
|
143
|
+
if (modality !== MOUSE) {
|
|
144
|
+
modality = MOUSE;
|
|
145
|
+
callListeners();
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
if (eventType === TOUCHSTART) {
|
|
150
|
+
isEmulatingMouseEvents = true;
|
|
151
|
+
if (event.touches && event.touches.length > 1) {
|
|
152
|
+
isEmulatingMouseEvents = false;
|
|
153
|
+
}
|
|
154
|
+
if (activeModality !== TOUCH) {
|
|
155
|
+
modality = TOUCH;
|
|
156
|
+
activeModality = TOUCH;
|
|
157
|
+
callListeners();
|
|
158
|
+
}
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
if (eventType === CONTEXTMENU || eventType === MOUSEUP || eventType === SELECTIONCHANGE || eventType === SCROLL || eventType === TOUCHCANCEL || eventType === TOUCHMOVE) {
|
|
162
|
+
isEmulatingMouseEvents = false;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
169
165
|
}
|
|
170
166
|
if (import_canUseDOM.canUseDOM) {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
167
|
+
addBlurListener(window, onBlurWindow);
|
|
168
|
+
addFocusListener(window, onFocusWindow);
|
|
169
|
+
addKeyDownListener(document, onKeyDown);
|
|
170
|
+
addPointerDownListener(document, onPointerish);
|
|
171
|
+
addPointerMoveListener(document, onPointerish);
|
|
172
|
+
addVisibilityChangeListener(document, onVisibilityChange);
|
|
173
|
+
addContextMenuListener(document, onPointerish);
|
|
174
|
+
addMouseDownListener(document, onPointerish);
|
|
175
|
+
addMouseMoveListener(document, onPointerish);
|
|
176
|
+
addMouseUpListener(document, onPointerish);
|
|
177
|
+
addTouchCancelListener(document, onPointerish);
|
|
178
|
+
addTouchMoveListener(document, onPointerish);
|
|
179
|
+
addTouchStartListener(document, onPointerish);
|
|
180
|
+
addSelectiomChangeListener(document, onPointerish);
|
|
181
|
+
addScrollListener(document, onPointerish);
|
|
186
182
|
}
|
|
187
183
|
function callListeners() {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
184
|
+
const value = {
|
|
185
|
+
activeModality,
|
|
186
|
+
modality
|
|
187
|
+
};
|
|
188
|
+
listeners.forEach((listener) => {
|
|
189
|
+
listener(value);
|
|
190
|
+
});
|
|
195
191
|
}
|
|
196
192
|
function getActiveModality() {
|
|
197
|
-
|
|
193
|
+
return activeModality;
|
|
198
194
|
}
|
|
199
195
|
function getModality() {
|
|
200
|
-
|
|
196
|
+
return modality;
|
|
201
197
|
}
|
|
202
198
|
function addModalityListener(listener) {
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
199
|
+
listeners.add(listener);
|
|
200
|
+
return () => {
|
|
201
|
+
listeners.delete(listener);
|
|
202
|
+
};
|
|
207
203
|
}
|
|
208
204
|
function testOnly_resetActiveModality() {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
}
|
|
205
|
+
isEmulatingMouseEvents = false;
|
|
206
|
+
activeModality = KEYBOARD;
|
|
207
|
+
modality = KEYBOARD;
|
|
208
|
+
}
|
|
@@ -3,39 +3,35 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
5
|
var __export = (target, all) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
10
|
};
|
|
11
11
|
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value: true
|
|
22
|
-
}), mod);
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
21
|
var multiplyStyleLengthValue_exports = {};
|
|
24
|
-
__export(multiplyStyleLengthValue_exports, {
|
|
25
|
-
multiplyStyleLengthValue: () => multiplyStyleLengthValue
|
|
26
|
-
});
|
|
22
|
+
__export(multiplyStyleLengthValue_exports, { multiplyStyleLengthValue: () => multiplyStyleLengthValue });
|
|
27
23
|
module.exports = __toCommonJS(multiplyStyleLengthValue_exports);
|
|
28
24
|
const CSS_UNIT_RE = /^[+-]?\d*(?:\.\d+)?(?:[Ee][+-]?\d+)?(%|\w*)/;
|
|
29
|
-
const getUnit = str => str.match(CSS_UNIT_RE)[1];
|
|
30
|
-
const isNumeric = n => {
|
|
31
|
-
|
|
25
|
+
const getUnit = (str) => str.match(CSS_UNIT_RE)[1];
|
|
26
|
+
const isNumeric = (n) => {
|
|
27
|
+
return !isNaN(parseFloat(n)) && isFinite(n);
|
|
32
28
|
};
|
|
33
29
|
const multiplyStyleLengthValue = (value, multiple) => {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
};
|
|
30
|
+
if (typeof value === "string") {
|
|
31
|
+
const number = parseFloat(value) * multiple;
|
|
32
|
+
const unit = getUnit(value);
|
|
33
|
+
return `${number}${unit}`;
|
|
34
|
+
} else if (isNumeric(value)) {
|
|
35
|
+
return value * multiple;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
@@ -3,42 +3,38 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
5
|
var __export = (target, all) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
10
|
};
|
|
11
11
|
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value: true
|
|
22
|
-
}), mod);
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
21
|
var normalizeColor_exports = {};
|
|
24
|
-
__export(normalizeColor_exports, {
|
|
25
|
-
normalizeColor: () => normalizeColor
|
|
26
|
-
});
|
|
22
|
+
__export(normalizeColor_exports, { normalizeColor: () => normalizeColor });
|
|
27
23
|
module.exports = __toCommonJS(normalizeColor_exports);
|
|
28
24
|
var import_isWebColor = require("../isWebColor/index.cjs");
|
|
29
25
|
var import_processColor = require("../processColor/index.cjs");
|
|
30
26
|
const normalizeColor = (color, opacity = 1) => {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
};
|
|
27
|
+
if (color == null) return;
|
|
28
|
+
if (typeof color === "string" && (0, import_isWebColor.isWebColor)(color)) {
|
|
29
|
+
return color;
|
|
30
|
+
}
|
|
31
|
+
const colorInt = (0, import_processColor.processColor)(color);
|
|
32
|
+
if (colorInt != null) {
|
|
33
|
+
const r = colorInt >> 16 & 255;
|
|
34
|
+
const g = colorInt >> 8 & 255;
|
|
35
|
+
const b = colorInt & 255;
|
|
36
|
+
const a = (colorInt >> 24 & 255) / 255;
|
|
37
|
+
const alpha = (a * opacity).toFixed(2);
|
|
38
|
+
return `rgba(${r},${g},${b},${alpha})`;
|
|
39
|
+
}
|
|
40
|
+
};
|
|
@@ -3,36 +3,30 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
5
|
var __export = (target, all) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
10
|
};
|
|
11
11
|
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value: true
|
|
22
|
-
}), mod);
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
21
|
var pick_exports = {};
|
|
24
|
-
__export(pick_exports, {
|
|
25
|
-
pick: () => pick
|
|
26
|
-
});
|
|
22
|
+
__export(pick_exports, { pick: () => pick });
|
|
27
23
|
module.exports = __toCommonJS(pick_exports);
|
|
28
24
|
function pick(obj, list) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
return nextObj;
|
|
38
|
-
}
|
|
25
|
+
const nextObj = {};
|
|
26
|
+
for (const key in obj) {
|
|
27
|
+
if (list[key] === true) {
|
|
28
|
+
nextObj[key] = obj[key];
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return nextObj;
|
|
32
|
+
}
|