@dloizides/ui-feedback 1.2.0 → 1.3.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/CHANGELOG.md +10 -0
- package/dist/index.d.mts +36 -1
- package/dist/index.d.ts +36 -1
- package/dist/index.js +137 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +139 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +107 -106
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.3.0
|
|
4
|
+
|
|
5
|
+
- Add `ToastHost` — the shared, tokenized transient-toast overlay promoted from the
|
|
6
|
+
byte-identical erevna-web / katalogos-web `ToastContainer` twins. Rendering (animated
|
|
7
|
+
fade, positioning, theming) lives here; the emit pipeline stays in the app and is wired
|
|
8
|
+
in via the `subscribe` port (`(push) => unsubscribe`). Colours come from the UiProvider
|
|
9
|
+
theme. New exports: `ToastHost`, `ToastHostProps`, `ToastInput`, `ToastType`, plus the
|
|
10
|
+
`notificationToast` id in `FEEDBACK_TEST_IDS` (default toast testID `notification-toast`,
|
|
11
|
+
preserving existing Playwright selectors).
|
|
12
|
+
|
|
3
13
|
## 1.2.0
|
|
4
14
|
|
|
5
15
|
- Broaden the injected theme so the settings-hub kit can consume it: colour scales are now
|
package/dist/index.d.mts
CHANGED
|
@@ -75,6 +75,7 @@ declare const FEEDBACK_TEST_IDS: {
|
|
|
75
75
|
readonly confirmDialog: "confirm-dialog";
|
|
76
76
|
readonly confirmButton: "confirm-button";
|
|
77
77
|
readonly cancelConfirmButton: "cancel-confirm-button";
|
|
78
|
+
readonly notificationToast: "notification-toast";
|
|
78
79
|
};
|
|
79
80
|
|
|
80
81
|
/**
|
|
@@ -154,4 +155,38 @@ interface ConfirmDialogProps {
|
|
|
154
155
|
}
|
|
155
156
|
declare const ConfirmDialog: ({ visible, title, message, onConfirm, onCancel, confirmLabel, cancelLabel, confirmDisabled, loading, destructive, }: ConfirmDialogProps) => React.ReactElement | null;
|
|
156
157
|
|
|
157
|
-
|
|
158
|
+
/**
|
|
159
|
+
* ToastHost — the shared, tokenized transient-toast overlay promoted from the
|
|
160
|
+
* byte-identical erevna-web / katalogos-web `ToastContainer` twins.
|
|
161
|
+
*
|
|
162
|
+
* The RENDERING (animated fade-in/out, positioning, theming) lives here; the
|
|
163
|
+
* EMIT pipeline stays in the app (its event bus / `@dloizides/bff-web-client`
|
|
164
|
+
* toast emitter). The app wires the two together via the `subscribe` port: a
|
|
165
|
+
* function that registers a push callback and returns an unsubscribe. Colours
|
|
166
|
+
* come from the UiProvider theme (`useUi`) — nothing hardcoded.
|
|
167
|
+
*/
|
|
168
|
+
|
|
169
|
+
type ToastType = 'success' | 'info' | 'error';
|
|
170
|
+
/** What the app pushes through the `subscribe` port. */
|
|
171
|
+
interface ToastInput {
|
|
172
|
+
text: string;
|
|
173
|
+
type?: ToastType;
|
|
174
|
+
}
|
|
175
|
+
interface ToastHostProps {
|
|
176
|
+
/**
|
|
177
|
+
* Register a push callback; return an unsubscribe. The app adapts its own
|
|
178
|
+
* event bus (e.g. `@dloizides/bff-web-client`'s toast emitter) to this port.
|
|
179
|
+
*/
|
|
180
|
+
subscribe: (push: (toast: ToastInput) => void) => () => void;
|
|
181
|
+
/** How long each toast stays before fading (ms). Default 3000. */
|
|
182
|
+
durationMs?: number;
|
|
183
|
+
/** Fade in/out animation duration (ms). Default 200. */
|
|
184
|
+
fadeMs?: number;
|
|
185
|
+
/** Max message length before truncation. Default 500. */
|
|
186
|
+
maxLength?: number;
|
|
187
|
+
/** testID for each toast (defaults to `notification-toast`). */
|
|
188
|
+
toastTestID?: string;
|
|
189
|
+
}
|
|
190
|
+
declare const ToastHost: ({ subscribe, durationMs, fadeMs, maxLength, toastTestID, }: ToastHostProps) => React.ReactElement | null;
|
|
191
|
+
|
|
192
|
+
export { ConfirmDialog, type ConfirmDialogProps, DISABLED_OPACITY, EmptyListState, type EmptyListStateProps, ErrorState, type ErrorStateProps, FEEDBACK_TEST_IDS, type FeedbackColorScale, type FeedbackNavigate, type FeedbackTheme, type FeedbackThemeColors, type FeedbackThemePalette, type FeedbackThemeSemantic, type FeedbackTranslate, FeedbackUiProvider, type FeedbackUiProviderProps, type FeedbackUiValue, LoadingFallback, type LoadingFallbackProps, MODAL_OVERLAY_COLOR, PageSkeleton, type PageSkeletonProps, ToastHost, type ToastHostProps, type ToastInput, type ToastType, type FeedbackColorScale as UiColorScale, type FeedbackNavigate as UiNavigate, FeedbackUiProvider as UiProvider, type FeedbackUiProviderProps as UiProviderProps, type FeedbackTheme as UiTheme, type FeedbackThemeColors as UiThemeColors, type FeedbackThemePalette as UiThemePalette, type FeedbackThemeSemantic as UiThemeSemantic, type FeedbackTranslate as UiTranslate, type FeedbackUiValue as UiValue, useFeedbackUi, useFeedbackUi as useUi };
|
package/dist/index.d.ts
CHANGED
|
@@ -75,6 +75,7 @@ declare const FEEDBACK_TEST_IDS: {
|
|
|
75
75
|
readonly confirmDialog: "confirm-dialog";
|
|
76
76
|
readonly confirmButton: "confirm-button";
|
|
77
77
|
readonly cancelConfirmButton: "cancel-confirm-button";
|
|
78
|
+
readonly notificationToast: "notification-toast";
|
|
78
79
|
};
|
|
79
80
|
|
|
80
81
|
/**
|
|
@@ -154,4 +155,38 @@ interface ConfirmDialogProps {
|
|
|
154
155
|
}
|
|
155
156
|
declare const ConfirmDialog: ({ visible, title, message, onConfirm, onCancel, confirmLabel, cancelLabel, confirmDisabled, loading, destructive, }: ConfirmDialogProps) => React.ReactElement | null;
|
|
156
157
|
|
|
157
|
-
|
|
158
|
+
/**
|
|
159
|
+
* ToastHost — the shared, tokenized transient-toast overlay promoted from the
|
|
160
|
+
* byte-identical erevna-web / katalogos-web `ToastContainer` twins.
|
|
161
|
+
*
|
|
162
|
+
* The RENDERING (animated fade-in/out, positioning, theming) lives here; the
|
|
163
|
+
* EMIT pipeline stays in the app (its event bus / `@dloizides/bff-web-client`
|
|
164
|
+
* toast emitter). The app wires the two together via the `subscribe` port: a
|
|
165
|
+
* function that registers a push callback and returns an unsubscribe. Colours
|
|
166
|
+
* come from the UiProvider theme (`useUi`) — nothing hardcoded.
|
|
167
|
+
*/
|
|
168
|
+
|
|
169
|
+
type ToastType = 'success' | 'info' | 'error';
|
|
170
|
+
/** What the app pushes through the `subscribe` port. */
|
|
171
|
+
interface ToastInput {
|
|
172
|
+
text: string;
|
|
173
|
+
type?: ToastType;
|
|
174
|
+
}
|
|
175
|
+
interface ToastHostProps {
|
|
176
|
+
/**
|
|
177
|
+
* Register a push callback; return an unsubscribe. The app adapts its own
|
|
178
|
+
* event bus (e.g. `@dloizides/bff-web-client`'s toast emitter) to this port.
|
|
179
|
+
*/
|
|
180
|
+
subscribe: (push: (toast: ToastInput) => void) => () => void;
|
|
181
|
+
/** How long each toast stays before fading (ms). Default 3000. */
|
|
182
|
+
durationMs?: number;
|
|
183
|
+
/** Fade in/out animation duration (ms). Default 200. */
|
|
184
|
+
fadeMs?: number;
|
|
185
|
+
/** Max message length before truncation. Default 500. */
|
|
186
|
+
maxLength?: number;
|
|
187
|
+
/** testID for each toast (defaults to `notification-toast`). */
|
|
188
|
+
toastTestID?: string;
|
|
189
|
+
}
|
|
190
|
+
declare const ToastHost: ({ subscribe, durationMs, fadeMs, maxLength, toastTestID, }: ToastHostProps) => React.ReactElement | null;
|
|
191
|
+
|
|
192
|
+
export { ConfirmDialog, type ConfirmDialogProps, DISABLED_OPACITY, EmptyListState, type EmptyListStateProps, ErrorState, type ErrorStateProps, FEEDBACK_TEST_IDS, type FeedbackColorScale, type FeedbackNavigate, type FeedbackTheme, type FeedbackThemeColors, type FeedbackThemePalette, type FeedbackThemeSemantic, type FeedbackTranslate, FeedbackUiProvider, type FeedbackUiProviderProps, type FeedbackUiValue, LoadingFallback, type LoadingFallbackProps, MODAL_OVERLAY_COLOR, PageSkeleton, type PageSkeletonProps, ToastHost, type ToastHostProps, type ToastInput, type ToastType, type FeedbackColorScale as UiColorScale, type FeedbackNavigate as UiNavigate, FeedbackUiProvider as UiProvider, type FeedbackUiProviderProps as UiProviderProps, type FeedbackTheme as UiTheme, type FeedbackThemeColors as UiThemeColors, type FeedbackThemePalette as UiThemePalette, type FeedbackThemeSemantic as UiThemeSemantic, type FeedbackTranslate as UiTranslate, type FeedbackUiValue as UiValue, useFeedbackUi, useFeedbackUi as useUi };
|
package/dist/index.js
CHANGED
|
@@ -58,7 +58,8 @@ var FEEDBACK_TEST_IDS = {
|
|
|
58
58
|
pageSkeleton: "page-skeleton",
|
|
59
59
|
confirmDialog: "confirm-dialog",
|
|
60
60
|
confirmButton: "confirm-button",
|
|
61
|
-
cancelConfirmButton: "cancel-confirm-button"
|
|
61
|
+
cancelConfirmButton: "cancel-confirm-button",
|
|
62
|
+
notificationToast: "notification-toast"
|
|
62
63
|
};
|
|
63
64
|
var MESSAGE_FONT_SIZE = 16;
|
|
64
65
|
var CONTAINER_PADDING = 20;
|
|
@@ -462,6 +463,140 @@ var ConfirmDialog = ({
|
|
|
462
463
|
}
|
|
463
464
|
);
|
|
464
465
|
};
|
|
466
|
+
var DEFAULT_DURATION_MS = 3e3;
|
|
467
|
+
var DEFAULT_FADE_MS = 200;
|
|
468
|
+
var DEFAULT_MAX_LENGTH = 500;
|
|
469
|
+
var TOAST_TOP_WEB = 10;
|
|
470
|
+
var TOAST_TOP_MOBILE = 40;
|
|
471
|
+
var TOAST_HORIZONTAL_MARGIN = 10;
|
|
472
|
+
var TOAST_Z_INDEX = 9999;
|
|
473
|
+
var TOAST_INITIAL_TRANSLATE_Y = -6;
|
|
474
|
+
var TOAST_MAX_WIDTH = 600;
|
|
475
|
+
var TOAST_PADDING_HORIZONTAL = 16;
|
|
476
|
+
var TOAST_PADDING_VERTICAL = 10;
|
|
477
|
+
var TOAST_BORDER_RADIUS = 8;
|
|
478
|
+
var TOAST_MARGIN_VERTICAL = 6;
|
|
479
|
+
var C0_CONTROL_END = 31;
|
|
480
|
+
var C1_CONTROL_START = 127;
|
|
481
|
+
var C1_CONTROL_END = 159;
|
|
482
|
+
var ZERO_WIDTH_START = 8203;
|
|
483
|
+
var ZERO_WIDTH_END = 8207;
|
|
484
|
+
var BYTE_ORDER_MARK = 65279;
|
|
485
|
+
var styles6 = reactNative.StyleSheet.create({
|
|
486
|
+
container: {
|
|
487
|
+
position: "absolute",
|
|
488
|
+
top: reactNative.Platform.OS === "web" ? TOAST_TOP_WEB : TOAST_TOP_MOBILE,
|
|
489
|
+
left: TOAST_HORIZONTAL_MARGIN,
|
|
490
|
+
right: TOAST_HORIZONTAL_MARGIN,
|
|
491
|
+
alignItems: "center",
|
|
492
|
+
zIndex: TOAST_Z_INDEX,
|
|
493
|
+
pointerEvents: "box-none"
|
|
494
|
+
},
|
|
495
|
+
toast: {
|
|
496
|
+
paddingHorizontal: TOAST_PADDING_HORIZONTAL,
|
|
497
|
+
paddingVertical: TOAST_PADDING_VERTICAL,
|
|
498
|
+
borderRadius: TOAST_BORDER_RADIUS,
|
|
499
|
+
marginVertical: TOAST_MARGIN_VERTICAL,
|
|
500
|
+
minWidth: "40%",
|
|
501
|
+
maxWidth: TOAST_MAX_WIDTH,
|
|
502
|
+
boxShadow: "0px 2px 4px rgba(0, 0, 0, 0.2)",
|
|
503
|
+
elevation: 4
|
|
504
|
+
},
|
|
505
|
+
text: {}
|
|
506
|
+
});
|
|
507
|
+
function sanitizeToastText(input, maxLength) {
|
|
508
|
+
let stripped = "";
|
|
509
|
+
for (const ch of input) {
|
|
510
|
+
const code = ch.codePointAt(0) ?? 0;
|
|
511
|
+
const isControl = code <= C0_CONTROL_END || code >= C1_CONTROL_START && code <= C1_CONTROL_END;
|
|
512
|
+
const isHidden = code >= ZERO_WIDTH_START && code <= ZERO_WIDTH_END || code === BYTE_ORDER_MARK;
|
|
513
|
+
if (!isControl && !isHidden) stripped += ch;
|
|
514
|
+
}
|
|
515
|
+
return stripped.length > maxLength ? stripped.slice(0, maxLength) : stripped;
|
|
516
|
+
}
|
|
517
|
+
var ToastItem = ({ message, onDone, colors, durationMs, fadeMs, testID }) => {
|
|
518
|
+
const opacityRef = React3.useRef(new reactNative.Animated.Value(0));
|
|
519
|
+
const translateYRef = React3.useRef(new reactNative.Animated.Value(TOAST_INITIAL_TRANSLATE_Y));
|
|
520
|
+
const opacity = opacityRef.current;
|
|
521
|
+
const translateY = translateYRef.current;
|
|
522
|
+
const backgroundColor = React3.useMemo(() => {
|
|
523
|
+
if (message.type === "success") return colors.success;
|
|
524
|
+
if (message.type === "error") return colors.error;
|
|
525
|
+
return colors.primary;
|
|
526
|
+
}, [colors.error, colors.primary, colors.success, message.type]);
|
|
527
|
+
const handleDone = React3.useCallback(() => {
|
|
528
|
+
onDone(message.id);
|
|
529
|
+
}, [message.id, onDone]);
|
|
530
|
+
React3.useEffect(() => {
|
|
531
|
+
const useNative = reactNative.Platform.OS !== "web";
|
|
532
|
+
reactNative.Animated.parallel([
|
|
533
|
+
reactNative.Animated.timing(opacity, { toValue: 1, duration: fadeMs, useNativeDriver: useNative }),
|
|
534
|
+
reactNative.Animated.timing(translateY, { toValue: 0, duration: fadeMs, useNativeDriver: useNative })
|
|
535
|
+
]).start();
|
|
536
|
+
const hideTimer = setTimeout(() => {
|
|
537
|
+
reactNative.Animated.parallel([
|
|
538
|
+
reactNative.Animated.timing(opacity, { toValue: 0, duration: fadeMs, useNativeDriver: useNative }),
|
|
539
|
+
reactNative.Animated.timing(translateY, { toValue: TOAST_INITIAL_TRANSLATE_Y, duration: fadeMs, useNativeDriver: useNative })
|
|
540
|
+
]).start(handleDone);
|
|
541
|
+
}, durationMs);
|
|
542
|
+
return () => clearTimeout(hideTimer);
|
|
543
|
+
}, [handleDone, opacity, translateY, durationMs, fadeMs]);
|
|
544
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
545
|
+
reactNative.Animated.View,
|
|
546
|
+
{
|
|
547
|
+
style: [styles6.toast, { backgroundColor, transform: [{ translateY }], opacity }],
|
|
548
|
+
testID,
|
|
549
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles6.text, { color: colors.text }], children: message.text })
|
|
550
|
+
}
|
|
551
|
+
);
|
|
552
|
+
};
|
|
553
|
+
var toastSeq = 0;
|
|
554
|
+
function nextId() {
|
|
555
|
+
toastSeq += 1;
|
|
556
|
+
return `${String(Date.now())}-${String(toastSeq)}`;
|
|
557
|
+
}
|
|
558
|
+
var ToastHost = ({
|
|
559
|
+
subscribe,
|
|
560
|
+
durationMs = DEFAULT_DURATION_MS,
|
|
561
|
+
fadeMs = DEFAULT_FADE_MS,
|
|
562
|
+
maxLength = DEFAULT_MAX_LENGTH,
|
|
563
|
+
toastTestID = FEEDBACK_TEST_IDS.notificationToast
|
|
564
|
+
}) => {
|
|
565
|
+
const [messages, setMessages] = React3.useState([]);
|
|
566
|
+
const { theme } = useFeedbackUi();
|
|
567
|
+
const colors = React3.useMemo(
|
|
568
|
+
() => ({
|
|
569
|
+
primary: theme.palette.primary["500"],
|
|
570
|
+
success: (theme.semantic.success ?? theme.semantic.error)["500"],
|
|
571
|
+
error: theme.semantic.error["500"],
|
|
572
|
+
text: theme.colors.surfaceElevated
|
|
573
|
+
}),
|
|
574
|
+
[theme]
|
|
575
|
+
);
|
|
576
|
+
const push = React3.useCallback(
|
|
577
|
+
(toast) => {
|
|
578
|
+
setMessages((s) => [...s, { id: nextId(), type: toast.type, text: sanitizeToastText(toast.text, maxLength) }]);
|
|
579
|
+
},
|
|
580
|
+
[maxLength]
|
|
581
|
+
);
|
|
582
|
+
const remove = React3.useCallback((id) => {
|
|
583
|
+
setMessages((s) => s.filter((x) => x.id !== id));
|
|
584
|
+
}, []);
|
|
585
|
+
React3.useEffect(() => subscribe(push), [subscribe, push]);
|
|
586
|
+
if (messages.length === 0) return null;
|
|
587
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles6.container, children: messages.map((m) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
588
|
+
ToastItem,
|
|
589
|
+
{
|
|
590
|
+
colors,
|
|
591
|
+
durationMs,
|
|
592
|
+
fadeMs,
|
|
593
|
+
message: m,
|
|
594
|
+
testID: toastTestID,
|
|
595
|
+
onDone: remove
|
|
596
|
+
},
|
|
597
|
+
m.id
|
|
598
|
+
)) });
|
|
599
|
+
};
|
|
465
600
|
|
|
466
601
|
exports.ConfirmDialog = ConfirmDialog;
|
|
467
602
|
exports.DISABLED_OPACITY = DISABLED_OPACITY;
|
|
@@ -472,6 +607,7 @@ exports.FeedbackUiProvider = FeedbackUiProvider;
|
|
|
472
607
|
exports.LoadingFallback = LoadingFallback;
|
|
473
608
|
exports.MODAL_OVERLAY_COLOR = MODAL_OVERLAY_COLOR;
|
|
474
609
|
exports.PageSkeleton = PageSkeleton;
|
|
610
|
+
exports.ToastHost = ToastHost;
|
|
475
611
|
exports.UiProvider = FeedbackUiProvider;
|
|
476
612
|
exports.useFeedbackUi = useFeedbackUi;
|
|
477
613
|
exports.useUi = useFeedbackUi;
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/context/FeedbackUiContext.tsx","../src/constants.ts","../src/ErrorState/ErrorState.tsx","../src/EmptyListState/EmptyListState.tsx","../src/LoadingFallback/LoadingFallback.tsx","../src/PageSkeleton/PageSkeleton.tsx","../src/ConfirmDialog/ConfirmDialog.tsx"],"names":["createContext","useMemo","jsx","useContext","StyleSheet","jsxs","View","Text","TouchableOpacity","MESSAGE_FONT_SIZE","CONTAINER_PADDING","styles","useCallback","ActivityIndicator","React","Animated","Easing","Platform","Modal"],"mappings":";;;;;;;;;;;AAyDA,IAAM,sBAAA,GAA0C;AAAA,EAC9C,KAAA,EAAO;AAAA,IACL,MAAA,EAAQ;AAAA,MACN,UAAA,EAAY,SAAA;AAAA,MACZ,OAAA,EAAS,SAAA;AAAA,MACT,eAAA,EAAiB,SAAA;AAAA,MACjB,IAAA,EAAM,SAAA;AAAA,MACN,aAAA,EAAe,SAAA;AAAA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EAAS,QAAA;AAAA,kBAET,QAAA,kBAAAT,cAAAA,CAACK,gBAAAA,EAAA,EAAK,KAAA,EAAO,CAACI,OAAAA,CAAO,UAAA,EAAY,WAAA,CAAY,gBAAgB,CAAA,EAC1D,QAAA,EAAA,mBAAA,EACH;AAAA;AAAA,eACF;AAAA,8BAEAT,cAAAA;AAAA,gBAACM,4BAAAA;AAAA,gBAAA;AAAA,kBACC,iBAAA,EAAmB,EAAE,oBAAoB,CAAA;AAAA,kBACzC,kBAAA,EAAoB,oBAAA;AAAA,kBACpB,iBAAA,EAAkB,QAAA;AAAA,kBAClB,kBAAA,EAAoB,EAAE,QAAA,EAAU,iBAAA,EAAkB;AAAA,kBAClD,QAAA,EAAU,iBAAA;AAAA,kBACV,KAAA,EAAO;AAAA,oBACLG,OAAAA,CAAO,MAAA;AAAA,oBACPA,OAAAA,CAAO,aAAA;AAAA,oBACP,WAAA,CAAY,aAAA;AAAA,oBACZ,qBAAqBA,OAAAA,CAAO;AAAA,mBAC9B;AAAA,kBACA,QAAQ,iBAAA,CAAkB,aAAA;AAAA,kBAC1B,OAAA,EAAS,SAAA;AAAA,kBAER,oCACCT,cAAAA;AAAA,oBAACW,6BAAAA;AAAA,oBAAA;AAAA,sBACC,KAAA,EAAO,MAAM,MAAA,CAAO,eAAA;AAAA,sBACpB,IAAA,EAAK,OAAA;AAAA,sBACL,MAAA,EAAO;AAAA;AAAA,sCAGTX,cAAAA;AAAA,oBAACK,gBAAAA;AAAA,oBAAA;AAAA,sBACC,KAAA,EAAO,CAACI,OAAAA,CAAO,UAAA,EAAY,YAAY,iBAAiB,CAAA;AAAA,sBAEvD,QAAA,EAAA;AAAA;AAAA;AACH;AAAA;AAEJ,aAAA,EACF;AAAA;AAAA;AAAA,OACF,EACF;AAAA;AAAA,GACF;AAEJ","file":"index.js","sourcesContent":["import React, { createContext, useContext, useMemo } from 'react';\n\n/**\n * The minimal theme surface the feedback components read. Each consuming app's\n * resolved theme object is structurally compatible with this shape, so apps pass\n * their existing `useTheme().theme` straight through the provider.\n */\nexport interface FeedbackThemeColors {\n background: string;\n surface: string;\n surfaceElevated: string;\n text: string;\n textSecondary: string;\n border: string;\n}\n\n/** A colour scale. The `500` step is guaranteed; other steps (50–900) are addressable. */\nexport interface FeedbackColorScale {\n '500': string;\n [step: string]: string;\n}\n\n/** `primary` is guaranteed; apps typically also provide `secondary`/`accent` (addressable). */\nexport interface FeedbackThemePalette {\n primary: FeedbackColorScale;\n [name: string]: FeedbackColorScale;\n}\n\n/** `error` is guaranteed; apps typically also provide `success`/`warning`/`info` (addressable). */\nexport interface FeedbackThemeSemantic {\n error: FeedbackColorScale;\n [name: string]: FeedbackColorScale;\n}\n\nexport interface FeedbackTheme {\n colors: FeedbackThemeColors;\n palette: FeedbackThemePalette;\n semantic: FeedbackThemeSemantic;\n}\n\n/** Translate function — mirrors the apps' `FM(key, p1?, p2?, p3?)` helper. */\nexport type FeedbackTranslate = (key: string, p1?: string, p2?: string, p3?: string) => string;\n\n/** Navigation callback used by EmptyListState's optional call-to-action. */\nexport type FeedbackNavigate = (route: string) => void;\n\nexport interface FeedbackUiValue {\n theme: FeedbackTheme;\n t: FeedbackTranslate;\n navigate?: FeedbackNavigate;\n}\n\n/**\n * Neutral fallback used when no FeedbackUiProvider is mounted. Apps SHOULD mount a\n * provider so the components pick up the real theme + translations; the default keeps\n * the components rendering gracefully (e.g. in isolated tests) instead of throwing.\n */\nconst DEFAULT_FEEDBACK_VALUE: FeedbackUiValue = {\n theme: {\n colors: {\n background: '#ffffff',\n surface: '#f7f7f7',\n surfaceElevated: '#ffffff',\n text: '#111111',\n textSecondary: '#666666',\n border: '#dddddd',\n },\n palette: {\n primary: { '100': '#dbeafe', '500': '#2563eb', '700': '#1d4ed8' },\n secondary: { '500': '#64748b' },\n accent: { '500': '#f59e0b' },\n },\n semantic: {\n error: { '500': '#dc2626' },\n success: { '500': '#16a34a' },\n warning: { '500': '#d97706' },\n info: { '500': '#2563eb' },\n },\n },\n t: (key) => key,\n};\n\nconst FeedbackUiContext = createContext<FeedbackUiValue>(DEFAULT_FEEDBACK_VALUE);\n\nexport interface FeedbackUiProviderProps extends FeedbackUiValue {\n children: React.ReactNode;\n}\n\n/**\n * Supplies the host app's theme + translate (+ optional navigate) to the\n * `@dloizides/ui-feedback` components. Mount once, high in the app tree, below\n * the app's own ThemeProvider.\n */\nexport const FeedbackUiProvider = ({\n theme,\n t,\n navigate,\n children,\n}: FeedbackUiProviderProps): React.ReactElement => {\n const value = useMemo<FeedbackUiValue>(() => ({ theme, t, navigate }), [theme, t, navigate]);\n return <FeedbackUiContext.Provider value={value}>{children}</FeedbackUiContext.Provider>;\n};\n\n/**\n * Reads the feedback UI context. Returns the provider's value when one is mounted,\n * or a neutral default (see DEFAULT_FEEDBACK_VALUE) so components render gracefully\n * without a provider.\n */\nexport function useFeedbackUi(): FeedbackUiValue {\n return useContext(FeedbackUiContext);\n}\n","/** Semi-transparent scrim behind modal dialogs. */\nexport const MODAL_OVERLAY_COLOR = 'rgba(0, 0, 0, 0.5)';\n\n/** Opacity applied to disabled interactive controls. */\nexport const DISABLED_OPACITY = 0.5;\n\n/**\n * Default testID strings. These match the values the consuming apps already used\n * so existing Playwright selectors keep working after migration.\n */\nexport const FEEDBACK_TEST_IDS = {\n errorState: 'error-state',\n errorStateRetry: 'error-state-retry',\n emptyListCta: 'empty-list-cta',\n loadingFallback: 'loading-fallback',\n pageSkeleton: 'page-skeleton',\n confirmDialog: 'confirm-dialog',\n confirmButton: 'confirm-button',\n cancelConfirmButton: 'cancel-confirm-button',\n} as const;\n","/**\n * ErrorState - generic error display with optional retry button.\n */\nimport React from 'react';\n\nimport { StyleSheet, Text, TouchableOpacity, View } from 'react-native';\n\nimport { useFeedbackUi } from '../context/FeedbackUiContext';\nimport { FEEDBACK_TEST_IDS } from '../constants';\n\n// ---------------------------------------------------------------------------\n// Constants\n// ---------------------------------------------------------------------------\n\nconst MESSAGE_FONT_SIZE = 16;\nconst CONTAINER_PADDING = 20;\nconst BUTTON_MARGIN_TOP = 12;\nconst BUTTON_PADDING_V = 8;\nconst BUTTON_PADDING_H = 16;\nconst BUTTON_BORDER_RADIUS = 6;\nconst BUTTON_FONT_SIZE = 14;\n\n// ---------------------------------------------------------------------------\n// Styles\n// ---------------------------------------------------------------------------\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n padding: CONTAINER_PADDING,\n },\n message: {\n fontSize: MESSAGE_FONT_SIZE,\n textAlign: 'center',\n },\n retryButton: {\n marginTop: BUTTON_MARGIN_TOP,\n paddingVertical: BUTTON_PADDING_V,\n paddingHorizontal: BUTTON_PADDING_H,\n borderRadius: BUTTON_BORDER_RADIUS,\n },\n retryText: {\n fontSize: BUTTON_FONT_SIZE,\n fontWeight: '600',\n },\n});\n\n// ---------------------------------------------------------------------------\n// Props\n// ---------------------------------------------------------------------------\n\nexport interface ErrorStateProps {\n message: string;\n onRetry?: () => void;\n testID?: string;\n}\n\n// ---------------------------------------------------------------------------\n// Component\n// ---------------------------------------------------------------------------\n\nexport const ErrorState = ({\n message,\n onRetry,\n testID = FEEDBACK_TEST_IDS.errorState,\n}: ErrorStateProps): React.ReactElement => {\n const { theme, t } = useFeedbackUi();\n const errorColor = theme.semantic.error['500'];\n const primary = theme.palette.primary['500'];\n\n return (\n <View style={styles.container} testID={testID}>\n <Text style={[styles.message, { color: errorColor }]}>{message}</Text>\n {typeof onRetry === 'function' ? (\n <TouchableOpacity\n accessibilityHint={t('common.retryHint')}\n accessibilityLabel={t('common.retry')}\n accessibilityRole=\"button\"\n style={[styles.retryButton, { backgroundColor: primary }]}\n testID={FEEDBACK_TEST_IDS.errorStateRetry}\n onPress={onRetry}\n >\n <Text style={[styles.retryText, { color: theme.colors.surfaceElevated }]}>\n {t('common.retry')}\n </Text>\n </TouchableOpacity>\n ) : null}\n </View>\n );\n};\n\nexport default ErrorState;\n","/**\n * EmptyListState - empty-collection message with an optional call-to-action.\n *\n * The CTA navigates via the `navigate` callback supplied through FeedbackUiProvider\n * (the host app adapts its router, e.g. expo-router's `router.push`).\n */\nimport React, { useCallback } from 'react';\n\nimport { StyleSheet, Text, TouchableOpacity, View } from 'react-native';\n\nimport { useFeedbackUi } from '../context/FeedbackUiContext';\nimport { FEEDBACK_TEST_IDS } from '../constants';\n\nconst MESSAGE_FONT_SIZE = 16;\nconst CTA_MARGIN_TOP = 16;\nconst CTA_PADDING_VERTICAL = 10;\nconst CTA_PADDING_HORIZONTAL = 20;\nconst CTA_BORDER_RADIUS = 8;\nconst CTA_FONT_SIZE = 14;\nconst CONTAINER_PADDING = 32;\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n padding: CONTAINER_PADDING,\n },\n message: {\n fontSize: MESSAGE_FONT_SIZE,\n textAlign: 'center',\n },\n ctaButton: {\n marginTop: CTA_MARGIN_TOP,\n paddingVertical: CTA_PADDING_VERTICAL,\n paddingHorizontal: CTA_PADDING_HORIZONTAL,\n borderRadius: CTA_BORDER_RADIUS,\n },\n ctaText: {\n fontSize: CTA_FONT_SIZE,\n fontWeight: '600',\n },\n});\n\nexport interface EmptyListStateProps {\n messageKey: string;\n ctaTextKey?: string;\n ctaHintKey?: string;\n ctaRoute?: string;\n testID: string;\n}\n\nexport const EmptyListState = ({\n messageKey,\n ctaTextKey,\n ctaHintKey,\n ctaRoute,\n testID,\n}: EmptyListStateProps): React.ReactElement => {\n const { theme, t, navigate } = useFeedbackUi();\n const { colors } = theme;\n const primary = theme.palette.primary['500'];\n\n const handlePress = useCallback((): void => {\n if (typeof ctaRoute === 'string' && typeof navigate === 'function') navigate(ctaRoute);\n }, [navigate, ctaRoute]);\n\n const showCta = typeof ctaTextKey === 'string'\n && typeof ctaHintKey === 'string'\n && typeof ctaRoute === 'string';\n\n return (\n <View style={styles.container} testID={testID}>\n <Text style={[styles.message, { color: colors.textSecondary }]}>\n {t(messageKey)}\n </Text>\n {showCta ? (\n <TouchableOpacity\n accessibilityHint={t(ctaHintKey as string)}\n accessibilityLabel={t(ctaTextKey as string)}\n accessibilityRole=\"button\"\n style={[styles.ctaButton, { backgroundColor: primary }]}\n testID={FEEDBACK_TEST_IDS.emptyListCta}\n onPress={handlePress}\n >\n <Text style={[styles.ctaText, { color: colors.background }]}>\n {t(ctaTextKey as string)}\n </Text>\n </TouchableOpacity>\n ) : null}\n </View>\n );\n};\n\nexport default EmptyListState;\n","/**\n * LoadingFallback - lightweight loading indicator for lazy-loaded components.\n *\n * Used with React.lazy() and Suspense to show a loading state while heavy\n * components are loading. Optimized for minimal bundle impact.\n */\nimport React from 'react';\n\nimport { ActivityIndicator, StyleSheet, View } from 'react-native';\n\nimport { useFeedbackUi } from '../context/FeedbackUiContext';\nimport { FEEDBACK_TEST_IDS } from '../constants';\n\nconst FULLSCREEN_MIN_HEIGHT = 300;\nconst CONTAINER_MIN_HEIGHT = 100;\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n minHeight: CONTAINER_MIN_HEIGHT,\n },\n fullScreen: {\n minHeight: FULLSCREEN_MIN_HEIGHT,\n },\n});\n\nexport interface LoadingFallbackProps {\n /** Show as full-screen loader (default: false) */\n fullScreen?: boolean;\n /** Custom size for the spinner */\n size?: 'small' | 'large';\n}\n\nexport const LoadingFallback: React.FC<LoadingFallbackProps> = ({ fullScreen = false, size = 'large' }) => {\n const { theme, t } = useFeedbackUi();\n const colors = theme.colors;\n const primary = theme.palette.primary['500'];\n\n return (\n <View\n accessibilityHint={t('loadingFallback.hint')}\n accessibilityLabel={t('loadingFallback.label')}\n accessibilityRole=\"progressbar\"\n style={[styles.container, fullScreen && styles.fullScreen, { backgroundColor: colors.background }]}\n testID={FEEDBACK_TEST_IDS.loadingFallback}\n >\n <ActivityIndicator color={primary} size={size} />\n </View>\n );\n};\n\nexport default LoadingFallback;\n","/**\n * PageSkeleton - shimmer skeleton loader for full pages.\n *\n * Improves perceived performance (Speed Index) by showing immediate visual\n * feedback while page content loads.\n */\nimport React from 'react';\n\nimport { Animated, Easing, Platform, StyleSheet, View } from 'react-native';\n\nimport { useFeedbackUi } from '../context/FeedbackUiContext';\nimport { FEEDBACK_TEST_IDS } from '../constants';\n\nconst ANIMATION_DURATION_MS = 1200;\nconst SKELETON_BORDER_RADIUS = 4;\nconst SKELETON_OPACITY_START = 0.3;\nconst SKELETON_OPACITY_END = 0.7;\nconst DEFAULT_ROWS = 5;\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n padding: 16,\n },\n header: {\n height: 32,\n borderRadius: SKELETON_BORDER_RADIUS,\n marginBottom: 24,\n width: '60%',\n },\n row: {\n flexDirection: 'row',\n marginBottom: 16,\n },\n avatar: {\n width: 48,\n height: 48,\n borderRadius: 24,\n marginRight: 12,\n },\n textContainer: {\n flex: 1,\n justifyContent: 'center',\n },\n textLine: {\n height: 16,\n borderRadius: SKELETON_BORDER_RADIUS,\n marginBottom: 8,\n },\n textLineShort: {\n width: '70%',\n },\n textLineFull: {\n width: '100%',\n },\n card: {\n height: 120,\n borderRadius: 8,\n marginBottom: 16,\n },\n});\n\nexport interface PageSkeletonProps {\n /** Number of skeleton rows to show */\n rows?: number;\n /** Show header skeleton */\n showHeader?: boolean;\n /** Show card skeletons instead of rows */\n variant?: 'list' | 'cards';\n}\n\nexport const PageSkeleton: React.FC<PageSkeletonProps> = ({\n rows = DEFAULT_ROWS,\n showHeader = true,\n variant = 'list',\n}) => {\n const { theme, t } = useFeedbackUi();\n const colors = theme.colors;\n\n const animatedValue = React.useRef(new Animated.Value(0)).current;\n\n React.useEffect(() => {\n const animation = Animated.loop(\n Animated.sequence([\n Animated.timing(animatedValue, {\n toValue: 1,\n duration: ANIMATION_DURATION_MS,\n easing: Easing.inOut(Easing.ease),\n useNativeDriver: Platform.OS !== 'web',\n }),\n Animated.timing(animatedValue, {\n toValue: 0,\n duration: ANIMATION_DURATION_MS,\n easing: Easing.inOut(Easing.ease),\n useNativeDriver: Platform.OS !== 'web',\n }),\n ]),\n );\n animation.start();\n return () => animation.stop();\n }, [animatedValue]);\n\n const opacity = animatedValue.interpolate({\n inputRange: [0, 1],\n outputRange: [SKELETON_OPACITY_START, SKELETON_OPACITY_END],\n });\n\n const skeletonColor = String(colors.border);\n\n const renderListRow = (index: number): React.ReactElement => (\n <View key={index} style={styles.row}>\n <Animated.View style={[styles.avatar, { backgroundColor: skeletonColor, opacity }]} />\n <View style={styles.textContainer}>\n <Animated.View style={[styles.textLine, styles.textLineFull, { backgroundColor: skeletonColor, opacity }]} />\n <Animated.View style={[styles.textLine, styles.textLineShort, { backgroundColor: skeletonColor, opacity }]} />\n </View>\n </View>\n );\n\n const renderCard = (index: number): React.ReactElement => (\n <Animated.View key={index} style={[styles.card, { backgroundColor: skeletonColor, opacity }]} />\n );\n\n const rowElements = Array.from({ length: rows }, (_, i) => (variant === 'cards' ? renderCard(i) : renderListRow(i)));\n\n return (\n <View\n accessibilityHint={t('pageSkeleton.loadingHint')}\n accessibilityLabel={t('pageSkeleton.loadingLabel')}\n accessibilityState={{ busy: true }}\n style={[styles.container, { backgroundColor: colors.background }]}\n testID={FEEDBACK_TEST_IDS.pageSkeleton}\n >\n {showHeader ? <Animated.View style={[styles.header, { backgroundColor: skeletonColor, opacity }]} /> : null}\n {rowElements}\n </View>\n );\n};\n\nexport default PageSkeleton;\n","/**\n * ConfirmDialog - modal confirm/cancel dialog with optional destructive + loading states.\n */\nimport React, { useMemo } from 'react';\n\nimport {\n ActivityIndicator,\n Modal,\n StyleSheet,\n Text,\n TouchableOpacity,\n View,\n} from 'react-native';\n\nimport { useFeedbackUi } from '../context/FeedbackUiContext';\nimport { DISABLED_OPACITY, MODAL_OVERLAY_COLOR, FEEDBACK_TEST_IDS } from '../constants';\n\nconst DIALOG_MAX_WIDTH = 400;\n\nconst styles = StyleSheet.create({\n overlay: {\n flex: 1,\n backgroundColor: MODAL_OVERLAY_COLOR,\n justifyContent: 'center',\n alignItems: 'center',\n padding: 20,\n },\n dialog: {\n width: '100%',\n maxWidth: DIALOG_MAX_WIDTH,\n borderRadius: 12,\n padding: 20,\n boxShadow: '0px 2px 8px rgba(0, 0, 0, 0.25)',\n elevation: 5,\n },\n title: {\n fontSize: 18,\n fontWeight: '600',\n marginBottom: 12,\n },\n message: {\n fontSize: 14,\n lineHeight: 20,\n marginBottom: 20,\n },\n buttonRow: {\n flexDirection: 'row',\n justifyContent: 'flex-end',\n gap: 12,\n },\n button: {\n paddingVertical: 10,\n paddingHorizontal: 20,\n borderRadius: 6,\n minWidth: 80,\n alignItems: 'center',\n justifyContent: 'center',\n },\n cancelButton: {\n borderWidth: 1,\n },\n confirmButton: {},\n buttonText: {\n fontSize: 14,\n fontWeight: '600',\n },\n disabledButton: {\n opacity: DISABLED_OPACITY,\n },\n});\n\nexport interface ConfirmDialogProps {\n visible: boolean;\n title: string;\n message: string;\n onConfirm: () => void;\n onCancel: () => void;\n confirmLabel?: string;\n cancelLabel?: string;\n confirmDisabled?: boolean;\n loading?: boolean;\n destructive?: boolean;\n}\n\nexport const ConfirmDialog = ({\n visible,\n title,\n message,\n onConfirm,\n onCancel,\n confirmLabel,\n cancelLabel,\n confirmDisabled = false,\n loading = false,\n destructive = false,\n}: ConfirmDialogProps): React.ReactElement | null => {\n const { theme, t } = useFeedbackUi();\n\n const colorStyles = useMemo(\n () => ({\n dialog: { backgroundColor: theme.colors.surfaceElevated },\n title: { color: theme.colors.text },\n message: { color: theme.colors.textSecondary },\n cancelButton: { borderColor: theme.colors.border },\n cancelButtonText: { color: theme.colors.text },\n confirmButton: {\n backgroundColor: destructive ? theme.semantic.error['500'] : theme.palette.primary['500'],\n },\n confirmButtonText: { color: theme.colors.surfaceElevated },\n }),\n [theme, destructive]\n );\n\n const resolvedConfirmLabel = confirmLabel ?? t('common.confirm');\n const resolvedCancelLabel = cancelLabel ?? t('common.cancel');\n\n const isConfirmDisabled = confirmDisabled || loading;\n\n if (!visible)\n return null;\n\n return (\n <Modal\n transparent\n animationType=\"fade\"\n visible={visible}\n onRequestClose={onCancel}\n >\n <View style={styles.overlay} testID={FEEDBACK_TEST_IDS.confirmDialog}>\n <View\n accessibilityViewIsModal\n aria-label={title}\n role=\"dialog\"\n style={[styles.dialog, colorStyles.dialog]}\n >\n <Text style={[styles.title, colorStyles.title]}>{title}</Text>\n <Text style={[styles.message, colorStyles.message]}>{message}</Text>\n\n <View style={styles.buttonRow}>\n <TouchableOpacity\n accessibilityHint={t('common.cancelHint')}\n accessibilityLabel={resolvedCancelLabel}\n accessibilityRole=\"button\"\n style={[\n styles.button,\n styles.cancelButton,\n colorStyles.cancelButton,\n ]}\n testID={FEEDBACK_TEST_IDS.cancelConfirmButton}\n onPress={onCancel}\n >\n <Text style={[styles.buttonText, colorStyles.cancelButtonText]}>\n {resolvedCancelLabel}\n </Text>\n </TouchableOpacity>\n\n <TouchableOpacity\n accessibilityHint={t('common.confirmHint')}\n accessibilityLabel={resolvedConfirmLabel}\n accessibilityRole=\"button\"\n accessibilityState={{ disabled: isConfirmDisabled }}\n disabled={isConfirmDisabled}\n style={[\n styles.button,\n styles.confirmButton,\n colorStyles.confirmButton,\n isConfirmDisabled && styles.disabledButton,\n ]}\n testID={FEEDBACK_TEST_IDS.confirmButton}\n onPress={onConfirm}\n >\n {loading ? (\n <ActivityIndicator\n color={theme.colors.surfaceElevated}\n size=\"small\"\n testID=\"confirm-loading\"\n />\n ) : (\n <Text\n style={[styles.buttonText, colorStyles.confirmButtonText]}\n >\n {resolvedConfirmLabel}\n </Text>\n )}\n </TouchableOpacity>\n </View>\n </View>\n </View>\n </Modal>\n );\n};\n\nexport default ConfirmDialog;\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/context/FeedbackUiContext.tsx","../src/constants.ts","../src/ErrorState/ErrorState.tsx","../src/EmptyListState/EmptyListState.tsx","../src/LoadingFallback/LoadingFallback.tsx","../src/PageSkeleton/PageSkeleton.tsx","../src/ConfirmDialog/ConfirmDialog.tsx","../src/ToastHost/ToastHost.tsx"],"names":["createContext","useMemo","jsx","useContext","StyleSheet","jsxs","View","Text","TouchableOpacity","MESSAGE_FONT_SIZE","CONTAINER_PADDING","styles","useCallback","ActivityIndicator","React","Animated","Easing","Platform","Modal","useRef","useEffect","useState"],"mappings":";;;;;;;;;;;AAyDA,IAAM,sBAAA,GAA0C;AAAA,EAC9C,KAAA,EAAO;AAAA,IACL,MAAA,EAAQ;AAAA,MACN,UAAA,EAAY,SAAA;AAAA,MACZ,OAAA,EAAS,SAAA;AAAA,MACT,eAAA,EAAiB,SAAA;AAAA,MACjB,IAAA,EAAM,SAAA;AAAA,MACN,aAAA,EAAe,SAAA;AAAA,MACf,MAAA,EAAQ;AAAA,KACV;AAAA,IACA,OAAA,EAAS;AAAA,MACP,SAAS,EAAE,KAAA,EAAO,WAAW,KAAA,EAAO,SAAA,EAAW,OAAO,SAAA,EAAU;AAAA,MAChE,SAAA,EAAW,EAAE,KAAA,EAAO,SAAA,EAAU;AAAA,MAC9B,MAAA,EAAQ,EAAE,KAAA,EAAO,SAAA;AAAU,KAC7B;AAAA,IACA,QAAA,EAAU;AAAA,MACR,KAAA,EAAO,EAAE,KAAA,EAAO,SAAA,EAAU;AAAA,MAC1B,OAAA,EAAS,EAAE,KAAA,EAAO,SAAA,EAAU;AAAA,MAC5B,OAAA,EAAS,EAAE,KAAA,EAAO,SAAA,EAAU;AAAA,MAC5B,IAAA,EAAM,EAAE,KAAA,EAAO,SAAA;AAAU;AAC3B,GACF;AAAA,EACA,CAAA,EAAG,CAAC,GAAA,KAAQ;AACd,CAAA;AAEA,IAAM,iBAAA,GAAoBA,qBAA+B,sBAAsB,CAAA;AAWxE,IAAM,qBAAqB,CAAC;AAAA,EACjC,KAAA;AAAA,EACA,CAAA;AAAA,EACA,QAAA;AAAA,EACA;AACF,CAAA,KAAmD;AACjD,EAAA,MAAM,KAAA,GAAQC,cAAA,CAAyB,OAAO,EAAE,KAAA,EAAO,CAAA,EAAG,QAAA,EAAS,CAAA,EAAI,CAAC,KAAA,EAAO,CAAA,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EACjB,QAAA,EAAA,QAAA,CAAS,GAAA,CAAI,CAAC,CAAA,qBACbT,cAAAA;AAAA,IAAC,SAAA;AAAA,IAAA;AAAA,MAEC,MAAA;AAAA,MACA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,OAAA,EAAS,CAAA;AAAA,MACT,MAAA,EAAQ,WAAA;AAAA,MACR,MAAA,EAAQ;AAAA,KAAA;AAAA,IANH,CAAA,CAAE;AAAA,GAQV,CAAA,EACH,CAAA;AAEJ","file":"index.js","sourcesContent":["import React, { createContext, useContext, useMemo } from 'react';\n\n/**\n * The minimal theme surface the feedback components read. Each consuming app's\n * resolved theme object is structurally compatible with this shape, so apps pass\n * their existing `useTheme().theme` straight through the provider.\n */\nexport interface FeedbackThemeColors {\n background: string;\n surface: string;\n surfaceElevated: string;\n text: string;\n textSecondary: string;\n border: string;\n}\n\n/** A colour scale. The `500` step is guaranteed; other steps (50–900) are addressable. */\nexport interface FeedbackColorScale {\n '500': string;\n [step: string]: string;\n}\n\n/** `primary` is guaranteed; apps typically also provide `secondary`/`accent` (addressable). */\nexport interface FeedbackThemePalette {\n primary: FeedbackColorScale;\n [name: string]: FeedbackColorScale;\n}\n\n/** `error` is guaranteed; apps typically also provide `success`/`warning`/`info` (addressable). */\nexport interface FeedbackThemeSemantic {\n error: FeedbackColorScale;\n [name: string]: FeedbackColorScale;\n}\n\nexport interface FeedbackTheme {\n colors: FeedbackThemeColors;\n palette: FeedbackThemePalette;\n semantic: FeedbackThemeSemantic;\n}\n\n/** Translate function — mirrors the apps' `FM(key, p1?, p2?, p3?)` helper. */\nexport type FeedbackTranslate = (key: string, p1?: string, p2?: string, p3?: string) => string;\n\n/** Navigation callback used by EmptyListState's optional call-to-action. */\nexport type FeedbackNavigate = (route: string) => void;\n\nexport interface FeedbackUiValue {\n theme: FeedbackTheme;\n t: FeedbackTranslate;\n navigate?: FeedbackNavigate;\n}\n\n/**\n * Neutral fallback used when no FeedbackUiProvider is mounted. Apps SHOULD mount a\n * provider so the components pick up the real theme + translations; the default keeps\n * the components rendering gracefully (e.g. in isolated tests) instead of throwing.\n */\nconst DEFAULT_FEEDBACK_VALUE: FeedbackUiValue = {\n theme: {\n colors: {\n background: '#ffffff',\n surface: '#f7f7f7',\n surfaceElevated: '#ffffff',\n text: '#111111',\n textSecondary: '#666666',\n border: '#dddddd',\n },\n palette: {\n primary: { '100': '#dbeafe', '500': '#2563eb', '700': '#1d4ed8' },\n secondary: { '500': '#64748b' },\n accent: { '500': '#f59e0b' },\n },\n semantic: {\n error: { '500': '#dc2626' },\n success: { '500': '#16a34a' },\n warning: { '500': '#d97706' },\n info: { '500': '#2563eb' },\n },\n },\n t: (key) => key,\n};\n\nconst FeedbackUiContext = createContext<FeedbackUiValue>(DEFAULT_FEEDBACK_VALUE);\n\nexport interface FeedbackUiProviderProps extends FeedbackUiValue {\n children: React.ReactNode;\n}\n\n/**\n * Supplies the host app's theme + translate (+ optional navigate) to the\n * `@dloizides/ui-feedback` components. Mount once, high in the app tree, below\n * the app's own ThemeProvider.\n */\nexport const FeedbackUiProvider = ({\n theme,\n t,\n navigate,\n children,\n}: FeedbackUiProviderProps): React.ReactElement => {\n const value = useMemo<FeedbackUiValue>(() => ({ theme, t, navigate }), [theme, t, navigate]);\n return <FeedbackUiContext.Provider value={value}>{children}</FeedbackUiContext.Provider>;\n};\n\n/**\n * Reads the feedback UI context. Returns the provider's value when one is mounted,\n * or a neutral default (see DEFAULT_FEEDBACK_VALUE) so components render gracefully\n * without a provider.\n */\nexport function useFeedbackUi(): FeedbackUiValue {\n return useContext(FeedbackUiContext);\n}\n","/** Semi-transparent scrim behind modal dialogs. */\nexport const MODAL_OVERLAY_COLOR = 'rgba(0, 0, 0, 0.5)';\n\n/** Opacity applied to disabled interactive controls. */\nexport const DISABLED_OPACITY = 0.5;\n\n/**\n * Default testID strings. These match the values the consuming apps already used\n * so existing Playwright selectors keep working after migration.\n */\nexport const FEEDBACK_TEST_IDS = {\n errorState: 'error-state',\n errorStateRetry: 'error-state-retry',\n emptyListCta: 'empty-list-cta',\n loadingFallback: 'loading-fallback',\n pageSkeleton: 'page-skeleton',\n confirmDialog: 'confirm-dialog',\n confirmButton: 'confirm-button',\n cancelConfirmButton: 'cancel-confirm-button',\n notificationToast: 'notification-toast',\n} as const;\n","/**\n * ErrorState - generic error display with optional retry button.\n */\nimport React from 'react';\n\nimport { StyleSheet, Text, TouchableOpacity, View } from 'react-native';\n\nimport { useFeedbackUi } from '../context/FeedbackUiContext';\nimport { FEEDBACK_TEST_IDS } from '../constants';\n\n// ---------------------------------------------------------------------------\n// Constants\n// ---------------------------------------------------------------------------\n\nconst MESSAGE_FONT_SIZE = 16;\nconst CONTAINER_PADDING = 20;\nconst BUTTON_MARGIN_TOP = 12;\nconst BUTTON_PADDING_V = 8;\nconst BUTTON_PADDING_H = 16;\nconst BUTTON_BORDER_RADIUS = 6;\nconst BUTTON_FONT_SIZE = 14;\n\n// ---------------------------------------------------------------------------\n// Styles\n// ---------------------------------------------------------------------------\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n padding: CONTAINER_PADDING,\n },\n message: {\n fontSize: MESSAGE_FONT_SIZE,\n textAlign: 'center',\n },\n retryButton: {\n marginTop: BUTTON_MARGIN_TOP,\n paddingVertical: BUTTON_PADDING_V,\n paddingHorizontal: BUTTON_PADDING_H,\n borderRadius: BUTTON_BORDER_RADIUS,\n },\n retryText: {\n fontSize: BUTTON_FONT_SIZE,\n fontWeight: '600',\n },\n});\n\n// ---------------------------------------------------------------------------\n// Props\n// ---------------------------------------------------------------------------\n\nexport interface ErrorStateProps {\n message: string;\n onRetry?: () => void;\n testID?: string;\n}\n\n// ---------------------------------------------------------------------------\n// Component\n// ---------------------------------------------------------------------------\n\nexport const ErrorState = ({\n message,\n onRetry,\n testID = FEEDBACK_TEST_IDS.errorState,\n}: ErrorStateProps): React.ReactElement => {\n const { theme, t } = useFeedbackUi();\n const errorColor = theme.semantic.error['500'];\n const primary = theme.palette.primary['500'];\n\n return (\n <View style={styles.container} testID={testID}>\n <Text style={[styles.message, { color: errorColor }]}>{message}</Text>\n {typeof onRetry === 'function' ? (\n <TouchableOpacity\n accessibilityHint={t('common.retryHint')}\n accessibilityLabel={t('common.retry')}\n accessibilityRole=\"button\"\n style={[styles.retryButton, { backgroundColor: primary }]}\n testID={FEEDBACK_TEST_IDS.errorStateRetry}\n onPress={onRetry}\n >\n <Text style={[styles.retryText, { color: theme.colors.surfaceElevated }]}>\n {t('common.retry')}\n </Text>\n </TouchableOpacity>\n ) : null}\n </View>\n );\n};\n\nexport default ErrorState;\n","/**\n * EmptyListState - empty-collection message with an optional call-to-action.\n *\n * The CTA navigates via the `navigate` callback supplied through FeedbackUiProvider\n * (the host app adapts its router, e.g. expo-router's `router.push`).\n */\nimport React, { useCallback } from 'react';\n\nimport { StyleSheet, Text, TouchableOpacity, View } from 'react-native';\n\nimport { useFeedbackUi } from '../context/FeedbackUiContext';\nimport { FEEDBACK_TEST_IDS } from '../constants';\n\nconst MESSAGE_FONT_SIZE = 16;\nconst CTA_MARGIN_TOP = 16;\nconst CTA_PADDING_VERTICAL = 10;\nconst CTA_PADDING_HORIZONTAL = 20;\nconst CTA_BORDER_RADIUS = 8;\nconst CTA_FONT_SIZE = 14;\nconst CONTAINER_PADDING = 32;\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n padding: CONTAINER_PADDING,\n },\n message: {\n fontSize: MESSAGE_FONT_SIZE,\n textAlign: 'center',\n },\n ctaButton: {\n marginTop: CTA_MARGIN_TOP,\n paddingVertical: CTA_PADDING_VERTICAL,\n paddingHorizontal: CTA_PADDING_HORIZONTAL,\n borderRadius: CTA_BORDER_RADIUS,\n },\n ctaText: {\n fontSize: CTA_FONT_SIZE,\n fontWeight: '600',\n },\n});\n\nexport interface EmptyListStateProps {\n messageKey: string;\n ctaTextKey?: string;\n ctaHintKey?: string;\n ctaRoute?: string;\n testID: string;\n}\n\nexport const EmptyListState = ({\n messageKey,\n ctaTextKey,\n ctaHintKey,\n ctaRoute,\n testID,\n}: EmptyListStateProps): React.ReactElement => {\n const { theme, t, navigate } = useFeedbackUi();\n const { colors } = theme;\n const primary = theme.palette.primary['500'];\n\n const handlePress = useCallback((): void => {\n if (typeof ctaRoute === 'string' && typeof navigate === 'function') navigate(ctaRoute);\n }, [navigate, ctaRoute]);\n\n const showCta = typeof ctaTextKey === 'string'\n && typeof ctaHintKey === 'string'\n && typeof ctaRoute === 'string';\n\n return (\n <View style={styles.container} testID={testID}>\n <Text style={[styles.message, { color: colors.textSecondary }]}>\n {t(messageKey)}\n </Text>\n {showCta ? (\n <TouchableOpacity\n accessibilityHint={t(ctaHintKey as string)}\n accessibilityLabel={t(ctaTextKey as string)}\n accessibilityRole=\"button\"\n style={[styles.ctaButton, { backgroundColor: primary }]}\n testID={FEEDBACK_TEST_IDS.emptyListCta}\n onPress={handlePress}\n >\n <Text style={[styles.ctaText, { color: colors.background }]}>\n {t(ctaTextKey as string)}\n </Text>\n </TouchableOpacity>\n ) : null}\n </View>\n );\n};\n\nexport default EmptyListState;\n","/**\n * LoadingFallback - lightweight loading indicator for lazy-loaded components.\n *\n * Used with React.lazy() and Suspense to show a loading state while heavy\n * components are loading. Optimized for minimal bundle impact.\n */\nimport React from 'react';\n\nimport { ActivityIndicator, StyleSheet, View } from 'react-native';\n\nimport { useFeedbackUi } from '../context/FeedbackUiContext';\nimport { FEEDBACK_TEST_IDS } from '../constants';\n\nconst FULLSCREEN_MIN_HEIGHT = 300;\nconst CONTAINER_MIN_HEIGHT = 100;\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n minHeight: CONTAINER_MIN_HEIGHT,\n },\n fullScreen: {\n minHeight: FULLSCREEN_MIN_HEIGHT,\n },\n});\n\nexport interface LoadingFallbackProps {\n /** Show as full-screen loader (default: false) */\n fullScreen?: boolean;\n /** Custom size for the spinner */\n size?: 'small' | 'large';\n}\n\nexport const LoadingFallback: React.FC<LoadingFallbackProps> = ({ fullScreen = false, size = 'large' }) => {\n const { theme, t } = useFeedbackUi();\n const colors = theme.colors;\n const primary = theme.palette.primary['500'];\n\n return (\n <View\n accessibilityHint={t('loadingFallback.hint')}\n accessibilityLabel={t('loadingFallback.label')}\n accessibilityRole=\"progressbar\"\n style={[styles.container, fullScreen && styles.fullScreen, { backgroundColor: colors.background }]}\n testID={FEEDBACK_TEST_IDS.loadingFallback}\n >\n <ActivityIndicator color={primary} size={size} />\n </View>\n );\n};\n\nexport default LoadingFallback;\n","/**\n * PageSkeleton - shimmer skeleton loader for full pages.\n *\n * Improves perceived performance (Speed Index) by showing immediate visual\n * feedback while page content loads.\n */\nimport React from 'react';\n\nimport { Animated, Easing, Platform, StyleSheet, View } from 'react-native';\n\nimport { useFeedbackUi } from '../context/FeedbackUiContext';\nimport { FEEDBACK_TEST_IDS } from '../constants';\n\nconst ANIMATION_DURATION_MS = 1200;\nconst SKELETON_BORDER_RADIUS = 4;\nconst SKELETON_OPACITY_START = 0.3;\nconst SKELETON_OPACITY_END = 0.7;\nconst DEFAULT_ROWS = 5;\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n padding: 16,\n },\n header: {\n height: 32,\n borderRadius: SKELETON_BORDER_RADIUS,\n marginBottom: 24,\n width: '60%',\n },\n row: {\n flexDirection: 'row',\n marginBottom: 16,\n },\n avatar: {\n width: 48,\n height: 48,\n borderRadius: 24,\n marginRight: 12,\n },\n textContainer: {\n flex: 1,\n justifyContent: 'center',\n },\n textLine: {\n height: 16,\n borderRadius: SKELETON_BORDER_RADIUS,\n marginBottom: 8,\n },\n textLineShort: {\n width: '70%',\n },\n textLineFull: {\n width: '100%',\n },\n card: {\n height: 120,\n borderRadius: 8,\n marginBottom: 16,\n },\n});\n\nexport interface PageSkeletonProps {\n /** Number of skeleton rows to show */\n rows?: number;\n /** Show header skeleton */\n showHeader?: boolean;\n /** Show card skeletons instead of rows */\n variant?: 'list' | 'cards';\n}\n\nexport const PageSkeleton: React.FC<PageSkeletonProps> = ({\n rows = DEFAULT_ROWS,\n showHeader = true,\n variant = 'list',\n}) => {\n const { theme, t } = useFeedbackUi();\n const colors = theme.colors;\n\n const animatedValue = React.useRef(new Animated.Value(0)).current;\n\n React.useEffect(() => {\n const animation = Animated.loop(\n Animated.sequence([\n Animated.timing(animatedValue, {\n toValue: 1,\n duration: ANIMATION_DURATION_MS,\n easing: Easing.inOut(Easing.ease),\n useNativeDriver: Platform.OS !== 'web',\n }),\n Animated.timing(animatedValue, {\n toValue: 0,\n duration: ANIMATION_DURATION_MS,\n easing: Easing.inOut(Easing.ease),\n useNativeDriver: Platform.OS !== 'web',\n }),\n ]),\n );\n animation.start();\n return () => animation.stop();\n }, [animatedValue]);\n\n const opacity = animatedValue.interpolate({\n inputRange: [0, 1],\n outputRange: [SKELETON_OPACITY_START, SKELETON_OPACITY_END],\n });\n\n const skeletonColor = String(colors.border);\n\n const renderListRow = (index: number): React.ReactElement => (\n <View key={index} style={styles.row}>\n <Animated.View style={[styles.avatar, { backgroundColor: skeletonColor, opacity }]} />\n <View style={styles.textContainer}>\n <Animated.View style={[styles.textLine, styles.textLineFull, { backgroundColor: skeletonColor, opacity }]} />\n <Animated.View style={[styles.textLine, styles.textLineShort, { backgroundColor: skeletonColor, opacity }]} />\n </View>\n </View>\n );\n\n const renderCard = (index: number): React.ReactElement => (\n <Animated.View key={index} style={[styles.card, { backgroundColor: skeletonColor, opacity }]} />\n );\n\n const rowElements = Array.from({ length: rows }, (_, i) => (variant === 'cards' ? renderCard(i) : renderListRow(i)));\n\n return (\n <View\n accessibilityHint={t('pageSkeleton.loadingHint')}\n accessibilityLabel={t('pageSkeleton.loadingLabel')}\n accessibilityState={{ busy: true }}\n style={[styles.container, { backgroundColor: colors.background }]}\n testID={FEEDBACK_TEST_IDS.pageSkeleton}\n >\n {showHeader ? <Animated.View style={[styles.header, { backgroundColor: skeletonColor, opacity }]} /> : null}\n {rowElements}\n </View>\n );\n};\n\nexport default PageSkeleton;\n","/**\n * ConfirmDialog - modal confirm/cancel dialog with optional destructive + loading states.\n */\nimport React, { useMemo } from 'react';\n\nimport {\n ActivityIndicator,\n Modal,\n StyleSheet,\n Text,\n TouchableOpacity,\n View,\n} from 'react-native';\n\nimport { useFeedbackUi } from '../context/FeedbackUiContext';\nimport { DISABLED_OPACITY, MODAL_OVERLAY_COLOR, FEEDBACK_TEST_IDS } from '../constants';\n\nconst DIALOG_MAX_WIDTH = 400;\n\nconst styles = StyleSheet.create({\n overlay: {\n flex: 1,\n backgroundColor: MODAL_OVERLAY_COLOR,\n justifyContent: 'center',\n alignItems: 'center',\n padding: 20,\n },\n dialog: {\n width: '100%',\n maxWidth: DIALOG_MAX_WIDTH,\n borderRadius: 12,\n padding: 20,\n boxShadow: '0px 2px 8px rgba(0, 0, 0, 0.25)',\n elevation: 5,\n },\n title: {\n fontSize: 18,\n fontWeight: '600',\n marginBottom: 12,\n },\n message: {\n fontSize: 14,\n lineHeight: 20,\n marginBottom: 20,\n },\n buttonRow: {\n flexDirection: 'row',\n justifyContent: 'flex-end',\n gap: 12,\n },\n button: {\n paddingVertical: 10,\n paddingHorizontal: 20,\n borderRadius: 6,\n minWidth: 80,\n alignItems: 'center',\n justifyContent: 'center',\n },\n cancelButton: {\n borderWidth: 1,\n },\n confirmButton: {},\n buttonText: {\n fontSize: 14,\n fontWeight: '600',\n },\n disabledButton: {\n opacity: DISABLED_OPACITY,\n },\n});\n\nexport interface ConfirmDialogProps {\n visible: boolean;\n title: string;\n message: string;\n onConfirm: () => void;\n onCancel: () => void;\n confirmLabel?: string;\n cancelLabel?: string;\n confirmDisabled?: boolean;\n loading?: boolean;\n destructive?: boolean;\n}\n\nexport const ConfirmDialog = ({\n visible,\n title,\n message,\n onConfirm,\n onCancel,\n confirmLabel,\n cancelLabel,\n confirmDisabled = false,\n loading = false,\n destructive = false,\n}: ConfirmDialogProps): React.ReactElement | null => {\n const { theme, t } = useFeedbackUi();\n\n const colorStyles = useMemo(\n () => ({\n dialog: { backgroundColor: theme.colors.surfaceElevated },\n title: { color: theme.colors.text },\n message: { color: theme.colors.textSecondary },\n cancelButton: { borderColor: theme.colors.border },\n cancelButtonText: { color: theme.colors.text },\n confirmButton: {\n backgroundColor: destructive ? theme.semantic.error['500'] : theme.palette.primary['500'],\n },\n confirmButtonText: { color: theme.colors.surfaceElevated },\n }),\n [theme, destructive]\n );\n\n const resolvedConfirmLabel = confirmLabel ?? t('common.confirm');\n const resolvedCancelLabel = cancelLabel ?? t('common.cancel');\n\n const isConfirmDisabled = confirmDisabled || loading;\n\n if (!visible)\n return null;\n\n return (\n <Modal\n transparent\n animationType=\"fade\"\n visible={visible}\n onRequestClose={onCancel}\n >\n <View style={styles.overlay} testID={FEEDBACK_TEST_IDS.confirmDialog}>\n <View\n accessibilityViewIsModal\n aria-label={title}\n role=\"dialog\"\n style={[styles.dialog, colorStyles.dialog]}\n >\n <Text style={[styles.title, colorStyles.title]}>{title}</Text>\n <Text style={[styles.message, colorStyles.message]}>{message}</Text>\n\n <View style={styles.buttonRow}>\n <TouchableOpacity\n accessibilityHint={t('common.cancelHint')}\n accessibilityLabel={resolvedCancelLabel}\n accessibilityRole=\"button\"\n style={[\n styles.button,\n styles.cancelButton,\n colorStyles.cancelButton,\n ]}\n testID={FEEDBACK_TEST_IDS.cancelConfirmButton}\n onPress={onCancel}\n >\n <Text style={[styles.buttonText, colorStyles.cancelButtonText]}>\n {resolvedCancelLabel}\n </Text>\n </TouchableOpacity>\n\n <TouchableOpacity\n accessibilityHint={t('common.confirmHint')}\n accessibilityLabel={resolvedConfirmLabel}\n accessibilityRole=\"button\"\n accessibilityState={{ disabled: isConfirmDisabled }}\n disabled={isConfirmDisabled}\n style={[\n styles.button,\n styles.confirmButton,\n colorStyles.confirmButton,\n isConfirmDisabled && styles.disabledButton,\n ]}\n testID={FEEDBACK_TEST_IDS.confirmButton}\n onPress={onConfirm}\n >\n {loading ? (\n <ActivityIndicator\n color={theme.colors.surfaceElevated}\n size=\"small\"\n testID=\"confirm-loading\"\n />\n ) : (\n <Text\n style={[styles.buttonText, colorStyles.confirmButtonText]}\n >\n {resolvedConfirmLabel}\n </Text>\n )}\n </TouchableOpacity>\n </View>\n </View>\n </View>\n </Modal>\n );\n};\n\nexport default ConfirmDialog;\n","/**\n * ToastHost — the shared, tokenized transient-toast overlay promoted from the\n * byte-identical erevna-web / katalogos-web `ToastContainer` twins.\n *\n * The RENDERING (animated fade-in/out, positioning, theming) lives here; the\n * EMIT pipeline stays in the app (its event bus / `@dloizides/bff-web-client`\n * toast emitter). The app wires the two together via the `subscribe` port: a\n * function that registers a push callback and returns an unsubscribe. Colours\n * come from the UiProvider theme (`useUi`) — nothing hardcoded.\n */\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport { Animated, Platform, StyleSheet, Text, View } from 'react-native';\n\nimport { useFeedbackUi } from '../context/FeedbackUiContext';\nimport { FEEDBACK_TEST_IDS } from '../constants';\n\n// --- Defaults (ported from the twins) ---------------------------------------\nconst DEFAULT_DURATION_MS = 3000;\nconst DEFAULT_FADE_MS = 200;\nconst DEFAULT_MAX_LENGTH = 500;\n\nconst TOAST_TOP_WEB = 10;\nconst TOAST_TOP_MOBILE = 40;\nconst TOAST_HORIZONTAL_MARGIN = 10;\nconst TOAST_Z_INDEX = 9999;\nconst TOAST_INITIAL_TRANSLATE_Y = -6;\nconst TOAST_MAX_WIDTH = 600;\nconst TOAST_PADDING_HORIZONTAL = 16;\nconst TOAST_PADDING_VERTICAL = 10;\nconst TOAST_BORDER_RADIUS = 8;\nconst TOAST_MARGIN_VERTICAL = 6;\n\n// Character-range bounds for the display sanitizer.\nconst C0_CONTROL_END = 0x1f;\nconst C1_CONTROL_START = 0x7f;\nconst C1_CONTROL_END = 0x9f;\nconst ZERO_WIDTH_START = 0x200b;\nconst ZERO_WIDTH_END = 0x200f;\nconst BYTE_ORDER_MARK = 0xfeff;\n\nexport type ToastType = 'success' | 'info' | 'error';\n\n/** What the app pushes through the `subscribe` port. */\nexport interface ToastInput {\n text: string;\n type?: ToastType;\n}\n\ninterface ToastMessage extends ToastInput {\n id: string;\n}\n\ninterface ToastColors {\n primary: string;\n success: string;\n error: string;\n text: string;\n}\n\nconst styles = StyleSheet.create({\n container: {\n position: 'absolute',\n top: Platform.OS === 'web' ? TOAST_TOP_WEB : TOAST_TOP_MOBILE,\n left: TOAST_HORIZONTAL_MARGIN,\n right: TOAST_HORIZONTAL_MARGIN,\n alignItems: 'center',\n zIndex: TOAST_Z_INDEX,\n pointerEvents: 'box-none',\n },\n toast: {\n paddingHorizontal: TOAST_PADDING_HORIZONTAL,\n paddingVertical: TOAST_PADDING_VERTICAL,\n borderRadius: TOAST_BORDER_RADIUS,\n marginVertical: TOAST_MARGIN_VERTICAL,\n minWidth: '40%',\n maxWidth: TOAST_MAX_WIDTH,\n boxShadow: '0px 2px 4px rgba(0, 0, 0, 0.2)',\n elevation: 4,\n },\n text: {},\n});\n\n/** Truncate + strip control / zero-width characters before display. */\nfunction sanitizeToastText(input: string, maxLength: number): string {\n let stripped = '';\n for (const ch of input) {\n const code = ch.codePointAt(0) ?? 0;\n const isControl = code <= C0_CONTROL_END || (code >= C1_CONTROL_START && code <= C1_CONTROL_END);\n const isHidden = (code >= ZERO_WIDTH_START && code <= ZERO_WIDTH_END) || code === BYTE_ORDER_MARK;\n if (!isControl && !isHidden) stripped += ch;\n }\n return stripped.length > maxLength ? stripped.slice(0, maxLength) : stripped;\n}\n\ninterface ToastItemProps {\n message: ToastMessage;\n onDone: (id: string) => void;\n colors: ToastColors;\n durationMs: number;\n fadeMs: number;\n testID: string;\n}\n\nconst ToastItem = ({ message, onDone, colors, durationMs, fadeMs, testID }: ToastItemProps): React.ReactElement => {\n const opacityRef = useRef(new Animated.Value(0));\n const translateYRef = useRef(new Animated.Value(TOAST_INITIAL_TRANSLATE_Y));\n const opacity = opacityRef.current;\n const translateY = translateYRef.current;\n\n const backgroundColor = useMemo((): string => {\n if (message.type === 'success') return colors.success;\n if (message.type === 'error') return colors.error;\n return colors.primary;\n }, [colors.error, colors.primary, colors.success, message.type]);\n\n const handleDone = useCallback((): void => {\n onDone(message.id);\n }, [message.id, onDone]);\n\n useEffect(() => {\n const useNative = Platform.OS !== 'web';\n Animated.parallel([\n Animated.timing(opacity, { toValue: 1, duration: fadeMs, useNativeDriver: useNative }),\n Animated.timing(translateY, { toValue: 0, duration: fadeMs, useNativeDriver: useNative }),\n ]).start();\n\n const hideTimer = setTimeout(() => {\n Animated.parallel([\n Animated.timing(opacity, { toValue: 0, duration: fadeMs, useNativeDriver: useNative }),\n Animated.timing(translateY, { toValue: TOAST_INITIAL_TRANSLATE_Y, duration: fadeMs, useNativeDriver: useNative }),\n ]).start(handleDone);\n }, durationMs);\n\n return () => clearTimeout(hideTimer);\n }, [handleDone, opacity, translateY, durationMs, fadeMs]);\n\n return (\n <Animated.View\n style={[styles.toast, { backgroundColor, transform: [{ translateY }], opacity }]}\n testID={testID}\n >\n <Text style={[styles.text, { color: colors.text }]}>{message.text}</Text>\n </Animated.View>\n );\n};\n\nexport interface ToastHostProps {\n /**\n * Register a push callback; return an unsubscribe. The app adapts its own\n * event bus (e.g. `@dloizides/bff-web-client`'s toast emitter) to this port.\n */\n subscribe: (push: (toast: ToastInput) => void) => () => void;\n /** How long each toast stays before fading (ms). Default 3000. */\n durationMs?: number;\n /** Fade in/out animation duration (ms). Default 200. */\n fadeMs?: number;\n /** Max message length before truncation. Default 500. */\n maxLength?: number;\n /** testID for each toast (defaults to `notification-toast`). */\n toastTestID?: string;\n}\n\nlet toastSeq = 0;\nfunction nextId(): string {\n toastSeq += 1;\n return `${String(Date.now())}-${String(toastSeq)}`;\n}\n\nexport const ToastHost = ({\n subscribe,\n durationMs = DEFAULT_DURATION_MS,\n fadeMs = DEFAULT_FADE_MS,\n maxLength = DEFAULT_MAX_LENGTH,\n toastTestID = FEEDBACK_TEST_IDS.notificationToast,\n}: ToastHostProps): React.ReactElement | null => {\n const [messages, setMessages] = useState<ToastMessage[]>([]);\n const { theme } = useFeedbackUi();\n\n const colors = useMemo<ToastColors>(\n () => ({\n primary: theme.palette.primary['500'],\n success: (theme.semantic.success ?? theme.semantic.error)['500'],\n error: theme.semantic.error['500'],\n text: theme.colors.surfaceElevated,\n }),\n [theme],\n );\n\n const push = useCallback(\n (toast: ToastInput): void => {\n setMessages((s) => [...s, { id: nextId(), type: toast.type, text: sanitizeToastText(toast.text, maxLength) }]);\n },\n [maxLength],\n );\n\n const remove = useCallback((id: string): void => {\n setMessages((s) => s.filter((x) => x.id !== id));\n }, []);\n\n useEffect(() => subscribe(push), [subscribe, push]);\n\n if (messages.length === 0) return null;\n\n return (\n <View style={styles.container}>\n {messages.map((m) => (\n <ToastItem\n key={m.id}\n colors={colors}\n durationMs={durationMs}\n fadeMs={fadeMs}\n message={m}\n testID={toastTestID}\n onDone={remove}\n />\n ))}\n </View>\n );\n};\n\nexport default ToastHost;\n"]}
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React3, { createContext, useMemo, useContext, useCallback } from 'react';
|
|
1
|
+
import React3, { createContext, useMemo, useContext, useCallback, useState, useEffect, useRef } from 'react';
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
-
import { StyleSheet, View, Text, TouchableOpacity, ActivityIndicator, Animated,
|
|
3
|
+
import { StyleSheet, Platform, View, Text, TouchableOpacity, ActivityIndicator, Animated, Easing, Modal } from 'react-native';
|
|
4
4
|
|
|
5
5
|
// src/context/FeedbackUiContext.tsx
|
|
6
6
|
var DEFAULT_FEEDBACK_VALUE = {
|
|
@@ -52,7 +52,8 @@ var FEEDBACK_TEST_IDS = {
|
|
|
52
52
|
pageSkeleton: "page-skeleton",
|
|
53
53
|
confirmDialog: "confirm-dialog",
|
|
54
54
|
confirmButton: "confirm-button",
|
|
55
|
-
cancelConfirmButton: "cancel-confirm-button"
|
|
55
|
+
cancelConfirmButton: "cancel-confirm-button",
|
|
56
|
+
notificationToast: "notification-toast"
|
|
56
57
|
};
|
|
57
58
|
var MESSAGE_FONT_SIZE = 16;
|
|
58
59
|
var CONTAINER_PADDING = 20;
|
|
@@ -456,7 +457,141 @@ var ConfirmDialog = ({
|
|
|
456
457
|
}
|
|
457
458
|
);
|
|
458
459
|
};
|
|
460
|
+
var DEFAULT_DURATION_MS = 3e3;
|
|
461
|
+
var DEFAULT_FADE_MS = 200;
|
|
462
|
+
var DEFAULT_MAX_LENGTH = 500;
|
|
463
|
+
var TOAST_TOP_WEB = 10;
|
|
464
|
+
var TOAST_TOP_MOBILE = 40;
|
|
465
|
+
var TOAST_HORIZONTAL_MARGIN = 10;
|
|
466
|
+
var TOAST_Z_INDEX = 9999;
|
|
467
|
+
var TOAST_INITIAL_TRANSLATE_Y = -6;
|
|
468
|
+
var TOAST_MAX_WIDTH = 600;
|
|
469
|
+
var TOAST_PADDING_HORIZONTAL = 16;
|
|
470
|
+
var TOAST_PADDING_VERTICAL = 10;
|
|
471
|
+
var TOAST_BORDER_RADIUS = 8;
|
|
472
|
+
var TOAST_MARGIN_VERTICAL = 6;
|
|
473
|
+
var C0_CONTROL_END = 31;
|
|
474
|
+
var C1_CONTROL_START = 127;
|
|
475
|
+
var C1_CONTROL_END = 159;
|
|
476
|
+
var ZERO_WIDTH_START = 8203;
|
|
477
|
+
var ZERO_WIDTH_END = 8207;
|
|
478
|
+
var BYTE_ORDER_MARK = 65279;
|
|
479
|
+
var styles6 = StyleSheet.create({
|
|
480
|
+
container: {
|
|
481
|
+
position: "absolute",
|
|
482
|
+
top: Platform.OS === "web" ? TOAST_TOP_WEB : TOAST_TOP_MOBILE,
|
|
483
|
+
left: TOAST_HORIZONTAL_MARGIN,
|
|
484
|
+
right: TOAST_HORIZONTAL_MARGIN,
|
|
485
|
+
alignItems: "center",
|
|
486
|
+
zIndex: TOAST_Z_INDEX,
|
|
487
|
+
pointerEvents: "box-none"
|
|
488
|
+
},
|
|
489
|
+
toast: {
|
|
490
|
+
paddingHorizontal: TOAST_PADDING_HORIZONTAL,
|
|
491
|
+
paddingVertical: TOAST_PADDING_VERTICAL,
|
|
492
|
+
borderRadius: TOAST_BORDER_RADIUS,
|
|
493
|
+
marginVertical: TOAST_MARGIN_VERTICAL,
|
|
494
|
+
minWidth: "40%",
|
|
495
|
+
maxWidth: TOAST_MAX_WIDTH,
|
|
496
|
+
boxShadow: "0px 2px 4px rgba(0, 0, 0, 0.2)",
|
|
497
|
+
elevation: 4
|
|
498
|
+
},
|
|
499
|
+
text: {}
|
|
500
|
+
});
|
|
501
|
+
function sanitizeToastText(input, maxLength) {
|
|
502
|
+
let stripped = "";
|
|
503
|
+
for (const ch of input) {
|
|
504
|
+
const code = ch.codePointAt(0) ?? 0;
|
|
505
|
+
const isControl = code <= C0_CONTROL_END || code >= C1_CONTROL_START && code <= C1_CONTROL_END;
|
|
506
|
+
const isHidden = code >= ZERO_WIDTH_START && code <= ZERO_WIDTH_END || code === BYTE_ORDER_MARK;
|
|
507
|
+
if (!isControl && !isHidden) stripped += ch;
|
|
508
|
+
}
|
|
509
|
+
return stripped.length > maxLength ? stripped.slice(0, maxLength) : stripped;
|
|
510
|
+
}
|
|
511
|
+
var ToastItem = ({ message, onDone, colors, durationMs, fadeMs, testID }) => {
|
|
512
|
+
const opacityRef = useRef(new Animated.Value(0));
|
|
513
|
+
const translateYRef = useRef(new Animated.Value(TOAST_INITIAL_TRANSLATE_Y));
|
|
514
|
+
const opacity = opacityRef.current;
|
|
515
|
+
const translateY = translateYRef.current;
|
|
516
|
+
const backgroundColor = useMemo(() => {
|
|
517
|
+
if (message.type === "success") return colors.success;
|
|
518
|
+
if (message.type === "error") return colors.error;
|
|
519
|
+
return colors.primary;
|
|
520
|
+
}, [colors.error, colors.primary, colors.success, message.type]);
|
|
521
|
+
const handleDone = useCallback(() => {
|
|
522
|
+
onDone(message.id);
|
|
523
|
+
}, [message.id, onDone]);
|
|
524
|
+
useEffect(() => {
|
|
525
|
+
const useNative = Platform.OS !== "web";
|
|
526
|
+
Animated.parallel([
|
|
527
|
+
Animated.timing(opacity, { toValue: 1, duration: fadeMs, useNativeDriver: useNative }),
|
|
528
|
+
Animated.timing(translateY, { toValue: 0, duration: fadeMs, useNativeDriver: useNative })
|
|
529
|
+
]).start();
|
|
530
|
+
const hideTimer = setTimeout(() => {
|
|
531
|
+
Animated.parallel([
|
|
532
|
+
Animated.timing(opacity, { toValue: 0, duration: fadeMs, useNativeDriver: useNative }),
|
|
533
|
+
Animated.timing(translateY, { toValue: TOAST_INITIAL_TRANSLATE_Y, duration: fadeMs, useNativeDriver: useNative })
|
|
534
|
+
]).start(handleDone);
|
|
535
|
+
}, durationMs);
|
|
536
|
+
return () => clearTimeout(hideTimer);
|
|
537
|
+
}, [handleDone, opacity, translateY, durationMs, fadeMs]);
|
|
538
|
+
return /* @__PURE__ */ jsx(
|
|
539
|
+
Animated.View,
|
|
540
|
+
{
|
|
541
|
+
style: [styles6.toast, { backgroundColor, transform: [{ translateY }], opacity }],
|
|
542
|
+
testID,
|
|
543
|
+
children: /* @__PURE__ */ jsx(Text, { style: [styles6.text, { color: colors.text }], children: message.text })
|
|
544
|
+
}
|
|
545
|
+
);
|
|
546
|
+
};
|
|
547
|
+
var toastSeq = 0;
|
|
548
|
+
function nextId() {
|
|
549
|
+
toastSeq += 1;
|
|
550
|
+
return `${String(Date.now())}-${String(toastSeq)}`;
|
|
551
|
+
}
|
|
552
|
+
var ToastHost = ({
|
|
553
|
+
subscribe,
|
|
554
|
+
durationMs = DEFAULT_DURATION_MS,
|
|
555
|
+
fadeMs = DEFAULT_FADE_MS,
|
|
556
|
+
maxLength = DEFAULT_MAX_LENGTH,
|
|
557
|
+
toastTestID = FEEDBACK_TEST_IDS.notificationToast
|
|
558
|
+
}) => {
|
|
559
|
+
const [messages, setMessages] = useState([]);
|
|
560
|
+
const { theme } = useFeedbackUi();
|
|
561
|
+
const colors = useMemo(
|
|
562
|
+
() => ({
|
|
563
|
+
primary: theme.palette.primary["500"],
|
|
564
|
+
success: (theme.semantic.success ?? theme.semantic.error)["500"],
|
|
565
|
+
error: theme.semantic.error["500"],
|
|
566
|
+
text: theme.colors.surfaceElevated
|
|
567
|
+
}),
|
|
568
|
+
[theme]
|
|
569
|
+
);
|
|
570
|
+
const push = useCallback(
|
|
571
|
+
(toast) => {
|
|
572
|
+
setMessages((s) => [...s, { id: nextId(), type: toast.type, text: sanitizeToastText(toast.text, maxLength) }]);
|
|
573
|
+
},
|
|
574
|
+
[maxLength]
|
|
575
|
+
);
|
|
576
|
+
const remove = useCallback((id) => {
|
|
577
|
+
setMessages((s) => s.filter((x) => x.id !== id));
|
|
578
|
+
}, []);
|
|
579
|
+
useEffect(() => subscribe(push), [subscribe, push]);
|
|
580
|
+
if (messages.length === 0) return null;
|
|
581
|
+
return /* @__PURE__ */ jsx(View, { style: styles6.container, children: messages.map((m) => /* @__PURE__ */ jsx(
|
|
582
|
+
ToastItem,
|
|
583
|
+
{
|
|
584
|
+
colors,
|
|
585
|
+
durationMs,
|
|
586
|
+
fadeMs,
|
|
587
|
+
message: m,
|
|
588
|
+
testID: toastTestID,
|
|
589
|
+
onDone: remove
|
|
590
|
+
},
|
|
591
|
+
m.id
|
|
592
|
+
)) });
|
|
593
|
+
};
|
|
459
594
|
|
|
460
|
-
export { ConfirmDialog, DISABLED_OPACITY, EmptyListState, ErrorState, FEEDBACK_TEST_IDS, FeedbackUiProvider, LoadingFallback, MODAL_OVERLAY_COLOR, PageSkeleton, FeedbackUiProvider as UiProvider, useFeedbackUi, useFeedbackUi as useUi };
|
|
595
|
+
export { ConfirmDialog, DISABLED_OPACITY, EmptyListState, ErrorState, FEEDBACK_TEST_IDS, FeedbackUiProvider, LoadingFallback, MODAL_OVERLAY_COLOR, PageSkeleton, ToastHost, FeedbackUiProvider as UiProvider, useFeedbackUi, useFeedbackUi as useUi };
|
|
461
596
|
//# sourceMappingURL=index.mjs.map
|
|
462
597
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/context/FeedbackUiContext.tsx","../src/constants.ts","../src/ErrorState/ErrorState.tsx","../src/EmptyListState/EmptyListState.tsx","../src/LoadingFallback/LoadingFallback.tsx","../src/PageSkeleton/PageSkeleton.tsx","../src/ConfirmDialog/ConfirmDialog.tsx"],"names":["jsx","MESSAGE_FONT_SIZE","CONTAINER_PADDING","styles","StyleSheet","jsxs","View","Text","TouchableOpacity","React","useMemo","ActivityIndicator"],"mappings":";;;;;AAyDA,IAAM,sBAAA,GAA0C;AAAA,EAC9C,KAAA,EAAO;AAAA,IACL,MAAA,EAAQ;AAAA,MACN,UAAA,EAAY,SAAA;AAAA,MACZ,OAAA,EAAS,SAAA;AAAA,MACT,eAAA,EAAiB,SAAA;AAAA,MACjB,IAAA,EAAM,SAAA;AAAA,MACN,aAAA,EAAe,SAAA;AAAA,MACf,MAAA,EAAQ;AAAA,KACV;AAAA,IACA,OAAA,EAAS;AAAA,MACP,SAAS,EAAE,KAAA,EAAO,WAAW,KAAA,EAAO,SAAA,EAAW,OAAO,SAAA,EAAU;AAAA,MAChE,SAAA,EAAW,EAAE,KAAA,EAAO,SAAA,EAAU;AAAA,MAC9B,MAAA,EAAQ,EAAE,KAAA,EAAO,SAAA;AAAU,KAC7B;AAAA,IACA,QAAA,EAAU;AAAA,MACR,KAAA,EAAO,EAAE,KAAA,EAAO,SAAA,EAAU;AAAA,MAC1B,OAAA,EAAS,EAAE,KAAA,EAAO,SAAA,EAAU;AAAA,MAC5B,OAAA,EAAS,EAAE,KAAA,EAAO,SAAA,EAAU;AAAA,MAC5B,IAAA,EAAM,EAAE,KAAA,EAAO,SAAA;AAAU;AAC3B,GACF;AAAA,EACA,CAAA,EAAG,CAAC,GAAA,KAAQ;AACd,CAAA;AAEA,IAAM,iBAAA,GAAoB,cAA+B,sBAAsB,CAAA;AAWxE,IAAM,qBAAqB,CAAC;AAAA,EACjC,KAAA;AAAA,EAC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BAACW,iBAAAA;AAAA,oBAAA;AAAA,sBACC,KAAA,EAAO,MAAM,MAAA,CAAO,eAAA;AAAA,sBACpB,IAAA,EAAK,OAAA;AAAA,sBACL,MAAA,EAAO;AAAA;AAAA,sCAGTX,GAAAA;AAAA,oBAACO,IAAAA;AAAA,oBAAA;AAAA,sBACC,KAAA,EAAO,CAACJ,OAAAA,CAAO,UAAA,EAAY,YAAY,iBAAiB,CAAA;AAAA,sBAEvD,QAAA,EAAA;AAAA;AAAA;AACH;AAAA;AAEJ,aAAA,EACF;AAAA;AAAA;AAAA,OACF,EACF;AAAA;AAAA,GACF;AAEJ","file":"index.mjs","sourcesContent":["import React, { createContext, useContext, useMemo } from 'react';\n\n/**\n * The minimal theme surface the feedback components read. Each consuming app's\n * resolved theme object is structurally compatible with this shape, so apps pass\n * their existing `useTheme().theme` straight through the provider.\n */\nexport interface FeedbackThemeColors {\n background: string;\n surface: string;\n surfaceElevated: string;\n text: string;\n textSecondary: string;\n border: string;\n}\n\n/** A colour scale. The `500` step is guaranteed; other steps (50–900) are addressable. */\nexport interface FeedbackColorScale {\n '500': string;\n [step: string]: string;\n}\n\n/** `primary` is guaranteed; apps typically also provide `secondary`/`accent` (addressable). */\nexport interface FeedbackThemePalette {\n primary: FeedbackColorScale;\n [name: string]: FeedbackColorScale;\n}\n\n/** `error` is guaranteed; apps typically also provide `success`/`warning`/`info` (addressable). */\nexport interface FeedbackThemeSemantic {\n error: FeedbackColorScale;\n [name: string]: FeedbackColorScale;\n}\n\nexport interface FeedbackTheme {\n colors: FeedbackThemeColors;\n palette: FeedbackThemePalette;\n semantic: FeedbackThemeSemantic;\n}\n\n/** Translate function — mirrors the apps' `FM(key, p1?, p2?, p3?)` helper. */\nexport type FeedbackTranslate = (key: string, p1?: string, p2?: string, p3?: string) => string;\n\n/** Navigation callback used by EmptyListState's optional call-to-action. */\nexport type FeedbackNavigate = (route: string) => void;\n\nexport interface FeedbackUiValue {\n theme: FeedbackTheme;\n t: FeedbackTranslate;\n navigate?: FeedbackNavigate;\n}\n\n/**\n * Neutral fallback used when no FeedbackUiProvider is mounted. Apps SHOULD mount a\n * provider so the components pick up the real theme + translations; the default keeps\n * the components rendering gracefully (e.g. in isolated tests) instead of throwing.\n */\nconst DEFAULT_FEEDBACK_VALUE: FeedbackUiValue = {\n theme: {\n colors: {\n background: '#ffffff',\n surface: '#f7f7f7',\n surfaceElevated: '#ffffff',\n text: '#111111',\n textSecondary: '#666666',\n border: '#dddddd',\n },\n palette: {\n primary: { '100': '#dbeafe', '500': '#2563eb', '700': '#1d4ed8' },\n secondary: { '500': '#64748b' },\n accent: { '500': '#f59e0b' },\n },\n semantic: {\n error: { '500': '#dc2626' },\n success: { '500': '#16a34a' },\n warning: { '500': '#d97706' },\n info: { '500': '#2563eb' },\n },\n },\n t: (key) => key,\n};\n\nconst FeedbackUiContext = createContext<FeedbackUiValue>(DEFAULT_FEEDBACK_VALUE);\n\nexport interface FeedbackUiProviderProps extends FeedbackUiValue {\n children: React.ReactNode;\n}\n\n/**\n * Supplies the host app's theme + translate (+ optional navigate) to the\n * `@dloizides/ui-feedback` components. Mount once, high in the app tree, below\n * the app's own ThemeProvider.\n */\nexport const FeedbackUiProvider = ({\n theme,\n t,\n navigate,\n children,\n}: FeedbackUiProviderProps): React.ReactElement => {\n const value = useMemo<FeedbackUiValue>(() => ({ theme, t, navigate }), [theme, t, navigate]);\n return <FeedbackUiContext.Provider value={value}>{children}</FeedbackUiContext.Provider>;\n};\n\n/**\n * Reads the feedback UI context. Returns the provider's value when one is mounted,\n * or a neutral default (see DEFAULT_FEEDBACK_VALUE) so components render gracefully\n * without a provider.\n */\nexport function useFeedbackUi(): FeedbackUiValue {\n return useContext(FeedbackUiContext);\n}\n","/** Semi-transparent scrim behind modal dialogs. */\nexport const MODAL_OVERLAY_COLOR = 'rgba(0, 0, 0, 0.5)';\n\n/** Opacity applied to disabled interactive controls. */\nexport const DISABLED_OPACITY = 0.5;\n\n/**\n * Default testID strings. These match the values the consuming apps already used\n * so existing Playwright selectors keep working after migration.\n */\nexport const FEEDBACK_TEST_IDS = {\n errorState: 'error-state',\n errorStateRetry: 'error-state-retry',\n emptyListCta: 'empty-list-cta',\n loadingFallback: 'loading-fallback',\n pageSkeleton: 'page-skeleton',\n confirmDialog: 'confirm-dialog',\n confirmButton: 'confirm-button',\n cancelConfirmButton: 'cancel-confirm-button',\n} as const;\n","/**\n * ErrorState - generic error display with optional retry button.\n */\nimport React from 'react';\n\nimport { StyleSheet, Text, TouchableOpacity, View } from 'react-native';\n\nimport { useFeedbackUi } from '../context/FeedbackUiContext';\nimport { FEEDBACK_TEST_IDS } from '../constants';\n\n// ---------------------------------------------------------------------------\n// Constants\n// ---------------------------------------------------------------------------\n\nconst MESSAGE_FONT_SIZE = 16;\nconst CONTAINER_PADDING = 20;\nconst BUTTON_MARGIN_TOP = 12;\nconst BUTTON_PADDING_V = 8;\nconst BUTTON_PADDING_H = 16;\nconst BUTTON_BORDER_RADIUS = 6;\nconst BUTTON_FONT_SIZE = 14;\n\n// ---------------------------------------------------------------------------\n// Styles\n// ---------------------------------------------------------------------------\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n padding: CONTAINER_PADDING,\n },\n message: {\n fontSize: MESSAGE_FONT_SIZE,\n textAlign: 'center',\n },\n retryButton: {\n marginTop: BUTTON_MARGIN_TOP,\n paddingVertical: BUTTON_PADDING_V,\n paddingHorizontal: BUTTON_PADDING_H,\n borderRadius: BUTTON_BORDER_RADIUS,\n },\n retryText: {\n fontSize: BUTTON_FONT_SIZE,\n fontWeight: '600',\n },\n});\n\n// ---------------------------------------------------------------------------\n// Props\n// ---------------------------------------------------------------------------\n\nexport interface ErrorStateProps {\n message: string;\n onRetry?: () => void;\n testID?: string;\n}\n\n// ---------------------------------------------------------------------------\n// Component\n// ---------------------------------------------------------------------------\n\nexport const ErrorState = ({\n message,\n onRetry,\n testID = FEEDBACK_TEST_IDS.errorState,\n}: ErrorStateProps): React.ReactElement => {\n const { theme, t } = useFeedbackUi();\n const errorColor = theme.semantic.error['500'];\n const primary = theme.palette.primary['500'];\n\n return (\n <View style={styles.container} testID={testID}>\n <Text style={[styles.message, { color: errorColor }]}>{message}</Text>\n {typeof onRetry === 'function' ? (\n <TouchableOpacity\n accessibilityHint={t('common.retryHint')}\n accessibilityLabel={t('common.retry')}\n accessibilityRole=\"button\"\n style={[styles.retryButton, { backgroundColor: primary }]}\n testID={FEEDBACK_TEST_IDS.errorStateRetry}\n onPress={onRetry}\n >\n <Text style={[styles.retryText, { color: theme.colors.surfaceElevated }]}>\n {t('common.retry')}\n </Text>\n </TouchableOpacity>\n ) : null}\n </View>\n );\n};\n\nexport default ErrorState;\n","/**\n * EmptyListState - empty-collection message with an optional call-to-action.\n *\n * The CTA navigates via the `navigate` callback supplied through FeedbackUiProvider\n * (the host app adapts its router, e.g. expo-router's `router.push`).\n */\nimport React, { useCallback } from 'react';\n\nimport { StyleSheet, Text, TouchableOpacity, View } from 'react-native';\n\nimport { useFeedbackUi } from '../context/FeedbackUiContext';\nimport { FEEDBACK_TEST_IDS } from '../constants';\n\nconst MESSAGE_FONT_SIZE = 16;\nconst CTA_MARGIN_TOP = 16;\nconst CTA_PADDING_VERTICAL = 10;\nconst CTA_PADDING_HORIZONTAL = 20;\nconst CTA_BORDER_RADIUS = 8;\nconst CTA_FONT_SIZE = 14;\nconst CONTAINER_PADDING = 32;\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n padding: CONTAINER_PADDING,\n },\n message: {\n fontSize: MESSAGE_FONT_SIZE,\n textAlign: 'center',\n },\n ctaButton: {\n marginTop: CTA_MARGIN_TOP,\n paddingVertical: CTA_PADDING_VERTICAL,\n paddingHorizontal: CTA_PADDING_HORIZONTAL,\n borderRadius: CTA_BORDER_RADIUS,\n },\n ctaText: {\n fontSize: CTA_FONT_SIZE,\n fontWeight: '600',\n },\n});\n\nexport interface EmptyListStateProps {\n messageKey: string;\n ctaTextKey?: string;\n ctaHintKey?: string;\n ctaRoute?: string;\n testID: string;\n}\n\nexport const EmptyListState = ({\n messageKey,\n ctaTextKey,\n ctaHintKey,\n ctaRoute,\n testID,\n}: EmptyListStateProps): React.ReactElement => {\n const { theme, t, navigate } = useFeedbackUi();\n const { colors } = theme;\n const primary = theme.palette.primary['500'];\n\n const handlePress = useCallback((): void => {\n if (typeof ctaRoute === 'string' && typeof navigate === 'function') navigate(ctaRoute);\n }, [navigate, ctaRoute]);\n\n const showCta = typeof ctaTextKey === 'string'\n && typeof ctaHintKey === 'string'\n && typeof ctaRoute === 'string';\n\n return (\n <View style={styles.container} testID={testID}>\n <Text style={[styles.message, { color: colors.textSecondary }]}>\n {t(messageKey)}\n </Text>\n {showCta ? (\n <TouchableOpacity\n accessibilityHint={t(ctaHintKey as string)}\n accessibilityLabel={t(ctaTextKey as string)}\n accessibilityRole=\"button\"\n style={[styles.ctaButton, { backgroundColor: primary }]}\n testID={FEEDBACK_TEST_IDS.emptyListCta}\n onPress={handlePress}\n >\n <Text style={[styles.ctaText, { color: colors.background }]}>\n {t(ctaTextKey as string)}\n </Text>\n </TouchableOpacity>\n ) : null}\n </View>\n );\n};\n\nexport default EmptyListState;\n","/**\n * LoadingFallback - lightweight loading indicator for lazy-loaded components.\n *\n * Used with React.lazy() and Suspense to show a loading state while heavy\n * components are loading. Optimized for minimal bundle impact.\n */\nimport React from 'react';\n\nimport { ActivityIndicator, StyleSheet, View } from 'react-native';\n\nimport { useFeedbackUi } from '../context/FeedbackUiContext';\nimport { FEEDBACK_TEST_IDS } from '../constants';\n\nconst FULLSCREEN_MIN_HEIGHT = 300;\nconst CONTAINER_MIN_HEIGHT = 100;\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n minHeight: CONTAINER_MIN_HEIGHT,\n },\n fullScreen: {\n minHeight: FULLSCREEN_MIN_HEIGHT,\n },\n});\n\nexport interface LoadingFallbackProps {\n /** Show as full-screen loader (default: false) */\n fullScreen?: boolean;\n /** Custom size for the spinner */\n size?: 'small' | 'large';\n}\n\nexport const LoadingFallback: React.FC<LoadingFallbackProps> = ({ fullScreen = false, size = 'large' }) => {\n const { theme, t } = useFeedbackUi();\n const colors = theme.colors;\n const primary = theme.palette.primary['500'];\n\n return (\n <View\n accessibilityHint={t('loadingFallback.hint')}\n accessibilityLabel={t('loadingFallback.label')}\n accessibilityRole=\"progressbar\"\n style={[styles.container, fullScreen && styles.fullScreen, { backgroundColor: colors.background }]}\n testID={FEEDBACK_TEST_IDS.loadingFallback}\n >\n <ActivityIndicator color={primary} size={size} />\n </View>\n );\n};\n\nexport default LoadingFallback;\n","/**\n * PageSkeleton - shimmer skeleton loader for full pages.\n *\n * Improves perceived performance (Speed Index) by showing immediate visual\n * feedback while page content loads.\n */\nimport React from 'react';\n\nimport { Animated, Easing, Platform, StyleSheet, View } from 'react-native';\n\nimport { useFeedbackUi } from '../context/FeedbackUiContext';\nimport { FEEDBACK_TEST_IDS } from '../constants';\n\nconst ANIMATION_DURATION_MS = 1200;\nconst SKELETON_BORDER_RADIUS = 4;\nconst SKELETON_OPACITY_START = 0.3;\nconst SKELETON_OPACITY_END = 0.7;\nconst DEFAULT_ROWS = 5;\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n padding: 16,\n },\n header: {\n height: 32,\n borderRadius: SKELETON_BORDER_RADIUS,\n marginBottom: 24,\n width: '60%',\n },\n row: {\n flexDirection: 'row',\n marginBottom: 16,\n },\n avatar: {\n width: 48,\n height: 48,\n borderRadius: 24,\n marginRight: 12,\n },\n textContainer: {\n flex: 1,\n justifyContent: 'center',\n },\n textLine: {\n height: 16,\n borderRadius: SKELETON_BORDER_RADIUS,\n marginBottom: 8,\n },\n textLineShort: {\n width: '70%',\n },\n textLineFull: {\n width: '100%',\n },\n card: {\n height: 120,\n borderRadius: 8,\n marginBottom: 16,\n },\n});\n\nexport interface PageSkeletonProps {\n /** Number of skeleton rows to show */\n rows?: number;\n /** Show header skeleton */\n showHeader?: boolean;\n /** Show card skeletons instead of rows */\n variant?: 'list' | 'cards';\n}\n\nexport const PageSkeleton: React.FC<PageSkeletonProps> = ({\n rows = DEFAULT_ROWS,\n showHeader = true,\n variant = 'list',\n}) => {\n const { theme, t } = useFeedbackUi();\n const colors = theme.colors;\n\n const animatedValue = React.useRef(new Animated.Value(0)).current;\n\n React.useEffect(() => {\n const animation = Animated.loop(\n Animated.sequence([\n Animated.timing(animatedValue, {\n toValue: 1,\n duration: ANIMATION_DURATION_MS,\n easing: Easing.inOut(Easing.ease),\n useNativeDriver: Platform.OS !== 'web',\n }),\n Animated.timing(animatedValue, {\n toValue: 0,\n duration: ANIMATION_DURATION_MS,\n easing: Easing.inOut(Easing.ease),\n useNativeDriver: Platform.OS !== 'web',\n }),\n ]),\n );\n animation.start();\n return () => animation.stop();\n }, [animatedValue]);\n\n const opacity = animatedValue.interpolate({\n inputRange: [0, 1],\n outputRange: [SKELETON_OPACITY_START, SKELETON_OPACITY_END],\n });\n\n const skeletonColor = String(colors.border);\n\n const renderListRow = (index: number): React.ReactElement => (\n <View key={index} style={styles.row}>\n <Animated.View style={[styles.avatar, { backgroundColor: skeletonColor, opacity }]} />\n <View style={styles.textContainer}>\n <Animated.View style={[styles.textLine, styles.textLineFull, { backgroundColor: skeletonColor, opacity }]} />\n <Animated.View style={[styles.textLine, styles.textLineShort, { backgroundColor: skeletonColor, opacity }]} />\n </View>\n </View>\n );\n\n const renderCard = (index: number): React.ReactElement => (\n <Animated.View key={index} style={[styles.card, { backgroundColor: skeletonColor, opacity }]} />\n );\n\n const rowElements = Array.from({ length: rows }, (_, i) => (variant === 'cards' ? renderCard(i) : renderListRow(i)));\n\n return (\n <View\n accessibilityHint={t('pageSkeleton.loadingHint')}\n accessibilityLabel={t('pageSkeleton.loadingLabel')}\n accessibilityState={{ busy: true }}\n style={[styles.container, { backgroundColor: colors.background }]}\n testID={FEEDBACK_TEST_IDS.pageSkeleton}\n >\n {showHeader ? <Animated.View style={[styles.header, { backgroundColor: skeletonColor, opacity }]} /> : null}\n {rowElements}\n </View>\n );\n};\n\nexport default PageSkeleton;\n","/**\n * ConfirmDialog - modal confirm/cancel dialog with optional destructive + loading states.\n */\nimport React, { useMemo } from 'react';\n\nimport {\n ActivityIndicator,\n Modal,\n StyleSheet,\n Text,\n TouchableOpacity,\n View,\n} from 'react-native';\n\nimport { useFeedbackUi } from '../context/FeedbackUiContext';\nimport { DISABLED_OPACITY, MODAL_OVERLAY_COLOR, FEEDBACK_TEST_IDS } from '../constants';\n\nconst DIALOG_MAX_WIDTH = 400;\n\nconst styles = StyleSheet.create({\n overlay: {\n flex: 1,\n backgroundColor: MODAL_OVERLAY_COLOR,\n justifyContent: 'center',\n alignItems: 'center',\n padding: 20,\n },\n dialog: {\n width: '100%',\n maxWidth: DIALOG_MAX_WIDTH,\n borderRadius: 12,\n padding: 20,\n boxShadow: '0px 2px 8px rgba(0, 0, 0, 0.25)',\n elevation: 5,\n },\n title: {\n fontSize: 18,\n fontWeight: '600',\n marginBottom: 12,\n },\n message: {\n fontSize: 14,\n lineHeight: 20,\n marginBottom: 20,\n },\n buttonRow: {\n flexDirection: 'row',\n justifyContent: 'flex-end',\n gap: 12,\n },\n button: {\n paddingVertical: 10,\n paddingHorizontal: 20,\n borderRadius: 6,\n minWidth: 80,\n alignItems: 'center',\n justifyContent: 'center',\n },\n cancelButton: {\n borderWidth: 1,\n },\n confirmButton: {},\n buttonText: {\n fontSize: 14,\n fontWeight: '600',\n },\n disabledButton: {\n opacity: DISABLED_OPACITY,\n },\n});\n\nexport interface ConfirmDialogProps {\n visible: boolean;\n title: string;\n message: string;\n onConfirm: () => void;\n onCancel: () => void;\n confirmLabel?: string;\n cancelLabel?: string;\n confirmDisabled?: boolean;\n loading?: boolean;\n destructive?: boolean;\n}\n\nexport const ConfirmDialog = ({\n visible,\n title,\n message,\n onConfirm,\n onCancel,\n confirmLabel,\n cancelLabel,\n confirmDisabled = false,\n loading = false,\n destructive = false,\n}: ConfirmDialogProps): React.ReactElement | null => {\n const { theme, t } = useFeedbackUi();\n\n const colorStyles = useMemo(\n () => ({\n dialog: { backgroundColor: theme.colors.surfaceElevated },\n title: { color: theme.colors.text },\n message: { color: theme.colors.textSecondary },\n cancelButton: { borderColor: theme.colors.border },\n cancelButtonText: { color: theme.colors.text },\n confirmButton: {\n backgroundColor: destructive ? theme.semantic.error['500'] : theme.palette.primary['500'],\n },\n confirmButtonText: { color: theme.colors.surfaceElevated },\n }),\n [theme, destructive]\n );\n\n const resolvedConfirmLabel = confirmLabel ?? t('common.confirm');\n const resolvedCancelLabel = cancelLabel ?? t('common.cancel');\n\n const isConfirmDisabled = confirmDisabled || loading;\n\n if (!visible)\n return null;\n\n return (\n <Modal\n transparent\n animationType=\"fade\"\n visible={visible}\n onRequestClose={onCancel}\n >\n <View style={styles.overlay} testID={FEEDBACK_TEST_IDS.confirmDialog}>\n <View\n accessibilityViewIsModal\n aria-label={title}\n role=\"dialog\"\n style={[styles.dialog, colorStyles.dialog]}\n >\n <Text style={[styles.title, colorStyles.title]}>{title}</Text>\n <Text style={[styles.message, colorStyles.message]}>{message}</Text>\n\n <View style={styles.buttonRow}>\n <TouchableOpacity\n accessibilityHint={t('common.cancelHint')}\n accessibilityLabel={resolvedCancelLabel}\n accessibilityRole=\"button\"\n style={[\n styles.button,\n styles.cancelButton,\n colorStyles.cancelButton,\n ]}\n testID={FEEDBACK_TEST_IDS.cancelConfirmButton}\n onPress={onCancel}\n >\n <Text style={[styles.buttonText, colorStyles.cancelButtonText]}>\n {resolvedCancelLabel}\n </Text>\n </TouchableOpacity>\n\n <TouchableOpacity\n accessibilityHint={t('common.confirmHint')}\n accessibilityLabel={resolvedConfirmLabel}\n accessibilityRole=\"button\"\n accessibilityState={{ disabled: isConfirmDisabled }}\n disabled={isConfirmDisabled}\n style={[\n styles.button,\n styles.confirmButton,\n colorStyles.confirmButton,\n isConfirmDisabled && styles.disabledButton,\n ]}\n testID={FEEDBACK_TEST_IDS.confirmButton}\n onPress={onConfirm}\n >\n {loading ? (\n <ActivityIndicator\n color={theme.colors.surfaceElevated}\n size=\"small\"\n testID=\"confirm-loading\"\n />\n ) : (\n <Text\n style={[styles.buttonText, colorStyles.confirmButtonText]}\n >\n {resolvedConfirmLabel}\n </Text>\n )}\n </TouchableOpacity>\n </View>\n </View>\n </View>\n </Modal>\n );\n};\n\nexport default ConfirmDialog;\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/context/FeedbackUiContext.tsx","../src/constants.ts","../src/ErrorState/ErrorState.tsx","../src/EmptyListState/EmptyListState.tsx","../src/LoadingFallback/LoadingFallback.tsx","../src/PageSkeleton/PageSkeleton.tsx","../src/ConfirmDialog/ConfirmDialog.tsx","../src/ToastHost/ToastHost.tsx"],"names":["jsx","MESSAGE_FONT_SIZE","CONTAINER_PADDING","styles","StyleSheet","jsxs","View","Text","TouchableOpacity","React","useMemo","ActivityIndicator","Platform","Animated","useCallback"],"mappings":";;;;;AAyDA,IAAM,sBAAA,GAA0C;AAAA,EAC9C,KAAA,EAAO;AAAA,IACL,MAAA,EAAQ;AAAA,MACN,UAAA,EAAY,SAAA;AAAA,MACZ,OAAA,EAAS,SAAA;AAAA,MACT,eAAA,EAAiB,SAAA;AAAA,MACjB,IAAA,EAAM,SAAA;AAAA,MACN,aAAA,EAAe,SAAA;AAAA,MACf,MAAA,EAAQ;AAAA,KACV;AAAA,IACA,OAAA,EAAS;AAAA,MACP,SAAS,EAAE,KAAA,EAAO,WAAW,KAAA,EAAO,SAAA,EAAW,OAAO,SAAA,EAAU;AAAA,MAChE,SAAA,EAAW,EAAE,KAAA,EAAO,SAAA,EAAU;AAAA,MAC9B,MAAA,EAAQ,EAAE,KAAA,EAAO,SAAA;AAAU,KAC7B;AAAA,IACA,QAAA,EAAU;AAAA,MACR,KAAA,EAAO,EAAE,KAAA,EAAO,SAAA,EAAU;AAAA,MAC1B,OAAA,EAAS,EAAE,KAAA,EAAO,SAAA,EAAU;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,CAAA,CAAE,MAAA,CAAO,CAAC,CAAA,KAAM,CAAA,CAAE,EAAA,KAAO,EAAE,CAAC,CAAA;AAAA,EACjD,CAAA,EAAG,EAAE,CAAA;AAEL,EAAA,SAAA,CAAU,MAAM,SAAA,CAAU,IAAI,GAAG,CAAC,SAAA,EAAW,IAAI,CAAC,CAAA;AAElD,EAAA,IAAI,QAAA,CAAS,MAAA,KAAW,CAAA,EAAG,OAAO,IAAA;AAElC,EAAA,uBACEd,GAAAA,CAACM,IAAAA,EAAA,EAAK,KAAA,EAAOH,OAAAA,CAAO,SAAA,EACjB,QAAA,EAAA,QAAA,CAAS,GAAA,CAAI,CAAC,CAAA,qBACbH,GAAAA;AAAA,IAAC,SAAA;AAAA,IAAA;AAAA,MAEC,MAAA;AAAA,MACA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,OAAA,EAAS,CAAA;AAAA,MACT,MAAA,EAAQ,WAAA;AAAA,MACR,MAAA,EAAQ;AAAA,KAAA;AAAA,IANH,CAAA,CAAE;AAAA,GAQV,CAAA,EACH,CAAA;AAEJ","file":"index.mjs","sourcesContent":["import React, { createContext, useContext, useMemo } from 'react';\n\n/**\n * The minimal theme surface the feedback components read. Each consuming app's\n * resolved theme object is structurally compatible with this shape, so apps pass\n * their existing `useTheme().theme` straight through the provider.\n */\nexport interface FeedbackThemeColors {\n background: string;\n surface: string;\n surfaceElevated: string;\n text: string;\n textSecondary: string;\n border: string;\n}\n\n/** A colour scale. The `500` step is guaranteed; other steps (50–900) are addressable. */\nexport interface FeedbackColorScale {\n '500': string;\n [step: string]: string;\n}\n\n/** `primary` is guaranteed; apps typically also provide `secondary`/`accent` (addressable). */\nexport interface FeedbackThemePalette {\n primary: FeedbackColorScale;\n [name: string]: FeedbackColorScale;\n}\n\n/** `error` is guaranteed; apps typically also provide `success`/`warning`/`info` (addressable). */\nexport interface FeedbackThemeSemantic {\n error: FeedbackColorScale;\n [name: string]: FeedbackColorScale;\n}\n\nexport interface FeedbackTheme {\n colors: FeedbackThemeColors;\n palette: FeedbackThemePalette;\n semantic: FeedbackThemeSemantic;\n}\n\n/** Translate function — mirrors the apps' `FM(key, p1?, p2?, p3?)` helper. */\nexport type FeedbackTranslate = (key: string, p1?: string, p2?: string, p3?: string) => string;\n\n/** Navigation callback used by EmptyListState's optional call-to-action. */\nexport type FeedbackNavigate = (route: string) => void;\n\nexport interface FeedbackUiValue {\n theme: FeedbackTheme;\n t: FeedbackTranslate;\n navigate?: FeedbackNavigate;\n}\n\n/**\n * Neutral fallback used when no FeedbackUiProvider is mounted. Apps SHOULD mount a\n * provider so the components pick up the real theme + translations; the default keeps\n * the components rendering gracefully (e.g. in isolated tests) instead of throwing.\n */\nconst DEFAULT_FEEDBACK_VALUE: FeedbackUiValue = {\n theme: {\n colors: {\n background: '#ffffff',\n surface: '#f7f7f7',\n surfaceElevated: '#ffffff',\n text: '#111111',\n textSecondary: '#666666',\n border: '#dddddd',\n },\n palette: {\n primary: { '100': '#dbeafe', '500': '#2563eb', '700': '#1d4ed8' },\n secondary: { '500': '#64748b' },\n accent: { '500': '#f59e0b' },\n },\n semantic: {\n error: { '500': '#dc2626' },\n success: { '500': '#16a34a' },\n warning: { '500': '#d97706' },\n info: { '500': '#2563eb' },\n },\n },\n t: (key) => key,\n};\n\nconst FeedbackUiContext = createContext<FeedbackUiValue>(DEFAULT_FEEDBACK_VALUE);\n\nexport interface FeedbackUiProviderProps extends FeedbackUiValue {\n children: React.ReactNode;\n}\n\n/**\n * Supplies the host app's theme + translate (+ optional navigate) to the\n * `@dloizides/ui-feedback` components. Mount once, high in the app tree, below\n * the app's own ThemeProvider.\n */\nexport const FeedbackUiProvider = ({\n theme,\n t,\n navigate,\n children,\n}: FeedbackUiProviderProps): React.ReactElement => {\n const value = useMemo<FeedbackUiValue>(() => ({ theme, t, navigate }), [theme, t, navigate]);\n return <FeedbackUiContext.Provider value={value}>{children}</FeedbackUiContext.Provider>;\n};\n\n/**\n * Reads the feedback UI context. Returns the provider's value when one is mounted,\n * or a neutral default (see DEFAULT_FEEDBACK_VALUE) so components render gracefully\n * without a provider.\n */\nexport function useFeedbackUi(): FeedbackUiValue {\n return useContext(FeedbackUiContext);\n}\n","/** Semi-transparent scrim behind modal dialogs. */\nexport const MODAL_OVERLAY_COLOR = 'rgba(0, 0, 0, 0.5)';\n\n/** Opacity applied to disabled interactive controls. */\nexport const DISABLED_OPACITY = 0.5;\n\n/**\n * Default testID strings. These match the values the consuming apps already used\n * so existing Playwright selectors keep working after migration.\n */\nexport const FEEDBACK_TEST_IDS = {\n errorState: 'error-state',\n errorStateRetry: 'error-state-retry',\n emptyListCta: 'empty-list-cta',\n loadingFallback: 'loading-fallback',\n pageSkeleton: 'page-skeleton',\n confirmDialog: 'confirm-dialog',\n confirmButton: 'confirm-button',\n cancelConfirmButton: 'cancel-confirm-button',\n notificationToast: 'notification-toast',\n} as const;\n","/**\n * ErrorState - generic error display with optional retry button.\n */\nimport React from 'react';\n\nimport { StyleSheet, Text, TouchableOpacity, View } from 'react-native';\n\nimport { useFeedbackUi } from '../context/FeedbackUiContext';\nimport { FEEDBACK_TEST_IDS } from '../constants';\n\n// ---------------------------------------------------------------------------\n// Constants\n// ---------------------------------------------------------------------------\n\nconst MESSAGE_FONT_SIZE = 16;\nconst CONTAINER_PADDING = 20;\nconst BUTTON_MARGIN_TOP = 12;\nconst BUTTON_PADDING_V = 8;\nconst BUTTON_PADDING_H = 16;\nconst BUTTON_BORDER_RADIUS = 6;\nconst BUTTON_FONT_SIZE = 14;\n\n// ---------------------------------------------------------------------------\n// Styles\n// ---------------------------------------------------------------------------\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n padding: CONTAINER_PADDING,\n },\n message: {\n fontSize: MESSAGE_FONT_SIZE,\n textAlign: 'center',\n },\n retryButton: {\n marginTop: BUTTON_MARGIN_TOP,\n paddingVertical: BUTTON_PADDING_V,\n paddingHorizontal: BUTTON_PADDING_H,\n borderRadius: BUTTON_BORDER_RADIUS,\n },\n retryText: {\n fontSize: BUTTON_FONT_SIZE,\n fontWeight: '600',\n },\n});\n\n// ---------------------------------------------------------------------------\n// Props\n// ---------------------------------------------------------------------------\n\nexport interface ErrorStateProps {\n message: string;\n onRetry?: () => void;\n testID?: string;\n}\n\n// ---------------------------------------------------------------------------\n// Component\n// ---------------------------------------------------------------------------\n\nexport const ErrorState = ({\n message,\n onRetry,\n testID = FEEDBACK_TEST_IDS.errorState,\n}: ErrorStateProps): React.ReactElement => {\n const { theme, t } = useFeedbackUi();\n const errorColor = theme.semantic.error['500'];\n const primary = theme.palette.primary['500'];\n\n return (\n <View style={styles.container} testID={testID}>\n <Text style={[styles.message, { color: errorColor }]}>{message}</Text>\n {typeof onRetry === 'function' ? (\n <TouchableOpacity\n accessibilityHint={t('common.retryHint')}\n accessibilityLabel={t('common.retry')}\n accessibilityRole=\"button\"\n style={[styles.retryButton, { backgroundColor: primary }]}\n testID={FEEDBACK_TEST_IDS.errorStateRetry}\n onPress={onRetry}\n >\n <Text style={[styles.retryText, { color: theme.colors.surfaceElevated }]}>\n {t('common.retry')}\n </Text>\n </TouchableOpacity>\n ) : null}\n </View>\n );\n};\n\nexport default ErrorState;\n","/**\n * EmptyListState - empty-collection message with an optional call-to-action.\n *\n * The CTA navigates via the `navigate` callback supplied through FeedbackUiProvider\n * (the host app adapts its router, e.g. expo-router's `router.push`).\n */\nimport React, { useCallback } from 'react';\n\nimport { StyleSheet, Text, TouchableOpacity, View } from 'react-native';\n\nimport { useFeedbackUi } from '../context/FeedbackUiContext';\nimport { FEEDBACK_TEST_IDS } from '../constants';\n\nconst MESSAGE_FONT_SIZE = 16;\nconst CTA_MARGIN_TOP = 16;\nconst CTA_PADDING_VERTICAL = 10;\nconst CTA_PADDING_HORIZONTAL = 20;\nconst CTA_BORDER_RADIUS = 8;\nconst CTA_FONT_SIZE = 14;\nconst CONTAINER_PADDING = 32;\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n padding: CONTAINER_PADDING,\n },\n message: {\n fontSize: MESSAGE_FONT_SIZE,\n textAlign: 'center',\n },\n ctaButton: {\n marginTop: CTA_MARGIN_TOP,\n paddingVertical: CTA_PADDING_VERTICAL,\n paddingHorizontal: CTA_PADDING_HORIZONTAL,\n borderRadius: CTA_BORDER_RADIUS,\n },\n ctaText: {\n fontSize: CTA_FONT_SIZE,\n fontWeight: '600',\n },\n});\n\nexport interface EmptyListStateProps {\n messageKey: string;\n ctaTextKey?: string;\n ctaHintKey?: string;\n ctaRoute?: string;\n testID: string;\n}\n\nexport const EmptyListState = ({\n messageKey,\n ctaTextKey,\n ctaHintKey,\n ctaRoute,\n testID,\n}: EmptyListStateProps): React.ReactElement => {\n const { theme, t, navigate } = useFeedbackUi();\n const { colors } = theme;\n const primary = theme.palette.primary['500'];\n\n const handlePress = useCallback((): void => {\n if (typeof ctaRoute === 'string' && typeof navigate === 'function') navigate(ctaRoute);\n }, [navigate, ctaRoute]);\n\n const showCta = typeof ctaTextKey === 'string'\n && typeof ctaHintKey === 'string'\n && typeof ctaRoute === 'string';\n\n return (\n <View style={styles.container} testID={testID}>\n <Text style={[styles.message, { color: colors.textSecondary }]}>\n {t(messageKey)}\n </Text>\n {showCta ? (\n <TouchableOpacity\n accessibilityHint={t(ctaHintKey as string)}\n accessibilityLabel={t(ctaTextKey as string)}\n accessibilityRole=\"button\"\n style={[styles.ctaButton, { backgroundColor: primary }]}\n testID={FEEDBACK_TEST_IDS.emptyListCta}\n onPress={handlePress}\n >\n <Text style={[styles.ctaText, { color: colors.background }]}>\n {t(ctaTextKey as string)}\n </Text>\n </TouchableOpacity>\n ) : null}\n </View>\n );\n};\n\nexport default EmptyListState;\n","/**\n * LoadingFallback - lightweight loading indicator for lazy-loaded components.\n *\n * Used with React.lazy() and Suspense to show a loading state while heavy\n * components are loading. Optimized for minimal bundle impact.\n */\nimport React from 'react';\n\nimport { ActivityIndicator, StyleSheet, View } from 'react-native';\n\nimport { useFeedbackUi } from '../context/FeedbackUiContext';\nimport { FEEDBACK_TEST_IDS } from '../constants';\n\nconst FULLSCREEN_MIN_HEIGHT = 300;\nconst CONTAINER_MIN_HEIGHT = 100;\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n minHeight: CONTAINER_MIN_HEIGHT,\n },\n fullScreen: {\n minHeight: FULLSCREEN_MIN_HEIGHT,\n },\n});\n\nexport interface LoadingFallbackProps {\n /** Show as full-screen loader (default: false) */\n fullScreen?: boolean;\n /** Custom size for the spinner */\n size?: 'small' | 'large';\n}\n\nexport const LoadingFallback: React.FC<LoadingFallbackProps> = ({ fullScreen = false, size = 'large' }) => {\n const { theme, t } = useFeedbackUi();\n const colors = theme.colors;\n const primary = theme.palette.primary['500'];\n\n return (\n <View\n accessibilityHint={t('loadingFallback.hint')}\n accessibilityLabel={t('loadingFallback.label')}\n accessibilityRole=\"progressbar\"\n style={[styles.container, fullScreen && styles.fullScreen, { backgroundColor: colors.background }]}\n testID={FEEDBACK_TEST_IDS.loadingFallback}\n >\n <ActivityIndicator color={primary} size={size} />\n </View>\n );\n};\n\nexport default LoadingFallback;\n","/**\n * PageSkeleton - shimmer skeleton loader for full pages.\n *\n * Improves perceived performance (Speed Index) by showing immediate visual\n * feedback while page content loads.\n */\nimport React from 'react';\n\nimport { Animated, Easing, Platform, StyleSheet, View } from 'react-native';\n\nimport { useFeedbackUi } from '../context/FeedbackUiContext';\nimport { FEEDBACK_TEST_IDS } from '../constants';\n\nconst ANIMATION_DURATION_MS = 1200;\nconst SKELETON_BORDER_RADIUS = 4;\nconst SKELETON_OPACITY_START = 0.3;\nconst SKELETON_OPACITY_END = 0.7;\nconst DEFAULT_ROWS = 5;\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n padding: 16,\n },\n header: {\n height: 32,\n borderRadius: SKELETON_BORDER_RADIUS,\n marginBottom: 24,\n width: '60%',\n },\n row: {\n flexDirection: 'row',\n marginBottom: 16,\n },\n avatar: {\n width: 48,\n height: 48,\n borderRadius: 24,\n marginRight: 12,\n },\n textContainer: {\n flex: 1,\n justifyContent: 'center',\n },\n textLine: {\n height: 16,\n borderRadius: SKELETON_BORDER_RADIUS,\n marginBottom: 8,\n },\n textLineShort: {\n width: '70%',\n },\n textLineFull: {\n width: '100%',\n },\n card: {\n height: 120,\n borderRadius: 8,\n marginBottom: 16,\n },\n});\n\nexport interface PageSkeletonProps {\n /** Number of skeleton rows to show */\n rows?: number;\n /** Show header skeleton */\n showHeader?: boolean;\n /** Show card skeletons instead of rows */\n variant?: 'list' | 'cards';\n}\n\nexport const PageSkeleton: React.FC<PageSkeletonProps> = ({\n rows = DEFAULT_ROWS,\n showHeader = true,\n variant = 'list',\n}) => {\n const { theme, t } = useFeedbackUi();\n const colors = theme.colors;\n\n const animatedValue = React.useRef(new Animated.Value(0)).current;\n\n React.useEffect(() => {\n const animation = Animated.loop(\n Animated.sequence([\n Animated.timing(animatedValue, {\n toValue: 1,\n duration: ANIMATION_DURATION_MS,\n easing: Easing.inOut(Easing.ease),\n useNativeDriver: Platform.OS !== 'web',\n }),\n Animated.timing(animatedValue, {\n toValue: 0,\n duration: ANIMATION_DURATION_MS,\n easing: Easing.inOut(Easing.ease),\n useNativeDriver: Platform.OS !== 'web',\n }),\n ]),\n );\n animation.start();\n return () => animation.stop();\n }, [animatedValue]);\n\n const opacity = animatedValue.interpolate({\n inputRange: [0, 1],\n outputRange: [SKELETON_OPACITY_START, SKELETON_OPACITY_END],\n });\n\n const skeletonColor = String(colors.border);\n\n const renderListRow = (index: number): React.ReactElement => (\n <View key={index} style={styles.row}>\n <Animated.View style={[styles.avatar, { backgroundColor: skeletonColor, opacity }]} />\n <View style={styles.textContainer}>\n <Animated.View style={[styles.textLine, styles.textLineFull, { backgroundColor: skeletonColor, opacity }]} />\n <Animated.View style={[styles.textLine, styles.textLineShort, { backgroundColor: skeletonColor, opacity }]} />\n </View>\n </View>\n );\n\n const renderCard = (index: number): React.ReactElement => (\n <Animated.View key={index} style={[styles.card, { backgroundColor: skeletonColor, opacity }]} />\n );\n\n const rowElements = Array.from({ length: rows }, (_, i) => (variant === 'cards' ? renderCard(i) : renderListRow(i)));\n\n return (\n <View\n accessibilityHint={t('pageSkeleton.loadingHint')}\n accessibilityLabel={t('pageSkeleton.loadingLabel')}\n accessibilityState={{ busy: true }}\n style={[styles.container, { backgroundColor: colors.background }]}\n testID={FEEDBACK_TEST_IDS.pageSkeleton}\n >\n {showHeader ? <Animated.View style={[styles.header, { backgroundColor: skeletonColor, opacity }]} /> : null}\n {rowElements}\n </View>\n );\n};\n\nexport default PageSkeleton;\n","/**\n * ConfirmDialog - modal confirm/cancel dialog with optional destructive + loading states.\n */\nimport React, { useMemo } from 'react';\n\nimport {\n ActivityIndicator,\n Modal,\n StyleSheet,\n Text,\n TouchableOpacity,\n View,\n} from 'react-native';\n\nimport { useFeedbackUi } from '../context/FeedbackUiContext';\nimport { DISABLED_OPACITY, MODAL_OVERLAY_COLOR, FEEDBACK_TEST_IDS } from '../constants';\n\nconst DIALOG_MAX_WIDTH = 400;\n\nconst styles = StyleSheet.create({\n overlay: {\n flex: 1,\n backgroundColor: MODAL_OVERLAY_COLOR,\n justifyContent: 'center',\n alignItems: 'center',\n padding: 20,\n },\n dialog: {\n width: '100%',\n maxWidth: DIALOG_MAX_WIDTH,\n borderRadius: 12,\n padding: 20,\n boxShadow: '0px 2px 8px rgba(0, 0, 0, 0.25)',\n elevation: 5,\n },\n title: {\n fontSize: 18,\n fontWeight: '600',\n marginBottom: 12,\n },\n message: {\n fontSize: 14,\n lineHeight: 20,\n marginBottom: 20,\n },\n buttonRow: {\n flexDirection: 'row',\n justifyContent: 'flex-end',\n gap: 12,\n },\n button: {\n paddingVertical: 10,\n paddingHorizontal: 20,\n borderRadius: 6,\n minWidth: 80,\n alignItems: 'center',\n justifyContent: 'center',\n },\n cancelButton: {\n borderWidth: 1,\n },\n confirmButton: {},\n buttonText: {\n fontSize: 14,\n fontWeight: '600',\n },\n disabledButton: {\n opacity: DISABLED_OPACITY,\n },\n});\n\nexport interface ConfirmDialogProps {\n visible: boolean;\n title: string;\n message: string;\n onConfirm: () => void;\n onCancel: () => void;\n confirmLabel?: string;\n cancelLabel?: string;\n confirmDisabled?: boolean;\n loading?: boolean;\n destructive?: boolean;\n}\n\nexport const ConfirmDialog = ({\n visible,\n title,\n message,\n onConfirm,\n onCancel,\n confirmLabel,\n cancelLabel,\n confirmDisabled = false,\n loading = false,\n destructive = false,\n}: ConfirmDialogProps): React.ReactElement | null => {\n const { theme, t } = useFeedbackUi();\n\n const colorStyles = useMemo(\n () => ({\n dialog: { backgroundColor: theme.colors.surfaceElevated },\n title: { color: theme.colors.text },\n message: { color: theme.colors.textSecondary },\n cancelButton: { borderColor: theme.colors.border },\n cancelButtonText: { color: theme.colors.text },\n confirmButton: {\n backgroundColor: destructive ? theme.semantic.error['500'] : theme.palette.primary['500'],\n },\n confirmButtonText: { color: theme.colors.surfaceElevated },\n }),\n [theme, destructive]\n );\n\n const resolvedConfirmLabel = confirmLabel ?? t('common.confirm');\n const resolvedCancelLabel = cancelLabel ?? t('common.cancel');\n\n const isConfirmDisabled = confirmDisabled || loading;\n\n if (!visible)\n return null;\n\n return (\n <Modal\n transparent\n animationType=\"fade\"\n visible={visible}\n onRequestClose={onCancel}\n >\n <View style={styles.overlay} testID={FEEDBACK_TEST_IDS.confirmDialog}>\n <View\n accessibilityViewIsModal\n aria-label={title}\n role=\"dialog\"\n style={[styles.dialog, colorStyles.dialog]}\n >\n <Text style={[styles.title, colorStyles.title]}>{title}</Text>\n <Text style={[styles.message, colorStyles.message]}>{message}</Text>\n\n <View style={styles.buttonRow}>\n <TouchableOpacity\n accessibilityHint={t('common.cancelHint')}\n accessibilityLabel={resolvedCancelLabel}\n accessibilityRole=\"button\"\n style={[\n styles.button,\n styles.cancelButton,\n colorStyles.cancelButton,\n ]}\n testID={FEEDBACK_TEST_IDS.cancelConfirmButton}\n onPress={onCancel}\n >\n <Text style={[styles.buttonText, colorStyles.cancelButtonText]}>\n {resolvedCancelLabel}\n </Text>\n </TouchableOpacity>\n\n <TouchableOpacity\n accessibilityHint={t('common.confirmHint')}\n accessibilityLabel={resolvedConfirmLabel}\n accessibilityRole=\"button\"\n accessibilityState={{ disabled: isConfirmDisabled }}\n disabled={isConfirmDisabled}\n style={[\n styles.button,\n styles.confirmButton,\n colorStyles.confirmButton,\n isConfirmDisabled && styles.disabledButton,\n ]}\n testID={FEEDBACK_TEST_IDS.confirmButton}\n onPress={onConfirm}\n >\n {loading ? (\n <ActivityIndicator\n color={theme.colors.surfaceElevated}\n size=\"small\"\n testID=\"confirm-loading\"\n />\n ) : (\n <Text\n style={[styles.buttonText, colorStyles.confirmButtonText]}\n >\n {resolvedConfirmLabel}\n </Text>\n )}\n </TouchableOpacity>\n </View>\n </View>\n </View>\n </Modal>\n );\n};\n\nexport default ConfirmDialog;\n","/**\n * ToastHost — the shared, tokenized transient-toast overlay promoted from the\n * byte-identical erevna-web / katalogos-web `ToastContainer` twins.\n *\n * The RENDERING (animated fade-in/out, positioning, theming) lives here; the\n * EMIT pipeline stays in the app (its event bus / `@dloizides/bff-web-client`\n * toast emitter). The app wires the two together via the `subscribe` port: a\n * function that registers a push callback and returns an unsubscribe. Colours\n * come from the UiProvider theme (`useUi`) — nothing hardcoded.\n */\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport { Animated, Platform, StyleSheet, Text, View } from 'react-native';\n\nimport { useFeedbackUi } from '../context/FeedbackUiContext';\nimport { FEEDBACK_TEST_IDS } from '../constants';\n\n// --- Defaults (ported from the twins) ---------------------------------------\nconst DEFAULT_DURATION_MS = 3000;\nconst DEFAULT_FADE_MS = 200;\nconst DEFAULT_MAX_LENGTH = 500;\n\nconst TOAST_TOP_WEB = 10;\nconst TOAST_TOP_MOBILE = 40;\nconst TOAST_HORIZONTAL_MARGIN = 10;\nconst TOAST_Z_INDEX = 9999;\nconst TOAST_INITIAL_TRANSLATE_Y = -6;\nconst TOAST_MAX_WIDTH = 600;\nconst TOAST_PADDING_HORIZONTAL = 16;\nconst TOAST_PADDING_VERTICAL = 10;\nconst TOAST_BORDER_RADIUS = 8;\nconst TOAST_MARGIN_VERTICAL = 6;\n\n// Character-range bounds for the display sanitizer.\nconst C0_CONTROL_END = 0x1f;\nconst C1_CONTROL_START = 0x7f;\nconst C1_CONTROL_END = 0x9f;\nconst ZERO_WIDTH_START = 0x200b;\nconst ZERO_WIDTH_END = 0x200f;\nconst BYTE_ORDER_MARK = 0xfeff;\n\nexport type ToastType = 'success' | 'info' | 'error';\n\n/** What the app pushes through the `subscribe` port. */\nexport interface ToastInput {\n text: string;\n type?: ToastType;\n}\n\ninterface ToastMessage extends ToastInput {\n id: string;\n}\n\ninterface ToastColors {\n primary: string;\n success: string;\n error: string;\n text: string;\n}\n\nconst styles = StyleSheet.create({\n container: {\n position: 'absolute',\n top: Platform.OS === 'web' ? TOAST_TOP_WEB : TOAST_TOP_MOBILE,\n left: TOAST_HORIZONTAL_MARGIN,\n right: TOAST_HORIZONTAL_MARGIN,\n alignItems: 'center',\n zIndex: TOAST_Z_INDEX,\n pointerEvents: 'box-none',\n },\n toast: {\n paddingHorizontal: TOAST_PADDING_HORIZONTAL,\n paddingVertical: TOAST_PADDING_VERTICAL,\n borderRadius: TOAST_BORDER_RADIUS,\n marginVertical: TOAST_MARGIN_VERTICAL,\n minWidth: '40%',\n maxWidth: TOAST_MAX_WIDTH,\n boxShadow: '0px 2px 4px rgba(0, 0, 0, 0.2)',\n elevation: 4,\n },\n text: {},\n});\n\n/** Truncate + strip control / zero-width characters before display. */\nfunction sanitizeToastText(input: string, maxLength: number): string {\n let stripped = '';\n for (const ch of input) {\n const code = ch.codePointAt(0) ?? 0;\n const isControl = code <= C0_CONTROL_END || (code >= C1_CONTROL_START && code <= C1_CONTROL_END);\n const isHidden = (code >= ZERO_WIDTH_START && code <= ZERO_WIDTH_END) || code === BYTE_ORDER_MARK;\n if (!isControl && !isHidden) stripped += ch;\n }\n return stripped.length > maxLength ? stripped.slice(0, maxLength) : stripped;\n}\n\ninterface ToastItemProps {\n message: ToastMessage;\n onDone: (id: string) => void;\n colors: ToastColors;\n durationMs: number;\n fadeMs: number;\n testID: string;\n}\n\nconst ToastItem = ({ message, onDone, colors, durationMs, fadeMs, testID }: ToastItemProps): React.ReactElement => {\n const opacityRef = useRef(new Animated.Value(0));\n const translateYRef = useRef(new Animated.Value(TOAST_INITIAL_TRANSLATE_Y));\n const opacity = opacityRef.current;\n const translateY = translateYRef.current;\n\n const backgroundColor = useMemo((): string => {\n if (message.type === 'success') return colors.success;\n if (message.type === 'error') return colors.error;\n return colors.primary;\n }, [colors.error, colors.primary, colors.success, message.type]);\n\n const handleDone = useCallback((): void => {\n onDone(message.id);\n }, [message.id, onDone]);\n\n useEffect(() => {\n const useNative = Platform.OS !== 'web';\n Animated.parallel([\n Animated.timing(opacity, { toValue: 1, duration: fadeMs, useNativeDriver: useNative }),\n Animated.timing(translateY, { toValue: 0, duration: fadeMs, useNativeDriver: useNative }),\n ]).start();\n\n const hideTimer = setTimeout(() => {\n Animated.parallel([\n Animated.timing(opacity, { toValue: 0, duration: fadeMs, useNativeDriver: useNative }),\n Animated.timing(translateY, { toValue: TOAST_INITIAL_TRANSLATE_Y, duration: fadeMs, useNativeDriver: useNative }),\n ]).start(handleDone);\n }, durationMs);\n\n return () => clearTimeout(hideTimer);\n }, [handleDone, opacity, translateY, durationMs, fadeMs]);\n\n return (\n <Animated.View\n style={[styles.toast, { backgroundColor, transform: [{ translateY }], opacity }]}\n testID={testID}\n >\n <Text style={[styles.text, { color: colors.text }]}>{message.text}</Text>\n </Animated.View>\n );\n};\n\nexport interface ToastHostProps {\n /**\n * Register a push callback; return an unsubscribe. The app adapts its own\n * event bus (e.g. `@dloizides/bff-web-client`'s toast emitter) to this port.\n */\n subscribe: (push: (toast: ToastInput) => void) => () => void;\n /** How long each toast stays before fading (ms). Default 3000. */\n durationMs?: number;\n /** Fade in/out animation duration (ms). Default 200. */\n fadeMs?: number;\n /** Max message length before truncation. Default 500. */\n maxLength?: number;\n /** testID for each toast (defaults to `notification-toast`). */\n toastTestID?: string;\n}\n\nlet toastSeq = 0;\nfunction nextId(): string {\n toastSeq += 1;\n return `${String(Date.now())}-${String(toastSeq)}`;\n}\n\nexport const ToastHost = ({\n subscribe,\n durationMs = DEFAULT_DURATION_MS,\n fadeMs = DEFAULT_FADE_MS,\n maxLength = DEFAULT_MAX_LENGTH,\n toastTestID = FEEDBACK_TEST_IDS.notificationToast,\n}: ToastHostProps): React.ReactElement | null => {\n const [messages, setMessages] = useState<ToastMessage[]>([]);\n const { theme } = useFeedbackUi();\n\n const colors = useMemo<ToastColors>(\n () => ({\n primary: theme.palette.primary['500'],\n success: (theme.semantic.success ?? theme.semantic.error)['500'],\n error: theme.semantic.error['500'],\n text: theme.colors.surfaceElevated,\n }),\n [theme],\n );\n\n const push = useCallback(\n (toast: ToastInput): void => {\n setMessages((s) => [...s, { id: nextId(), type: toast.type, text: sanitizeToastText(toast.text, maxLength) }]);\n },\n [maxLength],\n );\n\n const remove = useCallback((id: string): void => {\n setMessages((s) => s.filter((x) => x.id !== id));\n }, []);\n\n useEffect(() => subscribe(push), [subscribe, push]);\n\n if (messages.length === 0) return null;\n\n return (\n <View style={styles.container}>\n {messages.map((m) => (\n <ToastItem\n key={m.id}\n colors={colors}\n durationMs={durationMs}\n fadeMs={fadeMs}\n message={m}\n testID={toastTestID}\n onDone={remove}\n />\n ))}\n </View>\n );\n};\n\nexport default ToastHost;\n"]}
|
package/package.json
CHANGED
|
@@ -1,106 +1,107 @@
|
|
|
1
|
-
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@dloizides/ui-feedback",
|
|
3
|
+
"version": "1.3.1",
|
|
4
|
+
"description": "Themable, brand-agnostic React Native (RN-web) feedback components — ErrorState, EmptyListState, LoadingFallback, PageSkeleton, ConfirmDialog — wired through a small injectable theme/translate provider. Part of the dloizides.com shared UI kit.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"react",
|
|
7
|
+
"react-native",
|
|
8
|
+
"react-native-web",
|
|
9
|
+
"ui",
|
|
10
|
+
"feedback",
|
|
11
|
+
"modal",
|
|
12
|
+
"skeleton",
|
|
13
|
+
"dloizides"
|
|
14
|
+
],
|
|
15
|
+
"author": "dloizides",
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "https://github.com/openmindednewby/ui-feedback.git"
|
|
20
|
+
},
|
|
21
|
+
"homepage": "https://github.com/openmindednewby/ui-feedback#readme",
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/openmindednewby/ui-feedback/issues"
|
|
24
|
+
},
|
|
25
|
+
"main": "./dist/index.js",
|
|
26
|
+
"module": "./dist/index.mjs",
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
28
|
+
"exports": {
|
|
29
|
+
".": {
|
|
30
|
+
"react-native": {
|
|
31
|
+
"types": "./dist/index.d.ts",
|
|
32
|
+
"default": "./dist/index.js"
|
|
33
|
+
},
|
|
34
|
+
"browser": {
|
|
35
|
+
"types": "./dist/index.d.ts",
|
|
36
|
+
"default": "./dist/index.js"
|
|
37
|
+
},
|
|
38
|
+
"require": {
|
|
39
|
+
"types": "./dist/index.d.ts",
|
|
40
|
+
"default": "./dist/index.js"
|
|
41
|
+
},
|
|
42
|
+
"import": {
|
|
43
|
+
"types": "./dist/index.d.mts",
|
|
44
|
+
"default": "./dist/index.mjs"
|
|
45
|
+
},
|
|
46
|
+
"default": {
|
|
47
|
+
"types": "./dist/index.d.ts",
|
|
48
|
+
"default": "./dist/index.js"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"files": [
|
|
53
|
+
"dist",
|
|
54
|
+
"README.md",
|
|
55
|
+
"CHANGELOG.md"
|
|
56
|
+
],
|
|
57
|
+
"sideEffects": false,
|
|
58
|
+
"engines": {
|
|
59
|
+
"node": ">=18.0.0"
|
|
60
|
+
},
|
|
61
|
+
"scripts": {
|
|
62
|
+
"build": "rimraf dist && tsup",
|
|
63
|
+
"build:watch": "tsup --watch",
|
|
64
|
+
"test": "jest",
|
|
65
|
+
"test:watch": "jest --watch",
|
|
66
|
+
"test:coverage": "jest --coverage",
|
|
67
|
+
"lint": "eslint src --ext .ts,.tsx",
|
|
68
|
+
"lint:fix": "eslint src --ext .ts,.tsx --fix",
|
|
69
|
+
"typecheck": "tsc --noEmit",
|
|
70
|
+
"clean": "rimraf dist",
|
|
71
|
+
"security:audit": "npm audit --audit-level=high",
|
|
72
|
+
"deps:outdated": "npm outdated || exit 0",
|
|
73
|
+
"deps:unused": "npx depcheck --ignores \"@types/jest,@types/node,@types/react,@types/react-dom,rimraf,react-native\"",
|
|
74
|
+
"deps:licenses": "npx license-checker --onlyAllow \"MIT;Apache-2.0;ISC;BSD-2-Clause;BSD-3-Clause;0BSD;Unlicense;CC0-1.0\"",
|
|
75
|
+
"deps:health": "npm run deps:outdated && npm run deps:unused",
|
|
76
|
+
"prepublishOnly": "npm run clean && npm run build && npm run test",
|
|
77
|
+
"version": "npm run build"
|
|
78
|
+
},
|
|
79
|
+
"peerDependencies": {
|
|
80
|
+
"react": ">=18.0.0",
|
|
81
|
+
"react-native": ">=0.74.0"
|
|
82
|
+
},
|
|
83
|
+
"devDependencies": {
|
|
84
|
+
"@testing-library/dom": "^10.4.0",
|
|
85
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
86
|
+
"@testing-library/react": "^16.1.0",
|
|
87
|
+
"@types/jest": "^29.5.0",
|
|
88
|
+
"@types/node": "^20.19.32",
|
|
89
|
+
"@types/react": "^19.0.0",
|
|
90
|
+
"@types/react-dom": "^19.0.0",
|
|
91
|
+
"@typescript-eslint/eslint-plugin": "^7.0.0",
|
|
92
|
+
"@typescript-eslint/parser": "^7.0.0",
|
|
93
|
+
"eslint": "^8.57.0",
|
|
94
|
+
"eslint-plugin-react": "^7.34.0",
|
|
95
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
96
|
+
"jest": "^29.7.0",
|
|
97
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
98
|
+
"react": "^19.2.4",
|
|
99
|
+
"react-dom": "^19.2.4",
|
|
100
|
+
"react-native": "0.81.5",
|
|
101
|
+
"react-native-web": "^0.21.0",
|
|
102
|
+
"rimraf": "^5.0.0",
|
|
103
|
+
"ts-jest": "^29.1.0",
|
|
104
|
+
"tsup": "^8.0.0",
|
|
105
|
+
"typescript": "^5.4.0"
|
|
106
|
+
}
|
|
107
|
+
}
|