@burdenoff/microfe-integrations 2026.624.4 → 2026.625.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/dist/integrations/components/AddConnectionDialog.js +69 -65
  2. package/dist/integrations/components/AddConnectionDialog.js.map +1 -1
  3. package/dist/integrations/components/ConnectionCard.js +27 -26
  4. package/dist/integrations/components/ConnectionCard.js.map +1 -1
  5. package/dist/integrations/components/ProviderCard.js +67 -66
  6. package/dist/integrations/components/ProviderCard.js.map +1 -1
  7. package/dist/integrations/pages/AddConnectionWizard.js +268 -283
  8. package/dist/integrations/pages/AddConnectionWizard.js.map +1 -1
  9. package/dist/integrations/pages/ConnectionDetail.js +241 -245
  10. package/dist/integrations/pages/ConnectionDetail.js.map +1 -1
  11. package/dist/integrations/pages/ConnectionLogs.js +118 -119
  12. package/dist/integrations/pages/ConnectionLogs.js.map +1 -1
  13. package/dist/integrations/pages/ConnectionsList.js +68 -70
  14. package/dist/integrations/pages/ConnectionsList.js.map +1 -1
  15. package/dist/integrations/pages/IntegrationsOverview.js +67 -67
  16. package/dist/integrations/pages/IntegrationsOverview.js.map +1 -1
  17. package/dist/integrations/pages/IntegrationsSettings.js +71 -71
  18. package/dist/integrations/pages/IntegrationsSettings.js.map +1 -1
  19. package/dist/integrations/pages/ProviderCatalog.js +46 -46
  20. package/dist/integrations/pages/ProviderCatalog.js.map +1 -1
  21. package/dist/integrations/pages/ProviderDetail.js +214 -215
  22. package/dist/integrations/pages/ProviderDetail.js.map +1 -1
  23. package/dist/integrations/pages/ProviderEditorPage.js +152 -154
  24. package/dist/integrations/pages/ProviderEditorPage.js.map +1 -1
  25. package/dist/integrations/utils/constants.js +1 -0
  26. package/dist/integrations/utils/constants.js.map +1 -1
  27. package/package.json +2 -2
@@ -7,9 +7,9 @@ import { ArrowLeft as l, Loader2 as u, Save as d, Shield as f } from "lucide-rea
7
7
  import { useParams as p } from "react-router-dom";
8
8
  import { usePermissions as m } from "@burdenoff/fe-libs/shared/providers/shell";
9
9
  import { jsx as h, jsxs as g } from "react/jsx-runtime";
10
- import { OptionalFields as _ } from "@burdenoff/fe-libs/ui";
10
+ import { Button as _, GlassCard as v, OptionalFields as y } from "@burdenoff/fe-libs/ui";
11
11
  //#region src/integrations/pages/ProviderEditorPage.tsx
