@yahoo/uds-mobile 2.16.0 → 2.17.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/dist/bin/fixtures/dist/index.mjs +14 -0
- package/dist/components/Toast/Toast.cjs +141 -0
- package/dist/components/Toast/Toast.d.cts +38 -0
- package/dist/components/Toast/Toast.d.cts.map +1 -0
- package/dist/components/Toast/Toast.d.ts +38 -0
- package/dist/components/Toast/Toast.d.ts.map +1 -0
- package/dist/components/Toast/Toast.js +141 -0
- package/dist/components/Toast/Toast.js.map +1 -0
- package/dist/components/Toast/ToastAnimatedItem.cjs +88 -0
- package/dist/components/Toast/ToastAnimatedItem.d.cts +27 -0
- package/dist/components/Toast/ToastAnimatedItem.d.cts.map +1 -0
- package/dist/components/Toast/ToastAnimatedItem.d.ts +27 -0
- package/dist/components/Toast/ToastAnimatedItem.d.ts.map +1 -0
- package/dist/components/Toast/ToastAnimatedItem.js +87 -0
- package/dist/components/Toast/ToastAnimatedItem.js.map +1 -0
- package/dist/components/Toast/ToastItem.cjs +35 -0
- package/dist/components/Toast/ToastItem.d.cts +25 -0
- package/dist/components/Toast/ToastItem.d.cts.map +1 -0
- package/dist/components/Toast/ToastItem.d.ts +25 -0
- package/dist/components/Toast/ToastItem.d.ts.map +1 -0
- package/dist/components/Toast/ToastItem.js +35 -0
- package/dist/components/Toast/ToastItem.js.map +1 -0
- package/dist/components/Toast/ToastProvider.cjs +144 -0
- package/dist/components/Toast/ToastProvider.d.cts +58 -0
- package/dist/components/Toast/ToastProvider.d.cts.map +1 -0
- package/dist/components/Toast/ToastProvider.d.ts +58 -0
- package/dist/components/Toast/ToastProvider.d.ts.map +1 -0
- package/dist/components/Toast/ToastProvider.js +143 -0
- package/dist/components/Toast/ToastProvider.js.map +1 -0
- package/dist/components/Toast/ToastViewport.cjs +48 -0
- package/dist/components/Toast/ToastViewport.d.cts +42 -0
- package/dist/components/Toast/ToastViewport.d.cts.map +1 -0
- package/dist/components/Toast/ToastViewport.d.ts +42 -0
- package/dist/components/Toast/ToastViewport.d.ts.map +1 -0
- package/dist/components/Toast/ToastViewport.js +48 -0
- package/dist/components/Toast/ToastViewport.js.map +1 -0
- package/dist/components/Toast/createToast.cjs +21 -0
- package/dist/components/Toast/createToast.d.cts +10 -0
- package/dist/components/Toast/createToast.d.cts.map +1 -0
- package/dist/components/Toast/createToast.d.ts +10 -0
- package/dist/components/Toast/createToast.d.ts.map +1 -0
- package/dist/components/Toast/createToast.js +20 -0
- package/dist/components/Toast/createToast.js.map +1 -0
- package/dist/components/Toast/index.cjs +10 -0
- package/dist/components/Toast/index.d.cts +6 -0
- package/dist/components/Toast/index.d.ts +6 -0
- package/dist/components/Toast/index.js +5 -0
- package/dist/components/Toast/types.cjs +1 -0
- package/dist/components/Toast/types.d.cts +113 -0
- package/dist/components/Toast/types.d.cts.map +1 -0
- package/dist/components/Toast/types.d.ts +113 -0
- package/dist/components/Toast/types.d.ts.map +1 -0
- package/dist/components/Toast/types.js +1 -0
- package/dist/components/Toast/useToastController.cjs +286 -0
- package/dist/components/Toast/useToastController.d.cts +25 -0
- package/dist/components/Toast/useToastController.d.cts.map +1 -0
- package/dist/components/Toast/useToastController.d.ts +25 -0
- package/dist/components/Toast/useToastController.d.ts.map +1 -0
- package/dist/components/Toast/useToastController.js +286 -0
- package/dist/components/Toast/useToastController.js.map +1 -0
- package/dist/components/Toast/utils.cjs +69 -0
- package/dist/components/Toast/utils.d.cts +27 -0
- package/dist/components/Toast/utils.d.cts.map +1 -0
- package/dist/components/Toast/utils.d.ts +27 -0
- package/dist/components/Toast/utils.d.ts.map +1 -0
- package/dist/components/Toast/utils.js +55 -0
- package/dist/components/Toast/utils.js.map +1 -0
- package/dist/jest/mocks/gesture-handler.cjs +38 -0
- package/dist/jest/mocks/gesture-handler.d.cts +41 -0
- package/dist/jest/mocks/gesture-handler.d.cts.map +1 -0
- package/dist/jest/mocks/gesture-handler.d.ts +41 -0
- package/dist/jest/mocks/gesture-handler.d.ts.map +1 -0
- package/dist/jest/mocks/gesture-handler.js +37 -0
- package/dist/jest/mocks/gesture-handler.js.map +1 -0
- package/dist/jest/mocks/safe-area-context.cjs +35 -0
- package/dist/jest/mocks/safe-area-context.d.cts +43 -0
- package/dist/jest/mocks/safe-area-context.d.cts.map +1 -0
- package/dist/jest/mocks/safe-area-context.d.ts +43 -0
- package/dist/jest/mocks/safe-area-context.d.ts.map +1 -0
- package/dist/jest/mocks/safe-area-context.js +32 -0
- package/dist/jest/mocks/safe-area-context.js.map +1 -0
- package/dist/jest/mocks/screens.cjs +8 -0
- package/dist/jest/mocks/screens.d.cts +12 -0
- package/dist/jest/mocks/screens.d.cts.map +1 -0
- package/dist/jest/mocks/screens.d.ts +12 -0
- package/dist/jest/mocks/screens.d.ts.map +1 -0
- package/dist/jest/mocks/screens.js +9 -0
- package/dist/jest/mocks/screens.js.map +1 -0
- package/dist/jest/mocks/styles.cjs +38 -1
- package/dist/jest/mocks/styles.d.cts +3 -2
- package/dist/jest/mocks/styles.d.cts.map +1 -1
- package/dist/jest/mocks/styles.d.ts +3 -2
- package/dist/jest/mocks/styles.d.ts.map +1 -1
- package/dist/jest/mocks/styles.js +38 -2
- package/dist/jest/mocks/styles.js.map +1 -1
- package/dist/types/dist/index.d.cts +4 -1
- package/dist/types/dist/index.d.cts.map +1 -1
- package/dist/types/dist/index.d.ts +4 -1
- package/dist/types/dist/index.d.ts.map +1 -1
- package/fonts/index.cjs +211 -211
- package/fonts/index.mjs +211 -211
- package/package.json +11 -1
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
//#region src/components/Toast/utils.ts
|
|
4
|
+
const DEFAULT_TOAST_AUTO_CLOSE = 6e3;
|
|
5
|
+
const DEFAULT_TOAST_PLACEMENT = "bottom-center";
|
|
6
|
+
const DEFAULT_MAX_VISIBLE_TOASTS = 3;
|
|
7
|
+
const DEFAULT_TOAST_INSETS = {
|
|
8
|
+
top: 16,
|
|
9
|
+
bottom: 16,
|
|
10
|
+
horizontal: 16
|
|
11
|
+
};
|
|
12
|
+
const TOAST_ENTER_ANIMATION_DURATION = 200;
|
|
13
|
+
const TOAST_EXIT_ANIMATION_DURATION = 150;
|
|
14
|
+
const TOAST_ANIMATION_TRANSLATE_OFFSET = 16;
|
|
15
|
+
const TOAST_SWIPE_DISMISS_TRANSLATE_OFFSET = 96;
|
|
16
|
+
const TOAST_SWIPE_DISMISS_TRANSLATION = 50;
|
|
17
|
+
const TOAST_SWIPE_DISMISS_VELOCITY = 500;
|
|
18
|
+
const TOAST_SWIPE_OPPOSITE_DIRECTION_FACTOR = .2;
|
|
19
|
+
let toastIdCounter = 0;
|
|
20
|
+
function createToastId() {
|
|
21
|
+
toastIdCounter += 1;
|
|
22
|
+
return `toast-${toastIdCounter}`;
|
|
23
|
+
}
|
|
24
|
+
function isPersistentAutoClose(autoClose) {
|
|
25
|
+
return autoClose === false;
|
|
26
|
+
}
|
|
27
|
+
function isToastShowOptions(input) {
|
|
28
|
+
return "actionButton" in input || "children" in input || "closeIcon" in input || "closeOnAction" in input || "autoClose" in input || "dismissible" in input || "id" in input || "message" in input || "onActionPress" in input || "onClickActionButton" in input || "onClickCloseButton" in input || "onClose" in input || "onHide" in input || "onShow" in input || "placement" in input || "size" in input || "startIcon" in input || "variant" in input;
|
|
29
|
+
}
|
|
30
|
+
function resolveToastInput(input) {
|
|
31
|
+
if (input == null || typeof input !== "object") return { message: input };
|
|
32
|
+
return isToastShowOptions(input) ? input : { message: input };
|
|
33
|
+
}
|
|
34
|
+
function toastReducer(state, action) {
|
|
35
|
+
switch (action.type) {
|
|
36
|
+
case "upsert": {
|
|
37
|
+
const existingIndex = state.findIndex((toast) => toast.id === action.toast.id);
|
|
38
|
+
if (existingIndex === -1) return [...state, action.toast];
|
|
39
|
+
const next = [...state];
|
|
40
|
+
next[existingIndex] = action.toast;
|
|
41
|
+
return next;
|
|
42
|
+
}
|
|
43
|
+
case "update": return state.map((toast) => toast.id === action.id ? {
|
|
44
|
+
...toast,
|
|
45
|
+
...action.toast,
|
|
46
|
+
id: toast.id
|
|
47
|
+
} : toast);
|
|
48
|
+
case "remove": return state.filter((toast) => toast.id !== action.id);
|
|
49
|
+
case "set": return action.toasts;
|
|
50
|
+
case "removeAll": return [];
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
//#endregion
|
|
54
|
+
exports.DEFAULT_MAX_VISIBLE_TOASTS = DEFAULT_MAX_VISIBLE_TOASTS;
|
|
55
|
+
exports.DEFAULT_TOAST_AUTO_CLOSE = DEFAULT_TOAST_AUTO_CLOSE;
|
|
56
|
+
exports.DEFAULT_TOAST_INSETS = DEFAULT_TOAST_INSETS;
|
|
57
|
+
exports.DEFAULT_TOAST_PLACEMENT = DEFAULT_TOAST_PLACEMENT;
|
|
58
|
+
exports.TOAST_ANIMATION_TRANSLATE_OFFSET = TOAST_ANIMATION_TRANSLATE_OFFSET;
|
|
59
|
+
exports.TOAST_ENTER_ANIMATION_DURATION = TOAST_ENTER_ANIMATION_DURATION;
|
|
60
|
+
exports.TOAST_EXIT_ANIMATION_DURATION = TOAST_EXIT_ANIMATION_DURATION;
|
|
61
|
+
exports.TOAST_SWIPE_DISMISS_TRANSLATE_OFFSET = TOAST_SWIPE_DISMISS_TRANSLATE_OFFSET;
|
|
62
|
+
exports.TOAST_SWIPE_DISMISS_TRANSLATION = TOAST_SWIPE_DISMISS_TRANSLATION;
|
|
63
|
+
exports.TOAST_SWIPE_DISMISS_VELOCITY = TOAST_SWIPE_DISMISS_VELOCITY;
|
|
64
|
+
exports.TOAST_SWIPE_OPPOSITE_DIRECTION_FACTOR = TOAST_SWIPE_OPPOSITE_DIRECTION_FACTOR;
|
|
65
|
+
exports.createToastId = createToastId;
|
|
66
|
+
exports.isPersistentAutoClose = isPersistentAutoClose;
|
|
67
|
+
exports.isToastShowOptions = isToastShowOptions;
|
|
68
|
+
exports.resolveToastInput = resolveToastInput;
|
|
69
|
+
exports.toastReducer = toastReducer;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
|
|
2
|
+
import { ToastAction, ToastAutoClose, ToastRecord, ToastShowInput } from "./types.cjs";
|
|
3
|
+
|
|
4
|
+
//#region src/components/Toast/utils.d.ts
|
|
5
|
+
declare const DEFAULT_TOAST_AUTO_CLOSE = 6000;
|
|
6
|
+
declare const DEFAULT_TOAST_PLACEMENT = "bottom-center";
|
|
7
|
+
declare const DEFAULT_MAX_VISIBLE_TOASTS = 3;
|
|
8
|
+
declare const DEFAULT_TOAST_INSETS: {
|
|
9
|
+
readonly top: 16;
|
|
10
|
+
readonly bottom: 16;
|
|
11
|
+
readonly horizontal: 16;
|
|
12
|
+
};
|
|
13
|
+
declare const TOAST_ENTER_ANIMATION_DURATION = 200;
|
|
14
|
+
declare const TOAST_EXIT_ANIMATION_DURATION = 150;
|
|
15
|
+
declare const TOAST_ANIMATION_TRANSLATE_OFFSET = 16;
|
|
16
|
+
declare const TOAST_SWIPE_DISMISS_TRANSLATE_OFFSET = 96;
|
|
17
|
+
declare const TOAST_SWIPE_DISMISS_TRANSLATION = 50;
|
|
18
|
+
declare const TOAST_SWIPE_DISMISS_VELOCITY = 500;
|
|
19
|
+
declare const TOAST_SWIPE_OPPOSITE_DIRECTION_FACTOR = 0.2;
|
|
20
|
+
declare function createToastId(): string;
|
|
21
|
+
declare function isPersistentAutoClose(autoClose: ToastAutoClose): autoClose is false;
|
|
22
|
+
declare function isToastShowOptions(input: object): input is Partial<ToastRecord>;
|
|
23
|
+
declare function resolveToastInput(input: ToastShowInput): Partial<ToastRecord>;
|
|
24
|
+
declare function toastReducer(state: ToastRecord[], action: ToastAction): ToastRecord[];
|
|
25
|
+
//#endregion
|
|
26
|
+
export { DEFAULT_MAX_VISIBLE_TOASTS, DEFAULT_TOAST_AUTO_CLOSE, DEFAULT_TOAST_INSETS, DEFAULT_TOAST_PLACEMENT, TOAST_ANIMATION_TRANSLATE_OFFSET, TOAST_ENTER_ANIMATION_DURATION, TOAST_EXIT_ANIMATION_DURATION, TOAST_SWIPE_DISMISS_TRANSLATE_OFFSET, TOAST_SWIPE_DISMISS_TRANSLATION, TOAST_SWIPE_DISMISS_VELOCITY, TOAST_SWIPE_OPPOSITE_DIRECTION_FACTOR, createToastId, isPersistentAutoClose, isToastShowOptions, resolveToastInput, toastReducer };
|
|
27
|
+
//# sourceMappingURL=utils.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.cts","names":[],"sources":["../../../src/components/Toast/utils.ts"],"mappings":";;;;cAIM,wBAAA;AAAA,cACA,uBAAA;AAAA,cACA,0BAAA;AAAA,cACA,oBAAA;EAAA;;;;cAKA,8BAAA;AAAA,cACA,6BAAA;AAAA,cACA,gCAAA;AAAA,cACA,oCAAA;AAAA,cACA,+BAAA;AAAA,cACA,4BAAA;AAAA,cACA,qCAAA;AAAA,iBAIG,aAAA,CAAA;AAAA,iBAKA,qBAAA,CAAsB,SAAA,EAAW,cAAA,GAAiB,SAAA;AAAA,iBAIlD,kBAAA,CAAmB,KAAA,WAAgB,KAAA,IAAS,OAAA,CAAQ,WAAA;AAAA,iBAuBpD,iBAAA,CAAkB,KAAA,EAAO,cAAA,GAAiB,OAAA,CAAQ,WAAA;AAAA,iBAQlD,YAAA,CAAa,KAAA,EAAO,WAAA,IAAe,MAAA,EAAQ,WAAA,GAAc,WAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
|
|
2
|
+
import { ToastAction, ToastAutoClose, ToastRecord, ToastShowInput } from "./types.js";
|
|
3
|
+
|
|
4
|
+
//#region src/components/Toast/utils.d.ts
|
|
5
|
+
declare const DEFAULT_TOAST_AUTO_CLOSE = 6000;
|
|
6
|
+
declare const DEFAULT_TOAST_PLACEMENT = "bottom-center";
|
|
7
|
+
declare const DEFAULT_MAX_VISIBLE_TOASTS = 3;
|
|
8
|
+
declare const DEFAULT_TOAST_INSETS: {
|
|
9
|
+
readonly top: 16;
|
|
10
|
+
readonly bottom: 16;
|
|
11
|
+
readonly horizontal: 16;
|
|
12
|
+
};
|
|
13
|
+
declare const TOAST_ENTER_ANIMATION_DURATION = 200;
|
|
14
|
+
declare const TOAST_EXIT_ANIMATION_DURATION = 150;
|
|
15
|
+
declare const TOAST_ANIMATION_TRANSLATE_OFFSET = 16;
|
|
16
|
+
declare const TOAST_SWIPE_DISMISS_TRANSLATE_OFFSET = 96;
|
|
17
|
+
declare const TOAST_SWIPE_DISMISS_TRANSLATION = 50;
|
|
18
|
+
declare const TOAST_SWIPE_DISMISS_VELOCITY = 500;
|
|
19
|
+
declare const TOAST_SWIPE_OPPOSITE_DIRECTION_FACTOR = 0.2;
|
|
20
|
+
declare function createToastId(): string;
|
|
21
|
+
declare function isPersistentAutoClose(autoClose: ToastAutoClose): autoClose is false;
|
|
22
|
+
declare function isToastShowOptions(input: object): input is Partial<ToastRecord>;
|
|
23
|
+
declare function resolveToastInput(input: ToastShowInput): Partial<ToastRecord>;
|
|
24
|
+
declare function toastReducer(state: ToastRecord[], action: ToastAction): ToastRecord[];
|
|
25
|
+
//#endregion
|
|
26
|
+
export { DEFAULT_MAX_VISIBLE_TOASTS, DEFAULT_TOAST_AUTO_CLOSE, DEFAULT_TOAST_INSETS, DEFAULT_TOAST_PLACEMENT, TOAST_ANIMATION_TRANSLATE_OFFSET, TOAST_ENTER_ANIMATION_DURATION, TOAST_EXIT_ANIMATION_DURATION, TOAST_SWIPE_DISMISS_TRANSLATE_OFFSET, TOAST_SWIPE_DISMISS_TRANSLATION, TOAST_SWIPE_DISMISS_VELOCITY, TOAST_SWIPE_OPPOSITE_DIRECTION_FACTOR, createToastId, isPersistentAutoClose, isToastShowOptions, resolveToastInput, toastReducer };
|
|
27
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","names":[],"sources":["../../../src/components/Toast/utils.ts"],"mappings":";;;;cAIM,wBAAA;AAAA,cACA,uBAAA;AAAA,cACA,0BAAA;AAAA,cACA,oBAAA;EAAA;;;;cAKA,8BAAA;AAAA,cACA,6BAAA;AAAA,cACA,gCAAA;AAAA,cACA,oCAAA;AAAA,cACA,+BAAA;AAAA,cACA,4BAAA;AAAA,cACA,qCAAA;AAAA,iBAIG,aAAA,CAAA;AAAA,iBAKA,qBAAA,CAAsB,SAAA,EAAW,cAAA,GAAiB,SAAA;AAAA,iBAIlD,kBAAA,CAAmB,KAAA,WAAgB,KAAA,IAAS,OAAA,CAAQ,WAAA;AAAA,iBAuBpD,iBAAA,CAAkB,KAAA,EAAO,cAAA,GAAiB,OAAA,CAAQ,WAAA;AAAA,iBAQlD,YAAA,CAAa,KAAA,EAAO,WAAA,IAAe,MAAA,EAAQ,WAAA,GAAc,WAAA"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
+
//#region src/components/Toast/utils.ts
|
|
3
|
+
const DEFAULT_TOAST_AUTO_CLOSE = 6e3;
|
|
4
|
+
const DEFAULT_TOAST_PLACEMENT = "bottom-center";
|
|
5
|
+
const DEFAULT_MAX_VISIBLE_TOASTS = 3;
|
|
6
|
+
const DEFAULT_TOAST_INSETS = {
|
|
7
|
+
top: 16,
|
|
8
|
+
bottom: 16,
|
|
9
|
+
horizontal: 16
|
|
10
|
+
};
|
|
11
|
+
const TOAST_ENTER_ANIMATION_DURATION = 200;
|
|
12
|
+
const TOAST_EXIT_ANIMATION_DURATION = 150;
|
|
13
|
+
const TOAST_ANIMATION_TRANSLATE_OFFSET = 16;
|
|
14
|
+
const TOAST_SWIPE_DISMISS_TRANSLATE_OFFSET = 96;
|
|
15
|
+
const TOAST_SWIPE_DISMISS_TRANSLATION = 50;
|
|
16
|
+
const TOAST_SWIPE_DISMISS_VELOCITY = 500;
|
|
17
|
+
const TOAST_SWIPE_OPPOSITE_DIRECTION_FACTOR = .2;
|
|
18
|
+
let toastIdCounter = 0;
|
|
19
|
+
function createToastId() {
|
|
20
|
+
toastIdCounter += 1;
|
|
21
|
+
return `toast-${toastIdCounter}`;
|
|
22
|
+
}
|
|
23
|
+
function isPersistentAutoClose(autoClose) {
|
|
24
|
+
return autoClose === false;
|
|
25
|
+
}
|
|
26
|
+
function isToastShowOptions(input) {
|
|
27
|
+
return "actionButton" in input || "children" in input || "closeIcon" in input || "closeOnAction" in input || "autoClose" in input || "dismissible" in input || "id" in input || "message" in input || "onActionPress" in input || "onClickActionButton" in input || "onClickCloseButton" in input || "onClose" in input || "onHide" in input || "onShow" in input || "placement" in input || "size" in input || "startIcon" in input || "variant" in input;
|
|
28
|
+
}
|
|
29
|
+
function resolveToastInput(input) {
|
|
30
|
+
if (input == null || typeof input !== "object") return { message: input };
|
|
31
|
+
return isToastShowOptions(input) ? input : { message: input };
|
|
32
|
+
}
|
|
33
|
+
function toastReducer(state, action) {
|
|
34
|
+
switch (action.type) {
|
|
35
|
+
case "upsert": {
|
|
36
|
+
const existingIndex = state.findIndex((toast) => toast.id === action.toast.id);
|
|
37
|
+
if (existingIndex === -1) return [...state, action.toast];
|
|
38
|
+
const next = [...state];
|
|
39
|
+
next[existingIndex] = action.toast;
|
|
40
|
+
return next;
|
|
41
|
+
}
|
|
42
|
+
case "update": return state.map((toast) => toast.id === action.id ? {
|
|
43
|
+
...toast,
|
|
44
|
+
...action.toast,
|
|
45
|
+
id: toast.id
|
|
46
|
+
} : toast);
|
|
47
|
+
case "remove": return state.filter((toast) => toast.id !== action.id);
|
|
48
|
+
case "set": return action.toasts;
|
|
49
|
+
case "removeAll": return [];
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
//#endregion
|
|
53
|
+
export { DEFAULT_MAX_VISIBLE_TOASTS, DEFAULT_TOAST_AUTO_CLOSE, DEFAULT_TOAST_INSETS, DEFAULT_TOAST_PLACEMENT, TOAST_ANIMATION_TRANSLATE_OFFSET, TOAST_ENTER_ANIMATION_DURATION, TOAST_EXIT_ANIMATION_DURATION, TOAST_SWIPE_DISMISS_TRANSLATE_OFFSET, TOAST_SWIPE_DISMISS_TRANSLATION, TOAST_SWIPE_DISMISS_VELOCITY, TOAST_SWIPE_OPPOSITE_DIRECTION_FACTOR, createToastId, isPersistentAutoClose, isToastShowOptions, resolveToastInput, toastReducer };
|
|
54
|
+
|
|
55
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","names":[],"sources":["../../../src/components/Toast/utils.ts"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport type { ToastAction, ToastAutoClose, ToastRecord, ToastShowInput } from './types';\n\nconst DEFAULT_TOAST_AUTO_CLOSE = 6_000;\nconst DEFAULT_TOAST_PLACEMENT = 'bottom-center';\nconst DEFAULT_MAX_VISIBLE_TOASTS = 3;\nconst DEFAULT_TOAST_INSETS = {\n top: 16,\n bottom: 16,\n horizontal: 16,\n} as const;\nconst TOAST_ENTER_ANIMATION_DURATION = 200;\nconst TOAST_EXIT_ANIMATION_DURATION = 150;\nconst TOAST_ANIMATION_TRANSLATE_OFFSET = 16;\nconst TOAST_SWIPE_DISMISS_TRANSLATE_OFFSET = 96;\nconst TOAST_SWIPE_DISMISS_TRANSLATION = 50;\nconst TOAST_SWIPE_DISMISS_VELOCITY = 500;\nconst TOAST_SWIPE_OPPOSITE_DIRECTION_FACTOR = 0.2;\n\nlet toastIdCounter = 0;\n\nfunction createToastId(): string {\n toastIdCounter += 1;\n return `toast-${toastIdCounter}`;\n}\n\nfunction isPersistentAutoClose(autoClose: ToastAutoClose): autoClose is false {\n return autoClose === false;\n}\n\nfunction isToastShowOptions(input: object): input is Partial<ToastRecord> {\n return (\n 'actionButton' in input ||\n 'children' in input ||\n 'closeIcon' in input ||\n 'closeOnAction' in input ||\n 'autoClose' in input ||\n 'dismissible' in input ||\n 'id' in input ||\n 'message' in input ||\n 'onActionPress' in input ||\n 'onClickActionButton' in input ||\n 'onClickCloseButton' in input ||\n 'onClose' in input ||\n 'onHide' in input ||\n 'onShow' in input ||\n 'placement' in input ||\n 'size' in input ||\n 'startIcon' in input ||\n 'variant' in input\n );\n}\n\nfunction resolveToastInput(input: ToastShowInput): Partial<ToastRecord> {\n if (input == null || typeof input !== 'object') {\n return { message: input };\n }\n\n return isToastShowOptions(input) ? input : { message: input as ReactNode };\n}\n\nfunction toastReducer(state: ToastRecord[], action: ToastAction): ToastRecord[] {\n switch (action.type) {\n case 'upsert': {\n const existingIndex = state.findIndex((toast) => toast.id === action.toast.id);\n\n if (existingIndex === -1) {\n return [...state, action.toast];\n }\n\n const next = [...state];\n next[existingIndex] = action.toast;\n return next;\n }\n case 'update': {\n return state.map((toast) =>\n toast.id === action.id ? { ...toast, ...action.toast, id: toast.id } : toast,\n );\n }\n case 'remove': {\n return state.filter((toast) => toast.id !== action.id);\n }\n case 'set': {\n return action.toasts;\n }\n case 'removeAll': {\n return [];\n }\n }\n}\n\nexport {\n createToastId,\n DEFAULT_MAX_VISIBLE_TOASTS,\n DEFAULT_TOAST_AUTO_CLOSE,\n DEFAULT_TOAST_INSETS,\n DEFAULT_TOAST_PLACEMENT,\n isPersistentAutoClose,\n isToastShowOptions,\n resolveToastInput,\n TOAST_ANIMATION_TRANSLATE_OFFSET,\n TOAST_ENTER_ANIMATION_DURATION,\n TOAST_EXIT_ANIMATION_DURATION,\n TOAST_SWIPE_DISMISS_TRANSLATE_OFFSET,\n TOAST_SWIPE_DISMISS_TRANSLATION,\n TOAST_SWIPE_DISMISS_VELOCITY,\n TOAST_SWIPE_OPPOSITE_DIRECTION_FACTOR,\n toastReducer,\n};\n"],"mappings":";;AAIA,MAAM,2BAA2B;AACjC,MAAM,0BAA0B;AAChC,MAAM,6BAA6B;AACnC,MAAM,uBAAuB;CAC3B,KAAK;CACL,QAAQ;CACR,YAAY;CACb;AACD,MAAM,iCAAiC;AACvC,MAAM,gCAAgC;AACtC,MAAM,mCAAmC;AACzC,MAAM,uCAAuC;AAC7C,MAAM,kCAAkC;AACxC,MAAM,+BAA+B;AACrC,MAAM,wCAAwC;AAE9C,IAAI,iBAAiB;AAErB,SAAS,gBAAwB;CAC/B,kBAAkB;CAClB,OAAO,SAAS;;AAGlB,SAAS,sBAAsB,WAA+C;CAC5E,OAAO,cAAc;;AAGvB,SAAS,mBAAmB,OAA8C;CACxE,OACE,kBAAkB,SAClB,cAAc,SACd,eAAe,SACf,mBAAmB,SACnB,eAAe,SACf,iBAAiB,SACjB,QAAQ,SACR,aAAa,SACb,mBAAmB,SACnB,yBAAyB,SACzB,wBAAwB,SACxB,aAAa,SACb,YAAY,SACZ,YAAY,SACZ,eAAe,SACf,UAAU,SACV,eAAe,SACf,aAAa;;AAIjB,SAAS,kBAAkB,OAA6C;CACtE,IAAI,SAAS,QAAQ,OAAO,UAAU,UACpC,OAAO,EAAE,SAAS,OAAO;CAG3B,OAAO,mBAAmB,MAAM,GAAG,QAAQ,EAAE,SAAS,OAAoB;;AAG5E,SAAS,aAAa,OAAsB,QAAoC;CAC9E,QAAQ,OAAO,MAAf;EACE,KAAK,UAAU;GACb,MAAM,gBAAgB,MAAM,WAAW,UAAU,MAAM,OAAO,OAAO,MAAM,GAAG;GAE9E,IAAI,kBAAkB,IACpB,OAAO,CAAC,GAAG,OAAO,OAAO,MAAM;GAGjC,MAAM,OAAO,CAAC,GAAG,MAAM;GACvB,KAAK,iBAAiB,OAAO;GAC7B,OAAO;;EAET,KAAK,UACH,OAAO,MAAM,KAAK,UAChB,MAAM,OAAO,OAAO,KAAK;GAAE,GAAG;GAAO,GAAG,OAAO;GAAO,IAAI,MAAM;GAAI,GAAG,MACxE;EAEH,KAAK,UACH,OAAO,MAAM,QAAQ,UAAU,MAAM,OAAO,OAAO,GAAG;EAExD,KAAK,OACH,OAAO,OAAO;EAEhB,KAAK,aACH,OAAO,EAAE"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
//#region src/jest/mocks/gesture-handler.tsx
|
|
4
|
+
function GestureDetector({ children }) {
|
|
5
|
+
return children;
|
|
6
|
+
}
|
|
7
|
+
function createMockGesture() {
|
|
8
|
+
const gesture = {};
|
|
9
|
+
gesture.activeOffsetY = jest.fn(() => gesture);
|
|
10
|
+
gesture.enabled = jest.fn(() => gesture);
|
|
11
|
+
gesture.failOffsetX = jest.fn(() => gesture);
|
|
12
|
+
gesture.manualActivation = jest.fn(() => gesture);
|
|
13
|
+
gesture.onBegin = jest.fn(() => gesture);
|
|
14
|
+
gesture.onChange = jest.fn(() => gesture);
|
|
15
|
+
gesture.onEnd = jest.fn(() => gesture);
|
|
16
|
+
gesture.onFinalize = jest.fn(() => gesture);
|
|
17
|
+
gesture.onStart = jest.fn(() => gesture);
|
|
18
|
+
gesture.onTouchesDown = jest.fn(() => gesture);
|
|
19
|
+
gesture.onTouchesMove = jest.fn(() => gesture);
|
|
20
|
+
gesture.onUpdate = jest.fn(() => gesture);
|
|
21
|
+
gesture.simultaneousWithExternalGesture = jest.fn(() => gesture);
|
|
22
|
+
gesture.withRef = jest.fn(() => gesture);
|
|
23
|
+
return gesture;
|
|
24
|
+
}
|
|
25
|
+
const Gesture = {
|
|
26
|
+
Native: createMockGesture,
|
|
27
|
+
Pan: createMockGesture,
|
|
28
|
+
Race: jest.fn((..._gestures) => createMockGesture()),
|
|
29
|
+
Simultaneous: jest.fn((..._gestures) => createMockGesture()),
|
|
30
|
+
Tap: createMockGesture
|
|
31
|
+
};
|
|
32
|
+
function GestureHandlerRootView({ children }) {
|
|
33
|
+
return children;
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
exports.Gesture = Gesture;
|
|
37
|
+
exports.GestureDetector = GestureDetector;
|
|
38
|
+
exports.GestureHandlerRootView = GestureHandlerRootView;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/jest/mocks/gesture-handler.d.ts
|
|
5
|
+
interface GestureDetectorProps {
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
type MockGestureMethod = jest.Mock<MockGesture, unknown[]>;
|
|
9
|
+
interface MockGesture {
|
|
10
|
+
activeOffsetY: MockGestureMethod;
|
|
11
|
+
enabled: MockGestureMethod;
|
|
12
|
+
failOffsetX: MockGestureMethod;
|
|
13
|
+
manualActivation: MockGestureMethod;
|
|
14
|
+
onBegin: MockGestureMethod;
|
|
15
|
+
onChange: MockGestureMethod;
|
|
16
|
+
onEnd: MockGestureMethod;
|
|
17
|
+
onFinalize: MockGestureMethod;
|
|
18
|
+
onStart: MockGestureMethod;
|
|
19
|
+
onTouchesDown: MockGestureMethod;
|
|
20
|
+
onTouchesMove: MockGestureMethod;
|
|
21
|
+
onUpdate: MockGestureMethod;
|
|
22
|
+
simultaneousWithExternalGesture: MockGestureMethod;
|
|
23
|
+
withRef: MockGestureMethod;
|
|
24
|
+
}
|
|
25
|
+
declare function GestureDetector({
|
|
26
|
+
children
|
|
27
|
+
}: GestureDetectorProps): ReactNode;
|
|
28
|
+
declare function createMockGesture(): MockGesture;
|
|
29
|
+
declare const Gesture: {
|
|
30
|
+
Native: typeof createMockGesture;
|
|
31
|
+
Pan: typeof createMockGesture;
|
|
32
|
+
Race: jest.Mock<MockGesture, unknown[], any>;
|
|
33
|
+
Simultaneous: jest.Mock<MockGesture, unknown[], any>;
|
|
34
|
+
Tap: typeof createMockGesture;
|
|
35
|
+
};
|
|
36
|
+
declare function GestureHandlerRootView({
|
|
37
|
+
children
|
|
38
|
+
}: GestureDetectorProps): ReactNode;
|
|
39
|
+
//#endregion
|
|
40
|
+
export { Gesture, GestureDetector, GestureHandlerRootView };
|
|
41
|
+
//# sourceMappingURL=gesture-handler.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gesture-handler.d.cts","names":[],"sources":["../../../src/jest/mocks/gesture-handler.tsx"],"mappings":";;;;UAIU,oBAAA;EACR,QAAA,GAAW,SAAA;AAAA;AAAA,KAGR,iBAAA,GAAoB,IAAA,CAAK,IAAA,CAAK,WAAA;AAAA,UAEzB,WAAA;EACR,aAAA,EAAe,iBAAA;EACf,OAAA,EAAS,iBAAA;EACT,WAAA,EAAa,iBAAA;EACb,gBAAA,EAAkB,iBAAA;EAClB,OAAA,EAAS,iBAAA;EACT,QAAA,EAAU,iBAAA;EACV,KAAA,EAAO,iBAAA;EACP,UAAA,EAAY,iBAAA;EACZ,OAAA,EAAS,iBAAA;EACT,aAAA,EAAe,iBAAA;EACf,aAAA,EAAe,iBAAA;EACf,QAAA,EAAU,iBAAA;EACV,+BAAA,EAAiC,iBAAA;EACjC,OAAA,EAAS,iBAAA;AAAA;AAAA,iBAGF,eAAA,CAAA;EAAkB;AAAA,GAAY,oBAAA,GAAoB,SAAA;AAAA,iBAIlD,iBAAA,CAAA,GAAqB,WAAA;AAAA,cAqBxB,OAAA;;;;;;;iBAQG,sBAAA,CAAA;EAAyB;AAAA,GAAY,oBAAA,GAAoB,SAAA"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/jest/mocks/gesture-handler.d.ts
|
|
5
|
+
interface GestureDetectorProps {
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
type MockGestureMethod = jest.Mock<MockGesture, unknown[]>;
|
|
9
|
+
interface MockGesture {
|
|
10
|
+
activeOffsetY: MockGestureMethod;
|
|
11
|
+
enabled: MockGestureMethod;
|
|
12
|
+
failOffsetX: MockGestureMethod;
|
|
13
|
+
manualActivation: MockGestureMethod;
|
|
14
|
+
onBegin: MockGestureMethod;
|
|
15
|
+
onChange: MockGestureMethod;
|
|
16
|
+
onEnd: MockGestureMethod;
|
|
17
|
+
onFinalize: MockGestureMethod;
|
|
18
|
+
onStart: MockGestureMethod;
|
|
19
|
+
onTouchesDown: MockGestureMethod;
|
|
20
|
+
onTouchesMove: MockGestureMethod;
|
|
21
|
+
onUpdate: MockGestureMethod;
|
|
22
|
+
simultaneousWithExternalGesture: MockGestureMethod;
|
|
23
|
+
withRef: MockGestureMethod;
|
|
24
|
+
}
|
|
25
|
+
declare function GestureDetector({
|
|
26
|
+
children
|
|
27
|
+
}: GestureDetectorProps): ReactNode;
|
|
28
|
+
declare function createMockGesture(): MockGesture;
|
|
29
|
+
declare const Gesture: {
|
|
30
|
+
Native: typeof createMockGesture;
|
|
31
|
+
Pan: typeof createMockGesture;
|
|
32
|
+
Race: jest.Mock<MockGesture, unknown[], any>;
|
|
33
|
+
Simultaneous: jest.Mock<MockGesture, unknown[], any>;
|
|
34
|
+
Tap: typeof createMockGesture;
|
|
35
|
+
};
|
|
36
|
+
declare function GestureHandlerRootView({
|
|
37
|
+
children
|
|
38
|
+
}: GestureDetectorProps): ReactNode;
|
|
39
|
+
//#endregion
|
|
40
|
+
export { Gesture, GestureDetector, GestureHandlerRootView };
|
|
41
|
+
//# sourceMappingURL=gesture-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gesture-handler.d.ts","names":[],"sources":["../../../src/jest/mocks/gesture-handler.tsx"],"mappings":";;;;UAIU,oBAAA;EACR,QAAA,GAAW,SAAA;AAAA;AAAA,KAGR,iBAAA,GAAoB,IAAA,CAAK,IAAA,CAAK,WAAA;AAAA,UAEzB,WAAA;EACR,aAAA,EAAe,iBAAA;EACf,OAAA,EAAS,iBAAA;EACT,WAAA,EAAa,iBAAA;EACb,gBAAA,EAAkB,iBAAA;EAClB,OAAA,EAAS,iBAAA;EACT,QAAA,EAAU,iBAAA;EACV,KAAA,EAAO,iBAAA;EACP,UAAA,EAAY,iBAAA;EACZ,OAAA,EAAS,iBAAA;EACT,aAAA,EAAe,iBAAA;EACf,aAAA,EAAe,iBAAA;EACf,QAAA,EAAU,iBAAA;EACV,+BAAA,EAAiC,iBAAA;EACjC,OAAA,EAAS,iBAAA;AAAA;AAAA,iBAGF,eAAA,CAAA;EAAkB;AAAA,GAAY,oBAAA,GAAoB,SAAA;AAAA,iBAIlD,iBAAA,CAAA,GAAqB,WAAA;AAAA,cAqBxB,OAAA;;;;;;;iBAQG,sBAAA,CAAA;EAAyB;AAAA,GAAY,oBAAA,GAAoB,SAAA"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
+
//#region src/jest/mocks/gesture-handler.tsx
|
|
3
|
+
function GestureDetector({ children }) {
|
|
4
|
+
return children;
|
|
5
|
+
}
|
|
6
|
+
function createMockGesture() {
|
|
7
|
+
const gesture = {};
|
|
8
|
+
gesture.activeOffsetY = jest.fn(() => gesture);
|
|
9
|
+
gesture.enabled = jest.fn(() => gesture);
|
|
10
|
+
gesture.failOffsetX = jest.fn(() => gesture);
|
|
11
|
+
gesture.manualActivation = jest.fn(() => gesture);
|
|
12
|
+
gesture.onBegin = jest.fn(() => gesture);
|
|
13
|
+
gesture.onChange = jest.fn(() => gesture);
|
|
14
|
+
gesture.onEnd = jest.fn(() => gesture);
|
|
15
|
+
gesture.onFinalize = jest.fn(() => gesture);
|
|
16
|
+
gesture.onStart = jest.fn(() => gesture);
|
|
17
|
+
gesture.onTouchesDown = jest.fn(() => gesture);
|
|
18
|
+
gesture.onTouchesMove = jest.fn(() => gesture);
|
|
19
|
+
gesture.onUpdate = jest.fn(() => gesture);
|
|
20
|
+
gesture.simultaneousWithExternalGesture = jest.fn(() => gesture);
|
|
21
|
+
gesture.withRef = jest.fn(() => gesture);
|
|
22
|
+
return gesture;
|
|
23
|
+
}
|
|
24
|
+
const Gesture = {
|
|
25
|
+
Native: createMockGesture,
|
|
26
|
+
Pan: createMockGesture,
|
|
27
|
+
Race: jest.fn((..._gestures) => createMockGesture()),
|
|
28
|
+
Simultaneous: jest.fn((..._gestures) => createMockGesture()),
|
|
29
|
+
Tap: createMockGesture
|
|
30
|
+
};
|
|
31
|
+
function GestureHandlerRootView({ children }) {
|
|
32
|
+
return children;
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
export { Gesture, GestureDetector, GestureHandlerRootView };
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=gesture-handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gesture-handler.js","names":[],"sources":["../../../src/jest/mocks/gesture-handler.tsx"],"sourcesContent":["/// <reference types=\"jest\" />\n\nimport type { ReactNode } from 'react';\n\ninterface GestureDetectorProps {\n children?: ReactNode;\n}\n\ntype MockGestureMethod = jest.Mock<MockGesture, unknown[]>;\n\ninterface MockGesture {\n activeOffsetY: MockGestureMethod;\n enabled: MockGestureMethod;\n failOffsetX: MockGestureMethod;\n manualActivation: MockGestureMethod;\n onBegin: MockGestureMethod;\n onChange: MockGestureMethod;\n onEnd: MockGestureMethod;\n onFinalize: MockGestureMethod;\n onStart: MockGestureMethod;\n onTouchesDown: MockGestureMethod;\n onTouchesMove: MockGestureMethod;\n onUpdate: MockGestureMethod;\n simultaneousWithExternalGesture: MockGestureMethod;\n withRef: MockGestureMethod;\n}\n\nfunction GestureDetector({ children }: GestureDetectorProps) {\n return children;\n}\n\nfunction createMockGesture(): MockGesture {\n const gesture = {} as MockGesture;\n\n gesture.activeOffsetY = jest.fn(() => gesture);\n gesture.enabled = jest.fn(() => gesture);\n gesture.failOffsetX = jest.fn(() => gesture);\n gesture.manualActivation = jest.fn(() => gesture);\n gesture.onBegin = jest.fn(() => gesture);\n gesture.onChange = jest.fn(() => gesture);\n gesture.onEnd = jest.fn(() => gesture);\n gesture.onFinalize = jest.fn(() => gesture);\n gesture.onStart = jest.fn(() => gesture);\n gesture.onTouchesDown = jest.fn(() => gesture);\n gesture.onTouchesMove = jest.fn(() => gesture);\n gesture.onUpdate = jest.fn(() => gesture);\n gesture.simultaneousWithExternalGesture = jest.fn(() => gesture);\n gesture.withRef = jest.fn(() => gesture);\n\n return gesture;\n}\n\nconst Gesture = {\n Native: createMockGesture,\n Pan: createMockGesture,\n Race: jest.fn((..._gestures: unknown[]) => createMockGesture()),\n Simultaneous: jest.fn((..._gestures: unknown[]) => createMockGesture()),\n Tap: createMockGesture,\n};\n\nfunction GestureHandlerRootView({ children }: GestureDetectorProps) {\n return children;\n}\n\nexport { Gesture, GestureDetector, GestureHandlerRootView };\n"],"mappings":";;AA2BA,SAAS,gBAAgB,EAAE,YAAkC;CAC3D,OAAO;;AAGT,SAAS,oBAAiC;CACxC,MAAM,UAAU,EAAE;CAElB,QAAQ,gBAAgB,KAAK,SAAS,QAAQ;CAC9C,QAAQ,UAAU,KAAK,SAAS,QAAQ;CACxC,QAAQ,cAAc,KAAK,SAAS,QAAQ;CAC5C,QAAQ,mBAAmB,KAAK,SAAS,QAAQ;CACjD,QAAQ,UAAU,KAAK,SAAS,QAAQ;CACxC,QAAQ,WAAW,KAAK,SAAS,QAAQ;CACzC,QAAQ,QAAQ,KAAK,SAAS,QAAQ;CACtC,QAAQ,aAAa,KAAK,SAAS,QAAQ;CAC3C,QAAQ,UAAU,KAAK,SAAS,QAAQ;CACxC,QAAQ,gBAAgB,KAAK,SAAS,QAAQ;CAC9C,QAAQ,gBAAgB,KAAK,SAAS,QAAQ;CAC9C,QAAQ,WAAW,KAAK,SAAS,QAAQ;CACzC,QAAQ,kCAAkC,KAAK,SAAS,QAAQ;CAChE,QAAQ,UAAU,KAAK,SAAS,QAAQ;CAExC,OAAO;;AAGT,MAAM,UAAU;CACd,QAAQ;CACR,KAAK;CACL,MAAM,KAAK,IAAI,GAAG,cAAyB,mBAAmB,CAAC;CAC/D,cAAc,KAAK,IAAI,GAAG,cAAyB,mBAAmB,CAAC;CACvE,KAAK;CACN;AAED,SAAS,uBAAuB,EAAE,YAAkC;CAClE,OAAO"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
//#region src/jest/mocks/safe-area-context.tsx
|
|
4
|
+
const initialWindowMetrics = {
|
|
5
|
+
frame: {
|
|
6
|
+
x: 0,
|
|
7
|
+
y: 0,
|
|
8
|
+
width: 375,
|
|
9
|
+
height: 812
|
|
10
|
+
},
|
|
11
|
+
insets: {
|
|
12
|
+
top: 0,
|
|
13
|
+
right: 0,
|
|
14
|
+
bottom: 0,
|
|
15
|
+
left: 0
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
function SafeAreaProvider({ children }) {
|
|
19
|
+
return children;
|
|
20
|
+
}
|
|
21
|
+
function SafeAreaView({ children }) {
|
|
22
|
+
return children;
|
|
23
|
+
}
|
|
24
|
+
function useSafeAreaInsets() {
|
|
25
|
+
return initialWindowMetrics.insets;
|
|
26
|
+
}
|
|
27
|
+
function useSafeAreaFrame() {
|
|
28
|
+
return initialWindowMetrics.frame;
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
exports.SafeAreaProvider = SafeAreaProvider;
|
|
32
|
+
exports.SafeAreaView = SafeAreaView;
|
|
33
|
+
exports.initialWindowMetrics = initialWindowMetrics;
|
|
34
|
+
exports.useSafeAreaFrame = useSafeAreaFrame;
|
|
35
|
+
exports.useSafeAreaInsets = useSafeAreaInsets;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/jest/mocks/safe-area-context.d.ts
|
|
5
|
+
declare const initialWindowMetrics: {
|
|
6
|
+
frame: {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
};
|
|
12
|
+
insets: {
|
|
13
|
+
top: number;
|
|
14
|
+
right: number;
|
|
15
|
+
bottom: number;
|
|
16
|
+
left: number;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
declare function SafeAreaProvider({
|
|
20
|
+
children
|
|
21
|
+
}: {
|
|
22
|
+
children?: ReactNode;
|
|
23
|
+
}): ReactNode;
|
|
24
|
+
declare function SafeAreaView({
|
|
25
|
+
children
|
|
26
|
+
}: {
|
|
27
|
+
children?: ReactNode;
|
|
28
|
+
}): ReactNode;
|
|
29
|
+
declare function useSafeAreaInsets(): {
|
|
30
|
+
top: number;
|
|
31
|
+
right: number;
|
|
32
|
+
bottom: number;
|
|
33
|
+
left: number;
|
|
34
|
+
};
|
|
35
|
+
declare function useSafeAreaFrame(): {
|
|
36
|
+
x: number;
|
|
37
|
+
y: number;
|
|
38
|
+
width: number;
|
|
39
|
+
height: number;
|
|
40
|
+
};
|
|
41
|
+
//#endregion
|
|
42
|
+
export { SafeAreaProvider, SafeAreaView, initialWindowMetrics, useSafeAreaFrame, useSafeAreaInsets };
|
|
43
|
+
//# sourceMappingURL=safe-area-context.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"safe-area-context.d.cts","names":[],"sources":["../../../src/jest/mocks/safe-area-context.tsx"],"mappings":";;;;cAEM,oBAAA;;;;;;;;;;;;;;iBAKG,gBAAA,CAAA;EAAmB;AAAA;EAAc,QAAA,GAAW,SAAA;AAAA,IAAW,SAAA;AAAA,iBAIvD,YAAA,CAAA;EAAe;AAAA;EAAc,QAAA,GAAW,SAAA;AAAA,IAAW,SAAA;AAAA,iBAInD,iBAAA,CAAA;;;;;;iBAIA,gBAAA,CAAA"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/jest/mocks/safe-area-context.d.ts
|
|
5
|
+
declare const initialWindowMetrics: {
|
|
6
|
+
frame: {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
};
|
|
12
|
+
insets: {
|
|
13
|
+
top: number;
|
|
14
|
+
right: number;
|
|
15
|
+
bottom: number;
|
|
16
|
+
left: number;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
declare function SafeAreaProvider({
|
|
20
|
+
children
|
|
21
|
+
}: {
|
|
22
|
+
children?: ReactNode;
|
|
23
|
+
}): ReactNode;
|
|
24
|
+
declare function SafeAreaView({
|
|
25
|
+
children
|
|
26
|
+
}: {
|
|
27
|
+
children?: ReactNode;
|
|
28
|
+
}): ReactNode;
|
|
29
|
+
declare function useSafeAreaInsets(): {
|
|
30
|
+
top: number;
|
|
31
|
+
right: number;
|
|
32
|
+
bottom: number;
|
|
33
|
+
left: number;
|
|
34
|
+
};
|
|
35
|
+
declare function useSafeAreaFrame(): {
|
|
36
|
+
x: number;
|
|
37
|
+
y: number;
|
|
38
|
+
width: number;
|
|
39
|
+
height: number;
|
|
40
|
+
};
|
|
41
|
+
//#endregion
|
|
42
|
+
export { SafeAreaProvider, SafeAreaView, initialWindowMetrics, useSafeAreaFrame, useSafeAreaInsets };
|
|
43
|
+
//# sourceMappingURL=safe-area-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"safe-area-context.d.ts","names":[],"sources":["../../../src/jest/mocks/safe-area-context.tsx"],"mappings":";;;;cAEM,oBAAA;;;;;;;;;;;;;;iBAKG,gBAAA,CAAA;EAAmB;AAAA;EAAc,QAAA,GAAW,SAAA;AAAA,IAAW,SAAA;AAAA,iBAIvD,YAAA,CAAA;EAAe;AAAA;EAAc,QAAA,GAAW,SAAA;AAAA,IAAW,SAAA;AAAA,iBAInD,iBAAA,CAAA;;;;;;iBAIA,gBAAA,CAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
+
//#region src/jest/mocks/safe-area-context.tsx
|
|
3
|
+
const initialWindowMetrics = {
|
|
4
|
+
frame: {
|
|
5
|
+
x: 0,
|
|
6
|
+
y: 0,
|
|
7
|
+
width: 375,
|
|
8
|
+
height: 812
|
|
9
|
+
},
|
|
10
|
+
insets: {
|
|
11
|
+
top: 0,
|
|
12
|
+
right: 0,
|
|
13
|
+
bottom: 0,
|
|
14
|
+
left: 0
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
function SafeAreaProvider({ children }) {
|
|
18
|
+
return children;
|
|
19
|
+
}
|
|
20
|
+
function SafeAreaView({ children }) {
|
|
21
|
+
return children;
|
|
22
|
+
}
|
|
23
|
+
function useSafeAreaInsets() {
|
|
24
|
+
return initialWindowMetrics.insets;
|
|
25
|
+
}
|
|
26
|
+
function useSafeAreaFrame() {
|
|
27
|
+
return initialWindowMetrics.frame;
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
export { SafeAreaProvider, SafeAreaView, initialWindowMetrics, useSafeAreaFrame, useSafeAreaInsets };
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=safe-area-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"safe-area-context.js","names":[],"sources":["../../../src/jest/mocks/safe-area-context.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nconst initialWindowMetrics = {\n frame: { x: 0, y: 0, width: 375, height: 812 },\n insets: { top: 0, right: 0, bottom: 0, left: 0 },\n};\n\nfunction SafeAreaProvider({ children }: { children?: ReactNode }) {\n return children;\n}\n\nfunction SafeAreaView({ children }: { children?: ReactNode }) {\n return children;\n}\n\nfunction useSafeAreaInsets() {\n return initialWindowMetrics.insets;\n}\n\nfunction useSafeAreaFrame() {\n return initialWindowMetrics.frame;\n}\n\nexport {\n initialWindowMetrics,\n SafeAreaProvider,\n SafeAreaView,\n useSafeAreaFrame,\n useSafeAreaInsets,\n};\n"],"mappings":";;AAEA,MAAM,uBAAuB;CAC3B,OAAO;EAAE,GAAG;EAAG,GAAG;EAAG,OAAO;EAAK,QAAQ;EAAK;CAC9C,QAAQ;EAAE,KAAK;EAAG,OAAO;EAAG,QAAQ;EAAG,MAAM;EAAG;CACjD;AAED,SAAS,iBAAiB,EAAE,YAAsC;CAChE,OAAO;;AAGT,SAAS,aAAa,EAAE,YAAsC;CAC5D,OAAO;;AAGT,SAAS,oBAAoB;CAC3B,OAAO,qBAAqB;;AAG9B,SAAS,mBAAmB;CAC1B,OAAO,qBAAqB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
//#region src/jest/mocks/screens.tsx
|
|
4
|
+
function FullWindowOverlay({ children }) {
|
|
5
|
+
return children;
|
|
6
|
+
}
|
|
7
|
+
//#endregion
|
|
8
|
+
exports.FullWindowOverlay = FullWindowOverlay;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/jest/mocks/screens.d.ts
|
|
5
|
+
declare function FullWindowOverlay({
|
|
6
|
+
children
|
|
7
|
+
}: {
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
}): ReactNode;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { FullWindowOverlay };
|
|
12
|
+
//# sourceMappingURL=screens.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screens.d.cts","names":[],"sources":["../../../src/jest/mocks/screens.tsx"],"mappings":";;;;iBAES,iBAAA,CAAA;EAAoB;AAAA;EAAc,QAAA,GAAW,SAAA;AAAA,IAAW,SAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/jest/mocks/screens.d.ts
|
|
5
|
+
declare function FullWindowOverlay({
|
|
6
|
+
children
|
|
7
|
+
}: {
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
}): ReactNode;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { FullWindowOverlay };
|
|
12
|
+
//# sourceMappingURL=screens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screens.d.ts","names":[],"sources":["../../../src/jest/mocks/screens.tsx"],"mappings":";;;;iBAES,iBAAA,CAAA;EAAoB;AAAA;EAAc,QAAA,GAAW,SAAA;AAAA,IAAW,SAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screens.js","names":[],"sources":["../../../src/jest/mocks/screens.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nfunction FullWindowOverlay({ children }: { children?: ReactNode }) {\n return children;\n}\n\nexport { FullWindowOverlay };\n"],"mappings":";;AAEA,SAAS,kBAAkB,EAAE,YAAsC;CACjE,OAAO"}
|