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