@hanzogui/react-native-web-internals 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/cjs/StyleSheet/__tests__/compiler-createReactDOMStyle-test.cjs +240 -0
- package/dist/cjs/StyleSheet/__tests__/compiler-test.cjs +407 -0
- package/dist/cjs/StyleSheet/__tests__/dom-createOrderedCSSStyleSheet-test.cjs +121 -0
- package/dist/cjs/StyleSheet/__tests__/index-test.cjs +404 -0
- package/dist/cjs/StyleSheet/__tests__/preprocess-test.cjs +108 -0
- package/dist/cjs/StyleSheet/__tests__/validate-test.cjs +36 -0
- package/dist/cjs/StyleSheet/compiler/createReactDOMStyle.cjs +87 -0
- package/dist/cjs/StyleSheet/compiler/hash.cjs +26 -0
- package/dist/cjs/StyleSheet/compiler/hyphenateStyleName.cjs +36 -0
- package/dist/cjs/StyleSheet/compiler/index.cjs +318 -0
- package/dist/cjs/StyleSheet/compiler/normalizeColor.cjs +40 -0
- package/dist/cjs/StyleSheet/compiler/normalizeValueWithProperty.cjs +43 -0
- package/dist/cjs/StyleSheet/compiler/resolveShadowValue.cjs +48 -0
- package/dist/cjs/StyleSheet/dom/createCSSStyleSheet.cjs +37 -0
- package/dist/cjs/StyleSheet/dom/createOrderedCSSStyleSheet.cjs +110 -0
- package/dist/cjs/StyleSheet/dom/index.cjs +67 -0
- package/dist/cjs/StyleSheet/index.cjs +57 -0
- package/dist/cjs/StyleSheet/preprocess.cjs +101 -0
- package/dist/cjs/StyleSheet/validate.cjs +69 -0
- package/dist/cjs/TextAncestorContext.cjs +27 -0
- package/dist/cjs/colorProps.cjs +37 -0
- package/dist/cjs/index.cjs +103 -0
- package/dist/cjs/modules/AccessibilityUtil/__tests__/propsToAccessibilityComponent-test.cjs +50 -0
- package/dist/cjs/modules/AccessibilityUtil/__tests__/propsToAriaRole-test.cjs +40 -0
- package/dist/cjs/modules/AccessibilityUtil/index.cjs +33 -0
- package/dist/cjs/modules/AccessibilityUtil/isDisabled.cjs +26 -0
- package/dist/cjs/modules/AccessibilityUtil/propsToAccessibilityComponent.cjs +57 -0
- package/dist/cjs/modules/AccessibilityUtil/propsToAriaRole.cjs +47 -0
- package/dist/cjs/modules/AssetRegistry/index.cjs +33 -0
- package/dist/cjs/modules/ImageLoader/index.cjs +111 -0
- package/dist/cjs/modules/InteractionManager.cjs +184 -0
- package/dist/cjs/modules/Platform/__tests__/index-test.cjs +48 -0
- package/dist/cjs/modules/Platform/index.cjs +30 -0
- package/dist/cjs/modules/TextInputState/index.cjs +55 -0
- package/dist/cjs/modules/UIManager/__tests__/index-test.cjs +90 -0
- package/dist/cjs/modules/UIManager/index.cjs +60 -0
- package/dist/cjs/modules/canUseDOM.cjs +26 -0
- package/dist/cjs/modules/createDOMProps/__tests__/index-test.cjs +156 -0
- package/dist/cjs/modules/createDOMProps/index.cjs +179 -0
- package/dist/cjs/modules/createEventHandle/__tests__/index-test.cjs +344 -0
- package/dist/cjs/modules/createEventHandle/index.cjs +67 -0
- package/dist/cjs/modules/dismissKeyboard/index.cjs +29 -0
- package/dist/cjs/modules/forwardedProps/index.cjs +161 -0
- package/dist/cjs/modules/getBoundingClientRect/index.cjs +28 -0
- package/dist/cjs/modules/invariant.cjs +36 -0
- package/dist/cjs/modules/isSelectionValid/index.cjs +35 -0
- package/dist/cjs/modules/isWebColor/index.cjs +26 -0
- package/dist/cjs/modules/mergeRefs/__tests__/index-test.cjs +42 -0
- package/dist/cjs/modules/mergeRefs/index.cjs +42 -0
- package/dist/cjs/modules/modality/__tests__/index-test.cjs +32 -0
- package/dist/cjs/modules/modality/index.cjs +135 -0
- package/dist/cjs/modules/multiplyStyleLengthValue/__tests__/index-test.cjs +30 -0
- package/dist/cjs/modules/multiplyStyleLengthValue/index.cjs +35 -0
- package/dist/cjs/modules/normalizeColor/index.cjs +39 -0
- package/dist/cjs/modules/pick/index.cjs +30 -0
- package/dist/cjs/modules/processColor/__tests__/index-test.cjs +66 -0
- package/dist/cjs/modules/processColor/index.cjs +42 -0
- package/dist/cjs/modules/requestIdleCallback/index.cjs +44 -0
- package/dist/cjs/modules/setValueForStyles/dangerousStyleValue.cjs +35 -0
- package/dist/cjs/modules/setValueForStyles/index.cjs +35 -0
- package/dist/cjs/modules/unitlessNumbers/index.cjs +85 -0
- package/dist/cjs/modules/useElementLayout/index.cjs +39 -0
- package/dist/cjs/modules/useEvent/__tests__/index-test.cjs +408 -0
- package/dist/cjs/modules/useEvent/index.cjs +45 -0
- package/dist/cjs/modules/useHover/__tests__/index-test.cjs +273 -0
- package/dist/cjs/modules/useHover/index.cjs +97 -0
- package/dist/cjs/modules/useLayoutEffect/index.cjs +39 -0
- package/dist/cjs/modules/useLocale/index.cjs +66 -0
- package/dist/cjs/modules/useLocale/isLocaleRTL.cjs +83 -0
- package/dist/cjs/modules/useMergeRefs/__tests__/index-test.cjs +102 -0
- package/dist/cjs/modules/useMergeRefs/index.cjs +43 -0
- package/dist/cjs/modules/usePlatformMethods/index.cjs +35 -0
- package/dist/cjs/modules/useStable/__tests__/index-test.cjs +92 -0
- package/dist/cjs/modules/useStable/index.cjs +42 -0
- package/dist/cjs/styleTypes.cjs +16 -0
- package/dist/cjs/types.cjs +16 -0
- package/dist/esm/StyleSheet/__tests__/compiler-createReactDOMStyle-test.mjs +219 -0
- package/dist/esm/StyleSheet/__tests__/compiler-createReactDOMStyle-test.mjs.map +1 -0
- package/dist/esm/StyleSheet/__tests__/compiler-test.mjs +408 -0
- package/dist/esm/StyleSheet/__tests__/compiler-test.mjs.map +1 -0
- package/dist/esm/StyleSheet/__tests__/dom-createOrderedCSSStyleSheet-test.mjs +100 -0
- package/dist/esm/StyleSheet/__tests__/dom-createOrderedCSSStyleSheet-test.mjs.map +1 -0
- package/dist/esm/StyleSheet/__tests__/index-test.mjs +383 -0
- package/dist/esm/StyleSheet/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/StyleSheet/__tests__/preprocess-test.mjs +109 -0
- package/dist/esm/StyleSheet/__tests__/preprocess-test.mjs.map +1 -0
- package/dist/esm/StyleSheet/__tests__/validate-test.mjs +37 -0
- package/dist/esm/StyleSheet/__tests__/validate-test.mjs.map +1 -0
- package/dist/esm/StyleSheet/compiler/createReactDOMStyle.mjs +63 -0
- package/dist/esm/StyleSheet/compiler/createReactDOMStyle.mjs.map +1 -0
- package/dist/esm/StyleSheet/compiler/hash.mjs +3 -0
- package/dist/esm/StyleSheet/compiler/hash.mjs.map +1 -0
- package/dist/esm/StyleSheet/compiler/hyphenateStyleName.mjs +13 -0
- package/dist/esm/StyleSheet/compiler/hyphenateStyleName.mjs.map +1 -0
- package/dist/esm/StyleSheet/compiler/index.mjs +292 -0
- package/dist/esm/StyleSheet/compiler/index.mjs.map +1 -0
- package/dist/esm/StyleSheet/compiler/normalizeColor.mjs +17 -0
- package/dist/esm/StyleSheet/compiler/normalizeColor.mjs.map +1 -0
- package/dist/esm/StyleSheet/compiler/normalizeValueWithProperty.mjs +20 -0
- package/dist/esm/StyleSheet/compiler/normalizeValueWithProperty.mjs.map +1 -0
- package/dist/esm/StyleSheet/compiler/resolveShadowValue.mjs +25 -0
- package/dist/esm/StyleSheet/compiler/resolveShadowValue.mjs.map +1 -0
- package/dist/esm/StyleSheet/dom/createCSSStyleSheet.mjs +14 -0
- package/dist/esm/StyleSheet/dom/createCSSStyleSheet.mjs.map +1 -0
- package/dist/esm/StyleSheet/dom/createOrderedCSSStyleSheet.mjs +87 -0
- package/dist/esm/StyleSheet/dom/createOrderedCSSStyleSheet.mjs.map +1 -0
- package/dist/esm/StyleSheet/dom/index.mjs +44 -0
- package/dist/esm/StyleSheet/dom/index.mjs.map +1 -0
- package/dist/esm/StyleSheet/index.mjs +33 -0
- package/dist/esm/StyleSheet/index.mjs.map +1 -0
- package/dist/esm/StyleSheet/preprocess.mjs +75 -0
- package/dist/esm/StyleSheet/preprocess.mjs.map +1 -0
- package/dist/esm/StyleSheet/validate.mjs +46 -0
- package/dist/esm/StyleSheet/validate.mjs.map +1 -0
- package/dist/esm/TextAncestorContext.mjs +4 -0
- package/dist/esm/TextAncestorContext.mjs.map +1 -0
- package/dist/esm/colorProps.mjs +14 -0
- package/dist/esm/colorProps.mjs.map +1 -0
- package/dist/esm/index.js +45 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/index.mjs +45 -0
- package/dist/esm/index.mjs.map +1 -0
- package/dist/esm/modules/AccessibilityUtil/__tests__/propsToAccessibilityComponent-test.mjs +29 -0
- package/dist/esm/modules/AccessibilityUtil/__tests__/propsToAccessibilityComponent-test.mjs.map +1 -0
- package/dist/esm/modules/AccessibilityUtil/__tests__/propsToAriaRole-test.mjs +19 -0
- package/dist/esm/modules/AccessibilityUtil/__tests__/propsToAriaRole-test.mjs.map +1 -0
- package/dist/esm/modules/AccessibilityUtil/index.mjs +10 -0
- package/dist/esm/modules/AccessibilityUtil/index.mjs.map +1 -0
- package/dist/esm/modules/AccessibilityUtil/isDisabled.mjs +3 -0
- package/dist/esm/modules/AccessibilityUtil/isDisabled.mjs.map +1 -0
- package/dist/esm/modules/AccessibilityUtil/propsToAccessibilityComponent.mjs +34 -0
- package/dist/esm/modules/AccessibilityUtil/propsToAccessibilityComponent.mjs.map +1 -0
- package/dist/esm/modules/AccessibilityUtil/propsToAriaRole.mjs +24 -0
- package/dist/esm/modules/AccessibilityUtil/propsToAriaRole.mjs.map +1 -0
- package/dist/esm/modules/AssetRegistry/index.mjs +9 -0
- package/dist/esm/modules/AssetRegistry/index.mjs.map +1 -0
- package/dist/esm/modules/ImageLoader/index.mjs +87 -0
- package/dist/esm/modules/ImageLoader/index.mjs.map +1 -0
- package/dist/esm/modules/InteractionManager.mjs +161 -0
- package/dist/esm/modules/InteractionManager.mjs.map +1 -0
- package/dist/esm/modules/Platform/__tests__/index-test.mjs +27 -0
- package/dist/esm/modules/Platform/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/modules/Platform/index.mjs +7 -0
- package/dist/esm/modules/Platform/index.mjs.map +1 -0
- package/dist/esm/modules/TextInputState/index.mjs +32 -0
- package/dist/esm/modules/TextInputState/index.mjs.map +1 -0
- package/dist/esm/modules/UIManager/__tests__/index-test.mjs +69 -0
- package/dist/esm/modules/UIManager/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/modules/UIManager/index.mjs +37 -0
- package/dist/esm/modules/UIManager/index.mjs.map +1 -0
- package/dist/esm/modules/canUseDOM.mjs +3 -0
- package/dist/esm/modules/canUseDOM.mjs.map +1 -0
- package/dist/esm/modules/createDOMProps/__tests__/index-test.mjs +135 -0
- package/dist/esm/modules/createDOMProps/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/modules/createDOMProps/index.mjs +155 -0
- package/dist/esm/modules/createDOMProps/index.mjs.map +1 -0
- package/dist/esm/modules/createEventHandle/__tests__/index-test.mjs +323 -0
- package/dist/esm/modules/createEventHandle/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/modules/createEventHandle/index.mjs +42 -0
- package/dist/esm/modules/createEventHandle/index.mjs.map +1 -0
- package/dist/esm/modules/dismissKeyboard/index.mjs +6 -0
- package/dist/esm/modules/dismissKeyboard/index.mjs.map +1 -0
- package/dist/esm/modules/forwardedProps/index.mjs +128 -0
- package/dist/esm/modules/forwardedProps/index.mjs.map +1 -0
- package/dist/esm/modules/getBoundingClientRect/index.mjs +5 -0
- package/dist/esm/modules/getBoundingClientRect/index.mjs.map +1 -0
- package/dist/esm/modules/invariant.mjs +12 -0
- package/dist/esm/modules/invariant.mjs.map +1 -0
- package/dist/esm/modules/isSelectionValid/index.mjs +12 -0
- package/dist/esm/modules/isSelectionValid/index.mjs.map +1 -0
- package/dist/esm/modules/isWebColor/index.mjs +3 -0
- package/dist/esm/modules/isWebColor/index.mjs.map +1 -0
- package/dist/esm/modules/mergeRefs/__tests__/index-test.mjs +21 -0
- package/dist/esm/modules/mergeRefs/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/modules/mergeRefs/index.mjs +19 -0
- package/dist/esm/modules/mergeRefs/index.mjs.map +1 -0
- package/dist/esm/modules/modality/__tests__/index-test.mjs +33 -0
- package/dist/esm/modules/modality/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/modules/modality/index.mjs +109 -0
- package/dist/esm/modules/modality/index.mjs.map +1 -0
- package/dist/esm/modules/multiplyStyleLengthValue/__tests__/index-test.mjs +9 -0
- package/dist/esm/modules/multiplyStyleLengthValue/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/modules/multiplyStyleLengthValue/index.mjs +12 -0
- package/dist/esm/modules/multiplyStyleLengthValue/index.mjs.map +1 -0
- package/dist/esm/modules/normalizeColor/index.mjs +16 -0
- package/dist/esm/modules/normalizeColor/index.mjs.map +1 -0
- package/dist/esm/modules/pick/index.mjs +7 -0
- package/dist/esm/modules/pick/index.mjs.map +1 -0
- package/dist/esm/modules/processColor/__tests__/index-test.mjs +45 -0
- package/dist/esm/modules/processColor/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/modules/processColor/index.mjs +8 -0
- package/dist/esm/modules/processColor/index.mjs.map +1 -0
- package/dist/esm/modules/requestIdleCallback/index.mjs +20 -0
- package/dist/esm/modules/requestIdleCallback/index.mjs.map +1 -0
- package/dist/esm/modules/setValueForStyles/dangerousStyleValue.mjs +12 -0
- package/dist/esm/modules/setValueForStyles/dangerousStyleValue.mjs.map +1 -0
- package/dist/esm/modules/setValueForStyles/index.mjs +12 -0
- package/dist/esm/modules/setValueForStyles/index.mjs.map +1 -0
- package/dist/esm/modules/unitlessNumbers/index.mjs +62 -0
- package/dist/esm/modules/unitlessNumbers/index.mjs.map +1 -0
- package/dist/esm/modules/useElementLayout/index.mjs +16 -0
- package/dist/esm/modules/useElementLayout/index.mjs.map +1 -0
- package/dist/esm/modules/useEvent/__tests__/index-test.mjs +387 -0
- package/dist/esm/modules/useEvent/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/modules/useEvent/index.mjs +22 -0
- package/dist/esm/modules/useEvent/index.mjs.map +1 -0
- package/dist/esm/modules/useHover/__tests__/index-test.mjs +252 -0
- package/dist/esm/modules/useHover/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/modules/useHover/index.mjs +74 -0
- package/dist/esm/modules/useHover/index.mjs.map +1 -0
- package/dist/esm/modules/useLayoutEffect/index.mjs +5 -0
- package/dist/esm/modules/useLayoutEffect/index.mjs.map +1 -0
- package/dist/esm/modules/useLocale/index.mjs +30 -0
- package/dist/esm/modules/useLocale/index.mjs.map +1 -0
- package/dist/esm/modules/useLocale/isLocaleRTL.mjs +60 -0
- package/dist/esm/modules/useLocale/isLocaleRTL.mjs.map +1 -0
- package/dist/esm/modules/useMergeRefs/__tests__/index-test.mjs +81 -0
- package/dist/esm/modules/useMergeRefs/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/modules/useMergeRefs/index.mjs +9 -0
- package/dist/esm/modules/useMergeRefs/index.mjs.map +1 -0
- package/dist/esm/modules/usePlatformMethods/index.mjs +12 -0
- package/dist/esm/modules/usePlatformMethods/index.mjs.map +1 -0
- package/dist/esm/modules/useStable/__tests__/index-test.mjs +71 -0
- package/dist/esm/modules/useStable/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/modules/useStable/index.mjs +8 -0
- package/dist/esm/modules/useStable/index.mjs.map +1 -0
- package/dist/esm/styleTypes.mjs +2 -0
- package/dist/esm/styleTypes.mjs.map +1 -0
- package/dist/esm/types.mjs +2 -0
- package/dist/esm/types.mjs.map +1 -0
- package/package.json +58 -0
- package/src/StyleSheet/__tests__/compiler-createReactDOMStyle-test.tsx +236 -0
- package/src/StyleSheet/__tests__/compiler-test.tsx +426 -0
- package/src/StyleSheet/__tests__/dom-createOrderedCSSStyleSheet-test.tsx +169 -0
- package/src/StyleSheet/__tests__/index-test.tsx +406 -0
- package/src/StyleSheet/__tests__/preprocess-test.tsx +107 -0
- package/src/StyleSheet/__tests__/validate-test.tsx +42 -0
- package/src/StyleSheet/compiler/createReactDOMStyle.tsx +215 -0
- package/src/StyleSheet/compiler/hash.tsx +1 -0
- package/src/StyleSheet/compiler/hyphenateStyleName.tsx +25 -0
- package/src/StyleSheet/compiler/index.tsx +478 -0
- package/src/StyleSheet/compiler/normalizeColor.tsx +35 -0
- package/src/StyleSheet/compiler/normalizeValueWithProperty.tsx +34 -0
- package/src/StyleSheet/compiler/resolveShadowValue.tsx +26 -0
- package/src/StyleSheet/dom/createCSSStyleSheet.tsx +42 -0
- package/src/StyleSheet/dom/createOrderedCSSStyleSheet.tsx +195 -0
- package/src/StyleSheet/dom/index.tsx +92 -0
- package/src/StyleSheet/index.tsx +99 -0
- package/src/StyleSheet/preprocess.tsx +119 -0
- package/src/StyleSheet/validate.tsx +90 -0
- package/src/TextAncestorContext.tsx +13 -0
- package/src/colorProps.tsx +12 -0
- package/src/index.tsx +58 -0
- package/src/modules/AccessibilityUtil/__tests__/propsToAccessibilityComponent-test.tsx +44 -0
- package/src/modules/AccessibilityUtil/__tests__/propsToAriaRole-test.tsx +25 -0
- package/src/modules/AccessibilityUtil/index.tsx +18 -0
- package/src/modules/AccessibilityUtil/isDisabled.tsx +13 -0
- package/src/modules/AccessibilityUtil/propsToAccessibilityComponent.tsx +54 -0
- package/src/modules/AccessibilityUtil/propsToAriaRole.tsx +37 -0
- package/src/modules/AssetRegistry/index.tsx +32 -0
- package/src/modules/ImageLoader/index.tsx +165 -0
- package/src/modules/InteractionManager.tsx +315 -0
- package/src/modules/Platform/__tests__/index-test.tsx +45 -0
- package/src/modules/Platform/index.tsx +15 -0
- package/src/modules/TextInputState/index.tsx +62 -0
- package/src/modules/UIManager/__tests__/index-test.tsx +87 -0
- package/src/modules/UIManager/index.tsx +68 -0
- package/src/modules/canUseDOM.tsx +14 -0
- package/src/modules/createDOMProps/__tests__/index-test.tsx +138 -0
- package/src/modules/createDOMProps/index.tsx +436 -0
- package/src/modules/createEventHandle/__tests__/index-test.tsx +459 -0
- package/src/modules/createEventHandle/index.tsx +100 -0
- package/src/modules/dismissKeyboard/index.tsx +14 -0
- package/src/modules/forwardedProps/index.tsx +145 -0
- package/src/modules/getBoundingClientRect/index.tsx +17 -0
- package/src/modules/invariant.ts +23 -0
- package/src/modules/isSelectionValid/index.tsx +20 -0
- package/src/modules/isWebColor/index.tsx +14 -0
- package/src/modules/mergeRefs/__tests__/index-test.tsx +32 -0
- package/src/modules/mergeRefs/index.tsx +36 -0
- package/src/modules/modality/__tests__/index-test.tsx +66 -0
- package/src/modules/modality/index.tsx +228 -0
- package/src/modules/multiplyStyleLengthValue/__tests__/index-test.tsx +23 -0
- package/src/modules/multiplyStyleLengthValue/index.tsx +26 -0
- package/src/modules/normalizeColor/index.tsx +32 -0
- package/src/modules/pick/index.tsx +25 -0
- package/src/modules/processColor/__tests__/index-test.tsx +78 -0
- package/src/modules/processColor/index.tsx +28 -0
- package/src/modules/requestIdleCallback/index.tsx +35 -0
- package/src/modules/setValueForStyles/dangerousStyleValue.tsx +74 -0
- package/src/modules/setValueForStyles/index.tsx +39 -0
- package/src/modules/unitlessNumbers/index.tsx +77 -0
- package/src/modules/useElementLayout/index.tsx +28 -0
- package/src/modules/useEvent/__tests__/index-test.tsx +511 -0
- package/src/modules/useEvent/index.tsx +64 -0
- package/src/modules/useHover/__tests__/index-test.tsx +342 -0
- package/src/modules/useHover/index.tsx +181 -0
- package/src/modules/useLayoutEffect/index.ts +15 -0
- package/src/modules/useLocale/index.tsx +57 -0
- package/src/modules/useLocale/isLocaleRTL.tsx +74 -0
- package/src/modules/useMergeRefs/__tests__/index-test.tsx +91 -0
- package/src/modules/useMergeRefs/index.tsx +22 -0
- package/src/modules/usePlatformMethods/index.tsx +40 -0
- package/src/modules/useStable/__tests__/index-test.tsx +101 -0
- package/src/modules/useStable/index.tsx +24 -0
- package/src/styleTypes.ts +321 -0
- package/src/types.ts +77 -0
- package/types/StyleSheet/compiler/createReactDOMStyle.d.ts +18 -0
- package/types/StyleSheet/compiler/createReactDOMStyle.d.ts.map +1 -0
- package/types/StyleSheet/compiler/hash.d.ts +2 -0
- package/types/StyleSheet/compiler/hash.d.ts.map +1 -0
- package/types/StyleSheet/compiler/hyphenateStyleName.d.ts +10 -0
- package/types/StyleSheet/compiler/hyphenateStyleName.d.ts.map +1 -0
- package/types/StyleSheet/compiler/index.d.ts +39 -0
- package/types/StyleSheet/compiler/index.d.ts.map +1 -0
- package/types/StyleSheet/compiler/normalizeColor.d.ts +10 -0
- package/types/StyleSheet/compiler/normalizeColor.d.ts.map +1 -0
- package/types/StyleSheet/compiler/normalizeValueWithProperty.d.ts +10 -0
- package/types/StyleSheet/compiler/normalizeValueWithProperty.d.ts.map +1 -0
- package/types/StyleSheet/compiler/resolveShadowValue.d.ts +10 -0
- package/types/StyleSheet/compiler/resolveShadowValue.d.ts.map +1 -0
- package/types/StyleSheet/dom/createCSSStyleSheet.d.ts +10 -0
- package/types/StyleSheet/dom/createCSSStyleSheet.d.ts.map +1 -0
- package/types/StyleSheet/dom/createOrderedCSSStyleSheet.d.ts +29 -0
- package/types/StyleSheet/dom/createOrderedCSSStyleSheet.d.ts.map +1 -0
- package/types/StyleSheet/dom/index.d.ts +15 -0
- package/types/StyleSheet/dom/index.d.ts.map +1 -0
- package/types/StyleSheet/index.d.ts +69 -0
- package/types/StyleSheet/index.d.ts.map +1 -0
- package/types/StyleSheet/preprocess.d.ts +16 -0
- package/types/StyleSheet/preprocess.d.ts.map +1 -0
- package/types/StyleSheet/validate.d.ts +10 -0
- package/types/StyleSheet/validate.d.ts.map +1 -0
- package/types/TextAncestorContext.d.ts +11 -0
- package/types/TextAncestorContext.d.ts.map +1 -0
- package/types/colorProps.d.ts +13 -0
- package/types/colorProps.d.ts.map +1 -0
- package/types/index.d.ts +45 -0
- package/types/index.d.ts.map +1 -0
- package/types/modules/AccessibilityUtil/index.d.ts +16 -0
- package/types/modules/AccessibilityUtil/index.d.ts.map +1 -0
- package/types/modules/AccessibilityUtil/isDisabled.d.ts +10 -0
- package/types/modules/AccessibilityUtil/isDisabled.d.ts.map +1 -0
- package/types/modules/AccessibilityUtil/propsToAccessibilityComponent.d.ts +10 -0
- package/types/modules/AccessibilityUtil/propsToAccessibilityComponent.d.ts.map +1 -0
- package/types/modules/AccessibilityUtil/propsToAriaRole.d.ts +12 -0
- package/types/modules/AccessibilityUtil/propsToAriaRole.d.ts.map +1 -0
- package/types/modules/AssetRegistry/index.d.ts +22 -0
- package/types/modules/AssetRegistry/index.d.ts.map +1 -0
- package/types/modules/ImageLoader/index.d.ts +27 -0
- package/types/modules/ImageLoader/index.d.ts.map +1 -0
- package/types/modules/InteractionManager.d.ts +48 -0
- package/types/modules/InteractionManager.d.ts.map +1 -0
- package/types/modules/Platform/index.d.ts +15 -0
- package/types/modules/Platform/index.d.ts.map +1 -0
- package/types/modules/TextInputState/index.d.ts +38 -0
- package/types/modules/TextInputState/index.d.ts.map +1 -0
- package/types/modules/UIManager/index.d.ts +23 -0
- package/types/modules/UIManager/index.d.ts.map +1 -0
- package/types/modules/canUseDOM.d.ts +10 -0
- package/types/modules/canUseDOM.d.ts.map +1 -0
- package/types/modules/createDOMProps/index.d.ts +12 -0
- package/types/modules/createDOMProps/index.d.ts.map +1 -0
- package/types/modules/createEventHandle/index.d.ts +20 -0
- package/types/modules/createEventHandle/index.d.ts.map +1 -0
- package/types/modules/dismissKeyboard/index.d.ts +10 -0
- package/types/modules/dismissKeyboard/index.d.ts.map +1 -0
- package/types/modules/forwardedProps/index.d.ts +383 -0
- package/types/modules/forwardedProps/index.d.ts.map +1 -0
- package/types/modules/getBoundingClientRect/index.d.ts +10 -0
- package/types/modules/getBoundingClientRect/index.d.ts.map +1 -0
- package/types/modules/invariant.d.ts +3 -0
- package/types/modules/invariant.d.ts.map +1 -0
- package/types/modules/isSelectionValid/index.d.ts +10 -0
- package/types/modules/isSelectionValid/index.d.ts.map +1 -0
- package/types/modules/isWebColor/index.d.ts +10 -0
- package/types/modules/isWebColor/index.d.ts.map +1 -0
- package/types/modules/mergeRefs/index.d.ts +11 -0
- package/types/modules/mergeRefs/index.d.ts.map +1 -0
- package/types/modules/modality/index.d.ts +17 -0
- package/types/modules/modality/index.d.ts.map +1 -0
- package/types/modules/multiplyStyleLengthValue/index.d.ts +10 -0
- package/types/modules/multiplyStyleLengthValue/index.d.ts.map +1 -0
- package/types/modules/normalizeColor/index.d.ts +10 -0
- package/types/modules/normalizeColor/index.d.ts.map +1 -0
- package/types/modules/pick/index.d.ts +12 -0
- package/types/modules/pick/index.d.ts.map +1 -0
- package/types/modules/processColor/index.d.ts +11 -0
- package/types/modules/processColor/index.d.ts.map +1 -0
- package/types/modules/requestIdleCallback/index.d.ts +3 -0
- package/types/modules/requestIdleCallback/index.d.ts.map +1 -0
- package/types/modules/setValueForStyles/dangerousStyleValue.d.ts +11 -0
- package/types/modules/setValueForStyles/dangerousStyleValue.d.ts.map +1 -0
- package/types/modules/setValueForStyles/index.d.ts +9 -0
- package/types/modules/setValueForStyles/index.d.ts.map +1 -0
- package/types/modules/unitlessNumbers/index.d.ts +60 -0
- package/types/modules/unitlessNumbers/index.d.ts.map +1 -0
- package/types/modules/useElementLayout/index.d.ts +4 -0
- package/types/modules/useElementLayout/index.d.ts.map +1 -0
- package/types/modules/useEvent/index.d.ts +24 -0
- package/types/modules/useEvent/index.d.ts.map +1 -0
- package/types/modules/useHover/index.d.ts +21 -0
- package/types/modules/useHover/index.d.ts.map +1 -0
- package/types/modules/useLayoutEffect/index.d.ts +13 -0
- package/types/modules/useLayoutEffect/index.d.ts.map +1 -0
- package/types/modules/useLocale/index.d.ts +14 -0
- package/types/modules/useLocale/index.d.ts.map +1 -0
- package/types/modules/useLocale/isLocaleRTL.d.ts +13 -0
- package/types/modules/useLocale/isLocaleRTL.d.ts.map +1 -0
- package/types/modules/useMergeRefs/index.d.ts +11 -0
- package/types/modules/useMergeRefs/index.d.ts.map +1 -0
- package/types/modules/usePlatformMethods/index.d.ts +18 -0
- package/types/modules/usePlatformMethods/index.d.ts.map +1 -0
- package/types/modules/useStable/index.d.ts +10 -0
- package/types/modules/useStable/index.d.ts.map +1 -0
- package/types/styleTypes.d.ts +211 -0
- package/types/styleTypes.d.ts.map +1 -0
- package/types/types.d.ts +46 -0
- package/types/types.d.ts.map +1 -0
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
const defaultProps = {
|
|
2
|
+
children: !0,
|
|
3
|
+
dataSet: !0,
|
|
4
|
+
nativeID: !0,
|
|
5
|
+
ref: !0,
|
|
6
|
+
suppressHydrationWarning: !0,
|
|
7
|
+
testID: !0,
|
|
8
|
+
id: !0
|
|
9
|
+
},
|
|
10
|
+
accessibilityProps = {
|
|
11
|
+
accessibilityActiveDescendant: !0,
|
|
12
|
+
accessibilityAtomic: !0,
|
|
13
|
+
accessibilityAutoComplete: !0,
|
|
14
|
+
accessibilityBusy: !0,
|
|
15
|
+
accessibilityChecked: !0,
|
|
16
|
+
accessibilityColumnCount: !0,
|
|
17
|
+
accessibilityColumnIndex: !0,
|
|
18
|
+
accessibilityColumnSpan: !0,
|
|
19
|
+
accessibilityControls: !0,
|
|
20
|
+
accessibilityCurrent: !0,
|
|
21
|
+
accessibilityDescribedBy: !0,
|
|
22
|
+
accessibilityDetails: !0,
|
|
23
|
+
accessibilityDisabled: !0,
|
|
24
|
+
accessibilityErrorMessage: !0,
|
|
25
|
+
accessibilityExpanded: !0,
|
|
26
|
+
accessibilityFlowTo: !0,
|
|
27
|
+
accessibilityHasPopup: !0,
|
|
28
|
+
accessibilityHidden: !0,
|
|
29
|
+
accessibilityInvalid: !0,
|
|
30
|
+
accessibilityKeyShortcuts: !0,
|
|
31
|
+
accessibilityLabel: !0,
|
|
32
|
+
accessibilityLabelledBy: !0,
|
|
33
|
+
accessibilityLevel: !0,
|
|
34
|
+
accessibilityLiveRegion: !0,
|
|
35
|
+
accessibilityModal: !0,
|
|
36
|
+
accessibilityMultiline: !0,
|
|
37
|
+
accessibilityMultiSelectable: !0,
|
|
38
|
+
accessibilityOrientation: !0,
|
|
39
|
+
accessibilityOwns: !0,
|
|
40
|
+
accessibilityPlaceholder: !0,
|
|
41
|
+
accessibilityPosInSet: !0,
|
|
42
|
+
accessibilityPressed: !0,
|
|
43
|
+
accessibilityReadOnly: !0,
|
|
44
|
+
accessibilityRequired: !0,
|
|
45
|
+
accessibilityRole: !0,
|
|
46
|
+
accessibilityRoleDescription: !0,
|
|
47
|
+
accessibilityRowCount: !0,
|
|
48
|
+
accessibilityRowIndex: !0,
|
|
49
|
+
accessibilityRowSpan: !0,
|
|
50
|
+
accessibilitySelected: !0,
|
|
51
|
+
accessibilitySetSize: !0,
|
|
52
|
+
accessibilitySort: !0,
|
|
53
|
+
accessibilityValueMax: !0,
|
|
54
|
+
accessibilityValueMin: !0,
|
|
55
|
+
accessibilityValueNow: !0,
|
|
56
|
+
accessibilityValueText: !0,
|
|
57
|
+
dir: !0,
|
|
58
|
+
focusable: !0
|
|
59
|
+
},
|
|
60
|
+
clickProps = {
|
|
61
|
+
onClick: !0,
|
|
62
|
+
onClickCapture: !0,
|
|
63
|
+
onContextMenu: !0
|
|
64
|
+
},
|
|
65
|
+
focusProps = {
|
|
66
|
+
onBlur: !0,
|
|
67
|
+
onFocus: !0
|
|
68
|
+
},
|
|
69
|
+
keyboardProps = {
|
|
70
|
+
onKeyDown: !0,
|
|
71
|
+
onKeyDownCapture: !0,
|
|
72
|
+
onKeyUp: !0,
|
|
73
|
+
onKeyUpCapture: !0
|
|
74
|
+
},
|
|
75
|
+
mouseProps = {
|
|
76
|
+
onMouseDown: !0,
|
|
77
|
+
onMouseEnter: !0,
|
|
78
|
+
onMouseLeave: !0,
|
|
79
|
+
onMouseMove: !0,
|
|
80
|
+
onMouseOver: !0,
|
|
81
|
+
onMouseOut: !0,
|
|
82
|
+
onMouseUp: !0
|
|
83
|
+
},
|
|
84
|
+
touchProps = {
|
|
85
|
+
onTouchCancel: !0,
|
|
86
|
+
onTouchCancelCapture: !0,
|
|
87
|
+
onTouchEnd: !0,
|
|
88
|
+
onTouchEndCapture: !0,
|
|
89
|
+
onTouchMove: !0,
|
|
90
|
+
onTouchMoveCapture: !0,
|
|
91
|
+
onTouchStart: !0,
|
|
92
|
+
onTouchStartCapture: !0
|
|
93
|
+
},
|
|
94
|
+
styleProps = {
|
|
95
|
+
classList: !0,
|
|
96
|
+
className: !0,
|
|
97
|
+
style: !0
|
|
98
|
+
},
|
|
99
|
+
forwardedProps = {
|
|
100
|
+
defaultProps,
|
|
101
|
+
accessibilityProps,
|
|
102
|
+
clickProps,
|
|
103
|
+
focusProps,
|
|
104
|
+
keyboardProps,
|
|
105
|
+
mouseProps,
|
|
106
|
+
touchProps,
|
|
107
|
+
styleProps
|
|
108
|
+
},
|
|
109
|
+
forwardPropsListText = {
|
|
110
|
+
...defaultProps,
|
|
111
|
+
...accessibilityProps,
|
|
112
|
+
...clickProps,
|
|
113
|
+
...focusProps,
|
|
114
|
+
...keyboardProps,
|
|
115
|
+
...mouseProps,
|
|
116
|
+
...touchProps,
|
|
117
|
+
...styleProps,
|
|
118
|
+
href: !0,
|
|
119
|
+
lang: !0,
|
|
120
|
+
pointerEvents: !0
|
|
121
|
+
},
|
|
122
|
+
forwardPropsListView = {
|
|
123
|
+
...forwardPropsListText,
|
|
124
|
+
onScroll: !0,
|
|
125
|
+
onWheel: !0
|
|
126
|
+
};
|
|
127
|
+
export { accessibilityProps, clickProps, defaultProps, focusProps, forwardPropsListText, forwardPropsListView, forwardedProps, keyboardProps, mouseProps, styleProps, touchProps };
|
|
128
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["defaultProps","children","dataSet","nativeID","ref","suppressHydrationWarning","testID","id","accessibilityProps","accessibilityActiveDescendant","accessibilityAtomic","accessibilityAutoComplete","accessibilityBusy","accessibilityChecked","accessibilityColumnCount","accessibilityColumnIndex","accessibilityColumnSpan","accessibilityControls","accessibilityCurrent","accessibilityDescribedBy","accessibilityDetails","accessibilityDisabled","accessibilityErrorMessage","accessibilityExpanded","accessibilityFlowTo","accessibilityHasPopup","accessibilityHidden","accessibilityInvalid","accessibilityKeyShortcuts","accessibilityLabel","accessibilityLabelledBy","accessibilityLevel","accessibilityLiveRegion","accessibilityModal","accessibilityMultiline","accessibilityMultiSelectable","accessibilityOrientation","accessibilityOwns","accessibilityPlaceholder","accessibilityPosInSet","accessibilityPressed","accessibilityReadOnly","accessibilityRequired","accessibilityRole","accessibilityRoleDescription","accessibilityRowCount","accessibilityRowIndex","accessibilityRowSpan","accessibilitySelected","accessibilitySetSize","accessibilitySort","accessibilityValueMax","accessibilityValueMin","accessibilityValueNow","accessibilityValueText","dir","focusable","clickProps","onClick","onClickCapture","onContextMenu","focusProps","onBlur","onFocus","keyboardProps","onKeyDown","onKeyDownCapture","onKeyUp","onKeyUpCapture","mouseProps","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOver","onMouseOut","onMouseUp","touchProps","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","styleProps","classList","className","style","forwardedProps","forwardPropsListText","href","lang","pointerEvents","forwardPropsListView","onScroll","onWheel"],"sources":["../../../../src/modules/forwardedProps/index.tsx"],"sourcesContent":[null],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getBoundingClientRect","node","nodeType"],"sources":["../../../../src/modules/getBoundingClientRect/index.tsx"],"sourcesContent":[null],"mappings":"AASO,MAAMA,qBAAA,GAAyBC,IAAA,IAAgD;EACpF,IAAIA,IAAA,IAAQ,QACQA,IAAA,CAAKC,QAAA,KAAa,KACnB,OAAOD,IAAA,CAAKD,qBAAA,IAA0B,YACrD,OAAOC,IAAA,CAAKD,qBAAA,CAAsB;AAGxC","ignoreList":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
function invariant(condition, log, ...logVars) {
|
|
2
|
+
if (!condition) throw new Error(process.env.NODE_ENV === "development" ? log.split("%s").flatMap((chunk, i) => [chunk, logVars[i]]).join("") : log);
|
|
3
|
+
}
|
|
4
|
+
function warning(condition, log, ...logVars) {
|
|
5
|
+
if (process.env.NODE_ENV === "development") try {
|
|
6
|
+
invariant(condition, log, ...logVars);
|
|
7
|
+
} catch (err) {
|
|
8
|
+
console.warn(err);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export { invariant, warning };
|
|
12
|
+
//# sourceMappingURL=invariant.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["invariant","condition","log","logVars","Error","process","env","NODE_ENV","split","flatMap","chunk","i","join","warning","err","console","warn"],"sources":["../../../src/modules/invariant.ts"],"sourcesContent":[null],"mappings":"AAAO,SAASA,UAAUC,SAAA,EAAgBC,GAAA,KAAgBC,OAAA,EAAmB;EAC3E,IAAI,CAACF,SAAA,EACH,MAAM,IAAIG,KAAA,CACRC,OAAA,CAAQC,GAAA,CAAIC,QAAA,KAAa,gBACrBL,GAAA,CACGM,KAAA,CAAM,IAAI,EACVC,OAAA,CAAQ,CAACC,KAAA,EAAOC,CAAA,KAAM,CAACD,KAAA,EAAOP,OAAA,CAAQQ,CAAC,CAAC,CAAC,EACzCC,IAAA,CAAK,EAAE,IACVV,GACN;AAEJ;AAEO,SAASW,QAAQZ,SAAA,EAAgBC,GAAA,KAAgBC,OAAA,EAAmB;EACzE,IAAIE,OAAA,CAAQC,GAAA,CAAIC,QAAA,KAAa,eAC3B,IAAI;IACFP,SAAA,CAAUC,SAAA,EAAWC,GAAA,EAAK,GAAGC,OAAO;EACtC,SAASW,GAAA,EAAK;IACZC,OAAA,CAAQC,IAAA,CAAKF,GAAG;EAElB;AAEJ","ignoreList":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
function isSelectionValid() {
|
|
2
|
+
const selection = window.getSelection();
|
|
3
|
+
if (!selection) return !1;
|
|
4
|
+
const string = selection.toString(),
|
|
5
|
+
anchorNode = selection.anchorNode,
|
|
6
|
+
focusNode = selection.focusNode,
|
|
7
|
+
isTextNode = anchorNode && anchorNode.nodeType === window.Node.TEXT_NODE || focusNode && focusNode.nodeType === window.Node.TEXT_NODE;
|
|
8
|
+
return string.length >= 1 && string !== `
|
|
9
|
+
` && !!isTextNode;
|
|
10
|
+
}
|
|
11
|
+
export { isSelectionValid };
|
|
12
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["isSelectionValid","selection","window","getSelection","string","toString","anchorNode","focusNode","isTextNode","nodeType","Node","TEXT_NODE","length"],"sources":["../../../../src/modules/isSelectionValid/index.tsx"],"sourcesContent":[null],"mappings":"AASO,SAASA,iBAAA,EAA4B;EAC1C,MAAMC,SAAA,GAAYC,MAAA,CAAOC,YAAA,CAAa;EACtC,IAAI,CAACF,SAAA,EAAW,OAAO;EACvB,MAAMG,MAAA,GAASH,SAAA,CAAUI,QAAA,CAAS;IAC5BC,UAAA,GAAaL,SAAA,CAAUK,UAAA;IACvBC,SAAA,GAAYN,SAAA,CAAUM,SAAA;IACtBC,UAAA,GACHF,UAAA,IAAcA,UAAA,CAAWG,QAAA,KAAaP,MAAA,CAAOQ,IAAA,CAAKC,SAAA,IAClDJ,SAAA,IAAaA,SAAA,CAAUE,QAAA,KAAaP,MAAA,CAAOQ,IAAA,CAAKC,SAAA;EACnD,OAAOP,MAAA,CAAOQ,MAAA,IAAU,KAAKR,MAAA,KAAW;AAAA,KAAQ,CAAC,CAACI,UAAA;AACpD","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["isWebColor","color","startsWith"],"sources":["../../../../src/modules/isWebColor/index.tsx"],"sourcesContent":[null],"mappings":"AASO,MAAMA,UAAA,GAAcC,KAAA,IACzBA,KAAA,KAAU,kBACVA,KAAA,KAAU,kBACVA,KAAA,KAAU,aACVA,KAAA,CAAMC,UAAA,CAAW,MAAM","ignoreList":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { render } from "@testing-library/react";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import mergeRefs from "../index.mjs";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
describe("modules/mergeRefs", () => {
|
|
6
|
+
test("merges refs of different types", () => {
|
|
7
|
+
const ref = React.createRef(null);
|
|
8
|
+
let functionRefValue = null,
|
|
9
|
+
hookRef;
|
|
10
|
+
function Component() {
|
|
11
|
+
const functionRef = x => {
|
|
12
|
+
functionRefValue = x;
|
|
13
|
+
};
|
|
14
|
+
return hookRef = React.useRef(null), /* @__PURE__ */jsx("div", {
|
|
15
|
+
ref: mergeRefs(ref, hookRef, functionRef)
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
render(/* @__PURE__ */jsx(Component, {})), expect(ref.current).toBeInstanceOf(HTMLDivElement), expect(hookRef.current).toBeInstanceOf(HTMLDivElement), expect(functionRefValue).toBeInstanceOf(HTMLDivElement);
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
//# sourceMappingURL=index-test.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["render","React","mergeRefs","jsx","describe","test","ref","createRef","functionRefValue","hookRef","Component","functionRef","x","useRef","expect","current","toBeInstanceOf","HTMLDivElement"],"sources":["../../../../../src/modules/mergeRefs/__tests__/index-test.tsx"],"sourcesContent":[null],"mappings":"AAOA,SAASA,MAAA,QAAc;AACvB,YAAYC,KAAA,MAAW;AAEvB,OAAOC,SAAA,MAAe;AAYT,SAAAC,GAAA;AAVbC,QAAA,CAAS,qBAAqB,MAAM;EAClCC,IAAA,CAAK,kCAAkC,MAAM;IAC3C,MAAMC,GAAA,GAAML,KAAA,CAAMM,SAAA,CAAU,IAAI;IAChC,IAAIC,gBAAA,GAAmB;MACnBC,OAAA;IACJ,SAASC,UAAA,EAAY;MACnB,MAAMC,WAAA,GAAeC,CAAA,IAAM;QACzBJ,gBAAA,GAAmBI,CAAA;MACrB;MACA,OAAAH,OAAA,GAAUR,KAAA,CAAMY,MAAA,CAAO,IAAI,GACpB,eAAAV,GAAA,CAAC;QAAIG,GAAA,EAAKJ,SAAA,CAAUI,GAAA,EAAKG,OAAA,EAASE,WAAW;MAAA,CAAG;IACzD;IAEAX,MAAA,CAAO,eAAAG,GAAA,CAACO,SAAA,IAAU,CAAE,GAEpBI,MAAA,CAAOR,GAAA,CAAIS,OAAO,EAAEC,cAAA,CAAeC,cAAc,GACjDH,MAAA,CAAOL,OAAA,CAAQM,OAAO,EAAEC,cAAA,CAAeC,cAAc,GACrDH,MAAA,CAAON,gBAAgB,EAAEQ,cAAA,CAAeC,cAAc;EACxD,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
function mergeRefs(...args) {
|
|
2
|
+
return function (node) {
|
|
3
|
+
args.forEach(ref => {
|
|
4
|
+
if (ref != null) {
|
|
5
|
+
if (typeof ref == "function") {
|
|
6
|
+
ref(node);
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
if (typeof ref == "object") {
|
|
10
|
+
ref.current = node;
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
console.error(`mergeRefs cannot handle Refs of type boolean, number or string, received ref ${String(ref)}`);
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export { mergeRefs };
|
|
19
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["mergeRefs","args","node","forEach","ref","current","console","error","String"],"sources":["../../../../src/modules/mergeRefs/index.tsx"],"sourcesContent":[null],"mappings":"AAWO,SAASA,UAAA,GACXC,IAAA,EACiC;EACpC,OAAO,UAAoBC,IAAA,EAA0B;IACnDD,IAAA,CAAKE,OAAA,CAASC,GAAA,IAAwB;MACpC,IAAIA,GAAA,IAAO,MAGX;QAAA,IAAI,OAAOA,GAAA,IAAQ,YAAY;UAC7BA,GAAA,CAAIF,IAAI;UACR;QACF;QACA,IAAI,OAAOE,GAAA,IAAQ,UAAU;UAE3BA,GAAA,CAAIC,OAAA,GAAUH,IAAA;UACd;QACF;QACAI,OAAA,CAAQC,KAAA,CACN,gFAAgFC,MAAA,CAC9EJ,GACF,CAAC,EACH;MAAA;IACF,CAAC;EACH;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { clearPointers, createEventTarget, describeWithPointerEvent, setPointerEvent, testWithPointerType } from "dom-event-testing-library";
|
|
2
|
+
import { getActiveModality, getModality, testOnly_resetActiveModality } from "../index.mjs";
|
|
3
|
+
describeWithPointerEvent("modules/modality", hasPointerEvent => {
|
|
4
|
+
let rootNode;
|
|
5
|
+
beforeEach(() => {
|
|
6
|
+
setPointerEvent(hasPointerEvent), rootNode = document.createElement("div"), document.body.appendChild(rootNode);
|
|
7
|
+
}), afterEach(() => {
|
|
8
|
+
document.body.removeChild(rootNode), rootNode = null, clearPointers(), testOnly_resetActiveModality();
|
|
9
|
+
}), describe("getModality", () => {
|
|
10
|
+
testWithPointerType("reflects currently-in-use modality", pointerType => {
|
|
11
|
+
const target = createEventTarget(rootNode);
|
|
12
|
+
expect(getModality()).toBe("keyboard"), target.pointerdown({
|
|
13
|
+
pointerType
|
|
14
|
+
}), expect(getModality()).toBe(pointerType), target.pointerup({
|
|
15
|
+
pointerType
|
|
16
|
+
}), target.keydown(), expect(getModality()).toBe("keyboard"), pointerType !== "touch" && (target.pointermove({
|
|
17
|
+
pointerType
|
|
18
|
+
}), expect(getModality()).toBe(pointerType), target.keydown(), expect(getModality()).toBe("keyboard"));
|
|
19
|
+
});
|
|
20
|
+
}), describe("getActiveModality", () => {
|
|
21
|
+
testWithPointerType("reflects last actively used modality", pointerType => {
|
|
22
|
+
const target = createEventTarget(rootNode);
|
|
23
|
+
expect(getActiveModality()).toBe("keyboard"), target.pointerdown({
|
|
24
|
+
pointerType
|
|
25
|
+
}), expect(getActiveModality()).toBe(pointerType), target.pointerup({
|
|
26
|
+
pointerType
|
|
27
|
+
}), target.keydown(), pointerType !== "touch" && (target.pointermove({
|
|
28
|
+
pointerType
|
|
29
|
+
}), expect(getActiveModality()).toBe("keyboard"));
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=index-test.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["clearPointers","createEventTarget","describeWithPointerEvent","setPointerEvent","testWithPointerType","getActiveModality","getModality","testOnly_resetActiveModality","hasPointerEvent","rootNode","beforeEach","document","createElement","body","appendChild","afterEach","removeChild","describe","pointerType","target","expect","toBe","pointerdown","pointerup","keydown","pointermove"],"sources":["../../../../../src/modules/modality/__tests__/index-test.tsx"],"sourcesContent":[null],"mappings":"AAOA,SACEA,aAAA,EACAC,iBAAA,EACAC,wBAAA,EACAC,eAAA,EACAC,mBAAA,QACK;AAEP,SAASC,iBAAA,EAAmBC,WAAA,EAAaC,4BAAA,QAAoC;AAE7EL,wBAAA,CAAyB,oBAAqBM,eAAA,IAAoB;EAChE,IAAIC,QAAA;EAEJC,UAAA,CAAW,MAAM;IACfP,eAAA,CAAgBK,eAAe,GAC/BC,QAAA,GAAWE,QAAA,CAASC,aAAA,CAAc,KAAK,GACvCD,QAAA,CAASE,IAAA,CAAKC,WAAA,CAAYL,QAAQ;EACpC,CAAC,GAEDM,SAAA,CAAU,MAAM;IACdJ,QAAA,CAASE,IAAA,CAAKG,WAAA,CAAYP,QAAQ,GAClCA,QAAA,GAAW,MACXT,aAAA,CAAc,GACdO,4BAAA,CAA6B;EAC/B,CAAC,GAEDU,QAAA,CAAS,eAAe,MAAM;IAC5Bb,mBAAA,CAAoB,sCAAuCc,WAAA,IAAgB;MACzE,MAAMC,MAAA,GAASlB,iBAAA,CAAkBQ,QAAQ;MACzCW,MAAA,CAAOd,WAAA,CAAY,CAAC,EAAEe,IAAA,CAAK,UAAU,GACrCF,MAAA,CAAOG,WAAA,CAAY;QAAEJ;MAAY,CAAC,GAClCE,MAAA,CAAOd,WAAA,CAAY,CAAC,EAAEe,IAAA,CAAKH,WAAW,GACtCC,MAAA,CAAOI,SAAA,CAAU;QAAEL;MAAY,CAAC,GAChCC,MAAA,CAAOK,OAAA,CAAQ,GACfJ,MAAA,CAAOd,WAAA,CAAY,CAAC,EAAEe,IAAA,CAAK,UAAU,GACjCH,WAAA,KAAgB,YAClBC,MAAA,CAAOM,WAAA,CAAY;QAAEP;MAAY,CAAC,GAClCE,MAAA,CAAOd,WAAA,CAAY,CAAC,EAAEe,IAAA,CAAKH,WAAW,GACtCC,MAAA,CAAOK,OAAA,CAAQ,GACfJ,MAAA,CAAOd,WAAA,CAAY,CAAC,EAAEe,IAAA,CAAK,UAAU;IAEzC,CAAC;EACH,CAAC,GAEDJ,QAAA,CAAS,qBAAqB,MAAM;IAClCb,mBAAA,CAAoB,wCAAyCc,WAAA,IAAgB;MAC3E,MAAMC,MAAA,GAASlB,iBAAA,CAAkBQ,QAAQ;MACzCW,MAAA,CAAOf,iBAAA,CAAkB,CAAC,EAAEgB,IAAA,CAAK,UAAU,GAC3CF,MAAA,CAAOG,WAAA,CAAY;QAAEJ;MAAY,CAAC,GAClCE,MAAA,CAAOf,iBAAA,CAAkB,CAAC,EAAEgB,IAAA,CAAKH,WAAW,GAC5CC,MAAA,CAAOI,SAAA,CAAU;QAAEL;MAAY,CAAC,GAChCC,MAAA,CAAOK,OAAA,CAAQ,GACXN,WAAA,KAAgB,YAClBC,MAAA,CAAOM,WAAA,CAAY;QAAEP;MAAY,CAAC,GAClCE,MAAA,CAAOf,iBAAA,CAAkB,CAAC,EAAEgB,IAAA,CAAK,UAAU;IAE/C,CAAC;EACH,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { canUseDOM } from "../canUseDOM.mjs";
|
|
2
|
+
import { createEventHandle } from "../createEventHandle/index.mjs";
|
|
3
|
+
const supportsPointerEvent = () => typeof window < "u" && window.PointerEvent != null;
|
|
4
|
+
let activeModality = "keyboard",
|
|
5
|
+
modality = "keyboard",
|
|
6
|
+
previousModality,
|
|
7
|
+
previousActiveModality,
|
|
8
|
+
isEmulatingMouseEvents = !1;
|
|
9
|
+
const listeners = /* @__PURE__ */new Set(),
|
|
10
|
+
KEYBOARD = "keyboard",
|
|
11
|
+
MOUSE = "mouse",
|
|
12
|
+
TOUCH = "touch",
|
|
13
|
+
BLUR = "blur",
|
|
14
|
+
CONTEXTMENU = "contextmenu",
|
|
15
|
+
FOCUS = "focus",
|
|
16
|
+
KEYDOWN = "keydown",
|
|
17
|
+
MOUSEDOWN = "mousedown",
|
|
18
|
+
MOUSEMOVE = "mousemove",
|
|
19
|
+
MOUSEUP = "mouseup",
|
|
20
|
+
POINTERDOWN = "pointerdown",
|
|
21
|
+
POINTERMOVE = "pointermove",
|
|
22
|
+
SCROLL = "scroll",
|
|
23
|
+
SELECTIONCHANGE = "selectionchange",
|
|
24
|
+
TOUCHCANCEL = "touchcancel",
|
|
25
|
+
TOUCHMOVE = "touchmove",
|
|
26
|
+
TOUCHSTART = "touchstart",
|
|
27
|
+
VISIBILITYCHANGE = "visibilitychange",
|
|
28
|
+
bubbleOptions = {
|
|
29
|
+
passive: !0
|
|
30
|
+
},
|
|
31
|
+
captureOptions = {
|
|
32
|
+
capture: !0,
|
|
33
|
+
passive: !0
|
|
34
|
+
},
|
|
35
|
+
addBlurListener = createEventHandle(BLUR, bubbleOptions),
|
|
36
|
+
addFocusListener = createEventHandle(FOCUS, bubbleOptions),
|
|
37
|
+
addVisibilityChangeListener = createEventHandle(VISIBILITYCHANGE, captureOptions),
|
|
38
|
+
addKeyDownListener = createEventHandle(KEYDOWN, captureOptions),
|
|
39
|
+
addPointerDownListener = createEventHandle(POINTERDOWN, captureOptions),
|
|
40
|
+
addPointerMoveListener = createEventHandle(POINTERMOVE, captureOptions),
|
|
41
|
+
addContextMenuListener = createEventHandle(CONTEXTMENU, captureOptions),
|
|
42
|
+
addMouseDownListener = createEventHandle(MOUSEDOWN, captureOptions),
|
|
43
|
+
addMouseMoveListener = createEventHandle(MOUSEMOVE, captureOptions),
|
|
44
|
+
addMouseUpListener = createEventHandle(MOUSEUP, captureOptions),
|
|
45
|
+
addScrollListener = createEventHandle(SCROLL, captureOptions),
|
|
46
|
+
addSelectiomChangeListener = createEventHandle(SELECTIONCHANGE, captureOptions),
|
|
47
|
+
addTouchCancelListener = createEventHandle(TOUCHCANCEL, captureOptions),
|
|
48
|
+
addTouchMoveListener = createEventHandle(TOUCHMOVE, captureOptions),
|
|
49
|
+
addTouchStartListener = createEventHandle(TOUCHSTART, captureOptions);
|
|
50
|
+
function restoreModality() {
|
|
51
|
+
(previousModality != null || previousActiveModality != null) && (previousModality != null && (modality = previousModality, previousModality = null), previousActiveModality != null && (activeModality = previousActiveModality, previousActiveModality = null), callListeners());
|
|
52
|
+
}
|
|
53
|
+
function onBlurWindow() {
|
|
54
|
+
previousModality = modality, previousActiveModality = activeModality, activeModality = KEYBOARD, modality = KEYBOARD, callListeners(), isEmulatingMouseEvents = !1;
|
|
55
|
+
}
|
|
56
|
+
function onFocusWindow() {
|
|
57
|
+
restoreModality();
|
|
58
|
+
}
|
|
59
|
+
function onKeyDown(event) {
|
|
60
|
+
event.metaKey || event.altKey || event.ctrlKey || modality !== KEYBOARD && (modality = KEYBOARD, activeModality = KEYBOARD, callListeners());
|
|
61
|
+
}
|
|
62
|
+
function onVisibilityChange() {
|
|
63
|
+
document.visibilityState !== "hidden" && restoreModality();
|
|
64
|
+
}
|
|
65
|
+
function onPointerish(event) {
|
|
66
|
+
const eventType = event.type;
|
|
67
|
+
if (supportsPointerEvent()) {
|
|
68
|
+
if (eventType === POINTERDOWN) {
|
|
69
|
+
activeModality !== event.pointerType && (modality = event.pointerType, activeModality = event.pointerType, callListeners());
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
if (eventType === POINTERMOVE) {
|
|
73
|
+
modality !== event.pointerType && (modality = event.pointerType, callListeners());
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
} else {
|
|
77
|
+
if (isEmulatingMouseEvents || (eventType === MOUSEDOWN && activeModality !== MOUSE && (modality = MOUSE, activeModality = MOUSE, callListeners()), eventType === MOUSEMOVE && modality !== MOUSE && (modality = MOUSE, callListeners())), eventType === TOUCHSTART) {
|
|
78
|
+
isEmulatingMouseEvents = !0, event.touches && event.touches.length > 1 && (isEmulatingMouseEvents = !1), activeModality !== TOUCH && (modality = TOUCH, activeModality = TOUCH, callListeners());
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
(eventType === CONTEXTMENU || eventType === MOUSEUP || eventType === SELECTIONCHANGE || eventType === SCROLL || eventType === TOUCHCANCEL || eventType === TOUCHMOVE) && (isEmulatingMouseEvents = !1);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
canUseDOM && (addBlurListener(window, onBlurWindow), addFocusListener(window, onFocusWindow), addKeyDownListener(document, onKeyDown), addPointerDownListener(document, onPointerish), addPointerMoveListener(document, onPointerish), addVisibilityChangeListener(document, onVisibilityChange), addContextMenuListener(document, onPointerish), addMouseDownListener(document, onPointerish), addMouseMoveListener(document, onPointerish), addMouseUpListener(document, onPointerish), addTouchCancelListener(document, onPointerish), addTouchMoveListener(document, onPointerish), addTouchStartListener(document, onPointerish), addSelectiomChangeListener(document, onPointerish), addScrollListener(document, onPointerish));
|
|
85
|
+
function callListeners() {
|
|
86
|
+
const value = {
|
|
87
|
+
activeModality,
|
|
88
|
+
modality
|
|
89
|
+
};
|
|
90
|
+
listeners.forEach(listener => {
|
|
91
|
+
listener(value);
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
function getActiveModality() {
|
|
95
|
+
return activeModality;
|
|
96
|
+
}
|
|
97
|
+
function getModality() {
|
|
98
|
+
return modality;
|
|
99
|
+
}
|
|
100
|
+
function addModalityListener(listener) {
|
|
101
|
+
return listeners.add(listener), () => {
|
|
102
|
+
listeners.delete(listener);
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
function testOnly_resetActiveModality() {
|
|
106
|
+
isEmulatingMouseEvents = !1, activeModality = KEYBOARD, modality = KEYBOARD;
|
|
107
|
+
}
|
|
108
|
+
export { addModalityListener, getActiveModality, getModality, testOnly_resetActiveModality };
|
|
109
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["canUseDOM","createEventHandle","supportsPointerEvent","window","PointerEvent","activeModality","modality","previousModality","previousActiveModality","isEmulatingMouseEvents","listeners","Set","KEYBOARD","MOUSE","TOUCH","BLUR","CONTEXTMENU","FOCUS","KEYDOWN","MOUSEDOWN","MOUSEMOVE","MOUSEUP","POINTERDOWN","POINTERMOVE","SCROLL","SELECTIONCHANGE","TOUCHCANCEL","TOUCHMOVE","TOUCHSTART","VISIBILITYCHANGE","bubbleOptions","passive","captureOptions","capture","addBlurListener","addFocusListener","addVisibilityChangeListener","addKeyDownListener","addPointerDownListener","addPointerMoveListener","addContextMenuListener","addMouseDownListener","addMouseMoveListener","addMouseUpListener","addScrollListener","addSelectiomChangeListener","addTouchCancelListener","addTouchMoveListener","addTouchStartListener","restoreModality","callListeners","onBlurWindow","onFocusWindow","onKeyDown","event","metaKey","altKey","ctrlKey","onVisibilityChange","document","visibilityState","onPointerish","eventType","type","pointerType","touches","length","value","forEach","listener","getActiveModality","getModality","addModalityListener","add","delete","testOnly_resetActiveModality"],"sources":["../../../../src/modules/modality/index.tsx"],"sourcesContent":[null],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import multiplyStyleLengthValue from "../index.mjs";
|
|
2
|
+
describe("modules/multiplyStyleLengthValue", () => {
|
|
3
|
+
test("number", () => {
|
|
4
|
+
expect(multiplyStyleLengthValue(2, -1)).toEqual(-2), expect(multiplyStyleLengthValue(2, 2)).toEqual(4), expect(multiplyStyleLengthValue(2.5, 2)).toEqual(5);
|
|
5
|
+
}), test("length", () => {
|
|
6
|
+
expect(multiplyStyleLengthValue("2rem", -1)).toEqual("-2rem"), expect(multiplyStyleLengthValue("2px", 2)).toEqual("4px"), expect(multiplyStyleLengthValue("2.5em", 2)).toEqual("5em"), expect(multiplyStyleLengthValue("2e3px", 2)).toEqual("4000px");
|
|
7
|
+
});
|
|
8
|
+
});
|
|
9
|
+
//# sourceMappingURL=index-test.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["multiplyStyleLengthValue","describe","test","expect","toEqual"],"sources":["../../../../../src/modules/multiplyStyleLengthValue/__tests__/index-test.tsx"],"sourcesContent":[null],"mappings":"AAOA,OAAOA,wBAAA,MAA8B;AAErCC,QAAA,CAAS,oCAAoC,MAAM;EACjDC,IAAA,CAAK,UAAU,MAAM;IACnBC,MAAA,CAAOH,wBAAA,CAAyB,GAAG,EAAE,CAAC,EAAEI,OAAA,CAAQ,EAAE,GAClDD,MAAA,CAAOH,wBAAA,CAAyB,GAAG,CAAC,CAAC,EAAEI,OAAA,CAAQ,CAAC,GAChDD,MAAA,CAAOH,wBAAA,CAAyB,KAAK,CAAC,CAAC,EAAEI,OAAA,CAAQ,CAAC;EACpD,CAAC,GAEDF,IAAA,CAAK,UAAU,MAAM;IACnBC,MAAA,CAAOH,wBAAA,CAAyB,QAAQ,EAAE,CAAC,EAAEI,OAAA,CAAQ,OAAO,GAC5DD,MAAA,CAAOH,wBAAA,CAAyB,OAAO,CAAC,CAAC,EAAEI,OAAA,CAAQ,KAAK,GACxDD,MAAA,CAAOH,wBAAA,CAAyB,SAAS,CAAC,CAAC,EAAEI,OAAA,CAAQ,KAAK,GAC1DD,MAAA,CAAOH,wBAAA,CAAyB,SAAS,CAAC,CAAC,EAAEI,OAAA,CAAQ,QAAQ;EAC/D,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const CSS_UNIT_RE = /^[+-]?\d*(?:\.\d+)?(?:[Ee][+-]?\d+)?(%|\w*)/,
|
|
2
|
+
getUnit = str => str.match(CSS_UNIT_RE)[1],
|
|
3
|
+
isNumeric = n => !isNaN(parseFloat(n)) && isFinite(n),
|
|
4
|
+
multiplyStyleLengthValue = (value, multiple) => {
|
|
5
|
+
if (typeof value == "string") {
|
|
6
|
+
const number = parseFloat(value) * multiple,
|
|
7
|
+
unit = getUnit(value);
|
|
8
|
+
return `${number}${unit}`;
|
|
9
|
+
} else if (isNumeric(value)) return value * multiple;
|
|
10
|
+
};
|
|
11
|
+
export { multiplyStyleLengthValue };
|
|
12
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["CSS_UNIT_RE","getUnit","str","match","isNumeric","n","isNaN","parseFloat","isFinite","multiplyStyleLengthValue","value","multiple","number","unit"],"sources":["../../../../src/modules/multiplyStyleLengthValue/index.tsx"],"sourcesContent":[null],"mappings":"AASA,MAAMA,WAAA,GAAc;EAEdC,OAAA,GAAWC,GAAA,IAAQA,GAAA,CAAIC,KAAA,CAAMH,WAAW,EAAE,CAAC;EAE3CI,SAAA,GAAaC,CAAA,IACV,CAACC,KAAA,CAAMC,UAAA,CAAWF,CAAC,CAAC,KAAKG,QAAA,CAASH,CAAC;EAG/BI,wBAAA,GAA2BA,CAACC,KAAA,EAAwBC,QAAA,KAAa;IAC5E,IAAI,OAAOD,KAAA,IAAU,UAAU;MAC7B,MAAME,MAAA,GAASL,UAAA,CAAWG,KAAK,IAAIC,QAAA;QAC7BE,IAAA,GAAOZ,OAAA,CAAQS,KAAK;MAC1B,OAAO,GAAGE,MAAM,GAAGC,IAAI;IACzB,WAAWT,SAAA,CAAUM,KAAK,GACxB,OAAOA,KAAA,GAAQC,QAAA;EAEnB","ignoreList":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { isWebColor } from "../isWebColor/index.mjs";
|
|
2
|
+
import { processColor } from "../processColor/index.mjs";
|
|
3
|
+
const normalizeColor = (color, opacity = 1) => {
|
|
4
|
+
if (color == null) return;
|
|
5
|
+
if (typeof color == "string" && isWebColor(color)) return color;
|
|
6
|
+
const colorInt = processColor(color);
|
|
7
|
+
if (colorInt != null) {
|
|
8
|
+
const r = colorInt >> 16 & 255,
|
|
9
|
+
g = colorInt >> 8 & 255,
|
|
10
|
+
b = colorInt & 255,
|
|
11
|
+
alpha = ((colorInt >> 24 & 255) / 255 * opacity).toFixed(2);
|
|
12
|
+
return `rgba(${r},${g},${b},${alpha})`;
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
export { normalizeColor };
|
|
16
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["isWebColor","processColor","normalizeColor","color","opacity","colorInt","r","g","b","alpha","toFixed"],"sources":["../../../../src/modules/normalizeColor/index.tsx"],"sourcesContent":[null],"mappings":"AASA,SAASA,UAAA,QAAkB;AAC3B,SAASC,YAAA,QAAoB;AAEtB,MAAMC,cAAA,GAAiBA,CAC5BC,KAAA,EACAC,OAAA,GAAU,MACQ;EAClB,IAAID,KAAA,IAAS,MAAM;EAEnB,IAAI,OAAOA,KAAA,IAAU,YAAYH,UAAA,CAAWG,KAAK,GAC/C,OAAOA,KAAA;EAGT,MAAME,QAAA,GAAWJ,YAAA,CAAaE,KAAK;EACnC,IAAIE,QAAA,IAAY,MAAM;IACpB,MAAMC,CAAA,GAAKD,QAAA,IAAY,KAAM;MACvBE,CAAA,GAAKF,QAAA,IAAY,IAAK;MACtBG,CAAA,GAAIH,QAAA,GAAW;MAEfI,KAAA,KADMJ,QAAA,IAAY,KAAM,OAAO,MAClBD,OAAA,EAASM,OAAA,CAAQ,CAAC;IACrC,OAAO,QAAQJ,CAAC,IAAIC,CAAC,IAAIC,CAAC,IAAIC,KAAK;EACrC;AACF","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["pick","obj","list","nextObj","key","hasOwnProperty"],"sources":["../../../../src/modules/pick/index.tsx"],"sourcesContent":[null],"mappings":"AASO,SAASA,KACdC,GAAA,EACAC,IAAA,EAGQ;EACR,MAAMC,OAAA,GAAU,CAAC;EACjB,WAAWC,GAAA,IAAOH,GAAA,EACZA,GAAA,CAAII,cAAA,CAAeD,GAAG,KACpBF,IAAA,CAAKE,GAAG,MAAM,OAChBD,OAAA,CAAQC,GAAG,IAAIH,GAAA,CAAIG,GAAG;EAI5B,OAAOD,OAAA;AACT","ignoreList":[]}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import processColor from "../index.mjs";
|
|
2
|
+
const platformSpecific = x => x;
|
|
3
|
+
describe("processColor", () => {
|
|
4
|
+
describe("predefined color names", () => {
|
|
5
|
+
it("should convert red", () => {
|
|
6
|
+
const colorFromString = processColor("red");
|
|
7
|
+
expect(colorFromString).toEqual(platformSpecific(4294901760));
|
|
8
|
+
}), it("should convert white", () => {
|
|
9
|
+
const colorFromString = processColor("white");
|
|
10
|
+
expect(colorFromString).toEqual(platformSpecific(4294967295));
|
|
11
|
+
}), it("should convert black", () => {
|
|
12
|
+
const colorFromString = processColor("black");
|
|
13
|
+
expect(colorFromString).toEqual(platformSpecific(4278190080));
|
|
14
|
+
}), it("should convert transparent", () => {
|
|
15
|
+
const colorFromString = processColor("transparent");
|
|
16
|
+
expect(colorFromString).toEqual(platformSpecific(0));
|
|
17
|
+
});
|
|
18
|
+
}), describe("RGB strings", () => {
|
|
19
|
+
it("should convert rgb(x, y, z)", () => {
|
|
20
|
+
const colorFromString = processColor("rgb(10, 20, 30)");
|
|
21
|
+
expect(colorFromString).toEqual(platformSpecific(4278850590));
|
|
22
|
+
});
|
|
23
|
+
}), describe("RGBA strings", () => {
|
|
24
|
+
it("should convert rgba(x, y, z, a)", () => {
|
|
25
|
+
const colorFromString = processColor("rgba(10, 20, 30, 0.4)");
|
|
26
|
+
expect(colorFromString).toEqual(platformSpecific(1711936542));
|
|
27
|
+
});
|
|
28
|
+
}), describe("HSL strings", () => {
|
|
29
|
+
it("should convert hsl(x, y%, z%)", () => {
|
|
30
|
+
const colorFromString = processColor("hsl(318, 69%, 55%)");
|
|
31
|
+
expect(colorFromString).toEqual(platformSpecific(4292558252));
|
|
32
|
+
});
|
|
33
|
+
}), describe("HSLA strings", () => {
|
|
34
|
+
it("should convert hsla(x, y%, z%, a)", () => {
|
|
35
|
+
const colorFromString = processColor("hsla(318, 69%, 55%, 0.25)");
|
|
36
|
+
expect(colorFromString).toEqual(platformSpecific(1088109996));
|
|
37
|
+
});
|
|
38
|
+
}), describe("hex strings", () => {
|
|
39
|
+
it("should convert #xxxxxx", () => {
|
|
40
|
+
const colorFromString = processColor("#1e83c9");
|
|
41
|
+
expect(colorFromString).toEqual(platformSpecific(4280189897));
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
//# sourceMappingURL=index-test.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["processColor","platformSpecific","x","describe","it","colorFromString","expect","toEqual"],"sources":["../../../../../src/modules/processColor/__tests__/index-test.tsx"],"sourcesContent":[null],"mappings":"AAOA,OAAOA,YAAA,MAAkB;AAEzB,MAAMC,gBAAA,GAAoBC,CAAA,IAAMA,CAAA;AAEhCC,QAAA,CAAS,gBAAgB,MAAM;EAC7BA,QAAA,CAAS,0BAA0B,MAAM;IACvCC,EAAA,CAAG,sBAAsB,MAAM;MAC7B,MAAMC,eAAA,GAAkBL,YAAA,CAAa,KAAK;MAE1CM,MAAA,CAAOD,eAAe,EAAEE,OAAA,CAAQN,gBAAA,CADZ,UACwC,CAAC;IAC/D,CAAC,GAEDG,EAAA,CAAG,wBAAwB,MAAM;MAC/B,MAAMC,eAAA,GAAkBL,YAAA,CAAa,OAAO;MAE5CM,MAAA,CAAOD,eAAe,EAAEE,OAAA,CAAQN,gBAAA,CADZ,UACwC,CAAC;IAC/D,CAAC,GAEDG,EAAA,CAAG,wBAAwB,MAAM;MAC/B,MAAMC,eAAA,GAAkBL,YAAA,CAAa,OAAO;MAE5CM,MAAA,CAAOD,eAAe,EAAEE,OAAA,CAAQN,gBAAA,CADZ,UACwC,CAAC;IAC/D,CAAC,GAEDG,EAAA,CAAG,8BAA8B,MAAM;MACrC,MAAMC,eAAA,GAAkBL,YAAA,CAAa,aAAa;MAElDM,MAAA,CAAOD,eAAe,EAAEE,OAAA,CAAQN,gBAAA,CADZ,CACwC,CAAC;IAC/D,CAAC;EACH,CAAC,GAEDE,QAAA,CAAS,eAAe,MAAM;IAC5BC,EAAA,CAAG,+BAA+B,MAAM;MACtC,MAAMC,eAAA,GAAkBL,YAAA,CAAa,iBAAiB;MAEtDM,MAAA,CAAOD,eAAe,EAAEE,OAAA,CAAQN,gBAAA,CADZ,UACwC,CAAC;IAC/D,CAAC;EACH,CAAC,GAEDE,QAAA,CAAS,gBAAgB,MAAM;IAC7BC,EAAA,CAAG,mCAAmC,MAAM;MAC1C,MAAMC,eAAA,GAAkBL,YAAA,CAAa,uBAAuB;MAE5DM,MAAA,CAAOD,eAAe,EAAEE,OAAA,CAAQN,gBAAA,CADZ,UACwC,CAAC;IAC/D,CAAC;EACH,CAAC,GAEDE,QAAA,CAAS,eAAe,MAAM;IAC5BC,EAAA,CAAG,iCAAiC,MAAM;MACxC,MAAMC,eAAA,GAAkBL,YAAA,CAAa,oBAAoB;MAEzDM,MAAA,CAAOD,eAAe,EAAEE,OAAA,CAAQN,gBAAA,CADZ,UACwC,CAAC;IAC/D,CAAC;EACH,CAAC,GAEDE,QAAA,CAAS,gBAAgB,MAAM;IAC7BC,EAAA,CAAG,qCAAqC,MAAM;MAC5C,MAAMC,eAAA,GAAkBL,YAAA,CAAa,2BAA2B;MAEhEM,MAAA,CAAOD,eAAe,EAAEE,OAAA,CAAQN,gBAAA,CADZ,UACwC,CAAC;IAC/D,CAAC;EACH,CAAC,GAEDE,QAAA,CAAS,eAAe,MAAM;IAC5BC,EAAA,CAAG,0BAA0B,MAAM;MACjC,MAAMC,eAAA,GAAkBL,YAAA,CAAa,SAAS;MAE9CM,MAAA,CAAOD,eAAe,EAAEE,OAAA,CAAQN,gBAAA,CADZ,UACwC,CAAC;IAC/D,CAAC;EACH,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import normalizeColor from "@hanzogui/normalize-css-color";
|
|
2
|
+
const processColor = color => {
|
|
3
|
+
if (color == null) return color;
|
|
4
|
+
let int32Color = normalizeColor(color);
|
|
5
|
+
if (int32Color != null) return int32Color = (int32Color << 24 | int32Color >>> 8) >>> 0, int32Color;
|
|
6
|
+
};
|
|
7
|
+
export { processColor };
|
|
8
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["normalizeColor","processColor","color","int32Color"],"sources":["../../../../src/modules/processColor/index.tsx"],"sourcesContent":[null],"mappings":"AAWA,OAAOA,cAAA,MAAoB;AAEpB,MAAMC,YAAA,GAAgBC,KAAA,IAA2C;EACtE,IAA2BA,KAAA,IAAU,MACnC,OAAOA,KAAA;EAIT,IAAIC,UAAA,GAAaH,cAAA,CAAeE,KAAK;EACrC,IAAgCC,UAAA,IAAe,MAI/C,OAAAA,UAAA,IAAeA,UAAA,IAAc,KAAOA,UAAA,KAAe,OAAQ,GAEpDA,UAAA;AACT","ignoreList":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { canUseDOM } from "../canUseDOM.mjs";
|
|
2
|
+
const _requestIdleCallback = function (cb, options) {
|
|
3
|
+
return setTimeout(() => {
|
|
4
|
+
const start = Date.now();
|
|
5
|
+
cb({
|
|
6
|
+
didTimeout: !1,
|
|
7
|
+
timeRemaining() {
|
|
8
|
+
return Math.max(0, 50 - (Date.now() - start));
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
}, 1);
|
|
12
|
+
},
|
|
13
|
+
_cancelIdleCallback = function (id) {
|
|
14
|
+
clearTimeout(id);
|
|
15
|
+
},
|
|
16
|
+
isSupported = canUseDOM && typeof window.requestIdleCallback < "u",
|
|
17
|
+
requestIdleCallback = isSupported ? window.requestIdleCallback : _requestIdleCallback,
|
|
18
|
+
cancelIdleCallback = isSupported ? window.cancelIdleCallback : _cancelIdleCallback;
|
|
19
|
+
export { cancelIdleCallback, requestIdleCallback };
|
|
20
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["canUseDOM","_requestIdleCallback","cb","options","setTimeout","start","Date","now","didTimeout","timeRemaining","Math","max","_cancelIdleCallback","id","clearTimeout","isSupported","window","requestIdleCallback","cancelIdleCallback"],"sources":["../../../../src/modules/requestIdleCallback/index.tsx"],"sourcesContent":[null],"mappings":"AAQA,SAASA,SAAA,QAAiB;AAE1B,MAAMC,oBAAA,GAAuB,SAAAA,CAAUC,EAAA,EAAcC,OAAA,EAAkB;IACrE,OAAOC,UAAA,CAAW,MAAM;MACtB,MAAMC,KAAA,GAAQC,IAAA,CAAKC,GAAA,CAAI;MACvBL,EAAA,CAAG;QACDM,UAAA,EAAY;QACZC,cAAA,EAAgB;UACd,OAAOC,IAAA,CAAKC,GAAA,CAAI,GAAG,MAAML,IAAA,CAAKC,GAAA,CAAI,IAAIF,KAAA,CAAM;QAC9C;MACF,CAAC;IACH,GAAG,CAAC;EACN;EAEMO,mBAAA,GAAsB,SAAAA,CAAUC,EAAA,EAAI;IACxCC,YAAA,CAAaD,EAAE;EACjB;EAEME,WAAA,GAAcf,SAAA,IAAa,OAAOgB,MAAA,CAAOC,mBAAA,GAAwB;EAE1DA,mBAAA,GAAsBF,WAAA,GAC/BC,MAAA,CAAOC,mBAAA,GACPhB,oBAAA;EAESiB,kBAAA,GAAqBH,WAAA,GAC9BC,MAAA,CAAOE,kBAAA,GACPN,mBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { unitlessNumbers as isUnitlessNumber } from "../unitlessNumbers/index.mjs";
|
|
2
|
+
import { normalizeValueWithProperty } from "../../StyleSheet/compiler/normalizeValueWithProperty.mjs";
|
|
3
|
+
function dangerousStyleValue(name, value, isCustomProperty) {
|
|
4
|
+
var isEmpty = value == null || typeof value == "boolean" || value === "";
|
|
5
|
+
return isEmpty ? "" : (typeof value == "object" && typeof value.__getValue == "function" && (value = value.__getValue()), name === "transform" && Array.isArray(value) ? value.map(t => {
|
|
6
|
+
const key = Object.keys(t)[0];
|
|
7
|
+
let val = t[key];
|
|
8
|
+
return typeof val == "object" && typeof val.__getValue == "function" && (val = val.__getValue()), key === "matrix" || key === "matrix3d" ? `${key}(${val.join(",")})` : `${key}(${normalizeValueWithProperty(val, key)})`;
|
|
9
|
+
}).join(" ") : !isCustomProperty && typeof value == "number" && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) ? value + "px" : ("" + value).trim());
|
|
10
|
+
}
|
|
11
|
+
export { dangerousStyleValue };
|
|
12
|
+
//# sourceMappingURL=dangerousStyleValue.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["unitlessNumbers","isUnitlessNumber","normalizeValueWithProperty","dangerousStyleValue","name","value","isCustomProperty","isEmpty","__getValue","Array","isArray","map","t","key","Object","keys","val","join","hasOwnProperty","trim"],"sources":["../../../../src/modules/setValueForStyles/dangerousStyleValue.tsx"],"sourcesContent":[null],"mappings":"AAYA,SAASA,eAAA,IAAmBC,gBAAA,QAAwB;AACpD,SAASC,0BAAA,QAAkC;AAWpC,SAASC,oBAAoBC,IAAA,EAAMC,KAAA,EAAOC,gBAAA,EAAkB;EAWjE,IAAIC,OAAA,GAAUF,KAAA,IAAS,QAAQ,OAAOA,KAAA,IAAU,aAAaA,KAAA,KAAU;EACvE,OAAIE,OAAA,GACK,MAIL,OAAOF,KAAA,IAAU,YAAY,OAAOA,KAAA,CAAMG,UAAA,IAAe,eAC3DH,KAAA,GAAQA,KAAA,CAAMG,UAAA,CAAW,IAIvBJ,IAAA,KAAS,eAAeK,KAAA,CAAMC,OAAA,CAAQL,KAAK,IACtCA,KAAA,CACJM,GAAA,CAAKC,CAAA,IAAM;IACV,MAAMC,GAAA,GAAMC,MAAA,CAAOC,IAAA,CAAKH,CAAC,EAAE,CAAC;IAC5B,IAAII,GAAA,GAAMJ,CAAA,CAAEC,GAAG;IAKf,OAHI,OAAOG,GAAA,IAAQ,YAAY,OAAOA,GAAA,CAAIR,UAAA,IAAe,eACvDQ,GAAA,GAAMA,GAAA,CAAIR,UAAA,CAAW,IAEnBK,GAAA,KAAQ,YAAYA,GAAA,KAAQ,aACvB,GAAGA,GAAG,IAAIG,GAAA,CAAIC,IAAA,CAAK,GAAG,CAAC,MAEzB,GAAGJ,GAAG,IAAIX,0BAAA,CAA2Bc,GAAA,EAAKH,GAAG,CAAC;EACvD,CAAC,EACAI,IAAA,CAAK,GAAG,IAIX,CAACX,gBAAA,IACD,OAAOD,KAAA,IAAU,YACjBA,KAAA,KAAU,KACV,EAAEJ,gBAAA,CAAiBiB,cAAA,CAAed,IAAI,KAAKH,gBAAA,CAAiBG,IAAI,KAEzDC,KAAA,GAAQ,QAGT,KAAKA,KAAA,EAAOc,IAAA,CAAK;AAC3B","ignoreList":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { dangerousStyleValue } from "./dangerousStyleValue.mjs";
|
|
2
|
+
function setValueForStyles(node, styles) {
|
|
3
|
+
const style = node.style;
|
|
4
|
+
for (let styleName in styles) {
|
|
5
|
+
if (!styles.hasOwnProperty(styleName)) continue;
|
|
6
|
+
const isCustomProperty = styleName.indexOf("--") === 0,
|
|
7
|
+
styleValue = dangerousStyleValue(styleName, styles[styleName], isCustomProperty);
|
|
8
|
+
styleName === "float" && (styleName = "cssFloat"), isCustomProperty ? style.setProperty(styleName, styleValue) : style[styleName] = styleValue;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export { setValueForStyles };
|
|
12
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["dangerousStyleValue","setValueForStyles","node","styles","style","styleName","hasOwnProperty","isCustomProperty","indexOf","styleValue","setProperty"],"sources":["../../../../src/modules/setValueForStyles/index.tsx"],"sourcesContent":[null],"mappings":"AAYA,SAASA,mBAAA,QAA2B;AAS7B,SAASC,kBAAkBC,IAAA,EAAMC,MAAA,EAAQ;EAC9C,MAAMC,KAAA,GAAQF,IAAA,CAAKE,KAAA;EACnB,SAASC,SAAA,IAAaF,MAAA,EAAQ;IAC5B,IAAI,CAACA,MAAA,CAAOG,cAAA,CAAeD,SAAS,GAClC;IAEF,MAAME,gBAAA,GAAmBF,SAAA,CAAUG,OAAA,CAAQ,IAAI,MAAM;MAC/CC,UAAA,GAAaT,mBAAA,CAAoBK,SAAA,EAAWF,MAAA,CAAOE,SAAS,GAAGE,gBAAgB;IACjFF,SAAA,KAAc,YAChBA,SAAA,GAAY,aAEVE,gBAAA,GACFH,KAAA,CAAMM,WAAA,CAAYL,SAAA,EAAWI,UAAU,IAEvCL,KAAA,CAAMC,SAAS,IAAII,UAAA;EAEvB;AACF","ignoreList":[]}
|