@tamagui/react-native-use-responder-events 1.13.2 → 1.13.4

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.
Files changed (43) hide show
  1. package/dist/cjs/ResponderSystem.js +1 -388
  2. package/dist/cjs/ResponderSystem.js.map +2 -2
  3. package/dist/cjs/ResponderTouchHistoryStore.js +5 -193
  4. package/dist/cjs/ResponderTouchHistoryStore.js.map +2 -2
  5. package/dist/cjs/createResponderEvent.js +1 -150
  6. package/dist/cjs/createResponderEvent.js.map +2 -2
  7. package/dist/cjs/index.js +1 -18
  8. package/dist/cjs/index.js.map +2 -2
  9. package/dist/cjs/types.js +1 -97
  10. package/dist/cjs/types.js.map +2 -2
  11. package/dist/cjs/useResponderEvents.js +1 -79
  12. package/dist/cjs/useResponderEvents.js.map +2 -2
  13. package/dist/cjs/utils.js +2 -173
  14. package/dist/cjs/utils.js.map +2 -2
  15. package/dist/esm/ResponderSystem.js +1 -364
  16. package/dist/esm/ResponderSystem.js.map +2 -2
  17. package/dist/esm/ResponderSystem.mjs +1 -364
  18. package/dist/esm/ResponderSystem.mjs.map +2 -2
  19. package/dist/esm/ResponderTouchHistoryStore.js +5 -169
  20. package/dist/esm/ResponderTouchHistoryStore.js.map +2 -2
  21. package/dist/esm/ResponderTouchHistoryStore.mjs +5 -169
  22. package/dist/esm/ResponderTouchHistoryStore.mjs.map +2 -2
  23. package/dist/esm/createResponderEvent.js +1 -128
  24. package/dist/esm/createResponderEvent.js.map +2 -2
  25. package/dist/esm/createResponderEvent.mjs +1 -128
  26. package/dist/esm/createResponderEvent.mjs.map +2 -2
  27. package/dist/esm/index.js +1 -1
  28. package/dist/esm/index.js.map +1 -1
  29. package/dist/esm/index.mjs +1 -1
  30. package/dist/esm/index.mjs.map +1 -1
  31. package/dist/esm/types.js +1 -54
  32. package/dist/esm/types.js.map +2 -2
  33. package/dist/esm/types.mjs +1 -54
  34. package/dist/esm/types.mjs.map +2 -2
  35. package/dist/esm/useResponderEvents.js +1 -44
  36. package/dist/esm/useResponderEvents.js.map +2 -2
  37. package/dist/esm/useResponderEvents.mjs +1 -44
  38. package/dist/esm/useResponderEvents.mjs.map +2 -2
  39. package/dist/esm/utils.js +2 -141
  40. package/dist/esm/utils.js.map +2 -2
  41. package/dist/esm/utils.mjs +2 -141
  42. package/dist/esm/utils.mjs.map +2 -2
  43. package/package.json +2 -2