12
- var v = [
12
+ var b = [
13
13
  "COMMUNICATION",
14
14
  "PRODUCTIVITY",
15
15
  "CLOUD_STORAGE",
@@ -21,7 +21,7 @@ var v = [
21
21
  "PAYMENT",
22
22
  "ANALYTICS",
23
23
  "CUSTOM"
24
- ], y = [
24
+ ], x = [
25
25
  "OAUTH2",
26
26
  "API_KEY",
27
27
  "BASIC_AUTH",
@@ -29,7 +29,7 @@ var v = [
29
29
  "SERVICE_ACCOUNT",
30
30
  "CUSTOM"
31
31
  ];
32
- function b(e, t) {
32
+ function S(e, t) {
33
33
  let n = e.trim();
34
34
  if (n) try {
35
35
  return JSON.parse(n);
@@ -37,7 +37,7 @@ function b(e, t) {
37
37
  throw Error(`${t} must be valid JSON`);
38
38
  }
39
39
  }
40
- function x(e) {
40
+ function C(e) {
41
41
  return {
42
42
  communication: "COMMUNICATION",
43
43
  productivity: "PRODUCTIVITY",
@@ -52,7 +52,7 @@ function x(e) {
52
52
  other: "CUSTOM"
53
53
  }[e || ""] || "CUSTOM";
54
54
  }
55
- function S(e) {
55
+ function w(e) {
56
56
  return {
57
57
  oauth2: "OAUTH2",
58
58
  api_key: "API_KEY",
@@ -61,8 +61,8 @@ function S(e) {
61
61
  service_account: "SERVICE_ACCOUNT"
62
62
  }[e || ""] || "CUSTOM";
63
63
  }
64
- function C() {
65
- let { providerId: C } = p(), w = !!C, { basePath: T = "/", navigate: E } = e(), { hasPermission: D, isLoading: O } = m(), k = D(t.PROVIDER_CREATE), A = D(t.PROVIDER_UPDATE), { provider: j, loading: M } = i(C ?? ""), { installPlugin: N, loading: P } = r(), { updatePlugin: F, loading: I } = a(), [L, R] = c(""), [z, B] = c({
64
+ function T() {
65
+ let { providerId: T } = p(), E = !!T, { basePath: D = "/", navigate: O } = e(), { hasPermission: k, isLoading: A } = m(), j = k(t.PROVIDER_CREATE), M = k(t.PROVIDER_UPDATE), { provider: N, loading: P } = i(T ?? ""), { installPlugin: F, loading: I } = r(), { updatePlugin: L, loading: R } = a(), [z, B] = c(""), [V, H] = c({
66
66
  key: "",
67
67
  name: "",
68
68
  description: "",
@@ -87,137 +87,137 @@ function C() {
87
87
  isEnabled: !0
88
88
  });
89
89
  o(() => {
90
- !j || !w || B({
91
- key: j.key,
92
- name: j.name,
93
- description: j.description || "",
94
- category: x(j.category),
95
- authType: S(j.authType),
96
- icon: j.icon || "",
97
- color: j.color || "",
98
- website: j.website || "",
99
- docsUrl: j.docsUrl || "",
100
- baseUrl: j.baseUrl || "",
101
- apiVersion: j.apiVersion || "",
102
- pluginVersion: j.pluginVersion || "1.0.0",
103
- pluginAuthor: j.pluginAuthor || "",
104
- pluginRepository: j.pluginRepository || "",
105
- displayOrder: String(j.displayOrder || 0),
106
- defaultScopes: (j.defaultScopes || []).join(", "),
107
- supportedFeatures: (j.supportedFeatures || []).join(", "),
108
- oauthConfig: j.oauthConfig ? JSON.stringify(j.oauthConfig, null, 2) : "",
109
- availableScopes: j.availableScopes ? JSON.stringify(j.availableScopes, null, 2) : "",
110
- rateLimitConfig: j.rateLimitConfig ? JSON.stringify(j.rateLimitConfig, null, 2) : "",
111
- configSchema: j.configSchema ? JSON.stringify(j.configSchema, null, 2) : "",
112
- isEnabled: j.isEnabled
90
+ !N || !E || H({
91
+ key: N.key,
92
+ name: N.name,
93
+ description: N.description || "",
94
+ category: C(N.category),
95
+ authType: w(N.authType),
96
+ icon: N.icon || "",
97
+ color: N.color || "",
98
+ website: N.website || "",
99
+ docsUrl: N.docsUrl || "",
100
+ baseUrl: N.baseUrl || "",
101
+ apiVersion: N.apiVersion || "",
102
+ pluginVersion: N.pluginVersion || "1.0.0",
103
+ pluginAuthor: N.pluginAuthor || "",
104
+ pluginRepository: N.pluginRepository || "",
105
+ displayOrder: String(N.displayOrder || 0),
106
+ defaultScopes: (N.defaultScopes || []).join(", "),
107
+ supportedFeatures: (N.supportedFeatures || []).join(", "),
108
+ oauthConfig: N.oauthConfig ? JSON.stringify(N.oauthConfig, null, 2) : "",
109
+ availableScopes: N.availableScopes ? JSON.stringify(N.availableScopes, null, 2) : "",
110
+ rateLimitConfig: N.rateLimitConfig ? JSON.stringify(N.rateLimitConfig, null, 2) : "",
111
+ configSchema: N.configSchema ? JSON.stringify(N.configSchema, null, 2) : "",
112
+ isEnabled: N.isEnabled
113
113
  });
114
- }, [w, j]);
115
- let V = w ? A : k, H = s(), U = (e) => `${H}-${e}`, W = (e, t) => {
116
- B((n) => ({
114
+ }, [E, N]);
115
+ let U = E ? M : j, W = s(), G = (e) => `${W}-${e}`, K = (e, t) => {
116
+ H((n) => ({
117
117
  ...n,
118
118
  [e]: t
119
119
  }));
120
120
  };
121
- return O || w && M ? /* @__PURE__ */ h("div", {
121
+ return A || E && P ? /* @__PURE__ */ h("div", {
122
122
  className: "flex items-center justify-center py-20",
123
123
  children: /* @__PURE__ */ h(u, {
124
124
  size: 44,
125
125
  className: "animate-spin text-primary"
126
126
  })
127
- }) : V ? /* @__PURE__ */ g("div", {
127
+ }) : U ? /* @__PURE__ */ g("div", {
128
128
  className: "space-y-6 p-6 max-w-5xl mx-auto",
129
129
  children: [
130
130
  /* @__PURE__ */ g("div", {
131
- className: "flex items-center gap-4",
132
- children: [/* @__PURE__ */ h("button", {
133
- type: "button",
134
- onClick: () => E?.(n(T, "providers")),
135
- className: "p-2.5 hover:bg-accent rounded-lg transition-all",
131
+ className: "rounded-xl border border-border-seam bg-accent-wash p-6 flex items-center gap-4",
132
+ children: [/* @__PURE__ */ h(_, {
133
+ variant: "ghost",
134
+ size: "icon",
135
+ onClick: () => O?.(n(D, "providers")),
136
136
  "aria-label": "Back to providers",
137
137
  children: /* @__PURE__ */ h(l, { size: 20 })
138
138
  }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h1", {
139
139
  className: "text-2xl font-bold text-text-primary",
140
- children: w ? "Edit Provider" : "Add Provider"
140
+ children: E ? "Edit Provider" : "Add Provider"
141
141
  }), /* @__PURE__ */ h("p", {
142
142
  className: "text-sm text-text-secondary mt-1",
143
143
  children: "Configure catalog metadata, auth configuration, and runtime settings."
144
144
  })] })]
145
145
  }),
146
- L && /* @__PURE__ */ h("div", {
147
- className: "rounded-xl border border-border-default bg-status-error-bg-subtle px-4 py-3 text-sm text-status-error-text",
148
- children: L
146
+ z && /* @__PURE__ */ h("div", {
147
+ className: "rounded-xl border border-border-seam bg-status-error-bg-subtle px-4 py-3 text-sm text-status-error-text",
148
+ children: z
149
149
  }),
150
150
  /* @__PURE__ */ g("div", {
151
151
  className: "grid grid-cols-1 lg:grid-cols-2 gap-4",
152
- children: [/* @__PURE__ */ g("div", {
153
- className: "rounded-xl border border-border-subtle/50 bg-bg-surface p-5 space-y-4",
152
+ children: [/* @__PURE__ */ g(v, {
153
+ className: "border-border-seam p-5 space-y-4",
154
154
  children: [
155
155
  /* @__PURE__ */ h("h2", {
156
156
  className: "font-semibold text-text-primary",
157
157
  children: "Core details"
158
158
  }),
159
- !w && /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
160
- htmlFor: U("key"),
159
+ !E && /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
160
+ htmlFor: G("key"),
161
161
  className: "block text-sm font-medium mb-1.5 text-text-primary",
162
162
  children: "Key"
163
163
  }), /* @__PURE__ */ h("input", {
164
- id: U("key"),
164
+ id: G("key"),
165
165
  "aria-label": "Key",
166
- value: z.key,
167
- onChange: (e) => W("key", e.target.value),
166
+ value: V.key,
167
+ onChange: (e) => K("key", e.target.value),
168
168
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm",
169
169
  placeholder: "e.g. slack-user"
170
170
  })] }),
171
171
  /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
172
- htmlFor: U("name"),
172
+ htmlFor: G("name"),
173
173
  className: "block text-sm font-medium mb-1.5 text-text-primary",
174
174
  children: "Name"
175
175
  }), /* @__PURE__ */ h("input", {
176
- id: U("name"),
176
+ id: G("name"),
177
177
  "aria-label": "Name",
178
- value: z.name,
179
- onChange: (e) => W("name", e.target.value),
178
+ value: V.name,
179
+ onChange: (e) => K("name", e.target.value),
180
180
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
181
181
  })] }),
182
182
  /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
183
- htmlFor: U("description"),
183
+ htmlFor: G("description"),
184
184
  className: "block text-sm font-medium mb-1.5 text-text-primary",
185
185
  children: "Description"
186
186
  }), /* @__PURE__ */ h("textarea", {
187
- id: U("description"),
187
+ id: G("description"),
188
188
  "aria-label": "Description",
189
- value: z.description,
190
- onChange: (e) => W("description", e.target.value),
189
+ value: V.description,
190
+ onChange: (e) => K("description", e.target.value),
191
191
  rows: 4,
192
192
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
193
193
  })] }),
194
194
  /* @__PURE__ */ g("div", {
195
195
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
196
196
  children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
197
- htmlFor: U("category"),
197
+ htmlFor: G("category"),
198
198
  className: "block text-sm font-medium mb-1.5 text-text-primary",
199
199
  children: "Category"
200
200
  }), /* @__PURE__ */ h("select", {
201
- id: U("category"),
201
+ id: G("category"),
202
202
  "aria-label": "Category",
203
- value: z.category,
204
- onChange: (e) => W("category", e.target.value),
203
+ value: V.category,
204
+ onChange: (e) => K("category", e.target.value),
205
205
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm",
206
- children: v.map((e) => /* @__PURE__ */ h("option", {
206
+ children: b.map((e) => /* @__PURE__ */ h("option", {
207
207
  value: e,
208
208
  children: e
209
209
  }, e))
210
210
  })] }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
211
- htmlFor: U("authType"),
211
+ htmlFor: G("authType"),
212
212
  className: "block text-sm font-medium mb-1.5 text-text-primary",
213
213
  children: "Auth Type"
214
214
  }), /* @__PURE__ */ h("select", {
215
- id: U("authType"),
215
+ id: G("authType"),
216
216
  "aria-label": "Auth Type",
217
- value: z.authType,
218
- onChange: (e) => W("authType", e.target.value),
217
+ value: V.authType,
218
+ onChange: (e) => K("authType", e.target.value),
219
219
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm",
220
- children: y.map((e) => /* @__PURE__ */ h("option", {
220
+ children: x.map((e) => /* @__PURE__ */ h("option", {
221
221
  value: e,
222
222
  children: e
223
223
  }, e))
@@ -226,131 +226,131 @@ function C() {
226
226
  /* @__PURE__ */ g("div", {
227
227
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
228
228
  children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
229
- htmlFor: U("website"),
229
+ htmlFor: G("website"),
230
230
  className: "block text-sm font-medium mb-1.5 text-text-primary",
231
231
  children: "Website"
232
232
  }), /* @__PURE__ */ h("input", {
233
- id: U("website"),
233
+ id: G("website"),
234
234
  "aria-label": "Website",
235
- value: z.website,
236
- onChange: (e) => W("website", e.target.value),
235
+ value: V.website,
236
+ onChange: (e) => K("website", e.target.value),
237
237
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
238
238
  })] }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
239
- htmlFor: U("docsUrl"),
239
+ htmlFor: G("docsUrl"),
240
240
  className: "block text-sm font-medium mb-1.5 text-text-primary",
241
241
  children: "Docs URL"
242
242
  }), /* @__PURE__ */ h("input", {
243
- id: U("docsUrl"),
243
+ id: G("docsUrl"),
244
244
  "aria-label": "Docs URL",
245
- value: z.docsUrl,
246
- onChange: (e) => W("docsUrl", e.target.value),
245
+ value: V.docsUrl,
246
+ onChange: (e) => K("docsUrl", e.target.value),
247
247
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
248
248
  })] })]
249
249
  }),
250
250
  /* @__PURE__ */ g("div", {
251
251
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
252
252
  children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
253
- htmlFor: U("pluginVersion"),
253
+ htmlFor: G("pluginVersion"),
254
254
  className: "block text-sm font-medium mb-1.5 text-text-primary",
255
255
  children: "Plugin version"
256
256
  }), /* @__PURE__ */ h("input", {
257
- id: U("pluginVersion"),
257
+ id: G("pluginVersion"),
258
258
  "aria-label": "Plugin version",
259
- value: z.pluginVersion,
260
- onChange: (e) => W("pluginVersion", e.target.value),
259
+ value: V.pluginVersion,
260
+ onChange: (e) => K("pluginVersion", e.target.value),
261
261
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
262
262
  })] }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
263
- htmlFor: U("displayOrder"),
263
+ htmlFor: G("displayOrder"),
264
264
  className: "block text-sm font-medium mb-1.5 text-text-primary",
265
265
  children: "Display order"
266
266
  }), /* @__PURE__ */ h("input", {
267
- id: U("displayOrder"),
267
+ id: G("displayOrder"),
268
268
  "aria-label": "Display order",
269
269
  type: "number",
270
- value: z.displayOrder,
271
- onChange: (e) => W("displayOrder", e.target.value),
270
+ value: V.displayOrder,
271
+ onChange: (e) => K("displayOrder", e.target.value),
272
272
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
273
273
  })] })]
274
274
  }),
275
275
  /* @__PURE__ */ g("div", {
276
276
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
277
277
  children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
278
- htmlFor: U("pluginAuthor"),
278
+ htmlFor: G("pluginAuthor"),
279
279
  className: "block text-sm font-medium mb-1.5 text-text-primary",
280
280
  children: "Plugin author"
281
281
  }), /* @__PURE__ */ h("input", {
282
- id: U("pluginAuthor"),
282
+ id: G("pluginAuthor"),
283
283
  "aria-label": "Plugin author",
284
- value: z.pluginAuthor,
285
- onChange: (e) => W("pluginAuthor", e.target.value),
284
+ value: V.pluginAuthor,
285
+ onChange: (e) => K("pluginAuthor", e.target.value),
286
286
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
287
287
  })] }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
288
- htmlFor: U("pluginRepository"),
288
+ htmlFor: G("pluginRepository"),
289
289
  className: "block text-sm font-medium mb-1.5 text-text-primary",
290
290
  children: "Repository"
291
291
  }), /* @__PURE__ */ h("input", {
292
- id: U("pluginRepository"),
292
+ id: G("pluginRepository"),
293
293
  "aria-label": "Repository",
294
- value: z.pluginRepository,
295
- onChange: (e) => W("pluginRepository", e.target.value),
294
+ value: V.pluginRepository,
295
+ onChange: (e) => K("pluginRepository", e.target.value),
296
296
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
297
297
  })] })]
