@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.
- package/dist/cjs/AnimatePresence.cjs +112 -91
- package/dist/cjs/AnimatePresence.native.js +127 -106
- package/dist/cjs/AnimatePresence.native.js.map +1 -1
- package/dist/cjs/LayoutGroupContext.cjs +24 -22
- package/dist/cjs/LayoutGroupContext.native.js +26 -24
- package/dist/cjs/LayoutGroupContext.native.js.map +1 -1
- package/dist/cjs/PresenceChild.cjs +58 -45
- package/dist/cjs/PresenceChild.native.js +103 -91
- package/dist/cjs/PresenceChild.native.js.map +1 -1
- package/dist/cjs/index.cjs +7 -5
- package/dist/cjs/index.native.js +7 -5
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/types.cjs +7 -5
- package/dist/cjs/types.native.js +7 -5
- package/dist/cjs/types.native.js.map +1 -1
- package/dist/esm/AnimatePresence.mjs +96 -77
- package/dist/esm/AnimatePresence.mjs.map +1 -1
- package/dist/esm/AnimatePresence.native.js +111 -92
- package/dist/esm/AnimatePresence.native.js.map +1 -1
- package/dist/esm/PresenceChild.mjs +29 -18
- package/dist/esm/PresenceChild.mjs.map +1 -1
- package/dist/esm/PresenceChild.native.js +60 -50
- package/dist/esm/PresenceChild.native.js.map +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/index.js.map +1 -6
- package/package.json +10 -9
- package/src/AnimatePresence.tsx +150 -143
- package/src/types.ts +10 -9
- package/types/AnimatePresence.d.ts.map +1 -1
- package/types/types.d.ts +9 -9
- package/types/types.d.ts.map +1 -1
- package/dist/cjs/AnimatePresence.js +0 -121
- package/dist/cjs/AnimatePresence.js.map +0 -6
- package/dist/cjs/LayoutGroupContext.js +0 -30
- package/dist/cjs/LayoutGroupContext.js.map +0 -6
- package/dist/cjs/PresenceChild.js +0 -77
- package/dist/cjs/PresenceChild.js.map +0 -6
- package/dist/cjs/index.js +0 -18
- package/dist/cjs/index.js.map +0 -6
- package/dist/cjs/types.js +0 -14
- package/dist/cjs/types.js.map +0 -6
- package/dist/esm/AnimatePresence.js +0 -110
- package/dist/esm/AnimatePresence.js.map +0 -6
- package/dist/esm/LayoutGroupContext.js +0 -6
- package/dist/esm/LayoutGroupContext.js.map +0 -6
- package/dist/esm/PresenceChild.js +0 -57
- package/dist/esm/PresenceChild.js.map +0 -6
- package/dist/esm/types.js +0 -1
- 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
|
-
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
9
|
var __export = (target, all) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
-
|
|
21
|
-
|
|
21
|
+
}
|
|
22
|
+
return to;
|
|
23
|
+
};
|
|
22
24
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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
|
-
|
|
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"
|
|
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
|
-
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
-
|
|
19
|
-
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
20
22
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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
|
-
|
|
55
|
-
|
|
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,
|
|
65
|
-
for (const isComplete of presenceChildren.values())
|
|
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: () =>
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
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])
|
|
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
|
-
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
9
|
var __export = (target, all) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
-
|
|
21
|
-
|
|
21
|
+
}
|
|
22
|
+
return to;
|
|
23
|
+
};
|
|
22
24
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
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
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
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":"
|
|
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":[]}
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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:
|
|
16
|
+
value: true
|
|
15
17
|
}), mod);
|
|
16
18
|
var index_exports = {};
|
|
17
19
|
module.exports = __toCommonJS(index_exports);
|
package/dist/cjs/index.native.js
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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:
|
|
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":"
|
|
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":[]}
|
package/dist/cjs/types.cjs
CHANGED
|
@@ -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
|
|
7
|
-
|
|
8
|
-
|
|
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:
|
|
15
|
+
value: true
|
|
14
16
|
}), mod);
|
|
15
17
|
var types_exports = {};
|
|
16
18
|
module.exports = __toCommonJS(types_exports);
|
package/dist/cjs/types.native.js
CHANGED
|
@@ -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
|
|
9
|
-
|
|
10
|
-
|
|
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:
|
|
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":"
|
|
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":[]}
|