@tamagui/animate-presence 2.0.0-rc.8 → 2.0.0

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 (49) hide show
  1. package/dist/cjs/AnimatePresence.cjs +112 -91
  2. package/dist/cjs/AnimatePresence.native.js +127 -106
  3. package/dist/cjs/AnimatePresence.native.js.map +1 -1
  4. package/dist/cjs/LayoutGroupContext.cjs +24 -22
  5. package/dist/cjs/LayoutGroupContext.native.js +26 -24
  6. package/dist/cjs/LayoutGroupContext.native.js.map +1 -1
  7. package/dist/cjs/PresenceChild.cjs +58 -45
  8. package/dist/cjs/PresenceChild.native.js +103 -91
  9. package/dist/cjs/PresenceChild.native.js.map +1 -1
  10. package/dist/cjs/index.cjs +7 -5
  11. package/dist/cjs/index.native.js +7 -5
  12. package/dist/cjs/index.native.js.map +1 -1
  13. package/dist/cjs/types.cjs +7 -5
  14. package/dist/cjs/types.native.js +7 -5
  15. package/dist/cjs/types.native.js.map +1 -1
  16. package/dist/esm/AnimatePresence.mjs +96 -77
  17. package/dist/esm/AnimatePresence.mjs.map +1 -1
  18. package/dist/esm/AnimatePresence.native.js +111 -92
  19. package/dist/esm/AnimatePresence.native.js.map +1 -1
  20. package/dist/esm/PresenceChild.mjs +29 -18
  21. package/dist/esm/PresenceChild.mjs.map +1 -1
  22. package/dist/esm/PresenceChild.native.js +60 -50
  23. package/dist/esm/PresenceChild.native.js.map +1 -1
  24. package/dist/esm/index.js +3 -3
  25. package/dist/esm/index.js.map +1 -6
  26. package/package.json +11 -14
  27. package/src/AnimatePresence.tsx +150 -143
  28. package/src/types.ts +10 -9
  29. package/types/AnimatePresence.d.ts.map +1 -1
  30. package/types/types.d.ts +9 -9
  31. package/types/types.d.ts.map +1 -1
  32. package/dist/cjs/AnimatePresence.js +0 -121
  33. package/dist/cjs/AnimatePresence.js.map +0 -6
  34. package/dist/cjs/LayoutGroupContext.js +0 -30
  35. package/dist/cjs/LayoutGroupContext.js.map +0 -6
  36. package/dist/cjs/PresenceChild.js +0 -77
  37. package/dist/cjs/PresenceChild.js.map +0 -6
  38. package/dist/cjs/index.js +0 -18
  39. package/dist/cjs/index.js.map +0 -6
  40. package/dist/cjs/types.js +0 -14
  41. package/dist/cjs/types.js.map +0 -6
  42. package/dist/esm/AnimatePresence.js +0 -110
  43. package/dist/esm/AnimatePresence.js.map +0 -6
  44. package/dist/esm/LayoutGroupContext.js +0 -6
  45. package/dist/esm/LayoutGroupContext.js.map +0 -6
  46. package/dist/esm/PresenceChild.js +0 -57
  47. package/dist/esm/PresenceChild.js.map +0 -6
  48. package/dist/esm/types.js +0 -1
  49. package/dist/esm/types.js.map +0 -6
@@ -3,126 +3,147 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: !0
9
- });
10
- },
11
- __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
13
14
  get: () => from[key],
14
15
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
16
  });
16
- return to;
17
- };
17
+ }
18
+ return to;
19
+ };
18
20
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
- value: !0
21
+ value: true
20
22
  }), mod);
21
23
  var AnimatePresence_exports = {};
22
24
  __export(AnimatePresence_exports, {
23
25
  AnimatePresence: () => AnimatePresence
24
26
  });
25
27
  module.exports = __toCommonJS(AnimatePresence_exports);
