@entifix/react-controls 0.18.2 → 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 +13 -5
- package/dist/i18n/catalog/en.d.ts.map +1 -1
- package/dist/i18n/catalog/en.js +68 -10
- package/dist/i18n/catalog/en.js.map +1 -1
- package/dist/i18n/catalog/es.d.ts +76 -5
- package/dist/i18n/catalog/es.d.ts.map +1 -1
- package/dist/i18n/catalog/es.js +74 -10
- package/dist/i18n/catalog/es.js.map +1 -1
- package/dist/i18n/catalog/index.d.ts +126 -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 +13 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -2
- package/dist/index.js.map +1 -1
- package/dist/primitives.d.ts +7 -1
- package/dist/primitives.d.ts.map +1 -1
- package/dist/primitives.js +7 -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 +35 -7
- package/dist/theme/theme-context.d.ts.map +1 -1
- package/dist/theme/theme-context.js +109 -21
- 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 -5
- package/dist/theme/theme-script.d.ts.map +1 -1
- package/dist/theme/theme-script.js +24 -10
- package/dist/theme/theme-script.js.map +1 -1
- package/dist/theme/types.d.ts +19 -3
- package/dist/theme/types.d.ts.map +1 -1
- package/dist/theme/types.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/alert/alert-dismiss.d.ts +9 -0
- package/dist/ui/atoms/alert/alert-dismiss.d.ts.map +1 -0
- package/dist/ui/atoms/alert/alert-dismiss.js +28 -0
- package/dist/ui/atoms/alert/alert-dismiss.js.map +1 -0
- package/dist/ui/atoms/alert/alert.d.ts +24 -0
- package/dist/ui/atoms/alert/alert.d.ts.map +1 -0
- package/dist/ui/atoms/alert/alert.js +50 -0
- package/dist/ui/atoms/alert/alert.js.map +1 -0
- package/dist/ui/atoms/alert/index.d.ts +3 -0
- package/dist/ui/atoms/alert/index.d.ts.map +1 -0
- package/dist/ui/atoms/alert/index.js +4 -0
- package/dist/ui/atoms/alert/index.js.map +1 -0
- package/dist/ui/atoms/alert/tone.d.ts +8 -0
- package/dist/ui/atoms/alert/tone.d.ts.map +1 -0
- package/dist/ui/atoms/alert/tone.js +11 -0
- package/dist/ui/atoms/alert/tone.js.map +1 -0
- package/dist/ui/atoms/button/button-recipe.js +1 -1
- package/dist/ui/atoms/button/button-recipe.js.map +1 -1
- package/dist/ui/atoms/button/index.d.ts +1 -0
- package/dist/ui/atoms/button/index.d.ts.map +1 -1
- package/dist/ui/atoms/button/index.js +1 -0
- package/dist/ui/atoms/button/index.js.map +1 -1
- package/dist/ui/atoms/button/submit-button.d.ts +13 -0
- package/dist/ui/atoms/button/submit-button.d.ts.map +1 -0
- package/dist/ui/atoms/button/submit-button.js +29 -0
- package/dist/ui/atoms/button/submit-button.js.map +1 -0
- package/dist/ui/atoms/cell-value/cell-value.d.ts +6 -1
- package/dist/ui/atoms/cell-value/cell-value.d.ts.map +1 -1
- package/dist/ui/atoms/cell-value/cell-value.js +48 -16
- package/dist/ui/atoms/cell-value/cell-value.js.map +1 -1
- package/dist/ui/atoms/field/checkbox.d.ts.map +1 -1
- package/dist/ui/atoms/field/checkbox.js +21 -1
- package/dist/ui/atoms/field/checkbox.js.map +1 -1
- package/dist/ui/atoms/field/field.js +1 -1
- package/dist/ui/atoms/field/field.js.map +1 -1
- package/dist/ui/atoms/field-control/field-control.d.ts +7 -1
- package/dist/ui/atoms/field-control/field-control.d.ts.map +1 -1
- package/dist/ui/atoms/field-control/field-control.js +25 -3
- package/dist/ui/atoms/field-control/field-control.js.map +1 -1
- package/dist/ui/atoms/money/index.d.ts +4 -0
- package/dist/ui/atoms/money/index.d.ts.map +1 -0
- package/dist/ui/atoms/money/index.js +5 -0
- package/dist/ui/atoms/money/index.js.map +1 -0
- package/dist/ui/atoms/money/money-input.d.ts +19 -0
- package/dist/ui/atoms/money/money-input.d.ts.map +1 -0
- package/dist/ui/atoms/money/money-input.js +75 -0
- package/dist/ui/atoms/money/money-input.js.map +1 -0
- package/dist/ui/atoms/money/money-math.d.ts +21 -0
- package/dist/ui/atoms/money/money-math.d.ts.map +1 -0
- package/dist/ui/atoms/money/money-math.js +36 -0
- package/dist/ui/atoms/money/money-math.js.map +1 -0
- package/dist/ui/atoms/money/money.d.ts +19 -0
- package/dist/ui/atoms/money/money.d.ts.map +1 -0
- package/dist/ui/atoms/money/money.js +26 -0
- package/dist/ui/atoms/money/money.js.map +1 -0
- package/dist/ui/atoms/number-input/index.d.ts +3 -0
- package/dist/ui/atoms/number-input/index.d.ts.map +1 -0
- package/dist/ui/atoms/number-input/index.js +4 -0
- package/dist/ui/atoms/number-input/index.js.map +1 -0
- package/dist/ui/atoms/number-input/number-input.d.ts +10 -0
- package/dist/ui/atoms/number-input/number-input.d.ts.map +1 -0
- package/dist/ui/atoms/number-input/number-input.js +23 -0
- package/dist/ui/atoms/number-input/number-input.js.map +1 -0
- package/dist/ui/atoms/number-input/quantity-input.d.ts +29 -0
- package/dist/ui/atoms/number-input/quantity-input.d.ts.map +1 -0
- package/dist/ui/atoms/number-input/quantity-input.js +100 -0
- package/dist/ui/atoms/number-input/quantity-input.js.map +1 -0
- package/dist/ui/atoms/skeleton/skeleton.js +1 -1
- package/dist/ui/atoms/skeleton/skeleton.js.map +1 -1
- package/dist/ui/atoms/status-tag/index.d.ts +2 -0
- package/dist/ui/atoms/status-tag/index.d.ts.map +1 -0
- package/dist/ui/atoms/status-tag/index.js +3 -0
- package/dist/ui/atoms/status-tag/index.js.map +1 -0
- package/dist/ui/atoms/status-tag/status-tag.d.ts +17 -0
- package/dist/ui/atoms/status-tag/status-tag.d.ts.map +1 -0
- package/dist/ui/atoms/status-tag/status-tag.js +37 -0
- package/dist/ui/atoms/status-tag/status-tag.js.map +1 -0
- package/dist/ui/atoms/switch/switch.d.ts.map +1 -1
- package/dist/ui/atoms/switch/switch.js +6 -3
- package/dist/ui/atoms/switch/switch.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/breadcrumbs/breadcrumbs.d.ts +11 -2
- package/dist/ui/molecules/breadcrumbs/breadcrumbs.d.ts.map +1 -1
- package/dist/ui/molecules/breadcrumbs/breadcrumbs.js +9 -7
- package/dist/ui/molecules/breadcrumbs/breadcrumbs.js.map +1 -1
- 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/column-settings/column-settings.js +1 -1
- package/dist/ui/molecules/column-settings/column-settings.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 +38 -13
- package/dist/ui/molecules/confirm-dialog/confirm-dialog.js.map +1 -1
- package/dist/ui/molecules/description-list/description-list.d.ts +17 -0
- package/dist/ui/molecules/description-list/description-list.d.ts.map +1 -0
- package/dist/ui/molecules/description-list/description-list.js +36 -0
- package/dist/ui/molecules/description-list/description-list.js.map +1 -0
- package/dist/ui/molecules/description-list/index.d.ts +2 -0
- package/dist/ui/molecules/description-list/index.d.ts.map +1 -0
- package/dist/ui/molecules/description-list/index.js +3 -0
- package/dist/ui/molecules/description-list/index.js.map +1 -0
- package/dist/ui/molecules/drawer/drawer.js +3 -3
- package/dist/ui/molecules/drawer/drawer.js.map +1 -1
- package/dist/ui/molecules/empty-state/empty-state.d.ts +15 -0
- package/dist/ui/molecules/empty-state/empty-state.d.ts.map +1 -0
- package/dist/ui/molecules/empty-state/empty-state.js +29 -0
- package/dist/ui/molecules/empty-state/empty-state.js.map +1 -0
- package/dist/ui/molecules/empty-state/index.d.ts +2 -0
- package/dist/ui/molecules/empty-state/index.d.ts.map +1 -0
- package/dist/ui/molecules/empty-state/index.js +3 -0
- package/dist/ui/molecules/empty-state/index.js.map +1 -0
- package/dist/ui/molecules/entity-link-input/entity-link-input.d.ts.map +1 -1
- package/dist/ui/molecules/entity-link-input/entity-link-input.js +7 -4
- package/dist/ui/molecules/entity-link-input/entity-link-input.js.map +1 -1
- package/dist/ui/molecules/entity-link-picker/entity-link-picker.js +2 -2
- package/dist/ui/molecules/entity-link-picker/entity-link-picker.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/media-gallery/index.d.ts +2 -0
- package/dist/ui/molecules/media-gallery/index.d.ts.map +1 -0
- package/dist/ui/molecules/media-gallery/index.js +3 -0
- package/dist/ui/molecules/media-gallery/index.js.map +1 -0
- package/dist/ui/molecules/media-gallery/media-gallery.d.ts +31 -0
- package/dist/ui/molecules/media-gallery/media-gallery.d.ts.map +1 -0
- package/dist/ui/molecules/media-gallery/media-gallery.js +64 -0
- package/dist/ui/molecules/media-gallery/media-gallery.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 +68 -6
- package/dist/ui/molecules/menu/menu.js.map +1 -1
- package/dist/ui/molecules/nav-menu/nav-menu.js +4 -4
- package/dist/ui/molecules/nav-menu/nav-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/segmented-nav/segment-classes.d.ts +3 -3
- package/dist/ui/molecules/segmented-nav/segment-classes.d.ts.map +1 -1
- package/dist/ui/molecules/segmented-nav/segment-classes.js +2 -2
- package/dist/ui/molecules/segmented-nav/segment-classes.js.map +1 -1
- package/dist/ui/molecules/segmented-nav/segmented-nav.d.ts +14 -4
- package/dist/ui/molecules/segmented-nav/segmented-nav.d.ts.map +1 -1
- package/dist/ui/molecules/segmented-nav/segmented-nav.js +6 -5
- package/dist/ui/molecules/segmented-nav/segmented-nav.js.map +1 -1
- package/dist/ui/molecules/split-view/split-view.js +3 -3
- package/dist/ui/molecules/split-view/split-view.js.map +1 -1
- package/dist/ui/molecules/tab-strip/tab-strip.d.ts +51 -12
- package/dist/ui/molecules/tab-strip/tab-strip.d.ts.map +1 -1
- package/dist/ui/molecules/tab-strip/tab-strip.js +125 -34
- package/dist/ui/molecules/tab-strip/tab-strip.js.map +1 -1
- 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 +25 -18
- 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 +8 -3
- 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 +325 -215
- 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 +334 -198
- 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;
|
|
@@ -106,9 +131,21 @@ export declare const controlsCatalogs: {
|
|
|
106
131
|
applyAria: string;
|
|
107
132
|
clearAria: string;
|
|
108
133
|
};
|
|
134
|
+
alert: {
|
|
135
|
+
dismiss: string;
|
|
136
|
+
};
|
|
137
|
+
quantity: {
|
|
138
|
+
decrease: string;
|
|
139
|
+
increase: string;
|
|
140
|
+
};
|
|
109
141
|
tabs: {
|
|
110
142
|
close: string;
|
|
111
143
|
new: string;
|
|
144
|
+
list: string;
|
|
145
|
+
withState: string;
|
|
146
|
+
dirty: string;
|
|
147
|
+
saving: string;
|
|
148
|
+
error: string;
|
|
112
149
|
};
|
|
113
150
|
link: {
|
|
114
151
|
search: string;
|
|
@@ -170,6 +207,11 @@ export declare const controlsCatalogs: {
|
|
|
170
207
|
isNull: string;
|
|
171
208
|
isNotNull: string;
|
|
172
209
|
};
|
|
210
|
+
density: {
|
|
211
|
+
label: string;
|
|
212
|
+
comfortable: string;
|
|
213
|
+
compact: string;
|
|
214
|
+
};
|
|
173
215
|
theme: {
|
|
174
216
|
label: string;
|
|
175
217
|
};
|
|
@@ -186,7 +228,23 @@ export declare const controlsCatalogs: {
|
|
|
186
228
|
confirm: {
|
|
187
229
|
confirm: string;
|
|
188
230
|
cancel: string;
|
|
189
|
-
|
|
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;
|
|
190
248
|
};
|
|
191
249
|
toast: {
|
|
192
250
|
region: string;
|
|
@@ -218,16 +276,17 @@ export declare const controlsCatalogs: {
|
|
|
218
276
|
};
|
|
219
277
|
readonly en: {
|
|
220
278
|
readonly controls: {
|
|
279
|
+
actions: {
|
|
280
|
+
more: string;
|
|
281
|
+
forRecord: string;
|
|
282
|
+
};
|
|
221
283
|
table: {
|
|
222
|
-
open: string;
|
|
223
284
|
select: string;
|
|
224
285
|
actions: string;
|
|
225
286
|
new: string;
|
|
226
287
|
filters: string;
|
|
227
288
|
sorting: string;
|
|
228
289
|
loading: string;
|
|
229
|
-
empty: string;
|
|
230
|
-
error: string;
|
|
231
290
|
selection: string;
|
|
232
291
|
selectRow: string;
|
|
233
292
|
expandRow: string;
|
|
@@ -238,6 +297,11 @@ export declare const controlsCatalogs: {
|
|
|
238
297
|
selectedCount_one: string;
|
|
239
298
|
selectedCount_other: string;
|
|
240
299
|
clearSelection: string;
|
|
300
|
+
results_one: string;
|
|
301
|
+
results_other: string;
|
|
302
|
+
noResultsFiltered: string;
|
|
303
|
+
caption: string;
|
|
304
|
+
captionSorted: string;
|
|
241
305
|
};
|
|
242
306
|
bulk: {
|
|
243
307
|
running: string;
|
|
@@ -260,17 +324,32 @@ export declare const controlsCatalogs: {
|
|
|
260
324
|
delete: string;
|
|
261
325
|
deleting: string;
|
|
262
326
|
clone: string;
|
|
263
|
-
moreActions: string;
|
|
264
327
|
back: string;
|
|
265
328
|
loading: string;
|
|
266
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;
|
|
267
343
|
};
|
|
268
344
|
pagination: {
|
|
269
345
|
label: string;
|
|
270
346
|
summary: string;
|
|
271
347
|
rows: string;
|
|
348
|
+
first: string;
|
|
272
349
|
previous: string;
|
|
273
350
|
next: string;
|
|
351
|
+
last: string;
|
|
352
|
+
page: string;
|
|
274
353
|
};
|
|
275
354
|
columns: {
|
|
276
355
|
title: string;
|
|
@@ -296,6 +375,10 @@ export declare const controlsCatalogs: {
|
|
|
296
375
|
remove: string;
|
|
297
376
|
applyAria: string;
|
|
298
377
|
clearAria: string;
|
|
378
|
+
applied: string;
|
|
379
|
+
removeChip: string;
|
|
380
|
+
clearAll: string;
|
|
381
|
+
withCount: string;
|
|
299
382
|
};
|
|
300
383
|
sort: {
|
|
301
384
|
by: string;
|
|
@@ -314,9 +397,21 @@ export declare const controlsCatalogs: {
|
|
|
314
397
|
applyAria: string;
|
|
315
398
|
clearAria: string;
|
|
316
399
|
};
|
|
400
|
+
alert: {
|
|
401
|
+
dismiss: string;
|
|
402
|
+
};
|
|
403
|
+
quantity: {
|
|
404
|
+
decrease: string;
|
|
405
|
+
increase: string;
|
|
406
|
+
};
|
|
317
407
|
tabs: {
|
|
318
408
|
close: string;
|
|
319
409
|
new: string;
|
|
410
|
+
list: string;
|
|
411
|
+
withState: string;
|
|
412
|
+
dirty: string;
|
|
413
|
+
saving: string;
|
|
414
|
+
error: string;
|
|
320
415
|
};
|
|
321
416
|
link: {
|
|
322
417
|
search: string;
|
|
@@ -378,6 +473,11 @@ export declare const controlsCatalogs: {
|
|
|
378
473
|
isNull: string;
|
|
379
474
|
isNotNull: string;
|
|
380
475
|
};
|
|
476
|
+
density: {
|
|
477
|
+
label: string;
|
|
478
|
+
comfortable: string;
|
|
479
|
+
compact: string;
|
|
480
|
+
};
|
|
381
481
|
theme: {
|
|
382
482
|
label: string;
|
|
383
483
|
};
|
|
@@ -394,7 +494,23 @@ export declare const controlsCatalogs: {
|
|
|
394
494
|
confirm: {
|
|
395
495
|
confirm: string;
|
|
396
496
|
cancel: string;
|
|
397
|
-
|
|
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;
|
|
398
514
|
};
|
|
399
515
|
toast: {
|
|
400
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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,gBAAgB,EACxB,IAAI,CAAC,EAAE,UAAU,GAAG,QAAQ,KACzB,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,CAAC;CACnC,KAAK,MAAM,CAaX"}
|
|
@@ -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,SACEA,aAAa,EAGbC,cAAc,QACT,gBAAgB;AACvB,SACEC,aAAa,EAEbC,UAAU,EACVC,OAAO,QACF,QAAQ;AAEf,SAASC,kBAAkB,QAAQ,yBAAyB;AA4B5D,MAAMC,4BAAcJ,cAAiC;AAErD,IAAIK;AAEJ,+DAA+D,GAC/D,MAAMC,KAAK,CAACC,SAAiBC;IAC3B,IAAIC,OAAgBF;IACpB,KAAK,MAAMG,WAAWF,IAAIG,KAAK,CAAC,KAAM;QACpC,IAAI,OAAOF,SAAS,YAAYA,SAAS,MAAM,OAAOG;QACtDH,OAAO,AAACA,IAAgC,CAACC,QAAQ;IACnD;IACA,OAAO,OAAOD,SAAS,WAAWA,OAAOG;AAC3C;AAEA;;;;;;;;;CASC,GACD,MAAMC,SAAS,CACbN,SACAC,KACAM;IAEA,MAAMC,QAAQD,0BAAAA,MAAQ,CAAC,QAAQ;IAC/B,IAAI,OAAOC,UAAU,UAAU;QAC7B,MAAMC,SAASV,GAAGC,SAAS,GAAGC,IAAI,CAAC,EAAEO,UAAU,IAAI,QAAQ,SAAS;QACpE,IAAIC,WAAWJ,WAAW,OAAOI;IACnC;IACA,OAAOV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;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,SACEA,aAAa,EAGbC,cAAc,QACT,gBAAgB;AACvB,SACEC,aAAa,EAEbC,UAAU,EACVC,OAAO,QACF,QAAQ;AAEf,SAASC,kBAAkB,QAAQ,yBAAyB;AA4B5D,MAAMC,4BAAcJ,cAAiC;AAErD,IAAIK;AAEJ,iEAAiE,GACjE,MAAMC,KAAK,CAACC,SAAiBC;IAC3B,IAAIC,OAAgBF;IACpB,KAAK,MAAMG,WAAWF,IAAIG,KAAK,CAAC,KAAM;QACpC,IAAI,OAAOF,SAAS,YAAYA,SAAS,MAAM,OAAOG;QACtDH,OAAO,AAACA,IAAgC,CAACC,QAAQ;IACnD;IACA,OAAO,OAAOD,SAAS,WAAWA,OAAOG;AAC3C;AAEA;;;;;;;;;CASC,GACD,MAAMC,SAAS,CACbN,SACAC,KACAM;IAEA,MAAMC,QAAQD,0BAAAA,MAAQ,CAAC,QAAQ;IAC/B,IAAI,OAAOC,UAAU,UAAU;QAC7B,MAAMC,SAASV,GAAGC,SAAS,GAAGC,IAAI,CAAC,EAAEO,UAAU,IAAI,QAAQ,SAAS;QACpE,IAAIC,WAAWJ,WAAW,OAAOI;IACnC;IACA,OAAOV,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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
|
@@ -2,13 +2,17 @@ export * from './i18n/index.js';
|
|
|
2
2
|
export * from './preferences/index.js';
|
|
3
3
|
export * from './theme/index.js';
|
|
4
4
|
export * from './ui/actions/index.js';
|
|
5
|
+
export * from './ui/atoms/alert/index.js';
|
|
5
6
|
export * from './ui/atoms/button/index.js';
|
|
6
7
|
export * from './ui/atoms/cell-value/index.js';
|
|
7
8
|
export * from './ui/atoms/external-link/index.js';
|
|
8
9
|
export * from './ui/atoms/field/index.js';
|
|
9
10
|
export * from './ui/atoms/field-control/index.js';
|
|
10
11
|
export * from './ui/atoms/localized-field-control/index.js';
|
|
12
|
+
export * from './ui/atoms/money/index.js';
|
|
13
|
+
export * from './ui/atoms/number-input/index.js';
|
|
11
14
|
export * from './ui/atoms/skeleton/index.js';
|
|
15
|
+
export * from './ui/atoms/status-tag/index.js';
|
|
12
16
|
export * from './ui/atoms/switch/index.js';
|
|
13
17
|
export * from './ui/atoms/table/index.js';
|
|
14
18
|
export * from './ui/atoms/text/index.js';
|
|
@@ -19,25 +23,30 @@ export * from './ui/layout/cover/index.js';
|
|
|
19
23
|
export * from './ui/layout/grid/index.js';
|
|
20
24
|
export * from './ui/layout/sidebar/index.js';
|
|
21
25
|
export * from './ui/layout/switcher/index.js';
|
|
26
|
+
export * from './ui/molecules/action-bar/index.js';
|
|
22
27
|
export * from './ui/molecules/breadcrumbs/index.js';
|
|
23
28
|
export * from './ui/molecules/bulk-action-bar/index.js';
|
|
24
29
|
export * from './ui/molecules/bulk-result/index.js';
|
|
25
30
|
export * from './ui/molecules/card/index.js';
|
|
26
31
|
export * from './ui/molecules/column-settings/index.js';
|
|
27
32
|
export * from './ui/molecules/confirm-dialog/index.js';
|
|
33
|
+
export * from './ui/molecules/description-list/index.js';
|
|
28
34
|
export * from './ui/molecules/drawer/index.js';
|
|
35
|
+
export * from './ui/molecules/empty-state/index.js';
|
|
29
36
|
export * from './ui/molecules/entity-link-input/index.js';
|
|
30
37
|
export * from './ui/molecules/entity-link-picker/index.js';
|
|
31
38
|
export * from './ui/molecules/entity-record-card/index.js';
|
|
32
39
|
export * from './ui/molecules/filter-builder/index.js';
|
|
40
|
+
export * from './ui/molecules/filter-chips/index.js';
|
|
33
41
|
export * from './ui/molecules/loading-boundary/index.js';
|
|
42
|
+
export * from './ui/molecules/media-gallery/index.js';
|
|
34
43
|
export * from './ui/molecules/menu/index.js';
|
|
35
44
|
export * from './ui/molecules/nav-menu/index.js';
|
|
36
45
|
export * from './ui/molecules/pagination/index.js';
|
|
46
|
+
export * from './ui/molecules/region-state/index.js';
|
|
37
47
|
export * from './ui/molecules/segmented-control/index.js';
|
|
38
48
|
export * from './ui/molecules/segmented-nav/index.js';
|
|
39
49
|
export * from './ui/molecules/sort-builder/index.js';
|
|
40
|
-
export * from './ui/molecules/split-button/index.js';
|
|
41
50
|
export * from './ui/molecules/split-view/index.js';
|
|
42
51
|
export * from './ui/molecules/stack/index.js';
|
|
43
52
|
export * from './ui/molecules/tab-strip/index.js';
|
|
@@ -55,6 +64,8 @@ export * from './ui/utils/active-section/index.js';
|
|
|
55
64
|
export * from './ui/utils/cn.js';
|
|
56
65
|
export * from './ui/utils/fold-script/index.js';
|
|
57
66
|
export * from './ui/utils/keep-section/index.js';
|
|
67
|
+
export * from './ui/utils/live-updates.js';
|
|
58
68
|
export * from './ui/utils/media-query/index.js';
|
|
59
|
-
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';
|
|
60
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,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,8BAA8B,CAAC;AAC7C,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,gCAAgC,CAAC;AAC/C,cAAc,2CAA2C,CAAC;AAC1D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,wCAAwC,CAAC;AACvD,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AAwC,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
|
@@ -2,13 +2,17 @@ export * from './i18n/index.js';
|
|
|
2
2
|
export * from './preferences/index.js';
|
|
3
3
|
export * from './theme/index.js';
|
|
4
4
|
export * from './ui/actions/index.js';
|
|
5
|
+
export * from './ui/atoms/alert/index.js';
|
|
5
6
|
export * from './ui/atoms/button/index.js';
|
|
6
7
|
export * from './ui/atoms/cell-value/index.js';
|
|
7
8
|
export * from './ui/atoms/external-link/index.js';
|
|
8
9
|
export * from './ui/atoms/field/index.js';
|
|
9
10
|
export * from './ui/atoms/field-control/index.js';
|
|
10
11
|
export * from './ui/atoms/localized-field-control/index.js';
|
|
12
|
+
export * from './ui/atoms/money/index.js';
|
|
13
|
+
export * from './ui/atoms/number-input/index.js';
|
|
11
14
|
export * from './ui/atoms/skeleton/index.js';
|
|
15
|
+
export * from './ui/atoms/status-tag/index.js';
|
|
12
16
|
export * from './ui/atoms/switch/index.js';
|
|
13
17
|
export * from './ui/atoms/table/index.js';
|
|
14
18
|
export * from './ui/atoms/text/index.js';
|
|
@@ -19,25 +23,30 @@ export * from './ui/layout/cover/index.js';
|
|
|
19
23
|
export * from './ui/layout/grid/index.js';
|
|
20
24
|
export * from './ui/layout/sidebar/index.js';
|
|
21
25
|
export * from './ui/layout/switcher/index.js';
|
|
26
|
+
export * from './ui/molecules/action-bar/index.js';
|
|
22
27
|
export * from './ui/molecules/breadcrumbs/index.js';
|
|
23
28
|
export * from './ui/molecules/bulk-action-bar/index.js';
|
|
24
29
|
export * from './ui/molecules/bulk-result/index.js';
|
|
25
30
|
export * from './ui/molecules/card/index.js';
|
|
26
31
|
export * from './ui/molecules/column-settings/index.js';
|
|
27
32
|
export * from './ui/molecules/confirm-dialog/index.js';
|
|
33
|
+
export * from './ui/molecules/description-list/index.js';
|
|
28
34
|
export * from './ui/molecules/drawer/index.js';
|
|
35
|
+
export * from './ui/molecules/empty-state/index.js';
|
|
29
36
|
export * from './ui/molecules/entity-link-input/index.js';
|
|
30
37
|
export * from './ui/molecules/entity-link-picker/index.js';
|
|
31
38
|
export * from './ui/molecules/entity-record-card/index.js';
|
|
32
39
|
export * from './ui/molecules/filter-builder/index.js';
|
|
40
|
+
export * from './ui/molecules/filter-chips/index.js';
|
|
33
41
|
export * from './ui/molecules/loading-boundary/index.js';
|
|
42
|
+
export * from './ui/molecules/media-gallery/index.js';
|
|
34
43
|
export * from './ui/molecules/menu/index.js';
|
|
35
44
|
export * from './ui/molecules/nav-menu/index.js';
|
|
36
45
|
export * from './ui/molecules/pagination/index.js';
|
|
46
|
+
export * from './ui/molecules/region-state/index.js';
|
|
37
47
|
export * from './ui/molecules/segmented-control/index.js';
|
|
38
48
|
export * from './ui/molecules/segmented-nav/index.js';
|
|
39
49
|
export * from './ui/molecules/sort-builder/index.js';
|
|
40
|
-
export * from './ui/molecules/split-button/index.js';
|
|
41
50
|
export * from './ui/molecules/split-view/index.js';
|
|
42
51
|
export * from './ui/molecules/stack/index.js';
|
|
43
52
|
export * from './ui/molecules/tab-strip/index.js';
|
|
@@ -55,7 +64,9 @@ export * from './ui/utils/active-section/index.js';
|
|
|
55
64
|
export * from './ui/utils/cn.js';
|
|
56
65
|
export * from './ui/utils/fold-script/index.js';
|
|
57
66
|
export * from './ui/utils/keep-section/index.js';
|
|
67
|
+
export * from './ui/utils/live-updates.js';
|
|
58
68
|
export * from './ui/utils/media-query/index.js';
|
|
59
|
-
export
|
|
69
|
+
export { useFocusOnArrival } from './ui/utils/use-focus-on-arrival.js';
|
|
70
|
+
export { HotkeyScopeProvider, PAGE_SCOPE, useHotkey } from './ui/utils/use-hotkey.js';
|
|
60
71
|
|
|
61
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/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/skeleton/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/drawer/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/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
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
export * from './i18n/index.js';
|
|
2
2
|
export * from './theme/index.js';
|
|
3
|
+
export * from './ui/atoms/alert/index.js';
|
|
3
4
|
export * from './ui/atoms/button/index.js';
|
|
4
5
|
export * from './ui/atoms/external-link/index.js';
|
|
5
6
|
export * from './ui/atoms/field/index.js';
|
|
7
|
+
export * from './ui/atoms/money/index.js';
|
|
8
|
+
export * from './ui/atoms/number-input/index.js';
|
|
6
9
|
export * from './ui/atoms/skeleton/index.js';
|
|
10
|
+
export * from './ui/atoms/status-tag/index.js';
|
|
7
11
|
export * from './ui/atoms/switch/index.js';
|
|
8
12
|
export * from './ui/atoms/table/index.js';
|
|
9
13
|
export * from './ui/atoms/text/index.js';
|
|
@@ -17,13 +21,15 @@ export * from './ui/layout/switcher/index.js';
|
|
|
17
21
|
export * from './ui/molecules/breadcrumbs/index.js';
|
|
18
22
|
export * from './ui/molecules/card/index.js';
|
|
19
23
|
export * from './ui/molecules/confirm-dialog/index.js';
|
|
24
|
+
export * from './ui/molecules/description-list/index.js';
|
|
25
|
+
export * from './ui/molecules/empty-state/index.js';
|
|
20
26
|
export * from './ui/molecules/loading-boundary/index.js';
|
|
27
|
+
export * from './ui/molecules/media-gallery/index.js';
|
|
21
28
|
export * from './ui/molecules/menu/index.js';
|
|
22
29
|
export * from './ui/molecules/nav-menu/index.js';
|
|
23
30
|
export * from './ui/molecules/pagination/index.js';
|
|
24
31
|
export * from './ui/molecules/segmented-control/index.js';
|
|
25
32
|
export * from './ui/molecules/segmented-nav/index.js';
|
|
26
|
-
export * from './ui/molecules/split-button/index.js';
|
|
27
33
|
export * from './ui/molecules/split-view/index.js';
|
|
28
34
|
export * from './ui/molecules/stack/index.js';
|
|
29
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,4BAA4B,CAAC;AAC3C,cAAc,mCAAmC,CAAC;AAClD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,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,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,uCAAuC,CAAC;AACtD,cAAc,
|
|
1
|
+
{"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../src/primitives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