298
298
  })
299
299
  ]
300
- }), /* @__PURE__ */ g("div", {
301
- className: "rounded-xl border border-border-subtle/50 bg-bg-surface p-5 space-y-4",
300
+ }), /* @__PURE__ */ g(v, {
301
+ className: "border-border-seam p-5 space-y-4",
302
302
  children: [
303
303
  /* @__PURE__ */ h("h2", {
304
304
  className: "font-semibold text-text-primary",
305
305
  children: "Runtime config"
306
306
  }),
307
307
  /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
308
- htmlFor: U("baseUrl"),
308
+ htmlFor: G("baseUrl"),
309
309
  className: "block text-sm font-medium mb-1.5 text-text-primary",
310
310
  children: "Base URL"
311
311
  }), /* @__PURE__ */ h("input", {
312
- id: U("baseUrl"),
312
+ id: G("baseUrl"),
313
313
  "aria-label": "Base URL",
314
- value: z.baseUrl,
315
- onChange: (e) => W("baseUrl", e.target.value),
314
+ value: V.baseUrl,
315
+ onChange: (e) => K("baseUrl", e.target.value),
316
316
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
317
317
  })] }),
318
318
  /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
319
- htmlFor: U("apiVersion"),
319
+ htmlFor: G("apiVersion"),
320
320
  className: "block text-sm font-medium mb-1.5 text-text-primary",
