@nmorph/nmorph-ui-kit 3.0.2 → 3.0.4

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 (27) hide show
  1. package/dist/assets/icons/external-link.svg.js +2 -2
  2. package/dist/components/basic/nmorph-scroll/NmorphScroll.vue.js +5 -4
  3. package/dist/components/basic/nmorph-scroll/NmorphScroll.vue2.js +143 -124
  4. package/dist/components/data/nmorph-audio-preview/NmorphAudioPreview.css +1 -1
  5. package/dist/components/data/nmorph-audio-preview/NmorphAudioPreview.vue.js +10 -10
  6. package/dist/components/data/nmorph-audio-preview/NmorphAudioPreview.vue2.js +24 -24
  7. package/dist/components/data/nmorph-badge/NmorphBadge.css +1 -1
  8. package/dist/components/data/nmorph-image/NmorphImage.vue.js +22 -20
  9. package/dist/components/data/nmorph-image/NmorphImage.vue2.js +24 -18
  10. package/dist/components/data/nmorph-media-gallery/NmorphMediaGallery.css +1 -1
  11. package/dist/components/data/nmorph-media-gallery/NmorphMediaGallery.vue.js +35 -30
  12. package/dist/components/data/nmorph-media-gallery/NmorphMediaGallery.vue2.js +207 -147
  13. package/dist/components/data/nmorph-progress/NmorphProgress.css +1 -1
  14. package/dist/components/data/nmorph-progress/NmorphProgress.vue2.js +6 -6
  15. package/dist/components/data/nmorph-video-preview/NmorphVideoPreview.vue2.js +8 -8
  16. package/dist/components/navigation/nmorph-backtop/NmorphBacktop.vue.js +12 -11
  17. package/dist/index.umd.js +51 -51
  18. package/dist/package.json.js +1 -1
  19. package/dist/src/components/data/nmorph-image/types.d.ts +1 -0
  20. package/dist/src/components/data/nmorph-media-gallery/NmorphMediaGallery.vue.d.ts +7 -1
  21. package/dist/src/components/data/nmorph-media-gallery/types.d.ts +16 -0
  22. package/dist/src/components/data/nmorph-qr-code/NmorphQRCode.vue.d.ts +1 -1
  23. package/dist/src/components/feedback/nmorph-alert/NmorphAlert.vue.d.ts +1 -1
  24. package/dist/src/components/form/nmorph-switch/NmorphSwitch.vue.d.ts +1 -1
  25. package/dist/src/components/navigation/nmorph-context-menu/NmorphContextMenu.vue.d.ts +1 -1
  26. package/dist/style.css +1 -1
  27. package/package.json +1 -1
@@ -1,22 +1,22 @@
1
1
  import './NmorphMediaGallery.css';
