@tamagui/animation-helpers 2.0.0-rc.9 → 2.1.0

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.
Files changed (37) hide show
  1. package/dist/cjs/index.cjs +13 -10
  2. package/dist/cjs/index.native.js +13 -10
  3. package/dist/cjs/index.native.js.map +1 -1
  4. package/dist/cjs/normalizeTransition.cjs +102 -41
  5. package/dist/cjs/normalizeTransition.native.js +141 -55
  6. package/dist/cjs/normalizeTransition.native.js.map +1 -1
  7. package/dist/cjs/types.cjs +7 -5
  8. package/dist/cjs/types.native.js +7 -5
  9. package/dist/cjs/types.native.js.map +1 -1
  10. package/dist/esm/index.js +2 -14
  11. package/dist/esm/index.js.map +1 -6
  12. package/dist/esm/index.mjs +2 -2
  13. package/dist/esm/index.mjs.map +1 -1
  14. package/dist/esm/index.native.js +2 -2
  15. package/dist/esm/index.native.js.map +1 -1
  16. package/dist/esm/normalizeTransition.mjs +90 -32
  17. package/dist/esm/normalizeTransition.mjs.map +1 -1
  18. package/dist/esm/normalizeTransition.native.js +129 -46
  19. package/dist/esm/normalizeTransition.native.js.map +1 -1
  20. package/package.json +4 -3
  21. package/src/index.ts +1 -0
  22. package/src/normalizeTransition.ts +43 -0
  23. package/types/index.d.ts +1 -1
  24. package/types/index.d.ts.map +4 -4
  25. package/types/normalizeTransition.d.ts +11 -0
  26. package/types/normalizeTransition.d.ts.map +4 -4
  27. package/types/types.d.ts.map +2 -2
  28. package/dist/cjs/index.js +0 -25
  29. package/dist/cjs/index.js.map +0 -6
  30. package/dist/cjs/normalizeTransition.js +0 -106
  31. package/dist/cjs/normalizeTransition.js.map +0 -6
  32. package/dist/cjs/types.js +0 -14
  33. package/dist/cjs/types.js.map +0 -6
  34. package/dist/esm/normalizeTransition.js +0 -90
  35. package/dist/esm/normalizeTransition.js.map +0 -6
  36. package/dist/esm/types.js +0 -1
  37. package/dist/esm/types.js.map +0 -6
@@ -3,24 +3,27 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: !0
9
- });
10
- },
11
- __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
13
14
  get: () => from[key],
14
15
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
16
  });
16
- return to;
17
- };
17
+ }
18
+ return to;
19
+ };
18
20
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
- value: !0
21
+ value: true
20
22
  }), mod);
21
23
  var index_exports = {};
22
24
  __export(index_exports, {
23
25
  getAnimatedProperties: () => import_normalizeTransition.getAnimatedProperties,
26
+ getAnimationConfigsForKeys: () => import_normalizeTransition.getAnimationConfigsForKeys,
24
27
  getAnimationForProperty: () => import_normalizeTransition.getAnimationForProperty,
25
28
  getEffectiveAnimation: () => import_normalizeTransition.getEffectiveAnimation,
26
29
  hasAnimation: () => import_normalizeTransition.hasAnimation,
@@ -5,24 +5,27 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
15
16
  get: () => from[key],
16
17
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
18
  });
18
- return to;
19
- };
19
+ }
20
+ return to;
21
+ };
20
22
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: !0
23
+ value: true
22
24
  }), mod);
23
25
  var index_exports = {};
