@tamagui/toast 2.7.7 → 3.0.0-beta.1091.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/dist/cjs/ToastComposable.cjs +769 -882
- package/dist/cjs/ToastComposable.native.cjs +916 -0
- package/dist/cjs/ToastComposable.native.js +848 -968
- package/dist/cjs/ToastComposable.native.js.map +1 -1
- package/dist/cjs/ToastItemFrame.cjs +47 -119
- package/dist/cjs/ToastItemFrame.native.cjs +75 -0
- package/dist/cjs/ToastItemFrame.native.js +49 -120
- package/dist/cjs/ToastItemFrame.native.js.map +1 -1
- package/dist/cjs/ToastState.cjs +280 -290
- package/dist/cjs/ToastState.native.cjs +300 -0
- package/dist/cjs/ToastState.native.js +272 -294
- package/dist/cjs/ToastState.native.js.map +1 -1
- package/dist/cjs/createNativeToast.cjs +37 -44
- package/dist/cjs/createNativeToast.native.cjs +53 -0
- package/dist/cjs/createNativeToast.native.js +35 -40
- package/dist/cjs/createNativeToast.native.js.map +1 -1
- package/dist/cjs/dispatchNativeToast.cjs +31 -35
- package/dist/cjs/dispatchNativeToast.native.cjs +47 -0
- package/dist/cjs/dispatchNativeToast.native.js +33 -36
- package/dist/cjs/dispatchNativeToast.native.js.map +1 -1
- package/dist/cjs/index.cjs +24 -12
- package/dist/cjs/index.native.cjs +34 -0
- package/dist/cjs/index.native.js +25 -12
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/types.cjs +9 -11
- package/dist/cjs/types.native.cjs +18 -0
- package/dist/cjs/types.native.js +9 -10
- package/dist/cjs/types.native.js.map +1 -1
- package/dist/cjs/useAnimatedDragGesture.cjs +196 -194
- package/dist/cjs/useAnimatedDragGesture.native.cjs +209 -0
- package/dist/cjs/useAnimatedDragGesture.native.js +178 -191
- package/dist/cjs/useAnimatedDragGesture.native.js.map +1 -1
- package/dist/cjs/useReducedMotion.cjs +46 -55
- package/dist/cjs/useReducedMotion.native.cjs +73 -0
- package/dist/cjs/useReducedMotion.native.js +52 -60
- package/dist/cjs/useReducedMotion.native.js.map +1 -1
- package/dist/cjs/useToastAnimations.cjs +197 -270
- package/dist/cjs/useToastAnimations.native.cjs +228 -0
- package/dist/cjs/useToastAnimations.native.js +204 -276
- package/dist/cjs/useToastAnimations.native.js.map +1 -1
- package/dist/esm/ToastComposable.mjs +749 -854
- package/dist/esm/ToastComposable.mjs.map +1 -1
- package/dist/esm/ToastComposable.native.js +828 -941
- package/dist/esm/ToastComposable.native.js.map +1 -1
- package/dist/esm/ToastItemFrame.mjs +31 -99
- package/dist/esm/ToastItemFrame.mjs.map +1 -1
- package/dist/esm/ToastItemFrame.native.js +34 -102
- package/dist/esm/ToastItemFrame.native.js.map +1 -1
- package/dist/esm/ToastState.mjs +266 -273
- package/dist/esm/ToastState.mjs.map +1 -1
- package/dist/esm/ToastState.native.js +258 -278
- package/dist/esm/ToastState.native.js.map +1 -1
- package/dist/esm/createNativeToast.mjs +22 -26
- package/dist/esm/createNativeToast.mjs.map +1 -1
- package/dist/esm/createNativeToast.native.js +21 -23
- package/dist/esm/createNativeToast.native.js.map +1 -1
- package/dist/esm/dispatchNativeToast.mjs +19 -17
- package/dist/esm/dispatchNativeToast.mjs.map +1 -1
- package/dist/esm/dispatchNativeToast.native.js +21 -19
- package/dist/esm/dispatchNativeToast.native.js.map +1 -1
- package/dist/esm/index.js +5 -2
- package/dist/esm/index.mjs +5 -2
- package/dist/esm/index.native.js +5 -2
- package/dist/esm/types.mjs +0 -2
- package/dist/esm/types.native.js +0 -2
- package/dist/esm/useAnimatedDragGesture.mjs +181 -168
- package/dist/esm/useAnimatedDragGesture.mjs.map +1 -1
- package/dist/esm/useAnimatedDragGesture.native.js +163 -166
- package/dist/esm/useAnimatedDragGesture.native.js.map +1 -1
- package/dist/esm/useReducedMotion.mjs +31 -29
- package/dist/esm/useReducedMotion.mjs.map +1 -1
- package/dist/esm/useReducedMotion.native.js +37 -35
- package/dist/esm/useReducedMotion.native.js.map +1 -1
- package/dist/esm/useToastAnimations.mjs +183 -245
- package/dist/esm/useToastAnimations.mjs.map +1 -1
- package/dist/esm/useToastAnimations.native.js +190 -252
- package/dist/esm/useToastAnimations.native.js.map +1 -1
- package/dist/jsx/ToastComposable.mjs +749 -854
- package/dist/jsx/ToastComposable.mjs.map +1 -1
- package/dist/jsx/ToastComposable.native.cjs +916 -0
- package/dist/jsx/ToastComposable.native.js +848 -968
- package/dist/jsx/ToastComposable.native.js.map +1 -1
- package/dist/jsx/ToastItemFrame.mjs +31 -99
- package/dist/jsx/ToastItemFrame.mjs.map +1 -1
- package/dist/jsx/ToastItemFrame.native.cjs +75 -0
- package/dist/jsx/ToastItemFrame.native.js +49 -120
- package/dist/jsx/ToastItemFrame.native.js.map +1 -1
- package/dist/jsx/ToastState.mjs +266 -273
- package/dist/jsx/ToastState.mjs.map +1 -1
- package/dist/jsx/ToastState.native.cjs +300 -0
- package/dist/jsx/ToastState.native.js +272 -294
- package/dist/jsx/ToastState.native.js.map +1 -1
- package/dist/jsx/createNativeToast.mjs +22 -26
- package/dist/jsx/createNativeToast.mjs.map +1 -1
- package/dist/jsx/createNativeToast.native.cjs +53 -0
- package/dist/jsx/createNativeToast.native.js +35 -40
- package/dist/jsx/createNativeToast.native.js.map +1 -1
- package/dist/jsx/dispatchNativeToast.mjs +19 -17
- package/dist/jsx/dispatchNativeToast.mjs.map +1 -1
- package/dist/jsx/dispatchNativeToast.native.cjs +47 -0
- package/dist/jsx/dispatchNativeToast.native.js +33 -36
- package/dist/jsx/dispatchNativeToast.native.js.map +1 -1
- package/dist/jsx/index.js +5 -2
- package/dist/jsx/index.mjs +5 -2
- package/dist/jsx/index.native.cjs +34 -0
- package/dist/jsx/index.native.js +25 -12
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/types.mjs +0 -2
- package/dist/jsx/types.native.cjs +18 -0
- package/dist/jsx/types.native.js +9 -10
- package/dist/jsx/types.native.js.map +1 -1
- package/dist/jsx/useAnimatedDragGesture.mjs +181 -168
- package/dist/jsx/useAnimatedDragGesture.mjs.map +1 -1
- package/dist/jsx/useAnimatedDragGesture.native.cjs +209 -0
- package/dist/jsx/useAnimatedDragGesture.native.js +178 -191
- package/dist/jsx/useAnimatedDragGesture.native.js.map +1 -1
- package/dist/jsx/useReducedMotion.mjs +31 -29
- package/dist/jsx/useReducedMotion.mjs.map +1 -1
- package/dist/jsx/useReducedMotion.native.cjs +73 -0
- package/dist/jsx/useReducedMotion.native.js +52 -60
- package/dist/jsx/useReducedMotion.native.js.map +1 -1
- package/dist/jsx/useToastAnimations.mjs +183 -245
- package/dist/jsx/useToastAnimations.mjs.map +1 -1
- package/dist/jsx/useToastAnimations.native.cjs +228 -0
- package/dist/jsx/useToastAnimations.native.js +204 -276
- package/dist/jsx/useToastAnimations.native.js.map +1 -1
- package/package.json +22 -38
- package/src/ToastComposable.tsx +62 -99
- package/src/ToastItemFrame.tsx +22 -81
- package/src/ToastState.ts +1 -0
- package/src/index.ts +34 -2
- package/src/types.ts +11 -0
- package/src/useAnimatedDragGesture.native.ts +1 -1
- package/src/useAnimatedDragGesture.ts +1 -1
- package/src/useToastAnimations.ts +23 -40
- package/types/ToastComposable.d.ts +124 -47
- package/types/ToastComposable.d.ts.map +1 -1
- package/types/ToastItemFrame.d.ts +52 -21
- package/types/ToastItemFrame.d.ts.map +1 -1
- package/types/ToastState.d.ts +15 -11
- package/types/ToastState.d.ts.map +1 -1
- package/types/index.d.ts +6 -2
- package/types/index.d.ts.map +1 -1
- package/types/types.d.ts +1 -0
- package/types/types.d.ts.map +1 -1
- package/types/useAnimatedDragGesture.d.ts +1 -1
- package/types/useAnimatedDragGesture.d.ts.map +1 -1
- package/types/useAnimatedDragGesture.native.d.ts +1 -1
- package/types/useAnimatedDragGesture.native.d.ts.map +1 -1
- package/types/useToastAnimations.d.ts +4 -11
- package/types/useToastAnimations.d.ts.map +1 -1
- package/dist/cjs/Toast.cjs +0 -178
- package/dist/cjs/Toast.native.js +0 -181
- package/dist/cjs/Toast.native.js.map +0 -1
- package/dist/cjs/ToastAnnounce.cjs +0 -103
- package/dist/cjs/ToastAnnounce.native.js +0 -111
- package/dist/cjs/ToastAnnounce.native.js.map +0 -1
- package/dist/cjs/ToastImperative.cjs +0 -119
- package/dist/cjs/ToastImperative.native.js +0 -130
- package/dist/cjs/ToastImperative.native.js.map +0 -1
- package/dist/cjs/ToastImpl.cjs +0 -354
- package/dist/cjs/ToastImpl.native.js +0 -364
- package/dist/cjs/ToastImpl.native.js.map +0 -1
- package/dist/cjs/ToastPortal.cjs +0 -49
- package/dist/cjs/ToastPortal.native.js +0 -52
- package/dist/cjs/ToastPortal.native.js.map +0 -1
- package/dist/cjs/ToastProvider.cjs +0 -150
- package/dist/cjs/ToastProvider.native.js +0 -161
- package/dist/cjs/ToastProvider.native.js.map +0 -1
- package/dist/cjs/ToastViewport.cjs +0 -319
- package/dist/cjs/ToastViewport.native.js +0 -343
- package/dist/cjs/ToastViewport.native.js.map +0 -1
- package/dist/cjs/Toaster.cjs +0 -87
- package/dist/cjs/Toaster.native.js +0 -91
- package/dist/cjs/Toaster.native.js.map +0 -1
- package/dist/cjs/constants.cjs +0 -30
- package/dist/cjs/constants.native.js +0 -33
- package/dist/cjs/constants.native.js.map +0 -1
- package/dist/cjs/v2.cjs +0 -36
- package/dist/cjs/v2.native.js +0 -39
- package/dist/cjs/v2.native.js.map +0 -1
- package/dist/esm/Toast.mjs +0 -137
- package/dist/esm/Toast.mjs.map +0 -1
- package/dist/esm/Toast.native.js +0 -137
- package/dist/esm/Toast.native.js.map +0 -1
- package/dist/esm/ToastAnnounce.mjs +0 -66
- package/dist/esm/ToastAnnounce.mjs.map +0 -1
- package/dist/esm/ToastAnnounce.native.js +0 -71
- package/dist/esm/ToastAnnounce.native.js.map +0 -1
- package/dist/esm/ToastImperative.mjs +0 -80
- package/dist/esm/ToastImperative.mjs.map +0 -1
- package/dist/esm/ToastImperative.native.js +0 -88
- package/dist/esm/ToastImperative.native.js.map +0 -1
- package/dist/esm/ToastImpl.mjs +0 -316
- package/dist/esm/ToastImpl.mjs.map +0 -1
- package/dist/esm/ToastImpl.native.js +0 -329
- package/dist/esm/ToastImpl.native.js.map +0 -1
- package/dist/esm/ToastPortal.mjs +0 -24
- package/dist/esm/ToastPortal.mjs.map +0 -1
- package/dist/esm/ToastPortal.native.js +0 -24
- package/dist/esm/ToastPortal.native.js.map +0 -1
- package/dist/esm/ToastProvider.mjs +0 -110
- package/dist/esm/ToastProvider.mjs.map +0 -1
- package/dist/esm/ToastProvider.native.js +0 -118
- package/dist/esm/ToastProvider.native.js.map +0 -1
- package/dist/esm/ToastViewport.mjs +0 -280
- package/dist/esm/ToastViewport.mjs.map +0 -1
- package/dist/esm/ToastViewport.native.js +0 -301
- package/dist/esm/ToastViewport.native.js.map +0 -1
- package/dist/esm/Toaster.mjs +0 -51
- package/dist/esm/Toaster.mjs.map +0 -1
- package/dist/esm/Toaster.native.js +0 -52
- package/dist/esm/Toaster.native.js.map +0 -1
- package/dist/esm/constants.mjs +0 -4
- package/dist/esm/constants.mjs.map +0 -1
- package/dist/esm/constants.native.js +0 -4
- package/dist/esm/constants.native.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/index.native.js.map +0 -1
- package/dist/esm/types.mjs.map +0 -1
- package/dist/esm/types.native.js.map +0 -1
- package/dist/esm/v2.mjs +0 -6
- package/dist/esm/v2.mjs.map +0 -1
- package/dist/esm/v2.native.js +0 -6
- package/dist/esm/v2.native.js.map +0 -1
- package/dist/jsx/Toast.mjs +0 -137
- package/dist/jsx/Toast.mjs.map +0 -1
- package/dist/jsx/Toast.native.js +0 -181
- package/dist/jsx/Toast.native.js.map +0 -1
- package/dist/jsx/ToastAnnounce.mjs +0 -66
- package/dist/jsx/ToastAnnounce.mjs.map +0 -1
- package/dist/jsx/ToastAnnounce.native.js +0 -111
- package/dist/jsx/ToastAnnounce.native.js.map +0 -1
- package/dist/jsx/ToastImperative.mjs +0 -80
- package/dist/jsx/ToastImperative.mjs.map +0 -1
- package/dist/jsx/ToastImperative.native.js +0 -130
- package/dist/jsx/ToastImperative.native.js.map +0 -1
- package/dist/jsx/ToastImpl.mjs +0 -316
- package/dist/jsx/ToastImpl.mjs.map +0 -1
- package/dist/jsx/ToastImpl.native.js +0 -364
- package/dist/jsx/ToastImpl.native.js.map +0 -1
- package/dist/jsx/ToastPortal.mjs +0 -24
- package/dist/jsx/ToastPortal.mjs.map +0 -1
- package/dist/jsx/ToastPortal.native.js +0 -52
- package/dist/jsx/ToastPortal.native.js.map +0 -1
- package/dist/jsx/ToastProvider.mjs +0 -110
- package/dist/jsx/ToastProvider.mjs.map +0 -1
- package/dist/jsx/ToastProvider.native.js +0 -161
- package/dist/jsx/ToastProvider.native.js.map +0 -1
- package/dist/jsx/ToastViewport.mjs +0 -280
- package/dist/jsx/ToastViewport.mjs.map +0 -1
- package/dist/jsx/ToastViewport.native.js +0 -343
- package/dist/jsx/ToastViewport.native.js.map +0 -1
- package/dist/jsx/Toaster.mjs +0 -51
- package/dist/jsx/Toaster.mjs.map +0 -1
- package/dist/jsx/Toaster.native.js +0 -91
- package/dist/jsx/Toaster.native.js.map +0 -1
- package/dist/jsx/constants.mjs +0 -4
- package/dist/jsx/constants.mjs.map +0 -1
- package/dist/jsx/constants.native.js +0 -33
- package/dist/jsx/constants.native.js.map +0 -1
- package/dist/jsx/index.js.map +0 -1
- package/dist/jsx/index.mjs.map +0 -1
- package/dist/jsx/types.mjs.map +0 -1
- package/dist/jsx/v2.mjs +0 -6
- package/dist/jsx/v2.mjs.map +0 -1
- package/dist/jsx/v2.native.js +0 -39
- package/dist/jsx/v2.native.js.map +0 -1
- package/src/Toast.tsx +0 -219
- package/src/ToastAnnounce.tsx +0 -103
- package/src/ToastImperative.tsx +0 -192
- package/src/ToastImpl.tsx +0 -514
- package/src/ToastPortal.tsx +0 -19
- package/src/ToastProvider.tsx +0 -204
- package/src/ToastViewport.tsx +0 -430
- package/src/Toaster.tsx +0 -181
- package/src/constants.ts +0 -2
- package/src/v2.ts +0 -31
- package/types/Toast.d.ts +0 -84
- package/types/Toast.d.ts.map +0 -1
- package/types/ToastAnnounce.d.ts +0 -18
- package/types/ToastAnnounce.d.ts.map +0 -1
- package/types/ToastImperative.d.ts +0 -95
- package/types/ToastImperative.d.ts.map +0 -1
- package/types/ToastImpl.d.ts +0 -109
- package/types/ToastImpl.d.ts.map +0 -1
- package/types/ToastPortal.d.ts +0 -8
- package/types/ToastPortal.d.ts.map +0 -1
- package/types/ToastProvider.d.ts +0 -92
- package/types/ToastProvider.d.ts.map +0 -1
- package/types/ToastViewport.d.ts +0 -75
- package/types/ToastViewport.d.ts.map +0 -1
- package/types/Toaster.d.ts +0 -112
- package/types/Toaster.d.ts.map +0 -1
- package/types/constants.d.ts +0 -3
- package/types/constants.d.ts.map +0 -1
- package/types/v2.d.ts +0 -10
- package/types/v2.d.ts.map +0 -1
- package/v2/index.cjs +0 -2
- package/v2/index.js +0 -2
- package/v2/index.native.cjs +0 -2
- package/v2/index.native.js +0 -2
|
@@ -3,57 +3,50 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
5
|
var __export = (target, all) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
10
|
};
|
|
11
11
|
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value: true
|
|
22
|
-
}), mod);
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
21
|
var createNativeToast_exports = {};
|
|
24
22
|
__export(createNativeToast_exports, {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
createNativeToast: () => createNativeToast,
|
|
24
|
+
hideNativeToast: () => hideNativeToast,
|
|
25
|
+
requestNotificationPermission: () => requestNotificationPermission
|
|
28
26
|
});
|
|
29
27
|
module.exports = __toCommonJS(createNativeToast_exports);
|
|
30
|
-
const createNativeToast = (title, {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
...notificationOptions
|
|
41
|
-
});
|
|
42
|
-
return {
|
|
43
|
-
nativeToastRef: notification
|
|
44
|
-
};
|
|
28
|
+
const createNativeToast = (title, { message, notificationOptions }) => {
|
|
29
|
+
if (!("Notification" in window)) {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
if (Notification.permission !== "granted") return false;
|
|
33
|
+
const notification = new Notification(title, {
|
|
34
|
+
body: message,
|
|
35
|
+
...notificationOptions
|
|
36
|
+
});
|
|
37
|
+
return { nativeToastRef: notification };
|
|
45
38
|
};
|
|
46
|
-
const hideNativeToast = ref => {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
39
|
+
const hideNativeToast = (ref) => {
|
|
40
|
+
if (!("Notification" in window)) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
if (ref) {
|
|
44
|
+
ref.close();
|
|
45
|
+
}
|
|
53
46
|
};
|
|
54
47
|
async function requestNotificationPermission() {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
48
|
+
if (!("Notification" in window)) return null;
|
|
49
|
+
if (Notification.permission === "granted") return "granted";
|
|
50
|
+
if (Notification.permission === "denied") return "denied";
|
|
51
|
+
return Notification.requestPermission();
|
|
52
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
|
+
var createNativeToast_native_exports = {};
|
|
24
|
+
__export(createNativeToast_native_exports, {
|
|
25
|
+
createNativeToast: () => createNativeToast,
|
|
26
|
+
hideNativeToast: () => hideNativeToast,
|
|
27
|
+
requestNotificationPermission: () => requestNotificationPermission
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(createNativeToast_native_exports);
|
|
30
|
+
var import_native = require("@tamagui/native");
|
|
31
|
+
var createNativeToast = function(title, param) {
|
|
32
|
+
var { message, duration, burntOptions } = param;
|
|
33
|
+
var burnt = (0, import_native.getBurnt)();
|
|
34
|
+
if (!burnt.isEnabled) {
|
|
35
|
+
console.warn(`Warning: Must call import '@tamagui/native/setup-burnt' at your app entry point to use native toasts`);
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
burnt.state.toast({
|
|
39
|
+
title,
|
|
40
|
+
message,
|
|
41
|
+
duration: duration ? duration / 1e3 : void 0,
|
|
42
|
+
...burntOptions
|
|
43
|
+
});
|
|
44
|
+
return true;
|
|
45
|
+
};
|
|
46
|
+
var hideNativeToast = function() {
|
|
47
|
+
var burnt = (0, import_native.getBurnt)();
|
|
48
|
+
if (!burnt.isEnabled) return;
|
|
49
|
+
burnt.state.dismissAllAlerts();
|
|
50
|
+
};
|
|
51
|
+
async function requestNotificationPermission() {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
@@ -5,56 +5,51 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
12
|
};
|
|
13
13
|
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
21
|
};
|
|
22
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
-
value: true
|
|
24
|
-
}), mod);
|
|
22
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
23
|
var createNativeToast_native_exports = {};
|
|
26
24
|
__export(createNativeToast_native_exports, {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
createNativeToast: () => createNativeToast,
|
|
26
|
+
hideNativeToast: () => hideNativeToast,
|
|
27
|
+
requestNotificationPermission: () => requestNotificationPermission
|
|
30
28
|
});
|
|
31
29
|
module.exports = __toCommonJS(createNativeToast_native_exports);
|
|
32
30
|
var import_native = require("@tamagui/native");
|
|
33
|
-
var createNativeToast = function
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
duration: duration ? duration / 1e3 : void 0,
|
|
48
|
-
...burntOptions
|
|
49
|
-
});
|
|
50
|
-
return true;
|
|
31
|
+
var createNativeToast = function(title, param) {
|
|
32
|
+
var { message, duration, burntOptions } = param;
|
|
33
|
+
var burnt = (0, import_native.getBurnt)();
|
|
34
|
+
if (!burnt.isEnabled) {
|
|
35
|
+
console.warn(`Warning: Must call import '@tamagui/native/setup-burnt' at your app entry point to use native toasts`);
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
burnt.state.toast({
|
|
39
|
+
title,
|
|
40
|
+
message,
|
|
41
|
+
duration: duration ? duration / 1e3 : void 0,
|
|
42
|
+
...burntOptions
|
|
43
|
+
});
|
|
44
|
+
return true;
|
|
51
45
|
};
|
|
52
|
-
var hideNativeToast = function
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
46
|
+
var hideNativeToast = function() {
|
|
47
|
+
var burnt = (0, import_native.getBurnt)();
|
|
48
|
+
if (!burnt.isEnabled) return;
|
|
49
|
+
burnt.state.dismissAllAlerts();
|
|
56
50
|
};
|
|
57
51
|
async function requestNotificationPermission() {
|
|
58
|
-
|
|
52
|
+
return null;
|
|
59
53
|
}
|
|
54
|
+
|
|
60
55
|
//# sourceMappingURL=createNativeToast.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"createNativeToast.native.js","names":[],"sources":["cjs/createNativeToast.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar createNativeToast_native_exports = {};\n__export(createNativeToast_native_exports, {\n createNativeToast: () => createNativeToast,\n hideNativeToast: () => hideNativeToast,\n requestNotificationPermission: () => requestNotificationPermission\n});\nmodule.exports = __toCommonJS(createNativeToast_native_exports);\nvar import_native = require(\"@tamagui/native\");\nvar createNativeToast = function(title, param) {\n var { message, duration, burntOptions } = param;\n var burnt = (0, import_native.getBurnt)();\n if (!burnt.isEnabled) {\n console.warn(`Warning: Must call import '@tamagui/native/setup-burnt' at your app entry point to use native toasts`);\n return false;\n }\n burnt.state.toast({\n title,\n message,\n duration: duration ? duration / 1e3 : void 0,\n ...burntOptions\n });\n return true;\n};\nvar hideNativeToast = function() {\n var burnt = (0, import_native.getBurnt)();\n if (!burnt.isEnabled) return;\n burnt.state.dismissAllAlerts();\n};\nasync function requestNotificationPermission() {\n return null;\n}\n//# sourceMappingURL=createNativeToast.native.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,mCAAmC,CAAC;AACxC,SAAS,kCAAkC;CACzC,yBAAyB;CACzB,uBAAuB;CACvB,qCAAqC;AACvC,CAAC;AACD,OAAO,UAAU,aAAa,gCAAgC;AAC9D,IAAI,gBAAgB,QAAQ,iBAAiB;AAC7C,IAAI,oBAAoB,SAAS,OAAO,OAAO;CAC7C,IAAI,EAAE,SAAS,UAAU,iBAAiB;CAC1C,IAAI,SAAS,GAAG,cAAc,SAAQ,CAAE;CACxC,IAAI,CAAC,MAAM,WAAW;EACpB,QAAQ,KAAK,sGAAsG;EACnH,OAAO;CACT;CACA,MAAM,MAAM,MAAM;EAChB;EACA;EACA,UAAU,WAAW,WAAW,MAAM,KAAK;EAC3C,GAAG;CACL,CAAC;CACD,OAAO;AACT;AACA,IAAI,kBAAkB,WAAW;CAC/B,IAAI,SAAS,GAAG,cAAc,SAAQ,CAAE;CACxC,IAAI,CAAC,MAAM,WAAW;CACtB,MAAM,MAAM,iBAAiB;AAC/B;AACA,eAAe,gCAAgC;CAC7C,OAAO;AACT"}
|
|
@@ -3,45 +3,41 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
5
|
var __export = (target, all) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
10
|
};
|
|
11
11
|
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value: true
|
|
22
|
-
}), mod);
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
21
|
var dispatchNativeToast_exports = {};
|
|
24
|
-
__export(dispatchNativeToast_exports, {
|
|
25
|
-
dispatchNativeToast: () => dispatchNativeToast
|
|
26
|
-
});
|
|
22
|
+
__export(dispatchNativeToast_exports, { dispatchNativeToast: () => dispatchNativeToast });
|
|
27
23
|
module.exports = __toCommonJS(dispatchNativeToast_exports);
|
|
28
24
|
var import_createNativeToast = require("./createNativeToast.cjs");
|
|
29
25
|
function dispatchNativeToast(toast, opts) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
26
|
+
const titleText = typeof toast.title === "function" ? toast.title() : toast.title;
|
|
27
|
+
if (typeof titleText !== "string") return false;
|
|
28
|
+
const descText = typeof toast.description === "function" ? toast.description() : toast.description;
|
|
29
|
+
const toastType = toast.type ?? "default";
|
|
30
|
+
const preset = toastType === "error" ? "error" : toastType === "success" ? "done" : "none";
|
|
31
|
+
const haptic = toastType === "error" ? "error" : toastType === "success" ? "success" : toastType === "warning" ? "warning" : "none";
|
|
32
|
+
const result = (0, import_createNativeToast.createNativeToast)(titleText, {
|
|
33
|
+
message: typeof descText === "string" ? descText : void 0,
|
|
34
|
+
duration: toast.duration ?? opts.duration,
|
|
35
|
+
burntOptions: {
|
|
36
|
+
preset,
|
|
37
|
+
haptic,
|
|
38
|
+
...opts.burntOptions
|
|
39
|
+
},
|
|
40
|
+
notificationOptions: opts.notificationOptions
|
|
41
|
+
});
|
|
42
|
+
return result !== false;
|
|
43
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
|
+
var dispatchNativeToast_exports = {};
|
|
24
|
+
__export(dispatchNativeToast_exports, { dispatchNativeToast: () => dispatchNativeToast });
|
|
25
|
+
module.exports = __toCommonJS(dispatchNativeToast_exports);
|
|
26
|
+
var import_createNativeToast = require("./createNativeToast.native.js");
|
|
27
|
+
function dispatchNativeToast(toast, opts) {
|
|
28
|
+
var titleText = typeof toast.title === "function" ? toast.title() : toast.title;
|
|
29
|
+
if (typeof titleText !== "string") return false;
|
|
30
|
+
var descText = typeof toast.description === "function" ? toast.description() : toast.description;
|
|
31
|
+
var _toast_type;
|
|
32
|
+
var toastType = (_toast_type = toast.type) !== null && _toast_type !== void 0 ? _toast_type : "default";
|
|
33
|
+
var preset = toastType === "error" ? "error" : toastType === "success" ? "done" : "none";
|
|
34
|
+
var haptic = toastType === "error" ? "error" : toastType === "success" ? "success" : toastType === "warning" ? "warning" : "none";
|
|
35
|
+
var _toast_duration;
|
|
36
|
+
var result = (0, import_createNativeToast.createNativeToast)(titleText, {
|
|
37
|
+
message: typeof descText === "string" ? descText : void 0,
|
|
38
|
+
duration: (_toast_duration = toast.duration) !== null && _toast_duration !== void 0 ? _toast_duration : opts.duration,
|
|
39
|
+
burntOptions: {
|
|
40
|
+
preset,
|
|
41
|
+
haptic,
|
|
42
|
+
...opts.burntOptions
|
|
43
|
+
},
|
|
44
|
+
notificationOptions: opts.notificationOptions
|
|
45
|
+
});
|
|
46
|
+
return result !== false;
|
|
47
|
+
}
|
|
@@ -5,48 +5,45 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
12
|
};
|
|
13
13
|
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
21
|
};
|
|
22
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
-
value: true
|
|
24
|
-
}), mod);
|
|
22
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
23
|
var dispatchNativeToast_exports = {};
|
|
26
|
-
__export(dispatchNativeToast_exports, {
|
|
27
|
-
dispatchNativeToast: () => dispatchNativeToast
|
|
28
|
-
});
|
|
24
|
+
__export(dispatchNativeToast_exports, { dispatchNativeToast: () => dispatchNativeToast });
|
|
29
25
|
module.exports = __toCommonJS(dispatchNativeToast_exports);
|
|
30
26
|
var import_createNativeToast = require("./createNativeToast.native.js");
|
|
31
27
|
function dispatchNativeToast(toast, opts) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
28
|
+
var titleText = typeof toast.title === "function" ? toast.title() : toast.title;
|
|
29
|
+
if (typeof titleText !== "string") return false;
|
|
30
|
+
var descText = typeof toast.description === "function" ? toast.description() : toast.description;
|
|
31
|
+
var _toast_type;
|
|
32
|
+
var toastType = (_toast_type = toast.type) !== null && _toast_type !== void 0 ? _toast_type : "default";
|
|
33
|
+
var preset = toastType === "error" ? "error" : toastType === "success" ? "done" : "none";
|
|
34
|
+
var haptic = toastType === "error" ? "error" : toastType === "success" ? "success" : toastType === "warning" ? "warning" : "none";
|
|
35
|
+
var _toast_duration;
|
|
36
|
+
var result = (0, import_createNativeToast.createNativeToast)(titleText, {
|
|
37
|
+
message: typeof descText === "string" ? descText : void 0,
|
|
38
|
+
duration: (_toast_duration = toast.duration) !== null && _toast_duration !== void 0 ? _toast_duration : opts.duration,
|
|
39
|
+
burntOptions: {
|
|
40
|
+
preset,
|
|
41
|
+
haptic,
|
|
42
|
+
...opts.burntOptions
|
|
43
|
+
},
|
|
44
|
+
notificationOptions: opts.notificationOptions
|
|
45
|
+
});
|
|
46
|
+
return result !== false;
|
|
51
47
|
}
|
|
48
|
+
|
|
52
49
|
//# sourceMappingURL=dispatchNativeToast.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"dispatchNativeToast.native.js","names":[],"sources":["cjs/dispatchNativeToast.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar dispatchNativeToast_exports = {};\n__export(dispatchNativeToast_exports, {\n dispatchNativeToast: () => dispatchNativeToast\n});\nmodule.exports = __toCommonJS(dispatchNativeToast_exports);\nvar import_createNativeToast = require(\"./createNativeToast\");\nfunction dispatchNativeToast(toast, opts) {\n var titleText = typeof toast.title === \"function\" ? toast.title() : toast.title;\n if (typeof titleText !== \"string\") return false;\n var descText = typeof toast.description === \"function\" ? toast.description() : toast.description;\n var _toast_type;\n var toastType = (_toast_type = toast.type) !== null && _toast_type !== void 0 ? _toast_type : \"default\";\n var preset = toastType === \"error\" ? \"error\" : toastType === \"success\" ? \"done\" : \"none\";\n var haptic = toastType === \"error\" ? \"error\" : toastType === \"success\" ? \"success\" : toastType === \"warning\" ? \"warning\" : \"none\";\n var _toast_duration;\n var result = (0, import_createNativeToast.createNativeToast)(titleText, {\n message: typeof descText === \"string\" ? descText : void 0,\n duration: (_toast_duration = toast.duration) !== null && _toast_duration !== void 0 ? _toast_duration : opts.duration,\n burntOptions: {\n preset,\n haptic,\n ...opts.burntOptions\n },\n notificationOptions: opts.notificationOptions\n });\n return result !== false;\n}\n//# sourceMappingURL=dispatchNativeToast.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,8BAA8B,CAAC;AACnC,SAAS,6BAA6B,EACpC,2BAA2B,oBAC7B,CAAC;AACD,OAAO,UAAU,aAAa,2BAA2B;AACzD,IAAI,2BAA2B,QAAQ,+BAAqB;AAC5D,SAAS,oBAAoB,OAAO,MAAM;CACxC,IAAI,YAAY,OAAO,MAAM,UAAU,aAAa,MAAM,MAAM,IAAI,MAAM;CAC1E,IAAI,OAAO,cAAc,UAAU,OAAO;CAC1C,IAAI,WAAW,OAAO,MAAM,gBAAgB,aAAa,MAAM,YAAY,IAAI,MAAM;CACrF,IAAI;CACJ,IAAI,aAAa,cAAc,MAAM,UAAU,QAAQ,gBAAgB,KAAK,IAAI,cAAc;CAC9F,IAAI,SAAS,cAAc,UAAU,UAAU,cAAc,YAAY,SAAS;CAClF,IAAI,SAAS,cAAc,UAAU,UAAU,cAAc,YAAY,YAAY,cAAc,YAAY,YAAY;CAC3H,IAAI;CACJ,IAAI,UAAU,GAAG,yBAAyB,kBAAiB,CAAE,WAAW;EACtE,SAAS,OAAO,aAAa,WAAW,WAAW,KAAK;EACxD,WAAW,kBAAkB,MAAM,cAAc,QAAQ,oBAAoB,KAAK,IAAI,kBAAkB,KAAK;EAC7G,cAAc;GACZ;GACA;GACA,GAAG,KAAK;EACV;EACA,qBAAqB,KAAK;CAC5B,CAAC;CACD,OAAO,WAAW;AACpB"}
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -2,19 +2,31 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
5
11
|
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
13
19
|
};
|
|
14
|
-
var
|
|
15
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
16
|
-
value: true
|
|
17
|
-
}), mod);
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
21
|
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
Toast: () => import_ToastComposable.Toast,
|
|
24
|
+
requestNotificationPermission: () => import_createNativeToast.requestNotificationPermission,
|
|
25
|
+
toast: () => import_ToastState.toast,
|
|
26
|
+
useToastItem: () => import_ToastComposable.useToastItem,
|
|
27
|
+
useToasts: () => import_ToastComposable.useToasts
|
|
28
|
+
});
|
|
19
29
|
module.exports = __toCommonJS(index_exports);
|
|
20
|
-
|
|
30
|
+
var import_ToastComposable = require("./ToastComposable.cjs");
|
|
31
|
+
var import_ToastState = require("./ToastState.cjs");
|
|
32
|
+
var import_createNativeToast = require("./createNativeToast.cjs");
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
|
+
var index_exports = {};
|
|
24
|
+
__export(index_exports, {
|
|
25
|
+
Toast: () => import_ToastComposable.Toast,
|
|
26
|
+
requestNotificationPermission: () => import_createNativeToast.requestNotificationPermission,
|
|
27
|
+
toast: () => import_ToastState.toast,
|
|
28
|
+
useToastItem: () => import_ToastComposable.useToastItem,
|
|
29
|
+
useToasts: () => import_ToastComposable.useToasts
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(index_exports);
|
|
32
|
+
var import_ToastComposable = require("./ToastComposable.native.js");
|
|
33
|
+
var import_ToastState = require("./ToastState.native.js");
|
|
34
|
+
var import_createNativeToast = require("./createNativeToast.native.js");
|
package/dist/cjs/index.native.js
CHANGED
|
@@ -4,20 +4,33 @@ var __defProp = Object.defineProperty;
|
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
7
13
|
var __copyProps = (to, from, except, desc) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
15
21
|
};
|
|
16
|
-
var
|
|
17
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
18
|
-
value: true
|
|
19
|
-
}), mod);
|
|
22
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
23
|
var index_exports = {};
|
|
24
|
+
__export(index_exports, {
|
|
25
|
+
Toast: () => import_ToastComposable.Toast,
|
|
26
|
+
requestNotificationPermission: () => import_createNativeToast.requestNotificationPermission,
|
|
27
|
+
toast: () => import_ToastState.toast,
|
|
28
|
+
useToastItem: () => import_ToastComposable.useToastItem,
|
|
29
|
+
useToasts: () => import_ToastComposable.useToasts
|
|
30
|
+
});
|
|
21
31
|
module.exports = __toCommonJS(index_exports);
|
|
22
|
-
|
|
32
|
+
var import_ToastComposable = require("./ToastComposable.native.js");
|
|
33
|
+
var import_ToastState = require("./ToastState.native.js");
|
|
34
|
+
var import_createNativeToast = require("./createNativeToast.native.js");
|
|
35
|
+
|
|
23
36
|
//# sourceMappingURL=index.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.native.js","names":[],"sources":["cjs/index.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\n__export(index_exports, {\n Toast: () => import_ToastComposable.Toast,\n requestNotificationPermission: () => import_createNativeToast.requestNotificationPermission,\n toast: () => import_ToastState.toast,\n useToastItem: () => import_ToastComposable.useToastItem,\n useToasts: () => import_ToastComposable.useToasts\n});\nmodule.exports = __toCommonJS(index_exports);\nvar import_ToastComposable = require(\"./ToastComposable\");\nvar import_ToastState = require(\"./ToastState\");\nvar import_createNativeToast = require(\"./createNativeToast\");\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,gBAAgB,CAAC;AACrB,SAAS,eAAe;CACtB,aAAa,uBAAuB;CACpC,qCAAqC,yBAAyB;CAC9D,aAAa,kBAAkB;CAC/B,oBAAoB,uBAAuB;CAC3C,iBAAiB,uBAAuB;AAC1C,CAAC;AACD,OAAO,UAAU,aAAa,aAAa;AAC3C,IAAI,yBAAyB,QAAQ,6BAAmB;AACxD,IAAI,oBAAoB,QAAQ,wBAAc;AAC9C,IAAI,2BAA2B,QAAQ,+BAAqB"}
|