hys-ui 0.4.0 → 0.6.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 +13 -0
- package/dist/components/HysAnimatedNumber/HysAnimatedNumber.vue.js +3 -3
- package/dist/components/HysAnimatedNumber/HysAnimatedNumber2.vue.js +440 -119
- package/dist/components/HysAnimatedNumber/NumberAnimationCanvas/NumberAnimationCanvas.vue.js +7 -0
- package/dist/components/HysAnimatedNumber/NumberAnimationCanvas/NumberAnimationCanvas2.vue.js +166 -0
- package/dist/components/HysAnimatedNumber/NumberDigits/NumberDigits.vue.js +7 -0
- package/dist/components/HysAnimatedNumber/NumberDigits/NumberDigits2.vue.js +105 -0
- package/dist/components/HysAnimatedNumber/animation/digital.js +186 -0
- package/dist/components/HysAnimatedNumber/animation/morph.js +110 -0
- package/dist/components/HysAnimatedNumber/animation/paint.js +34 -0
- package/dist/components/HysAnimatedNumber/animation/particles.js +51 -0
- package/dist/components/HysAnimatedNumber/animation/paths.js +165 -0
- package/dist/components/HysAnimatedNumber/animation/physics.js +66 -0
- package/dist/components/HysAnimatedNumber/animation/render.js +89 -0
- package/dist/components/HysAnimatedNumber/animation/reveal.js +125 -0
- package/dist/components/HysAnimatedNumber/animation/rolling.js +66 -0
- package/dist/components/HysAnimatedNumber/animation/scenarios.js +217 -0
- package/dist/components/HysAnimatedNumber/animation/spatial.js +112 -0
- package/dist/components/HysAnimatedNumber/useNumberCountdown.js +58 -0
- package/dist/components/HysAnimatedNumber/useNumberVisuals.js +60 -0
- package/dist/components/HysDrawer/HysDrawer.vue.js +1 -1
- package/dist/components/HysDrawer/HysDrawer2.vue.js +2 -2
- package/dist/components/HysFormItem/HysFormItem.vue.js +1 -1
- package/dist/components/HysFormItem/HysFormItem2.vue.js +231 -229
- package/dist/components/HysInput/HysInput.vue.js +2 -2
- package/dist/components/HysInput/HysInput2.vue.js +327 -274
- package/dist/components/HysModal/HysModal.vue.js +2 -2
- package/dist/components/HysModal/HysModal2.vue.js +38 -38
- package/dist/components/HysSearch/HysSearch.vue.js +2 -2
- package/dist/components/HysSortableList/HysSortableList.vue.js +2 -2
- package/dist/components/HysSortableList/HysSortableList2.vue.js +498 -129
- package/dist/components/HysSortableList/SortableGhost/SortableGhost.vue.js +7 -0
- package/dist/components/HysSortableList/SortableGhost/SortableGhost2.vue.js +43 -0
- package/dist/components/HysSortableList/SortableGhost/useSortGhost.js +54 -0
- package/dist/components/HysSortableList/geometry.js +230 -0
- package/dist/components/HysSortableList/model.js +254 -0
- package/dist/components/HysSortableList/transactions.js +281 -0
- package/dist/components/HysSortableList/useSortDrag.js +270 -0
- package/dist/components/HysSortableList/useSortKeyboard.js +72 -0
- package/dist/components/HysSortableList/useSortWindow.js +144 -0
- package/dist/components/HysTextarea/HysTextarea.vue.js +56 -32
- package/dist/components/HysToast/HysToast.vue.js +3 -3
- package/dist/components/HysToast/HysToast2.vue.js +379 -107
- package/dist/components/HysToast/ToastViewport/ToastViewport.vue.js +7 -0
- package/dist/components/HysToast/ToastViewport/ToastViewport2.vue.js +211 -0
- package/dist/components/HysToast/ToastViewport/useToastStackDisclosure.js +71 -0
- package/dist/components/HysToast/toastPresentation.js +98 -0
- package/dist/components/HysToast/useToastActions.js +62 -0
- package/dist/components/HysToast/useToastSwipe.js +48 -0
- package/dist/components/HysToast/useToastTimer.js +90 -0
- package/dist/composables/animatedNumberDigits.js +106 -0
- package/dist/composables/animatedNumberFormat.js +222 -0
- package/dist/composables/animatedNumberTiming.js +66 -0
- package/dist/composables/numberAnimation.js +72 -0
- package/dist/composables/numberAnimationCatalog.js +301 -0
- package/dist/composables/numberAnimationSequence.js +45 -0
- package/dist/composables/popupReferenceBinding.js +41 -0
- package/dist/composables/textInput.js +23 -14
- package/dist/composables/toastEscape.js +18 -10
- package/dist/composables/toastQueue.js +276 -0
- package/dist/composables/toastQueueModel.js +86 -0
- package/dist/composables/toastTasks.js +58 -0
- package/dist/composables/useHysAnimatedNumber.js +264 -0
- package/dist/composables/useHysNumberAnimationGroup.js +23 -0
- package/dist/composables/useHysToast.js +117 -135
- package/dist/composables/usePopupSurface.js +190 -356
- package/dist/composables/usePopupSurfaceInteractions.js +172 -0
- package/dist/composables/useTextareaSize.js +62 -46
- package/dist/index.js +125 -111
- package/dist/style.css +1 -1
- package/dist/types/components/HysAnimatedNumber/HysAnimatedNumber.vue.d.ts +88 -49
- package/dist/types/components/HysAnimatedNumber/NumberAnimationCanvas/NumberAnimationCanvas.vue.d.ts +19 -0
- package/dist/types/components/HysAnimatedNumber/NumberDigits/NumberDigits.vue.d.ts +31 -0
- package/dist/types/components/HysAnimatedNumber/animation/digital.d.ts +3 -0
- package/dist/types/components/HysAnimatedNumber/animation/morph.d.ts +2 -0
- package/dist/types/components/HysAnimatedNumber/animation/paint.d.ts +44 -0
- package/dist/types/components/HysAnimatedNumber/animation/particles.d.ts +5 -0
- package/dist/types/components/HysAnimatedNumber/animation/paths.d.ts +12 -0
- package/dist/types/components/HysAnimatedNumber/animation/physics.d.ts +2 -0
- package/dist/types/components/HysAnimatedNumber/animation/render.d.ts +2 -0
- package/dist/types/components/HysAnimatedNumber/animation/reveal.d.ts +2 -0
- package/dist/types/components/HysAnimatedNumber/animation/rolling.d.ts +2 -0
- package/dist/types/components/HysAnimatedNumber/animation/scenarios.d.ts +4 -0
- package/dist/types/components/HysAnimatedNumber/animation/spatial.d.ts +2 -0
- package/dist/types/components/HysAnimatedNumber/useNumberCountdown.d.ts +8 -0
- package/dist/types/components/HysAnimatedNumber/useNumberVisuals.d.ts +12 -0
- package/dist/types/components/HysAutocomplete/HysAutocomplete.vue.d.ts +11 -2
- package/dist/types/components/HysAvatarGroup/HysAvatarGroup.vue.d.ts +2 -2
- package/dist/types/components/HysCard/HysCard.vue.d.ts +1 -1
- package/dist/types/components/HysCascader/HysCascader.vue.d.ts +3 -3
- package/dist/types/components/HysCascader/HysCascaderColumn.vue.d.ts +2 -2
- package/dist/types/components/HysColorPicker/HysColorPicker.vue.d.ts +2 -2
- package/dist/types/components/HysDatePicker/HysDatePicker.vue.d.ts +3 -3
- package/dist/types/components/HysDatePicker/HysDatePickerControl.vue.d.ts +5 -5
- package/dist/types/components/HysDateRangePicker/HysDateRangePicker.vue.d.ts +3 -3
- package/dist/types/components/HysDrawer/HysDrawer.vue.d.ts +1 -1
- package/dist/types/components/HysFormItem/HysFormItem.vue.d.ts +1 -1
- package/dist/types/components/HysGantt/HysGantt.vue.d.ts +1 -1
- package/dist/types/components/HysInput/HysInput.vue.d.ts +13 -1
- package/dist/types/components/HysModal/HysModal.vue.d.ts +1 -1
- package/dist/types/components/HysNumberInput/HysNumberInput.vue.d.ts +2 -2
- package/dist/types/components/HysPopover/HysPopover.vue.d.ts +1 -1
- package/dist/types/components/HysSearch/HysSearch.vue.d.ts +1 -1
- package/dist/types/components/HysSkeleton/HysSkeleton.vue.d.ts +2 -2
- package/dist/types/components/HysSortableList/HysSortableList.vue.d.ts +48 -25
- package/dist/types/components/HysSortableList/SortableGhost/SortableGhost.vue.d.ts +31 -0
- package/dist/types/components/HysSortableList/SortableGhost/useSortGhost.d.ts +23 -0
- package/dist/types/components/HysSortableList/geometry.d.ts +35 -0
- package/dist/types/components/HysSortableList/model.d.ts +61 -0
- package/dist/types/components/HysSortableList/sortableList.d.ts +151 -0
- package/dist/types/components/HysSortableList/transactions.d.ts +10 -0
- package/dist/types/components/HysSortableList/useSortDrag.d.ts +25 -0
- package/dist/types/components/HysSortableList/useSortKeyboard.d.ts +17 -0
- package/dist/types/components/HysSortableList/useSortWindow.d.ts +16 -0
- package/dist/types/components/HysSteps/HysSteps.vue.d.ts +1 -1
- package/dist/types/components/HysTabs/HysTabs.vue.d.ts +1 -1
- package/dist/types/components/HysTagInput/HysTagInput.vue.d.ts +1 -1
- package/dist/types/components/HysTextarea/HysTextarea.vue.d.ts +13 -2
- package/dist/types/components/HysToast/HysToast.vue.d.ts +44 -46
- package/dist/types/components/HysToast/ToastViewport/ToastViewport.vue.d.ts +25 -0
- package/dist/types/components/HysToast/ToastViewport/useToastStackDisclosure.d.ts +16 -0
- package/dist/types/components/HysToast/toastPresentation.d.ts +8 -0
- package/dist/types/components/HysToast/toastTypes.d.ts +212 -0
- package/dist/types/components/HysToast/useToastActions.d.ts +18 -0
- package/dist/types/components/HysToast/useToastSwipe.d.ts +11 -0
- package/dist/types/components/HysToast/useToastTimer.d.ts +22 -0
- package/dist/types/components/HysTooltip/HysTooltip.vue.d.ts +1 -1
- package/dist/types/components/HysTour/HysTour.vue.d.ts +1 -1
- package/dist/types/components/HysTreeSelect/HysTreeSelect.vue.d.ts +3 -3
- package/dist/types/components/HysUpload/HysUpload.vue.d.ts +2 -2
- package/dist/types/composables/animatedNumber.d.ts +220 -0
- package/dist/types/composables/animatedNumberDigits.d.ts +32 -0
- package/dist/types/composables/animatedNumberFormat.d.ts +16 -0
- package/dist/types/composables/animatedNumberTiming.d.ts +21 -0
- package/dist/types/composables/drawer.d.ts +1 -1
- package/dist/types/composables/numberAnimation.d.ts +29 -0
- package/dist/types/composables/numberAnimationCatalog.d.ts +58 -0
- package/dist/types/composables/numberAnimationSequence.d.ts +13 -0
- package/dist/types/composables/popupReferenceBinding.d.ts +9 -0
- package/dist/types/composables/textInput.d.ts +39 -4
- package/dist/types/composables/toastEscape.d.ts +1 -1
- package/dist/types/composables/toastQueue.d.ts +121 -0
- package/dist/types/composables/toastQueueModel.d.ts +116 -0
- package/dist/types/composables/toastTasks.d.ts +2 -0
- package/dist/types/composables/useHysAnimatedNumber.d.ts +37 -0
- package/dist/types/composables/useHysNumberAnimationGroup.d.ts +4 -0
- package/dist/types/composables/useHysToast.d.ts +4 -48
- package/dist/types/composables/usePopupSurface.d.ts +20 -20
- package/dist/types/composables/usePopupSurfaceInteractions.d.ts +33 -0
- package/dist/types/composables/useTextareaSize.d.ts +5 -2
- package/dist/types/index.d.ts +15 -6
- package/package.json +1 -1
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import { rectangle as D, wave as k, glyph as g, clamp as w, noise as S, smooth as T, localProgress as W } from "./paint.js";
|
|
2
|
+
import { paintRoll as I } from "./rolling.js";
|
|
3
|
+
import { paintSpatial as z } from "./spatial.js";
|
|
4
|
+
import { paintPhysics as A } from "./physics.js";
|
|
5
|
+
import { paintReveal as x } from "./reveal.js";
|
|
6
|
+
import { paintParticles as C } from "./particles.js";
|
|
7
|
+
import { paintDigital as q } from "./digital.js";
|
|
8
|
+
function b(e, o, s) {
|
|
9
|
+
const { ctx: l, size: n, width: h, accent: t } = e;
|
|
10
|
+
l.save(), l.strokeStyle = l.fillStyle = t, l.lineWidth = 0.025 * n, l.lineCap = "round", l.globalAlpha *= 0.8;
|
|
11
|
+
const d = h / n * 0.48;
|
|
12
|
+
if (s === 17 || s === 18)
|
|
13
|
+
l.beginPath(), l.arc(0, 0, 0.53 * n, -Math.PI / 2, Math.PI * (2 * o - 0.5)), l.stroke(), s === 18 && (l.beginPath(), l.moveTo(0, 0.42 * n), l.lineTo(
|
|
14
|
+
Math.cos(Math.PI * (o - 1)) * 0.33 * n,
|
|
15
|
+
(0.42 + Math.sin(Math.PI * (o - 1)) * 0.33) * n
|
|
16
|
+
), l.stroke());
|
|
17
|
+
else if (s === 19 || s === 20) {
|
|
18
|
+
l.beginPath(), l.moveTo(-d * n, 0.64 * n);
|
|
19
|
+
for (let M = 1; M <= 8; M++) {
|
|
20
|
+
const i = M / 8, f = s === 19 ? 0.62 - 0.17 * i - Math.sin(i * 11) * 0.08 : 0.64 - i * 0.21;
|
|
21
|
+
l.lineTo((-d + d * 2 * i * o) * n, f * n);
|
|
22
|
+
}
|
|
23
|
+
l.stroke();
|
|
24
|
+
} else l.fillRect(-d * n, 0.58 * n, d * 2 * o * n, 0.028 * n);
|
|
25
|
+
l.restore();
|
|
26
|
+
}
|
|
27
|
+
function K(e, o) {
|
|
28
|
+
const { p: s, from: l, to: n, digit: h, index: t, strength: d, accent: M, ctx: i, size: f } = e;
|
|
29
|
+
if (o === 2 && e.section === "integer") {
|
|
30
|
+
g(e, h);
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
if (o < 3 || o === 28 || o === 29) {
|
|
34
|
+
I(e, [17, 7, 15][o] ?? (o === 28 ? 13 : 19));
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
if (o === 3 || o === 4) {
|
|
38
|
+
z(e, o === 3 ? 6 : 14);
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
if (o === 5) {
|
|
42
|
+
x(e, 19);
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
if (o === 10 || o === 11) {
|
|
46
|
+
x(e, o === 10 ? 5 : 14);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
if (o >= 16 && o <= 20) {
|
|
50
|
+
g(e, h), b(e, s, o);
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
if ([21, 22, 23, 24].includes(o)) {
|
|
54
|
+
A(
|
|
55
|
+
e,
|
|
56
|
+
o === 22 ? 19 : o === 23 ? 0 : o === 24 ? 12 : 11
|
|
57
|
+
);
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
const c = k(s) * d, p = [6, 8, 12, 13, 14, 15, 26].includes(o), y = o === 25 || o === 27 ? "#df5268" : M, P = [6, 7, 12, 13, 14, 15, 25, 26, 27].includes(o);
|
|
61
|
+
if (g(e, l, { y: (p ? 0.28 : -0.28) * s, alpha: (1 - s) ** 2 }), g(e, n, {
|
|
62
|
+
y: (p ? -0.23 : 0.23) * (1 - s) * d,
|
|
63
|
+
sx: 1 + (P ? 0.18 * c : 0),
|
|
64
|
+
sy: 1 + (P ? 0.18 * c : 0),
|
|
65
|
+
alpha: Math.min(1, 0.35 + s),
|
|
66
|
+
color: P && s > 0.28 ? y : void 0,
|
|
67
|
+
glow: P ? c * 0.2 : 0
|
|
68
|
+
}), (o === 8 || o === 9) && t === e.count - 1 && g(e, o === 8 ? "↑" : "↓", {
|
|
69
|
+
x: 0.57,
|
|
70
|
+
y: (1 - s) * 0.17,
|
|
71
|
+
sx: 0.47,
|
|
72
|
+
sy: 0.47,
|
|
73
|
+
color: y,
|
|
74
|
+
alpha: c
|
|
75
|
+
}), [6, 12, 26].includes(o)) {
|
|
76
|
+
i.save(), i.fillStyle = y, i.globalAlpha *= c * 0.7;
|
|
77
|
+
const u = o === 6 ? e.width * 0.52 : e.width * 0.72 * s;
|
|
78
|
+
i.fillRect(
|
|
79
|
+
-u / 2,
|
|
80
|
+
f * (o === 26 ? -0.58 : 0.54),
|
|
81
|
+
u,
|
|
82
|
+
f * 0.022
|
|
83
|
+
), i.restore();
|
|
84
|
+
}
|
|
85
|
+
if (o === 13 || o === 14 || o === 15 || o === 25) {
|
|
86
|
+
i.save(), i.strokeStyle = y, i.lineWidth = 0.022 * f, i.globalAlpha *= c * 0.7;
|
|
87
|
+
const u = (0.42 + c * 0.16) * f;
|
|
88
|
+
o === 13 ? (i.setLineDash([f * 0.045, f * 0.045]), i.strokeRect(-u / 2, -u, u, u * 2)) : o === 14 || o === 15 ? (i.beginPath(), i.ellipse(
|
|
89
|
+
0,
|
|
90
|
+
0,
|
|
91
|
+
u * 0.62,
|
|
92
|
+
u * 1.16,
|
|
93
|
+
0,
|
|
94
|
+
-Math.PI / 2,
|
|
95
|
+
(s * 2 - 0.5) * Math.PI
|
|
96
|
+
), i.stroke(), o === 15 && b(e, s, 16)) : i.strokeRect(-u / 2, -u, u, u * 2), i.restore();
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
function B(e, o) {
|
|
100
|
+
const { p: s, from: l, to: n, size: h, ctx: t, seed: d, strength: M, accent: i } = e, f = [i, "#e9903d", "#d8649e", "#23aa85"];
|
|
101
|
+
g(e, l, { alpha: (1 - s) ** 3 }), g(e, n, { alpha: w(s * 1.7), glow: 0.17 * k(s) });
|
|
102
|
+
const c = w((s - 0.17) / 0.83);
|
|
103
|
+
if (c)
|
|
104
|
+
for (let p = 0; p < 18; p++) {
|
|
105
|
+
const y = p / 18 * Math.PI * 2 + S(d, p) * 0.19, P = (0.3 + S(d + 7, p) * 0.69) * T(c) * M, u = Math.cos(y) * P, R = Math.sin(y) * P + c ** 2 * (o ? 0.58 : 0.19);
|
|
106
|
+
t.save(), t.globalAlpha *= (1 - c) * 0.9, t.fillStyle = t.strokeStyle = f[p % f.length], o ? (t.translate(u * h, R * h), t.rotate(y + c * Math.PI * 3), t.fillRect(-0.023 * h, -0.046 * h, 0.047 * h, 0.095 * h)) : (t.shadowColor = t.strokeStyle, t.shadowBlur = h * 0.08, t.lineWidth = h * 0.021, t.beginPath(), t.moveTo(
|
|
107
|
+
(u - Math.cos(y) * 0.13 * (1 - c)) * h,
|
|
108
|
+
(R - Math.sin(y) * 0.13 * (1 - c)) * h
|
|
109
|
+
), t.lineTo(u * h, R * h), t.stroke()), t.restore();
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
function N(e, o) {
|
|
113
|
+
const { p: s, index: l, count: n, seed: h } = e, t = Math.abs(l - (n - 1) / 2), d = Math.min(l, n - l - 1), M = [
|
|
114
|
+
l,
|
|
115
|
+
l,
|
|
116
|
+
Math.floor(l / 2),
|
|
117
|
+
t * 2,
|
|
118
|
+
d * 2,
|
|
119
|
+
S(h, l) * (n - 1),
|
|
120
|
+
0,
|
|
121
|
+
l,
|
|
122
|
+
l % 2,
|
|
123
|
+
l,
|
|
124
|
+
l,
|
|
125
|
+
l % 3,
|
|
126
|
+
l,
|
|
127
|
+
d * 2,
|
|
128
|
+
Math.floor(l / 3),
|
|
129
|
+
Math.floor(l / 3) + l % 3,
|
|
130
|
+
l,
|
|
131
|
+
S(h + 37, l) * (n - 1),
|
|
132
|
+
Math.floor(l / 3),
|
|
133
|
+
l % 3
|
|
134
|
+
][o], f = W(s, M, n, o === 6 ? 0 : o === 9 ? 0.75 : o === 10 ? 0.62 : o === 12 ? 0.54 : 0.45), c = { ...e, p: f };
|
|
135
|
+
if (f === 0) {
|
|
136
|
+
g(e, e.from);
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
if (f === 1) {
|
|
140
|
+
g(e, e.to);
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
o === 1 || o === 13 ? A(c, o === 1 ? 11 : 8) : o === 8 || o === 9 || o === 6 || o === 7 ? I(
|
|
144
|
+
{ ...c, axis: l % 2 === 0 ? e.axis : "horizontal" },
|
|
145
|
+
o === 7 ? 17 : 15
|
|
146
|
+
) : o === 10 ? x(c, 16) : o === 12 ? x(c, 8) : x(c, [2, 15, 16, 18, 19].includes(o) ? 18 : 2);
|
|
147
|
+
}
|
|
148
|
+
function O(e, o) {
|
|
149
|
+
const { p: s, from: l, to: n, size: h, ctx: t, seed: d, accent: M, width: i, strength: f } = e;
|
|
150
|
+
if (o === 0) {
|
|
151
|
+
z(e, 8);
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
if (o <= 4) {
|
|
155
|
+
I(e, [0, 5, 10, 17, 6][o]);
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
if (o === 9) {
|
|
159
|
+
C(e, 19), b(e, s, 17);
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
if (o === 10 || o === 11) {
|
|
163
|
+
B(e, o === 11);
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
if (o >= 14) {
|
|
167
|
+
if (o === 17 || o === 19)
|
|
168
|
+
b(e, s, o === 17 ? 18 : 16);
|
|
169
|
+
else {
|
|
170
|
+
const c = T(s) * 0.94, p = i / h * 0.47;
|
|
171
|
+
D(
|
|
172
|
+
e,
|
|
173
|
+
-p,
|
|
174
|
+
0.49 - c,
|
|
175
|
+
p * 2,
|
|
176
|
+
c,
|
|
177
|
+
() => g(e, n, { color: M, glow: 0.1 })
|
|
178
|
+
), t.save(), t.globalAlpha *= 0.38 * k(s), t.fillStyle = M, o === 15 && t.fillRect(
|
|
179
|
+
-i * 0.58,
|
|
180
|
+
(0.42 - c) * h,
|
|
181
|
+
0.04 * h,
|
|
182
|
+
c * h
|
|
183
|
+
), o === 16 && t.fillRect(-i * 0.5, -0.54 * h, i * s, 0.055 * h), o === 18 && t.fillRect(-i * 0.5, (0.55 - c) * h, i, 0.038 * h), t.restore();
|
|
184
|
+
}
|
|
185
|
+
g(e, n, { alpha: 0.38 + 0.62 * s });
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
if (o === 7 || o === 8) {
|
|
189
|
+
g(e, l, { alpha: (1 - s) ** 3 }), g(e, n, { alpha: w(s * 1.4) });
|
|
190
|
+
for (let c = 0; c < 6; c++) {
|
|
191
|
+
const p = w(s * 1.6 - c * 0.09);
|
|
192
|
+
!p || p === 1 && o === 7 || (t.save(), t.globalAlpha *= k(s), t.fillStyle = c % 2 ? "#f1a52f" : "#ffd67a", t.beginPath(), t.ellipse(
|
|
193
|
+
(S(d, c) - 0.5) * i * 1.3,
|
|
194
|
+
(o === 7 ? -1 + p ** 2 * 1.55 : 0.48 - c * 0.085 - (1 - p) * 0.72) * h,
|
|
195
|
+
0.11 * h,
|
|
196
|
+
(0.04 + Math.abs(Math.sin(p * 12)) * 0.035) * h,
|
|
197
|
+
0,
|
|
198
|
+
0,
|
|
199
|
+
Math.PI * 2
|
|
200
|
+
), t.fill(), t.restore());
|
|
201
|
+
}
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
if (o === 13) {
|
|
205
|
+
q(e, 27), b(e, s, 17);
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
A(
|
|
209
|
+
{ ...e, strength: f * 0.9 },
|
|
210
|
+
o === 12 ? 18 : o === 6 ? 14 : 2
|
|
211
|
+
), b(e, s, 17);
|
|
212
|
+
}
|
|
213
|
+
export {
|
|
214
|
+
K as paintData,
|
|
215
|
+
N as paintSequence,
|
|
216
|
+
O as paintSpecial
|
|
217
|
+
};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { glyph as w, wave as h, rectangle as d, smooth as S, mix as R } from "./paint.js";
|
|
2
|
+
function k(o, s, c, g = !1) {
|
|
3
|
+
const { p: t, from: M, to: l, ctx: y, size: p, strength: u } = o, x = [
|
|
4
|
+
{ text: M, angle: t * 2 * Math.PI / s },
|
|
5
|
+
{ text: l, angle: (t - 1) * 2 * Math.PI / s }
|
|
6
|
+
];
|
|
7
|
+
s > 4 && (x.push({
|
|
8
|
+
text: o.glyphs[(o.fromIndex + 9) % 10],
|
|
9
|
+
angle: (t + 1) * 2 * Math.PI / s
|
|
10
|
+
}), x.push({
|
|
11
|
+
text: o.glyphs[(o.toIndex + 1) % 10],
|
|
12
|
+
angle: (t - 2) * 2 * Math.PI / s
|
|
13
|
+
}));
|
|
14
|
+
for (const q of x.sort(
|
|
15
|
+
(n, I) => Math.cos(n.angle) - Math.cos(I.angle)
|
|
16
|
+
)) {
|
|
17
|
+
const n = Math.cos(q.angle);
|
|
18
|
+
if (n <= 0) continue;
|
|
19
|
+
const I = (s > 4 ? 0.62 : 0.43) * (0.7 + u * 0.3), f = Math.sin(q.angle) * I, e = g ? Math.sqrt(n) : n;
|
|
20
|
+
y.save(), y.globalAlpha *= n * 0.28 * h(t), y.fillStyle = o.accent;
|
|
21
|
+
const A = (c ? f - 0.33 * e : -0.33) * p, b = (c ? -0.51 : f - 0.51 * e) * p;
|
|
22
|
+
y.fillRect(
|
|
23
|
+
A,
|
|
24
|
+
b,
|
|
25
|
+
0.66 * p * (c ? e : 1),
|
|
26
|
+
1.02 * p * (c ? 1 : e)
|
|
27
|
+
), y.restore(), w(o, q.text, {
|
|
28
|
+
x: c ? f : 0,
|
|
29
|
+
y: c ? 0 : f,
|
|
30
|
+
sx: c ? e : g ? 0.88 + 0.12 * n : 1,
|
|
31
|
+
sy: c ? g ? 0.88 + 0.12 * n : 1 : e,
|
|
32
|
+
alpha: 0.38 + n * 0.62
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function B(o, s) {
|
|
37
|
+
const { p: c, from: g, to: t, width: M, size: l, ctx: y } = o, p = s === 5 || s === 14 && o.axis === "horizontal", u = s === 9 ? 5 : s === 8 || s === 4 || s === 5 ? 2 : 1, x = M / l, q = Math.cos(c * Math.PI), n = c < 0.5, I = n ? g : t, f = s === 6 ? (n ? c : c - 1) * 0.36 : 0;
|
|
38
|
+
s === 8 && (d(
|
|
39
|
+
o,
|
|
40
|
+
-x / 2,
|
|
41
|
+
-0.57,
|
|
42
|
+
x,
|
|
43
|
+
0.57,
|
|
44
|
+
() => w(o, n ? t : I)
|
|
45
|
+
), d(
|
|
46
|
+
o,
|
|
47
|
+
-x / 2,
|
|
48
|
+
0,
|
|
49
|
+
x,
|
|
50
|
+
0.57,
|
|
51
|
+
() => w(o, n ? I : g)
|
|
52
|
+
));
|
|
53
|
+
for (let e = 0; e < u; e++) {
|
|
54
|
+
const A = p ? x / u * e - x / 2 : 1.12 / u * e - 0.56, b = p ? [A, -0.56, x / u, 1.12] : [-x / 2, A, x, 1.12 / u], P = s === 9 ? S(c * 1.25 - e * 0.055) : c, F = Math.abs(s === 9 ? Math.cos(P * Math.PI) : q), j = s === 7 ? -0.62 * h(P) : s === 8 ? 0.25 * h(P) * (n ? -1 : 1) : 0;
|
|
55
|
+
d(o, b[0], b[1], b[2], b[3], () => {
|
|
56
|
+
y.globalAlpha *= s === 8 ? 0.92 : 1, w(o, P < 0.5 ? g : t, {
|
|
57
|
+
x: p && s === 5 ? (e - 0.5) * 0.25 * h(P) : 0,
|
|
58
|
+
y: j + (s === 4 ? (e - 0.5) * 0.3 * h(P) : 0),
|
|
59
|
+
sx: p ? F : 1,
|
|
60
|
+
sy: p ? 1 : F,
|
|
61
|
+
angle: f
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
function D(o, s) {
|
|
67
|
+
const { from: c, to: g, p: t, strength: M } = o;
|
|
68
|
+
if (s < 4 || s === 15) {
|
|
69
|
+
k(
|
|
70
|
+
o,
|
|
71
|
+
[4, 8, 10, 6][s] ?? 3,
|
|
72
|
+
s === 0 || s === 2 || s === 15,
|
|
73
|
+
s === 2
|
|
74
|
+
);
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
if (s <= 9 || s === 14) {
|
|
78
|
+
B(o, s);
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
const l = (1 - t) * M, y = {
|
|
82
|
+
10: {
|
|
83
|
+
sx: 0.5 + S(t) * 0.5 + h(t) * 0.32,
|
|
84
|
+
sy: 0.5 + S(t) * 0.5 + h(t) * 0.32
|
|
85
|
+
},
|
|
86
|
+
11: { sx: 1 + l * 0.75, sy: 1 + l * 0.75, blur: 0.045 * l },
|
|
87
|
+
12: { sx: 0.25 + 0.75 * t, sy: 1 + 0.16 * l, angle: l * 0.5, x: -0.3 * l },
|
|
88
|
+
13: {
|
|
89
|
+
sx: R(0.25, 1, t),
|
|
90
|
+
sy: R(0.25, 1, t),
|
|
91
|
+
x: 0.6 * l,
|
|
92
|
+
y: -0.32 * l,
|
|
93
|
+
blur: 0.06 * l
|
|
94
|
+
},
|
|
95
|
+
16: {
|
|
96
|
+
y: -0.28 * h(t) * M,
|
|
97
|
+
sx: 1 + h(t) * 0.12,
|
|
98
|
+
sy: 1 + h(t) * 0.12,
|
|
99
|
+
glow: 0.2 * h(t)
|
|
100
|
+
},
|
|
101
|
+
17: { angle: -0.48 * l, sx: 1 - 0.28 * l, sy: 1 + 0.12 * l },
|
|
102
|
+
18: { sx: 1 + 0.4 * h(t) * M, sy: 1 - 0.42 * h(t) * M },
|
|
103
|
+
19: { sx: 0.14 + 0.86 * S(t), sy: 0.42 + 0.58 * t, angle: l * 0.28 }
|
|
104
|
+
};
|
|
105
|
+
w(o, c, { alpha: (1 - t) ** 2, sx: 1 + t * 0.3, sy: 1 + t * 0.3 }), w(o, g, {
|
|
106
|
+
...y[s],
|
|
107
|
+
alpha: t ** 0.5
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
export {
|
|
111
|
+
D as paintSpatial
|
|
112
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { computed as l, ref as H, watch as v, onMounted as N, onActivated as A, onDeactivated as E, onBeforeUnmount as y } from "vue";
|
|
2
|
+
import { listenVisibility as F, unlistenVisibility as V } from "../../composables/animatedNumberTiming.js";
|
|
3
|
+
const _ = { D: 864e5, H: 36e5, m: 6e4, s: 1e3, S: 1 }, M = /^(DD?|HH?|mm?|ss?|SSS)$/;
|
|
4
|
+
function C(b, g, d, T, w) {
|
|
5
|
+
const S = l(() => {
|
|
6
|
+
const t = b(), o = t instanceof Date ? t.getTime() : t;
|
|
7
|
+
return o !== void 0 && Number.isFinite(o) ? o : void 0;
|
|
8
|
+
}), c = l(
|
|
9
|
+
() => g().match(/\[[^\]]*\]|SSS|DD?|HH?|mm?|ss?|[\s\S]/g) ?? []
|
|
10
|
+
), u = l(() => c.value.includes("SSS")), i = H(0);
|
|
11
|
+
let a = !1, m, r, f;
|
|
12
|
+
function n() {
|
|
13
|
+
clearTimeout(m);
|
|
14
|
+
const t = S.value;
|
|
15
|
+
if (!(!a || t === void 0 || d() && document.hidden)) {
|
|
16
|
+
if (i.value = Math.max(
|
|
17
|
+
0,
|
|
18
|
+
Math.min(Number.MAX_SAFE_INTEGER, t - Date.now())
|
|
19
|
+
), i.value !== r && (r = i.value, T(r)), i.value === 0) {
|
|
20
|
+
f !== t && (f = t, w());
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
m = setTimeout(
|
|
24
|
+
n,
|
|
25
|
+
u.value ? 16 : i.value % 1e3 || 1e3
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
function h() {
|
|
30
|
+
a || (a = !0, F(n), n());
|
|
31
|
+
}
|
|
32
|
+
function p() {
|
|
33
|
+
a = !1, V(n), clearTimeout(m);
|
|
34
|
+
}
|
|
35
|
+
v(S, () => {
|
|
36
|
+
r = f = void 0, i.value = 0, n();
|
|
37
|
+
}), v(u, n), v(d, n), N(h), A(h), E(p), y(p);
|
|
38
|
+
const x = l(() => {
|
|
39
|
+
let t = u.value ? Math.floor(i.value) : Math.ceil(i.value / 1e3) * 1e3;
|
|
40
|
+
const o = /* @__PURE__ */ new Map();
|
|
41
|
+
for (const [e, s] of Object.entries(_))
|
|
42
|
+
c.value.some((D) => D[0] === e && M.test(D)) && (o.set(e, Math.floor(t / s)), t %= s);
|
|
43
|
+
return c.value.map((e) => {
|
|
44
|
+
const s = o.get(e[0]);
|
|
45
|
+
return M.test(e) && s !== void 0 ? {
|
|
46
|
+
text: String(s).padStart(e.length, "0"),
|
|
47
|
+
numeric: !0
|
|
48
|
+
} : {
|
|
49
|
+
text: e.startsWith("[") && e.endsWith("]") ? e.slice(1, -1) : e,
|
|
50
|
+
numeric: !1
|
|
51
|
+
};
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
return { remaining: i, parts: x, milliseconds: u };
|
|
55
|
+
}
|
|
56
|
+
export {
|
|
57
|
+
C as useNumberCountdown
|
|
58
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { computed as n } from "vue";
|
|
2
|
+
import { digitEffects as I } from "../../composables/animatedNumberDigits.js";
|
|
3
|
+
import { numberTrend as j } from "../../composables/animatedNumberFormat.js";
|
|
4
|
+
const k = (a) => typeof a == "string" ? [a] : a ?? [];
|
|
5
|
+
function C(a, s, P, S, T, v, h) {
|
|
6
|
+
const i = n(() => s.value.from), u = n(() => s.value.to), x = n(
|
|
7
|
+
() => a.changeThreshold !== void 0 && j(i.value, u.value, a.changeThreshold).significant
|
|
8
|
+
), o = n(
|
|
9
|
+
() => x.value && h.value ? [...k(a.thresholdEffect ?? "highlight"), ...v.value] : v.value
|
|
10
|
+
), c = n(() => s.value.status), d = n(
|
|
11
|
+
() => c.value === "playing" || c.value === "paused"
|
|
12
|
+
), r = n(
|
|
13
|
+
() => S.value && h.value && !T.value && d.value && s.value.progress < 1
|
|
14
|
+
), e = (t) => o.value.includes(t), E = n(
|
|
15
|
+
() => o.value.find((t) => I.includes(t))
|
|
16
|
+
), l = n(() => e("slide") && r.value), g = (t) => a.axis === "horizontal" ? `translateX(${t}%)` : `translateY(${t}%)`, f = () => s.value.direction === "down" ? -1 : 1, m = n(() => {
|
|
17
|
+
if (!r.value || !l.value && !e("fade") || i.value === u.value)
|
|
18
|
+
return;
|
|
19
|
+
const t = s.value.progress;
|
|
20
|
+
return {
|
|
21
|
+
opacity: e("fade") ? 1 - t : 1,
|
|
22
|
+
transform: l.value ? g(-f() * t * 100) : void 0
|
|
23
|
+
};
|
|
24
|
+
}), Y = n(() => {
|
|
25
|
+
var M;
|
|
26
|
+
if (!r.value || !a.animationStyle && !o.value.some(
|
|
27
|
+
($) => $ !== "count" && !I.includes($)
|
|
28
|
+
))
|
|
29
|
+
return;
|
|
30
|
+
const t = s.value.progress, y = Math.sin(Math.PI * t), z = 1 - (e("scale") ? 0.18 * (1 - t) : 0) + (e("spring") ? 0.24 * Math.sin(4 * Math.PI * t) * (1 - t) : 0), N = e("bounce") ? -0.27 * Math.abs(Math.sin(3 * Math.PI * t)) * (1 - t) : 0, V = e("fade") ? m.value ? t : 0.25 + 0.75 * t : 1, X = e("flash") ? 1 - 0.35 * Math.abs(Math.sin(4 * Math.PI * t)) * (1 - t) : 1;
|
|
31
|
+
let b;
|
|
32
|
+
try {
|
|
33
|
+
b = (M = a.animationStyle) == null ? void 0 : M.call(a, P.value);
|
|
34
|
+
} catch {
|
|
35
|
+
}
|
|
36
|
+
return [
|
|
37
|
+
{
|
|
38
|
+
transform: `${l.value ? g(f() * (1 - t) * 100) : ""} translateY(${N}em) scale(${z})`.trim(),
|
|
39
|
+
opacity: V * X,
|
|
40
|
+
filter: e("blur") ? `blur(${0.12 * (1 - t)}em)` : void 0,
|
|
41
|
+
"--hys-number-highlight": e("highlight") ? y : 0,
|
|
42
|
+
"--hys-number-gradient": e("gradient") ? y : 0
|
|
43
|
+
},
|
|
44
|
+
b
|
|
45
|
+
];
|
|
46
|
+
});
|
|
47
|
+
return {
|
|
48
|
+
from: i,
|
|
49
|
+
to: u,
|
|
50
|
+
status: c,
|
|
51
|
+
running: d,
|
|
52
|
+
digitEffect: E,
|
|
53
|
+
visualStyle: Y,
|
|
54
|
+
outgoingStyle: m,
|
|
55
|
+
sliding: l
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
export {
|
|
59
|
+
C as useNumberVisuals
|
|
60
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./HysDrawer2.vue.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
4
|
+
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-8b06b772"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -323,7 +323,7 @@ const Pe = ["inert", "aria-hidden"], De = ["role", "aria-label", "aria-labelledb
|
|
|
323
323
|
e.showClose ? (d(), u("button", {
|
|
324
324
|
key: 1,
|
|
325
325
|
type: "button",
|
|
326
|
-
class: "hys-ui-icon-action",
|
|
326
|
+
class: "hys-ui-icon-action hys-ui-dialog-close",
|
|
327
327
|
"aria-label": e.closeText,
|
|
328
328
|
disabled: t(a).closing.value || t(a).confirming.value && !e.closeWhileConfirming,
|
|
329
329
|
onClick: i[1] || (i[1] = (r) => t(a).requestClose("button", r))
|
|
@@ -336,7 +336,7 @@ const Pe = ["inert", "aria-hidden"], De = ["role", "aria-label", "aria-labelledb
|
|
|
336
336
|
], 6)) : e.showClose ? (d(), u("button", {
|
|
337
337
|
key: 1,
|
|
338
338
|
type: "button",
|
|
339
|
-
class: "hys-ui-icon-action hys-ui-drawer-floating-close",
|
|
339
|
+
class: "hys-ui-icon-action hys-ui-dialog-close hys-ui-drawer-floating-close",
|
|
340
340
|
"aria-label": e.closeText,
|
|
341
341
|
disabled: t(a).closing.value || t(a).confirming.value && !e.closeWhileConfirming,
|
|
342
342
|
onClick: i[2] || (i[2] = (r) => t(a).requestClose("button", r))
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./HysFormItem2.vue.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-7ce25263"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|