321
321
  children: "API version"
322
322
  }), /* @__PURE__ */ h("input", {
323
- id: U("apiVersion"),
323
+ id: G("apiVersion"),
324
324
  "aria-label": "API version",
325
- value: z.apiVersion,
326
- onChange: (e) => W("apiVersion", e.target.value),
325
+ value: V.apiVersion,
326
+ onChange: (e) => K("apiVersion", e.target.value),
327
327
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
328
328
  })] }),
329
329
  /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
330
- htmlFor: U("defaultScopes"),
330
+ htmlFor: G("defaultScopes"),
331
331
  className: "block text-sm font-medium mb-1.5 text-text-primary",
332
332
  children: "Default scopes"
333
333
  }), /* @__PURE__ */ h("input", {
334
- id: U("defaultScopes"),
334
+ id: G("defaultScopes"),
335
335
  "aria-label": "Default scopes",
336
- value: z.defaultScopes,
337
- onChange: (e) => W("defaultScopes", e.target.value),
336
+ value: V.defaultScopes,
337
+ onChange: (e) => K("defaultScopes", e.target.value),
338
338
  placeholder: "openid, profile, email",
339
339
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
340
340
  })] }),
341
341
  /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
342
- htmlFor: U("supportedFeatures"),
342
+ htmlFor: G("supportedFeatures"),
343
343
  className: "block text-sm font-medium mb-1.5 text-text-primary",
