@burdenoff/microfe-integrations 2026.525.3 → 2026.527.2

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.
Files changed (36) hide show
  1. package/dist/integrations/IntegrationsAdminRoutes.js +4 -3
  2. package/dist/integrations/IntegrationsAdminRoutes.js.map +1 -1
  3. package/dist/integrations/IntegrationsUserRoutes.js +4 -3
  4. package/dist/integrations/IntegrationsUserRoutes.js.map +1 -1
  5. package/dist/integrations/components/AddConnectionDialog.js +281 -258
  6. package/dist/integrations/components/AddConnectionDialog.js.map +1 -1
  7. package/dist/integrations/components/CredentialStorageSelector.js +56 -48
  8. package/dist/integrations/components/CredentialStorageSelector.js.map +1 -1
  9. package/dist/integrations/components/ProviderCard.js +2 -0
  10. package/dist/integrations/components/ProviderCard.js.map +1 -1
  11. package/dist/integrations/hooks/useConnections.js.map +1 -1
  12. package/dist/integrations/hooks/useLogs.js.map +1 -1
  13. package/dist/integrations/hooks/useProviders.js.map +1 -1
  14. package/dist/integrations/pages/AddConnectionWizard.js +21 -2
  15. package/dist/integrations/pages/AddConnectionWizard.js.map +1 -1
  16. package/dist/integrations/pages/ConnectionDetail.js +10 -2
  17. package/dist/integrations/pages/ConnectionDetail.js.map +1 -1
  18. package/dist/integrations/pages/ConnectionLogs.js +122 -110
  19. package/dist/integrations/pages/ConnectionLogs.js.map +1 -1
  20. package/dist/integrations/pages/ConnectionsList.js +122 -109
  21. package/dist/integrations/pages/ConnectionsList.js.map +1 -1
  22. package/dist/integrations/pages/IntegrationsOverview.js +11 -5
  23. package/dist/integrations/pages/IntegrationsOverview.js.map +1 -1
  24. package/dist/integrations/pages/IntegrationsSettings.js +9 -2
  25. package/dist/integrations/pages/IntegrationsSettings.js.map +1 -1
  26. package/dist/integrations/pages/ProviderCatalog.js +9 -2
  27. package/dist/integrations/pages/ProviderCatalog.js.map +1 -1
  28. package/dist/integrations/pages/ProviderDetail.js +13 -2
  29. package/dist/integrations/pages/ProviderDetail.js.map +1 -1
  30. package/dist/integrations/pages/ProviderEditorPage.js +76 -25
  31. package/dist/integrations/pages/ProviderEditorPage.js.map +1 -1
  32. package/dist/integrations/providers/IntegrationsProvider.js +1 -1
  33. package/dist/integrations/providers/IntegrationsProvider.js.map +1 -1
  34. package/dist/integrations/utils/constants.js.map +1 -1
  35. package/dist/integrations/utils/integrationsHelpers.js.map +1 -1
  36. package/package.json +1 -1
@@ -28,7 +28,7 @@ function O() {
28
28
  })]
29
29
  }), /* @__PURE__ */ E("span", {
30
30
  className: "mt-6 text-sm font-medium text-muted-foreground",
31
- children: "Loading provider details..."
31
+ children: "Loading provider details…"
32
32
  })]
33
33
  });
34
34
  if (R || !L) return /* @__PURE__ */ E("div", {
@@ -52,10 +52,12 @@ function O() {
52
52
  /* @__PURE__ */ D("div", {
53
53
  className: "flex gap-2",
54
54
  children: [/* @__PURE__ */ D("button", {
55
+ type: "button",
55
56
  onClick: () => z(),
56
57
  className: "inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-status-error-bg-subtle text-status-error-text hover:bg-status-error-bg-subtle/80 transition-colors",
57
58
  children: [/* @__PURE__ */ E(ae, { size: 14 }), "Try Again"]
58
59
  }), /* @__PURE__ */ D("button", {
60
+ type: "button",
59
61
  onClick: () => j?.(i(A, "providers")),
60
62
  className: "inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border hover:bg-accent transition-colors",
61
63
  children: [/* @__PURE__ */ E(m, { size: 14 }), "Back to Catalog"]
@@ -81,6 +83,7 @@ function O() {
81
83
  className: "flex items-center gap-4 mb-4",
82
84
  children: [
83
85
  /* @__PURE__ */ E("button", {
86
+ type: "button",
84
87
  onClick: () => j?.(i(A, "providers")),
85
88
  className: "p-2.5 hover:bg-accent rounded-lg transition-all duration-200",
86
89
  "aria-label": "Back to catalog",
@@ -107,13 +110,14 @@ function O() {
107
110
  })]
108
111
  }),
109
112
  X && L.pluginStatus === "installed" && L.isEnabled && /* @__PURE__ */ D("button", {
113
+ type: "button",
110
114
  onClick: $,
111
115
  className: "inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-colors",
112
116
  children: [/* @__PURE__ */ E(S, { size: 16 }), "Create Connection"]
113
117
  })
114
118
  ]
115
119
  })
116
- }), /* @__PURE__ */ E("div", { className: "absolute top-0 right-0 w-64 h-64 bg-gradient-to-br from-primary/10 to-transparent rounded-full blur-3xl -z-0" })]
120
+ }), /* @__PURE__ */ E("div", { className: "absolute top-0 right-0 size-64 bg-gradient-to-br from-primary/10 to-transparent rounded-full blur-3xl -z-0" })]
117
121
  }),