package/dist/esm/utils.js CHANGED
@@ -1,142 +1,3 @@
1
- const keyName = "__reactResponderId";
2
- const canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
3
- const getBoundingClientRect = (node) => {
4
- if (!node)
5
- return;
6
- if (node.nodeType !== 1)
7
- return;
8
- if (node.getBoundingClientRect) {
9
- return node.getBoundingClientRect();
10
- }
11
- };
12
- function getEventPath(domEvent) {
13
- var _a;
14
- if (domEvent.type === "selectionchange") {
15
- const target = (_a = window.getSelection()) == null ? void 0 : _a.anchorNode;
16
- return composedPathFallback(target);
17
- } else {
18
- const path = domEvent.composedPath != null ? domEvent.composedPath() : composedPathFallback(domEvent.target);
19
- return path;
20
- }
21
- }
22
- function composedPathFallback(target) {
23
- const path = [];
24
- while (target != null && target !== document.body) {
25
- path.push(target);
26
- target = target.parentNode;
27
- }
28
- return path;
29
- }
30
- function getResponderId(node) {
31
- if (node != null) {
32
- return node[keyName];
33
- }
34
- return null;
35
- }
36
- function setResponderId(node, id) {
37
- if (node != null) {
38
- node[keyName] = id;
39
- }
40
- }
41
- function getResponderPaths(domEvent) {
42
- const idPath = [];
43
- const nodePath = [];
44
- const eventPath = getEventPath(domEvent);
45
- for (let i = 0; i < eventPath.length; i++) {
46
- const node = eventPath[i];
47
- const id = getResponderId(node);
48
- if (id != null) {
49
- idPath.push(id);
50
- nodePath.push(node);
51
- }
52
- }
53
- return { idPath, nodePath };
54
- }
55
- function getLowestCommonAncestor(pathA, pathB) {
56
- let pathALength = pathA.length;
57
- let pathBLength = pathB.length;
58
- if (
59
- // If either path is empty
60
- pathALength === 0 || pathBLength === 0 || // If the last elements aren't the same there can't be a common ancestor
61
- // that is connected to the responder system
62
- pathA[pathALength - 1] !== pathB[pathBLength - 1]
63
- ) {
64
- return null;
65
- }
66
- let itemA = pathA[0];
67
- let indexA = 0;
68
- let itemB = pathB[0];
69
- let indexB = 0;
70
- if (pathALength - pathBLength > 0) {
71
- indexA = pathALength - pathBLength;
72
- itemA = pathA[indexA];
73
- pathALength = pathBLength;
74
- }
75
- if (pathBLength - pathALength > 0) {
76
- indexB = pathBLength - pathALength;
77
- itemB = pathB[indexB];
78
- pathBLength = pathALength;
79
- }
80
- let depth = pathALength;
81
- while (depth--) {
82
- if (itemA === itemB) {
83
- return itemA;
84
- }
85
- itemA = pathA[indexA++];
86
- itemB = pathB[indexB++];
87
- }
88
- return null;
89
- }
90
- function hasTargetTouches(target, touches) {
91
- if (!touches || touches.length === 0) {
92
- return false;
93
- }
94
- for (let i = 0; i < touches.length; i++) {
95
- const node = touches[i].target;
96
- if (node != null) {
97
- if (target.contains(node)) {
98
- return true;
99
- }
100
- }
101
- }
102
- return false;
103
- }
104
- function hasValidSelection(domEvent) {
105
- if (domEvent.type === "selectionchange") {
106
- return isSelectionValid();
107
- }
108
- return domEvent.type === "select";
109
- }
110
- function isPrimaryPointerDown(domEvent) {
111
- const { altKey, button, buttons, ctrlKey, type } = domEvent;
112
- const isTouch = type === "touchstart" || type === "touchmove";
113
- const isPrimaryMouseDown = type === "mousedown" && (button === 0 || buttons === 1);
114
- const isPrimaryMouseMove = type === "mousemove" && buttons === 1;
115
- const noModifiers = altKey === false && ctrlKey === false;
116
- if (isTouch || isPrimaryMouseDown && noModifiers || isPrimaryMouseMove && noModifiers) {
117
- return true;
118
- }
119
- return false;
120
- }
121
- function isSelectionValid() {
122
- const selection = window.getSelection();
123
- if (!selection)
124
- return false;
125
- const string = selection.toString();
126
- const anchorNode = selection.anchorNode;
127
- const focusNode = selection.focusNode;
128
- const isTextNode = anchorNode && anchorNode.nodeType === window.Node.TEXT_NODE || focusNode && focusNode.nodeType === window.Node.TEXT_NODE;
129
- return string.length >= 1 && string !== "\n" && !!isTextNode;
130
- }
131
- export {
132
- canUseDOM,
133
- getBoundingClientRect,
134
- getLowestCommonAncestor,
135
- getResponderPaths,
136
- hasTargetTouches,
137
- hasValidSelection,
138
- isPrimaryPointerDown,
139
- isSelectionValid,
140
- setResponderId
141
- };
1
+ const a="__reactResponderId",p=!!(typeof window<"u"&&window.document&&window.document.createElement),g=n=>{if(n&&n.nodeType===1&&n.getBoundingClientRect)return n.getBoundingClientRect()};function f(n){var e;if(n.type==="selectionchange"){const t=(e=window.getSelection())==null?void 0:e.anchorNode;return d(t)}else return n.composedPath!=null?n.composedPath():d(n.target)}function d(n){const e=[];for(;n!=null&&n!==document.body;)e.push(n),n=n.parentNode;return e}function y(n){return n!=null?n[a]:null}function w(n,e){n!=null&&(n[a]=e)}function m(n){const e=[],t=[],o=f(n);for(let r=0;r<o.length;r++){const i=o[r],l=y(i);l!=null&&(e.push(l),t.push(i))}return{idPath:e,nodePath:t}}function P(n,e){let t=n.length,o=e.length;if(t===0||o===0||n[t-1]!==e[o-1])return null;let r=n[0],i=0,l=e[0],c=0;t-o>0&&(i=t-o,r=n[i],t=o),o-t>0&&(c=o-t,l=e[c],o=t);let s=t;for(;s--;){if(r===l)return r;r=n[i++],l=e[c++]}return null}function x(n,e){if(!e||e.length===0)return!1;for(let t=0;t<e.length;t++){const o=e[t].target;if(o!=null&&n.contains(o))return!0}return!1}function N(n){return n.type==="selectionchange"?h():n.type==="select"}function T(n){const{altKey:e,button:t,buttons:o,ctrlKey:r,type:i}=n,l=i==="touchstart"||i==="touchmove",c=i==="mousedown"&&(t===0||o===1),s=i==="mousemove"&&o===1,u=e===!1&&r===!1;return!!(l||c&&u||s&&u)}function h(){const n=window.getSelection();if(!n)return!1;const e=n.toString(),t=n.anchorNode,o=n.focusNode,r=t&&t.nodeType===window.Node.TEXT_NODE||o&&o.nodeType===window.Node.TEXT_NODE;return e.length>=1&&e!==`
2
+ `&&!!r}export{p as canUseDOM,g as getBoundingClientRect,P as getLowestCommonAncestor,m as getResponderPaths,x as hasTargetTouches,N as hasValidSelection,T as isPrimaryPointerDown,h as isSelectionValid,w as setResponderId};
142
3
  //# sourceMappingURL=utils.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/utils.ts"],