26
- var import_constants = require("@tamagui/constants"),
27
- import_use_force_update = require("@tamagui/use-force-update"),
28
- import_react = require("react"),
29
- import_LayoutGroupContext = require("./LayoutGroupContext.cjs"),
30
- import_PresenceChild = require("./PresenceChild.cjs"),
31
- import_jsx_runtime = require("react/jsx-runtime");
32
- const getChildKey = child => child.key || (() => {
33
- const ct = child.type,
34
- defaultName = ct.displayName || ct.name || "";
35
- return ct && typeof ct == "object" && "staticConfig" in ct && ct.staticConfig.componentName || defaultName;
36
- })();
37
- function updateChildLookup(children, allChildren) {
38
- children.forEach(child => {
39
- const key = getChildKey(child);
40
- allChildren.set(key, child);
41
- });
42
- }
28
+ var import_react = require("react");
29
+ var import_use_constant = require("@tamagui/use-constant");
30
+ var import_use_force_update = require("@tamagui/use-force-update");
31
+ var import_react2 = require("react");
32
+ var import_LayoutGroupContext = require("./LayoutGroupContext.cjs");
33
+ var import_PresenceChild = require("./PresenceChild.cjs");
34
+ var import_jsx_runtime = require("react/jsx-runtime");
35
+ const getChildKey = child => {
36
+ return child.key || (() => {
37
+ const ct = child.type;
38
+ const defaultName = ct["displayName"] || ct["name"] || "";
39
+ if (ct && typeof ct === "object" && "staticConfig" in ct) {
40
+ return ct.staticConfig.componentName || defaultName;
41
+ }
42
+ return defaultName;
43
+ })();
44
+ };
43
45
  function onlyElements(children) {
44
46
  const filtered = [];
45
- return import_react.Children.forEach(children, child => {
46
- (0, import_react.isValidElement)(child) && filtered.push(child);
47
- }), filtered;
47
+ import_react2.Children.forEach(children, child => {
48
+ if ((0, import_react2.isValidElement)(child)) filtered.push(child);
49
+ });
50
+ return filtered;
48
51
  }
