@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,18 +1,17 @@
1
+
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
6
  var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from === "object" || typeof from === "function") {
7
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
8
- get: () => from[key],
9
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
10
- });
11
- }
12
- return to;
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
9
+ get: () => from[key],
10
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
11
+ });
12
+ }
13
+ return to;
13
14
  };
14
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
15
- value: true
16
- }), mod);
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
17
16
  var types_exports = {};
18
- module.exports = __toCommonJS(types_exports);
17
+ module.exports = __toCommonJS(types_exports);
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
11
+ get: () => from[key],
12
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
13
+ });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var types_exports = {};
19
+ module.exports = __toCommonJS(types_exports);
@@ -1,21 +1,21 @@
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 __copyProps = (to, from, except, desc) => {
8
- if (from && typeof from === "object" || typeof from === "function") {
9
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
10
- get: () => from[key],
11
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
12
- });
13
- }
14
- return to;
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
11
+ get: () => from[key],
12
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
13
+ });
14
+ }
15
+ return to;
15
16
  };
16
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
17
- value: true
18
- }), mod);
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
18
  var types_exports = {};
20
19
  module.exports = __toCommonJS(types_exports);
20
+
21
21
  //# sourceMappingURL=types.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","types_exports"],"sources":["../../src/types.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA","ignoreList":[]}
1
+ {"version":3,"file":"types.native.js","names":[],"sources":["cjs/types.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\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 types_exports = {};\nmodule.exports = __toCommonJS(types_exports);\n//# sourceMappingURL=types.js.map\n"],"mappings":";;;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,gBAAgB,CAAC;AACrB,OAAO,UAAU,aAAa,aAAa"}
@@ -1,124 +1,102 @@
1
- import { useInsertionEffect } from "react";
1
+ import { Children, isValidElement, useContext, useInsertionEffect, useMemo, useRef, useState } from "react";
2
2
  import { useConstant } from "@tamagui/use-constant";
3
3
  import { useForceUpdate } from "@tamagui/use-force-update";
4
- import { Children, isValidElement, useContext, useMemo, useRef, useState } from "react";
5
4
  import { LayoutGroupContext } from "./LayoutGroupContext.mjs";
6
5
  import { PresenceChild } from "./PresenceChild.mjs";
7
6
  import { Fragment, jsx } from "react/jsx-runtime";
