@tamagui/animate-presence 2.7.7 → 3.0.0-beta.643.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.
Files changed (51) hide show
  1. package/dist/cjs/AnimatePresence.cjs +102 -128
  2. package/dist/cjs/AnimatePresence.native.cjs +135 -0
  3. package/dist/cjs/AnimatePresence.native.js +112 -141
  4. package/dist/cjs/AnimatePresence.native.js.map +1 -1
  5. package/dist/cjs/LayoutGroupContext.cjs +18 -26
  6. package/dist/cjs/LayoutGroupContext.native.cjs +34 -0
  7. package/dist/cjs/LayoutGroupContext.native.js +19 -26
  8. package/dist/cjs/LayoutGroupContext.native.js.map +1 -1
  9. package/dist/cjs/PresenceChild.cjs +61 -81
  10. package/dist/cjs/PresenceChild.native.cjs +105 -0
  11. package/dist/cjs/PresenceChild.native.js +83 -104
  12. package/dist/cjs/PresenceChild.native.js.map +1 -1
  13. package/dist/cjs/index.cjs +10 -11
  14. package/dist/cjs/index.native.cjs +24 -0
  15. package/dist/cjs/index.native.js +10 -10
  16. package/dist/cjs/index.native.js.map +1 -1
  17. package/dist/cjs/types.cjs +10 -11
  18. package/dist/cjs/types.native.cjs +19 -0
  19. package/dist/cjs/types.native.js +10 -10
  20. package/dist/cjs/types.native.js.map +1 -1
  21. package/dist/esm/AnimatePresence.mjs +90 -112
  22. package/dist/esm/AnimatePresence.mjs.map +1 -1
  23. package/dist/esm/AnimatePresence.native.js +100 -126
  24. package/dist/esm/AnimatePresence.native.js.map +1 -1
  25. package/dist/esm/LayoutGroupContext.mjs +2 -0
  26. package/dist/esm/LayoutGroupContext.mjs.map +1 -1
  27. package/dist/esm/LayoutGroupContext.native.js +3 -1
  28. package/dist/esm/LayoutGroupContext.native.js.map +1 -1
  29. package/dist/esm/PresenceChild.mjs +45 -55
  30. package/dist/esm/PresenceChild.mjs.map +1 -1
  31. package/dist/esm/PresenceChild.native.js +68 -80
  32. package/dist/esm/PresenceChild.native.js.map +1 -1
  33. package/dist/esm/index.js +7 -5
  34. package/dist/esm/index.mjs +7 -5
  35. package/dist/esm/index.native.js +7 -5
  36. package/dist/esm/types.mjs +0 -2
  37. package/dist/esm/types.native.js +0 -2
  38. package/package.json +8 -8
  39. package/src/AnimatePresence.tsx +3 -25
  40. package/src/PresenceChild.tsx +1 -10
  41. package/src/types.ts +0 -24
  42. package/types/AnimatePresence.d.ts.map +1 -1
  43. package/types/PresenceChild.d.ts +1 -4
  44. package/types/PresenceChild.d.ts.map +1 -1
  45. package/types/types.d.ts +0 -20
  46. package/types/types.d.ts.map +1 -1
  47. package/dist/esm/index.js.map +0 -1
  48. package/dist/esm/index.mjs.map +0 -1
  49. package/dist/esm/index.native.js.map +0 -1
  50. package/dist/esm/types.mjs.map +0 -1
  51. package/dist/esm/types.native.js.map +0 -1
@@ -1,31 +1,28 @@
1
1
  "use strict";
2
2
 
3
+
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
8
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: true
11
- });
9
+ for (var name in all) __defProp(target, name, {
10
+ get: all[name],
11
+ enumerable: true
12
+ });
12
13
  };
13
14
  var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
- get: () => from[key],
17
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
- });
19
- }
20
- return to;
15
+ if (from && typeof from === "object" || typeof from === "function") {
16
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
17
+ get: () => from[key],
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ }
21
+ return to;
21
22
  };