49
52
  const AnimatePresence = ({
50
53
  children,
51
54
  enterVariant,
52
55
  exitVariant,
53
56
  enterExitVariant,
54
- initial = !0,
57
+ initial = true,
55
58
  onExitComplete,
56
59
  exitBeforeEnter,
57
- presenceAffectsLayout = !0,
60
+ mode,
61
+ presenceAffectsLayout = true,
58
62
  custom,
59
63
  passThrough
60
64
  }) => {
61
- let forceRender = (0, import_react.useContext)(import_LayoutGroupContext.LayoutGroupContext).forceRender ?? (0, import_use_force_update.useForceUpdate)();
62
- const filteredChildren = onlyElements(children),
63
- presentChildren = (0, import_react.useRef)(filteredChildren),
64
- allChildren = (0, import_react.useRef)(/* @__PURE__ */new Map()).current,
65
- exiting = (0, import_react.useRef)(/* @__PURE__ */new Set()).current;
66
- updateChildLookup(filteredChildren, allChildren);
67
- const isInitialRender = (0, import_react.useRef)(!0);
68
- if (passThrough) return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
69
- children
70
- });
71
- if ((0, import_constants.useIsomorphicLayoutEffect)(() => {
72
- isInitialRender.current = !1;
73
- }, []), isInitialRender.current) return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
74
- children: filteredChildren.map(child => /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_PresenceChild.PresenceChild, {
75
- isPresent: !0,
76
- enterExitVariant,
77
- exitVariant,
78
- enterVariant,
79
- initial: initial ? void 0 : !1,
80
- presenceAffectsLayout,
81
- custom,
82
- children: child
83
- }, getChildKey(child)))
84
- });
85
- let childrenToRender = [...filteredChildren];
86
- const presentKeys = presentChildren.current.map(getChildKey),
87
- targetKeys = filteredChildren.map(getChildKey),
88
- numPresent = presentKeys.length;
89
- for (let i = 0; i < numPresent; i++) {
90
- const key = presentKeys[i];
91
- targetKeys.indexOf(key) === -1 ? exiting.add(key) : exiting.delete(key);
65
+ const effectiveMode = mode ?? (exitBeforeEnter ? "wait" : "sync");
66
+ const presentChildren = (0, import_react2.useMemo)(() => onlyElements(children), [children]);
67
+ const presentKeys = presentChildren.map(getChildKey);
68
+ const isInitialRender = (0, import_react2.useRef)(true);
69
+ const frozenCustomRef = (0, import_react2.useRef)(/* @__PURE__ */new Map());
70
+ const pendingPresentChildren = (0, import_react2.useRef)(presentChildren);
71
+ const exitComplete = (0, import_use_constant.useConstant)(() => /* @__PURE__ */new Map());
72
+ const [diffedChildren, setDiffedChildren] = (0, import_react2.useState)(presentChildren);
73
+ const [renderedChildren, setRenderedChildren] = (0, import_react2.useState)(presentChildren);
74
+ const forceRender = (0, import_react2.useContext)(import_LayoutGroupContext.LayoutGroupContext).forceRender ?? (0, import_use_force_update.useForceUpdate)();
75
+ if (passThrough) {
76
+ return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
77
+ children
78
+ });
79
+ }
80
+ (0, import_react.useInsertionEffect)(() => {
81
+ isInitialRender.current = false;
82
+ pendingPresentChildren.current = presentChildren;
83
+ for (let i = 0; i < renderedChildren.length; i++) {
84
+ const key = getChildKey(renderedChildren[i]);
85
+ if (!presentKeys.includes(key)) {
86
+ if (exitComplete.get(key) !== true) {
87
+ exitComplete.set(key, false);
88
+ }
89
+ } else {
90
+ exitComplete.delete(key);
91
+ frozenCustomRef.current.delete(key);
92
+ }
93
+ }
94
+ }, [renderedChildren, presentKeys.length, presentKeys.join("-")]);
95
+ if (presentChildren !== diffedChildren) {
96
+ let nextChildren = [...presentChildren];
97
+ for (let i = 0; i < renderedChildren.length; i++) {
98
+ const child = renderedChildren[i];
99
+ const key = getChildKey(child);
100
+ if (!presentKeys.includes(key)) {
101
+ nextChildren.splice(i, 0, child);
102
+ if (!frozenCustomRef.current.has(key)) {
103
+ frozenCustomRef.current.set(key, custom);
104
+ }
105
+ }
106
+ }
107
+ const exitingChildren = renderedChildren.filter(child => !presentKeys.includes(getChildKey(child)));
108
+ if (effectiveMode === "wait" && exitingChildren.length) {
109
+ nextChildren = exitingChildren;
110
+ }
111
+ setRenderedChildren(onlyElements(nextChildren));
112
+ setDiffedChildren(presentChildren);
113
+ return null;
92
114
  }
