@sixb/app 0.1.13 → 0.1.15
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 +6 -0
- package/dist/agent/activity-label.d.ts.map +1 -1
- package/dist/agent/agent-chat.d.ts +1 -1
- package/dist/agent/agent-chat.d.ts.map +1 -1
- package/dist/agent/agent-context-provider.d.ts +1 -0
- package/dist/agent/agent-context-provider.d.ts.map +1 -1
- package/dist/agent/approvals.d.ts +110 -0
- package/dist/agent/approvals.d.ts.map +1 -0
- package/dist/agent/artifact-panel.d.ts +11 -7
- package/dist/agent/artifact-panel.d.ts.map +1 -1
- package/dist/agent/bash/bash-tool-view.d.ts +13 -0
- package/dist/agent/bash/bash-tool-view.d.ts.map +1 -1
- package/dist/agent/bash/interpret.d.ts +46 -2
- package/dist/agent/bash/interpret.d.ts.map +1 -1
- package/dist/agent/bash/model-media-view.d.ts +14 -0
- package/dist/agent/bash/model-media-view.d.ts.map +1 -0
- package/dist/agent/bash/shell.d.ts.map +1 -1
- package/dist/agent/components/agent-message-body.d.ts +21 -0
- package/dist/agent/components/agent-message-body.d.ts.map +1 -0
- package/dist/agent/components/agent-thread-switcher.d.ts +22 -1
- package/dist/agent/components/agent-thread-switcher.d.ts.map +1 -1
- package/dist/agent/components/approval-card.d.ts +17 -0
- package/dist/agent/components/approval-card.d.ts.map +1 -0
- package/dist/agent/components/approval-mode-chip.d.ts +17 -0
- package/dist/agent/components/approval-mode-chip.d.ts.map +1 -0
- package/dist/agent/components/auto-model-chip.d.ts +24 -0
- package/dist/agent/components/auto-model-chip.d.ts.map +1 -0
- package/dist/agent/components/composer.d.ts +21 -2
- package/dist/agent/components/composer.d.ts.map +1 -1
- package/dist/agent/components/context-chips.d.ts +4 -2
- package/dist/agent/components/context-chips.d.ts.map +1 -1
- package/dist/agent/components/conversation-panel.d.ts +13 -55
- package/dist/agent/components/conversation-panel.d.ts.map +1 -1
- package/dist/agent/components/message-parts.d.ts +17 -3
- package/dist/agent/components/message-parts.d.ts.map +1 -1
- package/dist/agent/components/message-view.d.ts +19 -21
- package/dist/agent/components/message-view.d.ts.map +1 -1
- package/dist/agent/components/model-controls.d.ts +8 -2
- package/dist/agent/components/model-controls.d.ts.map +1 -1
- package/dist/agent/components/model-picker-row.d.ts +5 -1
- package/dist/agent/components/model-picker-row.d.ts.map +1 -1
- package/dist/agent/components/participant-input.d.ts +29 -0
- package/dist/agent/components/participant-input.d.ts.map +1 -0
- package/dist/agent/components/provider-logo.d.ts +5 -4
- package/dist/agent/components/provider-logo.d.ts.map +1 -1
- package/dist/agent/components/reasoning-effort-slider.d.ts +8 -7
- package/dist/agent/components/reasoning-effort-slider.d.ts.map +1 -1
- package/dist/agent/components/sandbox-recovery.d.ts +8 -2
- package/dist/agent/components/sandbox-recovery.d.ts.map +1 -1
- package/dist/agent/components/shared-thread-notice.d.ts +10 -0
- package/dist/agent/components/shared-thread-notice.d.ts.map +1 -0
- package/dist/agent/components/thread-artifacts-menu.d.ts +8 -2
- package/dist/agent/components/thread-artifacts-menu.d.ts.map +1 -1
- package/dist/agent/components/thread-people.d.ts +24 -0
- package/dist/agent/components/thread-people.d.ts.map +1 -0
- package/dist/agent/components/transcript.d.ts +22 -29
- package/dist/agent/components/transcript.d.ts.map +1 -1
- package/dist/agent/conversation.d.ts +201 -0
- package/dist/agent/conversation.d.ts.map +1 -0
- package/dist/agent/delegation/child-card.d.ts +19 -0
- package/dist/agent/delegation/child-card.d.ts.map +1 -0
- package/dist/agent/delegation/child-cards.d.ts +9 -0
- package/dist/agent/delegation/child-cards.d.ts.map +1 -0
- package/dist/agent/delegation/child-group.d.ts +14 -0
- package/dist/agent/delegation/child-group.d.ts.map +1 -0
- package/dist/agent/delegation/child-parts.d.ts +50 -0
- package/dist/agent/delegation/child-parts.d.ts.map +1 -0
- package/dist/agent/delegation/child-work.d.ts +31 -0
- package/dist/agent/delegation/child-work.d.ts.map +1 -0
- package/dist/agent/delegation/context.d.ts +22 -0
- package/dist/agent/delegation/context.d.ts.map +1 -0
- package/dist/agent/delegation/interpret.d.ts +104 -0
- package/dist/agent/delegation/interpret.d.ts.map +1 -0
- package/dist/agent/delegation/model.d.ts +52 -0
- package/dist/agent/delegation/model.d.ts.map +1 -0
- package/dist/agent/delegation/use-children.d.ts +1007 -0
- package/dist/agent/delegation/use-children.d.ts.map +1 -0
- package/dist/agent/hooks/use-agent-conversation.d.ts +692 -131
- package/dist/agent/hooks/use-agent-conversation.d.ts.map +1 -1
- package/dist/agent/hooks/use-thread-sharing.d.ts +35 -0
- package/dist/agent/hooks/use-thread-sharing.d.ts.map +1 -0
- package/dist/agent/i18n/en.d.ts +313 -0
- package/dist/agent/i18n/en.d.ts.map +1 -1
- package/dist/agent/i18n/fr.d.ts.map +1 -1
- package/dist/agent/i18n/index.d.ts +608 -0
- package/dist/agent/i18n/index.d.ts.map +1 -1
- package/dist/agent/live-run.d.ts.map +1 -1
- package/dist/agent/memory-paths.d.ts +18 -0
- package/dist/agent/memory-paths.d.ts.map +1 -0
- package/dist/agent/message-agent/interpret.d.ts +21 -0
- package/dist/agent/message-agent/interpret.d.ts.map +1 -0
- package/dist/agent/message-authors.d.ts +56 -0
- package/dist/agent/message-authors.d.ts.map +1 -0
- package/dist/agent/model-selection.d.ts +10 -0
- package/dist/agent/model-selection.d.ts.map +1 -1
- package/dist/agent/observed-conversation.d.ts +26 -0
- package/dist/agent/observed-conversation.d.ts.map +1 -0
- package/dist/agent/observed-thread.d.ts +9 -0
- package/dist/agent/observed-thread.d.ts.map +1 -0
- package/dist/agent/parts.d.ts +5 -0
- package/dist/agent/parts.d.ts.map +1 -1
- package/dist/agent/publish-artifact/use-live-publishes.d.ts +5 -2
- package/dist/agent/publish-artifact/use-live-publishes.d.ts.map +1 -1
- package/dist/agent/read/interpret.d.ts +2 -0
- package/dist/agent/read/interpret.d.ts.map +1 -1
- package/dist/agent/run-presentation.d.ts +11 -0
- package/dist/agent/run-presentation.d.ts.map +1 -1
- package/dist/agent/sharing.d.ts +42 -0
- package/dist/agent/sharing.d.ts.map +1 -0
- package/dist/agent/tool-views/built-in.d.ts +5 -0
- package/dist/agent/tool-views/built-in.d.ts.map +1 -0
- package/dist/agent/tool-views/define.d.ts +79 -0
- package/dist/agent/tool-views/define.d.ts.map +1 -0
- package/dist/agent/tool-views/registry.d.ts +28 -0
- package/dist/agent/tool-views/registry.d.ts.map +1 -0
- package/dist/agent/utils/radio-group.d.ts +11 -0
- package/dist/agent/utils/radio-group.d.ts.map +1 -0
- package/dist/artifacts/card-details.d.ts.map +1 -1
- package/dist/artifacts/card-preview.d.ts.map +1 -1
- package/dist/artifacts/downloads.d.ts +26 -0
- package/dist/artifacts/downloads.d.ts.map +1 -0
- package/dist/artifacts/edit-session.d.ts +36 -0
- package/dist/artifacts/edit-session.d.ts.map +1 -0
- package/dist/artifacts/file-source.d.ts +27 -1
- package/dist/artifacts/file-source.d.ts.map +1 -1
- package/dist/artifacts/file-type-icon.d.ts +14 -0
- package/dist/artifacts/file-type-icon.d.ts.map +1 -0
- package/dist/artifacts/frame-embeds.d.ts +20 -0
- package/dist/artifacts/frame-embeds.d.ts.map +1 -0
- package/dist/artifacts/frame.d.ts +12 -1
- package/dist/artifacts/frame.d.ts.map +1 -1
- package/dist/artifacts/gallery.d.ts.map +1 -1
- package/dist/artifacts/history.d.ts +15 -0
- package/dist/artifacts/history.d.ts.map +1 -0
- package/dist/artifacts/kind-icon.d.ts +7 -0
- package/dist/artifacts/kind-icon.d.ts.map +1 -1
- package/dist/artifacts/messages.d.ts +518 -4
- package/dist/artifacts/messages.d.ts.map +1 -1
- package/dist/artifacts/page-queries.d.ts +22 -0
- package/dist/artifacts/page-queries.d.ts.map +1 -0
- package/dist/artifacts/page-state.d.ts +21 -0
- package/dist/artifacts/page-state.d.ts.map +1 -0
- package/dist/artifacts/people.d.ts +12 -0
- package/dist/artifacts/people.d.ts.map +1 -0
- package/dist/artifacts/person-avatar.d.ts +23 -0
- package/dist/artifacts/person-avatar.d.ts.map +1 -0
- package/dist/artifacts/publish-edit.d.ts +29 -0
- package/dist/artifacts/publish-edit.d.ts.map +1 -0
- package/dist/artifacts/queries.d.ts +77 -1
- package/dist/artifacts/queries.d.ts.map +1 -1
- package/dist/artifacts/references/references.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/arrows.d.ts +21 -0
- package/dist/artifacts/renderers/canvas/arrows.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/board.d.ts +54 -0
- package/dist/artifacts/renderers/canvas/board.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/canvas.d.ts +27 -0
- package/dist/artifacts/renderers/canvas/canvas.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/controls.d.ts +8 -0
- package/dist/artifacts/renderers/canvas/controls.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/draft.d.ts +77 -0
- package/dist/artifacts/renderers/canvas/draft.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/edit-mode.d.ts +55 -0
- package/dist/artifacts/renderers/canvas/edit-mode.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/editing.d.ts +40 -0
- package/dist/artifacts/renderers/canvas/editing.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/focus.d.ts +15 -0
- package/dist/artifacts/renderers/canvas/focus.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/items.d.ts +13 -0
- package/dist/artifacts/renderers/canvas/items.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/layout.d.ts +46 -0
- package/dist/artifacts/renderers/canvas/layout.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/renderer.d.ts +13 -0
- package/dist/artifacts/renderers/canvas/renderer.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/thumbnail.d.ts +10 -0
- package/dist/artifacts/renderers/canvas/thumbnail.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/toolbar.d.ts +15 -0
- package/dist/artifacts/renderers/canvas/toolbar.d.ts.map +1 -0
- package/dist/artifacts/renderers/notice.d.ts.map +1 -1
- package/dist/artifacts/renderers/page.d.ts +34 -0
- package/dist/artifacts/renderers/page.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/cell-editor.d.ts +21 -0
- package/dist/artifacts/renderers/sheet/cell-editor.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/cells.d.ts +93 -0
- package/dist/artifacts/renderers/sheet/cells.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/chart-data.d.ts +27 -7
- package/dist/artifacts/renderers/sheet/chart-data.d.ts.map +1 -1
- package/dist/artifacts/renderers/sheet/chart-icon.d.ts +5 -0
- package/dist/artifacts/renderers/sheet/chart-icon.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/chart-locked.d.ts +9 -0
- package/dist/artifacts/renderers/sheet/chart-locked.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/chart.d.ts +2 -1
- package/dist/artifacts/renderers/sheet/chart.d.ts.map +1 -1
- package/dist/artifacts/renderers/sheet/column-format.d.ts +28 -0
- package/dist/artifacts/renderers/sheet/column-format.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/column-menu.d.ts +51 -0
- package/dist/artifacts/renderers/sheet/column-menu.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/downloads.d.ts +10 -0
- package/dist/artifacts/renderers/sheet/downloads.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/draft.d.ts +131 -0
- package/dist/artifacts/renderers/sheet/draft.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/filter-panel.d.ts +20 -0
- package/dist/artifacts/renderers/sheet/filter-panel.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/filter.d.ts +40 -0
- package/dist/artifacts/renderers/sheet/filter.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/find-bar.d.ts +42 -0
- package/dist/artifacts/renderers/sheet/find-bar.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/find.d.ts +18 -0
- package/dist/artifacts/renderers/sheet/find.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/fit.d.ts +15 -0
- package/dist/artifacts/renderers/sheet/fit.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/format.d.ts +14 -6
- package/dist/artifacts/renderers/sheet/format.d.ts.map +1 -1
- package/dist/artifacts/renderers/sheet/frame.d.ts +69 -0
- package/dist/artifacts/renderers/sheet/frame.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/grid.d.ts +69 -6
- package/dist/artifacts/renderers/sheet/grid.d.ts.map +1 -1
- package/dist/artifacts/renderers/sheet/highlight.d.ts +32 -0
- package/dist/artifacts/renderers/sheet/highlight.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/input.d.ts +30 -0
- package/dist/artifacts/renderers/sheet/input.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/locked.d.ts +17 -0
- package/dist/artifacts/renderers/sheet/locked.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/mini-chart.d.ts.map +1 -1
- package/dist/artifacts/renderers/sheet/model.d.ts +26 -4
- package/dist/artifacts/renderers/sheet/model.d.ts.map +1 -1
- package/dist/artifacts/renderers/sheet/selection.d.ts +30 -6
- package/dist/artifacts/renderers/sheet/selection.d.ts.map +1 -1
- package/dist/artifacts/renderers/sheet/sheet.d.ts +5 -5
- package/dist/artifacts/renderers/sheet/sheet.d.ts.map +1 -1
- package/dist/artifacts/renderers/sheet/totals.d.ts +16 -0
- package/dist/artifacts/renderers/sheet/totals.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/view.d.ts +44 -0
- package/dist/artifacts/renderers/sheet/view.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/workbook.d.ts +23 -3
- package/dist/artifacts/renderers/sheet/workbook.d.ts.map +1 -1
- package/dist/artifacts/renderers/sheet/xlsx.d.ts +18 -0
- package/dist/artifacts/renderers/sheet/xlsx.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/zip.d.ts +12 -0
- package/dist/artifacts/renderers/sheet/zip.d.ts.map +1 -0
- package/dist/artifacts/renderers/slides/slides.d.ts.map +1 -1
- package/dist/artifacts/tones.d.ts +4 -0
- package/dist/artifacts/tones.d.ts.map +1 -0
- package/dist/artifacts/viewer.d.ts +2 -0
- package/dist/artifacts/viewer.d.ts.map +1 -1
- package/dist/auth.d.ts +6 -1
- package/dist/auth.d.ts.map +1 -1
- package/dist/{chunk-gn3k23q5.js → chunk-53z5653y.js} +64 -3
- package/dist/chunk-53z5653y.js.map +11 -0
- package/dist/{chunk-3schcf10.js → chunk-736c9akn.js} +1 -1
- package/dist/{chunk-g3f4cm8x.js → chunk-k4epnkcr.js} +1 -1
- package/dist/{chunk-c7gy61rx.js → chunk-n0cxwvej.js} +165 -4
- package/dist/chunk-n0cxwvej.js.map +10 -0
- package/dist/chunk-qh1panvd.js +1487 -0
- package/dist/chunk-qh1panvd.js.map +18 -0
- package/dist/{chunk-ng0hdnrq.js → chunk-sw3pyqgy.js} +3 -1
- package/dist/chunk-sw3pyqgy.js.map +10 -0
- package/dist/chunk-twjs2sb9.js +29401 -0
- package/dist/chunk-twjs2sb9.js.map +176 -0
- package/dist/codegen.d.ts.map +1 -1
- package/dist/createCustomApp.d.ts +1 -0
- package/dist/createCustomApp.d.ts.map +1 -1
- package/dist/index.d.ts +18 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +51 -9
- package/dist/index.js.map +6 -6
- package/dist/locale-messages.d.ts +1 -0
- package/dist/locale-messages.d.ts.map +1 -1
- package/dist/locale.d.ts +1 -0
- package/dist/locale.d.ts.map +1 -1
- package/dist/locale.js +1 -1
- package/dist/metadata.d.ts.map +1 -1
- package/dist/pages/observability/action-run.d.ts.map +1 -1
- package/dist/pages/observability/activity/messages.d.ts +14 -0
- package/dist/pages/observability/activity/messages.d.ts.map +1 -1
- package/dist/pages/observability/activity/thread.d.ts +6 -0
- package/dist/pages/observability/activity/thread.d.ts.map +1 -0
- package/dist/pages/observability/activity/timeline.d.ts.map +1 -1
- package/dist/pages/observability/ai-usage/calls.d.ts.map +1 -1
- package/dist/pages/observability/ai-usage/format.d.ts +16 -5
- package/dist/pages/observability/ai-usage/format.d.ts.map +1 -1
- package/dist/pages/observability/ai-usage/kinds.d.ts +40 -0
- package/dist/pages/observability/ai-usage/kinds.d.ts.map +1 -0
- package/dist/pages/observability/ai-usage/messages.d.ts +74 -12
- package/dist/pages/observability/ai-usage/messages.d.ts.map +1 -1
- package/dist/pages/observability/ai-usage/page.d.ts.map +1 -1
- package/dist/pages/observability/messages.d.ts +4 -0
- package/dist/pages/observability/messages.d.ts.map +1 -1
- package/dist/pages/ontology/actions.d.ts.map +1 -1
- package/dist/pages/ontology/components/action-button.d.ts +6 -0
- package/dist/pages/ontology/components/action-button.d.ts.map +1 -1
- package/dist/pages/ontology/components/user-picker.d.ts +37 -0
- package/dist/pages/ontology/components/user-picker.d.ts.map +1 -0
- package/dist/pages/ontology/workflows/run-input-form.d.ts.map +1 -1
- package/dist/pages/routes.d.ts +2 -0
- package/dist/pages/routes.d.ts.map +1 -1
- package/dist/pages/section-page.d.ts +13 -0
- package/dist/pages/section-page.d.ts.map +1 -1
- package/dist/pages/section-ui.d.ts.map +1 -1
- package/dist/pages/settings/controls.d.ts.map +1 -1
- package/dist/pages/settings/members.d.ts.map +1 -1
- package/dist/pages/settings/memory-contents.d.ts +30 -0
- package/dist/pages/settings/memory-contents.d.ts.map +1 -0
- package/dist/pages/settings/memory-entries.d.ts +42 -0
- package/dist/pages/settings/memory-entries.d.ts.map +1 -0
- package/dist/pages/settings/memory-files.d.ts +49 -0
- package/dist/pages/settings/memory-files.d.ts.map +1 -0
- package/dist/pages/settings/memory-history.d.ts +8 -0
- package/dist/pages/settings/memory-history.d.ts.map +1 -0
- package/dist/pages/settings/memory.d.ts +21 -0
- package/dist/pages/settings/memory.d.ts.map +1 -0
- package/dist/pages/settings/messages.d.ts +206 -0
- package/dist/pages/settings/messages.d.ts.map +1 -1
- package/dist/pages/settings/personal.d.ts +2 -2
- package/dist/pages/settings/personal.d.ts.map +1 -1
- package/dist/pages/settings/sessions.d.ts.map +1 -1
- package/dist/pages/values.d.ts +1 -0
- package/dist/pages/values.d.ts.map +1 -1
- package/dist/pages.d.ts +13 -16
- package/dist/pages.d.ts.map +1 -1
- package/dist/pages.js +6766 -4391
- package/dist/pages.js.map +34 -28
- package/dist/sections/catalog.d.ts.map +1 -1
- package/dist/sections/sections.d.ts.map +1 -1
- package/dist/server.js +79 -44
- package/dist/server.js.map +5 -5
- package/package.json +4 -4
- package/src/agent/activity-label.ts +17 -2
- package/src/agent/agent-chat.tsx +81 -111
- package/src/agent/agent-context-provider.tsx +1 -0
- package/src/agent/agent-panel.tsx +4 -0
- package/src/agent/agent-surface.tsx +4 -0
- package/src/agent/agent.css +115 -3
- package/src/agent/approvals.ts +267 -0
- package/src/agent/artifact-panel.tsx +131 -46
- package/src/agent/bash/bash-tool-view.tsx +98 -6
- package/src/agent/bash/interpret.ts +265 -3
- package/src/agent/bash/model-media-view.tsx +474 -0
- package/src/agent/bash/shell.ts +3 -2
- package/src/agent/components/activity-status.tsx +1 -1
- package/src/agent/components/agent-message-body.tsx +56 -0
- package/src/agent/components/agent-threads.tsx +377 -0
- package/src/agent/components/approval-card.tsx +849 -0
- package/src/agent/components/approval-mode-chip.tsx +120 -0
- package/src/agent/components/auto-model-chip.tsx +219 -0
- package/src/agent/components/composer-menu.tsx +185 -0
- package/src/agent/components/composer.tsx +95 -30
- package/src/agent/components/context-chips.tsx +6 -7
- package/src/agent/components/conversation-panel.tsx +38 -180
- package/src/agent/components/file-attachment-card.tsx +5 -2
- package/src/agent/components/message-parts.tsx +190 -59
- package/src/agent/components/message-view.tsx +289 -228
- package/src/agent/components/model-controls.tsx +162 -128
- package/src/agent/components/model-picker-row.tsx +50 -11
- package/src/agent/components/participant-input.tsx +293 -0
- package/src/agent/components/provider-logo.tsx +6 -1
- package/src/agent/components/reasoning-effort-slider.tsx +37 -35
- package/src/agent/components/sandbox-recovery.tsx +24 -5
- package/src/agent/components/shared-thread-notice.tsx +34 -0
- package/src/agent/components/thread-artifacts-menu.tsx +29 -12
- package/src/agent/components/thread-people.tsx +551 -0
- package/src/agent/components/threads-button.tsx +70 -0
- package/src/agent/components/transcript.tsx +343 -147
- package/src/agent/conversation.ts +658 -0
- package/src/agent/delegation/child-card.tsx +338 -0
- package/src/agent/delegation/child-cards.tsx +141 -0
- package/src/agent/delegation/child-group.tsx +231 -0
- package/src/agent/delegation/child-parts.tsx +286 -0
- package/src/agent/delegation/child-work.tsx +198 -0
- package/src/agent/delegation/context.ts +28 -0
- package/src/agent/delegation/interpret.ts +379 -0
- package/src/agent/delegation/model.ts +235 -0
- package/src/agent/delegation/use-children.ts +235 -0
- package/src/agent/hooks/use-agent-conversation.ts +803 -125
- package/src/agent/hooks/use-people-suggestions.ts +90 -0
- package/src/agent/hooks/use-thread-lists.ts +77 -0
- package/src/agent/hooks/use-thread-sharing.ts +197 -0
- package/src/agent/i18n/en.ts +355 -20
- package/src/agent/i18n/fr.ts +371 -32
- package/src/agent/live-run.ts +23 -40
- package/src/agent/memory-paths.ts +41 -0
- package/src/agent/message-agent/interpret.ts +60 -0
- package/src/agent/message-authors.ts +115 -0
- package/src/agent/model-selection.ts +15 -0
- package/src/agent/observed-conversation.tsx +210 -0
- package/src/agent/observed-thread.ts +13 -0
- package/src/agent/parts.ts +23 -0
- package/src/agent/publish-artifact/use-live-publishes.ts +5 -2
- package/src/agent/react-router.tsx +48 -5
- package/src/agent/read/interpret.ts +18 -0
- package/src/agent/read/read-tool-view.tsx +2 -2
- package/src/agent/run-presentation.ts +41 -1
- package/src/agent/sharing.ts +95 -0
- package/src/agent/thread-navigation.ts +16 -0
- package/src/agent/thread-pages.ts +24 -0
- package/src/agent/tool-views/built-in.tsx +56 -0
- package/src/agent/tool-views/define.ts +150 -0
- package/src/agent/tool-views/registry.tsx +125 -0
- package/src/agent/utils/radio-group.ts +29 -0
- package/src/artifacts/artifacts.css +96 -0
- package/src/artifacts/card-details.ts +9 -1
- package/src/artifacts/card-preview.tsx +23 -12
- package/src/artifacts/downloads.tsx +130 -0
- package/src/artifacts/edit-session.tsx +115 -0
- package/src/artifacts/file-source.ts +94 -4
- package/src/artifacts/file-type-icon.tsx +114 -0
- package/src/artifacts/frame-embeds.tsx +113 -0
- package/src/artifacts/frame.tsx +143 -19
- package/src/artifacts/gallery.tsx +3 -0
- package/src/artifacts/history.ts +42 -0
- package/src/artifacts/kind-icon.tsx +31 -1
- package/src/artifacts/messages.ts +601 -16
- package/src/artifacts/page-queries.ts +80 -0
- package/src/artifacts/page-state.ts +211 -0
- package/src/artifacts/people.ts +19 -0
- package/src/artifacts/person-avatar.tsx +40 -0
- package/src/artifacts/publish-edit.ts +90 -0
- package/src/artifacts/queries.ts +242 -5
- package/src/artifacts/references/references.tsx +219 -18
- package/src/artifacts/renderers/canvas/arrows.tsx +134 -0
- package/src/artifacts/renderers/canvas/board.tsx +108 -0
- package/src/artifacts/renderers/canvas/canvas.tsx +195 -0
- package/src/artifacts/renderers/canvas/controls.tsx +75 -0
- package/src/artifacts/renderers/canvas/draft.ts +322 -0
- package/src/artifacts/renderers/canvas/edit-mode.tsx +301 -0
- package/src/artifacts/renderers/canvas/editing.tsx +187 -0
- package/src/artifacts/renderers/canvas/focus.tsx +128 -0
- package/src/artifacts/renderers/canvas/items.tsx +380 -0
- package/src/artifacts/renderers/canvas/layout.ts +132 -0
- package/src/artifacts/renderers/canvas/renderer.tsx +110 -0
- package/src/artifacts/renderers/canvas/thumbnail.tsx +144 -0
- package/src/artifacts/renderers/canvas/toolbar.tsx +316 -0
- package/src/artifacts/renderers/notice.tsx +3 -1
- package/src/artifacts/renderers/page.tsx +152 -0
- package/src/artifacts/renderers/sheet/cell-editor.tsx +125 -0
- package/src/artifacts/renderers/sheet/cells.tsx +462 -0
- package/src/artifacts/renderers/sheet/chart-data.ts +124 -14
- package/src/artifacts/renderers/sheet/chart-icon.ts +18 -0
- package/src/artifacts/renderers/sheet/chart-locked.tsx +30 -0
- package/src/artifacts/renderers/sheet/chart.tsx +153 -3
- package/src/artifacts/renderers/sheet/column-format.tsx +413 -0
- package/src/artifacts/renderers/sheet/column-menu.tsx +198 -0
- package/src/artifacts/renderers/sheet/downloads.tsx +88 -0
- package/src/artifacts/renderers/sheet/draft.ts +589 -0
- package/src/artifacts/renderers/sheet/filter-panel.tsx +255 -0
- package/src/artifacts/renderers/sheet/filter.ts +182 -0
- package/src/artifacts/renderers/sheet/find-bar.tsx +177 -0
- package/src/artifacts/renderers/sheet/find.ts +50 -0
- package/src/artifacts/renderers/sheet/fit.ts +54 -0
- package/src/artifacts/renderers/sheet/format.ts +48 -7
- package/src/artifacts/renderers/sheet/frame.tsx +531 -0
- package/src/artifacts/renderers/sheet/grid.tsx +1266 -287
- package/src/artifacts/renderers/sheet/highlight.ts +83 -0
- package/src/artifacts/renderers/sheet/input.ts +191 -0
- package/src/artifacts/renderers/sheet/locked.ts +112 -0
- package/src/artifacts/renderers/sheet/mini-chart.tsx +72 -4
- package/src/artifacts/renderers/sheet/model.ts +69 -8
- package/src/artifacts/renderers/sheet/selection.ts +136 -9
- package/src/artifacts/renderers/sheet/sheet.tsx +440 -264
- package/src/artifacts/renderers/sheet/totals.ts +54 -0
- package/src/artifacts/renderers/sheet/view.ts +96 -0
- package/src/artifacts/renderers/sheet/workbook.ts +107 -8
- package/src/artifacts/renderers/sheet/xlsx.ts +516 -0
- package/src/artifacts/renderers/sheet/zip.ts +108 -0
- package/src/artifacts/renderers/slides/slides.tsx +3 -55
- package/src/artifacts/tones.ts +14 -0
- package/src/artifacts/viewer.tsx +915 -96
- package/src/auth.ts +8 -2
- package/src/codegen.ts +29 -12
- package/src/createCustomApp.ts +72 -24
- package/src/index.ts +76 -2
- package/src/locale-messages.ts +2 -0
- package/src/metadata.ts +16 -3
- package/src/pages/home.tsx +3 -1
- package/src/pages/observability/action-run.tsx +5 -1
- package/src/pages/observability/activity/messages.ts +16 -0
- package/src/pages/observability/activity/thread.tsx +150 -0
- package/src/pages/observability/activity/timeline.tsx +40 -3
- package/src/pages/observability/ai-usage/calls.tsx +63 -19
- package/src/pages/observability/ai-usage/format.ts +61 -8
- package/src/pages/observability/ai-usage/kinds.tsx +156 -0
- package/src/pages/observability/ai-usage/messages.ts +91 -14
- package/src/pages/observability/ai-usage/page.tsx +157 -48
- package/src/pages/observability/messages.ts +3 -0
- package/src/pages/ontology/actions.tsx +25 -4
- package/src/pages/ontology/components/action-button.tsx +53 -17
- package/src/pages/ontology/components/user-picker.tsx +161 -0
- package/src/pages/ontology/object-type.tsx +6 -0
- package/src/pages/ontology/workflows/run-input-form.tsx +12 -1
- package/src/pages/routes.ts +5 -0
- package/src/pages/section-page.tsx +27 -0
- package/src/pages/section-ui.tsx +3 -2
- package/src/pages/settings/controls.tsx +10 -2
- package/src/pages/settings/members.tsx +1 -5
- package/src/pages/settings/memory-contents.tsx +173 -0
- package/src/pages/settings/memory-entries.ts +112 -0
- package/src/pages/settings/memory-files.ts +195 -0
- package/src/pages/settings/memory-history.tsx +560 -0
- package/src/pages/settings/memory.tsx +993 -0
- package/src/pages/settings/messages.ts +231 -2
- package/src/pages/settings/personal.tsx +247 -27
- package/src/pages/settings/service-accounts.tsx +1 -1
- package/src/pages/settings/sessions.tsx +1 -4
- package/src/pages/values.tsx +88 -11
- package/src/pages.ts +21 -27
- package/src/sections/catalog.ts +18 -1
- package/src/sections/sections.tsx +2 -0
- package/src/shell/agent-dock.tsx +4 -2
- package/dist/chunk-c7gy61rx.js.map +0 -10
- package/dist/chunk-gn3k23q5.js.map +0 -10
- package/dist/chunk-ng0hdnrq.js.map +0 -10
- package/dist/chunk-xxpdn63v.js +0 -15018
- package/dist/chunk-xxpdn63v.js.map +0 -105
- package/src/agent/agents-page.ts +0 -7
- package/src/agent/components/agent-thread-switcher.tsx +0 -346
- /package/dist/{chunk-3schcf10.js.map → chunk-736c9akn.js.map} +0 -0
- /package/dist/{chunk-g3f4cm8x.js.map → chunk-k4epnkcr.js.map} +0 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { type CsvTable, type FormulaType, type SheetColumnFormat, type SheetTotal, type Workbook, type WorkbookSheet } from "@sixb/core/artifacts";
|
|
2
|
+
import type { CellInput } from "./input";
|
|
3
|
+
import { type SheetModel } from "./model";
|
|
4
|
+
/**
|
|
5
|
+
* A workbook as a person is editing it: its layout, and the tables of the sheets they changed,
|
|
6
|
+
* over the version they started from. A draft never changes; each edit makes the next one, so a
|
|
7
|
+
* row nobody touched is the very array the version's table holds.
|
|
8
|
+
*/
|
|
9
|
+
export interface WorkbookDraft {
|
|
10
|
+
/** The version's workbook, which the draft started from. */
|
|
11
|
+
readonly original: Workbook;
|
|
12
|
+
readonly workbook: Workbook;
|
|
13
|
+
/** The sheets changed, by name, each table whole. */
|
|
14
|
+
readonly tables: ReadonlyMap<string, CsvTable>;
|
|
15
|
+
}
|
|
16
|
+
/** A value to store in a cell: its data row (the table's row index from 0) and column. */
|
|
17
|
+
export interface CellEdit {
|
|
18
|
+
readonly row: number;
|
|
19
|
+
readonly column: number;
|
|
20
|
+
readonly value: string;
|
|
21
|
+
}
|
|
22
|
+
/** Why a change to a column can't be made, in terms the reader can act on. */
|
|
23
|
+
export type ColumnRefusal = {
|
|
24
|
+
readonly refused: "name-empty";
|
|
25
|
+
} | {
|
|
26
|
+
readonly refused: "name-taken";
|
|
27
|
+
readonly name: string;
|
|
28
|
+
}
|
|
29
|
+
/** A chart plots the column, so it can't go. */
|
|
30
|
+
| {
|
|
31
|
+
readonly refused: "charted";
|
|
32
|
+
readonly by: string;
|
|
33
|
+
}
|
|
34
|
+
/** Another column's formula reads it. */
|
|
35
|
+
| {
|
|
36
|
+
readonly refused: "computed-from";
|
|
37
|
+
readonly by: string;
|
|
38
|
+
}
|
|
39
|
+
/** Values that don't fit the type asked for. */
|
|
40
|
+
| {
|
|
41
|
+
readonly refused: "values";
|
|
42
|
+
readonly count: number;
|
|
43
|
+
}
|
|
44
|
+
/** A formula that doesn't parse, or names what the sheet lacks: the parser's words. */
|
|
45
|
+
| {
|
|
46
|
+
readonly refused: "formula";
|
|
47
|
+
readonly message: string;
|
|
48
|
+
}
|
|
49
|
+
/** A formula whose result the column's type can't show. */
|
|
50
|
+
| {
|
|
51
|
+
readonly refused: "formula-type";
|
|
52
|
+
readonly computes: FormulaType;
|
|
53
|
+
}
|
|
54
|
+
/** Columns that would compute from each other. */
|
|
55
|
+
| {
|
|
56
|
+
readonly refused: "formula-cycle";
|
|
57
|
+
}
|
|
58
|
+
/** A change that would leave the sheet one publishing refuses: the rule broken, in its words. */
|
|
59
|
+
| {
|
|
60
|
+
readonly refused: "invalid";
|
|
61
|
+
readonly message: string;
|
|
62
|
+
};
|
|
63
|
+
/** A column's name and form, as the column's settings set them. */
|
|
64
|
+
export interface ColumnSettings {
|
|
65
|
+
readonly name: string;
|
|
66
|
+
readonly format: SheetColumnFormat;
|
|
67
|
+
readonly description?: string;
|
|
68
|
+
readonly total?: SheetTotal;
|
|
69
|
+
}
|
|
70
|
+
export declare function startDraft(workbook: Workbook): WorkbookDraft;
|
|
71
|
+
/** A sheet's table in the draft: as edited, or the version's when the draft hasn't changed it. */
|
|
72
|
+
export declare function draftTable(draft: WorkbookDraft, sheet: string, base: CsvTable): CsvTable;
|
|
73
|
+
/** A sheet's layout in the draft: its formats, widths, totals, and descriptions as edited. */
|
|
74
|
+
export declare function draftSheet(draft: WorkbookDraft, sheet: string): WorkbookSheet | undefined;
|
|
75
|
+
/**
|
|
76
|
+
* Stores values in a sheet's cells. A value the cell already holds changes nothing. `grow` adds
|
|
77
|
+
* empty rows at the end and columns at the right first, as a paste past the sheet's edge does,
|
|
78
|
+
* so edits may name rows and columns past the table's.
|
|
79
|
+
*/
|
|
80
|
+
export declare function setCells(draft: WorkbookDraft, sheet: string, base: CsvTable, edits: readonly CellEdit[], grow?: {
|
|
81
|
+
readonly rows: number;
|
|
82
|
+
readonly columns: number;
|
|
83
|
+
}): WorkbookDraft;
|
|
84
|
+
/** Adds empty rows before a data row; at the table's length, after the last. */
|
|
85
|
+
export declare function insertRows(draft: WorkbookDraft, sheet: string, base: CsvTable, at: number, count: number): WorkbookDraft;
|
|
86
|
+
/** Removes data rows; a sheet keeps at least its header. */
|
|
87
|
+
export declare function deleteRows(draft: WorkbookDraft, sheet: string, base: CsvTable, rows: readonly number[]): WorkbookDraft;
|
|
88
|
+
/** Adds an empty text column before a column; at the column count, after the last. */
|
|
89
|
+
export declare function insertColumn(draft: WorkbookDraft, sheet: string, base: CsvTable, at: number): WorkbookDraft;
|
|
90
|
+
/**
|
|
91
|
+
* Removes a column, with its format, width, total, and description. A column a chart plots or a
|
|
92
|
+
* formula reads is refused, naming the chart or the column: removing it would break them.
|
|
93
|
+
*/
|
|
94
|
+
export declare function deleteColumn(draft: WorkbookDraft, sheet: string, base: CsvTable, column: number): WorkbookDraft | ColumnRefusal;
|
|
95
|
+
/**
|
|
96
|
+
* Sets a column's name and form as one change. A new name carries the column's format, width,
|
|
97
|
+
* total, and description, and every chart and formula that names it. A new type converts the
|
|
98
|
+
* values that read as it, and is refused when any don't; a formula is checked against the sheet's
|
|
99
|
+
* columns and computes the column's values from then on; taking a formula away keeps the values it
|
|
100
|
+
* computed. A change the sheet's charts or other formulas can't take is refused, as publishing
|
|
101
|
+
* would refuse it. `read` reads a value as the new type stores it.
|
|
102
|
+
*/
|
|
103
|
+
export declare function setColumn(draft: WorkbookDraft, sheet: string, base: CsvTable, column: number, settings: ColumnSettings, read: (value: string, format: SheetColumnFormat) => CellInput): WorkbookDraft | ColumnRefusal;
|
|
104
|
+
/**
|
|
105
|
+
* Why a draft's sheet is one publishing would refuse, by the rules publishing checks it with: its
|
|
106
|
+
* columns, its formulas, and the charts on it. Null when it publishes.
|
|
107
|
+
*/
|
|
108
|
+
export declare function sheetRefusal(draft: WorkbookDraft, sheet: string, base: CsvTable): ColumnRefusal | null;
|
|
109
|
+
/** Names for columns the draft adds: `Column 7`, the next number free. */
|
|
110
|
+
export declare function newColumnNames(header: readonly string[], count: number): string[];
|
|
111
|
+
/**
|
|
112
|
+
* Whether a cell holds a value the draft changed: one that differs from the version's in the row
|
|
113
|
+
* and column it was made from, or any value at all in a row or column the draft added.
|
|
114
|
+
*/
|
|
115
|
+
export declare function cellEdited(table: CsvTable, row: number, column: number): boolean;
|
|
116
|
+
/**
|
|
117
|
+
* The sheet as the grid draws it from the draft: its computed columns filled again, and each
|
|
118
|
+
* column as wide as the version drew it and at its decimals, so a column doesn't change its form
|
|
119
|
+
* as its values change.
|
|
120
|
+
*/
|
|
121
|
+
export declare function draftModel(sheet: WorkbookSheet, table: CsvTable, base: SheetModel): SheetModel;
|
|
122
|
+
/** Whether the draft holds anything to save: a table or a layout that isn't the version's. */
|
|
123
|
+
export declare function draftChanged(draft: WorkbookDraft): boolean;
|
|
124
|
+
/** The files a save publishes, by their paths: each changed sheet's CSV, and the workbook's. */
|
|
125
|
+
export declare function draftFiles(draft: WorkbookDraft): Map<string, string>;
|
|
126
|
+
/**
|
|
127
|
+
* A workbook as `workbook.json` writes it, the inverse of `parseWorkbook`: only what isn't a
|
|
128
|
+
* default, a format of a type alone as its type's name, so the file reads as an author writes it.
|
|
129
|
+
*/
|
|
130
|
+
export declare function formatWorkbook(workbook: Workbook): string;
|
|
131
|
+
//# sourceMappingURL=draft.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draft.d.ts","sourceRoot":"","sources":["../../../../src/artifacts/renderers/sheet/draft.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,QAAQ,EAMb,KAAK,WAAW,EAOhB,KAAK,iBAAiB,EACtB,KAAK,UAAU,EAGf,KAAK,QAAQ,EACb,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AACxC,OAAO,EAAE,KAAK,UAAU,EAAc,MAAM,SAAS,CAAA;AAErD;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,4DAA4D;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GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAOpE;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CA8BzD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type ColumnFilter } from "./filter";
|
|
2
|
+
import type { FormattedCell } from "./format";
|
|
3
|
+
import type { SheetModel } from "./model";
|
|
4
|
+
import type { SortDirection } from "./selection";
|
|
5
|
+
/**
|
|
6
|
+
* What a column's filter keeps, set as the reader changes it: a checklist of its values, or, for
|
|
7
|
+
* numbers and dates, a condition. Each change applies at once. Given `onSort`, it opens with the
|
|
8
|
+
* column's sort, as a spreadsheet's filter button does.
|
|
9
|
+
*/
|
|
10
|
+
export declare function FilterPanel({ model, column, format, filter, onChange, sort, onSort, }: {
|
|
11
|
+
readonly model: SheetModel;
|
|
12
|
+
readonly column: number;
|
|
13
|
+
readonly format: (value: string) => FormattedCell;
|
|
14
|
+
readonly filter: ColumnFilter | undefined;
|
|
15
|
+
/** Null takes the filter off. */
|
|
16
|
+
readonly onChange: (filter: ColumnFilter | null) => void;
|
|
17
|
+
readonly sort?: SortDirection | null;
|
|
18
|
+
readonly onSort?: (direction: SortDirection | null) => void;
|
|
19
|
+
}): import("react").JSX.Element | null;
|
|
20
|
+
//# sourceMappingURL=filter-panel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter-panel.d.ts","sourceRoot":"","sources":["../../../../src/artifacts/renderers/sheet/filter-panel.tsx"],"names":[],"mappings":"AAMA,OAAO,EACL,KAAK,YAAY,EAKlB,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAEhD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,MAAM,EACN,MAAM,EACN,MAAM,EACN,QAAQ,EACR,IAAI,EACJ,MAAM,GACP,EAAE;IACD,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAA;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,aAAa,CAAA;IACjD,QAAQ,CAAC,MAAM,EAAE,YAAY,GAAG,SAAS,CAAA;IACzC,iCAAiC;IACjC,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,KAAK,IAAI,CAAA;IACxD,QAAQ,CAAC,IAAI,CAAC,EAAE,aAAa,GAAG,IAAI,CAAA;IACpC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,aAAa,GAAG,IAAI,KAAK,IAAI,CAAA;CAC5D,sCA0DA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { SheetColumn, SheetModel } from "./model";
|
|
2
|
+
/**
|
|
3
|
+
* What a reader keeps of one column. A values filter hides the values it names, as the sheet
|
|
4
|
+
* stores them, so a value the panel never listed stays shown. A condition compares numbers as
|
|
5
|
+
* numbers and dates by their day, against what the reader typed: a number in their locale, a
|
|
6
|
+
* percent in percent (`25` for 25%), a date as `YYYY-MM-DD`.
|
|
7
|
+
*/
|
|
8
|
+
export type ColumnFilter = {
|
|
9
|
+
readonly kind: "values";
|
|
10
|
+
readonly excluded: readonly string[];
|
|
11
|
+
} | {
|
|
12
|
+
readonly kind: "condition";
|
|
13
|
+
readonly op: FilterOperator;
|
|
14
|
+
readonly value?: string;
|
|
15
|
+
/** The upper end, for `between`. */
|
|
16
|
+
readonly to?: string;
|
|
17
|
+
};
|
|
18
|
+
export declare const FILTER_OPERATORS: readonly ["eq", "ne", "gt", "gte", "lt", "lte", "between", "empty", "notEmpty"];
|
|
19
|
+
export type FilterOperator = (typeof FILTER_OPERATORS)[number];
|
|
20
|
+
/** Columns whose cells compare by condition rather than by value. */
|
|
21
|
+
export declare function filtersByCondition(column: SheetColumn): boolean;
|
|
22
|
+
/** The rows of `order` every filter keeps, in that order. */
|
|
23
|
+
export declare function filteredOrder(model: SheetModel, order: readonly number[], filters: Readonly<Record<number, ColumnFilter>>, locale: string): readonly number[];
|
|
24
|
+
/** Whether a filter keeps every row, as one with nothing excluded or no value to compare does. */
|
|
25
|
+
export declare function isInactiveFilter(filter: ColumnFilter): boolean;
|
|
26
|
+
/** A column's values with how many rows hold each, most frequent first, at most `limit` of them. */
|
|
27
|
+
export declare function distinctValues(model: SheetModel, column: number, limit?: number): {
|
|
28
|
+
readonly values: readonly {
|
|
29
|
+
readonly value: string;
|
|
30
|
+
readonly count: number;
|
|
31
|
+
}[];
|
|
32
|
+
readonly more: number;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* What a reader typed into a condition, as a number to compare: a date's day, or a number read in
|
|
36
|
+
* their locale's separators, with any currency sign, spaces, or `%` around it; a percent column
|
|
37
|
+
* takes whole percents.
|
|
38
|
+
*/
|
|
39
|
+
export declare function readFilterInput(column: SheetColumn, locale: string): (text: string) => number | undefined;
|
|
40
|
+
//# sourceMappingURL=filter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../../../src/artifacts/renderers/sheet/filter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEtD;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GACpB;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GACjE;IACE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAA;IAC1B,QAAQ,CAAC,EAAE,EAAE,cAAc,CAAA;IAC3B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAEL,eAAO,MAAM,gBAAgB,iFAUnB,CAAA;AACV,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAA;AAE9D,qEAAqE;AACrE,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAE/D;AAED,6DAA6D;AAC7D,wBAAgB,aAAa,CAC3B,KAAK,EAAE,UAAU,EACjB,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,EAC/C,MAAM,EAAE,MAAM,GACb,SAAS,MAAM,EAAE,CAWnB;AAED,kGAAkG;AAClG,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAK9D;AAED,oGAAoG;AACpG,wBAAgB,cAAc,CAC5B,KAAK,EAAE,UAAU,EACjB,MAAM,EAAE,MAAM,EACd,KAAK,SAAM,GACV;IACD,QAAQ,CAAC,MAAM,EAAE,SAAS;QAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;IAC9E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB,CAWA;AAwED;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,MAAM,GACb,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAgBtC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type KeyboardEvent, type RefObject } from "react";
|
|
2
|
+
/** What the grid searches for, and which of its matches is the current one. */
|
|
3
|
+
export interface SheetFind {
|
|
4
|
+
readonly query: string;
|
|
5
|
+
/** Counts on past either end: the grid wraps it around its matches. */
|
|
6
|
+
readonly index: number;
|
|
7
|
+
}
|
|
8
|
+
/** What the grid found for the query it was given. */
|
|
9
|
+
export interface SheetFindCount {
|
|
10
|
+
readonly count: number;
|
|
11
|
+
readonly capped: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* A sheet's find bar, opened by Cmd+F or Ctrl+F while focus is inside the sheet so the browser's
|
|
15
|
+
* own find keeps working elsewhere on the page. The query reaches the grid deferred, so typing
|
|
16
|
+
* stays quick on a large sheet.
|
|
17
|
+
*/
|
|
18
|
+
export declare function useSheetFind(gridRoot: RefObject<HTMLElement | null>): {
|
|
19
|
+
open: boolean;
|
|
20
|
+
show: () => void;
|
|
21
|
+
close: () => void;
|
|
22
|
+
onKeyDown: (event: KeyboardEvent<HTMLElement>) => void;
|
|
23
|
+
input: RefObject<HTMLInputElement | null>;
|
|
24
|
+
query: string;
|
|
25
|
+
setQuery: (value: string) => void;
|
|
26
|
+
found: SheetFindCount;
|
|
27
|
+
onFound: import("react").Dispatch<import("react").SetStateAction<SheetFindCount>>;
|
|
28
|
+
step: (by: number) => void;
|
|
29
|
+
index: number;
|
|
30
|
+
/** What the grid searches for: nothing while the bar is shut. */
|
|
31
|
+
find: {
|
|
32
|
+
query: string;
|
|
33
|
+
index: number;
|
|
34
|
+
} | undefined;
|
|
35
|
+
};
|
|
36
|
+
export declare function FindBar({ state, className, }: {
|
|
37
|
+
readonly state: ReturnType<typeof useSheetFind>;
|
|
38
|
+
readonly className?: string;
|
|
39
|
+
}): import("react").JSX.Element;
|
|
40
|
+
/** Where an index that ran past either end lands among `count` matches. */
|
|
41
|
+
export declare function modulo(value: number, count: number): number;
|
|
42
|
+
//# sourceMappingURL=find-bar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-bar.d.ts","sourceRoot":"","sources":["../../../../src/artifacts/renderers/sheet/find-bar.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,SAAS,EAKf,MAAM,OAAO,CAAA;AAGd,+EAA+E;AAC/E,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,uEAAuE;IACvE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACvB;AAED,sDAAsD;AACtD,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;CACzB;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC;;;;uBAwBxD,aAAa,CAAC,WAAW,CAAC;;;sBAgBhB,MAAM;;;eAMb,MAAM;;IAEjB,iEAAiE;;;;;EAGpE;AAED,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,SAAS,GACV,EAAE;IACD,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,CAAA;IAC/C,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAC5B,+BAwDA;AA2BD,2EAA2E;AAC3E,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAE3D"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { FormattedCell } from "./format";
|
|
2
|
+
import type { SheetModel } from "./model";
|
|
3
|
+
import type { CellPoint } from "./selection";
|
|
4
|
+
/** The most matches a search collects; past it, the count reads "10,000+". */
|
|
5
|
+
export declare const MAX_FIND_MATCHES = 10000;
|
|
6
|
+
export interface FindMatches {
|
|
7
|
+
/** Cells whose value holds the query, in reading order: along each row, then down. */
|
|
8
|
+
readonly points: readonly CellPoint[];
|
|
9
|
+
/** Whether the search stopped at {@link MAX_FIND_MATCHES}. */
|
|
10
|
+
readonly capped: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The data cells, as currently ordered, whose value holds the query as the grid shows it or as it
|
|
14
|
+
* is stored, ignoring case and accents: `4,120` and `4120` both find 4120000, `cafe` finds Café.
|
|
15
|
+
* The header row and hidden columns are not searched.
|
|
16
|
+
*/
|
|
17
|
+
export declare function findMatches(model: SheetModel, order: readonly number[], formatters: readonly ((value: string) => FormattedCell)[], query: string, hidden?: ReadonlySet<number>): FindMatches;
|
|
18
|
+
//# sourceMappingURL=find.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find.d.ts","sourceRoot":"","sources":["../../../../src/artifacts/renderers/sheet/find.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACzC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAE5C,8EAA8E;AAC9E,eAAO,MAAM,gBAAgB,QAAS,CAAA;AAEtC,MAAM,WAAW,WAAW;IAC1B,sFAAsF;IACtF,QAAQ,CAAC,MAAM,EAAE,SAAS,SAAS,EAAE,CAAA;IACrC,8DAA8D;IAC9D,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;CACzB;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CACzB,KAAK,EAAE,UAAU,EACjB,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,UAAU,EAAE,SAAS,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,aAAa,CAAC,EAAE,EACzD,KAAK,EAAE,MAAM,EACb,MAAM,GAAE,WAAW,CAAC,MAAM,CAAa,GACtC,WAAW,CAoBb"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { FormattedCell } from "./format";
|
|
2
|
+
import type { SheetColumn } from "./model";
|
|
3
|
+
/** The width of a text in pixels, in the grid's font: semibold for the header. */
|
|
4
|
+
export type TextMeasure = (text: string, bold: boolean) => number;
|
|
5
|
+
/**
|
|
6
|
+
* The width that shows a column's name and its widest value whole, as a spreadsheet fits a column
|
|
7
|
+
* when its edge is double-clicked. The caller clamps it to the grid's limits.
|
|
8
|
+
*/
|
|
9
|
+
export declare function fitWidth(column: SheetColumn, index: number, rows: readonly (readonly string[])[], format: (value: string) => FormattedCell, measure: TextMeasure): number;
|
|
10
|
+
/**
|
|
11
|
+
* Measures text in the font an element is set in, through a canvas. Without one, as outside a
|
|
12
|
+
* browser, it reads a typical character width.
|
|
13
|
+
*/
|
|
14
|
+
export declare function elementTextMeasure(element: HTMLElement | null): TextMeasure;
|
|
15
|
+
//# sourceMappingURL=fit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fit.d.ts","sourceRoot":"","sources":["../../../../src/artifacts/renderers/sheet/fit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C,kFAAkF;AAClF,MAAM,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,KAAK,MAAM,CAAA;AAYjE;;;GAGG;AACH,wBAAgB,QAAQ,CACtB,MAAM,EAAE,WAAW,EACnB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,EACpC,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,aAAa,EACxC,OAAO,EAAE,WAAW,GACnB,MAAM,CAYR;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,WAAW,CAS3E"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type SheetColumnFormat } from "@sixb/core/artifacts";
|
|
1
|
+
import { type ArtifactTone, type SheetColumnFormat } from "@sixb/core/artifacts";
|
|
2
2
|
import type { SheetColumn } from "./model";
|
|
3
3
|
/** A cell as the grid shows it. */
|
|
4
4
|
export interface FormattedCell {
|
|
@@ -10,19 +10,27 @@ export interface FormattedCell {
|
|
|
10
10
|
readonly reference?: string;
|
|
11
11
|
/** An image cell's path in the artifact. */
|
|
12
12
|
readonly image?: string;
|
|
13
|
+
/** A number in a text column, which aligns right as a spreadsheet aligns any number. */
|
|
14
|
+
readonly number?: boolean;
|
|
15
|
+
/** A boolean cell's value, drawn as a checkbox. */
|
|
16
|
+
readonly check?: boolean;
|
|
17
|
+
/** A tag cell's tone, drawn as a chip in it. */
|
|
18
|
+
readonly tag?: ArtifactTone;
|
|
19
|
+
/** A computed cell that computed to an error, such as `#DIV/0!`. */
|
|
20
|
+
readonly error?: boolean;
|
|
13
21
|
}
|
|
14
22
|
/**
|
|
15
23
|
* A number formatter for the reader's locale, in a column's style when one is given: its currency,
|
|
16
|
-
*
|
|
17
|
-
* sheet asks for the same few on every cell it draws.
|
|
24
|
+
* percents from fractions, and a sign on positive values for a signed column. Formatters are built
|
|
25
|
+
* once for each locale and options, since a sheet asks for the same few on every cell it draws.
|
|
18
26
|
*/
|
|
19
27
|
export declare function numberFormat(locale: string, options: Intl.NumberFormatOptions, format?: SheetColumnFormat): Intl.NumberFormat;
|
|
20
28
|
/** A currency's sign as a column header shows it beside the name: `$`, `€`, `£`. */
|
|
21
29
|
export declare function currencySymbol(currency: string): string;
|
|
22
30
|
/**
|
|
23
|
-
* How a column's values read in the reader's locale: grouped numbers, the column's
|
|
24
|
-
* decimals, percents from fractions, dates without a time zone shift, links by
|
|
25
|
-
* A value that does not read as its type shows as written.
|
|
31
|
+
* How a column's values read in the reader's locale: grouped or compact numbers, the column's
|
|
32
|
+
* currency, decimals, and sign, percents from fractions, dates without a time zone shift, links by
|
|
33
|
+
* their address. A value that does not read as its type shows as written.
|
|
26
34
|
*/
|
|
27
35
|
export declare function cellFormatter(column: SheetColumn, locale: string): (value: string) => FormattedCell;
|
|
28
36
|
/** A short form for chart axes: `$4.1M`, `35%`, `12K`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../../src/artifacts/renderers/sheet/format.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../../src/artifacts/renderers/sheet/format.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EAKjB,KAAK,iBAAiB,EACvB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C,mCAAmC;AACnC,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAC3B,6BAA6B;IAC7B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB,uFAAuF;IACvF,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,4CAA4C;IAC5C,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB,wFAAwF;IACxF,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAA;IACzB,mDAAmD;IACnD,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAA;IACxB,gDAAgD;IAChD,QAAQ,CAAC,GAAG,CAAC,EAAE,YAAY,CAAA;IAC3B,oEAAoE;IACpE,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CACzB;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,IAAI,CAAC,mBAAmB,EACjC,MAAM,CAAC,EAAE,iBAAiB,GACzB,IAAI,CAAC,YAAY,CAiBnB;AAID,oFAAoF;AACpF,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAMvD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,MAAM,GACb,CAAC,KAAK,EAAE,MAAM,KAAK,aAAa,CAOlC;AAmED,0DAA0D;AAC1D,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAW/F;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,MAAM,GACb,CAAC,KAAK,EAAE,MAAM,KAAK,aAAa,CAUlC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type ArtifactMessages } from "../../messages";
|
|
3
|
+
import { type useSheetFind } from "./find-bar";
|
|
4
|
+
import type { SheetGridStatus } from "./grid";
|
|
5
|
+
import type { SheetModel } from "./model";
|
|
6
|
+
import type { CellRange } from "./selection";
|
|
7
|
+
import type { SheetView, SheetViewUpdate } from "./view";
|
|
8
|
+
/**
|
|
9
|
+
* The bar above a sheet, as a spreadsheet's formula bar: the name box with the selection's address,
|
|
10
|
+
* where the reader can type a cell or range to go to; the active cell's whole value after `fx`; and
|
|
11
|
+
* the sheet's tools at the end.
|
|
12
|
+
*/
|
|
13
|
+
export declare function CommandBar({ address, value, onGoTo, tools, }: {
|
|
14
|
+
readonly address: string;
|
|
15
|
+
readonly value: ReactNode;
|
|
16
|
+
/** Goes to what the reader typed in the name box; false when it names no cell or range. */
|
|
17
|
+
readonly onGoTo?: (text: string) => boolean;
|
|
18
|
+
readonly tools?: ReactNode;
|
|
19
|
+
}): import("react").JSX.Element;
|
|
20
|
+
/** The range a name box's text names, read as an address within the sheet. */
|
|
21
|
+
export declare function nameBoxRange(text: string): CellRange | null;
|
|
22
|
+
/** A tool in the command bar: an icon, with its name beside it where there is room. */
|
|
23
|
+
export declare function CommandButton({ label, icon, pressed, onClick, showLabel, }: {
|
|
24
|
+
readonly label: string;
|
|
25
|
+
readonly icon: ReactNode;
|
|
26
|
+
readonly pressed?: boolean;
|
|
27
|
+
readonly onClick: () => void;
|
|
28
|
+
readonly showLabel?: boolean;
|
|
29
|
+
}): import("react").JSX.Element;
|
|
30
|
+
/** The find box, floating over the grid's top right as a spreadsheet's find does. */
|
|
31
|
+
export declare function FindPanel({ finder }: {
|
|
32
|
+
readonly finder: ReturnType<typeof useSheetFind>;
|
|
33
|
+
}): import("react").JSX.Element | null;
|
|
34
|
+
export interface SheetTabItem {
|
|
35
|
+
readonly key: string;
|
|
36
|
+
readonly label: ReactNode;
|
|
37
|
+
/** The tab's name as text, for the list of every sheet. */
|
|
38
|
+
readonly name: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* The bar below a sheet, as a spreadsheet's: the workbook's tabs at the start, with arrows to scroll
|
|
42
|
+
* them and a list of every sheet, and the status figures at the end. Without tabs, as for a CSV
|
|
43
|
+
* file, it holds the figures alone.
|
|
44
|
+
*/
|
|
45
|
+
export declare function SheetBar({ tabs, status, }: {
|
|
46
|
+
readonly tabs?: {
|
|
47
|
+
readonly items: readonly SheetTabItem[];
|
|
48
|
+
readonly current: number;
|
|
49
|
+
readonly onSelect: (index: number) => void;
|
|
50
|
+
/** Each tab's id, and the panel they control. */
|
|
51
|
+
readonly tabId: (index: number) => string;
|
|
52
|
+
readonly panelId: string;
|
|
53
|
+
};
|
|
54
|
+
readonly status: ReactNode;
|
|
55
|
+
}): import("react").JSX.Element;
|
|
56
|
+
/**
|
|
57
|
+
* What the status bar says: how many rows the sheet holds or its filters keep, what is frozen or
|
|
58
|
+
* hidden, each with a way back, and the figures of the selection, as a spreadsheet's status bar
|
|
59
|
+
* sums it.
|
|
60
|
+
*/
|
|
61
|
+
export declare function StatusFigures({ model, status, view, onViewChange, locale, messages, }: {
|
|
62
|
+
readonly model: SheetModel;
|
|
63
|
+
readonly status: SheetGridStatus | null;
|
|
64
|
+
readonly view: SheetView;
|
|
65
|
+
readonly onViewChange: SheetViewUpdate;
|
|
66
|
+
readonly locale: string;
|
|
67
|
+
readonly messages: ArtifactMessages;
|
|
68
|
+
}): import("react").JSX.Element;
|
|
69
|
+
//# sourceMappingURL=frame.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frame.d.ts","sourceRoot":"","sources":["../../../../src/artifacts/renderers/sheet/frame.tsx"],"names":[],"mappings":"AAUA,OAAO,EAEL,KAAK,SAAS,EAKf,MAAM,OAAO,CAAA;AACd,OAAO,EAAE,KAAK,gBAAgB,EAAuB,MAAM,gBAAgB,CAAA;AAC3E,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,YAAY,CAAA;AAEvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACzC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;AAExD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,EACzB,OAAO,EACP,KAAK,EACL,MAAM,EACN,KAAK,GACN,EAAE;IACD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAA;IACzB,2FAA2F;IAC3F,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAA;IAC3C,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAA;CAC3B,+BAoBA;AA8DD,8EAA8E;AAC9E,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAG3D;AAED,uFAAuF;AACvF,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,IAAI,EACJ,OAAO,EACP,OAAO,EACP,SAAiB,GAClB,EAAE;IACD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB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A;IACvC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;IACxB,QAAQ,CAAC,YAAY,EAAE,eAAe,CAAA;IACtC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAA;CACpC,+BA4EA"}
|
|
@@ -1,25 +1,88 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CellEdit } from "./draft";
|
|
2
|
+
import { type SheetFind, type SheetFindCount } from "./find-bar";
|
|
3
|
+
import type { CellInput } from "./input";
|
|
4
|
+
import { type SheetColumn, type SheetModel } from "./model";
|
|
2
5
|
import { type CellRange, type RangeStats } from "./selection";
|
|
6
|
+
import { type SheetView, type SheetViewUpdate } from "./view";
|
|
3
7
|
export interface SheetGridStatus {
|
|
4
8
|
readonly range: CellRange;
|
|
5
9
|
readonly stats: RangeStats;
|
|
6
10
|
/** The column the active cell is in. */
|
|
7
11
|
readonly column: SheetColumn | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* The active cell's whole value as it reads: a link's full address, a long text untruncated, a
|
|
14
|
+
* computed cell's formula.
|
|
15
|
+
*/
|
|
16
|
+
readonly value: string;
|
|
17
|
+
/** The data rows shown: every row, or those the filters keep. */
|
|
18
|
+
readonly rows: number;
|
|
8
19
|
}
|
|
9
20
|
/**
|
|
10
|
-
*
|
|
11
|
-
* and
|
|
12
|
-
* keyboard that copies as TSV. Only the cells in view are drawn, so a sheet of 100,000 rows
|
|
13
|
-
* scrolls like a short one.
|
|
21
|
+
* Editing a sheet in place: which columns take input, how what the reader types is read and shown,
|
|
22
|
+
* and where the values go. Rows are the model's data rows, from 0.
|
|
14
23
|
*/
|
|
15
|
-
export
|
|
24
|
+
export interface SheetGridEditor {
|
|
25
|
+
/** Whether a column's cells take input; a computed column's don't. */
|
|
26
|
+
readonly editable: (column: number) => boolean;
|
|
27
|
+
/** A stored value as the reader types it back. */
|
|
28
|
+
readonly inputText: (column: number, raw: string) => string;
|
|
29
|
+
/** What a column's cell stores from what the reader typed or pasted, or why it can't. */
|
|
30
|
+
readonly read: (column: number, text: string, pasted?: boolean) => CellInput;
|
|
31
|
+
/**
|
|
32
|
+
* Stores values, as one change. `grow` adds empty rows at the end and columns at the right
|
|
33
|
+
* first, as a paste past the sheet's edge does; edits may name them. Returns why the sheet
|
|
34
|
+
* can't take them, in words, when it can't.
|
|
35
|
+
*/
|
|
36
|
+
readonly write: (edits: readonly CellEdit[], grow?: {
|
|
37
|
+
readonly rows: number;
|
|
38
|
+
readonly columns: number;
|
|
39
|
+
}) => string | null;
|
|
40
|
+
/** Adds empty rows before a data row; at the row count, after the last. Returns why not. */
|
|
41
|
+
readonly insertRows: (at: number, count: number) => string | null;
|
|
42
|
+
readonly deleteRows: (rows: readonly number[]) => void;
|
|
43
|
+
/** Adds an empty column before a column; at the column count, after the last. */
|
|
44
|
+
readonly insertColumn: (at: number) => void;
|
|
45
|
+
/** Removes a column; returns why it can't be, in words, when it can't. */
|
|
46
|
+
readonly deleteColumn: (column: number) => string | null;
|
|
47
|
+
/** Opens a column's settings: to rename it, or to set its type and form. */
|
|
48
|
+
readonly editColumn: (column: number, focus: "name" | "type") => void;
|
|
49
|
+
readonly undo: () => void;
|
|
50
|
+
readonly redo: () => void;
|
|
51
|
+
/** Whether a cell holds a value the edit changed. */
|
|
52
|
+
readonly edited: (row: number, column: number) => boolean;
|
|
53
|
+
/** Values to offer while typing into a column, such as its tags. */
|
|
54
|
+
readonly suggestions?: (column: number) => readonly string[];
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* A spreadsheet grid: column letters and row numbers, the header row and any frozen rows and
|
|
58
|
+
* columns kept in view, a menu on each column's letter and on a right-click that sorts, filters,
|
|
59
|
+
* fits, freezes, and hides it, filter buttons on the headers in filter mode, and a selection of
|
|
60
|
+
* cells, rows, or columns by pointer, Shift, and keyboard that copies as TSV and as a table. Only
|
|
61
|
+
* the cells in view are drawn, so a sheet of 100,000 rows scrolls like a short one. Given an
|
|
62
|
+
* editor, its cells take input: typing, Enter, F2, or a double-click edits one, Delete clears the
|
|
63
|
+
* selection, and Space or a click toggles a checkbox.
|
|
64
|
+
*/
|
|
65
|
+
export declare function SheetGrid({ model, locale, onStatusChange, imageUrl, selected, find, onFind, view: viewProp, onViewChange, goTo, editor, className, }: {
|
|
16
66
|
readonly model: SheetModel;
|
|
17
67
|
readonly locale: string;
|
|
68
|
+
/** How the reader arranged the sheet; without it, the grid keeps its own. */
|
|
69
|
+
readonly view?: SheetView;
|
|
70
|
+
readonly onViewChange?: SheetViewUpdate;
|
|
18
71
|
readonly onStatusChange?: (status: SheetGridStatus) => void;
|
|
72
|
+
/** A search: its matches are marked, and the current one is selected and brought into view. */
|
|
73
|
+
readonly find?: SheetFind;
|
|
74
|
+
readonly onFind?: (found: SheetFindCount) => void;
|
|
19
75
|
/** An image cell's URL by its path in the artifact; images show only where they resolve. */
|
|
20
76
|
readonly imageUrl?: (path: string) => string | undefined;
|
|
21
77
|
/** A range to open on, selected and in view, such as the one an address named. */
|
|
22
78
|
readonly selected?: CellRange;
|
|
79
|
+
/** A range to go to, as the name box names one; each new `seq` goes there again. */
|
|
80
|
+
readonly goTo?: {
|
|
81
|
+
readonly range: CellRange;
|
|
82
|
+
readonly seq: number;
|
|
83
|
+
};
|
|
84
|
+
/** Edits the sheet's cells; without it, the grid is read-only. */
|
|
85
|
+
readonly editor?: SheetGridEditor;
|
|
23
86
|
readonly className?: string;
|
|
24
87
|
}): import("react").JSX.Element;
|
|
25
88
|
//# sourceMappingURL=grid.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid.d.ts","sourceRoot":"","sources":["../../../../src/artifacts/renderers/sheet/grid.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"grid.d.ts","sourceRoot":"","sources":["../../../../src/artifacts/renderers/sheet/grid.tsx"],"names":[],"mappings":"AAiDA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;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AAS,CAAA;IACzB,QAAQ,CAAC,YAAY,CAAC,EAAE,eAAe,CAAA;IACvC,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAA;IAC3D,+FAA+F;IAC/F,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,CAAA;IACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAA;IACjD,4FAA4F;IAC5F,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAA;IACxD,kFAAkF;IAClF,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAA;IAC7B,oFAAoF;IACpF,QAAQ,CAAC,IAAI,CAAC,EAAE;QAAE,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;QAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAA;IACnE,kEAAkE;IAClE,QAAQ,CAAC,MAAM,CAAC,EAAE,eAAe,CAAA;IACjC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAC5B,+BAi3CA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type SheetHighlight } from "@sixb/core/artifacts";
|
|
2
|
+
import type { SheetModel } from "./model";
|
|
3
|
+
/** A highlighted column's values from least to greatest, across every row of the sheet. */
|
|
4
|
+
export interface HighlightRange {
|
|
5
|
+
readonly highlight: SheetHighlight;
|
|
6
|
+
readonly min: number;
|
|
7
|
+
readonly max: number;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* The span each highlighted column's values cover. It is the whole sheet's, as a spreadsheet's
|
|
11
|
+
* conditional format is the column's: a filter or sort leaves every shade where it was.
|
|
12
|
+
*/
|
|
13
|
+
export declare function highlightRanges(model: SheetModel): ReadonlyMap<number, HighlightRange>;
|
|
14
|
+
/** How one cell is highlighted: a bar's extent in the cell, or a shade behind it. */
|
|
15
|
+
export type CellHighlight = {
|
|
16
|
+
readonly kind: "bar";
|
|
17
|
+
readonly from: number;
|
|
18
|
+
readonly to: number;
|
|
19
|
+
readonly negative: boolean;
|
|
20
|
+
} | {
|
|
21
|
+
readonly kind: "shade";
|
|
22
|
+
readonly color: string;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* A value's highlight in its column. A bar runs from zero, or from the column's least value when
|
|
26
|
+
* every value is past zero, so a column of all equal values fills its cells. A scale shades from
|
|
27
|
+
* light at the least value to dark at the greatest, and the middle when all are equal. Diverging
|
|
28
|
+
* shades positive values in the theme's success color and negative ones in its destructive color,
|
|
29
|
+
* deeper the farther from zero. An empty cell or one that is not a number has none.
|
|
30
|
+
*/
|
|
31
|
+
export declare function cellHighlight(range: HighlightRange, value: string): CellHighlight | undefined;
|
|
32
|
+
//# sourceMappingURL=highlight.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"highlight.d.ts","sourceRoot":"","sources":["../../../../src/artifacts/renderers/sheet/highlight.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC5E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEzC,2FAA2F;AAC3F,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,SAAS,EAAE,cAAc,CAAA;IAClC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CACrB;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,UAAU,GAAG,WAAW,CAAC,MAAM,EAAE,cAAc,CAAC,CAgBtF;AAED,qFAAqF;AACrF,MAAM,MAAM,aAAa,GACrB;IAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,GAChG;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAEtD;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAiC7F"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type SheetColumnFormat } from "@sixb/core/artifacts";
|
|
2
|
+
/** Why what a reader typed can't be a column's value: the column's type, which says what fits. */
|
|
3
|
+
export type CellInputError = "number" | "date" | "link" | "image" | "boolean";
|
|
4
|
+
/** What a cell stores from what a reader typed, or why it can't. */
|
|
5
|
+
export type CellInput = {
|
|
6
|
+
readonly value: string;
|
|
7
|
+
} | {
|
|
8
|
+
readonly error: CellInputError;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Reads what a reader typed into a cell as the column's type stores it, in the reader's locale:
|
|
12
|
+
* `12%` in a percent column is `0.12`, `$1,200` in a currency column is `1200`, `23/11/2026` is
|
|
13
|
+
* `2026-11-23` where the day comes first. Empty is always a value: the cell is cleared.
|
|
14
|
+
*
|
|
15
|
+
* A pasted value is read as a sheet copies one: a number as it stores it first, then in the
|
|
16
|
+
* locale's form, and a percent without its sign as the fraction, `0.12`, not 12 points.
|
|
17
|
+
*/
|
|
18
|
+
export declare function parseCellInput(text: string, format: SheetColumnFormat, locale: string, options?: {
|
|
19
|
+
/** Whether a path is one of the artifact's images. */
|
|
20
|
+
readonly image?: (path: string) => boolean;
|
|
21
|
+
/** Read as pasted from a sheet, not typed. */
|
|
22
|
+
readonly pasted?: boolean;
|
|
23
|
+
}): CellInput;
|
|
24
|
+
/**
|
|
25
|
+
* A stored value as the reader types it back to change it: a number in the locale's digits
|
|
26
|
+
* without grouping, a percent in points with its sign. What doesn't read as its type is shown
|
|
27
|
+
* as stored.
|
|
28
|
+
*/
|
|
29
|
+
export declare function cellInputText(raw: string, format: SheetColumnFormat, locale: string): string;
|
|
30
|
+
//# sourceMappingURL=input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../src/artifacts/renderers/sheet/input.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,iBAAiB,EACvB,MAAM,sBAAsB,CAAA;AAE7B,kGAAkG;AAClG,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAA;AAE7E,oEAAoE;AACpE,MAAM,MAAM,SAAS,GAAG;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAA;CAAE,CAAA;AAEvF;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,iBAAiB,EACzB,MAAM,EAAE,MAAM,EACd,OAAO,GAAE;IACP,sDAAsD;IACtD,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAA;IAC1C,8CAA8C;IAC9C,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CACrB,GACL,SAAS,CAgDX;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAgB5F"}
|