zidane-ui 9.1.3 → 9.1.5
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/server-extensions-host.js +1 -1
- package/dist/adapters/server-host.js +2 -1
- package/dist/adapters/server-machines-host.js +1 -1
- package/dist/adapters/server-session-host.js +87 -13
- package/dist/adapters/server-settings-host.js +1 -1
- 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/HostTranscript.d.ts +5 -1
- package/dist/chat/HostTranscript.js +16 -4
- package/dist/chat/RunEstimateChip.d.ts +5 -3
- package/dist/chat/RunEstimateChip.js +33 -3
- package/dist/chat/Transcript.js +1 -1
- package/dist/chat/composer/ComposerEditor.js +1 -1
- package/dist/chat/composer/ConversationBadges.js +16 -10
- package/dist/chat/composer/composer-bus.d.ts +2 -2
- package/dist/chat/composer/composer-bus.js +2 -2
- package/dist/chat/composer/use-composer-stores.js +1 -1
- package/dist/chat/composer/use-run-meter.js +1 -1
- package/dist/chat/headless/composer/conversation-badges.d.ts +8 -3
- package/dist/chat/headless/composer/conversation-badges.js +26 -11
- package/dist/chat/headless/composer/index.js +2 -2
- package/dist/chat/headless/composer/labels-chrome.d.ts +3 -1
- package/dist/chat/headless/composer/labels-chrome.js +3 -1
- package/dist/chat/headless/index.d.ts +5 -3
- package/dist/chat/headless/index.js +17 -15
- package/dist/chat/headless/labels.d.ts +54 -1
- package/dist/chat/headless/labels.js +62 -2
- package/dist/chat/headless/secrets.d.ts +32 -0
- package/dist/chat/headless/secrets.js +43 -0
- package/dist/chat/headless/session-list.d.ts +45 -0
- package/dist/chat/headless/sidebar/estimates.js +13 -1
- package/dist/chat/headless/sidebar/index.d.ts +2 -2
- package/dist/chat/headless/sidebar/index.js +1 -1
- package/dist/chat/headless/sidebar/labels.d.ts +50 -0
- package/dist/chat/headless/sidebar/labels.js +1 -0
- package/dist/chat/headless/sidebar/query.d.ts +2 -2
- package/dist/chat/headless/sidebar/query.js +6 -3
- package/dist/chat/headless/sidebar/types.d.ts +7 -1
- package/dist/chat/headless/sidebar/view.js +2 -0
- package/dist/chat/headless/transcript/auth-failure.d.ts +67 -0
- package/dist/chat/headless/transcript/auth-failure.js +87 -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.d.ts +3 -3
- package/dist/chat/headless/transcript/nesting.js +12 -4
- package/dist/chat/index.d.ts +4 -2
- package/dist/chat/index.js +3 -1
- package/dist/chat/interactions/InboxPanel.d.ts +6 -2
- package/dist/chat/interactions/InboxPanel.js +82 -44
- package/dist/chat/interactions/PlanCard.d.ts +2 -2
- package/dist/chat/interactions/PlanCard.js +1 -1
- package/dist/chat/interactions/QuestionField.d.ts +8 -3
- package/dist/chat/interactions/QuestionField.js +89 -8
- package/dist/chat/interactions/QuestionForm.d.ts +3 -1
- package/dist/chat/interactions/QuestionForm.js +48 -10
- package/dist/chat/interactions/SecretInput.d.ts +32 -0
- package/dist/chat/interactions/SecretInput.js +72 -0
- package/dist/chat/interactions/card-ui.d.ts +5 -3
- package/dist/chat/interactions/card-ui.js +5 -3
- package/dist/chat/interactions/index.d.ts +2 -1
- package/dist/chat/interactions/index.js +2 -1
- package/dist/chat/sidebar/SessionSidebar.js +2 -0
- package/dist/chat/sidebar/SidebarFilterMenu.d.ts +7 -2
- package/dist/chat/sidebar/SidebarFilterMenu.js +26 -2
- package/dist/chat/sidebar/SidebarSessionRow.d.ts +3 -1
- package/dist/chat/sidebar/SidebarSessionRow.js +8 -3
- package/dist/chat/sidebar/sidebar-live.js +8 -4
- package/dist/chat/transcript/AuthFailureCard.d.ts +34 -0
- package/dist/chat/transcript/AuthFailureCard.js +358 -0
- package/dist/chat/transcript/InteractionToolBody.js +12 -2
- package/dist/chat/transcript/actions.d.ts +24 -1
- package/dist/chat/transcript/index.d.ts +3 -2
- package/dist/chat/transcript/index.js +2 -1
- package/dist/chat/transcript/notices.d.ts +2 -1
- package/dist/chat/transcript/notices.js +13 -1
- package/dist/chat/transcript/script-input.d.ts +1 -1
- package/dist/chat/transcript/shell-block.js +1 -1
- package/dist/components/HowItWorks.d.ts +8 -1
- package/dist/components/HowItWorks.js +2 -2
- package/dist/components/RowActionsMenu.d.ts +6 -1
- package/dist/components/RowActionsMenu.js +4 -0
- package/dist/core.css +24 -0
- package/dist/dist/{index-WlE93Q6d.d.ts → index-BI6RZc60.d.ts} +36 -3
- package/dist/dist/index-f-XWIoYo.d.ts +1 -0
- package/dist/dist/index.d.ts +6 -0
- package/dist/dist/sandbox-B4OW6oNx.d.ts +2 -0
- package/dist/dist/timeout-B5pO5I5a.d.ts +30 -0
- package/dist/extensions/ExtensionSettingsPage.js +1 -1
- package/dist/extensions/ExtensionSettingsSidebar.js +1 -1
- package/dist/extensions/headless/fixture-host.js +1 -1
- package/dist/extensions/headless/index.js +4 -4
- package/dist/extensions/hooks.js +1 -1
- package/dist/files/DiffsTab.js +1 -1
- package/dist/files/EditorColumn.js +1 -1
- package/dist/files/MediaDiff.js +1 -1
- package/dist/files/SearchPanel.js +121 -53
- package/dist/files/headless/name-match.js +29 -14
- package/dist/files/useEntryActions.js +1 -1
- package/dist/files/useOpenFiles.js +1 -1
- package/dist/git/WherePicker.js +2 -2
- package/dist/git/headless/environment.d.ts +6 -1
- package/dist/git/headless/environment.js +5 -2
- package/dist/git/headless/labels.d.ts +2 -0
- package/dist/git/headless/labels.js +2 -0
- package/dist/git/index.d.ts +2 -1
- package/dist/git/index.js +2 -1
- package/dist/git/useStartFromPanel.d.ts +22 -0
- package/dist/git/useStartFromPanel.js +91 -0
- package/dist/keybindings/KeyCommands.js +1 -1
- package/dist/keybindings/KeybindingsProvider.js +1 -1
- package/dist/keybindings/headless/catalog.js +2 -2
- package/dist/keybindings/headless/index.js +2 -2
- package/dist/keybindings/headless/overrides.js +1 -1
- package/dist/machines/HostSyncPanel.js +1 -1
- package/dist/machines/SyncOutcomeBadge.js +1 -1
- package/dist/machines/headless/index.js +1 -1
- package/dist/onboarding/demos/features.d.ts +9 -1
- package/dist/onboarding/demos/features.js +107 -2
- package/dist/onboarding/demos/how-it-works.d.ts +5 -1
- package/dist/onboarding/demos/how-it-works.js +120 -2
- package/dist/onboarding/headless/labels.d.ts +17 -0
- package/dist/onboarding/headless/labels.js +17 -0
- package/dist/onboarding/index.js +1 -1
- package/dist/onboarding/marks.d.ts +1 -2
- package/dist/onboarding/marks.js +4 -12
- package/dist/onboarding/steps/ReadyStep.js +1 -1
- package/dist/onboarding/steps/connect/ProviderPanel.js +1 -1
- package/dist/onboarding/tutorials.d.ts +3 -1
- package/dist/onboarding/tutorials.js +2 -1
- package/dist/palette/app-sources.js +1 -1
- package/dist/session/ArtifactsPanel.js +1 -1
- package/dist/session/PanelAttention.d.ts +14 -6
- package/dist/session/PanelAttention.js +35 -24
- package/dist/session/PlanTracker.d.ts +54 -0
- package/dist/session/PlanTracker.js +412 -0
- package/dist/session/ProjectHome.d.ts +15 -2
- package/dist/session/ProjectHome.js +158 -85
- package/dist/session/RemindersPanel.d.ts +25 -0
- package/dist/session/RemindersPanel.js +526 -0
- package/dist/session/SecretsPanel.d.ts +19 -0
- package/dist/session/SecretsPanel.js +241 -0
- package/dist/session/SessionProvider.d.ts +26 -5
- package/dist/session/SessionProvider.js +51 -6
- package/dist/session/StepStatusIcon.d.ts +24 -0
- package/dist/session/StepStatusIcon.js +50 -0
- package/dist/session/TodoList.d.ts +4 -3
- package/dist/session/TodoList.js +6 -5
- package/dist/session/headless/fixture-host.d.ts +32 -22
- package/dist/session/headless/fixture-host.js +86 -51
- package/dist/session/headless/fixture-plans.d.ts +57 -0
- package/dist/session/headless/fixture-plans.js +141 -0
- package/dist/session/headless/fixture-schedules.d.ts +49 -0
- package/dist/session/headless/fixture-schedules.js +133 -0
- package/dist/session/headless/home-layout.d.ts +10 -2
- package/dist/session/headless/home-layout.js +7 -2
- package/dist/session/headless/host.d.ts +85 -13
- package/dist/session/headless/index.d.ts +5 -3
- package/dist/session/headless/index.js +6 -4
- package/dist/session/headless/labels.d.ts +95 -12
- package/dist/session/headless/labels.js +67 -18
- package/dist/session/headless/plans.d.ts +53 -0
- package/dist/session/headless/plans.js +78 -0
- package/dist/session/headless/reminder-labels.d.ts +63 -0
- package/dist/session/headless/reminder-labels.js +84 -0
- package/dist/session/headless/schedules.d.ts +93 -0
- package/dist/session/headless/schedules.js +190 -0
- package/dist/session/headless/secrets.d.ts +28 -0
- package/dist/session/headless/secrets.js +48 -0
- package/dist/session/index.d.ts +7 -5
- package/dist/session/index.js +6 -4
- package/dist/session/testing/contract.d.ts +18 -5
- package/dist/session/testing/contract.js +351 -43
- package/dist/session/testing/index.d.ts +4 -2
- package/dist/session/testing/index.js +4 -2
- package/dist/settings/headless/catalog.js +17 -1
- package/dist/settings/headless/index.d.ts +2 -2
- package/dist/settings/headless/index.js +3 -3
- package/dist/settings/headless/labels.d.ts +0 -2
- package/dist/settings/headless/labels.js +0 -2
- package/dist/settings/headless/layout.js +7 -1
- package/dist/settings/headless/providers.d.ts +17 -1
- package/dist/settings/headless/providers.js +19 -1
- package/dist/settings/headless/search.d.ts +1 -1
- package/dist/settings/rows.d.ts +1 -1
- package/dist/settings/rows.js +2 -2
- 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 +1 -1
- package/dist/settings/sections/environments/EnvironmentsSection.js +1 -1
- package/dist/settings/sections/extensions/ChangeOriginDialog.js +1 -1
- package/dist/settings/sections/extensions/CreateExtensionDialog.js +1 -1
- package/dist/settings/sections/extensions/ExtensionsSection.js +1 -1
- package/dist/settings/sections/host-catalog/HostCatalogSection.js +1 -1
- package/dist/settings/sections/instructions/InstructionsSection.js +1 -1
- package/dist/settings/sections/mcp/McpSection.js +1 -1
- package/dist/settings/sections/mcp/McpServerRow.js +1 -1
- package/dist/settings/sections/models/ModelRows.js +1 -1
- package/dist/settings/sections/providers/ProvidersSection.js +209 -201
- package/dist/settings/sections/providers/ServerProvidersSection.js +1 -1
- package/dist/settings/sections/shared/catalog.js +1 -1
- package/dist/settings/sections/skills/SkillsSection.js +1 -1
- package/dist/styles.css +59 -1
- package/dist/terminal/HostTerminalSurface.js +2 -2
- package/dist/workspace/PanelContentView.d.ts +22 -4
- package/dist/workspace/PanelContentView.js +112 -16
- package/dist/workspace/PanelGlyph.d.ts +21 -0
- package/dist/workspace/PanelGlyph.js +33 -0
- package/dist/workspace/PanelHome.js +5 -3
- package/dist/workspace/PanelStrip.js +11 -4
- package/dist/workspace/PanelToolbar.d.ts +32 -0
- package/dist/workspace/PanelToolbar.js +194 -0
- package/dist/workspace/WorkspaceProvider.d.ts +3 -1
- package/dist/workspace/WorkspaceProvider.js +6 -2
- package/dist/workspace/extension-tabs.js +5 -2
- package/dist/workspace/headless/host.d.ts +4 -0
- package/dist/workspace/headless/index.d.ts +3 -1
- package/dist/workspace/headless/index.js +4 -2
- package/dist/workspace/headless/labels.d.ts +10 -0
- package/dist/workspace/headless/labels.js +11 -1
- package/dist/workspace/headless/pages.d.ts +15 -0
- package/dist/workspace/headless/pages.js +49 -0
- package/dist/workspace/headless/tab-mark.d.ts +14 -0
- package/dist/workspace/headless/tab-mark.js +27 -0
- package/dist/workspace/headless/view.d.ts +7 -1
- package/dist/workspace/index.d.ts +3 -2
- package/dist/workspace/index.js +3 -2
- package/dist/workspace/testing/index.js +6 -0
- package/dist/workspace/workspace-key-commands.js +3 -3
- package/package.json +2 -2
- package/src/styles/motion.css +13 -0
- package/src/styles/onboarding.css +0 -1
- package/src/styles/primitives.css +10 -0
- package/src/styles/workspace.css +17 -0
- package/dist/session/TodosPanel.d.ts +0 -19
- package/dist/session/TodosPanel.js +0 -251
- package/dist/session/headless/todos.d.ts +0 -22
- package/dist/session/headless/todos.js +0 -38
|
@@ -7,6 +7,8 @@ import { PanelContentView } from "../workspace/PanelContentView.js";
|
|
|
7
7
|
import { useExtensionPanels } from "../workspace/WorkspaceProvider.js";
|
|
8
8
|
import { ExtensionSlot } from "../extensions/ExtensionSlot.js";
|
|
9
9
|
import { ProjectMenu } from "../chat/composer/ProjectMenu.js";
|
|
10
|
+
import { PanelGlyph } from "../workspace/PanelGlyph.js";
|
|
11
|
+
import { appendPanelPage } from "../workspace/headless/pages.js";
|
|
10
12
|
import { EMPTY_HOME_PREFS, arrangeHomeBlocks, hideHomeBlock, homeBlocksOf, homeRows, moveHomeBlock, parseHomePrefs, placeHomeBlock, setHomeBlockView, setHomeBlockWidth, showHomeBlock } from "./headless/home-layout.js";
|
|
11
13
|
import { useUsageSummary } from "./useUsageSummary.js";
|
|
12
14
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -39,7 +41,7 @@ function useHomePrefs(projectKey) {
|
|
|
39
41
|
*
|
|
40
42
|
* @param props - The {@link ProjectHomeProps}.
|
|
41
43
|
*/
|
|
42
|
-
function ProjectHome({ panels, cwd, projectKey, project, switcher, blocksUnavailable = false, defaultBlocks, onOpenSession, onOpenPath, onOpenRepo, onOpenFiles, onRevealPath, onOpenInEditor, now: nowProp, className = "", style }) {
|
|
44
|
+
function ProjectHome({ panels, cwd, projectKey, project, switcher, blocksUnavailable = false, defaultBlocks, onOpenSession, onOpenPath, onStartSession, onOpenRepo, onOpenFiles, onRevealPath, onOpenInEditor, now: nowProp, className = "", style }) {
|
|
43
45
|
const labels = useSessionLabels();
|
|
44
46
|
const catalog = useExtensionPanels(panels, panels ? cwd : null);
|
|
45
47
|
const blocks = useMemo(() => homeBlocksOf(catalog), [catalog]);
|
|
@@ -89,7 +91,8 @@ function ProjectHome({ panels, cwd, projectKey, project, switcher, blocksUnavail
|
|
|
89
91
|
onHide: hide,
|
|
90
92
|
onView: setView,
|
|
91
93
|
onOpenSession,
|
|
92
|
-
onOpenPath
|
|
94
|
+
onOpenPath,
|
|
95
|
+
onStartSession
|
|
93
96
|
}, block.id);
|
|
94
97
|
let index = 0;
|
|
95
98
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -313,10 +316,14 @@ function CustomizeControls({ editing, onEditing, hidden, onShow }) {
|
|
|
313
316
|
* the window comes back after `BLOCK_STALE_MS` (nothing while nobody looks).
|
|
314
317
|
* A slower answer for an older view never lands over a newer one.
|
|
315
318
|
*/
|
|
316
|
-
function useHomeBlock(panels, cwd, id, view) {
|
|
319
|
+
function useHomeBlock(panels, cwd, id, view, search) {
|
|
317
320
|
const viewKey = JSON.stringify(view ?? {});
|
|
318
321
|
const [rev, setRev] = useState(0);
|
|
319
|
-
const key = `${cwd}\u0000${id}\u0000${viewKey}\u0000${rev}`;
|
|
322
|
+
const key = `${cwd}\u0000${id}\u0000${viewKey}\u0000${search}\u0000${rev}`;
|
|
323
|
+
const [paged, setPaged] = useState(null);
|
|
324
|
+
const [loadingMore, setLoadingMore] = useState(false);
|
|
325
|
+
const keyRef = useRef(key);
|
|
326
|
+
keyRef.current = key;
|
|
320
327
|
const [loaded, setLoaded] = useState({
|
|
321
328
|
key: "",
|
|
322
329
|
content: null,
|
|
@@ -325,12 +332,7 @@ function useHomeBlock(panels, cwd, id, view) {
|
|
|
325
332
|
const loadedAt = useRef(0);
|
|
326
333
|
useEffect(() => {
|
|
327
334
|
let current = true;
|
|
328
|
-
|
|
329
|
-
const ctx = {
|
|
330
|
-
surface: "home",
|
|
331
|
-
...Object.keys(picked).length > 0 ? { view: picked } : {}
|
|
332
|
-
};
|
|
333
|
-
panels.load(cwd, id, ctx).then((content) => {
|
|
335
|
+
panels.load(cwd, id, blockContext(viewKey, search)).then((content) => {
|
|
334
336
|
if (!current) return;
|
|
335
337
|
loadedAt.current = Date.now();
|
|
336
338
|
setLoaded({
|
|
@@ -351,6 +353,7 @@ function useHomeBlock(panels, cwd, id, view) {
|
|
|
351
353
|
cwd,
|
|
352
354
|
id,
|
|
353
355
|
viewKey,
|
|
356
|
+
search,
|
|
354
357
|
key
|
|
355
358
|
]);
|
|
356
359
|
useEffect(() => panels.watch?.(cwd, id), [
|
|
@@ -377,20 +380,68 @@ function useHomeBlock(panels, cwd, id, view) {
|
|
|
377
380
|
};
|
|
378
381
|
}, []);
|
|
379
382
|
const reload = useCallback(() => setRev((r) => r + 1), []);
|
|
383
|
+
const shown = paged?.key === key ? paged.content : loaded.key === key ? loaded.content : null;
|
|
384
|
+
const more = useCallback(() => {
|
|
385
|
+
const cursor = shown?.more?.cursor;
|
|
386
|
+
if (!shown || !cursor || loadingMore) return;
|
|
387
|
+
setLoadingMore(true);
|
|
388
|
+
panels.load(cwd, id, {
|
|
389
|
+
...blockContext(viewKey, search),
|
|
390
|
+
cursor
|
|
391
|
+
}).then((page) => {
|
|
392
|
+
if (keyRef.current === key) setPaged({
|
|
393
|
+
key,
|
|
394
|
+
content: appendPanelPage(shown, page)
|
|
395
|
+
});
|
|
396
|
+
}, (err) => keyRef.current === key && setLoaded((s) => ({
|
|
397
|
+
...s,
|
|
398
|
+
error: err instanceof Error ? err.message : String(err)
|
|
399
|
+
}))).finally(() => setLoadingMore(false));
|
|
400
|
+
}, [
|
|
401
|
+
panels,
|
|
402
|
+
cwd,
|
|
403
|
+
id,
|
|
404
|
+
viewKey,
|
|
405
|
+
search,
|
|
406
|
+
key,
|
|
407
|
+
shown,
|
|
408
|
+
loadingMore
|
|
409
|
+
]);
|
|
380
410
|
return {
|
|
381
|
-
content: loaded.content,
|
|
411
|
+
content: shown ?? loaded.content,
|
|
382
412
|
error: loaded.error,
|
|
383
413
|
loading: loaded.key !== key,
|
|
384
|
-
reload
|
|
414
|
+
reload,
|
|
415
|
+
more,
|
|
416
|
+
loadingMore
|
|
417
|
+
};
|
|
418
|
+
}
|
|
419
|
+
/** What a block loads with: the home surface, its view and its search. */
|
|
420
|
+
function blockContext(viewKey, search) {
|
|
421
|
+
const picked = JSON.parse(viewKey);
|
|
422
|
+
return {
|
|
423
|
+
surface: "home",
|
|
424
|
+
...Object.keys(picked).length > 0 ? { view: picked } : {},
|
|
425
|
+
...search ? { search } : {}
|
|
385
426
|
};
|
|
386
427
|
}
|
|
387
428
|
/** A block shown longer than this loads again when the window comes back. */
|
|
388
429
|
const BLOCK_STALE_MS = 3e5;
|
|
389
430
|
/** What a dragged block card carries: its id. */
|
|
390
431
|
const DRAG_TYPE = "application/x-zidane-home-block";
|
|
391
|
-
const HomeBlockCard = memo(function HomeBlockCard({ panels, cwd, block, view, first, last, editing, onMove, onPlace, onWidth, onHide, onView, onOpenSession, onOpenPath }) {
|
|
432
|
+
const HomeBlockCard = memo(function HomeBlockCard({ panels, cwd, block, view, first, last, editing, onMove, onPlace, onWidth, onHide, onView, onOpenSession, onOpenPath, onStartSession }) {
|
|
392
433
|
const labels = useSessionLabels();
|
|
393
|
-
const
|
|
434
|
+
const [search, setSearch] = useState("");
|
|
435
|
+
const { content, loading, error, reload, more, loadingMore } = useHomeBlock(panels, cwd, block.id, view, search);
|
|
436
|
+
const [notice, setNotice] = useState(null);
|
|
437
|
+
const onStart = useMemo(() => onStartSession ? async (start) => {
|
|
438
|
+
setNotice(null);
|
|
439
|
+
const result = await onStartSession(start).catch((err) => ({
|
|
440
|
+
ok: false,
|
|
441
|
+
message: err instanceof Error ? err.message : String(err)
|
|
442
|
+
}));
|
|
443
|
+
if (!result.ok) setNotice(result.message);
|
|
444
|
+
} : void 0, [onStartSession]);
|
|
394
445
|
const [dropTarget, setDropTarget] = useState(false);
|
|
395
446
|
const menuAnchor = useRef(null);
|
|
396
447
|
const [menuOpen, setMenuOpen] = useState(false);
|
|
@@ -441,77 +492,99 @@ const HomeBlockCard = memo(function HomeBlockCard({ panels, cwd, block, view, fi
|
|
|
441
492
|
const id = event.dataTransfer.getData(DRAG_TYPE);
|
|
442
493
|
if (id) onPlace(id, block.id);
|
|
443
494
|
} : void 0,
|
|
444
|
-
children: [
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
"
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
495
|
+
children: [
|
|
496
|
+
/* @__PURE__ */ jsxs("header", {
|
|
497
|
+
className: "flex items-center justify-between gap-2 mb-3 min-h-6",
|
|
498
|
+
children: [/* @__PURE__ */ jsxs("h2", {
|
|
499
|
+
className: "zg-section-label m-0 flex items-center gap-1.5 min-w-0",
|
|
500
|
+
children: [
|
|
501
|
+
editing && /* @__PURE__ */ jsx("span", {
|
|
502
|
+
"aria-hidden": true,
|
|
503
|
+
title: labels.projectHomeDrag(title),
|
|
504
|
+
className: "i-ph-dots-six-vertical shrink-0 text-[var(--zg-text-muted)]"
|
|
505
|
+
}),
|
|
506
|
+
/* @__PURE__ */ jsx(PanelGlyph, {
|
|
507
|
+
tab: block,
|
|
508
|
+
className: "shrink-0"
|
|
509
|
+
}),
|
|
510
|
+
/* @__PURE__ */ jsx("span", {
|
|
511
|
+
className: "truncate",
|
|
512
|
+
children: title
|
|
513
|
+
})
|
|
514
|
+
]
|
|
515
|
+
}), editing ? /* @__PURE__ */ jsxs("div", {
|
|
516
|
+
className: "flex items-center gap-0.5 shrink-0",
|
|
517
|
+
children: [
|
|
518
|
+
!first && /* @__PURE__ */ jsx(IconButton, {
|
|
519
|
+
icon: "i-ph-arrow-up",
|
|
520
|
+
size: "xs",
|
|
521
|
+
label: labels.projectHomeMoveUp,
|
|
522
|
+
onClick: () => onMove(block.id, -1)
|
|
523
|
+
}),
|
|
524
|
+
!last && /* @__PURE__ */ jsx(IconButton, {
|
|
525
|
+
icon: "i-ph-arrow-down",
|
|
526
|
+
size: "xs",
|
|
527
|
+
label: labels.projectHomeMoveDown,
|
|
528
|
+
onClick: () => onMove(block.id, 1)
|
|
529
|
+
}),
|
|
530
|
+
/* @__PURE__ */ jsx(IconButton, {
|
|
531
|
+
icon: half ? "i-ph-arrows-out-line-horizontal" : "i-ph-arrows-in-line-horizontal",
|
|
532
|
+
size: "xs",
|
|
533
|
+
label: half ? labels.projectHomeFullWidth : labels.projectHomeHalfWidth,
|
|
534
|
+
onClick: () => onWidth(block.id, half ? "full" : "half")
|
|
535
|
+
}),
|
|
536
|
+
/* @__PURE__ */ jsx(IconButton, {
|
|
537
|
+
icon: "i-ph-eye-slash",
|
|
538
|
+
size: "xs",
|
|
539
|
+
label: labels.projectHomeHide,
|
|
540
|
+
onClick: () => onHide(block.id)
|
|
541
|
+
})
|
|
542
|
+
]
|
|
543
|
+
}) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(IconButton, {
|
|
544
|
+
ref: menuAnchor,
|
|
545
|
+
icon: "i-ph-dots-three",
|
|
546
|
+
size: "xs",
|
|
547
|
+
label: labels.projectHomeBlockMenu(title),
|
|
548
|
+
"aria-haspopup": "menu",
|
|
549
|
+
"aria-expanded": menuOpen,
|
|
550
|
+
onClick: () => setMenuOpen(true)
|
|
551
|
+
}), /* @__PURE__ */ jsx(RowActionsMenu, {
|
|
552
|
+
open: menuOpen,
|
|
553
|
+
anchorRef: menuAnchor,
|
|
554
|
+
onClose: () => setMenuOpen(false),
|
|
555
|
+
items
|
|
556
|
+
})] })]
|
|
557
|
+
}),
|
|
558
|
+
notice && /* @__PURE__ */ jsxs("div", {
|
|
559
|
+
role: "alert",
|
|
560
|
+
className: "mb-3 flex items-start gap-2 text-zg-label text-[var(--zg-warn)]",
|
|
561
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
562
|
+
className: "flex-1 min-w-0",
|
|
563
|
+
children: notice
|
|
564
|
+
}), /* @__PURE__ */ jsx(IconButton, {
|
|
565
|
+
icon: "i-ph-x",
|
|
566
|
+
size: "xs",
|
|
567
|
+
label: labels.projectHomeDismiss,
|
|
568
|
+
onClick: () => setNotice(null)
|
|
569
|
+
})]
|
|
570
|
+
}),
|
|
571
|
+
/* @__PURE__ */ jsx(PanelContentView, {
|
|
572
|
+
variant: "block",
|
|
573
|
+
content,
|
|
574
|
+
loading,
|
|
575
|
+
error,
|
|
576
|
+
onAction,
|
|
577
|
+
onControl,
|
|
578
|
+
...view ? { view } : {},
|
|
579
|
+
search,
|
|
580
|
+
onSearch: setSearch,
|
|
581
|
+
onMore: more,
|
|
582
|
+
loadingMore,
|
|
583
|
+
...onStart ? { onStart } : {},
|
|
584
|
+
...onOpenSession ? { onOpenSession } : {},
|
|
585
|
+
...onOpenPath ? { onOpenPath } : {}
|
|
586
|
+
})
|
|
587
|
+
]
|
|
515
588
|
});
|
|
516
589
|
});
|
|
517
590
|
//#endregion
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { CSSProperties } from "react";
|
|
2
|
+
//#region src/session/RemindersPanel.d.ts
|
|
3
|
+
/** Which reminders the panel lists. */
|
|
4
|
+
type RemindersScope = 'session' | 'all';
|
|
5
|
+
/** Props for {@link RemindersPanel}. */
|
|
6
|
+
interface RemindersPanelProps {
|
|
7
|
+
/** The session the panel is beside: its reminders, and where a new one goes. */
|
|
8
|
+
sessionId: string;
|
|
9
|
+
/** The list it opens on. @default 'session' */
|
|
10
|
+
initialScope?: RemindersScope;
|
|
11
|
+
/** Opens a session: a reminder that goes to another session links to it. Default: the `OpenSessionContext` opener. */
|
|
12
|
+
onOpenSession?: (sessionId: string) => void;
|
|
13
|
+
/** Extra classes on the root. */
|
|
14
|
+
className?: string;
|
|
15
|
+
/** Inline styles on the root. */
|
|
16
|
+
style?: CSSProperties;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Renders the reminders of a session, or all of them, with the create form.
|
|
20
|
+
*
|
|
21
|
+
* @param props - The `sessionId`, `initialScope`, `className` and `style`.
|
|
22
|
+
*/
|
|
23
|
+
declare function RemindersPanel({ sessionId, initialScope, onOpenSession, className, style }: RemindersPanelProps): import("react").JSX.Element | null;
|
|
24
|
+
//#endregion
|
|
25
|
+
export { RemindersPanel, RemindersPanelProps, RemindersScope };
|