@dloizides/ui-feedback 1.8.0 → 1.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,12 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var React3 = require('react');
3
+ var react = require('react');
4
4
  var jsxRuntime = require('react/jsx-runtime');
5
5
  var reactNative = require('react-native');
6
-
7
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
8
-
9
- var React3__default = /*#__PURE__*/_interopDefault(React3);
6
+ var uiMotion = require('@dloizides/ui-motion');
10
7
 
11
8
  // src/context/FeedbackUiContext.tsx
12
9
  var DEFAULT_FEEDBACK_VALUE = {
@@ -33,18 +30,18 @@ var DEFAULT_FEEDBACK_VALUE = {
33
30
  },
34
31
  t: (key) => key
35
32
  };
36
- var FeedbackUiContext = React3.createContext(DEFAULT_FEEDBACK_VALUE);
33
+ var FeedbackUiContext = react.createContext(DEFAULT_FEEDBACK_VALUE);
37
34
  var FeedbackUiProvider = ({
38
35
  theme,
39
36
  t,
40
37
  navigate,
41
38
  children
42
39
  }) => {
43
- const value = React3.useMemo(() => ({ theme, t, navigate }), [theme, t, navigate]);
40
+ const value = react.useMemo(() => ({ theme, t, navigate }), [theme, t, navigate]);
44
41
  return /* @__PURE__ */ jsxRuntime.jsx(FeedbackUiContext.Provider, { value, children });
45
42
  };
46
43
  function useFeedbackUi() {
47
- return React3.useContext(FeedbackUiContext);
44
+ return react.useContext(FeedbackUiContext);
48
45
  }
49
46
 
50
47
  // src/constants.ts
@@ -63,57 +60,146 @@ var FEEDBACK_TEST_IDS = {
63
60
  warmingOverlay: "warming-overlay",
64
61
  errorBoundary: "error-boundary"
65
62
  };
66
- var MESSAGE_FONT_SIZE = 16;
67
- var CONTAINER_PADDING = 20;
63
+ var WELL_SIZE = 56;
64
+ var WELL_MARGIN_BOTTOM = 16;
65
+ var WELL_TINT_OPACITY = 0.12;
68
66
  var BUTTON_MARGIN_TOP = 12;
69
67
  var BUTTON_PADDING_V = 8;
70
68
  var BUTTON_PADDING_H = 16;
71
69
  var BUTTON_BORDER_RADIUS = 6;
70
+ var BUTTON_BORDER_WIDTH = 1;
72
71
  var BUTTON_FONT_SIZE = 14;
73
72
  var styles = reactNative.StyleSheet.create({
73
+ well: {
74
+ width: WELL_SIZE,
75
+ height: WELL_SIZE,
76
+ borderRadius: WELL_SIZE / 2,
77
+ marginBottom: WELL_MARGIN_BOTTOM,
78
+ alignItems: "center",
79
+ justifyContent: "center",
80
+ overflow: "hidden"
81
+ },
82
+ wellTint: {
83
+ ...reactNative.StyleSheet.absoluteFillObject,
84
+ opacity: WELL_TINT_OPACITY
85
+ },
86
+ secondaryButton: {
87
+ marginTop: BUTTON_MARGIN_TOP,
88
+ paddingVertical: BUTTON_PADDING_V,
89
+ paddingHorizontal: BUTTON_PADDING_H,
90
+ borderRadius: BUTTON_BORDER_RADIUS,
91
+ borderWidth: BUTTON_BORDER_WIDTH
92
+ },
93
+ secondaryText: {
94
+ fontSize: BUTTON_FONT_SIZE,
95
+ fontWeight: "600"
96
+ }
97
+ });
98
+ var ErrorStateIconWell = ({ icon, tint, testID }) => /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { "aria-hidden": true, style: styles.well, testID, children: [
99
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles.wellTint, { backgroundColor: tint }] }),
100
+ icon
101
+ ] });
102
+ var ErrorStateSecondaryButton = ({
103
+ action,
104
+ theme
105
+ }) => /* @__PURE__ */ jsxRuntime.jsx(
106
+ reactNative.TouchableOpacity,
107
+ {
108
+ accessibilityHint: action.hint,
109
+ accessibilityLabel: action.label,
110
+ accessibilityRole: "button",
111
+ style: [styles.secondaryButton, { borderColor: theme.colors.border }],
112
+ testID: action.testID,
113
+ onPress: action.onPress,
114
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles.secondaryText, { color: theme.colors.text }], children: action.label })
115
+ }
116
+ );
117
+ var MESSAGE_FONT_SIZE = 16;
118
+ var CONTAINER_PADDING = 20;
119
+ var BUTTON_MARGIN_TOP2 = 12;
120
+ var BUTTON_PADDING_V2 = 8;
121
+ var BUTTON_PADDING_H2 = 16;
122
+ var BUTTON_BORDER_RADIUS2 = 6;
123
+ var BUTTON_FONT_SIZE2 = 14;
124
+ var TITLE_FONT_SIZE = 20;
125
+ var TITLE_MARGIN_BOTTOM = 8;
126
+ var ACTION_GAP = 12;
127
+ var styles2 = reactNative.StyleSheet.create({
74
128
  container: {
75
129
  flex: 1,
76
130
  justifyContent: "center",
77
131
  alignItems: "center",
78
132
  padding: CONTAINER_PADDING
79
133
  },
134
+ title: {
135
+ fontSize: TITLE_FONT_SIZE,
136
+ fontWeight: "600",
137
+ textAlign: "center",
138
+ marginBottom: TITLE_MARGIN_BOTTOM
139
+ },
80
140
  message: {
81
141
  fontSize: MESSAGE_FONT_SIZE,
82
142
  textAlign: "center"
83
143
  },
144
+ actions: {
145
+ flexDirection: "row",
146
+ flexWrap: "wrap",
147
+ justifyContent: "center",
148
+ columnGap: ACTION_GAP
149
+ },
84
150
  retryButton: {
85
- marginTop: BUTTON_MARGIN_TOP,
86
- paddingVertical: BUTTON_PADDING_V,
87
- paddingHorizontal: BUTTON_PADDING_H,
88
- borderRadius: BUTTON_BORDER_RADIUS
151
+ marginTop: BUTTON_MARGIN_TOP2,
152
+ paddingVertical: BUTTON_PADDING_V2,
153
+ paddingHorizontal: BUTTON_PADDING_H2,
154
+ borderRadius: BUTTON_BORDER_RADIUS2
89
155
  },
90
156
  retryText: {
91
- fontSize: BUTTON_FONT_SIZE,
157
+ fontSize: BUTTON_FONT_SIZE2,
92
158
  fontWeight: "600"
93
159
  }
94
160
  });
