@jini-ai/ui 0.3.14 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +139 -0
- package/README.md +120 -26
- package/dist/browser/index.js +1 -1
- package/dist/browser/useDismissOnOutsideOrEscape.d.ts +10 -1
- package/dist/browser/useDismissOnOutsideOrEscape.js +7 -4
- package/dist/browser/useGlobalKeydown.d.ts +14 -2
- package/dist/browser/useGlobalKeydown.js +8 -17
- package/dist/features/a2ui/catalog-from-registry.d.ts +6 -3
- package/dist/features/a2ui/catalog-from-registry.js +1 -1
- package/dist/features/a2ui/index.d.ts +1 -1
- package/dist/features/a2ui/protocol.d.ts +1 -1
- package/dist/features/a2ui/renderer.js +23 -10
- package/dist/features/a2ui/use-a2ui-surface.d.ts +11 -6
- package/dist/features/a2ui/use-a2ui-surface.js +40 -10
- package/dist/features/admin-widgets/components/ComingSoonNotice.d.ts +11 -0
- package/dist/features/admin-widgets/components/ComingSoonNotice.js +7 -0
- package/dist/features/admin-widgets/components/ComingSoonPanel.d.ts +10 -0
- package/dist/features/admin-widgets/components/ComingSoonPanel.js +10 -0
- package/dist/features/admin-widgets/components/ImagePreviewModal.d.ts +16 -0
- package/dist/features/admin-widgets/components/ImagePreviewModal.hooks.d.ts +13 -0
- package/dist/features/admin-widgets/components/ImagePreviewModal.hooks.js +46 -0
- package/dist/features/admin-widgets/components/ImagePreviewModal.js +13 -0
- package/dist/features/admin-widgets/components/InfoTip.d.ts +18 -0
- package/dist/features/admin-widgets/components/InfoTip.hooks.d.ts +16 -0
- package/dist/features/admin-widgets/components/InfoTip.hooks.js +45 -0
- package/dist/features/admin-widgets/components/InfoTip.js +12 -0
- package/dist/features/admin-widgets/components/SeeMore/SeeMore.d.ts +41 -0
- package/dist/features/admin-widgets/components/SeeMore/SeeMore.hooks.d.ts +14 -0
- package/dist/features/admin-widgets/components/SeeMore/SeeMore.hooks.js +57 -0
- package/dist/features/admin-widgets/components/SeeMore/SeeMore.js +24 -0
- package/dist/features/admin-widgets/components/Select/Select.d.ts +39 -0
- package/dist/features/admin-widgets/components/Select/Select.hooks.d.ts +105 -0
- package/dist/features/admin-widgets/components/Select/Select.hooks.js +359 -0
- package/dist/features/admin-widgets/components/Select/Select.js +46 -0
- package/dist/features/admin-widgets/index.d.ts +20 -0
- package/dist/features/admin-widgets/index.js +11 -0
- package/dist/features/admin-widgets/styles/admin-widgets.css +2 -0
- package/dist/features/appearance/constants.d.ts +2 -2
- package/dist/features/appearance/constants.js +2 -1
- package/dist/features/appearance/react/components/AppearanceTab.js +5 -5
- package/dist/features/appearance/rules.d.ts +10 -4
- package/dist/features/appearance/rules.js +5 -5
- package/dist/features/appearance/types.d.ts +1 -1
- package/dist/features/appearance/types.js +1 -1
- package/dist/features/asset-grid/react/components/AssetGrid.js +1 -1
- package/dist/features/asset-grid/react/components/DeleteConfirmDialog.js +1 -1
- package/dist/features/asset-grid/react/hooks/useAssetGridKeyboardShortcuts.js +23 -21
- package/dist/features/asset-grid/react/hooks/useAssetGridLiveUpdates.d.ts +1 -1
- package/dist/features/asset-grid/react/hooks/useAssetGridLiveUpdates.js +1 -1
- package/dist/features/asset-tree-browser/ports.d.ts +3 -1
- package/dist/features/asset-tree-browser/react/hooks/useAssetTreeCopyLocalPath.js +1 -1
- package/dist/features/browser-chrome/react/components/BrowserViewportControls.js +1 -1
- package/dist/features/browser-chrome/types.js +1 -1
- package/dist/features/command-palette/ports.js +1 -1
- package/dist/features/connectors/ConnectorsBrowser.js +2 -2
- package/dist/features/connectors/components/ConnectorCard.js +3 -3
- package/dist/features/connectors/components/ConnectorDetailDrawer.js +1 -1
- package/dist/features/connectors/components/ConnectorGrid.js +2 -2
- package/dist/features/connectors/components/ConnectorSearchBar.js +2 -2
- package/dist/features/connectors/components/ProviderTabBar.js +2 -2
- package/dist/features/connectors/constants.d.ts +1 -1
- package/dist/features/connectors/constants.js +1 -1
- package/dist/features/connectors/hooks/useConnectorAuthorization.js +1 -1
- package/dist/features/connectors/rules.d.ts +2 -2
- package/dist/features/connectors/rules.js +1 -1
- package/dist/features/connectors/types.d.ts +2 -2
- package/dist/features/connectors/types.js +1 -1
- package/dist/features/execution/react/components/ByokProviderForm.js +3 -3
- package/dist/features/execution/react/components/ExecutionTab.js +2 -2
- package/dist/features/execution/react/components/LocalCliAgentCard.js +3 -3
- package/dist/features/execution/react/components/LocalCliAgentList.js +2 -2
- package/dist/features/execution/react/components/ProviderChipGroup.js +2 -2
- package/dist/features/execution/react/components/SearchableModelSelect.js +1 -1
- package/dist/features/execution/rules.js +1 -1
- package/dist/features/file-dropzone/react/components/FileDropzone.js +5 -3
- package/dist/features/file-dropzone/react/hooks/useFileDropzone.d.ts +1 -1
- package/dist/features/file-dropzone/react/hooks/useFileDropzone.js +1 -1
- package/dist/features/file-dropzone/types.d.ts +1 -1
- package/dist/features/file-dropzone/types.js +1 -1
- package/dist/features/folder-path-drop/react/hooks/useFolderPathDropCapture.js +6 -4
- package/dist/features/html-editor/canvas-content-wrapper.js +1 -1
- package/dist/features/html-editor/canvas-embed-placeholders.js +7 -7
- package/dist/features/html-editor/canvas-style.d.ts +4 -0
- package/dist/features/html-editor/canvas-style.js +6 -21
- package/dist/features/html-viewer/constants.d.ts +1 -1
- package/dist/features/html-viewer/constants.js +1 -1
- package/dist/features/html-viewer/react/components/PresentMenu.js +1 -1
- package/dist/features/html-viewer/react/components/ZoomMenu.js +1 -1
- package/dist/features/html-viewer/types.d.ts +1 -1
- package/dist/features/html-viewer/types.js +1 -1
- package/dist/features/i18n/dictionaries/index.d.ts +2 -3
- package/dist/features/i18n/dictionaries/settings-dialog.en.d.ts +1 -1
- package/dist/features/i18n/dictionary-translator.d.ts +16 -0
- package/dist/features/i18n/dictionary-translator.js +14 -0
- package/dist/features/i18n/index.d.ts +3 -0
- package/dist/features/i18n/index.js +2 -0
- package/dist/features/i18n/locale.d.ts +1 -1
- package/dist/features/i18n/template-i18n.d.ts +26 -0
- package/dist/features/i18n/template-i18n.js +36 -0
- package/dist/features/iframe-pool/react/components/IframeKeepAliveProvider.d.ts +1 -1
- package/dist/features/iframe-pool/react/components/IframeKeepAliveProvider.js +1 -1
- package/dist/features/instructions/react/components/InstructionsTab.js +1 -1
- package/dist/features/integrations/react/components/ClientPicker.js +4 -4
- package/dist/features/integrations/react/components/CodexInstallToggleButton.js +1 -1
- package/dist/features/integrations/react/components/IntegrationsTab.js +2 -2
- package/dist/features/integrations/react/components/SnippetBlock.js +1 -1
- package/dist/features/integrations/types.d.ts +1 -1
- package/dist/features/integrations/types.js +1 -1
- package/dist/features/interactive-ui/index.js +13 -13
- package/dist/features/interactive-ui/interactive-ui.css +1 -1
- package/dist/features/interactive-ui/providers/recharts/bar-chart.js +1 -1
- package/dist/features/interactive-ui/providers/recharts/line-chart.js +1 -1
- package/dist/features/interactive-ui/providers/recharts/pie-chart.js +2 -2
- package/dist/features/interactive-ui/providers/shadcn/lib/utils.d.ts +1 -1
- package/dist/features/interactive-ui/providers/shadcn/lib/utils.js +1 -1
- package/dist/features/interactive-ui/registry.d.ts +15 -4
- package/dist/features/interactive-ui/registry.js +5 -5
- package/dist/features/language/react/components/LanguageTab.js +2 -2
- package/dist/features/list-detail-panel/types.d.ts +1 -1
- package/dist/features/list-detail-panel/types.js +1 -1
- package/dist/features/mcp-ui/confirmation-store.js +2 -1
- package/dist/features/mcp-ui/surfaces/tokens.d.ts +17 -20
- package/dist/features/mcp-ui/surfaces/tokens.js +33 -35
- package/dist/features/media-providers/index.d.ts +1 -1
- package/dist/features/media-providers/index.js +1 -1
- package/dist/features/media-providers/react/components/MediaProvidersTab.js +4 -4
- package/dist/features/media-providers/rules.js +1 -1
- package/dist/features/memory/async-commit-guard.d.ts +1 -1
- package/dist/features/memory/constants.d.ts +1 -1
- package/dist/features/memory/constants.js +1 -1
- package/dist/features/memory/dependencies.d.ts +11 -23
- package/dist/features/memory/dependencies.js +116 -106
- package/dist/features/memory/index.d.ts +1 -1
- package/dist/features/memory/index.js +1 -1
- package/dist/features/memory/react/components/MemoryAdvancedModal.js +2 -2
- package/dist/features/memory/react/components/MemoryEntryCard.js +1 -1
- package/dist/features/memory/react/components/MemoryExtractionCard.js +1 -1
- package/dist/features/memory/react/components/MemoryHooksPanel.js +1 -1
- package/dist/features/memory/react/components/MemoryList.js +5 -5
- package/dist/features/memory/react/components/MemoryManualEditor.js +5 -5
- package/dist/features/memory/react/components/MemorySettingsPanel.js +1 -1
- package/dist/features/memory/react/hooks/useMemoryEntries.hooks.js +1 -1
- package/dist/features/memory/react/hooks/useMemoryNavigation.hooks.js +1 -1
- package/dist/features/memory/react/styles.js +1 -1
- package/dist/features/memory/rules.js +1 -1
- package/dist/features/memory/types.d.ts +1 -1
- package/dist/features/mention-autocomplete/react/hooks/useMentionAutocomplete.js +1 -1
- package/dist/features/notifications/react/components/NotificationsTab.js +7 -7
- package/dist/features/notifications/types.d.ts +1 -1
- package/dist/features/observability/boot-timing.js +2 -2
- package/dist/features/observability/stuck-run.js +1 -1
- package/dist/features/observability/white-screen.js +4 -4
- package/dist/features/panel-kit/fetch-query/adapter.react.d.ts +35 -0
- package/dist/features/panel-kit/fetch-query/adapter.react.js +122 -0
- package/dist/features/panel-kit/fetch-query/cache.d.ts +123 -0
- package/dist/features/panel-kit/fetch-query/cache.js +231 -0
- package/dist/features/panel-kit/fetch-query/environment.browser.d.ts +4 -0
- package/dist/features/panel-kit/fetch-query/environment.browser.js +25 -0
- package/dist/features/panel-kit/fetch-query/index.d.ts +4 -0
- package/dist/features/panel-kit/fetch-query/index.js +2 -0
- package/dist/features/panel-kit/fetch-query/types.d.ts +91 -0
- package/dist/features/panel-kit/fetch-query/types.js +2 -0
- package/dist/features/panel-kit/helpers/format-timestamp.d.ts +18 -0
- package/dist/features/panel-kit/helpers/format-timestamp.js +20 -0
- package/dist/features/panel-kit/helpers/permissions.d.ts +11 -0
- package/dist/features/panel-kit/helpers/permissions.js +10 -0
- package/dist/features/panel-kit/helpers/resolve-active-tab-id.d.ts +13 -0
- package/dist/features/panel-kit/helpers/resolve-active-tab-id.js +13 -0
- package/dist/features/panel-kit/helpers/retry-unreachable.d.ts +20 -0
- package/dist/features/panel-kit/helpers/retry-unreachable.js +39 -0
- package/dist/features/panel-kit/hooks/use-async-action.hooks.d.ts +13 -0
- package/dist/features/panel-kit/hooks/use-async-action.hooks.js +27 -0
- package/dist/features/panel-kit/hooks/use-dirty-guard.hooks.d.ts +18 -0
- package/dist/features/panel-kit/hooks/use-dirty-guard.hooks.js +33 -0
- package/dist/features/panel-kit/hooks/use-focus-trap.hooks.d.ts +8 -0
- package/dist/features/panel-kit/hooks/use-focus-trap.hooks.js +66 -0
- package/dist/features/panel-kit/hooks/use-serial-writes.hooks.d.ts +26 -0
- package/dist/features/panel-kit/hooks/use-serial-writes.hooks.js +41 -0
- package/dist/features/panel-kit/hooks/use-settlement-generation.hooks.d.ts +9 -0
- package/dist/features/panel-kit/hooks/use-settlement-generation.hooks.js +25 -0
- package/dist/features/panel-kit/index.d.ts +19 -0
- package/dist/features/panel-kit/index.js +13 -0
- package/dist/features/privacy/react/components/PrivacyTab.js +2 -2
- package/dist/features/privacy/types.d.ts +1 -1
- package/dist/features/privacy/types.js +1 -1
- package/dist/features/progress-card/reference-adapters.d.ts +1 -1
- package/dist/features/progress-card/rules.d.ts +1 -1
- package/dist/features/progress-card/rules.js +1 -1
- package/dist/features/progress-card/types.d.ts +1 -1
- package/dist/features/progress-card/types.js +1 -1
- package/dist/features/resource-dashboard/dependencies.d.ts +1 -1
- package/dist/features/resource-dashboard/ports.d.ts +1 -1
- package/dist/features/resource-dashboard/react/hooks/useResourceBoard.d.ts +1 -1
- package/dist/features/resource-dashboard/react/hooks/useResourceBoard.js +1 -1
- package/dist/features/resource-dashboard/rules.d.ts +1 -1
- package/dist/features/resource-dashboard/rules.js +2 -2
- package/dist/features/resource-dashboard/types.d.ts +4 -4
- package/dist/features/resource-dashboard/types.js +1 -1
- package/dist/features/schedule-picker/react/hooks/useRecurringSchedulePicker.js +1 -1
- package/dist/features/settings/dialog/styles/settings-dialog.css +62 -60
- package/dist/features/sketch-editor/constants.d.ts +1 -1
- package/dist/features/sketch-editor/constants.js +1 -1
- package/dist/features/sketch-editor/dom.d.ts +1 -1
- package/dist/features/sketch-editor/dom.js +1 -1
- package/dist/features/sketch-editor/react/hooks/useSketchDomEnhancements.d.ts +1 -1
- package/dist/features/sketch-editor/react/hooks/useSketchDomEnhancements.js +11 -9
- package/dist/features/sketch-editor/types.d.ts +1 -1
- package/dist/features/sketch-editor/types.js +1 -1
- package/dist/features/skills/react/components/SkillDraftForm.js +1 -1
- package/dist/features/skills/react/components/SkillRow.js +1 -1
- package/dist/features/skills/react/components/SkillsTab.js +2 -2
- package/dist/features/source-config-list/agent-handles.js +2 -2
- package/dist/features/source-config-list/react/hooks/useSourceConfigAddForm.d.ts +1 -1
- package/dist/features/source-config-list/react/hooks/useSourceConfigAddForm.js +1 -1
- package/dist/features/source-config-list/rules.d.ts +1 -1
- package/dist/features/source-config-list/rules.js +3 -3
- package/dist/features/source-config-list/types.d.ts +1 -1
- package/dist/features/source-config-list/types.js +1 -1
- package/dist/features/tab-launcher-menu/react/hooks/useTabLauncherMenu.js +1 -1
- package/dist/features/tab-strip/index.d.ts +4 -0
- package/dist/features/tab-strip/index.js +2 -0
- package/dist/features/tab-strip/react/components/TabBar.d.ts +23 -0
- package/dist/features/tab-strip/react/components/TabBar.hooks.d.ts +25 -0
- package/dist/features/tab-strip/react/components/TabBar.hooks.js +57 -0
- package/dist/features/tab-strip/react/components/TabBar.js +18 -0
- package/dist/features/tab-strip/react/components/TabStrip.js +2 -1
- package/dist/features/tab-strip/react/components/TabStripFrame.d.ts +3 -0
- package/dist/features/tab-strip/react/components/TabStripFrame.js +7 -0
- package/dist/features/tabbed-dialog/react/hooks/useTabbedDialog.js +1 -1
- package/dist/features/tabbed-dialog/styles/tabbed-dialog.css +8 -141
- package/dist/features/tabbed-dialog/types.d.ts +1 -1
- package/dist/features/tabbed-dialog/types.js +1 -1
- package/dist/features/version-manager/ports.d.ts +1 -1
- package/dist/features/version-manager/react/components/VersionPromptPopover.js +5 -3
- package/dist/features/version-manager/react/components/VersionRestoreControl.js +1 -1
- package/dist/features/version-manager/types.d.ts +1 -1
- package/dist/features/version-manager/types.js +1 -1
- package/dist/features/viewer-shell/dependencies.js +1 -1
- package/dist/features/viewer-shell/ports.d.ts +1 -1
- package/dist/features/viewer-shell/react/components/ViewportSwitcher.js +1 -1
- package/dist/features/viewer-shell/react/hooks/useMarkdownScrollSync.d.ts +1 -1
- package/dist/features/viewer-shell/react/hooks/useMarkdownScrollSync.js +1 -1
- package/dist/features/viewer-shell/types.d.ts +1 -1
- package/dist/features/viewer-shell/types.js +1 -1
- package/dist/index.d.ts +420 -0
- package/dist/index.js +421 -1
- package/dist/react/components/ComponentKitPreview.js +1 -1
- package/dist/react/components/EditorIcon.d.ts +1 -1
- package/dist/react/components/EditorIcon.js +22 -22
- package/dist/react/components/ExportDiagnosticsButton.d.ts +8 -1
- package/dist/react/components/ExportDiagnosticsButton.js +6 -6
- package/dist/react/components/PaletteTweaks.js +5 -5
- package/dist/react/hooks/useBrandFonts.d.ts +19 -4
- package/dist/react/hooks/useBrandFonts.js +11 -7
- package/dist/react/hooks/useDebouncedValue.d.ts +12 -1
- package/dist/react/hooks/useDebouncedValue.js +9 -4
- package/dist/react/hooks/useStableHandler.d.ts +3 -1
- package/dist/react/hooks/useStableHandler.js +1 -1
- package/dist/renderers/annotation-canvas/drawing.d.ts +4 -4
- package/dist/renderers/annotation-canvas/drawing.js +28 -15
- package/dist/renderers/annotation-canvas/react/components/AnnotationCanvas.js +2 -2
- package/dist/renderers/annotation-canvas/react/hooks/useAnnotationCanvas.js +4 -3
- package/dist/renderers/annotation-canvas/rules.d.ts +1 -1
- package/dist/renderers/annotation-canvas/theme.d.ts +13 -0
- package/dist/renderers/annotation-canvas/theme.js +16 -0
- package/dist/renderers/annotation-canvas/types.d.ts +1 -1
- package/dist/renderers/index.d.ts +1 -1
- package/dist/renderers/new-tab-preview.d.ts +3 -0
- package/dist/renderers/new-tab-preview.js +3 -1
- package/dist/renderers/preview-modal-shell/react/hooks/usePreviewModalShell.d.ts +1 -1
- package/dist/renderers/preview-modal-shell/react/hooks/usePreviewModalShell.js +1 -1
- package/dist/renderers/preview-modal-shell/rules.d.ts +1 -1
- package/dist/renderers/preview-modal-shell/types.d.ts +3 -3
- package/dist/renderers/preview-modal-shell/types.js +2 -2
- package/dist/renderers/react/components/ArtifactView.d.ts +1 -1
- package/dist/renderers/react/components/ArtifactView.js +1 -1
- package/dist/renderers/registry.d.ts +12 -6
- package/dist/renderers/registry.js +7 -9
- package/dist/renderers/renderers/html.js +2 -2
- package/dist/renderers/renderers/index.js +1 -1
- package/dist/renderers/renderers/markdown.js +2 -2
- package/dist/renderers/renderers/react-component.js +1 -1
- package/dist/renderers/renderers/svg.js +1 -1
- package/dist/renderers/shiki.js +1 -1
- package/dist/renderers/srcdoc/build.d.ts +1 -1
- package/dist/renderers/srcdoc/build.js +1 -1
- package/dist/renderers/url-load-decision.d.ts +1 -1
- package/dist/renderers/url-load-decision.js +1 -1
- package/dist/styles/admin.css +273 -0
- package/dist/styles/variables.css +117 -0
- package/dist/theme/apply.d.ts +9 -0
- package/dist/theme/apply.js +77 -0
- package/dist/theme/color-scheme.d.ts +8 -0
- package/dist/theme/color-scheme.js +9 -0
- package/dist/theme/default.d.ts +4 -0
- package/dist/theme/default.js +11 -0
- package/dist/theme/index.d.ts +6 -0
- package/dist/theme/index.js +5 -0
- package/dist/theme/stylesheet.d.ts +8 -0
- package/dist/theme/stylesheet.js +14 -0
- package/dist/theme/types.d.ts +39 -0
- package/dist/theme/types.js +2 -0
- package/dist/theme/validation.d.ts +15 -0
- package/dist/theme/validation.js +55 -0
- package/dist/utils/appearance.js +1 -1
- package/dist/utils/browser-request.d.ts +12 -0
- package/dist/utils/browser-request.js +10 -0
- package/dist/utils/color-math.d.ts +20 -6
- package/dist/utils/color-math.js +12 -12
- package/dist/utils/copy-to-clipboard.d.ts +19 -8
- package/dist/utils/copy-to-clipboard.js +15 -11
- package/dist/utils/dom-subscriptions.js +1 -1
- package/dist/utils/endpoint-policy.d.ts +9 -3
- package/dist/utils/endpoint-policy.js +5 -5
- package/dist/utils/markdown-scroll-sync.js +3 -3
- package/dist/utils/notifications.d.ts +1 -1
- package/dist/utils/notifications.js +1 -1
- package/dist/utils/polygon-selection.d.ts +1 -1
- package/dist/utils/polygon-selection.js +1 -1
- package/dist/utils/scroll-tabs-with-wheel.d.ts +4 -1
- package/dist/utils/scroll-tabs-with-wheel.js +1 -1
- package/dist/utils/smooth-scroll-to-top.js +1 -1
- package/dist/utils/sse.d.ts +3 -1
- package/dist/utils/sse.js +1 -1
- package/package.json +105 -16
- package/dist/features/lexical-rich-text-editor/react/test-support/lexical-harness.d.ts +0 -11
- package/dist/features/lexical-rich-text-editor/react/test-support/lexical-harness.js +0 -35
|
@@ -13,16 +13,16 @@ const ACCENT_VARS = ['--accent', '--accent-strong', '--accent-soft', '--accent-t
|
|
|
13
13
|
* string or does not match `#rrggbb`.
|
|
14
14
|
* @complexity O(1).
|
|
15
15
|
*/
|
|
16
|
-
export function normalizeAccentColor(value) {
|
|
16
|
+
export function normalizeAccentColor({ value }) {
|
|
17
17
|
if (typeof value !== 'string')
|
|
18
18
|
return null;
|
|
19
19
|
const trimmed = value.trim();
|
|
20
20
|
return /^#[0-9a-fA-F]{6}$/.test(trimmed) ? trimmed.toLowerCase() : null;
|
|
21
21
|
}
|
|
22
|
-
/** `normalizeAccentColor(value) ?? DEFAULT_ACCENT_COLOR` — always returns a
|
|
22
|
+
/** `normalizeAccentColor({ value }) ?? DEFAULT_ACCENT_COLOR` — always returns a
|
|
23
23
|
* usable color. */
|
|
24
|
-
export function resolveAccentColor(value) {
|
|
25
|
-
return normalizeAccentColor(value) ?? DEFAULT_ACCENT_COLOR;
|
|
24
|
+
export function resolveAccentColor({ value }) {
|
|
25
|
+
return normalizeAccentColor({ value }) ?? DEFAULT_ACCENT_COLOR;
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
28
|
* Pure computation of the five `--accent*` CSS custom property values for a
|
|
@@ -33,7 +33,7 @@ export function resolveAccentColor(value) {
|
|
|
33
33
|
*
|
|
34
34
|
* @complexity O(1) — five template-string formulas, no DOM access.
|
|
35
35
|
*/
|
|
36
|
-
export function accentVars(accentColor) {
|
|
36
|
+
export function accentVars({ accentColor }) {
|
|
37
37
|
return {
|
|
38
38
|
'--accent': accentColor,
|
|
39
39
|
'--accent-strong': `color-mix(in srgb, ${accentColor} 86%, var(--text-strong))`,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Origin: `AppearanceSection` in `SettingsDialog.tsx` (theme segmented
|
|
3
3
|
* control + accent-color swatch grid + custom color picker), GENERIC per
|
|
4
4
|
* `ADS-memory/reports/jini-port/recon/r6-god-component-internals.md` §1.3. See
|
|
5
|
-
* `packages/ui/
|
|
5
|
+
* `packages/ui/archived provenance ledger` for the full provenance note.
|
|
6
6
|
*/
|
|
7
7
|
/** `'system'` in addition to this package's `AppearanceTheme` ('light' |
|
|
8
8
|
* 'dark') — the origin's segmented control has a third "follow the OS"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Origin: `AppearanceSection` in `SettingsDialog.tsx` (theme segmented
|
|
3
3
|
* control + accent-color swatch grid + custom color picker), GENERIC per
|
|
4
4
|
* `ADS-memory/reports/jini-port/recon/r6-god-component-internals.md` §1.3. See
|
|
5
|
-
* `packages/ui/
|
|
5
|
+
* `packages/ui/archived provenance ledger` for the full provenance note.
|
|
6
6
|
*/
|
|
7
7
|
export {};
|
|
8
8
|
//# sourceMappingURL=types.js.map
|
|
@@ -29,7 +29,7 @@ export function AssetGrid({ active = true, selectors, dependencies, kindFacets =
|
|
|
29
29
|
const [confirmDeleteOpen, setConfirmDeleteOpen] = useState(false);
|
|
30
30
|
/** Message from a delete the host rejected. Rendered inline — see `runDelete`. */
|
|
31
31
|
const [deleteError, setDeleteError] = useState(null);
|
|
32
|
-
const debouncedSearch = useDebouncedValue(search, searchDebounceMs);
|
|
32
|
+
const debouncedSearch = useDebouncedValue({ value: search, delayMs: searchDebounceMs });
|
|
33
33
|
const filtersActive = !!(kind || source || debouncedSearch.trim());
|
|
34
34
|
// `dependencies` (host-supplied, or omitted to fall back to the package's
|
|
35
35
|
// in-memory fake) is resolved by each wirer independently — neither this
|
|
@@ -14,7 +14,7 @@ export function DeleteConfirmDialog({ count, onCancel, onConfirm }) {
|
|
|
14
14
|
const t = useT();
|
|
15
15
|
const titleId = useId();
|
|
16
16
|
const confirmBtnRef = useRef(null);
|
|
17
|
-
useDismissOnOutsideOrEscape(onCancel);
|
|
17
|
+
useDismissOnOutsideOrEscape({ onDismiss: onCancel });
|
|
18
18
|
useEffect(() => {
|
|
19
19
|
confirmBtnRef.current?.focus();
|
|
20
20
|
const previousOverflow = document.body.style.overflow;
|
|
@@ -3,28 +3,30 @@ import { isTypingTarget } from '../../rules.js';
|
|
|
3
3
|
/** Cmd/Ctrl+A select-all, Escape clear-selection, Delete/Backspace triggers the bulk-delete confirm flow. */
|
|
4
4
|
export function useAssetGridKeyboardShortcuts(params) {
|
|
5
5
|
const { active, enabled, hasAssets, hasSelection, isPreviewOpen, onSelectAll, onClearSelection, onRequestDeleteSelected, } = params;
|
|
6
|
-
useGlobalKeydown(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const typing = isTypingTarget(document.activeElement);
|
|
10
|
-
if ((e.metaKey || e.ctrlKey) && (e.key === 'a' || e.key === 'A')) {
|
|
11
|
-
if (typing || !hasAssets)
|
|
6
|
+
useGlobalKeydown({
|
|
7
|
+
handler: (e) => {
|
|
8
|
+
if (!enabled)
|
|
12
9
|
return;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
10
|
+
const typing = isTypingTarget(document.activeElement);
|
|
11
|
+
if ((e.metaKey || e.ctrlKey) && (e.key === 'a' || e.key === 'A')) {
|
|
12
|
+
if (typing || !hasAssets)
|
|
13
|
+
return;
|
|
14
|
+
e.preventDefault();
|
|
15
|
+
onSelectAll();
|
|
16
|
+
}
|
|
17
|
+
else if (e.key === 'Escape') {
|
|
18
|
+
if (isPreviewOpen)
|
|
19
|
+
return; // the preview surface owns Escape while it's open
|
|
20
|
+
if (hasSelection)
|
|
21
|
+
onClearSelection();
|
|
22
|
+
}
|
|
23
|
+
else if (e.key === 'Delete' || e.key === 'Backspace') {
|
|
24
|
+
if (typing || isPreviewOpen || !hasSelection)
|
|
25
|
+
return;
|
|
26
|
+
e.preventDefault();
|
|
27
|
+
onRequestDeleteSelected();
|
|
28
|
+
}
|
|
29
|
+
},
|
|
28
30
|
}, { enabled: active });
|
|
29
31
|
}
|
|
30
32
|
//# sourceMappingURL=useAssetGridKeyboardShortcuts.js.map
|
|
@@ -17,7 +17,7 @@ export interface UseAssetGridLiveUpdatesParams<TAsset extends AssetGridItem> {
|
|
|
17
17
|
* changed ids, drop the deleted ids) instead of one full reload per event.
|
|
18
18
|
* A burst of many events, a filtered view, or an event with no resolvable
|
|
19
19
|
* id all fall back to a single full reload for that window — see
|
|
20
|
-
* `packages/ui/
|
|
20
|
+
* `packages/ui/archived provenance ledger` for why (the original OD comment: "a filtered
|
|
21
21
|
* view can't predict membership client-side").
|
|
22
22
|
*/
|
|
23
23
|
export declare function useAssetGridLiveUpdates<TAsset extends AssetGridItem>(params: UseAssetGridLiveUpdatesParams<TAsset>): void;
|
|
@@ -9,7 +9,7 @@ import { createFakeAssetGridDependencies } from '../../dependencies.js';
|
|
|
9
9
|
* changed ids, drop the deleted ids) instead of one full reload per event.
|
|
10
10
|
* A burst of many events, a filtered view, or an event with no resolvable
|
|
11
11
|
* id all fall back to a single full reload for that window — see
|
|
12
|
-
* `packages/ui/
|
|
12
|
+
* `packages/ui/archived provenance ledger` for why (the original OD comment: "a filtered
|
|
13
13
|
* view can't predict membership client-side").
|
|
14
14
|
*/
|
|
15
15
|
export function useAssetGridLiveUpdates(params) {
|
|
@@ -14,7 +14,9 @@
|
|
|
14
14
|
/** Clipboard write, abstracted so the feature's rename/copy-local-path flows stay testable without touching `navigator.clipboard`. */
|
|
15
15
|
export interface AssetTreeClipboardPort {
|
|
16
16
|
/** @returns `true` on a successful copy, `false` if every copy strategy failed. */
|
|
17
|
-
copyToClipboard(
|
|
17
|
+
copyToClipboard(requiredArgs: {
|
|
18
|
+
text: string;
|
|
19
|
+
}): Promise<boolean>;
|
|
18
20
|
}
|
|
19
21
|
/**
|
|
20
22
|
* Small browser-global bridges this feature needs but has no reason to
|
|
@@ -8,7 +8,7 @@ import { COPY_LOCAL_PATH_CONFIRM_MS } from '../../constants.js';
|
|
|
8
8
|
export function useAssetTreeCopyLocalPath(clipboard, confirmMs = COPY_LOCAL_PATH_CONFIRM_MS) {
|
|
9
9
|
const [copiedPath, setCopiedPath] = useState(null);
|
|
10
10
|
const copyLocalPath = useCallback(async (path, localPath) => {
|
|
11
|
-
const copied = await clipboard.copyToClipboard(localPath);
|
|
11
|
+
const copied = await clipboard.copyToClipboard({ text: localPath });
|
|
12
12
|
if (!copied)
|
|
13
13
|
return;
|
|
14
14
|
setCopiedPath(path);
|
|
@@ -27,7 +27,7 @@ export function BrowserViewportControls({ viewport, onViewport, disabled, preset
|
|
|
27
27
|
const [open, setOpen] = useState(false);
|
|
28
28
|
const menuRef = useRef(null);
|
|
29
29
|
const activePreset = presets.find((preset) => preset.id === viewport) ?? presets[0];
|
|
30
|
-
useDismissOnOutsideOrEscape(() => setOpen(false), { enabled: open, containerRef: menuRef });
|
|
30
|
+
useDismissOnOutsideOrEscape({ onDismiss: () => setOpen(false) }, { enabled: open, containerRef: menuRef });
|
|
31
31
|
if (!activePreset)
|
|
32
32
|
return null;
|
|
33
33
|
return (_jsxs("div", { className: "jini-browser-viewport-switcher", ref: menuRef, children: [_jsx("span", { className: "jini-tooltip jini-browser-viewport-tooltip-anchor", "data-tooltip": t(activePreset.title), "data-tooltip-placement": "bottom", children: _jsxs("button", { type: "button", className: `jini-browser-viewport-trigger${open ? ' is-active' : ''}`, "aria-label": t(activePreset.title), "aria-haspopup": "listbox", "aria-expanded": open, disabled: disabled ?? false, onClick: () => setOpen((value) => !value), children: [_jsx(RemixIcon, { name: viewportIconName(activePreset.id), size: 14, className: "jini-browser-viewport-icon" }), _jsx("span", { className: "jini-browser-viewport-label", children: t(activePreset.label) }), _jsx(RemixIcon, { name: "arrow-down-s-line", size: 13 })] }) }), open ? (_jsx("div", { className: "jini-browser-viewport-menu", role: "listbox", "aria-label": t('Viewport'), children: presets.map((preset) => (_jsxs("button", { type: "button", role: "option", "aria-selected": preset.id === viewport, className: preset.id === viewport ? 'active' : '', onClick: () => {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// esbuild transform: zero emitted statements), so v8/istanbul coverage has
|
|
10
10
|
// no executable line to measure and reports 0/0 as 0% rather than N/A.
|
|
11
11
|
// Excluded from the feature's coverage run via `--coverage.exclude` (see
|
|
12
|
-
// packages/ui/
|
|
12
|
+
// packages/ui/archived provenance ledger's browser-chrome section) rather than chasing a
|
|
13
13
|
// phantom gap.
|
|
14
14
|
export {};
|
|
15
15
|
//# sourceMappingURL=types.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Coverage note: `export interface` only — erases to an empty module at
|
|
2
2
|
// compile time (verified: zero emitted statements), so v8/istanbul has no
|
|
3
3
|
// executable line to measure. Excluded from the coverage run alongside this
|
|
4
|
-
// package's other interface-only ports files (see packages/ui/
|
|
4
|
+
// package's other interface-only ports files (see packages/ui/archived provenance ledger).
|
|
5
5
|
export {};
|
|
6
6
|
//# sourceMappingURL=ports.js.map
|
|
@@ -53,8 +53,8 @@ export function ConnectorsBrowser({ unlocked, providerTabs = DEFAULT_PROVIDER_TA
|
|
|
53
53
|
onProviderTabClick?.('gate_card');
|
|
54
54
|
gate?.onClick?.();
|
|
55
55
|
}, [onProviderTabClick, gate]);
|
|
56
|
-
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, ...(agentHandle ? { agentHandle: agentSubHandle(agentHandle, 'provider') } : {}) }), _jsx(ConnectorSearchBar, { value: filter, onChange: setFilter, disabled: !unlocked, onFocus: () => onProviderTabClick?.('search_connectors'), ...(agentHandle ? { agentHandle: agentSubHandle(agentHandle, '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, onConnect: (connectorId) => void authorization.runConnectorAction(connectorId, 'connect'), onDisconnect: (connectorId) => void authorization.runConnectorAction(connectorId, 'disconnect'), onCancelAuthorization: (connectorId) => void authorization.cancelAuthorization(connectorId), onOpenDetails: detail.openDetails, onOpenExternalUrl: (url) => void deps.data.openExternalUrl(url), ...(getCategoryLabel ? { getCategoryLabel } : {}), onClearSearch: () => setFilter(''), ...(gate ? { gate: { ...gate, onClick: handleGateClick } } : {}), ...(agentHandle ? { agentHandle: agentSubHandle(agentHandle, 'connector') } : {}) })), detail.detailConnector ? (_jsx(ConnectorDetailDrawer, { connector: detail.detailConnector, disabled: !unlocked, pendingAction: authorization.pendingConnectorAction?.connectorId === detail.detailConnector.id
|
|
56
|
+
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, ...(agentHandle ? { agentHandle: agentSubHandle({ base: agentHandle, action: 'provider' }) } : {}) }), _jsx(ConnectorSearchBar, { value: filter, onChange: setFilter, disabled: !unlocked, onFocus: () => onProviderTabClick?.('search_connectors'), ...(agentHandle ? { agentHandle: agentSubHandle({ 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, onConnect: (connectorId) => void authorization.runConnectorAction(connectorId, 'connect'), onDisconnect: (connectorId) => void authorization.runConnectorAction(connectorId, 'disconnect'), onCancelAuthorization: (connectorId) => void authorization.cancelAuthorization(connectorId), onOpenDetails: detail.openDetails, onOpenExternalUrl: (url) => void deps.data.openExternalUrl(url), ...(getCategoryLabel ? { getCategoryLabel } : {}), onClearSearch: () => setFilter(''), ...(gate ? { gate: { ...gate, onClick: handleGateClick } } : {}), ...(agentHandle ? { agentHandle: agentSubHandle({ base: agentHandle, action: 'connector' }) } : {}) })), detail.detailConnector ? (_jsx(ConnectorDetailDrawer, { connector: detail.detailConnector, disabled: !unlocked, pendingAction: authorization.pendingConnectorAction?.connectorId === detail.detailConnector.id
|
|
57
57
|
? authorization.pendingConnectorAction.action
|
|
58
|
-
: null, authorizationPending: authorization.pending[detail.detailConnector.id], authorizationCancelFailed: authorization.cancelFailed[detail.detailConnector.id] === true, authorizationError: authorization.authError[detail.detailConnector.id] ?? null, toolsPreviewLoading: detail.toolPreviewLoading, toolsLoaded: detail.toolsLoaded, onClose: detail.closeDetails, onConnect: (connectorId) => void authorization.runConnectorAction(connectorId, 'connect'), onDisconnect: (connectorId) => void authorization.runConnectorAction(connectorId, 'disconnect'), onCancelAuthorization: (connectorId) => void authorization.cancelAuthorization(connectorId), onLoadMoreTools: (connectorId, cursor) => void detail.loadMoreTools(connectorId, cursor), onOpenExternalUrl: (url) => void deps.data.openExternalUrl(url), ...(getCategoryLabel ? { getCategoryLabel } : {}), ...(getDisplayableAccountLabel ? { getDisplayableAccountLabel } : {}), ...(agentHandle ? { agentHandle: agentSubHandle(agentHandle, 'detail') } : {}) })) : null] }));
|
|
58
|
+
: null, authorizationPending: authorization.pending[detail.detailConnector.id], authorizationCancelFailed: authorization.cancelFailed[detail.detailConnector.id] === true, authorizationError: authorization.authError[detail.detailConnector.id] ?? null, toolsPreviewLoading: detail.toolPreviewLoading, toolsLoaded: detail.toolsLoaded, onClose: detail.closeDetails, onConnect: (connectorId) => void authorization.runConnectorAction(connectorId, 'connect'), onDisconnect: (connectorId) => void authorization.runConnectorAction(connectorId, 'disconnect'), onCancelAuthorization: (connectorId) => void authorization.cancelAuthorization(connectorId), onLoadMoreTools: (connectorId, cursor) => void detail.loadMoreTools(connectorId, cursor), onOpenExternalUrl: (url) => void deps.data.openExternalUrl(url), ...(getCategoryLabel ? { getCategoryLabel } : {}), ...(getDisplayableAccountLabel ? { getDisplayableAccountLabel } : {}), ...(agentHandle ? { agentHandle: agentSubHandle({ base: agentHandle, action: 'detail' }) } : {}) })) : null] }));
|
|
59
59
|
}
|
|
60
60
|
//# sourceMappingURL=ConnectorsBrowser.js.map
|
|
@@ -47,13 +47,13 @@ export function ConnectorCard({ connector, disabled = false, pendingAction, auth
|
|
|
47
47
|
// packages/ui/source-map.md's 2026-07-22 dated entry).
|
|
48
48
|
onOpenExternalUrl?.(authorizationPending.redirectUrl);
|
|
49
49
|
}
|
|
50
|
-
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(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 }), isConnected ? (_jsx("span", { className: `connector-status-dot connector-card-title-dot status-${connector.status}`, "aria-label": t(statusLabel(connector.status)), title: t(statusLabel(connector.status)), role: "img" })) : isAuthorizationPending ? (_jsx("span", { className: "connector-status-dot connector-card-title-dot status-pending", "aria-label": t('Authorization pending'), title: t('Authorization pending'), role: "img" })) : null] }), _jsxs("div", { className: "connector-meta", children: [_jsx("span", { className: "connector-meta-item connector-meta-category", title: categoryLabel, children: categoryLabel }), _jsx("span", { className: "connector-meta-tools", "aria-hidden": !showToolsBadge, children: showToolsBadge ? (_jsx("span", { className: "connector-tools-badge is-ready", title: toolsBadgeLabel, children: _jsx("span", { children: toolsBadgeLabel }) })) : null })] })] }), _jsxs("div", { className: "connector-card-actions", children: [isConnected ? (_jsx("button", { type: "button", className: `icon-only connector-action is-disconnect${isDisconnecting ? ' is-loading' : ''}`, disabled: !canDisconnect, "aria-busy": isDisconnecting || undefined, "aria-label": t('Disconnect'), title: t('Disconnect'), tabIndex: disabled ? -1 : undefined, onMouseDown: stop, onKeyDown: stop, onClick: (e) => {
|
|
50
|
+
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 }), isConnected ? (_jsx("span", { className: `connector-status-dot connector-card-title-dot status-${connector.status}`, "aria-label": t(statusLabel(connector.status)), title: t(statusLabel(connector.status)), role: "img" })) : isAuthorizationPending ? (_jsx("span", { className: "connector-status-dot connector-card-title-dot status-pending", "aria-label": t('Authorization pending'), title: t('Authorization pending'), role: "img" })) : null] }), _jsxs("div", { className: "connector-meta", children: [_jsx("span", { className: "connector-meta-item connector-meta-category", title: categoryLabel, children: categoryLabel }), _jsx("span", { className: "connector-meta-tools", "aria-hidden": !showToolsBadge, children: showToolsBadge ? (_jsx("span", { className: "connector-tools-badge is-ready", title: toolsBadgeLabel, children: _jsx("span", { children: toolsBadgeLabel }) })) : null })] })] }), _jsxs("div", { className: "connector-card-actions", children: [isConnected ? (_jsx("button", { type: "button", className: `icon-only connector-action is-disconnect${isDisconnecting ? ' is-loading' : ''}`, disabled: !canDisconnect, "aria-busy": isDisconnecting || undefined, "aria-label": t('Disconnect'), title: t('Disconnect'), tabIndex: disabled ? -1 : undefined, onMouseDown: stop, onKeyDown: stop, onClick: (e) => {
|
|
51
51
|
stop(e);
|
|
52
52
|
onDisconnect(connector.id);
|
|
53
|
-
}, ...agentHandleProps(agentHandle, { action: 'disconnect', role: 'button', label: t('Disconnect') }), children: _jsx(Icon, { name: isDisconnecting ? 'spinner' : 'close', size: 12 }) })) : (_jsx("button", { type: "button", className: `icon-only connector-action is-connect${isConnecting || isAuthorizationPending ? ' is-loading' : ''}`, disabled: !canConnect, "aria-busy": isConnecting || isAuthorizationPending || undefined, "aria-label": isAuthorizationPending ? t('Authorization pending') : t('Connect'), title: isAuthorizationPending ? t('Authorization in progress') : t('Connect'), tabIndex: disabled ? -1 : undefined, onMouseDown: stop, onKeyDown: stop, onClick: (e) => {
|
|
53
|
+
}, ...agentHandleProps({}, { base: agentHandle, ...({ action: 'disconnect', role: 'button', label: t('Disconnect') }) }), children: _jsx(Icon, { name: isDisconnecting ? 'spinner' : 'close', size: 12 }) })) : (_jsx("button", { type: "button", className: `icon-only connector-action is-connect${isConnecting || isAuthorizationPending ? ' is-loading' : ''}`, disabled: !canConnect, "aria-busy": isConnecting || isAuthorizationPending || undefined, "aria-label": isAuthorizationPending ? t('Authorization pending') : t('Connect'), title: isAuthorizationPending ? t('Authorization in progress') : t('Connect'), tabIndex: disabled ? -1 : undefined, onMouseDown: stop, onKeyDown: stop, onClick: (e) => {
|
|
54
54
|
stop(e);
|
|
55
55
|
onConnect(connector.id);
|
|
56
|
-
}, ...agentHandleProps(agentHandle, { action: 'connect', role: 'button', label: t('Connect') }), children: _jsx(Icon, { name: isConnecting || isAuthorizationPending ? 'spinner' : 'plus', size: 12 }) })), isAuthorizationPending ? (_jsx("button", { type: "button", className: "icon-only connector-action is-cancel-authorization", "aria-label": t('Cancel authorization'), title: t('Cancel authorization'), onMouseDown: stop, onKeyDown: stop, onClick: (e) => {
|
|
56
|
+
}, ...agentHandleProps({}, { base: agentHandle, ...({ action: 'connect', role: 'button', label: t('Connect') }) }), children: _jsx(Icon, { name: isConnecting || isAuthorizationPending ? 'spinner' : 'plus', size: 12 }) })), isAuthorizationPending ? (_jsx("button", { type: "button", className: "icon-only connector-action is-cancel-authorization", "aria-label": t('Cancel authorization'), title: t('Cancel authorization'), onMouseDown: stop, onKeyDown: stop, onClick: (e) => {
|
|
57
57
|
stop(e);
|
|
58
58
|
onCancelAuthorization(connector.id);
|
|
59
59
|
}, children: _jsx(Icon, { name: "close", size: 12 }) })) : null, connector.status === 'error' || connector.status === 'disabled' ? (_jsx("span", { className: `connector-status-pill status-${connector.status}`, children: t(statusLabel(connector.status)) })) : null] })] }), authorizationCancelFailed ? (_jsx("p", { className: "connector-authorization-hint connector-authorization-error", role: "alert", children: resolvedCancelFailedMessage })) : null, isAuthorizationPending && authorizationPending.redirectUrl ? (_jsx("button", { type: "button", className: "connector-authorization-link", title: t('Authorization in progress'), onClick: continueAuthorization, children: resolvedContinueInBrowserLabel })) : null] }));
|
|
@@ -65,6 +65,6 @@ export function ConnectorDetailDrawer({ connector, disabled, pendingAction, auth
|
|
|
65
65
|
return (_jsx("div", { className: "connector-drawer-backdrop", role: "presentation", onMouseDown: (e) => {
|
|
66
66
|
if (e.target === e.currentTarget)
|
|
67
67
|
onClose();
|
|
68
|
-
}, 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(agentHandle, { role: 'region', label: connector.name }), children: [_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(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(agentHandle, { action: 'close', role: 'button', label: t('Close') }), children: _jsx(Icon, { name: "close", size: 14 }) })] }), _jsxs("div", { className: "connector-drawer-body", children: [connector.description ? (_jsxs("section", { className: "connector-drawer-section", children: [_jsx("h3", { className: "connector-drawer-section-title", children: t('About') }), _jsx("p", { className: "connector-drawer-description", children: connector.description }), isAuthorizationPending ? (_jsxs("div", { className: "connector-authorization-block", role: "status", children: [_jsx("p", { className: "connector-authorization-hint", children: t('Authorization in progress. It should finish shortly.') }), authorizationPending.redirectUrl ? (_jsx("button", { type: "button", className: "connector-authorization-link", onClick: continueAuthorization, children: resolvedContinueInBrowserLabel })) : null] })) : null] })) : null, authorizationError ? (_jsx("p", { className: "connector-authorization-hint connector-authorization-error", role: "alert", children: authorizationError })) : null, authorizationCancelFailed ? (_jsx("p", { className: "connector-authorization-hint connector-authorization-error", role: "alert", children: resolvedCancelFailedMessage })) : null, _jsxs("section", { className: "connector-drawer-section", children: [_jsxs("div", { className: "connector-drawer-section-head", children: [_jsx("h3", { className: "connector-drawer-section-title", children: t('Details') }), isConnected ? (_jsxs("button", { type: "button", className: `ghost connector-drawer-inline-action connector-action is-disconnect${isDisconnecting ? ' is-loading' : ''}`, disabled: !canDisconnect, "aria-busy": isDisconnecting || undefined, onClick: () => onDisconnect(connector.id), ...agentHandleProps(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: "connector-drawer-details", children: [_jsxs("div", { children: [_jsx("dt", { children: t('Status') }), _jsx("dd", { children: t(statusLabel(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: "connector-drawer-details-error", children: [_jsx("dt", { children: t('Error') }), _jsx("dd", { children: connector.lastError })] })) : null] })] }), _jsxs("section", { className: "connector-drawer-section", children: [_jsxs("h3", { className: "connector-drawer-section-title", children: [t('Tools'), " ", _jsx("span", { className: "connector-drawer-count", children: toolCount })] }), isLoadingTools ? (_jsxs("p", { className: "connector-drawer-empty", children: [_jsx(Icon, { name: "spinner", size: 12 }), " ", t('Loading tools…')] })) : toolDetailsUnavailable ? (_jsx("p", { className: "connector-drawer-empty", children: t('Tool details unavailable ({count})', { count: toolCount }) })) : actualToolCount === 0 ? (_jsx("p", { className: "connector-drawer-empty", children: t('No tools available') })) : (_jsxs(_Fragment, { children: [_jsx("ul", { className: "connector-drawer-tools", children: connector.tools.map((tool) => (_jsxs("li", { className: "connector-drawer-tool", children: [_jsxs("div", { className: "connector-drawer-tool-head", children: [_jsx("span", { className: "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: "connector-drawer-tool-desc", children: tool.description }) : null, _jsx("code", { className: "connector-drawer-tool-name", children: tool.name })] }, tool.name))) }), connector.toolsNextCursor ? (_jsx("button", { type: "button", className: "ghost connector-drawer-load-more", disabled: toolsPreviewLoading, onClick: () => onLoadMoreTools(connector.id, connector.toolsNextCursor), children: _jsx("span", { children: t('Load more tools') }) })) : null] }))] })] }), !isConnected ? (_jsxs("footer", { className: "connector-drawer-foot", children: [_jsxs("button", { type: "button", className: `primary connector-action is-connect${isConnecting || isAuthorizationPending ? ' is-loading' : ''}`, disabled: !canConnect, "aria-busy": isConnecting || isAuthorizationPending || undefined, onClick: () => onConnect(connector.id), ...agentHandleProps(agentHandle, { action: 'connect', role: 'button', label: t('Connect') }), children: [isConnecting || isAuthorizationPending ? _jsx(Icon, { name: "spinner", size: 12 }) : null, _jsx("span", { children: isAuthorizationPending ? t('Authorization pending') : t('Connect') })] }), isAuthorizationPending ? (_jsx("button", { type: "button", className: "ghost connector-action is-cancel-authorization", onClick: () => onCancelAuthorization(connector.id), ...agentHandleProps(agentHandle, { action: 'cancel-authorization', role: 'button', label: t('Cancel authorization') }), children: _jsx("span", { children: t('Cancel authorization') }) })) : null] })) : null] }) }));
|
|
68
|
+
}, 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: [_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(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 }) })] }), _jsxs("div", { className: "connector-drawer-body", children: [connector.description ? (_jsxs("section", { className: "connector-drawer-section", children: [_jsx("h3", { className: "connector-drawer-section-title", children: t('About') }), _jsx("p", { className: "connector-drawer-description", children: connector.description }), isAuthorizationPending ? (_jsxs("div", { className: "connector-authorization-block", role: "status", children: [_jsx("p", { className: "connector-authorization-hint", children: t('Authorization in progress. It should finish shortly.') }), authorizationPending.redirectUrl ? (_jsx("button", { type: "button", className: "connector-authorization-link", onClick: continueAuthorization, children: resolvedContinueInBrowserLabel })) : null] })) : null] })) : null, authorizationError ? (_jsx("p", { className: "connector-authorization-hint connector-authorization-error", role: "alert", children: authorizationError })) : null, authorizationCancelFailed ? (_jsx("p", { className: "connector-authorization-hint connector-authorization-error", role: "alert", children: resolvedCancelFailedMessage })) : null, _jsxs("section", { className: "connector-drawer-section", children: [_jsxs("div", { className: "connector-drawer-section-head", children: [_jsx("h3", { className: "connector-drawer-section-title", children: t('Details') }), isConnected ? (_jsxs("button", { type: "button", className: `ghost connector-drawer-inline-action connector-action is-disconnect${isDisconnecting ? ' is-loading' : ''}`, disabled: !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: "connector-drawer-details", children: [_jsxs("div", { children: [_jsx("dt", { children: t('Status') }), _jsx("dd", { children: t(statusLabel(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: "connector-drawer-details-error", children: [_jsx("dt", { children: t('Error') }), _jsx("dd", { children: connector.lastError })] })) : null] })] }), _jsxs("section", { className: "connector-drawer-section", children: [_jsxs("h3", { className: "connector-drawer-section-title", children: [t('Tools'), " ", _jsx("span", { className: "connector-drawer-count", children: toolCount })] }), isLoadingTools ? (_jsxs("p", { className: "connector-drawer-empty", children: [_jsx(Icon, { name: "spinner", size: 12 }), " ", t('Loading tools…')] })) : toolDetailsUnavailable ? (_jsx("p", { className: "connector-drawer-empty", children: t('Tool details unavailable ({count})', { count: toolCount }) })) : actualToolCount === 0 ? (_jsx("p", { className: "connector-drawer-empty", children: t('No tools available') })) : (_jsxs(_Fragment, { children: [_jsx("ul", { className: "connector-drawer-tools", children: connector.tools.map((tool) => (_jsxs("li", { className: "connector-drawer-tool", children: [_jsxs("div", { className: "connector-drawer-tool-head", children: [_jsx("span", { className: "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: "connector-drawer-tool-desc", children: tool.description }) : null, _jsx("code", { className: "connector-drawer-tool-name", children: tool.name })] }, tool.name))) }), connector.toolsNextCursor ? (_jsx("button", { type: "button", className: "ghost connector-drawer-load-more", disabled: toolsPreviewLoading, onClick: () => onLoadMoreTools(connector.id, connector.toolsNextCursor), children: _jsx("span", { children: t('Load more tools') }) })) : null] }))] })] }), !isConnected ? (_jsxs("footer", { className: "connector-drawer-foot", children: [_jsxs("button", { type: "button", className: `primary connector-action is-connect${isConnecting || isAuthorizationPending ? ' is-loading' : ''}`, disabled: !canConnect, "aria-busy": isConnecting || isAuthorizationPending || undefined, onClick: () => onConnect(connector.id), ...agentHandleProps({}, { base: agentHandle, ...({ action: 'connect', role: 'button', label: t('Connect') }) }), children: [isConnecting || isAuthorizationPending ? _jsx(Icon, { name: "spinner", size: 12 }) : null, _jsx("span", { children: isAuthorizationPending ? t('Authorization pending') : t('Connect') })] }), isAuthorizationPending ? (_jsx("button", { type: "button", className: "ghost connector-action is-cancel-authorization", onClick: () => onCancelAuthorization(connector.id), ...agentHandleProps({}, { base: agentHandle, ...({ action: 'cancel-authorization', role: 'button', label: t('Cancel authorization') }) }), children: _jsx("span", { children: t('Cancel authorization') }) })) : null] })) : null] }) }));
|
|
69
69
|
}
|
|
70
70
|
//# sourceMappingURL=ConnectorDetailDrawer.js.map
|
|
@@ -9,7 +9,7 @@ export function ConnectorGrid({ connectors, locked, hasNoResults, searchQuery, p
|
|
|
9
9
|
const resolvedEmptyNoMatchTitle = emptyNoMatchTitle ?? ((query) => t('No connectors match "{query}"', { query }));
|
|
10
10
|
const resolvedEmptyNoMatchBody = emptyNoMatchBody ?? t('Try a different search term.');
|
|
11
11
|
const resolvedEmptyNoMatchAction = emptyNoMatchAction ?? t('Clear search');
|
|
12
|
-
const cardHandles = agentHandle ? buildAgentListHandles(agentHandle, connectors.map((c) => c.id)) : undefined;
|
|
13
|
-
return (_jsxs("div", { className: `connector-grid-wrap${locked ? ' is-masked' : ''}`, "data-testid": "connector-grid-wrap", children: [hasNoResults && !locked ? (_jsxs("div", { className: "tab-empty connectors-empty", role: "status", "aria-live": "polite", "data-testid": "connectors-empty", children: [_jsx("p", { className: "connectors-empty-title", children: resolvedEmptyNoMatchTitle(searchQuery.trim()) }), _jsx("p", { className: "connectors-empty-body", children: resolvedEmptyNoMatchBody }), _jsx("button", { type: "button", className: "ghost connectors-empty-action", onClick: onClearSearch, ...agentHandleProps(agentHandle, { action: 'clear-search', role: 'button', label: resolvedEmptyNoMatchAction }), children: resolvedEmptyNoMatchAction })] })) : (_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] }));
|
|
12
|
+
const cardHandles = agentHandle ? buildAgentListHandles({ prefix: agentHandle, ids: connectors.map((c) => c.id) }) : undefined;
|
|
13
|
+
return (_jsxs("div", { className: `connector-grid-wrap${locked ? ' is-masked' : ''}`, "data-testid": "connector-grid-wrap", children: [hasNoResults && !locked ? (_jsxs("div", { className: "tab-empty connectors-empty", role: "status", "aria-live": "polite", "data-testid": "connectors-empty", children: [_jsx("p", { className: "connectors-empty-title", children: resolvedEmptyNoMatchTitle(searchQuery.trim()) }), _jsx("p", { className: "connectors-empty-body", children: resolvedEmptyNoMatchBody }), _jsx("button", { type: "button", className: "ghost connectors-empty-action", onClick: onClearSearch, ...agentHandleProps({}, { base: agentHandle, ...({ action: 'clear-search', role: 'button', label: resolvedEmptyNoMatchAction }) }), children: resolvedEmptyNoMatchAction })] })) : (_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] }));
|
|
14
14
|
}
|
|
15
15
|
//# sourceMappingURL=ConnectorGrid.js.map
|
|
@@ -17,9 +17,9 @@ export function ConnectorSearchBar({ value, onChange, disabled = false, onFocus,
|
|
|
17
17
|
onChange('');
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
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(agentHandle, { role: 'field', label: resolvedAriaLabel }) }), hasQuery ? (_jsx("button", { type: "button", className: "toolbar-search-clear", "aria-label": resolvedClearAriaLabel, onClick: () => {
|
|
20
|
+
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: () => {
|
|
21
21
|
onChange('');
|
|
22
22
|
inputRef.current?.focus();
|
|
23
|
-
}, "data-testid": "connectors-search-clear", ...agentHandleProps(agentHandle, { action: 'clear', role: 'button', label: resolvedClearAriaLabel }), children: _jsx(Icon, { name: "close", size: 12 }) })) : null] }));
|
|
23
|
+
}, "data-testid": "connectors-search-clear", ...agentHandleProps({}, { base: agentHandle, ...({ action: 'clear', role: 'button', label: resolvedClearAriaLabel }) }), children: _jsx(Icon, { name: "close", size: 12 }) })) : null] }));
|
|
24
24
|
}
|
|
25
25
|
//# sourceMappingURL=ConnectorSearchBar.js.map
|
|
@@ -5,10 +5,10 @@ import { useT } from '../../i18n/index.js';
|
|
|
5
5
|
export function ProviderTabBar({ tabs, selectedId, onSelect, ariaLabel, agentHandle }) {
|
|
6
6
|
const t = useT();
|
|
7
7
|
const resolvedAriaLabel = ariaLabel ?? t('Connector provider');
|
|
8
|
-
const tabHandles = agentHandle ? buildAgentListHandles(agentHandle, tabs.map((tab) => tab.id)) : undefined;
|
|
8
|
+
const tabHandles = agentHandle ? buildAgentListHandles({ prefix: agentHandle, ids: tabs.map((tab) => tab.id) }) : undefined;
|
|
9
9
|
return (_jsx("div", { className: "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(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: `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
|
|
@@ -7,7 +7,7 @@ export declare const CONNECTOR_AUTH_CONTINUE_LABEL = "Continue in browser";
|
|
|
7
7
|
* Default single-tab provider config, kept only so the feature renders
|
|
8
8
|
* something sensible out of the box. A real host supplies its own
|
|
9
9
|
* `providerTabs` prop — see `ConnectorsBrowserProps`. Per the canary plan,
|
|
10
|
-
* the ~90-entry
|
|
10
|
+
* the ~90-entry Connector Provider category->i18n label map was dropped as OD-specific
|
|
11
11
|
* data; a host supplies its own `getCategoryLabel`.
|
|
12
12
|
*/
|
|
13
13
|
export declare const DEFAULT_PROVIDER_TABS: {
|
|
@@ -7,7 +7,7 @@ export const CONNECTOR_AUTH_CONTINUE_LABEL = 'Continue in browser';
|
|
|
7
7
|
* Default single-tab provider config, kept only so the feature renders
|
|
8
8
|
* something sensible out of the box. A real host supplies its own
|
|
9
9
|
* `providerTabs` prop — see `ConnectorsBrowserProps`. Per the canary plan,
|
|
10
|
-
* the ~90-entry
|
|
10
|
+
* the ~90-entry Connector Provider category->i18n label map was dropped as OD-specific
|
|
11
11
|
* data; a host supplies its own `getCategoryLabel`.
|
|
12
12
|
*/
|
|
13
13
|
export const DEFAULT_PROVIDER_TABS = [
|
|
@@ -150,7 +150,7 @@ export function useConnectorAuthorization(port, authPendingStorage, authBridge,
|
|
|
150
150
|
// this stale-sweep success path with a real `pending[id]` entry,
|
|
151
151
|
// `authError[id]` is guaranteed already absent. Left in place
|
|
152
152
|
// (not stripped) as a guard against a future refactor breaking
|
|
153
|
-
// that invariant — see packages/ui/
|
|
153
|
+
// that invariant — see packages/ui/archived provenance ledger's 2026-07-22
|
|
154
154
|
// dated entry for the full proof.
|
|
155
155
|
setAuthError((curr) => {
|
|
156
156
|
if (curr[connectorId] === undefined)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Pure logic ported from OD's ConnectorsBrowser.tsx + the two small pure
|
|
3
3
|
* helpers it imported from EntryView.tsx (isTrustedConnectorCallbackOrigin,
|
|
4
4
|
* sortConnectorsForSearch/getConnectorSearchScore/sortConnectorsForDisplay).
|
|
5
|
-
* No React, no transport, no DOM — see `packages/ui/
|
|
5
|
+
* No React, no transport, no DOM — see `packages/ui/archived provenance ledger`.
|
|
6
6
|
*/
|
|
7
7
|
import type { Connector, ConnectorAuthorizationPendingState, ConnectorActionResult, ConnectorStatusMap, ConnectorPanelAlert, ConnectorStatus, ProviderTab } from './types.js';
|
|
8
8
|
/** Restricts the catalog to a single provider tab's `match` predicate, defaulting to the first tab. */
|
|
@@ -35,7 +35,7 @@ export declare function isTrustedConnectorCallbackOrigin(origin: string, current
|
|
|
35
35
|
export declare function connectorPanelAlerts(connectors: Connector[], detailConnectorId: string | null, authorizationError: Record<string, string>, authorizationCancelFailed: Record<string, boolean>, cancelFailedMessage: string): ConnectorPanelAlert[];
|
|
36
36
|
/**
|
|
37
37
|
* Default `getDisplayableAccountLabel` — shows any account label the host
|
|
38
|
-
* supplies. The origin hid this for one specific provider (
|
|
38
|
+
* supplies. The origin hid this for one specific provider (Connector Provider) with no
|
|
39
39
|
* documented rationale; that's provider-specific policy, not generic logic,
|
|
40
40
|
* so it's now a host-overridable default rather than baked in here. A host
|
|
41
41
|
* that wants to hide the label for a specific provider passes its own
|
|
@@ -307,7 +307,7 @@ export function connectorPanelAlerts(connectors, detailConnectorId, authorizatio
|
|
|
307
307
|
}
|
|
308
308
|
/**
|
|
309
309
|
* Default `getDisplayableAccountLabel` — shows any account label the host
|
|
310
|
-
* supplies. The origin hid this for one specific provider (
|
|
310
|
+
* supplies. The origin hid this for one specific provider (Connector Provider) with no
|
|
311
311
|
* documented rationale; that's provider-specific policy, not generic logic,
|
|
312
312
|
* so it's now a host-overridable default rather than baked in here. A host
|
|
313
313
|
* that wants to hide the label for a specific provider passes its own
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Generic OAuth-integration-marketplace domain types. Ported from the origin
|
|
3
3
|
* product's ConnectorsBrowser.tsx (see the vendored reference tree cited in
|
|
4
|
-
* `packages/ui/
|
|
4
|
+
* `packages/ui/archived provenance ledger`), stripped of Connector Provider/product-specific
|
|
5
5
|
* wire-shape specifics — see that file for the full provenance note.
|
|
6
6
|
*/
|
|
7
7
|
export type ConnectorStatus = 'available' | 'connected' | 'error' | 'disabled';
|
|
@@ -22,7 +22,7 @@ export interface ConnectorAuthBinding {
|
|
|
22
22
|
export interface Connector {
|
|
23
23
|
id: string;
|
|
24
24
|
name: string;
|
|
25
|
-
/** Display provider name (e.g. "
|
|
25
|
+
/** Display provider name (e.g. "Connector Provider", "Zapier"). */
|
|
26
26
|
provider: string;
|
|
27
27
|
category: string;
|
|
28
28
|
description?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Generic OAuth-integration-marketplace domain types. Ported from the origin
|
|
3
3
|
* product's ConnectorsBrowser.tsx (see the vendored reference tree cited in
|
|
4
|
-
* `packages/ui/
|
|
4
|
+
* `packages/ui/archived provenance ledger`), stripped of Connector Provider/product-specific
|
|
5
5
|
* wire-shape specifics — see that file for the full provenance note.
|
|
6
6
|
*/
|
|
7
7
|
export {};
|
|
@@ -81,9 +81,9 @@ export function ByokProviderForm({ config, onConfigChange, preset, presets = DEF
|
|
|
81
81
|
|
|
82
82
|
Known trade-off, not fixed here: Chrome may now offer to GENERATE a password on
|
|
83
83
|
this field — a suggestion popup, not a silently wrong value. */
|
|
84
|
-
autoComplete: "new-password", spellCheck: false, placeholder: apiKeyPlaceholder, value: config.apiKey, onChange: (event) => patch({ apiKey: event.target.value }), ...agentHandleProps(agentHandle, { action: 'api-key', role: 'field', label: t('API key') }) }), _jsx("button", { type: "button", className: "jini-input-affix-btn", "aria-pressed": revealKey, onClick: () => setRevealKey((shown) => !shown), ...agentHandleProps(agentHandle, { action: 'reveal-key', role: 'button', label: t('Reveal API key') }), children: revealKey ? t('Hide') : t('Show') })] }), _jsx("span", { className: "jini-field-hint", children: t('Stored only by this host.') }), keyFormatWarning ? (_jsx("span", { className: "jini-field-hint is-error", role: "status", children: t(keyFormatWarning.message, keyFormatWarning.vars) })) : null] }), apiKeyFooter ? _jsx("div", { className: "jini-byok-key-footer", children: apiKeyFooter }) : null] })) : null, _jsxs("div", { className: "jini-byok-field-row", children: [showsBaseUrlField(preset) ? (_jsxs("label", { className: "jini-field", children: [_jsxs("span", { className: "jini-field-label", children: [t('Base URL'), _jsx("span", { className: "jini-field-required", "aria-hidden": "true", children: "*" })] }), _jsx("input", { className: 'jini-input' + (baseUrlInvalid || missing.has('baseUrl') ? ' is-missing' : ''), type: "url", inputMode: "url", spellCheck: false, value: config.baseUrl, onChange: (event) => patch({ baseUrl: event.target.value }), ...agentHandleProps(agentHandle, { action: 'base-url', role: 'field', label: t('Base URL') }) }), _jsx("span", { className: 'jini-field-hint' + (baseUrlInvalid ? ' is-error' : ''), children: baseUrlInvalid
|
|
84
|
+
autoComplete: "new-password", spellCheck: false, placeholder: apiKeyPlaceholder, value: config.apiKey, onChange: (event) => patch({ apiKey: event.target.value }), ...agentHandleProps({}, { base: agentHandle, ...({ action: 'api-key', role: 'field', label: t('API key') }) }) }), _jsx("button", { type: "button", className: "jini-input-affix-btn", "aria-pressed": revealKey, onClick: () => setRevealKey((shown) => !shown), ...agentHandleProps({}, { base: agentHandle, ...({ action: 'reveal-key', role: 'button', label: t('Reveal API key') }) }), children: revealKey ? t('Hide') : t('Show') })] }), _jsx("span", { className: "jini-field-hint", children: t('Stored only by this host.') }), keyFormatWarning ? (_jsx("span", { className: "jini-field-hint is-error", role: "status", children: t(keyFormatWarning.message, keyFormatWarning.vars) })) : null] }), apiKeyFooter ? _jsx("div", { className: "jini-byok-key-footer", children: apiKeyFooter }) : null] })) : null, _jsxs("div", { className: "jini-byok-field-row", children: [showsBaseUrlField(preset) ? (_jsxs("label", { className: "jini-field", children: [_jsxs("span", { className: "jini-field-label", children: [t('Base URL'), _jsx("span", { className: "jini-field-required", "aria-hidden": "true", children: "*" })] }), _jsx("input", { className: 'jini-input' + (baseUrlInvalid || missing.has('baseUrl') ? ' is-missing' : ''), 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' + (baseUrlInvalid ? ' is-error' : ''), children: baseUrlInvalid
|
|
85
85
|
? t('Enter an absolute http(s) URL.')
|
|
86
|
-
: 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(event.target.value) }), ...agentHandleProps(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.') })] })] }), _jsxs("div", { className: "jini-byok-model-row", children: [_jsxs("label", { className: "jini-field", children: [_jsxs("span", { className: "jini-field-label", children: [t('Model'), _jsx("span", { className: "jini-field-required", "aria-hidden": "true", children: "*" })] }), showModelPicker ? (_jsx(SearchableModelSelect, { className: 'jini-input' + (missing.has('model') ? ' is-missing' : ''), ariaLabel: t('Model'), searchPlaceholder: t('Search models'), testId: "jini-byok-model-select", searchInputTestId: "jini-byok-model-search", ...(agentHandle ? { agentHandle: agentSubHandle(agentHandle, 'model') } : {}), value: customModelActive ? CUSTOM_MODEL_SENTINEL : config.model, models: liveModels.map((model) => ({ id: model, label: model })), additionalOptions: [{ value: CUSTOM_MODEL_SENTINEL, label: t('Custom…') }], onChange: (next) => {
|
|
86
|
+
: 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(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.') })] })] }), _jsxs("div", { className: "jini-byok-model-row", children: [_jsxs("label", { className: "jini-field", children: [_jsxs("span", { className: "jini-field-label", children: [t('Model'), _jsx("span", { className: "jini-field-required", "aria-hidden": "true", children: "*" })] }), showModelPicker ? (_jsx(SearchableModelSelect, { className: 'jini-input' + (missing.has('model') ? ' is-missing' : ''), ariaLabel: t('Model'), searchPlaceholder: t('Search models'), testId: "jini-byok-model-select", searchInputTestId: "jini-byok-model-search", ...(agentHandle ? { agentHandle: agentSubHandle({ base: agentHandle, action: 'model' }) } : {}), value: customModelActive ? CUSTOM_MODEL_SENTINEL : config.model, models: liveModels.map((model) => ({ id: model, label: model })), additionalOptions: [{ value: CUSTOM_MODEL_SENTINEL, label: t('Custom…') }], onChange: (next) => {
|
|
87
87
|
if (next === CUSTOM_MODEL_SENTINEL) {
|
|
88
88
|
// Open the free-text box WITHOUT clearing `config.model`. Blanking it here would
|
|
89
89
|
// discard a working model the moment someone opened the picker to look at it.
|
|
@@ -92,7 +92,7 @@ export function ByokProviderForm({ config, onConfigChange, preset, presets = DEF
|
|
|
92
92
|
}
|
|
93
93
|
setExplicitCustomModel(false);
|
|
94
94
|
patch({ model: next });
|
|
95
|
-
} })) : null, !showModelPicker || customModelActive ? (_jsx("input", { className: 'jini-input' + (missing.has('model') ? ' is-missing' : ''), list: !showModelPicker && suggestions.length > 0 ? modelListId : undefined, spellCheck: false, value: config.model, onChange: (event) => patch({ model: event.target.value }), ...agentHandleProps(agentHandle, { action: 'model', role: 'field', label: t('Model') }) })) : null, !showModelPicker && suggestions.length > 0 ? (_jsx("datalist", { id: modelListId, children: suggestions.map((model) => (_jsx("option", { value: model }, model))) })) : null] }), canTestConnection ? (_jsx("button", { type: "button", className: "jini-btn jini-byok-test-btn", disabled: connectionTest.status === 'testing' || missing.size > 0, onClick: onTestConnection, ...agentHandleProps(agentHandle, { action: 'test-connection', role: 'button', label: t('Test connection') }), children: connectionTest.status === 'testing' ? t('Testing…') : t('Test connection') })) : null] }), modelDiscovery.status === 'error' ? (
|
|
95
|
+
} })) : null, !showModelPicker || customModelActive ? (_jsx("input", { className: 'jini-input' + (missing.has('model') ? ' is-missing' : ''), list: !showModelPicker && suggestions.length > 0 ? modelListId : undefined, spellCheck: false, value: config.model, onChange: (event) => patch({ model: event.target.value }), ...agentHandleProps({}, { base: agentHandle, ...({ action: 'model', role: 'field', label: t('Model') }) }) })) : null, !showModelPicker && suggestions.length > 0 ? (_jsx("datalist", { id: modelListId, children: suggestions.map((model) => (_jsx("option", { value: model }, model))) })) : null] }), canTestConnection ? (_jsx("button", { type: "button", className: "jini-btn jini-byok-test-btn", disabled: connectionTest.status === 'testing' || missing.size > 0, onClick: onTestConnection, ...agentHandleProps({}, { base: agentHandle, ...({ action: 'test-connection', role: 'button', label: t('Test connection') }) }), children: connectionTest.status === 'testing' ? t('Testing…') : t('Test connection') })) : null] }), modelDiscovery.status === 'error' ? (
|
|
96
96
|
// Non-blocking (the field above stays editable, with the preset's static
|
|
97
97
|
// suggestions) but never silent — a discovery failure is an operator-actionable
|
|
98
98
|
// fact (bad key, wrong base URL, unreachable endpoint), not "no models exist".
|
|
@@ -83,10 +83,10 @@ export function ExecutionTab({ config, onConfigChange, port, presets = DEFAULT_P
|
|
|
83
83
|
];
|
|
84
84
|
return (_jsxs("div", { className: "jini-settings-execution", "aria-label": ariaLabel ?? t('Execution mode'), children: [_jsx("div", { className: "jini-seg-control", role: "tablist", "aria-label": t('Execution mode'), style: { '--seg-cols': modes.length }, children: modes.map((mode) => {
|
|
85
85
|
const disabled = mode.id === 'local-cli' && localCliDisabled;
|
|
86
|
-
return (_jsxs("button", { type: "button", role: "tab", "aria-selected": config.mode === mode.id, disabled: disabled, title: disabled ? localCliUnavailableReason : undefined, className: 'jini-seg-btn' + (config.mode === mode.id ? ' active' : ''), onClick: () => setMode(mode.id), ...agentHandleProps(agentHandle, { action: `mode-${mode.id}`, role: 'button', label: mode.title }), children: [_jsx("span", { className: "jini-seg-title", children: mode.title }), _jsx("span", { className: "jini-seg-meta", children: disabled ? localCliUnavailableReason : mode.meta })] }, mode.id));
|
|
86
|
+
return (_jsxs("button", { type: "button", role: "tab", "aria-selected": config.mode === mode.id, disabled: disabled, title: disabled ? localCliUnavailableReason : undefined, className: 'jini-seg-btn' + (config.mode === mode.id ? ' active' : ''), onClick: () => setMode(mode.id), ...agentHandleProps({}, { base: agentHandle, ...({ action: `mode-${mode.id}`, role: 'button', label: mode.title }) }), children: [_jsx("span", { className: "jini-seg-title", children: mode.title }), _jsx("span", { className: "jini-seg-meta", children: disabled ? localCliUnavailableReason : mode.meta })] }, mode.id));
|
|
87
87
|
}) }), config.mode === 'local-cli' ? (_jsx(LocalCliAgentList, { agents: agents, config: config.localCli, scan: scan, agentTest: agentTest, onSelect: (agentId) => onConfigChange(nextConfigForAgentSelect(config, agentId)), onModelChange: (agentId, model) => onConfigChange(nextConfigForAgentModel(config, agentId, model)), onReasoningChange: (agentId, reasoning) => onConfigChange(nextConfigForAgentReasoning(config, agentId, reasoning)), onEnvChange: (agentId, envKey, value) => onConfigChange(nextConfigForAgentCliEnvChange(config, agentId, envKey, value)), cliEnvFields: cliEnvFields, onRescan: canRescan ? rescan : undefined, onTest: canTestAgent
|
|
88
88
|
? (agent) => testAgent(agent.id, selectedAgentModel(config.localCli, agent) || undefined)
|
|
89
|
-
: undefined, renderAgentIcon: renderAgentIcon, scopeLabel: localCliScopeLabel, ...(agentHandle ? { agentHandle: agentSubHandle(agentHandle, 'local-cli') } : {}) })) : (_jsxs("section", { className: "jini-settings-section jini-settings-byok", children: [_jsx(ProviderChipGroup, { label: t('Protocols'), presets: protocols, selectedPresetId: selectedPreset?.id ?? null, configuredPresetIds: configuredPresetIds, onSelect: selectPreset, configuredLabel: t('Configured'), unsetLabel: t('Not configured'), ...(agentHandle ? { agentHandle: agentSubHandle(agentHandle, 'protocol') } : {}) }), _jsx(ProviderChipGroup, { label: t('Gateways'), presets: gateways, selectedPresetId: selectedPreset?.id ?? null, configuredPresetIds: configuredPresetIds, onSelect: selectPreset, configuredLabel: t('Configured'), unsetLabel: t('Not configured'), ...(agentHandle ? { agentHandle: agentSubHandle(agentHandle, 'gateway') } : {}) }), _jsx(ByokProviderForm, { config: config.byok, onConfigChange: (byok) => onConfigChange({ ...config, byok }), preset: selectedPreset, ...(agentHandle ? { agentHandle: agentSubHandle(agentHandle, 'byok') } : {}),
|
|
89
|
+
: undefined, renderAgentIcon: renderAgentIcon, scopeLabel: localCliScopeLabel, ...(agentHandle ? { agentHandle: agentSubHandle({ base: agentHandle, action: 'local-cli' }) } : {}) })) : (_jsxs("section", { className: "jini-settings-section jini-settings-byok", children: [_jsx(ProviderChipGroup, { label: t('Protocols'), presets: protocols, selectedPresetId: selectedPreset?.id ?? null, configuredPresetIds: configuredPresetIds, onSelect: selectPreset, configuredLabel: t('Configured'), unsetLabel: t('Not configured'), ...(agentHandle ? { agentHandle: agentSubHandle({ base: agentHandle, action: 'protocol' }) } : {}) }), _jsx(ProviderChipGroup, { label: t('Gateways'), presets: gateways, selectedPresetId: selectedPreset?.id ?? null, configuredPresetIds: configuredPresetIds, onSelect: selectPreset, configuredLabel: t('Configured'), unsetLabel: t('Not configured'), ...(agentHandle ? { agentHandle: agentSubHandle({ base: agentHandle, action: 'gateway' }) } : {}) }), _jsx(ByokProviderForm, { config: config.byok, onConfigChange: (byok) => onConfigChange({ ...config, byok }), preset: selectedPreset, ...(agentHandle ? { agentHandle: agentSubHandle({ base: agentHandle, action: 'byok' }) } : {}),
|
|
90
90
|
// The WHOLE catalog, not the `protocols`/`gateways` halves the chip rows take: the card
|
|
91
91
|
// only reads it to recognise a pasted key as some other row's, and a key pasted from a
|
|
92
92
|
// gateway into a protocol field is exactly the mistake worth naming.
|
|
@@ -95,7 +95,7 @@ export function LocalCliAgentCard({ agent, config, selected, onSelect, onModelCh
|
|
|
95
95
|
};
|
|
96
96
|
return (_jsxs("div", { className: 'jini-agent-card' +
|
|
97
97
|
(selected ? ' is-selected' : '') +
|
|
98
|
-
(agent.installed ? ' is-installed' : ' is-missing'), "data-testid": `jini-agent-card-${agent.id}`, children: [_jsxs("div", { className: "jini-agent-card-main", children: [_jsxs("button", { type: "button", className: "jini-agent-card-select", "data-testid": `jini-agent-select-${agent.id}`, "aria-pressed": selected, disabled: !agent.installed, onClick: () => onSelect(agent.id), ...agentHandleProps(agentHandle, { action: 'select', role: 'button', label: agent.label }), children: [_jsx("span", { className: "jini-agent-card-icon", "aria-hidden": "true", children: renderIcon ? renderIcon(agent) : agent.label.slice(0, 1).toUpperCase() }), _jsxs("span", { className: "jini-agent-card-body", children: [_jsxs("span", { className: "jini-agent-card-name", children: [_jsx("span", { className: "jini-agent-card-title", children: agent.label }), description ? (_jsxs(_Fragment, { children: [_jsx("span", { className: "jini-agent-card-name-divider", "aria-hidden": "true", children: "\u00B7" }), _jsx("span", { className: "jini-agent-card-tagline", children: description })] })) : null] }), agent.badges?.length ? (_jsx("span", { className: "jini-agent-card-badges", children: agent.badges.map((badge) => (_jsx("span", { className: "jini-agent-card-badge", children: badge }, badge))) })) : null, meta.text ? (_jsx("span", { className: "jini-agent-card-meta", children: _jsx("span", { title: meta.title || undefined, children: meta.text }) })) : null, !selected && summary ? (_jsxs("span", { className: "jini-agent-card-model-summary", children: [_jsx("span", { children: t('Model') }), _jsx("strong", { children: summary })] })) : null] })] }), selected && onTest ? (_jsx("button", { type: "button", className: 'jini-btn jini-agent-card-test' + (testing ? ' is-loading' : ''), "data-testid": `jini-agent-test-${agent.id}`, disabled: testing, onClick: () => onTest(agent), ...agentHandleProps(agentHandle, { action: 'test', role: 'button', label: t('Test') }), children: testing ? t('Testing…') : t('Test') })) : null] }), (agent.diagnostics ?? []).map((diagnostic, index) => (_jsx(AgentDiagnosticRow, { diagnostic: diagnostic, handlers: diagnosticHandlers }, `${diagnostic.reason}-${index}`))), selected && (hasModels || hasReasoning) ? (_jsxs("div", { className: "jini-agent-card-config", children: [hasModels ? (_jsxs(_Fragment, { children: [_jsxs("label", { className: "jini-field", children: [_jsxs("span", { className: "jini-field-label", children: [t('Model'), sourceLabel ? (_jsx("span", { className: `jini-agent-model-source ${source}`, children: sourceLabel })) : null] }), _jsx(SearchableModelSelect, { className: "jini-input jini-agent-model-select", ariaLabel: t('Model'), searchPlaceholder: t('Search models'), testId: `jini-agent-model-${agent.id}`, searchInputTestId: `jini-agent-model-search-${agent.id}`, ...(agentHandle ? { agentHandle: agentSubHandle(agentHandle, 'model') } : {}), value: selectValue, models: modelChoices, additionalOptions: allowCustomModel ? [{ value: CUSTOM_MODEL_SENTINEL, label: t('Custom…') }] : undefined, onChange: (nextValue) => {
|
|
98
|
+
(agent.installed ? ' is-installed' : ' is-missing'), "data-testid": `jini-agent-card-${agent.id}`, children: [_jsxs("div", { className: "jini-agent-card-main", children: [_jsxs("button", { type: "button", className: "jini-agent-card-select", "data-testid": `jini-agent-select-${agent.id}`, "aria-pressed": selected, disabled: !agent.installed, onClick: () => onSelect(agent.id), ...agentHandleProps({}, { base: agentHandle, ...({ action: 'select', role: 'button', label: agent.label }) }), children: [_jsx("span", { className: "jini-agent-card-icon", "aria-hidden": "true", children: renderIcon ? renderIcon(agent) : agent.label.slice(0, 1).toUpperCase() }), _jsxs("span", { className: "jini-agent-card-body", children: [_jsxs("span", { className: "jini-agent-card-name", children: [_jsx("span", { className: "jini-agent-card-title", children: agent.label }), description ? (_jsxs(_Fragment, { children: [_jsx("span", { className: "jini-agent-card-name-divider", "aria-hidden": "true", children: "\u00B7" }), _jsx("span", { className: "jini-agent-card-tagline", children: description })] })) : null] }), agent.badges?.length ? (_jsx("span", { className: "jini-agent-card-badges", children: agent.badges.map((badge) => (_jsx("span", { className: "jini-agent-card-badge", children: badge }, badge))) })) : null, meta.text ? (_jsx("span", { className: "jini-agent-card-meta", children: _jsx("span", { title: meta.title || undefined, children: meta.text }) })) : null, !selected && summary ? (_jsxs("span", { className: "jini-agent-card-model-summary", children: [_jsx("span", { children: t('Model') }), _jsx("strong", { children: summary })] })) : null] })] }), selected && onTest ? (_jsx("button", { type: "button", className: 'jini-btn jini-agent-card-test' + (testing ? ' is-loading' : ''), "data-testid": `jini-agent-test-${agent.id}`, disabled: testing, onClick: () => onTest(agent), ...agentHandleProps({}, { base: agentHandle, ...({ action: 'test', role: 'button', label: t('Test') }) }), children: testing ? t('Testing…') : t('Test') })) : null] }), (agent.diagnostics ?? []).map((diagnostic, index) => (_jsx(AgentDiagnosticRow, { diagnostic: diagnostic, handlers: diagnosticHandlers }, `${diagnostic.reason}-${index}`))), selected && (hasModels || hasReasoning) ? (_jsxs("div", { className: "jini-agent-card-config", children: [hasModels ? (_jsxs(_Fragment, { children: [_jsxs("label", { className: "jini-field", children: [_jsxs("span", { className: "jini-field-label", children: [t('Model'), sourceLabel ? (_jsx("span", { className: `jini-agent-model-source ${source}`, children: sourceLabel })) : null] }), _jsx(SearchableModelSelect, { className: "jini-input jini-agent-model-select", ariaLabel: t('Model'), searchPlaceholder: t('Search models'), testId: `jini-agent-model-${agent.id}`, searchInputTestId: `jini-agent-model-search-${agent.id}`, ...(agentHandle ? { agentHandle: agentSubHandle({ base: agentHandle, action: 'model' }) } : {}), value: selectValue, models: modelChoices, additionalOptions: allowCustomModel ? [{ value: CUSTOM_MODEL_SENTINEL, label: t('Custom…') }] : undefined, onChange: (nextValue) => {
|
|
99
99
|
if (nextValue === CUSTOM_MODEL_SENTINEL) {
|
|
100
100
|
setExplicitCustomMode(true);
|
|
101
101
|
onModelChange(agent.id, '');
|
|
@@ -103,7 +103,7 @@ export function LocalCliAgentCard({ agent, config, selected, onSelect, onModelCh
|
|
|
103
103
|
}
|
|
104
104
|
setExplicitCustomMode(false);
|
|
105
105
|
onModelChange(agent.id, resolveNextModelId(nextValue));
|
|
106
|
-
} })] }), sourceHint ? _jsx("p", { className: "jini-field-hint", children: sourceHint }) : null] })) : null, customActive ? (_jsxs("label", { className: "jini-field", children: [_jsx("span", { className: "jini-field-label", children: t('Custom model id') }), _jsx("input", { className: "jini-input", type: "text", "data-testid": `jini-agent-model-custom-${agent.id}`, value: customModelInputValue, placeholder: t('e.g. my-fine-tuned-model'), spellCheck: false, onChange: (event) => onModelChange(agent.id, event.target.value.trim()), ...agentHandleProps(agentHandle, { action: 'custom-model', role: 'field', label: t('Custom model id') }) })] })) : null, hasReasoning ? (_jsxs("label", { className: "jini-field", children: [_jsx("span", { className: "jini-field-label", children: t('Reasoning effort') }), _jsx("select", { className: "jini-input", "data-testid": `jini-agent-reasoning-${agent.id}`, value: reasoningValue, disabled: reasoningDisabled, onChange: (event) => {
|
|
106
|
+
} })] }), sourceHint ? _jsx("p", { className: "jini-field-hint", children: sourceHint }) : null] })) : null, customActive ? (_jsxs("label", { className: "jini-field", children: [_jsx("span", { className: "jini-field-label", children: t('Custom model id') }), _jsx("input", { className: "jini-input", type: "text", "data-testid": `jini-agent-model-custom-${agent.id}`, value: customModelInputValue, placeholder: t('e.g. my-fine-tuned-model'), spellCheck: false, onChange: (event) => onModelChange(agent.id, event.target.value.trim()), ...agentHandleProps({}, { base: agentHandle, ...({ action: 'custom-model', role: 'field', label: t('Custom model id') }) }) })] })) : null, hasReasoning ? (_jsxs("label", { className: "jini-field", children: [_jsx("span", { className: "jini-field-label", children: t('Reasoning effort') }), _jsx("select", { className: "jini-input", "data-testid": `jini-agent-reasoning-${agent.id}`, value: reasoningValue, disabled: reasoningDisabled, onChange: (event) => {
|
|
107
107
|
// A model-suffix agent has no reasoning value of its own to record: the choice
|
|
108
108
|
// is which model id runs, so it goes back out through `onModelChange`.
|
|
109
109
|
const suffixModelId = resolveReasoningModelId(event.target.value);
|
|
@@ -112,6 +112,6 @@ export function LocalCliAgentCard({ agent, config, selected, onSelect, onModelCh
|
|
|
112
112
|
return;
|
|
113
113
|
}
|
|
114
114
|
onReasoningChange(agent.id, event.target.value);
|
|
115
|
-
}, ...agentHandleProps(agentHandle, { action: 'reasoning', role: 'field', label: t('Reasoning effort') }), children: reasoningOptions.map((option) => (_jsx("option", { value: option.id, children: option.label }, option.id))) })] })) : null] })) : null, selected ? (_jsx(AgentCliEnvFields, { agentId: agent.id, fields: cliEnvFields, config: config, onChange: onEnvChange })) : null, result ? (_jsx("p", { className: 'jini-agent-card-test-result is-' + result.status, role: result.status === 'error' ? 'alert' : 'status', children: result.message ?? (result.status === 'ok' ? t('Agent is ready.') : t('Agent check failed')) })) : null, repair && repairField ? (_jsxs("div", { className: "jini-agent-card-path-repair", children: [_jsx("span", { className: "jini-field-hint", children: t('A custom path override did not work, so this used the automatically detected binary instead.') }), _jsxs("div", { className: "jini-agent-card-path-repair-actions", children: [repair.canUseDetected ? (_jsx("button", { type: "button", className: "jini-btn", "data-testid": `jini-agent-path-repair-use-${agent.id}`, onClick: () => onEnvChange(agent.id, repairField.envKey, repair.detectedPath), children: t('Use detected path') })) : null, _jsx("button", { type: "button", className: "jini-btn jini-btn-ghost", "data-testid": `jini-agent-path-repair-clear-${agent.id}`, onClick: () => onEnvChange(agent.id, repairField.envKey, ''), children: t('Clear custom path') })] })] })) : null] }));
|
|
115
|
+
}, ...agentHandleProps({}, { base: agentHandle, ...({ action: 'reasoning', role: 'field', label: t('Reasoning effort') }) }), children: reasoningOptions.map((option) => (_jsx("option", { value: option.id, children: option.label }, option.id))) })] })) : null] })) : null, selected ? (_jsx(AgentCliEnvFields, { agentId: agent.id, fields: cliEnvFields, config: config, onChange: onEnvChange })) : null, result ? (_jsx("p", { className: 'jini-agent-card-test-result is-' + result.status, role: result.status === 'error' ? 'alert' : 'status', children: result.message ?? (result.status === 'ok' ? t('Agent is ready.') : t('Agent check failed')) })) : null, repair && repairField ? (_jsxs("div", { className: "jini-agent-card-path-repair", children: [_jsx("span", { className: "jini-field-hint", children: t('A custom path override did not work, so this used the automatically detected binary instead.') }), _jsxs("div", { className: "jini-agent-card-path-repair-actions", children: [repair.canUseDetected ? (_jsx("button", { type: "button", className: "jini-btn", "data-testid": `jini-agent-path-repair-use-${agent.id}`, onClick: () => onEnvChange(agent.id, repairField.envKey, repair.detectedPath), children: t('Use detected path') })) : null, _jsx("button", { type: "button", className: "jini-btn jini-btn-ghost", "data-testid": `jini-agent-path-repair-clear-${agent.id}`, onClick: () => onEnvChange(agent.id, repairField.envKey, ''), children: t('Clear custom path') })] })] })) : null] }));
|
|
116
116
|
}
|
|
117
117
|
//# sourceMappingURL=LocalCliAgentCard.js.map
|