@jini-ai/ui 0.7.3-next.1 → 0.7.3-next.3
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/CHANGELOG.md +9 -0
- package/README.md +3 -3
- package/dist/browser/index.d.ts +2 -0
- package/dist/browser/index.js +2 -0
- package/dist/browser/mount-renderer.d.ts +33 -0
- package/dist/browser/mount-renderer.js +14 -0
- package/dist/browser/useDismissibleDropdown.d.ts +50 -0
- package/dist/browser/useDismissibleDropdown.js +49 -0
- package/dist/core.d.ts +4 -4
- package/dist/core.js +4 -1
- package/dist/features/admin-widgets/components/InfoTip.js +5 -5
- package/dist/features/admin-widgets/components/InfoTip.rules.d.ts +1 -1
- package/dist/features/admin-widgets/components/InfoTip.rules.js +1 -1
- package/dist/features/admin-widgets/components/SeeMore/SeeMore.js +3 -3
- package/dist/features/admin-widgets/components/Select/Select.js +7 -7
- package/dist/features/app-shell/SiteToast.d.ts +24 -0
- package/dist/features/app-shell/SiteToast.js +9 -0
- package/dist/features/app-shell/copyable-details.d.ts +12 -0
- package/dist/features/app-shell/copyable-details.js +17 -0
- package/dist/features/app-shell/expanded-mode.d.ts +76 -0
- package/dist/features/app-shell/expanded-mode.js +70 -0
- package/dist/features/app-shell/index.d.ts +8 -0
- package/dist/features/app-shell/index.js +8 -0
- package/dist/features/app-shell/use-delete-confirmation.hooks.d.ts +48 -0
- package/dist/features/app-shell/use-delete-confirmation.hooks.js +57 -0
- package/dist/features/app-shell/use-expanded-mode.hooks.d.ts +19 -0
- package/dist/features/app-shell/use-expanded-mode.hooks.js +39 -0
- package/dist/features/app-shell/use-site-toast.hooks.d.ts +56 -0
- package/dist/features/app-shell/use-site-toast.hooks.js +44 -0
- package/dist/features/app-shell/use-theme-preference.hooks.d.ts +30 -0
- package/dist/features/app-shell/use-theme-preference.hooks.js +42 -0
- package/dist/features/app-version/use-app-version.d.ts +53 -0
- package/dist/features/app-version/use-app-version.js +42 -0
- package/dist/features/asset-grid/react/components/AssetGrid.d.ts +1 -1
- package/dist/features/asset-grid/react/components/AssetGrid.js +1 -1
- package/dist/features/asset-grid/react/components/DeleteConfirmDialog.d.ts +1 -1
- package/dist/features/asset-grid/react/components/DeleteConfirmDialog.js +1 -1
- package/dist/features/asset-tree-browser/react/components/AssetTreeBrowser.d.ts +2 -2
- package/dist/features/asset-tree-browser/react/components/AssetTreeBrowser.js +1 -1
- package/dist/features/asset-tree-browser/react/components/FilePreviewPane.d.ts +1 -1
- package/dist/features/browser-chrome/react/components/BrowserViewportControls.d.ts +1 -1
- package/dist/features/browser-chrome/react/components/BrowserViewportControls.js +1 -1
- package/dist/features/charts/catalog-manifests.js +1 -1
- package/dist/features/charts/contract.d.ts +1 -1
- package/dist/features/charts/contract.js +1 -1
- package/dist/features/charts/registry.js +1 -1
- package/dist/features/charts/table.js +4 -4
- package/dist/features/charts/wire.d.ts +1 -1
- package/dist/features/charts/wire.js +1 -1
- package/dist/features/command-palette/index.d.ts +1 -0
- package/dist/features/command-palette/index.js +1 -0
- package/dist/features/command-palette/react/components/CommandPalette.d.ts +9 -9
- package/dist/features/command-palette/react/components/CommandPalette.hooks.js +28 -1
- package/dist/features/command-palette/react/components/CommandPalette.js +3 -5
- package/dist/features/connectors/ConnectorsBrowser.d.ts +1 -1
- package/dist/features/connectors/ConnectorsBrowser.js +2 -2
- package/dist/features/connectors/components/ConnectorCard.hooks.js +2 -2
- package/dist/features/connectors/components/ConnectorCard.js +4 -4
- package/dist/features/connectors/components/ConnectorDetailDrawer.d.ts +1 -1
- package/dist/features/connectors/components/ConnectorDetailDrawer.js +7 -7
- package/dist/features/connectors/components/ConnectorGrid.js +1 -1
- package/dist/features/connectors/components/ConnectorLogo.js +1 -1
- package/dist/features/connectors/components/ConnectorSearchBar.js +1 -1
- package/dist/features/connectors/components/ProviderTabBar.js +1 -1
- package/dist/features/execution/claude/env-fields.d.ts +1 -1
- package/dist/features/execution/codex/env-fields.d.ts +1 -1
- package/dist/features/execution/constants.d.ts +2 -2
- package/dist/features/execution/constants.js +1 -1
- package/dist/features/execution/dependencies.d.ts +2 -3
- package/dist/features/execution/http-adapter.d.ts +2 -3
- package/dist/features/execution/index.d.ts +0 -2
- package/dist/features/execution/react/components/AgentCliEnvFields.d.ts +1 -1
- package/dist/features/execution/react/components/AgentDiagnosticRow.d.ts +1 -1
- package/dist/features/execution/react/components/AgentDiagnosticRow.js +3 -1
- package/dist/features/execution/react/components/ByokProviderForm.d.ts +10 -2
- package/dist/features/execution/react/components/ByokProviderForm.hooks.d.ts +2 -2
- package/dist/features/execution/react/components/ByokProviderForm.js +15 -4
- package/dist/features/execution/react/components/ExecutionTab.d.ts +2 -3
- package/dist/features/execution/react/components/ExecutionTab.hooks.d.ts +14 -4
- package/dist/features/execution/react/components/ExecutionTab.hooks.js +66 -9
- package/dist/features/execution/react/components/ExecutionTab.js +27 -10
- package/dist/features/execution/react/components/LocalCliAgentCard.d.ts +4 -4
- package/dist/features/execution/react/components/LocalCliAgentList.d.ts +4 -4
- package/dist/features/execution/react/components/LocalCliAgentList.hooks.d.ts +3 -3
- package/dist/features/execution/react/components/LocalCliAgentSettings.d.ts +2 -2
- package/dist/features/execution/react/components/ProviderChipGroup.d.ts +1 -1
- package/dist/features/execution/react/components/SearchableModelSelect.d.ts +1 -1
- package/dist/features/execution/react/hooks/use-byok-field-validation.hooks.d.ts +2 -2
- package/dist/features/execution/react/hooks/use-execution-credential.hooks.d.ts +1 -1
- package/dist/features/execution/react/hooks/useExecutionTab.d.ts +2 -3
- package/dist/features/execution/react/hooks/useLocalCliAgentCard.d.ts +4 -4
- package/dist/features/execution/react/hooks/useLocalCliAgentList.d.ts +4 -4
- package/dist/features/execution/react/hooks/useReasoningControl.d.ts +3 -3
- package/dist/features/execution/rules.d.ts +6 -6
- package/dist/features/execution/rules.js +1 -1
- package/dist/features/external-mcp/react/components/ExternalMcpTab.js +4 -4
- package/dist/features/file-dropzone/react/components/FileDropzone.d.ts +1 -1
- package/dist/features/file-dropzone/react/components/FileDropzone.js +1 -1
- package/dist/features/find/find-bar-state.d.ts +58 -0
- package/dist/features/find/find-bar-state.js +45 -0
- package/dist/features/find/find-focus-clock.d.ts +19 -0
- package/dist/features/find/find-focus-clock.js +9 -0
- package/dist/features/find/find-input-focus.d.ts +88 -0
- package/dist/features/find/find-input-focus.js +88 -0
- package/dist/features/find/find-target.d.ts +141 -0
- package/dist/features/find/find-target.js +160 -0
- package/dist/features/find/index.d.ts +10 -0
- package/dist/features/find/index.js +10 -0
- package/dist/features/find/use-find-bar-effects.hooks.d.ts +14 -0
- package/dist/features/find/use-find-bar-effects.hooks.js +92 -0
- package/dist/features/find/use-find-bar-state.hooks.d.ts +43 -0
- package/dist/features/find/use-find-bar-state.hooks.js +49 -0
- package/dist/features/find/use-find-focus-reclaim.hooks.d.ts +21 -0
- package/dist/features/find/use-find-focus-reclaim.hooks.js +64 -0
- package/dist/features/find/use-find-input-binding.hooks.d.ts +18 -0
- package/dist/features/find/use-find-input-binding.hooks.js +76 -0
- package/dist/features/find-bar/FindBar.d.ts +41 -0
- package/dist/features/find-bar/FindBar.js +31 -0
- package/dist/features/find-bar/index.d.ts +2 -0
- package/dist/features/find-bar/index.js +2 -0
- package/dist/features/folder-path-drop/index.d.ts +3 -1
- package/dist/features/folder-path-drop/index.js +1 -0
- package/dist/features/folder-path-drop/react/hooks/useClassifiedPathDrop.d.ts +50 -0
- package/dist/features/folder-path-drop/react/hooks/useClassifiedPathDrop.js +50 -0
- package/dist/features/folder-path-drop/types.d.ts +14 -0
- package/dist/features/i18n/context.d.ts +1 -1
- package/dist/features/i18n/context.js +1 -1
- package/dist/features/iframe-pool/react/dom-sync.d.ts +13 -3
- package/dist/features/iframe-pool/react/dom-sync.js +7 -7
- package/dist/features/import-handoff/use-import-handoff.d.ts +38 -0
- package/dist/features/import-handoff/use-import-handoff.js +40 -0
- package/dist/features/integrations/rules.js +39 -41
- package/dist/features/interactive-ui/interactive-ui.css +1 -1
- package/dist/features/interactive-ui/providers/native/data-table.js +1 -1
- package/dist/features/interactive-ui/providers/native/data-table.manifest.d.ts +1 -1
- package/dist/features/interactive-ui/providers/native/data-table.manifest.js +1 -1
- package/dist/features/interactive-ui/providers/shadcn/action-button.manifest.d.ts +1 -1
- package/dist/features/interactive-ui/providers/shadcn/action-button.manifest.js +1 -1
- package/dist/features/interactive-ui/providers/shadcn/checkbox-field.js +1 -1
- package/dist/features/interactive-ui/providers/shadcn/checkbox-field.manifest.d.ts +1 -1
- package/dist/features/interactive-ui/providers/shadcn/checkbox-field.manifest.js +1 -1
- package/dist/features/interactive-ui/providers/shadcn/content-card.manifest.d.ts +1 -1
- package/dist/features/interactive-ui/providers/shadcn/content-card.manifest.js +1 -1
- package/dist/features/interactive-ui/providers/shadcn/data-table.js +3 -3
- package/dist/features/interactive-ui/providers/shadcn/data-table.manifest.d.ts +1 -1
- package/dist/features/interactive-ui/providers/shadcn/data-table.manifest.js +1 -1
- package/dist/features/interactive-ui/providers/shadcn/radio-group-field.js +1 -1
- package/dist/features/interactive-ui/providers/shadcn/radio-group-field.manifest.d.ts +1 -1
- package/dist/features/interactive-ui/providers/shadcn/radio-group-field.manifest.js +1 -1
- package/dist/features/interactive-ui/providers/shadcn/select-field.manifest.d.ts +1 -1
- package/dist/features/interactive-ui/providers/shadcn/select-field.manifest.js +1 -1
- package/dist/features/interactive-ui/providers/shadcn/text-input-field.manifest.d.ts +1 -1
- package/dist/features/interactive-ui/providers/shadcn/text-input-field.manifest.js +1 -1
- package/dist/features/interactive-ui/types.d.ts +1 -1
- package/dist/features/live-views/index.d.ts +6 -0
- package/dist/features/live-views/index.js +6 -0
- package/dist/features/live-views/use-live-views.d.ts +31 -0
- package/dist/features/live-views/use-live-views.js +88 -0
- package/dist/features/live-views/use-site-view-preference.d.ts +33 -0
- package/dist/features/live-views/use-site-view-preference.js +32 -0
- package/dist/features/live-views/use-webview-load-failure.d.ts +90 -0
- package/dist/features/live-views/use-webview-load-failure.js +122 -0
- package/dist/features/mcp-ui/credential-card.d.ts +1 -0
- package/dist/features/mcp-ui/credential-card.js +1 -1
- package/dist/features/mcp-ui/surfaces/tool-approval.d.ts +10 -0
- package/dist/features/mcp-ui/surfaces/tool-approval.js +15 -0
- package/dist/features/media-providers/dependencies.d.ts +7 -1
- package/dist/features/media-providers/dependencies.js +43 -0
- package/dist/features/media-providers/index.d.ts +2 -2
- package/dist/features/media-providers/index.js +1 -1
- package/dist/features/media-providers/ports.d.ts +39 -5
- package/dist/features/media-providers/react/components/MediaProvidersTab.d.ts +4 -3
- package/dist/features/media-providers/react/components/MediaProvidersTab.js +1 -1
- package/dist/features/media-providers/react/hooks/useMediaProvidersTab.d.ts +3 -2
- package/dist/features/media-providers/react/hooks/useMediaProvidersTab.js +41 -3
- package/dist/features/memory/react/components/MemoryConnectedPanel.js +2 -2
- package/dist/features/memory/react/components/MemoryEntryCard.js +1 -1
- package/dist/features/memory/react/components/MemoryHooksPanel.js +2 -2
- package/dist/features/memory/react/components/MemoryList.js +2 -2
- package/dist/features/memory/react/components/MemorySettingsPanel.js +2 -2
- package/dist/features/memory/react/components/MemorySuggestionPanel.js +1 -1
- package/dist/features/memory/react/hooks/useMemoryConnectors.hooks.js +3 -3
- package/dist/features/memory/react/hooks/useMemoryConnectors.rules.d.ts +4 -1
- package/dist/features/memory/react/hooks/useMemoryConnectors.rules.js +1 -1
- package/dist/features/memory/react/render-markdown.js +1 -1
- package/dist/features/nav-availability/nav-availability.d.ts +18 -0
- package/dist/features/nav-availability/nav-availability.js +12 -0
- package/dist/features/number-stepper/NumberStepper.d.ts +39 -0
- package/dist/features/number-stepper/NumberStepper.js +16 -0
- package/dist/features/number-stepper/index.d.ts +5 -0
- package/dist/features/number-stepper/index.js +5 -0
- package/dist/features/number-stepper/number-stepper.d.ts +34 -0
- package/dist/features/number-stepper/number-stepper.js +32 -0
- package/dist/features/number-stepper/use-number-stepper.hooks.d.ts +20 -0
- package/dist/features/number-stepper/use-number-stepper.hooks.js +29 -0
- package/dist/features/number-stepper/use-optimistic-number-setting.hooks.d.ts +36 -0
- package/dist/features/number-stepper/use-optimistic-number-setting.hooks.js +25 -0
- package/dist/features/panel-kit/ErrorNotice.js +8 -1
- package/dist/features/panel-kit/helpers/standing-draft-local-backup.d.ts +1 -1
- package/dist/features/panel-kit/helpers/standing-draft-recovery-message.d.ts +1 -1
- package/dist/features/panel-kit/hooks/use-standing-draft-autosave.hooks.d.ts +1 -37
- package/dist/features/panel-kit/hooks/use-standing-draft-recovery.hooks.d.ts +2 -1
- package/dist/features/panel-kit/hooks/use-standing-draft-state.hooks.d.ts +2 -1
- package/dist/features/panel-kit/hooks/use-standing-draft-writes.hooks.d.ts +2 -1
- package/dist/features/panel-kit/index.d.ts +2 -1
- package/dist/features/privacy/react/components/PrivacyTab.d.ts +1 -1
- package/dist/features/privacy/react/components/PrivacyTab.js +1 -1
- package/dist/features/progress-card/components/ProgressCard.d.ts +1 -1
- package/dist/features/progress-card/components/ProgressCard.js +1 -1
- package/dist/features/resource-dashboard/react/components/ResourceBoard.d.ts +1 -1
- package/dist/features/resource-dashboard/react/components/ResourceBoardToolbar.d.ts +1 -1
- package/dist/features/resource-dashboard/react/components/ResourceBoardToolbar.js +1 -1
- package/dist/features/resource-dashboard/react/components/ResourceCardParts.d.ts +1 -1
- package/dist/features/resource-dashboard/react/components/ResourceCardParts.js +7 -2
- package/dist/features/resource-dashboard/react/components/ResourceRowListView.d.ts +1 -1
- package/dist/features/resource-dashboard/react/components/ResourceRowListView.js +1 -1
- package/dist/features/resource-dashboard/react/components/ResourceRunHistoryList.d.ts +1 -1
- package/dist/features/resource-dashboard/react/components/ResourceRunHistoryList.js +1 -1
- package/dist/features/resource-dashboard/react/components/StatusPill.d.ts +1 -1
- package/dist/features/resource-dashboard/react/components/StatusPill.js +1 -1
- package/dist/features/resource-dashboard/react/hooks/useResourceBoard.js +6 -1
- package/dist/features/resource-monitor/ResourceTable.d.ts +67 -0
- package/dist/features/resource-monitor/ResourceTable.js +25 -0
- package/dist/features/resource-monitor/index.d.ts +4 -0
- package/dist/features/resource-monitor/index.js +4 -0
- package/dist/features/resource-monitor/resource-stop.d.ts +16 -0
- package/dist/features/resource-monitor/resource-stop.js +11 -0
- package/dist/features/resource-monitor/use-resource-readings.hooks.d.ts +44 -0
- package/dist/features/resource-monitor/use-resource-readings.hooks.js +91 -0
- package/dist/features/settings/dialog/styles/settings-dialog.css +251 -251
- package/dist/features/site-card/index.d.ts +4 -1
- package/dist/features/site-card/index.js +3 -0
- package/dist/features/site-card/use-created-site-return.hooks.d.ts +36 -0
- package/dist/features/site-card/use-created-site-return.hooks.js +43 -0
- package/dist/features/site-card/use-site-card-preview.hooks.d.ts +39 -0
- package/dist/features/site-card/use-site-card-preview.hooks.js +31 -0
- package/dist/features/site-card/use-site-list-prefs.hooks.d.ts +29 -8
- package/dist/features/site-card/use-site-list-prefs.hooks.js +56 -9
- package/dist/features/site-card/use-site-preview.hooks.d.ts +67 -0
- package/dist/features/site-card/use-site-preview.hooks.js +94 -0
- package/dist/features/sketch-editor/react/components/SketchEditor.d.ts +2 -2
- package/dist/features/sketch-editor/react/components/SketchEditor.js +1 -1
- package/dist/features/skills/react/components/SkillRow.js +1 -1
- package/dist/features/source-config-list/react/components/SourceConfigAddForm.js +2 -2
- package/dist/features/source-config-list/react/components/SourceConfigField.js +1 -1
- package/dist/features/source-config-list/react/components/SourceConfigItemCard.js +5 -5
- package/dist/features/source-config-list/react/components/SourceConfigList.d.ts +1 -1
- package/dist/features/source-config-list/react/components/SourceConfigList.js +1 -1
- package/dist/features/source-config-list/react/components/SourceConfigListView.js +3 -3
- package/dist/features/source-config-list/react/components/SourceConfigTestControl.d.ts +1 -1
- package/dist/features/source-config-list/react/components/SourceConfigTestControl.js +1 -1
- package/dist/features/tab-launcher-menu/react/components/TabLauncherMenu.d.ts +1 -1
- package/dist/features/tab-launcher-menu/react/components/TabLauncherMenu.js +1 -1
- package/dist/features/tab-strip/react/components/TabBar.js +2 -2
- package/dist/features/tab-strip/react/components/TabStrip.d.ts +1 -1
- package/dist/features/tab-strip/react/components/TabStrip.js +1 -1
- package/dist/features/tab-strip/scrollable.js +0 -2
- package/dist/features/tabbed-dialog/react/components/TabbedDialog.d.ts +1 -1
- package/dist/features/tabbed-dialog/react/components/TabbedDialog.js +1 -1
- package/dist/features/version-manager/react/components/VersionManagerModal.d.ts +1 -1
- package/dist/features/version-manager/react/components/VersionManagerModal.js +1 -1
- package/dist/features/viewer-shell/react/components/CommentSidePanel.d.ts +2 -2
- package/dist/features/viewer-shell/react/components/CommentSidePanel.js +1 -1
- package/dist/features/viewer-shell/react/components/MarkdownSplitPane.d.ts +1 -1
- package/dist/features/viewer-shell/react/components/MarkdownSplitPane.js +1 -1
- package/dist/features/viewer-shell/react/components/SegmentedToggle.d.ts +1 -1
- package/dist/features/viewer-shell/react/components/SegmentedToggle.js +1 -1
- package/dist/features/viewer-shell/react/components/ViewportSwitcher.d.ts +1 -1
- package/dist/features/viewer-shell/react/components/ViewportSwitcher.js +1 -1
- package/dist/features/viewer-shell/react/components/ViewportToggleGroup.d.ts +1 -1
- package/dist/features/viewer-shell/react/components/ViewportToggleGroup.js +1 -1
- package/dist/features/zoom/use-zoom.d.ts +141 -0
- package/dist/features/zoom/use-zoom.js +204 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/react/components/ComponentKitPreview.d.ts +1 -1
- package/dist/react/components/ComponentKitPreview.js +1 -1
- package/dist/react/components/CustomSelect.js +1 -1
- package/dist/react/components/ExportDiagnosticsButton.d.ts +6 -2
- package/dist/react/components/ExportDiagnosticsButton.js +3 -3
- package/dist/react/components/FileImportPanel.js +1 -1
- package/dist/react/components/IconFrame.d.ts +15 -0
- package/dist/react/components/IconFrame.js +11 -0
- package/dist/react/components/ImportChoice.js +1 -1
- package/dist/react/components/Notice.js +1 -1
- package/dist/react/components/OnboardingDropdown.js +1 -1
- package/dist/react/components/PaletteTweaks.js +1 -1
- package/dist/react/components/TooltipLayer.d.ts +13 -3
- package/dist/react/components/TooltipLayer.js +12 -12
- package/dist/react/mcp-ui/host-message-source.d.ts +3 -1
- package/dist/react/mcp-ui/host-message-source.js +1 -1
- package/dist/react/testing.js +3 -1
- package/dist/renderers/annotation-canvas/rules.js +30 -27
- package/dist/renderers/react/components/ArtifactView.js +1 -1
- package/dist/renderers/renderers/markdown.d.ts +3 -1
- package/dist/renderers/renderers/markdown.js +2 -2
- package/dist/styles/admin.css +54 -54
- package/dist/utils/zip.js +43 -36
- package/package.json +70 -13
- package/dist/features/execution/ports.d.ts +0 -71
- package/dist/features/execution/ports.js +0 -2
- package/dist/features/execution/types.d.ts +0 -472
- package/dist/features/execution/types.js +0 -2
- package/dist/react/components/CustomSelectMarkup.d.ts +0 -27
- package/dist/react/components/CustomSelectMarkup.js +0 -35
|
@@ -3,5 +3,6 @@ export { scoreItemMatch, rankItems, nextCursor, parseRecentIds, pushRecentId } f
|
|
|
3
3
|
export { createLocalStorageRecents } from './dependencies.js';
|
|
4
4
|
export { useCommandPalette, useWiredCommandPalette, } from './react/hooks/useCommandPalette.js';
|
|
5
5
|
export { CommandPaletteRow } from './react/components/CommandPaletteRow.js';
|
|
6
|
+
export { useCommandPaletteView } from './react/components/CommandPalette.hooks.js';
|
|
6
7
|
export { CommandPalette } from './react/components/CommandPalette.js';
|
|
7
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { useT } from '../../../i18n/index.js';
|
|
1
|
+
import type { useT } from '../../../i18n/index.js';
|
|
2
2
|
import type { CommandPaletteItem } from '../../types.js';
|
|
3
|
-
import { useWiredCommandPalette } from '../hooks/useCommandPalette.js';
|
|
4
|
-
import { useCommandPaletteView } from './CommandPalette.hooks.js';
|
|
3
|
+
import type { useWiredCommandPalette } from '../hooks/useCommandPalette.js';
|
|
4
|
+
import type { useCommandPaletteView } from './CommandPalette.hooks.js';
|
|
5
5
|
export interface CommandPaletteProps {
|
|
6
6
|
items: readonly CommandPaletteItem[];
|
|
7
7
|
onSelect: (item: CommandPaletteItem) => void;
|
|
8
8
|
onClose: () => void;
|
|
9
9
|
scopeKey?: string | undefined;
|
|
10
10
|
placeholder?: string | undefined;
|
|
11
|
-
/**
|
|
12
|
-
useWiredCommandPalette
|
|
13
|
-
useTHook
|
|
14
|
-
useCommandPaletteViewHook
|
|
11
|
+
/** Required hooks: the host injects the real implementations (type-only references here, no local defaults). */
|
|
12
|
+
useWiredCommandPalette: typeof useWiredCommandPalette;
|
|
13
|
+
useTHook: typeof useT;
|
|
14
|
+
useCommandPaletteViewHook: typeof useCommandPaletteView;
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
17
|
* A full-screen Cmd/Ctrl+P-style palette: a single search input over a
|
|
@@ -22,9 +22,9 @@ export interface CommandPaletteProps {
|
|
|
22
22
|
*
|
|
23
23
|
* Origin: `QuickSwitcher.tsx` — the origin's `ProjectFile`/`WorkspaceContextItem`
|
|
24
24
|
* split (files vs. tabs, two different shapes) is replaced by one generic
|
|
25
|
-
* `CommandPaletteItem`; see `
|
|
25
|
+
* `CommandPaletteItem`; see `070311a07^:packages/ui/source-map.md` (section "features/command-palette/") for the full
|
|
26
26
|
* genericization writeup, including why this is a distinct primitive from
|
|
27
27
|
* `features/mention-autocomplete/`.
|
|
28
28
|
*/
|
|
29
|
-
export declare function CommandPalette(
|
|
29
|
+
export declare function CommandPalette(required: CommandPaletteProps, _optional?: {}): import("react").JSX.Element;
|
|
30
30
|
//# sourceMappingURL=CommandPalette.d.ts.map
|
|
@@ -1,9 +1,36 @@
|
|
|
1
1
|
import { useCallback, useEffect, useRef } from 'react';
|
|
2
|
+
/** The element focus should return to once the palette has closed. */
|
|
3
|
+
function isRestorable(candidate, input) {
|
|
4
|
+
return candidate instanceof HTMLElement && candidate !== input && candidate !== input.ownerDocument.body;
|
|
5
|
+
}
|
|
2
6
|
/** Focus the palette on mount and keep its active result visible. */
|
|
3
7
|
export function useCommandPaletteView({ cursor }, _options = {}) {
|
|
4
8
|
const listRef = useRef(null);
|
|
9
|
+
const inputRef = useRef(null);
|
|
10
|
+
const openerRef = useRef(null);
|
|
5
11
|
const setInputRef = useCallback((node) => {
|
|
6
|
-
node
|
|
12
|
+
if (node) {
|
|
13
|
+
// Focus must be captured BEFORE the input takes it: afterwards the opener is
|
|
14
|
+
// unrecoverable. Read from the input's own document so an iframe/popout host works.
|
|
15
|
+
const previous = node.ownerDocument.activeElement;
|
|
16
|
+
openerRef.current = isRestorable(previous, node) ? previous : null;
|
|
17
|
+
inputRef.current = node;
|
|
18
|
+
node.focus();
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
const input = inputRef.current;
|
|
22
|
+
const opener = openerRef.current;
|
|
23
|
+
inputRef.current = null;
|
|
24
|
+
openerRef.current = null;
|
|
25
|
+
if (!input || !opener?.isConnected)
|
|
26
|
+
return;
|
|
27
|
+
// React detaches the ref at commit time, before the input leaves the DOM, so a
|
|
28
|
+
// palette that still owns focus shows up as the input; a removal that already
|
|
29
|
+
// dropped focus shows up as the body. Anything else means the host deliberately
|
|
30
|
+
// moved focus (e.g. from onClose) and must not be reclaimed.
|
|
31
|
+
const active = input.ownerDocument.activeElement;
|
|
32
|
+
if (active === input || active === input.ownerDocument.body || active === null)
|
|
33
|
+
opener.focus();
|
|
7
34
|
}, []);
|
|
8
35
|
useEffect(() => {
|
|
9
36
|
const el = listRef.current?.querySelector(`[data-idx="${cursor}"]`);
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useT } from '../../../i18n/index.js';
|
|
3
|
-
import { useWiredCommandPalette } from '../hooks/useCommandPalette.js';
|
|
4
2
|
import { CommandPaletteRow } from './CommandPaletteRow.js';
|
|
5
|
-
import { useCommandPaletteView } from './CommandPalette.hooks.js';
|
|
6
3
|
/**
|
|
7
4
|
* A full-screen Cmd/Ctrl+P-style palette: a single search input over a
|
|
8
5
|
* ranked, keyboard-navigable result list (arrow keys + wraparound, Enter to
|
|
@@ -12,11 +9,12 @@ import { useCommandPaletteView } from './CommandPalette.hooks.js';
|
|
|
12
9
|
*
|
|
13
10
|
* Origin: `QuickSwitcher.tsx` — the origin's `ProjectFile`/`WorkspaceContextItem`
|
|
14
11
|
* split (files vs. tabs, two different shapes) is replaced by one generic
|
|
15
|
-
* `CommandPaletteItem`; see `
|
|
12
|
+
* `CommandPaletteItem`; see `070311a07^:packages/ui/source-map.md` (section "features/command-palette/") for the full
|
|
16
13
|
* genericization writeup, including why this is a distinct primitive from
|
|
17
14
|
* `features/mention-autocomplete/`.
|
|
18
15
|
*/
|
|
19
|
-
export function CommandPalette(
|
|
16
|
+
export function CommandPalette(required, _optional = {}) {
|
|
17
|
+
const { items, onSelect, onClose, scopeKey, placeholder, useWiredCommandPalette: useWiredCommandPaletteHook, useTHook, useCommandPaletteViewHook, } = required;
|
|
20
18
|
const t = useTHook();
|
|
21
19
|
const palette = useWiredCommandPaletteHook({ items, onSelect, onClose, scopeKey });
|
|
22
20
|
const { listRef, setInputRef } = useCommandPaletteViewHook({ cursor: palette.cursor });
|
|
@@ -45,7 +45,7 @@ export interface ConnectorActionCallbacks {
|
|
|
45
45
|
* own data lifecycle: fetches the catalog on mount, lazily enriches once
|
|
46
46
|
* `unlocked`, and rehydrates statuses on window focus and OAuth callback
|
|
47
47
|
* messages. Ported from OD's `ConnectorsBrowser.tsx` — see
|
|
48
|
-
* `
|
|
48
|
+
* `070311a07^:packages/ui/source-map.md` (section "features/connectors/") for full provenance.
|
|
49
49
|
*/
|
|
50
50
|
export declare function ConnectorsBrowser({ unlocked, providerTabs, catalogRefreshKey, dependencies, getCategoryLabel, getDisplayableAccountLabel, gate, onProviderTabClick, onConnectorAuthResult, onConnectorsChanged, useConnectorCatalog, useConnectorAuthorization, useConnectorDetail, agentHandle, useTHook, useConnectorsBrowserViewHook, }: ConnectorsBrowserProps): import("react").JSX.Element;
|
|
51
51
|
//# sourceMappingURL=ConnectorsBrowser.d.ts.map
|
|
@@ -26,11 +26,11 @@ function ConnectorsDetailPane({ detail, authorization, unlocked, actions, getCat
|
|
|
26
26
|
* own data lifecycle: fetches the catalog on mount, lazily enriches once
|
|
27
27
|
* `unlocked`, and rehydrates statuses on window focus and OAuth callback
|
|
28
28
|
* messages. Ported from OD's `ConnectorsBrowser.tsx` — see
|
|
29
|
-
* `
|
|
29
|
+
* `070311a07^:packages/ui/source-map.md` (section "features/connectors/") for full provenance.
|
|
30
30
|
*/
|
|
31
31
|
export function ConnectorsBrowser({ unlocked, providerTabs = DEFAULT_PROVIDER_TABS, catalogRefreshKey, dependencies, getCategoryLabel, getDisplayableAccountLabel, gate, onProviderTabClick, onConnectorAuthResult, onConnectorsChanged, useConnectorCatalog, useConnectorAuthorization, useConnectorDetail, agentHandle, useTHook = useT, useConnectorsBrowserViewHook = useConnectorsBrowserView, }) {
|
|
32
32
|
const t = useTHook();
|
|
33
33
|
const { filter, setFilter, selectedProvider, catalog, authorization, detail, filteredConnectors, hasNoResults, alerts, handleProviderTabSelect, actions, categoryLabelProps, gateProps } = useConnectorsBrowserViewHook({ unlocked, providerTabs, catalogRefreshKey, dependencies, getCategoryLabel, gate, onProviderTabClick, onConnectorAuthResult, onConnectorsChanged, useConnectorCatalog, useConnectorAuthorization, useConnectorDetail, t });
|
|
34
|
-
return (_jsxs("div", { className: "tab-panel connectors-panel connectors-panel-embedded", children: [_jsxs("div", { className: "tab-panel-toolbar", children: [_jsx("div", { className: "toolbar-left connectors-heading", children: _jsxs("div", { children: [_jsx("h2", { children: t('Connectors') }), _jsx("p", { children: t('Connect third-party tools and services.') })] }) }), _jsxs("div", { className: "toolbar-right", children: [_jsx(ProviderTabBar, { tabs: providerTabs, selectedId: selectedProvider, onSelect: handleProviderTabSelect, ...subHandleProp({ base: agentHandle, action: 'provider' }) }), _jsx(ConnectorSearchBar, { value: filter, onChange: setFilter, disabled: !unlocked, onFocus: () => onProviderTabClick?.('search_connectors'), ...subHandleProp({ base: agentHandle, action: 'search' }) })] })] }), _jsx(ConnectorAlertList, { alerts: alerts, onOpenDetails: detail.openDetails }), catalog.loading ? (_jsx(CenteredLoader, { label: t('Loading…') })) : (_jsx(ConnectorGrid, { connectors: filteredConnectors, locked: !unlocked, hasNoResults: hasNoResults, searchQuery: filter, pendingConnectorAction: authorization.pendingConnectorAction, authorizationPending: authorization.pending, authorizationCancelFailed: authorization.cancelFailed, toolsLoaded: catalog.enriched, ...actions, onOpenDetails: detail.openDetails, ...categoryLabelProps, onClearSearch: () => setFilter(''), ...gateProps, ...subHandleProp({ base: agentHandle, action: 'connector' }) })), _jsx(ConnectorsDetailPane, { detail: detail, authorization: authorization, unlocked: unlocked, actions: actions, getCategoryLabel: getCategoryLabel, getDisplayableAccountLabel: getDisplayableAccountLabel, agentHandle: agentHandle })] }));
|
|
34
|
+
return (_jsxs("div", { className: "tab-panel jini-ui-connectors-panel jini-ui-connectors-panel-embedded", children: [_jsxs("div", { className: "tab-panel-toolbar", children: [_jsx("div", { className: "jini-ui-toolbar-left jini-ui-connectors-heading", children: _jsxs("div", { children: [_jsx("h2", { children: t('Connectors') }), _jsx("p", { children: t('Connect third-party tools and services.') })] }) }), _jsxs("div", { className: "jini-ui-toolbar-right", children: [_jsx(ProviderTabBar, { tabs: providerTabs, selectedId: selectedProvider, onSelect: handleProviderTabSelect, ...subHandleProp({ base: agentHandle, action: 'provider' }) }), _jsx(ConnectorSearchBar, { value: filter, onChange: setFilter, disabled: !unlocked, onFocus: () => onProviderTabClick?.('search_connectors'), ...subHandleProp({ base: agentHandle, action: 'search' }) })] })] }), _jsx(ConnectorAlertList, { alerts: alerts, onOpenDetails: detail.openDetails }), catalog.loading ? (_jsx(CenteredLoader, { label: t('Loading…') })) : (_jsx(ConnectorGrid, { connectors: filteredConnectors, locked: !unlocked, hasNoResults: hasNoResults, searchQuery: filter, pendingConnectorAction: authorization.pendingConnectorAction, authorizationPending: authorization.pending, authorizationCancelFailed: authorization.cancelFailed, toolsLoaded: catalog.enriched, ...actions, onOpenDetails: detail.openDetails, ...categoryLabelProps, onClearSearch: () => setFilter(''), ...gateProps, ...subHandleProp({ base: agentHandle, action: 'connector' }) })), _jsx(ConnectorsDetailPane, { detail: detail, authorization: authorization, unlocked: unlocked, actions: actions, getCategoryLabel: getCategoryLabel, getDisplayableAccountLabel: getDisplayableAccountLabel, agentHandle: agentHandle })] }));
|
|
35
35
|
}
|
|
36
36
|
//# sourceMappingURL=ConnectorsBrowser.js.map
|
|
@@ -25,14 +25,14 @@ export function createContinueAuthorization({ redirectUrl, onOpenExternalUrl },
|
|
|
25
25
|
// holds in that same render, and React re-binds this closure fresh on
|
|
26
26
|
// every render — so a re-check here was dead code for every real
|
|
27
27
|
// click, removed rather than tested around (see
|
|
28
|
-
//
|
|
28
|
+
// `070311a07^:packages/ui/source-map.md` (section "2026-07-22 addition", subsection "Real refactors — dead branches removed rather than tested around")).
|
|
29
29
|
// `continueAuthorization`'s only call site (the "continue in browser"
|
|
30
30
|
// button below) only ever renders while `authorizationPending &&
|
|
31
31
|
// authorizationPending.redirectUrl` already holds in that same render,
|
|
32
32
|
// and React re-binds this closure fresh on every render — so a
|
|
33
33
|
// re-check here was dead code for every real click, removed rather
|
|
34
34
|
// than tested around (same pattern as this package's `ConnectorCard.tsx`
|
|
35
|
-
// precedent; see
|
|
35
|
+
// precedent; see `070311a07^:packages/ui/source-map.md` (section "2026-07-22 addition", subsection "Real refactors — dead branches removed rather than tested around")).
|
|
36
36
|
onOpenExternalUrl?.(redirectUrl);
|
|
37
37
|
};
|
|
38
38
|
}
|
|
@@ -18,11 +18,11 @@ function stopThen(onActivate) {
|
|
|
18
18
|
function ConnectorCardTitleDot({ status, isAuthorizationPending, useTHook = useT }) {
|
|
19
19
|
const t = useTHook();
|
|
20
20
|
if (status === 'connected') {
|
|
21
|
-
return (_jsx("span", { className: `connector-status-dot jini-connector-card-title-dot status-${status}`, "aria-label": t(statusLabel({ status })), title: t(statusLabel({ status })), role: "img" }));
|
|
21
|
+
return (_jsx("span", { className: `jini-ui-connector-status-dot jini-connector-card-title-dot status-${status}`, "aria-label": t(statusLabel({ status })), title: t(statusLabel({ status })), role: "img" }));
|
|
22
22
|
}
|
|
23
23
|
if (!isAuthorizationPending)
|
|
24
24
|
return null;
|
|
25
|
-
return (_jsx("span", { className: "connector-status-dot jini-connector-card-title-dot status-pending", "aria-label": t('Authorization pending'), title: t('Authorization pending'), role: "img" }));
|
|
25
|
+
return (_jsx("span", { className: "jini-ui-connector-status-dot jini-connector-card-title-dot status-pending", "aria-label": t('Authorization pending'), title: t('Authorization pending'), role: "img" }));
|
|
26
26
|
}
|
|
27
27
|
function ConnectorCardToolsBadge({ connector, toolsLoaded, useTHook = useT }) {
|
|
28
28
|
const t = useTHook();
|
|
@@ -50,7 +50,7 @@ function ConnectorStatusPill({ status, useTHook = useT }) {
|
|
|
50
50
|
const t = useTHook();
|
|
51
51
|
if (status !== 'error' && status !== 'disabled')
|
|
52
52
|
return null;
|
|
53
|
-
return _jsx("span", { className: `connector-status-pill status-${status}`, children: t(statusLabel({ status })) });
|
|
53
|
+
return _jsx("span", { className: `jini-ui-connector-status-pill status-${status}`, children: t(statusLabel({ status })) });
|
|
54
54
|
}
|
|
55
55
|
/** The cancel-failed alert and the continue-in-browser link under the card body. */
|
|
56
56
|
function ConnectorCardHints({ authorizationCancelFailed, redirectUrl, cancelFailedMessage, continueInBrowserLabel, onOpenExternalUrl, useTHook = useT, }) {
|
|
@@ -64,6 +64,6 @@ export function ConnectorCard({ connector, disabled = false, pendingAction, auth
|
|
|
64
64
|
const categoryLabel = getCategoryLabel(connector.category);
|
|
65
65
|
const actionProps = { flags, disabled, agentHandle };
|
|
66
66
|
const { openDetails, onKeyActivate } = useConnectorCardHook({ connector, disabled, onOpenDetails });
|
|
67
|
-
return (_jsxs("article", { className: `connector-card status-${connector.status}${disabled ? ' is-locked' : ''}`, "data-connector-id": connector.id, role: "button", tabIndex: disabled ? -1 : 0, "aria-disabled": disabled || undefined, "aria-label": t('Open details for {name}', { name: connector.name }), onClick: openDetails, onKeyDown: onKeyActivate, ...agentHandleProps({}, { base: agentHandle, role: 'button', label: connector.name }), children: [_jsxs("div", { className: "connector-card-top", children: [_jsx(ConnectorLogo, { connectorId: connector.id, connectorName: connector.name, logoUrl: connector.logoUrl, size: "sm" }), _jsxs("div", { className: "connector-card-head", children: [_jsxs("h3", { className: "connector-card-title", children: [_jsx("span", { className: "connector-card-title-name", children: connector.name }), _jsx(ConnectorCardTitleDot, { status: connector.status, isAuthorizationPending: flags.isAuthorizationPending })] }), _jsxs("div", { className: "connector-meta", children: [_jsx("span", { className: "connector-meta-item connector-meta-category", title: categoryLabel, children: categoryLabel }), _jsx(ConnectorCardToolsBadge, { connector: connector, toolsLoaded: toolsLoaded })] })] }), _jsxs("div", { className: "connector-card-actions", children: [flags.isConnected ? (_jsx(ConnectorDisconnectButton, { ...actionProps, onActivate: () => onDisconnect(connector.id) })) : (_jsx(ConnectorConnectButton, { ...actionProps, onActivate: () => onConnect(connector.id) })), flags.isAuthorizationPending ? (_jsx(ConnectorCancelAuthorizationButton, { onActivate: () => onCancelAuthorization(connector.id) })) : null, _jsx(ConnectorStatusPill, { status: connector.status })] })] }), _jsx(ConnectorCardHints, { authorizationCancelFailed: authorizationCancelFailed, redirectUrl: flags.redirectUrl, cancelFailedMessage: cancelFailedMessage, continueInBrowserLabel: continueInBrowserLabel, onOpenExternalUrl: onOpenExternalUrl })] }));
|
|
67
|
+
return (_jsxs("article", { className: `jini-ui-connector-card status-${connector.status}${disabled ? ' is-locked' : ''}`, "data-connector-id": connector.id, role: "button", tabIndex: disabled ? -1 : 0, "aria-disabled": disabled || undefined, "aria-label": t('Open details for {name}', { name: connector.name }), onClick: openDetails, onKeyDown: onKeyActivate, ...agentHandleProps({}, { base: agentHandle, role: 'button', label: connector.name }), children: [_jsxs("div", { className: "jini-ui-connector-card-top", children: [_jsx(ConnectorLogo, { connectorId: connector.id, connectorName: connector.name, logoUrl: connector.logoUrl, size: "sm" }), _jsxs("div", { className: "jini-ui-connector-card-head", children: [_jsxs("h3", { className: "jini-ui-connector-card-title", children: [_jsx("span", { className: "jini-ui-connector-card-title-name", children: connector.name }), _jsx(ConnectorCardTitleDot, { status: connector.status, isAuthorizationPending: flags.isAuthorizationPending })] }), _jsxs("div", { className: "jini-ui-connector-meta", children: [_jsx("span", { className: "jini-ui-connector-meta-item jini-ui-connector-meta-category", title: categoryLabel, children: categoryLabel }), _jsx(ConnectorCardToolsBadge, { connector: connector, toolsLoaded: toolsLoaded })] })] }), _jsxs("div", { className: "jini-ui-connector-card-actions", children: [flags.isConnected ? (_jsx(ConnectorDisconnectButton, { ...actionProps, onActivate: () => onDisconnect(connector.id) })) : (_jsx(ConnectorConnectButton, { ...actionProps, onActivate: () => onConnect(connector.id) })), flags.isAuthorizationPending ? (_jsx(ConnectorCancelAuthorizationButton, { onActivate: () => onCancelAuthorization(connector.id) })) : null, _jsx(ConnectorStatusPill, { status: connector.status })] })] }), _jsx(ConnectorCardHints, { authorizationCancelFailed: authorizationCancelFailed, redirectUrl: flags.redirectUrl, cancelFailedMessage: cancelFailedMessage, continueInBrowserLabel: continueInBrowserLabel, onOpenExternalUrl: onOpenExternalUrl })] }));
|
|
68
68
|
}
|
|
69
69
|
//# sourceMappingURL=ConnectorCard.js.map
|
|
@@ -39,7 +39,7 @@ declare function useDrawerModalBehavior({ onClose, closeBtnRef, }: {
|
|
|
39
39
|
* Modal detail drawer with a paginated tool list. Keeps its own
|
|
40
40
|
* escape-key-to-close and body-scroll-lock behavior inline (standard modal
|
|
41
41
|
* a11y idioms, not business/transport logic) — see
|
|
42
|
-
* `
|
|
42
|
+
* `070311a07^:packages/ui/source-map.md` (section "features/connectors/", subsection "Purity grep") for the purity-check note for why these two
|
|
43
43
|
* `document`/`window` touches were kept here rather than routed through
|
|
44
44
|
* `dependencies.ts`.
|
|
45
45
|
*/
|
|
@@ -13,12 +13,12 @@ function ConnectorDrawerHead({ connector, categoryLabel, isAuthorizationPending,
|
|
|
13
13
|
const toolsBadge = toolsBadgeTranslation({ count: getConnectorDisplayToolCount(connector) });
|
|
14
14
|
const toolsBadgeLabel = t(toolsBadge.key, toolsBadge.vars);
|
|
15
15
|
const statusTone = isAuthorizationPending ? 'pending' : connector.status;
|
|
16
|
-
return (_jsxs("header", { className: "connector-drawer-head", children: [_jsx(ConnectorLogo, { connectorId: connector.id, connectorName: connector.name, logoUrl: connector.logoUrl, size: "lg" }), _jsxs("div", { className: "connector-drawer-titles", children: [_jsxs("div", { className: "connector-drawer-eyebrow", children: [_jsx("span", { children: categoryLabel }), _jsx("span", { className: "connector-meta-dot", "aria-hidden": true, children: "\u00B7" }), _jsx("span", { children: connector.provider })] }), _jsx("h2", { id: "connector-drawer-title", children: connector.name }), _jsxs("div", { className: "connector-drawer-status", children: [_jsxs("span", { className: `connector-status-pill status-${statusTone}`, children: [_jsx("span", { className: "connector-status-dot", "aria-hidden": true }), isAuthorizationPending ? t('Authorization pending') : t(statusLabel({ status: connector.status }))] }), showToolsBadge ? (_jsx("span", { className: "connector-drawer-tool-count-chip", title: toolsBadgeLabel, children: _jsx("span", { children: toolsBadgeLabel }) })) : null] })] }), _jsx("button", { ref: closeBtnRef, type: "button", className: "ghost connector-drawer-close", onClick: onClose, "aria-label": t('Close'), "data-testid": "connector-drawer-close", ...agentHandleProps({}, { base: agentHandle, action: 'close', role: 'button', label: t('Close') }), children: _jsx(Icon, { name: "close", size: 14 }) })] }));
|
|
16
|
+
return (_jsxs("header", { className: "jini-ui-connector-drawer-head", children: [_jsx(ConnectorLogo, { connectorId: connector.id, connectorName: connector.name, logoUrl: connector.logoUrl, size: "lg" }), _jsxs("div", { className: "jini-ui-connector-drawer-titles", children: [_jsxs("div", { className: "jini-ui-connector-drawer-eyebrow", children: [_jsx("span", { children: categoryLabel }), _jsx("span", { className: "jini-ui-connector-meta-dot", "aria-hidden": true, children: "\u00B7" }), _jsx("span", { children: connector.provider })] }), _jsx("h2", { id: "connector-drawer-title", children: connector.name }), _jsxs("div", { className: "jini-ui-connector-drawer-status", children: [_jsxs("span", { className: `jini-ui-connector-status-pill status-${statusTone}`, children: [_jsx("span", { className: "jini-ui-connector-status-dot", "aria-hidden": true }), isAuthorizationPending ? t('Authorization pending') : t(statusLabel({ status: connector.status }))] }), showToolsBadge ? (_jsx("span", { className: "jini-ui-connector-drawer-tool-count-chip", title: toolsBadgeLabel, children: _jsx("span", { children: toolsBadgeLabel }) })) : null] })] }), _jsx("button", { ref: closeBtnRef, type: "button", className: "ghost jini-ui-connector-drawer-close", onClick: onClose, "aria-label": t('Close'), "data-testid": "connector-drawer-close", ...agentHandleProps({}, { base: agentHandle, action: 'close', role: 'button', label: t('Close') }), children: _jsx(Icon, { name: "close", size: 14 }) })] }));
|
|
17
17
|
}
|
|
18
18
|
function ConnectorDrawerAbout({ description, isAuthorizationPending, redirectUrl, continueInBrowserLabel, onOpenExternalUrl, useTHook = useT, }) {
|
|
19
19
|
const t = useTHook();
|
|
20
20
|
const continueAuthorization = redirectUrl ? createContinueAuthorization({ redirectUrl, onOpenExternalUrl }) : undefined;
|
|
21
|
-
return (_jsxs("section", { className: "connector-drawer-section", children: [_jsx("h3", { className: "connector-drawer-section-title", children: t('About') }), _jsx("p", { className: "jini-connector-drawer-description", children: description }), isAuthorizationPending ? (_jsxs("div", { className: "jini-connector-authorization-block", role: "status", children: [_jsx("p", { className: "jini-connector-authorization-hint", children: t('Authorization in progress. It should finish shortly.') }), redirectUrl ? (_jsx("button", { type: "button", className: "jini-connector-authorization-link", onClick: continueAuthorization, children: continueInBrowserLabel ?? t('Continue in browser') })) : null] })) : null] }));
|
|
21
|
+
return (_jsxs("section", { className: "jini-ui-connector-drawer-section", children: [_jsx("h3", { className: "jini-ui-connector-drawer-section-title", children: t('About') }), _jsx("p", { className: "jini-connector-drawer-description", children: description }), isAuthorizationPending ? (_jsxs("div", { className: "jini-connector-authorization-block", role: "status", children: [_jsx("p", { className: "jini-connector-authorization-hint", children: t('Authorization in progress. It should finish shortly.') }), redirectUrl ? (_jsx("button", { type: "button", className: "jini-connector-authorization-link", onClick: continueAuthorization, children: continueInBrowserLabel ?? t('Continue in browser') })) : null] })) : null] }));
|
|
22
22
|
}
|
|
23
23
|
function ConnectorDrawerAlert({ message }) {
|
|
24
24
|
return (_jsx("p", { className: "jini-connector-authorization-hint jini-connector-authorization-error", role: "alert", children: message }));
|
|
@@ -26,10 +26,10 @@ function ConnectorDrawerAlert({ message }) {
|
|
|
26
26
|
function ConnectorDrawerDetails({ connector, categoryLabel, accountLabel, flags, onDisconnect, agentHandle, useTHook = useT }) {
|
|
27
27
|
const t = useTHook();
|
|
28
28
|
const { isDisconnecting } = flags;
|
|
29
|
-
return (_jsxs("section", { className: "connector-drawer-section", children: [_jsxs("div", { className: "jini-connector-drawer-section-head", children: [_jsx("h3", { className: "connector-drawer-section-title", children: t('Details') }), flags.isConnected ? (_jsxs("button", { type: "button", className: `ghost connector-drawer-inline-action jini-connector-action is-disconnect${isDisconnecting ? ' is-loading' : ''}`, disabled: !flags.canDisconnect, "aria-busy": isDisconnecting || undefined, onClick: () => onDisconnect(connector.id), ...agentHandleProps({}, { base: agentHandle, action: 'disconnect', role: 'button', label: t('Disconnect') }), children: [isDisconnecting ? _jsx(Icon, { name: "spinner", size: 12 }) : null, _jsx("span", { children: t('Disconnect') })] })) : null] }), _jsxs("dl", { className: "jini-connector-drawer-details", children: [_jsxs("div", { children: [_jsx("dt", { children: t('Status') }), _jsx("dd", { children: t(statusLabel({ status: connector.status })) })] }), _jsxs("div", { children: [_jsx("dt", { children: t('Category') }), _jsx("dd", { children: categoryLabel })] }), _jsxs("div", { children: [_jsx("dt", { children: t('Provider') }), _jsx("dd", { children: connector.provider })] }), accountLabel ? (_jsxs("div", { children: [_jsx("dt", { children: t('Account') }), _jsx("dd", { children: accountLabel })] })) : null, connector.lastError ? (_jsxs("div", { className: "jini-connector-drawer-details-error", children: [_jsx("dt", { children: t('Error') }), _jsx("dd", { children: connector.lastError })] })) : null] })] }));
|
|
29
|
+
return (_jsxs("section", { className: "jini-ui-connector-drawer-section", children: [_jsxs("div", { className: "jini-connector-drawer-section-head", children: [_jsx("h3", { className: "jini-ui-connector-drawer-section-title", children: t('Details') }), flags.isConnected ? (_jsxs("button", { type: "button", className: `ghost jini-ui-connector-drawer-inline-action jini-connector-action is-disconnect${isDisconnecting ? ' is-loading' : ''}`, disabled: !flags.canDisconnect, "aria-busy": isDisconnecting || undefined, onClick: () => onDisconnect(connector.id), ...agentHandleProps({}, { base: agentHandle, action: 'disconnect', role: 'button', label: t('Disconnect') }), children: [isDisconnecting ? _jsx(Icon, { name: "spinner", size: 12 }) : null, _jsx("span", { children: t('Disconnect') })] })) : null] }), _jsxs("dl", { className: "jini-connector-drawer-details", children: [_jsxs("div", { children: [_jsx("dt", { children: t('Status') }), _jsx("dd", { children: t(statusLabel({ status: connector.status })) })] }), _jsxs("div", { children: [_jsx("dt", { children: t('Category') }), _jsx("dd", { children: categoryLabel })] }), _jsxs("div", { children: [_jsx("dt", { children: t('Provider') }), _jsx("dd", { children: connector.provider })] }), accountLabel ? (_jsxs("div", { children: [_jsx("dt", { children: t('Account') }), _jsx("dd", { children: accountLabel })] })) : null, connector.lastError ? (_jsxs("div", { className: "jini-connector-drawer-details-error", children: [_jsx("dt", { children: t('Error') }), _jsx("dd", { children: connector.lastError })] })) : null] })] }));
|
|
30
30
|
}
|
|
31
31
|
function ConnectorDrawerTool({ tool }) {
|
|
32
|
-
return (_jsxs("li", { className: "jini-connector-drawer-tool", children: [_jsxs("div", { className: "jini-connector-drawer-tool-head", children: [_jsx("span", { className: "jini-connector-drawer-tool-title", children: tool.title || tool.name }), _jsx("span", { className: `connector-drawer-tool-badge side-${tool.safety.sideEffect}`, title: tool.safety.reason, children: tool.safety.sideEffect })] }), tool.description ? _jsx("p", { className: "jini-connector-drawer-tool-desc", children: tool.description }) : null, _jsx("code", { className: "jini-connector-drawer-tool-name", children: tool.name })] }));
|
|
32
|
+
return (_jsxs("li", { className: "jini-connector-drawer-tool", children: [_jsxs("div", { className: "jini-connector-drawer-tool-head", children: [_jsx("span", { className: "jini-connector-drawer-tool-title", children: tool.title || tool.name }), _jsx("span", { className: `jini-ui-connector-drawer-tool-badge side-${tool.safety.sideEffect}`, title: tool.safety.reason, children: tool.safety.sideEffect })] }), tool.description ? _jsx("p", { className: "jini-connector-drawer-tool-desc", children: tool.description }) : null, _jsx("code", { className: "jini-connector-drawer-tool-name", children: tool.name })] }));
|
|
33
33
|
}
|
|
34
34
|
/** The tools section body: loading, unavailable, empty, or the list with an optional load-more. */
|
|
35
35
|
function ConnectorDrawerToolsBody({ connector, toolsPreviewLoading, toolsLoaded, onLoadMoreTools, useTHook = useT }) {
|
|
@@ -79,7 +79,7 @@ function ConnectorDrawerNotices({ connector, flags, authorizationError, authoriz
|
|
|
79
79
|
* Modal detail drawer with a paginated tool list. Keeps its own
|
|
80
80
|
* escape-key-to-close and body-scroll-lock behavior inline (standard modal
|
|
81
81
|
* a11y idioms, not business/transport logic) — see
|
|
82
|
-
* `
|
|
82
|
+
* `070311a07^:packages/ui/source-map.md` (section "features/connectors/", subsection "Purity grep") for the purity-check note for why these two
|
|
83
83
|
* `document`/`window` touches were kept here rather than routed through
|
|
84
84
|
* `dependencies.ts`.
|
|
85
85
|
*/
|
|
@@ -89,9 +89,9 @@ export function ConnectorDetailDrawer({ connector, disabled, pendingAction, auth
|
|
|
89
89
|
const closeBtnRef = useRef(null);
|
|
90
90
|
const categoryLabel = getCategoryLabel(connector.category);
|
|
91
91
|
hooks.useDrawerModalBehavior({ onClose, closeBtnRef });
|
|
92
|
-
return (_jsx("div", { className: "connector-drawer-backdrop", role: "presentation", onMouseDown: (e) => {
|
|
92
|
+
return (_jsx("div", { className: "jini-ui-connector-drawer-backdrop", role: "presentation", onMouseDown: (e) => {
|
|
93
93
|
if (e.target === e.currentTarget)
|
|
94
94
|
onClose();
|
|
95
|
-
}, children: _jsxs("aside", { className: "connector-drawer", role: "dialog", "aria-modal": "true", "aria-labelledby": "connector-drawer-title", "data-testid": "connector-drawer", onClick: (e) => e.stopPropagation(), ...agentHandleProps({}, { base: agentHandle, role: 'region', label: connector.name }), children: [_jsx(ConnectorDrawerHead, { connector: connector, categoryLabel: categoryLabel, isAuthorizationPending: flags.isAuthorizationPending, toolsLoaded: toolsLoaded, closeBtnRef: closeBtnRef, onClose: onClose, agentHandle: agentHandle }), _jsxs("div", { className: "connector-drawer-body", children: [_jsx(ConnectorDrawerNotices, { connector: connector, flags: flags, authorizationError: authorizationError, authorizationCancelFailed: authorizationCancelFailed, cancelFailedMessage: cancelFailedMessage, continueInBrowserLabel: continueInBrowserLabel, onOpenExternalUrl: onOpenExternalUrl, t: t }), _jsx(ConnectorDrawerDetails, { connector: connector, categoryLabel: categoryLabel, accountLabel: getDisplayableAccountLabel(connector), flags: flags, onDisconnect: onDisconnect, agentHandle: agentHandle }), _jsxs("section", { className: "connector-drawer-section", children: [_jsxs("h3", { className: "connector-drawer-section-title", children: [t('Tools'), " ", _jsx("span", { className: "connector-drawer-count", children: getConnectorDisplayToolCount(connector) })] }), _jsx(ConnectorDrawerToolsBody, { connector: connector, toolsPreviewLoading: toolsPreviewLoading, toolsLoaded: toolsLoaded, onLoadMoreTools: onLoadMoreTools })] })] }), !flags.isConnected ? (_jsx(ConnectorDrawerFoot, { connectorId: connector.id, flags: flags, onConnect: onConnect, onCancelAuthorization: onCancelAuthorization, agentHandle: agentHandle })) : null] }) }));
|
|
95
|
+
}, children: _jsxs("aside", { className: "jini-ui-connector-drawer", role: "dialog", "aria-modal": "true", "aria-labelledby": "connector-drawer-title", "data-testid": "connector-drawer", onClick: (e) => e.stopPropagation(), ...agentHandleProps({}, { base: agentHandle, role: 'region', label: connector.name }), children: [_jsx(ConnectorDrawerHead, { connector: connector, categoryLabel: categoryLabel, isAuthorizationPending: flags.isAuthorizationPending, toolsLoaded: toolsLoaded, closeBtnRef: closeBtnRef, onClose: onClose, agentHandle: agentHandle }), _jsxs("div", { className: "jini-ui-connector-drawer-body", children: [_jsx(ConnectorDrawerNotices, { connector: connector, flags: flags, authorizationError: authorizationError, authorizationCancelFailed: authorizationCancelFailed, cancelFailedMessage: cancelFailedMessage, continueInBrowserLabel: continueInBrowserLabel, onOpenExternalUrl: onOpenExternalUrl, t: t }), _jsx(ConnectorDrawerDetails, { connector: connector, categoryLabel: categoryLabel, accountLabel: getDisplayableAccountLabel(connector), flags: flags, onDisconnect: onDisconnect, agentHandle: agentHandle }), _jsxs("section", { className: "jini-ui-connector-drawer-section", children: [_jsxs("h3", { className: "jini-ui-connector-drawer-section-title", children: [t('Tools'), " ", _jsx("span", { className: "jini-ui-connector-drawer-count", children: getConnectorDisplayToolCount(connector) })] }), _jsx(ConnectorDrawerToolsBody, { connector: connector, toolsPreviewLoading: toolsPreviewLoading, toolsLoaded: toolsLoaded, onLoadMoreTools: onLoadMoreTools })] })] }), !flags.isConnected ? (_jsx(ConnectorDrawerFoot, { connectorId: connector.id, flags: flags, onConnect: onConnect, onCancelAuthorization: onCancelAuthorization, agentHandle: agentHandle })) : null] }) }));
|
|
96
96
|
}
|
|
97
97
|
//# sourceMappingURL=ConnectorDetailDrawer.js.map
|
|
@@ -15,6 +15,6 @@ function ConnectorGridEmpty({ searchQuery, onClearSearch, emptyNoMatchTitle, emp
|
|
|
15
15
|
/** Card grid + the search-empty-state and locked-gate overlays. */
|
|
16
16
|
export function ConnectorGrid({ connectors, locked, hasNoResults, searchQuery, pendingConnectorAction, authorizationPending, authorizationCancelFailed, toolsLoaded, onConnect, onDisconnect, onCancelAuthorization, onOpenDetails, onOpenExternalUrl, getCategoryLabel, onClearSearch, gate, emptyNoMatchTitle, emptyNoMatchBody, emptyNoMatchAction, agentHandle, }) {
|
|
17
17
|
const cardHandles = agentHandle ? buildAgentListHandles({ prefix: agentHandle, ids: connectors.map((c) => c.id) }) : [];
|
|
18
|
-
return (_jsxs("div", { className: `connector-grid-wrap${locked ? ' is-masked' : ''}`, "data-testid": "connector-grid-wrap", children: [hasNoResults && !locked ? (_jsx(ConnectorGridEmpty, { searchQuery: searchQuery, onClearSearch: onClearSearch, emptyNoMatchTitle: emptyNoMatchTitle, emptyNoMatchBody: emptyNoMatchBody, emptyNoMatchAction: emptyNoMatchAction, agentHandle: agentHandle })) : (_jsx("div", { className: "connector-grid", "aria-hidden": locked || undefined, children: connectors.map((connector, index) => (_jsx(ConnectorCard, { connector: connector, disabled: locked, pendingAction: pendingConnectorAction?.connectorId === connector.id ? pendingConnectorAction.action : null, authorizationPending: authorizationPending[connector.id], authorizationCancelFailed: authorizationCancelFailed[connector.id] === true, toolsLoaded: toolsLoaded, onConnect: onConnect, onDisconnect: onDisconnect, onCancelAuthorization: onCancelAuthorization, onOpenDetails: onOpenDetails, ...(getCategoryLabel ? { getCategoryLabel } : {}), ...(onOpenExternalUrl ? { onOpenExternalUrl } : {}), ...(cardHandles[index] ? { agentHandle: cardHandles[index] } : {}) }, connector.id))) })), locked && gate ? _jsx(ConnectorGate, { ...gate }) : null] }));
|
|
18
|
+
return (_jsxs("div", { className: `jini-ui-connector-grid-wrap${locked ? ' is-masked' : ''}`, "data-testid": "connector-grid-wrap", children: [hasNoResults && !locked ? (_jsx(ConnectorGridEmpty, { searchQuery: searchQuery, onClearSearch: onClearSearch, emptyNoMatchTitle: emptyNoMatchTitle, emptyNoMatchBody: emptyNoMatchBody, emptyNoMatchAction: emptyNoMatchAction, agentHandle: agentHandle })) : (_jsx("div", { className: "jini-ui-connector-grid", "aria-hidden": locked || undefined, children: connectors.map((connector, index) => (_jsx(ConnectorCard, { connector: connector, disabled: locked, pendingAction: pendingConnectorAction?.connectorId === connector.id ? pendingConnectorAction.action : null, authorizationPending: authorizationPending[connector.id], authorizationCancelFailed: authorizationCancelFailed[connector.id] === true, toolsLoaded: toolsLoaded, onConnect: onConnect, onDisconnect: onDisconnect, onCancelAuthorization: onCancelAuthorization, onOpenDetails: onOpenDetails, ...(getCategoryLabel ? { getCategoryLabel } : {}), ...(onOpenExternalUrl ? { onOpenExternalUrl } : {}), ...(cardHandles[index] ? { agentHandle: cardHandles[index] } : {}) }, connector.id))) })), locked && gate ? _jsx(ConnectorGate, { ...gate }) : null] }));
|
|
19
19
|
}
|
|
20
20
|
//# sourceMappingURL=ConnectorGrid.js.map
|
|
@@ -25,6 +25,6 @@ export function ConnectorLogo({ connectorId, connectorName, logoUrl, size = 'sm'
|
|
|
25
25
|
const initials = fallbackLogoInitials({ name: connectorName });
|
|
26
26
|
const palette = fallbackLogoPaletteIndex({ seed: connectorId || connectorName, paletteSize: FALLBACK_PALETTE_SIZE });
|
|
27
27
|
const showImage = Boolean(logoUrl) && state !== 'error';
|
|
28
|
-
return (_jsxs("span", { className: `connector-logo size-${size} state-${state}${showImage ? '' : ' is-fallback'}`, "data-palette": palette, "aria-hidden": "true", children: [showImage ? (_jsx("img", { ref: imageRef, className: "jini-connector-logo-img", src: logoUrl, alt: "", loading: "lazy", decoding: "async", referrerPolicy: "no-referrer", draggable: false, onLoad: () => setState('loaded'), onError: () => setState('error') }, logoUrl)) : null, _jsx("span", { className: "jini-connector-logo-fallback", children: initials })] }));
|
|
28
|
+
return (_jsxs("span", { className: `jini-ui-connector-logo size-${size} state-${state}${showImage ? '' : ' is-fallback'}`, "data-palette": palette, "aria-hidden": "true", children: [showImage ? (_jsx("img", { ref: imageRef, className: "jini-connector-logo-img", src: logoUrl, alt: "", loading: "lazy", decoding: "async", referrerPolicy: "no-referrer", draggable: false, onLoad: () => setState('loaded'), onError: () => setState('error') }, logoUrl)) : null, _jsx("span", { className: "jini-connector-logo-fallback", children: initials })] }));
|
|
29
29
|
}
|
|
30
30
|
//# sourceMappingURL=ConnectorLogo.js.map
|
|
@@ -9,7 +9,7 @@ export function ConnectorSearchBar({ value, onChange, disabled = false, onFocus,
|
|
|
9
9
|
const resolvedAriaLabel = ariaLabel ?? t('Search connectors');
|
|
10
10
|
const resolvedClearAriaLabel = clearAriaLabel ?? t('Clear search');
|
|
11
11
|
const { inputRef, hasQuery, onKeyDown } = useConnectorSearchBarHook({ value, onChange });
|
|
12
|
-
return (_jsxs("div", { className: "toolbar-search connectors-search", children: [_jsx("span", { className: "search-icon", "aria-hidden": true, children: _jsx(Icon, { name: "search", size: 13 }) }), _jsx("input", { ref: inputRef, type: "search", value: value, onFocus: onFocus, onChange: (event) => onChange(event.target.value), onKeyDown: onKeyDown, placeholder: resolvedPlaceholder, "aria-label": resolvedAriaLabel, disabled: disabled, "data-testid": "connectors-search-input", ...agentHandleProps({}, { base: agentHandle, ...({ role: 'field', label: resolvedAriaLabel }) }) }), hasQuery ? (_jsx("button", { type: "button", className: "toolbar-search-clear", "aria-label": resolvedClearAriaLabel, onClick: () => {
|
|
12
|
+
return (_jsxs("div", { className: "jini-ui-toolbar-search jini-ui-connectors-search", children: [_jsx("span", { className: "search-icon", "aria-hidden": true, children: _jsx(Icon, { name: "search", size: 13 }) }), _jsx("input", { ref: inputRef, type: "search", value: value, onFocus: onFocus, onChange: (event) => onChange(event.target.value), onKeyDown: onKeyDown, placeholder: resolvedPlaceholder, "aria-label": resolvedAriaLabel, disabled: disabled, "data-testid": "connectors-search-input", ...agentHandleProps({}, { base: agentHandle, ...({ role: 'field', label: resolvedAriaLabel }) }) }), hasQuery ? (_jsx("button", { type: "button", className: "jini-ui-toolbar-search-clear", "aria-label": resolvedClearAriaLabel, onClick: () => {
|
|
13
13
|
onChange('');
|
|
14
14
|
inputRef.current?.focus();
|
|
15
15
|
}, "data-testid": "connectors-search-clear", ...agentHandleProps({}, { base: agentHandle, ...({ action: 'clear', role: 'button', label: resolvedClearAriaLabel }) }), children: _jsx(Icon, { name: "close", size: 12 }) })) : null] }));
|
|
@@ -8,7 +8,7 @@ export function ProviderTabBar({ tabs, selectedId, onSelect, ariaLabel, agentHan
|
|
|
8
8
|
const tabHandles = agentHandle ? buildAgentListHandles({ prefix: agentHandle, ids: tabs.map((tab) => tab.id) }) : undefined;
|
|
9
9
|
return (_jsx("div", { className: "jini-connectors-provider-tabs", role: "tablist", "aria-label": resolvedAriaLabel, children: tabs.map((tab, index) => {
|
|
10
10
|
const active = tab.id === selectedId;
|
|
11
|
-
return (_jsx("button", { type: "button", role: "tab", "aria-selected": active, className: `connectors-provider-tab${active ? ' is-active' : ''}`, onClick: () => onSelect(tab.id), "data-testid": `connectors-provider-tab-${tab.id}`, ...agentHandleProps({}, { base: tabHandles?.[index], ...({ role: 'button', label: t(tab.label) }) }), children: t(tab.label) }, tab.id));
|
|
11
|
+
return (_jsx("button", { type: "button", role: "tab", "aria-selected": active, className: `jini-ui-connectors-provider-tab${active ? ' is-active' : ''}`, onClick: () => onSelect(tab.id), "data-testid": `connectors-provider-tab-${tab.id}`, ...agentHandleProps({}, { base: tabHandles?.[index], ...({ role: 'button', label: t(tab.label) }) }), children: t(tab.label) }, tab.id));
|
|
12
12
|
}) }));
|
|
13
13
|
}
|
|
14
14
|
//# sourceMappingURL=ProviderTabBar.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AgentCliEnvFieldSpec, ApiProtocol, ProviderPreset } from '
|
|
1
|
+
import type { AgentCliEnvFieldSpec, ApiProtocol, ProviderPreset } from '@jini-ai/core/contracts/execution';
|
|
2
2
|
/** @deprecated Endpoints come from host presets. Blank means the operator must supply an endpoint. */
|
|
3
3
|
export declare const DEFAULT_BASE_URL_BY_PROTOCOL: Readonly<Record<ApiProtocol, string>>;
|
|
4
4
|
/** Display order and English labels for the protocol row. Values are i18n
|
|
@@ -54,7 +54,7 @@ export declare const DEFAULT_PROVIDER_PRESETS: readonly ProviderPreset[];
|
|
|
54
54
|
* These describe the CLI's own vendor ("Anthropic official CLI"), not the
|
|
55
55
|
* product embedding it, which is why they are generic enough to ship here —
|
|
56
56
|
* the same reasoning that puts `PROTOCOL_OPTIONS` in this file. A host with a
|
|
57
|
-
* different or larger agent catalog supplies `
|
|
57
|
+
* different or larger agent catalog supplies `ExecutionCardAgent.description`
|
|
58
58
|
* directly and never consults this map; it is a fallback, not a gate, so an
|
|
59
59
|
* unknown agent id renders without a tagline rather than being hidden.
|
|
60
60
|
*/
|
|
@@ -62,7 +62,7 @@ export const DEFAULT_PROVIDER_PRESETS = [];
|
|
|
62
62
|
* These describe the CLI's own vendor ("Anthropic official CLI"), not the
|
|
63
63
|
* product embedding it, which is why they are generic enough to ship here —
|
|
64
64
|
* the same reasoning that puts `PROTOCOL_OPTIONS` in this file. A host with a
|
|
65
|
-
* different or larger agent catalog supplies `
|
|
65
|
+
* different or larger agent catalog supplies `ExecutionCardAgent.description`
|
|
66
66
|
* directly and never consults this map; it is a fallback, not a gate, so an
|
|
67
67
|
* unknown agent id renders without a tagline rather than being hidden.
|
|
68
68
|
*/
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type { ExecutionPort } from '
|
|
2
|
-
import type { AgentExecutableSource, DetectedAgent } from './types.js';
|
|
1
|
+
import type { AgentExecutableSource, ExecutionCardAgent, ExecutionPort } from '@jini-ai/core/contracts/execution';
|
|
3
2
|
export interface FakeExecutionPortOptions {
|
|
4
|
-
agents?: readonly
|
|
3
|
+
agents?: readonly ExecutionCardAgent[];
|
|
5
4
|
models?: readonly string[];
|
|
6
5
|
/** When set, `detectLocalAgents`/`rescanLocalAgents` REJECT with this message
|
|
7
6
|
* instead of resolving `agents` — exercises the "detection itself failed"
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import type { ByokConfig,
|
|
2
|
-
import type { ExecutionPort } from './ports.js';
|
|
1
|
+
import type { ByokConfig, ExecutionCardAgent, ExecutionPort } from '@jini-ai/core/contracts/execution';
|
|
3
2
|
/** Decoded HTTP operations; hosts retain auth, URLs and transport validation. */
|
|
4
3
|
export interface ExecutionProbeTransport {
|
|
5
4
|
detectExecutionAgents(required: Record<string, never>, optional?: {
|
|
6
5
|
force?: boolean;
|
|
7
6
|
}): Promise<{
|
|
8
|
-
data: readonly
|
|
7
|
+
data: readonly ExecutionCardAgent[];
|
|
9
8
|
}>;
|
|
10
9
|
testExecutionConnection(required: Pick<ByokConfig, "protocol" | "baseUrl" | "apiKey" | "model"> & ExecutionProbeFlags, optional?: Record<string, never>): Promise<{
|
|
11
10
|
ok: boolean;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
export { API_KEY_CROSS_VENDOR_WARNING, API_KEY_TOO_SHORT_WARNING, CUSTOM_MODEL_SENTINEL, CUSTOM_PRESET_ID, DEFAULT_AGENT_CLI_ENV_FIELDS, DEFAULT_AGENT_DESCRIPTIONS, DEFAULT_BASE_URL_BY_PROTOCOL, DEFAULT_PROVIDER_PRESETS, MIN_PLAUSIBLE_API_KEY_LENGTH, PROTOCOL_OPTIONS, } from './constants.js';
|
|
2
2
|
export { createFakeExecutionPort, type FakeExecutionPortOptions } from './dependencies.js';
|
|
3
|
-
export type { ExecutionPort } from './ports.js';
|
|
4
3
|
export { agentCliEnvValue, agentDiagnosticTooltip, agentExecutableRepairState, agentMetaLabel, type AgentMetaLabels, agentModelSummary, apiKeyFormatWarning, binPathEnvField, cleanAgentVersionLabel, cliEnvFieldsForAgent, credentialsForPreset, customPreset, filterAgentModelOptions, groupPresets, isBaseUrlInvalid, isProviderConfigured, isValidApiBaseUrl, missingRequiredFields, modelIdForReasoningLevel, nextConfigForAgentCliEnvChange, nextConfigForAgentModel, nextConfigForAgentReasoning, nextConfigForAgentSelect, nextConfigForModeChange, nextConfigForPresetSelect, nextConfigForProtocolSelect, parseMaxTokens, presetRequiresApiKey, presetsForProtocol, reasoningModelGroupFor, reasoningModelGroups, resolveSelectedPreset, selectedAgentModel, selectedAgentReasoning, shouldShowCustomModelInput, showsBaseUrlField, sortDetectedAgents, partitionAgentsByInstalled, splitReasoningModelId, } from './rules.js';
|
|
5
|
-
export type { AgentAuthStatus, AgentCliEnvFieldSpec, AgentDiagnostic, AgentDiagnosticReason, AgentDiagnosticSeverity, AgentExecutableRepair, AgentExecutableSource, AgentFixIntent, AgentModelOption, AgentModelSource, AgentScanState, ApiKeyWarning, AgentSupportsCustomModel, AgentTestState, ApiProtocol, ByokConfig, ByokProviderCredentials, ByokRequiredField, ConnectionTestState, DetectedAgent, ExecutionConfig, ExecutionMode, LocalCliConfig, ModelDiscoveryState, ProviderPreset, ProviderPresetKind, ReasoningModelGroup, } from './types.js';
|
|
6
4
|
export { ExecutionTab } from './react/components/ExecutionTab.js';
|
|
7
5
|
export type { ExecutionTabProps } from './react/components/ExecutionTab.js';
|
|
8
6
|
export { ByokProviderForm } from './react/components/ByokProviderForm.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useT } from '../../../i18n/index.js';
|
|
2
|
-
import type { AgentCliEnvFieldSpec, LocalCliConfig } from '
|
|
2
|
+
import type { AgentCliEnvFieldSpec, LocalCliConfig } from '@jini-ai/core/contracts/execution';
|
|
3
3
|
export interface AgentCliEnvFieldsProps {
|
|
4
4
|
agentId: string;
|
|
5
5
|
/** The full shared catalog — this component filters it down to `agentId`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useT } from '../../../i18n/index.js';
|
|
2
|
-
import type { AgentDiagnostic } from '
|
|
2
|
+
import type { AgentDiagnostic } from '@jini-ai/core/contracts/execution';
|
|
3
3
|
/**
|
|
4
4
|
* Handlers the host wires per fix intent. Each is optional: a button only
|
|
5
5
|
* renders when both the diagnostic carries the intent AND a handler is
|
|
@@ -56,7 +56,9 @@ export function AgentDiagnosticRow({ diagnostic, handlers = {}, className, useTH
|
|
|
56
56
|
};
|
|
57
57
|
const actions = (diagnostic.fixActions ?? [])
|
|
58
58
|
.map((intent) => resolveAction(intent, handlers, labels))
|
|
59
|
-
|
|
59
|
+
// `undefined` too: an intent kind this build does not know (a newer host over the wire) falls
|
|
60
|
+
// through `resolveAction`'s exhaustive switch to `unhandledCase`, which yields `undefined`.
|
|
61
|
+
.filter((action) => action !== null && action !== undefined);
|
|
60
62
|
const tooltip = agentDiagnosticTooltip(diagnostic);
|
|
61
63
|
return (_jsxs("div", { className: ['jini-agent-diagnostic', `is-${diagnostic.severity}`, className].filter(Boolean).join(' '), role: "group", "data-reason": diagnostic.reason, children: [_jsx("span", { className: "jini-agent-diagnostic-message", title: tooltip || undefined, children: diagnostic.message }), actions.length > 0 ? (_jsx("div", { className: "jini-agent-diagnostic-actions", children: actions.map((action) => (_jsx("button", { type: "button", className: "jini-agent-diagnostic-action", onClick: action.onClick, title: action.label, "aria-label": action.label, children: _jsx(Icon, { name: action.icon, size: 14, strokeWidth: 1.8 }) }, action.key))) })) : null] }));
|
|
62
64
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import { useT } from '../../../i18n/index.js';
|
|
3
3
|
import { useByokProviderForm } from './ByokProviderForm.hooks.js';
|
|
4
|
-
import type { ByokConfig, ConnectionTestState, ModelDiscoveryState, ProviderPreset } from '
|
|
4
|
+
import type { ByokConfig, ConnectionTestState, ModelDiscoveryState, ProviderPreset } from '@jini-ai/core/contracts/execution';
|
|
5
5
|
export interface ByokProviderFormProps {
|
|
6
6
|
config: ByokConfig;
|
|
7
7
|
onConfigChange: (config: ByokConfig) => void;
|
|
@@ -23,6 +23,14 @@ export interface ByokProviderFormProps {
|
|
|
23
23
|
modelDiscovery: ModelDiscoveryState;
|
|
24
24
|
connectionTest: ConnectionTestState;
|
|
25
25
|
onTestConnection: () => void;
|
|
26
|
+
/**
|
|
27
|
+
* Called when the operator commits the Base URL field — on blur, or on Enter outside IME
|
|
28
|
+
* composition — with the input's current value. Typing alone only patches `config`; a host that
|
|
29
|
+
* sends the key to this URL (model discovery) should treat only this call as the operator's intent.
|
|
30
|
+
*/
|
|
31
|
+
onBaseUrlCommit?: (required: {
|
|
32
|
+
readonly baseUrl: string;
|
|
33
|
+
}, _optional?: Record<string, never>) => void;
|
|
26
34
|
/** Hides the "Test connection" control for hosts with no probe endpoint. */
|
|
27
35
|
canTestConnection?: boolean;
|
|
28
36
|
/**
|
|
@@ -122,5 +130,5 @@ export type ByokProviderFormHooks = typeof defaultByokProviderFormHooks;
|
|
|
122
130
|
* `ByokModelField`, `ByokConnectionTestControl`) — already factored out
|
|
123
131
|
* upstream, so this is assembly plus the origin's required-field marking.
|
|
124
132
|
*/
|
|
125
|
-
export declare function ByokProviderForm({ config, onConfigChange, preset, presets, modelDiscovery, connectionTest, onTestConnection, canTestConnection, apiKeyFooter, formFooter, modelFooter, apiKeyStoredExternally, apiKeyPlaceholder, agentHandle, apiKeyActions, collapseAdvanced, deferMissingFeedback, hooks, }: ByokProviderFormProps): import("react").JSX.Element;
|
|
133
|
+
export declare function ByokProviderForm({ config, onConfigChange, preset, presets, modelDiscovery, connectionTest, onTestConnection, onBaseUrlCommit, canTestConnection, apiKeyFooter, formFooter, modelFooter, apiKeyStoredExternally, apiKeyPlaceholder, agentHandle, apiKeyActions, collapseAdvanced, deferMissingFeedback, hooks, }: ByokProviderFormProps): import("react").JSX.Element;
|
|
126
134
|
//# sourceMappingURL=ByokProviderForm.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ByokConfig, ProviderPreset } from '
|
|
1
|
+
import type { ByokConfig, ProviderPreset } from '@jini-ai/core/contracts/execution';
|
|
2
2
|
/** Keep credential disclosure and provider-specific form state local to the selected provider. */
|
|
3
3
|
export declare function useByokProviderForm({ config, onConfigChange, preset, apiKeyStoredExternally, deferMissingFeedback }: {
|
|
4
4
|
config: ByokConfig;
|
|
@@ -12,7 +12,7 @@ export declare function useByokProviderForm({ config, onConfigChange, preset, ap
|
|
|
12
12
|
explicitCustomModel: boolean;
|
|
13
13
|
setExplicitCustomModel: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
14
14
|
validation: {
|
|
15
|
-
missing: Set<import("
|
|
15
|
+
missing: Set<import("@jini-ai/core/contracts/execution").ByokRequiredField>;
|
|
16
16
|
baseUrlInvalid: boolean;
|
|
17
17
|
isMissing: ({ field }: {
|
|
18
18
|
field: "model" | "apiKey" | "baseUrl";
|
|
@@ -22,16 +22,27 @@ function ByokCardTitle({ preset, useTHook = useT }) {
|
|
|
22
22
|
* `ByokModelField`, `ByokConnectionTestControl`) — already factored out
|
|
23
23
|
* upstream, so this is assembly plus the origin's required-field marking.
|
|
24
24
|
*/
|
|
25
|
-
export function ByokProviderForm({ config, onConfigChange, preset, presets = [], modelDiscovery, connectionTest, onTestConnection, canTestConnection = true, apiKeyFooter, formFooter, modelFooter, apiKeyStoredExternally = false, apiKeyPlaceholder, agentHandle, apiKeyActions, collapseAdvanced = false, deferMissingFeedback = false, hooks = defaultByokProviderFormHooks, }) {
|
|
25
|
+
export function ByokProviderForm({ config, onConfigChange, preset, presets = [], modelDiscovery, connectionTest, onTestConnection, onBaseUrlCommit, canTestConnection = true, apiKeyFooter, formFooter, modelFooter, apiKeyStoredExternally = false, apiKeyPlaceholder, agentHandle, apiKeyActions, collapseAdvanced = false, deferMissingFeedback = false, hooks = defaultByokProviderFormHooks, }) {
|
|
26
26
|
const { revealKey, setRevealKey, explicitCustomModel, setExplicitCustomModel, validation, patch } = hooks.useByokProviderForm({ config, onConfigChange, preset, apiKeyStoredExternally, deferMissingFeedback });
|
|
27
27
|
const part = { config, patch, preset, agentHandle, validation };
|
|
28
|
-
const connectionFields = _jsx(ByokConnectionFields, { ...part });
|
|
28
|
+
const connectionFields = _jsx(ByokConnectionFields, { ...part, onBaseUrlCommit: onBaseUrlCommit });
|
|
29
29
|
return (_jsxs("div", { className: "jini-byok-card", children: [_jsx("div", { className: "jini-byok-card-head", children: _jsx(ByokCardTitle, { preset: preset, useTHook: hooks.useT }) }), presetRequiresApiKey({ preset }) ? (_jsx(ByokApiKeyField, { ...part, presets: presets, revealKey: revealKey, onToggleReveal: () => setRevealKey((shown) => !shown), apiKeyFooter: apiKeyFooter, apiKeyPlaceholder: apiKeyPlaceholder, apiKeyActions: apiKeyActions })) : null, collapseAdvanced ? null : connectionFields, _jsx(ByokModelRow, { ...part, modelDiscovery: modelDiscovery, explicitCustomModel: explicitCustomModel, setExplicitCustomModel: setExplicitCustomModel, connectionTest: connectionTest, onTestConnection: onTestConnection, canTestConnection: canTestConnection }), _jsx(ByokDiscoveryError, { modelDiscovery: modelDiscovery }), _jsx(ByokConnectionResult, { connectionTest: connectionTest, canTestConnection: canTestConnection }), _jsx(ByokSlot, { className: "jini-byok-model-footer", children: modelFooter }), collapseAdvanced ? _jsx(ByokAdvanced, { validation: validation, children: connectionFields }) : null, _jsx(ByokSlot, { className: "jini-byok-form-footer", children: formFooter })] }));
|
|
30
30
|
}
|
|
31
31
|
/** Base URL (unless the preset has a fixed origin) and Max tokens, on one wrapping row. */
|
|
32
|
-
|
|
32
|
+
/**
|
|
33
|
+
* Enter commits the Base URL, except while an IME is composing (that Enter picks a candidate, not
|
|
34
|
+
* the field's value). The committing Enter is default-prevented so it does not also submit an
|
|
35
|
+
* enclosing host form. Reads the input's current value, never a value captured at render.
|
|
36
|
+
*/
|
|
37
|
+
function commitBaseUrlOnEnter({ event, onBaseUrlCommit }, _optional = {}) {
|
|
38
|
+
if (!onBaseUrlCommit || event.key !== 'Enter' || event.nativeEvent.isComposing)
|
|
39
|
+
return;
|
|
40
|
+
event.preventDefault();
|
|
41
|
+
onBaseUrlCommit({ baseUrl: event.currentTarget.value });
|
|
42
|
+
}
|
|
43
|
+
function ByokConnectionFields({ config, patch, preset, agentHandle, validation, onBaseUrlCommit, useTHook = useT }) {
|
|
33
44
|
const t = useTHook();
|
|
34
|
-
return (_jsx(_Fragment, { children: _jsxs("div", { className: "jini-byok-field-row", children: [showsBaseUrlField({ preset }) ? (_jsxs("label", { className: "jini-field", onBlurCapture: () => validation.markTouched({ field: 'baseUrl' }), children: [_jsxs("span", { className: "jini-field-label", children: [t('Base URL'), preset?.baseUrl ? null : _jsx("span", { className: "jini-field-required", "aria-hidden": "true", children: "*" })] }), _jsx("input", { className: 'jini-input' + missingClass(validation, 'baseUrl'), type: "url", inputMode: "url", spellCheck: false, value: config.baseUrl, onChange: (event) => patch({ baseUrl: event.target.value }), ...agentHandleProps({}, { base: agentHandle, ...({ action: 'base-url', role: 'field', label: t('Base URL') }) }) }), _jsx("span", { className: 'jini-field-hint' + (validation.baseUrlInvalid ? ' is-error' : ''), children: validation.baseUrlInvalid
|
|
45
|
+
return (_jsx(_Fragment, { children: _jsxs("div", { className: "jini-byok-field-row", children: [showsBaseUrlField({ preset }) ? (_jsxs("label", { className: "jini-field", onBlurCapture: () => validation.markTouched({ field: 'baseUrl' }), children: [_jsxs("span", { className: "jini-field-label", children: [t('Base URL'), preset?.baseUrl ? null : _jsx("span", { className: "jini-field-required", "aria-hidden": "true", children: "*" })] }), _jsx("input", { className: 'jini-input' + missingClass(validation, 'baseUrl'), type: "url", inputMode: "url", spellCheck: false, value: config.baseUrl, onChange: (event) => patch({ baseUrl: event.target.value }), onBlur: (event) => onBaseUrlCommit?.({ baseUrl: event.currentTarget.value }), onKeyDown: (event) => commitBaseUrlOnEnter({ event, onBaseUrlCommit }), ...agentHandleProps({}, { base: agentHandle, ...({ action: 'base-url', role: 'field', label: t('Base URL') }) }) }), _jsx("span", { className: 'jini-field-hint' + (validation.baseUrlInvalid ? ' is-error' : ''), children: validation.baseUrlInvalid
|
|
35
46
|
? t('Enter an absolute http(s) URL.')
|
|
36
47
|
: t('Default endpoint. Usually no need to change this.') })] })) : null, _jsxs("label", { className: "jini-field", children: [_jsx("span", { className: "jini-field-label", children: t('Max tokens (optional)') }), _jsx("input", { className: "jini-input", type: "number", min: 1, step: 1, value: config.maxTokens ?? '', onChange: (event) => patch({ maxTokens: parseMaxTokens({ raw: event.target.value }) }), ...agentHandleProps({}, { base: agentHandle, ...({ action: 'max-tokens', role: 'field', label: t('Max tokens (optional)') }) }) }), _jsx("span", { className: "jini-field-hint", children: t('Cap on the response length. Leave blank to use the model default.') })] })] }) }));
|
|
37
48
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import { useT } from '../../../i18n/index.js';
|
|
3
|
-
import type { ExecutionPort } from '
|
|
4
|
-
import type { AgentCliEnvFieldSpec, DetectedAgent, ExecutionConfig, ProviderPreset } from '../../types.js';
|
|
3
|
+
import type { AgentCliEnvFieldSpec, ExecutionCardAgent, ExecutionConfig, ExecutionPort, ProviderPreset } from '@jini-ai/core/contracts/execution';
|
|
5
4
|
import { useExecutionTabView } from './ExecutionTab.hooks.js';
|
|
6
5
|
export interface ExecutionTabProps {
|
|
7
6
|
config: ExecutionConfig;
|
|
@@ -19,7 +18,7 @@ export interface ExecutionTabProps {
|
|
|
19
18
|
localCliUnavailableReason?: string;
|
|
20
19
|
/** Rendered in each agent card's icon slot — vendor marks are the host's to
|
|
21
20
|
* supply, since this package ships no logo set. */
|
|
22
|
-
renderAgentIcon?: (agent:
|
|
21
|
+
renderAgentIcon?: (agent: ExecutionCardAgent) => ReactNode;
|
|
23
22
|
/** Where local-CLI detection actually runs, in the host's words. See
|
|
24
23
|
* `LocalCliAgentListProps.scopeLabel` — a hosted deployment must not tell
|
|
25
24
|
* the operator these are the CLIs "on this machine". */
|