dshmarket 1.27.0 → 1.28.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/client/client.js CHANGED
@@ -35,7 +35,7 @@ window.__ModuleLoader__.load({ id: "dshmarket", factory: (require) => {
35
35
  /** zh/en dictionaries for the Market settings section and install toast. */
36
36
  const zh = {
37
37
  nav: "插件市场",
38
- setCardDesc: "查看版本、更新或移除插件市场。",
38
+ setCardDesc: "查看插件市场版本与设置。",
39
39
  setSelfUpToDate: "已是最新版本",
40
40
  setSelfUpdateReady: "有新版本",
41
41
  setSelfUpdateHint: "更新会下载新版本,重启后生效。",
@@ -479,7 +479,7 @@ window.__ModuleLoader__.load({ id: "dshmarket", factory: (require) => {
479
479
  };
480
480
  const en = {
481
481
  nav: "Plugin Market",
482
- setCardDesc: "See the version, update, or remove the plugin market.",
482
+ setCardDesc: "View the plugin market version and settings.",
483
483
  setSelfUpToDate: "Up to date",
484
484
  setSelfUpdateReady: "New version available:",
485
485
  setSelfUpdateHint: "Updating downloads the new version; it takes effect after a restart.",
@@ -923,6 +923,28 @@ window.__ModuleLoader__.load({ id: "dshmarket", factory: (require) => {
923
923
  };
924
924
  //#endregion
925
925
  //#region src/client/market-data.ts
926
+ /** Category ids for one entry, de-duplicated in declaration order. */
927
+ function pluginCategories(plugin) {
928
+ const values = Array.isArray(plugin.category) ? plugin.category : [plugin.category];
929
+ const categories = [];
930
+ const seen = /* @__PURE__ */ new Set();
931
+ for (const value of values) {
932
+ if (typeof value !== "string" || value === "" || seen.has(value)) continue;
933
+ seen.add(value);
934
+ categories.push(value);
935
+ }
936
+ return categories;
937
+ }
938
+ /**
939
+ * Add active profile Bundles as presence-only catalog entries.
940
+ *
941
+ * The returned map is for catalog matching only. Update and uninstall flows
942
+ * must keep using the dependency-only map because a Bundle supplied by the
943
+ * dsh installation is not owned by the profile package manager.
944
+ */
945
+ function installedForCatalog(installed, bundles) {
946
+ return Object.fromEntries([...bundles.map((name) => [name, "*"]), ...Object.entries(installed)]);
947
+ }
926
948
  function groupSwitchState(members, disabled) {
927
949
  const list = members ?? [];
928
950
  if (list.length === 0) return "empty";
@@ -976,18 +998,24 @@ window.__ModuleLoader__.load({ id: "dshmarket", factory: (require) => {
976
998
  }
977
999
  /**
978
1000
  * The discover list: category filter, then the published-within window, then
979
- * search across name / owner / localized description, then the selected sort.
1001
+ * search across name / owner / localized description / category ids and
1002
+ * localized category labels, then the selected sort.
980
1003
  * Pure — the section renders exactly this.
981
1004
  */
982
1005
  function visiblePlugins(plugins, options) {
983
1006
  const query = options.query.trim().toLowerCase();
984
1007
  const list = plugins.filter((p) => {
985
1008
  if (isMarketItself(p)) return false;
986
- if (options.category !== "all" && p.category !== options.category) return false;
1009
+ const categories = pluginCategories(p);
1010
+ if (options.category !== "all" && !categories.includes(options.category)) return false;
987
1011
  if (options.sinceDays !== void 0 && !withinDays(p.added, options.sinceDays)) return false;
988
1012
  if (query === "") return true;
989
1013
  const desc = p.description && (p.description[options.lang] || p.description.en) || "";
990
- return p.name.toLowerCase().includes(query) || p.owner.toLowerCase().includes(query) || desc.toLowerCase().includes(query);
1014
+ const categoryMatches = categories.some((category) => {
1015
+ if (category.toLowerCase().includes(query)) return true;
1016
+ return Object.values(options.categories?.[category] ?? {}).some((label) => typeof label === "string" && label.toLowerCase().includes(query));
1017
+ });
1018
+ return p.name.toLowerCase().includes(query) || p.owner.toLowerCase().includes(query) || desc.toLowerCase().includes(query) || categoryMatches;
991
1019
  });
992
1020
  const hasDownloads = (p) => typeof p.downloads === "number";
993
1021
  if (options.sort === "downloads-desc") return [...list].sort((a, b) => {
@@ -1010,7 +1038,7 @@ window.__ModuleLoader__.load({ id: "dshmarket", factory: (require) => {
1010
1038
  }
1011
1039
  /** The themes tab listing: theme category only, most-starred first. */
1012
1040
  function themePlugins(plugins) {
1013
- return plugins.filter((p) => p.category === "theme").sort((a, b) => (b.stars || 0) - (a.stars || 0));
1041
+ return plugins.filter((p) => pluginCategories(p).includes("theme")).sort((a, b) => (b.stars || 0) - (a.stars || 0));
1014
1042
  }
1015
1043
  /**
1016
1044
  * Category chip order: collapsed with an active non-'all' chip that would
@@ -2339,7 +2367,13 @@ window.__ModuleLoader__.load({ id: "dshmarket", factory: (require) => {
2339
2367
  onClick: props.onRefresh,
2340
2368
  children: t("refresh")
2341
2369
  }),
2342
- record.state === "failed" && props.onRetry !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
2370
+ record.state === "failed" && (record.blockedBuilds ?? []).length > 0 && props.onApproveBuilds !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
2371
+ variant: "primary",
2372
+ size: "sm",
2373
+ onClick: () => props.onApproveBuilds?.(record),
2374
+ children: t("approveBuilds")
2375
+ }),
2376
+ record.state === "failed" && (record.blockedBuilds ?? []).length === 0 && props.onRetry !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
2343
2377
  variant: "outline",
2344
2378
  size: "sm",
2345
2379
  onClick: () => props.onRetry?.(record),
@@ -5278,6 +5312,8 @@ window.__ModuleLoader__.load({ id: "dshmarket", factory: (require) => {
5278
5312
  }).catch(() => {});
5279
5313
  fetch("/dsh-market/updates" + (force === true ? "?force=1" : ""), { cache: "no-store" }).then((res) => res.json()).then((body) => setUpdates(body.updates || {})).catch(() => {});
5280
5314
  }, []);
5315
+ /** Active Bundles count as installed in Discover without becoming package-manager targets. */
5316
+ const catalogInstalled = (0, react.useMemo)(() => installedForCatalog(installed, installedBundles), [installed, installedBundles]);
5281
5317
  (0, react.useMemo)(() => new Set(disabledNames), [disabledNames]);
5282
5318
  /** Effective switch state: market disable list ∪ user-patch-layer disables. */
5283
5319
  const effectiveDisabledSet = (0, react.useMemo)(() => /* @__PURE__ */ new Set([...disabledNames, ...patchDisabledNames]), [disabledNames, patchDisabledNames]);
@@ -5468,6 +5504,7 @@ window.__ModuleLoader__.load({ id: "dshmarket", factory: (require) => {
5468
5504
  category: cat,
5469
5505
  query: q,
5470
5506
  lang,
5507
+ categories: data.categories,
5471
5508
  sort: `${sortField}-${sortDir}`,
5472
5509
  sinceDays: timeRange === "all" ? void 0 : TIME_RANGE_DAYS[timeRange]
5473
5510
  }), [
@@ -5491,6 +5528,7 @@ window.__ModuleLoader__.load({ id: "dshmarket", factory: (require) => {
5491
5528
  category: "theme",
5492
5529
  query: qThemes,
5493
5530
  lang,
5531
+ categories: data.categories,
5494
5532
  sort: `${themeSortField}-${themeSortDir}`,
5495
5533
  sinceDays: themeTimeRange === "all" ? void 0 : TIME_RANGE_DAYS[themeTimeRange]
5496
5534
  }), [
@@ -5582,7 +5620,7 @@ window.__ModuleLoader__.load({ id: "dshmarket", factory: (require) => {
5582
5620
  }))).then(({ status, body }) => {
5583
5621
  setBusyUrl(null);
5584
5622
  sessionStorage.removeItem("dshm-pending");
5585
- if (status === 200 && body.ok && body.hot && plugin.category === "theme") {
5623
+ if (status === 200 && body.ok && body.hot && pluginCategories(plugin).includes("theme")) {
5586
5624
  sessionStorage.setItem("dshm-toast", JSON.stringify([plugin.name]));
5587
5625
  sessionStorage.setItem("dshm-tab", "themes");
5588
5626
  location.reload();
@@ -5639,15 +5677,17 @@ window.__ModuleLoader__.load({ id: "dshmarket", factory: (require) => {
5639
5677
  setOperationsOpen(true);
5640
5678
  return;
5641
5679
  }
5642
- if (Array.isArray(body.ignoredBuilds) && body.ignoredBuilds.length > 0) setBuildsSkipped({
5680
+ const blocked = Array.isArray(body.ignoredBuilds) ? body.ignoredBuilds.map(String) : [];
5681
+ if (blocked.length > 0) setBuildsSkipped({
5643
5682
  plugin,
5644
- names: body.ignoredBuilds.map(String)
5683
+ names: blocked
5645
5684
  });
5646
5685
  const text = (v) => typeof v === "string" ? v : v && typeof v.text === "string" ? v.text : v == null ? "" : JSON.stringify(v);
5647
5686
  const detail = text(body.error) || humanOutput([text(body.stderr), text(body.stdout)].filter(Boolean).join("\n")) || "exit " + body.exitCode;
5648
5687
  setRecords((list) => patch(list, recordId, {
5649
5688
  state: "failed",
5650
- reason: detail.trim().slice(-600)
5689
+ reason: detail.trim().slice(-600),
5690
+ ...blocked.length > 0 ? { blockedBuilds: blocked } : {}
5651
5691
  }));
5652
5692
  setOperationsOpen(true);
5653
5693
  }
@@ -6022,6 +6062,17 @@ window.__ModuleLoader__.load({ id: "dshmarket", factory: (require) => {
6022
6062
  setGroupPayload,
6023
6063
  t
6024
6064
  ]);
6065
+ /** Approve the build scripts pnpm refused, then rerun what was blocked. */
6066
+ const approveAndRetry = (0, react.useCallback)((names, resume) => {
6067
+ fetch("/dsh-market/approve-builds", {
6068
+ method: "POST",
6069
+ headers: { "content-type": "application/json" },
6070
+ body: JSON.stringify({ packages: names })
6071
+ }).then((res) => res.json()).then((body) => {
6072
+ if (!body.ok) setInstallError(String(body.error || "approve failed"));
6073
+ else resume();
6074
+ }).catch((error) => setInstallError(String(error)));
6075
+ }, []);
6025
6076
  const doGroupToggle = (0, react.useCallback)((name, enabled) => {
6026
6077
  return doGroupAction({
6027
6078
  action: "toggle",
@@ -6357,7 +6408,7 @@ window.__ModuleLoader__.load({ id: "dshmarket", factory: (require) => {
6357
6408
  const pluginCard = (p) => {
6358
6409
  const desc = p.description && (p.description[lang] || p.description.en) || "";
6359
6410
  const done = doneUrls.includes(p.url) || hotUrls.includes(p.url);
6360
- const already = isInstalled(p, installed, repoIdentities, data?.plugins, repoHints);
6411
+ const already = isInstalled(p, catalogInstalled, repoIdentities, data?.plugins, repoHints);
6361
6412
  const busy = busyUrl === p.url;
6362
6413
  const replacement = replacementOf(p);
6363
6414
  const record = recordForUrl(records, p.url);
@@ -6473,10 +6524,10 @@ window.__ModuleLoader__.load({ id: "dshmarket", factory: (require) => {
6473
6524
  }),
6474
6525
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
6475
6526
  className: Market_module_css_default.foot,
6476
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
6527
+ children: [pluginCategories(p).map((category) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
6477
6528
  className: Market_module_css_default.tag,
6478
- children: data.categories[p.category] && (data.categories[p.category][lang] || data.categories[p.category].en) || p.category
6479
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: Market_module_css_default.grow })]
6529
+ children: data.categories[category] && (data.categories[category][lang] || data.categories[category].en) || category
6530
+ }, category)), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: Market_module_css_default.grow })]
6480
6531
  }),
6481
6532
  busy && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
6482
6533
  className: Market_module_css_default.progress,
@@ -6818,7 +6869,7 @@ window.__ModuleLoader__.load({ id: "dshmarket", factory: (require) => {
6818
6869
  if (data === null) return names;
6819
6870
  for (const [name, spec] of Object.entries(installed)) {
6820
6871
  const entry = entryForDep(data.plugins, name, String(spec), repoIdentities[name], repoHints[name]);
6821
- if (entry !== void 0 && entry.category === "theme") names.add(name);
6872
+ if (entry !== void 0 && pluginCategories(entry).includes("theme")) names.add(name);
6822
6873
  }
6823
6874
  return names;
6824
6875
  }, [
@@ -6953,7 +7004,17 @@ window.__ModuleLoader__.load({ id: "dshmarket", factory: (require) => {
6953
7004
  onCancel: () => doCancel(),
6954
7005
  onDismiss: (record) => setRecords((list) => drop(list, record.id)),
6955
7006
  onRefresh: () => location.reload(),
6956
- onResolveConflict: resolveConflict
7007
+ onResolveConflict: resolveConflict,
7008
+ onApproveBuilds: (record) => {
7009
+ const names = record.blockedBuilds ?? [];
7010
+ if (names.length === 0) return;
7011
+ setRecords((list) => drop(list, record.id));
7012
+ const plugin = record.url === void 0 ? void 0 : data?.plugins.find((p) => p.url === record.url);
7013
+ approveAndRetry(names, () => {
7014
+ if (plugin !== void 0) doInstall(plugin);
7015
+ else doUpdate(record.name, false, false);
7016
+ });
7017
+ }
6957
7018
  })
6958
7019
  ]
6959
7020
  }),
@@ -7150,15 +7211,10 @@ window.__ModuleLoader__.load({ id: "dshmarket", factory: (require) => {
7150
7211
  onClick: () => {
7151
7212
  const { plugin, updateName, names, restore } = buildsSkipped;
7152
7213
  setBuildsSkipped(null);
7153
- fetch("/dsh-market/approve-builds", {
7154
- method: "POST",
7155
- headers: { "content-type": "application/json" },
7156
- body: JSON.stringify({ packages: names })
7157
- }).then((res) => res.json()).then((body) => {
7158
- if (!body.ok) setInstallError(String(body.error || "approve failed"));
7159
- else if (plugin !== void 0) doInstall(plugin);
7214
+ approveAndRetry(names, () => {
7215
+ if (plugin !== void 0) doInstall(plugin);
7160
7216
  else if (updateName !== void 0) doUpdate(updateName, false, restore === true);
7161
- }).catch((error) => setInstallError(String(error)));
7217
+ });
7162
7218
  },
7163
7219
  children: t("approveBuilds")
7164
7220
  })
@@ -8136,7 +8192,7 @@ window.__ModuleLoader__.load({ id: "dshmarket", factory: (require) => {
8136
8192
  setTab("discover");
8137
8193
  },
8138
8194
  children: t("viewReplacement")
8139
- }), !isInstalled(replacement, installed, repoIdentities, data?.plugins, repoHints) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
8195
+ }), !isInstalled(replacement, catalogInstalled, repoIdentities, data?.plugins, repoHints) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
8140
8196
  variant: "outline",
8141
8197
  size: "sm",
8142
8198
  onClick: () => setConfirming(replacement),
@@ -8269,10 +8325,10 @@ window.__ModuleLoader__.load({ id: "dshmarket", factory: (require) => {
8269
8325
  })
8270
8326
  }),
8271
8327
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: Market_module_css_default.grow }),
8272
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
8328
+ pluginCategories(confirming).map((category) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
8273
8329
  className: Market_module_css_default.tag,
8274
- children: data.categories[confirming.category] && (data.categories[confirming.category][lang] || data.categories[confirming.category].en) || confirming.category
8275
- })
8330
+ children: data.categories[category] && (data.categories[category][lang] || data.categories[category].en) || category
8331
+ }, category))
8276
8332
  ]
8277
8333
  }),
8278
8334
  confirming.added && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
@@ -8484,8 +8540,10 @@ window.__ModuleLoader__.load({ id: "dshmarket", factory: (require) => {
8484
8540
  /**
8485
8541
  * The market's card on the plugin configuration page (dsh >= 0.1.0-rc.7).
8486
8542
  *
8487
- * It manages the market ITSELF — version, update, remove. That is the whole
8488
- * scope on purpose: this page is where a user goes to deal with a plugin,
8543
+ * It manages the market ITSELF — version, update, remove when the current
8544
+ * profile owns the dependency. A host-provided market keeps only its version
8545
+ * display and download-region controls. This page is where a user goes to deal
8546
+ * with a plugin,
8489
8547
  * and "which version am I on / update it / get rid of it" is the part of
8490
8548
  * that anybody can act on without knowing how DSH is put together.
8491
8549
  *
@@ -8558,7 +8616,8 @@ window.__ModuleLoader__.load({ id: "dshmarket", factory: (require) => {
8558
8616
  channels: offered.length > 0 ? offered : ["stable", "beta"],
8559
8617
  region: asRegion(body.region) ?? "global",
8560
8618
  regions: regions.length > 0 ? regions : REGIONS,
8561
- regionAuto: body.regionAuto === true
8619
+ regionAuto: body.regionAuto === true,
8620
+ selfManaged: body.selfManaged !== false
8562
8621
  };
8563
8622
  }
8564
8623
  function readUpdate(own) {
@@ -8614,7 +8673,8 @@ window.__ModuleLoader__.load({ id: "dshmarket", factory: (require) => {
8614
8673
  channels: ["stable", "beta"],
8615
8674
  region: "global",
8616
8675
  regions: REGIONS,
8617
- regionAuto: false
8676
+ regionAuto: false,
8677
+ selfManaged: true
8618
8678
  });
8619
8679
  }
8620
8680
  try {
@@ -8757,7 +8817,7 @@ window.__ModuleLoader__.load({ id: "dshmarket", factory: (require) => {
8757
8817
  }, [post, t]);
8758
8818
  /** One label + hint block with an optional action, the host's row shape. */
8759
8819
  const row = (label, hint, action) => (0, react.createElement)("div", { className: Market_module_css_default.setRow }, (0, react.createElement)("div", { className: Market_module_css_default.setLabelBox }, (0, react.createElement)("div", { className: Market_module_css_default.setLabel }, label), (0, react.createElement)("div", { className: Market_module_css_default.setHint }, hint)), action);
8760
- const body = phase === "removed" ? row(t("setSelfRemoved"), t("setSelfRemovedHint"), null) : (0, react.createElement)(react.Fragment, null, row(update?.updateAvailable === true && update.latest !== null ? `${t("setSelfUpdateReady")} ${update.latest}` : update?.channelSwitch != null ? `${t("setChannelSwitch")} ${update.channelSwitch}` : t("setSelfUpToDate"), phase === "updated" ? t("setSelfUpdatedHint") : update?.channelSwitch != null ? t("setChannelSwitchHint") : update?.updateAvailable === true ? t("setSelfUpdateHint") : t("setSelfUpToDateHint"), phase === "updated" ? null : update?.updateAvailable === true ? (0, react.createElement)(_deepseek_ai_dsh_client_ui_primitives.Button, {
8820
+ const body = phase === "removed" ? row(t("setSelfRemoved"), t("setSelfRemovedHint"), null) : (0, react.createElement)(react.Fragment, null, status?.selfManaged === true ? row(update?.updateAvailable === true && update.latest !== null ? `${t("setSelfUpdateReady")} ${update.latest}` : update?.channelSwitch != null ? `${t("setChannelSwitch")} ${update.channelSwitch}` : t("setSelfUpToDate"), phase === "updated" ? t("setSelfUpdatedHint") : update?.channelSwitch != null ? t("setChannelSwitchHint") : update?.updateAvailable === true ? t("setSelfUpdateHint") : t("setSelfUpToDateHint"), phase === "updated" ? null : update?.updateAvailable === true ? (0, react.createElement)(_deepseek_ai_dsh_client_ui_primitives.Button, {
8761
8821
  variant: "primary",
8762
8822
  size: "sm",
8763
8823
  disabled: busy,
@@ -8767,7 +8827,7 @@ window.__ModuleLoader__.load({ id: "dshmarket", factory: (require) => {
8767
8827
  size: "sm",
8768
8828
  disabled: busy,
8769
8829
  onClick: () => onUpdate()
8770
- }, t("setChannelSwitch")) : null), row(t("setChannel"), t(CHANNEL_HINT[status?.channel ?? "stable"]), (0, react.createElement)("div", { className: Market_module_css_default.setSeg }, (status?.channels ?? ["stable", "beta"]).map((id) => (0, react.createElement)("button", {
8830
+ }, t("setChannelSwitch")) : null) : null, status?.selfManaged === true ? row(t("setChannel"), t(CHANNEL_HINT[status.channel]), (0, react.createElement)("div", { className: Market_module_css_default.setSeg }, (status?.channels ?? ["stable", "beta"]).map((id) => (0, react.createElement)("button", {
8771
8831
  key: id,
8772
8832
  type: "button",
8773
8833
  className: status?.channel === id ? `${Market_module_css_default.setSegBtn} ${Market_module_css_default.setSegOn}` : Market_module_css_default.setSegBtn,
@@ -8776,7 +8836,7 @@ window.__ModuleLoader__.load({ id: "dshmarket", factory: (require) => {
8776
8836
  onClick: () => {
8777
8837
  onChannel(id);
8778
8838
  }
8779
- }, t(CHANNEL_LABEL[id]))))), row(t("setRegion"), status?.regionAuto === true ? `${t(REGION_HINT[status.region])} ${t("setRegionAuto")}` : t(REGION_HINT[status?.region ?? "global"]), (0, react.createElement)("div", { className: Market_module_css_default.setSeg }, (status?.regions ?? REGIONS).map((id) => (0, react.createElement)("button", {
8839
+ }, t(CHANNEL_LABEL[id]))))) : null, row(t("setRegion"), status?.regionAuto === true ? `${t(REGION_HINT[status.region])} ${t("setRegionAuto")}` : t(REGION_HINT[status?.region ?? "global"]), (0, react.createElement)("div", { className: Market_module_css_default.setSeg }, (status?.regions ?? REGIONS).map((id) => (0, react.createElement)("button", {
8780
8840
  key: id,
8781
8841
  type: "button",
8782
8842
  className: status?.region === id ? `${Market_module_css_default.setSegBtn} ${Market_module_css_default.setSegOn}` : Market_module_css_default.setSegBtn,
@@ -8784,7 +8844,7 @@ window.__ModuleLoader__.load({ id: "dshmarket", factory: (require) => {
8784
8844
  onClick: () => {
8785
8845
  onRegion(id);
8786
8846
  }
8787
- }, t(REGION_LABEL[id]))))), row(t("setSelfRemove"), t("setSelfRemoveHint"), phase === "confirming" || busy ? null : (0, react.createElement)(_deepseek_ai_dsh_client_ui_primitives.Button, {
8847
+ }, t(REGION_LABEL[id]))))), status?.selfManaged === true ? row(t("setSelfRemove"), t("setSelfRemoveHint"), phase === "confirming" || busy ? null : (0, react.createElement)(_deepseek_ai_dsh_client_ui_primitives.Button, {
8788
8848
  variant: "outline",
8789
8849
  size: "sm",
8790
8850
  className: Market_module_css_default.setDanger,
@@ -8792,7 +8852,7 @@ window.__ModuleLoader__.load({ id: "dshmarket", factory: (require) => {
8792
8852
  onClick: () => {
8793
8853
  setPhase("confirming");
8794
8854
  }
8795
- }, t("setSelfRemove"))), phase === "confirming" || busy ? (0, react.createElement)("div", { className: Market_module_css_default.setConfirm }, (0, react.createElement)("div", { className: Market_module_css_default.setHint }, t("setSelfConfirm")), (0, react.createElement)("label", { className: Market_module_css_default.setCheck }, (0, react.createElement)("input", {
8855
+ }, t("setSelfRemove"))) : null, status?.selfManaged === true && (phase === "confirming" || busy) ? (0, react.createElement)("div", { className: Market_module_css_default.setConfirm }, (0, react.createElement)("div", { className: Market_module_css_default.setHint }, t("setSelfConfirm")), (0, react.createElement)("label", { className: Market_module_css_default.setCheck }, (0, react.createElement)("input", {
8796
8856
  type: "checkbox",
8797
8857
  checked: purge,
8798
8858
  onChange: () => {