4
4
  "sourcesContent": ["/**\n * Copyright (c) Nicolas Gallagher\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nconst keyName = '__reactResponderId'\n\nexport const canUseDOM = !!(\n typeof window !== 'undefined' &&\n window.document &&\n window.document.createElement\n)\n\nexport const getBoundingClientRect = (node: HTMLElement | null): void | DOMRect => {\n if (!node) return\n if (node.nodeType !== 1) return\n if (node.getBoundingClientRect) {\n return node.getBoundingClientRect()\n }\n}\n\nfunction getEventPath(domEvent: any): Array<any> {\n // The 'selectionchange' event always has the 'document' as the target.\n // Use the anchor node as the initial target to reconstruct a path.\n // (We actually only need the first \"responder\" node in practice.)\n if (domEvent.type === 'selectionchange') {\n const target = window.getSelection()?.anchorNode\n return composedPathFallback(target)\n } else {\n const path =\n domEvent.composedPath != null\n ? domEvent.composedPath()\n : composedPathFallback(domEvent.target)\n return path\n }\n}\n\nfunction composedPathFallback(target: any): Array<any> {\n const path: any[] = []\n while (target != null && target !== document.body) {\n path.push(target)\n target = target.parentNode\n }\n return path\n}\n\n/**\n * Retrieve the responderId from a host node\n */\nfunction getResponderId(node: any): number | null {\n if (node != null) {\n return node[keyName]\n }\n return null\n}\n\n/**\n * Store the responderId on a host node\n */\nexport function setResponderId(node: any, id: any) {\n if (node != null) {\n node[keyName] = id\n }\n}\n\n/**\n * Filter the event path to contain only the nodes attached to the responder system\n */\nexport function getResponderPaths(domEvent: any): {\n idPath: Array<number>\n nodePath: Array<any>\n} {\n const idPath: any[] = []\n const nodePath: any[] = []\n const eventPath = getEventPath(domEvent)\n for (let i = 0; i < eventPath.length; i++) {\n const node = eventPath[i]\n const id = getResponderId(node)\n if (id != null) {\n idPath.push(id)\n nodePath.push(node)\n }\n }\n return { idPath, nodePath }\n}\n\n/**\n * Walk the paths and find the first common ancestor\n */\nexport function getLowestCommonAncestor(pathA: Array<any>, pathB: Array<any>): any {\n let pathALength = pathA.length\n let pathBLength = pathB.length\n if (\n // If either path is empty\n pathALength === 0 ||\n pathBLength === 0 ||\n // If the last elements aren't the same there can't be a common ancestor\n // that is connected to the responder system\n pathA[pathALength - 1] !== pathB[pathBLength - 1]\n ) {\n return null\n }\n\n let itemA = pathA[0]\n let indexA = 0\n let itemB = pathB[0]\n let indexB = 0\n\n // If A is deeper, skip indices that can't match.\n if (pathALength - pathBLength > 0) {\n indexA = pathALength - pathBLength\n itemA = pathA[indexA]\n pathALength = pathBLength\n }\n\n // If B is deeper, skip indices that can't match\n if (pathBLength - pathALength > 0) {\n indexB = pathBLength - pathALength\n itemB = pathB[indexB]\n pathBLength = pathALength\n }\n\n // Walk in lockstep until a match is found\n let depth = pathALength\n while (depth--) {\n if (itemA === itemB) {\n return itemA\n }\n itemA = pathA[indexA++]\n itemB = pathB[indexB++]\n }\n return null\n}\n\n/**\n * Determine whether any of the active touches are within the current responder.\n * This cannot rely on W3C `targetTouches`, as neither IE11 nor Safari implement it.\n */\nexport function hasTargetTouches(target: any, touches: any): boolean {\n if (!touches || touches.length === 0) {\n return false\n }\n for (let i = 0; i < touches.length; i++) {\n const node = touches[i].target\n if (node != null) {\n if (target.contains(node)) {\n return true\n }\n }\n }\n return false\n}\n\n/**\n * Ignore 'selectionchange' events that don't correspond with a person's intent to\n * select text.\n */\nexport function hasValidSelection(domEvent: any): boolean {\n if (domEvent.type === 'selectionchange') {\n return isSelectionValid()\n }\n return domEvent.type === 'select'\n}\n\n/**\n * Events are only valid if the primary button was used without specific modifier keys.\n */\nexport function isPrimaryPointerDown(domEvent: any): boolean {\n const { altKey, button, buttons, ctrlKey, type } = domEvent\n const isTouch = type === 'touchstart' || type === 'touchmove'\n const isPrimaryMouseDown = type === 'mousedown' && (button === 0 || buttons === 1)\n const isPrimaryMouseMove = type === 'mousemove' && buttons === 1\n const noModifiers = altKey === false && ctrlKey === false\n\n if (\n isTouch ||\n (isPrimaryMouseDown && noModifiers) ||\n (isPrimaryMouseMove && noModifiers)\n ) {\n return true\n }\n return false\n}\n\nexport function isSelectionValid(): boolean {\n const selection = window.getSelection()\n if (!selection) return false\n const string = selection.toString()\n const anchorNode = selection.anchorNode\n const focusNode = selection.focusNode\n const isTextNode =\n (anchorNode && anchorNode.nodeType === window.Node.TEXT_NODE) ||\n (focusNode && focusNode.nodeType === window.Node.TEXT_NODE)\n return string.length >= 1 && string !== '\\n' && !!isTextNode\n}\n"],