93
- return exitBeforeEnter && exiting.size && (childrenToRender = []), exiting.forEach(key => {
94
- if (targetKeys.indexOf(key) !== -1) return;
95
- const child = allChildren.get(key);
96
- if (!child) return;
97
- const insertionIndex = presentKeys.indexOf(key),
98
- exitingComponent = /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_PresenceChild.PresenceChild, {
99
- isPresent: !1,
100
- onExitComplete: () => {
101
- allChildren.delete(key), exiting.delete(key);
102
- const removeIndex = presentChildren.current.findIndex(presentChild => presentChild.key === key);
103
- presentChildren.current.splice(removeIndex, 1), exiting.size || (presentChildren.current = filteredChildren, forceRender(), onExitComplete?.());
104
- },
115
+ return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
116
+ children: renderedChildren.map(child => {
117
+ const key = getChildKey(child);
118
+ const isPresent = presentChildren === renderedChildren || presentKeys.includes(key);
119
+ const onExit = () => {
120
+ if (exitComplete.has(key)) {
121
+ exitComplete.set(key, true);
122
+ } else {
123
+ return;
124
+ }
125
+ let isEveryExitComplete = true;
126
+ exitComplete.forEach(isExitComplete => {
127
+ if (!isExitComplete) isEveryExitComplete = false;
128
+ });
129
+ if (isEveryExitComplete) {
130
+ forceRender?.();
131
+ setRenderedChildren(pendingPresentChildren.current);
132
+ onExitComplete?.();
133
+ }
134
+ };
135
+ return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_PresenceChild.PresenceChild, {
136
+ isPresent,
137
+ initial: !isInitialRender.current || initial ? void 0 : false,
138
+ custom: isPresent ? custom : frozenCustomRef.current.get(key) ?? custom,
105
139
  presenceAffectsLayout,
106
140
  enterExitVariant,
107
141
  enterVariant,
108
142
  exitVariant,
109
- custom,
143
+ onExitComplete: isPresent ? void 0 : onExit,
110
144
  children: child
111
- }, getChildKey(child));
112
- childrenToRender.splice(insertionIndex, 0, exitingComponent);
113
- }), childrenToRender = childrenToRender.map(child => {
114
- const key = child.key;
115
- return exiting.has(key) ? child : /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_PresenceChild.PresenceChild, {
116
- isPresent: !0,
117
- exitVariant,
118
- enterVariant,
119
- enterExitVariant,
120
- presenceAffectsLayout,
121
- custom,
122
- children: child
123
- }, getChildKey(child));
124
- }), presentChildren.current = childrenToRender, /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
125
- children: exiting.size ? childrenToRender : childrenToRender.map(child => (0, import_react.cloneElement)(child))
145
+ }, key);
146
+ })
126
147
  });
127
148
  };
128
149
  AnimatePresence.displayName = "AnimatePresence";
@@ -5,139 +5,160 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
+ };
13
+ 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, {
15
16
  get: () => from[key],
16
17
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
18
  });
18
- return to;
19
- };
19
+ }
20
+ return to;
21
+ };
20
22
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: !0
23
+ value: true
22
24
  }), mod);
23
25
  var AnimatePresence_exports = {};
24
26
  __export(AnimatePresence_exports, {
25
27
  AnimatePresence: () => AnimatePresence
26
28
  });
27
29
  module.exports = __toCommonJS(AnimatePresence_exports);
28
- var import_jsx_runtime = require("react/jsx-runtime"),
29
- import_constants = require("@tamagui/constants"),
30
- import_use_force_update = require("@tamagui/use-force-update"),
31
- import_react = require("react"),
32
- import_LayoutGroupContext = require("./LayoutGroupContext.native.js"),
33
- import_PresenceChild = require("./PresenceChild.native.js");
30
+ var import_jsx_runtime = require("react/jsx-runtime");
31
+ var import_react = require("react");
32
+ var import_use_constant = require("@tamagui/use-constant");
33
+ var import_use_force_update = require("@tamagui/use-force-update");
34
+ var import_react2 = require("react");
35
+ var import_LayoutGroupContext = require("./LayoutGroupContext.native.js");
36
+ var import_PresenceChild = require("./PresenceChild.native.js");
34
37
  function _type_of(obj) {
35
38
  "@swc/helpers - typeof";
36
39
 
37
- return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
40
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
38
41
  }
39
42
  var getChildKey = function (child) {
40
43
  return child.key || function () {
41
- var ct = child.type,
42
- defaultName = ct.displayName || ct.name || "";
43
- return ct && (typeof ct > "u" ? "undefined" : _type_of(ct)) === "object" && "staticConfig" in ct && ct.staticConfig.componentName || defaultName;
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;
44
50
  }();
45
51
  };
46
- function updateChildLookup(children, allChildren) {
47
- children.forEach(function (child) {
48
- var key = getChildKey(child);
49
- allChildren.set(key, child);
50
- });
51
- }
52
52
  function onlyElements(children) {
53
53
  var filtered = [];
54
- return import_react.Children.forEach(children, function (child) {
55
- /* @__PURE__ */(0, import_react.isValidElement)(child) && filtered.push(child);
56
- }), filtered;
54
+ import_react2.Children.forEach(children, function (child) {
55
+ if (/* @__PURE__ */(0, import_react2.isValidElement)(child)) filtered.push(child);
56
+ });
57
+ return filtered;
57
58
  }
