@burdenoff/microfe-devportal 2026.1026.1 → 2026.1026.3

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