blessing-ui 0.1.0 → 0.3.0
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/CHANGELOG.md +69 -0
- package/README.md +139 -105
- package/dist/blessing-ui.css +97 -1
- package/dist/components/BlessAnnotator.css +1 -0
- package/dist/components/BlessAnnotator.js +6 -0
- package/dist/components/BlessAnnotator.vue.d.ts +71 -0
- package/dist/components/BlessAnnotator.vue_vue_type_script_setup_true_lang.js +264 -0
- package/dist/components/BlessAttachment.vue.d.ts +4 -1
- package/dist/components/BlessAttachment.vue_vue_type_script_setup_true_lang.js +3 -2
- package/dist/components/BlessCalendar.vue.d.ts +4 -0
- package/dist/components/BlessCalendar.vue_vue_type_script_setup_true_lang.js +65 -60
- package/dist/components/BlessCarousel.vue.d.ts +3 -0
- package/dist/components/BlessCarousel.vue_vue_type_script_setup_true_lang.js +10 -9
- package/dist/components/BlessCoachmark.css +1 -0
- package/dist/components/BlessCoachmark.js +6 -0
- package/dist/components/BlessCoachmark.vue.d.ts +40 -0
- package/dist/components/BlessCoachmark.vue_vue_type_script_setup_true_lang.js +74 -0
- package/dist/components/BlessCodeBlock.css +1 -0
- package/dist/components/BlessCodeBlock.js +6 -0
- package/dist/components/BlessCodeBlock.vue.d.ts +72 -0
- package/dist/components/BlessCodeBlock.vue_vue_type_script_setup_true_lang.js +140 -0
- package/dist/components/BlessCombobox.vue.d.ts +2 -0
- package/dist/components/BlessCombobox.vue_vue_type_script_setup_true_lang.js +3 -2
- package/dist/components/BlessCommand.css +1 -1
- package/dist/components/BlessCommand.vue.d.ts +26 -0
- package/dist/components/BlessCommand.vue_vue_type_script_setup_true_lang.js +137 -70
- package/dist/components/BlessConfetti.css +1 -0
- package/dist/components/BlessConfetti.js +6 -0
- package/dist/components/BlessConfetti.vue.d.ts +40 -0
- package/dist/components/BlessConfetti.vue_vue_type_script_setup_true_lang.js +77 -0
- package/dist/components/BlessCountUp.css +1 -0
- package/dist/components/BlessCountUp.js +6 -0
- package/dist/components/BlessCountUp.vue.d.ts +18 -0
- package/dist/components/BlessCountUp.vue_vue_type_script_setup_true_lang.js +49 -0
- package/dist/components/BlessCropper.css +1 -0
- package/dist/components/BlessCropper.js +6 -0
- package/dist/components/BlessCropper.vue.d.ts +70 -0
- package/dist/components/BlessCropper.vue_vue_type_script_setup_true_lang.js +220 -0
- package/dist/components/BlessDataTable.vue.d.ts +6 -0
- package/dist/components/BlessDataTable.vue_vue_type_script_setup_true_lang.js +56 -42
- package/dist/components/BlessDataView.vue.d.ts +7 -0
- package/dist/components/BlessDataView.vue_vue_type_script_setup_true_lang.js +38 -31
- package/dist/components/BlessDatePicker.vue.d.ts +3 -0
- package/dist/components/BlessDatePicker.vue_vue_type_script_setup_true_lang.js +46 -45
- package/dist/components/BlessDiff.css +1 -0
- package/dist/components/BlessDiff.js +6 -0
- package/dist/components/BlessDiff.vue.d.ts +22 -0
- package/dist/components/BlessDiff.vue_vue_type_script_setup_true_lang.js +148 -0
- package/dist/components/BlessDock.css +1 -0
- package/dist/components/BlessDock.js +6 -0
- package/dist/components/BlessDock.vue.d.ts +55 -0
- package/dist/components/BlessDock.vue_vue_type_script_setup_true_lang.js +100 -0
- package/dist/components/BlessEditor.vue.d.ts +2 -0
- package/dist/components/BlessEditor.vue_vue_type_script_setup_true_lang.js +23 -22
- package/dist/components/BlessFileInput.vue.d.ts +2 -0
- package/dist/components/BlessFileInput.vue_vue_type_script_setup_true_lang.js +3 -2
- package/dist/components/BlessFormula.css +1 -0
- package/dist/components/BlessFormula.js +6 -0
- package/dist/components/BlessFormula.vue.d.ts +53 -0
- package/dist/components/BlessFormula.vue_vue_type_script_setup_true_lang.js +111 -0
- package/dist/components/BlessGantt.css +1 -0
- package/dist/components/BlessGantt.js +6 -0
- package/dist/components/BlessGantt.vue.d.ts +81 -0
- package/dist/components/BlessGantt.vue_vue_type_script_setup_true_lang.js +276 -0
- package/dist/components/BlessGauge.css +1 -0
- package/dist/components/BlessGauge.js +6 -0
- package/dist/components/BlessGauge.vue.d.ts +36 -0
- package/dist/components/BlessGauge.vue_vue_type_script_setup_true_lang.js +100 -0
- package/dist/components/BlessHeatmapCalendar.css +1 -0
- package/dist/components/BlessHeatmapCalendar.js +6 -0
- package/dist/components/BlessHeatmapCalendar.vue.d.ts +38 -0
- package/dist/components/BlessHeatmapCalendar.vue_vue_type_script_setup_true_lang.js +146 -0
- package/dist/components/BlessHotspots.css +1 -0
- package/dist/components/BlessHotspots.js +6 -0
- package/dist/components/BlessHotspots.vue.d.ts +49 -0
- package/dist/components/BlessHotspots.vue_vue_type_script_setup_true_lang.js +127 -0
- package/dist/components/BlessInfiniteCanvas.css +1 -0
- package/dist/components/BlessInfiniteCanvas.js +6 -0
- package/dist/components/BlessInfiniteCanvas.vue.d.ts +91 -0
- package/dist/components/BlessInfiniteCanvas.vue_vue_type_script_setup_true_lang.js +232 -0
- package/dist/components/BlessInputNumber.vue.d.ts +5 -0
- package/dist/components/BlessInputNumber.vue_vue_type_script_setup_true_lang.js +39 -34
- package/dist/components/BlessKanban.css +1 -0
- package/dist/components/BlessKanban.js +6 -0
- package/dist/components/BlessKanban.vue.d.ts +67 -0
- package/dist/components/BlessKanban.vue_vue_type_script_setup_true_lang.js +195 -0
- package/dist/components/BlessLoadingBar.vue.d.ts +2 -0
- package/dist/components/BlessLoadingBar.vue_vue_type_script_setup_true_lang.js +8 -3
- package/dist/components/BlessLoupe.css +1 -0
- package/dist/components/BlessLoupe.js +6 -0
- package/dist/components/BlessLoupe.vue.d.ts +16 -0
- package/dist/components/BlessLoupe.vue_vue_type_script_setup_true_lang.js +93 -0
- package/dist/components/BlessMarquee.css +1 -0
- package/dist/components/BlessMarquee.js +6 -0
- package/dist/components/BlessMarquee.vue.d.ts +44 -0
- package/dist/components/BlessMarquee.vue_vue_type_script_setup_true_lang.js +69 -0
- package/dist/components/BlessMasonry.css +1 -0
- package/dist/components/BlessMasonry.js +6 -0
- package/dist/components/BlessMasonry.vue.d.ts +33 -0
- package/dist/components/BlessMasonry.vue_vue_type_script_setup_true_lang.js +79 -0
- package/dist/components/BlessMention.css +1 -0
- package/dist/components/BlessMention.js +6 -0
- package/dist/components/BlessMention.vue.d.ts +32 -0
- package/dist/components/BlessMention.vue_vue_type_script_setup_true_lang.js +116 -0
- package/dist/components/BlessNodeGraph.css +1 -0
- package/dist/components/BlessNodeGraph.js +6 -0
- package/dist/components/BlessNodeGraph.vue.d.ts +110 -0
- package/dist/components/BlessNodeGraph.vue_vue_type_script_setup_true_lang.js +321 -0
- package/dist/components/BlessOnboardingChecklist.css +1 -0
- package/dist/components/BlessOnboardingChecklist.js +6 -0
- package/dist/components/BlessOnboardingChecklist.vue.d.ts +72 -0
- package/dist/components/BlessOnboardingChecklist.vue_vue_type_script_setup_true_lang.js +157 -0
- package/dist/components/BlessOrderList.vue.d.ts +5 -0
- package/dist/components/BlessOrderList.vue_vue_type_script_setup_true_lang.js +62 -56
- package/dist/components/BlessPagination.vue.d.ts +2 -0
- package/dist/components/BlessPagination.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/components/BlessPickList.vue.d.ts +5 -0
- package/dist/components/BlessPickList.vue_vue_type_script_setup_true_lang.js +55 -49
- package/dist/components/BlessRadialMenu.css +1 -0
- package/dist/components/BlessRadialMenu.js +6 -0
- package/dist/components/BlessRadialMenu.vue.d.ts +45 -0
- package/dist/components/BlessRadialMenu.vue_vue_type_script_setup_true_lang.js +146 -0
- package/dist/components/BlessRangeCalendar.css +1 -0
- package/dist/components/BlessRangeCalendar.js +6 -0
- package/dist/components/BlessRangeCalendar.vue.d.ts +51 -0
- package/dist/components/BlessRangeCalendar.vue_vue_type_script_setup_true_lang.js +217 -0
- package/dist/components/BlessScheduler.css +1 -0
- package/dist/components/BlessScheduler.js +6 -0
- package/dist/components/BlessScheduler.vue.d.ts +95 -0
- package/dist/components/BlessScheduler.vue_vue_type_script_setup_true_lang.js +347 -0
- package/dist/components/BlessShortcutRecorder.css +1 -0
- package/dist/components/BlessShortcutRecorder.js +6 -0
- package/dist/components/BlessShortcutRecorder.vue.d.ts +39 -0
- package/dist/components/BlessShortcutRecorder.vue_vue_type_script_setup_true_lang.js +126 -0
- package/dist/components/BlessSignaturePad.vue.d.ts +1 -1
- package/dist/components/BlessSliderCaptcha.css +1 -0
- package/dist/components/BlessSliderCaptcha.js +6 -0
- package/dist/components/BlessSliderCaptcha.vue.d.ts +38 -0
- package/dist/components/BlessSliderCaptcha.vue_vue_type_script_setup_true_lang.js +146 -0
- package/dist/components/BlessSortable.css +1 -0
- package/dist/components/BlessSortable.js +6 -0
- package/dist/components/BlessSortable.vue.d.ts +51 -0
- package/dist/components/BlessSortable.vue_vue_type_script_setup_true_lang.js +135 -0
- package/dist/components/BlessSparkline.css +1 -0
- package/dist/components/BlessSparkline.js +6 -0
- package/dist/components/BlessSparkline.vue.d.ts +28 -0
- package/dist/components/BlessSparkline.vue_vue_type_script_setup_true_lang.js +107 -0
- package/dist/components/BlessSplitView.css +1 -0
- package/dist/components/BlessSplitView.js +6 -0
- package/dist/components/BlessSplitView.vue.d.ts +61 -0
- package/dist/components/BlessSplitView.vue_vue_type_script_setup_true_lang.js +92 -0
- package/dist/components/BlessSteps.vue.d.ts +2 -0
- package/dist/components/BlessSteps.vue_vue_type_script_setup_true_lang.js +3 -2
- package/dist/components/BlessSwipeDeck.css +1 -0
- package/dist/components/BlessSwipeDeck.js +6 -0
- package/dist/components/BlessSwipeDeck.vue.d.ts +46 -0
- package/dist/components/BlessSwipeDeck.vue_vue_type_script_setup_true_lang.js +200 -0
- package/dist/components/BlessTimer.css +1 -0
- package/dist/components/BlessTimer.js +6 -0
- package/dist/components/BlessTimer.vue.d.ts +74 -0
- package/dist/components/BlessTimer.vue_vue_type_script_setup_true_lang.js +139 -0
- package/dist/components/BlessTour.vue.d.ts +1 -0
- package/dist/components/BlessTour.vue_vue_type_script_setup_true_lang.js +48 -42
- package/dist/components/BlessTreemap.css +1 -0
- package/dist/components/BlessTreemap.js +6 -0
- package/dist/components/BlessTreemap.vue.d.ts +46 -0
- package/dist/components/BlessTreemap.vue_vue_type_script_setup_true_lang.js +137 -0
- package/dist/components/BlessUploader.vue.d.ts +11 -0
- package/dist/components/BlessUploader.vue_vue_type_script_setup_true_lang.js +80 -69
- package/dist/composables/annotate.d.ts +35 -0
- package/dist/composables/annotate.js +33 -0
- package/dist/composables/canvasView.d.ts +21 -0
- package/dist/composables/canvasView.js +23 -0
- package/dist/composables/confetti.d.ts +32 -0
- package/dist/composables/confetti.js +23 -0
- package/dist/composables/cropBox.d.ts +22 -0
- package/dist/composables/cropBox.js +39 -0
- package/dist/composables/dayBlocks.d.ts +11 -0
- package/dist/composables/dayBlocks.js +26 -0
- package/dist/composables/diffLines.d.ts +10 -0
- package/dist/composables/diffLines.js +55 -0
- package/dist/composables/formula.d.ts +28 -0
- package/dist/composables/formula.js +161 -0
- package/dist/composables/graph.d.ts +19 -0
- package/dist/composables/graph.js +16 -0
- package/dist/composables/radial.d.ts +15 -0
- package/dist/composables/radial.js +22 -0
- package/dist/composables/schedule.d.ts +27 -0
- package/dist/composables/schedule.js +54 -0
- package/dist/composables/shortcut.d.ts +12 -0
- package/dist/composables/shortcut.js +35 -0
- package/dist/composables/treemap.d.ts +23 -0
- package/dist/composables/treemap.js +77 -0
- package/dist/composables/useAutoScroll.d.ts +15 -0
- package/dist/composables/useAutoScroll.js +32 -0
- package/dist/composables/useSortable.d.ts +58 -0
- package/dist/composables/useSortable.js +107 -0
- package/dist/index.d.ts +62 -1
- package/dist/index.js +93 -53
- package/package.json +22 -18
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
import e from "./BlessModal.js";
|
|
2
2
|
import t from "./BlessKbd.js";
|
|
3
|
-
import { Fragment as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, defineComponent as l, mergeModels as u, mergeProps as d, nextTick as f, normalizeClass as p, onBeforeUnmount as m, onMounted as h, openBlock as g, ref as _, renderList as v, renderSlot as y, resolveDynamicComponent as
|
|
3
|
+
import { Fragment as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, defineComponent as l, mergeModels as u, mergeProps as d, nextTick as f, normalizeClass as p, onBeforeUnmount as m, onMounted as h, openBlock as g, ref as _, renderList as v, renderSlot as y, resolveDynamicComponent as ee, toDisplayString as b, unref as x, useId as S, useModel as C, vModelText as w, watch as T, withCtx as E, withDirectives as te } from "vue";
|
|
4
4
|
//#region src/components/BlessCommand.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
var
|
|
5
|
+
var ne = { class: "bless-command__box" }, re = { class: "bless-command__search bless-lean--field" }, ie = ["title", "aria-label"], ae = [
|
|
6
6
|
"placeholder",
|
|
7
7
|
"aria-label",
|
|
8
8
|
"aria-controls",
|
|
9
|
-
"aria-activedescendant"
|
|
10
|
-
|
|
9
|
+
"aria-activedescendant",
|
|
10
|
+
"aria-describedby"
|
|
11
|
+
], oe = ["id"], D = ["id", "aria-label"], O = ["aria-labelledby"], se = ["id"], ce = [
|
|
11
12
|
"id",
|
|
12
13
|
"aria-selected",
|
|
13
14
|
"aria-disabled",
|
|
14
15
|
"onMousemove",
|
|
15
16
|
"onClick"
|
|
16
|
-
],
|
|
17
|
+
], k = {
|
|
17
18
|
class: "bless-command__mark",
|
|
18
19
|
"aria-hidden": "true"
|
|
19
|
-
},
|
|
20
|
+
}, le = { class: "bless-command__label" }, ue = {
|
|
20
21
|
class: "bless-command__empty",
|
|
21
22
|
role: "status"
|
|
22
|
-
},
|
|
23
|
-
key:
|
|
23
|
+
}, de = {
|
|
24
|
+
key: 1,
|
|
24
25
|
class: "bless-command__footer"
|
|
25
|
-
},
|
|
26
|
+
}, A = /*@__PURE__*/ l({
|
|
26
27
|
name: "BlessCommand",
|
|
27
28
|
__name: "BlessCommand",
|
|
28
29
|
props: /*@__PURE__*/ u({
|
|
@@ -35,120 +36,186 @@ var k = { class: "bless-command__box" }, A = { class: "bless-command__search ble
|
|
|
35
36
|
default: !0
|
|
36
37
|
},
|
|
37
38
|
inline: { type: Boolean },
|
|
38
|
-
filter: {}
|
|
39
|
+
filter: {},
|
|
40
|
+
scopes: {},
|
|
41
|
+
recent: { type: Boolean },
|
|
42
|
+
recentLimit: { default: 5 },
|
|
43
|
+
persist: {},
|
|
44
|
+
labels: {}
|
|
39
45
|
}, {
|
|
40
46
|
open: {
|
|
41
47
|
type: Boolean,
|
|
42
48
|
default: !1
|
|
43
49
|
},
|
|
44
|
-
openModifiers: {}
|
|
50
|
+
openModifiers: {},
|
|
51
|
+
history: { default: () => [] },
|
|
52
|
+
historyModifiers: {}
|
|
45
53
|
}),
|
|
46
|
-
emits: /*@__PURE__*/ u(["select"], ["update:open"]),
|
|
54
|
+
emits: /*@__PURE__*/ u(["select"], ["update:open", "update:history"]),
|
|
47
55
|
setup(l, { emit: u }) {
|
|
48
|
-
let
|
|
56
|
+
let A = l, j = r(() => ({
|
|
57
|
+
recent: "Recent",
|
|
58
|
+
scope: (e) => `Only in ${e}`,
|
|
59
|
+
clearScope: "Search everywhere",
|
|
60
|
+
scopeHint: (e) => `Type ${e.join(", ")}`,
|
|
61
|
+
...A.labels
|
|
62
|
+
})), M = C(l, "open"), N = C(l, "history"), P = u, F = S(), I = _(""), L = _(0), R = _(), z = (e, t) => {
|
|
49
63
|
let n = [e.label, ...e.keywords ?? []].join(" ").toLowerCase();
|
|
50
64
|
return t.split(/\s+/).every((e) => n.includes(e));
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
65
|
+
}, B = _(null);
|
|
66
|
+
T(I, (e) => {
|
|
67
|
+
if (B.value || !A.scopes?.length) return;
|
|
68
|
+
let t = A.scopes.find((t) => e.startsWith(t.key));
|
|
69
|
+
t && (B.value = t, I.value = e.slice(t.key.length).replace(/^\s+/, ""));
|
|
70
|
+
});
|
|
71
|
+
let V = (e) => e.label ?? e.group;
|
|
72
|
+
function fe() {
|
|
73
|
+
B.value = null, f(() => R.value?.focus());
|
|
74
|
+
}
|
|
75
|
+
let H = r(() => A.scopes?.length && !B.value ? j.value.scopeHint(A.scopes.map((e) => `${e.key} ${V(e)}`)) : ""), U = r(() => {
|
|
76
|
+
let e = I.value.trim().toLowerCase(), t = A.filter ?? z;
|
|
77
|
+
return (B.value ? A.items.filter((e) => e.group === B.value.group) : A.items).filter((n) => !e || t(n, e));
|
|
78
|
+
}), W = r(() => !A.recent || I.value.trim() || B.value ? [] : N.value.map((e) => A.items.find((t) => t.value === e && !t.disabled)).filter((e) => !!e).slice(0, A.recentLimit)), G = r(() => {
|
|
55
79
|
let e = /* @__PURE__ */ new Map();
|
|
56
|
-
for (let t of
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
80
|
+
for (let t of U.value) e.set(t.group ?? "", [...e.get(t.group ?? "") ?? [], t]);
|
|
81
|
+
let t = [...e.entries()].map(([e, t]) => ({
|
|
82
|
+
key: e,
|
|
83
|
+
label: e,
|
|
84
|
+
items: t,
|
|
85
|
+
recent: !1
|
|
86
|
+
}));
|
|
87
|
+
return W.value.length && t.unshift({
|
|
88
|
+
key: "\0recent",
|
|
89
|
+
label: j.value.recent,
|
|
90
|
+
items: W.value,
|
|
91
|
+
recent: !0
|
|
92
|
+
}), t;
|
|
93
|
+
}), K = r(() => G.value.flatMap((e) => e.items)), q = (e, t) => `${F}-${t ? "r-" : ""}${e.value}`, J = r(() => {
|
|
94
|
+
let e = 0;
|
|
95
|
+
for (let t of G.value) for (let n of t.items) if (e++ === L.value) return q(n, t.recent);
|
|
96
|
+
}), Y = (e) => G.value.slice(0, e).reduce((e, t) => e + t.items.length, 0);
|
|
97
|
+
T(U, () => L.value = Math.max(0, K.value.findIndex((e) => !e.disabled))), T(B, () => L.value = Math.max(0, K.value.findIndex((e) => !e.disabled))), T(M, (e) => {
|
|
98
|
+
e && (I.value = "", B.value = null, f(() => f(() => R.value?.focus())));
|
|
61
99
|
});
|
|
62
|
-
function
|
|
63
|
-
let t =
|
|
100
|
+
function X(e) {
|
|
101
|
+
let t = K.value.length;
|
|
64
102
|
if (!t) return;
|
|
65
|
-
let n =
|
|
66
|
-
for (let r = 0; r < t && (n = (n + e + t) % t,
|
|
67
|
-
|
|
103
|
+
let n = L.value;
|
|
104
|
+
for (let r = 0; r < t && (n = (n + e + t) % t, K.value[n].disabled); r++);
|
|
105
|
+
L.value = n, f(() => document.getElementById(J.value ?? "")?.scrollIntoView?.({ block: "nearest" }));
|
|
106
|
+
}
|
|
107
|
+
let Z = r(() => A.persist ? `bless-command:${A.persist}` : null);
|
|
108
|
+
function pe(e) {
|
|
109
|
+
if (!A.recent) return;
|
|
110
|
+
let t = [e.value, ...N.value.filter((t) => t !== e.value)].slice(0, 20);
|
|
111
|
+
N.value = t;
|
|
112
|
+
try {
|
|
113
|
+
Z.value && localStorage.setItem(Z.value, JSON.stringify(t));
|
|
114
|
+
} catch {}
|
|
68
115
|
}
|
|
69
|
-
function Q(e =
|
|
70
|
-
e && !e.disabled && (
|
|
116
|
+
function Q(e = K.value[L.value]) {
|
|
117
|
+
e && !e.disabled && (pe(e), P("select", e), A.inline || (M.value = !1));
|
|
71
118
|
}
|
|
72
|
-
function
|
|
73
|
-
e.key === "ArrowDown" ? (e.preventDefault(),
|
|
119
|
+
function me(e) {
|
|
120
|
+
e.key === "ArrowDown" ? (e.preventDefault(), X(1)) : e.key === "ArrowUp" ? (e.preventDefault(), X(-1)) : e.key === "Enter" ? (e.preventDefault(), Q()) : e.key === "Backspace" && !I.value && B.value ? (e.preventDefault(), B.value = null) : e.key === "Home" ? (e.preventDefault(), L.value = 0) : e.key === "End" && (e.preventDefault(), L.value = K.value.length - 1);
|
|
74
121
|
}
|
|
75
122
|
function $(e) {
|
|
76
|
-
e.target?.closest?.("[contenteditable]:not([contenteditable=\"false\"])") ||
|
|
123
|
+
e.target?.closest?.("[contenteditable]:not([contenteditable=\"false\"])") || A.hotkey && !A.inline && (e.metaKey || e.ctrlKey) && e.key.toLowerCase() === "k" && (e.preventDefault(), M.value = !M.value);
|
|
77
124
|
}
|
|
78
|
-
return h(() =>
|
|
79
|
-
|
|
80
|
-
|
|
125
|
+
return h(() => {
|
|
126
|
+
addEventListener("keydown", $);
|
|
127
|
+
try {
|
|
128
|
+
let e = Z.value && localStorage.getItem(Z.value), t = e ? JSON.parse(e) : null;
|
|
129
|
+
Array.isArray(t) && !N.value.length && (N.value = t.filter((e) => typeof e == "string"));
|
|
130
|
+
} catch {}
|
|
131
|
+
}), m(() => removeEventListener("keydown", $)), (r, u) => (g(), i(ee(l.inline ? "div" : e), d(l.inline ? {} : {
|
|
132
|
+
modelValue: M.value,
|
|
133
|
+
"onUpdate:modelValue": (e) => M.value = e,
|
|
81
134
|
size: "md"
|
|
82
135
|
}, { class: ["bless-command", { "bless-command--inline": l.inline }] }), {
|
|
83
|
-
default:
|
|
84
|
-
s("div",
|
|
85
|
-
u[
|
|
136
|
+
default: E(() => [s("div", ne, [
|
|
137
|
+
s("div", re, [
|
|
138
|
+
u[3] ||= s("span", {
|
|
86
139
|
class: "bless-command__icon",
|
|
87
140
|
"aria-hidden": "true"
|
|
88
141
|
}, "⌕", -1),
|
|
89
|
-
|
|
142
|
+
B.value ? (g(), o("button", {
|
|
143
|
+
key: 0,
|
|
144
|
+
type: "button",
|
|
145
|
+
class: "bless-command__scope",
|
|
146
|
+
title: j.value.clearScope,
|
|
147
|
+
"aria-label": `${j.value.scope(V(B.value))}. ${j.value.clearScope}`,
|
|
148
|
+
onClick: fe
|
|
149
|
+
}, [c(b(V(B.value)) + " ", 1), u[1] ||= s("span", { "aria-hidden": "true" }, "×", -1)], 8, ie)) : a("", !0),
|
|
150
|
+
te(s("input", {
|
|
90
151
|
ref_key: "input",
|
|
91
|
-
ref:
|
|
92
|
-
"onUpdate:modelValue": u[0] ||= (e) =>
|
|
152
|
+
ref: R,
|
|
153
|
+
"onUpdate:modelValue": u[0] ||= (e) => I.value = e,
|
|
93
154
|
type: "text",
|
|
94
155
|
class: "bless-command__input",
|
|
95
156
|
placeholder: l.placeholder,
|
|
96
157
|
role: "combobox",
|
|
97
|
-
"aria-label": l.label,
|
|
158
|
+
"aria-label": B.value ? `${l.label}: ${j.value.scope(V(B.value))}` : l.label,
|
|
98
159
|
"aria-autocomplete": "list",
|
|
99
160
|
"aria-expanded": !0,
|
|
100
|
-
"aria-controls": `${
|
|
101
|
-
"aria-activedescendant":
|
|
161
|
+
"aria-controls": `${x(F)}-list`,
|
|
162
|
+
"aria-activedescendant": J.value,
|
|
163
|
+
"aria-describedby": H.value ? `${x(F)}-hint` : void 0,
|
|
102
164
|
autocomplete: "off",
|
|
103
165
|
spellcheck: "false",
|
|
104
|
-
onKeydown:
|
|
105
|
-
}, null, 40,
|
|
106
|
-
l.inline ? a("", !0) : (g(), i(t, { key:
|
|
107
|
-
default:
|
|
166
|
+
onKeydown: me
|
|
167
|
+
}, null, 40, ae), [[w, I.value]]),
|
|
168
|
+
l.inline ? a("", !0) : (g(), i(t, { key: 1 }, {
|
|
169
|
+
default: E(() => [...u[2] ||= [c("Esc", -1)]]),
|
|
108
170
|
_: 1
|
|
109
171
|
}))
|
|
110
172
|
]),
|
|
173
|
+
H.value ? (g(), o("p", {
|
|
174
|
+
key: 0,
|
|
175
|
+
id: `${x(F)}-hint`,
|
|
176
|
+
class: "bless-command__hint"
|
|
177
|
+
}, b(H.value), 9, oe)) : a("", !0),
|
|
111
178
|
s("div", {
|
|
112
|
-
id: `${
|
|
179
|
+
id: `${x(F)}-list`,
|
|
113
180
|
class: "bless-command__list",
|
|
114
181
|
role: "listbox",
|
|
115
182
|
"aria-label": l.label
|
|
116
|
-
}, [(g(!0), o(n, null, v(
|
|
117
|
-
key: e,
|
|
183
|
+
}, [(g(!0), o(n, null, v(G.value, (e, l) => (g(), o("div", {
|
|
184
|
+
key: e.key,
|
|
118
185
|
role: "group",
|
|
119
|
-
"aria-labelledby": e ? `${
|
|
186
|
+
"aria-labelledby": e.label ? `${x(F)}-g-${l}` : void 0,
|
|
120
187
|
class: "bless-command__section"
|
|
121
|
-
}, [e ? (g(), o("div", {
|
|
188
|
+
}, [e.label ? (g(), o("div", {
|
|
122
189
|
key: 0,
|
|
123
|
-
id: `${
|
|
190
|
+
id: `${x(F)}-g-${l}`,
|
|
124
191
|
class: "bless-command__group",
|
|
125
192
|
"aria-hidden": "true"
|
|
126
|
-
},
|
|
127
|
-
key:
|
|
128
|
-
id:
|
|
129
|
-
class: p(["bless-command__item", { "bless-command__item--active":
|
|
193
|
+
}, b(e.label), 9, se)) : a("", !0), (g(!0), o(n, null, v(e.items, (n, u) => (g(), o("div", {
|
|
194
|
+
key: n.value,
|
|
195
|
+
id: q(n, e.recent),
|
|
196
|
+
class: p(["bless-command__item", { "bless-command__item--active": L.value === Y(l) + u }]),
|
|
130
197
|
role: "option",
|
|
131
|
-
"aria-selected":
|
|
132
|
-
"aria-disabled":
|
|
133
|
-
onMousemove: (
|
|
134
|
-
onClick: (
|
|
198
|
+
"aria-selected": L.value === Y(l) + u,
|
|
199
|
+
"aria-disabled": n.disabled || void 0,
|
|
200
|
+
onMousemove: (e) => L.value = Y(l) + u,
|
|
201
|
+
onClick: (e) => Q(n)
|
|
135
202
|
}, [
|
|
136
|
-
s("span",
|
|
137
|
-
s("span",
|
|
138
|
-
|
|
203
|
+
s("span", k, b(n.icon ?? ""), 1),
|
|
204
|
+
s("span", le, [y(r.$slots, "item", { item: n }, () => [c(b(n.label), 1)])]),
|
|
205
|
+
n.shortcut ? (g(), i(t, {
|
|
139
206
|
key: 0,
|
|
140
207
|
class: "bless-command__shortcut"
|
|
141
208
|
}, {
|
|
142
|
-
default:
|
|
209
|
+
default: E(() => [c(b(n.shortcut), 1)]),
|
|
143
210
|
_: 2
|
|
144
211
|
}, 1024)) : a("", !0)
|
|
145
|
-
], 42,
|
|
146
|
-
s("p",
|
|
147
|
-
r.$slots.footer ? (g(), o("div",
|
|
212
|
+
], 42, ce))), 128))], 8, O))), 128))], 8, D),
|
|
213
|
+
s("p", ue, b(K.value.length ? "" : l.emptyText), 1),
|
|
214
|
+
r.$slots.footer ? (g(), o("div", de, [y(r.$slots, "footer")])) : a("", !0)
|
|
148
215
|
])]),
|
|
149
216
|
_: 3
|
|
150
217
|
}, 16, ["class"]));
|
|
151
218
|
}
|
|
152
219
|
});
|
|
153
220
|
//#endregion
|
|
154
|
-
export {
|
|
221
|
+
export { A as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.bless-confetti{pointer-events:none;width:100vw;height:100vh;z-index:calc(var(--bless-z-modal) + 1);position:fixed;inset:0}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** pieces per burst */
|
|
3
|
+
count?: number;
|
|
4
|
+
/** token names (`chart-2`, `accent`…) or CSS colours */
|
|
5
|
+
colors?: string[];
|
|
6
|
+
/** milliseconds until the last piece has faded */
|
|
7
|
+
duration?: number;
|
|
8
|
+
/** width of the cone the pieces leave in, degrees; 360 is all around */
|
|
9
|
+
spread?: number;
|
|
10
|
+
/** launch strength, px per second */
|
|
11
|
+
power?: number;
|
|
12
|
+
gravity?: number;
|
|
13
|
+
};
|
|
14
|
+
declare function stop(): void;
|
|
15
|
+
/**
|
|
16
|
+
* Throw a burst. `from` is a point in viewport px or an element to burst out of (default: the
|
|
17
|
+
* middle of the window); `angle` points the cone (default straight up). Does nothing under
|
|
18
|
+
* `prefers-reduced-motion`.
|
|
19
|
+
*/
|
|
20
|
+
declare function fire(from?: {
|
|
21
|
+
x: number;
|
|
22
|
+
y: number;
|
|
23
|
+
} | HTMLElement, angle?: number): undefined;
|
|
24
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {
|
|
25
|
+
fire: typeof fire;
|
|
26
|
+
stop: typeof stop;
|
|
27
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
28
|
+
done: () => any;
|
|
29
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
30
|
+
onDone?: (() => any) | undefined;
|
|
31
|
+
}>, {
|
|
32
|
+
duration: number;
|
|
33
|
+
count: number;
|
|
34
|
+
colors: string[];
|
|
35
|
+
spread: number;
|
|
36
|
+
power: number;
|
|
37
|
+
gravity: number;
|
|
38
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
39
|
+
declare const _default: typeof __VLS_export;
|
|
40
|
+
export default _default;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { reducedMotion as e } from "../composables/useMedia.js";
|
|
2
|
+
import { burst as t, step as n } from "../composables/confetti.js";
|
|
3
|
+
import { createElementBlock as r, defineComponent as i, onBeforeUnmount as a, openBlock as o, ref as s } from "vue";
|
|
4
|
+
//#region src/components/BlessConfetti.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var c = /*@__PURE__*/ i({
|
|
6
|
+
name: "BlessConfetti",
|
|
7
|
+
__name: "BlessConfetti",
|
|
8
|
+
props: {
|
|
9
|
+
count: { default: 90 },
|
|
10
|
+
colors: { default: () => [
|
|
11
|
+
"chart-1",
|
|
12
|
+
"chart-2",
|
|
13
|
+
"chart-3",
|
|
14
|
+
"chart-4",
|
|
15
|
+
"chart-5",
|
|
16
|
+
"warning"
|
|
17
|
+
] },
|
|
18
|
+
duration: { default: 2200 },
|
|
19
|
+
spread: { default: 80 },
|
|
20
|
+
power: { default: 900 },
|
|
21
|
+
gravity: { default: 1400 }
|
|
22
|
+
},
|
|
23
|
+
emits: ["done"],
|
|
24
|
+
setup(i, { expose: c, emit: l }) {
|
|
25
|
+
let u = i, d = l, f = s(), p = [], m = 0, h = 0, g = (e) => /^[a-z0-9-]+$/i.test(e) && f.value && getComputedStyle(f.value).getPropertyValue(`--bless-color-${e}`).trim() || e;
|
|
26
|
+
function _(e) {
|
|
27
|
+
let t = f.value, r = t?.getContext("2d");
|
|
28
|
+
if (!t || !r) return v();
|
|
29
|
+
let i = Math.min(.05, (e - h) / 1e3);
|
|
30
|
+
h = e, r.clearRect(0, 0, t.width, t.height);
|
|
31
|
+
let a = window.devicePixelRatio || 1;
|
|
32
|
+
for (let e of p) n(e, i, u.gravity, u.duration / 1e3), !(e.life <= 0) && (r.save(), r.globalAlpha = Math.min(1, e.life * 3), r.fillStyle = e.color, r.translate(e.x * a, e.y * a), r.rotate(e.rot), e.round ? (r.beginPath(), r.arc(0, 0, e.size * a / 2, 0, Math.PI * 2), r.fill()) : r.fillRect(-e.size * a / 2, -e.size * a / 3, e.size * a, e.size * a / 1.6), r.restore());
|
|
33
|
+
p = p.filter((e) => e.life > 0 && e.y < window.innerHeight + 40), p.length ? m = requestAnimationFrame(_) : (v(), d("done"));
|
|
34
|
+
}
|
|
35
|
+
function v() {
|
|
36
|
+
cancelAnimationFrame(m), m = 0, p = [];
|
|
37
|
+
let e = f.value;
|
|
38
|
+
e?.getContext("2d")?.clearRect(0, 0, e.width, e.height);
|
|
39
|
+
}
|
|
40
|
+
function y(n, r = 270) {
|
|
41
|
+
let i = f.value;
|
|
42
|
+
if (!i || e()) return void d("done");
|
|
43
|
+
let a = window.devicePixelRatio || 1;
|
|
44
|
+
i.width = window.innerWidth * a, i.height = window.innerHeight * a;
|
|
45
|
+
let o = {
|
|
46
|
+
x: window.innerWidth / 2,
|
|
47
|
+
y: window.innerHeight * .65
|
|
48
|
+
};
|
|
49
|
+
if (n instanceof HTMLElement) {
|
|
50
|
+
let e = n.getBoundingClientRect();
|
|
51
|
+
o = {
|
|
52
|
+
x: e.left + e.width / 2,
|
|
53
|
+
y: e.top + e.height / 2
|
|
54
|
+
};
|
|
55
|
+
} else n && (o = n);
|
|
56
|
+
p.push(...t({
|
|
57
|
+
count: u.count,
|
|
58
|
+
origin: o,
|
|
59
|
+
angle: r,
|
|
60
|
+
spread: u.spread,
|
|
61
|
+
power: u.power,
|
|
62
|
+
colors: u.colors.map(g)
|
|
63
|
+
})), m ||= (h = performance.now(), requestAnimationFrame(_));
|
|
64
|
+
}
|
|
65
|
+
return a(v), c({
|
|
66
|
+
fire: y,
|
|
67
|
+
stop: v
|
|
68
|
+
}), (e, t) => (o(), r("canvas", {
|
|
69
|
+
ref_key: "canvas",
|
|
70
|
+
ref: f,
|
|
71
|
+
class: "bless-confetti",
|
|
72
|
+
"aria-hidden": "true"
|
|
73
|
+
}, null, 512));
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
//#endregion
|
|
77
|
+
export { c as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.bless-countup{font-variant-numeric:tabular-nums;position:relative}.bless-countup--odometer .bless-countup__visual{display:inline-flex}.bless-countup__digit{height:1lh;display:inline-block;overflow:hidden}.bless-countup__reel{translate:0 calc(var(--bless-digit) * -1lh);transition:translate var(--bless-duration-slow) var(--bless-ease-out);flex-direction:column;display:flex}.bless-countup__reel i{height:1lh;font-style:normal}.bless-countup__final{clip-path:inset(50%);width:1px;height:1px;position:absolute;overflow:hidden}@media (prefers-reduced-motion:reduce){.bless-countup__reel{transition:none}}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
value: number;
|
|
3
|
+
/** milliseconds to travel from the shown number to `value` */
|
|
4
|
+
duration?: number;
|
|
5
|
+
locale?: string;
|
|
6
|
+
/** `Intl.NumberFormat` options: `{ style: "currency", currency: "IDR" }` */
|
|
7
|
+
options?: Intl.NumberFormatOptions;
|
|
8
|
+
/** start at 0 and count up when first shown; off shows `value` straight away */
|
|
9
|
+
appear?: boolean;
|
|
10
|
+
/** roll each digit in its own column, like an odometer */
|
|
11
|
+
odometer?: boolean;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
14
|
+
duration: number;
|
|
15
|
+
appear: boolean;
|
|
16
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const _default: typeof __VLS_export;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { reducedMotion as e } from "../composables/useMedia.js";
|
|
2
|
+
import { Fragment as t, computed as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, defineComponent as o, normalizeClass as s, normalizeStyle as c, onBeforeUnmount as l, onMounted as u, openBlock as d, ref as f, renderList as p, toDisplayString as m, watch as h } from "vue";
|
|
3
|
+
//#region src/components/BlessCountUp.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var g = {
|
|
5
|
+
class: "bless-countup__visual",
|
|
6
|
+
"aria-hidden": "true"
|
|
7
|
+
}, _ = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "bless-countup__digit"
|
|
10
|
+
}, v = { key: 1 }, y = { class: "bless-countup__final" }, b = /*@__PURE__*/ o({
|
|
11
|
+
name: "BlessCountUp",
|
|
12
|
+
__name: "BlessCountUp",
|
|
13
|
+
props: {
|
|
14
|
+
value: {},
|
|
15
|
+
duration: { default: 800 },
|
|
16
|
+
locale: {},
|
|
17
|
+
options: {},
|
|
18
|
+
appear: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: !0
|
|
21
|
+
},
|
|
22
|
+
odometer: { type: Boolean }
|
|
23
|
+
},
|
|
24
|
+
setup(o) {
|
|
25
|
+
let b = o, x = f(b.appear ? 0 : b.value), S = n(() => new Intl.NumberFormat(b.locale, b.options)), C = n(() => {
|
|
26
|
+
let e = b.options ?? {};
|
|
27
|
+
return e.style === "currency" || e.style === "percent" || e.minimumFractionDigits != null || e.maximumFractionDigits != null || !Number.isInteger(b.value) ? S.value.resolvedOptions().maximumFractionDigits ?? 0 : 0;
|
|
28
|
+
}), w = (e) => S.value.format(e), T = (e) => Math.round(e * 10 ** C.value) / 10 ** C.value, E = n(() => w(b.value)), D = n(() => Array.from(w(x.value))), O = 0;
|
|
29
|
+
function k(t) {
|
|
30
|
+
cancelAnimationFrame(O);
|
|
31
|
+
let n = x.value;
|
|
32
|
+
if (e() || !b.duration || n === t) {
|
|
33
|
+
x.value = t;
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
let r = performance.now(), i = (e) => {
|
|
37
|
+
let a = Math.min(1, (e - r) / b.duration);
|
|
38
|
+
x.value = T(n + (t - n) * (1 - (1 - a) ** 3)), a < 1 ? O = requestAnimationFrame(i) : x.value = t;
|
|
39
|
+
};
|
|
40
|
+
O = requestAnimationFrame(i);
|
|
41
|
+
}
|
|
42
|
+
return u(() => b.appear && k(b.value)), h(() => b.value, (e) => k(e)), l(() => cancelAnimationFrame(O)), (e, n) => (d(), r("span", { class: s(["bless-countup", { "bless-countup--odometer": o.odometer }]) }, [i("span", g, [o.odometer ? (d(!0), r(t, { key: 0 }, p(D.value, (e, n) => (d(), r(t, { key: n }, [/\d/.test(e) ? (d(), r("span", _, [i("span", {
|
|
43
|
+
class: "bless-countup__reel",
|
|
44
|
+
style: c({ "--bless-digit": e })
|
|
45
|
+
}, [(d(), r(t, null, p(10, (e) => i("i", { key: e }, m(e - 1), 1)), 64))], 4)])) : (d(), r("span", v, m(e), 1))], 64))), 128)) : (d(), r(t, { key: 1 }, [a(m(w(x.value)), 1)], 64))]), i("span", y, m(E.value), 1)], 2));
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
//#endregion
|
|
49
|
+
export { b as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.bless-cropper{font-family:var(--bless-font-sans);font-size:var(--bless-text-sm);color:var(--bless-color-text);position:relative}.bless-cropper__stage{touch-action:none;-webkit-user-select:none;user-select:none;background:var(--bless-color-surface);position:relative;overflow:hidden}.bless-cropper__canvas{width:100%;height:auto;display:block}.bless-cropper__frame{box-sizing:border-box;border:2px solid var(--bless-color-bg);outline:1px solid var(--bless-color-text);box-shadow:0 0 0 9999px color-mix(in srgb, var(--bless-color-bg) 55%, transparent);cursor:move;touch-action:none;position:absolute}.bless-cropper__frame:focus-visible{outline:2px solid var(--bless-color-accent)}.bless-cropper__handle{background:var(--bless-color-bg);border:1px solid var(--bless-color-text);touch-action:none;width:12px;height:12px;position:absolute}.bless-cropper__handle--nw{cursor:nwse-resize;inset-block-start:-7px;inset-inline-start:-7px}.bless-cropper__handle--ne{cursor:nesw-resize;inset-block-start:-7px;inset-inline-end:-7px}.bless-cropper__handle--se{cursor:nwse-resize;inset-block-end:-7px;inset-inline-end:-7px}.bless-cropper__handle--sw{cursor:nesw-resize;inset-block-end:-7px;inset-inline-start:-7px}.bless-cropper__handle--n,.bless-cropper__handle--s{cursor:ns-resize;inset-inline-start:calc(50% - 6px)}.bless-cropper__handle--n{inset-block-start:-7px}.bless-cropper__handle--s{inset-block-end:-7px}.bless-cropper__handle--e,.bless-cropper__handle--w{cursor:ew-resize;inset-block-start:calc(50% - 6px)}.bless-cropper__handle--e{inset-inline-end:-7px}.bless-cropper__handle--w{inset-inline-start:-7px}.bless-cropper__foot{justify-content:space-between;align-items:center;gap:var(--bless-space-2);margin-top:var(--bless-space-2);color:var(--bless-color-text-muted);font-size:var(--bless-text-xs);display:flex}.bless-cropper__controls{gap:var(--bless-space-1);display:inline-flex}.bless-cropper__error{color:var(--bless-color-danger-text);margin:0}.bless-cropper__live{clip-path:inset(50%);width:1px;height:1px;position:absolute;overflow:hidden}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { CropBox } from '../composables/cropBox';
|
|
2
|
+
export interface BlessCropRect {
|
|
3
|
+
/** pixels of the full-size image after `rotation` has been applied */
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
rotation: 0 | 90 | 180 | 270;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
12
|
+
declare const __VLS_export: import('vue').DefineComponent<{
|
|
13
|
+
src: string;
|
|
14
|
+
/** width / height of the result, e.g. `1` or `16 / 9`; leave out to crop freely */
|
|
15
|
+
aspect?: number;
|
|
16
|
+
/** `anonymous` lets `toBlob` read images from another origin that sends CORS headers */
|
|
17
|
+
crossorigin?: "anonymous" | "use-credentials";
|
|
18
|
+
/** show the rotate buttons */
|
|
19
|
+
controls?: boolean;
|
|
20
|
+
label?: string;
|
|
21
|
+
/** the crop readout said after a keystroke, the hint under the image and the rotate buttons */
|
|
22
|
+
labels?: Partial<{
|
|
23
|
+
size: (width: number, height: number, x: number, y: number) => string;
|
|
24
|
+
hint: string;
|
|
25
|
+
rotateLeft: string;
|
|
26
|
+
rotateRight: string;
|
|
27
|
+
loadError: string;
|
|
28
|
+
}>;
|
|
29
|
+
} & {
|
|
30
|
+
modelValue?: BlessCropRect | null;
|
|
31
|
+
}, {
|
|
32
|
+
toBlob: (o?: {
|
|
33
|
+
type?: string;
|
|
34
|
+
quality?: number;
|
|
35
|
+
maxWidth?: number;
|
|
36
|
+
}) => Promise<Blob | null>;
|
|
37
|
+
rotate: (d: 90 | -90) => 0 | 90 | 180 | 270;
|
|
38
|
+
reset: () => CropBox;
|
|
39
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
40
|
+
"update:modelValue": (value: BlessCropRect | null) => any;
|
|
41
|
+
error: () => any;
|
|
42
|
+
ready: () => any;
|
|
43
|
+
}, string, import('vue').PublicProps, Readonly<{
|
|
44
|
+
src: string;
|
|
45
|
+
/** width / height of the result, e.g. `1` or `16 / 9`; leave out to crop freely */
|
|
46
|
+
aspect?: number;
|
|
47
|
+
/** `anonymous` lets `toBlob` read images from another origin that sends CORS headers */
|
|
48
|
+
crossorigin?: "anonymous" | "use-credentials";
|
|
49
|
+
/** show the rotate buttons */
|
|
50
|
+
controls?: boolean;
|
|
51
|
+
label?: string;
|
|
52
|
+
/** the crop readout said after a keystroke, the hint under the image and the rotate buttons */
|
|
53
|
+
labels?: Partial<{
|
|
54
|
+
size: (width: number, height: number, x: number, y: number) => string;
|
|
55
|
+
hint: string;
|
|
56
|
+
rotateLeft: string;
|
|
57
|
+
rotateRight: string;
|
|
58
|
+
loadError: string;
|
|
59
|
+
}>;
|
|
60
|
+
} & {
|
|
61
|
+
modelValue?: BlessCropRect | null;
|
|
62
|
+
}> & Readonly<{
|
|
63
|
+
"onUpdate:modelValue"?: ((value: BlessCropRect | null) => any) | undefined;
|
|
64
|
+
onError?: (() => any) | undefined;
|
|
65
|
+
onReady?: (() => any) | undefined;
|
|
66
|
+
}>, {
|
|
67
|
+
label: string;
|
|
68
|
+
controls: boolean;
|
|
69
|
+
crossorigin: "anonymous" | "use-credentials";
|
|
70
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|