@tamagui/animate-presence 2.0.0-rc.9 → 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 +10 -9
  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
@@ -4,38 +4,40 @@ var __create = Object.create;
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf,
8
- __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
9
  var __export = (target, all) => {
10
- for (var name in all) __defProp(target, name, {
11
- get: all[name],
12
- enumerable: !0
13
- });
14
- },
15
- __copyProps = (to, from, except, desc) => {
16
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
10
+ for (var name in all) __defProp(target, name, {
11
+ get: all[name],
12
+ enumerable: true
13
+ });
14
+ };
15
+ 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, {
17
18
  get: () => from[key],
18
19
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
20
  });
20
- return to;
21
- };
21
+ }
22
+ return to;
23
+ };
22
24
  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: !0
30
- }) : target, mod)),
31
- __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
32
- value: !0
33
- }), mod);
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
32
+ }) : target, mod));
33
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
34
+ value: true
35
+ }), mod);
34
36
  var LayoutGroupContext_exports = {};
35
37
  __export(LayoutGroupContext_exports, {
36
38
  LayoutGroupContext: () => LayoutGroupContext
37
39
  });
38
40
  module.exports = __toCommonJS(LayoutGroupContext_exports);
39
- var import_react = __toESM(require("react"), 1),
40
- LayoutGroupContext = /* @__PURE__ */import_react.default.createContext({});
41
+ var import_react = __toESM(require("react"), 1);
42
+ var LayoutGroupContext = /* @__PURE__ */import_react.default.createContext({});
41
43
  //# 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","default","createContext"],"sources":["../../src/LayoutGroupContext.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAA;EAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;IAAAC,KAAA;EAAA,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;EAAML,kBAAyC,kBAAAG,YAAA,CAAAG,OAAA,CAAAC,aAAA","ignoreList":[]}
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":[]}
@@ -2,43 +2,45 @@ 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 PresenceChild_exports = {};
33
35
  __export(PresenceChild_exports, {
34
36
  PresenceChild: () => PresenceChild
35
37
  });
36
38
  module.exports = __toCommonJS(PresenceChild_exports);
37
- var import_use_constant = require("@tamagui/use-constant"),
38
- import_use_presence = require("@tamagui/use-presence"),
39
- React = __toESM(require("react"), 1),
40
- import_react = require("react"),
41
- import_jsx_runtime = require("react/jsx-runtime");
39
+ var import_use_constant = require("@tamagui/use-constant");
40
+ var import_use_presence = require("@tamagui/use-presence");
41
+ var React = __toESM(require("react"), 1);
42
+ var import_react = require("react");
43
+ var import_jsx_runtime = require("react/jsx-runtime");
42
44
  const PresenceChild = React.memo(({
43
45
  children,
44
46
  initial,
@@ -50,9 +52,10 @@ const PresenceChild = React.memo(({
50
52
  presenceAffectsLayout,
51
53
  custom
52
54
  }) => {
53
- const presenceChildren = (0, import_use_constant.useConstant)(newChildrenMap),
54
- id = (0, import_react.useId)() || "",
55
- context = React.useMemo(() => ({
55
+ const presenceChildren = (0, import_use_constant.useConstant)(newChildrenMap);
56
+ const id = (0, import_react.useId)() || "";
57
+ const context = React.useMemo(() => {
58
+ return {
56
59
  id,
57
60
  initial,
58
61
  isPresent,
@@ -61,24 +64,34 @@ const PresenceChild = React.memo(({
61
64
  enterVariant,
62
65
  enterExitVariant,
63
66
  onExitComplete: () => {
64
- presenceChildren.set(id, !0);
65
- for (const isComplete of presenceChildren.values()) if (!isComplete) return;
67
+ presenceChildren.set(id, true);
68
+ for (const isComplete of presenceChildren.values()) {
69
+ if (!isComplete) {
70
+ return;
71
+ }
72
+ }
66
73
  onExitComplete?.();
67
74
  },
68
- register: () => (presenceChildren.set(id, !1), () => presenceChildren.delete(id))
69
- }),
70
- /**
71
- * If the presence of a child affects the layout of the components around it,
72
- * we want to make a new context value to ensure they get re-rendered
73
- * so they can detect that layout change.
74
- */
75
- // @ts-expect-error its ok
76
- presenceAffectsLayout ? void 0 : [isPresent, exitVariant, enterVariant]);
77
- return React.useMemo(() => {
78
- presenceChildren.forEach((_, key) => presenceChildren.set(key, !1));
79
- }, [isPresent]), React.useEffect(() => {
75
+ register: () => {
76
+ presenceChildren.set(id, false);
77
+ return () => presenceChildren.delete(id);
78
+ }
79
+ };
80
+ },
81
+ /**
82
+ * If the presence of a child affects the layout of the components around it,
83
+ * we want to make a new context value to ensure they get re-rendered
84
+ * so they can detect that layout change.
85
+ */
86
+ // @ts-expect-error its ok
87
+ presenceAffectsLayout ? void 0 : [isPresent, exitVariant, enterVariant]);
88
+ React.useMemo(() => {
89
+ presenceChildren.forEach((_, key) => presenceChildren.set(key, false));
90
+ }, [isPresent]);
91
+ React.useEffect(() => {
80
92
  !isPresent && !presenceChildren.size && onExitComplete?.();
81
- }, [isPresent]), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_use_presence.PresenceContext.Provider, {
93
+ }, [isPresent]);
94
+ return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_use_presence.PresenceContext.Provider, {
82
95
  value: context,
83
96
  children
84
97
  });
@@ -4,112 +4,124 @@ var __create = Object.create;
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf,
8
- __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
9
  var __export = (target, all) => {
10
- for (var name in all) __defProp(target, name, {
11
- get: all[name],
12
- enumerable: !0
13
- });
14
- },
15
- __copyProps = (to, from, except, desc) => {
16
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
10
+ for (var name in all) __defProp(target, name, {
11
+ get: all[name],
12
+ enumerable: true
13
+ });
14
+ };
15
+ 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, {
17
18
  get: () => from[key],
18
19
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
20
  });
20
- return to;
21
- };
21
+ }
22
+ return to;
23
+ };
22
24
  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: !0
30
- }) : target, mod)),
31
- __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
32
- value: !0
33
- }), mod);
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
32
+ }) : target, mod));
33
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
34
+ value: true
35
+ }), mod);
34
36
  var PresenceChild_exports = {};
