@hanzogui/animation-helpers 8.3.0 → 8.3.2

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 (43) hide show
  1. package/dist/cjs/index.js +11 -0
  2. package/dist/cjs/index.js.map +1 -0
  3. package/dist/cjs/normalizeTransition.js +229 -0
  4. package/dist/cjs/normalizeTransition.js.map +1 -0
  5. package/dist/cjs/package.json +1 -0
  6. package/dist/cjs/types.js +3 -0
  7. package/dist/cjs/types.js.map +1 -0
  8. package/dist/esm/index.js +2 -3
  9. package/dist/esm/index.js.map +1 -1
  10. package/dist/esm/normalizeTransition.js +221 -0
  11. package/dist/esm/normalizeTransition.js.map +1 -0
  12. package/dist/esm/types.js +2 -0
  13. package/dist/esm/types.js.map +1 -0
  14. package/package.json +11 -11
  15. package/src/index.ts +6 -2
  16. package/src/normalizeTransition.ts +3 -3
  17. package/types/index.d.ts +2 -3
  18. package/types/index.d.ts.map +1 -11
  19. package/types/normalizeTransition.d.ts +41 -42
  20. package/types/normalizeTransition.d.ts.map +1 -11
  21. package/types/types.d.ts +43 -44
  22. package/types/types.d.ts.map +1 -11
  23. package/dist/cjs/index.cjs +0 -33
  24. package/dist/cjs/index.native.js +0 -36
  25. package/dist/cjs/index.native.js.map +0 -1
  26. package/dist/cjs/normalizeTransition.cjs +0 -164
  27. package/dist/cjs/normalizeTransition.native.js +0 -231
  28. package/dist/cjs/normalizeTransition.native.js.map +0 -1
  29. package/dist/cjs/types.cjs +0 -18
  30. package/dist/cjs/types.native.js +0 -21
  31. package/dist/cjs/types.native.js.map +0 -1
  32. package/dist/esm/index.mjs +0 -3
  33. package/dist/esm/index.mjs.map +0 -1
  34. package/dist/esm/index.native.js +0 -3
  35. package/dist/esm/index.native.js.map +0 -1
  36. package/dist/esm/normalizeTransition.mjs +0 -134
  37. package/dist/esm/normalizeTransition.mjs.map +0 -1
  38. package/dist/esm/normalizeTransition.native.js +0 -198
  39. package/dist/esm/normalizeTransition.native.js.map +0 -1
  40. package/dist/esm/types.mjs +0 -2
  41. package/dist/esm/types.mjs.map +0 -1
  42. package/dist/esm/types.native.js +0 -2
  43. package/dist/esm/types.native.js.map +0 -1