24
26
  __export(index_exports, {
25
27
  getAnimatedProperties: () => import_normalizeTransition.getAnimatedProperties,
28
+ getAnimationConfigsForKeys: () => import_normalizeTransition.getAnimationConfigsForKeys,
26
29
  getAnimationForProperty: () => import_normalizeTransition.getAnimationForProperty,
27
30
  getEffectiveAnimation: () => import_normalizeTransition.getEffectiveAnimation,
28
31
  hasAnimation: () => import_normalizeTransition.hasAnimation,
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","__export","getAnimatedProperties","import_normalizeTransition","getAnimationForProperty","getEffectiveAnimation","hasAnimation","normalizeTransition","module","exports"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,QAAA,CAAAD,aAAA;EAAAE,qBAAA,EAAAA,CAAA,KAAAC,0BAAA,CAAAD,qBAAA;EAAAE,uBAAA,EAAAA,CAAA,KAAAD,0BAAA,CAAAC,uBAAA;EAAAC,qBAAA,EAAAA,CAAA,KAAAF,0BAAA,CAAAE,qBAAA;EAAAC,YAAA,EAAAA,CAAA,KAAAH,0BAAA,CAAAG,YAAA;EAAAC,mBAAA,EAAAA,CAAA,KAAAJ,0BAAA,CAAAI;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAd,YAAA,CAAAK,aAMO","ignoreList":[]}
1
+ {"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","index_exports","getAnimatedProperties","import_normalizeTransition","getAnimationConfigsForKeys","getAnimationForProperty","getEffectiveAnimation","hasAnimation","normalizeTransition","module","exports","require"],"sources":["index.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\n__export(index_exports, {\n getAnimatedProperties: () => import_normalizeTransition.getAnimatedProperties,\n getAnimationConfigsForKeys: () => import_normalizeTransition.getAnimationConfigsForKeys,\n getAnimationForProperty: () => import_normalizeTransition.getAnimationForProperty,\n getEffectiveAnimation: () => import_normalizeTransition.getEffectiveAnimation,\n hasAnimation: () => import_normalizeTransition.hasAnimation,\n normalizeTransition: () => import_normalizeTransition.normalizeTransition\n});\nmodule.exports = __toCommonJS(index_exports);\nvar import_normalizeTransition = require(\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,CAAC;AAC1F,IAAIE,aAAa,GAAG,CAAC,CAAC;AACtBhB,QAAQ,CAACgB,aAAa,EAAE;EACtBC,qBAAqB,EAAEA,CAAA,KAAMC,0BAA0B,CAACD,qBAAqB;EAC7EE,0BAA0B,EAAEA,CAAA,KAAMD,0BAA0B,CAACC,0BAA0B;EACvFC,uBAAuB,EAAEA,CAAA,KAAMF,0BAA0B,CAACE,uBAAuB;EACjFC,qBAAqB,EAAEA,CAAA,KAAMH,0BAA0B,CAACG,qBAAqB;EAC7EC,YAAY,EAAEA,CAAA,KAAMJ,0BAA0B,CAACI,YAAY;EAC3DC,mBAAmB,EAAEA,CAAA,KAAML,0BAA0B,CAACK;AACxD,CAAC,CAAC;AACFC,MAAM,CAACC,OAAO,GAAGZ,YAAY,CAACG,aAAa,CAAC;AAC5C,IAAIE,0BAA0B,GAAGQ,OAAO,CAAC,iCAAuB,CAAC","ignoreList":[]}
@@ -3,24 +3,27 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: !0
9
- });
10
- },
11
- __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
13
14
  get: () => from[key],
14
15
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
16
  });
16
- return to;
17
- };
17
+ }
18
+ return to;
19
+ };
18
20
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
- value: !0
21
+ value: true
20
22
  }), mod);
21
23
  var normalizeTransition_exports = {};