22
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
23
- value: true
24
- }), mod);
23
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
24
  var AnimatePresence_exports = {};
26
- __export(AnimatePresence_exports, {
27
- AnimatePresence: () => AnimatePresence
28
- });
25
+ __export(AnimatePresence_exports, { AnimatePresence: () => AnimatePresence });
29
26
  module.exports = __toCommonJS(AnimatePresence_exports);
30
27
  var import_jsx_runtime = require("react/jsx-runtime");
31
28
  var import_react = require("react");
@@ -34,133 +31,107 @@ var import_use_force_update = require("@tamagui/use-force-update");
34
31
  var import_react2 = require("react");
35
32
  var import_LayoutGroupContext = require("./LayoutGroupContext.native.js");
36
33
  var import_PresenceChild = require("./PresenceChild.native.js");
37
- function _type_of(obj) {
38
- "@swc/helpers - typeof";
39
-
40
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
41
- }
42
- var getChildKey = function (child) {
43
- return child.key || function () {
44
- var ct = child.type;
45
- var defaultName = ct["displayName"] || ct["name"] || "";
46
- if (ct && (typeof ct === "undefined" ? "undefined" : _type_of(ct)) === "object" && "staticConfig" in ct) {
47
- return ct.staticConfig.componentName || defaultName;
48
- }
49
- return defaultName;
50
- }();
34
+ var getChildKey = function(child) {
35
+ var _child_key;
36
+ return (_child_key = child.key) !== null && _child_key !== void 0 ? _child_key : "";
51
37
  };
52
38
  function onlyElements(children) {
53
- var filtered = [];
54
- import_react2.Children.forEach(children, function (child) {
55
- if (/* @__PURE__ */(0, import_react2.isValidElement)(child)) filtered.push(child);
56
- });
57
- return filtered;
39
+ var filtered = [];
40
+ import_react2.Children.forEach(children, function(child) {
41
+ if (/* @__PURE__ */ (0, import_react2.isValidElement)(child)) filtered.push(child);
42
+ });
43
+ return filtered;
58
44
  }
59
- var AnimatePresence = function (param) {
60
- var {
61
- children,
62
- enterVariant,
63
- exitVariant,
64
- enterExitVariant,
65
- initial = true,
66
- onExitComplete,
67
- exitBeforeEnter,
68
- mode,
69
- presenceAffectsLayout = true,
70
- custom,
71
- passThrough
72
- } = param;
73
- var effectiveMode = mode !== null && mode !== void 0 ? mode : exitBeforeEnter ? "wait" : "sync";
74
- var presentChildren = (0, import_react2.useMemo)(function () {
75
- return onlyElements(children);
76
- }, [children]);
77
- var presentKeys = presentChildren.map(getChildKey);
78
- var isInitialRender = (0, import_react2.useRef)(true);
79
- var frozenCustomRef = (0, import_react2.useRef)(/* @__PURE__ */new Map());
80
- var pendingPresentChildren = (0, import_react2.useRef)(presentChildren);
81
- var exitComplete = (0, import_use_constant.useConstant)(function () {
82
- return /* @__PURE__ */new Map();
83
- });
84
- var [diffedChildren, setDiffedChildren] = (0, import_react2.useState)(presentChildren);
85
- var [renderedChildren, setRenderedChildren] = (0, import_react2.useState)(presentChildren);
86
- var _useContext_forceRender;
87
- var forceRender = (_useContext_forceRender = (0, import_react2.useContext)(import_LayoutGroupContext.LayoutGroupContext).forceRender) !== null && _useContext_forceRender !== void 0 ? _useContext_forceRender : (0, import_use_force_update.useForceUpdate)();
88
- if (passThrough) {
89
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
90
- children
91
- });
92
- }
93
- (0, import_react.useInsertionEffect)(function () {
94
- isInitialRender.current = false;
95
- pendingPresentChildren.current = presentChildren;
96
- for (var i2 = 0; i2 < renderedChildren.length; i2++) {
97
- var key2 = getChildKey(renderedChildren[i2]);
98
- if (!presentKeys.includes(key2)) {
99
- if (exitComplete.get(key2) !== true) {
100
- exitComplete.set(key2, false);
101
- }
102
- } else {
103
- exitComplete.delete(key2);
104
- frozenCustomRef.current.delete(key2);
105
- }
106
- }
107
- }, [renderedChildren, presentKeys.length, presentKeys.join("-")]);
108
- if (presentChildren !== diffedChildren) {
109
- var nextChildren = [...presentChildren];
110
- for (var i = 0; i < renderedChildren.length; i++) {
111
- var child = renderedChildren[i];
112
- var key = getChildKey(child);
113
- if (!presentKeys.includes(key)) {
114
- nextChildren.splice(i, 0, child);
115
- if (!frozenCustomRef.current.has(key)) {
116
- frozenCustomRef.current.set(key, custom);
117
- }
118
- }
119
- }
120
- var exitingChildren = renderedChildren.filter(function (child2) {
121
- return !presentKeys.includes(getChildKey(child2));
122
- });
123
- if (effectiveMode === "wait" && exitingChildren.length) {
124
- nextChildren = exitingChildren;
125
- }
126
- setRenderedChildren(onlyElements(nextChildren));
127
- setDiffedChildren(presentChildren);
128
- return null;
129
- }
130
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
131
- children: renderedChildren.map(function (child2) {
132
- var key2 = getChildKey(child2);
133
- var isPresent = presentChildren === renderedChildren || presentKeys.includes(key2);
134
- var onExit = function () {
135
- if (exitComplete.has(key2)) {
136
- exitComplete.set(key2, true);
137
- } else {
138
- return;
139
- }
140
- var isEveryExitComplete = true;
141
- exitComplete.forEach(function (isExitComplete) {
142
- if (!isExitComplete) isEveryExitComplete = false;
143
- });
144
- if (isEveryExitComplete) {
145
- forceRender === null || forceRender === void 0 ? void 0 : forceRender();
146
- setRenderedChildren(pendingPresentChildren.current);
147
- onExitComplete === null || onExitComplete === void 0 ? void 0 : onExitComplete();
148
- }
149
- };
150
- var _frozenCustomRef_current_get;
151
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_PresenceChild.PresenceChild, {
152
- isPresent,
153
- initial: !isInitialRender.current || initial ? void 0 : false,
154
- custom: isPresent ? custom : (_frozenCustomRef_current_get = frozenCustomRef.current.get(key2)) !== null && _frozenCustomRef_current_get !== void 0 ? _frozenCustomRef_current_get : custom,
155
- presenceAffectsLayout,
156
- enterExitVariant,
157
- enterVariant,
158
- exitVariant,
159
- onExitComplete: isPresent ? void 0 : onExit,
160
- children: child2
161
- }, key2);
162
- })
163
- });
45
+ var AnimatePresence = function(param) {
46
+ var { children, initial = true, onExitComplete, mode = "sync", presenceAffectsLayout = true, custom, passThrough } = param;
47
+ var presentChildren = (0, import_react2.useMemo)(function() {
48
+ return onlyElements(children);
49
+ }, [children]);
50
+ var presentKeys = presentChildren.map(getChildKey);
51
+ var isInitialRender = (0, import_react2.useRef)(true);
52
+ var frozenCustomRef = (0, import_react2.useRef)(/* @__PURE__ */ new Map());
53
+ var pendingPresentChildren = (0, import_react2.useRef)(presentChildren);
54
+ var exitComplete = (0, import_use_constant.useConstant)(function() {
55
+ return /* @__PURE__ */ new Map();
56
+ });
57
+ var [diffedChildren, setDiffedChildren] = (0, import_react2.useState)(presentChildren);
58
+ var [renderedChildren, setRenderedChildren] = (0, import_react2.useState)(presentChildren);
59
+ var _useContext_forceRender;
60
+ var forceRender = (_useContext_forceRender = (0, import_react2.useContext)(import_LayoutGroupContext.LayoutGroupContext).forceRender) !== null && _useContext_forceRender !== void 0 ? _useContext_forceRender : (0, import_use_force_update.useForceUpdate)();
61
+ if (passThrough) {
62
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children });
63
+ }
64
+ (0, import_react.useInsertionEffect)(function() {
65
+ isInitialRender.current = false;
66
+ pendingPresentChildren.current = presentChildren;
67
+ for (var i2 = 0; i2 < renderedChildren.length; i2++) {
68
+ var key2 = getChildKey(renderedChildren[i2]);
69
+ if (!presentKeys.includes(key2)) {
70
+ if (exitComplete.get(key2) !== true) {
71
+ exitComplete.set(key2, false);
72
+ }
73
+ } else {
74
+ exitComplete.delete(key2);
75
+ frozenCustomRef.current.delete(key2);
76
+ }
77
+ }
78
+ }, [
79
+ renderedChildren,
80
+ presentKeys.length,
81
+ presentKeys.join("-")
82
+ ]);
83
+ if (presentChildren !== diffedChildren) {
84
+ var nextChildren = [...presentChildren];
85
+ for (var i = 0; i < renderedChildren.length; i++) {
86
+ var child = renderedChildren[i];
87
+ var key = getChildKey(child);
88
+ if (!presentKeys.includes(key)) {
89
+ nextChildren.splice(i, 0, child);
90
+ if (!frozenCustomRef.current.has(key)) {
91
+ frozenCustomRef.current.set(key, custom);
92
+ }
93
+ }
94
+ }
95
+ var exitingChildren = renderedChildren.filter(function(child2) {
96
+ return !presentKeys.includes(getChildKey(child2));
97
+ });
98
+ if (mode === "wait" && exitingChildren.length) {
99
+ nextChildren = exitingChildren;
100
+ }
101
+ setRenderedChildren(onlyElements(nextChildren));
102
+ setDiffedChildren(presentChildren);
103
+ return null;
104
+ }
105
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: renderedChildren.map(function(child2) {
106
+ var key2 = getChildKey(child2);
107
+ var isPresent = presentChildren === renderedChildren || presentKeys.includes(key2);
108
+ var onExit = function() {
109
+ if (exitComplete.has(key2)) {
110
+ exitComplete.set(key2, true);
111
+ } else {
112
+ return;
113
+ }
114
+ var isEveryExitComplete = true;
115
+ exitComplete.forEach(function(isExitComplete) {
116
+ if (!isExitComplete) isEveryExitComplete = false;
117
+ });
118
+ if (isEveryExitComplete) {
119
+ forceRender === null || forceRender === void 0 ? void 0 : forceRender();
120
+ setRenderedChildren(pendingPresentChildren.current);
121
+ onExitComplete === null || onExitComplete === void 0 ? void 0 : onExitComplete();
122
+ }
123
+ };
124
+ var _frozenCustomRef_current_get;
125
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_PresenceChild.PresenceChild, {
126
+ isPresent,
127
+ initial: !isInitialRender.current || initial ? void 0 : false,
128
+ custom: isPresent ? custom : (_frozenCustomRef_current_get = frozenCustomRef.current.get(key2)) !== null && _frozenCustomRef_current_get !== void 0 ? _frozenCustomRef_current_get : custom,
129
+ presenceAffectsLayout,
130
+ onExitComplete: isPresent ? void 0 : onExit,
131
+ children: child2
132
+ }, key2);
133
+ }) });
164
134
  };