95
161
  var ErrorState = ({
96
162
  message,
97
163
  onRetry,
98
- testID = FEEDBACK_TEST_IDS.errorState
164
+ testID = FEEDBACK_TEST_IDS.errorState,
165
+ title,
166
+ icon,
167
+ secondaryAction
99
168
  }) => {
100
169
  const { theme, t } = useFeedbackUi();
101
170
  const errorColor = theme.semantic.error["500"];
102
171
  const primary = theme.palette.primary["500"];
103
- return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles.container, testID, children: [
104
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles.message, { color: errorColor }], children: message }),
105
- typeof onRetry === "function" ? /* @__PURE__ */ jsxRuntime.jsx(
106
- reactNative.TouchableOpacity,
172
+ const hasTitle = typeof title === "string" && title !== "";
173
+ const hasIcon = icon !== void 0 && icon !== null;
174
+ const messageColor = hasTitle ? theme.colors.textSecondary : errorColor;
175
+ const retry = typeof onRetry === "function" ? /* @__PURE__ */ jsxRuntime.jsx(
176
+ reactNative.TouchableOpacity,
177
+ {
178
+ accessibilityHint: t("common.retryHint"),
179
+ accessibilityLabel: t("common.retry"),
180
+ accessibilityRole: "button",
181
+ style: [styles2.retryButton, { backgroundColor: primary }],
182
+ testID: FEEDBACK_TEST_IDS.errorStateRetry,
183
+ onPress: onRetry,
184
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles2.retryText, { color: theme.colors.surfaceElevated }], children: t("common.retry") })
185
+ }
186
+ ) : null;
187
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles2.container, testID, children: [
188
+ hasIcon ? /* @__PURE__ */ jsxRuntime.jsx(ErrorStateIconWell, { icon, testID: `${testID}-icon`, tint: errorColor }) : null,
189
+ hasTitle ? /* @__PURE__ */ jsxRuntime.jsx(
190
+ reactNative.Text,
107
191
  {
108
- accessibilityHint: t("common.retryHint"),
109
- accessibilityLabel: t("common.retry"),
110
- accessibilityRole: "button",
111
- style: [styles.retryButton, { backgroundColor: primary }],
112
- testID: FEEDBACK_TEST_IDS.errorStateRetry,
113
- onPress: onRetry,
114
- children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles.retryText, { color: theme.colors.surfaceElevated }], children: t("common.retry") })
192
+ accessibilityRole: "header",
193
+ style: [styles2.title, { color: theme.colors.text }],
194
+ testID: `${testID}-title`,
195
+ children: title
115
196
  }
116
- ) : null
197
+ ) : null,
198
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles2.message, { color: messageColor }], children: message }),
199
+ secondaryAction === void 0 ? retry : /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles2.actions, children: [
200
+ retry,
201
+ /* @__PURE__ */ jsxRuntime.jsx(ErrorStateSecondaryButton, { action: secondaryAction, theme })
202
+ ] })
117
203
  ] });
118
204
  };
119
205
  var MESSAGE_FONT_SIZE2 = 16;
@@ -123,7 +209,7 @@ var CTA_PADDING_HORIZONTAL = 20;
123
209
  var CTA_BORDER_RADIUS = 8;
124
210
  var CTA_FONT_SIZE = 14;
125
211
  var CONTAINER_PADDING2 = 32;
