@capgo/capacitor-pretty-toast 8.1.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/CapgoCapacitorPrettyToast.podspec +17 -0
- package/LICENSE +373 -0
- package/Package.swift +28 -0
- package/README.md +341 -0
- package/android/build.gradle +71 -0
- package/android/src/main/AndroidManifest.xml +6 -0
- package/android/src/main/java/com/toast/PrettyToastPlugin.kt +197 -0
- package/android/src/main/java/com/toast/ToastOverlay.kt +495 -0
- package/android/src/main/java/com/toast/anim/CutoutMorphAnimator.kt +235 -0
- package/android/src/main/java/com/toast/anim/SlideAnimator.kt +64 -0
- package/android/src/main/java/com/toast/anim/ToastAnimator.kt +23 -0
- package/android/src/main/java/com/toast/backdrop/BackdropSampler.kt +142 -0
- package/android/src/main/java/com/toast/backdrop/OutlineController.kt +100 -0
- package/android/src/main/java/com/toast/cutout/CutoutDetector.kt +88 -0
- package/android/src/main/java/com/toast/cutout/CutoutInfo.kt +28 -0
- package/android/src/main/java/com/toast/gesture/ToastGestureHandler.kt +68 -0
- package/android/src/main/java/com/toast/ui/IconMapper.kt +26 -0
- package/android/src/main/java/com/toast/ui/PassThroughFrameLayout.kt +53 -0
- package/android/src/main/java/com/toast/ui/ToastViewFactory.kt +224 -0
- package/android/src/main/java/com/toast/util/Density.kt +17 -0
- package/android/src/main/java/com/toast/util/StatusBarController.kt +24 -0
- package/android/src/main/java/com/toast/util/ToastConstants.kt +36 -0
- package/android/src/main/res/.gitkeep +0 -0
- package/android/src/main/res/drawable/ic_arrow_downward.xml +9 -0
- package/android/src/main/res/drawable/ic_arrow_upward.xml +9 -0
- package/android/src/main/res/drawable/ic_cancel.xml +9 -0
- package/android/src/main/res/drawable/ic_check_circle.xml +9 -0
- package/android/src/main/res/drawable/ic_favorite.xml +9 -0
- package/android/src/main/res/drawable/ic_info.xml +9 -0
- package/android/src/main/res/drawable/ic_mail.xml +9 -0
- package/android/src/main/res/drawable/ic_notifications.xml +9 -0
- package/android/src/main/res/drawable/ic_touch_app.xml +9 -0
- package/android/src/main/res/drawable/ic_warning.xml +9 -0
- package/android/src/main/res/drawable/ic_wifi.xml +9 -0
- package/android/src/main/res/values/colors.xml +3 -0
- package/android/src/main/res/values/strings.xml +3 -0
- package/android/src/main/res/values/styles.xml +3 -0
- package/android/src/test/java/com/toast/PrettyToastPluginTest.kt +26 -0
- package/dist/docs.json +459 -0
- package/dist/esm/controller.d.ts +30 -0
- package/dist/esm/controller.js +271 -0
- package/dist/esm/controller.js.map +1 -0
- package/dist/esm/definitions.d.ts +144 -0
- package/dist/esm/definitions.js +2 -0
- package/dist/esm/definitions.js.map +1 -0
- package/dist/esm/driver.d.ts +19 -0
- package/dist/esm/driver.js +24 -0
- package/dist/esm/driver.js.map +1 -0
- package/dist/esm/icons.d.ts +14 -0
- package/dist/esm/icons.js +138 -0
- package/dist/esm/icons.js.map +1 -0
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/internal-plugin.d.ts +2 -0
- package/dist/esm/internal-plugin.js +5 -0
- package/dist/esm/internal-plugin.js.map +1 -0
- package/dist/esm/internal-types.d.ts +31 -0
- package/dist/esm/internal-types.js +2 -0
- package/dist/esm/internal-types.js.map +1 -0
- package/dist/esm/toast.d.ts +1 -0
- package/dist/esm/toast.js +5 -0
- package/dist/esm/toast.js.map +1 -0
- package/dist/esm/web-renderer.d.ts +36 -0
- package/dist/esm/web-renderer.js +296 -0
- package/dist/esm/web-renderer.js.map +1 -0
- package/dist/esm/web.d.ts +10 -0
- package/dist/esm/web.js +28 -0
- package/dist/esm/web.js.map +1 -0
- package/dist/plugin.cjs.js +770 -0
- package/dist/plugin.cjs.js.map +1 -0
- package/dist/plugin.js +773 -0
- package/dist/plugin.js.map +1 -0
- package/ios/Sources/PrettyToastPlugin/CustomHostingView.swift +13 -0
- package/ios/Sources/PrettyToastPlugin/PassThroughWindow.swift +143 -0
- package/ios/Sources/PrettyToastPlugin/PrettyToastColorParser.swift +94 -0
- package/ios/Sources/PrettyToastPlugin/PrettyToastPlugin.swift +138 -0
- package/ios/Sources/PrettyToastPlugin/PrettyToastView.swift +267 -0
- package/ios/Sources/PrettyToastPlugin/Toast.swift +29 -0
- package/ios/Sources/PrettyToastPlugin/ToastManager.swift +392 -0
- package/ios/Tests/PrettyToastPluginTests/PrettyToastPluginTests.swift +21 -0
- package/package.json +98 -0
- package/scripts/check-capacitor-plugin-wiring.mjs +254 -0
- package/scripts/deploy-example-capgo.mjs +86 -0
- package/scripts/test-ios.sh +14 -0
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import { blobUrlToDataUrl, getAccessibilityAnnouncement, isNativeSafeIconUri, isSvgIcon, normalizeIconSource, rasterizeSvgToPngDataUrl, DEFAULT_ICON_SYMBOL, } from './icons';
|
|
2
|
+
const VARIANT_ICONS = {
|
|
3
|
+
success: 'checkmark.circle.fill',
|
|
4
|
+
error: 'xmark.circle.fill',
|
|
5
|
+
info: 'info.circle.fill',
|
|
6
|
+
warning: 'exclamationmark.triangle.fill',
|
|
7
|
+
loading: 'arrow.triangle.2.circlepath',
|
|
8
|
+
};
|
|
9
|
+
export class ToastController {
|
|
10
|
+
constructor(driver) {
|
|
11
|
+
this.driver = driver;
|
|
12
|
+
this.queue = [];
|
|
13
|
+
this.current = null;
|
|
14
|
+
this.isShowing = false;
|
|
15
|
+
this.idCounter = 0;
|
|
16
|
+
this.autoDismissTimer = null;
|
|
17
|
+
this.autoDismissed = false;
|
|
18
|
+
this.driver.subscribe({
|
|
19
|
+
onDismiss: (event) => this.handleDismiss(event.id),
|
|
20
|
+
onPress: (event) => this.handlePress(event.id),
|
|
21
|
+
onActionPress: (event) => this.handleActionPress(event.id),
|
|
22
|
+
});
|
|
23
|
+
this.ref = {
|
|
24
|
+
show: (config, options) => this.show(config, options),
|
|
25
|
+
success: (title, config, options) => this.showVariant('success', title, config, options),
|
|
26
|
+
error: (title, config, options) => this.showVariant('error', title, config, options),
|
|
27
|
+
info: (title, config, options) => this.showVariant('info', title, config, options),
|
|
28
|
+
warning: (title, config, options) => this.showVariant('warning', title, config, options),
|
|
29
|
+
loading: (title, config, options) => this.showVariant('loading', title, config, options),
|
|
30
|
+
update: (id, partial) => this.update(id, partial),
|
|
31
|
+
promise: (promise, messages) => this.promise(promise, messages),
|
|
32
|
+
dismiss: (id) => this.dismiss(id),
|
|
33
|
+
dismissAll: () => this.dismissAll(),
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
show(config, options) {
|
|
37
|
+
var _a, _b;
|
|
38
|
+
const id = (_a = config.id) !== null && _a !== void 0 ? _a : this.generateId();
|
|
39
|
+
const entry = this.hydrateEntry(Object.assign(Object.assign({}, config), { id }));
|
|
40
|
+
if ((options === null || options === void 0 ? void 0 : options.force) && this.isShowing) {
|
|
41
|
+
this.queue.unshift(entry);
|
|
42
|
+
this.clearAutoDismissTimer();
|
|
43
|
+
this.autoDismissed = false;
|
|
44
|
+
void this.driver.dismiss((_b = this.current) === null || _b === void 0 ? void 0 : _b.id);
|
|
45
|
+
return id;
|
|
46
|
+
}
|
|
47
|
+
if (!this.isShowing) {
|
|
48
|
+
this.presentToast(entry);
|
|
49
|
+
return id;
|
|
50
|
+
}
|
|
51
|
+
this.queue.push(entry);
|
|
52
|
+
this.prepareSvgIcon(entry);
|
|
53
|
+
return id;
|
|
54
|
+
}
|
|
55
|
+
update(id, partial) {
|
|
56
|
+
var _a;
|
|
57
|
+
if (((_a = this.current) === null || _a === void 0 ? void 0 : _a.id) === id) {
|
|
58
|
+
this.current = this.hydrateEntry(Object.assign(Object.assign(Object.assign({}, this.current), partial), { id }), this.current);
|
|
59
|
+
this.armAutoDismissTimer(this.current);
|
|
60
|
+
void this.driver.update(this.buildPayload(this.current));
|
|
61
|
+
this.prepareSvgIcon(this.current);
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
const index = this.queue.findIndex((entry) => entry.id === id);
|
|
65
|
+
if (index === -1)
|
|
66
|
+
return;
|
|
67
|
+
const existing = this.queue[index];
|
|
68
|
+
const updated = this.hydrateEntry(Object.assign(Object.assign(Object.assign({}, existing), partial), { id }), existing);
|
|
69
|
+
this.queue[index] = updated;
|
|
70
|
+
this.prepareSvgIcon(updated);
|
|
71
|
+
}
|
|
72
|
+
dismiss(id) {
|
|
73
|
+
var _a;
|
|
74
|
+
if (id && ((_a = this.current) === null || _a === void 0 ? void 0 : _a.id) !== id) {
|
|
75
|
+
this.queue = this.queue.filter((entry) => entry.id !== id);
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
if (!this.current)
|
|
79
|
+
return;
|
|
80
|
+
this.clearAutoDismissTimer();
|
|
81
|
+
this.autoDismissed = false;
|
|
82
|
+
void this.driver.dismiss(this.current.id);
|
|
83
|
+
}
|
|
84
|
+
dismissAll() {
|
|
85
|
+
this.queue = [];
|
|
86
|
+
if (!this.current)
|
|
87
|
+
return;
|
|
88
|
+
this.clearAutoDismissTimer();
|
|
89
|
+
this.autoDismissed = false;
|
|
90
|
+
void this.driver.dismiss(this.current.id);
|
|
91
|
+
}
|
|
92
|
+
promise(promise, messages) {
|
|
93
|
+
const loadingConfig = typeof messages.loading === 'string'
|
|
94
|
+
? { title: messages.loading }
|
|
95
|
+
: Object.assign({}, messages.loading);
|
|
96
|
+
if (loadingConfig.autoDismiss === undefined) {
|
|
97
|
+
loadingConfig.autoDismiss = false;
|
|
98
|
+
}
|
|
99
|
+
if (!loadingConfig.icon) {
|
|
100
|
+
loadingConfig.icon = VARIANT_ICONS.loading;
|
|
101
|
+
}
|
|
102
|
+
const id = this.show(loadingConfig);
|
|
103
|
+
promise.then((value) => {
|
|
104
|
+
const next = typeof messages.success === 'function' ? messages.success(value) : messages.success;
|
|
105
|
+
const config = typeof next === 'string' ? { title: next } : Object.assign({}, next);
|
|
106
|
+
if (!config.icon)
|
|
107
|
+
config.icon = VARIANT_ICONS.success;
|
|
108
|
+
if (config.autoDismiss === undefined)
|
|
109
|
+
config.autoDismiss = true;
|
|
110
|
+
if (config.duration === undefined)
|
|
111
|
+
config.duration = 3000;
|
|
112
|
+
this.update(id, config);
|
|
113
|
+
}, (error) => {
|
|
114
|
+
const next = typeof messages.error === 'function' ? messages.error(error) : messages.error;
|
|
115
|
+
const config = typeof next === 'string' ? { title: next } : Object.assign({}, next);
|
|
116
|
+
if (!config.icon)
|
|
117
|
+
config.icon = VARIANT_ICONS.error;
|
|
118
|
+
if (config.autoDismiss === undefined)
|
|
119
|
+
config.autoDismiss = true;
|
|
120
|
+
if (config.duration === undefined)
|
|
121
|
+
config.duration = 3000;
|
|
122
|
+
this.update(id, config);
|
|
123
|
+
});
|
|
124
|
+
return promise;
|
|
125
|
+
}
|
|
126
|
+
showVariant(variant, title, config, options) {
|
|
127
|
+
var _a;
|
|
128
|
+
const toastConfig = Object.assign(Object.assign({}, config), { title, icon: (_a = config === null || config === void 0 ? void 0 : config.icon) !== null && _a !== void 0 ? _a : VARIANT_ICONS[variant], _fallbackIcon: VARIANT_ICONS[variant] });
|
|
129
|
+
if (variant === 'loading' && toastConfig.autoDismiss === undefined) {
|
|
130
|
+
toastConfig.autoDismiss = false;
|
|
131
|
+
}
|
|
132
|
+
return this.show(toastConfig, options);
|
|
133
|
+
}
|
|
134
|
+
presentToast(entry) {
|
|
135
|
+
var _a;
|
|
136
|
+
this.isShowing = true;
|
|
137
|
+
this.current = entry;
|
|
138
|
+
this.armAutoDismissTimer(entry);
|
|
139
|
+
(_a = entry.onShow) === null || _a === void 0 ? void 0 : _a.call(entry);
|
|
140
|
+
void this.driver.show(this.buildPayload(entry));
|
|
141
|
+
this.prepareSvgIcon(entry);
|
|
142
|
+
}
|
|
143
|
+
showNext() {
|
|
144
|
+
const next = this.queue.shift();
|
|
145
|
+
if (!next) {
|
|
146
|
+
this.isShowing = false;
|
|
147
|
+
this.current = null;
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
this.presentToast(next);
|
|
151
|
+
}
|
|
152
|
+
handleDismiss(id) {
|
|
153
|
+
var _a, _b;
|
|
154
|
+
if (!this.current || this.current.id !== id)
|
|
155
|
+
return;
|
|
156
|
+
const entry = this.current;
|
|
157
|
+
this.clearAutoDismissTimer();
|
|
158
|
+
if (this.autoDismissed) {
|
|
159
|
+
(_a = entry.onAutoDismiss) === null || _a === void 0 ? void 0 : _a.call(entry);
|
|
160
|
+
}
|
|
161
|
+
(_b = entry.onHide) === null || _b === void 0 ? void 0 : _b.call(entry);
|
|
162
|
+
this.autoDismissed = false;
|
|
163
|
+
this.showNext();
|
|
164
|
+
}
|
|
165
|
+
handlePress(id) {
|
|
166
|
+
if (!this.current || this.current.id !== id || !this.current.onPress)
|
|
167
|
+
return;
|
|
168
|
+
this.current.onPress();
|
|
169
|
+
this.clearAutoDismissTimer();
|
|
170
|
+
this.autoDismissed = false;
|
|
171
|
+
void this.driver.dismiss(id);
|
|
172
|
+
}
|
|
173
|
+
handleActionPress(id) {
|
|
174
|
+
if (!this.current || this.current.id !== id || !this.current.action)
|
|
175
|
+
return;
|
|
176
|
+
this.current.action.onPress();
|
|
177
|
+
this.clearAutoDismissTimer();
|
|
178
|
+
this.autoDismissed = false;
|
|
179
|
+
void this.driver.dismiss(id);
|
|
180
|
+
}
|
|
181
|
+
armAutoDismissTimer(entry) {
|
|
182
|
+
var _a, _b;
|
|
183
|
+
this.clearAutoDismissTimer();
|
|
184
|
+
this.autoDismissed = false;
|
|
185
|
+
const autoDismiss = (_a = entry.autoDismiss) !== null && _a !== void 0 ? _a : true;
|
|
186
|
+
const duration = (_b = entry.duration) !== null && _b !== void 0 ? _b : 3000;
|
|
187
|
+
if (!autoDismiss || duration <= 0)
|
|
188
|
+
return;
|
|
189
|
+
this.autoDismissTimer = setTimeout(() => {
|
|
190
|
+
this.autoDismissTimer = null;
|
|
191
|
+
this.autoDismissed = true;
|
|
192
|
+
}, duration);
|
|
193
|
+
}
|
|
194
|
+
clearAutoDismissTimer() {
|
|
195
|
+
if (!this.autoDismissTimer)
|
|
196
|
+
return;
|
|
197
|
+
clearTimeout(this.autoDismissTimer);
|
|
198
|
+
this.autoDismissTimer = null;
|
|
199
|
+
}
|
|
200
|
+
hydrateEntry(config, previous) {
|
|
201
|
+
var _a, _b, _c;
|
|
202
|
+
const iconSourceUri = normalizeIconSource(config.iconSource);
|
|
203
|
+
const rawIcon = typeof config.icon === 'string' ? config.icon : '';
|
|
204
|
+
const rawSvg = !iconSourceUri && isSvgIcon(rawIcon) ? rawIcon.trim() : undefined;
|
|
205
|
+
const fallbackIcon = (_b = (_a = config._fallbackIcon) !== null && _a !== void 0 ? _a : previous === null || previous === void 0 ? void 0 : previous._fallbackIcon) !== null && _b !== void 0 ? _b : DEFAULT_ICON_SYMBOL;
|
|
206
|
+
const iconSymbol = rawSvg ? fallbackIcon : rawIcon || fallbackIcon;
|
|
207
|
+
const resolvedIconUri = iconSourceUri && isNativeSafeIconUri(iconSourceUri)
|
|
208
|
+
? iconSourceUri
|
|
209
|
+
: rawSvg && (previous === null || previous === void 0 ? void 0 : previous.rawSvg) === rawSvg
|
|
210
|
+
? previous.resolvedIconUri
|
|
211
|
+
: iconSourceUri && (previous === null || previous === void 0 ? void 0 : previous.iconSourceUri) === iconSourceUri
|
|
212
|
+
? previous.resolvedIconUri
|
|
213
|
+
: undefined;
|
|
214
|
+
return Object.assign(Object.assign({}, config), { id: config.id, iconSymbol,
|
|
215
|
+
iconSourceUri,
|
|
216
|
+
rawSvg,
|
|
217
|
+
resolvedIconUri, isPreparingSvg: rawSvg ? ((_c = previous === null || previous === void 0 ? void 0 : previous.isPreparingSvg) !== null && _c !== void 0 ? _c : false) : false });
|
|
218
|
+
}
|
|
219
|
+
buildPayload(entry) {
|
|
220
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
221
|
+
const iconUri = (_b = (_a = entry.iconSourceUri) !== null && _a !== void 0 ? _a : entry.resolvedIconUri) !== null && _b !== void 0 ? _b : '';
|
|
222
|
+
return {
|
|
223
|
+
id: entry.id,
|
|
224
|
+
icon: entry.iconSymbol,
|
|
225
|
+
iconUri,
|
|
226
|
+
webIconUri: (_c = entry.iconSourceUri) !== null && _c !== void 0 ? _c : iconUri,
|
|
227
|
+
iconSvg: entry.iconSourceUri ? '' : ((_d = entry.rawSvg) !== null && _d !== void 0 ? _d : ''),
|
|
228
|
+
title: (_e = entry.title) !== null && _e !== void 0 ? _e : '',
|
|
229
|
+
message: (_f = entry.message) !== null && _f !== void 0 ? _f : '',
|
|
230
|
+
duration: (_g = entry.duration) !== null && _g !== void 0 ? _g : 3000,
|
|
231
|
+
autoDismiss: (_h = entry.autoDismiss) !== null && _h !== void 0 ? _h : true,
|
|
232
|
+
enableSwipeDismiss: (_j = entry.enableSwipeDismiss) !== null && _j !== void 0 ? _j : true,
|
|
233
|
+
useDynamicIsland: true,
|
|
234
|
+
accentColor: entry.accentColor,
|
|
235
|
+
strokeColor: entry.strokeColor,
|
|
236
|
+
disableBackdropSampling: (_k = entry.disableBackdropSampling) !== null && _k !== void 0 ? _k : false,
|
|
237
|
+
actionLabel: (_m = (_l = entry.action) === null || _l === void 0 ? void 0 : _l.label) !== null && _m !== void 0 ? _m : '',
|
|
238
|
+
accessibilityAnnouncement: getAccessibilityAnnouncement(entry),
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
prepareSvgIcon(entry) {
|
|
242
|
+
var _a, _b;
|
|
243
|
+
if (entry.isPreparingSvg || entry.resolvedIconUri) {
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
const needsSvgRaster = Boolean(entry.rawSvg);
|
|
247
|
+
const needsBlobConversion = Boolean((_a = entry.iconSourceUri) === null || _a === void 0 ? void 0 : _a.startsWith('blob:'));
|
|
248
|
+
if (!needsSvgRaster && !needsBlobConversion) {
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
entry.isPreparingSvg = true;
|
|
252
|
+
const resolveAsset = needsSvgRaster && entry.rawSvg
|
|
253
|
+
? rasterizeSvgToPngDataUrl(entry.rawSvg)
|
|
254
|
+
: blobUrlToDataUrl((_b = entry.iconSourceUri) !== null && _b !== void 0 ? _b : '');
|
|
255
|
+
void resolveAsset.then((dataUrl) => {
|
|
256
|
+
var _a;
|
|
257
|
+
entry.isPreparingSvg = false;
|
|
258
|
+
if (!dataUrl)
|
|
259
|
+
return;
|
|
260
|
+
entry.resolvedIconUri = dataUrl;
|
|
261
|
+
if (((_a = this.current) === null || _a === void 0 ? void 0 : _a.id) === entry.id) {
|
|
262
|
+
void this.driver.update(this.buildPayload(entry));
|
|
263
|
+
}
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
generateId() {
|
|
267
|
+
this.idCounter += 1;
|
|
268
|
+
return `toast-${this.idCounter}-${Date.now()}`;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
//# sourceMappingURL=controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"controller.js","sourceRoot":"","sources":["../../src/controller.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,gBAAgB,EAChB,4BAA4B,EAC5B,mBAAmB,EACnB,SAAS,EACT,mBAAmB,EACnB,wBAAwB,EACxB,mBAAmB,GACpB,MAAM,SAAS,CAAC;AAkBjB,MAAM,aAAa,GAAiC;IAClD,OAAO,EAAE,uBAAuB;IAChC,KAAK,EAAE,mBAAmB;IAC1B,IAAI,EAAE,kBAAkB;IACxB,OAAO,EAAE,+BAA+B;IACxC,OAAO,EAAE,6BAA6B;CACvC,CAAC;AAEF,MAAM,OAAO,eAAe;IAU1B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;QATxC,UAAK,GAAiB,EAAE,CAAC;QACzB,YAAO,GAAsB,IAAI,CAAC;QAClC,cAAS,GAAG,KAAK,CAAC;QAClB,cAAS,GAAG,CAAC,CAAC;QACd,qBAAgB,GAAyC,IAAI,CAAC;QAC9D,kBAAa,GAAG,KAAK,CAAC;QAK5B,IAAI,CAAC,MAAM,CAA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,CAAC,KAAK,CAAC,CAAC,CAAC;YACpD,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,UAAU;QAChB,IAAI,CAAC,SAAS,IAAI,CAAC,CAAC;QACpB,OAAO,SAAS,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC;IACjD,CAAC;CACF"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
export type IconSource = string | {
|
|
2
|
+
uri: string;
|
|
3
|
+
};
|
|
4
|
+
export interface ToastAction {
|
|
5
|
+
/**
|
|
6
|
+
* Text shown for the native/web action button.
|
|
7
|
+
*/
|
|
8
|
+
label: string;
|
|
9
|
+
/**
|
|
10
|
+
* Called when the action button is pressed.
|
|
11
|
+
*/
|
|
12
|
+
onPress: () => void;
|
|
13
|
+
}
|
|
14
|
+
export interface ToastConfig {
|
|
15
|
+
/**
|
|
16
|
+
* Optional stable toast id. A generated id is returned when omitted.
|
|
17
|
+
*/
|
|
18
|
+
id?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Accepts either an SF-symbol-like identifier or raw SVG markup.
|
|
21
|
+
* SVG mode is enabled only when the string starts with `<svg` after trim.
|
|
22
|
+
*/
|
|
23
|
+
icon?: string;
|
|
24
|
+
/**
|
|
25
|
+
* URI-like image source. Supports `https://`, `http://`, `file://`,
|
|
26
|
+
* absolute file paths, `data:` URLs, `blob:` URLs, or `{ uri }`.
|
|
27
|
+
*
|
|
28
|
+
* `iconSource` always wins over `icon`.
|
|
29
|
+
*/
|
|
30
|
+
iconSource?: IconSource;
|
|
31
|
+
/**
|
|
32
|
+
* Main toast title.
|
|
33
|
+
*/
|
|
34
|
+
title?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Secondary toast message.
|
|
37
|
+
*/
|
|
38
|
+
message?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Auto-dismiss delay in milliseconds.
|
|
41
|
+
*/
|
|
42
|
+
duration?: number;
|
|
43
|
+
/**
|
|
44
|
+
* Whether the toast dismisses itself after `duration`.
|
|
45
|
+
*/
|
|
46
|
+
autoDismiss?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Whether swipe-to-dismiss is enabled on native overlays.
|
|
49
|
+
*/
|
|
50
|
+
enableSwipeDismiss?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* CSS-style accent color used by native/web renderers.
|
|
53
|
+
*/
|
|
54
|
+
accentColor?: string;
|
|
55
|
+
/**
|
|
56
|
+
* CSS-style border/stroke color.
|
|
57
|
+
*/
|
|
58
|
+
strokeColor?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Disable Android/iOS backdrop sampling behind the toast.
|
|
61
|
+
*/
|
|
62
|
+
disableBackdropSampling?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Optional action button configuration.
|
|
65
|
+
*/
|
|
66
|
+
action?: ToastAction;
|
|
67
|
+
/**
|
|
68
|
+
* Text announced to assistive technologies when the toast is shown.
|
|
69
|
+
*/
|
|
70
|
+
accessibilityAnnouncement?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Called when the toast body is pressed.
|
|
73
|
+
*/
|
|
74
|
+
onPress?: () => void;
|
|
75
|
+
/**
|
|
76
|
+
* Called when the toast becomes visible.
|
|
77
|
+
*/
|
|
78
|
+
onShow?: () => void;
|
|
79
|
+
/**
|
|
80
|
+
* Called when the toast is dismissed.
|
|
81
|
+
*/
|
|
82
|
+
onHide?: () => void;
|
|
83
|
+
/**
|
|
84
|
+
* Called when the toast is dismissed by its timer.
|
|
85
|
+
*/
|
|
86
|
+
onAutoDismiss?: () => void;
|
|
87
|
+
}
|
|
88
|
+
export interface ShowOptions {
|
|
89
|
+
/**
|
|
90
|
+
* Dismiss the current toast and show this one immediately.
|
|
91
|
+
*/
|
|
92
|
+
force?: boolean;
|
|
93
|
+
}
|
|
94
|
+
export type PromiseMessages<T> = {
|
|
95
|
+
loading: string | ToastConfig;
|
|
96
|
+
success: string | ((value: T) => string | ToastConfig);
|
|
97
|
+
error: string | ((error: unknown) => string | ToastConfig);
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* Public toast controller exposed as `toast`.
|
|
101
|
+
*/
|
|
102
|
+
export interface PrettyToastPlugin {
|
|
103
|
+
/**
|
|
104
|
+
* Show a custom toast and return its id.
|
|
105
|
+
*/
|
|
106
|
+
show(config: ToastConfig, options?: ShowOptions): string;
|
|
107
|
+
/**
|
|
108
|
+
* Show a success toast.
|
|
109
|
+
*/
|
|
110
|
+
success(title: string, config?: ToastConfig, options?: ShowOptions): string;
|
|
111
|
+
/**
|
|
112
|
+
* Show an error toast.
|
|
113
|
+
*/
|
|
114
|
+
error(title: string, config?: ToastConfig, options?: ShowOptions): string;
|
|
115
|
+
/**
|
|
116
|
+
* Show an informational toast.
|
|
117
|
+
*/
|
|
118
|
+
info(title: string, config?: ToastConfig, options?: ShowOptions): string;
|
|
119
|
+
/**
|
|
120
|
+
* Show a warning toast.
|
|
121
|
+
*/
|
|
122
|
+
warning(title: string, config?: ToastConfig, options?: ShowOptions): string;
|
|
123
|
+
/**
|
|
124
|
+
* Show a loading toast. Loading toasts do not auto-dismiss by default.
|
|
125
|
+
*/
|
|
126
|
+
loading(title: string, config?: ToastConfig, options?: ShowOptions): string;
|
|
127
|
+
/**
|
|
128
|
+
* Update an existing toast by id.
|
|
129
|
+
*/
|
|
130
|
+
update(id: string, partial: ToastConfig): void;
|
|
131
|
+
/**
|
|
132
|
+
* Show a loading toast while a promise is pending, then update it for success or error.
|
|
133
|
+
*/
|
|
134
|
+
promise<T>(promise: Promise<T>, messages: PromiseMessages<T>): Promise<T>;
|
|
135
|
+
/**
|
|
136
|
+
* Dismiss one toast by id, or the current toast when no id is provided.
|
|
137
|
+
*/
|
|
138
|
+
dismiss(id?: string): void;
|
|
139
|
+
/**
|
|
140
|
+
* Dismiss the current toast and clear the queue.
|
|
141
|
+
*/
|
|
142
|
+
dismissAll(): void;
|
|
143
|
+
}
|
|
144
|
+
export type ToastRef = PrettyToastPlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ToastBridgeEvent, InternalToastPayload } from './internal-types';
|
|
2
|
+
export interface ToastDriverEvents {
|
|
3
|
+
onDismiss: (event: ToastBridgeEvent) => void;
|
|
4
|
+
onPress: (event: ToastBridgeEvent) => void;
|
|
5
|
+
onActionPress: (event: ToastBridgeEvent) => void;
|
|
6
|
+
}
|
|
7
|
+
export interface ToastDriver {
|
|
8
|
+
subscribe: (events: ToastDriverEvents) => void;
|
|
9
|
+
show: (payload: InternalToastPayload) => Promise<void> | void;
|
|
10
|
+
update: (payload: InternalToastPayload) => Promise<void> | void;
|
|
11
|
+
dismiss: (id?: string) => Promise<void> | void;
|
|
12
|
+
}
|
|
13
|
+
export declare class CapacitorToastDriver implements ToastDriver {
|
|
14
|
+
private subscribed;
|
|
15
|
+
subscribe(events: ToastDriverEvents): void;
|
|
16
|
+
show(payload: InternalToastPayload): Promise<void>;
|
|
17
|
+
update(payload: InternalToastPayload): Promise<void>;
|
|
18
|
+
dismiss(id?: string): Promise<void>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { PrettyToastBridge } from './internal-plugin';
|
|
2
|
+
export class CapacitorToastDriver {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.subscribed = false;
|
|
5
|
+
}
|
|
6
|
+
subscribe(events) {
|
|
7
|
+
if (this.subscribed)
|
|
8
|
+
return;
|
|
9
|
+
this.subscribed = true;
|
|
10
|
+
void PrettyToastBridge.addListener('toastDismiss', events.onDismiss);
|
|
11
|
+
void PrettyToastBridge.addListener('toastPress', events.onPress);
|
|
12
|
+
void PrettyToastBridge.addListener('toastActionPress', events.onActionPress);
|
|
13
|
+
}
|
|
14
|
+
show(payload) {
|
|
15
|
+
return PrettyToastBridge.showCurrentToast(payload);
|
|
16
|
+
}
|
|
17
|
+
update(payload) {
|
|
18
|
+
return PrettyToastBridge.updateCurrentToast(payload);
|
|
19
|
+
}
|
|
20
|
+
dismiss(id) {
|
|
21
|
+
return PrettyToastBridge.dismissCurrentToast(id ? { id } : {});
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=driver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"driver.js","sourceRoot":"","sources":["../../src/driver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAgBtD,MAAM,OAAO,oBAAoB;IAAjC;QACU,eAAU,GAAG,KAAK,CAAC;IAqB7B,CAAC;IAnBC,SAAS,CAAC,MAAyB;QACjC,IAAI,IAAI,CAAC,UAAU;YAAE,OAAO;QAC5B,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;QACvB,KAAK,iBAAiB,CAAC,WAAW,CAAC,cAAc,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;QACrE,KAAK,iBAAiB,CAAC,WAAW,CAAC,YAAY,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;QACjE,KAAK,iBAAiB,CAAC,WAAW,CAAC,kBAAkB,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC;IAC/E,CAAC;IAED,IAAI,CAAC,OAA6B;QAChC,OAAO,iBAAiB,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACrD,CAAC;IAED,MAAM,CAAC,OAA6B;QAClC,OAAO,iBAAiB,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;IACvD,CAAC;IAED,OAAO,CAAC,EAAW;QACjB,OAAO,iBAAiB,CAAC,mBAAmB,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACjE,CAAC;CACF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { IconSource, ToastConfig } from './definitions';
|
|
2
|
+
export interface SymbolIconInfo {
|
|
3
|
+
glyph: string | null;
|
|
4
|
+
color: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const DEFAULT_ICON_SYMBOL = "bell.badge.fill";
|
|
7
|
+
export declare function isSvgIcon(value: string | undefined): boolean;
|
|
8
|
+
export declare function normalizeIconSource(source: IconSource | undefined): string | undefined;
|
|
9
|
+
export declare function getSymbolIcon(symbol: string | undefined): SymbolIconInfo;
|
|
10
|
+
export declare function getAccessibilityAnnouncement(config: Pick<ToastConfig, 'accessibilityAnnouncement' | 'title' | 'message'>): string;
|
|
11
|
+
export declare function isNativeSafeIconUri(uri: string | undefined): boolean;
|
|
12
|
+
export declare function rasterizeSvgToPngDataUrl(svg: string): Promise<string | null>;
|
|
13
|
+
export declare function blobUrlToDataUrl(uri: string): Promise<string | null>;
|
|
14
|
+
export declare function parseSvgElement(svgMarkup: string): SVGSVGElement | null;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
const ICON_MAP = [
|
|
2
|
+
['checkmark', { glyph: '✓', color: '#30D158' }],
|
|
3
|
+
['xmark', { glyph: '✕', color: '#FF453A' }],
|
|
4
|
+
['info', { glyph: 'ℹ', color: '#0A84FF' }],
|
|
5
|
+
['exclamation', { glyph: '!', color: '#FF9F0A' }],
|
|
6
|
+
['heart', { glyph: '♥', color: '#FF375F' }],
|
|
7
|
+
['arrow.up', { glyph: '↑', color: '#0A84FF' }],
|
|
8
|
+
['arrow.down', { glyph: '↓', color: '#0A84FF' }],
|
|
9
|
+
['arrow', { glyph: '↑', color: '#0A84FF' }],
|
|
10
|
+
['envelope', { glyph: '✉', color: '#FFFFFF' }],
|
|
11
|
+
['mail', { glyph: '✉', color: '#FFFFFF' }],
|
|
12
|
+
['wifi', { glyph: '◉', color: '#FFFFFF' }],
|
|
13
|
+
];
|
|
14
|
+
export const DEFAULT_ICON_SYMBOL = 'bell.badge.fill';
|
|
15
|
+
const svgRasterCache = new Map();
|
|
16
|
+
export function isSvgIcon(value) {
|
|
17
|
+
return typeof value === 'string' && value.trimStart().startsWith('<svg');
|
|
18
|
+
}
|
|
19
|
+
export function normalizeIconSource(source) {
|
|
20
|
+
if (!source)
|
|
21
|
+
return undefined;
|
|
22
|
+
if (typeof source === 'string') {
|
|
23
|
+
return source.trim() || undefined;
|
|
24
|
+
}
|
|
25
|
+
if (typeof source.uri === 'string') {
|
|
26
|
+
return source.uri.trim() || undefined;
|
|
27
|
+
}
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
export function getSymbolIcon(symbol) {
|
|
31
|
+
const normalized = symbol !== null && symbol !== void 0 ? symbol : '';
|
|
32
|
+
for (const [key, info] of ICON_MAP) {
|
|
33
|
+
if (normalized.includes(key))
|
|
34
|
+
return info;
|
|
35
|
+
}
|
|
36
|
+
return { glyph: null, color: '#FFFFFF' };
|
|
37
|
+
}
|
|
38
|
+
export function getAccessibilityAnnouncement(config) {
|
|
39
|
+
if (config.accessibilityAnnouncement !== undefined) {
|
|
40
|
+
return config.accessibilityAnnouncement;
|
|
41
|
+
}
|
|
42
|
+
return [config.title, config.message].filter(Boolean).join('. ');
|
|
43
|
+
}
|
|
44
|
+
export function isNativeSafeIconUri(uri) {
|
|
45
|
+
if (!uri)
|
|
46
|
+
return false;
|
|
47
|
+
return (uri.startsWith('https://') ||
|
|
48
|
+
uri.startsWith('http://') ||
|
|
49
|
+
uri.startsWith('file://') ||
|
|
50
|
+
uri.startsWith('data:') ||
|
|
51
|
+
uri.startsWith('/'));
|
|
52
|
+
}
|
|
53
|
+
export async function rasterizeSvgToPngDataUrl(svg) {
|
|
54
|
+
let pending = svgRasterCache.get(svg);
|
|
55
|
+
if (!pending) {
|
|
56
|
+
pending = rasterizeSvgToPngDataUrlInternal(svg);
|
|
57
|
+
svgRasterCache.set(svg, pending);
|
|
58
|
+
}
|
|
59
|
+
return pending;
|
|
60
|
+
}
|
|
61
|
+
export async function blobUrlToDataUrl(uri) {
|
|
62
|
+
if (typeof window === 'undefined' || typeof fetch === 'undefined' || typeof FileReader === 'undefined') {
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
try {
|
|
66
|
+
const response = await fetch(uri);
|
|
67
|
+
const blob = await response.blob();
|
|
68
|
+
return await new Promise((resolve) => {
|
|
69
|
+
const reader = new FileReader();
|
|
70
|
+
reader.onload = () => {
|
|
71
|
+
resolve(typeof reader.result === 'string' ? reader.result : null);
|
|
72
|
+
};
|
|
73
|
+
reader.onerror = () => resolve(null);
|
|
74
|
+
reader.readAsDataURL(blob);
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
catch (_a) {
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
function rasterizeSvgToPngDataUrlInternal(svg) {
|
|
82
|
+
if (typeof window === 'undefined' || typeof document === 'undefined') {
|
|
83
|
+
return Promise.resolve(null);
|
|
84
|
+
}
|
|
85
|
+
const encodedSvg = `data:image/svg+xml;charset=utf-8,${encodeURIComponent(svg)}`;
|
|
86
|
+
return new Promise((resolve) => {
|
|
87
|
+
const image = new Image();
|
|
88
|
+
image.onload = () => {
|
|
89
|
+
try {
|
|
90
|
+
const sourceWidth = image.naturalWidth || 96;
|
|
91
|
+
const sourceHeight = image.naturalHeight || 96;
|
|
92
|
+
const maxSide = Math.max(sourceWidth, sourceHeight, 1);
|
|
93
|
+
const scale = 128 / maxSide;
|
|
94
|
+
const width = Math.max(1, Math.round(sourceWidth * scale));
|
|
95
|
+
const height = Math.max(1, Math.round(sourceHeight * scale));
|
|
96
|
+
const canvas = document.createElement('canvas');
|
|
97
|
+
canvas.width = width;
|
|
98
|
+
canvas.height = height;
|
|
99
|
+
const context = canvas.getContext('2d');
|
|
100
|
+
if (!context) {
|
|
101
|
+
resolve(null);
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
context.clearRect(0, 0, width, height);
|
|
105
|
+
context.drawImage(image, 0, 0, width, height);
|
|
106
|
+
resolve(canvas.toDataURL('image/png'));
|
|
107
|
+
}
|
|
108
|
+
catch (_a) {
|
|
109
|
+
resolve(null);
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
image.onerror = () => resolve(null);
|
|
113
|
+
image.src = encodedSvg;
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
export function parseSvgElement(svgMarkup) {
|
|
117
|
+
if (typeof DOMParser === 'undefined')
|
|
118
|
+
return null;
|
|
119
|
+
try {
|
|
120
|
+
const documentNode = new DOMParser().parseFromString(svgMarkup, 'image/svg+xml');
|
|
121
|
+
if (documentNode.querySelector('parsererror') || documentNode.querySelector('script')) {
|
|
122
|
+
return null;
|
|
123
|
+
}
|
|
124
|
+
const root = documentNode.documentElement;
|
|
125
|
+
if (!root || root.tagName.toLowerCase() !== 'svg')
|
|
126
|
+
return null;
|
|
127
|
+
const svg = root.cloneNode(true);
|
|
128
|
+
svg.setAttribute('width', '40');
|
|
129
|
+
svg.setAttribute('height', '40');
|
|
130
|
+
svg.setAttribute('aria-hidden', 'true');
|
|
131
|
+
svg.style.display = 'block';
|
|
132
|
+
return svg;
|
|
133
|
+
}
|
|
134
|
+
catch (_a) {
|
|
135
|
+
return null;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
//# sourceMappingURL=icons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.js","sourceRoot":"","sources":["../../src/icons.ts"],"names":[],"mappings":"AAOA,MAAM,QAAQ,GAA+B;IAC3C,CAAC,WAAW,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;IAC/C,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;IAC3C,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;IAC1C,CAAC,aAAa,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,SA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