@vadem/ui 0.0.0-stage → 0.0.1
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/LICENSE-lucide.txt +43 -0
- package/README.md +19 -2
- package/fesm2022/vadem-ui-accordion.mjs +139 -0
- package/fesm2022/vadem-ui-accordion.mjs.map +1 -0
- package/fesm2022/vadem-ui-active-filters.mjs +355 -0
- package/fesm2022/vadem-ui-active-filters.mjs.map +1 -0
- package/fesm2022/vadem-ui-alert-dialog.mjs +433 -0
- package/fesm2022/vadem-ui-alert-dialog.mjs.map +1 -0
- package/fesm2022/vadem-ui-alert.mjs +266 -0
- package/fesm2022/vadem-ui-alert.mjs.map +1 -0
- package/fesm2022/vadem-ui-autocomplete.mjs +715 -0
- package/fesm2022/vadem-ui-autocomplete.mjs.map +1 -0
- package/fesm2022/vadem-ui-avatar.mjs +219 -0
- package/fesm2022/vadem-ui-avatar.mjs.map +1 -0
- package/fesm2022/vadem-ui-badge.mjs +86 -0
- package/fesm2022/vadem-ui-badge.mjs.map +1 -0
- package/fesm2022/vadem-ui-breadcrumbs.mjs +61 -0
- package/fesm2022/vadem-ui-breadcrumbs.mjs.map +1 -0
- package/fesm2022/vadem-ui-button.mjs +220 -0
- package/fesm2022/vadem-ui-button.mjs.map +1 -0
- package/fesm2022/vadem-ui-calendar.mjs +1314 -0
- package/fesm2022/vadem-ui-calendar.mjs.map +1 -0
- package/fesm2022/vadem-ui-card.mjs +271 -0
- package/fesm2022/vadem-ui-card.mjs.map +1 -0
- package/fesm2022/vadem-ui-character-count.mjs +269 -0
- package/fesm2022/vadem-ui-character-count.mjs.map +1 -0
- package/fesm2022/vadem-ui-chart.mjs +1984 -0
- package/fesm2022/vadem-ui-chart.mjs.map +1 -0
- package/fesm2022/vadem-ui-checkbox.mjs +67 -0
- package/fesm2022/vadem-ui-checkbox.mjs.map +1 -0
- package/fesm2022/vadem-ui-color-picker.mjs +815 -0
- package/fesm2022/vadem-ui-color-picker.mjs.map +1 -0
- package/fesm2022/vadem-ui-command.mjs +735 -0
- package/fesm2022/vadem-ui-command.mjs.map +1 -0
- package/fesm2022/vadem-ui-copy-button.mjs +375 -0
- package/fesm2022/vadem-ui-copy-button.mjs.map +1 -0
- package/fesm2022/vadem-ui-date-range-picker.mjs +1011 -0
- package/fesm2022/vadem-ui-date-range-picker.mjs.map +1 -0
- package/fesm2022/vadem-ui-description-list.mjs +59 -0
- package/fesm2022/vadem-ui-description-list.mjs.map +1 -0
- package/fesm2022/vadem-ui-dialog.mjs +587 -0
- package/fesm2022/vadem-ui-dialog.mjs.map +1 -0
- package/fesm2022/vadem-ui-dropzone.mjs +176 -0
- package/fesm2022/vadem-ui-dropzone.mjs.map +1 -0
- package/fesm2022/vadem-ui-editable-text.mjs +641 -0
- package/fesm2022/vadem-ui-editable-text.mjs.map +1 -0
- package/fesm2022/vadem-ui-empty-state.mjs +175 -0
- package/fesm2022/vadem-ui-empty-state.mjs.map +1 -0
- package/fesm2022/vadem-ui-expandable-text.mjs +244 -0
- package/fesm2022/vadem-ui-expandable-text.mjs.map +1 -0
- package/fesm2022/vadem-ui-field.mjs +583 -0
- package/fesm2022/vadem-ui-field.mjs.map +1 -0
- package/fesm2022/vadem-ui-file-preview.mjs +532 -0
- package/fesm2022/vadem-ui-file-preview.mjs.map +1 -0
- package/fesm2022/vadem-ui-file-size.mjs +83 -0
- package/fesm2022/vadem-ui-file-size.mjs.map +1 -0
- package/fesm2022/vadem-ui-form-error-summary.mjs +201 -0
- package/fesm2022/vadem-ui-form-error-summary.mjs.map +1 -0
- package/fesm2022/vadem-ui-icon.mjs +303 -0
- package/fesm2022/vadem-ui-icon.mjs.map +1 -0
- package/fesm2022/vadem-ui-input.mjs +120 -0
- package/fesm2022/vadem-ui-input.mjs.map +1 -0
- package/fesm2022/vadem-ui-kbd.mjs +286 -0
- package/fesm2022/vadem-ui-kbd.mjs.map +1 -0
- package/fesm2022/vadem-ui-keyboard.mjs +105 -0
- package/fesm2022/vadem-ui-keyboard.mjs.map +1 -0
- package/fesm2022/vadem-ui-locale.mjs +443 -0
- package/fesm2022/vadem-ui-locale.mjs.map +1 -0
- package/fesm2022/vadem-ui-menu.mjs +637 -0
- package/fesm2022/vadem-ui-menu.mjs.map +1 -0
- package/fesm2022/vadem-ui-navigation-list.mjs +130 -0
- package/fesm2022/vadem-ui-navigation-list.mjs.map +1 -0
- package/fesm2022/vadem-ui-number-input.mjs +264 -0
- package/fesm2022/vadem-ui-number-input.mjs.map +1 -0
- package/fesm2022/vadem-ui-otp-input.mjs +86 -0
- package/fesm2022/vadem-ui-otp-input.mjs.map +1 -0
- package/fesm2022/vadem-ui-pagination.mjs +353 -0
- package/fesm2022/vadem-ui-pagination.mjs.map +1 -0
- package/fesm2022/vadem-ui-password-input.mjs +213 -0
- package/fesm2022/vadem-ui-password-input.mjs.map +1 -0
- package/fesm2022/vadem-ui-popover.mjs +178 -0
- package/fesm2022/vadem-ui-popover.mjs.map +1 -0
- package/fesm2022/vadem-ui-progress.mjs +331 -0
- package/fesm2022/vadem-ui-progress.mjs.map +1 -0
- package/fesm2022/vadem-ui-radio.mjs +39 -0
- package/fesm2022/vadem-ui-radio.mjs.map +1 -0
- package/fesm2022/vadem-ui-range-slider.mjs +561 -0
- package/fesm2022/vadem-ui-range-slider.mjs.map +1 -0
- package/fesm2022/vadem-ui-rating.mjs +404 -0
- package/fesm2022/vadem-ui-rating.mjs.map +1 -0
- package/fesm2022/vadem-ui-relative-time.mjs +217 -0
- package/fesm2022/vadem-ui-relative-time.mjs.map +1 -0
- package/fesm2022/vadem-ui-reorder-list.mjs +601 -0
- package/fesm2022/vadem-ui-reorder-list.mjs.map +1 -0
- package/fesm2022/vadem-ui-scroll-area.mjs +65 -0
- package/fesm2022/vadem-ui-scroll-area.mjs.map +1 -0
- package/fesm2022/vadem-ui-search-input.mjs +307 -0
- package/fesm2022/vadem-ui-search-input.mjs.map +1 -0
- package/fesm2022/vadem-ui-segmented.mjs +297 -0
- package/fesm2022/vadem-ui-segmented.mjs.map +1 -0
- package/fesm2022/vadem-ui-select.mjs +1462 -0
- package/fesm2022/vadem-ui-select.mjs.map +1 -0
- package/fesm2022/vadem-ui-sidebar.mjs +493 -0
- package/fesm2022/vadem-ui-sidebar.mjs.map +1 -0
- package/fesm2022/vadem-ui-skeleton.mjs +106 -0
- package/fesm2022/vadem-ui-skeleton.mjs.map +1 -0
- package/fesm2022/vadem-ui-slider.mjs +60 -0
- package/fesm2022/vadem-ui-slider.mjs.map +1 -0
- package/fesm2022/vadem-ui-splitter.mjs +438 -0
- package/fesm2022/vadem-ui-splitter.mjs.map +1 -0
- package/fesm2022/vadem-ui-stat.mjs +369 -0
- package/fesm2022/vadem-ui-stat.mjs.map +1 -0
- package/fesm2022/vadem-ui-stepper.mjs +483 -0
- package/fesm2022/vadem-ui-stepper.mjs.map +1 -0
- package/fesm2022/vadem-ui-switch.mjs +45 -0
- package/fesm2022/vadem-ui-switch.mjs.map +1 -0
- package/fesm2022/vadem-ui-table.mjs +593 -0
- package/fesm2022/vadem-ui-table.mjs.map +1 -0
- package/fesm2022/vadem-ui-tabs.mjs +405 -0
- package/fesm2022/vadem-ui-tabs.mjs.map +1 -0
- package/fesm2022/vadem-ui-tag-input.mjs +685 -0
- package/fesm2022/vadem-ui-tag-input.mjs.map +1 -0
- package/fesm2022/vadem-ui-text-highlight.mjs +126 -0
- package/fesm2022/vadem-ui-text-highlight.mjs.map +1 -0
- package/fesm2022/vadem-ui-time-input.mjs +430 -0
- package/fesm2022/vadem-ui-time-input.mjs.map +1 -0
- package/fesm2022/vadem-ui-timeline.mjs +313 -0
- package/fesm2022/vadem-ui-timeline.mjs.map +1 -0
- package/fesm2022/vadem-ui-toast.mjs +397 -0
- package/fesm2022/vadem-ui-toast.mjs.map +1 -0
- package/fesm2022/vadem-ui-toolbar.mjs +396 -0
- package/fesm2022/vadem-ui-toolbar.mjs.map +1 -0
- package/fesm2022/vadem-ui-tooltip.mjs +218 -0
- package/fesm2022/vadem-ui-tooltip.mjs.map +1 -0
- package/fesm2022/vadem-ui-tree.mjs +551 -0
- package/fesm2022/vadem-ui-tree.mjs.map +1 -0
- package/fesm2022/vadem-ui-upload-list.mjs +408 -0
- package/fesm2022/vadem-ui-upload-list.mjs.map +1 -0
- package/fesm2022/vadem-ui.mjs +4 -0
- package/fesm2022/vadem-ui.mjs.map +1 -0
- package/fonts/jetbrains-mono/OFL.txt +93 -0
- package/fonts/jetbrains-mono/jetbrains-mono-cyrillic.woff2 +0 -0
- package/fonts/jetbrains-mono/jetbrains-mono-latin.woff2 +0 -0
- package/fonts/manrope/OFL.txt +93 -0
- package/fonts/manrope/manrope-cyrillic.woff2 +0 -0
- package/fonts/manrope/manrope-latin.woff2 +0 -0
- package/package.json +306 -3
- package/styles/base.css +160 -0
- package/styles/components/accordion.css +130 -0
- package/styles/components/active-filters.css +42 -0
- package/styles/components/alert-dialog.css +34 -0
- package/styles/components/alert.css +159 -0
- package/styles/components/autocomplete.css +97 -0
- package/styles/components/avatar.css +90 -0
- package/styles/components/badge.css +91 -0
- package/styles/components/breadcrumbs.css +94 -0
- package/styles/components/button.css +174 -0
- package/styles/components/calendar.css +186 -0
- package/styles/components/card.css +206 -0
- package/styles/components/character-count.css +41 -0
- package/styles/components/chart.css +308 -0
- package/styles/components/checkbox.css +115 -0
- package/styles/components/color-picker.css +158 -0
- package/styles/components/command.css +175 -0
- package/styles/components/copy-button.css +58 -0
- package/styles/components/date-range-picker.css +153 -0
- package/styles/components/description-list.css +69 -0
- package/styles/components/dialog.css +334 -0
- package/styles/components/dropzone.css +89 -0
- package/styles/components/editable-text.css +58 -0
- package/styles/components/empty-state.css +72 -0
- package/styles/components/expandable-text.css +24 -0
- package/styles/components/field.css +148 -0
- package/styles/components/file-preview.css +65 -0
- package/styles/components/form-error-summary.css +71 -0
- package/styles/components/icon.css +38 -0
- package/styles/components/index.css +80 -0
- package/styles/components/input.css +171 -0
- package/styles/components/kbd.css +42 -0
- package/styles/components/menu.css +168 -0
- package/styles/components/multi-select.css +156 -0
- package/styles/components/navigation-list.css +147 -0
- package/styles/components/number-input.css +33 -0
- package/styles/components/otp-input.css +26 -0
- package/styles/components/pagination.css +127 -0
- package/styles/components/password-input.css +20 -0
- package/styles/components/popover.css +93 -0
- package/styles/components/progress-ring.css +112 -0
- package/styles/components/progress.css +162 -0
- package/styles/components/radio.css +117 -0
- package/styles/components/range-slider.css +158 -0
- package/styles/components/rating.css +100 -0
- package/styles/components/reorder-list.css +143 -0
- package/styles/components/scroll-area.css +39 -0
- package/styles/components/search-input.css +25 -0
- package/styles/components/segmented.css +136 -0
- package/styles/components/select.css +257 -0
- package/styles/components/sidebar.css +105 -0
- package/styles/components/skeleton.css +83 -0
- package/styles/components/slider.css +132 -0
- package/styles/components/splitter.css +83 -0
- package/styles/components/stat.css +62 -0
- package/styles/components/stepper.css +236 -0
- package/styles/components/switch.css +107 -0
- package/styles/components/table.css +195 -0
- package/styles/components/tabs.css +198 -0
- package/styles/components/tag-input.css +138 -0
- package/styles/components/text-highlight.css +22 -0
- package/styles/components/time-input.css +96 -0
- package/styles/components/timeline.css +182 -0
- package/styles/components/toast.css +146 -0
- package/styles/components/toolbar.css +72 -0
- package/styles/components/tooltip.css +93 -0
- package/styles/components/tree.css +88 -0
- package/styles/components/upload-list.css +113 -0
- package/styles/fonts.css +67 -0
- package/styles/index.css +14 -0
- package/styles/reset.css +57 -0
- package/styles/tokens/primitives.css +364 -0
- package/styles/tokens/semantic.css +233 -0
- package/types/vadem-ui-accordion.d.ts +43 -0
- package/types/vadem-ui-active-filters.d.ts +73 -0
- package/types/vadem-ui-alert-dialog.d.ts +87 -0
- package/types/vadem-ui-alert.d.ts +64 -0
- package/types/vadem-ui-autocomplete.d.ts +156 -0
- package/types/vadem-ui-avatar.d.ts +59 -0
- package/types/vadem-ui-badge.d.ts +25 -0
- package/types/vadem-ui-breadcrumbs.d.ts +22 -0
- package/types/vadem-ui-button.d.ts +52 -0
- package/types/vadem-ui-calendar.d.ts +327 -0
- package/types/vadem-ui-card.d.ts +58 -0
- package/types/vadem-ui-character-count.d.ts +71 -0
- package/types/vadem-ui-chart.d.ts +452 -0
- package/types/vadem-ui-checkbox.d.ts +20 -0
- package/types/vadem-ui-color-picker.d.ts +171 -0
- package/types/vadem-ui-command.d.ts +145 -0
- package/types/vadem-ui-copy-button.d.ts +90 -0
- package/types/vadem-ui-date-range-picker.d.ts +216 -0
- package/types/vadem-ui-description-list.d.ts +15 -0
- package/types/vadem-ui-dialog.d.ts +174 -0
- package/types/vadem-ui-dropzone.d.ts +73 -0
- package/types/vadem-ui-editable-text.d.ts +141 -0
- package/types/vadem-ui-empty-state.d.ts +34 -0
- package/types/vadem-ui-expandable-text.d.ts +52 -0
- package/types/vadem-ui-field.d.ts +180 -0
- package/types/vadem-ui-file-preview.d.ts +108 -0
- package/types/vadem-ui-file-size.d.ts +18 -0
- package/types/vadem-ui-form-error-summary.d.ts +46 -0
- package/types/vadem-ui-icon.d.ts +152 -0
- package/types/vadem-ui-input.d.ts +31 -0
- package/types/vadem-ui-kbd.d.ts +66 -0
- package/types/vadem-ui-keyboard.d.ts +61 -0
- package/types/vadem-ui-locale.d.ts +241 -0
- package/types/vadem-ui-menu.d.ts +132 -0
- package/types/vadem-ui-navigation-list.d.ts +28 -0
- package/types/vadem-ui-number-input.d.ts +39 -0
- package/types/vadem-ui-otp-input.d.ts +15 -0
- package/types/vadem-ui-pagination.d.ts +96 -0
- package/types/vadem-ui-password-input.d.ts +36 -0
- package/types/vadem-ui-popover.d.ts +48 -0
- package/types/vadem-ui-progress.d.ts +95 -0
- package/types/vadem-ui-radio.d.ts +11 -0
- package/types/vadem-ui-range-slider.d.ts +136 -0
- package/types/vadem-ui-rating.d.ts +95 -0
- package/types/vadem-ui-relative-time.d.ts +58 -0
- package/types/vadem-ui-reorder-list.d.ts +120 -0
- package/types/vadem-ui-scroll-area.d.ts +13 -0
- package/types/vadem-ui-search-input.d.ts +58 -0
- package/types/vadem-ui-segmented.d.ts +76 -0
- package/types/vadem-ui-select.d.ts +303 -0
- package/types/vadem-ui-sidebar.d.ts +70 -0
- package/types/vadem-ui-skeleton.d.ts +28 -0
- package/types/vadem-ui-slider.d.ts +17 -0
- package/types/vadem-ui-splitter.d.ts +99 -0
- package/types/vadem-ui-stat.d.ts +101 -0
- package/types/vadem-ui-stepper.d.ts +108 -0
- package/types/vadem-ui-switch.d.ts +10 -0
- package/types/vadem-ui-table.d.ts +172 -0
- package/types/vadem-ui-tabs.d.ts +101 -0
- package/types/vadem-ui-tag-input.d.ts +170 -0
- package/types/vadem-ui-text-highlight.d.ts +27 -0
- package/types/vadem-ui-time-input.d.ts +47 -0
- package/types/vadem-ui-timeline.d.ts +54 -0
- package/types/vadem-ui-toast.d.ts +104 -0
- package/types/vadem-ui-toolbar.d.ts +80 -0
- package/types/vadem-ui-tooltip.d.ts +71 -0
- package/types/vadem-ui-tree.d.ts +123 -0
- package/types/vadem-ui-upload-list.d.ts +70 -0
- package/types/vadem-ui.d.ts +1 -0
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, Injectable, ViewEncapsulation, afterRenderEffect, computed, inject, input, signal } from "@angular/core";
|
|
3
|
+
import { VdButton } from "@vadem/ui/button";
|
|
4
|
+
import { VdIcon } from "@vadem/ui/icon";
|
|
5
|
+
import { vdTexts } from "@vadem/ui/locale";
|
|
6
|
+
const VD_TOAST_DEFAULTS = {
|
|
7
|
+
max: 3,
|
|
8
|
+
duration: 5e3,
|
|
9
|
+
exitDuration: 300
|
|
10
|
+
};
|
|
11
|
+
var VdToastStore = class {
|
|
12
|
+
options;
|
|
13
|
+
toasts = [];
|
|
14
|
+
timers = /* @__PURE__ */ new Map();
|
|
15
|
+
listeners = /* @__PURE__ */ new Set();
|
|
16
|
+
nextId = 1;
|
|
17
|
+
paused = false;
|
|
18
|
+
constructor(options = VD_TOAST_DEFAULTS) {
|
|
19
|
+
this.options = options;
|
|
20
|
+
}
|
|
21
|
+
get snapshot() {
|
|
22
|
+
return this.toasts;
|
|
23
|
+
}
|
|
24
|
+
subscribe(listener) {
|
|
25
|
+
this.listeners.add(listener);
|
|
26
|
+
listener(this.toasts);
|
|
27
|
+
return () => this.listeners.delete(listener);
|
|
28
|
+
}
|
|
29
|
+
show(input) {
|
|
30
|
+
const id = this.nextId++;
|
|
31
|
+
const duration = input.duration ?? (input.action ? this.options.duration * 2 : this.options.duration);
|
|
32
|
+
const toast = {
|
|
33
|
+
id,
|
|
34
|
+
title: input.title,
|
|
35
|
+
description: input.description,
|
|
36
|
+
variant: input.variant ?? "neutral",
|
|
37
|
+
action: input.action,
|
|
38
|
+
duration,
|
|
39
|
+
state: "open"
|
|
40
|
+
};
|
|
41
|
+
this.toasts = [...this.toasts, toast];
|
|
42
|
+
this.startTimer(id, duration);
|
|
43
|
+
const open = this.toasts.filter((t) => t.state === "open");
|
|
44
|
+
for (const extra of open.slice(0, Math.max(0, open.length - this.options.max))) this.dismiss(extra.id);
|
|
45
|
+
this.emit();
|
|
46
|
+
return id;
|
|
47
|
+
}
|
|
48
|
+
dismiss(id) {
|
|
49
|
+
const toast = this.toasts.find((t) => t.id === id);
|
|
50
|
+
if (!toast || toast.state === "leaving") return;
|
|
51
|
+
this.clearTimer(id);
|
|
52
|
+
this.toasts = this.toasts.map((t) => t.id === id ? {
|
|
53
|
+
...t,
|
|
54
|
+
state: "leaving"
|
|
55
|
+
} : t);
|
|
56
|
+
this.emit();
|
|
57
|
+
setTimeout(() => this.remove(id), this.options.exitDuration);
|
|
58
|
+
}
|
|
59
|
+
remove(id) {
|
|
60
|
+
if (!this.toasts.some((t) => t.id === id)) return;
|
|
61
|
+
this.clearTimer(id);
|
|
62
|
+
this.toasts = this.toasts.filter((t) => t.id !== id);
|
|
63
|
+
this.emit();
|
|
64
|
+
}
|
|
65
|
+
dismissAll() {
|
|
66
|
+
for (const t of this.toasts) this.dismiss(t.id);
|
|
67
|
+
}
|
|
68
|
+
pause() {
|
|
69
|
+
if (this.paused) return;
|
|
70
|
+
this.paused = true;
|
|
71
|
+
const now = Date.now();
|
|
72
|
+
for (const timer of this.timers.values()) {
|
|
73
|
+
clearTimeout(timer.handle);
|
|
74
|
+
timer.handle = void 0;
|
|
75
|
+
timer.remaining -= now - timer.startedAt;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
resume() {
|
|
79
|
+
if (!this.paused) return;
|
|
80
|
+
this.paused = false;
|
|
81
|
+
for (const [id, timer] of this.timers) this.run(id, timer);
|
|
82
|
+
}
|
|
83
|
+
destroy() {
|
|
84
|
+
for (const id of [...this.timers.keys()]) this.clearTimer(id);
|
|
85
|
+
this.listeners.clear();
|
|
86
|
+
}
|
|
87
|
+
startTimer(id, duration) {
|
|
88
|
+
if (!Number.isFinite(duration)) return;
|
|
89
|
+
const timer = {
|
|
90
|
+
remaining: duration,
|
|
91
|
+
startedAt: Date.now()
|
|
92
|
+
};
|
|
93
|
+
this.timers.set(id, timer);
|
|
94
|
+
if (!this.paused) this.run(id, timer);
|
|
95
|
+
}
|
|
96
|
+
run(id, timer) {
|
|
97
|
+
timer.startedAt = Date.now();
|
|
98
|
+
timer.handle = setTimeout(() => this.dismiss(id), Math.max(0, timer.remaining));
|
|
99
|
+
}
|
|
100
|
+
clearTimer(id) {
|
|
101
|
+
clearTimeout(this.timers.get(id)?.handle);
|
|
102
|
+
this.timers.delete(id);
|
|
103
|
+
}
|
|
104
|
+
emit() {
|
|
105
|
+
for (const listener of this.listeners) listener(this.toasts);
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
var VdToaster = class VdToaster {
|
|
109
|
+
store = new VdToastStore(VD_TOAST_DEFAULTS);
|
|
110
|
+
list = signal([], ...ngDevMode ? [{ debugName: "list" }] : /* istanbul ignore next */ []);
|
|
111
|
+
toasts = this.list.asReadonly();
|
|
112
|
+
constructor() {
|
|
113
|
+
this.store.subscribe((t) => this.list.set(t));
|
|
114
|
+
inject(DestroyRef).onDestroy(() => this.store.destroy());
|
|
115
|
+
}
|
|
116
|
+
show(toast) {
|
|
117
|
+
return this.store.show(toast);
|
|
118
|
+
}
|
|
119
|
+
success(title, description) {
|
|
120
|
+
return this.show({
|
|
121
|
+
title,
|
|
122
|
+
description,
|
|
123
|
+
variant: "success"
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
error(title, description) {
|
|
127
|
+
return this.show({
|
|
128
|
+
title,
|
|
129
|
+
description,
|
|
130
|
+
variant: "danger"
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
dismiss(id) {
|
|
134
|
+
this.store.dismiss(id);
|
|
135
|
+
}
|
|
136
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
137
|
+
minVersion: "12.0.0",
|
|
138
|
+
version: "22.2.1",
|
|
139
|
+
ngImport: i0,
|
|
140
|
+
type: VdToaster,
|
|
141
|
+
deps: [],
|
|
142
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
143
|
+
});
|
|
144
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
145
|
+
minVersion: "12.0.0",
|
|
146
|
+
version: "22.2.1",
|
|
147
|
+
ngImport: i0,
|
|
148
|
+
type: VdToaster,
|
|
149
|
+
providedIn: "root"
|
|
150
|
+
});
|
|
151
|
+
};
|
|
152
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
153
|
+
minVersion: "12.0.0",
|
|
154
|
+
version: "22.2.1",
|
|
155
|
+
ngImport: i0,
|
|
156
|
+
type: VdToaster,
|
|
157
|
+
decorators: [{
|
|
158
|
+
type: Injectable,
|
|
159
|
+
args: [{ providedIn: "root" }]
|
|
160
|
+
}],
|
|
161
|
+
ctorParameters: () => []
|
|
162
|
+
});
|
|
163
|
+
const ICONS = {
|
|
164
|
+
success: "check-circle",
|
|
165
|
+
danger: "alert-circle",
|
|
166
|
+
warning: "alert-triangle",
|
|
167
|
+
info: "info"
|
|
168
|
+
};
|
|
169
|
+
var VdToasterOutlet = class VdToasterOutlet {
|
|
170
|
+
label = input(...ngDevMode ? [void 0, { debugName: "label" }] : /* istanbul ignore next */ []);
|
|
171
|
+
closeLabel = input(...ngDevMode ? [void 0, { debugName: "closeLabel" }] : /* istanbul ignore next */ []);
|
|
172
|
+
t = vdTexts("toast", {
|
|
173
|
+
label: this.label,
|
|
174
|
+
closeLabel: this.closeLabel
|
|
175
|
+
});
|
|
176
|
+
toaster = inject(VdToaster);
|
|
177
|
+
icons = ICONS;
|
|
178
|
+
el = inject(ElementRef).nativeElement;
|
|
179
|
+
hasToasts = computed(() => this.toaster.toasts().length > 0, ...ngDevMode ? [{ debugName: "hasToasts" }] : /* istanbul ignore next */ []);
|
|
180
|
+
constructor() {
|
|
181
|
+
afterRenderEffect(() => {
|
|
182
|
+
const show = this.hasToasts();
|
|
183
|
+
if (!this.el.showPopover) return;
|
|
184
|
+
const open = this.el.matches(":popover-open");
|
|
185
|
+
if (show && !open) this.el.showPopover();
|
|
186
|
+
if (!show && open) this.el.hidePopover();
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
resumeUnlessFocused() {
|
|
190
|
+
if (!this.el.contains(this.el.ownerDocument.activeElement)) this.toaster.store.resume();
|
|
191
|
+
}
|
|
192
|
+
resumeIfLeaving(event) {
|
|
193
|
+
if (!this.el.contains(event.relatedTarget) && !this.el.matches(":hover")) this.toaster.store.resume();
|
|
194
|
+
}
|
|
195
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
196
|
+
minVersion: "12.0.0",
|
|
197
|
+
version: "22.2.1",
|
|
198
|
+
ngImport: i0,
|
|
199
|
+
type: VdToasterOutlet,
|
|
200
|
+
deps: [],
|
|
201
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
202
|
+
});
|
|
203
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
204
|
+
minVersion: "17.0.0",
|
|
205
|
+
version: "22.2.1",
|
|
206
|
+
type: VdToasterOutlet,
|
|
207
|
+
isStandalone: true,
|
|
208
|
+
selector: "vd-toaster",
|
|
209
|
+
inputs: {
|
|
210
|
+
label: {
|
|
211
|
+
classPropertyName: "label",
|
|
212
|
+
publicName: "label",
|
|
213
|
+
isSignal: true,
|
|
214
|
+
isRequired: false,
|
|
215
|
+
transformFunction: null
|
|
216
|
+
},
|
|
217
|
+
closeLabel: {
|
|
218
|
+
classPropertyName: "closeLabel",
|
|
219
|
+
publicName: "closeLabel",
|
|
220
|
+
isSignal: true,
|
|
221
|
+
isRequired: false,
|
|
222
|
+
transformFunction: null
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
host: {
|
|
226
|
+
attributes: {
|
|
227
|
+
"popover": "manual",
|
|
228
|
+
"role": "region"
|
|
229
|
+
},
|
|
230
|
+
listeners: {
|
|
231
|
+
"pointerenter": "toaster.store.pause()",
|
|
232
|
+
"pointerleave": "resumeUnlessFocused()",
|
|
233
|
+
"focusin": "toaster.store.pause()",
|
|
234
|
+
"focusout": "resumeIfLeaving($event)"
|
|
235
|
+
},
|
|
236
|
+
properties: { "attr.aria-label": "t().label" },
|
|
237
|
+
classAttribute: "vd-toaster"
|
|
238
|
+
},
|
|
239
|
+
ngImport: i0,
|
|
240
|
+
template: `
|
|
241
|
+
<ol class="vd-toaster__list" aria-live="polite" aria-relevant="additions">
|
|
242
|
+
@for (toast of toaster.toasts(); track toast.id) {
|
|
243
|
+
<li
|
|
244
|
+
class="vd-toast"
|
|
245
|
+
[attr.data-variant]="toast.variant"
|
|
246
|
+
[attr.data-state]="toast.state"
|
|
247
|
+
[attr.role]="toast.variant === 'danger' ? 'alert' : null"
|
|
248
|
+
aria-atomic="true"
|
|
249
|
+
>
|
|
250
|
+
@if (icons[toast.variant]; as icon) {
|
|
251
|
+
<vd-icon class="vd-toast__icon" [name]="icon" />
|
|
252
|
+
}
|
|
253
|
+
<div class="vd-toast__content">
|
|
254
|
+
<p class="vd-toast__title">{{ toast.title }}</p>
|
|
255
|
+
@if (toast.description) {
|
|
256
|
+
<p class="vd-toast__description">{{ toast.description }}</p>
|
|
257
|
+
}
|
|
258
|
+
</div>
|
|
259
|
+
@if (toast.action; as action) {
|
|
260
|
+
<button
|
|
261
|
+
vdButton
|
|
262
|
+
size="sm"
|
|
263
|
+
class="vd-toast__action"
|
|
264
|
+
(click)="action.onClick(); toaster.dismiss(toast.id)"
|
|
265
|
+
>
|
|
266
|
+
{{ action.label }}
|
|
267
|
+
</button>
|
|
268
|
+
}
|
|
269
|
+
<button
|
|
270
|
+
vdButton
|
|
271
|
+
variant="ghost"
|
|
272
|
+
size="sm"
|
|
273
|
+
iconOnly
|
|
274
|
+
class="vd-toast__close"
|
|
275
|
+
[attr.aria-label]="t().closeLabel"
|
|
276
|
+
(click)="toaster.dismiss(toast.id)"
|
|
277
|
+
>
|
|
278
|
+
<vd-icon name="x" />
|
|
279
|
+
</button>
|
|
280
|
+
</li>
|
|
281
|
+
}
|
|
282
|
+
</ol>
|
|
283
|
+
`,
|
|
284
|
+
isInline: true,
|
|
285
|
+
dependencies: [{
|
|
286
|
+
kind: "component",
|
|
287
|
+
type: VdButton,
|
|
288
|
+
selector: "button[vdButton], a[vdButton]",
|
|
289
|
+
inputs: [
|
|
290
|
+
"variant",
|
|
291
|
+
"size",
|
|
292
|
+
"disabled",
|
|
293
|
+
"loading",
|
|
294
|
+
"iconOnly",
|
|
295
|
+
"type"
|
|
296
|
+
]
|
|
297
|
+
}, {
|
|
298
|
+
kind: "component",
|
|
299
|
+
type: VdIcon,
|
|
300
|
+
selector: "vd-icon",
|
|
301
|
+
inputs: ["name", "label"]
|
|
302
|
+
}],
|
|
303
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
304
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
305
|
+
});
|
|
306
|
+
};
|
|
307
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
308
|
+
minVersion: "12.0.0",
|
|
309
|
+
version: "22.2.1",
|
|
310
|
+
ngImport: i0,
|
|
311
|
+
type: VdToasterOutlet,
|
|
312
|
+
decorators: [{
|
|
313
|
+
type: Component,
|
|
314
|
+
args: [{
|
|
315
|
+
selector: "vd-toaster",
|
|
316
|
+
imports: [VdButton, VdIcon],
|
|
317
|
+
template: `
|
|
318
|
+
<ol class="vd-toaster__list" aria-live="polite" aria-relevant="additions">
|
|
319
|
+
@for (toast of toaster.toasts(); track toast.id) {
|
|
320
|
+
<li
|
|
321
|
+
class="vd-toast"
|
|
322
|
+
[attr.data-variant]="toast.variant"
|
|
323
|
+
[attr.data-state]="toast.state"
|
|
324
|
+
[attr.role]="toast.variant === 'danger' ? 'alert' : null"
|
|
325
|
+
aria-atomic="true"
|
|
326
|
+
>
|
|
327
|
+
@if (icons[toast.variant]; as icon) {
|
|
328
|
+
<vd-icon class="vd-toast__icon" [name]="icon" />
|
|
329
|
+
}
|
|
330
|
+
<div class="vd-toast__content">
|
|
331
|
+
<p class="vd-toast__title">{{ toast.title }}</p>
|
|
332
|
+
@if (toast.description) {
|
|
333
|
+
<p class="vd-toast__description">{{ toast.description }}</p>
|
|
334
|
+
}
|
|
335
|
+
</div>
|
|
336
|
+
@if (toast.action; as action) {
|
|
337
|
+
<button
|
|
338
|
+
vdButton
|
|
339
|
+
size="sm"
|
|
340
|
+
class="vd-toast__action"
|
|
341
|
+
(click)="action.onClick(); toaster.dismiss(toast.id)"
|
|
342
|
+
>
|
|
343
|
+
{{ action.label }}
|
|
344
|
+
</button>
|
|
345
|
+
}
|
|
346
|
+
<button
|
|
347
|
+
vdButton
|
|
348
|
+
variant="ghost"
|
|
349
|
+
size="sm"
|
|
350
|
+
iconOnly
|
|
351
|
+
class="vd-toast__close"
|
|
352
|
+
[attr.aria-label]="t().closeLabel"
|
|
353
|
+
(click)="toaster.dismiss(toast.id)"
|
|
354
|
+
>
|
|
355
|
+
<vd-icon name="x" />
|
|
356
|
+
</button>
|
|
357
|
+
</li>
|
|
358
|
+
}
|
|
359
|
+
</ol>
|
|
360
|
+
`,
|
|
361
|
+
host: {
|
|
362
|
+
class: "vd-toaster",
|
|
363
|
+
popover: "manual",
|
|
364
|
+
role: "region",
|
|
365
|
+
"[attr.aria-label]": "t().label",
|
|
366
|
+
"(pointerenter)": "toaster.store.pause()",
|
|
367
|
+
"(pointerleave)": "resumeUnlessFocused()",
|
|
368
|
+
"(focusin)": "toaster.store.pause()",
|
|
369
|
+
"(focusout)": "resumeIfLeaving($event)"
|
|
370
|
+
},
|
|
371
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
372
|
+
encapsulation: ViewEncapsulation.None
|
|
373
|
+
}]
|
|
374
|
+
}],
|
|
375
|
+
ctorParameters: () => [],
|
|
376
|
+
propDecorators: {
|
|
377
|
+
label: [{
|
|
378
|
+
type: i0.Input,
|
|
379
|
+
args: [{
|
|
380
|
+
isSignal: true,
|
|
381
|
+
alias: "label",
|
|
382
|
+
required: false
|
|
383
|
+
}]
|
|
384
|
+
}],
|
|
385
|
+
closeLabel: [{
|
|
386
|
+
type: i0.Input,
|
|
387
|
+
args: [{
|
|
388
|
+
isSignal: true,
|
|
389
|
+
alias: "closeLabel",
|
|
390
|
+
required: false
|
|
391
|
+
}]
|
|
392
|
+
}]
|
|
393
|
+
}
|
|
394
|
+
});
|
|
395
|
+
export { VD_TOAST_DEFAULTS, VdToastStore, VdToaster, VdToasterOutlet };
|
|
396
|
+
|
|
397
|
+
//# sourceMappingURL=vadem-ui-toast.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vadem-ui-toast.mjs","names":[],"sources":["../../../projects/ui/toast/src/core/toast-store.ts","../../../projects/ui/toast/src/toast.ts"],"sourcesContent":["/**\n * Framework-agnostic toast queue: ids, auto-dismiss timers that pause while the user is\n * interacting (hover/focus), a cap on visible toasts, and a two-phase exit (\"leaving\" for the\n * exit animation, then removed). Adapters subscribe and render.\n */\n\nexport type VdToastVariant = 'neutral' | 'success' | 'warning' | 'danger' | 'info';\n\nexport interface VdToastAction {\n label: string;\n onClick: () => void;\n}\n\nexport interface VdToastInput {\n title: string;\n description?: string;\n variant?: VdToastVariant;\n action?: VdToastAction;\n /** Auto-dismiss after ms. `Infinity` keeps it until dismissed. Default depends on content. */\n duration?: number;\n}\n\nexport interface VdToast extends Required<Pick<VdToastInput, 'title' | 'variant'>> {\n id: number;\n description?: string;\n action?: VdToastAction;\n duration: number;\n state: 'open' | 'leaving';\n}\n\nexport interface VdToastStoreOptions {\n /** Max toasts shown at once; older ones leave first. */\n max: number;\n /** Default lifetime, ms. Toasts with an action get double, giving time to reach it. */\n duration: number;\n /** How long the exit animation may take before removal, ms. */\n exitDuration: number;\n}\n\nexport const VD_TOAST_DEFAULTS: VdToastStoreOptions = { max: 3, duration: 5000, exitDuration: 300 };\n\ninterface Timer {\n handle?: ReturnType<typeof setTimeout>;\n remaining: number;\n startedAt: number;\n}\n\nexport class VdToastStore {\n private toasts: VdToast[] = [];\n private readonly timers = new Map<number, Timer>();\n private readonly listeners = new Set<(toasts: readonly VdToast[]) => void>();\n private nextId = 1;\n private paused = false;\n\n constructor(private readonly options: VdToastStoreOptions = VD_TOAST_DEFAULTS) {}\n\n get snapshot(): readonly VdToast[] {\n return this.toasts;\n }\n\n subscribe(listener: (toasts: readonly VdToast[]) => void): () => void {\n this.listeners.add(listener);\n listener(this.toasts);\n return () => this.listeners.delete(listener);\n }\n\n show(input: VdToastInput): number {\n const id = this.nextId++;\n const duration =\n input.duration ?? (input.action ? this.options.duration * 2 : this.options.duration);\n const toast: VdToast = {\n id,\n title: input.title,\n description: input.description,\n variant: input.variant ?? 'neutral',\n action: input.action,\n duration,\n state: 'open',\n };\n this.toasts = [...this.toasts, toast];\n this.startTimer(id, duration);\n\n const open = this.toasts.filter((t) => t.state === 'open');\n for (const extra of open.slice(0, Math.max(0, open.length - this.options.max))) {\n this.dismiss(extra.id);\n }\n this.emit();\n return id;\n }\n\n /** Starts the exit; the toast is removed after the exit animation (or `exitDuration`). */\n dismiss(id: number): void {\n const toast = this.toasts.find((t) => t.id === id);\n if (!toast || toast.state === 'leaving') return;\n this.clearTimer(id);\n this.toasts = this.toasts.map((t) => (t.id === id ? { ...t, state: 'leaving' } : t));\n this.emit();\n setTimeout(() => this.remove(id), this.options.exitDuration);\n }\n\n /** Removes immediately (call when the exit animation has ended). */\n remove(id: number): void {\n if (!this.toasts.some((t) => t.id === id)) return;\n this.clearTimer(id);\n this.toasts = this.toasts.filter((t) => t.id !== id);\n this.emit();\n }\n\n dismissAll(): void {\n for (const t of this.toasts) this.dismiss(t.id);\n }\n\n /** Pause every timer (pointer or focus inside the toaster - WCAG 2.2.1). */\n pause(): void {\n if (this.paused) return;\n this.paused = true;\n const now = Date.now();\n for (const timer of this.timers.values()) {\n clearTimeout(timer.handle);\n timer.handle = undefined;\n timer.remaining -= now - timer.startedAt;\n }\n }\n\n resume(): void {\n if (!this.paused) return;\n this.paused = false;\n for (const [id, timer] of this.timers) this.run(id, timer);\n }\n\n destroy(): void {\n for (const id of [...this.timers.keys()]) this.clearTimer(id);\n this.listeners.clear();\n }\n\n private startTimer(id: number, duration: number): void {\n if (!Number.isFinite(duration)) return;\n const timer: Timer = { remaining: duration, startedAt: Date.now() };\n this.timers.set(id, timer);\n if (!this.paused) this.run(id, timer);\n }\n\n private run(id: number, timer: Timer): void {\n timer.startedAt = Date.now();\n timer.handle = setTimeout(() => this.dismiss(id), Math.max(0, timer.remaining));\n }\n\n private clearTimer(id: number): void {\n clearTimeout(this.timers.get(id)?.handle);\n this.timers.delete(id);\n }\n\n private emit(): void {\n for (const listener of this.listeners) listener(this.toasts);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n Injectable,\n ViewEncapsulation,\n afterRenderEffect,\n computed,\n inject,\n input,\n signal,\n} from '@angular/core';\nimport { VdButton } from '@vadem/ui/button';\nimport { VdIcon, VdIconName } from '@vadem/ui/icon';\nimport {\n VD_TOAST_DEFAULTS,\n VdToast,\n VdToastInput,\n VdToastStore,\n VdToastVariant,\n} from './core/toast-store';\nimport { vdTexts } from '@vadem/ui/locale';\n\n/** App-wide toast queue. Render it once with `<vd-toaster />`. Spec: specs/toast.md */\n@Injectable({ providedIn: 'root' })\nexport class VdToaster {\n readonly store = new VdToastStore(VD_TOAST_DEFAULTS);\n private readonly list = signal<readonly VdToast[]>([]);\n readonly toasts = this.list.asReadonly();\n\n constructor() {\n this.store.subscribe((t) => this.list.set(t));\n inject(DestroyRef).onDestroy(() => this.store.destroy());\n }\n\n show(toast: VdToastInput): number {\n return this.store.show(toast);\n }\n\n success(title: string, description?: string): number {\n return this.show({ title, description, variant: 'success' });\n }\n\n error(title: string, description?: string): number {\n return this.show({ title, description, variant: 'danger' });\n }\n\n dismiss(id: number): void {\n this.store.dismiss(id);\n }\n}\n\nconst ICONS: Partial<Record<VdToastVariant, VdIconName>> = {\n success: 'check-circle',\n danger: 'alert-circle',\n warning: 'alert-triangle',\n info: 'info',\n};\n\n@Component({\n selector: 'vd-toaster',\n imports: [VdButton, VdIcon],\n template: `\n <ol class=\"vd-toaster__list\" aria-live=\"polite\" aria-relevant=\"additions\">\n @for (toast of toaster.toasts(); track toast.id) {\n <li\n class=\"vd-toast\"\n [attr.data-variant]=\"toast.variant\"\n [attr.data-state]=\"toast.state\"\n [attr.role]=\"toast.variant === 'danger' ? 'alert' : null\"\n aria-atomic=\"true\"\n >\n @if (icons[toast.variant]; as icon) {\n <vd-icon class=\"vd-toast__icon\" [name]=\"icon\" />\n }\n <div class=\"vd-toast__content\">\n <p class=\"vd-toast__title\">{{ toast.title }}</p>\n @if (toast.description) {\n <p class=\"vd-toast__description\">{{ toast.description }}</p>\n }\n </div>\n @if (toast.action; as action) {\n <button\n vdButton\n size=\"sm\"\n class=\"vd-toast__action\"\n (click)=\"action.onClick(); toaster.dismiss(toast.id)\"\n >\n {{ action.label }}\n </button>\n }\n <button\n vdButton\n variant=\"ghost\"\n size=\"sm\"\n iconOnly\n class=\"vd-toast__close\"\n [attr.aria-label]=\"t().closeLabel\"\n (click)=\"toaster.dismiss(toast.id)\"\n >\n <vd-icon name=\"x\" />\n </button>\n </li>\n }\n </ol>\n `,\n host: {\n class: 'vd-toaster',\n popover: 'manual',\n role: 'region',\n '[attr.aria-label]': 't().label',\n '(pointerenter)': 'toaster.store.pause()',\n '(pointerleave)': 'resumeUnlessFocused()',\n '(focusin)': 'toaster.store.pause()',\n '(focusout)': 'resumeIfLeaving($event)',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class VdToasterOutlet {\n /** Landmark name for the region (localize it). */\n readonly label = input<string>();\n readonly closeLabel = input<string>();\n /** Text inputs resolved against the active VD_LOCALE. */\n protected readonly t = vdTexts('toast', { label: this.label, closeLabel: this.closeLabel });\n\n protected readonly toaster = inject(VdToaster);\n protected readonly icons = ICONS;\n private readonly el: HTMLElement = inject(ElementRef).nativeElement;\n private readonly hasToasts = computed(() => this.toaster.toasts().length > 0);\n\n constructor() {\n // Browser-only: keep the region in the top layer while it has toasts.\n afterRenderEffect(() => {\n const show = this.hasToasts();\n if (!this.el.showPopover) return;\n const open = this.el.matches(':popover-open');\n if (show && !open) this.el.showPopover();\n if (!show && open) this.el.hidePopover();\n });\n }\n\n protected resumeUnlessFocused(): void {\n if (!this.el.contains(this.el.ownerDocument.activeElement)) this.toaster.store.resume();\n }\n\n protected resumeIfLeaving(event: FocusEvent): void {\n if (!this.el.contains(event.relatedTarget as Node | null) && !this.el.matches(':hover')) {\n this.toaster.store.resume();\n }\n }\n}\n"],"mappings":";;;;;AAuCA,MAAa,oBAAyC;CAAE,KAAK;CAAG,UAAU;CAAM,cAAc;AAAG;AAQjG,IAAa,eAAb,MAAyB;CAOM;CANrB,SAAoB,CAAA;CACX,yBAAS,IAAI,IAAG;CAChB,4BAAY,IAAI,IAAG;CAC5B,SAAS;CACT,SAAS;CAEjB,YAA6B,UAA+B,mBAAiB;EAAhD,KAAA,UAAA;CAAmD;CAEhF,IAAI,WAAQ;EACV,OAAO,KAAK;CACd;CAEA,UAAU,UAA8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