@burdenoff/microfe-devportal 2026.720.7 → 2026.724.1

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.
@@ -3,16 +3,16 @@ import { cn as t } from "../utils/cn.js";
3
3
  import { useDevportalEventBus as n } from "../events/index.js";
4
4
  import { useCreateApplicationMutation as r, useGetMyOrganizationsQuery as i } from "../../generated/global-operations.js";
5
5
  import { PageLayout as a, PageSection as o } from "../components/PageLayout.js";
6
- import { InputField as s, SelectField as c, TextareaField as l } from "../components/FormField.js";
7
- import { PermissionGuard as u } from "../components/PermissionGuard.js";
8
- import { MarkdownEditor as d } from "../components/MarkdownEditor.js";
6
+ import { InputField as s, SelectField as c } from "../components/FormField.js";
7
+ import { PermissionGuard as l } from "../components/PermissionGuard.js";
8
+ import { MarkdownEditor as u } from "../components/MarkdownEditor.js";
9
9
  import "../components/index.js";
10
- import { useRef as f, useState as p } from "react";
11
- import { useI18n as m } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
12
- import { ArrowLeft as h, Box as g, Check as _, ChevronRight as v, GitFork as y, Info as b, Loader2 as x, Puzzle as S, Save as ee, X as te } from "lucide-react";
13
- import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
10
+ import { useRef as ee, useState as d } from "react";
11
+ import { useI18n as te } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
12
+ import { ArrowLeft as f, Box as p, Check as m, ChevronRight as h, GitFork as g, Info as _, Loader2 as v, Puzzle as y, Save as b, X as x } from "lucide-react";
13
+ import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
14
14
  //#region src/devportal/pages/CreateApplicationPage.tsx
