@burdenoff/microfe-devportal 2026.917.1 → 2026.917.3

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.
@@ -7,15 +7,18 @@ import { InputField as s, SelectField as c } from "../components/FormField.js";
7
7
  import { PermissionGuard as l } from "../components/PermissionGuard.js";
8
8
  import { MarkdownEditor as u } from "../components/MarkdownEditor.js";
9
9
  import "../components/index.js";
10
- import { useRef as ee, useState as d } from "react";
11
- import { ArrowLeft as f, Box as p, Check as m, ChevronRight as h, FileCode2 as g, GitFork as _, Info as v, LayoutDashboard as y, LayoutGrid as b, Loader2 as x, Puzzle as S, Save as te, X as ne } from "lucide-react";
12
- import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
13
- import { useI18n as E } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
10
+ import { useProducts as ee } from "../hooks/useProducts.js";
11
+ import "../hooks/index.js";
12
+ import { MultiSelectCombobox as te } from "../components/MultiSelectCombobox.js";
13
+ import { useRef as d, useState as f } from "react";
14
+ import { ArrowLeft as p, Box as m, Check as h, ChevronRight as g, FileCode2 as _, GitFork as v, Info as y, LayoutDashboard as b, LayoutGrid as x, Loader2 as ne, Puzzle as S, Save as re, X as C } from "lucide-react";
15
+ import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
16
+ import { useI18n as D } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
14
17
  //#region src/devportal/pages/CreateApplicationPage.tsx
