@schlessera/brain-ui-react 0.35.0 → 0.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +82 -4
- package/dist/components/activity/activity-page.d.ts +17 -5
- package/dist/components/activity/activity-page.d.ts.map +1 -1
- package/dist/components/activity/activity-page.js +144 -50
- package/dist/components/activity/activity-page.js.map +1 -1
- package/dist/components/activity/activity-run-detail.d.ts +16 -1
- package/dist/components/activity/activity-run-detail.d.ts.map +1 -1
- package/dist/components/activity/activity-run-detail.js +47 -4
- package/dist/components/activity/activity-run-detail.js.map +1 -1
- package/dist/components/activity/activity-run-list.d.ts +7 -1
- package/dist/components/activity/activity-run-list.d.ts.map +1 -1
- package/dist/components/activity/activity-run-list.js +16 -8
- package/dist/components/activity/activity-run-list.js.map +1 -1
- package/dist/components/activity/activity-views.d.ts +63 -0
- package/dist/components/activity/activity-views.d.ts.map +1 -0
- package/dist/components/activity/activity-views.js +52 -0
- package/dist/components/activity/activity-views.js.map +1 -0
- package/dist/components/activity/approval-card.d.ts +11 -0
- package/dist/components/activity/approval-card.d.ts.map +1 -0
- package/dist/components/activity/approval-card.js +46 -0
- package/dist/components/activity/approval-card.js.map +1 -0
- package/dist/components/activity/digest-card.d.ts +3 -0
- package/dist/components/activity/digest-card.d.ts.map +1 -1
- package/dist/components/activity/digest-card.js +20 -16
- package/dist/components/activity/digest-card.js.map +1 -1
- package/dist/components/activity/digest-summary.d.ts +19 -0
- package/dist/components/activity/digest-summary.d.ts.map +1 -0
- package/dist/components/activity/digest-summary.js +20 -0
- package/dist/components/activity/digest-summary.js.map +1 -0
- package/dist/components/activity/push-switch.d.ts +25 -0
- package/dist/components/activity/push-switch.d.ts.map +1 -0
- package/dist/components/activity/push-switch.js +14 -0
- package/dist/components/activity/push-switch.js.map +1 -0
- package/dist/components/activity/push-toggle.d.ts +7 -0
- package/dist/components/activity/push-toggle.d.ts.map +1 -1
- package/dist/components/activity/push-toggle.js +72 -47
- package/dist/components/activity/push-toggle.js.map +1 -1
- package/dist/components/activity/span-bits.d.ts.map +1 -1
- package/dist/components/activity/span-bits.js +9 -7
- package/dist/components/activity/span-bits.js.map +1 -1
- package/dist/components/chat/ask-user-card.d.ts +76 -3
- package/dist/components/chat/ask-user-card.d.ts.map +1 -1
- package/dist/components/chat/ask-user-card.js +208 -149
- package/dist/components/chat/ask-user-card.js.map +1 -1
- package/dist/components/chat/ask-user-typed.d.ts +42 -0
- package/dist/components/chat/ask-user-typed.d.ts.map +1 -0
- package/dist/components/chat/ask-user-typed.js +60 -0
- package/dist/components/chat/ask-user-typed.js.map +1 -0
- package/dist/components/chat/brain-markdown-links.d.ts +2 -1
- package/dist/components/chat/brain-markdown-links.d.ts.map +1 -1
- package/dist/components/chat/brain-markdown-links.js +3 -4
- package/dist/components/chat/brain-markdown-links.js.map +1 -1
- package/dist/components/chat/brain-markdown.d.ts.map +1 -1
- package/dist/components/chat/brain-markdown.js +4 -2
- package/dist/components/chat/brain-markdown.js.map +1 -1
- package/dist/components/chat/chat-page.d.ts.map +1 -1
- package/dist/components/chat/chat-page.js +24 -9
- package/dist/components/chat/chat-page.js.map +1 -1
- package/dist/components/chat/composer-view.d.ts +75 -0
- package/dist/components/chat/composer-view.d.ts.map +1 -0
- package/dist/components/chat/composer-view.js +31 -0
- package/dist/components/chat/composer-view.js.map +1 -0
- package/dist/components/chat/composer.d.ts +4 -0
- package/dist/components/chat/composer.d.ts.map +1 -1
- package/dist/components/chat/composer.js +76 -59
- package/dist/components/chat/composer.js.map +1 -1
- package/dist/components/chat/markdown-content.d.ts +16 -1
- package/dist/components/chat/markdown-content.d.ts.map +1 -1
- package/dist/components/chat/markdown-content.js +47 -3
- package/dist/components/chat/markdown-content.js.map +1 -1
- package/dist/components/chat/mermaid-block.d.ts +4 -0
- package/dist/components/chat/mermaid-block.d.ts.map +1 -1
- package/dist/components/chat/mermaid-block.js +13 -5
- package/dist/components/chat/mermaid-block.js.map +1 -1
- package/dist/components/chat/mermaid-share.d.ts +2 -1
- package/dist/components/chat/mermaid-share.d.ts.map +1 -1
- package/dist/components/chat/mermaid-share.js +7 -8
- package/dist/components/chat/mermaid-share.js.map +1 -1
- package/dist/components/chat/mermaid-viewer.d.ts.map +1 -1
- package/dist/components/chat/mermaid-viewer.js +3 -1
- package/dist/components/chat/mermaid-viewer.js.map +1 -1
- package/dist/components/chat/message-bubble.d.ts +8 -1
- package/dist/components/chat/message-bubble.d.ts.map +1 -1
- package/dist/components/chat/message-bubble.js +53 -24
- package/dist/components/chat/message-bubble.js.map +1 -1
- package/dist/components/chat/message-share.d.ts +2 -1
- package/dist/components/chat/message-share.d.ts.map +1 -1
- package/dist/components/chat/message-share.js +6 -7
- package/dist/components/chat/message-share.js.map +1 -1
- package/dist/components/chat/renderers/bind.d.ts +39 -0
- package/dist/components/chat/renderers/bind.d.ts.map +1 -0
- package/dist/components/chat/renderers/bind.js +43 -0
- package/dist/components/chat/renderers/bind.js.map +1 -0
- package/dist/components/chat/renderers/brain-ui-tools.d.ts +3 -0
- package/dist/components/chat/renderers/brain-ui-tools.d.ts.map +1 -0
- package/dist/components/chat/renderers/brain-ui-tools.js +41 -0
- package/dist/components/chat/renderers/brain-ui-tools.js.map +1 -0
- package/dist/components/chat/renderers/claude-tools.d.ts.map +1 -1
- package/dist/components/chat/renderers/claude-tools.js +3 -2
- package/dist/components/chat/renderers/claude-tools.js.map +1 -1
- package/dist/components/chat/renderers/index.d.ts +10 -2
- package/dist/components/chat/renderers/index.d.ts.map +1 -1
- package/dist/components/chat/renderers/index.js +15 -10
- package/dist/components/chat/renderers/index.js.map +1 -1
- package/dist/components/chat/session-drawer.d.ts +4 -0
- package/dist/components/chat/session-drawer.d.ts.map +1 -1
- package/dist/components/chat/session-drawer.js +32 -32
- package/dist/components/chat/session-drawer.js.map +1 -1
- package/dist/components/chat/session-list.d.ts +41 -0
- package/dist/components/chat/session-list.d.ts.map +1 -0
- package/dist/components/chat/session-list.js +10 -0
- package/dist/components/chat/session-list.js.map +1 -0
- package/dist/components/chat/share-block.d.ts.map +1 -1
- package/dist/components/chat/share-block.js +12 -11
- package/dist/components/chat/share-block.js.map +1 -1
- package/dist/components/chat/share-card.js +2 -2
- package/dist/components/chat/share-card.js.map +1 -1
- package/dist/components/chat/subagent-view.js +1 -1
- package/dist/components/chat/subagent-view.js.map +1 -1
- package/dist/components/chat/tool-call-timeline.d.ts.map +1 -1
- package/dist/components/chat/tool-call-timeline.js +37 -12
- package/dist/components/chat/tool-call-timeline.js.map +1 -1
- package/dist/components/chat/tool-cards/block-card.d.ts +28 -0
- package/dist/components/chat/tool-cards/block-card.d.ts.map +1 -0
- package/dist/components/chat/tool-cards/block-card.js +103 -0
- package/dist/components/chat/tool-cards/block-card.js.map +1 -0
- package/dist/components/chat/tool-cards/image-mask-card.d.ts +70 -0
- package/dist/components/chat/tool-cards/image-mask-card.d.ts.map +1 -0
- package/dist/components/chat/tool-cards/image-mask-card.js +142 -0
- package/dist/components/chat/tool-cards/image-mask-card.js.map +1 -0
- package/dist/components/chat/tool-cards/location-card.d.ts +45 -0
- package/dist/components/chat/tool-cards/location-card.d.ts.map +1 -0
- package/dist/components/chat/tool-cards/location-card.js +128 -0
- package/dist/components/chat/tool-cards/location-card.js.map +1 -0
- package/dist/components/chat/tool-views.d.ts +13 -2
- package/dist/components/chat/tool-views.d.ts.map +1 -1
- package/dist/components/chat/tool-views.js +20 -22
- package/dist/components/chat/tool-views.js.map +1 -1
- package/dist/components/chat/transcript-turn.d.ts +45 -0
- package/dist/components/chat/transcript-turn.d.ts.map +1 -0
- package/dist/components/chat/transcript-turn.js +25 -0
- package/dist/components/chat/transcript-turn.js.map +1 -0
- package/dist/components/chat/use-chat-commands.d.ts.map +1 -1
- package/dist/components/chat/use-chat-commands.js +13 -16
- package/dist/components/chat/use-chat-commands.js.map +1 -1
- package/dist/components/chat/welcome-state.d.ts +7 -0
- package/dist/components/chat/welcome-state.d.ts.map +1 -1
- package/dist/components/chat/welcome-state.js +13 -5
- package/dist/components/chat/welcome-state.js.map +1 -1
- package/dist/components/connectivity/connection-gate.d.ts.map +1 -1
- package/dist/components/connectivity/connection-gate.js +27 -21
- package/dist/components/connectivity/connection-gate.js.map +1 -1
- package/dist/components/connectivity/login-form.d.ts +31 -0
- package/dist/components/connectivity/login-form.d.ts.map +1 -0
- package/dist/components/connectivity/login-form.js +19 -0
- package/dist/components/connectivity/login-form.js.map +1 -0
- package/dist/components/connectivity/login-screen.d.ts +5 -2
- package/dist/components/connectivity/login-screen.d.ts.map +1 -1
- package/dist/components/connectivity/login-screen.js +41 -31
- package/dist/components/connectivity/login-screen.js.map +1 -1
- package/dist/components/dev/share-harness.js +1 -1
- package/dist/components/dev/share-harness.js.map +1 -1
- package/dist/components/files/file-panel.d.ts +1 -1
- package/dist/components/files/file-panel.d.ts.map +1 -1
- package/dist/components/files/file-panel.js +74 -0
- package/dist/components/files/file-panel.js.map +1 -1
- package/dist/components/files/file-tree-view.d.ts +45 -0
- package/dist/components/files/file-tree-view.d.ts.map +1 -0
- package/dist/components/files/file-tree-view.js +51 -0
- package/dist/components/files/file-tree-view.js.map +1 -0
- package/dist/components/files/file-tree.d.ts +6 -0
- package/dist/components/files/file-tree.d.ts.map +1 -1
- package/dist/components/files/file-tree.js +39 -43
- package/dist/components/files/file-tree.js.map +1 -1
- package/dist/components/files/file-viewer-binary.d.ts.map +1 -1
- package/dist/components/files/file-viewer-binary.js +3 -2
- package/dist/components/files/file-viewer-binary.js.map +1 -1
- package/dist/components/files/file-viewer-frame.d.ts +36 -0
- package/dist/components/files/file-viewer-frame.d.ts.map +1 -0
- package/dist/components/files/file-viewer-frame.js +26 -0
- package/dist/components/files/file-viewer-frame.js.map +1 -0
- package/dist/components/files/file-viewer.d.ts +5 -0
- package/dist/components/files/file-viewer.d.ts.map +1 -1
- package/dist/components/files/file-viewer.js +26 -32
- package/dist/components/files/file-viewer.js.map +1 -1
- package/dist/components/files/frontmatter-chips.d.ts +18 -0
- package/dist/components/files/frontmatter-chips.d.ts.map +1 -0
- package/dist/components/files/frontmatter-chips.js +11 -0
- package/dist/components/files/frontmatter-chips.js.map +1 -0
- package/dist/components/files/frontmatter-panel.d.ts +5 -1
- package/dist/components/files/frontmatter-panel.d.ts.map +1 -1
- package/dist/components/files/frontmatter-panel.js +7 -6
- package/dist/components/files/frontmatter-panel.js.map +1 -1
- package/dist/components/files/staleness.d.ts +18 -0
- package/dist/components/files/staleness.d.ts.map +1 -0
- package/dist/components/files/staleness.js +27 -0
- package/dist/components/files/staleness.js.map +1 -0
- package/dist/components/graph/graph-canvas.d.ts.map +1 -1
- package/dist/components/graph/graph-canvas.js +24 -1
- package/dist/components/graph/graph-canvas.js.map +1 -1
- package/dist/components/graph/graph-controls-column.d.ts +14 -0
- package/dist/components/graph/graph-controls-column.d.ts.map +1 -0
- package/dist/components/graph/graph-controls-column.js +44 -0
- package/dist/components/graph/graph-controls-column.js.map +1 -0
- package/dist/components/graph/graph-controls.d.ts +20 -5
- package/dist/components/graph/graph-controls.d.ts.map +1 -1
- package/dist/components/graph/graph-controls.js +58 -37
- package/dist/components/graph/graph-controls.js.map +1 -1
- package/dist/components/graph/graph-form.d.ts +82 -0
- package/dist/components/graph/graph-form.d.ts.map +1 -0
- package/dist/components/graph/graph-form.js +69 -0
- package/dist/components/graph/graph-form.js.map +1 -0
- package/dist/components/graph/graph-maintenance.d.ts.map +1 -1
- package/dist/components/graph/graph-maintenance.js +6 -10
- package/dist/components/graph/graph-maintenance.js.map +1 -1
- package/dist/components/graph/graph-node-rail.d.ts +13 -0
- package/dist/components/graph/graph-node-rail.d.ts.map +1 -0
- package/dist/components/graph/graph-node-rail.js +92 -0
- package/dist/components/graph/graph-node-rail.js.map +1 -0
- package/dist/components/graph/graph-page.d.ts +7 -0
- package/dist/components/graph/graph-page.d.ts.map +1 -1
- package/dist/components/graph/graph-page.js +102 -12
- package/dist/components/graph/graph-page.js.map +1 -1
- package/dist/components/graph/graph-scene.d.ts.map +1 -1
- package/dist/components/graph/graph-scene.js +100 -24
- package/dist/components/graph/graph-scene.js.map +1 -1
- package/dist/components/graph/lib/graph-helpers.d.ts +42 -12
- package/dist/components/graph/lib/graph-helpers.d.ts.map +1 -1
- package/dist/components/graph/lib/graph-helpers.js +33 -41
- package/dist/components/graph/lib/graph-helpers.js.map +1 -1
- package/dist/components/graph/node-card.d.ts +28 -0
- package/dist/components/graph/node-card.d.ts.map +1 -0
- package/dist/components/graph/node-card.js +7 -0
- package/dist/components/graph/node-card.js.map +1 -0
- package/dist/components/graph/node-popover.d.ts +6 -2
- package/dist/components/graph/node-popover.d.ts.map +1 -1
- package/dist/components/graph/node-popover.js +13 -31
- package/dist/components/graph/node-popover.js.map +1 -1
- package/dist/components/graph/use-graph-theme.d.ts +32 -4
- package/dist/components/graph/use-graph-theme.d.ts.map +1 -1
- package/dist/components/graph/use-graph-theme.js +44 -32
- package/dist/components/graph/use-graph-theme.js.map +1 -1
- package/dist/components/graph/use-node-actions.d.ts +26 -0
- package/dist/components/graph/use-node-actions.d.ts.map +1 -0
- package/dist/components/graph/use-node-actions.js +54 -0
- package/dist/components/graph/use-node-actions.js.map +1 -0
- package/dist/components/images/image-share.d.ts +2 -1
- package/dist/components/images/image-share.d.ts.map +1 -1
- package/dist/components/images/image-share.js +3 -3
- package/dist/components/images/image-share.js.map +1 -1
- package/dist/components/images/image-viewer.d.ts.map +1 -1
- package/dist/components/images/image-viewer.js +3 -1
- package/dist/components/images/image-viewer.js.map +1 -1
- package/dist/components/images/mask-editor.d.ts.map +1 -1
- package/dist/components/images/mask-editor.js +7 -5
- package/dist/components/images/mask-editor.js.map +1 -1
- package/dist/components/layout/app-shell.d.ts.map +1 -1
- package/dist/components/layout/app-shell.js +4 -1
- package/dist/components/layout/app-shell.js.map +1 -1
- package/dist/components/layout/desktop-palette.d.ts +23 -0
- package/dist/components/layout/desktop-palette.d.ts.map +1 -0
- package/dist/components/layout/desktop-palette.js +132 -0
- package/dist/components/layout/desktop-palette.js.map +1 -0
- package/dist/components/layout/key-cap.d.ts +9 -0
- package/dist/components/layout/key-cap.d.ts.map +1 -0
- package/dist/components/layout/key-cap.js +10 -0
- package/dist/components/layout/key-cap.js.map +1 -0
- package/dist/components/layout/mobile-tab-bar.d.ts +13 -0
- package/dist/components/layout/mobile-tab-bar.d.ts.map +1 -1
- package/dist/components/layout/mobile-tab-bar.js +58 -47
- package/dist/components/layout/mobile-tab-bar.js.map +1 -1
- package/dist/components/layout/shortcut-switch.d.ts +13 -0
- package/dist/components/layout/shortcut-switch.d.ts.map +1 -0
- package/dist/components/layout/shortcut-switch.js +22 -0
- package/dist/components/layout/shortcut-switch.js.map +1 -0
- package/dist/components/layout/side-rail.d.ts +24 -0
- package/dist/components/layout/side-rail.d.ts.map +1 -1
- package/dist/components/layout/side-rail.js +65 -27
- package/dist/components/layout/side-rail.js.map +1 -1
- package/dist/components/layout/slide-panel.d.ts +12 -2
- package/dist/components/layout/slide-panel.d.ts.map +1 -1
- package/dist/components/layout/slide-panel.js +11 -2
- package/dist/components/layout/slide-panel.js.map +1 -1
- package/dist/components/layout/theme.d.ts +22 -0
- package/dist/components/layout/theme.d.ts.map +1 -0
- package/dist/components/layout/theme.js +44 -0
- package/dist/components/layout/theme.js.map +1 -0
- package/dist/components/quick-actions/add-form.d.ts +44 -0
- package/dist/components/quick-actions/add-form.d.ts.map +1 -0
- package/dist/components/quick-actions/add-form.js +30 -0
- package/dist/components/quick-actions/add-form.js.map +1 -0
- package/dist/components/quick-actions/add-modal.d.ts +7 -0
- package/dist/components/quick-actions/add-modal.d.ts.map +1 -1
- package/dist/components/quick-actions/add-modal.js +23 -20
- package/dist/components/quick-actions/add-modal.js.map +1 -1
- package/dist/components/quick-actions/search-modal.d.ts.map +1 -1
- package/dist/components/quick-actions/search-modal.js +4 -3
- package/dist/components/quick-actions/search-modal.js.map +1 -1
- package/dist/components/quick-actions/streaming-modal.d.ts +6 -0
- package/dist/components/quick-actions/streaming-modal.d.ts.map +1 -1
- package/dist/components/quick-actions/streaming-modal.js +39 -17
- package/dist/components/quick-actions/streaming-modal.js.map +1 -1
- package/dist/components/quick-actions/streaming-output.d.ts +38 -0
- package/dist/components/quick-actions/streaming-output.d.ts.map +1 -0
- package/dist/components/quick-actions/streaming-output.js +22 -0
- package/dist/components/quick-actions/streaming-output.js.map +1 -0
- package/dist/components/quick-actions/whatsup-modal.d.ts +5 -0
- package/dist/components/quick-actions/whatsup-modal.d.ts.map +1 -1
- package/dist/components/quick-actions/whatsup-modal.js +36 -10
- package/dist/components/quick-actions/whatsup-modal.js.map +1 -1
- package/dist/components/settings/devices-agents-tab.d.ts +6 -1
- package/dist/components/settings/devices-agents-tab.d.ts.map +1 -1
- package/dist/components/settings/devices-agents-tab.js +55 -20
- package/dist/components/settings/devices-agents-tab.js.map +1 -1
- package/dist/components/settings/models-list.d.ts +39 -0
- package/dist/components/settings/models-list.d.ts.map +1 -0
- package/dist/components/settings/models-list.js +72 -0
- package/dist/components/settings/models-list.js.map +1 -0
- package/dist/components/settings/models-tab.d.ts +4 -0
- package/dist/components/settings/models-tab.d.ts.map +1 -1
- package/dist/components/settings/models-tab.js +52 -102
- package/dist/components/settings/models-tab.js.map +1 -1
- package/dist/components/settings/one-time-agent-credential.js +1 -1
- package/dist/components/settings/one-time-agent-credential.js.map +1 -1
- package/dist/components/settings/passkey-list.d.ts +35 -0
- package/dist/components/settings/passkey-list.d.ts.map +1 -0
- package/dist/components/settings/passkey-list.js +34 -0
- package/dist/components/settings/passkey-list.js.map +1 -0
- package/dist/components/settings/passkey-tab.d.ts +3 -0
- package/dist/components/settings/passkey-tab.d.ts.map +1 -1
- package/dist/components/settings/passkey-tab.js +53 -45
- package/dist/components/settings/passkey-tab.js.map +1 -1
- package/dist/components/settings/pi-accounts-list.d.ts +27 -0
- package/dist/components/settings/pi-accounts-list.d.ts.map +1 -0
- package/dist/components/settings/pi-accounts-list.js +15 -0
- package/dist/components/settings/pi-accounts-list.js.map +1 -0
- package/dist/components/settings/pi-accounts.d.ts +3 -0
- package/dist/components/settings/pi-accounts.d.ts.map +1 -1
- package/dist/components/settings/pi-accounts.js +73 -55
- package/dist/components/settings/pi-accounts.js.map +1 -1
- package/dist/components/settings/principal-list.d.ts +37 -0
- package/dist/components/settings/principal-list.d.ts.map +1 -0
- package/dist/components/settings/principal-list.js +18 -0
- package/dist/components/settings/principal-list.js.map +1 -0
- package/dist/components/settings/settings-panel.d.ts +10 -3
- package/dist/components/settings/settings-panel.d.ts.map +1 -1
- package/dist/components/settings/settings-panel.js +69 -8
- package/dist/components/settings/settings-panel.js.map +1 -1
- package/dist/components/settings/skills-list.d.ts +53 -0
- package/dist/components/settings/skills-list.d.ts.map +1 -0
- package/dist/components/settings/skills-list.js +28 -0
- package/dist/components/settings/skills-list.js.map +1 -0
- package/dist/components/settings/skills-tab.d.ts.map +1 -1
- package/dist/components/settings/skills-tab.js +65 -38
- package/dist/components/settings/skills-tab.js.map +1 -1
- package/dist/components/settings/tool-permissions-list.d.ts +18 -0
- package/dist/components/settings/tool-permissions-list.d.ts.map +1 -0
- package/dist/components/settings/tool-permissions-list.js +6 -0
- package/dist/components/settings/tool-permissions-list.js.map +1 -0
- package/dist/components/settings/tool-permissions.d.ts +2 -1
- package/dist/components/settings/tool-permissions.d.ts.map +1 -1
- package/dist/components/settings/tool-permissions.js +33 -16
- package/dist/components/settings/tool-permissions.js.map +1 -1
- package/dist/components/settings/web-search-chain.d.ts +41 -0
- package/dist/components/settings/web-search-chain.d.ts.map +1 -0
- package/dist/components/settings/web-search-chain.js +47 -0
- package/dist/components/settings/web-search-chain.js.map +1 -0
- package/dist/components/settings/web-search-settings.d.ts +4 -7
- package/dist/components/settings/web-search-settings.d.ts.map +1 -1
- package/dist/components/settings/web-search-settings.js +54 -76
- package/dist/components/settings/web-search-settings.js.map +1 -1
- package/dist/components/share/share-menu.d.ts.map +1 -1
- package/dist/components/share/share-menu.js +24 -4
- package/dist/components/share/share-menu.js.map +1 -1
- package/dist/components/voice/dictation-sheet.js +3 -3
- package/dist/components/voice/dictation-sheet.js.map +1 -1
- package/dist/components/voice/mic-button.js +1 -1
- package/dist/components/voice/mic-button.js.map +1 -1
- package/dist/components/voice/review-card.js +1 -1
- package/dist/components/voice/review-card.js.map +1 -1
- package/dist/config.d.ts +5 -2
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +15 -5
- package/dist/config.js.map +1 -1
- package/dist/connection.d.ts +12 -0
- package/dist/connection.d.ts.map +1 -0
- package/dist/connection.js +421 -0
- package/dist/connection.js.map +1 -0
- package/dist/default-root.d.ts +3 -0
- package/dist/default-root.d.ts.map +1 -0
- package/dist/default-root.js +16 -0
- package/dist/default-root.js.map +1 -0
- package/dist/hooks/use-color-scheme.d.ts +14 -0
- package/dist/hooks/use-color-scheme.d.ts.map +1 -0
- package/dist/hooks/use-color-scheme.js +37 -0
- package/dist/hooks/use-color-scheme.js.map +1 -0
- package/dist/hooks/use-hash-routes.d.ts.map +1 -1
- package/dist/hooks/use-hash-routes.js +4 -2
- package/dist/hooks/use-hash-routes.js.map +1 -1
- package/dist/hooks/use-media-query.d.ts +7 -0
- package/dist/hooks/use-media-query.d.ts.map +1 -0
- package/dist/hooks/use-media-query.js +34 -0
- package/dist/hooks/use-media-query.js.map +1 -0
- package/dist/hooks/use-share-intake.d.ts.map +1 -1
- package/dist/hooks/use-share-intake.js +37 -12
- package/dist/hooks/use-share-intake.js.map +1 -1
- package/dist/hooks/use-vpn-status.d.ts.map +1 -1
- package/dist/hooks/use-vpn-status.js +17 -18
- package/dist/hooks/use-vpn-status.js.map +1 -1
- package/dist/hooks/use-websocket.d.ts +5 -24
- package/dist/hooks/use-websocket.d.ts.map +1 -1
- package/dist/hooks/use-websocket.js +11 -384
- package/dist/hooks/use-websocket.js.map +1 -1
- package/dist/hooks/websocket-handlers/activity.d.ts +2 -2
- package/dist/hooks/websocket-handlers/activity.d.ts.map +1 -1
- package/dist/hooks/websocket-handlers/activity.js +4 -5
- package/dist/hooks/websocket-handlers/activity.js.map +1 -1
- package/dist/hooks/websocket-handlers/chat.d.ts +1 -0
- package/dist/hooks/websocket-handlers/chat.d.ts.map +1 -1
- package/dist/hooks/websocket-handlers/chat.js +27 -5
- package/dist/hooks/websocket-handlers/chat.js.map +1 -1
- package/dist/hooks/websocket-handlers/connection.d.ts.map +1 -1
- package/dist/hooks/websocket-handlers/connection.js +4 -6
- package/dist/hooks/websocket-handlers/connection.js.map +1 -1
- package/dist/hooks/websocket-handlers/mask.d.ts +1 -1
- package/dist/hooks/websocket-handlers/mask.d.ts.map +1 -1
- package/dist/hooks/websocket-handlers/mask.js +2 -3
- package/dist/hooks/websocket-handlers/mask.js.map +1 -1
- package/dist/hooks/websocket-handlers/provider.d.ts.map +1 -1
- package/dist/hooks/websocket-handlers/provider.js +4 -6
- package/dist/hooks/websocket-handlers/provider.js.map +1 -1
- package/dist/hooks/websocket-handlers/types.d.ts +6 -2
- package/dist/hooks/websocket-handlers/types.d.ts.map +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/dist/lib/api-client.d.ts +289 -0
- package/dist/lib/api-client.d.ts.map +1 -1
- package/dist/lib/api-client.js +243 -224
- package/dist/lib/api-client.js.map +1 -1
- package/dist/lib/backend.d.ts +19 -2
- package/dist/lib/backend.d.ts.map +1 -1
- package/dist/lib/backend.js +15 -9
- package/dist/lib/backend.js.map +1 -1
- package/dist/lib/diff.d.ts +8 -10
- package/dist/lib/diff.d.ts.map +1 -1
- package/dist/lib/diff.js +26 -53
- package/dist/lib/diff.js.map +1 -1
- package/dist/lib/light-dark.d.ts +37 -0
- package/dist/lib/light-dark.d.ts.map +1 -0
- package/dist/lib/light-dark.js +83 -0
- package/dist/lib/light-dark.js.map +1 -0
- package/dist/lib/mermaid-theme.d.ts +7 -2
- package/dist/lib/mermaid-theme.d.ts.map +1 -1
- package/dist/lib/mermaid-theme.js +125 -203
- package/dist/lib/mermaid-theme.js.map +1 -1
- package/dist/lib/passkeys.d.ts +6 -3
- package/dist/lib/passkeys.d.ts.map +1 -1
- package/dist/lib/passkeys.js +10 -4
- package/dist/lib/passkeys.js.map +1 -1
- package/dist/lib/push-registration.d.ts +4 -1
- package/dist/lib/push-registration.d.ts.map +1 -1
- package/dist/lib/push-registration.js +20 -2
- package/dist/lib/push-registration.js.map +1 -1
- package/dist/lib/share-intake.d.ts +2 -1
- package/dist/lib/share-intake.d.ts.map +1 -1
- package/dist/lib/share-intake.js +3 -3
- package/dist/lib/share-intake.js.map +1 -1
- package/dist/lib/share.d.ts +4 -3
- package/dist/lib/share.d.ts.map +1 -1
- package/dist/lib/share.js +6 -7
- package/dist/lib/share.js.map +1 -1
- package/dist/lib/single-key.d.ts +30 -0
- package/dist/lib/single-key.d.ts.map +1 -0
- package/dist/lib/single-key.js +45 -0
- package/dist/lib/single-key.js.map +1 -0
- package/dist/lib/tool-names.d.ts +8 -6
- package/dist/lib/tool-names.d.ts.map +1 -1
- package/dist/lib/tool-names.js +17 -7
- package/dist/lib/tool-names.js.map +1 -1
- package/dist/root-context.d.ts +229 -0
- package/dist/root-context.d.ts.map +1 -0
- package/dist/root-context.js +33 -0
- package/dist/root-context.js.map +1 -0
- package/dist/root.d.ts +38 -0
- package/dist/root.d.ts.map +1 -0
- package/dist/root.js +47 -0
- package/dist/root.js.map +1 -0
- package/dist/stores/activity-state.d.ts +29 -0
- package/dist/stores/activity-state.d.ts.map +1 -0
- package/dist/stores/activity-state.js +282 -0
- package/dist/stores/activity-state.js.map +1 -0
- package/dist/stores/activity-store.d.ts +10 -41
- package/dist/stores/activity-store.d.ts.map +1 -1
- package/dist/stores/activity-store.js +9 -271
- package/dist/stores/activity-store.js.map +1 -1
- package/dist/stores/chat-state.d.ts +212 -0
- package/dist/stores/chat-state.d.ts.map +1 -0
- package/dist/stores/chat-state.js +466 -0
- package/dist/stores/chat-state.js.map +1 -0
- package/dist/stores/chat-store.d.ts +4 -162
- package/dist/stores/chat-store.d.ts.map +1 -1
- package/dist/stores/chat-store.js +7 -418
- package/dist/stores/chat-store.js.map +1 -1
- package/dist/stores/connection-state.d.ts +40 -0
- package/dist/stores/connection-state.d.ts.map +1 -0
- package/dist/stores/connection-state.js +30 -0
- package/dist/stores/connection-state.js.map +1 -0
- package/dist/stores/connection-store.d.ts +4 -40
- package/dist/stores/connection-store.d.ts.map +1 -1
- package/dist/stores/connection-store.js +7 -27
- package/dist/stores/connection-store.js.map +1 -1
- package/dist/stores/create-stores.d.ts +23 -0
- package/dist/stores/create-stores.d.ts.map +1 -0
- package/dist/stores/create-stores.js +28 -0
- package/dist/stores/create-stores.js.map +1 -0
- package/dist/stores/file-state.d.ts +53 -0
- package/dist/stores/file-state.d.ts.map +1 -0
- package/dist/stores/file-state.js +341 -0
- package/dist/stores/file-state.js.map +1 -0
- package/dist/stores/file-store.d.ts +4 -52
- package/dist/stores/file-store.d.ts.map +1 -1
- package/dist/stores/file-store.js +7 -336
- package/dist/stores/file-store.js.map +1 -1
- package/dist/stores/graph-state.d.ts +95 -0
- package/dist/stores/graph-state.d.ts.map +1 -0
- package/dist/stores/graph-state.js +252 -0
- package/dist/stores/graph-state.js.map +1 -0
- package/dist/stores/graph-store.d.ts +7 -83
- package/dist/stores/graph-store.d.ts.map +1 -1
- package/dist/stores/graph-store.js +8 -249
- package/dist/stores/graph-store.js.map +1 -1
- package/dist/stores/mask-state.d.ts +21 -0
- package/dist/stores/mask-state.d.ts.map +1 -0
- package/dist/stores/mask-state.js +9 -0
- package/dist/stores/mask-state.js.map +1 -0
- package/dist/stores/mask-store.d.ts +4 -21
- package/dist/stores/mask-store.d.ts.map +1 -1
- package/dist/stores/mask-store.js +7 -6
- package/dist/stores/mask-store.js.map +1 -1
- package/dist/stores/principal-state.d.ts +16 -0
- package/dist/stores/principal-state.d.ts.map +1 -0
- package/dist/stores/principal-state.js +31 -0
- package/dist/stores/principal-state.js.map +1 -0
- package/dist/stores/principal-store.d.ts +4 -15
- package/dist/stores/principal-store.d.ts.map +1 -1
- package/dist/stores/principal-store.js +7 -28
- package/dist/stores/principal-store.js.map +1 -1
- package/dist/stores/provider-state.d.ts +24 -0
- package/dist/stores/provider-state.d.ts.map +1 -0
- package/dist/stores/provider-state.js +68 -0
- package/dist/stores/provider-state.js.map +1 -0
- package/dist/stores/provider-store.d.ts +4 -23
- package/dist/stores/provider-store.d.ts.map +1 -1
- package/dist/stores/provider-store.js +7 -64
- package/dist/stores/provider-store.js.map +1 -1
- package/dist/stores/share-state.d.ts +29 -0
- package/dist/stores/share-state.d.ts.map +1 -0
- package/dist/stores/share-state.js +21 -0
- package/dist/stores/share-state.js.map +1 -0
- package/dist/stores/share-store.d.ts +4 -28
- package/dist/stores/share-store.d.ts.map +1 -1
- package/dist/stores/share-store.js +7 -18
- package/dist/stores/share-store.js.map +1 -1
- package/dist/stores/store-environment.d.ts +10 -0
- package/dist/stores/store-environment.d.ts.map +1 -0
- package/dist/stores/store-environment.js +2 -0
- package/dist/stores/store-environment.js.map +1 -0
- package/dist/stores/ui-state.d.ts +71 -0
- package/dist/stores/ui-state.d.ts.map +1 -0
- package/dist/stores/ui-state.js +58 -0
- package/dist/stores/ui-state.js.map +1 -0
- package/dist/stores/ui-store.d.ts +4 -45
- package/dist/stores/ui-store.d.ts.map +1 -1
- package/dist/stores/ui-store.js +7 -36
- package/dist/stores/ui-store.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/theme.css +150 -97
- package/dist/voice/asr-clients.d.ts +2 -1
- package/dist/voice/asr-clients.d.ts.map +1 -1
- package/dist/voice/asr-clients.js +16 -17
- package/dist/voice/asr-clients.js.map +1 -1
- package/dist/voice/use-dictation.d.ts.map +1 -1
- package/dist/voice/use-dictation.js +12 -8
- package/dist/voice/use-dictation.js.map +1 -1
- package/dist/voice/voice-state.d.ts +25 -0
- package/dist/voice/voice-state.d.ts.map +1 -0
- package/dist/voice/voice-state.js +29 -0
- package/dist/voice/voice-state.js.map +1 -0
- package/dist/voice/voice-store.d.ts +4 -25
- package/dist/voice/voice-store.d.ts.map +1 -1
- package/dist/voice/voice-store.js +7 -26
- package/dist/voice/voice-store.js.map +1 -1
- package/package.json +3 -2
- package/src/components/activity/activity-page.tsx +334 -160
- package/src/components/activity/activity-run-detail.tsx +81 -47
- package/src/components/activity/activity-run-list.tsx +27 -59
- package/src/components/activity/activity-views.tsx +155 -0
- package/src/components/activity/approval-card.tsx +80 -0
- package/src/components/activity/digest-card.tsx +25 -61
- package/src/components/activity/digest-summary.tsx +52 -0
- package/src/components/activity/push-switch.tsx +62 -0
- package/src/components/activity/push-toggle.tsx +51 -81
- package/src/components/activity/span-bits.tsx +8 -7
- package/src/components/chat/ask-user-card.tsx +292 -356
- package/src/components/chat/ask-user-typed.ts +77 -0
- package/src/components/chat/brain-markdown-links.tsx +4 -4
- package/src/components/chat/brain-markdown.tsx +4 -2
- package/src/components/chat/chat-page.tsx +38 -9
- package/src/components/chat/composer-view.tsx +194 -0
- package/src/components/chat/composer.tsx +117 -296
- package/src/components/chat/markdown-content.tsx +53 -2
- package/src/components/chat/mermaid-block.tsx +13 -5
- package/src/components/chat/mermaid-share.ts +8 -7
- package/src/components/chat/mermaid-viewer.tsx +3 -1
- package/src/components/chat/message-bubble.tsx +78 -94
- package/src/components/chat/message-share.ts +7 -7
- package/src/components/chat/renderers/bind.tsx +94 -0
- package/src/components/chat/renderers/brain-ui-tools.tsx +56 -0
- package/src/components/chat/renderers/claude-tools.tsx +3 -2
- package/src/components/chat/renderers/index.ts +15 -10
- package/src/components/chat/session-drawer.tsx +41 -138
- package/src/components/chat/session-list.tsx +113 -0
- package/src/components/chat/share-block.tsx +16 -12
- package/src/components/chat/share-card.tsx +2 -2
- package/src/components/chat/subagent-view.tsx +4 -4
- package/src/components/chat/tool-call-timeline.tsx +59 -22
- package/src/components/chat/tool-cards/block-card.tsx +145 -0
- package/src/components/chat/tool-cards/image-mask-card.tsx +214 -0
- package/src/components/chat/tool-cards/location-card.tsx +159 -0
- package/src/components/chat/tool-views.tsx +21 -60
- package/src/components/chat/transcript-turn.tsx +108 -0
- package/src/components/chat/use-chat-commands.ts +14 -16
- package/src/components/chat/welcome-state.tsx +36 -91
- package/src/components/connectivity/connection-gate.tsx +32 -24
- package/src/components/connectivity/login-form.tsx +122 -0
- package/src/components/connectivity/login-screen.tsx +45 -100
- package/src/components/dev/share-harness.tsx +2 -2
- package/src/components/files/file-panel.tsx +168 -0
- package/src/components/files/file-tree-view.tsx +127 -0
- package/src/components/files/file-tree.tsx +55 -109
- package/src/components/files/file-viewer-binary.tsx +3 -2
- package/src/components/files/file-viewer-frame.tsx +113 -0
- package/src/components/files/file-viewer.tsx +40 -95
- package/src/components/files/frontmatter-chips.tsx +42 -0
- package/src/components/files/frontmatter-panel.tsx +6 -71
- package/src/components/files/staleness.ts +29 -0
- package/src/components/graph/graph-canvas.tsx +24 -1
- package/src/components/graph/graph-controls-column.tsx +92 -0
- package/src/components/graph/graph-controls.tsx +83 -127
- package/src/components/graph/graph-form.tsx +183 -0
- package/src/components/graph/graph-maintenance.tsx +9 -14
- package/src/components/graph/graph-node-rail.tsx +147 -0
- package/src/components/graph/graph-page.tsx +189 -49
- package/src/components/graph/graph-scene.tsx +200 -30
- package/src/components/graph/lib/graph-helpers.ts +65 -43
- package/src/components/graph/node-card.tsx +64 -0
- package/src/components/graph/node-popover.tsx +28 -117
- package/src/components/graph/use-graph-theme.ts +69 -32
- package/src/components/graph/use-node-actions.ts +56 -0
- package/src/components/images/image-share.ts +4 -2
- package/src/components/images/image-viewer.tsx +3 -1
- package/src/components/images/mask-editor.tsx +7 -4
- package/src/components/layout/app-shell.tsx +5 -1
- package/src/components/layout/desktop-palette.tsx +151 -0
- package/src/components/layout/key-cap.tsx +15 -0
- package/src/components/layout/mobile-tab-bar.tsx +80 -157
- package/src/components/layout/shortcut-switch.tsx +32 -0
- package/src/components/layout/side-rail.tsx +70 -150
- package/src/components/layout/slide-panel.tsx +29 -2
- package/src/components/layout/theme.tsx +67 -0
- package/src/components/quick-actions/add-form.tsx +188 -0
- package/src/components/quick-actions/add-modal.tsx +32 -153
- package/src/components/quick-actions/search-modal.tsx +5 -3
- package/src/components/quick-actions/streaming-modal.tsx +42 -71
- package/src/components/quick-actions/streaming-output.tsx +112 -0
- package/src/components/quick-actions/whatsup-modal.tsx +38 -60
- package/src/components/settings/devices-agents-tab.tsx +60 -152
- package/src/components/settings/models-list.tsx +299 -0
- package/src/components/settings/models-tab.tsx +63 -337
- package/src/components/settings/one-time-agent-credential.tsx +1 -1
- package/src/components/settings/passkey-list.tsx +201 -0
- package/src/components/settings/passkey-tab.tsx +53 -197
- package/src/components/settings/pi-accounts-list.tsx +128 -0
- package/src/components/settings/pi-accounts.tsx +71 -170
- package/src/components/settings/principal-list.tsx +172 -0
- package/src/components/settings/settings-panel.tsx +232 -21
- package/src/components/settings/skills-list.tsx +276 -0
- package/src/components/settings/skills-tab.tsx +82 -269
- package/src/components/settings/tool-permissions-list.tsx +54 -0
- package/src/components/settings/tool-permissions.tsx +27 -46
- package/src/components/settings/web-search-chain.tsx +300 -0
- package/src/components/settings/web-search-settings.tsx +58 -328
- package/src/components/share/share-menu.tsx +19 -4
- package/src/components/voice/dictation-sheet.tsx +5 -5
- package/src/components/voice/mic-button.tsx +1 -1
- package/src/components/voice/review-card.tsx +1 -1
- package/src/config.ts +21 -7
- package/src/connection.ts +443 -0
- package/src/default-root.ts +16 -0
- package/src/hooks/use-color-scheme.ts +36 -0
- package/src/hooks/use-hash-routes.ts +4 -2
- package/src/hooks/use-media-query.ts +32 -0
- package/src/hooks/use-share-intake.ts +32 -12
- package/src/hooks/use-vpn-status.ts +18 -17
- package/src/hooks/use-websocket.ts +12 -428
- package/src/hooks/websocket-handlers/activity.ts +4 -5
- package/src/hooks/websocket-handlers/chat.ts +26 -5
- package/src/hooks/websocket-handlers/connection.ts +4 -6
- package/src/hooks/websocket-handlers/mask.ts +2 -3
- package/src/hooks/websocket-handlers/provider.ts +4 -6
- package/src/hooks/websocket-handlers/types.ts +6 -2
- package/src/index.ts +7 -3
- package/src/lib/api-client.ts +426 -384
- package/src/lib/backend.ts +20 -10
- package/src/lib/diff.ts +28 -62
- package/src/lib/light-dark.ts +83 -0
- package/src/lib/mermaid-theme.ts +183 -214
- package/src/lib/passkeys.ts +12 -4
- package/src/lib/push-registration.ts +19 -2
- package/src/lib/share-intake.ts +6 -3
- package/src/lib/share.ts +7 -4
- package/src/lib/single-key.ts +47 -0
- package/src/lib/tool-names.ts +31 -8
- package/src/root-context.tsx +40 -0
- package/src/root.ts +83 -0
- package/src/stores/activity-state.ts +295 -0
- package/src/stores/activity-store.ts +11 -285
- package/src/stores/chat-state.ts +795 -0
- package/src/stores/chat-store.ts +11 -705
- package/src/stores/connection-state.ts +78 -0
- package/src/stores/connection-store.ts +11 -76
- package/src/stores/create-stores.ts +31 -0
- package/src/stores/file-state.ts +399 -0
- package/src/stores/file-store.ts +9 -390
- package/src/stores/graph-state.ts +368 -0
- package/src/stores/graph-store.ts +10 -355
- package/src/stores/mask-state.ts +30 -0
- package/src/stores/mask-store.ts +10 -27
- package/src/stores/principal-state.ts +42 -0
- package/src/stores/principal-store.ts +10 -37
- package/src/stores/provider-state.ts +103 -0
- package/src/stores/provider-store.ts +10 -95
- package/src/stores/share-state.ts +56 -0
- package/src/stores/share-store.ts +11 -54
- package/src/stores/store-environment.ts +10 -0
- package/src/stores/ui-state.ts +143 -0
- package/src/stores/ui-store.ts +11 -93
- package/src/styles.css +4 -1
- package/src/theme.css +150 -97
- package/src/voice/asr-clients.ts +17 -17
- package/src/voice/use-dictation.ts +11 -8
- package/src/voice/voice-state.ts +57 -0
- package/src/voice/voice-store.ts +11 -55
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph-helpers.js","sourceRoot":"","sources":["../../../../src/components/graph/lib/graph-helpers.ts"],"names":[],"mappings":"AAUA,gFAAgF;AAEhF;;;GAGG;AACH,MAAM,UAAU,UAAU,CACxB,MAAoE;IAEpE,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,MA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C,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1D,CAAC;IACD,MAAM,KAAK,GAAa,CAAC,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;IACzD,OAAO,CAAC,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC;SACzB,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;SACjE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QACb,MAAM,EAAE,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QACjC,MAAM,EAAE,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QACjC,IAAI,EAAE,KAAK,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;YAAE,OAAO,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACrG,OAAO,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAC3D,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The selected node's card, rendered from props (S7). `NodePopover` is the
|
|
3
|
+
* container: it reads the graph, file and UI stores and decides which
|
|
4
|
+
* actions apply; this draws a kit `Surface` with the node's kind and topic
|
|
5
|
+
* as chips, its path as a `PathRef`, its degrees as machine meta, and the
|
|
6
|
+
* actions as kit `Button`s — "Open note" primary, the rest ghost.
|
|
7
|
+
*/
|
|
8
|
+
export interface NodeCardProps {
|
|
9
|
+
kind: string;
|
|
10
|
+
title: string;
|
|
11
|
+
path: string;
|
|
12
|
+
topic?: string | null;
|
|
13
|
+
/** The topic cluster's swatch colour, from the canvas's own palette. */
|
|
14
|
+
topicColor?: string;
|
|
15
|
+
inDegree: number;
|
|
16
|
+
outDegree: number;
|
|
17
|
+
/** Hops from the centre; 0 or undefined draws nothing. */
|
|
18
|
+
distance?: number;
|
|
19
|
+
canOpen: boolean;
|
|
20
|
+
canFocus: boolean;
|
|
21
|
+
canExpand: boolean;
|
|
22
|
+
onOpen: () => void;
|
|
23
|
+
onFocus: () => void;
|
|
24
|
+
onExpand: () => void;
|
|
25
|
+
onClose: () => void;
|
|
26
|
+
}
|
|
27
|
+
export declare function NodeCard(p: NodeCardProps): import("react").JSX.Element;
|
|
28
|
+
//# sourceMappingURL=node-card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-card.d.ts","sourceRoot":"","sources":["../../../src/components/graph/node-card.tsx"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,wEAAwE;IACxE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,aAAa,+BAkCxC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button, Chip, PathRef, Surface } from "@schlessera/brain-ui-kit";
|
|
3
|
+
export function NodeCard(p) {
|
|
4
|
+
const hops = p.distance !== undefined && p.distance > 0 ? `${p.distance} hop${p.distance === 1 ? "" : "s"}` : null;
|
|
5
|
+
return (_jsx("div", { className: "pointer-events-auto absolute inset-x-2 bottom-2 z-10 shadow-2xl md:inset-x-auto md:bottom-4 md:left-4 md:w-80", children: _jsxs(Surface, { emphasis: "strong", pad: 12, children: [_jsxs("div", { className: "flex items-start justify-between gap-2", children: [_jsxs("div", { className: "flex min-w-0 flex-wrap items-center gap-1.5", children: [_jsx(Chip, { label: p.kind, variant: "kv", tone: "neutral", caps: true }), p.topic && (_jsxs("span", { title: "Topic cluster inferred from this note's links", className: "flex min-w-0 items-center gap-1.5", children: [p.topicColor && _jsx("span", { "aria-hidden": "true", className: "h-1.5 w-1.5 shrink-0 rounded-full", style: { backgroundColor: p.topicColor } }), _jsx(Chip, { label: `topic: ${p.topic}`, variant: "kv", tone: "purple" })] }))] }), _jsx(Button, { label: "Close", icon: "dismiss", tone: "quiet", size: "sm", block: false, onClick: p.onClose })] }), _jsx("h3", { className: "mt-2 truncate text-sm font-medium text-foreground", children: p.title }), _jsx("div", { className: "mt-1 flex min-w-0", children: _jsx(PathRef, { text: p.path, variant: "inline", tone: "teal", icon: "file" }) }), _jsxs("div", { className: "mt-2 flex gap-4 font-[family-name:var(--font-mono)] text-[11px] text-muted-foreground", children: [_jsxs("span", { children: [p.inDegree, " in"] }), _jsxs("span", { children: [p.outDegree, " out"] }), hops && _jsx("span", { children: hops })] }), _jsxs("div", { className: "mt-3 flex flex-wrap gap-2", children: [p.canOpen && _jsx(Button, { label: "Open note", icon: "file", tone: "primary", size: "sm", block: false, onClick: p.onOpen }), p.canFocus && _jsx(Button, { label: "Focus here", icon: "graph", tone: "ghost", size: "sm", block: false, onClick: p.onFocus }), p.canExpand && _jsx(Button, { label: "Expand", icon: "expand", tone: "ghost", size: "sm", block: false, onClick: p.onExpand })] })] }) }));
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=node-card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-card.js","sourceRoot":"","sources":["../../../src/components/graph/node-card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AA6B1E,MAAM,UAAU,QAAQ,CAAC,CAAgB;IACvC,MAAM,IAAI,GAAG,CAAC,CAAC,QAAQ,KAAK,SAAS,IAAI,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,OAAO,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;IACnH,OAAO,CACL,cAAK,SAAS,EAAC,+GAA+G,YAC5H,MAAC,OAAO,IAAC,QAAQ,EAAC,QAAQ,EAAC,GAAG,EAAE,EAAE,aAChC,eAAK,SAAS,EAAC,wCAAwC,aACrD,eAAK,SAAS,EAAC,6CAA6C,aAC1D,KAAC,IAAI,IAAC,KAAK,EAAE,CAAC,CAAC,IAAI,EAAE,OAAO,EAAC,IAAI,EAAC,IAAI,EAAC,SAAS,EAAC,IAAI,SAAG,EACvD,CAAC,CAAC,KAAK,IAAI,CACV,gBAAM,KAAK,EAAC,+CAA+C,EAAC,SAAS,EAAC,mCAAmC,aACtG,CAAC,CAAC,UAAU,IAAI,8BAAkB,MAAM,EA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C,OAAO,GAAI,EACjH,CAAC,CAAC,SAAS,IAAI,KAAC,MAAM,IAAC,KAAK,EAAC,QAAQ,EAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,IAAI,EAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,QAAQ,GAAI,IAC7G,IACE,GACN,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import type { GraphNodePayload } from "@schlessera/brain-ui-sdk/protocol";
|
|
2
2
|
/**
|
|
3
3
|
* Detail card for the selected node, docked to the bottom-left of the canvas
|
|
4
|
-
* (bottom sheet width on phones).
|
|
5
|
-
*
|
|
4
|
+
* (bottom sheet width on phones). From `wide:` the D6 right rail draws the
|
|
5
|
+
* node instead and `SceneBody` does not mount this.
|
|
6
|
+
*
|
|
7
|
+
* This is the container (S7): the store reads and the "which actions
|
|
8
|
+
* apply" rules (`useNodeActions`) live here; `NodeCard` draws the card on
|
|
9
|
+
* the kit.
|
|
6
10
|
*/
|
|
7
11
|
export declare function NodePopover({ node, communityLabel, }: {
|
|
8
12
|
node: GraphNodePayload;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-popover.d.ts","sourceRoot":"","sources":["../../../src/components/graph/node-popover.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"node-popover.d.ts","sourceRoot":"","sources":["../../../src/components/graph/node-popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAM1E;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,cAAc,GACf,EAAE;IACD,IAAI,EAAE,gBAAgB,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC,+BAwBA"}
|
|
@@ -1,39 +1,21 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
2
|
-
import { X, FileText, Crosshair, Expand } from "lucide-react";
|
|
3
|
-
import { useFileStore } from "../../stores/file-store.js";
|
|
4
|
-
import { useUIStore } from "../../stores/ui-store.js";
|
|
5
|
-
import { useGraphStore } from "../../stores/graph-store.js";
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
2
|
import { communityColor } from "./lib/graph-helpers.js";
|
|
3
|
+
import { NodeCard } from "./node-card.js";
|
|
4
|
+
import { useGraphTheme } from "./use-graph-theme.js";
|
|
5
|
+
import { useNodeActions } from "./use-node-actions.js";
|
|
7
6
|
/**
|
|
8
7
|
* Detail card for the selected node, docked to the bottom-left of the canvas
|
|
9
|
-
* (bottom sheet width on phones).
|
|
10
|
-
*
|
|
8
|
+
* (bottom sheet width on phones). From `wide:` the D6 right rail draws the
|
|
9
|
+
* node instead and `SceneBody` does not mount this.
|
|
10
|
+
*
|
|
11
|
+
* This is the container (S7): the store reads and the "which actions
|
|
12
|
+
* apply" rules (`useNodeActions`) live here; `NodeCard` draws the card on
|
|
13
|
+
* the kit.
|
|
11
14
|
*/
|
|
12
15
|
export function NodePopover({ node, communityLabel, }) {
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const mode = useGraphStore((s) => s.mode);
|
|
16
|
-
const select = useGraphStore((s) => s.select);
|
|
17
|
-
const setMode = useGraphStore((s) => s.setMode);
|
|
18
|
-
const setLocalParams = useGraphStore((s) => s.setLocalParams);
|
|
19
|
-
const expandNode = useGraphStore((s) => s.expandNode);
|
|
16
|
+
const actions = useNodeActions(node);
|
|
17
|
+
const theme = useGraphTheme();
|
|
20
18
|
const isVirtual = node.virtual === true;
|
|
21
|
-
|
|
22
|
-
setFilePanelOpen(true);
|
|
23
|
-
void openFile(node.path);
|
|
24
|
-
}
|
|
25
|
-
function handleFocus() {
|
|
26
|
-
// Re-center the local view on this node (switching mode when needed).
|
|
27
|
-
if (mode !== "local")
|
|
28
|
-
setMode("local");
|
|
29
|
-
setLocalParams({ center: node.path });
|
|
30
|
-
select(null);
|
|
31
|
-
}
|
|
32
|
-
return (_jsxs("div", { className: "pointer-events-auto absolute inset-x-2 bottom-2 z-10 rounded-xl border border-border bg-surface-overlay/95 p-4 shadow-2xl backdrop-blur md:inset-x-auto md:left-4 md:bottom-4 md:w-80", children: [_jsxs("div", { className: "flex items-start justify-between gap-2", children: [_jsxs("div", { className: "min-w-0", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "shrink-0 rounded bg-surface-raised px-1.5 py-0.5 text-[10px] uppercase tracking-wide text-muted-foreground", children: isVirtual ? "root" : node.type }), communityLabel && (_jsxs("span", { title: "Topic cluster inferred from this note's links", className: "flex min-w-0 items-center gap-1 rounded bg-surface-raised px-1.5 py-0.5 text-[10px] text-muted-foreground", children: [node.community !== undefined && (_jsx("span", { "aria-hidden": "true", className: "h-1.5 w-1.5 shrink-0 rounded-full", style: { backgroundColor: communityColor(node.community) } })), _jsxs("span", { className: "truncate", children: ["Topic: ", communityLabel] })] }))] }), _jsx("h3", { className: "mt-1 truncate text-sm font-medium text-foreground", children: node.title || node.path }), _jsx("p", { className: "truncate font-mono text-[10px] text-muted-foreground/60", children: node.path })] }), _jsx("button", { onClick: () => select(null), className: "shrink-0 rounded p-1 text-muted-foreground transition-colors hover:text-foreground", title: "Close", children: _jsx(X, { className: "h-3.5 w-3.5" }) })] }), _jsxs("div", { className: "mt-2 flex gap-4 text-[11px] text-muted-foreground", children: [_jsxs("span", { children: [node.inDegree, " in"] }), _jsxs("span", { children: [node.outDegree, " out"] }), node.distance !== undefined && node.distance > 0 && (_jsxs("span", { children: [node.distance, " hop", node.distance === 1 ? "" : "s"] }))] }), _jsxs("div", { className: "mt-3 flex flex-wrap gap-2", children: [!isVirtual && (_jsx(ActionButton, { icon: FileText, label: "Open note", onClick: handleOpen, primary: true })), !isVirtual && (mode !== "local" || node.distance !== 0) && (_jsx(ActionButton, { icon: Crosshair, label: "Focus here", onClick: handleFocus })), mode === "local" && !isVirtual && node.distance !== 0 && (_jsx(ActionButton, { icon: Expand, label: "Expand", onClick: () => void expandNode(node.path) }))] })] }));
|
|
33
|
-
}
|
|
34
|
-
function ActionButton({ icon: Icon, label, onClick, primary, }) {
|
|
35
|
-
return (_jsxs("button", { onClick: onClick, className: primary
|
|
36
|
-
? "flex min-h-9 items-center gap-1.5 rounded-lg bg-primary px-3 py-1.5 text-xs font-medium text-primary-foreground transition-colors hover:bg-primary/90"
|
|
37
|
-
: "flex min-h-9 items-center gap-1.5 rounded-lg bg-surface-raised px-3 py-1.5 text-xs font-medium text-foreground transition-colors hover:bg-surface-overlay", children: [_jsx(Icon, { className: "h-3.5 w-3.5" }), label] }));
|
|
19
|
+
return (_jsx(NodeCard, { kind: isVirtual ? "root" : node.type, title: node.title || node.path, path: node.path, topic: communityLabel, topicColor: node.community !== undefined ? communityColor(node.community, theme.palette) : undefined, inDegree: node.inDegree, outDegree: node.outDegree, distance: node.distance, canOpen: actions.canOpen, canFocus: actions.canFocus, canExpand: actions.canExpand, onOpen: actions.open, onFocus: actions.focus, onExpand: actions.expand, onClose: actions.close }));
|
|
38
20
|
}
|
|
39
21
|
//# sourceMappingURL=node-popover.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-popover.js","sourceRoot":"","sources":["../../../src/components/graph/node-popover.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"node-popover.js","sourceRoot":"","sources":["../../../src/components/graph/node-popover.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD;;;;;;;;GAQG;AACH,MAAM,UAAU,WAAW,CAAC,EAC1B,IAAI,EACJ,cAAc,GAIf;IACC,MAAM,OAAO,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;IACrC,MAAM,KAAK,GAAG,aAAa,EAAE,CAAC;IAC9B,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,KAAK,IAAI,CAAC;IAExC,OAAO,CACL,KAAC,QAAQ,IACP,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,EACpC,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,IAAI,EAC9B,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,cAAc,EACrB,UAAU,EAAE,IAAI,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,EACpG,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,OAAO,EAAE,OAAO,CAAC,OAAO,EACxB,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAC1B,SAAS,EAAE,OAAO,CAAC,SAAS,EAC5B,MAAM,EAAE,OAAO,CAAC,IAAI,EACpB,OAAO,EAAE,OAAO,CAAC,KAAK,EACtB,QAAQ,EAAE,OAAO,CAAC,MAAM,EACxB,OAAO,EAAE,OAAO,CAAC,KAAK,GACtB,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -1,19 +1,47 @@
|
|
|
1
|
+
import { type ColorScheme } from "../../lib/light-dark.js";
|
|
2
|
+
import type { CanvasPalette } from "./lib/graph-helpers.js";
|
|
1
3
|
export interface GraphTheme {
|
|
2
4
|
background: string;
|
|
3
5
|
/** Raised surface used for the hover-label plate (sigma's default is #FFF,
|
|
4
|
-
* unreadable under
|
|
6
|
+
* unreadable under the dark theme's near-white label text). */
|
|
5
7
|
surfaceOverlay: string;
|
|
6
8
|
node: string;
|
|
7
9
|
nodeSelected: string;
|
|
8
10
|
edge: string;
|
|
9
11
|
edgeHighlight: string;
|
|
12
|
+
/** Every label is drawn in the ink — never in its node's colour, which is
|
|
13
|
+
* a value tuned for a 7px mark, not for the one thing you must read. */
|
|
10
14
|
label: string;
|
|
11
15
|
labelMuted: string;
|
|
16
|
+
/**
|
|
17
|
+
* The kit's entity colours (its `GraphView`, `PathRef` and inline
|
|
18
|
+
* mentions): teal a person, blue a company, purple a project, amber the
|
|
19
|
+
* focus node, and the neutral for any other document type. The three kinds
|
|
20
|
+
* take the MARK weight, which is the fill in the dark and a darkened step
|
|
21
|
+
* on paper, where a fill sits under 3:1 against the canvas.
|
|
22
|
+
*/
|
|
23
|
+
entity: EntityColors;
|
|
24
|
+
/** The categorical slots, the distance ramp and the fixed roles, resolved
|
|
25
|
+
* for the scheme in force. See `CanvasPalette`. */
|
|
26
|
+
palette: CanvasPalette;
|
|
27
|
+
}
|
|
28
|
+
export interface EntityColors {
|
|
29
|
+
person: string;
|
|
30
|
+
company: string;
|
|
31
|
+
project: string;
|
|
32
|
+
focus: string;
|
|
33
|
+
other: string;
|
|
12
34
|
}
|
|
13
35
|
/**
|
|
14
|
-
* Resolve the
|
|
15
|
-
*
|
|
16
|
-
*
|
|
36
|
+
* Resolve the kit's tokens into concrete colours for the canvas — WebGL and
|
|
37
|
+
* `fillStyle` cannot read a CSS custom property, and since the kit's light
|
|
38
|
+
* theme every token is a `light-dark()` pair that `getComputedStyle` returns
|
|
39
|
+
* verbatim, so each is split on the scheme the page is drawing in.
|
|
40
|
+
*
|
|
41
|
+
* Re-resolves when the theme preference or, under `system`, the OS scheme
|
|
42
|
+
* changes; the canvas re-applies it in place (`graph-canvas.tsx`).
|
|
17
43
|
*/
|
|
18
44
|
export declare function useGraphTheme(): GraphTheme;
|
|
45
|
+
/** The theme for one scheme, from the tokens. Exported for tests. */
|
|
46
|
+
export declare function graphTheme(scheme: ColorScheme): GraphTheme;
|
|
19
47
|
//# sourceMappingURL=use-graph-theme.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-graph-theme.d.ts","sourceRoot":"","sources":["../../../src/components/graph/use-graph-theme.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-graph-theme.d.ts","sourceRoot":"","sources":["../../../src/components/graph/use-graph-theme.ts"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE5D,MAAM,WAAW,UAAU;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB;mEAC+D;IAC/D,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB;4EACwE;IACxE,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB;;;;;;OAMG;IACH,MAAM,EAAE,YAAY,CAAC;IACrB;uDACmD;IACnD,OAAO,EAAE,aAAa,CAAC;CACxB;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,IAAI,UAAU,CAG1C;AAED,qEAAqE;AACrE,wBAAgB,UAAU,CAAC,MAAM,EAAE,WAAW,GAAG,UAAU,CA+B1D"}
|
|
@@ -1,38 +1,50 @@
|
|
|
1
1
|
import { useMemo } from "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
surfaceOverlay: "#1e2128",
|
|
5
|
-
node: "#8a8691",
|
|
6
|
-
nodeSelected: "#e09f3e",
|
|
7
|
-
edge: "#2a2d35",
|
|
8
|
-
edgeHighlight: "#5bb5a2",
|
|
9
|
-
label: "#e8e4df",
|
|
10
|
-
labelMuted: "#8a8691",
|
|
11
|
-
};
|
|
2
|
+
import { useColorScheme } from "../../hooks/use-color-scheme.js";
|
|
3
|
+
import { readToken } from "../../lib/light-dark.js";
|
|
12
4
|
/**
|
|
13
|
-
* Resolve the
|
|
14
|
-
*
|
|
15
|
-
*
|
|
5
|
+
* Resolve the kit's tokens into concrete colours for the canvas — WebGL and
|
|
6
|
+
* `fillStyle` cannot read a CSS custom property, and since the kit's light
|
|
7
|
+
* theme every token is a `light-dark()` pair that `getComputedStyle` returns
|
|
8
|
+
* verbatim, so each is split on the scheme the page is drawing in.
|
|
9
|
+
*
|
|
10
|
+
* Re-resolves when the theme preference or, under `system`, the OS scheme
|
|
11
|
+
* changes; the canvas re-applies it in place (`graph-canvas.tsx`).
|
|
16
12
|
*/
|
|
17
13
|
export function useGraphTheme() {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
14
|
+
const scheme = useColorScheme();
|
|
15
|
+
return useMemo(() => graphTheme(scheme), [scheme]);
|
|
16
|
+
}
|
|
17
|
+
/** The theme for one scheme, from the tokens. Exported for tests. */
|
|
18
|
+
export function graphTheme(scheme) {
|
|
19
|
+
const token = (name) => readToken(name, scheme);
|
|
20
|
+
return {
|
|
21
|
+
background: token("color-canvas"),
|
|
22
|
+
surfaceOverlay: token("color-raised"),
|
|
23
|
+
node: token("color-ink-mute"),
|
|
24
|
+
nodeSelected: token("canvas-root"),
|
|
25
|
+
edge: token("color-edge"),
|
|
26
|
+
edgeHighlight: token("color-teal"),
|
|
27
|
+
label: token("color-ink"),
|
|
28
|
+
labelMuted: token("color-ink-mute"),
|
|
29
|
+
entity: {
|
|
30
|
+
person: token("teal-mark"),
|
|
31
|
+
company: token("blue-mark"),
|
|
32
|
+
project: token("purple-mark"),
|
|
33
|
+
focus: token("canvas-root"),
|
|
34
|
+
other: token("canvas-other"),
|
|
35
|
+
},
|
|
36
|
+
palette: {
|
|
37
|
+
slots: [1, 2, 3, 4, 5, 6, 7, 8].map((n) => token(`canvas-slot-${n}`)),
|
|
38
|
+
ramp: [1, 2, 3, 4, 5].map((n) => token(`canvas-ramp-${n}`)),
|
|
39
|
+
root: token("canvas-root"),
|
|
40
|
+
other: token("canvas-other"),
|
|
41
|
+
lens: {
|
|
42
|
+
orphan: token("canvas-lens-orphan"),
|
|
43
|
+
unreachable: token("canvas-lens-unreachable"),
|
|
44
|
+
broken: token("canvas-lens-broken"),
|
|
45
|
+
stale: token("canvas-lens-stale"),
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
};
|
|
37
49
|
}
|
|
38
50
|
//# sourceMappingURL=use-graph-theme.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-graph-theme.js","sourceRoot":"","sources":["../../../src/components/graph/use-graph-theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"use-graph-theme.js","sourceRoot":"","sources":["../../../src/components/graph/use-graph-theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAGhC,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,SAAS,EAAoB,MAAM,yBAAyB,CAAC;AAqCtE;;;;;;;;GAQG;AACH,MAAM,UAAU,aAAa;IAC3B,MAAM,MAAM,GAAG,cAAc,EAAE,CAAC;IAChC,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,CAA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AAC,cAAc,CAAC;YAC5B,IAAI,EAAE;gBACJ,MAAM,EAAE,KAAK,CAAC,oBAAoB,CAAC;gBACnC,WAAW,EAAE,KAAK,CAAC,yBAAyB,CAAC;gBAC7C,MAAM,EAAE,KAAK,CAAC,oBAAoB,CAAC;gBACnC,KAAK,EAAE,KAAK,CAAC,mBAAmB,CAAC;aAClC;SACF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { GraphNodePayload } from "@schlessera/brain-ui-sdk/protocol";
|
|
2
|
+
/**
|
|
3
|
+
* The "which actions apply to the selected node" rules, shared by the
|
|
4
|
+
* floating `NodePopover` (below `laptop:`) and the D6 right rail (from
|
|
5
|
+
* `wide:`). Both draw the same node; only the surface differs, so the rules
|
|
6
|
+
* live once.
|
|
7
|
+
*
|
|
8
|
+
* - Open note hands over to the file viewer panel — the same hand-off the
|
|
9
|
+
* search modal uses. Never for a virtual root (no file behind it).
|
|
10
|
+
* - Focus here re-centres the Local view on the node, switching mode when
|
|
11
|
+
* needed; pointless on the node that already is the centre.
|
|
12
|
+
* - Expand pulls the node's depth-1 ego into the scene — Local only, and
|
|
13
|
+
* not for the centre (its ego is the scene).
|
|
14
|
+
*/
|
|
15
|
+
export declare function useNodeActions(node: GraphNodePayload): {
|
|
16
|
+
canOpen: boolean;
|
|
17
|
+
canFocus: boolean;
|
|
18
|
+
canExpand: boolean;
|
|
19
|
+
open(): void;
|
|
20
|
+
focus(): void;
|
|
21
|
+
expand(): void;
|
|
22
|
+
close(): void;
|
|
23
|
+
};
|
|
24
|
+
/** `${n} hop`/`${n} hops`, or null at the centre (0) and where unknown. */
|
|
25
|
+
export declare function hopsLabel(distance: number | undefined): string | null;
|
|
26
|
+
//# sourceMappingURL=use-node-actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-node-actions.d.ts","sourceRoot":"","sources":["../../../src/components/graph/use-node-actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAK1E;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,gBAAgB;;;;;;;;EA+BpD;AAED,2EAA2E;AAC3E,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAGrE"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { useFileStore } from "../../stores/file-store.js";
|
|
2
|
+
import { useUIStore } from "../../stores/ui-store.js";
|
|
3
|
+
import { useGraphStore } from "../../stores/graph-store.js";
|
|
4
|
+
/**
|
|
5
|
+
* The "which actions apply to the selected node" rules, shared by the
|
|
6
|
+
* floating `NodePopover` (below `laptop:`) and the D6 right rail (from
|
|
7
|
+
* `wide:`). Both draw the same node; only the surface differs, so the rules
|
|
8
|
+
* live once.
|
|
9
|
+
*
|
|
10
|
+
* - Open note hands over to the file viewer panel — the same hand-off the
|
|
11
|
+
* search modal uses. Never for a virtual root (no file behind it).
|
|
12
|
+
* - Focus here re-centres the Local view on the node, switching mode when
|
|
13
|
+
* needed; pointless on the node that already is the centre.
|
|
14
|
+
* - Expand pulls the node's depth-1 ego into the scene — Local only, and
|
|
15
|
+
* not for the centre (its ego is the scene).
|
|
16
|
+
*/
|
|
17
|
+
export function useNodeActions(node) {
|
|
18
|
+
const openFile = useFileStore((s) => s.openFile);
|
|
19
|
+
const setFilePanelOpen = useUIStore((s) => s.setFilePanelOpen);
|
|
20
|
+
const mode = useGraphStore((s) => s.mode);
|
|
21
|
+
const select = useGraphStore((s) => s.select);
|
|
22
|
+
const setMode = useGraphStore((s) => s.setMode);
|
|
23
|
+
const setLocalParams = useGraphStore((s) => s.setLocalParams);
|
|
24
|
+
const expandNode = useGraphStore((s) => s.expandNode);
|
|
25
|
+
const isVirtual = node.virtual === true;
|
|
26
|
+
return {
|
|
27
|
+
canOpen: !isVirtual,
|
|
28
|
+
canFocus: !isVirtual && (mode !== "local" || node.distance !== 0),
|
|
29
|
+
canExpand: mode === "local" && !isVirtual && node.distance !== 0,
|
|
30
|
+
open() {
|
|
31
|
+
setFilePanelOpen(true);
|
|
32
|
+
void openFile(node.path);
|
|
33
|
+
},
|
|
34
|
+
focus() {
|
|
35
|
+
if (mode !== "local")
|
|
36
|
+
setMode("local");
|
|
37
|
+
setLocalParams({ center: node.path });
|
|
38
|
+
select(null);
|
|
39
|
+
},
|
|
40
|
+
expand() {
|
|
41
|
+
void expandNode(node.path);
|
|
42
|
+
},
|
|
43
|
+
close() {
|
|
44
|
+
select(null);
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
/** `${n} hop`/`${n} hops`, or null at the centre (0) and where unknown. */
|
|
49
|
+
export function hopsLabel(distance) {
|
|
50
|
+
if (distance === undefined || distance <= 0)
|
|
51
|
+
return null;
|
|
52
|
+
return `${distance} hop${distance === 1 ? "" : "s"}`;
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=use-node-actions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-node-actions.js","sourceRoot":"","sources":["../../../src/components/graph/use-node-actions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,cAAc,CAAC,IAAsB;IACnD,MAAM,QAAQ,GAAG,YAAY,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IACjD,MAAM,gBAAgB,GAAG,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC;IAC/D,MAAM,IAAI,GAAG,aAAa,CAAC,CAAC,CAAC,EAAE,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,SAAS,CAAC,QAA4B;IACpD,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IACzD,OAAO,GAAG,QAAQ,OAAO,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;AACvD,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { BrainUiRoot } from "../../root.js";
|
|
1
2
|
import type { ShareOption } from "../share/share-menu.js";
|
|
2
3
|
/**
|
|
3
4
|
* Share options for one image, used by both the file viewer's header menu and
|
|
@@ -11,7 +12,7 @@ import type { ShareOption } from "../share/share-menu.js";
|
|
|
11
12
|
* when that actually changes something — an image already inside the target
|
|
12
13
|
* falls back to the original rather than being recompressed for show.
|
|
13
14
|
*/
|
|
14
|
-
export declare function buildImageShareOptions(url: string, filename: string, opts?: {
|
|
15
|
+
export declare function buildImageShareOptions(root: BrainUiRoot, url: string, filename: string, opts?: {
|
|
15
16
|
mime?: string;
|
|
16
17
|
bytes?: number;
|
|
17
18
|
}): ShareOption[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-share.d.ts","sourceRoot":"","sources":["../../../src/components/images/image-share.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"image-share.d.ts","sourceRoot":"","sources":["../../../src/components/images/image-share.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAQjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1D;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,WAAW,EACjB,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,EAChB,IAAI,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAO,GAC3C,WAAW,EAAE,CA+Bf"}
|
|
@@ -12,9 +12,9 @@ import { SHARE_OPTIMIZED, formatBytes, optimizeImage, optimizedFilename, } from
|
|
|
12
12
|
* when that actually changes something — an image already inside the target
|
|
13
13
|
* falls back to the original rather than being recompressed for show.
|
|
14
14
|
*/
|
|
15
|
-
export function buildImageShareOptions(url, filename, opts = {}) {
|
|
15
|
+
export function buildImageShareOptions(root, url, filename, opts = {}) {
|
|
16
16
|
const shareOriginal = async () => {
|
|
17
|
-
const file = await fetchAsFile(url, filename, opts.mime);
|
|
17
|
+
const file = await fetchAsFile(root, url, filename, opts.mime);
|
|
18
18
|
return shareFile(file, { title: filename });
|
|
19
19
|
};
|
|
20
20
|
return [
|
|
@@ -29,7 +29,7 @@ export function buildImageShareOptions(url, filename, opts = {}) {
|
|
|
29
29
|
label: "Share optimized",
|
|
30
30
|
hint: `JPEG, up to ${SHARE_OPTIMIZED.maxEdge}px · under ${formatBytes(SHARE_OPTIMIZED.maxBytes)}`,
|
|
31
31
|
run: async () => {
|
|
32
|
-
const original = await fetchAsFile(url, filename, opts.mime);
|
|
32
|
+
const original = await fetchAsFile(root, url, filename, opts.mime);
|
|
33
33
|
const result = await optimizeImage(original, SHARE_OPTIMIZED);
|
|
34
34
|
// null means "nothing to gain" (already small enough) or "could not be
|
|
35
35
|
// decoded". Either way the original is the right thing to send, and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-share.js","sourceRoot":"","sources":["../../../src/components/images/image-share.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"image-share.js","sourceRoot":"","sources":["../../../src/components/images/image-share.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EACL,eAAe,EACf,WAAW,EACX,aAAa,EACb,iBAAiB,GAClB,MAAM,6BAA6B,CAAC;AAGrC;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,sBAAsB,CACpC,IAAiB,EACjB,GAAW,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,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;YAC9C,CAAC;SACF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-viewer.d.ts","sourceRoot":"","sources":["../../../src/components/images/image-viewer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"image-viewer.d.ts","sourceRoot":"","sources":["../../../src/components/images/image-viewer.tsx"],"names":[],"mappings":"AAMA;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,EAC1B,GAAG,EACH,GAAG,EACH,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,OAAO,GACR,EAAE;IACD,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,+BAuBA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useBrainUiRoot } from "../../root-context.js";
|
|
2
3
|
import { useState } from "react";
|
|
3
4
|
import { ShareMenu } from "../share/share-menu.js";
|
|
4
5
|
import { ZoomViewer } from "../viewer/zoom-viewer.js";
|
|
@@ -12,9 +13,10 @@ import { buildImageShareOptions } from "./image-share.js";
|
|
|
12
13
|
* available, it just is not where the viewer starts.
|
|
13
14
|
*/
|
|
14
15
|
export function ImageViewer({ src, alt, filename, mime, bytes, onClose, }) {
|
|
16
|
+
const root = useBrainUiRoot();
|
|
15
17
|
// The natural size is unknown until the decode finishes, and `fit()` measures
|
|
16
18
|
// the DOM — so the load event is what tells the viewer to fit.
|
|
17
19
|
const [loaded, setLoaded] = useState(false);
|
|
18
|
-
return (_jsx(ZoomViewer, { onClose: onClose, refitKey: loaded ? src : null, maxFitScale: 1, label: `Image viewer: ${filename}`, actions: _jsx(ShareMenu, { options: buildImageShareOptions(src, filename, { mime, bytes }), title: "Share image" }), children: _jsx("img", { src: src, alt: alt ?? filename, onLoad: () => setLoaded(true), draggable: false }) }));
|
|
20
|
+
return (_jsx(ZoomViewer, { onClose: onClose, refitKey: loaded ? src : null, maxFitScale: 1, label: `Image viewer: ${filename}`, actions: _jsx(ShareMenu, { options: buildImageShareOptions(root, src, filename, { mime, bytes }), title: "Share image" }), children: _jsx("img", { src: src, alt: alt ?? filename, onLoad: () => setLoaded(true), draggable: false }) }));
|
|
19
21
|
}
|
|
20
22
|
//# sourceMappingURL=image-viewer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-viewer.js","sourceRoot":"","sources":["../../../src/components/images/image-viewer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE1D;;;;;;;GAOG;AACH,MAAM,UAAU,WAAW,CAAC,EAC1B,GAAG,EACH,GAAG,EACH,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,OAAO,GAQR;IACC,8EAA8E;IAC9E,+DAA+D;IAC/D,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE5C,OAAO,CACL,KAAC,UAAU,IACT,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAC7B,WAAW,EAAE,CAAC,EACd,KAAK,EAAE,iBAAiB,QAAQ,EAAE,EAClC,OAAO,EACL,KAAC,SAAS,IACR,OAAO,EAAE,sBAAsB,CAAC,GAAG,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"image-viewer.js","sourceRoot":"","sources":["../../../src/components/images/image-viewer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE1D;;;;;;;GAOG;AACH,MAAM,UAAU,WAAW,CAAC,EAC1B,GAAG,EACH,GAAG,EACH,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,OAAO,GAQR;IACC,MAAM,IAAI,GAAG,cAAc,EAAE,CAAC;IAC9B,8EAA8E;IAC9E,+DAA+D;IAC/D,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE5C,OAAO,CACL,KAAC,UAAU,IACT,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAC7B,WAAW,EAAE,CAAC,EACd,KAAK,EAAE,iBAAiB,QAAQ,EAAE,EAClC,OAAO,EACL,KAAC,SAAS,IACR,OAAO,EAAE,sBAAsB,CAAC,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EACrE,KAAK,EAAC,aAAa,GACnB,YAIJ,cAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,KAAK,GAAI,GAC7E,CACd,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mask-editor.d.ts","sourceRoot":"","sources":["../../../src/components/images/mask-editor.tsx"],"names":[],"mappings":"AA0BA,wBAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7D,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACxD,
|
|
1
|
+
{"version":3,"file":"mask-editor.d.ts","sourceRoot":"","sources":["../../../src/components/images/mask-editor.tsx"],"names":[],"mappings":"AA0BA,wBAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7D,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACxD,sCA+NA"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
3
3
|
import { Eraser, RotateCcw, X } from "lucide-react";
|
|
4
|
-
import {
|
|
4
|
+
import { useBrainUiRoot } from "../../root-context.js";
|
|
5
5
|
import { useMaskStore } from "../../stores/mask-store.js";
|
|
6
6
|
export function MaskEditor({ onSubmit, onCancel, }) {
|
|
7
|
+
const root = useBrainUiRoot();
|
|
7
8
|
const request = useMaskStore((s) => s.request);
|
|
8
9
|
const close = useMaskStore((s) => s.close);
|
|
9
10
|
const canvasRef = useRef(null);
|
|
@@ -14,15 +15,16 @@ export function MaskEditor({ onSubmit, onCancel, }) {
|
|
|
14
15
|
const [loaded, setLoaded] = useState(false);
|
|
15
16
|
const [error, setError] = useState(null);
|
|
16
17
|
const rawUrl = request
|
|
17
|
-
? `${apiBase()}/files/content?path=${encodeURIComponent(request.imagePath)}&raw=1`
|
|
18
|
+
? `${root.apiBase()}/files/content?path=${encodeURIComponent(request.imagePath)}&raw=1`
|
|
18
19
|
: null;
|
|
19
20
|
// Reset per request: a second mask on a different image must not inherit the
|
|
20
21
|
// first one's strokes.
|
|
21
22
|
useEffect(() => {
|
|
22
23
|
setStrokes([]);
|
|
24
|
+
setDrawing(false);
|
|
23
25
|
setLoaded(false);
|
|
24
26
|
setError(null);
|
|
25
|
-
}, [request?.requestId]);
|
|
27
|
+
}, [root, request?.requestId, rawUrl]);
|
|
26
28
|
const redraw = useCallback(() => {
|
|
27
29
|
const canvas = canvasRef.current;
|
|
28
30
|
const img = imageRef.current;
|
|
@@ -115,7 +117,7 @@ export function MaskEditor({ onSubmit, onCancel, }) {
|
|
|
115
117
|
canvas.height = Math.round(img.naturalHeight * scale);
|
|
116
118
|
}
|
|
117
119
|
setLoaded(true);
|
|
118
|
-
}, onError: () => setError(`Could not load ${request.imagePath}`) })), _jsx("canvas", { ref: canvasRef, className: "max-h-full max-w-full touch-none rounded shadow-lg", onPointerDown: (e) => {
|
|
120
|
+
}, onError: () => setError(`Could not load ${request.imagePath}`) }, rawUrl)), _jsx("canvas", { ref: canvasRef, className: "max-h-full max-w-full touch-none rounded shadow-lg", onPointerDown: (e) => {
|
|
119
121
|
e.currentTarget.setPointerCapture(e.pointerId);
|
|
120
122
|
setDrawing(true);
|
|
121
123
|
setStrokes((prev) => [...prev, { points: [pointFrom(e)], width: brush }]);
|
|
@@ -130,6 +132,6 @@ export function MaskEditor({ onSubmit, onCancel, }) {
|
|
|
130
132
|
next[next.length - 1] = { ...last, points: [...last.points, p] };
|
|
131
133
|
return next;
|
|
132
134
|
});
|
|
133
|
-
}, onPointerUp: () => setDrawing(false), onPointerCancel: () => setDrawing(false) })] }), error && _jsx("div", { className: "px-3 pb-1 text-center text-sm text-
|
|
135
|
+
}, onPointerUp: () => setDrawing(false), onPointerCancel: () => setDrawing(false) })] }), error && _jsx("div", { className: "px-3 pb-1 text-center text-sm text-destructive-fill", children: error }), _jsxs("div", { className: "flex items-center gap-3 p-3", children: [_jsxs("label", { className: "flex flex-1 items-center gap-2 text-xs text-white/80", children: ["Brush", _jsx("input", { type: "range", min: 8, max: 160, value: brush, onChange: (e) => setBrush(Number(e.target.value)), className: "flex-1" })] }), _jsx("button", { type: "button", onClick: () => setStrokes((prev) => prev.slice(0, -1)), disabled: strokes.length === 0, className: "rounded p-2 text-white hover:bg-white/10 disabled:opacity-40", "aria-label": "Undo", children: _jsx(RotateCcw, { className: "h-5 w-5" }) }), _jsx("button", { type: "button", onClick: () => setStrokes([]), disabled: strokes.length === 0, className: "rounded p-2 text-white hover:bg-white/10 disabled:opacity-40", "aria-label": "Clear", children: _jsx(Eraser, { className: "h-5 w-5" }) }), _jsx("button", { type: "button", onClick: submit, disabled: !loaded, className: "rounded bg-white px-4 py-2 text-sm font-medium text-black disabled:opacity-50", children: "Use this area" })] })] }));
|
|
134
136
|
}
|
|
135
137
|
//# sourceMappingURL=mask-editor.js.map
|