@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
@@ -0,0 +1,19 @@
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
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
15
+ value: !0
16
+ }), mod);
17
+ var types_exports = {};
18
+ module.exports = __toCommonJS(types_exports);
19
+ //# sourceMappingURL=types.native.js.map
@@ -0,0 +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":[]}
@@ -0,0 +1,88 @@
1
+ import { useInsertionEffect } from "react";
2
+ import { useConstant } from "@hanzo/gui-use-constant";
3
+ import { useForceUpdate } from "@hanzo/gui-use-force-update";
4
+ import { Children, isValidElement, useContext, useMemo, useRef, useState } from "react";
5
+ import { LayoutGroupContext } from "./LayoutGroupContext.mjs";
6
+ import { PresenceChild } from "./PresenceChild.mjs";
7
+ import { Fragment, jsx } from "react/jsx-runtime";
8
+ const getChildKey = child => child.key || (() => {
9
+ const ct = child.type,
10
+ defaultName = ct.displayName || ct.name || "";
11
+ return ct && typeof ct == "object" && "staticConfig" in ct && ct.staticConfig.componentName || defaultName;
12
+ })();
13
+ function onlyElements(children) {
14
+ const filtered = [];
15
+ return Children.forEach(children, child => {
16
+ isValidElement(child) && filtered.push(child);
17
+ }), filtered;
18
+ }
19
+ const AnimatePresence = ({
20
+ children,
21
+ enterVariant,
22
+ exitVariant,
23
+ enterExitVariant,
24
+ initial = !0,
25
+ onExitComplete,
26
+ exitBeforeEnter,
27
+ mode,
28
+ presenceAffectsLayout = !0,
29
+ custom,
30
+ passThrough
31
+ }) => {
32
+ const effectiveMode = mode ?? (exitBeforeEnter ? "wait" : "sync"),
33
+ presentChildren = useMemo(() => onlyElements(children), [children]),
34
+ presentKeys = presentChildren.map(getChildKey),
35
+ isInitialRender = useRef(!0),
36
+ frozenCustomRef = useRef(/* @__PURE__ */new Map()),
37
+ pendingPresentChildren = useRef(presentChildren),
38
+ exitComplete = useConstant(() => /* @__PURE__ */new Map()),
39
+ [diffedChildren, setDiffedChildren] = useState(presentChildren),
40
+ [renderedChildren, setRenderedChildren] = useState(presentChildren),
41
+ forceRender = useContext(LayoutGroupContext).forceRender ?? useForceUpdate();
42
+ if (passThrough) return /* @__PURE__ */jsx(Fragment, {
43
+ children
44
+ });
45
+ if (useInsertionEffect(() => {
46
+ isInitialRender.current = !1, pendingPresentChildren.current = presentChildren;
47
+ for (let i = 0; i < renderedChildren.length; i++) {
48
+ const key = getChildKey(renderedChildren[i]);
49
+ presentKeys.includes(key) ? (exitComplete.delete(key), frozenCustomRef.current.delete(key)) : exitComplete.get(key) !== !0 && exitComplete.set(key, !1);
50
+ }
51
+ }, [renderedChildren, presentKeys.length, presentKeys.join("-")]), presentChildren !== diffedChildren) {
52
+ let nextChildren = [...presentChildren];
53
+ for (let i = 0; i < renderedChildren.length; i++) {
54
+ const child = renderedChildren[i],
55
+ key = getChildKey(child);
56
+ presentKeys.includes(key) || (nextChildren.splice(i, 0, child), frozenCustomRef.current.has(key) || frozenCustomRef.current.set(key, custom));
57
+ }
58
+ const exitingChildren = renderedChildren.filter(child => !presentKeys.includes(getChildKey(child)));
59
+ return effectiveMode === "wait" && exitingChildren.length && (nextChildren = exitingChildren), setRenderedChildren(onlyElements(nextChildren)), setDiffedChildren(presentChildren), null;
60
+ }
61
+ return /* @__PURE__ */jsx(Fragment, {
62
+ children: renderedChildren.map(child => {
63
+ const key = getChildKey(child),
64
+ isPresent = presentChildren === renderedChildren || presentKeys.includes(key),
65
+ onExit = () => {
66
+ if (exitComplete.has(key)) exitComplete.set(key, !0);else return;
67
+ let isEveryExitComplete = !0;
68
+ exitComplete.forEach(isExitComplete => {
69
+ isExitComplete || (isEveryExitComplete = !1);
70
+ }), isEveryExitComplete && (forceRender?.(), setRenderedChildren(pendingPresentChildren.current), onExitComplete?.());
71
+ };
72
+ return /* @__PURE__ */jsx(PresenceChild, {
73
+ isPresent,
74
+ initial: !isInitialRender.current || initial ? void 0 : !1,
75
+ custom: isPresent ? custom : frozenCustomRef.current.get(key) ?? custom,
76
+ presenceAffectsLayout,
77
+ enterExitVariant,
78
+ enterVariant,
79
+ exitVariant,
80
+ onExitComplete: isPresent ? void 0 : onExit,
81
+ children: child
82
+ }, key);
83
+ })
84
+ });
85
+ };
86
+ AnimatePresence.displayName = "AnimatePresence";
87
+ export { AnimatePresence };
88
+ //# sourceMappingURL=AnimatePresence.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useInsertionEffect","useConstant","useForceUpdate","Children","isValidElement","useContext","useMemo","useRef","useState","LayoutGroupContext","PresenceChild","Fragment","jsx","getChildKey","child","key","ct","type","defaultName","displayName","name","staticConfig","componentName","onlyElements","children","filtered","forEach","push","AnimatePresence","enterVariant","exitVariant","enterExitVariant","initial","onExitComplete","exitBeforeEnter","mode","presenceAffectsLayout","custom","passThrough","effectiveMode","presentChildren","presentKeys","map","isInitialRender","frozenCustomRef","Map","pendingPresentChildren","exitComplete","diffedChildren","setDiffedChildren","renderedChildren","setRenderedChildren","forceRender","current","i","length","includes","delete","get","set","join","nextChildren","splice","has","exitingChildren","filter","isPresent","onExit","isEveryExitComplete","isExitComplete"],"sources":["../../src/AnimatePresence.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,kBAAA,QAA0B;AACnC,SAASC,WAAA,QAAmB;AAC5B,SAASC,cAAA,QAAsB;AAE/B,SAASC,QAAA,EAAUC,cAAA,EAAgBC,UAAA,EAAYC,OAAA,EAASC,MAAA,EAAQC,QAAA,QAAgB;AAChF,SAASC,kBAAA,QAA0B;AACnC,SAASC,aAAA,QAAqB;AAiGnB,SAAAC,QAAA,EAAAC,GAAA;AA5FX,MAAMC,WAAA,GAAeC,KAAA,IAEjBA,KAAA,CAAMC,GAAA,KACL,MAAM;EAEL,MAAMC,EAAA,GAAKF,KAAA,CAAMG,IAAA;IACXC,WAAA,GAAcF,EAAA,CAAGG,WAAA,IAAkBH,EAAA,CAAGI,IAAA,IAAW;EACvD,OAAIJ,EAAA,IAAM,OAAOA,EAAA,IAAO,YAAY,kBAAkBA,EAAA,IAE7CA,EAAA,CAAGK,YAAA,CAAaC,aAAA,IAAiBJ,WAAA;AAG5C,GAAG;AAIP,SAASK,aAAaC,QAAA,EAA0C;EAC9D,MAAMC,QAAA,GAAgC,EAAC;EAEvC,OAAAtB,QAAA,CAASuB,OAAA,CAAQF,QAAA,EAAWV,KAAA,IAAU;IAChCV,cAAA,CAAeU,KAAK,KAAGW,QAAA,CAASE,IAAA,CAAKb,KAAK;EAChD,CAAC,GACMW,QAAA;AACT;AAEO,MAAM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AAA,GAAMF,WAAA,CAAYC,KAAK;QACvBoD,SAAA,GACJ1B,eAAA,KAAoBU,gBAAA,IAAoBT,WAAA,CAAYe,QAAA,CAASzC,GAAG;QAE5DoD,MAAA,GAASA,CAAA,KAAM;UACnB,IAAIpB,YAAA,CAAagB,GAAA,CAAIhD,GAAG,GACtBgC,YAAA,CAAaY,GAAA,CAAI5C,GAAA,EAAK,EAAI,OAE1B;UAGF,IAAIqD,mBAAA,GAAsB;UAC1BrB,YAAA,CAAarB,OAAA,CAAS2C,cAAA,IAAmB;YAClCA,cAAA,KAAgBD,mBAAA,GAAsB;UAC7C,CAAC,GAEGA,mBAAA,KACFhB,WAAA,GAAc,GACdD,mBAAA,CAAoBL,sBAAA,CAAuBO,OAAO,GAClDpB,cAAA,GAAiB;QAErB;MAEA,OACE,eAAArB,GAAA,CAACF,aAAA;QAECwD,SAAA;QACAlC,OAAA,EAAS,CAACW,eAAA,CAAgBU,OAAA,IAAWrB,OAAA,GAAU,SAAY;QAC3DK,MAAA,EAAQ6B,SAAA,GAAY7B,MAAA,GAAUO,eAAA,CAAgBS,OAAA,CAAQK,GAAA,CAAI3C,GAAG,KAAKsB,MAAA;QAClED,qBAAA;QACAL,gBAAA;QACAF,YAAA;QACAC,WAAA;QACAG,cAAA,EAAgBiC,SAAA,GAAY,SAAYC,MAAA;QAEvC3C,QAAA,EAAAV;MAAA,GAVIC,GAWP;IAEJ,CAAC;EAAA,CACH;AAEJ;AAEAa,eAAA,CAAgBT,WAAA,GAAc","ignoreList":[]}
@@ -0,0 +1,103 @@
1
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useInsertionEffect } from "react";
3
+ import { useConstant } from "@hanzo/gui-use-constant";
4
+ import { useForceUpdate } from "@hanzo/gui-use-force-update";
5
+ import { Children, isValidElement, useContext, useMemo, useRef, useState } from "react";
6
+ import { LayoutGroupContext } from "./LayoutGroupContext.native.js";
7
+ import { PresenceChild } from "./PresenceChild.native.js";
8
+ function _type_of(obj) {
9
+ "@swc/helpers - typeof";
10
+
11
+ return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
12
+ }
13
+ var getChildKey = function (child) {
14
+ return child.key || function () {
15
+ var ct = child.type,
16
+ defaultName = ct.displayName || ct.name || "";
17
+ return ct && (typeof ct > "u" ? "undefined" : _type_of(ct)) === "object" && "staticConfig" in ct && ct.staticConfig.componentName || defaultName;
18
+ }();
19
+ };
20
+ function onlyElements(children) {
21
+ var filtered = [];
22
+ return Children.forEach(children, function (child) {
23
+ /* @__PURE__ */isValidElement(child) && filtered.push(child);
24
+ }), filtered;
25
+ }
26
+ var AnimatePresence = function (param) {
27
+ var {
28
+ children,
29
+ enterVariant,
30
+ exitVariant,
31
+ enterExitVariant,
32
+ initial = !0,
33
+ onExitComplete,
34
+ exitBeforeEnter,
35
+ mode,
36
+ presenceAffectsLayout = !0,
37
+ custom,
38
+ passThrough
39
+ } = param,
40
+ effectiveMode = mode ?? (exitBeforeEnter ? "wait" : "sync"),
41
+ presentChildren = useMemo(function () {
42
+ return onlyElements(children);
43
+ }, [children]),
44
+ presentKeys = presentChildren.map(getChildKey),
45
+ isInitialRender = useRef(!0),
46
+ frozenCustomRef = useRef(/* @__PURE__ */new Map()),
47
+ pendingPresentChildren = useRef(presentChildren),
48
+ exitComplete = useConstant(function () {
49
+ return /* @__PURE__ */new Map();
50
+ }),
51
+ [diffedChildren, setDiffedChildren] = useState(presentChildren),
52
+ [renderedChildren, setRenderedChildren] = useState(presentChildren),
53
+ _useContext_forceRender,
54
+ forceRender = (_useContext_forceRender = useContext(LayoutGroupContext).forceRender) !== null && _useContext_forceRender !== void 0 ? _useContext_forceRender : useForceUpdate();
55
+ if (passThrough) return /* @__PURE__ */_jsx(_Fragment, {
56
+ children
57
+ });
58
+ if (useInsertionEffect(function () {
59
+ isInitialRender.current = !1, pendingPresentChildren.current = presentChildren;
60
+ for (var i2 = 0; i2 < renderedChildren.length; i2++) {
61
+ var key2 = getChildKey(renderedChildren[i2]);
62
+ presentKeys.includes(key2) ? (exitComplete.delete(key2), frozenCustomRef.current.delete(key2)) : exitComplete.get(key2) !== !0 && exitComplete.set(key2, !1);
63
+ }
64
+ }, [renderedChildren, presentKeys.length, presentKeys.join("-")]), presentChildren !== diffedChildren) {
65
+ for (var nextChildren = [...presentChildren], i = 0; i < renderedChildren.length; i++) {
66
+ var child = renderedChildren[i],
67
+ key = getChildKey(child);
68
+ presentKeys.includes(key) || (nextChildren.splice(i, 0, child), frozenCustomRef.current.has(key) || frozenCustomRef.current.set(key, custom));
69
+ }
70
+ var exitingChildren = renderedChildren.filter(function (child2) {
71
+ return !presentKeys.includes(getChildKey(child2));
72
+ });
73
+ return effectiveMode === "wait" && exitingChildren.length && (nextChildren = exitingChildren), setRenderedChildren(onlyElements(nextChildren)), setDiffedChildren(presentChildren), null;
74
+ }
75
+ return /* @__PURE__ */_jsx(_Fragment, {
76
+ children: renderedChildren.map(function (child2) {
77
+ var key2 = getChildKey(child2),
78
+ isPresent = presentChildren === renderedChildren || presentKeys.includes(key2),
79
+ onExit = function () {
80
+ if (exitComplete.has(key2)) exitComplete.set(key2, !0);else return;
81
+ var isEveryExitComplete = !0;
82
+ exitComplete.forEach(function (isExitComplete) {
83
+ isExitComplete || (isEveryExitComplete = !1);
84
+ }), isEveryExitComplete && (forceRender?.(), setRenderedChildren(pendingPresentChildren.current), onExitComplete?.());
85
+ },
86
+ _frozenCustomRef_current_get;
87
+ return /* @__PURE__ */_jsx(PresenceChild, {
88
+ isPresent,
89
+ initial: !isInitialRender.current || initial ? void 0 : !1,
90
+ custom: isPresent ? custom : (_frozenCustomRef_current_get = frozenCustomRef.current.get(key2)) !== null && _frozenCustomRef_current_get !== void 0 ? _frozenCustomRef_current_get : custom,
91
+ presenceAffectsLayout,
92
+ enterExitVariant,
93
+ enterVariant,
94
+ exitVariant,
95
+ onExitComplete: isPresent ? void 0 : onExit,
96
+ children: child2
97
+ }, key2);
98
+ })
99
+ });
100
+ };
101
+ AnimatePresence.displayName = "AnimatePresence";
102
+ export { AnimatePresence };
103
+ //# sourceMappingURL=AnimatePresence.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["jsx","_jsx","Fragment","_Fragment","useInsertionEffect","useConstant","useForceUpdate","Children","isValidElement","useContext","useMemo","useRef","useState","LayoutGroupContext","PresenceChild","_type_of","obj","Symbol","constructor","getChildKey","child","key","ct","type","defaultName","displayName","name","staticConfig","componentName","onlyElements","children","filtered","forEach","push","AnimatePresence","param","enterVariant","exitVariant","enterExitVariant","initial","onExitComplete","exitBeforeEnter","mode","presenceAffectsLayout","custom","passThrough","effectiveMode","presentChildren","presentKeys","map","isInitialRender","frozenCustomRef","Map","pendingPresentChildren","exitComplete","diffedChildren","setDiffedChildren","renderedChildren","setRenderedChildren","_useContext_forceRender","forceRender","current","i2","length","key2","includes","delete","get","set","join","nextChildren","i","splice","has","exitingChildren","filter","child2","isPresent","onExit","isEveryExitComplete","isExitComplete","_frozenCustomRef_current_get"],"sources":["../../src/AnimatePresence.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAA0B;AACnC,SAASC,kBAAA,QAAmB;AAC5B,SAASC,WAAA,iCAAsB;AAE/B,SAASC,cAAU,qCAAqC;AACxD,SAASC,QAAA,EAAAC,cAAA,EAA0BC,UAAA,EAAAC,OAAA,EAAAC,MAAA,EAAAC,QAAA;AACnC,SAASC,kBAAA,QAAqB;AAiGnB,SAAAC,aAAA;AA5FX,SAAMC,SAAAC,GAAe;EAKf,uBACM;;EACN,OAAIA,GAAA,IAAM,OAAOC,MAAO,UAAAD,GAAY,CAAAE,WAAA,KAAkBD,MAE7C,GAAG,kBAAaD,GAAA;AAG3B;AAIJ,IAAAG,WAAS,YAAAA,CAAaC,KAA0C;EAC9D,OAAMA,KAAA,CAAAC,GAAA,IAAiC;IAEvC,IAAAC,EAAA,GAAAF,KAAS,CAAAG,IAAA;MAAAC,WA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= React.createContext({});
3
+ export { LayoutGroupContext };
4
+ //# sourceMappingURL=LayoutGroupContext.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","LayoutGroupContext","createContext"],"sources":["../../src/LayoutGroupContext.tsx"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,KAAA,MAAW;AAOX,MAAMC,kBAAA,GAAqBD,KAAA,CAAME,aAAA,CAAuC,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ var LayoutGroupContext = /* @__PURE__ */React.createContext({});
3
+ export { LayoutGroupContext };
4
+ //# sourceMappingURL=LayoutGroupContext.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","LayoutGroupContext","createContext"],"sources":["../../src/LayoutGroupContext.tsx"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,KAAA,MAAW;AAOX,IAAAC,kBAAM,kBAA2BD,KAAA,CAAuCE,aAAE","ignoreList":[]}
@@ -0,0 +1,54 @@
1
+ import { useConstant } from "@hanzo/gui-use-constant";
2
+ import { PresenceContext } from "@hanzo/gui-use-presence";
3
+ import * as React from "react";
4
+ import { useId } from "react";
5
+ import { jsx } from "react/jsx-runtime";
6
+ const PresenceChild = React.memo(({
7
+ children,
8
+ initial,
9
+ isPresent,
10
+ onExitComplete,
11
+ exitVariant,
12
+ enterVariant,
13
+ enterExitVariant,
14
+ presenceAffectsLayout,
15
+ custom
16
+ }) => {
17
+ const presenceChildren = useConstant(newChildrenMap),
18
+ id = useId() || "",
19
+ context = React.useMemo(() => ({
20
+ id,
21
+ initial,
22
+ isPresent,
23
+ custom,
24
+ exitVariant,
25
+ enterVariant,
26
+ enterExitVariant,
27
+ onExitComplete: () => {
28
+ presenceChildren.set(id, !0);
29
+ for (const isComplete of presenceChildren.values()) if (!isComplete) return;
30
+ onExitComplete?.();
31
+ },
32
+ register: () => (presenceChildren.set(id, !1), () => presenceChildren.delete(id))
33
+ }),
34
+ /**
35
+ * If the presence of a child affects the layout of the components around it,
36
+ * we want to make a new context value to ensure they get re-rendered
37
+ * so they can detect that layout change.
38
+ */
39
+ // @ts-expect-error its ok
40
+ presenceAffectsLayout ? void 0 : [isPresent, exitVariant, enterVariant]);
41
+ return React.useMemo(() => {
42
+ presenceChildren.forEach((_, key) => presenceChildren.set(key, !1));
43
+ }, [isPresent]), React.useEffect(() => {
44
+ !isPresent && !presenceChildren.size && onExitComplete?.();
45
+ }, [isPresent]), /* @__PURE__ */jsx(PresenceContext.Provider, {
46
+ value: context,
47
+ children
48
+ });
49
+ });
50
+ function newChildrenMap() {
51
+ return /* @__PURE__ */new Map();
52
+ }
53
+ export { PresenceChild };
54
+ //# sourceMappingURL=PresenceChild.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useConstant","PresenceContext","React","useId","jsx","PresenceChild","memo","children","initial","isPresent","onExitComplete","exitVariant","enterVariant","enterExitVariant","presenceAffectsLayout","custom","presenceChildren","newChildrenMap","id","context","useMemo","set","isComplete","values","register","delete","forEach","_","key","useEffect","size","Provider","value","Map"],"sources":["../../src/PresenceChild.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,WAAA,QAAmB;AAC5B,SAASC,eAAA,QAAuB;AAEhC,YAAYC,KAAA,MAAW;AACvB,SAASC,KAAA,QAAa;AA+EX,SAAAC,GAAA;AA9DJ,MAAMC,aAAA,GAAgBH,KAAA,CAAMI,IAAA,CACjC,CAAC;EACCC,QAAA;EACAC,OAAA;EACAC,SAAA;EACAC,cAAA;EACAC,WAAA;EACAC,YAAA;EACAC,gBAAA;EACAC,qBAAA;EACAC;AACF,MAA0B;EACxB,MAAMC,gBAAA,GAAmBhB,WAAA,CAAYiB,cAAc;IAC7CC,EAAA,GAAKf,KAAA,CAAM,KAAK;IAEhBgB,OAAA,GAAUjB,KAAA,CAAMkB,OAAA,CACpB,OACS;MACLF,EAAA;MACAV,OAAA;MACAC,SAAA;MACAM,MAAA;MACAJ,WAAA;MACAC,YAAA;MACAC,gBAAA;MACAH,cAAA,EAAgBA,CAAA,KAAM;QACpBM,gBAAA,CAAiBK,GAAA,CAAIH,EAAA,EAAI,EAAI;QAC7B,WAAWI,UAAA,IAAcN,gBAAA,CAAiBO,MAAA,CAAO,GAC/C,IAAI,CAACD,UAAA,EACH;QAGJZ,cAAA,GAAiB;MACnB;MACAc,QAAA,EAAUA,CAAA,MACRR,gBAAA,CAAiBK,GAAA,CAAIH,EAAA,EAAI,EAAK,GACvB,MAAMF,gBAAA,CAAiBS,MAAA,CAAOP,EAAE;IAE3C;IAAA;AAAA;AAAA;AAAA;AAAA;IAAA;IASFJ,qBAAA,GAAwB,SAAY,CAACL,SAAA,EAAWE,WAAA,EAAaC,YAAY,CAC3E;EAEA,OAAAV,KAAA,CAAMkB,OAAA,CAAQ,MAAM;IAClBJ,gBAAA,CAAiBU,OAAA,CAAQ,CAACC,CAAA,EAAGC,GAAA,KAAQZ,gBAAA,CAAiBK,GAAA,CAAIO,GAAA,EAAK,EAAK,CAAC;EACvE,GAAG,CAACnB,SAAS,CAAC,GAMdP,KAAA,CAAM2B,SAAA,CAAU,MAAM;IACpB,CAACpB,SAAA,IAAa,CAACO,gBAAA,CAAiBc,IAAA,IAAQpB,cAAA,GAAiB;EAC3D,GAAG,CAACD,SAAS,CAAC,GAEP,eAAAL,GAAA,CAACH,eAAA,CAAgB8B,QAAA,EAAhB;IAAyBC,KAAA,EAAOb,OAAA;IAAUZ;EAAA,CAAS;AAC7D,CACF;AAEA,SAASU,eAAA,EAAuC;EAC9C,OAAO,mBAAIgB,GAAA,CAAI;AACjB","ignoreList":[]}
@@ -0,0 +1,79 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useConstant } from "@hanzo/gui-use-constant";
3
+ import { PresenceContext } from "@hanzo/gui-use-presence";
4
+ import * as React from "react";
5
+ import { useId } from "react";
6
+ var PresenceChild = /* @__PURE__ */React.memo(function (param) {
7
+ var {
8
+ children,
9
+ initial,
10
+ isPresent,
11
+ onExitComplete,
12
+ exitVariant,
13
+ enterVariant,
14
+ enterExitVariant,
15
+ presenceAffectsLayout,
16
+ custom
17
+ } = param,
18
+ presenceChildren = useConstant(newChildrenMap),
19
+ id = useId() || "",
20
+ context = React.useMemo(function () {
21
+ return {
22
+ id,
23
+ initial,
24
+ isPresent,
25
+ custom,
26
+ exitVariant,
27
+ enterVariant,
28
+ enterExitVariant,
29
+ onExitComplete: function () {
30
+ presenceChildren.set(id, !0);
31
+ var _iteratorNormalCompletion = !0,
32
+ _didIteratorError = !1,
33
+ _iteratorError = void 0;
34
+ try {
35
+ for (var _iterator = presenceChildren.values()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
36
+ var isComplete = _step.value;
37
+ if (!isComplete) return;
38
+ }
39
+ } catch (err) {
40
+ _didIteratorError = !0, _iteratorError = err;
41
+ } finally {
42
+ try {
43
+ !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
44
+ } finally {
45
+ if (_didIteratorError) throw _iteratorError;
46
+ }
47
+ }
48
+ onExitComplete?.();
49
+ },
50
+ register: function () {
51
+ return presenceChildren.set(id, !1), function () {
52
+ return presenceChildren.delete(id);
53
+ };
54
+ }
55
+ };
56
+ },
57
+ /**
58
+ * If the presence of a child affects the layout of the components around it,
59
+ * we want to make a new context value to ensure they get re-rendered
60
+ * so they can detect that layout change.
61
+ */
62
+ // @ts-expect-error its ok
63
+ presenceAffectsLayout ? void 0 : [isPresent, exitVariant, enterVariant]);
64
+ return React.useMemo(function () {
65
+ presenceChildren.forEach(function (_, key) {
66
+ return presenceChildren.set(key, !1);
67
+ });
68
+ }, [isPresent]), React.useEffect(function () {
69
+ !isPresent && !presenceChildren.size && onExitComplete?.();
70
+ }, [isPresent]), /* @__PURE__ */_jsx(PresenceContext.Provider, {
71
+ value: context,
72
+ children
73
+ });
74
+ });
75
+ function newChildrenMap() {
76
+ return /* @__PURE__ */new Map();
77
+ }
78
+ export { PresenceChild };
79
+ //# sourceMappingURL=PresenceChild.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["jsx","_jsx","useConstant","PresenceContext","React","useId","PresenceChild","memo","param","children","initial","isPresent","onExitComplete","exitVariant","enterVariant","enterExitVariant","presenceAffectsLayout","custom","presenceChildren","newChildrenMap","id","context","useMemo","set","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","values","Symbol","iterator","_step","next","done","isComplete","value","err","return","register","delete"],"sources":["../../src/PresenceChild.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,GAAA,IAAAC,IAAA,QAAmB;AAC5B,SAASC,WAAA,iCAAuB;AAEhC,SAAAC,eAAuB;AACvB,YAASC,KAAA,MAAa;AA+EX,SAAAC,KAAA;AA9DJ,IAAAC,aAAM,kBAAsBF,KAAA,CAAAG,IAAA,WAAAC,KAAA;EACjC,IAAC;MAAAC,QAAA;MAAAC,OAAA;MAAAC,SAAA;MAAAC,cAAA;MAAAC,WAAA;MAAAC,YAAA;MAAAC,gBAAA;MAAAC,qBAAA;MAAAC;IAAA,IAAAT,KAAA;IAAAU,gBAAA,GAAAhB,WAAA,CAAAiB,cAAA;IAAAC,EAAA,GAAAf,KAAA;IAAAgB,OAAA,GAAAjB,KAAA,CAAAkB,OAAA,CACC;MACA;QACAF,EAAA;QACAV,OAAA;QACAC,SAAA;QACAM,MAAA;QACAJ,WAAA;QACAC,YAAA;QACAC,gBAAA;QACwBH,cAAA,WAAAA,CAAA;UAClBM,gBAAA,CAAAK,GAAmB,CAAAH,EAAA;UAIvB,IACSI,yBAAA;YAAAC,iBAAA;YAAAC,cAAA;UACL;YACA,SAAAC,SAAA,GAAAT,gBAAA,CAAAU,MAAA,GAAAC,MAAA,CAAAC,QAAA,KAAAC,KAAA,IAAAP,yBAAA,IAAAO,KAAA,GAAAJ,SAAA,CAAAK,IAAA,IAAAC,IAAA,GAAAT,yBAAA;cACA,IAAAU,UAAA,GAAAH,KAAA,CAAAI,KAAA;cACA,KAAAD,UAAA,EACA;YACA;UACA,SAAAE,GAAA;YACAX,iBAAgB,GAAM,IAAAC,cAAA,GAAAU,GAAA;UACpB;YACA;cACE,CAAAZ,yBAAK,IAAAG,SAAA,CAAAU,MAAA,YAAAV,SAAA,CAAAU,MAAA;YACH;cAGJ,IAAAZ,iBAAiB,EACnB,MAAAC,cAAA;YACA;UAIF;UAAAd,cAAA;QAAA;QAAA0B,QAAA,WAAAA,CAAA;UAAA,OAAApB,gBAAA,CAAAK,GAAA,CAAAH,EAAA;YAAA,OAAAF,gBAAA,CAAAqB,MAAA,CAAAnB,EAAA;UAAA;QASF;MACF;IAEA;IACE;AAAqE;AAQrE;AAAyD;AAGA;IAE/D;IAEAJ,qBAAS,GAAuC,UAC9CL,SAAO,EACTE,WAAA,E","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ export * from "./AnimatePresence.mjs";
2
+ export * from "@hanzo/gui-use-presence";
3
+ export * from "./types.mjs";
4
+ export * from "./PresenceChild.mjs";
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ export * from "./AnimatePresence.mjs";
2
+ export * from "@hanzo/gui-use-presence";
3
+ export * from "./types.mjs";
4
+ export * from "./PresenceChild.mjs";
5
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ export * from "./AnimatePresence.native.js";
2
+ export * from "@hanzo/gui-use-presence";
3
+ export * from "./types.native.js";
4
+ export * from "./PresenceChild.native.js";
5
+ //# sourceMappingURL=index.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":[],"sourcesContent":[],"mappings":"","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=types.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":[],"sourcesContent":[],"mappings":"","ignoreList":[]}
package/package.json ADDED
@@ -0,0 +1,55 @@
1
+ {
2
+ "name": "@hanzogui/animate-presence",
3
+ "version": "2.0.0",
4
+ "gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
5
+ "license": "MIT",
6
+ "source": "src/index.ts",
7
+ "files": [
8
+ "src",
9
+ "types",
10
+ "dist"
11
+ ],
12
+ "type": "module",
13
+ "sideEffects": [
14
+ "*.css"
15
+ ],
16
+ "main": "dist/cjs",
17
+ "module": "dist/esm",
18
+ "types": "./types/index.d.ts",
19
+ "exports": {
20
+ "./package.json": "./package.json",
21
+ ".": {
22
+ "types": "./types/index.d.ts",
23
+ "react-native": "./dist/esm/index.native.js",
24
+ "browser": "./dist/esm/index.mjs",
25
+ "module": "./dist/esm/index.mjs",
26
+ "import": "./dist/esm/index.mjs",
27
+ "require": "./dist/cjs/index.cjs",
28
+ "default": "./dist/esm/index.mjs"
29
+ }
30
+ },
31
+ "publishConfig": {
32
+ "access": "public"
33
+ },
34
+ "scripts": {
35
+ "build": "hanzo-gui-build",
36
+ "watch": "hanzo-gui-build --watch",
37
+ "clean": "hanzo-gui-build clean",
38
+ "clean:build": "hanzo-gui-build clean:build"
39
+ },
40
+ "dependencies": {
41
+ "@hanzogui/constants": "2.0.0-rc.29",
42
+ "@hanzogui/helpers": "2.0.0-rc.29",
43
+ "@hanzogui/use-constant": "2.0.0-rc.29",
44
+ "@hanzogui/use-force-update": "2.0.0-rc.29",
45
+ "@hanzogui/use-presence": "2.0.0-rc.29",
46
+ "@hanzogui/web": "2.0.0-rc.29"
47
+ },
48
+ "devDependencies": {
49
+ "@hanzogui/build": "2.0.0-rc.29",
50
+ "react": ">=19"
51
+ },
52
+ "peerDependencies": {
53
+ "react": ">=19"
54
+ }
55
+ }