5
- "mappings": "AAMA,MAAM,UAAU;AAET,MAAM,YAAY,CAAC,EACxB,OAAO,WAAW,eAClB,OAAO,YACP,OAAO,SAAS;AAGX,MAAM,wBAAwB,CAAC,SAA6C;AACjF,MAAI,CAAC;AAAM;AACX,MAAI,KAAK,aAAa;AAAG;AACzB,MAAI,KAAK,uBAAuB;AAC9B,WAAO,KAAK,sBAAsB;AAAA,EACpC;AACF;AAEA,SAAS,aAAa,UAA2B;AAtBjD;AA0BE,MAAI,SAAS,SAAS,mBAAmB;AACvC,UAAM,UAAS,YAAO,aAAa,MAApB,mBAAuB;AACtC,WAAO,qBAAqB,MAAM;AAAA,EACpC,OAAO;AACL,UAAM,OACJ,SAAS,gBAAgB,OACrB,SAAS,aAAa,IACtB,qBAAqB,SAAS,MAAM;AAC1C,WAAO;AAAA,EACT;AACF;AAEA,SAAS,qBAAqB,QAAyB;AACrD,QAAM,OAAc,CAAC;AACrB,SAAO,UAAU,QAAQ,WAAW,SAAS,MAAM;AACjD,SAAK,KAAK,MAAM;AAChB,aAAS,OAAO;AAAA,EAClB;AACA,SAAO;AACT;AAKA,SAAS,eAAe,MAA0B;AAChD,MAAI,QAAQ,MAAM;AAChB,WAAO,KAAK,OAAO;AAAA,EACrB;AACA,SAAO;AACT;AA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["keyName", "canUseDOM", "getBoundingClientRect", "node", "getEventPath", "domEvent", "_a", "target", "composedPathFallback", "path", "getResponderId", "setResponderId", "id", "getResponderPaths", "idPath", "nodePath", "eventPath", "i", "getLowestCommonAncestor", "pathA", "pathB", "pathALength", "pathBLength", "itemA", "indexA", "itemB", "indexB", "depth", "hasTargetTouches", "touches", "hasValidSelection", "isSelectionValid", "isPrimaryPointerDown", "altKey", "button", "buttons", "ctrlKey", "type", "isTouch", "isPrimaryMouseDown", "isPrimaryMouseMove", "noModifiers", "selection", "string", "anchorNode", "focusNode", "isTextNode"]
7
7
  }