118
122
  /* @__PURE__ */ D("div", {
119
123
  className: "grid grid-cols-1 md:grid-cols-2 gap-4",
@@ -249,6 +253,7 @@ function O() {
249
253
  className: "flex flex-wrap gap-2",
250
254
  children: [
251
255
  Z && /* @__PURE__ */ D("button", {
256
+ type: "button",
252
257
  onClick: () => {
253
258
  j?.(i(A, `providers/${L.id}/edit`));
254
259
  },
@@ -256,6 +261,7 @@ function O() {
256
261
  children: [/* @__PURE__ */ E(x, { size: 14 }), "Edit"]
257
262
  }),
258
263
  Z && L.pluginStatus === "installed" && /* @__PURE__ */ D("button", {
264
+ type: "button",
259
265
  onClick: async () => {
260
266
  L && (L.isEnabled ? await W(L.id) : await H(L.id), await z());
261
267
  },
@@ -264,10 +270,12 @@ function O() {
264
270
  children: [/* @__PURE__ */ E(ie, { size: 14 }), L.isEnabled ? "Disable" : "Enable"]
265
271
  }),
266
272
  de && L.pluginStatus === "available" && /* @__PURE__ */ D("button", {
273
+ type: "button",
267
274
  className: "inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-colors",
268
275
  children: [/* @__PURE__ */ E(g, { size: 14 }), "Install Plugin"]
269
276
  }),
270
277
  fe && L.pluginStatus === "installed" && /* @__PURE__ */ D("button", {
278
+ type: "button",
271
279
  onClick: async () => {
272
280
  L && Y(!0);
273
281
  },
@@ -276,6 +284,7 @@ function O() {
276
284
  children: [/* @__PURE__ */ E(C, { size: 14 }), "Uninstall"]
277
285
  }),
278
286
  Z && L.pluginStatus === "update_available" && /* @__PURE__ */ D("button", {
287
+ type: "button",
279
288
  className: "inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-status-warning-bg-subtle text-status-warning-text border border-border-default hover:bg-status-warning-bg-subtle/80 transition-colors",
280
289
  children: [/* @__PURE__ */ E(g, { size: 14 }), "Update Available"]
281
290
  })
@@ -304,6 +313,7 @@ function O() {
304
313
  ]
305
314
  })]
306
315
  }), X && L.pluginStatus === "installed" && L.isEnabled && /* @__PURE__ */ D("button", {
316
+ type: "button",
307
317
  onClick: $,
308
318
  className: "inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-colors",
309
319
  children: [/* @__PURE__ */ E(S, { size: 14 }), "Add"]
@@ -339,6 +349,7 @@ function O() {
339
349
  ]
340
350
  }),
341
351
  X && L.pluginStatus === "installed" && L.isEnabled && /* @__PURE__ */ D("button", {
352
+ type: "button",
342
353
  onClick: $,
343
354
  className: "inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-colors",
344
355
  children: [/* @__PURE__ */ E(S, { size: 16 }), "Create Connection"]
@@ -1 +1 @@
1
- {"version":3,"file":"ProviderDetail.js","names":[],"sources":["../../../src/integrations/pages/ProviderDetail.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { useParams } from 'react-router-dom';\nimport {\n ArrowLeft,\n ExternalLink,\n BookOpen,\n Plus,\n Link2,\n Loader2,\n AlertCircle,\n RefreshCw,\n Shield,\n Package,\n Star,\n Download,\n Trash2,\n Pencil,\n Power,\n} from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { usePermissions } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { useIntegrations } from '../providers/IntegrationsProvider';\nimport { INTEGRATION_PERMISSIONS } from '../constants/permissions';\nimport { useIntegrationsStore } from '../store/integrationsStore';\nimport { joinPath } from '../utils/navigation';\nimport { getAuthTypeLabel, getCategoryLabel } from '../utils/integrationsHelpers';\nimport {\n useDisableProvider,\n useEnableProvider,\n useProvider,\n useUninstallPlugin,\n} from '../hooks/useProviders';\nimport { useConnectionsByProvider } from '../hooks/useConnections';\nimport { ProviderIcon } from '../components/ProviderIcon';\nimport { ConnectionCard } from '../components/ConnectionCard';\nimport { AddConnectionDialog } from '../components/AddConnectionDialog';\nimport { ConfirmDialog } from '../components/ConfirmDialog';\nimport type { IntegrationConnection } from '../types';\n\n/**\n * Provider Detail — Single provider view with info, connections, and actions.\n */\nexport function ProviderDetail() {\n const { providerId } = useParams<{ providerId: string }>();\n const { adminMode = false, basePath = '/', navigate, onConnectionSelect } = useIntegrations();\n const {\n addConnectionDialogOpen,\n addConnectionProviderId,\n openAddConnectionDialog,\n closeAddConnectionDialog,\n } = useIntegrationsStore();\n\n const {\n provider,\n loading: providerLoading,\n error: providerError,\n refetch,\n } = useProvider(providerId ?? '');\n const { connections, loading: connectionsLoading } = useConnectionsByProvider(providerId ?? '');\n const { enableProvider, loading: enabling } = useEnableProvider();\n const { disableProvider, loading: disabling } = useDisableProvider();\n const { uninstallPlugin, loading: uninstalling } = useUninstallPlugin();\n const { hasPermission, isLoading: permissionsLoading } = usePermissions();\n const [uninstallDialogOpen, setUninstallDialogOpen] = useState(false);\n const canCreateConnection =\n !permissionsLoading && hasPermission(INTEGRATION_PERMISSIONS.CONNECTION_CREATE);\n const canCreateProvider =\n adminMode && !permissionsLoading && hasPermission(INTEGRATION_PERMISSIONS.PROVIDER_CREATE);\n const canUpdateProvider =\n adminMode && !permissionsLoading && hasPermission(INTEGRATION_PERMISSIONS.PROVIDER_UPDATE);\n const canDeleteProvider =\n adminMode && !permissionsLoading && hasPermission(INTEGRATION_PERMISSIONS.PROVIDER_DELETE);\n\n const loading = providerLoading;\n const providerActionLoading = enabling || disabling || uninstalling;\n\n if (loading) {\n return (\n <div className=\"flex flex-col items-center justify-center py-20\">\n <div className=\"relative\">\n <div className=\"absolute inset-0 bg-primary/20 rounded-full blur-xl animate-pulse\" />\n <Loader2 size={48} className=\"relative animate-spin text-primary\" />\n </div>\n <span className=\"mt-6 text-sm font-medium text-muted-foreground\">\n Loading provider details...\n </span>\n </div>\n );\n }\n\n if (providerError || !provider) {\n return (\n <div className=\"p-6 max-w-4xl mx-auto\">\n <div className=\"rounded-xl border border-border-default bg-status-error-bg-subtle p-6 flex items-start gap-4\">\n <AlertCircle size={24} className=\"text-status-error-text flex-shrink-0\" />\n <div className=\"flex-1\">\n <h3 className=\"font-semibold text-status-error-text mb-1\">Provider not found</h3>\n <p className=\"text-sm text-status-error-text mb-3\">\n {providerError?.message || 'The requested provider could not be loaded.'}\n </p>\n <div className=\"flex gap-2\">\n <button\n onClick={() => refetch()}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-status-error-bg-subtle text-status-error-text hover:bg-status-error-bg-subtle/80 transition-colors\"\n >\n <RefreshCw size={14} />\n Try Again\n </button>\n <button\n onClick={() => navigate?.(joinPath(basePath, 'providers'))}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border hover:bg-accent transition-colors\"\n >\n <ArrowLeft size={14} />\n Back to Catalog\n </button>\n </div>\n </div>\n </div>\n </div>\n );\n }\n\n const handleCreateConnection = () => {\n openAddConnectionDialog(provider.id);\n };\n\n const handleConnectionClick = (connection: IntegrationConnection) => {\n onConnectionSelect?.(connection);\n navigate?.(joinPath(basePath, `connections/${connection.id}`));\n };\n\n const handleToggleEnabled = async () => {\n if (!provider) return;\n if (provider.isEnabled) {\n await disableProvider(provider.id);\n } else {\n await enableProvider(provider.id);\n }\n await refetch();\n };\n\n const handleUninstall = async () => {\n if (!provider) return;\n setUninstallDialogOpen(true);\n };\n\n const confirmUninstall = async () => {\n if (!provider) return;\n await uninstallPlugin(provider.id);\n setUninstallDialogOpen(false);\n navigate?.(joinPath(basePath, 'providers'));\n };\n\n const handleEditProvider = () => {\n navigate?.(joinPath(basePath, `providers/${provider.id}/edit`));\n };\n\n return (\n <div className=\"space-y-6 p-6 max-w-5xl mx-auto\">\n {/* Header */}\n <div className=\"relative overflow-hidden rounded-xl bg-gradient-to-br from-primary/5 via-primary/3 to-background border border-border/50 p-6 shadow-sm\">\n <div className=\"relative z-10\">\n <div className=\"flex items-center gap-4 mb-4\">\n <button\n onClick={() => navigate?.(joinPath(basePath, 'providers'))}\n className=\"p-2.5 hover:bg-accent rounded-lg transition-all duration-200\"\n aria-label=\"Back to catalog\"\n >\n <ArrowLeft size={20} />\n </button>\n <ProviderIcon provider={provider} size={56} />\n <div className=\"flex-1\">\n <div className=\"flex items-center gap-3\">\n <h1 className=\"text-2xl sm:text-3xl font-bold text-foreground\">{provider.name}</h1>\n {provider.isBuiltIn && (\n <span className=\"text-xs px-2 py-0.5 rounded-full bg-status-info-bg-subtle text-status-info-text border border-border-default\">\n Built-in\n </span>\n )}\n </div>\n <p className=\"text-sm text-muted-foreground mt-1\">{provider.description}</p>\n </div>\n {canCreateConnection && provider.pluginStatus === 'installed' && provider.isEnabled && (\n <button\n onClick={handleCreateConnection}\n className=\"inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-colors\"\n >\n <Plus size={16} />\n Create Connection\n </button>\n )}\n </div>\n </div>\n <div className=\"absolute top-0 right-0 w-64 h-64 bg-gradient-to-br from-primary/10 to-transparent rounded-full blur-3xl -z-0\" />\n </div>\n\n {/* Info Cards */}\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n {/* Provider Details */}\n <div className=\"rounded-xl border border-border/50 bg-card p-5 space-y-4\">\n <h2 className=\"font-semibold text-foreground flex items-center gap-2\">\n <Package size={18} className=\"text-primary\" />\n Provider Details\n </h2>\n <div className=\"space-y-3\">\n <div className=\"flex items-center justify-between py-2 border-b border-border/50\">\n <span className=\"text-sm text-muted-foreground\">Category</span>\n <span className=\"text-sm font-medium text-foreground\">\n {getCategoryLabel(provider.category)}\n </span>\n </div>\n <div className=\"flex items-center justify-between py-2 border-b border-border/50\">\n <span className=\"text-sm text-muted-foreground\">Auth Type</span>\n <span className=\"text-sm font-medium text-foreground\">\n {getAuthTypeLabel(provider.authType)}\n </span>\n </div>\n <div className=\"flex items-center justify-between py-2 border-b border-border/50\">\n <span className=\"text-sm text-muted-foreground\">Plugin Version</span>\n <span className=\"text-sm font-mono text-foreground\">{provider.pluginVersion}</span>\n </div>\n <div className=\"flex items-center justify-between py-2 border-b border-border/50\">\n <span className=\"text-sm text-muted-foreground\">Author</span>\n <span className=\"text-sm font-medium text-foreground\">\n {provider.pluginAuthor || '-'}\n </span>\n </div>\n <div className=\"flex items-center justify-between py-2 border-b border-border/50\">\n <span className=\"text-sm text-muted-foreground\">Connections</span>\n <span className=\"text-sm font-medium text-foreground\">\n {provider.connectionCount}\n </span>\n </div>\n <div className=\"flex items-center justify-between py-2\">\n <span className=\"text-sm text-muted-foreground\">Status</span>\n <span\n className={cn(\n 'text-sm font-medium px-2 py-0.5 rounded-full',\n provider.isEnabled\n ? 'text-status-success-text bg-status-success-bg-subtle'\n : 'text-text-secondary bg-bg-sunken'\n )}\n >\n {provider.isEnabled ? 'Enabled' : 'Disabled'}\n </span>\n </div>\n </div>\n </div>\n\n {/* Features & Links */}\n <div className=\"space-y-4\">\n {/* Supported Features */}\n <div className=\"rounded-xl border border-border/50 bg-card p-5\">\n <h2 className=\"font-semibold text-foreground flex items-center gap-2 mb-3\">\n <Star size={18} className=\"text-primary\" />\n Supported Features\n </h2>\n {provider.supportedFeatures.length > 0 ? (\n <div className=\"flex flex-wrap gap-2\">\n {provider.supportedFeatures.map((feature) => (\n <span\n key={feature}\n className=\"text-xs px-2.5 py-1 rounded-full bg-muted text-muted-foreground\"\n >\n {feature}\n </span>\n ))}\n </div>\n ) : (\n <p className=\"text-sm text-muted-foreground\">No specific features listed.</p>\n )}\n </div>\n\n {/* Links */}\n <div className=\"rounded-xl border border-border/50 bg-card p-5\">\n <h2 className=\"font-semibold text-foreground flex items-center gap-2 mb-3\">\n <ExternalLink size={18} className=\"text-primary\" />\n Links\n </h2>\n <div className=\"space-y-2\">\n {provider.website && (\n <a\n href={provider.website}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"flex items-center gap-2 text-sm text-primary hover:underline\"\n >\n <ExternalLink size={14} />\n Website\n </a>\n )}\n {provider.docsUrl && (\n <a\n href={provider.docsUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"flex items-center gap-2 text-sm text-primary hover:underline\"\n >\n <BookOpen size={14} />\n Documentation\n </a>\n )}\n </div>\n </div>\n\n {/* Plugin Actions */}\n {adminMode && (\n <div className=\"rounded-xl border border-border/50 bg-card p-5\">\n <h2 className=\"font-semibold text-foreground flex items-center gap-2 mb-3\">\n <Shield size={18} className=\"text-primary\" />\n Plugin Management\n </h2>\n <div className=\"flex flex-wrap gap-2\">\n {canUpdateProvider && (\n <button\n onClick={handleEditProvider}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border hover:bg-accent transition-colors\"\n >\n <Pencil size={14} />\n Edit\n </button>\n )}\n {canUpdateProvider && provider.pluginStatus === 'installed' && (\n <button\n onClick={handleToggleEnabled}\n disabled={providerActionLoading}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border hover:bg-accent transition-colors disabled:opacity-50\"\n >\n <Power size={14} />\n {provider.isEnabled ? 'Disable' : 'Enable'}\n </button>\n )}\n {canCreateProvider && provider.pluginStatus === 'available' && (\n <button className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-colors\">\n <Download size={14} />\n Install Plugin\n </button>\n )}\n {canDeleteProvider && provider.pluginStatus === 'installed' && (\n <button\n onClick={handleUninstall}\n disabled={providerActionLoading || provider.isBuiltIn}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border-default text-status-error-text hover:bg-status-error-bg-subtle transition-colors disabled:opacity-50\"\n >\n <Trash2 size={14} />\n Uninstall\n </button>\n )}\n {canUpdateProvider && provider.pluginStatus === 'update_available' && (\n <button className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-status-warning-bg-subtle text-status-warning-text border border-border-default hover:bg-status-warning-bg-subtle/80 transition-colors\">\n <Download size={14} />\n Update Available\n </button>\n )}\n </div>\n </div>\n )}\n </div>\n </div>\n\n {/* Connections for this provider */}\n <div className=\"rounded-xl border border-border/50 bg-card overflow-hidden\">\n <div className=\"flex items-center justify-between p-5 border-b border-border/50\">\n <div className=\"flex items-center gap-2\">\n <Link2 size={18} className=\"text-primary\" />\n <h2 className=\"font-semibold text-foreground\">\n Connections ({(connections ?? []).length})\n </h2>\n </div>\n {canCreateConnection && provider.pluginStatus === 'installed' && provider.isEnabled && (\n <button\n onClick={handleCreateConnection}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-colors\"\n >\n <Plus size={14} />\n Add\n </button>\n )}\n </div>\n\n {connectionsLoading && (\n <div className=\"flex items-center justify-center py-12\">\n <Loader2 size={24} className=\"animate-spin text-muted-foreground\" />\n </div>\n )}\n\n {!connectionsLoading && (connections ?? []).length === 0 && (\n <div className=\"flex flex-col items-center justify-center py-12 px-6 text-center\">\n <div className=\"p-4 rounded-full bg-muted/50 mb-4\">\n <Link2 size={32} className=\"text-muted-foreground\" />\n </div>\n <h3 className=\"font-semibold text-foreground mb-1\">No connections yet</h3>\n <p className=\"text-sm text-muted-foreground mb-4 max-w-sm\">\n Create a connection to start using {provider.name} in your workspace.\n </p>\n {canCreateConnection && provider.pluginStatus === 'installed' && provider.isEnabled && (\n <button\n onClick={handleCreateConnection}\n className=\"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-colors\"\n >\n <Plus size={16} />\n Create Connection\n </button>\n )}\n </div>\n )}\n\n {!connectionsLoading && (connections ?? []).length > 0 && (\n <div className=\"p-4 space-y-3\">\n {(connections ?? []).map((conn: IntegrationConnection) => (\n <ConnectionCard\n key={conn.id}\n connection={conn}\n displayMode=\"list\"\n onClick={handleConnectionClick}\n />\n ))}\n </div>\n )}\n </div>\n\n {/* Add Connection Dialog */}\n <AddConnectionDialog\n open={addConnectionDialogOpen}\n onClose={closeAddConnectionDialog}\n preselectedProviderId={addConnectionProviderId}\n onConnectionCreated={() => {\n refetch();\n }}\n />\n <ConfirmDialog\n open={uninstallDialogOpen}\n title={`Uninstall ${provider.name}`}\n description=\"Existing active connections must be removed first. This action is only available in admin mode.\"\n confirmLabel=\"Uninstall\"\n cancelLabel=\"Cancel\"\n destructive\n loading={uninstalling}\n icon={<Trash2 size={20} />}\n onConfirm={confirmUninstall}\n onCancel={() => setUninstallDialogOpen(false)}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AA0CA,SAAgB,IAAiB;CAC/B,IAAM,EAAE,kBAAe,GAAmC,EACpD,EAAE,eAAY,IAAO,cAAW,KAAK,aAAU,0BAAuB,GAAiB,EACvF,EACJ,4BACA,4BACA,4BACA,gCACE,GAAsB,EAEpB,EACJ,aACA,SAAS,IACT,OAAO,GACP,eACE,EAAY,KAAc,GAAG,EAC3B,EAAE,gBAAa,SAAS,MAAuB,GAAyB,KAAc,GAAG,EACzF,EAAE,mBAAgB,SAAS,MAAa,GAAmB,EAC3D,EAAE,oBAAiB,SAAS,MAAc,GAAoB,EAC9D,EAAE,qBAAiB,SAAS,MAAiB,GAAoB,EACjE,EAAE,kBAAe,WAAW,MAAuB,GAAgB,EACnE,CAAC,IAAqB,KAA0B,GAAS,GAAM,EAC/D,IACJ,CAAC,KAAsB,EA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AU;kBAFZ,CAIE,kBAAC,GAAD,EAAM,MAAM,IAAM,CAAA,EAAA,oBAEX;;OAEP;;KAGP,CAAC,MAAuB,KAAe,EAAE,EAAE,SAAS,KACnD,kBAAC,OAAD;MAAK,WAAU;iBACX,KAAe,EAAE,EAAE,KAAK,MACxB,kBAAC,GAAD;OAEE,YAAY;OACZ,aAAY;OACZ,SAAS;OACT,EAJK,EAAK,GAIV,CACF;MACE,CAAA;KAEJ;;GAGN,kBAAC,IAAD;IACE,MAAM;IACN,SAAS;IACT,uBAAuB;IACvB,2BAA2B;AACzB,QAAS;;IAEX,CAAA;GACF,kBAAC,GAAD;IACE,MAAM;IACN,OAAO,aAAa,EAAS;IAC7B,aAAY;IACZ,cAAa;IACb,aAAY;IACZ,aAAA;IACA,SAAS;IACT,MAAM,kBAAC,GAAD,EAAQ,MAAM,IAAM,CAAA;IAC1B,WArSmB,YAAY;AAC9B,WACL,MAAM,GAAgB,EAAS,GAAG,EAClC,EAAuB,GAAM,EAC7B,IAAW,EAAS,GAAU,YAAY,CAAC;;IAkSvC,gBAAgB,EAAuB,GAAM;IAC7C,CAAA;GACE"}
1
+ {"version":3,"file":"ProviderDetail.js","names":[],"sources":["../../../src/integrations/pages/ProviderDetail.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { useParams } from 'react-router-dom';\nimport {\n ArrowLeft,\n ExternalLink,\n BookOpen,\n Plus,\n Link2,\n Loader2,\n AlertCircle,\n RefreshCw,\n Shield,\n Package,\n Star,\n Download,\n Trash2,\n Pencil,\n Power,\n} from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { usePermissions } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { useIntegrations } from '../providers/IntegrationsProvider';\nimport { INTEGRATION_PERMISSIONS } from '../constants/permissions';\nimport { useIntegrationsStore } from '../store/integrationsStore';\nimport { joinPath } from '../utils/navigation';\nimport { getAuthTypeLabel, getCategoryLabel } from '../utils/integrationsHelpers';\nimport {\n useDisableProvider,\n useEnableProvider,\n useProvider,\n useUninstallPlugin,\n} from '../hooks/useProviders';\nimport { useConnectionsByProvider } from '../hooks/useConnections';\nimport { ProviderIcon } from '../components/ProviderIcon';\nimport { ConnectionCard } from '../components/ConnectionCard';\nimport { AddConnectionDialog } from '../components/AddConnectionDialog';\nimport { ConfirmDialog } from '../components/ConfirmDialog';\nimport type { IntegrationConnection } from '../types';\n\n/**\n * Provider Detail — Single provider view with info, connections, and actions.\n */\nexport function ProviderDetail() {\n const { providerId } = useParams<{ providerId: string }>();\n const { adminMode = false, basePath = '/', navigate, onConnectionSelect } = useIntegrations();\n const {\n addConnectionDialogOpen,\n addConnectionProviderId,\n openAddConnectionDialog,\n closeAddConnectionDialog,\n } = useIntegrationsStore();\n\n const {\n provider,\n loading: providerLoading,\n error: providerError,\n refetch,\n } = useProvider(providerId ?? '');\n const { connections, loading: connectionsLoading } = useConnectionsByProvider(providerId ?? '');\n const { enableProvider, loading: enabling } = useEnableProvider();\n const { disableProvider, loading: disabling } = useDisableProvider();\n const { uninstallPlugin, loading: uninstalling } = useUninstallPlugin();\n const { hasPermission, isLoading: permissionsLoading } = usePermissions();\n const [uninstallDialogOpen, setUninstallDialogOpen] = useState(false);\n const canCreateConnection =\n !permissionsLoading && hasPermission(INTEGRATION_PERMISSIONS.CONNECTION_CREATE);\n const canCreateProvider =\n adminMode && !permissionsLoading && hasPermission(INTEGRATION_PERMISSIONS.PROVIDER_CREATE);\n const canUpdateProvider =\n adminMode && !permissionsLoading && hasPermission(INTEGRATION_PERMISSIONS.PROVIDER_UPDATE);\n const canDeleteProvider =\n adminMode && !permissionsLoading && hasPermission(INTEGRATION_PERMISSIONS.PROVIDER_DELETE);\n\n const loading = providerLoading;\n const providerActionLoading = enabling || disabling || uninstalling;\n\n if (loading) {\n return (\n <div className=\"flex flex-col items-center justify-center py-20\">\n <div className=\"relative\">\n <div className=\"absolute inset-0 bg-primary/20 rounded-full blur-xl animate-pulse\" />\n <Loader2 size={48} className=\"relative animate-spin text-primary\" />\n </div>\n <span className=\"mt-6 text-sm font-medium text-muted-foreground\">\n Loading provider details…\n </span>\n </div>\n );\n }\n\n if (providerError || !provider) {\n return (\n <div className=\"p-6 max-w-4xl mx-auto\">\n <div className=\"rounded-xl border border-border-default bg-status-error-bg-subtle p-6 flex items-start gap-4\">\n <AlertCircle size={24} className=\"text-status-error-text flex-shrink-0\" />\n <div className=\"flex-1\">\n <h3 className=\"font-semibold text-status-error-text mb-1\">Provider not found</h3>\n <p className=\"text-sm text-status-error-text mb-3\">\n {providerError?.message || 'The requested provider could not be loaded.'}\n </p>\n <div className=\"flex gap-2\">\n <button\n type=\"button\"\n onClick={() => refetch()}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-status-error-bg-subtle text-status-error-text hover:bg-status-error-bg-subtle/80 transition-colors\"\n >\n <RefreshCw size={14} />\n Try Again\n </button>\n <button\n type=\"button\"\n onClick={() => navigate?.(joinPath(basePath, 'providers'))}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border hover:bg-accent transition-colors\"\n >\n <ArrowLeft size={14} />\n Back to Catalog\n </button>\n </div>\n </div>\n </div>\n </div>\n );\n }\n\n const handleCreateConnection = () => {\n openAddConnectionDialog(provider.id);\n };\n\n const handleConnectionClick = (connection: IntegrationConnection) => {\n onConnectionSelect?.(connection);\n navigate?.(joinPath(basePath, `connections/${connection.id}`));\n };\n\n const handleToggleEnabled = async () => {\n if (!provider) return;\n if (provider.isEnabled) {\n await disableProvider(provider.id);\n } else {\n await enableProvider(provider.id);\n }\n await refetch();\n };\n\n const handleUninstall = async () => {\n if (!provider) return;\n setUninstallDialogOpen(true);\n };\n\n const confirmUninstall = async () => {\n if (!provider) return;\n await uninstallPlugin(provider.id);\n setUninstallDialogOpen(false);\n navigate?.(joinPath(basePath, 'providers'));\n };\n\n const handleEditProvider = () => {\n navigate?.(joinPath(basePath, `providers/${provider.id}/edit`));\n };\n\n return (\n <div className=\"space-y-6 p-6 max-w-5xl mx-auto\">\n {/* Header */}\n <div className=\"relative overflow-hidden rounded-xl bg-gradient-to-br from-primary/5 via-primary/3 to-background border border-border/50 p-6 shadow-sm\">\n <div className=\"relative z-10\">\n <div className=\"flex items-center gap-4 mb-4\">\n <button\n type=\"button\"\n onClick={() => navigate?.(joinPath(basePath, 'providers'))}\n className=\"p-2.5 hover:bg-accent rounded-lg transition-all duration-200\"\n aria-label=\"Back to catalog\"\n >\n <ArrowLeft size={20} />\n </button>\n <ProviderIcon provider={provider} size={56} />\n <div className=\"flex-1\">\n <div className=\"flex items-center gap-3\">\n <h1 className=\"text-2xl sm:text-3xl font-bold text-foreground\">{provider.name}</h1>\n {provider.isBuiltIn && (\n <span className=\"text-xs px-2 py-0.5 rounded-full bg-status-info-bg-subtle text-status-info-text border border-border-default\">\n Built-in\n </span>\n )}\n </div>\n <p className=\"text-sm text-muted-foreground mt-1\">{provider.description}</p>\n </div>\n {canCreateConnection && provider.pluginStatus === 'installed' && provider.isEnabled && (\n <button\n type=\"button\"\n onClick={handleCreateConnection}\n className=\"inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-colors\"\n >\n <Plus size={16} />\n Create Connection\n </button>\n )}\n </div>\n </div>\n <div className=\"absolute top-0 right-0 size-64 bg-gradient-to-br from-primary/10 to-transparent rounded-full blur-3xl -z-0\" />\n </div>\n\n {/* Info Cards */}\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n {/* Provider Details */}\n <div className=\"rounded-xl border border-border/50 bg-card p-5 space-y-4\">\n <h2 className=\"font-semibold text-foreground flex items-center gap-2\">\n <Package size={18} className=\"text-primary\" />\n Provider Details\n </h2>\n <div className=\"space-y-3\">\n <div className=\"flex items-center justify-between py-2 border-b border-border/50\">\n <span className=\"text-sm text-muted-foreground\">Category</span>\n <span className=\"text-sm font-medium text-foreground\">\n {getCategoryLabel(provider.category)}\n </span>\n </div>\n <div className=\"flex items-center justify-between py-2 border-b border-border/50\">\n <span className=\"text-sm text-muted-foreground\">Auth Type</span>\n <span className=\"text-sm font-medium text-foreground\">\n {getAuthTypeLabel(provider.authType)}\n </span>\n </div>\n <div className=\"flex items-center justify-between py-2 border-b border-border/50\">\n <span className=\"text-sm text-muted-foreground\">Plugin Version</span>\n <span className=\"text-sm font-mono text-foreground\">{provider.pluginVersion}</span>\n </div>\n <div className=\"flex items-center justify-between py-2 border-b border-border/50\">\n <span className=\"text-sm text-muted-foreground\">Author</span>\n <span className=\"text-sm font-medium text-foreground\">\n {provider.pluginAuthor || '-'}\n </span>\n </div>\n <div className=\"flex items-center justify-between py-2 border-b border-border/50\">\n <span className=\"text-sm text-muted-foreground\">Connections</span>\n <span className=\"text-sm font-medium text-foreground\">\n {provider.connectionCount}\n </span>\n </div>\n <div className=\"flex items-center justify-between py-2\">\n <span className=\"text-sm text-muted-foreground\">Status</span>\n <span\n className={cn(\n 'text-sm font-medium px-2 py-0.5 rounded-full',\n provider.isEnabled\n ? 'text-status-success-text bg-status-success-bg-subtle'\n : 'text-text-secondary bg-bg-sunken'\n )}\n >\n {provider.isEnabled ? 'Enabled' : 'Disabled'}\n </span>\n </div>\n </div>\n </div>\n\n {/* Features & Links */}\n <div className=\"space-y-4\">\n {/* Supported Features */}\n <div className=\"rounded-xl border border-border/50 bg-card p-5\">\n <h2 className=\"font-semibold text-foreground flex items-center gap-2 mb-3\">\n <Star size={18} className=\"text-primary\" />\n Supported Features\n </h2>\n {provider.supportedFeatures.length > 0 ? (\n <div className=\"flex flex-wrap gap-2\">\n {provider.supportedFeatures.map((feature) => (\n <span\n key={feature}\n className=\"text-xs px-2.5 py-1 rounded-full bg-muted text-muted-foreground\"\n >\n {feature}\n </span>\n ))}\n </div>\n ) : (\n <p className=\"text-sm text-muted-foreground\">No specific features listed.</p>\n )}\n </div>\n\n {/* Links */}\n <div className=\"rounded-xl border border-border/50 bg-card p-5\">\n <h2 className=\"font-semibold text-foreground flex items-center gap-2 mb-3\">\n <ExternalLink size={18} className=\"text-primary\" />\n Links\n </h2>\n <div className=\"space-y-2\">\n {provider.website && (\n <a\n href={provider.website}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"flex items-center gap-2 text-sm text-primary hover:underline\"\n >\n <ExternalLink size={14} />\n Website\n </a>\n )}\n {provider.docsUrl && (\n <a\n href={provider.docsUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"flex items-center gap-2 text-sm text-primary hover:underline\"\n >\n <BookOpen size={14} />\n Documentation\n </a>\n )}\n </div>\n </div>\n\n {/* Plugin Actions */}\n {adminMode && (\n <div className=\"rounded-xl border border-border/50 bg-card p-5\">\n <h2 className=\"font-semibold text-foreground flex items-center gap-2 mb-3\">\n <Shield size={18} className=\"text-primary\" />\n Plugin Management\n </h2>\n <div className=\"flex flex-wrap gap-2\">\n {canUpdateProvider && (\n <button\n type=\"button\"\n onClick={handleEditProvider}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border hover:bg-accent transition-colors\"\n >\n <Pencil size={14} />\n Edit\n </button>\n )}\n {canUpdateProvider && provider.pluginStatus === 'installed' && (\n <button\n type=\"button\"\n onClick={handleToggleEnabled}\n disabled={providerActionLoading}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border hover:bg-accent transition-colors disabled:opacity-50\"\n >\n <Power size={14} />\n {provider.isEnabled ? 'Disable' : 'Enable'}\n </button>\n )}\n {canCreateProvider && provider.pluginStatus === 'available' && (\n <button\n type=\"button\"\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-colors\"\n >\n <Download size={14} />\n Install Plugin\n </button>\n )}\n {canDeleteProvider && provider.pluginStatus === 'installed' && (\n <button\n type=\"button\"\n onClick={handleUninstall}\n disabled={providerActionLoading || provider.isBuiltIn}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border-default text-status-error-text hover:bg-status-error-bg-subtle transition-colors disabled:opacity-50\"\n >\n <Trash2 size={14} />\n Uninstall\n </button>\n )}\n {canUpdateProvider && provider.pluginStatus === 'update_available' && (\n <button\n type=\"button\"\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-status-warning-bg-subtle text-status-warning-text border border-border-default hover:bg-status-warning-bg-subtle/80 transition-colors\"\n >\n <Download size={14} />\n Update Available\n </button>\n )}\n </div>\n </div>\n )}\n </div>\n </div>\n\n {/* Connections for this provider */}\n <div className=\"rounded-xl border border-border/50 bg-card overflow-hidden\">\n <div className=\"flex items-center justify-between p-5 border-b border-border/50\">\n <div className=\"flex items-center gap-2\">\n <Link2 size={18} className=\"text-primary\" />\n <h2 className=\"font-semibold text-foreground\">\n Connections ({(connections ?? []).length})\n </h2>\n </div>\n {canCreateConnection && provider.pluginStatus === 'installed' && provider.isEnabled && (\n <button\n type=\"button\"\n onClick={handleCreateConnection}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-colors\"\n >\n <Plus size={14} />\n Add\n </button>\n )}\n </div>\n\n {connectionsLoading && (\n <div className=\"flex items-center justify-center py-12\">\n <Loader2 size={24} className=\"animate-spin text-muted-foreground\" />\n </div>\n )}\n\n {!connectionsLoading && (connections ?? []).length === 0 && (\n <div className=\"flex flex-col items-center justify-center py-12 px-6 text-center\">\n <div className=\"p-4 rounded-full bg-muted/50 mb-4\">\n <Link2 size={32} className=\"text-muted-foreground\" />\n </div>\n <h3 className=\"font-semibold text-foreground mb-1\">No connections yet</h3>\n <p className=\"text-sm text-muted-foreground mb-4 max-w-sm\">\n Create a connection to start using {provider.name} in your workspace.\n </p>\n {canCreateConnection && provider.pluginStatus === 'installed' && provider.isEnabled && (\n <button\n type=\"button\"\n onClick={handleCreateConnection}\n className=\"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-colors\"\n >\n <Plus size={16} />\n Create Connection\n </button>\n )}\n </div>\n )}\n\n {!connectionsLoading && (connections ?? []).length > 0 && (\n <div className=\"p-4 space-y-3\">\n {(connections ?? []).map((conn: IntegrationConnection) => (\n <ConnectionCard\n key={conn.id}\n connection={conn}\n displayMode=\"list\"\n onClick={handleConnectionClick}\n />\n ))}\n </div>\n )}\n </div>\n\n {/* Add Connection Dialog */}\n <AddConnectionDialog\n open={addConnectionDialogOpen}\n onClose={closeAddConnectionDialog}\n preselectedProviderId={addConnectionProviderId}\n onConnectionCreated={() => {\n refetch();\n }}\n />\n <ConfirmDialog\n open={uninstallDialogOpen}\n title={`Uninstall ${provider.name}`}\n description=\"Existing active connections must be removed first. This action is only available in admin mode.\"\n confirmLabel=\"Uninstall\"\n cancelLabel=\"Cancel\"\n destructive\n loading={uninstalling}\n icon={<Trash2 size={20} />}\n onConfirm={confirmUninstall}\n onCancel={() => setUninstallDialogOpen(false)}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AA0CA,SAAgB,IAAiB;CAC/B,IAAM,EAAE,kBAAe,GAAmC,EACpD,EAAE,eAAY,IAAO,cAAW,KAAK,aAAU,0BAAuB,GAAiB,EACvF,EACJ,4BACA,4BACA,4BACA,gCACE,GAAsB,EAEpB,EACJ,aACA,SAAS,IACT,OAAO,GACP,eACE,EAAY,KAAc,GAAG,EAC3B,EAAE,gBAAa,SAAS,MAAuB,GAAyB,KAAc,GAAG,EACzF,EAAE,mBAAgB,SAAS,MAAa,GAAmB,EAC3D,EAAE,oBAAiB,SAAS,MAAc,GAAoB,EAC9D,EAAE,qBAAiB,SAAS,MAAiB,GAAoB,EACjE,EAAE,kBAAe,WAAW,MAAuB,GAAgB,EACnE,CAAC,IAAqB,KAA0B,GAAS,GAAM,EAC/D,IACJ,CAAC,KAAsB,EAAc,EAAwB,kBAAkB,EAC3E,KACJ,KAAa,CAAC,KAAsB,EAAc,E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AAS,aACxE,kBAAC,UAAD;QACE,MAAK;QACL,SAAS;QACT,WAAU;kBAHZ,CAKE,kBAAC,GAAD,EAAM,MAAM,IAAM,CAAA,EAAA,oBAEX;;OAEP;;KAGP,CAAC,MAAuB,KAAe,EAAE,EAAE,SAAS,KACnD,kBAAC,OAAD;MAAK,WAAU;iBACX,KAAe,EAAE,EAAE,KAAK,MACxB,kBAAC,GAAD;OAEE,YAAY;OACZ,aAAY;OACZ,SAAS;OACT,EAJK,EAAK,GAIV,CACF;MACE,CAAA;KAEJ;;GAGN,kBAAC,IAAD;IACE,MAAM;IACN,SAAS;IACT,uBAAuB;IACvB,2BAA2B;AACzB,QAAS;;IAEX,CAAA;GACF,kBAAC,GAAD;IACE,MAAM;IACN,OAAO,aAAa,EAAS;IAC7B,aAAY;IACZ,cAAa;IACb,aAAY;IACZ,aAAA;IACA,SAAS;IACT,MAAM,kBAAC,GAAD,EAAQ,MAAM,IAAM,CAAA;IAC1B,WAlTmB,YAAY;AAC9B,WACL,MAAM,GAAgB,EAAS,GAAG,EAClC,EAAuB,GAAM,EAC7B,IAAW,EAAS,GAAU,YAAY,CAAC;;IA+SvC,gBAAgB,EAAuB,GAAM;IAC7C,CAAA;GACE"}
@@ -2,7 +2,7 @@ import { useIntegrations as e } from "../providers/IntegrationsProvider.js";
2
2
  import { INTEGRATION_PERMISSIONS as t } from "../constants/permissions.js";
3
3
  import { joinPath as n } from "../utils/navigation.js";
4
4
  import { useInstallPlugin as r, useProvider as i, useUpdatePlugin as a } from "../hooks/useProviders.js";
5
- import { useEffect as o, useMemo as s, useState as c } from "react";
5
+ import { useEffect as o, useId as s, useState as c } from "react";
6
6
  import { ArrowLeft as l, Loader2 as u, Save as d, Shield as f } from "lucide-react";
7
7
  import { useParams as p } from "react-router-dom";
8
8
  import { usePermissions as m } from "@burdenoff/fe-libs/shared/providers/shell";
@@ -109,11 +109,7 @@ function S() {
109
109
  isEnabled: A.isEnabled
110
110
  });
111
111
  }, [C, A]);
112
- let B = s(() => C ? k : O, [
113
- O,
114
- k,
115
- C
116
- ]), V = (e, t) => {
112
+ let B = C ? k : O, V = s(), H = (e) => `${V}-${e}`, U = (e, t) => {
117
113
  z((n) => ({
118
114
  ...n,
119
115
  [e]: t
@@ -158,50 +154,65 @@ function S() {
158
154
  children: "Core details"
159
155
  }),
160
156
  !C && /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
157
+ htmlFor: H("key"),
161
158
  className: "block text-sm font-medium mb-1.5 text-foreground",
162
159
  children: "Key"
163
160
  }), /* @__PURE__ */ h("input", {
161
+ id: H("key"),
162
+ "aria-label": "Key",
164
163
  value: R.key,
165
- onChange: (e) => V("key", e.target.value),
164
+ onChange: (e) => U("key", e.target.value),
166
165
  className: "w-full rounded-lg border border-border bg-background px-3 py-2.5 text-sm",
167
166
  placeholder: "e.g. slack-user"
168
167
  })] }),
169
168
  /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
169
+ htmlFor: H("name"),
170
170
  className: "block text-sm font-medium mb-1.5 text-foreground",
171
171
  children: "Name"
172
172
  }), /* @__PURE__ */ h("input", {
173
+ id: H("name"),
174
+ "aria-label": "Name",
173
175
  value: R.name,
174
- onChange: (e) => V("name", e.target.value),
176
+ onChange: (e) => U("name", e.target.value),
175
177
  className: "w-full rounded-lg border border-border bg-background px-3 py-2.5 text-sm"
176
178
  })] }),
