@templatical/media-library 0.0.5 → 0.0.6
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,4 +1,4 @@
|
|
|
1
|
-
import { $ as e, A as t, B as n, C as r, D as i, E as a, F as o, G as s, H as c, I as l, J as u, K as d, L as f, M as p, N as m, O as h, P as g, Q as _, R as v, S as y, T as b, U as x, V as S, W as C, X as w, Y as T, Z as E, _ as D, a as O, at as k, b as ee, c as A, d as te, et as ne, f as re, g as ie, h as ae, i as oe, it as j, j as M, k as N, l as se, m as ce, n as le, nt as ue, o as de, ot as P, p as fe, q as F, r as pe, rt as I, s as me, st as L, t as he, tt as ge, u as _e, v as ve, w as R, x as ye, y as be, z } from "./chunks/icons-
|
|
1
|
+
import { $ as e, A as t, B as n, C as r, D as i, E as a, F as o, G as s, H as c, I as l, J as u, K as d, L as f, M as p, N as m, O as h, P as g, Q as _, R as v, S as y, T as b, U as x, V as S, W as C, X as w, Y as T, Z as E, _ as D, a as O, at as k, b as ee, c as A, d as te, et as ne, f as re, g as ie, h as ae, i as oe, it as j, j as M, k as N, l as se, m as ce, n as le, nt as ue, o as de, ot as P, p as fe, q as F, r as pe, rt as I, s as me, st as L, t as he, tt as ge, u as _e, v as ve, w as R, x as ye, y as be, z } from "./chunks/icons-C3RsNALX.js";
|
|
2
2
|
//#region ../types/src/config.ts
|
|
3
3
|
var xe = class extends Error {
|
|
4
4
|
constructor(e, t) {
|
|
@@ -509,7 +509,7 @@ function Be(e, t, n, r) {
|
|
|
509
509
|
};
|
|
510
510
|
}
|
|
511
511
|
//#endregion
|
|
512
|
-
//#region ../../node_modules/.bun/vue-advanced-cropper@2.8.9+
|
|
512
|
+
//#region ../../node_modules/.bun/vue-advanced-cropper@2.8.9+987b49219a7ab62d/node_modules/vue-advanced-cropper/dist/index.esm-bundler.js
|
|
513
513
|
function Ve(e, t) {
|
|
514
514
|
var n = Object.keys(e);
|
|
515
515
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -2161,11 +2161,14 @@ var Sn = {
|
|
|
2161
2161
|
}
|
|
2162
2162
|
},
|
|
2163
2163
|
onMouseDown: function(e) {
|
|
2164
|
-
this.mouseMove && "buttons" in e && e.buttons === 1 && this.processEvent(e)
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2164
|
+
if (this.mouseMove && "buttons" in e && e.buttons === 1 && this.processEvent(e)) {
|
|
2165
|
+
var t = {
|
|
2166
|
+
fake: !0,
|
|
2167
|
+
clientX: e.clientX,
|
|
2168
|
+
clientY: e.clientY
|
|
2169
|
+
};
|
|
2170
|
+
this.touches = [t], this.processStart();
|
|
2171
|
+
}
|
|
2169
2172
|
},
|
|
2170
2173
|
onMouseMove: function(e) {
|
|
2171
2174
|
this.touches.length && this.processEvent(e) && this.processMove(e, [{
|
|
@@ -3234,7 +3237,7 @@ var jn = ["transitions"], Mn = K("vue-advanced-cropper"), Nn = {
|
|
|
3234
3237
|
height: Math.min(1024, this.imageAttributes.width) / (this.imageAttributes.width / this.imageAttributes.height)
|
|
3235
3238
|
} : {
|
|
3236
3239
|
height: Math.min(1024, this.imageAttributes.height),
|
|
3237
|
-
width: this.imageAttributes.
|
|
3240
|
+
width: Math.min(1024, this.imageAttributes.height) * (this.imageAttributes.width / this.imageAttributes.height)
|
|
3238
3241
|
}, t = {
|
|
3239
3242
|
left: (e.width - this.imageSize.width) / (2 * this.coefficient),
|
|
3240
3243
|
top: (e.height - this.imageSize.height) / (2 * this.coefficient)
|
|
@@ -3242,8 +3245,8 @@ var jn = ["transitions"], Mn = K("vue-advanced-cropper"), Nn = {
|
|
|
3242
3245
|
left: (1 - 1 / this.coefficient) * e.width / 2,
|
|
3243
3246
|
top: (1 - 1 / this.coefficient) * e.height / 2
|
|
3244
3247
|
}, r = U(U({}, this.imageTransforms), {}, {
|
|
3245
|
-
scaleX: this.imageAttributes.width / e.width
|
|
3246
|
-
scaleY: this.imageAttributes.height / e.height
|
|
3248
|
+
scaleX: this.imageTransforms.scaleX * (this.imageAttributes.width / e.width),
|
|
3249
|
+
scaleY: this.imageTransforms.scaleY * (this.imageAttributes.height / e.height)
|
|
3247
3250
|
}), i = {
|
|
3248
3251
|
width: `${e.width}px`,
|
|
3249
3252
|
height: `${e.height}px`,
|
|
@@ -3351,8 +3354,8 @@ var jn = ["transitions"], Mn = K("vue-advanced-cropper"), Nn = {
|
|
|
3351
3354
|
}));
|
|
3352
3355
|
},
|
|
3353
3356
|
refresh: function() {
|
|
3354
|
-
var e = this;
|
|
3355
|
-
if (this.src &&
|
|
3357
|
+
var e = this, t = this.$refs.image;
|
|
3358
|
+
if (this.src && t) return this.initialized ? this.updateVisibleArea().then((function() {
|
|
3356
3359
|
e.onChange();
|
|
3357
3360
|
})) : this.resetVisibleArea().then((function() {
|
|
3358
3361
|
e.onChange();
|
|
@@ -3513,8 +3516,9 @@ var jn = ["transitions"], Mn = K("vue-advanced-cropper"), Nn = {
|
|
|
3513
3516
|
resetCoordinates: function() {
|
|
3514
3517
|
var e = this;
|
|
3515
3518
|
if (this.$refs.image) {
|
|
3519
|
+
this.$refs.cropper, this.$refs.image;
|
|
3516
3520
|
var t = this.defaultSize;
|
|
3517
|
-
t ||= this.stencilSize ? Jt : qt;
|
|
3521
|
+
t ||= this.stencilSize ? Jt : qt, this.sizeRestrictions;
|
|
3518
3522
|
var n = $e(t) ? t({
|
|
3519
3523
|
boundaries: this.boundaries,
|
|
3520
3524
|
imageSize: this.imageSize,
|
|
@@ -3771,13 +3775,13 @@ var jn = ["transitions"], Mn = K("vue-advanced-cropper"), Nn = {
|
|
|
3771
3775
|
this.coordinates = this.applyTransform(this.coordinates, !0), this.onChange(!1);
|
|
3772
3776
|
},
|
|
3773
3777
|
getAreaRestrictions: function() {
|
|
3774
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.visibleArea, n = e.type;
|
|
3778
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.visibleArea, n = e.type, r = n === void 0 ? "move" : n;
|
|
3775
3779
|
return this.areaRestrictionsAlgorithm({
|
|
3776
3780
|
boundaries: this.boundaries,
|
|
3777
3781
|
imageSize: this.imageSize,
|
|
3778
3782
|
imageRestriction: this.imageRestriction,
|
|
3779
3783
|
visibleArea: t,
|
|
3780
|
-
type:
|
|
3784
|
+
type: r
|
|
3781
3785
|
});
|
|
3782
3786
|
},
|
|
3783
3787
|
getAspectRatio: function(e) {
|
|
@@ -4626,7 +4630,7 @@ var In = ["data-tpl-theme"], Ln = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Rn
|
|
|
4626
4630
|
}
|
|
4627
4631
|
});
|
|
4628
4632
|
//#endregion
|
|
4629
|
-
//#region ../../node_modules/.bun/@vueuse+shared@14.2.1+
|
|
4633
|
+
//#region ../../node_modules/.bun/@vueuse+shared@14.2.1+987b49219a7ab62d/node_modules/@vueuse/shared/dist/index.js
|
|
4630
4634
|
function Nr(e, t) {
|
|
4631
4635
|
return T() ? (E(e, t), !0) : !1;
|
|
4632
4636
|
}
|
|
@@ -4723,7 +4727,7 @@ function Yr(e, t, n) {
|
|
|
4723
4727
|
});
|
|
4724
4728
|
}
|
|
4725
4729
|
//#endregion
|
|
4726
|
-
//#region ../../node_modules/.bun/@vueuse+core@14.2.1+
|
|
4730
|
+
//#region ../../node_modules/.bun/@vueuse+core@14.2.1+987b49219a7ab62d/node_modules/@vueuse/core/dist/index.js
|
|
4727
4731
|
var Xr = Fr ? window : void 0, Zr = Fr ? window.document : void 0, Qr = Fr ? window.navigator : void 0;
|
|
4728
4732
|
function $r(e) {
|
|
4729
4733
|
let t = I(e);
|