@kortix/ui 0.15.11 → 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 +478 -179
- package/dist/_vendor/shared/my-kortix-agent.d.ts +5 -3
- 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-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 +6 -28
- package/dist/customize/agents/agent-tabs.d.ts +1 -0
- package/dist/customize/agents/agent-tabs.js +1 -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/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 +1 -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/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 +21 -2
- package/dist/customize/triggers/schedule/post-to-field.js +2 -2
- package/dist/customize/triggers/schedule-view.js +2 -1
- 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 +495 -46
- package/dist/i18n/en.js +536 -87
- 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/lib/browser-noise/rules/webview.js +16 -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/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/agents/agent-model.d.ts +1 -0
- package/dist/session/agents/agent-model.js +2 -1
- package/dist/session/agents/agent-strip.js +10 -4
- 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 +3 -0
- package/dist/session/composer/agent-selector.js +6 -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.js +7 -2
- package/dist/session/composer/composer.d.ts +2 -2
- package/dist/session/composer/composer.js +7 -6
- 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.js +24 -6
- package/dist/session/media/sandbox-url-detector.js +1 -1
- 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/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/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 +18 -3
- 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 +1 -2
- package/dist/session/thread/transcript.js +26 -24
- package/dist/session/thread/typing-indicator.d.ts +2 -2
- package/dist/session/thread/typing-indicator.js +10 -3
- 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/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 +495 -46
- package/dist/workspace/admin/project-admin-dashboard.js +21 -7
- 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/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/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/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-timeline.js +2 -2
- package/package.json +67 -10
- package/skills/kortix-ui/SKILL.md +2 -2
- package/skills/kortix-ui/references/modules.md +5 -3
- 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
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { INLINE_CODE } from './inline-chip.js';
|
|
3
|
+
/**
|
|
4
|
+
* Splits a one-line string on backtick code spans: 'a `b` c' →
|
|
5
|
+
* text 'a ', code 'b', text ' c'. An unmatched backtick stays as text.
|
|
6
|
+
* A double-backtick span (`` a`b ``) is read the way CommonMark reads it.
|
|
7
|
+
*/
|
|
8
|
+
export function splitInlineCode(input) {
|
|
9
|
+
const segments = [];
|
|
10
|
+
// A run opens only at its first backtick and closes only on a run of the same length.
|
|
11
|
+
const pattern = /(?<!`)(`+)(?!`)([\s\S]*?[^`])\1(?!`)/g;
|
|
12
|
+
let last = 0;
|
|
13
|
+
for (const match of input.matchAll(pattern)) {
|
|
14
|
+
const start = match.index ?? 0;
|
|
15
|
+
if (start > last)
|
|
16
|
+
segments.push({ kind: 'text', value: input.slice(last, start) });
|
|
17
|
+
const raw = match[2];
|
|
18
|
+
const body = raw.length > 2 && raw.startsWith(' ') && raw.endsWith(' ') ? raw.slice(1, -1) : raw;
|
|
19
|
+
segments.push({ kind: 'code', value: body });
|
|
20
|
+
last = start + match[0].length;
|
|
21
|
+
}
|
|
22
|
+
if (last < input.length)
|
|
23
|
+
segments.push({ kind: 'text', value: input.slice(last) });
|
|
24
|
+
return segments;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* A markdown string as the plain words it shows, for one-line text that
|
|
28
|
+
* cannot hold markup: a card's summary, an accessible description, a link
|
|
29
|
+
* name. Code spans lose their backticks, links and images keep their text,
|
|
30
|
+
* emphasis markers go, and line breaks collapse to single spaces.
|
|
31
|
+
* `memory_reflector`-style identifiers keep their underscores.
|
|
32
|
+
*/
|
|
33
|
+
export function plainTextFromMarkdown(input) {
|
|
34
|
+
return splitInlineCode(input)
|
|
35
|
+
.map((segment) => segment.kind === 'code'
|
|
36
|
+
? segment.value
|
|
37
|
+
: segment.value
|
|
38
|
+
.replace(/!?\[([^[\]]*)\]\([^()\s]*\)/g, '$1')
|
|
39
|
+
.replace(/(\*\*|__|~~)(?=\S)([\s\S]*?\S)\1/g, '$2')
|
|
40
|
+
.replace(/(^|[^\w*])\*(?=\S)([^*]*?\S)\*(?![\w*])/g, '$1$2')
|
|
41
|
+
.replace(/(^|[^\w])_(?=\S)([^_]*?\S)_(?!\w)/g, '$1$2'))
|
|
42
|
+
.join('')
|
|
43
|
+
.replace(/\s+/g, ' ')
|
|
44
|
+
.trim();
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The first sentence of `plainTextFromMarkdown(input)`, capped at `max`
|
|
48
|
+
* characters with an ellipsis: what a card's `aria-describedby` reads, so a
|
|
49
|
+
* Tab stop announces a summary instead of a whole SKILL.md description.
|
|
50
|
+
*/
|
|
51
|
+
export function shortSummary(input, max = 160) {
|
|
52
|
+
const text = plainTextFromMarkdown(input);
|
|
53
|
+
const sentence = /^.+?[.!?](?=\s|$)/.exec(text)?.[0] ?? text;
|
|
54
|
+
if (sentence.length <= max)
|
|
55
|
+
return sentence;
|
|
56
|
+
return `${sentence.slice(0, max - 1).trimEnd()}…`;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* A short string an agent wrote (a goal criterion, an agent description) with
|
|
60
|
+
* its `code spans` drawn as the chat's inline-code chip instead of literal
|
|
61
|
+
* backticks. Inline only: no block elements and no links, so it is safe inside
|
|
62
|
+
* a menu row or a `line-clamp` paragraph.
|
|
63
|
+
*/
|
|
64
|
+
export function InlineCodeText({ text }) {
|
|
65
|
+
return (_jsx(_Fragment, { children: splitInlineCode(text).map((segment, index) => segment.kind === 'code' ? (
|
|
66
|
+
// The chat's chip as is: 0.8rem sits level with the xs/sm text around it.
|
|
67
|
+
_jsx("code", { className: INLINE_CODE, children: segment.value }, index)) : (segment.value)) }));
|
|
68
|
+
}
|
|
@@ -127,12 +127,12 @@ export function ApprovalDecisionView({ loading, details, outcome, busyDecision,
|
|
|
127
127
|
if (loading) {
|
|
128
128
|
// The shape of the screen that is coming, so the panel and the two
|
|
129
129
|
// decisions do not jump in under a spinner.
|
|
130
|
-
return (_jsx(AuthFrame, { footerVariant: "none", children: _jsxs("div", { role: "status", "aria-label": tI18nComplete.raw('textdc380888c4e2'), children: [_jsxs("div", { className: "mb-
|
|
130
|
+
return (_jsx(AuthFrame, { footerVariant: "none", art: false, children: _jsxs("div", { role: "status", "aria-label": tI18nComplete.raw('textdc380888c4e2'), children: [_jsxs("div", { className: "mb-8", children: [_jsx(Skeleton, { className: "hidden h-10 w-28 py-0 md:block" }), _jsx(Skeleton, { className: "h-8 w-3/4 py-0 md:mt-6" }), _jsx(Skeleton, { className: "mt-3 h-4 w-full py-0" })] }), _jsxs("div", { className: "space-y-5", children: [_jsx(Skeleton, { className: "h-40 w-full py-0" }), _jsx(Skeleton, { className: "h-24 w-full py-0" }), _jsxs("div", { className: "flex gap-2", children: [_jsx(Skeleton, { className: "h-9 flex-1 py-0" }), _jsx(Skeleton, { className: "h-9 flex-1 py-0" })] })] })] }) }));
|
|
131
131
|
}
|
|
132
132
|
if (!details) {
|
|
133
|
-
return (_jsxs(AuthFrame, { footerVariant: "none", children: [_jsx(Rise, { children: _jsx(StepHeader, { title: _jsx(OutcomeTitle, { tone: "muted", children: tI18nComplete.raw('text4c05fac320dc') }), description: error ?? tI18nComplete.raw('text301fe0058472') }) }), _jsx(Rise, { delay: 0.06, children: _jsx(Button, { size: "lg", variant: "secondary", className: "w-full", asChild: true, children: _jsx(Link, { href: "/", children: tI18nComplete.raw('text5fae82827f98') }) }) })] }));
|
|
133
|
+
return (_jsxs(AuthFrame, { footerVariant: "none", art: false, children: [_jsx(Rise, { children: _jsx(StepHeader, { title: _jsx(OutcomeTitle, { tone: "muted", children: tI18nComplete.raw('text4c05fac320dc') }), description: error ?? tI18nComplete.raw('text301fe0058472') }) }), _jsx(Rise, { delay: 0.06, children: _jsx(Button, { size: "lg", variant: "secondary", className: "w-full", asChild: true, children: _jsx(Link, { href: "/", children: tI18nComplete.raw('text5fae82827f98') }) }) })] }));
|
|
134
134
|
}
|
|
135
|
-
return (_jsx(AuthFrame, { footerVariant: "none", children: _jsx("div", { className: "border-border overflow-hidden rounded-xl border", children: _jsx(ApprovalDecisionPanel, { details: details, outcome: outcome, busyDecision: busyDecision, error: error, onDecision: onDecision, onOpenSession: onOpenSession }) }) }));
|
|
135
|
+
return (_jsx(AuthFrame, { footerVariant: "none", art: false, children: _jsx("div", { className: "border-border overflow-hidden rounded-xl border", children: _jsx(ApprovalDecisionPanel, { details: details, outcome: outcome, busyDecision: busyDecision, error: error, onDecision: onDecision, onOpenSession: onOpenSession }) }) }));
|
|
136
136
|
}
|
|
137
137
|
/** Below this much time left, the expiry chip turns to the warning tone. */
|
|
138
138
|
const EXPIRY_WARN_MS = 6 * 60 * 60 * 1000;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The slice of an mdast node this transform reads. Declared here rather than
|
|
3
|
+
* imported from `@types/mdast`, which `apps/web` does not depend on.
|
|
4
|
+
*/
|
|
5
|
+
interface MdNode {
|
|
6
|
+
type: string;
|
|
7
|
+
value?: string;
|
|
8
|
+
children?: MdNode[];
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Turns every single newline inside prose text into a hard line break.
|
|
12
|
+
*
|
|
13
|
+
* CommonMark reads a single `\n` as a soft break and joins the lines with a
|
|
14
|
+
* space. Chat text does not follow that rule: a model that writes one item per
|
|
15
|
+
* line means one item per line. Only `text` nodes change, so code spans, fenced
|
|
16
|
+
* code, math and HTML keep their newlines as written.
|
|
17
|
+
*/
|
|
18
|
+
export declare function splitSoftBreaks(tree: MdNode): void;
|
|
19
|
+
/** `splitSoftBreaks` as a remark plugin. Used for chat messages, never documents. */
|
|
20
|
+
export declare function remarkSoftBreaks(): (tree: MdNode) => void;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Turns every single newline inside prose text into a hard line break.
|
|
3
|
+
*
|
|
4
|
+
* CommonMark reads a single `\n` as a soft break and joins the lines with a
|
|
5
|
+
* space. Chat text does not follow that rule: a model that writes one item per
|
|
6
|
+
* line means one item per line. Only `text` nodes change, so code spans, fenced
|
|
7
|
+
* code, math and HTML keep their newlines as written.
|
|
8
|
+
*/
|
|
9
|
+
export function splitSoftBreaks(tree) {
|
|
10
|
+
const children = tree.children;
|
|
11
|
+
if (!children)
|
|
12
|
+
return;
|
|
13
|
+
const next = [];
|
|
14
|
+
for (const child of children) {
|
|
15
|
+
if (child.type === 'text' && child.value?.includes('\n')) {
|
|
16
|
+
const lines = child.value.split(/\r?\n/);
|
|
17
|
+
lines.forEach((line, index) => {
|
|
18
|
+
if (index > 0)
|
|
19
|
+
next.push({ type: 'break' });
|
|
20
|
+
if (line)
|
|
21
|
+
next.push({ type: 'text', value: line });
|
|
22
|
+
});
|
|
23
|
+
continue;
|
|
24
|
+
}
|
|
25
|
+
splitSoftBreaks(child);
|
|
26
|
+
next.push(child);
|
|
27
|
+
}
|
|
28
|
+
tree.children = next;
|
|
29
|
+
}
|
|
30
|
+
/** `splitSoftBreaks` as a remark plugin. Used for chat messages, never documents. */
|
|
31
|
+
export function remarkSoftBreaks() {
|
|
32
|
+
return (tree) => splitSoftBreaks(tree);
|
|
33
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type MarkdownTrust, type MarkdownVariant } from './markdown-policy.js';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
export declare function MarkdownLink({ href, children
|
|
3
|
+
export declare function MarkdownLink({ href, children }: {
|
|
4
4
|
href?: string;
|
|
5
5
|
children?: React.ReactNode;
|
|
6
6
|
}): React.JSX.Element;
|
|
@@ -42,5 +42,13 @@ export interface UnifiedMarkdownProps {
|
|
|
42
42
|
* (the transcript and the share view); everywhere else such a fence is an ordinary code block.
|
|
43
43
|
*/
|
|
44
44
|
genui?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* `chat`: every single newline is a line break, as chat text is written
|
|
47
|
+
* (one item per line stays one per line). Only chat transcript text sets it
|
|
48
|
+
* (assistant replies, peer messages). The default, `commonmark`, joins
|
|
49
|
+
* wrapped lines, as a README or a scraped page expects. Ignored for
|
|
50
|
+
* `variant="document"`.
|
|
51
|
+
*/
|
|
52
|
+
lineBreaks?: 'commonmark' | 'chat';
|
|
45
53
|
}
|
|
46
54
|
export declare const UnifiedMarkdown: React.NamedExoticComponent<UnifiedMarkdownProps>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { appLink } from './app-links.js';
|
|
4
|
+
import { ArtifactLink, isArtifactLink } from './artifact-link.js';
|
|
4
5
|
import { Github } from '../internal/icons/github.js';
|
|
5
6
|
import { SlackLogoIcon } from '@phosphor-icons/react';
|
|
6
7
|
import { LinearMark, FigmaMark, NotionMark, GoogleDocsMark, GoogleSheetsMark, GoogleSlidesMark } from './app-link-icons.js';
|
|
@@ -16,6 +17,7 @@ import { markdownPolicy, } from './markdown-policy.js';
|
|
|
16
17
|
import { MarkdownOrderedList } from './ordered-list.js';
|
|
17
18
|
import { hasLinkReferenceDefinition, isInternalUrl, isStreamingLinkPlaceholder, prepareMarkdownSource, remoteImageHost, sameOriginAppPath, shouldUseNextLink, } from './unified-markdown-utils.js';
|
|
18
19
|
import { remarkSetupLinkBlocks } from './setup-link-blocks.js';
|
|
20
|
+
import { remarkSoftBreaks } from './soft-breaks.js';
|
|
19
21
|
import { rehypeStreamWords, STREAM_WORD_CLASS, StreamFadeGateContext, StreamWord, createStreamFadeGate, } from './stream-words.js';
|
|
20
22
|
import { SetupLinkButton, SetupLinkInlineContext } from './setup-links/setup-link-button.js';
|
|
21
23
|
import { parsePendingSetupLinkHref, parseSetupLinkHref } from './setup-links/util.js';
|
|
@@ -116,7 +118,14 @@ function bareLinkText(children) {
|
|
|
116
118
|
}
|
|
117
119
|
return text;
|
|
118
120
|
}
|
|
119
|
-
export function MarkdownLink({ href, children
|
|
121
|
+
export function MarkdownLink({ href, children }) {
|
|
122
|
+
const { variant } = useContext(MarkdownRenderContext);
|
|
123
|
+
if (variant !== 'document' && href && isArtifactLink(href)) {
|
|
124
|
+
return _jsx(ArtifactLink, { href: href, raw: bareLinkText(children) === href, children: (label) => _jsx(PlainMarkdownLink, { href: href, children: label ?? children }) });
|
|
125
|
+
}
|
|
126
|
+
return _jsx(PlainMarkdownLink, { href: href, children: children });
|
|
127
|
+
}
|
|
128
|
+
function PlainMarkdownLink({ href, children, ...anchorProps }) {
|
|
120
129
|
const tAppLink = useTranslations('markdownAppLinks');
|
|
121
130
|
const Link = useUiLink();
|
|
122
131
|
const router = useUiRouter();
|
|
@@ -196,7 +205,7 @@ export function MarkdownLink({ href, children, }) {
|
|
|
196
205
|
// A sandbox address under a host preview resolver: the proxied href would
|
|
197
206
|
// land on the host's own origin, so the click opens the host's URL.
|
|
198
207
|
if (openPreview && href && resolvedHref !== href) {
|
|
199
|
-
return (_jsx("a", { href: href, className: anchorClass, title: presentation ? resolvedHref : undefined, target: "_blank", rel: "noopener noreferrer", onClick: (e) => openPreview(e, href, resolvedHref), children: _jsx(InsideLinkContext.Provider, { value: true, children: linkContent }) }));
|
|
208
|
+
return (_jsx("a", { ...anchorProps, href: href, className: anchorClass, title: presentation ? resolvedHref : undefined, target: "_blank", rel: "noopener noreferrer", onClick: (e) => openPreview(e, href, resolvedHref), children: _jsx(InsideLinkContext.Provider, { value: true, children: linkContent }) }));
|
|
200
209
|
}
|
|
201
210
|
// Markdown can contain arbitrary same-origin absolute URLs. Next.js
|
|
202
211
|
// treats those as app routes and prefetches them, including typos such
|
|
@@ -207,7 +216,7 @@ export function MarkdownLink({ href, children, }) {
|
|
|
207
216
|
// router on a plain click. Decided at click time, so the server markup and
|
|
208
217
|
// the prefetcher never see it; a modified click keeps the native new tab.
|
|
209
218
|
if (!shouldUseNextLink(resolvedHref)) {
|
|
210
|
-
return (_jsx("a", { href: resolvedHref, className: anchorClass, title: presentation ? resolvedHref : undefined, ...(isExternal && !isHash ? { target: '_blank', rel: 'noopener noreferrer' } : {}), onClick: (e) => {
|
|
219
|
+
return (_jsx("a", { ...anchorProps, href: resolvedHref, className: anchorClass, title: presentation ? resolvedHref : undefined, ...(isExternal && !isHash ? { target: '_blank', rel: 'noopener noreferrer' } : {}), onClick: (e) => {
|
|
211
220
|
if (e.defaultPrevented || e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey)
|
|
212
221
|
return;
|
|
213
222
|
const appPath = sameOriginAppPath(resolvedHref);
|
|
@@ -217,7 +226,7 @@ export function MarkdownLink({ href, children, }) {
|
|
|
217
226
|
router.push(appPath);
|
|
218
227
|
}, children: _jsx(InsideLinkContext.Provider, { value: true, children: linkContent }) }));
|
|
219
228
|
}
|
|
220
|
-
return (_jsx(Link, { href: resolvedHref, onClick: isHash ? (e) => handleHashClick(e, resolvedHref) : undefined, className: anchorClass, title: presentation ? resolvedHref : undefined, ...(isExternal && !isHash ? { target: '_blank', rel: 'noopener noreferrer' } : {}), children: _jsx(InsideLinkContext.Provider, { value: true, children: linkContent }) }));
|
|
229
|
+
return (_jsx(Link, { ...anchorProps, href: resolvedHref, onClick: isHash ? (e) => handleHashClick(e, resolvedHref) : undefined, className: anchorClass, title: presentation ? resolvedHref : undefined, ...(isExternal && !isHash ? { target: '_blank', rel: 'noopener noreferrer' } : {}), children: _jsx(InsideLinkContext.Provider, { value: true, children: linkContent }) }));
|
|
221
230
|
}
|
|
222
231
|
/**
|
|
223
232
|
* `flush`: no vertical margin, for an image inside a generative UI block that spaces its own children.
|
|
@@ -331,12 +340,18 @@ function parseMarkdownBlocks(markdown) {
|
|
|
331
340
|
*/
|
|
332
341
|
const REMARK_PLUGINS_WITH_SETUP_LINKS = [...katexRemarkPlugins, remarkSetupLinkBlocks];
|
|
333
342
|
const REMARK_PLUGINS_WITH_FILE_LINKS = [...REMARK_PLUGINS_WITH_SETUP_LINKS, remarkWorkspaceFileLinks];
|
|
343
|
+
// Chat text keeps every line the author wrote (one `\n` = one line break,
|
|
344
|
+
// `lineBreaks="chat"`). Everything else stays strict CommonMark. Module-level
|
|
345
|
+
// so no render builds a new array.
|
|
346
|
+
const MESSAGE_REMARK_PLUGINS = [...katexRemarkPlugins, remarkSoftBreaks];
|
|
347
|
+
const MESSAGE_REMARK_PLUGINS_WITH_SETUP_LINKS = [...REMARK_PLUGINS_WITH_SETUP_LINKS, remarkSoftBreaks];
|
|
348
|
+
const MESSAGE_REMARK_PLUGINS_WITH_FILE_LINKS = [...REMARK_PLUGINS_WITH_FILE_LINKS, remarkSoftBreaks];
|
|
334
349
|
// Last, so the words it wraps are the final, sanitized text.
|
|
335
350
|
const STREAMING_REHYPE_PLUGINS = [...katexRehypePlugins, rehypeStreamWords];
|
|
336
351
|
const STREAMING_REHYPE_PLUGINS_NO_RAW = [...katexRehypePluginsNoRaw, rehypeStreamWords];
|
|
337
352
|
// Single source of truth for markdown rendering across the app — clean, minimal,
|
|
338
353
|
// readable in both themes.
|
|
339
|
-
export const UnifiedMarkdown = React.memo(({ content, trust, variant = 'message', className, isStreaming = false, documentPath, genui = false }) => {
|
|
354
|
+
export const UnifiedMarkdown = React.memo(({ content, trust, variant = 'message', className, isStreaming = false, documentPath, genui = false, lineBreaks = 'commonmark' }) => {
|
|
340
355
|
const tHardcodedUi = useTranslations('hardcodedUi');
|
|
341
356
|
const { proxyUrl } = useSandboxProxy();
|
|
342
357
|
const proxy = useCallback((url) => proxyUrl(url), [proxyUrl]);
|
|
@@ -364,12 +379,19 @@ export const UnifiedMarkdown = React.memo(({ content, trust, variant = 'message'
|
|
|
364
379
|
if (documentBaseDir) {
|
|
365
380
|
return [...REMARK_PLUGINS_WITH_SETUP_LINKS, [remarkWorkspaceFileLinks, { baseDir: documentBaseDir }]];
|
|
366
381
|
}
|
|
382
|
+
if (variant === 'document' || lineBreaks !== 'chat') {
|
|
383
|
+
return effectivePolicy.fileLinks
|
|
384
|
+
? REMARK_PLUGINS_WITH_FILE_LINKS
|
|
385
|
+
: policy.setupLinks
|
|
386
|
+
? REMARK_PLUGINS_WITH_SETUP_LINKS
|
|
387
|
+
: katexRemarkPlugins;
|
|
388
|
+
}
|
|
367
389
|
return effectivePolicy.fileLinks
|
|
368
|
-
?
|
|
390
|
+
? MESSAGE_REMARK_PLUGINS_WITH_FILE_LINKS
|
|
369
391
|
: policy.setupLinks
|
|
370
|
-
?
|
|
371
|
-
:
|
|
372
|
-
}, [documentBaseDir, effectivePolicy, policy.setupLinks]);
|
|
392
|
+
? MESSAGE_REMARK_PLUGINS_WITH_SETUP_LINKS
|
|
393
|
+
: MESSAGE_REMARK_PLUGINS;
|
|
394
|
+
}, [documentBaseDir, effectivePolicy, policy.setupLinks, variant, lineBreaks]);
|
|
373
395
|
// Streamdown renders streaming text block by block and settled text as one
|
|
374
396
|
// document: two different React trees. Switching trees when the turn ends
|
|
375
397
|
// remounts the whole message, the same loss as unstable renderer types
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export interface ActionBarAction {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
/** `success` for an approving verb (Approve), `destructive` for a removing one (Delete). */
|
|
6
|
+
tone?: 'default' | 'success' | 'destructive';
|
|
7
|
+
/** `primary` fills the button. Give it to at most one action: the commit verb. */
|
|
8
|
+
emphasis?: 'default' | 'primary';
|
|
9
|
+
/**
|
|
10
|
+
* The shortcut drawn after the label, one entry per key: `['mod', 'S']`.
|
|
11
|
+
* `'mod'` is ⌘ on a Mac and Ctrl elsewhere. Display only: the page binds it.
|
|
12
|
+
*/
|
|
13
|
+
kbd?: readonly string[];
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
/** This action alone is running: a spinner leads its label and it disables. */
|
|
16
|
+
loading?: boolean;
|
|
17
|
+
onSelect: () => void;
|
|
18
|
+
}
|
|
19
|
+
/** The drawn label of one key: `'mod'` → ⌘ / Ctrl, `'shift'` → ⇧, a letter in capitals. */
|
|
20
|
+
export declare function keyLabel(key: string, isMac: boolean): string;
|
|
21
|
+
/** `aria-keyshortcuts` takes key names joined by `+`: `['mod', 'S']` → `Meta+S` / `Control+S`. */
|
|
22
|
+
export declare function toAriaKeyshortcuts(keys: readonly string[], isMac: boolean): string;
|
|
23
|
+
export declare function ActionBar({ title, description, leading, actions, close, busy, animateIn, className, }: {
|
|
24
|
+
/** The mode in a few words: "3 selected", "Unsaved changes". Read by screen readers on change. */
|
|
25
|
+
title: ReactNode;
|
|
26
|
+
/** One muted fact after the title. */
|
|
27
|
+
description?: ReactNode;
|
|
28
|
+
/** A glyph before the title, such as the clipboard icon. Replaced by the dot matrix while `busy`. */
|
|
29
|
+
leading?: ReactNode;
|
|
30
|
+
actions: readonly ActionBarAction[];
|
|
31
|
+
/** Adds the trailing × that leaves the mode. */
|
|
32
|
+
close?: {
|
|
33
|
+
label: string;
|
|
34
|
+
onSelect: () => void;
|
|
35
|
+
};
|
|
36
|
+
/** A bulk action or save is running: the dot matrix leads and every control disables. */
|
|
37
|
+
busy?: boolean;
|
|
38
|
+
/** False skips the enter animation (the mode opened from the keyboard). */
|
|
39
|
+
animateIn?: boolean;
|
|
40
|
+
className?: string;
|
|
41
|
+
}): import("react").JSX.Element;
|
|
42
|
+
/**
|
|
43
|
+
* Pins an `ActionBar` to the bottom centre of the nearest positioned ancestor,
|
|
44
|
+
* 16px off its bottom edge, at most 36rem wide. Clicks pass through the empty
|
|
45
|
+
* strip around the bar.
|
|
46
|
+
*/
|
|
47
|
+
export declare function ActionBarDock({ children, className, }: {
|
|
48
|
+
children: ReactNode;
|
|
49
|
+
className?: string;
|
|
50
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* ActionBar — the one floating bar that sits at the bottom centre of a page
|
|
5
|
+
* while a temporary mode is open: a multi-selection ("3 selected"), unsaved
|
|
6
|
+
* edits ("Unsaved changes"), or a pending clipboard ("Moving 2 items").
|
|
7
|
+
*
|
|
8
|
+
* Anatomy, left to right:
|
|
9
|
+
* [leading] title description [ action ⌘K | action | action ] [×]
|
|
10
|
+
*
|
|
11
|
+
* - `title` states the mode in a few words. `description` adds one muted fact
|
|
12
|
+
* (the changed tabs, a selection limit). Both truncate; nothing wraps.
|
|
13
|
+
* - `actions` render as one `secondary` ButtonGroup of text buttons. An action
|
|
14
|
+
* may carry a `kbd` hint (one `Kbd` per key in a `KbdGroup`; `'mod'` draws ⌘
|
|
15
|
+
* on a Mac and Ctrl elsewhere), a `destructive` or `success` tone, a `primary`
|
|
16
|
+
* emphasis (the one commit verb, such as Save), and its own `loading` state.
|
|
17
|
+
* - `close` adds the trailing × that leaves the mode. Its label is the
|
|
18
|
+
* tooltip and the accessible name ("Exit selection").
|
|
19
|
+
* - `busy` puts the session dot matrix before the title and disables every
|
|
20
|
+
* control, for a running bulk action or save.
|
|
21
|
+
*
|
|
22
|
+
* Under 32rem of its own width (container query) the actions drop to a second
|
|
23
|
+
* full-width row, so every label still reads.
|
|
24
|
+
*
|
|
25
|
+
* It enters with a short rise and fade (reduced motion keeps the fade) and
|
|
26
|
+
* leaves at once. `animateIn={false}` skips the enter, for a bar opened from
|
|
27
|
+
* the keyboard.
|
|
28
|
+
*
|
|
29
|
+
* Place it with `ActionBarDock`, which pins it to the bottom of the nearest
|
|
30
|
+
* positioned ancestor (the list column), not to the end of the list.
|
|
31
|
+
*
|
|
32
|
+
* `kbd` only DRAWS the key. The page owns the shortcut binding, because the
|
|
33
|
+
* page decides when the key is live (focus in an input, a dialog open).
|
|
34
|
+
*/
|
|
35
|
+
import { XIcon } from '@phosphor-icons/react';
|
|
36
|
+
import { m } from 'motion/react';
|
|
37
|
+
import { useSyncExternalStore } from 'react';
|
|
38
|
+
import { useReducedMotion } from '../lib/reduced-motion.js';
|
|
39
|
+
import { cn } from '../lib/utils.js';
|
|
40
|
+
import { Button } from './button.js';
|
|
41
|
+
import { ButtonGroup } from './button-group.js';
|
|
42
|
+
import { SessionDotMatrix } from './dot-matrix/session-dot-matrix.js';
|
|
43
|
+
import Hint from './hint.js';
|
|
44
|
+
import { Kbd, KbdGroup } from './kbd.js';
|
|
45
|
+
import Loading from './loading.js';
|
|
46
|
+
const IS_MAC = typeof navigator !== 'undefined' && /Mac|iPod|iPhone|iPad/.test(navigator.platform);
|
|
47
|
+
const noopSubscribe = () => () => { };
|
|
48
|
+
// The server cannot know the platform: it renders ⌘, the client corrects after hydration.
|
|
49
|
+
function useIsMac() {
|
|
50
|
+
return useSyncExternalStore(noopSubscribe, () => IS_MAC, () => true);
|
|
51
|
+
}
|
|
52
|
+
const MOD_SYMBOL = { mac: '⌘', other: 'Ctrl' };
|
|
53
|
+
const SHIFT_ALT_SYMBOL = { shift: '⇧', alt: '⌥' };
|
|
54
|
+
const ARIA_NAME = { shift: 'Shift', alt: 'Alt' };
|
|
55
|
+
/** The drawn label of one key: `'mod'` → ⌘ / Ctrl, `'shift'` → ⇧, a letter in capitals. */
|
|
56
|
+
export function keyLabel(key, isMac) {
|
|
57
|
+
if (key === 'mod')
|
|
58
|
+
return isMac ? MOD_SYMBOL.mac : MOD_SYMBOL.other;
|
|
59
|
+
return SHIFT_ALT_SYMBOL[key] ?? (key.length === 1 ? key.toUpperCase() : key);
|
|
60
|
+
}
|
|
61
|
+
/** `aria-keyshortcuts` takes key names joined by `+`: `['mod', 'S']` → `Meta+S` / `Control+S`. */
|
|
62
|
+
export function toAriaKeyshortcuts(keys, isMac) {
|
|
63
|
+
return keys
|
|
64
|
+
.map((k) => k === 'mod' ? (isMac ? 'Meta' : 'Control') : (ARIA_NAME[k] ?? (k.length === 1 ? k.toUpperCase() : k)))
|
|
65
|
+
.join('+');
|
|
66
|
+
}
|
|
67
|
+
const EASE_OUT = [0.23, 1, 0.32, 1];
|
|
68
|
+
// A full transform string, not `y`: it runs on the compositor while the list loads.
|
|
69
|
+
const RISE = 'translateY(8px)';
|
|
70
|
+
const REST = 'translateY(0px)';
|
|
71
|
+
export function ActionBar({ title, description, leading, actions, close, busy = false, animateIn = true, className, }) {
|
|
72
|
+
const reduceMotion = useReducedMotion();
|
|
73
|
+
const isMac = useIsMac();
|
|
74
|
+
return (_jsx(m.div, { "data-slot": "action-bar", initial: animateIn ? { opacity: 0, transform: reduceMotion ? REST : RISE } : false, animate: {
|
|
75
|
+
opacity: 1,
|
|
76
|
+
transform: REST,
|
|
77
|
+
transition: { duration: 0.18, ease: EASE_OUT },
|
|
78
|
+
}, className: cn('bg-popover text-popover-foreground border-border @container/action-bar w-full rounded-lg border p-2 pl-3.5 shadow-md', className), children: _jsxs("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-2", children: [_jsxs("span", { className: "order-1 flex min-w-0 flex-1 items-center gap-2 text-sm font-medium tabular-nums", "aria-live": "polite", children: [busy ? (_jsx(SessionDotMatrix, { size: 14, className: "shrink-0" })) : leading ? (_jsx("span", { className: "text-muted-foreground flex shrink-0 [&_svg]:size-4", children: leading })) : null, _jsx("span", { className: "min-w-0 truncate", children: title }), description ? (_jsx("span", { className: "text-muted-foreground min-w-0 shrink-[2] truncate font-normal", children: description })) : null] }), actions.length > 0 ? (_jsx(ButtonGroup, { className: "order-3 w-full @lg/action-bar:order-2 @lg/action-bar:w-auto @lg/action-bar:shrink-0", children: actions.map((a) => (_jsxs(Button, { type: "button", variant: a.emphasis === 'primary' ? 'default' : 'secondary', size: "sm", onClick: a.onSelect, disabled: busy || a.disabled || a.loading, "aria-busy": a.loading || undefined, "aria-keyshortcuts": a.kbd?.length ? toAriaKeyshortcuts(a.kbd, isMac) : undefined, className: cn('h-8 min-w-0 flex-auto gap-1.5 px-1.5 @lg/action-bar:flex-none @lg/action-bar:px-3', a.tone === 'destructive' && 'text-destructive hover:text-destructive', a.tone === 'success' && 'text-kortix-green hover:text-kortix-green'), children: [a.loading ? _jsx(Loading, { className: "size-3.5 shrink-0" }) : null, _jsx("span", { className: "truncate", children: a.label }), a.kbd?.length ? (_jsx(KbdGroup, { children: a.kbd.map((key) => (_jsx(Kbd, { className: cn('font-mono', a.emphasis === 'primary' && 'text-action-foreground/70'), children: keyLabel(key, isMac) }, key))) })) : null] }, a.id))) })) : null, close ? (_jsx(Hint, { label: close.label, side: "top", children: _jsx(Button, { type: "button", variant: "ghost", size: "icon", "aria-label": close.label, onClick: close.onSelect, disabled: busy, className: "order-2 size-8 shrink-0 @lg/action-bar:order-3", children: _jsx(XIcon, { className: "size-4 shrink-0" }) }) })) : null] }) }));
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Pins an `ActionBar` to the bottom centre of the nearest positioned ancestor,
|
|
82
|
+
* 16px off its bottom edge, at most 36rem wide. Clicks pass through the empty
|
|
83
|
+
* strip around the bar.
|
|
84
|
+
*/
|
|
85
|
+
export function ActionBarDock({ children, className, }) {
|
|
86
|
+
return (_jsx("div", { "data-slot": "action-bar-dock", className: cn('pointer-events-none absolute inset-x-0 bottom-4 z-30 flex justify-center px-4', className), children: _jsx("div", { className: "pointer-events-auto w-full max-w-xl", children: children }) }));
|
|
87
|
+
}
|
|
@@ -24,8 +24,10 @@ function Calendar({ className, classNames, showOutsideDays = true, fixedWeeks =
|
|
|
24
24
|
day: cn(buttonVariants({ variant: 'ghost' }), 'size-8 p-0 font-normal aria-selected:opacity-100'),
|
|
25
25
|
day_range_start: 'day-range-start aria-selected:bg-primary aria-selected:text-primary-foreground',
|
|
26
26
|
day_range_end: 'day-range-end aria-selected:bg-primary aria-selected:text-primary-foreground',
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
// Variants, not plain utilities: the ghost button's own `bg-transparent`
|
|
28
|
+
// otherwise wins and the picked day is white text on the cell's tint.
|
|
29
|
+
day_selected: 'aria-selected:bg-primary aria-selected:text-primary-foreground aria-selected:hover:bg-primary aria-selected:hover:text-primary-foreground aria-selected:focus:bg-primary aria-selected:focus:text-primary-foreground',
|
|
30
|
+
day_today: 'not-aria-selected:bg-accent not-aria-selected:text-accent-foreground',
|
|
29
31
|
day_outside: 'day-outside text-muted-foreground aria-selected:text-muted-foreground',
|
|
30
32
|
day_disabled: 'text-muted-foreground opacity-50',
|
|
31
33
|
day_range_middle: 'aria-selected:bg-transparent aria-selected:text-accent-foreground',
|
|
@@ -4,10 +4,10 @@ import { Hint } from "./hint.js";
|
|
|
4
4
|
import { HoverCard, HoverCardContent, HoverCardTrigger } from "./hover-card.js";
|
|
5
5
|
import { useState } from "react";
|
|
6
6
|
import { cn } from "../lib/utils.js";
|
|
7
|
-
import { Children,
|
|
7
|
+
import { Children, isValidElement } from "react";
|
|
8
8
|
export function InlineMeta({ className, children }) {
|
|
9
9
|
const items = Children.toArray(children).filter((c) => c !== null && c !== undefined && c !== "");
|
|
10
|
-
return (_jsx("div", { className: cn("text-muted-foreground flex flex-wrap items-center gap-2 text-xs", "min-w-0", className), children: items.map((child, i) => (_jsxs(
|
|
10
|
+
return (_jsx("div", { className: cn("text-muted-foreground flex flex-wrap items-center gap-2 text-xs", "min-w-0", className), children: items.map((child, i) => (_jsxs("span", { "data-inline-meta-item": "", className: "inline-flex max-w-full min-w-0 items-center gap-2", children: [child, i < items.length - 1 && (_jsx("span", { "aria-hidden": "true", className: "bg-muted-foreground size-1 shrink-0 rounded-full" }))] }, isValidElement(child) ? (child.key ?? i) : i))) }));
|
|
11
11
|
}
|
|
12
12
|
/** Optional detail for metadata that benefits from an explanation. */
|
|
13
13
|
export function InlineMetaHint({ label, children, }) {
|
|
@@ -55,7 +55,8 @@ export function KortixLoader({ size = 'medium', speed = 1.2, customSize, classNa
|
|
|
55
55
|
const animationDuration = 0.8 / speed;
|
|
56
56
|
return (_jsx("div", { className: cn('flex items-center justify-center', className), style: style, children: _jsx("div", { className: forcedVariant === null
|
|
57
57
|
? 'border-[rgba(0,0,0,0.1)] border-t-[#000000] dark:border-[rgba(255,255,255,0.15)] dark:border-t-[#ffffff]'
|
|
58
|
-
: undefined, style: {
|
|
58
|
+
: undefined, "data-kx-spinner": autoPlay && loop ? '' : undefined, style: {
|
|
59
|
+
['--kx-spin-duration']: `${animationDuration}s`,
|
|
59
60
|
width: loaderSize,
|
|
60
61
|
height: loaderSize,
|
|
61
62
|
borderStyle: 'solid',
|
|
@@ -22,7 +22,7 @@ declare const ModalOverlay: React.ForwardRefExoticComponent<Omit<React.DetailedH
|
|
|
22
22
|
declare const ModalVariants: (props?: ({
|
|
23
23
|
variant?: "base" | "default" | "transparent" | null | undefined;
|
|
24
24
|
side?: "bottom" | "left" | "right" | "top" | "fullscreen" | null | undefined;
|
|
25
|
-
animation?: "
|
|
25
|
+
animation?: "none" | "default" | null | undefined;
|
|
26
26
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
27
27
|
interface ModalContentProps extends DialogContentBaseProps, VariantProps<typeof ModalVariants> {
|
|
28
28
|
closeClassName?: string;
|
|
@@ -10,5 +10,6 @@ interface PaperShaderProps {
|
|
|
10
10
|
}
|
|
11
11
|
export declare const GrainShader: import("react").NamedExoticComponent<PaperShaderProps>;
|
|
12
12
|
export declare const NeuroShader: import("react").NamedExoticComponent<PaperShaderProps>;
|
|
13
|
+
export declare function BeamsStill(): import("react").JSX.Element;
|
|
13
14
|
export declare const BeamsShader: import("react").NamedExoticComponent<PaperShaderProps>;
|
|
14
15
|
export {};
|
|
@@ -50,6 +50,12 @@ const BEAMS_IMAGE = `data:image/svg+xml;utf8,${encodeURIComponent(`<svg xmlns="h
|
|
|
50
50
|
<rect x="-200" y="800" width="1000" height="110" fill="url(#b)" opacity=".6"/>
|
|
51
51
|
</g>
|
|
52
52
|
</svg>`)}`;
|
|
53
|
+
// The beams without the paper texture: the SVG alone, no WebGL. For small art
|
|
54
|
+
// that stays mounted, such as the sidebar's promo cards, where a live canvas
|
|
55
|
+
// per card would hold a GPU context on every page.
|
|
56
|
+
export function BeamsStill() {
|
|
57
|
+
return (_jsx("div", { className: "pointer-events-none absolute inset-0 overflow-hidden", "aria-hidden": "true", children: _jsx("img", { src: BEAMS_IMAGE, alt: "", className: "absolute inset-0 size-full object-cover" }) }));
|
|
58
|
+
}
|
|
53
59
|
// Hairlines crossing at the corners of the middle third. Percent positions and
|
|
54
60
|
// a fixed 1px width, so they hold on the tall panel and on the phone banner.
|
|
55
61
|
const BEAM_LINES = [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as ResizablePrimitive from 'react-resizable-panels';
|
|
3
3
|
declare function ResizablePanelGroup({ className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>): React.JSX.Element;
|
|
4
|
-
declare const ResizablePanel: React.ForwardRefExoticComponent<Omit<Omit<React.HTMLAttributes<
|
|
4
|
+
declare const ResizablePanel: React.ForwardRefExoticComponent<Omit<Omit<React.HTMLAttributes<HTMLElement | HTMLSpanElement | HTMLAnchorElement | HTMLImageElement | HTMLButtonElement | HTMLFormElement | HTMLDivElement | HTMLParagraphElement | HTMLInputElement | HTMLTextAreaElement | HTMLLabelElement | HTMLObjectElement | HTMLMetaElement | HTMLMapElement | HTMLLinkElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLHeadingElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLLegendElement | HTMLLIElement | HTMLMeterElement | HTMLOListElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLPreElement | HTMLProgressElement | HTMLSlotElement | HTMLScriptElement | HTMLSelectElement | HTMLSourceElement | HTMLStyleElement | HTMLTableElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTimeElement | HTMLTitleElement | HTMLTableRowElement | HTMLTrackElement | HTMLUListElement | HTMLVideoElement | HTMLTableCaptionElement | HTMLMenuElement | HTMLPictureElement>, "id" | "onResize"> & {
|
|
5
5
|
className?: string;
|
|
6
6
|
collapsedSize?: number | undefined;
|
|
7
7
|
collapsible?: boolean | undefined;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The resize seam:
|
|
3
|
-
*
|
|
2
|
+
* The resize seam: one plain 1px line in the ring blue (`--ring`) on a drag
|
|
3
|
+
* edge, drawn exactly over the hairline it replaces. No taper, no fade: a
|
|
4
|
+
* docked edge is a straight rule, and the seam is that rule lit. Drawn by
|
|
4
5
|
* `before:`, so a caller keeps `after:` for its hit strip. Hidden at rest; the
|
|
5
6
|
* caller reveals it (`before:opacity-100`) on hover, focus and drag. Opacity
|
|
6
7
|
* only: a width or position transition would animate layout on hover.
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { cn } from '../lib/utils.js';
|
|
2
2
|
/**
|
|
3
|
-
* The resize seam:
|
|
4
|
-
*
|
|
3
|
+
* The resize seam: one plain 1px line in the ring blue (`--ring`) on a drag
|
|
4
|
+
* edge, drawn exactly over the hairline it replaces. No taper, no fade: a
|
|
5
|
+
* docked edge is a straight rule, and the seam is that rule lit. Drawn by
|
|
5
6
|
* `before:`, so a caller keeps `after:` for its hit strip. Hidden at rest; the
|
|
6
7
|
* caller reveals it (`before:opacity-100`) on hover, focus and drag. Opacity
|
|
7
8
|
* only: a width or position transition would animate layout on hover.
|
|
@@ -9,4 +10,4 @@ import { cn } from '../lib/utils.js';
|
|
|
9
10
|
* The sidebar rail (`sidebar-panel.tsx`) and every `ResizableHandle` draw it,
|
|
10
11
|
* so every drag-to-resize edge in the app looks the same.
|
|
11
12
|
*/
|
|
12
|
-
export const RESIZE_SEAM_CLASS = cn('before:pointer-events-none before:absolute before:inset-y-0 before:left-1/2 before:z-10 before:w-
|
|
13
|
+
export const RESIZE_SEAM_CLASS = cn('before:pointer-events-none before:absolute before:inset-y-0 before:left-1/2 before:z-10 before:w-px before:-translate-x-1/2 before:opacity-0', 'before:bg-ring before:transition-opacity before:duration-fast before:ease-out', 'motion-reduce:before:transition-none');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
2
|
/**
|
|
3
3
|
* The one section header used across the Settings panel: title on the left,
|
|
4
4
|
* optional description under it, one action on the right. Destructive rows use
|
|
@@ -11,3 +11,32 @@ export declare function SettingsSectionHeader({ title, description, action, clas
|
|
|
11
11
|
action?: ReactNode;
|
|
12
12
|
className?: string;
|
|
13
13
|
}): import("react").JSX.Element;
|
|
14
|
+
export declare const SettingsPageTitleProvider: import("react").Provider<string | null>;
|
|
15
|
+
export declare function useSettingsPageTitle(): string | null;
|
|
16
|
+
/**
|
|
17
|
+
* Every Workspace settings page's column: one gutter and one top offset, left
|
|
18
|
+
* aligned, so the title sits at the same x and y on every section. A page sets
|
|
19
|
+
* only its own max width inside it (`max-w-2xl` a form, `max-w-5xl` a library,
|
|
20
|
+
* none a table).
|
|
21
|
+
*/
|
|
22
|
+
export declare const SETTINGS_PAGE_COLUMN_CLASS = "w-full px-4 pt-12 pb-20 sm:px-12";
|
|
23
|
+
/**
|
|
24
|
+
* The one page-title rung of Workspace settings: the brand's section page
|
|
25
|
+
* title (`typography.md`, Roles). `text-2xl` is the detail-view rung.
|
|
26
|
+
*/
|
|
27
|
+
export declare const SETTINGS_PAGE_TITLE_CLASS = "text-foreground text-xl font-medium text-balance";
|
|
28
|
+
/**
|
|
29
|
+
* The page header of a Workspace settings section: the `<h1>`, one line of
|
|
30
|
+
* description under it, and the page's actions on the right. Inside Workspace
|
|
31
|
+
* settings the title is the rail row's label (`SettingsPageTitleProvider`),
|
|
32
|
+
* whatever the pane passes.
|
|
33
|
+
*/
|
|
34
|
+
export declare function SettingsPageHeader({ title, titleAccessory, description, action, className, }: {
|
|
35
|
+
title: ReactNode;
|
|
36
|
+
/** Right after the title: an info button. */
|
|
37
|
+
titleAccessory?: ReactNode;
|
|
38
|
+
description?: ReactNode;
|
|
39
|
+
/** The page's controls (search, a primary button), one group on the right. */
|
|
40
|
+
action?: ReactNode;
|
|
41
|
+
className?: string;
|
|
42
|
+
}): import("react").JSX.Element;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { cn } from '../lib/utils.js';
|
|
4
|
+
import { createContext, useContext } from 'react';
|
|
3
5
|
/**
|
|
4
6
|
* The one section header used across the Settings panel: title on the left,
|
|
5
7
|
* optional description under it, one action on the right. Destructive rows use
|
|
@@ -9,3 +11,38 @@ import { cn } from '../lib/utils.js';
|
|
|
9
11
|
export function SettingsSectionHeader({ title, description, action, className, }) {
|
|
10
12
|
return (_jsxs("div", { className: cn('flex min-w-0 flex-col gap-3 sm:flex-row sm:items-center sm:justify-between sm:gap-4', className), children: [_jsxs("div", { className: "flex min-w-0 flex-col gap-1 text-base", children: [_jsx("h2", { className: "font-regular text-foreground-strong text-base text-balance lg:text-xl", children: title }), description ? (_jsx("p", { className: "font-regular text-foreground-weak max-w-[410px] text-sm text-pretty", children: description })) : null] }), action ? (_jsx("div", { className: "flex w-full min-w-0 items-center gap-4 sm:w-auto sm:justify-end", children: action })) : null] }));
|
|
11
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* The title of the Workspace settings page on screen: its rail row's label.
|
|
16
|
+
* `ProjectAdminDashboard` provides it around the open section, so every pane
|
|
17
|
+
* that draws a page header (`SettingsPageHeader`, `SettingsTabHeader`,
|
|
18
|
+
* `CapabilityPageShell`, the account panes) shows the word the person clicked:
|
|
19
|
+
* "Git", not "Git repo"; "Sandbox", not "Sandbox templates". `null` outside
|
|
20
|
+
* Workspace settings, where each pane keeps its own title.
|
|
21
|
+
*/
|
|
22
|
+
const SettingsPageTitleContext = createContext(null);
|
|
23
|
+
export const SettingsPageTitleProvider = SettingsPageTitleContext.Provider;
|
|
24
|
+
export function useSettingsPageTitle() {
|
|
25
|
+
return useContext(SettingsPageTitleContext);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Every Workspace settings page's column: one gutter and one top offset, left
|
|
29
|
+
* aligned, so the title sits at the same x and y on every section. A page sets
|
|
30
|
+
* only its own max width inside it (`max-w-2xl` a form, `max-w-5xl` a library,
|
|
31
|
+
* none a table).
|
|
32
|
+
*/
|
|
33
|
+
export const SETTINGS_PAGE_COLUMN_CLASS = 'w-full px-4 pt-12 pb-20 sm:px-12';
|
|
34
|
+
/**
|
|
35
|
+
* The one page-title rung of Workspace settings: the brand's section page
|
|
36
|
+
* title (`typography.md`, Roles). `text-2xl` is the detail-view rung.
|
|
37
|
+
*/
|
|
38
|
+
export const SETTINGS_PAGE_TITLE_CLASS = 'text-foreground text-xl font-medium text-balance';
|
|
39
|
+
/**
|
|
40
|
+
* The page header of a Workspace settings section: the `<h1>`, one line of
|
|
41
|
+
* description under it, and the page's actions on the right. Inside Workspace
|
|
42
|
+
* settings the title is the rail row's label (`SettingsPageTitleProvider`),
|
|
43
|
+
* whatever the pane passes.
|
|
44
|
+
*/
|
|
45
|
+
export function SettingsPageHeader({ title, titleAccessory, description, action, className, }) {
|
|
46
|
+
const navTitle = useSettingsPageTitle();
|
|
47
|
+
return (_jsxs("header", { className: cn('flex min-w-0 flex-col gap-3 sm:flex-row sm:items-start sm:justify-between sm:gap-4', className), children: [_jsxs("div", { className: "min-w-0 space-y-1", children: [_jsxs("div", { className: "flex min-w-0 items-center gap-1", children: [_jsx("h1", { className: SETTINGS_PAGE_TITLE_CLASS, children: navTitle ?? title }), titleAccessory] }), description ? (_jsx("p", { className: "text-muted-foreground max-w-xl text-sm text-pretty", children: description })) : null] }), action ? _jsx("div", { className: "flex min-w-0 shrink-0 items-center gap-2", children: action }) : null] }));
|
|
48
|
+
}
|