344
344
  children: "Supported features"
345
345
  }), /* @__PURE__ */ h("input", {
346
- id: U("supportedFeatures"),
346
+ id: G("supportedFeatures"),
347
347
  "aria-label": "Supported features",
348
- value: z.supportedFeatures,
349
- onChange: (e) => W("supportedFeatures", e.target.value),
348
+ value: V.supportedFeatures,
349
+ onChange: (e) => K("supportedFeatures", e.target.value),
350
350
  placeholder: "messages, files, events",
351
351
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
352
352
  })] }),
353
- /* @__PURE__ */ h(_, {
353
+ /* @__PURE__ */ h(y, {
354
354
  title: "Advanced provider config",
355
355
  description: "Raw JSON for OAuth, scopes, rate limiting, and config schema. Most providers leave these blank.",
356
356
  children: /* @__PURE__ */ h("div", {
@@ -361,25 +361,25 @@ function C() {
361
361
  ["rateLimitConfig", "Rate limit config JSON"],
362
362
  ["configSchema", "Config schema JSON"]
363
363
  ].map(([e, t]) => /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
364
- htmlFor: U(e),
364
+ htmlFor: G(e),
365
365
  className: "block text-sm font-medium mb-1.5 text-text-primary",
366
366
  children: t
367
367
  }), /* @__PURE__ */ h("textarea", {
368
- id: U(e),
368
+ id: G(e),
369
369
  "aria-label": t,
370
- value: z[e],
371
- onChange: (t) => W(e, t.target.value),
370
+ value: V[e],
371
+ onChange: (t) => K(e, t.target.value),
372
372
  rows: 4,
373
373
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm font-mono"
374
374
  })] }, e))
375
375
  })