165
135
  AnimatePresence.displayName = "AnimatePresence";
136
+
166
137
  //# sourceMappingURL=AnimatePresence.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","AnimatePresence_exports","__export","AnimatePresence","module","exports","import_jsx_runtime","require","import_react","import_use_constant","import_use_force_update","import_react2","import_LayoutGroupContext","import_PresenceChild","_type_of","obj","Symbol","constructor","getChildKey","child","key","ct","type","defaultName","staticConfig","componentName","onlyElements","children","filtered","Children","forEach","isValidElement","push","param","enterVariant","exitVariant","enterExitVariant","initial","onExitComplete","exitBeforeEnter","mode","presenceAffectsLayout","custom","passThrough","effectiveMode","presentChildren","useMemo","presentKeys","map","isInitialRender","useRef","frozenCustomRef","Map","pendingPresentChildren","exitComplete","useConstant","diffedChildren","setDiffedChildren","useState","renderedChildren","setRenderedChildren","_useContext_forceRender","forceRender","useContext","LayoutGroupContext","useForceUpdate","jsx","Fragment","useInsertionEffect","current","i2","length","key2","includes","get","set","delete","join","nextChildren","i","splice","has","exitingChildren","filter","child2","isPresent","onExit","isEveryExitComplete","isExitComplete","_frozenCustomRef_current_get","PresenceChild"],"sources":["../../src/AnimatePresence.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,uBAAA;AAAAC,QAAA,CAAAD,uBAAA;EAAAE,eAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAAmC,CAAAK,uBAAA;AACnC,IAAAK,kBAAA,GAAAC,OAA4B;AAC5B,IAAAC,YAAA,GAAAD,OAAA,QAA+B;AAE/B,IAAAE,mBAAgF,GAAAF,OAAA;AAChF,IAAAG,uBAAA,GAAAH,OAAmC;AACnC,IAAAI,aAAA,GAAAJ,OAA8B;AAiGnB,IAAAK,yBAAA,GAAAL,OAAA;AA5FX,IAAAM,oBAAqB,GAAAN,OAA2C;AAC9D,SACEO,QAAMA,CAAAC,GAAA,EACL;EAEC,uBAAiB;;EACjB,OAAAA,GAAM,WAAAC,MAAiB,gBAAkB,IAAGD,GAAA,CAAAE,WAAW,KAAAD,MAAA,qBAAAD,GAAA;AACvD;AAEE,IAAAG,WAAO,GAAG,SAAAA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QAEC;QACA,IAAAA,mBAAU;UACVzB,WAAQ,SAAY,IAAAA,WAAU,UAAgB,SAAQ,CAAI,GAAGA,WAAK;UAClEF,mBAAA,CAAAP,sBAAA,CAAAgB,OAAA;UACA/B,cAAA,aAAAA,cAAA,uBAAAA,cAAA;QACA;MAAA;MACA,IACAmD,4BAA4B;MAAY,OAEvC,mBAAAnF,kBAAA,CAAA4D,GAAA,EAAArD,oBAAA,CAAA6E,aAAA;QAAAL,SAAA;QAVIhD,OAAA,GAAAY,eAAA,CAAAoB,OAAA,IAAAhC,OAAA;QAWPK,MAAA,EAAA2C,SAAA,GAAA3C,MAAA,IAAA+C,4BAAA,GAAAtC,eAAA,CAAAkB,OAAA,CAAAK,GAAA,CAAAF,IAAA,eAAAiB,4BAAA,cAAAA,4BAAA,GAAA/C,MAAA;QAGND,qBAAA;QAEJL,gBAAA;QAEAF,YAAgB","ignoreList":[]}