177
179
  /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
180
+ htmlFor: H("description"),
178
181
  className: "block text-sm font-medium mb-1.5 text-foreground",
179
182
  children: "Description"
180
183
  }), /* @__PURE__ */ h("textarea", {
184
+ id: H("description"),
185
+ "aria-label": "Description",
181
186
  value: R.description,
182
- onChange: (e) => V("description", e.target.value),
187
+ onChange: (e) => U("description", e.target.value),
183
188
  rows: 4,
184
189
  className: "w-full rounded-lg border border-border bg-background px-3 py-2.5 text-sm"
185
190
  })] }),
186
191
  /* @__PURE__ */ g("div", {
187
192
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
188
193
  children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
194
+ htmlFor: H("category"),
189
195
  className: "block text-sm font-medium mb-1.5 text-foreground",
190
196
  children: "Category"
191
197
  }), /* @__PURE__ */ h("select", {
198
+ id: H("category"),
199
+ "aria-label": "Category",
192
200
  value: R.category,
193
- onChange: (e) => V("category", e.target.value),
201
+ onChange: (e) => U("category", e.target.value),
194
202
  className: "w-full rounded-lg border border-border bg-background px-3 py-2.5 text-sm",
195
203
  children: _.map((e) => /* @__PURE__ */ h("option", {
196
204
  value: e,
197
205
  children: e
198
206
  }, e))
199
207
  })] }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