376
376
  }),
377
377
  /* @__PURE__ */ g("label", {
378
- className: "flex items-center gap-3 rounded-lg border border-border-subtle/50 bg-bg-surface px-3 py-2.5",
378
+ className: "flex items-center gap-3 rounded-lg border border-border-seam bg-bg-surface px-3 py-2.5",
379
379
  children: [/* @__PURE__ */ h("input", {
380
380
  type: "checkbox",
381
- checked: z.isEnabled,
382
- onChange: (e) => W("isEnabled", e.target.checked),
381
+ checked: V.isEnabled,
382
+ onChange: (e) => K("isEnabled", e.target.checked),
383
383
  "aria-label": "Provider enabled"
384
384
  }), /* @__PURE__ */ h("span", {
385
385
  className: "text-sm text-text-primary",
@@ -391,58 +391,56 @@ function C() {
391
391
  }),
392
392
  /* @__PURE__ */ h("div", {
393
393
  className: "flex justify-end",
394
- children: /* @__PURE__ */ g("button", {
395
- type: "button",
394
+ children: /* @__PURE__ */ g(_, {
396
395
  onClick: async () => {
397
396
  try {
398
- R("");
397
+ B("");
399
398
  let e = {
400
- name: z.name.trim(),
401
- description: z.description.trim() || void 0,
402
- icon: z.icon.trim() || void 0,
403
- color: z.color.trim() || void 0,
404
- website: z.website.trim() || void 0,
405
- docsUrl: z.docsUrl.trim() || void 0,
406
- baseUrl: z.baseUrl.trim() || void 0,
407
- apiVersion: z.apiVersion.trim() || void 0,
408
- pluginVersion: z.pluginVersion.trim() || void 0,
409
- pluginAuthor: z.pluginAuthor.trim() || void 0,
410
- pluginRepository: z.pluginRepository.trim() || void 0,
411
- displayOrder: Number(z.displayOrder || "0"),
412
- defaultScopes: z.defaultScopes.split(",").flatMap((e) => {
399
+ name: V.name.trim(),
400
+ description: V.description.trim() || void 0,
401
+ icon: V.icon.trim() || void 0,
402
+ color: V.color.trim() || void 0,
403
+ website: V.website.trim() || void 0,
404
+ docsUrl: V.docsUrl.trim() || void 0,
405
+ baseUrl: V.baseUrl.trim() || void 0,
406
+ apiVersion: V.apiVersion.trim() || void 0,
407
+ pluginVersion: V.pluginVersion.trim() || void 0,
408
+ pluginAuthor: V.pluginAuthor.trim() || void 0,
409
+ pluginRepository: V.pluginRepository.trim() || void 0,
410
+ displayOrder: Number(V.displayOrder || "0"),
411
+ defaultScopes: V.defaultScopes.split(",").flatMap((e) => {
413
412
  let t = e.trim();
414
413
  return t ? [t] : [];
415
414
  }),
416
- supportedFeatures: z.supportedFeatures.split(",").flatMap((e) => {
415
+ supportedFeatures: V.supportedFeatures.split(",").flatMap((e) => {
417
416
  let t = e.trim();
418
417
  return t ? [t] : [];
419
418
  }),
420
- oauthConfig: b(z.oauthConfig, "OAuth config"),
421
- availableScopes: b(z.availableScopes, "Available scopes"),
422
- rateLimitConfig: b(z.rateLimitConfig, "Rate limit config"),
423
- configSchema: b(z.configSchema, "Config schema"),
424
- isEnabled: z.isEnabled
419
+ oauthConfig: S(V.oauthConfig, "OAuth config"),
420
+ availableScopes: S(V.availableScopes, "Available scopes"),
421
+ rateLimitConfig: S(V.rateLimitConfig, "Rate limit config"),
422
+ configSchema: S(V.configSchema, "Config schema"),
423
+ isEnabled: V.isEnabled
425
424
  };
426
- if (w && C) await F(C, e), E?.(n(T, `providers/${C}`));
425
+ if (E && T) await L(T, e), O?.(n(D, `providers/${T}`));
427
426
  else {
428
- let t = await N({
429
- key: z.key.trim(),
430
- category: z.category,
431
- authType: z.authType,
427
+ let t = await F({
428
+ key: V.key.trim(),
429
+ category: V.category,
430
+ authType: V.authType,
432
431
  ...e
433
432
  });
434
- E?.(n(T, `providers/${t?.id || ""}`));
433
+ O?.(n(D, `providers/${t?.id || ""}`));
435
434
  }
436
435
  } catch (e) {
437
- R(e instanceof Error ? e.message : "Failed to save provider");
436
+ B(e instanceof Error ? e.message : "Failed to save provider");
438
437
  }
439
438
  },
440
- disabled: P || I,
441
- className: "inline-flex items-center gap-2 rounded-lg bg-action-primary-bg px-5 py-2.5 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50",
442
- children: [P || I ? /* @__PURE__ */ h(u, {
439
+ disabled: I || R,
440
+ children: [I || R ? /* @__PURE__ */ h(u, {
443
441
  size: 16,
444
442
  className: "animate-spin"
445
- }) : /* @__PURE__ */ h(d, { size: 16 }), w ? "Save Provider" : "Create Provider"]
443
+ }) : /* @__PURE__ */ h(d, { size: 16 }), E ? "Save Provider" : "Create Provider"]
446
444
  })
447
445
  })
448
446
  ]
@@ -465,6 +463,6 @@ function C() {
465
463
  });
466
464
  }
467
465
  //#endregion
468
- export { C as ProviderEditorPage };
466
+ export { T as ProviderEditorPage };
469
467
 
470
468
  //# sourceMappingURL=ProviderEditorPage.js.map