@burdenoff/microfe-integrations 2026.527.2 → 2026.530.1

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.
@@ -3,23 +3,23 @@ import { cn as t } from "../utils/cn.js";
3
3
  import { INTEGRATION_PERMISSIONS as n } from "../constants/permissions.js";
4
4
  import { getAuthTypeLabel as r, getCategoryLabel as i } from "../utils/integrationsHelpers.js";
5
5
  import { useGetConnectionLazyQuery as ee } from "../../generated/wspace-operations.js";
6
- import { useProviders as te } from "../hooks/useProviders.js";
7
- import { useAuthenticateWithApiKey as ne, useAuthenticateWithBasicAuth as re, useAuthenticateWithBearerToken as ie, useCreateConnection as ae, useInitiateOAuth as oe } from "../hooks/useConnections.js";
8
- import { waitForOAuthPopupCompletion as se } from "../utils/oauthPopup.js";
9
- import { CredentialStorageSelector as ce } from "./CredentialStorageSelector.js";
6
+ import { useProvider as te, useProviders as ne } from "../hooks/useProviders.js";
7
+ import { useAuthenticateWithApiKey as re, useAuthenticateWithBasicAuth as ie, useAuthenticateWithBearerToken as ae, useCreateConnection as oe, useInitiateOAuth as se } from "../hooks/useConnections.js";
8
+ import { waitForOAuthPopupCompletion as ce } from "../utils/oauthPopup.js";
9
+ import { CredentialStorageSelector as le } from "./CredentialStorageSelector.js";
10
10
  import { ProviderIcon as a } from "./ProviderIcon.js";
11
- import { useCallback as le, useEffect as o, useId as ue, useMemo as de, useRef as s, useState as c } from "react";
12
- import { AlertCircle as fe, Check as pe, CheckCircle2 as me, ExternalLink as l, Info as he, Key as u, Link2 as ge, Loader2 as d, Lock as _e, Search as ve, Shield as ye, X as be } from "lucide-react";
13
- import { usePermissions as xe } from "@burdenoff/fe-libs/shared/providers/shell";
11
+ import { useCallback as ue, useEffect as o, useId as de, useMemo as s, useRef as c, useState as l } from "react";
12
+ import { AlertCircle as fe, Check as pe, CheckCircle2 as me, ExternalLink as he, Info as ge, Key as u, Link2 as _e, Loader2 as d, Lock as ve, Search as ye, Shield as be, X as xe } from "lucide-react";
13
+ import { usePermissions as Se } from "@burdenoff/fe-libs/shared/providers/shell";
14
14
  import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
15
15
  //#region src/integrations/components/AddConnectionDialog.tsx
