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