@burdenoff/microfe-integrations 2026.625.3 → 2026.626.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.
@@ -10,169 +10,169 @@ import { waitForOAuthPopupCompletion as de } from "../utils/oauthPopup.js";
10
10
  import { CredentialStorageSelector as fe } from "../components/CredentialStorageSelector.js";
11
11
  import { ProviderIcon as a } from "../components/ProviderIcon.js";
12
12
  import { useCallback as o, useEffect as s, useMemo as c, useRef as l, useState as u } from "react";
13
- import { AlertCircle as d, ArrowLeft as pe, ArrowRight as me, Check as he, CheckCircle2 as ge, ExternalLink as _e, Key as ve, Link as ye, Loader2 as f, Lock as be, Search as xe, Shield as Se } from "lucide-react";
14
- import { useLocation as Ce, useParams as we } from "react-router-dom";
15
- import { usePermissions as Te } from "@burdenoff/fe-libs/shared/providers/shell";
16
- import { jsx as p, jsxs as m } from "react/jsx-runtime";
17
- import { Button as h, GlassCard as Ee } from "@burdenoff/fe-libs/ui";
13
+ import { AlertCircle as d, ArrowLeft as pe, ArrowRight as me, Check as he, CheckCircle2 as ge, ExternalLink as _e, Key as f, Link as ve, Loader2 as p, Lock as ye, Search as be, Shield as xe } from "lucide-react";
14
+ import { useLocation as Se, useParams as Ce } from "react-router-dom";
15
+ import { usePermissions as we } from "@burdenoff/fe-libs/shared/providers/shell";
16
+ import { jsx as m, jsxs as h } from "react/jsx-runtime";
17
+ import { Button as g, GlassCard as _, IllustratedEmptyState as Te, PagePurpose as Ee } from "@burdenoff/fe-libs/ui";
18
18
  //#region src/integrations/pages/AddConnectionWizard.tsx