22
24
  __export(normalizeTransition_exports, {
23
25
  getAnimatedProperties: () => getAnimatedProperties,
26
+ getAnimationConfigsForKeys: () => getAnimationConfigsForKeys,
24
27
  getAnimationForProperty: () => getAnimationForProperty,
25
28
  getEffectiveAnimation: () => getEffectiveAnimation,
26
29
  hasAnimation: () => hasAnimation,
@@ -32,28 +35,46 @@ function isSpringConfigKey(key) {
32
35
  return SPRING_CONFIG_KEYS.has(key);
33
36
  }
34
37
  function normalizeTransition(transition) {
35
- if (!transition) return {
36
- default: null,
37
- enter: null,
38
- exit: null,
39
- delay: void 0,
40
- properties: {}
41
- };
42
- if (typeof transition == "string") return {
43
- default: transition,
44
- enter: null,
45
- exit: null,
46
- delay: void 0,
47
- properties: {}
48
- };
38
+ if (!transition) {
39
+ return {
40
+ default: null,
41
+ enter: null,
42
+ exit: null,
43
+ delay: void 0,
44
+ properties: {}
45
+ };
46
+ }
47
+ if (typeof transition === "string") {
48
+ return {
49
+ default: transition,
50
+ enter: null,
51
+ exit: null,
52
+ delay: void 0,
53
+ properties: {}
54
+ };
55
+ }
49
56
  if (Array.isArray(transition)) {
50
- const [defaultAnimation, configObj] = transition,
51
- properties = {},
52
- springConfig = {};
53
- let delay,
54
- enter = null,
55
- exit = null;
56
- if (configObj && typeof configObj == "object") for (const [key, value] of Object.entries(configObj)) key === "delay" && typeof value == "number" ? delay = value : key === "enter" && typeof value == "string" ? enter = value : key === "exit" && typeof value == "string" ? exit = value : isSpringConfigKey(key) && value !== void 0 ? springConfig[key] = value : value !== void 0 && (properties[key] = value);
57
+ const [defaultAnimation, configObj] = transition;
58
+ const properties = {};
59
+ const springConfig = {};
60
+ let delay;
61
+ let enter = null;
62
+ let exit = null;
63
+ if (configObj && typeof configObj === "object") {
64
+ for (const [key, value] of Object.entries(configObj)) {
65
+ if (key === "delay" && typeof value === "number") {
66
+ delay = value;
67
+ } else if (key === "enter" && typeof value === "string") {
68
+ enter = value;
69
+ } else if (key === "exit" && typeof value === "string") {
70
+ exit = value;
71
+ } else if (isSpringConfigKey(key) && value !== void 0) {
72
+ springConfig[key] = value;
73
+ } else if (value !== void 0) {
74
+ properties[key] = value;
75
+ }
76
+ }
77
+ }
57
78
  return {
58
79
  default: defaultAnimation,
59
80
  enter,
@@ -63,14 +84,28 @@ function normalizeTransition(transition) {
63
84
  config: Object.keys(springConfig).length > 0 ? springConfig : void 0
64
85
  };
65
86
  }
66
- if (typeof transition == "object") {
67
- const properties = {},
68
- springConfig = {};
69
- let defaultAnimation = null,
70
- enter = null,
71
- exit = null,
72
- delay;
73
- for (const [key, value] of Object.entries(transition)) key === "default" && typeof value == "string" ? defaultAnimation = value : key === "enter" && typeof value == "string" ? enter = value : key === "exit" && typeof value == "string" ? exit = value : key === "delay" && typeof value == "number" ? delay = value : isSpringConfigKey(key) && value !== void 0 ? springConfig[key] = value : value !== void 0 && (properties[key] = value);
87
+ if (typeof transition === "object") {
88
+ const properties = {};
89
+ const springConfig = {};
90
+ let defaultAnimation = null;
91
+ let enter = null;
92
+ let exit = null;
93
+ let delay;
94
+ for (const [key, value] of Object.entries(transition)) {
95
+ if (key === "default" && typeof value === "string") {
96
+ defaultAnimation = value;
97
+ } else if (key === "enter" && typeof value === "string") {
98
+ enter = value;
99
+ } else if (key === "exit" && typeof value === "string") {
100
+ exit = value;
101
+ } else if (key === "delay" && typeof value === "number") {
102
+ delay = value;
103
+ } else if (isSpringConfigKey(key) && value !== void 0) {
104
+ springConfig[key] = value;
105
+ } else if (value !== void 0) {
106
+ properties[key] = value;
107
+ }
108
+ }
74
109
  return {
75
110
  default: defaultAnimation,
76
111
  enter,
@@ -90,7 +125,10 @@ function normalizeTransition(transition) {
90
125
  }
91
126
  function getAnimationForProperty(normalized, property) {
92
127
  const propertyAnimation = normalized.properties[property];
93
- return propertyAnimation !== void 0 ? propertyAnimation : normalized.default;
128
+ if (propertyAnimation !== void 0) {
129
+ return propertyAnimation;
130
+ }
131
+ return normalized.default;
94
132
  }
95
133
  function hasAnimation(normalized) {
96
134
  return normalized.default !== null || normalized.enter !== null || normalized.exit !== null || Object.keys(normalized.properties).length > 0;
@@ -99,5 +137,28 @@ function getAnimatedProperties(normalized) {
99
137
  return Object.keys(normalized.properties);
100
138
  }
101
139
  function getEffectiveAnimation(normalized, state) {
102
- return state === "enter" && normalized.enter ? normalized.enter : state === "exit" && normalized.exit ? normalized.exit : normalized.default;
140
+ if (state === "enter" && normalized.enter) {
141
+ return normalized.enter;
142
+ }
143
+ if (state === "exit" && normalized.exit) {
144
+ return normalized.exit;
145
+ }
146
+ return normalized.default;
147
+ }
148
+ function getAnimationConfigsForKeys(normalized, animations, keys, defaultAnimation) {
149
+ const result = /* @__PURE__ */new Map();
150
+ for (const key of keys) {
151
+ const propAnimation = normalized.properties[key];
152
+ let animationValue = null;
153
+ if (typeof propAnimation === "string") {
154
+ animationValue = animations[propAnimation] ?? null;
155
+ } else if (propAnimation && typeof propAnimation === "object" && propAnimation.type) {
156
+ animationValue = animations[propAnimation.type] ?? null;
157
+ }
158
+ if (animationValue === null) {
159
+ animationValue = defaultAnimation;
160
+ }
161
+ result.set(key, animationValue);
162
+ }
163
+ return result;
103
164
  }
@@ -5,24 +5,27 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
15
16
  get: () => from[key],
16
17
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
18
  });
18
- return to;
19
- };
19
+ }
20
+ return to;
21
+ };
20
22
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: !0
23
+ value: true
22
24
  }), mod);
23
25
  var normalizeTransition_exports = {};