1
+ {"version":3,"file":"AnimatePresence.native.js","names":[],"sources":["cjs/AnimatePresence.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar AnimatePresence_exports = {};\n__export(AnimatePresence_exports, {\n AnimatePresence: () => AnimatePresence\n});\nmodule.exports = __toCommonJS(AnimatePresence_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_react = require(\"react\");\nvar import_use_constant = require(\"@tamagui/use-constant\");\nvar import_use_force_update = require(\"@tamagui/use-force-update\");\nvar import_react2 = require(\"react\");\nvar import_LayoutGroupContext = require(\"./LayoutGroupContext\");\nvar import_PresenceChild = require(\"./PresenceChild\");\nvar getChildKey = function(child) {\n var _child_key;\n return (_child_key = child.key) !== null && _child_key !== void 0 ? _child_key : \"\";\n};\nfunction onlyElements(children) {\n var filtered = [];\n import_react2.Children.forEach(children, function(child) {\n if (/* @__PURE__ */ (0, import_react2.isValidElement)(child)) filtered.push(child);\n });\n return filtered;\n}\nvar AnimatePresence = function(param) {\n var { children, initial = true, onExitComplete, mode = \"sync\", presenceAffectsLayout = true, custom, passThrough } = param;\n var presentChildren = (0, import_react2.useMemo)(function() {\n return onlyElements(children);\n }, [\n children\n ]);\n var presentKeys = presentChildren.map(getChildKey);\n var isInitialRender = (0, import_react2.useRef)(true);\n var frozenCustomRef = (0, import_react2.useRef)(/* @__PURE__ */ new Map());\n var pendingPresentChildren = (0, import_react2.useRef)(presentChildren);\n var exitComplete = (0, import_use_constant.useConstant)(function() {\n return /* @__PURE__ */ new Map();\n });\n var [diffedChildren, setDiffedChildren] = (0, import_react2.useState)(presentChildren);\n var [renderedChildren, setRenderedChildren] = (0, import_react2.useState)(presentChildren);\n var _useContext_forceRender;\n var forceRender = (_useContext_forceRender = (0, import_react2.useContext)(import_LayoutGroupContext.LayoutGroupContext).forceRender) !== null && _useContext_forceRender !== void 0 ? _useContext_forceRender : (0, import_use_force_update.useForceUpdate)();\n if (passThrough) {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {\n children\n });\n }\n (0, import_react.useInsertionEffect)(function() {\n isInitialRender.current = false;\n pendingPresentChildren.current = presentChildren;\n for (var i2 = 0; i2 < renderedChildren.length; i2++) {\n var key2 = getChildKey(renderedChildren[i2]);\n if (!presentKeys.includes(key2)) {\n if (exitComplete.get(key2) !== true) {\n exitComplete.set(key2, false);\n }\n } else {\n exitComplete.delete(key2);\n frozenCustomRef.current.delete(key2);\n }\n }\n }, [\n renderedChildren,\n presentKeys.length,\n presentKeys.join(\"-\")\n ]);\n if (presentChildren !== diffedChildren) {\n var nextChildren = [\n ...presentChildren\n ];\n for (var i = 0; i < renderedChildren.length; i++) {\n var child = renderedChildren[i];\n var key = getChildKey(child);\n if (!presentKeys.includes(key)) {\n nextChildren.splice(i, 0, child);\n if (!frozenCustomRef.current.has(key)) {\n frozenCustomRef.current.set(key, custom);\n }\n }\n }\n var exitingChildren = renderedChildren.filter(function(child2) {\n return !presentKeys.includes(getChildKey(child2));\n });\n if (mode === \"wait\" && exitingChildren.length) {\n nextChildren = exitingChildren;\n }\n setRenderedChildren(onlyElements(nextChildren));\n setDiffedChildren(presentChildren);\n return null;\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {\n children: renderedChildren.map(function(child2) {\n var key2 = getChildKey(child2);\n var isPresent = presentChildren === renderedChildren || presentKeys.includes(key2);\n var onExit = function() {\n if (exitComplete.has(key2)) {\n exitComplete.set(key2, true);\n } else {\n return;\n }\n var isEveryExitComplete = true;\n exitComplete.forEach(function(isExitComplete) {\n if (!isExitComplete) isEveryExitComplete = false;\n });\n if (isEveryExitComplete) {\n forceRender === null || forceRender === void 0 ? void 0 : forceRender();\n setRenderedChildren(pendingPresentChildren.current);\n onExitComplete === null || onExitComplete === void 0 ? void 0 : onExitComplete();\n }\n };\n var _frozenCustomRef_current_get;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_PresenceChild.PresenceChild, {\n isPresent,\n initial: !isInitialRender.current || initial ? void 0 : false,\n custom: isPresent ? custom : (_frozenCustomRef_current_get = frozenCustomRef.current.get(key2)) !== null && _frozenCustomRef_current_get !== void 0 ? _frozenCustomRef_current_get : custom,\n presenceAffectsLayout,\n onExitComplete: isPresent ? void 0 : onExit,\n children: child2\n }, key2);\n })\n });\n};\nAnimatePresence.displayName = \"AnimatePresence\";\n//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KAAK,IAAI,KAAK,IAAI,YAAY;IACtE,oBAAoB,uBAAuB,OAAO;IAClD,mBAAmB,QAAQ,mBAAmB,KAAK,IAAI,KAAK,IAAI,eAAe;GACjF;EACF;EACA,IAAI;EACJ,OAAuB,iBAAC,GAAG,mBAAmB,KAAK,qBAAqB,eAAe;GACrF;GACA,SAAS,CAAC,gBAAgB,WAAW,UAAU,KAAK,IAAI;GACxD,QAAQ,YAAY,UAAU,+BAA+B,gBAAgB,QAAQ,IAAI,IAAI,OAAO,QAAQ,iCAAiC,KAAK,IAAI,+BAA+B;GACrL;GACA,gBAAgB,YAAY,KAAK,IAAI;GACrC,UAAU;EACZ,GAAG,IAAI;CACT,CAAC,EACH,CAAC;AACH;AACA,gBAAgB,cAAc"}
@@ -1,3 +1,4 @@
1
+
1
2
  var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -5,36 +6,27 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
5
6
  var __getProtoOf = Object.getPrototypeOf;
6
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
8
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: true
11
- });
9
+ for (var name in all) __defProp(target, name, {
10
+ get: all[name],
11
+ enumerable: true
12
+ });
12
13
  };