126
- var styles2 = reactNative.StyleSheet.create({
212
+ var styles3 = reactNative.StyleSheet.create({
127
213
  container: {
128
214
  flex: 1,
129
215
  justifyContent: "center",
@@ -155,29 +241,29 @@ var EmptyListState = ({
155
241
  const { theme, t, navigate } = useFeedbackUi();
156
242
  const { colors } = theme;
157
243
  const primary = theme.palette.primary["500"];
158
- const handlePress = React3.useCallback(() => {
244
+ const handlePress = react.useCallback(() => {
159
245
  if (typeof ctaRoute === "string" && typeof navigate === "function") navigate(ctaRoute);
160
246
  }, [navigate, ctaRoute]);
161
247
  const showCta = typeof ctaTextKey === "string" && typeof ctaHintKey === "string" && typeof ctaRoute === "string";
162
- return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles2.container, testID, children: [
163
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles2.message, { color: colors.textSecondary }], children: t(messageKey) }),
248
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles3.container, testID, children: [
249
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles3.message, { color: colors.textSecondary }], children: t(messageKey) }),
164
250
  showCta ? /* @__PURE__ */ jsxRuntime.jsx(
165
251
  reactNative.TouchableOpacity,
166
252
  {
167
253
  accessibilityHint: t(ctaHintKey),
168
254
  accessibilityLabel: t(ctaTextKey),
169
255
  accessibilityRole: "button",
170
- style: [styles2.ctaButton, { backgroundColor: primary }],
256
+ style: [styles3.ctaButton, { backgroundColor: primary }],
171
257
  testID: FEEDBACK_TEST_IDS.emptyListCta,
172
258
  onPress: handlePress,
173
- children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles2.ctaText, { color: colors.background }], children: t(ctaTextKey) })
259
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles3.ctaText, { color: colors.background }], children: t(ctaTextKey) })
174
260
  }
175
261
  ) : null
176
262
  ] });
177
263
  };
178
264
  var FULLSCREEN_MIN_HEIGHT = 300;
179
265
  var CONTAINER_MIN_HEIGHT = 100;
180
- var styles3 = reactNative.StyleSheet.create({
266
+ var styles4 = reactNative.StyleSheet.create({
181
267
  container: {
182
268
  flex: 1,
183
269
  justifyContent: "center",
@@ -198,36 +284,36 @@ var LoadingFallback = ({ fullScreen = false, size = "large" }) => {
198
284
  accessibilityHint: t("loadingFallback.hint"),
199
285
  accessibilityLabel: t("loadingFallback.label"),
200
286
  accessibilityRole: "progressbar",
201
- style: [styles3.container, fullScreen && styles3.fullScreen, { backgroundColor: colors.background }],
287
+ style: [styles4.container, fullScreen && styles4.fullScreen, { backgroundColor: colors.background }],
202
288
  testID: FEEDBACK_TEST_IDS.loadingFallback,
203
289
  children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.ActivityIndicator, { color: primary, size })
204
290
  }
205
291
  );
206
292
  };
207
- var ANIMATION_DURATION_MS = 1200;
208
293
  var SKELETON_BORDER_RADIUS = 4;
209
- var SKELETON_OPACITY_START = 0.3;
210
- var SKELETON_OPACITY_END = 0.7;
294
+ var CARD_BORDER_RADIUS = 8;
211
295
  var DEFAULT_ROWS = 5;
212
- var styles4 = reactNative.StyleSheet.create({
296
+ var HEADER_HEIGHT = 32;
297
+ var HEADER_WIDTH = "60%";
298
+ var AVATAR_SIZE = 48;
299
+ var AVATAR_BORDER_RADIUS = 24;
300
+ var TEXT_LINE_HEIGHT = 16;
301
+ var TEXT_LINE_FULL_WIDTH = "100%";
302
+ var TEXT_LINE_SHORT_WIDTH = "70%";
303
+ var CARD_HEIGHT = 120;
304
+ var styles5 = reactNative.StyleSheet.create({
213
305
  container: {
214
306
  flex: 1,
215
307
  padding: 16
216
308
  },
217
309
  header: {
218
- height: 32,
219
- borderRadius: SKELETON_BORDER_RADIUS,
220
- marginBottom: 24,
221
- width: "60%"
310
+ marginBottom: 24
222
311
  },
223
312
  row: {
224
313
  flexDirection: "row",
225
314
  marginBottom: 16
226
315
  },
227
316
  avatar: {
228
- width: 48,
229
- height: 48,
230
- borderRadius: 24,
231
317
  marginRight: 12
232
318
  },
233
319
  textContainer: {
@@ -235,19 +321,9 @@ var styles4 = reactNative.StyleSheet.create({
235
321
  justifyContent: "center"
236
322
  },
237
323
  textLine: {
238
- height: 16,
239
- borderRadius: SKELETON_BORDER_RADIUS,
240
324
  marginBottom: 8
241
325
  },
242
- textLineShort: {
243
- width: "70%"
244
- },
245
- textLineFull: {
246
- width: "100%"
247
- },
248
326
  card: {
249
- height: 120,
250
- borderRadius: 8,
251
327
  marginBottom: 16
252
328
  }
253
329
  });
@@ -258,40 +334,51 @@ var PageSkeleton = ({
258
334
  }) => {
259
335
  const { theme, t } = useFeedbackUi();
260
336
  const colors = theme.colors;
261
- const animatedValue = React3__default.default.useRef(new reactNative.Animated.Value(0)).current;
262
- React3__default.default.useEffect(() => {
263
- const animation = reactNative.Animated.loop(
264
- reactNative.Animated.sequence([
265
- reactNative.Animated.timing(animatedValue, {
266
- toValue: 1,
267
- duration: ANIMATION_DURATION_MS,
268
- easing: reactNative.Easing.inOut(reactNative.Easing.ease),
269
- useNativeDriver: reactNative.Platform.OS !== "web"
270
- }),
271
- reactNative.Animated.timing(animatedValue, {
272
- toValue: 0,
273
- duration: ANIMATION_DURATION_MS,
274
- easing: reactNative.Easing.inOut(reactNative.Easing.ease),
275
- useNativeDriver: reactNative.Platform.OS !== "web"
276
- })
277
- ])
278
- );
279
- animation.start();
280
- return () => animation.stop();
281
- }, [animatedValue]);
282
- const opacity = animatedValue.interpolate({
283
- inputRange: [0, 1],
284
- outputRange: [SKELETON_OPACITY_START, SKELETON_OPACITY_END]
285
- });
286
337
  const skeletonColor = String(colors.border);
287
- const renderListRow = (index) => /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles4.row, children: [
288
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: [styles4.avatar, { backgroundColor: skeletonColor, opacity }] }),
289
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles4.textContainer, children: [
290
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: [styles4.textLine, styles4.textLineFull, { backgroundColor: skeletonColor, opacity }] }),
291
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: [styles4.textLine, styles4.textLineShort, { backgroundColor: skeletonColor, opacity }] })
338
+ const renderListRow = (index) => /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles5.row, children: [
339
+ /* @__PURE__ */ jsxRuntime.jsx(
340
+ uiMotion.Skeleton,
341
+ {
342
+ backgroundColor: skeletonColor,
343
+ borderRadius: AVATAR_BORDER_RADIUS,
344
+ height: AVATAR_SIZE,
345
+ style: styles5.avatar,
346
+ width: AVATAR_SIZE
347
+ }
348
+ ),
349
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles5.textContainer, children: [
350
+ /* @__PURE__ */ jsxRuntime.jsx(
351
+ uiMotion.Skeleton,
352
+ {
353
+ backgroundColor: skeletonColor,
354
+ borderRadius: SKELETON_BORDER_RADIUS,
355
+ height: TEXT_LINE_HEIGHT,
356
+ style: styles5.textLine,
357
+ width: TEXT_LINE_FULL_WIDTH
358
+ }
359
+ ),
360
+ /* @__PURE__ */ jsxRuntime.jsx(
361
+ uiMotion.Skeleton,
362
+ {
363
+ backgroundColor: skeletonColor,
364
+ borderRadius: SKELETON_BORDER_RADIUS,
365
+ height: TEXT_LINE_HEIGHT,
366
+ style: styles5.textLine,
367
+ width: TEXT_LINE_SHORT_WIDTH
368
+ }
369
+ )
292
370
  ] })
293
371
  ] }, index);