16
16
  function h({ open: h, onClose: g, preselectedProviderId: _, onConnectionCreated: v }) {
17
- let { apiGatewayUrl: y } = e(), { providers: b, loading: Se } = te(), { hasPermission: Ce, isLoading: we } = xe(), Te = !we && Ce(n.CONNECTION_CREATE), { createConnection: x, loading: Ee } = ae(), { initiateOAuth: S, loading: De } = oe(), { authenticateWithApiKey: C, loading: Oe } = ne(), { authenticateWithBasicAuth: w, loading: ke } = re(), { authenticateWithBearerToken: T, loading: Ae } = ie(), [E] = ee({ fetchPolicy: "network-only" }), [D, O] = c(null), [k, A] = c(!_), [j, M] = c("connection"), [N, je] = c(""), [P, F] = c(""), [I, Me] = c(""), [L, Ne] = c(""), [R, Pe] = c(""), [z, Fe] = c(""), [B, Ie] = c(""), [V, Le] = c({
17
+ let { apiGatewayUrl: y } = e(), { providers: b, loading: x } = ne(), Ce = s(() => _ ? (b ?? []).find((e) => e.id === _) ?? null : null, [b, _]), { provider: we, loading: Te } = te(!x && _ && !Ce ? _ : ""), S = Ce ?? we, Ee = !!_ && !S && (x || Te), { hasPermission: De, isLoading: C } = Se(), Oe = !C && De(n.CONNECTION_CREATE), { createConnection: w, loading: ke } = oe(), { initiateOAuth: T, loading: Ae } = se(), { authenticateWithApiKey: E, loading: je } = re(), { authenticateWithBasicAuth: D, loading: Me } = ie(), { authenticateWithBearerToken: Ne, loading: Pe } = ae(), [Fe] = ee({ fetchPolicy: "network-only" }), [O, k] = l(null), [A, j] = l(!_), [M, Ie] = l("connection"), [N, Le] = l(""), [P, F] = l(""), [I, Re] = l(""), [L, ze] = l(""), [R, Be] = l(""), [z, Ve] = l(""), [B, He] = l(""), [V, Ue] = l({
18
18
  mode: "managed",
19
19
  vaultId: "",
20
20
  secretId: "",
21
21
  managedSecretName: ""
22
- }), [H, Re] = c(!1), [ze, U] = c(""), [W, G] = c(!1), [K, q] = c(!1), [, Be] = c(null), J = s(null), Y = s(null), X = s(null), Ve = ue(), Z = (e) => `${Ve}-${e}`;
22
+ }), [H, We] = l(!1), [Ge, U] = l(""), [W, G] = l(!1), [K, q] = l(!1), [, Ke] = l(null), J = c(null), Y = c(null), qe = c(null), Je = de(), X = (e) => `${Je}-${e}`;
23
23
  o(() => {
24
24
  if (!h) return;
25
25
  let e = (e) => {
@@ -29,43 +29,40 @@ function h({ open: h, onClose: g, preselectedProviderId: _, onConnectionCreated:
29
29
  }, [h, g]), o(() => () => {
30
30
  Y.current?.(), J.current && !J.current.closed && J.current.close();
31
31
  }, []), o(() => {
32
- h && (M("connection"), je(""), F(""), Me(""), Ne(""), Pe(""), Fe(""), Ie(""), Le({
32
+ h && (Ie("connection"), Le(""), F(""), Re(""), ze(""), Be(""), Ve(""), He(""), Ue({
33
33
  mode: "managed",
34
34
  vaultId: "",
35
35
  secretId: "",
36
36
  managedSecretName: ""
37
- }), Re(!1), U(""), G(!1), q(!1), Be(null), _ ? (A(!1), O(null)) : (A(!0), O(null)));
37
+ }), We(!1), U(""), G(!1), q(!1), Ke(null), _ ? (j(!1), k(null)) : (j(!0), k(null)));
38
38
  }, [h, _]), o(() => {
39
- if (h && _ && b && !D) {
40
- let e = b.find((e) => e.id === _);
41
- e && (O(e), F(`${e.name} Connection`), A(!1));
42
- }
39
+ h && _ && S && !O && (k(S), F(`${S.name} Connection`), j(!1));
43
40
  }, [
44
41
  h,
45
42
  _,
46
- b,
47
- D
43
+ S,
44
+ O
48
45
  ]), o(() => {
49
- if (h && k) {
50
- let e = setTimeout(() => X.current?.focus(), 100);
46
+ if (h && A) {
47
+ let e = setTimeout(() => qe.current?.focus(), 100);
51
48
  return () => clearTimeout(e);
52
49
  }
53
- }, [h, k]);
54
- let Q = de(() => {
50
+ }, [h, A]);
51
+ let Z = s(() => {
55
52
  let e = (b ?? []).filter((e) => e.pluginStatus === "installed" && e.isEnabled);
56
53
  if (!N.trim()) return e;
57
54
  let t = N.toLowerCase();
58
55
  return e.filter((e) => e.name.toLowerCase().includes(t) || (e.description ?? "").toLowerCase().includes(t) || e.key.toLowerCase().includes(t));
59
- }, [b, N]), He = de(() => {
56
+ }, [b, N]), Ye = s(() => {
60
57
  let e = {};
61
- return Q.forEach((t) => {
58
+ return Z.forEach((t) => {
62
59
  let n = t.category;
63
60
  e[n] || (e[n] = []), e[n].push(t);
64
61
  }), e;
65
- }, [Q]), Ue = le((e) => {
66
- O(e), F(`${e.name} Connection`), A(!1), U("");
67
- }, []), $ = Ee || De || K || Oe || ke || Ae, We = le(async () => {
68
- if (!(!D || !P.trim())) {
62
+ }, [Z]), Xe = ue((e) => {
63
+ k(e), F(`${e.name} Connection`), j(!1), U("");
64
+ }, []), Q = ke || Ae || K || je || Me || Pe, $ = ue(async () => {
65
+ if (!(!O || !P.trim())) {
69
66
  if (!V.vaultId) {
70
67
  U("Please select a vault for this connection");
71
68
  return;
@@ -76,10 +73,10 @@ function h({ open: h, onClose: g, preselectedProviderId: _, onConnectionCreated:
76
73
  }
77
74
  try {
78
75
  U("");
79
- let e = await x({
76
+ let e = await w({
80
77
  name: P.trim(),
81
78
  description: I.trim() || void 0,
82
- providerId: D.id,
79
+ providerId: O.id,
83
80
  vaultId: V.vaultId,
84
81
  credentialSecretId: V.mode === "existing" ? V.secretId : void 0,
85
82
  managedSecretName: V.mode === "managed" && V.managedSecretName.trim() || void 0
@@ -88,20 +85,20 @@ function h({ open: h, onClose: g, preselectedProviderId: _, onConnectionCreated:
88
85
  U("Failed to create connection");
89
86
  return;
90
87
  }
91
- switch (Be(e), D.authType) {
88
+ switch (Ke(e), O.authType) {
92
89
  case "oauth2": {
93
- let t = await S(e, y ? `${y}/integrations/oauth/callback` : "/integrations/oauth/callback", D.key);
90
+ let t = await T(e, y ? `${y}/integrations/oauth/callback` : "/integrations/oauth/callback", O.key);
94
91
  if (t?.redirectUrl) {
95
92
  let n = window.screenX + (window.innerWidth - 600) / 2, r = window.screenY + (window.innerHeight - 700) / 2, i = window.open(t.redirectUrl, "oauth_popup", `width=600,height=700,left=${n},top=${r},toolbar=no,menubar=no,scrollbars=yes,resizable=yes`);
96
93
  if (!i) {
97
94
  U("Popup was blocked. Please allow popups for this site and try again.");
98
95
  return;
99
96
  }
100
- J.current = i, q(!0), Y.current?.(), Y.current = se({
97
+ J.current = i, q(!0), Y.current?.(), Y.current = ce({
101
98
  connectionId: e,
102
99
  popup: i,
103
100
  fetchConnectionStatus: async () => {
104
- let { data: t } = await E({ variables: { id: e } });
101
+ let { data: t } = await Fe({ variables: { id: e } });
105
102
  return t?.getConnection ?? null;
106
103
  },
107
104
  onSuccess: () => {
@@ -122,21 +119,21 @@ function h({ open: h, onClose: g, preselectedProviderId: _, onConnectionCreated:
122
119
  U("API key is required");
123
120
  return;
124
121
  }
125
- await C(e, L.trim()), G(!0), v?.(e);
122
+ await E(e, L.trim()), G(!0), v?.(e);
126
123
  break;
127
124
  case "basic_auth":
128
125
  if (!R.trim() || !z.trim()) {
129
126
  U("Username and password are required");
130
127
  return;
131
128
  }
132
- await w(e, R.trim(), z.trim()), G(!0), v?.(e);
129
+ await D(e, R.trim(), z.trim()), G(!0), v?.(e);
133
130
  break;
134
131
  case "bearer_token":
135
132
  if (!B.trim()) {
136
133
  U("Bearer token is required");
137
134
  return;
138
135
  }
139
- await T(e, B.trim()), G(!0), v?.(e);
136
+ await Ne(e, B.trim()), G(!0), v?.(e);
140
137
  break;
141
138
  default: G(!0), v?.(e);
142
139
  }
@@ -145,32 +142,32 @@ function h({ open: h, onClose: g, preselectedProviderId: _, onConnectionCreated:
145
142
  }
146
143
  }
147
144
  }, [
148
- D,
145
+ O,
149
146
  P,
150
147
  I,
151
148
  L,
152
149
  R,
153
150
  z,
154
151
  B,
155
- x,
156
- S,
157
- E,
158
- C,
159
152
  w,
160
153
  T,
154
+ Fe,
155
+ E,
156
+ D,
157
+ Ne,
161
158
  y,
162
159
  v,
163
160
  V
164
- ]), Ge = [{
161
+ ]), Ze = [{
165
162
  key: "connection",
166
163
  label: "Connection",
167
- icon: ge
164
+ icon: _e
168
165
  }, {
169
166
  key: "details",
170
167
  label: "Details",
171
- icon: he
168
+ icon: ge
172
169
  }];
173
- return h ? !Te && !we ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("div", {
170
+ return h ? !Oe && !C ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("div", {
174
171
  className: "fixed inset-0 bg-foreground/40 z-50 animate-in fade-in-0 duration-200",
175
172
  onClick: g
176
173
  }), /* @__PURE__ */ m("div", {
@@ -179,7 +176,7 @@ function h({ open: h, onClose: g, preselectedProviderId: _, onConnectionCreated:
179
176
  "aria-labelledby": "add-connection-denied-title",
180
177
  className: "fixed inset-x-4 top-1/2 z-50 mx-auto flex max-w-md -translate-y-1/2 flex-col items-center gap-4 rounded-xl border border-border bg-background p-8 shadow-2xl text-center",
181
178
  children: [
182
- /* @__PURE__ */ p(ye, {
179
+ /* @__PURE__ */ p(be, {
183
180
  size: 40,
184
181
  className: "text-muted-foreground"
185
182
  }),
@@ -211,16 +208,16 @@ function h({ open: h, onClose: g, preselectedProviderId: _, onConnectionCreated:
211
208
  className: "flex items-center justify-between px-5 py-4 border-b border-border flex-shrink-0",
212
209
  children: [/* @__PURE__ */ p("div", {
213
210
  className: "flex items-center gap-3",
214
- children: D && !k ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(a, {
215
- provider: D,
211
+ children: O && !A ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(a, {
212
+ provider: O,
216
213
  size: 32
217
214
  }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("h2", {
218
215
  id: "add-connection-dialog-title",
219
216
  className: "text-base font-semibold text-foreground",
220
- children: [D.name, " account"]
217
+ children: [O.name, " account"]
221
218
  }), /* @__PURE__ */ p("p", {
222
219
  className: "text-xs text-muted-foreground",
223
- children: r(D.authType)
220
+ children: r(O.authType)
224
221
  })] })] }) : /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("h2", {
225
222
  id: "add-connection-dialog-title",
226
223
  className: "text-base font-semibold text-foreground",
@@ -231,12 +228,12 @@ function h({ open: h, onClose: g, preselectedProviderId: _, onConnectionCreated:
231
228
  })] })
232
229
  }), /* @__PURE__ */ m("div", {
233
230
  className: "flex items-center gap-2",
234
- children: [D && !k && !W && /* @__PURE__ */ m("button", {
231
+ children: [O && !A && !W && /* @__PURE__ */ m("button", {
235
232
  type: "button",
236
- onClick: We,
237
- disabled: $ || !P.trim(),
233
+ onClick: $,
234
+ disabled: Q || !P.trim(),
238
235
  className: "inline-flex items-center gap-1.5 px-4 py-1.5 text-sm font-medium rounded-md bg-primary text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",
239
- children: [$ ? /* @__PURE__ */ p(d, {
236
+ children: [Q ? /* @__PURE__ */ p(d, {
240
237
  size: 14,
241
238
  className: "animate-spin"
242
239
  }) : /* @__PURE__ */ p(pe, { size: 14 }), K ? "Waiting..." : "Save"]
@@ -245,13 +242,13 @@ function h({ open: h, onClose: g, preselectedProviderId: _, onConnectionCreated:
245
242
  onClick: g,
246
243
  className: "p-1.5 rounded-md hover:bg-accent transition-colors text-muted-foreground hover:text-foreground",
247
244
  "aria-label": "Close",
248
- children: /* @__PURE__ */ p(be, { size: 20 })
245
+ children: /* @__PURE__ */ p(xe, { size: 20 })
249
246
  })]
250
247
  })]
251
248
  }), /* @__PURE__ */ m("div", {
252
249
  className: "flex flex-1 min-h-0 overflow-hidden",
253
250
  children: [
254
- k && !D && /* @__PURE__ */ m("div", {
251
+ A && !O && /* @__PURE__ */ m("div", {
255
252
  className: "flex-1 p-5 overflow-y-auto",
256
253
  children: [
257
254
  /* @__PURE__ */ p("p", {
@@ -260,26 +257,26 @@ function h({ open: h, onClose: g, preselectedProviderId: _, onConnectionCreated:
260
257
  }),
261
258
  /* @__PURE__ */ m("div", {
262
259
  className: "relative mb-4",
263
- children: [/* @__PURE__ */ p(ve, {
260
+ children: [/* @__PURE__ */ p(ye, {
264
261
  size: 16,
265
262
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"
266
263
  }), /* @__PURE__ */ p("input", {
267
- ref: X,
264
+ ref: qe,
268
265
  type: "text",
269
266
  value: N,
270
- onChange: (e) => je(e.target.value),
267
+ onChange: (e) => Le(e.target.value),
271
268
  placeholder: "Search providers...",
272
269
  "aria-label": "Search providers",
273
270
  className: "w-full pl-9 pr-3 py-2.5 border border-border rounded-md bg-background text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
274
271
  })]
275
272
  }),
276
- Se ? /* @__PURE__ */ p("div", {
273
+ x ? /* @__PURE__ */ p("div", {
277
274
  className: "flex items-center justify-center py-8",
278
275
  children: /* @__PURE__ */ p(d, {
279
276
  size: 24,
280
277
  className: "animate-spin text-muted-foreground"
281
278
  })
282
- }) : Q.length === 0 ? /* @__PURE__ */ m("div", {
279
+ }) : Z.length === 0 ? /* @__PURE__ */ m("div", {
283
280
  className: "text-center py-8 text-sm text-muted-foreground",
284
281
  children: [
285
282
  "No providers found matching “",
@@ -288,12 +285,12 @@ function h({ open: h, onClose: g, preselectedProviderId: _, onConnectionCreated:
288
285
  ]
289
286
  }) : /* @__PURE__ */ p("div", {
290
287
  className: "max-h-[400px] overflow-y-auto space-y-1",
291
- children: Object.entries(He).map(([e, t]) => /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("div", {
288
+ children: Object.entries(Ye).map(([e, t]) => /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("div", {
292
289
  className: "px-2 py-1.5 text-xs font-semibold text-muted-foreground uppercase tracking-wider",
293
290
  children: i(e)
294
291
  }), t.map((e) => /* @__PURE__ */ m("button", {
295
292
  type: "button",
296
- onClick: () => Ue(e),
293
+ onClick: () => Xe(e),
297
294
  className: "w-full flex items-center gap-3 px-3 py-2.5 rounded-md hover:bg-accent/50 transition-colors text-left",
298
295
  children: [/* @__PURE__ */ p(a, {
299
296
  provider: e,
@@ -312,14 +309,24 @@ function h({ open: h, onClose: g, preselectedProviderId: _, onConnectionCreated:
312
309
  })
313
310
  ]
314
311
  }),
315
- !k && !D && Se && /* @__PURE__ */ p("div", {
312
+ !A && !O && Ee && /* @__PURE__ */ p("div", {
316
313
  className: "flex-1 flex items-center justify-center",
317
314
  children: /* @__PURE__ */ p(d, {
318
315
  size: 32,
319
316
  className: "animate-spin text-muted-foreground"
320
317
  })
321
318
  }),
322
- W && D && /* @__PURE__ */ m("div", {
319
+ !A && !O && !Ee && _ && /* @__PURE__ */ m("div", {
320
+ className: "flex-1 flex flex-col items-center justify-center p-8 text-center",
321
+ children: [/* @__PURE__ */ p(fe, {
322
+ size: 32,
323
+ className: "text-muted-foreground mb-3"
324
+ }), /* @__PURE__ */ p("p", {
325
+ className: "text-sm text-muted-foreground",
326
+ children: "This provider isn't available."
327
+ })]
328
+ }),
329
+ W && O && /* @__PURE__ */ m("div", {
323
330
  className: "flex-1 flex flex-col items-center justify-center p-8 text-center",
324
331
  children: [
325
332
  /* @__PURE__ */ p("div", {
@@ -337,7 +344,7 @@ function h({ open: h, onClose: g, preselectedProviderId: _, onConnectionCreated:
337
344
  className: "text-sm text-muted-foreground mb-6",
338
345
  children: [
339
346
  "Your ",
340
- D.name,
347
+ O.name,
341
348
  " connection has been set up successfully."
342
349
  ]
343
350
  }),
@@ -349,67 +356,67 @@ function h({ open: h, onClose: g, preselectedProviderId: _, onConnectionCreated:
349
356
  })
350
357
  ]
351
358
  }),
352
- D && !k && !W && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("div", {
359
+ O && !A && !W && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("div", {
353
360
  className: "w-full border-b border-border sm:w-40 sm:border-b-0 sm:border-r flex-shrink-0 py-3 overflow-x-auto",
354
- children: Ge.map((e) => {
361
+ children: Ze.map((e) => {
355
362
  let n = e.icon;
356
363
  return /* @__PURE__ */ m("button", {
357
364
  type: "button",
358
- onClick: () => M(e.key),
359
- className: t("flex min-w-max items-center gap-2 px-4 py-2 text-sm font-medium transition-colors sm:w-full", j === e.key ? "text-foreground bg-accent/50 border-b-2 border-primary sm:border-b-0 sm:border-l-2" : "text-muted-foreground hover:text-foreground hover:bg-accent/30 border-b-2 border-transparent sm:border-b-0 sm:border-l-2"),
365
+ onClick: () => Ie(e.key),
366
+ className: t("flex min-w-max items-center gap-2 px-4 py-2 text-sm font-medium transition-colors sm:w-full", M === e.key ? "text-foreground bg-accent/50 border-b-2 border-primary sm:border-b-0 sm:border-l-2" : "text-muted-foreground hover:text-foreground hover:bg-accent/30 border-b-2 border-transparent sm:border-b-0 sm:border-l-2"),
360
367
  children: [/* @__PURE__ */ p(n, { size: 16 }), e.label]
361
368
  }, e.key);
362
369
  })
363
370
  }), /* @__PURE__ */ m("div", {
364
371
  className: "flex-1 p-5 overflow-y-auto",
365
- children: [j === "connection" && /* @__PURE__ */ m("div", {
372
+ children: [M === "connection" && /* @__PURE__ */ m("div", {
366
373
  className: "space-y-5",
367
374
  children: [
368
- ze && /* @__PURE__ */ m("div", {
375
+ Ge && /* @__PURE__ */ m("div", {
369
376
  className: "flex items-center gap-2 px-3 py-2 rounded-md bg-destructive/10 border border-destructive/20",
370
377
  children: [/* @__PURE__ */ p(fe, {
371
378
  size: 16,
372
379
  className: "text-destructive flex-shrink-0"
373
380
  }), /* @__PURE__ */ p("span", {
374
381
  className: "text-sm text-destructive",
375
- children: ze
382
+ children: Ge
376
383
  })]
377
384
  }),
378
385
  /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("label", {
379
- htmlFor: Z("conn-name"),
386
+ htmlFor: X("conn-name"),
380
387
  className: "block text-sm font-medium text-foreground mb-1.5",
381
388
  children: ["Connection Name ", /* @__PURE__ */ p("span", {
382
389
  className: "text-status-error-text",
383
390
  children: "*"
384
391
  })]
385
392
  }), /* @__PURE__ */ p("input", {
386
- id: Z("conn-name"),
393
+ id: X("conn-name"),
387
394
  "aria-label": "Connection Name",
388
395
  type: "text",
389
396
  value: P,
390
397
  onChange: (e) => F(e.target.value),
391
- placeholder: `My ${D.name} Connection`,
392
- disabled: $,
398
+ placeholder: `My ${O.name} Connection`,
399
+ disabled: Q,
393
400
  className: "w-full px-3 py-2 border border-border rounded-md bg-background text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary disabled:opacity-50"
394
401
  })] }),
395
402
  /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
396
- htmlFor: Z("conn-desc"),
403
+ htmlFor: X("conn-desc"),
397
404
  className: "block text-sm font-medium text-foreground mb-1.5",
398
405
  children: "Description"
399
406
  }), /* @__PURE__ */ p("input", {
400
- id: Z("conn-desc"),
407
+ id: X("conn-desc"),
401
408
  "aria-label": "Description",
402
409
  type: "text",
403
410
  value: I,
404
- onChange: (e) => Me(e.target.value),
411
+ onChange: (e) => Re(e.target.value),
405
412
  placeholder: "Optional description",
406
- disabled: $,
413
+ disabled: Q,
407
414
  className: "w-full px-3 py-2 border border-border rounded-md bg-background text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary disabled:opacity-50"
408
415
  })] }),
409
- /* @__PURE__ */ p(ce, {
416
+ /* @__PURE__ */ p(le, {
410
417
  value: V,
411
- onChange: Le,
412
- providerAuthType: D.authType
418
+ onChange: Ue,
419
+ providerAuthType: O.authType
413
420
  }),
414
421
  /* @__PURE__ */ m("div", {
415
422
  className: "rounded-md border border-border/50 bg-card p-4",
@@ -417,15 +424,15 @@ function h({ open: h, onClose: g, preselectedProviderId: _, onConnectionCreated:
417
424
  /* @__PURE__ */ m("h3", {
418
425
  className: "font-medium text-foreground flex items-center gap-2 mb-3 text-sm",
419
426
  children: [
420
- /* @__PURE__ */ p(ye, {
427
+ /* @__PURE__ */ p(be, {
421
428
  size: 16,
422
429
  className: "text-primary"
423
430
  }),
424
431
  "Authentication: ",
425
- r(D.authType)
432
+ r(O.authType)
426
433
  ]
427
434
  }),
428
- D.authType === "oauth2" && /* @__PURE__ */ p("div", {
435
+ O.authType === "oauth2" && /* @__PURE__ */ p("div", {
429
436
  className: "space-y-3",
430
437
  children: K ? /* @__PURE__ */ m("div", {
431
438
  className: "flex flex-col items-center gap-3 py-4",
@@ -438,7 +445,7 @@ function h({ open: h, onClose: g, preselectedProviderId: _, onConnectionCreated:
438
445
  className: "text-sm font-medium text-foreground",
439
446
  children: [
440
447
  "Waiting for ",
441
- D.name,
448
+ O.name,
442
449
  " authorization…"
443
450
  ]
444
451
  }),
@@ -448,7 +455,7 @@ function h({ open: h, onClose: g, preselectedProviderId: _, onConnectionCreated:
448
455
  }),
449
456
  /* @__PURE__ */ m("div", {
450
457
  className: "p-2 rounded-md bg-status-warning-bg-subtle border border-border-default text-xs text-status-warning-text flex items-center gap-1.5",
451
- children: [/* @__PURE__ */ p(l, { size: 12 }), "Don't see the popup? Check if it was blocked"]
458
+ children: [/* @__PURE__ */ p(he, { size: 12 }), "Don't see the popup? Check if it was blocked"]
452
459
  })
453
460
  ]
454
461
  }) : /* @__PURE__ */ m("div", {
@@ -456,40 +463,40 @@ function h({ open: h, onClose: g, preselectedProviderId: _, onConnectionCreated:
456
463
  children: [/* @__PURE__ */ m("div", {
457
464
  className: "p-2.5 rounded-md bg-status-info-bg-subtle border border-border-default text-sm text-status-info-text flex items-center gap-2",
458
465
  children: [
459
- /* @__PURE__ */ p(l, { size: 14 }),
466
+ /* @__PURE__ */ p(he, { size: 14 }),
460
467
  "A popup window will open for",
461
468
  " ",
462
- D.name,
469
+ O.name,
463
470
  " sign-in"
464
471
  ]
465
472
  }), /* @__PURE__ */ m("button", {
466
473
  type: "button",
467
- onClick: We,
468
- disabled: $ || !P.trim(),
474
+ onClick: $,
475
+ disabled: Q || !P.trim(),
469
476
  className: "w-full inline-flex items-center justify-center gap-2.5 rounded-md border border-primary bg-primary px-4 py-2.5 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90 disabled:opacity-50",
470
477
  children: [
471
478
  /* @__PURE__ */ p(a, {
472
- provider: D,
479
+ provider: O,
473
480
  size: 20
474
481
  }),
475
482
  "Sign in with",
476
483
  " ",
477
- D.name.replace(/^(Google|Microsoft)\s/, "")
484
+ O.name.replace(/^(Google|Microsoft)\s/, "")
478
485
  ]
479
486
  })]
480
487
  })
481
488
  }),
482
- D.authType === "api_key" && /* @__PURE__ */ m("div", {
489
+ O.authType === "api_key" && /* @__PURE__ */ m("div", {
483
490
  className: "space-y-3",
484
491
  children: [/* @__PURE__ */ m("p", {
485
492
  className: "text-xs text-muted-foreground",
486
493
  children: [
487
494
  "Enter your ",
488
- D.name,
495
+ O.name,
489
496
  " API key."
490
497
  ]
491
498
  }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("label", {
492
- htmlFor: Z("api-key"),
499
+ htmlFor: X("api-key"),
493
500
  className: "block text-sm font-medium text-foreground mb-1.5",
494
501
  children: ["API Key ", /* @__PURE__ */ p("span", {
495
502
  className: "text-status-error-text",
@@ -503,55 +510,55 @@ function h({ open: h, onClose: g, preselectedProviderId: _, onConnectionCreated:
503
510
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"
504
511
  }),
505
512
  /* @__PURE__ */ p("input", {
506
- id: Z("api-key"),
513
+ id: X("api-key"),
507
514
  "aria-label": "API Key",
508
515
  type: H ? "text" : "password",
509
516
  value: L,
510
- onChange: (e) => Ne(e.target.value),
517
+ onChange: (e) => ze(e.target.value),
511
518
  placeholder: "Enter your API key",
512
- disabled: $,
519
+ disabled: Q,
513
520
  className: "w-full pl-9 pr-10 py-2 border border-border rounded-md bg-background text-sm font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary disabled:opacity-50"
514
521
  }),
515
522
  /* @__PURE__ */ p("button", {
516
523
  type: "button",
517
- onClick: () => Re(!H),
524
+ onClick: () => We(!H),
518
525
  "aria-label": H ? "Hide secret" : "Show secret",
519
526
  className: "absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",
520
- children: p(H ? _e : u, { size: 14 })
527
+ children: p(H ? ve : u, { size: 14 })
521
528
  })
522
529
  ]
523
530
  })] })]
524
531
  }),
525
- D.authType === "basic_auth" && /* @__PURE__ */ m("div", {
532
+ O.authType === "basic_auth" && /* @__PURE__ */ m("div", {
526
533
  className: "space-y-3",
527
534
  children: [
528
535
  /* @__PURE__ */ m("p", {
529
536
  className: "text-xs text-muted-foreground",
530
537
  children: [
531
538
  "Enter your ",
532
- D.name,
539
+ O.name,
533
540
  " credentials."
534
541
  ]
535
542
  }),
536
543
  /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("label", {
537
- htmlFor: Z("username"),
544
+ htmlFor: X("username"),
538
545
  className: "block text-sm font-medium text-foreground mb-1.5",
539
546
  children: ["Username ", /* @__PURE__ */ p("span", {
540
547
  className: "text-status-error-text",
541
548
  children: "*"
542
549
  })]
543
550
  }), /* @__PURE__ */ p("input", {
544
- id: Z("username"),
551
+ id: X("username"),
545
552
  "aria-label": "Username",
546
553
  type: "text",
547
554
  value: R,
548
- onChange: (e) => Pe(e.target.value),
555
+ onChange: (e) => Be(e.target.value),
549
556
  placeholder: "Username or email",
550
- disabled: $,
557
+ disabled: Q,
551
558
  className: "w-full px-3 py-2 border border-border rounded-md bg-background text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary disabled:opacity-50"
552
559
  })] }),
553
560
  /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("label", {
554
- htmlFor: Z("password"),
561
+ htmlFor: X("password"),
555
562
  className: "block text-sm font-medium text-foreground mb-1.5",
556
563
  children: ["Password ", /* @__PURE__ */ p("span", {
557
564
  className: "text-status-error-text",
@@ -559,33 +566,33 @@ function h({ open: h, onClose: g, preselectedProviderId: _, onConnectionCreated:
559
566
  })]
560
567
  }), /* @__PURE__ */ m("div", {
561
568
  className: "relative",
562
- children: [/* @__PURE__ */ p(_e, {
569
+ children: [/* @__PURE__ */ p(ve, {
563
570
  size: 14,
564
571
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"
565
572
  }), /* @__PURE__ */ p("input", {
566
- id: Z("password"),
573
+ id: X("password"),
567
574
  "aria-label": "Password",
568
575
  type: "password",
569
576
  value: z,
570
- onChange: (e) => Fe(e.target.value),
577
+ onChange: (e) => Ve(e.target.value),
571
578
  placeholder: "Password",
572
- disabled: $,
579
+ disabled: Q,
573
580
  className: "w-full pl-9 pr-3 py-2 border border-border rounded-md bg-background text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary disabled:opacity-50"
574
581
  })]
575
582
  })] })
576
583
  ]
577
584
  }),
578
- D.authType === "bearer_token" && /* @__PURE__ */ m("div", {
585
+ O.authType === "bearer_token" && /* @__PURE__ */ m("div", {
579
586
  className: "space-y-3",
580
587
  children: [/* @__PURE__ */ m("p", {
581
588
  className: "text-xs text-muted-foreground",
582
589
  children: [
583
590
  "Enter your ",
584
- D.name,
591
+ O.name,
585
592
  " bearer token."
586
593
  ]
587
594
  }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("label", {
588
- htmlFor: Z("bearer-token"),
595
+ htmlFor: X("bearer-token"),
589
596
  className: "block text-sm font-medium text-foreground mb-1.5",
590
597
  children: ["Bearer Token ", /* @__PURE__ */ p("span", {
591
598
  className: "text-status-error-text",
@@ -597,13 +604,13 @@ function h({ open: h, onClose: g, preselectedProviderId: _, onConnectionCreated:
597
604
  size: 14,
598
605
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"
599
606
  }), /* @__PURE__ */ p("input", {
600
- id: Z("bearer-token"),
607
+ id: X("bearer-token"),
601
608
  "aria-label": "Bearer Token",
602
609
  type: "password",
603
610
  value: B,
604
- onChange: (e) => Ie(e.target.value),
611
+ onChange: (e) => He(e.target.value),
605
612
  placeholder: "Enter your token",
606
- disabled: $,
613
+ disabled: Q,
607
614
  className: "w-full pl-9 pr-3 py-2 border border-border rounded-md bg-background text-sm font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary disabled:opacity-50"
608
615
  })]
609
616
  })] })]
@@ -611,7 +618,7 @@ function h({ open: h, onClose: g, preselectedProviderId: _, onConnectionCreated:
611
618
  ]
612
619
  })
613
620
  ]
614
- }), j === "details" && /* @__PURE__ */ m("div", {
621
+ }), M === "details" && /* @__PURE__ */ m("div", {
615
622
  className: "space-y-4",
616
623
  children: [/* @__PURE__ */ p("h3", {
617
624
  className: "text-sm font-semibold text-foreground",
@@ -622,47 +629,47 @@ function h({ open: h, onClose: g, preselectedProviderId: _, onConnectionCreated:
622
629
  /* @__PURE__ */ m("div", {
623
630
  className: "flex items-center gap-3 p-3 rounded-md border border-border",
624
631
  children: [/* @__PURE__ */ p(a, {
625
- provider: D,
632
+ provider: O,
626
633
  size: 40
627
634
  }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
628
635
  className: "text-sm font-medium text-foreground",
629
- children: D.name
636
+ children: O.name
630
637
  }), /* @__PURE__ */ m("p", {
631
638
  className: "text-xs text-muted-foreground",
632
639
  children: [
633
- r(D.authType),
640
+ r(O.authType),
634
641
  " ·",
635
642
  " ",
636
- i(D.category)
643
+ i(O.category)
637
644
  ]
638
645
  })] })]
639
646
  }),
640
- D.description && /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("div", {
647
+ O.description && /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("div", {
641
648
  className: "text-xs font-medium text-muted-foreground uppercase tracking-wider",
642
649
  children: "Description"
643
650
  }), /* @__PURE__ */ p("p", {
644
651
  className: "text-sm text-foreground mt-1",
645
- children: D.description
652
+ children: O.description
646
653
  })] }),
647
- D.website && /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("div", {
654
+ O.website && /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("div", {
648
655
  className: "text-xs font-medium text-muted-foreground uppercase tracking-wider",
649
656
  children: "Website"
650
657
  }), /* @__PURE__ */ p("a", {
651
- href: D.website,
658
+ href: O.website,
652
659
  target: "_blank",
653
660
  rel: "noopener noreferrer",
654
661
  className: "block text-sm text-primary hover:underline mt-1",
655
- children: D.website
662
+ children: O.website
656
663
  })] }),
657
- D.docsUrl && /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("div", {
664
+ O.docsUrl && /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("div", {
658
665
  className: "text-xs font-medium text-muted-foreground uppercase tracking-wider",
659
666
  children: "Documentation"
660
667
  }), /* @__PURE__ */ p("a", {
661
- href: D.docsUrl,
668
+ href: O.docsUrl,
662
669
  target: "_blank",
663
670
  rel: "noopener noreferrer",
664
671
  className: "block text-sm text-primary hover:underline mt-1",
665
- children: D.docsUrl
672
+ children: O.docsUrl
666
673
  })] })
667
674
  ]
668
675
  })]