13
14
  var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
- get: () => from[key],
17
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
- });
19
- }
20
- return to;
15
+ if (from && typeof from === "object" || typeof from === "function") {
16
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
17
+ get: () => from[key],
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ }
21
+ return to;
21
22
  };
22
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
- // If the importer is in node compatibility mode or this is not an ESM
24
- // file that has been converted to a CommonJS file using a Babel-
25
- // compatible transform (i.e. "__esModule" has not been set), then set
26
- // "default" to the CommonJS "module.exports" for node compatibility.
27
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
28
- value: mod,
29
- enumerable: true
23
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
24
+ value: mod,
25
+ enumerable: true
30
26
  }) : target, mod));
31
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
32
- value: true
33
- }), mod);
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
34
28
  var LayoutGroupContext_exports = {};
35
- __export(LayoutGroupContext_exports, {
36
- LayoutGroupContext: () => LayoutGroupContext
37
- });
29
+ __export(LayoutGroupContext_exports, { LayoutGroupContext: () => LayoutGroupContext });
38
30
  module.exports = __toCommonJS(LayoutGroupContext_exports);
39
31
  var import_react = __toESM(require("react"), 1);
40
- const LayoutGroupContext = import_react.default.createContext({});
32
+ const LayoutGroupContext = import_react.default.createContext({});
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+
3
+
4
+ var __create = Object.create;
5
+ var __defProp = Object.defineProperty;
6
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
+ var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getProtoOf = Object.getPrototypeOf;
9
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __export = (target, all) => {
11
+ for (var name in all) __defProp(target, name, {
12
+ get: all[name],
13
+ enumerable: true
14
+ });
15
+ };
16
+ var __copyProps = (to, from, except, desc) => {
17
+ if (from && typeof from === "object" || typeof from === "function") {
18
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
19
+ get: () => from[key],
20
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
21
+ });
22
+ }
23
+ return to;
24
+ };
25
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
26
+ value: mod,
27
+ enumerable: true
28
+ }) : target, mod));
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+ var LayoutGroupContext_exports = {};
31
+ __export(LayoutGroupContext_exports, { LayoutGroupContext: () => LayoutGroupContext });
32
+ module.exports = __toCommonJS(LayoutGroupContext_exports);
33
+ var import_react = __toESM(require("react"), 1);
34
+ var LayoutGroupContext = /* @__PURE__ */ import_react.default.createContext({});
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+
3
4
  var __create = Object.create;
