@tamagui/animations-css 1.0.0-beta.207 → 1.0.0-beta.230

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.
@@ -41,18 +41,16 @@ function createAnimations(animations) {
41
41
  View: "div",
42
42
  Text: "span",
43
43
  animations,
44
- useAnimations: (props, { style, exitStyle }) => {
44
+ useAnimations: (props, { getStyle }) => {
45
45
  const animation = animations[props.animation];
46
46
  if (!animation) {
47
47
  throw new Error(`no animation found: ${props.animation}`);
48
48
  }
49
- console.log("now it is", __spreadValues(__spreadValues({
50
- transition: `all ${animation}`
51
- }, style), exitStyle));
49
+ const keys = props.animateOnly ? props.animateOnly.join(" ") : "all";
52
50
  return {
53
- style: __spreadValues(__spreadValues({
54
- transition: `all ${animation}`
55
- }, style), exitStyle)
51
+ style: __spreadValues({
52
+ transition: `${keys} ${animation}`
53
+ }, getStyle())
56
54
  };
57
55
  }
58
56
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/createAnimations.tsx"],
4
- "sourcesContent": ["import { AnimationDriver } from '@tamagui/core'\n\nexport function createAnimations<A extends Object>(animations: A): AnimationDriver<A> {\n return {\n avoidClasses: false,\n View: 'div',\n Text: 'span',\n animations,\n useAnimations: (props, { style, exitStyle }) => {\n const animation = animations[props.animation]\n if (!animation) {\n throw new Error(`no animation found: ${props.animation}`)\n }\n\n console.log('now it is', {\n transition: `all ${animation}`,\n ...style,\n ...exitStyle,\n })\n\n return {\n style: {\n transition: `all ${animation}`,\n ...style,\n ...exitStyle,\n },\n }\n },\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,0BAA4C,YAAmC;AACpF,SAAO;AAAA,IACL,cAAc;AAAA,IACd,MAAM;AAAA,IACN,MAAM;AAAA,IACN;AAAA,IACA,eAAe,CAAC,OAAO,EAAE,OAAO,gBAAgB;AAC9C,YAAM,YAAY,WAAW,MAAM;AACnC,UAAI,CAAC,WAAW;AACd,cAAM,IAAI,MAAM,uBAAuB,MAAM,WAAW;AAAA,MAC1D;AAEA,cAAQ,IAAI,aAAa;AAAA,QACvB,YAAY,OAAO;AAAA,SAChB,QACA,UACJ;AAED,aAAO;AAAA,QACL,OAAO;AAAA,UACL,YAAY,OAAO;AAAA,WAChB,QACA;AAAA,MAEP;AAAA,IACF;AAAA,EACF;AACF;AA3BgB;",
4
+ "sourcesContent": ["import { AnimationDriver } from '@tamagui/core'\n\nexport function createAnimations<A extends Object>(animations: A): AnimationDriver<A> {\n return {\n avoidClasses: false,\n View: 'div',\n Text: 'span',\n animations,\n useAnimations: (props, { getStyle }) => {\n const animation = animations[props.animation]\n if (!animation) {\n throw new Error(`no animation found: ${props.animation}`)\n }\n\n const keys = props.animateOnly ? props.animateOnly.join(' ') : 'all'\n\n return {\n style: {\n transition: `${keys} ${animation}`,\n ...getStyle(),\n },\n }\n },\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,0BAA4C,YAAmC;AACpF,SAAO;AAAA,IACL,cAAc;AAAA,IACd,MAAM;AAAA,IACN,MAAM;AAAA,IACN;AAAA,IACA,eAAe,CAAC,OAAO,EAAE,eAAe;AACtC,YAAM,YAAY,WAAW,MAAM;AACnC,UAAI,CAAC,WAAW;AACd,cAAM,IAAI,MAAM,uBAAuB,MAAM,WAAW;AAAA,MAC1D;AAEA,YAAM,OAAO,MAAM,cAAc,MAAM,YAAY,KAAK,GAAG,IAAI;AAE/D,aAAO;AAAA,QACL,OAAO;AAAA,UACL,YAAY,GAAG,QAAQ;AAAA,WACpB,SAAS;AAAA,MAEhB;AAAA,IACF;AAAA,EACF;AACF;AAtBgB;",
6
6
  "names": []
7
7
  }
@@ -6,21 +6,16 @@ function createAnimations(animations) {
6
6
  View: "div",
7
7
  Text: "span",
8
8
  animations,
9
- useAnimations: (props, { style, exitStyle }) => {
9
+ useAnimations: (props, { getStyle }) => {
10
10
  const animation = animations[props.animation];
11
11
  if (!animation) {
12
12
  throw new Error(`no animation found: ${props.animation}`);
13
13
  }
14
- console.log("now it is", {
15
- transition: `all ${animation}`,
16
- ...style,
17
- ...exitStyle
18
- });
14
+ const keys = props.animateOnly ? props.animateOnly.join(" ") : "all";
19
15
  return {
20
16
  style: {
21
- transition: `all ${animation}`,
22
- ...style,
23
- ...exitStyle
17
+ transition: `${keys} ${animation}`,
18
+ ...getStyle()
24
19
  }
25
20
  };
26
21
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/createAnimations.tsx"],
4
- "sourcesContent": ["import { AnimationDriver } from '@tamagui/core'\n\nexport function createAnimations<A extends Object>(animations: A): AnimationDriver<A> {\n return {\n avoidClasses: false,\n View: 'div',\n Text: 'span',\n animations,\n useAnimations: (props, { style, exitStyle }) => {\n const animation = animations[props.animation]\n if (!animation) {\n throw new Error(`no animation found: ${props.animation}`)\n }\n\n console.log('now it is', {\n transition: `all ${animation}`,\n ...style,\n ...exitStyle,\n })\n\n return {\n style: {\n transition: `all ${animation}`,\n ...style,\n ...exitStyle,\n },\n }\n },\n }\n}\n"],
5
- "mappings": ";;AAEO,0BAA4C,YAAmC;AACpF,SAAO;AAAA,IACL,cAAc;AAAA,IACd,MAAM;AAAA,IACN,MAAM;AAAA,IACN;AAAA,IACA,eAAe,CAAC,OAAO,EAAE,OAAO,gBAAgB;AAC9C,YAAM,YAAY,WAAW,MAAM;AACnC,UAAI,CAAC,WAAW;AACd,cAAM,IAAI,MAAM,uBAAuB,MAAM,WAAW;AAAA,MAC1D;AAEA,cAAQ,IAAI,aAAa;AAAA,QACvB,YAAY,OAAO;AAAA,WAChB;AAAA,WACA;AAAA,MACL,CAAC;AAED,aAAO;AAAA,QACL,OAAO;AAAA,UACL,YAAY,OAAO;AAAA,aAChB;AAAA,aACA;AAAA,QACL;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;AA3BgB;",
4
+ "sourcesContent": ["import { AnimationDriver } from '@tamagui/core'\n\nexport function createAnimations<A extends Object>(animations: A): AnimationDriver<A> {\n return {\n avoidClasses: false,\n View: 'div',\n Text: 'span',\n animations,\n useAnimations: (props, { getStyle }) => {\n const animation = animations[props.animation]\n if (!animation) {\n throw new Error(`no animation found: ${props.animation}`)\n }\n\n const keys = props.animateOnly ? props.animateOnly.join(' ') : 'all'\n\n return {\n style: {\n transition: `${keys} ${animation}`,\n ...getStyle(),\n },\n }\n },\n }\n}\n"],
5
+ "mappings": ";;AAEO,0BAA4C,YAAmC;AACpF,SAAO;AAAA,IACL,cAAc;AAAA,IACd,MAAM;AAAA,IACN,MAAM;AAAA,IACN;AAAA,IACA,eAAe,CAAC,OAAO,EAAE,eAAe;AACtC,YAAM,YAAY,WAAW,MAAM;AACnC,UAAI,CAAC,WAAW;AACd,cAAM,IAAI,MAAM,uBAAuB,MAAM,WAAW;AAAA,MAC1D;AAEA,YAAM,OAAO,MAAM,cAAc,MAAM,YAAY,KAAK,GAAG,IAAI;AAE/D,aAAO;AAAA,QACL,OAAO;AAAA,UACL,YAAY,GAAG,QAAQ;AAAA,aACpB,SAAS;AAAA,QACd;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;AAtBgB;",
6
6
  "names": []
7
7
  }
@@ -6,21 +6,16 @@ function createAnimations(animations) {
6
6
  View: "div",
7
7
  Text: "span",
8
8
  animations,
9
- useAnimations: (props, { style, exitStyle }) => {
9
+ useAnimations: (props, { getStyle }) => {
10
10
  const animation = animations[props.animation];
11
11
  if (!animation) {
12
12
  throw new Error(`no animation found: ${props.animation}`);
13
13
  }
14
- console.log("now it is", {
15
- transition: `all ${animation}`,
16
- ...style,
17
- ...exitStyle
18
- });
14
+ const keys = props.animateOnly ? props.animateOnly.join(" ") : "all";
19
15
  return {
20
16
  style: {
21
- transition: `all ${animation}`,
22
- ...style,
23
- ...exitStyle
17
+ transition: `${keys} ${animation}`,
18
+ ...getStyle()
24
19
  }
25
20
  };
26
21
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/animations-css",
3
- "version": "1.0.0-beta.207+3fd10ea6",
3
+ "version": "1.0.0-beta.230+fab00413",
4
4
  "source": "src/index.ts",
5
5
  "license": "MIT",
6
6
  "typings": "types",
@@ -12,10 +12,10 @@
12
12
  "dist"
13
13
  ],
14
14
  "dependencies": {
15
- "@tamagui/core": "^1.0.0-beta.207+3fd10ea6"
15
+ "@tamagui/core": "^1.0.0-beta.230+fab00413"
16
16
  },
17
17
  "devDependencies": {
18
- "@tamagui/build": "^1.0.0-beta.207+3fd10ea6"
18
+ "@tamagui/build": "^1.0.0-beta.230+fab00413"
19
19
  },
20
20
  "scripts": {
21
21
  "build": "tamagui-build",
@@ -26,5 +26,5 @@
26
26
  "publishConfig": {
27
27
  "access": "public"
28
28
  },
29
- "gitHead": "3fd10ea6d026fac0339fbc1a501ee304f4985b05"
29
+ "gitHead": "fab0041356da84bd32620811a57a156d11514d2b"
30
30
  }
@@ -1 +1 @@
1
- {"version":3,"file":"createAnimations.d.ts","sourceRoot":"","sources":["../src/createAnimations.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAE/C,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,EAAE,UAAU,EAAE,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CA2BpF"}
1
+ {"version":3,"file":"createAnimations.d.ts","sourceRoot":"","sources":["../src/createAnimations.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAE/C,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,EAAE,UAAU,EAAE,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAsBpF"}