208
+ htmlFor: H("authType"),
200
209
  className: "block text-sm font-medium mb-1.5 text-foreground",
201
210
  children: "Auth Type"
202
211
  }), /* @__PURE__ */ h("select", {
212
+ id: H("authType"),
213
+ "aria-label": "Auth Type",
203
214
  value: R.authType,
204
- onChange: (e) => V("authType", e.target.value),
215
+ onChange: (e) => U("authType", e.target.value),
205
216
  className: "w-full rounded-lg border border-border bg-background px-3 py-2.5 text-sm",
206
217
  children: v.map((e) => /* @__PURE__ */ h("option", {
207
218
  value: e,
@@ -212,55 +223,73 @@ function S() {
212
223
  /* @__PURE__ */ g("div", {
213
224
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
214
225
  children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
226
+ htmlFor: H("website"),
215
227
  className: "block text-sm font-medium mb-1.5 text-foreground",
216
228
  children: "Website"
217
229
  }), /* @__PURE__ */ h("input", {
230
+ id: H("website"),
231
+ "aria-label": "Website",
218
232
  value: R.website,
219
- onChange: (e) => V("website", e.target.value),
233
+ onChange: (e) => U("website", e.target.value),
220
234
  className: "w-full rounded-lg border border-border bg-background px-3 py-2.5 text-sm"
221
235
  })] }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
236
+ htmlFor: H("docsUrl"),
222
237
  className: "block text-sm font-medium mb-1.5 text-foreground",
223
238
  children: "Docs URL"
224
239
  }), /* @__PURE__ */ h("input", {
240
+ id: H("docsUrl"),
241
+ "aria-label": "Docs URL",
225
242
  value: R.docsUrl,
226
- onChange: (e) => V("docsUrl", e.target.value),
243
+ onChange: (e) => U("docsUrl", e.target.value),
227
244
  className: "w-full rounded-lg border border-border bg-background px-3 py-2.5 text-sm"
228
245
  })] })]
