zidane-ui 9.4.0 → 9.5.2
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 +7 -2
- package/dist/adapters/live.js +5 -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-host.js +27 -3
- package/dist/adapters/server-machines-host.d.ts +5 -0
- package/dist/adapters/server-machines-host.js +13 -6
- 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 +20 -1
- 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/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/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/SessionList.d.ts +1 -1
- package/dist/chat/SessionList.js +1 -1
- package/dist/chat/SessionRow.d.ts +141 -0
- package/dist/chat/SessionRow.js +215 -0
- package/dist/chat/StatusDot.d.ts +7 -2
- package/dist/chat/StatusDot.js +3 -2
- package/dist/chat/Transcript.js +6 -2
- 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.d.ts +8 -2
- package/dist/chat/composer/DraftPickers.js +7 -3
- package/dist/chat/composer/HostContextOrb.d.ts +2 -0
- package/dist/chat/composer/HostContextOrb.js +17 -2
- package/dist/chat/composer/ProjectMenu.d.ts +16 -3
- package/dist/chat/composer/ProjectMenu.js +102 -20
- package/dist/chat/composer/ScopeToggle.d.ts +7 -2
- package/dist/chat/composer/ScopeToggle.js +4 -2
- package/dist/chat/composer/ServerScopeToggle.d.ts +7 -2
- package/dist/chat/composer/ServerScopeToggle.js +3 -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 +12 -1
- package/dist/chat/composer/use-draft-target.js +22 -10
- 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/chip-labels.d.ts +2 -0
- package/dist/chat/headless/chip-labels.js +2 -0
- 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 +2 -0
- package/dist/chat/headless/fixtures/demo-transcript-all-kinds.d.ts +6 -0
- package/dist/chat/headless/fixtures/demo-transcript-all-kinds.js +90 -2
- 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 +1 -1
- package/dist/chat/headless/index.d.ts +15 -10
- package/dist/chat/headless/index.js +35 -30
- package/dist/chat/headless/labels.d.ts +43 -4
- package/dist/chat/headless/labels.js +40 -9
- package/dist/chat/headless/prompt-origin.d.ts +2 -2
- package/dist/chat/headless/prompt-origin.js +3 -3
- package/dist/chat/headless/send-flow.d.ts +2 -0
- package/dist/chat/headless/session-list.d.ts +36 -2
- package/dist/chat/headless/session-list.js +7 -0
- package/dist/chat/headless/sidebar/directory.d.ts +5 -0
- package/dist/chat/headless/sidebar/directory.js +2 -0
- package/dist/chat/headless/sidebar/inbox.d.ts +33 -7
- package/dist/chat/headless/sidebar/inbox.js +65 -26
- 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 +36 -7
- package/dist/chat/headless/sidebar/labels.js +1 -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 +64 -6
- package/dist/chat/headless/sidebar/rows.js +98 -18
- package/dist/chat/headless/sidebar/types.d.ts +12 -0
- 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 +17 -0
- package/dist/chat/headless/streams/store.js +38 -15
- package/dist/chat/headless/streams/types.d.ts +2 -1
- package/dist/chat/headless/transcript/collapse.js +3 -1
- package/dist/chat/headless/transcript/derive.d.ts +1 -0
- package/dist/chat/headless/transcript/derive.js +3 -1
- package/dist/chat/headless/transcript/fold.js +1 -0
- package/dist/chat/headless/transcript/index.d.ts +3 -2
- package/dist/chat/headless/transcript/index.js +2 -1
- package/dist/chat/headless/transcript/rail.d.ts +8 -1
- package/dist/chat/headless/transcript/rail.js +10 -2
- package/dist/chat/headless/transcript/rows.d.ts +31 -3
- package/dist/chat/headless/transcript/select-stops.js +1 -0
- package/dist/chat/headless/transcript/session-groups.d.ts +36 -0
- package/dist/chat/headless/transcript/session-groups.js +94 -0
- package/dist/chat/headless/transcript-labels.d.ts +1 -0
- package/dist/chat/index.d.ts +8 -5
- package/dist/chat/index.js +9 -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 +26 -2
- package/dist/chat/sidebar/InboxList.js +65 -49
- 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 +15 -3
- package/dist/chat/sidebar/SessionSidebar.d.ts +51 -2
- package/dist/chat/sidebar/SessionSidebar.js +87 -17
- package/dist/chat/sidebar/SidebarFooter.d.ts +2 -23
- package/dist/chat/sidebar/SidebarFooter.js +2 -43
- package/dist/chat/sidebar/SidebarGroupHeader.d.ts +12 -3
- package/dist/chat/sidebar/SidebarGroupHeader.js +36 -15
- package/dist/chat/sidebar/SidebarLiveProvider.d.ts +22 -0
- package/dist/chat/sidebar/SidebarLiveProvider.js +20 -0
- package/dist/chat/sidebar/SidebarSessionRow.d.ts +6 -1
- package/dist/chat/sidebar/SidebarSessionRow.js +16 -7
- 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/sidebar-live.d.ts +29 -2
- package/dist/chat/sidebar/sidebar-live.js +36 -2
- package/dist/chat/sidebar/useInboxRows.d.ts +4 -1
- package/dist/chat/sidebar/useInboxRows.js +8 -6
- package/dist/chat/sidebar/useInboxTriage.d.ts +8 -2
- package/dist/chat/sidebar/useInboxTriage.js +29 -20
- package/dist/chat/testing/fixture-composer-host.d.ts +3 -1
- package/dist/chat/testing/fixture-composer-host.js +1 -0
- package/dist/chat/testing/index.d.ts +2 -2
- package/dist/chat/testing/index.js +2 -2
- package/dist/chat/transcript/BadgeMenu.d.ts +9 -2
- package/dist/chat/transcript/BadgeMenu.js +20 -2
- package/dist/chat/transcript/PromptEcho.js +15 -2
- package/dist/chat/transcript/PromptOriginLabel.d.ts +1 -1
- package/dist/chat/transcript/SubagentBlock.js +24 -7
- package/dist/chat/transcript/TranscriptRail.d.ts +3 -1
- package/dist/chat/transcript/TranscriptRail.js +15 -5
- package/dist/chat/transcript/TranscriptRow.js +9 -0
- package/dist/chat/transcript/badges.d.ts +1 -0
- package/dist/chat/transcript/badges.js +1 -0
- package/dist/chat/transcript/fold.js +2 -1
- package/dist/chat/transcript/frame.d.ts +7 -0
- package/dist/chat/transcript/frame.js +51 -5
- package/dist/chat/transcript/index.d.ts +5 -4
- package/dist/chat/transcript/index.js +4 -3
- package/dist/chat/transcript/inline-facts.d.ts +9 -0
- package/dist/chat/transcript/inline-facts.js +20 -0
- package/dist/chat/transcript/notices.d.ts +34 -12
- package/dist/chat/transcript/notices.js +213 -97
- package/dist/chat/transcript/prompt.js +8 -1
- package/dist/chat/transcript/receipt-parts.d.ts +29 -2
- package/dist/chat/transcript/receipt-parts.js +40 -7
- package/dist/chat/transcript/row-estimate.js +4 -1
- package/dist/chat/transcript/run-rows.js +2 -5
- package/dist/chat/transcript/script-input.d.ts +1 -1
- package/dist/chat/transcript/session-groups.d.ts +21 -0
- package/dist/chat/transcript/session-groups.js +154 -0
- package/dist/chat/transcript/session-line.d.ts +63 -0
- package/dist/chat/transcript/session-line.js +114 -0
- package/dist/chat/transcript/tasks.d.ts +1 -1
- package/dist/chat/transcript/tasks.js +1 -1
- package/dist/chat/transcript/tool-row.js +3 -2
- package/dist/code/editor/FileView.js +1 -3
- 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/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/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.js +8 -5
- package/dist/components/charts/ScatterChart.js +13 -6
- package/dist/components/floating/FloatingSurface.js +2 -2
- package/dist/components/floating/useAnchoredPosition.d.ts +15 -1
- package/dist/components/floating/useAnchoredPosition.js +41 -7
- package/dist/components/palette/PaletteList.d.ts +5 -5
- package/dist/components/palette/PaletteList.js +2 -3
- 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/core.css +45 -20
- package/dist/dist/index-BmO8bRgK.d.ts +1 -0
- package/dist/dist/{index-BheVJOLc.d.ts → index-DPbpsCtl.d.ts} +248 -118
- 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/headless/host.d.ts +6 -2
- package/dist/files/index.d.ts +2 -2
- package/dist/files/index.js +2 -2
- package/dist/git/GitBar.js +8 -2
- package/dist/git/MoveSessionDialog.js +8 -5
- package/dist/git/MoveToDialog.d.ts +3 -1
- package/dist/git/MoveToDialog.js +43 -16
- package/dist/git/TeleportSessionDialog.d.ts +11 -4
- package/dist/git/TeleportSessionDialog.js +263 -107
- package/dist/git/WherePicker.js +4 -1
- package/dist/git/headless/labels.d.ts +8 -0
- package/dist/git/headless/labels.js +24 -16
- package/dist/git/index.d.ts +2 -2
- package/dist/git/index.js +2 -2
- package/dist/git/useEnvironmentChoices.d.ts +19 -0
- package/dist/git/useEnvironmentChoices.js +34 -10
- package/dist/hooks/useLastCount.d.ts +9 -0
- package/dist/hooks/useLastCount.js +29 -0
- package/dist/index.d.ts +6 -2
- package/dist/index.js +7 -3
- 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 +167 -51
- 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 +91 -52
- 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 +12 -5
- package/dist/machines/OrganizationPanel.js +420 -133
- 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 -10
- package/dist/machines/headless/fixture-host.js +75 -44
- package/dist/machines/headless/fixtures.d.ts +12 -0
- package/dist/machines/headless/fixtures.js +71 -1
- package/dist/machines/headless/host.d.ts +13 -9
- package/dist/machines/headless/index.d.ts +3 -3
- package/dist/machines/headless/index.js +2 -2
- package/dist/machines/headless/labels.d.ts +81 -40
- package/dist/machines/headless/labels.js +103 -60
- 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 +9 -3
- package/dist/machines/headless/organization.js +12 -2
- package/dist/machines/headless/sync.d.ts +2 -0
- package/dist/machines/index.d.ts +3 -2
- package/dist/machines/index.js +3 -2
- package/dist/machines/sync-rows.d.ts +8 -0
- package/dist/machines/sync-rows.js +10 -0
- package/dist/machines/testing/contract.d.ts +1 -25
- package/dist/machines/testing/contract.js +1 -97
- package/dist/machines/testing/index.d.ts +3 -3
- package/dist/machines/testing/index.js +2 -2
- 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 +3 -1
- package/dist/palette/headless/labels.js +2 -2
- package/dist/palette/usePaletteController.js +4 -8
- package/dist/session/ArtifactsPanel.js +11 -23
- 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.js +186 -61
- 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 +496 -249
- 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/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 +20 -8
- package/dist/session/SessionPeopleStack.d.ts +3 -2
- package/dist/session/SessionPeopleStack.js +51 -17
- package/dist/session/SessionPlaceMenu.js +2 -2
- package/dist/session/SessionProvider.d.ts +13 -1
- package/dist/session/SessionProvider.js +21 -1
- package/dist/session/ShareSessionDialog.d.ts +4 -4
- package/dist/session/ShareSessionDialog.js +182 -283
- package/dist/session/TypingLine.d.ts +9 -4
- package/dist/session/TypingLine.js +16 -5
- 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 +263 -7
- package/dist/session/headless/index.d.ts +10 -5
- package/dist/session/headless/index.js +8 -3
- package/dist/session/headless/labels.d.ts +381 -6
- package/dist/session/headless/labels.js +72 -24
- package/dist/session/headless/orchestration-labels.d.ts +52 -0
- package/dist/session/headless/orchestration-labels.js +59 -0
- 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 +20 -1
- package/dist/session/headless/typing.js +58 -3
- 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 +17 -4
- package/dist/session/index.js +16 -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 +55 -0
- package/dist/session/use-home-projects.js +154 -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 +117 -0
- package/dist/settings/headless/mcp.d.ts +2 -0
- package/dist/settings/headless/mcp.js +3 -2
- package/dist/settings/headless/search.d.ts +1 -1
- package/dist/settings/index.d.ts +3 -2
- package/dist/settings/index.js +13 -12
- package/dist/settings/section.d.ts +9 -0
- package/dist/settings/section.js +12 -1
- package/dist/settings/sections/editor/labels.js +1 -1
- 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/mcp/McpAddForm.d.ts +9 -2
- package/dist/settings/sections/mcp/McpAddForm.js +15 -7
- package/dist/settings/sections/mcp/McpSection.js +3 -5
- 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 +170 -34
- package/dist/theme/runtime-icons.js +7 -3
- package/dist/workspace/PanelContentView.js +1 -1
- package/package.json +26 -2
- package/src/styles/app.css +6 -3
- package/src/styles/palette.css +15 -19
- package/src/styles/primitives.css +3 -1
- package/src/styles/transcript.css +61 -0
- package/dist/dist/index-ttmMvjgM.d.ts +0 -1
- package/dist/dist/sandbox-CSUihARm.d.ts +0 -2
- package/dist/machines/PersonalLayerPanel.d.ts +0 -32
- package/dist/machines/PersonalLayerPanel.js +0 -360
- package/dist/machines/headless/layer.d.ts +0 -64
- package/dist/machines/headless/layer.js +0 -56
- /package/dist/dist/{execution-failure-SREfl-EZ.d.ts → execution-failure-_L2r_Qd-.d.ts} +0 -0
|
@@ -79,6 +79,9 @@ function estimateRowPx(row) {
|
|
|
79
79
|
case "message-group":
|
|
80
80
|
px = (row.messages.length > 0 ? 35 : 0) + (row.live ? row.messages.slice(-2).reduce((n, m) => n + (m.kind === "markdown" ? 8 + estimateTextPx(m.text, 400) : 0), 0) : 0) + row.between.reduce((n, r) => n + rowEstimatePx(r), 0) + (row.current.kind === "markdown" ? 12 + estimateTextPx(row.current.text, 400) : 35);
|
|
81
81
|
break;
|
|
82
|
+
case "session-event-group":
|
|
83
|
+
px = 35;
|
|
84
|
+
break;
|
|
82
85
|
case "exchange-fold":
|
|
83
86
|
px = 35 + (row.live ? Math.min(3, row.stats.tools + row.stats.thoughts + row.stats.subagents) * 30 : 0);
|
|
84
87
|
break;
|
|
@@ -99,7 +102,7 @@ function estimateRowPx(row) {
|
|
|
99
102
|
px = 34;
|
|
100
103
|
break;
|
|
101
104
|
case "session-event":
|
|
102
|
-
px = row.sessionEvent ?
|
|
105
|
+
px = row.sessionEvent ? 35 : 26;
|
|
103
106
|
break;
|
|
104
107
|
default: px = 26;
|
|
105
108
|
}
|
|
@@ -3,7 +3,7 @@ import { useStaysMounted } from "../../motion/collapse.js";
|
|
|
3
3
|
import { useChatLabels } from "../useChatLabels.js";
|
|
4
4
|
import { useModelName } from "./actions.js";
|
|
5
5
|
import { Caret } from "./frame.js";
|
|
6
|
-
import { CompactMeta,
|
|
6
|
+
import { CompactMeta, RUN_RECEIPT_TINT, ReceiptSegments, ReceiptValue } from "./receipt-parts.js";
|
|
7
7
|
import { useTranscriptRenderers } from "./renderers.js";
|
|
8
8
|
import { useRowPartKey, useRowUiState } from "./row-ui-state.js";
|
|
9
9
|
import { memo } from "react";
|
|
@@ -52,10 +52,7 @@ function RunReceiptInline({ receipt, className = "", style }) {
|
|
|
52
52
|
children: /* @__PURE__ */ jsx("span", {
|
|
53
53
|
className: "zg-meta-chip shrink-0 gap-1 cursor-default",
|
|
54
54
|
"data-cell": cell.kind,
|
|
55
|
-
children: cell.segments ? cell.segments
|
|
56
|
-
text: seg.text,
|
|
57
|
-
className: RUN_RECEIPT_SEGMENT_TINT[seg.kind]
|
|
58
|
-
}, `${seg.kind}-${j}`)) : /* @__PURE__ */ jsx(ReceiptValue, {
|
|
55
|
+
children: cell.segments ? /* @__PURE__ */ jsx(ReceiptSegments, { segments: cell.segments }) : /* @__PURE__ */ jsx(ReceiptValue, {
|
|
59
56
|
text: cell.text,
|
|
60
57
|
className: RUN_RECEIPT_TINT[cell.kind]
|
|
61
58
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** What a Codemode script's input panel reads besides its input. Internal to the transcript. */
|
|
2
|
-
import {
|
|
2
|
+
import { gz as ScriptProgress } from "../../dist/index-DPbpsCtl.js";
|
|
3
3
|
import { ToolRowModel } from "../headless/transcript/rows.js";
|
|
4
4
|
import "../headless/transcript/index.js";
|
|
5
5
|
/**
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Cluster, Row } from "../headless/transcript/rows.js";
|
|
2
|
+
import "../headless/transcript/index.js";
|
|
3
|
+
type GroupRow = Extract<Row, {
|
|
4
|
+
kind: 'session-event-group';
|
|
5
|
+
}>;
|
|
6
|
+
/** Props for {@link SessionEventGroupRow}. */
|
|
7
|
+
export interface SessionEventGroupRowProps {
|
|
8
|
+
/** The group. */
|
|
9
|
+
row: GroupRow;
|
|
10
|
+
/** Renders clusters with the transcript's row components, for what the group holds. */
|
|
11
|
+
renderRows: (c: readonly Cluster[]) => React.ReactNode[];
|
|
12
|
+
/** Opens a session by its id on the transcript's host. Absent: no open button, no Open row. */
|
|
13
|
+
onOpenSession?: ((sessionId: string) => void) | undefined;
|
|
14
|
+
/** Extra classes on the root element. */
|
|
15
|
+
className?: string;
|
|
16
|
+
/** Inline styles on the root element, merged after the component's own. */
|
|
17
|
+
style?: React.CSSProperties;
|
|
18
|
+
}
|
|
19
|
+
/** Renders a group of updates from other sessions at any of its levels: its header line, and its rows when open. */
|
|
20
|
+
export declare const SessionEventGroupRow: import("react").MemoExoticComponent<({ row, renderRows, onOpenSession, className, style }: SessionEventGroupRowProps) => import("react").JSX.Element>;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { useStaysMounted } from "../../motion/collapse.js";
|
|
2
|
+
import { dotVariantFor } from "../headless/transcript/fold.js";
|
|
3
|
+
import { latestPerConversation } from "../headless/transcript/session-groups.js";
|
|
4
|
+
import { StatusDot } from "../StatusDot.js";
|
|
5
|
+
import { useChatLabels } from "../useChatLabels.js";
|
|
6
|
+
import { FoldHeader } from "./fold.js";
|
|
7
|
+
import { Dot, RowFrame, SESSION_EVENT_DOT, useRowIcons } from "./frame.js";
|
|
8
|
+
import { useForceMountRows } from "./LazyRow.js";
|
|
9
|
+
import { useTranscriptRenderers } from "./renderers.js";
|
|
10
|
+
import { useRowUiState } from "./row-ui-state.js";
|
|
11
|
+
import { SessionEventScopeContext, SessionLine } from "./session-line.js";
|
|
12
|
+
import { memo, useId, useMemo } from "react";
|
|
13
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
+
import { SESSION_EVENT_STATUS_STYLE, sessionEventExcerpt } from "zidane/chat/pure";
|
|
15
|
+
// src/chat/transcript/session-groups.tsx
|
|
16
|
+
/** The order a group's header counts statuses in: what needs a look first. */
|
|
17
|
+
const STATUS_ORDER = [
|
|
18
|
+
"needs-attention",
|
|
19
|
+
"error",
|
|
20
|
+
"done",
|
|
21
|
+
"cancelled"
|
|
22
|
+
];
|
|
23
|
+
/** A section's icon, by its level, when the transcript's gutter does not draw it. */
|
|
24
|
+
const SECTION_ICON = {
|
|
25
|
+
project: "i-ph-folder",
|
|
26
|
+
worktree: "i-ph-git-branch"
|
|
27
|
+
};
|
|
28
|
+
const IN_CONVERSATION = { conversation: true };
|
|
29
|
+
const IN_SECTION = { conversation: false };
|
|
30
|
+
/** One status dot per status, with how many of the group's conversations are in it now. */
|
|
31
|
+
function StatusTallies({ events }) {
|
|
32
|
+
const counts = /* @__PURE__ */ new Map();
|
|
33
|
+
for (const event of latestPerConversation(events)) {
|
|
34
|
+
const status = event.sessionEvent.status;
|
|
35
|
+
counts.set(status, (counts.get(status) ?? 0) + 1);
|
|
36
|
+
}
|
|
37
|
+
return /* @__PURE__ */ jsx("span", {
|
|
38
|
+
className: "shrink-0 self-center inline-flex items-center gap-2 zg-meta",
|
|
39
|
+
children: STATUS_ORDER.filter((status) => counts.has(status)).map((status) => /* @__PURE__ */ jsxs("span", {
|
|
40
|
+
className: "inline-flex items-center gap-1",
|
|
41
|
+
children: [/* @__PURE__ */ jsx(StatusDot, {
|
|
42
|
+
state: SESSION_EVENT_DOT[status],
|
|
43
|
+
label: SESSION_EVENT_STATUS_STYLE[status].verb
|
|
44
|
+
}), counts.get(status)]
|
|
45
|
+
}, status))
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
/** Sums a number the updates may carry; `undefined` when none does. */
|
|
49
|
+
function total(events, pick) {
|
|
50
|
+
let sum;
|
|
51
|
+
for (const event of events) {
|
|
52
|
+
const value = pick(event.sessionEvent);
|
|
53
|
+
if (value !== void 0) sum = (sum ?? 0) + value;
|
|
54
|
+
}
|
|
55
|
+
return sum;
|
|
56
|
+
}
|
|
57
|
+
/** Renders a group of updates from other sessions at any of its levels: its header line, and its rows when open. */
|
|
58
|
+
const SessionEventGroupRow = memo(({ row, renderRows, onOpenSession, className, style }) => {
|
|
59
|
+
const labels = useChatLabels();
|
|
60
|
+
const icons = useRowIcons();
|
|
61
|
+
const searching = useForceMountRows();
|
|
62
|
+
const { SessionTitle } = useTranscriptRenderers();
|
|
63
|
+
const section = row.level === "project" || row.level === "worktree";
|
|
64
|
+
const [openState, setOpen] = useRowUiState(`session-group:${row.id}`, section);
|
|
65
|
+
const open = openState || searching;
|
|
66
|
+
const mounted = useStaysMounted(open);
|
|
67
|
+
const id = useId();
|
|
68
|
+
const clusters = useMemo(() => row.rows.map((r) => ({
|
|
69
|
+
kind: "single",
|
|
70
|
+
row: r
|
|
71
|
+
})), [row.rows]);
|
|
72
|
+
const toggle = () => setOpen(!open);
|
|
73
|
+
const count = row.events.length;
|
|
74
|
+
const totals = {
|
|
75
|
+
durationMs: total(row.events, (e) => e.durationMs),
|
|
76
|
+
turns: total(row.events, (e) => e.turns)
|
|
77
|
+
};
|
|
78
|
+
let header;
|
|
79
|
+
if (row.level === "conversation") {
|
|
80
|
+
const latest = row.events.at(-1).sessionEvent;
|
|
81
|
+
header = /* @__PURE__ */ jsx(SessionLine, {
|
|
82
|
+
id,
|
|
83
|
+
open,
|
|
84
|
+
onToggle: toggle,
|
|
85
|
+
session: {
|
|
86
|
+
id: latest.sessionId,
|
|
87
|
+
title: latest.title,
|
|
88
|
+
link: latest.link
|
|
89
|
+
},
|
|
90
|
+
lead: icons ? void 0 : /* @__PURE__ */ jsx(StatusDot, { state: SESSION_EVENT_DOT[latest.status] }),
|
|
91
|
+
title: /* @__PURE__ */ jsx(SessionTitle, {
|
|
92
|
+
id: latest.sessionId,
|
|
93
|
+
fallback: latest.title,
|
|
94
|
+
plain: true
|
|
95
|
+
}),
|
|
96
|
+
spoken: SESSION_EVENT_STATUS_STYLE[latest.status].verb,
|
|
97
|
+
answer: latest.status === "needs-attention",
|
|
98
|
+
excerpt: sessionEventExcerpt(latest),
|
|
99
|
+
...totals,
|
|
100
|
+
count,
|
|
101
|
+
onOpen: onOpenSession ? () => onOpenSession(latest.sessionId) : void 0
|
|
102
|
+
});
|
|
103
|
+
} else if (section) header = /* @__PURE__ */ jsx(SessionLine, {
|
|
104
|
+
id,
|
|
105
|
+
open,
|
|
106
|
+
onToggle: toggle,
|
|
107
|
+
lead: icons ? void 0 : /* @__PURE__ */ jsx("span", {
|
|
108
|
+
"aria-hidden": true,
|
|
109
|
+
className: `${SECTION_ICON[row.level]} text-[var(--zg-text-muted)]`
|
|
110
|
+
}),
|
|
111
|
+
title: row.place ?? labels.sessionUpdatesNoProject,
|
|
112
|
+
titleIsMeta: row.level === "worktree",
|
|
113
|
+
excerpt: /* @__PURE__ */ jsx(StatusTallies, { events: row.events }),
|
|
114
|
+
...totals,
|
|
115
|
+
count
|
|
116
|
+
});
|
|
117
|
+
else header = /* @__PURE__ */ jsxs(FoldHeader, {
|
|
118
|
+
expandable: true,
|
|
119
|
+
open,
|
|
120
|
+
onToggle: toggle,
|
|
121
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
122
|
+
className: "min-w-0 truncate",
|
|
123
|
+
children: labels.sessionUpdates(count, latestPerConversation(row.events).length)
|
|
124
|
+
}), /* @__PURE__ */ jsx(StatusTallies, { events: row.events })]
|
|
125
|
+
});
|
|
126
|
+
return /* @__PURE__ */ jsx("div", {
|
|
127
|
+
className: ["relative pb-[var(--zg-row-gap,12px)]", className].filter(Boolean).join(" "),
|
|
128
|
+
style,
|
|
129
|
+
"data-testid": "session-event-group",
|
|
130
|
+
"data-level": row.level,
|
|
131
|
+
"data-open": open,
|
|
132
|
+
children: /* @__PURE__ */ jsxs(RowFrame, { children: [/* @__PURE__ */ jsx(Dot, { variant: dotVariantFor(row) }), /* @__PURE__ */ jsxs("div", {
|
|
133
|
+
className: "zg-fold-messages flex-1 min-w-0 text-zg-body leading-zg-chat",
|
|
134
|
+
children: [header, /* @__PURE__ */ jsx("div", {
|
|
135
|
+
className: "zg-collapsible",
|
|
136
|
+
"data-open": open,
|
|
137
|
+
id: `${id}-body`,
|
|
138
|
+
inert: !open || void 0,
|
|
139
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
140
|
+
className: "zg-collapsible-inner",
|
|
141
|
+
children: /* @__PURE__ */ jsx(SessionEventScopeContext.Provider, {
|
|
142
|
+
value: row.level === "conversation" ? IN_CONVERSATION : IN_SECTION,
|
|
143
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
144
|
+
className: icons ? "zg-fold-body" : "zg-fold-body zg-session-body",
|
|
145
|
+
children: mounted ? renderRows(clusters) : null
|
|
146
|
+
})
|
|
147
|
+
})
|
|
148
|
+
})
|
|
149
|
+
})]
|
|
150
|
+
})] })
|
|
151
|
+
});
|
|
152
|
+
});
|
|
153
|
+
SessionEventGroupRow.displayName = "SessionEventGroupRow";
|
|
154
|
+
export { SessionEventGroupRow };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The one bar every line of an update group reads as: an update alone
|
|
3
|
+
* (`SessionEventRow`), a conversation's header, a project's or a worktree's
|
|
4
|
+
* section (`SessionEventGroupRow`). One order, left to right:
|
|
5
|
+
*
|
|
6
|
+
* status icon · title · excerpt | duration · turns · updates · open · caret
|
|
7
|
+
*
|
|
8
|
+
* Everything after the excerpt is pinned right: the excerpt takes the room
|
|
9
|
+
* that is left whether it shows or not, and the open button keeps its place
|
|
10
|
+
* while hidden, so nothing moves as the bar opens or is hovered.
|
|
11
|
+
*
|
|
12
|
+
* The toggle covers the whole bar (a stretched button under the open and
|
|
13
|
+
* Answer buttons), so a click anywhere opens it and the keyboard reaches it
|
|
14
|
+
* as one control. Right-click opens the chat's badge menu (open it, add it to
|
|
15
|
+
* the prompt, copy its link) when the bar stands for a session.
|
|
16
|
+
*/
|
|
17
|
+
import { ReactNode } from "react";
|
|
18
|
+
/** Where an update line sits in a group: what the headers above it already say. */
|
|
19
|
+
export interface SessionEventScope {
|
|
20
|
+
/** A conversation header above names the session: the line reads its time instead. */
|
|
21
|
+
conversation: boolean;
|
|
22
|
+
}
|
|
23
|
+
/** Outside any group: the line says everything. */
|
|
24
|
+
export declare const SessionEventScopeContext: import("react").Context<SessionEventScope>;
|
|
25
|
+
/** The scope of the group around, if any. */
|
|
26
|
+
export declare function useSessionEventScope(): SessionEventScope;
|
|
27
|
+
/** Props for {@link SessionLine}. */
|
|
28
|
+
export interface SessionLineProps {
|
|
29
|
+
/** The id that names the bar (its title and `verb`), and its body's (`<id>-body`). */
|
|
30
|
+
id: string;
|
|
31
|
+
/** The body is open. */
|
|
32
|
+
open: boolean;
|
|
33
|
+
/** Opens or closes the body. */
|
|
34
|
+
onToggle: () => void;
|
|
35
|
+
/** The session the bar stands for: right-click opens its badge menu. Absent (a section): no menu. */
|
|
36
|
+
session?: {
|
|
37
|
+
id: string;
|
|
38
|
+
title: string;
|
|
39
|
+
link?: string | undefined;
|
|
40
|
+
};
|
|
41
|
+
/** The status icon slot: a status dot, a folder, a branch. Absent when the transcript's gutter draws it. */
|
|
42
|
+
lead?: ReactNode;
|
|
43
|
+
/** The bar's name: a session's title, an update's time, a project or a branch. */
|
|
44
|
+
title: ReactNode;
|
|
45
|
+
/** The title is a machine value (a time, a branch): the meta voice, not the title's. */
|
|
46
|
+
titleIsMeta?: boolean;
|
|
47
|
+
/** Said after the title for the ear only: the status verb. */
|
|
48
|
+
spoken?: string;
|
|
49
|
+
/** A blocked session's Answer chip, after the title. */
|
|
50
|
+
answer?: boolean;
|
|
51
|
+
/** The excerpt; hidden while open. */
|
|
52
|
+
excerpt?: ReactNode;
|
|
53
|
+
/** The run's wall-clock (a sum for a group). */
|
|
54
|
+
durationMs?: number | undefined;
|
|
55
|
+
/** The run's turns (a sum for a group). */
|
|
56
|
+
turns?: number | undefined;
|
|
57
|
+
/** How many updates the bar holds; absent for one update. */
|
|
58
|
+
count?: number;
|
|
59
|
+
/** Opens the session; absent: an empty slot, no Open row. */
|
|
60
|
+
onOpen?: (() => void) | undefined;
|
|
61
|
+
}
|
|
62
|
+
/** Renders the bar. */
|
|
63
|
+
export declare function SessionLine({ id, open, onToggle, session, lead, title, titleIsMeta, spoken, answer, excerpt, durationMs, turns, count, onOpen }: SessionLineProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { IconButton } from "../../components/IconButton.js";
|
|
2
|
+
import { useChatLabels } from "../useChatLabels.js";
|
|
3
|
+
import { useBadgeMenu } from "./BadgeMenu.js";
|
|
4
|
+
import { Caret } from "./frame.js";
|
|
5
|
+
import { MarkdownContext } from "./markdown-context.js";
|
|
6
|
+
import { createContext, useContext } from "react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { chatBadgeTarget, formatRunDuration } from "zidane/chat/pure";
|
|
9
|
+
// src/chat/transcript/session-line.tsx
|
|
10
|
+
/** Outside any group: the line says everything. */
|
|
11
|
+
const SessionEventScopeContext = createContext({ conversation: false });
|
|
12
|
+
/** The scope of the group around, if any. */
|
|
13
|
+
function useSessionEventScope() {
|
|
14
|
+
return useContext(SessionEventScopeContext);
|
|
15
|
+
}
|
|
16
|
+
/** Renders the bar. */
|
|
17
|
+
function SessionLine({ id, open, onToggle, session, lead, title, titleIsMeta = false, spoken, answer = false, excerpt, durationMs, turns, count, onOpen }) {
|
|
18
|
+
const labels = useChatLabels();
|
|
19
|
+
const openMenu = useBadgeMenu();
|
|
20
|
+
const { cwd } = useContext(MarkdownContext);
|
|
21
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
22
|
+
onContextMenu: openMenu && session ? (e) => openMenu(e, chatBadgeTarget({
|
|
23
|
+
id: session.id,
|
|
24
|
+
title: session.title,
|
|
25
|
+
...session.link ? { link: session.link } : {}
|
|
26
|
+
}), cwd, onOpen ? {
|
|
27
|
+
label: labels.openSession,
|
|
28
|
+
onSelect: onOpen
|
|
29
|
+
} : void 0) : void 0,
|
|
30
|
+
className: "zg-session-bar group zg-disclosure relative flex items-center gap-2 w-full min-w-0 h-[22.4px] text-zg-body leading-zg-chat",
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ jsxs("button", {
|
|
33
|
+
type: "button",
|
|
34
|
+
onClick: onToggle,
|
|
35
|
+
"aria-expanded": open,
|
|
36
|
+
"aria-controls": `${id}-body`,
|
|
37
|
+
"aria-labelledby": spoken ? `${id}-title ${id}-verb` : `${id}-title`,
|
|
38
|
+
className: "zg-focus-ring flex items-center gap-2 shrink min-w-0 max-w-[60%] p-0 border-0 bg-transparent text-inherit text-left cursor-pointer rounded-zg-sm after:content-[''] after:absolute after:inset-0",
|
|
39
|
+
children: [
|
|
40
|
+
lead && /* @__PURE__ */ jsx("span", {
|
|
41
|
+
className: "zg-session-lead",
|
|
42
|
+
children: lead
|
|
43
|
+
}),
|
|
44
|
+
/* @__PURE__ */ jsx("span", {
|
|
45
|
+
id: `${id}-title`,
|
|
46
|
+
className: `min-w-0 truncate ${titleIsMeta ? "zg-meta" : "font-medium text-[var(--zg-text)]"}`,
|
|
47
|
+
children: title
|
|
48
|
+
}),
|
|
49
|
+
spoken && /* @__PURE__ */ jsx("span", {
|
|
50
|
+
id: `${id}-verb`,
|
|
51
|
+
className: "sr-only",
|
|
52
|
+
children: spoken
|
|
53
|
+
})
|
|
54
|
+
]
|
|
55
|
+
}),
|
|
56
|
+
answer && onOpen && /* @__PURE__ */ jsx("button", {
|
|
57
|
+
type: "button",
|
|
58
|
+
onClick: onOpen,
|
|
59
|
+
className: "zg-meta-chip zg-press-subtle zg-focus-ring relative shrink-0 text-zg-meta text-zg-warn",
|
|
60
|
+
children: labels.clickToAnswer
|
|
61
|
+
}),
|
|
62
|
+
/* @__PURE__ */ jsx("span", {
|
|
63
|
+
"data-slot": "excerpt",
|
|
64
|
+
className: "zg-session-excerpt flex-1 min-w-0 truncate",
|
|
65
|
+
children: open ? null : excerpt
|
|
66
|
+
}),
|
|
67
|
+
durationMs !== void 0 && /* @__PURE__ */ jsx("span", {
|
|
68
|
+
"data-slot": "duration",
|
|
69
|
+
className: "zg-session-slot zg-meta-chip zg-meta",
|
|
70
|
+
children: formatRunDuration(durationMs)
|
|
71
|
+
}),
|
|
72
|
+
turns !== void 0 && /* @__PURE__ */ jsx("span", {
|
|
73
|
+
"data-slot": "turns",
|
|
74
|
+
className: "zg-session-slot zg-session-slot-turns zg-meta-chip zg-meta",
|
|
75
|
+
children: labels.sessionTurns(turns)
|
|
76
|
+
}),
|
|
77
|
+
count !== void 0 && /* @__PURE__ */ jsxs("span", {
|
|
78
|
+
"data-slot": "count",
|
|
79
|
+
className: "zg-session-slot zg-session-slot-count zg-meta-chip zg-meta gap-1",
|
|
80
|
+
children: [
|
|
81
|
+
/* @__PURE__ */ jsx("span", {
|
|
82
|
+
"aria-hidden": true,
|
|
83
|
+
className: "i-ph-stack-simple"
|
|
84
|
+
}),
|
|
85
|
+
/* @__PURE__ */ jsx("span", {
|
|
86
|
+
"aria-hidden": true,
|
|
87
|
+
children: count
|
|
88
|
+
}),
|
|
89
|
+
/* @__PURE__ */ jsx("span", {
|
|
90
|
+
className: "sr-only",
|
|
91
|
+
children: labels.sessionUpdateCount(count)
|
|
92
|
+
})
|
|
93
|
+
]
|
|
94
|
+
}),
|
|
95
|
+
onOpen && /* @__PURE__ */ jsx("span", {
|
|
96
|
+
"data-slot": "open",
|
|
97
|
+
className: "zg-session-slot",
|
|
98
|
+
children: /* @__PURE__ */ jsx(IconButton, {
|
|
99
|
+
icon: "i-ph-arrow-square-out",
|
|
100
|
+
label: labels.openSession,
|
|
101
|
+
size: "xs",
|
|
102
|
+
className: "zg-reveal relative",
|
|
103
|
+
onClick: onOpen
|
|
104
|
+
})
|
|
105
|
+
}),
|
|
106
|
+
/* @__PURE__ */ jsx("span", {
|
|
107
|
+
"data-slot": "caret",
|
|
108
|
+
className: "zg-session-slot zg-session-slot-caret",
|
|
109
|
+
children: /* @__PURE__ */ jsx(Caret, { open })
|
|
110
|
+
})
|
|
111
|
+
]
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
export { SessionEventScopeContext, SessionLine, useSessionEventScope };
|
|
@@ -32,7 +32,7 @@ export interface TaskBatchRowProps {
|
|
|
32
32
|
style?: CSSProperties;
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
|
-
* Background tasks that ended together: `3 tasks ended
|
|
35
|
+
* Background tasks that ended together: `3 tasks ended, 1 failed` on one
|
|
36
36
|
* line, collapsed by default like a tool batch; opened, each task's line.
|
|
37
37
|
*/
|
|
38
38
|
export declare const TaskBatchRow: import("react").MemoExoticComponent<({ row, className, style }: TaskBatchRowProps) => import("react").JSX.Element>;
|
|
@@ -58,7 +58,7 @@ const TaskRow = memo(({ row, className, style }) => /* @__PURE__ */ jsx("div", {
|
|
|
58
58
|
children: /* @__PURE__ */ jsx(TaskLine, { task: row.task })
|
|
59
59
|
}));
|
|
60
60
|
/**
|
|
61
|
-
* Background tasks that ended together: `3 tasks ended
|
|
61
|
+
* Background tasks that ended together: `3 tasks ended, 1 failed` on one
|
|
62
62
|
* line, collapsed by default like a tool batch; opened, each task's line.
|
|
63
63
|
*/
|
|
64
64
|
const TaskBatchRow = memo(({ row, className, style }) => {
|
|
@@ -7,6 +7,7 @@ import { ClippedOutputControls, useClippedOutput } from "./clipped-output.js";
|
|
|
7
7
|
import { EditDiffBlock } from "./EditDiffBlock.js";
|
|
8
8
|
import { Caret, FailedMark } from "./frame.js";
|
|
9
9
|
import { ImageGenerationBlock, drawsImageGeneration } from "./ImageGenerationBlock.js";
|
|
10
|
+
import { InlineFacts } from "./inline-facts.js";
|
|
10
11
|
import { useTranscriptRenderers } from "./renderers.js";
|
|
11
12
|
import { Rolling } from "./rolling.js";
|
|
12
13
|
import { useRowUiState } from "./row-ui-state.js";
|
|
@@ -386,7 +387,7 @@ function useJobClock(running) {
|
|
|
386
387
|
return now;
|
|
387
388
|
}
|
|
388
389
|
/**
|
|
389
|
-
* An MCP job's line under its call's header (`MCP job
|
|
390
|
+
* An MCP job's line under its call's header (`MCP job working Linking 40% 2m 10s`, each fact its own block),
|
|
390
391
|
* with a bar while it runs and its progress has a total. A failed job reads as an error, a cancelled one muted.
|
|
391
392
|
*/
|
|
392
393
|
function McpJobStatus({ job }) {
|
|
@@ -402,7 +403,7 @@ function McpJobStatus({ job }) {
|
|
|
402
403
|
"data-status": job.status,
|
|
403
404
|
children: /* @__PURE__ */ jsx("span", {
|
|
404
405
|
className: tone,
|
|
405
|
-
children: labels.
|
|
406
|
+
children: /* @__PURE__ */ jsx(InlineFacts, { facts: labels.mcpJobFacts(job, now) })
|
|
406
407
|
})
|
|
407
408
|
}), percent !== void 0 && /* @__PURE__ */ jsx("span", {
|
|
408
409
|
role: "progressbar",
|
|
@@ -29,7 +29,6 @@ function FileViewInner({ name, contents, wrap = false, hideHeader = false, selec
|
|
|
29
29
|
onTokenLeave,
|
|
30
30
|
onTokenClick,
|
|
31
31
|
onHighlighted,
|
|
32
|
-
renderAnnotation,
|
|
33
32
|
edit,
|
|
34
33
|
wrap
|
|
35
34
|
});
|
|
@@ -47,7 +46,6 @@ function FileViewInner({ name, contents, wrap = false, hideHeader = false, selec
|
|
|
47
46
|
const token = words.token(t, e.clientX, e.clientY);
|
|
48
47
|
if (token) latest().onTokenClick?.(token, e);
|
|
49
48
|
},
|
|
50
|
-
renderAnnotation: (a) => latest().renderAnnotation?.(a) ?? null,
|
|
51
49
|
onEditChange: (e) => latest().edit?.onChange(e.file.contents, e.changes.map((c) => ({
|
|
52
50
|
range: c.range,
|
|
53
51
|
text: c.text
|
|
@@ -126,7 +124,7 @@ function FileViewInner({ name, contents, wrap = false, hideHeader = false, selec
|
|
|
126
124
|
} : {},
|
|
127
125
|
...selectable ? { selectedLines: selectedLines ?? null } : {},
|
|
128
126
|
...lineAnnotations ? { lineAnnotations } : {},
|
|
129
|
-
...renderAnnotation ? { renderAnnotation
|
|
127
|
+
...renderAnnotation ? { renderAnnotation } : {},
|
|
130
128
|
options
|
|
131
129
|
})
|
|
132
130
|
});
|
|
@@ -17,6 +17,11 @@ export declare const ROW_CLASS = "flex items-center gap-3 px-3 py-2";
|
|
|
17
17
|
export declare const ROW_HOST_CLASS = "zg-press-host flex items-center gap-3 px-3 py-2 rounded-zg-md";
|
|
18
18
|
/** The control of a {@link HostRow} that takes the row's width: a picker's trigger, holding the label and the value. */
|
|
19
19
|
export declare const ROW_TRIGGER_CLASS = "zg-press-subtle flex items-center gap-3 flex-1 min-w-0 text-left bg-transparent border-0 p-0 cursor-pointer text-[var(--zg-text)] rounded-zg-sm disabled:cursor-default focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-[var(--zg-ring)]";
|
|
20
|
+
/**
|
|
21
|
+
* The control of a {@link HostRow} that is its value chip alone (the label stays outside it, a clear button can sit
|
|
22
|
+
* between them): the row hands it a click on the row.
|
|
23
|
+
*/
|
|
24
|
+
export declare const ROW_CHIP_TRIGGER_CLASS = "zg-press-subtle inline-flex shrink-0 min-w-0 max-w-[60%] bg-transparent border-0 p-0 cursor-pointer rounded-full disabled:cursor-default focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-[var(--zg-ring)]";
|
|
20
25
|
/** Single-line text input: a well set into its surface. */
|
|
21
26
|
export declare const INPUT_CLASS = "zg-well w-full h-8 px-2.5 text-zg-ui placeholder:text-[var(--zg-text-subtle)] disabled:opacity-zg-disabled";
|
|
22
27
|
/** Multi-line / code input. */
|
|
@@ -71,6 +76,11 @@ export interface FormSectionProps {
|
|
|
71
76
|
'title'?: ReactNode;
|
|
72
77
|
/** Right side of the label line: a count, a small action. */
|
|
73
78
|
'trailing'?: ReactNode;
|
|
79
|
+
/**
|
|
80
|
+
* What the section is for, in a question mark's tooltip beside its title ({@link HelpTip}), in place of a
|
|
81
|
+
* paragraph at the top of the tray. Needs `title`.
|
|
82
|
+
*/
|
|
83
|
+
'help'?: ReactNode;
|
|
74
84
|
/**
|
|
75
85
|
* `rows` hosts flat rows; `cards` spaces raised {@link FormCard}s apart.
|
|
76
86
|
* @default 'rows'
|
|
@@ -91,7 +101,7 @@ export interface FormSectionProps {
|
|
|
91
101
|
*
|
|
92
102
|
* @param props - Component props.
|
|
93
103
|
*/
|
|
94
|
-
export declare function FormSection({ title, trailing, layout, className, children, style, 'data-testid': testId }: FormSectionProps): import("react").JSX.Element;
|
|
104
|
+
export declare function FormSection({ title, trailing, help, layout, className, children, style, 'data-testid': testId }: FormSectionProps): import("react").JSX.Element;
|
|
95
105
|
/** Props for {@link FormCard}. */
|
|
96
106
|
export interface FormCardProps {
|
|
97
107
|
/** Extra classes on the card. */
|
|
@@ -131,6 +141,22 @@ export interface RowTextProps {
|
|
|
131
141
|
* @param props - Component props.
|
|
132
142
|
*/
|
|
133
143
|
export declare function RowText({ label, description, truncate, className, style }: RowTextProps): import("react").JSX.Element;
|
|
144
|
+
/** Props for {@link Facts}. */
|
|
145
|
+
export interface FactsProps {
|
|
146
|
+
/** The facts, in order. Empty ones (`undefined`, `null`, `false`, `''`) are left out. */
|
|
147
|
+
facts: readonly (ReactNode | undefined | false | null)[];
|
|
148
|
+
/** Extra classes on the root element. */
|
|
149
|
+
className?: string;
|
|
150
|
+
/** Inline styles on the root element, merged after the component's own. */
|
|
151
|
+
style?: CSSProperties;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Facts about a thing on one quiet line, each its own block with space between them (never a dot), wrapping
|
|
155
|
+
* between facts rather than inside a short one. Renders nothing when no fact is left.
|
|
156
|
+
*
|
|
157
|
+
* @param props - Component props.
|
|
158
|
+
*/
|
|
159
|
+
export declare function Facts({ facts, className, style }: FactsProps): import("react").JSX.Element | null;
|
|
134
160
|
/** Props for {@link MetaChip}. */
|
|
135
161
|
export interface MetaChipProps {
|
|
136
162
|
/**
|
|
@@ -292,6 +318,7 @@ export interface SegmentedRowProps<T extends string> {
|
|
|
292
318
|
label: string;
|
|
293
319
|
icon?: string;
|
|
294
320
|
title?: string;
|
|
321
|
+
tooltip?: ReactNode;
|
|
295
322
|
disabled?: boolean;
|
|
296
323
|
}[];
|
|
297
324
|
/** Extra classes on the root element. */
|
package/dist/components/Form.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { HelpTip } from "./HelpTip.js";
|
|
1
2
|
import { Notice } from "./Notice.js";
|
|
2
3
|
import { Segmented } from "./Segmented.js";
|
|
3
4
|
import { Raised, SectionLabel, Tray } from "./Surface.js";
|
|
4
5
|
import { SwitchGlyph } from "./SwitchGlyph.js";
|
|
6
|
+
import { Fragment } from "react";
|
|
5
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
8
|
// src/components/Form.tsx
|
|
7
9
|
const FOCUS_RING = "focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-[var(--zg-ring)]";
|
|
@@ -13,6 +15,11 @@ const ROW_CLASS = "flex items-center gap-3 px-3 py-2";
|
|
|
13
15
|
const ROW_HOST_CLASS = `zg-press-host ${ROW_CLASS} rounded-zg-md`;
|
|
14
16
|
/** The control of a {@link HostRow} that takes the row's width: a picker's trigger, holding the label and the value. */
|
|
15
17
|
const ROW_TRIGGER_CLASS = `zg-press-subtle flex items-center gap-3 flex-1 min-w-0 text-left bg-transparent border-0 p-0 cursor-pointer text-[var(--zg-text)] rounded-zg-sm disabled:cursor-default ${FOCUS_RING}`;
|
|
18
|
+
/**
|
|
19
|
+
* The control of a {@link HostRow} that is its value chip alone (the label stays outside it, a clear button can sit
|
|
20
|
+
* between them): the row hands it a click on the row.
|
|
21
|
+
*/
|
|
22
|
+
const ROW_CHIP_TRIGGER_CLASS = `zg-press-subtle inline-flex shrink-0 min-w-0 max-w-[60%] bg-transparent border-0 p-0 cursor-pointer rounded-full disabled:cursor-default ${FOCUS_RING}`;
|
|
16
23
|
/** What answers a click on a host row by itself. */
|
|
17
24
|
const ROW_OWN_TARGETS = "button, a, input, select, textarea, label";
|
|
18
25
|
/** Single-line text input: a well set into its surface. */
|
|
@@ -62,14 +69,20 @@ function OpLine({ kind, children, className, style }) {
|
|
|
62
69
|
*
|
|
63
70
|
* @param props - Component props.
|
|
64
71
|
*/
|
|
65
|
-
function FormSection({ title, trailing, layout = "rows", className = "", children, style, "data-testid": testId }) {
|
|
72
|
+
function FormSection({ title, trailing, help, layout = "rows", className = "", children, style, "data-testid": testId }) {
|
|
66
73
|
return /* @__PURE__ */ jsxs("section", {
|
|
67
74
|
className,
|
|
68
75
|
style,
|
|
69
76
|
"data-testid": testId,
|
|
70
77
|
children: [(title || trailing) && /* @__PURE__ */ jsxs("div", {
|
|
71
|
-
className: `flex items-center justify-between gap-2 min-h-
|
|
72
|
-
children: [title ?
|
|
78
|
+
className: `flex items-center justify-between gap-2 min-h-7 ${layout === "rows" ? "px-4" : "px-1"} mb-1.5`,
|
|
79
|
+
children: [title ? help ? /* @__PURE__ */ jsxs("span", {
|
|
80
|
+
className: "flex items-center gap-1.5 min-w-0",
|
|
81
|
+
children: [/* @__PURE__ */ jsx(SectionLabel, { children: title }), /* @__PURE__ */ jsx(HelpTip, {
|
|
82
|
+
help,
|
|
83
|
+
...typeof title === "string" ? { about: title } : {}
|
|
84
|
+
})]
|
|
85
|
+
}) : /* @__PURE__ */ jsx(SectionLabel, { children: title }) : /* @__PURE__ */ jsx("span", {}), trailing]
|
|
73
86
|
}), /* @__PURE__ */ jsx(Tray, {
|
|
74
87
|
radius: "lg",
|
|
75
88
|
className: layout === "cards" ? "p-1.5 flex flex-col gap-1.5" : "p-1 flex flex-col",
|
|
@@ -108,6 +121,24 @@ function RowText({ label, description, truncate = true, className, style }) {
|
|
|
108
121
|
})]
|
|
109
122
|
});
|
|
110
123
|
}
|
|
124
|
+
/**
|
|
125
|
+
* Facts about a thing on one quiet line, each its own block with space between them (never a dot), wrapping
|
|
126
|
+
* between facts rather than inside a short one. Renders nothing when no fact is left.
|
|
127
|
+
*
|
|
128
|
+
* @param props - Component props.
|
|
129
|
+
*/
|
|
130
|
+
function Facts({ facts, className, style }) {
|
|
131
|
+
const shown = facts.filter((fact) => fact !== void 0 && fact !== false && fact !== null && fact !== "");
|
|
132
|
+
if (shown.length === 0) return null;
|
|
133
|
+
return /* @__PURE__ */ jsx("span", {
|
|
134
|
+
className: ["flex flex-wrap gap-x-3 gap-y-0.5 min-w-0", className].filter(Boolean).join(" "),
|
|
135
|
+
style,
|
|
136
|
+
children: shown.map((fact, i) => /* @__PURE__ */ jsxs(Fragment, { children: [i > 0 && " ", /* @__PURE__ */ jsx("span", {
|
|
137
|
+
className: "min-w-0 [overflow-wrap:anywhere]",
|
|
138
|
+
children: fact
|
|
139
|
+
})] }, i))
|
|
140
|
+
});
|
|
141
|
+
}
|
|
111
142
|
const CHIP_TONE = {
|
|
112
143
|
muted: "",
|
|
113
144
|
text: "!text-[var(--zg-text)]",
|
|
@@ -262,18 +293,23 @@ function SwitchRow({ label, description, on, onToggle, className, style }) {
|
|
|
262
293
|
*/
|
|
263
294
|
function SegmentedRow({ label, description, value, onChange, options, className, style }) {
|
|
264
295
|
return /* @__PURE__ */ jsxs("div", {
|
|
265
|
-
className: [
|
|
296
|
+
className: [
|
|
297
|
+
ROW_CLASS,
|
|
298
|
+
"flex-wrap gap-y-2",
|
|
299
|
+
className
|
|
300
|
+
].filter(Boolean).join(" "),
|
|
266
301
|
style,
|
|
267
302
|
children: [/* @__PURE__ */ jsx(RowText, {
|
|
268
303
|
label,
|
|
269
304
|
description,
|
|
270
|
-
truncate: false
|
|
305
|
+
truncate: false,
|
|
306
|
+
className: "min-w-[12rem] basis-[12rem]"
|
|
271
307
|
}), /* @__PURE__ */ jsx(Segmented, {
|
|
272
308
|
value,
|
|
273
309
|
onChange,
|
|
274
310
|
options,
|
|
275
311
|
ariaLabel: label,
|
|
276
|
-
className: "shrink-0"
|
|
312
|
+
className: "shrink-0 ml-auto"
|
|
277
313
|
})]
|
|
278
314
|
});
|
|
279
315
|
}
|
|
@@ -310,4 +346,4 @@ function SliderRow({ label, description, value, min, max, step, format, onChange
|
|
|
310
346
|
]
|
|
311
347
|
});
|
|
312
348
|
}
|
|
313
|
-
export { Checkbox, ErrorNote, FIELD_LABEL_CLASS, FORM_CARD_CLASS, FormCard, FormSection, HostRow, INPUT_CLASS, MetaChip, NavRow, OpLine, ROW_BUTTON_CLASS, ROW_CLASS, ROW_HOST_CLASS, ROW_TRIGGER_CLASS, RowText, SegmentedRow, SliderRow, Switch, SwitchRow, TEXTAREA_CLASS, ToggleSwitch };
|
|
349
|
+
export { Checkbox, ErrorNote, FIELD_LABEL_CLASS, FORM_CARD_CLASS, Facts, FormCard, FormSection, HostRow, INPUT_CLASS, MetaChip, NavRow, OpLine, ROW_BUTTON_CLASS, ROW_CHIP_TRIGGER_CLASS, ROW_CLASS, ROW_HOST_CLASS, ROW_TRIGGER_CLASS, RowText, SegmentedRow, SliderRow, Switch, SwitchRow, TEXTAREA_CLASS, ToggleSwitch };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A question mark beside a title that says what the section is for in the kit's tooltip: the place of a paragraph
|
|
3
|
+
* that would otherwise sit at the top of a card. It takes the keyboard's focus, and focus opens it as hover does.
|
|
4
|
+
*/
|
|
5
|
+
import { CSSProperties, ReactNode } from "react";
|
|
6
|
+
/** Props for {@link HelpTip}. */
|
|
7
|
+
export interface HelpTipProps {
|
|
8
|
+
/** What the tooltip says. A sentence or two. */
|
|
9
|
+
help: ReactNode;
|
|
10
|
+
/** What it explains, for its accessible name ("About Budgets"). Absent: "Help". */
|
|
11
|
+
about?: string;
|
|
12
|
+
/** Extra classes on the root. */
|
|
13
|
+
className?: string;
|
|
14
|
+
/** Inline styles on the root. */
|
|
15
|
+
style?: CSSProperties;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Renders a muted question mark with `help` in the kit's tooltip.
|
|
19
|
+
*
|
|
20
|
+
* @param props - Component props.
|
|
21
|
+
*/
|
|
22
|
+
export declare function HelpTip({ help, about, className, style }: HelpTipProps): import("react").JSX.Element;
|