zidane-ui 9.2.2 → 9.3.1
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/browser-keybindings-host.js +3 -1
- package/dist/adapters/live.d.ts +6 -0
- package/dist/adapters/live.js +16 -8
- package/dist/adapters/server-composer-host.js +22 -9
- package/dist/adapters/server-host.js +143 -18
- package/dist/adapters/server-media.d.ts +9 -1
- package/dist/adapters/server-media.js +14 -1
- package/dist/adapters/server-settings-host.js +30 -3
- package/dist/adapters/server-settings-sections.js +23 -1
- package/dist/adapters/server-sidebar-host.d.ts +3 -1
- package/dist/adapters/server-sidebar-host.js +10 -1
- package/dist/app/ModalProvider.js +1 -1
- package/dist/approvals/ApprovalShell.js +1 -1
- package/dist/chat/DaemonOrb.d.ts +29 -1
- package/dist/chat/DaemonOrb.js +25 -12
- package/dist/chat/HostTranscript.d.ts +0 -12
- package/dist/chat/HostTranscript.js +6 -1
- package/dist/chat/SessionStreamsProvider.d.ts +8 -0
- package/dist/chat/SessionStreamsProvider.js +11 -2
- package/dist/chat/StatusDot.js +8 -2
- package/dist/chat/Transcript.d.ts +20 -11
- package/dist/chat/Transcript.js +335 -162
- package/dist/chat/composer/ComposerEditor.js +1 -1
- package/dist/chat/headless/host.d.ts +43 -7
- package/dist/chat/headless/index.d.ts +8 -6
- package/dist/chat/headless/index.js +11 -9
- package/dist/chat/headless/labels.d.ts +30 -0
- package/dist/chat/headless/labels.js +29 -0
- package/dist/chat/headless/markdown-chunks.d.ts +2 -1
- package/dist/chat/headless/markdown-chunks.js +12 -20
- package/dist/chat/headless/markdown-scan.d.ts +66 -0
- package/dist/chat/headless/markdown-scan.js +124 -0
- package/dist/chat/headless/markdown-stream.d.ts +64 -0
- package/dist/chat/headless/markdown-stream.js +143 -0
- package/dist/chat/headless/output-pager.d.ts +68 -0
- package/dist/chat/headless/output-pager.js +113 -0
- package/dist/chat/headless/session-list.d.ts +20 -0
- package/dist/chat/headless/sidebar/activity.d.ts +14 -0
- package/dist/chat/headless/sidebar/activity.js +32 -0
- package/dist/chat/headless/sidebar/directory.d.ts +17 -2
- package/dist/chat/headless/sidebar/directory.js +50 -54
- package/dist/chat/headless/sidebar/environment.d.ts +5 -2
- package/dist/chat/headless/sidebar/environment.js +11 -2
- package/dist/chat/headless/sidebar/host.d.ts +15 -0
- package/dist/chat/headless/sidebar/inbox.d.ts +12 -3
- package/dist/chat/headless/sidebar/inbox.js +18 -9
- package/dist/chat/headless/sidebar/index.d.ts +2 -2
- package/dist/chat/headless/sidebar/index.js +2 -2
- package/dist/chat/headless/sidebar/labels.d.ts +38 -2
- package/dist/chat/headless/sidebar/labels.js +16 -0
- package/dist/chat/headless/sidebar/prewarm.d.ts +68 -0
- package/dist/chat/headless/sidebar/prewarm.js +114 -0
- package/dist/chat/headless/streams/actions.d.ts +2 -0
- package/dist/chat/headless/streams/actions.js +1 -0
- package/dist/chat/headless/streams/event-bytes.d.ts +6 -0
- package/dist/chat/headless/streams/event-bytes.js +34 -0
- package/dist/chat/headless/streams/live-events.d.ts +25 -1
- package/dist/chat/headless/streams/live-events.js +53 -2
- package/dist/chat/headless/streams/selectors.d.ts +3 -0
- package/dist/chat/headless/streams/selectors.js +8 -1
- package/dist/chat/headless/streams/session-streams.d.ts +15 -3
- package/dist/chat/headless/streams/session-streams.js +31 -3
- package/dist/chat/headless/streams/store.d.ts +24 -1
- package/dist/chat/headless/streams/store.js +51 -26
- package/dist/chat/headless/streams/transcript-map.d.ts +57 -0
- package/dist/chat/headless/streams/transcript-map.js +88 -0
- package/dist/chat/headless/streams/transcript.d.ts +4 -2
- package/dist/chat/headless/streams/transcript.js +19 -7
- package/dist/chat/headless/transcript/batch.js +5 -1
- package/dist/chat/headless/transcript/blob-media.d.ts +15 -0
- package/dist/chat/headless/transcript/blob-media.js +23 -0
- package/dist/chat/headless/transcript/collapse.d.ts +10 -0
- package/dist/chat/headless/transcript/collapse.js +32 -6
- package/dist/chat/headless/transcript/derive.d.ts +98 -0
- package/dist/chat/headless/transcript/derive.js +89 -0
- package/dist/chat/headless/transcript/exchange-media.d.ts +3 -1
- package/dist/chat/headless/transcript/exchange-media.js +8 -5
- package/dist/chat/headless/transcript/fold-actions.d.ts +8 -3
- package/dist/chat/headless/transcript/fold-actions.js +16 -0
- package/dist/chat/headless/transcript/fold-attachments.d.ts +2 -0
- package/dist/chat/headless/transcript/fold-attachments.js +3 -2
- package/dist/chat/headless/transcript/fold.d.ts +4 -2
- package/dist/chat/headless/transcript/fold.js +37 -7
- package/dist/chat/headless/transcript/incremental.d.ts +53 -0
- package/dist/chat/headless/transcript/incremental.js +181 -0
- package/dist/chat/headless/transcript/index.d.ts +2 -1
- package/dist/chat/headless/transcript/index.js +2 -1
- package/dist/chat/headless/transcript/nesting.js +2 -1
- package/dist/chat/headless/transcript/rail.d.ts +142 -0
- package/dist/chat/headless/transcript/rail.js +290 -0
- package/dist/chat/headless/transcript/rows.d.ts +11 -1
- package/dist/chat/headless/transcript/run-failures.d.ts +4 -0
- package/dist/chat/headless/transcript/run-failures.js +31 -2
- package/dist/chat/headless/transcript/seams.d.ts +78 -0
- package/dist/chat/headless/transcript/seams.js +116 -0
- package/dist/chat/headless/transcript/tool-media.d.ts +6 -7
- package/dist/chat/headless/transcript/tool-media.js +27 -9
- package/dist/chat/headless/transcript-labels.d.ts +1 -0
- package/dist/chat/headless/turn-labels.d.ts +1 -0
- package/dist/chat/headless/turn-labels.js +2 -1
- package/dist/chat/index.d.ts +10 -8
- package/dist/chat/index.js +9 -7
- package/dist/chat/interactions/ElicitationCard.js +1 -1
- package/dist/chat/interactions/InteractionCard.js +1 -1
- package/dist/chat/interactions/PlanCard.js +3 -3
- package/dist/chat/interactions/QuestionField.js +4 -4
- package/dist/chat/interactions/QuestionForm.js +3 -3
- package/dist/chat/interactions/SecretInput.js +1 -1
- package/dist/chat/sidebar/ProjectIcon.d.ts +1 -1
- package/dist/chat/sidebar/ProjectIcon.js +1 -1
- package/dist/chat/sidebar/RowChips.d.ts +3 -2
- package/dist/chat/sidebar/RowChips.js +6 -3
- package/dist/chat/sidebar/SessionSidebar.js +13 -14
- package/dist/chat/sidebar/SidebarFooter.d.ts +8 -5
- package/dist/chat/sidebar/SidebarFooter.js +6 -6
- package/dist/chat/sidebar/SidebarFrame.d.ts +2 -0
- package/dist/chat/sidebar/SidebarFrame.js +5 -2
- package/dist/chat/sidebar/SidebarSessionRow.d.ts +3 -1
- package/dist/chat/sidebar/SidebarSessionRow.js +3 -1
- package/dist/chat/sidebar/SpacesSection.d.ts +20 -1
- package/dist/chat/sidebar/SpacesSection.js +34 -13
- package/dist/chat/sidebar/index.d.ts +2 -2
- package/dist/chat/sidebar/session-menu.d.ts +11 -2
- package/dist/chat/sidebar/session-menu.js +50 -5
- package/dist/chat/sidebar/sidebar-live.js +1 -1
- package/dist/chat/sidebar/useInboxRows.js +43 -2
- package/dist/chat/sidebar/useInboxTriage.js +19 -14
- package/dist/chat/testing/contract.d.ts +5 -3
- package/dist/chat/testing/contract.js +66 -1
- package/dist/chat/testing/fixture-sidebar-host.d.ts +7 -1
- package/dist/chat/testing/fixture-sidebar-host.js +12 -0
- package/dist/chat/testing/sidebar.contract.d.ts +6 -0
- package/dist/chat/testing/sidebar.contract.js +24 -0
- package/dist/chat/transcript/DiffLines.d.ts +6 -1
- package/dist/chat/transcript/DiffLines.js +35 -20
- package/dist/chat/transcript/EditDiffBlock.d.ts +5 -1
- package/dist/chat/transcript/EditDiffBlock.js +89 -30
- package/dist/chat/transcript/InteractionToolBody.js +1 -1
- package/dist/chat/transcript/LazyRow.d.ts +40 -40
- package/dist/chat/transcript/LazyRow.js +101 -149
- package/dist/chat/transcript/MermaidDiagram.js +2 -1
- package/dist/chat/transcript/SelectCursor.d.ts +11 -1
- package/dist/chat/transcript/SelectCursor.js +10 -5
- package/dist/chat/transcript/SubagentBlock.js +3 -2
- package/dist/chat/transcript/TranscriptRail.d.ts +109 -0
- package/dist/chat/transcript/TranscriptRail.js +579 -0
- package/dist/chat/transcript/TranscriptRow.d.ts +4 -7
- package/dist/chat/transcript/TranscriptRow.js +9 -5
- package/dist/chat/transcript/actions.d.ts +43 -3
- package/dist/chat/transcript/actions.js +27 -1
- package/dist/chat/transcript/clipped-output.d.ts +58 -0
- package/dist/chat/transcript/clipped-output.js +131 -0
- package/dist/chat/transcript/fold-attachments.js +10 -5
- package/dist/chat/transcript/fold-worker.js +3 -2
- package/dist/chat/transcript/fold.js +21 -2
- package/dist/chat/transcript/index.d.ts +11 -9
- package/dist/chat/transcript/index.js +10 -8
- package/dist/chat/transcript/markdown-cache.d.ts +7 -1
- package/dist/chat/transcript/markdown-cache.js +12 -1
- package/dist/chat/transcript/markdown.js +116 -54
- package/dist/chat/transcript/media-gallery.d.ts +3 -2
- package/dist/chat/transcript/media-gallery.js +10 -7
- package/dist/chat/transcript/notices.d.ts +23 -1
- package/dist/chat/transcript/notices.js +110 -28
- package/dist/chat/transcript/prompt.js +6 -4
- package/dist/chat/transcript/prose.js +3 -1
- package/dist/chat/transcript/receipt-parts.d.ts +22 -0
- package/dist/chat/transcript/receipt-parts.js +87 -0
- package/dist/chat/transcript/root-items.d.ts +96 -0
- package/dist/chat/transcript/root-items.js +180 -0
- package/dist/chat/transcript/row-mount.d.ts +165 -0
- package/dist/chat/transcript/row-mount.js +498 -0
- package/dist/chat/transcript/row-parking.d.ts +125 -0
- package/dist/chat/transcript/row-parking.js +135 -0
- package/dist/chat/transcript/row-ui-state.d.ts +37 -0
- package/dist/chat/transcript/row-ui-state.js +53 -0
- package/dist/chat/transcript/run-rows.js +6 -78
- package/dist/chat/transcript/script-input.d.ts +1 -1
- package/dist/chat/transcript/scroll-clamp.js +1 -1
- package/dist/chat/transcript/tasks.js +3 -2
- package/dist/chat/transcript/tool-media.d.ts +4 -2
- package/dist/chat/transcript/tool-media.js +15 -7
- package/dist/chat/transcript/tool-parts.d.ts +27 -4
- package/dist/chat/transcript/tool-parts.js +31 -5
- package/dist/chat/transcript/tool-payload.js +26 -11
- package/dist/chat/transcript/tool-row.d.ts +2 -1
- package/dist/chat/transcript/tool-row.js +38 -19
- package/dist/chat/transcript/use-transcript-rows.d.ts +24 -7
- package/dist/chat/transcript/use-transcript-rows.js +28 -46
- package/dist/chat/transcript/useSettledReveal.js +15 -3
- package/dist/chat/transcript/useStickToBottom.js +4 -4
- package/dist/chat/transcript/useTranscriptSearch.js +30 -14
- package/dist/chat/transcript/view-scope.d.ts +26 -6
- package/dist/chat/transcript/view-scope.js +106 -20
- package/dist/components/ChoiceCards.js +1 -1
- package/dist/components/ConfirmDialog.js +1 -1
- package/dist/components/CopyValue.d.ts +33 -0
- package/dist/components/CopyValue.js +54 -0
- package/dist/components/Form.js +1 -1
- package/dist/components/HowItWorks.js +1 -1
- package/dist/components/Menu.js +1 -1
- package/dist/components/StepFrame.js +2 -2
- package/dist/components/SwatchPicker.js +1 -1
- package/dist/components/ToggleCard.js +1 -1
- package/dist/components/floating/HoverCard.js +2 -3
- package/dist/components/floating/hover-delay.d.ts +4 -0
- package/dist/components/floating/hover-delay.js +6 -0
- package/dist/core.css +14 -12
- package/dist/dist/{index-Betz0OWq.d.ts → index-C6-t1SS9.d.ts} +21 -2
- package/dist/dist/index-De9AbmxS.d.ts +1 -0
- package/dist/dist/index.d.ts +5 -5
- package/dist/dist/sandbox-CSUihARm.d.ts +2 -0
- package/dist/dist/{timeout-CyU7HLyz.d.ts → timeout-CmTx6V9y.d.ts} +1 -0
- package/dist/extensions/ExtensionDialogHost.js +1 -1
- package/dist/files/TreeColumn.js +3 -1
- package/dist/files/headless/host.d.ts +2 -2
- package/dist/git/ImportRepoDialog.js +1 -1
- package/dist/git/MoveSessionDialog.js +2 -2
- package/dist/git/SandboxManager.d.ts +42 -0
- package/dist/git/SandboxManager.js +297 -0
- package/dist/git/SyncChip.js +1 -1
- package/dist/git/headless/index.d.ts +2 -1
- package/dist/git/headless/index.js +2 -1
- package/dist/git/headless/labels.d.ts +29 -0
- package/dist/git/headless/labels.js +34 -1
- package/dist/git/headless/sandboxes.d.ts +43 -0
- package/dist/git/headless/sandboxes.js +52 -0
- package/dist/git/index.d.ts +2 -1
- package/dist/git/index.js +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/keybindings/headless/catalog.d.ts +1 -1
- package/dist/keybindings/headless/catalog.js +12 -0
- package/dist/machines/HostsSection.d.ts +1 -1
- package/dist/machines/headless/labels.js +2 -2
- package/dist/motion/flip-list.js +3 -10
- package/dist/motion/presence.d.ts +10 -0
- package/dist/motion/presence.js +20 -1
- package/dist/motion/swap.d.ts +8 -2
- package/dist/motion/swap.js +5 -2
- package/dist/onboarding/conversation.js +27 -15
- package/dist/onboarding/demos/how-it-works.js +1 -1
- package/dist/onboarding/skills/parts.js +4 -4
- package/dist/onboarding/sources/SourceBrowser.js +1 -1
- package/dist/onboarding/steps/ReadyStep.js +1 -1
- package/dist/onboarding/steps/connect/KeyForm.js +1 -1
- package/dist/palette/headless/app-sources.js +20 -0
- package/dist/palette/headless/labels.js +2 -0
- package/dist/session/PlanTracker.js +3 -3
- package/dist/session/SecretsPanel.js +1 -1
- package/dist/session/SessionHeader.d.ts +18 -6
- package/dist/session/SessionHeader.js +68 -12
- package/dist/session/SessionPlaceMenu.d.ts +35 -0
- package/dist/session/SessionPlaceMenu.js +299 -0
- package/dist/session/SessionShell.js +1 -1
- package/dist/session/TurnDetailsDialog.js +1 -1
- package/dist/session/headless/index.d.ts +2 -1
- package/dist/session/headless/index.js +2 -1
- package/dist/session/headless/labels.d.ts +73 -0
- package/dist/session/headless/labels.js +73 -0
- package/dist/session/headless/place.d.ts +49 -0
- package/dist/session/headless/place.js +57 -0
- package/dist/session/index.d.ts +2 -1
- package/dist/session/index.js +2 -1
- package/dist/settings/ConversationPresetsCard.js +1 -1
- package/dist/settings/SettingCard.js +2 -2
- package/dist/settings/SettingsRowsPage.js +1 -1
- package/dist/settings/headless/fixture-performance.js +4 -2
- package/dist/settings/headless/fixture-sections.js +7 -0
- package/dist/settings/headless/labels.d.ts +1 -1
- package/dist/settings/headless/labels.js +1 -1
- package/dist/settings/headless/layout.d.ts +4 -4
- package/dist/settings/headless/layout.js +1 -1
- package/dist/settings/headless/performance.d.ts +4 -0
- package/dist/settings/headless/search.d.ts +2 -2
- package/dist/settings/headless/sections-host.d.ts +20 -2
- package/dist/settings/sections/claude-import/ClaudeImportDialog.js +1 -1
- package/dist/settings/sections/enabled-list/EnabledListSection.js +2 -2
- package/dist/settings/sections/environments/EnvironmentsSection.d.ts +9 -3
- package/dist/settings/sections/environments/EnvironmentsSection.js +292 -52
- package/dist/settings/sections/environments/labels.d.ts +15 -0
- package/dist/settings/sections/environments/labels.js +18 -3
- package/dist/settings/sections/extensions/ChangeOriginDialog.js +1 -1
- package/dist/settings/sections/extensions/ExtensionSourceBrowser.js +1 -1
- package/dist/settings/sections/extensions/ExtensionsSection.d.ts +3 -2
- package/dist/settings/sections/extensions/ExtensionsSection.js +9 -3
- package/dist/settings/sections/host-catalog/HostCatalogSection.js +15 -5
- package/dist/settings/sections/keybindings/labels.d.ts +2 -0
- package/dist/settings/sections/keybindings/labels.js +2 -0
- package/dist/settings/sections/keybindings/rows.js +8 -0
- package/dist/settings/sections/models/SpacesDefaultsSection.d.ts +7 -3
- package/dist/settings/sections/models/SpacesDefaultsSection.js +11 -5
- package/dist/settings/sections/performance/PerformanceSection.js +8 -1
- package/dist/settings/sections/performance/labels.d.ts +2 -0
- package/dist/settings/sections/performance/labels.js +2 -0
- package/dist/settings/sections/skills/SkillGroups.js +1 -1
- package/dist/settings/server-app.d.ts +4 -2
- package/dist/settings/server-app.js +7 -3
- package/dist/settings/testing/sections.contract.d.ts +7 -1
- package/dist/settings/testing/sections.contract.js +37 -0
- package/dist/styles.css +243 -19
- package/dist/terminal/TerminalDrawer.js +3 -1
- package/dist/views/headless/answers.d.ts +8 -2
- package/dist/views/headless/answers.js +58 -1
- package/dist/views/headless/placement.d.ts +78 -0
- package/dist/views/headless/placement.js +154 -44
- package/dist/workspace/SidePanel.js +3 -1
- package/package.json +2 -2
- package/src/styles/base.css +13 -0
- package/src/styles/chat.css +30 -0
- package/src/styles/components.css +0 -10
- package/src/styles/files.css +5 -0
- package/src/styles/sidebar.css +29 -7
- package/src/styles/terminal.css +6 -0
- package/src/styles/tokens.css +5 -0
- package/src/styles/transcript.css +138 -0
- package/src/styles/workspace.css +6 -0
- package/dist/dist/index-QcFzZlao.d.ts +0 -1
- package/dist/dist/sandbox-D0zsW8I1.d.ts +0 -2
- /package/dist/dist/{types-_Dtoq_No.d.ts → execution-failure-SREfl-EZ.d.ts} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { lazyPart } from "../../components/lazy-part.js";
|
|
2
|
-
import { onlyLastTextChanged, textlessExchanges, unplacedCodemodeViews, viewPlacements } from "../../views/headless/placement.js";
|
|
2
|
+
import { closePlacementExchange, foldPlacements, foldTextless, onlyLastTextChanged, placementFold, sameViewPlace, textlessExchanges, textlessFold, unplacedCodemodeViews, viewPlacements } from "../../views/headless/placement.js";
|
|
3
3
|
import { useViewsHost, useViewsMeta } from "../../views/ViewsProvider.js";
|
|
4
4
|
import { Suspense, createContext, useCallback, useContext, useEffect, useMemo, useState, useSyncExternalStore } from "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { findViewFences, mayHoldViewFence } from "zidane/chat/pure";
|
|
6
|
+
import { findViewFences, mayHoldViewFence, noteTranscriptPass } from "zidane/chat/pure";
|
|
7
7
|
// src/chat/transcript/view-scope.tsx
|
|
8
8
|
/** Loads the views chunk. Counted by the tests that prove it never loads with views off. */
|
|
9
9
|
const loadViews = () => import("../../views/TranscriptViews.js");
|
|
@@ -144,13 +144,16 @@ function viewFenceStarts(text) {
|
|
|
144
144
|
* The fences of each chunk of a reply.
|
|
145
145
|
*
|
|
146
146
|
* @param chunks - The reply's chunks.
|
|
147
|
+
* @param previous - The last call's chunks and result: a chunk still the same string is not read again (a streaming
|
|
148
|
+
* reply's closed chunks keep theirs), and keeps its value while its base does.
|
|
147
149
|
*/
|
|
148
|
-
function chunkFencesFor(chunks) {
|
|
150
|
+
function chunkFencesFor(chunks, previous) {
|
|
149
151
|
let base = 0;
|
|
150
|
-
return chunks.map((text) => {
|
|
151
|
-
const
|
|
152
|
+
return chunks.map((text, i) => {
|
|
153
|
+
const kept = previous && previous.chunks[i] === text ? previous.fences[i] : void 0;
|
|
154
|
+
const value = kept && kept.base === base ? kept : {
|
|
152
155
|
base,
|
|
153
|
-
starts: viewFenceStarts(text)
|
|
156
|
+
starts: kept ? kept.starts : viewFenceStarts(text)
|
|
154
157
|
};
|
|
155
158
|
base += value.starts.length;
|
|
156
159
|
return value;
|
|
@@ -182,37 +185,120 @@ function ChunkFencesScope({ base, starts, children }) {
|
|
|
182
185
|
function fenceIndexIn(chunk, offset) {
|
|
183
186
|
return Math.max(0, chunk.starts.filter((start) => start <= offset).length - 1);
|
|
184
187
|
}
|
|
188
|
+
const NO_PLACES = /* @__PURE__ */ new Map();
|
|
185
189
|
/** Where each reply row's views go, read per row: a row draws again only when its own place changes. */
|
|
186
190
|
var ReplyViewPlaces = class {
|
|
187
|
-
|
|
191
|
+
/** The places of the settled exchanges (or of a whole array). */
|
|
192
|
+
base = NO_PLACES;
|
|
193
|
+
/** The places the open exchange sets, over `base`. */
|
|
194
|
+
top = NO_PLACES;
|
|
195
|
+
source = null;
|
|
188
196
|
events = [];
|
|
197
|
+
/** The folds of a transcript store's settled exchanges, per chunk list. */
|
|
198
|
+
settled = null;
|
|
189
199
|
textless = [];
|
|
200
|
+
textlessKey = null;
|
|
190
201
|
changed = /* @__PURE__ */ new Set();
|
|
191
202
|
listeners = /* @__PURE__ */ new Map();
|
|
192
203
|
/**
|
|
193
204
|
* Reads the events: the places (`viewPlacements`) and the exchanges with no reply text
|
|
194
205
|
* (`textlessExchanges`). A stream tick changes neither, so it reads nothing. Rows rendering
|
|
195
|
-
* after it read the places; {@link flush} tells the others.
|
|
206
|
+
* after it read the places; {@link flush} tells the others. A transcript store's settled
|
|
207
|
+
* exchanges are read once: a tick reads its open exchange.
|
|
196
208
|
*
|
|
197
|
-
* @param events - The session's events, oldest first.
|
|
209
|
+
* @param events - The session's events, oldest first, or its transcript store.
|
|
198
210
|
*/
|
|
199
211
|
update(events) {
|
|
200
|
-
if (events === this.
|
|
201
|
-
if (
|
|
202
|
-
|
|
203
|
-
this.
|
|
212
|
+
if (events === this.source) return;
|
|
213
|
+
if (Array.isArray(events)) {
|
|
214
|
+
const list = events;
|
|
215
|
+
if (!onlyLastTextChanged(this.events, list)) {
|
|
216
|
+
this.replace(viewPlacements(list, this.flat()), NO_PLACES, true);
|
|
217
|
+
this.textless = textlessExchanges(list);
|
|
218
|
+
}
|
|
219
|
+
this.events = list;
|
|
220
|
+
this.settled = null;
|
|
221
|
+
this.textlessKey = null;
|
|
222
|
+
} else {
|
|
223
|
+
this.updateTranscript(events);
|
|
224
|
+
this.events = [];
|
|
225
|
+
}
|
|
226
|
+
this.source = events;
|
|
227
|
+
}
|
|
228
|
+
updateTranscript(transcript) {
|
|
229
|
+
let settled = this.settled;
|
|
230
|
+
const whole = !settled || settled.chunks !== transcript.chunks;
|
|
231
|
+
if (!settled || whole) {
|
|
232
|
+
noteTranscriptPass("views:settle", transcript.prefixLength);
|
|
233
|
+
const places = placementFold();
|
|
234
|
+
const textless = textlessFold();
|
|
235
|
+
for (const chunk of transcript.chunks) {
|
|
236
|
+
foldPlacements(places, chunk);
|
|
237
|
+
foldTextless(textless, chunk);
|
|
238
|
+
}
|
|
239
|
+
const map = places.places;
|
|
240
|
+
for (const [rowId, place] of map) {
|
|
241
|
+
const before = this.get(rowId);
|
|
242
|
+
if (before && sameViewPlace(before, place)) map.set(rowId, before);
|
|
243
|
+
}
|
|
244
|
+
settled = {
|
|
245
|
+
chunks: transcript.chunks,
|
|
246
|
+
places,
|
|
247
|
+
textless
|
|
248
|
+
};
|
|
249
|
+
this.settled = settled;
|
|
250
|
+
}
|
|
251
|
+
noteTranscriptPass("views:open", transcript.tail.length);
|
|
252
|
+
const fold = placementFold(settled.places);
|
|
253
|
+
foldPlacements(fold, transcript.tail);
|
|
254
|
+
closePlacementExchange(fold);
|
|
255
|
+
const top = fold.places.top;
|
|
256
|
+
for (const [rowId, place] of top) {
|
|
257
|
+
const before = this.get(rowId);
|
|
258
|
+
if (before && sameViewPlace(before, place)) top.set(rowId, before);
|
|
259
|
+
}
|
|
260
|
+
this.replace(settled.places.places, top, whole);
|
|
261
|
+
const tf = textlessFold(settled.textless);
|
|
262
|
+
foldTextless(tf, transcript.tail);
|
|
263
|
+
const open = !tf.replied && tf.turns.length > 0 ? tf.turns : null;
|
|
264
|
+
const key = this.textlessKey;
|
|
265
|
+
if (!(key !== null && key.closed === tf.out && (key.open === open || key.open !== null && open !== null && key.open.length === open.length && key.open.every((t, i) => t === open[i])))) {
|
|
266
|
+
this.textless = open ? [...tf.out, {
|
|
267
|
+
turns: open,
|
|
268
|
+
closed: false
|
|
269
|
+
}] : tf.out;
|
|
270
|
+
this.textlessKey = {
|
|
271
|
+
closed: tf.out,
|
|
272
|
+
open
|
|
273
|
+
};
|
|
204
274
|
}
|
|
205
|
-
this.events = events;
|
|
206
275
|
}
|
|
207
276
|
/** The exchanges with no reply text, as of the last {@link update}. */
|
|
208
277
|
get textlessExchanges() {
|
|
209
278
|
return this.textless;
|
|
210
279
|
}
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
this.
|
|
280
|
+
/** The places as one map (the array path's `previous`). */
|
|
281
|
+
flat() {
|
|
282
|
+
if (this.top.size === 0) return this.base;
|
|
283
|
+
const all = new Map(this.base);
|
|
284
|
+
for (const [rowId, place] of this.top) all.set(rowId, place);
|
|
285
|
+
return all;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Sets the places, noting the rows whose place changed: every row when `whole`, else those the
|
|
289
|
+
* open exchange set before or sets now (the base is the same).
|
|
290
|
+
*/
|
|
291
|
+
replace(base, top, whole) {
|
|
292
|
+
const read = (rowId) => top.has(rowId) ? top.get(rowId) : base.get(rowId);
|
|
293
|
+
const keys = whole ? [
|
|
294
|
+
this.base.keys(),
|
|
295
|
+
this.top.keys(),
|
|
296
|
+
base.keys(),
|
|
297
|
+
top.keys()
|
|
298
|
+
] : [this.top.keys(), top.keys()];
|
|
299
|
+
for (const list of keys) for (const rowId of list) if (this.get(rowId) !== read(rowId)) this.changed.add(rowId);
|
|
300
|
+
this.base = base;
|
|
301
|
+
this.top = top;
|
|
216
302
|
}
|
|
217
303
|
/** Tells the rows whose place changed since the last flush. */
|
|
218
304
|
flush() {
|
|
@@ -221,7 +307,7 @@ var ReplyViewPlaces = class {
|
|
|
221
307
|
for (const rowId of changed) for (const listener of [...this.listeners.get(rowId) ?? []]) listener();
|
|
222
308
|
}
|
|
223
309
|
get(rowId) {
|
|
224
|
-
return this.
|
|
310
|
+
return this.top.has(rowId) ? this.top.get(rowId) : this.base.get(rowId);
|
|
225
311
|
}
|
|
226
312
|
subscribe(rowId, onChange) {
|
|
227
313
|
let set = this.listeners.get(rowId);
|
|
@@ -92,7 +92,7 @@ function ChoiceCards({ value, onChange, options, columns = 3, numbered = false,
|
|
|
92
92
|
}),
|
|
93
93
|
o.description && /* @__PURE__ */ jsx("span", {
|
|
94
94
|
id: `${id}-${i}-description`,
|
|
95
|
-
className: "text-zg-label text-[var(--zg-text-muted)]
|
|
95
|
+
className: "text-zg-label text-[var(--zg-text-muted)]",
|
|
96
96
|
children: o.description
|
|
97
97
|
})
|
|
98
98
|
]
|
|
@@ -47,7 +47,7 @@ function ConfirmDialog({ title, message, confirmLabel, cancelLabel, destructive
|
|
|
47
47
|
children: title
|
|
48
48
|
}), message && /* @__PURE__ */ jsx("div", {
|
|
49
49
|
id: messageId,
|
|
50
|
-
className: "mt-1.5 text-zg-ui leading-relaxed text-[var(--zg-text-muted)]
|
|
50
|
+
className: "mt-1.5 text-zg-ui leading-relaxed text-[var(--zg-text-muted)]",
|
|
51
51
|
children: message
|
|
52
52
|
})]
|
|
53
53
|
}), /* @__PURE__ */ jsxs("footer", {
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A machine value that copies itself on click (an id, a branch): its glyph and the value in the mono voice,
|
|
3
|
+
* then a copy glyph that shows on hover or focus and turns into a check for a moment after a copy. The
|
|
4
|
+
* tooltip says what a click copies, then that it did.
|
|
5
|
+
*/
|
|
6
|
+
import { CSSProperties } from "react";
|
|
7
|
+
/** Props for {@link CopyValue}. */
|
|
8
|
+
export interface CopyValueProps {
|
|
9
|
+
/** The value shown and copied. */
|
|
10
|
+
text: string;
|
|
11
|
+
/** What a click does ("Copy branch"): the tooltip, and the accessible name with the value. */
|
|
12
|
+
label: string;
|
|
13
|
+
/** The tooltip once copied ("Copied"). */
|
|
14
|
+
copiedLabel: string;
|
|
15
|
+
/** A glyph before the value (`i-ph-git-branch`). */
|
|
16
|
+
icon?: string;
|
|
17
|
+
/**
|
|
18
|
+
* When the copy glyph shows: on hover or focus, or always, faint (in a badge, where its hidden room would
|
|
19
|
+
* read as a gap).
|
|
20
|
+
* @default 'hover'
|
|
21
|
+
*/
|
|
22
|
+
glyph?: 'hover' | 'always';
|
|
23
|
+
/** Extra classes on the button. */
|
|
24
|
+
className?: string;
|
|
25
|
+
/** Inline styles on the button. */
|
|
26
|
+
style?: CSSProperties;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Renders the value as a button that copies it. A refused clipboard write changes nothing.
|
|
30
|
+
*
|
|
31
|
+
* @param props - {@link CopyValueProps}.
|
|
32
|
+
*/
|
|
33
|
+
export declare function CopyValue({ text, label, copiedLabel, icon, glyph, className, style }: CopyValueProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { SwapIcon } from "../motion/SwapIcon.js";
|
|
2
|
+
import { useTooltip } from "./Tooltip.js";
|
|
3
|
+
import { useEffect, useState } from "react";
|
|
4
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
// src/components/CopyValue.tsx
|
|
6
|
+
const FEEDBACK_MS = 1200;
|
|
7
|
+
/**
|
|
8
|
+
* Renders the value as a button that copies it. A refused clipboard write changes nothing.
|
|
9
|
+
*
|
|
10
|
+
* @param props - {@link CopyValueProps}.
|
|
11
|
+
*/
|
|
12
|
+
function CopyValue({ text, label, copiedLabel, icon, glyph = "hover", className = "", style }) {
|
|
13
|
+
const [copied, setCopied] = useState(false);
|
|
14
|
+
const tip = useTooltip(copied ? copiedLabel : label);
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
if (!copied) return void 0;
|
|
17
|
+
const timer = setTimeout(setCopied, FEEDBACK_MS, false);
|
|
18
|
+
return () => clearTimeout(timer);
|
|
19
|
+
}, [copied]);
|
|
20
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("button", {
|
|
21
|
+
...tip.anchorProps,
|
|
22
|
+
type: "button",
|
|
23
|
+
"aria-label": `${label}: ${text}`,
|
|
24
|
+
className: `group/copy flex max-w-full items-center gap-1 min-w-0 p-0 border-0 bg-transparent cursor-pointer text-[var(--zg-text-muted)] hover:text-[var(--zg-text)] zg-focus-ring rounded-zg-sm ${className}`.trimEnd(),
|
|
25
|
+
style,
|
|
26
|
+
onClick: (event) => {
|
|
27
|
+
event.stopPropagation();
|
|
28
|
+
navigator.clipboard.writeText(text).then(() => setCopied(true)).catch(() => void 0);
|
|
29
|
+
},
|
|
30
|
+
children: [
|
|
31
|
+
icon && /* @__PURE__ */ jsx("span", {
|
|
32
|
+
"aria-hidden": true,
|
|
33
|
+
className: `${icon} text-zg-meta shrink-0`
|
|
34
|
+
}),
|
|
35
|
+
/* @__PURE__ */ jsx("span", {
|
|
36
|
+
dir: "auto",
|
|
37
|
+
className: "zg-meta truncate",
|
|
38
|
+
children: text
|
|
39
|
+
}),
|
|
40
|
+
/* @__PURE__ */ jsx("span", {
|
|
41
|
+
className: `inline-flex shrink-0 transition-opacity duration-150 ${copied ? "opacity-100" : glyph === "always" ? "opacity-40 group-hover/copy:opacity-80" : "opacity-0 group-hover/copy:opacity-60 group-focus-visible/copy:opacity-60"}`,
|
|
42
|
+
children: /* @__PURE__ */ jsx(SwapIcon, {
|
|
43
|
+
icons: {
|
|
44
|
+
copy: "i-ph-copy",
|
|
45
|
+
done: "i-ph-check text-zg-success"
|
|
46
|
+
},
|
|
47
|
+
current: copied ? "done" : "copy",
|
|
48
|
+
className: "text-zg-meta"
|
|
49
|
+
})
|
|
50
|
+
})
|
|
51
|
+
]
|
|
52
|
+
}), tip.tip] });
|
|
53
|
+
}
|
|
54
|
+
export { CopyValue };
|
package/dist/components/Form.js
CHANGED
|
@@ -103,7 +103,7 @@ function RowText({ label, description, truncate = true, className, style }) {
|
|
|
103
103
|
className: "text-sm text-[var(--zg-text)]",
|
|
104
104
|
children: label
|
|
105
105
|
}), description && /* @__PURE__ */ jsx("div", {
|
|
106
|
-
className: `text-xs text-[var(--zg-text-muted)] ${truncate ? "truncate" : "
|
|
106
|
+
className: `text-xs text-[var(--zg-text-muted)] ${truncate ? "truncate" : ""}`,
|
|
107
107
|
children: description
|
|
108
108
|
})]
|
|
109
109
|
});
|
|
@@ -75,7 +75,7 @@ function StepText({ number, step, ring }) {
|
|
|
75
75
|
className: "zg-how-step-title text-zg-ui",
|
|
76
76
|
children: step.title
|
|
77
77
|
}), step.detail && /* @__PURE__ */ jsx("span", {
|
|
78
|
-
className: "text-zg-label text-[var(--zg-text-muted)]
|
|
78
|
+
className: "text-zg-label text-[var(--zg-text-muted)]",
|
|
79
79
|
children: step.detail
|
|
80
80
|
})]
|
|
81
81
|
})] });
|
package/dist/components/Menu.js
CHANGED
|
@@ -218,7 +218,7 @@ function MenuNote({ icon, children, className = "", style }) {
|
|
|
218
218
|
"aria-hidden": true,
|
|
219
219
|
className: `${icon} text-zg-label shrink-0 mt-px`
|
|
220
220
|
}), /* @__PURE__ */ jsx("span", {
|
|
221
|
-
className: "min-w-0
|
|
221
|
+
className: "min-w-0",
|
|
222
222
|
children
|
|
223
223
|
})]
|
|
224
224
|
});
|
|
@@ -29,7 +29,7 @@ function StepFrame({ eyebrow, title, lede, aside, footer, className = "", childr
|
|
|
29
29
|
children: title
|
|
30
30
|
}),
|
|
31
31
|
lede && /* @__PURE__ */ jsx("p", {
|
|
32
|
-
className: "m-0 text-zg-ui text-[var(--zg-text-muted)]
|
|
32
|
+
className: "m-0 text-zg-ui text-[var(--zg-text-muted)]",
|
|
33
33
|
children: lede
|
|
34
34
|
})
|
|
35
35
|
]
|
|
@@ -78,7 +78,7 @@ function StepActions({ onBack, onSkip, skipLabel, onContinue, continueLabel, con
|
|
|
78
78
|
className: "ml-auto flex items-center gap-2 min-w-0",
|
|
79
79
|
children: [
|
|
80
80
|
note && /* @__PURE__ */ jsx("span", {
|
|
81
|
-
className: "min-w-0 text-right text-zg-label text-[var(--zg-text-muted)]
|
|
81
|
+
className: "min-w-0 text-right text-zg-label text-[var(--zg-text-muted)]",
|
|
82
82
|
children: note
|
|
83
83
|
}),
|
|
84
84
|
onSkip && /* @__PURE__ */ jsx("button", {
|
|
@@ -72,7 +72,7 @@ function SwatchPicker({ value, onChange, options, ariaLabel, shape = "dot", colu
|
|
|
72
72
|
children: caption ? caption(named) : named.label
|
|
73
73
|
}),
|
|
74
74
|
note && /* @__PURE__ */ jsx("p", {
|
|
75
|
-
className: "m-0 -mt-1.5 px-1 text-zg-label text-[var(--zg-text-muted)]
|
|
75
|
+
className: "m-0 -mt-1.5 px-1 text-zg-label text-[var(--zg-text-muted)]",
|
|
76
76
|
children: note
|
|
77
77
|
})
|
|
78
78
|
]
|
|
@@ -30,7 +30,7 @@ function ToggleCard({ title, description, checked, onChange, badges, icon, lead,
|
|
|
30
30
|
})]
|
|
31
31
|
}), description && /* @__PURE__ */ jsx("span", {
|
|
32
32
|
id: `${id}-description`,
|
|
33
|
-
className: `${asRow ? "text-xs" : "text-zg-label"} text-[var(--zg-text-muted)]
|
|
33
|
+
className: `${asRow ? "text-xs" : "text-zg-label"} text-[var(--zg-text-muted)]`,
|
|
34
34
|
children: description
|
|
35
35
|
})]
|
|
36
36
|
}),
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { FloatingSurface } from "./FloatingSurface.js";
|
|
2
|
+
import "./hover-delay.js";
|
|
2
3
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
3
4
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
4
5
|
// src/components/floating/HoverCard.tsx
|
|
5
|
-
const OPEN_MS = 250;
|
|
6
|
-
const CLOSE_MS = 150;
|
|
7
6
|
/**
|
|
8
7
|
* Renders a trigger and a card that opens while the trigger is hovered or focused. The card
|
|
9
8
|
* opens after 250 ms, so sweeping the pointer across a list opens nothing, and stays open
|
|
@@ -19,7 +18,7 @@ function HoverCard({ trigger, children, side = "right", align = "start", width,
|
|
|
19
18
|
const timer = useRef(void 0);
|
|
20
19
|
const schedule = useCallback((next) => {
|
|
21
20
|
window.clearTimeout(timer.current);
|
|
22
|
-
timer.current = window.setTimeout(setOpen, next ?
|
|
21
|
+
timer.current = window.setTimeout(setOpen, next ? 250 : 150, next);
|
|
23
22
|
}, []);
|
|
24
23
|
const stay = useCallback(() => window.clearTimeout(timer.current), []);
|
|
25
24
|
useEffect(() => () => window.clearTimeout(timer.current), []);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// src/components/floating/hover-delay.ts
|
|
2
|
+
/** The hover card's intent delay: sweeping the pointer across a list opens nothing. */
|
|
3
|
+
const HOVER_CARD_OPEN_MS = 250;
|
|
4
|
+
/** The hover card's close delay once the pointer and focus have left it. */
|
|
5
|
+
const HOVER_CARD_CLOSE_MS = 150;
|
|
6
|
+
export { HOVER_CARD_CLOSE_MS, HOVER_CARD_OPEN_MS };
|
package/dist/core.css
CHANGED
|
@@ -21,11 +21,13 @@
|
|
|
21
21
|
.i-ph-circle-half-fill{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' height='1em' width='1em' display='inline-block' vertical-align='middle' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24M40 128a88.1 88.1 0 0 1 88-88v176a88.1 88.1 0 0 1-88-88'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;height:1em;width:1em;display:inline-block;vertical-align:middle;}
|
|
22
22
|
.i-ph-circle-notch{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' height='1em' width='1em' display='inline-block' vertical-align='middle' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M232 128a104 104 0 0 1-208 0c0-41 23.81-78.36 60.66-95.27a8 8 0 0 1 6.68 14.54C60.15 61.59 40 93.27 40 128a88 88 0 0 0 176 0c0-34.73-20.15-66.41-51.34-80.73a8 8 0 0 1 6.68-14.54C208.19 49.64 232 87 232 128'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;height:1em;width:1em;display:inline-block;vertical-align:middle;}
|
|
23
23
|
.i-ph-clipboard{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' height='1em' width='1em' display='inline-block' vertical-align='middle' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M200 32h-36.26a47.92 47.92 0 0 0-71.48 0H56a16 16 0 0 0-16 16v168a16 16 0 0 0 16 16h144a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16m-72 0a32 32 0 0 1 32 32H96a32 32 0 0 1 32-32m72 184H56V48h26.75A47.9 47.9 0 0 0 80 64v8a8 8 0 0 0 8 8h80a8 8 0 0 0 8-8v-8a47.9 47.9 0 0 0-2.75-16H200Z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;height:1em;width:1em;display:inline-block;vertical-align:middle;}
|
|
24
|
+
.i-ph-copy{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' height='1em' width='1em' display='inline-block' vertical-align='middle' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M216 32H88a8 8 0 0 0-8 8v40H40a8 8 0 0 0-8 8v128a8 8 0 0 0 8 8h128a8 8 0 0 0 8-8v-40h40a8 8 0 0 0 8-8V40a8 8 0 0 0-8-8m-56 176H48V96h112Zm48-48h-32V88a8 8 0 0 0-8-8H96V48h112Z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;height:1em;width:1em;display:inline-block;vertical-align:middle;}
|
|
24
25
|
.i-ph-dot-outline{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' height='1em' width='1em' display='inline-block' vertical-align='middle' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M128 96a32 32 0 1 0 32 32a32 32 0 0 0-32-32m0 48a16 16 0 1 1 16-16a16 16 0 0 1-16 16'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;height:1em;width:1em;display:inline-block;vertical-align:middle;}
|
|
25
26
|
.i-ph-dots-three-bold{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' height='1em' width='1em' display='inline-block' vertical-align='middle' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M144 128a16 16 0 1 1-16-16a16 16 0 0 1 16 16m-84-16a16 16 0 1 0 16 16a16 16 0 0 0-16-16m136 0a16 16 0 1 0 16 16a16 16 0 0 0-16-16'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;height:1em;width:1em;display:inline-block;vertical-align:middle;}
|
|
26
27
|
.i-ph-file-code{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' height='1em' width='1em' display='inline-block' vertical-align='middle' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M181.66 146.34a8 8 0 0 1 0 11.32l-24 24a8 8 0 0 1-11.32-11.32L164.69 152l-18.35-18.34a8 8 0 0 1 11.32-11.32Zm-72-24a8 8 0 0 0-11.32 0l-24 24a8 8 0 0 0 0 11.32l24 24a8 8 0 0 0 11.32-11.32L91.31 152l18.35-18.34a8 8 0 0 0 0-11.32M216 88v128a16 16 0 0 1-16 16H56a16 16 0 0 1-16-16V40a16 16 0 0 1 16-16h96a8 8 0 0 1 5.66 2.34l56 56A8 8 0 0 1 216 88m-56-8h28.69L160 51.31Zm40 136V96h-48a8 8 0 0 1-8-8V40H56v176z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;height:1em;width:1em;display:inline-block;vertical-align:middle;}
|
|
27
28
|
.i-ph-files{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' height='1em' width='1em' display='inline-block' vertical-align='middle' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m213.66 66.34l-40-40A8 8 0 0 0 168 24H88a16 16 0 0 0-16 16v16H56a16 16 0 0 0-16 16v144a16 16 0 0 0 16 16h112a16 16 0 0 0 16-16v-16h16a16 16 0 0 0 16-16V72a8 8 0 0 0-2.34-5.66M168 216H56V72h76.69L168 107.31zm32-32h-16v-80a8 8 0 0 0-2.34-5.66l-40-40A8 8 0 0 0 136 56H88V40h76.69L200 75.31Zm-56-32a8 8 0 0 1-8 8H88a8 8 0 0 1 0-16h48a8 8 0 0 1 8 8m0 32a8 8 0 0 1-8 8H88a8 8 0 0 1 0-16h48a8 8 0 0 1 8 8'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;height:1em;width:1em;display:inline-block;vertical-align:middle;}
|
|
28
29
|
.i-ph-funnel-simple{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' height='1em' width='1em' display='inline-block' vertical-align='middle' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M200 136a8 8 0 0 1-8 8H64a8 8 0 0 1 0-16h128a8 8 0 0 1 8 8m32-56H24a8 8 0 0 0 0 16h208a8 8 0 0 0 0-16m-80 96h-48a8 8 0 0 0 0 16h48a8 8 0 0 0 0-16'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;height:1em;width:1em;display:inline-block;vertical-align:middle;}
|
|
30
|
+
.i-ph-git-branch{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' height='1em' width='1em' display='inline-block' vertical-align='middle' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M232 64a32 32 0 1 0-40 31v17a8 8 0 0 1-8 8H96a23.8 23.8 0 0 0-8 1.38V95a32 32 0 1 0-16 0v66a32 32 0 1 0 16 0v-17a8 8 0 0 1 8-8h88a24 24 0 0 0 24-24V95a32.06 32.06 0 0 0 24-31M64 64a16 16 0 1 1 16 16a16 16 0 0 1-16-16m32 128a16 16 0 1 1-16-16a16 16 0 0 1 16 16M200 80a16 16 0 1 1 16-16a16 16 0 0 1-16 16'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;height:1em;width:1em;display:inline-block;vertical-align:middle;}
|
|
29
31
|
.i-ph-globe-simple{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' height='1em' width='1em' display='inline-block' vertical-align='middle' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M128 24a104 104 0 1 0 104 104A104.12 104.12 0 0 0 128 24m87.62 96h-39.83c-1.79-36.51-15.85-62.33-27.38-77.6a88.19 88.19 0 0 1 67.22 77.6ZM96.23 136h63.54c-2.31 41.61-22.23 67.11-31.77 77c-9.55-9.9-29.46-35.4-31.77-77m0-16c2.31-41.61 22.23-67.11 31.77-77c9.55 9.93 29.46 35.43 31.77 77Zm11.36-77.6C96.06 57.67 82 83.49 80.21 120H40.37a88.19 88.19 0 0 1 67.22-77.6M40.37 136h39.84c1.82 36.51 15.85 62.33 27.38 77.6A88.19 88.19 0 0 1 40.37 136m108 77.6c11.53-15.27 25.56-41.09 27.38-77.6h39.84a88.19 88.19 0 0 1-67.18 77.6Z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;height:1em;width:1em;display:inline-block;vertical-align:middle;}
|
|
30
32
|
.i-ph-info{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' height='1em' width='1em' display='inline-block' vertical-align='middle' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m0 192a88 88 0 1 1 88-88a88.1 88.1 0 0 1-88 88m16-40a8 8 0 0 1-8 8a16 16 0 0 1-16-16v-40a8 8 0 0 1 0-16a16 16 0 0 1 16 16v40a8 8 0 0 1 8 8m-32-92a12 12 0 1 1 12 12a12 12 0 0 1-12-12'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;height:1em;width:1em;display:inline-block;vertical-align:middle;}
|
|
31
33
|
.i-ph-lock-simple{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' height='1em' width='1em' display='inline-block' vertical-align='middle' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M208 80h-32V56a48 48 0 0 0-96 0v24H48a16 16 0 0 0-16 16v112a16 16 0 0 0 16 16h160a16 16 0 0 0 16-16V96a16 16 0 0 0-16-16M96 56a32 32 0 0 1 64 0v24H96Zm112 152H48V96h160z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;height:1em;width:1em;display:inline-block;vertical-align:middle;}
|
|
@@ -397,7 +399,6 @@
|
|
|
397
399
|
.text-left{text-align:left;}
|
|
398
400
|
.text-right{text-align:right;}
|
|
399
401
|
.text-balance{text-wrap:balance;}
|
|
400
|
-
.text-pretty{text-wrap:pretty;}
|
|
401
402
|
.align-middle{vertical-align:middle;}
|
|
402
403
|
.text-\[10px\]{font-size:10px;}
|
|
403
404
|
.text-\[15px\]{font-size:15px;}
|
|
@@ -461,8 +462,11 @@
|
|
|
461
462
|
.underline-offset-2{text-underline-offset:2px;}
|
|
462
463
|
.tab{-moz-tab-size:4;-o-tab-size:4;tab-size:4;}
|
|
463
464
|
.opacity-0{opacity:0;}
|
|
464
|
-
.opacity-
|
|
465
|
+
.opacity-100,
|
|
465
466
|
.group:focus-within .group-focus-within\:opacity-100{opacity:1;}
|
|
467
|
+
.opacity-40{opacity:0.4;}
|
|
468
|
+
.opacity-60,
|
|
469
|
+
.group\/copy:focus-visible .group-focus-visible\/copy\:opacity-60{opacity:0.6;}
|
|
466
470
|
.shadow{--un-shadow:var(--un-shadow-inset) 0 1px 3px 0 var(--un-shadow-color, rgb(0 0 0 / 0.1)),var(--un-shadow-inset) 0 1px 2px -1px var(--un-shadow-color, rgb(0 0 0 / 0.1));box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow);}
|
|
467
471
|
.shadow-\[inset_-1px_0_0_var\(--zg-hairline\)\]{--un-shadow:inset -1px 0 0 var(--un-shadow-color, var(--zg-hairline));box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow);}
|
|
468
472
|
.shadow-\[inset_0_-1px_0_var\(--zg-hairline\)\]{--un-shadow:inset 0 -1px 0 var(--un-shadow-color, var(--zg-hairline));box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow);}
|
|
@@ -488,6 +492,7 @@
|
|
|
488
492
|
.transition-\[background-color\,box-shadow\]{transition-property:background-color,box-shadow;transition-timing-function:var(--zg-motion-hover-ease);transition-duration:var(--zg-motion-hover-duration);}
|
|
489
493
|
.transition-\[transform\,background-color\]{transition-property:transform,background-color;transition-timing-function:var(--zg-motion-hover-ease);transition-duration:var(--zg-motion-hover-duration);}
|
|
490
494
|
.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:var(--zg-motion-hover-ease);transition-duration:var(--zg-motion-hover-duration);}
|
|
495
|
+
.transition-opacity{transition-property:opacity;transition-timing-function:var(--zg-motion-hover-ease);transition-duration:var(--zg-motion-hover-duration);}
|
|
491
496
|
.duration-150{transition-duration:150ms;}
|
|
492
497
|
.duration-pop{transition-duration:var(--zg-motion-pop-duration);}
|
|
493
498
|
.duration-snap{transition-duration:var(--zg-motion-snap-duration);}
|
|
@@ -518,6 +523,8 @@
|
|
|
518
523
|
.hover\:\!text-zg-danger:hover{color:var(--zg-danger) !important;}
|
|
519
524
|
.hover\:text-\[var\(--zg-text\)\]:hover{color:var(--zg-text);}
|
|
520
525
|
.group:hover .group-hover\:opacity-100{opacity:1;}
|
|
526
|
+
.group\/copy:hover .group-hover\/copy\:opacity-60{opacity:0.6;}
|
|
527
|
+
.group\/copy:hover .group-hover\/copy\:opacity-80{opacity:0.8;}
|
|
521
528
|
.hover\:before\:bg-zg-danger\/10:hover::before{background-color:color-mix(in srgb, var(--zg-danger) 10%, transparent);}
|
|
522
529
|
}
|
|
523
530
|
@media (min-width: 640px){
|
|
@@ -676,6 +683,11 @@
|
|
|
676
683
|
--zg-radius-xl: 16px;
|
|
677
684
|
--zg-radius-2xl: 24px;
|
|
678
685
|
|
|
686
|
+
/* The transcript's and the composer's columns pad their sides by this
|
|
687
|
+
(`.zg-transcript-column`), so both keep one edge and the prompt rail
|
|
688
|
+
(`TranscriptRail`) has room beside the text whether it shows or not. */
|
|
689
|
+
--zg-transcript-gutter: 12px;
|
|
690
|
+
|
|
679
691
|
/* Interface type scale: every size outside the transcript and composer
|
|
680
692
|
bodies comes from it, never ad hoc (scale-guard.test.ts). In Uno:
|
|
681
693
|
`text-zg-badge` … `text-zg-body` (font-size only, line-height untouched).
|
|
@@ -2560,16 +2572,6 @@ html[data-motion='reduced'] .zg-attention::after {
|
|
|
2560
2572
|
0 0 0 2px var(--zg-bg),
|
|
2561
2573
|
0 0 0 4px var(--zg-ring);
|
|
2562
2574
|
}
|
|
2563
|
-
/* `text-wrap: balance` keeps short headings on roughly equal-width lines
|
|
2564
|
-
(no orphan words). Applied via class to opt-in surfaces — modals,
|
|
2565
|
-
session titles — so body copy keeps its default flow. */
|
|
2566
|
-
.zg-balance {
|
|
2567
|
-
text-wrap: balance;
|
|
2568
|
-
}
|
|
2569
|
-
/* `text-wrap: pretty` avoids single-word orphan lines in body copy. */
|
|
2570
|
-
.zg-pretty {
|
|
2571
|
-
text-wrap: pretty;
|
|
2572
|
-
}
|
|
2573
2575
|
/* Segment spinner (`SegmentSpinner.tsx`) — GUI twin of the TUI `▀▁▁▁▁` bar.
|
|
2574
2576
|
Each pill is lit for the first half of an 800 ms cycle and dim for the
|
|
2575
2577
|
rest; per-pill `animation-delay` (i × 80 ms) produces the fill → drain
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import "./
|
|
1
|
+
import "./execution-failure-SREfl-EZ.js";
|
|
2
|
+
import "./timeout-CmTx6V9y.js";
|
|
3
|
+
import "./sandbox-CSUihARm.js";
|
|
2
4
|
import "./oauth-callback-page-CV9oTMGy.js";
|
|
3
5
|
import "../node_modules/.bun/hookable@6.1.2/node_modules/hookable/dist/index.js";
|
|
4
6
|
import "../node_modules/.bun/@earendil-works_pi-ai@1.5.2_46b80fae64c053ae/node_modules/@earendil-works/pi-ai/dist/index.js";
|
|
@@ -329,6 +331,8 @@ interface Space$1 {
|
|
|
329
331
|
modelId?: string;
|
|
330
332
|
/** The stored account of {@link providerKey} the default runs on (credential id); absent = its active account. */
|
|
331
333
|
account?: string;
|
|
334
|
+
/** The label of {@link account}: another device runs the default on its account of that label (`resolveSpaceAccount`). */
|
|
335
|
+
accountLabel?: string;
|
|
332
336
|
/** Fallback chain seeded with the default model (`provider`/`model` pairs). */
|
|
333
337
|
fallbacks?: {
|
|
334
338
|
providerKey: string;
|
|
@@ -690,6 +694,13 @@ interface Settings {
|
|
|
690
694
|
* normalized (`normalizeSpaces`); ignored while {@link spaces} is off.
|
|
691
695
|
*/
|
|
692
696
|
spaceList: Space$1[];
|
|
697
|
+
/**
|
|
698
|
+
* Where this computer's spaces come from: `''` or `'local'` for its own
|
|
699
|
+
* list, else a saved server's id (its home server). With a home server,
|
|
700
|
+
* {@link spaces} and {@link spaceList} mirror the server's (`spaces.get`)
|
|
701
|
+
* and edits go to it one space at a time (`./spaces-home`). Window-only.
|
|
702
|
+
*/
|
|
703
|
+
spacesHome: string;
|
|
693
704
|
/**
|
|
694
705
|
* Auto-resume the previously-active session on launch. Default: on.
|
|
695
706
|
* When off, the TUI always lands on the sessions list (or a fresh
|
|
@@ -1206,6 +1217,14 @@ interface Settings {
|
|
|
1206
1217
|
* window until it reloads. Default: on.
|
|
1207
1218
|
*/
|
|
1208
1219
|
preserveScroll: boolean;
|
|
1220
|
+
/**
|
|
1221
|
+
* The desktop and web apps show the prompt rail beside a conversation: one
|
|
1222
|
+
* tick per message you sent, the one in view raised. Hovering a tick
|
|
1223
|
+
* previews the message and its answer; a click (or the previous / next
|
|
1224
|
+
* prompt keys) scrolls to it. The column keeps room for it either way, so
|
|
1225
|
+
* turning it on moves nothing. Default: off.
|
|
1226
|
+
*/
|
|
1227
|
+
transcriptRail: boolean;
|
|
1209
1228
|
/**
|
|
1210
1229
|
* The desktop and web apps draw a reply's ```mermaid fences as diagrams
|
|
1211
1230
|
* (Pele, themed with the app's colors and fonts), each with a toggle to
|
|
@@ -1661,4 +1680,4 @@ interface Settings {
|
|
|
1661
1680
|
*/
|
|
1662
1681
|
activeIcon: string;
|
|
1663
1682
|
}
|
|
1664
|
-
export {
|
|
1683
|
+
export { ScriptLineProgress as $A, DurabilityMode as $F, TaskOutcomeCounts as AM, AnsiSpan as Dj, EditDiffDisplay as EO, OpenInTarget as FO, NewChatPlace as Fj, ToolCallDisplay as JO, MessageDelivery as MO, AnsiStyle as Oj, ScriptCallStatus as QA, SessionSort as SL, OutputStream as Sj, ApprovalMode as TO, AnsiColor as Tj, Settings as UO, SidebarLayout as WO, TranscriptDensity as XO, ViewsMcp as ZO, QueryBound as aL, ScriptProgress as aj, SessionQueryNot as bL, SessionFieldName as cL, SessionGroupBy as dL, SessionGroupOrder as fL, SessionQueryAny as gL, SessionQueryAll as hL, McpJobViewStatus as hN, FacetPath as iL, ScriptOutputLine as ij, InteractionMode as jO, TaskOutcome as kM, SecretTtl as kR, SessionFieldPath as lL, SessionQuery as mL, McpJobView as mN, QueryValue as oL, EnvironmentConfigValue as oP, Space$1 as ok, SessionCondition as sL, ThinkingLevel as sU, SpaceIcon as sk, EnvironmentSettings as wN, OutputLine as xj };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./execution-failure-SREfl-EZ.js";
|
package/dist/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
4
|
-
import "./index-
|
|
5
|
-
import "./sandbox-
|
|
1
|
+
import { SL as SessionSort, aL as QueryBound, bL as SessionQueryNot, cL as SessionFieldName, dL as SessionGroupBy, fL as SessionGroupOrder, gL as SessionQueryAny, hL as SessionQueryAll, iL as FacetPath, lL as SessionFieldPath, mL as SessionQuery, oL as QueryValue, oP as EnvironmentConfigValue, sL as SessionCondition, sU as ThinkingLevel } from "./index-C6-t1SS9.js";
|
|
2
|
+
import "./execution-failure-SREfl-EZ.js";
|
|
3
|
+
import { d as AuthFailureKind, u as AuthFailure } from "./timeout-CmTx6V9y.js";
|
|
4
|
+
import "./index-De9AbmxS.js";
|
|
5
|
+
import "./sandbox-CSUihARm.js";
|
|
6
6
|
import "./oauth-callback-page-CV9oTMGy.js";
|
|
@@ -153,7 +153,7 @@ function ConfirmView({ request, onAnswer }) {
|
|
|
153
153
|
})]
|
|
154
154
|
}),
|
|
155
155
|
children: request.message && /* @__PURE__ */ jsx("p", {
|
|
156
|
-
className: "m-0 text-zg-ui text-[var(--zg-text-muted)]
|
|
156
|
+
className: "m-0 text-zg-ui text-[var(--zg-text-muted)]",
|
|
157
157
|
children: request.message
|
|
158
158
|
})
|
|
159
159
|
});
|
package/dist/files/TreeColumn.js
CHANGED
|
@@ -4,7 +4,7 @@ import { IconToggle } from "../components/IconToggle.js";
|
|
|
4
4
|
import { Notice } from "../components/Notice.js";
|
|
5
5
|
import { PanelEmpty, PanelLoading } from "../components/PanelEmpty.js";
|
|
6
6
|
import { useResizeDrag } from "../hooks/useResizeDrag.js";
|
|
7
|
-
import { readPanelMs, usePresence } from "../motion/presence.js";
|
|
7
|
+
import { readPanelMs, usePanelSettled, usePresence } from "../motion/presence.js";
|
|
8
8
|
import { useFilesLabels } from "./useFilesLabels.js";
|
|
9
9
|
import { memo, useEffect, useRef, useState } from "react";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -24,6 +24,7 @@ const TreeColumn = memo((p) => {
|
|
|
24
24
|
exitMs: readPanelMs,
|
|
25
25
|
key: p.scopeKey
|
|
26
26
|
});
|
|
27
|
+
const settled = usePanelSettled(presence.state);
|
|
27
28
|
const labels = useFilesLabels();
|
|
28
29
|
const colRef = useRef(null);
|
|
29
30
|
const drag = useResizeDrag({
|
|
@@ -54,6 +55,7 @@ const TreeColumn = memo((p) => {
|
|
|
54
55
|
ref: colRef,
|
|
55
56
|
className: "zg-files-tree relative shrink-0 min-h-0",
|
|
56
57
|
"data-collapsed": presence.state !== "open",
|
|
58
|
+
"data-settled": settled || void 0,
|
|
57
59
|
"data-side": p.side,
|
|
58
60
|
style: { "--zg-files-tree-w": `${p.width}px` },
|
|
59
61
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
@@ -127,8 +127,8 @@ export interface FilesScope {
|
|
|
127
127
|
/** Where a bound session's files live when they are not on this machine (`zidane-env://…`). */
|
|
128
128
|
workspace?: string;
|
|
129
129
|
}
|
|
130
|
-
/** Why a folder may have changed: a tool result in it, or the
|
|
131
|
-
export type FolderChange = 'tool-result' | 'git';
|
|
130
|
+
/** Why a folder may have changed: a tool result in it, the repository moving, or the environment it lives in waking up (a paused sandbox, up again). */
|
|
131
|
+
export type FolderChange = 'tool-result' | 'git' | 'environment';
|
|
132
132
|
/** The severity of a finding. */
|
|
133
133
|
export type DiagnosticSeverity = 'error' | 'warning' | 'info' | 'hint';
|
|
134
134
|
/** One finding from a project tool or a language server, positions 1-based like editors show them. */
|
|
@@ -304,7 +304,7 @@ function RepoCard({ info, branch }) {
|
|
|
304
304
|
]
|
|
305
305
|
}),
|
|
306
306
|
info.description && /* @__PURE__ */ jsx("p", {
|
|
307
|
-
className: "m-0 text-zg-label text-[var(--zg-text-muted)]
|
|
307
|
+
className: "m-0 text-zg-label text-[var(--zg-text-muted)] line-clamp-2",
|
|
308
308
|
children: info.description
|
|
309
309
|
})
|
|
310
310
|
]
|