294
- const renderCard = (index) => /* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: [styles4.card, { backgroundColor: skeletonColor, opacity }] }, index);
372
+ const renderCard = (index) => /* @__PURE__ */ jsxRuntime.jsx(
373
+ uiMotion.Skeleton,
374
+ {
375
+ backgroundColor: skeletonColor,
376
+ borderRadius: CARD_BORDER_RADIUS,
377
+ height: CARD_HEIGHT,
378
+ style: styles5.card
379
+ },
380
+ index
381
+ );
295
382
  const rowElements = Array.from({ length: rows }, (_, i) => variant === "cards" ? renderCard(i) : renderListRow(i));
296
383
  return /* @__PURE__ */ jsxRuntime.jsxs(
297
384
  reactNative.View,
@@ -299,10 +386,19 @@ var PageSkeleton = ({
299
386
  accessibilityHint: t("pageSkeleton.loadingHint"),
300
387
  accessibilityLabel: t("pageSkeleton.loadingLabel"),
301
388
  accessibilityState: { busy: true },
302
- style: [styles4.container, { backgroundColor: colors.background }],
389
+ style: [styles5.container, { backgroundColor: colors.background }],
303
390
  testID: FEEDBACK_TEST_IDS.pageSkeleton,
304
391
  children: [
305
- showHeader ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: [styles4.header, { backgroundColor: skeletonColor, opacity }] }) : null,
392
+ showHeader ? /* @__PURE__ */ jsxRuntime.jsx(
393
+ uiMotion.Skeleton,
394
+ {
395
+ backgroundColor: skeletonColor,
396
+ borderRadius: SKELETON_BORDER_RADIUS,
397
+ height: HEADER_HEIGHT,
398
+ style: styles5.header,
399
+ width: HEADER_WIDTH
400
+ }
401
+ ) : null,
306
402
  rowElements
307
403
  ]
308
404
  }