58
59
  var AnimatePresence = function (param) {
59
60
  var {
60
- children,
61
- enterVariant,
62
- exitVariant,
63
- enterExitVariant,
64
- initial = !0,
65
- onExitComplete,
66
- exitBeforeEnter,
67
- presenceAffectsLayout = !0,
68
- custom,
69
- passThrough
70
- } = param,
71
- _useContext_forceRender,
72
- forceRender = (_useContext_forceRender = (0, import_react.useContext)(import_LayoutGroupContext.LayoutGroupContext).forceRender) !== null && _useContext_forceRender !== void 0 ? _useContext_forceRender : (0, import_use_force_update.useForceUpdate)(),
73
- filteredChildren = onlyElements(children),
74
- presentChildren = (0, import_react.useRef)(filteredChildren),
75
- allChildren = (0, import_react.useRef)(/* @__PURE__ */new Map()).current,
76
- exiting = (0, import_react.useRef)(/* @__PURE__ */new Set()).current;
77
- updateChildLookup(filteredChildren, allChildren);
78
- var isInitialRender = (0, import_react.useRef)(!0);
79
- if (passThrough) return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
80
- children
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();
81
83
  });
82
- if ((0, import_constants.useIsomorphicLayoutEffect)(function () {
83
- isInitialRender.current = !1;
84
- }, []), isInitialRender.current) return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
85
- children: filteredChildren.map(function (child) {
86
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_PresenceChild.PresenceChild, {
87
- isPresent: !0,
88
- enterExitVariant,
89
- exitVariant,
90
- enterVariant,
91
- initial: initial ? void 0 : !1,
92
- presenceAffectsLayout,
93
- custom,
94
- children: child
95
- }, getChildKey(child));
96
- })
97
- });
98
- for (var childrenToRender = [...filteredChildren], presentKeys = presentChildren.current.map(getChildKey), targetKeys = filteredChildren.map(getChildKey), numPresent = presentKeys.length, i = 0; i < numPresent; i++) {
99
- var key = presentKeys[i];
100
- targetKeys.indexOf(key) === -1 ? exiting.add(key) : exiting.delete(key);
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
+ });
101
92
  }
102
- return exitBeforeEnter && exiting.size && (childrenToRender = []), exiting.forEach(function (key2) {
103
- if (targetKeys.indexOf(key2) === -1) {
104
- var child = allChildren.get(key2);
105
- if (child) {
106
- var insertionIndex = presentKeys.indexOf(key2),
107
- onExit = function () {
108
- allChildren.delete(key2), exiting.delete(key2);
109
- var removeIndex = presentChildren.current.findIndex(function (presentChild) {
110
- return presentChild.key === key2;
111
- });
112
- presentChildren.current.splice(removeIndex, 1), exiting.size || (presentChildren.current = filteredChildren, forceRender(), onExitComplete?.());
113
- },
114
- exitingComponent = /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_PresenceChild.PresenceChild, {
115
- isPresent: !1,
116
- onExitComplete: onExit,
117
- presenceAffectsLayout,
118
- enterExitVariant,
119
- enterVariant,
120
- exitVariant,
121
- custom,
122
- children: child
123
- }, getChildKey(child));
124
- childrenToRender.splice(insertionIndex, 0, exitingComponent);
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);
125
105
  }
126
106
  }
127
- }), childrenToRender = childrenToRender.map(function (child) {
128
- var key2 = child.key;
129
- return exiting.has(key2) ? child : /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_PresenceChild.PresenceChild, {
130
- isPresent: !0,
131
- exitVariant,
132
- enterVariant,
133
- enterExitVariant,
134
- presenceAffectsLayout,
135
- custom,
136
- children: child
137
- }, getChildKey(child));
138
- }), presentChildren.current = childrenToRender, /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
139
- children: exiting.size ? childrenToRender : childrenToRender.map(function (child) {
140
- return /* @__PURE__ */(0, import_react.cloneElement)(child);
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);
141
162
  })
