@tamagui/animate 1.110.5 → 1.111.1
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/Animate.native.js +5 -58
- package/dist/cjs/Animate.native.js.map +1 -1
- package/dist/esm/Animate.native.js +5 -58
- package/dist/esm/Animate.native.js.map +1 -1
- package/dist/esm/Animate.native.mjs +29 -0
- package/dist/esm/Animate.native.mjs.map +1 -0
- package/dist/esm/index.native.mjs +2 -0
- package/dist/esm/index.native.mjs.map +1 -0
- package/package.json +3 -3
|
@@ -19,62 +19,8 @@ __export(Animate_exports, {
|
|
|
19
19
|
});
|
|
20
20
|
module.exports = __toCommonJS(Animate_exports);
|
|
21
21
|
var import_jsx_runtime = require("react/jsx-runtime"), import_animate_presence = require("@tamagui/animate-presence");
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
value,
|
|
25
|
-
enumerable: !0,
|
|
26
|
-
configurable: !0,
|
|
27
|
-
writable: !0
|
|
28
|
-
}) : obj[key] = value, obj;
|
|
29
|
-
}
|
|
30
|
-
function _object_spread(target) {
|
|
31
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
32
|
-
var source = arguments[i] != null ? arguments[i] : {}, ownKeys2 = Object.keys(source);
|
|
33
|
-
typeof Object.getOwnPropertySymbols == "function" && (ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
34
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
35
|
-
}))), ownKeys2.forEach(function(key) {
|
|
36
|
-
_define_property(target, key, source[key]);
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
return target;
|
|
40
|
-
}
|
|
41
|
-
function ownKeys(object, enumerableOnly) {
|
|
42
|
-
var keys = Object.keys(object);
|
|
43
|
-
if (Object.getOwnPropertySymbols) {
|
|
44
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
45
|
-
enumerableOnly && (symbols = symbols.filter(function(sym) {
|
|
46
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
47
|
-
})), keys.push.apply(keys, symbols);
|
|
48
|
-
}
|
|
49
|
-
return keys;
|
|
50
|
-
}
|
|
51
|
-
function _object_spread_props(target, source) {
|
|
52
|
-
return source = source ?? {}, Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
|
|
53
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
54
|
-
}), target;
|
|
55
|
-
}
|
|
56
|
-
function _object_without_properties(source, excluded) {
|
|
57
|
-
if (source == null) return {};
|
|
58
|
-
var target = _object_without_properties_loose(source, excluded), key, i;
|
|
59
|
-
if (Object.getOwnPropertySymbols) {
|
|
60
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
61
|
-
for (i = 0; i < sourceSymbolKeys.length; i++)
|
|
62
|
-
key = sourceSymbolKeys[i], !(excluded.indexOf(key) >= 0) && Object.prototype.propertyIsEnumerable.call(source, key) && (target[key] = source[key]);
|
|
63
|
-
}
|
|
64
|
-
return target;
|
|
65
|
-
}
|
|
66
|
-
function _object_without_properties_loose(source, excluded) {
|
|
67
|
-
if (source == null) return {};
|
|
68
|
-
var target = {}, sourceKeys = Object.keys(source), key, i;
|
|
69
|
-
for (i = 0; i < sourceKeys.length; i++)
|
|
70
|
-
key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
|
|
71
|
-
return target;
|
|
72
|
-
}
|
|
73
|
-
function Animate(_param) {
|
|
74
|
-
var children = _param.children, type = _param.type, props = _object_without_properties(_param, [
|
|
75
|
-
"children",
|
|
76
|
-
"type"
|
|
77
|
-
]);
|
|
22
|
+
function Animate(param) {
|
|
23
|
+
var { children, type, ...props } = param;
|
|
78
24
|
return type === "presence" ? props.keepChildrenMounted ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_animate_presence.PresenceChild, {
|
|
79
25
|
initial: props.initial ? void 0 : !1,
|
|
80
26
|
onExitComplete: props.onExitComplete,
|
|
@@ -87,9 +33,10 @@ function Animate(_param) {
|
|
|
87
33
|
isPresent: props.present,
|
|
88
34
|
custom: props.custom,
|
|
89
35
|
children
|
|
90
|
-
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_animate_presence.AnimatePresence,
|
|
36
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_animate_presence.AnimatePresence, {
|
|
37
|
+
...props,
|
|
91
38
|
children: props.present ? children : null
|
|
92
|
-
})
|
|
39
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
|
|
93
40
|
children
|
|
94
41
|
});
|
|
95
42
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Users/n8/tamagui/code/ui/animate/src/Animate.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;uDACA,0BAA+C
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;uDACA,0BAA+C;AAiCxC,SAASA,QAAQ,OAA0C;MAA1C,EAAEC,UAAUC,MAAM,GAAGC,MAAAA,IAArB;AACtB,SAAID,SAAS,aACPC,MAAMC,sBAEN,uCAAAC,KAACC,uCAAAA;IACCC,SAASJ,MAAMI,UAAUC,SAAY;IACrCC,gBAAgBN,MAAMM;IACtBC,cAAcP,MAAMO;IACpBC,aAAaR,MAAMQ;IACnBC,kBAAkBT,MAAMS;;;IAGxBC,uBAAuB;IACvBC,WAAWX,MAAMY;IACjBC,QAAQb,MAAMa;;OAOb,uCAAAX,KAACY,yCAAAA;IAAiB,GAAGd;cAAQA,MAAMY,UAAUd,WAAW;OAG1D,uCAAAI,KAAA,mBAAAa,UAAA;;;AACT;",
|
|
5
5
|
"names": ["Animate", "children", "type", "props", "keepChildrenMounted", "_jsx", "PresenceChild", "initial", "undefined", "onExitComplete", "enterVariant", "exitVariant", "enterExitVariant", "presenceAffectsLayout", "isPresent", "present", "custom", "AnimatePresence", "_Fragment"]
|
|
6
6
|
}
|
|
@@ -1,61 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { AnimatePresence, PresenceChild } from "@tamagui/animate-presence";
|
|
3
|
-
function
|
|
4
|
-
|
|
5
|
-
value,
|
|
6
|
-
enumerable: !0,
|
|
7
|
-
configurable: !0,
|
|
8
|
-
writable: !0
|
|
9
|
-
}) : obj[key] = value, obj;
|
|
10
|
-
}
|
|
11
|
-
function _object_spread(target) {
|
|
12
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
13
|
-
var source = arguments[i] != null ? arguments[i] : {}, ownKeys2 = Object.keys(source);
|
|
14
|
-
typeof Object.getOwnPropertySymbols == "function" && (ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
15
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
16
|
-
}))), ownKeys2.forEach(function(key) {
|
|
17
|
-
_define_property(target, key, source[key]);
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
return target;
|
|
21
|
-
}
|
|
22
|
-
function ownKeys(object, enumerableOnly) {
|
|
23
|
-
var keys = Object.keys(object);
|
|
24
|
-
if (Object.getOwnPropertySymbols) {
|
|
25
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
26
|
-
enumerableOnly && (symbols = symbols.filter(function(sym) {
|
|
27
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
28
|
-
})), keys.push.apply(keys, symbols);
|
|
29
|
-
}
|
|
30
|
-
return keys;
|
|
31
|
-
}
|
|
32
|
-
function _object_spread_props(target, source) {
|
|
33
|
-
return source = source ?? {}, Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
|
|
34
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
35
|
-
}), target;
|
|
36
|
-
}
|
|
37
|
-
function _object_without_properties(source, excluded) {
|
|
38
|
-
if (source == null) return {};
|
|
39
|
-
var target = _object_without_properties_loose(source, excluded), key, i;
|
|
40
|
-
if (Object.getOwnPropertySymbols) {
|
|
41
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
42
|
-
for (i = 0; i < sourceSymbolKeys.length; i++)
|
|
43
|
-
key = sourceSymbolKeys[i], !(excluded.indexOf(key) >= 0) && Object.prototype.propertyIsEnumerable.call(source, key) && (target[key] = source[key]);
|
|
44
|
-
}
|
|
45
|
-
return target;
|
|
46
|
-
}
|
|
47
|
-
function _object_without_properties_loose(source, excluded) {
|
|
48
|
-
if (source == null) return {};
|
|
49
|
-
var target = {}, sourceKeys = Object.keys(source), key, i;
|
|
50
|
-
for (i = 0; i < sourceKeys.length; i++)
|
|
51
|
-
key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
|
|
52
|
-
return target;
|
|
53
|
-
}
|
|
54
|
-
function Animate(_param) {
|
|
55
|
-
var children = _param.children, type = _param.type, props = _object_without_properties(_param, [
|
|
56
|
-
"children",
|
|
57
|
-
"type"
|
|
58
|
-
]);
|
|
3
|
+
function Animate(param) {
|
|
4
|
+
var { children, type, ...props } = param;
|
|
59
5
|
return type === "presence" ? props.keepChildrenMounted ? /* @__PURE__ */ _jsx(PresenceChild, {
|
|
60
6
|
initial: props.initial ? void 0 : !1,
|
|
61
7
|
onExitComplete: props.onExitComplete,
|
|
@@ -68,9 +14,10 @@ function Animate(_param) {
|
|
|
68
14
|
isPresent: props.present,
|
|
69
15
|
custom: props.custom,
|
|
70
16
|
children
|
|
71
|
-
}) : /* @__PURE__ */ _jsx(AnimatePresence,
|
|
17
|
+
}) : /* @__PURE__ */ _jsx(AnimatePresence, {
|
|
18
|
+
...props,
|
|
72
19
|
children: props.present ? children : null
|
|
73
|
-
})
|
|
20
|
+
}) : /* @__PURE__ */ _jsx(_Fragment, {
|
|
74
21
|
children
|
|
75
22
|
});
|
|
76
23
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Users/n8/tamagui/code/ui/animate/src/Animate.tsx"],
|
|
4
|
-
"mappings": ";AACA,SAASA,iBAAiBC,qBAAqB
|
|
4
|
+
"mappings": ";AACA,SAASA,iBAAiBC,qBAAqB;AAiCxC,SAASC,QAAQ,OAA0C;MAA1C,EAAEC,UAAUC,MAAM,GAAGC,MAAAA,IAArB;AACtB,SAAID,SAAS,aACPC,MAAMC,sBAEN,qBAACL,eAAAA;IACCM,SAASF,MAAME,UAAUC,SAAY;IACrCC,gBAAgBJ,MAAMI;IACtBC,cAAcL,MAAMK;IACpBC,aAAaN,MAAMM;IACnBC,kBAAkBP,MAAMO;;;IAGxBC,uBAAuB;IACvBC,WAAWT,MAAMU;IACjBC,QAAQX,MAAMW;;OAOb,qBAAChB,iBAAAA;IAAiB,GAAGK;cAAQA,MAAMU,UAAUZ,WAAW;OAG1D,qBAAA,WAAA;;;AACT;",
|
|
5
5
|
"names": ["AnimatePresence", "PresenceChild", "Animate", "children", "type", "props", "keepChildrenMounted", "initial", "undefined", "onExitComplete", "enterVariant", "exitVariant", "enterExitVariant", "presenceAffectsLayout", "isPresent", "present", "custom"]
|
|
6
6
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { AnimatePresence, PresenceChild } from "@tamagui/animate-presence";
|
|
3
|
+
function Animate(param) {
|
|
4
|
+
var {
|
|
5
|
+
children,
|
|
6
|
+
type,
|
|
7
|
+
...props
|
|
8
|
+
} = param;
|
|
9
|
+
return type === "presence" ? props.keepChildrenMounted ? /* @__PURE__ */_jsx(PresenceChild, {
|
|
10
|
+
initial: props.initial ? void 0 : !1,
|
|
11
|
+
onExitComplete: props.onExitComplete,
|
|
12
|
+
enterVariant: props.enterVariant,
|
|
13
|
+
exitVariant: props.exitVariant,
|
|
14
|
+
enterExitVariant: props.enterExitVariant,
|
|
15
|
+
// BUGFIX: this causes continous re-renders if keepChildrenMounted is true, see HeaderMenu
|
|
16
|
+
// but since we always re-render this component on open changes this should be fine to leave off?
|
|
17
|
+
presenceAffectsLayout: !1,
|
|
18
|
+
isPresent: props.present,
|
|
19
|
+
custom: props.custom,
|
|
20
|
+
children
|
|
21
|
+
}) : /* @__PURE__ */_jsx(AnimatePresence, {
|
|
22
|
+
...props,
|
|
23
|
+
children: props.present ? children : null
|
|
24
|
+
}) : /* @__PURE__ */_jsx(_Fragment, {
|
|
25
|
+
children
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
export { Animate };
|
|
29
|
+
//# sourceMappingURL=Animate.native.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["jsx","_jsx","Fragment","_Fragment","AnimatePresence","PresenceChild","Animate","param","children","type","props","keepChildrenMounted","initial","onExitComplete","enterVariant","exitVariant","enterExitVariant","presenceAffectsLayout","isPresent","present","custom"],"sources":["../../src/Animate.tsx"],"sourcesContent":[null],"mappings":"AACA,SAASA,GAAA,IAAAC,IAAA,EAAAC,QAAiB,IAAAC,SAAA,QAAqB;AAqCvC,SAoBCC,eApBD,EAAAC,aAAA;AAJD,SAASC,QAAQC,KAAE;EACxB;IAAAC,QAAI;IAASC,IAAA;IAAA,GAAAC;EACP,IAAMH,KAAA;EAEN,OAACE,IAAA,kBAAAC,KAAA,CAAAC,mBAAA,kBAAAV,IAAA,CAAAI,aAAA;IAAAO,OAAA,EAAAF,KAAA,CAAAE,OAAA;IAAAC,cACU,EAAAH,KAAM,CAAAG,cAAsB;IAAAC,YACrC,EAAAJ,KAAgB,CAAAI,YAAM;IAAAC,WACtB,EAAAL,KAAc,CAAAK,WAAM;IAAAC,gBACP,EAAAN,KAAM,CAAAM,gBAAA;IAAA;IACK;IAGDC,qBACN;IAAAC,SACjB,EAAQR,KAAM,CAAAS,OAAA;IAAAC,MAEb,EAAAV,KAAA,CAAAU,MAAA;IAAAZ;EACH,KAIG,eAAAP,IAAC,CAAAG,eAAA,EAAiB;IAI7B,GAAAM,KAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/animate",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.111.1",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "MIT",
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
"dist"
|
|
14
14
|
],
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@tamagui/animate-presence": "1.
|
|
16
|
+
"@tamagui/animate-presence": "1.111.1"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@tamagui/build": "1.
|
|
19
|
+
"@tamagui/build": "1.111.1"
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
22
|
"build": "tamagui-build",
|