@burdenoff/microfe-devportal 2026.707.2 → 2026.713.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.
Files changed (28) hide show
  1. package/dist/devportal/AdminDevportalRoot.js +33 -27
  2. package/dist/devportal/AdminDevportalRoot.js.map +1 -1
  3. package/dist/devportal/AdminDevportalRoutes.js +9 -5
  4. package/dist/devportal/AdminDevportalRoutes.js.map +1 -1
  5. package/dist/devportal/DevportalRoutes.js +125 -105
  6. package/dist/devportal/DevportalRoutes.js.map +1 -1
  7. package/dist/devportal/pages/AdminOrganizationVerificationPage.js +169 -0
  8. package/dist/devportal/pages/AdminOrganizationVerificationPage.js.map +1 -0
  9. package/dist/devportal/pages/ApplicationVersionsPage.js +551 -320
  10. package/dist/devportal/pages/ApplicationVersionsPage.js.map +1 -1
  11. package/dist/devportal/pages/CreatePhysicalItemPage.js +494 -0
  12. package/dist/devportal/pages/CreatePhysicalItemPage.js.map +1 -0
  13. package/dist/devportal/pages/EditPhysicalItemPage.js +419 -0
  14. package/dist/devportal/pages/EditPhysicalItemPage.js.map +1 -0
  15. package/dist/devportal/pages/OrganizationDetailPage.js +441 -295
  16. package/dist/devportal/pages/OrganizationDetailPage.js.map +1 -1
  17. package/dist/devportal/pages/RevenueDashboardPage.js +72 -54
  18. package/dist/devportal/pages/RevenueDashboardPage.js.map +1 -1
  19. package/dist/devportal/pages/SellerDashboardPage.js +364 -0
  20. package/dist/devportal/pages/SellerDashboardPage.js.map +1 -0
  21. package/dist/devportal/pages/SellerItemsPage.js +533 -0
  22. package/dist/devportal/pages/SellerItemsPage.js.map +1 -0
  23. package/dist/devportal/pages/SellerOrdersPage.js +411 -0
  24. package/dist/devportal/pages/SellerOrdersPage.js.map +1 -0
  25. package/dist/devportal/types/index.js.map +1 -1
  26. package/dist/generated/global-operations.js +149 -149
  27. package/dist/generated/global-operations.js.map +1 -1
  28. package/package.json +1 -1
@@ -1,30 +1,30 @@
1
1
  import { useDevportal as e } from "../providers/DevportalProvider.js";
2
2
  import { EmptyState as t } from "../components/EmptyState.js";
3
- import { useApproveApplicationVersionMutation as n, useCreateApplicationVersionMutation as r, useDeprecateApplicationVersionMutation as ee, useGetApplicationQuery as te, useGetApplicationVersionsQuery as ne, usePublishApplicationVersionMutation as re, useRejectApplicationVersionMutation as ie } from "../../generated/global-operations.js";
3
+ import { useApproveApplicationVersionMutation as n, useCreateApplicationVersionMutation as r, useDeprecateApplicationVersionMutation as ee, useGetApplicationQuery as te, useGetApplicationVersionsQuery as ne, usePublishApplicationVersionMutation as re, useRejectApplicationVersionMutation as ie, useUpdateApplicationVersionMutation as ae } from "../../generated/global-operations.js";
4
4
  import { PageLayout as i } from "../components/PageLayout.js";
5
- import { StatusBadge as ae } from "../components/StatusBadge.js";
5
+ import { StatusBadge as oe } from "../components/StatusBadge.js";
6
6
  import { SelectionCheckbox as a } from "../components/SelectionCheckbox.js";
7
- import { DataTable as oe } from "../components/DataTable.js";
8
- import { InputField as se, TextareaField as ce } from "../components/FormField.js";
7
+ import { DataTable as se } from "../components/DataTable.js";
8
+ import { InputField as ce, TextareaField as le } from "../components/FormField.js";
9
9
  import { ConfirmDialog as o } from "../components/ConfirmDialog.js";
10
- import { PermissionGuard as le } from "../components/PermissionGuard.js";
10
+ import { PermissionGuard as ue } from "../components/PermissionGuard.js";
11
11
  import "../components/index.js";
12
12
  import { DEVPORTAL_PERMISSIONS as s } from "../constants/permissions.js";
13
13
  import { useDevportalPermission as c } from "../hooks/usePermission.js";
14
14
  import "../hooks/index.js";
15
- import ue from "../../node_modules/date-fns/format.js";
16
- import { usePackageUpload as de } from "../hooks/usePackageUpload.js";
17
- import { useCallback as l, useEffect as fe, useMemo as u, useRef as d, useState as f } from "react";
18
- import { useI18n as pe } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
19
- import { AlertCircle as p, Archive as me, CheckCircle as he, Clock as ge, Loader2 as _e, Package as ve, Plus as ye, Send as be, Upload as xe, XCircle as Se } from "lucide-react";
20
- import { useParams as Ce } from "react-router-dom";
21
- import { Fragment as we, jsx as m, jsxs as h } from "react/jsx-runtime";
15
+ import de from "../../node_modules/date-fns/format.js";
16
+ import { usePackageUpload as fe } from "../hooks/usePackageUpload.js";
17
+ import { useCallback as l, useEffect as pe, useMemo as u, useRef as d, useState as f } from "react";
18
+ import { useI18n as me } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
19
+ import { AlertCircle as p, Archive as he, CheckCircle as ge, Clock as _e, Loader2 as m, Package as ve, Plus as ye, Send as be, Upload as h, XCircle as xe } from "lucide-react";
20
+ import { useParams as Se } from "react-router-dom";
21
+ import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
22
22
  //#region src/devportal/pages/ApplicationVersionsPage.tsx