@@ -324,7 +420,7 @@ var AsyncSurface = ({
324
420
  return children;
325
421
  };
326
422
  var DIALOG_MAX_WIDTH = 400;
327
- var styles5 = reactNative.StyleSheet.create({
423
+ var styles6 = reactNative.StyleSheet.create({
328
424
  overlay: {
329
425
  flex: 1,
330
426
  backgroundColor: MODAL_OVERLAY_COLOR,
@@ -388,7 +484,7 @@ var ConfirmDialog = ({
388
484
  destructive = false
389
485
  }) => {
390
486
  const { theme, t } = useFeedbackUi();
391
- const colorStyles = React3.useMemo(
487
+ const colorStyles = react.useMemo(
392
488
  () => ({
393
489
  dialog: { backgroundColor: theme.colors.surfaceElevated },
394
490
  title: { color: theme.colors.text },
@@ -414,17 +510,17 @@ var ConfirmDialog = ({
414
510
  animationType: "fade",
415
511
  visible,
416
512
  onRequestClose: onCancel,
417
- children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles5.overlay, testID: FEEDBACK_TEST_IDS.confirmDialog, children: /* @__PURE__ */ jsxRuntime.jsxs(
513
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles6.overlay, testID: FEEDBACK_TEST_IDS.confirmDialog, children: /* @__PURE__ */ jsxRuntime.jsxs(
418
514
  reactNative.View,
419
515
  {
420
516
  accessibilityViewIsModal: true,
421
517
  "aria-label": title,
422
518
  role: "dialog",
423
- style: [styles5.dialog, colorStyles.dialog],
519
+ style: [styles6.dialog, colorStyles.dialog],
424
520
  children: [
425
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles5.title, colorStyles.title], children: title }),
426
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles5.message, colorStyles.message], children: message }),
427
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles5.buttonRow, children: [
521
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles6.title, colorStyles.title], children: title }),
522
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles6.message, colorStyles.message], children: message }),
523
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles6.buttonRow, children: [
428
524
  /* @__PURE__ */ jsxRuntime.jsx(
429
525
  reactNative.TouchableOpacity,
430
526
  {
@@ -432,13 +528,13 @@ var ConfirmDialog = ({
432
528
  accessibilityLabel: resolvedCancelLabel,
433
529
  accessibilityRole: "button",
434
530
  style: [
435
- styles5.button,
436
- styles5.cancelButton,
531
+ styles6.button,
532
+ styles6.cancelButton,
437
533
  colorStyles.cancelButton
438
534
  ],
439
535
  testID: FEEDBACK_TEST_IDS.cancelConfirmButton,
440
536
  onPress: onCancel,
441
- children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles5.buttonText, colorStyles.cancelButtonText], children: resolvedCancelLabel })
537
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles6.buttonText, colorStyles.cancelButtonText], children: resolvedCancelLabel })
442
538
  }
443
539
  ),
444
540
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -450,10 +546,10 @@ var ConfirmDialog = ({
450
546
  accessibilityState: { disabled: isConfirmDisabled },
451
547
  disabled: isConfirmDisabled,
452
548
  style: [
453
- styles5.button,
454
- styles5.confirmButton,
549
+ styles6.button,
550
+ styles6.confirmButton,
455
551
  colorStyles.confirmButton,
456
- isConfirmDisabled && styles5.disabledButton
552
+ isConfirmDisabled && styles6.disabledButton
457
553
  ],
458
554
  testID: FEEDBACK_TEST_IDS.confirmButton,
459
555
  onPress: onConfirm,
@@ -467,7 +563,7 @@ var ConfirmDialog = ({
467
563
  ) : /* @__PURE__ */ jsxRuntime.jsx(
468
564
  reactNative.Text,
469
565
  {
470
- style: [styles5.buttonText, colorStyles.confirmButtonText],
566
+ style: [styles6.buttonText, colorStyles.confirmButtonText],
471
567
  children: resolvedConfirmLabel
472
568
  }
473
569
  )
@@ -499,7 +595,7 @@ var C1_CONTROL_END = 159;
499
595
  var ZERO_WIDTH_START = 8203;
500
596
  var ZERO_WIDTH_END = 8207;
501
597
  var BYTE_ORDER_MARK = 65279;
502
- var styles6 = reactNative.StyleSheet.create({
598
+ var styles7 = reactNative.StyleSheet.create({
503
599
  container: {
504
600
  position: "absolute",
505
601
  top: reactNative.Platform.OS === "web" ? TOAST_TOP_WEB : TOAST_TOP_MOBILE,
@@ -532,19 +628,19 @@ function sanitizeToastText(input, maxLength) {
532
628
  return stripped.length > maxLength ? stripped.slice(0, maxLength) : stripped;
533
629
  }
534
630
  var ToastItem = ({ message, onDone, colors, durationMs, fadeMs, testID }) => {
535
- const opacityRef = React3.useRef(new reactNative.Animated.Value(0));
536
- const translateYRef = React3.useRef(new reactNative.Animated.Value(TOAST_INITIAL_TRANSLATE_Y));
631
+ const opacityRef = react.useRef(new reactNative.Animated.Value(0));
632
+ const translateYRef = react.useRef(new reactNative.Animated.Value(TOAST_INITIAL_TRANSLATE_Y));
537
633
  const opacity = opacityRef.current;
538
634
  const translateY = translateYRef.current;
539
- const backgroundColor = React3.useMemo(() => {
635
+ const backgroundColor = react.useMemo(() => {
540
636
  if (message.type === "success") return colors.success;
541
637
  if (message.type === "error") return colors.error;
542
638
  return colors.primary;
543
639
  }, [colors.error, colors.primary, colors.success, message.type]);
544
- const handleDone = React3.useCallback(() => {
640
+ const handleDone = react.useCallback(() => {
545
641
  onDone(message.id);
546
642
  }, [message.id, onDone]);
547
- React3.useEffect(() => {
643
+ react.useEffect(() => {
548
644
  const useNative = reactNative.Platform.OS !== "web";
549
645
  reactNative.Animated.parallel([
550
646
  reactNative.Animated.timing(opacity, { toValue: 1, duration: fadeMs, useNativeDriver: useNative }),
@@ -564,9 +660,9 @@ var ToastItem = ({ message, onDone, colors, durationMs, fadeMs, testID }) => {
564
660
  {
565
661
  accessibilityLiveRegion: isError ? "assertive" : "polite",
566
662
  role: isError ? "alert" : "status",
567
- style: [styles6.toast, { backgroundColor, transform: [{ translateY }], opacity }],
663
+ style: [styles7.toast, { backgroundColor, transform: [{ translateY }], opacity }],
568
664
  testID,
569
- children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles6.text, { color: colors.text }], children: message.text })
665
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles7.text, { color: colors.text }], children: message.text })
570
666
  }
571
667
  );
572
668
  };
@@ -582,9 +678,9 @@ var ToastHost = ({
582
678
  maxLength = DEFAULT_MAX_LENGTH,
583
679
  toastTestID = FEEDBACK_TEST_IDS.notificationToast
584
680
  }) => {
585
- const [messages, setMessages] = React3.useState([]);
681
+ const [messages, setMessages] = react.useState([]);
586
682
  const { theme } = useFeedbackUi();
587
- const colors = React3.useMemo(
683
+ const colors = react.useMemo(
588
684
  () => ({
589
685
  primary: theme.palette.primary["500"],
590
686
  success: (theme.semantic.success ?? theme.semantic.error)["500"],
@@ -593,18 +689,18 @@ var ToastHost = ({
593
689
  }),
594
690
  [theme]
595
691
  );
596
- const push = React3.useCallback(
692
+ const push = react.useCallback(
597
693
  (toast) => {
598
694
  setMessages((s) => [...s, { id: nextId(), type: toast.type, text: sanitizeToastText(toast.text, maxLength) }]);
599
695
  },
600
696
  [maxLength]
601
697
  );
602
- const remove = React3.useCallback((id) => {
698
+ const remove = react.useCallback((id) => {
603
699
  setMessages((s) => s.filter((x) => x.id !== id));
604
700
  }, []);
605
- React3.useEffect(() => subscribe(push), [subscribe, push]);
701
+ react.useEffect(() => subscribe(push), [subscribe, push]);
606
702
  if (messages.length === 0) return null;
607
- return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles6.container, children: messages.map((m) => /* @__PURE__ */ jsxRuntime.jsx(
703
+ return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles7.container, children: messages.map((m) => /* @__PURE__ */ jsxRuntime.jsx(
608
704
  ToastItem,
609
705
  {
610
706
  colors,
@@ -675,12 +771,12 @@ function getWarmingSnapshot() {
675
771
  }
676
772
  var OVERLAY_Z_INDEX = 1e5;
677
773
  var CARD_GAP = 12;
678
- var TITLE_FONT_SIZE = 20;
774
+ var TITLE_FONT_SIZE2 = 20;
679
775
  var SUBTITLE_FONT_SIZE = 15;
680
776
  var ATTEMPT_FONT_SIZE = 13;
681
777
  var CARD_PADDING = 24;
682
778
  var NO_ATTEMPT = 0;
683
- var styles7 = reactNative.StyleSheet.create({
779
+ var styles8 = reactNative.StyleSheet.create({
684
780
  overlay: {
685
781
  position: "absolute",
686
782
  top: 0,
@@ -699,7 +795,7 @@ var styles7 = reactNative.StyleSheet.create({
699
795
  maxWidth: 320
700
796
  },
701
797
  title: {
702
- fontSize: TITLE_FONT_SIZE,
798
+ fontSize: TITLE_FONT_SIZE2,
703
799
  fontWeight: "700",
704
800
  textAlign: "center"
705
801
  },
@@ -725,7 +821,7 @@ var WarmingOverlay = ({
725
821
  showAttempt = false
726
822
  }) => {
727
823
  const ctx = useFeedbackUi();
728
- const snapshot2 = React3.useSyncExternalStore(subscribeWarming, getWarmingSnapshot, getWarmingSnapshot);
824
+ const snapshot2 = react.useSyncExternalStore(subscribeWarming, getWarmingSnapshot, getWarmingSnapshot);
729
825
  const theme = themeOverride ?? ctx.theme;
730
826
  const mergedLabels = { ...DEFAULT_WARMING_LABELS, ...labels };
731
827
  if (!snapshot2.isWarming) return null;
@@ -737,13 +833,13 @@ var WarmingOverlay = ({
737
833
  {
738
834
  accessibilityLabel: mergedLabels.accessibilityLabel,
739
835
  accessibilityRole: "alert",
740
- style: [styles7.overlay, { backgroundColor: colors.background }],
836
+ style: [styles8.overlay, { backgroundColor: colors.background }],
741
837
  testID: testIdPrefix,
742
- children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles7.card, children: [
838
+ children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles8.card, children: [
743
839
  /* @__PURE__ */ jsxRuntime.jsx(reactNative.ActivityIndicator, { color: primary, size: "large" }),
744
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles7.title, { color: colors.text }], testID: `${testIdPrefix}-title`, children: mergedLabels.title }),
745
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles7.subtitle, { color: colors.textSecondary }], testID: `${testIdPrefix}-subtitle`, children: mergedLabels.subtitle }),
746
- showHint ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles7.attempt, { color: colors.textSecondary }], testID: `${testIdPrefix}-attempt`, children: mergedLabels.attemptHint(snapshot2.attempt) }) : null
840
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles8.title, { color: colors.text }], testID: `${testIdPrefix}-title`, children: mergedLabels.title }),
841
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles8.subtitle, { color: colors.textSecondary }], testID: `${testIdPrefix}-subtitle`, children: mergedLabels.subtitle }),
842
+ showHint ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles8.attempt, { color: colors.textSecondary }], testID: `${testIdPrefix}-attempt`, children: mergedLabels.attemptHint(snapshot2.attempt) }) : null
747
843
  ] })
748
844
  }
749
845
  );
@@ -777,8 +873,8 @@ function createToastBus() {
777
873
  }
778
874
  var CONTAINER_PADDING3 = 20;
779
875
  var CONTENT_MAX_WIDTH = 400;
780
- var TITLE_FONT_SIZE2 = 24;
781
- var TITLE_MARGIN_BOTTOM = 12;
876
+ var TITLE_FONT_SIZE3 = 24;
877
+ var TITLE_MARGIN_BOTTOM2 = 12;
782
878
  var DETAILS_PADDING = 12;
783
879
  var DETAILS_BORDER_RADIUS = 8;
784
880
  var DETAILS_BORDER_WIDTH = 1;
@@ -786,12 +882,12 @@ var DETAILS_MARGIN_VERTICAL = 16;
786
882
  var DETAILS_TITLE_FONT_SIZE = 14;
787
883
  var DETAILS_TITLE_MARGIN_BOTTOM = 4;
788
884
  var DETAILS_TEXT_FONT_SIZE = 12;
789
- var BUTTON_PADDING_H2 = 24;
790
- var BUTTON_PADDING_V2 = 12;
791
- var BUTTON_BORDER_RADIUS2 = 8;
792
- var BUTTON_MARGIN_TOP2 = 12;
793
- var BUTTON_FONT_SIZE2 = 16;
794
- var styles8 = reactNative.StyleSheet.create({
885
+ var BUTTON_PADDING_H3 = 24;
886
+ var BUTTON_PADDING_V3 = 12;
887
+ var BUTTON_BORDER_RADIUS3 = 8;
888
+ var BUTTON_MARGIN_TOP3 = 12;
889
+ var BUTTON_FONT_SIZE3 = 16;
890
+ var styles9 = reactNative.StyleSheet.create({
795
891
  container: {
796
892
  flex: 1,
797
893
  justifyContent: "center",
@@ -803,9 +899,9 @@ var styles8 = reactNative.StyleSheet.create({
803
899
  alignItems: "center"
804
900
  },
805
901
  title: {
806
- fontSize: TITLE_FONT_SIZE2,
902
+ fontSize: TITLE_FONT_SIZE3,
807
903
  fontWeight: "bold",
808
- marginBottom: TITLE_MARGIN_BOTTOM,
904
+ marginBottom: TITLE_MARGIN_BOTTOM2,
809
905
  textAlign: "center"
810
906
  },
811
907
  details: {
@@ -825,13 +921,13 @@ var styles8 = reactNative.StyleSheet.create({
825
921
  fontFamily: "monospace"
826
922
  },
827
923
  button: {
828
- paddingHorizontal: BUTTON_PADDING_H2,
829
- paddingVertical: BUTTON_PADDING_V2,
830
- borderRadius: BUTTON_BORDER_RADIUS2,
831
- marginTop: BUTTON_MARGIN_TOP2
924
+ paddingHorizontal: BUTTON_PADDING_H3,
925
+ paddingVertical: BUTTON_PADDING_V3,
926
+ borderRadius: BUTTON_BORDER_RADIUS3,
927
+ marginTop: BUTTON_MARGIN_TOP3
832
928
  },
833
929
  buttonText: {
834
- fontSize: BUTTON_FONT_SIZE2,
930
+ fontSize: BUTTON_FONT_SIZE3,
835
931
  fontWeight: "600"
836
932
  }
837
933
  });
@@ -859,10 +955,10 @@ var ErrorBoundaryFallback = ({
859
955
  accessibilityHint: labels.tryAgainHint,
860
956
  accessibilityLabel: labels.tryAgain,
861
957
  accessibilityRole: "button",
862
- style: [styles8.button, reloadIsPrimary ? secondaryFill : primaryFill],
958
+ style: [styles9.button, reloadIsPrimary ? secondaryFill : primaryFill],
863
959
  testID: `${testIDPrefix}-retry-button`,
864
960
  onPress: onRetry,
865
- children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles8.buttonText, reloadIsPrimary ? secondaryInk : primaryInk], children: labels.tryAgain })
961
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles9.buttonText, reloadIsPrimary ? secondaryInk : primaryInk], children: labels.tryAgain })
866
962
  }
867
963
  ) : null;
868
964
  const reloadButton = typeof onReload === "function" ? /* @__PURE__ */ jsxRuntime.jsx(
@@ -871,10 +967,10 @@ var ErrorBoundaryFallback = ({
871
967
  accessibilityHint: labels.reloadHint,
872
968
  accessibilityLabel: labels.reload,
873
969
  accessibilityRole: "button",
874
- style: [styles8.button, reloadIsPrimary ? primaryFill : secondaryFill],
970
+ style: [styles9.button, reloadIsPrimary ? primaryFill : secondaryFill],
875
971
  testID: `${testIDPrefix}-reload-button`,
876
972
  onPress: onReload,
877
- children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles8.buttonText, reloadIsPrimary ? primaryInk : secondaryInk], children: labels.reload })
973
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles9.buttonText, reloadIsPrimary ? primaryInk : secondaryInk], children: labels.reload })
878
974
  }
879
975
  ) : null;
880
976
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -882,19 +978,19 @@ var ErrorBoundaryFallback = ({
882
978
  {
883
979
  accessibilityLiveRegion: "assertive",
884
980
  role: "alert",
885
- style: [styles8.container, { backgroundColor: theme.colors.background }],
981
+ style: [styles9.container, { backgroundColor: theme.colors.background }],
886
982
  testID: testIDPrefix,
887
- children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles8.content, children: [
888
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles8.title, { color: theme.colors.text }], children: labels.title }),
983
+ children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles9.content, children: [
984
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles9.title, { color: theme.colors.text }], children: labels.title }),
889
985
  /* @__PURE__ */ jsxRuntime.jsx(ErrorState, { message: labels.message, testID: `${testIDPrefix}-message` }),
890
986
  hasDetails ? /* @__PURE__ */ jsxRuntime.jsxs(
891
987
  reactNative.View,
892
988
  {
893
- style: [styles8.details, { backgroundColor: theme.colors.surface, borderColor: warningColor }],
989
+ style: [styles9.details, { backgroundColor: theme.colors.surface, borderColor: warningColor }],
894
990
  testID: `${testIDPrefix}-details`,
895
991
  children: [
896
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles8.detailsTitle, { color: warningColor }], children: labels.errorDetails }),
897
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles8.detailsText, { color: theme.colors.textSecondary }], children: error.message })
992
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles9.detailsTitle, { color: warningColor }], children: labels.errorDetails }),
993
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles9.detailsText, { color: theme.colors.textSecondary }], children: error.message })
898
994
  ]