2
- import { defineComponent as He, ref as c, computed as n, watch as N, onBeforeUnmount as Se } from "vue";
3
- import { useModifiers as X } from "../../../utils/create-modifiers.js";
4
- import { createCssSizeVariables as Ae } from "../../../utils/common.js";
5
- import Te from "../nmorph-preview-portal/NmorphPreviewPortal.vue.js";
6
- import Pe from "../nmorph-image/NmorphImage.vue.js";
7
- import Me from "../../../assets/icons/full-screen.svg.js";
8
- import Ve from "../../../assets/icons/eye.svg.js";
9
- import Le from "../../basic/nmorph-icon/NmorphIcon.vue.js";
10
- import Re from "../../basic/nmorph-button/NmorphButton.vue.js";
11
- import De from "../../../assets/icons/zoom-out.svg.js";
12
- import _e from "../../../assets/icons/zoom-in.svg.js";
13
- import Ee from "../../../assets/icons/shrink.svg.js";
14
- import ze from "../../../assets/icons/rotate-right.svg.js";
15
- import Ce from "../../../assets/icons/rotate-left.svg.js";
16
- import Ke from "../../../assets/icons/play.svg.js";
17
- import $e from "../../../assets/icons/enlarge.svg.js";
18
- import Oe from "../../../assets/icons/download.svg.js";
19
- const Y = 45, dt = /* @__PURE__ */ He({
2
+ import { defineComponent as Ee, ref as c, computed as i, watch as x, onBeforeUnmount as De } from "vue";
3
+ import { useModifiers as Q } from "../../../utils/create-modifiers.js";
4
+ import { createCssSizeVariables as Oe } from "../../../utils/common.js";
5
+ import Ge from "../nmorph-preview-portal/NmorphPreviewPortal.vue.js";
6
+ import ze from "../nmorph-image/NmorphImage.vue.js";
7
+ import $e from "../../../assets/icons/full-screen.svg.js";
8
+ import Ke from "../../../assets/icons/eye.svg.js";
9
+ import Ue from "../../basic/nmorph-icon/NmorphIcon.vue.js";
10
+ import je from "../../basic/nmorph-button/NmorphButton.vue.js";
11
+ import We from "../../../assets/icons/zoom-out.svg.js";
12
+ import Ze from "../../../assets/icons/zoom-in.svg.js";
13
+ import Xe from "../../../assets/icons/shrink.svg.js";
14
+ import Ye from "../../../assets/icons/rotate-right.svg.js";
15
+ import Je from "../../../assets/icons/rotate-left.svg.js";
16
+ import Qe from "../../../assets/icons/play.svg.js";
17
+ import et from "../../../assets/icons/enlarge.svg.js";
18
+ import tt from "../../../assets/icons/download.svg.js";
19
+ const ee = 45, te = 16 / 9, re = 160, oe = 128, Nt = /* @__PURE__ */ Ee({
20
20
  __name: "NmorphMediaGallery",
21
21
  props: {
22
22
  modelValue: { type: Boolean, required: !1, default: !1 },
@@ -35,6 +35,13 @@ const Y = 45, dt = /* @__PURE__ */ He({
35
35
  showTriggerFullscreenAction: { type: Boolean, required: !1, default: !0 },
36
36
  showTriggerDownloadAction: { type: Boolean, required: !1, default: !0 },
37
37
  showTriggerPlayButton: { type: Boolean, required: !1, default: !0 },
38
+ triggerLayout: { type: String, required: !1, default: "grid" },
39
+ triggerClass: { type: [String, Array, Object], required: !1, default: void 0 },
40
+ triggerStyle: { type: Object, required: !1, default: void 0 },
41
+ triggerImageFit: { type: String, required: !1, default: "cover" },
42
+ triggerVideoFit: { type: String, required: !1, default: "cover" },
43
+ triggerItemClass: { type: Function, required: !1 },
44
+ triggerItemStyle: { type: Function, required: !1 },
38
45
  showNavigationButtons: { type: Boolean, required: !1, default: !0 },
39
46
  showActionBar: { type: Boolean, required: !1, default: !0 },
40
47
  showFileName: { type: Boolean, required: !1, default: !0 },
@@ -45,107 +52,153 @@ const Y = 45, dt = /* @__PURE__ */ He({
45
52
  videoFit: { type: String, required: !1, default: "contain" }
46
53
  },
47
54
  emits: ["update:model-value", "update:active-index", "close", "change", "download", "fullscreen"],
48
- setup(G, { expose: W, emit: j }) {
49
- W();
50
- const o = G, a = j, v = c(o.modelValue), m = c(0), h = c(null), F = c({}), y = c(null), l = c(!1), f = c(1), i = c(0), p = c(null), u = n(() => o.items || []), x = n(() => u.value.length > 1), V = n(() => o.showNavigationButtons && x.value), g = (e) => {
51
- const t = u.value.length - 1;
55
+ setup(ae, { expose: ie, emit: ne }) {
56
+ ie();
57
+ const r = ae, l = ne, g = c(r.modelValue), v = c(0), h = c(null), S = c({}), y = c(null), u = c(!1), f = c(1), s = c(0), m = c(null), w = c(!1), n = i(() => r.items || []), B = i(() => n.value.length > 1), V = i(() => r.showNavigationButtons && B.value), p = (e) => {
58
+ const t = n.value.length - 1;
52
59
  return t < 0 || !Number.isFinite(e) || e < 0 ? 0 : e > t ? t : e;
53
- }, d = n(() => g(m.value)), r = n(() => u.value[d.value]), B = n(() => r.value?.kind === "image"), I = n(() => r.value?.kind === "video"), L = n(
54
- () => r.value?.kind === "video" ? r.value.controls !== !1 : !1
55
- ), J = n(() => r.value?.kind === "video" ? r.value.muted === !0 : !1), Q = n(
56
- () => r.value?.kind === "video" ? r.value.playsinline !== !1 : !0
57
- ), ee = n(
58
- () => r.value?.kind === "video" && r.value.preload || "metadata"
59
- ), te = n(
60
- () => r.value?.kind === "video" && r.value.name || "video"
61
- ), R = n(() => r.value?.name || ""), oe = n(() => o.showFileName ? R.value : ""), D = n(() => r.value?.downloadHref || ""), _ = n(() => o.showFileActions && I.value && !L.value), re = n(
62
- () => o.showFileActions && (_.value || !!D.value)
63
- ), ne = n(
64
- () => X({
60
+ }, d = i(() => p(v.value)), a = i(() => n.value[d.value]), R = i(() => a.value?.kind === "image"), N = i(() => a.value?.kind === "video"), C = i(
61
+ () => a.value?.kind === "video" ? a.value.controls !== !1 : !1
62
+ ), le = i(() => a.value?.kind === "video" ? a.value.muted === !0 : !1), ue = i(
63
+ () => a.value?.kind === "video" ? a.value.playsinline !== !1 : !0
64
+ ), se = i(
65
+ () => a.value?.kind === "video" && a.value.preload || "metadata"
66
+ ), de = i(
67
+ () => a.value?.kind === "video" && a.value.name || "video"
68
+ ), E = i(() => a.value?.name || ""), ce = i(() => r.showFileName ? E.value : ""), D = i(() => a.value?.downloadHref || ""), O = i(() => r.showFileActions && N.value && !C.value), ge = i(
69
+ () => r.showFileActions && (O.value || !!D.value)
70
+ ), fe = i(
71
+ () => Q({
65
72
  "nmorph-media-gallery": [
66
- v.value && "opened",
67
- B.value && "image",
68
- I.value && "video",
69
- l.value && I.value && "video-playing",
70
- o.imageFit === "cover" && B.value && "image-cover",
71
- o.videoFit === "cover" && I.value && "video-cover"
73
+ g.value && "opened",
74
+ R.value && "image",
75
+ N.value && "video",
76
+ u.value && N.value && "video-playing",
77
+ r.imageFit === "cover" && R.value && "image-cover",
78
+ r.videoFit === "cover" && N.value && "video-cover"
72
79
  ]
73
80
  })
74
- ), ae = n(() => `rotate(${i.value}deg) scale(${f.value})`), le = n(
75
- () => Ae({
76
- "--nmorph-private-media-gallery-trigger-height": o.height
77
- })
78
- ), ie = n(
79
- () => X({
80
- "nmorph-media-gallery__trigger": [o.height !== void 0 && "fixed-height"]
81
+ ), ve = i(() => `rotate(${s.value}deg) scale(${f.value})`), me = i(() => ({
82
+ ...Oe({
83
+ "--nmorph-private-media-gallery-trigger-height": r.height
84
+ }),
85
+ "--nmorph-private-media-gallery-trigger-image-fit": r.triggerImageFit,
86
+ "--nmorph-private-media-gallery-trigger-video-fit": r.triggerVideoFit,
87
+ ...r.triggerStyle || {}
88
+ })), G = i(
89
+ () => Q({
90
+ "nmorph-media-gallery__trigger": [
91
+ r.height !== void 0 && "fixed-height",
92
+ r.triggerLayout !== "grid" && r.triggerLayout,
93
+ r.triggerLayout !== "grid" && n.value.length === 1 && "single",
94
+ r.triggerLayout !== "grid" && n.value.length === 2 && "paired",
95
+ r.triggerLayout !== "grid" && n.value.length > 2 && "wrapped"
96
+ ]
81
97
  })
82
- ), q = (e) => {
98
+ ), pe = i(() => [G.value, r.triggerClass]), b = (e) => {
83
99
  if (e === void 0 || Number.isNaN(e) || e < 0) return "";
84
100
  if (e === 0) return "0 B";
85
- const t = ["B", "KB", "MB", "GB", "TB"], s = Math.min(Math.floor(Math.log(e) / Math.log(1024)), t.length - 1), M = e / 1024 ** s, ke = M >= 10 || s === 0 || Number.isInteger(M) ? 0 : 1;
86
- return `${M.toFixed(ke)} ${t[s]}`;
87
- }, ue = n(() => o.showFileSize ? q(r.value?.size) : ""), se = (e) => e.name || "", de = (e, t) => e.name || `${e.kind === "video" ? "Video" : "Image"} ${t + 1}`, ce = (e) => q(e.size), E = (e) => e.downloadHref || "", z = (e) => o.showTriggerPreviewAction && e.kind === "video", C = (e) => o.showTriggerFullscreenAction && e.kind === "video", K = (e) => o.showTriggerDownloadAction && !!E(e), ve = (e) => o.showTriggerActions && (z(e) || C(e) || K(e)), fe = (e, t) => {
88
- F.value[e] = t instanceof HTMLVideoElement ? t : null;
101
+ const t = ["B", "KB", "MB", "GB", "TB"], o = Math.min(Math.floor(Math.log(e) / Math.log(1024)), t.length - 1), I = e / 1024 ** o, Ce = I >= 10 || o === 0 || Number.isInteger(I) ? 0 : 1;
102
+ return `${I.toFixed(Ce)} ${t[o]}`;
103
+ }, he = i(() => r.showFileSize ? b(a.value?.size) : ""), ye = (e) => e.name || "", Ie = (e, t) => e.name || `${e.kind === "video" ? "Video" : "Image"} ${t + 1}`, we = (e) => b(e.size), z = (e) => e.downloadHref || "", $ = (e) => r.showTriggerPreviewAction && e.kind === "video", K = (e) => r.showTriggerFullscreenAction && e.kind === "video", U = (e) => r.showTriggerDownloadAction && !!z(e), Ne = (e) => r.showTriggerActions && ($(e) || K(e) || U(e)), Fe = (e, t) => {
104
+ S.value[e] = t instanceof HTMLVideoElement ? t : null;
105
+ }, q = (e) => typeof e.aspectRatio == "number" && Number.isFinite(e.aspectRatio) && e.aspectRatio > 0 ? e.aspectRatio : te, j = (e) => {
106
+ if (typeof r.height == "number") return r.height;
107
+ if (typeof r.height == "string") {
108
+ const o = r.height.trim().match(/^(\d+(?:\.\d+)?)px$/)?.[1];
109
+ if (o) return Number.parseFloat(o);
110
+ }
111
+ return e;
112
+ }, T = (e, t) => `${parseFloat((e * j(t)).toFixed(3))}px`, W = (e) => {
113
+ const t = q(e);
114
+ if (r.triggerLayout === "natural") {
115
+ const o = T(t, re);
116
+ return {
117
+ "--nmorph-private-media-gallery-trigger-item-ratio": t,
118
+ "--nmorph-private-media-gallery-trigger-item-basis": o,
119
+ flexGrow: t,
120
+ flexBasis: o
121
+ };
122
+ }
123
+ if (r.triggerLayout === "mosaic") {
124
+ const o = T(t, oe);
125
+ return {
126
+ "--nmorph-private-media-gallery-trigger-item-ratio": t,
127
+ "--nmorph-private-media-gallery-trigger-item-basis": o,
128
+ flexGrow: Math.min(Math.max(t, 0.75), 2.35),
129
+ flexBasis: o
130
+ };
131
+ }
132
+ return {};
133
+ }, xe = (e, t) => [
134
+ e.itemClass,
135
+ r.triggerItemClass?.(e, t)
136
+ ], Se = (e, t) => {
137
+ const o = {
138
+ ...e.itemStyle || {},
139
+ ...r.triggerItemStyle?.(e, t) || {}
140
+ }, I = q(e);
141
+ return r.triggerLayout !== "grid" ? (Object.assign(o, W(e)), o.aspectRatio = String(I)) : typeof e.aspectRatio == "number" && Number.isFinite(e.aspectRatio) && e.aspectRatio > 0 && (o.aspectRatio = String(I)), o;
89
142
  };
90
- N(
91
- () => o.modelValue,
143
+ x(
144
+ () => r.modelValue,
92
145
  (e) => {
93
- v.value = e;
146
+ g.value = e;
94
147
  }
95
- ), N(
96
- () => o.activeIndex,
148
+ ), x(
149
+ () => r.activeIndex,
97
150
  (e) => {
98
- typeof e == "number" && (m.value = g(e));
151
+ typeof e == "number" && (v.value = p(e));
99
152
  },
100
153
  { immediate: !0 }
101
- ), N(
102
- () => [o.initialIndex, u.value.length],
154
+ ), x(
155
+ () => [r.initialIndex, n.value.length],
103
156
  () => {
104
- typeof o.activeIndex != "number" && (m.value = g(o.initialIndex));
157
+ typeof r.activeIndex != "number" && (v.value = p(r.initialIndex));
105
158
  },
106
159
  { immediate: !0 }
107
- ), N(
108
- () => [r.value?.kind, r.value?.src, d.value],
160
+ ), x(
161
+ () => [a.value?.kind, a.value?.src, d.value],
109
162
  () => {
110
- l.value = !1, y.value = null;
163
+ u.value = !1, y.value = null;
111
164
  }
112
165
  );
113
- const w = () => {
114
- !h.value || h.value === y.value || (h.value.pause(), l.value = !1, y.value = h.value);
115
- }, b = () => {
116
- f.value = 1, i.value = 0;
117
- }, k = (e) => {
118
- if (!u.value.length) return;
119
- const t = g(e);
166
+ const F = () => {
167
+ !h.value || h.value === y.value || (h.value.pause(), u.value = !1, y.value = h.value);
168
+ }, A = () => {
169
+ f.value = 1, s.value = 0;
170
+ }, H = (e) => {
171
+ if (!n.value.length) return;
172
+ const t = p(e);
120
173
  if (t === d.value) return;
121
- w(), l.value = !1, m.value = t, b(), a("update:active-index", t);
122
- const s = u.value[t];
123
- s && a("change", s, t);
124
- }, H = () => {
125
- const e = u.value.length;
126
- e && k(d.value === 0 ? e - 1 : d.value - 1);
127
- }, S = () => {
128
- const e = u.value.length;
129
- e && k(d.value === e - 1 ? 0 : d.value + 1);
130
- }, me = (e) => {
131
- if (!u.value.length) return;
132
- const t = g(e);
133
- w(), l.value = !1, m.value = t, b(), v.value = !0, a("update:model-value", !0), a("update:active-index", t);
134
- const s = u.value[t];
135
- s && a("change", s, t);
136
- }, $ = () => {
137
- v.value && (w(), v.value = !1, a("update:model-value", !1), a("close"));
138
- }, pe = () => {
139
- i.value = i.value + 90, i.value >= 360 && (i.value = 0);
140
- }, ge = () => {
141
- i.value = i.value - 90, i.value <= -360 && (i.value = 0);
142
- }, he = () => {
174
+ F(), u.value = !1, v.value = t, A(), l("update:active-index", t);
175
+ const o = n.value[t];
176
+ o && l("change", o, t);
177
+ }, L = () => {
178
+ const e = n.value.length;
179
+ e && H(d.value === 0 ? e - 1 : d.value - 1);
180
+ }, k = () => {
181
+ const e = n.value.length;
182
+ e && H(d.value === e - 1 ? 0 : d.value + 1);
183
+ }, Be = (e) => {
184
+ if (!n.value.length) return;
185
+ const t = p(e);
186
+ F(), u.value = !1, v.value = t, A(), w.value = !0, g.value = !0, l("update:model-value", !0), l("update:active-index", t);
187
+ const o = n.value[t];
188
+ o && l("change", o, t);
189
+ }, Z = () => {
190
+ g.value && (F(), g.value = !1, l("update:model-value", !1), l("close"));
191
+ }, Re = () => {
192
+ s.value = s.value + 90, s.value >= 360 && (s.value = 0);
193
+ }, be = () => {
194
+ s.value = s.value - 90, s.value <= -360 && (s.value = 0);
195
+ }, qe = () => {
143
196
  f.value = parseFloat(Math.min(f.value + 0.2, 4).toFixed(3));
144
- }, ye = () => {
197
+ }, Te = () => {
145
198
  f.value = parseFloat(Math.max(f.value - 0.2, 0.2).toFixed(3));
146
- }, Ie = () => {
199
+ }, Ae = () => {
147
200
  f.value = 1;
148
- }, A = async (e) => {
201
+ }, _ = async (e) => {
149
202
  if (e)
150
203
  try {
151
204
  const t = e.requestFullscreen?.() || e.webkitRequestFullscreen?.();
@@ -156,83 +209,90 @@ const Y = 45, dt = /* @__PURE__ */ He({
156
209
  e.webkitEnterFullscreen?.();
157
210
  } catch {
158
211
  }
159
- }, we = async () => {
160
- !r.value || r.value.kind !== "video" || (a("fullscreen", r.value, d.value), await A(h.value));
161
- }, Ne = async (e, t) => {
162
- e.kind === "video" && (a("fullscreen", e, t), await A(F.value[t]));
163
- }, O = (e, t) => {
164
- a("download", e, t);
165
- }, Fe = () => {
166
- r.value && O(r.value, d.value);
167
- }, xe = () => {
168
- l.value = !0, y.value = null;
169
- }, Be = () => {
170
- l.value = !1;
171
- }, qe = () => {
172
- l.value = !1;
173
- }, be = () => {
174
- l.value = !1;
175
- }, T = (e) => {
176
- if (v.value && !(e.altKey || e.ctrlKey || e.metaKey || e.shiftKey)) {
212
+ }, He = async () => {
213
+ !a.value || a.value.kind !== "video" || (l("fullscreen", a.value, d.value), await _(h.value));
214
+ }, Le = async (e, t) => {
215
+ e.kind === "video" && (l("fullscreen", e, t), await _(S.value[t]));
216
+ }, X = (e, t) => {
217
+ l("download", e, t);
218
+ }, ke = () => {
219
+ a.value && X(a.value, d.value);
220
+ }, _e = () => {
221
+ u.value = !0, y.value = null;
222
+ }, Me = () => {
223
+ u.value = !1;
224
+ }, Pe = () => {
225
+ u.value = !1;
226
+ }, Ve = () => {
227
+ u.value = !1;
228
+ }, M = (e) => {
229
+ if (g.value && !(e.altKey || e.ctrlKey || e.metaKey || e.shiftKey)) {
177
230
  if (e.key === "Escape") {
178
- e.preventDefault(), $();
231
+ e.preventDefault(), Z();
179
232
  return;
180
233
  }
181
- x.value && (e.key === "ArrowLeft" && (e.preventDefault(), H()), e.key === "ArrowRight" && (e.preventDefault(), S()));
234
+ B.value && (e.key === "ArrowLeft" && (e.preventDefault(), L()), e.key === "ArrowRight" && (e.preventDefault(), k()));
182
235
  }
183
- }, Z = () => {
184
- typeof document > "u" || document.addEventListener("keydown", T);
236
+ }, Y = () => {
237
+ typeof document > "u" || document.addEventListener("keydown", M);
185
238
  }, P = () => {
186
- typeof document > "u" || document.removeEventListener("keydown", T);
239
+ typeof document > "u" || document.removeEventListener("keydown", M);
187
240
  };
188
- N(
189
- v,
241
+ x(
242
+ g,
190
243
  (e) => {
191
- e ? (Z(), y.value = null, m.value = g(
192
- typeof o.activeIndex == "number" ? o.activeIndex : o.initialIndex
193
- )) : (w(), l.value = !1, P());
244
+ if (e) {
245
+ if (Y(), y.value = null, w.value) {
246
+ w.value = !1;
247
+ return;
248
+ }
249
+ v.value = p(
250
+ typeof r.activeIndex == "number" ? r.activeIndex : r.initialIndex
251
+ );
252
+ } else
253
+ w.value = !1, F(), u.value = !1, P();
194
254
  },
195
255
  { immediate: !0 }
196
- ), Se(P);
197
- const U = { SWIPE_THRESHOLD: Y, props: o, emit: a, open: v, currentIndex: m, currentVideoRef: h, triggerVideoRefs: F, pausedVideoRef: y, videoPlaying: l, scaleLevel: f, rotateLevel: i, pointerStart: p, sourceList: u, multipleItems: x, showNavigation: V, getClampedIndex: g, resolvedCurrentIndex: d, currentItem: r, isImage: B, isVideo: I, videoControls: L, videoMuted: J, videoPlaysinline: Q, videoPreload: ee, currentVideoName: te, currentItemName: R, currentName: oe, currentDownloadHref: D, showVideoFullscreenAction: _, showFileActions: re, modifiers: ne, imageTransform: ae, triggerStyle: le, triggerModifiers: ie, formatSize: q, currentSize: ue, getItemName: se, getItemLabel: de, getItemSize: ce, getItemDownloadHref: E, showTriggerPreviewActionForItem: z, showTriggerFullscreenActionForItem: C, showTriggerDownloadActionForItem: K, showTriggerActionsForItem: ve, setTriggerVideoRef: fe, pauseCurrentVideo: w, resetImageTransform: b, setCurrentIndex: k, previousHandler: H, nextHandler: S, openPreviewAt: me, closeHandler: $, rotateRight: pe, rotateLeft: ge, zoomIn: he, zoomOut: ye, toggleNormalSize: Ie, requestVideoFullscreen: A, fullscreenHandler: we, triggerFullscreenHandler: Ne, downloadItemHandler: O, downloadHandler: Fe, videoPlayHandler: xe, videoPauseHandler: Be, videoEndedHandler: qe, videoErrorHandler: be, keyboardNavigationHandler: T, addKeyboardNavigationListener: Z, removeKeyboardNavigationListener: P, pointerDownHandler: (e) => {
198
- p.value = { x: e.clientX, y: e.clientY };
256
+ ), De(P);
257
+ const J = { SWIPE_THRESHOLD: ee, DEFAULT_TRIGGER_ASPECT_RATIO: te, NATURAL_TRIGGER_ROW_BASIS: re, MOSAIC_TRIGGER_ROW_BASIS: oe, props: r, emit: l, open: g, currentIndex: v, currentVideoRef: h, triggerVideoRefs: S, pausedVideoRef: y, videoPlaying: u, scaleLevel: f, rotateLevel: s, pointerStart: m, openingFromTrigger: w, sourceList: n, multipleItems: B, showNavigation: V, getClampedIndex: p, resolvedCurrentIndex: d, currentItem: a, isImage: R, isVideo: N, videoControls: C, videoMuted: le, videoPlaysinline: ue, videoPreload: se, currentVideoName: de, currentItemName: E, currentName: ce, currentDownloadHref: D, showVideoFullscreenAction: O, showFileActions: ge, modifiers: fe, imageTransform: ve, triggerStyle: me, triggerModifiers: G, triggerClasses: pe, formatSize: b, currentSize: he, getItemName: ye, getItemLabel: Ie, getItemSize: we, getItemDownloadHref: z, showTriggerPreviewActionForItem: $, showTriggerFullscreenActionForItem: K, showTriggerDownloadActionForItem: U, showTriggerActionsForItem: Ne, setTriggerVideoRef: Fe, getItemAspectRatio: q, getTriggerRowBasis: j, getTriggerFlexBasis: T, getTriggerLayoutStyle: W, getTriggerItemClass: xe, getTriggerItemStyle: Se, pauseCurrentVideo: F, resetImageTransform: A, setCurrentIndex: H, previousHandler: L, nextHandler: k, openPreviewAt: Be, closeHandler: Z, rotateRight: Re, rotateLeft: be, zoomIn: qe, zoomOut: Te, toggleNormalSize: Ae, requestVideoFullscreen: _, fullscreenHandler: He, triggerFullscreenHandler: Le, downloadItemHandler: X, downloadHandler: ke, videoPlayHandler: _e, videoPauseHandler: Me, videoEndedHandler: Pe, videoErrorHandler: Ve, keyboardNavigationHandler: M, addKeyboardNavigationListener: Y, removeKeyboardNavigationListener: P, pointerDownHandler: (e) => {
258
+ m.value = { x: e.clientX, y: e.clientY };
199
259
  }, pointerUpHandler: (e) => {
200
- if (!p.value || !V.value) {
201
- p.value = null;
260
+ if (!m.value || !V.value) {
261
+ m.value = null;
202
262
  return;
203
263
  }
204
- const t = e.clientX - p.value.x, s = e.clientY - p.value.y;
205
- p.value = null, !(Math.abs(t) < Y || Math.abs(t) < Math.abs(s) * 1.2) && (t > 0 ? H() : S());
264
+ const t = e.clientX - m.value.x, o = e.clientY - m.value.y;
265
+ m.value = null, !(Math.abs(t) < ee || Math.abs(t) < Math.abs(o) * 1.2) && (t > 0 ? L() : k());
206
266
  }, get NmorphButton() {
207
- return Re;
267
+ return je;
208
268
  }, get NmorphIcon() {
209
- return Le;
269
+ return Ue;
210
270
  }, get NmorphIconDownload() {
211
- return Oe;
271
+ return tt;
212
272
  }, get NmorphIconEnlarge() {
213
- return $e;
273
+ return et;
214
274
  }, get NmorphIconEye() {
215
- return Ve;
275
+ return Ke;
216
276
  }, get NmorphIconFullScreen() {
217
- return Me;
277
+ return $e;
218
278
  }, get NmorphIconPlay() {
219
- return Ke;
279
+ return Qe;
220
280
  }, get NmorphIconRotateLeft() {
221
- return Ce;
281
+ return Je;
222
282
  }, get NmorphIconRotateRight() {
223
- return ze;
283
+ return Ye;
224
284
  }, get NmorphIconShrink() {
225
- return Ee;
285
+ return Xe;
226
286
  }, get NmorphIconZoomIn() {
227
- return _e;
287
+ return Ze;
228
288
  }, get NmorphIconZoomOut() {
229
- return De;
289
+ return We;
230
290
  }, get NmorphImage() {
231
- return Pe;
232
- }, NmorphPreviewPortal: Te };
233
- return Object.defineProperty(U, "__isScriptSetup", { enumerable: !1, value: !0 }), U;
291
+ return ze;
292
+ }, NmorphPreviewPortal: Ge };
293
+ return Object.defineProperty(J, "__isScriptSetup", { enumerable: !1, value: !0 }), J;
234
294
  }
235
295
  });
236
296
  export {
237
- dt as default
297
+ Nt as default
238
298
  };
@@ -1 +1 @@
1
- .nmorph-progress{--nmorph-private-progress-height: 8px;--nmorph-private-progress-width-transition: .4s ease-in-out width;--nmorph-private-progress-indeterminate-animation: slide 2s linear infinite;display:inline}.nmorph-progress .nmorph-progress__linear{display:flex;align-items:center;height:100%;height:var(--nmorph-private-progress-height)}.nmorph-progress .nmorph-progress__linear .nmorph-progress__outer{width:100%;height:100%;overflow:hidden;background:var(--nmorph-main-color);border-radius:var(--border-radius-40);box-shadow:inset var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),inset calc(-1 * var(--base-shadow-width)) calc(-1 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color)}.nmorph-progress .nmorph-progress__linear .nmorph-progress__inner{position:relative;height:100%;border-radius:var(--border-radius-40);transition:var(--nmorph-private-progress-width-transition)}.nmorph-progress .nmorph-progress__linear .nmorph-progress__percentage,.nmorph-progress .nmorph-progress__linear .nmorph-progress__inner-text{margin-left:var(--indentation-03);font-weight:var(--nmorph-typography-caption-font-weight);font-size:var(--nmorph-typography-caption-font-size);line-height:var(--nmorph-typography-caption-line-height)}.nmorph-progress .nmorph-progress__linear .nmorph-progress__inner-text{position:absolute;top:50%;right:var(--indentation-02);color:var(--nmorph-light-shade-color);transform:translateY(-50%)}.nmorph-progress .nmorph-progress__circle{position:relative;width:var(--nmorph-private-progress-circle-size);height:var(--nmorph-private-progress-circle-size);background:var(--nmorph-main-color);border-radius:var(--border-radius-circular);box-shadow:inset var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),inset calc(-1 * var(--base-shadow-width)) calc(-1 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color)}.nmorph-progress .nmorph-progress__circle:after{position:absolute;top:50%;left:50%;width:92%;height:92%;background:var(--nmorph-main-color);border-radius:var(--border-radius-circular);box-shadow:0 0 var(--base-shadow-blur) var(--nmorph-dark-shade-color);transform:translate(-50%,-50%);content:""}.nmorph-progress .nmorph-progress__circle-inner-part{position:absolute;top:50%;left:50%;z-index:1;transform:translate(-50%,-50%)}.nmorph-progress .nmorph-progress__circle-ring{transform:rotate(-90deg);transform-origin:center;transition:stroke-dashoffset .5s;fill:none;stroke:var(--nmorph-private-progress-color);stroke-width:4px}.nmorph-progress .nmorph-progress__inner{width:var(--nmorph-private-progress-percentage);background:var(--nmorph-private-progress-color);animation:var(--nmorph-private-progress-animation)}
1
+ .nmorph-progress{--nmorph-private-progress-height: 8px;--nmorph-private-progress-width-transition: .4s ease-in-out width;--nmorph-private-progress-indeterminate-animation: nmorph-progress-indeterminate 1.4s ease-in-out infinite;display:inline}.nmorph-progress .nmorph-progress__linear{display:flex;align-items:center;height:100%;height:var(--nmorph-private-progress-height)}.nmorph-progress .nmorph-progress__linear .nmorph-progress__outer{width:100%;height:100%;overflow:hidden;background:var(--nmorph-main-color);border-radius:var(--border-radius-40);box-shadow:inset var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),inset calc(-1 * var(--base-shadow-width)) calc(-1 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color)}.nmorph-progress .nmorph-progress__linear .nmorph-progress__inner{position:relative;height:100%;border-radius:var(--border-radius-40);transition:var(--nmorph-private-progress-width-transition)}.nmorph-progress .nmorph-progress__linear .nmorph-progress__percentage,.nmorph-progress .nmorph-progress__linear .nmorph-progress__inner-text{margin-left:var(--indentation-03);font-weight:var(--nmorph-typography-caption-font-weight);font-size:var(--nmorph-typography-caption-font-size);line-height:var(--nmorph-typography-caption-line-height)}.nmorph-progress .nmorph-progress__linear .nmorph-progress__inner-text{position:absolute;top:50%;right:var(--indentation-02);color:var(--nmorph-light-shade-color);transform:translateY(-50%)}.nmorph-progress .nmorph-progress__circle{position:relative;width:var(--nmorph-private-progress-circle-size);height:var(--nmorph-private-progress-circle-size);background:var(--nmorph-main-color);border-radius:var(--border-radius-circular);box-shadow:inset var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),inset calc(-1 * var(--base-shadow-width)) calc(-1 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color)}.nmorph-progress .nmorph-progress__circle:after{position:absolute;top:50%;left:50%;width:92%;height:92%;background:var(--nmorph-main-color);border-radius:var(--border-radius-circular);box-shadow:0 0 var(--base-shadow-blur) var(--nmorph-dark-shade-color);transform:translate(-50%,-50%);content:""}.nmorph-progress .nmorph-progress__circle-inner-part{position:absolute;top:50%;left:50%;z-index:1;transform:translate(-50%,-50%)}.nmorph-progress .nmorph-progress__circle-ring{transform:rotate(-90deg);transform-origin:center;transition:stroke-dashoffset .5s;fill:none;stroke:var(--nmorph-private-progress-color);stroke-width:4px}.nmorph-progress .nmorph-progress__inner{width:var(--nmorph-private-progress-percentage);background:var(--nmorph-private-progress-color);animation:var(--nmorph-private-progress-animation)}.nmorph-progress.nmorph-progress--indeterminate .nmorph-progress__inner{width:40%;min-width:32px;transform:translate(-100%);transition:none;will-change:transform}@keyframes nmorph-progress-indeterminate{0%{transform:translate(-100%)}to{transform:translate(250%)}}
@@ -18,18 +18,18 @@ const C = /* @__PURE__ */ y({
18
18
  },
19
19
  setup(c, { expose: d }) {
20
20
  d();
21
- const e = c, f = r(
21
+ const e = c, m = r(
22
22
  () => q({
23
- "nmorph-progress": []
23
+ "nmorph-progress": [e.indeterminate && "indeterminate"]
24
24
  })
25
- ), i = r(() => Array.isArray(e.color) ? e.color.find((h) => h.percentage <= e.percentage)?.color : typeof e.color == "function" ? e.color(e.percentage) : e.color), n = r(() => e.indeterminate ? "var(--nmorph-private-progress-indeterminate-animation)" : "none"), a = u(null), t = u(1), m = r(() => `${t.value} ${t.value}`), v = r(() => t.value - e.percentage / 100 * t.value);
25
+ ), a = r(() => Array.isArray(e.color) ? e.color.find((h) => h.percentage <= e.percentage)?.color : typeof e.color == "function" ? e.color(e.percentage) : e.color), n = r(() => e.indeterminate ? "var(--nmorph-private-progress-indeterminate-animation)" : "none"), i = u(null), t = u(1), f = r(() => `${t.value} ${t.value}`), v = r(() => t.value - e.percentage / 100 * t.value);
26
26
  S(() => {
27
- a.value && (t.value = 2 * Math.PI * a.value.r.baseVal.value);
27
+ i.value && (t.value = 2 * Math.PI * i.value.r.baseVal.value);
28
28
  });
29
29
  const o = r(() => `${e.circleSize}px`), s = r(() => `${e.percentage}%`), l = r(() => e.height ?? (e.valueInside ? "18px" : void 0)), g = r(() => ({
30
30
  ...b({
31
31
  "--nmorph-private-progress-percentage": s.value,
32
- "--nmorph-private-progress-color": i.value,
32
+ "--nmorph-private-progress-color": a.value,
33
33
  "--nmorph-private-progress-animation": n.value,
34
34
  "--nmorph-private-progress-circle-size": o.value,
35
35
  "--nmorph-private-progress-width-transition": e.widthTransition,
@@ -38,7 +38,7 @@ const C = /* @__PURE__ */ y({
38
38
  ..._({
39
39
  "--nmorph-private-progress-height": l.value
40
40
  })
41
- })), p = { props: e, modifiers: f, color: i, animation: n, circle: a, circumference: t, strokeDasharray: m, strokeDashoffset: v, circleContainerSize: o, displayPercentage: s, linearHeight: l, styles: g };
41
+ })), p = { props: e, modifiers: m, color: a, animation: n, circle: i, circumference: t, strokeDasharray: f, strokeDashoffset: v, circleContainerSize: o, displayPercentage: s, linearHeight: l, styles: g };
42
42
  return Object.defineProperty(p, "__isScriptSetup", { enumerable: !1, value: !0 }), p;
43
43
  }
44
44
  });
@@ -4,10 +4,10 @@ import { useModifiers as Q } from "../../../utils/create-modifiers.js";
4
4
  import { createCssSizeVariables as X } from "../../../utils/common.js";
5
5
  import Y from "../../../assets/icons/video.svg.js";
6
6
  import Z from "../../others/nmorph-overlay/NmorphOverlay.vue.js";
7
- import ee from "../../basic/nmorph-icon/NmorphIcon.vue.js";
8
- import re from "../../../assets/icons/play.svg.js";
9
- import te from "../../../assets/icons/pause.svg.js";
10
- import oe from "../../../assets/icons/open.svg.js";
7
+ import ee from "../../../assets/icons/open.svg.js";
8
+ import re from "../../basic/nmorph-icon/NmorphIcon.vue.js";
9
+ import te from "../../../assets/icons/play.svg.js";
10
+ import oe from "../../../assets/icons/pause.svg.js";
11
11
  import ae from "../../../assets/icons/loading.svg.js";
12
12
  import ne from "../../../assets/icons/full-screen.svg.js";
13
13
  import le from "../../../assets/icons/eye.svg.js";
@@ -133,7 +133,7 @@ const ie = "var(--nmorph-contrast-text-color)", v = 0.25, Se = /* @__PURE__ */ U
133
133
  };
134
134
  O({ videoRef: l });
135
135
  const B = { CONTRAST_ICON_COLOR: ie, VIDEO_BUFFER_EPSILON_SECONDS: v, props: e, emit: n, attrs: u, slots: h, videoRef: l, previewOpen: f, playing: o, videoLoaded: s, formatDuration: y, duration: A, mediaReady: d, showPlaybackControl: H, resolvedPreload: F, showFullscreenAction: w, hasPreviewActions: g, hasDefaultActions: N, hasActions: q, modifiers: S, styles: b, rootAttrs: E, rootClass: C, rootStyle: D, openHandler: M, downloadHandler: V, previewHandler: k, closePreviewHandler: x, fullscreenHandler: L, togglePlayback: R, isVideoFullyBuffered: I, updateVideoLoaded: j, playHandler: T, pauseHandler: W, endedHandler: $, errorHandler: z, get NmorphIcon() {
136
- return ee;
136
+ return re;
137
137
  }, get NmorphIconDownload() {
138
138
  return se;
139
139
  }, get NmorphIconEye() {
@@ -143,13 +143,13 @@ const ie = "var(--nmorph-contrast-text-color)", v = 0.25, Se = /* @__PURE__ */ U
143
143
  }, get NmorphIconLoader() {
144
144
  return ae;
145
145
  }, get NmorphIconOpen() {
146
- return oe;
146
+ return ee;
147
147
  }, get NmorphOverlay() {
148
148
  return Z;
149
149
  }, get NmorphIconPause() {
150
- return te;
150
+ return oe;
151
151
  }, get NmorphIconPlay() {
152
- return re;
152
+ return te;
153
153
  }, get NmorphIconVideo() {
154
154
  return Y;
155
155
  } };
@@ -1,19 +1,19 @@
1
1
  import './NmorphBacktop.css';
2
2
  import i from "./NmorphBacktop.vue2.js";
3
- import { openBlock as e, createElementBlock as c, createBlock as a, Teleport as s, createElementVNode as t, normalizeStyle as d, normalizeClass as p, withModifiers as m, renderSlot as f, createVNode as r, withCtx as l } from "vue";
3
+ import { openBlock as e, createElementBlock as s, createBlock as a, Teleport as c, createElementVNode as l, normalizeStyle as d, normalizeClass as p, withModifiers as m, renderSlot as f, createVNode as r, withCtx as t } from "vue";
4
4
  /* empty css */
5
5
  import h from "../../../_virtual/_plugin-vue_export-helper.js";
6
6
  const _ = { ref: "placeholderDOMEl" };
7
- function k(n, v, b, o, N, B) {
8
- return e(), c(
7
+ function b(n, k, v, o, N, g) {
8
+ return e(), s(
9
9
  "div",
10
10
  _,
11
11
  [
12
- (e(), a(s, {
12
+ (e(), a(c, {
13
13
  to: o.props.teleportTo,
14
14
  disabled: !o.isMounted || o.props.teleportDisabled
15
15
  }, [
16
- t(
16
+ l(
17
17
  "div",
18
18
  {
19
19
  ref: "selfDOMEl",
@@ -21,19 +21,20 @@ function k(n, v, b, o, N, B) {
21
21
  style: d(o.styles)
22
22
  },
23
23
  [
24
- t("div", {
24
+ l("div", {
25
25
  onClick: m(o.scrollToTopHandler, ["stop"])
26
26
  }, [
27
27
  f(n.$slots, "default", {}, () => [
28
28
  r(o.NmorphButton, {
29
- design: o.props.design
29
+ design: o.props.design,
30
+ borderless: o.props.design === "plain"
30
31
  }, {
31
- default: l(() => [
32
+ default: t(() => [
32
33
  r(o.NmorphIcon, {
33
34
  class: "nmorph-backtop__up-icon",
34
35
  color: o.props.design === "nmorph" ? void 0 : "var(--nmorph-contrast-text-color)"
35
36
  }, {
36
- default: l(() => [
37
+ default: t(() => [
37
38
  r(o.NmorphIconChevronDown)
38
39
  ]),
39
40
  _: 1
@@ -42,7 +43,7 @@ function k(n, v, b, o, N, B) {
42
43
  ]),
43
44
  _: 1
44
45
  /* STABLE */
45
- }, 8, ["design"])
46
+ }, 8, ["design", "borderless"])
46
47
  ])
47
48
  ])
48
49
  ],
@@ -55,7 +56,7 @@ function k(n, v, b, o, N, B) {
55
56
  /* NEED_PATCH */
56
57
  );
57
58
  }
58
- const D = /* @__PURE__ */ h(i, [["render", k], ["__file", "/builds/ketjo/nmorph/library/src/components/navigation/nmorph-backtop/NmorphBacktop.vue"]]);
59
+ const D = /* @__PURE__ */ h(i, [["render", b], ["__file", "/builds/ketjo/nmorph/library/src/components/navigation/nmorph-backtop/NmorphBacktop.vue"]]);
59
60
  export {
60
61
  D as default
61
62
  };