@tamagui/animate 2.0.0-rc.26 → 2.0.0-rc.26-1773452370596
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/package.json +3 -3
- package/dist/cjs/Animate.js +0 -56
- package/dist/cjs/Animate.js.map +0 -6
- package/dist/esm/Animate.js +0 -42
- package/dist/esm/Animate.js.map +0 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/animate",
|
|
3
|
-
"version": "2.0.0-rc.26",
|
|
3
|
+
"version": "2.0.0-rc.26-1773452370596",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"files": [
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"clean:build": "tamagui-build clean:build"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@tamagui/animate-presence": "2.0.0-rc.26"
|
|
40
|
+
"@tamagui/animate-presence": "2.0.0-rc.26-1773452370596"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@tamagui/build": "2.0.0-rc.26",
|
|
43
|
+
"@tamagui/build": "2.0.0-rc.26-1773452370596",
|
|
44
44
|
"react": ">=19"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
package/dist/cjs/Animate.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
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)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
-
for (let key of __getOwnPropNames(from))
|
|
11
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
-
var Animate_exports = {};
|
|
16
|
-
__export(Animate_exports, {
|
|
17
|
-
Animate: () => Animate
|
|
18
|
-
});
|
|
19
|
-
module.exports = __toCommonJS(Animate_exports);
|
|
20
|
-
var import_animate_presence = require("@tamagui/animate-presence"), import_react = require("react"), import_jsx_runtime = require("react/jsx-runtime");
|
|
21
|
-
function Animate({
|
|
22
|
-
children,
|
|
23
|
-
lazyMount,
|
|
24
|
-
type,
|
|
25
|
-
present,
|
|
26
|
-
passThrough,
|
|
27
|
-
...props
|
|
28
|
-
}) {
|
|
29
|
-
const [lazyMounted, setLazyMounted] = (0, import_react.useState)(lazyMount ? !1 : present);
|
|
30
|
-
(0, import_react.useEffect)(() => {
|
|
31
|
-
passThrough || lazyMount && present && (0, import_react.startTransition)(() => {
|
|
32
|
-
setLazyMounted(present);
|
|
33
|
-
});
|
|
34
|
-
}, [lazyMount, present]);
|
|
35
|
-
const mounted = present ? lazyMount ? lazyMounted : present : !1;
|
|
36
|
-
return type === "presence" ? props.keepChildrenMounted ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
37
|
-
import_animate_presence.PresenceChild,
|
|
38
|
-
{
|
|
39
|
-
isPresent: !0,
|
|
40
|
-
...!passThrough && {
|
|
41
|
-
initial: props.initial ? void 0 : !1,
|
|
42
|
-
onExitComplete: props.onExitComplete,
|
|
43
|
-
enterVariant: props.enterVariant,
|
|
44
|
-
exitVariant: props.exitVariant,
|
|
45
|
-
enterExitVariant: props.enterExitVariant,
|
|
46
|
-
// BUGFIX: this causes continous re-renders if keepChildrenMounted is true, see HeaderMenu
|
|
47
|
-
// but since we always re-render this component on open changes this should be fine to leave off?
|
|
48
|
-
presenceAffectsLayout: !1,
|
|
49
|
-
isPresent: present,
|
|
50
|
-
custom: props.custom
|
|
51
|
-
},
|
|
52
|
-
children
|
|
53
|
-
}
|
|
54
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_animate_presence.AnimatePresence, { passThrough, ...props, children: mounted || passThrough ? children : null }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children });
|
|
55
|
-
}
|
|
56
|
-
//# sourceMappingURL=Animate.js.map
|
package/dist/cjs/Animate.js.map
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/Animate.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,8BAA+C,sCAC/C,eAAqD,kBA4D7C;AAzBD,SAAS,QAAQ;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAkC;AAChC,QAAM,CAAC,aAAa,cAAc,QAAI,uBAAS,YAAY,KAAQ,OAAO;AAE1E,8BAAU,MAAM;AACd,IAAI,eACC,aACA,eACL,8BAAgB,MAAM;AACpB,qBAAe,OAAO;AAAA,IACxB,CAAC;AAAA,EACH,GAAG,CAAC,WAAW,OAAO,CAAC;AAGvB,QAAM,UAAW,UAAkB,YAAY,cAAc,UAAlC;AAE3B,SAAI,SAAS,aACP,MAAM,sBAEN;AAAA,IAAC;AAAA;AAAA,MACC,WAAS;AAAA,MACR,GAAI,CAAC,eAAe;AAAA,QACnB,SAAS,MAAM,UAAU,SAAY;AAAA,QACrC,gBAAgB,MAAM;AAAA,QACtB,cAAc,MAAM;AAAA,QACpB,aAAa,MAAM;AAAA,QACnB,kBAAkB,MAAM;AAAA;AAAA;AAAA,QAGxB,uBAAuB;AAAA,QACvB,WAAW;AAAA,QACX,QAAQ,MAAM;AAAA,MAChB;AAAA,MAEC;AAAA;AAAA,EACH,IAKF,4CAAC,2CAAgB,aAA2B,GAAG,OAC5C,qBAAW,cAAc,WAAW,MACvC,IAIG,2EAAG,UAAS;AACrB;",
|
|
5
|
-
"names": []
|
|
6
|
-
}
|
package/dist/esm/Animate.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { AnimatePresence, PresenceChild } from "@tamagui/animate-presence";
|
|
2
|
-
import { startTransition, useEffect, useState } from "react";
|
|
3
|
-
import { Fragment, jsx } from "react/jsx-runtime";
|
|
4
|
-
function Animate({
|
|
5
|
-
children,
|
|
6
|
-
lazyMount,
|
|
7
|
-
type,
|
|
8
|
-
present,
|
|
9
|
-
passThrough,
|
|
10
|
-
...props
|
|
11
|
-
}) {
|
|
12
|
-
const [lazyMounted, setLazyMounted] = useState(lazyMount ? !1 : present);
|
|
13
|
-
useEffect(() => {
|
|
14
|
-
passThrough || lazyMount && present && startTransition(() => {
|
|
15
|
-
setLazyMounted(present);
|
|
16
|
-
});
|
|
17
|
-
}, [lazyMount, present]);
|
|
18
|
-
const mounted = present ? lazyMount ? lazyMounted : present : !1;
|
|
19
|
-
return type === "presence" ? props.keepChildrenMounted ? /* @__PURE__ */ jsx(
|
|
20
|
-
PresenceChild,
|
|
21
|
-
{
|
|
22
|
-
isPresent: !0,
|
|
23
|
-
...!passThrough && {
|
|
24
|
-
initial: props.initial ? void 0 : !1,
|
|
25
|
-
onExitComplete: props.onExitComplete,
|
|
26
|
-
enterVariant: props.enterVariant,
|
|
27
|
-
exitVariant: props.exitVariant,
|
|
28
|
-
enterExitVariant: props.enterExitVariant,
|
|
29
|
-
// BUGFIX: this causes continous re-renders if keepChildrenMounted is true, see HeaderMenu
|
|
30
|
-
// but since we always re-render this component on open changes this should be fine to leave off?
|
|
31
|
-
presenceAffectsLayout: !1,
|
|
32
|
-
isPresent: present,
|
|
33
|
-
custom: props.custom
|
|
34
|
-
},
|
|
35
|
-
children
|
|
36
|
-
}
|
|
37
|
-
) : /* @__PURE__ */ jsx(AnimatePresence, { passThrough, ...props, children: mounted || passThrough ? children : null }) : /* @__PURE__ */ jsx(Fragment, { children });
|
|
38
|
-
}
|
|
39
|
-
export {
|
|
40
|
-
Animate
|
|
41
|
-
};
|
|
42
|
-
//# sourceMappingURL=Animate.js.map
|
package/dist/esm/Animate.js.map
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/Animate.tsx"],
|
|
4
|
-
"mappings": "AACA,SAAS,iBAAiB,qBAAqB;AAC/C,SAAS,iBAAiB,WAAW,gBAAgB;AA4D7C,SA2BC,UA3BD;AAzBD,SAAS,QAAQ;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAkC;AAChC,QAAM,CAAC,aAAa,cAAc,IAAI,SAAS,YAAY,KAAQ,OAAO;AAE1E,YAAU,MAAM;AACd,IAAI,eACC,aACA,WACL,gBAAgB,MAAM;AACpB,qBAAe,OAAO;AAAA,IACxB,CAAC;AAAA,EACH,GAAG,CAAC,WAAW,OAAO,CAAC;AAGvB,QAAM,UAAW,UAAkB,YAAY,cAAc,UAAlC;AAE3B,SAAI,SAAS,aACP,MAAM,sBAEN;AAAA,IAAC;AAAA;AAAA,MACC,WAAS;AAAA,MACR,GAAI,CAAC,eAAe;AAAA,QACnB,SAAS,MAAM,UAAU,SAAY;AAAA,QACrC,gBAAgB,MAAM;AAAA,QACtB,cAAc,MAAM;AAAA,QACpB,aAAa,MAAM;AAAA,QACnB,kBAAkB,MAAM;AAAA;AAAA;AAAA,QAGxB,uBAAuB;AAAA,QACvB,WAAW;AAAA,QACX,QAAQ,MAAM;AAAA,MAChB;AAAA,MAEC;AAAA;AAAA,EACH,IAKF,oBAAC,mBAAgB,aAA2B,GAAG,OAC5C,qBAAW,cAAc,WAAW,MACvC,IAIG,gCAAG,UAAS;AACrB;",
|
|
5
|
-
"names": []
|
|
6
|
-
}
|