@magmonium/one 0.4.30 → 0.4.32
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/assets/button_groups/nav_user_actions.json +1 -0
- package/assets/button_groups/notification_filter.json +2 -13
- package/assets/buttons/nav_user_edit_profile.json +5 -0
- package/assets/docs/en/app-release.md +0 -11
- package/assets/i18n/af.json +10 -2
- package/assets/i18n/am.json +10 -1
- package/assets/i18n/ar.json +10 -2
- package/assets/i18n/as.json +11 -2
- package/assets/i18n/az.json +11 -2
- package/assets/i18n/ba.json +8 -0
- package/assets/i18n/be.json +11 -2
- package/assets/i18n/bg.json +11 -2
- package/assets/i18n/bn.json +11 -2
- package/assets/i18n/br.json +7 -0
- package/assets/i18n/bs.json +10 -2
- package/assets/i18n/ca.json +10 -2
- package/assets/i18n/ceb.json +9 -2
- package/assets/i18n/cnr.json +8 -0
- package/assets/i18n/co.json +7 -1
- package/assets/i18n/cs.json +9 -2
- package/assets/i18n/cy.json +11 -2
- package/assets/i18n/da.json +7 -1
- package/assets/i18n/de.json +8 -2
- package/assets/i18n/doi.json +9 -0
- package/assets/i18n/el.json +10 -2
- package/assets/i18n/en.json +21 -4
- package/assets/i18n/eo.json +9 -2
- package/assets/i18n/es.json +9 -2
- package/assets/i18n/et.json +8 -2
- package/assets/i18n/eu.json +9 -2
- package/assets/i18n/fa.json +10 -2
- package/assets/i18n/fi.json +9 -2
- package/assets/i18n/fr.json +9 -2
- package/assets/i18n/fy.json +6 -2
- package/assets/i18n/ga.json +10 -2
- package/assets/i18n/gd.json +9 -2
- package/assets/i18n/gl.json +8 -1
- package/assets/i18n/gu.json +11 -2
- package/assets/i18n/ha.json +7 -1
- package/assets/i18n/haw.json +8 -2
- package/assets/i18n/he.json +8 -0
- package/assets/i18n/hi.json +10 -2
- package/assets/i18n/hmn.json +6 -2
- package/assets/i18n/hr.json +10 -2
- package/assets/i18n/hu.json +10 -2
- package/assets/i18n/hy.json +11 -2
- package/assets/i18n/id.json +10 -2
- package/assets/i18n/ig.json +8 -1
- package/assets/i18n/ilo.json +6 -0
- package/assets/i18n/is.json +10 -2
- package/assets/i18n/it.json +9 -2
- package/assets/i18n/iw.json +9 -1
- package/assets/i18n/ja.json +8 -1
- package/assets/i18n/jw.json +8 -2
- package/assets/i18n/ka.json +10 -2
- package/assets/i18n/kk.json +10 -2
- package/assets/i18n/km.json +10 -2
- package/assets/i18n/kn.json +11 -2
- package/assets/i18n/ko.json +8 -1
- package/assets/i18n/kok.json +9 -0
- package/assets/i18n/ku.json +10 -2
- package/assets/i18n/ky.json +9 -1
- package/assets/i18n/la.json +6 -1
- package/assets/i18n/lb.json +6 -2
- package/assets/i18n/lo.json +10 -2
- package/assets/i18n/lt.json +10 -2
- package/assets/i18n/lv.json +10 -2
- package/assets/i18n/mai.json +9 -0
- package/assets/i18n/mg.json +8 -2
- package/assets/i18n/mi.json +8 -2
- package/assets/i18n/mk.json +10 -2
- package/assets/i18n/ml.json +11 -2
- package/assets/i18n/mn.json +10 -2
- package/assets/i18n/mr.json +11 -2
- package/assets/i18n/ms.json +9 -2
- package/assets/i18n/mt.json +9 -2
- package/assets/i18n/my.json +10 -2
- package/assets/i18n/ne.json +10 -2
- package/assets/i18n/nl.json +6 -2
- package/assets/i18n/no.json +8 -2
- package/assets/i18n/ny.json +9 -2
- package/assets/i18n/or.json +10 -1
- package/assets/i18n/pa.json +11 -2
- package/assets/i18n/pl.json +8 -2
- package/assets/i18n/ps.json +8 -1
- package/assets/i18n/pt.json +9 -2
- package/assets/i18n/ro.json +9 -2
- package/assets/i18n/ru.json +9 -2
- package/assets/i18n/sa.json +9 -0
- package/assets/i18n/sat.json +9 -0
- package/assets/i18n/sd.json +11 -2
- package/assets/i18n/si.json +10 -2
- package/assets/i18n/sk.json +6 -1
- package/assets/i18n/sl.json +10 -2
- package/assets/i18n/sm.json +7 -1
- package/assets/i18n/sn.json +6 -2
- package/assets/i18n/so.json +8 -1
- package/assets/i18n/sq.json +10 -2
- package/assets/i18n/sr.json +10 -2
- package/assets/i18n/st.json +8 -2
- package/assets/i18n/su.json +8 -2
- package/assets/i18n/sv.json +8 -2
- package/assets/i18n/sw.json +10 -2
- package/assets/i18n/ta.json +11 -2
- package/assets/i18n/te.json +11 -2
- package/assets/i18n/tg.json +11 -2
- package/assets/i18n/th.json +10 -1
- package/assets/i18n/tl.json +8 -2
- package/assets/i18n/tr.json +10 -2
- package/assets/i18n/uk.json +11 -2
- package/assets/i18n/ur.json +11 -2
- package/assets/i18n/uz.json +10 -2
- package/assets/i18n/vi.json +10 -1
- package/assets/i18n/xh.json +11 -2
- package/assets/i18n/yi.json +10 -1
- package/assets/i18n/yo.json +9 -1
- package/assets/i18n/zh.json +9 -1
- package/assets/i18n/zu.json +11 -2
- package/assets/index.json +1 -1
- package/fesm2022/magmonium-one-attribute-value-DMI0yJpL.mjs +255 -0
- package/fesm2022/magmonium-one-attribute-value-DMI0yJpL.mjs.map +1 -0
- package/fesm2022/magmonium-one-base-checkbox-C9dvZ2IH.mjs +77 -0
- package/fesm2022/magmonium-one-base-checkbox-C9dvZ2IH.mjs.map +1 -0
- package/fesm2022/magmonium-one-base-dropdown-U-cWl3p9.mjs +604 -0
- package/fesm2022/magmonium-one-base-dropdown-U-cWl3p9.mjs.map +1 -0
- package/fesm2022/magmonium-one-base-input-CLBOTOUs.mjs +183 -0
- package/fesm2022/magmonium-one-base-input-CLBOTOUs.mjs.map +1 -0
- package/fesm2022/magmonium-one-base-text-Zb0oLNRX.mjs +94 -0
- package/fesm2022/magmonium-one-base-text-Zb0oLNRX.mjs.map +1 -0
- package/fesm2022/magmonium-one-button-Bwzaxxn3.mjs +1281 -0
- package/fesm2022/magmonium-one-button-Bwzaxxn3.mjs.map +1 -0
- package/fesm2022/magmonium-one-checkbox-CPQ9m291.mjs +365 -0
- package/fesm2022/magmonium-one-checkbox-CPQ9m291.mjs.map +1 -0
- package/fesm2022/magmonium-one-color-utl-CAbZLKB5.mjs +449 -0
- package/fesm2022/magmonium-one-color-utl-CAbZLKB5.mjs.map +1 -0
- package/fesm2022/magmonium-one-directives-BVKX77zM.mjs +1285 -0
- package/fesm2022/magmonium-one-directives-BVKX77zM.mjs.map +1 -0
- package/fesm2022/magmonium-one-file.service-Bo06pU3_.mjs +65 -0
- package/fesm2022/magmonium-one-file.service-Bo06pU3_.mjs.map +1 -0
- package/fesm2022/magmonium-one-group-D4yYrVP3.mjs +428 -0
- package/fesm2022/magmonium-one-group-D4yYrVP3.mjs.map +1 -0
- package/fesm2022/magmonium-one-header-DmN8M1a3.mjs +380 -0
- package/fesm2022/magmonium-one-header-DmN8M1a3.mjs.map +1 -0
- package/fesm2022/magmonium-one-icon-Ep14YeRY.mjs +833 -0
- package/fesm2022/magmonium-one-icon-Ep14YeRY.mjs.map +1 -0
- package/fesm2022/magmonium-one-image-editor-BX4eNd4u.mjs +438 -0
- package/fesm2022/magmonium-one-image-editor-BX4eNd4u.mjs.map +1 -0
- package/fesm2022/magmonium-one-image-frame-BTSaUSAi.mjs +116 -0
- package/fesm2022/magmonium-one-image-frame-BTSaUSAi.mjs.map +1 -0
- package/fesm2022/magmonium-one-input-DqHPorA1.mjs +39 -0
- package/fesm2022/magmonium-one-input-DqHPorA1.mjs.map +1 -0
- package/fesm2022/magmonium-one-label-D2gjTbKX.mjs +574 -0
- package/fesm2022/magmonium-one-label-D2gjTbKX.mjs.map +1 -0
- package/fesm2022/magmonium-one-m-ref-Bq0gQbKE.mjs +147 -0
- package/fesm2022/magmonium-one-m-ref-Bq0gQbKE.mjs.map +1 -0
- package/fesm2022/magmonium-one-menu-BM9f2knw.mjs +887 -0
- package/fesm2022/magmonium-one-menu-BM9f2knw.mjs.map +1 -0
- package/fesm2022/magmonium-one-multi-range-a3ZVTy7i.mjs +458 -0
- package/fesm2022/magmonium-one-multi-range-a3ZVTy7i.mjs.map +1 -0
- package/fesm2022/magmonium-one-options-asset-CDEXIif6.mjs +97 -0
- package/fesm2022/magmonium-one-options-asset-CDEXIif6.mjs.map +1 -0
- package/fesm2022/magmonium-one-otp-DO4oTeSK.mjs +261 -0
- package/fesm2022/magmonium-one-otp-DO4oTeSK.mjs.map +1 -0
- package/fesm2022/magmonium-one-password-D3oTo41c.mjs +217 -0
- package/fesm2022/magmonium-one-password-D3oTo41c.mjs.map +1 -0
- package/fesm2022/magmonium-one-radio-CkaWESS3.mjs +111 -0
- package/fesm2022/magmonium-one-radio-CkaWESS3.mjs.map +1 -0
- package/fesm2022/magmonium-one-range-D_WEKrli.mjs +216 -0
- package/fesm2022/magmonium-one-range-D_WEKrli.mjs.map +1 -0
- package/fesm2022/magmonium-one-rolldown-runtime-DpJrqANO.mjs +11 -0
- package/fesm2022/magmonium-one-selector-BowevmOd.mjs +1065 -0
- package/fesm2022/magmonium-one-selector-BowevmOd.mjs.map +1 -0
- package/fesm2022/magmonium-one-size-converter-BfT0Aw0g.mjs +1060 -0
- package/fesm2022/magmonium-one-size-converter-BfT0Aw0g.mjs.map +1 -0
- package/fesm2022/magmonium-one-text-B4xKn-EQ.mjs +406 -0
- package/fesm2022/magmonium-one-text-B4xKn-EQ.mjs.map +1 -0
- package/fesm2022/magmonium-one-text-output-CfVeqYM7.mjs +296 -0
- package/fesm2022/magmonium-one-text-output-CfVeqYM7.mjs.map +1 -0
- package/fesm2022/magmonium-one-theme-Xgsx8bJs.mjs +1 -0
- package/fesm2022/magmonium-one-toggle-D2XEbN-b.mjs +231 -0
- package/fesm2022/magmonium-one-toggle-D2XEbN-b.mjs.map +1 -0
- package/fesm2022/magmonium-one.mjs +49250 -2
- package/fesm2022/magmonium-one.mjs.map +1 -1
- package/package.json +8 -8
- package/types/magmonium-one.d.ts +13909 -9533
- package/assets/menu/user_header.json +0 -27
- package/fesm2022/magmonium-one-image-editor-QPOy7XQt.mjs +0 -290
- package/fesm2022/magmonium-one-image-editor-QPOy7XQt.mjs.map +0 -1
- package/fesm2022/magmonium-one-magmonium-one-BTi-rHpF.mjs +0 -41583
- package/fesm2022/magmonium-one-magmonium-one-BTi-rHpF.mjs.map +0 -1
- package/fesm2022/magmonium-one-otp-BcNCgGpz.mjs +0 -201
- package/fesm2022/magmonium-one-otp-BcNCgGpz.mjs.map +0 -1
- package/fesm2022/magmonium-one-password-BDcSzmV_.mjs +0 -105
- package/fesm2022/magmonium-one-password-BDcSzmV_.mjs.map +0 -1
- package/fesm2022/magmonium-one-toggle-bLWTwEHE.mjs +0 -62
- package/fesm2022/magmonium-one-toggle-bLWTwEHE.mjs.map +0 -1
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"options": [
|
|
3
|
-
[
|
|
4
|
-
{
|
|
5
|
-
"id": "edit_profile",
|
|
6
|
-
"label": "edit-profile",
|
|
7
|
-
"icon": "user"
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
"id": "settings",
|
|
11
|
-
"label": "settings",
|
|
12
|
-
"icon": "gear"
|
|
13
|
-
}
|
|
14
|
-
],
|
|
15
|
-
[
|
|
16
|
-
{
|
|
17
|
-
"id": "logout",
|
|
18
|
-
"label": "logout",
|
|
19
|
-
"icon": "lock"
|
|
20
|
-
}
|
|
21
|
-
]
|
|
22
|
-
],
|
|
23
|
-
"icon": {
|
|
24
|
-
"name": "ellipsis-vertical"
|
|
25
|
-
},
|
|
26
|
-
"width": "220px"
|
|
27
|
-
}
|
|
@@ -1,290 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, inject, viewChild, signal, computed, effect, DestroyRef, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
-
import { M as MODAL_REF, a as MIN_ZOOM, I as InputType, b as MAX_ZOOM, p as parseRatio, o as outputSize, c as cropRect, i as initialFraming, e as encodeFramed, d as drawFramed, r as renameForType, f as clampFraming, B as ButtonComponent, H as HeaderComponent, R as RangeInputComponent } from './magmonium-one-magmonium-one-BTi-rHpF.mjs';
|
|
4
|
-
|
|
5
|
-
const WHEEL_ZOOM_RATE = 0.0015;
|
|
6
|
-
const distance = (a, b) => Math.hypot(a.x - b.x, a.y - b.y);
|
|
7
|
-
class ImageEditorComponent {
|
|
8
|
-
file = input.required(...(ngDevMode ? [{ debugName: "file" }] : /* istanbul ignore next */ []));
|
|
9
|
-
ratio = input.required(...(ngDevMode ? [{ debugName: "ratio" }] : /* istanbul ignore next */ []));
|
|
10
|
-
width = input.required(...(ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []));
|
|
11
|
-
#modalRef = inject(MODAL_REF);
|
|
12
|
-
stage = viewChild('stage', ...(ngDevMode ? [{ debugName: "stage" }] : /* istanbul ignore next */ []));
|
|
13
|
-
source = signal(undefined, ...(ngDevMode ? [{ debugName: "source" }] : /* istanbul ignore next */ []));
|
|
14
|
-
sourceUrl = signal(undefined, ...(ngDevMode ? [{ debugName: "sourceUrl" }] : /* istanbul ignore next */ []));
|
|
15
|
-
isApplying = signal(false, ...(ngDevMode ? [{ debugName: "isApplying" }] : /* istanbul ignore next */ []));
|
|
16
|
-
framing = signal({ cx: 0, cy: 0, zoom: MIN_ZOOM }, ...(ngDevMode ? [{ debugName: "framing" }] : /* istanbul ignore next */ []));
|
|
17
|
-
stageWidth = signal(0, ...(ngDevMode ? [{ debugName: "stageWidth" }] : /* istanbul ignore next */ []));
|
|
18
|
-
pointers = new Map();
|
|
19
|
-
isPanning = signal(false, ...(ngDevMode ? [{ debugName: "isPanning" }] : /* istanbul ignore next */ []));
|
|
20
|
-
#settled = false;
|
|
21
|
-
zoomConfig = computed(() => ({
|
|
22
|
-
name: 'zoom',
|
|
23
|
-
label: 'zoom',
|
|
24
|
-
type: InputType.RANGE,
|
|
25
|
-
min: MIN_ZOOM * 100,
|
|
26
|
-
max: MAX_ZOOM * 100,
|
|
27
|
-
}), ...(ngDevMode ? [{ debugName: "zoomConfig" }] : /* istanbul ignore next */ []));
|
|
28
|
-
aspect = computed(() => parseRatio(this.ratio()) ?? 1, ...(ngDevMode ? [{ debugName: "aspect" }] : /* istanbul ignore next */ []));
|
|
29
|
-
output = computed(() => outputSize(this.ratio(), this.width()), ...(ngDevMode ? [{ debugName: "output" }] : /* istanbul ignore next */ []));
|
|
30
|
-
sizeParams = computed(() => {
|
|
31
|
-
const size = this.output();
|
|
32
|
-
return {
|
|
33
|
-
width: String(size?.width ?? ''),
|
|
34
|
-
height: String(size?.height ?? ''),
|
|
35
|
-
};
|
|
36
|
-
}, ...(ngDevMode ? [{ debugName: "sizeParams" }] : /* istanbul ignore next */ []));
|
|
37
|
-
imageSize = computed(() => {
|
|
38
|
-
const bitmap = this.source();
|
|
39
|
-
return bitmap ? { width: bitmap.width, height: bitmap.height } : undefined;
|
|
40
|
-
}, ...(ngDevMode ? [{ debugName: "imageSize" }] : /* istanbul ignore next */ []));
|
|
41
|
-
zoomPercent = computed(() => String(Math.round(this.framing().zoom * 100)), ...(ngDevMode ? [{ debugName: "zoomPercent" }] : /* istanbul ignore next */ []));
|
|
42
|
-
/** The whole picture laid out so the box shows exactly the crop. */
|
|
43
|
-
imageBox = computed(() => {
|
|
44
|
-
const image = this.imageSize();
|
|
45
|
-
const stage = this.stageWidth();
|
|
46
|
-
if (!image || !stage)
|
|
47
|
-
return { width: 0, height: 0, transform: 'none' };
|
|
48
|
-
const rect = cropRect(image, this.aspect(), this.framing());
|
|
49
|
-
const scale = stage / rect.width;
|
|
50
|
-
return {
|
|
51
|
-
width: image.width * scale,
|
|
52
|
-
height: image.height * scale,
|
|
53
|
-
transform: `translate(${-rect.x * scale}px, ${-rect.y * scale}px)`,
|
|
54
|
-
};
|
|
55
|
-
}, ...(ngDevMode ? [{ debugName: "imageBox" }] : /* istanbul ignore next */ []));
|
|
56
|
-
load = effect((onCleanup) => {
|
|
57
|
-
const file = this.file();
|
|
58
|
-
let cancelled = false;
|
|
59
|
-
const url = URL.createObjectURL(file);
|
|
60
|
-
this.sourceUrl.set(url);
|
|
61
|
-
// EXIF orientation applied here, so the geometry below and the <img> the
|
|
62
|
-
// stage draws agree on which way is up.
|
|
63
|
-
createImageBitmap(file, { imageOrientation: 'from-image' })
|
|
64
|
-
.then((bitmap) => {
|
|
65
|
-
if (cancelled) {
|
|
66
|
-
bitmap.close();
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
this.framing.set(initialFraming({ width: bitmap.width, height: bitmap.height }));
|
|
70
|
-
this.source.set(bitmap);
|
|
71
|
-
})
|
|
72
|
-
.catch(() => {
|
|
73
|
-
if (!cancelled)
|
|
74
|
-
this.settle({ unreadable: true });
|
|
75
|
-
});
|
|
76
|
-
onCleanup(() => {
|
|
77
|
-
cancelled = true;
|
|
78
|
-
URL.revokeObjectURL(url);
|
|
79
|
-
this.source()?.close();
|
|
80
|
-
});
|
|
81
|
-
}, ...(ngDevMode ? [{ debugName: "load" }] : /* istanbul ignore next */ []));
|
|
82
|
-
measure = effect((onCleanup) => {
|
|
83
|
-
const stage = this.stage()?.nativeElement;
|
|
84
|
-
if (!stage)
|
|
85
|
-
return;
|
|
86
|
-
this.stageWidth.set(stage.clientWidth);
|
|
87
|
-
if (typeof ResizeObserver === 'undefined')
|
|
88
|
-
return;
|
|
89
|
-
const observer = new ResizeObserver(([entry]) => this.stageWidth.set(entry.contentRect.width));
|
|
90
|
-
observer.observe(stage);
|
|
91
|
-
onCleanup(() => observer.disconnect());
|
|
92
|
-
}, ...(ngDevMode ? [{ debugName: "measure" }] : /* istanbul ignore next */ []));
|
|
93
|
-
// The Modal's own close affordance destroys the body without a word, and a
|
|
94
|
-
// dismissal is a cancel: whoever opened the editor is still waiting.
|
|
95
|
-
reportDismissal = inject(DestroyRef).onDestroy(() => this.settle(undefined));
|
|
96
|
-
onPointerDown = (event) => {
|
|
97
|
-
if (!this.source())
|
|
98
|
-
return;
|
|
99
|
-
event.currentTarget.setPointerCapture?.(event.pointerId);
|
|
100
|
-
this.pointers.set(event.pointerId, { x: event.clientX, y: event.clientY });
|
|
101
|
-
this.isPanning.set(true);
|
|
102
|
-
};
|
|
103
|
-
onPointerMove = (event) => {
|
|
104
|
-
const previous = this.pointers.get(event.pointerId);
|
|
105
|
-
if (!previous)
|
|
106
|
-
return;
|
|
107
|
-
const next = { x: event.clientX, y: event.clientY };
|
|
108
|
-
const others = [...this.pointers.entries()].filter(([id]) => id !== event.pointerId);
|
|
109
|
-
if (others.length === 1) {
|
|
110
|
-
// Pinch: the gap between two fingers is the zoom.
|
|
111
|
-
const anchor = others[0][1];
|
|
112
|
-
const before = distance(previous, anchor);
|
|
113
|
-
if (before > 0)
|
|
114
|
-
this.zoomBy(distance(next, anchor) / before);
|
|
115
|
-
}
|
|
116
|
-
else if (others.length === 0) {
|
|
117
|
-
this.panBy(next.x - previous.x, next.y - previous.y);
|
|
118
|
-
}
|
|
119
|
-
this.pointers.set(event.pointerId, next);
|
|
120
|
-
};
|
|
121
|
-
onPointerUp = (event) => {
|
|
122
|
-
this.pointers.delete(event.pointerId);
|
|
123
|
-
this.isPanning.set(this.pointers.size > 0);
|
|
124
|
-
};
|
|
125
|
-
onWheel = (event) => {
|
|
126
|
-
if (!this.source())
|
|
127
|
-
return;
|
|
128
|
-
event.preventDefault();
|
|
129
|
-
this.zoomBy(Math.exp(-event.deltaY * WHEEL_ZOOM_RATE));
|
|
130
|
-
};
|
|
131
|
-
onZoom = (percent) => {
|
|
132
|
-
const zoom = Number(percent) / 100;
|
|
133
|
-
if (!Number.isFinite(zoom))
|
|
134
|
-
return;
|
|
135
|
-
this.updateFraming((framing) => ({ ...framing, zoom }));
|
|
136
|
-
};
|
|
137
|
-
apply = async () => {
|
|
138
|
-
const bitmap = this.source();
|
|
139
|
-
const image = this.imageSize();
|
|
140
|
-
const output = this.output();
|
|
141
|
-
if (!bitmap || !image || !output || this.isApplying())
|
|
142
|
-
return;
|
|
143
|
-
this.isApplying.set(true);
|
|
144
|
-
try {
|
|
145
|
-
const rect = cropRect(image, this.aspect(), this.framing());
|
|
146
|
-
const blob = await encodeFramed(drawFramed(bitmap, rect, output));
|
|
147
|
-
const original = this.file();
|
|
148
|
-
this.settle({
|
|
149
|
-
file: new File([blob], renameForType(original.name, blob.type), {
|
|
150
|
-
type: blob.type,
|
|
151
|
-
lastModified: Date.now(),
|
|
152
|
-
}),
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
catch {
|
|
156
|
-
this.settle({ unreadable: true });
|
|
157
|
-
}
|
|
158
|
-
};
|
|
159
|
-
/** Screen pixels dragged, moved into source pixels at the current scale. */
|
|
160
|
-
panBy = (dx, dy) => {
|
|
161
|
-
const image = this.imageSize();
|
|
162
|
-
const stage = this.stageWidth();
|
|
163
|
-
if (!image || !stage)
|
|
164
|
-
return;
|
|
165
|
-
const rect = cropRect(image, this.aspect(), this.framing());
|
|
166
|
-
const perPixel = rect.width / stage;
|
|
167
|
-
this.updateFraming((framing) => ({
|
|
168
|
-
...framing,
|
|
169
|
-
cx: framing.cx - dx * perPixel,
|
|
170
|
-
cy: framing.cy - dy * perPixel,
|
|
171
|
-
}));
|
|
172
|
-
};
|
|
173
|
-
zoomBy = (factor) => {
|
|
174
|
-
this.updateFraming((framing) => ({
|
|
175
|
-
...framing,
|
|
176
|
-
zoom: framing.zoom * factor,
|
|
177
|
-
}));
|
|
178
|
-
};
|
|
179
|
-
updateFraming = (change) => {
|
|
180
|
-
const image = this.imageSize();
|
|
181
|
-
if (!image)
|
|
182
|
-
return;
|
|
183
|
-
this.framing.update((framing) => clampFraming(image, this.aspect(), change(framing)));
|
|
184
|
-
};
|
|
185
|
-
settle = (result) => {
|
|
186
|
-
if (this.#settled)
|
|
187
|
-
return;
|
|
188
|
-
this.#settled = true;
|
|
189
|
-
this.#modalRef.close(result);
|
|
190
|
-
};
|
|
191
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ImageEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
192
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: ImageEditorComponent, isStandalone: true, selector: "m-image-editor", inputs: { file: { classPropertyName: "file", publicName: "file", isSignal: true, isRequired: true, transformFunction: null }, ratio: { classPropertyName: "ratio", publicName: "ratio", isSignal: true, isRequired: true, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "stage", first: true, predicate: ["stage"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
193
|
-
<div class="image-editor">
|
|
194
|
-
<m-header
|
|
195
|
-
[level]="3"
|
|
196
|
-
label="edit-image-size"
|
|
197
|
-
[params]="sizeParams()"
|
|
198
|
-
/>
|
|
199
|
-
<div
|
|
200
|
-
#stage
|
|
201
|
-
class="image-editor__stage"
|
|
202
|
-
[style.aspect-ratio]="aspect()"
|
|
203
|
-
[style.--m-image-editor-aspect]="aspect()"
|
|
204
|
-
[class.image-editor__stage--panning]="isPanning()"
|
|
205
|
-
(pointerdown)="onPointerDown($event)"
|
|
206
|
-
(pointermove)="onPointerMove($event)"
|
|
207
|
-
(pointerup)="onPointerUp($event)"
|
|
208
|
-
(pointercancel)="onPointerUp($event)"
|
|
209
|
-
(wheel)="onWheel($event)"
|
|
210
|
-
>
|
|
211
|
-
@if (sourceUrl(); as url) {
|
|
212
|
-
<img
|
|
213
|
-
class="image-editor__image"
|
|
214
|
-
[src]="url"
|
|
215
|
-
alt=""
|
|
216
|
-
draggable="false"
|
|
217
|
-
[style.width.px]="imageBox().width"
|
|
218
|
-
[style.height.px]="imageBox().height"
|
|
219
|
-
[style.transform]="imageBox().transform"
|
|
220
|
-
/>
|
|
221
|
-
}
|
|
222
|
-
</div>
|
|
223
|
-
<m-range
|
|
224
|
-
[config]="zoomConfig()"
|
|
225
|
-
[value]="zoomPercent()"
|
|
226
|
-
(valueChange)="onZoom($event)"
|
|
227
|
-
/>
|
|
228
|
-
<!-- asset: buttons/okay.yml. No cancel beside it: the Modal's own close
|
|
229
|
-
is the cancel, and it drops the image the same way. -->
|
|
230
|
-
<m-one-button
|
|
231
|
-
name="okay"
|
|
232
|
-
label="apply"
|
|
233
|
-
[disabled]="!source() || isApplying()"
|
|
234
|
-
(clicked)="apply()"
|
|
235
|
-
/>
|
|
236
|
-
</div>
|
|
237
|
-
`, isInline: true, styles: ["@keyframes toggle-pulse{0%,to{transform:scale(1)}50%{transform:scale(1.02)}}@keyframes thumb-slide{0%{transform:translate(0) scale(1)}50%{transform:translate(.3em) scale(.9)}to{transform:translate(.6em) scale(1)}}:host{display:block}.image-editor{display:flex;flex-direction:column;gap:1rem;width:100%;min-width:0;padding:1.5rem}.image-editor__stage{position:relative;width:100%;max-width:calc((90vh - 16rem) * var(--m-image-editor-aspect, 1));margin-inline:auto;overflow:hidden;border:1px solid var(--m-border);background:var(--m-background-lite);cursor:grab;touch-action:none;-webkit-user-select:none;user-select:none}.image-editor__stage--panning{cursor:grabbing}.image-editor__image{position:absolute;top:0;left:0;max-width:none;transform-origin:0 0;pointer-events:none}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "m-button,m-one-button", inputs: ["config", "color", "labelClass", "fullWidth", "nav", "navParams", "href", "disabled", "variant", "name", "baseUrl", "one", "remote", "label", "noTranslate", "params", "noNative", "icon", "isRightIcon", "iconOnly", "stacked", "imgSrc", "nonClickable", "inverted", "isSubmit", "tabindex"], outputs: ["configChange", "clicked"] }, { kind: "component", type: HeaderComponent, selector: "m-header", inputs: ["level", "label", "icon", "actionButton", "actionLabel", "noTranslate", "params"], outputs: ["actionClick"] }, { kind: "component", type: RangeInputComponent, selector: "m-range" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
238
|
-
}
|
|
239
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ImageEditorComponent, decorators: [{
|
|
240
|
-
type: Component,
|
|
241
|
-
args: [{ selector: 'm-image-editor', template: `
|
|
242
|
-
<div class="image-editor">
|
|
243
|
-
<m-header
|
|
244
|
-
[level]="3"
|
|
245
|
-
label="edit-image-size"
|
|
246
|
-
[params]="sizeParams()"
|
|
247
|
-
/>
|
|
248
|
-
<div
|
|
249
|
-
#stage
|
|
250
|
-
class="image-editor__stage"
|
|
251
|
-
[style.aspect-ratio]="aspect()"
|
|
252
|
-
[style.--m-image-editor-aspect]="aspect()"
|
|
253
|
-
[class.image-editor__stage--panning]="isPanning()"
|
|
254
|
-
(pointerdown)="onPointerDown($event)"
|
|
255
|
-
(pointermove)="onPointerMove($event)"
|
|
256
|
-
(pointerup)="onPointerUp($event)"
|
|
257
|
-
(pointercancel)="onPointerUp($event)"
|
|
258
|
-
(wheel)="onWheel($event)"
|
|
259
|
-
>
|
|
260
|
-
@if (sourceUrl(); as url) {
|
|
261
|
-
<img
|
|
262
|
-
class="image-editor__image"
|
|
263
|
-
[src]="url"
|
|
264
|
-
alt=""
|
|
265
|
-
draggable="false"
|
|
266
|
-
[style.width.px]="imageBox().width"
|
|
267
|
-
[style.height.px]="imageBox().height"
|
|
268
|
-
[style.transform]="imageBox().transform"
|
|
269
|
-
/>
|
|
270
|
-
}
|
|
271
|
-
</div>
|
|
272
|
-
<m-range
|
|
273
|
-
[config]="zoomConfig()"
|
|
274
|
-
[value]="zoomPercent()"
|
|
275
|
-
(valueChange)="onZoom($event)"
|
|
276
|
-
/>
|
|
277
|
-
<!-- asset: buttons/okay.yml. No cancel beside it: the Modal's own close
|
|
278
|
-
is the cancel, and it drops the image the same way. -->
|
|
279
|
-
<m-one-button
|
|
280
|
-
name="okay"
|
|
281
|
-
label="apply"
|
|
282
|
-
[disabled]="!source() || isApplying()"
|
|
283
|
-
(clicked)="apply()"
|
|
284
|
-
/>
|
|
285
|
-
</div>
|
|
286
|
-
`, imports: [ButtonComponent, HeaderComponent, RangeInputComponent], changeDetection: ChangeDetectionStrategy.OnPush, styles: ["@keyframes toggle-pulse{0%,to{transform:scale(1)}50%{transform:scale(1.02)}}@keyframes thumb-slide{0%{transform:translate(0) scale(1)}50%{transform:translate(.3em) scale(.9)}to{transform:translate(.6em) scale(1)}}:host{display:block}.image-editor{display:flex;flex-direction:column;gap:1rem;width:100%;min-width:0;padding:1.5rem}.image-editor__stage{position:relative;width:100%;max-width:calc((90vh - 16rem) * var(--m-image-editor-aspect, 1));margin-inline:auto;overflow:hidden;border:1px solid var(--m-border);background:var(--m-background-lite);cursor:grab;touch-action:none;-webkit-user-select:none;user-select:none}.image-editor__stage--panning{cursor:grabbing}.image-editor__image{position:absolute;top:0;left:0;max-width:none;transform-origin:0 0;pointer-events:none}\n"] }]
|
|
287
|
-
}], propDecorators: { file: [{ type: i0.Input, args: [{ isSignal: true, alias: "file", required: true }] }], ratio: [{ type: i0.Input, args: [{ isSignal: true, alias: "ratio", required: true }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: true }] }], stage: [{ type: i0.ViewChild, args: ['stage', { isSignal: true }] }] } });
|
|
288
|
-
|
|
289
|
-
export { ImageEditorComponent };
|
|
290
|
-
//# sourceMappingURL=magmonium-one-image-editor-QPOy7XQt.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"magmonium-one-image-editor-QPOy7XQt.mjs","sources":["../../../../libs/one/src/lib/shared/ui/input/ui/file-upload-input/image-editor.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n effect,\n ElementRef,\n inject,\n input,\n signal,\n viewChild,\n} from '@angular/core';\nimport { ButtonComponent } from '../../../button/ui/button';\nimport { HeaderComponent } from '../../../header';\nimport { RangeInputComponent } from '../range/range';\nimport { InputType, RangeInput } from '../../model/input';\nimport { MODAL_REF, ModalRef } from '../../../../config/modal-ref';\nimport {\n clampFraming,\n cropRect,\n drawFramed,\n encodeFramed,\n Framing,\n FrameSize,\n initialFraming,\n MAX_ZOOM,\n MIN_ZOOM,\n outputSize,\n parseRatio,\n renameForType,\n} from './image-frame';\n\n/**\n * What an ImageEditor closes with. The framed file on an apply, `unreadable`\n * when the picture never decoded, and neither for a dismissal — a flat object\n * rather than a union, so the web-component build (no `strict`) reads it too.\n */\nexport type ImageEditorResult = { file?: File; unreadable?: boolean };\n\ntype Point = { x: number; y: number };\n\nconst WHEEL_ZOOM_RATE = 0.0015;\n\nconst distance = (a: Point, b: Point): number =>\n Math.hypot(a.x - b.x, a.y - b.y);\n\n@Component({\n selector: 'm-image-editor',\n template: `\n <div class=\"image-editor\">\n <m-header\n [level]=\"3\"\n label=\"edit-image-size\"\n [params]=\"sizeParams()\"\n />\n <div\n #stage\n class=\"image-editor__stage\"\n [style.aspect-ratio]=\"aspect()\"\n [style.--m-image-editor-aspect]=\"aspect()\"\n [class.image-editor__stage--panning]=\"isPanning()\"\n (pointerdown)=\"onPointerDown($event)\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerup)=\"onPointerUp($event)\"\n (pointercancel)=\"onPointerUp($event)\"\n (wheel)=\"onWheel($event)\"\n >\n @if (sourceUrl(); as url) {\n <img\n class=\"image-editor__image\"\n [src]=\"url\"\n alt=\"\"\n draggable=\"false\"\n [style.width.px]=\"imageBox().width\"\n [style.height.px]=\"imageBox().height\"\n [style.transform]=\"imageBox().transform\"\n />\n }\n </div>\n <m-range\n [config]=\"zoomConfig()\"\n [value]=\"zoomPercent()\"\n (valueChange)=\"onZoom($event)\"\n />\n <!-- asset: buttons/okay.yml. No cancel beside it: the Modal's own close\n is the cancel, and it drops the image the same way. -->\n <m-one-button\n name=\"okay\"\n label=\"apply\"\n [disabled]=\"!source() || isApplying()\"\n (clicked)=\"apply()\"\n />\n </div>\n `,\n imports: [ButtonComponent, HeaderComponent, RangeInputComponent],\n styleUrl: './image-editor.sass',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ImageEditorComponent {\n readonly file = input.required<File>();\n readonly ratio = input.required<string>();\n readonly width = input.required<number>();\n\n readonly #modalRef = inject<ModalRef<ImageEditorResult | undefined>>(MODAL_REF);\n private readonly stage = viewChild<ElementRef<HTMLDivElement>>('stage');\n\n protected readonly source = signal<ImageBitmap | undefined>(undefined);\n protected readonly sourceUrl = signal<string | undefined>(undefined);\n protected readonly isApplying = signal(false);\n private readonly framing = signal<Framing>({ cx: 0, cy: 0, zoom: MIN_ZOOM });\n private readonly stageWidth = signal(0);\n private readonly pointers = new Map<number, Point>();\n protected readonly isPanning = signal(false);\n #settled = false;\n\n protected readonly zoomConfig = computed<RangeInput>(() => ({\n name: 'zoom',\n label: 'zoom',\n type: InputType.RANGE,\n min: MIN_ZOOM * 100,\n max: MAX_ZOOM * 100,\n }));\n\n protected readonly aspect = computed(() => parseRatio(this.ratio()) ?? 1);\n\n private readonly output = computed<FrameSize | undefined>(() =>\n outputSize(this.ratio(), this.width())\n );\n\n protected readonly sizeParams = computed(() => {\n const size = this.output();\n return {\n width: String(size?.width ?? ''),\n height: String(size?.height ?? ''),\n };\n });\n\n private readonly imageSize = computed<FrameSize | undefined>(() => {\n const bitmap = this.source();\n return bitmap ? { width: bitmap.width, height: bitmap.height } : undefined;\n });\n\n protected readonly zoomPercent = computed(() =>\n String(Math.round(this.framing().zoom * 100))\n );\n\n /** The whole picture laid out so the box shows exactly the crop. */\n protected readonly imageBox = computed(() => {\n const image = this.imageSize();\n const stage = this.stageWidth();\n if (!image || !stage) return { width: 0, height: 0, transform: 'none' };\n const rect = cropRect(image, this.aspect(), this.framing());\n const scale = stage / rect.width;\n return {\n width: image.width * scale,\n height: image.height * scale,\n transform: `translate(${-rect.x * scale}px, ${-rect.y * scale}px)`,\n };\n });\n\n private readonly load = effect((onCleanup) => {\n const file = this.file();\n let cancelled = false;\n const url = URL.createObjectURL(file);\n this.sourceUrl.set(url);\n // EXIF orientation applied here, so the geometry below and the <img> the\n // stage draws agree on which way is up.\n createImageBitmap(file, { imageOrientation: 'from-image' })\n .then((bitmap) => {\n if (cancelled) {\n bitmap.close();\n return;\n }\n this.framing.set(\n initialFraming({ width: bitmap.width, height: bitmap.height })\n );\n this.source.set(bitmap);\n })\n .catch(() => {\n if (!cancelled) this.settle({ unreadable: true });\n });\n onCleanup(() => {\n cancelled = true;\n URL.revokeObjectURL(url);\n this.source()?.close();\n });\n });\n\n private readonly measure = effect((onCleanup) => {\n const stage = this.stage()?.nativeElement;\n if (!stage) return;\n this.stageWidth.set(stage.clientWidth);\n if (typeof ResizeObserver === 'undefined') return;\n const observer = new ResizeObserver(([entry]) =>\n this.stageWidth.set(entry.contentRect.width)\n );\n observer.observe(stage);\n onCleanup(() => observer.disconnect());\n });\n\n // The Modal's own close affordance destroys the body without a word, and a\n // dismissal is a cancel: whoever opened the editor is still waiting.\n private readonly reportDismissal = inject(DestroyRef).onDestroy(() =>\n this.settle(undefined)\n );\n\n protected onPointerDown = (event: PointerEvent): void => {\n if (!this.source()) return;\n (event.currentTarget as HTMLElement).setPointerCapture?.(event.pointerId);\n this.pointers.set(event.pointerId, { x: event.clientX, y: event.clientY });\n this.isPanning.set(true);\n };\n\n protected onPointerMove = (event: PointerEvent): void => {\n const previous = this.pointers.get(event.pointerId);\n if (!previous) return;\n const next = { x: event.clientX, y: event.clientY };\n const others = [...this.pointers.entries()].filter(\n ([id]) => id !== event.pointerId\n );\n if (others.length === 1) {\n // Pinch: the gap between two fingers is the zoom.\n const anchor = others[0][1];\n const before = distance(previous, anchor);\n if (before > 0) this.zoomBy(distance(next, anchor) / before);\n } else if (others.length === 0) {\n this.panBy(next.x - previous.x, next.y - previous.y);\n }\n this.pointers.set(event.pointerId, next);\n };\n\n protected onPointerUp = (event: PointerEvent): void => {\n this.pointers.delete(event.pointerId);\n this.isPanning.set(this.pointers.size > 0);\n };\n\n protected onWheel = (event: WheelEvent): void => {\n if (!this.source()) return;\n event.preventDefault();\n this.zoomBy(Math.exp(-event.deltaY * WHEEL_ZOOM_RATE));\n };\n\n protected onZoom = (percent: string): void => {\n const zoom = Number(percent) / 100;\n if (!Number.isFinite(zoom)) return;\n this.updateFraming((framing) => ({ ...framing, zoom }));\n };\n\n protected apply = async (): Promise<void> => {\n const bitmap = this.source();\n const image = this.imageSize();\n const output = this.output();\n if (!bitmap || !image || !output || this.isApplying()) return;\n this.isApplying.set(true);\n try {\n const rect = cropRect(image, this.aspect(), this.framing());\n const blob = await encodeFramed(drawFramed(bitmap, rect, output));\n const original = this.file();\n this.settle({\n file: new File([blob], renameForType(original.name, blob.type), {\n type: blob.type,\n lastModified: Date.now(),\n }),\n });\n } catch {\n this.settle({ unreadable: true });\n }\n };\n\n /** Screen pixels dragged, moved into source pixels at the current scale. */\n private panBy = (dx: number, dy: number): void => {\n const image = this.imageSize();\n const stage = this.stageWidth();\n if (!image || !stage) return;\n const rect = cropRect(image, this.aspect(), this.framing());\n const perPixel = rect.width / stage;\n this.updateFraming((framing) => ({\n ...framing,\n cx: framing.cx - dx * perPixel,\n cy: framing.cy - dy * perPixel,\n }));\n };\n\n private zoomBy = (factor: number): void => {\n this.updateFraming((framing) => ({\n ...framing,\n zoom: framing.zoom * factor,\n }));\n };\n\n private updateFraming = (change: (framing: Framing) => Framing): void => {\n const image = this.imageSize();\n if (!image) return;\n this.framing.update((framing) =>\n clampFraming(image, this.aspect(), change(framing))\n );\n };\n\n private settle = (result: ImageEditorResult | undefined): void => {\n if (this.#settled) return;\n this.#settled = true;\n this.#modalRef.close(result);\n };\n}\n"],"names":[],"mappings":";;;;AAyCA,MAAM,eAAe,GAAG,MAAM;AAE9B,MAAM,QAAQ,GAAG,CAAC,CAAQ,EAAE,CAAQ,KAClC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;MAsDrB,oBAAoB,CAAA;AACtB,IAAA,IAAI,GAAG,KAAK,CAAC,QAAQ,0EAAQ;AAC7B,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,2EAAU;AAChC,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,2EAAU;AAEhC,IAAA,SAAS,GAAG,MAAM,CAA0C,SAAS,CAAC;AAC9D,IAAA,KAAK,GAAG,SAAS,CAA6B,OAAO,4EAAC;AAEpD,IAAA,MAAM,GAAG,MAAM,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