35
37
  __export(PresenceChild_exports, {
36
38
  PresenceChild: () => PresenceChild
37
39
  });
38
40
  module.exports = __toCommonJS(PresenceChild_exports);
39
- var import_jsx_runtime = require("react/jsx-runtime"),
40
- import_use_constant = require("@tamagui/use-constant"),
41
- import_use_presence = require("@tamagui/use-presence"),
42
- React = __toESM(require("react"), 1),
43
- import_react = require("react"),
44
- PresenceChild = /* @__PURE__ */React.memo(function (param) {
45
- var {
46
- children,
47
- initial,
48
- isPresent,
49
- onExitComplete,
50
- exitVariant,
51
- enterVariant,
52
- enterExitVariant,
53
- presenceAffectsLayout,
54
- custom
55
- } = param,
56
- presenceChildren = (0, import_use_constant.useConstant)(newChildrenMap),
57
- id = (0, import_react.useId)() || "",
58
- context = React.useMemo(function () {
59
- return {
60
- id,
61
- initial,
62
- isPresent,
63
- custom,
64
- exitVariant,
65
- enterVariant,
66
- enterExitVariant,
67
- onExitComplete: function () {
68
- presenceChildren.set(id, !0);
69
- var _iteratorNormalCompletion = !0,
70
- _didIteratorError = !1,
71
- _iteratorError = void 0;
72
- try {
73
- for (var _iterator = presenceChildren.values()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
74
- var isComplete = _step.value;
75
- if (!isComplete) return;
76
- }
77
- } catch (err) {
78
- _didIteratorError = !0, _iteratorError = err;
79
- } finally {
80
- try {
81
- !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
82
- } finally {
83
- if (_didIteratorError) throw _iteratorError;
84
- }
41
+ var import_jsx_runtime = require("react/jsx-runtime");
42
+ var import_use_constant = require("@tamagui/use-constant");
43
+ var import_use_presence = require("@tamagui/use-presence");
44
+ var React = __toESM(require("react"), 1);
45
+ var import_react = require("react");
46
+ var PresenceChild = /* @__PURE__ */React.memo(function (param) {
47
+ var {
48
+ children,
49
+ initial,
50
+ isPresent,
51
+ onExitComplete,
52
+ exitVariant,
53
+ enterVariant,
54
+ enterExitVariant,
55
+ presenceAffectsLayout,
56
+ custom
57
+ } = param;
58
+ var presenceChildren = (0, import_use_constant.useConstant)(newChildrenMap);
59
+ var id = (0, import_react.useId)() || "";
60
+ var context = React.useMemo(function () {
61
+ return {
62
+ id,
63
+ initial,
64
+ isPresent,
65
+ custom,
66
+ exitVariant,
67
+ enterVariant,
68
+ enterExitVariant,
69
+ onExitComplete: function () {
70
+ presenceChildren.set(id, true);
71
+ var _iteratorNormalCompletion = true,
72
+ _didIteratorError = false,
73
+ _iteratorError = void 0;
74
+ try {
75
+ for (var _iterator = presenceChildren.values()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
76
+ var isComplete = _step.value;
77
+ if (!isComplete) {
78
+ return;
85
79
  }
86
- onExitComplete?.();
87
- },
88
- register: function () {
89
- return presenceChildren.set(id, !1), function () {
90
- return presenceChildren.delete(id);
91
- };
92
80
  }
93
- };
81
+ } catch (err) {
82
+ _didIteratorError = true;
83
+ _iteratorError = err;
84
+ } finally {
85
+ try {
86
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
87
+ _iterator.return();
88
+ }
89
+ } finally {
90
+ if (_didIteratorError) {
91
+ throw _iteratorError;
92
+ }
93
+ }
94
+ }
95
+ onExitComplete === null || onExitComplete === void 0 ? void 0 : onExitComplete();
94
96
  },
95
- /**
96
- * If the presence of a child affects the layout of the components around it,
97
- * we want to make a new context value to ensure they get re-rendered
98
- * so they can detect that layout change.
99
- */
100
- // @ts-expect-error its ok
101
- presenceAffectsLayout ? void 0 : [isPresent, exitVariant, enterVariant]);
102
- return React.useMemo(function () {
103
- presenceChildren.forEach(function (_, key) {
104
- return presenceChildren.set(key, !1);
105
- });
106
- }, [isPresent]), React.useEffect(function () {
107
- !isPresent && !presenceChildren.size && onExitComplete?.();
108
- }, [isPresent]), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_use_presence.PresenceContext.Provider, {
109
- value: context,
110
- children
97
+ register: function () {
98
+ presenceChildren.set(id, false);
99
+ return function () {
100
+ return presenceChildren.delete(id);
101
+ };
102
+ }
103
+ };
104
+ },
105
+ /**
106
+ * If the presence of a child affects the layout of the components around it,
107
+ * we want to make a new context value to ensure they get re-rendered
108
+ * so they can detect that layout change.
109
+ */
110
+ // @ts-expect-error its ok
111
+ presenceAffectsLayout ? void 0 : [isPresent, exitVariant, enterVariant]);
112
+ React.useMemo(function () {
113
+ presenceChildren.forEach(function (_, key) {
114
+ return presenceChildren.set(key, false);
111
115
  });
116
+ }, [isPresent]);
117
+ React.useEffect(function () {
118
+ !isPresent && !presenceChildren.size && (onExitComplete === null || onExitComplete === void 0 ? void 0 : onExitComplete());
119
+ }, [isPresent]);
120
+ return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_use_presence.PresenceContext.Provider, {
121
+ value: context,
122
+ children
112
123
  });
124
+ });
113
125
  function newChildrenMap() {
114
126
  return /* @__PURE__ */new Map();
115
127
  }
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","PresenceChild_exports","__export","PresenceChild","module","exports","import_jsx_runtime","require","import_use_constant","import_use_presence","React","__toESM","import_react","memo","param","children","initial","isPresent","onExitComplete","exitVariant","enterVariant","enterExitVariant","presenceAffectsLayout","custom","presenceChildren","useConstant","newChildrenMap","id","useId","context","useMemo","set","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","values","Symbol","iterator","_step","next","done","isComplete","err","return","register","delete"],"sources":["../../src/PresenceChild.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAA;EAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;IAAAC,KAAA;EAAA,IAAAH,GAAA;AAAA,IAAAI,qBAAA;AAAAC,QAAA,CAAAD,qBAAA;EAAAE,aAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAA4B,CAAAK,qBAAA;AAqBrB,IAAAK,kBAAsB,GAAAC,OAAM;EAAAC,mBAAA,GAAAD,OAAA;EAAAE,mBAAA,GAAAF,OAAA;EAAAG,KAAA,GAAAC,OAAA,CAAAJ,OAAA;EAAAK,YAAA,GAAAL,OAAA;EAAAJ,aAAA,kBAAAO,KAAA,CAAAG,IAAA,WAAAC,KAAA;IACjC,IAAC;QAAAC,QAAA;QAAAC,OAAA;QAAAC,SAAA;QAAAC,cAAA;QAAAC,WAAA;QAAAC,YAAA;QAAAC,gBAAA;QAAAC,qBAAA;QAAAC;MAAA,IAAAT,KAAA;MAAAU,gBAAA,OAAAhB,mBAAA,CAAAiB,WAAA,EAAAC,cAAA;MAAAC,EAAA,OAAAf,YAAA,CAAAgB,KAAA;MAAAC,OAAA,GAAAnB,KAAA,CAAAoB,OAAA,CACC;QACA;UACAH,EAAA;UACAX,OAAA;UACAC,SAAA;UACAM,MAAA;UACAJ,WAAA;UACAC,YAAA;UACAC,gBAAA;UACwBH,cAAA,WAAAA,CAAA;YAClBM,gBAAA,CAAAO,GAAA,CAAAJ,EAAmB;YAIvB,IACSK,yBAAA;cAAAC,iBAAA;cAAAC,cAAA;YACL;cACA,SAAAC,SAAA,GAAAX,gBAAA,CAAAY,MAAA,GAAAC,MAAA,CAAAC,QAAA,KAAAC,KAAA,IAAAP,yBAAA,IAAAO,KAAA,GAAAJ,SAAA,CAAAK,IAAA,IAAAC,IAAA,GAAAT,yBAAA;gBACA,IAAAU,UAAA,GAAAH,KAAA,CAAAvC,KAAA;gBACA,KAAA0C,UAAA,EACA;cACA;YACA,SAAAC,GAAA;cACAV,iBAAgB,GAAM,IAAAC,cAAA,GAAAS,GAAA;YACpB;cACA;gBACE,CAAAX,yBAAK,IAAAG,SAAA,CAAAS,MAAA,YAAAT,SAAA,CAAAS,MAAA;cACH;gBAGJ,IAAAX,iBAAiB,EACnB,MAAAC,cAAA;cACA;YAIF;YAAAhB,cAAA;UAAA;UAAA2B,QAAA,WAAAA,CAAA;YAAA,OAAArB,gBAAA,CAAAO,GAAA,CAAAJ,EAAA;cAAA,OAAAH,gBAAA,CAAAsB,MAAA,CAAAnB,EAAA;YAAA;UASF;QACF;MAEA;MACE;AAAqE;AAQrE;AAAyD;AAGA;MAE/D;MAEAL,qBAAS,GAAuC,UAC9CL,SAAO,EACTE,WAAA,E","ignoreList":[]}
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","PresenceChild_exports","__export","PresenceChild","module","exports","import_jsx_runtime","require","import_use_constant","import_use_presence","React","__toESM","import_react","memo","param","children","initial","isPresent","onExitComplete","exitVariant","enterVariant","enterExitVariant","presenceAffectsLayout","custom","presenceChildren","useConstant","newChildrenMap","id","useId","context","useMemo","set","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","values","Symbol","iterator","_step","next","done","isComplete","err","return","register","delete"],"sources":["../../src/PresenceChild.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,qBAAA;AAAAC,QAAA,CAAAD,qBAAA;EAAAE,aAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAA4B,CAAAK,qBAAA;AAC5B,IAAAK,kBAAA,GAAAC,OAAgC;AAEhC,IAAAC,mBAAuB,GAAAD,OAAA;AACvB,IAAAE,mBAAsB,GAAAF,OAAA;AA+EX,IAAAG,KAAA,GAAAC,OAAA,CAAAJ,OAAA;AA9DJ,IAAAK,YAAM,GAAAL,OAAgB,QAAM;AAAA,IAChCJ,aAAA,kBAAAO,KAAA,CAAAG,IAAA,WAAAC,KAAA;EAAA,IACC;IAAAC,QAAA;IAAAC,OAAA;IAAAC,SAAA;IAAAC,cAAA;IAAAC,WAAA;IAAAC,YAAA;IAAAC,gBAAA;IAAAC,qBAAA;IAAAC;EAAA,IAAAT,KAAA;EAAA,IACAU,gBAAA,OAAAhB,mBAAA,CAAAiB,WAAA,EAAAC,cAAA;EAAA,IACAC,EAAA,OAAAf,YAAA,CAAAgB,KAAA;EAAA,IACAC,OAAA,GAAAnB,KAAA,CAAAoB,OAAA,CACA;IACA;MACAH,EAAA;MACAX,OAAA;MACAC,SAAA;MACwBM,MAAA;MACxBJ,WAAM;MACNC,YAAW;MAEXC,gBAAgB;MACdH,cAA4B,WAAAA,CAAA;QAC1BM,gBAAO,CAAAO,GAAA,CAAAJ,EAAA;QACL,IAAAK,yBAAA;UAAAC,iBAAA;UAAAC,cAAA;QACA;UACA,SAAAC,SAAA,GAAAX,gBAAA,CAAAY,MAAA,GAAAC,MAAA,CAAAC,QAAA,KAAAC,KAAA,IAAAP,yBAAA,IAAAO,KAAA,GAAAJ,SAAA,CAAAK,IAAA,IAAAC,IAAA,GAAAT,yBAAA;YACA,IAAAU,UAAA,GAAAH,KAAA,CAAAvC,KAAA;YACA,KAAA0C,UAAA;cACA;YACA;UACA;QACE,SAAAC,GAAA;UACAV,iBAAW;UACTC,cAAK,GAAAS,GAAY;QACf;UAAA,IACF;YACF,KAAAX,yBAAA,IAAAG,SAAA,CAAAS,MAAA;cACAT,SAAA,CAAAS,MAAiB;YACnB;UACA,UAAU;YACR,IAAAX,iBAAqB,EAAI;cACzB,MAAOC,cAAM;YACf;UACF;QACF;QAAAhB,cAAA,aAAAA,cAAA,uBAAAA,cAAA;MAAA;MAAA2B,QAAA,WAAAA,CAAA;QAAArB,gBAAA,CAAAO,GAAA,CAAAJ,EAAA;QAAA;UAAA,OAAAH,gBAAA,CAAAsB,MAAA,CAAAnB,EAAA;QAQA;MACF;IAEA;EACE;EACF;AAMA;AACE;AAAyD;AAG3D;EACF;EACFL,qBAAA,aAEAL,SAAS,EACPE,WAAO,EACTC,YAAA,C","ignoreList":[]}
@@ -3,15 +3,17 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
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, {
7
8
  get: () => from[key],
8
9
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
9
10
  });
10
- return to;
11
- },
12
- __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
13
15
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
14
- value: !0
16
+ value: true
15
17
  }), mod);
