@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,121 @@
|
|
|
1
|
+
var import_preprocess = require("../preprocess.cjs");
|
|
2
|
+
describe("StyleSheet/preprocess", () => {
|
|
3
|
+
describe("preprocesses multiple shadow styles into a single declaration", () => {
|
|
4
|
+
test("shadowColor only", () => {
|
|
5
|
+
expect((0, import_preprocess.preprocess)({
|
|
6
|
+
shadowColor: "red"
|
|
7
|
+
})).toEqual({
|
|
8
|
+
boxShadow: "0px 0px 0px rgba(255,0,0,1.00)"
|
|
9
|
+
});
|
|
10
|
+
});
|
|
11
|
+
test("shadowColor and shadowOpacity only", () => {
|
|
12
|
+
expect((0, import_preprocess.preprocess)({
|
|
13
|
+
shadowColor: "red",
|
|
14
|
+
shadowOpacity: 0.5
|
|
15
|
+
})).toEqual({
|
|
16
|
+
boxShadow: "0px 0px 0px rgba(255,0,0,0.50)"
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
test("shadowOffset only", () => {
|
|
20
|
+
expect((0, import_preprocess.preprocess)({
|
|
21
|
+
shadowOffset: {
|
|
22
|
+
width: 1,
|
|
23
|
+
height: 2
|
|
24
|
+
}
|
|
25
|
+
})).toEqual({
|
|
26
|
+
boxShadow: "1px 2px 0px rgba(0,0,0,1.00)"
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
test("shadowRadius only", () => {
|
|
30
|
+
expect((0, import_preprocess.preprocess)({
|
|
31
|
+
shadowRadius: 5
|
|
32
|
+
})).toEqual({
|
|
33
|
+
boxShadow: "0px 0px 5px rgba(0,0,0,1.00)"
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
test("shadowOffset, shadowRadius, shadowColor", () => {
|
|
37
|
+
expect((0, import_preprocess.preprocess)({
|
|
38
|
+
shadowColor: "rgba(50,60,70,0.5)",
|
|
39
|
+
shadowOffset: {
|
|
40
|
+
width: 1,
|
|
41
|
+
height: 2
|
|
42
|
+
},
|
|
43
|
+
shadowOpacity: 0.5,
|
|
44
|
+
shadowRadius: 3
|
|
45
|
+
})).toEqual({
|
|
46
|
+
boxShadow: "1px 2px 3px rgba(50,60,70,0.25)"
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
describe("preprocesses multiple textShadow styles into a single declaration", () => {
|
|
51
|
+
test("textShadowColor only", () => {
|
|
52
|
+
expect((0, import_preprocess.preprocess)({
|
|
53
|
+
textShadowColor: "red"
|
|
54
|
+
})).toEqual({});
|
|
55
|
+
});
|
|
56
|
+
test("textShadowOffset only", () => {
|
|
57
|
+
expect((0, import_preprocess.preprocess)({
|
|
58
|
+
textShadowOffset: {
|
|
59
|
+
width: 1,
|
|
60
|
+
height: 2
|
|
61
|
+
}
|
|
62
|
+
})).toEqual({});
|
|
63
|
+
});
|
|
64
|
+
test("textShadowRadius only", () => {
|
|
65
|
+
expect((0, import_preprocess.preprocess)({
|
|
66
|
+
textShadowRadius: 5
|
|
67
|
+
})).toEqual({});
|
|
68
|
+
});
|
|
69
|
+
test("textShadowColor and textShadowOffset only", () => {
|
|
70
|
+
expect((0, import_preprocess.preprocess)({
|
|
71
|
+
textShadowColor: "red",
|
|
72
|
+
textShadowOffset: {
|
|
73
|
+
width: 0,
|
|
74
|
+
height: 0
|
|
75
|
+
}
|
|
76
|
+
})).toEqual({});
|
|
77
|
+
expect((0, import_preprocess.preprocess)({
|
|
78
|
+
textShadowColor: "red",
|
|
79
|
+
textShadowOffset: {
|
|
80
|
+
width: -1,
|
|
81
|
+
height: 0
|
|
82
|
+
}
|
|
83
|
+
})).toEqual({
|
|
84
|
+
textShadow: "-1px 0px 0px rgba(255,0,0,1.00)"
|
|
85
|
+
});
|
|
86
|
+
expect((0, import_preprocess.preprocess)({
|
|
87
|
+
textShadowColor: "red",
|
|
88
|
+
textShadowOffset: {
|
|
89
|
+
width: 1,
|
|
90
|
+
height: 2
|
|
91
|
+
}
|
|
92
|
+
})).toEqual({
|
|
93
|
+
textShadow: "1px 2px 0px rgba(255,0,0,1.00)"
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
test("textShadowColor and textShadowRadius only", () => {
|
|
97
|
+
expect((0, import_preprocess.preprocess)({
|
|
98
|
+
textShadowColor: "red",
|
|
99
|
+
textShadowRadius: 0
|
|
100
|
+
})).toEqual({});
|
|
101
|
+
expect((0, import_preprocess.preprocess)({
|
|
102
|
+
textShadowColor: "red",
|
|
103
|
+
textShadowRadius: 5
|
|
104
|
+
})).toEqual({
|
|
105
|
+
textShadow: "0px 0px 5px rgba(255,0,0,1.00)"
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
test("textShadowColor, textShadowOffset, textShadowRadius", () => {
|
|
109
|
+
expect((0, import_preprocess.preprocess)({
|
|
110
|
+
textShadowColor: "rgba(50,60,70,0.50)",
|
|
111
|
+
textShadowOffset: {
|
|
112
|
+
width: 5,
|
|
113
|
+
height: 10
|
|
114
|
+
},
|
|
115
|
+
textShadowRadius: 15
|
|
116
|
+
})).toEqual({
|
|
117
|
+
textShadow: "5px 10px 15px rgba(50,60,70,0.50)"
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
});
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
var import_validate = require("../validate.cjs");
|
|
2
|
+
describe("validate", () => {
|
|
3
|
+
beforeAll(() => {
|
|
4
|
+
jest.spyOn(console, "error").mockImplementation(() => {});
|
|
5
|
+
});
|
|
6
|
+
afterAll(() => {
|
|
7
|
+
console.error.mockRestore();
|
|
8
|
+
});
|
|
9
|
+
afterEach(() => {
|
|
10
|
+
console.error.mockClear();
|
|
11
|
+
});
|
|
12
|
+
test("invalid shortform properties", () => {
|
|
13
|
+
(0, import_validate.validate)({
|
|
14
|
+
background: "red"
|
|
15
|
+
});
|
|
16
|
+
(0, import_validate.validate)({
|
|
17
|
+
font: "arial"
|
|
18
|
+
});
|
|
19
|
+
(0, import_validate.validate)({
|
|
20
|
+
borderTop: "1px solid red"
|
|
21
|
+
});
|
|
22
|
+
expect(console.error).toHaveBeenCalled();
|
|
23
|
+
});
|
|
24
|
+
test("valid shortform values", () => {
|
|
25
|
+
(0, import_validate.validate)({
|
|
26
|
+
flex: 1
|
|
27
|
+
});
|
|
28
|
+
(0, import_validate.validate)({
|
|
29
|
+
margin: 10
|
|
30
|
+
});
|
|
31
|
+
(0, import_validate.validate)({
|
|
32
|
+
margin: "calc(10 * 1px)"
|
|
33
|
+
});
|
|
34
|
+
(0, import_validate.validate)({
|
|
35
|
+
margin: "calc(10 * calc(10 * 1px))"
|
|
36
|
+
});
|
|
37
|
+
expect(console.error).not.toHaveBeenCalled();
|
|
38
|
+
});
|
|
39
|
+
test("invalid shortform multi-values", () => {
|
|
40
|
+
(0, import_validate.validate)({
|
|
41
|
+
flex: "1 1 25%"
|
|
42
|
+
});
|
|
43
|
+
(0, import_validate.validate)({
|
|
44
|
+
margin: "10px 20px"
|
|
45
|
+
});
|
|
46
|
+
(0, import_validate.validate)({
|
|
47
|
+
margin: "calc(10 * 1px) var(--test)"
|
|
48
|
+
});
|
|
49
|
+
expect(console.error).toHaveBeenCalledTimes(3);
|
|
50
|
+
});
|
|
51
|
+
});
|
|
@@ -0,0 +1,160 @@
|
|
|
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 createReactDOMStyle_exports = {};
|
|
24
|
+
__export(createReactDOMStyle_exports, {
|
|
25
|
+
createReactDOMStyle: () => createReactDOMStyle,
|
|
26
|
+
createTransformValue: () => createTransformValue
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(createReactDOMStyle_exports);
|
|
29
|
+
var import_canUseDOM = require("../../modules/canUseDOM.cjs");
|
|
30
|
+
var import_normalizeValueWithProperty = require("./normalizeValueWithProperty.cjs");
|
|
31
|
+
const emptyObject = {};
|
|
32
|
+
const supportsCSS3TextDecoration = !import_canUseDOM.canUseDOM || window.CSS != null && window.CSS.supports != null && (window.CSS.supports("text-decoration-line", "none") || window.CSS.supports("-webkit-text-decoration-line", "none"));
|
|
33
|
+
const ignoredProps = {
|
|
34
|
+
elevation: true,
|
|
35
|
+
overlayColor: true,
|
|
36
|
+
resizeMode: true,
|
|
37
|
+
tintColor: true
|
|
38
|
+
};
|
|
39
|
+
const MONOSPACE_FONT_STACK = "monospace,monospace";
|
|
40
|
+
const SYSTEM_FONT_STACK = '-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif';
|
|
41
|
+
const STYLE_SHORT_FORM_EXPANSIONS = {
|
|
42
|
+
borderColor: ["borderTopColor", "borderRightColor", "borderBottomColor", "borderLeftColor"],
|
|
43
|
+
borderRadius: ["borderTopLeftRadius", "borderTopRightRadius", "borderBottomRightRadius", "borderBottomLeftRadius"],
|
|
44
|
+
borderStyle: ["borderTopStyle", "borderRightStyle", "borderBottomStyle", "borderLeftStyle"],
|
|
45
|
+
borderWidth: ["borderTopWidth", "borderRightWidth", "borderBottomWidth", "borderLeftWidth"],
|
|
46
|
+
marginHorizontal: ["marginRight", "marginLeft"],
|
|
47
|
+
marginVertical: ["marginTop", "marginBottom"],
|
|
48
|
+
overflow: ["overflowX", "overflowY"],
|
|
49
|
+
overscrollBehavior: ["overscrollBehaviorX", "overscrollBehaviorY"],
|
|
50
|
+
paddingHorizontal: ["paddingRight", "paddingLeft"],
|
|
51
|
+
paddingVertical: ["paddingTop", "paddingBottom"]
|
|
52
|
+
};
|
|
53
|
+
const mapTransform = transform => {
|
|
54
|
+
const type = Object.keys(transform)[0];
|
|
55
|
+
const value = transform[type];
|
|
56
|
+
if (type === "matrix" || type === "matrix3d") {
|
|
57
|
+
return `${type}(${value.join(",")})`;
|
|
58
|
+
} else {
|
|
59
|
+
const normalizedValue = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(value, type);
|
|
60
|
+
return `${type}(${normalizedValue})`;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
const createTransformValue = style => {
|
|
64
|
+
let transform = style.transform;
|
|
65
|
+
if (Array.isArray(style.transform)) {
|
|
66
|
+
transform = style.transform.map(mapTransform).join(" ");
|
|
67
|
+
}
|
|
68
|
+
return transform;
|
|
69
|
+
};
|
|
70
|
+
const createReactDOMStyle = (style, isInline) => {
|
|
71
|
+
if (!style) {
|
|
72
|
+
return emptyObject;
|
|
73
|
+
}
|
|
74
|
+
const resolvedStyle = {};
|
|
75
|
+
for (const prop in style) {
|
|
76
|
+
const value = style[prop];
|
|
77
|
+
if (
|
|
78
|
+
// Ignore everything with a null value
|
|
79
|
+
value == null ||
|
|
80
|
+
// Ignore some React Native styles
|
|
81
|
+
ignoredProps[prop]) {
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
if (prop === "aspectRatio") {
|
|
85
|
+
resolvedStyle[prop] = value.toString();
|
|
86
|
+
} else if (prop === "backgroundClip") {
|
|
87
|
+
if (value === "text") {
|
|
88
|
+
resolvedStyle.backgroundClip = value;
|
|
89
|
+
resolvedStyle.WebkitBackgroundClip = value;
|
|
90
|
+
}
|
|
91
|
+
} else if (prop === "flex") {
|
|
92
|
+
if (value === -1) {
|
|
93
|
+
resolvedStyle.flexGrow = 0;
|
|
94
|
+
resolvedStyle.flexShrink = 1;
|
|
95
|
+
resolvedStyle.flexBasis = "auto";
|
|
96
|
+
} else {
|
|
97
|
+
resolvedStyle.flex = value;
|
|
98
|
+
}
|
|
99
|
+
} else if (prop === "font") {
|
|
100
|
+
resolvedStyle[prop] = value.replace("System", SYSTEM_FONT_STACK);
|
|
101
|
+
} else if (prop === "fontFamily") {
|
|
102
|
+
if (value.indexOf("System") > -1) {
|
|
103
|
+
const stack = value.split(/,\s*/);
|
|
104
|
+
stack[stack.indexOf("System")] = SYSTEM_FONT_STACK;
|
|
105
|
+
resolvedStyle[prop] = stack.join(",");
|
|
106
|
+
} else if (value === "monospace") {
|
|
107
|
+
resolvedStyle[prop] = MONOSPACE_FONT_STACK;
|
|
108
|
+
} else {
|
|
109
|
+
resolvedStyle[prop] = value;
|
|
110
|
+
}
|
|
111
|
+
} else if (prop === "fontVariant") {
|
|
112
|
+
if (Array.isArray(value) && value.length > 0) {
|
|
113
|
+
resolvedStyle.fontVariant = value.join(" ");
|
|
114
|
+
}
|
|
115
|
+
} else if (prop === "textAlignVertical") {
|
|
116
|
+
resolvedStyle.verticalAlign = value === "center" ? "middle" : value;
|
|
117
|
+
} else if (prop === "textDecorationLine") {
|
|
118
|
+
if (!supportsCSS3TextDecoration) {
|
|
119
|
+
resolvedStyle.textDecoration = value;
|
|
120
|
+
} else {
|
|
121
|
+
resolvedStyle.textDecorationLine = value;
|
|
122
|
+
}
|
|
123
|
+
} else if (prop === "transform" || prop === "transformMatrix") {
|
|
124
|
+
resolvedStyle.transform = createTransformValue(style);
|
|
125
|
+
} else if (prop === "writingDirection") {
|
|
126
|
+
resolvedStyle.direction = value;
|
|
127
|
+
} else {
|
|
128
|
+
const value2 = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(style[prop], prop);
|
|
129
|
+
const longFormProperties = STYLE_SHORT_FORM_EXPANSIONS[prop];
|
|
130
|
+
if (isInline && prop === "margin") {
|
|
131
|
+
if (style.marginHorizontal == null) {
|
|
132
|
+
resolvedStyle.marginLeft = value2;
|
|
133
|
+
resolvedStyle.marginRight = value2;
|
|
134
|
+
}
|
|
135
|
+
if (style.marginVertical == null) {
|
|
136
|
+
resolvedStyle.marginTop = value2;
|
|
137
|
+
resolvedStyle.marginBottom = value2;
|
|
138
|
+
}
|
|
139
|
+
} else if (isInline && prop === "padding") {
|
|
140
|
+
if (style.paddingHorizontal == null) {
|
|
141
|
+
resolvedStyle.paddingLeft = value2;
|
|
142
|
+
resolvedStyle.paddingRight = value2;
|
|
143
|
+
}
|
|
144
|
+
if (style.paddingVertical == null) {
|
|
145
|
+
resolvedStyle.paddingTop = value2;
|
|
146
|
+
resolvedStyle.paddingBottom = value2;
|
|
147
|
+
}
|
|
148
|
+
} else if (longFormProperties) {
|
|
149
|
+
longFormProperties.forEach((longForm, i) => {
|
|
150
|
+
if (style[longForm] == null) {
|
|
151
|
+
resolvedStyle[longForm] = value2;
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
} else {
|
|
155
|
+
resolvedStyle[prop] = Array.isArray(value2) ? value2.join(",") : value2;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
return resolvedStyle;
|
|
160
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
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 hash_exports = {};
|
|
24
|
+
__export(hash_exports, {
|
|
25
|
+
default: () => import_simple_hash.simpleHash
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(hash_exports);
|
|
28
|
+
var import_simple_hash = require("@hanzogui/simple-hash");
|
|
@@ -0,0 +1,40 @@
|
|
|
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 hyphenateStyleName_exports = {};
|
|
24
|
+
__export(hyphenateStyleName_exports, {
|
|
25
|
+
hyphenateStyleName: () => hyphenateStyleName
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(hyphenateStyleName_exports);
|
|
28
|
+
const uppercasePattern = /[A-Z]/g;
|
|
29
|
+
const msPattern = /^ms-/;
|
|
30
|
+
const cache = {};
|
|
31
|
+
function toHyphenLower(match) {
|
|
32
|
+
return "-" + match.toLowerCase();
|
|
33
|
+
}
|
|
34
|
+
function hyphenateStyleName(name) {
|
|
35
|
+
if (name in cache) {
|
|
36
|
+
return cache[name];
|
|
37
|
+
}
|
|
38
|
+
const hName = name.replace(uppercasePattern, toHyphenLower);
|
|
39
|
+
return cache[name] = msPattern.test(hName) ? "-" + hName : hName;
|
|
40
|
+
}
|