@tamagui/animate 1.124.17 → 1.124.18
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.js.map +1 -1
- package/dist/cjs/Animate.native.js.map +1 -1
- package/dist/esm/Animate.js.map +1 -1
- package/dist/esm/Animate.mjs.map +1 -1
- package/dist/esm/Animate.native.js.map +1 -1
- package/package.json +3 -3
- package/src/Animate.tsx +2 -1
- package/types/Animate.d.ts +25 -25
- package/types/Animate.d.ts.map +11 -1
- package/types/index.d.ts +2 -1
- package/types/index.d.ts.map +11 -1
package/dist/cjs/Animate.js.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Animate.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,8BAA+C,
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,8BAA+C,sCAsCvC;AAJD,SAAS,QAAQ,EAAE,UAAU,MAAM,GAAG,MAAM,GAA8B;AAC/E,SAAI,SAAS,aACP,MAAM,sBAEN;AAAA,IAAC;AAAA;AAAA,MACC,SAAS,MAAM,UAAU,SAAY;AAAA,MACrC,gBAAgB,MAAM;AAAA,MACtB,cAAc,MAAM;AAAA,MACpB,aAAa,MAAM;AAAA,MACnB,kBAAkB,MAAM;AAAA,MAGxB,uBAAuB;AAAA,MACvB,WAAW,MAAM;AAAA,MACjB,QAAQ,MAAM;AAAA,MAEb;AAAA;AAAA,EACH,IAIG,4CAAC,2CAAiB,GAAG,OAAQ,gBAAM,UAAU,WAAW,MAAK,IAG/D,2EAAG,UAAS;AACrB;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -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;AAkCxC,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
|
}
|
package/dist/esm/Animate.js.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Animate.tsx"],
|
|
4
|
-
"mappings": "AACA,SAAS,iBAAiB,qBAAqB;
|
|
4
|
+
"mappings": "AACA,SAAS,iBAAiB,qBAAqB;AAsCvC,SAoBC,UApBD;AAJD,SAAS,QAAQ,EAAE,UAAU,MAAM,GAAG,MAAM,GAA8B;AAC/E,SAAI,SAAS,aACP,MAAM,sBAEN;AAAA,IAAC;AAAA;AAAA,MACC,SAAS,MAAM,UAAU,SAAY;AAAA,MACrC,gBAAgB,MAAM;AAAA,MACtB,cAAc,MAAM;AAAA,MACpB,aAAa,MAAM;AAAA,MACnB,kBAAkB,MAAM;AAAA,MAGxB,uBAAuB;AAAA,MACvB,WAAW,MAAM;AAAA,MACjB,QAAQ,MAAM;AAAA,MAEb;AAAA;AAAA,EACH,IAIG,oBAAC,mBAAiB,GAAG,OAAQ,gBAAM,UAAU,WAAW,MAAK,IAG/D,gCAAG,UAAS;AACrB;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
package/dist/esm/Animate.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["AnimatePresence","PresenceChild","Fragment","jsx","Animate","children","type","props","keepChildrenMounted","initial","onExitComplete","enterVariant","exitVariant","enterExitVariant","presenceAffectsLayout","isPresent","present","custom"],"sources":["../../src/Animate.tsx"],"sourcesContent":[null],"mappings":"AACA,SAASA,eAAA,EAAiBC,aAAA,QAAqB;
|
|
1
|
+
{"version":3,"names":["AnimatePresence","PresenceChild","Fragment","jsx","Animate","children","type","props","keepChildrenMounted","initial","onExitComplete","enterVariant","exitVariant","enterExitVariant","presenceAffectsLayout","isPresent","present","custom"],"sources":["../../src/Animate.tsx"],"sourcesContent":[null],"mappings":"AACA,SAASA,eAAA,EAAiBC,aAAA,QAAqB;AAsCvC,SAoBCC,QAAA,EApBDC,GAAA;AAJD,SAASC,QAAQ;EAAEC,QAAA;EAAUC,IAAA;EAAM,GAAGC;AAAM,GAA8B;EAC/E,OAAID,IAAA,KAAS,aACPC,KAAA,CAAMC,mBAAA,GAEN,eAAAL,GAAA,CAACF,aAAA;IACCQ,OAAA,EAASF,KAAA,CAAME,OAAA,GAAU,SAAY;IACrCC,cAAA,EAAgBH,KAAA,CAAMG,cAAA;IACtBC,YAAA,EAAcJ,KAAA,CAAMI,YAAA;IACpBC,WAAA,EAAaL,KAAA,CAAMK,WAAA;IACnBC,gBAAA,EAAkBN,KAAA,CAAMM,gBAAA;IAGxBC,qBAAA,EAAuB;IACvBC,SAAA,EAAWR,KAAA,CAAMS,OAAA;IACjBC,MAAA,EAAQV,KAAA,CAAMU,MAAA;IAEbZ;EAAA,CACH,IAIG,eAAAF,GAAA,CAACH,eAAA;IAAiB,GAAGO,KAAA;IAAQF,QAAA,EAAAE,KAAA,CAAMS,OAAA,GAAUX,QAAA,GAAW;EAAA,CAAK,IAG/D,eAAAF,GAAA,CAAAD,QAAA;IAAGG;EAAA,CAAS;AACrB","ignoreList":[]}
|
|
@@ -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;AAkCxC,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
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/animate",
|
|
3
|
-
"version": "1.124.
|
|
3
|
+
"version": "1.124.18",
|
|
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.124.
|
|
16
|
+
"@tamagui/animate-presence": "1.124.18"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@tamagui/build": "1.124.
|
|
19
|
+
"@tamagui/build": "1.124.18"
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
22
|
"build": "tamagui-build",
|
package/src/Animate.tsx
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AnimatePresenceProps } from '@tamagui/animate-presence'
|
|
2
2
|
import { AnimatePresence, PresenceChild } from '@tamagui/animate-presence'
|
|
3
|
+
import type { JSX } from 'react/jsx-runtime'
|
|
3
4
|
|
|
4
5
|
type BaseProps = {
|
|
5
6
|
children: React.ReactNode
|
|
@@ -32,7 +33,7 @@ export type AnimateProps = BaseProps & PresenceProps
|
|
|
32
33
|
*
|
|
33
34
|
*/
|
|
34
35
|
|
|
35
|
-
export function Animate({ children, type, ...props }: AnimateProps) {
|
|
36
|
+
export function Animate({ children, type, ...props }: AnimateProps): JSX.Element {
|
|
36
37
|
if (type === 'presence') {
|
|
37
38
|
if (props.keepChildrenMounted) {
|
|
38
39
|
return (
|
package/types/Animate.d.ts
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import type { AnimatePresenceProps } from
|
|
2
|
-
type
|
|
3
|
-
|
|
4
|
-
};
|
|
1
|
+
import type { AnimatePresenceProps } from "@tamagui/animate-presence";
|
|
2
|
+
import type { JSX } from "react/jsx-runtime";
|
|
3
|
+
type BaseProps = { children: React.ReactNode };
|
|
5
4
|
type PresenceProps = AnimatePresenceProps & {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
type: "presence";
|
|
6
|
+
present: boolean;
|
|
7
|
+
keepChildrenMounted?: boolean;
|
|
9
8
|
};
|
|
10
9
|
export type AnimateProps = BaseProps & PresenceProps;
|
|
11
10
|
/**
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
export declare function Animate({ children, type
|
|
11
|
+
* Because mounting and unmounting children can be expensive, this gives us the
|
|
12
|
+
* option to avoid that.
|
|
13
|
+
*
|
|
14
|
+
* type: 'presence' will act just like AnimatePresence, except you use `present`
|
|
15
|
+
* instead of conditional children.
|
|
16
|
+
* Note that this does avoid reconciling the children even when present={false}
|
|
17
|
+
* so no extra cost to perf over AnimatePresence.
|
|
18
|
+
*
|
|
19
|
+
* type: 'presence' with keepChildrenMounted true *always* render the children so you pay
|
|
20
|
+
* the cost up-front to mount them, but then you avoid the mount cost at the start
|
|
21
|
+
* of the animation.
|
|
22
|
+
*
|
|
23
|
+
* There's no "right way" it just depends on the use case, this component just makes
|
|
24
|
+
* it easier to choose the strategy yourself.
|
|
25
|
+
*
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export declare function Animate({ children, type,...props }: AnimateProps): JSX.Element;
|
|
30
29
|
export {};
|
|
30
|
+
|
|
31
31
|
//# sourceMappingURL=Animate.d.ts.map
|
package/types/Animate.d.ts.map
CHANGED
|
@@ -1 +1,11 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"mappings": "AAAA,cAAc,4BAA4B,2BAA2B;AAErE,cAAc,WAAW,mBAAmB;KAEvC,YAAY,EACf,UAAU,MAAM,UACjB;KAEI,gBAAgB,uBAAuB;CAC1C,MAAM;CACN;CACA;AACD;AAED,YAAY,eAAe,YAAY;;;;;;;;;;;;;;;;;;;AAqBvC,OAAO,iBAAS,QAAQ,EAAE,UAAU,KAAM,GAAG,OAAqB,EAAZ,eAAe,IAAI",
|
|
3
|
+
"names": [],
|
|
4
|
+
"sources": [
|
|
5
|
+
"src/Animate.tsx"
|
|
6
|
+
],
|
|
7
|
+
"sourcesContent": [
|
|
8
|
+
"import type { AnimatePresenceProps } from '@tamagui/animate-presence'\nimport { AnimatePresence, PresenceChild } from '@tamagui/animate-presence'\nimport type { JSX } from 'react/jsx-runtime'\n\ntype BaseProps = {\n children: React.ReactNode\n}\n\ntype PresenceProps = AnimatePresenceProps & {\n type: 'presence'\n present: boolean\n keepChildrenMounted?: boolean\n}\n\nexport type AnimateProps = BaseProps & PresenceProps\n\n/**\n * Because mounting and unmounting children can be expensive, this gives us the\n * option to avoid that.\n *\n * type: 'presence' will act just like AnimatePresence, except you use `present`\n * instead of conditional children.\n * Note that this does avoid reconciling the children even when present={false}\n * so no extra cost to perf over AnimatePresence.\n *\n * type: 'presence' with keepChildrenMounted true *always* render the children so you pay\n * the cost up-front to mount them, but then you avoid the mount cost at the start\n * of the animation.\n *\n * There's no \"right way\" it just depends on the use case, this component just makes\n * it easier to choose the strategy yourself.\n *\n *\n */\n\nexport function Animate({ children, type, ...props }: AnimateProps): JSX.Element {\n if (type === 'presence') {\n if (props.keepChildrenMounted) {\n return (\n <PresenceChild\n initial={props.initial ? undefined : false}\n onExitComplete={props.onExitComplete}\n enterVariant={props.enterVariant}\n exitVariant={props.exitVariant}\n enterExitVariant={props.enterExitVariant}\n // BUGFIX: this causes continous re-renders if keepChildrenMounted is true, see HeaderMenu\n // but since we always re-render this component on open changes this should be fine to leave off?\n presenceAffectsLayout={false}\n isPresent={props.present}\n custom={props.custom}\n >\n {children as any}\n </PresenceChild>\n )\n }\n\n return <AnimatePresence {...props}>{props.present ? children : null}</AnimatePresence>\n }\n\n return <>{children}</>\n}\n"
|
|
9
|
+
],
|
|
10
|
+
"version": 3
|
|
11
|
+
}
|
package/types/index.d.ts
CHANGED
package/types/index.d.ts.map
CHANGED
|
@@ -1 +1,11 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"mappings": "AAAA,cAAc",
|
|
3
|
+
"names": [],
|
|
4
|
+
"sources": [
|
|
5
|
+
"src/index.ts"
|
|
6
|
+
],
|
|
7
|
+
"sourcesContent": [
|
|
8
|
+
"export * from './Animate'\n"
|
|
9
|
+
],
|
|
10
|
+
"version": 3
|
|
11
|
+
}
|