23
- var Te = () => {
24
- let { t: Te } = pe(), g = (e, t) => {
25
- let n = Te(e);
23
+ var Ce = () => {
24
+ let { t: Ce } = me(), y = (e, t) => {
25
+ let n = Ce(e);
26
26
  return n === e ? t : n;
27
- }, { allowed: Ee } = c(s.APP_VERSION_CREATE), { allowed: _ } = c(s.APP_VERSION_PUBLISH), { allowed: v } = c(s.APP_VERSION_DEPRECATE), { appId: y } = Ce(), { workspacesGatewayUrl: De, authToken: Oe, workspaceId: ke, getWorkspaceToken: Ae } = e(), { upload: b, uploading: x, progress: je, error: S } = de(De, Oe, ke, Ae), C = d(null), w = d(null), [T, E] = f(null), [D, O] = f(!1), [k, A] = f({
27
+ }, { allowed: b } = c(s.APP_VERSION_CREATE), { allowed: x } = c(s.APP_VERSION_PUBLISH), { allowed: S } = c(s.APP_VERSION_DEPRECATE), { appId: C } = Se(), { workspacesGatewayUrl: we, authToken: Te, workspaceId: Ee, getWorkspaceToken: De } = e(), { upload: w, uploading: T, progress: Oe, error: E } = fe(we, Te, Ee, De), ke = d(null), Ae = d(null), je = d(null), Me = d(null), [Ne, D] = f(null), [Pe, O] = f(null), [Fe, k] = f(!1), [A, j] = f(null), [M, N] = f({
28
28
  version: "",
29
29
  releaseNotes: "",
30
30
  changelog: "",
@@ -32,67 +32,82 @@ var Te = () => {
32
32
  packageSize: "",
33
33
  manifestJson: "",
34
34
  requiredScopes: ""
35
- }), [j, M] = f(null), [Me, N] = f(null), [P, F] = f(/* @__PURE__ */ new Set()), [I, Ne] = f(null), [L, R] = f(""), Pe = l((e) => {
35
+ }), [Ie, P] = f(null), [Le, F] = f(null), [I, L] = f(/* @__PURE__ */ new Set()), [R, Re] = f(null), [z, B] = f(""), ze = l((e) => {
36
36
  let t = e.target.files?.[0];
37
37
  if (!t) return;
38
38
  let n = new FileReader();
39
39
  n.onload = (e) => {
40
40
  let n = e.target?.result;
41
- typeof n == "string" && (A((e) => ({
41
+ typeof n == "string" && (N((e) => ({
42
42
  ...e,
43
43
  manifestJson: n
44
- })), E(t.name));
44
+ })), D(t.name));
45
45
  }, n.readAsText(t), e.target.value = "";
46
- }, []), [Fe, z] = f(null), { data: B } = te({
47
- variables: { id: y ?? "" },
48
- skip: !y,
46
+ }, []), [Be, V] = f(null), { data: H } = te({
47
+ variables: { id: C ?? "" },
48
+ skip: !C,
49
49
  fetchPolicy: "cache-first"
50
- }), V = B?.application?.appType === "WORKFLOW", H = B?.application?.appType === "NODE", Ie = !V && !H, U = B?.application, Le = U?.pricingDetails ?? {}, Re = U?.pricingType === "FREE" || U?.pricingType === "PAID" && typeof Le.price == "number" && Le.price > 0, ze = !!U?.shortDescription?.trim() && !!U?.privacyPolicyUrl?.trim() && !!U?.termsOfServiceUrl?.trim(), W = Re && ze, G = [...ze ? [] : ["Complete your store listing (short description, privacy policy, terms of service)"], ...Re ? [] : ["Set pricing in the Pricing tab"]];
51
- fe(() => {
52
- let e = B?.application?.name;
53
- if (!y || !e) return;
50
+ }), U = H?.application?.appType === "WORKFLOW", W = H?.application?.appType === "NODE", Ve = !U && !W, G = H?.application, He = G?.pricingDetails ?? {}, Ue = G?.pricingType === "FREE" || G?.pricingType === "PAID" && typeof He.price == "number" && He.price > 0, We = !!G?.shortDescription?.trim() && !!G?.privacyPolicyUrl?.trim() && !!G?.termsOfServiceUrl?.trim(), K = Ue && We, q = [...We ? [] : ["Complete your store listing (short description, privacy policy, terms of service)"], ...Ue ? [] : ["Set pricing in the Pricing tab"]];
51
+ pe(() => {
52
+ let e = H?.application?.name;
53
+ if (!C || !e) return;
54
54
  let t = window.__breadcrumbRegistry;
55
- return t?.register(y, e), () => t?.unregister(y);
56
- }, [y, B?.application?.name]);
57
- let { data: K, loading: Be, error: Ve } = ne({
58
- variables: { applicationId: y },
59
- skip: !y,
55
+ return t?.register(C, e), () => t?.unregister(C);
56
+ }, [C, H?.application?.name]);
57
+ let { data: J, loading: Ge, error: Ke } = ne({
58
+ variables: { applicationId: C },
59
+ skip: !C,
60
60
  fetchPolicy: "cache-and-network"
61
- }), [He, { loading: Ue }] = r({ refetchQueries: ["GetApplicationVersions"] }), [We] = re({ refetchQueries: ["GetApplicationVersions"] }), [Ge] = ee({ refetchQueries: ["GetApplicationVersions"] }), [Ke] = n({ refetchQueries: ["GetApplicationVersions"] }), [qe] = ie({ refetchQueries: ["GetApplicationVersions"] }), q = u(() => K?.application?.versions?.edges?.map((e) => e.node) ?? [], [K?.application?.versions]), J = u(() => q.filter((e) => P.has(e.id)), [q, P]), Y = u(() => J.filter((e) => e.status === "draft" || e.status === "rejected"), [J]), X = u(() => J.filter((e) => e.status?.toUpperCase() === "PUBLISHED" && !e.isLatest), [J]), Z = q.length > 0 && q.every((e) => P.has(e.id)), Je = q.some((e) => P.has(e.id)) && !Z, Ye = async () => {
62
- if (!y || !k.version.trim()) return;
63
- M(null);
61
+ }), [qe, { loading: Je }] = r({ refetchQueries: ["GetApplicationVersions"] }), [Ye, { loading: Xe }] = ae({ refetchQueries: ["GetApplicationVersions"] }), [Ze] = re({ refetchQueries: ["GetApplicationVersions"] }), [Qe] = ee({ refetchQueries: ["GetApplicationVersions"] }), [$e] = n({ refetchQueries: ["GetApplicationVersions"] }), [et] = ie({ refetchQueries: ["GetApplicationVersions"] }), Y = u(() => J?.application?.versions?.edges?.map((e) => e.node) ?? [], [J?.application?.versions]), X = u(() => Y.filter((e) => I.has(e.id)), [Y, I]), Z = u(() => X.filter((e) => e.status === "draft" || e.status === "rejected"), [X]), Q = u(() => X.filter((e) => e.status?.toUpperCase() === "PUBLISHED" && !e.isLatest), [X]), $ = Y.length > 0 && Y.every((e) => I.has(e.id)), tt = Y.some((e) => I.has(e.id)) && !$, nt = async () => {
62
+ if (!C || !M.version.trim()) return;
63
+ P(null);
64
64
  let e;
65
- if (V) {
66
- if (!k.manifestJson.trim()) {
67
- M("Workflow Definition (JSON) is required — paste the {nodes, edges} object.");
65
+ if (U) {
66
+ if (!M.manifestJson.trim()) {
67
+ P("Workflow Definition (JSON) is required — paste the {nodes, edges} object.");
68
68
  return;
69
69
  }
70
70
  try {
71
- e = JSON.parse(k.manifestJson);
71
+ e = JSON.parse(M.manifestJson);
72
72
  } catch {
73
- M("Invalid JSON in Workflow Definition — please check your input.");
73
+ P("Invalid JSON in Workflow Definition — please check your input.");
74
74
  return;
75
75
  }
76
- } else if (k.manifestJson.trim()) try {
77
- e = JSON.parse(k.manifestJson);
76
+ } else if (W) {
77
+ if (!M.packageUrl) {
78
+ P("Package zip is required for Node versions — upload a .zip file before creating.");
79
+ return;
80
+ }
81
+ if (!M.manifestJson.trim()) {
82
+ P("manifest.json is required for Node versions — upload or paste your manifest before creating.");
83
+ return;
84
+ }
85
+ try {
86
+ e = JSON.parse(M.manifestJson);
87
+ } catch {
88
+ P("Invalid JSON in manifest — please check your input.");
89
+ return;
90
+ }
91
+ } else if (M.manifestJson.trim()) try {
92
+ e = JSON.parse(M.manifestJson);
78
93
  } catch {
79
- M("Invalid JSON in manifest — please check your input.");
94
+ P("Invalid JSON in manifest — please check your input.");
80
95
  return;
81
96
  }
82
- let t = Ie && k.requiredScopes.trim() ? k.requiredScopes.split(",").map((e) => e.trim()).filter(Boolean) : void 0;
97
+ let t = Ve && M.requiredScopes.trim() ? M.requiredScopes.split(",").map((e) => e.trim()).filter(Boolean) : void 0;
83
98
  try {
84
- await He({ variables: {
85
- applicationId: y,
99
+ await qe({ variables: {
100
+ applicationId: C,
86
101
  input: {
87
- version: k.version,
88
- releaseNotes: k.releaseNotes || void 0,
89
- changelog: k.changelog || void 0,
90
- packageUrl: k.packageUrl || void 0,
91
- packageSize: k.packageSize || void 0,
102
+ version: M.version,
103
+ releaseNotes: M.releaseNotes || void 0,
104
+ changelog: M.changelog || void 0,
105
+ packageUrl: M.packageUrl || void 0,
106
+ packageSize: M.packageSize || void 0,
92
107
  manifest: e,
93
108
  requiredScopes: t
94
109
  }
95
- } }), O(!1), E(null), A({
110
+ } }), k(!1), D(null), N({
96
111
  version: "",
97
112
  releaseNotes: "",
98
113
  changelog: "",
@@ -100,273 +115,317 @@ var Te = () => {
100
115
  packageSize: "",
101
116
  manifestJson: "",
102
117
  requiredScopes: ""
103
- }), N(g("devportal.versionCreatedSuccess", "Version created successfully"));
118
+ }), F(y("devportal.versionCreatedSuccess", "Version created successfully"));
104
119
  } catch (e) {
105
- M(e instanceof Error ? e.message : g("devportal.versionCreateFailed", "Failed to create version"));
120
+ P(e instanceof Error ? e.message : y("devportal.versionCreateFailed", "Failed to create version"));
106
121
  }
107
- }, Xe = l(async (e) => {
122
+ }, rt = l(async (e) => {
108
123
  let t = e.target.files?.[0];
109
124
  if (t) {
110
125
  e.target.value = "";
111
126
  try {
112
- let e = await b(t);
113
- A((n) => ({
127
+ let e = await w(t);
128
+ N((n) => ({
114
129
  ...n,
115
130
  packageUrl: e.downloadUrl,
116
131
  packageSize: String(t.size)
117
132
  }));
118
133
  } catch {}
119
134
  }
120
- }, [b]), Ze = async (e) => {
121
- M(null), N(null);
135
+ }, [w]), it = l(async (e) => {
136
+ let t = e.target.files?.[0];
137
+ if (t) {
138
+ e.target.value = "";
139
+ try {
140
+ let e = await w(t);
141
+ j((n) => n && {
142
+ ...n,
143
+ newPackageUrl: e.downloadUrl,
144
+ newPackageSize: String(t.size)
145
+ });
146
+ } catch {}
147
+ }
148
+ }, [w]), at = l((e) => {
149
+ let t = e.target.files?.[0];
150
+ if (!t) return;
151
+ let n = new FileReader();
152
+ n.onload = (e) => {
153
+ let n = e.target?.result;
154
+ typeof n == "string" && (j((e) => e && {
155
+ ...e,
156
+ manifestJson: n
157
+ }), O(t.name));
158
+ }, n.readAsText(t), e.target.value = "";
159
+ }, []), ot = async () => {
160
+ if (!A) return;
161
+ P(null);
162
+ let e;
163
+ if (A.manifestJson.trim()) try {
164
+ e = JSON.parse(A.manifestJson);
165
+ } catch {
166
+ P("Invalid JSON in manifest — please check your input.");
167
+ return;
168
+ }
169
+ let t = {};
170
+ A.releaseNotes.trim() && (t.releaseNotes = A.releaseNotes), A.newPackageUrl && (t.packageUrl = A.newPackageUrl, t.packageSize = A.newPackageSize), e && (t.manifest = e);
122
171
  try {
123
- await We({ variables: { id: e } }), N(g("devportal.versionSubmittedSuccess", "Version submitted for review — you'll be notified when approved"));
172
+ await Ye({ variables: {
173
+ id: A.versionId,
174
+ input: t
175
+ } }), j(null), O(null), F(y("devportal.versionUpdatedSuccess", "Version updated successfully"));
124
176
  } catch (e) {
125
- M(e instanceof Error ? e.message : g("devportal.versionPublishFailed", "Failed to submit version for review"));
177
+ P(e instanceof Error ? e.message : y("devportal.versionUpdateFailed", "Failed to update version"));
126
178
  }
127
- }, Qe = async (e) => {
128
- M(null), N(null);
179
+ }, st = async (e) => {
180
+ P(null), F(null);
129
181
  try {
130
- await Ge({ variables: { id: e } }), N(g("devportal.versionDeprecatedSuccess", "Version deprecated successfully"));
182
+ await Ze({ variables: { id: e } }), F(y("devportal.versionSubmittedSuccess", "Version submitted for review — you'll be notified when approved"));
131
183
  } catch (e) {
132
- M(e instanceof Error ? e.message : g("devportal.versionDeprecateFailed", "Failed to deprecate version"));
184
+ P(e instanceof Error ? e.message : y("devportal.versionPublishFailed", "Failed to submit version for review"));
133
185
  }
134
- }, $e = async () => {
135
- if (!(!I || !L.trim())) {
136
- M(null), N(null);
186
+ }, ct = async (e) => {
187
+ P(null), F(null);
188
+ try {
189
+ await Qe({ variables: { id: e } }), F(y("devportal.versionDeprecatedSuccess", "Version deprecated successfully"));
190
+ } catch (e) {
191
+ P(e instanceof Error ? e.message : y("devportal.versionDeprecateFailed", "Failed to deprecate version"));
192
+ }
193
+ }, lt = async () => {
194
+ if (!(!R || !z.trim())) {
195
+ P(null), F(null);
137
196
  try {
138
- await qe({ variables: {
139
- id: I.versionId,
140
- reason: L
141
- } }), N(g("devportal.versionRejectedSuccess", "Version rejected — developer has been notified")), Ne(null), R("");
197
+ await et({ variables: {
198
+ id: R.versionId,
199
+ reason: z
200
+ } }), F(y("devportal.versionRejectedSuccess", "Version rejected — developer has been notified")), Re(null), B("");
142
201
  } catch (e) {
143
- M(e instanceof Error ? e.message : g("devportal.versionRejectFailed", "Failed to reject version"));
202
+ P(e instanceof Error ? e.message : y("devportal.versionRejectFailed", "Failed to reject version"));
144
203
  }
145
204
  }
146
- }, et = (e) => e.status === "published" && e.isLatest ? /* @__PURE__ */ m(he, {
205
+ }, ut = (e) => e.status === "published" && e.isLatest ? /* @__PURE__ */ _(ge, {
147
206
  size: 16,
148
207
  className: "text-status-success-text"
149
- }) : e.status === "pending_review" ? /* @__PURE__ */ m(be, {
208
+ }) : e.status === "pending_review" ? /* @__PURE__ */ _(be, {
150
209
  size: 16,
151
210
  className: "text-status-info-text"
152
- }) : e.status === "rejected" ? /* @__PURE__ */ m(Se, {
211
+ }) : e.status === "rejected" ? /* @__PURE__ */ _(xe, {
153
212
  size: 16,
154
213
  className: "text-status-error-text"
155
- }) : e.status === "draft" ? /* @__PURE__ */ m(ge, {
214
+ }) : e.status === "draft" ? /* @__PURE__ */ _(_e, {
156
215
  size: 16,
157
216
  className: "text-status-warning-text"
158
- }) : e.status === "deprecated" ? /* @__PURE__ */ m(me, {
217
+ }) : e.status === "deprecated" ? /* @__PURE__ */ _(he, {
159
218
  size: 16,
160
219
  className: "text-text-secondary"
161
- }) : /* @__PURE__ */ m(ve, {
220
+ }) : /* @__PURE__ */ _(ve, {
162
221
  size: 16,
163
222
  className: "text-accent-blue"
164
- }), tt = (e, t) => {
165
- F((n) => {
223
+ }), dt = (e, t) => {
224
+ L((n) => {
166
225
  let r = new Set(n);
167
226
  return t ? r.add(e) : r.delete(e), r;
168
227
  });
169
- }, Q = (e) => {
170
- F((t) => {
228
+ }, ft = (e) => {
229
+ L((t) => {
171
230
  let n = new Set(t);
172
- return q.forEach((t) => {
231
+ return Y.forEach((t) => {
173
232
  e ? n.add(t.id) : n.delete(t.id);
174
233
  }), n;
175
234
  });
176
- }, $ = () => F(/* @__PURE__ */ new Set());
177
- return Be && !K ? /* @__PURE__ */ m(i, {
178
- title: g("devportal.versionManagement", "Version Management"),
179
- description: g("devportal.versionManagementDescription", "Manage your application versions"),
180
- backLink: `/apps/${y}`,
181
- backLabel: g("devportal.backToApplication", "Back to Application"),
182
- children: /* @__PURE__ */ m("div", {
235
+ }, pt = () => L(/* @__PURE__ */ new Set());
236
+ return Ge && !J ? /* @__PURE__ */ _(i, {
237
+ title: y("devportal.versionManagement", "Version Management"),
238
+ description: y("devportal.versionManagementDescription", "Manage your application versions"),
239
+ backLink: `/apps/${C}`,
240
+ backLabel: y("devportal.backToApplication", "Back to Application"),
241
+ children: /* @__PURE__ */ _("div", {
183
242
  className: "flex items-center justify-center py-16",
184
- children: /* @__PURE__ */ m(_e, { className: "h-8 w-8 animate-spin text-text-secondary" })
243
+ children: /* @__PURE__ */ _(m, { className: "h-8 w-8 animate-spin text-text-secondary" })
185
244
  })
186
- }) : Ve && !K ? /* @__PURE__ */ m(i, {
187
- title: g("devportal.versionManagement", "Version Management"),
188
- description: g("devportal.versionManagementDescription", "Manage your application versions"),
189
- backLink: `/apps/${y}`,
190
- backLabel: g("devportal.backToApplication", "Back to Application"),
191
- children: /* @__PURE__ */ m(t, {
192
- icon: /* @__PURE__ */ m(p, {
245
+ }) : Ke && !J ? /* @__PURE__ */ _(i, {
246
+ title: y("devportal.versionManagement", "Version Management"),
247
+ description: y("devportal.versionManagementDescription", "Manage your application versions"),
248
+ backLink: `/apps/${C}`,
249
+ backLabel: y("devportal.backToApplication", "Back to Application"),
250
+ children: /* @__PURE__ */ _(t, {
251
+ icon: /* @__PURE__ */ _(p, {
193
252
  size: 32,
194
253
  className: "text-status-error-text"
195
254
  }),
196
- title: g("devportal.failedToLoadVersions", "Failed to load versions"),
197
- description: Ve.message || g("devportal.versionsLoadError", "An error occurred while loading versions")
255
+ title: y("devportal.failedToLoadVersions", "Failed to load versions"),
256
+ description: Ke.message || y("devportal.versionsLoadError", "An error occurred while loading versions")
198
257
  })
199
- }) : /* @__PURE__ */ m(le, {
258
+ }) : /* @__PURE__ */ _(ue, {
200
259
  permission: s.APP_READ,
201
- children: /* @__PURE__ */ h(i, {
202
- title: g("devportal.versionManagement", "Version Management"),
203
- description: g("devportal.versionManagementDescription", "Manage your application versions"),
204
- purpose: V ? g("devportal.versionManagementPurposeWorkflow", "Versions track releases of your workflow. Create a version for each significant change and paste the workflow definition JSON. No zip is needed — the manifest is the workflow.") : H ? g("devportal.versionManagementPurposeNode", "Versions are the releases of your node that users install. Upload a new zip whenever the node implementation changes, and update the manifest if the node's inputs, outputs, or operations change. Bump the version for any change users will see.") : g("devportal.versionManagementPurposeIntegration", "Versions track permission and webhook changes for your integration. No zip or manifest is needed — create a new version whenever you add or change required scopes so users can review and accept the updated permissions."),
205
- backLink: `/apps/${y}`,
206
- backLabel: g("devportal.backToApplication", "Back to Application"),
207
- actions: /* @__PURE__ */ h("button", {
208
- onClick: () => O(!0),
209
- disabled: !Ee,
210
- "aria-disabled": !Ee,
260
+ children: /* @__PURE__ */ v(i, {
261
+ title: y("devportal.versionManagement", "Version Management"),
262
+ description: y("devportal.versionManagementDescription", "Manage your application versions"),
263
+ purpose: U ? y("devportal.versionManagementPurposeWorkflow", "Versions track releases of your workflow. Create a version for each significant change and paste the workflow definition JSON. No zip is needed — the manifest is the workflow.") : W ? y("devportal.versionManagementPurposeNode", "Versions are the releases of your node that users install. Upload a new zip whenever the node implementation changes, and update the manifest if the node's inputs, outputs, or operations change. Bump the version for any change users will see.") : y("devportal.versionManagementPurposeIntegration", "Versions track permission and webhook changes for your integration. No zip or manifest is needed — create a new version whenever you add or change required scopes so users can review and accept the updated permissions."),
264
+ backLink: `/apps/${C}`,
265
+ backLabel: y("devportal.backToApplication", "Back to Application"),
266
+ actions: /* @__PURE__ */ v("button", {
267
+ onClick: () => k(!0),
268
+ disabled: !b,
269
+ "aria-disabled": !b,
211
270
  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 disabled:opacity-50",
212
- children: [/* @__PURE__ */ m(ye, { size: 16 }), g("devportal.newVersion", "New Version")]
271
+ children: [/* @__PURE__ */ _(ye, { size: 16 }), y("devportal.newVersion", "New Version")]
213
272
  }),
214
273
  children: [
215
- j && /* @__PURE__ */ h("div", {
274
+ Ie && /* @__PURE__ */ v("div", {
216
275
  className: "rounded-lg border border-border-subtle bg-status-error-bg-subtle p-3 flex items-center gap-2 text-sm text-status-error-text",
217
276
  children: [
218
- /* @__PURE__ */ m(p, {
277
+ /* @__PURE__ */ _(p, {
219
278
  size: 16,
220
279
  className: "flex-shrink-0"
221
280
  }),
222
- j,
223
- /* @__PURE__ */ m("button", {
224
- onClick: () => M(null),
281
+ Ie,
282
+ /* @__PURE__ */ _("button", {
283
+ onClick: () => P(null),
225
284
  className: "ml-auto text-status-error-text hover:text-status-error-text",
226
- children: g("devportal.dismiss", "Dismiss")
285
+ children: y("devportal.dismiss", "Dismiss")
227
286
  })
228
287
  ]
229
288
  }),
230
- Me && /* @__PURE__ */ h("div", {
289
+ Le && /* @__PURE__ */ v("div", {
231
290
  className: "rounded-lg border border-border-subtle bg-status-success-bg-subtle p-3 flex items-center gap-2 text-sm text-status-success-text",
232
291
  children: [
233
- /* @__PURE__ */ m(he, {
292
+ /* @__PURE__ */ _(ge, {
234
293
  size: 16,
235
294
  className: "flex-shrink-0"
236
295
  }),
237
- Me,
238
- /* @__PURE__ */ m("button", {
239
- onClick: () => N(null),
296
+ Le,
297
+ /* @__PURE__ */ _("button", {
298
+ onClick: () => F(null),
240
299
  className: "ml-auto text-status-success-text hover:text-status-success-text",
241
- children: g("devportal.dismiss", "Dismiss")
300
+ children: y("devportal.dismiss", "Dismiss")
242
301
  })
243
302
  ]
244
303
  }),
245
- U && !W && /* @__PURE__ */ h("div", {
304
+ G && !K && /* @__PURE__ */ v("div", {
246
305
  className: "flex items-start gap-3 rounded-lg border border-status-warning-bg bg-status-warning-bg-subtle px-4 py-3 text-sm text-status-warning-text",
247
- children: [/* @__PURE__ */ m(p, {
306
+ children: [/* @__PURE__ */ _(p, {
248
307
  size: 16,
249
308
  className: "mt-0.5 shrink-0"
250
- }), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
309
+ }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
251
310
  className: "font-medium",
252
311
  children: "Complete your app setup before submitting for review"
253
- }), /* @__PURE__ */ m("ul", {
312
+ }), /* @__PURE__ */ _("ul", {
254
313
  className: "mt-1 list-disc pl-4 text-xs opacity-80",
255
- children: G.map((e) => /* @__PURE__ */ m("li", { children: e }, e))
314
+ children: q.map((e) => /* @__PURE__ */ _("li", { children: e }, e))
256
315
  })] })]
257
316
  }),
258
- q.length > 0 && /* @__PURE__ */ m("div", {
317
+ Y.length > 0 && /* @__PURE__ */ _("div", {
259
318
  className: "rounded-card border border-border-seam bg-bg-surface p-4",
260
- children: /* @__PURE__ */ h("div", {
319
+ children: /* @__PURE__ */ v("div", {
261
320
  className: "flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",
262
- children: [/* @__PURE__ */ h("div", {
321
+ children: [/* @__PURE__ */ v("div", {
263
322
  className: "flex flex-wrap items-center gap-3",
264
- children: [/* @__PURE__ */ h("div", {
323
+ children: [/* @__PURE__ */ v("div", {
265
324
  className: "flex items-center gap-2",
266
- children: [/* @__PURE__ */ m(a, {
267
- checked: Z,
268
- indeterminate: Je,
269
- onChange: Q,
325
+ children: [/* @__PURE__ */ _(a, {
326
+ checked: $,
327
+ indeterminate: tt,
328
+ onChange: ft,
270
329
  ariaLabel: "Select all visible versions"
271
- }), /* @__PURE__ */ m("span", {
330
+ }), /* @__PURE__ */ _("span", {
272
331
  className: "text-sm font-medium",
273
- children: g("devportal.selectAllVisible", "Select all visible")
332
+ children: y("devportal.selectAllVisible", "Select all visible")
274
333
  })]
275
- }), P.size > 0 && /* @__PURE__ */ m("button", {
276
- onClick: $,
334
+ }), I.size > 0 && /* @__PURE__ */ _("button", {
335
+ onClick: pt,
277
336
  className: "text-sm text-text-secondary hover:text-text-primary",
278
- children: g("devportal.clearSelection", "Clear selection")
337
+ children: y("devportal.clearSelection", "Clear selection")
279
338
  })]
280
- }), /* @__PURE__ */ h("div", {
339
+ }), /* @__PURE__ */ v("div", {
281
340
  className: "flex flex-wrap items-center gap-2",
282
341
  children: [
283
- /* @__PURE__ */ h("span", {
342
+ /* @__PURE__ */ v("span", {
284
343
  className: "rounded-full bg-bg-sunken px-3 py-1 text-sm font-medium text-text-secondary",
285
- children: [P.size, " selected"]
344
+ children: [I.size, " selected"]
286
345
  }),
287
- /* @__PURE__ */ h("button", {
288
- onClick: () => z("publish"),
289
- disabled: Y.length === 0 || !_ || !W,
290
- "aria-disabled": !_ || !W,
291
- title: W ? void 0 : G.join(" · "),
346
+ /* @__PURE__ */ v("button", {
347
+ onClick: () => V("publish"),
348
+ disabled: Z.length === 0 || !x || !K,
349
+ "aria-disabled": !x || !K,
350
+ title: K ? void 0 : q.join(" · "),
292
351
  className: "rounded-md border border-status-success-bg px-3 py-2 text-sm font-medium text-status-success-text hover:bg-status-success-bg-subtle disabled:cursor-not-allowed disabled:opacity-50",
293
- children: [g("devportal.submitForReview", "Submit for Review"), Y.length > 0 ? ` (${Y.length})` : ""]
352
+ children: [y("devportal.submitForReview", "Submit for Review"), Z.length > 0 ? ` (${Z.length})` : ""]
294
353
  }),
295
- /* @__PURE__ */ h("button", {
296
- onClick: () => z("deprecate"),
297
- disabled: X.length === 0 || !v,
298
- "aria-disabled": !v,
354
+ /* @__PURE__ */ v("button", {
355
+ onClick: () => V("deprecate"),
356
+ disabled: Q.length === 0 || !S,
357
+ "aria-disabled": !S,
299
358
  className: "rounded-md border border-status-warning-bg px-3 py-2 text-sm font-medium text-status-warning-text hover:bg-status-warning-bg-subtle disabled:cursor-not-allowed disabled:opacity-50",
300
- children: [g("devportal.deprecateSelected", "Deprecate Selected"), X.length > 0 ? ` (${X.length})` : ""]
359
+ children: [y("devportal.deprecateSelected", "Deprecate Selected"), Q.length > 0 ? ` (${Q.length})` : ""]
301
360
  })
302
361
  ]
303
362
  })]
304
363
  })
305
364
  }),
306
- q.length > 0 ? /* @__PURE__ */ m(oe, {
307
- data: q,
365
+ Y.length > 0 ? /* @__PURE__ */ _(se, {
366
+ data: Y,
308
367
  keyField: "id",
309
368
  columns: [
310
369
  {
311
370
  key: "select",
312
- header: /* @__PURE__ */ m(a, {
313
- checked: Z,
314
- indeterminate: Je,
315
- onChange: Q,
371
+ header: /* @__PURE__ */ _(a, {
372
+ checked: $,
373
+ indeterminate: tt,
374
+ onChange: ft,
316
375
  ariaLabel: "Select all visible versions"
317
376
  }),
318
377
  className: "w-12",
319
- render: (e) => /* @__PURE__ */ m("div", {
378
+ render: (e) => /* @__PURE__ */ _("div", {
320
379
  onClick: (e) => e.stopPropagation(),
321
- children: /* @__PURE__ */ m(a, {
322
- checked: P.has(e.id),
323
- onChange: (t) => tt(e.id, t),
380
+ children: /* @__PURE__ */ _(a, {
381
+ checked: I.has(e.id),
382
+ onChange: (t) => dt(e.id, t),
324
383
  ariaLabel: `Select version ${e.version}`
325
384
  })
326
385
  })
327
386
  },
328
387
  {
329
388
  key: "version",
330
- header: g("devportal.version", "Version"),
331
- render: (e) => /* @__PURE__ */ h("div", {
389
+ header: y("devportal.version", "Version"),
390
+ render: (e) => /* @__PURE__ */ v("div", {
332
391
  className: "flex items-center gap-2",
333
392
  children: [
334
- et(e),
335
- /* @__PURE__ */ m("span", {
393
+ ut(e),
394
+ /* @__PURE__ */ _("span", {
336
395
  className: "font-mono font-medium",
337
396
  children: e.version
338
397
  }),
339
- e.isLatest && /* @__PURE__ */ m("span", {
398
+ e.isLatest && /* @__PURE__ */ _("span", {
340
399
  className: "rounded-full bg-status-success-bg-subtle px-2 py-0.5 text-xs text-status-success-text",
341
- children: g("devportal.latest", "Latest")
400
+ children: y("devportal.latest", "Latest")
342
401
  }),
343
- !e.isStable && /* @__PURE__ */ m("span", {
402
+ !e.isStable && /* @__PURE__ */ _("span", {
344
403
  className: "rounded-full bg-status-warning-bg-subtle px-2 py-0.5 text-xs text-status-warning-text",
345
- children: g("devportal.beta", "Beta")
404
+ children: y("devportal.beta", "Beta")
346
405
  })
347
406
  ]
348
407
  })
349
408
  },
350
409
  {
351
410
  key: "releaseNotes",
352
- header: g("devportal.releaseNotes", "Release Notes"),
353
- render: (e) => /* @__PURE__ */ m("p", {
411
+ header: y("devportal.releaseNotes", "Release Notes"),
412
+ render: (e) => /* @__PURE__ */ _("p", {
354
413
  className: "max-w-md truncate text-sm text-text-secondary",
355
- children: e.releaseNotes || g("devportal.noReleaseNotes", "No release notes")
414
+ children: e.releaseNotes || y("devportal.noReleaseNotes", "No release notes")
356
415
  })
357
416
  },
358
417
  {
359
418
  key: "status",
360
- header: g("devportal.status", "Status"),
361
- render: (e) => /* @__PURE__ */ h("div", {
419
+ header: y("devportal.status", "Status"),
420
+ render: (e) => /* @__PURE__ */ v("div", {
362
421
  className: "space-y-1",
363
422
  children: [
364
- /* @__PURE__ */ m(ae, { status: e.status === "pending_review" ? "In Review" : e.status }),
365
- e.status === "pending_review" && /* @__PURE__ */ m("p", {
423
+ /* @__PURE__ */ _(oe, { status: e.status === "pending_review" ? "In Review" : e.status }),
424
+ e.status === "pending_review" && /* @__PURE__ */ _("p", {
366
425
  className: "text-xs text-status-info-text",
367
426
  children: "Awaiting platform review"
368
427
  }),
369
- e.status === "rejected" && e.reviewNotes && /* @__PURE__ */ m("p", {
428
+ e.status === "rejected" && e.reviewNotes && /* @__PURE__ */ _("p", {
370
429
  className: "text-xs text-status-error-text max-w-xs",
371
430
  children: e.reviewNotes
372
431
  })
@@ -375,329 +434,501 @@ var Te = () => {
375
434
  },
376
435
  {
377
436
  key: "publishedAt",
378
- header: g("devportal.published", "Published"),
379
- render: (e) => e.publishedAt ? ue(new Date(e.publishedAt), "MMM d, yyyy") : "-"
437
+ header: y("devportal.published", "Published"),
438
+ render: (e) => e.publishedAt ? de(new Date(e.publishedAt), "MMM d, yyyy") : "-"
380
439
  },
381
440
  {
382
441
  key: "actions",
383
442
  header: "",
384
443
  className: "w-48",
385
- render: (e) => /* @__PURE__ */ h("div", {
444
+ render: (e) => /* @__PURE__ */ v("div", {
386
445
  className: "flex flex-wrap gap-2",
387
- children: [(e.status === "draft" || e.status === "rejected") && U?.status === "PUBLISHED" && /* @__PURE__ */ h("button", {
388
- className: "inline-flex items-center gap-1 text-xs text-primary hover:underline disabled:opacity-50 disabled:cursor-not-allowed",
389
- disabled: !_ || !W,
390
- "aria-disabled": !_ || !W,
391
- title: W ? void 0 : G.join(" · "),
392
- onClick: () => Ze(e.id),
393
- children: [/* @__PURE__ */ m(be, { size: 11 }), g("devportal.submitForReview", "Submit for Review")]
394
- }), e.status === "published" && !e.isLatest && /* @__PURE__ */ m("button", {
395
- className: "text-xs text-status-warning-text hover:underline disabled:opacity-50",
396
- disabled: !v,
397
- "aria-disabled": !v,
398
- onClick: () => Qe(e.id),
399
- children: g("devportal.deprecate", "Deprecate")
400
- })]
446
+ children: [
447
+ (e.status === "draft" || e.status === "rejected") && b && /* @__PURE__ */ _("button", {
448
+ className: "inline-flex items-center gap-1 text-xs text-text-secondary hover:text-text-primary hover:underline",
449
+ onClick: () => {
450
+ j({
451
+ versionId: e.id,
452
+ version: e.version,
453
+ hasExistingZip: !!e.packageUrl,
454
+ newPackageUrl: "",
455
+ newPackageSize: "",
456
+ manifestJson: "",
457
+ releaseNotes: e.releaseNotes ?? ""
458
+ }), O(null);
459
+ },
460
+ children: "Edit"
461
+ }),
462
+ (e.status === "draft" || e.status === "rejected") && G?.status === "PUBLISHED" && /* @__PURE__ */ v("button", {
463
+ className: "inline-flex items-center gap-1 text-xs text-primary hover:underline disabled:opacity-50 disabled:cursor-not-allowed",
464
+ disabled: !x || !K,
465
+ "aria-disabled": !x || !K,
466
+ title: K ? void 0 : q.join(" · "),
467
+ onClick: () => st(e.id),
468
+ children: [/* @__PURE__ */ _(be, { size: 11 }), y("devportal.submitForReview", "Submit for Review")]
469
+ }),
470
+ e.status === "published" && !e.isLatest && /* @__PURE__ */ _("button", {
471
+ className: "text-xs text-status-warning-text hover:underline disabled:opacity-50",
472
+ disabled: !S,
473
+ "aria-disabled": !S,
474
+ onClick: () => ct(e.id),
475
+ children: y("devportal.deprecate", "Deprecate")
476
+ })
477
+ ]
401
478
  })
402
479
  }
403
480
  ]
404
- }) : /* @__PURE__ */ m(t, {
481
+ }) : /* @__PURE__ */ _(t, {
405
482
  illustration: "empty-data",
406
- title: g("devportal.noVersionsYet", "No versions yet"),
407
- description: g("devportal.noVersionsYetDescription", "Create your first version to start distributing your app"),
408
- action: /* @__PURE__ */ h("button", {
409
- onClick: () => O(!0),
483
+ title: y("devportal.noVersionsYet", "No versions yet"),
484
+ description: y("devportal.noVersionsYetDescription", "Create your first version to start distributing your app"),
485
+ action: /* @__PURE__ */ v("button", {
486
+ onClick: () => k(!0),
410
487
  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",
411
- children: [/* @__PURE__ */ m(ye, { size: 16 }), g("devportal.createVersion", "Create Version")]
488
+ children: [/* @__PURE__ */ _(ye, { size: 16 }), y("devportal.createVersion", "Create Version")]
412
489
  })
413
490
  }),
414
- D && /* @__PURE__ */ m(o, {
415
- open: D,
416
- onOpenChange: O,
417
- onConfirm: Ye,
418
- title: g("devportal.createNewVersion", "Create New Version"),
419
- confirmLabel: Ue ? g("devportal.creating", "Creating...") : g("devportal.createVersion", "Create Version"),
420
- children: /* @__PURE__ */ h("div", {
491
+ Fe && /* @__PURE__ */ _(o, {
492
+ open: Fe,
493
+ onOpenChange: k,
494
+ onConfirm: nt,
495
+ title: y("devportal.createNewVersion", "Create New Version"),
496
+ confirmLabel: Je ? y("devportal.creating", "Creating...") : y("devportal.createVersion", "Create Version"),
497
+ children: /* @__PURE__ */ v("div", {
421
498
  className: "space-y-4",
422
499
  children: [
423
- /* @__PURE__ */ m(se, {
424
- label: g("devportal.versionNumber", "Version Number"),
425
- value: k.version,
426
- onChange: (e) => A({
427
- ...k,
500
+ /* @__PURE__ */ _(ce, {
501
+ label: y("devportal.versionNumber", "Version Number"),
502
+ value: M.version,
503
+ onChange: (e) => N({
504
+ ...M,
428
505
  version: e.target.value
429
506
  }),
430
507
  placeholder: "e.g., 2.2.0",
431
- hint: g("devportal.versionHint", "Use semantic versioning (major.minor.patch)"),
508
+ hint: y("devportal.versionHint", "Use semantic versioning (major.minor.patch)"),
432
509
  required: !0
433
510
  }),
434
- V && /* @__PURE__ */ h("div", {
511
+ U && /* @__PURE__ */ v("div", {
435
512
  className: "space-y-1",
436
513
  children: [
437
- /* @__PURE__ */ h("label", {
514
+ /* @__PURE__ */ v("label", {
438
515
  className: "text-sm font-medium",
439
516
  children: [
440
517
  "Workflow Definition (JSON)",
441
518
  " ",
442
- /* @__PURE__ */ m("span", {
519
+ /* @__PURE__ */ _("span", {
443
520
  className: "text-status-error-text",
444
521
  children: "*"
445
522
  })
446
523
  ]
447
524
  }),
448
- /* @__PURE__ */ m("textarea", {
525
+ /* @__PURE__ */ _("textarea", {
449
526
  rows: 10,
450
527
  required: !0,
451
528
  placeholder: "{\n \"nodes\": [],\n \"edges\": []\n}",
452
- value: k.manifestJson,
453
- onChange: (e) => A({
454
- ...k,
529
+ value: M.manifestJson,
530
+ onChange: (e) => N({
531
+ ...M,
455
532
  manifestJson: e.target.value
456
533
  }),
457
534
  className: "w-full rounded-md border bg-transparent px-3 py-2 text-xs font-mono resize-y placeholder:text-text-secondary focus:outline-none focus:ring-1 focus:ring-[var(--color-focus-ring)]"
458
535
  }),
459
- /* @__PURE__ */ h("p", {
536
+ /* @__PURE__ */ v("p", {
460
537
  className: "text-xs text-text-secondary",
461
538
  children: [
462
539
  "Paste the full ",
463
- /* @__PURE__ */ m("code", { children: "{nodes, edges}" }),
540
+ /* @__PURE__ */ _("code", { children: "{nodes, edges}" }),
464
541
  " JSON. Saved as this version's manifest — no zip needed."
465
542
  ]
466
543
  })
467
544
  ]
468
545
  }),
469
- H && /* @__PURE__ */ h("div", {
546
+ W && /* @__PURE__ */ v("div", {
470
547
  className: "space-y-1",
471
548
  children: [
472
- /* @__PURE__ */ h("label", {
549
+ /* @__PURE__ */ v("label", {
473
550
  className: "text-sm font-medium",
474
551
  children: [
475
552
  "Package (.zip)",
476
553
  " ",
477
- /* @__PURE__ */ m("span", {
554
+ /* @__PURE__ */ _("span", {
478
555
  className: "text-status-error-text",
479
556
  children: "*"
480
557
  })
481
558
  ]
482
559
  }),
483
- /* @__PURE__ */ h("div", {
560
+ /* @__PURE__ */ v("div", {
484
561
  className: "flex gap-2 items-center",
485
562
  children: [
486
- /* @__PURE__ */ m("input", {
487
- ref: C,
563
+ /* @__PURE__ */ _("input", {
564
+ ref: ke,
488
565
  type: "file",
489
566
  accept: ".zip",
490
567
  className: "hidden",
491
- onChange: Xe
568
+ onChange: rt
492
569
  }),
493
- /* @__PURE__ */ m("button", {
570
+ /* @__PURE__ */ _("button", {
494
571
  type: "button",
495
- disabled: x,
496
- onClick: () => C.current?.click(),
572
+ disabled: T,
573
+ onClick: () => ke.current?.click(),
497
574
  className: "inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-sm font-medium hover:bg-bg-sunken transition-colors disabled:opacity-50",
498
- children: x ? /* @__PURE__ */ h(we, { children: [
499
- /* @__PURE__ */ m(_e, {
575
+ children: T ? /* @__PURE__ */ v(g, { children: [
576
+ /* @__PURE__ */ _(m, {
500
577
  size: 14,
501
578
  className: "animate-spin"
502
579
  }),
503
580
  " ",
504
581
  "Uploading… ",
505
- je,
582
+ Oe,
506
583
  "%"
507
- ] }) : /* @__PURE__ */ h(we, { children: [
508
- /* @__PURE__ */ m(xe, { size: 14 }),
584
+ ] }) : /* @__PURE__ */ v(g, { children: [
585
+ /* @__PURE__ */ _(h, { size: 14 }),
509
586
  " ",
510
- k.packageUrl ? "Replace zip" : "Upload zip"
587
+ M.packageUrl ? "Replace zip" : "Upload zip"
511
588
  ] })
512
589
  }),
513
- k.packageUrl && !x && /* @__PURE__ */ m("span", {
590
+ M.packageUrl && !T && /* @__PURE__ */ _("span", {
514
591
  className: "text-xs text-status-success-text",
515
592
  children: "✓ Uploaded"
516
593
  })
517
594
  ]
518
595
  }),
519
- S && /* @__PURE__ */ m("p", {
596
+ E && /* @__PURE__ */ _("p", {
520
597
  className: "text-xs text-status-error-text",
521
- children: S
598
+ children: E
522
599
  }),
523
- /* @__PURE__ */ m("p", {
600
+ /* @__PURE__ */ _("p", {
524
601
  className: "text-xs text-text-tertiary",
525
602
  children: "The zip is the node executable. Upload it before publishing — users install exactly this artifact."
526
603
  })
527
604
  ]
528
605
  }),
529
- H && /* @__PURE__ */ h("div", {
606
+ W && /* @__PURE__ */ v("div", {
530
607
  className: "space-y-2",
531
608
  children: [
532
- /* @__PURE__ */ h("div", {
609
+ /* @__PURE__ */ v("div", {
533
610
  className: "flex items-center justify-between gap-2 flex-wrap",
534
- children: [/* @__PURE__ */ h("label", {
611
+ children: [/* @__PURE__ */ v("label", {
535
612
  className: "text-sm font-medium",
536
613
  children: [
537
614
  "manifest.json",
538
615
  " ",
539
- /* @__PURE__ */ m("span", {
540
- className: "text-xs font-normal text-text-secondary",
541
- children: "(optional)"
616
+ /* @__PURE__ */ _("span", {
617
+ className: "text-status-error-text",
618
+ children: "*"
542
619
  })
543
620
  ]
544
- }), /* @__PURE__ */ h("div", {
621
+ }), /* @__PURE__ */ v("div", {
545
622
  className: "flex items-center gap-2",
546
623
  children: [
547
- T && /* @__PURE__ */ h("span", {
624
+ Ne && /* @__PURE__ */ v("span", {
548
625
  className: "text-xs text-status-success-text",
549
- children: ["✓ ", T]
626
+ children: ["✓ ", Ne]
550
627
  }),
551
- /* @__PURE__ */ m("input", {
552
- ref: w,
628
+ /* @__PURE__ */ _("input", {
629
+ ref: Ae,
553
630
  type: "file",
554
631
  accept: ".json,application/json",
555
632
  className: "hidden",
556
- onChange: Pe
633
+ onChange: ze
557
634
  }),
558
- /* @__PURE__ */ h("button", {
635
+ /* @__PURE__ */ v("button", {
559
636
  type: "button",
560
- onClick: () => w.current?.click(),
637
+ onClick: () => Ae.current?.click(),
561
638
  className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-2.5 py-1 text-xs font-medium hover:bg-bg-sunken transition-colors",
562
- children: [/* @__PURE__ */ m(xe, { size: 12 }), "Upload manifest.json"]
639
+ children: [/* @__PURE__ */ _(h, { size: 12 }), "Upload manifest.json"]
563
640
  })
564
641
  ]
565
642
  })]
566
643
  }),
567
- /* @__PURE__ */ m("textarea", {
644
+ /* @__PURE__ */ _("textarea", {
568
645
  rows: 5,
569
646
  placeholder: "{\n \"manifestVersion\": \"1.0\",\n \"itemType\": \"node\",\n \"identity\": { \"version\": \"1.0.0\", \"displayName\": \"My Node\" }\n}",
570
- value: k.manifestJson,
647
+ value: M.manifestJson,
571
648
  onChange: (e) => {
572
- E(null), A({
573
- ...k,
649
+ D(null), N({
650
+ ...M,
574
651
  manifestJson: e.target.value
575
652
  });
576
653
  },
577
654
  className: "w-full rounded-md border bg-transparent px-3 py-2 text-xs font-mono resize-y placeholder:text-text-secondary focus:outline-none focus:ring-1 focus:ring-[var(--color-focus-ring)]"
578
655
  }),
579
- /* @__PURE__ */ h("p", {
656
+ /* @__PURE__ */ v("p", {
580
657
  className: "text-xs text-text-tertiary",
581
658
  children: [
582
659
  "Upload or paste your ",
583
- /* @__PURE__ */ m("code", { children: "manifest.json" }),
584
- " — update it whenever inputs, outputs, or operations change. The platform does not extract it from the zip automatically."
660
+ /* @__PURE__ */ _("code", { children: "manifest.json" }),
661
+ " — required so the platform knows your node's inputs, outputs, and operations. Not extracted from the zip automatically."
585
662
  ]
586
663
  })
587
664
  ]
588
665
  }),
589
- Ie && /* @__PURE__ */ h("div", {
666
+ Ve && /* @__PURE__ */ v("div", {
590
667
  className: "space-y-1",
591
668
  children: [
592
- /* @__PURE__ */ h("label", {
669
+ /* @__PURE__ */ v("label", {
593
670
  className: "text-sm font-medium",
594
671
  children: [
595
672
  "Required scopes",
596
673
  " ",
597
- /* @__PURE__ */ m("span", {
674
+ /* @__PURE__ */ _("span", {
598
675
  className: "text-xs font-normal text-text-secondary",
599
676
  children: "(optional)"
600
677
  })
601
678
  ]
602
679
  }),
603
- /* @__PURE__ */ m("input", {
680
+ /* @__PURE__ */ _("input", {
604
681
  type: "text",
605
- value: k.requiredScopes,
606
- onChange: (e) => A({
607
- ...k,
682
+ value: M.requiredScopes,
683
+ onChange: (e) => N({
684
+ ...M,
608
685
  requiredScopes: e.target.value
609
686
  }),
610
687
  placeholder: "e.g. read:contacts, write:messages",
611
688
  className: "w-full rounded-md border bg-transparent px-3 py-2 text-sm placeholder:text-text-secondary focus:outline-none focus:ring-1 focus:ring-[var(--color-focus-ring)]"
612
689
  }),
613
- /* @__PURE__ */ m("p", {
690
+ /* @__PURE__ */ _("p", {
614
691
  className: "text-xs text-text-tertiary",
615
692
  children: "Comma-separated. List every permission this version needs — users will be prompted to accept any new or changed scopes on update."
616
693
  })
617
694
  ]
618
695
  }),
619
- /* @__PURE__ */ m(ce, {
620
- label: g("devportal.releaseNotes", "Release Notes"),
621
- value: k.releaseNotes,
622
- onChange: (e) => A({
623
- ...k,
696
+ /* @__PURE__ */ _(le, {
697
+ label: y("devportal.releaseNotes", "Release Notes"),
698
+ value: M.releaseNotes,
699
+ onChange: (e) => N({
700
+ ...M,
624
701
  releaseNotes: e.target.value
625
702
  }),
626
- placeholder: g("devportal.releaseNotesPlaceholder", "What changed in this release?"),
703
+ placeholder: y("devportal.releaseNotesPlaceholder", "What changed in this release?"),
627
704
  rows: 2
628
705
  })
629
706
  ]
630
707
  })
631
708
  }),
632
- I && /* @__PURE__ */ m(o, {
633
- open: !!I,
709
+ R && /* @__PURE__ */ _(o, {
710
+ open: !!R,
634
711
  onOpenChange: (e) => {
635
- e || (Ne(null), R(""));
712
+ e || (Re(null), B(""));
636
713
  },
637
- onConfirm: $e,
638
- title: `Reject version ${I.version}`,
714
+ onConfirm: lt,
715
+ title: `Reject version ${R.version}`,
639
716
  confirmLabel: "Reject Version",
640
- cancelLabel: g("devportal.cancel", "Cancel"),
717
+ cancelLabel: y("devportal.cancel", "Cancel"),
641
718
  variant: "danger",
642
- children: /* @__PURE__ */ h("div", {
719
+ children: /* @__PURE__ */ v("div", {
643
720
  className: "space-y-3",
644
- children: [/* @__PURE__ */ m("p", {
721
+ children: [/* @__PURE__ */ _("p", {
645
722
  className: "text-sm text-text-secondary",
646
723
  children: "The developer will be notified and can fix and resubmit. Please provide a clear reason."
647
- }), /* @__PURE__ */ h("div", {
724
+ }), /* @__PURE__ */ v("div", {
648
725
  className: "space-y-1",
649
- children: [/* @__PURE__ */ h("label", {
726
+ children: [/* @__PURE__ */ v("label", {
650
727
  className: "text-sm font-medium",
651
728
  children: [
652
729
  "Rejection reason",
653
730
  " ",
654
- /* @__PURE__ */ m("span", {
731
+ /* @__PURE__ */ _("span", {
655
732
  className: "text-status-error-text",
656
733
  children: "*"
657
734
  })
658
735
  ]
659
- }), /* @__PURE__ */ m("textarea", {
736
+ }), /* @__PURE__ */ _("textarea", {
660
737
  rows: 3,
661
- value: L,
662
- onChange: (e) => R(e.target.value),
738
+ value: z,
739
+ onChange: (e) => B(e.target.value),
663
740
  placeholder: "e.g. Manifest contains disallowed network calls to external domains...",
664
741
  className: "w-full rounded-md border bg-transparent px-3 py-2 text-sm placeholder:text-text-secondary focus:outline-none focus:ring-1 focus:ring-[var(--color-focus-ring)]"
665
742
  })]
666
743
  })]
667
744
  })
668
745
  }),
669
- /* @__PURE__ */ m(o, {
670
- open: Fe === "publish",
746
+ A && /* @__PURE__ */ _(o, {
747
+ open: !!A,
748
+ onOpenChange: (e) => {
749
+ e || (j(null), O(null));
750
+ },
751
+ onConfirm: ot,
752
+ title: `Edit Version ${A.version}`,
753
+ confirmLabel: Xe ? "Saving…" : "Save Changes",
754
+ children: /* @__PURE__ */ v("div", {
755
+ className: "space-y-4",
756
+ children: [
757
+ /* @__PURE__ */ _("div", {
758
+ className: "rounded-lg border border-status-info-bg bg-status-info-bg-subtle px-3 py-2 text-xs text-status-info-text",
759
+ children: "You can fix the zip, manifest, or release notes before submitting for review. Once submitted for review these fields are locked."
760
+ }),
761
+ W && /* @__PURE__ */ v("div", {
762
+ className: "space-y-1",
763
+ children: [
764
+ /* @__PURE__ */ _("label", {
765
+ className: "text-sm font-medium",
766
+ children: "Package (.zip)"
767
+ }),
768
+ /* @__PURE__ */ v("div", {
769
+ className: "flex gap-2 items-center",
770
+ children: [
771
+ /* @__PURE__ */ _("input", {
772
+ ref: je,
773
+ type: "file",
774
+ accept: ".zip",
775
+ className: "hidden",
776
+ onChange: it
777
+ }),
778
+ /* @__PURE__ */ _("button", {
779
+ type: "button",
780
+ disabled: T,
781
+ onClick: () => je.current?.click(),
782
+ className: "inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-sm font-medium hover:bg-bg-sunken transition-colors disabled:opacity-50",
783
+ children: T ? /* @__PURE__ */ v(g, { children: [
784
+ /* @__PURE__ */ _(m, {
785
+ size: 14,
786
+ className: "animate-spin"
787
+ }),
788
+ " Uploading… ",
789
+ Oe,
790
+ "%"
791
+ ] }) : /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(h, { size: 14 }), A.newPackageUrl ? "Replace zip again" : A.hasExistingZip ? "Replace zip" : "Upload zip"] })
792
+ }),
793
+ A.newPackageUrl && !T && /* @__PURE__ */ _("span", {
794
+ className: "text-xs text-status-success-text",
795
+ children: "✓ New zip ready"
796
+ }),
797
+ !A.newPackageUrl && A.hasExistingZip && /* @__PURE__ */ _("span", {
798
+ className: "text-xs text-text-secondary",
799
+ children: "Current zip kept"
800
+ })
801
+ ]
802
+ }),
803
+ E && /* @__PURE__ */ _("p", {
804
+ className: "text-xs text-status-error-text",
805
+ children: E
806
+ })
807
+ ]
808
+ }),
809
+ W && /* @__PURE__ */ v("div", {
810
+ className: "space-y-2",
811
+ children: [/* @__PURE__ */ v("div", {
812
+ className: "flex items-center justify-between gap-2 flex-wrap",
813
+ children: [/* @__PURE__ */ v("label", {
814
+ className: "text-sm font-medium",
815
+ children: [
816
+ "manifest.json",
817
+ " ",
818
+ /* @__PURE__ */ _("span", {
819
+ className: "text-xs font-normal text-text-secondary",
820
+ children: "(leave empty to keep existing)"
821
+ })
822
+ ]
823
+ }), /* @__PURE__ */ v("div", {
824
+ className: "flex items-center gap-2",
825
+ children: [
826
+ Pe && /* @__PURE__ */ v("span", {
827
+ className: "text-xs text-status-success-text",
828
+ children: ["✓ ", Pe]
829
+ }),
830
+ /* @__PURE__ */ _("input", {
831
+ ref: Me,
832
+ type: "file",
833
+ accept: ".json,application/json",
834
+ className: "hidden",
835
+ onChange: at
836
+ }),
837
+ /* @__PURE__ */ v("button", {
838
+ type: "button",
839
+ onClick: () => Me.current?.click(),
840
+ className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-2.5 py-1 text-xs font-medium hover:bg-bg-sunken transition-colors",
841
+ children: [/* @__PURE__ */ _(h, { size: 12 }), " Upload manifest.json"]
842
+ })
843
+ ]
844
+ })]
845
+ }), /* @__PURE__ */ _("textarea", {
846
+ rows: 5,
847
+ placeholder: "{\n \"manifestVersion\": \"1.0\",\n \"itemType\": \"node\",\n \"identity\": { \"version\": \"1.0.0\", \"displayName\": \"My Node\" }\n}",
848
+ value: A.manifestJson,
849
+ onChange: (e) => {
850
+ O(null), j((t) => t && {
851
+ ...t,
852
+ manifestJson: e.target.value
853
+ });
854
+ },
855
+ className: "w-full rounded-md border bg-transparent px-3 py-2 text-xs font-mono resize-y placeholder:text-text-secondary focus:outline-none focus:ring-1 focus:ring-[var(--color-focus-ring)]"
856
+ })]
857
+ }),
858
+ U && /* @__PURE__ */ v("div", {
859
+ className: "space-y-1",
860
+ children: [/* @__PURE__ */ v("label", {
861
+ className: "text-sm font-medium",
862
+ children: [
863
+ "Workflow Definition (JSON)",
864
+ " ",
865
+ /* @__PURE__ */ _("span", {
866
+ className: "text-xs font-normal text-text-secondary",
867
+ children: "(leave empty to keep existing)"
868
+ })
869
+ ]
870
+ }), /* @__PURE__ */ _("textarea", {
871
+ rows: 10,
872
+ placeholder: "{\n \"nodes\": [],\n \"edges\": []\n}",
873
+ value: A.manifestJson,
874
+ onChange: (e) => j((t) => t && {
875
+ ...t,
876
+ manifestJson: e.target.value
877
+ }),
878
+ className: "w-full rounded-md border bg-transparent px-3 py-2 text-xs font-mono resize-y placeholder:text-text-secondary focus:outline-none focus:ring-1 focus:ring-[var(--color-focus-ring)]"
879
+ })]
880
+ }),
881
+ /* @__PURE__ */ v("div", {
882
+ className: "space-y-1",
883
+ children: [/* @__PURE__ */ _("label", {
884
+ className: "text-sm font-medium",
885
+ children: "Release Notes"
886
+ }), /* @__PURE__ */ _("textarea", {
887
+ rows: 2,
888
+ value: A.releaseNotes,
889
+ onChange: (e) => j((t) => t && {
890
+ ...t,
891
+ releaseNotes: e.target.value
892
+ }),
893
+ placeholder: "What changed in this release?",
894
+ className: "w-full rounded-md border bg-transparent px-3 py-2 text-sm placeholder:text-text-secondary focus:outline-none focus:ring-1 focus:ring-[var(--color-focus-ring)]"
895
+ })]
896
+ })
897
+ ]
898
+ })
899
+ }),
900
+ /* @__PURE__ */ _(o, {
901
+ open: Be === "publish",
671
902
  onOpenChange: (e) => {
672
- e || z(null);
903
+ e || V(null);
673
904
  },
674
905
  onConfirm: async () => {
675
- if (Y.length === 0) return;
676
- M(null);
677
- let e = await Promise.allSettled(Y.map((e) => We({ variables: { id: e.id } }))), t = e.filter((e) => e.status === "fulfilled").length, n = e.length - t;
678
- N(`Published ${t} version${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`), $(), z(null);
906
+ if (Z.length === 0) return;
907
+ P(null);
908
+ let e = await Promise.allSettled(Z.map((e) => Ze({ variables: { id: e.id } }))), t = e.filter((e) => e.status === "fulfilled").length, n = e.length - t;
909
+ F(`Published ${t} version${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`), pt(), V(null);
679
910
  },
680
- title: g("devportal.submitSelectedVersions", "Submit selected versions for review"),
681
- description: `Submit ${Y.length} selected version${Y.length === 1 ? "" : "s"} for platform review?`,
682
- confirmLabel: g("devportal.submitForReview", "Submit for Review"),
683
- cancelLabel: g("devportal.cancel", "Cancel"),
911
+ title: y("devportal.submitSelectedVersions", "Submit selected versions for review"),
912
+ description: `Submit ${Z.length} selected version${Z.length === 1 ? "" : "s"} for platform review?`,
913
+ confirmLabel: y("devportal.submitForReview", "Submit for Review"),
914
+ cancelLabel: y("devportal.cancel", "Cancel"),
684
915
  variant: "success"
685
916
  }),
686
- /* @__PURE__ */ m(o, {
687
- open: Fe === "deprecate",
917
+ /* @__PURE__ */ _(o, {
918
+ open: Be === "deprecate",
688
919
  onOpenChange: (e) => {
689
- e || z(null);
920
+ e || V(null);
690
921
  },
691
922
  onConfirm: async () => {
692
- if (X.length === 0) return;
693
- M(null);
694
- let e = await Promise.allSettled(X.map((e) => Ge({ variables: { id: e.id } }))), t = e.filter((e) => e.status === "fulfilled").length, n = e.length - t;
695
- N(`Deprecated ${t} version${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`), $(), z(null);
923
+ if (Q.length === 0) return;
924
+ P(null);
925
+ let e = await Promise.allSettled(Q.map((e) => Qe({ variables: { id: e.id } }))), t = e.filter((e) => e.status === "fulfilled").length, n = e.length - t;
926
+ F(`Deprecated ${t} version${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`), pt(), V(null);
696
927
  },
697
- title: g("devportal.deprecateSelectedVersions", "Deprecate selected versions"),
698
- description: `${g("devportal.deprecate", "Deprecate")} ${X.length} selected version${X.length === 1 ? "" : "s"}? ${g("devportal.deprecateVersionsWarning", "Deprecated versions remain visible but should no longer be promoted.")}`,
699
- confirmLabel: g("devportal.deprecate", "Deprecate"),
700
- cancelLabel: g("devportal.cancel", "Cancel"),
928
+ title: y("devportal.deprecateSelectedVersions", "Deprecate selected versions"),
929
+ description: `${y("devportal.deprecate", "Deprecate")} ${Q.length} selected version${Q.length === 1 ? "" : "s"}? ${y("devportal.deprecateVersionsWarning", "Deprecated versions remain visible but should no longer be promoted.")}`,
930
+ confirmLabel: y("devportal.deprecate", "Deprecate"),
931
+ cancelLabel: y("devportal.cancel", "Cancel"),
701
932
  variant: "warning"
702
933
  })
703
934
  ]
@@ -705,6 +936,6 @@ var Te = () => {
705
936
  });
706
937
  };
707
938
  //#endregion
708
- export { Te as ApplicationVersionsPage };
939
+ export { Ce as ApplicationVersionsPage };
709
940
 
710
941
  //# sourceMappingURL=ApplicationVersionsPage.js.map