24
26
  __export(normalizeTransition_exports, {
25
27
  getAnimatedProperties: () => getAnimatedProperties,
28
+ getAnimationConfigsForKeys: () => getAnimationConfigsForKeys,
26
29
  getAnimationForProperty: () => getAnimationForProperty,
27
30
  getEffectiveAnimation: () => getEffectiveAnimation,
28
31
  hasAnimation: () => hasAnimation,
@@ -32,50 +35,69 @@ module.exports = __toCommonJS(normalizeTransition_exports);
32
35
  function _type_of(obj) {
33
36
  "@swc/helpers - typeof";
34
37
 
35
- return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
38
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
36
39
  }
37
40
  var SPRING_CONFIG_KEYS = /* @__PURE__ */new Set(["stiffness", "damping", "mass", "tension", "friction", "velocity", "overshootClamping", "duration", "bounciness", "speed"]);
38
41
  function isSpringConfigKey(key) {
39
42
  return SPRING_CONFIG_KEYS.has(key);
40
43
  }
41
44
  function normalizeTransition(transition) {
42
- if (!transition) return {
43
- default: null,
44
- enter: null,
45
- exit: null,
46
- delay: void 0,
47
- properties: {}
48
- };
49
- if (typeof transition == "string") return {
50
- default: transition,
51
- enter: null,
52
- exit: null,
53
- delay: void 0,
54
- properties: {}
55
- };
45
+ if (!transition) {
46
+ return {
47
+ default: null,
48
+ enter: null,
49
+ exit: null,
50
+ delay: void 0,
51
+ properties: {}
52
+ };
53
+ }
54
+ if (typeof transition === "string") {
55
+ return {
56
+ default: transition,
57
+ enter: null,
58
+ exit: null,
59
+ delay: void 0,
60
+ properties: {}
61
+ };
62
+ }
56
63
  if (Array.isArray(transition)) {
57
- var [defaultAnimation, configObj] = transition,
58
- properties = {},
59
- springConfig = {},
60
- delay,
61
- enter = null,
62
- exit = null;
63
- if (configObj && (typeof configObj > "u" ? "undefined" : _type_of(configObj)) === "object") {
64
- var _iteratorNormalCompletion = !0,
65
- _didIteratorError = !1,
64
+ var [defaultAnimation, configObj] = transition;
65
+ var properties = {};
66
+ var springConfig = {};
67
+ var delay;
68
+ var enter = null;
69
+ var exit = null;
70
+ if (configObj && (typeof configObj === "undefined" ? "undefined" : _type_of(configObj)) === "object") {
71
+ var _iteratorNormalCompletion = true,
72
+ _didIteratorError = false,
66
73
  _iteratorError = void 0;
67
74
  try {
68
- for (var _iterator = Object.entries(configObj)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
75
+ for (var _iterator = Object.entries(configObj)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
69
76
  var [key, value] = _step.value;
70
- key === "delay" && typeof value == "number" ? delay = value : key === "enter" && typeof value == "string" ? enter = value : key === "exit" && typeof value == "string" ? exit = value : isSpringConfigKey(key) && value !== void 0 ? springConfig[key] = value : value !== void 0 && (properties[key] = value);
77
+ if (key === "delay" && typeof value === "number") {
78
+ delay = value;
79
+ } else if (key === "enter" && typeof value === "string") {
80
+ enter = value;
81
+ } else if (key === "exit" && typeof value === "string") {
82
+ exit = value;
83
+ } else if (isSpringConfigKey(key) && value !== void 0) {
84
+ springConfig[key] = value;
85
+ } else if (value !== void 0) {
86
+ properties[key] = value;
87
+ }
71
88
  }
72
89
  } catch (err) {
73
- _didIteratorError = !0, _iteratorError = err;
90
+ _didIteratorError = true;
91
+ _iteratorError = err;
74
92
  } finally {
75
93
  try {
76
- !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
94
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
95
+ _iterator.return();
96
+ }
77
97
  } finally {
78
- if (_didIteratorError) throw _iteratorError;
98
+ if (_didIteratorError) {
99
+ throw _iteratorError;
100
+ }
79
101
  }
80
102
  }
81
103
  }
@@ -88,28 +110,45 @@ function normalizeTransition(transition) {
88
110
  config: Object.keys(springConfig).length > 0 ? springConfig : void 0
89
111
  };
90
112
  }
91
- if ((typeof transition > "u" ? "undefined" : _type_of(transition)) === "object") {
92
- var properties1 = {},
93
- springConfig1 = {},
94
- defaultAnimation1 = null,
95
- enter1 = null,
96
- exit1 = null,
97
- delay1,
98
- _iteratorNormalCompletion1 = !0,
99
- _didIteratorError1 = !1,
113
+ if ((typeof transition === "undefined" ? "undefined" : _type_of(transition)) === "object") {
114
+ var properties1 = {};
115
+ var springConfig1 = {};
116
+ var defaultAnimation1 = null;
117
+ var enter1 = null;
118
+ var exit1 = null;
119
+ var delay1;
120
+ var _iteratorNormalCompletion1 = true,
121
+ _didIteratorError1 = false,
100
122
  _iteratorError1 = void 0;
101
123
  try {
102
- for (var _iterator1 = Object.entries(transition)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = !0) {
124
+ for (var _iterator1 = Object.entries(transition)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
103
125
  var [key1, value1] = _step1.value;
104
- key1 === "default" && typeof value1 == "string" ? defaultAnimation1 = value1 : key1 === "enter" && typeof value1 == "string" ? enter1 = value1 : key1 === "exit" && typeof value1 == "string" ? exit1 = value1 : key1 === "delay" && typeof value1 == "number" ? delay1 = value1 : isSpringConfigKey(key1) && value1 !== void 0 ? springConfig1[key1] = value1 : value1 !== void 0 && (properties1[key1] = value1);
126
+ if (key1 === "default" && typeof value1 === "string") {
127
+ defaultAnimation1 = value1;
128
+ } else if (key1 === "enter" && typeof value1 === "string") {
129
+ enter1 = value1;
130
+ } else if (key1 === "exit" && typeof value1 === "string") {
131
+ exit1 = value1;
132
+ } else if (key1 === "delay" && typeof value1 === "number") {
133
+ delay1 = value1;
134
+ } else if (isSpringConfigKey(key1) && value1 !== void 0) {
135
+ springConfig1[key1] = value1;
136
+ } else if (value1 !== void 0) {
137
+ properties1[key1] = value1;
138
+ }
105
139
  }
106
140
  } catch (err) {
107
- _didIteratorError1 = !0, _iteratorError1 = err;
141
+ _didIteratorError1 = true;
142
+ _iteratorError1 = err;
108
143
  } finally {
109
144
  try {
110
- !_iteratorNormalCompletion1 && _iterator1.return != null && _iterator1.return();
145
+ if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
146
+ _iterator1.return();
147
+ }
111
148
  } finally {
112
- if (_didIteratorError1) throw _iteratorError1;
149
+ if (_didIteratorError1) {
150
+ throw _iteratorError1;
151
+ }
113
152
  }
114
153
  }
115
154
  return {
@@ -131,7 +170,10 @@ function normalizeTransition(transition) {
131
170
  }
132
171
  function getAnimationForProperty(normalized, property) {
133
172
  var propertyAnimation = normalized.properties[property];
134
- return propertyAnimation !== void 0 ? propertyAnimation : normalized.default;
173
+ if (propertyAnimation !== void 0) {
174
+ return propertyAnimation;
175
+ }
176
+ return normalized.default;
135
177
  }
136
178
  function hasAnimation(normalized) {
137
179
  return normalized.default !== null || normalized.enter !== null || normalized.exit !== null || Object.keys(normalized.properties).length > 0;
@@ -140,6 +182,50 @@ function getAnimatedProperties(normalized) {
140
182
  return Object.keys(normalized.properties);
141
183
  }
142
184
  function getEffectiveAnimation(normalized, state) {
143
- return state === "enter" && normalized.enter ? normalized.enter : state === "exit" && normalized.exit ? normalized.exit : normalized.default;
185
+ if (state === "enter" && normalized.enter) {
186
+ return normalized.enter;
187
+ }
188
+ if (state === "exit" && normalized.exit) {
189
+ return normalized.exit;
190
+ }
191
+ return normalized.default;
192
+ }
193
+ function getAnimationConfigsForKeys(normalized, animations, keys, defaultAnimation) {
194
+ var result = /* @__PURE__ */new Map();
195
+ var _iteratorNormalCompletion = true,
196
+ _didIteratorError = false,
197
+ _iteratorError = void 0;
198
+ try {
199
+ for (var _iterator = keys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
200
+ var key = _step.value;
201
+ var propAnimation = normalized.properties[key];
202
+ var animationValue = null;
203
+ if (typeof propAnimation === "string") {
204
+ var _animations_propAnimation;
205
+ animationValue = (_animations_propAnimation = animations[propAnimation]) !== null && _animations_propAnimation !== void 0 ? _animations_propAnimation : null;
206
+ } else if (propAnimation && (typeof propAnimation === "undefined" ? "undefined" : _type_of(propAnimation)) === "object" && propAnimation.type) {
207
+ var _animations_propAnimation_type;
208
+ animationValue = (_animations_propAnimation_type = animations[propAnimation.type]) !== null && _animations_propAnimation_type !== void 0 ? _animations_propAnimation_type : null;
209
+ }
210
+ if (animationValue === null) {
211
+ animationValue = defaultAnimation;
212
+ }
213
+ result.set(key, animationValue);
214
+ }
215
+ } catch (err) {
216
+ _didIteratorError = true;
217
+ _iteratorError = err;
218
+ } finally {
219
+ try {
220
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
221
+ _iterator.return();
222
+ }
223
+ } finally {
224
+ if (_didIteratorError) {
225
+ throw _iteratorError;
226
+ }
227
+ }
228
+ }
229
+ return result;
144
230
  }
145
231
  //# sourceMappingURL=normalizeTransition.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","normalizeTransition_exports","__export","getAnimatedProperties","getAnimationForProperty","getEffectiveAnimation","hasAnimation","normalizeTransition","module","exports","_type_of","obj","Symbol","constructor","SPRING_CONFIG_KEYS","Set","isSpringConfigKey","key","has","transition","default","enter","exit","delay","properties","Array","isArray","defaultAnimation","configObj","springConfig","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","Object","entries","iterator","_step","next","done","err","return","config","keys","length","properties1","springConfig1","defaultAnimation1","enter1","exit1","delay1","_iteratorNormalCompletion1","_didIteratorError1","_iteratorError1","_iterator1","_step1","key1","value1"],"sources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AC,MAAA;MAAAC,0BAAA;MAAAC,kBAAA;MAAAC,eAAA;IACF;MAUO,KAAS,IAAAC,UAAA,GAAApB,MACd,CAAAC,OAAA,CAAAhB,UACA,EACiCP,MAAA,CAAAwB,QAAA,KAAAmB,MAAA,IAAAJ,0BAAA,IAAAI,MAAA,GAAAD,UAAA,CAAAhB,IAAA,IAAAC,IAAA,GAAAY,0BAAA;QAE3B,KAAAK,IAAA,EAAAC,MAAA,IAAoBF,MAAA,CAAAvD,KAAW;QACrCwD,IAAI,yBAAsBC,MACjB,eAAAV,iBAIS,GAAAU,MAAA,GAAAD,IAAA,uBAAAC,MAAA,eAAAT,MAAA,GAAAS,MAAA,GAAAD,IAAA,sBAAAC,MAAA,eAAAR,KAAA,GAAAQ,MAAA,GAAAD,IAAA,uBAAAC,MAAA,eAAAP,MAAA,GAAAO,MAAA,GAAAzC,iBAAA,CAAAwC,IAAA,KAAAC,MAAA,cAAAX,aAAA,CAAAU,IAAA,IAAAC,MAAA,GAAAA,MAAA,gBAAAZ,WAAA,CAAAW,IAAA,IAAAC,MAAA;MACpB;IAKO,SAASjB,GAAA;MACdY,kBACa,OAAAC,eACX,GAAAb,GAAW;IAIf;MAMO,IAAS;QACd,CAAOW,0BAAuB,IAAAG,UAAU,CAAAb,MAAA,YAAAa,UAAA,CAAAb,MAAA;MAC1C;QAUO,IAASW,kBAAA,EAIV,MAAAC,eAAqB;MAO3B","ignoreList":[]}
1
+ {"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","normalizeTransition_exports","getAnimatedProperties","getAnimationConfigsForKeys","getAnimationForProperty","getEffectiveAnimation","hasAnimation","normalizeTransition","module","exports","_type_of","obj","Symbol","constructor","SPRING_CONFIG_KEYS","Set","isSpringConfigKey","has","transition","default","enter","exit","delay","properties","Array","isArray","defaultAnimation","configObj","springConfig","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","entries","iterator","_step","next","done","err","return","config","keys","length","properties1","springConfig1","defaultAnimation1","enter1","exit1","delay1","_iteratorNormalCompletion1","_didIteratorError1","_iteratorError1","_iterator1","_step1","key1","value1","normalized","property","propertyAnimation","state","animations","result","Map","propAnimation","animationValue","_animations_propAnimation","type","_animations_propAnimation_type","set"],"sources":["normalizeTransition.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar normalizeTransition_exports = {};\n__export(normalizeTransition_exports, {\n getAnimatedProperties: () => getAnimatedProperties,\n getAnimationConfigsForKeys: () => getAnimationConfigsForKeys,\n getAnimationForProperty: () => getAnimationForProperty,\n getEffectiveAnimation: () => getEffectiveAnimation,\n hasAnimation: () => hasAnimation,\n normalizeTransition: () => normalizeTransition\n});\nmodule.exports = __toCommonJS(normalizeTransition_exports);\nfunction _type_of(obj) {\n \"@swc/helpers - typeof\";\n return obj && typeof Symbol !== \"undefined\" && obj.constructor === Symbol ? \"symbol\" : typeof obj;\n}\nvar SPRING_CONFIG_KEYS = /* @__PURE__ */ new Set([\n \"stiffness\",\n \"damping\",\n \"mass\",\n \"tension\",\n \"friction\",\n \"velocity\",\n \"overshootClamping\",\n \"duration\",\n \"bounciness\",\n \"speed\"\n]);\nfunction isSpringConfigKey(key) {\n return SPRING_CONFIG_KEYS.has(key);\n}\nfunction normalizeTransition(transition) {\n if (!transition) {\n return {\n default: null,\n enter: null,\n exit: null,\n delay: void 0,\n properties: {}\n };\n }\n if (typeof transition === \"string\") {\n return {\n default: transition,\n enter: null,\n exit: null,\n delay: void 0,\n properties: {}\n };\n }\n if (Array.isArray(transition)) {\n var [defaultAnimation, configObj] = transition;\n var properties = {};\n var springConfig = {};\n var delay;\n var enter = null;\n var exit = null;\n if (configObj && (typeof configObj === \"undefined\" ? \"undefined\" : _type_of(configObj)) === \"object\") {\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = Object.entries(configObj)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var [key, value] = _step.value;\n if (key === \"delay\" && typeof value === \"number\") {\n delay = value;\n } else if (key === \"enter\" && typeof value === \"string\") {\n enter = value;\n } else if (key === \"exit\" && typeof value === \"string\") {\n exit = value;\n } else if (isSpringConfigKey(key) && value !== void 0) {\n springConfig[key] = value;\n } else if (value !== void 0) {\n properties[key] = value;\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n }\n return {\n default: defaultAnimation,\n enter,\n exit,\n delay,\n properties,\n config: Object.keys(springConfig).length > 0 ? springConfig : void 0\n };\n }\n if ((typeof transition === \"undefined\" ? \"undefined\" : _type_of(transition)) === \"object\") {\n var properties1 = {};\n var springConfig1 = {};\n var defaultAnimation1 = null;\n var enter1 = null;\n var exit1 = null;\n var delay1;\n var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;\n try {\n for (var _iterator1 = Object.entries(transition)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {\n var [key1, value1] = _step1.value;\n if (key1 === \"default\" && typeof value1 === \"string\") {\n defaultAnimation1 = value1;\n } else if (key1 === \"enter\" && typeof value1 === \"string\") {\n enter1 = value1;\n } else if (key1 === \"exit\" && typeof value1 === \"string\") {\n exit1 = value1;\n } else if (key1 === \"delay\" && typeof value1 === \"number\") {\n delay1 = value1;\n } else if (isSpringConfigKey(key1) && value1 !== void 0) {\n springConfig1[key1] = value1;\n } else if (value1 !== void 0) {\n properties1[key1] = value1;\n }\n }\n } catch (err) {\n _didIteratorError1 = true;\n _iteratorError1 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion1 && _iterator1.return != null) {\n _iterator1.return();\n }\n } finally {\n if (_didIteratorError1) {\n throw _iteratorError1;\n }\n }\n }\n return {\n default: defaultAnimation1,\n enter: enter1,\n exit: exit1,\n delay: delay1,\n properties: properties1,\n config: Object.keys(springConfig1).length > 0 ? springConfig1 : void 0\n };\n }\n return {\n default: null,\n enter: null,\n exit: null,\n delay: void 0,\n properties: {}\n };\n}\nfunction getAnimationForProperty(normalized, property) {\n var propertyAnimation = normalized.properties[property];\n if (propertyAnimation !== void 0) {\n return propertyAnimation;\n }\n return normalized.default;\n}\nfunction hasAnimation(normalized) {\n return normalized.default !== null || normalized.enter !== null || normalized.exit !== null || Object.keys(normalized.properties).length > 0;\n}\nfunction getAnimatedProperties(normalized) {\n return Object.keys(normalized.properties);\n}\nfunction getEffectiveAnimation(normalized, state) {\n if (state === \"enter\" && normalized.enter) {\n return normalized.enter;\n }\n if (state === \"exit\" && normalized.exit) {\n return normalized.exit;\n }\n return normalized.default;\n}\nfunction getAnimationConfigsForKeys(normalized, animations, keys, defaultAnimation) {\n var result = /* @__PURE__ */ new Map();\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = keys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var key = _step.value;\n var propAnimation = normalized.properties[key];\n var animationValue = null;\n if (typeof propAnimation === \"string\") {\n var _animations_propAnimation;\n animationValue = (_animations_propAnimation = animations[propAnimation]) !== null && _animations_propAnimation !== void 0 ? _animations_propAnimation : null;\n } else if (propAnimation && (typeof propAnimation === \"undefined\" ? \"undefined\" : _type_of(propAnimation)) === \"object\" && propAnimation.type) {\n var _animations_propAnimation_type;\n animationValue = (_animations_propAnimation_type = animations[propAnimation.type]) !== null && _animations_propAnimation_type !== void 0 ? _animations_propAnimation_type : null;\n }\n if (animationValue === null) {\n animationValue = defaultAnimation;\n }\n result.set(key, animationValue);\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n return result;\n}\n//# sourceMappingURL=normalizeTransition.js.map\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,SAAS,GAAGC,MAAM,CAACC,cAAc;AACrC,IAAIC,gBAAgB,GAAGF,MAAM,CAACG,wBAAwB;AACtD,IAAIC,iBAAiB,GAAGJ,MAAM,CAACK,mBAAmB;AAClD,IAAIC,YAAY,GAAGN,MAAM,CAACO,SAAS,CAACC,cAAc;AAClD,IAAIC,QAAQ,GAAGA,CAACC,MAAM,EAAEC,GAAG,KAAK;EAC9B,KAAK,IAAIC,IAAI,IAAID,GAAG,EAClBZ,SAAS,CAACW,MAAM,EAAEE,IAAI,EAAE;IAAEC,GAAG,EAAEF,GAAG,CAACC,IAAI,CAAC;IAAEE,UAAU,EAAE;EAAK,CAAC,CAAC;AACjE,CAAC;AACD,IAAIC,WAAW,GAAGA,CAACC,EAAE,EAAEC,IAAI,EAAEC,MAAM,EAAEC,IAAI,KAAK;EAC5C,IAAIF,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,IAAI,OAAOA,IAAI,KAAK,UAAU,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Aa,GAAGP,UAAU,CAACjC,UAAU,CAAC3B,GAAG,CAAC;MAC9C,IAAIoE,cAAc,GAAG,IAAI;MACzB,IAAI,OAAOD,aAAa,KAAK,QAAQ,EAAE;QACrC,IAAIE,yBAAyB;QAC7BD,cAAc,GAAG,CAACC,yBAAyB,GAAGL,UAAU,CAACG,aAAa,CAAC,MAAM,IAAI,IAAIE,yBAAyB,KAAK,KAAK,CAAC,GAAGA,yBAAyB,GAAG,IAAI;MAC9J,CAAC,MAAM,IAAIF,aAAa,IAAI,CAAC,OAAOA,aAAa,KAAK,WAAW,GAAG,WAAW,GAAGrD,QAAQ,CAACqD,aAAa,CAAC,MAAM,QAAQ,IAAIA,aAAa,CAACG,IAAI,EAAE;QAC7I,IAAIC,8BAA8B;QAClCH,cAAc,GAAG,CAACG,8BAA8B,GAAGP,UAAU,CAACG,aAAa,CAACG,IAAI,CAAC,MAAM,IAAI,IAAIC,8BAA8B,KAAK,KAAK,CAAC,GAAGA,8BAA8B,GAAG,IAAI;MAClL;MACA,IAAIH,cAAc,KAAK,IAAI,EAAE;QAC3BA,cAAc,GAAGtC,gBAAgB;MACnC;MACAmC,MAAM,CAACO,GAAG,CAACxE,GAAG,EAAEoE,cAAc,CAAC;IACjC;EACF,CAAC,CAAC,OAAO1B,GAAG,EAAE;IACZR,iBAAiB,GAAG,IAAI;IACxBC,cAAc,GAAGO,GAAG;EACtB,CAAC,SAAS;IACR,IAAI;MACF,IAAI,CAACT,yBAAyB,IAAIG,SAAS,CAACO,MAAM,IAAI,IAAI,EAAE;QAC1DP,SAAS,CAACO,MAAM,CAAC,CAAC;MACpB;IACF,CAAC,SAAS;MACR,IAAIT,iBAAiB,EAAE;QACrB,MAAMC,cAAc;MACtB;IACF;EACF;EACA,OAAO8B,MAAM;AACf","ignoreList":[]}
@@ -3,14 +3,16 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
7
- get: () => from[key],
8
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
9
- });
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
8
+ get: () => from[key],
9
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
10
+ });
11
+ }
10
12
  return to;
11
13
  };
12
14
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
13
- value: !0
15
+ value: true
14
16
  }), mod);
15
17
  var types_exports = {};
16
18
  module.exports = __toCommonJS(types_exports);
@@ -5,14 +5,16 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __copyProps = (to, from, except, desc) => {
8
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
9
- get: () => from[key],
10
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
11
- });
8
+ if (from && typeof from === "object" || typeof from === "function") {
9
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
10
+ get: () => from[key],
11
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
12
+ });
13
+ }
12
14
  return to;
13
15
  };
14
16
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
15
- value: !0
17
+ value: true
16
18
  }), mod);
17
19
  var types_exports = {};
18
20
  module.exports = __toCommonJS(types_exports);