4
5
  var __defProp = Object.defineProperty;
5
6
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -7,37 +8,29 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
7
8
  var __getProtoOf = Object.getPrototypeOf;
8
9
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
10
  var __export = (target, all) => {
10
- for (var name in all) __defProp(target, name, {
11
- get: all[name],
12
- enumerable: true
13
- });
11
+ for (var name in all) __defProp(target, name, {
12
+ get: all[name],
13
+ enumerable: true
14
+ });
14
15
  };
15
16
  var __copyProps = (to, from, except, desc) => {
16
- if (from && typeof from === "object" || typeof from === "function") {
17
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
18
- get: () => from[key],
19
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
20
- });
21
- }
22
- return to;
17
+ if (from && typeof from === "object" || typeof from === "function") {
18
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
19
+ get: () => from[key],
20
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
21
+ });
22
+ }
23
+ return to;
23
24
  };
24
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
25
- // If the importer is in node compatibility mode or this is not an ESM
26
- // file that has been converted to a CommonJS file using a Babel-
27
- // compatible transform (i.e. "__esModule" has not been set), then set
28
- // "default" to the CommonJS "module.exports" for node compatibility.
29
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
30
- value: mod,
31
- enumerable: true
25
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
26
+ value: mod,
27
+ enumerable: true
32
28
  }) : target, mod));