229
246
  }),
230
247
  /* @__PURE__ */ g("div", {
231
248
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
232
249
  children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
250
+ htmlFor: H("pluginVersion"),
233
251
  className: "block text-sm font-medium mb-1.5 text-foreground",
234
252
  children: "Plugin version"
235
253
  }), /* @__PURE__ */ h("input", {
254
+ id: H("pluginVersion"),
255
+ "aria-label": "Plugin version",
236
256
  value: R.pluginVersion,
237
- onChange: (e) => V("pluginVersion", e.target.value),
257
+ onChange: (e) => U("pluginVersion", e.target.value),
238
258
  className: "w-full rounded-lg border border-border bg-background px-3 py-2.5 text-sm"
239
259
  })] }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
260
+ htmlFor: H("displayOrder"),
240
261
  className: "block text-sm font-medium mb-1.5 text-foreground",
241
262
  children: "Display order"
242
263
  }), /* @__PURE__ */ h("input", {
264
+ id: H("displayOrder"),
265
+ "aria-label": "Display order",
243
266
  type: "number",
244
267
  value: R.displayOrder,
245
- onChange: (e) => V("displayOrder", e.target.value),
268
+ onChange: (e) => U("displayOrder", e.target.value),
246
269
  className: "w-full rounded-lg border border-border bg-background px-3 py-2.5 text-sm"
247
270
  })] })]
