@hanzogui/animate-presence 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 (51) hide show
  1. package/LICENSE +21 -0
  2. package/LICENSE.md +9 -0
  3. package/README.md +1 -0
  4. package/dist/cjs/AnimatePresence.cjs +111 -0
  5. package/dist/cjs/AnimatePresence.native.js +129 -0
  6. package/dist/cjs/AnimatePresence.native.js.map +1 -0
  7. package/dist/cjs/LayoutGroupContext.cjs +38 -0
  8. package/dist/cjs/LayoutGroupContext.native.js +41 -0
  9. package/dist/cjs/LayoutGroupContext.native.js.map +1 -0
  10. package/dist/cjs/PresenceChild.cjs +88 -0
  11. package/dist/cjs/PresenceChild.native.js +116 -0
  12. package/dist/cjs/PresenceChild.native.js.map +1 -0
  13. package/dist/cjs/index.cjs +21 -0
  14. package/dist/cjs/index.native.js +24 -0
  15. package/dist/cjs/index.native.js.map +1 -0
  16. package/dist/cjs/types.cjs +16 -0
  17. package/dist/cjs/types.native.js +19 -0
  18. package/dist/cjs/types.native.js.map +1 -0
  19. package/dist/esm/AnimatePresence.mjs +88 -0
  20. package/dist/esm/AnimatePresence.mjs.map +1 -0
  21. package/dist/esm/AnimatePresence.native.js +103 -0
  22. package/dist/esm/AnimatePresence.native.js.map +1 -0
  23. package/dist/esm/LayoutGroupContext.mjs +4 -0
  24. package/dist/esm/LayoutGroupContext.mjs.map +1 -0
  25. package/dist/esm/LayoutGroupContext.native.js +4 -0
  26. package/dist/esm/LayoutGroupContext.native.js.map +1 -0
  27. package/dist/esm/PresenceChild.mjs +54 -0
  28. package/dist/esm/PresenceChild.mjs.map +1 -0
  29. package/dist/esm/PresenceChild.native.js +79 -0
  30. package/dist/esm/PresenceChild.native.js.map +1 -0
  31. package/dist/esm/index.js +5 -0
  32. package/dist/esm/index.js.map +1 -0
  33. package/dist/esm/index.mjs +5 -0
  34. package/dist/esm/index.mjs.map +1 -0
  35. package/dist/esm/index.native.js +5 -0
  36. package/dist/esm/index.native.js.map +1 -0
  37. package/dist/esm/types.mjs +2 -0
  38. package/dist/esm/types.mjs.map +1 -0
  39. package/dist/esm/types.native.js +2 -0
  40. package/dist/esm/types.native.js.map +1 -0
  41. package/package.json +55 -0
  42. package/src/AnimatePresence.tsx +219 -0
  43. package/src/LayoutGroupContext.tsx +8 -0
  44. package/src/PresenceChild.tsx +90 -0
  45. package/src/index.ts +4 -0
  46. package/src/types.ts +107 -0
  47. package/types/AnimatePresence.d.ts +4 -0
  48. package/types/LayoutGroupContext.d.ts +7 -0
  49. package/types/PresenceChild.d.ts +16 -0
  50. package/types/index.d.ts +5 -0
  51. package/types/types.d.ts +96 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 Nate Wienert
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/LICENSE.md ADDED
@@ -0,0 +1,9 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 Framer B.V.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1 @@
1
+ Much of this is taken from framer-motion.
@@ -0,0 +1,111 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
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, {
13
+ get: () => from[key],
14
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
+ });
16
+ return to;
17
+ };
18
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
+ value: !0
20
+ }), mod);
21
+ var AnimatePresence_exports = {};
22
+ __export(AnimatePresence_exports, {
23
+ AnimatePresence: () => AnimatePresence
24
+ });
25
+ module.exports = __toCommonJS(AnimatePresence_exports);
26
+ var import_react = require("react"),
27
+ import_gui_use_constant = require("@hanzo/gui-use-constant"),
28
+ import_gui_use_force_update = require("@hanzo/gui-use-force-update"),
29
+ import_react2 = require("react"),
30
+ import_LayoutGroupContext = require("./LayoutGroupContext.cjs"),
31
+ import_PresenceChild = require("./PresenceChild.cjs"),
32
+ import_jsx_runtime = require("react/jsx-runtime");
33
+ const getChildKey = child => child.key || (() => {
34
+ const ct = child.type,
35
+ defaultName = ct.displayName || ct.name || "";
36
+ return ct && typeof ct == "object" && "staticConfig" in ct && ct.staticConfig.componentName || defaultName;
37
+ })();
38
+ function onlyElements(children) {
39
+ const filtered = [];
40
+ return import_react2.Children.forEach(children, child => {
41
+ (0, import_react2.isValidElement)(child) && filtered.push(child);
42
+ }), filtered;
43
+ }
44
+ const AnimatePresence = ({
45
+ children,
46
+ enterVariant,
47
+ exitVariant,
48
+ enterExitVariant,
49
+ initial = !0,
50
+ onExitComplete,
51
+ exitBeforeEnter,
52
+ mode,
53
+ presenceAffectsLayout = !0,
54
+ custom,
55
+ passThrough
56
+ }) => {
57
+ const effectiveMode = mode ?? (exitBeforeEnter ? "wait" : "sync"),
58
+ presentChildren = (0, import_react2.useMemo)(() => onlyElements(children), [children]),
59
+ presentKeys = presentChildren.map(getChildKey),
60
+ isInitialRender = (0, import_react2.useRef)(!0),
61
+ frozenCustomRef = (0, import_react2.useRef)(/* @__PURE__ */new Map()),
62
+ pendingPresentChildren = (0, import_react2.useRef)(presentChildren),
63
+ exitComplete = (0, import_gui_use_constant.useConstant)(() => /* @__PURE__ */new Map()),
64
+ [diffedChildren, setDiffedChildren] = (0, import_react2.useState)(presentChildren),
65
+ [renderedChildren, setRenderedChildren] = (0, import_react2.useState)(presentChildren),
66
+ forceRender = (0, import_react2.useContext)(import_LayoutGroupContext.LayoutGroupContext).forceRender ?? (0, import_gui_use_force_update.useForceUpdate)();
67
+ if (passThrough) return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
68
+ children
69
+ });
70
+ if ((0, import_react.useInsertionEffect)(() => {
71
+ isInitialRender.current = !1, pendingPresentChildren.current = presentChildren;
72
+ for (let i = 0; i < renderedChildren.length; i++) {
73
+ const key = getChildKey(renderedChildren[i]);
74
+ presentKeys.includes(key) ? (exitComplete.delete(key), frozenCustomRef.current.delete(key)) : exitComplete.get(key) !== !0 && exitComplete.set(key, !1);
75
+ }
76
+ }, [renderedChildren, presentKeys.length, presentKeys.join("-")]), presentChildren !== diffedChildren) {
77
+ let nextChildren = [...presentChildren];
78
+ for (let i = 0; i < renderedChildren.length; i++) {
79
+ const child = renderedChildren[i],
80
+ key = getChildKey(child);
81
+ presentKeys.includes(key) || (nextChildren.splice(i, 0, child), frozenCustomRef.current.has(key) || frozenCustomRef.current.set(key, custom));
82
+ }
83
+ const exitingChildren = renderedChildren.filter(child => !presentKeys.includes(getChildKey(child)));
84
+ return effectiveMode === "wait" && exitingChildren.length && (nextChildren = exitingChildren), setRenderedChildren(onlyElements(nextChildren)), setDiffedChildren(presentChildren), null;
85
+ }
86
+ return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
87
+ children: renderedChildren.map(child => {
88
+ const key = getChildKey(child),
89
+ isPresent = presentChildren === renderedChildren || presentKeys.includes(key),
90
+ onExit = () => {
91
+ if (exitComplete.has(key)) exitComplete.set(key, !0);else return;
92
+ let isEveryExitComplete = !0;
93
+ exitComplete.forEach(isExitComplete => {
94
+ isExitComplete || (isEveryExitComplete = !1);
95
+ }), isEveryExitComplete && (forceRender?.(), setRenderedChildren(pendingPresentChildren.current), onExitComplete?.());
96
+ };
97
+ return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_PresenceChild.PresenceChild, {
98
+ isPresent,
99
+ initial: !isInitialRender.current || initial ? void 0 : !1,
100
+ custom: isPresent ? custom : frozenCustomRef.current.get(key) ?? custom,
101
+ presenceAffectsLayout,
102
+ enterExitVariant,
103
+ enterVariant,
104
+ exitVariant,
105
+ onExitComplete: isPresent ? void 0 : onExit,
106
+ children: child
107
+ }, key);
108
+ })
109
+ });
110
+ };
111
+ AnimatePresence.displayName = "AnimatePresence";
@@ -0,0 +1,129 @@
1
+ "use strict";
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
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, {
15
+ get: () => from[key],
16
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
+ });
18
+ return to;
19
+ };
20
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
+ value: !0
22
+ }), mod);
23
+ var AnimatePresence_exports = {};
24
+ __export(AnimatePresence_exports, {
25
+ AnimatePresence: () => AnimatePresence
26
+ });
27
+ module.exports = __toCommonJS(AnimatePresence_exports);
28
+ var import_jsx_runtime = require("react/jsx-runtime"),
29
+ import_react = require("react"),
30
+ import_gui_use_constant = require("@hanzo/gui-use-constant"),
31
+ import_gui_use_force_update = require("@hanzo/gui-use-force-update"),
32
+ import_react2 = require("react"),
33
+ import_LayoutGroupContext = require("./LayoutGroupContext.native.js"),
34
+ import_PresenceChild = require("./PresenceChild.native.js");
35
+ function _type_of(obj) {
36
+ "@swc/helpers - typeof";
37
+
38
+ return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
39
+ }
40
+ var getChildKey = function (child) {
41
+ return child.key || function () {
42
+ var ct = child.type,
43
+ defaultName = ct.displayName || ct.name || "";
44
+ return ct && (typeof ct > "u" ? "undefined" : _type_of(ct)) === "object" && "staticConfig" in ct && ct.staticConfig.componentName || defaultName;
45
+ }();
46
+ };
47
+ function onlyElements(children) {
48
+ var filtered = [];
49
+ return import_react2.Children.forEach(children, function (child) {
50
+ /* @__PURE__ */(0, import_react2.isValidElement)(child) && filtered.push(child);
51
+ }), filtered;
52
+ }
53
+ var AnimatePresence = function (param) {
54
+ var {
55
+ children,
56
+ enterVariant,
57
+ exitVariant,
58
+ enterExitVariant,
59
+ initial = !0,
60
+ onExitComplete,
61
+ exitBeforeEnter,
62
+ mode,
63
+ presenceAffectsLayout = !0,
64
+ custom,
65
+ passThrough
66
+ } = param,
67
+ effectiveMode = mode ?? (exitBeforeEnter ? "wait" : "sync"),
68
+ presentChildren = (0, import_react2.useMemo)(function () {
69
+ return onlyElements(children);
70
+ }, [children]),
71
+ presentKeys = presentChildren.map(getChildKey),
72
+ isInitialRender = (0, import_react2.useRef)(!0),
73
+ frozenCustomRef = (0, import_react2.useRef)(/* @__PURE__ */new Map()),
74
+ pendingPresentChildren = (0, import_react2.useRef)(presentChildren),
75
+ exitComplete = (0, import_gui_use_constant.useConstant)(function () {
76
+ return /* @__PURE__ */new Map();
77
+ }),
78
+ [diffedChildren, setDiffedChildren] = (0, import_react2.useState)(presentChildren),
79
+ [renderedChildren, setRenderedChildren] = (0, import_react2.useState)(presentChildren),
80
+ _useContext_forceRender,
81
+ forceRender = (_useContext_forceRender = (0, import_react2.useContext)(import_LayoutGroupContext.LayoutGroupContext).forceRender) !== null && _useContext_forceRender !== void 0 ? _useContext_forceRender : (0, import_gui_use_force_update.useForceUpdate)();
82
+ if (passThrough) return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
83
+ children
84
+ });
85
+ if ((0, import_react.useInsertionEffect)(function () {
86
+ isInitialRender.current = !1, pendingPresentChildren.current = presentChildren;
87
+ for (var i2 = 0; i2 < renderedChildren.length; i2++) {
88
+ var key2 = getChildKey(renderedChildren[i2]);
89
+ presentKeys.includes(key2) ? (exitComplete.delete(key2), frozenCustomRef.current.delete(key2)) : exitComplete.get(key2) !== !0 && exitComplete.set(key2, !1);
90
+ }
91
+ }, [renderedChildren, presentKeys.length, presentKeys.join("-")]), presentChildren !== diffedChildren) {
92
+ for (var nextChildren = [...presentChildren], i = 0; i < renderedChildren.length; i++) {
93
+ var child = renderedChildren[i],
94
+ key = getChildKey(child);
95
+ presentKeys.includes(key) || (nextChildren.splice(i, 0, child), frozenCustomRef.current.has(key) || frozenCustomRef.current.set(key, custom));
96
+ }
97
+ var exitingChildren = renderedChildren.filter(function (child2) {
98
+ return !presentKeys.includes(getChildKey(child2));
99
+ });
100
+ return effectiveMode === "wait" && exitingChildren.length && (nextChildren = exitingChildren), setRenderedChildren(onlyElements(nextChildren)), setDiffedChildren(presentChildren), null;
101
+ }
102
+ return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
103
+ children: renderedChildren.map(function (child2) {
104
+ var key2 = getChildKey(child2),
105
+ isPresent = presentChildren === renderedChildren || presentKeys.includes(key2),
106
+ onExit = function () {
107
+ if (exitComplete.has(key2)) exitComplete.set(key2, !0);else return;
108
+ var isEveryExitComplete = !0;
109
+ exitComplete.forEach(function (isExitComplete) {
110
+ isExitComplete || (isEveryExitComplete = !1);
111
+ }), isEveryExitComplete && (forceRender?.(), setRenderedChildren(pendingPresentChildren.current), onExitComplete?.());
112
+ },
113
+ _frozenCustomRef_current_get;
114
+ return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_PresenceChild.PresenceChild, {
115
+ isPresent,
116
+ initial: !isInitialRender.current || initial ? void 0 : !1,
117
+ custom: isPresent ? custom : (_frozenCustomRef_current_get = frozenCustomRef.current.get(key2)) !== null && _frozenCustomRef_current_get !== void 0 ? _frozenCustomRef_current_get : custom,
118
+ presenceAffectsLayout,
119
+ enterExitVariant,
120
+ enterVariant,
121
+ exitVariant,
122
+ onExitComplete: isPresent ? void 0 : onExit,
123
+ children: child2
124
+ }, key2);
125
+ })
126
+ });
127
+ };
128
+ AnimatePresence.displayName = "AnimatePresence";
129
+ //# sourceMappingURL=AnimatePresence.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","AnimatePresence_exports","__export","AnimatePresence","module","exports","import_jsx_runtime","require","import_react","import_gui_use_constant","import_gui_use_force_update","import_react2","import_LayoutGroupContext","import_PresenceChild","_type_of","obj","Symbol","constructor","getChildKey","child","key","ct","type","defaultName","displayName","name","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","delete","get","set","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,uBACnC;AAUA,IAAAK,kBAAqB,GAAAC,OAEjB,oBACO;EAAAC,YAAA,GAAAD,OAAA;EAAAE,uBAAA,GAAAF,OAAA;EAAAG,2BAAA,GAAAH,OAAA;EAAAI,aAAA,GAAAJ,OAAA;EAAAK,yBAAA,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A,mBAAA,KAAAzB,WAAA,MAAAF,mBAAA,CAAAP,sBAAA,CAAAgB,OAAA,GAAA/B,cAAA;QAAA;QACAmD,4BAAA;MAAA,OACA,mBAAArF,kBAAA,CAAA8D,GAAA,EAAAvD,oBAAA,CAAA+E,aAAA;QACAL,SAAA;QAEChD,OAAA,GAAAY,eAAA,CAAAoB,OAAA,IAAAhC,OAAA;QAAAK,MAAA,EAAA2C,SAAA,GAAA3C,MAAA,IAAA+C,4BAAA,GAAAtC,eAAA,CAAAkB,OAAA,CAAAM,GAAA,CAAAH,IAAA,eAAAiB,4BAAA,cAAAA,4BAAA,GAAA/C,MAAA;QAVID,qBAAA;QAWPL,gBAAA;QAGNF,YAAA;QAEJC,WAAA;QAEAG,cAAgB,EAAA+C,SAAc,YAAAC,MAAA","ignoreList":[]}
@@ -0,0 +1,38 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf,
6
+ __hasOwnProp = Object.prototype.hasOwnProperty;
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, {
15
+ get: () => from[key],
16
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
+ });
18
+ return to;
19
+ };
20
+ 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);
32
+ var LayoutGroupContext_exports = {};
33
+ __export(LayoutGroupContext_exports, {
34
+ LayoutGroupContext: () => LayoutGroupContext
35
+ });
36
+ module.exports = __toCommonJS(LayoutGroupContext_exports);
37
+ var import_react = __toESM(require("react"), 1);
38
+ const LayoutGroupContext = import_react.default.createContext({});
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf,
8
+ __hasOwnProp = Object.prototype.hasOwnProperty;
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, {
17
+ get: () => from[key],
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ return to;
21
+ };
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
+ // If the importer is in node compatibility mode or this is not an ESM
24
+ // file that has been converted to a CommonJS file using a Babel-
25
+ // compatible transform (i.e. "__esModule" has not been set), then set
26
+ // "default" to the CommonJS "module.exports" for node compatibility.
27
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
28
+ value: mod,
29
+ enumerable: !0
30
+ }) : target, mod)),
31
+ __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
32
+ value: !0
33
+ }), mod);
34
+ var LayoutGroupContext_exports = {};
35
+ __export(LayoutGroupContext_exports, {
36
+ LayoutGroupContext: () => LayoutGroupContext
37
+ });
38
+ module.exports = __toCommonJS(LayoutGroupContext_exports);
39
+ var import_react = __toESM(require("react"), 1),
40
+ LayoutGroupContext = /* @__PURE__ */import_react.default.createContext({});
41
+ //# sourceMappingURL=LayoutGroupContext.native.js.map
@@ -0,0 +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":[]}
@@ -0,0 +1,88 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf,
6
+ __hasOwnProp = Object.prototype.hasOwnProperty;
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, {
15
+ get: () => from[key],
16
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
+ });
18
+ return to;
19
+ };
20
+ 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);
32
+ var PresenceChild_exports = {};
33
+ __export(PresenceChild_exports, {
34
+ PresenceChild: () => PresenceChild
35
+ });
36
+ module.exports = __toCommonJS(PresenceChild_exports);
37
+ var import_gui_use_constant = require("@hanzo/gui-use-constant"),
38
+ import_gui_use_presence = require("@hanzo/gui-use-presence"),
39
+ React = __toESM(require("react"), 1),
40
+ import_react = require("react"),
41
+ import_jsx_runtime = require("react/jsx-runtime");
42
+ const PresenceChild = React.memo(({
43
+ children,
44
+ initial,
45
+ isPresent,
46
+ onExitComplete,
47
+ exitVariant,
48
+ enterVariant,
49
+ enterExitVariant,
50
+ presenceAffectsLayout,
51
+ custom
52
+ }) => {
53
+ const presenceChildren = (0, import_gui_use_constant.useConstant)(newChildrenMap),
54
+ id = (0, import_react.useId)() || "",
55
+ context = React.useMemo(() => ({
56
+ id,
57
+ initial,
58
+ isPresent,
59
+ custom,
60
+ exitVariant,
61
+ enterVariant,
62
+ enterExitVariant,
63
+ onExitComplete: () => {
64
+ presenceChildren.set(id, !0);
65
+ for (const isComplete of presenceChildren.values()) if (!isComplete) return;
66
+ onExitComplete?.();
67
+ },
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(() => {
80
+ !isPresent && !presenceChildren.size && onExitComplete?.();
81
+ }, [isPresent]), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_gui_use_presence.PresenceContext.Provider, {
82
+ value: context,
83
+ children
84
+ });
85
+ });
86
+ function newChildrenMap() {
87
+ return /* @__PURE__ */new Map();
88
+ }
@@ -0,0 +1,116 @@
1
+ "use strict";
2
+
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf,
8
+ __hasOwnProp = Object.prototype.hasOwnProperty;
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, {
17
+ get: () => from[key],
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ return to;
21
+ };
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
+ // If the importer is in node compatibility mode or this is not an ESM
24
+ // file that has been converted to a CommonJS file using a Babel-
25
+ // compatible transform (i.e. "__esModule" has not been set), then set
26
+ // "default" to the CommonJS "module.exports" for node compatibility.
27
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
28
+ value: mod,
29
+ enumerable: !0
30
+ }) : target, mod)),
31
+ __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
32
+ value: !0
33
+ }), mod);
34
+ var PresenceChild_exports = {};
35
+ __export(PresenceChild_exports, {
36
+ PresenceChild: () => PresenceChild
37
+ });
38
+ module.exports = __toCommonJS(PresenceChild_exports);
39
+ var import_jsx_runtime = require("react/jsx-runtime"),
40
+ import_gui_use_constant = require("@hanzo/gui-use-constant"),
41
+ import_gui_use_presence = require("@hanzo/gui-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_gui_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
+ }
85
+ }
86
+ onExitComplete?.();
87
+ },
88
+ register: function () {
89
+ return presenceChildren.set(id, !1), function () {
90
+ return presenceChildren.delete(id);
91
+ };
92
+ }
93
+ };
94
+ },
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_gui_use_presence.PresenceContext.Provider, {
109
+ value: context,
110
+ children
111
+ });
112
+ });
113
+ function newChildrenMap() {
114
+ return /* @__PURE__ */new Map();
115
+ }
116
+ //# sourceMappingURL=PresenceChild.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","PresenceChild_exports","__export","PresenceChild","module","exports","import_jsx_runtime","require","import_gui_use_constant","import_gui_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,YAAA,CAA4BK,qBAAA;AAqBrB,IAAAK,kBAAsB,GAAAC,OAAM;EAAAC,uBAAA,GAAAD,OAAA;EAAAE,uBAAA,GAAAF,OAAA;EAAAG,KAAA,GAAAC,OAAA,CAAAJ,OAAA;EAAAK,YAAA,GAAAL,OAAA;EAAAJ,aAAA,kBAAAO,KAAA,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TE,WAAA,E","ignoreList":[]}
@@ -0,0 +1,21 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
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
+ });
10
+ return to;
11
+ },
12
+ __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
13
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
14
+ value: !0
15
+ }), mod);
16
+ var index_exports = {};
17
+ module.exports = __toCommonJS(index_exports);
18
+ __reExport(index_exports, require("./AnimatePresence.cjs"), module.exports);
19
+ __reExport(index_exports, require("@hanzo/gui-use-presence"), module.exports);
20
+ __reExport(index_exports, require("./types.cjs"), module.exports);
21
+ __reExport(index_exports, require("./PresenceChild.cjs"), module.exports);
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
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
+ });
12
+ return to;
13
+ },
14
+ __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
16
+ value: !0
17
+ }), mod);
18
+ var index_exports = {};
19
+ module.exports = __toCommonJS(index_exports);
20
+ __reExport(index_exports, require("./AnimatePresence.native.js"), module.exports);
21
+ __reExport(index_exports, require("@hanzo/gui-use-presence"), module.exports);
22
+ __reExport(index_exports, require("./types.native.js"), module.exports);
23
+ __reExport(index_exports, require("./PresenceChild.native.js"), module.exports);
24
+ //# sourceMappingURL=index.native.js.map
@@ -0,0 +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,0BAFd,GAAAH,MAAA,CAAAC,OAAA;AAGAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,uBAAAH,MAAA,CAAAC,OAHd","ignoreList":[]}
@@ -0,0 +1,16 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
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
+ });
10
+ return to;
11
+ };
12
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
13
+ value: !0
14
+ }), mod);
15
+ var types_exports = {};
16
+ module.exports = __toCommonJS(types_exports);