@kortix/ui 0.14.8 → 0.14.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/_vendor/kortix-shared.js +116 -3
- package/dist/_vendor/shared/app-config.d.ts +175 -0
- package/dist/_vendor/shared/artifact-comments.d.ts +235 -0
- package/dist/_vendor/shared/channel-descriptors.d.ts +96 -0
- package/dist/_vendor/shared/channel-message.d.ts +45 -5
- package/dist/_vendor/shared/index.d.ts +2 -0
- package/dist/_vendor/shared/space-slug.d.ts +37 -0
- package/dist/access/access/access-detail-shell.js +1 -1
- package/dist/access/access/principal-picker.d.ts +11 -0
- package/dist/access/access/principal-picker.js +3 -2
- package/dist/apps/app-preview-pool.d.ts +7 -2
- package/dist/apps/app-preview-pool.js +30 -7
- package/dist/apps/app-shared.d.ts +22 -15
- package/dist/apps/app-shared.js +37 -19
- package/dist/apps/index.d.ts +2 -2
- package/dist/apps/index.js +2 -2
- package/dist/artifacts/artifact-frame.d.ts +16 -0
- package/dist/artifacts/artifact-frame.js +55 -0
- package/dist/artifacts/artifact-session.d.ts +18 -0
- package/dist/artifacts/artifact-session.js +101 -0
- package/dist/artifacts/frame-policy.d.ts +30 -0
- package/dist/artifacts/frame-policy.js +61 -0
- package/dist/artifacts/index.d.ts +3 -0
- package/dist/artifacts/index.js +5 -0
- package/dist/browser/sandbox-browser-chrome.d.ts +4 -1
- package/dist/browser/sandbox-browser-chrome.js +2 -2
- package/dist/customize/agents/agent-grant-pages.d.ts +5 -1
- package/dist/customize/agents/agent-grant-pages.js +30 -4
- package/dist/customize/agents/agent-page.js +3 -1
- package/dist/customize/agents/agent-policy-sets.d.ts +43 -0
- package/dist/customize/agents/agent-policy-sets.js +72 -0
- package/dist/customize/agents/agent-triggers-section.js +2 -1
- package/dist/customize/connectors/add-mcp/add-mcp-server-dialog.d.ts +6 -1
- package/dist/customize/connectors/add-mcp/add-mcp-server-dialog.js +10 -4
- package/dist/customize/connectors/agent-access.d.ts +35 -0
- package/dist/customize/connectors/agent-access.js +77 -0
- package/dist/customize/connectors/catalog/browse-sections.d.ts +2 -29
- package/dist/customize/connectors/catalog/browse-sections.js +7 -74
- package/dist/customize/connectors/catalog/catalog-entry.d.ts +18 -37
- package/dist/customize/connectors/catalog/catalog-entry.js +28 -40
- package/dist/customize/connectors/catalog/connector-browse.d.ts +3 -32
- package/dist/customize/connectors/catalog/connector-browse.js +19 -50
- package/dist/customize/connectors/catalog/use-catalog.d.ts +20 -59
- package/dist/customize/connectors/catalog/use-catalog.js +48 -175
- package/dist/customize/connectors/connector-identity.d.ts +9 -11
- package/dist/customize/connectors/connector-identity.js +13 -42
- package/dist/customize/connectors/connector-moves-banner.d.ts +2 -1
- package/dist/customize/connectors/connector-moves-banner.js +4 -6
- package/dist/customize/connectors/connector-routes.d.ts +21 -9
- package/dist/customize/connectors/connector-routes.js +29 -20
- package/dist/customize/connectors/connectors-page.js +53 -82
- package/dist/customize/connectors/detail/app-page.js +226 -98
- package/dist/customize/connectors/detail/computer-app-page.d.ts +16 -0
- package/dist/customize/connectors/detail/computer-app-page.js +39 -0
- package/dist/customize/connectors/detail/connector-accounts.js +3 -1
- package/dist/customize/connectors/detail/connector-advanced-tools.d.ts +4 -1
- package/dist/customize/connectors/detail/connector-advanced-tools.js +2 -2
- package/dist/customize/connectors/detail/connector-agents.d.ts +14 -0
- package/dist/customize/connectors/detail/connector-agents.js +69 -0
- package/dist/customize/connectors/detail/connector-detail-tabs.js +2 -1
- package/dist/customize/connectors/detail/connector-move-row.d.ts +8 -5
- package/dist/customize/connectors/detail/connector-move-row.js +23 -14
- package/dist/customize/connectors/detail/connector-page.d.ts +4 -1
- package/dist/customize/connectors/detail/connector-page.js +14 -10
- package/dist/customize/connectors/detail/connector-policy-sets.d.ts +28 -0
- package/dist/customize/connectors/detail/connector-policy-sets.js +203 -0
- package/dist/customize/connectors/detail/connector-settings.d.ts +4 -1
- package/dist/customize/connectors/detail/connector-settings.js +7 -3
- package/dist/customize/connectors/detail/connector-status.d.ts +19 -6
- package/dist/customize/connectors/detail/connector-status.js +34 -10
- package/dist/customize/connectors/detail/connector-tabs.d.ts +4 -1
- package/dist/customize/connectors/detail/connector-tabs.js +8 -2
- package/dist/customize/connectors/detail/connector-tools.d.ts +3 -3
- package/dist/customize/connectors/detail/connector-tools.js +105 -48
- package/dist/customize/connectors/detail/email-inboxes.d.ts +43 -0
- package/dist/customize/connectors/detail/email-inboxes.js +184 -0
- package/dist/customize/connectors/detail/provider-info.d.ts +1 -1
- package/dist/customize/connectors/detail/provider-info.js +2 -2
- package/dist/customize/connectors/detail/status-badge.d.ts +1 -1
- package/dist/customize/connectors/detail/status-badge.js +4 -5
- package/dist/customize/connectors/detail/use-connector-detail.d.ts +6 -0
- package/dist/customize/connectors/detail/use-connector-detail.js +14 -4
- package/dist/customize/connectors/install/install-dialog.d.ts +23 -0
- package/dist/customize/connectors/install/install-dialog.js +40 -0
- package/dist/customize/connectors/install/install.d.ts +13 -2
- package/dist/customize/connectors/install/install.js +9 -4
- package/dist/customize/connectors/install/use-install.d.ts +19 -2
- package/dist/customize/connectors/install/use-install.js +65 -37
- package/dist/customize/connectors/install/way-kind.d.ts +5 -0
- package/dist/customize/connectors/install/way-kind.js +16 -0
- package/dist/customize/connectors/provider-label.d.ts +2 -1
- package/dist/customize/connectors/provider-label.js +13 -3
- package/dist/customize/connectors/tools/pattern-rule-draft.d.ts +4 -0
- package/dist/customize/connectors/tools/pattern-rule-draft.js +12 -3
- package/dist/customize/connectors/tools/policy-sets.d.ts +27 -0
- package/dist/customize/connectors/tools/policy-sets.js +41 -0
- package/dist/customize/connectors/tools/tool-groups.d.ts +32 -9
- package/dist/customize/connectors/tools/tool-groups.js +78 -16
- package/dist/customize/connectors/tools/tool-policy-control.d.ts +11 -10
- package/dist/customize/connectors/tools/tool-policy-control.js +15 -16
- package/dist/customize/connectors/tools/tool-policy-labels.d.ts +6 -5
- package/dist/customize/connectors/tools/tool-policy-labels.js +17 -16
- package/dist/customize/connectors/tools/tool-policy.d.ts +50 -4
- package/dist/customize/connectors/tools/tool-policy.js +74 -8
- package/dist/customize/connectors/use-agent-access.d.ts +85 -0
- package/dist/customize/connectors/use-agent-access.js +72 -0
- package/dist/customize/migrate-to-v2/index.d.ts +1 -2
- package/dist/customize/migrate-to-v2/index.js +1 -2
- package/dist/customize/migrate-to-v2/migration-prompt.d.ts +12 -25
- package/dist/customize/migrate-to-v2/migration-prompt.js +34 -236
- package/dist/customize/migrate-to-v2/upgrade-defs.d.ts +1 -1
- package/dist/customize/migrate-to-v2/upgrade-defs.js +7 -6
- package/dist/customize/migrate-to-v2/upgrade-view.js +7 -7
- package/dist/customize/migrate-to-v2/use-run-upgrade.d.ts +3 -3
- package/dist/customize/providers/provider-accordion.js +17 -2
- package/dist/customize/sections/component/channel-access-panel.d.ts +16 -0
- package/dist/customize/sections/component/channel-access-panel.js +146 -0
- package/dist/customize/sections/component/channel-connect-hero.d.ts +3 -2
- package/dist/customize/sections/component/channel-connect-hero.js +3 -2
- package/dist/customize/sections/component/channel-hero-frame.d.ts +31 -0
- package/dist/customize/sections/component/channel-hero-frame.js +40 -0
- package/dist/customize/sections/component/channel-mocks.d.ts +6 -0
- package/dist/customize/sections/component/channel-mocks.js +46 -0
- package/dist/customize/sections/component/channel-row.d.ts +13 -3
- package/dist/customize/sections/component/channel-row.js +10 -4
- package/dist/customize/sections/component/email-connect-form.d.ts +27 -0
- package/dist/customize/sections/component/email-connect-form.js +183 -0
- package/dist/customize/sections/component/slack-connect-card.d.ts +7 -0
- package/dist/customize/sections/component/slack-connect-card.js +2 -3
- package/dist/customize/sections/component/teams-connect-card.d.ts +7 -0
- package/dist/customize/sections/component/teams-connect-card.js +2 -3
- package/dist/customize/sections/component/telegram-channel-row.js +21 -28
- package/dist/customize/sections/connectors-view.d.ts +1 -15
- package/dist/customize/sections/connectors-view.js +81 -314
- package/dist/customize/sections/view/agent-editor-catalog.js +10 -0
- package/dist/customize/sections/view/channels-view.d.ts +6 -1
- package/dist/customize/sections/view/channels-view.js +72 -81
- package/dist/customize/sections/view/gateway/gateway-overview.js +10 -2
- package/dist/customize/settings/rail.js +9 -0
- package/dist/customize/settings/settings-tabs.d.ts +1 -1
- package/dist/customize/settings/settings-tabs.js +1 -0
- package/dist/customize/settings/tabs/chrome-connections-tab.d.ts +6 -0
- package/dist/customize/settings/tabs/chrome-connections-tab.js +99 -0
- package/dist/customize/settings/tabs/experimental-tab.js +35 -16
- package/dist/customize/shared/catalog/catalog-empty-state.d.ts +4 -15
- package/dist/customize/shared/catalog/catalog-empty-state.js +9 -7
- package/dist/customize/shared/channels-switch-dialog.d.ts +18 -0
- package/dist/customize/shared/channels-switch-dialog.js +30 -0
- package/dist/customize/shared/feature-gate-screen.js +27 -9
- package/dist/customize/shared/use-customize-prefetch.d.ts +2 -3
- package/dist/customize/shared/use-customize-prefetch.js +9 -27
- package/dist/customize/triggers/schedule/post-to-field.d.ts +18 -0
- package/dist/customize/triggers/schedule/post-to-field.js +49 -0
- package/dist/customize/triggers/schedule/schedule-copy.d.ts +10 -6
- package/dist/customize/triggers/schedule/schedule-copy.js +42 -11
- package/dist/customize/triggers/schedule/schedule-detail-sheet.js +2 -1
- package/dist/customize/triggers/schedule/trigger-composer-logic.d.ts +22 -0
- package/dist/customize/triggers/schedule/trigger-composer-logic.js +25 -0
- package/dist/customize/triggers/schedule/trigger-composer.d.ts +5 -0
- package/dist/customize/triggers/schedule/trigger-composer.js +23 -14
- package/dist/customize/triggers/schedule/trigger-edit-logic.js +3 -0
- package/dist/customize/triggers/schedule/trigger-filter.js +1 -1
- package/dist/customize/triggers/schedule/trigger-runs-logic.d.ts +2 -2
- package/dist/customize/triggers/schedule/trigger-runs-panel.js +1 -0
- package/dist/customize/triggers/schedule/trigger-toast.js +2 -1
- package/dist/customize/triggers/schedule-view.js +5 -2
- package/dist/files/index.d.ts +1 -0
- package/dist/files/index.js +1 -0
- package/dist/files/project/change-request-recovery.d.ts +1 -26
- package/dist/files/project/change-request-recovery.js +1 -59
- package/dist/files/project/components/change-request-detail-dialog.js +13 -3
- package/dist/files/project/components/drive-explorer.js +15 -15
- package/dist/files/project/components/drive-toolbar.d.ts +16 -2
- package/dist/files/project/components/drive-toolbar.js +14 -5
- package/dist/files/project/hooks/use-change-request-recovery.js +3 -19
- package/dist/files/project/hooks/use-change-requests.d.ts +1 -0
- package/dist/files/project/hooks/use-change-requests.js +11 -2
- package/dist/files/renderers/image-frame.d.ts +48 -0
- package/dist/files/renderers/image-frame.js +59 -0
- package/dist/files/renderers/image-renderer.d.ts +11 -1
- package/dist/files/renderers/image-renderer.js +13 -3
- package/dist/files/renderers/pdf/pdf-clipboard.d.ts +2 -0
- package/dist/files/renderers/pdf/pdf-clipboard.js +21 -0
- package/dist/files/renderers/pdf/pdf-viewer.js +4 -2
- package/dist/files/renderers/show-content-renderer.d.ts +9 -1
- package/dist/files/renderers/show-content-renderer.js +56 -14
- package/dist/files/runtime/file-source.js +2 -0
- package/dist/files/runtime/hooks/use-binary-blob.d.ts +10 -1
- package/dist/files/runtime/hooks/use-binary-blob.js +10 -4
- package/dist/files/runtime/hooks/use-shared-image.d.ts +41 -0
- package/dist/files/runtime/hooks/use-shared-image.js +177 -0
- package/dist/files/viewer/file-content-renderer.d.ts +22 -1
- package/dist/files/viewer/file-content-renderer.js +50 -7
- package/dist/files/viewer/file-header.d.ts +7 -3
- package/dist/files/viewer/file-header.js +20 -11
- package/dist/files/viewer/file-preview-modal.d.ts +1 -1
- package/dist/files/viewer/file-preview-modal.js +10 -22
- package/dist/files/viewer/file-source.d.ts +13 -0
- package/dist/files/viewer/use-file-content-state.d.ts +2 -0
- package/dist/files/viewer/use-file-content-state.js +28 -10
- package/dist/files/viewer/viewer-actions.d.ts +3 -1
- package/dist/files/viewer/viewer-actions.js +2 -2
- package/dist/hooks/use-media-query.d.ts +1 -0
- package/dist/hooks/use-mobile.d.ts +5 -0
- package/dist/hooks/use-mobile.js +8 -0
- package/dist/i18n/en.d.ts +1062 -85
- package/dist/i18n/en.js +1078 -101
- package/dist/i18n/ui-catalog/localize-ui-catalog.js +4 -0
- package/dist/i18n/ui-catalog/remaining-ui-translation-keys.generated.js +15 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/internal/account-hub/account-settings-sidebar.js +1 -1
- package/dist/internal/account-hub/hub-sheet.d.ts +9 -1
- package/dist/internal/account-hub/hub-sheet.js +21 -5
- package/dist/internal/account-hub/sections.d.ts +1 -1
- package/dist/internal/account-hub/sections.js +2 -1
- package/dist/internal/apps-and-extensions/apps-modal.d.ts +9 -0
- package/dist/internal/apps-and-extensions/apps-modal.js +107 -0
- package/dist/internal/auth/auth-card-shell.js +3 -3
- package/dist/internal/chrome/browser-icon.d.ts +24 -0
- package/dist/internal/chrome/browser-icon.js +58 -0
- package/dist/internal/chrome/chrome-card-state.d.ts +16 -0
- package/dist/internal/chrome/chrome-card-state.js +9 -0
- package/dist/internal/chrome/chrome-connect.d.ts +69 -0
- package/dist/internal/chrome/chrome-connect.js +178 -0
- package/dist/internal/chrome/chrome-mock.d.ts +4 -0
- package/dist/internal/chrome/chrome-mock.js +15 -0
- package/dist/internal/chrome/chrome-names.d.ts +15 -0
- package/dist/internal/chrome/chrome-names.js +35 -0
- package/dist/internal/chrome/extension.d.ts +47 -0
- package/dist/internal/chrome/extension.js +91 -0
- package/dist/internal/chrome/use-chrome-offered.d.ts +11 -0
- package/dist/internal/chrome/use-chrome-offered.js +22 -0
- package/dist/internal/components/agent-mark.js +5 -2
- package/dist/internal/connector-logo/connector-logo-source.d.ts +64 -0
- package/dist/internal/connector-logo/connector-logo-source.js +49 -0
- package/dist/internal/connector-logo/connector-logo.d.ts +39 -0
- package/dist/internal/connector-logo/connector-logo.js +56 -0
- package/dist/internal/connector-logo/connector-mark-files.d.ts +11 -0
- package/dist/internal/connector-logo/connector-mark-files.js +35 -0
- package/dist/internal/files/file-read-retry.d.ts +13 -0
- package/dist/internal/files/file-read-retry.js +23 -3
- package/dist/internal/files/session-drive-files.d.ts +5 -1
- package/dist/internal/files/session-drive-files.js +7 -2
- package/dist/internal/hooks/channels/use-channels-installations.d.ts +32 -5
- package/dist/internal/hooks/channels/use-channels-installations.js +55 -7
- package/dist/internal/hooks/channels/use-email-inboxes.d.ts +19 -0
- package/dist/internal/hooks/channels/use-email-inboxes.js +48 -0
- package/dist/internal/hooks/connectors/use-add-account.js +1 -1
- package/dist/internal/hooks/index.d.ts +1 -1
- package/dist/internal/hooks/index.js +1 -1
- package/dist/internal/hooks/projects/use-new-project-session.d.ts +9 -0
- package/dist/internal/hooks/projects/use-new-project-session.js +28 -12
- package/dist/internal/hooks/use-auto-scroll.d.ts +8 -1
- package/dist/internal/hooks/use-auto-scroll.js +4 -4
- package/dist/internal/icons/edge.d.ts +5 -0
- package/dist/internal/icons/edge.js +10 -0
- package/dist/internal/icons/telegram.d.ts +5 -0
- package/dist/internal/icons/telegram.js +6 -1
- package/dist/internal/layout/nav-hover-card.d.ts +35 -0
- package/dist/internal/layout/nav-hover-card.js +84 -0
- package/dist/internal/layout/project-nav-row.d.ts +3 -1
- package/dist/internal/layout/project-nav-row.js +3 -2
- package/dist/internal/layout/project-page-header.d.ts +4 -2
- package/dist/internal/layout/project-page-header.js +4 -3
- package/dist/internal/layout/project-settings-nav.js +59 -2
- package/dist/internal/lib/browser-error-noise.d.ts +1 -1
- package/dist/internal/lib/browser-error-noise.js +1 -1
- package/dist/internal/lib/browser-noise/rules/extensions.js +17 -3
- package/dist/internal/lib/browser-noise/rules/injected-scripts.d.ts +7 -0
- package/dist/internal/lib/browser-noise/rules/injected-scripts.js +15 -0
- package/dist/internal/lib/detect-os.d.ts +43 -0
- package/dist/internal/lib/detect-os.js +70 -0
- package/dist/internal/lib/manifest-version.d.ts +1 -1
- package/dist/internal/lib/manifest-version.js +2 -2
- package/dist/internal/lib/memory-href.d.ts +16 -0
- package/dist/internal/lib/memory-href.js +46 -0
- package/dist/internal/lib/use-project-feature-flags.js +13 -9
- package/dist/internal/lib/utils/heic-convert.d.ts +1 -1
- package/dist/internal/lib/utils/heic-convert.js +3 -4
- package/dist/internal/lib/web-notifications.d.ts +20 -0
- package/dist/internal/lib/web-notifications.js +48 -4
- package/dist/internal/notifications/notification-bell.d.ts +4 -1
- package/dist/internal/notifications/notification-bell.js +2 -2
- package/dist/internal/selection/selection-bar.d.ts +2 -1
- package/dist/internal/selection/selection-bar.js +1 -1
- package/dist/internal/stores/apps-modal-store.d.ts +8 -0
- package/dist/internal/stores/apps-modal-store.js +6 -0
- package/dist/internal/stores/composer-prefill-store.d.ts +12 -5
- package/dist/internal/stores/file-preview-store.d.ts +29 -2
- package/dist/internal/stores/file-preview-store.js +19 -1
- package/dist/internal/stores/kortix-computer-store.js +3 -0
- package/dist/internal/stores/sidebar-nav-store.d.ts +1 -1
- package/dist/internal/stores/sidebar-nav-store.js +3 -1
- package/dist/lib/routes.d.ts +13 -1
- package/dist/lib/routes.js +13 -0
- package/dist/markdown/index.d.ts +2 -1
- package/dist/markdown/index.js +2 -1
- package/dist/markdown/setup-links/approval-decision.d.ts +1 -0
- package/dist/markdown/setup-links/approval-decision.js +9 -3
- package/dist/markdown/setup-links/connector-handshake.d.ts +3 -1
- package/dist/markdown/setup-links/connector-handshake.js +12 -10
- package/dist/markdown/setup-links/secret-intake-form.d.ts +0 -10
- package/dist/markdown/setup-links/secret-intake-form.js +1 -1
- package/dist/markdown/setup-links/show-connect-hero.d.ts +28 -0
- package/dist/markdown/setup-links/show-connect-hero.js +91 -0
- package/dist/markdown/unified-markdown.js +5 -5
- package/dist/primitives/badge.d.ts +1 -1
- package/dist/primitives/badge.js +2 -0
- package/dist/primitives/disclosure.js +14 -2
- package/dist/primitives/empty-art.d.ts +12 -0
- package/dist/primitives/empty-art.js +11 -0
- package/dist/primitives/empty-state.d.ts +2 -2
- package/dist/primitives/empty-state.js +6 -5
- package/dist/primitives/mermaid-renderer.d.ts +2 -0
- package/dist/primitives/mermaid-renderer.js +21 -15
- package/dist/primitives/resizable.js +6 -1
- package/dist/primitives/resize-seam.d.ts +11 -0
- package/dist/primitives/resize-seam.js +12 -0
- package/dist/primitives/sidebar-panel.js +4 -7
- package/dist/primitives/tabs.d.ts +14 -1
- package/dist/primitives/tabs.js +1 -1
- package/dist/providers/ui-provider.d.ts +9 -0
- package/dist/session/composer/ComposerAboveCard.d.ts +1 -1
- package/dist/session/composer/ComposerAboveCard.js +2 -2
- package/dist/session/composer/ComposerCard.d.ts +1 -1
- package/dist/session/composer/ComposerCard.js +3 -3
- package/dist/session/composer/agent-selector.d.ts +13 -1
- package/dist/session/composer/agent-selector.js +25 -5
- package/dist/session/composer/composer-agent-access.d.ts +15 -0
- package/dist/session/composer/composer-agent-access.js +27 -0
- package/dist/session/composer/composer-chat-input.d.ts +8 -2
- package/dist/session/composer/composer-chat-input.js +8 -6
- package/dist/session/composer/composer-logic.d.ts +16 -0
- package/dist/session/composer/composer-logic.js +12 -0
- package/dist/session/composer/composer-underbar.d.ts +3 -1
- package/dist/session/composer/composer-underbar.js +4 -3
- package/dist/session/composer/composer.d.ts +15 -1
- package/dist/session/composer/composer.js +19 -1
- package/dist/session/composer/draft/composer-draft.d.ts +6 -2
- package/dist/session/composer/draft/composer-draft.js +5 -1
- package/dist/session/composer/reasoning-effort-selector.js +1 -1
- package/dist/session/models/chatgpt-connection-button.d.ts +11 -0
- package/dist/session/models/chatgpt-connection-button.js +54 -0
- package/dist/session/models/model-selector.js +5 -2
- package/dist/session/models/use-model-connection-gate.d.ts +5 -5
- package/dist/session/models/use-model-connection-gate.js +5 -5
- package/dist/session/outcomes/jump-to-outcome.d.ts +10 -0
- package/dist/session/outcomes/jump-to-outcome.js +11 -0
- package/dist/session/outcomes/session-outcomes-bridge.d.ts +14 -0
- package/dist/session/outcomes/session-outcomes-bridge.js +12 -0
- package/dist/session/outcomes/session-outcomes-provider.d.ts +3 -1
- package/dist/session/outcomes/session-outcomes-provider.js +33 -3
- package/dist/session/panel/easy/app-preview.d.ts +10 -0
- package/dist/session/panel/easy/app-preview.js +31 -12
- package/dist/session/panel/easy/change-requests-card.d.ts +7 -0
- package/dist/session/panel/easy/change-requests-card.js +17 -0
- package/dist/session/panel/easy/easy-panel-logic.js +7 -1
- package/dist/session/panel/easy/easy-panel.js +5 -2
- package/dist/session/panel/easy/file-preview.js +1 -1
- package/dist/session/panel/easy/outputs-card.d.ts +2 -1
- package/dist/session/panel/easy/outputs-card.js +3 -2
- package/dist/session/panel/mobile-tool-drawer.js +7 -1
- package/dist/session/panel/session-audit-panel.js +9 -2
- package/dist/session/panel/session-audit-shared.js +3 -1
- package/dist/session/panel/session-detail-panel.js +9 -3
- package/dist/session/panel/session-files-explorer.d.ts +9 -0
- package/dist/session/panel/session-files-explorer.js +12 -3
- package/dist/session/panel/session-panel-provider.d.ts +15 -1
- package/dist/session/panel/session-panel-provider.js +32 -7
- package/dist/session/panel/shared/derive-panels.d.ts +8 -1
- package/dist/session/panel/shared/derive-panels.js +12 -2
- package/dist/session/panel/shared/output-priority.js +2 -0
- package/dist/session/participants/session-participants.d.ts +8 -2
- package/dist/session/participants/session-participants.js +11 -4
- package/dist/session/prompts/approval-request.d.ts +5 -0
- package/dist/session/prompts/approval-request.js +9 -1
- package/dist/session/prompts/session-approval-review.d.ts +9 -0
- package/dist/session/prompts/session-approval-review.js +18 -0
- package/dist/session/status/session-error-banner.js +2 -49
- package/dist/session/status/session-starting-loader.d.ts +14 -2
- package/dist/session/status/session-starting-loader.js +16 -4
- package/dist/session/thread/after-first-prompt.d.ts +7 -0
- package/dist/session/thread/after-first-prompt.js +8 -0
- package/dist/session/thread/detect-command.d.ts +12 -0
- package/dist/session/thread/detect-command.js +20 -0
- package/dist/session/thread/session-chat.d.ts +3 -1
- package/dist/session/thread/session-chat.js +377 -252
- package/dist/session/thread/session-thread.d.ts +15 -1
- package/dist/session/thread/session-thread.js +20 -3
- package/dist/session/thread/session-transcript-class.d.ts +5 -1
- package/dist/session/thread/session-transcript-class.js +5 -1
- package/dist/session/thread/thread-boot-rows.d.ts +36 -0
- package/dist/session/thread/thread-boot-rows.js +89 -0
- package/dist/session/thread/transcript-rows.d.ts +31 -0
- package/dist/session/thread/transcript-rows.js +3 -0
- package/dist/session/thread/transcript.d.ts +0 -9
- package/dist/session/thread/transcript.js +104 -19
- package/dist/session/tool/shared/infrastructure-contexts.d.ts +28 -0
- package/dist/session/tool/shared/infrastructure-contexts.js +31 -3
- package/dist/session/tool/tool-part-renderer.d.ts +5 -4
- package/dist/session/tool/tool-part-renderer.js +8 -3
- package/dist/session/tool/tools/bash-tool.js +7 -6
- package/dist/session/tool/tools/channel-send-card.d.ts +1 -2
- package/dist/session/tool/tools/channel-send.d.ts +2 -1
- package/dist/session/tool/tools/codemode-tool.js +1 -1
- package/dist/session/tool/tools/connector-tools.js +1 -1
- package/dist/session/tool/tools/image-gen-tool.d.ts +1 -1
- package/dist/session/tool/tools/image-gen-tool.js +241 -53
- package/dist/session/tool/tools/show-tool.js +19 -8
- package/dist/session/turn/channel-brand.d.ts +8 -3
- package/dist/session/turn/channel-brand.js +20 -4
- package/dist/session/turn/message-author.d.ts +8 -0
- package/dist/session/turn/message-author.js +24 -0
- package/dist/session/turn/message-row.d.ts +52 -0
- package/dist/session/turn/message-row.js +44 -0
- package/dist/session/turn/plan-anchor.d.ts +1 -1
- package/dist/session/turn/plan-anchor.js +1 -1
- package/dist/session/turn/user-message.d.ts +14 -6
- package/dist/session/turn/user-message.js +35 -15
- package/dist/styles.css +1 -1
- package/dist/workspace/home/access-requests-bell.d.ts +9 -2
- package/dist/workspace/home/access-requests-bell.js +20 -6
- package/dist/workspace/home/first-chat.d.ts +8 -21
- package/dist/workspace/home/first-chat.js +22 -72
- package/dist/workspace/index.d.ts +6 -0
- package/dist/workspace/index.js +6 -0
- package/dist/workspace/layout/project-home.d.ts +14 -2
- package/dist/workspace/layout/project-home.js +60 -21
- package/dist/workspace/layout/use-project-home-send.d.ts +9 -1
- package/dist/workspace/layout/use-project-home-send.js +82 -3
- package/dist/workspace/memory/body-doc.d.ts +17 -0
- package/dist/workspace/memory/body-doc.js +208 -0
- package/dist/workspace/memory/body-extensions.d.ts +38 -0
- package/dist/workspace/memory/body-extensions.js +103 -0
- package/dist/workspace/memory/company-memory-page.d.ts +8 -0
- package/dist/workspace/memory/company-memory-page.js +16 -0
- package/dist/workspace/memory/memory-all.d.ts +20 -0
- package/dist/workspace/memory/memory-all.js +27 -0
- package/dist/workspace/memory/memory-body.d.ts +19 -0
- package/dist/workspace/memory/memory-body.js +139 -0
- package/dist/workspace/memory/memory-empty.d.ts +13 -0
- package/dist/workspace/memory/memory-empty.js +28 -0
- package/dist/workspace/memory/memory-history.d.ts +27 -0
- package/dist/workspace/memory/memory-history.js +108 -0
- package/dist/workspace/memory/memory-labels.d.ts +16 -0
- package/dist/workspace/memory/memory-labels.js +47 -0
- package/dist/workspace/memory/memory-page-list.d.ts +34 -0
- package/dist/workspace/memory/memory-page-list.js +156 -0
- package/dist/workspace/memory/memory-reader.d.ts +58 -0
- package/dist/workspace/memory/memory-reader.js +123 -0
- package/dist/workspace/memory/memory-view.d.ts +21 -0
- package/dist/workspace/memory/memory-view.js +124 -0
- package/dist/workspace/memory/remember-popover.d.ts +19 -0
- package/dist/workspace/memory/remember-popover.js +61 -0
- package/dist/workspace/memory/remember-this.d.ts +12 -0
- package/dist/workspace/memory/remember-this.js +89 -0
- package/dist/workspace/memory/source-mark.d.ts +18 -0
- package/dist/workspace/memory/source-mark.js +79 -0
- package/dist/workspace/memory/used-memory-chip.d.ts +14 -0
- package/dist/workspace/memory/used-memory-chip.js +61 -0
- package/dist/workspace/new/advanced-fields.d.ts +2 -1
- package/dist/workspace/new/advanced-fields.js +2 -2
- package/dist/workspace/new/source-param.d.ts +1 -1
- package/dist/workspace/new/source-param.js +3 -1
- package/dist/workspace/new/use-create-workspace.d.ts +8 -10
- package/dist/workspace/new/use-create-workspace.js +3 -3
- package/dist/workspace/projects/onboarding/app-logo.d.ts +7 -2
- package/dist/workspace/projects/onboarding/app-logo.js +6 -13
- package/dist/workspace/projects/policies-panel.js +5 -3
- package/dist/workspace/review/review-actions.d.ts +4 -2
- package/dist/workspace/review/review-actions.js +8 -2
- package/dist/workspace/review/review-center.js +11 -7
- package/dist/workspace/review/review-detail.d.ts +10 -0
- package/dist/workspace/review/review-detail.js +101 -13
- package/dist/workspace/saved-session-skeleton.d.ts +2 -2
- package/dist/workspace/saved-session-skeleton.js +3 -3
- package/dist/workspace/session-workspace.js +15 -13
- package/dist/workspace/sessions/project-sessions-view.js +3 -2
- package/dist/workspace/sessions/session-label-badges.js +2 -1
- package/dist/workspace/sessions/sessions-toolbar.d.ts +3 -1
- package/dist/workspace/sessions/sessions-toolbar.js +2 -2
- package/dist/workspace/sidebar/footer/project-apps-nav.d.ts +5 -0
- package/dist/workspace/sidebar/footer/project-apps-nav.js +41 -2
- package/dist/workspace/sidebar/footer/project-artifacts-nav.d.ts +6 -0
- package/dist/workspace/sidebar/footer/project-artifacts-nav.js +22 -0
- package/dist/workspace/sidebar/footer/project-chrome-nav.d.ts +10 -0
- package/dist/workspace/sidebar/footer/project-chrome-nav.js +56 -0
- package/dist/workspace/sidebar/footer/project-manifest-upgrade-alert.js +13 -13
- package/dist/workspace/sidebar/footer/project-memory-nav.d.ts +7 -0
- package/dist/workspace/sidebar/footer/project-memory-nav.js +19 -0
- package/dist/workspace/sidebar/nav-row-meta.js +14 -2
- package/dist/workspace/sidebar/project-nav-items.js +3 -0
- package/dist/workspace/sidebar/project-session-list.js +68 -56
- package/dist/workspace/sidebar/project-sidebar.js +13 -2
- package/dist/workspace/sidebar/project-spaces-nav.d.ts +8 -0
- package/dist/workspace/sidebar/project-spaces-nav.js +69 -0
- package/dist/workspace/sidebar/session-group-order.d.ts +9 -0
- package/dist/workspace/sidebar/session-group-order.js +25 -0
- package/dist/workspace/sidebar/session-group-sections.d.ts +62 -0
- package/dist/workspace/sidebar/session-group-sections.js +267 -0
- package/dist/workspace/sidebar/session-list-chrome.d.ts +28 -0
- package/dist/workspace/sidebar/session-list-chrome.js +50 -0
- package/dist/workspace/spaces/channel-glyph.d.ts +5 -0
- package/dist/workspace/spaces/channel-glyph.js +6 -0
- package/dist/workspace/spaces/channel-setup.d.ts +16 -0
- package/dist/workspace/spaces/channel-setup.js +105 -0
- package/dist/workspace/spaces/channels-onboarding.d.ts +13 -0
- package/dist/workspace/spaces/channels-onboarding.js +37 -0
- package/dist/workspace/spaces/create-channel-dialog.d.ts +16 -0
- package/dist/workspace/spaces/create-channel-dialog.js +158 -0
- package/dist/workspace/spaces/private-channels-not-in.d.ts +9 -0
- package/dist/workspace/spaces/private-channels-not-in.js +69 -0
- package/dist/workspace/spaces/space-agents.d.ts +10 -0
- package/dist/workspace/spaces/space-agents.js +10 -0
- package/dist/workspace/spaces/space-details-dialog.d.ts +20 -0
- package/dist/workspace/spaces/space-details-dialog.js +176 -0
- package/dist/workspace/spaces/space-link-label.d.ts +49 -0
- package/dist/workspace/spaces/space-link-label.js +73 -0
- package/dist/workspace/spaces/space-links.d.ts +19 -0
- package/dist/workspace/spaces/space-links.js +230 -0
- package/dist/workspace/spaces/space-members.d.ts +46 -0
- package/dist/workspace/spaces/space-members.js +182 -0
- package/dist/workspace/spaces/space-roster.d.ts +15 -0
- package/dist/workspace/spaces/space-roster.js +44 -0
- package/dist/workspace/spaces/space-threads-tab.d.ts +56 -0
- package/dist/workspace/spaces/space-threads-tab.js +156 -0
- package/dist/workspace/spaces/space-timeline-view.d.ts +254 -0
- package/dist/workspace/spaces/space-timeline-view.js +235 -0
- package/dist/workspace/spaces/space-timeline.d.ts +106 -0
- package/dist/workspace/spaces/space-timeline.js +183 -0
- package/dist/workspace/spaces/space-triggers.d.ts +13 -0
- package/dist/workspace/spaces/space-triggers.js +78 -0
- package/dist/workspace/spaces/space-view.d.ts +37 -0
- package/dist/workspace/spaces/space-view.js +436 -0
- package/package.json +67 -36
- package/skills/kortix-ui/SKILL.md +3 -3
- package/skills/kortix-ui/references/custom-dashboard.md +3 -3
- package/skills/kortix-ui/references/modules.md +29 -5
- package/skills/kortix-ui/references/theming.md +1 -1
- package/dist/customize/connectors/catalog/merge-search.d.ts +0 -10
- package/dist/customize/connectors/catalog/merge-search.js +0 -26
- package/dist/customize/connectors/detail/find-easy-connect-app.d.ts +0 -29
- package/dist/customize/connectors/detail/find-easy-connect-app.js +0 -22
- package/dist/customize/migrate-to-v2/use-migrate-to-v2.d.ts +0 -9
- package/dist/customize/migrate-to-v2/use-migrate-to-v2.js +0 -24
- package/dist/customize/sections/connector-connection-header.d.ts +0 -36
- package/dist/customize/sections/connector-connection-header.js +0 -33
- package/dist/customize/sections/connector-connection-modal.d.ts +0 -34
- package/dist/customize/sections/connector-connection-modal.js +0 -72
- package/dist/customize/sections/discover-catalogue-card.d.ts +0 -19
- package/dist/customize/sections/discover-catalogue-card.js +0 -26
- package/dist/customize/sections/discover-catalogue-detail.d.ts +0 -15
- package/dist/customize/sections/discover-catalogue-detail.js +0 -24
- package/dist/customize/sections/discover-catalogue.d.ts +0 -17
- package/dist/customize/sections/discover-catalogue.js +0 -132
- package/dist/customize/sections/llm-provider/provider-access-menu.d.ts +0 -10
- package/dist/customize/sections/llm-provider/provider-access-menu.js +0 -23
- package/dist/files/project/components/drive-empty-art.d.ts +0 -2
- package/dist/files/project/components/drive-empty-art.js +0 -5
- package/dist/internal/hooks/use-media-query.d.ts +0 -2
- package/dist/internal/share/public-share-link-button.d.ts +0 -14
- package/dist/internal/share/public-share-link-button.js +0 -17
- package/dist/markdown/setup-links/app-credentials-form.d.ts +0 -12
- package/dist/markdown/setup-links/app-credentials-form.js +0 -115
- /package/dist/{internal/hooks → hooks}/use-media-query.js +0 -0
|
@@ -12,7 +12,7 @@ import { OutcomeTitle } from '../../internal/auth/auth-consent.js';
|
|
|
12
12
|
import { Rise, StepHeader } from '../../internal/auth/auth-primitives.js';
|
|
13
13
|
import { useTranslations } from '../../i18n/index.js';
|
|
14
14
|
import { getApprovalLink, resolveApproval } from '@kortix/sdk';
|
|
15
|
-
import { CheckCircleIcon, ClockIcon, EyeIcon, MinusCircleIcon, PencilSimpleIcon, UserIcon, WarningIcon, XCircleIcon, } from '@phosphor-icons/react';
|
|
15
|
+
import { CheckCircleIcon, ClockIcon, EyeIcon, MinusCircleIcon, PencilSimpleIcon, ShieldCheckIcon, UserIcon, WarningIcon, XCircleIcon, } from '@phosphor-icons/react';
|
|
16
16
|
import { UiLink as Link, useUiRouter } from '../../providers/ui-provider.js';
|
|
17
17
|
import { useEffect, useState } from 'react';
|
|
18
18
|
import { isApprovalExpiredError } from '../../internal/lib/approval-expired.js';
|
|
@@ -46,6 +46,7 @@ export function approvalIdentity(details) {
|
|
|
46
46
|
connector: details.connector_name ??
|
|
47
47
|
(details.connector ? details.connector.charAt(0).toUpperCase() + details.connector.slice(1) : null),
|
|
48
48
|
action: actionLabel(details.action),
|
|
49
|
+
slug: details.connector ?? null,
|
|
49
50
|
iconUrl: connectorLogoUrl(details),
|
|
50
51
|
};
|
|
51
52
|
}
|
|
@@ -202,6 +203,7 @@ export function ApprovalDecisionPanel({ details, outcome, busyDecision, error, o
|
|
|
202
203
|
const tI18nComplete = useTranslations('hardcodedUi.i18nComplete');
|
|
203
204
|
const tHardcodedUi = useTranslations('hardcodedUi');
|
|
204
205
|
const t = useTranslations('hardcodedUi.approvalPage');
|
|
206
|
+
const tSets = useTranslations('connectorPolicySets');
|
|
205
207
|
const priorityWord = useIssuePriorityWord();
|
|
206
208
|
const now = useClock();
|
|
207
209
|
const expiresAt = Date.parse(details.expires_at);
|
|
@@ -213,7 +215,9 @@ export function ApprovalDecisionPanel({ details, outcome, busyDecision, error, o
|
|
|
213
215
|
const reviewable = approvalReviewable(details.args_preview, details.review_complete, details.resolved_preview);
|
|
214
216
|
const label = resolvedLabel({
|
|
215
217
|
status: expired ? 'expired' : details.status,
|
|
216
|
-
resolution:
|
|
218
|
+
resolution:
|
|
219
|
+
// `approved`: Kortix runs the held call; `ok`: an approve the caller repeats.
|
|
220
|
+
!details.pending && (details.status === 'ok' || details.status === 'approved')
|
|
217
221
|
? 'approve'
|
|
218
222
|
: !details.pending && details.status === 'denied'
|
|
219
223
|
? 'deny'
|
|
@@ -316,7 +320,9 @@ export function ApprovalDecisionPanel({ details, outcome, busyDecision, error, o
|
|
|
316
320
|
const risk = details.risk === 'destructive' ? (_jsx(FactRow, { icon: _jsx(WarningIcon, { "aria-hidden": true, className: "text-kortix-red size-4" }), children: t('riskDestructive') })) : details.risk === 'write' ? (_jsx(FactRow, { icon: _jsx(PencilSimpleIcon, { "aria-hidden": true, className: "text-foreground size-4" }), children: t('riskWrite', { action: (readable ?? details.action).toLowerCase() }) })) : details.risk === 'read' ? (_jsx(FactRow, { icon: _jsx(EyeIcon, { "aria-hidden": true, className: "text-foreground size-4" }), children: t('riskRead') })) : null;
|
|
317
321
|
const decidable = details.pending && !resolved && !!onDecision;
|
|
318
322
|
const footer = error || expired || decidable || waiting;
|
|
319
|
-
return (_jsxs(Rise, { children: [_jsxs("div", { className: "flex flex-col gap-3 px-5 pt-5 pb-4", children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsxs("div", { className: "flex min-w-0 items-center gap-3", title: details.action, children: [_jsx(ConnectorAppMark, { name: connectorName ?? details.action, iconUrl: connectorLogoUrl(details), size: "md" }), _jsxs("div", { className: "flex min-w-0 flex-col", children: [_jsx("p", { className: "text-foreground truncate text-sm leading-5 font-medium", children: connectorName ?? readable ?? details.action }), connectorName ? (_jsx("p", { className: "text-muted-foreground truncate text-xs leading-4", children: readable ?? details.action })) : null] })] }), chip] }), _jsx("h2", { className: "text-foreground text-xl leading-snug font-semibold wrap-anywhere", children: headline }), _jsx(ApprovalAgentContext, { quote: true, context: details.approval_context })] }), showsPreview ? (_jsx("div", { className: "px-5", children: _jsx(ApprovalParameters, { native: true, action: details.action, argsPreview: details.args_preview, reviewComplete: details.review_complete !== false, resolvedPreview: details.resolved_preview, resolvedError: details.resolved_error, className: "overflow-hidden rounded-lg border" }) })) : null, _jsxs("div", { className: cn('flex flex-col gap-2 px-5 pb-4', showsPreview && 'pt-4'), children: [risk,
|
|
323
|
+
return (_jsxs(Rise, { children: [_jsxs("div", { className: "flex flex-col gap-3 px-5 pt-5 pb-4", children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsxs("div", { className: "flex min-w-0 items-center gap-3", title: details.action, children: [_jsx(ConnectorAppMark, { name: connectorName ?? details.action, slug: details.connector, iconUrl: connectorLogoUrl(details), size: "md" }), _jsxs("div", { className: "flex min-w-0 flex-col", children: [_jsx("p", { className: "text-foreground truncate text-sm leading-5 font-medium", children: connectorName ?? readable ?? details.action }), connectorName ? (_jsx("p", { className: "text-muted-foreground truncate text-xs leading-4", children: readable ?? details.action })) : null] })] }), chip] }), _jsx("h2", { className: "text-foreground text-xl leading-snug font-semibold wrap-anywhere", children: headline }), _jsx(ApprovalAgentContext, { quote: true, context: details.approval_context })] }), showsPreview ? (_jsx("div", { className: "px-5", children: _jsx(ApprovalParameters, { native: true, action: details.action, argsPreview: details.args_preview, reviewComplete: details.review_complete !== false, resolvedPreview: details.resolved_preview, resolvedError: details.resolved_error, className: "overflow-hidden rounded-lg border" }) })) : null, _jsxs("div", { className: cn('flex flex-col gap-2 px-5 pb-4', showsPreview && 'pt-4'), children: [risk, details.policy_set ? (_jsx(FactRow, { muted: true, icon: _jsx(ShieldCheckIcon, { "aria-hidden": true, className: "text-muted-foreground size-4" }), children: details.agent
|
|
324
|
+
? tSets('approvalSetAgent', { agent: details.agent, set: details.policy_set })
|
|
325
|
+
: tSets('approvalSet', { set: details.policy_set }) })) : null, _jsxs(FactRow, { muted: true, icon: _jsx(UserIcon, { "aria-hidden": true, className: "text-muted-foreground size-4" }), children: [asked, expiresWhen ? ` · ${t('expiresAt', { when: expiresWhen })}` : null] })] }), footer ? (_jsxs("div", { className: "border-border flex flex-col gap-3 border-t px-5 pt-4 pb-5", children: [error ? (_jsx(Alert, { variant: "destructive", children: _jsx(AlertDescription, { children: error }) })) : null, expired ? (_jsxs(_Fragment, { children: [_jsx(Alert, { children: _jsx(AlertDescription, { children: tHardcodedUi('approvalPage.expiredHint') }) }), onDecision ? (_jsx(ApprovalDecisionActions, { onDecision: onDecision, disabled: true, sessionId: details.session_id, notePlaceholder: agent ? t('notePlaceholder', { agent }) : t('notePlaceholderAgent'), approveLabel: approveLabel, noteMinHeight: 80, className: "border-0 p-0" })) : null] })) : decidable && onDecision ? (_jsxs(_Fragment, { children: [reviewable ? null : (_jsx(Alert, { variant: "warning", children: _jsx(AlertDescription, { children: previewAuthorized
|
|
320
326
|
? tI18nComplete.raw('text7c4a3e7e2251')
|
|
321
327
|
: tI18nComplete.raw('textf7873b149941') }) })), _jsx(ApprovalDecisionActions, { onDecision: onDecision, busyDecision: busyDecision, approvable: reviewable, sessionId: details.session_id, notePlaceholder: agent ? t('notePlaceholder', { agent }) : t('notePlaceholderAgent'), approveLabel: approveLabel, noteMinHeight: 80, className: "border-0 p-0" })] })) : waiting ? (_jsx(ApprovalWaitingNotice, { dense: true, resolvers: resolvers })) : null] })) : null] }));
|
|
322
328
|
}
|
|
@@ -19,8 +19,10 @@ declare const TILE_SIZE: {
|
|
|
19
19
|
* not contain it: WebKit skips a rounded overflow clip for a composited child
|
|
20
20
|
* (the card animates in), and the logo's square corners painted past the edge.
|
|
21
21
|
*/
|
|
22
|
-
export declare function ConnectorAppMark({ name, iconUrl, size, }: {
|
|
22
|
+
export declare function ConnectorAppMark({ name: _name, slug, iconUrl, size, }: {
|
|
23
23
|
name: string;
|
|
24
|
+
/** The connector's slug, so a Kortix-built connector shows its own mark. */
|
|
25
|
+
slug?: string | null;
|
|
24
26
|
iconUrl: string | null | undefined;
|
|
25
27
|
size?: keyof typeof TILE_SIZE;
|
|
26
28
|
}): React.JSX.Element;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
3
|
+
import { ConnectorLogo } from '../../internal/connector-logo/connector-logo.js';
|
|
4
4
|
import { KortixLogo } from '../../primitives/kortix-logo.js';
|
|
5
5
|
import { Skeleton } from '../../primitives/skeleton.js';
|
|
6
6
|
import { cn } from '../../lib/utils.js';
|
|
7
7
|
import { CheckIcon } from '@phosphor-icons/react';
|
|
8
|
-
import { useState } from 'react';
|
|
9
8
|
/**
|
|
10
9
|
* The logo tile is white in both themes. Catalogue logos are third-party art
|
|
11
10
|
* drawn for a white ground: on the dark `bg-popover` a black glyph (Notion,
|
|
@@ -13,6 +12,8 @@ import { useState } from 'react';
|
|
|
13
12
|
* exception, kept here as a named constant rather than inline.
|
|
14
13
|
*/
|
|
15
14
|
const LOGO_TILE_BACKGROUND = 'bg-white';
|
|
15
|
+
/** The Kortix tile is the light variant in both themes: white ground, black mark, no edge. */
|
|
16
|
+
const KORTIX_TILE_COLORS = 'bg-white text-black';
|
|
16
17
|
const TILE_SIZE = {
|
|
17
18
|
xl: 'size-14 rounded-xl',
|
|
18
19
|
lg: 'size-10 rounded-md',
|
|
@@ -41,15 +42,13 @@ function HandshakeTile({ size, className, children, }) {
|
|
|
41
42
|
* not contain it: WebKit skips a rounded overflow clip for a composited child
|
|
42
43
|
* (the card animates in), and the logo's square corners painted past the edge.
|
|
43
44
|
*/
|
|
44
|
-
export function ConnectorAppMark({ name, iconUrl, size = 'md', }) {
|
|
45
|
-
|
|
46
|
-
if (iconUrl === undefined) {
|
|
45
|
+
export function ConnectorAppMark({ name: _name, slug, iconUrl, size = 'md', }) {
|
|
46
|
+
if (iconUrl === undefined && !slug) {
|
|
47
47
|
return _jsx(Skeleton, { "aria-hidden": true, className: cn('shrink-0 py-0', TILE_SIZE[size]) });
|
|
48
48
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
return (_jsx(HandshakeTile, { size: size, className: LOGO_TILE_BACKGROUND, children: _jsx("img", { src: iconUrl, alt: "", referrerPolicy: "no-referrer", draggable: false, onError: () => setBroken(true), className: cn('size-full object-contain select-none', TILE_SIZE[size]) }) }));
|
|
49
|
+
// The one connector logo (`ConnectorLogo`), so a connect card, an approval and the
|
|
50
|
+
// connector's own page show the same mark.
|
|
51
|
+
return _jsx(ConnectorLogo, { source: { slug, icon: iconUrl ?? null }, size: size });
|
|
53
52
|
}
|
|
54
53
|
/** The Kortix glyph inside its tile, per tile size. */
|
|
55
54
|
const KORTIX_MARK_PX = { md: 14, lg: 18, xl: 24 };
|
|
@@ -67,5 +66,8 @@ const KORTIX_MARK_PX = { md: 14, lg: 18, xl: 24 };
|
|
|
67
66
|
* away and the app logo alone leads, which gives the title the room it needs.
|
|
68
67
|
*/
|
|
69
68
|
export function ConnectorHandshake({ name, iconUrl, connected = false, size = 'md', collapsible = true, mark, }) {
|
|
70
|
-
return (_jsxs("span", { className: cn('flex shrink-0 items-center', size === 'xl' ? 'gap-3' : 'gap-1.5'), "aria-hidden": true, children: [_jsx(HandshakeTile, { size: size, className: cn(
|
|
69
|
+
return (_jsxs("span", { className: cn('flex shrink-0 items-center', size === 'xl' ? 'gap-3' : 'gap-1.5'), "aria-hidden": true, children: [_jsx(HandshakeTile, { size: size, className: cn(KORTIX_TILE_COLORS, collapsible && 'hidden @md/connect:flex'), children: _jsx(KortixLogo, { variant: "icon", size: KORTIX_MARK_PX[size] }) }), _jsxs("svg", { width: size === 'xl' ? 36 : 24, height: size === 'xl' ? 9 : 6, viewBox: "0 0 24 6", className: cn('text-muted-foreground shrink-0', collapsible && 'hidden @md/connect:block'), fill: "currentColor", children: [_jsx("circle", { cx: "2", cy: "3", r: "1", opacity: "0.3" }), _jsx("circle", { cx: "7", cy: "3", r: "1.25", opacity: "0.7" }), _jsx("circle", { cx: "12", cy: "3", r: "1.75" }), _jsx("circle", { cx: "17", cy: "3", r: "1.25", opacity: "0.7" }), _jsx("circle", { cx: "22", cy: "3", r: "1", opacity: "0.3" })] }), _jsxs("span", { className: "relative flex", children: [mark ? (_jsx(HandshakeTile, { size: size, className: cn(LOGO_TILE_BACKGROUND, 'ring-border ring-1 ring-inset'), children: mark })) : (
|
|
70
|
+
// A white ground behind the bare logo, so a black glyph (GitHub,
|
|
71
|
+
// Notion) stays visible on a dark surface.
|
|
72
|
+
_jsx("span", { className: cn(iconUrl !== undefined && LOGO_TILE_BACKGROUND, 'flex', TILE_SIZE[size]), children: _jsx(ConnectorAppMark, { name: name, iconUrl: iconUrl, size: size }) })), connected ? (_jsx("span", { className: "bg-kortix-green ring-background absolute -right-1 -bottom-1 flex size-3.5 items-center justify-center rounded-full ring-2", children: _jsx(CheckIcon, { weight: "bold", className: "text-background size-2" }) })) : null] })] }));
|
|
71
73
|
}
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
import type { OutcomeTone } from '../../internal/outcomes/outcome-types.js';
|
|
2
|
-
import { type Icon } from '@phosphor-icons/react';
|
|
3
|
-
import { type ReactElement } from 'react';
|
|
4
|
-
/** Every phase that is not the form: tinted tile, title, one muted line. */
|
|
5
|
-
export declare function StatusNotice({ icon: Glyph, tone, title, description, }: {
|
|
6
|
-
icon: Icon;
|
|
7
|
-
tone: OutcomeTone;
|
|
8
|
-
title: string;
|
|
9
|
-
description?: string;
|
|
10
|
-
}): ReactElement;
|
|
11
1
|
/**
|
|
12
2
|
* Renders the fields an agent-minted secret link asks for, and submits the
|
|
13
3
|
* values the human types. Shared by the public /secret-intake/[token] page and
|
|
@@ -14,7 +14,7 @@ import { Fragment, useEffect, useState } from 'react';
|
|
|
14
14
|
import { classifySetupLinkError, describeLinkExpiry, describeWithheldSecrets, splitTextLinks, } from './util.js';
|
|
15
15
|
import { setupLinkApiBase } from './api-base.js';
|
|
16
16
|
/** Every phase that is not the form: tinted tile, title, one muted line. */
|
|
17
|
-
|
|
17
|
+
function StatusNotice({ icon: Glyph, tone, title, description, }) {
|
|
18
18
|
const tint = outcomeTint(tone);
|
|
19
19
|
return (_jsxs("div", { role: "status", className: "flex flex-col items-center gap-3 py-8 text-center", children: [_jsx("span", { className: cn('flex size-9 items-center justify-center rounded-sm ring-1', tint.ring, tint.bg), children: _jsx(Glyph, { weight: "fill", className: cn('size-5', tint.fg) }) }), _jsxs("div", { className: "max-w-xs space-y-1", children: [_jsx("p", { className: "text-foreground text-sm font-medium", children: title }), description ? (_jsx("p", { className: "text-muted-foreground text-xs text-pretty", children: description })) : null] })] }));
|
|
20
20
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type ShowConnectTarget = {
|
|
3
|
+
kind: 'kortix';
|
|
4
|
+
token: string;
|
|
5
|
+
} | {
|
|
6
|
+
kind: 'provider';
|
|
7
|
+
host: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* A `show` URL that is a connect step, not a page: a Kortix link, a provider's
|
|
11
|
+
* sign-in page, or any URL the agent titled "Connect <app>". A connection URL
|
|
12
|
+
* never falls back to the plain link card.
|
|
13
|
+
*/
|
|
14
|
+
export declare function showConnectTarget(url: string, title?: string): ShowConnectTarget | null;
|
|
15
|
+
/**
|
|
16
|
+
* The `show` panel for a connect URL (Paper, "Show tool · connect URL panel" 01):
|
|
17
|
+
* the Kortix ··· app handshake, one title, the agent's sentence, one action.
|
|
18
|
+
*
|
|
19
|
+
* A Kortix link opens the host's connect dialog in place and turns into the
|
|
20
|
+
* connected record once the account lands. A provider page opens in a sign-in
|
|
21
|
+
* window; its app comes from the agent's title, never the provider's favicon.
|
|
22
|
+
*/
|
|
23
|
+
export declare function ShowConnectHero({ url, target, title, description, }: {
|
|
24
|
+
url: string;
|
|
25
|
+
target: ShowConnectTarget;
|
|
26
|
+
title: string;
|
|
27
|
+
description: string;
|
|
28
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { LockSimpleIcon } from '@phosphor-icons/react';
|
|
4
|
+
import { useCallback, useState } from 'react';
|
|
5
|
+
import { useLocalizedUiCatalog } from '../../i18n/ui-catalog/use-localized-ui-catalog.js';
|
|
6
|
+
import { Button } from '../../primitives/button.js';
|
|
7
|
+
import { useUiComponents } from '../../providers/ui-provider.js';
|
|
8
|
+
import { ConnectorHandshake } from './connector-handshake.js';
|
|
9
|
+
import { connectorHeadline, useConnectorLinkInfo } from './connector-link-info.js';
|
|
10
|
+
import { onSetupLinkModalClose } from './setup-link-close-finalize.js';
|
|
11
|
+
import { parseSetupLinkHref } from './util.js';
|
|
12
|
+
const COPY = {
|
|
13
|
+
title: 'Connect {app}',
|
|
14
|
+
connectedTitle: '{app} connected',
|
|
15
|
+
connectedDescription: 'Your agent can use {app} now and continues on its own.',
|
|
16
|
+
connect: 'Connect {app}',
|
|
17
|
+
view: 'View',
|
|
18
|
+
trust: 'You sign in on {app}. Kortix never sees your password.',
|
|
19
|
+
secureHost: 'Secure sign-in at {host}',
|
|
20
|
+
fallbackApp: 'the app',
|
|
21
|
+
};
|
|
22
|
+
/** Provider-hosted sign-in pages an agent may show instead of a Kortix link. */
|
|
23
|
+
const PROVIDER_HOSTS = /(^|\.)(composio\.dev|pipedream\.com)$/i;
|
|
24
|
+
/**
|
|
25
|
+
* A `show` URL that is a connect step, not a page: a Kortix link, a provider's
|
|
26
|
+
* sign-in page, or any URL the agent titled "Connect <app>". A connection URL
|
|
27
|
+
* never falls back to the plain link card.
|
|
28
|
+
*/
|
|
29
|
+
export function showConnectTarget(url, title = '') {
|
|
30
|
+
const setup = parseSetupLinkHref(url);
|
|
31
|
+
if (setup?.kind === 'connector')
|
|
32
|
+
return { kind: 'kortix', token: setup.token };
|
|
33
|
+
let host;
|
|
34
|
+
try {
|
|
35
|
+
host = new URL(url).hostname;
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
if (PROVIDER_HOSTS.test(host) || /^connect\s+\S/i.test(title.trim())) {
|
|
41
|
+
return { kind: 'provider', host };
|
|
42
|
+
}
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
/** "Connect Snaps YouTube" → "Snaps YouTube"; the agent's own title names the app. */
|
|
46
|
+
function appFromTitle(title) {
|
|
47
|
+
return title.replace(/^connect\s+/i, '').trim();
|
|
48
|
+
}
|
|
49
|
+
function fill(template, values) {
|
|
50
|
+
return template.replace(/\{(\w+)\}/g, (_, key) => values[key] ?? '');
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* The `show` panel for a connect URL (Paper, "Show tool · connect URL panel" 01):
|
|
54
|
+
* the Kortix ··· app handshake, one title, the agent's sentence, one action.
|
|
55
|
+
*
|
|
56
|
+
* A Kortix link opens the host's connect dialog in place and turns into the
|
|
57
|
+
* connected record once the account lands. A provider page opens in a sign-in
|
|
58
|
+
* window; its app comes from the agent's title, never the provider's favicon.
|
|
59
|
+
*/
|
|
60
|
+
export function ShowConnectHero({ url, target, title, description, }) {
|
|
61
|
+
const copy = useLocalizedUiCatalog(COPY);
|
|
62
|
+
const { ConnectorConnectModal } = useUiComponents();
|
|
63
|
+
const token = target.kind === 'kortix' ? target.token : null;
|
|
64
|
+
const info = useConnectorLinkInfo(token);
|
|
65
|
+
const [settledHere, setSettledHere] = useState(false);
|
|
66
|
+
const [open, setOpen] = useState(false);
|
|
67
|
+
const headline = info ? connectorHeadline(info) : null;
|
|
68
|
+
const app = headline?.app || appFromTitle(title) || copy.fallbackApp;
|
|
69
|
+
const connected = settledHere || info?.connected === true;
|
|
70
|
+
// `undefined` while a Kortix link's info loads (skeleton tile). With no icon on
|
|
71
|
+
// the link, the catalogue logo by slug (as `approval-decision.tsx` does); a
|
|
72
|
+
// 404 there falls back to the neutral glyph inside `ConnectorLogo`.
|
|
73
|
+
const logoSlug = info?.slug || app.toLowerCase().replace(/[^a-z0-9]/g, '');
|
|
74
|
+
const iconUrl = token && info === undefined
|
|
75
|
+
? undefined
|
|
76
|
+
: (info?.icon_url ?? `https://logos.composio.dev/api/${encodeURIComponent(logoSlug)}`);
|
|
77
|
+
const inApp = token !== null && !!ConnectorConnectModal;
|
|
78
|
+
const handleSettled = useCallback(() => setSettledHere(true), []);
|
|
79
|
+
const handleOpenChange = (next) => {
|
|
80
|
+
setOpen(next);
|
|
81
|
+
if (token)
|
|
82
|
+
void onSetupLinkModalClose({ open: next, kind: 'connector', token });
|
|
83
|
+
};
|
|
84
|
+
const onAction = () => {
|
|
85
|
+
if (inApp)
|
|
86
|
+
setOpen(true);
|
|
87
|
+
else
|
|
88
|
+
window.open(url, '_blank', 'noopener,noreferrer,width=520,height=720');
|
|
89
|
+
};
|
|
90
|
+
return (_jsxs("div", { className: "flex w-full max-w-sm flex-col items-center gap-4 py-6 text-center", "data-testid": "show-connect-hero", "data-connected": connected || undefined, children: [_jsx(ConnectorHandshake, { name: app, iconUrl: iconUrl, connected: connected, size: "lg", collapsible: false }), _jsxs("div", { className: "flex flex-col gap-0.5", children: [_jsx("h3", { className: "text-foreground text-sm font-medium", children: fill(connected ? copy.connectedTitle : copy.title, { app }) }), connected || description ? (_jsx("p", { className: "text-muted-foreground text-sm font-normal text-pretty", children: connected ? fill(copy.connectedDescription, { app }) : description })) : null] }), _jsxs("div", { className: "flex flex-col items-center gap-2", children: [_jsx(Button, { size: "sm", variant: connected ? 'outline' : 'default', onClick: onAction, children: connected ? copy.view : fill(copy.connect, { app }) }), connected ? null : (_jsx("p", { className: "text-muted-foreground flex items-center gap-1.5 text-xs font-normal", children: target.kind === 'provider' ? (_jsxs(_Fragment, { children: [_jsx(LockSimpleIcon, { className: "size-3 shrink-0" }), fill(copy.secureHost, { host: target.host })] })) : (fill(copy.trust, { app })) }))] }), token && ConnectorConnectModal ? (_jsx(ConnectorConnectModal, { token: token, open: open, onOpenChange: handleOpenChange, onConnected: handleSettled, fallbackName: app })) : null] }));
|
|
91
|
+
}
|
|
@@ -107,7 +107,7 @@ export function MarkdownImage({ src, alt, flush = false, compact = false, onErro
|
|
|
107
107
|
}
|
|
108
108
|
return (_jsxs(Button, { type: "button", variant: "outline", size: "xs", title: alt || undefined, onClick: () => setLoadRequested(true), className: "text-muted-foreground max-w-full", children: [_jsx(ImageIcon, { className: "size-3.5 shrink-0" }), _jsx("span", { className: "truncate", children: label })] }));
|
|
109
109
|
}
|
|
110
|
-
return (_jsx("span", { className: cn('block', !flush && 'my-5'), children: _jsx("img", { src: resolvedSrc, alt: alt || '', loading: "lazy", onError: onError, className: "h-auto max-w-full rounded-lg outline outline-1 -outline-offset-1 outline-
|
|
110
|
+
return (_jsx("span", { className: cn('block', !flush && 'my-5'), children: _jsx("img", { src: resolvedSrc, alt: alt || '', loading: "lazy", onError: onError, className: "h-auto max-w-full rounded-lg outline outline-1 -outline-offset-1 outline-border" }) }));
|
|
111
111
|
}
|
|
112
112
|
/**
|
|
113
113
|
* Every renderer the markdown uses, defined once for the module.
|
|
@@ -131,13 +131,13 @@ const MARKDOWN_COMPONENTS = {
|
|
|
131
131
|
h4: ({ children }) => (_jsx("h4", { className: "text-foreground mt-6 mb-2 text-lg font-semibold first:mt-0", children: children })),
|
|
132
132
|
h5: ({ children }) => (_jsx("h5", { className: "text-foreground mt-4 mb-1 text-base font-semibold first:mt-0", children: children })),
|
|
133
133
|
h6: ({ children }) => (_jsx("h6", { className: "text-foreground mt-4 mb-1 text-base font-semibold tracking-wide first:mt-0", children: children })),
|
|
134
|
-
p: ({ children }) => (_jsx("div", { className: "text-foreground
|
|
135
|
-
ul: ({ children }) => (_jsx("ul", { className: "marker:text-muted-foreground
|
|
134
|
+
p: ({ children }) => (_jsx("div", { className: "text-foreground my-4 leading-relaxed font-medium [overflow-wrap:anywhere] first:mt-0 last:mb-0 [&:has(img)]:my-0", children: wrapChildrenWithPaths(children) })),
|
|
135
|
+
ul: ({ children }) => (_jsx("ul", { className: "marker:text-muted-foreground my-4 list-outside list-disc space-y-1 pl-6 first:mt-0 last:mb-0 [&_p]:mb-2 [&_p]:last:mb-0", children: children })),
|
|
136
136
|
ol: MarkdownOrderedList,
|
|
137
137
|
// A setup link still inside a list or table is part of a sentence or a row of
|
|
138
138
|
// data (`liftSetupLinkBlocks` lifted the ones that were not), so it renders
|
|
139
139
|
// as an inline chip rather than a full-width card.
|
|
140
|
-
li: ({ children }) => (_jsx("li", { className: "text-foreground
|
|
140
|
+
li: ({ children }) => (_jsx("li", { className: "text-foreground leading-relaxed font-medium [overflow-wrap:anywhere]", children: _jsx(SetupLinkInlineContext.Provider, { value: true, children: wrapChildrenWithPaths(children) }) })),
|
|
141
141
|
// Links — brand-blue, routed through next/link. Setup links open an in-app modal.
|
|
142
142
|
a: MarkdownLink,
|
|
143
143
|
// Every fence kind and inline code resolve in one shared place; see
|
|
@@ -160,7 +160,7 @@ const MARKDOWN_COMPONENTS = {
|
|
|
160
160
|
td: ({ children, className: tdClassName, node: _node, ...props }) => (_jsx("td", { className: cn(tdClassName, 'text-foreground px-4 py-2 text-left font-normal break-normal'), ...props, children: _jsx(SetupLinkInlineContext.Provider, { value: true, children: wrapChildrenWithPaths(children) }) })),
|
|
161
161
|
img: MarkdownImage,
|
|
162
162
|
strong: ({ children }) => (_jsx("strong", { className: "text-foreground font-semibold", children: children })),
|
|
163
|
-
em: ({ children }) => (_jsx("em", { className: "text-foreground
|
|
163
|
+
em: ({ children }) => (_jsx("em", { className: "text-foreground italic", children: children })),
|
|
164
164
|
del: ({ children }) => (_jsx("del", { className: "text-muted-foreground decoration-muted-foreground/50 line-through", children: children })),
|
|
165
165
|
// GFM task-list checkbox.
|
|
166
166
|
// Read-only: the control is shown, never toggled.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
declare const badgeVariants: (props?: ({
|
|
4
|
-
variant?: "outline" | "accent" | "secondary" | "success" | "warning" | "info" | "beta" | "default" | "kortix" | "destructive" | "
|
|
4
|
+
variant?: "outline" | "accent" | "secondary" | "success" | "warning" | "info" | "beta" | "default" | "kortix" | "destructive" | "update" | "new" | "muted" | "transparent" | "solid" | "badgeSuccess" | "highlight" | "royal" | null | undefined;
|
|
5
5
|
size?: "default" | "xs" | "sm" | "tabular" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
declare function Badge({ className, variant, size, asChild, ...props }: React.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
|
package/dist/primitives/badge.js
CHANGED
|
@@ -22,6 +22,8 @@ const badgeVariants = cva('inline-flex shrink-0 items-center justify-center gap-
|
|
|
22
22
|
info: 'bg-kortix-blue/15 text-foreground ring-1 ring-inset ring-kortix-blue/15 normal-case [&>svg]:text-kortix-blue',
|
|
23
23
|
muted: 'bg-muted/50 text-muted-foreground ring-1 ring-inset ring-muted/50 normal-case',
|
|
24
24
|
transparent: 'bg-transparent text-foreground ring-0 normal-case',
|
|
25
|
+
// The owner tier of the role badge hierarchy (decisions.md, R1).
|
|
26
|
+
royal: 'bg-kortix-purple/15 text-foreground ring-1 ring-inset ring-kortix-purple/15 normal-case',
|
|
25
27
|
},
|
|
26
28
|
size: {
|
|
27
29
|
default: 'px-1.5',
|
|
@@ -89,8 +89,15 @@ export function DisclosureTrigger({ children, className, variant = 'default', })
|
|
|
89
89
|
return child;
|
|
90
90
|
const typedChild = child;
|
|
91
91
|
const childClassName = typedChild.props.className;
|
|
92
|
+
// Composed, never replaced: a tooltip around the trigger closes on its
|
|
93
|
+
// own onClick. A keyboard toggle is an activation (a native button's
|
|
94
|
+
// Enter is a click), so it runs the child's onClick too.
|
|
95
|
+
const activate = (event) => {
|
|
96
|
+
typedChild.props.onClick?.(event);
|
|
97
|
+
toggle();
|
|
98
|
+
};
|
|
92
99
|
return React.cloneElement(typedChild, {
|
|
93
|
-
onClick:
|
|
100
|
+
onClick: activate,
|
|
94
101
|
role: 'button',
|
|
95
102
|
'aria-expanded': open,
|
|
96
103
|
// The region is unmounted while collapsed, so only promise an id that
|
|
@@ -98,9 +105,14 @@ export function DisclosureTrigger({ children, className, variant = 'default', })
|
|
|
98
105
|
'aria-controls': open ? contentId : undefined,
|
|
99
106
|
tabIndex: 0,
|
|
100
107
|
onKeyDown: (e) => {
|
|
108
|
+
typedChild.props.onKeyDown?.(e);
|
|
109
|
+
if (e.defaultPrevented)
|
|
110
|
+
return;
|
|
101
111
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
112
|
+
// Activate before preventing the default: a composed handler
|
|
113
|
+
// (Radix's tooltip close) skips a prevented event.
|
|
114
|
+
activate(e);
|
|
102
115
|
e.preventDefault();
|
|
103
|
-
toggle();
|
|
104
116
|
}
|
|
105
117
|
},
|
|
106
118
|
className: cn(className, 'select-none', childClassName, variant === 'outline' &&
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Icon } from '@phosphor-icons/react';
|
|
2
|
+
/**
|
|
3
|
+
* The artwork above an `EmptyState`: two cards fanned behind a front card.
|
|
4
|
+
* Without `icon` the front card is a document (an empty folder); with one,
|
|
5
|
+
* the icon sits on a plain front card (a channel's empty Memory, Links,
|
|
6
|
+
* Triggers, Apps and Threads), so every empty tab draws one picture.
|
|
7
|
+
* `glyphClassName` tints the icon (a channel's setup cards).
|
|
8
|
+
*/
|
|
9
|
+
export declare function EmptyArt({ icon: Glyph, glyphClassName }: {
|
|
10
|
+
icon?: Icon;
|
|
11
|
+
glyphClassName?: string;
|
|
12
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* The artwork above an `EmptyState`: two cards fanned behind a front card.
|
|
4
|
+
* Without `icon` the front card is a document (an empty folder); with one,
|
|
5
|
+
* the icon sits on a plain front card (a channel's empty Memory, Links,
|
|
6
|
+
* Triggers, Apps and Threads), so every empty tab draws one picture.
|
|
7
|
+
* `glyphClassName` tints the icon (a channel's setup cards).
|
|
8
|
+
*/
|
|
9
|
+
export function EmptyArt({ icon: Glyph, glyphClassName = 'text-muted-foreground' }) {
|
|
10
|
+
return (_jsxs("svg", { width: "72", height: "60", viewBox: "0 0 72 60", fill: "none", "aria-hidden": "true", children: [[-1, 1].map((side) => (_jsx("rect", { x: "21", y: "10", width: "30", height: "43", rx: "4", transform: `translate(${side * 7} 0) rotate(${side * 8} 36 53)`, className: "fill-card stroke-foreground/10" }, side))), Glyph ? (_jsxs(_Fragment, { children: [_jsx("rect", { x: "21", y: "12", width: "30", height: "43", rx: "4", className: "fill-muted stroke-foreground/20" }), _jsx(Glyph, { x: 27, y: 24.5, size: 18, className: glyphClassName })] })) : (_jsxs("g", { transform: "translate(3 0)", children: [_jsx("path", { d: "M22 12h17l9 9v30a4 4 0 0 1-4 4H22a4 4 0 0 1-4-4V16a4 4 0 0 1 4-4Z", className: "fill-muted stroke-foreground/20" }), _jsx("path", { d: "M39 12v6a3 3 0 0 0 3 3h6", className: "stroke-foreground/20" }), _jsx("path", { d: "M25 30h16M25 36h16M25 42h10", strokeWidth: "1.5", strokeLinecap: "round", className: "stroke-foreground/15" })] }))] }));
|
|
11
|
+
}
|
|
@@ -2,9 +2,9 @@ import { type Icon as IconMynauiType, type Icon as IconType, type Icon as Lucide
|
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
3
|
export interface EmptyStateProps {
|
|
4
4
|
icon?: LucideIcon | IconMynauiType | IconType;
|
|
5
|
-
/** Custom artwork in place of `
|
|
5
|
+
/** Custom artwork in place of `EmptyArt`. */
|
|
6
6
|
media?: ReactNode;
|
|
7
|
-
title:
|
|
7
|
+
title: ReactNode;
|
|
8
8
|
description?: ReactNode;
|
|
9
9
|
action?: ReactNode;
|
|
10
10
|
secondaryAction?: ReactNode;
|
|
@@ -3,9 +3,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
/**
|
|
4
4
|
* Kortix <EmptyState> — centered empty view.
|
|
5
5
|
*
|
|
6
|
-
* Minimal.
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* Minimal. The fanned-card artwork (`EmptyArt`, with `icon` on its front card,
|
|
7
|
+
* or a blank document without one), a one-line headline, an optional body,
|
|
8
|
+
* and up to two actions (primary + secondary). Every empty view draws the
|
|
9
|
+
* same picture, title and body; only the glyph and the words change.
|
|
9
10
|
*
|
|
10
11
|
* <EmptyState
|
|
11
12
|
* icon={IconInbox}
|
|
@@ -14,10 +15,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
14
15
|
* action={<Button>New issue</Button>}
|
|
15
16
|
* />
|
|
16
17
|
*/
|
|
18
|
+
import { EmptyArt } from './empty-art.js';
|
|
17
19
|
import { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, } from './empty.js';
|
|
18
20
|
import { cn } from '../lib/utils.js';
|
|
19
21
|
export function EmptyState({ icon: IconComponent, media, title, description, action, secondaryAction, size = 'default', className, }) {
|
|
20
|
-
const iconSize = size === 'sm' ? 'h-8 w-8' : 'h-10 w-10';
|
|
21
22
|
const maxW = size === 'sm' ? 'max-w-[240px]' : 'max-w-[320px]';
|
|
22
|
-
return (_jsxs(Empty, { className: cn('', className), children: [_jsxs(EmptyHeader, { className: maxW, children: [
|
|
23
|
+
return (_jsxs(Empty, { className: cn('', className), children: [_jsxs(EmptyHeader, { className: maxW, children: [_jsx(EmptyMedia, { className: "mb-5", children: media ?? _jsx(EmptyArt, { icon: IconComponent }) }), _jsx(EmptyTitle, { className: "text-foreground text-sm font-semibold tracking-tight", children: title }), description && (_jsx(EmptyDescription, { className: "text-muted-foreground mt-1.5", children: description }))] }), (action || secondaryAction) && (_jsxs(EmptyContent, { className: "flex-row justify-center gap-2", children: [action, secondaryAction] }))] }));
|
|
23
24
|
}
|
|
@@ -8,6 +8,8 @@ interface MermaidRendererProps {
|
|
|
8
8
|
* still for `CODE_SETTLE_MS`, not once per streamed token.
|
|
9
9
|
*/
|
|
10
10
|
isStreaming?: boolean;
|
|
11
|
+
/** Extra controls beside copy and fullscreen, shown on hover (e.g. "Edit diagram"). */
|
|
12
|
+
actions?: React.ReactNode;
|
|
11
13
|
}
|
|
12
14
|
export declare const MermaidRenderer: React.FC<MermaidRendererProps>;
|
|
13
15
|
export {};
|
|
@@ -11,7 +11,7 @@ import { cn } from '../lib/utils.js';
|
|
|
11
11
|
import { CheckIcon as Check, ArrowsOutSimpleIcon as Maximize2, ArrowCounterClockwiseIcon as RotateCcw, XIcon as X, MagnifyingGlassPlusIcon as ZoomIn, MagnifyingGlassMinusIcon as ZoomOut, } from '@phosphor-icons/react';
|
|
12
12
|
import { Copy } from '../icons/copy.js';
|
|
13
13
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
14
|
-
export const MermaidRenderer = React.memo(({ chart, className, enableFullscreen = true, isStreaming = false }) => {
|
|
14
|
+
export const MermaidRenderer = React.memo(({ chart, className, enableFullscreen = true, isStreaming = false, actions }) => {
|
|
15
15
|
const containerRef = useRef(null);
|
|
16
16
|
const [error, setError] = useState(null);
|
|
17
17
|
const [isLoading, setIsLoading] = useState(true);
|
|
@@ -234,26 +234,32 @@ export const MermaidRenderer = React.memo(({ chart, className, enableFullscreen
|
|
|
234
234
|
display: block !important;
|
|
235
235
|
margin: 0 auto !important;
|
|
236
236
|
}
|
|
237
|
-
.mermaid-container .node {
|
|
238
|
-
fill:
|
|
239
|
-
stroke:
|
|
237
|
+
.mermaid-container .node :is(rect, polygon, circle, ellipse, path) {
|
|
238
|
+
fill: var(--card) !important;
|
|
239
|
+
stroke: var(--border) !important;
|
|
240
240
|
}
|
|
241
|
-
.mermaid-container .cluster {
|
|
242
|
-
fill:
|
|
243
|
-
stroke:
|
|
241
|
+
.mermaid-container .cluster rect {
|
|
242
|
+
fill: var(--muted) !important;
|
|
243
|
+
stroke: var(--border) !important;
|
|
244
244
|
}
|
|
245
|
-
.mermaid-container text {
|
|
246
|
-
fill:
|
|
247
|
-
|
|
245
|
+
.mermaid-container :is(text, .nodeLabel, .edgeLabel, .label) {
|
|
246
|
+
fill: var(--foreground) !important;
|
|
247
|
+
color: var(--foreground) !important;
|
|
248
|
+
font-family: var(--font-sans) !important;
|
|
248
249
|
}
|
|
249
|
-
.mermaid-container .edgePath {
|
|
250
|
-
stroke:
|
|
250
|
+
.mermaid-container :is(.edgePath path, .flowchart-link) {
|
|
251
|
+
stroke: var(--muted-foreground) !important;
|
|
251
252
|
}
|
|
252
|
-
.mermaid-container .marker {
|
|
253
|
-
fill:
|
|
253
|
+
.mermaid-container :is(.marker, .arrowheadPath, .arrowMarkerPath) {
|
|
254
|
+
fill: var(--muted-foreground) !important;
|
|
255
|
+
stroke: var(--muted-foreground) !important;
|
|
256
|
+
}
|
|
257
|
+
.mermaid-container .edgeLabel :is(rect, p) {
|
|
258
|
+
background-color: var(--background) !important;
|
|
259
|
+
fill: var(--background) !important;
|
|
254
260
|
}
|
|
255
261
|
`,
|
|
256
|
-
} }), _jsxs("div", { className: cn('mermaid-container group bg-background relative my-4 w-full overflow-auto rounded-lg border', className),
|
|
262
|
+
} }), _jsxs("div", { className: cn('mermaid-container group bg-background relative my-4 w-full overflow-auto rounded-lg border', className), children: [_jsx("div", { className: "absolute top-2 right-2 z-10 opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100", children: _jsxs(ButtonGroup, { children: [actions, _jsx(Hint, { label: copied ? 'Copied' : 'Copy source', side: "top", children: _jsx(Button, { variant: "secondary", size: "icon-sm", onClick: handleCopySource, "aria-label": "Copy diagram source", children: copied ? (_jsx(Check, { className: "text-kortix-green size-3.5" })) : (_jsx(Copy, { className: "size-3.5" })) }) }), enableFullscreen && (_jsx(Hint, { label: "Fullscreen", side: "top", children: _jsx(Button, { variant: "secondary", size: "icon-sm", onClick: handleFullscreenOpen, "aria-label": "Open diagram fullscreen", children: _jsx(Maximize2, { className: "size-3.5" }) }) }))] }) }), _jsx("div", { ref: containerRef, dangerouslySetInnerHTML: { __html: renderedContent } })] }), _jsx(Modal, { open: isFullscreenOpen, onOpenChange: setIsFullscreenOpen, children: _jsxs(ModalContent, { variant: "base", showCloseButton: false, className: "flex h-[90vh] flex-col space-y-0 overflow-hidden lg:h-[90vh] lg:max-w-7xl", closeButtonChildren: _jsxs(ButtonGroup, { children: [_jsx(Hint, { label: "Zoom in", side: "bottom", children: _jsx(Button, { variant: "outline", size: "icon", onClick: handleZoomIn, "aria-label": "Zoom in", children: _jsx(ZoomIn, { className: "size-4" }) }) }), _jsx(Hint, { label: "Zoom out", side: "bottom", children: _jsx(Button, { variant: "outline", size: "icon", onClick: handleZoomOut, "aria-label": "Zoom out", children: _jsx(ZoomOut, { className: "size-4" }) }) }), _jsx(Hint, { label: "Rotate", side: "bottom", children: _jsx(Button, { variant: "outline", size: "icon", onClick: handleRotate, "aria-label": "Rotate diagram", children: _jsx(RotateCcw, { className: "size-4" }) }) }), _jsx(ModalClose, { asChild: true, children: _jsx(Button, { variant: "outline", size: "icon", "aria-label": "Close", children: _jsx(X, { className: "size-4" }) }) })] }), children: [_jsx(ModalTitle, { className: "sr-only", children: "Diagram" }), _jsx(ModalBody, { className: "relative min-h-0 flex-1 space-y-0 p-0", children: _jsx("div", { ref: canvasRef, className: "bg-muted/10 absolute inset-0 touch-none overflow-hidden select-none", onMouseDown: handleMouseDown, onMouseMove: handleMouseMove, onMouseUp: handleMouseUp, onMouseLeave: handleMouseUp, onTouchStart: handleTouchStart, onTouchMove: handleTouchMove, onTouchEnd: handleTouchEnd, style: { cursor: isDragging ? 'grabbing' : 'grab' }, children: renderedContent ? (_jsx("div", { className: "mermaid-container absolute inset-0 flex items-center justify-center", style: {
|
|
257
263
|
transform: `translate(${panOffset.x}px, ${panOffset.y}px) scale(${zoom}) rotate(${rotation}deg)`,
|
|
258
264
|
transformOrigin: 'center center',
|
|
259
265
|
transition: isDragging ? 'none' : 'transform 0.15s ease-out',
|
|
@@ -3,6 +3,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import * as ResizablePrimitive from 'react-resizable-panels';
|
|
5
5
|
import { cn } from '../lib/utils.js';
|
|
6
|
+
import { RESIZE_SEAM_CLASS } from './resize-seam.js';
|
|
6
7
|
function ResizablePanelGroup({ className, ...props }) {
|
|
7
8
|
return (_jsx(ResizablePrimitive.PanelGroup, { "data-slot": "resizable-panel-group", className: cn('flex h-full w-full data-[panel-group-direction=vertical]:flex-col', className), ...props }));
|
|
8
9
|
}
|
|
@@ -11,6 +12,10 @@ const ResizablePanel = React.forwardRef((props, ref) => {
|
|
|
11
12
|
});
|
|
12
13
|
ResizablePanel.displayName = 'ResizablePanel';
|
|
13
14
|
function ResizableHandle({ withHandle, className, ...props }) {
|
|
14
|
-
return (_jsx(ResizablePrimitive.PanelResizeHandle, { "data-slot": "resizable-handle", className: cn('
|
|
15
|
+
return (_jsx(ResizablePrimitive.PanelResizeHandle, { "data-slot": "resizable-handle", className: cn('relative flex cursor-col-resize items-center justify-center focus-visible:outline-hidden data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:cursor-row-resize [&[data-panel-group-direction=vertical]>div]:rotate-90',
|
|
16
|
+
// The sidebar rail's seam on hover, keyboard focus and drag: one look
|
|
17
|
+
// for every drag-to-resize edge. Horizontal groups only; a vertical
|
|
18
|
+
// handle keeps its plain row cursor.
|
|
19
|
+
RESIZE_SEAM_CLASS, 'data-[panel-group-direction=vertical]:before:hidden', 'data-[resize-handle-state=hover]:before:opacity-100 data-[resize-handle-state=drag]:before:opacity-100 focus-visible:before:opacity-100', className), ...props, children: withHandle && (_jsx("div", { className: "group z-10 flex cursor-col-resize items-center justify-center", children: _jsx("span", { className: "bg-muted-foreground/40 group-hover:bg-muted-foreground/70 h-[15px] w-[3px] rounded-full transition-colors" }) })) }));
|
|
15
20
|
}
|
|
16
21
|
export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The resize seam: a 2px `kortix-base` line on a drag edge, tapered at both
|
|
3
|
+
* ends and faded top and bottom, so it reads as a seam, not a border. Drawn by
|
|
4
|
+
* `before:`, so a caller keeps `after:` for its hit strip. Hidden at rest; the
|
|
5
|
+
* caller reveals it (`before:opacity-100`) on hover, focus and drag. Opacity
|
|
6
|
+
* only: a width or position transition would animate layout on hover.
|
|
7
|
+
*
|
|
8
|
+
* The sidebar rail (`sidebar-panel.tsx`) and every `ResizableHandle` draw it,
|
|
9
|
+
* so every drag-to-resize edge in the app looks the same.
|
|
10
|
+
*/
|
|
11
|
+
export declare const RESIZE_SEAM_CLASS: string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { cn } from '../lib/utils.js';
|
|
2
|
+
/**
|
|
3
|
+
* The resize seam: a 2px `kortix-base` line on a drag edge, tapered at both
|
|
4
|
+
* ends and faded top and bottom, so it reads as a seam, not a border. Drawn by
|
|
5
|
+
* `before:`, so a caller keeps `after:` for its hit strip. Hidden at rest; the
|
|
6
|
+
* caller reveals it (`before:opacity-100`) on hover, focus and drag. Opacity
|
|
7
|
+
* only: a width or position transition would animate layout on hover.
|
|
8
|
+
*
|
|
9
|
+
* The sidebar rail (`sidebar-panel.tsx`) and every `ResizableHandle` draw it,
|
|
10
|
+
* so every drag-to-resize edge in the app looks the same.
|
|
11
|
+
*/
|
|
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-[2px] before:-translate-x-1/2 before:opacity-0', 'before:bg-kortix-base before:transition-opacity before:duration-fast before:ease-out', 'before:[clip-path:polygon(calc(50%-0.0625rem)_0%,calc(50%+0.0625rem)_0%,calc(50%+0.125rem)_50%,calc(50%+0.0625rem)_100%,calc(50%-0.0625rem)_100%,calc(50%-0.125rem)_50%)]', 'before:[mask-image:linear-gradient(to_bottom,transparent,black_15%,black_85%,transparent)]', 'motion-reduce:before:transition-none');
|
|
@@ -6,6 +6,7 @@ import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle, } from
|
|
|
6
6
|
import { SIDEBAR_RESIZE_STEP_COARSE_PX, SIDEBAR_RESIZE_STEP_PX, SIDEBAR_UNDOCK_MS, SIDEBAR_WIDTH_MOBILE, useSidebar, } from './sidebar-context.js';
|
|
7
7
|
import { SIDEBAR_MAX_WIDTH_PX, SIDEBAR_MIN_WIDTH_PX, SIDEBAR_WIDTH_PX, clampSidebarWidth, } from './sidebar-width.js';
|
|
8
8
|
import { cn } from '../lib/utils.js';
|
|
9
|
+
import { RESIZE_SEAM_CLASS } from './resize-seam.js';
|
|
9
10
|
import { SidebarGlyph as PanelLeftIcon } from '../icons/sidebar-toggle.js';
|
|
10
11
|
function Sidebar({ side = 'left', variant = 'sidebar', collapsible = 'offcanvas', className, children, ...props }) {
|
|
11
12
|
const { isMobile, state, openMobile, setOpenMobile, peek, peekEnter, peekLeave, instantToggle } = useSidebar();
|
|
@@ -251,13 +252,9 @@ function SidebarRail({ className, ...props }) {
|
|
|
251
252
|
setWidth(SIDEBAR_WIDTH_PX);
|
|
252
253
|
}
|
|
253
254
|
}, className: cn('absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 cursor-col-resize touch-none outline-none select-none group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex',
|
|
254
|
-
// The
|
|
255
|
-
//
|
|
256
|
-
|
|
257
|
-
// on hover, on an element that sits over the content pane.
|
|
258
|
-
'after:pointer-events-none after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] after:-translate-x-1/2 after:opacity-0', 'after:bg-kortix-base after:transition-opacity after:duration-fast after:ease-out', 'hover:after:opacity-100 focus-visible:after:opacity-100 data-[resizing]:after:opacity-100',
|
|
259
|
-
// Tapered top and bottom so the line reads as a seam, not a border.
|
|
260
|
-
'after:[clip-path:polygon(calc(50%-0.0625rem)_0%,calc(50%+0.0625rem)_0%,calc(50%+0.125rem)_50%,calc(50%+0.0625rem)_100%,calc(50%-0.0625rem)_100%,calc(50%-0.125rem)_50%)]', 'after:[mask-image:linear-gradient(to_bottom,transparent,black_15%,black_85%,transparent)]', 'motion-reduce:after:transition-none', className), ...props }));
|
|
255
|
+
// The seam is a pseudo-element so the 16px hit area stays 16px (well
|
|
256
|
+
// over the 8px a pointer needs) while the visible line stays 2px.
|
|
257
|
+
RESIZE_SEAM_CLASS, 'hover:before:opacity-100 focus-visible:before:opacity-100 data-[resizing]:before:opacity-100', className), ...props }));
|
|
261
258
|
}
|
|
262
259
|
function SidebarInset({ className, ...props }) {
|
|
263
260
|
return (_jsx("main", { "data-slot": "sidebar-inset", className: cn('bg-background relative flex w-full flex-1 flex-col overflow-hidden', 'md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2', className), ...props }));
|