@noction/vue-bezier 1.0.8 → 1.0.9

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2019-PRESENT Noction<sales@noction.com>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,19 +1,19 @@
1
- import { TransitionGroup as z, Transition as D, defineComponent as d, openBlock as f, createBlock as u, resolveDynamicComponent as c, unref as r, mergeProps as m, withCtx as p, renderSlot as g } from "vue";
2
- const v = (a) => a.group ? z : D;
3
- function b(a, o) {
1
+ import { TransitionGroup as z, Transition as S, defineComponent as d, openBlock as f, createBlock as u, resolveDynamicComponent as c, unref as l, mergeProps as m, withCtx as p, renderSlot as g } from "vue";
2
+ const v = (a) => a.group ? z : S;
3
+ function T(a, o) {
4
4
  return typeof a == "number" ? a : typeof a == "object" && a !== null ? a[o] ?? 0 : 0;
5
5
  }
6
- function w(a, o) {
7
- const t = b(a.duration, "enter"), n = b(a.delay, "enter");
8
- o.style.animationDuration = `${t}ms`, o.style.animationDelay = `${n}ms`, T(a, o);
6
+ function D(a, o) {
7
+ const t = T(a.duration, "enter"), n = T(a.delay, "enter");
8
+ o.style.animationDuration = `${t}ms`, o.style.animationDelay = `${n}ms`, b(a, o);
9
9
  }
10
- function A(a, o) {
11
- const t = b(a.duration, "leave"), n = b(a.delay, "leave");
12
- o.style.animationDuration = `${t}ms`, o.style.animationDelay = `${n}ms`, T(a, o);
10
+ function w(a, o) {
11
+ const t = T(a.duration, "leave"), n = T(a.delay, "leave");
12
+ o.style.animationDuration = `${t}ms`, o.style.animationDelay = `${n}ms`, b(a, o);
13
13
  }
14
14
  function $(a, o, t) {
15
15
  B(a, o);
16
- const n = b(a.duration, "leave"), i = b(a.delay, "leave");
16
+ const n = T(a.duration, "leave"), i = T(a.delay, "leave");
17
17
  setTimeout(t, n + i);
18
18
  }
19
19
  function _(a, o) {
@@ -21,15 +21,15 @@ function _(a, o) {
21
21
  t in o.style && (o.style[t] = "");
22
22
  }), o.style.animationDuration = "", o.style.animationDelay = "";
23
23
  }
24
- function T(a, o) {
25
- S(a, o), a.styles && Object.entries(a.styles).forEach(([t, n]) => {
24
+ function b(a, o) {
25
+ A(a, o), a.styles && Object.entries(a.styles).forEach(([t, n]) => {
26
26
  t in o.style && (o.style[t] = n);
27
27
  });
28
28
  }
29
29
  function B(a, o) {
30
30
  a.group && (o.style.position = "absolute");
31
31
  }
32
- function S(a, o) {
32
+ function A(a, o) {
33
33
  a.origin && (o.style.transformOrigin = a.origin);
34
34
  }
35
35
  const y = (a, o) => ({
@@ -40,15 +40,15 @@ const y = (a, o) => ({
40
40
  _(a, t), o("after-leave", t);
41
41
  },
42
42
  onBeforeEnter: (t) => {
43
- w(a, t), o("before-enter", t);
43
+ D(a, t), o("before-enter", t);
44
44
  },
45
45
  onBeforeLeave: (t) => {
46
- A(a, t), o("before-leave", t);
46
+ w(a, t), o("before-leave", t);
47
47
  },
48
48
  onLeave: (t, n) => {
49
49
  $(a, t, n), o("leave", t, n);
50
50
  }
51
- }), k = /* @__PURE__ */ d({
51
+ }), P = /* @__PURE__ */ d({
52
52
  __name: "CollapseTransition",
53
53
  props: {
54
54
  delay: { default: 0 },
@@ -63,7 +63,7 @@ const y = (a, o) => ({
63
63
  },
64
64
  emits: ["after-enter", "after-leave", "before-enter", "before-leave", "leave"],
65
65
  setup(a, { emit: o }) {
66
- const t = a, n = o, i = v(t), l = {
66
+ const t = a, n = o, i = v(t), r = {
67
67
  onAfterEnter(e) {
68
68
  e.style.transition = "", e.style.height = "", e.style.overflow = e.dataset.oldOverflow, n("after-enter", e);
69
69
  },
@@ -71,33 +71,33 @@ const y = (a, o) => ({
71
71
  e.style.transition = "", e.style.height = "", e.style.overflow = e.dataset.oldOverflow, e.style.paddingTop = e.dataset.oldPaddingTop, e.style.paddingBottom = e.dataset.oldPaddingBottom, n("after-leave", e);
72
72
  },
73
73
  onBeforeEnter(e) {
74
- const h = b(t.duration, "enter");
75
- e.style.transition = s(h), e.dataset || (e.dataset = {}), e.dataset.oldPaddingTop = e.style.paddingTop, e.dataset.oldPaddingBottom = e.style.paddingBottom, e.style.height = "0", e.style.paddingTop = 0, e.style.paddingBottom = 0, T(t, e), n("before-enter", e);
74
+ const h = T(t.duration, "enter");
75
+ e.style.transition = s(h), e.dataset || (e.dataset = {}), e.dataset.oldPaddingTop = e.style.paddingTop, e.dataset.oldPaddingBottom = e.style.paddingBottom, e.style.height = "0", e.style.paddingTop = 0, e.style.paddingBottom = 0, b(t, e), n("before-enter", e);
76
76
  },
77
77
  onBeforeLeave(e) {
78
- e.dataset || (e.dataset = {}), e.dataset.oldPaddingTop = e.style.paddingTop, e.dataset.oldPaddingBottom = e.style.paddingBottom, e.dataset.oldOverflow = e.style.overflow, e.style.height = `${e.scrollHeight}px`, e.style.overflow = "hidden", T(t, e), n("before-leave", e);
78
+ e.dataset || (e.dataset = {}), e.dataset.oldPaddingTop = e.style.paddingTop, e.dataset.oldPaddingBottom = e.style.paddingBottom, e.dataset.oldOverflow = e.style.overflow, e.style.height = `${e.scrollHeight}px`, e.style.overflow = "hidden", b(t, e), n("before-leave", e);
79
79
  },
80
80
  onEnter(e) {
81
81
  e.dataset.oldOverflow = e.style.overflow, e.scrollHeight !== 0 ? (e.style.height = `${e.scrollHeight}px`, e.style.paddingTop = e.dataset.oldPaddingTop, e.style.paddingBottom = e.dataset.oldPaddingBottom) : (e.style.height = "", e.style.paddingTop = e.dataset.oldPaddingTop, e.style.paddingBottom = e.dataset.oldPaddingBottom), e.style.overflow = "hidden";
82
82
  },
83
83
  onLeave(e, h) {
84
- const F = b(t.duration, "leave");
84
+ const F = T(t.duration, "leave");
85
85
  e.scrollHeight !== 0 && (e.style.transition = s(F), e.style.height = 0, e.style.paddingTop = 0, e.style.paddingBottom = 0), B(t, e), $(t, e, h), n("leave", e, h);
86
86
  }
87
87
  }, s = (e) => {
88
88
  const h = e / 1e3;
89
89
  return `${h}s height ease-in-out, ${h}s padding-top ease-in-out, ${h}s padding-bottom ease-in-out`;
90
90
  };
91
- return (e, h) => (f(), u(c(r(i)), m({
91
+ return (e, h) => (f(), u(c(l(i)), m({
92
92
  tag: t.tag
93
- }, { ...e.$attrs, ...l }, { "move-class": "collapse-move" }), {
93
+ }, { ...e.$attrs, ...r }, { "move-class": "collapse-move" }), {
94
94
  default: p(() => [
95
95
  g(e.$slots, "default")
96
96
  ]),
97
97
  _: 3
98
98
  }, 16, ["tag"]));
99
99
  }
100
- }), P = /* @__PURE__ */ d({
100
+ }), k = /* @__PURE__ */ d({
101
101
  inheritAttrs: !1,
102
102
  __name: "FadeTransition",
103
103
  props: {
@@ -113,13 +113,13 @@ const y = (a, o) => ({
113
113
  },
114
114
  emits: ["after-enter", "after-leave", "before-enter", "before-leave", "leave"],
115
115
  setup(a, { emit: o }) {
116
- const t = a, n = o, i = v(t), l = y(t, n);
117
- return (s, e) => (f(), u(c(r(i)), m({
116
+ const t = a, n = o, i = v(t), r = y(t, n);
117
+ return (s, e) => (f(), u(c(l(i)), m({
118
118
  tag: t.tag,
119
119
  "enter-active-class": "fade-in",
120
120
  "move-class": "fade-move",
121
121
  "leave-active-class": "fade-out"
122
- }, { ...s.$attrs, ...r(l) }), {
122
+ }, { ...s.$attrs, ...l(r) }), {
123
123
  default: p(() => [
124
124
  g(s.$slots, "default")
125
125
  ]),
@@ -142,10 +142,10 @@ const y = (a, o) => ({
142
142
  },
143
143
  emits: ["after-enter", "after-leave", "before-enter", "before-leave", "leave"],
144
144
  setup(a, { emit: o }) {
145
- const t = a, n = o, i = v(t), l = y(t, n);
146
- return (s, e) => (f(), u(c(r(i)), m({
145
+ const t = a, n = o, i = v(t), r = y(t, n);
146
+ return (s, e) => (f(), u(c(l(i)), m({
147
147
  tag: t.tag
148
- }, { ...s.$attrs, ...r(l) }, {
148
+ }, { ...s.$attrs, ...l(r) }, {
149
149
  "enter-active-class": "scale-in",
150
150
  "move-class": "scale-move",
151
151
  "leave-active-class": "scale-out"
@@ -156,7 +156,7 @@ const y = (a, o) => ({
156
156
  _: 3
157
157
  }, 16, ["tag"]));
158
158
  }
159
- }), E = /* @__PURE__ */ d({
159
+ }), Z = /* @__PURE__ */ d({
160
160
  inheritAttrs: !1,
161
161
  __name: "SlideXLeftTransition",
162
162
  props: {
@@ -172,10 +172,10 @@ const y = (a, o) => ({
172
172
  },
173
173
  emits: ["after-enter", "after-leave", "before-enter", "before-leave", "leave"],
174
174
  setup(a, { emit: o }) {
175
- const t = a, n = o, i = v(t), l = y(t, n);
176
- return (s, e) => (f(), u(c(r(i)), m({
175
+ const t = a, n = o, i = v(t), r = y(t, n);
176
+ return (s, e) => (f(), u(c(l(i)), m({
177
177
  tag: t.tag
178
- }, { ...s.$attrs, ...r(l) }, {
178
+ }, { ...s.$attrs, ...l(r) }, {
179
179
  "enter-active-class": "slide-x-left-in",
180
180
  "move-class": "slide-move",
181
181
  "leave-active-class": "slide-x-left-out"
@@ -186,7 +186,7 @@ const y = (a, o) => ({
186
186
  _: 3
187
187
  }, 16, ["tag"]));
188
188
  }
189
- }), L = /* @__PURE__ */ d({
189
+ }), O = /* @__PURE__ */ d({
190
190
  inheritAttrs: !1,
191
191
  __name: "SlideXRightTransition",
192
192
  props: {
@@ -202,10 +202,10 @@ const y = (a, o) => ({
202
202
  },
203
203
  emits: ["after-enter", "after-leave", "before-enter", "before-leave", "leave"],
204
204
  setup(a, { emit: o }) {
205
- const t = a, n = o, i = v(t), l = y(t, n);
206
- return (s, e) => (f(), u(c(r(i)), m({
205
+ const t = a, n = o, i = v(t), r = y(t, n);
206
+ return (s, e) => (f(), u(c(l(i)), m({
207
207
  tag: t.tag
208
- }, { ...s.$attrs, ...r(l) }, {
208
+ }, { ...s.$attrs, ...l(r) }, {
209
209
  "enter-active-class": "slide-x-right-in",
210
210
  "move-class": "slide-move",
211
211
  "leave-active-class": "slide-x-right-out"
@@ -216,7 +216,7 @@ const y = (a, o) => ({
216
216
  _: 3
217
217
  }, 16, ["tag"]));
218
218
  }
219
- }), O = /* @__PURE__ */ d({
219
+ }), C = /* @__PURE__ */ d({
220
220
  inheritAttrs: !1,
221
221
  __name: "SlideYDownTransition",
222
222
  props: {
@@ -232,10 +232,10 @@ const y = (a, o) => ({
232
232
  },
233
233
  emits: ["after-enter", "after-leave", "before-enter", "before-leave", "leave"],
234
234
  setup(a, { emit: o }) {
235
- const t = a, n = o, i = v(t), l = y(t, n);
236
- return (s, e) => (f(), u(c(r(i)), m({
235
+ const t = a, n = o, i = v(t), r = y(t, n);
236
+ return (s, e) => (f(), u(c(l(i)), m({
237
237
  tag: t.tag
238
- }, { ...s.$attrs, ...r(l) }, {
238
+ }, { ...s.$attrs, ...l(r) }, {
239
239
  "enter-active-class": "slide-y-down-in",
240
240
  "leave-active-class": "slide-y-down-out"
241
241
  }), {
@@ -245,7 +245,7 @@ const y = (a, o) => ({
245
245
  _: 3
246
246
  }, 16, ["tag"]));
247
247
  }
248
- }), C = /* @__PURE__ */ d({
248
+ }), L = /* @__PURE__ */ d({
249
249
  inheritAttrs: !1,
250
250
  __name: "SlideYUpTransition",
251
251
  props: {
@@ -261,11 +261,11 @@ const y = (a, o) => ({
261
261
  },
262
262
  emits: ["after-enter", "after-leave", "before-enter", "before-leave", "leave"],
263
263
  setup(a, { emit: o }) {
264
- const t = a, n = o, i = v(t), l = y(t, n);
265
- return (s, e) => (f(), u(c(r(i)), m({
264
+ const t = a, n = o, i = v(t), r = y(t, n);
265
+ return (s, e) => (f(), u(c(l(i)), m({
266
266
  tag: t.tag,
267
267
  type: "animation"
268
- }, { ...s.$attrs, ...r(l) }, {
268
+ }, { ...s.$attrs, ...l(r) }, {
269
269
  "enter-active-class": "slide-y-in",
270
270
  "move-class": "slide-move",
271
271
  "leave-active-class": "slide-y-out"
@@ -276,7 +276,7 @@ const y = (a, o) => ({
276
276
  _: 3
277
277
  }, 16, ["tag"]));
278
278
  }
279
- }), Z = /* @__PURE__ */ d({
279
+ }), E = /* @__PURE__ */ d({
280
280
  inheritAttrs: !1,
281
281
  __name: "ZoomCenterTransition",
282
282
  props: {
@@ -292,10 +292,10 @@ const y = (a, o) => ({
292
292
  },
293
293
  emits: ["after-enter", "after-leave", "before-enter", "before-leave", "leave"],
294
294
  setup(a, { emit: o }) {
295
- const t = a, n = o, i = v(t), l = y(t, n);
296
- return (s, e) => (f(), u(c(r(i)), m({
295
+ const t = a, n = o, i = v(t), r = y(t, n);
296
+ return (s, e) => (f(), u(c(l(i)), m({
297
297
  tag: t.tag
298
- }, { ...s.$attrs, ...r(l) }, {
298
+ }, { ...s.$attrs, ...l(r) }, {
299
299
  "enter-active-class": "zoom-in",
300
300
  "move-class": "zoom-move",
301
301
  "leave-active-class": "zoom-out"
@@ -322,10 +322,10 @@ const y = (a, o) => ({
322
322
  },
323
323
  emits: ["after-enter", "after-leave", "before-enter", "before-leave", "leave"],
324
324
  setup(a, { emit: o }) {
325
- const t = a, n = o, i = v(t), l = y(t, n);
326
- return (s, e) => (f(), u(c(r(i)), m({
325
+ const t = a, n = o, i = v(t), r = y(t, n);
326
+ return (s, e) => (f(), u(c(l(i)), m({
327
327
  tag: t.tag
328
- }, { ...s.$attrs, ...r(l) }, {
328
+ }, { ...s.$attrs, ...l(r) }, {
329
329
  "enter-active-class": "zoom-in-up",
330
330
  "move-class": "zoom-move",
331
331
  "leave-active-class": "zoom-out-up"
@@ -352,20 +352,20 @@ const y = (a, o) => ({
352
352
  },
353
353
  emits: ["after-enter", "after-leave", "before-enter", "before-leave", "leave"],
354
354
  setup(a, { emit: o }) {
355
- const t = a, n = o, i = v(t), l = y(t, n);
356
- return (s, e) => (f(), u(c(r(i)), m({
355
+ const t = a, n = o, i = v(t), r = y(t, n);
356
+ return (s, e) => (f(), u(c(l(i)), m({
357
357
  tag: t.tag,
358
358
  "enter-active-class": "zoom-in-x",
359
359
  "move-class": "zoom-move",
360
360
  "leave-active-class": "zoom-out-x"
361
- }, { ...s.$attrs, ...r(l) }), {
361
+ }, { ...s.$attrs, ...l(r) }), {
362
362
  default: p(() => [
363
363
  g(s.$slots, "default")
364
364
  ]),
365
365
  _: 3
366
366
  }, 16, ["tag"]));
367
367
  }
368
- }), H = /* @__PURE__ */ d({
368
+ }), U = /* @__PURE__ */ d({
369
369
  inheritAttrs: !1,
370
370
  __name: "ZoomYTransition",
371
371
  props: {
@@ -381,42 +381,53 @@ const y = (a, o) => ({
381
381
  },
382
382
  emits: ["after-enter", "after-leave", "before-enter", "before-leave", "leave"],
383
383
  setup(a, { emit: o }) {
384
- const t = a, n = o, i = v(t), l = y(t, n);
385
- return (s, e) => (f(), u(c(r(i)), m({
384
+ const t = a, n = o, i = v(t), r = y(t, n);
385
+ return (s, e) => (f(), u(c(l(i)), m({
386
386
  tag: t.tag,
387
387
  "enter-active-class": "zoom-in-y",
388
388
  "move-class": "zoom-move",
389
389
  "leave-active-class": "zoom-out-y"
390
- }, { ...s.$attrs, ...r(l) }), {
390
+ }, { ...s.$attrs, ...l(r) }), {
391
391
  default: p(() => [
392
392
  g(s.$slots, "default")
393
393
  ]),
394
394
  _: 3
395
395
  }, 16, ["tag"]));
396
396
  }
397
- }), U = {
398
- CollapseTransition: k,
399
- FadeTransition: P,
397
+ }), j = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
398
+ __proto__: null,
399
+ CollapseTransition: P,
400
+ FadeTransition: k,
400
401
  ScaleTransition: M,
401
- SlideXLeftTransition: E,
402
- SlideXRightTransition: L,
403
- SlideYDownTransition: O,
404
- SlideYUpTransition: C,
405
- ZoomCenterTransition: Z,
402
+ SlideXLeftTransition: Z,
403
+ SlideXRightTransition: O,
404
+ SlideYDownTransition: C,
405
+ SlideYUpTransition: L,
406
+ ZoomCenterTransition: E,
406
407
  ZoomUpTransition: X,
407
408
  ZoomXTransition: Y,
408
- ZoomYTransition: H
409
- };
410
- function j(a) {
411
- a.$_vueBezierInstalled || (a.$_vueBezierInstalled = !0, Object.entries(U).forEach(
409
+ ZoomYTransition: U
410
+ }, Symbol.toStringTag, { value: "Module" }));
411
+ function H(a) {
412
+ a.$_vueBezierInstalled || (a.$_vueBezierInstalled = !0, Object.entries(j).forEach(
412
413
  ([o, t]) => a.component(o, t)
413
414
  ));
414
415
  }
415
416
  const R = {
416
- install: j
417
+ install: H
417
418
  };
418
419
  export {
419
- U as components,
420
+ P as CollapseTransition,
421
+ k as FadeTransition,
422
+ M as ScaleTransition,
423
+ Z as SlideXLeftTransition,
424
+ O as SlideXRightTransition,
425
+ C as SlideYDownTransition,
426
+ L as SlideYUpTransition,
427
+ E as ZoomCenterTransition,
428
+ X as ZoomUpTransition,
429
+ Y as ZoomXTransition,
430
+ U as ZoomYTransition,
420
431
  R as default,
421
- j as install
432
+ H as install
422
433
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "framework": "vue",
3
3
  "name": "@noction/vue-bezier",
4
- "version": "1.0.8",
4
+ "version": "1.0.9",
5
5
  "contributions": {
6
6
  "html": {
7
7
  "description-markup": "markdown",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noction/vue-bezier",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "Vue3 reusable transition components",
5
5
  "keywords": [
6
6
  "transitions",
@@ -39,19 +39,6 @@
39
39
  "module": "dist/vue-bezier.js",
40
40
  "types": "dist/types/main.d.ts",
41
41
  "type": "module",
42
- "scripts": {
43
- "dev": "cross-env NODE_ENV=development vite build --watch",
44
- "build:light": "cross-env NODE_ENV=development vite build",
45
- "prebuild": "vue-tsc -p tsconfig.build.json",
46
- "build": "vite build",
47
- "postbuild": "vue-docgen-web-types",
48
- "prepublishOnly": "npm run build",
49
- "lint:es": "eslint \"src/**/*.{js,ts,vue}\" --fix --color",
50
- "lint:style": "stylelint src/**/*.{css,scss,vue} --color --fix",
51
- "test": "vitest",
52
- "test:coverage": "vitest run --coverage",
53
- "type:check": "vue-tsc --noEmit"
54
- },
55
42
  "devDependencies": {
56
43
  "@faker-js/faker": "^8.3.1",
57
44
  "@types/node": "^20.10.5",
@@ -68,5 +55,17 @@
68
55
  "vue-tsc": "^1.8.27",
69
56
  "vue-docgen-web-types": "^0.1.8"
70
57
  },
71
- "web-types": "./dist/web-types.json"
72
- }
58
+ "web-types": "./dist/web-types.json",
59
+ "scripts": {
60
+ "dev": "cross-env NODE_ENV=development vite build --watch",
61
+ "build:light": "cross-env NODE_ENV=development vite build",
62
+ "prebuild": "vue-tsc -p tsconfig.build.json",
63
+ "build": "vite build",
64
+ "postbuild": "vue-docgen-web-types",
65
+ "lint:es": "eslint \"src/**/*.{js,ts,vue}\" --fix --color",
66
+ "lint:style": "stylelint src/**/*.{css,scss,vue} --color --fix",
67
+ "test": "vitest",
68
+ "test:coverage": "vitest run --coverage",
69
+ "type:check": "vue-tsc --noEmit"
70
+ }
71
+ }
@@ -0,0 +1,20 @@
1
+ // Exporting components from Collapse directory
2
+ export { default as CollapseTransition } from './Collapse/CollapseTransition.vue';
3
+
4
+ // Exporting components from Fade directory
5
+ export { default as FadeTransition } from './Fade/FadeTransition.vue';
6
+
7
+ // Exporting components from Scale directory
8
+ export { default as ScaleTransition } from './Scale/ScaleTransition.vue';
9
+
10
+ // Exporting components from Slide directory
11
+ export { default as SlideXLeftTransition } from './Slide/SlideXLeftTransition.vue';
12
+ export { default as SlideXRightTransition } from './Slide/SlideXRightTransition.vue';
13
+ export { default as SlideYDownTransition } from './Slide/SlideYDownTransition.vue';
14
+ export { default as SlideYUpTransition } from './Slide/SlideYUpTransition.vue';
15
+
16
+ // Exporting components from Zoom directory
17
+ export { default as ZoomCenterTransition } from './Zoom/ZoomCenterTransition.vue';
18
+ export { default as ZoomUpTransition } from './Zoom/ZoomUpTransition.vue';
19
+ export { default as ZoomXTransition } from './Zoom/ZoomXTransition.vue';
20
+ export { default as ZoomYTransition } from './Zoom/ZoomYTransition.vue';
package/src/main.ts CHANGED
@@ -1,34 +1,6 @@
1
- import { App } from 'vue'
2
-
3
- import CollapseTransition from './components/Collapse/CollapseTransition.vue'
4
-
5
- import FadeTransition from './components/Fade/FadeTransition.vue'
6
-
7
- import ScaleTransition from './components/Scale/ScaleTransition.vue'
8
-
9
- import SlideXLeftTransition from './components/Slide/SlideXLeftTransition.vue'
10
- import SlideXRightTransition from './components/Slide/SlideXRightTransition.vue'
11
- import SlideYDownTransition from './components/Slide/SlideYDownTransition.vue'
12
- import SlideYUpTransition from './components/Slide/SlideYUpTransition.vue'
13
-
14
- import ZoomCenterTransition from './components/Zoom/ZoomCenterTransition.vue'
15
- import ZoomUpTransition from './components/Zoom/ZoomUpTransition.vue'
16
- import ZoomXTransition from './components/Zoom/ZoomXTransition.vue'
17
- import ZoomYTransition from './components/Zoom/ZoomYTransition.vue'
18
-
19
- export const components = {
20
- CollapseTransition,
21
- FadeTransition,
22
- ScaleTransition,
23
- SlideXLeftTransition,
24
- SlideXRightTransition,
25
- SlideYDownTransition,
26
- SlideYUpTransition,
27
- ZoomCenterTransition,
28
- ZoomUpTransition,
29
- ZoomXTransition,
30
- ZoomYTransition
31
- }
1
+ import * as components from './components'
2
+ export * from './components'
3
+ import type { App } from 'vue'
32
4
 
33
5
  export function install (app: App) {
34
6
  // @ts-expect-error it's a custom flag
@@ -38,8 +10,8 @@ export function install (app: App) {
38
10
 
39
11
  Object
40
12
  .entries(components)
41
- .forEach(([key, component]) =>
42
- app.component(key, component)
13
+ .forEach(([componentName, component]) =>
14
+ app.component(componentName, component)
43
15
  )
44
16
  }
45
17