zidane-ui 9.1.13 → 9.1.14
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 -2
- package/dist/adapters/index.js +2 -2
- package/dist/adapters/live.d.ts +29 -3
- package/dist/adapters/live.js +9 -1
- package/dist/adapters/server-composer-host.js +17 -2
- package/dist/adapters/server-extensions-host.d.ts +0 -1
- package/dist/adapters/server-extensions-host.js +5 -16
- package/dist/adapters/server-git-host.js +7 -16
- package/dist/adapters/server-host.js +181 -43
- package/dist/adapters/server-machines-host.d.ts +2 -0
- package/dist/adapters/server-machines-host.js +24 -25
- package/dist/adapters/server-onboarding-host.d.ts +1 -1
- package/dist/adapters/server-onboarding-host.js +3 -4
- package/dist/adapters/server-session-host.js +22 -3
- package/dist/adapters/server-settings-accounts.js +2 -2
- package/dist/adapters/server-settings-host.js +3 -3
- package/dist/adapters/server-settings-performance.js +7 -9
- package/dist/adapters/server-settings-sections.js +13 -14
- package/dist/adapters/server-sidebar-host.js +2 -2
- package/dist/adapters/sse-host.js +68 -3
- package/dist/adapters/sse-protocol.d.ts +12 -2
- package/dist/adapters/sse-protocol.js +4 -2
- package/dist/app/AppHostProvider.js +4 -3
- package/dist/app/ModalProvider.d.ts +13 -3
- package/dist/app/ModalProvider.js +103 -24
- package/dist/app/NoticeStack.d.ts +33 -0
- package/dist/app/NoticeStack.js +90 -0
- package/dist/app/index.d.ts +3 -2
- package/dist/app/index.js +3 -2
- package/dist/appearance/AppearanceProvider.js +2 -2
- package/dist/appearance/headless/index.js +1 -1
- package/dist/approvals/headless/index.js +2 -2
- package/dist/chat/SessionFilterMenu.d.ts +1 -1
- package/dist/chat/SessionFilterMenu.js +2 -1
- package/dist/chat/Transcript.js +1 -1
- package/dist/chat/composer/Composer.js +9 -6
- package/dist/chat/composer/ComposerEditor.js +1 -1
- package/dist/chat/composer/ConversationBadges.js +1 -1
- package/dist/chat/composer/ModelChainList.js +17 -8
- package/dist/chat/composer/ModelChainTooltip.js +5 -2
- package/dist/chat/composer/use-composer-stores.js +1 -1
- package/dist/chat/composer/use-draft-target.d.ts +20 -1
- package/dist/chat/composer/use-draft-target.js +122 -6
- package/dist/chat/composer/use-new-session-defaults.d.ts +5 -1
- package/dist/chat/composer/use-new-session-defaults.js +17 -4
- package/dist/chat/composer/use-run-meter.js +1 -1
- package/dist/chat/composer/use-send-prompt.js +1 -1
- package/dist/chat/headless/chip-labels.d.ts +1 -0
- package/dist/chat/headless/chip-labels.js +1 -0
- package/dist/chat/headless/composer/index.js +2 -2
- package/dist/chat/headless/draft-target.d.ts +21 -1
- package/dist/chat/headless/fixture-host.js +17 -2
- package/dist/chat/headless/host.d.ts +3 -3
- package/dist/chat/headless/index.d.ts +9 -9
- package/dist/chat/headless/index.js +15 -15
- package/dist/chat/headless/labels.d.ts +13 -4
- package/dist/chat/headless/labels.js +8 -5
- package/dist/chat/headless/session-list.d.ts +20 -6
- package/dist/chat/headless/session-list.js +1 -0
- package/dist/chat/headless/sidebar/directory.d.ts +56 -14
- package/dist/chat/headless/sidebar/directory.js +149 -70
- package/dist/chat/headless/sidebar/index.d.ts +3 -3
- package/dist/chat/headless/sidebar/index.js +3 -3
- package/dist/chat/headless/sidebar/labels.d.ts +15 -6
- package/dist/chat/headless/sidebar/types.d.ts +3 -1
- package/dist/chat/headless/sidebar/view.d.ts +13 -5
- package/dist/chat/headless/sidebar/view.js +31 -11
- package/dist/chat/headless/streams/actions.d.ts +5 -3
- package/dist/chat/headless/streams/actions.js +3 -2
- package/dist/chat/headless/streams/index.d.ts +3 -3
- package/dist/chat/headless/streams/merge.d.ts +6 -10
- package/dist/chat/headless/streams/merge.js +7 -21
- package/dist/chat/headless/streams/session-streams.d.ts +29 -4
- package/dist/chat/headless/streams/session-streams.js +86 -0
- package/dist/chat/headless/streams/store.d.ts +162 -16
- package/dist/chat/headless/streams/store.js +334 -38
- package/dist/chat/headless/streams/types.d.ts +10 -7
- package/dist/chat/headless/transcript-labels.d.ts +1 -0
- package/dist/chat/interactions/PlanCard.js +10 -3
- package/dist/chat/interactions/QuestionForm.js +7 -3
- package/dist/chat/interactions/card-ui.d.ts +5 -3
- package/dist/chat/interactions/card-ui.js +9 -7
- package/dist/chat/sidebar/SessionSidebar.js +5 -5
- package/dist/chat/sidebar/SidebarFilterMenu.js +3 -1
- package/dist/chat/sidebar/SidebarFrame.d.ts +4 -0
- package/dist/chat/sidebar/SidebarFrame.js +27 -9
- package/dist/chat/sidebar/SidebarGroupHeader.js +1 -1
- package/dist/chat/sidebar/SidebarHostProvider.d.ts +8 -5
- package/dist/chat/sidebar/SidebarHostProvider.js +13 -9
- package/dist/chat/sidebar/SidebarToggleButton.js +7 -3
- package/dist/chat/sidebar/index.d.ts +2 -2
- package/dist/chat/sidebar/session-menu.js +4 -4
- package/dist/chat/sidebar/useSaveViewAsSpace.js +2 -2
- package/dist/chat/testing/contract.js +2 -2
- package/dist/chat/transcript/AuthFailureCard.js +11 -8
- package/dist/chat/transcript/BadgeMenu.js +13 -2
- package/dist/chat/transcript/MermaidDiagram.js +7 -3
- package/dist/chat/transcript/fold.d.ts +4 -0
- package/dist/chat/transcript/fold.js +53 -22
- package/dist/chat/transcript/script-input.d.ts +1 -1
- package/dist/chat/transcript/shell-block.js +8 -4
- package/dist/chat/transcript/useStickToBottom.js +12 -0
- package/dist/components/BrowserSignIn.js +23 -21
- package/dist/components/Form.d.ts +6 -4
- package/dist/components/Form.js +16 -8
- package/dist/components/LoadError.d.ts +4 -2
- package/dist/components/LoadError.js +13 -9
- package/dist/components/Notice.d.ts +29 -0
- package/dist/components/Notice.js +63 -0
- package/dist/components/PanelEmpty.d.ts +1 -1
- package/dist/components/PanelEmpty.js +4 -2
- package/dist/components/Restricted.d.ts +1 -1
- package/dist/components/palette/PaletteList.js +8 -1
- package/dist/components/palette/PalettePanel.js +14 -6
- package/dist/core.css +24 -5
- package/dist/dist/{index-Bq87OcGy.d.ts → index-C6rzc-tt.d.ts} +28 -3
- package/dist/dist/index.d.ts +2 -2
- package/dist/dist/{timeout-B5pO5I5a.d.ts → timeout-Cz9dRF8Q.d.ts} +1 -1
- package/dist/extensions/ExtensionSettingsPage.js +2 -5
- package/dist/extensions/ExtensionSettingsSection.js +5 -4
- package/dist/extensions/ExtensionSettingsSidebar.js +3 -7
- package/dist/extensions/SettingsWireForm.d.ts +1 -7
- package/dist/extensions/SettingsWireForm.js +7 -5
- package/dist/extensions/headless/fixture-host.d.ts +1 -5
- package/dist/extensions/headless/fixture-host.js +2 -5
- package/dist/extensions/headless/host.d.ts +1 -11
- package/dist/extensions/headless/index.d.ts +3 -3
- package/dist/extensions/headless/index.js +6 -6
- package/dist/extensions/headless/select.d.ts +1 -11
- package/dist/extensions/headless/select.js +1 -18
- package/dist/extensions/hooks.js +1 -1
- package/dist/files/EditorColumn.js +13 -2
- package/dist/files/MediaDiff.js +1 -1
- package/dist/files/TreeColumn.js +13 -20
- package/dist/files/useEntryActions.js +1 -1
- package/dist/files/useOpenFiles.js +3 -1
- package/dist/git/BranchMenu.js +6 -4
- package/dist/git/ImportRepoDialog.js +18 -9
- package/dist/git/MoveSessionDialog.js +16 -8
- package/dist/git/RemoteFolderPicker.js +35 -17
- package/dist/git/SyncChip.js +17 -17
- package/dist/git/WherePicker.d.ts +16 -1
- package/dist/git/WherePicker.js +81 -37
- package/dist/git/headless/environment.d.ts +33 -3
- package/dist/git/headless/environment.js +33 -5
- package/dist/git/headless/index.d.ts +2 -2
- package/dist/git/headless/index.js +2 -2
- package/dist/git/headless/labels.d.ts +15 -2
- package/dist/git/headless/labels.js +17 -4
- package/dist/git/useEnvironmentChoices.d.ts +3 -1
- package/dist/git/useEnvironmentChoices.js +7 -4
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/keybindings/KeyCommands.js +1 -1
- package/dist/keybindings/KeybindingsProvider.js +1 -1
- package/dist/keybindings/headless/index.js +2 -2
- package/dist/keybindings/headless/overrides.js +1 -1
- package/dist/labels.d.ts +5 -0
- package/dist/labels.js +5 -0
- package/dist/machines/AddMachineDialog.d.ts +34 -0
- package/dist/machines/AddMachineDialog.js +464 -0
- package/dist/machines/Banners.d.ts +33 -4
- package/dist/machines/Banners.js +64 -3
- package/dist/machines/DaemonMenu.js +27 -4
- package/dist/machines/HostCapabilities.d.ts +1 -3
- package/dist/machines/HostCapabilities.js +24 -45
- package/dist/machines/HostSyncPanel.js +124 -130
- package/dist/machines/HostsSection.d.ts +4 -1
- package/dist/machines/HostsSection.js +30 -7
- package/dist/machines/MachinesExplainer.d.ts +17 -0
- package/dist/machines/MachinesExplainer.js +71 -0
- package/dist/machines/MachinesProvider.d.ts +14 -2
- package/dist/machines/MachinesProvider.js +35 -1
- package/dist/machines/ServerAddedCard.d.ts +31 -0
- package/dist/machines/ServerAddedCard.js +72 -0
- package/dist/machines/ServerCard.js +91 -215
- package/dist/machines/ServerMachinesPanel.d.ts +2 -2
- package/dist/machines/ServerMachinesPanel.js +184 -323
- package/dist/machines/ServerUpdatePanel.js +51 -40
- package/dist/machines/ShareThisComputerForm.d.ts +19 -0
- package/dist/machines/ShareThisComputerForm.js +133 -0
- package/dist/machines/SyncOutcomeBadge.js +1 -1
- package/dist/machines/TokensPanel.d.ts +5 -3
- package/dist/machines/TokensPanel.js +98 -78
- package/dist/machines/headless/fixture-host.d.ts +19 -3
- package/dist/machines/headless/fixture-host.js +43 -6
- package/dist/machines/headless/fixtures.js +4 -6
- package/dist/machines/headless/host.d.ts +40 -19
- package/dist/machines/headless/index.d.ts +3 -3
- package/dist/machines/headless/index.js +3 -3
- package/dist/machines/headless/labels.d.ts +63 -20
- package/dist/machines/headless/labels.js +88 -25
- package/dist/machines/headless/messages.js +8 -0
- package/dist/machines/headless/stores.d.ts +9 -2
- package/dist/machines/headless/stores.js +28 -1
- package/dist/machines/index.d.ts +7 -3
- package/dist/machines/index.js +8 -4
- package/dist/machines/testing/contract.d.ts +15 -3
- package/dist/machines/testing/contract.js +68 -14
- package/dist/motion/grow.d.ts +8 -1
- package/dist/motion/grow.js +10 -4
- package/dist/onboarding/headless/labels.d.ts +13 -0
- package/dist/onboarding/headless/labels.js +8 -0
- package/dist/onboarding/sources/SourceBrowser.js +11 -7
- package/dist/onboarding/steps/ImportStep.js +4 -1
- package/dist/onboarding/steps/ReadyStep.js +9 -2
- package/dist/onboarding/steps/connect/KeyForm.js +6 -2
- package/dist/onboarding/steps/connect/ProviderPanel.js +6 -2
- package/dist/onboarding/steps/connect/ProviderReady.js +25 -20
- package/dist/onboarding/steps/tasks.js +17 -14
- package/dist/palette/app-sources.js +1 -1
- package/dist/server/sse-handler.js +141 -19
- package/dist/session/ArtifactsPanel.js +40 -18
- package/dist/session/PlanTracker.js +13 -8
- package/dist/session/ProjectHome.js +13 -11
- package/dist/session/RemindersPanel.js +35 -17
- package/dist/session/RunningWorkDialog.js +6 -2
- package/dist/session/SecretsPanel.js +29 -10
- package/dist/session/SessionDetailsDialog.d.ts +1 -1
- package/dist/session/SessionDetailsDialog.js +18 -10
- package/dist/session/SideChat.js +10 -7
- package/dist/session/TurnDetailsDialog.js +19 -5
- package/dist/session/UsagePanel.js +10 -4
- package/dist/session/headless/host.d.ts +2 -0
- package/dist/session/headless/index.js +2 -2
- package/dist/session/headless/labels.d.ts +19 -1
- package/dist/session/headless/labels.js +15 -1
- package/dist/session/headless/queue.js +2 -1
- package/dist/session/headless/reminder-labels.d.ts +4 -0
- package/dist/session/headless/reminder-labels.js +4 -0
- package/dist/settings/SettingsRestricted.d.ts +1 -1
- package/dist/settings/SettingsRestricted.js +4 -4
- package/dist/settings/SettingsShell.d.ts +7 -0
- package/dist/settings/SettingsShell.js +6 -1
- package/dist/settings/headless/fixture-performance.d.ts +1 -1
- package/dist/settings/headless/host.d.ts +2 -2
- package/dist/settings/headless/index.js +1 -1
- package/dist/settings/headless/labels.d.ts +3 -3
- package/dist/settings/headless/labels.js +3 -3
- package/dist/settings/headless/performance.d.ts +3 -4
- package/dist/settings/headless/search.d.ts +1 -1
- package/dist/settings/index.d.ts +2 -1
- package/dist/settings/index.js +2 -1
- package/dist/settings/sections/appearance/AppearanceSection.js +2 -2
- package/dist/settings/sections/claude-import/ClaudeImportDialog.js +1 -1
- package/dist/settings/sections/editor/EditorSection.js +8 -5
- package/dist/settings/sections/editor/labels.d.ts +1 -0
- package/dist/settings/sections/editor/labels.js +1 -0
- package/dist/settings/sections/environments/EnvironmentsSection.js +21 -14
- package/dist/settings/sections/environments/labels.d.ts +1 -0
- package/dist/settings/sections/environments/labels.js +2 -1
- package/dist/settings/sections/extensions/ChangeOriginDialog.js +1 -1
- package/dist/settings/sections/extensions/CreateExtensionDialog.js +1 -1
- package/dist/settings/sections/extensions/ExtensionConfigRows.d.ts +1 -3
- package/dist/settings/sections/extensions/ExtensionConfigRows.js +20 -19
- package/dist/settings/sections/extensions/ExtensionOptionsSection.js +2 -1
- package/dist/settings/sections/extensions/ExtensionsSection.js +1 -1
- package/dist/settings/sections/extensions/options-labels.d.ts +2 -1
- package/dist/settings/sections/extensions/options-labels.js +2 -1
- package/dist/settings/sections/host-catalog/HostCatalogSection.js +1 -1
- package/dist/settings/sections/index.d.ts +2 -1
- package/dist/settings/sections/index.js +2 -1
- package/dist/settings/sections/instructions/InstructionsSection.js +1 -1
- package/dist/settings/sections/logs/LogsSection.d.ts +2 -2
- package/dist/settings/sections/logs/LogsSection.js +2 -2
- package/dist/settings/sections/mcp/McpSection.d.ts +1 -1
- package/dist/settings/sections/mcp/McpSection.js +13 -7
- package/dist/settings/sections/mcp/McpServerRow.js +21 -14
- package/dist/settings/sections/mcp/labels.d.ts +8 -2
- package/dist/settings/sections/mcp/labels.js +8 -2
- package/dist/settings/sections/models/ModelRows.js +1 -1
- package/dist/settings/sections/models/NewChatPlaceRow.d.ts +26 -0
- package/dist/settings/sections/models/NewChatPlaceRow.js +78 -0
- package/dist/settings/sections/models/SpacesDefaultsSection.js +15 -3
- package/dist/settings/sections/models/labels.d.ts +7 -0
- package/dist/settings/sections/models/labels.js +7 -0
- package/dist/settings/sections/models/model-test.js +7 -4
- package/dist/settings/sections/performance/PerformanceSection.js +16 -6
- package/dist/settings/sections/performance/labels.d.ts +1 -1
- package/dist/settings/sections/performance/labels.js +1 -1
- package/dist/settings/sections/providers/ProvidersSection.d.ts +1 -1
- package/dist/settings/sections/providers/ProvidersSection.js +15 -8
- package/dist/settings/sections/providers/ServerProvidersSection.d.ts +1 -1
- package/dist/settings/sections/providers/ServerProvidersSection.js +12 -6
- package/dist/settings/sections/providers/labels.d.ts +2 -2
- package/dist/settings/sections/providers/labels.js +2 -2
- package/dist/settings/sections/shared/catalog.js +1 -1
- package/dist/settings/sections/skills/SkillsSection.js +1 -1
- package/dist/settings/testing/performance.contract.js +8 -12
- package/dist/styles.css +32 -3
- package/dist/terminal/HostTerminalSurface.js +17 -7
- package/dist/terminal/TerminalPanel.js +30 -17
- package/dist/terminal/TerminalSurface.js +11 -4
- package/dist/terminal/headless/labels.d.ts +5 -0
- package/dist/terminal/headless/labels.js +5 -0
- package/dist/terminal/headless/store.d.ts +1 -1
- package/dist/terminal/headless/store.js +6 -3
- package/dist/workspace/LayoutBudget.d.ts +5 -1
- package/dist/workspace/LayoutBudget.js +14 -1
- package/dist/workspace/PanelContentView.d.ts +1 -1
- package/dist/workspace/PanelContentView.js +17 -6
- package/dist/workspace/WorkspaceProvider.js +4 -3
- package/dist/workspace/extension-tabs.js +1 -1
- package/dist/workspace/headless/index.js +1 -1
- package/dist/workspace/headless/labels.d.ts +1 -0
- package/dist/workspace/headless/labels.js +1 -0
- package/package.json +3 -3
- package/src/styles/motion.css +8 -0
- package/src/styles/primitives.css +7 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { iconButtonClass } from "../../components/IconButton.js";
|
|
2
2
|
import { CopyButton } from "../../components/CopyButton.js";
|
|
3
|
+
import { Notice } from "../../components/Notice.js";
|
|
3
4
|
import { Grow, GrowPresence } from "../../motion/grow.js";
|
|
4
5
|
import { SmoothHeight } from "../../motion/size.js";
|
|
5
6
|
import { constant, useReadable } from "../headless/store.js";
|
|
6
|
-
import "../headless/block-runs.js";
|
|
7
7
|
import { useOptionalChatHost } from "../ChatProvider.js";
|
|
8
8
|
import { useChatLabels } from "../useChatLabels.js";
|
|
9
9
|
import { relativeTime } from "../headless/session-list.js";
|
|
@@ -12,6 +12,7 @@ import { useTranscriptActions } from "./actions.js";
|
|
|
12
12
|
import { AnsiText } from "./AnsiText.js";
|
|
13
13
|
import { LiveOutput } from "./LiveOutput.js";
|
|
14
14
|
import { ToolTiming } from "./tool-parts.js";
|
|
15
|
+
import "../headless/block-runs.js";
|
|
15
16
|
import { pushComposerAttachment, textAttachment } from "../composer/composer-bus.js";
|
|
16
17
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
17
18
|
import { Suspense, lazy, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
@@ -200,9 +201,12 @@ function RunPanel({ code, live, saved, onAgain, onTerminal, onRemove }) {
|
|
|
200
201
|
running: true
|
|
201
202
|
})]
|
|
202
203
|
});
|
|
203
|
-
if (live?.error !== void 0) return /* @__PURE__ */ jsx(
|
|
204
|
-
|
|
205
|
-
|
|
204
|
+
if (live?.error !== void 0) return /* @__PURE__ */ jsx(Notice, {
|
|
205
|
+
tone: "error",
|
|
206
|
+
compact: true,
|
|
207
|
+
detail: live.error,
|
|
208
|
+
className: "min-w-0",
|
|
209
|
+
children: labels.blockRunError
|
|
206
210
|
});
|
|
207
211
|
if (!saved) return null;
|
|
208
212
|
const label = saved.stopped === "timeout" ? labels.blockRunTimedOut : saved.stopped === "cancelled" ? labels.blockRunStopped : saved.exitCode === null ? labels.shellKilled : labels.shellExit(saved.exitCode);
|
|
@@ -422,6 +422,17 @@ function useStickToBottom(scrollRef, { paused = false, rowSelector = ".zg-cv-row
|
|
|
422
422
|
ro.observe(el);
|
|
423
423
|
const content = el.firstElementChild;
|
|
424
424
|
if (content) ro.observe(content);
|
|
425
|
+
const clamps = new MutationObserver(() => {
|
|
426
|
+
if (!pinnedRef.current || held.current || pausedRef.current) return;
|
|
427
|
+
const top = el.scrollTop;
|
|
428
|
+
if (top < lastTop.current - 1 && el.scrollHeight - el.clientHeight - top <= 1) lastTop.current = top;
|
|
429
|
+
});
|
|
430
|
+
if (content) clamps.observe(content, {
|
|
431
|
+
childList: true,
|
|
432
|
+
subtree: true,
|
|
433
|
+
characterData: true,
|
|
434
|
+
attributes: true
|
|
435
|
+
});
|
|
425
436
|
lastTop.current = el.scrollTop;
|
|
426
437
|
const glideState = glide.current;
|
|
427
438
|
return () => {
|
|
@@ -436,6 +447,7 @@ function useStickToBottom(scrollRef, { paused = false, rowSelector = ".zg-cv-row
|
|
|
436
447
|
el.removeEventListener("wheel", onWheel);
|
|
437
448
|
el.removeEventListener("keydown", onKey);
|
|
438
449
|
ro.disconnect();
|
|
450
|
+
clamps.disconnect();
|
|
439
451
|
};
|
|
440
452
|
}, [
|
|
441
453
|
scrollRef,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useLabels } from "../labels.js";
|
|
2
2
|
import { buttonClass } from "./button.js";
|
|
3
3
|
import { CopyButton } from "./CopyButton.js";
|
|
4
|
+
import { Notice } from "./Notice.js";
|
|
4
5
|
import { INPUT_CLASS } from "./Form.js";
|
|
5
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
import { useState } from "react";
|
|
@@ -27,12 +28,27 @@ function hostOf(url) {
|
|
|
27
28
|
*/
|
|
28
29
|
function BrowserSignIn({ state, service, onCancel, onRetry, onSubmit, className = "", style }) {
|
|
29
30
|
const labels = useLabels();
|
|
30
|
-
|
|
31
|
+
if (state.kind === "error") return /* @__PURE__ */ jsx(Notice, {
|
|
32
|
+
tone: "error",
|
|
33
|
+
detail: state.message,
|
|
34
|
+
action: onRetry && /* @__PURE__ */ jsx("button", {
|
|
35
|
+
type: "button",
|
|
36
|
+
onClick: onRetry,
|
|
37
|
+
className: buttonClass({
|
|
38
|
+
variant: "primary",
|
|
39
|
+
size: "sm"
|
|
40
|
+
}),
|
|
41
|
+
children: labels.retry
|
|
42
|
+
}),
|
|
43
|
+
className: `text-zg-label ${className}`.trimEnd(),
|
|
44
|
+
style,
|
|
45
|
+
children: labels.signInFailed
|
|
46
|
+
});
|
|
31
47
|
const done = state.kind === "done";
|
|
32
48
|
return /* @__PURE__ */ jsxs("div", {
|
|
33
|
-
role:
|
|
34
|
-
"aria-live":
|
|
35
|
-
className: `flex flex-col gap-3 px-3 py-2.5 rounded-zg-md text-zg-label
|
|
49
|
+
role: "status",
|
|
50
|
+
"aria-live": "polite",
|
|
51
|
+
className: `flex flex-col gap-3 px-3 py-2.5 rounded-zg-md text-zg-label zg-tray ${className}`,
|
|
36
52
|
style,
|
|
37
53
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
38
54
|
className: "flex items-start gap-3",
|
|
@@ -40,7 +56,7 @@ function BrowserSignIn({ state, service, onCancel, onRetry, onSubmit, className
|
|
|
40
56
|
/* @__PURE__ */ jsx("span", {
|
|
41
57
|
className: "mt-0.5 shrink-0",
|
|
42
58
|
"aria-hidden": true,
|
|
43
|
-
children: done ? /* @__PURE__ */ jsx("span", { className: "i-ph-check-circle-fill text-zg-body text-[var(--zg-accent)]" }) :
|
|
59
|
+
children: done ? /* @__PURE__ */ jsx("span", { className: "i-ph-check-circle-fill text-zg-body text-[var(--zg-accent)]" }) : /* @__PURE__ */ jsx("span", { className: "zg-spin-ring zg-loop block mt-px text-[var(--zg-accent)]" })
|
|
44
60
|
}),
|
|
45
61
|
/* @__PURE__ */ jsx("div", {
|
|
46
62
|
className: "flex-1 min-w-0 flex flex-col gap-1",
|
|
@@ -49,15 +65,7 @@ function BrowserSignIn({ state, service, onCancel, onRetry, onSubmit, className
|
|
|
49
65
|
service
|
|
50
66
|
})
|
|
51
67
|
}),
|
|
52
|
-
|
|
53
|
-
type: "button",
|
|
54
|
-
onClick: onRetry,
|
|
55
|
-
className: buttonClass({
|
|
56
|
-
variant: "primary",
|
|
57
|
-
size: "sm"
|
|
58
|
-
}),
|
|
59
|
-
children: labels.retry
|
|
60
|
-
}) : !done && onCancel && /* @__PURE__ */ jsx("button", {
|
|
68
|
+
!done && onCancel && /* @__PURE__ */ jsx("button", {
|
|
61
69
|
type: "button",
|
|
62
70
|
onClick: onCancel,
|
|
63
71
|
className: buttonClass({
|
|
@@ -88,13 +96,7 @@ function SignInMessage({ state, service }) {
|
|
|
88
96
|
className: "text-[var(--zg-text)]",
|
|
89
97
|
children: labels.signInDone(state.account)
|
|
90
98
|
});
|
|
91
|
-
case "error": return
|
|
92
|
-
className: "text-zg-danger font-medium",
|
|
93
|
-
children: labels.signInFailed
|
|
94
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
95
|
-
className: "text-[var(--zg-text-muted)] break-words",
|
|
96
|
-
children: state.message
|
|
97
|
-
})] });
|
|
99
|
+
case "error": return null;
|
|
98
100
|
case "url": return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
99
101
|
className: "text-[var(--zg-text)]",
|
|
100
102
|
children: state.instructions ?? labels.signInInBrowser(service)
|
|
@@ -18,25 +18,27 @@ declare const FIELD_LABEL_CLASS = "block text-xs text-[var(--zg-text-muted)] mb-
|
|
|
18
18
|
declare const FORM_CARD_CLASS = "zg-raised border rounded-zg-lg p-4 space-y-3";
|
|
19
19
|
/** Props for {@link ErrorNote}. */
|
|
20
20
|
interface ErrorNoteProps {
|
|
21
|
-
/** The error message. */
|
|
21
|
+
/** The error message, worded for people. */
|
|
22
22
|
children: ReactNode;
|
|
23
|
+
/** The raw words behind it (an exception's message): folded under Details. */
|
|
24
|
+
detail?: string;
|
|
23
25
|
/** Extra classes on the root element. */
|
|
24
26
|
className?: string;
|
|
25
27
|
/** Inline styles on the root element, merged after the component's own. */
|
|
26
28
|
style?: CSSProperties;
|
|
27
29
|
}
|
|
28
30
|
/**
|
|
29
|
-
* A failure worth reading:
|
|
31
|
+
* A failure worth reading: an error {@link Notice}.
|
|
30
32
|
*
|
|
31
33
|
* @param props - Component props.
|
|
32
34
|
*/
|
|
33
|
-
declare function ErrorNote({ children, className, style }: ErrorNoteProps): import("react").JSX.Element;
|
|
35
|
+
declare function ErrorNote({ children, detail, className, style }: ErrorNoteProps): import("react").JSX.Element;
|
|
34
36
|
/** Props for {@link OpLine}. */
|
|
35
37
|
interface OpLineProps {
|
|
36
38
|
/**
|
|
37
39
|
* Tone of the line: `busy` and `notice` are muted (a result worth a quiet line,
|
|
38
40
|
* never a celebration: a success that shows elsewhere needs no line at all), and
|
|
39
|
-
* `error` is
|
|
41
|
+
* `error` is a compact error {@link Notice}.
|
|
40
42
|
*/
|
|
41
43
|
kind: 'busy' | 'notice' | 'error';
|
|
42
44
|
/** The feedback text. */
|
package/dist/components/Form.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Notice } from "./Notice.js";
|
|
1
2
|
import { Segmented } from "./Segmented.js";
|
|
2
3
|
import { Raised, SectionLabel, Tray } from "./Surface.js";
|
|
3
4
|
import { SwitchGlyph } from "./SwitchGlyph.js";
|
|
@@ -23,15 +24,16 @@ const FIELD_LABEL_CLASS = "block text-xs text-[var(--zg-text-muted)] mb-1";
|
|
|
23
24
|
/** An inline add / install form: a raised card above the list it feeds. */
|
|
24
25
|
const FORM_CARD_CLASS = "zg-raised border rounded-zg-lg p-4 space-y-3";
|
|
25
26
|
/**
|
|
26
|
-
* A failure worth reading:
|
|
27
|
+
* A failure worth reading: an error {@link Notice}.
|
|
27
28
|
*
|
|
28
29
|
* @param props - Component props.
|
|
29
30
|
*/
|
|
30
|
-
function ErrorNote({ children, className, style }) {
|
|
31
|
-
return /* @__PURE__ */ jsx(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
function ErrorNote({ children, detail, className, style }) {
|
|
32
|
+
return /* @__PURE__ */ jsx(Notice, {
|
|
33
|
+
tone: "error",
|
|
34
|
+
...detail ? { detail } : {},
|
|
35
|
+
...className ? { className } : {},
|
|
36
|
+
...style ? { style } : {},
|
|
35
37
|
children
|
|
36
38
|
});
|
|
37
39
|
}
|
|
@@ -41,9 +43,15 @@ function ErrorNote({ children, className, style }) {
|
|
|
41
43
|
* @param props - Component props.
|
|
42
44
|
*/
|
|
43
45
|
function OpLine({ kind, children, className, style }) {
|
|
46
|
+
if (kind === "error") return /* @__PURE__ */ jsx(Notice, {
|
|
47
|
+
tone: "error",
|
|
48
|
+
compact: true,
|
|
49
|
+
...className ? { className } : {},
|
|
50
|
+
...style ? { style } : {},
|
|
51
|
+
children
|
|
52
|
+
});
|
|
44
53
|
return /* @__PURE__ */ jsx("div", {
|
|
45
|
-
|
|
46
|
-
className: [`px-1 text-xs break-words ${kind === "error" ? "text-zg-danger" : "text-[var(--zg-text-muted)]"}`, className].filter(Boolean).join(" "),
|
|
54
|
+
className: ["px-1 text-xs break-words text-[var(--zg-text-muted)]", className].filter(Boolean).join(" "),
|
|
47
55
|
style,
|
|
48
56
|
children
|
|
49
57
|
});
|
|
@@ -4,6 +4,8 @@ import { CSSProperties, ReactNode } from "react";
|
|
|
4
4
|
interface LoadErrorProps {
|
|
5
5
|
/** The line: what could not be read and why. */
|
|
6
6
|
children: ReactNode;
|
|
7
|
+
/** The raw words behind it (an exception's message): folded under Details. */
|
|
8
|
+
detail?: string;
|
|
7
9
|
/** Reads again; absent, no Retry. */
|
|
8
10
|
onRetry?: () => void;
|
|
9
11
|
/** Spacing from the surroundings. */
|
|
@@ -12,10 +14,10 @@ interface LoadErrorProps {
|
|
|
12
14
|
style?: CSSProperties;
|
|
13
15
|
}
|
|
14
16
|
/**
|
|
15
|
-
* Renders a failed read's line
|
|
17
|
+
* Renders a failed read's line as a compact error notice, `children` first (`Couldn't scan for plugins`).
|
|
16
18
|
*
|
|
17
19
|
* @param props - Component props.
|
|
18
20
|
*/
|
|
19
|
-
declare function LoadError({ children, onRetry, className, style }: LoadErrorProps): import("react").JSX.Element;
|
|
21
|
+
declare function LoadError({ children, detail, onRetry, className, style }: LoadErrorProps): import("react").JSX.Element;
|
|
20
22
|
//#endregion
|
|
21
23
|
export { LoadError, LoadErrorProps };
|
|
@@ -1,23 +1,27 @@
|
|
|
1
1
|
import { useLabels } from "../labels.js";
|
|
2
|
-
import {
|
|
2
|
+
import { Notice } from "./Notice.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
4
|
//#region src/components/LoadError.tsx
|
|
4
5
|
/**
|
|
5
|
-
* Renders a failed read's line
|
|
6
|
+
* Renders a failed read's line as a compact error notice, `children` first (`Couldn't scan for plugins`).
|
|
6
7
|
*
|
|
7
8
|
* @param props - Component props.
|
|
8
9
|
*/
|
|
9
|
-
function LoadError({ children, onRetry, className
|
|
10
|
+
function LoadError({ children, detail, onRetry, className, style }) {
|
|
10
11
|
const labels = useLabels();
|
|
11
|
-
return /* @__PURE__ */
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
return /* @__PURE__ */ jsx(Notice, {
|
|
13
|
+
tone: "error",
|
|
14
|
+
compact: true,
|
|
15
|
+
...detail ? { detail } : {},
|
|
16
|
+
...className ? { className } : {},
|
|
17
|
+
...style ? { style } : {},
|
|
18
|
+
...onRetry ? { action: /* @__PURE__ */ jsx("button", {
|
|
16
19
|
type: "button",
|
|
17
20
|
className: "bg-transparent border-0 p-0 cursor-pointer underline text-inherit",
|
|
18
21
|
onClick: onRetry,
|
|
19
22
|
children: labels.retry
|
|
20
|
-
})
|
|
23
|
+
}) } : {},
|
|
24
|
+
children
|
|
21
25
|
});
|
|
22
26
|
}
|
|
23
27
|
//#endregion
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode } from "react";
|
|
2
|
+
//#region src/components/Notice.d.ts
|
|
3
|
+
/** How serious a {@link Notice} is. */
|
|
4
|
+
type NoticeTone = 'error' | 'warning' | 'info';
|
|
5
|
+
/** Props for {@link Notice}. */
|
|
6
|
+
interface NoticeProps {
|
|
7
|
+
/** How serious it is: the glyph, the colour, and `alert` (error) or `status`. */
|
|
8
|
+
tone: NoticeTone;
|
|
9
|
+
/** The message, worded for people. */
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
/** The raw words behind it (an exception's message, a server's answer): folded under Details. */
|
|
12
|
+
detail?: string;
|
|
13
|
+
/** A control after the message (Retry, Open settings). */
|
|
14
|
+
action?: ReactNode;
|
|
15
|
+
/** One tight line, for a row or a form field. Default: a block with room around it. */
|
|
16
|
+
compact?: boolean;
|
|
17
|
+
/** Extra classes on the root element. */
|
|
18
|
+
className?: string;
|
|
19
|
+
/** Inline styles on the root element, merged after the component's own. */
|
|
20
|
+
style?: CSSProperties;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Renders a toned message: glyph, the words, an optional action, and the raw detail folded away.
|
|
24
|
+
*
|
|
25
|
+
* @param props - {@link NoticeProps}.
|
|
26
|
+
*/
|
|
27
|
+
declare function Notice({ tone, children, detail, action, compact, className, style }: NoticeProps): import("react").JSX.Element;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { Notice, NoticeProps, NoticeTone };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { useLabels } from "../labels.js";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/Notice.tsx
|
|
4
|
+
const TONES = {
|
|
5
|
+
error: {
|
|
6
|
+
wash: "bg-zg-danger/10",
|
|
7
|
+
text: "text-zg-danger",
|
|
8
|
+
icon: "i-ph-warning-circle"
|
|
9
|
+
},
|
|
10
|
+
warning: {
|
|
11
|
+
wash: "bg-zg-warn/10",
|
|
12
|
+
text: "text-zg-warn",
|
|
13
|
+
icon: "i-ph-warning"
|
|
14
|
+
},
|
|
15
|
+
info: {
|
|
16
|
+
wash: "bg-zg-info/10",
|
|
17
|
+
text: "text-[var(--zg-text-muted)]",
|
|
18
|
+
icon: "i-ph-info"
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Renders a toned message: glyph, the words, an optional action, and the raw detail folded away.
|
|
23
|
+
*
|
|
24
|
+
* @param props - {@link NoticeProps}.
|
|
25
|
+
*/
|
|
26
|
+
function Notice({ tone, children, detail, action, compact = false, className, style }) {
|
|
27
|
+
const labels = useLabels();
|
|
28
|
+
const t = TONES[tone];
|
|
29
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
30
|
+
role: tone === "error" ? "alert" : "status",
|
|
31
|
+
"data-tone": tone,
|
|
32
|
+
className: [
|
|
33
|
+
compact ? "px-2 py-1 rounded-zg-sm" : "px-3 py-2 rounded-zg-md",
|
|
34
|
+
`flex items-start gap-2 text-xs break-words ${t.wash} ${t.text}`,
|
|
35
|
+
className
|
|
36
|
+
].filter(Boolean).join(" "),
|
|
37
|
+
style,
|
|
38
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
39
|
+
"aria-hidden": true,
|
|
40
|
+
className: `${t.icon} shrink-0 mt-[2px]`
|
|
41
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
42
|
+
className: "flex-1 min-w-0",
|
|
43
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
44
|
+
className: "flex flex-wrap items-baseline gap-x-2 gap-y-1",
|
|
45
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
46
|
+
className: "min-w-0",
|
|
47
|
+
children
|
|
48
|
+
}), action]
|
|
49
|
+
}), detail && /* @__PURE__ */ jsxs("details", {
|
|
50
|
+
className: "mt-1 text-[var(--zg-text-muted)]",
|
|
51
|
+
children: [/* @__PURE__ */ jsx("summary", {
|
|
52
|
+
className: "cursor-pointer select-none",
|
|
53
|
+
children: labels.noticeDetails
|
|
54
|
+
}), /* @__PURE__ */ jsx("pre", {
|
|
55
|
+
className: "m-0 mt-1 whitespace-pre-wrap break-words font-mono text-zg-meta",
|
|
56
|
+
children: detail
|
|
57
|
+
})]
|
|
58
|
+
})]
|
|
59
|
+
})]
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
//#endregion
|
|
63
|
+
export { Notice };
|
|
@@ -4,7 +4,7 @@ import { CSSProperties, ReactNode } from "react";
|
|
|
4
4
|
interface PanelEmptyProps {
|
|
5
5
|
/** Icon class shown above the title, such as `i-ph-files`. */
|
|
6
6
|
icon?: string;
|
|
7
|
-
/** Main message.
|
|
7
|
+
/** Main message. With `warn`, a warning {@link Notice}. */
|
|
8
8
|
title: ReactNode;
|
|
9
9
|
/** Secondary text under the title. */
|
|
10
10
|
hint?: ReactNode;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { useLabels } from "../labels.js";
|
|
2
|
+
import { Notice } from "./Notice.js";
|
|
2
3
|
import { EmptyState } from "./Surface.js";
|
|
3
4
|
import { SegmentSpinner } from "./SegmentSpinner.js";
|
|
4
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -15,8 +16,9 @@ function PanelEmpty({ icon, title, hint, warn = false, className, style }) {
|
|
|
15
16
|
style,
|
|
16
17
|
children: /* @__PURE__ */ jsx(EmptyState, {
|
|
17
18
|
icon,
|
|
18
|
-
title: warn ? /* @__PURE__ */ jsx(
|
|
19
|
-
|
|
19
|
+
title: warn ? /* @__PURE__ */ jsx(Notice, {
|
|
20
|
+
tone: "warning",
|
|
21
|
+
compact: true,
|
|
20
22
|
children: title
|
|
21
23
|
}) : title,
|
|
22
24
|
hint,
|
|
@@ -4,7 +4,7 @@ import { CSSProperties, ReactNode } from "react";
|
|
|
4
4
|
interface RestrictedProps {
|
|
5
5
|
/** Whether this connection may not change what it wraps. */
|
|
6
6
|
restricted: boolean;
|
|
7
|
-
/** Why, short: the tooltip and the group's accessible name ("
|
|
7
|
+
/** Why, short: the tooltip and the group's accessible name ("The server does not offer this"). */
|
|
8
8
|
reason: string;
|
|
9
9
|
/** What it wraps. */
|
|
10
10
|
children: ReactNode;
|
|
@@ -79,7 +79,14 @@ function PaletteList({ groups, cursor, query, nested, onHover, onRun, renderRow,
|
|
|
79
79
|
ref: scroller,
|
|
80
80
|
id: "zg-palette-list",
|
|
81
81
|
role: "listbox",
|
|
82
|
-
|
|
82
|
+
tabIndex: -1,
|
|
83
|
+
onMouseDown: (e) => {
|
|
84
|
+
if (e.target !== e.currentTarget) e.preventDefault();
|
|
85
|
+
},
|
|
86
|
+
onFocus: (e) => {
|
|
87
|
+
if (e.target === e.currentTarget && e.relatedTarget instanceof HTMLElement) e.relatedTarget.focus();
|
|
88
|
+
},
|
|
89
|
+
className: ["zg-palette-list select-none overflow-y-auto overscroll-contain", className].filter(Boolean).join(" "),
|
|
83
90
|
style: {
|
|
84
91
|
height: viewHeight,
|
|
85
92
|
...style
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useLabels } from "../../labels.js";
|
|
2
2
|
import { IconButton } from "../IconButton.js";
|
|
3
|
+
import { Notice } from "../Notice.js";
|
|
3
4
|
import { PaletteList, defaultPaletteKeys } from "./PaletteList.js";
|
|
4
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
import { Fragment as Fragment$1, useEffect, useMemo, useRef, useState } from "react";
|
|
@@ -115,12 +116,12 @@ function PalettePanel({ groups, query, onQueryChange, cursor, onCursorChange, on
|
|
|
115
116
|
return;
|
|
116
117
|
}
|
|
117
118
|
case "Tab":
|
|
119
|
+
e.preventDefault();
|
|
120
|
+
e.stopPropagation();
|
|
118
121
|
if (e.shiftKey && !nested && onScopeNext) {
|
|
119
|
-
e.preventDefault();
|
|
120
|
-
e.stopPropagation();
|
|
121
122
|
onScopeNext();
|
|
122
123
|
onCursorChange(0);
|
|
123
|
-
}
|
|
124
|
+
} else if (flat.length > 0) onCursorChange(e.shiftKey ? (cursor - 1 + flat.length) % flat.length : (cursor + 1) % flat.length);
|
|
124
125
|
return;
|
|
125
126
|
case "Backspace":
|
|
126
127
|
if (query === "" && nested && onBack) {
|
|
@@ -225,11 +226,18 @@ function PalettePanel({ groups, query, onQueryChange, cursor, onCursorChange, on
|
|
|
225
226
|
})
|
|
226
227
|
]
|
|
227
228
|
}),
|
|
228
|
-
notice && /* @__PURE__ */ jsx("div", {
|
|
229
|
+
notice && (notice.tone === "error" || notice.tone === "warn" ? /* @__PURE__ */ jsx("div", {
|
|
230
|
+
className: "px-3 py-2 shadow-[inset_0_1px_0_var(--zg-hairline)]",
|
|
231
|
+
children: /* @__PURE__ */ jsx(Notice, {
|
|
232
|
+
tone: notice.tone === "error" ? "error" : "warning",
|
|
233
|
+
compact: true,
|
|
234
|
+
children: notice.text
|
|
235
|
+
})
|
|
236
|
+
}) : /* @__PURE__ */ jsx("div", {
|
|
229
237
|
role: "status",
|
|
230
|
-
className:
|
|
238
|
+
className: "px-3 py-2 shadow-[inset_0_1px_0_var(--zg-hairline)] text-zg-label text-[var(--zg-text-muted)]",
|
|
231
239
|
children: notice.text
|
|
232
|
-
})
|
|
240
|
+
}))
|
|
233
241
|
]
|
|
234
242
|
});
|
|
235
243
|
}
|
package/dist/core.css
CHANGED
|
@@ -28,7 +28,6 @@
|
|
|
28
28
|
.i-ph-text-align-left{--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='M32 64a8 8 0 0 1 8-8h176a8 8 0 0 1 0 16H40a8 8 0 0 1-8-8m8 48h128a8 8 0 0 0 0-16H40a8 8 0 0 0 0 16m176 24H40a8 8 0 0 0 0 16h176a8 8 0 0 0 0-16m-48 40H40a8 8 0 0 0 0 16h128a8 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;}
|
|
29
29
|
.i-ph-warning{--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='M236.8 188.09L149.35 36.22a24.76 24.76 0 0 0-42.7 0L19.2 188.09a23.51 23.51 0 0 0 0 23.72A24.35 24.35 0 0 0 40.55 224h174.9a24.35 24.35 0 0 0 21.33-12.19a23.51 23.51 0 0 0 .02-23.72m-13.87 15.71a8.5 8.5 0 0 1-7.48 4.2H40.55a8.5 8.5 0 0 1-7.48-4.2a7.59 7.59 0 0 1 0-7.72l87.45-151.87a8.75 8.75 0 0 1 15 0l87.45 151.87a7.59 7.59 0 0 1-.04 7.72M120 144v-40a8 8 0 0 1 16 0v40a8 8 0 0 1-16 0m20 36a12 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;}
|
|
30
30
|
.i-ph-warning-circle{--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 88m-8-80V80a8 8 0 0 1 16 0v56a8 8 0 0 1-16 0m20 36a12 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
|
-
.i-ph-warning-circle-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 24m-8 56a8 8 0 0 1 16 0v56a8 8 0 0 1-16 0Zm8 104a12 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;}
|
|
32
31
|
.i-ph-x{--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='M205.66 194.34a8 8 0 0 1-11.32 11.32L128 139.31l-66.34 66.35a8 8 0 0 1-11.32-11.32L116.69 128L50.34 61.66a8 8 0 0 1 11.32-11.32L128 116.69l66.34-66.35a8 8 0 0 1 11.32 11.32L139.31 128Z'/%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;}
|
|
33
32
|
/* layer: shortcuts */
|
|
34
33
|
.container{width:100%;}
|
|
@@ -87,6 +86,7 @@
|
|
|
87
86
|
.m4\.7144{margin:1.1786rem;}
|
|
88
87
|
.-mx-1{margin-left:-0.25rem;margin-right:-0.25rem;}
|
|
89
88
|
.-mx-2{margin-left:-0.5rem;margin-right:-0.5rem;}
|
|
89
|
+
.mx-3{margin-left:0.75rem;margin-right:0.75rem;}
|
|
90
90
|
.my-2{margin-top:0.5rem;margin-bottom:0.5rem;}
|
|
91
91
|
.my-auto{margin-top:auto;margin-bottom:auto;}
|
|
92
92
|
.-ml-2{margin-left:-0.5rem;}
|
|
@@ -107,6 +107,7 @@
|
|
|
107
107
|
.ml-auto{margin-left:auto;}
|
|
108
108
|
.ms{margin-inline-start:1rem;}
|
|
109
109
|
.mt-\[13vh\]{margin-top:13vh;}
|
|
110
|
+
.mt-\[2px\]{margin-top:2px;}
|
|
110
111
|
.mt-0\.5{margin-top:0.125rem;}
|
|
111
112
|
.mt-1{margin-top:0.25rem;}
|
|
112
113
|
.mt-1\.5{margin-top:0.375rem;}
|
|
@@ -196,6 +197,7 @@
|
|
|
196
197
|
.cursor-text{cursor:text;}
|
|
197
198
|
.cursor-grabbing{cursor:grabbing;}
|
|
198
199
|
.select-text{-webkit-user-select:text;user-select:text;}
|
|
200
|
+
.select-none{-webkit-user-select:none;user-select:none;}
|
|
199
201
|
.resize-y{resize:vertical;}
|
|
200
202
|
.resize{resize:both;}
|
|
201
203
|
.list-none{list-style-type:none;}
|
|
@@ -220,6 +222,8 @@
|
|
|
220
222
|
.gap-3\.5{gap:0.875rem;}
|
|
221
223
|
.gap-4{gap:1rem;}
|
|
222
224
|
.gap-6{gap:1.5rem;}
|
|
225
|
+
.gap-x-2{column-gap:0.5rem;}
|
|
226
|
+
.gap-y-1{row-gap:0.25rem;}
|
|
223
227
|
.space-y-3>:not([hidden])~:not([hidden]){--un-space-y-reverse:0;margin-top:calc(0.75rem * calc(1 - var(--un-space-y-reverse)));margin-bottom:calc(0.75rem * var(--un-space-y-reverse));}
|
|
224
228
|
.space-y-5>:not([hidden])~:not([hidden]){--un-space-y-reverse:0;margin-top:calc(1.25rem * calc(1 - var(--un-space-y-reverse)));margin-bottom:calc(1.25rem * var(--un-space-y-reverse));}
|
|
225
229
|
.divide-y>:not([hidden])~:not([hidden]){--un-divide-y-reverse:0;border-top-width:calc(1px * calc(1 - var(--un-divide-y-reverse)));border-bottom-width:calc(1px * var(--un-divide-y-reverse));}
|
|
@@ -352,17 +356,15 @@
|
|
|
352
356
|
.text-\[var\(--zg-accent\)\]{color:var(--zg-accent);}
|
|
353
357
|
.text-\[var\(--zg-bg\)\]{color:var(--zg-bg);}
|
|
354
358
|
.text-\[var\(--zg-code-fg\)\]{color:var(--zg-code-fg);}
|
|
355
|
-
.text-\[var\(--zg-danger\)\],
|
|
356
|
-
.text-zg-danger{color:var(--zg-danger);}
|
|
357
359
|
.text-\[var\(--zg-text-muted\)\],
|
|
358
360
|
.text-zg-muted{color:var(--zg-text-muted);}
|
|
359
361
|
.text-\[var\(--zg-text-subtle\)\]{color:var(--zg-text-subtle);}
|
|
360
362
|
.text-\[var\(--zg-text\)\]{color:var(--zg-text);}
|
|
361
|
-
.text-\[var\(--zg-warn\)\],
|
|
362
|
-
.text-zg-warn{color:var(--zg-warn);}
|
|
363
363
|
.text-zg-accent-fill-fg{color:var(--zg-accent-fill-fg);}
|
|
364
|
+
.text-zg-danger{color:var(--zg-danger);}
|
|
364
365
|
.text-zg-info{color:var(--zg-info);}
|
|
365
366
|
.text-zg-success{color:var(--zg-success);}
|
|
367
|
+
.text-zg-warn{color:var(--zg-warn);}
|
|
366
368
|
.hover\:\!text-zg-danger:hover{color:var(--zg-danger) !important;}
|
|
367
369
|
.hover\:text-\[var\(--zg-text\)\]:hover{color:var(--zg-text);}
|
|
368
370
|
.placeholder\:text-\[var\(--zg-text-subtle\)\]::placeholder{color:var(--zg-text-subtle);}
|
|
@@ -427,6 +429,8 @@
|
|
|
427
429
|
.z-zg-overlay{z-index:var(--zg-z-overlay);}
|
|
428
430
|
.z-zg-tooltip{z-index:var(--zg-z-tooltip);}
|
|
429
431
|
.bg-zg-danger\/10{background-color:color-mix(in srgb, var(--zg-danger) 10%, transparent);}
|
|
432
|
+
.bg-zg-info\/10{background-color:color-mix(in srgb, var(--zg-info) 10%, transparent);}
|
|
433
|
+
.bg-zg-warn\/10{background-color:color-mix(in srgb, var(--zg-warn) 10%, transparent);}
|
|
430
434
|
.hover\:before\:bg-zg-danger\/10:hover::before{background-color:color-mix(in srgb, var(--zg-danger) 10%, transparent);}
|
|
431
435
|
@media (min-width: 640px){
|
|
432
436
|
.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr));}
|
|
@@ -1054,6 +1058,13 @@ html[data-motion='off'] {
|
|
|
1054
1058
|
padding: 6px 10px;
|
|
1055
1059
|
align-items: flex-start;
|
|
1056
1060
|
}
|
|
1061
|
+
/* A row that belongs to the row above it (a server's machines): one glyph column in. */
|
|
1062
|
+
.zg-menu-row.zg-menu-row-nested {
|
|
1063
|
+
padding-left: 26px;
|
|
1064
|
+
}
|
|
1065
|
+
.zg-menu-row.zg-menu-row-nested[data-size='lg'] {
|
|
1066
|
+
padding-left: 28px;
|
|
1067
|
+
}
|
|
1057
1068
|
.zg-menu-row:hover:not(:disabled) {
|
|
1058
1069
|
background: var(--zg-row-hover);
|
|
1059
1070
|
}
|
|
@@ -1688,6 +1699,14 @@ html[data-motion='reduced'] .zg-shimmer {
|
|
|
1688
1699
|
opacity var(--zg-motion-fade),
|
|
1689
1700
|
margin-left var(--zg-motion-settle);
|
|
1690
1701
|
}
|
|
1702
|
+
/* `Grow symmetric`: leaving on the curve it arrived on, so a row shrinking out
|
|
1703
|
+
as another grows in mirrors it exactly and the list's height holds. */
|
|
1704
|
+
.zg-grow[data-symmetric]:not([data-shown]) {
|
|
1705
|
+
transition:
|
|
1706
|
+
grid-template-rows var(--zg-motion-settle),
|
|
1707
|
+
opacity var(--zg-motion-fade-out),
|
|
1708
|
+
margin-left var(--zg-motion-settle);
|
|
1709
|
+
}
|
|
1691
1710
|
.zg-grow-clip {
|
|
1692
1711
|
min-height: 0;
|
|
1693
1712
|
overflow-x: visible;
|
|
@@ -6,7 +6,7 @@ import "../node_modules/.bun/@earendil-works_pi-ai@1.3.0_bff1df87cb190f90/node_m
|
|
|
6
6
|
import "../node_modules/.bun/@anthropic-ai_sdk@0.104.2_fff7ddf946fac095/node_modules/@anthropic-ai/sdk/index.js";
|
|
7
7
|
import "../node_modules/.bun/@anthropic-ai_sdk@0.104.2_fff7ddf946fac095/node_modules/@anthropic-ai/sdk/resources2.js";
|
|
8
8
|
import { ReactNode } from "react";
|
|
9
|
-
//#region ../dist/index-
|
|
9
|
+
//#region ../dist/index-C6rzc-tt.d.ts
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region src/thinking-levels.d.ts
|
|
12
12
|
/**
|
|
@@ -51,6 +51,23 @@ interface EnvironmentSettings {
|
|
|
51
51
|
config?: Record<string, Record<string, EnvironmentConfigValue>>;
|
|
52
52
|
}
|
|
53
53
|
//#endregion
|
|
54
|
+
//#region src/chat/places.d.ts
|
|
55
|
+
/** Where new chats start. */
|
|
56
|
+
interface NewChatPlace {
|
|
57
|
+
/** `local` (This computer) or a saved server's id (its own `hostId`). */
|
|
58
|
+
hostId: string;
|
|
59
|
+
/** The server's name when the place was set: shown on a device that has not saved it. */
|
|
60
|
+
hostName?: string;
|
|
61
|
+
/** The server's URL when the place was set: offered to a device that has not saved it. */
|
|
62
|
+
hostUrl?: string;
|
|
63
|
+
/** One of the host's machines, by name. Absent: the host itself. */
|
|
64
|
+
machine?: string;
|
|
65
|
+
/** A folder on the host, or on the machine. Absent: the usual folder (the host's first root, the machine's first folder). */
|
|
66
|
+
folder?: string;
|
|
67
|
+
/** The isolation, without a machine (`local`, `worktree`, `docker`…). Absent: the host's default. */
|
|
68
|
+
isolation?: string;
|
|
69
|
+
}
|
|
70
|
+
//#endregion
|
|
54
71
|
//#region src/chat/ansi.d.ts
|
|
55
72
|
/**
|
|
56
73
|
* Terminal output as styled lines: ANSI SGR codes (colors, bold, dim, italic,
|
|
@@ -179,7 +196,7 @@ type QueryBound = number | string;
|
|
|
179
196
|
* session without an environment. `projectName` is computed: the folder name
|
|
180
197
|
* (last path segment) of `projectRoot`, or of `cwd` without one.
|
|
181
198
|
*/
|
|
182
|
-
type SessionFieldName = 'id' | 'title' | 'projectRoot' | 'projectName' | 'cwd' | 'agentId' | 'status' | 'createdAt' | 'updatedAt' | 'runStartedAt' | 'archived' | 'favorite' | 'isMain' | 'spaceId' | 'scheduleId' | 'providerKey' | 'modelId' | 'account' | 'effort' | 'hostId' | 'repoKey' | 'environment.kind' | 'environment.state' | 'environment.branch' | 'wakes';
|
|
199
|
+
type SessionFieldName = 'id' | 'title' | 'projectRoot' | 'projectName' | 'cwd' | 'agentId' | 'status' | 'createdAt' | 'updatedAt' | 'lastUserMessageAt' | 'runStartedAt' | 'archived' | 'favorite' | 'isMain' | 'spaceId' | 'scheduleId' | 'providerKey' | 'modelId' | 'account' | 'effort' | 'hostId' | 'repoKey' | 'environment.kind' | 'environment.state' | 'environment.branch' | 'wakes';
|
|
183
200
|
/**
|
|
184
201
|
* A facet an extension computes for each session: `facet.<extensionId>.<key>`,
|
|
185
202
|
* optionally followed by `.<property>` steps into an object value (a number
|
|
@@ -296,6 +313,8 @@ interface Space {
|
|
|
296
313
|
modelOptions?: Record<string, boolean>;
|
|
297
314
|
/** Agent new sessions in this space start on (`AgentProfile.id`); absent = the global default (`Settings.defaultAgent`). */
|
|
298
315
|
agentId?: string;
|
|
316
|
+
/** Where new chats in this space start (a host, a machine, a folder, an isolation); absent = the global default (`Settings.defaultPlace`). */
|
|
317
|
+
place?: NewChatPlace;
|
|
299
318
|
/**
|
|
300
319
|
* A query space (an extension's, or a view the user saved): the sessions
|
|
301
320
|
* it lists besides those stamped with its id. Absent: only those.
|
|
@@ -773,6 +792,12 @@ interface Settings {
|
|
|
773
792
|
* Offline) before it stops with a notice. Unset → 15.
|
|
774
793
|
*/
|
|
775
794
|
machineWaitMinutes?: number;
|
|
795
|
+
/**
|
|
796
|
+
* Where new chats start (`places.ts`): This computer, a saved server, one
|
|
797
|
+
* of its machines, a folder and an isolation. A space's own place wins
|
|
798
|
+
* (`Space.place`). Unset → This computer.
|
|
799
|
+
*/
|
|
800
|
+
defaultPlace?: NewChatPlace | null;
|
|
776
801
|
/**
|
|
777
802
|
* Session environments — which kinds are offered at creation, the
|
|
778
803
|
* default, and each kind's options (secrets live in the environment
|
|
@@ -1489,4 +1514,4 @@ interface Settings {
|
|
|
1489
1514
|
activeIcon: string;
|
|
1490
1515
|
}
|
|
1491
1516
|
//#endregion
|
|
1492
|
-
export {
|
|
1517
|
+
export { SessionQueryAll as Ab, AnsiColor as CT, SessionFieldName as Cb, ToolCallDisplay as Cf, SessionGroupOrder as Db, AnsiStyle as ET, SessionGroupBy as Eb, SessionQueryNot as Fb, SessionSort as Lb, Space as Mf, NewChatPlace as NT, SpaceIcon as Nf, ScriptLineProgress as Qw, SessionCondition as Sb, AnsiSpan as TT, ScriptCallStatus as Zw, OutputStream as bT, QueryBound as bb, Settings as bf, ScriptProgress as iT, EditDiffDisplay as if, SessionQueryAny as jb, EnvironmentConfigValue as kD, SessionQuery as kb, InteractionMode as lf, OpenInTarget as pf, DurabilityMode as rO, ScriptOutputLine as rT, ApprovalMode as rf, ThinkingLevel as rz, SecretTtl as tw, EnvironmentSettings as uD, MessageDelivery as uf, SessionFieldPath as wb, TranscriptDensity as wf, QueryValue as xb, OutputLine as yT, FacetPath as yb };
|