15
- var E = [
15
+ var T = [
16
16
  {
17
17
  id: "auth",
18
18
  label: "Authentication",
@@ -84,10 +84,10 @@ var E = [
84
84
  description: "Access control configuration"
85
85
  }
86
86
  ];
87
- function D() {
88
- return Object.fromEntries(E.map((e) => [e.id, "none"]));
87
+ function E() {
88
+ return Object.fromEntries(T.map((e) => [e.id, "none"]));
89
89
  }
90
- function ne(e) {
90
+ function D(e) {
91
91
  return Object.entries(e).filter(([, e]) => e !== "none").map(([e, t]) => ({
92
92
  resource: e,
93
93
  level: t
@@ -138,34 +138,34 @@ var O = [
138
138
  value: "trigger",
139
139
  label: "Triggers"
140
140
  }
141
- ], j = ({ icon: e, title: n, description: r, bullets: i, selected: a, onClick: o }) => /* @__PURE__ */ T("button", {
141
+ ], j = ({ icon: e, title: n, description: r, bullets: i, selected: a, onClick: o }) => /* @__PURE__ */ w("button", {
142
142
  type: "button",
143
143
  onClick: o,
144
144
  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"),
145
145
  children: [
146
- a && /* @__PURE__ */ w("span", {
146
+ a && /* @__PURE__ */ C("span", {
147
147
  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",
148
- children: /* @__PURE__ */ w(_, { size: 12 })
148
+ children: /* @__PURE__ */ C(m, { size: 12 })
149
149
  }),
150
- /* @__PURE__ */ w("div", {
150
+ /* @__PURE__ */ C("div", {
151
151
  className: "flex h-10 w-10 items-center justify-center rounded-lg bg-bg-sunken",
152
- children: /* @__PURE__ */ w(e, {
152
+ children: /* @__PURE__ */ C(e, {
153
153
  size: 22,
154
154
  className: "text-text-primary"
155
155
  })
156
156
  }),
157
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
157
+ /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
158
158
  className: "font-semibold text-text-primary",
159
159
  children: n
160
- }), /* @__PURE__ */ w("p", {
160
+ }), /* @__PURE__ */ C("p", {
161
161
  className: "mt-1 text-sm text-text-secondary",
162
162
  children: r
163
163
  })] }),
164
- /* @__PURE__ */ w("ul", {
164
+ /* @__PURE__ */ C("ul", {
165
165
  className: "mt-1 space-y-1",
166
- children: i.map((e) => /* @__PURE__ */ T("li", {
166
+ children: i.map((e) => /* @__PURE__ */ w("li", {
167
167
  className: "flex items-center gap-2 text-xs text-text-secondary",
168
- children: [/* @__PURE__ */ w(v, {
168
+ children: [/* @__PURE__ */ C(h, {
169
169
  size: 12,
170
170
  className: "flex-shrink-0 text-primary"
171
171
  }), e]
@@ -182,35 +182,35 @@ var O = [
182
182
  read: "Read",
183
183
  write: "Read & Write"
184
184
  };
185
- return /* @__PURE__ */ w("div", {
185
+ return /* @__PURE__ */ C("div", {
186
186
  className: "overflow-x-auto rounded-lg border border-border-subtle",
187
- children: /* @__PURE__ */ T("table", {
187
+ children: /* @__PURE__ */ w("table", {
188
188
  className: "w-full text-sm",
189
- children: [/* @__PURE__ */ w("thead", { children: /* @__PURE__ */ T("tr", {
189
+ children: [/* @__PURE__ */ C("thead", { children: /* @__PURE__ */ w("tr", {
190
190
  className: "border-b border-border-subtle bg-bg-sunken/50",
191
- children: [/* @__PURE__ */ w("th", {
191
+ children: [/* @__PURE__ */ C("th", {
192
192
  className: "px-4 py-3 text-left font-medium text-text-secondary w-1/2",
193
193
  children: "Resource"
194
- }), n.map((e) => /* @__PURE__ */ w("th", {
194
+ }), n.map((e) => /* @__PURE__ */ C("th", {
195
195
  className: "px-4 py-3 text-center font-medium text-text-secondary",
196
196
  children: r[e]
197
197
  }, e))]
198
- }) }), /* @__PURE__ */ w("tbody", {
198
+ }) }), /* @__PURE__ */ C("tbody", {
199
199
  className: "divide-y divide-border",
200
- children: E.map((r) => /* @__PURE__ */ T("tr", {
200
+ children: T.map((r) => /* @__PURE__ */ w("tr", {
201
201
  className: "hover:bg-bg-sunken/30 transition-colors",
202
- children: [/* @__PURE__ */ T("td", {
202
+ children: [/* @__PURE__ */ w("td", {
203
203
  className: "px-4 py-3",
204
- children: [/* @__PURE__ */ w("p", {
204
+ children: [/* @__PURE__ */ C("p", {
205
205
  className: "font-medium text-text-primary",
206
206
  children: r.label
207
- }), /* @__PURE__ */ w("p", {
207
+ }), /* @__PURE__ */ C("p", {
208
208
  className: "text-xs text-text-secondary",
209
209
  children: r.description
210
210
  })]
211
- }), n.map((n) => /* @__PURE__ */ w("td", {
211
+ }), n.map((n) => /* @__PURE__ */ C("td", {
212
212
  className: "px-4 py-3 text-center",
213
- children: /* @__PURE__ */ w("input", {
213
+ children: /* @__PURE__ */ C("input", {
214
214
  type: "radio",
215
215
  name: `permission-${r.id}`,
216
216
  value: n,
@@ -223,7 +223,7 @@ var O = [
223
223
  })]
224
224
  })
225
225
  });
226
- }, N = [
226
+ }, ne = [
227
227
  {
228
228
  value: "fluidgrids",
229
229
  label: "FluidGrids"
@@ -240,18 +240,18 @@ var O = [
240
240
  value: "botlit",
241
241
  label: "Botlit"
242
242
  }
243
- ], P = () => {
244
- let { navigate: v, basePath: E, activeOrgId: P } = e(), { t: re } = m(), ie = (e, t) => {
243
+ ], N = () => {
244
+ let { navigate: h, basePath: T, activeOrgId: N } = e(), { t: re } = te(), ie = (e, t) => {
245
245
  let n = re(e);
246
246
  return n === e ? t : n;
247
- }, ae = n(), [F, I] = p(null), [L, R] = p([]), [z, B] = p(D()), V = f(!1), [H, U] = p({
247
+ }, ae = n(), [P, F] = d(null), [I, L] = d([]), [R, z] = d(E()), B = ee(!1), [V, H] = d({
248
248
  name: "",
249
249
  slug: "",
250
250
  shortDescription: "",
251
251
  description: "",
252
252
  category: "",
253
253
  visibility: "PUBLIC",
254
- developerOrganizationId: P ?? "",
254
+ developerOrganizationId: N ?? "",
255
255
  websiteUrl: "",
256
256
  githubUrl: "",
257
257
  documentationUrl: "",
@@ -259,108 +259,108 @@ var O = [
259
259
  oauthAuthUrl: "",
260
260
  oauthTokenUrl: "",
261
261
  oauthRevokeUrl: ""
262
- }), [W, G] = p({}), [K, { loading: q }] = r(), { data: oe } = i({ fetchPolicy: "cache-and-network" }), J = [{
262
+ }), [U, W] = d({}), [G, { loading: K }] = r(), { data: q } = i({ fetchPolicy: "cache-and-network" }), J = [{
263
263
  value: "",
264
264
  label: "No organization (personal)"
265
- }, ...(oe?.myDeveloperOrganizations ?? []).map((e) => ({
265
+ }, ...(q?.myDeveloperOrganizations ?? []).map((e) => ({
266
266
  value: e.id,
267
267
  label: e.name
268
- }))], Y = (e) => v?.(`${E}${e}`), se = (e) => e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, ""), ce = (e) => {
268
+ }))], Y = (e) => h?.(`${T}${e}`), oe = (e) => e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, ""), se = (e) => {
269
269
  let t = e.target.value;
270
- U((e) => ({
270
+ H((e) => ({
271
271
  ...e,
272
272
  name: t,
273
- slug: V.current ? e.slug : se(t)
274
- })), W.name && G((e) => ({
273
+ slug: B.current ? e.slug : oe(t)
274
+ })), U.name && W((e) => ({
275
275
  ...e,
276
276
  name: void 0
277
277
  }));
278
- }, le = (e) => {
279
- V.current = !0;
278
+ }, ce = (e) => {
279
+ B.current = !0;
280
280
  let t = e.target.value.toLowerCase().replace(/[^a-z0-9-]/g, "");
281
- U((e) => ({
281
+ H((e) => ({
282
282
  ...e,
283
283
  slug: t
284
- })), W.slug && G((e) => ({
284
+ })), U.slug && W((e) => ({
285
285
  ...e,
286
286
  slug: void 0
287
287
  }));
288
288
  }, X = (e, t) => {
289
- U((n) => ({
289
+ H((n) => ({
290
290
  ...n,
291
291
  [e]: t
292
- })), (W[e] || W._submit) && G((t) => ({
292
+ })), (U[e] || U._submit) && W((t) => ({
293
293
  ...t,
294
294
  [e]: void 0,
295
295
  _submit: void 0
296
296
  }));
297
297
  }, Z = (e, t) => {
298
- B((n) => ({
298
+ z((n) => ({
299
299
  ...n,
300
300
  [e]: t
301
301
  }));
302
- }, ue = () => {
302
+ }, le = () => {
303
303
  let e = {};
304
- return H.name.trim() ? H.name.length < 3 ? e.name = "Name must be at least 3 characters" : H.name.length > 100 && (e.name = "Name must be less than 100 characters") : e.name = "Name is required", H.slug.trim() ? /^[a-z0-9-]+$/.test(H.slug) || (e.slug = "Slug can only contain lowercase letters, numbers, and hyphens") : e.slug = "Slug is required", H.shortDescription.trim() ? H.shortDescription.length > 200 && (e.shortDescription = "Short description must be less than 200 characters") : e.shortDescription = "Short description is required", H.category || (e.category = "Category is required"), F !== "app" && L.length === 0 && (e.compatibleProducts = "Select at least one compatible product so users can find this in the right store"), G(e), Object.keys(e).length === 0;
305
- }, Q = () => F === "node" ? "NODE" : F === "workflow" ? "WORKFLOW" : "API_INTEGRATION", de = async (e) => {
306
- if (e.preventDefault(), !ue() || !F) return;
307
- let t = F === "app" ? { permissions: ne(z) } : null;
304
+ 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"), P !== "app" && I.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;
305
+ }, Q = () => P === "node" ? "NODE" : P === "workflow" ? "WORKFLOW" : "API_INTEGRATION", ue = async (e) => {
306
+ if (e.preventDefault(), !le() || !P) return;
307
+ let t = P === "app" ? { permissions: D(R) } : null;
308
308
  try {
309
- let e = await K({ variables: { input: {
310
- name: H.name,
311
- slug: H.slug || void 0,
312
- shortDescription: H.shortDescription || void 0,
313
- description: H.description || void 0,
314
- category: H.category || void 0,
309
+ let e = await G({ variables: { input: {
310
+ name: V.name,
311
+ slug: V.slug || void 0,
312
+ shortDescription: V.shortDescription || void 0,
313
+ description: V.description || void 0,
314
+ category: V.category || void 0,
315
315
  appType: Q(),
316
- visibility: H.visibility,
317
- developerOrganizationId: H.developerOrganizationId || void 0,
318
- websiteUrl: H.websiteUrl || void 0,
319
- githubUrl: H.githubUrl || void 0,
320
- documentationUrl: H.documentationUrl || void 0,
321
- supportUrl: H.supportUrl || void 0,
316
+ visibility: V.visibility,
317
+ developerOrganizationId: V.developerOrganizationId || void 0,
318
+ websiteUrl: V.websiteUrl || void 0,
319
+ githubUrl: V.githubUrl || void 0,
320
+ documentationUrl: V.documentationUrl || void 0,
321
+ supportUrl: V.supportUrl || void 0,
322
322
  manifest: t ?? void 0,
323
- compatibleProducts: L.length > 0 ? L : void 0,
324
- ...F === "app" && {
325
- oauthAuthUrl: H.oauthAuthUrl || void 0,
326
- oauthTokenUrl: H.oauthTokenUrl || void 0,
327
- oauthRevokeUrl: H.oauthRevokeUrl || void 0
323
+ compatibleProducts: I.length > 0 ? I : void 0,
324
+ ...P === "app" && {
325
+ oauthAuthUrl: V.oauthAuthUrl || void 0,
326
+ oauthTokenUrl: V.oauthTokenUrl || void 0,
327
+ oauthRevokeUrl: V.oauthRevokeUrl || void 0
328
328
  }
329
329
  } } });
330
330
  e.data?.createApplication?.id && (ae.emit("devportal.app.created", {
331
331
  appId: e.data.createApplication.id,
332
- name: H.name,
332
+ name: V.name,
333
333
  appType: Q(),
334
- organizationId: H.developerOrganizationId || null
334
+ organizationId: V.developerOrganizationId || null
335
335
  }), Y(`/apps/${e.data.createApplication.id}`));
336
336
  } catch (e) {
337
337
  let t = [];
338
338
  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);
339
339
  let n = t.join(" ").toLowerCase();
340
- n.includes("slug") || n.includes("already exist") || n.includes("unique") || n.includes("conflict") || n.includes("duplicate") ? G((e) => ({
340
+ n.includes("slug") || n.includes("already exist") || n.includes("unique") || n.includes("conflict") || n.includes("duplicate") ? W((e) => ({
341
341
  ...e,
342
342
  slug: "This slug is already taken — choose a different one"
343
- })) : G((e) => ({
343
+ })) : W((e) => ({
344
344
  ...e,
345
345
  _submit: t[0] ?? "Something went wrong. Please try again."
346
346
  }));
347
347
  }
348
348
  };
349
- if (!F) return /* @__PURE__ */ w(u, {
349
+ if (!P) return /* @__PURE__ */ C(l, {
350
350
  authOnly: !0,
351
- children: /* @__PURE__ */ w(a, {
351
+ children: /* @__PURE__ */ C(a, {
352
352
  title: "What do you want to build?",
353
353
  description: "Choose a builder type to get started",
354
354
  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.",
355
- backLink: `${E}/apps`,
355
+ backLink: `${T}/apps`,
356
356
  backLabel: "Back to Applications",
357
- children: /* @__PURE__ */ T("div", {
357
+ children: /* @__PURE__ */ w("div", {
358
358
  className: "max-w-3xl space-y-6",
359
- children: [/* @__PURE__ */ T("div", {
359
+ children: [/* @__PURE__ */ w("div", {
360
360
  className: "grid gap-4 sm:grid-cols-3",
361
361
  children: [
362
- /* @__PURE__ */ w(j, {
363
- icon: g,
362
+ /* @__PURE__ */ C(j, {
363
+ icon: p,
364
364
  title: "App",
365
365
  description: "Build integrations that connect your service to the platform using OAuth tokens.",
366
366
  bullets: [
@@ -369,11 +369,11 @@ var O = [
369
369
  "Webhook events",
370
370
  "Publish to app store"
371
371
  ],
372
- selected: F === "app",
373
- onClick: () => I("app")
372
+ selected: P === "app",
373
+ onClick: () => F("app")
374
374
  }),
375
- /* @__PURE__ */ w(j, {
376
- icon: S,
375
+ /* @__PURE__ */ C(j, {
376
+ icon: y,
377
377
  title: "Node",
378
378
  description: "Build custom FluidGrids nodes that users can drag into their visual workflows.",
379
379
  bullets: [
@@ -382,11 +382,11 @@ var O = [
382
382
  "Versioned releases",
383
383
  "Publish to node store"
384
384
  ],
385
- selected: F === "node",
386
- onClick: () => I("node")
385
+ selected: P === "node",
386
+ onClick: () => F("node")
387
387
  }),
388
- /* @__PURE__ */ w(j, {
389
- icon: y,
388
+ /* @__PURE__ */ C(j, {
389
+ icon: g,
390
390
  title: "Workflow",
391
391
  description: "Build reusable automation workflows that users can import and customize.",
392
392
  bullets: [
@@ -395,137 +395,138 @@ var O = [
395
395
  "Versioned releases",
396
396
  "Publish to workflow store"
397
397
  ],
398
- selected: F === "workflow",
399
- onClick: () => I("workflow")
398
+ selected: P === "workflow",
399
+ onClick: () => F("workflow")
400
400
  })
401
401
  ]
402
- }), /* @__PURE__ */ T("div", {
402
+ }), /* @__PURE__ */ w("div", {
403
403
  className: "rounded-lg border border-border-subtle bg-bg-sunken/30 p-4 flex gap-3 text-sm text-text-secondary",
404
- children: [/* @__PURE__ */ w(b, {
404
+ children: [/* @__PURE__ */ C(_, {
405
405
  size: 16,
406
406
  className: "flex-shrink-0 mt-0.5"
407
- }), /* @__PURE__ */ w("p", { children: "Apps use OAuth to interact with platform data. Nodes and Workflows are packaged files you upload after creation." })]
407
+ }), /* @__PURE__ */ C("p", { children: "Apps use OAuth to interact with platform data. Nodes and Workflows are packaged files you upload after creation." })]
408
408
  })]
409
409
  })
410
410
  })
411
411
  });
412
- let $ = F === "app" ? "App" : F === "node" ? "Node" : "Workflow", fe = w(F === "app" ? g : F === "node" ? S : y, { size: 16 });
413
- return /* @__PURE__ */ w(u, {
412
+ let $ = P === "app" ? "App" : P === "node" ? "Node" : "Workflow", de = C(P === "app" ? p : P === "node" ? y : g, { size: 16 });
413
+ return /* @__PURE__ */ C(l, {
414
414
  authOnly: !0,
415
- children: /* @__PURE__ */ w(a, {
415
+ children: /* @__PURE__ */ C(a, {
416
416
  title: `Create ${$}`,
417
- description: F === "app" ? "Register a new app integration with OAuth permissions" : F === "node" ? "Register a new FluidGrids node package" : "Register a new reusable automation workflow",
418
- purpose: F === "workflow" ? "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." : F === "node" ? "Give your node a name and description. Once created you can upload your ZIP bundle and manifest in the Versions tab, then publish it to the node store when it is ready for users." : "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.",
419
- backLink: `${E}/apps`,
417
+ description: P === "app" ? "Register a new app integration with OAuth permissions" : P === "node" ? "Register a new FluidGrids node package" : "Register a new reusable automation workflow",
418
+ purpose: P === "workflow" ? "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." : P === "node" ? "Give your node a name and description. Once created you can upload your ZIP bundle and manifest in the Versions tab, then publish it to the node store when it is ready for users." : "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.",
419
+ backLink: `${T}/apps`,
420
420
  backLabel: "Back to Applications",
421
- children: /* @__PURE__ */ T("form", {
422
- onSubmit: de,
421
+ children: /* @__PURE__ */ w("form", {
422
+ onSubmit: ue,
423
423
  className: "space-y-8 max-w-3xl",
424
424
  children: [
425
- /* @__PURE__ */ T("div", {
425
+ /* @__PURE__ */ w("div", {
426
426
  className: "flex items-center gap-3",
427
- children: [/* @__PURE__ */ T("button", {
427
+ children: [/* @__PURE__ */ w("button", {
428
428
  type: "button",
429
- onClick: () => I(null),
429
+ onClick: () => F(null),
430
430
  className: "flex items-center gap-1.5 text-sm text-text-secondary hover:text-text-primary transition-colors",
431
- children: [/* @__PURE__ */ w(h, { size: 14 }), "Change type"]
432
- }), /* @__PURE__ */ T("span", {
431
+ children: [/* @__PURE__ */ C(f, { size: 14 }), "Change type"]
432
+ }), /* @__PURE__ */ w("span", {
433
433
  className: "flex items-center gap-1.5 rounded-full border border-border-subtle bg-bg-sunken px-3 py-1 text-xs font-medium",
434
- children: [fe, $]
434
+ children: [de, $]
435
435
  })]
436
436
  }),
437
- /* @__PURE__ */ w(o, {
437
+ /* @__PURE__ */ C(o, {
438
438
  title: "Basic Information",
439
439
  description: "Core details about your application",
440
- children: /* @__PURE__ */ T("div", {
440
+ children: /* @__PURE__ */ w("div", {
441
441
  className: "space-y-4",
442
442
  children: [
443
- /* @__PURE__ */ w(s, {
443
+ /* @__PURE__ */ C(s, {
444
444
  label: "Name",
445
- value: H.name,
446
- onChange: ce,
447
- placeholder: F === "app" ? "My Integration" : F === "node" ? "HTTP Request" : "Onboarding Flow",
445
+ value: V.name,
446
+ onChange: se,
447
+ placeholder: P === "app" ? "My Integration" : P === "node" ? "HTTP Request" : "Onboarding Flow",
448
448
  required: !0,
449
- error: W.name
449
+ error: U.name
450
450
  }),
451
- /* @__PURE__ */ w(s, {
451
+ /* @__PURE__ */ C(s, {
452
452
  label: "Slug",
453
- value: H.slug,
454
- onChange: le,
453
+ value: V.slug,
454
+ onChange: ce,
455
455
  placeholder: "my-integration",
456
456
  required: !0,
457
- error: W.slug,
458
- hint: V.current ? "Only lowercase letters, numbers, and hyphens" : "Auto-generated from name — edit to customise"
457
+ error: U.slug,
458
+ hint: B.current ? "Only lowercase letters, numbers, and hyphens" : "Auto-generated from name — edit to customise"
459
459
  }),
460
- /* @__PURE__ */ w(l, {
460
+ /* @__PURE__ */ C(u, {
461
461
  label: "Short Description",
462
- value: H.shortDescription,
463
- onChange: (e) => X("shortDescription", e.target.value),
462
+ value: V.shortDescription,
463
+ onChange: (e) => X("shortDescription", e),
464
464
  placeholder: "Briefly describe what this does",
465
465
  required: !0,
466
- error: W.shortDescription,
467
- hint: `${H.shortDescription.length}/200 characters`,
468
- rows: 2
466
+ error: U.shortDescription,
467
+ hint: `${V.shortDescription.length}/200 characters`,
468
+ rows: 2,
469
+ maxLength: 200
469
470
  }),
470
- /* @__PURE__ */ T("div", {
471
+ /* @__PURE__ */ w("div", {
471
472
  className: "grid gap-4 sm:grid-cols-2",
472
- children: [/* @__PURE__ */ w(c, {
473
+ children: [/* @__PURE__ */ C(c, {
473
474
  label: "Category",
474
- value: H.category,
475
+ value: V.category,
475
476
  onChange: (e) => X("category", e.target.value),
476
477
  options: A,
477
478
  placeholder: "Select a category…",
478
479
  required: !0,
479
- error: W.category,
480
+ error: U.category,
480
481
  hint: "Helps users discover your item in the store"
481
- }), /* @__PURE__ */ w(c, {
482
+ }), /* @__PURE__ */ C(c, {
482
483
  label: "Visibility",
483
- value: H.visibility,
484
+ value: V.visibility,
484
485
  onChange: (e) => X("visibility", e.target.value),
485
- options: F === "workflow" ? k : O,
486
+ options: P === "workflow" ? k : O,
486
487
  required: !0,
487
- hint: H.visibility === "PUBLIC" ? "Listed in the marketplace after review approval — anyone can discover and install it" : H.visibility === "UNLISTED" ? "Not in the store, but share with anyone via a direct link. You can still submit for marketplace review later" : H.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"
488
+ 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"
488
489
  })]
489
490
  }),
490
- F !== "app" && /* @__PURE__ */ T("div", {
491
+ P !== "app" && /* @__PURE__ */ w("div", {
491
492
  className: "space-y-2",
492
493
  children: [
493
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("label", {
494
+ /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ w("label", {
494
495
  className: "block text-sm font-medium text-text-primary",
495
- children: ["Compatible Products", /* @__PURE__ */ w("span", {
496
+ children: ["Compatible Products", /* @__PURE__ */ C("span", {
496
497
  className: "text-status-error-text ml-1",
497
498
  children: "*"
498
499
  })]
499
- }), /* @__PURE__ */ T("p", {
500
+ }), /* @__PURE__ */ w("p", {
500
501
  className: "text-xs text-text-secondary mt-0.5",
501
502
  children: [
502
503
  "Select which products this ",
503
- F,
504
+ P,
504
505
  " works with. Users will see it in those products' node stores."
505
506
  ]
506
507
  })] }),
507
- /* @__PURE__ */ w("div", {
508
+ /* @__PURE__ */ C("div", {
508
509
  className: "flex flex-wrap gap-3",
509
- children: N.map((e) => {
510
- let n = L.includes(e.value);
511
- return /* @__PURE__ */ T("label", {
512
- 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", W.compatibleProducts && !n && "border-status-error-bg/50"),
510
+ children: ne.map((e) => {
511
+ let n = I.includes(e.value);
512
+ return /* @__PURE__ */ w("label", {
513
+ 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", U.compatibleProducts && !n && "border-status-error-bg/50"),
513
514
  children: [
514
- /* @__PURE__ */ w("input", {
515
+ /* @__PURE__ */ C("input", {
515
516
  type: "checkbox",
516
517
  className: "sr-only",
517
518
  checked: n,
518
519
  onChange: () => {
519
- R((t) => {
520
+ L((t) => {
520
521
  let r = n ? t.filter((t) => t !== e.value) : [...t, e.value];
521
- return r.length > 0 && G((e) => ({
522
+ return r.length > 0 && W((e) => ({
522
523
  ...e,
523
524
  compatibleProducts: void 0
524
525
  })), r;
525
526
  });
526
527
  }
527
528
  }),
528
- n && /* @__PURE__ */ w(_, {
529
+ n && /* @__PURE__ */ C(m, {
529
530
  size: 14,
530
531
  className: "text-primary flex-shrink-0"
531
532
  }),
@@ -534,15 +535,15 @@ var O = [
534
535
  }, e.value);
535
536
  })
536
537
  }),
537
- W.compatibleProducts && /* @__PURE__ */ w("p", {
538
+ U.compatibleProducts && /* @__PURE__ */ C("p", {
538
539
  className: "text-xs text-status-error-text",
539
- children: W.compatibleProducts
540
+ children: U.compatibleProducts
540
541
  })
541
542
  ]
542
543
  }),
543
- /* @__PURE__ */ w(d, {
544
+ /* @__PURE__ */ C(u, {
544
545
  label: "Full Description",
545
- value: H.description,
546
+ value: V.description,
546
547
  onChange: (e) => X("description", e),
547
548
  placeholder: "Detailed description, features, and use cases...",
548
549
  rows: 5,
@@ -551,89 +552,89 @@ var O = [
551
552
  ]
552
553
  })
553
554
  }),
554
- J.length > 2 && /* @__PURE__ */ w(o, {
555
+ J.length > 2 && /* @__PURE__ */ C(o, {
555
556
  title: "Organization",
556
557
  description: "Which developer organization owns this?",
557
- children: /* @__PURE__ */ w(c, {
558
+ children: /* @__PURE__ */ C(c, {
558
559
  label: "Developer Organization",
559
- value: H.developerOrganizationId,
560
+ value: V.developerOrganizationId,
560
561
  onChange: (e) => X("developerOrganizationId", e.target.value),
561
562
  options: J
562
563
  })
563
564
  }),
564
- F === "app" && /* @__PURE__ */ T(o, {
565
+ P === "app" && /* @__PURE__ */ w(o, {
565
566
  title: "Permissions",
566
567
  description: "Choose what data your app can access. Users will see these permissions when authorizing your app — like GitHub Apps.",
567
- children: [/* @__PURE__ */ w(M, {
568
- permissions: z,
568
+ children: [/* @__PURE__ */ C(M, {
569
+ permissions: R,
569
570
  onChange: Z
570
- }), /* @__PURE__ */ T("div", {
571
+ }), /* @__PURE__ */ w("div", {
571
572
  className: "mt-3 flex gap-2 rounded-lg border border-border-subtle bg-bg-sunken/30 p-3 text-xs text-text-secondary",
572
- children: [/* @__PURE__ */ w(b, {
573
+ children: [/* @__PURE__ */ C(_, {
573
574
  size: 14,
574
575
  className: "flex-shrink-0 mt-0.5"
575
- }), /* @__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."] })]
576
+ }), /* @__PURE__ */ w("span", { children: [/* @__PURE__ */ C("strong", { children: "Read & Write" }), " implies Read. Select only what your app genuinely needs — fewer permissions build more user trust."] })]
576
577
  })]
577
578
  }),
578
- F === "app" && /* @__PURE__ */ w(o, {
579
+ P === "app" && /* @__PURE__ */ C(o, {
579
580
  title: "Integration Setup",
580
581
  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.",
581
- children: /* @__PURE__ */ T("div", {
582
+ children: /* @__PURE__ */ w("div", {
582
583
  className: "space-y-4",
583
- children: [/* @__PURE__ */ w(s, {
584
+ children: [/* @__PURE__ */ C(s, {
584
585
  label: "Post-install Callback URL",
585
586
  type: "url",
586
- value: H.oauthAuthUrl,
587
+ value: V.oauthAuthUrl,
587
588
  onChange: (e) => X("oauthAuthUrl", e.target.value),
588
589
  placeholder: "https://yourapp.com/callback",
589
590
  hint: "Users land here after install with ?installation_id=xxx appended"
590
- }), /* @__PURE__ */ w(s, {
591
+ }), /* @__PURE__ */ C(s, {
591
592
  label: "Revoke URL",
592
593
  type: "url",
593
- value: H.oauthRevokeUrl,
594
+ value: V.oauthRevokeUrl,
594
595
  onChange: (e) => X("oauthRevokeUrl", e.target.value),
595
596
  placeholder: "https://yourapp.com/oauth/revoke",
596
597
  hint: "We POST to this URL when a user uninstalls your integration"
597
598
  })]
598
599
  })
599
600
  }),
600
- F !== "app" && /* @__PURE__ */ T("div", {
601
+ P !== "app" && /* @__PURE__ */ w("div", {
601
602
  className: "rounded-lg border border-border-subtle bg-bg-sunken/30 p-4 flex gap-3 text-sm text-text-secondary",
602
- children: [/* @__PURE__ */ w(b, {
603
+ children: [/* @__PURE__ */ C(_, {
603
604
  size: 16,
604
605
  className: "flex-shrink-0 mt-0.5"
605
- }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
606
+ }), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
606
607
  className: "font-medium text-text-primary",
607
608
  children: "File uploads"
608
- }), /* @__PURE__ */ w("p", {
609
+ }), /* @__PURE__ */ C("p", {
609
610
  className: "mt-1",
610
- children: F === "node" ? "After creating your Node, go to the Versions tab to upload your ZIP bundle and manifest.json." : "After creating your Workflow, go to the Versions tab to upload your manifest and workflow JSON definition."
611
+ children: P === "node" ? "After creating your Node, go to the Versions tab to upload your ZIP bundle and manifest.json." : "After creating your Workflow, go to the Versions tab to upload your manifest and workflow JSON definition."
611
612
  })] })]
612
613
  }),
613
- W._submit && /* @__PURE__ */ T("div", {
614
+ U._submit && /* @__PURE__ */ w("div", {
614
615
  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",
615
- children: [/* @__PURE__ */ w(b, {
616
+ children: [/* @__PURE__ */ C(_, {
616
617
  size: 16,
617
618
  className: "flex-shrink-0 mt-0.5"
618
- }), /* @__PURE__ */ w("span", { children: W._submit })]
619
+ }), /* @__PURE__ */ C("span", { children: U._submit })]
619
620
  }),
620
- /* @__PURE__ */ T("div", {
621
+ /* @__PURE__ */ w("div", {
621
622
  className: "flex items-center justify-end gap-3 border-t pt-6",
622
- children: [/* @__PURE__ */ T("button", {
623
+ children: [/* @__PURE__ */ w("button", {
623
624
  type: "button",
624
625
  onClick: () => Y("/apps"),
625
- disabled: q,
626
+ disabled: K,
626
627
  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",
627
- children: [/* @__PURE__ */ w(te, { size: 16 }), ie("devportal.cancel", "Cancel")]
628
- }), /* @__PURE__ */ w("button", {
628
+ children: [/* @__PURE__ */ C(x, { size: 16 }), ie("devportal.cancel", "Cancel")]
629
+ }), /* @__PURE__ */ C("button", {
629
630
  type: "submit",
630
- disabled: q,
631
+ disabled: K,
631
632
  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",
632
- children: q ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(x, {
633
+ children: K ? /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(v, {
633
634
  size: 16,
634
635
  className: "animate-spin"
635
- }), "Creating…"] }) : /* @__PURE__ */ T(C, { children: [
636
- /* @__PURE__ */ w(ee, { size: 16 }),
636
+ }), "Creating…"] }) : /* @__PURE__ */ w(S, { children: [
637
+ /* @__PURE__ */ C(b, { size: 16 }),
637
638
  "Create ",
638
639
  $
639
640
  ] })
@@ -645,6 +646,6 @@ var O = [
645
646
  });
646
647
  };
647
648
  //#endregion
648
- export { P as CreateApplicationPage };
649
+ export { N as CreateApplicationPage };
649
650
 
650
651
  //# sourceMappingURL=CreateApplicationPage.js.map