@hanzogui/react-native-web-internals 2.0.0-rc.41-hanzoai.5
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 +265 -0
- package/dist/cjs/StyleSheet/__tests__/compiler-test.cjs +419 -0
- package/dist/cjs/StyleSheet/__tests__/dom-createOrderedCSSStyleSheet-test.cjs +160 -0
- package/dist/cjs/StyleSheet/__tests__/index-test.cjs +436 -0
- package/dist/cjs/StyleSheet/__tests__/preprocess-test.cjs +121 -0
- package/dist/cjs/StyleSheet/__tests__/validate-test.cjs +51 -0
- package/dist/cjs/StyleSheet/compiler/createReactDOMStyle.cjs +160 -0
- package/dist/cjs/StyleSheet/compiler/hash.cjs +28 -0
- package/dist/cjs/StyleSheet/compiler/hyphenateStyleName.cjs +40 -0
- package/dist/cjs/StyleSheet/compiler/index.cjs +379 -0
- package/dist/cjs/StyleSheet/compiler/normalizeColor.cjs +36 -0
- package/dist/cjs/StyleSheet/compiler/normalizeValueWithProperty.cjs +50 -0
- package/dist/cjs/StyleSheet/compiler/resolveShadowValue.cjs +52 -0
- package/dist/cjs/StyleSheet/dom/createCSSStyleSheet.cjs +52 -0
- package/dist/cjs/StyleSheet/dom/createOrderedCSSStyleSheet.cjs +135 -0
- package/dist/cjs/StyleSheet/dom/index.cjs +89 -0
- package/dist/cjs/StyleSheet/index.cjs +64 -0
- package/dist/cjs/StyleSheet/preprocess.cjs +114 -0
- package/dist/cjs/StyleSheet/validate.cjs +92 -0
- package/dist/cjs/TextAncestorContext.cjs +29 -0
- package/dist/cjs/colorProps.cjs +39 -0
- package/dist/cjs/index.cjs +105 -0
- package/dist/cjs/modules/AccessibilityUtil/__tests__/propsToAccessibilityComponent-test.cjs +57 -0
- package/dist/cjs/modules/AccessibilityUtil/__tests__/propsToAriaRole-test.cjs +46 -0
- package/dist/cjs/modules/AccessibilityUtil/index.cjs +35 -0
- package/dist/cjs/modules/AccessibilityUtil/isDisabled.cjs +28 -0
- package/dist/cjs/modules/AccessibilityUtil/propsToAccessibilityComponent.cjs +64 -0
- package/dist/cjs/modules/AccessibilityUtil/propsToAriaRole.cjs +51 -0
- package/dist/cjs/modules/AssetRegistry/index.cjs +35 -0
- package/dist/cjs/modules/ImageLoader/index.cjs +157 -0
- package/dist/cjs/modules/InteractionManager.cjs +240 -0
- package/dist/cjs/modules/Platform/__tests__/index-test.cjs +56 -0
- package/dist/cjs/modules/Platform/index.cjs +32 -0
- package/dist/cjs/modules/TextInputState/index.cjs +70 -0
- package/dist/cjs/modules/UIManager/__tests__/index-test.cjs +111 -0
- package/dist/cjs/modules/UIManager/index.cjs +65 -0
- package/dist/cjs/modules/canUseDOM.cjs +28 -0
- package/dist/cjs/modules/createDOMProps/__tests__/index-test.cjs +177 -0
- package/dist/cjs/modules/createDOMProps/index.cjs +387 -0
- package/dist/cjs/modules/createEventHandle/__tests__/index-test.cjs +422 -0
- package/dist/cjs/modules/createEventHandle/index.cjs +88 -0
- package/dist/cjs/modules/dismissKeyboard/index.cjs +31 -0
- package/dist/cjs/modules/forwardedProps/index.cjs +163 -0
- package/dist/cjs/modules/getBoundingClientRect/index.cjs +35 -0
- package/dist/cjs/modules/invariant.cjs +42 -0
- package/dist/cjs/modules/isSelectionValid/index.cjs +36 -0
- package/dist/cjs/modules/isWebColor/index.cjs +28 -0
- package/dist/cjs/modules/mergeRefs/__tests__/index-test.cjs +48 -0
- package/dist/cjs/modules/mergeRefs/index.cjs +45 -0
- package/dist/cjs/modules/modality/__tests__/index-test.cjs +59 -0
- package/dist/cjs/modules/modality/index.cjs +212 -0
- package/dist/cjs/modules/multiplyStyleLengthValue/__tests__/index-test.cjs +38 -0
- package/dist/cjs/modules/multiplyStyleLengthValue/index.cjs +41 -0
- package/dist/cjs/modules/normalizeColor/index.cjs +44 -0
- package/dist/cjs/modules/pick/index.cjs +38 -0
- package/dist/cjs/modules/processColor/__tests__/index-test.cjs +85 -0
- package/dist/cjs/modules/processColor/index.cjs +50 -0
- package/dist/cjs/modules/requestIdleCallback/index.cjs +46 -0
- package/dist/cjs/modules/setValueForStyles/dangerousStyleValue.cjs +55 -0
- package/dist/cjs/modules/setValueForStyles/index.cjs +46 -0
- package/dist/cjs/modules/unitlessNumbers/index.cjs +89 -0
- package/dist/cjs/modules/useElementLayout/index.cjs +44 -0
- package/dist/cjs/modules/useEvent/__tests__/index-test.cjs +490 -0
- package/dist/cjs/modules/useEvent/index.cjs +57 -0
- package/dist/cjs/modules/useHover/__tests__/index-test.cjs +382 -0
- package/dist/cjs/modules/useHover/index.cjs +140 -0
- package/dist/cjs/modules/useLayoutEffect/index.cjs +41 -0
- package/dist/cjs/modules/useLocale/index.cjs +69 -0
- package/dist/cjs/modules/useLocale/isLocaleRTL.cjs +88 -0
- package/dist/cjs/modules/useMergeRefs/__tests__/index-test.cjs +125 -0
- package/dist/cjs/modules/useMergeRefs/index.cjs +45 -0
- package/dist/cjs/modules/usePlatformMethods/index.cjs +42 -0
- package/dist/cjs/modules/useStable/__tests__/index-test.cjs +122 -0
- package/dist/cjs/modules/useStable/index.cjs +47 -0
- package/dist/cjs/styleTypes.cjs +18 -0
- package/dist/cjs/types.cjs +18 -0
- package/dist/esm/StyleSheet/__tests__/compiler-createReactDOMStyle-test.mjs +242 -0
- package/dist/esm/StyleSheet/__tests__/compiler-createReactDOMStyle-test.mjs.map +1 -0
- package/dist/esm/StyleSheet/__tests__/compiler-test.mjs +420 -0
- package/dist/esm/StyleSheet/__tests__/compiler-test.mjs.map +1 -0
- package/dist/esm/StyleSheet/__tests__/dom-createOrderedCSSStyleSheet-test.mjs +137 -0
- package/dist/esm/StyleSheet/__tests__/dom-createOrderedCSSStyleSheet-test.mjs.map +1 -0
- package/dist/esm/StyleSheet/__tests__/index-test.mjs +413 -0
- package/dist/esm/StyleSheet/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/StyleSheet/__tests__/preprocess-test.mjs +122 -0
- package/dist/esm/StyleSheet/__tests__/preprocess-test.mjs.map +1 -0
- package/dist/esm/StyleSheet/__tests__/validate-test.mjs +52 -0
- package/dist/esm/StyleSheet/__tests__/validate-test.mjs.map +1 -0
- package/dist/esm/StyleSheet/compiler/createReactDOMStyle.mjs +134 -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 +15 -0
- package/dist/esm/StyleSheet/compiler/hyphenateStyleName.mjs.map +1 -0
- package/dist/esm/StyleSheet/compiler/index.mjs +351 -0
- package/dist/esm/StyleSheet/compiler/index.mjs.map +1 -0
- package/dist/esm/StyleSheet/compiler/normalizeColor.mjs +11 -0
- package/dist/esm/StyleSheet/compiler/normalizeColor.mjs.map +1 -0
- package/dist/esm/StyleSheet/compiler/normalizeValueWithProperty.mjs +25 -0
- package/dist/esm/StyleSheet/compiler/normalizeValueWithProperty.mjs.map +1 -0
- package/dist/esm/StyleSheet/compiler/resolveShadowValue.mjs +27 -0
- package/dist/esm/StyleSheet/compiler/resolveShadowValue.mjs.map +1 -0
- package/dist/esm/StyleSheet/dom/createCSSStyleSheet.mjs +27 -0
- package/dist/esm/StyleSheet/dom/createCSSStyleSheet.mjs.map +1 -0
- package/dist/esm/StyleSheet/dom/createOrderedCSSStyleSheet.mjs +110 -0
- package/dist/esm/StyleSheet/dom/createOrderedCSSStyleSheet.mjs.map +1 -0
- package/dist/esm/StyleSheet/dom/index.mjs +64 -0
- package/dist/esm/StyleSheet/dom/index.mjs.map +1 -0
- package/dist/esm/StyleSheet/index.mjs +38 -0
- package/dist/esm/StyleSheet/index.mjs.map +1 -0
- package/dist/esm/StyleSheet/preprocess.mjs +86 -0
- package/dist/esm/StyleSheet/preprocess.mjs.map +1 -0
- package/dist/esm/StyleSheet/validate.mjs +67 -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 +34 -0
- package/dist/esm/modules/AccessibilityUtil/__tests__/propsToAccessibilityComponent-test.mjs.map +1 -0
- package/dist/esm/modules/AccessibilityUtil/__tests__/propsToAriaRole-test.mjs +23 -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 +39 -0
- package/dist/esm/modules/AccessibilityUtil/propsToAccessibilityComponent.mjs.map +1 -0
- package/dist/esm/modules/AccessibilityUtil/propsToAriaRole.mjs +26 -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 +131 -0
- package/dist/esm/modules/ImageLoader/index.mjs.map +1 -0
- package/dist/esm/modules/InteractionManager.mjs +215 -0
- package/dist/esm/modules/InteractionManager.mjs.map +1 -0
- package/dist/esm/modules/Platform/__tests__/index-test.mjs +33 -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 +45 -0
- package/dist/esm/modules/TextInputState/index.mjs.map +1 -0
- package/dist/esm/modules/UIManager/__tests__/index-test.mjs +88 -0
- package/dist/esm/modules/UIManager/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/modules/UIManager/index.mjs +40 -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 +154 -0
- package/dist/esm/modules/createDOMProps/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/modules/createDOMProps/index.mjs +361 -0
- package/dist/esm/modules/createDOMProps/index.mjs.map +1 -0
- package/dist/esm/modules/createEventHandle/__tests__/index-test.mjs +399 -0
- package/dist/esm/modules/createEventHandle/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/modules/createEventHandle/index.mjs +61 -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 +10 -0
- package/dist/esm/modules/getBoundingClientRect/index.mjs.map +1 -0
- package/dist/esm/modules/invariant.mjs +16 -0
- package/dist/esm/modules/invariant.mjs.map +1 -0
- package/dist/esm/modules/isSelectionValid/index.mjs +11 -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 +25 -0
- package/dist/esm/modules/mergeRefs/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/modules/mergeRefs/index.mjs +20 -0
- package/dist/esm/modules/mergeRefs/index.mjs.map +1 -0
- package/dist/esm/modules/modality/__tests__/index-test.mjs +60 -0
- package/dist/esm/modules/modality/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/modules/modality/index.mjs +184 -0
- package/dist/esm/modules/modality/index.mjs.map +1 -0
- package/dist/esm/modules/multiplyStyleLengthValue/__tests__/index-test.mjs +15 -0
- package/dist/esm/modules/multiplyStyleLengthValue/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/modules/multiplyStyleLengthValue/index.mjs +16 -0
- package/dist/esm/modules/multiplyStyleLengthValue/index.mjs.map +1 -0
- package/dist/esm/modules/normalizeColor/index.mjs +19 -0
- package/dist/esm/modules/normalizeColor/index.mjs.map +1 -0
- package/dist/esm/modules/pick/index.mjs +13 -0
- package/dist/esm/modules/pick/index.mjs.map +1 -0
- package/dist/esm/modules/processColor/__tests__/index-test.mjs +62 -0
- package/dist/esm/modules/processColor/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/modules/processColor/index.mjs +14 -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 +30 -0
- package/dist/esm/modules/setValueForStyles/dangerousStyleValue.mjs.map +1 -0
- package/dist/esm/modules/setValueForStyles/index.mjs +21 -0
- package/dist/esm/modules/setValueForStyles/index.mjs.map +1 -0
- package/dist/esm/modules/unitlessNumbers/index.mjs +64 -0
- package/dist/esm/modules/unitlessNumbers/index.mjs.map +1 -0
- package/dist/esm/modules/useElementLayout/index.mjs +19 -0
- package/dist/esm/modules/useElementLayout/index.mjs.map +1 -0
- package/dist/esm/modules/useEvent/__tests__/index-test.mjs +467 -0
- package/dist/esm/modules/useEvent/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/modules/useEvent/index.mjs +32 -0
- package/dist/esm/modules/useEvent/index.mjs.map +1 -0
- package/dist/esm/modules/useHover/__tests__/index-test.mjs +359 -0
- package/dist/esm/modules/useHover/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/modules/useHover/index.mjs +115 -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 +31 -0
- package/dist/esm/modules/useLocale/index.mjs.map +1 -0
- package/dist/esm/modules/useLocale/isLocaleRTL.mjs +63 -0
- package/dist/esm/modules/useLocale/isLocaleRTL.mjs.map +1 -0
- package/dist/esm/modules/useMergeRefs/__tests__/index-test.mjs +102 -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 +17 -0
- package/dist/esm/modules/usePlatformMethods/index.mjs.map +1 -0
- package/dist/esm/modules/useStable/__tests__/index-test.mjs +99 -0
- package/dist/esm/modules/useStable/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/modules/useStable/index.mjs +11 -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,379 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
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
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: true
|
|
22
|
+
}), mod);
|
|
23
|
+
var compiler_exports = {};
|
|
24
|
+
__export(compiler_exports, {
|
|
25
|
+
atomic: () => atomic,
|
|
26
|
+
classic: () => classic,
|
|
27
|
+
inline: () => inline,
|
|
28
|
+
stringifyValueWithProperty: () => stringifyValueWithProperty
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(compiler_exports);
|
|
31
|
+
var import_simple_hash = require("@hanzogui/simple-hash");
|
|
32
|
+
var import_createReactDOMStyle = require("./createReactDOMStyle.cjs");
|
|
33
|
+
var import_hyphenateStyleName = require("./hyphenateStyleName.cjs");
|
|
34
|
+
var import_normalizeValueWithProperty = require("./normalizeValueWithProperty.cjs");
|
|
35
|
+
const cache = /* @__PURE__ */new Map();
|
|
36
|
+
const emptyObject = {};
|
|
37
|
+
const classicGroup = 1;
|
|
38
|
+
const atomicGroup = 2.2;
|
|
39
|
+
const customGroup = {
|
|
40
|
+
borderColor: 2,
|
|
41
|
+
borderRadius: 2,
|
|
42
|
+
borderStyle: 2,
|
|
43
|
+
borderWidth: 2,
|
|
44
|
+
display: 2,
|
|
45
|
+
flex: 2,
|
|
46
|
+
margin: 2,
|
|
47
|
+
overflow: 2,
|
|
48
|
+
overscrollBehavior: 2,
|
|
49
|
+
padding: 2,
|
|
50
|
+
marginHorizontal: 2.1,
|
|
51
|
+
marginVertical: 2.1,
|
|
52
|
+
paddingHorizontal: 2.1,
|
|
53
|
+
paddingVertical: 2.1
|
|
54
|
+
};
|
|
55
|
+
const borderTopLeftRadius = "borderTopLeftRadius";
|
|
56
|
+
const borderTopRightRadius = "borderTopRightRadius";
|
|
57
|
+
const borderBottomLeftRadius = "borderBottomLeftRadius";
|
|
58
|
+
const borderBottomRightRadius = "borderBottomRightRadius";
|
|
59
|
+
const borderLeftColor = "borderLeftColor";
|
|
60
|
+
const borderLeftStyle = "borderLeftStyle";
|
|
61
|
+
const borderLeftWidth = "borderLeftWidth";
|
|
62
|
+
const borderRightColor = "borderRightColor";
|
|
63
|
+
const borderRightStyle = "borderRightStyle";
|
|
64
|
+
const borderRightWidth = "borderRightWidth";
|
|
65
|
+
const right = "right";
|
|
66
|
+
const marginLeft = "marginLeft";
|
|
67
|
+
const marginRight = "marginRight";
|
|
68
|
+
const paddingLeft = "paddingLeft";
|
|
69
|
+
const paddingRight = "paddingRight";
|
|
70
|
+
const left = "left";
|
|
71
|
+
const PROPERTIES_FLIP = {
|
|
72
|
+
[borderTopLeftRadius]: borderTopRightRadius,
|
|
73
|
+
[borderTopRightRadius]: borderTopLeftRadius,
|
|
74
|
+
[borderBottomLeftRadius]: borderBottomRightRadius,
|
|
75
|
+
[borderBottomRightRadius]: borderBottomLeftRadius,
|
|
76
|
+
[borderLeftColor]: borderRightColor,
|
|
77
|
+
[borderLeftStyle]: borderRightStyle,
|
|
78
|
+
[borderLeftWidth]: borderRightWidth,
|
|
79
|
+
[borderRightColor]: borderLeftColor,
|
|
80
|
+
[borderRightStyle]: borderLeftStyle,
|
|
81
|
+
[borderRightWidth]: borderLeftWidth,
|
|
82
|
+
[left]: right,
|
|
83
|
+
[marginLeft]: marginRight,
|
|
84
|
+
[marginRight]: marginLeft,
|
|
85
|
+
[paddingLeft]: paddingRight,
|
|
86
|
+
[paddingRight]: paddingLeft,
|
|
87
|
+
[right]: left
|
|
88
|
+
};
|
|
89
|
+
const PROPERTIES_I18N = {
|
|
90
|
+
borderTopStartRadius: borderTopLeftRadius,
|
|
91
|
+
borderTopEndRadius: borderTopRightRadius,
|
|
92
|
+
borderBottomStartRadius: borderBottomLeftRadius,
|
|
93
|
+
borderBottomEndRadius: borderBottomRightRadius,
|
|
94
|
+
borderStartColor: borderLeftColor,
|
|
95
|
+
borderStartStyle: borderLeftStyle,
|
|
96
|
+
borderStartWidth: borderLeftWidth,
|
|
97
|
+
borderEndColor: borderRightColor,
|
|
98
|
+
borderEndStyle: borderRightStyle,
|
|
99
|
+
borderEndWidth: borderRightWidth,
|
|
100
|
+
end: right,
|
|
101
|
+
marginStart: marginLeft,
|
|
102
|
+
marginEnd: marginRight,
|
|
103
|
+
paddingStart: paddingLeft,
|
|
104
|
+
paddingEnd: paddingRight,
|
|
105
|
+
start: left
|
|
106
|
+
};
|
|
107
|
+
const PROPERTIES_VALUE = ["clear", "float", "textAlign"];
|
|
108
|
+
function atomic(style) {
|
|
109
|
+
const compiledStyle = {
|
|
110
|
+
$$css: true
|
|
111
|
+
};
|
|
112
|
+
const compiledRules = [];
|
|
113
|
+
function atomicCompile(prop, value) {
|
|
114
|
+
const valueString = stringifyValueWithProperty(value, prop);
|
|
115
|
+
const cacheKey = prop + valueString;
|
|
116
|
+
const cachedResult = cache.get(cacheKey);
|
|
117
|
+
let identifier;
|
|
118
|
+
if (cachedResult != null) {
|
|
119
|
+
identifier = cachedResult[0];
|
|
120
|
+
compiledRules.push(cachedResult[1]);
|
|
121
|
+
} else {
|
|
122
|
+
identifier = createIdentifier("r", prop, value);
|
|
123
|
+
const order = customGroup[prop] || atomicGroup;
|
|
124
|
+
const rules = createAtomicRules(identifier, prop, value);
|
|
125
|
+
const orderedRules = [rules, order];
|
|
126
|
+
compiledRules.push(orderedRules);
|
|
127
|
+
cache.set(cacheKey, [identifier, orderedRules]);
|
|
128
|
+
}
|
|
129
|
+
return identifier;
|
|
130
|
+
}
|
|
131
|
+
Object.keys(style).sort().forEach(prop => {
|
|
132
|
+
const value = style[prop];
|
|
133
|
+
if (value != null) {
|
|
134
|
+
let localizeableValue;
|
|
135
|
+
if (PROPERTIES_VALUE.indexOf(prop) > -1) {
|
|
136
|
+
const left2 = atomicCompile(prop, "left");
|
|
137
|
+
const right2 = atomicCompile(prop, "right");
|
|
138
|
+
if (value === "start") {
|
|
139
|
+
localizeableValue = [left2, right2];
|
|
140
|
+
} else if (value === "end") {
|
|
141
|
+
localizeableValue = [right2, left2];
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
const propPolyfill = PROPERTIES_I18N[prop];
|
|
145
|
+
if (propPolyfill != null) {
|
|
146
|
+
const ltr = atomicCompile(propPolyfill, value);
|
|
147
|
+
const rtl = atomicCompile(PROPERTIES_FLIP[propPolyfill], value);
|
|
148
|
+
localizeableValue = [ltr, rtl];
|
|
149
|
+
}
|
|
150
|
+
if (prop === "transitionProperty") {
|
|
151
|
+
const values = Array.isArray(value) ? value : [value];
|
|
152
|
+
const polyfillIndices = [];
|
|
153
|
+
for (let i = 0; i < values.length; i++) {
|
|
154
|
+
const val = values[i];
|
|
155
|
+
if (typeof val === "string" && PROPERTIES_I18N[val] != null) {
|
|
156
|
+
polyfillIndices.push(i);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
if (polyfillIndices.length > 0) {
|
|
160
|
+
const ltrPolyfillValues = [...values];
|
|
161
|
+
const rtlPolyfillValues = [...values];
|
|
162
|
+
polyfillIndices.forEach(i => {
|
|
163
|
+
const ltrVal = ltrPolyfillValues[i];
|
|
164
|
+
if (typeof ltrVal === "string") {
|
|
165
|
+
const ltrPolyfill = PROPERTIES_I18N[ltrVal];
|
|
166
|
+
const rtlPolyfill = PROPERTIES_FLIP[ltrPolyfill];
|
|
167
|
+
ltrPolyfillValues[i] = ltrPolyfill;
|
|
168
|
+
rtlPolyfillValues[i] = rtlPolyfill;
|
|
169
|
+
const ltr = atomicCompile(prop, ltrPolyfillValues);
|
|
170
|
+
const rtl = atomicCompile(prop, rtlPolyfillValues);
|
|
171
|
+
localizeableValue = [ltr, rtl];
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
if (localizeableValue == null) {
|
|
177
|
+
localizeableValue = atomicCompile(prop, value);
|
|
178
|
+
} else {
|
|
179
|
+
compiledStyle["$$css$localize"] = true;
|
|
180
|
+
}
|
|
181
|
+
compiledStyle[prop] = localizeableValue;
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
return [compiledStyle, compiledRules];
|
|
185
|
+
}
|
|
186
|
+
function classic(style, name) {
|
|
187
|
+
const compiledStyle = {
|
|
188
|
+
$$css: true
|
|
189
|
+
};
|
|
190
|
+
const compiledRules = [];
|
|
191
|
+
const {
|
|
192
|
+
animationKeyframes,
|
|
193
|
+
...rest
|
|
194
|
+
} = style;
|
|
195
|
+
const identifier = createIdentifier("css", name, style);
|
|
196
|
+
const selector = `.${identifier}`;
|
|
197
|
+
let animationName;
|
|
198
|
+
if (animationKeyframes != null) {
|
|
199
|
+
const [animationNames, keyframesRules] = processKeyframesValue(animationKeyframes);
|
|
200
|
+
animationName = animationNames.join(",");
|
|
201
|
+
compiledRules.push(...keyframesRules);
|
|
202
|
+
}
|
|
203
|
+
const block = createDeclarationBlock({
|
|
204
|
+
...rest,
|
|
205
|
+
animationName
|
|
206
|
+
});
|
|
207
|
+
compiledRules.push(`${selector}${block}`);
|
|
208
|
+
compiledStyle[identifier] = identifier;
|
|
209
|
+
return [compiledStyle, [[compiledRules, classicGroup]]];
|
|
210
|
+
}
|
|
211
|
+
function inline(originalStyle, isRTL) {
|
|
212
|
+
const style = originalStyle || emptyObject;
|
|
213
|
+
const frozenProps = {};
|
|
214
|
+
const nextStyle = {};
|
|
215
|
+
for (const originalProp in style) {
|
|
216
|
+
const originalValue = style[originalProp];
|
|
217
|
+
let prop = originalProp;
|
|
218
|
+
let value = originalValue;
|
|
219
|
+
if (!Object.prototype.hasOwnProperty.call(style, originalProp) || originalValue == null) {
|
|
220
|
+
continue;
|
|
221
|
+
}
|
|
222
|
+
if (PROPERTIES_VALUE.indexOf(originalProp) > -1) {
|
|
223
|
+
if (originalValue === "start") {
|
|
224
|
+
value = isRTL ? "right" : "left";
|
|
225
|
+
} else if (originalValue === "end") {
|
|
226
|
+
value = isRTL ? "left" : "right";
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
const propPolyfill = PROPERTIES_I18N[originalProp];
|
|
230
|
+
if (propPolyfill != null) {
|
|
231
|
+
prop = isRTL ? PROPERTIES_FLIP[propPolyfill] : propPolyfill;
|
|
232
|
+
}
|
|
233
|
+
if (originalProp === "transitionProperty") {
|
|
234
|
+
const originalValues = Array.isArray(originalValue) ? originalValue : [originalValue];
|
|
235
|
+
originalValues.forEach((val, i) => {
|
|
236
|
+
if (typeof val === "string") {
|
|
237
|
+
const valuePolyfill = PROPERTIES_I18N[val];
|
|
238
|
+
if (valuePolyfill != null) {
|
|
239
|
+
originalValues[i] = isRTL ? PROPERTIES_FLIP[valuePolyfill] : valuePolyfill;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
if (!frozenProps[prop]) {
|
|
245
|
+
nextStyle[prop] = value;
|
|
246
|
+
}
|
|
247
|
+
if (PROPERTIES_I18N.hasOwnProperty(originalProp)) {
|
|
248
|
+
frozenProps[prop] = true;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
return (0, import_createReactDOMStyle.createReactDOMStyle)(nextStyle, true);
|
|
252
|
+
}
|
|
253
|
+
function stringifyValueWithProperty(value, property) {
|
|
254
|
+
const normalizedValue = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(value, property);
|
|
255
|
+
return typeof normalizedValue !== "string" ? JSON.stringify(normalizedValue || "") : normalizedValue;
|
|
256
|
+
}
|
|
257
|
+
function createAtomicRules(identifier, property, value) {
|
|
258
|
+
const rules = [];
|
|
259
|
+
const selector = `.${identifier}`;
|
|
260
|
+
switch (property) {
|
|
261
|
+
case "animationKeyframes":
|
|
262
|
+
{
|
|
263
|
+
const [animationNames, keyframesRules] = processKeyframesValue(value);
|
|
264
|
+
const block = createDeclarationBlock({
|
|
265
|
+
animationName: animationNames.join(",")
|
|
266
|
+
});
|
|
267
|
+
rules.push(`${selector}${block}`, ...keyframesRules);
|
|
268
|
+
break;
|
|
269
|
+
}
|
|
270
|
+
// Equivalent to using '::placeholder'
|
|
271
|
+
case "placeholderTextColor":
|
|
272
|
+
{
|
|
273
|
+
const block = createDeclarationBlock({
|
|
274
|
+
color: value,
|
|
275
|
+
opacity: 1
|
|
276
|
+
});
|
|
277
|
+
rules.push(`${selector}::-webkit-input-placeholder${block}`, `${selector}::-moz-placeholder${block}`, `${selector}:-ms-input-placeholder${block}`, `${selector}::placeholder${block}`);
|
|
278
|
+
break;
|
|
279
|
+
}
|
|
280
|
+
// Polyfill for additional 'pointer-events' values
|
|
281
|
+
// See d13f78622b233a0afc0c7a200c0a0792c8ca9e58
|
|
282
|
+
case "pointerEvents":
|
|
283
|
+
{
|
|
284
|
+
let finalValue = value;
|
|
285
|
+
if (value === "auto" || value === "box-only") {
|
|
286
|
+
finalValue = "auto!important";
|
|
287
|
+
if (value === "box-only") {
|
|
288
|
+
const block2 = createDeclarationBlock({
|
|
289
|
+
pointerEvents: "none"
|
|
290
|
+
});
|
|
291
|
+
rules.push(`${selector}>*${block2}`);
|
|
292
|
+
}
|
|
293
|
+
} else if (value === "none" || value === "box-none") {
|
|
294
|
+
finalValue = "none!important";
|
|
295
|
+
if (value === "box-none") {
|
|
296
|
+
const block2 = createDeclarationBlock({
|
|
297
|
+
pointerEvents: "auto"
|
|
298
|
+
});
|
|
299
|
+
rules.push(`${selector}>*${block2}`);
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
const block = createDeclarationBlock({
|
|
303
|
+
pointerEvents: finalValue
|
|
304
|
+
});
|
|
305
|
+
rules.push(`${selector}${block}`);
|
|
306
|
+
break;
|
|
307
|
+
}
|
|
308
|
+
// Polyfill for draft spec
|
|
309
|
+
// https://drafts.csswg.org/css-scrollbars-1/
|
|
310
|
+
case "scrollbarWidth":
|
|
311
|
+
{
|
|
312
|
+
if (value === "none") {
|
|
313
|
+
rules.push(`${selector}::-webkit-scrollbar{display:none}`);
|
|
314
|
+
}
|
|
315
|
+
const block = createDeclarationBlock({
|
|
316
|
+
scrollbarWidth: value
|
|
317
|
+
});
|
|
318
|
+
rules.push(`${selector}${block}`);
|
|
319
|
+
break;
|
|
320
|
+
}
|
|
321
|
+
default:
|
|
322
|
+
{
|
|
323
|
+
const block = createDeclarationBlock({
|
|
324
|
+
[property]: value
|
|
325
|
+
});
|
|
326
|
+
rules.push(`${selector}${block}`);
|
|
327
|
+
break;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
return rules;
|
|
331
|
+
}
|
|
332
|
+
function createDeclarationBlock(style) {
|
|
333
|
+
const domStyle = (0, import_createReactDOMStyle.createReactDOMStyle)(style);
|
|
334
|
+
const declarationsString = Object.keys(domStyle).map(property => {
|
|
335
|
+
const value = domStyle[property];
|
|
336
|
+
const prop = (0, import_hyphenateStyleName.hyphenateStyleName)(property);
|
|
337
|
+
if (Array.isArray(value)) {
|
|
338
|
+
return value.map(v => `${prop}:${v}`).join(";");
|
|
339
|
+
} else {
|
|
340
|
+
return `${prop}:${value}`;
|
|
341
|
+
}
|
|
342
|
+
}).sort().join(";");
|
|
343
|
+
return `{${declarationsString};}`;
|
|
344
|
+
}
|
|
345
|
+
function createIdentifier(prefix, name, value) {
|
|
346
|
+
const hashedString = (0, import_simple_hash.simpleHash)(name + stringifyValueWithProperty(value, name));
|
|
347
|
+
return process.env.NODE_ENV !== "production" ? `${prefix}-${name}-${hashedString}` : `${prefix}-${hashedString}`;
|
|
348
|
+
}
|
|
349
|
+
function createKeyframes(keyframes) {
|
|
350
|
+
const prefixes = ["-webkit-", ""];
|
|
351
|
+
const identifier = createIdentifier("r", "animation", keyframes);
|
|
352
|
+
const steps = "{" + Object.keys(keyframes).map(stepName => {
|
|
353
|
+
const rule = keyframes[stepName];
|
|
354
|
+
const block = createDeclarationBlock(rule);
|
|
355
|
+
return `${stepName}${block}`;
|
|
356
|
+
}).join("") + "}";
|
|
357
|
+
const rules = prefixes.map(prefix => {
|
|
358
|
+
return `@${prefix}keyframes ${identifier}${steps}`;
|
|
359
|
+
});
|
|
360
|
+
return [identifier, rules];
|
|
361
|
+
}
|
|
362
|
+
function processKeyframesValue(keyframesValue) {
|
|
363
|
+
if (typeof keyframesValue === "number") {
|
|
364
|
+
throw new Error(`Invalid CSS keyframes type: ${typeof keyframesValue}`);
|
|
365
|
+
}
|
|
366
|
+
const animationNames = [];
|
|
367
|
+
const rules = [];
|
|
368
|
+
const value = Array.isArray(keyframesValue) ? keyframesValue : [keyframesValue];
|
|
369
|
+
value.forEach(keyframes => {
|
|
370
|
+
if (typeof keyframes === "string") {
|
|
371
|
+
animationNames.push(keyframes);
|
|
372
|
+
} else {
|
|
373
|
+
const [identifier, keyframesRules] = createKeyframes(keyframes);
|
|
374
|
+
animationNames.push(identifier);
|
|
375
|
+
rules.push(...keyframesRules);
|
|
376
|
+
}
|
|
377
|
+
});
|
|
378
|
+
return [animationNames, rules];
|
|
379
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
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
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: true
|
|
22
|
+
}), mod);
|
|
23
|
+
var normalizeColor_exports = {};
|
|
24
|
+
__export(normalizeColor_exports, {
|
|
25
|
+
normalizeColor: () => normalizeColor
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(normalizeColor_exports);
|
|
28
|
+
var import_isWebColor = require("../../modules/isWebColor/index.cjs");
|
|
29
|
+
var import_processColor = require("../../modules/processColor/index.cjs");
|
|
30
|
+
const normalizeColor = (color, opacity = 1) => {
|
|
31
|
+
if (color == null) return;
|
|
32
|
+
if (typeof color === "string" && (0, import_isWebColor.isWebColor)(color)) return color;
|
|
33
|
+
const colorInt = (0, import_processColor.processColor)(color);
|
|
34
|
+
if (colorInt != null) return `rgba(${colorInt >> 16 & 255},${colorInt >> 8 & 255},${colorInt & 255},${((colorInt >> 24 & 255) / 255 * opacity).toFixed(2)})`;
|
|
35
|
+
if (typeof color === "string") return color;
|
|
36
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
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
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: true
|
|
22
|
+
}), mod);
|
|
23
|
+
var normalizeValueWithProperty_exports = {};
|
|
24
|
+
__export(normalizeValueWithProperty_exports, {
|
|
25
|
+
normalizeValueWithProperty: () => normalizeValueWithProperty
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(normalizeValueWithProperty_exports);
|
|
28
|
+
var import_unitlessNumbers = require("../../modules/unitlessNumbers/index.cjs");
|
|
29
|
+
var import_normalizeColor = require("./normalizeColor.cjs");
|
|
30
|
+
const colorProps = {
|
|
31
|
+
backgroundColor: true,
|
|
32
|
+
borderColor: true,
|
|
33
|
+
borderTopColor: true,
|
|
34
|
+
borderRightColor: true,
|
|
35
|
+
borderBottomColor: true,
|
|
36
|
+
borderLeftColor: true,
|
|
37
|
+
color: true,
|
|
38
|
+
shadowColor: true,
|
|
39
|
+
textDecorationColor: true,
|
|
40
|
+
textShadowColor: true
|
|
41
|
+
};
|
|
42
|
+
function normalizeValueWithProperty(value, property) {
|
|
43
|
+
let returnValue = value;
|
|
44
|
+
if ((property == null || !import_unitlessNumbers.unitlessNumbers[property]) && typeof value === "number") {
|
|
45
|
+
returnValue = `${value}px`;
|
|
46
|
+
} else if (property != null && colorProps[property]) {
|
|
47
|
+
returnValue = (0, import_normalizeColor.normalizeColor)(value);
|
|
48
|
+
}
|
|
49
|
+
return returnValue;
|
|
50
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
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
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: true
|
|
22
|
+
}), mod);
|
|
23
|
+
var resolveShadowValue_exports = {};
|
|
24
|
+
__export(resolveShadowValue_exports, {
|
|
25
|
+
resolveShadowValue: () => resolveShadowValue
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(resolveShadowValue_exports);
|
|
28
|
+
var import_normalizeColor = require("./normalizeColor.cjs");
|
|
29
|
+
var import_normalizeValueWithProperty = require("./normalizeValueWithProperty.cjs");
|
|
30
|
+
const defaultOffset = {
|
|
31
|
+
height: 0,
|
|
32
|
+
width: 0
|
|
33
|
+
};
|
|
34
|
+
const resolveShadowValue = style => {
|
|
35
|
+
const {
|
|
36
|
+
shadowColor,
|
|
37
|
+
shadowOffset,
|
|
38
|
+
shadowOpacity,
|
|
39
|
+
shadowRadius
|
|
40
|
+
} = style;
|
|
41
|
+
const {
|
|
42
|
+
height,
|
|
43
|
+
width
|
|
44
|
+
} = shadowOffset || defaultOffset;
|
|
45
|
+
const offsetX = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(width);
|
|
46
|
+
const offsetY = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(height);
|
|
47
|
+
const blurRadius = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(shadowRadius || 0);
|
|
48
|
+
const color = (0, import_normalizeColor.normalizeColor)(shadowColor || "black", shadowOpacity);
|
|
49
|
+
if (color != null && offsetX != null && offsetY != null && blurRadius != null) {
|
|
50
|
+
return `${offsetX} ${offsetY} ${blurRadius} ${color}`;
|
|
51
|
+
}
|
|
52
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
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
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: true
|
|
22
|
+
}), mod);
|
|
23
|
+
var createCSSStyleSheet_exports = {};
|
|
24
|
+
__export(createCSSStyleSheet_exports, {
|
|
25
|
+
createCSSStyleSheet: () => createCSSStyleSheet
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(createCSSStyleSheet_exports);
|
|
28
|
+
var import_canUseDOM = require("../../modules/canUseDOM.cjs");
|
|
29
|
+
function createCSSStyleSheet(id, rootNode, textContent) {
|
|
30
|
+
if (import_canUseDOM.canUseDOM) {
|
|
31
|
+
const root = rootNode != null ? rootNode : document;
|
|
32
|
+
let element = root.getElementById(id);
|
|
33
|
+
if (element == null) {
|
|
34
|
+
element = document.createElement("style");
|
|
35
|
+
element.setAttribute("id", id);
|
|
36
|
+
if (typeof textContent === "string") {
|
|
37
|
+
element.appendChild(document.createTextNode(textContent));
|
|
38
|
+
}
|
|
39
|
+
if (root instanceof ShadowRoot) {
|
|
40
|
+
root.insertBefore(element, root.firstChild);
|
|
41
|
+
} else {
|
|
42
|
+
const head = root.head;
|
|
43
|
+
if (head) {
|
|
44
|
+
head.appendChild(element);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return element.sheet;
|
|
49
|
+
} else {
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
}
|