@xemahq/ui-kernel 0.9.2 → 0.11.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/lib/biome-host/agent-validation.d.ts.map +1 -1
- package/dist/lib/biome-host/agent-validation.js +26 -13
- package/dist/lib/biome-host/agent-validation.js.map +1 -1
- package/dist/lib/biome-host/biome-registry.d.ts.map +1 -1
- package/dist/lib/biome-host/biome-registry.js +27 -10
- package/dist/lib/biome-host/biome-registry.js.map +1 -1
- package/dist/lib/biome-host/biome-scope-hooks.d.ts.map +1 -1
- package/dist/lib/biome-host/biome-scope-hooks.js +2 -1
- package/dist/lib/biome-host/biome-scope-hooks.js.map +1 -1
- package/dist/lib/biome-host/biome-scoped-query.d.ts.map +1 -1
- package/dist/lib/biome-host/biome-scoped-query.js +5 -3
- package/dist/lib/biome-host/biome-scoped-query.js.map +1 -1
- package/dist/lib/biome-host/frontend-biome.d.ts +1 -1
- package/dist/lib/biome-host/frontend-biome.d.ts.map +1 -1
- package/dist/lib/biome-host/host-bridge.d.ts +1 -1
- package/dist/lib/biome-host/host-bridge.d.ts.map +1 -1
- package/dist/lib/biome-host/host-bridge.js.map +1 -1
- package/dist/lib/biome-host/i18n-hooks.d.ts.map +1 -1
- package/dist/lib/biome-host/i18n-hooks.js.map +1 -1
- package/dist/lib/biome-host/index.d.ts +0 -1
- package/dist/lib/biome-host/index.d.ts.map +1 -1
- package/dist/lib/biome-host/index.js +0 -1
- package/dist/lib/biome-host/index.js.map +1 -1
- package/dist/lib/biome-host/realtime-hooks.d.ts.map +1 -1
- package/dist/lib/biome-host/realtime-hooks.js.map +1 -1
- package/dist/lib/biome-host/session-contributions.d.ts +10 -5
- package/dist/lib/biome-host/session-contributions.d.ts.map +1 -1
- package/dist/lib/biome-host/use-mutation-with-error-toast.d.ts.map +1 -1
- package/dist/lib/biome-host/use-mutation-with-error-toast.js +3 -2
- package/dist/lib/biome-host/use-mutation-with-error-toast.js.map +1 -1
- package/dist/lib/biome-host/use-page-state.d.ts.map +1 -1
- package/dist/lib/biome-host/use-page-state.js +19 -10
- package/dist/lib/biome-host/use-page-state.js.map +1 -1
- package/dist/lib/capabilities/capability-provider.d.ts +1 -1
- package/dist/lib/capabilities/capability-provider.d.ts.map +1 -1
- package/dist/lib/capabilities/capability-provider.js +2 -2
- package/dist/lib/capabilities/capability-provider.js.map +1 -1
- package/dist/lib/capabilities/use-capability.d.ts +1 -1
- package/dist/lib/capabilities/use-capability.d.ts.map +1 -1
- package/dist/lib/capabilities/use-capability.js +2 -1
- package/dist/lib/capabilities/use-capability.js.map +1 -1
- package/dist/lib/contribution-registry/contribution-registry.d.ts.map +1 -1
- package/dist/lib/contribution-registry/contribution-registry.js +2 -1
- package/dist/lib/contribution-registry/contribution-registry.js.map +1 -1
- package/dist/lib/system-bus/deeplink.d.ts.map +1 -1
- package/dist/lib/system-bus/deeplink.js +4 -2
- package/dist/lib/system-bus/deeplink.js.map +1 -1
- package/dist/lib/system-bus/host-ports.d.ts +2 -2
- package/dist/lib/system-bus/host-ports.d.ts.map +1 -1
- package/dist/lib/system-bus/intent-registry.d.ts.map +1 -1
- package/dist/lib/system-bus/intent-registry.js +6 -3
- package/dist/lib/system-bus/intent-registry.js.map +1 -1
- package/dist/lib/system-bus/intents.d.ts +1 -1
- package/dist/lib/system-bus/intents.d.ts.map +1 -1
- package/dist/lib/system-bus/palette.d.ts +1 -1
- package/dist/lib/system-bus/palette.d.ts.map +1 -1
- package/dist/lib/system-bus/system-bus-builder.d.ts.map +1 -1
- package/dist/lib/system-bus/system-bus-builder.js +1 -1
- package/dist/lib/system-bus/system-bus-builder.js.map +1 -1
- package/dist/lib/system-bus/windows.d.ts +1 -1
- package/dist/lib/system-bus/windows.d.ts.map +1 -1
- package/dist/offline/outbox.d.ts +1 -0
- package/dist/offline/outbox.d.ts.map +1 -1
- package/dist/offline/outbox.js +4 -1
- package/dist/offline/outbox.js.map +1 -1
- package/dist/offline/react-hooks.d.ts +1 -1
- package/dist/offline/react-hooks.d.ts.map +1 -1
- package/dist/offline/react-hooks.js.map +1 -1
- package/dist/org-db/components/DbResultTable.d.ts.map +1 -1
- package/dist/org-db/components/DbResultTable.js +15 -6
- package/dist/org-db/components/DbResultTable.js.map +1 -1
- package/dist/registry/lib/agent-validation-host.d.ts.map +1 -1
- package/dist/registry/lib/agent-validation-host.js +1 -1
- package/dist/registry/lib/agent-validation-host.js.map +1 -1
- package/dist/registry/lib/biome-slot.d.ts.map +1 -1
- package/dist/registry/lib/biome-slot.js +5 -3
- package/dist/registry/lib/biome-slot.js.map +1 -1
- package/dist/registry/lib/primitives/SessionEventCard.d.ts.map +1 -1
- package/dist/registry/lib/primitives/SessionEventCard.js +14 -2
- package/dist/registry/lib/primitives/SessionEventCard.js.map +1 -1
- package/dist/registry/lib/primitives/SessionEventTimeline.d.ts.map +1 -1
- package/dist/registry/lib/primitives/SessionEventTimeline.js +6 -3
- package/dist/registry/lib/primitives/SessionEventTimeline.js.map +1 -1
- package/dist/registry/lib/primitives/SessionTabbedDrawer.d.ts.map +1 -1
- package/dist/registry/lib/primitives/SessionTabbedDrawer.js +10 -5
- package/dist/registry/lib/primitives/SessionTabbedDrawer.js.map +1 -1
- package/dist/registry/lib/session-context-builder.d.ts +10 -2
- package/dist/registry/lib/session-context-builder.d.ts.map +1 -1
- package/dist/registry/lib/session-context-builder.js +14 -7
- package/dist/registry/lib/session-context-builder.js.map +1 -1
- package/dist/registry/lib/session-context-provider.d.ts +1 -1
- package/dist/registry/lib/session-context-provider.d.ts.map +1 -1
- package/dist/registry/lib/session-context-provider.js.map +1 -1
- package/dist/registry/lib/session-selectors.d.ts.map +1 -1
- package/dist/registry/lib/session-selectors.js +35 -20
- package/dist/registry/lib/session-selectors.js.map +1 -1
- package/dist/session/comments/CommentRail.d.ts.map +1 -1
- package/dist/session/comments/CommentRail.js.map +1 -1
- package/dist/session/shell/SessionWorkspaceShell.d.ts.map +1 -1
- package/dist/session/shell/SessionWorkspaceShell.js.map +1 -1
- package/dist/session-kit/approvals/ApprovalCard.d.ts.map +1 -1
- package/dist/session-kit/approvals/ApprovalCard.js +6 -2
- package/dist/session-kit/approvals/ApprovalCard.js.map +1 -1
- package/dist/session-kit/approvals/ApprovalsCenter.d.ts.map +1 -1
- package/dist/session-kit/approvals/ApprovalsCenter.js +6 -3
- package/dist/session-kit/approvals/ApprovalsCenter.js.map +1 -1
- package/dist/session-kit/combobox/Combobox.d.ts.map +1 -1
- package/dist/session-kit/combobox/Combobox.js +20 -6
- package/dist/session-kit/combobox/Combobox.js.map +1 -1
- package/dist/session-kit/display/MD.d.ts.map +1 -1
- package/dist/session-kit/display/MD.js +7 -4
- package/dist/session-kit/display/MD.js.map +1 -1
- package/dist/ui/branding/app-branding-provider.d.ts.map +1 -1
- package/dist/ui/branding/app-branding-provider.js.map +1 -1
- package/dist/ui/branding/sanitize.d.ts.map +1 -1
- package/dist/ui/branding/sanitize.js +12 -6
- package/dist/ui/branding/sanitize.js.map +1 -1
- package/dist/ui/capture/document-preview.d.ts +1 -1
- package/dist/ui/capture/document-preview.d.ts.map +1 -1
- package/dist/ui/capture/document-preview.js +8 -6
- package/dist/ui/capture/document-preview.js.map +1 -1
- package/dist/ui/capture/field-spec-to-zod.d.ts.map +1 -1
- package/dist/ui/capture/field-spec-to-zod.js +45 -16
- package/dist/ui/capture/field-spec-to-zod.js.map +1 -1
- package/dist/ui/capture/field-spec-validate.d.ts.map +1 -1
- package/dist/ui/capture/field-spec-validate.js +79 -38
- package/dist/ui/capture/field-spec-validate.js.map +1 -1
- package/dist/ui/capture/field-spec.d.ts.map +1 -1
- package/dist/ui/capture/field-spec.js +17 -6
- package/dist/ui/capture/field-spec.js.map +1 -1
- package/dist/ui/capture/schema-field-input.d.ts.map +1 -1
- package/dist/ui/capture/schema-field-input.js +23 -18
- package/dist/ui/capture/schema-field-input.js.map +1 -1
- package/dist/ui/capture/schema-form.d.ts +1 -1
- package/dist/ui/capture/schema-form.d.ts.map +1 -1
- package/dist/ui/capture/schema-form.js +7 -6
- package/dist/ui/capture/schema-form.js.map +1 -1
- package/dist/ui/capture/use-prefill.d.ts.map +1 -1
- package/dist/ui/capture/use-prefill.js +32 -14
- package/dist/ui/capture/use-prefill.js.map +1 -1
- package/dist/ui/capture/use-schema-validation.d.ts +1 -1
- package/dist/ui/capture/use-schema-validation.d.ts.map +1 -1
- package/dist/ui/capture/use-schema-validation.js +13 -8
- package/dist/ui/capture/use-schema-validation.js.map +1 -1
- package/dist/ui/capture/use-wizard.d.ts.map +1 -1
- package/dist/ui/capture/use-wizard.js +23 -8
- package/dist/ui/capture/use-wizard.js.map +1 -1
- package/dist/ui/capture/value-format.d.ts.map +1 -1
- package/dist/ui/capture/value-format.js +6 -3
- package/dist/ui/capture/value-format.js.map +1 -1
- package/dist/ui/capture/wizard.d.ts.map +1 -1
- package/dist/ui/capture/wizard.js +3 -3
- package/dist/ui/capture/wizard.js.map +1 -1
- package/dist/ui/charts/bar-chart.d.ts +1 -1
- package/dist/ui/charts/bar-chart.d.ts.map +1 -1
- package/dist/ui/charts/bar-chart.js +1 -1
- package/dist/ui/charts/bar-chart.js.map +1 -1
- package/dist/ui/charts/chart-frame.d.ts +2 -2
- package/dist/ui/charts/chart-frame.d.ts.map +1 -1
- package/dist/ui/charts/chart-frame.js +4 -3
- package/dist/ui/charts/chart-frame.js.map +1 -1
- package/dist/ui/charts/chart-utils.d.ts.map +1 -1
- package/dist/ui/charts/chart-utils.js +32 -14
- package/dist/ui/charts/chart-utils.js.map +1 -1
- package/dist/ui/charts/donut-chart.d.ts +1 -1
- package/dist/ui/charts/donut-chart.d.ts.map +1 -1
- package/dist/ui/charts/donut-chart.js +7 -3
- package/dist/ui/charts/donut-chart.js.map +1 -1
- package/dist/ui/charts/line-chart.d.ts +1 -1
- package/dist/ui/charts/line-chart.d.ts.map +1 -1
- package/dist/ui/charts/line-chart.js +7 -4
- package/dist/ui/charts/line-chart.js.map +1 -1
- package/dist/ui/charts/sparkline.d.ts +1 -1
- package/dist/ui/charts/sparkline.d.ts.map +1 -1
- package/dist/ui/charts/sparkline.js +10 -6
- package/dist/ui/charts/sparkline.js.map +1 -1
- package/dist/ui/chrome/AsyncBoundary.d.ts +2 -2
- package/dist/ui/chrome/AsyncBoundary.d.ts.map +1 -1
- package/dist/ui/chrome/AsyncBoundary.js +3 -3
- package/dist/ui/chrome/AsyncBoundary.js.map +1 -1
- package/dist/ui/chrome/EmptyState.d.ts +19 -8
- package/dist/ui/chrome/EmptyState.d.ts.map +1 -1
- package/dist/ui/chrome/EmptyState.js +6 -4
- package/dist/ui/chrome/EmptyState.js.map +1 -1
- package/dist/ui/chrome/RecordCardList.d.ts +19 -0
- package/dist/ui/chrome/RecordCardList.d.ts.map +1 -0
- package/dist/ui/chrome/RecordCardList.js +12 -0
- package/dist/ui/chrome/RecordCardList.js.map +1 -0
- package/dist/ui/chrome/page-shell.d.ts.map +1 -1
- package/dist/ui/chrome/page-shell.js +9 -3
- package/dist/ui/chrome/page-shell.js.map +1 -1
- package/dist/ui/chrome/status-badge.d.ts.map +1 -1
- package/dist/ui/chrome/status-badge.js +1 -1
- package/dist/ui/chrome/status-badge.js.map +1 -1
- package/dist/ui/design-tokens.d.ts +4 -6
- package/dist/ui/design-tokens.d.ts.map +1 -1
- package/dist/ui/design-tokens.js +17 -11
- package/dist/ui/design-tokens.js.map +1 -1
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +1 -0
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/primitives/async-combobox.d.ts.map +1 -1
- package/dist/ui/primitives/async-combobox.js +4 -2
- package/dist/ui/primitives/async-combobox.js.map +1 -1
- package/dist/ui/primitives/badge.d.ts +2 -2
- package/dist/ui/primitives/badge.d.ts.map +1 -1
- package/dist/ui/primitives/badge.js +3 -3
- package/dist/ui/primitives/badge.js.map +1 -1
- package/dist/ui/primitives/button.d.ts +2 -2
- package/dist/ui/primitives/button.d.ts.map +1 -1
- package/dist/ui/primitives/button.js +5 -5
- package/dist/ui/primitives/button.js.map +1 -1
- package/dist/ui/primitives/overflow-tabs.d.ts.map +1 -1
- package/dist/ui/primitives/overflow-tabs.js +19 -12
- package/dist/ui/primitives/overflow-tabs.js.map +1 -1
- package/dist/ui/primitives/preview-device-frame.js +8 -4
- package/dist/ui/primitives/preview-device-frame.js.map +1 -1
- package/dist/ui/primitives/tag-multi-select.d.ts.map +1 -1
- package/dist/ui/primitives/tag-multi-select.js +10 -5
- package/dist/ui/primitives/tag-multi-select.js.map +1 -1
- package/dist/ui/primitives/url-preview-chrome.d.ts.map +1 -1
- package/dist/ui/primitives/url-preview-chrome.js.map +1 -1
- package/dist/vista/GenericCatalogueSurface.d.ts.map +1 -1
- package/dist/vista/GenericCatalogueSurface.js +5 -3
- package/dist/vista/GenericCatalogueSurface.js.map +1 -1
- package/dist/vista/VistaPanel.d.ts.map +1 -1
- package/dist/vista/VistaPanel.js +8 -4
- package/dist/vista/VistaPanel.js.map +1 -1
- package/dist/vista/html/CustomUiFrame.d.ts.map +1 -1
- package/dist/vista/html/CustomUiFrame.js +2 -1
- package/dist/vista/html/CustomUiFrame.js.map +1 -1
- package/dist/vista/html/custom-ui-frame-bridge.d.ts.map +1 -1
- package/dist/vista/html/custom-ui-frame-bridge.js +6 -3
- package/dist/vista/html/custom-ui-frame-bridge.js.map +1 -1
- package/dist/vista/html/custom-ui-intents.d.ts.map +1 -1
- package/dist/vista/html/custom-ui-intents.js +13 -15
- package/dist/vista/html/custom-ui-intents.js.map +1 -1
- package/dist/vista/surface-catalogue.d.ts.map +1 -1
- package/dist/vista/surface-catalogue.js +6 -3
- package/dist/vista/surface-catalogue.js.map +1 -1
- package/dist/vista/surfaces/FormSurface.d.ts.map +1 -1
- package/dist/vista/surfaces/FormSurface.js +20 -7
- package/dist/vista/surfaces/FormSurface.js.map +1 -1
- package/dist/vista/surfaces/TableSurface.d.ts.map +1 -1
- package/dist/vista/surfaces/TableSurface.js +2 -1
- package/dist/vista/surfaces/TableSurface.js.map +1 -1
- package/dist/vista/surfaces/blob-surfaces.d.ts.map +1 -1
- package/dist/vista/surfaces/blob-surfaces.js +7 -2
- package/dist/vista/surfaces/blob-surfaces.js.map +1 -1
- package/dist/vista/surfaces/elicitation-transport.d.ts.map +1 -1
- package/dist/vista/surfaces/elicitation-transport.js +14 -7
- package/dist/vista/surfaces/elicitation-transport.js.map +1 -1
- package/dist/vista/surfaces/file-surface-utils.d.ts.map +1 -1
- package/dist/vista/surfaces/file-surface-utils.js +8 -4
- package/dist/vista/surfaces/file-surface-utils.js.map +1 -1
- package/dist/vista/surfaces/register-surfaces.js +2 -1
- package/dist/vista/surfaces/register-surfaces.js.map +1 -1
- package/dist/vista/surfaces/text-surfaces.d.ts +1 -1
- package/dist/vista/surfaces/text-surfaces.d.ts.map +1 -1
- package/dist/vista/surfaces/text-surfaces.js +13 -7
- package/dist/vista/surfaces/text-surfaces.js.map +1 -1
- package/dist/vista/use-vista-tabs.d.ts.map +1 -1
- package/dist/vista/use-vista-tabs.js +8 -4
- package/dist/vista/use-vista-tabs.js.map +1 -1
- package/dist/vista/vista-code-renderer.d.ts.map +1 -1
- package/dist/vista/vista-code-renderer.js.map +1 -1
- package/dist/vista/vista-file-source.d.ts.map +1 -1
- package/dist/vista/vista-file-source.js +9 -5
- package/dist/vista/vista-file-source.js.map +1 -1
- package/dist/vista/vista-form-host.d.ts.map +1 -1
- package/dist/vista/vista-form-host.js +1 -1
- package/dist/vista/vista-form-host.js.map +1 -1
- package/dist/vista/vista-model.d.ts.map +1 -1
- package/dist/vista/vista-model.js +5 -3
- package/dist/vista/vista-model.js.map +1 -1
- package/dist/vista/vista-open-context.d.ts.map +1 -1
- package/dist/vista/vista-open-context.js +1 -1
- package/dist/vista/vista-open-context.js.map +1 -1
- package/dist/vista/vista-payloads.d.ts.map +1 -1
- package/dist/vista/vista-payloads.js +127 -63
- package/dist/vista/vista-payloads.js.map +1 -1
- package/dist/vista/vista-tabs-manifest.d.ts.map +1 -1
- package/dist/vista/vista-tabs-manifest.js +18 -9
- package/dist/vista/vista-tabs-manifest.js.map +1 -1
- package/dist/vista/vista-tools.d.ts.map +1 -1
- package/dist/vista/vista-tools.js +12 -6
- package/dist/vista/vista-tools.js.map +1 -1
- package/package.json +3 -3
- package/src/lib/biome-host/agent-validation.ts +37 -13
- package/src/lib/biome-host/biome-registry.ts +48 -13
- package/src/lib/biome-host/biome-scope-hooks.ts +3 -1
- package/src/lib/biome-host/biome-scoped-query.ts +7 -6
- package/src/lib/biome-host/frontend-biome.ts +1 -1
- package/src/lib/biome-host/host-bridge.ts +5 -4
- package/src/lib/biome-host/i18n-hooks.ts +1 -0
- package/src/lib/biome-host/index.ts +0 -1
- package/src/lib/biome-host/realtime-hooks.ts +1 -0
- package/src/lib/biome-host/session-contributions.ts +22 -19
- package/src/lib/biome-host/use-mutation-with-error-toast.ts +4 -2
- package/src/lib/biome-host/use-page-state.ts +27 -10
- package/src/lib/capabilities/capability-provider.tsx +12 -5
- package/src/lib/capabilities/use-capability.ts +8 -4
- package/src/lib/contribution-registry/contribution-registry.ts +3 -1
- package/src/lib/system-bus/deeplink.ts +14 -4
- package/src/lib/system-bus/host-ports.ts +3 -7
- package/src/lib/system-bus/intent-registry.ts +12 -8
- package/src/lib/system-bus/intents.ts +6 -2
- package/src/lib/system-bus/palette.ts +2 -1
- package/src/lib/system-bus/system-bus-builder.ts +4 -2
- package/src/lib/system-bus/windows.ts +1 -1
- package/src/offline/outbox.test.ts +12 -3
- package/src/offline/outbox.ts +5 -1
- package/src/offline/react-hooks.ts +5 -2
- package/src/org-db/components/DbResultTable.tsx +48 -15
- package/src/registry/lib/agent-validation-host.ts +1 -2
- package/src/registry/lib/biome-slot.tsx +7 -4
- package/src/registry/lib/primitives/SessionEventCard.tsx +29 -5
- package/src/registry/lib/primitives/SessionEventTimeline.tsx +9 -3
- package/src/registry/lib/primitives/SessionTabbedDrawer.tsx +15 -5
- package/src/registry/lib/session-context-builder.ts +33 -17
- package/src/registry/lib/session-context-provider.tsx +1 -1
- package/src/registry/lib/session-selectors.ts +66 -27
- package/src/session/comments/CommentRail.tsx +2 -2
- package/src/session/shell/SessionWorkspaceShell.tsx +2 -2
- package/src/session-kit/approvals/ApprovalCard.tsx +7 -2
- package/src/session-kit/approvals/ApprovalsCenter.tsx +13 -4
- package/src/session-kit/combobox/Combobox.tsx +42 -11
- package/src/session-kit/display/MD.tsx +14 -5
- package/src/ui/branding/app-branding-provider.tsx +2 -3
- package/src/ui/branding/sanitize.ts +18 -6
- package/src/ui/capture/document-preview.tsx +84 -19
- package/src/ui/capture/field-spec-to-zod.ts +62 -14
- package/src/ui/capture/field-spec-validate.ts +132 -43
- package/src/ui/capture/field-spec.test.ts +2 -2
- package/src/ui/capture/field-spec.ts +41 -10
- package/src/ui/capture/schema-field-input.tsx +218 -38
- package/src/ui/capture/schema-form.tsx +54 -13
- package/src/ui/capture/use-prefill.ts +50 -17
- package/src/ui/capture/use-schema-validation.ts +45 -13
- package/src/ui/capture/use-wizard.ts +57 -11
- package/src/ui/capture/value-format.ts +14 -4
- package/src/ui/capture/wizard.tsx +9 -5
- package/src/ui/charts/bar-chart.tsx +8 -4
- package/src/ui/charts/chart-frame.tsx +18 -5
- package/src/ui/charts/chart-utils.ts +47 -15
- package/src/ui/charts/donut-chart.tsx +24 -6
- package/src/ui/charts/line-chart.tsx +34 -12
- package/src/ui/charts/sparkline.tsx +17 -9
- package/src/ui/chrome/AsyncBoundary.tsx +14 -6
- package/src/ui/chrome/EmptyState.tsx +116 -43
- package/src/ui/chrome/RecordCardList.tsx +98 -0
- package/src/ui/chrome/page-shell.tsx +32 -8
- package/src/ui/chrome/status-badge.tsx +8 -4
- package/src/ui/design-tokens.ts +39 -13
- package/src/ui/index.ts +5 -0
- package/src/ui/primitives/async-combobox.tsx +7 -3
- package/src/ui/primitives/badge.tsx +14 -5
- package/src/ui/primitives/button.tsx +13 -6
- package/src/ui/primitives/overflow-tabs.tsx +46 -16
- package/src/ui/primitives/preview-device-frame.tsx +12 -4
- package/src/ui/primitives/tag-multi-select.tsx +30 -9
- package/src/ui/primitives/url-preview-chrome.tsx +1 -0
- package/src/vista/GenericCatalogueSurface.tsx +7 -5
- package/src/vista/VistaPanel.tsx +12 -4
- package/src/vista/html/CustomUiFrame.spec.tsx +3 -1
- package/src/vista/html/CustomUiFrame.tsx +3 -1
- package/src/vista/html/custom-ui-frame-bridge.ts +9 -3
- package/src/vista/html/custom-ui-intents.spec.ts +3 -1
- package/src/vista/html/custom-ui-intents.ts +19 -15
- package/src/vista/surface-catalogue.ts +9 -3
- package/src/vista/surfaces/FormSurface.tsx +27 -10
- package/src/vista/surfaces/TableSurface.tsx +4 -3
- package/src/vista/surfaces/blob-surfaces.tsx +13 -3
- package/src/vista/surfaces/elicitation-transport.ts +21 -7
- package/src/vista/surfaces/file-surface-utils.ts +11 -4
- package/src/vista/surfaces/register-surfaces.tsx +3 -1
- package/src/vista/surfaces/text-surfaces.tsx +21 -8
- package/src/vista/use-vista-tabs.ts +12 -4
- package/src/vista/vista-code-renderer.tsx +6 -5
- package/src/vista/vista-file-source.tsx +15 -14
- package/src/vista/vista-form-host.tsx +3 -8
- package/src/vista/vista-model.ts +10 -3
- package/src/vista/vista-open-context.tsx +3 -8
- package/src/vista/vista-payloads.ts +186 -63
- package/src/vista/vista-tabs-manifest.ts +28 -13
- package/src/vista/vista-tools.ts +18 -6
- package/dist/lib/biome-host/session-profiles.d.ts +0 -18
- package/dist/lib/biome-host/session-profiles.d.ts.map +0 -1
- package/dist/lib/biome-host/session-profiles.js +0 -38
- package/dist/lib/biome-host/session-profiles.js.map +0 -1
- package/src/lib/biome-host/session-profiles.ts +0 -105
|
@@ -29,7 +29,9 @@ function BlobBody({
|
|
|
29
29
|
payload: VistaBlobPayload;
|
|
30
30
|
render: (url: string) => ReactNode;
|
|
31
31
|
}>): ReactElement {
|
|
32
|
-
if (payload.url !== undefined)
|
|
32
|
+
if (payload.url !== undefined) {
|
|
33
|
+
return <>{render(payload.url)}</>;
|
|
34
|
+
}
|
|
33
35
|
// `validateBlobPayload` guarantees exactly one of url/path.
|
|
34
36
|
return <VistaFileUrl path={payload.path as string} render={render} />;
|
|
35
37
|
}
|
|
@@ -51,7 +53,11 @@ export function ImageSurface(payload: VistaBlobPayload): ReactElement {
|
|
|
51
53
|
<img
|
|
52
54
|
src={url}
|
|
53
55
|
alt={payload.alt ?? 'Preview'}
|
|
54
|
-
style={{
|
|
56
|
+
style={{
|
|
57
|
+
maxWidth: '100%',
|
|
58
|
+
maxHeight: '100%',
|
|
59
|
+
objectFit: 'contain',
|
|
60
|
+
}}
|
|
55
61
|
/>
|
|
56
62
|
</div>
|
|
57
63
|
)}
|
|
@@ -113,7 +119,11 @@ export function MediaSurface(payload: VistaBlobPayload): ReactElement {
|
|
|
113
119
|
>
|
|
114
120
|
{isAudio ? (
|
|
115
121
|
// eslint-disable-next-line jsx-a11y/media-has-caption
|
|
116
|
-
<audio
|
|
122
|
+
<audio
|
|
123
|
+
src={url}
|
|
124
|
+
controls
|
|
125
|
+
style={{ width: '100%', maxWidth: 520 }}
|
|
126
|
+
/>
|
|
117
127
|
) : (
|
|
118
128
|
// eslint-disable-next-line jsx-a11y/media-has-caption
|
|
119
129
|
<video
|
|
@@ -66,7 +66,9 @@ function asRecord(value: unknown): UnknownRecord | null {
|
|
|
66
66
|
*/
|
|
67
67
|
function unwrapEnvelope(body: unknown): UnknownRecord | null {
|
|
68
68
|
const record = asRecord(body);
|
|
69
|
-
if (record === null)
|
|
69
|
+
if (record === null) {
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
70
72
|
const inner = asRecord(record.data);
|
|
71
73
|
return inner ?? record;
|
|
72
74
|
}
|
|
@@ -82,14 +84,20 @@ export function extractServiceMessage(body: unknown, status: number): string {
|
|
|
82
84
|
record === null
|
|
83
85
|
? undefined
|
|
84
86
|
: (record.message ?? asRecord(record.error)?.message ?? record.error);
|
|
85
|
-
if (typeof candidate === 'string' && candidate.length > 0)
|
|
87
|
+
if (typeof candidate === 'string' && candidate.length > 0) {
|
|
88
|
+
return candidate;
|
|
89
|
+
}
|
|
86
90
|
if (Array.isArray(candidate)) {
|
|
87
91
|
const joined = candidate
|
|
88
92
|
.filter((m): m is string => typeof m === 'string')
|
|
89
93
|
.join(' ');
|
|
90
|
-
if (joined.length > 0)
|
|
94
|
+
if (joined.length > 0) {
|
|
95
|
+
return joined;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
if (typeof body === 'string' && body.length > 0) {
|
|
99
|
+
return body;
|
|
91
100
|
}
|
|
92
|
-
if (typeof body === 'string' && body.length > 0) return body;
|
|
93
101
|
return `The service rejected the submission (HTTP ${status}).`;
|
|
94
102
|
}
|
|
95
103
|
|
|
@@ -112,11 +120,15 @@ async function readBody(response: Response): Promise<unknown> {
|
|
|
112
120
|
*/
|
|
113
121
|
function toOutcome(body: unknown, ref: string): VistaFormOutcome | null {
|
|
114
122
|
const record = unwrapEnvelope(body);
|
|
115
|
-
if (record === null)
|
|
123
|
+
if (record === null) {
|
|
124
|
+
return null;
|
|
125
|
+
}
|
|
116
126
|
const submitted =
|
|
117
127
|
record.submitted === true ||
|
|
118
128
|
(typeof record.status === 'string' && record.status === 'submitted');
|
|
119
|
-
if (!submitted)
|
|
129
|
+
if (!submitted) {
|
|
130
|
+
return null;
|
|
131
|
+
}
|
|
120
132
|
const connectionId =
|
|
121
133
|
typeof record.connectionId === 'string' && record.connectionId.length > 0
|
|
122
134
|
? record.connectionId
|
|
@@ -133,7 +145,9 @@ function authHeaders(
|
|
|
133
145
|
Authorization: `Bearer ${accessToken}`,
|
|
134
146
|
Accept: 'application/json',
|
|
135
147
|
};
|
|
136
|
-
if (json)
|
|
148
|
+
if (json) {
|
|
149
|
+
headers['Content-Type'] = 'application/json';
|
|
150
|
+
}
|
|
137
151
|
return headers;
|
|
138
152
|
}
|
|
139
153
|
|
|
@@ -37,8 +37,12 @@ export interface VistaFileGroup {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
function compareDirs(a: string, b: string): number {
|
|
40
|
-
if (a === '')
|
|
41
|
-
|
|
40
|
+
if (a === '') {
|
|
41
|
+
return -1;
|
|
42
|
+
}
|
|
43
|
+
if (b === '') {
|
|
44
|
+
return 1;
|
|
45
|
+
}
|
|
42
46
|
return a.localeCompare(b);
|
|
43
47
|
}
|
|
44
48
|
|
|
@@ -50,8 +54,11 @@ export function groupFilesByFolder(
|
|
|
50
54
|
const slash = file.path.lastIndexOf('/');
|
|
51
55
|
const dir = slash < 0 ? '' : file.path.slice(0, slash);
|
|
52
56
|
const bucket = groups.get(dir);
|
|
53
|
-
if (bucket)
|
|
54
|
-
|
|
57
|
+
if (bucket) {
|
|
58
|
+
bucket.push(file);
|
|
59
|
+
} else {
|
|
60
|
+
groups.set(dir, [file]);
|
|
61
|
+
}
|
|
55
62
|
}
|
|
56
63
|
return [...groups.keys()].sort(compareDirs).map((dir) => ({
|
|
57
64
|
dir,
|
|
@@ -60,7 +60,9 @@ import {
|
|
|
60
60
|
*/
|
|
61
61
|
function validateMediaPayload(raw: unknown): VistaBlobPayload | null {
|
|
62
62
|
const payload = validateBlobPayload(raw);
|
|
63
|
-
if (payload === null)
|
|
63
|
+
if (payload === null) {
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
64
66
|
return payload.contentType === undefined ? null : payload;
|
|
65
67
|
}
|
|
66
68
|
|
|
@@ -35,7 +35,9 @@ function TextBody({
|
|
|
35
35
|
payload: VistaTextPayload;
|
|
36
36
|
render: (content: string) => ReactNode;
|
|
37
37
|
}>): ReactElement {
|
|
38
|
-
if (payload.content !== undefined)
|
|
38
|
+
if (payload.content !== undefined) {
|
|
39
|
+
return <>{render(payload.content)}</>;
|
|
40
|
+
}
|
|
39
41
|
// `validateTextPayload` guarantees exactly one of content/path.
|
|
40
42
|
return <VistaFileText path={payload.path as string} render={render} />;
|
|
41
43
|
}
|
|
@@ -73,10 +75,13 @@ export function CodeSurface(payload: VistaTextPayload): ReactElement {
|
|
|
73
75
|
* parses and shown VERBATIM when it does not (a malformed JSON file is shown as
|
|
74
76
|
* it is, never swallowed).
|
|
75
77
|
*/
|
|
76
|
-
export function JsonSurface({
|
|
78
|
+
export function JsonSurface({
|
|
79
|
+
data,
|
|
80
|
+
}: Readonly<{ data: unknown }>): ReactElement {
|
|
77
81
|
let text: string;
|
|
78
82
|
try {
|
|
79
|
-
|
|
83
|
+
const serialized: unknown = JSON.stringify(data, null, 2);
|
|
84
|
+
text = typeof serialized === 'string' ? serialized : String(data);
|
|
80
85
|
} catch {
|
|
81
86
|
text = String(data);
|
|
82
87
|
}
|
|
@@ -89,10 +94,18 @@ export function JsonSurface({ data }: Readonly<{ data: unknown }>): ReactElement
|
|
|
89
94
|
|
|
90
95
|
/** Colour a unified-diff line by its leading marker. */
|
|
91
96
|
function diffLineColor(line: string): string | undefined {
|
|
92
|
-
if (line.startsWith('+++') || line.startsWith('---'))
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
if (line.startsWith('
|
|
97
|
+
if (line.startsWith('+++') || line.startsWith('---')) {
|
|
98
|
+
return 'hsl(var(--ink-3))';
|
|
99
|
+
}
|
|
100
|
+
if (line.startsWith('@@')) {
|
|
101
|
+
return 'hsl(var(--info))';
|
|
102
|
+
}
|
|
103
|
+
if (line.startsWith('+')) {
|
|
104
|
+
return 'hsl(var(--success))';
|
|
105
|
+
}
|
|
106
|
+
if (line.startsWith('-')) {
|
|
107
|
+
return 'hsl(var(--destructive, var(--danger)))';
|
|
108
|
+
}
|
|
96
109
|
return undefined;
|
|
97
110
|
}
|
|
98
111
|
|
|
@@ -105,7 +118,7 @@ export function DiffSurface(payload: VistaTextPayload): ReactElement {
|
|
|
105
118
|
{content.split('\n').map((line, index) => (
|
|
106
119
|
<div
|
|
107
120
|
// A diff has no stable per-line identity other than its position.
|
|
108
|
-
|
|
121
|
+
|
|
109
122
|
key={index}
|
|
110
123
|
style={{ color: diffLineColor(line) }}
|
|
111
124
|
>
|
|
@@ -128,14 +128,18 @@ export function useVistaTabs({
|
|
|
128
128
|
activeRef.current = activeTabId;
|
|
129
129
|
|
|
130
130
|
const activate = useCallback((tabId: string): void => {
|
|
131
|
-
if (!tabsRef.current.some((t) => t.tabId === tabId))
|
|
131
|
+
if (!tabsRef.current.some((t) => t.tabId === tabId)) {
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
132
134
|
setActiveTabId(tabId);
|
|
133
135
|
}, []);
|
|
134
136
|
|
|
135
137
|
const open = useCallback((surface: VistaTab): string => {
|
|
136
138
|
setOpenedTabs((prev) => {
|
|
137
139
|
const index = prev.findIndex((t) => t.tabId === surface.tabId);
|
|
138
|
-
if (index === -1)
|
|
140
|
+
if (index === -1) {
|
|
141
|
+
return [...prev, surface];
|
|
142
|
+
}
|
|
139
143
|
// Re-opening the same tabId REPLACES it (the `VistaSurface` contract).
|
|
140
144
|
const next = [...prev];
|
|
141
145
|
next[index] = surface;
|
|
@@ -153,7 +157,9 @@ export function useVistaTabs({
|
|
|
153
157
|
// overwritten on the next reconcile, so it is REFUSED rather than
|
|
154
158
|
// silently lost. Ownership is decided synchronously from the ref, not
|
|
155
159
|
// inside the state updater (which React may invoke twice).
|
|
156
|
-
if (!openedTabsRef.current.some((t) => t.tabId === tabId))
|
|
160
|
+
if (!openedTabsRef.current.some((t) => t.tabId === tabId)) {
|
|
161
|
+
return false;
|
|
162
|
+
}
|
|
157
163
|
setOpenedTabs((prev) =>
|
|
158
164
|
prev.map((tab) => (tab.tabId === tabId ? { ...tab, ...patch } : tab)),
|
|
159
165
|
);
|
|
@@ -164,7 +170,9 @@ export function useVistaTabs({
|
|
|
164
170
|
|
|
165
171
|
const close = useCallback((tabId: string): boolean => {
|
|
166
172
|
const tab = tabsRef.current.find((t) => t.tabId === tabId);
|
|
167
|
-
if (tab === undefined || tab.pinned === true)
|
|
173
|
+
if (tab === undefined || tab.pinned === true) {
|
|
174
|
+
return false;
|
|
175
|
+
}
|
|
168
176
|
setOpenedTabs((prev) => prev.filter((t) => t.tabId !== tabId));
|
|
169
177
|
setClosedHostTabIds((prev) =>
|
|
170
178
|
prev.includes(tabId) ? prev : [...prev, tabId],
|
|
@@ -13,10 +13,8 @@
|
|
|
13
13
|
* pane is the intended rendering, and with a provider the host's renderer is
|
|
14
14
|
* the intended rendering. Neither is an error path.
|
|
15
15
|
*/
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
type ReactNode,
|
|
19
|
-
} from 'react';
|
|
16
|
+
import { type ReactElement, type ReactNode } from 'react';
|
|
17
|
+
|
|
20
18
|
import {
|
|
21
19
|
VistaCodeRendererContext,
|
|
22
20
|
type VistaCodeRenderer,
|
|
@@ -25,7 +23,10 @@ import {
|
|
|
25
23
|
export function VistaCodeRendererProvider({
|
|
26
24
|
renderer,
|
|
27
25
|
children,
|
|
28
|
-
}: Readonly<{
|
|
26
|
+
}: Readonly<{
|
|
27
|
+
renderer: VistaCodeRenderer;
|
|
28
|
+
children: ReactNode;
|
|
29
|
+
}>): ReactElement {
|
|
29
30
|
return (
|
|
30
31
|
<VistaCodeRendererContext.Provider value={renderer}>
|
|
31
32
|
{children}
|
|
@@ -12,12 +12,8 @@
|
|
|
12
12
|
* provider renders a visible error, never a blank pane and never a silent
|
|
13
13
|
* "content unavailable".
|
|
14
14
|
*/
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
useState,
|
|
18
|
-
type ReactElement,
|
|
19
|
-
type ReactNode,
|
|
20
|
-
} from 'react';
|
|
15
|
+
import { useEffect, useState, type ReactElement, type ReactNode } from 'react';
|
|
16
|
+
|
|
21
17
|
import {
|
|
22
18
|
VistaFileSourceContext,
|
|
23
19
|
useVistaFileSource,
|
|
@@ -43,10 +39,7 @@ type LoadState =
|
|
|
43
39
|
|
|
44
40
|
const LOADING: LoadState = { status: 'loading' };
|
|
45
41
|
|
|
46
|
-
function useResolvedFile(
|
|
47
|
-
path: string,
|
|
48
|
-
mode: 'text' | 'url',
|
|
49
|
-
): LoadState {
|
|
42
|
+
function useResolvedFile(path: string, mode: 'text' | 'url'): LoadState {
|
|
50
43
|
const source = useVistaFileSource();
|
|
51
44
|
const revision = source?.revision;
|
|
52
45
|
const [state, setState] = useState<LoadState>(LOADING);
|
|
@@ -66,10 +59,14 @@ function useResolvedFile(
|
|
|
66
59
|
mode === 'text' ? source.readText(path) : source.resolveUrl(path);
|
|
67
60
|
promise.then(
|
|
68
61
|
(value) => {
|
|
69
|
-
if (!cancelled)
|
|
62
|
+
if (!cancelled) {
|
|
63
|
+
setState({ status: 'ready', value });
|
|
64
|
+
}
|
|
70
65
|
},
|
|
71
66
|
(error: unknown) => {
|
|
72
|
-
if (cancelled)
|
|
67
|
+
if (cancelled) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
73
70
|
setState({
|
|
74
71
|
status: 'error',
|
|
75
72
|
message: error instanceof Error ? error.message : String(error),
|
|
@@ -122,7 +119,9 @@ export function VistaFileText({
|
|
|
122
119
|
render: (content: string) => ReactNode;
|
|
123
120
|
}>): ReactElement {
|
|
124
121
|
const state = useResolvedFile(path, 'text');
|
|
125
|
-
if (state.status !== 'ready')
|
|
122
|
+
if (state.status !== 'ready') {
|
|
123
|
+
return <LoadNotice state={state} />;
|
|
124
|
+
}
|
|
126
125
|
return <>{render(state.value)}</>;
|
|
127
126
|
}
|
|
128
127
|
|
|
@@ -135,6 +134,8 @@ export function VistaFileUrl({
|
|
|
135
134
|
render: (url: string) => ReactNode;
|
|
136
135
|
}>): ReactElement {
|
|
137
136
|
const state = useResolvedFile(path, 'url');
|
|
138
|
-
if (state.status !== 'ready')
|
|
137
|
+
if (state.status !== 'ready') {
|
|
138
|
+
return <LoadNotice state={state} />;
|
|
139
|
+
}
|
|
139
140
|
return <>{render(state.value)}</>;
|
|
140
141
|
}
|
|
@@ -26,14 +26,9 @@
|
|
|
26
26
|
* provider renders a visible refusal and cannot submit. Fail-closed — a form
|
|
27
27
|
* that silently posts nowhere would be worse than one that says it cannot.
|
|
28
28
|
*/
|
|
29
|
-
import {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
} from 'react';
|
|
33
|
-
import {
|
|
34
|
-
VistaFormHostContext,
|
|
35
|
-
type VistaFormHost,
|
|
36
|
-
} from './vista-form-context';
|
|
29
|
+
import { type ReactElement, type ReactNode } from 'react';
|
|
30
|
+
|
|
31
|
+
import { VistaFormHostContext, type VistaFormHost } from './vista-form-context';
|
|
37
32
|
|
|
38
33
|
/**
|
|
39
34
|
* Everything a settled elicitation reports. Closed, scalar-only, and
|
package/src/vista/vista-model.ts
CHANGED
|
@@ -22,7 +22,10 @@
|
|
|
22
22
|
* `<biomeId>:tests` kind rather than a first-party one. Nothing in the tree
|
|
23
23
|
* rendered it (the thin workspace's `renderTests` slot was never supplied).
|
|
24
24
|
*/
|
|
25
|
-
import {
|
|
25
|
+
import {
|
|
26
|
+
SurfaceKind,
|
|
27
|
+
type VistaSurface,
|
|
28
|
+
} from '@xemahq/kernel-contracts/surface';
|
|
26
29
|
|
|
27
30
|
/**
|
|
28
31
|
* Id of the pinned, UI-owned file-browser tab. It is owned by the panel, never
|
|
@@ -74,7 +77,9 @@ const EXTENSION_KIND: Readonly<Record<string, SurfaceKind>> = {
|
|
|
74
77
|
*/
|
|
75
78
|
export function surfaceKindForPath(path: string): SurfaceKind {
|
|
76
79
|
const dot = path.lastIndexOf('.');
|
|
77
|
-
if (dot === -1)
|
|
80
|
+
if (dot === -1) {
|
|
81
|
+
return SurfaceKind.Code;
|
|
82
|
+
}
|
|
78
83
|
const ext = path.slice(dot + 1).toLowerCase();
|
|
79
84
|
return EXTENSION_KIND[ext] ?? SurfaceKind.Code;
|
|
80
85
|
}
|
|
@@ -101,7 +106,9 @@ const EXTENSION_CONTENT_TYPE: Readonly<Record<string, string>> = {
|
|
|
101
106
|
/** Content type for a path, or `null` when the extension is unknown. */
|
|
102
107
|
export function contentTypeForPath(path: string): string | null {
|
|
103
108
|
const dot = path.lastIndexOf('.');
|
|
104
|
-
if (dot === -1)
|
|
109
|
+
if (dot === -1) {
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
105
112
|
return EXTENSION_CONTENT_TYPE[path.slice(dot + 1).toLowerCase()] ?? null;
|
|
106
113
|
}
|
|
107
114
|
|
|
@@ -11,14 +11,9 @@
|
|
|
11
11
|
* (`useVistaOpen()` returns `null`) — an inert list, never a dead click that
|
|
12
12
|
* silently does nothing.
|
|
13
13
|
*/
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} from 'react';
|
|
18
|
-
import {
|
|
19
|
-
VistaOpenContext,
|
|
20
|
-
type VistaOpenFn,
|
|
21
|
-
} from './vista-open-state';
|
|
14
|
+
import { type ReactElement, type ReactNode } from 'react';
|
|
15
|
+
|
|
16
|
+
import { VistaOpenContext, type VistaOpenFn } from './vista-open-state';
|
|
22
17
|
|
|
23
18
|
export function VistaOpenProvider({
|
|
24
19
|
open,
|