@kortix/ui 0.15.10 → 0.16.0
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/kortix-shared.js +769 -76
- package/dist/_vendor/shared/app-config.d.ts +6 -30
- package/dist/_vendor/shared/channel-descriptors.d.ts +0 -34
- package/dist/_vendor/shared/channel-header.d.ts +2 -1
- package/dist/_vendor/shared/connector-sections.d.ts +0 -25
- package/dist/_vendor/shared/file-tags.d.ts +2 -1
- package/dist/_vendor/shared/my-kortix-agent.d.ts +5 -3
- package/dist/_vendor/shared/pasted-content.d.ts +0 -4
- package/dist/_vendor/shared/pixel-mark.d.ts +0 -17
- package/dist/_vendor/shared/project-glyphs.d.ts +0 -1
- package/dist/_vendor/shared/session/attachment-tile.d.ts +8 -0
- package/dist/_vendor/shared/workspace-settings.d.ts +3 -0
- package/dist/access/access/copy-row.d.ts +7 -1
- package/dist/access/access/copy-row.js +2 -2
- package/dist/animated-copy-icon.js +2 -1
- package/dist/browser/sandbox-browser-chrome.d.ts +2 -1
- package/dist/browser/sandbox-browser-chrome.js +1 -1
- package/dist/customize/agents/agent-cover-card.d.ts +1 -1
- package/dist/customize/agents/agent-cover-card.js +10 -2
- package/dist/customize/agents/agent-filter.js +3 -1
- package/dist/customize/agents/agent-model-view.d.ts +11 -1
- package/dist/customize/agents/agent-model-view.js +12 -1
- package/dist/customize/agents/agent-overview.d.ts +10 -0
- package/dist/customize/agents/agent-overview.js +5 -4
- package/dist/customize/agents/agent-page-chrome.d.ts +5 -6
- package/dist/customize/agents/agent-page-chrome.js +16 -13
- package/dist/customize/agents/agent-page.js +25 -34
- package/dist/customize/agents/agent-tabs.d.ts +3 -0
- package/dist/customize/agents/agent-tabs.js +3 -0
- package/dist/customize/agents/agents-page.js +3 -3
- package/dist/customize/agents/create-agent-modal.d.ts +9 -0
- package/dist/customize/agents/create-agent-modal.js +21 -3
- package/dist/customize/agents/use-default-agent.js +2 -2
- package/dist/customize/connectors/connector-identity.d.ts +11 -2
- package/dist/customize/connectors/connector-identity.js +16 -4
- package/dist/customize/connectors/connectors-page.js +10 -6
- package/dist/customize/connectors/detail/app-page.js +2 -2
- package/dist/customize/connectors/detail/connector-triggers.js +1 -1
- package/dist/customize/connectors/install/install-dialog.d.ts +2 -0
- package/dist/customize/connectors/install/install-dialog.js +6 -1
- package/dist/customize/connectors/use-agent-access.d.ts +2 -0
- package/dist/customize/evals/eval-compare-view.d.ts +10 -0
- package/dist/customize/evals/eval-compare-view.js +68 -0
- package/dist/customize/evals/eval-dataset-view.d.ts +20 -0
- package/dist/customize/evals/eval-dataset-view.js +81 -0
- package/dist/customize/evals/eval-datasets-page.d.ts +25 -0
- package/dist/customize/evals/eval-datasets-page.js +91 -0
- package/dist/customize/evals/eval-job-view.d.ts +12 -0
- package/dist/customize/evals/eval-job-view.js +360 -0
- package/dist/customize/evals/eval-jobs-page.d.ts +4 -0
- package/dist/customize/evals/eval-jobs-page.js +69 -0
- package/dist/customize/evals/eval-meta.d.ts +97 -0
- package/dist/customize/evals/eval-meta.js +228 -0
- package/dist/customize/evals/eval-task-view.d.ts +13 -0
- package/dist/customize/evals/eval-task-view.js +123 -0
- package/dist/customize/evals/eval-tasks-page.d.ts +8 -0
- package/dist/customize/evals/eval-tasks-page.js +56 -0
- package/dist/customize/evals/eval-ui.d.ts +97 -0
- package/dist/customize/evals/eval-ui.js +153 -0
- package/dist/customize/evals/evals-page.d.ts +10 -0
- package/dist/customize/evals/evals-page.js +56 -0
- package/dist/customize/evals/run-eval-modal.d.ts +28 -0
- package/dist/customize/evals/run-eval-modal.js +167 -0
- package/dist/customize/project-settings/project-admin-sections.d.ts +3 -2
- package/dist/customize/project-settings/project-admin-sections.js +6 -1
- package/dist/customize/providers/provider-connect.d.ts +13 -0
- package/dist/customize/providers/provider-connect.js +29 -5
- package/dist/customize/providers/provider-sheet.js +5 -4
- package/dist/customize/sections/component/teams-byo-wizard.js +4 -1
- package/dist/customize/sections/view/gateway/gateway-overview.d.ts +5 -0
- package/dist/customize/sections/view/gateway/gateway-overview.js +32 -6
- package/dist/customize/sections/view/gateway/routing-parts.d.ts +6 -0
- package/dist/customize/sections/view/gateway/routing-parts.js +21 -13
- package/dist/customize/sections/view/git-view.d.ts +19 -1
- package/dist/customize/sections/view/git-view.js +7 -3
- package/dist/customize/sections/view/manifest-issue-list.d.ts +16 -0
- package/dist/customize/sections/view/manifest-issue-list.js +41 -0
- package/dist/customize/sections/view/manifest-issues-row.d.ts +24 -0
- package/dist/customize/sections/view/manifest-issues-row.js +39 -0
- package/dist/customize/sections/view/sandbox-provider-coverage.d.ts +7 -1
- package/dist/customize/sections/view/sandbox-provider-coverage.js +7 -5
- package/dist/customize/sections/view/secrets-view.d.ts +13 -0
- package/dist/customize/sections/view/secrets-view.js +10 -6
- package/dist/customize/sections/view/subscription-usage.d.ts +2 -7
- package/dist/customize/sections/view/subscription-usage.js +4 -8
- package/dist/customize/settings/settings-tab-header.js +12 -3
- package/dist/customize/settings/tabs/experimental-tab.d.ts +16 -5
- package/dist/customize/settings/tabs/experimental-tab.js +36 -11
- package/dist/customize/settings/tabs/general-tab.js +1 -1
- package/dist/customize/settings/tabs/sandbox-tab.d.ts +10 -0
- package/dist/customize/settings/tabs/sandbox-tab.js +27 -4
- package/dist/customize/settings/tabs/snapshots-tab.d.ts +31 -0
- package/dist/customize/settings/tabs/snapshots-tab.js +61 -5
- package/dist/customize/settings/tabs/workspace-keys.js +6 -3
- package/dist/customize/shared/capability-page-shell.js +9 -1
- package/dist/customize/shared/catalog/catalog-card.d.ts +1 -1
- package/dist/customize/shared/catalog/catalog-card.js +15 -5
- package/dist/customize/shared/customize-tab-bar.js +1 -1
- package/dist/customize/shared/new-entity-menu.d.ts +1 -1
- package/dist/customize/shared/new-entity-menu.js +38 -1
- package/dist/customize/triggers/runtime-triggers.d.ts +4 -0
- package/dist/customize/triggers/runtime-triggers.js +33 -3
- package/dist/customize/triggers/schedule/event-trigger-copy.js +1 -1
- package/dist/customize/triggers/schedule/post-to-field.js +2 -2
- package/dist/customize/triggers/schedule/schedule-detail-sheet.js +5 -4
- package/dist/customize/triggers/schedule/then-fields.d.ts +5 -1
- package/dist/customize/triggers/schedule/then-fields.js +23 -3
- package/dist/customize/triggers/schedule/trigger-callouts.js +1 -1
- package/dist/customize/triggers/schedule/trigger-composer-logic.d.ts +27 -0
- package/dist/customize/triggers/schedule/trigger-composer-logic.js +51 -5
- package/dist/customize/triggers/schedule/trigger-composer.js +19 -13
- package/dist/customize/triggers/schedule/trigger-edit-logic.js +25 -5
- package/dist/customize/triggers/schedule/trigger-filter.d.ts +10 -3
- package/dist/customize/triggers/schedule/trigger-filter.js +7 -6
- package/dist/customize/triggers/schedule/trigger-readonly.js +1 -1
- package/dist/customize/triggers/schedule/trigger-runs-panel.js +1 -1
- package/dist/customize/triggers/schedule/when-event.js +1 -1
- package/dist/customize/triggers/schedule/when-schedule.d.ts +5 -1
- package/dist/customize/triggers/schedule/when-schedule.js +16 -1
- package/dist/customize/triggers/schedule-view.js +6 -3
- package/dist/files/project/components/drive-explorer.js +33 -70
- package/dist/files/project/components/drive-grid-view.d.ts +2 -31
- package/dist/files/project/components/drive-grid-view.js +12 -22
- package/dist/files/project/components/drive-list-view.d.ts +3 -30
- package/dist/files/project/components/drive-list-view.js +8 -18
- package/dist/files/project/components/drive-selection-bar.d.ts +4 -5
- package/dist/files/project/components/drive-selection-bar.js +13 -20
- package/dist/files/project/components/explorer-listing.d.ts +48 -0
- package/dist/files/project/components/explorer-listing.js +64 -0
- package/dist/files/project/components/file-explorer-page.js +7 -204
- package/dist/files/project/components/file-thumbnail.js +3 -1
- package/dist/files/project/components/manifest-issue-mark.d.ts +9 -0
- package/dist/files/project/components/manifest-issue-mark.js +26 -0
- package/dist/files/project/hooks/use-change-requests.d.ts +10 -0
- package/dist/files/project/hooks/use-change-requests.js +17 -0
- package/dist/files/project/manifest-annotations.d.ts +16 -0
- package/dist/files/project/manifest-annotations.js +19 -0
- package/dist/files/project/store/version-store.d.ts +1 -1
- package/dist/files/project/upload-batch.d.ts +20 -0
- package/dist/files/project/upload-batch.js +20 -0
- package/dist/files/runtime/hooks/use-binary-blob.js +3 -2
- package/dist/files/runtime/hooks/use-file-content.js +3 -2
- package/dist/files/runtime/hooks/use-file-list.js +1 -2
- package/dist/files/runtime/hooks/use-file-mutations.js +69 -6
- package/dist/files/runtime/hooks/use-file-refresh.d.ts +4 -0
- package/dist/files/runtime/hooks/use-file-refresh.js +6 -0
- package/dist/files/tree/components/file-tree-item.js +1 -4
- package/dist/files/viewer/file-annotations.d.ts +18 -0
- package/dist/files/viewer/file-annotations.js +21 -0
- package/dist/files/viewer/file-content-renderer.js +1 -1
- package/dist/files/viewer/file-viewer.js +2 -1
- package/dist/files/viewer/index.d.ts +1 -0
- package/dist/files/viewer/index.js +1 -0
- package/dist/files/viewer/use-file-content-state.js +8 -1
- package/dist/i18n/en.d.ts +544 -46
- package/dist/i18n/en.js +593 -95
- package/dist/i18n/ui-catalog/remaining-ui-translation-keys.generated.js +0 -4
- package/dist/icons/caret-right-solid.d.ts +11 -0
- package/dist/icons/caret-right-solid.js +15 -0
- package/dist/internal/auth/auth-art.d.ts +12 -0
- package/dist/internal/auth/auth-art.js +118 -0
- package/dist/internal/auth/auth-card-shell.d.ts +14 -10
- package/dist/internal/auth/auth-card-shell.js +20 -31
- package/dist/internal/auth/auth-consent.d.ts +3 -1
- package/dist/internal/auth/auth-consent.js +2 -2
- package/dist/internal/auth/auth-primitives.d.ts +26 -1
- package/dist/internal/auth/auth-primitives.js +37 -8
- package/dist/internal/connector-logo/connector-logo.d.ts +2 -1
- package/dist/internal/connector-logo/connector-logo.js +11 -2
- package/dist/internal/files/file-read-retry.d.ts +18 -2
- package/dist/internal/files/file-read-retry.js +42 -4
- package/dist/internal/hooks/projects/use-new-project-session.js +5 -10
- package/dist/internal/hooks/use-auto-scroll-physics.d.ts +1 -1
- package/dist/internal/hooks/use-auto-scroll-physics.js +2 -10
- package/dist/internal/hooks/use-reduced-motion.d.ts +4 -0
- package/dist/internal/hooks/use-reduced-motion.js +12 -0
- package/dist/internal/hooks/use-save-shortcut.d.ts +8 -0
- package/dist/internal/hooks/use-save-shortcut.js +28 -0
- package/dist/internal/layout/connect-mcp-modal.d.ts +1 -1
- package/dist/internal/layout/connect-mcp-modal.js +9 -4
- package/dist/internal/layout/panel-chrome.d.ts +28 -0
- package/dist/internal/layout/panel-chrome.js +27 -0
- package/dist/internal/layout/project-page-header.js +5 -1
- package/dist/internal/layout/project-settings-nav.d.ts +17 -0
- package/dist/internal/layout/project-settings-nav.js +24 -0
- package/dist/internal/lib/browser-noise/rules/webview.js +16 -0
- package/dist/internal/lib/capability-tab-routes.d.ts +8 -0
- package/dist/internal/lib/capability-tab-routes.js +11 -0
- package/dist/internal/lib/manifest-health.d.ts +25 -1
- package/dist/internal/lib/manifest-health.js +56 -0
- package/dist/internal/lib/project-preamble.js +1 -1
- package/dist/internal/lib/web-notifications.d.ts +1 -1
- package/dist/internal/lib/web-notifications.js +3 -0
- package/dist/internal/notifications/notification-inbox.js +2 -1
- package/dist/internal/notifications/notification-rows.d.ts +1 -1
- package/dist/internal/notifications/notification-rows.js +15 -1
- package/dist/internal/selection/selection-bar.d.ts +2 -8
- package/dist/internal/selection/selection-bar.js +15 -38
- package/dist/internal/stores/active-space-store.d.ts +1 -1
- package/dist/internal/stores/browser-recents-store.d.ts +1 -1
- package/dist/internal/stores/composer-prefill-store.d.ts +7 -0
- package/dist/internal/stores/composer-prefill-store.js +1 -0
- package/dist/internal/stores/current-account-store.d.ts +1 -1
- package/dist/internal/stores/first-chat-store.d.ts +1 -1
- package/dist/internal/stores/mobile-app-promo-store.d.ts +1 -1
- package/dist/internal/stores/session-browser-store.d.ts +1 -1
- package/dist/internal/stores/session-expanded-store.d.ts +1 -1
- package/dist/internal/stores/session-filter-store.d.ts +1 -1
- package/dist/internal/stores/session-history-view-store.d.ts +1 -1
- package/dist/internal/stores/session-panel-memory-store.d.ts +1 -1
- package/dist/internal/stores/sound-store.d.ts +1 -1
- package/dist/internal/stores/tab-store.d.ts +1 -1
- package/dist/internal/stores/user-preferences-store.d.ts +9 -1
- package/dist/internal/stores/user-preferences-store.js +2 -0
- package/dist/internal/stores/web-notification-store.d.ts +1 -1
- package/dist/lib/base-ui-compat.js +28 -1
- package/dist/lib/dotmatrix-hooks.d.ts +1 -0
- package/dist/lib/dotmatrix-hooks.js +3 -13
- package/dist/lib/reduced-motion.d.ts +10 -0
- package/dist/lib/reduced-motion.js +104 -0
- package/dist/lib/routes.d.ts +9 -0
- package/dist/lib/routes.js +7 -4
- package/dist/markdown/artifact-link.d.ts +11 -0
- package/dist/markdown/artifact-link.js +62 -0
- package/dist/markdown/code/index.d.ts +1 -1
- package/dist/markdown/code/index.js +1 -1
- package/dist/markdown/code/inline-code.d.ts +1 -1
- package/dist/markdown/code/inline-code.js +1 -1
- package/dist/markdown/genui/components/map-canvas.js +2 -1
- package/dist/markdown/index.d.ts +3 -1
- package/dist/markdown/index.js +2 -1
- package/dist/markdown/{code/inline-chip.js → inline-chip.js} +2 -2
- package/dist/markdown/inline-code-text.d.ts +34 -0
- package/dist/markdown/inline-code-text.js +68 -0
- package/dist/markdown/setup-links/approval-decision.js +3 -3
- package/dist/markdown/soft-breaks.d.ts +21 -0
- package/dist/markdown/soft-breaks.js +33 -0
- package/dist/markdown/unified-markdown.d.ts +9 -1
- package/dist/markdown/unified-markdown.js +31 -9
- package/dist/primitives/action-bar.d.ts +50 -0
- package/dist/primitives/action-bar.js +87 -0
- package/dist/primitives/calendar.js +4 -2
- package/dist/primitives/inline-meta.js +2 -2
- package/dist/primitives/kortix-loader.js +2 -1
- package/dist/primitives/modal.d.ts +1 -1
- package/dist/primitives/paper-wallpaper-shaders.d.ts +1 -0
- package/dist/primitives/paper-wallpaper-shaders.js +6 -0
- package/dist/primitives/resizable.d.ts +1 -1
- package/dist/primitives/resize-seam.d.ts +3 -2
- package/dist/primitives/resize-seam.js +4 -3
- package/dist/primitives/settings-section-header.d.ts +30 -1
- package/dist/primitives/settings-section-header.js +37 -0
- package/dist/primitives/sliding-tab-indicator.js +2 -1
- package/dist/primitives/switch.js +15 -8
- package/dist/primitives/text-shimmer.js +6 -0
- package/dist/primitives/toast-clearance.d.ts +52 -0
- package/dist/primitives/toast-clearance.js +116 -0
- package/dist/primitives/toast.d.ts +3 -1
- package/dist/primitives/toast.js +2 -0
- package/dist/primitives/typed-title.js +1 -1
- package/dist/primitives/wallpaper-shaders.js +1 -1
- package/dist/session/actions/project-session-list-helpers.d.ts +16 -0
- package/dist/session/actions/project-session-list-helpers.js +18 -0
- package/dist/session/actions/session-label.js +2 -2
- package/dist/session/agents/agent-model.d.ts +1 -0
- package/dist/session/agents/agent-model.js +2 -1
- package/dist/session/agents/agent-strip.d.ts +10 -5
- package/dist/session/agents/agent-strip.js +49 -15
- package/dist/session/agents/held-messages.d.ts +6 -2
- package/dist/session/agents/held-messages.js +6 -3
- package/dist/session/agents/workflow-run-controls.d.ts +27 -4
- package/dist/session/agents/workflow-run-controls.js +63 -10
- package/dist/session/composer/ComposerCard.js +7 -1
- package/dist/session/composer/agent-selector.d.ts +2 -0
- package/dist/session/composer/agent-selector.js +11 -4
- package/dist/session/composer/animated-placeholder.js +2 -1
- package/dist/session/composer/attachment-tile.d.ts +2 -2
- package/dist/session/composer/attachment-tile.js +25 -3
- package/dist/session/composer/composer-agent-access.d.ts +10 -1
- package/dist/session/composer/composer-agent-access.js +18 -4
- package/dist/session/composer/composer-chat-input.d.ts +1 -0
- package/dist/session/composer/composer-chat-input.js +7 -2
- package/dist/session/composer/composer-logic.d.ts +7 -0
- package/dist/session/composer/composer-logic.js +18 -0
- package/dist/session/composer/composer-reset.d.ts +8 -14
- package/dist/session/composer/composer-toolbar.d.ts +3 -1
- package/dist/session/composer/composer-toolbar.js +3 -3
- package/dist/session/composer/composer.d.ts +9 -2
- package/dist/session/composer/composer.js +24 -9
- package/dist/session/composer/editor/composer-editor.js +6 -4
- package/dist/session/composer/hooks/use-file-search.d.ts +12 -2
- package/dist/session/composer/hooks/use-file-search.js +71 -7
- package/dist/session/composer/menus/menu-items.js +6 -2
- package/dist/session/composer/menus/menu-shell.d.ts +3 -1
- package/dist/session/composer/menus/menu-shell.js +2 -2
- package/dist/session/composer/menus/slash-menu.d.ts +7 -0
- package/dist/session/composer/menus/slash-menu.js +48 -1
- package/dist/session/composer/use-instant-session-send.js +7 -1
- package/dist/session/header/session-reminders-indicator.js +3 -2
- package/dist/session/header/session-site-header.d.ts +3 -1
- package/dist/session/header/session-site-header.js +27 -8
- package/dist/session/media/sandbox-url-detector.js +1 -1
- package/dist/session/models/connect-model-step.d.ts +29 -0
- package/dist/session/models/connect-model-step.js +50 -0
- package/dist/session/models/model-connection-gate.js +2 -1
- package/dist/session/models/model-selector.js +1 -1
- package/dist/session/models/subscription-switcher.d.ts +7 -0
- package/dist/session/models/subscription-switcher.js +52 -10
- package/dist/session/models/subscription-windows.d.ts +2 -0
- package/dist/session/models/subscription-windows.js +2 -0
- package/dist/session/models/use-workspace-model-gate.d.ts +11 -0
- package/dist/session/models/use-workspace-model-gate.js +62 -0
- package/dist/session/models/workspace-model-gate.d.ts +46 -0
- package/dist/session/models/workspace-model-gate.js +66 -0
- package/dist/session/outcomes/session-outcomes-provider.js +14 -7
- package/dist/session/panel/action-panel.js +8 -19
- package/dist/session/panel/easy/app-preview.d.ts +4 -1
- package/dist/session/panel/easy/app-preview.js +95 -33
- package/dist/session/panel/easy/apps-card.js +6 -11
- package/dist/session/panel/easy/change-requests-card.js +1 -1
- package/dist/session/panel/easy/changes-card.d.ts +14 -0
- package/dist/session/panel/easy/changes-card.js +60 -0
- package/dist/session/panel/easy/context-card.d.ts +5 -1
- package/dist/session/panel/easy/context-card.js +13 -28
- package/dist/session/panel/easy/context-meter.d.ts +18 -0
- package/dist/session/panel/easy/context-meter.js +73 -0
- package/dist/session/panel/easy/detail-view.d.ts +1 -1
- package/dist/session/panel/easy/detail-view.js +24 -21
- package/dist/session/panel/easy/easy-panel.js +7 -5
- package/dist/session/panel/easy/file-preview.js +3 -1
- package/dist/session/panel/easy/frame-history.d.ts +91 -0
- package/dist/session/panel/easy/frame-history.js +198 -0
- package/dist/session/panel/easy/outputs-card.d.ts +10 -0
- package/dist/session/panel/easy/outputs-card.js +28 -31
- package/dist/session/panel/easy/panel-card.d.ts +1 -3
- package/dist/session/panel/easy/panel-card.js +24 -8
- package/dist/session/panel/easy/plan-card.js +2 -2
- package/dist/session/panel/easy/step-icon.d.ts +4 -1
- package/dist/session/panel/easy/step-icon.js +2 -2
- package/dist/session/panel/session-action-panel-column.d.ts +5 -0
- package/dist/session/panel/session-action-panel-column.js +198 -101
- package/dist/session/panel/session-desktop.js +5 -1
- package/dist/session/panel/session-diff-viewer.d.ts +3 -1
- package/dist/session/panel/session-diff-viewer.js +7 -4
- package/dist/session/panel/session-panel-provider.js +29 -5
- package/dist/session/panel/shared/derive-panels.js +64 -4
- package/dist/session/prompts/session-connect-card.d.ts +63 -0
- package/dist/session/prompts/{session-connect-prompt.js → session-connect-card.js} +53 -42
- package/dist/session/status/session-busy-indicator.js +2 -1
- package/dist/session/status/session-error-banner.js +1 -1
- package/dist/session/thread/chat-minimap.js +2 -1
- package/dist/session/thread/session-body.js +4 -1
- package/dist/session/thread/session-chat.js +311 -300
- package/dist/session/thread/session-turn-meta-rows.d.ts +13 -5
- package/dist/session/thread/session-turn-meta-rows.js +33 -5
- package/dist/session/thread/transcript.d.ts +3 -3
- package/dist/session/thread/transcript.js +33 -27
- package/dist/session/thread/typing-indicator.d.ts +2 -2
- package/dist/session/thread/typing-indicator.js +10 -3
- package/dist/session/tool/tool-part-renderer.js +7 -2
- package/dist/session/tool/tools/kortix-action-tool.js +10 -2
- package/dist/session/tool/tools/session-spawn-tool.js +3 -3
- package/dist/session/tool/tools/workflow-run-card.d.ts +11 -1
- package/dist/session/tool/tools/workflow-run-card.js +31 -7
- package/dist/session/tool/tools/workflow-run-cost.d.ts +29 -0
- package/dist/session/tool/tools/workflow-run-cost.js +75 -0
- package/dist/session/tool/tools/workflow-tool.d.ts +1 -1
- package/dist/session/tool/tools/workflow-tool.js +40 -15
- package/dist/session/turn/peer-message-row.js +1 -1
- package/dist/session/turn/queued-prompt-bubbles.d.ts +3 -2
- package/dist/session/turn/queued-prompt-bubbles.js +1 -1
- package/dist/session/turn/throttled-markdown.js +1 -1
- package/dist/session/turn/turn-viewport.d.ts +66 -10
- package/dist/session/turn/turn-viewport.js +92 -12
- package/dist/session/turn/user-message.js +7 -5
- package/dist/styles/theme.css +68 -0
- package/dist/styles.css +1 -1
- package/dist/terminal/pty-terminal.js +1 -1
- package/dist/terminal/session-terminal-connect-bar.js +2 -1
- package/dist/test-utils/intl.d.ts +544 -46
- package/dist/workspace/admin/project-admin-dashboard.js +23 -11
- package/dist/workspace/admin/settings-search-landing.js +2 -1
- package/dist/workspace/calendar/calendar-dates.d.ts +31 -0
- package/dist/workspace/calendar/calendar-dates.js +64 -0
- package/dist/workspace/calendar/calendar-new-item.d.ts +11 -0
- package/dist/workspace/calendar/calendar-new-item.js +47 -0
- package/dist/workspace/calendar/calendar-page.d.ts +3 -0
- package/dist/workspace/calendar/calendar-page.js +177 -0
- package/dist/workspace/calendar/calendar-panel.d.ts +13 -0
- package/dist/workspace/calendar/calendar-panel.js +103 -0
- package/dist/workspace/calendar/calendar-people.d.ts +52 -0
- package/dist/workspace/calendar/calendar-people.js +117 -0
- package/dist/workspace/calendar/calendar-scheduled.d.ts +29 -0
- package/dist/workspace/calendar/calendar-scheduled.js +118 -0
- package/dist/workspace/calendar/calendar-views.d.ts +32 -0
- package/dist/workspace/calendar/calendar-views.js +124 -0
- package/dist/workspace/calendar/calendar-when.d.ts +14 -0
- package/dist/workspace/calendar/calendar-when.js +81 -0
- package/dist/workspace/calendar/mention-textarea.d.ts +19 -0
- package/dist/workspace/calendar/mention-textarea.js +84 -0
- package/dist/workspace/home/access-requests-bell.js +2 -1
- package/dist/workspace/home/existing-repo-setup-prompt.d.ts +5 -8
- package/dist/workspace/home/existing-repo-setup-prompt.js +16 -42
- package/dist/workspace/home/no-agent-home.d.ts +3 -1
- package/dist/workspace/home/no-agent-home.js +2 -2
- package/dist/workspace/inbox/workspace-inbox.d.ts +1 -1
- package/dist/workspace/inbox/workspace-inbox.js +1 -1
- package/dist/workspace/layout/project-files-view.js +2 -1
- package/dist/workspace/layout/project-home.js +16 -9
- package/dist/workspace/memory/memory-page-list.js +1 -1
- package/dist/workspace/new/workspace-handoff.js +2 -1
- package/dist/workspace/projects/modal/project-icon-field.js +2 -1
- package/dist/workspace/session-workspace.js +13 -12
- package/dist/workspace/setup/setup-steps.d.ts +43 -0
- package/dist/workspace/setup/setup-steps.js +38 -0
- package/dist/workspace/setup/workspace-setup-page.d.ts +10 -0
- package/dist/workspace/setup/workspace-setup-page.js +124 -0
- package/dist/workspace/sidebar/footer/project-artifacts-nav.js +5 -1
- package/dist/workspace/sidebar/footer/project-calendar-nav.d.ts +8 -0
- package/dist/workspace/sidebar/footer/project-calendar-nav.js +31 -0
- package/dist/workspace/sidebar/footer/project-chrome-nav.d.ts +14 -6
- package/dist/workspace/sidebar/footer/project-chrome-nav.js +37 -25
- package/dist/workspace/sidebar/footer/project-computer-nav.d.ts +17 -9
- package/dist/workspace/sidebar/footer/project-computer-nav.js +36 -26
- package/dist/workspace/sidebar/footer/project-download-app-nav.d.ts +7 -7
- package/dist/workspace/sidebar/footer/project-download-app-nav.js +25 -13
- package/dist/workspace/sidebar/footer/project-inbox-nav.d.ts +8 -0
- package/dist/workspace/sidebar/footer/project-inbox-nav.js +29 -0
- package/dist/workspace/sidebar/footer/project-manifest-issues-alert.d.ts +3 -13
- package/dist/workspace/sidebar/footer/project-manifest-issues-alert.js +6 -48
- package/dist/workspace/sidebar/footer/project-mcp-nav.d.ts +7 -7
- package/dist/workspace/sidebar/footer/project-mcp-nav.js +31 -13
- package/dist/workspace/sidebar/footer/project-phone-app-nav.d.ts +10 -0
- package/dist/workspace/sidebar/footer/project-phone-app-nav.js +61 -0
- package/dist/workspace/sidebar/footer/project-promo-cards.d.ts +21 -0
- package/dist/workspace/sidebar/footer/project-promo-cards.js +33 -0
- package/dist/workspace/sidebar/footer/promo-card.d.ts +41 -0
- package/dist/workspace/sidebar/footer/promo-card.js +47 -0
- package/dist/workspace/sidebar/project-nav-items.d.ts +3 -1
- package/dist/workspace/sidebar/project-nav-items.js +12 -4
- package/dist/workspace/sidebar/project-session-list.js +58 -26
- package/dist/workspace/sidebar/project-sidebar.js +2 -5
- package/dist/workspace/sidebar/project-spaces-nav.js +2 -1
- package/dist/workspace/sidebar/session-brief-hover-card.d.ts +24 -0
- package/dist/workspace/sidebar/session-brief-hover-card.js +4 -3
- package/dist/workspace/sidebar/session-group-sections.d.ts +26 -7
- package/dist/workspace/sidebar/session-group-sections.js +121 -41
- package/dist/workspace/sidebar/session-grouping.d.ts +1 -1
- package/dist/workspace/sidebar/session-grouping.js +1 -1
- package/dist/workspace/sidebar/sidebar-drill.js +6 -0
- package/dist/workspace/sidebar/sidebar-more-group.js +3 -2
- package/dist/workspace/sidebar/use-workspace-list.d.ts +7 -0
- package/dist/workspace/sidebar/use-workspace-list.js +11 -1
- package/dist/workspace/sidebar/workspace-settings-sidebar-nav.d.ts +14 -0
- package/dist/workspace/sidebar/workspace-settings-sidebar-nav.js +46 -2
- package/dist/workspace/space/space-tab-panels.js +1 -1
- package/dist/workspace/spaces/space-details-panel.js +2 -2
- package/dist/workspace/spaces/space-timeline.js +2 -2
- package/dist/workspace/spaces/space-triggers.js +2 -2
- package/dist/workspace/spaces/space-view.js +11 -5
- package/package.json +79 -10
- package/skills/kortix-ui/SKILL.md +2 -2
- package/skills/kortix-ui/references/modules.md +5 -3
- package/dist/session/prompts/session-connect-prompt.d.ts +0 -40
- package/dist/session/thread/turn-share.d.ts +0 -16
- package/dist/session/thread/turn-share.js +0 -161
- package/dist/workspace/sidebar/footer/promo-nav-row.d.ts +0 -11
- package/dist/workspace/sidebar/footer/promo-nav-row.js +0 -7
- /package/dist/markdown/{code/inline-chip.d.ts → inline-chip.d.ts} +0 -0
|
@@ -573,8 +573,6 @@ export const REMAINING_UI_TRANSLATION_KEYS = {
|
|
|
573
573
|
'Clear notifications': 'texte6f312c6b6ef',
|
|
574
574
|
'Clone address': 'textac830bd3c755',
|
|
575
575
|
'Clone command': 'text6264f3bfdd91',
|
|
576
|
-
'Clone from this address with any Git client. When git asks, enter any username and a Kortix API key as the password — the Kortix command line does this for you through its credential helper, plain': 'texte327e6c1348b',
|
|
577
|
-
'Clone with plain': 'text7760401b25c7',
|
|
578
576
|
'Conditions saved': 'textfc62a0071f66',
|
|
579
577
|
'Connect my account': 'text9676bdc9332f',
|
|
580
578
|
'Connect now': 'textf5e732583fb2',
|
|
@@ -601,7 +599,6 @@ export const REMAINING_UI_TRANSLATION_KEYS = {
|
|
|
601
599
|
deleted: 'text1185f37d33b0',
|
|
602
600
|
'Describe what is happening and when it ends.': 'text94e0d14dbf98',
|
|
603
601
|
'Distribution saved': 'textadf5fc6a2d24',
|
|
604
|
-
'does not.': 'textb74106e21108',
|
|
605
602
|
'Download App': 'text8ba3744d6b1d',
|
|
606
603
|
'Each agent is what a person gets access to. Configure what it knows, what it can reach, and when it runs.': 'text636453e23d69',
|
|
607
604
|
'Each person connects their own account. Start a session that requires it to be walked through the connection.': 'text607b97fdc5aa',
|
|
@@ -639,7 +636,6 @@ export const REMAINING_UI_TRANSLATION_KEYS = {
|
|
|
639
636
|
Health: 'text55898449eb74',
|
|
640
637
|
'How the model samples, and how many tool calls one run may make.': 'text33439eb47c9a',
|
|
641
638
|
'Install the Kortix command line': 'text81fbecb138f6',
|
|
642
|
-
'instead of the Kortix command line.': 'text2f72fafe0ce1',
|
|
643
639
|
Instructions: 'text934652dce41d',
|
|
644
640
|
'Instructions and scripts this agent can load into a session.': 'textb27e54100c96',
|
|
645
641
|
'Instructions and scripts this agent can load into a session. Click a skill to read it.': 'text836cd8e8a791',
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { SVGProps } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Kortix's solid disclosure caret: Phosphor's `CaretRightIcon` (fill) drawn
|
|
4
|
+
* 20% smaller inside the same 256 box, with rounder corners (radius 22 vs
|
|
5
|
+
* Phosphor's 8). Same box means a drop-in swap: the caller's `size-*` and
|
|
6
|
+
* `rotate-90` keep working, and the glyph reads lighter beside a label.
|
|
7
|
+
*
|
|
8
|
+
* Use it for every expand/collapse and "opens more" caret: the session
|
|
9
|
+
* panel's section headers and rows, and the sidebar's session groups.
|
|
10
|
+
*/
|
|
11
|
+
export declare function CaretRightSolidIcon({ className, ...props }: SVGProps<SVGSVGElement>): import("react").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from '../lib/utils.js';
|
|
4
|
+
/**
|
|
5
|
+
* Kortix's solid disclosure caret: Phosphor's `CaretRightIcon` (fill) drawn
|
|
6
|
+
* 20% smaller inside the same 256 box, with rounder corners (radius 22 vs
|
|
7
|
+
* Phosphor's 8). Same box means a drop-in swap: the caller's `size-*` and
|
|
8
|
+
* `rotate-90` keep working, and the glyph reads lighter beside a label.
|
|
9
|
+
*
|
|
10
|
+
* Use it for every expand/collapse and "opens more" caret: the session
|
|
11
|
+
* panel's section headers and rows, and the sidebar's session groups.
|
|
12
|
+
*/
|
|
13
|
+
export function CaretRightSolidIcon({ className, ...props }) {
|
|
14
|
+
return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 256 256", width: "1em", height: "1em", fill: "currentColor", "aria-hidden": true, className: cn('size-4', className), ...props, children: _jsx("path", { d: "M111.56,79.56L144.44,112.44Q160,128 144.44,143.56L111.56,176.44Q96,192 96,170L96,86Q96,64 111.56,79.56Z" }) }));
|
|
15
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** @internal Kortix apps only. No semver: it may change in any release. */
|
|
2
|
+
/**
|
|
3
|
+
* The art half of the auth frame: a slow dither field, inset from the top,
|
|
4
|
+
* right and bottom edges. An art pane is dark in both themes (brand D4d,
|
|
5
|
+
* graphic-elements.md): the `dark` class scopes its tokens, so the solid dark
|
|
6
|
+
* surface is also the fallback that paints before WebGL and without WebGL2.
|
|
7
|
+
* Decorative only. A press or a drag on the pane sends out blue rings.
|
|
8
|
+
* Reduced motion freezes the field and drops the rings.
|
|
9
|
+
*/
|
|
10
|
+
export declare function AuthArt({ className }: {
|
|
11
|
+
className?: string;
|
|
12
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useReducedMotion } from 'motion/react';
|
|
4
|
+
import { useEffect, useRef, useState } from 'react';
|
|
5
|
+
import { lazyClient } from '../../lib/lazy-client.js';
|
|
6
|
+
import { ShaderSafe, supportsWebGL2 } from '../../primitives/shader-safe.js';
|
|
7
|
+
import { cn } from '../lib/utils.js';
|
|
8
|
+
/** Tailwind's `lg`: the breakpoint at which the frame shows the pane. */
|
|
9
|
+
const WIDE = '(min-width: 64rem)';
|
|
10
|
+
/** One ring: a 160px circle grown from a quarter of its size while it fades. */
|
|
11
|
+
const RING_SIZE = 160;
|
|
12
|
+
const RING_MS = 600;
|
|
13
|
+
const RING_EASE = 'cubic-bezier(0.23, 1, 0.32, 1)';
|
|
14
|
+
/** Pointer travel between two rings on a drag. */
|
|
15
|
+
const RING_STEP = 48;
|
|
16
|
+
/** Rings alive at once. A fast drag drops rings instead of stacking layers. */
|
|
17
|
+
const RING_CAP = 6;
|
|
18
|
+
const Dithering = lazyClient(() => import('@paper-design/shaders-react').then((m) => m.Dithering));
|
|
19
|
+
/**
|
|
20
|
+
* A theme token as an `rgb()` string. The shader parses hex and rgb only, and
|
|
21
|
+
* the tokens are oklch: a 1px 2D canvas resolves the token the same way the
|
|
22
|
+
* page paints it.
|
|
23
|
+
*/
|
|
24
|
+
function resolveToken(scope, name) {
|
|
25
|
+
const value = getComputedStyle(scope).getPropertyValue(name).trim();
|
|
26
|
+
const probe = document.createElement('canvas').getContext('2d');
|
|
27
|
+
if (!value || !probe)
|
|
28
|
+
return null;
|
|
29
|
+
probe.fillStyle = value;
|
|
30
|
+
probe.fillRect(0, 0, 1, 1);
|
|
31
|
+
const [r, g, b] = probe.getImageData(0, 0, 1, 1).data;
|
|
32
|
+
return [r, g, b];
|
|
33
|
+
}
|
|
34
|
+
/** `a` moved `t` of the way to `b`, as an `rgb()` string. */
|
|
35
|
+
function mix(a, b, t) {
|
|
36
|
+
const [r, g, bl] = a.map((v, i) => Math.round(v + (b[i] - v) * t));
|
|
37
|
+
return `rgb(${r}, ${g}, ${bl})`;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* The art half of the auth frame: a slow dither field, inset from the top,
|
|
41
|
+
* right and bottom edges. An art pane is dark in both themes (brand D4d,
|
|
42
|
+
* graphic-elements.md): the `dark` class scopes its tokens, so the solid dark
|
|
43
|
+
* surface is also the fallback that paints before WebGL and without WebGL2.
|
|
44
|
+
* Decorative only. A press or a drag on the pane sends out blue rings.
|
|
45
|
+
* Reduced motion freezes the field and drops the rings.
|
|
46
|
+
*/
|
|
47
|
+
export function AuthArt({ className }) {
|
|
48
|
+
const reduceMotion = useReducedMotion() ?? false;
|
|
49
|
+
const pane = useRef(null);
|
|
50
|
+
const rings = useRef(null);
|
|
51
|
+
// The last ring of the current drag; null when no pointer is down.
|
|
52
|
+
const drag = useRef(null);
|
|
53
|
+
// Rings never touch React state: each is a node with one WAAPI animation of
|
|
54
|
+
// `transform` and `opacity`, which the compositor runs off the main thread.
|
|
55
|
+
const ring = (x, y) => {
|
|
56
|
+
const layer = rings.current;
|
|
57
|
+
if (!layer || layer.childElementCount >= RING_CAP)
|
|
58
|
+
return;
|
|
59
|
+
const node = document.createElement('span');
|
|
60
|
+
node.className = 'border-kortix-blue absolute top-0 left-0 rounded-full border-2';
|
|
61
|
+
node.style.width = node.style.height = `${RING_SIZE}px`;
|
|
62
|
+
layer.appendChild(node);
|
|
63
|
+
const at = `translate(${x - RING_SIZE / 2}px, ${y - RING_SIZE / 2}px)`;
|
|
64
|
+
node
|
|
65
|
+
.animate([
|
|
66
|
+
{ transform: `${at} scale(0.25)`, opacity: 1 },
|
|
67
|
+
{ transform: `${at} scale(1)`, opacity: 0 },
|
|
68
|
+
], { duration: RING_MS, easing: RING_EASE, fill: 'forwards' })
|
|
69
|
+
.finished.catch(() => { })
|
|
70
|
+
.finally(() => node.remove());
|
|
71
|
+
};
|
|
72
|
+
const point = (event) => {
|
|
73
|
+
const box = event.currentTarget.getBoundingClientRect();
|
|
74
|
+
return { x: event.clientX - box.left, y: event.clientY - box.top };
|
|
75
|
+
};
|
|
76
|
+
const [colors, setColors] = useState(null);
|
|
77
|
+
// Effect-only, so a render without a DOM never reads it. The pane's own
|
|
78
|
+
// `dark` scope fixes the tokens, so a theme flip changes nothing here.
|
|
79
|
+
useEffect(() => {
|
|
80
|
+
if (!pane.current || !supportsWebGL2())
|
|
81
|
+
return;
|
|
82
|
+
const back = resolveToken(pane.current, '--muted');
|
|
83
|
+
const ink = resolveToken(pane.current, '--muted-foreground');
|
|
84
|
+
// The ink sits part of the way to the surface: texture, not a picture
|
|
85
|
+
// that competes with the form.
|
|
86
|
+
if (!back || !ink)
|
|
87
|
+
return;
|
|
88
|
+
const resolved = { back: `rgb(${back.join(', ')})`, front: mix(back, ink, 0.4) };
|
|
89
|
+
// The pane is `display: none` below `lg`, but a mounted shader still
|
|
90
|
+
// loads and runs its frame loop: mount it only while the pane shows.
|
|
91
|
+
const wide = window.matchMedia(WIDE);
|
|
92
|
+
const sync = () => setColors(wide.matches ? resolved : null);
|
|
93
|
+
sync();
|
|
94
|
+
wide.addEventListener('change', sync);
|
|
95
|
+
return () => wide.removeEventListener('change', sync);
|
|
96
|
+
}, []);
|
|
97
|
+
return (_jsx("div", { "aria-hidden": true, className: cn('p-3 pl-0', className), children: _jsxs("div", { ref: pane, className: "dark bg-muted relative size-full touch-none overflow-hidden rounded-md select-none", onPointerDown: (event) => {
|
|
98
|
+
if (reduceMotion || event.button !== 0)
|
|
99
|
+
return;
|
|
100
|
+
event.currentTarget.setPointerCapture(event.pointerId);
|
|
101
|
+
drag.current = point(event);
|
|
102
|
+
ring(drag.current.x, drag.current.y);
|
|
103
|
+
}, onPointerMove: (event) => {
|
|
104
|
+
if (!drag.current)
|
|
105
|
+
return;
|
|
106
|
+
const next = point(event);
|
|
107
|
+
if (Math.hypot(next.x - drag.current.x, next.y - drag.current.y) < RING_STEP)
|
|
108
|
+
return;
|
|
109
|
+
drag.current = next;
|
|
110
|
+
ring(next.x, next.y);
|
|
111
|
+
}, onPointerUp: () => {
|
|
112
|
+
drag.current = null;
|
|
113
|
+
}, onPointerCancel: () => {
|
|
114
|
+
drag.current = null;
|
|
115
|
+
}, children: [colors ? (_jsx(ShaderSafe, { children: _jsx(Dithering, { colorBack: colors.back, colorFront: colors.front, shape: "warp", type: "4x4", size: 2, scale: 0.6, speed: reduceMotion ? 0 : 0.15,
|
|
116
|
+
// The pane's clip does not reach a WebGL canvas: round it too.
|
|
117
|
+
className: "rounded-md", style: { position: 'absolute', inset: 0, width: '100%', height: '100%' } }) })) : null, _jsx("div", { ref: rings, className: "pointer-events-none absolute inset-0" })] }) }));
|
|
118
|
+
}
|
|
@@ -1,24 +1,28 @@
|
|
|
1
1
|
/** @internal Kortix apps only. No semver: it may change in any release. */
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
/** Tiny legal line pinned to the bottom of every auth surface. */
|
|
5
|
-
export declare function AuthLegalFooter(
|
|
6
|
-
variant?: AuthLegalFooterVariant;
|
|
7
|
-
}): import("react").JSX.Element;
|
|
2
|
+
import { AuthArt } from './auth-art.js';
|
|
3
|
+
export { AuthArt };
|
|
4
|
+
/** Tiny legal line pinned to the bottom of every auth surface: one sentence on every page. */
|
|
5
|
+
export declare function AuthLegalFooter(): import("react").JSX.Element;
|
|
8
6
|
/**
|
|
9
7
|
* The quiet page frame every auth surface shares: mark, centered column, legal
|
|
10
8
|
* footer. The frame has no sidebar and many of its screens have no in-page
|
|
11
9
|
* exit; the root layout's `DesktopBackButton` is their exit on the desktop
|
|
12
10
|
* shell. `backHref` tells that Back where this flow started.
|
|
13
11
|
*/
|
|
14
|
-
export declare function AuthFrame({ children, footerVariant, backHref, }: {
|
|
12
|
+
export declare function AuthFrame({ children, footerVariant, backHref, art, }: {
|
|
15
13
|
children: React.ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* The dither pane beside the form on wide screens. Auth and consent screens
|
|
16
|
+
* keep it; an in-app gate that only borrows this frame (a checkout, a
|
|
17
|
+
* deleted-project notice, an approval card) passes `false`.
|
|
18
|
+
*/
|
|
19
|
+
art?: boolean;
|
|
16
20
|
/**
|
|
17
21
|
* `none` drops the legal line. Reserve it for frames whose resolved screen is
|
|
18
22
|
* not an auth surface — on a real auth flow the footer stays pinned so the
|
|
19
23
|
* page does not jump when the column above it swaps.
|
|
20
24
|
*/
|
|
21
|
-
footerVariant?:
|
|
25
|
+
footerVariant?: 'default' | 'none';
|
|
22
26
|
/**
|
|
23
27
|
* Where Back goes, when the page knows where its flow started. Without it,
|
|
24
28
|
* Back returns to the previous in-app page, else the app home.
|
|
@@ -27,8 +31,8 @@ export declare function AuthFrame({ children, footerVariant, backHref, }: {
|
|
|
27
31
|
}): import("react").JSX.Element;
|
|
28
32
|
export declare function AuthCardShell({ title, description, children, footer, }: {
|
|
29
33
|
title: string;
|
|
30
|
-
description:
|
|
31
|
-
children
|
|
34
|
+
description: React.ReactNode;
|
|
35
|
+
children?: React.ReactNode;
|
|
32
36
|
/** Optional footer below the content (e.g. a "Back to sign in" link). */
|
|
33
37
|
footer?: React.ReactNode;
|
|
34
38
|
}): import("react").JSX.Element;
|
|
@@ -9,36 +9,29 @@ import { useTranslations } from '../../i18n/index.js';
|
|
|
9
9
|
* footer pinned to the bottom.
|
|
10
10
|
*/
|
|
11
11
|
import { CaretLeftIcon as ChevronLeft } from '@phosphor-icons/react';
|
|
12
|
-
import { m, useReducedMotion } from 'motion/react';
|
|
13
12
|
import { UiLink as Link } from '../../providers/ui-provider.js';
|
|
14
13
|
import { useDesktopBackTarget } from '../desktop/desktop-back-button.js';
|
|
15
|
-
import {
|
|
16
|
-
import { AuthMobileLogo } from './auth-primitives.js';
|
|
14
|
+
import { AuthArt } from './auth-art.js';
|
|
15
|
+
import { AuthMobileLogo, Rise, StepHeader } from './auth-primitives.js';
|
|
17
16
|
import { openExternalRoute } from '../lib/desktop.js';
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
// The phone-verification page builds its own frame around a sign-out control.
|
|
18
|
+
export { AuthArt };
|
|
19
|
+
/** Tiny legal line pinned to the bottom of every auth surface: one sentence on every page. */
|
|
20
|
+
export function AuthLegalFooter() {
|
|
21
21
|
const t = useTranslations('auth');
|
|
22
22
|
const onLegalClick = (event, href) => {
|
|
23
23
|
if (openExternalRoute(href))
|
|
24
24
|
event.preventDefault();
|
|
25
25
|
};
|
|
26
|
-
const terms = (_jsx(Link, { href: "/legal/terms", onClick: (event) => onLegalClick(event, '/legal/terms'), className: "hover:text-foreground transition-colors", children: t('termsOfService') }));
|
|
27
|
-
const privacy = (_jsx(Link, { href: "/legal?tab=privacy", onClick: (event) => onLegalClick(event, '/legal?tab=privacy'), className: "hover:text-foreground transition-colors", children: t('privacyPolicy') }));
|
|
28
|
-
return (
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
:
|
|
34
|
-
|
|
35
|
-
termsOfService: () => terms,
|
|
36
|
-
privacyPolicy: () => privacy,
|
|
37
|
-
})
|
|
38
|
-
: t.rich('unified.legal.default', {
|
|
39
|
-
termsOfService: () => terms,
|
|
40
|
-
privacyPolicy: () => privacy,
|
|
41
|
-
}) }));
|
|
26
|
+
const terms = (_jsx(Link, { href: "/legal/terms", onClick: (event) => onLegalClick(event, '/legal/terms'), className: "hover:text-foreground decoration-border whitespace-nowrap underline underline-offset-2 transition-colors", children: t('termsOfService') }));
|
|
27
|
+
const privacy = (_jsx(Link, { href: "/legal?tab=privacy", onClick: (event) => onLegalClick(event, '/legal?tab=privacy'), className: "hover:text-foreground decoration-border whitespace-nowrap underline underline-offset-2 transition-colors", children: t('privacyPolicy') }));
|
|
28
|
+
return (
|
|
29
|
+
// The same 380px column as the form, so the legal line shares its left
|
|
30
|
+
// edge. A link never breaks inside its name.
|
|
31
|
+
_jsx("footer", { className: "text-muted-foreground mx-auto w-full max-w-[380px] pb-8 text-xs text-balance", children: t.rich('byContinuingYouAgree', {
|
|
32
|
+
termsOfService: () => terms,
|
|
33
|
+
privacyPolicy: () => privacy,
|
|
34
|
+
}) }));
|
|
42
35
|
}
|
|
43
36
|
/**
|
|
44
37
|
* The quiet page frame every auth surface shares: mark, centered column, legal
|
|
@@ -46,18 +39,14 @@ export function AuthLegalFooter({ variant = 'default' }) {
|
|
|
46
39
|
* exit; the root layout's `DesktopBackButton` is their exit on the desktop
|
|
47
40
|
* shell. `backHref` tells that Back where this flow started.
|
|
48
41
|
*/
|
|
49
|
-
export function AuthFrame({ children, footerVariant = 'default', backHref,
|
|
42
|
+
export function AuthFrame({ children, footerVariant = 'default', backHref,
|
|
43
|
+
// Off for now: the pane comes back by passing `art`.
|
|
44
|
+
art = false, }) {
|
|
50
45
|
useDesktopBackTarget(backHref);
|
|
51
|
-
return (_jsxs("div", { className: "bg-background relative flex min-h-svh flex-col", children: [_jsx(AuthMobileLogo, {}), _jsx("main", { className: "flex flex-1 flex-col items-center justify-center
|
|
46
|
+
return (_jsxs("div", { className: "bg-background flex min-h-svh", children: [_jsxs("div", { className: "relative flex min-h-svh flex-1 flex-col px-6", children: [_jsx(AuthMobileLogo, {}), _jsx("main", { className: "flex flex-1 flex-col items-center justify-center py-24", children: _jsx("div", { className: "w-full max-w-[380px]", children: children }) }), footerVariant === 'none' ? null : _jsx(AuthLegalFooter, {})] }), art ? _jsx(AuthArt, { className: "sticky top-0 hidden h-svh w-1/2 shrink-0 lg:block" }) : null] }));
|
|
52
47
|
}
|
|
53
48
|
export function AuthCardShell({ title, description, children, footer, }) {
|
|
54
|
-
|
|
55
|
-
const rise = (delay = 0) => ({
|
|
56
|
-
initial: { opacity: 0, y: prefersReducedMotion ? 0 : 8 },
|
|
57
|
-
animate: { opacity: 1, y: 0 },
|
|
58
|
-
transition: { duration: 0.3, delay, ease: EASE },
|
|
59
|
-
});
|
|
60
|
-
return (_jsxs(AuthFrame, { children: [_jsx(m.div, { ...rise(0), children: _jsxs("div", { className: "mb-10", children: [_jsx(KortixLogo, { variant: "icon", size: 22, className: "text-foreground hidden md:block" }), _jsx("h1", { className: "text-foreground text-2xl font-medium tracking-tight text-balance md:mt-6", children: title }), _jsx("p", { className: "text-muted-foreground mt-2 text-sm text-pretty", children: description })] }) }), _jsxs(m.div, { ...rise(0.06), children: [children, footer ? _jsx("div", { className: "mt-8", children: footer }) : null] })] }));
|
|
49
|
+
return (_jsxs(AuthFrame, { children: [_jsx(Rise, { children: _jsx(StepHeader, { title: title, description: description }) }), _jsxs(Rise, { delay: 0.06, children: [children, footer ? _jsx("div", { className: "mt-6", children: footer }) : null] })] }));
|
|
61
50
|
}
|
|
62
51
|
/** Consistent "Back to sign in" link used across the auth sub-flows. */
|
|
63
52
|
export function BackToSignIn() {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/** @internal Kortix apps only. No semver: it may change in any release. */
|
|
2
2
|
/** Session checks and initial fetches — the frame with a quiet spinner. */
|
|
3
|
-
export declare function AuthPendingScreen({ footer, }: {
|
|
3
|
+
export declare function AuthPendingScreen({ footer, art, }: {
|
|
4
|
+
/** `false` on an in-app gate whose resolved screen has no art pane. */
|
|
5
|
+
art?: boolean;
|
|
4
6
|
/**
|
|
5
7
|
* Pass `false` when the screen this resolves into carries no legal line, so
|
|
6
8
|
* the footer does not flash for the length of one fetch and then disappear.
|
|
@@ -15,8 +15,8 @@ import { useTranslations } from '../../i18n/index.js';
|
|
|
15
15
|
import { cn } from '../lib/utils.js';
|
|
16
16
|
import { CheckCircleIcon, MinusCircleIcon, XCircleIcon } from '@phosphor-icons/react';
|
|
17
17
|
/** Session checks and initial fetches — the frame with a quiet spinner. */
|
|
18
|
-
export function AuthPendingScreen({ footer = true, }) {
|
|
19
|
-
return (_jsx(AuthFrame, { footerVariant: footer ? 'default' : 'none', children: _jsx("div", { className: "flex justify-center", children: _jsx(Loading, { className: "text-muted-foreground size-5" }) }) }));
|
|
18
|
+
export function AuthPendingScreen({ footer = true, art = true, }) {
|
|
19
|
+
return (_jsx(AuthFrame, { footerVariant: footer ? 'default' : 'none', art: art, children: _jsx("div", { className: "flex justify-center", children: _jsx(Loading, { className: "text-muted-foreground size-5" }) }) }));
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
22
|
* Terminal states (connected, denied, expired, missing link). Tone lives in
|
|
@@ -37,6 +37,29 @@ export declare function StepHeader({ title, description, mark, markOnMobile, }:
|
|
|
37
37
|
markOnMobile?: boolean;
|
|
38
38
|
description?: React.ReactNode;
|
|
39
39
|
}): import("react").JSX.Element;
|
|
40
|
+
/** "or" between a provider button and the email form. */
|
|
41
|
+
export declare function OrDivider({ label }: {
|
|
42
|
+
label: string;
|
|
43
|
+
}): import("react").JSX.Element;
|
|
44
|
+
export type QuietLink = {
|
|
45
|
+
key: string;
|
|
46
|
+
label: React.ReactNode;
|
|
47
|
+
/** Without it the entry is plain text in the row (a countdown). */
|
|
48
|
+
onClick?: () => void;
|
|
49
|
+
disabled?: boolean;
|
|
50
|
+
/** Muted text after the button, outside its accessible name (a countdown). */
|
|
51
|
+
hint?: React.ReactNode;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* The secondary choices under a step's main action, on one muted row joined by
|
|
55
|
+
* middots ("Use a password · Use SSO"). Falsy entries drop out; an empty row
|
|
56
|
+
* renders nothing.
|
|
57
|
+
*/
|
|
58
|
+
export declare function QuietLinks({ links, disabled, className, }: {
|
|
59
|
+
links: Array<QuietLink | null | false | undefined>;
|
|
60
|
+
disabled?: boolean;
|
|
61
|
+
className?: string;
|
|
62
|
+
}): import("react").JSX.Element | null;
|
|
40
63
|
export declare function FieldLabel({ htmlFor, children }: {
|
|
41
64
|
htmlFor: string;
|
|
42
65
|
children: React.ReactNode;
|
|
@@ -82,9 +105,11 @@ export declare function ApproveDenyActions({ approveLabel, denyLabel, onApprove,
|
|
|
82
105
|
denyError?: string | null;
|
|
83
106
|
approveDisabled?: boolean;
|
|
84
107
|
}): import("react").JSX.Element;
|
|
85
|
-
export declare function CodeInput({ value, onChange, disabled, autoFocus, invalid, }: {
|
|
108
|
+
export declare function CodeInput({ value, onChange, disabled, autoFocus, invalid, onComplete, }: {
|
|
86
109
|
value: string;
|
|
87
110
|
onChange: (next: string) => void;
|
|
111
|
+
/** Called with the code the moment the last box fills: typed or pasted. */
|
|
112
|
+
onComplete?: (code: string) => void;
|
|
88
113
|
disabled?: boolean;
|
|
89
114
|
autoFocus?: boolean;
|
|
90
115
|
/** Marks the boxes destructive and replays the shake (row-level, once). */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
/**
|
|
4
4
|
* Shared building blocks for the quiet, flat auth dialect: Kortix mark above a
|
|
5
5
|
* left-aligned heading, slim notice strips, six-box code input, and the
|
|
@@ -7,7 +7,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
7
7
|
*/
|
|
8
8
|
import { WarningIcon as DangerTriangleSolid, InfoIcon as InfoCircleSolid, } from '@phosphor-icons/react';
|
|
9
9
|
import { m, useReducedMotion } from 'motion/react';
|
|
10
|
-
import { useRef } from 'react';
|
|
10
|
+
import { useEffect, useRef } from 'react';
|
|
11
11
|
import { inputFocusClasses, inputSurfaceClasses } from '../../primitives/input.js';
|
|
12
12
|
import { KortixLogo } from '../../primitives/kortix-logo.js';
|
|
13
13
|
import { Button } from '../../primitives/button.js';
|
|
@@ -44,10 +44,28 @@ export function AuthMobileLogo() {
|
|
|
44
44
|
return (_jsx("div", { className: "kx-auth-mobile-logo absolute top-6 left-6 z-10 md:hidden", children: _jsx(Link, { href: "/", "aria-label": tHardcodedUi.raw('i18nComplete.text7ecec93ed268'), className: "hit-area-3 inline-flex", children: _jsx(KortixLogo, { variant: "icon", size: 22, className: "text-foreground" }) }) }));
|
|
45
45
|
}
|
|
46
46
|
export function StepHeader({ title, description, mark, markOnMobile = false, }) {
|
|
47
|
-
return (_jsxs("div", { className: "mb-
|
|
47
|
+
return (_jsxs("div", { className: "mb-8", children: [mark ? (_jsx("div", { className: markOnMobile ? undefined : 'hidden md:block', children: mark })) : (_jsx(KortixLogo, { variant: "icon", size: 22, className: "text-foreground hidden md:block" })), _jsx("h1", { className: cn('text-foreground text-2xl font-semibold tracking-tight text-balance md:mt-6', mark && markOnMobile && 'mt-6'), children: title }), description ? (_jsx("p", { className: "text-muted-foreground mt-2 text-sm text-pretty", children: description })) : null] }));
|
|
48
|
+
}
|
|
49
|
+
/** "or" between a provider button and the email form. */
|
|
50
|
+
export function OrDivider({ label }) {
|
|
51
|
+
return (_jsxs("div", { className: "text-muted-foreground my-6 flex items-center gap-3 text-xs", children: [_jsx("span", { className: "bg-border h-px flex-1" }), label, _jsx("span", { className: "bg-border h-px flex-1" })] }));
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* The secondary choices under a step's main action, on one muted row joined by
|
|
55
|
+
* middots ("Use a password · Use SSO"). Falsy entries drop out; an empty row
|
|
56
|
+
* renders nothing.
|
|
57
|
+
*/
|
|
58
|
+
export function QuietLinks({ links, disabled = false, className, }) {
|
|
59
|
+
const shown = links.filter(Boolean);
|
|
60
|
+
if (shown.length === 0)
|
|
61
|
+
return null;
|
|
62
|
+
// Every entry leads with its middot, and the row is pulled left by one
|
|
63
|
+
// middot's width and clipped: an entry that wraps to a new line starts
|
|
64
|
+
// clean, with no dot in front of it.
|
|
65
|
+
return (_jsx("div", { className: cn('text-muted-foreground mt-5 overflow-x-clip text-sm', className), children: _jsx("p", { className: "-ml-4 flex flex-wrap items-center gap-x-2", children: shown.map((link) => (_jsxs("span", { className: "flex items-center gap-x-2 whitespace-nowrap", children: [_jsx("span", { "aria-hidden": true, className: "w-2 text-center select-none", children: "\u00B7" }), link.onClick ? (_jsx("button", { type: "button", onClick: link.onClick, disabled: disabled || link.disabled, className: "hover:text-foreground -my-2 py-2 transition-colors disabled:opacity-50", children: link.label })) : (_jsx("span", { className: "tabular-nums", children: link.label })), link.hint ? (_jsxs(_Fragment, { children: [_jsx("span", { "aria-hidden": true, className: "select-none", children: "\u00B7" }), _jsx("span", { className: "tabular-nums", children: link.hint })] })) : null] }, link.key))) }) }));
|
|
48
66
|
}
|
|
49
67
|
export function FieldLabel({ htmlFor, children }) {
|
|
50
|
-
return (_jsx("label", { htmlFor: htmlFor, className: "text-
|
|
68
|
+
return (_jsx("label", { htmlFor: htmlFor, className: "text-foreground text-sm font-medium", children: children }));
|
|
51
69
|
}
|
|
52
70
|
/** Inline field error: small red text under the input it describes, left-aligned. */
|
|
53
71
|
export function FieldError({ id, message }) {
|
|
@@ -82,16 +100,27 @@ export function ApproveDenyActions({ approveLabel, denyLabel, onApprove, onDeny,
|
|
|
82
100
|
return (_jsxs("div", { className: "space-y-3", children: [approveError ? _jsx(ErrorStrip, { message: approveError }) : null, denyError ? _jsx(ErrorStrip, { message: denyError }) : null, _jsxs(Button, { size: "lg", className: "w-full", onClick: onApprove, disabled: busy || approveDisabled, children: [approvePending ? _jsx(Loading, { className: "size-4 shrink-0" }) : null, approveLabel] }), _jsxs(Button, { variant: "outline", size: "lg", className: "text-destructive border-destructive/30 hover:bg-destructive/5 hover:text-destructive focus-visible:ring-destructive/35 w-full", onClick: onDeny, disabled: busy, children: [denyPending ? _jsx(Loading, { className: "text-destructive! size-4 shrink-0" }) : null, denyLabel] })] }));
|
|
83
101
|
}
|
|
84
102
|
/* ─── Six-box code input ───────────────────────────────────────────────── */
|
|
85
|
-
export function CodeInput({ value, onChange, disabled, autoFocus = true, invalid = false, }) {
|
|
103
|
+
export function CodeInput({ value, onChange, disabled, autoFocus = true, invalid = false, onComplete, }) {
|
|
86
104
|
const refs = useRef([]);
|
|
105
|
+
// A rejected code comes back empty: put the caret in the first box again
|
|
106
|
+
// once the boxes are enabled.
|
|
107
|
+
useEffect(() => {
|
|
108
|
+
if (invalid && !disabled && value === '')
|
|
109
|
+
refs.current[0]?.focus();
|
|
110
|
+
}, [invalid, disabled, value]);
|
|
87
111
|
const focusBox = (i) => refs.current[Math.max(0, Math.min(CODE_LENGTH - 1, i))]?.focus();
|
|
88
|
-
|
|
112
|
+
// `retry`: a paste of the full code verifies again even when it is the code
|
|
113
|
+
// already in the boxes, the only retry after a failed check without a button.
|
|
114
|
+
const applyEdit = (edit, retry = false) => {
|
|
89
115
|
if (!edit)
|
|
90
116
|
return;
|
|
91
117
|
onChange(edit.next);
|
|
92
118
|
focusBox(edit.focus);
|
|
119
|
+
if (onComplete && (retry || edit.next !== value) && /^\d+$/.test(edit.next) && edit.next.length === CODE_LENGTH) {
|
|
120
|
+
onComplete(edit.next);
|
|
121
|
+
}
|
|
93
122
|
};
|
|
94
|
-
return (_jsx("div", { className: cn('flex gap-2
|
|
123
|
+
return (_jsx("div", { className: cn('flex justify-between gap-2', invalid && 'motion-safe:animate-shake'), children: Array.from({ length: CODE_LENGTH }, (_, i) => (_jsx("input", { ref: (el) => {
|
|
95
124
|
refs.current[i] = el;
|
|
96
125
|
}, type: "text", inputMode: "numeric", autoComplete: i === 0 ? 'one-time-code' : 'off', "aria-label": `Digit ${i + 1}`, value: value[i] ?? '', disabled: disabled, autoFocus: autoFocus && i === 0, onChange: (e) => {
|
|
97
126
|
applyEdit(applyBoxInput(value, i, e.target.value));
|
|
@@ -110,6 +139,6 @@ export function CodeInput({ value, onChange, disabled, autoFocus = true, invalid
|
|
|
110
139
|
e.preventDefault();
|
|
111
140
|
const digits = e.clipboardData.getData('text').replace(/\D/g, '');
|
|
112
141
|
if (digits)
|
|
113
|
-
applyEdit(insertDigits(value, i, digits));
|
|
142
|
+
applyEdit(insertDigits(value, i, digits), true);
|
|
114
143
|
}, onFocus: (e) => e.currentTarget.select(), "aria-invalid": invalid || undefined, className: cn(inputSurfaceClasses, inputFocusClasses, 'text-foreground aria-invalid:border-destructive size-12 text-center text-lg font-medium tabular-nums transition-[border-color,box-shadow] duration-(--duration-fast) disabled:opacity-50') }, i))) }));
|
|
115
144
|
}
|
|
@@ -28,7 +28,8 @@ export declare const NATIVE_MARK: Record<NativeConnectorApp, {
|
|
|
28
28
|
* (`connector-logo-source.ts` holds the rule).
|
|
29
29
|
*
|
|
30
30
|
* Kortix-built connectors and connectors with no logo draw a mark on the
|
|
31
|
-
* banner tile. A catalogue logo is the bare image
|
|
31
|
+
* banner tile. A catalogue logo is the bare image in the light theme: its own
|
|
32
|
+
* shape is the edge. In the dark theme it sits on a light tile (`DARK_LOGO_TILE`).
|
|
32
33
|
* A URL that fails to load latches per URL (a swapped URL gets a fresh try)
|
|
33
34
|
* and shows the neutral fallback, so "missing" and "broken" look identical.
|
|
34
35
|
*/
|
|
@@ -16,6 +16,14 @@ const TILE = {
|
|
|
16
16
|
xl: 'size-14 rounded-xl',
|
|
17
17
|
};
|
|
18
18
|
const MARK = { xs: 'size-3', sm: 'size-3.5', md: 'size-4', lg: 'size-5', xl: 'size-7' };
|
|
19
|
+
/**
|
|
20
|
+
* Dark theme only: a catalogue logo sits on an always-light tile (the same
|
|
21
|
+
* rule as `LOGO_TILE_BACKGROUND`), so a near-black transparent mark (GitHub,
|
|
22
|
+
* Brandfetch) keeps its contrast. The inset lives inside the tile, so a
|
|
23
|
+
* full-bleed square logo fills it edge to edge with no second frame.
|
|
24
|
+
*/
|
|
25
|
+
const DARK_LOGO_TILE = 'dark:bg-white';
|
|
26
|
+
const DARK_LOGO_INSET = { xs: 'dark:p-px', sm: 'dark:p-0.5', md: 'dark:p-0.5', lg: 'dark:p-1', xl: 'dark:p-1.5' };
|
|
19
27
|
/**
|
|
20
28
|
* The marks of the Kortix-built connectors, as their channel banners draw
|
|
21
29
|
* them; brand marks keep their colours. `apps/web/public/connector-icons/<app>.svg`
|
|
@@ -40,7 +48,8 @@ function MarkTile({ size, className, children, }) {
|
|
|
40
48
|
* (`connector-logo-source.ts` holds the rule).
|
|
41
49
|
*
|
|
42
50
|
* Kortix-built connectors and connectors with no logo draw a mark on the
|
|
43
|
-
* banner tile. A catalogue logo is the bare image
|
|
51
|
+
* banner tile. A catalogue logo is the bare image in the light theme: its own
|
|
52
|
+
* shape is the edge. In the dark theme it sits on a light tile (`DARK_LOGO_TILE`).
|
|
44
53
|
* A URL that fails to load latches per URL (a swapped URL gets a fresh try)
|
|
45
54
|
* and shows the neutral fallback, so "missing" and "broken" look identical.
|
|
46
55
|
*/
|
|
@@ -54,5 +63,5 @@ export function ConnectorLogo({ source, size = 'lg', className, }) {
|
|
|
54
63
|
if (logo.kind === 'none' || failedUrl === logo.src) {
|
|
55
64
|
return (_jsx(MarkTile, { size: size, className: className, children: _jsx(PlugIcon, { className: cn('text-muted-foreground shrink-0', MARK[size]) }) }));
|
|
56
65
|
}
|
|
57
|
-
return (_jsx("span", { "aria-hidden": true, className: cn('flex shrink-0 items-center justify-center overflow-hidden', TILE[size], className), children: _jsx("img", { src: logo.src, alt: "", loading: "lazy", decoding: "async", referrerPolicy: "no-referrer", draggable: false, className: cn('size-full object-contain select-none', TILE[size]), onError: () => setFailedUrl(logo.src) }) }));
|
|
66
|
+
return (_jsx("span", { "aria-hidden": true, className: cn('flex shrink-0 items-center justify-center overflow-hidden', TILE[size], DARK_LOGO_TILE, className), children: _jsx("img", { src: logo.src, alt: "", loading: "lazy", decoding: "async", referrerPolicy: "no-referrer", draggable: false, className: cn('size-full object-contain select-none', TILE[size], DARK_LOGO_INSET[size]), onError: () => setFailedUrl(logo.src) }) }));
|
|
58
67
|
}
|
|
@@ -9,10 +9,26 @@ export declare const MISSING_FILE_SUPPRESS_MS: number;
|
|
|
9
9
|
export declare function setMissingFileClockForTests(now: () => number): void;
|
|
10
10
|
/** Clears the registry between tests; production never calls it. */
|
|
11
11
|
export declare function clearMissingFileReadsForTests(): void;
|
|
12
|
-
/**
|
|
13
|
-
export declare function
|
|
12
|
+
/** The write epoch a reader captures before it reads. */
|
|
13
|
+
export declare function missingFileReadEpoch(): number;
|
|
14
|
+
/**
|
|
15
|
+
* Remember the miss when the read failed as missing; other failures pass
|
|
16
|
+
* through. `startedAt` is `missingFileReadEpoch()` from before the read: a
|
|
17
|
+
* write since then makes the miss stale, so it is not remembered.
|
|
18
|
+
*/
|
|
19
|
+
export declare function noteMissingFileRead(serverUrl: string | null | undefined, filePath: string | null | undefined, error: unknown, startedAt?: number): void;
|
|
14
20
|
/** Forget the mark after a read found the file. */
|
|
15
21
|
export declare function clearMissingFileRead(serverUrl: string | null | undefined, filePath: string | null | undefined): void;
|
|
22
|
+
/**
|
|
23
|
+
* Forget every mark at `path` and under it, on one server.
|
|
24
|
+
*
|
|
25
|
+
* A write brings paths into existence: New file, an upload, a copy, the
|
|
26
|
+
* target of a rename or move, a new folder. A miss noted before the write is
|
|
27
|
+
* stale, and keeping it made the gate answer the write's own invalidation
|
|
28
|
+
* with "File not found" for the whole window (D-08). The user's Refresh calls
|
|
29
|
+
* this for its one file, so Refresh always reads (P-F08).
|
|
30
|
+
*/
|
|
31
|
+
export declare function clearMissingFileReadsUnder(serverUrl: string | null | undefined, path: string | null | undefined): void;
|
|
16
32
|
/** True while the file's read miss is fresh enough that a refetch may not touch it. */
|
|
17
33
|
export declare function missingFileSuppressed(serverUrl: string | null | undefined, filePath: string | null | undefined): boolean;
|
|
18
34
|
/** The fast-fail a suppressed refetch throws in the reader's place. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApiError, isRuntimeStartingError } from '@kortix/sdk';
|
|
1
|
+
import { ApiError, isRuntimeStartingError, toDaemonPath } from '@kortix/sdk';
|
|
2
2
|
export const UPLOADED_FILE_READ_RETRY_DELAY_MS = 2_000;
|
|
3
3
|
export const UPLOADED_FILE_READ_RETRY_WINDOW_MS = 60_000;
|
|
4
4
|
export const UPLOADED_FILE_READ_MAX_RETRIES = Math.ceil(UPLOADED_FILE_READ_RETRY_WINDOW_MS / UPLOADED_FILE_READ_RETRY_DELAY_MS);
|
|
@@ -84,11 +84,28 @@ const missingFiles = new Map();
|
|
|
84
84
|
export function clearMissingFileReadsForTests() {
|
|
85
85
|
missingFiles.clear();
|
|
86
86
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
// Keyed by the daemon path, so `notes/a.md`, `/workspace/notes/a.md` and
|
|
88
|
+
// `/notes/a.md` share one mark: a viewer, a card and a write name one file
|
|
89
|
+
// with different spellings.
|
|
90
|
+
const missingFileKey = (serverUrl, filePath) => `${serverUrl ?? ''}|${toDaemonPath(filePath)}`;
|
|
91
|
+
// Bumped by every write (`clearMissingFileReadsUnder`). A read captures it when
|
|
92
|
+
// it starts: a 404 from a read that began BEFORE a write is stale and must not
|
|
93
|
+
// re-mark the path the write just created (the read raced the create).
|
|
94
|
+
let writeEpoch = 0;
|
|
95
|
+
/** The write epoch a reader captures before it reads. */
|
|
96
|
+
export function missingFileReadEpoch() {
|
|
97
|
+
return writeEpoch;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Remember the miss when the read failed as missing; other failures pass
|
|
101
|
+
* through. `startedAt` is `missingFileReadEpoch()` from before the read: a
|
|
102
|
+
* write since then makes the miss stale, so it is not remembered.
|
|
103
|
+
*/
|
|
104
|
+
export function noteMissingFileRead(serverUrl, filePath, error, startedAt) {
|
|
90
105
|
if (!filePath || !isMissingFileReadFailure(error))
|
|
91
106
|
return;
|
|
107
|
+
if (startedAt !== undefined && startedAt !== writeEpoch)
|
|
108
|
+
return;
|
|
92
109
|
missingFiles.set(missingFileKey(serverUrl, filePath), missingFileNow());
|
|
93
110
|
}
|
|
94
111
|
/** Forget the mark after a read found the file. */
|
|
@@ -97,6 +114,27 @@ export function clearMissingFileRead(serverUrl, filePath) {
|
|
|
97
114
|
return;
|
|
98
115
|
missingFiles.delete(missingFileKey(serverUrl, filePath));
|
|
99
116
|
}
|
|
117
|
+
/**
|
|
118
|
+
* Forget every mark at `path` and under it, on one server.
|
|
119
|
+
*
|
|
120
|
+
* A write brings paths into existence: New file, an upload, a copy, the
|
|
121
|
+
* target of a rename or move, a new folder. A miss noted before the write is
|
|
122
|
+
* stale, and keeping it made the gate answer the write's own invalidation
|
|
123
|
+
* with "File not found" for the whole window (D-08). The user's Refresh calls
|
|
124
|
+
* this for its one file, so Refresh always reads (P-F08).
|
|
125
|
+
*/
|
|
126
|
+
export function clearMissingFileReadsUnder(serverUrl, path) {
|
|
127
|
+
if (path == null)
|
|
128
|
+
return;
|
|
129
|
+
writeEpoch += 1;
|
|
130
|
+
const exact = missingFileKey(serverUrl, path);
|
|
131
|
+
// The workspace root ("" as a daemon path) holds every workspace file.
|
|
132
|
+
const prefix = exact.endsWith('|') ? exact : `${exact}/`;
|
|
133
|
+
for (const key of missingFiles.keys()) {
|
|
134
|
+
if (key === exact || key.startsWith(prefix))
|
|
135
|
+
missingFiles.delete(key);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
100
138
|
/** True while the file's read miss is fresh enough that a refetch may not touch it. */
|
|
101
139
|
export function missingFileSuppressed(serverUrl, filePath) {
|
|
102
140
|
if (!filePath)
|