142
163
  });
143
164
  };
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","AnimatePresence_exports","__export","AnimatePresence","module","exports","import_jsx_runtime","require","import_constants","import_use_force_update","import_react","import_LayoutGroupContext","import_PresenceChild","_type_of","obj","Symbol","constructor","getChildKey","child","key","ct","type","defaultName","displayName","name","staticConfig","componentName","updateChildLookup","children","allChildren","forEach","set","onlyElements","filtered","Children","isValidElement","push","param","enterVariant","exitVariant","enterExitVariant","initial","onExitComplete","exitBeforeEnter","presenceAffectsLayout","custom","passThrough","_useContext_forceRender","forceRender","useContext","LayoutGroupContext","useForceUpdate","filteredChildren","presentChildren","useRef","Map","current","exiting","Set","isInitialRender","jsx","Fragment","useIsomorphicLayoutEffect","map","PresenceChild","isPresent","childrenToRender","presentKeys","targetKeys","numPresent","length","i","indexOf","add","delete","size","key2","get","insertionIndex","onExit","removeIndex","findIndex","presentChild","splice","exitingComponent","has","cloneElement"],"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,YAA0C,CAAAK,uBAAA,CAC1C;AASA,IAAAK,kBAAqB,GAAAC,OAEjB,oBACO;EAAAC,gBAAA,GAAAD,OAAA;EAAAE,uBAAA,GAAAF,OAAA;EAAAG,YAAA,GAAAH,OAAA;EAAAI,yBAAA,GAAAJ,OAAA;EAAAK,oBAAA,GAAAL,OAAA;AAEL,SAAMM,QAAKA,CAAAC,GAAM;EAEjB,uBAAiB;;EAKnB,OAAGA,GAAA,WAAAC,MAAA,UAAAD,GAAA,CAAAE,WAAA,KAAAD,MAAA,qBAAAD,GAAA;AAIP;AAIE,IAAAG,WAAS,YAAAA,CAASC,KAAU;EAC1B,OAAAA,KAAM,CAAAC,GAAM,gBAAiB;IAC7B,IAAAC,EAAA,GAAAF,KAAY,CAAAG,IAAI;MAAKC,WAAK,GAAAF,EAAA,CAAAG,WAAA,IAAAH,EAAA,CAAAI,IAAA;IAC3B,OAAAJ,EAAA,YAAAA,EAAA,uBAAAP,QAAA,CAAAO,EAAA,qCAAAA,EAAA,IAAAA,EAAA,CAAAK,YAAA,CAAAC,aAAA,IAAAJ,WAAA;EACH;AAEA;AACE,SAAMK,iBAAiCA,CAAAC,QAAA,EAAAC,WAAA;EAEvCD,QAAA,CAAAE,OAAA,WAAAZ,KAAS;IACP,IAAIC,GAAA,GAAAF,WAAA,CAAAC,KAAA;IACLW,WACM,CAAAE,GAAA,CAAAZ,GAAA,EAAAD,KAA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oreList":[]}
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;EA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,YAAA,CAAAqB,GAAA,CAAAH,IAAoB;QACpB;UACF;QACF;QAEA,IACEe,mBAAA;QAACjC,YAAA,CAAAxB,OAAA,WAAA0D,cAAA;UAAA,KAAAA,cAAA,EAAAD,mBAAA;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":[]}
@@ -2,33 +2,35 @@ var __create = Object.create;
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf,
6
- __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
+ };
13
+ 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, {
15
16
  get: () => from[key],
16
17
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
18
  });
18
- return to;
19
- };
19
+ }
20
+ return to;
21
+ };
20
22
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
26
- value: mod,
27
- enumerable: !0
28
- }) : target, mod)),
29
- __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
30
- value: !0
31
- }), mod);
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
30
+ }) : target, mod));
31
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
32
+ value: true
33
+ }), mod);
32
34
  var LayoutGroupContext_exports = {};
33
35
  __export(LayoutGroupContext_exports, {
34
36
  LayoutGroupContext: () => LayoutGroupContext