8
- const getChildKey = child => {
9
- return child.key || (() => {
10
- const ct = child.type;
11
- const defaultName = ct["displayName"] || ct["name"] || "";
12
- if (ct && typeof ct === "object" && "staticConfig" in ct) {
13
- return ct.staticConfig.componentName || defaultName;
14
- }
15
- return defaultName;
16
- })();
7
+
8
+ const getChildKey = (child) => {
9
+ return child.key ?? "";
17
10
  };
18
11
  function onlyElements(children) {
19
- const filtered = [];
20
- Children.forEach(children, child => {
21
- if (isValidElement(child)) filtered.push(child);
22
- });
23
- return filtered;
12
+ const filtered = [];
13
+ Children.forEach(children, (child) => {
14
+ if (isValidElement(child)) filtered.push(child);
15
+ });
16
+ return filtered;
24
17
  }
25
- const AnimatePresence = ({
26
- children,
27
- enterVariant,
28
- exitVariant,
29
- enterExitVariant,
30
- initial = true,
31
- onExitComplete,
32
- exitBeforeEnter,
33
- mode,
34
- presenceAffectsLayout = true,
35
- custom,
36
- passThrough
37
- }) => {
38
- const effectiveMode = mode ?? (exitBeforeEnter ? "wait" : "sync");
39
- const presentChildren = useMemo(() => onlyElements(children), [children]);
40
- const presentKeys = presentChildren.map(getChildKey);
41
- const isInitialRender = useRef(true);
42
- const frozenCustomRef = useRef(/* @__PURE__ */new Map());
43
- const pendingPresentChildren = useRef(presentChildren);
44
- const exitComplete = useConstant(() => /* @__PURE__ */new Map());
45
- const [diffedChildren, setDiffedChildren] = useState(presentChildren);
46
- const [renderedChildren, setRenderedChildren] = useState(presentChildren);
47
- const forceRender = useContext(LayoutGroupContext).forceRender ?? useForceUpdate();
48
- if (passThrough) {
49
- return /* @__PURE__ */jsx(Fragment, {
50
- children
51
- });
52
- }
53
- useInsertionEffect(() => {
54
- isInitialRender.current = false;
55
- pendingPresentChildren.current = presentChildren;
56
- for (let i = 0; i < renderedChildren.length; i++) {
57
- const key = getChildKey(renderedChildren[i]);
58
- if (!presentKeys.includes(key)) {
59
- if (exitComplete.get(key) !== true) {
60
- exitComplete.set(key, false);
61
- }
62
- } else {
63
- exitComplete.delete(key);
64
- frozenCustomRef.current.delete(key);
65
- }
66
- }
67
- }, [renderedChildren, presentKeys.length, presentKeys.join("-")]);
68
- if (presentChildren !== diffedChildren) {
69
- let nextChildren = [...presentChildren];
70
- for (let i = 0; i < renderedChildren.length; i++) {
71
- const child = renderedChildren[i];
72
- const key = getChildKey(child);
73
- if (!presentKeys.includes(key)) {
74
- nextChildren.splice(i, 0, child);
75
- if (!frozenCustomRef.current.has(key)) {
76
- frozenCustomRef.current.set(key, custom);
77
- }
78
- }
79
- }
80
- const exitingChildren = renderedChildren.filter(child => !presentKeys.includes(getChildKey(child)));
81
- if (effectiveMode === "wait" && exitingChildren.length) {
82
- nextChildren = exitingChildren;
83
- }
84
- setRenderedChildren(onlyElements(nextChildren));
85
- setDiffedChildren(presentChildren);
86
- return null;
87
- }
88
- return /* @__PURE__ */jsx(Fragment, {
89
- children: renderedChildren.map(child => {
90
- const key = getChildKey(child);
91
- const isPresent = presentChildren === renderedChildren || presentKeys.includes(key);
92
- const onExit = () => {
93
- if (exitComplete.has(key)) {
94
- exitComplete.set(key, true);
95
- } else {
96
- return;
97
- }
98
- let isEveryExitComplete = true;
99
- exitComplete.forEach(isExitComplete => {
100
- if (!isExitComplete) isEveryExitComplete = false;
101
- });
102
- if (isEveryExitComplete) {
103
- forceRender?.();
104
- setRenderedChildren(pendingPresentChildren.current);
105
- onExitComplete?.();
106
- }
107
- };
108
- return /* @__PURE__ */jsx(PresenceChild, {
109
- isPresent,
110
- initial: !isInitialRender.current || initial ? void 0 : false,
111
- custom: isPresent ? custom : frozenCustomRef.current.get(key) ?? custom,
112
- presenceAffectsLayout,
113
- enterExitVariant,
114
- enterVariant,
115
- exitVariant,
116
- onExitComplete: isPresent ? void 0 : onExit,
117
- children: child
118
- }, key);
119
- })
120
- });
18
+ const AnimatePresence = ({ children, initial = true, onExitComplete, mode = "sync", presenceAffectsLayout = true, custom, passThrough }) => {
19
+ const presentChildren = useMemo(() => onlyElements(children), [children]);
20
+ const presentKeys = presentChildren.map(getChildKey);
21
+ const isInitialRender = useRef(true);
22
+ const frozenCustomRef = useRef(/* @__PURE__ */ new Map());
23
+ const pendingPresentChildren = useRef(presentChildren);
24
+ const exitComplete = useConstant(() => /* @__PURE__ */ new Map());
25
+ const [diffedChildren, setDiffedChildren] = useState(presentChildren);
26
+ const [renderedChildren, setRenderedChildren] = useState(presentChildren);
27
+ const forceRender = useContext(LayoutGroupContext).forceRender ?? useForceUpdate();
28
+ if (passThrough) {
29
+ return /* @__PURE__ */ jsx(Fragment, { children });
30
+ }
31
+ useInsertionEffect(() => {
32
+ isInitialRender.current = false;
33
+ pendingPresentChildren.current = presentChildren;
34
+ for (let i = 0; i < renderedChildren.length; i++) {
35
+ const key = getChildKey(renderedChildren[i]);
36
+ if (!presentKeys.includes(key)) {
37
+ if (exitComplete.get(key) !== true) {
38
+ exitComplete.set(key, false);
39
+ }
40
+ } else {
41
+ exitComplete.delete(key);
42
+ frozenCustomRef.current.delete(key);
43
+ }
44
+ }
45
+ }, [
46
+ renderedChildren,
47
+ presentKeys.length,
48
+ presentKeys.join("-")
49
+ ]);
50
+ if (presentChildren !== diffedChildren) {
51
+ let nextChildren = [...presentChildren];
52
+ for (let i = 0; i < renderedChildren.length; i++) {
53
+ const child = renderedChildren[i];
54
+ const key = getChildKey(child);
55
+ if (!presentKeys.includes(key)) {
56
+ nextChildren.splice(i, 0, child);
57
+ if (!frozenCustomRef.current.has(key)) {
58
+ frozenCustomRef.current.set(key, custom);
59
+ }
60
+ }
61
+ }
62
+ const exitingChildren = renderedChildren.filter((child) => !presentKeys.includes(getChildKey(child)));
63
+ if (mode === "wait" && exitingChildren.length) {
64
+ nextChildren = exitingChildren;
65
+ }
66
+ setRenderedChildren(onlyElements(nextChildren));
67
+ setDiffedChildren(presentChildren);
68
+ return null;
69
+ }
70
+ return /* @__PURE__ */ jsx(Fragment, { children: renderedChildren.map((child) => {
71
+ const key = getChildKey(child);
72
+ const isPresent = presentChildren === renderedChildren || presentKeys.includes(key);
73
+ const onExit = () => {
74
+ if (exitComplete.has(key)) {
75
+ exitComplete.set(key, true);
76
+ } else {
77
+ return;
78
+ }
79
+ let isEveryExitComplete = true;
80
+ exitComplete.forEach((isExitComplete) => {
81
+ if (!isExitComplete) isEveryExitComplete = false;
82
+ });
83
+ if (isEveryExitComplete) {
84
+ forceRender?.();
85
+ setRenderedChildren(pendingPresentChildren.current);
86
+ onExitComplete?.();
87
+ }
88
+ };
89
+ return /* @__PURE__ */ jsx(PresenceChild, {
90
+ isPresent,
91
+ initial: !isInitialRender.current || initial ? void 0 : false,
92
+ custom: isPresent ? custom : frozenCustomRef.current.get(key) ?? custom,
93
+ presenceAffectsLayout,
94
+ onExitComplete: isPresent ? void 0 : onExit,
95
+ children: child
96
+ }, key);
97
+ }) });
121
98
  };
122
99
  AnimatePresence.displayName = "AnimatePresence";
100
+
123
101
  export { AnimatePresence };
124
102
  //# sourceMappingURL=AnimatePresence.mjs.map
@@ -1 +1 @@
1
- {"version":3,"names":["useInsertionEffect","useConstant","useForceUpdate","Children","isValidElement","useContext","useMemo","useRef","useState","LayoutGroupContext","PresenceChild","Fragment","jsx","getChildKey","child","key","ct","type","defaultName","staticConfig","componentName","onlyElements","children","filtered","forEach","push","AnimatePresence","enterVariant","exitVariant","enterExitVariant","initial","onExitComplete","exitBeforeEnter","mode","presenceAffectsLayout","custom","passThrough","effectiveMode","presentChildren","presentKeys","map","isInitialRender","frozenCustomRef","Map","pendingPresentChildren","exitComplete","diffedChildren","setDiffedChildren","renderedChildren","setRenderedChildren","forceRender","current","i","length","includes","get","set","delete","join","nextChildren","splice","has","exitingChildren","filter","isPresent","onExit","isEveryExitComplete","isExitComplete","displayName"],"sources":["../../src/AnimatePresence.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,kBAAA,QAA0B;AACnC,SAASC,WAAA,QAAmB;AAC5B,SAASC,cAAA,QAAsB;AAE/B,SAASC,QAAA,EAAUC,cAAA,EAAgBC,UAAA,EAAYC,OAAA,EAASC,MAAA,EAAQC,QAAA,QAAgB;AAChF,SAASC,kBAAA,QAA0B;AACnC,SAASC,aAAA,QAAqB;AAiGnB,SAAAC,QAAA,EAAAC,GAAA;AA5FX,MAAMC,WAAA,GAAeC,KAAA,IAA2C;EAC9D,OACEA,KAAA,CAAMC,GAAA,KACL,MAAM;IAEL,MAAMC,EAAA,GAAKF,KAAA,CAAMG,IAAA;IACjB,MAAMC,WAAA,GAAcF,EAAA,CAAG,aAAa,KAAKA,EAAA,CAAG,MAAM,KAAK;IACvD,IAAIA,EAAA,IAAM,OAAOA,EAAA,KAAO,YAAY,kBAAkBA,EAAA,EAAI;MAExD,OAAOA,EAAA,CAAGG,YAAA,CAAaC,aAAA,IAAiBF,WAAA;IAC1C;IACA,OAAOA,WAAA;EACT,GAAG;AAEP;AAEA,SAASG,aAAaC,QAAA,EAA0C;EAC9D,MAAMC,QAAA,GAAgC,EAAC;EAEvCpB,QAAA,CAASqB,OAAA,CAAQF,QAAA,EAAWR,KAAA,IAAU;IACpC,IAAIV,cAAA,CAAeU,KAAK,GAAGS,QAAA,CAASE,IAAA,CAAKX,KAAK;EAChD,CAAC;EACD,O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ePresence.js","names":[],"sources":["esm/AnimatePresence.js"],"sourcesContent":["import { useInsertionEffect } from \"react\";\nimport { useConstant } from \"@tamagui/use-constant\";\nimport { useForceUpdate } from \"@tamagui/use-force-update\";\nimport { Children, isValidElement, useContext, useMemo, useRef, useState } from \"react\";\nimport { LayoutGroupContext } from \"./LayoutGroupContext\";\nimport { PresenceChild } from \"./PresenceChild\";\nimport { Fragment, jsx } from \"react/jsx-runtime\";\nconst getChildKey = (child) => {\n return child.key ?? \"\";\n};\nfunction onlyElements(children) {\n const filtered = [];\n Children.forEach(children, (child) => {\n if (isValidElement(child)) filtered.push(child);\n });\n return filtered;\n}\nconst AnimatePresence = ({\n children,\n initial = true,\n onExitComplete,\n mode = \"sync\",\n presenceAffectsLayout = true,\n custom,\n passThrough\n}) => {\n const presentChildren = useMemo(() => onlyElements(children), [children]);\n const presentKeys = presentChildren.map(getChildKey);\n const isInitialRender = useRef(true);\n const frozenCustomRef = useRef(/* @__PURE__ */ new Map());\n const pendingPresentChildren = useRef(presentChildren);\n const exitComplete = useConstant(() => /* @__PURE__ */ new Map());\n const [diffedChildren, setDiffedChildren] = useState(presentChildren);\n const [renderedChildren, setRenderedChildren] = useState(presentChildren);\n const forceRender = useContext(LayoutGroupContext).forceRender ?? useForceUpdate();\n if (passThrough) {\n return /* @__PURE__ */ jsx(Fragment, { children });\n }\n useInsertionEffect(() => {\n isInitialRender.current = false;\n pendingPresentChildren.current = presentChildren;\n for (let i = 0; i < renderedChildren.length; i++) {\n const key = getChildKey(renderedChildren[i]);\n if (!presentKeys.includes(key)) {\n if (exitComplete.get(key) !== true) {\n exitComplete.set(key, false);\n }\n } else {\n exitComplete.delete(key);\n frozenCustomRef.current.delete(key);\n }\n }\n }, [renderedChildren, presentKeys.length, presentKeys.join(\"-\")]);\n if (presentChildren !== diffedChildren) {\n let nextChildren = [...presentChildren];\n for (let i = 0; i < renderedChildren.length; i++) {\n const child = renderedChildren[i];\n const 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 const exitingChildren = renderedChildren.filter(\n (child) => !presentKeys.includes(getChildKey(child))\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__ */ jsx(Fragment, { children: renderedChildren.map((child) => {\n const key = getChildKey(child);\n const isPresent = presentChildren === renderedChildren || presentKeys.includes(key);\n const onExit = () => {\n if (exitComplete.has(key)) {\n exitComplete.set(key, true);\n } else {\n return;\n }\n let isEveryExitComplete = true;\n exitComplete.forEach((isExitComplete) => {\n if (!isExitComplete) isEveryExitComplete = false;\n });\n if (isEveryExitComplete) {\n forceRender?.();\n setRenderedChildren(pendingPresentChildren.current);\n onExitComplete?.();\n }\n };\n return /* @__PURE__ */ jsx(\n PresenceChild,\n {\n isPresent,\n initial: !isInitialRender.current || initial ? void 0 : false,\n custom: isPresent ? custom : frozenCustomRef.current.get(key) ?? custom,\n presenceAffectsLayout,\n onExitComplete: isPresent ? void 0 : onExit,\n children: child\n },\n key\n );\n }) });\n};\nAnimatePresence.displayName = \"AnimatePresence\";\nexport {\n AnimatePresence\n};\n//# sourceMappingURL=AnimatePresence.js.map\n"],"mappings":";;;;;;;;AAOA,MAAM,eAAe,UAAU;CAC7B,OAAO,MAAM,OAAO;AACtB;AACA,SAAS,aAAa,UAAU;CAC9B,MAAM,WAAW,CAAC;CAClB,SAAS,QAAQ,WAAW,UAAU;EACpC,IAAI,eAAe,KAAK,GAAG,SAAS,KAAK,KAAK;CAChD,CAAC;CACD,OAAO;AACT;AACA,MAAM,mBAAmB,EACvB,UACA,UAAU,MACV,gBACA,OAAO,QACP,wBAAwB,MACxB,QACA,kBACI;CACJ,MAAM,kBAAkB,cAAc,aAAa,QAAQ,GAAG,CAAC,QAAQ,CAAC;CACxE,MAAM,cAAc,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SAAS,YAAY,KAAK,CAAC,CACrD;EACA,IAAI,SAAS,UAAU,gBAAgB,QAAQ;GAC7C,eAAe;EACjB;EACA,oBAAoB,aAAa,YAAY,CAAC;EAC9C,kBAAkB,eAAe;EACjC,OAAO;CACT;CACA,OAAuB,oBAAI,UAAU,EAAE,UAAU,iBAAiB,KAAK,UAAU;EAC/E,MAAM,MAAM,YAAY,KAAK;EAC7B,MAAM,YAAY,oBAAoB,oBAAoB,YAAY,SAAS,GAAG;EAClF,MAAM,eAAe;GACnB,IAAI,aAAa,IAAI,GAAG,GAAG;IACzB,aAAa,IAAI,KAAK,IAAI;GAC5B,OAAO;IACL;GACF;GACA,IAAI,sBAAsB;GAC1B,aAAa,SAAS,mBAAmB;IACvC,IAAI,CAAC,gBAAgB,sBAAsB;GAC7C,CAAC;GACD,IAAI,qBAAqB;IACvB,cAAc;IACd,oBAAoB,uBAAuB,OAAO;IAClD,iBAAiB;GACnB;EACF;EACA,OAAuB,oBACrB,eACA;GACE;GACA,SAAS,CAAC,gBAAgB,WAAW,UAAU,KAAK,IAAI;GACxD,QAAQ,YAAY,SAAS,gBAAgB,QAAQ,IAAI,GAAG,KAAK;GACjE;GACA,gBAAgB,YAAY,KAAK,IAAI;GACrC,UAAU;EACZ,GACA,GACF;CACF,CAAC,EAAE,CAAC;AACN;AACA,gBAAgB,cAAc"}
@@ -1,138 +1,112 @@
1
- import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { useInsertionEffect } from "react";
1
+ import { Fragment, jsx } from "react/jsx-runtime";
2
+ import { Children, isValidElement, useContext, useInsertionEffect, useMemo, useRef, useState } from "react";
3
3
  import { useConstant } from "@tamagui/use-constant";
4
4
  import { useForceUpdate } from "@tamagui/use-force-update";
5
- import { Children, isValidElement, useContext, useMemo, useRef, useState } from "react";
6
5
  import { LayoutGroupContext } from "./LayoutGroupContext.native.js";
7
6
  import { PresenceChild } from "./PresenceChild.native.js";
8
- function _type_of(obj) {
9
- "@swc/helpers - typeof";
10
7
 
11
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
12
- }
13
- var getChildKey = function (child) {
14
- return child.key || function () {
15
- var ct = child.type;
16
- var defaultName = ct["displayName"] || ct["name"] || "";
17
- if (ct && (typeof ct === "undefined" ? "undefined" : _type_of(ct)) === "object" && "staticConfig" in ct) {
18
- return ct.staticConfig.componentName || defaultName;
19
- }
20
- return defaultName;
21
- }();
8
+ var getChildKey = function(child) {
9
+ var _child_key;
10
+ return (_child_key = child.key) !== null && _child_key !== void 0 ? _child_key : "";
22
11
  };
23
12
  function onlyElements(children) {
24
- var filtered = [];
25
- Children.forEach(children, function (child) {
26
- if (/* @__PURE__ */isValidElement(child)) filtered.push(child);
27
- });
28
- return filtered;
13
+ var filtered = [];
14
+ Children.forEach(children, function(child) {
15
+ if (/* @__PURE__ */ isValidElement(child)) filtered.push(child);
16
+ });
17
+ return filtered;
29
18
  }
30
- var AnimatePresence = function (param) {
31
- var {
32
- children,
33
- enterVariant,
34
- exitVariant,
35
- enterExitVariant,
36
- initial = true,
37
- onExitComplete,
38
- exitBeforeEnter,
39
- mode,
40
- presenceAffectsLayout = true,
41
- custom,
42
- passThrough
43
- } = param;
44
- var effectiveMode = mode !== null && mode !== void 0 ? mode : exitBeforeEnter ? "wait" : "sync";
45
- var presentChildren = useMemo(function () {
46
- return onlyElements(children);
47
- }, [children]);
48
- var presentKeys = presentChildren.map(getChildKey);
49
- var isInitialRender = useRef(true);
50
- var frozenCustomRef = useRef(/* @__PURE__ */new Map());
51
- var pendingPresentChildren = useRef(presentChildren);
52
- var exitComplete = useConstant(function () {
53
- return /* @__PURE__ */new Map();
54
- });
55
- var [diffedChildren, setDiffedChildren] = useState(presentChildren);
56
- var [renderedChildren, setRenderedChildren] = useState(presentChildren);
57
- var _useContext_forceRender;
58
- var forceRender = (_useContext_forceRender = useContext(LayoutGroupContext).forceRender) !== null && _useContext_forceRender !== void 0 ? _useContext_forceRender : useForceUpdate();
59
- if (passThrough) {
60
- return /* @__PURE__ */_jsx(_Fragment, {
61
- children
62
- });
63
- }
64
- 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
- }, [renderedChildren, presentKeys.length, presentKeys.join("-")]);
79
- if (presentChildren !== diffedChildren) {
80
- var nextChildren = [...presentChildren];
81
- for (var i = 0; i < renderedChildren.length; i++) {
82
- var child = renderedChildren[i];
83
- var key = getChildKey(child);
84
- if (!presentKeys.includes(key)) {
85
- nextChildren.splice(i, 0, child);
86
- if (!frozenCustomRef.current.has(key)) {
87
- frozenCustomRef.current.set(key, custom);
88
- }
89
- }
90
- }
91
- var exitingChildren = renderedChildren.filter(function (child2) {
92
- return !presentKeys.includes(getChildKey(child2));
93
- });
94
- if (effectiveMode === "wait" && exitingChildren.length) {
95
- nextChildren = exitingChildren;
96
- }
97
- setRenderedChildren(onlyElements(nextChildren));
98
- setDiffedChildren(presentChildren);
99
- return null;
100
- }
101
- return /* @__PURE__ */_jsx(_Fragment, {
102
- children: renderedChildren.map(function (child2) {
103
- var key2 = getChildKey(child2);
104
- var isPresent = presentChildren === renderedChildren || presentKeys.includes(key2);
105
- var onExit = function () {
106
- if (exitComplete.has(key2)) {
107
- exitComplete.set(key2, true);
108
- } else {
109
- return;
110
- }
111
- var isEveryExitComplete = true;
112
- exitComplete.forEach(function (isExitComplete) {
113
- if (!isExitComplete) isEveryExitComplete = false;
114
- });
115
- if (isEveryExitComplete) {
116
- forceRender === null || forceRender === void 0 ? void 0 : forceRender();
117
- setRenderedChildren(pendingPresentChildren.current);
118
- onExitComplete === null || onExitComplete === void 0 ? void 0 : onExitComplete();
119
- }
120
- };
121
- var _frozenCustomRef_current_get;
122
- return /* @__PURE__ */_jsx(PresenceChild, {
123
- isPresent,
124
- initial: !isInitialRender.current || initial ? void 0 : false,
125
- custom: isPresent ? custom : (_frozenCustomRef_current_get = frozenCustomRef.current.get(key2)) !== null && _frozenCustomRef_current_get !== void 0 ? _frozenCustomRef_current_get : custom,
126
- presenceAffectsLayout,
127
- enterExitVariant,
128
- enterVariant,
129
- exitVariant,
130
- onExitComplete: isPresent ? void 0 : onExit,
131
- children: child2
132
- }, key2);
133
- })
134
- });
19
+ var AnimatePresence = function(param) {
20
+ var { children, initial = true, onExitComplete, mode = "sync", presenceAffectsLayout = true, custom, passThrough } = param;
21
+ var presentChildren = useMemo(function() {
22
+ return onlyElements(children);
23
+ }, [children]);
24
+ var presentKeys = presentChildren.map(getChildKey);
25
+ var isInitialRender = useRef(true);
26
+ var frozenCustomRef = useRef(/* @__PURE__ */ new Map());
27
+ var pendingPresentChildren = useRef(presentChildren);
28
+ var exitComplete = useConstant(function() {
29
+ return /* @__PURE__ */ new Map();
30
+ });
31
+ var [diffedChildren, setDiffedChildren] = useState(presentChildren);
32
+ var [renderedChildren, setRenderedChildren] = useState(presentChildren);
33
+ var _useContext_forceRender;
34
+ var forceRender = (_useContext_forceRender = useContext(LayoutGroupContext).forceRender) !== null && _useContext_forceRender !== void 0 ? _useContext_forceRender : useForceUpdate();
35
+ if (passThrough) {
36
+ return /* @__PURE__ */ jsx(Fragment, { children });
37
+ }
38
+ useInsertionEffect(function() {
39
+ isInitialRender.current = false;
40
+ pendingPresentChildren.current = presentChildren;
41
+ for (var i2 = 0; i2 < renderedChildren.length; i2++) {
42
+ var key2 = getChildKey(renderedChildren[i2]);
43
+ if (!presentKeys.includes(key2)) {
44
+ if (exitComplete.get(key2) !== true) {
45
+ exitComplete.set(key2, false);
46
+ }
47
+ } else {
48
+ exitComplete.delete(key2);
49
+ frozenCustomRef.current.delete(key2);
50
+ }
51
+ }
52
+ }, [
53
+ renderedChildren,
54
+ presentKeys.length,
55
+ presentKeys.join("-")
56
+ ]);
57
+ if (presentChildren !== diffedChildren) {
58
+ var nextChildren = [...presentChildren];
59
+ for (var i = 0; i < renderedChildren.length; i++) {
60
+ var child = renderedChildren[i];
61
+ var key = getChildKey(child);
62
+ if (!presentKeys.includes(key)) {
63
+ nextChildren.splice(i, 0, child);
64
+ if (!frozenCustomRef.current.has(key)) {
65
+ frozenCustomRef.current.set(key, custom);
66
+ }
67
+ }
68
+ }
69
+ var exitingChildren = renderedChildren.filter(function(child2) {
70
+ return !presentKeys.includes(getChildKey(child2));
71
+ });
72
+ if (mode === "wait" && exitingChildren.length) {
73
+ nextChildren = exitingChildren;
74
+ }
75
+ setRenderedChildren(onlyElements(nextChildren));
76
+ setDiffedChildren(presentChildren);
77
+ return null;
78
+ }
79
+ return /* @__PURE__ */ jsx(Fragment, { children: renderedChildren.map(function(child2) {
80
+ var key2 = getChildKey(child2);
81
+ var isPresent = presentChildren === renderedChildren || presentKeys.includes(key2);
82
+ var onExit = function() {
83
+ if (exitComplete.has(key2)) {
84
+ exitComplete.set(key2, true);
85
+ } else {
86
+ return;
87
+ }
88
+ var isEveryExitComplete = true;
89
+ exitComplete.forEach(function(isExitComplete) {
90
+ if (!isExitComplete) isEveryExitComplete = false;
91
+ });
92
+ if (isEveryExitComplete) {
93
+ forceRender === null || forceRender === void 0 ? void 0 : forceRender();
94
+ setRenderedChildren(pendingPresentChildren.current);
95
+ onExitComplete === null || onExitComplete === void 0 ? void 0 : onExitComplete();
96
+ }
97
+ };
98
+ var _frozenCustomRef_current_get;
99
+ return /* @__PURE__ */ jsx(PresenceChild, {
100
+ isPresent,
101
+ initial: !isInitialRender.current || initial ? void 0 : false,
102
+ custom: isPresent ? custom : (_frozenCustomRef_current_get = frozenCustomRef.current.get(key2)) !== null && _frozenCustomRef_current_get !== void 0 ? _frozenCustomRef_current_get : custom,
103
+ presenceAffectsLayout,
104
+ onExitComplete: isPresent ? void 0 : onExit,
105
+ children: child2
106
+ }, key2);
107
+ }) });
135
108
  };
136
109
  AnimatePresence.displayName = "AnimatePresence";
110
+
137
111
  export { AnimatePresence };
138
112
  //# sourceMappingURL=AnimatePresence.native.js.map