@cosmicdrift/kumiko-renderer 0.373.0 → 0.377.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/app/action-form-support.d.ts +58 -0
- package/dist/app/action-form-support.js +96 -0
- package/dist/app/client-actions.d.ts +46 -0
- package/dist/app/client-actions.js +60 -0
- package/dist/app/column-renderers.js +1 -1
- package/dist/app/config-edit-shim.js +1 -1
- package/dist/app/content-preview.js +1 -6
- package/dist/app/custom-screens.js +1 -1
- package/dist/app/dashboard-body.d.ts +1 -1
- package/dist/app/entity-list-expanded-row.d.ts +1 -1
- package/dist/app/entity-list-expanded-row.js +4 -0
- package/dist/app/form-schema.d.ts +1 -1
- package/dist/app/form-schema.js +2 -2
- package/dist/app/header-actions-bar.d.ts +19 -0
- package/dist/app/header-actions-bar.js +30 -0
- package/dist/app/kumiko-screen.d.ts +1 -1
- package/dist/app/kumiko-screen.js +134 -66
- package/dist/app/list-empty-content.d.ts +2 -2
- package/dist/app/list-empty-content.js +3 -2
- package/dist/app/list-facets.d.ts +1 -1
- package/dist/app/nav.js +2 -2
- package/dist/app/query-state-banners.d.ts +1 -1
- package/dist/app/reference-link.d.ts +1 -1
- package/dist/app/row-actions.d.ts +10 -2
- package/dist/app/row-actions.js +85 -6
- package/dist/app/secret-mint-body.d.ts +1 -1
- package/dist/app/secrets-edit-body.d.ts +1 -1
- package/dist/app/use-record-actions.d.ts +12 -0
- package/dist/app/use-record-actions.js +30 -0
- package/dist/app/write-failed-error.d.ts +1 -1
- package/dist/components/availability-options-select.d.ts +1 -1
- package/dist/components/embedded-list-field.d.ts +1 -1
- package/dist/components/embedded-list-field.js +1 -1
- package/dist/components/file-list-field.d.ts +1 -1
- package/dist/components/grid-cell-for-field.d.ts +4 -2
- package/dist/components/grid-cell-for-field.js +2 -2
- package/dist/components/multi-select-checkboxes.d.ts +1 -1
- package/dist/components/multi-select-checkboxes.js +1 -1
- package/dist/components/query-options-select.d.ts +1 -1
- package/dist/components/related-list-section.d.ts +1 -1
- package/dist/components/related-list-section.js +16 -3
- package/dist/components/render-edit-logic.d.ts +1 -1
- package/dist/components/render-edit-types.d.ts +2 -2
- package/dist/components/render-edit.d.ts +1 -1
- package/dist/components/render-edit.js +5 -3
- package/dist/components/render-field.d.ts +5 -2
- package/dist/components/render-field.js +103 -9
- package/dist/components/render-list.d.ts +1 -1
- package/dist/components/render-list.js +20 -4
- package/dist/components/write-form-section.d.ts +1 -1
- package/dist/components/write-form-section.js +1 -1
- package/dist/context/dispatcher-context.d.ts +1 -1
- package/dist/format-when.js +1 -1
- package/dist/headless/apex/css.d.ts +3 -0
- package/dist/headless/apex/css.js +298 -0
- package/dist/headless/apex/index.d.ts +236 -0
- package/dist/headless/apex/index.js +377 -0
- package/dist/headless/apex/lightbox.d.ts +4 -0
- package/dist/headless/apex/lightbox.js +81 -0
- package/dist/headless/contracts/asset.d.ts +15 -0
- package/dist/headless/contracts/asset.js +17 -0
- package/dist/headless/contracts/index.d.ts +3 -0
- package/dist/headless/contracts/index.js +1 -0
- package/dist/headless/contracts/locale.d.ts +7 -0
- package/dist/headless/contracts/locale.js +11 -0
- package/dist/headless/contracts/primitives.d.ts +93 -0
- package/dist/headless/contracts/primitives.js +21 -0
- package/dist/headless/dispatcher/index.d.ts +2 -0
- package/dist/headless/dispatcher/index.js +1 -0
- package/dist/headless/dispatcher/types.d.ts +86 -0
- package/dist/headless/dispatcher/types.js +34 -0
- package/dist/headless/form/form-controller.d.ts +2 -0
- package/dist/headless/form/form-controller.js +409 -0
- package/dist/headless/form/index.d.ts +3 -0
- package/dist/headless/form/index.js +2 -0
- package/dist/headless/form/types.d.ts +76 -0
- package/dist/headless/form/types.js +1 -0
- package/dist/headless/form/zod-bridge.d.ts +10 -0
- package/dist/headless/form/zod-bridge.js +103 -0
- package/dist/headless/format/document-values.d.ts +12 -0
- package/dist/headless/format/document-values.js +70 -0
- package/dist/headless/format/escape.d.ts +5 -0
- package/dist/headless/format/escape.js +75 -0
- package/dist/headless/format/html-template.d.ts +9 -0
- package/dist/headless/format/html-template.js +39 -0
- package/dist/headless/format/index.d.ts +12 -0
- package/dist/headless/format/index.js +237 -0
- package/dist/headless/format/money.d.ts +3 -0
- package/dist/headless/format/money.js +39 -0
- package/dist/headless/index.d.ts +14 -0
- package/dist/headless/index.js +9 -0
- package/dist/headless/locale-routing/index.d.ts +41 -0
- package/dist/headless/locale-routing/index.js +145 -0
- package/dist/headless/nav/index.d.ts +2 -0
- package/dist/headless/nav/index.js +1 -0
- package/dist/headless/nav/resolve.d.ts +2 -0
- package/dist/headless/nav/resolve.js +71 -0
- package/dist/headless/nav/types.d.ts +26 -0
- package/dist/headless/nav/types.js +1 -0
- package/dist/headless/store/create-store.d.ts +2 -0
- package/dist/headless/store/create-store.js +43 -0
- package/dist/headless/store/equality.d.ts +1 -0
- package/dist/headless/store/equality.js +34 -0
- package/dist/headless/store/index.d.ts +3 -0
- package/dist/headless/store/index.js +2 -0
- package/dist/headless/store/types.d.ts +7 -0
- package/dist/headless/store/types.js +10 -0
- package/dist/headless/view-model/edit.d.ts +18 -0
- package/dist/headless/view-model/edit.js +501 -0
- package/dist/headless/view-model/embedded-list.d.ts +27 -0
- package/dist/headless/view-model/embedded-list.js +63 -0
- package/dist/headless/view-model/index.d.ts +7 -0
- package/dist/headless/view-model/index.js +3 -0
- package/dist/headless/view-model/list-file-display.d.ts +3 -0
- package/dist/headless/view-model/list-file-display.js +27 -0
- package/dist/headless/view-model/list.d.ts +16 -0
- package/dist/headless/view-model/list.js +229 -0
- package/dist/headless/view-model/types.d.ts +382 -0
- package/dist/headless/view-model/types.js +1 -0
- package/dist/hooks/use-ai-text.d.ts +1 -1
- package/dist/hooks/use-form.d.ts +1 -1
- package/dist/hooks/use-form.js +1 -1
- package/dist/hooks/use-mutation.d.ts +1 -1
- package/dist/hooks/use-query.d.ts +1 -1
- package/dist/hooks/use-store.d.ts +1 -1
- package/dist/hooks/use-store.js +7 -7
- package/dist/hooks/use-stream-handler.d.ts +1 -1
- package/dist/i18n-defaults.js +7 -0
- package/dist/i18n.d.ts +1 -1
- package/dist/i18n.js +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +7 -4
- package/dist/live/csrf.d.ts +2 -0
- package/dist/live/csrf.js +60 -0
- package/dist/live/dispatcher-live.d.ts +7 -0
- package/dist/live/dispatcher-live.js +286 -0
- package/dist/live/envelopes.d.ts +101 -0
- package/dist/live/envelopes.js +35 -0
- package/dist/live/error-mapping.d.ts +16 -0
- package/dist/live/error-mapping.js +82 -0
- package/dist/live/index.d.ts +7 -0
- package/dist/live/index.js +5 -0
- package/dist/live/locale.d.ts +2 -0
- package/dist/live/locale.js +25 -0
- package/dist/live/sse-stream.d.ts +14 -0
- package/dist/live/sse-stream.js +128 -0
- package/dist/primitives.d.ts +53 -36
- package/dist/primitives.js +1 -1
- package/dist/session/session-ended.d.ts +1 -1
- package/dist/tokens.d.ts +3 -4
- package/dist/tokens.js +4 -5
- package/dist/web/app/app-schema-boot.d.ts +19 -0
- package/dist/web/app/app-schema-boot.js +124 -0
- package/dist/web/app/browser-locale.d.ts +22 -0
- package/dist/web/app/browser-locale.js +78 -0
- package/dist/web/app/client-plugin.d.ts +106 -0
- package/dist/web/app/client-plugin.js +12 -0
- package/dist/web/app/create-app.d.ts +104 -0
- package/dist/web/app/create-app.js +498 -0
- package/dist/web/app/create-public-surface.d.ts +36 -0
- package/dist/web/app/create-public-surface.js +40 -0
- package/dist/web/app/dashboard-body.d.ts +3 -0
- package/dist/web/app/dashboard-body.js +865 -0
- package/dist/web/app/dashboard-refresh.d.ts +6 -0
- package/dist/web/app/dashboard-refresh.js +15 -0
- package/dist/web/app/document-lang-sync.d.ts +4 -0
- package/dist/web/app/document-lang-sync.js +27 -0
- package/dist/web/app/draft-storage.d.ts +11 -0
- package/dist/web/app/draft-storage.js +53 -0
- package/dist/web/app/nav-providers-context.d.ts +13 -0
- package/dist/web/app/nav-providers-context.js +18 -0
- package/dist/web/app/nav.d.ts +40 -0
- package/dist/web/app/nav.js +231 -0
- package/dist/web/app/plain-content-editor.d.ts +3 -0
- package/dist/web/app/plain-content-editor.js +30 -0
- package/dist/web/app/relative-time.d.ts +10 -0
- package/dist/web/app/relative-time.js +56 -0
- package/dist/web/app/resolvers-context.d.ts +12 -0
- package/dist/web/app/resolvers-context.js +10 -0
- package/dist/web/app/rich-content-editor.d.ts +3 -0
- package/dist/web/app/rich-content-editor.js +15 -0
- package/dist/web/app/root-error-fallback.d.ts +2 -0
- package/dist/web/app/root-error-fallback.js +21 -0
- package/dist/web/app/screen-error-fallback.d.ts +6 -0
- package/dist/web/app/screen-error-fallback.js +17 -0
- package/dist/web/app/tiptap-editor.d.ts +3 -0
- package/dist/web/app/tiptap-editor.js +120 -0
- package/dist/web/app/toast-action-notifier.d.ts +5 -0
- package/dist/web/app/toast-action-notifier.js +17 -0
- package/dist/web/components/config-cascade.d.ts +13 -0
- package/dist/web/components/config-cascade.js +155 -0
- package/dist/web/components/config-source-badge.d.ts +6 -0
- package/dist/web/components/config-source-badge.js +55 -0
- package/dist/web/default-color-scheme.d.ts +2 -0
- package/dist/web/default-color-scheme.js +3 -0
- package/dist/web/icons.d.ts +94 -0
- package/dist/web/icons.js +100 -0
- package/dist/web/index.d.ts +78 -0
- package/dist/web/index.js +53 -0
- package/dist/web/layout/app-layout.d.ts +21 -0
- package/dist/web/layout/app-layout.js +8 -0
- package/dist/web/layout/avatar.d.ts +12 -0
- package/dist/web/layout/avatar.js +63 -0
- package/dist/web/layout/default-app-shell.d.ts +41 -0
- package/dist/web/layout/default-app-shell.js +16 -0
- package/dist/web/layout/editor-panel.d.ts +10 -0
- package/dist/web/layout/editor-panel.js +29 -0
- package/dist/web/layout/fill-classes.d.ts +9 -0
- package/dist/web/layout/fill-classes.js +15 -0
- package/dist/web/layout/filter-app-schema-navs.d.ts +7 -0
- package/dist/web/layout/filter-app-schema-navs.js +68 -0
- package/dist/web/layout/header-action-group.d.ts +6 -0
- package/dist/web/layout/header-action-group.js +8 -0
- package/dist/web/layout/header-overflow-menu.d.ts +4 -0
- package/dist/web/layout/header-overflow-menu.js +8 -0
- package/dist/web/layout/language-menu-items.d.ts +8 -0
- package/dist/web/layout/language-menu-items.js +16 -0
- package/dist/web/layout/language-switcher.d.ts +25 -0
- package/dist/web/layout/language-switcher.js +46 -0
- package/dist/web/layout/nav-tree.d.ts +19 -0
- package/dist/web/layout/nav-tree.js +536 -0
- package/dist/web/layout/page-header-slot.d.ts +25 -0
- package/dist/web/layout/page-header-slot.js +50 -0
- package/dist/web/layout/profile-menu.d.ts +13 -0
- package/dist/web/layout/profile-menu.js +6 -0
- package/dist/web/layout/shell-breadcrumb.d.ts +11 -0
- package/dist/web/layout/shell-breadcrumb.js +34 -0
- package/dist/web/layout/shell-header.d.ts +12 -0
- package/dist/web/layout/shell-header.js +159 -0
- package/dist/web/layout/sidebar-brand.d.ts +15 -0
- package/dist/web/layout/sidebar-brand.js +9 -0
- package/dist/web/layout/sidebar-panel.d.ts +41 -0
- package/dist/web/layout/sidebar-panel.js +107 -0
- package/dist/web/layout/sidebar-user.d.ts +8 -0
- package/dist/web/layout/sidebar-user.js +17 -0
- package/dist/web/layout/sidebar.d.ts +17 -0
- package/dist/web/layout/sidebar.js +11 -0
- package/dist/web/layout/target-resolver-stub.d.ts +13 -0
- package/dist/web/layout/target-resolver-stub.js +61 -0
- package/dist/web/layout/target-url.d.ts +12 -0
- package/dist/web/layout/target-url.js +77 -0
- package/dist/web/layout/theme-label.d.ts +15 -0
- package/dist/web/layout/theme-label.js +35 -0
- package/dist/web/layout/theme-menu-item.d.ts +12 -0
- package/dist/web/layout/theme-menu-item.js +16 -0
- package/dist/web/layout/theme-toggle.d.ts +17 -0
- package/dist/web/layout/theme-toggle.js +22 -0
- package/dist/web/layout/topbar.d.ts +8 -0
- package/dist/web/layout/topbar.js +4 -0
- package/dist/web/layout/workspace-shell.d.ts +63 -0
- package/dist/web/layout/workspace-shell.js +220 -0
- package/dist/web/layout/workspace-switcher.d.ts +15 -0
- package/dist/web/layout/workspace-switcher.js +36 -0
- package/dist/web/lib/accept-attr.d.ts +1 -0
- package/dist/web/lib/accept-attr.js +6 -0
- package/dist/web/lib/clamp.d.ts +1 -0
- package/dist/web/lib/clamp.js +3 -0
- package/dist/web/lib/cn.d.ts +6 -0
- package/dist/web/lib/cn.js +9 -0
- package/dist/web/lib/download.d.ts +2 -0
- package/dist/web/lib/download.js +24 -0
- package/dist/web/lib/file-ref-download.d.ts +15 -0
- package/dist/web/lib/file-ref-download.js +62 -0
- package/dist/web/lib/file-upload-form-data.d.ts +7 -0
- package/dist/web/lib/file-upload-form-data.js +11 -0
- package/dist/web/lib/resize-image.d.ts +1 -0
- package/dist/web/lib/resize-image.js +66 -0
- package/dist/web/lib/upload-file-ref.d.ts +9 -0
- package/dist/web/lib/upload-file-ref.js +29 -0
- package/dist/web/primitives/action-menu.d.ts +34 -0
- package/dist/web/primitives/action-menu.js +30 -0
- package/dist/web/primitives/calendar-popover.d.ts +13 -0
- package/dist/web/primitives/calendar-popover.js +76 -0
- package/dist/web/primitives/combobox.d.ts +56 -0
- package/dist/web/primitives/combobox.js +127 -0
- package/dist/web/primitives/date-field.d.ts +18 -0
- package/dist/web/primitives/date-field.js +74 -0
- package/dist/web/primitives/date-input.d.ts +1 -0
- package/dist/web/primitives/date-input.js +5 -0
- package/dist/web/primitives/date-parse.d.ts +11 -0
- package/dist/web/primitives/date-parse.js +159 -0
- package/dist/web/primitives/dialog.d.ts +3 -0
- package/dist/web/primitives/dialog.js +42 -0
- package/dist/web/primitives/drawer.d.ts +3 -0
- package/dist/web/primitives/drawer.js +17 -0
- package/dist/web/primitives/dropdown-menu.d.ts +15 -0
- package/dist/web/primitives/dropdown-menu.js +56 -0
- package/dist/web/primitives/embedded-list-input.d.ts +9 -0
- package/dist/web/primitives/embedded-list-input.js +382 -0
- package/dist/web/primitives/file-thumbnail.d.ts +25 -0
- package/dist/web/primitives/file-thumbnail.js +90 -0
- package/dist/web/primitives/file-upload.d.ts +21 -0
- package/dist/web/primitives/file-upload.js +56 -0
- package/dist/web/primitives/index.d.ts +34 -0
- package/dist/web/primitives/index.js +2021 -0
- package/dist/web/primitives/json-view.d.ts +7 -0
- package/dist/web/primitives/json-view.js +84 -0
- package/dist/web/primitives/layout.d.ts +27 -0
- package/dist/web/primitives/layout.js +30 -0
- package/dist/web/primitives/lightbox.d.ts +3 -0
- package/dist/web/primitives/lightbox.js +36 -0
- package/dist/web/primitives/locale-number.d.ts +2 -0
- package/dist/web/primitives/locale-number.js +54 -0
- package/dist/web/primitives/located-timestamp-input.d.ts +22 -0
- package/dist/web/primitives/located-timestamp-input.js +22 -0
- package/dist/web/primitives/metric.d.ts +5 -0
- package/dist/web/primitives/metric.js +18 -0
- package/dist/web/primitives/modal-shell.d.ts +17 -0
- package/dist/web/primitives/modal-shell.js +9 -0
- package/dist/web/primitives/modal.d.ts +3 -0
- package/dist/web/primitives/modal.js +13 -0
- package/dist/web/primitives/money-input.d.ts +18 -0
- package/dist/web/primitives/money-input.js +122 -0
- package/dist/web/primitives/narrow-pinned-footer.d.ts +12 -0
- package/dist/web/primitives/narrow-pinned-footer.js +153 -0
- package/dist/web/primitives/number-input.d.ts +18 -0
- package/dist/web/primitives/number-input.js +53 -0
- package/dist/web/primitives/option-groups.d.ts +11 -0
- package/dist/web/primitives/option-groups.js +27 -0
- package/dist/web/primitives/page-header.d.ts +3 -0
- package/dist/web/primitives/page-header.js +52 -0
- package/dist/web/primitives/promo-panel.d.ts +3 -0
- package/dist/web/primitives/promo-panel.js +11 -0
- package/dist/web/primitives/segmented-select.d.ts +21 -0
- package/dist/web/primitives/segmented-select.js +62 -0
- package/dist/web/primitives/share-actions.d.ts +4 -0
- package/dist/web/primitives/share-actions.js +56 -0
- package/dist/web/primitives/status-badge.d.ts +3 -0
- package/dist/web/primitives/status-badge.js +5 -0
- package/dist/web/primitives/sticky-action-bar.d.ts +5 -0
- package/dist/web/primitives/sticky-action-bar.js +15 -0
- package/dist/web/primitives/tabs.d.ts +3 -0
- package/dist/web/primitives/tabs.js +107 -0
- package/dist/web/primitives/timestamp-input.d.ts +27 -0
- package/dist/web/primitives/timestamp-input.js +87 -0
- package/dist/web/primitives/toast.d.ts +19 -0
- package/dist/web/primitives/toast.js +63 -0
- package/dist/web/primitives/tz-input.d.ts +11 -0
- package/dist/web/primitives/tz-input.js +8 -0
- package/dist/web/primitives/tz-options.d.ts +4 -0
- package/dist/web/primitives/tz-options.js +17 -0
- package/dist/web/primitives/use-keyboard-inset.d.ts +1 -0
- package/dist/web/primitives/use-keyboard-inset.js +28 -0
- package/dist/web/primitives/use-narrow-viewport.d.ts +4 -0
- package/dist/web/primitives/use-narrow-viewport.js +46 -0
- package/dist/web/react-css-custom-properties.d.ts +6 -0
- package/dist/web/react-css-custom-properties.js +1 -0
- package/dist/web/sse/live-events.d.ts +15 -0
- package/dist/web/sse/live-events.js +148 -0
- package/dist/web/theme-plugin.d.ts +41 -0
- package/dist/web/theme-plugin.js +123 -0
- package/dist/web/tokens.d.ts +24 -0
- package/dist/web/tokens.js +203 -0
- package/dist/web/ui/avatar.d.ts +11 -0
- package/dist/web/ui/avatar.js +25 -0
- package/dist/web/ui/badge.d.ts +9 -0
- package/dist/web/ui/badge.js +26 -0
- package/dist/web/ui/breadcrumb.d.ts +11 -0
- package/dist/web/ui/breadcrumb.js +29 -0
- package/dist/web/ui/button.d.ts +10 -0
- package/dist/web/ui/button.js +37 -0
- package/dist/web/ui/checkbox.d.ts +4 -0
- package/dist/web/ui/checkbox.js +11 -0
- package/dist/web/ui/input.d.ts +3 -0
- package/dist/web/ui/input.js +8 -0
- package/dist/web/ui/label.d.ts +4 -0
- package/dist/web/ui/label.js +10 -0
- package/dist/web/ui/resizable.d.ts +7 -0
- package/dist/web/ui/resizable.js +16 -0
- package/dist/web/ui/separator.d.ts +4 -0
- package/dist/web/ui/separator.js +10 -0
- package/dist/web/ui/sheet.d.ts +14 -0
- package/dist/web/ui/sheet.js +42 -0
- package/dist/web/ui/sidebar.d.ts +73 -0
- package/dist/web/ui/sidebar.js +211 -0
- package/dist/web/ui/skeleton.d.ts +2 -0
- package/dist/web/ui/skeleton.js +7 -0
- package/dist/web/ui/switch.d.ts +6 -0
- package/dist/web/ui/switch.js +10 -0
- package/dist/web/ui/table.d.ts +10 -0
- package/dist/web/ui/table.js +30 -0
- package/dist/web/ui/tabs.d.ts +11 -0
- package/dist/web/ui/tabs.js +31 -0
- package/dist/web/ui/textarea.d.ts +3 -0
- package/dist/web/ui/textarea.js +8 -0
- package/dist/web/ui/tooltip.d.ts +7 -0
- package/dist/web/ui/tooltip.js +19 -0
- package/dist/web/ui/use-mobile.d.ts +1 -0
- package/dist/web/ui/use-mobile.js +16 -0
- package/dist/web/version/update-checker.d.ts +9 -0
- package/dist/web/version/update-checker.js +88 -0
- package/dist/web/widgets/ai-text-field.d.ts +36 -0
- package/dist/web/widgets/ai-text-field.js +137 -0
- package/dist/web/widgets/chart-window.d.ts +58 -0
- package/dist/web/widgets/chart-window.js +190 -0
- package/dist/web/widgets/charts.d.ts +208 -0
- package/dist/web/widgets/charts.js +685 -0
- package/dist/web/widgets/collapsible-section.d.ts +10 -0
- package/dist/web/widgets/collapsible-section.js +17 -0
- package/dist/web/widgets/dashboard-list.d.ts +21 -0
- package/dist/web/widgets/dashboard-list.js +45 -0
- package/dist/web/widgets/detail-list.d.ts +15 -0
- package/dist/web/widgets/detail-list.js +8 -0
- package/dist/web/widgets/drawer.d.ts +65 -0
- package/dist/web/widgets/drawer.js +142 -0
- package/dist/web/widgets/feed-list.d.ts +13 -0
- package/dist/web/widgets/feed-list.js +9 -0
- package/dist/web/widgets/floating-panel.d.ts +30 -0
- package/dist/web/widgets/floating-panel.js +242 -0
- package/dist/web/widgets/form-fields.d.ts +93 -0
- package/dist/web/widgets/form-fields.js +50 -0
- package/dist/web/widgets/index.d.ts +27 -0
- package/dist/web/widgets/index.js +30 -0
- package/dist/web/widgets/infinity-list.d.ts +46 -0
- package/dist/web/widgets/infinity-list.js +211 -0
- package/dist/web/widgets/mode-switch.d.ts +21 -0
- package/dist/web/widgets/mode-switch.js +25 -0
- package/dist/web/widgets/photo-slots.d.ts +29 -0
- package/dist/web/widgets/photo-slots.js +52 -0
- package/dist/web/widgets/plan-card.d.ts +36 -0
- package/dist/web/widgets/plan-card.js +13 -0
- package/dist/web/widgets/progress-bar.d.ts +19 -0
- package/dist/web/widgets/progress-bar.js +24 -0
- package/dist/web/widgets/progress-list.d.ts +19 -0
- package/dist/web/widgets/progress-list.js +11 -0
- package/dist/web/widgets/public-shell.d.ts +22 -0
- package/dist/web/widgets/public-shell.js +15 -0
- package/dist/web/widgets/query-table.d.ts +29 -0
- package/dist/web/widgets/query-table.js +30 -0
- package/dist/web/widgets/result-panel.d.ts +69 -0
- package/dist/web/widgets/result-panel.js +30 -0
- package/dist/web/widgets/section-card.d.ts +12 -0
- package/dist/web/widgets/section-card.js +9 -0
- package/dist/web/widgets/sheet-parts.d.ts +9 -0
- package/dist/web/widgets/sheet-parts.js +11 -0
- package/dist/web/widgets/side-by-side-table.d.ts +31 -0
- package/dist/web/widgets/side-by-side-table.js +11 -0
- package/dist/web/widgets/stat.d.ts +54 -0
- package/dist/web/widgets/stat.js +65 -0
- package/dist/web/widgets/states.d.ts +23 -0
- package/dist/web/widgets/states.js +20 -0
- package/dist/web/widgets/status-badge.d.ts +15 -0
- package/dist/web/widgets/status-badge.js +24 -0
- package/dist/web/widgets/step-bar.d.ts +35 -0
- package/dist/web/widgets/step-bar.js +60 -0
- package/dist/web/widgets/upload-zone.d.ts +24 -0
- package/dist/web/widgets/upload-zone.js +108 -0
- package/dist/web/widgets/use-draft.d.ts +20 -0
- package/dist/web/widgets/use-draft.js +21 -0
- package/dist/web/widgets/use-pointer-drag.d.ts +21 -0
- package/dist/web/widgets/use-pointer-drag.js +53 -0
- package/package.json +105 -7
- package/src/changes.json +77 -0
- package/src/web/fonts/OFL.txt +93 -0
- package/src/web/fonts/ibm-plex-mono-latin-400.woff2 +0 -0
- package/src/web/fonts/ibm-plex-mono-latin-500.woff2 +0 -0
- package/src/web/fonts/ibm-plex-mono-latin-ext-400.woff2 +0 -0
- package/src/web/fonts/ibm-plex-mono-latin-ext-500.woff2 +0 -0
- package/src/web/fonts/ibm-plex-sans-latin-400.woff2 +0 -0
- package/src/web/fonts/ibm-plex-sans-latin-500.woff2 +0 -0
- package/src/web/fonts/ibm-plex-sans-latin-600.woff2 +0 -0
- package/src/web/fonts/ibm-plex-sans-latin-ext-400.woff2 +0 -0
- package/src/web/fonts/ibm-plex-sans-latin-ext-500.woff2 +0 -0
- package/src/web/fonts/ibm-plex-sans-latin-ext-600.woff2 +0 -0
- package/src/web/styles.css +401 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
// Vanilla lightbox for Apex marketing pages — click .shot-frame img to enlarge,
|
|
2
|
+
// prev/next (buttons or arrow keys) walks all .shot-frame images on the page.
|
|
3
|
+
// Injected by renderApexPage; no React, no per-app wiring.
|
|
4
|
+
export const APEX_LIGHTBOX_HTML = `<dialog id="apex-lightbox" class="apex-lightbox" aria-label="Screenshot preview">
|
|
5
|
+
<button type="button" class="apex-lightbox__close" aria-label="Close">×</button>
|
|
6
|
+
<button type="button" class="apex-lightbox__prev" aria-label="Previous screenshot">‹</button>
|
|
7
|
+
<button type="button" class="apex-lightbox__next" aria-label="Next screenshot">›</button>
|
|
8
|
+
<img class="apex-lightbox__img" alt="" />
|
|
9
|
+
</dialog>`;
|
|
10
|
+
// Split from APEX_LIGHTBOX_SCRIPT so APEX_LIGHTBOX_SCRIPT_CSP_HASH hashes
|
|
11
|
+
// exactly the bytes the browser executes — CSP's script-src hash-source
|
|
12
|
+
// covers the content between <script> and </script>, nothing more/less.
|
|
13
|
+
const APEX_LIGHTBOX_SCRIPT_BODY = `
|
|
14
|
+
(function () {
|
|
15
|
+
var dlg = document.getElementById("apex-lightbox");
|
|
16
|
+
if (!dlg) return;
|
|
17
|
+
var img = dlg.querySelector(".apex-lightbox__img");
|
|
18
|
+
var closeBtn = dlg.querySelector(".apex-lightbox__close");
|
|
19
|
+
var prevBtn = dlg.querySelector(".apex-lightbox__prev");
|
|
20
|
+
var nextBtn = dlg.querySelector(".apex-lightbox__next");
|
|
21
|
+
if (!img || !closeBtn || !prevBtn || !nextBtn) return;
|
|
22
|
+
var shots = [];
|
|
23
|
+
var current = 0;
|
|
24
|
+
function show(i) {
|
|
25
|
+
var shot = shots[i];
|
|
26
|
+
current = i;
|
|
27
|
+
img.src = shot.currentSrc || shot.src;
|
|
28
|
+
img.alt = shot.alt || "";
|
|
29
|
+
}
|
|
30
|
+
function step(delta) {
|
|
31
|
+
if (shots.length < 2) return;
|
|
32
|
+
show((current + delta + shots.length) % shots.length);
|
|
33
|
+
}
|
|
34
|
+
function open(target) {
|
|
35
|
+
shots = Array.prototype.slice.call(document.querySelectorAll(".shot-frame img"));
|
|
36
|
+
var start = shots.indexOf(target);
|
|
37
|
+
if (start < 0) {
|
|
38
|
+
shots = [target];
|
|
39
|
+
start = 0;
|
|
40
|
+
}
|
|
41
|
+
show(start);
|
|
42
|
+
prevBtn.hidden = nextBtn.hidden = shots.length < 2;
|
|
43
|
+
if (typeof dlg.showModal === "function") dlg.showModal();
|
|
44
|
+
}
|
|
45
|
+
function close() {
|
|
46
|
+
if (dlg.open) dlg.close();
|
|
47
|
+
}
|
|
48
|
+
document.addEventListener("click", function (e) {
|
|
49
|
+
var t = e.target;
|
|
50
|
+
if (!(t instanceof HTMLImageElement)) return;
|
|
51
|
+
if (!t.closest(".shot-frame")) return;
|
|
52
|
+
e.preventDefault();
|
|
53
|
+
open(t);
|
|
54
|
+
});
|
|
55
|
+
closeBtn.addEventListener("click", close);
|
|
56
|
+
prevBtn.addEventListener("click", function () { step(-1); });
|
|
57
|
+
nextBtn.addEventListener("click", function () { step(1); });
|
|
58
|
+
document.addEventListener("keydown", function (e) {
|
|
59
|
+
if (!dlg.open) return;
|
|
60
|
+
if (e.key === "ArrowLeft") {
|
|
61
|
+
e.preventDefault();
|
|
62
|
+
step(-1);
|
|
63
|
+
} else if (e.key === "ArrowRight") {
|
|
64
|
+
e.preventDefault();
|
|
65
|
+
step(1);
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
dlg.addEventListener("click", function (e) {
|
|
69
|
+
if (e.target === dlg) close();
|
|
70
|
+
});
|
|
71
|
+
dlg.addEventListener("cancel", function (e) {
|
|
72
|
+
e.preventDefault();
|
|
73
|
+
close();
|
|
74
|
+
});
|
|
75
|
+
})();
|
|
76
|
+
`;
|
|
77
|
+
/** ponytail: one delegated listener; no-op when no .shot-frame on the page. */
|
|
78
|
+
export const APEX_LIGHTBOX_SCRIPT = `<script>${APEX_LIGHTBOX_SCRIPT_BODY}</script>`;
|
|
79
|
+
// CSP hash-source for the inline script above; apex output is often
|
|
80
|
+
// pre-rendered, so a per-request nonce can't work. Guarded by lightbox.test.ts.
|
|
81
|
+
export const APEX_LIGHTBOX_SCRIPT_CSP_HASH = "sha256-CLZlqZx0zShYKXq1Qg6+VYMTEC6tqiIlNf6JPA1nLck=";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type AssetResolveContext = {
|
|
2
|
+
readonly tenantId?: string;
|
|
3
|
+
readonly theme?: "light" | "dark";
|
|
4
|
+
readonly platform?: "web" | "ios" | "android";
|
|
5
|
+
readonly locale?: string;
|
|
6
|
+
};
|
|
7
|
+
export type AssetResolution = {
|
|
8
|
+
readonly uri: string;
|
|
9
|
+
readonly width?: number;
|
|
10
|
+
readonly height?: number;
|
|
11
|
+
readonly alt?: string;
|
|
12
|
+
};
|
|
13
|
+
export type AssetResolver = {
|
|
14
|
+
resolve(qn: string, ctx?: AssetResolveContext): AssetResolution | null;
|
|
15
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Asset-Resolver — the layer between "qualified asset name" and "URL the
|
|
2
|
+
// renderer can point an <img>/<Image> at". An asset (logo, illustration,
|
|
3
|
+
// icon bundle) is declared by a feature with a qualified name
|
|
4
|
+
// ("admin:asset:hero-logo") and resolved at render-time against the
|
|
5
|
+
// current tenant / theme / platform.
|
|
6
|
+
//
|
|
7
|
+
// Why a resolver indirection:
|
|
8
|
+
// - Tenant-theming (different logo per tenant) without the feature
|
|
9
|
+
// knowing what tenant it's rendering for.
|
|
10
|
+
// - Dark-mode / light-mode variants picked up from the current theme
|
|
11
|
+
// context.
|
|
12
|
+
// - Web vs mobile different asset bundles (e.g. PNG vs SVG).
|
|
13
|
+
//
|
|
14
|
+
// The app registers a concrete resolver on startup and hands it to the
|
|
15
|
+
// renderer via context. Feature code calls `useAsset("admin:asset:logo")`
|
|
16
|
+
// (renderer-side hook) → internally `AssetResolver.resolve(qn)`.
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type { AssetResolution, AssetResolveContext, AssetResolver, } from "./asset.ts";
|
|
2
|
+
export type { LocaleResolver } from "./locale.ts";
|
|
3
|
+
export type { BadgeProps, ButtonProps, CardProps, DatePickerProps, IconProps, ModalProps, NumberInputProps, PrimitiveCommonProps, PrimitivesContract, SelectOption, SelectProps, TextInputProps, ToastIntent, ToastProps, ToggleProps, } from "./primitives.ts";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Locale-Resolver — translation lookup + language/region info the
|
|
2
|
+
// renderer needs. Sits in front of i18next (or whatever i18n library
|
|
3
|
+
// the app wires up). ui-core calls it generically so form-controller,
|
|
4
|
+
// view-model, and nav-resolver all produce already-translated strings
|
|
5
|
+
// to hand to the renderer.
|
|
6
|
+
//
|
|
7
|
+
// The framework already has an i18n layer (@cosmicdrift/kumiko-framework/i18n) that
|
|
8
|
+
// features register translations against. This contract is what ui-core
|
|
9
|
+
// consumes — the app's entrypoint instantiates the resolver from a
|
|
10
|
+
// framework i18next instance and passes it to the renderer via context.
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
export type PrimitiveCommonProps = {
|
|
2
|
+
readonly id?: string;
|
|
3
|
+
readonly name?: string;
|
|
4
|
+
readonly disabled?: boolean;
|
|
5
|
+
readonly readOnly?: boolean;
|
|
6
|
+
readonly required?: boolean;
|
|
7
|
+
readonly label?: string;
|
|
8
|
+
readonly placeholder?: string;
|
|
9
|
+
readonly helperText?: string;
|
|
10
|
+
readonly errors?: readonly string[];
|
|
11
|
+
};
|
|
12
|
+
export type TextInputProps = PrimitiveCommonProps & {
|
|
13
|
+
readonly value: string;
|
|
14
|
+
readonly onChange: (next: string) => void;
|
|
15
|
+
readonly onBlur?: () => void;
|
|
16
|
+
readonly type?: "text" | "email" | "url" | "tel" | "password";
|
|
17
|
+
readonly maxLength?: number;
|
|
18
|
+
readonly autoComplete?: string;
|
|
19
|
+
};
|
|
20
|
+
export type NumberInputProps = PrimitiveCommonProps & {
|
|
21
|
+
readonly value: number | null;
|
|
22
|
+
readonly onChange: (next: number | null) => void;
|
|
23
|
+
readonly onBlur?: () => void;
|
|
24
|
+
readonly min?: number;
|
|
25
|
+
readonly max?: number;
|
|
26
|
+
readonly step?: number;
|
|
27
|
+
};
|
|
28
|
+
export type SelectOption<TValue extends string = string> = {
|
|
29
|
+
readonly value: TValue;
|
|
30
|
+
readonly label: string;
|
|
31
|
+
};
|
|
32
|
+
export type SelectProps<TValue extends string = string> = PrimitiveCommonProps & {
|
|
33
|
+
readonly value: TValue | null;
|
|
34
|
+
readonly onChange: (next: TValue | null) => void;
|
|
35
|
+
readonly options: readonly SelectOption<TValue>[];
|
|
36
|
+
};
|
|
37
|
+
export type ToggleProps = PrimitiveCommonProps & {
|
|
38
|
+
readonly value: boolean;
|
|
39
|
+
readonly onChange: (next: boolean) => void;
|
|
40
|
+
};
|
|
41
|
+
export type DatePickerProps = PrimitiveCommonProps & {
|
|
42
|
+
readonly value: string | null;
|
|
43
|
+
readonly onChange: (next: string | null) => void;
|
|
44
|
+
readonly minDate?: string;
|
|
45
|
+
readonly maxDate?: string;
|
|
46
|
+
};
|
|
47
|
+
export type ButtonProps = {
|
|
48
|
+
readonly onPress: () => void;
|
|
49
|
+
readonly label: string;
|
|
50
|
+
readonly variant?: "primary" | "secondary" | "destructive" | "ghost";
|
|
51
|
+
readonly disabled?: boolean;
|
|
52
|
+
readonly loading?: boolean;
|
|
53
|
+
readonly leftIcon?: string;
|
|
54
|
+
readonly rightIcon?: string;
|
|
55
|
+
};
|
|
56
|
+
export type ModalProps = {
|
|
57
|
+
readonly open: boolean;
|
|
58
|
+
readonly onClose: () => void;
|
|
59
|
+
readonly title?: string;
|
|
60
|
+
readonly description?: string;
|
|
61
|
+
};
|
|
62
|
+
export type ToastIntent = "info" | "success" | "warning" | "error";
|
|
63
|
+
export type ToastProps = {
|
|
64
|
+
readonly intent: ToastIntent;
|
|
65
|
+
readonly title: string;
|
|
66
|
+
readonly description?: string;
|
|
67
|
+
readonly onDismiss?: () => void;
|
|
68
|
+
};
|
|
69
|
+
export type BadgeProps = {
|
|
70
|
+
readonly label: string;
|
|
71
|
+
readonly intent?: ToastIntent;
|
|
72
|
+
};
|
|
73
|
+
export type CardProps = {
|
|
74
|
+
readonly title?: string;
|
|
75
|
+
readonly description?: string;
|
|
76
|
+
};
|
|
77
|
+
export type IconProps = {
|
|
78
|
+
readonly name: string;
|
|
79
|
+
readonly size?: number;
|
|
80
|
+
};
|
|
81
|
+
export type PrimitivesContract<TPrimitive = unknown> = {
|
|
82
|
+
readonly TextInput: TPrimitive;
|
|
83
|
+
readonly NumberInput: TPrimitive;
|
|
84
|
+
readonly Select: TPrimitive;
|
|
85
|
+
readonly Toggle: TPrimitive;
|
|
86
|
+
readonly DatePicker: TPrimitive;
|
|
87
|
+
readonly Button: TPrimitive;
|
|
88
|
+
readonly Modal: TPrimitive;
|
|
89
|
+
readonly Toast: TPrimitive;
|
|
90
|
+
readonly Badge: TPrimitive;
|
|
91
|
+
readonly Card: TPrimitive;
|
|
92
|
+
readonly Icon: TPrimitive;
|
|
93
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Primitives-Contract — the minimal set of UI building blocks every
|
|
2
|
+
// renderer must provide. A "primitive" is a unit the standard-renderers
|
|
3
|
+
// (entityList, entityEdit, etc.) call into without knowing which library
|
|
4
|
+
// implements it. On web that's shadcn; on mobile it's react-native-paper;
|
|
5
|
+
// both packages (primitives-shadcn, primitives-paper) implement this
|
|
6
|
+
// contract and the app wires one of them into the renderer via context.
|
|
7
|
+
//
|
|
8
|
+
// Why a contract here (in ui-core) instead of in each renderer:
|
|
9
|
+
// ui-core's view-model builder and form-controller produce metadata
|
|
10
|
+
// (field-type, validation-state, label, placeholder) that the renderer
|
|
11
|
+
// translates into primitive invocations. Having the contract shape in
|
|
12
|
+
// ui-core means the metadata can carry references to primitives by name
|
|
13
|
+
// ("text-input", "select") and the translation is a pure map-lookup on
|
|
14
|
+
// the renderer side, not a switch statement that re-derives UI intent
|
|
15
|
+
// from entity-schema.
|
|
16
|
+
//
|
|
17
|
+
// Runtime-free: every primitive is expressed as its input contract only
|
|
18
|
+
// (what props it takes). Concrete components live in each primitives-*
|
|
19
|
+
// package and depend on React / React Native / etc.; ui-core never
|
|
20
|
+
// imports them.
|
|
21
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { StreamFrame } from "./types.js";
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import type { FieldIssue } from "@cosmicdrift/kumiko-framework/errors";
|
|
2
|
+
import type { Store } from "../store/index.ts";
|
|
3
|
+
export type { FieldIssue };
|
|
4
|
+
export type DispatcherError = {
|
|
5
|
+
readonly code: string;
|
|
6
|
+
readonly httpStatus: number;
|
|
7
|
+
readonly i18nKey: string;
|
|
8
|
+
readonly i18nParams?: Readonly<Record<string, unknown>>;
|
|
9
|
+
readonly message: string;
|
|
10
|
+
readonly details?: {
|
|
11
|
+
readonly fields?: readonly FieldIssue[];
|
|
12
|
+
} & Record<string, unknown>;
|
|
13
|
+
readonly docsUrl?: string;
|
|
14
|
+
readonly requestId?: string;
|
|
15
|
+
};
|
|
16
|
+
export type WriteResult<TData = unknown> = {
|
|
17
|
+
readonly isSuccess: true;
|
|
18
|
+
readonly data: TData;
|
|
19
|
+
} | {
|
|
20
|
+
readonly isSuccess: false;
|
|
21
|
+
readonly error: DispatcherError;
|
|
22
|
+
};
|
|
23
|
+
export type QueryResult<TData = unknown> = {
|
|
24
|
+
readonly isSuccess: true;
|
|
25
|
+
readonly data: TData;
|
|
26
|
+
} | {
|
|
27
|
+
readonly isSuccess: false;
|
|
28
|
+
readonly error: DispatcherError;
|
|
29
|
+
};
|
|
30
|
+
export type BatchResult = {
|
|
31
|
+
readonly isSuccess: true;
|
|
32
|
+
readonly results: readonly WriteResult[];
|
|
33
|
+
} | {
|
|
34
|
+
readonly isSuccess: false;
|
|
35
|
+
readonly error: DispatcherError;
|
|
36
|
+
readonly failedIndex: number;
|
|
37
|
+
readonly results: readonly WriteResult[];
|
|
38
|
+
};
|
|
39
|
+
export type Command = {
|
|
40
|
+
readonly type: string;
|
|
41
|
+
readonly payload: unknown;
|
|
42
|
+
};
|
|
43
|
+
export type DispatcherStatus = "online" | "offline" | "syncing";
|
|
44
|
+
export type PendingWrite = {
|
|
45
|
+
readonly id: string;
|
|
46
|
+
readonly type: string;
|
|
47
|
+
readonly payload: unknown;
|
|
48
|
+
readonly queuedAt: string;
|
|
49
|
+
readonly attempts: number;
|
|
50
|
+
readonly lastError?: DispatcherError;
|
|
51
|
+
};
|
|
52
|
+
export type PendingFile = {
|
|
53
|
+
readonly id: string;
|
|
54
|
+
readonly fileName: string;
|
|
55
|
+
readonly sizeBytes: number;
|
|
56
|
+
readonly queuedAt: string;
|
|
57
|
+
readonly attempts: number;
|
|
58
|
+
readonly progress?: number;
|
|
59
|
+
readonly lastError?: DispatcherError;
|
|
60
|
+
};
|
|
61
|
+
export type WriteOpts = {
|
|
62
|
+
readonly requestId?: string;
|
|
63
|
+
readonly signal?: AbortSignal;
|
|
64
|
+
};
|
|
65
|
+
export type QueryOpts = {
|
|
66
|
+
readonly signal?: AbortSignal;
|
|
67
|
+
};
|
|
68
|
+
export type StreamOpts = {
|
|
69
|
+
readonly signal?: AbortSignal;
|
|
70
|
+
};
|
|
71
|
+
export declare const StreamFrame: {
|
|
72
|
+
readonly chunk: "chunk";
|
|
73
|
+
readonly ping: "ping";
|
|
74
|
+
readonly done: "done";
|
|
75
|
+
readonly error: "error";
|
|
76
|
+
};
|
|
77
|
+
export type StreamFrameEvent = (typeof StreamFrame)[keyof typeof StreamFrame];
|
|
78
|
+
export type Dispatcher = {
|
|
79
|
+
write<TData = unknown>(type: string, payload: unknown, opts?: WriteOpts): Promise<WriteResult<TData>>;
|
|
80
|
+
query<TData = unknown>(type: string, payload: unknown, opts?: QueryOpts): Promise<QueryResult<TData>>;
|
|
81
|
+
batch(commands: readonly Command[], opts?: WriteOpts): Promise<BatchResult>;
|
|
82
|
+
stream<TChunk = unknown>(type: string, payload: unknown, opts?: StreamOpts): AsyncGenerator<TChunk, void, undefined>;
|
|
83
|
+
readonly statusStore: Store<DispatcherStatus>;
|
|
84
|
+
pendingWrites(): readonly PendingWrite[];
|
|
85
|
+
pendingFiles(): readonly PendingFile[];
|
|
86
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// Dispatcher Contract — the interface every client-side Dispatcher implements.
|
|
2
|
+
// Two implementations ship with Kumiko:
|
|
3
|
+
//
|
|
4
|
+
// - dispatcher-live: HTTP-only, always online. Writes go straight to
|
|
5
|
+
// /api/write or /api/batch; a failed network call is a failed write.
|
|
6
|
+
// Used on the web by default and on mobile when the app is "cockpit"-
|
|
7
|
+
// style (admin dashboards, back-office UIs).
|
|
8
|
+
//
|
|
9
|
+
// - dispatcher-savable: Local-first with an outbound queue. Writes land
|
|
10
|
+
// in a local store, the queue syncs when the network is back. Used on
|
|
11
|
+
// mobile and for PWA-style web apps.
|
|
12
|
+
//
|
|
13
|
+
// The UI code never reaches for either implementation directly — it takes
|
|
14
|
+
// a `Dispatcher` through a provider/context and calls `write` / `query` /
|
|
15
|
+
// `batch`. A feature-module can therefore be rendered identically on a
|
|
16
|
+
// live-online admin screen and on a mobile app that edits offline; the
|
|
17
|
+
// dispatcher choice is an app-level concern, not a feature-level one.
|
|
18
|
+
//
|
|
19
|
+
// Result shape: `{ isSuccess: true, data } | { isSuccess: false, error }`.
|
|
20
|
+
// Pattern matches the server's WriteResult but does not import it — this
|
|
21
|
+
// package stays free of @cosmicdrift/kumiko-framework so it runs in any JS runtime
|
|
22
|
+
// (browser, Expo/React Native, Web Worker). The HTTP dispatcher adapts
|
|
23
|
+
// the server response to this shape; the savable dispatcher synthesizes
|
|
24
|
+
// it from its own state machine. The shape is the boundary, not the
|
|
25
|
+
// internal detail.
|
|
26
|
+
// SSE frame event names for POST /api/stream — shared across the server route,
|
|
27
|
+
// the live-dispatcher wire parser, and their tests so a typo on one side
|
|
28
|
+
// fails the type-checker instead of the integration test.
|
|
29
|
+
export const StreamFrame = {
|
|
30
|
+
chunk: "chunk",
|
|
31
|
+
ping: "ping",
|
|
32
|
+
done: "done",
|
|
33
|
+
error: "error",
|
|
34
|
+
};
|