@tamagui/core 1.14.1 → 1.14.2
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/helpers/getBoundingClientRect.js +33 -1
- package/dist/cjs/helpers/getBoundingClientRect.js.map +2 -2
- package/dist/cjs/helpers/getRect.js +35 -1
- package/dist/cjs/helpers/getRect.js.map +2 -2
- package/dist/cjs/hooks/useElementLayout.js +83 -1
- package/dist/cjs/hooks/useElementLayout.js.map +2 -2
- package/dist/cjs/hooks/usePlatformMethods.js +47 -1
- package/dist/cjs/hooks/usePlatformMethods.js.map +2 -2
- package/dist/cjs/index.js +163 -1
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/inject-styles.js +39 -1
- package/dist/cjs/inject-styles.js.map +2 -2
- package/dist/cjs/reactNativeTypes.js +16 -1
- package/dist/cjs/reactNativeTypes.js.map +2 -2
- package/dist/cjs/vendor/Pressability.js +31 -1
- package/dist/cjs/vendor/Pressability.js.map +2 -2
- package/dist/cjs/vendor/Pressability.native.js +31 -1
- package/dist/cjs/vendor/Pressability.native.js.map +2 -2
- package/dist/esm/helpers/getBoundingClientRect.js +9 -1
- package/dist/esm/helpers/getBoundingClientRect.js.map +2 -2
- package/dist/esm/helpers/getBoundingClientRect.mjs +9 -1
- package/dist/esm/helpers/getBoundingClientRect.mjs.map +2 -2
- package/dist/esm/helpers/getRect.js +11 -1
- package/dist/esm/helpers/getRect.js.map +2 -2
- package/dist/esm/helpers/getRect.mjs +11 -1
- package/dist/esm/helpers/getRect.mjs.map +2 -2
- package/dist/esm/hooks/useElementLayout.js +58 -1
- package/dist/esm/hooks/useElementLayout.js.map +2 -2
- package/dist/esm/hooks/useElementLayout.mjs +58 -1
- package/dist/esm/hooks/useElementLayout.mjs.map +2 -2
- package/dist/esm/hooks/usePlatformMethods.js +23 -1
- package/dist/esm/hooks/usePlatformMethods.js.map +2 -2
- package/dist/esm/hooks/usePlatformMethods.mjs +23 -1
- package/dist/esm/hooks/usePlatformMethods.mjs.map +2 -2
- package/dist/esm/index.js +144 -1
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/index.mjs +144 -1
- package/dist/esm/index.mjs.map +2 -2
- package/dist/esm/inject-styles.js +15 -1
- package/dist/esm/inject-styles.js.map +2 -2
- package/dist/esm/inject-styles.mjs +15 -1
- package/dist/esm/inject-styles.mjs.map +2 -2
- package/dist/esm/vendor/Pressability.js +6 -1
- package/dist/esm/vendor/Pressability.js.map +2 -2
- package/dist/esm/vendor/Pressability.mjs +6 -1
- package/dist/esm/vendor/Pressability.mjs.map +2 -2
- package/dist/esm/vendor/Pressability.native.js +6 -1
- package/dist/esm/vendor/Pressability.native.js.map +2 -2
- package/dist/esm/vendor/Pressability.native.mjs +6 -1
- package/dist/esm/vendor/Pressability.native.mjs.map +2 -2
- package/package.json +6 -6
package/dist/esm/index.mjs
CHANGED
|
@@ -1,2 +1,145 @@
|
|
|
1
|
-
import{useResponderEvents
|
|
1
|
+
import { useResponderEvents } from "@tamagui/react-native-use-responder-events";
|
|
2
|
+
import {
|
|
3
|
+
Stack as WebStack,
|
|
4
|
+
Text as WebText,
|
|
5
|
+
composeEventHandlers,
|
|
6
|
+
isRSC,
|
|
7
|
+
mergeEvent,
|
|
8
|
+
setupHooks
|
|
9
|
+
} from "@tamagui/web";
|
|
10
|
+
import { useElementLayout } from "./hooks/useElementLayout";
|
|
11
|
+
import { usePlatformMethods } from "./hooks/usePlatformMethods";
|
|
12
|
+
import { usePressability } from "./vendor/Pressability";
|
|
13
|
+
export * from "@tamagui/web";
|
|
14
|
+
const Stack = WebStack;
|
|
15
|
+
const Text = WebText;
|
|
16
|
+
setupHooks({
|
|
17
|
+
getBaseViews() {
|
|
18
|
+
const native = require("react-native");
|
|
19
|
+
return {
|
|
20
|
+
View: native.View || native.default.View,
|
|
21
|
+
Text: native.Text || native.default.Text
|
|
22
|
+
};
|
|
23
|
+
},
|
|
24
|
+
usePropsTransform(elementType, propsIn, hostRef) {
|
|
25
|
+
const {
|
|
26
|
+
// event props
|
|
27
|
+
onMoveShouldSetResponder,
|
|
28
|
+
onMoveShouldSetResponderCapture,
|
|
29
|
+
onResponderEnd,
|
|
30
|
+
onResponderGrant,
|
|
31
|
+
onResponderMove,
|
|
32
|
+
onResponderReject,
|
|
33
|
+
onResponderRelease,
|
|
34
|
+
onResponderStart,
|
|
35
|
+
onResponderTerminate,
|
|
36
|
+
onResponderTerminationRequest,
|
|
37
|
+
onScrollShouldSetResponder,
|
|
38
|
+
onScrollShouldSetResponderCapture,
|
|
39
|
+
onSelectionChangeShouldSetResponder,
|
|
40
|
+
onSelectionChangeShouldSetResponderCapture,
|
|
41
|
+
onStartShouldSetResponder,
|
|
42
|
+
onStartShouldSetResponderCapture,
|
|
43
|
+
// android
|
|
44
|
+
collapsable,
|
|
45
|
+
focusable,
|
|
46
|
+
// deprecated,
|
|
47
|
+
accessible,
|
|
48
|
+
accessibilityDisabled,
|
|
49
|
+
onLayout,
|
|
50
|
+
hrefAttrs,
|
|
51
|
+
...viewProps
|
|
52
|
+
} = propsIn;
|
|
53
|
+
if (!isRSC) {
|
|
54
|
+
usePlatformMethods(hostRef);
|
|
55
|
+
useElementLayout(hostRef, onLayout);
|
|
56
|
+
useResponderEvents(hostRef, {
|
|
57
|
+
onMoveShouldSetResponder,
|
|
58
|
+
onMoveShouldSetResponderCapture,
|
|
59
|
+
onResponderEnd,
|
|
60
|
+
onResponderGrant,
|
|
61
|
+
onResponderMove,
|
|
62
|
+
onResponderReject,
|
|
63
|
+
onResponderRelease,
|
|
64
|
+
onResponderStart,
|
|
65
|
+
onResponderTerminate,
|
|
66
|
+
onResponderTerminationRequest,
|
|
67
|
+
onScrollShouldSetResponder,
|
|
68
|
+
onScrollShouldSetResponderCapture,
|
|
69
|
+
onSelectionChangeShouldSetResponder,
|
|
70
|
+
onSelectionChangeShouldSetResponderCapture,
|
|
71
|
+
onStartShouldSetResponder,
|
|
72
|
+
onStartShouldSetResponderCapture
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
if (viewProps.href !== void 0 && hrefAttrs !== void 0) {
|
|
76
|
+
const { download, rel, target } = hrefAttrs;
|
|
77
|
+
if (download != null) {
|
|
78
|
+
viewProps.download = download;
|
|
79
|
+
}
|
|
80
|
+
if (rel != null) {
|
|
81
|
+
viewProps.rel = rel;
|
|
82
|
+
}
|
|
83
|
+
if (typeof target === "string") {
|
|
84
|
+
viewProps.target = target.charAt(0) !== "_" ? `_${target}` : target;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
if (!viewProps.tabIndex) {
|
|
88
|
+
const _focusable = focusable !== void 0 ? focusable : accessible;
|
|
89
|
+
const role = viewProps.role;
|
|
90
|
+
if (_focusable === false) {
|
|
91
|
+
viewProps.tabIndex = "-1";
|
|
92
|
+
}
|
|
93
|
+
if (
|
|
94
|
+
// These native elements are focusable by default
|
|
95
|
+
elementType === "a" || elementType === "button" || elementType === "input" || elementType === "select" || elementType === "textarea"
|
|
96
|
+
) {
|
|
97
|
+
if (_focusable === false || accessibilityDisabled === true) {
|
|
98
|
+
viewProps.tabIndex = "-1";
|
|
99
|
+
}
|
|
100
|
+
} else if (
|
|
101
|
+
// These roles are made focusable by default
|
|
102
|
+
role === "button" || role === "checkbox" || role === "link" || role === "radio" || role === "textbox" || role === "switch"
|
|
103
|
+
) {
|
|
104
|
+
if (_focusable !== false) {
|
|
105
|
+
viewProps.tabIndex = "0";
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
if (_focusable === true) {
|
|
109
|
+
viewProps.tabIndex = "0";
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return viewProps;
|
|
113
|
+
},
|
|
114
|
+
useEvents(viewProps, events, { pseudos }, setStateShallow) {
|
|
115
|
+
if (process.env.TAMAGUI_TARGET === "native") {
|
|
116
|
+
const attachFocus = !!(pseudos == null ? void 0 : pseudos.focusStyle);
|
|
117
|
+
if (attachFocus) {
|
|
118
|
+
viewProps.onFocus = mergeEvent(viewProps.onFocus, () => {
|
|
119
|
+
setStateShallow({ focus: true });
|
|
120
|
+
});
|
|
121
|
+
viewProps.onBlur = mergeEvent(viewProps.onBlur, () => {
|
|
122
|
+
setStateShallow({ focus: false });
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
const pressability = usePressability(
|
|
126
|
+
events ? { ...events, hitSlop: viewProps.hitSlop } : {}
|
|
127
|
+
);
|
|
128
|
+
if (events == null ? void 0 : events.onPress) {
|
|
129
|
+
for (const key in pressability) {
|
|
130
|
+
const og = viewProps[key];
|
|
131
|
+
const val = pressability[key];
|
|
132
|
+
viewProps[key] = og && !dontComposePressabilityKeys[key] ? composeEventHandlers(og, val) : val;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
const dontComposePressabilityKeys = {
|
|
139
|
+
onClick: true
|
|
140
|
+
};
|
|
141
|
+
export {
|
|
142
|
+
Stack,
|
|
143
|
+
Text
|
|
144
|
+
};
|
|
2
145
|
//# sourceMappingURL=index.mjs.map
|
package/dist/esm/index.mjs.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
4
|
"sourcesContent": ["import { useResponderEvents } from '@tamagui/react-native-use-responder-events'\nimport {\n StackProps,\n StackPropsBase,\n TamaguiComponent,\n TextProps,\n TextPropsBase,\n Stack as WebStack,\n Text as WebText,\n composeEventHandlers,\n isRSC,\n mergeEvent,\n setupHooks,\n} from '@tamagui/web'\nimport { RefObject } from 'react'\nimport type { Text as RNText, View as RNView } from 'react-native'\n\nimport { useElementLayout } from './hooks/useElementLayout'\nimport { usePlatformMethods } from './hooks/usePlatformMethods'\nimport type { RNTextProps, RNViewProps } from './reactNativeTypes'\nimport { usePressability } from './vendor/Pressability'\n\n// re-exports all of @tamagui/web just adds hooks\nexport * from '@tamagui/web'\n\n// adds extra types to Stack/Text:\n\nexport const Stack = WebStack as TamaguiComponent<\n StackProps & RNViewProps,\n RNView,\n StackPropsBase & RNViewProps\n>\n\nexport const Text = WebText as TamaguiComponent<\n TextProps & RNTextProps,\n RNText,\n TextPropsBase & RNTextProps\n>\n\n// setup internal hooks:\n\nsetupHooks({\n getBaseViews() {\n const native = require('react-native')\n return {\n View: native.View || native.default.View,\n Text: native.Text || native.default.Text,\n }\n },\n\n usePropsTransform(elementType, propsIn, hostRef) {\n // otherwise replicate react-native-web functionality\n const {\n // event props\n onMoveShouldSetResponder,\n onMoveShouldSetResponderCapture,\n onResponderEnd,\n onResponderGrant,\n onResponderMove,\n onResponderReject,\n onResponderRelease,\n onResponderStart,\n onResponderTerminate,\n onResponderTerminationRequest,\n onScrollShouldSetResponder,\n onScrollShouldSetResponderCapture,\n onSelectionChangeShouldSetResponder,\n onSelectionChangeShouldSetResponderCapture,\n onStartShouldSetResponder,\n onStartShouldSetResponderCapture,\n\n // android\n collapsable,\n focusable,\n\n // deprecated,\n accessible,\n accessibilityDisabled,\n\n onLayout,\n hrefAttrs,\n\n ...viewProps\n } = propsIn\n\n if (!isRSC) {\n usePlatformMethods(hostRef as RefObject<Element>)\n useElementLayout(hostRef as RefObject<Element>, onLayout as any)\n useResponderEvents(hostRef, {\n onMoveShouldSetResponder,\n onMoveShouldSetResponderCapture,\n onResponderEnd,\n onResponderGrant,\n onResponderMove,\n onResponderReject,\n onResponderRelease,\n onResponderStart,\n onResponderTerminate,\n onResponderTerminationRequest,\n onScrollShouldSetResponder,\n onScrollShouldSetResponderCapture,\n onSelectionChangeShouldSetResponder,\n onSelectionChangeShouldSetResponderCapture,\n onStartShouldSetResponder,\n onStartShouldSetResponderCapture,\n } as any)\n }\n\n // TODO move into getSplitStyles inital `if (process.env.TAMAGUI_TARGET === 'web')` block\n\n if (viewProps.href !== undefined && hrefAttrs !== undefined) {\n const { download, rel, target } = hrefAttrs\n if (download != null) {\n viewProps.download = download\n }\n if (rel != null) {\n viewProps.rel = rel\n }\n if (typeof target === 'string') {\n viewProps.target = target.charAt(0) !== '_' ? `_${target}` : target\n }\n }\n\n // FOCUS\n // \"focusable\" indicates that an element may be a keyboard tab-stop.\n // ported from RNW: TODO move into getSplitStyles\n if (!viewProps.tabIndex) {\n const _focusable = focusable !== undefined ? focusable : accessible\n const role = viewProps.role\n if (_focusable === false) {\n viewProps.tabIndex = '-1'\n }\n if (\n // These native elements are focusable by default\n elementType === 'a' ||\n elementType === 'button' ||\n elementType === 'input' ||\n elementType === 'select' ||\n elementType === 'textarea'\n ) {\n if (_focusable === false || accessibilityDisabled === true) {\n viewProps.tabIndex = '-1'\n }\n } else if (\n // These roles are made focusable by default\n role === 'button' ||\n role === 'checkbox' ||\n role === 'link' ||\n role === 'radio' ||\n role === 'textbox' ||\n role === 'switch'\n ) {\n if (_focusable !== false) {\n viewProps.tabIndex = '0'\n }\n }\n // Everything else must explicitly set the prop\n if (_focusable === true) {\n viewProps.tabIndex = '0'\n }\n }\n\n return viewProps\n },\n\n useEvents(viewProps, events, { pseudos }, setStateShallow) {\n if (process.env.TAMAGUI_TARGET === 'native') {\n const attachFocus = !!pseudos?.focusStyle\n if (attachFocus) {\n viewProps.onFocus = mergeEvent(viewProps.onFocus, () => {\n setStateShallow({ focus: true })\n })\n viewProps.onBlur = mergeEvent(viewProps.onBlur, () => {\n setStateShallow({ focus: false })\n })\n }\n\n // use Pressability to get smooth unPress when you press + hold + move out\n // only ever create once, use .configure() to update later\n const pressability = usePressability(\n events ? { ...events, hitSlop: viewProps.hitSlop } : {}\n )\n if (events?.onPress) {\n for (const key in pressability) {\n const og = viewProps[key]\n const val = pressability[key]\n viewProps[key] =\n og && !dontComposePressabilityKeys[key] ? composeEventHandlers(og, val) : val\n }\n }\n }\n },\n})\n\nconst dontComposePressabilityKeys = {\n onClick: true,\n}\n"],
|
|
5
|
-
"mappings": "AAAA,
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": "AAAA,SAAS,0BAA0B;AACnC;AAAA,EAME,SAAS;A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Aa,GAAG;AAC5B,oBAAU,GAAG,IACX,MAAM,CAAC,4BAA4B,GAAG,IAAI,qBAAqB,IAAI,GAAG,IAAI;AAAA,QAC9E;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF,CAAC;AAED,MAAM,8BAA8B;AAAA,EAClC,SAAS;AACX;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -1,2 +1,16 @@
|
|
|
1
|
-
const
|
|
1
|
+
const stylesheets = {};
|
|
2
|
+
const injectStyles = ({ filePath, css }) => {
|
|
3
|
+
let stylesheet = stylesheets[filePath];
|
|
4
|
+
if (!stylesheet) {
|
|
5
|
+
const styleEl = document.createElement("style");
|
|
6
|
+
styleEl.setAttribute("data-file", filePath);
|
|
7
|
+
styleEl.setAttribute("type", "text/css");
|
|
8
|
+
stylesheet = stylesheets[filePath] = styleEl;
|
|
9
|
+
document.head.appendChild(styleEl);
|
|
10
|
+
}
|
|
11
|
+
stylesheet.innerHTML = css;
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
injectStyles
|
|
15
|
+
};
|
|
2
16
|
//# sourceMappingURL=inject-styles.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/inject-styles.ts"],
|
|
4
4
|
"sourcesContent": ["// for vite dev mode\n\nconst stylesheets: Record<string, HTMLElement> = {}\n\ninterface InjectStylesOptions {\n filePath: string\n css: string\n}\n\nexport const injectStyles = ({ filePath, css }: InjectStylesOptions) => {\n let stylesheet = stylesheets[filePath]\n if (!stylesheet) {\n const styleEl = document.createElement('style')\n styleEl.setAttribute('data-file', filePath)\n styleEl.setAttribute('type', 'text/css')\n stylesheet = stylesheets[filePath] = styleEl\n document.head.appendChild(styleEl)\n }\n stylesheet.innerHTML = css\n}\n"],
|
|
5
|
-
"mappings": "AAEA,
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": "AAEA,MAAM,cAA2C,CAAC;AAO3C,MAAM,eAAe,CAAC,EAAE,UAAU,IAAI,MAA2B;AACtE,MAAI,aAAa,YAAY,QAAQ;AACrC,MAAI,CAAC,YAAY;AACf,UAAM,UAAU,SAAS,cAAc,OAAO;AAC9C,YAAQ,aAAa,aAAa,QAAQ;AAC1C,YAAQ,aAAa,QAAQ,UAAU;AACvC,iBAAa,YAAY,QAAQ,IAAI;AACrC,aAAS,KAAK,YAAY,OAAO;AAAA,EACnC;AACA,aAAW,YAAY;AACzB;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -1,2 +1,16 @@
|
|
|
1
|
-
const
|
|
1
|
+
const stylesheets = {};
|
|
2
|
+
const injectStyles = ({ filePath, css }) => {
|
|
3
|
+
let stylesheet = stylesheets[filePath];
|
|
4
|
+
if (!stylesheet) {
|
|
5
|
+
const styleEl = document.createElement("style");
|
|
6
|
+
styleEl.setAttribute("data-file", filePath);
|
|
7
|
+
styleEl.setAttribute("type", "text/css");
|
|
8
|
+
stylesheet = stylesheets[filePath] = styleEl;
|
|
9
|
+
document.head.appendChild(styleEl);
|
|
10
|
+
}
|
|
11
|
+
stylesheet.innerHTML = css;
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
injectStyles
|
|
15
|
+
};
|
|
2
16
|
//# sourceMappingURL=inject-styles.mjs.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/inject-styles.ts"],
|
|
4
4
|
"sourcesContent": ["// for vite dev mode\n\nconst stylesheets: Record<string, HTMLElement> = {}\n\ninterface InjectStylesOptions {\n filePath: string\n css: string\n}\n\nexport const injectStyles = ({ filePath, css }: InjectStylesOptions) => {\n let stylesheet = stylesheets[filePath]\n if (!stylesheet) {\n const styleEl = document.createElement('style')\n styleEl.setAttribute('data-file', filePath)\n styleEl.setAttribute('type', 'text/css')\n stylesheet = stylesheets[filePath] = styleEl\n document.head.appendChild(styleEl)\n }\n stylesheet.innerHTML = css\n}\n"],
|
|
5
|
-
"mappings": "AAEA,
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": "AAEA,MAAM,cAA2C,CAAC;AAO3C,MAAM,eAAe,CAAC,EAAE,UAAU,IAAI,MAA2B;AACtE,MAAI,aAAa,YAAY,QAAQ;AACrC,MAAI,CAAC,YAAY;AACf,UAAM,UAAU,SAAS,cAAc,OAAO;AAC9C,YAAQ,aAAa,aAAa,QAAQ;AAC1C,YAAQ,aAAa,QAAQ,UAAU;AACvC,iBAAa,YAAY,QAAQ,IAAI;AACrC,aAAS,KAAK,YAAY,OAAO;AAAA,EACnC;AACA,aAAW,YAAY;AACzB;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/vendor/Pressability.tsx"],
|
|
4
4
|
"sourcesContent": ["export const Pressability = {} as any\nexport const usePressability = {} as Function\n"],
|
|
5
|
-
"mappings": "AAAO,
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": "AAAO,MAAM,eAAe,CAAC;AACtB,MAAM,kBAAkB,CAAC;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/vendor/Pressability.tsx"],
|
|
4
4
|
"sourcesContent": ["export const Pressability = {} as any\nexport const usePressability = {} as Function\n"],
|
|
5
|
-
"mappings": "AAAO,
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": "AAAO,MAAM,eAAe,CAAC;AACtB,MAAM,kBAAkB,CAAC;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
const
|
|
1
|
+
const Pressability = require("react-native/Libraries/Pressability/Pressability").default;
|
|
2
|
+
const usePressability = require("react-native/Libraries/Pressability/usePressability").default;
|
|
3
|
+
export {
|
|
4
|
+
Pressability,
|
|
5
|
+
usePressability
|
|
6
|
+
};
|
|
2
7
|
//# sourceMappingURL=Pressability.native.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/vendor/Pressability.native.tsx"],
|
|
4
4
|
"sourcesContent": ["export const Pressability =\n require('react-native/Libraries/Pressability/Pressability').default\nexport const usePressability =\n require('react-native/Libraries/Pressability/usePressability').default\n"],
|
|
5
|
-
"mappings": "AAAO,
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": "AAAO,MAAM,eACX,QAAQ,kDAAkD,EAAE;AACvD,MAAM,kBACX,QAAQ,qDAAqD,EAAE;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
const
|
|
1
|
+
const Pressability = require("react-native/Libraries/Pressability/Pressability").default;
|
|
2
|
+
const usePressability = require("react-native/Libraries/Pressability/usePressability").default;
|
|
3
|
+
export {
|
|
4
|
+
Pressability,
|
|
5
|
+
usePressability
|
|
6
|
+
};
|
|
2
7
|
//# sourceMappingURL=Pressability.native.mjs.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/vendor/Pressability.native.tsx"],
|
|
4
4
|
"sourcesContent": ["export const Pressability =\n require('react-native/Libraries/Pressability/Pressability').default\nexport const usePressability =\n require('react-native/Libraries/Pressability/usePressability').default\n"],
|
|
5
|
-
"mappings": "AAAO,
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": "AAAO,MAAM,eACX,QAAQ,kDAAkD,EAAE;AACvD,MAAM,kBACX,QAAQ,qDAAqD,EAAE;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/core",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.2",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"main": "dist/cjs",
|
|
6
6
|
"module": "dist/esm",
|
|
@@ -28,16 +28,16 @@
|
|
|
28
28
|
"reset.css"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@tamagui/react-native-use-pressable": "1.14.
|
|
32
|
-
"@tamagui/react-native-use-responder-events": "1.14.
|
|
33
|
-
"@tamagui/use-event": "1.14.
|
|
34
|
-
"@tamagui/web": "1.14.
|
|
31
|
+
"@tamagui/react-native-use-pressable": "1.14.2",
|
|
32
|
+
"@tamagui/react-native-use-responder-events": "1.14.2",
|
|
33
|
+
"@tamagui/use-event": "1.14.2",
|
|
34
|
+
"@tamagui/web": "1.14.2"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"react": "*"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@tamagui/build": "1.14.
|
|
40
|
+
"@tamagui/build": "1.14.2",
|
|
41
41
|
"@testing-library/react": "^13.4.0",
|
|
42
42
|
"csstype": "^3.0.10",
|
|
43
43
|
"react": "^18.2.0",
|