@kortix/ui 0.14.16 → 0.14.17
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/_vendor/shared/artifact-annotations.d.ts +126 -1
- package/dist/_vendor/shared/artifact-comments.d.ts +30 -1
- package/dist/customize/settings/tabs/experimental-tab.js +1 -4
- package/dist/customize/shared/channels-switch-dialog.d.ts +4 -8
- package/dist/customize/shared/channels-switch-dialog.js +5 -16
- package/dist/customize/shared/feature-gate-screen.js +5 -7
- package/dist/files/drives/drive-path-param.d.ts +4 -0
- package/dist/files/drives/drive-path-param.js +50 -0
- package/dist/files/index.d.ts +1 -0
- package/dist/files/index.js +1 -0
- package/dist/i18n/en.d.ts +48 -14
- package/dist/i18n/en.js +60 -26
- package/dist/markdown/doc-editor/doc-menus.d.ts +6 -0
- package/dist/markdown/doc-editor/doc-menus.js +74 -9
- package/dist/session/status/provisioning-failure.d.ts +22 -1
- package/dist/session/status/provisioning-failure.js +35 -7
- package/dist/styles.css +1 -1
- package/dist/workspace/sidebar/project-session-list.js +13 -26
- package/dist/workspace/sidebar/session-brief-hover-card.d.ts +0 -3
- package/dist/workspace/sidebar/session-brief-hover-card.js +0 -3
- package/package.json +3 -3
- package/skills/kortix-ui/references/modules.md +1 -1
|
@@ -27,7 +27,7 @@ import { subagentTitle } from '../../session/agents/agent-model.js';
|
|
|
27
27
|
import { SessionLabelsModal } from './modal/session-labels-modal.js';
|
|
28
28
|
import { ShareSessionModal } from './modal/share-session-modal.js';
|
|
29
29
|
import { getSessionDisplayTitle, groupChangeRequestsBySession, projectSessionsRefetchInterval, resolveSessionListViewState, shortRelative, starterSectionOf, } from '../../session/actions/project-session-list-helpers.js';
|
|
30
|
-
import {
|
|
30
|
+
import { SessionBriefDescription, SessionBriefCardHost, SessionBriefHoverCard, SubagentHoverCard, } from './session-brief-hover-card.js';
|
|
31
31
|
import { SessionFilterMenu } from './session-filter-menu.js';
|
|
32
32
|
import { SESSION_MENU_TRIGGER_CLASS, SESSION_ROW_HEIGHT_CLASS, SIDEBAR_PAGE_SIZE, ShowMoreButton, } from './session-list-chrome.js';
|
|
33
33
|
import { SessionGroupNameModal, SessionGroupSections, UngroupDropArea, startSessionDrag, useSessionGroupActions, } from './session-group-sections.js';
|
|
@@ -51,30 +51,17 @@ import { useEffect, useId, useMemo, useRef, useState } from 'react';
|
|
|
51
51
|
import { useSessionListActions } from '../../session/actions/use-session-list-actions.js';
|
|
52
52
|
import { Separator } from '../../primitives/separator.js';
|
|
53
53
|
const SESSION_RELATIVE_TIME_CLASS = 'text-muted-foreground block w-10 min-w-10 max-w-10 shrink-0 truncate text-right text-xs tabular-nums';
|
|
54
|
-
/** The same trigger on a touch
|
|
54
|
+
/** The same trigger on a device that cannot hover (touch).
|
|
55
55
|
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
56
|
+
* A row looks the same everywhere: one line, `h-8`, at every width. A touch
|
|
57
|
+
* row is a desktop row under the pointer: the `⋯` square sits in the same
|
|
58
|
+
* place at the same size, it is only always visible, because a finger cannot
|
|
59
|
+
* hover to reveal it. An unpainted `::after` grows the tap target to the row's
|
|
60
|
+
* height without growing the square.
|
|
59
61
|
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
|
|
63
|
-
* heavy as the row it belongs to. The square is `size-8` and an unpainted
|
|
64
|
-
* `::after` carries the touch target instead:
|
|
65
|
-
*
|
|
66
|
-
* size-8 8 × 0.23rem = 29.44px ← what you see
|
|
67
|
-
* after:-inset-2 + 2 × 7.36px = 44.16px ← what you can hit
|
|
68
|
-
*
|
|
69
|
-
* 44.16px is exactly `min-h-12`, so the target fills the row's height and not
|
|
70
|
-
* one pixel more: it can never annex a neighbouring row's right edge. Nothing
|
|
71
|
-
* in the row clips (`overflow-hidden` would drop the overflowing hit area), and
|
|
72
|
-
* `px-2` on the row is 7.36px, so the target ends flush with the row's edge.
|
|
73
|
-
*
|
|
74
|
-
* All three variants are the exact complement of the hover-card gate
|
|
75
|
-
* (`min-width: 768px` AND `hover: hover` AND `pointer: fine`), which is why the
|
|
76
|
-
* same block is written narrow-viewport, no-hover, and coarse-pointer. */
|
|
77
|
-
const SESSION_MENU_TRIGGER_TOUCH_CLASS = cn("max-md:pointer-events-auto max-md:relative max-md:size-8 max-md:translate-y-0 max-md:opacity-100 max-md:after:absolute max-md:after:-inset-2 max-md:after:content-['']", "[@media(hover:none)]:pointer-events-auto [@media(hover:none)]:relative [@media(hover:none)]:size-8 [@media(hover:none)]:translate-y-0 [@media(hover:none)]:opacity-100 [@media(hover:none)]:after:absolute [@media(hover:none)]:after:-inset-2 [@media(hover:none)]:after:content-['']", "pointer-coarse:pointer-events-auto pointer-coarse:relative pointer-coarse:size-8 pointer-coarse:translate-y-0 pointer-coarse:opacity-100 pointer-coarse:after:absolute pointer-coarse:after:-inset-2 pointer-coarse:after:content-['']");
|
|
62
|
+
* A narrow window with a mouse is not a touch device: it keeps hover, so it
|
|
63
|
+
* gets no variant here. */
|
|
64
|
+
const SESSION_MENU_TRIGGER_TOUCH_CLASS = cn("[@media(hover:none)]:pointer-events-auto [@media(hover:none)]:opacity-100 [@media(hover:none)]:after:absolute [@media(hover:none)]:after:-inset-1 [@media(hover:none)]:after:content-['']", "pointer-coarse:pointer-events-auto pointer-coarse:opacity-100 pointer-coarse:after:absolute pointer-coarse:after:-inset-1 pointer-coarse:after:content-['']");
|
|
78
65
|
/** The Pinned section's id in the collapsed-sections store: open unless closed. */
|
|
79
66
|
const PINNED_SECTION_ID = 'section:pinned';
|
|
80
67
|
/** The whole Sessions list, collapsed from its header (same store as the sections). */
|
|
@@ -581,14 +568,14 @@ function ProjectSessionRow({ session, href, isActive, isSwitching, onNavigate, d
|
|
|
581
568
|
// same `reviewCount` prop, so they agree by construction rather than by luck.
|
|
582
569
|
const displayStatus = sessionDisplayStatus(session, reviewCount);
|
|
583
570
|
const waitingOn = awaitingAnswer ? 'answer' : 'review';
|
|
584
|
-
const sessionLink = (_jsxs(HoverPrefetchLink, { href: href, prefetch: true, onClick: onNavigate, ...openIntent, "aria-busy": isSwitching || undefined, "aria-current": isActive ? 'page' : undefined, "aria-describedby": descriptionId, className: "focus-visible:ring-kortix-base flex min-w-0 flex-1 items-center gap-2 self-stretch rounded-md py-1 focus-visible:ring-[0.6px] focus-visible:outline-none", children: [_jsx("div", { className: "size-4 shrink-0", children: spawned ? (_jsx(ArrowsSplitIcon, { "aria-hidden": true, className: "text-muted-foreground size-4" })) : (_jsx(SessionStatusDot, { session: session, reviewCount: reviewCount, waitingOn: waitingOn, changeRequests: changeRequests })) }), _jsx(SessionGoalMark, { projectId: session.project_id, sessionId: session.session_id }),
|
|
571
|
+
const sessionLink = (_jsxs(HoverPrefetchLink, { href: href, prefetch: true, onClick: onNavigate, ...openIntent, "aria-busy": isSwitching || undefined, "aria-current": isActive ? 'page' : undefined, "aria-describedby": descriptionId, className: "focus-visible:ring-kortix-base flex min-w-0 flex-1 items-center gap-2 self-stretch rounded-md py-1 focus-visible:ring-[0.6px] focus-visible:outline-none", children: [_jsx("div", { className: "size-4 shrink-0", children: spawned ? (_jsx(ArrowsSplitIcon, { "aria-hidden": true, className: "text-muted-foreground size-4" })) : (_jsx(SessionStatusDot, { session: session, reviewCount: reviewCount, waitingOn: waitingOn, changeRequests: changeRequests })) }), _jsx(SessionGoalMark, { projectId: session.project_id, sessionId: session.session_id }), _jsx("span", { className: "min-w-0 flex-1", children: _jsx(SessionTitle, { title: displayTitle, className: cn('min-w-0', isActive && 'font-medium') }) }), subagentCount + spawnedCount > 0 && onToggleChildRuns && (_jsx(ChildRunsToggle, { count: subagentCount + spawnedCount, open: childRunsOpen, onToggle: onToggleChildRuns, clearOfMenu: !hasIndicators })), hasIndicators && (_jsxs("div", { className: cn('flex shrink-0 items-center gap-0 transition-none', 'pointer-coarse:hidden [@media(hover:none)]:hidden', 'group-hover/session-list:pointer-events-none group-hover/session-list:opacity-0', 'group-has-data-[state=open]/session-list:pointer-events-none group-has-data-[state=open]/session-list:opacity-0'), "data-session-indicators": "true", children: [showStarter && (_jsx("span", { className: "flex size-5 shrink-0 items-center justify-center", "data-session-source": "true", "data-session-starter": starter.type, children: _jsx(Hint, { side: "top", label: t('startedByLabel', { name: starter.label }), children: _jsx("span", { className: "text-muted-foreground flex size-5 items-center justify-center", children: _jsx(SessionStarterMark, { session: session, starter: starter, iconClassName: "size-3", avatarClassName: "size-5" }) }) }) })), !inSharedGroup && _jsx(SessionSharedIcon, { session: session })] }))] }));
|
|
585
572
|
return (_jsx("div", { className: "group/session-list block", onDragStart: onDragStart, children: _jsxs("div", { className: cn(
|
|
586
573
|
// --session-row-surface paints the row AND the title fade in the same
|
|
587
574
|
// style pass. Do not transition background — transition-colors made the
|
|
588
575
|
// fill ease for 150ms while the fade snapped, which read as a flicker.
|
|
589
576
|
// Paint with the variable (not bg-card + a different surface token) so
|
|
590
577
|
// the end fade can never disagree with the row fill.
|
|
591
|
-
'relative flex h-8 cursor-pointer items-center gap-2 rounded-md px-2 transition-none',
|
|
578
|
+
'relative flex h-8 cursor-pointer items-center gap-2 rounded-md px-2 transition-none', isActive
|
|
592
579
|
? 'text-sidebar-foreground bg-(--session-row-surface) font-medium [--session-row-surface:var(--sidebar-row)]'
|
|
593
580
|
: 'text-muted-foreground hover:text-sidebar-foreground bg-(--session-row-surface) [--session-row-surface:var(--background)] hover:[--session-row-surface:var(--sidebar-row)]'), children: [canShowHoverCard ? (_jsx(SessionBriefHoverCard, { sessionId: session.session_id, title: displayTitle, status: displayStatus, createdAt: session.created_at, source: source, changeRequests: changeRequests, waitingOn: waitingOn, spawned: spawned, subagentCount: subagentCount, spawnedCount: spawnedCount, labels: session.labels, projectId: session.project_id, children: sessionLink })) : (sessionLink), _jsx(SessionBriefDescription, { id: descriptionId, status: displayStatus, createdAt: session.created_at, source: source, changeRequests: changeRequests, waitingOn: waitingOn }), _jsxs(DropdownMenu, { open: menuOpen, onOpenChange: setMenuOpen, children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "ghost", size: "icon", type: "button", "aria-label": t('sessionList.actionsFor', { title: displayTitle }), className: cn(SESSION_MENU_TRIGGER_CLASS, 'absolute top-1/2 right-1 z-10 -translate-y-1/2', 'bg-(--session-row-surface)', 'pointer-events-none opacity-0', 'group-hover/session-list:pointer-events-auto group-hover/session-list:opacity-100', 'focus-visible:pointer-events-auto focus-visible:opacity-100', 'data-[state=open]:pointer-events-auto data-[state=open]:opacity-100', SESSION_MENU_TRIGGER_TOUCH_CLASS), onClick: (e) => {
|
|
594
581
|
e.preventDefault();
|
|
@@ -611,7 +598,7 @@ function ProjectSessionRow({ session, href, isActive, isSwitching, onNavigate, d
|
|
|
611
598
|
*/
|
|
612
599
|
function FirstChatRow({ projectId, isActive }) {
|
|
613
600
|
const t = useTranslations('firstChat');
|
|
614
|
-
return (_jsxs(HoverPrefetchLink, { href: firstChatHref(projectId), "aria-current": isActive ? 'page' : undefined, className: cn('flex h-8 items-center gap-2 rounded-md px-2 transition-none', '
|
|
601
|
+
return (_jsxs(HoverPrefetchLink, { href: firstChatHref(projectId), "aria-current": isActive ? 'page' : undefined, className: cn('flex h-8 items-center gap-2 rounded-md px-2 transition-none', 'focus-visible:ring-kortix-base focus-visible:ring-[0.6px] focus-visible:outline-none', isActive
|
|
615
602
|
? 'bg-sidebar-row text-sidebar-foreground'
|
|
616
603
|
: 'text-muted-foreground hover:bg-sidebar-row hover:text-sidebar-foreground'), children: [_jsx("span", { className: "text-muted-foreground flex size-4 shrink-0 items-center justify-center", children: _jsx(KortixLogo, { variant: "icon", size: 12 }) }), _jsx(SessionTitle, { title: t('title'), className: cn('min-w-0', isActive && 'font-medium') })] }));
|
|
617
604
|
}
|
|
@@ -50,9 +50,6 @@ export declare function SessionBriefHoverCard({ sessionId, children, ...brief }:
|
|
|
50
50
|
export declare function SessionBriefDescription({ id, status, createdAt, source, changeRequests, waitingOn, }: Omit<SessionBrief, 'title'> & {
|
|
51
51
|
id: string;
|
|
52
52
|
}): import("react").JSX.Element;
|
|
53
|
-
export declare function MobileSessionCreatedTime({ createdAt }: {
|
|
54
|
-
createdAt: string;
|
|
55
|
-
}): import("react").JSX.Element;
|
|
56
53
|
/**
|
|
57
54
|
* The hover card of a sub-agent row: what it is and when it ran. Same store,
|
|
58
55
|
* same shell as `SessionBriefHoverCard`, so one card is open at a time across
|
|
@@ -238,9 +238,6 @@ export function SessionBriefDescription({ id, status, createdAt, source, changeR
|
|
|
238
238
|
.join('; ')}.`
|
|
239
239
|
: null] }));
|
|
240
240
|
}
|
|
241
|
-
export function MobileSessionCreatedTime({ createdAt }) {
|
|
242
|
-
return (_jsx(SessionCreatedTime, { createdAt: createdAt, className: "text-muted-foreground block truncate text-xs leading-4 tabular-nums" }));
|
|
243
|
-
}
|
|
244
241
|
/**
|
|
245
242
|
* The hover card of a sub-agent row: what it is and when it ran. Same store,
|
|
246
243
|
* same shell as `SessionBriefHoverCard`, so one card is open at a time across
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kortix/ui",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.17",
|
|
4
4
|
"description": "Kortix UI: the shared React component library for apps/web, Kortix Apps and SDK hosts. Tailwind v4 classes, themed by CSS variables.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Elastic-2.0",
|
|
@@ -2185,7 +2185,7 @@
|
|
|
2185
2185
|
"@extend-ai/react-docx": "^0.7.5",
|
|
2186
2186
|
"@extend-ai/react-xlsx": "0.13.4",
|
|
2187
2187
|
"@glideapps/glide-data-grid": "6.0.4-alpha24",
|
|
2188
|
-
"@kortix/llm-catalog": "0.14.
|
|
2188
|
+
"@kortix/llm-catalog": "0.14.17",
|
|
2189
2189
|
"@lezer/highlight": "1.2.3",
|
|
2190
2190
|
"@paper-design/shaders-react": "^0.0.76",
|
|
2191
2191
|
"@phosphor-icons/react": "2.1.10",
|
|
@@ -2284,7 +2284,7 @@
|
|
|
2284
2284
|
"yaml": "^2.8.2"
|
|
2285
2285
|
},
|
|
2286
2286
|
"peerDependencies": {
|
|
2287
|
-
"@kortix/sdk": "^0.14.
|
|
2287
|
+
"@kortix/sdk": "^0.14.17",
|
|
2288
2288
|
"@tanstack/react-query": "^5.75.2",
|
|
2289
2289
|
"@types/react": ">=18",
|
|
2290
2290
|
"react": ">=19",
|
|
@@ -179,7 +179,7 @@ export function PreviewHost() {
|
|
|
179
179
|
}
|
|
180
180
|
```
|
|
181
181
|
|
|
182
|
-
Names: `saveDriveFile`, `useDismissDriveConflict`, `useDriveAvailability`, `useDriveConflicts`, `useDriveFolder`, `useFolderAccess`, `useFolderPrincipals`, `useInvalidateDrives`, `useProjectDrive`, `useShareFolder`, `useUnshareFolder`, `FilesStoreProvider`, `getFileIcon`, `FilePreviewHost`, `ChangeRequestDetailDialog`, `DiffRenderer`, `DriveExplorer`, `DriveUploadTray`, `FileExplorerPage`, `FileThumbnail`, `ProjectFilesProvider`, `useProjectContext`, `FileExplorerSourceProvider`, `ExplorerQueryResult`, `FileExplorerSource`, `gitRefExplorerSource`, `useChangeRequestRecovery`, `changeRequestKeys`, `openChangeRequestListQuery`, `useChangeRequestDiff`, `useChangeRequestMergePreview`, `useCloseChangeRequest`, `useMergeChangeRequest`, `useRequestChangesOnChangeRequest`, `useSelectedVersion`, `workspaceFileSource`, `useWorkspaceSearch`, `SandboxFileExplorer`, `CodeEditor` (the CodeMirror editor, loaded as its own chunk on first render). Files storage: `DriveStorageSummary` (a project's storage against its limit, with folder-mount warnings), `StorageMeter`, `StorageNotice`, `StorageTone`, `storageTone`, `formatStorageBytes`, `useDriveUsage`, `useDriveLimitMessage` (the readable message of a storage refusal), `useFolderMountNotice`
|
|
182
|
+
Names: `saveDriveFile`, `useDismissDriveConflict`, `useDriveAvailability`, `useDriveConflicts`, `useDriveFolder`, `useFolderAccess`, `useFolderPrincipals`, `useInvalidateDrives`, `useProjectDrive`, `useShareFolder`, `useUnshareFolder`, `FilesStoreProvider`, `getFileIcon`, `FilePreviewHost`, `ChangeRequestDetailDialog`, `DiffRenderer`, `DriveExplorer`, `DriveUploadTray`, `FileExplorerPage`, `FileThumbnail`, `ProjectFilesProvider`, `useProjectContext`, `FileExplorerSourceProvider`, `ExplorerQueryResult`, `FileExplorerSource`, `gitRefExplorerSource`, `useChangeRequestRecovery`, `changeRequestKeys`, `openChangeRequestListQuery`, `useChangeRequestDiff`, `useChangeRequestMergePreview`, `useCloseChangeRequest`, `useMergeChangeRequest`, `useRequestChangesOnChangeRequest`, `useSelectedVersion`, `workspaceFileSource`, `useWorkspaceSearch`, `SandboxFileExplorer`, `CodeEditor` (the CodeMirror editor, loaded as its own chunk on first render). Files storage: `DriveStorageSummary` (a project's storage against its limit, with folder-mount warnings), `StorageMeter`, `StorageNotice`, `StorageTone`, `storageTone`, `formatStorageBytes`, `useDriveUsage`, `useDriveLimitMessage` (the readable message of a storage refusal), `useFolderMountNotice`. Drive URLs: `drivePathToParam`, `drivePathFromParam` (the folder in view as Drive's `?path=` value; the caller's own folder is `~`), `driveUrlWithPath`
|
|
183
183
|
|
|
184
184
|
## `@kortix/ui/file-viewer`
|
|
185
185
|
|