@dloizides/ui-feedback 1.15.1 → 1.15.2

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 CHANGED
@@ -1,209 +1,215 @@
1
- # Changelog
2
-
3
- ## 1.15.1
4
-
5
- - **ErrorState retry and secondary buttons now have a 44px minimum height** (`MIN_TOUCH_TARGET`),
6
- content centred. Padding alone rendered them 34px tall, below the mobile-first hit-box standard
7
- (JOBS-LIVE-1 "Live job updates").
8
-
9
- ## 1.15.0
10
-
11
- - **New `ProgressBar`** (promoted from aml-v2 `JobProgressBar`, RUPEP-5 "Upload a RuPEP file from the
12
- Jobs tab"): determinate fill clamped to 0-100 (`clampPercent`, also exported) with an optional
13
- right-aligned caption, or an indeterminate scanning bar. `role="progressbar"` with
14
- `aria-valuemin/max/now/text` (`aria-valuenow` omitted and `aria-busy` set when indeterminate).
15
- Colours default to the UiProvider theme (`palette.primary.500`, `colors.border`,
16
- `colors.textSecondary`) and accept overrides. Default testID `progress-bar`, fill `<testID>-fill`.
17
-
18
- ## 1.14.0
19
-
20
- - **`ToastHost` portals to `document.body` on web (`position: fixed`, `Z_INDEX.toast`).** In-tree,
21
- the layer sat inside RN-web Views that each carry `position: relative; z-index: 0`, so its 10100
22
- was trapped and an open `ConfirmDialog` / RN `Modal` (9999, body-level) painted over the toast
23
- (measured on ui.dloizides.com/feedback: `elementFromPoint` at the toast centre returned the
24
- dialog). Same mechanism as `ui-forms` `menuPortal` and `ui-tables` `SizeDropdown`. Native is
25
- unchanged (in-tree). `react-dom` is now an optional peer dependency.
26
-
27
- ## 1.13.0
28
-
29
- Overlay stacking now comes from the shared `@dloizides/design-tokens` `Z_INDEX` scale
30
- (added as a dependency, `^1.13.0`) instead of local literals.
31
-
32
- - **`ToastHost` layer: 9999 -> `Z_INDEX.toast` (10100).** A toast now paints above an open
33
- portalled menu (`Z_INDEX.popover`, 10000) and above an RN-web `Modal` (9999). At 9999 an open
34
- dropdown covered the toast. Pinned by a `ToastHost.test.tsx` case that reads the computed
35
- `z-index` of the toast layer.
36
- - **`WarmingOverlay`: literal 100000 -> `Z_INDEX.blocking`.** Same value, so nothing changes visually.
37
-
38
- ## 1.12.0
39
-
40
- Opt-in additions to `ErrorState` for full-screen error surfaces (an import-error or
41
- load-error screen that needs a heading, an icon and a way out other than retry). Every
42
- prop is optional: a caller passing none of them renders the same element tree as 1.11.0,
43
- pinned by `ErrorState.test.tsx` baseline snapshots recorded before the change.
44
-
45
- - **Add `title?: string`** — rendered above the message with `accessibilityRole="header"`
46
- (`role="heading"` on web), testID `${testID}-title`. When a title is present the message
47
- uses `theme.colors.textSecondary` instead of the error colour.
48
- - **Add `icon?: React.ReactNode`** — rendered inside a circular well tinted with
49
- `theme.semantic.error['500']` at low opacity; the well is `aria-hidden`, testID `${testID}-icon`.
50
- - **Add `secondaryAction?: ErrorStateAction`** (`{ label, hint, onPress, testID }`) — an
51
- outline button (`theme.colors.border`) laid out in a row beside retry.
52
- - **Export type `ErrorStateAction`.** No new colour literals; no new dependencies.
53
-
54
- ## 1.11.0
55
-
56
- Adopts `@dloizides/ui-motion` for `PageSkeleton`: the loader now shows a moving
57
- **shimmer** (a highlight band sweeping across each block) instead of an opacity pulse,
58
- so loading states read as modern/ant-design-like. There is now ONE shimmer
59
- implementation in the kit — the ui-motion `<Skeleton>` primitive — and `PageSkeleton`
60
- owns only the page LAYOUT (how many bars/blocks, their sizes and spacing).
61
-
62
- - **Add runtime dependency `@dloizides/ui-motion` (`^1.0.1`).**
63
- - **`PageSkeleton` internals reimplemented on ui-motion `<Skeleton>`.** Each placeholder
64
- block (header bar, list-row avatar + text lines, card) is now a `<Skeleton>` with the
65
- same `width`/`height`/`borderRadius`/base colour it had before. The bespoke
66
- `Animated.loop` opacity pulse (and its `Animated`/`Easing`/`Platform` imports) is gone.
67
- - **Reduced-motion is now handled by `<Skeleton>`** (via `@dloizides/rn-web-hooks`
68
- `useReducedMotion`): the sweep is suppressed and a static block is shown.
69
- - **Public API unchanged.** `PageSkeletonProps` (`rows`, `showHeader`, `variant`), the
70
- rendered layout, and the `page-skeleton` testID are identical to 1.9.0. Only the
71
- internal animated primitive was swapped.
72
- - `ToastHost` (fade+slide) is intentionally left as-is — it remains the reference
73
- enter/exit pattern.
74
-
75
- ## 1.7.0
76
-
77
- Closes the API gap that kept `kefi-web`, `erevna-web` and `katalogos-web` on their
78
- local `ErrorBoundary` copies. Those three vary the boundary **by error class** — a
79
- stale-chunk failure after a deploy needs different wording, no retry button, and no
80
- stack dump — which 1.6.0's static `labels` / boolean `showDetails` could not express.
81
- Every addition is opt-in; the pre-1.7.0 test suite passes unmodified.
82
-
83
- **The kit still does not know what a "chunk" is.** Apps inject the classification;
84
- the boundary only learns *whether retry is meaningful* and *what to say*.
85
-
86
- - **Add `retryable?: (error) => boolean`.** When it returns `false` the retry action is
87
- not rendered at all. Offering a button that re-renders straight back into the same
88
- missing chunk is worse than offering nothing. Default: every error is retryable
89
- (1.6.0 behaviour).
90
- - **Add `labelsFor?: (error) => Partial<ErrorBoundaryLabels>`,** merged OVER the static
91
- `labels`. Lets an app say "Update available" for a stale chunk without the kit knowing
92
- why — it sees only the resulting strings.
93
- - **Widen `showDetails` to `boolean | ((error) => boolean)`.** A predicate can suppress
94
- the dev-only block per error class (a hashed filename is noise, not signal). **A plain
95
- boolean behaves exactly as before.**
96
- - **Add `onMount?: () => void`,** called from `componentDidMount` ONLY when the mount was
97
- clean. The three apps release their one-shot reload guard here: a clean mount proves the
98
- current chunks loaded, so a FUTURE deploy may auto-recover again. Deliberately not called
99
- on an errored mount — that would re-arm the guard during the very failure it bounds.
100
- - **Add `reloadIsPrimary?: boolean`** (default `false`). Gives Reload the filled emphasis
101
- and the first position instead of Try Again.
102
-
103
- **Why a flag rather than an unconditional swap:** `agora-web` and `zygos-web` both pass
104
- `onReload`, so simply inverting the priority would have silently restyled and reordered
105
- their error screens too. They have no chunk-recovery path, so retry is still the right
106
- primary there. The default preserves their rendering exactly; the three chunk-aware apps
107
- opt in.
108
-
109
- **Notably, `DEFAULT_ERROR_BOUNDARY_LABELS` gains no `updateTitle`/`updateMessage`.** Those
110
- are domain vocabulary — "an update is available" is a fact about the app's deploy model, not
111
- about error boundaries. `labelsFor` supplies them as ordinary `title`/`message` overrides,
112
- which keeps the kit's label bag domain-free.
113
-
114
- ### Fixed
115
-
116
- - **`AppErrorBoundary.test.tsx` had never actually run.** `jest.setup.ts` imports
117
- `@testing-library/jest-dom`, which registers matchers at runtime, but `tsconfig.test.json`
118
- listed no `types`, so ts-jest failed every `toBeInTheDocument()` with TS2339 and aborted the
119
- whole suite at compile time. It was the only suite using those matchers, so `npm test`
120
- reported a red SUITE while the other five stayed green and the true test count read 34.
121
- Adding `"types": ["jest", "node", "@testing-library/jest-dom"]` brings its 14 assertions
122
- online for the first time — unmodified, and passing against the 1.7.0 source.
123
-
124
- ## 1.6.0
125
-
126
- Two fleet-wide duplicates extracted (W1.2 + W1.3). Both are purely additive — every
127
- existing export is unchanged.
128
-
129
- - **Add `createToastBus()` — the shared toast EMIT half (W1.2).** Promoted from the three
130
- hand-rolled ~25-line twins in `aml-v2` (`components/toast.ts` — `emitToast`/`subscribeToasts`),
131
- `agora-web` and `zygos-web` (`lib/toastBus.ts` — `toastSuccess`/`toastError`). The returned
132
- bus is a superset: `subscribe` (the `<ToastHost>` port), `emit(text, type?)`, and the
133
- `success`/`error`/`info` shorthands.
134
-
135
- **Deliberately framework-agnostic — no React import, no hook, no provider.** Call sites are
136
- React Query mutation `onSuccess`/`onError` callbacks with no component context in scope, so a
137
- hook-based API would break every one of them. It carries no styling: `<ToastHost>` themes each
138
- toast from `UiProvider`. Text passed in is already localized by the caller.
139
-
140
- New exports: `createToastBus`, `ToastBus`, `ToastPush`.
141
-
142
- - **Add `<AppErrorBoundary>` — the shared top-level error boundary (W1.3).** Promoted from the
143
- SIX app-local copies (`agora-web` + `zygos-web` byte-identical, `kefi-web`, `erevna-web`,
144
- `katalogos-web`, `ichnos-web`); `aml-v2` had none at all. The axes that actually varied are now
145
- injected rather than baked in: `onError` (Sentry/logger), `recover` (the apps' chunk-load
146
- retry), `showDetails` (dev-only error text), `labels` (pre-localized bag), `testIDPrefix`,
147
- and `fallback` (escape hatch). An optional `onReload` renders the manual **Reload** action
148
- that kefi/erevna/katalogos shipped alongside **Try Again**.
149
-
150
- Two behaviour fixes come with the extraction:
151
- - **Themed.** The fallback renders through the shared `<ErrorState>`, so it reads
152
- `UiProvider` colours — this removes the 40+ hardcoded Bootstrap-4 hex literals
153
- (`#f8f9fa`, `#212529`, `#6c757d`, `#fff3cd`, `#856404`, `#007bff`, …) three copies carried.
154
- - **Announced.** The fallback ships `role="alert"` + `accessibilityLiveRegion="assertive"`;
155
- none of the six announced anything to a screen reader, and agora/zygos rendered only the
156
- app *name* with no message and no retry.
157
-
158
- New exports: `AppErrorBoundary`, `AppErrorBoundaryProps`, `ErrorFallbackState`,
159
- `ErrorBoundaryLabels`, `DEFAULT_ERROR_BOUNDARY_LABELS`, plus the `errorBoundary` id in
160
- `FEEDBACK_TEST_IDS` (default prefix `error-boundary`, preserving the existing
161
- `error-boundary-retry-button` / `-reload-button` / `-updating` Playwright selectors).
162
-
163
- ## 1.5.0
164
-
165
- - **Accessibility (WCAG 2.1 AA) — `ToastHost` announcements.** Each toast is now a live region so
166
- a screen reader announces it (WCAG 4.1.3): success/info toasts render as `role="status"` with
167
- `aria-live="polite"`, error toasts escalate to `role="alert"` with `aria-live="assertive"`
168
- (`accessibilityLiveRegion` set for native parity). Rendering, timing and testIDs are unchanged —
169
- additive + backward-compatible.
170
-
171
- ## 1.3.0
172
-
173
- - Add `ToastHost` — the shared, tokenized transient-toast overlay promoted from the
174
- byte-identical erevna-web / katalogos-web `ToastContainer` twins. Rendering (animated
175
- fade, positioning, theming) lives here; the emit pipeline stays in the app and is wired
176
- in via the `subscribe` port (`(push) => unsubscribe`). Colours come from the UiProvider
177
- theme. New exports: `ToastHost`, `ToastHostProps`, `ToastInput`, `ToastType`, plus the
178
- `notificationToast` id in `FEEDBACK_TEST_IDS` (default toast testID `notification-toast`,
179
- preserving existing Playwright selectors).
180
-
181
- ## 1.2.0
182
-
183
- - Broaden the injected theme so the settings-hub kit can consume it: colour scales are now
184
- addressable at any step (`[step]`), and `palette`/`semantic` accept named scales beyond
185
- `primary`/`error` (e.g. `secondary`, `accent`, `success`, `warning`, `info`) via index signatures.
186
- Purely additive — existing `{primary}`/`{error}` themes still satisfy the types. Default value now
187
- includes the common extra scales so no-provider rendering never reads `undefined`.
188
-
189
- ## 1.1.0
190
-
191
- - Add `colors.surface` to the injected theme (needed by the ui-forms kit; apps already pass it).
192
- - Export neutral aliases `UiProvider` / `useUi` (+ `Ui*` types) for the feedback-specific
193
- `FeedbackUiProvider` / `useFeedbackUi`. ui-feedback is now the shared UI context for the kit;
194
- sibling packages (ui-forms, ui-tables, …) consume `useUi` instead of duplicating the provider.
195
-
196
- ## 1.0.2
197
-
198
- - `useFeedbackUi` now falls back to a neutral default theme + identity translate when no
199
- `FeedbackUiProvider` is mounted (graceful degradation), instead of throwing. Apps still
200
- mount a provider for the real theme/i18n; isolated tests render without one.
201
-
202
- ## 1.0.0
203
-
204
- Initial release. Extracted the proven duplicated feedback components from erevna-web ↔
205
- katalogos-web (Capability Wave C1, batch 1).
206
-
207
- - `FeedbackUiProvider` + `useFeedbackUi` — injectable theme/translate/navigate context.
208
- - `ErrorState`, `EmptyListState`, `LoadingFallback`, `PageSkeleton`, `ConfirmDialog`.
209
- - `FEEDBACK_TEST_IDS`, `MODAL_OVERLAY_COLOR`, `DISABLED_OPACITY` constants.
1
+ # Changelog
2
+
3
+ ## 1.15.2
4
+
5
+ - **ErrorState buttons take the kit hit-target floor from `@dloizides/a11y`** (`MIN_TOUCH_TARGET_PX`,
6
+ 48px) instead of a local 44px constant, matching `ui-buttons`. `@dloizides/a11y` is now a dependency
7
+ (JOBS-LIVE-1 "Live job updates").
8
+
9
+ ## 1.15.1
10
+
11
+ - **ErrorState retry and secondary buttons now have a 44px minimum height** (`MIN_TOUCH_TARGET`),
12
+ content centred. Padding alone rendered them 34px tall, below the mobile-first hit-box standard
13
+ (JOBS-LIVE-1 "Live job updates").
14
+
15
+ ## 1.15.0
16
+
17
+ - **New `ProgressBar`** (promoted from aml-v2 `JobProgressBar`, RUPEP-5 "Upload a RuPEP file from the
18
+ Jobs tab"): determinate fill clamped to 0-100 (`clampPercent`, also exported) with an optional
19
+ right-aligned caption, or an indeterminate scanning bar. `role="progressbar"` with
20
+ `aria-valuemin/max/now/text` (`aria-valuenow` omitted and `aria-busy` set when indeterminate).
21
+ Colours default to the UiProvider theme (`palette.primary.500`, `colors.border`,
22
+ `colors.textSecondary`) and accept overrides. Default testID `progress-bar`, fill `<testID>-fill`.
23
+
24
+ ## 1.14.0
25
+
26
+ - **`ToastHost` portals to `document.body` on web (`position: fixed`, `Z_INDEX.toast`).** In-tree,
27
+ the layer sat inside RN-web Views that each carry `position: relative; z-index: 0`, so its 10100
28
+ was trapped and an open `ConfirmDialog` / RN `Modal` (9999, body-level) painted over the toast
29
+ (measured on ui.dloizides.com/feedback: `elementFromPoint` at the toast centre returned the
30
+ dialog). Same mechanism as `ui-forms` `menuPortal` and `ui-tables` `SizeDropdown`. Native is
31
+ unchanged (in-tree). `react-dom` is now an optional peer dependency.
32
+
33
+ ## 1.13.0
34
+
35
+ Overlay stacking now comes from the shared `@dloizides/design-tokens` `Z_INDEX` scale
36
+ (added as a dependency, `^1.13.0`) instead of local literals.
37
+
38
+ - **`ToastHost` layer: 9999 -> `Z_INDEX.toast` (10100).** A toast now paints above an open
39
+ portalled menu (`Z_INDEX.popover`, 10000) and above an RN-web `Modal` (9999). At 9999 an open
40
+ dropdown covered the toast. Pinned by a `ToastHost.test.tsx` case that reads the computed
41
+ `z-index` of the toast layer.
42
+ - **`WarmingOverlay`: literal 100000 -> `Z_INDEX.blocking`.** Same value, so nothing changes visually.
43
+
44
+ ## 1.12.0
45
+
46
+ Opt-in additions to `ErrorState` for full-screen error surfaces (an import-error or
47
+ load-error screen that needs a heading, an icon and a way out other than retry). Every
48
+ prop is optional: a caller passing none of them renders the same element tree as 1.11.0,
49
+ pinned by `ErrorState.test.tsx` baseline snapshots recorded before the change.
50
+
51
+ - **Add `title?: string`** — rendered above the message with `accessibilityRole="header"`
52
+ (`role="heading"` on web), testID `${testID}-title`. When a title is present the message
53
+ uses `theme.colors.textSecondary` instead of the error colour.
54
+ - **Add `icon?: React.ReactNode`** — rendered inside a circular well tinted with
55
+ `theme.semantic.error['500']` at low opacity; the well is `aria-hidden`, testID `${testID}-icon`.
56
+ - **Add `secondaryAction?: ErrorStateAction`** (`{ label, hint, onPress, testID }`) — an
57
+ outline button (`theme.colors.border`) laid out in a row beside retry.
58
+ - **Export type `ErrorStateAction`.** No new colour literals; no new dependencies.
59
+
60
+ ## 1.11.0
61
+
62
+ Adopts `@dloizides/ui-motion` for `PageSkeleton`: the loader now shows a moving
63
+ **shimmer** (a highlight band sweeping across each block) instead of an opacity pulse,
64
+ so loading states read as modern/ant-design-like. There is now ONE shimmer
65
+ implementation in the kit — the ui-motion `<Skeleton>` primitive — and `PageSkeleton`
66
+ owns only the page LAYOUT (how many bars/blocks, their sizes and spacing).
67
+
68
+ - **Add runtime dependency `@dloizides/ui-motion` (`^1.0.1`).**
69
+ - **`PageSkeleton` internals reimplemented on ui-motion `<Skeleton>`.** Each placeholder
70
+ block (header bar, list-row avatar + text lines, card) is now a `<Skeleton>` with the
71
+ same `width`/`height`/`borderRadius`/base colour it had before. The bespoke
72
+ `Animated.loop` opacity pulse (and its `Animated`/`Easing`/`Platform` imports) is gone.
73
+ - **Reduced-motion is now handled by `<Skeleton>`** (via `@dloizides/rn-web-hooks`
74
+ `useReducedMotion`): the sweep is suppressed and a static block is shown.
75
+ - **Public API unchanged.** `PageSkeletonProps` (`rows`, `showHeader`, `variant`), the
76
+ rendered layout, and the `page-skeleton` testID are identical to 1.9.0. Only the
77
+ internal animated primitive was swapped.
78
+ - `ToastHost` (fade+slide) is intentionally left as-is — it remains the reference
79
+ enter/exit pattern.
80
+
81
+ ## 1.7.0
82
+
83
+ Closes the API gap that kept `kefi-web`, `erevna-web` and `katalogos-web` on their
84
+ local `ErrorBoundary` copies. Those three vary the boundary **by error class** — a
85
+ stale-chunk failure after a deploy needs different wording, no retry button, and no
86
+ stack dump — which 1.6.0's static `labels` / boolean `showDetails` could not express.
87
+ Every addition is opt-in; the pre-1.7.0 test suite passes unmodified.
88
+
89
+ **The kit still does not know what a "chunk" is.** Apps inject the classification;
90
+ the boundary only learns *whether retry is meaningful* and *what to say*.
91
+
92
+ - **Add `retryable?: (error) => boolean`.** When it returns `false` the retry action is
93
+ not rendered at all. Offering a button that re-renders straight back into the same
94
+ missing chunk is worse than offering nothing. Default: every error is retryable
95
+ (1.6.0 behaviour).
96
+ - **Add `labelsFor?: (error) => Partial<ErrorBoundaryLabels>`,** merged OVER the static
97
+ `labels`. Lets an app say "Update available" for a stale chunk without the kit knowing
98
+ why — it sees only the resulting strings.
99
+ - **Widen `showDetails` to `boolean | ((error) => boolean)`.** A predicate can suppress
100
+ the dev-only block per error class (a hashed filename is noise, not signal). **A plain
101
+ boolean behaves exactly as before.**
102
+ - **Add `onMount?: () => void`,** called from `componentDidMount` ONLY when the mount was
103
+ clean. The three apps release their one-shot reload guard here: a clean mount proves the
104
+ current chunks loaded, so a FUTURE deploy may auto-recover again. Deliberately not called
105
+ on an errored mount — that would re-arm the guard during the very failure it bounds.
106
+ - **Add `reloadIsPrimary?: boolean`** (default `false`). Gives Reload the filled emphasis
107
+ and the first position instead of Try Again.
108
+
109
+ **Why a flag rather than an unconditional swap:** `agora-web` and `zygos-web` both pass
110
+ `onReload`, so simply inverting the priority would have silently restyled and reordered
111
+ their error screens too. They have no chunk-recovery path, so retry is still the right
112
+ primary there. The default preserves their rendering exactly; the three chunk-aware apps
113
+ opt in.
114
+
115
+ **Notably, `DEFAULT_ERROR_BOUNDARY_LABELS` gains no `updateTitle`/`updateMessage`.** Those
116
+ are domain vocabulary — "an update is available" is a fact about the app's deploy model, not
117
+ about error boundaries. `labelsFor` supplies them as ordinary `title`/`message` overrides,
118
+ which keeps the kit's label bag domain-free.
119
+
120
+ ### Fixed
121
+
122
+ - **`AppErrorBoundary.test.tsx` had never actually run.** `jest.setup.ts` imports
123
+ `@testing-library/jest-dom`, which registers matchers at runtime, but `tsconfig.test.json`
124
+ listed no `types`, so ts-jest failed every `toBeInTheDocument()` with TS2339 and aborted the
125
+ whole suite at compile time. It was the only suite using those matchers, so `npm test`
126
+ reported a red SUITE while the other five stayed green and the true test count read 34.
127
+ Adding `"types": ["jest", "node", "@testing-library/jest-dom"]` brings its 14 assertions
128
+ online for the first time — unmodified, and passing against the 1.7.0 source.
129
+
130
+ ## 1.6.0
131
+
132
+ Two fleet-wide duplicates extracted (W1.2 + W1.3). Both are purely additive — every
133
+ existing export is unchanged.
134
+
135
+ - **Add `createToastBus()` — the shared toast EMIT half (W1.2).** Promoted from the three
136
+ hand-rolled ~25-line twins in `aml-v2` (`components/toast.ts` — `emitToast`/`subscribeToasts`),
137
+ `agora-web` and `zygos-web` (`lib/toastBus.ts` — `toastSuccess`/`toastError`). The returned
138
+ bus is a superset: `subscribe` (the `<ToastHost>` port), `emit(text, type?)`, and the
139
+ `success`/`error`/`info` shorthands.
140
+
141
+ **Deliberately framework-agnostic — no React import, no hook, no provider.** Call sites are
142
+ React Query mutation `onSuccess`/`onError` callbacks with no component context in scope, so a
143
+ hook-based API would break every one of them. It carries no styling: `<ToastHost>` themes each
144
+ toast from `UiProvider`. Text passed in is already localized by the caller.
145
+
146
+ New exports: `createToastBus`, `ToastBus`, `ToastPush`.
147
+
148
+ - **Add `<AppErrorBoundary>` — the shared top-level error boundary (W1.3).** Promoted from the
149
+ SIX app-local copies (`agora-web` + `zygos-web` byte-identical, `kefi-web`, `erevna-web`,
150
+ `katalogos-web`, `ichnos-web`); `aml-v2` had none at all. The axes that actually varied are now
151
+ injected rather than baked in: `onError` (Sentry/logger), `recover` (the apps' chunk-load
152
+ retry), `showDetails` (dev-only error text), `labels` (pre-localized bag), `testIDPrefix`,
153
+ and `fallback` (escape hatch). An optional `onReload` renders the manual **Reload** action
154
+ that kefi/erevna/katalogos shipped alongside **Try Again**.
155
+
156
+ Two behaviour fixes come with the extraction:
157
+ - **Themed.** The fallback renders through the shared `<ErrorState>`, so it reads
158
+ `UiProvider` colours — this removes the 40+ hardcoded Bootstrap-4 hex literals
159
+ (`#f8f9fa`, `#212529`, `#6c757d`, `#fff3cd`, `#856404`, `#007bff`, …) three copies carried.
160
+ - **Announced.** The fallback ships `role="alert"` + `accessibilityLiveRegion="assertive"`;
161
+ none of the six announced anything to a screen reader, and agora/zygos rendered only the
162
+ app *name* with no message and no retry.
163
+
164
+ New exports: `AppErrorBoundary`, `AppErrorBoundaryProps`, `ErrorFallbackState`,
165
+ `ErrorBoundaryLabels`, `DEFAULT_ERROR_BOUNDARY_LABELS`, plus the `errorBoundary` id in
166
+ `FEEDBACK_TEST_IDS` (default prefix `error-boundary`, preserving the existing
167
+ `error-boundary-retry-button` / `-reload-button` / `-updating` Playwright selectors).
168
+
169
+ ## 1.5.0
170
+
171
+ - **Accessibility (WCAG 2.1 AA) — `ToastHost` announcements.** Each toast is now a live region so
172
+ a screen reader announces it (WCAG 4.1.3): success/info toasts render as `role="status"` with
173
+ `aria-live="polite"`, error toasts escalate to `role="alert"` with `aria-live="assertive"`
174
+ (`accessibilityLiveRegion` set for native parity). Rendering, timing and testIDs are unchanged —
175
+ additive + backward-compatible.
176
+
177
+ ## 1.3.0
178
+
179
+ - Add `ToastHost` — the shared, tokenized transient-toast overlay promoted from the
180
+ byte-identical erevna-web / katalogos-web `ToastContainer` twins. Rendering (animated
181
+ fade, positioning, theming) lives here; the emit pipeline stays in the app and is wired
182
+ in via the `subscribe` port (`(push) => unsubscribe`). Colours come from the UiProvider
183
+ theme. New exports: `ToastHost`, `ToastHostProps`, `ToastInput`, `ToastType`, plus the
184
+ `notificationToast` id in `FEEDBACK_TEST_IDS` (default toast testID `notification-toast`,
185
+ preserving existing Playwright selectors).
186
+
187
+ ## 1.2.0
188
+
189
+ - Broaden the injected theme so the settings-hub kit can consume it: colour scales are now
190
+ addressable at any step (`[step]`), and `palette`/`semantic` accept named scales beyond
191
+ `primary`/`error` (e.g. `secondary`, `accent`, `success`, `warning`, `info`) via index signatures.
192
+ Purely additive — existing `{primary}`/`{error}` themes still satisfy the types. Default value now
193
+ includes the common extra scales so no-provider rendering never reads `undefined`.
194
+
195
+ ## 1.1.0
196
+
197
+ - Add `colors.surface` to the injected theme (needed by the ui-forms kit; apps already pass it).
198
+ - Export neutral aliases `UiProvider` / `useUi` (+ `Ui*` types) for the feedback-specific
199
+ `FeedbackUiProvider` / `useFeedbackUi`. ui-feedback is now the shared UI context for the kit;
200
+ sibling packages (ui-forms, ui-tables, …) consume `useUi` instead of duplicating the provider.
201
+
202
+ ## 1.0.2
203
+
204
+ - `useFeedbackUi` now falls back to a neutral default theme + identity translate when no
205
+ `FeedbackUiProvider` is mounted (graceful degradation), instead of throwing. Apps still
206
+ mount a provider for the real theme/i18n; isolated tests render without one.
207
+
208
+ ## 1.0.0
209
+
210
+ Initial release. Extracted the proven duplicated feedback components from erevna-web ↔
211
+ katalogos-web (Capability Wave C1, batch 1).
212
+
213
+ - `FeedbackUiProvider` + `useFeedbackUi` — injectable theme/translate/navigate context.
214
+ - `ErrorState`, `EmptyListState`, `LoadingFallback`, `PageSkeleton`, `ConfirmDialog`.
215
+ - `FEEDBACK_TEST_IDS`, `MODAL_OVERLAY_COLOR`, `DISABLED_OPACITY` constants.
package/dist/index.js CHANGED
@@ -3,6 +3,7 @@
3
3
  var react = require('react');
4
4
  var jsxRuntime = require('react/jsx-runtime');
5
5
  var reactNative = require('react-native');
6
+ var a11y = require('@dloizides/a11y');
6
7
  var uiMotion = require('@dloizides/ui-motion');
7
8
  var reactDom = require('react-dom');
8
9
  var designTokens = require('@dloizides/design-tokens');
@@ -48,7 +49,6 @@ function useFeedbackUi() {
48
49
 
49
50
  // src/constants.ts
50
51
  var MODAL_OVERLAY_COLOR = "rgba(0, 0, 0, 0.5)";
51
- var MIN_TOUCH_TARGET = 44;
52
52
  var DISABLED_OPACITY = 0.5;
53
53
  var FEEDBACK_TEST_IDS = {
54
54
  errorState: "error-state",
@@ -88,7 +88,7 @@ var styles = reactNative.StyleSheet.create({
88
88
  opacity: WELL_TINT_OPACITY
89
89
  },
90
90
  secondaryButton: {
91
- minHeight: MIN_TOUCH_TARGET,
91
+ minHeight: a11y.MIN_TOUCH_TARGET_PX,
92
92
  justifyContent: "center",
93
93
  alignItems: "center",
94
94
  marginTop: BUTTON_MARGIN_TOP,
@@ -155,7 +155,7 @@ var styles2 = reactNative.StyleSheet.create({
155
155
  columnGap: ACTION_GAP
156
156
  },
157
157
  retryButton: {
158
- minHeight: MIN_TOUCH_TARGET,
158
+ minHeight: a11y.MIN_TOUCH_TARGET_PX,
159
159
  justifyContent: "center",
160
160
  alignItems: "center",
161
161
  marginTop: BUTTON_MARGIN_TOP2,