maz-ui 4.3.4-beta.4 → 4.3.4-beta.5

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.
@@ -1 +1 @@
1
- .m-animated-counter[data-v-91a33c54]{white-space:nowrap;--maz-tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--maz-tw-ordinal)var(--maz-tw-slashed-zero)var(--maz-tw-numeric-figure)var(--maz-tw-numeric-spacing)var(--maz-tw-numeric-fraction)}
1
+ .m-animated-counter[data-v-e21d5b70]{white-space:nowrap;--maz-tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--maz-tw-ordinal)var(--maz-tw-slashed-zero)var(--maz-tw-numeric-figure)var(--maz-tw-numeric-spacing)var(--maz-tw-numeric-fraction)}
@@ -1,28 +1,24 @@
1
1
  import { defineComponent, ref, onMounted, onBeforeUnmount, watch, createElementBlock, openBlock, createElementVNode, renderSlot, createTextVNode, toDisplayString } from "vue";
2
2
  import { i as isClient } from "../chunks/isClient.WI4oSt66.js";
3
3
  import { _ as _export_sfc } from "../chunks/_plugin-vue_export-helper.B--vMWp3.js";
4
- import '../assets/MazAnimatedCounter.LK7oyUrl.css';const _hoisted_1 = { class: "maz-sr-only" }, _sfc_main = /* @__PURE__ */ defineComponent({
4
+ import '../assets/MazAnimatedCounter.DL7KsXq5.css';const _hoisted_1 = { class: "maz-sr-only" }, _sfc_main = /* @__PURE__ */ defineComponent({
5
5
  __name: "MazAnimatedCounter",
6
6
  props: {
7
7
  count: {},
8
8
  duration: { default: 1e3 },
9
- prefix: { default: void 0 },
10
- suffix: { default: void 0 },
9
+ prefix: {},
10
+ suffix: {},
11
11
  delay: { default: 100 },
12
12
  once: { type: Boolean, default: !0 }
13
13
  },
14
14
  setup(__props) {
15
- const props = __props, currentCount = ref(0), elementRef = ref(null);
15
+ const currentCount = ref(0), elementRef = ref(null);
16
16
  function getRequestAnimationFrame() {
17
17
  return !isClient() || !globalThis.requestAnimationFrame ? (callback) => (setTimeout(callback, 1e3 / 60), 0) : globalThis.requestAnimationFrame.bind(globalThis);
18
18
  }
19
19
  function animate(start, end, duration, delay) {
20
20
  const requestAnim = getRequestAnimationFrame();
21
- if (!isClient()) {
22
- currentCount.value = end;
23
- return;
24
- }
25
- currentCount.value = start, setTimeout(() => {
21
+ currentCount.value = start, isClient() && setTimeout(() => {
26
22
  const startTime = performance.now(), updateCount = (currentTime = performance.now()) => {
27
23
  const elapsed = currentTime - startTime, progress = Math.min(elapsed / duration, 1), easeOutQuad = (t) => t * (2 - t);
28
24
  currentCount.value = Math.round(
@@ -33,15 +29,15 @@ import '../assets/MazAnimatedCounter.LK7oyUrl.css';const _hoisted_1 = { class: "
33
29
  }, delay);
34
30
  }
35
31
  function startAnimation(start, end) {
36
- animate(start, end, props.duration, props.delay);
32
+ animate(start, end, __props.duration, __props.delay);
37
33
  }
38
34
  let observer = null;
39
35
  return onMounted(() => {
40
- props.once || (observer = new IntersectionObserver(([entry]) => {
41
- entry.isIntersecting && (startAnimation(0, props.count), props.once && observer?.unobserve(entry.target));
36
+ __props.once || (observer = new IntersectionObserver(([entry]) => {
37
+ entry.isIntersecting && (startAnimation(0, __props.count), __props.once && observer?.unobserve(entry.target));
42
38
  }), elementRef.value && observer.observe(elementRef.value));
43
39
  }), onBeforeUnmount(() => observer?.disconnect()), watch(
44
- () => props.count,
40
+ () => __props.count,
45
41
  (newCount, oldCount) => {
46
42
  if (newCount === oldCount)
47
43
  return;
@@ -71,7 +67,7 @@ import '../assets/MazAnimatedCounter.LK7oyUrl.css';const _hoisted_1 = { class: "
71
67
  ], !0)
72
68
  ], 512));
73
69
  }
74
- }), MazAnimatedCounter = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-91a33c54"]]);
70
+ }), MazAnimatedCounter = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e21d5b70"]]);
75
71
  export {
76
72
  MazAnimatedCounter as default
77
73
  };
@@ -41,13 +41,7 @@ declare function __VLS_template(): {
41
41
  rootEl: HTMLSpanElement;
42
42
  };
43
43
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
44
- declare const __VLS_component: import('vue').DefineComponent<MazAnimatedCounterProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<MazAnimatedCounterProps> & Readonly<{}>, {
45
- duration: number;
46
- delay: number;
47
- once: boolean;
48
- prefix: string;
49
- suffix: string;
50
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
44
+ declare const __VLS_component: import('vue').DefineComponent<MazAnimatedCounterProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<MazAnimatedCounterProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
51
45
  elementRef: HTMLSpanElement;
52
46
  }, HTMLSpanElement>;
53
47
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -41,13 +41,7 @@ declare function __VLS_template(): {
41
41
  rootEl: HTMLSpanElement;
42
42
  };
43
43
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
44
- declare const __VLS_component: import('vue').DefineComponent<MazAnimatedCounterProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<MazAnimatedCounterProps> & Readonly<{}>, {
45
- duration: number;
46
- delay: number;
47
- once: boolean;
48
- prefix: string;
49
- suffix: string;
50
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
44
+ declare const __VLS_component: import('vue').DefineComponent<MazAnimatedCounterProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<MazAnimatedCounterProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
51
45
  elementRef: HTMLSpanElement;
52
46
  }, HTMLSpanElement>;
53
47
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "maz-ui",
3
3
  "type": "module",
4
- "version": "4.3.4-beta.4",
4
+ "version": "4.3.4-beta.5",
5
5
  "description": "A standalone components library for Vue.Js 3 & Nuxt.Js 3",
6
6
  "author": "Louis Mazel <me@loicmazuel.com>",
7
7
  "license": "MIT",
@@ -179,10 +179,10 @@
179
179
  "valibot": "^1.2.0",
180
180
  "vue-chartjs": "^5.3.3",
181
181
  "@maz-ui/cli": "4.3.4-beta.0",
182
- "@maz-ui/icons": "4.3.0",
183
182
  "@maz-ui/themes": "4.3.0",
184
- "@maz-ui/utils": "4.3.0",
185
- "@maz-ui/translations": "4.3.0"
183
+ "@maz-ui/translations": "4.3.0",
184
+ "@maz-ui/icons": "4.3.0",
185
+ "@maz-ui/utils": "4.3.0"
186
186
  },
187
187
  "devDependencies": {
188
188
  "@vitejs/plugin-vue": "^6.0.3",
@@ -217,8 +217,8 @@
217
217
  "vue": "^3.5.26",
218
218
  "vue-router": "^4.6.4",
219
219
  "vue-tsc": "^3.2.1",
220
- "@maz-ui/eslint-config": "4.3.2",
221
- "@maz-ui/node": "4.3.4-beta.0"
220
+ "@maz-ui/node": "4.3.4-beta.0",
221
+ "@maz-ui/eslint-config": "4.3.2"
222
222
  },
223
223
  "lint-staged": {
224
224
  "*.{js,ts,vue,mjs,mts,cjs,md,yml,json}": "cross-env NODE_ENV=production eslint --fix",