zidane-ui 9.3.1 → 9.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/index.d.ts +2 -1
- package/dist/adapters/index.js +2 -1
- package/dist/adapters/live.d.ts +9 -2
- package/dist/adapters/live.js +8 -2
- package/dist/adapters/server-approvals-host.js +3 -1
- package/dist/adapters/server-channels-host.d.ts +32 -0
- package/dist/adapters/server-channels-host.js +49 -0
- package/dist/adapters/server-composer-host.js +13 -0
- package/dist/adapters/server-files-host.js +12 -31
- package/dist/adapters/server-git-host.js +5 -2
- package/dist/adapters/server-host.js +44 -14
- package/dist/adapters/server-machines-host.d.ts +5 -0
- package/dist/adapters/server-machines-host.js +15 -1
- package/dist/adapters/server-oauth-flow.d.ts +2 -1
- package/dist/adapters/server-projects.d.ts +15 -0
- package/dist/adapters/server-projects.js +225 -0
- package/dist/adapters/server-session-host.d.ts +2 -0
- package/dist/adapters/server-session-host.js +69 -1
- package/dist/adapters/server-settings-sections.js +4 -1
- package/dist/adapters/sse-host.js +3 -0
- package/dist/adapters/sse-protocol.d.ts +10 -0
- package/dist/app/AppHostProvider.d.ts +1 -1
- package/dist/app/AppHostProvider.js +7 -2
- package/dist/app/ModalProvider.d.ts +6 -2
- package/dist/app/ModalProvider.js +38 -10
- package/dist/app/headless/app-host.d.ts +3 -0
- package/dist/appearance/ZoomIndicator.js +5 -8
- package/dist/approvals/ApprovalsProvider.d.ts +2 -1
- package/dist/approvals/ApprovalsProvider.js +12 -4
- package/dist/approvals/headless/host.d.ts +13 -2
- package/dist/approvals/headless/index.d.ts +3 -3
- package/dist/approvals/headless/index.js +2 -2
- package/dist/approvals/headless/labels.d.ts +12 -2
- package/dist/approvals/headless/labels.js +19 -1
- package/dist/channels/BindingEditorDialog.d.ts +18 -0
- package/dist/channels/BindingEditorDialog.js +637 -0
- package/dist/channels/ChannelAlertsList.d.ts +25 -0
- package/dist/channels/ChannelAlertsList.js +107 -0
- package/dist/channels/ChannelDefaultsSection.d.ts +20 -0
- package/dist/channels/ChannelDefaultsSection.js +133 -0
- package/dist/channels/ChannelsProvider.d.ts +31 -0
- package/dist/channels/ChannelsProvider.js +29 -0
- package/dist/channels/ChannelsSettingsSection.d.ts +40 -0
- package/dist/channels/ChannelsSettingsSection.js +456 -0
- package/dist/channels/ConnectionSetupDialog.d.ts +16 -0
- package/dist/channels/ConnectionSetupDialog.js +470 -0
- package/dist/channels/HeldRepliesList.d.ts +27 -0
- package/dist/channels/HeldRepliesList.js +173 -0
- package/dist/channels/ProjectChannelsSection.d.ts +55 -0
- package/dist/channels/ProjectChannelsSection.js +433 -0
- package/dist/channels/ReadinessChecklist.d.ts +102 -0
- package/dist/channels/ReadinessChecklist.js +273 -0
- package/dist/channels/TestSessionBanner.d.ts +24 -0
- package/dist/channels/TestSessionBanner.js +44 -0
- package/dist/channels/channels-parts.d.ts +104 -0
- package/dist/channels/channels-parts.js +203 -0
- package/dist/channels/context.d.ts +9 -0
- package/dist/channels/context.js +14 -0
- package/dist/channels/headless/access.d.ts +127 -0
- package/dist/channels/headless/access.js +187 -0
- package/dist/channels/headless/fixture-host.d.ts +83 -0
- package/dist/channels/headless/fixture-host.js +557 -0
- package/dist/channels/headless/host.d.ts +245 -0
- package/dist/channels/headless/host.js +39 -0
- package/dist/channels/headless/index.d.ts +10 -0
- package/dist/channels/headless/index.js +5 -0
- package/dist/channels/headless/labels.d.ts +217 -0
- package/dist/channels/headless/labels.js +260 -0
- package/dist/channels/headless/state.d.ts +22 -0
- package/dist/channels/headless/state.js +303 -0
- package/dist/channels/index.d.ts +21 -0
- package/dist/channels/index.js +13 -0
- package/dist/channels/testing/contract.d.ts +31 -0
- package/dist/channels/testing/contract.js +378 -0
- package/dist/channels/testing/index.d.ts +7 -0
- package/dist/channels/testing/index.js +1 -0
- package/dist/chat/HostBadge.js +1 -0
- package/dist/chat/HostTranscript.js +15 -1
- package/dist/chat/OrchestratorBadge.d.ts +23 -0
- package/dist/chat/OrchestratorBadge.js +22 -0
- package/dist/chat/SessionGroupHeader.d.ts +11 -1
- package/dist/chat/SessionGroupHeader.js +25 -14
- package/dist/chat/SessionRow.d.ts +141 -0
- package/dist/chat/SessionRow.js +215 -0
- package/dist/chat/SessionStreamsProvider.d.ts +1 -1
- package/dist/chat/StatusDot.d.ts +7 -2
- package/dist/chat/StatusDot.js +3 -2
- package/dist/chat/Transcript.d.ts +3 -2
- package/dist/chat/Transcript.js +26 -7
- package/dist/chat/composer/ComposerEditor.js +1 -1
- package/dist/chat/composer/ContextBreakdown.d.ts +27 -2
- package/dist/chat/composer/ContextBreakdown.js +123 -2
- package/dist/chat/composer/DraftPickers.js +2 -0
- package/dist/chat/composer/HostContextOrb.d.ts +2 -0
- package/dist/chat/composer/HostContextOrb.js +17 -2
- package/dist/chat/composer/ModelOptionsPicker.js +6 -2
- package/dist/chat/composer/ModelPicker.d.ts +1 -1
- package/dist/chat/composer/PlacePicker.d.ts +3 -1
- package/dist/chat/composer/PlacePicker.js +5 -1
- package/dist/chat/composer/ProjectMenu.d.ts +16 -3
- package/dist/chat/composer/ProjectMenu.js +102 -20
- package/dist/chat/composer/ScopeToggle.d.ts +3 -1
- package/dist/chat/composer/ScopeToggle.js +2 -1
- package/dist/chat/composer/ServerScopeToggle.d.ts +3 -1
- package/dist/chat/composer/ServerScopeToggle.js +2 -1
- package/dist/chat/composer/index.d.ts +2 -2
- package/dist/chat/composer/index.js +2 -2
- package/dist/chat/composer/use-draft-target.d.ts +5 -0
- package/dist/chat/composer/use-draft-target.js +18 -3
- package/dist/chat/composer/use-send-prompt.d.ts +2 -0
- package/dist/chat/composer/use-send-prompt.js +4 -1
- package/dist/chat/headless/answered-first.d.ts +28 -0
- package/dist/chat/headless/answered-first.js +14 -0
- package/dist/chat/headless/block-runs.js +26 -1
- package/dist/chat/headless/chip-labels.d.ts +2 -0
- package/dist/chat/headless/chip-labels.js +2 -0
- package/dist/chat/headless/chip-views.js +1 -1
- package/dist/chat/headless/composer/composer-sources.d.ts +5 -2
- package/dist/chat/headless/composer/composer-sources.js +6 -0
- package/dist/chat/headless/composer/host.d.ts +13 -0
- package/dist/chat/headless/composer/index.d.ts +2 -2
- package/dist/chat/headless/composer/labels-chrome.d.ts +3 -0
- package/dist/chat/headless/composer/labels-chrome.js +4 -1
- package/dist/chat/headless/composer/labels-editor.d.ts +2 -0
- package/dist/chat/headless/composer/labels-editor.js +2 -0
- package/dist/chat/headless/draft-target.d.ts +30 -1
- package/dist/chat/headless/draft-target.js +22 -1
- package/dist/chat/headless/folder-groups.d.ts +41 -0
- package/dist/chat/headless/folder-groups.js +76 -0
- package/dist/chat/headless/host.d.ts +16 -1
- package/dist/chat/headless/hosts.d.ts +4 -0
- package/dist/chat/headless/index.d.ts +31 -27
- package/dist/chat/headless/index.js +33 -29
- package/dist/chat/headless/labels.d.ts +34 -4
- package/dist/chat/headless/labels.js +28 -6
- package/dist/chat/headless/markdown-scan.d.ts +0 -2
- package/dist/chat/headless/markdown-scan.js +3 -8
- package/dist/chat/headless/markdown-stream.js +3 -3
- package/dist/chat/headless/prompt-origin.d.ts +4 -2
- package/dist/chat/headless/prompt-origin.js +9 -5
- package/dist/chat/headless/send-flow.d.ts +2 -0
- package/dist/chat/headless/session-list.d.ts +28 -2
- package/dist/chat/headless/sidebar/directory.d.ts +15 -1
- package/dist/chat/headless/sidebar/directory.js +11 -1
- package/dist/chat/headless/sidebar/environment.d.ts +15 -4
- package/dist/chat/headless/sidebar/environment.js +27 -9
- package/dist/chat/headless/sidebar/inbox.d.ts +13 -3
- package/dist/chat/headless/sidebar/inbox.js +40 -19
- package/dist/chat/headless/sidebar/index.d.ts +6 -4
- package/dist/chat/headless/sidebar/index.js +5 -3
- package/dist/chat/headless/sidebar/labels.d.ts +38 -8
- package/dist/chat/headless/sidebar/labels.js +8 -4
- package/dist/chat/headless/sidebar/project-main.d.ts +43 -0
- package/dist/chat/headless/sidebar/project-main.js +46 -0
- package/dist/chat/headless/sidebar/row-changes.d.ts +43 -0
- package/dist/chat/headless/sidebar/row-changes.js +43 -0
- package/dist/chat/headless/sidebar/rows.d.ts +2 -1
- package/dist/chat/headless/sidebar/rows.js +7 -3
- package/dist/chat/headless/sidebar/types.d.ts +12 -0
- package/dist/chat/headless/streams/actions.d.ts +2 -2
- package/dist/chat/headless/streams/actions.js +1 -1
- package/dist/chat/headless/streams/event-bytes.d.ts +12 -1
- package/dist/chat/headless/streams/event-bytes.js +13 -1
- package/dist/chat/headless/streams/live-events.d.ts +12 -0
- package/dist/chat/headless/streams/live-events.js +21 -2
- package/dist/chat/headless/streams/store.d.ts +38 -5
- package/dist/chat/headless/streams/store.js +74 -22
- package/dist/chat/headless/streams/transcript-map.js +2 -5
- package/dist/chat/headless/streams/types.d.ts +4 -2
- package/dist/chat/headless/transcript/collapse.js +6 -1
- package/dist/chat/headless/transcript/rail.d.ts +8 -1
- package/dist/chat/headless/transcript/rail.js +9 -2
- package/dist/chat/headless/transcript/rows.d.ts +5 -1
- package/dist/chat/headless/transcript-labels.d.ts +1 -0
- package/dist/chat/index.d.ts +6 -4
- package/dist/chat/index.js +8 -6
- package/dist/chat/interactions/HostInteractions.js +4 -2
- package/dist/chat/interactions/InboxPanel.js +6 -4
- package/dist/chat/interactions/use-answer-interaction.d.ts +11 -0
- package/dist/chat/interactions/use-answer-interaction.js +19 -0
- package/dist/chat/rich-composer/artifact-mentions.d.ts +29 -0
- package/dist/chat/rich-composer/artifact-mentions.js +40 -0
- package/dist/chat/rich-composer/composer-extensions.d.ts +3 -2
- package/dist/chat/rich-composer/composer-extensions.js +12 -9
- package/dist/chat/rich-composer/use-composer-sources.js +1 -0
- package/dist/chat/sidebar/InboxList.d.ts +13 -2
- package/dist/chat/sidebar/InboxList.js +44 -48
- package/dist/chat/sidebar/MainSessionRow.d.ts +2 -1
- package/dist/chat/sidebar/MainSessionRow.js +1 -1
- package/dist/chat/sidebar/ProjectIcon.d.ts +8 -4
- package/dist/chat/sidebar/ProjectIcon.js +16 -4
- package/dist/chat/sidebar/RowChips.js +2 -2
- package/dist/chat/sidebar/SessionSidebar.d.ts +47 -0
- package/dist/chat/sidebar/SessionSidebar.js +85 -28
- package/dist/chat/sidebar/SidebarFilterMenu.js +0 -1
- package/dist/chat/sidebar/SidebarFold.js +17 -16
- package/dist/chat/sidebar/SidebarFooter.d.ts +2 -23
- package/dist/chat/sidebar/SidebarFooter.js +2 -43
- package/dist/chat/sidebar/SidebarGroupHeader.d.ts +7 -3
- package/dist/chat/sidebar/SidebarGroupHeader.js +15 -10
- package/dist/chat/sidebar/SidebarLiveProvider.d.ts +22 -0
- package/dist/chat/sidebar/SidebarLiveProvider.js +20 -0
- package/dist/chat/sidebar/SidebarSessionRow.d.ts +12 -1
- package/dist/chat/sidebar/SidebarSessionRow.js +25 -13
- package/dist/chat/sidebar/inbox-triage.d.ts +18 -2
- package/dist/chat/sidebar/inbox-triage.js +39 -12
- package/dist/chat/sidebar/index.d.ts +5 -4
- package/dist/chat/sidebar/index.js +3 -2
- package/dist/chat/sidebar/session-menu.d.ts +4 -0
- package/dist/chat/sidebar/session-menu.js +14 -2
- package/dist/chat/sidebar/sidebar-live.d.ts +29 -2
- package/dist/chat/sidebar/sidebar-live.js +64 -6
- package/dist/chat/sidebar/useInboxRows.js +8 -9
- package/dist/chat/sidebar/useInboxTriage.d.ts +5 -2
- package/dist/chat/sidebar/useInboxTriage.js +78 -67
- package/dist/chat/sidebar/useSessionSearch.js +19 -18
- package/dist/chat/testing/fixture-composer-host.d.ts +3 -1
- package/dist/chat/testing/fixture-composer-host.js +1 -0
- package/dist/chat/transcript/FileChip.js +28 -0
- package/dist/chat/transcript/LazyRow.d.ts +1 -1
- package/dist/chat/transcript/LazyRow.js +3 -4
- package/dist/chat/transcript/PromptEcho.js +18 -13
- package/dist/chat/transcript/PromptOriginLabel.d.ts +1 -1
- package/dist/chat/transcript/SessionChip.d.ts +11 -0
- package/dist/chat/transcript/SessionChip.js +34 -0
- package/dist/chat/transcript/TranscriptRail.d.ts +4 -2
- package/dist/chat/transcript/TranscriptRail.js +12 -2
- package/dist/chat/transcript/TranscriptRow.js +1 -0
- package/dist/chat/transcript/badges.d.ts +1 -0
- package/dist/chat/transcript/badges.js +1 -0
- package/dist/chat/transcript/chip-details.d.ts +11 -0
- package/dist/chat/transcript/chip-details.js +17 -1
- package/dist/chat/transcript/fold-worker.js +2 -1
- package/dist/chat/transcript/fold.js +13 -4
- package/dist/chat/transcript/index.d.ts +3 -3
- package/dist/chat/transcript/index.js +3 -3
- package/dist/chat/transcript/inline-facts.d.ts +9 -0
- package/dist/chat/transcript/inline-facts.js +20 -0
- package/dist/chat/transcript/markdown-cache.d.ts +10 -1
- package/dist/chat/transcript/markdown-cache.js +37 -4
- package/dist/chat/transcript/markdown.js +27 -34
- package/dist/chat/transcript/media-gallery.js +13 -16
- package/dist/chat/transcript/messages.js +5 -4
- package/dist/chat/transcript/notices.d.ts +25 -3
- package/dist/chat/transcript/notices.js +136 -17
- package/dist/chat/transcript/prompt.d.ts +1 -1
- package/dist/chat/transcript/prompt.js +8 -1
- package/dist/chat/transcript/row-mount.d.ts +27 -8
- package/dist/chat/transcript/row-mount.js +114 -80
- package/dist/chat/transcript/row-parking.d.ts +27 -0
- package/dist/chat/transcript/row-parking.js +37 -1
- package/dist/chat/transcript/script-input.d.ts +1 -1
- package/dist/chat/transcript/tasks.d.ts +1 -1
- package/dist/chat/transcript/tasks.js +1 -1
- package/dist/chat/transcript/tool-parts.js +0 -1
- package/dist/chat/transcript/tool-row.js +3 -2
- package/dist/chat/transcript/use-transcript-rows.d.ts +1 -1
- package/dist/chat/transcript/useHistoryBackfill.d.ts +42 -0
- package/dist/chat/transcript/useHistoryBackfill.js +170 -0
- package/dist/chat/transcript/useTranscriptFind.js +2 -4
- package/dist/chat/transcript/useTranscriptScroll.d.ts +7 -4
- package/dist/chat/transcript/useTranscriptScroll.js +12 -1
- package/dist/chat/transcript/useTranscriptSearch.d.ts +2 -2
- package/dist/chat/transcript/useTranscriptSearch.js +6 -6
- package/dist/chat/transcript/useTranscriptSelectionCopy.d.ts +5 -5
- package/dist/chat/transcript/useTranscriptSelectionCopy.js +28 -7
- package/dist/code/editor/FileTree.d.ts +2 -0
- package/dist/code/editor/FileTree.js +1 -1
- package/dist/code/editor/FileView.js +16 -27
- package/dist/code/editor/find/useFind.js +17 -17
- package/dist/code/editor/useCodeDocument.js +22 -19
- package/dist/code/editor/useDetachCleanup.js +4 -3
- package/dist/code/use-highlighted-html.js +12 -13
- package/dist/components/Form.d.ts +28 -1
- package/dist/components/Form.js +43 -7
- package/dist/components/HelpTip.d.ts +22 -0
- package/dist/components/HelpTip.js +26 -0
- package/dist/components/IconButton.d.ts +3 -1
- package/dist/components/IconButton.js +7 -2
- package/dist/components/IconButtonTip.d.ts +3 -1
- package/dist/components/IconButtonTip.js +2 -1
- package/dist/components/Menu.js +1 -1
- package/dist/components/Notice.d.ts +6 -4
- package/dist/components/Notice.js +73 -27
- package/dist/components/Progress.js +10 -4
- package/dist/components/RowActionsMenu.js +7 -14
- package/dist/components/SearchField.d.ts +46 -0
- package/dist/components/SearchField.js +50 -0
- package/dist/components/ShowMore.d.ts +48 -0
- package/dist/components/ShowMore.js +57 -0
- package/dist/components/Tooltip.d.ts +4 -1
- package/dist/components/Tooltip.js +16 -11
- package/dist/components/assign-ref.d.ts +8 -0
- package/dist/components/assign-ref.js +12 -0
- package/dist/components/charts/ScatterChart.js +13 -6
- package/dist/components/floating/FloatingSurface.js +4 -4
- package/dist/components/floating/HoverCard.js +32 -14
- package/dist/components/floating/Popover.js +4 -7
- package/dist/components/floating/useAnchoredPosition.d.ts +20 -4
- package/dist/components/floating/useAnchoredPosition.js +44 -10
- package/dist/components/object-key.d.ts +7 -0
- package/dist/components/object-key.js +18 -0
- package/dist/components/palette/PaletteList.d.ts +5 -5
- package/dist/components/palette/PaletteList.js +1 -7
- package/dist/components/palette/PalettePanel.js +18 -12
- package/dist/components/palette/palette-layout.d.ts +5 -1
- package/dist/components/palette/palette-layout.js +13 -10
- package/dist/components/tooltip-arming.d.ts +3 -0
- package/dist/components/tooltip-arming.js +8 -1
- package/dist/core.css +45 -20
- package/dist/dist/index-BmO8bRgK.d.ts +1 -0
- package/dist/dist/{index-C6-t1SS9.d.ts → index-Bsp5Ku7r.d.ts} +264 -133
- package/dist/dist/index.d.ts +5 -5
- package/dist/dist/sandbox-Bzg_jJK2.d.ts +2 -0
- package/dist/dist/{timeout-CmTx6V9y.d.ts → timeout-NoG7ppkm.d.ts} +1 -1
- package/dist/files/FilesProvider.d.ts +2 -0
- package/dist/files/FilesProvider.js +5 -1
- package/dist/files/FilesTab.js +0 -1
- package/dist/files/TreeColumn.d.ts +2 -4
- package/dist/files/TreeColumn.js +0 -5
- package/dist/files/headless/host.d.ts +9 -9
- package/dist/files/headless/labels.d.ts +0 -1
- package/dist/files/headless/labels.js +0 -1
- package/dist/files/headless/workspace-diff.js +1 -1
- package/dist/files/index.d.ts +2 -2
- package/dist/files/index.js +2 -2
- package/dist/files/useCodeReview.js +1 -3
- package/dist/files/useFilesDiagnostics.d.ts +1 -1
- package/dist/files/useFilesDiagnostics.js +4 -11
- package/dist/files/useOpenFiles.js +9 -12
- package/dist/files/useWorkspace.d.ts +5 -7
- package/dist/files/useWorkspace.js +4 -15
- package/dist/git/GitBar.js +13 -5
- package/dist/git/MoveSessionDialog.d.ts +18 -8
- package/dist/git/MoveSessionDialog.js +39 -57
- package/dist/git/MoveToDialog.d.ts +63 -0
- package/dist/git/MoveToDialog.js +267 -0
- package/dist/git/SandboxManager.js +9 -4
- package/dist/git/SyncChip.js +11 -4
- package/dist/git/TeleportSessionDialog.d.ts +76 -0
- package/dist/git/TeleportSessionDialog.js +596 -0
- package/dist/git/WherePicker.js +4 -1
- package/dist/git/headless/host.d.ts +14 -0
- package/dist/git/headless/index.d.ts +2 -1
- package/dist/git/headless/index.js +2 -1
- package/dist/git/headless/labels.d.ts +52 -1
- package/dist/git/headless/labels.js +58 -0
- package/dist/git/headless/sandboxes.d.ts +1 -1
- package/dist/git/headless/sandboxes.js +4 -3
- package/dist/git/headless/teleport.d.ts +76 -0
- package/dist/git/headless/teleport.js +19 -0
- package/dist/git/index.d.ts +5 -3
- package/dist/git/index.js +5 -3
- package/dist/git/useEnvironmentChoices.d.ts +24 -2
- package/dist/git/useEnvironmentChoices.js +43 -11
- package/dist/hooks/useLastCount.d.ts +9 -0
- package/dist/hooks/useLastCount.js +29 -0
- package/dist/hooks/useLatest.d.ts +8 -0
- package/dist/hooks/useLatest.js +17 -0
- package/dist/hooks/useMinuteTick.d.ts +6 -2
- package/dist/hooks/useMinuteTick.js +12 -6
- package/dist/hooks/useNearViewport.js +11 -8
- package/dist/index.d.ts +8 -3
- package/dist/index.js +8 -3
- package/dist/keybindings/KeybindingsProvider.js +3 -4
- package/dist/keybindings/headless/catalog.d.ts +1 -1
- package/dist/keybindings/headless/catalog.js +18 -0
- package/dist/keybindings/headless/overrides.d.ts +1 -1
- package/dist/keybindings/headless/overrides.js +14 -3
- package/dist/labels.d.ts +7 -0
- package/dist/labels.js +10 -3
- package/dist/machines/AddMachineDialog.js +1 -1
- package/dist/machines/AddServerForm.d.ts +14 -2
- package/dist/machines/AddServerForm.js +198 -30
- package/dist/machines/Banners.d.ts +2 -2
- package/dist/machines/Banners.js +3 -3
- package/dist/machines/DaemonMenu.js +1 -3
- package/dist/machines/HostCapabilities.js +8 -4
- package/dist/machines/HostSignIn.d.ts +2 -1
- package/dist/machines/HostSignIn.js +1 -0
- package/dist/machines/HostSyncPanel.d.ts +4 -1
- package/dist/machines/HostSyncPanel.js +248 -132
- package/dist/machines/HostsSection.d.ts +2 -2
- package/dist/machines/HostsSection.js +94 -51
- package/dist/machines/LinkedAccountsPanel.d.ts +29 -0
- package/dist/machines/LinkedAccountsPanel.js +268 -0
- package/dist/machines/MachinesExplainer.d.ts +4 -4
- package/dist/machines/MachinesExplainer.js +27 -17
- package/dist/machines/OrganizationPanel.d.ts +32 -0
- package/dist/machines/OrganizationPanel.js +553 -0
- package/dist/machines/ProjectsSpendPanel.d.ts +22 -0
- package/dist/machines/ProjectsSpendPanel.js +160 -0
- package/dist/machines/ServerMachinesPanel.js +19 -4
- package/dist/machines/ServerUpdatePanel.js +3 -3
- package/dist/machines/SyncAccounts.d.ts +14 -7
- package/dist/machines/SyncAccounts.js +67 -81
- package/dist/machines/TokensPanel.js +54 -30
- package/dist/machines/headless/fixture-host.d.ts +15 -0
- package/dist/machines/headless/fixture-host.js +75 -0
- package/dist/machines/headless/fixtures.d.ts +12 -0
- package/dist/machines/headless/fixtures.js +71 -1
- package/dist/machines/headless/host.d.ts +25 -1
- package/dist/machines/headless/index.d.ts +3 -1
- package/dist/machines/headless/index.js +3 -1
- package/dist/machines/headless/labels.d.ts +104 -8
- package/dist/machines/headless/labels.js +121 -21
- package/dist/machines/headless/linked-accounts.d.ts +42 -0
- package/dist/machines/headless/linked-accounts.js +31 -0
- package/dist/machines/headless/organization.d.ts +44 -0
- package/dist/machines/headless/organization.js +54 -0
- package/dist/machines/headless/sync.d.ts +2 -0
- package/dist/machines/index.d.ts +4 -1
- package/dist/machines/index.js +4 -1
- package/dist/machines/sync-rows.d.ts +8 -0
- package/dist/machines/sync-rows.js +10 -0
- package/dist/machines/testing/index.d.ts +3 -3
- package/dist/machines/testing/index.js +2 -2
- package/dist/motion/grow.js +12 -13
- package/dist/motion/swap.js +2 -5
- package/dist/motion/use-flip-list.d.ts +14 -0
- package/dist/motion/use-flip-list.js +17 -12
- package/dist/onboarding/demos/extensions.d.ts +4 -0
- package/dist/onboarding/demos/extensions.js +27 -1
- package/dist/onboarding/demos/sidebar-layout.d.ts +4 -2
- package/dist/onboarding/demos/sidebar-layout.js +5 -2
- package/dist/onboarding/headless/labels.d.ts +9 -0
- package/dist/onboarding/headless/labels.js +2 -0
- package/dist/onboarding/steps/SidebarStep.js +4 -2
- package/dist/onboarding/steps/setting-cards.d.ts +4 -2
- package/dist/onboarding/steps/setting-cards.js +3 -2
- package/dist/palette/PaletteDialog.js +4 -4
- package/dist/palette/PaletteRows.js +34 -16
- package/dist/palette/headless/app-sources.js +40 -1
- package/dist/palette/headless/labels.js +5 -2
- package/dist/palette/usePaletteController.js +4 -8
- package/dist/server/sse-handler.js +25 -2
- package/dist/session/ArtifactsPanel.js +11 -23
- package/dist/session/DiffFileTree.js +1 -4
- package/dist/session/NewProjectDialog.d.ts +33 -0
- package/dist/session/NewProjectDialog.js +216 -0
- package/dist/session/OpenProjectsDialog.d.ts +56 -0
- package/dist/session/OpenProjectsDialog.js +324 -0
- package/dist/session/OpenSessionsDialog.d.ts +46 -0
- package/dist/session/OpenSessionsDialog.js +295 -0
- package/dist/session/PlanTracker.js +1 -2
- package/dist/session/ProjectArtifactsHome.d.ts +42 -0
- package/dist/session/ProjectArtifactsHome.js +98 -0
- package/dist/session/ProjectArtifactsSection.d.ts +13 -0
- package/dist/session/ProjectArtifactsSection.js +367 -0
- package/dist/session/ProjectBudgetsSection.d.ts +7 -0
- package/dist/session/ProjectBudgetsSection.js +377 -0
- package/dist/session/ProjectContextSection.d.ts +20 -0
- package/dist/session/ProjectContextSection.js +139 -0
- package/dist/session/ProjectHome.d.ts +32 -5
- package/dist/session/ProjectHome.js +502 -254
- package/dist/session/ProjectInstructionsSection.d.ts +7 -0
- package/dist/session/ProjectInstructionsSection.js +179 -0
- package/dist/session/ProjectMainButton.d.ts +35 -0
- package/dist/session/ProjectMainButton.js +73 -0
- package/dist/session/ProjectName.d.ts +76 -0
- package/dist/session/ProjectName.js +140 -0
- package/dist/session/ProjectOrchestratorSection.d.ts +14 -0
- package/dist/session/ProjectOrchestratorSection.js +117 -0
- package/dist/session/ProjectPublishDialog.d.ts +30 -0
- package/dist/session/ProjectPublishDialog.js +420 -0
- package/dist/session/ProjectSessionAccessSection.d.ts +13 -0
- package/dist/session/ProjectSessionAccessSection.js +109 -0
- package/dist/session/ProjectSessionsList.d.ts +53 -0
- package/dist/session/ProjectSessionsList.js +316 -0
- package/dist/session/ProjectSettingsDialog.d.ts +30 -0
- package/dist/session/ProjectSettingsDialog.js +693 -0
- package/dist/session/ProjectShareDialog.d.ts +36 -0
- package/dist/session/ProjectShareDialog.js +190 -0
- package/dist/session/ProjectSkillsSection.d.ts +7 -0
- package/dist/session/ProjectSkillsSection.js +197 -0
- package/dist/session/ProjectToolsSection.d.ts +16 -0
- package/dist/session/ProjectToolsSection.js +347 -0
- package/dist/session/ProjectUsage.d.ts +61 -0
- package/dist/session/ProjectUsage.js +344 -0
- package/dist/session/ProviderUsageProvider.d.ts +2 -3
- package/dist/session/QueueTab.js +11 -1
- package/dist/session/RemindersPanel.js +10 -12
- package/dist/session/SecretsPanel.js +2 -1
- package/dist/session/SessionAccessNotice.d.ts +31 -0
- package/dist/session/SessionAccessNotice.js +69 -0
- package/dist/session/SessionDetailsDialog.d.ts +3 -1
- package/dist/session/SessionDetailsDialog.js +16 -1
- package/dist/session/SessionHeader.d.ts +10 -3
- package/dist/session/SessionHeader.js +19 -7
- package/dist/session/SessionPeopleStack.d.ts +24 -0
- package/dist/session/SessionPeopleStack.js +99 -0
- package/dist/session/SessionPlaceMenu.js +7 -6
- package/dist/session/SessionProvider.d.ts +13 -1
- package/dist/session/SessionProvider.js +21 -1
- package/dist/session/ShareSessionDialog.d.ts +32 -0
- package/dist/session/ShareSessionDialog.js +241 -0
- package/dist/session/TypingLine.d.ts +27 -0
- package/dist/session/TypingLine.js +42 -0
- package/dist/session/{UsagePanel.d.ts → UsageSection.d.ts} +9 -13
- package/dist/session/{UsagePanel.js → UsageSection.js} +40 -41
- package/dist/session/artifact-row-parts.d.ts +32 -0
- package/dist/session/artifact-row-parts.js +51 -0
- package/dist/session/headless/access.d.ts +33 -0
- package/dist/session/headless/access.js +48 -0
- package/dist/session/headless/fixture-host.d.ts +48 -9
- package/dist/session/headless/fixture-host.js +139 -1
- package/dist/session/headless/fixture-project-artifacts.d.ts +77 -0
- package/dist/session/headless/fixture-project-artifacts.js +168 -0
- package/dist/session/headless/fixture-project-content.d.ts +67 -0
- package/dist/session/headless/fixture-project-content.js +176 -0
- package/dist/session/headless/fixture-projects.d.ts +175 -0
- package/dist/session/headless/fixture-projects.js +498 -0
- package/dist/session/headless/home-layout.d.ts +18 -2
- package/dist/session/headless/home-layout.js +20 -7
- package/dist/session/headless/host.d.ts +302 -7
- package/dist/session/headless/index.d.ts +11 -4
- package/dist/session/headless/index.js +9 -2
- package/dist/session/headless/labels.d.ts +428 -4
- package/dist/session/headless/labels.js +109 -5
- package/dist/session/headless/orchestration-labels.d.ts +52 -0
- package/dist/session/headless/orchestration-labels.js +59 -0
- package/dist/session/headless/people.d.ts +29 -0
- package/dist/session/headless/people.js +53 -0
- package/dist/session/headless/place.d.ts +5 -0
- package/dist/session/headless/place.js +5 -1
- package/dist/session/headless/project-artifact-labels.d.ts +67 -0
- package/dist/session/headless/project-artifact-labels.js +96 -0
- package/dist/session/headless/project-artifacts.d.ts +124 -0
- package/dist/session/headless/project-artifacts.js +271 -0
- package/dist/session/headless/project-content-labels.d.ts +88 -0
- package/dist/session/headless/project-content-labels.js +152 -0
- package/dist/session/headless/project-labels.d.ts +123 -0
- package/dist/session/headless/project-labels.js +128 -0
- package/dist/session/headless/project-sessions.d.ts +37 -0
- package/dist/session/headless/project-sessions.js +57 -0
- package/dist/session/headless/project-usage-labels.d.ts +74 -0
- package/dist/session/headless/project-usage-labels.js +81 -0
- package/dist/session/headless/project-usage.d.ts +65 -0
- package/dist/session/headless/project-usage.js +92 -0
- package/dist/session/headless/projects.d.ts +158 -0
- package/dist/session/headless/projects.js +301 -0
- package/dist/session/headless/pushed-once.d.ts +22 -0
- package/dist/session/headless/pushed-once.js +28 -0
- package/dist/session/headless/queue.js +2 -1
- package/dist/session/headless/typing.d.ts +56 -0
- package/dist/session/headless/typing.js +115 -0
- package/dist/session/home-block-parts.d.ts +40 -0
- package/dist/session/home-block-parts.js +46 -0
- package/dist/session/index.d.ts +21 -4
- package/dist/session/index.js +20 -3
- package/dist/session/modal-shell.d.ts +1 -1
- package/dist/session/modal-shell.js +1 -1
- package/dist/session/project-artifact-parts.d.ts +59 -0
- package/dist/session/project-artifact-parts.js +222 -0
- package/dist/session/project-content-parts.d.ts +176 -0
- package/dist/session/project-content-parts.js +546 -0
- package/dist/session/project-files.d.ts +48 -0
- package/dist/session/project-files.js +54 -0
- package/dist/session/project-folder-actions.d.ts +11 -0
- package/dist/session/project-folder-actions.js +39 -0
- package/dist/session/project-mcp-add.d.ts +23 -0
- package/dist/session/project-mcp-add.js +107 -0
- package/dist/session/project-record-document.d.ts +48 -0
- package/dist/session/project-record-document.js +225 -0
- package/dist/session/project-settings-parts.d.ts +69 -0
- package/dist/session/project-settings-parts.js +90 -0
- package/dist/session/share-people.d.ts +222 -0
- package/dist/session/share-people.js +457 -0
- package/dist/session/testing/contract.d.ts +67 -8
- package/dist/session/testing/contract.js +343 -6
- package/dist/session/testing/index.d.ts +5 -2
- package/dist/session/testing/index.js +4 -1
- package/dist/session/testing/project-artifacts.contract.js +159 -0
- package/dist/session/testing/project-content.contract.d.ts +19 -0
- package/dist/session/testing/project-content.contract.js +221 -0
- package/dist/session/testing/project-sessions.contract.js +134 -0
- package/dist/session/use-folder-missing.d.ts +6 -0
- package/dist/session/use-folder-missing.js +31 -0
- package/dist/session/use-folder-project.d.ts +14 -0
- package/dist/session/use-folder-project.js +37 -0
- package/dist/session/use-home-projects.d.ts +48 -0
- package/dist/session/use-home-projects.js +118 -0
- package/dist/session/use-project-home-layout.d.ts +33 -0
- package/dist/session/use-project-home-layout.js +134 -0
- package/dist/session/use-project-home-on.d.ts +2 -0
- package/dist/session/use-project-home-on.js +14 -0
- package/dist/settings/SettingCard.d.ts +3 -1
- package/dist/settings/SettingCard.js +2 -1
- package/dist/settings/SettingDemo.d.ts +3 -1
- package/dist/settings/SettingDemo.js +4 -3
- package/dist/settings/SettingsShell.d.ts +2 -1
- package/dist/settings/SettingsShell.js +55 -43
- package/dist/settings/headless/index.d.ts +2 -1
- package/dist/settings/headless/index.js +2 -1
- package/dist/settings/headless/mcp-requirement.d.ts +93 -0
- package/dist/settings/headless/mcp-requirement.js +116 -0
- package/dist/settings/headless/search.d.ts +1 -1
- package/dist/settings/headless/sections-host.d.ts +7 -2
- package/dist/settings/index.d.ts +3 -2
- package/dist/settings/index.js +5 -4
- package/dist/settings/section.d.ts +24 -3
- package/dist/settings/section.js +27 -4
- package/dist/settings/sections/editor/labels.js +1 -1
- package/dist/settings/sections/environments/EnvironmentsSection.js +30 -6
- package/dist/settings/sections/extensions/ExtensionConfigRows.d.ts +6 -2
- package/dist/settings/sections/extensions/ExtensionConfigRows.js +10 -1
- package/dist/settings/sections/extensions/ExtensionOptionsSection.js +1 -0
- package/dist/settings/sections/extensions/ExtensionsSection.d.ts +6 -3
- package/dist/settings/sections/extensions/ExtensionsSection.js +24 -3
- package/dist/settings/sections/extensions/McpRequirementRow.d.ts +45 -0
- package/dist/settings/sections/extensions/McpRequirementRow.js +298 -0
- package/dist/settings/sections/extensions/labels.d.ts +4 -0
- package/dist/settings/sections/extensions/labels.js +4 -0
- package/dist/settings/sections/extensions/options-labels.d.ts +39 -0
- package/dist/settings/sections/extensions/options-labels.js +48 -1
- package/dist/settings/sections/extensions/use-mcp-setup.d.ts +6 -0
- package/dist/settings/sections/extensions/use-mcp-setup.js +41 -0
- package/dist/settings/sections/host-catalog/HostCatalogSection.js +3 -0
- package/dist/settings/sections/index.d.ts +4 -3
- package/dist/settings/sections/index.js +4 -3
- package/dist/settings/sections/instructions/InstructionsSection.d.ts +69 -1
- package/dist/settings/sections/instructions/InstructionsSection.js +181 -109
- package/dist/settings/sections/keybindings/labels.d.ts +3 -0
- package/dist/settings/sections/keybindings/labels.js +3 -0
- package/dist/settings/sections/keybindings/rows.js +12 -0
- package/dist/settings/sections/logs/LogsSection.js +5 -8
- package/dist/settings/sections/mcp/McpAddForm.d.ts +9 -2
- package/dist/settings/sections/mcp/McpAddForm.js +15 -7
- package/dist/settings/sections/mcp/McpServerRow.js +7 -47
- package/dist/settings/sections/mcp/McpSignIn.d.ts +38 -0
- package/dist/settings/sections/mcp/McpSignIn.js +72 -0
- package/dist/settings/sections/mcp/labels.js +1 -1
- package/dist/settings/sections/models/AgentDefaults.d.ts +12 -4
- package/dist/settings/sections/models/AgentDefaults.js +102 -70
- package/dist/settings/sections/models/ModelPickField.d.ts +10 -1
- package/dist/settings/sections/models/ModelPickField.js +87 -39
- package/dist/settings/sections/models/labels.d.ts +8 -0
- package/dist/settings/sections/models/labels.js +8 -0
- package/dist/settings/sections/performance/labels.js +2 -2
- package/dist/settings/sections/providers/ServerSignIn.d.ts +6 -1
- package/dist/settings/sections/providers/ServerSignIn.js +66 -61
- package/dist/settings/sections/skills/SkillList.d.ts +45 -0
- package/dist/settings/sections/skills/SkillList.js +58 -40
- package/dist/settings/server-app.d.ts +2 -0
- package/dist/settings/server-app.js +16 -4
- package/dist/styles.css +154 -36
- package/dist/terminal/HostTerminalSurface.js +28 -30
- package/dist/terminal/TerminalPanel.js +4 -12
- package/dist/terminal/TerminalProvider.d.ts +10 -2
- package/dist/terminal/TerminalProvider.js +10 -2
- package/dist/terminal/headless/labels.d.ts +0 -1
- package/dist/terminal/headless/labels.js +1 -2
- package/dist/terminal/headless/store.js +5 -1
- package/dist/theme/runtime-icons.js +7 -3
- package/dist/workspace/LayoutBudget.js +1 -7
- package/dist/workspace/PanelContentView.js +1 -1
- package/package.json +26 -2
- package/src/styles/app.css +6 -3
- package/src/styles/chat.css +3 -1
- package/src/styles/palette.css +15 -19
- package/src/styles/primitives.css +3 -1
- package/src/styles/transcript.css +39 -3
- package/dist/dist/index-De9AbmxS.d.ts +0 -1
- package/dist/dist/sandbox-CSUihARm.d.ts +0 -2
- /package/dist/dist/{execution-failure-SREfl-EZ.d.ts → execution-failure-_L2r_Qd-.d.ts} +0 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Project settings › Channels (docs/CHANNELS.md § Bindings): where the project answers, over
|
|
3
|
+
* `ChannelsHost.bindings`. Members read; owners and maintainers (`canManage`) add a binding (`BindingEditorDialog`),
|
|
4
|
+
* change one, turn it on or off, test it as a member or a guest, and remove it (asking first). Turning one on waits
|
|
5
|
+
* on the project's blockers (`ReadinessGateDialog`): each is fixed or acknowledged. The editor and the gate open
|
|
6
|
+
* above the project's settings (`useChannelsDialog`), which show again once they close. A published binding with no
|
|
7
|
+
* connection shows as needing one, with a picker of the connections shared with the project. The project's
|
|
8
|
+
* readiness checklist sits under the bindings. A long list of bindings shows its first rows with Show more.
|
|
9
|
+
*
|
|
10
|
+
* It shows only where the project's host runs channels for it: once the bindings answer with a connection shared with
|
|
11
|
+
* the project or a binding. A host with no channels (This computer's `zidane daemon`, a stopped daemon, a server
|
|
12
|
+
* without them: `unavailable`), or with no connection set up, shows nothing, nor while the bindings are read. What
|
|
13
|
+
* the section is for sits in the question mark's tooltip beside its title.
|
|
14
|
+
*/
|
|
15
|
+
import { CSSProperties } from "react";
|
|
16
|
+
/** Props for {@link ProjectChannelsSection}. */
|
|
17
|
+
export interface ProjectChannelsSectionProps {
|
|
18
|
+
/** The project. */
|
|
19
|
+
projectId: string;
|
|
20
|
+
/** Its name: the posts' name when a binding sets none. */
|
|
21
|
+
projectName: string;
|
|
22
|
+
/** The person is an owner or a maintainer: they change the bindings. */
|
|
23
|
+
canManage: boolean;
|
|
24
|
+
/** Opens the project's settings, for the checklist's fixes (absent inside them). */
|
|
25
|
+
onOpenProject?: () => void;
|
|
26
|
+
/** Extra classes on the root. */
|
|
27
|
+
className?: string;
|
|
28
|
+
/** Inline styles on the root. */
|
|
29
|
+
style?: CSSProperties;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The Channels section of a project's settings. Renders nothing without `ChannelsHost.bindings`.
|
|
33
|
+
*
|
|
34
|
+
* @param props - The {@link ProjectChannelsSectionProps}.
|
|
35
|
+
*/
|
|
36
|
+
export declare function ProjectChannelsSection({ projectId, projectName, canManage, onOpenProject, className, style }: ProjectChannelsSectionProps): import("react").JSX.Element | null;
|
|
37
|
+
/** Props for {@link ReadinessGateDialog}. */
|
|
38
|
+
export interface ReadinessGateDialogProps {
|
|
39
|
+
/** The project. */
|
|
40
|
+
projectId: string;
|
|
41
|
+
/** What the binding takes, worded (the dialog's description). */
|
|
42
|
+
what: string;
|
|
43
|
+
/** Turns the binding on. */
|
|
44
|
+
onEnable: () => Promise<unknown>;
|
|
45
|
+
/** Closes the dialog. */
|
|
46
|
+
onClose: () => void;
|
|
47
|
+
/** Opens the project's settings, for the fixes. */
|
|
48
|
+
onOpenProject?: () => void;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* The step before a binding turns on: the project's blockers, live as fixes land, each fixed or acknowledged.
|
|
52
|
+
*
|
|
53
|
+
* @param props - The {@link ReadinessGateDialogProps}.
|
|
54
|
+
*/
|
|
55
|
+
export declare function ReadinessGateDialog({ projectId, what, onEnable, onClose, onOpenProject }: ReadinessGateDialogProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,433 @@
|
|
|
1
|
+
import { ModalShell } from "../app/ModalProvider.js";
|
|
2
|
+
import { toast } from "../app/toast.js";
|
|
3
|
+
import { useOptionalConfirm } from "../app/useConfirm.js";
|
|
4
|
+
import { constant, useReadable } from "../chat/headless/store.js";
|
|
5
|
+
import { buttonClass } from "../components/button.js";
|
|
6
|
+
import { Facts, FormSection, ROW_CLASS, RowText, ToggleSwitch } from "../components/Form.js";
|
|
7
|
+
import { Notice } from "../components/Notice.js";
|
|
8
|
+
import { RowMenuButton } from "../components/RowMenuButton.js";
|
|
9
|
+
import { useChannelsHost } from "./context.js";
|
|
10
|
+
import { ShowMoreButton, useShowMore } from "../components/ShowMore.js";
|
|
11
|
+
import { Skeleton } from "../components/Skeleton.js";
|
|
12
|
+
import { EmptyState } from "../components/Surface.js";
|
|
13
|
+
import { BindingEditorDialog } from "./BindingEditorDialog.js";
|
|
14
|
+
import { ChannelAlertsList } from "./ChannelAlertsList.js";
|
|
15
|
+
import { ChannelsFailure, PICKER, ProviderMark, useChannelsAction, useChannelsDialog } from "./channels-parts.js";
|
|
16
|
+
import { useChannelsLabels } from "./ChannelsProvider.js";
|
|
17
|
+
import { accessChoice, bindingBlockers, matchKind, postIdentity } from "./headless/access.js";
|
|
18
|
+
import { channelsFailure } from "./headless/state.js";
|
|
19
|
+
import { HeldRepliesList } from "./HeldRepliesList.js";
|
|
20
|
+
import { ReadinessGate, ReadinessList } from "./ReadinessChecklist.js";
|
|
21
|
+
import { useEffect, useMemo, useState } from "react";
|
|
22
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
23
|
+
// src/channels/ProjectChannelsSection.tsx
|
|
24
|
+
const NO_VIEW = constant(null);
|
|
25
|
+
const NO_ERROR = constant(null);
|
|
26
|
+
const NO_ITEMS = constant(null);
|
|
27
|
+
/** The titles of the dialogs this section opens on the modal layer. */
|
|
28
|
+
const BINDING_TITLE_ID = "channels-binding-title";
|
|
29
|
+
const GATE_TITLE_ID = "channels-gate-title";
|
|
30
|
+
/** The bindings shown before Show more. */
|
|
31
|
+
const BINDINGS_CAP = 8;
|
|
32
|
+
const NO_BINDINGS = [];
|
|
33
|
+
/** The Slack channels' names, by id, for the rows (a maintainer's read). */
|
|
34
|
+
function useChannelNames(projectId, view) {
|
|
35
|
+
const conversations = useChannelsHost().bindings?.conversations;
|
|
36
|
+
const [names, setNames] = useState({});
|
|
37
|
+
const ids = useMemo(() => [...new Set((view?.bindings ?? []).flatMap((b) => b.connectionId && "channel" in b.match ? [b.connectionId] : []))].sort().join(","), [view]);
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
if (!conversations || !ids) return void 0;
|
|
40
|
+
let live = true;
|
|
41
|
+
for (const connectionId of ids.split(",")) conversations(projectId, connectionId).then((list) => {
|
|
42
|
+
if (live) setNames((prev) => ({
|
|
43
|
+
...prev,
|
|
44
|
+
...Object.fromEntries(list.map((c) => [c.id, c.name]))
|
|
45
|
+
}));
|
|
46
|
+
}, () => void 0);
|
|
47
|
+
return () => {
|
|
48
|
+
live = false;
|
|
49
|
+
};
|
|
50
|
+
}, [
|
|
51
|
+
conversations,
|
|
52
|
+
projectId,
|
|
53
|
+
ids
|
|
54
|
+
]);
|
|
55
|
+
return names;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* The Channels section of a project's settings. Renders nothing without `ChannelsHost.bindings`.
|
|
59
|
+
*
|
|
60
|
+
* @param props - The {@link ProjectChannelsSectionProps}.
|
|
61
|
+
*/
|
|
62
|
+
function ProjectChannelsSection({ projectId, projectName, canManage, onOpenProject, className, style }) {
|
|
63
|
+
const labels = useChannelsLabels();
|
|
64
|
+
const host = useChannelsHost();
|
|
65
|
+
const bindings = host.bindings;
|
|
66
|
+
const dialog = useChannelsDialog();
|
|
67
|
+
useEffect(() => bindings?.ensure(projectId), [bindings, projectId]);
|
|
68
|
+
const view = useReadable(bindings?.view(projectId) ?? NO_VIEW);
|
|
69
|
+
const error = useReadable(bindings?.error(projectId) ?? NO_ERROR);
|
|
70
|
+
const names = useChannelNames(projectId, view);
|
|
71
|
+
const { shown, hidden, more } = useShowMore(view?.bindings ?? NO_BINDINGS, BINDINGS_CAP);
|
|
72
|
+
if (!bindings || !channelsShown(view, error)) return null;
|
|
73
|
+
const manage = canManage && bindings.put !== void 0;
|
|
74
|
+
const add = () => dialog?.(BINDING_TITLE_ID, (close) => /* @__PURE__ */ jsx(BindingEditorDialog, {
|
|
75
|
+
projectId,
|
|
76
|
+
projectName,
|
|
77
|
+
onClose: close
|
|
78
|
+
}));
|
|
79
|
+
const canAdd = Boolean(manage && dialog && view && view.connections.length > 0);
|
|
80
|
+
const trailing = canAdd && view && view.bindings.length > 0 ? /* @__PURE__ */ jsx("button", {
|
|
81
|
+
type: "button",
|
|
82
|
+
className: buttonClass({
|
|
83
|
+
variant: "secondary",
|
|
84
|
+
size: "sm"
|
|
85
|
+
}),
|
|
86
|
+
onClick: add,
|
|
87
|
+
children: labels.channelsAddBinding
|
|
88
|
+
}) : void 0;
|
|
89
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
90
|
+
className: `flex flex-col gap-3 ${className ?? ""}`,
|
|
91
|
+
style,
|
|
92
|
+
children: [
|
|
93
|
+
/* @__PURE__ */ jsxs(FormSection, {
|
|
94
|
+
title: labels.channelsSection,
|
|
95
|
+
help: labels.channelsSectionHint,
|
|
96
|
+
...trailing ? { trailing } : {},
|
|
97
|
+
children: [
|
|
98
|
+
!canManage && /* @__PURE__ */ jsx("div", {
|
|
99
|
+
className: "px-3 py-2",
|
|
100
|
+
children: /* @__PURE__ */ jsx(Notice, {
|
|
101
|
+
tone: "info",
|
|
102
|
+
compact: true,
|
|
103
|
+
children: labels.channelsReadOnly
|
|
104
|
+
})
|
|
105
|
+
}),
|
|
106
|
+
error && !view && /* @__PURE__ */ jsx(ChannelsFailure, {
|
|
107
|
+
error,
|
|
108
|
+
message: labels.channelsBindingsLoadFailed,
|
|
109
|
+
onRetry: () => void bindings.refresh(projectId).catch(() => void 0),
|
|
110
|
+
className: "m-1"
|
|
111
|
+
}),
|
|
112
|
+
view && view.connections.length === 0 && /* @__PURE__ */ jsx(EmptyState, {
|
|
113
|
+
framed: false,
|
|
114
|
+
compact: true,
|
|
115
|
+
icon: "i-ph-plug-duotone",
|
|
116
|
+
title: labels.channelsNoConnectionsShared,
|
|
117
|
+
hint: labels.channelsNoConnectionsSharedHint
|
|
118
|
+
}),
|
|
119
|
+
view && view.connections.length > 0 && view.bindings.length === 0 && /* @__PURE__ */ jsx(EmptyState, {
|
|
120
|
+
framed: false,
|
|
121
|
+
compact: true,
|
|
122
|
+
icon: "i-ph-chats-circle-duotone",
|
|
123
|
+
title: labels.channelsNoBindings,
|
|
124
|
+
...canAdd ? { action: /* @__PURE__ */ jsx("button", {
|
|
125
|
+
type: "button",
|
|
126
|
+
className: buttonClass({
|
|
127
|
+
variant: "primary",
|
|
128
|
+
size: "sm"
|
|
129
|
+
}),
|
|
130
|
+
onClick: add,
|
|
131
|
+
children: labels.channelsAddBinding
|
|
132
|
+
}) } : {}
|
|
133
|
+
}),
|
|
134
|
+
view && shown.map((binding) => /* @__PURE__ */ jsx(BindingRow, {
|
|
135
|
+
binding,
|
|
136
|
+
projectId,
|
|
137
|
+
projectName,
|
|
138
|
+
connections: view.connections,
|
|
139
|
+
channelName: "channel" in binding.match ? names[binding.match.channel] : void 0,
|
|
140
|
+
manage,
|
|
141
|
+
...onOpenProject ? { onOpenProject } : {}
|
|
142
|
+
}, binding.id)),
|
|
143
|
+
/* @__PURE__ */ jsx(ShowMoreButton, {
|
|
144
|
+
hidden,
|
|
145
|
+
onMore: more
|
|
146
|
+
})
|
|
147
|
+
]
|
|
148
|
+
}),
|
|
149
|
+
manage && /* @__PURE__ */ jsx(HeldRepliesList, {
|
|
150
|
+
projectId,
|
|
151
|
+
where: (post) => {
|
|
152
|
+
const binding = view?.bindings.find((b) => b.id === post.bindingId);
|
|
153
|
+
return binding && bindingLabelOf(labels, binding, "channel" in binding.match ? names[binding.match.channel] : void 0);
|
|
154
|
+
}
|
|
155
|
+
}),
|
|
156
|
+
/* @__PURE__ */ jsx(ChannelAlertsList, {
|
|
157
|
+
projectId,
|
|
158
|
+
...onOpenProject ? { onOpenProject } : {}
|
|
159
|
+
}),
|
|
160
|
+
host.readiness && /* @__PURE__ */ jsx(FormSection, {
|
|
161
|
+
title: labels.channelsReadiness,
|
|
162
|
+
children: /* @__PURE__ */ jsx(ReadinessList, {
|
|
163
|
+
projectId,
|
|
164
|
+
...onOpenProject ? { onOpenProject } : {}
|
|
165
|
+
})
|
|
166
|
+
})
|
|
167
|
+
]
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Whether the section shows: the bindings answered with a connection shared with the project or a binding of it, or
|
|
172
|
+
* failed for a reason other than a host with no channels (`unavailable`), which the section says with Retry.
|
|
173
|
+
*/
|
|
174
|
+
function channelsShown(view, error) {
|
|
175
|
+
if (view) return view.connections.length > 0 || view.bindings.length > 0;
|
|
176
|
+
return error !== null && error.kind !== "unavailable";
|
|
177
|
+
}
|
|
178
|
+
/** What a binding takes, worded. */
|
|
179
|
+
function bindingLabelOf(labels, binding, channelName) {
|
|
180
|
+
const m = binding.match;
|
|
181
|
+
return labels.channelsMatch(matchKind(m), "channel" in m ? channelName ?? m.channel : "repo" in m ? m.repo : void 0);
|
|
182
|
+
}
|
|
183
|
+
/** What a binding takes, worded. */
|
|
184
|
+
function useBindingLabel(binding, channelName) {
|
|
185
|
+
return bindingLabelOf(useChannelsLabels(), binding, channelName);
|
|
186
|
+
}
|
|
187
|
+
function BindingRow({ binding, projectId, projectName, connections, channelName, manage, onOpenProject }) {
|
|
188
|
+
const labels = useChannelsLabels();
|
|
189
|
+
const host = useChannelsHost();
|
|
190
|
+
const bindings = host.bindings;
|
|
191
|
+
const dialog = useChannelsDialog();
|
|
192
|
+
const confirm = useOptionalConfirm();
|
|
193
|
+
const action = useChannelsAction();
|
|
194
|
+
const readiness = useReadable(host.readiness?.items(projectId) ?? NO_ITEMS);
|
|
195
|
+
useEffect(() => host.readiness?.ensure(projectId), [host.readiness, projectId]);
|
|
196
|
+
const what = useBindingLabel(binding, channelName);
|
|
197
|
+
const through = connections.find((c) => c.id === binding.connectionId);
|
|
198
|
+
const guestsIgnored = accessChoice(binding.access.guest, "guest") === "none";
|
|
199
|
+
const facts = binding.draft ? [labels.channelsDraftHint] : [
|
|
200
|
+
through?.name,
|
|
201
|
+
labels.channelsRowMembers(labels.channelsAccessChoice(accessChoice(binding.access.member, "member"))),
|
|
202
|
+
labels.channelsRowGuests(labels.channelsAccessChoice(accessChoice(binding.access.guest, "guest")))
|
|
203
|
+
];
|
|
204
|
+
const edit = () => dialog?.(BINDING_TITLE_ID, (close) => /* @__PURE__ */ jsx(BindingEditorDialog, {
|
|
205
|
+
projectId,
|
|
206
|
+
projectName,
|
|
207
|
+
binding,
|
|
208
|
+
onClose: close
|
|
209
|
+
}));
|
|
210
|
+
const enable = (on) => {
|
|
211
|
+
if (!bindings.enable) return;
|
|
212
|
+
if ((on ? bindingBlockers(readiness ?? [], /* @__PURE__ */ new Set()) : []).length > 0 && dialog) {
|
|
213
|
+
dialog(GATE_TITLE_ID, (close) => /* @__PURE__ */ jsx(ReadinessGateDialog, {
|
|
214
|
+
projectId,
|
|
215
|
+
what,
|
|
216
|
+
onEnable: () => bindings.enable(projectId, binding.id, true),
|
|
217
|
+
onClose: close,
|
|
218
|
+
...onOpenProject ? { onOpenProject } : {}
|
|
219
|
+
}));
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
action.run(() => bindings.enable(projectId, binding.id, on));
|
|
223
|
+
};
|
|
224
|
+
const testAs = (as) => {
|
|
225
|
+
host.testAs(projectId, binding.id, as, postIdentity(binding, projectName)).then((session) => host.openSession?.(session.sessionId), (err) => toast.error(labels.channelsTestFailed, { description: channelsFailure(err).detail }));
|
|
226
|
+
};
|
|
227
|
+
const remove = async () => {
|
|
228
|
+
if (confirm && !await confirm({
|
|
229
|
+
title: labels.channelsRemoveBindingTitle(what),
|
|
230
|
+
message: labels.channelsRemoveBindingMessage,
|
|
231
|
+
confirmLabel: labels.channelsRemove,
|
|
232
|
+
destructive: true
|
|
233
|
+
})) return;
|
|
234
|
+
await action.run(() => bindings.remove(projectId, binding.id));
|
|
235
|
+
};
|
|
236
|
+
const items = binding.draft ? [...manage && bindings.remove ? [{
|
|
237
|
+
id: "remove",
|
|
238
|
+
label: labels.channelsRemove,
|
|
239
|
+
icon: "i-ph-trash",
|
|
240
|
+
destructive: true,
|
|
241
|
+
onSelect: () => void remove()
|
|
242
|
+
}] : []] : [
|
|
243
|
+
...manage && dialog ? [{
|
|
244
|
+
id: "edit",
|
|
245
|
+
label: labels.channelsEdit,
|
|
246
|
+
icon: "i-ph-pencil-simple",
|
|
247
|
+
onSelect: edit
|
|
248
|
+
}] : [],
|
|
249
|
+
...manage && host.testAs ? [{
|
|
250
|
+
id: "test-member",
|
|
251
|
+
label: labels.channelsTestAsMember,
|
|
252
|
+
icon: "i-ph-user",
|
|
253
|
+
group: "test",
|
|
254
|
+
onSelect: () => testAs("member")
|
|
255
|
+
}, {
|
|
256
|
+
id: "test-guest",
|
|
257
|
+
label: guestsIgnored ? labels.channelsTestAsGuestOff : labels.channelsTestAsGuest,
|
|
258
|
+
icon: "i-ph-user-circle-dashed",
|
|
259
|
+
group: "test",
|
|
260
|
+
disabled: guestsIgnored,
|
|
261
|
+
onSelect: () => testAs("guest")
|
|
262
|
+
}] : [],
|
|
263
|
+
...manage && bindings.remove ? [{
|
|
264
|
+
id: "remove",
|
|
265
|
+
label: labels.channelsRemove,
|
|
266
|
+
icon: "i-ph-trash",
|
|
267
|
+
destructive: true,
|
|
268
|
+
group: "danger",
|
|
269
|
+
onSelect: () => void remove()
|
|
270
|
+
}] : []
|
|
271
|
+
];
|
|
272
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
273
|
+
className: "flex flex-col",
|
|
274
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
275
|
+
className: ROW_CLASS,
|
|
276
|
+
children: [
|
|
277
|
+
/* @__PURE__ */ jsx("span", {
|
|
278
|
+
className: "flex items-center justify-center self-start shrink-0 w-4.5 h-4.5",
|
|
279
|
+
children: through ? /* @__PURE__ */ jsx(ProviderMark, { provider: through.provider }) : /* @__PURE__ */ jsx("span", {
|
|
280
|
+
"aria-hidden": true,
|
|
281
|
+
className: "i-ph-plug text-[var(--zg-text-muted)]"
|
|
282
|
+
})
|
|
283
|
+
}),
|
|
284
|
+
/* @__PURE__ */ jsx(RowText, {
|
|
285
|
+
label: /* @__PURE__ */ jsx("span", {
|
|
286
|
+
className: "block truncate",
|
|
287
|
+
children: what
|
|
288
|
+
}),
|
|
289
|
+
description: /* @__PURE__ */ jsx(Facts, { facts }),
|
|
290
|
+
truncate: false
|
|
291
|
+
}),
|
|
292
|
+
binding.draft ? manage && /* @__PURE__ */ jsx(DraftPicker, {
|
|
293
|
+
binding,
|
|
294
|
+
projectId,
|
|
295
|
+
connections
|
|
296
|
+
}) : /* @__PURE__ */ jsx(ToggleSwitch, {
|
|
297
|
+
on: binding.enabled,
|
|
298
|
+
label: labels.channelsBindingOn(what),
|
|
299
|
+
disabled: !manage || !bindings.enable || action.busy,
|
|
300
|
+
onChange: enable
|
|
301
|
+
}),
|
|
302
|
+
/* @__PURE__ */ jsx(RowMenuButton, {
|
|
303
|
+
label: labels.channelsMore(what),
|
|
304
|
+
items,
|
|
305
|
+
disabled: action.busy
|
|
306
|
+
})
|
|
307
|
+
]
|
|
308
|
+
}), action.error && /* @__PURE__ */ jsx(ChannelsFailure, {
|
|
309
|
+
compact: true,
|
|
310
|
+
error: action.error,
|
|
311
|
+
className: "mx-3 mb-2"
|
|
312
|
+
})]
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
/** A published binding's picker: one of the connections shared with the project. */
|
|
316
|
+
function DraftPicker({ binding, projectId, connections }) {
|
|
317
|
+
const labels = useChannelsLabels();
|
|
318
|
+
const bindings = useChannelsHost().bindings;
|
|
319
|
+
const action = useChannelsAction();
|
|
320
|
+
const usable = connections.filter((c) => "repo" in binding.match ? c.provider === "github" : c.provider === "slack");
|
|
321
|
+
const pick = (connectionId) => void action.run(() => bindings.put(projectId, {
|
|
322
|
+
id: binding.id,
|
|
323
|
+
connectionId,
|
|
324
|
+
match: binding.match,
|
|
325
|
+
draft: false,
|
|
326
|
+
enabled: false,
|
|
327
|
+
version: binding.version
|
|
328
|
+
}));
|
|
329
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
330
|
+
className: "inline-flex flex-col items-end gap-1 shrink-0",
|
|
331
|
+
children: [/* @__PURE__ */ jsxs("select", {
|
|
332
|
+
"aria-label": labels.channelsPickConnection,
|
|
333
|
+
className: `${PICKER} w-44`,
|
|
334
|
+
value: "",
|
|
335
|
+
disabled: action.busy || usable.length === 0,
|
|
336
|
+
onChange: (event) => event.target.value && pick(event.target.value),
|
|
337
|
+
children: [/* @__PURE__ */ jsx("option", {
|
|
338
|
+
value: "",
|
|
339
|
+
children: labels.channelsDraft
|
|
340
|
+
}), usable.map((c) => /* @__PURE__ */ jsx("option", {
|
|
341
|
+
value: c.id,
|
|
342
|
+
children: c.name
|
|
343
|
+
}, c.id))]
|
|
344
|
+
}), action.error && /* @__PURE__ */ jsx(ChannelsFailure, {
|
|
345
|
+
compact: true,
|
|
346
|
+
error: action.error
|
|
347
|
+
})]
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* The step before a binding turns on: the project's blockers, live as fixes land, each fixed or acknowledged.
|
|
352
|
+
*
|
|
353
|
+
* @param props - The {@link ReadinessGateDialogProps}.
|
|
354
|
+
*/
|
|
355
|
+
function ReadinessGateDialog({ projectId, what, onEnable, onClose, onOpenProject }) {
|
|
356
|
+
const labels = useChannelsLabels();
|
|
357
|
+
const readiness = useChannelsHost().readiness;
|
|
358
|
+
useEffect(() => readiness?.ensure(projectId), [readiness, projectId]);
|
|
359
|
+
const items = useReadable(readiness?.items(projectId) ?? NO_ITEMS);
|
|
360
|
+
const [acknowledged, setAcknowledged] = useState(/* @__PURE__ */ new Set());
|
|
361
|
+
const action = useChannelsAction();
|
|
362
|
+
const blockers = (items ?? []).filter((item) => item.severity === "blocker");
|
|
363
|
+
const left = bindingBlockers(items ?? [], acknowledged);
|
|
364
|
+
const acknowledge = (id, on) => setAcknowledged((prev) => {
|
|
365
|
+
const next = new Set(prev);
|
|
366
|
+
if (on) next.add(id);
|
|
367
|
+
else next.delete(id);
|
|
368
|
+
return next;
|
|
369
|
+
});
|
|
370
|
+
const enable = () => action.run(async () => {
|
|
371
|
+
await onEnable();
|
|
372
|
+
onClose();
|
|
373
|
+
});
|
|
374
|
+
const footer = /* @__PURE__ */ jsxs("div", {
|
|
375
|
+
className: "flex items-center justify-end gap-3",
|
|
376
|
+
children: [
|
|
377
|
+
left.length > 0 && /* @__PURE__ */ jsx("p", {
|
|
378
|
+
className: "m-0 mr-auto min-w-0 text-zg-label text-[var(--zg-text-muted)]",
|
|
379
|
+
children: labels.channelsGateLeft(left.length)
|
|
380
|
+
}),
|
|
381
|
+
/* @__PURE__ */ jsx("button", {
|
|
382
|
+
type: "button",
|
|
383
|
+
className: buttonClass({
|
|
384
|
+
variant: "secondary",
|
|
385
|
+
size: "sm"
|
|
386
|
+
}),
|
|
387
|
+
onClick: onClose,
|
|
388
|
+
children: labels.channelsCancel
|
|
389
|
+
}),
|
|
390
|
+
/* @__PURE__ */ jsx("button", {
|
|
391
|
+
type: "button",
|
|
392
|
+
className: buttonClass({
|
|
393
|
+
variant: "primary",
|
|
394
|
+
size: "sm"
|
|
395
|
+
}),
|
|
396
|
+
disabled: !items || left.length > 0 || action.busy,
|
|
397
|
+
onClick: () => void enable(),
|
|
398
|
+
children: labels.channelsGateEnable
|
|
399
|
+
})
|
|
400
|
+
]
|
|
401
|
+
});
|
|
402
|
+
return /* @__PURE__ */ jsxs(ModalShell, {
|
|
403
|
+
title: labels.channelsGateTitle,
|
|
404
|
+
description: what,
|
|
405
|
+
onClose,
|
|
406
|
+
footer,
|
|
407
|
+
size: "medium",
|
|
408
|
+
children: [
|
|
409
|
+
!items && /* @__PURE__ */ jsx("div", {
|
|
410
|
+
role: "status",
|
|
411
|
+
"aria-busy": "true",
|
|
412
|
+
"aria-label": labels.channelsReadiness,
|
|
413
|
+
className: "flex items-center gap-3 px-3 py-2",
|
|
414
|
+
children: /* @__PURE__ */ jsx(Skeleton, {
|
|
415
|
+
width: 200,
|
|
416
|
+
height: 12
|
|
417
|
+
})
|
|
418
|
+
}),
|
|
419
|
+
items && /* @__PURE__ */ jsx(ReadinessGate, {
|
|
420
|
+
projectId,
|
|
421
|
+
blockers,
|
|
422
|
+
acknowledged,
|
|
423
|
+
onAcknowledge: acknowledge,
|
|
424
|
+
...onOpenProject ? { onOpenProject } : {}
|
|
425
|
+
}),
|
|
426
|
+
action.error && /* @__PURE__ */ jsx(ChannelsFailure, {
|
|
427
|
+
error: action.error,
|
|
428
|
+
className: "mt-3"
|
|
429
|
+
})
|
|
430
|
+
]
|
|
431
|
+
});
|
|
432
|
+
}
|
|
433
|
+
export { ProjectChannelsSection, ReadinessGateDialog };
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A project's readiness checklist (docs/CHANNELS.md § Readiness), over `ChannelsHost.readiness`: what stops or
|
|
3
|
+
* degrades the project answering, most serious first, each with its one-click fix. A method fix runs on the host and
|
|
4
|
+
* the list reads again; a link opens; a text copies; a screen opens (the project's own through `onOpenProject`,
|
|
5
|
+
* the app's through `ChannelsHost.openTarget`). The list stays live on `projects:readiness`.
|
|
6
|
+
*
|
|
7
|
+
* `ReadinessList` is the list (in Project settings › Channels), `ProjectReadinessCard` the compact card of the
|
|
8
|
+
* project home (counts, expands to the list), `ReadinessGate` the step before a binding turns on.
|
|
9
|
+
*/
|
|
10
|
+
import { ReadinessFix, ReadinessItem, ReadinessMethodFix } from "./headless/host.js";
|
|
11
|
+
import { CSSProperties, ReactNode } from "react";
|
|
12
|
+
/** Props for {@link ReadinessFixButton}. */
|
|
13
|
+
export interface ReadinessFixButtonProps {
|
|
14
|
+
/** The project the fix is about. Absent: an alert about no project. */
|
|
15
|
+
projectId?: string;
|
|
16
|
+
/** The fix. */
|
|
17
|
+
fix: ReadinessFix;
|
|
18
|
+
/** Opens the project's settings, for the screens that are the project's own. Absent: those fixes show no button. */
|
|
19
|
+
onOpenProject?: () => void;
|
|
20
|
+
/**
|
|
21
|
+
* Runs a method fix. Default: the project's `ChannelsHost.readiness.runFix` (an alert passes
|
|
22
|
+
* `ChannelsHost.alerts.runFix`). Absent either way: method fixes show no button.
|
|
23
|
+
*/
|
|
24
|
+
runMethod?: (fix: ReadinessMethodFix) => Promise<void>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* A readiness fix as its button. Renders nothing when this app can't run it.
|
|
28
|
+
*
|
|
29
|
+
* @param props - The {@link ReadinessFixButtonProps}.
|
|
30
|
+
*/
|
|
31
|
+
export declare function ReadinessFixButton({ projectId, fix, onOpenProject, runMethod }: ReadinessFixButtonProps): import("react").JSX.Element | null;
|
|
32
|
+
/**
|
|
33
|
+
* One item: its glyph, title and detail, and its fix.
|
|
34
|
+
*
|
|
35
|
+
* @param props - The item, its project and how to open the project's settings.
|
|
36
|
+
* @param props.item - The item.
|
|
37
|
+
* @param props.projectId - Its project.
|
|
38
|
+
* @param props.onOpenProject - Opens the project's settings.
|
|
39
|
+
* @param props.trailing - What goes after the fix (an acknowledge box).
|
|
40
|
+
*/
|
|
41
|
+
export declare function ReadinessRow({ item, projectId, onOpenProject, trailing }: {
|
|
42
|
+
item: ReadinessItem;
|
|
43
|
+
projectId: string;
|
|
44
|
+
onOpenProject?: () => void;
|
|
45
|
+
trailing?: ReactNode;
|
|
46
|
+
}): import("react").JSX.Element;
|
|
47
|
+
/** Props for {@link ReadinessList}. */
|
|
48
|
+
export interface ReadinessListProps {
|
|
49
|
+
/** The project. */
|
|
50
|
+
projectId: string;
|
|
51
|
+
/** Opens the project's settings. Absent: fixes that open them show no button (already there). */
|
|
52
|
+
onOpenProject?: () => void;
|
|
53
|
+
/** Extra classes on the root. */
|
|
54
|
+
className?: string;
|
|
55
|
+
/** Inline styles on the root. */
|
|
56
|
+
style?: CSSProperties;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* A project's checklist, most serious first. Renders nothing without `ChannelsHost.readiness`.
|
|
60
|
+
*
|
|
61
|
+
* @param props - The {@link ReadinessListProps}.
|
|
62
|
+
*/
|
|
63
|
+
export declare function ReadinessList({ projectId, onOpenProject, className, style }: ReadinessListProps): import("react").JSX.Element | null;
|
|
64
|
+
/** Props for {@link ProjectReadinessCard}. */
|
|
65
|
+
export interface ProjectReadinessCardProps {
|
|
66
|
+
/** The project. */
|
|
67
|
+
projectId: string;
|
|
68
|
+
/** Opens the project's settings (the fixes that are the project's own). */
|
|
69
|
+
onOpenProject?: () => void;
|
|
70
|
+
/** Extra classes on the root. */
|
|
71
|
+
className?: string;
|
|
72
|
+
/** Inline styles on the root. */
|
|
73
|
+
style?: CSSProperties;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* The project home's readiness card: one line of counts that expands to the list. Renders nothing without
|
|
77
|
+
* `ChannelsHost.readiness`, before the first read, and while nothing is left to do.
|
|
78
|
+
*
|
|
79
|
+
* @param props - The {@link ProjectReadinessCardProps}.
|
|
80
|
+
*/
|
|
81
|
+
export declare function ProjectReadinessCard({ projectId, onOpenProject, className, style }: ProjectReadinessCardProps): import("react").JSX.Element | null;
|
|
82
|
+
/** Props for {@link ReadinessGate}. */
|
|
83
|
+
export interface ReadinessGateProps {
|
|
84
|
+
/** The project. */
|
|
85
|
+
projectId: string;
|
|
86
|
+
/** The blockers not fixed yet (`bindingBlockers`), most serious first. */
|
|
87
|
+
blockers: readonly ReadinessItem[];
|
|
88
|
+
/** The ids acknowledged so far. */
|
|
89
|
+
acknowledged: ReadonlySet<string>;
|
|
90
|
+
/** Acknowledges (or takes back) one blocker. */
|
|
91
|
+
onAcknowledge: (id: string, on: boolean) => void;
|
|
92
|
+
/** Opens the project's settings. */
|
|
93
|
+
onOpenProject?: () => void;
|
|
94
|
+
/** Shows the gate's title over it: inside a form, where no dialog title names it. */
|
|
95
|
+
titled?: boolean;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* The blockers before a binding turns on: each with its fix and a "go on without it" box.
|
|
99
|
+
*
|
|
100
|
+
* @param props - The {@link ReadinessGateProps}.
|
|
101
|
+
*/
|
|
102
|
+
export declare function ReadinessGate({ projectId, blockers, acknowledged, onAcknowledge, onOpenProject, titled }: ReadinessGateProps): import("react").JSX.Element;
|