@burdenoff/microfe-devportal 2026.1026.2 → 2026.1026.4

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,415 @@ 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
+ let t = await pt({ variables: { id: e } });
209
+ if (t.error || !t.data?.publishApplicationVersion) throw t.error ?? Error(b("devportal.versionPublishFailed", "Failed to submit version for review"));
210
+ F(b("devportal.versionSubmittedSuccess", "Version submitted for review — you'll be notified when approved"));
203
211
  } catch (e) {
204
- j(e instanceof Error ? e.message : v("devportal.versionPublishFailed", "Failed to submit version for review"));
212
+ P(e instanceof Error ? e.message : b("devportal.versionPublishFailed", "Failed to submit version for review"));
205
213
  }
206
- }, vt = async (e) => {
207
- j(null), M(null);
214
+ }, Et = async () => {
215
+ let e = $e;
216
+ if (et(null), !(!e || !w)) {
217
+ P(null), F(null);
218
+ try {
219
+ let t = await mt({ variables: {
220
+ id: e.id,
221
+ workspaceId: w
222
+ } });
223
+ if (t.error || !t.data?.publishApplicationVersionToOrganization) throw t.error ?? Error(b("devportal.versionPublishToOrganizationFailed", "Failed to publish the version to your organization"));
224
+ F(b("devportal.versionPublishedToOrganizationSuccess", "Version published to your organization. Workspace admins in your organization can now install it."));
225
+ } catch (e) {
226
+ P(e instanceof Error ? e.message : b("devportal.versionPublishToOrganizationFailed", "Failed to publish the version to your organization"));
227
+ }
228
+ }
229
+ }, Dt = async (e) => {
230
+ P(null), F(null);
208
231
  try {
209
- await st({ variables: { id: e } }), M(v("devportal.versionDeprecatedSuccess", "Version deprecated successfully"));
232
+ await gt({ variables: { id: e } }), F(b("devportal.versionDeprecatedSuccess", "Version deprecated successfully"));
210
233
  } catch (e) {
211
- j(e instanceof Error ? e.message : v("devportal.versionDeprecateFailed", "Failed to deprecate version"));
234
+ P(e instanceof Error ? e.message : b("devportal.versionDeprecateFailed", "Failed to deprecate version"));
212
235
  }
213
- }, yt = async () => {
214
- if (!(!L || !R.trim())) {
215
- j(null), M(null);
236
+ }, Ot = async () => {
237
+ if (!(!z || !Ye.trim())) {
238
+ P(null), F(null);
216
239
  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("");
240
+ await vt({ variables: {
241
+ id: z.versionId,
242
+ reason: Ye
243
+ } }), F(b("devportal.versionRejectedSuccess", "Version rejected — developer has been notified")), Je(null), Xe("");
221
244
  } catch (e) {
222
- j(e instanceof Error ? e.message : v("devportal.versionRejectFailed", "Failed to reject version"));
245
+ P(e instanceof Error ? e.message : b("devportal.versionRejectFailed", "Failed to reject version"));
223
246
  }
224
247
  }
225
- }, bt = (e) => e.status === "published" && e.isLatest ? /* @__PURE__ */ h(ye, {
248
+ }, kt = (e) => e.status === "published" && e.isLatest ? /* @__PURE__ */ _(be, {
226
249
  size: 16,
227
250
  className: "text-status-success-text"
228
- }) : e.status === "pending_review" ? /* @__PURE__ */ h(f, {
251
+ }) : e.status === "pending_review" ? /* @__PURE__ */ _(m, {
229
252
  size: 16,
230
253
  className: "text-status-info-text"
231
- }) : e.status === "rejected" ? /* @__PURE__ */ h(we, {
254
+ }) : e.status === "rejected" ? /* @__PURE__ */ _(Te, {
232
255
  size: 16,
233
256
  className: "text-status-error-text"
234
- }) : e.status === "draft" ? /* @__PURE__ */ h(be, {
257
+ }) : e.status === "draft" ? /* @__PURE__ */ _(xe, {
235
258
  size: 16,
236
259
  className: "text-status-warning-text"
237
- }) : e.status === "deprecated" ? /* @__PURE__ */ h(ve, {
260
+ }) : e.status === "deprecated" ? /* @__PURE__ */ _(ve, {
238
261
  size: 16,
239
262
  className: "text-text-secondary"
240
- }) : /* @__PURE__ */ h(Se, {
263
+ }) : /* @__PURE__ */ _(Ce, {
241
264
  size: 16,
242
265
  className: "text-accent-blue"
243
- }), xt = (e, t) => {
244
- I((n) => {
266
+ }), At = (e, t) => {
267
+ qe((n) => {
245
268
  let r = new Set(n);
246
269
  return t ? r.add(e) : r.delete(e), r;
247
270
  });
248
- }, St = (e) => {
249
- I((t) => {
271
+ }, jt = (e) => {
272
+ qe((t) => {
250
273
  let n = new Set(t);
251
274
  return J.forEach((t) => {
252
275
  e ? n.add(t.id) : n.delete(t.id);
253
276
  }), n;
254
277
  });
255
- }, $ = () => I(/* @__PURE__ */ new Set()), Ct = async () => {
278
+ }, Mt = () => qe(/* @__PURE__ */ new Set()), Nt = async () => {
256
279
  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 () => {
280
+ P(null);
281
+ 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;
282
+ F(`Published ${t} version${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`), Mt(), B(null);
283
+ }, Pt = async () => {
261
284
  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", {
285
+ P(null);
286
+ 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;
287
+ F(`Deprecated ${t} version${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`), Mt(), B(null);
288
+ }, Ft = y(M.manifestJson);
289
+ return st && !q ? /* @__PURE__ */ _(se, {
290
+ title: b("devportal.versionManagement", "Version Management"),
291
+ description: b("devportal.versionManagementDescription", "Manage your application versions"),
292
+ backLink: `/apps/${C}`,
293
+ backLabel: b("devportal.backToApplication", "Back to Application"),
294
+ children: /* @__PURE__ */ _("div", {
272
295
  className: "flex items-center justify-center py-16",
273
- children: /* @__PURE__ */ h(xe, { className: "h-8 w-8 animate-spin text-text-secondary" })
296
+ children: /* @__PURE__ */ _(Se, { className: "h-8 w-8 animate-spin text-text-secondary" })
274
297
  })
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, {
298
+ }) : ct && !q ? /* @__PURE__ */ _(se, {
299
+ title: b("devportal.versionManagement", "Version Management"),
300
+ description: b("devportal.versionManagementDescription", "Manage your application versions"),
301
+ backLink: `/apps/${C}`,
302
+ backLabel: b("devportal.backToApplication", "Back to Application"),
303
+ children: /* @__PURE__ */ _(t, {
304
+ icon: /* @__PURE__ */ _(p, {
282
305
  size: 32,
283
306
  className: "text-status-error-text"
284
307
  }),
285
- title: v("devportal.failedToLoadVersions", "Failed to load versions"),
286
- description: tt.message || v("devportal.versionsLoadError", "An error occurred while loading versions")
308
+ title: b("devportal.failedToLoadVersions", "Failed to load versions"),
309
+ description: ct.message || b("devportal.versionsLoadError", "An error occurred while loading versions")
287
310
  })
288
- }) : /* @__PURE__ */ h(de, {
311
+ }) : /* @__PURE__ */ _(fe, {
289
312
  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", {
313
+ children: /* @__PURE__ */ v(se, {
314
+ title: b("devportal.versionManagement", "Version Management"),
315
+ description: b("devportal.versionManagementDescription", "Manage your application versions"),
316
+ 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."),
317
+ backLink: `/apps/${C}`,
318
+ backLabel: b("devportal.backToApplication", "Back to Application"),
319
+ actions: /* @__PURE__ */ v("button", {
297
320
  onClick: () => {
298
- N(null), E(!0);
321
+ I(null), k(!0);
299
322
  },
300
- disabled: !Oe,
301
- "aria-disabled": !Oe,
323
+ disabled: !Ae,
324
+ "aria-disabled": !Ae,
302
325
  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")]
326
+ children: [/* @__PURE__ */ _(we, { size: 16 }), b("devportal.newVersion", "New Version")]
304
327
  }),
305
328
  children: [
306
- He && /* @__PURE__ */ g("div", {
329
+ Ue && /* @__PURE__ */ v("div", {
307
330
  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
331
  children: [
309
- /* @__PURE__ */ h(d, {
332
+ /* @__PURE__ */ _(p, {
310
333
  size: 16,
311
334
  className: "flex-shrink-0"
312
335
  }),
313
- He,
314
- /* @__PURE__ */ h("button", {
315
- onClick: () => j(null),
336
+ Ue,
337
+ /* @__PURE__ */ _("button", {
338
+ onClick: () => P(null),
316
339
  className: "ml-auto text-status-error-text hover:text-status-error-text",
317
- children: v("devportal.dismiss", "Dismiss")
340
+ children: b("devportal.dismiss", "Dismiss")
318
341
  })
319
342
  ]
320
343
  }),
321
- Ue && /* @__PURE__ */ g("div", {
344
+ We && /* @__PURE__ */ v("div", {
322
345
  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
346
  children: [
324
- /* @__PURE__ */ h(ye, {
347
+ /* @__PURE__ */ _(be, {
325
348
  size: 16,
326
349
  className: "flex-shrink-0"
327
350
  }),
328
- Ue,
329
- /* @__PURE__ */ h("button", {
330
- onClick: () => M(null),
351
+ We,
352
+ /* @__PURE__ */ _("button", {
353
+ onClick: () => F(null),
331
354
  className: "ml-auto text-status-success-text hover:text-status-success-text",
332
- children: v("devportal.dismiss", "Dismiss")
355
+ children: b("devportal.dismiss", "Dismiss")
333
356
  })
334
357
  ]
335
358
  }),
336
- G && !K && /* @__PURE__ */ g("div", {
359
+ G && !K && /* @__PURE__ */ v("div", {
337
360
  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, {
361
+ children: [/* @__PURE__ */ _(p, {
339
362
  size: 16,
340
363
  className: "mt-0.5 shrink-0"
341
- }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
364
+ }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
342
365
  className: "font-medium",
343
366
  children: "Complete your app setup before submitting for review"
344
- }), /* @__PURE__ */ h("ul", {
367
+ }), /* @__PURE__ */ _("ul", {
345
368
  className: "mt-1 list-disc pl-4 text-xs opacity-80",
346
- children: $e.map((e) => /* @__PURE__ */ h("li", { children: e }, e))
369
+ children: ot.map((e) => /* @__PURE__ */ _("li", { children: e }, e))
347
370
  })] })]
348
371
  }),
349
- G && G.status !== "PUBLISHED" && J.some((e) => e.status === "draft") && /* @__PURE__ */ g("div", {
372
+ G && G.status !== "PUBLISHED" && J.some((e) => e.status === "draft") && /* @__PURE__ */ v("div", {
350
373
  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, {
374
+ children: [/* @__PURE__ */ _(m, {
352
375
  size: 16,
353
376
  className: "mt-0.5 shrink-0"
354
- }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
377
+ }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
355
378
  className: "font-medium",
356
379
  children: "Ready to submit? Go to the Submit tab"
357
- }), /* @__PURE__ */ g("p", {
380
+ }), /* @__PURE__ */ v("p", {
358
381
  className: "mt-1 text-xs opacity-80",
359
382
  children: [
360
383
  "For your first submission the app and its version are reviewed together. Head to the ",
361
- /* @__PURE__ */ h("strong", { children: "Submit" }),
384
+ /* @__PURE__ */ _("strong", { children: "Submit" }),
362
385
  " 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
386
  ]
364
387
  })] })]
365
388
  }),
366
- G && Z && /* @__PURE__ */ g("div", {
389
+ G && Z && /* @__PURE__ */ v("div", {
367
390
  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, {
391
+ children: [/* @__PURE__ */ _(m, {
369
392
  size: 16,
370
393
  className: "mt-0.5 shrink-0"
371
- }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
394
+ }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
372
395
  className: "font-medium",
373
- children: v("devportal.versionAlreadyPending", "A version is already pending review")
374
- }), /* @__PURE__ */ h("p", {
396
+ children: b("devportal.versionAlreadyPending", "A version is already pending review")
397
+ }), /* @__PURE__ */ _("p", {
375
398
  className: "mt-1 text-xs opacity-80",
376
- children: v("devportal.versionAlreadyPendingDetail", "Submitting another version is disabled until it's approved or rejected.")
399
+ children: b("devportal.versionAlreadyPendingDetail", "Submitting another version is disabled until it's approved or rejected.")
377
400
  })] })]
378
401
  }),
379
- J.length > 0 && /* @__PURE__ */ h("div", {
402
+ J.length > 0 && /* @__PURE__ */ _("div", {
380
403
  className: "rounded-card border border-border-seam bg-bg-surface p-4",
381
- children: /* @__PURE__ */ g("div", {
404
+ children: /* @__PURE__ */ v("div", {
382
405
  className: "flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",
383
- children: [/* @__PURE__ */ g("div", {
406
+ children: [/* @__PURE__ */ v("div", {
384
407
  className: "flex flex-wrap items-center gap-3",
385
- children: [/* @__PURE__ */ g("div", {
408
+ children: [/* @__PURE__ */ v("div", {
386
409
  className: "flex items-center gap-2",
387
- children: [/* @__PURE__ */ h(ce, {
388
- checked: ut,
389
- indeterminate: dt,
390
- onChange: St,
410
+ children: [/* @__PURE__ */ _(le, {
411
+ checked: $,
412
+ indeterminate: yt,
413
+ onChange: jt,
391
414
  ariaLabel: "Select all visible versions"
392
- }), /* @__PURE__ */ h("span", {
415
+ }), /* @__PURE__ */ _("span", {
393
416
  className: "text-sm font-medium",
394
- children: v("devportal.selectAllVisible", "Select all visible")
417
+ children: b("devportal.selectAllVisible", "Select all visible")
395
418
  })]
396
- }), F.size > 0 && /* @__PURE__ */ h("button", {
397
- onClick: $,
419
+ }), R.size > 0 && /* @__PURE__ */ _("button", {
420
+ onClick: Mt,
398
421
  className: "text-sm text-text-secondary hover:text-text-primary",
399
- children: v("devportal.clearSelection", "Clear selection")
422
+ children: b("devportal.clearSelection", "Clear selection")
400
423
  })]
401
- }), /* @__PURE__ */ g("div", {
424
+ }), /* @__PURE__ */ v("div", {
402
425
  className: "flex flex-wrap items-center gap-2",
403
426
  children: [
404
- /* @__PURE__ */ g("span", {
427
+ /* @__PURE__ */ v("span", {
405
428
  className: "rounded-full bg-bg-sunken px-3 py-1 text-sm font-medium text-text-secondary",
406
- children: [F.size, " selected"]
429
+ children: [R.size, " selected"]
407
430
  }),
408
- /* @__PURE__ */ g("button", {
431
+ /* @__PURE__ */ v("button", {
409
432
  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(" · "),
433
+ disabled: X.length === 0 || !x || !K || Z,
434
+ "aria-disabled": !x || !K || Z,
435
+ title: Z ? b("devportal.versionAlreadyPending", "A version is already pending review") : K ? void 0 : ot.join(" · "),
413
436
  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})` : ""]
437
+ children: [b("devportal.submitForReview", "Submit for Review"), X.length > 0 ? ` (${X.length})` : ""]
415
438
  }),
416
- /* @__PURE__ */ g("button", {
439
+ /* @__PURE__ */ v("button", {
417
440
  onClick: () => B("deprecate"),
418
- disabled: Q.length === 0 || !b,
419
- "aria-disabled": !b,
441
+ disabled: Q.length === 0 || !S,
442
+ "aria-disabled": !S,
420
443
  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})` : ""]
444
+ children: [b("devportal.deprecateSelected", "Deprecate Selected"), Q.length > 0 ? ` (${Q.length})` : ""]
422
445
  })
423
446
  ]
424
447
  })]
425
448
  })
426
449
  }),
427
- J.length > 0 ? /* @__PURE__ */ h(le, {
450
+ J.length > 0 ? /* @__PURE__ */ _(ue, {
428
451
  data: J,
429
452
  keyField: "id",
430
453
  columns: [
431
454
  {
432
455
  key: "select",
433
- header: /* @__PURE__ */ h(ce, {
434
- checked: ut,
435
- indeterminate: dt,
436
- onChange: St,
456
+ header: /* @__PURE__ */ _(le, {
457
+ checked: $,
458
+ indeterminate: yt,
459
+ onChange: jt,
437
460
  ariaLabel: "Select all visible versions"
438
461
  }),
439
462
  className: "w-12",
440
- render: (e) => /* @__PURE__ */ h("div", {
463
+ render: (e) => /* @__PURE__ */ _("div", {
441
464
  onClick: (e) => e.stopPropagation(),
442
- children: /* @__PURE__ */ h(ce, {
443
- checked: F.has(e.id),
444
- onChange: (t) => xt(e.id, t),
465
+ children: /* @__PURE__ */ _(le, {
466
+ checked: R.has(e.id),
467
+ onChange: (t) => At(e.id, t),
445
468
  ariaLabel: `Select version ${e.version}`
446
469
  })
447
470
  })
448
471
  },
449
472
  {
450
473
  key: "version",
451
- header: v("devportal.version", "Version"),
452
- render: (e) => /* @__PURE__ */ g("div", {
474
+ header: b("devportal.version", "Version"),
475
+ render: (e) => /* @__PURE__ */ v("div", {
453
476
  className: "flex items-center gap-2",
454
477
  children: [
455
- bt(e),
456
- /* @__PURE__ */ h("span", {
478
+ kt(e),
479
+ /* @__PURE__ */ _("span", {
457
480
  className: "font-mono font-medium",
458
481
  children: e.version
459
482
  }),
460
- e.isLatest && /* @__PURE__ */ h("span", {
483
+ e.isLatest && /* @__PURE__ */ _("span", {
461
484
  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")
485
+ children: b("devportal.latest", "Latest")
463
486
  }),
464
- !e.isStable && /* @__PURE__ */ h("span", {
487
+ !e.isStable && /* @__PURE__ */ _("span", {
465
488
  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")
489
+ children: b("devportal.beta", "Beta")
467
490
  })
468
491
  ]
469
492
  })
470
493
  },
471
494
  {
472
495
  key: "releaseNotes",
473
- header: v("devportal.releaseNotes", "Release Notes"),
474
- render: (e) => /* @__PURE__ */ h("p", {
496
+ header: b("devportal.releaseNotes", "Release Notes"),
497
+ render: (e) => /* @__PURE__ */ _("p", {
475
498
  className: "max-w-md truncate text-sm text-text-secondary",
476
- children: e.releaseNotes || v("devportal.noReleaseNotes", "No release notes")
499
+ children: e.releaseNotes || b("devportal.noReleaseNotes", "No release notes")
477
500
  })
478
501
  },
479
502
  {
480
503
  key: "status",
481
- header: v("devportal.status", "Status"),
482
- render: (e) => /* @__PURE__ */ g("div", {
504
+ header: b("devportal.status", "Status"),
505
+ render: (e) => /* @__PURE__ */ v("div", {
483
506
  className: "space-y-1",
484
507
  children: [
485
- /* @__PURE__ */ h(se, { status: e.status === "pending_review" ? "In Review" : e.status }),
486
- e.status === "pending_review" && /* @__PURE__ */ h("p", {
508
+ /* @__PURE__ */ _(ce, { status: e.status === "pending_review" ? "In Review" : e.status }),
509
+ e.status === "pending_review" && /* @__PURE__ */ _("p", {
487
510
  className: "text-xs text-status-info-text",
488
511
  children: "Awaiting platform review"
489
512
  }),
490
- e.status === "rejected" && e.reviewNotes && /* @__PURE__ */ h("p", {
513
+ e.status === "rejected" && e.reviewNotes && /* @__PURE__ */ _("p", {
491
514
  className: "text-xs text-status-error-text max-w-xs",
492
515
  children: e.reviewNotes
493
516
  }),
494
- U && e.packageUrl && /* @__PURE__ */ h(pe, { metadata: e.metadata })
517
+ U && e.packageUrl && /* @__PURE__ */ _(me, { metadata: e.metadata }),
518
+ nt && Oe(e.metadata) && /* @__PURE__ */ v("p", {
519
+ className: "inline-flex items-center gap-1 text-xs text-status-success-text",
520
+ children: [/* @__PURE__ */ _(ye, { size: 11 }), b("devportal.publishedToOrganization", "Published to your organization")]
521
+ })
495
522
  ]
496
523
  })
497
524
  },
498
525
  {
499
526
  key: "publishedAt",
500
- header: v("devportal.published", "Published"),
527
+ header: b("devportal.published", "Published"),
501
528
  render: (e) => e.publishedAt ? he(new Date(e.publishedAt), "MMM d, yyyy") : "-"
502
529
  },
503
530
  {
504
531
  key: "manifest",
505
- header: v("devportal.manifest", "Manifest"),
506
- render: (e) => e.manifest ? /* @__PURE__ */ h(fe, {
532
+ header: b("devportal.manifest", "Manifest"),
533
+ render: (e) => e.manifest ? /* @__PURE__ */ _(pe, {
507
534
  manifest: e.manifest,
508
- tr: v
509
- }) : /* @__PURE__ */ h("span", {
535
+ tr: b
536
+ }) : /* @__PURE__ */ _("span", {
510
537
  className: "text-xs text-text-secondary",
511
- children: v("devportal.noManifest", "No manifest")
538
+ children: b("devportal.noManifest", "No manifest")
512
539
  })
513
540
  },
514
541
  {
515
542
  key: "actions",
516
543
  header: "",
517
544
  className: "w-48",
518
- render: (e) => /* @__PURE__ */ g("div", {
545
+ render: (e) => /* @__PURE__ */ v("div", {
519
546
  className: "flex flex-wrap gap-2",
520
547
  children: [
521
- (e.status === "draft" || e.status === "rejected") && Oe && /* @__PURE__ */ h("button", {
548
+ (e.status === "draft" || e.status === "rejected") && Ae && /* @__PURE__ */ _("button", {
522
549
  className: "inline-flex items-center gap-1 text-xs text-text-secondary hover:text-text-primary hover:underline",
523
550
  onClick: () => {
524
551
  let t = e.manifest ? JSON.stringify(e.manifest, null, 2) : "";
525
- O({
552
+ j({
526
553
  versionId: e.id,
527
554
  version: e.version,
528
555
  hasExistingZip: !!e.packageUrl,
@@ -532,436 +559,444 @@ var _ = (e) => {
532
559
  originalManifestJson: t,
533
560
  releaseNotes: e.releaseNotes ?? "",
534
561
  changelog: e.changelog ?? ""
535
- }), T(null), P(null);
562
+ }), O(null), L(null);
536
563
  },
537
564
  children: "Edit"
538
565
  }),
539
- (e.status === "draft" || e.status === "rejected") && G?.status === "PUBLISHED" && /* @__PURE__ */ g("button", {
566
+ (e.status === "draft" || e.status === "rejected") && G?.status === "PUBLISHED" && /* @__PURE__ */ v("button", {
567
+ className: "inline-flex items-center gap-1 text-xs text-primary hover:underline disabled:opacity-50 disabled:cursor-not-allowed",
568
+ disabled: !x || !K || Z,
569
+ "aria-disabled": !x || !K || Z,
570
+ title: Z ? b("devportal.versionAlreadyPending", "A version is already pending review") : K ? void 0 : ot.join(" · "),
571
+ onClick: () => Tt(e.id),
572
+ children: [/* @__PURE__ */ _(m, { size: 11 }), b("devportal.submitForReview", "Submit for Review")]
573
+ }),
574
+ nt && (e.status === "draft" || e.status === "rejected") && /* @__PURE__ */ v("button", {
540
575
  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")]
576
+ disabled: !x || !w || ht || o(e.metadata).kind !== "passed",
577
+ "aria-disabled": !x || !w || ht || o(e.metadata).kind !== "passed",
578
+ title: o(e.metadata).kind === "passed" ? void 0 : b("devportal.publishToOrganizationNeedsValidation", "Upload a package that passes validation first"),
579
+ onClick: () => et(e),
580
+ children: [/* @__PURE__ */ _(ye, { size: 11 }), b("devportal.publishToOrganization", "Publish to my organization")]
546
581
  }),
547
- e.status === "published" && !e.isLatest && /* @__PURE__ */ h("button", {
582
+ e.status === "published" && !e.isLatest && /* @__PURE__ */ _("button", {
548
583
  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")
584
+ disabled: !S,
585
+ "aria-disabled": !S,
586
+ onClick: () => Dt(e.id),
587
+ children: b("devportal.deprecate", "Deprecate")
553
588
  })
554
589
  ]
555
590
  })
556
591
  }
557
592
  ]
558
- }) : /* @__PURE__ */ h(t, {
593
+ }) : /* @__PURE__ */ _(t, {
559
594
  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", {
595
+ title: b("devportal.noVersionsYet", "No versions yet"),
596
+ description: b("devportal.noVersionsYetDescription", "Create your first version to start distributing your app"),
597
+ action: /* @__PURE__ */ v("button", {
563
598
  onClick: () => {
564
- N(null), E(!0);
599
+ I(null), k(!0);
565
600
  },
566
601
  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")]
602
+ children: [/* @__PURE__ */ _(we, { size: 16 }), b("devportal.createVersion", "Create Version")]
568
603
  })
569
604
  }),
570
- Ve && /* @__PURE__ */ h(i, {
571
- open: Ve,
605
+ He && /* @__PURE__ */ _(i, {
606
+ open: He,
572
607
  onOpenChange: (e) => {
573
- E(e), e || N(null);
608
+ k(e), e || I(null);
574
609
  },
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", {
610
+ onConfirm: bt,
611
+ title: b("devportal.createNewVersion", "Create New Version"),
612
+ confirmLabel: ut ? b("devportal.creating", "Creating...") : b("devportal.createVersion", "Create Version"),
613
+ children: /* @__PURE__ */ v("div", {
579
614
  className: "space-y-4",
580
615
  children: [
581
- We && /* @__PURE__ */ g("div", {
616
+ Ge && /* @__PURE__ */ v("div", {
582
617
  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, {
618
+ children: [/* @__PURE__ */ _(p, {
584
619
  size: 14,
585
620
  className: "flex-shrink-0"
586
- }), We]
621
+ }), Ge]
587
622
  }),
588
- /* @__PURE__ */ h(ue, {
589
- label: v("devportal.versionNumber", "Version Number"),
590
- value: k.version,
591
- onChange: (e) => A({
592
- ...k,
623
+ /* @__PURE__ */ _(de, {
624
+ label: b("devportal.versionNumber", "Version Number"),
625
+ value: M.version,
626
+ onChange: (e) => N({
627
+ ...M,
593
628
  version: e.target.value
594
629
  }),
595
630
  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,
631
+ 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."),
632
+ readOnly: !!Ft,
598
633
  required: !0
599
634
  }),
600
- W && /* @__PURE__ */ g("div", {
635
+ W && /* @__PURE__ */ v("div", {
601
636
  className: "space-y-1",
602
637
  children: [
603
- /* @__PURE__ */ g("label", {
638
+ /* @__PURE__ */ v("label", {
604
639
  className: "text-sm font-medium",
605
640
  children: [
606
641
  H ? "Workflow Definition (JSON)" : "Manifest (JSON)",
607
642
  " ",
608
- /* @__PURE__ */ h("span", {
643
+ /* @__PURE__ */ _("span", {
609
644
  className: "text-status-error-text",
610
645
  children: "*"
611
646
  })
612
647
  ]
613
648
  }),
614
- /* @__PURE__ */ h("textarea", {
649
+ /* @__PURE__ */ _("textarea", {
615
650
  rows: 10,
616
651
  required: !0,
617
652
  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,
653
+ value: M.manifestJson,
619
654
  onChange: (e) => {
620
- let t = _(e.target.value);
621
- A({
622
- ...k,
655
+ let t = y(e.target.value);
656
+ N({
657
+ ...M,
623
658
  manifestJson: e.target.value,
624
659
  ...t ? { version: t } : {}
625
660
  });
626
661
  },
627
662
  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
663
  }),
629
- /* @__PURE__ */ h("p", {
664
+ /* @__PURE__ */ _("p", {
630
665
  className: "text-xs text-text-secondary",
631
- children: H ? /* @__PURE__ */ g(m, { children: [
666
+ children: H ? /* @__PURE__ */ v(g, { children: [
632
667
  "Paste the full ",
633
- /* @__PURE__ */ h("code", { children: "{nodes, edges}" }),
668
+ /* @__PURE__ */ _("code", { children: "{nodes, edges}" }),
634
669
  " JSON. Saved as this version's manifest — no zip needed."
635
670
  ] }) : "Paste the manifest JSON for this version. No zip needed."
636
671
  })
637
672
  ]
638
673
  }),
639
- U && /* @__PURE__ */ g("div", {
674
+ U && /* @__PURE__ */ v("div", {
640
675
  className: "space-y-1",
641
676
  children: [
642
- /* @__PURE__ */ g("label", {
677
+ /* @__PURE__ */ v("label", {
643
678
  className: "text-sm font-medium",
644
679
  children: [
645
680
  "Package (.zip)",
646
681
  " ",
647
- /* @__PURE__ */ h("span", {
682
+ /* @__PURE__ */ _("span", {
648
683
  className: "text-status-error-text",
649
684
  children: "*"
650
685
  })
651
686
  ]
652
687
  }),
653
- /* @__PURE__ */ g("div", {
688
+ /* @__PURE__ */ v("div", {
654
689
  className: "flex gap-2 items-center",
655
690
  children: [
656
- /* @__PURE__ */ h("input", {
657
- ref: Pe,
691
+ /* @__PURE__ */ _("input", {
692
+ ref: Fe,
658
693
  type: "file",
659
694
  accept: ".zip",
660
695
  className: "hidden",
661
- onChange: pt
696
+ onChange: xt
662
697
  }),
663
- /* @__PURE__ */ h("button", {
698
+ /* @__PURE__ */ _("button", {
664
699
  type: "button",
665
- disabled: C,
666
- onClick: () => Pe.current?.click(),
700
+ disabled: E,
701
+ onClick: () => Fe.current?.click(),
667
702
  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, {
703
+ children: E ? /* @__PURE__ */ v(g, { children: [
704
+ /* @__PURE__ */ _(Se, {
670
705
  size: 14,
671
706
  className: "animate-spin"
672
707
  }),
673
708
  " ",
674
709
  "Uploading… ",
675
- Ne,
710
+ Pe,
676
711
  "%"
677
- ] }) : /* @__PURE__ */ g(m, { children: [
678
- /* @__PURE__ */ h(p, { size: 14 }),
712
+ ] }) : /* @__PURE__ */ v(g, { children: [
713
+ /* @__PURE__ */ _(h, { size: 14 }),
679
714
  " ",
680
- k.packageUrl ? "Replace zip" : "Upload zip"
715
+ M.packageUrl ? "Replace zip" : "Upload zip"
681
716
  ] })
682
717
  }),
683
- k.packageUrl && !C && /* @__PURE__ */ h("span", {
718
+ M.packageUrl && !E && /* @__PURE__ */ _("span", {
684
719
  className: "text-xs text-status-success-text",
685
720
  children: "✓ Uploaded"
686
721
  })
687
722
  ]
688
723
  }),
689
- w && /* @__PURE__ */ h("p", {
724
+ D && /* @__PURE__ */ _("p", {
690
725
  className: "text-xs text-status-error-text",
691
- children: w
726
+ children: D
692
727
  }),
693
- /* @__PURE__ */ h("p", {
728
+ /* @__PURE__ */ _("p", {
694
729
  className: "text-xs text-text-tertiary",
695
730
  children: "The zip is the node executable. Upload it before publishing — users install exactly this artifact."
696
731
  })
697
732
  ]
698
733
  }),
699
- U && /* @__PURE__ */ g("div", {
734
+ U && /* @__PURE__ */ v("div", {
700
735
  className: "space-y-2",
701
736
  children: [
702
- /* @__PURE__ */ g("div", {
737
+ /* @__PURE__ */ v("div", {
703
738
  className: "flex items-center justify-between gap-2 flex-wrap",
704
- children: [/* @__PURE__ */ g("label", {
739
+ children: [/* @__PURE__ */ v("label", {
705
740
  className: "text-sm font-medium",
706
741
  children: [
707
742
  "manifest.json",
708
743
  " ",
709
- /* @__PURE__ */ h("span", {
744
+ /* @__PURE__ */ _("span", {
710
745
  className: "text-status-error-text",
711
746
  children: "*"
712
747
  })
713
748
  ]
714
- }), /* @__PURE__ */ g("div", {
749
+ }), /* @__PURE__ */ v("div", {
715
750
  className: "flex items-center gap-2",
716
751
  children: [
717
- Re && /* @__PURE__ */ g("span", {
752
+ ze && /* @__PURE__ */ v("span", {
718
753
  className: "text-xs text-status-success-text",
719
- children: ["✓ ", Re]
754
+ children: ["✓ ", ze]
720
755
  }),
721
- /* @__PURE__ */ h("input", {
722
- ref: Fe,
756
+ /* @__PURE__ */ _("input", {
757
+ ref: Ie,
723
758
  type: "file",
724
759
  accept: ".json,application/json",
725
760
  className: "hidden",
726
- onChange: qe
761
+ onChange: Ze
727
762
  }),
728
- /* @__PURE__ */ g("button", {
763
+ /* @__PURE__ */ v("button", {
729
764
  type: "button",
730
- onClick: () => Fe.current?.click(),
765
+ onClick: () => Ie.current?.click(),
731
766
  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"]
767
+ children: [/* @__PURE__ */ _(h, { size: 12 }), "Upload manifest.json"]
733
768
  })
734
769
  ]
735
770
  })]
736
771
  }),
737
- /* @__PURE__ */ h("textarea", {
772
+ /* @__PURE__ */ _("textarea", {
738
773
  rows: 5,
739
774
  placeholder: "{\n \"manifestVersion\": \"1.0\",\n \"itemType\": \"node\",\n \"identity\": { \"version\": \"1.0.0\", \"displayName\": \"My Node\" }\n}",
740
- value: k.manifestJson,
775
+ value: M.manifestJson,
741
776
  onChange: (e) => {
742
- ze(null);
743
- let t = _(e.target.value);
744
- A({
745
- ...k,
777
+ Be(null);
778
+ let t = y(e.target.value);
779
+ N({
780
+ ...M,
746
781
  manifestJson: e.target.value,
747
782
  ...t ? { version: t } : {}
748
783
  });
749
784
  },
750
785
  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
786
  }),
752
- /* @__PURE__ */ g("p", {
787
+ /* @__PURE__ */ v("p", {
753
788
  className: "text-xs text-text-tertiary",
754
789
  children: [
755
790
  "Upload or paste your ",
756
- /* @__PURE__ */ h("code", { children: "manifest.json" }),
791
+ /* @__PURE__ */ _("code", { children: "manifest.json" }),
757
792
  " — required so the platform knows your node's inputs, outputs, and operations. Not extracted from the zip automatically."
758
793
  ]
759
794
  })
760
795
  ]
761
796
  }),
762
- Ye && /* @__PURE__ */ g("div", {
797
+ tt && /* @__PURE__ */ v("div", {
763
798
  className: "space-y-1",
764
799
  children: [
765
- /* @__PURE__ */ g("label", {
800
+ /* @__PURE__ */ v("label", {
766
801
  className: "text-sm font-medium",
767
802
  children: [
768
803
  "Required scopes",
769
804
  " ",
770
- /* @__PURE__ */ h("span", {
805
+ /* @__PURE__ */ _("span", {
771
806
  className: "text-xs font-normal text-text-secondary",
772
807
  children: "(optional)"
773
808
  })
774
809
  ]
775
810
  }),
776
- /* @__PURE__ */ h("input", {
811
+ /* @__PURE__ */ _("input", {
777
812
  type: "text",
778
- value: k.requiredScopes,
779
- onChange: (e) => A({
780
- ...k,
813
+ value: M.requiredScopes,
814
+ onChange: (e) => N({
815
+ ...M,
781
816
  requiredScopes: e.target.value
782
817
  }),
783
818
  placeholder: "e.g. read:contacts, write:messages",
784
819
  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
820
  }),
786
- /* @__PURE__ */ h("p", {
821
+ /* @__PURE__ */ _("p", {
787
822
  className: "text-xs text-text-tertiary",
788
823
  children: "Comma-separated. List every permission this version needs — users will be prompted to accept any new or changed scopes on update."
789
824
  })
790
825
  ]
791
826
  }),
792
- /* @__PURE__ */ h(a, {
793
- label: v("devportal.releaseNotes", "Release Notes"),
794
- value: k.releaseNotes,
795
- onChange: (e) => A({
796
- ...k,
827
+ /* @__PURE__ */ _(a, {
828
+ label: b("devportal.releaseNotes", "Release Notes"),
829
+ value: M.releaseNotes,
830
+ onChange: (e) => N({
831
+ ...M,
797
832
  releaseNotes: e
798
833
  }),
799
- placeholder: v("devportal.releaseNotesPlaceholder", "What changed in this release?"),
834
+ placeholder: b("devportal.releaseNotesPlaceholder", "What changed in this release?"),
800
835
  rows: 3
801
836
  }),
802
- /* @__PURE__ */ h(a, {
803
- label: v("devportal.changelog", "Changelog"),
804
- value: k.changelog,
805
- onChange: (e) => A({
806
- ...k,
837
+ /* @__PURE__ */ _(a, {
838
+ label: b("devportal.changelog", "Changelog"),
839
+ value: M.changelog,
840
+ onChange: (e) => N({
841
+ ...M,
807
842
  changelog: e
808
843
  }),
809
- placeholder: v("devportal.changelogPlaceholder", "Detailed changelog for this version..."),
844
+ placeholder: b("devportal.changelogPlaceholder", "Detailed changelog for this version..."),
810
845
  rows: 3
811
846
  })
812
847
  ]
813
848
  })
814
849
  }),
815
- L && /* @__PURE__ */ h(i, {
816
- open: !!L,
850
+ z && /* @__PURE__ */ _(i, {
851
+ open: !!z,
817
852
  onOpenChange: (e) => {
818
- e || (Ke(null), z(""));
853
+ e || (Je(null), Xe(""));
819
854
  },
820
- onConfirm: yt,
821
- title: `Reject version ${L.version}`,
855
+ onConfirm: Ot,
856
+ title: `Reject version ${z.version}`,
822
857
  confirmLabel: "Reject Version",
823
- cancelLabel: v("devportal.cancel", "Cancel"),
858
+ cancelLabel: b("devportal.cancel", "Cancel"),
824
859
  variant: "danger",
825
- children: /* @__PURE__ */ g("div", {
860
+ children: /* @__PURE__ */ v("div", {
826
861
  className: "space-y-3",
827
- children: [/* @__PURE__ */ h("p", {
862
+ children: [/* @__PURE__ */ _("p", {
828
863
  className: "text-sm text-text-secondary",
829
864
  children: "The developer will be notified and can fix and resubmit. Please provide a clear reason."
830
- }), /* @__PURE__ */ g("div", {
865
+ }), /* @__PURE__ */ v("div", {
831
866
  className: "space-y-1",
832
- children: [/* @__PURE__ */ g("label", {
867
+ children: [/* @__PURE__ */ v("label", {
833
868
  className: "text-sm font-medium",
834
869
  children: [
835
870
  "Rejection reason",
836
871
  " ",
837
- /* @__PURE__ */ h("span", {
872
+ /* @__PURE__ */ _("span", {
838
873
  className: "text-status-error-text",
839
874
  children: "*"
840
875
  })
841
876
  ]
842
- }), /* @__PURE__ */ h("textarea", {
877
+ }), /* @__PURE__ */ _("textarea", {
843
878
  rows: 3,
844
- value: R,
845
- onChange: (e) => z(e.target.value),
879
+ value: Ye,
880
+ onChange: (e) => Xe(e.target.value),
846
881
  placeholder: "e.g. Manifest contains disallowed network calls to external domains...",
847
882
  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
883
  })]
849
884
  })]
850
885
  })
851
886
  }),
852
- D && /* @__PURE__ */ h(i, {
853
- open: !!D,
887
+ A && /* @__PURE__ */ _(i, {
888
+ open: !!A,
854
889
  onOpenChange: (e) => {
855
- e || (O(null), T(null), P(null));
890
+ e || (j(null), O(null), L(null));
856
891
  },
857
- onConfirm: gt,
858
- title: `Edit Version ${D.version}`,
859
- confirmLabel: at ? "Saving…" : "Save Changes",
860
- children: /* @__PURE__ */ g("div", {
892
+ onConfirm: wt,
893
+ title: `Edit Version ${A.version}`,
894
+ confirmLabel: ft ? "Saving…" : "Save Changes",
895
+ children: /* @__PURE__ */ v("div", {
861
896
  className: "space-y-4",
862
897
  children: [
863
- Ge && /* @__PURE__ */ g("div", {
898
+ Ke && /* @__PURE__ */ v("div", {
864
899
  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, {
900
+ children: [/* @__PURE__ */ _(p, {
866
901
  size: 14,
867
902
  className: "flex-shrink-0"
868
- }), Ge]
903
+ }), Ke]
869
904
  }),
870
- /* @__PURE__ */ h("div", {
905
+ /* @__PURE__ */ _("div", {
871
906
  className: "rounded-lg border border-status-info-bg bg-status-info-bg-subtle px-3 py-2 text-xs text-status-info-text",
872
907
  children: "You can fix the zip, manifest, or release notes before submitting for review. Once submitted for review these fields are locked."
873
908
  }),
874
- U && /* @__PURE__ */ g("div", {
909
+ U && /* @__PURE__ */ v("div", {
875
910
  className: "space-y-1",
876
911
  children: [
877
- /* @__PURE__ */ h("label", {
912
+ /* @__PURE__ */ _("label", {
878
913
  className: "text-sm font-medium",
879
914
  children: "Package (.zip)"
880
915
  }),
881
- /* @__PURE__ */ g("div", {
916
+ /* @__PURE__ */ v("div", {
882
917
  className: "flex gap-2 items-center",
883
918
  children: [
884
- /* @__PURE__ */ h("input", {
885
- ref: Ie,
919
+ /* @__PURE__ */ _("input", {
920
+ ref: Le,
886
921
  type: "file",
887
922
  accept: ".zip",
888
923
  className: "hidden",
889
- onChange: mt
924
+ onChange: St
890
925
  }),
891
- /* @__PURE__ */ h("button", {
926
+ /* @__PURE__ */ _("button", {
892
927
  type: "button",
893
- disabled: C,
894
- onClick: () => Ie.current?.click(),
928
+ disabled: E,
929
+ onClick: () => Le.current?.click(),
895
930
  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, {
931
+ children: E ? /* @__PURE__ */ v(g, { children: [
932
+ /* @__PURE__ */ _(Se, {
898
933
  size: 14,
899
934
  className: "animate-spin"
900
935
  }),
901
936
  " ",
902
937
  "Uploading… ",
903
- Ne,
938
+ Pe,
904
939
  "%"
905
- ] }) : /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(p, { size: 14 }), D.newPackageUrl ? "Replace zip again" : D.hasExistingZip ? "Replace zip" : "Upload zip"] })
940
+ ] }) : /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(h, { size: 14 }), A.newPackageUrl ? "Replace zip again" : A.hasExistingZip ? "Replace zip" : "Upload zip"] })
906
941
  }),
907
- D.newPackageUrl && !C && /* @__PURE__ */ h("span", {
942
+ A.newPackageUrl && !E && /* @__PURE__ */ _("span", {
908
943
  className: "text-xs text-status-success-text",
909
944
  children: "✓ New zip ready"
910
945
  }),
911
- !D.newPackageUrl && D.hasExistingZip && /* @__PURE__ */ h("span", {
946
+ !A.newPackageUrl && A.hasExistingZip && /* @__PURE__ */ _("span", {
912
947
  className: "text-xs text-text-secondary",
913
948
  children: "Current zip kept"
914
949
  })
915
950
  ]
916
951
  }),
917
- w && /* @__PURE__ */ h("p", {
952
+ D && /* @__PURE__ */ _("p", {
918
953
  className: "text-xs text-status-error-text",
919
- children: w
954
+ children: D
920
955
  })
921
956
  ]
922
957
  }),
923
- U && /* @__PURE__ */ g("div", {
958
+ U && /* @__PURE__ */ v("div", {
924
959
  className: "space-y-2",
925
- children: [/* @__PURE__ */ g("div", {
960
+ children: [/* @__PURE__ */ v("div", {
926
961
  className: "flex items-center justify-between gap-2 flex-wrap",
927
- children: [/* @__PURE__ */ g("label", {
962
+ children: [/* @__PURE__ */ v("label", {
928
963
  className: "text-sm font-medium",
929
964
  children: [
930
965
  "manifest.json",
931
966
  " ",
932
- /* @__PURE__ */ h("span", {
967
+ /* @__PURE__ */ _("span", {
933
968
  className: "text-xs font-normal text-text-secondary",
934
969
  children: "(edit below or upload a new file)"
935
970
  })
936
971
  ]
937
- }), /* @__PURE__ */ g("div", {
972
+ }), /* @__PURE__ */ v("div", {
938
973
  className: "flex items-center gap-2",
939
974
  children: [
940
- Be && /* @__PURE__ */ g("span", {
975
+ Ve && /* @__PURE__ */ v("span", {
941
976
  className: "text-xs text-status-success-text",
942
- children: ["✓ ", Be]
977
+ children: ["✓ ", Ve]
943
978
  }),
944
- /* @__PURE__ */ h("input", {
945
- ref: Le,
979
+ /* @__PURE__ */ _("input", {
980
+ ref: Re,
946
981
  type: "file",
947
982
  accept: ".json,application/json",
948
983
  className: "hidden",
949
- onChange: ht
984
+ onChange: Ct
950
985
  }),
951
- /* @__PURE__ */ g("button", {
986
+ /* @__PURE__ */ v("button", {
952
987
  type: "button",
953
- onClick: () => Le.current?.click(),
988
+ onClick: () => Re.current?.click(),
954
989
  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"]
990
+ children: [/* @__PURE__ */ _(h, { size: 12 }), " Upload manifest.json"]
956
991
  })
957
992
  ]
958
993
  })]
959
- }), /* @__PURE__ */ h("textarea", {
994
+ }), /* @__PURE__ */ _("textarea", {
960
995
  rows: 5,
961
996
  placeholder: "{\n \"manifestVersion\": \"1.0\",\n \"itemType\": \"node\",\n \"identity\": { \"version\": \"1.0.0\", \"displayName\": \"My Node\" }\n}",
962
- value: D.manifestJson,
997
+ value: A.manifestJson,
963
998
  onChange: (e) => {
964
- T(null), O((t) => t && {
999
+ O(null), j((t) => t && {
965
1000
  ...t,
966
1001
  manifestJson: e.target.value
967
1002
  });
@@ -969,74 +1004,86 @@ var _ = (e) => {
969
1004
  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
1005
  })]
971
1006
  }),
972
- W && /* @__PURE__ */ g("div", {
1007
+ W && /* @__PURE__ */ v("div", {
973
1008
  className: "space-y-1",
974
- children: [/* @__PURE__ */ g("label", {
1009
+ children: [/* @__PURE__ */ v("label", {
975
1010
  className: "text-sm font-medium",
976
1011
  children: [
977
1012
  H ? "Workflow Definition (JSON)" : "Manifest (JSON)",
978
1013
  " ",
979
- /* @__PURE__ */ h("span", {
1014
+ /* @__PURE__ */ _("span", {
980
1015
  className: "text-xs font-normal text-text-secondary",
981
1016
  children: "(leave empty to keep existing)"
982
1017
  })
983
1018
  ]
984
- }), /* @__PURE__ */ h("textarea", {
1019
+ }), /* @__PURE__ */ _("textarea", {
985
1020
  rows: 10,
986
1021
  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 && {
1022
+ value: A.manifestJson,
1023
+ onChange: (e) => j((t) => t && {
989
1024
  ...t,
990
1025
  manifestJson: e.target.value
991
1026
  }),
992
1027
  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
1028
  })]
994
1029
  }),
995
- /* @__PURE__ */ h(a, {
996
- label: v("devportal.releaseNotes", "Release Notes"),
997
- value: D.releaseNotes,
998
- onChange: (e) => O((t) => t && {
1030
+ /* @__PURE__ */ _(a, {
1031
+ label: b("devportal.releaseNotes", "Release Notes"),
1032
+ value: A.releaseNotes,
1033
+ onChange: (e) => j((t) => t && {
999
1034
  ...t,
1000
1035
  releaseNotes: e
1001
1036
  }),
1002
- placeholder: v("devportal.releaseNotesPlaceholder", "What changed in this release?"),
1037
+ placeholder: b("devportal.releaseNotesPlaceholder", "What changed in this release?"),
1003
1038
  rows: 3
1004
1039
  }),
1005
- /* @__PURE__ */ h(a, {
1006
- label: v("devportal.changelog", "Changelog"),
1007
- value: D.changelog,
1008
- onChange: (e) => O((t) => t && {
1040
+ /* @__PURE__ */ _(a, {
1041
+ label: b("devportal.changelog", "Changelog"),
1042
+ value: A.changelog,
1043
+ onChange: (e) => j((t) => t && {
1009
1044
  ...t,
1010
1045
  changelog: e
1011
1046
  }),
1012
- placeholder: v("devportal.changelogPlaceholder", "Detailed changelog for this version..."),
1047
+ placeholder: b("devportal.changelogPlaceholder", "Detailed changelog for this version..."),
1013
1048
  rows: 3
1014
1049
  })
1015
1050
  ]
1016
1051
  })
1017
1052
  }),
1018
- /* @__PURE__ */ h(i, {
1019
- open: Je === "publish",
1053
+ /* @__PURE__ */ _(i, {
1054
+ open: Qe === "publish",
1020
1055
  onOpenChange: (e) => {
1021
1056
  e || B(null);
1022
1057
  },
1023
- onConfirm: Ct,
1024
- title: v("devportal.submitSelectedVersions", "Submit selected versions for review"),
1058
+ onConfirm: Nt,
1059
+ title: b("devportal.submitSelectedVersions", "Submit selected versions for review"),
1025
1060
  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"),
1061
+ confirmLabel: b("devportal.submitForReview", "Submit for Review"),
1062
+ cancelLabel: b("devportal.cancel", "Cancel"),
1063
+ variant: "success"
1064
+ }),
1065
+ /* @__PURE__ */ _(i, {
1066
+ open: $e !== null,
1067
+ onOpenChange: (e) => {
1068
+ e || et(null);
1069
+ },
1070
+ onConfirm: Et,
1071
+ title: b("devportal.publishToOrganizationTitle", "Publish to my organization"),
1072
+ 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 ?? "")}`,
1073
+ confirmLabel: b("devportal.publishToOrganization", "Publish to my organization"),
1074
+ cancelLabel: b("devportal.cancel", "Cancel"),
1028
1075
  variant: "success"
1029
1076
  }),
1030
- /* @__PURE__ */ h(i, {
1031
- open: Je === "deprecate",
1077
+ /* @__PURE__ */ _(i, {
1078
+ open: Qe === "deprecate",
1032
1079
  onOpenChange: (e) => {
1033
1080
  e || B(null);
1034
1081
  },
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"),
1082
+ onConfirm: Pt,
1083
+ title: b("devportal.deprecateSelectedVersions", "Deprecate selected versions"),
1084
+ 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.")}`,
1085
+ confirmLabel: b("devportal.deprecate", "Deprecate"),
1086
+ cancelLabel: b("devportal.cancel", "Cancel"),
1040
1087
  variant: "warning"
1041
1088
  })
1042
1089
  ]
@@ -1044,6 +1091,6 @@ var _ = (e) => {
1044
1091
  });
1045
1092
  };
1046
1093
  //#endregion
1047
- export { De as ApplicationVersionsPage };
1094
+ export { ke as ApplicationVersionsPage };
1048
1095
 
1049
1096
  //# sourceMappingURL=ApplicationVersionsPage.js.map