@entifix/react-controls 0.19.0 → 0.20.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/README.md +8 -0
- package/dist/i18n/catalog/en.d.ts.map +1 -1
- package/dist/i18n/catalog/en.js +55 -9
- package/dist/i18n/catalog/en.js.map +1 -1
- package/dist/i18n/catalog/es.d.ts +64 -5
- package/dist/i18n/catalog/es.d.ts.map +1 -1
- package/dist/i18n/catalog/es.js +61 -9
- package/dist/i18n/catalog/es.js.map +1 -1
- package/dist/i18n/catalog/index.d.ts +102 -10
- package/dist/i18n/catalog/index.d.ts.map +1 -1
- package/dist/i18n/entity-labels.d.ts +14 -0
- package/dist/i18n/entity-labels.d.ts.map +1 -1
- package/dist/i18n/entity-labels.js +15 -0
- package/dist/i18n/entity-labels.js.map +1 -1
- package/dist/i18n/i18n-context.js +2 -2
- package/dist/i18n/i18n-context.js.map +1 -1
- package/dist/index.d.ts +6 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/primitives.d.ts +0 -1
- package/dist/primitives.d.ts.map +1 -1
- package/dist/primitives.js +0 -1
- package/dist/primitives.js.map +1 -1
- package/dist/theme/index.d.ts +1 -0
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +1 -0
- package/dist/theme/index.js.map +1 -1
- package/dist/theme/theme-context.d.ts +15 -3
- package/dist/theme/theme-context.d.ts.map +1 -1
- package/dist/theme/theme-context.js +49 -23
- package/dist/theme/theme-context.js.map +1 -1
- package/dist/theme/theme-cookie.d.ts +9 -0
- package/dist/theme/theme-cookie.d.ts.map +1 -0
- package/dist/theme/theme-cookie.js +8 -0
- package/dist/theme/theme-cookie.js.map +1 -0
- package/dist/theme/theme-script.d.ts +8 -6
- package/dist/theme/theme-script.d.ts.map +1 -1
- package/dist/theme/theme-script.js +21 -12
- package/dist/theme/theme-script.js.map +1 -1
- package/dist/ui/actions/action-surfaces.d.ts +1 -1
- package/dist/ui/actions/action-surfaces.js +1 -1
- package/dist/ui/actions/action-surfaces.js.map +1 -1
- package/dist/ui/actions/error-actions.d.ts +32 -0
- package/dist/ui/actions/error-actions.d.ts.map +1 -0
- package/dist/ui/actions/error-actions.js +40 -0
- package/dist/ui/actions/error-actions.js.map +1 -0
- package/dist/ui/actions/index.d.ts +2 -0
- package/dist/ui/actions/index.d.ts.map +1 -1
- package/dist/ui/actions/index.js +2 -0
- package/dist/ui/actions/index.js.map +1 -1
- package/dist/ui/actions/shortcut.d.ts +13 -0
- package/dist/ui/actions/shortcut.d.ts.map +1 -0
- package/dist/ui/actions/shortcut.js +18 -0
- package/dist/ui/actions/shortcut.js.map +1 -0
- package/dist/ui/actions/use-verb-invoker.d.ts +50 -0
- package/dist/ui/actions/use-verb-invoker.d.ts.map +1 -0
- package/dist/ui/actions/use-verb-invoker.js +93 -0
- package/dist/ui/actions/use-verb-invoker.js.map +1 -0
- package/dist/ui/atoms/cell-value/cell-value.d.ts.map +1 -1
- package/dist/ui/atoms/cell-value/cell-value.js +28 -14
- package/dist/ui/atoms/cell-value/cell-value.js.map +1 -1
- package/dist/ui/atoms/field-control/field-control.d.ts +1 -0
- package/dist/ui/atoms/field-control/field-control.d.ts.map +1 -1
- package/dist/ui/atoms/field-control/field-control.js +2 -0
- package/dist/ui/atoms/field-control/field-control.js.map +1 -1
- package/dist/ui/atoms/number-input/quantity-input.d.ts +8 -1
- package/dist/ui/atoms/number-input/quantity-input.d.ts.map +1 -1
- package/dist/ui/atoms/number-input/quantity-input.js +2 -1
- package/dist/ui/atoms/number-input/quantity-input.js.map +1 -1
- package/dist/ui/atoms/table/table.d.ts +12 -3
- package/dist/ui/atoms/table/table.d.ts.map +1 -1
- package/dist/ui/atoms/table/table.js +59 -10
- package/dist/ui/atoms/table/table.js.map +1 -1
- package/dist/ui/atoms/text/text.d.ts +2 -2
- package/dist/ui/atoms/text/text.d.ts.map +1 -1
- package/dist/ui/atoms/text/text.js.map +1 -1
- package/dist/ui/molecules/action-bar/action-bar.d.ts +76 -0
- package/dist/ui/molecules/action-bar/action-bar.d.ts.map +1 -0
- package/dist/ui/molecules/action-bar/action-bar.js +218 -0
- package/dist/ui/molecules/action-bar/action-bar.js.map +1 -0
- package/dist/ui/molecules/action-bar/index.d.ts +2 -0
- package/dist/ui/molecules/action-bar/index.d.ts.map +1 -0
- package/dist/ui/molecules/action-bar/index.js +3 -0
- package/dist/ui/molecules/action-bar/index.js.map +1 -0
- package/dist/ui/molecules/bulk-action-bar/bulk-action-bar.d.ts.map +1 -1
- package/dist/ui/molecules/bulk-action-bar/bulk-action-bar.js +8 -10
- package/dist/ui/molecules/bulk-action-bar/bulk-action-bar.js.map +1 -1
- package/dist/ui/molecules/bulk-result/bulk-result.d.ts +3 -3
- package/dist/ui/molecules/bulk-result/bulk-result.js +4 -4
- package/dist/ui/molecules/bulk-result/bulk-result.js.map +1 -1
- package/dist/ui/molecules/confirm-dialog/confirm-dialog.d.ts +24 -9
- package/dist/ui/molecules/confirm-dialog/confirm-dialog.d.ts.map +1 -1
- package/dist/ui/molecules/confirm-dialog/confirm-dialog.js +36 -11
- package/dist/ui/molecules/confirm-dialog/confirm-dialog.js.map +1 -1
- package/dist/ui/molecules/entity-record-card/entity-record-card.d.ts +33 -20
- package/dist/ui/molecules/entity-record-card/entity-record-card.d.ts.map +1 -1
- package/dist/ui/molecules/entity-record-card/entity-record-card.js +53 -20
- package/dist/ui/molecules/entity-record-card/entity-record-card.js.map +1 -1
- package/dist/ui/molecules/filter-builder/filter-builder.d.ts +8 -2
- package/dist/ui/molecules/filter-builder/filter-builder.d.ts.map +1 -1
- package/dist/ui/molecules/filter-builder/filter-builder.js +14 -5
- package/dist/ui/molecules/filter-builder/filter-builder.js.map +1 -1
- package/dist/ui/molecules/filter-chips/filter-chips.d.ts +16 -0
- package/dist/ui/molecules/filter-chips/filter-chips.d.ts.map +1 -0
- package/dist/ui/molecules/filter-chips/filter-chips.js +73 -0
- package/dist/ui/molecules/filter-chips/filter-chips.js.map +1 -0
- package/dist/ui/molecules/filter-chips/index.d.ts +2 -0
- package/dist/ui/molecules/filter-chips/index.d.ts.map +1 -0
- package/dist/ui/molecules/filter-chips/index.js +3 -0
- package/dist/ui/molecules/filter-chips/index.js.map +1 -0
- package/dist/ui/molecules/menu/menu.d.ts +11 -1
- package/dist/ui/molecules/menu/menu.d.ts.map +1 -1
- package/dist/ui/molecules/menu/menu.js +62 -2
- package/dist/ui/molecules/menu/menu.js.map +1 -1
- package/dist/ui/molecules/pagination/pagination.d.ts +5 -0
- package/dist/ui/molecules/pagination/pagination.d.ts.map +1 -1
- package/dist/ui/molecules/pagination/pagination.js +35 -18
- package/dist/ui/molecules/pagination/pagination.js.map +1 -1
- package/dist/ui/molecules/region-state/index.d.ts +2 -0
- package/dist/ui/molecules/region-state/index.d.ts.map +1 -0
- package/dist/ui/molecules/region-state/index.js +3 -0
- package/dist/ui/molecules/region-state/index.js.map +1 -0
- package/dist/ui/molecules/region-state/region-state.d.ts +42 -0
- package/dist/ui/molecules/region-state/region-state.d.ts.map +1 -0
- package/dist/ui/molecules/region-state/region-state.js +83 -0
- package/dist/ui/molecules/region-state/region-state.js.map +1 -0
- package/dist/ui/molecules/table-toolbar/table-toolbar.d.ts +3 -1
- package/dist/ui/molecules/table-toolbar/table-toolbar.d.ts.map +1 -1
- package/dist/ui/molecules/table-toolbar/table-toolbar.js +3 -2
- package/dist/ui/molecules/table-toolbar/table-toolbar.js.map +1 -1
- package/dist/ui/molecules/toast-region/toast-region.d.ts +63 -19
- package/dist/ui/molecules/toast-region/toast-region.d.ts.map +1 -1
- package/dist/ui/molecules/toast-region/toast-region.js +129 -42
- package/dist/ui/molecules/toast-region/toast-region.js.map +1 -1
- package/dist/ui/organisms/command-palette/command-palette.d.ts.map +1 -1
- package/dist/ui/organisms/command-palette/command-palette.js +19 -12
- package/dist/ui/organisms/command-palette/command-palette.js.map +1 -1
- package/dist/ui/organisms/entity-detail-grid/entity-detail-grid.d.ts.map +1 -1
- package/dist/ui/organisms/entity-detail-grid/entity-detail-grid.js +0 -1
- package/dist/ui/organisms/entity-detail-grid/entity-detail-grid.js.map +1 -1
- package/dist/ui/organisms/entity-form/entity-form.d.ts +1 -1
- package/dist/ui/organisms/entity-form/entity-form.d.ts.map +1 -1
- package/dist/ui/organisms/entity-form/entity-form.js +322 -214
- package/dist/ui/organisms/entity-form/entity-form.js.map +1 -1
- package/dist/ui/organisms/entity-form/entity-form.types.d.ts +8 -0
- package/dist/ui/organisms/entity-form/entity-form.types.d.ts.map +1 -1
- package/dist/ui/organisms/entity-form/entity-form.types.js.map +1 -1
- package/dist/ui/organisms/entity-table/entity-table.d.ts +1 -1
- package/dist/ui/organisms/entity-table/entity-table.d.ts.map +1 -1
- package/dist/ui/organisms/entity-table/entity-table.js +332 -197
- package/dist/ui/organisms/entity-table/entity-table.js.map +1 -1
- package/dist/ui/organisms/entity-table/entity-table.types.d.ts +19 -4
- package/dist/ui/organisms/entity-table/entity-table.types.d.ts.map +1 -1
- package/dist/ui/organisms/entity-table/entity-table.types.js.map +1 -1
- package/dist/ui/organisms/entity-table/header-sort.d.ts +18 -0
- package/dist/ui/organisms/entity-table/header-sort.d.ts.map +1 -0
- package/dist/ui/organisms/entity-table/header-sort.js +54 -0
- package/dist/ui/organisms/entity-table/header-sort.js.map +1 -0
- package/dist/ui/organisms/entity-table/pivot.d.ts +25 -0
- package/dist/ui/organisms/entity-table/pivot.d.ts.map +1 -0
- package/dist/ui/organisms/entity-table/pivot.js +106 -0
- package/dist/ui/organisms/entity-table/pivot.js.map +1 -0
- package/dist/ui/organisms/entity-table/use-result-announcement.d.ts +13 -0
- package/dist/ui/organisms/entity-table/use-result-announcement.d.ts.map +1 -0
- package/dist/ui/organisms/entity-table/use-result-announcement.js +31 -0
- package/dist/ui/organisms/entity-table/use-result-announcement.js.map +1 -0
- package/dist/ui/organisms/top-bar/live-indicator.d.ts +11 -0
- package/dist/ui/organisms/top-bar/live-indicator.d.ts.map +1 -0
- package/dist/ui/organisms/top-bar/live-indicator.js +46 -0
- package/dist/ui/organisms/top-bar/live-indicator.js.map +1 -0
- package/dist/ui/organisms/top-bar/top-bar.d.ts +11 -2
- package/dist/ui/organisms/top-bar/top-bar.d.ts.map +1 -1
- package/dist/ui/organisms/top-bar/top-bar.js +14 -5
- package/dist/ui/organisms/top-bar/top-bar.js.map +1 -1
- package/dist/ui/organisms/wizard/wizard.d.ts +1 -1
- package/dist/ui/organisms/wizard/wizard.d.ts.map +1 -1
- package/dist/ui/organisms/wizard/wizard.js +7 -1
- package/dist/ui/organisms/wizard/wizard.js.map +1 -1
- package/dist/ui/organisms/wizard/wizard.types.d.ts +8 -0
- package/dist/ui/organisms/wizard/wizard.types.d.ts.map +1 -1
- package/dist/ui/organisms/wizard/wizard.types.js.map +1 -1
- package/dist/ui/utils/live-updates.d.ts +24 -0
- package/dist/ui/utils/live-updates.d.ts.map +1 -0
- package/dist/ui/utils/live-updates.js +20 -0
- package/dist/ui/utils/live-updates.js.map +1 -0
- package/dist/ui/utils/use-focus-on-arrival.d.ts +14 -0
- package/dist/ui/utils/use-focus-on-arrival.d.ts.map +1 -0
- package/dist/ui/utils/use-focus-on-arrival.js +42 -0
- package/dist/ui/utils/use-focus-on-arrival.js.map +1 -0
- package/dist/ui/utils/use-hotkey.d.ts +44 -25
- package/dist/ui/utils/use-hotkey.d.ts.map +1 -1
- package/dist/ui/utils/use-hotkey.js +80 -48
- package/dist/ui/utils/use-hotkey.js.map +1 -1
- package/package.json +5 -5
- package/dist/ui/molecules/split-button/index.d.ts +0 -2
- package/dist/ui/molecules/split-button/index.d.ts.map +0 -1
- package/dist/ui/molecules/split-button/index.js +0 -3
- package/dist/ui/molecules/split-button/index.js.map +0 -1
- package/dist/ui/molecules/split-button/split-button.d.ts +0 -21
- package/dist/ui/molecules/split-button/split-button.d.ts.map +0 -1
- package/dist/ui/molecules/split-button/split-button.js +0 -35
- package/dist/ui/molecules/split-button/split-button.js.map +0 -1
|
@@ -10,16 +10,17 @@
|
|
|
10
10
|
export declare const controlsCatalogs: {
|
|
11
11
|
readonly es: {
|
|
12
12
|
readonly controls: {
|
|
13
|
+
actions: {
|
|
14
|
+
more: string;
|
|
15
|
+
forRecord: string;
|
|
16
|
+
};
|
|
13
17
|
table: {
|
|
14
|
-
open: string;
|
|
15
18
|
select: string;
|
|
16
19
|
actions: string;
|
|
17
20
|
new: string;
|
|
18
21
|
filters: string;
|
|
19
22
|
sorting: string;
|
|
20
23
|
loading: string;
|
|
21
|
-
empty: string;
|
|
22
|
-
error: string;
|
|
23
24
|
selection: string;
|
|
24
25
|
selectRow: string;
|
|
25
26
|
expandRow: string;
|
|
@@ -30,6 +31,11 @@ export declare const controlsCatalogs: {
|
|
|
30
31
|
selectedCount_one: string;
|
|
31
32
|
selectedCount_other: string;
|
|
32
33
|
clearSelection: string;
|
|
34
|
+
results_one: string;
|
|
35
|
+
results_other: string;
|
|
36
|
+
noResultsFiltered: string;
|
|
37
|
+
caption: string;
|
|
38
|
+
captionSorted: string;
|
|
33
39
|
};
|
|
34
40
|
bulk: {
|
|
35
41
|
running: string;
|
|
@@ -52,17 +58,32 @@ export declare const controlsCatalogs: {
|
|
|
52
58
|
delete: string;
|
|
53
59
|
deleting: string;
|
|
54
60
|
clone: string;
|
|
55
|
-
moreActions: string;
|
|
56
61
|
back: string;
|
|
57
62
|
loading: string;
|
|
58
63
|
pending: string;
|
|
64
|
+
errorSummary_one: string;
|
|
65
|
+
errorSummary_other: string;
|
|
66
|
+
requiredHint: string;
|
|
67
|
+
requiredMarker: string;
|
|
68
|
+
};
|
|
69
|
+
state: {
|
|
70
|
+
retry: string;
|
|
71
|
+
forbidden: string;
|
|
72
|
+
stale: string;
|
|
73
|
+
noResults: string;
|
|
74
|
+
clearFilters: string;
|
|
75
|
+
empty: string;
|
|
76
|
+
saved: string;
|
|
59
77
|
};
|
|
60
78
|
pagination: {
|
|
61
79
|
label: string;
|
|
62
80
|
summary: string;
|
|
63
81
|
rows: string;
|
|
82
|
+
first: string;
|
|
64
83
|
previous: string;
|
|
65
84
|
next: string;
|
|
85
|
+
last: string;
|
|
86
|
+
page: string;
|
|
66
87
|
};
|
|
67
88
|
columns: {
|
|
68
89
|
title: string;
|
|
@@ -88,6 +109,10 @@ export declare const controlsCatalogs: {
|
|
|
88
109
|
remove: string;
|
|
89
110
|
applyAria: string;
|
|
90
111
|
clearAria: string;
|
|
112
|
+
applied: string;
|
|
113
|
+
removeChip: string;
|
|
114
|
+
clearAll: string;
|
|
115
|
+
withCount: string;
|
|
91
116
|
};
|
|
92
117
|
sort: {
|
|
93
118
|
by: string;
|
|
@@ -182,6 +207,11 @@ export declare const controlsCatalogs: {
|
|
|
182
207
|
isNull: string;
|
|
183
208
|
isNotNull: string;
|
|
184
209
|
};
|
|
210
|
+
density: {
|
|
211
|
+
label: string;
|
|
212
|
+
comfortable: string;
|
|
213
|
+
compact: string;
|
|
214
|
+
};
|
|
185
215
|
theme: {
|
|
186
216
|
label: string;
|
|
187
217
|
};
|
|
@@ -198,7 +228,23 @@ export declare const controlsCatalogs: {
|
|
|
198
228
|
confirm: {
|
|
199
229
|
confirm: string;
|
|
200
230
|
cancel: string;
|
|
201
|
-
|
|
231
|
+
question: string;
|
|
232
|
+
verbCount_one: string;
|
|
233
|
+
verbCount_other: string;
|
|
234
|
+
selection_one: string;
|
|
235
|
+
selection_other: string;
|
|
236
|
+
typeToConfirm: string;
|
|
237
|
+
done: string;
|
|
238
|
+
undo: string;
|
|
239
|
+
deleteMessage: string;
|
|
240
|
+
deleted: string;
|
|
241
|
+
};
|
|
242
|
+
live: {
|
|
243
|
+
reconnecting: string;
|
|
244
|
+
stopped: string;
|
|
245
|
+
reconnect: string;
|
|
246
|
+
resumed: string;
|
|
247
|
+
waiting: string;
|
|
202
248
|
};
|
|
203
249
|
toast: {
|
|
204
250
|
region: string;
|
|
@@ -230,16 +276,17 @@ export declare const controlsCatalogs: {
|
|
|
230
276
|
};
|
|
231
277
|
readonly en: {
|
|
232
278
|
readonly controls: {
|
|
279
|
+
actions: {
|
|
280
|
+
more: string;
|
|
281
|
+
forRecord: string;
|
|
282
|
+
};
|
|
233
283
|
table: {
|
|
234
|
-
open: string;
|
|
235
284
|
select: string;
|
|
236
285
|
actions: string;
|
|
237
286
|
new: string;
|
|
238
287
|
filters: string;
|
|
239
288
|
sorting: string;
|
|
240
289
|
loading: string;
|
|
241
|
-
empty: string;
|
|
242
|
-
error: string;
|
|
243
290
|
selection: string;
|
|
244
291
|
selectRow: string;
|
|
245
292
|
expandRow: string;
|
|
@@ -250,6 +297,11 @@ export declare const controlsCatalogs: {
|
|
|
250
297
|
selectedCount_one: string;
|
|
251
298
|
selectedCount_other: string;
|
|
252
299
|
clearSelection: string;
|
|
300
|
+
results_one: string;
|
|
301
|
+
results_other: string;
|
|
302
|
+
noResultsFiltered: string;
|
|
303
|
+
caption: string;
|
|
304
|
+
captionSorted: string;
|
|
253
305
|
};
|
|
254
306
|
bulk: {
|
|
255
307
|
running: string;
|
|
@@ -272,17 +324,32 @@ export declare const controlsCatalogs: {
|
|
|
272
324
|
delete: string;
|
|
273
325
|
deleting: string;
|
|
274
326
|
clone: string;
|
|
275
|
-
moreActions: string;
|
|
276
327
|
back: string;
|
|
277
328
|
loading: string;
|
|
278
329
|
pending: string;
|
|
330
|
+
errorSummary_one: string;
|
|
331
|
+
errorSummary_other: string;
|
|
332
|
+
requiredHint: string;
|
|
333
|
+
requiredMarker: string;
|
|
334
|
+
};
|
|
335
|
+
state: {
|
|
336
|
+
retry: string;
|
|
337
|
+
forbidden: string;
|
|
338
|
+
stale: string;
|
|
339
|
+
noResults: string;
|
|
340
|
+
clearFilters: string;
|
|
341
|
+
empty: string;
|
|
342
|
+
saved: string;
|
|
279
343
|
};
|
|
280
344
|
pagination: {
|
|
281
345
|
label: string;
|
|
282
346
|
summary: string;
|
|
283
347
|
rows: string;
|
|
348
|
+
first: string;
|
|
284
349
|
previous: string;
|
|
285
350
|
next: string;
|
|
351
|
+
last: string;
|
|
352
|
+
page: string;
|
|
286
353
|
};
|
|
287
354
|
columns: {
|
|
288
355
|
title: string;
|
|
@@ -308,6 +375,10 @@ export declare const controlsCatalogs: {
|
|
|
308
375
|
remove: string;
|
|
309
376
|
applyAria: string;
|
|
310
377
|
clearAria: string;
|
|
378
|
+
applied: string;
|
|
379
|
+
removeChip: string;
|
|
380
|
+
clearAll: string;
|
|
381
|
+
withCount: string;
|
|
311
382
|
};
|
|
312
383
|
sort: {
|
|
313
384
|
by: string;
|
|
@@ -402,6 +473,11 @@ export declare const controlsCatalogs: {
|
|
|
402
473
|
isNull: string;
|
|
403
474
|
isNotNull: string;
|
|
404
475
|
};
|
|
476
|
+
density: {
|
|
477
|
+
label: string;
|
|
478
|
+
comfortable: string;
|
|
479
|
+
compact: string;
|
|
480
|
+
};
|
|
405
481
|
theme: {
|
|
406
482
|
label: string;
|
|
407
483
|
};
|
|
@@ -418,7 +494,23 @@ export declare const controlsCatalogs: {
|
|
|
418
494
|
confirm: {
|
|
419
495
|
confirm: string;
|
|
420
496
|
cancel: string;
|
|
421
|
-
|
|
497
|
+
question: string;
|
|
498
|
+
verbCount_one: string;
|
|
499
|
+
verbCount_other: string;
|
|
500
|
+
selection_one: string;
|
|
501
|
+
selection_other: string;
|
|
502
|
+
typeToConfirm: string;
|
|
503
|
+
done: string;
|
|
504
|
+
undo: string;
|
|
505
|
+
deleteMessage: string;
|
|
506
|
+
deleted: string;
|
|
507
|
+
};
|
|
508
|
+
live: {
|
|
509
|
+
reconnecting: string;
|
|
510
|
+
stopped: string;
|
|
511
|
+
reconnect: string;
|
|
512
|
+
resumed: string;
|
|
513
|
+
waiting: string;
|
|
422
514
|
};
|
|
423
515
|
toast: {
|
|
424
516
|
region: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/i18n/catalog/index.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/i18n/catalog/index.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGnB,CAAC;AAEX,qEAAqE;AACrE,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,IAAI,CAAC,CAAC;AAEhE,eAAO,MAAM,mBAAmB,uBAAwB,CAAC"}
|
|
@@ -15,6 +15,20 @@ export declare function useLocalizedDescriptors<TDescriptor extends EntityFieldD
|
|
|
15
15
|
* used to render as everywhere.
|
|
16
16
|
*/
|
|
17
17
|
export declare function useEnumLabel(): (descriptor: EntityFieldDescriptor, value: string) => string;
|
|
18
|
+
/** What {@link useEntityNoun} reads off an entity's metadata. */
|
|
19
|
+
export interface EntityNounSource {
|
|
20
|
+
readonly name: string;
|
|
21
|
+
readonly key?: string;
|
|
22
|
+
readonly labelKey?: string;
|
|
23
|
+
readonly pluralKey?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Names an entity in the reader's language — "Marca", "Marcas" — through its
|
|
27
|
+
* declared `labelKey` or `pluralKey`, falling back to its `key`, then its class
|
|
28
|
+
* name, for an entity that declared no catalog entry: what a confirmation or
|
|
29
|
+
* an announcement says when there is no record name to say instead.
|
|
30
|
+
*/
|
|
31
|
+
export declare function useEntityNoun(): (entity: EntityNounSource, form?: 'singular' | 'plural') => string;
|
|
18
32
|
/**
|
|
19
33
|
* A failure's own fields — `slug` on a `DuplicateSlug`, `entity` on a
|
|
20
34
|
* `NotFound` — as a catalog sentence interpolates them: what its problem body
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-labels.d.ts","sourceRoot":"","sources":["../../src/i18n/entity-labels.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,qBAAqB,EAG3B,MAAM,eAAe,CAAC;AAKvB;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CACrC,WAAW,SAAS,qBAAqB,EACzC,WAAW,EAAE,SAAS,WAAW,EAAE,GAAG,WAAW,EAAE,CAYpD;AAED;;;;GAIG;AACH,wBAAgB,YAAY,IAAI,CAC9B,UAAU,EAAE,qBAAqB,EACjC,KAAK,EAAE,MAAM,KACV,MAAM,CAUV;AAaD;;;;GAIG;AACH,eAAO,MAAM,aAAa,GAAI,SAAS,OAAO,KAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAO/D,CAAC;AAET,sDAAsD;AACtD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAE1E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,IAAI,CAAC,KAAK,EAAE;IACzC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,C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 -30,6 +30,21 @@ import { useTranslateKey } from './i18n-context.js';
|
|
|
30
30
|
translate
|
|
31
31
|
]);
|
|
32
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Names an entity in the reader's language — "Marca", "Marcas" — through its
|
|
35
|
+
* declared `labelKey` or `pluralKey`, falling back to its `key`, then its class
|
|
36
|
+
* name, for an entity that declared no catalog entry: what a confirmation or
|
|
37
|
+
* an announcement says when there is no record name to say instead.
|
|
38
|
+
*/ export function useEntityNoun() {
|
|
39
|
+
const translate = useTranslateKey();
|
|
40
|
+
return useCallback((entity, form = 'singular')=>{
|
|
41
|
+
var _entity_key;
|
|
42
|
+
const key = form === 'plural' ? entity.pluralKey : entity.labelKey;
|
|
43
|
+
return key === undefined ? (_entity_key = entity.key) != null ? _entity_key : entity.name : translate(key);
|
|
44
|
+
}, [
|
|
45
|
+
translate
|
|
46
|
+
]);
|
|
47
|
+
}
|
|
33
48
|
const ENVELOPE = new Set([
|
|
34
49
|
'type',
|
|
35
50
|
'title',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/i18n/entity-labels.ts"],"sourcesContent":["'use client';\n\nimport {\n type EntityFieldDescriptor,\n isFailure,\n problemOf,\n} from '@entifix/core';\nimport { useCallback, useMemo } from 'react';\n\nimport { useTranslateKey } from './i18n-context.js';\n\n/**\n * Resolves each descriptor's `labelKey` against the active catalog, leaving the\n * declared `label` in place for members that have no key yet.\n *\n * Done here rather than in `describeEntityColumns` because the same descriptors\n * are the server-side filter allowlist, where a translated label would be\n * meaningless — and because `@entifix/core` (T1) cannot reach\n * `@entifix/i18n` (T2).\n */\nexport function useLocalizedDescriptors<\n TDescriptor extends EntityFieldDescriptor,\n>(descriptors: readonly TDescriptor[]): TDescriptor[] {\n const translate = useTranslateKey();\n\n return useMemo(\n () =>\n descriptors.map(descriptor =>\n descriptor.labelKey === undefined\n ? descriptor\n : { ...descriptor, label: translate(descriptor.labelKey) },\n ),\n [descriptors, translate],\n );\n}\n\n/**\n * Reads one value of an enum member. Falls back to the raw value when the\n * member declared no vocabulary prefix, which is what a `status` of `active`\n * used to render as everywhere.\n */\nexport function useEnumLabel(): (\n descriptor: EntityFieldDescriptor,\n value: string,\n) => string {\n const translate = useTranslateKey();\n\n return useCallback(\n (descriptor, value) =>\n descriptor.enumLabelKey === undefined\n ? value\n : translate(`${descriptor.enumLabelKey}.${value}`),\n [translate],\n );\n}\n\nconst ENVELOPE: ReadonlySet<string> = new Set([\n 'type',\n 'title',\n 'status',\n 'code',\n 'category',\n 'detail',\n 'instance',\n 'traceId',\n]);\n\n/**\n * A failure's own fields — `slug` on a `DuplicateSlug`, `entity` on a\n * `NotFound` — as a catalog sentence interpolates them: what its problem body\n * carries beside the envelope. Anything that is not a typed failure has none.\n */\nexport const failureFields = (failure: unknown): Record<string, unknown> =>\n isFailure(failure)\n ? Object.fromEntries(\n Object.entries(problemOf(failure)).filter(\n ([key]) => !ENVELOPE.has(key),\n ),\n )\n : {};\n\n/** {@link failureFields}, memoised on the failure. */\nexport function useFailureFields(failure: unknown): Record<string, unknown> {\n return useMemo(() => failureFields(failure), [failure]);\n}\n\n/**\n * Renders a failed request in the reader's language.\n *\n * A typed failure carries its `code` on itself\n * ([ADR 0013](../../../../../docs/adr/0013-failures-are-typed-values-decided-at-the-shell.md)),\n * and its own fields are handed to the sentence, so `errors:duplicateSlug`\n * can say which slug. An error from a service that still answers\n * `{ error, code, detail }` carries its code on `details`. Falling back to\n * `message` keeps a failure that predates the vocabulary — or one raised\n * client-side — readable rather than blank.\n */\nexport function useErrorMessage(): (error: {\n message: string;\n code?: unknown;\n details?: Record<string, unknown>;\n}) => string {\n const translate = useTranslateKey();\n\n return useCallback(\n error => {\n const code =\n typeof error.code === 'string' ? error.code : error.details?.['code'];\n return typeof code === 'string'\n ? translate(`errors:${code}`, failureFields(error))\n : error.message;\n },\n [translate],\n );\n}\n"],"names":["isFailure","problemOf","useCallback","useMemo","useTranslateKey","useLocalizedDescriptors","descriptors","translate","map","descriptor","labelKey","undefined","label","useEnumLabel","value","enumLabelKey","ENVELOPE","Set","failureFields","failure","Object","fromEntries","entries","filter","
|
|
1
|
+
{"version":3,"sources":["../../src/i18n/entity-labels.ts"],"sourcesContent":["'use client';\n\nimport {\n type EntityFieldDescriptor,\n isFailure,\n problemOf,\n} from '@entifix/core';\nimport { useCallback, useMemo } from 'react';\n\nimport { useTranslateKey } from './i18n-context.js';\n\n/**\n * Resolves each descriptor's `labelKey` against the active catalog, leaving the\n * declared `label` in place for members that have no key yet.\n *\n * Done here rather than in `describeEntityColumns` because the same descriptors\n * are the server-side filter allowlist, where a translated label would be\n * meaningless — and because `@entifix/core` (T1) cannot reach\n * `@entifix/i18n` (T2).\n */\nexport function useLocalizedDescriptors<\n TDescriptor extends EntityFieldDescriptor,\n>(descriptors: readonly TDescriptor[]): TDescriptor[] {\n const translate = useTranslateKey();\n\n return useMemo(\n () =>\n descriptors.map(descriptor =>\n descriptor.labelKey === undefined\n ? descriptor\n : { ...descriptor, label: translate(descriptor.labelKey) },\n ),\n [descriptors, translate],\n );\n}\n\n/**\n * Reads one value of an enum member. Falls back to the raw value when the\n * member declared no vocabulary prefix, which is what a `status` of `active`\n * used to render as everywhere.\n */\nexport function useEnumLabel(): (\n descriptor: EntityFieldDescriptor,\n value: string,\n) => string {\n const translate = useTranslateKey();\n\n return useCallback(\n (descriptor, value) =>\n descriptor.enumLabelKey === undefined\n ? value\n : translate(`${descriptor.enumLabelKey}.${value}`),\n [translate],\n );\n}\n\n/** What {@link useEntityNoun} reads off an entity's metadata. */\nexport interface EntityNounSource {\n readonly name: string;\n readonly key?: string;\n readonly labelKey?: string;\n readonly pluralKey?: string;\n}\n\n/**\n * Names an entity in the reader's language — \"Marca\", \"Marcas\" — through its\n * declared `labelKey` or `pluralKey`, falling back to its `key`, then its class\n * name, for an entity that declared no catalog entry: what a confirmation or\n * an announcement says when there is no record name to say instead.\n */\nexport function useEntityNoun(): (\n entity: EntityNounSource,\n form?: 'singular' | 'plural',\n) => string {\n const translate = useTranslateKey();\n\n return useCallback(\n (entity, form = 'singular') => {\n const key = form === 'plural' ? entity.pluralKey : entity.labelKey;\n return key === undefined ? (entity.key ?? entity.name) : translate(key);\n },\n [translate],\n );\n}\n\nconst ENVELOPE: ReadonlySet<string> = new Set([\n 'type',\n 'title',\n 'status',\n 'code',\n 'category',\n 'detail',\n 'instance',\n 'traceId',\n]);\n\n/**\n * A failure's own fields — `slug` on a `DuplicateSlug`, `entity` on a\n * `NotFound` — as a catalog sentence interpolates them: what its problem body\n * carries beside the envelope. Anything that is not a typed failure has none.\n */\nexport const failureFields = (failure: unknown): Record<string, unknown> =>\n isFailure(failure)\n ? Object.fromEntries(\n Object.entries(problemOf(failure)).filter(\n ([key]) => !ENVELOPE.has(key),\n ),\n )\n : {};\n\n/** {@link failureFields}, memoised on the failure. */\nexport function useFailureFields(failure: unknown): Record<string, unknown> {\n return useMemo(() => failureFields(failure), [failure]);\n}\n\n/**\n * Renders a failed request in the reader's language.\n *\n * A typed failure carries its `code` on itself\n * ([ADR 0013](../../../../../docs/adr/0013-failures-are-typed-values-decided-at-the-shell.md)),\n * and its own fields are handed to the sentence, so `errors:duplicateSlug`\n * can say which slug. An error from a service that still answers\n * `{ error, code, detail }` carries its code on `details`. Falling back to\n * `message` keeps a failure that predates the vocabulary — or one raised\n * client-side — readable rather than blank.\n */\nexport function useErrorMessage(): (error: {\n message: string;\n code?: unknown;\n details?: Record<string, unknown>;\n}) => string {\n const translate = useTranslateKey();\n\n return useCallback(\n error => {\n const code =\n typeof error.code === 'string' ? error.code : error.details?.['code'];\n return typeof code === 'string'\n ? translate(`errors:${code}`, failureFields(error))\n : error.message;\n },\n [translate],\n );\n}\n"],"names":["isFailure","problemOf","useCallback","useMemo","useTranslateKey","useLocalizedDescriptors","descriptors","translate","map","descriptor","labelKey","undefined","label","useEnumLabel","value","enumLabelKey","useEntityNoun","entity","form","key","pluralKey","name","ENVELOPE","Set","failureFields","failure","Object","fromEntries","entries","filter","has","useFailureFields","useErrorMessage","error","code","details","message"],"mappings":"AAAA;;AAEA,SAEEA,SAAS,EACTC,SAAS,QACJ,gBAAgB;AACvB,SAASC,WAAW,EAAEC,OAAO,QAAQ,QAAQ;AAE7C,SAASC,eAAe,QAAQ,oBAAoB;AAEpD;;;;;;;;CAQC,GACD,OAAO,SAASC,wBAEdC,WAAmC;IACnC,MAAMC,YAAYH;IAElB,OAAOD,QACL,IACEG,YAAYE,GAAG,CAACC,CAAAA,aACdA,WAAWC,QAAQ,KAAKC,YACpBF,aACA,aAAKA;gBAAYG,OAAOL,UAAUE,WAAWC,QAAQ;iBAE7D;QAACJ;QAAaC;KAAU;AAE5B;AAEA;;;;CAIC,GACD,OAAO,SAASM;IAId,MAAMN,YAAYH;IAElB,OAAOF,YACL,CAACO,YAAYK,QACXL,WAAWM,YAAY,KAAKJ,YACxBG,QACAP,UAAU,GAAGE,WAAWM,YAAY,CAAC,CAAC,EAAED,OAAO,GACrD;QAACP;KAAU;AAEf;AAUA;;;;;CAKC,GACD,OAAO,SAASS;IAId,MAAMT,YAAYH;IAElB,OAAOF,YACL,CAACe,QAAQC,OAAO,UAAU;YAEID;QAD5B,MAAME,MAAMD,SAAS,WAAWD,OAAOG,SAAS,GAAGH,OAAOP,QAAQ;QAClE,OAAOS,QAAQR,aAAaM,cAAAA,OAAOE,GAAG,YAAVF,cAAcA,OAAOI,IAAI,GAAId,UAAUY;IACrE,GACA;QAACZ;KAAU;AAEf;AAEA,MAAMe,WAAgC,IAAIC,IAAI;IAC5C;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAED;;;;CAIC,GACD,OAAO,MAAMC,gBAAgB,CAACC,UAC5BzB,UAAUyB,WACNC,OAAOC,WAAW,CAChBD,OAAOE,OAAO,CAAC3B,UAAUwB,UAAUI,MAAM,CACvC,CAAC,CAACV,IAAI,GAAK,CAACG,SAASQ,GAAG,CAACX,SAG7B,CAAC,EAAE;AAET,oDAAoD,GACpD,OAAO,SAASY,iBAAiBN,OAAgB;IAC/C,OAAOtB,QAAQ,IAAMqB,cAAcC,UAAU;QAACA;KAAQ;AACxD;AAEA;;;;;;;;;;CAUC,GACD,OAAO,SAASO;IAKd,MAAMzB,YAAYH;IAElB,OAAOF,YACL+B,CAAAA;YAEkDA;QADhD,MAAMC,OACJ,OAAOD,MAAMC,IAAI,KAAK,WAAWD,MAAMC,IAAI,IAAGD,iBAAAA,MAAME,OAAO,qBAAbF,cAAe,CAAC,OAAO;QACvE,OAAO,OAAOC,SAAS,WACnB3B,UAAU,CAAC,OAAO,EAAE2B,MAAM,EAAEV,cAAcS,UAC1CA,MAAMG,OAAO;IACnB,GACA;QAAC7B;KAAU;AAEf"}
|
|
@@ -5,7 +5,7 @@ import { createContext, useContext, useMemo } from 'react';
|
|
|
5
5
|
import { fallbackCatalogFor } from './fallback-catalogs.js';
|
|
6
6
|
const I18nContext = /*#__PURE__*/ createContext(null);
|
|
7
7
|
let fallback;
|
|
8
|
-
/** `'table.
|
|
8
|
+
/** `'table.filters'` → the string at that path, or `undefined`. */ const at = (catalog, key)=>{
|
|
9
9
|
let node = catalog;
|
|
10
10
|
for (const segment of key.split('.')){
|
|
11
11
|
if (typeof node !== 'object' || node === null) return undefined;
|
|
@@ -45,7 +45,7 @@ const interpolate = (text, params)=>params === undefined ? text : text.replace(/
|
|
|
45
45
|
* It resolves against **this package's own catalog**, which is the point of the
|
|
46
46
|
* catalog living here: the controls arrive already able to speak, so an adopter
|
|
47
47
|
* who wants no i18n library at all still gets a working table rather than one
|
|
48
|
-
* captioned `table.
|
|
48
|
+
* captioned `table.filters`. A key outside `controls` — a host's namespace, an
|
|
49
49
|
* entity label — has nothing here to resolve against and comes back as itself.
|
|
50
50
|
*/ function fallbackTranslator() {
|
|
51
51
|
// Read on every call rather than once at load: a host declares its locales
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/i18n/i18n-context.tsx"],"sourcesContent":["'use client';\n\nimport {\n defaultLocale,\n type Formatters,\n type Locale,\n makeFormatters,\n} from '@entifix/core';\nimport {\n createContext,\n type PropsWithChildren,\n useContext,\n useMemo,\n} from 'react';\n\nimport { fallbackCatalogFor } from './fallback-catalogs.js';\n\n/**\n * Resolving a key to a sentence. The whole of what a control needs from an i18n\n * library, and deliberately not i18next's `TFunction`.\n *\n * ⚠️ **This port is what makes the controls adoptable on their own.** They used\n * to import `createI18n` directly, so taking a table meant taking i18next,\n * react-i18next and a Spanish catalog — the first of the three composition\n * defects the tier register was written to catch. The i18next binding now lives\n * behind `@entifix/react-controls/i18next`, and the peers it needs are optional.\n */\nexport type Translate = (\n key: string,\n params?: Record<string, unknown>,\n) => string;\n\nexport interface Translator {\n readonly locale: Locale;\n readonly formatters: Formatters;\n /** `ns` is the namespace a caller asked for, or the default when omitted. */\n t(\n ns: string | undefined,\n key: string,\n params?: Record<string, unknown>,\n ): string;\n}\n\nconst I18nContext = createContext<Translator | null>(null);\n\nlet fallback: Translator | undefined;\n\n/** `'table.empty'` → the string at that path, or `undefined`. */\nconst at = (catalog: object, key: string): string | undefined => {\n let node: unknown = catalog;\n for (const segment of key.split('.')) {\n if (typeof node !== 'object' || node === null) return undefined;\n node = (node as Record<string, unknown>)[segment];\n }\n return typeof node === 'string' ? node : undefined;\n};\n\n/**\n * Resolves a key, honouring i18next's `_one`/`_other` plural suffixes when the\n * caller passed a `count`.\n *\n * ⚠️ **Two plural forms, not a CLDR rule set.** i18next asks `Intl.PluralRules`\n * and handles languages with six categories; this covers the two that Spanish\n * and English have, which is what this package's own catalog is written in. An\n * adopter whose locale needs more than that wants the real thing — which is\n * what `@entifix/react-controls/i18next` is, and why it exists.\n */\nconst lookup = (\n catalog: object,\n key: string,\n params?: Record<string, unknown>,\n): string | undefined => {\n const count = params?.['count'];\n if (typeof count === 'number') {\n const plural = at(catalog, `${key}_${count === 1 ? 'one' : 'other'}`);\n if (plural !== undefined) return plural;\n }\n return at(catalog, key);\n};\n\nconst interpolate = (text: string, params?: Record<string, unknown>): string =>\n params === undefined\n ? text\n : text.replace(/\\{\\{\\s*([\\w.]+)\\s*\\}\\}/g, (whole, name: string) =>\n name in params ? String(params[name]) : whole,\n );\n\n/**\n * What a control renders when nobody mounted a provider — Storybook, a unit\n * spec, a page that forgot.\n *\n * Deliberately a working translator rather than a thrown error, unlike\n * `useTheme`. These controls render inside server components, and a control\n * that explodes on a missing ancestor is worse than one that renders the host's\n * default locale: the failure mode becomes \"this screen is in the default\n * language for a visitor who chose another\",\n * which the locale-switch e2e catches, not a blank page.\n *\n * It resolves against **this package's own catalog**, which is the point of the\n * catalog living here: the controls arrive already able to speak, so an adopter\n * who wants no i18n library at all still gets a working table rather than one\n * captioned `table.empty`. A key outside `controls` — a host's namespace, an\n * entity label — has nothing here to resolve against and comes back as itself.\n */\nfunction fallbackTranslator(): Translator {\n // Read on every call rather than once at load: a host declares its locales\n // from its own entry module, which may well evaluate after this one (#35).\n const locale = defaultLocale();\n if (fallback?.locale === locale) return fallback;\n fallback = {\n locale,\n formatters: makeFormatters(locale),\n t: (ns, key, params) => {\n // `useTranslateKey` hands over a fully qualified `entity:gadget.label`,\n // because a runtime key carries its own namespace. i18next strips the\n // prefix and answers with the bare key when it cannot resolve one, and\n // this matches that so swapping the binding in or out changes nothing a\n // caller can see.\n const [prefix, ...rest] = key.split(':');\n const qualified = rest.length > 0;\n const namespace = qualified ? prefix : ns;\n const bare = qualified ? rest.join(':') : key;\n\n // A host may default to a locale this package ships no copy for; its own\n // English then beats a raw key.\n const catalog =\n fallbackCatalogFor(namespace ?? 'controls', locale) ??\n fallbackCatalogFor(namespace ?? 'controls', 'en');\n if (catalog === undefined) return bare;\n const text = lookup(catalog, bare, params);\n return text === undefined ? bare : interpolate(text, params);\n },\n };\n return fallback;\n}\n\nexport interface TranslatorProviderProps extends PropsWithChildren {\n readonly translator: Translator;\n}\n\n/**\n * Binds one translator to the subtree.\n *\n * A host with no i18n library builds one of these by hand; a host using\n * i18next mounts `I18nProvider` from `@entifix/react-controls/i18next`, which\n * builds it from a per-locale instance.\n */\nexport function TranslatorProvider({\n translator,\n children,\n}: TranslatorProviderProps) {\n const value = useMemo(() => translator, [translator]);\n return <I18nContext.Provider value={value}>{children}</I18nContext.Provider>;\n}\n\n/** The translator in scope, or the key-returning fallback. */\nexport function useTranslator(): Translator {\n return useContext(I18nContext) ?? fallbackTranslator();\n}\n\nexport function useLocale(): Locale {\n return useTranslator().locale;\n}\n\n/**\n * Locale-aware `Intl` wrappers. Every date and number a control renders goes\n * through these so the server and the browser agree on the output.\n */\nexport function useFormatters(): Formatters {\n return useTranslator().formatters;\n}\n\n/**\n * The translate function for one namespace.\n *\n * ⚠️ **Typed by the host, not by this package.** TypeScript permits exactly one\n * `declare module 'i18next' { interface CustomTypeOptions }` per compilation, so\n * the catalogs can be owned per package but the type gate cannot — a second\n * declaration is `TS2717`. entifix therefore ships each namespace's `Resources`\n * type and the host composes the single augmentation, which is what keeps every\n * `useT('shell')` and `useT('app')` call site compiling exactly as before.\n */\nexport function useT(ns?: string): Translate {\n const translator = useTranslator();\n return useMemo(\n () => (key, params) => translator.t(ns, key, params),\n [translator, ns],\n );\n}\n\nexport type TranslateKey = Translate;\n\n/**\n * Resolves a key that is only known at runtime — an entity's `labelKey`, one\n * value out of an enum vocabulary.\n *\n * Deliberately separate from {@link useT}, which stays strict. This is the one\n * place the typed-key guarantee is given up, and it is given up for keys that\n * `@entifix/core` cannot type: core carries `labelKey` as an opaque string\n * because it has no catalogs to check it against. Authored copy must go through\n * `useT` so a typo stays a compile error.\n */\nexport function useTranslateKey(): TranslateKey {\n return useT();\n}\n"],"names":["defaultLocale","makeFormatters","createContext","useContext","useMemo","fallbackCatalogFor","I18nContext","fallback","at","catalog","key","node","segment","split","undefined","lookup","params","count","plural","interpolate","text","replace","whole","name","String","fallbackTranslator","locale","formatters","t","ns","prefix","rest","qualified","length","namespace","bare","join","TranslatorProvider","translator","children","value","Provider","useTranslator","useLocale","useFormatters","useT","useTranslateKey"],"mappings":"AAAA;;AAEA,SACE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AQ,GAAGC,KAAK,GAAGrB,IAAIG,KAAK,CAAC;YACpC,MAAMmB,YAAYD,KAAKE,MAAM,GAAG;YAChC,MAAMC,YAAYF,YAAYF,SAASD;YACvC,MAAMM,OAAOH,YAAYD,KAAKK,IAAI,CAAC,OAAO1B;YAE1C,yEAAyE;YACzE,gCAAgC;YAChC,MAAMD,WACJJ,sBAAAA,mBAAmB6B,oBAAAA,YAAa,YAAYR,mBAA5CrB,sBACAA,mBAAmB6B,oBAAAA,YAAa,YAAY;YAC9C,IAAIzB,YAAYK,WAAW,OAAOqB;YAClC,MAAMf,OAAOL,OAAON,SAAS0B,MAAMnB;YACnC,OAAOI,SAASN,YAAYqB,OAAOhB,YAAYC,MAAMJ;QACvD;IACF;IACA,OAAOT;AACT;AAMA;;;;;;CAMC,GACD,OAAO,SAAS8B,mBAAmB,EACjCC,UAAU,EACVC,QAAQ,EACgB;IACxB,MAAMC,QAAQpC,QAAQ,IAAMkC,YAAY;QAACA;KAAW;IACpD,qBAAO,KAAChC,YAAYmC,QAAQ;QAACD,OAAOA;kBAAQD;;AAC9C;AAEA,4DAA4D,GAC5D,OAAO,SAASG;QACPvC;IAAP,QAAOA,cAAAA,WAAWG,wBAAXH,cAA2BsB;AACpC;AAEA,OAAO,SAASkB;IACd,OAAOD,gBAAgBhB,MAAM;AAC/B;AAEA;;;CAGC,GACD,OAAO,SAASkB;IACd,OAAOF,gBAAgBf,UAAU;AACnC;AAEA;;;;;;;;;CASC,GACD,OAAO,SAASkB,KAAKhB,EAAW;IAC9B,MAAMS,aAAaI;IACnB,OAAOtC,QACL,IAAM,CAACM,KAAKM,SAAWsB,WAAWV,CAAC,CAACC,IAAInB,KAAKM,SAC7C;QAACsB;QAAYT;KAAG;AAEpB;AAIA;;;;;;;;;CASC,GACD,OAAO,SAASiB;IACd,OAAOD;AACT"}
|
|
1
|
+
{"version":3,"sources":["../../src/i18n/i18n-context.tsx"],"sourcesContent":["'use client';\n\nimport {\n defaultLocale,\n type Formatters,\n type Locale,\n makeFormatters,\n} from '@entifix/core';\nimport {\n createContext,\n type PropsWithChildren,\n useContext,\n useMemo,\n} from 'react';\n\nimport { fallbackCatalogFor } from './fallback-catalogs.js';\n\n/**\n * Resolving a key to a sentence. The whole of what a control needs from an i18n\n * library, and deliberately not i18next's `TFunction`.\n *\n * ⚠️ **This port is what makes the controls adoptable on their own.** They used\n * to import `createI18n` directly, so taking a table meant taking i18next,\n * react-i18next and a Spanish catalog — the first of the three composition\n * defects the tier register was written to catch. The i18next binding now lives\n * behind `@entifix/react-controls/i18next`, and the peers it needs are optional.\n */\nexport type Translate = (\n key: string,\n params?: Record<string, unknown>,\n) => string;\n\nexport interface Translator {\n readonly locale: Locale;\n readonly formatters: Formatters;\n /** `ns` is the namespace a caller asked for, or the default when omitted. */\n t(\n ns: string | undefined,\n key: string,\n params?: Record<string, unknown>,\n ): string;\n}\n\nconst I18nContext = createContext<Translator | null>(null);\n\nlet fallback: Translator | undefined;\n\n/** `'table.filters'` → the string at that path, or `undefined`. */\nconst at = (catalog: object, key: string): string | undefined => {\n let node: unknown = catalog;\n for (const segment of key.split('.')) {\n if (typeof node !== 'object' || node === null) return undefined;\n node = (node as Record<string, unknown>)[segment];\n }\n return typeof node === 'string' ? node : undefined;\n};\n\n/**\n * Resolves a key, honouring i18next's `_one`/`_other` plural suffixes when the\n * caller passed a `count`.\n *\n * ⚠️ **Two plural forms, not a CLDR rule set.** i18next asks `Intl.PluralRules`\n * and handles languages with six categories; this covers the two that Spanish\n * and English have, which is what this package's own catalog is written in. An\n * adopter whose locale needs more than that wants the real thing — which is\n * what `@entifix/react-controls/i18next` is, and why it exists.\n */\nconst lookup = (\n catalog: object,\n key: string,\n params?: Record<string, unknown>,\n): string | undefined => {\n const count = params?.['count'];\n if (typeof count === 'number') {\n const plural = at(catalog, `${key}_${count === 1 ? 'one' : 'other'}`);\n if (plural !== undefined) return plural;\n }\n return at(catalog, key);\n};\n\nconst interpolate = (text: string, params?: Record<string, unknown>): string =>\n params === undefined\n ? text\n : text.replace(/\\{\\{\\s*([\\w.]+)\\s*\\}\\}/g, (whole, name: string) =>\n name in params ? String(params[name]) : whole,\n );\n\n/**\n * What a control renders when nobody mounted a provider — Storybook, a unit\n * spec, a page that forgot.\n *\n * Deliberately a working translator rather than a thrown error, unlike\n * `useTheme`. These controls render inside server components, and a control\n * that explodes on a missing ancestor is worse than one that renders the host's\n * default locale: the failure mode becomes \"this screen is in the default\n * language for a visitor who chose another\",\n * which the locale-switch e2e catches, not a blank page.\n *\n * It resolves against **this package's own catalog**, which is the point of the\n * catalog living here: the controls arrive already able to speak, so an adopter\n * who wants no i18n library at all still gets a working table rather than one\n * captioned `table.filters`. A key outside `controls` — a host's namespace, an\n * entity label — has nothing here to resolve against and comes back as itself.\n */\nfunction fallbackTranslator(): Translator {\n // Read on every call rather than once at load: a host declares its locales\n // from its own entry module, which may well evaluate after this one (#35).\n const locale = defaultLocale();\n if (fallback?.locale === locale) return fallback;\n fallback = {\n locale,\n formatters: makeFormatters(locale),\n t: (ns, key, params) => {\n // `useTranslateKey` hands over a fully qualified `entity:gadget.label`,\n // because a runtime key carries its own namespace. i18next strips the\n // prefix and answers with the bare key when it cannot resolve one, and\n // this matches that so swapping the binding in or out changes nothing a\n // caller can see.\n const [prefix, ...rest] = key.split(':');\n const qualified = rest.length > 0;\n const namespace = qualified ? prefix : ns;\n const bare = qualified ? rest.join(':') : key;\n\n // A host may default to a locale this package ships no copy for; its own\n // English then beats a raw key.\n const catalog =\n fallbackCatalogFor(namespace ?? 'controls', locale) ??\n fallbackCatalogFor(namespace ?? 'controls', 'en');\n if (catalog === undefined) return bare;\n const text = lookup(catalog, bare, params);\n return text === undefined ? bare : interpolate(text, params);\n },\n };\n return fallback;\n}\n\nexport interface TranslatorProviderProps extends PropsWithChildren {\n readonly translator: Translator;\n}\n\n/**\n * Binds one translator to the subtree.\n *\n * A host with no i18n library builds one of these by hand; a host using\n * i18next mounts `I18nProvider` from `@entifix/react-controls/i18next`, which\n * builds it from a per-locale instance.\n */\nexport function TranslatorProvider({\n translator,\n children,\n}: TranslatorProviderProps) {\n const value = useMemo(() => translator, [translator]);\n return <I18nContext.Provider value={value}>{children}</I18nContext.Provider>;\n}\n\n/** The translator in scope, or the key-returning fallback. */\nexport function useTranslator(): Translator {\n return useContext(I18nContext) ?? fallbackTranslator();\n}\n\nexport function useLocale(): Locale {\n return useTranslator().locale;\n}\n\n/**\n * Locale-aware `Intl` wrappers. Every date and number a control renders goes\n * through these so the server and the browser agree on the output.\n */\nexport function useFormatters(): Formatters {\n return useTranslator().formatters;\n}\n\n/**\n * The translate function for one namespace.\n *\n * ⚠️ **Typed by the host, not by this package.** TypeScript permits exactly one\n * `declare module 'i18next' { interface CustomTypeOptions }` per compilation, so\n * the catalogs can be owned per package but the type gate cannot — a second\n * declaration is `TS2717`. entifix therefore ships each namespace's `Resources`\n * type and the host composes the single augmentation, which is what keeps every\n * `useT('shell')` and `useT('app')` call site compiling exactly as before.\n */\nexport function useT(ns?: string): Translate {\n const translator = useTranslator();\n return useMemo(\n () => (key, params) => translator.t(ns, key, params),\n [translator, ns],\n );\n}\n\nexport type TranslateKey = Translate;\n\n/**\n * Resolves a key that is only known at runtime — an entity's `labelKey`, one\n * value out of an enum vocabulary.\n *\n * Deliberately separate from {@link useT}, which stays strict. This is the one\n * place the typed-key guarantee is given up, and it is given up for keys that\n * `@entifix/core` cannot type: core carries `labelKey` as an opaque string\n * because it has no catalogs to check it against. Authored copy must go through\n * `useT` so a typo stays a compile error.\n */\nexport function useTranslateKey(): TranslateKey {\n return useT();\n}\n"],"names":["defaultLocale","makeFormatters","createContext","useContext","useMemo","fallbackCatalogFor","I18nContext","fallback","at","catalog","key","node","segment","split","undefined","lookup","params","count","plural","interpolate","text","replace","whole","name","String","fallbackTranslator","locale","formatters","t","ns","prefix","rest","qualified","length","namespace","bare","join","TranslatorProvider","translator","children","value","Provider","useTranslator","useLocale","useFormatters","useT","useTranslateKey"],"mappings":"AAAA;;AAEA,SACE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Q,GAAGC,KAAK,GAAGrB,IAAIG,KAAK,CAAC;YACpC,MAAMmB,YAAYD,KAAKE,MAAM,GAAG;YAChC,MAAMC,YAAYF,YAAYF,SAASD;YACvC,MAAMM,OAAOH,YAAYD,KAAKK,IAAI,CAAC,OAAO1B;YAE1C,yEAAyE;YACzE,gCAAgC;YAChC,MAAMD,WACJJ,sBAAAA,mBAAmB6B,oBAAAA,YAAa,YAAYR,mBAA5CrB,sBACAA,mBAAmB6B,oBAAAA,YAAa,YAAY;YAC9C,IAAIzB,YAAYK,WAAW,OAAOqB;YAClC,MAAMf,OAAOL,OAAON,SAAS0B,MAAMnB;YACnC,OAAOI,SAASN,YAAYqB,OAAOhB,YAAYC,MAAMJ;QACvD;IACF;IACA,OAAOT;AACT;AAMA;;;;;;CAMC,GACD,OAAO,SAAS8B,mBAAmB,EACjCC,UAAU,EACVC,QAAQ,EACgB;IACxB,MAAMC,QAAQpC,QAAQ,IAAMkC,YAAY;QAACA;KAAW;IACpD,qBAAO,KAAChC,YAAYmC,QAAQ;QAACD,OAAOA;kBAAQD;;AAC9C;AAEA,4DAA4D,GAC5D,OAAO,SAASG;QACPvC;IAAP,QAAOA,cAAAA,WAAWG,wBAAXH,cAA2BsB;AACpC;AAEA,OAAO,SAASkB;IACd,OAAOD,gBAAgBhB,MAAM;AAC/B;AAEA;;;CAGC,GACD,OAAO,SAASkB;IACd,OAAOF,gBAAgBf,UAAU;AACnC;AAEA;;;;;;;;;CASC,GACD,OAAO,SAASkB,KAAKhB,EAAW;IAC9B,MAAMS,aAAaI;IACnB,OAAOtC,QACL,IAAM,CAACM,KAAKM,SAAWsB,WAAWV,CAAC,CAACC,IAAInB,KAAKM,SAC7C;QAACsB;QAAYT;KAAG;AAEpB;AAIA;;;;;;;;;CASC,GACD,OAAO,SAASiB;IACd,OAAOD;AACT"}
|
package/dist/index.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export * from './ui/layout/cover/index.js';
|
|
|
23
23
|
export * from './ui/layout/grid/index.js';
|
|
24
24
|
export * from './ui/layout/sidebar/index.js';
|
|
25
25
|
export * from './ui/layout/switcher/index.js';
|
|
26
|
+
export * from './ui/molecules/action-bar/index.js';
|
|
26
27
|
export * from './ui/molecules/breadcrumbs/index.js';
|
|
27
28
|
export * from './ui/molecules/bulk-action-bar/index.js';
|
|
28
29
|
export * from './ui/molecules/bulk-result/index.js';
|
|
@@ -36,15 +37,16 @@ export * from './ui/molecules/entity-link-input/index.js';
|
|
|
36
37
|
export * from './ui/molecules/entity-link-picker/index.js';
|
|
37
38
|
export * from './ui/molecules/entity-record-card/index.js';
|
|
38
39
|
export * from './ui/molecules/filter-builder/index.js';
|
|
40
|
+
export * from './ui/molecules/filter-chips/index.js';
|
|
39
41
|
export * from './ui/molecules/loading-boundary/index.js';
|
|
40
42
|
export * from './ui/molecules/media-gallery/index.js';
|
|
41
43
|
export * from './ui/molecules/menu/index.js';
|
|
42
44
|
export * from './ui/molecules/nav-menu/index.js';
|
|
43
45
|
export * from './ui/molecules/pagination/index.js';
|
|
46
|
+
export * from './ui/molecules/region-state/index.js';
|
|
44
47
|
export * from './ui/molecules/segmented-control/index.js';
|
|
45
48
|
export * from './ui/molecules/segmented-nav/index.js';
|
|
46
49
|
export * from './ui/molecules/sort-builder/index.js';
|
|
47
|
-
export * from './ui/molecules/split-button/index.js';
|
|
48
50
|
export * from './ui/molecules/split-view/index.js';
|
|
49
51
|
export * from './ui/molecules/stack/index.js';
|
|
50
52
|
export * from './ui/molecules/tab-strip/index.js';
|
|
@@ -62,6 +64,8 @@ export * from './ui/utils/active-section/index.js';
|
|
|
62
64
|
export * from './ui/utils/cn.js';
|
|
63
65
|
export * from './ui/utils/fold-script/index.js';
|
|
64
66
|
export * from './ui/utils/keep-section/index.js';
|
|
67
|
+
export * from './ui/utils/live-updates.js';
|
|
65
68
|
export * from './ui/utils/media-query/index.js';
|
|
66
|
-
export
|
|
69
|
+
export { useFocusOnArrival } from './ui/utils/use-focus-on-arrival.js';
|
|
70
|
+
export { type HotkeyOptions, type HotkeyScope, HotkeyScopeProvider, PAGE_SCOPE, useHotkey, } from './ui/utils/use-hotkey.js';
|
|
67
71
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mCAAmC,CAAC;AAClD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mCAAmC,CAAC;AAClD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kCAAkC,CAAC;AACjD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,yCAAyC,CAAC;AACxD,cAAc,qCAAqC,CAAC;AACpD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yCAAyC,CAAC;AACxD,cAAc,wCAAwC,CAAC;AACvD,cAAc,0CAA0C,CAAC;AACzD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qCAAqC,CAAC;AACpD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,4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C;AAC1D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC;AACrD,cAAc,0CAA0C,CAAC;AACzD,cAAc,uCAAuC,CAAC;AACtD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,sCAAsC,CAAC;AACrD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,uCAAuC,CAAC;AACtD,cAAc,sCAAsC,CAAC;AACrD,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC;AACrD,cAAc,yCAAyC,CAAC;AACxD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,qCAAqC,CAAC;AACpD,cAAc,sCAAsC,CAAC;AACrD,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AACnD,cAAc,oCAAoC,CAAC;AACnD,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,mBAAmB,EACnB,UAAU,EACV,SAAS,GACV,MAAM,0BAA0B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -23,6 +23,7 @@ export * from './ui/layout/cover/index.js';
|
|
|
23
23
|
export * from './ui/layout/grid/index.js';
|
|
24
24
|
export * from './ui/layout/sidebar/index.js';
|
|
25
25
|
export * from './ui/layout/switcher/index.js';
|
|
26
|
+
export * from './ui/molecules/action-bar/index.js';
|
|
26
27
|
export * from './ui/molecules/breadcrumbs/index.js';
|
|
27
28
|
export * from './ui/molecules/bulk-action-bar/index.js';
|
|
28
29
|
export * from './ui/molecules/bulk-result/index.js';
|
|
@@ -36,15 +37,16 @@ export * from './ui/molecules/entity-link-input/index.js';
|
|
|
36
37
|
export * from './ui/molecules/entity-link-picker/index.js';
|
|
37
38
|
export * from './ui/molecules/entity-record-card/index.js';
|
|
38
39
|
export * from './ui/molecules/filter-builder/index.js';
|
|
40
|
+
export * from './ui/molecules/filter-chips/index.js';
|
|
39
41
|
export * from './ui/molecules/loading-boundary/index.js';
|
|
40
42
|
export * from './ui/molecules/media-gallery/index.js';
|
|
41
43
|
export * from './ui/molecules/menu/index.js';
|
|
42
44
|
export * from './ui/molecules/nav-menu/index.js';
|
|
43
45
|
export * from './ui/molecules/pagination/index.js';
|
|
46
|
+
export * from './ui/molecules/region-state/index.js';
|
|
44
47
|
export * from './ui/molecules/segmented-control/index.js';
|
|
45
48
|
export * from './ui/molecules/segmented-nav/index.js';
|
|
46
49
|
export * from './ui/molecules/sort-builder/index.js';
|
|
47
|
-
export * from './ui/molecules/split-button/index.js';
|
|
48
50
|
export * from './ui/molecules/split-view/index.js';
|
|
49
51
|
export * from './ui/molecules/stack/index.js';
|
|
50
52
|
export * from './ui/molecules/tab-strip/index.js';
|
|
@@ -62,7 +64,9 @@ export * from './ui/utils/active-section/index.js';
|
|
|
62
64
|
export * from './ui/utils/cn.js';
|
|
63
65
|
export * from './ui/utils/fold-script/index.js';
|
|
64
66
|
export * from './ui/utils/keep-section/index.js';
|
|
67
|
+
export * from './ui/utils/live-updates.js';
|
|
65
68
|
export * from './ui/utils/media-query/index.js';
|
|
66
|
-
export
|
|
69
|
+
export { useFocusOnArrival } from './ui/utils/use-focus-on-arrival.js';
|
|
70
|
+
export { HotkeyScopeProvider, PAGE_SCOPE, useHotkey } from './ui/utils/use-hotkey.js';
|
|
67
71
|
|
|
68
72
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './i18n/index.js';\nexport * from './preferences/index.js';\nexport * from './theme/index.js';\nexport * from './ui/actions/index.js';\nexport * from './ui/atoms/alert/index.js';\nexport * from './ui/atoms/button/index.js';\nexport * from './ui/atoms/cell-value/index.js';\nexport * from './ui/atoms/external-link/index.js';\nexport * from './ui/atoms/field/index.js';\nexport * from './ui/atoms/field-control/index.js';\nexport * from './ui/atoms/localized-field-control/index.js';\nexport * from './ui/atoms/money/index.js';\nexport * from './ui/atoms/number-input/index.js';\nexport * from './ui/atoms/skeleton/index.js';\nexport * from './ui/atoms/status-tag/index.js';\nexport * from './ui/atoms/switch/index.js';\nexport * from './ui/atoms/table/index.js';\nexport * from './ui/atoms/text/index.js';\nexport * from './ui/layout/box/index.js';\nexport * from './ui/layout/center/index.js';\nexport * from './ui/layout/cluster/index.js';\nexport * from './ui/layout/cover/index.js';\nexport * from './ui/layout/grid/index.js';\nexport * from './ui/layout/sidebar/index.js';\nexport * from './ui/layout/switcher/index.js';\nexport * from './ui/molecules/breadcrumbs/index.js';\nexport * from './ui/molecules/bulk-action-bar/index.js';\nexport * from './ui/molecules/bulk-result/index.js';\nexport * from './ui/molecules/card/index.js';\nexport * from './ui/molecules/column-settings/index.js';\nexport * from './ui/molecules/confirm-dialog/index.js';\nexport * from './ui/molecules/description-list/index.js';\nexport * from './ui/molecules/drawer/index.js';\nexport * from './ui/molecules/empty-state/index.js';\nexport * from './ui/molecules/entity-link-input/index.js';\nexport * from './ui/molecules/entity-link-picker/index.js';\nexport * from './ui/molecules/entity-record-card/index.js';\nexport * from './ui/molecules/filter-builder/index.js';\nexport * from './ui/molecules/loading-boundary/index.js';\nexport * from './ui/molecules/media-gallery/index.js';\nexport * from './ui/molecules/menu/index.js';\nexport * from './ui/molecules/nav-menu/index.js';\nexport * from './ui/molecules/pagination/index.js';\nexport * from './ui/molecules/
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './i18n/index.js';\nexport * from './preferences/index.js';\nexport * from './theme/index.js';\nexport * from './ui/actions/index.js';\nexport * from './ui/atoms/alert/index.js';\nexport * from './ui/atoms/button/index.js';\nexport * from './ui/atoms/cell-value/index.js';\nexport * from './ui/atoms/external-link/index.js';\nexport * from './ui/atoms/field/index.js';\nexport * from './ui/atoms/field-control/index.js';\nexport * from './ui/atoms/localized-field-control/index.js';\nexport * from './ui/atoms/money/index.js';\nexport * from './ui/atoms/number-input/index.js';\nexport * from './ui/atoms/skeleton/index.js';\nexport * from './ui/atoms/status-tag/index.js';\nexport * from './ui/atoms/switch/index.js';\nexport * from './ui/atoms/table/index.js';\nexport * from './ui/atoms/text/index.js';\nexport * from './ui/layout/box/index.js';\nexport * from './ui/layout/center/index.js';\nexport * from './ui/layout/cluster/index.js';\nexport * from './ui/layout/cover/index.js';\nexport * from './ui/layout/grid/index.js';\nexport * from './ui/layout/sidebar/index.js';\nexport * from './ui/layout/switcher/index.js';\nexport * from './ui/molecules/action-bar/index.js';\nexport * from './ui/molecules/breadcrumbs/index.js';\nexport * from './ui/molecules/bulk-action-bar/index.js';\nexport * from './ui/molecules/bulk-result/index.js';\nexport * from './ui/molecules/card/index.js';\nexport * from './ui/molecules/column-settings/index.js';\nexport * from './ui/molecules/confirm-dialog/index.js';\nexport * from './ui/molecules/description-list/index.js';\nexport * from './ui/molecules/drawer/index.js';\nexport * from './ui/molecules/empty-state/index.js';\nexport * from './ui/molecules/entity-link-input/index.js';\nexport * from './ui/molecules/entity-link-picker/index.js';\nexport * from './ui/molecules/entity-record-card/index.js';\nexport * from './ui/molecules/filter-builder/index.js';\nexport * from './ui/molecules/filter-chips/index.js';\nexport * from './ui/molecules/loading-boundary/index.js';\nexport * from './ui/molecules/media-gallery/index.js';\nexport * from './ui/molecules/menu/index.js';\nexport * from './ui/molecules/nav-menu/index.js';\nexport * from './ui/molecules/pagination/index.js';\nexport * from './ui/molecules/region-state/index.js';\nexport * from './ui/molecules/segmented-control/index.js';\nexport * from './ui/molecules/segmented-nav/index.js';\nexport * from './ui/molecules/sort-builder/index.js';\nexport * from './ui/molecules/split-view/index.js';\nexport * from './ui/molecules/stack/index.js';\nexport * from './ui/molecules/tab-strip/index.js';\nexport * from './ui/molecules/table-toolbar/index.js';\nexport * from './ui/molecules/theme-switcher/index.js';\nexport * from './ui/molecules/toast-region/index.js';\nexport * from './ui/organisms/command-palette/index.js';\nexport * from './ui/organisms/entity-detail-grid/index.js';\nexport * from './ui/organisms/entity-form/index.js';\nexport * from './ui/organisms/entity-table/index.js';\nexport * from './ui/organisms/top-bar/index.js';\nexport * from './ui/organisms/wizard/index.js';\nexport * from './ui/utils/active-heading/index.js';\nexport * from './ui/utils/active-section/index.js';\nexport * from './ui/utils/cn.js';\nexport * from './ui/utils/fold-script/index.js';\nexport * from './ui/utils/keep-section/index.js';\nexport * from './ui/utils/live-updates.js';\nexport * from './ui/utils/media-query/index.js';\nexport { useFocusOnArrival } from './ui/utils/use-focus-on-arrival.js';\nexport {\n type HotkeyOptions,\n type HotkeyScope,\n HotkeyScopeProvider,\n PAGE_SCOPE,\n useHotkey,\n} from './ui/utils/use-hotkey.js';\n"],"names":["useFocusOnArrival","HotkeyScopeProvider","PAGE_SCOPE","useHotkey"],"mappings":"AAAA,cAAc,kBAAkB;AAChC,cAAc,yBAAyB;AACvC,cAAc,mBAAmB;AACjC,cAAc,wBAAwB;AACtC,cAAc,4BAA4B;AAC1C,cAAc,6BAA6B;AAC3C,cAAc,iCAAiC;AAC/C,cAAc,oCAAoC;AAClD,cAAc,4BAA4B;AAC1C,cAAc,oCAAoC;AAClD,cAAc,8CAA8C;AAC5D,cAAc,4BAA4B;AAC1C,cAAc,mCAAmC;AACjD,cAAc,+BAA+B;AAC7C,cAAc,iCAAiC;AAC/C,cAAc,6BAA6B;AAC3C,cAAc,4BAA4B;AAC1C,cAAc,2BAA2B;AACzC,cAAc,2BAA2B;AACzC,cAAc,8BAA8B;AAC5C,cAAc,+BAA+B;AAC7C,cAAc,6BAA6B;AAC3C,cAAc,4BAA4B;AAC1C,cAAc,+BAA+B;AAC7C,cAAc,gCAAgC;AAC9C,cAAc,qCAAqC;AACnD,cAAc,sCAAsC;AACpD,cAAc,0CAA0C;AACxD,cAAc,sCAAsC;AACpD,cAAc,+BAA+B;AAC7C,cAAc,0CAA0C;AACxD,cAAc,yCAAyC;AACvD,cAAc,2CAA2C;AACzD,cAAc,iCAAiC;AAC/C,cAAc,sCAAsC;AACpD,cAAc,4CAA4C;AAC1D,cAAc,6CAA6C;AAC3D,cAAc,6CAA6C;AAC3D,cAAc,yCAAyC;AACvD,cAAc,uCAAuC;AACrD,cAAc,2CAA2C;AACzD,cAAc,wCAAwC;AACtD,cAAc,+BAA+B;AAC7C,cAAc,mCAAmC;AACjD,cAAc,qCAAqC;AACnD,cAAc,uCAAuC;AACrD,cAAc,4CAA4C;AAC1D,cAAc,wCAAwC;AACtD,cAAc,uCAAuC;AACrD,cAAc,qCAAqC;AACnD,cAAc,gCAAgC;AAC9C,cAAc,oCAAoC;AAClD,cAAc,wCAAwC;AACtD,cAAc,yCAAyC;AACvD,cAAc,uCAAuC;AACrD,cAAc,0CAA0C;AACxD,cAAc,6CAA6C;AAC3D,cAAc,sCAAsC;AACpD,cAAc,uCAAuC;AACrD,cAAc,kCAAkC;AAChD,cAAc,iCAAiC;AAC/C,cAAc,qCAAqC;AACnD,cAAc,qCAAqC;AACnD,cAAc,mBAAmB;AACjC,cAAc,kCAAkC;AAChD,cAAc,mCAAmC;AACjD,cAAc,6BAA6B;AAC3C,cAAc,kCAAkC;AAChD,SAASA,iBAAiB,QAAQ,qCAAqC;AACvE,SAGEC,mBAAmB,EACnBC,UAAU,EACVC,SAAS,QACJ,2BAA2B"}
|
package/dist/primitives.d.ts
CHANGED
|
@@ -30,7 +30,6 @@ export * from './ui/molecules/nav-menu/index.js';
|
|
|
30
30
|
export * from './ui/molecules/pagination/index.js';
|
|
31
31
|
export * from './ui/molecules/segmented-control/index.js';
|
|
32
32
|
export * from './ui/molecules/segmented-nav/index.js';
|
|
33
|
-
export * from './ui/molecules/split-button/index.js';
|
|
34
33
|
export * from './ui/molecules/split-view/index.js';
|
|
35
34
|
export * from './ui/molecules/stack/index.js';
|
|
36
35
|
export * from './ui/molecules/tab-strip/index.js';
|
package/dist/primitives.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../src/primitives.ts"],"names":[],"mappings":"AAyBA,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AAGjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mCAAmC,CAAC;AAClD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kCAAkC,CAAC;AACjD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AAIzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAG9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wCAAwC,CAAC;AACvD,cAAc,0CAA0C,CAAC;AACzD,cAAc,qCAAqC,CAAC;AACpD,cAAc,0CAA0C,CAAC;AACzD,cAAc,uCAAuC,CAAC;AACtD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,uCAAuC,CAAC;AACtD,cAAc,
|
|
1
|
+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@ -58,7 +58,6 @@ export * from './ui/molecules/nav-menu/index.js';
|
|
|
58
58
|
export * from './ui/molecules/pagination/index.js';
|
|
59
59
|
export * from './ui/molecules/segmented-control/index.js';
|
|
60
60
|
export * from './ui/molecules/segmented-nav/index.js';
|
|
61
|
-
export * from './ui/molecules/split-button/index.js';
|
|
62
61
|
export * from './ui/molecules/split-view/index.js';
|
|
63
62
|
export * from './ui/molecules/stack/index.js';
|
|
64
63
|
export * from './ui/molecules/tab-strip/index.js';
|
package/dist/primitives.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/primitives.ts"],"sourcesContent":["// The entity-free half of the design system, published as\n// `@entifix/react-controls/primitives`.\n//\n// It exists because the package's main barrel is one flat re-export of\n// everything, and a bundler cannot drop what a module graph reaches: a\n// storefront page importing `Card` from `.` pulled `EntityTable`,\n// `FilterBuilder`, `SortBuilder`, `ColumnSettings` and the RSQL machinery\n// behind them into its client bundle — 541 KB of back-office UI shipped to a\n// visitor looking at a product.\n//\n// The line drawn here is not \"small vs large\", it is **presentational vs\n// entity-aware**: everything below can be understood without knowing what an\n// entity is. Anything that reads entity metadata (`CellValue`, `FieldControl`,\n// `EntityTable`, `EntityForm`, the filter/sort/column builders, the link\n// inputs) stays behind the main entry, where the back-office already imports it.\n//\n// Consumers that need both may import both; nothing is duplicated, and the main\n// barrel keeps re-exporting all of this so no existing import breaks.\n\n// Providers every app mounts, whatever it renders.\n//\n// `./preferences` is deliberately **not** here. The UI-preferences store is\n// backed by Effect `Layer`s, so re-exporting it drags the whole Effect runtime\n// into the browser — and what it remembers (column visibility, table density)\n// only exists in the back-office. A storefront has no preferences to store.\nexport * from './i18n/index.js';\nexport * from './theme/index.js';\n\n// Atoms — text, buttons, fields, tables, loading placeholders.\nexport * from './ui/atoms/alert/index.js';\nexport * from './ui/atoms/button/index.js';\nexport * from './ui/atoms/external-link/index.js';\nexport * from './ui/atoms/field/index.js';\nexport * from './ui/atoms/money/index.js';\nexport * from './ui/atoms/number-input/index.js';\nexport * from './ui/atoms/skeleton/index.js';\nexport * from './ui/atoms/status-tag/index.js';\nexport * from './ui/atoms/switch/index.js';\nexport * from './ui/atoms/table/index.js';\nexport * from './ui/atoms/text/index.js';\n\n// Layout primitives (Every Layout): flex-first, with `Grid` the one CSS-Grid\n// escape hatch.\nexport * from './ui/layout/box/index.js';\nexport * from './ui/layout/center/index.js';\nexport * from './ui/layout/cluster/index.js';\nexport * from './ui/layout/cover/index.js';\nexport * from './ui/layout/grid/index.js';\nexport * from './ui/layout/sidebar/index.js';\nexport * from './ui/layout/switcher/index.js';\n\n// Molecules that compose the above and nothing else.\nexport * from './ui/molecules/breadcrumbs/index.js';\nexport * from './ui/molecules/card/index.js';\nexport * from './ui/molecules/confirm-dialog/index.js';\nexport * from './ui/molecules/description-list/index.js';\nexport * from './ui/molecules/empty-state/index.js';\nexport * from './ui/molecules/loading-boundary/index.js';\nexport * from './ui/molecules/media-gallery/index.js';\nexport * from './ui/molecules/menu/index.js';\nexport * from './ui/molecules/nav-menu/index.js';\nexport * from './ui/molecules/pagination/index.js';\nexport * from './ui/molecules/segmented-control/index.js';\nexport * from './ui/molecules/segmented-nav/index.js';\nexport * from './ui/molecules/split-
|
|
1
|
+
{"version":3,"sources":["../src/primitives.ts"],"sourcesContent":["// The entity-free half of the design system, published as\n// `@entifix/react-controls/primitives`.\n//\n// It exists because the package's main barrel is one flat re-export of\n// everything, and a bundler cannot drop what a module graph reaches: a\n// storefront page importing `Card` from `.` pulled `EntityTable`,\n// `FilterBuilder`, `SortBuilder`, `ColumnSettings` and the RSQL machinery\n// behind them into its client bundle — 541 KB of back-office UI shipped to a\n// visitor looking at a product.\n//\n// The line drawn here is not \"small vs large\", it is **presentational vs\n// entity-aware**: everything below can be understood without knowing what an\n// entity is. Anything that reads entity metadata (`CellValue`, `FieldControl`,\n// `EntityTable`, `EntityForm`, the filter/sort/column builders, the link\n// inputs) stays behind the main entry, where the back-office already imports it.\n//\n// Consumers that need both may import both; nothing is duplicated, and the main\n// barrel keeps re-exporting all of this so no existing import breaks.\n\n// Providers every app mounts, whatever it renders.\n//\n// `./preferences` is deliberately **not** here. The UI-preferences store is\n// backed by Effect `Layer`s, so re-exporting it drags the whole Effect runtime\n// into the browser — and what it remembers (column visibility, table density)\n// only exists in the back-office. A storefront has no preferences to store.\nexport * from './i18n/index.js';\nexport * from './theme/index.js';\n\n// Atoms — text, buttons, fields, tables, loading placeholders.\nexport * from './ui/atoms/alert/index.js';\nexport * from './ui/atoms/button/index.js';\nexport * from './ui/atoms/external-link/index.js';\nexport * from './ui/atoms/field/index.js';\nexport * from './ui/atoms/money/index.js';\nexport * from './ui/atoms/number-input/index.js';\nexport * from './ui/atoms/skeleton/index.js';\nexport * from './ui/atoms/status-tag/index.js';\nexport * from './ui/atoms/switch/index.js';\nexport * from './ui/atoms/table/index.js';\nexport * from './ui/atoms/text/index.js';\n\n// Layout primitives (Every Layout): flex-first, with `Grid` the one CSS-Grid\n// escape hatch.\nexport * from './ui/layout/box/index.js';\nexport * from './ui/layout/center/index.js';\nexport * from './ui/layout/cluster/index.js';\nexport * from './ui/layout/cover/index.js';\nexport * from './ui/layout/grid/index.js';\nexport * from './ui/layout/sidebar/index.js';\nexport * from './ui/layout/switcher/index.js';\n\n// Molecules that compose the above and nothing else.\nexport * from './ui/molecules/breadcrumbs/index.js';\nexport * from './ui/molecules/card/index.js';\nexport * from './ui/molecules/confirm-dialog/index.js';\nexport * from './ui/molecules/description-list/index.js';\nexport * from './ui/molecules/empty-state/index.js';\nexport * from './ui/molecules/loading-boundary/index.js';\nexport * from './ui/molecules/media-gallery/index.js';\nexport * from './ui/molecules/menu/index.js';\nexport * from './ui/molecules/nav-menu/index.js';\nexport * from './ui/molecules/pagination/index.js';\nexport * from './ui/molecules/segmented-control/index.js';\nexport * from './ui/molecules/segmented-nav/index.js';\nexport * from './ui/molecules/split-view/index.js';\nexport * from './ui/molecules/stack/index.js';\nexport * from './ui/molecules/tab-strip/index.js';\nexport * from './ui/molecules/theme-switcher/index.js';\nexport * from './ui/utils/active-heading/index.js';\nexport * from './ui/utils/active-section/index.js';\nexport * from './ui/utils/cn.js';\nexport * from './ui/utils/fold-script/index.js';\nexport * from './ui/utils/keep-section/index.js';\nexport * from './ui/utils/media-query/index.js';\n"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,wCAAwC;AACxC,EAAE;AACF,uEAAuE;AACvE,uEAAuE;AACvE,kEAAkE;AAClE,0EAA0E;AAC1E,6EAA6E;AAC7E,gCAAgC;AAChC,EAAE;AACF,yEAAyE;AACzE,6EAA6E;AAC7E,+EAA+E;AAC/E,yEAAyE;AACzE,iFAAiF;AACjF,EAAE;AACF,gFAAgF;AAChF,sEAAsE;AAEtE,mDAAmD;AACnD,EAAE;AACF,4EAA4E;AAC5E,+EAA+E;AAC/E,8EAA8E;AAC9E,4EAA4E;AAC5E,cAAc,kBAAkB;AAChC,cAAc,mBAAmB;AAEjC,+DAA+D;AAC/D,cAAc,4BAA4B;AAC1C,cAAc,6BAA6B;AAC3C,cAAc,oCAAoC;AAClD,cAAc,4BAA4B;AAC1C,cAAc,4BAA4B;AAC1C,cAAc,mCAAmC;AACjD,cAAc,+BAA+B;AAC7C,cAAc,iCAAiC;AAC/C,cAAc,6BAA6B;AAC3C,cAAc,4BAA4B;AAC1C,cAAc,2BAA2B;AAEzC,6EAA6E;AAC7E,gBAAgB;AAChB,cAAc,2BAA2B;AACzC,cAAc,8BAA8B;AAC5C,cAAc,+BAA+B;AAC7C,cAAc,6BAA6B;AAC3C,cAAc,4BAA4B;AAC1C,cAAc,+BAA+B;AAC7C,cAAc,gCAAgC;AAE9C,qDAAqD;AACrD,cAAc,sCAAsC;AACpD,cAAc,+BAA+B;AAC7C,cAAc,yCAAyC;AACvD,cAAc,2CAA2C;AACzD,cAAc,sCAAsC;AACpD,cAAc,2CAA2C;AACzD,cAAc,wCAAwC;AACtD,cAAc,+BAA+B;AAC7C,cAAc,mCAAmC;AACjD,cAAc,qCAAqC;AACnD,cAAc,4CAA4C;AAC1D,cAAc,wCAAwC;AACtD,cAAc,qCAAqC;AACnD,cAAc,gCAAgC;AAC9C,cAAc,oCAAoC;AAClD,cAAc,yCAAyC;AACvD,cAAc,qCAAqC;AACnD,cAAc,qCAAqC;AACnD,cAAc,mBAAmB;AACjC,cAAc,kCAAkC;AAChD,cAAc,mCAAmC;AACjD,cAAc,kCAAkC"}
|
package/dist/theme/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC"}
|
package/dist/theme/index.js
CHANGED
package/dist/theme/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/theme/index.ts"],"sourcesContent":["export * from './theme-context.js';\nexport * from './theme-script.js';\nexport * from './types.js';\n"],"names":[],"mappings":"AAAA,cAAc,qBAAqB;AACnC,cAAc,oBAAoB;AAClC,cAAc,aAAa"}
|
|
1
|
+
{"version":3,"sources":["../../src/theme/index.ts"],"sourcesContent":["export * from './theme-context.js';\nexport * from './theme-cookie.js';\nexport * from './theme-script.js';\nexport * from './types.js';\n"],"names":[],"mappings":"AAAA,cAAc,qBAAqB;AACnC,cAAc,oBAAoB;AAClC,cAAc,oBAAoB;AAClC,cAAc,aAAa"}
|