@burdenoff/microfe-devportal 2026.703.3 → 2026.703.5

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