19
- function g() {
20
- let { providerId: g } = we(), { basePath: _ = "/", navigate: v, apiGatewayUrl: y } = e(), De = Ce().search, b = c(() => new URLSearchParams(De), [De]), x = b.get("providerKey") ?? null, S = b.get("returnTo") ?? null, C = b.get("channelId") ?? null, w = !!(S && C), { provider: T, loading: Oe } = re(x ?? ""), { providers: E, loading: D } = ie(), { hasPermission: ke, isLoading: Ae } = Te(), je = ke(n.CONNECTION_CREATE), { createConnection: O, loading: Me } = le(), { initiateOAuth: k, loading: Ne } = ue(), { authenticateWithApiKey: Pe, loading: Fe } = ae(), { authenticateWithBasicAuth: Ie, loading: Le } = oe(), { authenticateWithBearerToken: Re, loading: ze } = se(), { authenticateWithServiceAccount: Be, loading: Ve } = ce(), [He] = te({ fetchPolicy: "network-only" }), [A, j] = u(g || x ? "configure" : "select_provider"), [M, Ue] = u(null), [N, We] = u(""), [P, F] = u(""), [I, Ge] = u(""), [L, Ke] = u(""), [R, qe] = u(""), [z, Je] = u(""), [B, Ye] = u(""), [V, Xe] = u({
19
+ function v() {
20
+ let { providerId: v } = Ce(), { basePath: y = "/", navigate: b, apiGatewayUrl: x } = e(), De = Se().search, S = c(() => new URLSearchParams(De), [De]), C = S.get("providerKey") ?? null, w = S.get("returnTo") ?? null, T = S.get("channelId") ?? null, E = !!(w && T), { provider: Oe, loading: ke } = re(C ?? ""), { providers: D, loading: O } = ie(), { hasPermission: Ae, isLoading: je } = we(), Me = Ae(n.CONNECTION_CREATE), { createConnection: Ne, loading: Pe } = le(), { initiateOAuth: Fe, loading: Ie } = ue(), { authenticateWithApiKey: Le, loading: Re } = ae(), { authenticateWithBasicAuth: ze, loading: Be } = oe(), { authenticateWithBearerToken: Ve, loading: He } = se(), { authenticateWithServiceAccount: k, loading: Ue } = ce(), [A] = te({ fetchPolicy: "network-only" }), [j, M] = u(v || C ? "configure" : "select_provider"), [N, P] = u(null), [F, We] = u(""), [I, L] = u(""), [R, Ge] = u(""), [z, Ke] = u(""), [B, qe] = u(""), [V, Je] = u(""), [H, Ye] = u(""), [U, Xe] = u({
21
21
  mode: "managed",
22
22
  vaultId: "",
23
23
  secretId: "",
24
24
  managedSecretName: ""
25
- }), [H, U] = u(""), [W, Ze] = u(null), [Qe, $e] = u(!1), G = l(null), K = l(null);
25
+ }), [W, G] = u(""), [K, Ze] = u(null), [Qe, $e] = u(!1), q = l(null), J = l(null);
26
26
  s(() => () => {
27
- K.current?.(), G.current && !G.current.closed && G.current.close();
27
+ J.current?.(), q.current && !q.current.closed && q.current.close();
28
28
  }, []);
29
- let q = c(() => !g || !E ? null : E.find((e) => e.id === g) || null, [g, E]), { provider: J, loading: et } = ne(g && !q && !D ? g : ""), Y = c(() => T ?? q ?? J, [
30
- T,
31
- q,
32
- J
29
+ let Y = c(() => !v || !D ? null : D.find((e) => e.id === v) || null, [v, D]), { provider: et, loading: tt } = ne(v && !Y && !O ? v : ""), X = c(() => Oe ?? Y ?? et, [
30
+ Oe,
31
+ Y,
32
+ et
33
33
  ]);
34
34
  s(() => {
35
- Y && !M && A === "configure" && (Ue(Y), P || F(`${Y.name} Connection`));
35
+ X && !N && j === "configure" && (P(X), I || L(`${X.name} Connection`));
36
36
  }, [
37
- Y,
38
- M,
39
- A,
40
- P
37
+ X,
38
+ N,
39
+ j,
40
+ I
41
41
  ]);
42
- let tt = c(() => {
43
- let e = (E ?? []).filter((e) => e.pluginStatus === "installed" && e.isEnabled);
44
- if (!N) return e;
45
- let t = N.toLowerCase();
42
+ let nt = c(() => {
43
+ let e = (D ?? []).filter((e) => e.pluginStatus === "installed" && e.isEnabled);
44
+ if (!F) return e;
45
+ let t = F.toLowerCase();
46
46
  return e.filter((e) => e.name.toLowerCase().includes(t) || (e.description ?? "").toLowerCase().includes(t));
47
- }, [E, N]), nt = o((e) => {
48
- Ue(e), F(`${e.name} Connection`), j("configure");
49
- }, []), rt = o(() => {
50
- if (!P.trim()) {
51
- U("Connection name is required");
47
+ }, [D, F]), rt = o((e) => {
48
+ P(e), L(`${e.name} Connection`), M("configure");
49
+ }, []), it = o(() => {
50
+ if (!I.trim()) {
51
+ G("Connection name is required");
52
52
  return;
53
53
  }
54
- if (!V.vaultId) {
55
- U("Please select a vault for storing or referencing credentials");
54
+ if (!U.vaultId) {
55
+ G("Please select a vault for storing or referencing credentials");
56
56
  return;
57
57
  }
58
- if (V.mode === "existing" && !V.secretId) {
59
- U("Please select an existing vault secret to reuse");
58
+ if (U.mode === "existing" && !U.secretId) {
59
+ G("Please select an existing vault secret to reuse");
60
60
  return;
61
61
  }
62
- U(""), j("authenticate");
63
- }, [P, V]), it = o(async () => {
64
- if (M) try {
65
- U("");
66
- let e = y ? `${y}/integrations/oauth/callback` : "/integrations/oauth/callback", t = w ? {
67
- returnTo: S,
68
- channelId: C
69
- } : void 0, n = W ?? await O({
70
- name: P.trim(),
71
- description: I.trim(),
72
- providerId: M.id,
73
- vaultId: V.vaultId,
74
- credentialSecretId: V.mode === "existing" ? V.secretId : void 0,
75
- managedSecretName: V.mode === "managed" && V.managedSecretName.trim() || void 0,
62
+ G(""), M("authenticate");
63
+ }, [I, U]), at = o(async () => {
64
+ if (N) try {
65
+ G("");
66
+ let e = x ? `${x}/integrations/oauth/callback` : "/integrations/oauth/callback", t = E ? {
67
+ returnTo: w,
68
+ channelId: T
69
+ } : void 0, n = K ?? await Ne({
70
+ name: I.trim(),
71
+ description: R.trim(),
72
+ providerId: N.id,
73
+ vaultId: U.vaultId,
74
+ credentialSecretId: U.mode === "existing" ? U.secretId : void 0,
75
+ managedSecretName: U.mode === "managed" && U.managedSecretName.trim() || void 0,
76
76
  ...t ? { config: t } : {}
77
77
  });
78
78
  if (!n) {
79
- U("Failed to create connection"), j("error");
79
+ G("Failed to create connection"), M("error");
80
80
  return;
81
81
  }
82
- switch (Ze(n), M.authType) {
82
+ switch (Ze(n), N.authType) {
83
83
  case "oauth2": {
84
- let t = await k(n, e, M.key);
85
- if (t?.redirectUrl) if (w) {
84
+ let t = await Fe(n, e, N.key);
85
+ if (t?.redirectUrl) if (E) {
86
86
  window.location.href = t.redirectUrl;
87
87
  return;
88
88
  } else {
89
89
  let e = 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=${e},top=${r},toolbar=no,menubar=no,scrollbars=yes,resizable=yes`);
90
90
  if (!i) {
91
- U("Popup was blocked. Please allow popups for this site and try again."), j("error");
91
+ G("Popup was blocked. Please allow popups for this site and try again."), M("error");
92
92
  return;
93
93
  }
94
- G.current = i, $e(!0), K.current?.(), K.current = de({
94
+ q.current = i, $e(!0), J.current?.(), J.current = de({
95
95
  connectionId: n,
96
96
  popup: i,
97
97
  fetchConnectionStatus: async () => {
98
- let { data: e } = await He({ variables: { id: n } });
98
+ let { data: e } = await A({ variables: { id: n } });
99
99
  return e?.getConnection ?? null;
100
100
  },
101
101
  onSuccess: () => {
102
- j("success");
102
+ M("success");
103
103
  },
104
104
  onError: (e) => {
105
- U(e), j("error");
105
+ G(e), M("error");
106
106
  },
107
107
  onSettled: () => {
108
- K.current = null, G.current = null, $e(!1);
108
+ J.current = null, q.current = null, $e(!1);
109
109
  }
110
110
  });
111
111
  return;
112
112
  }
113
- j("success");
113
+ M("success");
114
114
  break;
115
115
  }
116
116
  case "api_key":
117
- if (!L.trim()) {
118
- U("API key is required");
117
+ if (!z.trim()) {
118
+ G("API key is required");
119
119
  return;
120
120
  }
121
- await Pe(n, L.trim()), j("success");
121
+ await Le(n, z.trim()), M("success");
122
122
  break;
123
123
  case "basic_auth":
124
- if (!R.trim() || !z.trim()) {
125
- U("Username and password are required");
124
+ if (!B.trim() || !V.trim()) {
125
+ G("Username and password are required");
126
126
  return;
127
127
  }
128
- await Ie(n, R.trim(), z.trim()), j("success");
128
+ await ze(n, B.trim(), V.trim()), M("success");
129
129
  break;
130
130
  case "bearer_token":
131
- if (!B.trim()) {
132
- U("Bearer token is required");
131
+ if (!H.trim()) {
132
+ G("Bearer token is required");
133
133
  return;
134
134
  }
135
- await Re(n, B.trim()), j("success");
135
+ await Ve(n, H.trim()), M("success");
136
136
  break;
137
137
  case "service_account":
138
- await Be(n, M.defaultScopes && M.defaultScopes.length > 0 ? M.defaultScopes : void 0), j("success");
138
+ await k(n, N.defaultScopes && N.defaultScopes.length > 0 ? N.defaultScopes : void 0), M("success");
139
139
  break;
140
- default: j("success");
140
+ default: M("success");
141
141
  }
142
142
  } catch (e) {
143
- U(e instanceof Error ? e.message : "Authentication failed"), j("error");
143
+ G(e instanceof Error ? e.message : "Authentication failed"), M("error");
144
144
  }
145
145
  }, [
146
- M,
147
- P,
146
+ N,
148
147
  I,
149
- L,
150
148
  R,
151
149
  z,
152
150
  B,
153
- O,
151
+ V,
152
+ H,
153
+ Ne,
154
+ Fe,
155
+ A,
156
+ Le,
157
+ ze,
158
+ Ve,
154
159
  k,
155
- He,
156
- Pe,
157
- Ie,
158
- Re,
159
- Be,
160
+ E,
160
161
  w,
161
- S,
162
- C,
163
- y,
164
- W,
165
- V
166
- ]), at = o(() => {
167
- if (!S || !W) return;
168
- let e = new URL(S, window.location.origin);
169
- e.searchParams.set("integrationConnectionId", W), C && e.searchParams.set("channelId", C), v?.(e.pathname + e.search);
162
+ T,
163
+ x,
164
+ K,
165
+ U
166
+ ]), ot = o(() => {
167
+ if (!w || !K) return;
168
+ let e = new URL(w, window.location.origin);
169
+ e.searchParams.set("integrationConnectionId", K), T && e.searchParams.set("channelId", T), b?.(e.pathname + e.search);
170
170
  }, [
171
- S,
172
- W,
173
- C,
174
- v
175
- ]), X = Me || Ne || Qe || Fe || Le || ze || Ve, Z = x ? Oe : D || et, Q = [
171
+ w,
172
+ K,
173
+ T,
174
+ b
175
+ ]), Z = Pe || Ie || Qe || Re || Be || He || Ue, st = C ? ke : O || tt, Q = [
176
176
  {
177
177
  key: "select_provider",
178
178
  label: "Select Provider"
@@ -185,130 +185,132 @@ function g() {
185
185
  key: "authenticate",
186
186
  label: "Authenticate"
187
187
  }
188
- ], $ = Q.findIndex((e) => e.key === A);
189
- return Ae ? /* @__PURE__ */ p("div", {
188
+ ], $ = Q.findIndex((e) => e.key === j);
189
+ return je ? /* @__PURE__ */ m("div", {
190
190
  className: "flex items-center justify-center py-20",
191
- children: /* @__PURE__ */ p(f, {
191
+ children: /* @__PURE__ */ m(p, {
192
192
  size: 48,
193
193
  className: "animate-spin text-primary"
194
194
  })
195
- }) : je ? /* @__PURE__ */ m("div", {
195
+ }) : Me ? /* @__PURE__ */ h("div", {
196
196
  className: "space-y-6 p-6 max-w-3xl mx-auto",
197
197
  children: [
198
- /* @__PURE__ */ m("div", {
198
+ /* @__PURE__ */ h("div", {
199
199
  className: "flex items-center gap-4",
200
200
  children: [
201
- /* @__PURE__ */ p(h, {
201
+ /* @__PURE__ */ m(g, {
202
202
  variant: "ghost",
203
203
  size: "icon",
204
- onClick: () => v?.(r(_, "connections")),
204
+ onClick: () => b?.(r(y, "connections")),
205
205
  "aria-label": "Back",
206
- children: /* @__PURE__ */ p(pe, { size: 20 })
206
+ children: /* @__PURE__ */ m(pe, { size: 20 })
207
207
  }),
208
- /* @__PURE__ */ p("h1", {
208
+ /* @__PURE__ */ m("h1", {
209
209
  className: "text-2xl font-bold text-text-primary",
210
210
  children: "Add Connection"
211
211
  }),
212
- w && /* @__PURE__ */ p("span", {
212
+ E && /* @__PURE__ */ m("span", {
213
213
  className: "ml-auto text-xs font-medium px-2.5 py-1 rounded-full bg-action-primary-bg/10 text-primary",
214
214
  children: "Bot Channel Setup"
215
215
  })
216
216
  ]
217
217
  }),
218
- A !== "success" && A !== "error" && /* @__PURE__ */ p("div", {
218
+ j !== "success" && j !== "error" && /* @__PURE__ */ m(Ee, {
219
+ icon: /* @__PURE__ */ m(ve, { size: 16 }),
220
+ children: E ? "Connect an external account so your bot channel can act on your behalf. Pick the service, name the connection, choose where its credentials live, then authenticate — you will be sent back to finish linking the channel." : "A connection is a one-time, authenticated link between your workspace and an external service. Choose a provider, give the connection a recognizable name, decide where its credentials are stored, then authenticate. Once created, the rest of the platform can reuse it without asking you to log in again."
221
+ }),
222
+ j !== "success" && j !== "error" && /* @__PURE__ */ m("div", {
219
223
  className: "flex items-center gap-2",
220
- children: Q.map((e, n) => /* @__PURE__ */ m("div", {
224
+ children: Q.map((e, n) => /* @__PURE__ */ h("div", {
221
225
  className: "flex items-center gap-2",
222
226
  children: [
223
- /* @__PURE__ */ p("div", {
227
+ /* @__PURE__ */ m("div", {
224
228
  className: t("w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium transition-all", n < $ ? "bg-action-primary-bg text-action-primary-text" : n === $ ? "bg-action-primary-bg text-action-primary-text ring-4 ring-primary/20" : "bg-bg-sunken text-text-secondary"),
225
- children: n < $ ? /* @__PURE__ */ p(he, { size: 16 }) : n + 1
229
+ children: n < $ ? /* @__PURE__ */ m(he, { size: 16 }) : n + 1
226
230
  }),
227
- /* @__PURE__ */ p("span", {
231
+ /* @__PURE__ */ m("span", {
228
232
  className: t("text-sm font-medium hidden sm:inline", n === $ ? "text-text-primary" : "text-text-secondary"),
229
233
  children: e.label
230
234
  }),
231
- n < Q.length - 1 && /* @__PURE__ */ p("div", { className: "w-8 h-px bg-border" })
235
+ n < Q.length - 1 && /* @__PURE__ */ m("div", { className: "w-8 h-px bg-border" })
232
236
  ]
233
237
  }, e.key))
234
238
  }),
235
- H && A !== "error" && /* @__PURE__ */ m("div", {
239
+ W && j !== "error" && /* @__PURE__ */ h("div", {
236
240
  className: "rounded-xl border border-border-default bg-status-error-bg-subtle p-4 flex items-center gap-3",
237
- children: [/* @__PURE__ */ p(d, {
241
+ children: [/* @__PURE__ */ m(d, {
238
242
  size: 20,
239
243
  className: "text-status-error-text flex-shrink-0"
240
- }), /* @__PURE__ */ p("p", {
244
+ }), /* @__PURE__ */ m("p", {
241
245
  className: "text-sm text-status-error-text",
242
- children: H
246
+ children: W
243
247
  })]
244
248
  }),
245
- A === "configure" && Z && !M && /* @__PURE__ */ p("div", {
249
+ j === "configure" && st && !N && /* @__PURE__ */ m("div", {
246
250
  className: "flex items-center justify-center py-12",
247
- children: /* @__PURE__ */ p(f, {
251
+ children: /* @__PURE__ */ m(p, {
248
252
  size: 24,
249
253
  className: "animate-spin text-text-secondary"
250
254
  })
251
255
  }),
252
- A === "configure" && !Z && !M && (g || x) && /* @__PURE__ */ m("div", {
256
+ j === "configure" && !st && !N && (v || C) && /* @__PURE__ */ h("div", {
253
257
  className: "flex flex-col items-center justify-center py-12 text-center",
254
- children: [/* @__PURE__ */ p(d, {
258
+ children: [/* @__PURE__ */ m(d, {
255
259
  size: 32,
256
260
  className: "text-text-secondary mb-3"
257
- }), /* @__PURE__ */ p("p", {
261
+ }), /* @__PURE__ */ m("p", {
258
262
  className: "text-sm text-text-secondary",
259
263
  children: "This provider isn't available."
260
264
  })]
261
265
  }),
262
- A === "select_provider" && /* @__PURE__ */ m("div", {
266
+ j === "select_provider" && /* @__PURE__ */ h("div", {
263
267
  className: "space-y-4",
264
268
  children: [
265
- /* @__PURE__ */ m("div", {
269
+ /* @__PURE__ */ h("div", {
266
270
  className: "relative group",
267
- children: [/* @__PURE__ */ p(xe, {
271
+ children: [/* @__PURE__ */ m(be, {
268
272
  size: 18,
269
273
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
270
- }), /* @__PURE__ */ p("input", {
274
+ }), /* @__PURE__ */ m("input", {
271
275
  type: "text",
272
276
  placeholder: "Search installed providers...",
273
277
  "aria-label": "Search installed providers",
274
- value: N,
278
+ value: F,
275
279
  onChange: (e) => We(e.target.value),
276
280
  className: "w-full pl-10 pr-4 py-2.5 border border-border-subtle rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
277
281
  })]
278
282
  }),
279
- D && /* @__PURE__ */ p("div", {
283
+ O && /* @__PURE__ */ m("div", {
280
284
  className: "flex items-center justify-center py-12",
281
- children: /* @__PURE__ */ p(f, {
285
+ children: /* @__PURE__ */ m(p, {
282
286
  size: 24,
283
287
  className: "animate-spin text-text-secondary"
284
288
  })
285
289
  }),
286
- !D && tt.length === 0 && /* @__PURE__ */ m("div", {
287
- className: "text-center py-12",
288
- children: [/* @__PURE__ */ p("p", {
289
- className: "text-text-secondary",
290
- children: "No installed providers found. Install a provider from the catalog first."
291
- }), /* @__PURE__ */ p(h, {
292
- className: "mt-4",
293
- onClick: () => v?.(r(_, "providers")),
290
+ !O && nt.length === 0 && /* @__PURE__ */ m(Te, {
291
+ illustration: F ? "empty-search" : "empty-data",
292
+ title: F ? "No matching providers" : "No installed providers yet",
293
+ description: F ? "No installed provider matches your search. Try a different term or install one from the catalog." : "You need at least one installed, enabled provider before you can create a connection. Install one from the catalog to get started.",
294
+ action: /* @__PURE__ */ m(g, {
295
+ onClick: () => b?.(r(y, "providers")),
294
296
  children: "Browse Catalog"
295
- })]
297
+ })
296
298
  }),
297
- /* @__PURE__ */ p("div", {
299
+ /* @__PURE__ */ m("div", {
298
300
  className: "grid grid-cols-1 sm:grid-cols-2 gap-3",
299
- children: tt.map((e) => /* @__PURE__ */ m("button", {
301
+ children: nt.map((e) => /* @__PURE__ */ h("button", {
300
302
  type: "button",
301
- onClick: () => nt(e),
303
+ onClick: () => rt(e),
302
304
  className: t("flex items-start gap-3 p-4 rounded-xl border border-border-seam bg-bg-surface text-left", "hover:border-border-strong hover:shadow-[var(--shadow-pop)]", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", "transition-[box-shadow,border-color] duration-200"),
303
- children: [/* @__PURE__ */ p(a, {
305
+ children: [/* @__PURE__ */ m(a, {
304
306
  provider: e,
305
307
  size: 40
306
- }), /* @__PURE__ */ m("div", {
308
+ }), /* @__PURE__ */ h("div", {
307
309
  className: "flex-1 min-w-0",
308
- children: [/* @__PURE__ */ p("h3", {
310
+ children: [/* @__PURE__ */ m("h3", {
309
311
  className: "font-medium text-text-primary truncate",
310
312
  children: e.name
311
- }), /* @__PURE__ */ m("p", {
313
+ }), /* @__PURE__ */ h("p", {
312
314
  className: "text-xs text-text-secondary mt-0.5",
313
315
  children: [
314
316
  ee(e.category),
@@ -321,180 +323,182 @@ function g() {
321
323
  })
322
324
  ]
323
325
  }),
324
- A === "configure" && M && /* @__PURE__ */ m("div", {
326
+ j === "configure" && N && /* @__PURE__ */ h("div", {
325
327
  className: "space-y-6",
326
328
  children: [
327
- /* @__PURE__ */ m(Ee, {
329
+ /* @__PURE__ */ h(_, {
328
330
  className: "flex items-center gap-3 p-4 border-border-seam",
329
- children: [/* @__PURE__ */ p(a, {
330
- provider: M,
331
+ children: [/* @__PURE__ */ m(a, {
332
+ provider: N,
331
333
  size: 40
332
- }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("h3", {
334
+ }), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("h3", {
333
335
  className: "font-medium text-text-primary",
334
- children: M.name
335
- }), /* @__PURE__ */ p("p", {
336
+ children: N.name
337
+ }), /* @__PURE__ */ m("p", {
336
338
  className: "text-xs text-text-secondary",
337
- children: i(M.authType)
339
+ children: i(N.authType)
338
340
  })] })]
339
341
  }),
340
- /* @__PURE__ */ m("div", {
342
+ /* @__PURE__ */ h("div", {
341
343
  className: "space-y-4",
342
344
  children: [
343
- /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("label", {
345
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ h("label", {
344
346
  htmlFor: "conn-name",
345
347
  className: "block text-sm font-semibold mb-2",
346
- children: ["Connection Name ", /* @__PURE__ */ p("span", {
348
+ children: ["Connection Name ", /* @__PURE__ */ m("span", {
347
349
  className: "text-status-error-text",
348
350
  children: "*"
349
351
  })]
350
- }), /* @__PURE__ */ p("input", {
352
+ }), /* @__PURE__ */ m("input", {
351
353
  type: "text",
352
354
  id: "conn-name",
353
355
  "aria-label": "Connection Name",
354
- value: P,
355
- onChange: (e) => F(e.target.value),
356
+ value: I,
357
+ onChange: (e) => L(e.target.value),
356
358
  placeholder: "e.g., My Slack Workspace",
357
359
  className: "w-full px-4 py-2.5 border border-border-subtle rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
358
360
  })] }),
359
- /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
361
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
360
362
  htmlFor: "conn-desc",
361
363
  className: "block text-sm font-semibold mb-2",
362
364
  children: "Description"
363
- }), /* @__PURE__ */ p("textarea", {
365
+ }), /* @__PURE__ */ m("textarea", {
364
366
  id: "conn-desc",
365
367
  "aria-label": "Description",
366
- value: I,
368
+ value: R,
367
369
  onChange: (e) => Ge(e.target.value),
368
370
  rows: 3,
369
371
  placeholder: "Optional description...",
370
372
  className: "w-full px-4 py-2.5 border border-border-subtle rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
371
373
  })] }),
372
- /* @__PURE__ */ p(fe, {
373
- value: V,
374
+ /* @__PURE__ */ m(fe, {
375
+ value: U,
374
376
  onChange: Xe,
375
- providerAuthType: M.authType
377
+ providerAuthType: N.authType
376
378
  })
377
379
  ]
378
380
  }),
379
- /* @__PURE__ */ m("div", {
381
+ /* @__PURE__ */ h("div", {
380
382
  className: "flex gap-3",
381
- children: [/* @__PURE__ */ p(h, {
383
+ children: [/* @__PURE__ */ m(g, {
382
384
  variant: "outline",
383
- onClick: () => g || x ? v?.(r(_, "connections")) : j("select_provider"),
385
+ onClick: () => v || C ? b?.(r(y, "connections")) : M("select_provider"),
384
386
  children: "Back"
385
- }), /* @__PURE__ */ m(h, {
386
- onClick: rt,
387
- children: ["Next ", /* @__PURE__ */ p(me, { size: 16 })]
387
+ }), /* @__PURE__ */ h(g, {
388
+ onClick: it,
389
+ children: ["Next ", /* @__PURE__ */ m(me, { size: 16 })]
388
390
  })]
389
391
  })
390
392
  ]
391
393
  }),
392
- A === "authenticate" && M && /* @__PURE__ */ m("div", {
394
+ j === "authenticate" && N && /* @__PURE__ */ h("div", {
393
395
  className: "space-y-6",
394
- children: [/* @__PURE__ */ m(Ee, {
396
+ children: [/* @__PURE__ */ h(_, {
397
+ treatment: "glass",
398
+ glow: !0,
395
399
  className: "border-border-seam p-5",
396
400
  children: [
397
- /* @__PURE__ */ m("h2", {
401
+ /* @__PURE__ */ h("h2", {
398
402
  className: "font-semibold text-text-primary flex items-center gap-2 mb-4",
399
403
  children: [
400
- /* @__PURE__ */ p(Se, {
404
+ /* @__PURE__ */ m(xe, {
401
405
  size: 18,
402
406
  className: "text-primary"
403
407
  }),
404
408
  "Authentication: ",
405
- i(M.authType)
409
+ i(N.authType)
406
410
  ]
407
411
  }),
408
- M.authType === "oauth2" && /* @__PURE__ */ m("div", {
412
+ N.authType === "oauth2" && /* @__PURE__ */ h("div", {
409
413
  className: "space-y-4",
410
- children: [/* @__PURE__ */ m("p", {
414
+ children: [/* @__PURE__ */ h("p", {
411
415
  className: "text-sm text-text-secondary",
412
416
  children: [
413
417
  "You will be redirected to ",
414
- M.name,
418
+ N.name,
415
419
  " to authorize access. After granting permission, you'll be redirected back."
416
420
  ]
417
- }), /* @__PURE__ */ m("div", {
421
+ }), /* @__PURE__ */ h("div", {
418
422
  className: "p-3 rounded-lg bg-status-info-bg-subtle border border-border-default text-sm text-status-info-text flex items-center gap-2",
419
- children: [/* @__PURE__ */ p(_e, { size: 16 }), w ? "You'll be redirected back to the bot channel setup after authorization." : "A new window will open for OAuth authentication"]
423
+ children: [/* @__PURE__ */ m(_e, { size: 16 }), E ? "You'll be redirected back to the bot channel setup after authorization." : "A new window will open for OAuth authentication"]
420
424
  })]
421
425
  }),
422
- M.authType === "api_key" && /* @__PURE__ */ m("div", {
426
+ N.authType === "api_key" && /* @__PURE__ */ h("div", {
423
427
  className: "space-y-4",
424
- children: [/* @__PURE__ */ m("p", {
428
+ children: [/* @__PURE__ */ h("p", {
425
429
  className: "text-sm text-text-secondary",
426
430
  children: [
427
431
  "Enter your ",
428
- M.name,
432
+ N.name,
429
433
  " API key. You can typically find this in your account settings."
430
434
  ]
431
- }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("label", {
435
+ }), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ h("label", {
432
436
  htmlFor: "api-key",
433
437
  className: "block text-sm font-semibold mb-2",
434
- children: ["API Key ", /* @__PURE__ */ p("span", {
438
+ children: ["API Key ", /* @__PURE__ */ m("span", {
435
439
  className: "text-status-error-text",
436
440
  children: "*"
437
441
  })]
438
- }), /* @__PURE__ */ m("div", {
442
+ }), /* @__PURE__ */ h("div", {
439
443
  className: "relative",
440
- children: [/* @__PURE__ */ p(ve, {
444
+ children: [/* @__PURE__ */ m(f, {
441
445
  size: 16,
442
446
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
443
- }), /* @__PURE__ */ p("input", {
447
+ }), /* @__PURE__ */ m("input", {
444
448
  type: "password",
445
449
  id: "api-key",
446
450
  "aria-label": "API Key",
447
- value: L,
451
+ value: z,
448
452
  onChange: (e) => Ke(e.target.value),
449
453
  placeholder: "Enter your API key",
450
454
  className: "w-full pl-10 pr-4 py-2.5 border border-border-subtle rounded-lg bg-bg-surface text-sm font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
451
455
  })]
452
456
  })] })]
453
457
  }),
454
- M.authType === "basic_auth" && /* @__PURE__ */ m("div", {
458
+ N.authType === "basic_auth" && /* @__PURE__ */ h("div", {
455
459
  className: "space-y-4",
456
460
  children: [
457
- /* @__PURE__ */ m("p", {
461
+ /* @__PURE__ */ h("p", {
458
462
  className: "text-sm text-text-secondary",
459
463
  children: [
460
464
  "Enter your ",
461
- M.name,
465
+ N.name,
462
466
  " credentials."
463
467
  ]
464
468
  }),
465
- /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("label", {
469
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ h("label", {
466
470
  htmlFor: "username",
467
471
  className: "block text-sm font-semibold mb-2",
468
- children: ["Username ", /* @__PURE__ */ p("span", {
472
+ children: ["Username ", /* @__PURE__ */ m("span", {
469
473
  className: "text-status-error-text",
470
474
  children: "*"
471
475
  })]
472
- }), /* @__PURE__ */ p("input", {
476
+ }), /* @__PURE__ */ m("input", {
473
477
  type: "text",
474
478
  id: "username",
475
479
  "aria-label": "Username",
476
- value: R,
480
+ value: B,
477
481
  onChange: (e) => qe(e.target.value),
478
482
  placeholder: "Username or email",
479
483
  className: "w-full px-4 py-2.5 border border-border-subtle rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
480
484
  })] }),
481
- /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("label", {
485
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ h("label", {
482
486
  htmlFor: "password",
483
487
  className: "block text-sm font-semibold mb-2",
484
- children: ["Password ", /* @__PURE__ */ p("span", {
488
+ children: ["Password ", /* @__PURE__ */ m("span", {
485
489
  className: "text-status-error-text",
486
490
  children: "*"
487
491
  })]
488
- }), /* @__PURE__ */ m("div", {
492
+ }), /* @__PURE__ */ h("div", {
489
493
  className: "relative",
490
- children: [/* @__PURE__ */ p(be, {
494
+ children: [/* @__PURE__ */ m(ye, {
491
495
  size: 16,
492
496
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
493
- }), /* @__PURE__ */ p("input", {
497
+ }), /* @__PURE__ */ m("input", {
494
498
  type: "password",
495
499
  id: "password",
496
500
  "aria-label": "Password",
497
- value: z,
501
+ value: V,
498
502
  onChange: (e) => Je(e.target.value),
499
503
  placeholder: "Password",
500
504
  className: "w-full pl-10 pr-4 py-2.5 border border-border-subtle rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
@@ -502,182 +506,182 @@ function g() {
502
506
  })] })
503
507
  ]
504
508
  }),
505
- M.authType === "bearer_token" && /* @__PURE__ */ m("div", {
509
+ N.authType === "bearer_token" && /* @__PURE__ */ h("div", {
506
510
  className: "space-y-4",
507
- children: [/* @__PURE__ */ m("p", {
511
+ children: [/* @__PURE__ */ h("p", {
508
512
  className: "text-sm text-text-secondary",
509
513
  children: [
510
514
  "Enter your ",
511
- M.name,
515
+ N.name,
512
516
  " bearer token."
513
517
  ]
514
- }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("label", {
518
+ }), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ h("label", {
515
519
  htmlFor: "bearer-token",
516
520
  className: "block text-sm font-semibold mb-2",
517
- children: ["Bearer Token ", /* @__PURE__ */ p("span", {
521
+ children: ["Bearer Token ", /* @__PURE__ */ m("span", {
518
522
  className: "text-status-error-text",
519
523
  children: "*"
520
524
  })]
521
- }), /* @__PURE__ */ m("div", {
525
+ }), /* @__PURE__ */ h("div", {
522
526
  className: "relative",
523
- children: [/* @__PURE__ */ p(ve, {
527
+ children: [/* @__PURE__ */ m(f, {
524
528
  size: 16,
525
529
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
526
- }), /* @__PURE__ */ p("input", {
530
+ }), /* @__PURE__ */ m("input", {
527
531
  type: "password",
528
532
  id: "bearer-token",
529
533
  "aria-label": "Bearer Token",
530
- value: B,
534
+ value: H,
531
535
  onChange: (e) => Ye(e.target.value),
532
536
  placeholder: "Enter your token",
533
537
  className: "w-full pl-10 pr-4 py-2.5 border border-border-subtle rounded-lg bg-bg-surface text-sm font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
534
538
  })]
535
539
  })] })]
536
540
  }),
537
- M.authType === "service_account" && /* @__PURE__ */ p("div", {
541
+ N.authType === "service_account" && /* @__PURE__ */ m("div", {
538
542
  className: "space-y-4",
539
- children: /* @__PURE__ */ m("div", {
543
+ children: /* @__PURE__ */ h("div", {
540
544
  className: "rounded-lg border border-border bg-status-success-bg-subtle p-4",
541
545
  children: [
542
- /* @__PURE__ */ p("p", {
546
+ /* @__PURE__ */ m("p", {
543
547
  className: "text-sm font-semibold text-foreground",
544
548
  children: "No credentials needed"
545
549
  }),
546
- /* @__PURE__ */ m("p", {
550
+ /* @__PURE__ */ h("p", {
547
551
  className: "text-sm text-muted-foreground mt-1",
548
552
  children: [
549
- M.name,
553
+ N.name,
550
554
  " is a first-party integration. Connecting grants",
551
555
  " ",
552
- M.name,
556
+ N.name,
553
557
  " permission to act on your behalf; access tokens are issued securely per use — there are no keys or secrets to manage."
554
558
  ]
555
559
  }),
556
- M.defaultScopes && M.defaultScopes.length > 0 && /* @__PURE__ */ m("p", {
560
+ N.defaultScopes && N.defaultScopes.length > 0 && /* @__PURE__ */ h("p", {
557
561
  className: "text-sm text-muted-foreground mt-2",
558
- children: ["Scopes: ", M.defaultScopes.join(", ")]
562
+ children: ["Scopes: ", N.defaultScopes.join(", ")]
559
563
  })
560
564
  ]
561
565
  })
562
566
  })
563
567
  ]
564
- }), /* @__PURE__ */ m("div", {
568
+ }), /* @__PURE__ */ h("div", {
565
569
  className: "flex gap-3",
566
- children: [/* @__PURE__ */ p(h, {
570
+ children: [/* @__PURE__ */ m(g, {
567
571
  variant: "outline",
568
- onClick: () => j("configure"),
569
- disabled: X,
572
+ onClick: () => M("configure"),
573
+ disabled: Z,
570
574
  children: "Back"
571
- }), /* @__PURE__ */ m(h, {
572
- onClick: it,
573
- disabled: X,
574
- children: [X ? /* @__PURE__ */ p(f, {
575
+ }), /* @__PURE__ */ h(g, {
576
+ onClick: at,
577
+ disabled: Z,
578
+ children: [Z ? /* @__PURE__ */ m(p, {
575
579
  size: 16,
576
580
  className: "animate-spin"
577
- }) : /* @__PURE__ */ p(he, { size: 16 }), M.authType === "oauth2" ? "Authorize" : "Connect"]
581
+ }) : /* @__PURE__ */ m(he, { size: 16 }), N.authType === "oauth2" ? "Authorize" : "Connect"]
578
582
  })]
579
583
  })]
580
584
  }),
581
- A === "success" && /* @__PURE__ */ m("div", {
585
+ j === "success" && /* @__PURE__ */ h("div", {
582
586
  className: "flex flex-col items-center justify-center py-12 text-center",
583
587
  children: [
584
- /* @__PURE__ */ p("div", {
588
+ /* @__PURE__ */ m("div", {
585
589
  className: "p-4 rounded-full bg-status-success-bg-subtle mb-4",
586
- children: /* @__PURE__ */ p(ge, {
590
+ children: /* @__PURE__ */ m(ge, {
587
591
  size: 48,
588
592
  className: "text-status-success-text"
589
593
  })
590
594
  }),
591
- /* @__PURE__ */ p("h2", {
595
+ /* @__PURE__ */ m("h2", {
592
596
  className: "text-xl font-bold text-text-primary mb-2",
593
597
  children: "Connection Created!"
594
598
  }),
595
- /* @__PURE__ */ m("p", {
599
+ /* @__PURE__ */ h("p", {
596
600
  className: "text-sm text-text-secondary mb-6 max-w-sm",
597
601
  children: [
598
602
  "Your ",
599
- M?.name,
603
+ N?.name,
600
604
  " connection has been set up successfully."
601
605
  ]
602
606
  }),
603
- /* @__PURE__ */ m("div", {
607
+ /* @__PURE__ */ h("div", {
604
608
  className: "flex gap-3",
605
609
  children: [
606
- w && W && /* @__PURE__ */ m(h, {
607
- onClick: at,
608
- children: [/* @__PURE__ */ p(ye, { size: 16 }), "Link to Bot Channel"]
610
+ E && K && /* @__PURE__ */ h(g, {
611
+ onClick: ot,
612
+ children: [/* @__PURE__ */ m(ve, { size: 16 }), "Link to Bot Channel"]
609
613
  }),
610
- !w && W && /* @__PURE__ */ p(h, {
611
- onClick: () => v?.(r(_, `connections/${W}`)),
614
+ !E && K && /* @__PURE__ */ m(g, {
615
+ onClick: () => b?.(r(y, `connections/${K}`)),
612
616
  children: "View Connection"
613
617
  }),
614
- /* @__PURE__ */ p(h, {
618
+ /* @__PURE__ */ m(g, {
615
619
  variant: "outline",
616
- onClick: () => v?.(r(_, "connections")),
620
+ onClick: () => b?.(r(y, "connections")),
617
621
  children: "All Connections"
618
622
  })
619
623
  ]
620
624
  })
621
625
  ]
622
626
  }),
623
- A === "error" && /* @__PURE__ */ m("div", {
627
+ j === "error" && /* @__PURE__ */ h("div", {
624
628
  className: "flex flex-col items-center justify-center py-12 text-center",
625
629
  children: [
626
- /* @__PURE__ */ p("div", {
630
+ /* @__PURE__ */ m("div", {
627
631
  className: "p-4 rounded-full bg-status-error-bg-subtle mb-4",
628
- children: /* @__PURE__ */ p(d, {
632
+ children: /* @__PURE__ */ m(d, {
629
633
  size: 48,
630
634
  className: "text-status-error-text"
631
635
  })
632
636
  }),
633
- /* @__PURE__ */ p("h2", {
637
+ /* @__PURE__ */ m("h2", {
634
638
  className: "text-xl font-bold text-text-primary mb-2",
635
639
  children: "Connection Failed"
636
640
  }),
637
- /* @__PURE__ */ p("p", {
641
+ /* @__PURE__ */ m("p", {
638
642
  className: "text-sm text-status-error-text mb-6 max-w-sm",
639
- children: H || "An unexpected error occurred."
643
+ children: W || "An unexpected error occurred."
640
644
  }),
641
- /* @__PURE__ */ m("div", {
645
+ /* @__PURE__ */ h("div", {
642
646
  className: "flex gap-3",
643
- children: [/* @__PURE__ */ p(h, {
647
+ children: [/* @__PURE__ */ m(g, {
644
648
  onClick: () => {
645
- U(""), j("authenticate");
649
+ G(""), M("authenticate");
646
650
  },
647
651
  children: "Try Again"
648
- }), /* @__PURE__ */ p(h, {
652
+ }), /* @__PURE__ */ m(g, {
649
653
  variant: "outline",
650
- onClick: () => v?.(r(_, "connections")),
654
+ onClick: () => b?.(r(y, "connections")),
651
655
  children: "Cancel"
652
656
  })]
653
657
  })
654
658
  ]
655
659
  })
656
660
  ]
657
- }) : /* @__PURE__ */ m("div", {
661
+ }) : /* @__PURE__ */ h("div", {
658
662
  className: "flex flex-col items-center justify-center py-20 text-center p-6",
659
663
  children: [
660
- /* @__PURE__ */ p(Se, {
664
+ /* @__PURE__ */ m(xe, {
661
665
  size: 48,
662
666
  className: "text-text-secondary mb-4"
663
667
  }),
664
- /* @__PURE__ */ p("h2", {
668
+ /* @__PURE__ */ m("h2", {
665
669
  className: "text-xl font-bold text-text-primary mb-2",
666
670
  children: "Access Denied"
667
671
  }),
668
- /* @__PURE__ */ p("p", {
672
+ /* @__PURE__ */ m("p", {
669
673
  className: "text-sm text-text-secondary mb-6 max-w-sm",
670
674
  children: "You don't have permission to create connections."
671
675
  }),
672
- /* @__PURE__ */ m(h, {
676
+ /* @__PURE__ */ h(g, {
673
677
  variant: "outline",
674
- onClick: () => v?.(r(_, "connections")),
675
- children: [/* @__PURE__ */ p(pe, { size: 16 }), " Back to Connections"]
678
+ onClick: () => b?.(r(y, "connections")),
679
+ children: [/* @__PURE__ */ m(pe, { size: 16 }), " Back to Connections"]
676
680
  })
677
681
  ]
678
682
  });
679
683
  }
680
684
  //#endregion
681
- export { g as AddConnectionWizard };
685
+ export { v as AddConnectionWizard };
682
686
 
683
687
  //# sourceMappingURL=AddConnectionWizard.js.map