248
271
  }),
249
272
  /* @__PURE__ */ g("div", {
250
273
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
251
274
  children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
275
+ htmlFor: H("pluginAuthor"),
252
276
  className: "block text-sm font-medium mb-1.5 text-foreground",
253
277
  children: "Plugin author"
254
278
  }), /* @__PURE__ */ h("input", {
279
+ id: H("pluginAuthor"),
280
+ "aria-label": "Plugin author",
255
281
  value: R.pluginAuthor,
256
- onChange: (e) => V("pluginAuthor", e.target.value),
282
+ onChange: (e) => U("pluginAuthor", e.target.value),
257
283
  className: "w-full rounded-lg border border-border bg-background px-3 py-2.5 text-sm"
258
284
  })] }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
285
+ htmlFor: H("pluginRepository"),
259
286
  className: "block text-sm font-medium mb-1.5 text-foreground",
260
287
  children: "Repository"
261
288
  }), /* @__PURE__ */ h("input", {
289
+ id: H("pluginRepository"),
290
+ "aria-label": "Repository",
262
291
  value: R.pluginRepository,
263
- onChange: (e) => V("pluginRepository", e.target.value),
292
+ onChange: (e) => U("pluginRepository", e.target.value),
264
293
  className: "w-full rounded-lg border border-border bg-background px-3 py-2.5 text-sm"
265
294
  })] })]
