@sixb/app 0.2.0 → 0.2.3
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/assets/connector-icons/README.md +1 -0
- package/assets/connector-icons/fleetio.ico +0 -0
- package/dist/agent/activity-label.d.ts.map +1 -1
- package/dist/agent/agent-chat.d.ts +9 -2
- package/dist/agent/agent-chat.d.ts.map +1 -1
- package/dist/agent/agent-panel.d.ts +9 -1
- package/dist/agent/agent-panel.d.ts.map +1 -1
- package/dist/agent/agent-surface.d.ts.map +1 -1
- package/dist/agent/artifact-card.d.ts +3 -1
- package/dist/agent/artifact-card.d.ts.map +1 -1
- package/dist/agent/artifact-panel.d.ts +7 -1
- package/dist/agent/artifact-panel.d.ts.map +1 -1
- package/dist/agent/background/background-card.d.ts +10 -0
- package/dist/agent/background/background-card.d.ts.map +1 -0
- package/dist/agent/background/background-tool-row.d.ts +9 -0
- package/dist/agent/background/background-tool-row.d.ts.map +1 -0
- package/dist/agent/background/context.d.ts +23 -0
- package/dist/agent/background/context.d.ts.map +1 -0
- package/dist/agent/background/interpret.d.ts +116 -0
- package/dist/agent/background/interpret.d.ts.map +1 -0
- package/dist/agent/bash/bash-tool-view.d.ts.map +1 -1
- package/dist/agent/bash/interpret.d.ts +4 -0
- package/dist/agent/bash/interpret.d.ts.map +1 -1
- package/dist/agent/components/composer-menu.d.ts +3 -1
- package/dist/agent/components/composer-menu.d.ts.map +1 -1
- package/dist/agent/components/composer-place.d.ts +13 -0
- package/dist/agent/components/composer-place.d.ts.map +1 -0
- package/dist/agent/components/composer.d.ts +23 -1
- package/dist/agent/components/composer.d.ts.map +1 -1
- package/dist/agent/components/computer-place.d.ts +3 -1
- package/dist/agent/components/computer-place.d.ts.map +1 -1
- package/dist/agent/components/context-chips.d.ts.map +1 -1
- package/dist/agent/components/context-meter.d.ts +1 -1
- package/dist/agent/components/conversation-panel.d.ts +3 -1
- package/dist/agent/components/conversation-panel.d.ts.map +1 -1
- package/dist/agent/components/message-parts.d.ts +3 -1
- package/dist/agent/components/message-parts.d.ts.map +1 -1
- package/dist/agent/components/thread-artifacts-menu.d.ts.map +1 -1
- package/dist/agent/components/transcript.d.ts +6 -0
- package/dist/agent/components/transcript.d.ts.map +1 -1
- package/dist/agent/components/web-fetch-tool-view.d.ts.map +1 -1
- package/dist/agent/composer-insertion.d.ts +24 -0
- package/dist/agent/composer-insertion.d.ts.map +1 -0
- package/dist/agent/delegation/child-parts.d.ts +2 -0
- package/dist/agent/delegation/child-parts.d.ts.map +1 -1
- package/dist/agent/delegation/use-children.d.ts +5 -5
- package/dist/agent/delegation/use-children.d.ts.map +1 -1
- package/dist/agent/hooks/use-agent-conversation.d.ts +24 -4
- package/dist/agent/hooks/use-agent-conversation.d.ts.map +1 -1
- package/dist/agent/hooks/use-new-thread-place.d.ts +70 -0
- package/dist/agent/hooks/use-new-thread-place.d.ts.map +1 -0
- package/dist/agent/hooks/use-thread-lists.d.ts +40 -0
- package/dist/agent/hooks/use-thread-lists.d.ts.map +1 -1
- package/dist/agent/i18n/en.d.ts +74 -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 +126 -0
- package/dist/agent/i18n/index.d.ts.map +1 -1
- package/dist/agent/observed-conversation.d.ts.map +1 -1
- package/dist/agent/publish-artifact/interpret.d.ts +8 -2
- package/dist/agent/publish-artifact/interpret.d.ts.map +1 -1
- package/dist/agent/publish-artifact/open-artifact-tool-view.d.ts +9 -0
- package/dist/agent/publish-artifact/open-artifact-tool-view.d.ts.map +1 -0
- package/dist/agent/publish-artifact/publish-artifact-tool-view.d.ts +4 -2
- package/dist/agent/publish-artifact/publish-artifact-tool-view.d.ts.map +1 -1
- package/dist/agent/publish-artifact/use-live-publishes.d.ts +3 -3
- package/dist/agent/publish-artifact/use-live-publishes.d.ts.map +1 -1
- package/dist/agent/tool-views/built-in.d.ts.map +1 -1
- package/dist/agent/types.d.ts +3 -1
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/utils/web-fetch.d.ts +33 -1
- package/dist/agent/utils/web-fetch.d.ts.map +1 -1
- package/dist/agent/utils/web-search.d.ts +14 -2
- package/dist/agent/utils/web-search.d.ts.map +1 -1
- package/dist/artifacts/artifact-page.d.ts.map +1 -1
- package/dist/artifacts/artifact-viewer.d.ts +16 -0
- package/dist/artifacts/artifact-viewer.d.ts.map +1 -0
- package/dist/artifacts/card-details.d.ts +1 -1
- package/dist/artifacts/card-details.d.ts.map +1 -1
- package/dist/artifacts/card-preview.d.ts.map +1 -1
- package/dist/artifacts/comments-context.d.ts +48 -0
- package/dist/artifacts/comments-context.d.ts.map +1 -0
- package/dist/artifacts/edit-session.d.ts +6 -6
- package/dist/artifacts/edit-session.d.ts.map +1 -1
- package/dist/artifacts/file-source.d.ts.map +1 -1
- package/dist/artifacts/frame.d.ts +10 -2
- package/dist/artifacts/frame.d.ts.map +1 -1
- package/dist/artifacts/guest-badge.d.ts +8 -0
- package/dist/artifacts/guest-badge.d.ts.map +1 -0
- package/dist/artifacts/held-artifact.d.ts +19 -0
- package/dist/artifacts/held-artifact.d.ts.map +1 -0
- package/dist/artifacts/holders.d.ts +10 -0
- package/dist/artifacts/holders.d.ts.map +1 -0
- package/dist/artifacts/live/boards.d.ts +15 -0
- package/dist/artifacts/live/boards.d.ts.map +1 -0
- package/dist/artifacts/live/canvas.d.ts +79 -0
- package/dist/artifacts/live/canvas.d.ts.map +1 -0
- package/dist/artifacts/live/header.d.ts +29 -0
- package/dist/artifacts/live/header.d.ts.map +1 -0
- package/dist/artifacts/live/hooks.d.ts +21 -0
- package/dist/artifacts/live/hooks.d.ts.map +1 -0
- package/dist/artifacts/live/presence.d.ts +32 -0
- package/dist/artifacts/live/presence.d.ts.map +1 -0
- package/dist/artifacts/live/session.d.ts +130 -0
- package/dist/artifacts/live/session.d.ts.map +1 -0
- package/dist/artifacts/live/view.d.ts +28 -0
- package/dist/artifacts/live/view.d.ts.map +1 -0
- package/dist/artifacts/messages.d.ts +424 -14
- package/dist/artifacts/messages.d.ts.map +1 -1
- package/dist/artifacts/page-queries.d.ts +2 -2
- package/dist/artifacts/page-queries.d.ts.map +1 -1
- package/dist/artifacts/page-state.d.ts.map +1 -1
- package/dist/artifacts/publish-edit.d.ts +24 -14
- package/dist/artifacts/publish-edit.d.ts.map +1 -1
- package/dist/artifacts/queries.d.ts +490 -9
- 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 +0 -18
- package/dist/artifacts/renderers/canvas/arrows.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/board-editor.d.ts +43 -0
- package/dist/artifacts/renderers/canvas/board-editor.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/board-properties.d.ts +37 -0
- package/dist/artifacts/renderers/canvas/board-properties.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/board-source.d.ts +18 -0
- package/dist/artifacts/renderers/canvas/board-source.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/board.d.ts +64 -19
- package/dist/artifacts/renderers/canvas/board.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/canvas.d.ts +13 -4
- package/dist/artifacts/renderers/canvas/canvas.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/comment-pins.d.ts +84 -0
- package/dist/artifacts/renderers/canvas/comment-pins.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/commenting.d.ts +58 -0
- package/dist/artifacts/renderers/canvas/commenting.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/comments-panel.d.ts +27 -0
- package/dist/artifacts/renderers/canvas/comments-panel.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/comments.d.ts +56 -0
- package/dist/artifacts/renderers/canvas/comments.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/draft.d.ts +7 -6
- package/dist/artifacts/renderers/canvas/draft.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/edit-mode.d.ts +19 -2
- package/dist/artifacts/renderers/canvas/edit-mode.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/focus.d.ts +40 -5
- package/dist/artifacts/renderers/canvas/focus.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/items.d.ts +47 -4
- package/dist/artifacts/renderers/canvas/items.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/layout.d.ts +5 -8
- package/dist/artifacts/renderers/canvas/layout.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/presence.d.ts +21 -0
- package/dist/artifacts/renderers/canvas/presence.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/previews.d.ts +54 -0
- package/dist/artifacts/renderers/canvas/previews.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/renderer.d.ts +11 -2
- package/dist/artifacts/renderers/canvas/renderer.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/thumbnail.d.ts +5 -2
- package/dist/artifacts/renderers/canvas/thumbnail.d.ts.map +1 -1
- package/dist/artifacts/version-menu.d.ts +19 -0
- package/dist/artifacts/version-menu.d.ts.map +1 -0
- package/dist/artifacts/view-context.d.ts +43 -0
- package/dist/artifacts/view-context.d.ts.map +1 -0
- package/dist/artifacts/viewer.d.ts.map +1 -1
- package/dist/build.d.ts +5 -0
- package/dist/build.d.ts.map +1 -1
- package/dist/{chunk-fw2bm6dq.js → chunk-001c4gnk.js} +8086 -3870
- package/dist/chunk-001c4gnk.js.map +204 -0
- package/dist/chunk-00wggsst.js +7 -0
- package/dist/chunk-00wggsst.js.map +10 -0
- package/dist/chunk-5crvhjp2.js +4704 -0
- package/dist/chunk-5crvhjp2.js.map +28 -0
- package/dist/{chunk-q69001w3.js → chunk-694m74s7.js} +7 -1
- package/dist/{chunk-q69001w3.js.map → chunk-694m74s7.js.map} +3 -3
- package/dist/{chunk-4mprsd2n.js → chunk-fg6thecb.js} +25 -1
- package/dist/chunk-fg6thecb.js.map +10 -0
- package/dist/{chunk-j9653e83.js → chunk-fwb9mxwm.js} +1 -1
- package/dist/{chunk-km25essq.js → chunk-kes4ygmz.js} +1 -1
- package/dist/{chunk-kwbw4dyk.js → chunk-ryed2jq8.js} +1 -1
- package/dist/codegen.d.ts.map +1 -1
- package/dist/createCustomApp.d.ts.map +1 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +930 -309
- package/dist/index.js.map +15 -10
- package/dist/locale-messages.d.ts +12 -0
- package/dist/locale-messages.d.ts.map +1 -1
- package/dist/locale.d.ts +12 -0
- package/dist/locale.d.ts.map +1 -1
- package/dist/locale.js +1 -1
- package/dist/metadata.d.ts +8 -0
- package/dist/metadata.d.ts.map +1 -1
- package/dist/pages/console/action-run.d.ts.map +1 -1
- package/dist/pages/console/data/connectors.d.ts.map +1 -1
- package/dist/pages/console/data/datasets.d.ts.map +1 -1
- package/dist/pages/console/data/lake-health.d.ts +3 -0
- package/dist/pages/console/data/lake-health.d.ts.map +1 -0
- package/dist/pages/console/data/messages.d.ts +98 -2
- package/dist/pages/console/data/messages.d.ts.map +1 -1
- package/dist/pages/console/data/pipelines.d.ts.map +1 -1
- package/dist/pages/console/data/projections.d.ts.map +1 -1
- package/dist/pages/console/data/shared.d.ts.map +1 -1
- package/dist/pages/console/data/syncs.d.ts.map +1 -1
- package/dist/pages/console/ontology/action-runs.d.ts.map +1 -1
- package/dist/pages/console/ontology/actions.d.ts.map +1 -1
- package/dist/pages/console/ontology/components/action-button.d.ts.map +1 -1
- package/dist/pages/console/ontology/components/artifact-picker.d.ts +36 -0
- package/dist/pages/console/ontology/components/artifact-picker.d.ts.map +1 -0
- package/dist/pages/console/ontology/components/object-query-bar.d.ts.map +1 -1
- package/dist/pages/console/ontology/lib/action-params.d.ts +2 -0
- package/dist/pages/console/ontology/lib/action-params.d.ts.map +1 -1
- package/dist/pages/console/ontology/lineage/properties-panel.d.ts +2 -1
- package/dist/pages/console/ontology/lineage/properties-panel.d.ts.map +1 -1
- package/dist/pages/console/ontology/object-page.d.ts.map +1 -1
- package/dist/pages/console/ontology/object-type.d.ts.map +1 -1
- package/dist/pages/console/ontology/object-types.d.ts.map +1 -1
- package/dist/pages/console/ontology/objects.d.ts.map +1 -1
- package/dist/pages/console/ontology/rules.d.ts.map +1 -1
- package/dist/pages/console/ontology/workflow.d.ts.map +1 -1
- package/dist/pages/console/ontology/workflows/run-input-form.d.ts.map +1 -1
- package/dist/pages/console/ontology/workflows/schema-shape.d.ts.map +1 -1
- package/dist/pages/console/ontology/workflows.d.ts.map +1 -1
- package/dist/pages/console/skeletons.d.ts +30 -0
- package/dist/pages/console/skeletons.d.ts.map +1 -0
- package/dist/pages/console/workflow-run.d.ts.map +1 -1
- package/dist/pages/section-page.d.ts +11 -1
- package/dist/pages/section-page.d.ts.map +1 -1
- package/dist/pages/section-ui.d.ts +25 -3
- package/dist/pages/section-ui.d.ts.map +1 -1
- package/dist/pages/settings/activity/calendar.d.ts.map +1 -1
- package/dist/pages/settings/activity/connections.d.ts.map +1 -1
- package/dist/pages/settings/activity/page.d.ts.map +1 -1
- package/dist/pages/settings/activity/thread.d.ts.map +1 -1
- package/dist/pages/settings/activity/timeline.d.ts +2 -0
- package/dist/pages/settings/activity/timeline.d.ts.map +1 -1
- package/dist/pages/settings/controls.d.ts +4 -0
- 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-history.d.ts +2 -0
- package/dist/pages/settings/memory-history.d.ts.map +1 -1
- package/dist/pages/settings/memory.d.ts.map +1 -1
- package/dist/pages/settings/service-accounts.d.ts.map +1 -1
- package/dist/pages/settings/sessions.d.ts.map +1 -1
- package/dist/pages/settings/usage/breakdown.d.ts.map +1 -1
- package/dist/pages/settings/usage/limits.d.ts.map +1 -1
- package/dist/pages/settings/usage/messages.d.ts +2 -2
- package/dist/pages/settings/usage/messages.d.ts.map +1 -1
- package/dist/pages/settings/usage/runs.d.ts +8 -2
- package/dist/pages/settings/usage/runs.d.ts.map +1 -1
- package/dist/pages/settings/usage/spend-chart.d.ts.map +1 -1
- package/dist/pages/settings/usage/spend-model.d.ts +5 -0
- package/dist/pages/settings/usage/spend-model.d.ts.map +1 -1
- package/dist/pages/values.d.ts +6 -0
- package/dist/pages/values.d.ts.map +1 -1
- package/dist/pages.d.ts +4 -0
- package/dist/pages.d.ts.map +1 -1
- package/dist/pages.js +8195 -4841
- package/dist/pages.js.map +58 -49
- package/dist/sections/catalog.d.ts.map +1 -1
- package/dist/sections/sections.d.ts.map +1 -1
- package/dist/server.js +294 -23
- package/dist/server.js.map +8 -7
- package/dist/service-worker.d.ts +39 -0
- package/dist/service-worker.d.ts.map +1 -0
- package/dist/shared-session.d.ts +25 -0
- package/dist/shared-session.d.ts.map +1 -0
- package/dist/shell/app-return.d.ts +35 -0
- package/dist/shell/app-return.d.ts.map +1 -0
- package/dist/shell/app-shell.d.ts +1 -1
- package/dist/shell/app-shell.d.ts.map +1 -1
- package/dist/shell/nav-items.d.ts +2 -0
- package/dist/shell/nav-items.d.ts.map +1 -1
- package/dist/shell/phone/back.d.ts +6 -0
- package/dist/shell/phone/back.d.ts.map +1 -0
- package/dist/shell/phone/launch.d.ts +7 -0
- package/dist/shell/phone/launch.d.ts.map +1 -0
- package/dist/shell/phone/more-sheet.d.ts +36 -0
- package/dist/shell/phone/more-sheet.d.ts.map +1 -0
- package/dist/shell/phone/phone-foundations.d.ts +9 -0
- package/dist/shell/phone/phone-foundations.d.ts.map +1 -0
- package/dist/shell/phone/pull-to-refresh.d.ts +9 -0
- package/dist/shell/phone/pull-to-refresh.d.ts.map +1 -0
- package/dist/shell/phone/routes.d.ts +12 -0
- package/dist/shell/phone/routes.d.ts.map +1 -0
- package/dist/shell/phone/screen-motion.d.ts +11 -0
- package/dist/shell/phone/screen-motion.d.ts.map +1 -0
- package/dist/shell/phone/scroll-restoration.d.ts +7 -0
- package/dist/shell/phone/scroll-restoration.d.ts.map +1 -0
- package/dist/shell/phone/startup-image.d.ts +17 -0
- package/dist/shell/phone/startup-image.d.ts.map +1 -0
- package/dist/shell/phone/tab-bar.d.ts +14 -0
- package/dist/shell/phone/tab-bar.d.ts.map +1 -0
- package/dist/shell/phone/top-bar.d.ts +24 -0
- package/dist/shell/phone/top-bar.d.ts.map +1 -0
- package/dist/shell/search-command.d.ts +3 -1
- package/dist/shell/search-command.d.ts.map +1 -1
- package/dist/shell/user-menu.d.ts +2 -0
- package/dist/shell/user-menu.d.ts.map +1 -1
- package/package.json +8 -5
- package/src/agent/activity-label.ts +6 -2
- package/src/agent/agent-chat.tsx +51 -8
- package/src/agent/agent-panel.tsx +12 -0
- package/src/agent/agent-surface.tsx +4 -0
- package/src/agent/agent.css +18 -0
- package/src/agent/artifact-card.tsx +84 -16
- package/src/agent/artifact-panel.tsx +63 -43
- package/src/agent/background/background-card.tsx +308 -0
- package/src/agent/background/background-tool-row.tsx +58 -0
- package/src/agent/background/context.ts +26 -0
- package/src/agent/background/interpret.ts +356 -0
- package/src/agent/bash/bash-tool-view.tsx +9 -4
- package/src/agent/bash/interpret.ts +21 -3
- package/src/agent/components/agent-message-body.tsx +1 -1
- package/src/agent/components/composer-menu.tsx +4 -1
- package/src/agent/components/composer-place.tsx +168 -0
- package/src/agent/components/composer.tsx +101 -3
- package/src/agent/components/computer-place.tsx +18 -1
- package/src/agent/components/context-chips.tsx +72 -2
- package/src/agent/components/conversation-panel.tsx +3 -2
- package/src/agent/components/message-parts.tsx +6 -1
- package/src/agent/components/thread-artifacts-menu.tsx +22 -5
- package/src/agent/components/transcript.tsx +33 -1
- package/src/agent/components/web-fetch-tool-view.tsx +94 -29
- package/src/agent/composer-insertion.ts +36 -0
- package/src/agent/delegation/child-parts.tsx +1 -1
- package/src/agent/hooks/use-agent-conversation.ts +101 -8
- package/src/agent/hooks/use-new-thread-place.ts +294 -0
- package/src/agent/i18n/en.ts +70 -3
- package/src/agent/i18n/fr.ts +70 -3
- package/src/agent/observed-conversation.tsx +3 -0
- package/src/agent/publish-artifact/interpret.ts +27 -5
- package/src/agent/publish-artifact/open-artifact-tool-view.tsx +49 -0
- package/src/agent/publish-artifact/publish-artifact-tool-view.tsx +14 -8
- package/src/agent/publish-artifact/use-live-publishes.ts +7 -11
- package/src/agent/react-router.tsx +2 -2
- package/src/agent/tool-views/built-in.tsx +29 -11
- package/src/agent/types.ts +4 -0
- package/src/agent/utils/web-fetch.ts +89 -10
- package/src/agent/utils/web-search.ts +67 -28
- package/src/artifacts/artifact-page.tsx +42 -17
- package/src/artifacts/artifact-viewer.tsx +56 -0
- package/src/artifacts/artifacts.css +80 -0
- package/src/artifacts/card-details.ts +2 -2
- package/src/artifacts/card-preview.tsx +17 -3
- package/src/artifacts/comments-context.ts +125 -0
- package/src/artifacts/edit-session.tsx +6 -6
- package/src/artifacts/file-source.ts +10 -3
- package/src/artifacts/frame.tsx +50 -12
- package/src/artifacts/gallery.tsx +9 -11
- package/src/artifacts/guest-badge.tsx +21 -0
- package/src/artifacts/held-artifact.tsx +241 -0
- package/src/artifacts/holders.tsx +170 -0
- package/src/artifacts/live/boards.ts +95 -0
- package/src/artifacts/live/canvas.ts +402 -0
- package/src/artifacts/live/header.tsx +137 -0
- package/src/artifacts/live/hooks.ts +94 -0
- package/src/artifacts/live/presence.ts +147 -0
- package/src/artifacts/live/session.ts +520 -0
- package/src/artifacts/live/view.ts +81 -0
- package/src/artifacts/messages.ts +415 -24
- package/src/artifacts/page-queries.ts +2 -3
- package/src/artifacts/page-state.ts +16 -7
- package/src/artifacts/publish-edit.ts +50 -22
- package/src/artifacts/queries.ts +108 -10
- package/src/artifacts/references/references.tsx +6 -9
- package/src/artifacts/renderers/canvas/arrows.tsx +12 -39
- package/src/artifacts/renderers/canvas/board-editor.tsx +817 -0
- package/src/artifacts/renderers/canvas/board-properties.tsx +488 -0
- package/src/artifacts/renderers/canvas/board-source.ts +110 -0
- package/src/artifacts/renderers/canvas/board.tsx +309 -33
- package/src/artifacts/renderers/canvas/canvas.tsx +387 -72
- package/src/artifacts/renderers/canvas/comment-pins.tsx +465 -0
- package/src/artifacts/renderers/canvas/commenting.tsx +319 -0
- package/src/artifacts/renderers/canvas/comments-panel.tsx +574 -0
- package/src/artifacts/renderers/canvas/comments.ts +225 -0
- package/src/artifacts/renderers/canvas/draft.ts +41 -50
- package/src/artifacts/renderers/canvas/edit-mode.tsx +145 -20
- package/src/artifacts/renderers/canvas/focus.tsx +175 -24
- package/src/artifacts/renderers/canvas/items.tsx +179 -52
- package/src/artifacts/renderers/canvas/layout.ts +99 -47
- package/src/artifacts/renderers/canvas/presence.tsx +184 -0
- package/src/artifacts/renderers/canvas/previews.ts +127 -0
- package/src/artifacts/renderers/canvas/renderer.tsx +87 -22
- package/src/artifacts/renderers/canvas/thumbnail.tsx +56 -15
- package/src/artifacts/renderers/canvas/toolbar.tsx +1 -1
- package/src/artifacts/renderers/slides/slides.tsx +1 -1
- package/src/artifacts/version-menu.tsx +438 -0
- package/src/artifacts/view-context.ts +102 -0
- package/src/artifacts/viewer.tsx +205 -147
- package/src/build.ts +96 -11
- package/src/codegen.ts +83 -5
- package/src/createCustomApp.ts +20 -7
- package/src/index.ts +12 -0
- package/src/locale-messages.ts +24 -0
- package/src/metadata.ts +12 -0
- package/src/pages/console/action-run.tsx +20 -0
- package/src/pages/console/data/connectors.tsx +27 -3
- package/src/pages/console/data/datasets.tsx +30 -1
- package/src/pages/console/data/lake-health.tsx +299 -0
- package/src/pages/console/data/messages.ts +143 -2
- package/src/pages/console/data/pipelines.tsx +91 -3
- package/src/pages/console/data/projections.tsx +23 -4
- package/src/pages/console/data/shared.tsx +1 -0
- package/src/pages/console/data/syncs.tsx +39 -2
- package/src/pages/console/ontology/action-runs.tsx +8 -2
- package/src/pages/console/ontology/actions.tsx +39 -15
- package/src/pages/console/ontology/components/action-button.tsx +10 -0
- package/src/pages/console/ontology/components/artifact-picker.tsx +522 -0
- package/src/pages/console/ontology/components/object-query-bar.tsx +21 -5
- package/src/pages/console/ontology/lib/action-params.ts +10 -0
- package/src/pages/console/ontology/lineage/properties-panel.tsx +32 -24
- package/src/pages/console/ontology/object-page.tsx +2 -0
- package/src/pages/console/ontology/object-type.tsx +73 -14
- package/src/pages/console/ontology/object-types.tsx +56 -7
- package/src/pages/console/ontology/objects.tsx +167 -19
- package/src/pages/console/ontology/rules.tsx +186 -30
- package/src/pages/console/ontology/workflow.tsx +130 -74
- package/src/pages/console/ontology/workflows/run-input-form.tsx +21 -2
- package/src/pages/console/ontology/workflows/schema-shape.tsx +3 -0
- package/src/pages/console/ontology/workflows.tsx +34 -21
- package/src/pages/console/skeletons.tsx +99 -0
- package/src/pages/console/workflow-run.tsx +20 -0
- package/src/pages/section-page.tsx +37 -7
- package/src/pages/section-ui.tsx +96 -13
- package/src/pages/settings/activity/calendar.tsx +13 -6
- package/src/pages/settings/activity/connections.tsx +26 -9
- package/src/pages/settings/activity/page.tsx +31 -4
- package/src/pages/settings/activity/thread.tsx +32 -18
- package/src/pages/settings/activity/timeline.tsx +39 -0
- package/src/pages/settings/controls.tsx +19 -1
- package/src/pages/settings/developers.tsx +2 -2
- package/src/pages/settings/members.tsx +42 -9
- package/src/pages/settings/memory-history.tsx +76 -10
- package/src/pages/settings/memory.tsx +47 -5
- package/src/pages/settings/service-accounts.tsx +7 -2
- package/src/pages/settings/sessions.tsx +6 -2
- package/src/pages/settings/usage/breakdown.tsx +62 -2
- package/src/pages/settings/usage/limits.tsx +45 -3
- package/src/pages/settings/usage/messages.ts +2 -2
- package/src/pages/settings/usage/page.tsx +99 -52
- package/src/pages/settings/usage/runs.tsx +105 -8
- package/src/pages/settings/usage/spend-chart.tsx +79 -45
- package/src/pages/settings/usage/spend-model.ts +17 -0
- package/src/pages/values.tsx +72 -6
- package/src/pages.ts +4 -0
- package/src/sections/catalog.ts +6 -0
- package/src/sections/sections.tsx +2 -0
- package/src/service-worker.ts +176 -0
- package/src/shared-session.ts +73 -0
- package/src/shell/app-return.ts +115 -0
- package/src/shell/app-shell.tsx +125 -27
- package/src/shell/nav-items.tsx +2 -0
- package/src/shell/phone/back.ts +16 -0
- package/src/shell/phone/launch.ts +6 -0
- package/src/shell/phone/more-sheet.tsx +249 -0
- package/src/shell/phone/phone-foundations.tsx +43 -0
- package/src/shell/phone/phone.css +660 -0
- package/src/shell/phone/pull-to-refresh.tsx +201 -0
- package/src/shell/phone/routes.ts +34 -0
- package/src/shell/phone/screen-motion.ts +292 -0
- package/src/shell/phone/scroll-restoration.tsx +70 -0
- package/src/shell/phone/startup-image.ts +119 -0
- package/src/shell/phone/tab-bar.tsx +95 -0
- package/src/shell/phone/top-bar.tsx +195 -0
- package/src/shell/search-command.tsx +30 -14
- package/src/shell/user-menu.tsx +2 -1
- package/dist/chunk-4mprsd2n.js.map +0 -10
- package/dist/chunk-fw2bm6dq.js.map +0 -182
- package/dist/chunk-zxthr2q5.js +0 -1487
- package/dist/chunk-zxthr2q5.js.map +0 -18
- /package/dist/{chunk-j9653e83.js.map → chunk-fwb9mxwm.js.map} +0 -0
- /package/dist/{chunk-km25essq.js.map → chunk-kes4ygmz.js.map} +0 -0
- /package/dist/{chunk-kwbw4dyk.js.map → chunk-ryed2jq8.js.map} +0 -0
package/src/artifacts/viewer.tsx
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { deleteArtifact, type GetArtifactResponse, isSixbApiError } from "@sixb/client"
|
|
2
|
-
import {
|
|
3
|
-
getArtifactOptions,
|
|
4
|
-
getArtifactQueryKey,
|
|
5
|
-
getArtifactVersionOptions,
|
|
6
|
-
} from "@sixb/client/hooks"
|
|
2
|
+
import { getArtifactOptions, getArtifactQueryKey } from "@sixb/client/hooks"
|
|
7
3
|
import {
|
|
8
4
|
AlertDialog,
|
|
9
5
|
AlertDialogAction,
|
|
@@ -17,9 +13,6 @@ import {
|
|
|
17
13
|
DropdownMenu,
|
|
18
14
|
DropdownMenuContent,
|
|
19
15
|
DropdownMenuItem,
|
|
20
|
-
DropdownMenuLabel,
|
|
21
|
-
DropdownMenuRadioGroup,
|
|
22
|
-
DropdownMenuRadioItem,
|
|
23
16
|
DropdownMenuSeparator,
|
|
24
17
|
DropdownMenuTrigger,
|
|
25
18
|
Tooltip,
|
|
@@ -35,7 +28,6 @@ import {
|
|
|
35
28
|
ArrowLeft,
|
|
36
29
|
ArrowUpRight,
|
|
37
30
|
Check,
|
|
38
|
-
ChevronDown,
|
|
39
31
|
Link2,
|
|
40
32
|
LoaderCircle,
|
|
41
33
|
Maximize2,
|
|
@@ -52,19 +44,30 @@ import {
|
|
|
52
44
|
import { type ReactNode, useCallback, useEffect, useState } from "react"
|
|
53
45
|
import { Link } from "react-router-dom"
|
|
54
46
|
import { useCurrentUser } from "../session"
|
|
47
|
+
import { useSharedGuest } from "../shared-session"
|
|
55
48
|
import { useCopyFeedback } from "./copy-feedback"
|
|
56
49
|
import { DownloadMenu } from "./downloads"
|
|
57
50
|
import { type ArtifactDraft, EditSessionProvider, saveDraft } from "./edit-session"
|
|
58
51
|
import { formatFileSize } from "./file-size"
|
|
59
52
|
import { useFileName } from "./file-source"
|
|
60
53
|
import { FileTypeIcon, fileTypeOf } from "./file-type-icon"
|
|
54
|
+
import { ArtifactHolders } from "./holders"
|
|
61
55
|
import { type ArtifactKindName, ArtifactKindTile } from "./kind-icon"
|
|
56
|
+
import { LiveAvatars, LiveNotice, LiveSaveStatus } from "./live/header"
|
|
57
|
+
import { LiveArtifactProvider } from "./live/hooks"
|
|
58
|
+
import { type LiveView, useLiveView } from "./live/view"
|
|
62
59
|
import { useArtifactMessages } from "./messages"
|
|
63
60
|
import { resetPageState, usePageStateCount } from "./page-state"
|
|
64
|
-
import {
|
|
65
|
-
import { PersonAvatar } from "./person-avatar"
|
|
61
|
+
import { useArtifactPeople } from "./people"
|
|
66
62
|
import { type ArtifactMoved, ArtifactMovedError } from "./publish-edit"
|
|
67
|
-
import {
|
|
63
|
+
import {
|
|
64
|
+
type ArtifactVersion,
|
|
65
|
+
holdsQueries,
|
|
66
|
+
useArtifactUpdates,
|
|
67
|
+
useArtifactVersion,
|
|
68
|
+
useVersionQueries,
|
|
69
|
+
versionFileSource,
|
|
70
|
+
} from "./queries"
|
|
68
71
|
import { ArtifactReferencesProvider } from "./references/references"
|
|
69
72
|
import { CanvasRenderer } from "./renderers/canvas/renderer"
|
|
70
73
|
import { DocumentRenderer } from "./renderers/document"
|
|
@@ -75,6 +78,8 @@ import { useWorkbookDownloads } from "./renderers/sheet/downloads"
|
|
|
75
78
|
import { SheetRenderer } from "./renderers/sheet/sheet"
|
|
76
79
|
import { SlidesRenderer } from "./renderers/slides/slides"
|
|
77
80
|
import { type ArtifactTarget, artifactLink, type ViewerTarget } from "./target"
|
|
81
|
+
import { VersionMenu } from "./version-menu"
|
|
82
|
+
import { ArtifactViewProvider } from "./view-context"
|
|
78
83
|
|
|
79
84
|
export interface ViewerChrome {
|
|
80
85
|
/** Show a close button that calls this. */
|
|
@@ -140,24 +145,35 @@ function ArtifactView({
|
|
|
140
145
|
retry: false,
|
|
141
146
|
})
|
|
142
147
|
const detail = artifactQuery.data
|
|
148
|
+
// What someone else saves, the Agent writes, or a version created shows here as it happens.
|
|
149
|
+
useArtifactUpdates(target.artifactId)
|
|
143
150
|
|
|
144
|
-
// While the reader edits, the view
|
|
145
|
-
// announced over the draft, never
|
|
146
|
-
const editedVersion = useState<
|
|
147
|
-
const versionNumber =
|
|
151
|
+
// While the reader edits, the view holds the version as editing found it: a change made
|
|
152
|
+
// meanwhile is announced over the draft, never shown under it.
|
|
153
|
+
const editedVersion = useState<ArtifactVersion | null>(null)
|
|
154
|
+
const versionNumber = target.version ?? detail?.artifact.latestVersion
|
|
148
155
|
|
|
149
|
-
const versionQuery =
|
|
150
|
-
...getArtifactVersionOptions({
|
|
151
|
-
path: { artifactId: target.artifactId, version: String(versionNumber ?? "latest") },
|
|
152
|
-
}),
|
|
156
|
+
const versionQuery = useArtifactVersion(target.artifactId, versionNumber ?? "latest", {
|
|
153
157
|
enabled: versionNumber !== undefined,
|
|
154
|
-
//
|
|
155
|
-
|
|
156
|
-
|
|
158
|
+
// The latest version is read again as soon as the artifact is past what it was read at.
|
|
159
|
+
...(detail && versionNumber === detail.artifact.latestVersion
|
|
160
|
+
? { revision: detail.artifact.revision }
|
|
161
|
+
: {}),
|
|
157
162
|
})
|
|
158
|
-
const
|
|
159
|
-
|
|
163
|
+
const shown = editedVersion[0] ?? versionQuery.data
|
|
164
|
+
// A read again that fails leaves what was read: only an artifact gone, or never read, is an error.
|
|
165
|
+
const error =
|
|
166
|
+
(detail && !isGone(artifactQuery.error) ? null : artifactQuery.error) ??
|
|
167
|
+
(shown ? null : versionQuery.error)
|
|
168
|
+
const edit = useArtifactEdit(target, detail, shown, onTargetChange, editedVersion)
|
|
160
169
|
const guarded = edit.guard(chrome)
|
|
170
|
+
// A canvas's latest version is held live: everyone's changes show as they make them, and
|
|
171
|
+
// editing it changes it for everyone at once.
|
|
172
|
+
const liveView = useLiveView(
|
|
173
|
+
detail?.artifact.kind === "canvas" && versionNumber === detail.artifact.latestVersion
|
|
174
|
+
? target.artifactId
|
|
175
|
+
: null
|
|
176
|
+
)
|
|
161
177
|
|
|
162
178
|
if (error || (artifactQuery.isSuccess && !detail)) {
|
|
163
179
|
return (
|
|
@@ -167,7 +183,7 @@ function ArtifactView({
|
|
|
167
183
|
</>
|
|
168
184
|
)
|
|
169
185
|
}
|
|
170
|
-
if (!detail || !
|
|
186
|
+
if (!detail || !shown) {
|
|
171
187
|
return (
|
|
172
188
|
<>
|
|
173
189
|
<ViewerBar chrome={chrome} />
|
|
@@ -176,7 +192,7 @@ function ArtifactView({
|
|
|
176
192
|
)
|
|
177
193
|
}
|
|
178
194
|
|
|
179
|
-
const version =
|
|
195
|
+
const version = shown
|
|
180
196
|
const kind = detail.artifact.kind
|
|
181
197
|
return (
|
|
182
198
|
<>
|
|
@@ -186,6 +202,7 @@ function ArtifactView({
|
|
|
186
202
|
version={version}
|
|
187
203
|
chrome={guarded}
|
|
188
204
|
edit={edit}
|
|
205
|
+
liveView={liveView}
|
|
189
206
|
onVersionChange={(next) =>
|
|
190
207
|
onTargetChange({
|
|
191
208
|
type: "artifact",
|
|
@@ -198,14 +215,25 @@ function ArtifactView({
|
|
|
198
215
|
<EditNotice edit={edit} />
|
|
199
216
|
) : null}
|
|
200
217
|
{edit.savedShared ? <SavedSharedNotice /> : null}
|
|
201
|
-
<
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
218
|
+
{liveView?.notice ? <LiveNotice reason={liveView.notice} /> : null}
|
|
219
|
+
<EditSessionProvider editing={edit.editing || !!liveView?.editing} report={edit.report}>
|
|
220
|
+
<LiveArtifactProvider artifact={liveView?.live ?? null}>
|
|
221
|
+
<ArtifactViewProvider
|
|
222
|
+
value={{
|
|
223
|
+
access: detail.access,
|
|
224
|
+
latestVersion: detail.artifact.latestVersion,
|
|
225
|
+
revision: detail.artifact.revision,
|
|
226
|
+
}}
|
|
227
|
+
>
|
|
228
|
+
<ArtifactBody
|
|
229
|
+
key={bodyKey(version, kind, target.part)}
|
|
230
|
+
version={version}
|
|
231
|
+
kind={kind}
|
|
232
|
+
latestVersion={detail.artifact.latestVersion}
|
|
233
|
+
part={target.part}
|
|
234
|
+
/>
|
|
235
|
+
</ArtifactViewProvider>
|
|
236
|
+
</LiveArtifactProvider>
|
|
209
237
|
</EditSessionProvider>
|
|
210
238
|
<DiscardDialog edit={edit} />
|
|
211
239
|
</>
|
|
@@ -236,6 +264,11 @@ function LoadFailure({ error }: { readonly error: unknown }) {
|
|
|
236
264
|
)
|
|
237
265
|
}
|
|
238
266
|
|
|
267
|
+
/** Whether a read failed because the artifact is gone for the reader: deleted, or not shared. */
|
|
268
|
+
function isGone(error: unknown): boolean {
|
|
269
|
+
return isSixbApiError(error) && (error.status === 404 || error.code === "not_shared")
|
|
270
|
+
}
|
|
271
|
+
|
|
239
272
|
/** The kinds a reader edits in place; the rest are the Agent's to change. */
|
|
240
273
|
const EDITABLE_KINDS: ReadonlySet<ArtifactKindName> = new Set(["sheet", "canvas"])
|
|
241
274
|
|
|
@@ -245,7 +278,7 @@ type SaveState =
|
|
|
245
278
|
| { readonly state: "failed"; readonly refused?: string }
|
|
246
279
|
| { readonly state: "moved"; readonly latest: ArtifactMoved }
|
|
247
280
|
|
|
248
|
-
/** Editing the version shown: whether it can be, the draft, and saving it as the
|
|
281
|
+
/** Editing the version shown: whether it can be, the draft, and saving it as the latest. */
|
|
249
282
|
interface ArtifactEdit {
|
|
250
283
|
/** Whether the reader may edit what is shown: the latest version of a kind that edits. */
|
|
251
284
|
readonly available: boolean
|
|
@@ -257,12 +290,10 @@ interface ArtifactEdit {
|
|
|
257
290
|
/** Takes back the draft's last change; absent when there is none. */
|
|
258
291
|
readonly undo?: () => void
|
|
259
292
|
readonly redo?: () => void
|
|
260
|
-
/** The version a save publishes. */
|
|
261
|
-
readonly next: number
|
|
262
293
|
readonly start: () => void
|
|
263
294
|
readonly report: (draft: ArtifactDraft | null) => void
|
|
264
|
-
/** Saves the draft as the
|
|
265
|
-
readonly save: (
|
|
295
|
+
/** Saves the draft as the latest; over `baseRevision`, when the reader chose to. */
|
|
296
|
+
readonly save: (baseRevision?: number) => Promise<void>
|
|
266
297
|
/** Leaves editing, asking first when the draft has changes. */
|
|
267
298
|
readonly discard: () => void
|
|
268
299
|
/** Leaves editing for the latest version, the draft dropped. */
|
|
@@ -279,8 +310,8 @@ function useArtifactEdit(
|
|
|
279
310
|
detail: ArtifactDetail | undefined,
|
|
280
311
|
version: ArtifactVersion | undefined,
|
|
281
312
|
onTargetChange: (target: ViewerTarget) => void,
|
|
282
|
-
/** The version being edited, which the view holds to; null while not
|
|
283
|
-
[edited, setEdited]: readonly [
|
|
313
|
+
/** The version being edited, as editing found it, which the view holds to; null while not. */
|
|
314
|
+
[edited, setEdited]: readonly [ArtifactVersion | null, (version: ArtifactVersion | null) => void]
|
|
284
315
|
): ArtifactEdit {
|
|
285
316
|
const queries = useQueryClient()
|
|
286
317
|
const editing = edited !== null
|
|
@@ -303,18 +334,27 @@ function useArtifactEdit(
|
|
|
303
334
|
canPublish
|
|
304
335
|
const changed = editing && !!draft?.changed
|
|
305
336
|
|
|
306
|
-
// A
|
|
307
|
-
//
|
|
337
|
+
// A change made while the reader edits is announced at once, as a save would meet it: with the
|
|
338
|
+
// same choices, and the header's Save saving over it.
|
|
308
339
|
const arrived =
|
|
309
|
-
|
|
340
|
+
edited && artifact && artifact.revision > edited.revision
|
|
310
341
|
? detail?.versions.find((entry) => entry.version === artifact.latestVersion)
|
|
311
342
|
: undefined
|
|
312
343
|
const saving: SaveState =
|
|
313
344
|
arrived &&
|
|
345
|
+
artifact &&
|
|
314
346
|
(state.state === "idle" ||
|
|
315
347
|
state.state === "failed" ||
|
|
316
|
-
(state.state === "moved" && state.latest.
|
|
317
|
-
? {
|
|
348
|
+
(state.state === "moved" && state.latest.revision < artifact.revision))
|
|
349
|
+
? {
|
|
350
|
+
state: "moved",
|
|
351
|
+
latest: {
|
|
352
|
+
version: arrived.version,
|
|
353
|
+
revision: artifact.revision,
|
|
354
|
+
author: arrived.author,
|
|
355
|
+
...(arrived.frozenBy ? { frozenBy: arrived.frozenBy } : {}),
|
|
356
|
+
},
|
|
357
|
+
}
|
|
318
358
|
: state
|
|
319
359
|
|
|
320
360
|
const stop = useCallback(() => {
|
|
@@ -326,12 +366,12 @@ function useArtifactEdit(
|
|
|
326
366
|
const save = useCallback(
|
|
327
367
|
async (over?: number) => {
|
|
328
368
|
if (!version || !draft?.changed || saving.state === "saving") return
|
|
329
|
-
// Once a save has met a later
|
|
330
|
-
const
|
|
369
|
+
// Once a save has met a later change, saving again is saving over it, as the notice says.
|
|
370
|
+
const baseRevision = over ?? (saving.state === "moved" ? saving.latest.revision : undefined)
|
|
331
371
|
setSaving({ state: "saving" })
|
|
332
372
|
try {
|
|
333
|
-
await saveDraft(queries, version, draft,
|
|
334
|
-
// The artifact's latest version
|
|
373
|
+
await saveDraft(queries, version, draft, baseRevision === undefined ? {} : { baseRevision })
|
|
374
|
+
// The artifact's latest version holds what was just saved: the view moves to it.
|
|
335
375
|
await queries.invalidateQueries({
|
|
336
376
|
queryKey: getArtifactQueryKey({ path: { artifactId: version.artifactId } }),
|
|
337
377
|
})
|
|
@@ -390,11 +430,10 @@ function useArtifactEdit(
|
|
|
390
430
|
savedShared,
|
|
391
431
|
...(editing && draft?.undo ? { undo: draft.undo } : {}),
|
|
392
432
|
...(editing && draft?.redo ? { redo: draft.redo } : {}),
|
|
393
|
-
next: (saving.state === "moved" ? saving.latest.version : (artifact?.latestVersion ?? 0)) + 1,
|
|
394
433
|
start: () => {
|
|
395
434
|
if (!version) return
|
|
396
435
|
setSaving({ state: "idle" })
|
|
397
|
-
setEdited(version
|
|
436
|
+
setEdited(version)
|
|
398
437
|
},
|
|
399
438
|
report: setDraft,
|
|
400
439
|
save,
|
|
@@ -427,7 +466,12 @@ function publishRefusal(error: unknown): string | undefined {
|
|
|
427
466
|
function EditNotice({ edit }: { readonly edit: ArtifactEdit }) {
|
|
428
467
|
const messages = useArtifactMessages().edit
|
|
429
468
|
const user = useCurrentUser()
|
|
469
|
+
const nameOf = useArtifactPeople()
|
|
430
470
|
const moved = edit.saving.state === "moved" ? edit.saving.latest : null
|
|
471
|
+
// Who made the change met: whoever created the version, else whoever last wrote it.
|
|
472
|
+
const by = moved ? (moved.frozenBy ?? moved.author) : null
|
|
473
|
+
const byYou = by?.type === "user" && by.id === user?.id
|
|
474
|
+
const who = by ? (nameOf(by) ?? null) : null
|
|
431
475
|
const refused = edit.saving.state === "failed" ? edit.saving.refused : undefined
|
|
432
476
|
return (
|
|
433
477
|
<div
|
|
@@ -438,24 +482,29 @@ function EditNotice({ edit }: { readonly edit: ArtifactEdit }) {
|
|
|
438
482
|
<div className="min-w-0 flex-1">
|
|
439
483
|
<p className="font-medium text-foreground">
|
|
440
484
|
{moved
|
|
441
|
-
?
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
)
|
|
485
|
+
? moved.frozenBy
|
|
486
|
+
? messages.created(moved.version, who, byYou)
|
|
487
|
+
: messages.changed(who, byYou)
|
|
445
488
|
: refused
|
|
446
489
|
? messages.saveRefused
|
|
447
490
|
: messages.saveFailed}
|
|
448
491
|
</p>
|
|
449
|
-
{moved ?
|
|
492
|
+
{moved ? (
|
|
493
|
+
<p className="text-muted-foreground">
|
|
494
|
+
{moved.frozenBy
|
|
495
|
+
? messages.createdDescription(moved.version)
|
|
496
|
+
: messages.changedDescription}
|
|
497
|
+
</p>
|
|
498
|
+
) : null}
|
|
450
499
|
{refused ? <p className="text-muted-foreground">{refused}</p> : null}
|
|
451
500
|
</div>
|
|
452
501
|
{moved ? (
|
|
453
502
|
<div className="flex shrink-0 items-center gap-2">
|
|
454
503
|
<Button size="sm" variant="outline" onClick={edit.openLatest}>
|
|
455
|
-
{messages.openLatest
|
|
504
|
+
{messages.openLatest}
|
|
456
505
|
</Button>
|
|
457
|
-
<Button size="sm" onClick={() => void edit.save(moved.
|
|
458
|
-
{messages.saveAnyway
|
|
506
|
+
<Button size="sm" onClick={() => void edit.save(moved.revision)}>
|
|
507
|
+
{messages.saveAnyway}
|
|
459
508
|
</Button>
|
|
460
509
|
</div>
|
|
461
510
|
) : null}
|
|
@@ -563,6 +612,7 @@ function ArtifactHeader({
|
|
|
563
612
|
version,
|
|
564
613
|
chrome,
|
|
565
614
|
edit,
|
|
615
|
+
liveView,
|
|
566
616
|
onVersionChange,
|
|
567
617
|
}: {
|
|
568
618
|
readonly target: ArtifactTarget
|
|
@@ -570,18 +620,27 @@ function ArtifactHeader({
|
|
|
570
620
|
readonly version: ArtifactVersion
|
|
571
621
|
readonly chrome: ViewerChrome
|
|
572
622
|
readonly edit: ArtifactEdit
|
|
623
|
+
readonly liveView: LiveView | null
|
|
573
624
|
readonly onVersionChange: (version: number) => void
|
|
574
625
|
}) {
|
|
575
626
|
const messages = useArtifactMessages()
|
|
627
|
+
// A shared link's guest has no link to pass on: the artifact's page opens nothing for anyone else.
|
|
628
|
+
const guest = useSharedGuest() !== null
|
|
576
629
|
const { artifact } = detail
|
|
577
630
|
const live = holdsQueries(version)
|
|
631
|
+
// A canvas held live is edited live, not as a draft the header saves: until its document holds
|
|
632
|
+
// it, Edit waits. Only one the server never holds live is edited as a draft.
|
|
633
|
+
const heldLive = !!liveView && !liveView.state.left
|
|
634
|
+
if (liveView?.editing) {
|
|
635
|
+
return <LiveEditBar chrome={chrome} detail={detail} version={version} liveView={liveView} />
|
|
636
|
+
}
|
|
578
637
|
if (edit.editing) {
|
|
579
|
-
// The draft bar: what is being edited, Discard, and Save
|
|
580
|
-
//
|
|
581
|
-
//
|
|
638
|
+
// The draft bar: what is being edited, Discard, and Save. As the header narrows, down to a
|
|
639
|
+
// phone's dialog, the state and Discard fold to icons, and the kind and full page give way, so
|
|
640
|
+
// Save and Close stay in view.
|
|
582
641
|
const saving = edit.saving.state === "saving"
|
|
583
|
-
const state = edit.changed ? messages.edit.unsaved : messages.edit.editing
|
|
584
|
-
const saveLabel = saving ? messages.edit.saving : messages.edit.save
|
|
642
|
+
const state = edit.changed ? messages.edit.unsaved : messages.edit.editing
|
|
643
|
+
const saveLabel = saving ? messages.edit.saving : messages.edit.save
|
|
585
644
|
return (
|
|
586
645
|
<ViewerBar
|
|
587
646
|
chrome={chrome}
|
|
@@ -649,8 +708,7 @@ function ArtifactHeader({
|
|
|
649
708
|
aria-label={saveLabel}
|
|
650
709
|
>
|
|
651
710
|
{saving ? <LoaderCircle className="animate-spin" aria-hidden="true" /> : null}
|
|
652
|
-
{
|
|
653
|
-
<span className="hidden @xl:inline">{saveLabel}</span>
|
|
711
|
+
{saveLabel}
|
|
654
712
|
</Button>
|
|
655
713
|
</div>
|
|
656
714
|
</ViewerBar>
|
|
@@ -663,13 +721,40 @@ function ArtifactHeader({
|
|
|
663
721
|
title={version.title}
|
|
664
722
|
accessory={
|
|
665
723
|
<>
|
|
666
|
-
<
|
|
724
|
+
<VersionMenu
|
|
725
|
+
detail={detail}
|
|
726
|
+
version={version}
|
|
727
|
+
onVersionChange={onVersionChange}
|
|
728
|
+
onRestored={() => onVersionChange(artifact.latestVersion)}
|
|
729
|
+
/>
|
|
730
|
+
<ArtifactHolders artifactId={artifact.id} />
|
|
667
731
|
{live ? <LiveStatus version={version} /> : null}
|
|
732
|
+
{heldLive && liveView.state.connection === "offline" ? (
|
|
733
|
+
<LiveSaveStatus state={liveView.state} />
|
|
734
|
+
) : null}
|
|
735
|
+
{liveView ? <LiveAvatars live={liveView.live} /> : null}
|
|
668
736
|
</>
|
|
669
737
|
}
|
|
670
738
|
>
|
|
671
739
|
{live ? <RefreshButton version={version} /> : null}
|
|
672
|
-
{
|
|
740
|
+
{heldLive ? (
|
|
741
|
+
liveView.editable ? (
|
|
742
|
+
<Button
|
|
743
|
+
size="sm"
|
|
744
|
+
variant="ghost"
|
|
745
|
+
className="mr-0.5 text-muted-foreground hover:text-foreground"
|
|
746
|
+
onClick={liveView.start}
|
|
747
|
+
>
|
|
748
|
+
<PencilLine aria-hidden="true" />
|
|
749
|
+
{messages.edit.edit}
|
|
750
|
+
</Button>
|
|
751
|
+
) : !liveView.state.synced && edit.available ? (
|
|
752
|
+
<Button size="sm" variant="ghost" className="mr-0.5 text-muted-foreground" disabled>
|
|
753
|
+
<LoaderCircle className="animate-spin motion-reduce:animate-none" aria-hidden="true" />
|
|
754
|
+
{messages.live.connecting}
|
|
755
|
+
</Button>
|
|
756
|
+
) : null
|
|
757
|
+
) : edit.available ? (
|
|
673
758
|
<Button
|
|
674
759
|
size="sm"
|
|
675
760
|
variant="ghost"
|
|
@@ -686,7 +771,7 @@ function ArtifactHeader({
|
|
|
686
771
|
<EntryDownloadMenu version={version} kind={artifact.kind} />
|
|
687
772
|
)}
|
|
688
773
|
<ArtifactMenu detail={detail} chrome={chrome} />
|
|
689
|
-
{chrome.withoutPageLink ? null : (
|
|
774
|
+
{chrome.withoutPageLink || guest ? null : (
|
|
690
775
|
<CopyLinkButton
|
|
691
776
|
link={() => artifactLink(target, artifact.latestVersion, location.origin)}
|
|
692
777
|
/>
|
|
@@ -696,89 +781,62 @@ function ArtifactHeader({
|
|
|
696
781
|
}
|
|
697
782
|
|
|
698
783
|
/**
|
|
699
|
-
* The
|
|
700
|
-
*
|
|
784
|
+
* The header while the reader edits a live canvas: who else is here and where their changes are,
|
|
785
|
+
* this reader's own undo and redo, and Done. Nothing waits to be saved: each change is everyone's
|
|
786
|
+
* as it is made. As the header narrows, the kind and the save state's words give way.
|
|
701
787
|
*/
|
|
702
|
-
function
|
|
788
|
+
function LiveEditBar({
|
|
789
|
+
chrome,
|
|
703
790
|
detail,
|
|
704
791
|
version,
|
|
705
|
-
|
|
792
|
+
liveView,
|
|
706
793
|
}: {
|
|
794
|
+
readonly chrome: ViewerChrome
|
|
707
795
|
readonly detail: ArtifactDetail
|
|
708
796
|
readonly version: ArtifactVersion
|
|
709
|
-
readonly
|
|
797
|
+
readonly liveView: LiveView
|
|
710
798
|
}) {
|
|
711
|
-
const messages = useArtifactMessages()
|
|
712
|
-
const
|
|
713
|
-
const latest = detail.artifact.latestVersion
|
|
714
|
-
const date = (iso: string) =>
|
|
715
|
-
new Date(iso).toLocaleDateString(locale, { month: "short", day: "numeric", year: "numeric" })
|
|
716
|
-
return (
|
|
717
|
-
<DropdownMenu>
|
|
718
|
-
<DropdownMenuTrigger
|
|
719
|
-
aria-label={`${messages.versionLabel(version.version)} · ${messages.versions}`}
|
|
720
|
-
className="inline-flex h-6 shrink-0 items-center gap-1 rounded-full border border-border/80 bg-card pr-1.5 pl-2 text-xs font-medium text-muted-foreground tabular-nums shadow-[0_1px_1px_rgb(0_0_0/0.03)] outline-none transition-colors hover:border-border hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring data-[state=open]:border-border data-[state=open]:text-foreground"
|
|
721
|
-
>
|
|
722
|
-
{version.version === latest ? null : (
|
|
723
|
-
<span className="size-1.5 rounded-full bg-warning" aria-hidden="true" />
|
|
724
|
-
)}
|
|
725
|
-
{messages.version(version.version)}
|
|
726
|
-
<ChevronDown className="size-3 opacity-70" aria-hidden="true" />
|
|
727
|
-
</DropdownMenuTrigger>
|
|
728
|
-
<DropdownMenuContent align="start" sideOffset={6} className="max-h-80 w-72 p-1.5">
|
|
729
|
-
<DropdownMenuLabel className="px-2 pt-1 pb-1.5 text-[11px] font-medium tracking-wide text-muted-foreground uppercase">
|
|
730
|
-
{messages.versions}
|
|
731
|
-
</DropdownMenuLabel>
|
|
732
|
-
<DropdownMenuRadioGroup
|
|
733
|
-
value={String(version.version)}
|
|
734
|
-
onValueChange={(value) => onVersionChange(Number(value))}
|
|
735
|
-
>
|
|
736
|
-
{detail.versions.map((entry) => (
|
|
737
|
-
<DropdownMenuRadioItem
|
|
738
|
-
key={entry.version}
|
|
739
|
-
value={String(entry.version)}
|
|
740
|
-
className="rounded-md py-1.5"
|
|
741
|
-
>
|
|
742
|
-
<span className="flex min-w-0 flex-1 flex-col">
|
|
743
|
-
<span className="text-[13px] font-medium tabular-nums">
|
|
744
|
-
{messages.versionLabel(entry.version)}
|
|
745
|
-
</span>
|
|
746
|
-
<span className="flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground">
|
|
747
|
-
<VersionAuthor author={entry.author} />
|
|
748
|
-
<span className="shrink-0">{date(entry.createdAt)}</span>
|
|
749
|
-
</span>
|
|
750
|
-
</span>
|
|
751
|
-
{entry.version === latest ? (
|
|
752
|
-
<span className="rounded-full bg-primary/10 px-1.5 py-0.5 text-[11px] font-medium text-primary">
|
|
753
|
-
{messages.latest}
|
|
754
|
-
</span>
|
|
755
|
-
) : null}
|
|
756
|
-
</DropdownMenuRadioItem>
|
|
757
|
-
))}
|
|
758
|
-
</DropdownMenuRadioGroup>
|
|
759
|
-
</DropdownMenuContent>
|
|
760
|
-
</DropdownMenu>
|
|
761
|
-
)
|
|
762
|
-
}
|
|
763
|
-
|
|
764
|
-
/**
|
|
765
|
-
* Who published a version, when the reader can tell: themselves, or someone of the conversation the
|
|
766
|
-
* artifact opens in.
|
|
767
|
-
*/
|
|
768
|
-
function VersionAuthor({ author }: { readonly author: ArtifactAuthor }) {
|
|
769
|
-
const messages = useArtifactMessages().viewer
|
|
770
|
-
const user = useCurrentUser()
|
|
771
|
-
const nameOf = useArtifactPeople()
|
|
772
|
-
const own = author.type === "user" && author.id === user?.id
|
|
773
|
-
const name = own ? (user?.displayName ?? user?.email) : nameOf(author)
|
|
774
|
-
if (!name) return null
|
|
775
|
-
|
|
799
|
+
const messages = useArtifactMessages()
|
|
800
|
+
const { artifact } = detail
|
|
776
801
|
return (
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
802
|
+
<ViewerBar
|
|
803
|
+
chrome={chrome}
|
|
804
|
+
editing
|
|
805
|
+
leading={
|
|
806
|
+
<span className="hidden @md:contents">
|
|
807
|
+
<ArtifactKindTile kind={artifact.kind} label={messages.kinds[artifact.kind]} />
|
|
808
|
+
</span>
|
|
809
|
+
}
|
|
810
|
+
title={version.title}
|
|
811
|
+
accessory={
|
|
812
|
+
<>
|
|
813
|
+
<LiveSaveStatus state={liveView.state} />
|
|
814
|
+
<LiveAvatars live={liveView.live} />
|
|
815
|
+
</>
|
|
816
|
+
}
|
|
817
|
+
>
|
|
818
|
+
<div className="flex items-center gap-1.5 pr-1">
|
|
819
|
+
<div className="mr-1 flex items-center">
|
|
820
|
+
<HeaderButton
|
|
821
|
+
label={messages.edit.undo}
|
|
822
|
+
onClick={liveView.undo}
|
|
823
|
+
disabled={!liveView.history.undo}
|
|
824
|
+
>
|
|
825
|
+
<Undo2 />
|
|
826
|
+
</HeaderButton>
|
|
827
|
+
<HeaderButton
|
|
828
|
+
label={messages.edit.redo}
|
|
829
|
+
onClick={liveView.redo}
|
|
830
|
+
disabled={!liveView.history.redo}
|
|
831
|
+
>
|
|
832
|
+
<Redo2 />
|
|
833
|
+
</HeaderButton>
|
|
834
|
+
</div>
|
|
835
|
+
<Button size="sm" onClick={liveView.stop}>
|
|
836
|
+
{messages.live.done}
|
|
837
|
+
</Button>
|
|
838
|
+
</div>
|
|
839
|
+
</ViewerBar>
|
|
782
840
|
)
|
|
783
841
|
}
|
|
784
842
|
|
|
@@ -1148,7 +1206,7 @@ function ViewerBar({
|
|
|
1148
1206
|
const messages = useArtifactMessages().viewer
|
|
1149
1207
|
return (
|
|
1150
1208
|
<TooltipProvider delayDuration={400}>
|
|
1151
|
-
<header className="@container flex h-13 shrink-0 items-center gap-2 border-b border-border/60 px-2.5">
|
|
1209
|
+
<header className="@container relative flex h-13 shrink-0 items-center gap-2 border-b border-border/60 px-2.5">
|
|
1152
1210
|
{chrome.onBack ? (
|
|
1153
1211
|
<HeaderButton label={messages.back} onClick={chrome.onBack}>
|
|
1154
1212
|
<ArrowLeft />
|