@kortix/ui 0.14.4 → 0.14.6
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/README.md +8 -4
- package/dist/access/access/access-dialog.js +8 -5
- package/dist/access/access/copy-row.js +2 -2
- package/dist/access/sharing-picker.js +2 -1
- package/dist/browser/app-in-browser.js +5 -3
- package/dist/browser/browser-panel.js +6 -6
- package/dist/browser/sandbox-browser-chrome.d.ts +4 -1
- package/dist/browser/sandbox-browser-chrome.js +4 -3
- package/dist/customize/agents/agent-access.d.ts +20 -0
- package/dist/customize/agents/agent-access.js +17 -0
- package/dist/customize/agents/agent-grant-pages.js +5 -6
- package/dist/customize/agents/agent-page.js +2 -1
- package/dist/customize/agents/agents-page.js +18 -1
- package/dist/customize/connectors/add-mcp/add-mcp-server.js +4 -2
- package/dist/customize/connectors/connector-routes.d.ts +3 -1
- package/dist/customize/connectors/connector-routes.js +18 -0
- package/dist/customize/connectors/connectors-page.js +23 -4
- package/dist/customize/connectors/detail/connector-advanced-tools.js +4 -6
- package/dist/customize/providers/provider-accordion.js +2 -1
- package/dist/customize/providers/provider-connect.js +2 -1
- package/dist/customize/sections/component/telegram-channel-row.js +1 -1
- package/dist/customize/sections/connector-connection-modal.js +11 -9
- package/dist/customize/sections/connectors-view.js +11 -13
- package/dist/customize/sections/llm-provider/constants.d.ts +0 -1
- package/dist/customize/sections/llm-provider/constants.js +0 -2
- package/dist/customize/sections/llm-provider/models-tab-group.d.ts +1 -1
- package/dist/customize/sections/llm-provider/models-tab-group.js +7 -4
- package/dist/customize/sections/llm-provider/models-tab-row.d.ts +2 -18
- package/dist/customize/sections/llm-provider/models-tab-row.js +6 -30
- package/dist/customize/sections/llm-provider/models-tab.d.ts +0 -1
- package/dist/customize/sections/llm-provider/models-tab.js +1 -10
- package/dist/customize/sections/llm-provider/use-connected-providers.js +2 -2
- package/dist/customize/sections/llm-provider/utils.d.ts +1 -1
- package/dist/customize/sections/llm-provider/utils.js +7 -14
- package/dist/customize/sections/view/gateway/_shared.js +1 -2
- package/dist/customize/sections/view/gateway/gateway-routing.js +18 -20
- package/dist/customize/sections/view/sandbox-provider-coverage.d.ts +3 -18
- package/dist/customize/sections/view/sandbox-provider-coverage.js +7 -27
- package/dist/customize/settings/rail-copy-context.js +5 -3
- package/dist/customize/settings/tabs/sandbox-tab.d.ts +2 -27
- package/dist/customize/settings/tabs/sandbox-tab.js +13 -112
- package/dist/customize/settings/tabs/sandbox-template-form.js +9 -12
- package/dist/customize/shared/capability-tabs.js +2 -1
- package/dist/customize/shared/entity/entity-modal.d.ts +5 -1
- package/dist/customize/shared/entity/entity-modal.js +7 -4
- package/dist/customize/skills/remove-skill-button.d.ts +16 -0
- package/dist/customize/skills/remove-skill-button.js +42 -0
- package/dist/customize/skills/skills-page.js +4 -6
- package/dist/customize/triggers/schedule/event-trigger-copy.js +3 -2
- package/dist/customize/triggers/schedule/schedule-builder.js +7 -4
- package/dist/customize/triggers/schedule/trigger-composer.js +5 -2
- package/dist/customize/triggers/schedule/trigger-list.d.ts +0 -2
- package/dist/customize/triggers/schedule/trigger-list.js +1 -18
- package/dist/customize/triggers/schedule/trigger-tile.d.ts +1 -32
- package/dist/customize/triggers/schedule/trigger-tile.js +1 -16
- package/dist/customize/triggers/schedule/when-event.js +1 -1
- package/dist/diff/diff-view.js +9 -10
- package/dist/files/editor/code-editor.js +2 -3
- package/dist/files/project/components/change-request-detail-dialog.d.ts +3 -1
- package/dist/files/project/components/change-request-detail-dialog.js +3 -5
- package/dist/files/project/components/change-request-status-badge.d.ts +12 -0
- package/dist/files/project/components/change-request-status-badge.js +27 -0
- package/dist/files/project/components/change-requests-panel.js +1 -1
- package/dist/files/project/components/drive-explorer.js +2 -1
- package/dist/files/project/components/drive-grid-view.js +11 -7
- package/dist/files/project/components/drive-list-view.js +4 -4
- package/dist/files/project/components/file-breadcrumbs.js +1 -1
- package/dist/files/project/components/file-explorer-page.js +1 -1
- package/dist/files/project/components/file-history-popover.js +1 -6
- package/dist/files/project/components/file-search.js +6 -1
- package/dist/files/project/components/open-change-request-dialog.js +2 -1
- package/dist/files/project/components/version-selector-logic.d.ts +11 -0
- package/dist/files/project/components/version-selector-logic.js +26 -0
- package/dist/files/project/components/version-selector.js +11 -20
- package/dist/files/project/hooks/use-change-requests.d.ts +14 -1
- package/dist/files/project/hooks/use-change-requests.js +44 -25
- package/dist/files/project/hooks/use-server-health.js +17 -15
- package/dist/files/renderers/docx/docx-viewer.js +4 -6
- package/dist/files/renderers/image-renderer.js +6 -24
- package/dist/files/renderers/pdf/pdf-renderer.d.ts +3 -1
- package/dist/files/renderers/pdf/pdf-renderer.js +2 -2
- package/dist/files/renderers/pdf/pdf-viewer.d.ts +3 -0
- package/dist/files/renderers/pdf/pdf-viewer.js +16 -7
- package/dist/files/renderers/presentation/FullScreenPresentationViewer.js +2 -11
- package/dist/files/renderers/show-content-renderer.js +1 -1
- package/dist/files/renderers/sqlite-renderer.js +8 -3
- package/dist/files/renderers/xlsx/xlsx-viewer.js +15 -16
- package/dist/files/tree/components/file-tree-item.js +1 -1
- package/dist/files/viewer/file-content-renderer.d.ts +4 -1
- package/dist/files/viewer/file-content-renderer.js +2 -2
- package/dist/files/viewer/file-preview-modal.js +1 -1
- package/dist/files/viewer/use-file-content-state.js +1 -1
- package/dist/i18n/en.d.ts +36 -35
- package/dist/i18n/en.js +45 -44
- package/dist/index.d.ts +1 -1
- package/dist/internal/desktop/desktop-back-button.js +5 -3
- package/dist/internal/hooks/use-auto-scroll.js +5 -3
- package/dist/internal/hooks/use-notification-center.js +21 -15
- package/dist/internal/hooks/use-review-session-summary.d.ts +6 -0
- package/dist/internal/hooks/use-review-session-summary.js +11 -0
- package/dist/internal/lib/browser-error-noise.d.ts +1 -1
- package/dist/internal/lib/browser-error-noise.js +1 -1
- package/dist/internal/lib/browser-noise/rules/rejections.d.ts +10 -0
- package/dist/internal/lib/browser-noise/rules/rejections.js +27 -1
- package/dist/internal/lib/provider-branding.js +14 -3
- package/dist/internal/lib/trigger-clock.d.ts +42 -0
- package/dist/internal/lib/trigger-clock.js +34 -0
- package/dist/internal/lib/web-notifications.d.ts +6 -0
- package/dist/internal/lib/web-notifications.js +57 -7
- package/dist/internal/notifications/notification-bell.d.ts +13 -0
- package/dist/internal/notifications/notification-bell.js +1 -1
- package/dist/internal/notifications/notification-rows.js +2 -1
- package/dist/internal/outcomes/outcome-types.d.ts +5 -0
- package/dist/internal/reminders/reminder-filter.d.ts +12 -0
- package/dist/internal/reminders/reminder-filter.js +34 -0
- package/dist/internal/reminders/reminder-format.d.ts +6 -0
- package/dist/internal/reminders/reminder-format.js +20 -2
- package/dist/internal/stores/kortix-computer-store.d.ts +1 -1
- package/dist/internal/stores/session-hover-store.d.ts +20 -5
- package/dist/internal/stores/session-hover-store.js +31 -13
- package/dist/internal/stores/session-panel-memory-store.js +2 -0
- package/dist/markdown/code/inline-code.js +8 -0
- package/dist/markdown/code/output-paths-context.d.ts +18 -0
- package/dist/markdown/code/output-paths-context.js +35 -0
- package/dist/markdown/genui/components/charts.js +6 -5
- package/dist/primitives/count-badge.d.ts +3 -1
- package/dist/primitives/count-badge.js +3 -3
- package/dist/primitives/glyph-paths-source.js +1 -1
- package/dist/primitives/glyph-paths.generated.js +1 -1
- package/dist/primitives/map.js +2 -1
- package/dist/primitives/preview-image.js +4 -2
- package/dist/primitives/textarea.js +1 -1
- package/dist/primitives/typed-title.js +12 -14
- package/dist/primitives/typing-animation.js +4 -2
- package/dist/providers/ui-provider.d.ts +57 -0
- package/dist/providers/ui-provider.js +4 -0
- package/dist/session/composer/ComposerCard.d.ts +2 -0
- package/dist/session/composer/ComposerCard.js +5 -1
- package/dist/session/composer/agent-selector.js +17 -5
- package/dist/session/composer/composer-chat-input.js +5 -3
- package/dist/session/composer/composer-logic.js +8 -7
- package/dist/session/composer/composer-toolbar.js +4 -2
- package/dist/session/composer/composer-underbar.js +3 -1
- package/dist/session/composer/composer.js +34 -5
- package/dist/session/composer/draft/composer-draft.js +4 -4
- package/dist/session/composer/menus/slash-actions.d.ts +22 -2
- package/dist/session/composer/menus/slash-actions.js +20 -0
- package/dist/session/composer/menus/slash-items.js +19 -3
- package/dist/session/composer/pasted-text.js +3 -2
- package/dist/session/composer/stores/queued-draft-store.js +3 -2
- package/dist/session/header/reminder-parts.d.ts +294 -0
- package/dist/session/header/reminder-parts.js +120 -0
- package/dist/session/header/session-reminders-indicator.d.ts +13 -0
- package/dist/session/header/session-reminders-indicator.js +142 -35
- package/dist/session/media/sandbox-url-detector.js +0 -7
- package/dist/session/models/model-availability.d.ts +23 -0
- package/dist/session/models/model-availability.js +20 -0
- package/dist/session/models/model-grouping.js +1 -4
- package/dist/session/models/model-selector.js +23 -14
- package/dist/session/models/use-model-connection-gate.js +4 -1
- package/dist/session/outcomes/change-request-outcomes.js +24 -3
- package/dist/session/outcomes/session-outcomes-provider.d.ts +3 -1
- package/dist/session/outcomes/session-outcomes-provider.js +31 -3
- package/dist/session/overrides/provider-secret-pool-editor.js +2 -1
- package/dist/session/overrides/session-overrides-composer.d.ts +1 -1
- package/dist/session/overrides/session-overrides-composer.js +5 -1
- package/dist/session/panel/advanced/advanced-panel.js +3 -7
- package/dist/session/panel/easy/app-preview.js +12 -2
- package/dist/session/panel/easy/easy-panel-logic.d.ts +1 -1
- package/dist/session/panel/easy/easy-panel-logic.js +1 -1
- package/dist/session/panel/easy/outputs-card.js +2 -1
- package/dist/session/panel/easy/panel-card.js +5 -3
- package/dist/session/panel/easy/preview-load.d.ts +14 -0
- package/dist/session/panel/easy/preview-load.js +15 -0
- package/dist/session/panel/easy/step-detail-body.js +2 -7
- package/dist/session/panel/mobile-tool-drawer.js +4 -2
- package/dist/session/panel/open-session-quick-view.js +2 -1
- package/dist/session/panel/panel-fallback.js +8 -4
- package/dist/session/panel/session-panel-provider.d.ts +1 -0
- package/dist/session/panel/session-panel-provider.js +19 -3
- package/dist/session/panel/session-reminders-panel.d.ts +4 -0
- package/dist/session/panel/session-reminders-panel.js +109 -0
- package/dist/session/panel/shared/use-panel-derivations.js +6 -4
- package/dist/session/panel/shared/use-panel-handoffs.d.ts +2 -2
- package/dist/session/panel/shared/use-panel-handoffs.js +5 -1
- package/dist/session/panel/use-session-panel-layout.js +7 -5
- package/dist/session/print/session-print-header.d.ts +0 -10
- package/dist/session/print/session-print-header.js +25 -9
- package/dist/session/status/session-surface.js +1 -1
- package/dist/session/thread/optimistic-turn.d.ts +5 -1
- package/dist/session/thread/optimistic-turn.js +8 -6
- package/dist/session/thread/session-chat.d.ts +6 -1
- package/dist/session/thread/session-chat.js +34 -12
- package/dist/session/thread/session-history.js +3 -1
- package/dist/session/thread/session-thread.d.ts +10 -1
- package/dist/session/thread/session-thread.js +2 -2
- package/dist/session/thread/transcript.js +13 -7
- package/dist/session/tool/shared/file-list.js +19 -2
- package/dist/session/tool/shared/infrastructure-contexts.d.ts +7 -0
- package/dist/session/tool/shared/infrastructure-contexts.js +7 -0
- package/dist/session/tool/shared/infrastructure-output.js +9 -5
- package/dist/session/tool/shared/infrastructure-row-header.js +9 -1
- package/dist/session/tool/shared/infrastructure-rows.js +7 -5
- package/dist/session/tool/tools/bash-tool.js +10 -6
- package/dist/session/tool/tools/web-search-tool.js +25 -3
- package/dist/session/turn/burst-step-body.js +4 -0
- package/dist/session/turn/recovered-failures.d.ts +8 -0
- package/dist/session/turn/recovered-failures.js +32 -0
- package/dist/session/turn/streaming-cadence.js +5 -8
- package/dist/styles.css +1 -1
- package/dist/terminal/session-terminal-panel.js +3 -5
- package/dist/theme/theme.js +2 -1
- package/dist/workspace/projects/modal/github-import-pickers.js +7 -6
- package/dist/workspace/review/review-center.js +13 -10
- package/dist/workspace/session-workspace.js +5 -9
- package/dist/workspace/sessions/deleted-session-row.js +5 -2
- package/dist/workspace/sidebar/footer/project-computer-nav.js +6 -4
- package/dist/workspace/sidebar/footer/project-mcp-nav.js +6 -2
- package/dist/workspace/sidebar/modal/rename-session-modal.js +8 -3
- package/dist/workspace/sidebar/project-session-list.js +52 -55
- package/dist/workspace/sidebar/session-brief-hover-card.d.ts +35 -18
- package/dist/workspace/sidebar/session-brief-hover-card.js +114 -37
- package/dist/workspace/sidebar/session-status-mark.d.ts +15 -1
- package/dist/workspace/sidebar/session-status-mark.js +63 -17
- package/package.json +7 -3
- package/skills/kortix-ui/SKILL.md +1 -1
- package/dist/customize/sections/view/sandbox-provider-result.d.ts +0 -47
- package/dist/customize/sections/view/sandbox-provider-result.js +0 -79
|
@@ -675,7 +675,7 @@ export function SqliteRenderer({ filePath, fileName, className, readOnly = false
|
|
|
675
675
|
// ── Main layout ───────────────────────────────────────────────────────
|
|
676
676
|
return (_jsxs("div", { className: cn('bg-background relative flex h-full w-full flex-col', className), children: [_jsxs("div", { className: "flex h-10 shrink-0 items-center gap-2 border-b px-3 py-1.5", children: [_jsxs("span", { className: "text-muted-foreground/60 text-xs tabular-nums", children: [tables.filter((t) => t.type === 'table').length, ' ', tHardcodedUi.raw('i18nComplete.text0d4fc4a78d37'), tables.filter((t) => t.type === 'table').length !== 1 ? 's' : '', tables.some((t) => t.type === 'view') && (_jsxs(_Fragment, { children: [' ', "\u00B7 ", tables.filter((t) => t.type === 'view').length, ' ', tHardcodedUi.raw('i18nComplete.text2bcb43cbc8f6'), tables.filter((t) => t.type === 'view').length !== 1 ? 's' : ''] })), _jsxs(_Fragment, { children: [' ', "\u00B7 ", tables.reduce((sum, t) => sum + t.rowCount, 0).toLocaleString(), ' ', tHardcodedUi.raw('i18nComplete.textbc51e9e65d79')] })] }), hasUnsavedChanges && (_jsx("span", { className: "bg-kortix-yellow h-1.5 w-1.5 shrink-0 rounded-full", title: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line795JsxAttrTitleUnsavedChanges') })), _jsxs("div", { className: "ml-auto flex items-center gap-1", children: [hasUnsavedChanges && (_jsxs(_Fragment, { children: [_jsxs(Button, { variant: "muted", size: "toolbar", onClick: handleDiscard, title: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line806JsxAttrTitleDiscardChanges'), children: [_jsx(Undo2, { className: "h-3 w-3" }), tHardcodedUi.raw('i18nComplete.texteb1a70e39274')] }), _jsxs(Button, { variant: "default", size: "toolbar", onClick: handleSave, disabled: isSaving, title: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line816JsxAttrTitleSaveToFileS'), children: [isSaving ? _jsx(Loading, { className: "h-3 w-3" }) : _jsx(Save, { className: "h-3 w-3" }), tHardcodedUi.raw('i18nComplete.text1509f561f241')] })] })), _jsx("div", { className: "bg-muted/60 ml-1 flex items-center rounded-md p-0.5", children: ['data', 'schema', 'query'].map((mode) => (_jsxs("button", { className: cn('inline-flex h-6 cursor-pointer items-center gap-1 rounded-sm px-2 text-xs transition-colors', viewMode === mode
|
|
677
677
|
? 'bg-background text-foreground shadow-sm'
|
|
678
|
-
: 'text-muted-foreground/60 hover:text-foreground'), onClick: () => setViewMode(mode), children: [mode === 'data' && _jsx(List, { className: "h-3 w-3" }), mode === 'schema' && _jsx(Code2, { className: "h-3 w-3" }), mode === 'query' && _jsx(Play, { className: "h-3 w-3" }), mode.charAt(0).toUpperCase() + mode.slice(1)] }, mode))) })] })] }), _jsxs("div", { className: "flex flex-1 overflow-hidden", children: [_jsxs("div", { className: "bg-muted/10 flex w-56 shrink-0 flex-col border-r", children: [_jsx("div", { className: "border-b p-2", children: _jsxs("div", { className: "relative", children: [_jsx(Search, { className: "text-muted-foreground/50 absolute top-1/2 left-2 h-3 w-3 -translate-y-1/2" }), _jsx(Input, { type: "text", placeholder: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line860JsxAttrPlaceholderFilterTables'), autoComplete: "off", value: tableSearch, onChange: (e) => setTableSearch(e.target.value), className: "h-7 pr-7 pl-7 text-xs" }), tableSearch && (_jsx("button", { onClick: () => setTableSearch(''), className: "text-muted-foreground hover:text-foreground absolute top-1/2 right-2 -translate-y-1/2 cursor-pointer", children: _jsx(X, { className: "h-3 w-3" }) }))] }) }), _jsx("div", { className: "flex-1 overflow-y-auto py-1", children: filteredTables.map((table) => (_jsxs("button", { onClick: () => {
|
|
678
|
+
: 'text-muted-foreground/60 hover:text-foreground'), onClick: () => setViewMode(mode), children: [mode === 'data' && _jsx(List, { className: "h-3 w-3" }), mode === 'schema' && _jsx(Code2, { className: "h-3 w-3" }), mode === 'query' && _jsx(Play, { className: "h-3 w-3" }), mode.charAt(0).toUpperCase() + mode.slice(1)] }, mode))) })] })] }), _jsxs("div", { className: "flex flex-1 overflow-hidden", children: [_jsxs("div", { className: "bg-muted/10 flex w-56 shrink-0 flex-col border-r", children: [_jsx("div", { className: "border-b p-2", children: _jsxs("div", { className: "relative", children: [_jsx(Search, { className: "text-muted-foreground/50 absolute top-1/2 left-2 h-3 w-3 -translate-y-1/2" }), _jsx(Input, { type: "text", placeholder: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line860JsxAttrPlaceholderFilterTables'), autoComplete: "off", value: tableSearch, onChange: (e) => setTableSearch(e.target.value), className: "h-7 pr-7 pl-7 text-xs" }), tableSearch && (_jsx("button", { onClick: () => setTableSearch(''), "aria-label": tHardcodedUi.raw('i18nComplete.text83b12c2216ef'), className: "text-muted-foreground hover:text-foreground absolute top-1/2 right-2 -translate-y-1/2 cursor-pointer", children: _jsx(X, { className: "h-3 w-3" }) }))] }) }), _jsx("div", { className: "flex-1 overflow-y-auto py-1", children: filteredTables.map((table) => (_jsxs("button", { onClick: () => {
|
|
679
679
|
setSelectedTable(table.name);
|
|
680
680
|
setSearchTerm('');
|
|
681
681
|
if (viewMode === 'query') {
|
|
@@ -683,7 +683,7 @@ export function SqliteRenderer({ filePath, fileName, className, readOnly = false
|
|
|
683
683
|
}
|
|
684
684
|
}, className: cn('flex w-full cursor-pointer items-center gap-2 px-3 py-1.5 text-left text-sm transition-colors', selectedTable === table.name
|
|
685
685
|
? 'bg-accent text-accent-foreground'
|
|
686
|
-
: 'text-muted-foreground hover:bg-muted/50 hover:text-foreground'), children: [table.type === 'view' ? (_jsx(Eye, { className: "text-kortix-purple h-3.5 w-3.5 shrink-0" })) : (_jsx(Table2, { className: "text-kortix-blue h-3.5 w-3.5 shrink-0" })), _jsx("span", { className: "flex-1 truncate text-xs font-medium", children: table.name }), _jsx("span", { className: "text-muted-foreground/50 shrink-0 text-xs tabular-nums", children: table.rowCount.toLocaleString() })] }, table.name))) }), _jsxs("div", { className: "text-muted-foreground/30 border-t px-3 py-1.5 text-xs tabular-nums", children: [filteredTables.length, "/", tables.length, ' ', tHardcodedUi.raw('i18nComplete.textbaaf53622a51')] })] }), _jsxs("div", { className: "flex flex-1 flex-col overflow-hidden", children: [viewMode === 'data' && selectedTableInfo && (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex h-9 shrink-0 items-center gap-2 border-b px-3 py-1.5", children: [_jsxs("div", { className: "flex min-w-0 items-center gap-1.5", children: [selectedTableInfo.type === 'view' ? (_jsx(Eye, { className: "text-kortix-purple h-3.5 w-3.5 shrink-0" })) : (_jsx(Table2, { className: "text-kortix-blue h-3.5 w-3.5 shrink-0" })), _jsx("span", { className: "text-foreground truncate text-xs font-medium", children: selectedTableInfo.name }), _jsxs("span", { className: "text-muted-foreground/40 shrink-0 text-xs tabular-nums", children: [selectedTableInfo.rowCount.toLocaleString(), " \u00D7", ' ', selectedTableInfo.columns.length] })] }), _jsxs("div", { className: "ml-auto flex items-center gap-1", children: [isEditable && (_jsxs(_Fragment, { children: [_jsx("button", { className: "text-muted-foreground/50 hover:text-foreground hover:bg-muted inline-flex h-7 w-7 cursor-pointer items-center justify-center rounded-md transition-colors", onClick: handleAddRow, title: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line941JsxAttrTitleInsertRow'), children: _jsx(Plus, { className: "h-3.5 w-3.5" }) }), _jsx("button", { className: "text-muted-foreground/50 hover:bg-destructive/10 hover:text-destructive inline-flex h-7 w-7 cursor-pointer items-center justify-center rounded-md transition-colors", onClick: handleDeleteSelected, title: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line948JsxAttrTitleDeleteSelectedRows'), children: _jsx(Trash2, { className: "h-3.5 w-3.5" }) }), _jsx("div", { className: "bg-border mx-0.5 h-4 w-px" })] })), _jsxs("div", { className: "relative", children: [_jsx(Search, { className: "text-muted-foreground/40 absolute top-1/2 left-2 h-3 w-3 -translate-y-1/2" }), _jsx(Input, { type: "text", placeholder: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line961JsxAttrPlaceholderFilter'), autoComplete: "off", value: searchTerm, onChange: (e) => setSearchTerm(e.target.value), className: "h-7 w-40 pr-7 pl-7 text-xs" }), searchTerm && (_jsx("button", { onClick: () => setSearchTerm(''), className: "text-muted-foreground hover:text-foreground absolute top-1/2 right-2 -translate-y-1/2 cursor-pointer", children: _jsx(X, { className: "h-3 w-3" }) }))] }), _jsx("button", { className: "text-muted-foreground/50 hover:text-foreground hover:bg-muted inline-flex h-7 w-7 cursor-pointer items-center justify-center rounded-md transition-colors", onClick: handleExportCsv, title: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line979JsxAttrTitleExportAsCsv'), children: _jsx(Download, { className: "h-3.5 w-3.5" }) })] })] }), _jsx("div", { className: "flex-1 overflow-hidden", children: tableData.rows.length > 0 ? (_jsx("div", { className: "h-full w-full", children: _jsx(AgGridReact, { ref: gridApiRef, theme: agTheme, rowData: tableData.rows, columnDefs: columnDefs, defaultColDef: {
|
|
686
|
+
: 'text-muted-foreground hover:bg-muted/50 hover:text-foreground'), children: [table.type === 'view' ? (_jsx(Eye, { className: "text-kortix-purple h-3.5 w-3.5 shrink-0" })) : (_jsx(Table2, { className: "text-kortix-blue h-3.5 w-3.5 shrink-0" })), _jsx("span", { className: "flex-1 truncate text-xs font-medium", children: table.name }), _jsx("span", { className: "text-muted-foreground/50 shrink-0 text-xs tabular-nums", children: table.rowCount.toLocaleString() })] }, table.name))) }), _jsxs("div", { className: "text-muted-foreground/30 border-t px-3 py-1.5 text-xs tabular-nums", children: [filteredTables.length, "/", tables.length, ' ', tHardcodedUi.raw('i18nComplete.textbaaf53622a51')] })] }), _jsxs("div", { className: "flex flex-1 flex-col overflow-hidden", children: [viewMode === 'data' && selectedTableInfo && (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex h-9 shrink-0 items-center gap-2 border-b px-3 py-1.5", children: [_jsxs("div", { className: "flex min-w-0 items-center gap-1.5", children: [selectedTableInfo.type === 'view' ? (_jsx(Eye, { className: "text-kortix-purple h-3.5 w-3.5 shrink-0" })) : (_jsx(Table2, { className: "text-kortix-blue h-3.5 w-3.5 shrink-0" })), _jsx("span", { className: "text-foreground truncate text-xs font-medium", children: selectedTableInfo.name }), _jsxs("span", { className: "text-muted-foreground/40 shrink-0 text-xs tabular-nums", children: [selectedTableInfo.rowCount.toLocaleString(), " \u00D7", ' ', selectedTableInfo.columns.length] })] }), _jsxs("div", { className: "ml-auto flex items-center gap-1", children: [isEditable && (_jsxs(_Fragment, { children: [_jsx("button", { className: "text-muted-foreground/50 hover:text-foreground hover:bg-muted inline-flex h-7 w-7 cursor-pointer items-center justify-center rounded-md transition-colors", onClick: handleAddRow, title: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line941JsxAttrTitleInsertRow'), children: _jsx(Plus, { className: "h-3.5 w-3.5" }) }), _jsx("button", { className: "text-muted-foreground/50 hover:bg-destructive/10 hover:text-destructive inline-flex h-7 w-7 cursor-pointer items-center justify-center rounded-md transition-colors", onClick: handleDeleteSelected, title: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line948JsxAttrTitleDeleteSelectedRows'), children: _jsx(Trash2, { className: "h-3.5 w-3.5" }) }), _jsx("div", { className: "bg-border mx-0.5 h-4 w-px" })] })), _jsxs("div", { className: "relative", children: [_jsx(Search, { className: "text-muted-foreground/40 absolute top-1/2 left-2 h-3 w-3 -translate-y-1/2" }), _jsx(Input, { type: "text", placeholder: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line961JsxAttrPlaceholderFilter'), autoComplete: "off", value: searchTerm, onChange: (e) => setSearchTerm(e.target.value), className: "h-7 w-40 pr-7 pl-7 text-xs" }), searchTerm && (_jsx("button", { onClick: () => setSearchTerm(''), "aria-label": tHardcodedUi.raw('i18nComplete.text83b12c2216ef'), className: "text-muted-foreground hover:text-foreground absolute top-1/2 right-2 -translate-y-1/2 cursor-pointer", children: _jsx(X, { className: "h-3 w-3" }) }))] }), _jsx("button", { className: "text-muted-foreground/50 hover:text-foreground hover:bg-muted inline-flex h-7 w-7 cursor-pointer items-center justify-center rounded-md transition-colors", onClick: handleExportCsv, title: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line979JsxAttrTitleExportAsCsv'), children: _jsx(Download, { className: "h-3.5 w-3.5" }) })] })] }), _jsx("div", { className: "flex-1 overflow-hidden", children: tableData.rows.length > 0 ? (_jsx("div", { className: "h-full w-full", children: _jsx(AgGridReact, { ref: gridApiRef, theme: agTheme, rowData: tableData.rows, columnDefs: columnDefs, defaultColDef: {
|
|
687
687
|
sortable: true,
|
|
688
688
|
filter: true,
|
|
689
689
|
resizable: true,
|
|
@@ -723,5 +723,10 @@ export function SqliteRenderer({ filePath, fileName, className, readOnly = false
|
|
|
723
723
|
? '⌘'
|
|
724
724
|
: 'Ctrl', tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line1169JsxTextEnter')] }), _jsxs("button", { className: cn('inline-flex h-7 cursor-pointer items-center gap-1 rounded-md px-2.5 text-xs transition-colors', sqlQuery.trim()
|
|
725
725
|
? 'bg-primary text-primary-foreground hover:bg-primary/90'
|
|
726
|
-
: 'bg-muted text-muted-foreground cursor-not-allowed'), onClick: runQuery, disabled: isQueryRunning || !sqlQuery.trim(), children: [isQueryRunning ? (_jsx(Loading, { className: "h-3 w-3" })) : (_jsx(Play, { className: "h-3 w-3" })), tHardcodedUi.raw('i18nComplete.text00d60e31a4e6')] })] })] }), _jsx("textarea", { value: sqlQuery, onChange: (e) => setSqlQuery(e.target.value), onKeyDown: handleQueryKeyDown, placeholder: `SELECT * FROM "${selectedTable || 'table_name'}" LIMIT 100`, className: cn('bg-muted/30 h-24 w-full cursor-text rounded-md border px-3 py-2 font-mono text-xs', 'focus:ring-ring resize-none focus:ring-1 focus:outline-none', 'placeholder:text-muted-foreground/30'), spellCheck: false })] }), _jsxs("div", { className: "flex flex-1 flex-col overflow-hidden", children: [queryResult?.error && (_jsxs("div", { className: "border-destructive/20 bg-destructive/5 text-destructive shrink-0 border-b px-4 py-2 font-mono text-xs select-text", children: [tHardcodedUi.raw('i18nComplete.text617062906764'), " ", queryResult.error] })), queryResult && !queryResult.error && (_jsxs("div", { className: "text-muted-foreground flex shrink-0 items-center gap-2 border-b px-3 py-1.5 text-xs", children: [_jsxs("span", { children: [queryResult.rowCount.toLocaleString(), ' ', tHardcodedUi.raw('i18nComplete.text634768dae147'), queryResult.rowCount !== 1 ? 's' : ''] }), _jsx("span", { className: "text-muted-foreground/30", children: "\u00B7" }), _jsxs("span", { children: [queryResult.time.toFixed(1), tHardcodedUi.raw('i18nComplete.textf785c3ce1d58')] })] })), queryResult && queryResult.rows.length > 0 && (_jsx("div", { className: "flex-1 overflow-hidden", children: _jsx(Suspense, { fallback: _jsx(GridFallback, {}), children: _jsx(DataGrid, { rowData: queryResult.rows, className: "h-full" }, `query-${queryResult.time}`) }) })), !queryResult && (_jsx("div", { className: "flex flex-1 items-center justify-center", children: _jsxs("div", { className: "space-y-2 text-center", children: [_jsx(Play, { className: "text-muted-foreground/20 mx-auto h-8 w-8" }), _jsx("p", { className: "text-muted-foreground/40 text-sm", children: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line1237JsxTextWriteAQueryAndPressRun') })] }) })), queryResult && queryResult.rows.length === 0 && !queryResult.error && (_jsx("div", { className: "flex flex-1 items-center justify-center", children: _jsxs("p", { className: "text-muted-foreground/40 text-sm", children: [tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line1246JsxTextQueryReturnedNoRows'), queryResult.time.toFixed(1), tHardcodedUi.raw('i18nComplete.text9e7d85a50dc3')] }) }))] })] }))] })] }), expandedCell && (_jsx("div", { className: "absolute inset-0 z-50 flex items-center justify-center bg-black/40 p-6 backdrop-blur-[2px]", onClick: (
|
|
726
|
+
: 'bg-muted text-muted-foreground cursor-not-allowed'), onClick: runQuery, disabled: isQueryRunning || !sqlQuery.trim(), children: [isQueryRunning ? (_jsx(Loading, { className: "h-3 w-3" })) : (_jsx(Play, { className: "h-3 w-3" })), tHardcodedUi.raw('i18nComplete.text00d60e31a4e6')] })] })] }), _jsx("textarea", { value: sqlQuery, onChange: (e) => setSqlQuery(e.target.value), onKeyDown: handleQueryKeyDown, placeholder: `SELECT * FROM "${selectedTable || 'table_name'}" LIMIT 100`, className: cn('bg-muted/30 h-24 w-full cursor-text rounded-md border px-3 py-2 font-mono text-xs', 'focus:ring-ring resize-none focus:ring-1 focus:outline-none', 'placeholder:text-muted-foreground/30'), spellCheck: false })] }), _jsxs("div", { className: "flex flex-1 flex-col overflow-hidden", children: [queryResult?.error && (_jsxs("div", { className: "border-destructive/20 bg-destructive/5 text-destructive shrink-0 border-b px-4 py-2 font-mono text-xs select-text", children: [tHardcodedUi.raw('i18nComplete.text617062906764'), " ", queryResult.error] })), queryResult && !queryResult.error && (_jsxs("div", { className: "text-muted-foreground flex shrink-0 items-center gap-2 border-b px-3 py-1.5 text-xs", children: [_jsxs("span", { children: [queryResult.rowCount.toLocaleString(), ' ', tHardcodedUi.raw('i18nComplete.text634768dae147'), queryResult.rowCount !== 1 ? 's' : ''] }), _jsx("span", { className: "text-muted-foreground/30", children: "\u00B7" }), _jsxs("span", { children: [queryResult.time.toFixed(1), tHardcodedUi.raw('i18nComplete.textf785c3ce1d58')] })] })), queryResult && queryResult.rows.length > 0 && (_jsx("div", { className: "flex-1 overflow-hidden", children: _jsx(Suspense, { fallback: _jsx(GridFallback, {}), children: _jsx(DataGrid, { rowData: queryResult.rows, className: "h-full" }, `query-${queryResult.time}`) }) })), !queryResult && (_jsx("div", { className: "flex flex-1 items-center justify-center", children: _jsxs("div", { className: "space-y-2 text-center", children: [_jsx(Play, { className: "text-muted-foreground/20 mx-auto h-8 w-8" }), _jsx("p", { className: "text-muted-foreground/40 text-sm", children: tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line1237JsxTextWriteAQueryAndPressRun') })] }) })), queryResult && queryResult.rows.length === 0 && !queryResult.error && (_jsx("div", { className: "flex flex-1 items-center justify-center", children: _jsxs("p", { className: "text-muted-foreground/40 text-sm", children: [tHardcodedUi.raw('componentsFileRenderersSqliteRenderer.line1246JsxTextQueryReturnedNoRows'), queryResult.time.toFixed(1), tHardcodedUi.raw('i18nComplete.text9e7d85a50dc3')] }) }))] })] }))] })] }), expandedCell && (_jsx("div", { role: "presentation", className: "absolute inset-0 z-50 flex items-center justify-center bg-black/40 p-6 backdrop-blur-[2px]", onClick: (e) => {
|
|
727
|
+
if (e.target === e.currentTarget)
|
|
728
|
+
setExpandedCell(null);
|
|
729
|
+
else
|
|
730
|
+
e.stopPropagation();
|
|
731
|
+
}, children: _jsxs("div", { className: "bg-background border-border/60 flex max-h-[70vh] w-full max-w-xl flex-col overflow-hidden rounded-md border shadow-xl", children: [_jsxs("div", { className: "flex items-center justify-between border-b px-4 py-2.5", children: [_jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [_jsx("span", { className: "text-muted-foreground truncate font-mono text-xs", children: expandedCell.column }), _jsxs("span", { className: "text-muted-foreground/30 shrink-0 text-xs tabular-nums", children: [tHardcodedUi.raw('i18nComplete.text634768dae147'), " ", expandedCell.rowIndex + 1] })] }), _jsxs("div", { className: "flex shrink-0 items-center gap-1", children: [isEditable && expandedEditValue !== expandedCell.value && (_jsxs(Button, { variant: "default", size: "toolbar", onClick: handleExpandedSave, children: [_jsx(Check, { className: "h-3 w-3" }), tHardcodedUi.raw('i18nComplete.text31e392d1c037')] })), _jsx(Button, { onClick: () => setExpandedCell(null), variant: "ghost", size: "icon-sm", children: _jsx(X, { className: "h-3.5 w-3.5" }) })] })] }), _jsx("div", { className: "flex-1 overflow-auto", children: isEditable ? (_jsx("textarea", { value: expandedEditValue, onChange: (e) => setExpandedEditValue(e.target.value), className: cn('h-full min-h-[180px] w-full cursor-text bg-transparent p-4 font-mono text-sm', 'resize-none focus:outline-none', 'placeholder:text-muted-foreground/20'), placeholder: "NULL", "aria-label": `${expandedCell.column} value`, spellCheck: false, autoFocus: true })) : (_jsx("pre", { className: "text-muted-foreground min-h-[180px] p-4 font-mono text-sm break-all whitespace-pre-wrap select-text", children: expandedCell.value || (_jsx("span", { className: "text-muted-foreground/30 italic", children: "NULL" })) })) }), _jsxs("div", { className: "text-muted-foreground/30 border-t px-4 py-1.5 text-xs tabular-nums", children: [expandedEditValue.length.toLocaleString(), ' ', tHardcodedUi.raw('i18nComplete.text1ce93dacbcf4')] })] }) }))] }));
|
|
727
732
|
}
|
|
@@ -508,22 +508,21 @@ const WorkbookSheetTabsInner = React.memo(function WorkbookSheetTabsInner({ acti
|
|
|
508
508
|
setThumbnailUrls({});
|
|
509
509
|
}, [clearCloseTimeout, clearOpenTimeout, workbookIdentity]);
|
|
510
510
|
React.useEffect(() => {
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
}, [thumbnails]);
|
|
511
|
+
const painted = {};
|
|
512
|
+
for (const thumbnail of thumbnails) {
|
|
513
|
+
if (thumbnailUrls[thumbnail.sheetIndex])
|
|
514
|
+
continue;
|
|
515
|
+
const canvas = document.createElement('canvas');
|
|
516
|
+
canvas.width = thumbnail.width;
|
|
517
|
+
canvas.height = thumbnail.height;
|
|
518
|
+
if (thumbnail.paint(canvas))
|
|
519
|
+
painted[thumbnail.sheetIndex] = canvas.toDataURL('image/png');
|
|
520
|
+
}
|
|
521
|
+
if (Object.keys(painted).length === 0)
|
|
522
|
+
return;
|
|
523
|
+
// Existing entries win, as before: a sheet is painted once per workbook.
|
|
524
|
+
setThumbnailUrls((current) => ({ ...painted, ...current }));
|
|
525
|
+
}, [thumbnails, thumbnailUrls]);
|
|
527
526
|
React.useEffect(() => {
|
|
528
527
|
if (visiblePreviewIndex === null)
|
|
529
528
|
return;
|
|
@@ -141,7 +141,7 @@ export function FileTreeItem({ node, onClick, onDownload, onRename, onDelete, on
|
|
|
141
141
|
return;
|
|
142
142
|
onDropMove(sourcePath, node.path);
|
|
143
143
|
}, [isDropTarget, node.path, onDropMove]);
|
|
144
|
-
const content = isRenaming ? (_jsxs("div", { className: cn('flex w-full items-center gap-2 rounded-lg px-3 py-1.5 text-sm', node.ignored && 'opacity-50'), children: [getNodeIcon(node), _jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [_jsx("input", { type: "text", ref: renameInputRef, value: renameName, onChange: (e) => setRenameName(e.target.value), onKeyDown: (e) => {
|
|
144
|
+
const content = isRenaming ? (_jsxs("div", { className: cn('flex w-full items-center gap-2 rounded-lg px-3 py-1.5 text-sm', node.ignored && 'opacity-50'), children: [getNodeIcon(node), _jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [_jsx("input", { type: "text", ref: renameInputRef, "aria-label": tHardcodedUi.raw('i18nComplete.text3064d79a295c'), value: renameName, onChange: (e) => setRenameName(e.target.value), onKeyDown: (e) => {
|
|
145
145
|
if (e.nativeEvent.isComposing)
|
|
146
146
|
return;
|
|
147
147
|
if (e.key === 'Enter' && !nameConflict)
|
|
@@ -35,6 +35,9 @@ export interface FileContentRendererProps {
|
|
|
35
35
|
/** PDF only: start the zoom plugin at fit-to-page instead of the numeric
|
|
36
36
|
* default. No effect on any other file category. */
|
|
37
37
|
fitOnOpen?: boolean;
|
|
38
|
+
/** PDF only: search for this text once the file opens. Hits are highlighted and
|
|
39
|
+
* the first one is scrolled into view (a citation's quote, for example). */
|
|
40
|
+
findText?: string;
|
|
38
41
|
/** Additional class name for the code editor */
|
|
39
42
|
codeEditorEditorClassName?: string;
|
|
40
43
|
/** Bumped by the surface's Refresh control. Remounts the renderers that read
|
|
@@ -42,4 +45,4 @@ export interface FileContentRendererProps {
|
|
|
42
45
|
* cannot reach. */
|
|
43
46
|
reloadKey?: number;
|
|
44
47
|
}
|
|
45
|
-
export declare function FileContentRenderer({ filePath, showHeader, headerActions, onUnsavedChange, onSaved, className, errorFallback, targetLine, readOnly, markdownPreview, onMarkdownPreviewChange, onStatusChange, imageControls, fitOnOpen, codeEditorEditorClassName, reloadKey, }: FileContentRendererProps): React.JSX.Element;
|
|
48
|
+
export declare function FileContentRenderer({ filePath, showHeader, headerActions, onUnsavedChange, onSaved, className, errorFallback, targetLine, readOnly, markdownPreview, onMarkdownPreviewChange, onStatusChange, imageControls, fitOnOpen, findText, codeEditorEditorClassName, reloadKey, }: FileContentRendererProps): React.JSX.Element;
|
|
@@ -44,7 +44,7 @@ function FileNotFoundState({ filePath }) {
|
|
|
44
44
|
const tHardcodedUi = useTranslations('hardcodedUi');
|
|
45
45
|
return (_jsxs("div", { className: "flex h-full flex-col items-center justify-center gap-3 p-8 text-center", children: [_jsx("div", { className: "bg-muted/50 flex h-12 w-12 items-center justify-center rounded-sm", children: _jsx(FileX, { className: "text-muted-foreground/40 h-6 w-6" }) }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: tHardcodedUi.raw('featuresFilesComponentsFileContentRenderer.line195JsxTextFileNotFound') }), _jsx("p", { className: "text-muted-foreground/50 max-w-sm font-mono text-xs break-all", children: filePath }), _jsx("p", { className: "text-muted-foreground/40 max-w-xs text-xs", children: tHardcodedUi.raw('featuresFilesComponentsFileContentRenderer.line201JsxTextThisFileDoesNotExistOrMayHave') })] }));
|
|
46
46
|
}
|
|
47
|
-
export function FileContentRenderer({ filePath, showHeader = true, headerActions, onUnsavedChange, onSaved, className, errorFallback, targetLine, readOnly = false, markdownPreview, onMarkdownPreviewChange, onStatusChange, imageControls, fitOnOpen = false, codeEditorEditorClassName, reloadKey = 0, }) {
|
|
47
|
+
export function FileContentRenderer({ filePath, showHeader = true, headerActions, onUnsavedChange, onSaved, className, errorFallback, targetLine, readOnly = false, markdownPreview, onMarkdownPreviewChange, onStatusChange, imageControls, fitOnOpen = false, findText, codeEditorEditorClassName, reloadKey = 0, }) {
|
|
48
48
|
const { source, Breadcrumbs, fileContent, isLoading, error, contentRevision, fetchRevision, hasUnsavedChanges, setHasUnsavedChanges, isSaving, saveFlash, latestContentRef, discardKey, fileName, isHeicImage, language, fileCategory, isMarkdownFile, isMermaidFile, hasPreviewToggle, isJsonFile, isHtmlFile, isMarkdownPreview, setIsMarkdownPreview, isJsonTreeView, setIsJsonTreeView, isHtmlPreview, setIsHtmlPreview, fileDiagErrorCount, fileDiagWarningCount, fileDiagnostics, tHardcodedUi, tI18nHardcoded, blobUrl, rawBlob, blobLoading, blobError, heicImageUrl, heicConverting, displayContent, handleDownload, handleSave, handleDiscard, handleEditorChange, imageDataUrl, needsBlob, isContentReady, contentError, showLoadingState, isSandboxWaking, isNotFound, } = useFileContentState({
|
|
49
49
|
filePath,
|
|
50
50
|
onUnsavedChange,
|
|
@@ -89,7 +89,7 @@ export function FileContentRenderer({ filePath, showHeader = true, headerActions
|
|
|
89
89
|
return (_jsxs("div", { className: cn('flex h-full flex-col', className), children: [_jsx(FileHeader, { showHeader, Breadcrumbs, filePath, readOnly, hasUnsavedChanges, saveFlash, fileDiagErrorCount, fileDiagWarningCount, fileContent, isSaving, handleSave, latestContentRef, discardLabel, handleDiscard, isHtmlFile, isHtmlPreview, setIsHtmlPreview, isJsonFile, isJsonTreeView, setIsJsonTreeView, hasPreviewToggle, isMarkdownPreview, setIsMarkdownPreview, headerActions, handleDownload, blobUrl, rawBlob, tI18nHardcoded, tHardcodedUi }), _jsx("div", { className: cn('flex-1', readOnly ? 'overflow-auto' : 'overflow-hidden'), children: _jsxs(ErrorBoundary, { fallback: () => (_jsxs("div", { className: "flex h-full flex-col items-center justify-center gap-3 p-8 text-center", children: [_jsx("div", { className: "bg-destructive/10 flex h-12 w-12 items-center justify-center rounded-sm", children: _jsx(FileWarning, { className: "text-destructive/50 h-6 w-6" }) }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: tI18nHardcoded.raw('autoFeaturesFileViewerFileContentRendererJsxTextCouldnT794ae800') }), _jsx("p", { className: "text-muted-foreground/50 max-w-sm font-mono text-xs break-all", children: filePath }), _jsxs(Button, { variant: "outline", size: "sm", onClick: handleDownload, children: [_jsx(Download, { className: "mr-1.5 h-3.5 w-3.5" }), tI18nHardcoded.raw('i18nComplete.textd6eafe823591')] })] })), children: [showLoadingState && (_jsx("div", { className: "flex h-full items-center justify-center", children: _jsx(Loading, { className: "text-muted-foreground/40 h-4 w-4" }) })), contentError && !showLoadingState && isSandboxWaking && (_jsxs("div", { className: "flex h-full flex-col items-center justify-center gap-3 p-8 text-center", children: [_jsx(Loading, { className: "text-muted-foreground/40 h-4 w-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: tI18nHardcoded.raw('i18nComplete.text5e3de76869f3') }), _jsx("p", { className: "text-muted-foreground/50 max-w-sm font-mono text-xs break-all", children: filePath }), _jsx("p", { className: "text-muted-foreground/40 max-w-xs text-xs", children: tI18nHardcoded.raw('i18nComplete.textd4707c58c4a4') })] })), contentError &&
|
|
90
90
|
!showLoadingState &&
|
|
91
91
|
!isSandboxWaking &&
|
|
92
|
-
(errorFallback ? (errorFallback(contentError, filePath)) : isNotFound ? (_jsx(FileNotFoundState, { filePath: filePath })) : (_jsxs("div", { className: "flex h-full flex-col items-center justify-center gap-3 p-8 text-center", children: [_jsx("div", { className: "bg-destructive/10 flex h-12 w-12 items-center justify-center rounded-sm", children: _jsx(FileWarning, { className: "text-destructive/50 h-6 w-6" }) }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: tHardcodedUi.raw('featuresFilesComponentsFileContentRenderer.line692JsxTextFailedToLoadFile') }), _jsx("p", { className: "text-muted-foreground/50 max-w-sm font-mono text-xs break-all", children: filePath }), _jsx("p", { className: "text-muted-foreground/60 max-w-sm text-xs", children: contentError })] }))), !isLoading && !error && imageDataUrl && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(ImageRenderer, { url: imageDataUrl, className: "h-full", fileName: fileName, controls: imageControls }) })), isHeicImage && (blobLoading || heicConverting) && _jsx(RendererFallback, {}), isHeicImage && !blobLoading && !blobError && heicImageUrl && !heicConverting && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(ImageRenderer, { url: heicImageUrl, className: "h-full", fileName: fileName, controls: imageControls }) })), isContentReady && fileCategory === 'pdf' && fileContent?.content && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(PdfRenderer, { fileContent: fileContent.content, fileName: fileName, className: "h-full", fitOnOpen: fitOnOpen, showDownload: false }) })), isContentReady && fileCategory === 'docx' && rawBlob && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(DocxRenderer, { blob: rawBlob, fileName: fileName, className: "h-full", showDownload: false }) })), isContentReady && fileCategory === 'zip' && rawBlob && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(ZipRenderer, { blob: rawBlob, fileName: fileName, className: "h-full" }, filePath) })), !isLoading && !error && !isNotFound && fileCategory === 'xlsx' && (!bytesOnly || blobUrl) && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(XlsxRenderer, {
|
|
92
|
+
(errorFallback ? (errorFallback(contentError, filePath)) : isNotFound ? (_jsx(FileNotFoundState, { filePath: filePath })) : (_jsxs("div", { className: "flex h-full flex-col items-center justify-center gap-3 p-8 text-center", children: [_jsx("div", { className: "bg-destructive/10 flex h-12 w-12 items-center justify-center rounded-sm", children: _jsx(FileWarning, { className: "text-destructive/50 h-6 w-6" }) }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: tHardcodedUi.raw('featuresFilesComponentsFileContentRenderer.line692JsxTextFailedToLoadFile') }), _jsx("p", { className: "text-muted-foreground/50 max-w-sm font-mono text-xs break-all", children: filePath }), _jsx("p", { className: "text-muted-foreground/60 max-w-sm text-xs", children: contentError })] }))), !isLoading && !error && imageDataUrl && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(ImageRenderer, { url: imageDataUrl, className: "h-full", fileName: fileName, controls: imageControls }) })), isHeicImage && (blobLoading || heicConverting) && _jsx(RendererFallback, {}), isHeicImage && !blobLoading && !blobError && heicImageUrl && !heicConverting && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(ImageRenderer, { url: heicImageUrl, className: "h-full", fileName: fileName, controls: imageControls }) })), isContentReady && fileCategory === 'pdf' && fileContent?.content && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(PdfRenderer, { fileContent: fileContent.content, fileName: fileName, className: "h-full", fitOnOpen: fitOnOpen, findText: findText, showDownload: false }) })), isContentReady && fileCategory === 'docx' && rawBlob && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(DocxRenderer, { blob: rawBlob, fileName: fileName, className: "h-full", showDownload: false }) })), isContentReady && fileCategory === 'zip' && rawBlob && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(ZipRenderer, { blob: rawBlob, fileName: fileName, className: "h-full" }, filePath) })), !isLoading && !error && !isNotFound && fileCategory === 'xlsx' && (!bytesOnly || blobUrl) && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(XlsxRenderer, {
|
|
93
93
|
// A bytes-only source hands the workbook over as a blob URL;
|
|
94
94
|
// the renderer reads a sandbox path only for a session.
|
|
95
95
|
filePath: bytesOnly ? blobUrl : filePath, fileName: fileName, className: "h-full", showDownload: false }, `xlsx-${filePath}-${contentRevision}-${reloadKey}`) })), !isLoading && !error && !isNotFound && fileCategory === 'sqlite' && (!bytesOnly || rawBlob) && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(SqliteRenderer, { filePath: filePath, fileName: fileName, className: "h-full", readOnly: readOnly, ...(bytesOnly ? { bytes: rawBlob, onSave: saveThroughSource } : {}) }, `sqlite-${filePath}-${contentRevision}-${reloadKey}`) })), !isLoading && !error && csvAsTable && fileContent && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(CsvRenderer, { content: fileContent.content, fileName: fileName, className: "h-full", showDownload: false }) })), isContentReady && fileCategory === 'video' && blobUrl && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(VideoRenderer, { url: blobUrl, className: "h-full" }) })), isContentReady && fileCategory === 'audio' && blobUrl && (_jsxs("div", { className: "flex h-full flex-col items-center justify-center gap-5 p-8", children: [_jsx("div", { className: "bg-muted/50 flex h-14 w-14 items-center justify-center rounded-sm", children: _jsxs("svg", { className: "text-muted-foreground/40 h-6 w-6", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [_jsx("path", { d: "M9 18V5l12-2v13" }), _jsx("circle", { cx: "6", cy: "18", r: "3" }), _jsx("circle", { cx: "18", cy: "16", r: "3" })] }) }), _jsx("p", { className: "text-muted-foreground/60 text-sm", children: fileName }), _jsx("audio", { controls: true, src: blobUrl, className: "w-full max-w-sm" })] })), isContentReady && fileCategory === 'pptx' && rawBlob && (_jsx(Suspense, { fallback: _jsx(RendererFallback, {}), children: _jsx(PptxRenderer, { blob: rawBlob, binaryUrl: blobUrl, filePath: filePath, fileName: fileName, className: "h-full", onDownload: handleDownload }) })), isHtmlFile && isHtmlPreview && (_jsx(HtmlPreview, { path: toSandboxAbsolutePath(filePath), reloadKey: `${fetchRevision}-${reloadKey}`, fileName: fileName, pendingLabel: tHardcodedUi.raw('featuresFilesComponentsFileContentRenderer.line805JsxTextStartingPreviewServer') }, `html-preview-${filePath}`)), isHtmlFile && !isHtmlPreview && !isLoading && !error && fileContent?.type === 'text' && (_jsx(CodeEditor, { editorClassName: codeEditorEditorClassName, ...codeEditorProps, className: readOnly ? 'min-h-full' : 'h-full' }, `html-source-${filePath}-${discardKey}`)), !isLoading &&
|
|
@@ -273,7 +273,7 @@ export function FilePreviewModal({ selectedFilePath, panelMode, filePathList, cu
|
|
|
273
273
|
value0: fileName ? `: ${fileName}` : "",
|
|
274
274
|
}), tabIndex: -1, className: "bg-background animate-in fade-in-0 absolute inset-0 z-20 flex flex-col overflow-hidden duration-normal outline-none", children: panelInner }));
|
|
275
275
|
}
|
|
276
|
-
const node = (_jsxs(DialogDepthProvider, { depth: dialogDepth, children: [_jsx("div", { "data-file-preview-overlay": "", className: "animate-in fade-in-0 pointer-events-auto fixed inset-0 bg-black/50 backdrop-blur-sm duration-normal", style: { zIndex: dialogOverlayZ(dialogDepth) }, onClick: embedded ? () => setExpanded(false) : onClose }), _jsx("div", { ref: surfaceRef, "data-file-preview-overlay": "", role: "dialog", "aria-modal": "true", "aria-label": tI18nHardcoded("i18nComplete.text4a7346d46cf6", {
|
|
276
|
+
const node = (_jsxs(DialogDepthProvider, { depth: dialogDepth, children: [_jsx("div", { "data-file-preview-overlay": "", className: "animate-in fade-in-0 pointer-events-auto fixed inset-0 bg-black/50 backdrop-blur-sm duration-normal", style: { zIndex: dialogOverlayZ(dialogDepth) }, "aria-hidden": "true", onClick: embedded ? () => setExpanded(false) : onClose }), _jsx("div", { ref: surfaceRef, "data-file-preview-overlay": "", role: "dialog", "aria-modal": "true", "aria-label": tI18nHardcoded("i18nComplete.text4a7346d46cf6", {
|
|
277
277
|
value0: fileName ? `: ${fileName}` : "",
|
|
278
278
|
}), tabIndex: -1, className: "kx-fullscreen-modal border-border/60 bg-background animate-in fade-in-0 zoom-in-[0.98] pointer-events-auto fixed inset-3 flex flex-col overflow-hidden rounded-xl border shadow-lg duration-normal outline-none sm:inset-4", style: { zIndex: dialogContentZ(dialogDepth) }, children: panelInner })] }));
|
|
279
279
|
return createPortal(node, document.body);
|
|
@@ -203,7 +203,7 @@ export function useFileContentState({ filePath, onUnsavedChange, onSaved, readOn
|
|
|
203
203
|
finally {
|
|
204
204
|
setIsSaving(false);
|
|
205
205
|
}
|
|
206
|
-
}, [filePath, fileName, refetch, onSaved, readOnly, source]);
|
|
206
|
+
}, [filePath, fileName, refetch, onSaved, readOnly, source, tHardcodedUi, tI18nHardcoded]);
|
|
207
207
|
// Discard handler — force-remounts CodeEditor so it re-initialises from fileContent.content.
|
|
208
208
|
const handleDiscard = useCallback(() => {
|
|
209
209
|
if (readOnly)
|
package/dist/i18n/en.d.ts
CHANGED
|
@@ -423,12 +423,6 @@ declare const catalog: {
|
|
|
423
423
|
kortixDefault: string;
|
|
424
424
|
definedIn: string;
|
|
425
425
|
};
|
|
426
|
-
routing: {
|
|
427
|
-
title: string;
|
|
428
|
-
automatic: string;
|
|
429
|
-
pinned: string;
|
|
430
|
-
pinnedWithProvider: string;
|
|
431
|
-
};
|
|
432
426
|
toasts: {
|
|
433
427
|
rebuildStarted: string;
|
|
434
428
|
buildFailed: string;
|
|
@@ -447,8 +441,6 @@ declare const catalog: {
|
|
|
447
441
|
failed: string;
|
|
448
442
|
notReady: string;
|
|
449
443
|
unavailable: string;
|
|
450
|
-
selected: string;
|
|
451
|
-
selectedAria: string;
|
|
452
444
|
};
|
|
453
445
|
defaultBadge: string;
|
|
454
446
|
runtime: string;
|
|
@@ -459,14 +451,6 @@ declare const catalog: {
|
|
|
459
451
|
confirm: string;
|
|
460
452
|
};
|
|
461
453
|
provider: {
|
|
462
|
-
label: string;
|
|
463
|
-
experimental: string;
|
|
464
|
-
description: string;
|
|
465
|
-
preparing: string;
|
|
466
|
-
fallback: string;
|
|
467
|
-
switched: string;
|
|
468
|
-
switchFailed: string;
|
|
469
|
-
updateFailed: string;
|
|
470
454
|
legacy: string;
|
|
471
455
|
legacyNote: string;
|
|
472
456
|
};
|
|
@@ -679,6 +663,7 @@ declare const catalog: {
|
|
|
679
663
|
};
|
|
680
664
|
credits: {
|
|
681
665
|
loadFailed: string;
|
|
666
|
+
resetAt: string;
|
|
682
667
|
availableBalance: string;
|
|
683
668
|
creditCount: string;
|
|
684
669
|
owed: string;
|
|
@@ -927,6 +912,10 @@ declare const catalog: {
|
|
|
927
912
|
showMore: string;
|
|
928
913
|
brief: {
|
|
929
914
|
status: string;
|
|
915
|
+
subAgent: string;
|
|
916
|
+
spawned: string;
|
|
917
|
+
subAgentCount: string;
|
|
918
|
+
spawnedCount: string;
|
|
930
919
|
created: string;
|
|
931
920
|
source: string;
|
|
932
921
|
changeRequests: string;
|
|
@@ -941,6 +930,7 @@ declare const catalog: {
|
|
|
941
930
|
};
|
|
942
931
|
status: {
|
|
943
932
|
needsYou: string;
|
|
933
|
+
needsInput: string;
|
|
944
934
|
starting: string;
|
|
945
935
|
running: string;
|
|
946
936
|
done: string;
|
|
@@ -2442,7 +2432,6 @@ declare const catalog: {
|
|
|
2442
2432
|
text1bbab8923e0a: string;
|
|
2443
2433
|
text1bc7a47dada1: string;
|
|
2444
2434
|
text1bfa15228ca8: string;
|
|
2445
|
-
text1c145081eddd: string;
|
|
2446
2435
|
text1c57f31d6315: string;
|
|
2447
2436
|
text1c6225ec7092: string;
|
|
2448
2437
|
text1c791e8c04de: string;
|
|
@@ -2519,7 +2508,6 @@ declare const catalog: {
|
|
|
2519
2508
|
text221ff19c904c: string;
|
|
2520
2509
|
text22206bc67806: string;
|
|
2521
2510
|
text222b8d57e366: string;
|
|
2522
|
-
text22412aa281cb: string;
|
|
2523
2511
|
text226f2b1f08a3: string;
|
|
2524
2512
|
text2283269ca150: string;
|
|
2525
2513
|
text22965568d22a: string;
|
|
@@ -2715,7 +2703,6 @@ declare const catalog: {
|
|
|
2715
2703
|
text32ae9b80f832: string;
|
|
2716
2704
|
text32c6817c8380: string;
|
|
2717
2705
|
text32d61a2331fe: string;
|
|
2718
|
-
text32f14aa9ea33: string;
|
|
2719
2706
|
text330010f40240: string;
|
|
2720
2707
|
text331551b0de41: string;
|
|
2721
2708
|
text3329a9bb48b9: string;
|
|
@@ -2807,7 +2794,6 @@ declare const catalog: {
|
|
|
2807
2794
|
text3af0e55ccc96: string;
|
|
2808
2795
|
text3af4d559fa0a: string;
|
|
2809
2796
|
text3b13192b9d88: string;
|
|
2810
|
-
text3b3c31642567: string;
|
|
2811
2797
|
text3b4153c0d3c8: string;
|
|
2812
2798
|
text3b41ba9c7cb8: string;
|
|
2813
2799
|
text3b61c181f516: string;
|
|
@@ -3840,7 +3826,6 @@ declare const catalog: {
|
|
|
3840
3826
|
text910ab2c6e011: string;
|
|
3841
3827
|
text911a1cde90bc: string;
|
|
3842
3828
|
text91273d498d36: string;
|
|
3843
|
-
text914be6d9bb89: string;
|
|
3844
3829
|
text914d43beac26: string;
|
|
3845
3830
|
text91721aa63069: string;
|
|
3846
3831
|
text9173e2705c5b: string;
|
|
@@ -4083,6 +4068,8 @@ declare const catalog: {
|
|
|
4083
4068
|
texta4cf35d7f3ca: string;
|
|
4084
4069
|
texta4f264c3ab5f: string;
|
|
4085
4070
|
texta4fc39798651: string;
|
|
4071
|
+
textddcd87c21894: string;
|
|
4072
|
+
texta8ef31fa7d25: string;
|
|
4086
4073
|
texta514a684676a: string;
|
|
4087
4074
|
texta52ace420f21: string;
|
|
4088
4075
|
texta54220c82b33: string;
|
|
@@ -4301,6 +4288,11 @@ declare const catalog: {
|
|
|
4301
4288
|
textb6b7a0065808: string;
|
|
4302
4289
|
textb6bb289a7a2c: string;
|
|
4303
4290
|
textb6c70926c1aa: string;
|
|
4291
|
+
textf19611c61ca5: string;
|
|
4292
|
+
text15589a542412: string;
|
|
4293
|
+
texte96d99ad9896: string;
|
|
4294
|
+
text70b8d7e10749: string;
|
|
4295
|
+
text2d3f4433505a: string;
|
|
4304
4296
|
textb6cde9030cef: string;
|
|
4305
4297
|
textb6d85433a7ee: string;
|
|
4306
4298
|
textb70354a1faae: string;
|
|
@@ -4390,6 +4382,7 @@ declare const catalog: {
|
|
|
4390
4382
|
textbdb86505f806: string;
|
|
4391
4383
|
textbdbd7706de64: string;
|
|
4392
4384
|
textbdc0857b99a9: string;
|
|
4385
|
+
textbdc090ec61e3: string;
|
|
4393
4386
|
textbdc7d54433e6: string;
|
|
4394
4387
|
textbde05a7b8929: string;
|
|
4395
4388
|
textbe379a30f1aa: string;
|
|
@@ -4649,7 +4642,6 @@ declare const catalog: {
|
|
|
4649
4642
|
textd432610668ee: string;
|
|
4650
4643
|
textd440cfc72edc: string;
|
|
4651
4644
|
textd45336ed23b4: string;
|
|
4652
|
-
textd461a493a375: string;
|
|
4653
4645
|
textd4673300c1d2: string;
|
|
4654
4646
|
textd46dc6f5e3e3: string;
|
|
4655
4647
|
textd4707c58c4a4: string;
|
|
@@ -4963,7 +4955,6 @@ declare const catalog: {
|
|
|
4963
4955
|
texte99baf469ca8: string;
|
|
4964
4956
|
texte9b7cf835375: string;
|
|
4965
4957
|
texte9bef0b0f3c2: string;
|
|
4966
|
-
texte9ca8360a34d: string;
|
|
4967
4958
|
texte9d6212ef873: string;
|
|
4968
4959
|
texte9ec6c0ad396: string;
|
|
4969
4960
|
textea13cd34d9e0: string;
|
|
@@ -5586,6 +5577,10 @@ declare const catalog: {
|
|
|
5586
5577
|
textdfea5351a743: string;
|
|
5587
5578
|
text2f95b1c9ee2b: string;
|
|
5588
5579
|
text7971dd752669: string;
|
|
5580
|
+
text57f57edb6f16: string;
|
|
5581
|
+
texta8597db6f24b: string;
|
|
5582
|
+
text5f6ba69d66d1: string;
|
|
5583
|
+
textcb8d6b0c94c9: string;
|
|
5589
5584
|
};
|
|
5590
5585
|
publicShareConfirm: {
|
|
5591
5586
|
title: string;
|
|
@@ -5855,14 +5850,7 @@ declare const catalog: {
|
|
|
5855
5850
|
};
|
|
5856
5851
|
modelsList: {
|
|
5857
5852
|
onCount: string;
|
|
5858
|
-
perMillion: string;
|
|
5859
|
-
estimate: string;
|
|
5860
|
-
route: string;
|
|
5861
|
-
input: string;
|
|
5862
|
-
cached: string;
|
|
5863
|
-
output: string;
|
|
5864
5853
|
context: string;
|
|
5865
|
-
fromPrice: string;
|
|
5866
5854
|
price: string;
|
|
5867
5855
|
hiddenLine: string;
|
|
5868
5856
|
blockedLine: string;
|
|
@@ -5943,15 +5931,10 @@ declare const catalog: {
|
|
|
5943
5931
|
managedTitle: string;
|
|
5944
5932
|
managedDescription: string;
|
|
5945
5933
|
managedUpgradeHint: string;
|
|
5946
|
-
pricingEstimate: string;
|
|
5947
|
-
pricingRoute: string;
|
|
5948
|
-
pricingPreferred: string;
|
|
5949
5934
|
textImage: string;
|
|
5950
5935
|
textOnly: string;
|
|
5951
5936
|
zdrTitle: string;
|
|
5952
5937
|
zdrDescription: string;
|
|
5953
|
-
usProvidersTitle: string;
|
|
5954
|
-
usProvidersDescription: string;
|
|
5955
5938
|
hiddenHint: string;
|
|
5956
5939
|
hidden: string;
|
|
5957
5940
|
disableModel: string;
|
|
@@ -6284,6 +6267,24 @@ declare const catalog: {
|
|
|
6284
6267
|
chipLabel: string;
|
|
6285
6268
|
chipTitle: string;
|
|
6286
6269
|
manage: string;
|
|
6270
|
+
openInReminders: string;
|
|
6271
|
+
nextRun: string;
|
|
6272
|
+
repeats: string;
|
|
6273
|
+
timeZone: string;
|
|
6274
|
+
lastRun: string;
|
|
6275
|
+
lastRunFailed: string;
|
|
6276
|
+
runQueued: string;
|
|
6277
|
+
runFailed: string;
|
|
6278
|
+
neverRun: string;
|
|
6279
|
+
searchPlaceholder: string;
|
|
6280
|
+
statusAll: string;
|
|
6281
|
+
timeFilterLabel: string;
|
|
6282
|
+
timeAny: string;
|
|
6283
|
+
timeHour: string;
|
|
6284
|
+
timeDay: string;
|
|
6285
|
+
timeWeek: string;
|
|
6286
|
+
timeLater: string;
|
|
6287
|
+
noMatch: string;
|
|
6287
6288
|
cardLabel: string;
|
|
6288
6289
|
cardOneTime: string;
|
|
6289
6290
|
cardRecurring: string;
|