@burdenoff/microfe-integrations 2026.625.3 → 2026.625.4

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,180 @@ 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(_, {
395
397
  className: "border-border-seam p-5",
396
398
  children: [
397
- /* @__PURE__ */ m("h2", {
399
+ /* @__PURE__ */ h("h2", {
398
400
  className: "font-semibold text-text-primary flex items-center gap-2 mb-4",
399
401
  children: [
400
- /* @__PURE__ */ p(Se, {
402
+ /* @__PURE__ */ m(xe, {
401
403
  size: 18,
402
404
  className: "text-primary"
403
405
  }),
404
406
  "Authentication: ",
405
- i(M.authType)
407
+ i(N.authType)
406
408
  ]
407
409
  }),
408
- M.authType === "oauth2" && /* @__PURE__ */ m("div", {
410
+ N.authType === "oauth2" && /* @__PURE__ */ h("div", {
409
411
  className: "space-y-4",
410
- children: [/* @__PURE__ */ m("p", {
412
+ children: [/* @__PURE__ */ h("p", {
411
413
  className: "text-sm text-text-secondary",
412
414
  children: [
413
415
  "You will be redirected to ",
414
- M.name,
416
+ N.name,
415
417
  " to authorize access. After granting permission, you'll be redirected back."
416
418
  ]
417
- }), /* @__PURE__ */ m("div", {
419
+ }), /* @__PURE__ */ h("div", {
418
420
  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"]
421
+ 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
422
  })]
421
423
  }),
422
- M.authType === "api_key" && /* @__PURE__ */ m("div", {
424
+ N.authType === "api_key" && /* @__PURE__ */ h("div", {
423
425
  className: "space-y-4",
424
- children: [/* @__PURE__ */ m("p", {
426
+ children: [/* @__PURE__ */ h("p", {
425
427
  className: "text-sm text-text-secondary",
426
428
  children: [
427
429
  "Enter your ",
428
- M.name,
430
+ N.name,
429
431
  " API key. You can typically find this in your account settings."
430
432
  ]
431
- }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("label", {
433
+ }), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ h("label", {
432
434
  htmlFor: "api-key",
433
435
  className: "block text-sm font-semibold mb-2",
434
- children: ["API Key ", /* @__PURE__ */ p("span", {
436
+ children: ["API Key ", /* @__PURE__ */ m("span", {
435
437
  className: "text-status-error-text",
436
438
  children: "*"
437
439
  })]
438
- }), /* @__PURE__ */ m("div", {
440
+ }), /* @__PURE__ */ h("div", {
439
441
  className: "relative",
440
- children: [/* @__PURE__ */ p(ve, {
442
+ children: [/* @__PURE__ */ m(f, {
441
443
  size: 16,
442
444
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
443
- }), /* @__PURE__ */ p("input", {
445
+ }), /* @__PURE__ */ m("input", {
444
446
  type: "password",
445
447
  id: "api-key",
446
448
  "aria-label": "API Key",
447
- value: L,
449
+ value: z,
448
450
  onChange: (e) => Ke(e.target.value),
449
451
  placeholder: "Enter your API key",
450
452
  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
453
  })]
452
454
  })] })]
453
455
  }),
454
- M.authType === "basic_auth" && /* @__PURE__ */ m("div", {
456
+ N.authType === "basic_auth" && /* @__PURE__ */ h("div", {
455
457
  className: "space-y-4",
456
458
  children: [
457
- /* @__PURE__ */ m("p", {
459
+ /* @__PURE__ */ h("p", {
458
460
  className: "text-sm text-text-secondary",
459
461
  children: [
460
462
  "Enter your ",
461
- M.name,
463
+ N.name,
462
464
  " credentials."
463
465
  ]
464
466
  }),
465
- /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("label", {
467
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ h("label", {
466
468
  htmlFor: "username",
467
469
  className: "block text-sm font-semibold mb-2",
468
- children: ["Username ", /* @__PURE__ */ p("span", {
470
+ children: ["Username ", /* @__PURE__ */ m("span", {
469
471
  className: "text-status-error-text",
470
472
  children: "*"
471
473
  })]
472
- }), /* @__PURE__ */ p("input", {
474
+ }), /* @__PURE__ */ m("input", {
473
475
  type: "text",
474
476
  id: "username",
475
477
  "aria-label": "Username",
476
- value: R,
478
+ value: B,
477
479
  onChange: (e) => qe(e.target.value),
478
480
  placeholder: "Username or email",
479
481
  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
482
  })] }),
481
- /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("label", {
483
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ h("label", {
482
484
  htmlFor: "password",
483
485
  className: "block text-sm font-semibold mb-2",
484
- children: ["Password ", /* @__PURE__ */ p("span", {
486
+ children: ["Password ", /* @__PURE__ */ m("span", {
485
487
  className: "text-status-error-text",
486
488
  children: "*"
487
489
  })]
488
- }), /* @__PURE__ */ m("div", {
490
+ }), /* @__PURE__ */ h("div", {
489
491
  className: "relative",
490
- children: [/* @__PURE__ */ p(be, {
492
+ children: [/* @__PURE__ */ m(ye, {
491
493
  size: 16,
492
494
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
493
- }), /* @__PURE__ */ p("input", {
495
+ }), /* @__PURE__ */ m("input", {
494
496
  type: "password",
495
497
  id: "password",
496
498
  "aria-label": "Password",
497
- value: z,
499
+ value: V,
498
500
  onChange: (e) => Je(e.target.value),
499
501
  placeholder: "Password",
500
502
  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 +504,182 @@ function g() {
502
504
  })] })
503
505
  ]
504
506
  }),
505
- M.authType === "bearer_token" && /* @__PURE__ */ m("div", {
507
+ N.authType === "bearer_token" && /* @__PURE__ */ h("div", {
506
508
  className: "space-y-4",
507
- children: [/* @__PURE__ */ m("p", {
509
+ children: [/* @__PURE__ */ h("p", {
508
510
  className: "text-sm text-text-secondary",
509
511
  children: [
510
512
  "Enter your ",
511
- M.name,
513
+ N.name,
512
514
  " bearer token."
513
515
  ]
514
- }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("label", {
516
+ }), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ h("label", {
515
517
  htmlFor: "bearer-token",
516
518
  className: "block text-sm font-semibold mb-2",
517
- children: ["Bearer Token ", /* @__PURE__ */ p("span", {
519
+ children: ["Bearer Token ", /* @__PURE__ */ m("span", {
518
520
  className: "text-status-error-text",
519
521
  children: "*"
520
522
  })]
521
- }), /* @__PURE__ */ m("div", {
523
+ }), /* @__PURE__ */ h("div", {
522
524
  className: "relative",
523
- children: [/* @__PURE__ */ p(ve, {
525
+ children: [/* @__PURE__ */ m(f, {
524
526
  size: 16,
525
527
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
526
- }), /* @__PURE__ */ p("input", {
528
+ }), /* @__PURE__ */ m("input", {
527
529
  type: "password",
528
530
  id: "bearer-token",
529
531
  "aria-label": "Bearer Token",
530
- value: B,
532
+ value: H,
531
533
  onChange: (e) => Ye(e.target.value),
532
534
  placeholder: "Enter your token",
533
535
  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
536
  })]
535
537
  })] })]
536
538
  }),
537
- M.authType === "service_account" && /* @__PURE__ */ p("div", {
539
+ N.authType === "service_account" && /* @__PURE__ */ m("div", {
538
540
  className: "space-y-4",
539
- children: /* @__PURE__ */ m("div", {
541
+ children: /* @__PURE__ */ h("div", {
540
542
  className: "rounded-lg border border-border bg-status-success-bg-subtle p-4",
541
543
  children: [
542
- /* @__PURE__ */ p("p", {
544
+ /* @__PURE__ */ m("p", {
543
545
  className: "text-sm font-semibold text-foreground",
544
546
  children: "No credentials needed"
545
547
  }),
546
- /* @__PURE__ */ m("p", {
548
+ /* @__PURE__ */ h("p", {
547
549
  className: "text-sm text-muted-foreground mt-1",
548
550
  children: [
549
- M.name,
551
+ N.name,
550
552
  " is a first-party integration. Connecting grants",
551
553
  " ",
552
- M.name,
554
+ N.name,
553
555
  " permission to act on your behalf; access tokens are issued securely per use — there are no keys or secrets to manage."
554
556
  ]
555
557
  }),
556
- M.defaultScopes && M.defaultScopes.length > 0 && /* @__PURE__ */ m("p", {
558
+ N.defaultScopes && N.defaultScopes.length > 0 && /* @__PURE__ */ h("p", {
557
559
  className: "text-sm text-muted-foreground mt-2",
558
- children: ["Scopes: ", M.defaultScopes.join(", ")]
560
+ children: ["Scopes: ", N.defaultScopes.join(", ")]
559
561
  })
560
562
  ]
561
563
  })
562
564
  })
563
565
  ]
564
- }), /* @__PURE__ */ m("div", {
566
+ }), /* @__PURE__ */ h("div", {
565
567
  className: "flex gap-3",
566
- children: [/* @__PURE__ */ p(h, {
568
+ children: [/* @__PURE__ */ m(g, {
567
569
  variant: "outline",
568
- onClick: () => j("configure"),
569
- disabled: X,
570
+ onClick: () => M("configure"),
571
+ disabled: Z,
570
572
  children: "Back"
571
- }), /* @__PURE__ */ m(h, {
572
- onClick: it,
573
- disabled: X,
574
- children: [X ? /* @__PURE__ */ p(f, {
573
+ }), /* @__PURE__ */ h(g, {
574
+ onClick: at,
575
+ disabled: Z,
576
+ children: [Z ? /* @__PURE__ */ m(p, {
575
577
  size: 16,
576
578
  className: "animate-spin"
577
- }) : /* @__PURE__ */ p(he, { size: 16 }), M.authType === "oauth2" ? "Authorize" : "Connect"]
579
+ }) : /* @__PURE__ */ m(he, { size: 16 }), N.authType === "oauth2" ? "Authorize" : "Connect"]
578
580
  })]
579
581
  })]
580
582
  }),
581
- A === "success" && /* @__PURE__ */ m("div", {
583
+ j === "success" && /* @__PURE__ */ h("div", {
582
584
  className: "flex flex-col items-center justify-center py-12 text-center",
583
585
  children: [
584
- /* @__PURE__ */ p("div", {
586
+ /* @__PURE__ */ m("div", {
585
587
  className: "p-4 rounded-full bg-status-success-bg-subtle mb-4",
586
- children: /* @__PURE__ */ p(ge, {
588
+ children: /* @__PURE__ */ m(ge, {
587
589
  size: 48,
588
590
  className: "text-status-success-text"
589
591
  })
590
592
  }),
591
- /* @__PURE__ */ p("h2", {
593
+ /* @__PURE__ */ m("h2", {
592
594
  className: "text-xl font-bold text-text-primary mb-2",
593
595
  children: "Connection Created!"
594
596
  }),
595
- /* @__PURE__ */ m("p", {
597
+ /* @__PURE__ */ h("p", {
596
598
  className: "text-sm text-text-secondary mb-6 max-w-sm",
597
599
  children: [
598
600
  "Your ",
599
- M?.name,
601
+ N?.name,
600
602
  " connection has been set up successfully."
601
603
  ]
602
604
  }),
603
- /* @__PURE__ */ m("div", {
605
+ /* @__PURE__ */ h("div", {
604
606
  className: "flex gap-3",
605
607
  children: [
606
- w && W && /* @__PURE__ */ m(h, {
607
- onClick: at,
608
- children: [/* @__PURE__ */ p(ye, { size: 16 }), "Link to Bot Channel"]
608
+ E && K && /* @__PURE__ */ h(g, {
609
+ onClick: ot,
610
+ children: [/* @__PURE__ */ m(ve, { size: 16 }), "Link to Bot Channel"]
609
611
  }),
610
- !w && W && /* @__PURE__ */ p(h, {
611
- onClick: () => v?.(r(_, `connections/${W}`)),
612
+ !E && K && /* @__PURE__ */ m(g, {
613
+ onClick: () => b?.(r(y, `connections/${K}`)),
612
614
  children: "View Connection"
613
615
  }),
614
- /* @__PURE__ */ p(h, {
616
+ /* @__PURE__ */ m(g, {
615
617
  variant: "outline",
616
- onClick: () => v?.(r(_, "connections")),
618
+ onClick: () => b?.(r(y, "connections")),
617
619
  children: "All Connections"
618
620
  })
619
621
  ]
620
622
  })
621
623
  ]
622
624
  }),
623
- A === "error" && /* @__PURE__ */ m("div", {
625
+ j === "error" && /* @__PURE__ */ h("div", {
624
626
  className: "flex flex-col items-center justify-center py-12 text-center",
625
627
  children: [
626
- /* @__PURE__ */ p("div", {
628
+ /* @__PURE__ */ m("div", {
627
629
  className: "p-4 rounded-full bg-status-error-bg-subtle mb-4",
628
- children: /* @__PURE__ */ p(d, {
630
+ children: /* @__PURE__ */ m(d, {
629
631
  size: 48,
630
632
  className: "text-status-error-text"
631
633
  })
632
634
  }),
633
- /* @__PURE__ */ p("h2", {
635
+ /* @__PURE__ */ m("h2", {
634
636
  className: "text-xl font-bold text-text-primary mb-2",
635
637
  children: "Connection Failed"
636
638
  }),
637
- /* @__PURE__ */ p("p", {
639
+ /* @__PURE__ */ m("p", {
638
640
  className: "text-sm text-status-error-text mb-6 max-w-sm",
639
- children: H || "An unexpected error occurred."
641
+ children: W || "An unexpected error occurred."
640
642
  }),
641
- /* @__PURE__ */ m("div", {
643
+ /* @__PURE__ */ h("div", {
642
644
  className: "flex gap-3",
643
- children: [/* @__PURE__ */ p(h, {
645
+ children: [/* @__PURE__ */ m(g, {
644
646
  onClick: () => {
645
- U(""), j("authenticate");
647
+ G(""), M("authenticate");
646
648
  },
647
649
  children: "Try Again"
648
- }), /* @__PURE__ */ p(h, {
650
+ }), /* @__PURE__ */ m(g, {
649
651
  variant: "outline",
650
- onClick: () => v?.(r(_, "connections")),
652
+ onClick: () => b?.(r(y, "connections")),
651
653
  children: "Cancel"
652
654
  })]
653
655
  })
654
656
  ]
655
657
  })
656
658
  ]
657
- }) : /* @__PURE__ */ m("div", {
659
+ }) : /* @__PURE__ */ h("div", {
658
660
  className: "flex flex-col items-center justify-center py-20 text-center p-6",
659
661
  children: [
660
- /* @__PURE__ */ p(Se, {
662
+ /* @__PURE__ */ m(xe, {
661
663
  size: 48,
662
664
  className: "text-text-secondary mb-4"
663
665
  }),
664
- /* @__PURE__ */ p("h2", {
666
+ /* @__PURE__ */ m("h2", {
665
667
  className: "text-xl font-bold text-text-primary mb-2",
666
668
  children: "Access Denied"
667
669
  }),
668
- /* @__PURE__ */ p("p", {
670
+ /* @__PURE__ */ m("p", {
669
671
  className: "text-sm text-text-secondary mb-6 max-w-sm",
670
672
  children: "You don't have permission to create connections."
671
673
  }),
672
- /* @__PURE__ */ m(h, {
674
+ /* @__PURE__ */ h(g, {
673
675
  variant: "outline",
674
- onClick: () => v?.(r(_, "connections")),
675
- children: [/* @__PURE__ */ p(pe, { size: 16 }), " Back to Connections"]
676
+ onClick: () => b?.(r(y, "connections")),
677
+ children: [/* @__PURE__ */ m(pe, { size: 16 }), " Back to Connections"]
676
678
  })
677
679
  ]
678
680
  });
679
681
  }
680
682
  //#endregion
681
- export { g as AddConnectionWizard };
683
+ export { v as AddConnectionWizard };
682
684
 
683
685
  //# sourceMappingURL=AddConnectionWizard.js.map