16
18
  var index_exports = {};
17
19
  module.exports = __toCommonJS(index_exports);
@@ -5,15 +5,17 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __copyProps = (to, from, except, desc) => {
8
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
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, {
9
10
  get: () => from[key],
10
11
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
11
12
  });
12
- return to;
13
- },
14
- __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
13
+ }
14
+ return to;
15
+ };
16
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
17
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
16
- value: !0
18
+ value: true
17
19
  }), mod);
18
20
  var index_exports = {};
19
21
  module.exports = __toCommonJS(index_exports);
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports","__reExport","require"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAP,YAAc,CAAAK,aAAA;AACdG,UAAA,CAAAH,aAAA,EAAcI,OAAA,iCAAAH,MADd,CAAAC,OAAA;AAEAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,wBAFd,GAAAH,MAAA,CAAAC,OAAA;AAGAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,uBAAAH,MAAA,CAAAC,OAHd","ignoreList":[]}
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports","__reExport","require"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAP,YAAc,CAAAK,aAAA;AACdG,UAAA,CAAAH,aAAA,EAAcI,OAAA,iCAAAH,MADd,CAAAC,OAAA;AAEAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,wBAFd,GAAAH,MAAA,CAAAC,OAAA;AAGAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,uBAAAH,MAAA,CAAAC,OAHd","ignoreList":[]}
@@ -3,14 +3,16 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
7
- get: () => from[key],
8
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
9
- });
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
+ }
10
12
  return to;
11
13
  };
12
14
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
13
- value: !0
15
+ value: true
14
16
  }), mod);
15
17
  var types_exports = {};
16
18
  module.exports = __toCommonJS(types_exports);
@@ -5,14 +5,16 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __copyProps = (to, from, except, desc) => {
8
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
9
- get: () => from[key],
10
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
11
- });
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
+ }
12
14
  return to;
13
15
  };
14
16
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
15
- value: !0
17
+ value: true
16
18
  }), mod);
17
19
  var types_exports = {};
18
20
  module.exports = __toCommonJS(types_exports);
@@ -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,"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":[]}