@tamagui/animations-css 1.0.0-beta.189 → 1.0.0-beta.193

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,21 +41,23 @@ 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
  };
59
57
  }
60
58
  __name(createAnimations, "createAnimations");
59
+ // Annotate the CommonJS export names for ESM import in node:
60
+ 0 && (module.exports = {
61
+ createAnimations
62
+ });
61
63
  //# sourceMappingURL=createAnimations.js.map
@@ -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
  }
package/dist/cjs/index.js CHANGED
File without changes
File without changes
@@ -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
  }
package/dist/esm/index.js CHANGED
File without changes
File without changes
@@ -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/dist/jsx/index.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/animations-css",
3
- "version": "1.0.0-beta.189+64107267",
3
+ "version": "1.0.0-beta.193+14c13acd",
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.189+64107267"
15
+ "@tamagui/core": "^1.0.0-beta.193+14c13acd"
16
16
  },
17
17
  "devDependencies": {
18
- "@tamagui/build": "^1.0.0-beta.189+64107267"
18
+ "@tamagui/build": "^1.0.0-beta.193+14c13acd"
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": "6410726774260b4de48c270c81a17b168995a3b7"
29
+ "gitHead": "14c13acd9143e76d975e7a6c311d4a5f3a00bced"
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"}