@entifix/react-controls 0.1.0-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/LICENSE +21 -0
- package/README.md +7 -0
- package/dist/i18n/catalog/en.d.ts +10 -0
- package/dist/i18n/catalog/en.d.ts.map +1 -0
- package/dist/i18n/catalog/en.js +211 -0
- package/dist/i18n/catalog/en.js.map +1 -0
- package/dist/i18n/catalog/es.d.ts +275 -0
- package/dist/i18n/catalog/es.d.ts.map +1 -0
- package/dist/i18n/catalog/es.js +261 -0
- package/dist/i18n/catalog/es.js.map +1 -0
- package/dist/i18n/catalog/index.d.ts +403 -0
- package/dist/i18n/catalog/index.d.ts.map +1 -0
- package/dist/i18n/catalog/index.js +23 -0
- package/dist/i18n/catalog/index.js.map +1 -0
- package/dist/i18n/entity-labels.d.ts +29 -0
- package/dist/i18n/entity-labels.d.ts.map +1 -0
- package/dist/i18n/entity-labels.js +49 -0
- package/dist/i18n/entity-labels.js.map +1 -0
- package/dist/i18n/fallback-catalogs.d.ts +5 -0
- package/dist/i18n/fallback-catalogs.d.ts.map +1 -0
- package/dist/i18n/fallback-catalogs.js +34 -0
- package/dist/i18n/fallback-catalogs.js.map +1 -0
- package/dist/i18n/i18n-context.d.ts +62 -0
- package/dist/i18n/i18n-context.d.ts.map +1 -0
- package/dist/i18n/i18n-context.js +128 -0
- package/dist/i18n/i18n-context.js.map +1 -0
- package/dist/i18n/index.d.ts +5 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +6 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/i18n/spec-support/catalogs.d.ts +2 -0
- package/dist/i18n/spec-support/catalogs.d.ts.map +1 -0
- package/dist/i18n/spec-support/catalogs.js +142 -0
- package/dist/i18n/spec-support/catalogs.js.map +1 -0
- package/dist/i18next/index.d.ts +20 -0
- package/dist/i18next/index.d.ts.map +1 -0
- package/dist/i18next/index.js +60 -0
- package/dist/i18next/index.js.map +1 -0
- package/dist/index.d.ts +46 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +47 -0
- package/dist/index.js.map +1 -0
- package/dist/preferences/index.d.ts +7 -0
- package/dist/preferences/index.d.ts.map +1 -0
- package/dist/preferences/index.js +8 -0
- package/dist/preferences/index.js.map +1 -0
- package/dist/preferences/indexeddb-ui-preferences-state.d.ts +16 -0
- package/dist/preferences/indexeddb-ui-preferences-state.d.ts.map +1 -0
- package/dist/preferences/indexeddb-ui-preferences-state.js +50 -0
- package/dist/preferences/indexeddb-ui-preferences-state.js.map +1 -0
- package/dist/preferences/local-storage-ui-preferences-state.d.ts +16 -0
- package/dist/preferences/local-storage-ui-preferences-state.d.ts.map +1 -0
- package/dist/preferences/local-storage-ui-preferences-state.js +51 -0
- package/dist/preferences/local-storage-ui-preferences-state.js.map +1 -0
- package/dist/preferences/ui-preferences-context.d.ts +16 -0
- package/dist/preferences/ui-preferences-context.d.ts.map +1 -0
- package/dist/preferences/ui-preferences-context.js +31 -0
- package/dist/preferences/ui-preferences-context.js.map +1 -0
- package/dist/preferences/ui-preferences-state.d.ts +23 -0
- package/dist/preferences/ui-preferences-state.d.ts.map +1 -0
- package/dist/preferences/ui-preferences-state.js +5 -0
- package/dist/preferences/ui-preferences-state.js.map +1 -0
- package/dist/preferences/use-ui-preference.d.ts +20 -0
- package/dist/preferences/use-ui-preference.d.ts.map +1 -0
- package/dist/preferences/use-ui-preference.js +72 -0
- package/dist/preferences/use-ui-preference.js.map +1 -0
- package/dist/preferences/use-viewport-mode.d.ts +33 -0
- package/dist/preferences/use-viewport-mode.d.ts.map +1 -0
- package/dist/preferences/use-viewport-mode.js +53 -0
- package/dist/preferences/use-viewport-mode.js.map +1 -0
- package/dist/primitives.d.ts +25 -0
- package/dist/primitives.d.ts.map +1 -0
- package/dist/primitives.js +54 -0
- package/dist/primitives.js.map +1 -0
- package/dist/theme/index.d.ts +3 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +4 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/theme/theme-context.d.ts +26 -0
- package/dist/theme/theme-context.d.ts.map +1 -0
- package/dist/theme/theme-context.js +79 -0
- package/dist/theme/theme-context.js.map +1 -0
- package/dist/theme/types.d.ts +22 -0
- package/dist/theme/types.d.ts.map +1 -0
- package/dist/theme/types.js +6 -0
- package/dist/theme/types.js.map +1 -0
- package/dist/ui/actions/action-surfaces.d.ts +59 -0
- package/dist/ui/actions/action-surfaces.d.ts.map +1 -0
- package/dist/ui/actions/action-surfaces.js +109 -0
- package/dist/ui/actions/action-surfaces.js.map +1 -0
- package/dist/ui/actions/index.d.ts +2 -0
- package/dist/ui/actions/index.d.ts.map +1 -0
- package/dist/ui/actions/index.js +3 -0
- package/dist/ui/actions/index.js.map +1 -0
- package/dist/ui/atoms/button/button-link.d.ts +27 -0
- package/dist/ui/atoms/button/button-link.d.ts.map +1 -0
- package/dist/ui/atoms/button/button-link.js +23 -0
- package/dist/ui/atoms/button/button-link.js.map +1 -0
- package/dist/ui/atoms/button/button-recipe.d.ts +19 -0
- package/dist/ui/atoms/button/button-recipe.d.ts.map +1 -0
- package/dist/ui/atoms/button/button-recipe.js +42 -0
- package/dist/ui/atoms/button/button-recipe.js.map +1 -0
- package/dist/ui/atoms/button/button.d.ts +7 -0
- package/dist/ui/atoms/button/button.d.ts.map +1 -0
- package/dist/ui/atoms/button/button.js +22 -0
- package/dist/ui/atoms/button/button.js.map +1 -0
- package/dist/ui/atoms/button/index.d.ts +4 -0
- package/dist/ui/atoms/button/index.d.ts.map +1 -0
- package/dist/ui/atoms/button/index.js +5 -0
- package/dist/ui/atoms/button/index.js.map +1 -0
- package/dist/ui/atoms/cell-value/cell-value.d.ts +12 -0
- package/dist/ui/atoms/cell-value/cell-value.d.ts.map +1 -0
- package/dist/ui/atoms/cell-value/cell-value.js +101 -0
- package/dist/ui/atoms/cell-value/cell-value.js.map +1 -0
- package/dist/ui/atoms/cell-value/index.d.ts +2 -0
- package/dist/ui/atoms/cell-value/index.d.ts.map +1 -0
- package/dist/ui/atoms/cell-value/index.js +3 -0
- package/dist/ui/atoms/cell-value/index.js.map +1 -0
- package/dist/ui/atoms/field/checkbox.d.ts +35 -0
- package/dist/ui/atoms/field/checkbox.d.ts.map +1 -0
- package/dist/ui/atoms/field/checkbox.js +46 -0
- package/dist/ui/atoms/field/checkbox.js.map +1 -0
- package/dist/ui/atoms/field/field.d.ts +4 -0
- package/dist/ui/atoms/field/field.d.ts.map +1 -0
- package/dist/ui/atoms/field/field.js +29 -0
- package/dist/ui/atoms/field/field.js.map +1 -0
- package/dist/ui/atoms/field/index.d.ts +3 -0
- package/dist/ui/atoms/field/index.d.ts.map +1 -0
- package/dist/ui/atoms/field/index.js +4 -0
- package/dist/ui/atoms/field/index.js.map +1 -0
- package/dist/ui/atoms/field-control/field-control.d.ts +50 -0
- package/dist/ui/atoms/field-control/field-control.d.ts.map +1 -0
- package/dist/ui/atoms/field-control/field-control.js +82 -0
- package/dist/ui/atoms/field-control/field-control.js.map +1 -0
- package/dist/ui/atoms/field-control/index.d.ts +2 -0
- package/dist/ui/atoms/field-control/index.d.ts.map +1 -0
- package/dist/ui/atoms/field-control/index.js +3 -0
- package/dist/ui/atoms/field-control/index.js.map +1 -0
- package/dist/ui/atoms/skeleton/index.d.ts +2 -0
- package/dist/ui/atoms/skeleton/index.d.ts.map +1 -0
- package/dist/ui/atoms/skeleton/index.js +3 -0
- package/dist/ui/atoms/skeleton/index.js.map +1 -0
- package/dist/ui/atoms/skeleton/skeleton.d.ts +21 -0
- package/dist/ui/atoms/skeleton/skeleton.d.ts.map +1 -0
- package/dist/ui/atoms/skeleton/skeleton.js +33 -0
- package/dist/ui/atoms/skeleton/skeleton.js.map +1 -0
- package/dist/ui/atoms/table/index.d.ts +2 -0
- package/dist/ui/atoms/table/index.d.ts.map +1 -0
- package/dist/ui/atoms/table/index.js +3 -0
- package/dist/ui/atoms/table/index.js.map +1 -0
- package/dist/ui/atoms/table/table.d.ts +30 -0
- package/dist/ui/atoms/table/table.d.ts.map +1 -0
- package/dist/ui/atoms/table/table.js +84 -0
- package/dist/ui/atoms/table/table.js.map +1 -0
- package/dist/ui/atoms/text/index.d.ts +2 -0
- package/dist/ui/atoms/text/index.d.ts.map +1 -0
- package/dist/ui/atoms/text/index.js +3 -0
- package/dist/ui/atoms/text/index.js.map +1 -0
- package/dist/ui/atoms/text/text.d.ts +86 -0
- package/dist/ui/atoms/text/text.d.ts.map +1 -0
- package/dist/ui/atoms/text/text.js +221 -0
- package/dist/ui/atoms/text/text.js.map +1 -0
- package/dist/ui/layout/_demo.d.ts +6 -0
- package/dist/ui/layout/_demo.d.ts.map +1 -0
- package/dist/ui/layout/_demo.js +11 -0
- package/dist/ui/layout/_demo.js.map +1 -0
- package/dist/ui/layout/_shared.d.ts +9 -0
- package/dist/ui/layout/_shared.d.ts.map +1 -0
- package/dist/ui/layout/_shared.js +30 -0
- package/dist/ui/layout/_shared.js.map +1 -0
- package/dist/ui/layout/box/box.d.ts +10 -0
- package/dist/ui/layout/box/box.d.ts.map +1 -0
- package/dist/ui/layout/box/box.js +28 -0
- package/dist/ui/layout/box/box.js.map +1 -0
- package/dist/ui/layout/box/index.d.ts +2 -0
- package/dist/ui/layout/box/index.d.ts.map +1 -0
- package/dist/ui/layout/box/index.js +3 -0
- package/dist/ui/layout/box/index.js.map +1 -0
- package/dist/ui/layout/center/center.d.ts +13 -0
- package/dist/ui/layout/center/center.d.ts.map +1 -0
- package/dist/ui/layout/center/center.js +22 -0
- package/dist/ui/layout/center/center.js.map +1 -0
- package/dist/ui/layout/center/index.d.ts +2 -0
- package/dist/ui/layout/center/index.d.ts.map +1 -0
- package/dist/ui/layout/center/index.js +3 -0
- package/dist/ui/layout/center/index.js.map +1 -0
- package/dist/ui/layout/cluster/cluster.d.ts +11 -0
- package/dist/ui/layout/cluster/cluster.d.ts.map +1 -0
- package/dist/ui/layout/cluster/cluster.js +19 -0
- package/dist/ui/layout/cluster/cluster.js.map +1 -0
- package/dist/ui/layout/cluster/index.d.ts +2 -0
- package/dist/ui/layout/cluster/index.d.ts.map +1 -0
- package/dist/ui/layout/cluster/index.js +3 -0
- package/dist/ui/layout/cluster/index.js.map +1 -0
- package/dist/ui/layout/cover/cover.d.ts +26 -0
- package/dist/ui/layout/cover/cover.d.ts.map +1 -0
- package/dist/ui/layout/cover/cover.js +57 -0
- package/dist/ui/layout/cover/cover.js.map +1 -0
- package/dist/ui/layout/cover/index.d.ts +2 -0
- package/dist/ui/layout/cover/index.d.ts.map +1 -0
- package/dist/ui/layout/cover/index.js +3 -0
- package/dist/ui/layout/cover/index.js.map +1 -0
- package/dist/ui/layout/grid/grid.d.ts +14 -0
- package/dist/ui/layout/grid/grid.d.ts.map +1 -0
- package/dist/ui/layout/grid/grid.js +25 -0
- package/dist/ui/layout/grid/grid.js.map +1 -0
- package/dist/ui/layout/grid/index.d.ts +2 -0
- package/dist/ui/layout/grid/index.d.ts.map +1 -0
- package/dist/ui/layout/grid/index.js +3 -0
- package/dist/ui/layout/grid/index.js.map +1 -0
- package/dist/ui/layout/sidebar/index.d.ts +2 -0
- package/dist/ui/layout/sidebar/index.d.ts.map +1 -0
- package/dist/ui/layout/sidebar/index.js +3 -0
- package/dist/ui/layout/sidebar/index.js.map +1 -0
- package/dist/ui/layout/sidebar/sidebar.d.ts +33 -0
- package/dist/ui/layout/sidebar/sidebar.d.ts.map +1 -0
- package/dist/ui/layout/sidebar/sidebar.js +54 -0
- package/dist/ui/layout/sidebar/sidebar.js.map +1 -0
- package/dist/ui/layout/switcher/index.d.ts +2 -0
- package/dist/ui/layout/switcher/index.d.ts.map +1 -0
- package/dist/ui/layout/switcher/index.js +3 -0
- package/dist/ui/layout/switcher/index.js.map +1 -0
- package/dist/ui/layout/switcher/switcher.d.ts +15 -0
- package/dist/ui/layout/switcher/switcher.d.ts.map +1 -0
- package/dist/ui/layout/switcher/switcher.js +26 -0
- package/dist/ui/layout/switcher/switcher.js.map +1 -0
- package/dist/ui/molecules/breadcrumbs/breadcrumbs.d.ts +27 -0
- package/dist/ui/molecules/breadcrumbs/breadcrumbs.d.ts.map +1 -0
- package/dist/ui/molecules/breadcrumbs/breadcrumbs.js +50 -0
- package/dist/ui/molecules/breadcrumbs/breadcrumbs.js.map +1 -0
- package/dist/ui/molecules/breadcrumbs/index.d.ts +2 -0
- package/dist/ui/molecules/breadcrumbs/index.d.ts.map +1 -0
- package/dist/ui/molecules/breadcrumbs/index.js +3 -0
- package/dist/ui/molecules/breadcrumbs/index.js.map +1 -0
- package/dist/ui/molecules/bulk-action-bar/bulk-action-bar.d.ts +47 -0
- package/dist/ui/molecules/bulk-action-bar/bulk-action-bar.d.ts.map +1 -0
- package/dist/ui/molecules/bulk-action-bar/bulk-action-bar.js +63 -0
- package/dist/ui/molecules/bulk-action-bar/bulk-action-bar.js.map +1 -0
- package/dist/ui/molecules/bulk-action-bar/index.d.ts +2 -0
- package/dist/ui/molecules/bulk-action-bar/index.d.ts.map +1 -0
- package/dist/ui/molecules/bulk-action-bar/index.js +3 -0
- package/dist/ui/molecules/bulk-action-bar/index.js.map +1 -0
- package/dist/ui/molecules/bulk-result/bulk-result.d.ts +31 -0
- package/dist/ui/molecules/bulk-result/bulk-result.d.ts.map +1 -0
- package/dist/ui/molecules/bulk-result/bulk-result.js +86 -0
- package/dist/ui/molecules/bulk-result/bulk-result.js.map +1 -0
- package/dist/ui/molecules/bulk-result/index.d.ts +2 -0
- package/dist/ui/molecules/bulk-result/index.d.ts.map +1 -0
- package/dist/ui/molecules/bulk-result/index.js +3 -0
- package/dist/ui/molecules/bulk-result/index.js.map +1 -0
- package/dist/ui/molecules/card/card.d.ts +5 -0
- package/dist/ui/molecules/card/card.d.ts.map +1 -0
- package/dist/ui/molecules/card/card.js +14 -0
- package/dist/ui/molecules/card/card.js.map +1 -0
- package/dist/ui/molecules/card/index.d.ts +2 -0
- package/dist/ui/molecules/card/index.d.ts.map +1 -0
- package/dist/ui/molecules/card/index.js +3 -0
- package/dist/ui/molecules/card/index.js.map +1 -0
- package/dist/ui/molecules/column-settings/column-settings.d.ts +29 -0
- package/dist/ui/molecules/column-settings/column-settings.d.ts.map +1 -0
- package/dist/ui/molecules/column-settings/column-settings.js +117 -0
- package/dist/ui/molecules/column-settings/column-settings.js.map +1 -0
- package/dist/ui/molecules/column-settings/index.d.ts +2 -0
- package/dist/ui/molecules/column-settings/index.d.ts.map +1 -0
- package/dist/ui/molecules/column-settings/index.js +3 -0
- package/dist/ui/molecules/column-settings/index.js.map +1 -0
- package/dist/ui/molecules/confirm-dialog/confirm-dialog.d.ts +31 -0
- package/dist/ui/molecules/confirm-dialog/confirm-dialog.d.ts.map +1 -0
- package/dist/ui/molecules/confirm-dialog/confirm-dialog.js +68 -0
- package/dist/ui/molecules/confirm-dialog/confirm-dialog.js.map +1 -0
- package/dist/ui/molecules/confirm-dialog/index.d.ts +2 -0
- package/dist/ui/molecules/confirm-dialog/index.d.ts.map +1 -0
- package/dist/ui/molecules/confirm-dialog/index.js +3 -0
- package/dist/ui/molecules/confirm-dialog/index.js.map +1 -0
- package/dist/ui/molecules/drawer/drawer.d.ts +25 -0
- package/dist/ui/molecules/drawer/drawer.d.ts.map +1 -0
- package/dist/ui/molecules/drawer/drawer.js +60 -0
- package/dist/ui/molecules/drawer/drawer.js.map +1 -0
- package/dist/ui/molecules/drawer/index.d.ts +2 -0
- package/dist/ui/molecules/drawer/index.d.ts.map +1 -0
- package/dist/ui/molecules/drawer/index.js +3 -0
- package/dist/ui/molecules/drawer/index.js.map +1 -0
- package/dist/ui/molecules/entity-link-input/entity-link-input.d.ts +36 -0
- package/dist/ui/molecules/entity-link-input/entity-link-input.d.ts.map +1 -0
- package/dist/ui/molecules/entity-link-input/entity-link-input.js +191 -0
- package/dist/ui/molecules/entity-link-input/entity-link-input.js.map +1 -0
- package/dist/ui/molecules/entity-link-input/index.d.ts +2 -0
- package/dist/ui/molecules/entity-link-input/index.d.ts.map +1 -0
- package/dist/ui/molecules/entity-link-input/index.js +3 -0
- package/dist/ui/molecules/entity-link-input/index.js.map +1 -0
- package/dist/ui/molecules/entity-link-picker/entity-link-picker.d.ts +19 -0
- package/dist/ui/molecules/entity-link-picker/entity-link-picker.d.ts.map +1 -0
- package/dist/ui/molecules/entity-link-picker/entity-link-picker.js +78 -0
- package/dist/ui/molecules/entity-link-picker/entity-link-picker.js.map +1 -0
- package/dist/ui/molecules/entity-link-picker/index.d.ts +2 -0
- package/dist/ui/molecules/entity-link-picker/index.d.ts.map +1 -0
- package/dist/ui/molecules/entity-link-picker/index.js +3 -0
- package/dist/ui/molecules/entity-link-picker/index.js.map +1 -0
- package/dist/ui/molecules/entity-record-card/entity-record-card.d.ts +30 -0
- package/dist/ui/molecules/entity-record-card/entity-record-card.d.ts.map +1 -0
- package/dist/ui/molecules/entity-record-card/entity-record-card.js +39 -0
- package/dist/ui/molecules/entity-record-card/entity-record-card.js.map +1 -0
- package/dist/ui/molecules/entity-record-card/index.d.ts +2 -0
- package/dist/ui/molecules/entity-record-card/index.d.ts.map +1 -0
- package/dist/ui/molecules/entity-record-card/index.js +3 -0
- package/dist/ui/molecules/entity-record-card/index.js.map +1 -0
- package/dist/ui/molecules/filter-builder/filter-builder.d.ts +19 -0
- package/dist/ui/molecules/filter-builder/filter-builder.d.ts.map +1 -0
- package/dist/ui/molecules/filter-builder/filter-builder.js +333 -0
- package/dist/ui/molecules/filter-builder/filter-builder.js.map +1 -0
- package/dist/ui/molecules/filter-builder/filter-operators.d.ts +20 -0
- package/dist/ui/molecules/filter-builder/filter-operators.d.ts.map +1 -0
- package/dist/ui/molecules/filter-builder/filter-operators.js +56 -0
- package/dist/ui/molecules/filter-builder/filter-operators.js.map +1 -0
- package/dist/ui/molecules/filter-builder/index.d.ts +3 -0
- package/dist/ui/molecules/filter-builder/index.d.ts.map +1 -0
- package/dist/ui/molecules/filter-builder/index.js +4 -0
- package/dist/ui/molecules/filter-builder/index.js.map +1 -0
- package/dist/ui/molecules/loading-boundary/index.d.ts +2 -0
- package/dist/ui/molecules/loading-boundary/index.d.ts.map +1 -0
- package/dist/ui/molecules/loading-boundary/index.js +3 -0
- package/dist/ui/molecules/loading-boundary/index.js.map +1 -0
- package/dist/ui/molecules/loading-boundary/loading-boundary.d.ts +27 -0
- package/dist/ui/molecules/loading-boundary/loading-boundary.d.ts.map +1 -0
- package/dist/ui/molecules/loading-boundary/loading-boundary.js +42 -0
- package/dist/ui/molecules/loading-boundary/loading-boundary.js.map +1 -0
- package/dist/ui/molecules/menu/index.d.ts +2 -0
- package/dist/ui/molecules/menu/index.d.ts.map +1 -0
- package/dist/ui/molecules/menu/index.js +3 -0
- package/dist/ui/molecules/menu/index.js.map +1 -0
- package/dist/ui/molecules/menu/menu.d.ts +37 -0
- package/dist/ui/molecules/menu/menu.d.ts.map +1 -0
- package/dist/ui/molecules/menu/menu.js +71 -0
- package/dist/ui/molecules/menu/menu.js.map +1 -0
- package/dist/ui/molecules/pagination/index.d.ts +2 -0
- package/dist/ui/molecules/pagination/index.d.ts.map +1 -0
- package/dist/ui/molecules/pagination/index.js +3 -0
- package/dist/ui/molecules/pagination/index.js.map +1 -0
- package/dist/ui/molecules/pagination/pagination.d.ts +13 -0
- package/dist/ui/molecules/pagination/pagination.d.ts.map +1 -0
- package/dist/ui/molecules/pagination/pagination.js +68 -0
- package/dist/ui/molecules/pagination/pagination.js.map +1 -0
- package/dist/ui/molecules/sort-builder/index.d.ts +2 -0
- package/dist/ui/molecules/sort-builder/index.d.ts.map +1 -0
- package/dist/ui/molecules/sort-builder/index.js +3 -0
- package/dist/ui/molecules/sort-builder/index.js.map +1 -0
- package/dist/ui/molecules/sort-builder/sort-builder.d.ts +18 -0
- package/dist/ui/molecules/sort-builder/sort-builder.d.ts.map +1 -0
- package/dist/ui/molecules/sort-builder/sort-builder.js +185 -0
- package/dist/ui/molecules/sort-builder/sort-builder.js.map +1 -0
- package/dist/ui/molecules/stack/index.d.ts +2 -0
- package/dist/ui/molecules/stack/index.d.ts.map +1 -0
- package/dist/ui/molecules/stack/index.js +3 -0
- package/dist/ui/molecules/stack/index.js.map +1 -0
- package/dist/ui/molecules/stack/stack.d.ts +12 -0
- package/dist/ui/molecules/stack/stack.d.ts.map +1 -0
- package/dist/ui/molecules/stack/stack.js +36 -0
- package/dist/ui/molecules/stack/stack.js.map +1 -0
- package/dist/ui/molecules/tab-strip/index.d.ts +2 -0
- package/dist/ui/molecules/tab-strip/index.d.ts.map +1 -0
- package/dist/ui/molecules/tab-strip/index.js +3 -0
- package/dist/ui/molecules/tab-strip/index.js.map +1 -0
- package/dist/ui/molecules/tab-strip/tab-strip.d.ts +29 -0
- package/dist/ui/molecules/tab-strip/tab-strip.d.ts.map +1 -0
- package/dist/ui/molecules/tab-strip/tab-strip.js +82 -0
- package/dist/ui/molecules/tab-strip/tab-strip.js.map +1 -0
- package/dist/ui/molecules/table-toolbar/index.d.ts +2 -0
- package/dist/ui/molecules/table-toolbar/index.d.ts.map +1 -0
- package/dist/ui/molecules/table-toolbar/index.js +3 -0
- package/dist/ui/molecules/table-toolbar/index.js.map +1 -0
- package/dist/ui/molecules/table-toolbar/table-toolbar.d.ts +13 -0
- package/dist/ui/molecules/table-toolbar/table-toolbar.d.ts.map +1 -0
- package/dist/ui/molecules/table-toolbar/table-toolbar.js +28 -0
- package/dist/ui/molecules/table-toolbar/table-toolbar.js.map +1 -0
- package/dist/ui/molecules/theme-switcher/index.d.ts +2 -0
- package/dist/ui/molecules/theme-switcher/index.d.ts.map +1 -0
- package/dist/ui/molecules/theme-switcher/index.js +3 -0
- package/dist/ui/molecules/theme-switcher/index.js.map +1 -0
- package/dist/ui/molecules/theme-switcher/theme-switcher.d.ts +6 -0
- package/dist/ui/molecules/theme-switcher/theme-switcher.d.ts.map +1 -0
- package/dist/ui/molecules/theme-switcher/theme-switcher.js +24 -0
- package/dist/ui/molecules/theme-switcher/theme-switcher.js.map +1 -0
- package/dist/ui/organisms/command-palette/command-palette.d.ts +67 -0
- package/dist/ui/organisms/command-palette/command-palette.d.ts.map +1 -0
- package/dist/ui/organisms/command-palette/command-palette.js +226 -0
- package/dist/ui/organisms/command-palette/command-palette.js.map +1 -0
- package/dist/ui/organisms/command-palette/index.d.ts +2 -0
- package/dist/ui/organisms/command-palette/index.d.ts.map +1 -0
- package/dist/ui/organisms/command-palette/index.js +3 -0
- package/dist/ui/organisms/command-palette/index.js.map +1 -0
- package/dist/ui/organisms/entity-detail-grid/entity-detail-grid.d.ts +43 -0
- package/dist/ui/organisms/entity-detail-grid/entity-detail-grid.d.ts.map +1 -0
- package/dist/ui/organisms/entity-detail-grid/entity-detail-grid.js +281 -0
- package/dist/ui/organisms/entity-detail-grid/entity-detail-grid.js.map +1 -0
- package/dist/ui/organisms/entity-detail-grid/entity-detail-grid.types.d.ts +49 -0
- package/dist/ui/organisms/entity-detail-grid/entity-detail-grid.types.d.ts.map +1 -0
- package/dist/ui/organisms/entity-detail-grid/entity-detail-grid.types.js +3 -0
- package/dist/ui/organisms/entity-detail-grid/entity-detail-grid.types.js.map +1 -0
- package/dist/ui/organisms/entity-detail-grid/index.d.ts +3 -0
- package/dist/ui/organisms/entity-detail-grid/index.d.ts.map +1 -0
- package/dist/ui/organisms/entity-detail-grid/index.js +4 -0
- package/dist/ui/organisms/entity-detail-grid/index.js.map +1 -0
- package/dist/ui/organisms/entity-form/entity-form-slots.d.ts +53 -0
- package/dist/ui/organisms/entity-form/entity-form-slots.d.ts.map +1 -0
- package/dist/ui/organisms/entity-form/entity-form-slots.js +44 -0
- package/dist/ui/organisms/entity-form/entity-form-slots.js.map +1 -0
- package/dist/ui/organisms/entity-form/entity-form.d.ts +4 -0
- package/dist/ui/organisms/entity-form/entity-form.d.ts.map +1 -0
- package/dist/ui/organisms/entity-form/entity-form.js +494 -0
- package/dist/ui/organisms/entity-form/entity-form.js.map +1 -0
- package/dist/ui/organisms/entity-form/entity-form.types.d.ts +151 -0
- package/dist/ui/organisms/entity-form/entity-form.types.d.ts.map +1 -0
- package/dist/ui/organisms/entity-form/entity-form.types.js +3 -0
- package/dist/ui/organisms/entity-form/entity-form.types.js.map +1 -0
- package/dist/ui/organisms/entity-form/index.d.ts +5 -0
- package/dist/ui/organisms/entity-form/index.d.ts.map +1 -0
- package/dist/ui/organisms/entity-form/index.js +6 -0
- package/dist/ui/organisms/entity-form/index.js.map +1 -0
- package/dist/ui/organisms/entity-form/use-entity-form-fields.d.ts +13 -0
- package/dist/ui/organisms/entity-form/use-entity-form-fields.d.ts.map +1 -0
- package/dist/ui/organisms/entity-form/use-entity-form-fields.js +50 -0
- package/dist/ui/organisms/entity-form/use-entity-form-fields.js.map +1 -0
- package/dist/ui/organisms/entity-table/entity-table-slots.d.ts +55 -0
- package/dist/ui/organisms/entity-table/entity-table-slots.d.ts.map +1 -0
- package/dist/ui/organisms/entity-table/entity-table-slots.js +50 -0
- package/dist/ui/organisms/entity-table/entity-table-slots.js.map +1 -0
- package/dist/ui/organisms/entity-table/entity-table.d.ts +4 -0
- package/dist/ui/organisms/entity-table/entity-table.d.ts.map +1 -0
- package/dist/ui/organisms/entity-table/entity-table.js +529 -0
- package/dist/ui/organisms/entity-table/entity-table.js.map +1 -0
- package/dist/ui/organisms/entity-table/entity-table.types.d.ts +126 -0
- package/dist/ui/organisms/entity-table/entity-table.types.d.ts.map +1 -0
- package/dist/ui/organisms/entity-table/entity-table.types.js +3 -0
- package/dist/ui/organisms/entity-table/entity-table.types.js.map +1 -0
- package/dist/ui/organisms/entity-table/index.d.ts +5 -0
- package/dist/ui/organisms/entity-table/index.d.ts.map +1 -0
- package/dist/ui/organisms/entity-table/index.js +6 -0
- package/dist/ui/organisms/entity-table/index.js.map +1 -0
- package/dist/ui/organisms/entity-table/use-entity-table-columns.d.ts +29 -0
- package/dist/ui/organisms/entity-table/use-entity-table-columns.d.ts.map +1 -0
- package/dist/ui/organisms/entity-table/use-entity-table-columns.js +103 -0
- package/dist/ui/organisms/entity-table/use-entity-table-columns.js.map +1 -0
- package/dist/ui/organisms/top-bar/index.d.ts +2 -0
- package/dist/ui/organisms/top-bar/index.d.ts.map +1 -0
- package/dist/ui/organisms/top-bar/index.js +3 -0
- package/dist/ui/organisms/top-bar/index.js.map +1 -0
- package/dist/ui/organisms/top-bar/top-bar.d.ts +20 -0
- package/dist/ui/organisms/top-bar/top-bar.d.ts.map +1 -0
- package/dist/ui/organisms/top-bar/top-bar.js +43 -0
- package/dist/ui/organisms/top-bar/top-bar.js.map +1 -0
- package/dist/ui/organisms/wizard/index.d.ts +3 -0
- package/dist/ui/organisms/wizard/index.d.ts.map +1 -0
- package/dist/ui/organisms/wizard/index.js +4 -0
- package/dist/ui/organisms/wizard/index.js.map +1 -0
- package/dist/ui/organisms/wizard/wizard.d.ts +21 -0
- package/dist/ui/organisms/wizard/wizard.d.ts.map +1 -0
- package/dist/ui/organisms/wizard/wizard.js +260 -0
- package/dist/ui/organisms/wizard/wizard.js.map +1 -0
- package/dist/ui/organisms/wizard/wizard.types.d.ts +83 -0
- package/dist/ui/organisms/wizard/wizard.types.d.ts.map +1 -0
- package/dist/ui/organisms/wizard/wizard.types.js +3 -0
- package/dist/ui/organisms/wizard/wizard.types.js.map +1 -0
- package/dist/ui/utils/cn.d.ts +4 -0
- package/dist/ui/utils/cn.d.ts.map +1 -0
- package/dist/ui/utils/cn.js +5 -0
- package/dist/ui/utils/cn.js.map +1 -0
- package/dist/ui/utils/use-hotkey.d.ts +31 -0
- package/dist/ui/utils/use-hotkey.d.ts.map +1 -0
- package/dist/ui/utils/use-hotkey.js +69 -0
- package/dist/ui/utils/use-hotkey.js.map +1 -0
- package/package.json +118 -0
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { controls as enControls } from './en.js';
|
|
2
|
+
import { controls as esControls } from './es.js';
|
|
3
|
+
/**
|
|
4
|
+
* The one namespace `@entifix/react-controls` owns — copy for the agnostic
|
|
5
|
+
* entity UI: a table's empty state, a filter builder's operators, a form's
|
|
6
|
+
* validation messages.
|
|
7
|
+
*
|
|
8
|
+
* It ships with the components that render it, so taking the controls means
|
|
9
|
+
* taking their strings and nothing else. It used to live in the i18n package
|
|
10
|
+
* beside a back office's chrome and a marketplace's product copy.
|
|
11
|
+
*/ export const controlsCatalogs = {
|
|
12
|
+
es: {
|
|
13
|
+
controls: esControls
|
|
14
|
+
},
|
|
15
|
+
en: {
|
|
16
|
+
controls: enControls
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
export const CONTROLS_NAMESPACES = [
|
|
20
|
+
'controls'
|
|
21
|
+
];
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/i18n/catalog/index.ts"],"sourcesContent":["import { controls as enControls } from './en.js';\nimport { controls as esControls } from './es.js';\n\n/**\n * The one namespace `@entifix/react-controls` owns — copy for the agnostic\n * entity UI: a table's empty state, a filter builder's operators, a form's\n * validation messages.\n *\n * It ships with the components that render it, so taking the controls means\n * taking their strings and nothing else. It used to live in the i18n package\n * beside a back office's chrome and a marketplace's product copy.\n */\nexport const controlsCatalogs = {\n es: { controls: esControls },\n en: { controls: enControls },\n} as const;\n\n/** The namespace above, for a host composing `CustomTypeOptions`. */\nexport type ControlsResources = (typeof controlsCatalogs)['es'];\n\nexport const CONTROLS_NAMESPACES = ['controls'] as const;\n"],"names":["controls","enControls","esControls","controlsCatalogs","es","en","CONTROLS_NAMESPACES"],"mappings":"AAAA,SAASA,YAAYC,UAAU,QAAQ,UAAU;AACjD,SAASD,YAAYE,UAAU,QAAQ,UAAU;AAEjD;;;;;;;;CAQC,GACD,OAAO,MAAMC,mBAAmB;IAC9BC,IAAI;QAAEJ,UAAUE;IAAW;IAC3BG,IAAI;QAAEL,UAAUC;IAAW;AAC7B,EAAW;AAKX,OAAO,MAAMK,sBAAsB;IAAC;CAAW,CAAU"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { EntityFieldDescriptor } from '@entifix/core';
|
|
2
|
+
/**
|
|
3
|
+
* Resolves each descriptor's `labelKey` against the active catalog, leaving the
|
|
4
|
+
* declared `label` in place for members that have no key yet.
|
|
5
|
+
*
|
|
6
|
+
* Done here rather than in `describeEntityColumns` because the same descriptors
|
|
7
|
+
* are the server-side filter allowlist, where a translated label would be
|
|
8
|
+
* meaningless — and because `entifix:core` cannot reach the i18n layer.
|
|
9
|
+
*/
|
|
10
|
+
export declare function useLocalizedDescriptors<TDescriptor extends EntityFieldDescriptor>(descriptors: readonly TDescriptor[]): TDescriptor[];
|
|
11
|
+
/**
|
|
12
|
+
* Reads one value of an enum member. Falls back to the raw value when the
|
|
13
|
+
* member declared no vocabulary prefix, which is what a `status` of `active`
|
|
14
|
+
* used to render as everywhere.
|
|
15
|
+
*/
|
|
16
|
+
export declare function useEnumLabel(): (descriptor: EntityFieldDescriptor, value: string) => string;
|
|
17
|
+
/**
|
|
18
|
+
* Renders a failed request in the reader's language.
|
|
19
|
+
*
|
|
20
|
+
* Services answer with `{ error, code, detail }`, and the rest client carries
|
|
21
|
+
* the `code` onto `EntifixError.details`. Falling back to `message` keeps a
|
|
22
|
+
* failure that predates the vocabulary — or one raised client-side — readable
|
|
23
|
+
* rather than blank.
|
|
24
|
+
*/
|
|
25
|
+
export declare function useErrorMessage(): (error: {
|
|
26
|
+
message: string;
|
|
27
|
+
details?: Record<string, unknown>;
|
|
28
|
+
}) => string;
|
|
29
|
+
//# sourceMappingURL=entity-labels.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity-labels.d.ts","sourceRoot":"","sources":["../../src/i18n/entity-labels.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAK3D;;;;;;;GAOG;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;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,IAAI,CAAC,KAAK,EAAE;IACzC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC,KAAK,MAAM,CAYX"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
3
|
+
import { useCallback, useMemo } from 'react';
|
|
4
|
+
import { useTranslateKey } from './i18n-context.js';
|
|
5
|
+
/**
|
|
6
|
+
* Resolves each descriptor's `labelKey` against the active catalog, leaving the
|
|
7
|
+
* declared `label` in place for members that have no key yet.
|
|
8
|
+
*
|
|
9
|
+
* Done here rather than in `describeEntityColumns` because the same descriptors
|
|
10
|
+
* are the server-side filter allowlist, where a translated label would be
|
|
11
|
+
* meaningless — and because `entifix:core` cannot reach the i18n layer.
|
|
12
|
+
*/ export function useLocalizedDescriptors(descriptors) {
|
|
13
|
+
const translate = useTranslateKey();
|
|
14
|
+
return useMemo(()=>descriptors.map((descriptor)=>descriptor.labelKey === undefined ? descriptor : _extends({}, descriptor, {
|
|
15
|
+
label: translate(descriptor.labelKey)
|
|
16
|
+
})), [
|
|
17
|
+
descriptors,
|
|
18
|
+
translate
|
|
19
|
+
]);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Reads one value of an enum member. Falls back to the raw value when the
|
|
23
|
+
* member declared no vocabulary prefix, which is what a `status` of `active`
|
|
24
|
+
* used to render as everywhere.
|
|
25
|
+
*/ export function useEnumLabel() {
|
|
26
|
+
const translate = useTranslateKey();
|
|
27
|
+
return useCallback((descriptor, value)=>descriptor.enumLabelKey === undefined ? value : translate(`${descriptor.enumLabelKey}.${value}`), [
|
|
28
|
+
translate
|
|
29
|
+
]);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Renders a failed request in the reader's language.
|
|
33
|
+
*
|
|
34
|
+
* Services answer with `{ error, code, detail }`, and the rest client carries
|
|
35
|
+
* the `code` onto `EntifixError.details`. Falling back to `message` keeps a
|
|
36
|
+
* failure that predates the vocabulary — or one raised client-side — readable
|
|
37
|
+
* rather than blank.
|
|
38
|
+
*/ export function useErrorMessage() {
|
|
39
|
+
const translate = useTranslateKey();
|
|
40
|
+
return useCallback((error)=>{
|
|
41
|
+
var _error_details;
|
|
42
|
+
const code = (_error_details = error.details) == null ? void 0 : _error_details['code'];
|
|
43
|
+
return typeof code === 'string' ? translate(`errors:${code}`) : error.message;
|
|
44
|
+
}, [
|
|
45
|
+
translate
|
|
46
|
+
]);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
//# sourceMappingURL=entity-labels.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/i18n/entity-labels.ts"],"sourcesContent":["'use client';\n\nimport type { EntityFieldDescriptor } 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` cannot reach the i18n layer.\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/**\n * Renders a failed request in the reader's language.\n *\n * Services answer with `{ error, code, detail }`, and the rest client carries\n * the `code` onto `EntifixError.details`. Falling back to `message` keeps a\n * failure that predates the vocabulary — or one raised client-side — readable\n * rather than blank.\n */\nexport function useErrorMessage(): (error: {\n message: string;\n details?: Record<string, unknown>;\n}) => string {\n const translate = useTranslateKey();\n\n return useCallback(\n error => {\n const code = error.details?.['code'];\n return typeof code === 'string'\n ? translate(`errors:${code}`)\n : error.message;\n },\n [translate],\n );\n}\n"],"names":["useCallback","useMemo","useTranslateKey","useLocalizedDescriptors","descriptors","translate","map","descriptor","labelKey","undefined","label","useEnumLabel","value","enumLabelKey","useErrorMessage","error","code","details","message"],"mappings":"AAAA;;AAGA,SAASA,WAAW,EAAEC,OAAO,QAAQ,QAAQ;AAE7C,SAASC,eAAe,QAAQ,oBAAoB;AAEpD;;;;;;;CAOC,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;AAEA;;;;;;;CAOC,GACD,OAAO,SAASS;IAId,MAAMT,YAAYH;IAElB,OAAOF,YACLe,CAAAA;YACeA;QAAb,MAAMC,QAAOD,iBAAAA,MAAME,OAAO,qBAAbF,cAAe,CAAC,OAAO;QACpC,OAAO,OAAOC,SAAS,WACnBX,UAAU,CAAC,OAAO,EAAEW,MAAM,IAC1BD,MAAMG,OAAO;IACnB,GACA;QAACb;KAAU;AAEf"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Adds a namespace to the no-provider fallback. Idempotent. */
|
|
2
|
+
export declare function registerFallbackCatalog(namespace: string, byLocale: Readonly<Record<string, object>>): void;
|
|
3
|
+
/** One namespace's catalog in one locale, or `undefined` if nobody registered it. */
|
|
4
|
+
export declare function fallbackCatalogFor(namespace: string, locale: string): object | undefined;
|
|
5
|
+
//# sourceMappingURL=fallback-catalogs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fallback-catalogs.d.ts","sourceRoot":"","sources":["../../src/i18n/fallback-catalogs.ts"],"names":[],"mappings":"AAyBA,gEAAgE;AAChE,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GACzC,IAAI,CAEN;AAED,qFAAqF;AACrF,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,GACb,MAAM,GAAG,SAAS,CAEpB"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { controlsCatalogs } from './catalog/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Catalogs the no-provider fallback can resolve against, by namespace.
|
|
4
|
+
*
|
|
5
|
+
* Seeded with this package's own `controls`, and open so a package that ships
|
|
6
|
+
* copy for its own components can add it — `@entifix/next-shell` registers
|
|
7
|
+
* `shell` when it is imported. The promise is the same either way: a component
|
|
8
|
+
* that ships its strings renders them without a provider, so an adopter who
|
|
9
|
+
* mounts nothing still gets working UI rather than raw keys.
|
|
10
|
+
*
|
|
11
|
+
* ⚠️ **A plain module, and it has to be.** It used to live in `i18n-context.tsx`,
|
|
12
|
+
* which is `'use client'` — and a package registers its catalog at module scope,
|
|
13
|
+
* in code a Next server also evaluates. Next refuses to call a client function
|
|
14
|
+
* from the server, so the back office failed its build on
|
|
15
|
+
* `Attempted to call registerFallbackCatalog() from the server`. The registry is
|
|
16
|
+
* only a `Map`; nothing about it needs the client.
|
|
17
|
+
*/ const fallbackCatalogs = new Map([
|
|
18
|
+
[
|
|
19
|
+
'controls',
|
|
20
|
+
{
|
|
21
|
+
es: controlsCatalogs.es.controls,
|
|
22
|
+
en: controlsCatalogs.en.controls
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
]);
|
|
26
|
+
/** Adds a namespace to the no-provider fallback. Idempotent. */ export function registerFallbackCatalog(namespace, byLocale) {
|
|
27
|
+
fallbackCatalogs.set(namespace, byLocale);
|
|
28
|
+
}
|
|
29
|
+
/** One namespace's catalog in one locale, or `undefined` if nobody registered it. */ export function fallbackCatalogFor(namespace, locale) {
|
|
30
|
+
var _fallbackCatalogs_get;
|
|
31
|
+
return (_fallbackCatalogs_get = fallbackCatalogs.get(namespace)) == null ? void 0 : _fallbackCatalogs_get[locale];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=fallback-catalogs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/i18n/fallback-catalogs.ts"],"sourcesContent":["import { controlsCatalogs } from './catalog/index.js';\n\n/**\n * Catalogs the no-provider fallback can resolve against, by namespace.\n *\n * Seeded with this package's own `controls`, and open so a package that ships\n * copy for its own components can add it — `@entifix/next-shell` registers\n * `shell` when it is imported. The promise is the same either way: a component\n * that ships its strings renders them without a provider, so an adopter who\n * mounts nothing still gets working UI rather than raw keys.\n *\n * ⚠️ **A plain module, and it has to be.** It used to live in `i18n-context.tsx`,\n * which is `'use client'` — and a package registers its catalog at module scope,\n * in code a Next server also evaluates. Next refuses to call a client function\n * from the server, so the back office failed its build on\n * `Attempted to call registerFallbackCatalog() from the server`. The registry is\n * only a `Map`; nothing about it needs the client.\n */\nconst fallbackCatalogs = new Map<string, Readonly<Record<string, object>>>([\n [\n 'controls',\n { es: controlsCatalogs.es.controls, en: controlsCatalogs.en.controls },\n ],\n]);\n\n/** Adds a namespace to the no-provider fallback. Idempotent. */\nexport function registerFallbackCatalog(\n namespace: string,\n byLocale: Readonly<Record<string, object>>,\n): void {\n fallbackCatalogs.set(namespace, byLocale);\n}\n\n/** One namespace's catalog in one locale, or `undefined` if nobody registered it. */\nexport function fallbackCatalogFor(\n namespace: string,\n locale: string,\n): object | undefined {\n return fallbackCatalogs.get(namespace)?.[locale];\n}\n"],"names":["controlsCatalogs","fallbackCatalogs","Map","es","controls","en","registerFallbackCatalog","namespace","byLocale","set","fallbackCatalogFor","locale","get"],"mappings":"AAAA,SAASA,gBAAgB,QAAQ,qBAAqB;AAEtD;;;;;;;;;;;;;;;CAeC,GACD,MAAMC,mBAAmB,IAAIC,IAA8C;IACzE;QACE;QACA;YAAEC,IAAIH,iBAAiBG,EAAE,CAACC,QAAQ;YAAEC,IAAIL,iBAAiBK,EAAE,CAACD,QAAQ;QAAC;KACtE;CACF;AAED,8DAA8D,GAC9D,OAAO,SAASE,wBACdC,SAAiB,EACjBC,QAA0C;IAE1CP,iBAAiBQ,GAAG,CAACF,WAAWC;AAClC;AAEA,mFAAmF,GACnF,OAAO,SAASE,mBACdH,SAAiB,EACjBI,MAAc;QAEPV;IAAP,QAAOA,wBAAAA,iBAAiBW,GAAG,CAACL,+BAArBN,qBAAiC,CAACU,OAAO;AAClD"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { type Formatters, type Locale } from '@entifix/core';
|
|
2
|
+
import { type PropsWithChildren } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Resolving a key to a sentence. The whole of what a control needs from an i18n
|
|
5
|
+
* library, and deliberately not i18next's `TFunction`.
|
|
6
|
+
*
|
|
7
|
+
* ⚠️ **This port is what makes the controls adoptable on their own.** They used
|
|
8
|
+
* to import `createI18n` directly, so taking a table meant taking i18next,
|
|
9
|
+
* react-i18next and a Spanish catalog — the first of the three composition
|
|
10
|
+
* defects the tier register was written to catch. The i18next binding now lives
|
|
11
|
+
* behind `@entifix/react-controls/i18next`, and the peers it needs are optional.
|
|
12
|
+
*/
|
|
13
|
+
export type Translate = (key: string, params?: Record<string, unknown>) => string;
|
|
14
|
+
export interface Translator {
|
|
15
|
+
readonly locale: Locale;
|
|
16
|
+
readonly formatters: Formatters;
|
|
17
|
+
/** `ns` is the namespace a caller asked for, or the default when omitted. */
|
|
18
|
+
t(ns: string | undefined, key: string, params?: Record<string, unknown>): string;
|
|
19
|
+
}
|
|
20
|
+
export interface TranslatorProviderProps extends PropsWithChildren {
|
|
21
|
+
readonly translator: Translator;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Binds one translator to the subtree.
|
|
25
|
+
*
|
|
26
|
+
* A host with no i18n library builds one of these by hand; a host using
|
|
27
|
+
* i18next mounts `I18nProvider` from `@entifix/react-controls/i18next`, which
|
|
28
|
+
* builds it from a per-locale instance.
|
|
29
|
+
*/
|
|
30
|
+
export declare function TranslatorProvider({ translator, children, }: TranslatorProviderProps): import("react").JSX.Element;
|
|
31
|
+
/** The translator in scope, or the key-returning fallback. */
|
|
32
|
+
export declare function useTranslator(): Translator;
|
|
33
|
+
export declare function useLocale(): Locale;
|
|
34
|
+
/**
|
|
35
|
+
* Locale-aware `Intl` wrappers. Every date and number a control renders goes
|
|
36
|
+
* through these so the server and the browser agree on the output.
|
|
37
|
+
*/
|
|
38
|
+
export declare function useFormatters(): Formatters;
|
|
39
|
+
/**
|
|
40
|
+
* The translate function for one namespace.
|
|
41
|
+
*
|
|
42
|
+
* ⚠️ **Typed by the host, not by this package.** TypeScript permits exactly one
|
|
43
|
+
* `declare module 'i18next' { interface CustomTypeOptions }` per compilation, so
|
|
44
|
+
* the catalogs can be owned per package but the type gate cannot — a second
|
|
45
|
+
* declaration is `TS2717`. entifix therefore ships each namespace's `Resources`
|
|
46
|
+
* type and the host composes the single augmentation, which is what keeps every
|
|
47
|
+
* `useT('shell')` and `useT('app')` call site compiling exactly as before.
|
|
48
|
+
*/
|
|
49
|
+
export declare function useT(ns?: string): Translate;
|
|
50
|
+
export type TranslateKey = Translate;
|
|
51
|
+
/**
|
|
52
|
+
* Resolves a key that is only known at runtime — an entity's `labelKey`, one
|
|
53
|
+
* value out of an enum vocabulary.
|
|
54
|
+
*
|
|
55
|
+
* Deliberately separate from {@link useT}, which stays strict. This is the one
|
|
56
|
+
* place the typed-key guarantee is given up, and it is given up for keys that
|
|
57
|
+
* `@entifix/core` cannot type: core carries `labelKey` as an opaque string
|
|
58
|
+
* because it has no catalogs to check it against. Authored copy must go through
|
|
59
|
+
* `useT` so a typo stays a compile error.
|
|
60
|
+
*/
|
|
61
|
+
export declare function useTranslateKey(): TranslateKey;
|
|
62
|
+
//# sourceMappingURL=i18n-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n-context.d.ts","sourceRoot":"","sources":["../../src/i18n/i18n-context.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,MAAM,EAEZ,MAAM,eAAe,CAAC;AACvB,OAAO,EAEL,KAAK,iBAAiB,EAGvB,MAAM,OAAO,CAAC;AAIf;;;;;;;;;GASG;AACH,MAAM,MAAM,SAAS,GAAG,CACtB,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC7B,MAAM,CAAC;AAEZ,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC,6EAA6E;IAC7E,CAAC,CACC,EAAE,EAAE,MAAM,GAAG,SAAS,EACtB,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,MAAM,CAAC;CACX;AAyFD,MAAM,WAAW,uBAAwB,SAAQ,iBAAiB;IAChE,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;CACjC;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,UAAU,EACV,QAAQ,GACT,EAAE,uBAAuB,+BAGzB;AAED,8DAA8D;AAC9D,wBAAgB,aAAa,IAAI,UAAU,CAE1C;AAED,wBAAgB,SAAS,IAAI,MAAM,CAElC;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,UAAU,CAE1C;AAED;;;;;;;;;GASG;AACH,wBAAgB,IAAI,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAM3C;AAED,MAAM,MAAM,YAAY,GAAG,SAAS,CAAC;AAErC;;;;;;;;;GASG;AACH,wBAAgB,eAAe,IAAI,YAAY,CAE9C"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { DEFAULT_LOCALE, makeFormatters } from '@entifix/core';
|
|
4
|
+
import { createContext, useContext, useMemo } from 'react';
|
|
5
|
+
import { fallbackCatalogFor } from './fallback-catalogs.js';
|
|
6
|
+
const I18nContext = /*#__PURE__*/ createContext(null);
|
|
7
|
+
let fallback;
|
|
8
|
+
/** `'table.empty'` → the string at that path, or `undefined`. */ const at = (catalog, key)=>{
|
|
9
|
+
let node = catalog;
|
|
10
|
+
for (const segment of key.split('.')){
|
|
11
|
+
if (typeof node !== 'object' || node === null) return undefined;
|
|
12
|
+
node = node[segment];
|
|
13
|
+
}
|
|
14
|
+
return typeof node === 'string' ? node : undefined;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Resolves a key, honouring i18next's `_one`/`_other` plural suffixes when the
|
|
18
|
+
* caller passed a `count`.
|
|
19
|
+
*
|
|
20
|
+
* ⚠️ **Two plural forms, not a CLDR rule set.** i18next asks `Intl.PluralRules`
|
|
21
|
+
* and handles languages with six categories; this covers the two that Spanish
|
|
22
|
+
* and English have, which is what this package's own catalog is written in. An
|
|
23
|
+
* adopter whose locale needs more than that wants the real thing — which is
|
|
24
|
+
* what `@entifix/react-controls/i18next` is, and why it exists.
|
|
25
|
+
*/ const lookup = (catalog, key, params)=>{
|
|
26
|
+
const count = params == null ? void 0 : params['count'];
|
|
27
|
+
if (typeof count === 'number') {
|
|
28
|
+
const plural = at(catalog, `${key}_${count === 1 ? 'one' : 'other'}`);
|
|
29
|
+
if (plural !== undefined) return plural;
|
|
30
|
+
}
|
|
31
|
+
return at(catalog, key);
|
|
32
|
+
};
|
|
33
|
+
const interpolate = (text, params)=>params === undefined ? text : text.replace(/\{\{\s*([\w.]+)\s*\}\}/g, (whole, name)=>name in params ? String(params[name]) : whole);
|
|
34
|
+
/**
|
|
35
|
+
* What a control renders when nobody mounted a provider — Storybook, a unit
|
|
36
|
+
* spec, a page that forgot.
|
|
37
|
+
*
|
|
38
|
+
* Deliberately a working translator rather than a thrown error, unlike
|
|
39
|
+
* `useTheme`. These controls render inside server components, and a control
|
|
40
|
+
* that explodes on a missing ancestor is worse than one that renders Spanish:
|
|
41
|
+
* the failure mode becomes "this screen is Spanish for an English visitor",
|
|
42
|
+
* which the locale-switch e2e catches, not a blank page.
|
|
43
|
+
*
|
|
44
|
+
* It resolves against **this package's own catalog**, which is the point of the
|
|
45
|
+
* catalog living here: the controls arrive already able to speak, so an adopter
|
|
46
|
+
* who wants no i18n library at all still gets a working table rather than one
|
|
47
|
+
* captioned `table.empty`. A key outside `controls` — a host's namespace, an
|
|
48
|
+
* entity label — has nothing here to resolve against and comes back as itself.
|
|
49
|
+
*/ function fallbackTranslator() {
|
|
50
|
+
fallback != null ? fallback : fallback = {
|
|
51
|
+
locale: DEFAULT_LOCALE,
|
|
52
|
+
formatters: makeFormatters(DEFAULT_LOCALE),
|
|
53
|
+
t: (ns, key, params)=>{
|
|
54
|
+
// `useTranslateKey` hands over a fully qualified `entity:gadget.label`,
|
|
55
|
+
// because a runtime key carries its own namespace. i18next strips the
|
|
56
|
+
// prefix and answers with the bare key when it cannot resolve one, and
|
|
57
|
+
// this matches that so swapping the binding in or out changes nothing a
|
|
58
|
+
// caller can see.
|
|
59
|
+
const [prefix, ...rest] = key.split(':');
|
|
60
|
+
const qualified = rest.length > 0;
|
|
61
|
+
const namespace = qualified ? prefix : ns;
|
|
62
|
+
const bare = qualified ? rest.join(':') : key;
|
|
63
|
+
const catalog = fallbackCatalogFor(namespace != null ? namespace : 'controls', DEFAULT_LOCALE);
|
|
64
|
+
if (catalog === undefined) return bare;
|
|
65
|
+
const text = lookup(catalog, bare, params);
|
|
66
|
+
return text === undefined ? bare : interpolate(text, params);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
return fallback;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Binds one translator to the subtree.
|
|
73
|
+
*
|
|
74
|
+
* A host with no i18n library builds one of these by hand; a host using
|
|
75
|
+
* i18next mounts `I18nProvider` from `@entifix/react-controls/i18next`, which
|
|
76
|
+
* builds it from a per-locale instance.
|
|
77
|
+
*/ export function TranslatorProvider({ translator, children }) {
|
|
78
|
+
const value = useMemo(()=>translator, [
|
|
79
|
+
translator
|
|
80
|
+
]);
|
|
81
|
+
return /*#__PURE__*/ _jsx(I18nContext.Provider, {
|
|
82
|
+
value: value,
|
|
83
|
+
children: children
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
/** The translator in scope, or the key-returning fallback. */ export function useTranslator() {
|
|
87
|
+
var _useContext;
|
|
88
|
+
return (_useContext = useContext(I18nContext)) != null ? _useContext : fallbackTranslator();
|
|
89
|
+
}
|
|
90
|
+
export function useLocale() {
|
|
91
|
+
return useTranslator().locale;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Locale-aware `Intl` wrappers. Every date and number a control renders goes
|
|
95
|
+
* through these so the server and the browser agree on the output.
|
|
96
|
+
*/ export function useFormatters() {
|
|
97
|
+
return useTranslator().formatters;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* The translate function for one namespace.
|
|
101
|
+
*
|
|
102
|
+
* ⚠️ **Typed by the host, not by this package.** TypeScript permits exactly one
|
|
103
|
+
* `declare module 'i18next' { interface CustomTypeOptions }` per compilation, so
|
|
104
|
+
* the catalogs can be owned per package but the type gate cannot — a second
|
|
105
|
+
* declaration is `TS2717`. entifix therefore ships each namespace's `Resources`
|
|
106
|
+
* type and the host composes the single augmentation, which is what keeps every
|
|
107
|
+
* `useT('shell')` and `useT('app')` call site compiling exactly as before.
|
|
108
|
+
*/ export function useT(ns) {
|
|
109
|
+
const translator = useTranslator();
|
|
110
|
+
return useMemo(()=>(key, params)=>translator.t(ns, key, params), [
|
|
111
|
+
translator,
|
|
112
|
+
ns
|
|
113
|
+
]);
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Resolves a key that is only known at runtime — an entity's `labelKey`, one
|
|
117
|
+
* value out of an enum vocabulary.
|
|
118
|
+
*
|
|
119
|
+
* Deliberately separate from {@link useT}, which stays strict. This is the one
|
|
120
|
+
* place the typed-key guarantee is given up, and it is given up for keys that
|
|
121
|
+
* `@entifix/core` cannot type: core carries `labelKey` as an opaque string
|
|
122
|
+
* because it has no catalogs to check it against. Authored copy must go through
|
|
123
|
+
* `useT` so a typo stays a compile error.
|
|
124
|
+
*/ export function useTranslateKey() {
|
|
125
|
+
return useT();
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
//# sourceMappingURL=i18n-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/i18n/i18n-context.tsx"],"sourcesContent":["'use client';\n\nimport {\n DEFAULT_LOCALE,\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 Spanish:\n * the failure mode becomes \"this screen is Spanish for an English visitor\",\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 fallback ??= {\n locale: DEFAULT_LOCALE,\n formatters: makeFormatters(DEFAULT_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 const catalog = fallbackCatalogFor(\n namespace ?? 'controls',\n DEFAULT_LOCALE,\n );\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":["DEFAULT_LOCALE","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,cAAc,EAGdC,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,GAAGC,SAASC;AACrB;AAEA,MAAMS,cAAc,CAACC,MAAcJ,SACjCA,WAAWF,YACPM,OACAA,KAAKC,OAAO,CAAC,2BAA2B,CAACC,OAAOC,OAC9CA,QAAQP,SAASQ,OAAOR,MAAM,CAACO,KAAK,IAAID;AAGhD;;;;;;;;;;;;;;;CAeC,GACD,SAASG;IACPlB,mBAAAA,WAAAA,WAAa;QACXmB,QAAQ1B;QACR2B,YAAY1B,eAAeD;QAC3B4B,GAAG,CAACC,IAAInB,KAAKM;YACX,wEAAwE;YACxE,sEAAsE;YACtE,uEAAuE;YACvE,wEAAwE;YACxE,kBAAkB;YAClB,MAAM,CAACc,QAAQ,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,MAAMD,UAAUJ,mBACd6B,oBAAAA,YAAa,YACblC;YAEF,IAAIS,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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/i18n/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/i18n/index.ts"],"sourcesContent":["export * from './catalog/index.js';\nexport * from './entity-labels.js';\nexport * from './fallback-catalogs.js';\nexport * from './i18n-context.js';\n"],"names":[],"mappings":"AAAA,cAAc,qBAAqB;AACnC,cAAc,qBAAqB;AACnC,cAAc,yBAAyB;AACvC,cAAc,oBAAoB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalogs.d.ts","sourceRoot":"","sources":["../../../src/i18n/spec-support/catalogs.ts"],"names":[],"mappings":"AAsGA,wBAAgB,mBAAmB,IAAI,IAAI,CAS1C"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
2
|
+
import { defineCatalogs } from '@entifix/i18n';
|
|
3
|
+
import { controlsCatalogs } from '../catalog/index.js';
|
|
4
|
+
/**
|
|
5
|
+
* Catalogs for this package's own specs.
|
|
6
|
+
*
|
|
7
|
+
* ⚠️ **`entity` and `errors` are fixtures here, not shipped catalogs.** Both are
|
|
8
|
+
* *host* namespaces now: `entity` names the adopter's entities and `errors` is
|
|
9
|
+
* the code vocabulary their services answer with, so a framework shipping either
|
|
10
|
+
* would be shipping product copy — which is exactly what
|
|
11
|
+
* [ADR 0059](../../../../../../docs/adr/0059-entifix-leaves-the-repo.md)
|
|
12
|
+
* removes. What these specs prove is that a `labelKey` resolves against whatever
|
|
13
|
+
* catalog is installed, and a fixture proves that as well as r10c's did.
|
|
14
|
+
*
|
|
15
|
+
* The keys below are the ones the specs actually name, kept verbatim so the
|
|
16
|
+
* assertions still read as sentences rather than as placeholders.
|
|
17
|
+
*/ const entity = {
|
|
18
|
+
es: {
|
|
19
|
+
'product-specification': {
|
|
20
|
+
label: 'Producto',
|
|
21
|
+
plural: 'Productos',
|
|
22
|
+
fields: {
|
|
23
|
+
code: 'Código',
|
|
24
|
+
name: 'Nombre'
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
'user-identity': {
|
|
28
|
+
values: {
|
|
29
|
+
role: {
|
|
30
|
+
admin: 'Administrador',
|
|
31
|
+
user: 'Usuario'
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
useCases: {
|
|
35
|
+
revokeSessions: 'Cerrar sesiones',
|
|
36
|
+
revokeSessionsConfirm: '¿Cerrar todas las sesiones?'
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
'product-brand': {
|
|
40
|
+
useCases: {
|
|
41
|
+
retire: 'Retirar',
|
|
42
|
+
retireConfirm: '¿Retirar la marca?'
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
gadget: {
|
|
46
|
+
useCases: {
|
|
47
|
+
compare: 'Comparar',
|
|
48
|
+
import: 'Importar',
|
|
49
|
+
purge: 'Purgar',
|
|
50
|
+
purgeConfirm: '¿Purgar el registro?',
|
|
51
|
+
revokeSessions: 'Cerrar sesiones',
|
|
52
|
+
revokeSessionsConfirm: '¿Cerrar todas las sesiones?',
|
|
53
|
+
settleAll: 'Liquidar todo',
|
|
54
|
+
updateAspects: 'Actualizar aspectos'
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
'context-dependent': 'Depende del contexto',
|
|
58
|
+
'context-independent': 'Independiente del contexto',
|
|
59
|
+
determining: 'Determinante'
|
|
60
|
+
},
|
|
61
|
+
en: {
|
|
62
|
+
'product-specification': {
|
|
63
|
+
label: 'Product',
|
|
64
|
+
plural: 'Products',
|
|
65
|
+
fields: {
|
|
66
|
+
code: 'Code',
|
|
67
|
+
name: 'Name'
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
'user-identity': {
|
|
71
|
+
values: {
|
|
72
|
+
role: {
|
|
73
|
+
admin: 'Administrator',
|
|
74
|
+
user: 'User'
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
useCases: {
|
|
78
|
+
revokeSessions: 'Revoke sessions',
|
|
79
|
+
revokeSessionsConfirm: 'Revoke every session?'
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
'product-brand': {
|
|
83
|
+
useCases: {
|
|
84
|
+
retire: 'Retire',
|
|
85
|
+
retireConfirm: 'Retire the brand?'
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
gadget: {
|
|
89
|
+
useCases: {
|
|
90
|
+
compare: 'Compare',
|
|
91
|
+
import: 'Import',
|
|
92
|
+
purge: 'Purge',
|
|
93
|
+
purgeConfirm: 'Purge the record?',
|
|
94
|
+
revokeSessions: 'Revoke sessions',
|
|
95
|
+
revokeSessionsConfirm: 'Revoke every session?',
|
|
96
|
+
settleAll: 'Settle all',
|
|
97
|
+
updateAspects: 'Update aspects'
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
'context-dependent': 'Context dependent',
|
|
101
|
+
'context-independent': 'Context independent',
|
|
102
|
+
determining: 'Determining'
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
const errors = {
|
|
106
|
+
es: {
|
|
107
|
+
unauthenticated: 'No autenticado',
|
|
108
|
+
forbidden: 'Sin permiso',
|
|
109
|
+
notFound: 'No encontrado',
|
|
110
|
+
invalidQuery: 'La consulta no es válida.',
|
|
111
|
+
unexpected: 'Error inesperado'
|
|
112
|
+
},
|
|
113
|
+
en: {
|
|
114
|
+
unauthenticated: 'Not authenticated',
|
|
115
|
+
forbidden: 'Forbidden',
|
|
116
|
+
notFound: 'Not found',
|
|
117
|
+
invalidQuery: 'The query is not valid.',
|
|
118
|
+
unexpected: 'Unexpected error'
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
export function installSpecCatalogs() {
|
|
122
|
+
defineCatalogs({
|
|
123
|
+
resources: {
|
|
124
|
+
es: _extends({}, controlsCatalogs.es, {
|
|
125
|
+
entity: entity.es,
|
|
126
|
+
errors: errors.es
|
|
127
|
+
}),
|
|
128
|
+
en: _extends({}, controlsCatalogs.en, {
|
|
129
|
+
entity: entity.en,
|
|
130
|
+
errors: errors.en
|
|
131
|
+
})
|
|
132
|
+
},
|
|
133
|
+
namespaces: [
|
|
134
|
+
'controls',
|
|
135
|
+
'entity',
|
|
136
|
+
'errors'
|
|
137
|
+
],
|
|
138
|
+
defaultNS: 'controls'
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
//# sourceMappingURL=catalogs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/i18n/spec-support/catalogs.ts"],"sourcesContent":["import { defineCatalogs } from '@entifix/i18n';\n\nimport { controlsCatalogs } from '../catalog/index.js';\n\n/**\n * Catalogs for this package's own specs.\n *\n * ⚠️ **`entity` and `errors` are fixtures here, not shipped catalogs.** Both are\n * *host* namespaces now: `entity` names the adopter's entities and `errors` is\n * the code vocabulary their services answer with, so a framework shipping either\n * would be shipping product copy — which is exactly what\n * [ADR 0059](../../../../../../docs/adr/0059-entifix-leaves-the-repo.md)\n * removes. What these specs prove is that a `labelKey` resolves against whatever\n * catalog is installed, and a fixture proves that as well as r10c's did.\n *\n * The keys below are the ones the specs actually name, kept verbatim so the\n * assertions still read as sentences rather than as placeholders.\n */\nconst entity = {\n es: {\n 'product-specification': {\n label: 'Producto',\n plural: 'Productos',\n fields: { code: 'Código', name: 'Nombre' },\n },\n 'user-identity': {\n values: { role: { admin: 'Administrador', user: 'Usuario' } },\n useCases: {\n revokeSessions: 'Cerrar sesiones',\n revokeSessionsConfirm: '¿Cerrar todas las sesiones?',\n },\n },\n 'product-brand': {\n useCases: { retire: 'Retirar', retireConfirm: '¿Retirar la marca?' },\n },\n gadget: {\n useCases: {\n compare: 'Comparar',\n import: 'Importar',\n purge: 'Purgar',\n purgeConfirm: '¿Purgar el registro?',\n revokeSessions: 'Cerrar sesiones',\n revokeSessionsConfirm: '¿Cerrar todas las sesiones?',\n settleAll: 'Liquidar todo',\n updateAspects: 'Actualizar aspectos',\n },\n },\n 'context-dependent': 'Depende del contexto',\n 'context-independent': 'Independiente del contexto',\n determining: 'Determinante',\n },\n en: {\n 'product-specification': {\n label: 'Product',\n plural: 'Products',\n fields: { code: 'Code', name: 'Name' },\n },\n 'user-identity': {\n values: { role: { admin: 'Administrator', user: 'User' } },\n useCases: {\n revokeSessions: 'Revoke sessions',\n revokeSessionsConfirm: 'Revoke every session?',\n },\n },\n 'product-brand': {\n useCases: { retire: 'Retire', retireConfirm: 'Retire the brand?' },\n },\n gadget: {\n useCases: {\n compare: 'Compare',\n import: 'Import',\n purge: 'Purge',\n purgeConfirm: 'Purge the record?',\n revokeSessions: 'Revoke sessions',\n revokeSessionsConfirm: 'Revoke every session?',\n settleAll: 'Settle all',\n updateAspects: 'Update aspects',\n },\n },\n 'context-dependent': 'Context dependent',\n 'context-independent': 'Context independent',\n determining: 'Determining',\n },\n} as const;\n\nconst errors = {\n es: {\n unauthenticated: 'No autenticado',\n forbidden: 'Sin permiso',\n notFound: 'No encontrado',\n invalidQuery: 'La consulta no es válida.',\n unexpected: 'Error inesperado',\n },\n en: {\n unauthenticated: 'Not authenticated',\n forbidden: 'Forbidden',\n notFound: 'Not found',\n invalidQuery: 'The query is not valid.',\n unexpected: 'Unexpected error',\n },\n} as const;\n\nexport function installSpecCatalogs(): void {\n defineCatalogs({\n resources: {\n es: { ...controlsCatalogs.es, entity: entity.es, errors: errors.es },\n en: { ...controlsCatalogs.en, entity: entity.en, errors: errors.en },\n },\n namespaces: ['controls', 'entity', 'errors'],\n defaultNS: 'controls',\n });\n}\n"],"names":["defineCatalogs","controlsCatalogs","entity","es","label","plural","fields","code","name","values","role","admin","user","useCases","revokeSessions","revokeSessionsConfirm","retire","retireConfirm","gadget","compare","import","purge","purgeConfirm","settleAll","updateAspects","determining","en","errors","unauthenticated","forbidden","notFound","invalidQuery","unexpected","installSpecCatalogs","resources","namespaces","defaultNS"],"mappings":";AAAA,SAASA,cAAc,QAAQ,gBAAgB;AAE/C,SAASC,gBAAgB,QAAQ,sBAAsB;AAEvD;;;;;;;;;;;;;CAaC,GACD,MAAMC,SAAS;IACbC,IAAI;QACF,yBAAyB;YACvBC,OAAO;YACPC,QAAQ;YACRC,QAAQ;gBAAEC,MAAM;gBAAUC,MAAM;YAAS;QAC3C;QACA,iBAAiB;YACfC,QAAQ;gBAAEC,MAAM;oBAAEC,OAAO;oBAAiBC,MAAM;gBAAU;YAAE;YAC5DC,UAAU;gBACRC,gBAAgB;gBAChBC,uBAAuB;YACzB;QACF;QACA,iBAAiB;YACfF,UAAU;gBAAEG,QAAQ;gBAAWC,eAAe;YAAqB;QACrE;QACAC,QAAQ;YACNL,UAAU;gBACRM,SAAS;gBACTC,QAAQ;gBACRC,OAAO;gBACPC,cAAc;gBACdR,gBAAgB;gBAChBC,uBAAuB;gBACvBQ,WAAW;gBACXC,eAAe;YACjB;QACF;QACA,qBAAqB;QACrB,uBAAuB;QACvBC,aAAa;IACf;IACAC,IAAI;QACF,yBAAyB;YACvBtB,OAAO;YACPC,QAAQ;YACRC,QAAQ;gBAAEC,MAAM;gBAAQC,MAAM;YAAO;QACvC;QACA,iBAAiB;YACfC,QAAQ;gBAAEC,MAAM;oBAAEC,OAAO;oBAAiBC,MAAM;gBAAO;YAAE;YACzDC,UAAU;gBACRC,gBAAgB;gBAChBC,uBAAuB;YACzB;QACF;QACA,iBAAiB;YACfF,UAAU;gBAAEG,QAAQ;gBAAUC,eAAe;YAAoB;QACnE;QACAC,QAAQ;YACNL,UAAU;gBACRM,SAAS;gBACTC,QAAQ;gBACRC,OAAO;gBACPC,cAAc;gBACdR,gBAAgB;gBAChBC,uBAAuB;gBACvBQ,WAAW;gBACXC,eAAe;YACjB;QACF;QACA,qBAAqB;QACrB,uBAAuB;QACvBC,aAAa;IACf;AACF;AAEA,MAAME,SAAS;IACbxB,IAAI;QACFyB,iBAAiB;QACjBC,WAAW;QACXC,UAAU;QACVC,cAAc;QACdC,YAAY;IACd;IACAN,IAAI;QACFE,iBAAiB;QACjBC,WAAW;QACXC,UAAU;QACVC,cAAc;QACdC,YAAY;IACd;AACF;AAEA,OAAO,SAASC;IACdjC,eAAe;QACbkC,WAAW;YACT/B,IAAI,aAAKF,iBAAiBE,EAAE;gBAAED,QAAQA,OAAOC,EAAE;gBAAEwB,QAAQA,OAAOxB,EAAE;;YAClEuB,IAAI,aAAKzB,iBAAiByB,EAAE;gBAAExB,QAAQA,OAAOwB,EAAE;gBAAEC,QAAQA,OAAOD,EAAE;;QACpE;QACAS,YAAY;YAAC;YAAY;YAAU;SAAS;QAC5CC,WAAW;IACb;AACF"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type Locale } from '@entifix/core';
|
|
2
|
+
import { type PropsWithChildren } from 'react';
|
|
3
|
+
import { type Translator } from '../i18n/i18n-context.js';
|
|
4
|
+
export interface I18nProviderProps extends PropsWithChildren {
|
|
5
|
+
/** Negotiated upstream — by the Next middleware in an app, by a decorator in Storybook. */
|
|
6
|
+
locale: Locale;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Binds one locale to the subtree. A fresh i18next instance per locale keeps
|
|
10
|
+
* concurrent server renders from sharing mutable `lng` state; `I18nextProvider`
|
|
11
|
+
* carries it so any nested `useTranslation` resolves against the same catalogs.
|
|
12
|
+
*/
|
|
13
|
+
export declare function I18nProvider({ locale, children }: I18nProviderProps): import("react").JSX.Element;
|
|
14
|
+
/**
|
|
15
|
+
* A translator over the shared fallback instance, for a caller that has
|
|
16
|
+
* catalogs installed but no provider in the tree — a spec, a Storybook
|
|
17
|
+
* decorator that renders one control.
|
|
18
|
+
*/
|
|
19
|
+
export declare function fallbackI18nextTranslator(locale: Locale): Translator;
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/i18next/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,MAAM,EAAkB,MAAM,eAAe,CAAC;AAG5D,OAAO,EAAE,KAAK,iBAAiB,EAAW,MAAM,OAAO,CAAC;AAGxD,OAAO,EAAE,KAAK,UAAU,EAAsB,MAAM,yBAAyB,CAAC;AA2B9E,MAAM,WAAW,iBAAkB,SAAQ,iBAAiB;IAC1D,2FAA2F;IAC3F,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,iBAAiB,+BAenE;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAEpE"}
|