@@ -1,142 +1,3 @@
1
- const keyName = "__reactResponderId";
2
- const canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
3
- const getBoundingClientRect = (node) => {
4
- if (!node)
5
- return;
6
- if (node.nodeType !== 1)
7
- return;
8
- if (node.getBoundingClientRect) {
9
- return node.getBoundingClientRect();
10
- }
11
- };
12
- function getEventPath(domEvent) {
13
- var _a;
14
- if (domEvent.type === "selectionchange") {
15
- const target = (_a = window.getSelection()) == null ? void 0 : _a.anchorNode;
16
- return composedPathFallback(target);
17
- } else {
18
- const path = domEvent.composedPath != null ? domEvent.composedPath() : composedPathFallback(domEvent.target);
19
- return path;
20
- }
21
- }
22
- function composedPathFallback(target) {
23
- const path = [];
24
- while (target != null && target !== document.body) {
25
- path.push(target);
26
- target = target.parentNode;
27
- }
28
- return path;
29
- }
30
- function getResponderId(node) {
31
- if (node != null) {
32
- return node[keyName];
33
- }
34
- return null;
35
- }
36
- function setResponderId(node, id) {
37
- if (node != null) {
38
- node[keyName] = id;
39
- }
40
- }
41
- function getResponderPaths(domEvent) {
42
- const idPath = [];
43
- const nodePath = [];
44
- const eventPath = getEventPath(domEvent);
45
- for (let i = 0; i < eventPath.length; i++) {
46
- const node = eventPath[i];
47
- const id = getResponderId(node);
48
- if (id != null) {
49
- idPath.push(id);
50
- nodePath.push(node);
51
- }
52
- }
53
- return { idPath, nodePath };
54
- }
55
- function getLowestCommonAncestor(pathA, pathB) {
56
- let pathALength = pathA.length;
57
- let pathBLength = pathB.length;
58
- if (
59
- // If either path is empty
60
- pathALength === 0 || pathBLength === 0 || // If the last elements aren't the same there can't be a common ancestor
61
- // that is connected to the responder system
62
- pathA[pathALength - 1] !== pathB[pathBLength - 1]
63
- ) {
64
- return null;
65
- }
66
- let itemA = pathA[0];
67
- let indexA = 0;
68
- let itemB = pathB[0];
69
- let indexB = 0;
70
- if (pathALength - pathBLength > 0) {
71
- indexA = pathALength - pathBLength;
72
- itemA = pathA[indexA];
73
- pathALength = pathBLength;
74
- }
75
- if (pathBLength - pathALength > 0) {
76
- indexB = pathBLength - pathALength;
77
- itemB = pathB[indexB];
78
- pathBLength = pathALength;
79
- }
80
- let depth = pathALength;
81
- while (depth--) {
82
- if (itemA === itemB) {
83
- return itemA;
84
- }
85
- itemA = pathA[indexA++];
86
- itemB = pathB[indexB++];
87
- }
88
- return null;
89
- }
90
- function hasTargetTouches(target, touches) {
91
- if (!touches || touches.length === 0) {
92
- return false;
93
- }
94
- for (let i = 0; i < touches.length; i++) {
95
- const node = touches[i].target;
96
- if (node != null) {
97
- if (target.contains(node)) {
98
- return true;
99
- }
100
- }
101
- }
102
- return false;
103
- }
104
- function hasValidSelection(domEvent) {
105
- if (domEvent.type === "selectionchange") {
106
- return isSelectionValid();
107
- }
108
- return domEvent.type === "select";
109
- }
110
- function isPrimaryPointerDown(domEvent) {
111
- const { altKey, button, buttons, ctrlKey, type } = domEvent;
112
- const isTouch = type === "touchstart" || type === "touchmove";
113
- const isPrimaryMouseDown = type === "mousedown" && (button === 0 || buttons === 1);
114
- const isPrimaryMouseMove = type === "mousemove" && buttons === 1;
115
- const noModifiers = altKey === false && ctrlKey === false;
116
- if (isTouch || isPrimaryMouseDown && noModifiers || isPrimaryMouseMove && noModifiers) {
117
- return true;
118
- }
119
- return false;
120
- }
121
- function isSelectionValid() {
122
- const selection = window.getSelection();
123
- if (!selection)
124
- return false;
125
- const string = selection.toString();
126
- const anchorNode = selection.anchorNode;
127
- const focusNode = selection.focusNode;
128
- const isTextNode = anchorNode && anchorNode.nodeType === window.Node.TEXT_NODE || focusNode && focusNode.nodeType === window.Node.TEXT_NODE;
129
- return string.length >= 1 && string !== "\n" && !!isTextNode;
130
- }
131
- export {
132
- canUseDOM,
133
- getBoundingClientRect,
134
- getLowestCommonAncestor,
135
- getResponderPaths,
136
- hasTargetTouches,
137
- hasValidSelection,
138
- isPrimaryPointerDown,
139
- isSelectionValid,
140
- setResponderId
141
- };
1
+ const a="__reactResponderId",p=!!(typeof window<"u"&&window.document&&window.document.createElement),g=n=>{if(n&&n.nodeType===1&&n.getBoundingClientRect)return n.getBoundingClientRect()};function f(n){var e;if(n.type==="selectionchange"){const t=(e=window.getSelection())==null?void 0:e.anchorNode;return d(t)}else return n.composedPath!=null?n.composedPath():d(n.target)}function d(n){const e=[];for(;n!=null&&n!==document.body;)e.push(n),n=n.parentNode;return e}function y(n){return n!=null?n[a]:null}function w(n,e){n!=null&&(n[a]=e)}function m(n){const e=[],t=[],o=f(n);for(let r=0;r<o.length;r++){const i=o[r],l=y(i);l!=null&&(e.push(l),t.push(i))}return{idPath:e,nodePath:t}}function P(n,e){let t=n.length,o=e.length;if(t===0||o===0||n[t-1]!==e[o-1])return null;let r=n[0],i=0,l=e[0],c=0;t-o>0&&(i=t-o,r=n[i],t=o),o-t>0&&(c=o-t,l=e[c],o=t);let s=t;for(;s--;){if(r===l)return r;r=n[i++],l=e[c++]}return null}function x(n,e){if(!e||e.length===0)return!1;for(let t=0;t<e.length;t++){const o=e[t].target;if(o!=null&&n.contains(o))return!0}return!1}function N(n){return n.type==="selectionchange"?h():n.type==="select"}function T(n){const{altKey:e,button:t,buttons:o,ctrlKey:r,type:i}=n,l=i==="touchstart"||i==="touchmove",c=i==="mousedown"&&(t===0||o===1),s=i==="mousemove"&&o===1,u=e===!1&&r===!1;return!!(l||c&&u||s&&u)}function h(){const n=window.getSelection();if(!n)return!1;const e=n.toString(),t=n.anchorNode,o=n.focusNode,r=t&&t.nodeType===window.Node.TEXT_NODE||o&&o.nodeType===window.Node.TEXT_NODE;return e.length>=1&&e!==`
2
+ `&&!!r}export{p as canUseDOM,g as getBoundingClientRect,P as getLowestCommonAncestor,m as getResponderPaths,x as hasTargetTouches,N as hasValidSelection,T as isPrimaryPointerDown,h as isSelectionValid,w as setResponderId};
142
3
  //# sourceMappingURL=utils.mjs.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/utils.ts"],