15
- var D = {
18
+ var O = {
16
19
  app: {
17
20
  appType: "API_INTEGRATION",
18
- icon: p,
21
+ icon: m,
19
22
  label: "App",
20
23
  pageDescription: "Register a new app integration with OAuth permissions",
21
24
  purpose: "Give your integration a name, description, and the permissions it will request. Once created you will get credentials and can configure webhooks, then publish it to the marketplace when it is ready for users.",
@@ -45,7 +48,7 @@ var D = {
45
48
  },
46
49
  workflow: {
47
50
  appType: "WORKFLOW",
48
- icon: _,
51
+ icon: v,
49
52
  label: "Workflow",
50
53
  pageDescription: "Register a new reusable automation workflow",
51
54
  purpose: "Give your workflow a name and description. Once created you can upload your workflow definition in the Versions tab, then publish it to the store or generate a shareable public link.",
@@ -60,7 +63,7 @@ var D = {
60
63
  },
61
64
  parser: {
62
65
  appType: "PARSER",
63
- icon: g,
66
+ icon: _,
64
67
  label: "Parser",
65
68
  pageDescription: "Register a new data parser",
66
69
  purpose: "Give your parser a name and description. Once created you can upload its manifest in the Versions tab, then publish it to the store when it is ready for users.",
@@ -75,7 +78,7 @@ var D = {
75
78
  },
76
79
  widget: {
77
80
  appType: "WIDGET",
78
- icon: b,
81
+ icon: x,
79
82
  label: "Widget",
80
83
  pageDescription: "Register a new embeddable widget",
81
84
  purpose: "Give your widget a name and description. Once created you can upload its manifest in the Versions tab, then publish it to the store when it is ready for users.",
@@ -90,7 +93,7 @@ var D = {
90
93
  },
91
94
  dashboard: {
92
95
  appType: "DASHBOARD",
93
- icon: y,
96
+ icon: b,
94
97
  label: "Dashboard Template",
95
98
  pageDescription: "Register a new dashboard template",
96
99
  purpose: "Give your dashboard template a name and description. Once created you can upload its manifest in the Versions tab, then publish it to the store when it is ready for users.",
@@ -103,7 +106,7 @@ var D = {
103
106
  "Publish to store"
104
107
  ]
105
108
  }
106
- }, O = [
109
+ }, k = [
107
110
  {
108
111
  id: "auth",
109
112
  label: "Authentication",
@@ -175,16 +178,16 @@ var D = {
175
178
  description: "Access control configuration"
176
179
  }
177
180
  ];
178
- function k() {
179
- return Object.fromEntries(O.map((e) => [e.id, "none"]));
181
+ function A() {
182
+ return Object.fromEntries(k.map((e) => [e.id, "none"]));
180
183
  }
181
- function re(e) {
184
+ function j(e) {
182
185
  return Object.entries(e).filter(([, e]) => e !== "none").map(([e, t]) => ({
183
186
  resource: e,
184
187
  level: t
185
188
  }));
186
189
  }
187
- var A = [
190
+ var M = [
188
191
  {
189
192
  value: "PUBLIC",
190
193
  label: "Public — listed in the marketplace after review"
@@ -197,10 +200,10 @@ var A = [
197
200
  value: "INTERNAL",
198
201
  label: "Internal — visible to your entire dev org"
199
202
  }
200
- ], j = [...A, {
203
+ ], N = [...M, {
201
204
  value: "UNLISTED",
202
205
  label: "Unlisted — shareable via link, not listed in store"
203
- }], M = [
206
+ }], P = [
204
207
  {
205
208
  value: "ai",
206
209
  label: "AI & Automation"
@@ -229,41 +232,41 @@ var A = [
229
232
  value: "trigger",
230
233
  label: "Triggers"
231
234
  }
232
- ], N = ({ icon: e, title: n, description: r, bullets: i, selected: a, onClick: o }) => /* @__PURE__ */ T("button", {
235
+ ], F = ({ icon: e, title: n, description: r, bullets: i, selected: a, onClick: o }) => /* @__PURE__ */ E("button", {
233
236
  type: "button",
234
237
  onClick: o,
235
238
  className: t("relative flex flex-col gap-3 rounded-xl border-2 p-6 text-left transition-all hover:border-primary/50 hover:shadow-sm", a ? "border-primary bg-action-primary-bg/5 shadow-sm" : "border-border-subtle bg-bg-surface"),
236
239
  children: [
237
- a && /* @__PURE__ */ w("span", {
240
+ a && /* @__PURE__ */ T("span", {
238
241
  className: "absolute top-4 right-4 flex h-5 w-5 items-center justify-center rounded-full bg-action-primary-bg text-action-primary-text",
239
- children: /* @__PURE__ */ w(m, { size: 12 })
242
+ children: /* @__PURE__ */ T(h, { size: 12 })
240
243
  }),
241
- /* @__PURE__ */ w("div", {
244
+ /* @__PURE__ */ T("div", {
242
245
  className: "flex h-10 w-10 items-center justify-center rounded-lg bg-bg-sunken",
243
- children: /* @__PURE__ */ w(e, {
246
+ children: /* @__PURE__ */ T(e, {
244
247
  size: 22,
245
248
  className: "text-text-primary"
246
249
  })
247
250
  }),
248
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
251
+ /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
249
252
  className: "font-semibold text-text-primary",
250
253
  children: n
251
- }), /* @__PURE__ */ w("p", {
254
+ }), /* @__PURE__ */ T("p", {
252
255
  className: "mt-1 text-sm text-text-secondary",
253
256
  children: r
254
257
  })] }),
255
- /* @__PURE__ */ w("ul", {
258
+ /* @__PURE__ */ T("ul", {
256
259
  className: "mt-1 space-y-1",
257
- children: i.map((e) => /* @__PURE__ */ T("li", {
260
+ children: i.map((e) => /* @__PURE__ */ E("li", {
258
261
  className: "flex items-center gap-2 text-xs text-text-secondary",
259
- children: [/* @__PURE__ */ w(h, {
262
+ children: [/* @__PURE__ */ T(g, {
260
263
  size: 12,
261
264
  className: "flex-shrink-0 text-primary"
262
265
  }), e]
263
266
  }, e))
264
267
  })
265
268
  ]
266
- }), P = ({ permissions: e, onChange: t }) => {
269
+ }), I = ({ permissions: e, onChange: t }) => {
267
270
  let n = [
268
271
  "none",
269
272
  "read",
@@ -273,35 +276,35 @@ var A = [
273
276
  read: "Read",
274
277
  write: "Read & Write"
275
278
  };
276
- return /* @__PURE__ */ w("div", {
279
+ return /* @__PURE__ */ T("div", {
277
280
  className: "overflow-x-auto rounded-lg border border-border-subtle",
278
- children: /* @__PURE__ */ T("table", {
281
+ children: /* @__PURE__ */ E("table", {
279
282
  className: "w-full text-sm",
280
- children: [/* @__PURE__ */ w("thead", { children: /* @__PURE__ */ T("tr", {
283
+ children: [/* @__PURE__ */ T("thead", { children: /* @__PURE__ */ E("tr", {
281
284
  className: "border-b border-border-subtle bg-bg-sunken/50",
282
- children: [/* @__PURE__ */ w("th", {
285
+ children: [/* @__PURE__ */ T("th", {
283
286
  className: "px-4 py-3 text-left font-medium text-text-secondary w-1/2",
284
287
  children: "Resource"
285
- }), n.map((e) => /* @__PURE__ */ w("th", {
288
+ }), n.map((e) => /* @__PURE__ */ T("th", {
286
289
  className: "px-4 py-3 text-center font-medium text-text-secondary",
287
290
  children: r[e]
288
291
  }, e))]
289
- }) }), /* @__PURE__ */ w("tbody", {
292
+ }) }), /* @__PURE__ */ T("tbody", {
290
293
  className: "divide-y divide-border",
291
- children: O.map((r) => /* @__PURE__ */ T("tr", {
294
+ children: k.map((r) => /* @__PURE__ */ E("tr", {
292
295
  className: "hover:bg-bg-sunken/30 transition-colors",
293
- children: [/* @__PURE__ */ T("td", {
296
+ children: [/* @__PURE__ */ E("td", {
294
297
  className: "px-4 py-3",
295
- children: [/* @__PURE__ */ w("p", {
298
+ children: [/* @__PURE__ */ T("p", {
296
299
  className: "font-medium text-text-primary",
297
300
  children: r.label
298
- }), /* @__PURE__ */ w("p", {
301
+ }), /* @__PURE__ */ T("p", {
299
302
  className: "text-xs text-text-secondary",
300
303
  children: r.description
301
304
  })]
302
- }), n.map((n) => /* @__PURE__ */ w("td", {
305
+ }), n.map((n) => /* @__PURE__ */ T("td", {
303
306
  className: "px-4 py-3 text-center",
304
- children: /* @__PURE__ */ w("input", {
307
+ children: /* @__PURE__ */ T("input", {
305
308
  type: "radio",
306
309
  name: `permission-${r.id}`,
307
310
  value: n,
@@ -314,39 +317,18 @@ var A = [
314
317
  })]
315
318
  })
316
319
  });
317
- }, F = [
318
- {
319
- value: "fluidgrids",
320
- label: "FluidGrids"
321
- },
322
- {
323
- value: "workspaces",
324
- label: "Workspaces"
325
- },
326
- {
327
- value: "bigconsole",
328
- label: "BigConsole"
329
- },
330
- {
331
- value: "botlit",
332
- label: "Botlit"
333
- },
334
- {
335
- value: "vibecontrols",
336
- label: "VibeControls"
337
- }
338
- ], I = () => {
339
- let { navigate: p, basePath: h, activeOrgId: g } = e(), { t: _ } = E(), y = (e, t) => {
340
- let n = _(e);
320
+ }, L = () => {
321
+ let { navigate: t, basePath: m, activeOrgId: h } = e(), { t: g } = D(), _ = (e, t) => {
322
+ let n = g(e);
341
323
  return n === e ? t : n;
342
- }, b = n(), [S, O] = d(null), [I, ie] = d([]), [L, R] = d(k()), z = ee(!1), [B, V] = d({
324
+ }, v = n(), { products: b } = ee(), [x, S] = f(null), [k, L] = f([]), [R, z] = f(A()), B = d(!1), [V, H] = f({
343
325
  name: "",
344
326
  slug: "",
345
327
  shortDescription: "",
346
328
  description: "",
347
329
  category: "",
348
330
  visibility: "PUBLIC",
349
- developerOrganizationId: g ?? "",
331
+ developerOrganizationId: h ?? "",
350
332
  websiteUrl: "",
351
333
  githubUrl: "",
352
334
  documentationUrl: "",
@@ -354,104 +336,104 @@ var A = [
354
336
  oauthAuthUrl: "",
355
337
  oauthTokenUrl: "",
356
338
  oauthRevokeUrl: ""
357
- }), [H, U] = d({}), [W, { loading: G }] = r(), { data: K } = i({ fetchPolicy: "cache-and-network" }), q = [{
339
+ }), [U, W] = f({}), [G, { loading: K }] = r(), { data: q } = i({ fetchPolicy: "cache-and-network" }), J = [{
358
340
  value: "",
359
341
  label: "No organization (personal)"
360
- }, ...(K?.myDeveloperOrganizations ?? []).filter((e) => e.kind !== "PHYSICAL").map((e) => ({
342
+ }, ...(q?.myDeveloperOrganizations ?? []).filter((e) => e.kind !== "PHYSICAL").map((e) => ({
361
343
  value: e.id,
362
344
  label: e.name
363
- }))], J = (e) => p?.(`${h}${e}`), ae = (e) => e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, ""), Y = (e) => {
345
+ }))], Y = (e) => t?.(`${m}${e}`), ie = (e) => e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, ""), ae = (e) => {
364
346
  let t = e.target.value;
365
- V((e) => ({
347
+ H((e) => ({
366
348
  ...e,
367
349
  name: t,
368
- slug: z.current ? e.slug : ae(t)
369
- })), H.name && U((e) => ({
350
+ slug: B.current ? e.slug : ie(t)
351
+ })), U.name && W((e) => ({
370
352
  ...e,
371
353
  name: void 0
372
354
  }));
373
355
  }, oe = (e) => {
374
- z.current = !0;
356
+ B.current = !0;
375
357
  let t = e.target.value.toLowerCase().replace(/[^a-z0-9-]/g, "");
376
- V((e) => ({
358
+ H((e) => ({
377
359
  ...e,
378
360
  slug: t
379
- })), H.slug && U((e) => ({
361
+ })), U.slug && W((e) => ({
380
362
  ...e,
381
363
  slug: void 0
382
364
  }));
383
365
  }, X = (e, t) => {
384
- V((n) => ({
366
+ H((n) => ({
385
367
  ...n,
386
368
  [e]: t
387
- })), (H[e] || H._submit) && U((t) => ({
369
+ })), (U[e] || U._submit) && W((t) => ({
388
370
  ...t,
389
371
  [e]: void 0,
390
372
  _submit: void 0
391
373
  }));
392
374
  }, se = (e, t) => {
393
- R((n) => ({
375
+ z((n) => ({
394
376
  ...n,
395
377
  [e]: t
396
378
  }));
397
379
  }, ce = () => {
398
380
  let e = {};
399
- return B.name.trim() ? B.name.length < 3 ? e.name = "Name must be at least 3 characters" : B.name.length > 100 && (e.name = "Name must be less than 100 characters") : e.name = "Name is required", B.slug.trim() ? /^[a-z0-9-]+$/.test(B.slug) || (e.slug = "Slug can only contain lowercase letters, numbers, and hyphens") : e.slug = "Slug is required", B.shortDescription.trim() ? B.shortDescription.length > 200 && (e.shortDescription = "Short description must be less than 200 characters") : e.shortDescription = "Short description is required", B.category || (e.category = "Category is required"), S !== "app" && I.length === 0 && (e.compatibleProducts = "Select at least one compatible product so users can find this in the right store"), U(e), Object.keys(e).length === 0;
400
- }, Z = () => D[S ?? "app"].appType, le = async (e) => {
401
- if (e.preventDefault(), !ce() || !S) return;
402
- let t = S === "app" ? { permissions: re(L) } : null;
381
+ return V.name.trim() ? V.name.length < 3 ? e.name = "Name must be at least 3 characters" : V.name.length > 100 && (e.name = "Name must be less than 100 characters") : e.name = "Name is required", V.slug.trim() ? /^[a-z0-9-]+$/.test(V.slug) || (e.slug = "Slug can only contain lowercase letters, numbers, and hyphens") : e.slug = "Slug is required", V.shortDescription.trim() ? V.shortDescription.length > 200 && (e.shortDescription = "Short description must be less than 200 characters") : e.shortDescription = "Short description is required", V.category || (e.category = "Category is required"), x !== "app" && k.length === 0 && (e.compatibleProducts = "Select at least one compatible product so users can find this in the right store"), W(e), Object.keys(e).length === 0;
382
+ }, Z = () => O[x ?? "app"].appType, le = async (e) => {
383
+ if (e.preventDefault(), !ce() || !x) return;
384
+ let t = x === "app" ? { permissions: j(R) } : null;
403
385
  try {
404
- let e = await W({ variables: { input: {
405
- name: B.name,
406
- slug: B.slug || void 0,
407
- shortDescription: B.shortDescription || void 0,
408
- description: B.description || void 0,
409
- category: B.category || void 0,
386
+ let e = await G({ variables: { input: {
387
+ name: V.name,
388
+ slug: V.slug || void 0,
389
+ shortDescription: V.shortDescription || void 0,
390
+ description: V.description || void 0,
391
+ category: V.category || void 0,
410
392
  appType: Z(),
411
- visibility: B.visibility,
412
- developerOrganizationId: B.developerOrganizationId || void 0,
413
- websiteUrl: B.websiteUrl || void 0,
414
- githubUrl: B.githubUrl || void 0,
415
- documentationUrl: B.documentationUrl || void 0,
416
- supportUrl: B.supportUrl || void 0,
393
+ visibility: V.visibility,
394
+ developerOrganizationId: V.developerOrganizationId || void 0,
395
+ websiteUrl: V.websiteUrl || void 0,
396
+ githubUrl: V.githubUrl || void 0,
397
+ documentationUrl: V.documentationUrl || void 0,
398
+ supportUrl: V.supportUrl || void 0,
417
399
  manifest: t ?? void 0,
418
- compatibleProducts: I.length > 0 ? I : void 0,
419
- ...S === "app" && {
420
- oauthAuthUrl: B.oauthAuthUrl || void 0,
421
- oauthTokenUrl: B.oauthTokenUrl || void 0,
422
- oauthRevokeUrl: B.oauthRevokeUrl || void 0
400
+ compatibleProducts: k.length > 0 ? k : void 0,
401
+ ...x === "app" && {
402
+ oauthAuthUrl: V.oauthAuthUrl || void 0,
403
+ oauthTokenUrl: V.oauthTokenUrl || void 0,
404
+ oauthRevokeUrl: V.oauthRevokeUrl || void 0
423
405
  }
424
406
  } } });
425
- e.data?.createApplication?.id && (b.emit("devportal.app.created", {
407
+ e.data?.createApplication?.id && (v.emit("devportal.app.created", {
426
408
  appId: e.data.createApplication.id,
427
- name: B.name,
409
+ name: V.name,
428
410
  appType: Z(),
429
- organizationId: B.developerOrganizationId || null
430
- }), J(`/apps/${e.data.createApplication.id}`));
411
+ organizationId: V.developerOrganizationId || null
412
+ }), Y(`/apps/${e.data.createApplication.id}`));
431
413
  } catch (e) {
432
414
  let t = [];
433
415
  e && typeof e == "object" && "graphQLErrors" in e && Array.isArray(e.graphQLErrors) && e.graphQLErrors.forEach((e) => t.push(e.message)), e instanceof Error && t.push(e.message);
434
416
  let n = t.join(" ").toLowerCase();
435
- n.includes("slug") || n.includes("already exist") || n.includes("unique") || n.includes("conflict") || n.includes("duplicate") ? U((e) => ({
417
+ n.includes("slug") || n.includes("already exist") || n.includes("unique") || n.includes("conflict") || n.includes("duplicate") ? W((e) => ({
436
418
  ...e,
437
419
  slug: "This slug is already taken — choose a different one"
438
- })) : U((e) => ({
420
+ })) : W((e) => ({
439
421
  ...e,
440
422
  _submit: t[0] ?? "Something went wrong. Please try again."
441
423
  }));
442
424
  }
443
425
  };
444
- if (!S) return /* @__PURE__ */ w(l, {
426
+ if (!x) return /* @__PURE__ */ T(l, {
445
427
  authOnly: !0,
446
- children: /* @__PURE__ */ w(a, {
428
+ children: /* @__PURE__ */ T(a, {
447
429
  title: "What do you want to build?",
448
430
  description: "Choose a builder type to get started",
449
431
  purpose: "Pick the kind of integration you are creating — a standard app, a Node package, or a workflow. Your choice sets up the right defaults (credentials, permissions, and where it can be installed) so you only fill in what that type actually needs.",
450
- backLink: `${h}/apps`,
432
+ backLink: `${m}/apps`,
451
433
  backLabel: "Back to Applications",
452
- children: /* @__PURE__ */ T("div", {
434
+ children: /* @__PURE__ */ E("div", {
453
435
  className: "max-w-3xl space-y-6",
454
- children: [/* @__PURE__ */ w("div", {
436
+ children: [/* @__PURE__ */ T("div", {
455
437
  className: "grid gap-4 sm:grid-cols-3",
456
438
  children: [
457
439
  "app",
@@ -461,161 +443,147 @@ var A = [
461
443
  "widget",
462
444
  "dashboard"
463
445
  ].map((e) => {
464
- let t = D[e];
465
- return /* @__PURE__ */ w(N, {
446
+ let t = O[e];
447
+ return /* @__PURE__ */ T(F, {
466
448
  icon: t.icon,
467
449
  title: t.label,
468
450
  description: t.cardDescription,
469
451
  bullets: t.cardBullets,
470
- selected: S === e,
471
- onClick: () => O(e)
452
+ selected: x === e,
453
+ onClick: () => S(e)
472
454
  }, e);
473
455
  })
474
- }), /* @__PURE__ */ T("div", {
456
+ }), /* @__PURE__ */ E("div", {
475
457
  className: "rounded-lg border border-border-subtle bg-bg-sunken/30 p-4 flex gap-3 text-sm text-text-secondary",
476
- children: [/* @__PURE__ */ w(v, {
458
+ children: [/* @__PURE__ */ T(y, {
477
459
  size: 16,
478
460
  className: "flex-shrink-0 mt-0.5"
479
- }), /* @__PURE__ */ w("p", { children: "Apps use OAuth to interact with platform data. Nodes and Workflows are packaged files you upload after creation." })]
461
+ }), /* @__PURE__ */ T("p", { children: "Apps use OAuth to interact with platform data. Nodes and Workflows are packaged files you upload after creation." })]
480
462
  })]
481
463
  })
482
464
  })
483
465
  });
484
- let Q = D[S ?? "app"], $ = Q.label, ue = Q.icon, de = /* @__PURE__ */ w(ue, { size: 16 });
485
- return /* @__PURE__ */ w(l, {
466
+ let Q = O[x ?? "app"], $ = Q.label, ue = Q.icon, de = /* @__PURE__ */ T(ue, { size: 16 });
467
+ return /* @__PURE__ */ T(l, {
486
468
  authOnly: !0,
487
- children: /* @__PURE__ */ w(a, {
469
+ children: /* @__PURE__ */ T(a, {
488
470
  title: `Create ${$}`,
489
471
  description: Q.pageDescription,
490
472
  purpose: Q.purpose,
491
- backLink: `${h}/apps`,
473
+ backLink: `${m}/apps`,
492
474
  backLabel: "Back to Applications",
493
- children: /* @__PURE__ */ T("form", {
475
+ children: /* @__PURE__ */ E("form", {
494
476
  onSubmit: le,
495
477
  className: "space-y-8 max-w-3xl",
496
478
  children: [
497
- /* @__PURE__ */ T("div", {
479
+ /* @__PURE__ */ E("div", {
498
480
  className: "flex items-center gap-3",
499
- children: [/* @__PURE__ */ T("button", {
481
+ children: [/* @__PURE__ */ E("button", {
500
482
  type: "button",
501
- onClick: () => O(null),
483
+ onClick: () => S(null),
502
484
  className: "flex items-center gap-1.5 text-sm text-text-secondary hover:text-text-primary transition-colors",
503
- children: [/* @__PURE__ */ w(f, { size: 14 }), "Change type"]
504
- }), /* @__PURE__ */ T("span", {
485
+ children: [/* @__PURE__ */ T(p, { size: 14 }), "Change type"]
486
+ }), /* @__PURE__ */ E("span", {
505
487
  className: "flex items-center gap-1.5 rounded-full border border-border-subtle bg-bg-sunken px-3 py-1 text-xs font-medium",
506
488
  children: [de, $]
507
489
  })]
508
490
  }),
509
- /* @__PURE__ */ w(o, {
491
+ /* @__PURE__ */ T(o, {
510
492
  title: "Basic Information",
511
493
  description: "Core details about your application",
512
- children: /* @__PURE__ */ T("div", {
494
+ children: /* @__PURE__ */ E("div", {
513
495
  className: "space-y-4",
514
496
  children: [
515
- /* @__PURE__ */ w(s, {
497
+ /* @__PURE__ */ T(s, {
516
498
  label: "Name",
517
- value: B.name,
518
- onChange: Y,
499
+ value: V.name,
500
+ onChange: ae,
519
501
  placeholder: Q.namePlaceholder,
520
502
  required: !0,
521
- error: H.name
503
+ error: U.name
522
504
  }),
523
- /* @__PURE__ */ w(s, {
505
+ /* @__PURE__ */ T(s, {
524
506
  label: "Slug",
525
- value: B.slug,
507
+ value: V.slug,
526
508
  onChange: oe,
527
509
  placeholder: "my-integration",
528
510
  required: !0,
529
- error: H.slug,
530
- hint: z.current ? "Only lowercase letters, numbers, and hyphens" : "Auto-generated from name — edit to customise"
511
+ error: U.slug,
512
+ hint: B.current ? "Only lowercase letters, numbers, and hyphens" : "Auto-generated from name — edit to customise"
531
513
  }),
532
- /* @__PURE__ */ w(u, {
514
+ /* @__PURE__ */ T(u, {
533
515
  label: "Short Description",
534
- value: B.shortDescription,
516
+ value: V.shortDescription,
535
517
  onChange: (e) => X("shortDescription", e),
536
518
  placeholder: "Briefly describe what this does",
537
519
  required: !0,
538
- error: H.shortDescription,
539
- hint: `${B.shortDescription.length}/200 characters`,
520
+ error: U.shortDescription,
521
+ hint: `${V.shortDescription.length}/200 characters`,
540
522
  rows: 2,
541
523
  maxLength: 200
542
524
  }),
543
- /* @__PURE__ */ T("div", {
525
+ /* @__PURE__ */ E("div", {
544
526
  className: "grid gap-4 sm:grid-cols-2",
545
- children: [/* @__PURE__ */ w(c, {
527
+ children: [/* @__PURE__ */ T(c, {
546
528
  label: "Category",
547
- value: B.category,
529
+ value: V.category,
548
530
  onChange: (e) => X("category", e.target.value),
549
- options: M,
531
+ options: P,
550
532
  placeholder: "Select a category…",
551
533
  required: !0,
552
- error: H.category,
534
+ error: U.category,
553
535
  hint: "Helps users discover your item in the store"
554
- }), /* @__PURE__ */ w(c, {
536
+ }), /* @__PURE__ */ T(c, {
555
537
  label: "Visibility",
556
- value: B.visibility,
538
+ value: V.visibility,
557
539
  onChange: (e) => X("visibility", e.target.value),
558
- options: S === "workflow" ? j : A,
540
+ options: x === "workflow" ? N : M,
559
541
  required: !0,
560
- hint: B.visibility === "PUBLIC" ? "Listed in the marketplace after review approval — anyone can discover and install it" : B.visibility === "UNLISTED" ? "Not in the store, but share with anyone via a direct link. You can still submit for marketplace review later" : B.visibility === "INTERNAL" ? "Visible to all members of your developer organization — no one outside can access it" : "Only you (the creator) can see this — other org members cannot access it"
542
+ hint: V.visibility === "PUBLIC" ? "Listed in the marketplace after review approval — anyone can discover and install it" : V.visibility === "UNLISTED" ? "Not in the store, but share with anyone via a direct link. You can still submit for marketplace review later" : V.visibility === "INTERNAL" ? "Visible to all members of your developer organization — no one outside can access it" : "Only you (the creator) can see this — other org members cannot access it"
561
543
  })]
562
544
  }),
563
- S !== "app" && /* @__PURE__ */ T("div", {
545
+ x !== "app" && /* @__PURE__ */ E("div", {
564
546
  className: "space-y-2",
565
547
  children: [
566
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("label", {
548
+ /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ E("label", {
567
549
  className: "block text-sm font-medium text-text-primary",
568
- children: ["Compatible Products", /* @__PURE__ */ w("span", {
550
+ children: ["Compatible Products", /* @__PURE__ */ T("span", {
569
551
  className: "text-status-error-text ml-1",
570
552
  children: "*"
571
553
  })]
572
- }), /* @__PURE__ */ T("p", {
554
+ }), /* @__PURE__ */ E("p", {
573
555
  className: "text-xs text-text-secondary mt-0.5",
574
556
  children: [
575
557
  "Select which products this ",
576
- S,
558
+ x,
577
559
  " works with. Users will see it in those products' node stores."
578
560
  ]
579
561
  })] }),
580
- /* @__PURE__ */ w("div", {
581
- className: "flex flex-wrap gap-3",
582
- children: F.map((e) => {
583
- let n = I.includes(e.value);
584
- return /* @__PURE__ */ T("label", {
585
- className: t("flex items-center gap-2 cursor-pointer rounded-md border px-3 py-2 text-sm transition-colors", n ? "border-primary bg-primary/10 text-text-primary" : "border-border-subtle hover:border-border text-text-secondary hover:text-text-primary", H.compatibleProducts && !n && "border-status-error-bg/50"),
586
- children: [
587
- /* @__PURE__ */ w("input", {
588
- type: "checkbox",
589
- className: "sr-only",
590
- checked: n,
591
- onChange: () => {
592
- ie((t) => {
593
- let r = n ? t.filter((t) => t !== e.value) : [...t, e.value];
594
- return r.length > 0 && U((e) => ({
595
- ...e,
596
- compatibleProducts: void 0
597
- })), r;
598
- });
599
- }
600
- }),
601
- n && /* @__PURE__ */ w(m, {
602
- size: 14,
603
- className: "text-primary flex-shrink-0"
604
- }),
605
- e.label
606
- ]
607
- }, e.value);
608
- })
562
+ /* @__PURE__ */ T(te, {
563
+ options: b.map((e) => ({
564
+ value: e.slug,
565
+ label: e.name
566
+ })),
567
+ selected: k,
568
+ onChange: (e) => {
569
+ L(e), e.length > 0 && W((e) => ({
570
+ ...e,
571
+ compatibleProducts: void 0
572
+ }));
573
+ },
574
+ placeholder: "Select products…",
575
+ searchPlaceholder: "Search products…",
576
+ error: !!U.compatibleProducts
609
577
  }),
610
- H.compatibleProducts && /* @__PURE__ */ w("p", {
578
+ U.compatibleProducts && /* @__PURE__ */ T("p", {
611
579
  className: "text-xs text-status-error-text",
612
- children: H.compatibleProducts
580
+ children: U.compatibleProducts
613
581
  })
614
582
  ]
615
583
  }),
616
- /* @__PURE__ */ w(u, {
584
+ /* @__PURE__ */ T(u, {
617
585
  label: "Full Description",
618
- value: B.description,
586
+ value: V.description,
619
587
  onChange: (e) => X("description", e),
620
588
  placeholder: "Detailed description, features, and use cases...",
621
589
  rows: 5,
@@ -624,89 +592,89 @@ var A = [
624
592
  ]
625
593
  })
626
594
  }),
627
- q.length > 2 && /* @__PURE__ */ w(o, {
595
+ J.length > 2 && /* @__PURE__ */ T(o, {
628
596
  title: "Organization",
629
597
  description: "Which developer organization owns this?",
630
- children: /* @__PURE__ */ w(c, {
598
+ children: /* @__PURE__ */ T(c, {
631
599
  label: "Developer Organization",
632
- value: B.developerOrganizationId,
600
+ value: V.developerOrganizationId,
633
601
  onChange: (e) => X("developerOrganizationId", e.target.value),
634
- options: q
602
+ options: J
635
603
  })
636
604
  }),
637
- S === "app" && /* @__PURE__ */ T(o, {
605
+ x === "app" && /* @__PURE__ */ E(o, {
638
606
  title: "Permissions",
639
607
  description: "Choose what data your app can access. Users will see these permissions when authorizing your app — like GitHub Apps.",
640
- children: [/* @__PURE__ */ w(P, {
641
- permissions: L,
608
+ children: [/* @__PURE__ */ T(I, {
609
+ permissions: R,
642
610
  onChange: se
643
- }), /* @__PURE__ */ T("div", {
611
+ }), /* @__PURE__ */ E("div", {
644
612
  className: "mt-3 flex gap-2 rounded-lg border border-border-subtle bg-bg-sunken/30 p-3 text-xs text-text-secondary",
645
- children: [/* @__PURE__ */ w(v, {
613
+ children: [/* @__PURE__ */ T(y, {
646
614
  size: 14,
647
615
  className: "flex-shrink-0 mt-0.5"
648
- }), /* @__PURE__ */ T("span", { children: [/* @__PURE__ */ w("strong", { children: "Read & Write" }), " implies Read. Select only what your app genuinely needs — fewer permissions build more user trust."] })]
616
+ }), /* @__PURE__ */ E("span", { children: [/* @__PURE__ */ T("strong", { children: "Read & Write" }), " implies Read. Select only what your app genuinely needs — fewer permissions build more user trust."] })]
649
617
  })]
650
618
  }),
651
- S === "app" && /* @__PURE__ */ w(o, {
619
+ x === "app" && /* @__PURE__ */ T(o, {
652
620
  title: "Integration Setup",
653
621
  description: "Configure the endpoints for your integration. After a user installs, we redirect them to your callback URL so your server can complete the connection.",
654
- children: /* @__PURE__ */ T("div", {
622
+ children: /* @__PURE__ */ E("div", {
655
623
  className: "space-y-4",
656
- children: [/* @__PURE__ */ w(s, {
624
+ children: [/* @__PURE__ */ T(s, {
657
625
  label: "Post-install Callback URL",
658
626
  type: "url",
659
- value: B.oauthAuthUrl,
627
+ value: V.oauthAuthUrl,
660
628
  onChange: (e) => X("oauthAuthUrl", e.target.value),
661
629
  placeholder: "https://yourapp.com/callback",
662
630
  hint: "Users land here after install with ?installation_id=xxx appended"
663
- }), /* @__PURE__ */ w(s, {
631
+ }), /* @__PURE__ */ T(s, {
664
632
  label: "Revoke URL",
665
633
  type: "url",
666
- value: B.oauthRevokeUrl,
634
+ value: V.oauthRevokeUrl,
667
635
  onChange: (e) => X("oauthRevokeUrl", e.target.value),
668
636
  placeholder: "https://yourapp.com/oauth/revoke",
669
637
  hint: "We POST to this URL when a user uninstalls your integration"
670
638
  })]
671
639
  })
672
640
  }),
673
- S !== "app" && /* @__PURE__ */ T("div", {
641
+ x !== "app" && /* @__PURE__ */ E("div", {
674
642
  className: "rounded-lg border border-border-subtle bg-bg-sunken/30 p-4 flex gap-3 text-sm text-text-secondary",
675
- children: [/* @__PURE__ */ w(v, {
643
+ children: [/* @__PURE__ */ T(y, {
676
644
  size: 16,
677
645
  className: "flex-shrink-0 mt-0.5"
678
- }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
646
+ }), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
679
647
  className: "font-medium text-text-primary",
680
648
  children: "File uploads"
681
- }), /* @__PURE__ */ w("p", {
649
+ }), /* @__PURE__ */ T("p", {
682
650
  className: "mt-1",
683
- children: S === "node" ? "After creating your Node, go to the Versions tab to upload your ZIP bundle and manifest.json." : `After creating your ${$}, go to the Versions tab to upload its manifest JSON.`
651
+ children: x === "node" ? "After creating your Node, go to the Versions tab to upload your ZIP bundle and manifest.json." : `After creating your ${$}, go to the Versions tab to upload its manifest JSON.`
684
652
  })] })]
685
653
  }),
686
- H._submit && /* @__PURE__ */ T("div", {
654
+ U._submit && /* @__PURE__ */ E("div", {
687
655
  className: "flex items-start gap-3 rounded-lg border border-status-error-bg bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
688
- children: [/* @__PURE__ */ w(v, {
656
+ children: [/* @__PURE__ */ T(y, {
689
657
  size: 16,
690
658
  className: "flex-shrink-0 mt-0.5"
691
- }), /* @__PURE__ */ w("span", { children: H._submit })]
659
+ }), /* @__PURE__ */ T("span", { children: U._submit })]
692
660
  }),
693
- /* @__PURE__ */ T("div", {
661
+ /* @__PURE__ */ E("div", {
694
662
  className: "flex items-center justify-end gap-3 border-t pt-6",
695
- children: [/* @__PURE__ */ T("button", {
663
+ children: [/* @__PURE__ */ E("button", {
696
664
  type: "button",
697
- onClick: () => J("/apps"),
698
- disabled: G,
665
+ onClick: () => Y("/apps"),
666
+ disabled: K,
699
667
  className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-bg-sunken transition-colors disabled:opacity-50",
700
- children: [/* @__PURE__ */ w(ne, { size: 16 }), y("devportal.cancel", "Cancel")]
701
- }), /* @__PURE__ */ w("button", {
668
+ children: [/* @__PURE__ */ T(C, { size: 16 }), _("devportal.cancel", "Cancel")]
669
+ }), /* @__PURE__ */ T("button", {
702
670
  type: "submit",
703
- disabled: G,
671
+ disabled: K,
704
672
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50",
705
- children: G ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(x, {
673
+ children: K ? /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T(ne, {
706
674
  size: 16,
707
675
  className: "animate-spin"
708
- }), "Creating…"] }) : /* @__PURE__ */ T(C, { children: [
709
- /* @__PURE__ */ w(te, { size: 16 }),
676
+ }), "Creating…"] }) : /* @__PURE__ */ E(w, { children: [
677
+ /* @__PURE__ */ T(re, { size: 16 }),
710
678
  "Create ",
711
679
  $
712
680
  ] })
@@ -718,6 +686,6 @@ var A = [
718
686
  });
719
687
  };
720
688
  //#endregion
721
- export { I as CreateApplicationPage };
689
+ export { L as CreateApplicationPage };
722
690
 
723
691
  //# sourceMappingURL=CreateApplicationPage.js.map