@@ -1,231 +0,0 @@
1
- "use strict";
2
-
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
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, {
16
- get: () => from[key],
17
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
- });
19
- }
20
- return to;
21
- };
22
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
23
- value: true
24
- }), mod);
25
- var normalizeTransition_exports = {};
26
- __export(normalizeTransition_exports, {
27
- getAnimatedProperties: () => getAnimatedProperties,
28
- getAnimationConfigsForKeys: () => getAnimationConfigsForKeys,
29
- getAnimationForProperty: () => getAnimationForProperty,
30
- getEffectiveAnimation: () => getEffectiveAnimation,
31
- hasAnimation: () => hasAnimation,
32
- normalizeTransition: () => normalizeTransition
33
- });
34
- module.exports = __toCommonJS(normalizeTransition_exports);
35
- function _type_of(obj) {
36
- "@swc/helpers - typeof";
37
-
38
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
39
- }
40
- var SPRING_CONFIG_KEYS = /* @__PURE__ */new Set(["stiffness", "damping", "mass", "tension", "friction", "velocity", "overshootClamping", "duration", "bounciness", "speed"]);
41
- function isSpringConfigKey(key) {
42
- return SPRING_CONFIG_KEYS.has(key);
43
- }
44
- function normalizeTransition(transition) {
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
- }
63
- if (Array.isArray(transition)) {
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,
73
- _iteratorError = void 0;
74
- try {
75
- for (var _iterator = Object.entries(configObj)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
76
- var [key, value] = _step.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
- }
88
- }
89
- } catch (err) {
90
- _didIteratorError = true;
91
- _iteratorError = err;
92
- } finally {
93
- try {
94
- if (!_iteratorNormalCompletion && _iterator.return != null) {
95
- _iterator.return();
96
- }
97
- } finally {
98
- if (_didIteratorError) {
99
- throw _iteratorError;
100
- }
101
- }
102
- }
103
- }
104
- return {
105
- default: defaultAnimation,
106
- enter,
107
- exit,
108
- delay,
109
- properties,
110
- config: Object.keys(springConfig).length > 0 ? springConfig : void 0
111
- };
112
- }
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,
122
- _iteratorError1 = void 0;
123
- try {
124
- for (var _iterator1 = Object.entries(transition)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
125
- var [key1, value1] = _step1.value;
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
- }
139
- }
140
- } catch (err) {
141
- _didIteratorError1 = true;
142
- _iteratorError1 = err;
143
- } finally {
144
- try {
145
- if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
146
- _iterator1.return();
147
- }
148
- } finally {
149
- if (_didIteratorError1) {
150
- throw _iteratorError1;
151
- }
152
- }
153
- }
154
- return {
155
- default: defaultAnimation1,
156
- enter: enter1,
157
- exit: exit1,
158
- delay: delay1,
159
- properties: properties1,
160
- config: Object.keys(springConfig1).length > 0 ? springConfig1 : void 0
161
- };
162
- }
163
- return {
164
- default: null,
165
- enter: null,
166
- exit: null,
167
- delay: void 0,
168
- properties: {}
169
- };
170
- }
171
- function getAnimationForProperty(normalized, property) {
172
- var propertyAnimation = normalized.properties[property];
173
- if (propertyAnimation !== void 0) {
174
- return propertyAnimation;
175
- }
176
- return normalized.default;
177
- }
178
- function hasAnimation(normalized) {
179
- return normalized.default !== null || normalized.enter !== null || normalized.exit !== null || Object.keys(normalized.properties).length > 0;
180
- }
181
- function getAnimatedProperties(normalized) {
182
- return Object.keys(normalized.properties);
183
- }
184
- function getEffectiveAnimation(normalized, state) {
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;
230
- }
231
- //# sourceMappingURL=normalizeTransition.native.js.map
@@ -1 +0,0 @@
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,EAA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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":[]}
@@ -1,18 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __copyProps = (to, from, except, desc) => {
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
- }
12
- return to;
13
- };
14
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
15
- value: true
16
- }), mod);
17
- var types_exports = {};
18
- module.exports = __toCommonJS(types_exports);
@@ -1,21 +0,0 @@
1
- "use strict";
2
-
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __copyProps = (to, from, except, desc) => {
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
- }
14
- return to;
15
- };
16
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
17
- value: true
18
- }), mod);
19
- var types_exports = {};
20
- module.exports = __toCommonJS(types_exports);
21
- //# sourceMappingURL=types.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__copyProps","to","from","except","desc","key","call","get","enumerable","__toCommonJS","mod","value","types_exports","module","exports"],"sources":["types.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\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 types_exports = {};\nmodule.exports = __toCommonJS(types_exports);\n//# sourceMappingURL=types.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,WAAW,GAAGA,CAACC,EAAE,EAAEC,IAAI,EAAEC,MAAM,EAAEC,IAAI,KAAK;EAC5C,IAAIF,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,IAAI,OAAOA,IAAI,KAAK,UAAU,EAAE;IAClE,KAAK,IAAIG,GAAG,IAAIV,iBAAiB,CAACO,IAAI,CAAC,EACrC,IAAI,CAACL,YAAY,CAACS,IAAI,CAACL,EAAE,EAAEI,GAAG,CAAC,IAAIA,GAAG,KAAKF,MAAM,EAC/Cb,SAAS,CAACW,EAAE,EAAEI,GAAG,EAAE;MAAEE,GAAG,EAAEA,CAAA,KAAML,IAAI,CAACG,GAAG,CAAC;MAAEG,UAAU,EAAE,EAAEJ,IAAI,GAAGX,gBAAgB,CAACS,IAAI,EAAEG,GAAG,CAAC,CAAC,IAAID,IAAI,CAACI;IAAW,CAAC,CAAC;EACxH;EACA,OAAOP,EAAE;AACX,CAAC;AACD,IAAIQ,YAAY,GAAIC,GAAG,IAAKV,WAAW,CAACV,SAAS,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE;EAAEqB,KAAK,EAAE;AAAK,CAAC,CAAC,EAAED,GAAG,CAAC;AAC1F,IAAIE,aAAa,GAAG,CAAC,CAAC;AACtBC,MAAM,CAACC,OAAO,GAAGL,YAAY,CAACG,aAAa,CAAC","ignoreList":[]}
@@ -1,3 +0,0 @@
1
- import { normalizeTransition, getAnimationForProperty, hasAnimation, getAnimatedProperties, getEffectiveAnimation, getAnimationConfigsForKeys } from "./normalizeTransition.mjs";
2
- export { getAnimatedProperties, getAnimationConfigsForKeys, getAnimationForProperty, getEffectiveAnimation, hasAnimation, normalizeTransition };
3
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["normalizeTransition","getAnimationForProperty","hasAnimation","getAnimatedProperties","getEffectiveAnimation","getAnimationConfigsForKeys"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,SACEA,mBAAA,EACAC,uBAAA,EACAC,YAAA,EACAC,qBAAA,EACAC,qBAAA,EACAC,0BAAA,QACK","ignoreList":[]}
@@ -1,3 +0,0 @@
1
- import { normalizeTransition, getAnimationForProperty, hasAnimation, getAnimatedProperties, getEffectiveAnimation, getAnimationConfigsForKeys } from "./normalizeTransition.native.js";
2
- export { getAnimatedProperties, getAnimationConfigsForKeys, getAnimationForProperty, getEffectiveAnimation, hasAnimation, normalizeTransition };
3
- //# sourceMappingURL=index.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["normalizeTransition","getAnimationForProperty","hasAnimation","getAnimatedProperties","getEffectiveAnimation","getAnimationConfigsForKeys"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,SAAAA,mBAAA,EAAAC,uBAAA,EAAAC,YAAA,EAAAC,qBAAA,EAAAC,qBAAA,EAAAC,0BAAA;AAAA,SAEEF,qBAAA,EACAE,0BAAA,EACAJ,uBAAA,EACAG,qBAAA,EACAF,YAAA,EAAAF,mBACK","ignoreList":[]}
@@ -1,134 +0,0 @@
1
- const SPRING_CONFIG_KEYS = /* @__PURE__ */new Set(["stiffness", "damping", "mass", "tension", "friction", "velocity", "overshootClamping", "duration", "bounciness", "speed"]);
2
- function isSpringConfigKey(key) {
3
- return SPRING_CONFIG_KEYS.has(key);
4
- }
5
- function normalizeTransition(transition) {
6
- if (!transition) {
7
- return {
8
- default: null,
9
- enter: null,
10
- exit: null,
11
- delay: void 0,
12
- properties: {}
13
- };
14
- }
15
- if (typeof transition === "string") {
16
- return {
17
- default: transition,
18
- enter: null,
19
- exit: null,
20
- delay: void 0,
21
- properties: {}
22
- };
23
- }
24
- if (Array.isArray(transition)) {
25
- const [defaultAnimation, configObj] = transition;
26
- const properties = {};
27
- const springConfig = {};
28
- let delay;
29
- let enter = null;
30
- let exit = null;
31
- if (configObj && typeof configObj === "object") {
32
- for (const [key, value] of Object.entries(configObj)) {
33
- if (key === "delay" && typeof value === "number") {
34
- delay = value;
35
- } else if (key === "enter" && typeof value === "string") {
36
- enter = value;
37
- } else if (key === "exit" && typeof value === "string") {
38
- exit = value;
39
- } else if (isSpringConfigKey(key) && value !== void 0) {
40
- springConfig[key] = value;
41
- } else if (value !== void 0) {
42
- properties[key] = value;
43
- }
44
- }
45
- }
46
- return {
47
- default: defaultAnimation,
48
- enter,
49
- exit,
50
- delay,
51
- properties,
52
- config: Object.keys(springConfig).length > 0 ? springConfig : void 0
53
- };
54
- }
55
- if (typeof transition === "object") {
56
- const properties = {};
57
- const springConfig = {};
58
- let defaultAnimation = null;
59
- let enter = null;
60
- let exit = null;
61
- let delay;
62
- for (const [key, value] of Object.entries(transition)) {
63
- if (key === "default" && typeof value === "string") {
64
- defaultAnimation = value;
65
- } else if (key === "enter" && typeof value === "string") {
66
- enter = value;
67
- } else if (key === "exit" && typeof value === "string") {
68
- exit = value;
69
- } else if (key === "delay" && typeof value === "number") {
70
- delay = 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
- return {
78
- default: defaultAnimation,
79
- enter,
80
- exit,
81
- delay,
82
- properties,
83
- config: Object.keys(springConfig).length > 0 ? springConfig : void 0
84
- };
85
- }
86
- return {
87
- default: null,
88
- enter: null,
89
- exit: null,
90
- delay: void 0,
91
- properties: {}
92
- };
93
- }
94
- function getAnimationForProperty(normalized, property) {
95
- const propertyAnimation = normalized.properties[property];
96
- if (propertyAnimation !== void 0) {
97
- return propertyAnimation;
98
- }
99
- return normalized.default;
100
- }
101
- function hasAnimation(normalized) {
102
- return normalized.default !== null || normalized.enter !== null || normalized.exit !== null || Object.keys(normalized.properties).length > 0;
103
- }
104
- function getAnimatedProperties(normalized) {
105
- return Object.keys(normalized.properties);
106
- }
107
- function getEffectiveAnimation(normalized, state) {
108
- if (state === "enter" && normalized.enter) {
109
- return normalized.enter;
110
- }
111
- if (state === "exit" && normalized.exit) {
112
- return normalized.exit;
113
- }
114
- return normalized.default;
115
- }
116
- function getAnimationConfigsForKeys(normalized, animations, keys, defaultAnimation) {
117
- const result = /* @__PURE__ */new Map();
118
- for (const key of keys) {
119
- const propAnimation = normalized.properties[key];
120
- let animationValue = null;
121
- if (typeof propAnimation === "string") {
122
- animationValue = animations[propAnimation] ?? null;
123
- } else if (propAnimation && typeof propAnimation === "object" && propAnimation.type) {
124
- animationValue = animations[propAnimation.type] ?? null;
125
- }
126
- if (animationValue === null) {
127
- animationValue = defaultAnimation;
128
- }
129
- result.set(key, animationValue);
130
- }
131
- return result;
132
- }
133
- export { getAnimatedProperties, getAnimationConfigsForKeys, getAnimationForProperty, getEffectiveAnimation, hasAnimation, normalizeTransition };
134
- //# sourceMappingURL=normalizeTransition.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["SPRING_CONFIG_KEYS","Set","isSpringConfigKey","key","has","normalizeTransition","transition","default","enter","exit","delay","properties","Array","isArray","defaultAnimation","configObj","springConfig","value","Object","entries","config","keys","length","getAnimationForProperty","normalized","property","propertyAnimation","hasAnimation","getAnimatedProperties","getEffectiveAnimation","state","getAnimationConfigsForKeys","animations","result","Map","propAnimation","animationValue","type","set"],"sources":["../../src/normalizeTransition.ts"],"sourcesContent":[null],"mappings":"AAOA,MAAMA,kBAAA,GAAkC,mBAAIC,GAAA,CAAI,CAC9C,aACA,WACA,QACA,WACA,YACA,YACA,qBACA,YACA,cACA,QACD;AAKD,SAASC,kBAAkBC,GAAA,EAAwC;EACjE,OAAOH,kBAAA,CAAmBI,GAAA,CAAID,GAAG;AACnC;AAcO,SAASE,oBACdC,UAAA,EACsB;EAEtB,IAAI,CAACA,UAAA,EAAY;IACf,OAAO;MACLC,OAAA,EAAS;MACTC,KAAA,EAAO;MACPC,IAAA,EAAM;MACNC,KAAA,EAAO;MACPC,UAAA,EAAY,CAAC;IACf;EACF;EAGA,IAAI,OAAOL,UAAA,KAAe,UAAU;IAClC,OAAO;MACLC,OAAA,EAASD,UAAA;MACTE,KAAA,EAAO;MACPC,IAAA,EAAM;MACNC,KAAA,EAAO;MACPC,UAAA,EAAY,CAAC;IACf;EACF;EAIA,IAAIC,KAAA,CAAMC,OAAA,CAAQP,UAAU,GAAG;IAC7B,MAAM,CAACQ,gBAAA,EAAkBC,SAAS,IAAIT,UAAA;IACtC,MAAMK,UAAA,GAAuD,CAAC;IAC9D,MAAMK,YAAA,GAA6B,CAAC;IACpC,IAAIN,KAAA;IACJ,IAAIF,KAAA,GAAuB;IAC3B,IAAIC,IAAA,GAAsB;IAE1B,IAAIM,SAAA,IAAa,OAAOA,SAAA,KAAc,UAAU;MAC9C,WAAW,CAACZ,GAAA,EAAKc,KAAK,KAAKC,MAAA,CAAOC,OAAA,CAAQJ,SAAS,GAAG;QACpD,IAAIZ,GAAA,KAAQ,WAAW,OAAOc,KAAA,KAAU,UAAU;UAChDP,KAAA,GAAQO,KAAA;QACV,WAAWd,GAAA,KAAQ,WAAW,OAAOc,KAAA,KAAU,UAAU;UACvDT,KAAA,GAAQS,KAAA;QACV,WAAWd,GAAA,KAAQ,UAAU,OAAOc,KAAA,KAAU,UAAU;UACtDR,IAAA,GAAOQ,KAAA;QAC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