4
4
  "sourcesContent": ["/**\n * Copyright (c) Nicolas Gallagher\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nconst keyName = '__reactResponderId'\n\nexport const canUseDOM = !!(\n typeof window !== 'undefined' &&\n window.document &&\n window.document.createElement\n)\n\nexport const getBoundingClientRect = (node: HTMLElement | null): void | DOMRect => {\n if (!node) return\n if (node.nodeType !== 1) return\n if (node.getBoundingClientRect) {\n return node.getBoundingClientRect()\n }\n}\n\nfunction getEventPath(domEvent: any): Array<any> {\n // The 'selectionchange' event always has the 'document' as the target.\n // Use the anchor node as the initial target to reconstruct a path.\n // (We actually only need the first \"responder\" node in practice.)\n if (domEvent.type === 'selectionchange') {\n const target = window.getSelection()?.anchorNode\n return composedPathFallback(target)\n } else {\n const path =\n domEvent.composedPath != null\n ? domEvent.composedPath()\n : composedPathFallback(domEvent.target)\n return path\n }\n}\n\nfunction composedPathFallback(target: any): Array<any> {\n const path: any[] = []\n while (target != null && target !== document.body) {\n path.push(target)\n target = target.parentNode\n }\n return path\n}\n\n/**\n * Retrieve the responderId from a host node\n */\nfunction getResponderId(node: any): number | null {\n if (node != null) {\n return node[keyName]\n }\n return null\n}\n\n/**\n * Store the responderId on a host node\n */\nexport function setResponderId(node: any, id: any) {\n if (node != null) {\n node[keyName] = id\n }\n}\n\n/**\n * Filter the event path to contain only the nodes attached to the responder system\n */\nexport function getResponderPaths(domEvent: any): {\n idPath: Array<number>\n nodePath: Array<any>\n} {\n const idPath: any[] = []\n const nodePath: any[] = []\n const eventPath = getEventPath(domEvent)\n for (let i = 0; i < eventPath.length; i++) {\n const node = eventPath[i]\n const id = getResponderId(node)\n if (id != null) {\n idPath.push(id)\n nodePath.push(node)\n }\n }\n return { idPath, nodePath }\n}\n\n/**\n * Walk the paths and find the first common ancestor\n */\nexport function getLowestCommonAncestor(pathA: Array<any>, pathB: Array<any>): any {\n let pathALength = pathA.length\n let pathBLength = pathB.length\n if (\n // If either path is empty\n pathALength === 0 ||\n pathBLength === 0 ||\n // If the last elements aren't the same there can't be a common ancestor\n // that is connected to the responder system\n pathA[pathALength - 1] !== pathB[pathBLength - 1]\n ) {\n return null\n }\n\n let itemA = pathA[0]\n let indexA = 0\n let itemB = pathB[0]\n let indexB = 0\n\n // If A is deeper, skip indices that can't match.\n if (pathALength - pathBLength > 0) {\n indexA = pathALength - pathBLength\n itemA = pathA[indexA]\n pathALength = pathBLength\n }\n\n // If B is deeper, skip indices that can't match\n if (pathBLength - pathALength > 0) {\n indexB = pathBLength - pathALength\n itemB = pathB[indexB]\n pathBLength = pathALength\n }\n\n // Walk in lockstep until a match is found\n let depth = pathALength\n while (depth--) {\n if (itemA === itemB) {\n return itemA\n }\n itemA = pathA[indexA++]\n itemB = pathB[indexB++]\n }\n return null\n}\n\n/**\n * Determine whether any of the active touches are within the current responder.\n * This cannot rely on W3C `targetTouches`, as neither IE11 nor Safari implement it.\n */\nexport function hasTargetTouches(target: any, touches: any): boolean {\n if (!touches || touches.length === 0) {\n return false\n }\n for (let i = 0; i < touches.length; i++) {\n const node = touches[i].target\n if (node != null) {\n if (target.contains(node)) {\n return true\n }\n }\n }\n return false\n}\n\n/**\n * Ignore 'selectionchange' events that don't correspond with a person's intent to\n * select text.\n */\nexport function hasValidSelection(domEvent: any): boolean {\n if (domEvent.type === 'selectionchange') {\n return isSelectionValid()\n }\n return domEvent.type === 'select'\n}\n\n/**\n * Events are only valid if the primary button was used without specific modifier keys.\n */\nexport function isPrimaryPointerDown(domEvent: any): boolean {\n const { altKey, button, buttons, ctrlKey, type } = domEvent\n const isTouch = type === 'touchstart' || type === 'touchmove'\n const isPrimaryMouseDown = type === 'mousedown' && (button === 0 || buttons === 1)\n const isPrimaryMouseMove = type === 'mousemove' && buttons === 1\n const noModifiers = altKey === false && ctrlKey === false\n\n if (\n isTouch ||\n (isPrimaryMouseDown && noModifiers) ||\n (isPrimaryMouseMove && noModifiers)\n ) {\n return true\n }\n return false\n}\n\nexport function isSelectionValid(): boolean {\n const selection = window.getSelection()\n if (!selection) return false\n const string = selection.toString()\n const anchorNode = selection.anchorNode\n const focusNode = selection.focusNode\n const isTextNode =\n (anchorNode && anchorNode.nodeType === window.Node.TEXT_NODE) ||\n (focusNode && focusNode.nodeType === window.Node.TEXT_NODE)\n return string.length >= 1 && string !== '\\n' && !!isTextNode\n}\n"],