33
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
34
- value: true
35
- }), mod);
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
36
30
  var LayoutGroupContext_exports = {};
37
- __export(LayoutGroupContext_exports, {
38
- LayoutGroupContext: () => LayoutGroupContext
39
- });
31
+ __export(LayoutGroupContext_exports, { LayoutGroupContext: () => LayoutGroupContext });
40
32
  module.exports = __toCommonJS(LayoutGroupContext_exports);
41
33
  var import_react = __toESM(require("react"), 1);
42
- var LayoutGroupContext = /* @__PURE__ */import_react.default.createContext({});
34
+ var LayoutGroupContext = /* @__PURE__ */ import_react.default.createContext({});
35
+
43
36
  //# sourceMappingURL=LayoutGroupContext.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","LayoutGroupContext_exports","__export","LayoutGroupContext","module","exports","import_react","__toESM","require"],"sources":["../../src/LayoutGroupContext.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,0BAAA;AAAAC,QAAA,CAAAD,0BAAA;EAAAE,kBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAAkB,CAAAK,0BAAA;AAOX,IAAAK,YAAM,GAAAC,OAAA,CAAqBC,OAAA","ignoreList":[]}
1
+ {"version":3,"file":"LayoutGroupContext.native.js","names":[],"sources":["cjs/LayoutGroupContext.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar LayoutGroupContext_exports = {};\n__export(LayoutGroupContext_exports, {\n LayoutGroupContext: () => LayoutGroupContext\n});\nmodule.exports = __toCommonJS(LayoutGroupContext_exports);\nvar import_react = __toESM(require(\"react\"), 1);\nvar LayoutGroupContext = /* @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