899
995
  }
900
996
  ) : null,
@@ -907,7 +1003,7 @@ var ErrorBoundaryFallback = ({
907
1003
  var CONTAINER_PADDING4 = 20;
908
1004
  var MESSAGE_FONT_SIZE3 = 16;
909
1005
  var MESSAGE_MARGIN_TOP = 12;
910
- var styles9 = reactNative.StyleSheet.create({
1006
+ var styles10 = reactNative.StyleSheet.create({
911
1007
  container: {
912
1008
  flex: 1,
913
1009
  justifyContent: "center",
@@ -930,11 +1026,11 @@ var ErrorBoundaryRecovering = ({
930
1026
  {
931
1027
  accessibilityLiveRegion: "polite",
932
1028
  role: "status",
933
- style: [styles9.container, { backgroundColor: theme.colors.background }],
1029
+ style: [styles10.container, { backgroundColor: theme.colors.background }],
934
1030
  testID,
935
1031
  children: [
936
1032
  /* @__PURE__ */ jsxRuntime.jsx(reactNative.ActivityIndicator, { color: theme.palette.primary["500"], size: "large" }),
937
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles9.message, { color: theme.colors.textSecondary }], children: message })
1033
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles10.message, { color: theme.colors.textSecondary }], children: message })
938
1034
  ]
939
1035
  }
940
1036
  );
@@ -966,7 +1062,7 @@ function resolveRetryable(retryable, error) {
966
1062
  return retryable(error);
967
1063
  }
968
1064
  var INITIAL_STATE = { hasError: false, error: null, recovering: false };
969
- var AppErrorBoundary = class extends React3.Component {
1065
+ var AppErrorBoundary = class extends react.Component {
970
1066
  constructor(props) {
971
1067
  super(props);
972
1068
  this.handleRetry = () => {