266
295
  })
@@ -273,36 +302,48 @@ function S() {
273
302
  children: "Runtime config"
274
303
  }),
275
304
  /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
305
+ htmlFor: H("baseUrl"),
276
306
  className: "block text-sm font-medium mb-1.5 text-foreground",
277
307
  children: "Base URL"
278
308
  }), /* @__PURE__ */ h("input", {
309
+ id: H("baseUrl"),
310
+ "aria-label": "Base URL",
279
311
  value: R.baseUrl,
280
- onChange: (e) => V("baseUrl", e.target.value),
312
+ onChange: (e) => U("baseUrl", e.target.value),
281
313
  className: "w-full rounded-lg border border-border bg-background px-3 py-2.5 text-sm"
282
314
  })] }),
283
315
  /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
316
+ htmlFor: H("apiVersion"),
284
317
  className: "block text-sm font-medium mb-1.5 text-foreground",
285
318
  children: "API version"
286
319
  }), /* @__PURE__ */ h("input", {
320
+ id: H("apiVersion"),
321
+ "aria-label": "API version",
287
322
  value: R.apiVersion,
288
- onChange: (e) => V("apiVersion", e.target.value),
323
+ onChange: (e) => U("apiVersion", e.target.value),
289
324
  className: "w-full rounded-lg border border-border bg-background px-3 py-2.5 text-sm"
290
325
  })] }),
