@burdenoff/microfe-devportal 2026.715.5 → 2026.715.6

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