5
- "mappings": "AAMA,MAAM,UAAU;AAET,MAAM,YAAY,CAAC,EACxB,OAAO,WAAW,eAClB,OAAO,YACP,OAAO,SAAS;AAGX,MAAM,wBAAwB,CAAC,SAA6C;AACjF,MAAI,CAAC;AAAM;AACX,MAAI,KAAK,aAAa;AAAG;AACzB,MAAI,KAAK,uBAAuB;AAC9B,WAAO,KAAK,sBAAsB;AAAA,EACpC;AACF;AAEA,SAAS,aAAa,UAA2B;AAtBjD;AA0BE,MAAI,SAAS,SAAS,mBAAmB;AACvC,UAAM,UAAS,YAAO,aAAa,MAApB,mBAAuB;AACtC,WAAO,qBAAqB,MAAM;AAAA,EACpC,OAAO;AACL,UAAM,OACJ,SAAS,gBAAgB,OACrB,SAAS,aAAa,IACtB,qBAAqB,SAAS,MAAM;AAC1C,WAAO;AAAA,EACT;AACF;AAEA,SAAS,qBAAqB,QAAyB;AACrD,QAAM,OAAc,CAAC;AACrB,SAAO,UAAU,QAAQ,WAAW,SAAS,MAAM;AACjD,SAAK,KAAK,MAAM;AAChB,aAAS,OAAO;AAAA,EAClB;AACA,SAAO;AACT;AAKA,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WAAa,OAAO,KAAK,UACnD,OAAOF,EAAO,QAAU,GAAKA,IAAW;AAAA,GAAQ,CAAC,CAACG,CACpD",
6
+ "names": ["keyName", "canUseDOM", "getBoundingClientRect", "node", "getEventPath", "domEvent", "_a", "target", "composedPathFallback", "path", "getResponderId", "setResponderId", "id", "getResponderPaths", "idPath", "nodePath", "eventPath", "i", "getLowestCommonAncestor", "pathA", "pathB", "pathALength", "pathBLength", "itemA", "indexA", "itemB", "indexB", "depth", "hasTargetTouches", "touches", "hasValidSelection", "isSelectionValid", "isPrimaryPointerDown", "altKey", "button", "buttons", "ctrlKey", "type", "isTouch", "isPrimaryMouseDown", "isPrimaryMouseMove", "noModifiers", "selection", "string", "anchorNode", "focusNode", "isTextNode"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/react-native-use-responder-events",
3
- "version": "1.13.2",
3
+ "version": "1.13.4",
4
4
  "types": "./types/index.d.ts",
5
5
  "main": "dist/cjs",
6
6
  "module": "dist/esm",
@@ -29,7 +29,7 @@
29
29
  "react": "*"
30
30
  },
31
31
  "devDependencies": {
32
- "@tamagui/build": "1.13.2",
32
+ "@tamagui/build": "1.13.4",
33
33
  "@types/react": "^18.0.15",
34
34
  "react": "^18.2.0"
35
35
  },