@tamagui/react-native-web-internals 2.7.7 → 3.0.0-beta.637.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/StyleSheet/compiler/createReactDOMStyle.cjs +151 -136
- package/dist/cjs/StyleSheet/compiler/hash.cjs +15 -18
- package/dist/cjs/StyleSheet/compiler/hyphenateStyleName.cjs +21 -24
- package/dist/cjs/StyleSheet/compiler/index.cjs +295 -321
- package/dist/cjs/StyleSheet/compiler/normalizeColor.cjs +20 -23
- package/dist/cjs/StyleSheet/compiler/normalizeValueWithProperty.cjs +32 -35
- package/dist/cjs/StyleSheet/compiler/resolveShadowValue.cjs +27 -38
- package/dist/cjs/StyleSheet/dom/createCSSStyleSheet.cjs +37 -40
- package/dist/cjs/StyleSheet/dom/createOrderedCSSStyleSheet.cjs +108 -111
- package/dist/cjs/StyleSheet/dom/index.cjs +70 -72
- package/dist/cjs/StyleSheet/index.cjs +33 -34
- package/dist/cjs/StyleSheet/preprocess.cjs +74 -94
- package/dist/cjs/StyleSheet/validate.cjs +72 -75
- package/dist/cjs/TextAncestorContext.cjs +15 -18
- package/dist/cjs/colorProps.cjs +25 -28
- package/dist/cjs/index.cjs +49 -50
- package/dist/cjs/modules/AccessibilityUtil/index.cjs +18 -21
- package/dist/cjs/modules/AccessibilityUtil/isDisabled.cjs +15 -18
- package/dist/cjs/modules/AccessibilityUtil/propsToAccessibilityComponent.cjs +46 -49
- package/dist/cjs/modules/AccessibilityUtil/propsToAriaRole.cjs +34 -39
- package/dist/cjs/modules/AssetRegistry/index.cjs +18 -19
- package/dist/cjs/modules/ImageLoader/index.cjs +135 -141
- package/dist/cjs/modules/InteractionManager.cjs +212 -219
- package/dist/cjs/modules/Platform/index.cjs +18 -21
- package/dist/cjs/modules/TextInputState/index.cjs +55 -58
- package/dist/cjs/modules/UIManager/index.cjs +46 -51
- package/dist/cjs/modules/canUseDOM.cjs +15 -18
- package/dist/cjs/modules/createDOMProps/index.cjs +289 -358
- package/dist/cjs/modules/createEventHandle/index.cjs +57 -62
- package/dist/cjs/modules/dismissKeyboard/index.cjs +16 -19
- package/dist/cjs/modules/forwardedProps/index.cjs +128 -130
- package/dist/cjs/modules/getBoundingClientRect/index.cjs +22 -25
- package/dist/cjs/modules/invariant.cjs +26 -27
- package/dist/cjs/modules/isSelectionValid/index.cjs +22 -25
- package/dist/cjs/modules/isWebColor/index.cjs +15 -18
- package/dist/cjs/modules/mergeRefs/index.cjs +31 -34
- package/dist/cjs/modules/modality/index.cjs +131 -134
- package/dist/cjs/modules/multiplyStyleLengthValue/index.cjs +25 -28
- package/dist/cjs/modules/normalizeColor/index.cjs +28 -31
- package/dist/cjs/modules/pick/index.cjs +24 -27
- package/dist/cjs/modules/processColor/index.cjs +28 -36
- package/dist/cjs/modules/requestIdleCallback/index.cjs +28 -29
- package/dist/cjs/modules/setValueForStyles/dangerousStyleValue.cjs +39 -42
- package/dist/cjs/modules/setValueForStyles/index.cjs +31 -34
- package/dist/cjs/modules/unitlessNumbers/index.cjs +74 -75
- package/dist/cjs/modules/useElementLayout/index.cjs +24 -31
- package/dist/cjs/modules/useEvent/index.cjs +40 -43
- package/dist/cjs/modules/useHover/index.cjs +113 -118
- package/dist/cjs/modules/useLayoutEffect/index.cjs +18 -26
- package/dist/cjs/modules/useLocale/index.cjs +33 -43
- package/dist/cjs/modules/useLocale/isLocaleRTL.cjs +66 -76
- package/dist/cjs/modules/useMergeRefs/index.cjs +19 -29
- package/dist/cjs/modules/usePlatformMethods/index.cjs +24 -30
- package/dist/cjs/modules/useStable/index.cjs +24 -32
- package/dist/cjs/styleTypes.cjs +10 -11
- package/dist/cjs/types.cjs +10 -11
- package/dist/esm/StyleSheet/compiler/createReactDOMStyle.mjs +137 -119
- package/dist/esm/StyleSheet/compiler/createReactDOMStyle.mjs.map +1 -1
- package/dist/esm/StyleSheet/compiler/hash.mjs +2 -2
- package/dist/esm/StyleSheet/compiler/hyphenateStyleName.mjs +7 -6
- package/dist/esm/StyleSheet/compiler/hyphenateStyleName.mjs.map +1 -1
- package/dist/esm/StyleSheet/compiler/index.mjs +279 -302
- package/dist/esm/StyleSheet/compiler/index.mjs.map +1 -1
- package/dist/esm/StyleSheet/compiler/normalizeColor.mjs +7 -5
- package/dist/esm/StyleSheet/compiler/normalizeColor.mjs.map +1 -1
- package/dist/esm/StyleSheet/compiler/normalizeValueWithProperty.mjs +19 -17
- package/dist/esm/StyleSheet/compiler/normalizeValueWithProperty.mjs.map +1 -1
- package/dist/esm/StyleSheet/compiler/resolveShadowValue.mjs +14 -20
- package/dist/esm/StyleSheet/compiler/resolveShadowValue.mjs.map +1 -1
- package/dist/esm/StyleSheet/dom/createCSSStyleSheet.mjs +24 -22
- package/dist/esm/StyleSheet/dom/createCSSStyleSheet.mjs.map +1 -1
- package/dist/esm/StyleSheet/dom/createOrderedCSSStyleSheet.mjs +94 -93
- package/dist/esm/StyleSheet/dom/createOrderedCSSStyleSheet.mjs.map +1 -1
- package/dist/esm/StyleSheet/dom/index.mjs +57 -54
- package/dist/esm/StyleSheet/dom/index.mjs.map +1 -1
- package/dist/esm/StyleSheet/index.mjs +18 -17
- package/dist/esm/StyleSheet/index.mjs.map +1 -1
- package/dist/esm/StyleSheet/preprocess.mjs +58 -75
- package/dist/esm/StyleSheet/preprocess.mjs.map +1 -1
- package/dist/esm/StyleSheet/validate.mjs +58 -57
- package/dist/esm/StyleSheet/validate.mjs.map +1 -1
- package/dist/esm/TextAncestorContext.mjs +2 -0
- package/dist/esm/TextAncestorContext.mjs.map +1 -1
- package/dist/esm/colorProps.mjs +11 -10
- package/dist/esm/colorProps.mjs.map +1 -1
- package/dist/esm/index.js +22 -15
- package/dist/esm/index.mjs +22 -15
- package/dist/esm/modules/AccessibilityUtil/index.mjs +5 -3
- package/dist/esm/modules/AccessibilityUtil/index.mjs.map +1 -1
- package/dist/esm/modules/AccessibilityUtil/isDisabled.mjs +2 -1
- package/dist/esm/modules/AccessibilityUtil/isDisabled.mjs.map +1 -1
- package/dist/esm/modules/AccessibilityUtil/propsToAccessibilityComponent.mjs +33 -31
- package/dist/esm/modules/AccessibilityUtil/propsToAccessibilityComponent.mjs.map +1 -1
- package/dist/esm/modules/AccessibilityUtil/propsToAriaRole.mjs +20 -21
- package/dist/esm/modules/AccessibilityUtil/propsToAriaRole.mjs.map +1 -1
- package/dist/esm/modules/AssetRegistry/index.mjs +3 -2
- package/dist/esm/modules/AssetRegistry/index.mjs.map +1 -1
- package/dist/esm/modules/ImageLoader/index.mjs +120 -124
- package/dist/esm/modules/ImageLoader/index.mjs.map +1 -1
- package/dist/esm/modules/InteractionManager.mjs +199 -201
- package/dist/esm/modules/InteractionManager.mjs.map +1 -1
- package/dist/esm/modules/Platform/index.mjs +4 -3
- package/dist/esm/modules/Platform/index.mjs.map +1 -1
- package/dist/esm/modules/TextInputState/index.mjs +42 -40
- package/dist/esm/modules/TextInputState/index.mjs.map +1 -1
- package/dist/esm/modules/UIManager/index.mjs +33 -33
- package/dist/esm/modules/UIManager/index.mjs.map +1 -1
- package/dist/esm/modules/canUseDOM.mjs +1 -0
- package/dist/esm/modules/canUseDOM.mjs.map +1 -1
- package/dist/esm/modules/createDOMProps/index.mjs +275 -341
- package/dist/esm/modules/createDOMProps/index.mjs.map +1 -1
- package/dist/esm/modules/createEventHandle/index.mjs +44 -44
- package/dist/esm/modules/createEventHandle/index.mjs.map +1 -1
- package/dist/esm/modules/dismissKeyboard/index.mjs +3 -1
- package/dist/esm/modules/dismissKeyboard/index.mjs.map +1 -1
- package/dist/esm/modules/forwardedProps/index.mjs +104 -104
- package/dist/esm/modules/forwardedProps/index.mjs.map +1 -1
- package/dist/esm/modules/getBoundingClientRect/index.mjs +8 -7
- package/dist/esm/modules/getBoundingClientRect/index.mjs.map +1 -1
- package/dist/esm/modules/invariant.mjs +11 -10
- package/dist/esm/modules/invariant.mjs.map +1 -1
- package/dist/esm/modules/isSelectionValid/index.mjs +8 -7
- package/dist/esm/modules/isSelectionValid/index.mjs.map +1 -1
- package/dist/esm/modules/isWebColor/index.mjs +2 -1
- package/dist/esm/modules/isWebColor/index.mjs.map +1 -1
- package/dist/esm/modules/mergeRefs/index.mjs +17 -16
- package/dist/esm/modules/mergeRefs/index.mjs.map +1 -1
- package/dist/esm/modules/modality/index.mjs +115 -115
- package/dist/esm/modules/modality/index.mjs.map +1 -1
- package/dist/esm/modules/multiplyStyleLengthValue/index.mjs +11 -10
- package/dist/esm/modules/multiplyStyleLengthValue/index.mjs.map +1 -1
- package/dist/esm/modules/normalizeColor/index.mjs +15 -13
- package/dist/esm/modules/normalizeColor/index.mjs.map +1 -1
- package/dist/esm/modules/pick/index.mjs +10 -9
- package/dist/esm/modules/pick/index.mjs.map +1 -1
- package/dist/esm/modules/processColor/index.mjs +12 -10
- package/dist/esm/modules/processColor/index.mjs.map +1 -1
- package/dist/esm/modules/requestIdleCallback/index.mjs +14 -12
- package/dist/esm/modules/requestIdleCallback/index.mjs.map +1 -1
- package/dist/esm/modules/setValueForStyles/dangerousStyleValue.mjs +27 -25
- package/dist/esm/modules/setValueForStyles/dangerousStyleValue.mjs.map +1 -1
- package/dist/esm/modules/setValueForStyles/index.mjs +18 -16
- package/dist/esm/modules/setValueForStyles/index.mjs.map +1 -1
- package/dist/esm/modules/unitlessNumbers/index.mjs +60 -57
- package/dist/esm/modules/unitlessNumbers/index.mjs.map +1 -1
- package/dist/esm/modules/useElementLayout/index.mjs +12 -14
- package/dist/esm/modules/useElementLayout/index.mjs.map +1 -1
- package/dist/esm/modules/useEvent/index.mjs +28 -26
- package/dist/esm/modules/useEvent/index.mjs.map +1 -1
- package/dist/esm/modules/useHover/index.mjs +101 -101
- package/dist/esm/modules/useHover/index.mjs.map +1 -1
- package/dist/esm/modules/useLayoutEffect/index.mjs +2 -0
- package/dist/esm/modules/useLayoutEffect/index.mjs.map +1 -1
- package/dist/esm/modules/useLocale/index.mjs +15 -17
- package/dist/esm/modules/useLocale/index.mjs.map +1 -1
- package/dist/esm/modules/useLocale/isLocaleRTL.mjs +52 -58
- package/dist/esm/modules/useLocale/isLocaleRTL.mjs.map +1 -1
- package/dist/esm/modules/useMergeRefs/index.mjs +3 -3
- package/dist/esm/modules/useMergeRefs/index.mjs.map +1 -1
- package/dist/esm/modules/usePlatformMethods/index.mjs +11 -12
- package/dist/esm/modules/usePlatformMethods/index.mjs.map +1 -1
- package/dist/esm/modules/useStable/index.mjs +8 -6
- package/dist/esm/modules/useStable/index.mjs.map +1 -1
- package/dist/esm/styleTypes.mjs +0 -2
- package/dist/esm/types.mjs +0 -2
- package/package.json +8 -8
- package/src/modules/createDOMProps/index.tsx +3 -12
- package/src/modules/forwardedProps/index.tsx +0 -1
- package/src/modules/mergeRefs/index.tsx +1 -1
- package/types/StyleSheet/compiler/createReactDOMStyle.d.ts.map +1 -1
- package/types/StyleSheet/compiler/normalizeColor.d.ts.map +1 -1
- package/types/StyleSheet/compiler/resolveShadowValue.d.ts.map +1 -1
- package/types/StyleSheet/index.d.ts +15 -16
- package/types/StyleSheet/index.d.ts.map +1 -1
- package/types/StyleSheet/preprocess.d.ts +1 -1
- package/types/StyleSheet/preprocess.d.ts.map +1 -1
- package/types/colorProps.d.ts.map +1 -1
- package/types/modules/AccessibilityUtil/index.d.ts +6 -5
- package/types/modules/AccessibilityUtil/index.d.ts.map +1 -1
- package/types/modules/AccessibilityUtil/isDisabled.d.ts.map +1 -1
- package/types/modules/AccessibilityUtil/propsToAccessibilityComponent.d.ts.map +1 -1
- package/types/modules/AccessibilityUtil/propsToAriaRole.d.ts.map +1 -1
- package/types/modules/ImageLoader/index.d.ts +1 -1
- package/types/modules/ImageLoader/index.d.ts.map +1 -1
- package/types/modules/InteractionManager.d.ts +3 -3
- package/types/modules/InteractionManager.d.ts.map +1 -1
- package/types/modules/Platform/index.d.ts.map +1 -1
- package/types/modules/TextInputState/index.d.ts.map +1 -1
- package/types/modules/createDOMProps/index.d.ts.map +1 -1
- package/types/modules/forwardedProps/index.d.ts +70 -74
- package/types/modules/forwardedProps/index.d.ts.map +1 -1
- package/types/modules/getBoundingClientRect/index.d.ts.map +1 -1
- package/types/modules/isWebColor/index.d.ts.map +1 -1
- package/types/modules/multiplyStyleLengthValue/index.d.ts.map +1 -1
- package/types/modules/normalizeColor/index.d.ts.map +1 -1
- package/types/modules/processColor/index.d.ts.map +1 -1
- package/types/modules/requestIdleCallback/index.d.ts +3 -1
- package/types/modules/requestIdleCallback/index.d.ts.map +1 -1
- package/types/modules/unitlessNumbers/index.d.ts.map +1 -1
- package/types/modules/useLayoutEffect/index.d.ts +1 -1
- package/types/modules/useLayoutEffect/index.d.ts.map +1 -1
- package/dist/cjs/StyleSheet/__tests__/compiler-createReactDOMStyle-test.cjs +0 -265
- package/dist/cjs/StyleSheet/__tests__/compiler-test.cjs +0 -419
- package/dist/cjs/StyleSheet/__tests__/dom-createOrderedCSSStyleSheet-test.cjs +0 -160
- package/dist/cjs/StyleSheet/__tests__/index-test.cjs +0 -436
- package/dist/cjs/StyleSheet/__tests__/preprocess-test.cjs +0 -121
- package/dist/cjs/StyleSheet/__tests__/validate-test.cjs +0 -51
- package/dist/cjs/modules/AccessibilityUtil/__tests__/propsToAccessibilityComponent-test.cjs +0 -57
- package/dist/cjs/modules/AccessibilityUtil/__tests__/propsToAriaRole-test.cjs +0 -46
- package/dist/cjs/modules/Platform/__tests__/index-test.cjs +0 -56
- package/dist/cjs/modules/UIManager/__tests__/index-test.cjs +0 -111
- package/dist/cjs/modules/createDOMProps/__tests__/index-test.cjs +0 -177
- package/dist/cjs/modules/createEventHandle/__tests__/index-test.cjs +0 -422
- package/dist/cjs/modules/mergeRefs/__tests__/index-test.cjs +0 -48
- package/dist/cjs/modules/modality/__tests__/index-test.cjs +0 -59
- package/dist/cjs/modules/multiplyStyleLengthValue/__tests__/index-test.cjs +0 -38
- package/dist/cjs/modules/processColor/__tests__/index-test.cjs +0 -85
- package/dist/cjs/modules/useEvent/__tests__/index-test.cjs +0 -490
- package/dist/cjs/modules/useHover/__tests__/index-test.cjs +0 -382
- package/dist/cjs/modules/useMergeRefs/__tests__/index-test.cjs +0 -125
- package/dist/cjs/modules/useStable/__tests__/index-test.cjs +0 -122
- package/dist/esm/StyleSheet/__tests__/compiler-createReactDOMStyle-test.mjs +0 -242
- package/dist/esm/StyleSheet/__tests__/compiler-createReactDOMStyle-test.mjs.map +0 -1
- package/dist/esm/StyleSheet/__tests__/compiler-test.mjs +0 -420
- package/dist/esm/StyleSheet/__tests__/compiler-test.mjs.map +0 -1
- package/dist/esm/StyleSheet/__tests__/dom-createOrderedCSSStyleSheet-test.mjs +0 -137
- package/dist/esm/StyleSheet/__tests__/dom-createOrderedCSSStyleSheet-test.mjs.map +0 -1
- package/dist/esm/StyleSheet/__tests__/index-test.mjs +0 -413
- package/dist/esm/StyleSheet/__tests__/index-test.mjs.map +0 -1
- package/dist/esm/StyleSheet/__tests__/preprocess-test.mjs +0 -122
- package/dist/esm/StyleSheet/__tests__/preprocess-test.mjs.map +0 -1
- package/dist/esm/StyleSheet/__tests__/validate-test.mjs +0 -52
- package/dist/esm/StyleSheet/__tests__/validate-test.mjs.map +0 -1
- package/dist/esm/StyleSheet/compiler/hash.mjs.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/modules/AccessibilityUtil/__tests__/propsToAccessibilityComponent-test.mjs +0 -34
- package/dist/esm/modules/AccessibilityUtil/__tests__/propsToAccessibilityComponent-test.mjs.map +0 -1
- package/dist/esm/modules/AccessibilityUtil/__tests__/propsToAriaRole-test.mjs +0 -23
- package/dist/esm/modules/AccessibilityUtil/__tests__/propsToAriaRole-test.mjs.map +0 -1
- package/dist/esm/modules/Platform/__tests__/index-test.mjs +0 -33
- package/dist/esm/modules/Platform/__tests__/index-test.mjs.map +0 -1
- package/dist/esm/modules/UIManager/__tests__/index-test.mjs +0 -88
- package/dist/esm/modules/UIManager/__tests__/index-test.mjs.map +0 -1
- package/dist/esm/modules/createDOMProps/__tests__/index-test.mjs +0 -154
- package/dist/esm/modules/createDOMProps/__tests__/index-test.mjs.map +0 -1
- package/dist/esm/modules/createEventHandle/__tests__/index-test.mjs +0 -399
- package/dist/esm/modules/createEventHandle/__tests__/index-test.mjs.map +0 -1
- package/dist/esm/modules/mergeRefs/__tests__/index-test.mjs +0 -25
- package/dist/esm/modules/mergeRefs/__tests__/index-test.mjs.map +0 -1
- package/dist/esm/modules/modality/__tests__/index-test.mjs +0 -60
- package/dist/esm/modules/modality/__tests__/index-test.mjs.map +0 -1
- package/dist/esm/modules/multiplyStyleLengthValue/__tests__/index-test.mjs +0 -15
- package/dist/esm/modules/multiplyStyleLengthValue/__tests__/index-test.mjs.map +0 -1
- package/dist/esm/modules/processColor/__tests__/index-test.mjs +0 -62
- package/dist/esm/modules/processColor/__tests__/index-test.mjs.map +0 -1
- package/dist/esm/modules/useEvent/__tests__/index-test.mjs +0 -467
- package/dist/esm/modules/useEvent/__tests__/index-test.mjs.map +0 -1
- package/dist/esm/modules/useHover/__tests__/index-test.mjs +0 -359
- package/dist/esm/modules/useHover/__tests__/index-test.mjs.map +0 -1
- package/dist/esm/modules/useMergeRefs/__tests__/index-test.mjs +0 -102
- package/dist/esm/modules/useMergeRefs/__tests__/index-test.mjs.map +0 -1
- package/dist/esm/modules/useStable/__tests__/index-test.mjs +0 -99
- package/dist/esm/modules/useStable/__tests__/index-test.mjs.map +0 -1
- package/dist/esm/styleTypes.mjs.map +0 -1
- package/dist/esm/types.mjs.map +0 -1
- package/src/StyleSheet/__tests__/compiler-createReactDOMStyle-test.tsx +0 -236
- package/src/StyleSheet/__tests__/compiler-test.tsx +0 -426
- package/src/StyleSheet/__tests__/dom-createOrderedCSSStyleSheet-test.tsx +0 -169
- package/src/StyleSheet/__tests__/index-test.tsx +0 -406
- package/src/StyleSheet/__tests__/preprocess-test.tsx +0 -107
- package/src/StyleSheet/__tests__/validate-test.tsx +0 -42
- package/src/modules/AccessibilityUtil/__tests__/propsToAccessibilityComponent-test.tsx +0 -44
- package/src/modules/AccessibilityUtil/__tests__/propsToAriaRole-test.tsx +0 -25
- package/src/modules/Platform/__tests__/index-test.tsx +0 -45
- package/src/modules/UIManager/__tests__/index-test.tsx +0 -87
- package/src/modules/createDOMProps/__tests__/index-test.tsx +0 -138
- package/src/modules/createEventHandle/__tests__/index-test.tsx +0 -459
- package/src/modules/mergeRefs/__tests__/index-test.tsx +0 -32
- package/src/modules/modality/__tests__/index-test.tsx +0 -66
- package/src/modules/multiplyStyleLengthValue/__tests__/index-test.tsx +0 -23
- package/src/modules/processColor/__tests__/index-test.tsx +0 -78
- package/src/modules/useEvent/__tests__/index-test.tsx +0 -511
- package/src/modules/useHover/__tests__/index-test.tsx +0 -342
- package/src/modules/useMergeRefs/__tests__/index-test.tsx +0 -91
- package/src/modules/useStable/__tests__/index-test.tsx +0 -101
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["esm/modules/useHover/index.js"],"sourcesContent":["import { getModality } from \"../modality/index\";\nimport { useEvent } from \"../useEvent/index\";\nimport { useLayoutEffectImpl as useLayoutEffect } from \"../useLayoutEffect/index\";\nconst emptyObject = {};\nconst opts = { passive: true };\nconst lockEventType = \"react-gui:hover:lock\";\nconst unlockEventType = \"react-gui:hover:unlock\";\nconst supportsPointerEvent = () => !!(typeof window !== \"undefined\" && window.PointerEvent != null);\nfunction dispatchCustomEvent(target, type, payload) {\n const event = document.createEvent(\"CustomEvent\");\n const { bubbles = true, cancelable = true, detail } = payload || emptyObject;\n event.initCustomEvent(type, bubbles, cancelable, detail);\n target.dispatchEvent(event);\n}\nfunction getPointerType(event) {\n const { pointerType } = event;\n return pointerType != null ? pointerType : getModality();\n}\nfunction useHover(targetRef, config) {\n const { contain, disabled, onHoverStart, onHoverChange, onHoverUpdate, onHoverEnd } = config;\n const canUsePE = supportsPointerEvent();\n const addMoveListener = useEvent(canUsePE ? \"pointermove\" : \"mousemove\", opts);\n const addEnterListener = useEvent(canUsePE ? \"pointerenter\" : \"mouseenter\", opts);\n const addLeaveListener = useEvent(canUsePE ? \"pointerleave\" : \"mouseleave\", opts);\n const addLockListener = useEvent(lockEventType, opts);\n const addUnlockListener = useEvent(unlockEventType, opts);\n useLayoutEffect(() => {\n const target = targetRef.current;\n if (target !== null) {\n const hoverEnd = function(e) {\n if (onHoverEnd != null) {\n onHoverEnd(e);\n }\n if (onHoverChange != null) {\n onHoverChange(false);\n }\n addMoveListener(target, null);\n addLeaveListener(target, null);\n };\n const leaveListener = function(e) {\n const target2 = targetRef.current;\n if (target2 != null && getPointerType(e) !== \"touch\") {\n if (contain) {\n dispatchCustomEvent(target2, unlockEventType);\n }\n hoverEnd(e);\n }\n };\n const moveListener = function(e) {\n if (getPointerType(e) !== \"touch\") {\n if (onHoverUpdate != null) {\n if (e.x == null) {\n e.x = e.clientX;\n }\n if (e.y == null) {\n e.y = e.clientY;\n }\n onHoverUpdate(e);\n }\n }\n };\n const hoverStart = function(e) {\n if (onHoverStart != null) {\n onHoverStart(e);\n }\n if (onHoverChange != null) {\n onHoverChange(true);\n }\n if (onHoverUpdate != null) {\n addMoveListener(target, !disabled ? moveListener : null);\n }\n addLeaveListener(target, !disabled ? leaveListener : null);\n };\n const enterListener = function(e) {\n const target2 = targetRef.current;\n if (target2 != null && getPointerType(e) !== \"touch\") {\n if (contain) {\n dispatchCustomEvent(target2, lockEventType);\n }\n hoverStart(e);\n const lockListener = function(lockEvent) {\n if (lockEvent.target !== target2) {\n hoverEnd(e);\n }\n };\n const unlockListener = function(lockEvent) {\n if (lockEvent.target !== target2) {\n hoverStart(e);\n }\n };\n addLockListener(target2, !disabled ? lockListener : null);\n addUnlockListener(target2, !disabled ? unlockListener : null);\n }\n };\n addEnterListener(target, !disabled ? enterListener : null);\n }\n }, [\n addEnterListener,\n addMoveListener,\n addLeaveListener,\n addLockListener,\n addUnlockListener,\n contain,\n disabled,\n onHoverStart,\n onHoverChange,\n onHoverUpdate,\n onHoverEnd,\n targetRef\n ]);\n}\nexport {\n useHover\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["esm/modules/useLayoutEffect/index.js"],"sourcesContent":["import React from \"react\";\nimport { canUseDOM } from \"../canUseDOM\";\nconst useLayoutEffectImpl = canUseDOM ? React.useLayoutEffect : React.useEffect;\nexport {\n useLayoutEffectImpl\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;AAEA,MAAM,sBAAsB,YAAY,MAAM,kBAAkB,MAAM"}
|
|
@@ -1,31 +1,29 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { isLocaleRTL } from "./isLocaleRTL.mjs";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
|
|
4
5
|
const defaultLocale = {
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
direction: "ltr",
|
|
7
|
+
locale: "en-US"
|
|
7
8
|
};
|
|
8
9
|
const LocaleContext = React.createContext(defaultLocale);
|
|
9
10
|
function getLocaleDirection(locale) {
|
|
10
|
-
|
|
11
|
+
return isLocaleRTL(locale) ? "rtl" : "ltr";
|
|
11
12
|
}
|
|
12
13
|
function LocaleProvider(props) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
locale
|
|
23
|
-
},
|
|
24
|
-
children
|
|
25
|
-
}) : children;
|
|
14
|
+
const { direction, locale, children } = props;
|
|
15
|
+
const needsContext = direction || locale;
|
|
16
|
+
return needsContext ? /* @__PURE__ */ jsx(LocaleContext.Provider, {
|
|
17
|
+
value: {
|
|
18
|
+
direction: locale ? getLocaleDirection(locale) : direction,
|
|
19
|
+
locale
|
|
20
|
+
},
|
|
21
|
+
children
|
|
22
|
+
}) : children;
|
|
26
23
|
}
|
|
27
24
|
function useLocaleContext() {
|
|
28
|
-
|
|
25
|
+
return React.useContext(LocaleContext);
|
|
29
26
|
}
|
|
27
|
+
|
|
30
28
|
export { LocaleProvider, getLocaleDirection, useLocaleContext };
|
|
31
29
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["esm/modules/useLocale/index.js"],"sourcesContent":["import React from \"react\";\nimport { isLocaleRTL } from \"./isLocaleRTL\";\nimport { jsx } from \"react/jsx-runtime\";\nconst defaultLocale = {\n direction: \"ltr\",\n locale: \"en-US\"\n};\nconst LocaleContext = React.createContext(defaultLocale);\nfunction getLocaleDirection(locale) {\n return isLocaleRTL(locale) ? \"rtl\" : \"ltr\";\n}\nfunction LocaleProvider(props) {\n const { direction, locale, children } = props;\n const needsContext = direction || locale;\n return needsContext ? /* @__PURE__ */ jsx(\n LocaleContext.Provider,\n {\n value: {\n direction: locale ? getLocaleDirection(locale) : direction,\n locale\n },\n children\n }\n ) : children;\n}\nfunction useLocaleContext() {\n return React.useContext(LocaleContext);\n}\nexport {\n LocaleProvider,\n getLocaleDirection,\n useLocaleContext\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;;AAGA,MAAM,gBAAgB;CACpB,WAAW;CACX,QAAQ;AACV;AACA,MAAM,gBAAgB,MAAM,cAAc,aAAa;AACvD,SAAS,mBAAmB,QAAQ;CAClC,OAAO,YAAY,MAAM,IAAI,QAAQ;AACvC;AACA,SAAS,eAAe,OAAO;CAC7B,MAAM,EAAE,WAAW,QAAQ,aAAa;CACxC,MAAM,eAAe,aAAa;CAClC,OAAO,eAA+B,oBACpC,cAAc,UACd;EACE,OAAO;GACL,WAAW,SAAS,mBAAmB,MAAM,IAAI;GACjD;EACF;EACA;CACF,CACF,IAAI;AACN;AACA,SAAS,mBAAmB;CAC1B,OAAO,MAAM,WAAW,aAAa;AACvC"}
|
|
@@ -1,63 +1,57 @@
|
|
|
1
|
-
const rtlScripts = /* @__PURE__ */new Set([
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
"ckb",
|
|
13
|
-
// Sorani
|
|
14
|
-
"dv",
|
|
15
|
-
// Dhivehi
|
|
16
|
-
"fa", "far",
|
|
17
|
-
// Persian
|
|
18
|
-
"glk",
|
|
19
|
-
// Gilaki
|
|
20
|
-
"he", "iw",
|
|
21
|
-
// Hebrew
|
|
22
|
-
"khw",
|
|
23
|
-
// Khowar
|
|
24
|
-
"ks",
|
|
25
|
-
// Kashmiri
|
|
26
|
-
"ku",
|
|
27
|
-
// Kurdish
|
|
28
|
-
"mzn",
|
|
29
|
-
// Mazanderani
|
|
30
|
-
"nqo",
|
|
31
|
-
// N'Ko
|
|
32
|
-
"pnb",
|
|
33
|
-
// Western Punjabi
|
|
34
|
-
"ps",
|
|
35
|
-
// Pashto
|
|
36
|
-
"sd",
|
|
37
|
-
// Sindhi
|
|
38
|
-
"ug",
|
|
39
|
-
// Uyghur
|
|
40
|
-
"ur",
|
|
41
|
-
// Urdu
|
|
42
|
-
"yi"
|
|
43
|
-
// Yiddish
|
|
1
|
+
const rtlScripts = /* @__PURE__ */ new Set([
|
|
2
|
+
"Arab",
|
|
3
|
+
"Syrc",
|
|
4
|
+
"Samr",
|
|
5
|
+
"Mand",
|
|
6
|
+
"Thaa",
|
|
7
|
+
"Mend",
|
|
8
|
+
"Nkoo",
|
|
9
|
+
"Adlm",
|
|
10
|
+
"Rohg",
|
|
11
|
+
"Hebr"
|
|
44
12
|
]);
|
|
45
|
-
const
|
|
13
|
+
const rtlLangs = /* @__PURE__ */ new Set([
|
|
14
|
+
"ae",
|
|
15
|
+
"ar",
|
|
16
|
+
"arc",
|
|
17
|
+
"bcc",
|
|
18
|
+
"bqi",
|
|
19
|
+
"ckb",
|
|
20
|
+
"dv",
|
|
21
|
+
"fa",
|
|
22
|
+
"far",
|
|
23
|
+
"glk",
|
|
24
|
+
"he",
|
|
25
|
+
"iw",
|
|
26
|
+
"khw",
|
|
27
|
+
"ks",
|
|
28
|
+
"ku",
|
|
29
|
+
"mzn",
|
|
30
|
+
"nqo",
|
|
31
|
+
"pnb",
|
|
32
|
+
"ps",
|
|
33
|
+
"sd",
|
|
34
|
+
"ug",
|
|
35
|
+
"ur",
|
|
36
|
+
"yi"
|
|
37
|
+
]);
|
|
38
|
+
const cache = /* @__PURE__ */ new Map();
|
|
46
39
|
function isLocaleRTL(locale) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
40
|
+
const cachedRTL = cache.get(locale);
|
|
41
|
+
if (cachedRTL) {
|
|
42
|
+
return cachedRTL;
|
|
43
|
+
}
|
|
44
|
+
let isRTL = false;
|
|
45
|
+
if (Intl.Locale) {
|
|
46
|
+
const script = new Intl.Locale(locale).maximize().script;
|
|
47
|
+
isRTL = rtlScripts.has(script);
|
|
48
|
+
} else {
|
|
49
|
+
const lang = locale.split("-")[0];
|
|
50
|
+
isRTL = rtlLangs.has(lang);
|
|
51
|
+
}
|
|
52
|
+
cache.set(locale, isRTL);
|
|
53
|
+
return isRTL;
|
|
61
54
|
}
|
|
55
|
+
|
|
62
56
|
export { isLocaleRTL };
|
|
63
57
|
//# sourceMappingURL=isLocaleRTL.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"file":"isLocaleRTL.js","names":[],"sources":["esm/modules/useLocale/isLocaleRTL.js"],"sourcesContent":["const rtlScripts = /* @__PURE__ */ new Set([\n \"Arab\",\n \"Syrc\",\n \"Samr\",\n \"Mand\",\n \"Thaa\",\n \"Mend\",\n \"Nkoo\",\n \"Adlm\",\n \"Rohg\",\n \"Hebr\"\n]);\nconst rtlLangs = /* @__PURE__ */ new Set([\n \"ae\",\n // Avestan\n \"ar\",\n // Arabic\n \"arc\",\n // Aramaic\n \"bcc\",\n // Southern Balochi\n \"bqi\",\n // Bakthiari\n \"ckb\",\n // Sorani\n \"dv\",\n // Dhivehi\n \"fa\",\n \"far\",\n // Persian\n \"glk\",\n // Gilaki\n \"he\",\n \"iw\",\n // Hebrew\n \"khw\",\n // Khowar\n \"ks\",\n // Kashmiri\n \"ku\",\n // Kurdish\n \"mzn\",\n // Mazanderani\n \"nqo\",\n // N'Ko\n \"pnb\",\n // Western Punjabi\n \"ps\",\n // Pashto\n \"sd\",\n // Sindhi\n \"ug\",\n // Uyghur\n \"ur\",\n // Urdu\n \"yi\"\n // Yiddish\n]);\nconst cache = /* @__PURE__ */ new Map();\nfunction isLocaleRTL(locale) {\n const cachedRTL = cache.get(locale);\n if (cachedRTL) {\n return cachedRTL;\n }\n let isRTL = false;\n if (Intl.Locale) {\n const script = new Intl.Locale(locale).maximize().script;\n isRTL = rtlScripts.has(script);\n } else {\n const lang = locale.split(\"-\")[0];\n isRTL = rtlLangs.has(lang);\n }\n cache.set(locale, isRTL);\n return isRTL;\n}\nexport {\n isLocaleRTL\n};\n//# sourceMappingURL=isLocaleRTL.js.map\n"],"mappings":";AAAA,MAAM,6BAA6B,IAAI,IAAI;CACzC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;AACD,MAAM,2BAA2B,IAAI,IAAI;CACvC;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CACA;CAEA;CAEA;CACA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;AAEF,CAAC;AACD,MAAM,wBAAwB,IAAI,IAAI;AACtC,SAAS,YAAY,QAAQ;CAC3B,MAAM,YAAY,MAAM,IAAI,MAAM;CAClC,IAAI,WAAW;EACb,OAAO;CACT;CACA,IAAI,QAAQ;CACZ,IAAI,KAAK,QAAQ;EACf,MAAM,SAAS,IAAI,KAAK,OAAO,MAAM,EAAE,SAAS,EAAE;EAClD,QAAQ,WAAW,IAAI,MAAM;CAC/B,OAAO;EACL,MAAM,OAAO,OAAO,MAAM,GAAG,EAAE;EAC/B,QAAQ,SAAS,IAAI,IAAI;CAC3B;CACA,MAAM,IAAI,QAAQ,KAAK;CACvB,OAAO;AACT"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { mergeRefs } from "../mergeRefs/index.mjs";
|
|
3
|
+
|
|
3
4
|
function useMergeRefs(...args) {
|
|
4
|
-
|
|
5
|
-
// eslint-disable-next-line
|
|
6
|
-
[...args]);
|
|
5
|
+
return React.useMemo(() => mergeRefs(...args), [...args]);
|
|
7
6
|
}
|
|
7
|
+
|
|
8
8
|
export { useMergeRefs };
|
|
9
9
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["esm/modules/useMergeRefs/index.js"],"sourcesContent":["import * as React from \"react\";\nimport { mergeRefs } from \"../mergeRefs/index\";\nfunction useMergeRefs(...args) {\n return React.useMemo(\n () => mergeRefs(...args),\n // eslint-disable-next-line\n [...args]\n );\n}\nexport {\n useMergeRefs\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;AAEA,SAAS,aAAa,GAAG,MAAM;CAC7B,OAAO,MAAM,cACL,UAAU,GAAG,IAAI,GAEvB,CAAC,GAAG,IAAI,CACV;AACF"}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { createMeasure, createMeasureInWindow, createMeasureLayout } from "@tamagui/use-element-layout";
|
|
2
2
|
import { useStable } from "../useStable/index.mjs";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
});
|
|
14
|
-
return ref;
|
|
3
|
+
|
|
4
|
+
function usePlatformMethods({ pointerEvents, style }) {
|
|
5
|
+
const ref = useStable(() => (hostNode) => {
|
|
6
|
+
if (hostNode != null) {
|
|
7
|
+
hostNode.measure = createMeasure(hostNode);
|
|
8
|
+
hostNode.measureLayout = createMeasureLayout(hostNode);
|
|
9
|
+
hostNode.measureInWindow = createMeasureInWindow(hostNode);
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
return ref;
|
|
15
13
|
}
|
|
14
|
+
|
|
16
15
|
export { usePlatformMethods };
|
|
17
16
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["esm/modules/usePlatformMethods/index.js"],"sourcesContent":["import {\n createMeasure,\n createMeasureInWindow,\n createMeasureLayout\n} from \"@tamagui/use-element-layout\";\nimport { useStable } from \"../useStable/index\";\nfunction usePlatformMethods({\n pointerEvents,\n style\n}) {\n const ref = useStable(() => (hostNode) => {\n if (hostNode != null) {\n hostNode.measure = createMeasure(hostNode);\n hostNode.measureLayout = createMeasureLayout(hostNode);\n hostNode.measureInWindow = createMeasureInWindow(hostNode);\n }\n });\n return ref;\n}\nexport {\n usePlatformMethods\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;AAMA,SAAS,mBAAmB,EAC1B,eACA,SACC;CACD,MAAM,MAAM,iBAAiB,aAAa;EACxC,IAAI,YAAY,MAAM;GACpB,SAAS,UAAU,cAAc,QAAQ;GACzC,SAAS,gBAAgB,oBAAoB,QAAQ;GACrD,SAAS,kBAAkB,sBAAsB,QAAQ;EAC3D;CACF,CAAC;CACD,OAAO;AACT"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
const UNINITIALIZED = typeof Symbol === "function" && typeof /* @__PURE__ */ Symbol() === "symbol" ? /* @__PURE__ */ Symbol() : Object.freeze({});
|
|
3
4
|
function useStable(getInitialValue) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
const ref = React.useRef(UNINITIALIZED);
|
|
6
|
+
if (ref.current === UNINITIALIZED) {
|
|
7
|
+
ref.current = getInitialValue();
|
|
8
|
+
}
|
|
9
|
+
return ref.current;
|
|
9
10
|
}
|
|
11
|
+
|
|
10
12
|
export { useStable };
|
|
11
13
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["esm/modules/useStable/index.js"],"sourcesContent":["import * as React from \"react\";\nconst UNINITIALIZED = typeof Symbol === \"function\" && typeof /* @__PURE__ */ Symbol() === \"symbol\" ? /* @__PURE__ */ Symbol() : Object.freeze({});\nfunction useStable(getInitialValue) {\n const ref = React.useRef(UNINITIALIZED);\n if (ref.current === UNINITIALIZED) {\n ref.current = getInitialValue();\n }\n return ref.current;\n}\nexport {\n useStable\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;AACA,MAAM,gBAAgB,OAAO,WAAW,cAAc,OAAuB,uBAAO,MAAM,WAA2B,uBAAO,IAAI,OAAO,OAAO,CAAC,CAAC;AAChJ,SAAS,UAAU,iBAAiB;CAClC,MAAM,MAAM,MAAM,OAAO,aAAa;CACtC,IAAI,IAAI,YAAY,eAAe;EACjC,IAAI,UAAU,gBAAgB;CAChC;CACA,OAAO,IAAI;AACb"}
|
package/dist/esm/styleTypes.mjs
CHANGED
package/dist/esm/types.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/react-native-web-internals",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-beta.637.1",
|
|
4
4
|
"description": "React Native for Web",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -36,15 +36,15 @@
|
|
|
36
36
|
"clean:build": "tamagui-build clean:build"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@tamagui/normalize-css-color": "
|
|
40
|
-
"@tamagui/react-native-use-pressable": "
|
|
41
|
-
"@tamagui/react-native-use-responder-events": "
|
|
42
|
-
"@tamagui/simple-hash": "
|
|
43
|
-
"@tamagui/use-element-layout": "
|
|
44
|
-
"@tamagui/web": "
|
|
39
|
+
"@tamagui/normalize-css-color": "3.0.0-beta.637.1",
|
|
40
|
+
"@tamagui/react-native-use-pressable": "3.0.0-beta.637.1",
|
|
41
|
+
"@tamagui/react-native-use-responder-events": "3.0.0-beta.637.1",
|
|
42
|
+
"@tamagui/simple-hash": "3.0.0-beta.637.1",
|
|
43
|
+
"@tamagui/use-element-layout": "3.0.0-beta.637.1",
|
|
44
|
+
"@tamagui/web": "3.0.0-beta.637.1"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@tamagui/build": "
|
|
47
|
+
"@tamagui/build": "3.0.0-beta.637.1",
|
|
48
48
|
"react": ">=19",
|
|
49
49
|
"react-dom": "*"
|
|
50
50
|
},
|
|
@@ -20,6 +20,7 @@ const reactNativeOnlyProps: Record<string, boolean> = {
|
|
|
20
20
|
contentContainerStyle: true,
|
|
21
21
|
contentOffset: true,
|
|
22
22
|
decelerationRate: true,
|
|
23
|
+
focusable: true,
|
|
23
24
|
maintainVisibleContentPosition: true,
|
|
24
25
|
onLayout: true,
|
|
25
26
|
onMomentumScrollBegin: true,
|
|
@@ -151,7 +152,6 @@ export const createDOMProps = (elementType, props, options?) => {
|
|
|
151
152
|
accessibilityValueNow,
|
|
152
153
|
accessibilityValueText,
|
|
153
154
|
dataSet,
|
|
154
|
-
focusable,
|
|
155
155
|
nativeID,
|
|
156
156
|
pointerEvents,
|
|
157
157
|
style,
|
|
@@ -358,10 +358,6 @@ export const createDOMProps = (elementType, props, options?) => {
|
|
|
358
358
|
}
|
|
359
359
|
|
|
360
360
|
// FOCUS
|
|
361
|
-
// "focusable" indicates that an element may be a keyboard tab-stop.
|
|
362
|
-
if (focusable === false) {
|
|
363
|
-
domProps.tabIndex = '-1'
|
|
364
|
-
}
|
|
365
361
|
if (
|
|
366
362
|
// These native elements are keyboard focusable by default
|
|
367
363
|
elementType === 'a' ||
|
|
@@ -370,7 +366,7 @@ export const createDOMProps = (elementType, props, options?) => {
|
|
|
370
366
|
elementType === 'select' ||
|
|
371
367
|
elementType === 'textarea'
|
|
372
368
|
) {
|
|
373
|
-
if (
|
|
369
|
+
if (accessibilityDisabled === true) {
|
|
374
370
|
domProps.tabIndex = '-1'
|
|
375
371
|
}
|
|
376
372
|
} else if (
|
|
@@ -382,12 +378,7 @@ export const createDOMProps = (elementType, props, options?) => {
|
|
|
382
378
|
role === 'textbox' ||
|
|
383
379
|
role === 'switch'
|
|
384
380
|
) {
|
|
385
|
-
if (
|
|
386
|
-
domProps.tabIndex = '0'
|
|
387
|
-
}
|
|
388
|
-
} else {
|
|
389
|
-
// Everything else must explicitly set the prop
|
|
390
|
-
if (focusable === true) {
|
|
381
|
+
if (domProps.tabIndex == null) {
|
|
391
382
|
domProps.tabIndex = '0'
|
|
392
383
|
}
|
|
393
384
|
}
|
|
@@ -12,7 +12,7 @@ import type * as React from 'react'
|
|
|
12
12
|
export function mergeRefs(
|
|
13
13
|
...args: ReadonlyArray<React.Ref<any>>
|
|
14
14
|
): (node: HTMLElement | null) => void {
|
|
15
|
-
return function
|
|
15
|
+
return function mergedRef(node: HTMLElement | null) {
|
|
16
16
|
args.forEach((ref: React.Ref<any>) => {
|
|
17
17
|
if (ref == null) {
|
|
18
18
|
return
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createReactDOMStyle.d.ts","sourceRoot":"","sources":["../../../src/StyleSheet/compiler/createReactDOMStyle.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAKH,KAAK,KAAK,GAAG;KACV,CAAC,IAAI,MAAM,GAAG,GAAG;CACnB,CAAA;AAqFD,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"createReactDOMStyle.d.ts","sourceRoot":"","sources":["../../../src/StyleSheet/compiler/createReactDOMStyle.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAKH,KAAK,KAAK,GAAG;KACV,CAAC,IAAI,MAAM,GAAG,GAAG;CACnB,CAAA;AAqFD,eAAO,MAAM,oBAAoB,UAAW,KAAK,KAAG,MAMnD,CAAA;AAED;;GAEG;AAEH,eAAO,MAAM,mBAAmB,UAAW,KAAK,aAAa,OAAO,KAAG,KAsGtE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalizeColor.d.ts","sourceRoot":"","sources":["../../../src/StyleSheet/compiler/normalizeColor.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"normalizeColor.d.ts","sourceRoot":"","sources":["../../../src/StyleSheet/compiler/normalizeColor.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,eAAO,MAAM,cAAc,WAAY,MAAM,GAAG,MAAM,uBAAgB,IAAI,GAAG,MAsB5E,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveShadowValue.d.ts","sourceRoot":"","sources":["../../../src/StyleSheet/compiler/resolveShadowValue.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAOH,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"resolveShadowValue.d.ts","sourceRoot":"","sources":["../../../src/StyleSheet/compiler/resolveShadowValue.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAOH,eAAO,MAAM,kBAAkB,UAAW,MAAM,KAAG,IAAI,GAAG,MAUzD,CAAA"}
|
|
@@ -6,6 +6,14 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @flow
|
|
8
8
|
*/
|
|
9
|
+
declare const absoluteFillObject: {
|
|
10
|
+
position: string;
|
|
11
|
+
left: number;
|
|
12
|
+
right: number;
|
|
13
|
+
top: number;
|
|
14
|
+
bottom: number;
|
|
15
|
+
};
|
|
16
|
+
declare const absoluteFill: any;
|
|
9
17
|
/**
|
|
10
18
|
* create
|
|
11
19
|
*/
|
|
@@ -38,22 +46,13 @@ type Options = {
|
|
|
38
46
|
};
|
|
39
47
|
export declare function StyleSheet(styles: any, options?: Options): StyleProps;
|
|
40
48
|
export declare namespace StyleSheet {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
};
|
|
49
|
-
var create: (styles: any) => any;
|
|
50
|
-
var compose: (style1: any, style2: any) => any;
|
|
51
|
-
var flatten: typeof import(".").flatten;
|
|
52
|
-
var getSheet: () => {
|
|
53
|
-
id: string;
|
|
54
|
-
textContent: string;
|
|
55
|
-
};
|
|
56
|
-
var hairlineWidth: number;
|
|
49
|
+
export { absoluteFill };
|
|
50
|
+
export { absoluteFillObject };
|
|
51
|
+
export { create };
|
|
52
|
+
export { compose };
|
|
53
|
+
export { flatten };
|
|
54
|
+
export { getSheet };
|
|
55
|
+
export var hairlineWidth: number;
|
|
57
56
|
}
|
|
58
57
|
export type IStyleSheet = {
|
|
59
58
|
(styles: any, options?: Options): StyleProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/StyleSheet/index.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/StyleSheet/index.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAYH,QAAA,MAAM,kBAAkB;IACtB,QAAQ;IACR,IAAI;IACJ,KAAK;IACL,GAAG;IACH,MAAM;CACP,CAAA;AAED,QAAA,MAAM,YAAY,EAAyB,GAAG,CAAA;AAE9C;;GAEG;AACH,iBAAS,MAAM,CAAC,MAAM,KAAA,OAErB;AAED;;GAEG;AACH,iBAAS,OAAO,CAAC,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,GAAG,GAAG,CAE9C;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,GAAG,MAAM,EAAE,GAAG,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,CAY9D;AAED;;GAEG;AACH,iBAAS,QAAQ,IAAI;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAKvD;AAED;;GAEG;AACH,KAAK,UAAU,GAAG,CAAC,MAAM,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,GAAG,IAAI,CAAC,CAAA;AACzD,KAAK,OAAO,GAAG;IAAE,gBAAgB,EAAE,KAAK,GAAG,KAAK,CAAA;CAAE,CAAA;AAElD,wBAAgB,UAAU,CAAC,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,UAAU,CAAG;yBAAzD,UAAU;;;;;;;;;AAY1B,MAAM,MAAM,WAAW,GAAG;IACxB,CAAC,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,UAAU,CAAA;IAC5C,YAAY,EAAE,MAAM,CAAA;IACpB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,MAAM,EAAE,OAAO,MAAM,CAAA;IACrB,OAAO,EAAE,OAAO,OAAO,CAAA;IACvB,OAAO,EAAE,OAAO,OAAO,CAAA;IACvB,QAAQ,EAAE,OAAO,QAAQ,CAAA;IACzB,aAAa,EAAE,MAAM,CAAA;CACtB,CAAA"}
|
|
@@ -12,5 +12,5 @@ export declare const createTextShadowValue: (style: object) => void | string;
|
|
|
12
12
|
* Preprocess styles
|
|
13
13
|
*/
|
|
14
14
|
export declare const preprocess: <T extends { [K in string]: any; }>(originalStyle: T) => T;
|
|
15
|
-
export declare const processStyle:
|
|
15
|
+
export declare const processStyle: typeof preprocess;
|
|
16
16
|
//# sourceMappingURL=preprocess.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preprocess.d.ts","sourceRoot":"","sources":["../../src/StyleSheet/preprocess.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAaH,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"preprocess.d.ts","sourceRoot":"","sources":["../../src/StyleSheet/preprocess.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAaH,eAAO,MAAM,oBAAoB,UAAW,MAAM,KAAG,IAAI,GAAG,MAU3D,CAAA;AAED,eAAO,MAAM,qBAAqB,UAAW,MAAM,KAAG,IAAI,GAAG,MAkB5D,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,GACrB,CAAC,SAAS,GACP,CAAC,IAAI,MAAM,GAAG,GAAG,GACnB,iBAEc,CAAC,KACf,CAsDF,CAAA;AAED,eAAO,MAAM,YAAY,mBAAa,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colorProps.d.ts","sourceRoot":"","sources":["../src/colorProps.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"colorProps.d.ts","sourceRoot":"","sources":["../src/colorProps.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;IACrB,eAAe;IACf,WAAW;IACX,cAAc;IACd,gBAAgB;IAChB,iBAAiB;IACjB,eAAe;IACf,KAAK;IACL,WAAW;IACX,mBAAmB;IACnB,eAAe;CAChB,CAAA"}
|
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @flow
|
|
8
8
|
*/
|
|
9
|
+
import { isDisabled } from './isDisabled';
|
|
10
|
+
import { propsToAccessibilityComponent } from './propsToAccessibilityComponent';
|
|
11
|
+
import { propsToAriaRole } from './propsToAriaRole';
|
|
9
12
|
export declare const AccessibilityUtil: {
|
|
10
|
-
isDisabled:
|
|
11
|
-
propsToAccessibilityComponent:
|
|
12
|
-
propsToAriaRole:
|
|
13
|
-
accessibilityRole?: string;
|
|
14
|
-
}) => string | void;
|
|
13
|
+
isDisabled: typeof isDisabled;
|
|
14
|
+
propsToAccessibilityComponent: typeof propsToAccessibilityComponent;
|
|
15
|
+
propsToAriaRole: typeof propsToAriaRole;
|
|
15
16
|
};
|
|
16
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/AccessibilityUtil/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/AccessibilityUtil/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAA;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAEnD,eAAO,MAAM,iBAAiB;;;;CAI7B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isDisabled.d.ts","sourceRoot":"","sources":["../../../src/modules/AccessibilityUtil/isDisabled.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"isDisabled.d.ts","sourceRoot":"","sources":["../../../src/modules/AccessibilityUtil/isDisabled.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,eAAO,MAAM,UAAU,UAAW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAG,OAGD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"propsToAccessibilityComponent.d.ts","sourceRoot":"","sources":["../../../src/modules/AccessibilityUtil/propsToAccessibilityComponent.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AA0BH,eAAO,MAAM,6BAA6B,
|
|
1
|
+
{"version":3,"file":"propsToAccessibilityComponent.d.ts","sourceRoot":"","sources":["../../../src/modules/AccessibilityUtil/propsToAccessibilityComponent.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AA0BH,eAAO,MAAM,6BAA6B,WACjC,MAAM,KACZ,IAAI,GAAG,MAiBT,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"propsToAriaRole.d.ts","sourceRoot":"","sources":["../../../src/modules/AccessibilityUtil/propsToAriaRole.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAiBH,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"propsToAriaRole.d.ts","sourceRoot":"","sources":["../../../src/modules/AccessibilityUtil/propsToAriaRole.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAiBH,eAAO,MAAM,eAAe,2BAEzB;IACD,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAC3B,KAAG,MAAM,GAAG,IAQZ,CAAA"}
|
|
@@ -21,7 +21,7 @@ export declare const ImageLoader: {
|
|
|
21
21
|
load(uri: string, onLoad: Function, onError: Function): number;
|
|
22
22
|
prefetch(uri: string): Promise<void>;
|
|
23
23
|
queryCache(uris: Array<string>): Promise<{
|
|
24
|
-
[uri: string]:
|
|
24
|
+
[uri: string]: 'disk/memory';
|
|
25
25
|
}>;
|
|
26
26
|
};
|
|
27
27
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/ImageLoader/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,qBAAa,aAAa;IACxB,MAAM,CAAC,eAAe,SAAM;IAC5B,MAAM,CAAC,QAAQ,KAAK;IAEpB,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/ImageLoader/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,qBAAa,aAAa;IACxB,MAAM,CAAC,eAAe,SAAM;IAC5B,MAAM,CAAC,QAAQ,KAAK;IAEpB,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAI/B;IAED,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,QAYrB;IAED,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,QAOxB;IAED,MAAM,CAAC,gBAAgB,SAwBtB;CACF;AAKD,eAAO,MAAM,WAAW;IACtB,KAAK,YAAY,MAAM;IASvB,OAAO,MACA,MAAM,WACF,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,WACvC,MAAM,IAAI;IA6BrB,GAAG,MAAM,MAAM,GAAG,OAAO;IAGzB,IAAI,MAAM,MAAM,UAAU,QAAQ,WAAW,QAAQ,GAAG,MAAM;IAqB9D,QAAQ,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAepC,UAAU,OAAO,KAAK,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAAA;KAAE,CAAC;CAS3E,CAAA"}
|