291
326
  /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
327
+ htmlFor: H("defaultScopes"),
292
328
  className: "block text-sm font-medium mb-1.5 text-foreground",
293
329
  children: "Default scopes"
294
330
  }), /* @__PURE__ */ h("input", {
331
+ id: H("defaultScopes"),
332
+ "aria-label": "Default scopes",
295
333
  value: R.defaultScopes,
296
- onChange: (e) => V("defaultScopes", e.target.value),
334
+ onChange: (e) => U("defaultScopes", e.target.value),
297
335
  placeholder: "openid, profile, email",
298
336
  className: "w-full rounded-lg border border-border bg-background px-3 py-2.5 text-sm"
299
337
  })] }),
300
338
  /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
339
+ htmlFor: H("supportedFeatures"),
301
340
  className: "block text-sm font-medium mb-1.5 text-foreground",
302
341
  children: "Supported features"
303
342
  }), /* @__PURE__ */ h("input", {
343
+ id: H("supportedFeatures"),
344
+ "aria-label": "Supported features",
304
345
  value: R.supportedFeatures,
305
- onChange: (e) => V("supportedFeatures", e.target.value),
346
+ onChange: (e) => U("supportedFeatures", e.target.value),
306
347
  placeholder: "messages, files, events",
307
348
  className: "w-full rounded-lg border border-border bg-background px-3 py-2.5 text-sm"
308
349
  })] }),
@@ -314,11 +355,14 @@ function S() {
314
355
  ["rateLimitConfig", "Rate limit config JSON"],
315
356
  ["configSchema", "Config schema JSON"]
316
357
  ].map(([e, t]) => /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
358
+ htmlFor: H(e),
317
359
  className: "block text-sm font-medium mb-1.5 text-foreground",
318
360
  children: t
319
361
  }), /* @__PURE__ */ h("textarea", {
362
+ id: H(e),
363
+ "aria-label": t,
320
364
  value: R[e],
321
- onChange: (t) => V(e, t.target.value),
365
+ onChange: (t) => U(e, t.target.value),
322
366
  rows: 4,
323
367
  className: "w-full rounded-lg border border-border bg-background px-3 py-2.5 text-sm font-mono"
324
368
  })] }, e))
@@ -328,7 +372,8 @@ function S() {
328
372
  children: [/* @__PURE__ */ h("input", {
329
373
  type: "checkbox",
330
374
  checked: R.isEnabled,
331
- onChange: (e) => V("isEnabled", e.target.checked)
375
+ onChange: (e) => U("isEnabled", e.target.checked),
376
+ "aria-label": "Provider enabled"
332
377
  }), /* @__PURE__ */ h("span", {
333
378
  className: "text-sm text-foreground",
334
379
  children: "Provider enabled"
@@ -357,8 +402,14 @@ function S() {
357
402
  pluginAuthor: R.pluginAuthor.trim() || void 0,
358
403
  pluginRepository: R.pluginRepository.trim() || void 0,
359
404
  displayOrder: Number(R.displayOrder || "0"),
360
- defaultScopes: R.defaultScopes.split(",").map((e) => e.trim()).filter(Boolean),
361
- supportedFeatures: R.supportedFeatures.split(",").map((e) => e.trim()).filter(Boolean),
405
+ defaultScopes: R.defaultScopes.split(",").flatMap((e) => {
406
+ let t = e.trim();
407
+ return t ? [t] : [];
408
+ }),
409
+ supportedFeatures: R.supportedFeatures.split(",").flatMap((e) => {
410
+ let t = e.trim();
411
+ return t ? [t] : [];
412
+ }),
362
413
  oauthConfig: y(R.oauthConfig, "OAuth config"),
363
414
  availableScopes: y(R.availableScopes, "Available scopes"),
364
415
  rateLimitConfig: y(R.rateLimitConfig, "Rate limit config"),