@burdenoff/microfe-integrations 2026.527.1 → 2026.527.2

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