@cosmicdrift/kumiko-renderer 0.413.1 → 0.415.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/action-form-support.js +4 -0
- package/dist/app/content-previews.d.ts +39 -0
- package/dist/app/content-previews.js +28 -0
- package/dist/app/entity-edit-screen.js +2 -5
- package/dist/app/entity-list-screen.js +42 -59
- package/dist/app/form-schema.d.ts +1 -0
- package/dist/app/form-schema.js +24 -0
- package/dist/app/list-facets.d.ts +1 -0
- package/dist/app/list-facets.js +10 -1
- package/dist/app/list-sort-options.d.ts +4 -0
- package/dist/app/list-sort-options.js +11 -0
- package/dist/app/named-filter-facet.d.ts +16 -3
- package/dist/app/named-filter-facet.js +97 -5
- package/dist/app/projection-detail-body.d.ts +2 -4
- package/dist/app/projection-detail-body.js +7 -1
- package/dist/app/projection-detail-guidance-data.d.ts +7 -0
- package/dist/app/projection-detail-guidance-data.js +103 -0
- package/dist/app/projection-detail-guidance.d.ts +13 -0
- package/dist/app/projection-detail-guidance.js +197 -0
- package/dist/app/projection-detail-header-model.d.ts +1 -3
- package/dist/app/projection-detail-header-model.js +4 -8
- package/dist/app/projection-detail-header-region.d.ts +2 -1
- package/dist/app/projection-detail-header-region.js +63 -23
- package/dist/app/projection-detail-header.d.ts +6 -1
- package/dist/app/projection-detail-header.js +76 -18
- package/dist/app/projection-detail-navigation.d.ts +2 -0
- package/dist/app/projection-detail-navigation.js +13 -3
- package/dist/app/projection-detail-states.d.ts +3 -3
- package/dist/app/projection-list-body.js +4 -2
- package/dist/app/projection-list-render.js +3 -1
- package/dist/app/projection-list-shim.d.ts +4 -1
- package/dist/app/projection-list-shim.js +35 -8
- package/dist/app/reference-link.d.ts +3 -2
- package/dist/app/reference-link.js +19 -4
- package/dist/app/row-actions.js +3 -3
- package/dist/app/screen-access.d.ts +4 -0
- package/dist/app/screen-access.js +18 -0
- package/dist/app/screen-shared.js +3 -1
- package/dist/app/unique-label-keys.d.ts +1 -0
- package/dist/app/unique-label-keys.js +9 -0
- package/dist/app/use-entity-list-payload.d.ts +26 -0
- package/dist/app/use-entity-list-payload.js +59 -0
- package/dist/app/use-entity-range-facets.js +2 -3
- package/dist/app/use-facet-counts.d.ts +5 -0
- package/dist/app/use-facet-counts.js +7 -0
- package/dist/app/use-list-summary-row.d.ts +10 -0
- package/dist/app/use-list-summary-row.js +33 -0
- package/dist/app/use-named-filter-queue.d.ts +20 -0
- package/dist/app/use-named-filter-queue.js +9 -0
- package/dist/app/use-projection-detail-actions.d.ts +5 -4
- package/dist/app/use-projection-detail-actions.js +42 -1
- package/dist/app/use-projection-list-data.d.ts +5 -0
- package/dist/app/use-projection-list-data.js +35 -6
- package/dist/app/use-projection-list-query.d.ts +2 -0
- package/dist/app/use-projection-list-query.js +29 -16
- package/dist/app/use-related-list-tab-counts.js +5 -1
- package/dist/app/use-row-decoration.d.ts +13 -0
- package/dist/app/use-row-decoration.js +103 -0
- package/dist/app/use-screen-list-rows.d.ts +4 -1
- package/dist/app/use-screen-list-rows.js +14 -5
- package/dist/app/use-screen-list-table.d.ts +3 -1
- package/dist/app/use-screen-list-table.js +10 -1
- package/dist/app/write-failed-error.d.ts +1 -0
- package/dist/app/write-failed-error.js +10 -0
- package/dist/card-options.d.ts +25 -0
- package/dist/card-options.js +1 -0
- package/dist/compact-tap-classes.d.ts +1 -0
- package/dist/compact-tap-classes.js +3 -0
- package/dist/components/embedded-list-field.js +13 -12
- package/dist/components/list-empty-state.d.ts +13 -1
- package/dist/components/list-empty-state.js +20 -1
- package/dist/components/list-group-page-bridges.d.ts +1 -1
- package/dist/components/list-group-page-bridges.js +2 -2
- package/dist/components/related-list-section.js +4 -22
- package/dist/components/render-edit-action-button.d.ts +3 -1
- package/dist/components/render-edit-action-button.js +5 -3
- package/dist/components/render-edit-render-model.d.ts +2 -2
- package/dist/components/render-edit-types.d.ts +4 -2
- package/dist/components/render-edit.js +3 -1
- package/dist/components/render-list-hint-columns.d.ts +9 -0
- package/dist/components/render-list-hint-columns.js +87 -0
- package/dist/components/render-list-reference-columns.js +4 -2
- package/dist/components/render-list-row-tone.d.ts +3 -0
- package/dist/components/render-list-row-tone.js +10 -0
- package/dist/components/render-list-table-props.d.ts +9 -1
- package/dist/components/render-list-table-props.js +4 -1
- package/dist/components/render-list-toolbar-action.d.ts +1 -2
- package/dist/components/render-list-toolbar-model.d.ts +4 -1
- package/dist/components/render-list-toolbar-model.js +21 -6
- package/dist/components/render-list-toolbar.d.ts +3 -2
- package/dist/components/render-list-toolbar.js +8 -6
- package/dist/components/render-list-types.d.ts +6 -1
- package/dist/components/render-list.js +26 -7
- package/dist/components/use-render-edit-controlled-sync.js +3 -5
- package/dist/components/use-render-edit-draft-save.js +7 -9
- package/dist/components/use-render-edit-schema.d.ts +3 -0
- package/dist/components/use-render-edit-schema.js +15 -0
- package/dist/components/use-render-edit-state.d.ts +1 -0
- package/dist/components/use-render-edit-state.js +4 -1
- package/dist/components/use-render-edit-steps.js +2 -3
- package/dist/components/use-render-list-columns.d.ts +3 -1
- package/dist/components/use-render-list-columns.js +22 -10
- package/dist/context/screen-focus-context.d.ts +14 -0
- package/dist/context/screen-focus-context.js +28 -0
- package/dist/data-table-facet-types.d.ts +6 -0
- package/dist/data-table-view-types.d.ts +20 -1
- package/dist/headless/form/form-controller.js +3 -1
- package/dist/headless/form/zod-bridge.d.ts +7 -1
- package/dist/headless/form/zod-bridge.js +10 -0
- package/dist/headless/index.d.ts +2 -1
- package/dist/headless/index.js +1 -0
- package/dist/headless/pwa-service-worker-meta.d.ts +4 -0
- package/dist/headless/pwa-service-worker-meta.js +13 -0
- package/dist/headless/view-model/index.d.ts +1 -1
- package/dist/headless/view-model/list-file-display.js +3 -2
- package/dist/headless/view-model/list.js +16 -0
- package/dist/headless/view-model/types.d.ts +37 -0
- package/dist/hooks/list-column-layout.js +2 -1
- package/dist/hooks/list-server-groups.js +14 -1
- package/dist/hooks/list-state-schema.d.ts +1 -0
- package/dist/hooks/list-state-schema.js +9 -1
- package/dist/hooks/use-debounced-value.d.ts +1 -0
- package/dist/hooks/use-debounced-value.js +11 -0
- package/dist/hooks/use-list-aggregates.d.ts +5 -1
- package/dist/hooks/use-list-aggregates.js +9 -5
- package/dist/hooks/use-list-table.d.ts +2 -1
- package/dist/hooks/use-list-table.js +3 -9
- package/dist/hooks/use-list-url-state.d.ts +2 -0
- package/dist/hooks/use-list-url-state.js +12 -4
- package/dist/hooks/use-list-view-state.js +23 -3
- package/dist/hooks/use-reference-lookup.js +7 -2
- package/dist/hooks/use-remembered-list-params.d.ts +6 -2
- package/dist/hooks/use-remembered-list-params.js +18 -3
- package/dist/hooks/use-store.js +0 -1
- package/dist/i18n-defaults.js +39 -3
- package/dist/index.d.ts +7 -2
- package/dist/index.js +4 -1
- package/dist/live/dispatcher-live.js +2 -0
- package/dist/metric-types.d.ts +4 -0
- package/dist/primitives-record-guidance.d.ts +55 -0
- package/dist/primitives-record-guidance.js +1 -0
- package/dist/primitives.d.ts +47 -54
- package/dist/server-clock.d.ts +6 -0
- package/dist/server-clock.js +20 -0
- package/dist/session/session-ended.d.ts +1 -0
- package/dist/session/session-ended.js +2 -2
- package/dist/status-tone.d.ts +1 -0
- package/dist/status-tone.js +5 -0
- package/dist/web/app/browser-locale.js +1 -1
- package/dist/web/app/client-plugin.d.ts +6 -1
- package/dist/web/app/create-app.d.ts +2 -1
- package/dist/web/app/create-app.js +15 -5
- package/dist/web/app/dashboard-body.js +25 -11
- package/dist/web/app/dashboard-header.d.ts +2 -1
- package/dist/web/app/dashboard-header.js +19 -7
- package/dist/web/app/dashboard-list-panel.d.ts +12 -0
- package/dist/web/app/dashboard-list-panel.js +144 -0
- package/dist/web/app/dashboard-narrow-gate.d.ts +6 -0
- package/dist/web/app/dashboard-narrow-gate.js +6 -0
- package/dist/web/app/dashboard-narrow-order.d.ts +3 -0
- package/dist/web/app/dashboard-narrow-order.js +6 -0
- package/dist/web/app/dashboard-navigation-link.d.ts +12 -0
- package/dist/web/app/dashboard-navigation-link.js +21 -0
- package/dist/web/app/dashboard-panels.d.ts +7 -23
- package/dist/web/app/dashboard-panels.js +55 -123
- package/dist/web/app/dashboard-reference-list-table.d.ts +5 -1
- package/dist/web/app/dashboard-reference-list-table.js +13 -4
- package/dist/web/app/dashboard-shared.d.ts +23 -7
- package/dist/web/app/dashboard-shared.js +45 -17
- package/dist/web/app/dashboard-stat-group-panel.d.ts +14 -0
- package/dist/web/app/dashboard-stat-group-panel.js +74 -0
- package/dist/web/app/dashboard-text-panel.d.ts +12 -0
- package/dist/web/app/dashboard-text-panel.js +167 -0
- package/dist/web/app/dashboard-text.d.ts +2 -0
- package/dist/web/app/dashboard-text.js +1 -1
- package/dist/web/app/dashboard-visibility.js +1 -1
- package/dist/web/app/relative-time.js +2 -1
- package/dist/web/drawn-icons.d.ts +6 -0
- package/dist/web/drawn-icons.js +30 -0
- package/dist/web/editor/editor-footer.d.ts +28 -0
- package/dist/web/editor/editor-footer.js +23 -0
- package/dist/web/editor/editor-frame.d.ts +23 -0
- package/dist/web/editor/editor-frame.js +24 -0
- package/dist/web/editor/editor-header.d.ts +36 -0
- package/dist/web/editor/editor-header.js +30 -0
- package/dist/web/editor/editor-rail.d.ts +32 -0
- package/dist/web/editor/editor-rail.js +37 -0
- package/dist/web/editor/editor-workbench.d.ts +34 -0
- package/dist/web/editor/editor-workbench.js +19 -0
- package/dist/web/editor/index.d.ts +6 -0
- package/dist/web/editor/index.js +6 -0
- package/dist/web/editor/relative-when.d.ts +1 -0
- package/dist/web/editor/relative-when.js +18 -0
- package/dist/web/icons.js +6 -5
- package/dist/web/index.d.ts +9 -1
- package/dist/web/index.js +7 -1
- package/dist/web/layout/default-app-shell.js +6 -4
- package/dist/web/layout/focus-aware-sidebar.d.ts +4 -7
- package/dist/web/layout/focus-aware-sidebar.js +5 -7
- package/dist/web/layout/header-action-pinned.d.ts +8 -0
- package/dist/web/layout/header-action-pinned.js +25 -0
- package/dist/web/layout/nav-collapse-state.d.ts +7 -0
- package/dist/web/layout/nav-collapse-state.js +76 -0
- package/dist/web/layout/nav-tree.js +71 -28
- package/dist/web/layout/notification-bell.d.ts +7 -2
- package/dist/web/layout/notification-bell.js +16 -5
- package/dist/web/layout/page-header-slot.d.ts +2 -0
- package/dist/web/layout/page-header-slot.js +4 -0
- package/dist/web/layout/screen-focus.d.ts +8 -0
- package/dist/web/layout/screen-focus.js +42 -0
- package/dist/web/layout/shell-focus.d.ts +5 -4
- package/dist/web/layout/shell-focus.js +14 -7
- package/dist/web/layout/shell-header.d.ts +2 -1
- package/dist/web/layout/shell-header.js +84 -27
- package/dist/web/layout/shell-style.d.ts +3 -0
- package/dist/web/layout/shell-style.js +6 -0
- package/dist/web/layout/sidebar-open-state.d.ts +6 -0
- package/dist/web/layout/sidebar-open-state.js +28 -0
- package/dist/web/layout/uniform-bar-controls.d.ts +2 -2
- package/dist/web/layout/uniform-bar-controls.js +4 -3
- package/dist/web/layout/use-in-app-inbox.js +8 -1
- package/dist/web/layout/workspace-shell.d.ts +11 -1
- package/dist/web/layout/workspace-shell.js +9 -5
- package/dist/web/lib/upload-file-ref.d.ts +2 -2
- package/dist/web/lib/upload-file-ref.js +4 -9
- package/dist/web/presence/use-presence.js +7 -2
- package/dist/web/primitives/banner.d.ts +1 -1
- package/dist/web/primitives/banner.js +22 -9
- package/dist/web/primitives/calendar-day-picker.js +24 -5
- package/dist/web/primitives/card.js +18 -8
- package/dist/web/primitives/code-input.js +6 -1
- package/dist/web/primitives/data-table/actions-column.d.ts +2 -1
- package/dist/web/primitives/data-table/actions-column.js +7 -3
- package/dist/web/primitives/data-table/card-body.d.ts +6 -1
- package/dist/web/primitives/data-table/card-body.js +53 -6
- package/dist/web/primitives/data-table/card-frame.d.ts +8 -0
- package/dist/web/primitives/data-table/card-frame.js +9 -0
- package/dist/web/primitives/data-table/card-row.js +44 -7
- package/dist/web/primitives/data-table/card-sort-select.d.ts +6 -2
- package/dist/web/primitives/data-table/card-sort-select.js +10 -7
- package/dist/web/primitives/data-table/card-view.js +12 -2
- package/dist/web/primitives/data-table/column-picker-section.js +9 -2
- package/dist/web/primitives/data-table/column-resize-handle.js +3 -4
- package/dist/web/primitives/data-table/column-role.d.ts +1 -0
- package/dist/web/primitives/data-table/column-role.js +1 -0
- package/dist/web/primitives/data-table/data-cell-props.d.ts +5 -0
- package/dist/web/primitives/data-table/data-cell-props.js +5 -0
- package/dist/web/primitives/data-table/density.js +1 -0
- package/dist/web/primitives/data-table/facet-cluster.d.ts +2 -1
- package/dist/web/primitives/data-table/facet-cluster.js +2 -2
- package/dist/web/primitives/data-table/group-band.js +4 -0
- package/dist/web/primitives/data-table/hint-cell.d.ts +14 -0
- package/dist/web/primitives/data-table/hint-cell.js +68 -0
- package/dist/web/primitives/data-table/hint-column-width.d.ts +3 -0
- package/dist/web/primitives/data-table/hint-column-width.js +11 -0
- package/dist/web/primitives/data-table/measure-value.js +2 -3
- package/dist/web/primitives/data-table/row-action-column.d.ts +3 -0
- package/dist/web/primitives/data-table/row-action-column.js +4 -0
- package/dist/web/primitives/data-table/row-render-parts.d.ts +1 -1
- package/dist/web/primitives/data-table/row-render-parts.js +3 -2
- package/dist/web/primitives/data-table/sort-options-select.d.ts +22 -0
- package/dist/web/primitives/data-table/sort-options-select.js +46 -0
- package/dist/web/primitives/data-table/sortable-header.d.ts +3 -1
- package/dist/web/primitives/data-table/sortable-header.js +5 -3
- package/dist/web/primitives/data-table/table-body.d.ts +1 -1
- package/dist/web/primitives/data-table/table-body.js +5 -3
- package/dist/web/primitives/data-table/table-chrome.js +3 -1
- package/dist/web/primitives/data-table/table-content.js +12 -7
- package/dist/web/primitives/data-table/table-data-cell.js +9 -3
- package/dist/web/primitives/data-table/table-header-row.js +5 -2
- package/dist/web/primitives/data-table/table-view.js +22 -3
- package/dist/web/primitives/data-table/toolbar-end-cluster.js +1 -1
- package/dist/web/primitives/data-table/toolbar.d.ts +2 -0
- package/dist/web/primitives/data-table/toolbar.js +70 -7
- package/dist/web/primitives/data-table/totals-footer.d.ts +20 -0
- package/dist/web/primitives/data-table/totals-footer.js +41 -9
- package/dist/web/primitives/data-table/use-bulk-selection.js +2 -1
- package/dist/web/primitives/data-table/use-column-pins.js +4 -0
- package/dist/web/primitives/data-table/use-data-table-state.d.ts +1 -0
- package/dist/web/primitives/data-table/use-data-table-state.js +9 -5
- package/dist/web/primitives/data-table/use-measured-column-widths.js +5 -4
- package/dist/web/primitives/data-table/use-row-selection.js +22 -11
- package/dist/web/primitives/data-table/view-menu.js +7 -1
- package/dist/web/primitives/data-table-cell.d.ts +21 -2
- package/dist/web/primitives/data-table-cell.js +129 -26
- package/dist/web/primitives/embedded-file-cell.js +3 -2
- package/dist/web/primitives/embedded-list-cards.js +3 -4
- package/dist/web/primitives/facet-filter.d.ts +5 -3
- package/dist/web/primitives/facet-filter.js +36 -5
- package/dist/web/primitives/facet-search-filter.d.ts +2 -1
- package/dist/web/primitives/facet-search-filter.js +3 -2
- package/dist/web/primitives/facet-trigger-label.d.ts +8 -0
- package/dist/web/primitives/facet-trigger-label.js +9 -0
- package/dist/web/primitives/file-thumbnail.d.ts +6 -2
- package/dist/web/primitives/file-thumbnail.js +13 -6
- package/dist/web/primitives/file-upload.js +3 -2
- package/dist/web/primitives/file-view-action.d.ts +6 -0
- package/dist/web/primitives/file-view-action.js +22 -0
- package/dist/web/primitives/files-dropzone.js +20 -9
- package/dist/web/primitives/form-footer-parts.d.ts +0 -1
- package/dist/web/primitives/form.js +0 -1
- package/dist/web/primitives/hint-reason-row.d.ts +32 -0
- package/dist/web/primitives/hint-reason-row.js +45 -0
- package/dist/web/primitives/index.js +6 -0
- package/dist/web/primitives/layout-elements.d.ts +1 -1
- package/dist/web/primitives/layout-elements.js +3 -3
- package/dist/web/primitives/metric.js +20 -6
- package/dist/web/primitives/page-header.d.ts +1 -1
- package/dist/web/primitives/page-header.js +10 -2
- package/dist/web/primitives/pager.d.ts +3 -2
- package/dist/web/primitives/pager.js +31 -24
- package/dist/web/primitives/reason-box.d.ts +20 -0
- package/dist/web/primitives/reason-box.js +13 -0
- package/dist/web/primitives/record-breadcrumb.d.ts +3 -0
- package/dist/web/primitives/record-breadcrumb.js +11 -0
- package/dist/web/primitives/record-steps.d.ts +3 -0
- package/dist/web/primitives/record-steps.js +50 -0
- package/dist/web/primitives/record-summary.d.ts +3 -0
- package/dist/web/primitives/record-summary.js +18 -0
- package/dist/web/primitives/row-actions.d.ts +3 -1
- package/dist/web/primitives/row-actions.js +14 -5
- package/dist/web/primitives/segmented-select.js +10 -9
- package/dist/web/primitives/tabs.js +6 -1
- package/dist/web/pwa/pwa-support.d.ts +4 -0
- package/dist/web/pwa/pwa-support.js +131 -0
- package/dist/web/sse/live-events.js +2 -2
- package/dist/web/tokens.js +0 -3
- package/dist/web/ui/sidebar.d.ts +2 -1
- package/dist/web/ui/sidebar.js +4 -3
- package/dist/web/widgets/ai-text-field.js +3 -2
- package/dist/web/widgets/chart-parts.d.ts +7 -1
- package/dist/web/widgets/chart-parts.js +10 -4
- package/dist/web/widgets/collapsible-section.js +1 -1
- package/dist/web/widgets/dashboard-list-cards.d.ts +17 -0
- package/dist/web/widgets/dashboard-list-cards.js +46 -0
- package/dist/web/widgets/dashboard-list.d.ts +45 -5
- package/dist/web/widgets/dashboard-list.js +126 -25
- package/dist/web/widgets/drawer-panel-class.d.ts +1 -0
- package/dist/web/widgets/drawer-panel-class.js +9 -1
- package/dist/web/widgets/drawer-sizing.js +1 -1
- package/dist/web/widgets/drawer.js +2 -2
- package/dist/web/widgets/floating-panel.js +4 -2
- package/dist/web/widgets/index.d.ts +2 -0
- package/dist/web/widgets/index.js +2 -0
- package/dist/web/widgets/infinity-list.js +18 -11
- package/dist/web/widgets/pdf-viewer-toolbar.js +3 -2
- package/dist/web/widgets/preview-width-frame.d.ts +7 -0
- package/dist/web/widgets/preview-width-frame.js +10 -0
- package/dist/web/widgets/section-card.d.ts +1 -1
- package/dist/web/widgets/sheet-parts.js +3 -1
- package/dist/web/widgets/stacked-area-chrome.js +3 -3
- package/dist/web/widgets/stacked-area-tooltip.js +2 -10
- package/dist/web/widgets/stat-box-cell.d.ts +19 -0
- package/dist/web/widgets/stat-box-cell.js +10 -0
- package/dist/web/widgets/stat.d.ts +16 -1
- package/dist/web/widgets/stat.js +24 -7
- package/dist/web/widgets/status-badge.d.ts +7 -5
- package/dist/web/widgets/status-badge.js +2 -2
- package/dist/web/widgets/step-bar.d.ts +1 -1
- package/dist/web/widgets/step-bar.js +37 -7
- package/dist/web/widgets/step-list-row.d.ts +4 -0
- package/dist/web/widgets/step-list-row.js +22 -14
- package/dist/web/widgets/step-list.d.ts +12 -4
- package/dist/web/widgets/step-list.js +38 -20
- package/dist/web/widgets/upload-zone.d.ts +8 -1
- package/dist/web/widgets/upload-zone.js +13 -3
- package/package.json +5 -5
- package/src/changes.json +289 -0
- package/src/web/styles.css +15 -0
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,8 @@ export type { ContentEditorComponent, ContentEditorProps, ContentEditorsMap, Con
|
|
|
12
12
|
export { CONTENT_EDITOR_ELEMENT_ID, ContentEditorsProvider, TextareaContentEditor, useContentEditor, } from "./app/content-editors.tsx";
|
|
13
13
|
export type { ContentPreviewProps } from "./app/content-preview.tsx";
|
|
14
14
|
export { ContentPreview, substituteVariables } from "./app/content-preview.tsx";
|
|
15
|
+
export type { ContentPreviewsMap, PreviewRenderer, PreviewRendererProps, PreviewSubject, PreviewTarget, } from "./app/content-previews.tsx";
|
|
16
|
+
export { ContentPreviewsProvider, PREVIEW_TARGETS, PreviewPane, TextPreviewRenderer, useContentPreview, } from "./app/content-previews.tsx";
|
|
15
17
|
export type { CustomScreensMap, CustomScreensProviderProps } from "./app/custom-screens.tsx";
|
|
16
18
|
export { CustomScreensProvider, useCustomScreenComponent } from "./app/custom-screens.tsx";
|
|
17
19
|
export type { DashboardBodyProps, DashboardBodyProviderProps } from "./app/dashboard-body.tsx";
|
|
@@ -41,7 +43,7 @@ export { useRecordActions } from "./app/use-record-actions.ts";
|
|
|
41
43
|
export type { VariableChipsProps } from "./app/variable-chips.tsx";
|
|
42
44
|
export { VariableChips } from "./app/variable-chips.tsx";
|
|
43
45
|
export { evalVisibleWhen, type VisibleWhenVerdict } from "./app/visible-when.ts";
|
|
44
|
-
export { dispatcherErrorText, WriteFailedError } from "./app/write-failed-error.ts";
|
|
46
|
+
export { dispatcherErrorText, dispatcherErrorTextWithFieldIssues, WriteFailedError, } from "./app/write-failed-error.ts";
|
|
45
47
|
export type { ErrorBoundaryFallbackProps, ErrorBoundaryProps, } from "./components/error-boundary.tsx";
|
|
46
48
|
export { ErrorBoundary } from "./components/error-boundary.tsx";
|
|
47
49
|
export { useTrackFormUpload } from "./components/form-pending-uploads.tsx";
|
|
@@ -60,6 +62,8 @@ export { DispatcherProvider, useDispatcher, useDispatcherStatus, useOptionalDisp
|
|
|
60
62
|
export type { DraftStorage, DraftStorageProviderProps } from "./context/draft-storage-context.tsx";
|
|
61
63
|
export { DraftStorageProvider, useDraftStorage } from "./context/draft-storage-context.tsx";
|
|
62
64
|
export { EmbeddedScreenProvider, useIsEmbeddedScreen } from "./context/embedded-screen-context.tsx";
|
|
65
|
+
export type { ScreenFocus } from "./context/screen-focus-context.tsx";
|
|
66
|
+
export { ScreenFocusProvider, useScreenFocus, useSetScreenFocus, } from "./context/screen-focus-context.tsx";
|
|
63
67
|
export type { UserRolesProviderProps } from "./context/user-roles-context.tsx";
|
|
64
68
|
export { UserRolesProvider, useUserRoles } from "./context/user-roles-context.tsx";
|
|
65
69
|
export type { CurrentUser } from "./current-user.tsx";
|
|
@@ -68,6 +72,7 @@ export { formatWhen } from "./format-when.ts";
|
|
|
68
72
|
export { REFERENCE_COMBOBOX_LIMIT, REFERENCE_LIST_LOOKUP_LIMIT, REFERENCE_SEARCH_DEBOUNCE_MS, } from "./hooks/reference-limits.ts";
|
|
69
73
|
export type { AiTextActionState, AiTextMode, AiTextRewriteStyle, AiTextRunPayload, AiTextRunResult, AiTextUsage, UseAiTextActionResult, UseCompletionResult, } from "./hooks/use-ai-text.ts";
|
|
70
74
|
export { AI_TEXT_RUN_QN, useAiTextAction, useCompletion } from "./hooks/use-ai-text.ts";
|
|
75
|
+
export { useDebouncedValue } from "./hooks/use-debounced-value.ts";
|
|
71
76
|
export type { UseDisclosureResult } from "./hooks/use-disclosure.ts";
|
|
72
77
|
export { useDisclosure } from "./hooks/use-disclosure.ts";
|
|
73
78
|
export type { UseFormOptions, UseFormResult } from "./hooks/use-form.ts";
|
|
@@ -89,7 +94,7 @@ export { InsideDrawerProvider, useInsideDrawer } from "./inside-drawer.ts";
|
|
|
89
94
|
export { hasUnsavedInput, registerUnsavedInputSource, requestLeave, setLeaveConfirmer, useUnsavedInputSource, } from "./leave-guard.ts";
|
|
90
95
|
export { LeaveGuardDialog } from "./leave-guard-dialog.tsx";
|
|
91
96
|
export { PageHeaderCompactProvider, PageHeaderSlotAvailableProvider, usePageHeaderCompact, usePageHeaderSlotAvailable, } from "./page-header-slot.ts";
|
|
92
|
-
export type { ActionMenuItemSpec, ActionOverflowMenuProps, AppPrimitives, BannerProps, BulkRowOutcome, ButtonProps, CardOptions, CardProps, CardSlots, CopyButtonProps, CorePrimitives, DataTableBulk, DataTableBulkAction, DataTableDateRangeFacet, DataTableFacet, DataTableFacetChip, DataTableProps, DataTableRowAction, DataTableRowActionMode, DataTableSort, DataTableSortDir, DialogProps, DrawerProps, EmbeddedListCellType, EmbeddedListColumn, EmbeddedListInputProps, EmbeddedListTotal, FieldCellWidth, FieldProps, FileValueListProps, FillContainerProps, FooterActionMarker, FooterActionRole, FormProps, FormSectionNavItem, FormWidth, GridCellProps, GridProps, HeadingProps, InputEndAction, InputFillAction, InputProps, JsonViewProps, LightboxImage, LightboxProps, LinkProps, MetricBandProps, MetricProps, ModalProps, PageHeaderProps, PickedFile, PrimitivesProviderProps, PrimitivesRegistry, ProgressProps, ProgressTone, PromoPanelAction, PromoPanelProps, RuntimeRenderer, SecretRevealProps, SecretRevealValue, SectionProps, ShareButtonProps, StatusBadgeProps, StatusTone, StepBarProps, StickyActionBarProps, StickyPrimaryActionMarker, TabsProps, TextProps, TrailingInputAction, WizardStepGroupProps, } from "./primitives.tsx";
|
|
97
|
+
export type { ActionMenuItemSpec, ActionOverflowMenuProps, AppPrimitives, BannerProps, BulkRowOutcome, ButtonProps, CardOptions, CardProps, CardSlots, CopyButtonProps, CorePrimitives, DataTableBulk, DataTableBulkAction, DataTableDateRangeFacet, DataTableFacet, DataTableFacetChip, DataTableProps, DataTableRowAction, DataTableRowActionMode, DataTableSort, DataTableSortDir, DialogProps, DrawerProps, EmbeddedListCellType, EmbeddedListColumn, EmbeddedListInputProps, EmbeddedListTotal, FieldCellWidth, FieldProps, FileValueListProps, FillContainerProps, FooterActionMarker, FooterActionRole, FormProps, FormSectionNavItem, FormWidth, GridCellProps, GridProps, HeadingProps, InputEndAction, InputFillAction, InputProps, JsonViewProps, LightboxImage, LightboxProps, LinkProps, MetricBandProps, MetricProps, ModalProps, PageHeaderProps, PickedFile, PrimitivesProviderProps, PrimitivesRegistry, ProgressProps, ProgressTone, PromoPanelAction, PromoPanelProps, RecordBreadcrumbProps, RecordStepsProps, RecordSummaryProps, RuntimeRenderer, SecretRevealProps, SecretRevealValue, SectionProps, ShareButtonProps, StatusBadgeProps, StatusTone, StepBarProps, StickyActionBarProps, StickyPrimaryActionMarker, TabsProps, TextProps, TrailingInputAction, WizardStepGroupProps, } from "./primitives.tsx";
|
|
93
98
|
export { FOOTER_ACTION_ROLE_PROP, NARROW_LABEL_PROP, PrimitivesProvider, STICKY_PRIMARY_ACTION_PROP, shouldRenderActionsIconOnly, statusToneForOptionTone, statusToneForValue, useOptionalPrimitives, usePrimitives, } from "./primitives.tsx";
|
|
94
99
|
export type { SessionEndedSignal, SessionEndedSignalProviderProps, } from "./session/session-ended.tsx";
|
|
95
100
|
export { createSessionEndedSignal, isSessionEndedError, SESSION_ENDED_ERROR_CODES, SessionEndedSignalProvider, useSessionEndedSignal, withSessionEndedDetection, } from "./session/session-ended.tsx";
|
package/dist/index.js
CHANGED
|
@@ -17,6 +17,7 @@ export { ActionNoticeProvider, ClientActionsProvider, runClientAction, useClient
|
|
|
17
17
|
export { ColumnRenderersProvider, useColumnRenderer } from "./app/column-renderers.js";
|
|
18
18
|
export { CONTENT_EDITOR_ELEMENT_ID, ContentEditorsProvider, TextareaContentEditor, useContentEditor, } from "./app/content-editors.js";
|
|
19
19
|
export { ContentPreview, substituteVariables } from "./app/content-preview.js";
|
|
20
|
+
export { ContentPreviewsProvider, PREVIEW_TARGETS, PreviewPane, TextPreviewRenderer, useContentPreview, } from "./app/content-previews.js";
|
|
20
21
|
export { CustomScreensProvider, useCustomScreenComponent } from "./app/custom-screens.js";
|
|
21
22
|
export { DashboardBodyProvider, useDashboardBody } from "./app/dashboard-body.js";
|
|
22
23
|
export { useTenantCurrency } from "./app/entity-edit-prefill.js";
|
|
@@ -35,7 +36,7 @@ export { useEmbeddedScreen } from "./app/use-embedded-screen.js";
|
|
|
35
36
|
export { useRecordActions } from "./app/use-record-actions.js";
|
|
36
37
|
export { VariableChips } from "./app/variable-chips.js";
|
|
37
38
|
export { evalVisibleWhen } from "./app/visible-when.js";
|
|
38
|
-
export { dispatcherErrorText, WriteFailedError } from "./app/write-failed-error.js";
|
|
39
|
+
export { dispatcherErrorText, dispatcherErrorTextWithFieldIssues, WriteFailedError, } from "./app/write-failed-error.js";
|
|
39
40
|
export { ErrorBoundary } from "./components/error-boundary.js";
|
|
40
41
|
export { useTrackFormUpload } from "./components/form-pending-uploads.js";
|
|
41
42
|
export { FormScreenLayout } from "./components/form-screen-layout.js";
|
|
@@ -47,11 +48,13 @@ export { RenderList } from "./components/render-list.js";
|
|
|
47
48
|
export { DispatcherProvider, useDispatcher, useDispatcherStatus, useOptionalDispatcher, } from "./context/dispatcher-context.js";
|
|
48
49
|
export { DraftStorageProvider, useDraftStorage } from "./context/draft-storage-context.js";
|
|
49
50
|
export { EmbeddedScreenProvider, useIsEmbeddedScreen } from "./context/embedded-screen-context.js";
|
|
51
|
+
export { ScreenFocusProvider, useScreenFocus, useSetScreenFocus, } from "./context/screen-focus-context.js";
|
|
50
52
|
export { UserRolesProvider, useUserRoles } from "./context/user-roles-context.js";
|
|
51
53
|
export { CurrentUserProvider, useOptionalCurrentUser } from "./current-user.js";
|
|
52
54
|
export { formatWhen } from "./format-when.js";
|
|
53
55
|
export { REFERENCE_COMBOBOX_LIMIT, REFERENCE_LIST_LOOKUP_LIMIT, REFERENCE_SEARCH_DEBOUNCE_MS, } from "./hooks/reference-limits.js";
|
|
54
56
|
export { AI_TEXT_RUN_QN, useAiTextAction, useCompletion } from "./hooks/use-ai-text.js";
|
|
57
|
+
export { useDebouncedValue } from "./hooks/use-debounced-value.js";
|
|
55
58
|
export { useDisclosure } from "./hooks/use-disclosure.js";
|
|
56
59
|
export { useForm } from "./hooks/use-form.js";
|
|
57
60
|
export { listFilterUrlKey, useListUrlState } from "./hooks/use-list-url-state.js";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createStore, generateRequestId, } from "../headless/index.js";
|
|
2
|
+
import { noteServerClock } from "../server-clock.js";
|
|
2
3
|
import { CSRF_HEADER_NAME, readCsrfToken } from "./csrf.js";
|
|
3
4
|
import { batchEnvelopeSchema, errorOnlyEnvelopeSchema, queryEnvelopeSchema, writeEnvelopeSchema, } from "./envelopes.js";
|
|
4
5
|
import { buildAbortError, buildNetworkError, mapServerError } from "./error-mapping.js";
|
|
@@ -70,6 +71,7 @@ export function createLiveDispatcher(options = {}) {
|
|
|
70
71
|
return { ok: false, networkFailure: buildNetworkError(e) };
|
|
71
72
|
}
|
|
72
73
|
observeNetworkOutcome(true);
|
|
74
|
+
noteServerClock(response.headers);
|
|
73
75
|
// JSON body parse. A server that returned a non-JSON body for any
|
|
74
76
|
// reason (HTML error page from a reverse-proxy, empty body on a
|
|
75
77
|
// weird 502) maps to network-error — structurally the same as a
|
package/dist/metric-types.d.ts
CHANGED
|
@@ -15,6 +15,10 @@ export type MetricProps = {
|
|
|
15
15
|
readonly tile?: boolean;
|
|
16
16
|
readonly tone?: DashboardStatTone;
|
|
17
17
|
readonly icon?: NavIconKey;
|
|
18
|
+
/** Small muted line under the value (see `MetricSpec.subField`). */
|
|
19
|
+
readonly sub?: string;
|
|
20
|
+
/** Replaces `sub` below `sm` (see `MetricSpec.subFieldNarrow`). */
|
|
21
|
+
readonly narrowSub?: string;
|
|
18
22
|
};
|
|
19
23
|
/** Band above the tabs of a record detail: optional subtitle line plus the
|
|
20
24
|
* metrics as a definition list. `children` are `Metric` tiles. */
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { SelectOptionTone } from "@cosmicdrift/kumiko-framework/ui-types";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
import type { CellLink } from "./headless/index.ts";
|
|
4
|
+
/** Path above a record header; an item with a `link` is a link, the last item without one names the current record. */
|
|
5
|
+
export type RecordBreadcrumbProps = {
|
|
6
|
+
readonly items: readonly {
|
|
7
|
+
readonly label: string;
|
|
8
|
+
readonly link?: CellLink;
|
|
9
|
+
}[];
|
|
10
|
+
readonly ariaLabel: string;
|
|
11
|
+
readonly testId?: string;
|
|
12
|
+
};
|
|
13
|
+
/** One emphasized sentence below a record header; `tone` sets the accent color. */
|
|
14
|
+
export type RecordSummaryProps = {
|
|
15
|
+
readonly text: string;
|
|
16
|
+
/** Shown instead of `text` below the sm breakpoint. */
|
|
17
|
+
readonly narrowText?: string;
|
|
18
|
+
readonly tone?: SelectOptionTone;
|
|
19
|
+
readonly testId?: string;
|
|
20
|
+
};
|
|
21
|
+
/** "Next steps" panel; an item's `reason` sits behind a toggle labelled `reasonLabel`. */
|
|
22
|
+
export type RecordStepsProps = {
|
|
23
|
+
readonly title: string;
|
|
24
|
+
readonly subtitle?: string;
|
|
25
|
+
/** Shown instead of the list when there are no items. */
|
|
26
|
+
readonly emptyLabel: string;
|
|
27
|
+
readonly reasonLabel: string;
|
|
28
|
+
/** Below the sm breakpoint only this many steps show; the rest sits behind a toggle. */
|
|
29
|
+
readonly narrowLimit?: number;
|
|
30
|
+
/** Toggle label for the hidden steps; receives their count. */
|
|
31
|
+
readonly moreLabel?: (hiddenCount: number) => string;
|
|
32
|
+
readonly lessLabel?: string;
|
|
33
|
+
readonly items: readonly {
|
|
34
|
+
readonly id: string;
|
|
35
|
+
readonly title: string;
|
|
36
|
+
/** Replaces `title` below the sm breakpoint. */
|
|
37
|
+
readonly narrowTitle?: string;
|
|
38
|
+
readonly detail?: string;
|
|
39
|
+
/** Replaces `detail` below the sm breakpoint. */
|
|
40
|
+
readonly narrowDetail?: string;
|
|
41
|
+
readonly tone?: SelectOptionTone;
|
|
42
|
+
readonly reason?: string;
|
|
43
|
+
/** With `reason`: the box stands open from `sm` up. */
|
|
44
|
+
readonly reasonOpen?: true;
|
|
45
|
+
/** Bold lead-in of the reason paragraph. */
|
|
46
|
+
readonly reasonTitle?: string;
|
|
47
|
+
/** Main action: a small button on the title row. */
|
|
48
|
+
readonly actions?: ReactNode;
|
|
49
|
+
/** Further actions as text links on the title row, before the main action; hidden below sm. */
|
|
50
|
+
readonly moreActions?: ReactNode;
|
|
51
|
+
}[];
|
|
52
|
+
/** Total number of steps, shown small beside the heading even when `narrowLimit` shortens the list. */
|
|
53
|
+
readonly count?: number;
|
|
54
|
+
readonly testId?: string;
|
|
55
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/primitives.d.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import type { ConfigCascade, ConfigScope, ConfigValueSource } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
2
|
import type { FieldIconKey, FormWidth, IconKey, NavIconKey, RowActionDisplay, SelectOptionTone } from "@cosmicdrift/kumiko-framework/ui-types";
|
|
3
3
|
import { type ComponentType, type FormEvent, type KeyboardEvent, type ReactNode, type Ref } from "react";
|
|
4
|
+
import type { CardOptions } from "./card-options.ts";
|
|
4
5
|
import type { DataTableBulk } from "./data-table-bulk-types.ts";
|
|
5
6
|
import type { DataTableDateRangeFacet, DataTableFacet } from "./data-table-facet-types.ts";
|
|
6
7
|
import type { DataTableTableBlock } from "./data-table-view-types.ts";
|
|
7
8
|
import type { EmbeddedListInputProps } from "./embedded-list-types.ts";
|
|
8
9
|
import type { FieldIssue, ListColumnViewModel, ListRowViewModel, RuntimeRenderer } from "./headless/index.ts";
|
|
9
10
|
import type { MetricBandProps, MetricProps } from "./metric-types.ts";
|
|
11
|
+
import type { RecordBreadcrumbProps, RecordStepsProps, RecordSummaryProps } from "./primitives-record-guidance.ts";
|
|
10
12
|
import type { StatusBadgeOptionTone, StatusTone } from "./status-tone.ts";
|
|
11
13
|
export type { EmbeddedListCellType, EmbeddedListColumn, EmbeddedListInputProps, EmbeddedListTotal, } from "./embedded-list-types.ts";
|
|
12
14
|
export type { RuntimeRenderer };
|
|
@@ -110,21 +112,25 @@ export type LinkProps = {
|
|
|
110
112
|
* touch the main border edge to edge, which matters because `<main>` no
|
|
111
113
|
* longer provides its own padding. */
|
|
112
114
|
export type BannerProps = {
|
|
113
|
-
/** "error" for alerts (conflict, network error), "info" for neutral
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
* "
|
|
119
|
-
* a submit, with an "Open" link in `actions`), "ok" for a completed state
|
|
120
|
-
* (e.g. "Done, nothing left to do here"). */
|
|
115
|
+
/** "error" for alerts (conflict, network error), "info" for neutral placeholders (not-found,
|
|
116
|
+
* loading), "loading" for load states, "warning" for a non-blocking but attention-grabbing
|
|
117
|
+
* notice (e.g. secretMint's "this is shown only once"), "primary" for a call-to-action
|
|
118
|
+
* notice (neutral background, accent in the primary color; pair it with `title` and
|
|
119
|
+
* `actions`), "hint" for a quiet aside on a muted background (e.g. per-entry results of a
|
|
120
|
+
* submit, with an "Open" link in `actions`), "ok" for a completed state (e.g. "Done"). */
|
|
121
121
|
readonly variant?: "error" | "info" | "loading" | "warning" | "primary" | "hint" | "ok";
|
|
122
|
+
/** Title and text run on one line (text right behind the bold title); the text is dropped below sm, so a phone shows title and actions only. */
|
|
123
|
+
readonly inline?: boolean;
|
|
122
124
|
/** "compact" is one line: the title reads inline before the text. */
|
|
123
125
|
readonly density?: "default" | "compact";
|
|
124
126
|
/** Icon left of the text. */
|
|
125
127
|
readonly icon?: NavIconKey;
|
|
126
128
|
/** Bold heading above `children`, inside the text column. */
|
|
127
129
|
readonly title?: ReactNode;
|
|
130
|
+
/** Replaces `title` below sm. */
|
|
131
|
+
readonly narrowTitle?: ReactNode;
|
|
132
|
+
/** Replaces `children` below sm and stays visible there even when `inline` drops the text. */
|
|
133
|
+
readonly narrowText?: ReactNode;
|
|
128
134
|
readonly titleTestId?: string;
|
|
129
135
|
readonly children?: ReactNode;
|
|
130
136
|
/** Structured text after `children`; `strong` parts render emphasized.
|
|
@@ -640,7 +646,7 @@ export type DataTableSort = {
|
|
|
640
646
|
readonly field: string;
|
|
641
647
|
readonly dir: DataTableSortDir;
|
|
642
648
|
};
|
|
643
|
-
export type DataTableRowActionMode = "adaptive" | "inline";
|
|
649
|
+
export type DataTableRowActionMode = "adaptive" | "inline" | "menu";
|
|
644
650
|
export type DataTableRowAction = {
|
|
645
651
|
/** Stable ID for aria-labels and data-testids. */
|
|
646
652
|
readonly id: string;
|
|
@@ -690,6 +696,7 @@ export declare function shouldRenderActionsIconOnly(actions: readonly {
|
|
|
690
696
|
export type { BulkRowOutcome, DataTableBulk, DataTableBulkAction, } from "./data-table-bulk-types.ts";
|
|
691
697
|
export type { DataTableDateRangeFacet, DataTableFacet, DataTableFacetChip, } from "./data-table-facet-types.ts";
|
|
692
698
|
export type { MetricBandProps, MetricProps } from "./metric-types.ts";
|
|
699
|
+
export type { RecordBreadcrumbProps, RecordStepsProps, RecordSummaryProps, } from "./primitives-record-guidance.ts";
|
|
693
700
|
export type DataTableProps = {
|
|
694
701
|
readonly columns: readonly ListColumnViewModel[];
|
|
695
702
|
readonly rows: readonly ListRowViewModel[];
|
|
@@ -702,14 +709,15 @@ export type DataTableProps = {
|
|
|
702
709
|
* `onSortChange`, header clicks remain disabled and `columns.sortable` is
|
|
703
710
|
* only semantic metadata. */
|
|
704
711
|
readonly sort?: DataTableSort | null;
|
|
705
|
-
/** Called with the next sort state after a header click
|
|
706
|
-
*
|
|
707
|
-
* uses it to update URL state or a query parameter and refetch. */
|
|
712
|
+
/** Called with the next sort state after a header click (asc → desc → null);
|
|
713
|
+
* the caller updates URL state or the query parameter and refetches. */
|
|
708
714
|
readonly onSortChange?: (next: DataTableSort | null) => void;
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
715
|
+
readonly sortOptions?: readonly (DataTableSort & {
|
|
716
|
+
readonly label: string;
|
|
717
|
+
})[];
|
|
718
|
+
readonly toolbarSort?: true;
|
|
719
|
+
/** Per-row actions in a right-hand column: inline buttons (≤2) or a kebab (>2). The caller supplies
|
|
720
|
+
* translated labels and wired `onTrigger`; DataTable renders and confirms. */
|
|
713
721
|
readonly rowActions?: readonly DataTableRowAction[];
|
|
714
722
|
/** How the row-action column renders:
|
|
715
723
|
* - `"adaptive"` (default): with `onRowClick` all actions except the
|
|
@@ -718,7 +726,8 @@ export type DataTableProps = {
|
|
|
718
726
|
* kebab (a single action gets no kebab).
|
|
719
727
|
* - `"inline"`: ALWAYS inline buttons, left-aligned, even with >2 (no
|
|
720
728
|
* kebab). Actions then sit at the same x-position across all rows
|
|
721
|
-
* (no drifting with label width) and all lists in an app look alike.
|
|
729
|
+
* (no drifting with label width) and all lists in an app look alike.
|
|
730
|
+
* - `"menu"`: every action in the kebab, the row opener included; phone cards draw none when the row opens, a card without a row target keeps it. */
|
|
722
731
|
readonly rowActionMode?: DataTableRowActionMode;
|
|
723
732
|
/** Present: row checkboxes plus a selection bar that runs these actions once per selected row. */
|
|
724
733
|
readonly bulk?: DataTableBulk;
|
|
@@ -954,16 +963,16 @@ export type SectionProps = {
|
|
|
954
963
|
* just a container that sizes to its content and, once the ancestor chain
|
|
955
964
|
* is height-constrained, shrinks so one scrolling child can scroll
|
|
956
965
|
* internally instead of the page growing. Web:
|
|
957
|
-
* `<div className="flex min-h-0 flex-col">`. Native: Views are
|
|
958
|
-
*
|
|
959
|
-
*
|
|
960
|
-
*
|
|
961
|
-
*
|
|
962
|
-
* carry title/padding/border chrome this spot doesn't want and would double
|
|
963
|
-
* up with the table's own padding. */
|
|
966
|
+
* `<div className="flex min-h-0 flex-col">`. Native: Views are already
|
|
967
|
+
* flex-column in a bounded viewport, so a native impl may render a bare
|
|
968
|
+
* Fragment. Used as the terminal link in `RenderEdit`'s `fillHeight` chain
|
|
969
|
+
* (`RelatedListSection`'s `hideTitle` branch) and as the app layer's only
|
|
970
|
+
* class-carrying layout wrapper, since it must not render DOM tags itself. */
|
|
964
971
|
export type FillContainerProps = {
|
|
965
972
|
readonly children: ReactNode;
|
|
966
973
|
readonly testId?: string;
|
|
974
|
+
/** Layout extras, merged via cn(). */
|
|
975
|
+
readonly className?: string;
|
|
967
976
|
/** Claims the remaining height of the flex chain (`flex-1`) instead of
|
|
968
977
|
* sizing to its content, so a footer inside the child sits at the bottom
|
|
969
978
|
* edge even with few rows. Set only when the screen fills the shell
|
|
@@ -1164,29 +1173,7 @@ export type CardSlots = {
|
|
|
1164
1173
|
/** Footer content, separated by a top border; aligned to the right by default. */
|
|
1165
1174
|
readonly footer?: ReactNode;
|
|
1166
1175
|
};
|
|
1167
|
-
|
|
1168
|
-
export type CardOptions = {
|
|
1169
|
-
/** Body-Padding (px-6 py-6). false = randlos (Tabelle/eigene Tiles). Default true. */
|
|
1170
|
-
readonly padded?: boolean;
|
|
1171
|
-
/** Eckenradius. Default "xl" (= Entity-Card). */
|
|
1172
|
-
readonly radius?: "lg" | "xl";
|
|
1173
|
-
/** Separates the footer with `border-t` and `bg-muted/30`. Defaults to true. */
|
|
1174
|
-
readonly footerBordered?: boolean;
|
|
1175
|
-
/** Footer horizontal padding. false = none, so footer content aligns with the card edge. Default true. */
|
|
1176
|
-
readonly footerInset?: boolean;
|
|
1177
|
-
/** Joins the ancestor fillHeight flex chain — a tabs-mode
|
|
1178
|
-
* relatedList table sizing to the panel instead of the page — instead of
|
|
1179
|
-
* normal document-flow height. Default false. */
|
|
1180
|
-
readonly fillHeight?: boolean;
|
|
1181
|
-
/** false drops border, background, shadow and radius but keeps padding and
|
|
1182
|
-
* header slots — a panel inside a host surface such as a tab panel. Default true. */
|
|
1183
|
-
readonly framed?: boolean;
|
|
1184
|
-
/** The card is the whole screen body (secretMint reveal and done phase):
|
|
1185
|
-
* no frame, the shared screen insets and width of form screens, children
|
|
1186
|
-
* stacked with a gap. Without it such a screen sits raw against the
|
|
1187
|
-
* shell edge. Default false. */
|
|
1188
|
-
readonly screenBody?: boolean;
|
|
1189
|
-
};
|
|
1176
|
+
export type { CardOptions };
|
|
1190
1177
|
/** Generic card chrome (border/background/radius/shadow plus
|
|
1191
1178
|
* header/body/footer) as a primitive, providing one implementation for all
|
|
1192
1179
|
* card surfaces. It is slot- and option-based so the contract can evolve
|
|
@@ -1239,12 +1226,12 @@ export type StepBarProps = {
|
|
|
1239
1226
|
* labels fit a phone and whose done steps must stay tappable. */
|
|
1240
1227
|
readonly narrowLayout?: "label" | "steps";
|
|
1241
1228
|
/** "vertical" renders a step rail (from `lg`, with `compactLabel` as the
|
|
1242
|
-
* single line below it)
|
|
1243
|
-
readonly orientation?: "horizontal" | "vertical";
|
|
1229
|
+
* single line below it); "stacked": plain stage list at every width. Default "horizontal". */
|
|
1230
|
+
readonly orientation?: "horizontal" | "vertical" | "stacked";
|
|
1244
1231
|
/** Vertical only: rail heading ("Step 4 of 6") and optional description. */
|
|
1245
1232
|
readonly heading?: string;
|
|
1246
1233
|
readonly description?: string;
|
|
1247
|
-
/** Vertical only: line under each step label, same order as `steps`. */
|
|
1234
|
+
/** Vertical and stacked only: line under each step label, same order as `steps`. */
|
|
1248
1235
|
readonly subtitles?: readonly (string | undefined)[];
|
|
1249
1236
|
/** Vertical only: box under the rail announcing the next step. */
|
|
1250
1237
|
readonly upNext?: {
|
|
@@ -1328,13 +1315,13 @@ export type PageHeaderProps = {
|
|
|
1328
1315
|
readonly recordTitle?: string;
|
|
1329
1316
|
readonly status?: ReactNode;
|
|
1330
1317
|
readonly actions?: ReactNode;
|
|
1318
|
+
/** Screen renders its own h1: the shell header shows only the parent crumb, as text. */
|
|
1319
|
+
readonly bodyTitle?: boolean;
|
|
1331
1320
|
/** Land in the shell header's overflow menu at phone width. */
|
|
1332
1321
|
readonly overflowItems?: readonly ActionMenuItemSpec[];
|
|
1333
|
-
/** Hide the shell header's breadcrumb while mounted
|
|
1334
|
-
* for the one the route names (a locked screen's fallback). */
|
|
1322
|
+
/** Hide the shell header's breadcrumb while mounted (a locked screen's fallback). */
|
|
1335
1323
|
readonly hideBreadcrumb?: boolean;
|
|
1336
|
-
/** Label the breadcrumb with this screen (id
|
|
1337
|
-
* the route names, for a locked screen's fallback. Wins over `hideBreadcrumb`. */
|
|
1324
|
+
/** Label the breadcrumb with this screen (route id) instead of the routed one; wins over `hideBreadcrumb`. */
|
|
1338
1325
|
readonly breadcrumbScreenId?: string;
|
|
1339
1326
|
};
|
|
1340
1327
|
/** One item in an `ActionOverflowMenu` (header/row actions beyond the
|
|
@@ -1504,6 +1491,12 @@ export type CorePrimitives = {
|
|
|
1504
1491
|
readonly PageHeader?: ComponentType<PageHeaderProps>;
|
|
1505
1492
|
/** Optional — additive rollout, see StickyActionBar. */
|
|
1506
1493
|
readonly MetricBand?: ComponentType<MetricBandProps>;
|
|
1494
|
+
/** Optional — without it the detail screen renders the path as plain links. */
|
|
1495
|
+
readonly RecordBreadcrumb?: ComponentType<RecordBreadcrumbProps>;
|
|
1496
|
+
/** Optional — without it the summary renders as plain text. */
|
|
1497
|
+
readonly RecordSummary?: ComponentType<RecordSummaryProps>;
|
|
1498
|
+
/** Optional — without it the steps render as a plain card. */
|
|
1499
|
+
readonly RecordSteps?: ComponentType<RecordStepsProps>;
|
|
1507
1500
|
/** Optional: without an implementation, callers with >2 header/row
|
|
1508
1501
|
* actions fall back to today's all-buttons-inline rendering. */
|
|
1509
1502
|
readonly ActionOverflowMenu?: ComponentType<ActionOverflowMenuProps>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Remembers how far the server clock is ahead of the device clock; ignores a missing or invalid header. */
|
|
2
|
+
export declare function noteServerClock(headers: Pick<Headers, "get">): void;
|
|
3
|
+
/** The server's current time, as best known from the last answer. */
|
|
4
|
+
export declare function serverNowMs(): number;
|
|
5
|
+
/** Test seam: forget the offset. */
|
|
6
|
+
export declare function resetServerClock(): void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// A device clock can be minutes off, and "As of 10:42" or "5 minutes ago" must agree with the
|
|
2
|
+
// server's timestamps. The offset comes from the `x-kumiko-now` header (the app clock, which a
|
|
3
|
+
// fixed test or screenshot clock overrides) and otherwise from the HTTP `Date` header; without
|
|
4
|
+
// either (cross-origin answers hide both) the device clock stays.
|
|
5
|
+
const APP_NOW_HEADER = "x-kumiko-now";
|
|
6
|
+
let offsetMs = 0;
|
|
7
|
+
/** Remembers how far the server clock is ahead of the device clock; ignores a missing or invalid header. */
|
|
8
|
+
export function noteServerClock(headers) {
|
|
9
|
+
const serverMs = Date.parse(headers.get(APP_NOW_HEADER) ?? headers.get("date") ?? "");
|
|
10
|
+
if (Number.isFinite(serverMs))
|
|
11
|
+
offsetMs = serverMs - Date.now();
|
|
12
|
+
}
|
|
13
|
+
/** The server's current time, as best known from the last answer. */
|
|
14
|
+
export function serverNowMs() {
|
|
15
|
+
return Date.now() + offsetMs;
|
|
16
|
+
}
|
|
17
|
+
/** Test seam: forget the offset. */
|
|
18
|
+
export function resetServerClock() {
|
|
19
|
+
offsetMs = 0;
|
|
20
|
+
}
|
|
@@ -2,6 +2,7 @@ import { type ReactNode } from "react";
|
|
|
2
2
|
import type { Dispatcher, DispatcherError } from "../headless/index.ts";
|
|
3
3
|
export declare const SESSION_ENDED_ERROR_CODES: readonly ["session_invalid", "invalid_token", "missing_token", "unauthenticated"];
|
|
4
4
|
export declare function isSessionEndedError(error: Pick<DispatcherError, "code" | "httpStatus">): boolean;
|
|
5
|
+
export declare function isSessionEndedCause(thrown: unknown): boolean;
|
|
5
6
|
export type SessionEndedSignal = {
|
|
6
7
|
notify(): void;
|
|
7
8
|
subscribe(listener: () => void): () => void;
|
|
@@ -12,7 +12,7 @@ export function isSessionEndedError(error) {
|
|
|
12
12
|
return (error.httpStatus === 401 &&
|
|
13
13
|
SESSION_ENDED_ERROR_CODES.some((sessionEndedCode) => sessionEndedCode === error.code));
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
export function isSessionEndedCause(thrown) {
|
|
16
16
|
if (typeof thrown !== "object" || thrown === null)
|
|
17
17
|
return false;
|
|
18
18
|
if (!("code" in thrown) || !("httpStatus" in thrown))
|
|
@@ -54,7 +54,7 @@ export function withSessionEndedDetection(dispatcher, signal) {
|
|
|
54
54
|
yield* dispatcher.stream(type, payload, opts);
|
|
55
55
|
}
|
|
56
56
|
catch (thrown) {
|
|
57
|
-
if (
|
|
57
|
+
if (isSessionEndedCause(thrown))
|
|
58
58
|
signal.notify();
|
|
59
59
|
throw thrown;
|
|
60
60
|
}
|
package/dist/status-tone.d.ts
CHANGED
|
@@ -4,3 +4,4 @@ export type StatusTone = "ok" | "warn" | "bad" | "critical" | "muted";
|
|
|
4
4
|
export type StatusBadgeOptionTone = StatusTone | "accent";
|
|
5
5
|
export declare function statusToneForOptionTone(tone: SelectOptionTone): StatusBadgeOptionTone | undefined;
|
|
6
6
|
export declare function statusToneForValue(value: string): StatusTone | undefined;
|
|
7
|
+
export declare function isSelectOptionTone(value: unknown): value is SelectOptionTone;
|
package/dist/status-tone.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { SELECT_OPTION_TONES } from "@cosmicdrift/kumiko-types/fields";
|
|
2
|
+
import { isOneOf } from "@cosmicdrift/kumiko-types/type-guards";
|
|
1
3
|
// Status value -> StatusTone heuristic, shared by every surface that shows a
|
|
2
4
|
// raw status value without a tone of its own (projectionDetail header badge,
|
|
3
5
|
// list cells). Covers the common status vocabularies; unknown values stay
|
|
@@ -49,3 +51,6 @@ export function statusToneForValue(value) {
|
|
|
49
51
|
// would hand back `Object.prototype.constructor` & friends as a "tone".
|
|
50
52
|
return Object.hasOwn(STATUS_TONE_BY_VALUE, slug) ? STATUS_TONE_BY_VALUE[slug] : undefined;
|
|
51
53
|
}
|
|
54
|
+
export function isSelectOptionTone(value) {
|
|
55
|
+
return isOneOf(SELECT_OPTION_TONES, value);
|
|
56
|
+
}
|
|
@@ -54,7 +54,7 @@ export function createBrowserLocaleResolver(options = {}) {
|
|
|
54
54
|
const timeZone = detectTimeZone();
|
|
55
55
|
return {
|
|
56
56
|
translate: (key) => key,
|
|
57
|
-
locale: () => store.getSnapshot(),
|
|
57
|
+
locale: () => store.getSnapshot(),
|
|
58
58
|
timeZone: () => timeZone,
|
|
59
59
|
subscribe: store.subscribe,
|
|
60
60
|
setLocale: (next) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { TargetRef, TreeChildrenSubscribe } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
2
|
import type { ContentEditorFormat } from "@cosmicdrift/kumiko-types/nav";
|
|
3
3
|
import type { ComponentType, ReactNode } from "react";
|
|
4
|
-
import type { ClientActionHandler, ColumnRendererComponent, ContentEditorComponent, ExtensionSectionComponent, QualifiedContentCollection, TranslationsByLocale } from "../../index.ts";
|
|
4
|
+
import type { ClientActionHandler, ColumnRendererComponent, ContentEditorComponent, ContentPreviewsMap, ExtensionSectionComponent, QualifiedContentCollection, TranslationsByLocale } from "../../index.ts";
|
|
5
5
|
/** What a `navProvidersFromCollections` factory returns: the providers plus
|
|
6
6
|
* the entities whose live events should re-fire them. Without `entities` a
|
|
7
7
|
* derived tree would sit stale until re-mount — the hand-wired path has the
|
|
@@ -80,6 +80,11 @@ export type ClientFeatureDefinition = {
|
|
|
80
80
|
* format. Same last-wins semantics as columnRenderers. Public component
|
|
81
81
|
* contract: `{ value, onChange, variables, readOnly }`. */
|
|
82
82
|
readonly contentEditors?: Partial<Record<ContentEditorFormat, ContentEditorComponent>>;
|
|
83
|
+
/** Preview renderers for the editor workbench's preview mode, keyed by target
|
|
84
|
+
* ("pdf" | "mail" | "web" | "text"). Each renderer calls its own server path with its own
|
|
85
|
+
* access rule. A target without a renderer falls back to "text". Same last-wins
|
|
86
|
+
* semantics as contentEditors. */
|
|
87
|
+
readonly contentPreviews?: ContentPreviewsMap;
|
|
83
88
|
/** Editor resolver components keyed by featureId:action. When a TreeNode
|
|
84
89
|
* with a target is clicked, EditorPanel looks up and renders the component
|
|
85
90
|
* here. Components receive target (with args) and an onClose callback. If
|
|
@@ -2,7 +2,7 @@ import type { TreeChildrenSubscribe } from "@cosmicdrift/kumiko-framework/engine
|
|
|
2
2
|
import { type ErrorInfo, type ReactNode } from "react";
|
|
3
3
|
import { type Root } from "react-dom/client";
|
|
4
4
|
import type { Dispatcher, ListRowViewModel, LocaleResolver, Translate } from "../../headless/index.ts";
|
|
5
|
-
import { type AppSchema, type ContentEditorComponent, type DraftStorage, type FeatureSchema, type FormWidth, type NavApi, type PrimitivesRegistry, type QualifiedContentCollection } from "../../index.ts";
|
|
5
|
+
import { type AppSchema, type ContentEditorComponent, type ContentPreviewsMap, type DraftStorage, type FeatureSchema, type FormWidth, type NavApi, type PrimitivesRegistry, type QualifiedContentCollection } from "../../index.ts";
|
|
6
6
|
import { type ClientFeatureDefinition } from "./client-plugin.tsx";
|
|
7
7
|
export declare function qualifyNavProviderKey(feature: string, id: string): string;
|
|
8
8
|
export declare function buildNavProviderMaps(clientFeatures: readonly ClientFeatureDefinition[], collections: readonly QualifiedContentCollection[]): {
|
|
@@ -109,6 +109,7 @@ export declare function firstOpenScreenQn(features: readonly FeatureSchema[]): s
|
|
|
109
109
|
export declare function firstLandingScreenQnForProjectedSchema(features: readonly FeatureSchema[]): string | undefined;
|
|
110
110
|
export declare function resolveRootScreenQn(features: readonly FeatureSchema[], explicitScreenQn: string | undefined, schemaIsRoleProjected: boolean): string | undefined;
|
|
111
111
|
export declare function mergeContentEditors(clientFeatures: readonly ClientFeatureDefinition[]): Record<string, ContentEditorComponent>;
|
|
112
|
+
export declare function mergeContentPreviews(clientFeatures: readonly ClientFeatureDefinition[]): ContentPreviewsMap;
|
|
112
113
|
export declare function createKumikoApp(options?: CreateKumikoAppOptions): {
|
|
113
114
|
readonly root: Root;
|
|
114
115
|
};
|
|
@@ -3,12 +3,14 @@ import { isOpenToAllGranted } from "@cosmicdrift/kumiko-framework/ui-types";
|
|
|
3
3
|
import { createContext, useContext, useEffect, useMemo, useRef, useState, } from "react";
|
|
4
4
|
import { createRoot } from "react-dom/client";
|
|
5
5
|
import { rendererError, rendererWarn } from "../../dev-console.js";
|
|
6
|
-
import { AppFeaturesProvider, BasePathProvider, ClientActionsProvider, ColumnRenderersProvider, ContentEditorsProvider, CustomScreensProvider, createSessionEndedSignal, DashboardBodyProvider, DispatcherProvider, DraftStorageProvider, ErrorBoundary, ExtensionSectionsProvider, hasDetailScreen, KumikoScreen, kumikoDefaultTranslations, LeaveGuardDialog, LiveEventsProvider, LocaleProvider, mergeTranslations, NavProvider, navigateWithReturnTo, PrimitivesProvider, qualifyScreenId, ScreenMissingState, SessionEndedSignalProvider, TokensProvider, toAppSchema, translationsByLocaleFromKeys, useBasePath, useNav, usePrimitives, useTranslation, withSessionEndedDetection, } from "../../index.js";
|
|
6
|
+
import { AppFeaturesProvider, BasePathProvider, ClientActionsProvider, ColumnRenderersProvider, ContentEditorsProvider, ContentPreviewsProvider, CustomScreensProvider, createSessionEndedSignal, DashboardBodyProvider, DispatcherProvider, DraftStorageProvider, ErrorBoundary, ExtensionSectionsProvider, hasDetailScreen, KumikoScreen, kumikoDefaultTranslations, LeaveGuardDialog, LiveEventsProvider, LocaleProvider, mergeTranslations, NavProvider, navigateWithReturnTo, PrimitivesProvider, qualifyScreenId, ScreenMissingState, SessionEndedSignalProvider, TokensProvider, toAppSchema, translationsByLocaleFromKeys, useBasePath, useNav, usePrimitives, useTranslation, withSessionEndedDetection, } from "../../index.js";
|
|
7
7
|
import { createLiveDispatcher } from "../../live/index.js";
|
|
8
8
|
import { lastSegment } from "../layout/nav-tree.js";
|
|
9
|
+
import { ScreenFocus } from "../layout/screen-focus.js";
|
|
9
10
|
import { clearFileMetaCache } from "../primitives/file-thumbnail.js";
|
|
10
11
|
import { defaultPrimitives, ScreenWidthProvider } from "../primitives/index.js";
|
|
11
12
|
import { ToastProvider } from "../primitives/toast.js";
|
|
13
|
+
import { PwaSupport } from "../pwa/pwa-support.js";
|
|
12
14
|
import { createEventSourceLiveEvents } from "../sse/live-events.js";
|
|
13
15
|
import { useBrowserTokensApi } from "../tokens.js";
|
|
14
16
|
import { UpdateChecker } from "../version/update-checker.js";
|
|
@@ -161,7 +163,8 @@ function mergeByKey(clientFeatures, pick, label) {
|
|
|
161
163
|
if (entries === undefined)
|
|
162
164
|
continue;
|
|
163
165
|
for (const [key, value] of Object.entries(entries)) {
|
|
164
|
-
|
|
166
|
+
// The same value registered by two plugins (a shared preview renderer) is no override.
|
|
167
|
+
if (merged[key] !== undefined && merged[key] !== value) {
|
|
165
168
|
rendererWarn(`[kumiko] ${label} "${key}" defined by multiple clientFeatures — last definition (from "${f.name}") wins.`);
|
|
166
169
|
}
|
|
167
170
|
merged[key] = value;
|
|
@@ -175,6 +178,11 @@ function mergeByKey(clientFeatures, pick, label) {
|
|
|
175
178
|
export function mergeContentEditors(clientFeatures) {
|
|
176
179
|
return mergeByKey(clientFeatures, (f) => f.contentEditors, "contentEditor");
|
|
177
180
|
}
|
|
181
|
+
// Merges the preview-renderer map; a target without an entry renders through the "text"
|
|
182
|
+
// fallback of useContentPreview.
|
|
183
|
+
export function mergeContentPreviews(clientFeatures) {
|
|
184
|
+
return mergeByKey(clientFeatures, (f) => f.contentPreviews, "contentPreview");
|
|
185
|
+
}
|
|
178
186
|
// Fail loud at boot instead of per-URL: a mounted server feature can
|
|
179
187
|
// declare a `type: "custom"` screen that's reachable directly by URL
|
|
180
188
|
// even without nav placement — without this check, a missing client
|
|
@@ -238,7 +246,7 @@ function KumikoAppRoot(props) {
|
|
|
238
246
|
warnMissingCustomScreens(loaded, props.customScreens);
|
|
239
247
|
setApp(loaded);
|
|
240
248
|
}, schemaIsRoleProjected: isFetchMode, ...(isFetchMode && { onUnmountResetSchema: () => setApp(undefined) }), ...(props.translate !== undefined && { translate: props.translate }), ...(props.onRowClick !== undefined && { onRowClick: props.onRowClick }), ...(props.shell !== undefined && { shell: props.shell }) }));
|
|
241
|
-
return (_jsx(TokensBoot, { children: _jsxs(LocaleProvider, { resolver: props.localeResolver, fallbackBundles: fallbackBundles, children: [_jsx(DocumentLangSync, { resolver: props.localeResolver }), _jsx(PrimitivesProvider, { value: props.primitives, children: _jsx(ScreenWidthProvider, { width: props.screenWidth, children: _jsx(AppFeaturesProvider, { features: app?.features ?? EMPTY_FEATURES, children: _jsx(DispatcherProvider, { dispatcher: props.dispatcher, children: _jsx(DraftStorageProvider, { value: props.draftStorage, children: _jsx(LiveEventsProvider, { value: props.liveEvents, children: _jsx(DashboardBodyProvider, { value: WebDashboardBody, children: _jsx(CustomScreensProvider, { value: props.customScreens, children: _jsx(ColumnRenderersProvider, { value: props.columnRenderers, children: _jsx(ContentEditorsProvider, { value: props.contentEditors, children: _jsx(ExtensionSectionsProvider, { value: props.extensionSectionComponents, children: _jsx(ClientActionsProvider, { value: props.clientActions, children: _jsx(NavProvidersProvider, { value: navProviders, entities: navEntities, children: _jsx(ResolversProvider, { resolvers: props.resolvers, children: _jsx(ToastProvider, { children: _jsxs(ToastActionNotifier, { children: [_jsx(UpdateChecker, {}), _jsx(LeaveGuardDialog, {}), _jsx(SessionEndedSignalProvider, { signal: props.sessionEndedSignal, children: stackWrappers(props.providers, stackWrappers(props.gates, _jsx(ListStateStoreBoot, { children: screenNode }))) })] }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })] }) }));
|
|
249
|
+
return (_jsx(TokensBoot, { children: _jsxs(LocaleProvider, { resolver: props.localeResolver, fallbackBundles: fallbackBundles, children: [_jsx(DocumentLangSync, { resolver: props.localeResolver }), _jsx(PrimitivesProvider, { value: props.primitives, children: _jsx(ScreenWidthProvider, { width: props.screenWidth, children: _jsx(AppFeaturesProvider, { features: app?.features ?? EMPTY_FEATURES, children: _jsx(DispatcherProvider, { dispatcher: props.dispatcher, children: _jsx(DraftStorageProvider, { value: props.draftStorage, children: _jsx(LiveEventsProvider, { value: props.liveEvents, children: _jsx(DashboardBodyProvider, { value: WebDashboardBody, children: _jsx(CustomScreensProvider, { value: props.customScreens, children: _jsx(ColumnRenderersProvider, { value: props.columnRenderers, children: _jsx(ContentEditorsProvider, { value: props.contentEditors, children: _jsx(ContentPreviewsProvider, { value: props.contentPreviews, children: _jsx(ExtensionSectionsProvider, { value: props.extensionSectionComponents, children: _jsx(ClientActionsProvider, { value: props.clientActions, children: _jsx(NavProvidersProvider, { value: navProviders, entities: navEntities, children: _jsx(ResolversProvider, { resolvers: props.resolvers, children: _jsx(ToastProvider, { children: _jsxs(ToastActionNotifier, { children: [_jsx(UpdateChecker, {}), _jsx(PwaSupport, {}), _jsx(LeaveGuardDialog, {}), _jsx(SessionEndedSignalProvider, { signal: props.sessionEndedSignal, children: stackWrappers(props.providers, stackWrappers(props.gates, _jsx(ListStateStoreBoot, { children: screenNode }))) })] }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })] }) }));
|
|
242
250
|
}
|
|
243
251
|
// Sits INSIDE the clientFeature gates (e.g. an auth gate) — a gate that
|
|
244
252
|
// renders a login placeholder instead of children keeps this component
|
|
@@ -332,6 +340,7 @@ export function createKumikoApp(options = {}) {
|
|
|
332
340
|
const extensionSectionComponents = mergeByKey(clientFeatures, (f) => f.extensionSectionComponents, "extensionSectionComponent");
|
|
333
341
|
const clientActions = mergeByKey(clientFeatures, (f) => f.clientActions, "clientAction");
|
|
334
342
|
const contentEditors = mergeContentEditors(clientFeatures);
|
|
343
|
+
const contentPreviews = mergeContentPreviews(clientFeatures);
|
|
335
344
|
// Aggregate editor resolvers — keyed by "featureId:action". Same
|
|
336
345
|
// last-wins semantics as columnRenderers. Warns on collision.
|
|
337
346
|
const resolvers = new Map();
|
|
@@ -360,7 +369,7 @@ export function createKumikoApp(options = {}) {
|
|
|
360
369
|
options.onError?.(error, info, context);
|
|
361
370
|
};
|
|
362
371
|
const root = createRoot(container);
|
|
363
|
-
root.render(_jsx(ErrorBoundary, { scope: "root", onError: handleBoundaryError, fallback: ({ errorId }) => _jsx(RootErrorFallback, { errorId: errorId }), children: _jsx(BoundaryErrorHandlerContext.Provider, { value: handleBoundaryError, children: _jsx(BasePathProvider, { basePath: basePath, children: _jsx(KumikoAppRoot, { initialApp: initialApp, screenQn: options.screenQn, ...(options.schemaUrl !== undefined && { schemaUrl: options.schemaUrl }), clientFeatures: clientFeatures, providers: providers, gates: gates, customScreens: customScreens, columnRenderers: columnRenderers, extensionSectionComponents: extensionSectionComponents, clientActions: clientActions, contentEditors: contentEditors, resolvers: resolvers, dispatcher: dispatcher, sessionEndedSignal: sessionEndedSignal, draftStorage: draftStorage, primitives: primitives, liveEvents: liveEvents, localeResolver: localeResolver, navAdapter: navAdapter, screenWidth: options.screenWidth, ...(options.translate !== undefined && { translate: options.translate }), ...(options.onRowClick !== undefined && { onRowClick: options.onRowClick }), ...(options.shell !== undefined && { shell: options.shell }) }) }) }) }));
|
|
372
|
+
root.render(_jsx(ErrorBoundary, { scope: "root", onError: handleBoundaryError, fallback: ({ errorId }) => _jsx(RootErrorFallback, { errorId: errorId }), children: _jsx(BoundaryErrorHandlerContext.Provider, { value: handleBoundaryError, children: _jsx(BasePathProvider, { basePath: basePath, children: _jsx(KumikoAppRoot, { initialApp: initialApp, screenQn: options.screenQn, ...(options.schemaUrl !== undefined && { schemaUrl: options.schemaUrl }), clientFeatures: clientFeatures, providers: providers, gates: gates, customScreens: customScreens, columnRenderers: columnRenderers, extensionSectionComponents: extensionSectionComponents, clientActions: clientActions, contentEditors: contentEditors, contentPreviews: contentPreviews, resolvers: resolvers, dispatcher: dispatcher, sessionEndedSignal: sessionEndedSignal, draftStorage: draftStorage, primitives: primitives, liveEvents: liveEvents, localeResolver: localeResolver, navAdapter: navAdapter, screenWidth: options.screenWidth, ...(options.translate !== undefined && { translate: options.translate }), ...(options.onRowClick !== undefined && { onRowClick: options.onRowClick }), ...(options.shell !== undefined && { shell: options.shell }) }) }) }) }));
|
|
364
373
|
return { root };
|
|
365
374
|
}
|
|
366
375
|
// TokensBoot uses the browser-backed TokensApi hook (class-based
|
|
@@ -454,6 +463,7 @@ function RoutedScreen({ app, fallbackQn, translate, onRowClick, }) {
|
|
|
454
463
|
activeScreen: ownerFeature?.screens.find((s) => qualifyScreenId(ownerFeature.featureName, s.id) === qualifiedQn),
|
|
455
464
|
};
|
|
456
465
|
}, [nav.route, app, fallbackQn]);
|
|
466
|
+
const allScreens = useMemo(() => app.features.flatMap((f) => f.screens), [app.features]);
|
|
457
467
|
const effectiveOnRowClick = useMemo(() => {
|
|
458
468
|
if (!hasRowClickTarget(app, activeScreen, onRowClick))
|
|
459
469
|
return undefined;
|
|
@@ -516,5 +526,5 @@ function RoutedScreen({ app, fallbackQn, translate, onRowClick, }) {
|
|
|
516
526
|
const schemaForScreen = feature;
|
|
517
527
|
return (_jsx(ErrorBoundary, { scope: "screen", ...(onBoundaryError !== undefined && {
|
|
518
528
|
onError: (error, info, context) => onBoundaryError(error, info, { ...context, screen: qn }),
|
|
519
|
-
}), fallback: ({ error, errorId, reset }) => (_jsx(ScreenErrorFallback, { screen: qn, error: error, errorId: errorId, onReset: reset })), children: _jsx(KumikoScreen, { schema: schemaForScreen, qn: qn, ...(translate !== undefined && { translate }), ...(entityId !== undefined && { entityId }), onRowClick: effectiveOnRowClick, ...(effectiveOnCopyLink !== undefined && { onCopyLink: effectiveOnCopyLink }) }) }, `${qn}/${entityId ?? ""}`));
|
|
529
|
+
}), fallback: ({ error, errorId, reset }) => (_jsx(ScreenErrorFallback, { screen: qn, error: error, errorId: errorId, onReset: reset })), children: _jsx(ScreenFocus, { screen: activeScreen, screens: allScreens, children: _jsx(KumikoScreen, { schema: schemaForScreen, qn: qn, ...(translate !== undefined && { translate }), ...(entityId !== undefined && { entityId }), onRowClick: effectiveOnRowClick, ...(effectiveOnCopyLink !== undefined && { onCopyLink: effectiveOnCopyLink }) }) }) }, `${qn}/${entityId ?? ""}`));
|
|
520
530
|
}
|