ablok-components 0.3.101 → 0.3.102

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,10 +1,10 @@
1
- import { defineComponent as g, getCurrentInstance as h, ref as y, onMounted as E, openBlock as $, createElementBlock as C, renderSlot as c, createElementVNode as s, createVNode as u, unref as p } from "vue";
2
- import i from "../../atoms/svg-icon/svg-icon.vue.js";
1
+ import { defineComponent as b, ref as v, onMounted as y, openBlock as E, createElementBlock as g, renderSlot as c, createElementVNode as s, createVNode as u } from "vue";
2
+ import a from "../../atoms/svg-icon/svg-icon.vue.js";
3
3
  /* empty css */
4
- const _ = { class: "touch-wrapper__controls" }, k = {
4
+ const _ = { class: "touch-wrapper__controls" }, h = {
5
5
  class: "btn-group",
6
6
  role: "group"
7
- }, N = /* @__PURE__ */ g({
7
+ }, C = /* @__PURE__ */ b({
8
8
  __name: "touch-wrapper",
9
9
  props: {
10
10
  modelValue: {
@@ -13,65 +13,56 @@ const _ = { class: "touch-wrapper__controls" }, k = {
13
13
  }
14
14
  },
15
15
  emits: ["update:modelValue"],
16
- setup(d, { emit: m }) {
17
- const a = h()?.appContext?.config?.globalProperties?.$config || { iconSprite: "/symbol-defs.svg" }, f = d, b = m, n = y();
18
- function o(t) {
19
- const e = f.modelValue + t;
20
- b("update:modelValue", t === 0 ? 1 : e >= 1 ? e : 1);
16
+ setup(i, { emit: d }) {
17
+ const m = i, p = d, o = v();
18
+ function n(t) {
19
+ const e = m.modelValue + t;
20
+ p("update:modelValue", t === 0 ? 1 : e >= 1 ? e : 1);
21
21
  }
22
- function v(t) {
22
+ function f(t) {
23
23
  if (t.ctrlKey) {
24
24
  t.preventDefault();
25
25
  const e = 0 - t.deltaY * 0.01;
26
- o(e);
26
+ n(e);
27
27
  }
28
28
  }
29
29
  function r(t) {
30
30
  t.preventDefault();
31
31
  const { scale: e } = t, l = e > 1 ? e * 0.01 : 0 - e;
32
- o(l);
32
+ n(l);
33
33
  }
34
- return E(() => {
35
- n.value && (n.value.addEventListener("wheel", v, !1), n.value.addEventListener("gesturestart", r, !1), n.value.addEventListener("gesturechange", r, !1), n.value.addEventListener("gestureend", r, !1));
36
- }), (t, e) => ($(), C("div", {
34
+ return y(() => {
35
+ o.value && (o.value.addEventListener("wheel", f, !1), o.value.addEventListener("gesturestart", r, !1), o.value.addEventListener("gesturechange", r, !1), o.value.addEventListener("gestureend", r, !1));
36
+ }), (t, e) => (E(), g("div", {
37
37
  ref_key: "touchElement",
38
- ref: n,
38
+ ref: o,
39
39
  class: "touch-wrapper"
40
40
  }, [
41
41
  c(t.$slots, "controls", {
42
- on: { setScale: o }
42
+ on: { setScale: n }
43
43
  }, () => [
44
44
  s("div", _, [
45
- s("div", k, [
45
+ s("div", h, [
46
46
  s("button", {
47
47
  type: "button",
48
48
  class: "btn",
49
- onClick: e[0] || (e[0] = (l) => o(-1))
49
+ onClick: e[0] || (e[0] = (l) => n(-1))
50
50
  }, [
51
- u(i, {
52
- symbol: "minus",
53
- "base-path": p(a).iconSprite
54
- }, null, 8, ["base-path"])
51
+ u(a, { symbol: "minus" })
55
52
  ]),
56
53
  s("button", {
57
54
  type: "button",
58
55
  class: "btn",
59
- onClick: e[1] || (e[1] = (l) => o(0))
56
+ onClick: e[1] || (e[1] = (l) => n(0))
60
57
  }, [
61
- u(i, {
62
- symbol: "maximize",
63
- "base-path": p(a).iconSprite
64
- }, null, 8, ["base-path"])
58
+ u(a, { symbol: "maximize" })
65
59
  ]),
66
60
  s("button", {
67
61
  type: "button",
68
62
  class: "btn",
69
- onClick: e[2] || (e[2] = (l) => o(1))
63
+ onClick: e[2] || (e[2] = (l) => n(1))
70
64
  }, [
71
- u(i, {
72
- symbol: "plus",
73
- "base-path": p(a).iconSprite
74
- }, null, 8, ["base-path"])
65
+ u(a, { symbol: "plus" })
75
66
  ])
76
67
  ])
77
68
  ])
@@ -81,5 +72,5 @@ const _ = { class: "touch-wrapper__controls" }, k = {
81
72
  }
82
73
  });
83
74
  export {
84
- N as default
75
+ C as default
85
76
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ablok-components",
3
3
  "private": false,
4
- "version": "0.3.101",
4
+ "version": "0.3.102",
5
5
  "dependencies": {
6
6
  "date-fns": "^3.0.0",
7
7
  "dompurify": "^3.3.1",