@xrxs-ai/dsh-xrxs-plugins-store 0.2.1 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/client.js CHANGED
@@ -30,7 +30,7 @@ __export(index_exports, {
30
30
  inject: () => inject
31
31
  });
32
32
  module.exports = __toCommonJS(index_exports);
33
- var import_react11 = require("react");
33
+ var import_react12 = require("react");
34
34
 
35
35
  // src/client/MarketplaceApp.tsx
36
36
  var import_react9 = require("react");
@@ -41,11 +41,12 @@ var import_react4 = require("react");
41
41
  // src/client/host-rpc.ts
42
42
  var PREFIX = "/plugins/xrxs-plugins-store";
43
43
  var HostRpcError = class extends Error {
44
- constructor(message, status, code, errorCode) {
44
+ constructor(message, status, code, errorCode, pendingBuilds) {
45
45
  super(message);
46
46
  this.status = status;
47
47
  this.code = code;
48
48
  this.errorCode = errorCode;
49
+ this.pendingBuilds = pendingBuilds;
49
50
  this.name = "HostRpcError";
50
51
  }
51
52
  };
@@ -67,7 +68,8 @@ async function request(path, init) {
67
68
  }
68
69
  if (!res.ok || body.ok === false) {
69
70
  const code = typeof body.code === "number" ? body.code : void 0;
70
- throw new HostRpcError(body.message || `HTTP ${res.status}`, res.status, code, body.errorCode);
71
+ const pendingBuilds = Array.isArray(body.pendingBuilds) ? body.pendingBuilds.filter((item) => typeof item === "string") : void 0;
72
+ throw new HostRpcError(body.message || `HTTP ${res.status}`, res.status, code, body.errorCode, pendingBuilds);
71
73
  }
72
74
  return body.data;
73
75
  }
@@ -138,6 +140,12 @@ function installPlugin(name, version, sourceType) {
138
140
  function uninstallPlugin(name) {
139
141
  return hostPost("/api/uninstall", { name });
140
142
  }
143
+ function checkSelfUpdate() {
144
+ return hostGet("/api/self-update");
145
+ }
146
+ function applySelfUpdate(version) {
147
+ return hostPost("/api/self-update/apply", { version });
148
+ }
141
149
 
142
150
  // src/client/data/developer-api.ts
143
151
  var BASE = "/api/developer/plugins";
@@ -411,6 +419,19 @@ function NoticeDialog(props) {
411
419
  ] }) });
412
420
  }
413
421
 
422
+ // src/client/widgets/ConfirmDialog.tsx
423
+ var import_jsx_runtime8 = require("react/jsx-runtime");
424
+ function ConfirmDialog(props) {
425
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "xps-overlay", onClick: props.busy === true ? void 0 : props.onCancel, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "xps-dialog", onClick: (event) => event.stopPropagation(), children: [
426
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "xps-dialog-title", children: props.title }),
427
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "xps-dialog-body xps-dialog-pre", children: props.body }),
428
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "xps-dialog-actions", children: [
429
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Button, { size: "small", disabled: props.busy === true, onClick: props.onConfirm, children: props.confirmText }),
430
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Button, { size: "small", variant: "ghost", disabled: props.busy === true, onClick: props.onCancel, children: props.cancelText ?? "\u53D6\u6D88" })
431
+ ] })
432
+ ] }) });
433
+ }
434
+
414
435
  // src/client/pages/admin/parts.tsx
415
436
  var import_react2 = require("react");
416
437
 
@@ -453,7 +474,7 @@ function formatRelative(text) {
453
474
  }
454
475
 
455
476
  // src/client/pages/admin/parts.tsx
456
- var import_jsx_runtime8 = require("react/jsx-runtime");
477
+ var import_jsx_runtime9 = require("react/jsx-runtime");
457
478
  var STATUS_BADGE = {
458
479
  pending: { label: "\u{1F550} \u5F85\u5BA1\u6838", tone: "warning" },
459
480
  approved: { label: "\u2705 \u5DF2\u4E0A\u67B6", tone: "success" },
@@ -483,28 +504,28 @@ function formatDateTime(text) {
483
504
  }
484
505
  function PluginStatusBadge(props) {
485
506
  const meta = badgeOf(STATUS_BADGE, props.status);
486
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Badge, { tone: meta.tone, children: meta.label });
507
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Badge, { tone: meta.tone, children: meta.label });
487
508
  }
488
509
  function VersionStatusBadge(props) {
489
510
  const meta = badgeOf(VERSION_BADGE, props.status);
490
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Badge, { tone: meta.tone, children: meta.label });
511
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Badge, { tone: meta.tone, children: meta.label });
491
512
  }
492
513
  function VersionList(props) {
493
514
  if (props.versions.length === 0) {
494
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "xps-dev-versions", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "xps-text-caption", children: "\u6682\u65E0\u7248\u672C\u8BB0\u5F55" }) });
515
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "xps-dev-versions", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "xps-text-caption", children: "\u6682\u65E0\u7248\u672C\u8BB0\u5F55" }) });
495
516
  }
496
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "xps-dev-versions", children: props.versions.map((item) => {
517
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "xps-dev-versions", children: props.versions.map((item) => {
497
518
  const rejectReason = item.rejectReason?.trim() ?? "";
498
519
  const changelog = item.changelog?.trim() ?? "";
499
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "xps-dev-ver", children: [
500
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "xps-dev-ver-head", children: [
501
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "xps-dev-ver-no xps-mono", children: [
520
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "xps-dev-ver", children: [
521
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "xps-dev-ver-head", children: [
522
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { className: "xps-dev-ver-no xps-mono", children: [
502
523
  "v",
503
524
  item.version
504
525
  ] }),
505
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(VersionStatusBadge, { status: item.status }),
506
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "xps-dev-ver-spacer" }),
507
- item.withdrawable === true && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
526
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(VersionStatusBadge, { status: item.status }),
527
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "xps-dev-ver-spacer" }),
528
+ item.withdrawable === true && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
508
529
  Button,
509
530
  {
510
531
  size: "small",
@@ -515,34 +536,34 @@ function VersionList(props) {
515
536
  }
516
537
  )
517
538
  ] }),
518
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "xps-dev-ver-meta", children: [
519
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
539
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "xps-dev-ver-meta", children: [
540
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { children: [
520
541
  "\u63D0\u4EA4 ",
521
542
  formatDateTime(item.submittedAt)
522
543
  ] }),
523
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
544
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { children: [
524
545
  "\u5BA1\u6838 ",
525
546
  formatDateTime(item.reviewedAt)
526
547
  ] })
527
548
  ] }),
528
- changelog !== "" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "xps-dev-ver-log", children: [
549
+ changelog !== "" && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "xps-dev-ver-log", children: [
529
550
  "\u66F4\u65B0\u8BF4\u660E:",
530
551
  changelog
531
552
  ] }),
532
- rejectReason !== "" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "xps-dev-ver-reject", children: [
553
+ rejectReason !== "" && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "xps-dev-ver-reject", children: [
533
554
  "\u9A73\u56DE\u7406\u7531:",
534
555
  rejectReason
535
556
  ] })
536
557
  ] }, item.version);
537
558
  }) });
538
559
  }
539
- function ConfirmDialog(props) {
540
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "xps-overlay", onClick: props.busy ? void 0 : props.onCancel, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "xps-dialog", onClick: (event) => event.stopPropagation(), children: [
541
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "xps-dialog-title", children: props.title }),
542
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "xps-dialog-body", children: props.message }),
543
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "xps-dialog-actions", children: [
544
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Button, { onClick: props.onCancel, disabled: props.busy, children: "\u53D6\u6D88" }),
545
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
560
+ function ConfirmDialog2(props) {
561
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "xps-overlay", onClick: props.busy ? void 0 : props.onCancel, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "xps-dialog", onClick: (event) => event.stopPropagation(), children: [
562
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "xps-dialog-title", children: props.title }),
563
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "xps-dialog-body", children: props.message }),
564
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "xps-dialog-actions", children: [
565
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Button, { onClick: props.onCancel, disabled: props.busy, children: "\u53D6\u6D88" }),
566
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
546
567
  Button,
547
568
  {
548
569
  variant: props.danger ? "danger" : "primary",
@@ -588,8 +609,8 @@ var editActionsStyle = {
588
609
  gap: 8
589
610
  };
590
611
  function Field(props) {
591
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [
592
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: fieldLabelStyle, children: props.label }),
612
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [
613
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { style: fieldLabelStyle, children: props.label }),
593
614
  props.children
594
615
  ] });
595
616
  }
@@ -627,33 +648,33 @@ function MetaEditPanel(props) {
627
648
  setError(null);
628
649
  props.onSubmit(patch);
629
650
  };
630
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "xps-dev-versions", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: editPanelStyle, children: [
631
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: editHeadStyle, children: [
632
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "xps-dev-ver-no", children: "\u7F16\u8F91\u8D44\u6599" }),
633
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "xps-text-caption", children: "\u53EA\u80FD\u6539\u8FD9 4 \u9879;\u5305\u540D\u4E0E\u63D2\u4EF6\u6807\u8BC6\u662F\u5BF9\u5916\u8EAB\u4EFD,\u4E0D\u53EF\u6539(README \u8BF7\u63D0\u4EA4\u65B0\u7248\u672C)" })
651
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "xps-dev-versions", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { style: editPanelStyle, children: [
652
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { style: editHeadStyle, children: [
653
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "xps-dev-ver-no", children: "\u7F16\u8F91\u8D44\u6599" }),
654
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "xps-text-caption", children: "\u53EA\u80FD\u6539\u8FD9 4 \u9879;\u5305\u540D\u4E0E\u63D2\u4EF6\u6807\u8BC6\u662F\u5BF9\u5916\u8EAB\u4EFD,\u4E0D\u53EF\u6539(README \u8BF7\u63D0\u4EA4\u65B0\u7248\u672C)" })
634
655
  ] }),
635
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { marginBottom: 6 }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Field, { label: `\u7B80\u4ECB(\u5FC5\u586B,\u4E0D\u8D85\u8FC7 ${LIMIT_SUMMARY} \u5B57)`, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Input, { value: summary, onChange: setSummary, placeholder: "\u4E00\u53E5\u8BDD\u4ECB\u7ECD\u8FD9\u4E2A\u63D2\u4EF6" }) }) }),
636
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { display: "flex", gap: 6, marginBottom: 6 }, children: [
637
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Field, { label: `\u5C55\u793A\u540D(\u53EF\u9009,\u4E0D\u8D85\u8FC7 ${LIMIT_DISPLAY_NAME} \u5B57)`, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Input, { value: displayName, onChange: setDisplayName, placeholder: "\u7559\u7A7A\u5219\u7528\u5305\u540D" }) }),
638
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Field, { label: "\u5206\u7C7B(\u53EF\u9009)", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
656
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { style: { marginBottom: 6 }, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Field, { label: `\u7B80\u4ECB(\u5FC5\u586B,\u4E0D\u8D85\u8FC7 ${LIMIT_SUMMARY} \u5B57)`, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Input, { value: summary, onChange: setSummary, placeholder: "\u4E00\u53E5\u8BDD\u4ECB\u7ECD\u8FD9\u4E2A\u63D2\u4EF6" }) }) }),
657
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { style: { display: "flex", gap: 6, marginBottom: 6 }, children: [
658
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Field, { label: `\u5C55\u793A\u540D(\u53EF\u9009,\u4E0D\u8D85\u8FC7 ${LIMIT_DISPLAY_NAME} \u5B57)`, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Input, { value: displayName, onChange: setDisplayName, placeholder: "\u7559\u7A7A\u5219\u7528\u5305\u540D" }) }),
659
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Field, { label: "\u5206\u7C7B(\u53EF\u9009)", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
639
660
  "select",
640
661
  {
641
662
  className: "xps-input",
642
663
  value: categoryId,
643
664
  onChange: (event) => setCategoryId(event.target.value),
644
665
  children: [
645
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: "", children: "\u672A\u5206\u7C7B" }),
646
- options.map((item) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: item.id, children: item.name }, item.id))
666
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("option", { value: "", children: "\u672A\u5206\u7C7B" }),
667
+ options.map((item) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("option", { value: item.id, children: item.name }, item.id))
647
668
  ]
648
669
  }
649
670
  ) })
650
671
  ] }),
651
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { marginBottom: 8 }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Field, { label: `\u56FE\u6807\u5730\u5740(\u53EF\u9009,\u4E0D\u8D85\u8FC7 ${LIMIT_ICON_URL} \u5B57)`, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Input, { value: iconUrl, onChange: setIconUrl, placeholder: "https://\u2026/icon.svg" }) }) }),
652
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: editHintStyle, children: "\u5C55\u793A\u540D / \u5206\u7C7B / \u56FE\u6807\u5730\u5740\u7559\u7A7A = \u6E05\u7A7A;\u53EA\u63D0\u4EA4\u6539\u52A8\u8FC7\u7684\u5B57\u6BB5,\u672A\u7F16\u8F91\u7684\u4E0D\u4F1A\u88AB\u8986\u76D6\u3002" }),
653
- error !== null && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "xps-banner xps-banner-error", style: { margin: "8px 0 0" }, children: error }),
654
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: editActionsStyle, children: [
655
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Button, { size: "small", variant: "ghost", onClick: props.onCancel, disabled: props.busy, children: "\u53D6\u6D88" }),
656
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Button, { size: "small", variant: "primary", onClick: handleSubmit, disabled: props.busy, children: props.busy ? "\u4FDD\u5B58\u4E2D\u2026" : "\u4FDD\u5B58\u8D44\u6599" })
672
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { style: { marginBottom: 8 }, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Field, { label: `\u56FE\u6807\u5730\u5740(\u53EF\u9009,\u4E0D\u8D85\u8FC7 ${LIMIT_ICON_URL} \u5B57)`, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Input, { value: iconUrl, onChange: setIconUrl, placeholder: "https://\u2026/icon.svg" }) }) }),
673
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { style: editHintStyle, children: "\u5C55\u793A\u540D / \u5206\u7C7B / \u56FE\u6807\u5730\u5740\u7559\u7A7A = \u6E05\u7A7A;\u53EA\u63D0\u4EA4\u6539\u52A8\u8FC7\u7684\u5B57\u6BB5,\u672A\u7F16\u8F91\u7684\u4E0D\u4F1A\u88AB\u8986\u76D6\u3002" }),
674
+ error !== null && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "xps-banner xps-banner-error", style: { margin: "8px 0 0" }, children: error }),
675
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { style: editActionsStyle, children: [
676
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Button, { size: "small", variant: "ghost", onClick: props.onCancel, disabled: props.busy, children: "\u53D6\u6D88" }),
677
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Button, { size: "small", variant: "primary", onClick: handleSubmit, disabled: props.busy, children: props.busy ? "\u4FDD\u5B58\u4E2D\u2026" : "\u4FDD\u5B58\u8D44\u6599" })
657
678
  ] })
658
679
  ] }) });
659
680
  }
@@ -773,16 +794,16 @@ function primaryColorFor(name) {
773
794
  }
774
795
 
775
796
  // src/client/pages/market/PluginIcon.tsx
776
- var import_jsx_runtime9 = require("react/jsx-runtime");
797
+ var import_jsx_runtime10 = require("react/jsx-runtime");
777
798
  function PluginIcon(props) {
778
799
  const size = props.size ?? 40;
779
800
  if (props.iconUrl !== "") {
780
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("img", { className: "xps-mk-icon", src: props.iconUrl, alt: "", style: { width: size, height: size } });
801
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("img", { className: "xps-mk-icon", src: props.iconUrl, alt: "", style: { width: size, height: size } });
781
802
  }
782
803
  const short = (props.name.split("/").pop() ?? props.name).replace(/^dsh-xrxs-?/, "");
783
804
  const letter = short.charAt(0).toUpperCase();
784
805
  const [from, to] = gradientFor(props.name);
785
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
806
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
786
807
  "span",
787
808
  {
788
809
  className: "xps-mk-icon",
@@ -1124,7 +1145,7 @@ function ensureMarketStyles() {
1124
1145
 
1125
1146
  // src/client/pages/UploadForm.tsx
1126
1147
  var import_react3 = require("react");
1127
- var import_jsx_runtime10 = require("react/jsx-runtime");
1148
+ var import_jsx_runtime11 = require("react/jsx-runtime");
1128
1149
  var MAX_ARTIFACT_BYTES = 50 * 1024 * 1024;
1129
1150
  var VERSION_PATTERN = /^\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?$/;
1130
1151
  var FLOW_STEPS = [
@@ -1280,11 +1301,11 @@ async function walkEntry(entry, out) {
1280
1301
  }
1281
1302
  }
1282
1303
  function Labeled(props) {
1283
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [
1284
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { style: labelStyle, children: [
1285
- props.required && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { style: { color: "var(--dsw-alias-state-error-primary, #d83931)" }, children: "* " }),
1304
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [
1305
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { style: labelStyle, children: [
1306
+ props.required && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { style: { color: "var(--dsw-alias-state-error-primary, #d83931)" }, children: "* " }),
1286
1307
  props.label,
1287
- props.hint !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { style: { marginLeft: 6 }, children: props.hint })
1308
+ props.hint !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { style: { marginLeft: 6 }, children: props.hint })
1288
1309
  ] }),
1289
1310
  props.children
1290
1311
  ] });
@@ -1565,24 +1586,24 @@ function UploadForm(props) {
1565
1586
  onDragLeave: () => setDragOver(false),
1566
1587
  onDrop: handleDrop
1567
1588
  };
1568
- const dropInner = /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
1569
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "xps-up-drop-icon", children: "\u{1F4E6}" }),
1570
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "xps-up-drop-title", children: "\u62D6\u5165\u63D2\u4EF6\u4EE3\u7801\u76EE\u5F55" }),
1571
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { style: secondaryText, children: "\u76EE\u5F55\u91CC\u5305\u542B tgz \u4EA7\u7269\u5305\u5373\u53EF;\u6CA1\u6709\u7684\u8BDD\u518D\u5355\u72EC\u8865\u9009;\u6E90\u7801\u5305\u7531\u6574\u4E2A\u76EE\u5F55\u81EA\u52A8\u6253\u5305(node_modules / .git \u81EA\u52A8\u5254\u9664)" }),
1572
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "xps-up-drop-actions", onClick: (event) => event.stopPropagation(), children: [
1573
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Button, { size: "small", onClick: () => dirInputRef.current?.click(), children: "\u9009\u62E9\u76EE\u5F55" }),
1574
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Button, { size: "small", variant: "ghost", onClick: () => fileInputRef.current?.click(), children: "\u4EC5\u9009 tgz \u4EA7\u7269\u5305" })
1589
+ const dropInner = /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
1590
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "xps-up-drop-icon", children: "\u{1F4E6}" }),
1591
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "xps-up-drop-title", children: "\u62D6\u5165\u63D2\u4EF6\u4EE3\u7801\u76EE\u5F55" }),
1592
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { style: secondaryText, children: "\u76EE\u5F55\u91CC\u5305\u542B tgz \u4EA7\u7269\u5305\u5373\u53EF;\u6CA1\u6709\u7684\u8BDD\u518D\u5355\u72EC\u8865\u9009;\u6E90\u7801\u5305\u7531\u6574\u4E2A\u76EE\u5F55\u81EA\u52A8\u6253\u5305(node_modules / .git \u81EA\u52A8\u5254\u9664)" }),
1593
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-up-drop-actions", onClick: (event) => event.stopPropagation(), children: [
1594
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Button, { size: "small", onClick: () => dirInputRef.current?.click(), children: "\u9009\u62E9\u76EE\u5F55" }),
1595
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Button, { size: "small", variant: "ghost", onClick: () => fileInputRef.current?.click(), children: "\u4EC5\u9009 tgz \u4EA7\u7269\u5305" })
1575
1596
  ] })
1576
1597
  ] });
1577
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { children: [
1578
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "xps-page-head", children: [
1579
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { children: [
1580
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("h1", { className: "xps-page-title", children: heading }),
1581
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "xps-page-intro", children: "\u9009\u62E9\u63D2\u4EF6\u4EE3\u7801\u76EE\u5F55(\u5185\u542B tgz \u4EA7\u7269\u5305),\u6E90\u7801\u5305\u81EA\u52A8\u6253\u5305;\u5305\u540D / \u7248\u672C\u4F1A\u81EA\u52A8\u8BC6\u522B\u586B\u5145" })
1598
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { children: [
1599
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-page-head", children: [
1600
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { children: [
1601
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("h1", { className: "xps-page-title", children: heading }),
1602
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "xps-page-intro", children: "\u9009\u62E9\u63D2\u4EF6\u4EE3\u7801\u76EE\u5F55(\u5185\u542B tgz \u4EA7\u7269\u5305),\u6E90\u7801\u5305\u81EA\u52A8\u6253\u5305;\u5305\u540D / \u7248\u672C\u4F1A\u81EA\u52A8\u8BC6\u522B\u586B\u5145" })
1582
1603
  ] }),
1583
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "xps-page-actions", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Button, { size: "small", onClick: props.onCancel, disabled: submitting, children: "\u8FD4\u56DE\u5217\u8868" }) })
1604
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "xps-page-actions", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Button, { size: "small", onClick: props.onCancel, disabled: submitting, children: "\u8FD4\u56DE\u5217\u8868" }) })
1584
1605
  ] }),
1585
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1606
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1586
1607
  "input",
1587
1608
  {
1588
1609
  ref: dirInputRef,
@@ -1595,7 +1616,7 @@ function UploadForm(props) {
1595
1616
  }
1596
1617
  }
1597
1618
  ),
1598
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1619
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1599
1620
  "input",
1600
1621
  {
1601
1622
  ref: artifactInputRef,
@@ -1608,7 +1629,7 @@ function UploadForm(props) {
1608
1629
  }
1609
1630
  }
1610
1631
  ),
1611
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1632
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1612
1633
  "input",
1613
1634
  {
1614
1635
  ref: fileInputRef,
@@ -1622,27 +1643,27 @@ function UploadForm(props) {
1622
1643
  }
1623
1644
  }
1624
1645
  ),
1625
- scanned ? /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "xps-up-layout", children: [
1626
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: `xps-up-drop xps-up-side-drop${dragOver ? " xps-up-drop-over" : ""}`, ...dropHandlers, children: dropInner }),
1627
- (sourceNotice !== null || inspectError !== null) && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "xps-up-side-notice", children: [
1628
- sourceNotice !== null && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "xps-banner", children: sourceNotice }),
1629
- inspectError !== null && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "xps-banner xps-banner-error", children: inspectError })
1646
+ scanned ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-up-layout", children: [
1647
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: `xps-up-drop xps-up-side-drop${dragOver ? " xps-up-drop-over" : ""}`, ...dropHandlers, children: dropInner }),
1648
+ (sourceNotice !== null || inspectError !== null) && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-up-side-notice", children: [
1649
+ sourceNotice !== null && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "xps-banner", children: sourceNotice }),
1650
+ inspectError !== null && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "xps-banner xps-banner-error", children: inspectError })
1630
1651
  ] }),
1631
- scanned && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "xps-up-card xps-up-side-scan", children: [
1632
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "xps-up-card-title", children: [
1633
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "xps-up-step-chip", children: "\u7B2C 1 \u6B65" }),
1634
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { children: "\u786E\u8BA4\u53D1\u5E03\u5185\u5BB9" }),
1635
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "xps-up-card-actions", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Button, { size: "small", variant: "ghost", onClick: () => artifactInputRef.current?.click(), children: artifactCandidates.length === 0 ? "\u8865\u9009\u4EA7\u7269\u5305" : "\u66F4\u6362\u4EA7\u7269\u5305" }) })
1652
+ scanned && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-up-card xps-up-side-scan", children: [
1653
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-up-card-title", children: [
1654
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "xps-up-step-chip", children: "\u7B2C 1 \u6B65" }),
1655
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: "\u786E\u8BA4\u53D1\u5E03\u5185\u5BB9" }),
1656
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "xps-up-card-actions", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Button, { size: "small", variant: "ghost", onClick: () => artifactInputRef.current?.click(), children: artifactCandidates.length === 0 ? "\u8865\u9009\u4EA7\u7269\u5305" : "\u66F4\u6362\u4EA7\u7269\u5305" }) })
1636
1657
  ] }),
1637
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { style: { marginBottom: 10 }, children: [
1638
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { style: { ...labelStyle, marginBottom: 4 }, children: "\u{1F4E6} \u4EA7\u7269\u5305(\u5FC5\u586B)" }),
1639
- artifactCandidates.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { style: secondaryText, children: "\u672A\u8BC6\u522B\u5230\u4EA7\u7269\u5305,\u8BF7\u624B\u52A8\u8865\u9009 *.tgz" }),
1640
- artifactCandidates.map((item) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1658
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { style: { marginBottom: 10 }, children: [
1659
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { style: { ...labelStyle, marginBottom: 4 }, children: "\u{1F4E6} \u4EA7\u7269\u5305(\u5FC5\u586B)" }),
1660
+ artifactCandidates.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { style: secondaryText, children: "\u672A\u8BC6\u522B\u5230\u4EA7\u7269\u5305,\u8BF7\u624B\u52A8\u8865\u9009 *.tgz" }),
1661
+ artifactCandidates.map((item) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
1641
1662
  "label",
1642
1663
  {
1643
1664
  className: `xps-up-candidate${selectedArtifact === item.path ? " xps-up-candidate-active" : ""}`,
1644
1665
  children: [
1645
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1666
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1646
1667
  "input",
1647
1668
  {
1648
1669
  type: "radio",
@@ -1651,10 +1672,10 @@ function UploadForm(props) {
1651
1672
  onChange: () => setSelectedArtifact(item.path)
1652
1673
  }
1653
1674
  ),
1654
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { children: "\u{1F4E6}" }),
1655
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("span", { className: "xps-up-candidate-main", children: [
1656
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "xps-up-candidate-name", children: item.file.name }),
1657
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "xps-up-candidate-path", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("bdi", { children: [
1675
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: "\u{1F4E6}" }),
1676
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "xps-up-candidate-main", children: [
1677
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "xps-up-candidate-name", children: item.file.name }),
1678
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "xps-up-candidate-path", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("bdi", { children: [
1658
1679
  formatSize(item.file.size),
1659
1680
  item.path !== item.file.name ? ` \xB7 ${item.path}` : ""
1660
1681
  ] }) })
@@ -1664,22 +1685,22 @@ function UploadForm(props) {
1664
1685
  item.path
1665
1686
  ))
1666
1687
  ] }),
1667
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { children: [
1668
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { style: { ...labelStyle, marginBottom: 4 }, children: "\u{1F5DC}\uFE0F \u6E90\u7801\u5305(\u7531\u4EE3\u7801\u76EE\u5F55\u81EA\u52A8\u6253\u5305)" }),
1669
- dirFiles.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { style: secondaryText, children: "\u63D0\u4EA4\u65F6\u5C06\u81EA\u52A8\u628A\u6240\u9009\u76EE\u5F55\u6253\u5305\u4E3A\u6E90\u7801\u4E0A\u4F20(node_modules / .git \u7B49\u4F1A\u81EA\u52A8\u5254\u9664)" }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "xps-up-source-missing", children: [
1670
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { children: "\u8FD8\u5DEE\u4EE3\u7801\u76EE\u5F55 \u2014\u2014 \u6E90\u7801\u5305\u5C06\u7531\u8BE5\u76EE\u5F55\u81EA\u52A8\u6253\u5305" }),
1671
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Button, { size: "small", onClick: () => dirInputRef.current?.click(), children: "\u9009\u62E9\u76EE\u5F55" })
1688
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { children: [
1689
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { style: { ...labelStyle, marginBottom: 4 }, children: "\u{1F5DC}\uFE0F \u6E90\u7801\u5305(\u7531\u4EE3\u7801\u76EE\u5F55\u81EA\u52A8\u6253\u5305)" }),
1690
+ dirFiles.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { style: secondaryText, children: "\u63D0\u4EA4\u65F6\u5C06\u81EA\u52A8\u628A\u6240\u9009\u76EE\u5F55\u6253\u5305\u4E3A\u6E90\u7801\u4E0A\u4F20(node_modules / .git \u7B49\u4F1A\u81EA\u52A8\u5254\u9664)" }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-up-source-missing", children: [
1691
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: "\u8FD8\u5DEE\u4EE3\u7801\u76EE\u5F55 \u2014\u2014 \u6E90\u7801\u5305\u5C06\u7531\u8BE5\u76EE\u5F55\u81EA\u52A8\u6253\u5305" }),
1692
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Button, { size: "small", onClick: () => dirInputRef.current?.click(), children: "\u9009\u62E9\u76EE\u5F55" })
1672
1693
  ] })
1673
1694
  ] })
1674
1695
  ] }),
1675
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
1676
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "xps-up-card xps-up-main-form", children: [
1677
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "xps-up-card-title", children: [
1678
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "xps-up-step-chip", children: "\u7B2C 2 \u6B65" }),
1679
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { children: "\u586B\u5199\u63D2\u4EF6\u4FE1\u606F" })
1696
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
1697
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-up-card xps-up-main-form", children: [
1698
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-up-card-title", children: [
1699
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "xps-up-step-chip", children: "\u7B2C 2 \u6B65" }),
1700
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: "\u586B\u5199\u63D2\u4EF6\u4FE1\u606F" })
1680
1701
  ] }),
1681
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "xps-up-grid", children: [
1682
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Labeled, { label: "\u5305\u540D", required: true, hint: "(\u4E0E\u4EA7\u7269\u5305\u5185 package.json \u7684 name \u4E00\u81F4)", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1702
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-up-grid", children: [
1703
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Labeled, { label: "\u5305\u540D", required: true, hint: "(\u4E0E\u4EA7\u7269\u5305\u5185 package.json \u7684 name \u4E00\u81F4)", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1683
1704
  Input,
1684
1705
  {
1685
1706
  value: packageName,
@@ -1687,7 +1708,7 @@ function UploadForm(props) {
1687
1708
  placeholder: "@xrxs-ai/dsh-xrxs-xxx"
1688
1709
  }
1689
1710
  ) }),
1690
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Labeled, { label: "\u7248\u672C", required: true, hint: versionLocked ? "(\u91CD\u63D0\u56FA\u5B9A\u4E3A\u8BE5\u7248\u672C)" : "", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1711
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Labeled, { label: "\u7248\u672C", required: true, hint: versionLocked ? "(\u91CD\u63D0\u56FA\u5B9A\u4E3A\u8BE5\u7248\u672C)" : "", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1691
1712
  Input,
1692
1713
  {
1693
1714
  value: versionLocked ? lockedVersion : version,
@@ -1697,32 +1718,32 @@ function UploadForm(props) {
1697
1718
  }
1698
1719
  ) })
1699
1720
  ] }),
1700
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "xps-up-grid", children: [
1701
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Labeled, { label: "\u63D2\u4EF6\u6807\u8BC6 pluginKey", required: false, hint: "(\u53EF\u9009,\u7559\u7A7A\u6309\u5305\u540D\u63A8\u5BFC)", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Input, { value: pluginKey, onChange: setPluginKey, placeholder: "\u81EA\u52A8\u63A8\u5BFC" }) }),
1702
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Labeled, { label: "\u5C55\u793A\u540D", required: false, hint: "(\u53EF\u9009,\u4E2D\u6587\u540D)", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Input, { value: displayName, onChange: setDisplayName, placeholder: "\u8003\u52E4\u52A9\u624B" }) })
1721
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-up-grid", children: [
1722
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Labeled, { label: "\u63D2\u4EF6\u6807\u8BC6 pluginKey", required: false, hint: "(\u53EF\u9009,\u7559\u7A7A\u6309\u5305\u540D\u63A8\u5BFC)", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Input, { value: pluginKey, onChange: setPluginKey, placeholder: "\u81EA\u52A8\u63A8\u5BFC" }) }),
1723
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Labeled, { label: "\u5C55\u793A\u540D", required: false, hint: "(\u53EF\u9009,\u4E2D\u6587\u540D)", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Input, { value: displayName, onChange: setDisplayName, placeholder: "\u8003\u52E4\u52A9\u624B" }) })
1703
1724
  ] }),
1704
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "xps-up-grid xps-up-grid-single", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Labeled, { label: "\u4E00\u53E5\u8BDD\u63CF\u8FF0", required: true, hint: "(\u5FC5\u586B,\u5E02\u573A\u5217\u8868\u91CC\u5C55\u793A)", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Input, { value: summary, onChange: setSummary, placeholder: "\u8003\u52E4\u67E5\u8BE2\u3001\u52A0\u73ED\u8C03\u4F11\u7EDF\u8BA1\u4E00\u952E\u76F4\u8FBE" }) }) }),
1705
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "xps-up-grid", children: [
1706
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Labeled, { label: "\u4F5C\u8005 / \u56E2\u961F", required: true, hint: "(\u5FC5\u586B)", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Input, { value: author, onChange: setAuthor, placeholder: "\u6548\u80FD\u5E73\u53F0\u7EC4" }) }),
1707
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Labeled, { label: "\u5206\u7C7B", required: false, hint: "(\u53EF\u9009)", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1725
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "xps-up-grid xps-up-grid-single", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Labeled, { label: "\u4E00\u53E5\u8BDD\u63CF\u8FF0", required: true, hint: "(\u5FC5\u586B,\u5E02\u573A\u5217\u8868\u91CC\u5C55\u793A)", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Input, { value: summary, onChange: setSummary, placeholder: "\u8003\u52E4\u67E5\u8BE2\u3001\u52A0\u73ED\u8C03\u4F11\u7EDF\u8BA1\u4E00\u952E\u76F4\u8FBE" }) }) }),
1726
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-up-grid", children: [
1727
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Labeled, { label: "\u4F5C\u8005 / \u56E2\u961F", required: true, hint: "(\u5FC5\u586B)", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Input, { value: author, onChange: setAuthor, placeholder: "\u6548\u80FD\u5E73\u53F0\u7EC4" }) }),
1728
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Labeled, { label: "\u5206\u7C7B", required: false, hint: "(\u53EF\u9009)", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
1708
1729
  "select",
1709
1730
  {
1710
1731
  className: "xps-input",
1711
1732
  value: category,
1712
1733
  onChange: (event) => setCategory(event.target.value),
1713
1734
  children: [
1714
- categoryOptions.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("option", { value: "", children: "\u52A0\u8F7D\u4E2D\u2026" }),
1715
- categoryOptions.map((item) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("option", { value: item.id, children: item.name }, item.id))
1735
+ categoryOptions.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("option", { value: "", children: "\u52A0\u8F7D\u4E2D\u2026" }),
1736
+ categoryOptions.map((item) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("option", { value: item.id, children: item.name }, item.id))
1716
1737
  ]
1717
1738
  }
1718
1739
  ) })
1719
1740
  ] }),
1720
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "xps-up-grid", children: [
1721
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Labeled, { label: "\u53D1\u5E03\u65B9\u5F0F", required: true, hint: "(\u56FA\u5B9A\u4E3A\u79C1\u6709\u53D1\u5E03)", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("select", { className: "xps-input", value: "tgz", disabled: true, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("option", { value: "tgz", children: "\u76EE\u5F55\u6253\u5305\u63D0\u4EA4(\u79C1\u6709\u53D1\u5E03)" }) }) }),
1722
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Labeled, { label: "\u517C\u5BB9 dsh \u7248\u672C\u8303\u56F4", required: false, hint: "(\u53EF\u9009)", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Input, { value: compatRange, onChange: setCompatRange, placeholder: ">=0.2.0" }) })
1741
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-up-grid", children: [
1742
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Labeled, { label: "\u53D1\u5E03\u65B9\u5F0F", required: true, hint: "(\u56FA\u5B9A\u4E3A\u79C1\u6709\u53D1\u5E03)", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("select", { className: "xps-input", value: "tgz", disabled: true, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("option", { value: "tgz", children: "\u76EE\u5F55\u6253\u5305\u63D0\u4EA4(\u79C1\u6709\u53D1\u5E03)" }) }) }),
1743
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Labeled, { label: "\u517C\u5BB9 dsh \u7248\u672C\u8303\u56F4", required: false, hint: "(\u53EF\u9009)", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Input, { value: compatRange, onChange: setCompatRange, placeholder: ">=0.2.0" }) })
1723
1744
  ] }),
1724
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "xps-up-grid xps-up-grid-single", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Labeled, { label: "\u56FE\u6807 URL", required: false, hint: "(\u53EF\u9009,\u7559\u7A7A\u6309\u5305\u540D\u751F\u6210\u8272\u5757)", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Input, { value: iconUrl, onChange: setIconUrl, placeholder: "https://\u2026/icon.svg" }) }) }),
1725
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "xps-up-grid xps-up-grid-single", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Labeled, { label: "README", required: false, hint: "(markdown,\u5E02\u573A\u8BE6\u60C5\u9875\u5168\u6587;\u4E0A\u67B6\u540E\u53EA\u80FD\u9760\u63D0\u4EA4\u65B0\u7248\u672C\u6539)", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1745
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "xps-up-grid xps-up-grid-single", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Labeled, { label: "\u56FE\u6807 URL", required: false, hint: "(\u53EF\u9009,\u7559\u7A7A\u6309\u5305\u540D\u751F\u6210\u8272\u5757)", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Input, { value: iconUrl, onChange: setIconUrl, placeholder: "https://\u2026/icon.svg" }) }) }),
1746
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "xps-up-grid xps-up-grid-single", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Labeled, { label: "README", required: false, hint: "(markdown,\u5E02\u573A\u8BE6\u60C5\u9875\u5168\u6587;\u4E0A\u67B6\u540E\u53EA\u80FD\u9760\u63D0\u4EA4\u65B0\u7248\u672C\u6539)", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1726
1747
  "textarea",
1727
1748
  {
1728
1749
  className: "xps-input",
@@ -1732,7 +1753,7 @@ function UploadForm(props) {
1732
1753
  onChange: (event) => setDescription(event.target.value)
1733
1754
  }
1734
1755
  ) }) }),
1735
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "xps-up-grid xps-up-grid-single", style: { marginBottom: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Labeled, { label: "\u66F4\u65B0\u8BF4\u660E changelog", required: false, hint: "(\u53EF\u9009,\u7248\u672C\u5386\u53F2\u91CC\u5C55\u793A)", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1756
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "xps-up-grid xps-up-grid-single", style: { marginBottom: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Labeled, { label: "\u66F4\u65B0\u8BF4\u660E changelog", required: false, hint: "(\u53EF\u9009,\u7248\u672C\u5386\u53F2\u91CC\u5C55\u793A)", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1736
1757
  "textarea",
1737
1758
  {
1738
1759
  className: "xps-input",
@@ -1743,9 +1764,9 @@ function UploadForm(props) {
1743
1764
  }
1744
1765
  ) }) })
1745
1766
  ] }),
1746
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "xps-up-main-submit", children: [
1747
- submitError !== null && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "xps-banner xps-banner-error", style: { marginBottom: 10 }, children: submitError }),
1748
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1767
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-up-main-submit", children: [
1768
+ submitError !== null && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "xps-banner xps-banner-error", style: { marginBottom: 10 }, children: submitError }),
1769
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1749
1770
  "button",
1750
1771
  {
1751
1772
  type: "button",
@@ -1758,55 +1779,55 @@ function UploadForm(props) {
1758
1779
  children: submitting ? "\u63D0\u4EA4\u4E2D\u2026" : "\u63D0\u4EA4\u5BA1\u6838"
1759
1780
  }
1760
1781
  ),
1761
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { style: { ...secondaryText, marginTop: 6, textAlign: "center" }, children: "\u4EA7\u7269 \u2264 50MB\u3001\u6E90\u7801 \u2264 100MB;\u540C\u4E00\u4E2A\u63D2\u4EF6 10 \u5206\u949F\u5185\u53EA\u80FD\u63D0\u4EA4\u4E00\u6B21" })
1782
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { style: { ...secondaryText, marginTop: 6, textAlign: "center" }, children: "\u4EA7\u7269 \u2264 50MB\u3001\u6E90\u7801 \u2264 100MB;\u540C\u4E00\u4E2A\u63D2\u4EF6 10 \u5206\u949F\u5185\u53EA\u80FD\u63D0\u4EA4\u4E00\u6B21" })
1762
1783
  ] })
1763
1784
  ] })
1764
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "xps-up-empty-grid", children: [
1765
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: `xps-up-drop${dragOver ? " xps-up-drop-over" : ""}`, ...dropHandlers, children: dropInner }),
1766
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "xps-up-empty xps-up-empty-static", children: [
1767
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "xps-up-flow", children: [
1768
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "xps-up-flow-title", children: "\u53D1\u5E03\u6D41\u7A0B" }),
1769
- FLOW_STEPS.map((step) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "xps-up-flow-item", children: [
1770
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "xps-up-flow-no", children: step.no }),
1771
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("span", { className: "xps-up-flow-main", children: [
1772
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "xps-up-flow-item-title", children: step.title }),
1773
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "xps-up-flow-item-desc", children: step.desc })
1785
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-up-empty-grid", children: [
1786
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: `xps-up-drop${dragOver ? " xps-up-drop-over" : ""}`, ...dropHandlers, children: dropInner }),
1787
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-up-empty xps-up-empty-static", children: [
1788
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-up-flow", children: [
1789
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "xps-up-flow-title", children: "\u53D1\u5E03\u6D41\u7A0B" }),
1790
+ FLOW_STEPS.map((step) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-up-flow-item", children: [
1791
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "xps-up-flow-no", children: step.no }),
1792
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "xps-up-flow-main", children: [
1793
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "xps-up-flow-item-title", children: step.title }),
1794
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "xps-up-flow-item-desc", children: step.desc })
1774
1795
  ] })
1775
1796
  ] }, step.no))
1776
1797
  ] }),
1777
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "xps-text-caption", children: "\u5185\u5BB9\u81EA\u52A8\u8BC6\u522B,\u9009\u4E2D\u540E\u4ECD\u53EF\u624B\u52A8\u4FEE\u6539" })
1798
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "xps-text-caption", children: "\u5185\u5BB9\u81EA\u52A8\u8BC6\u522B,\u9009\u4E2D\u540E\u4ECD\u53EF\u624B\u52A8\u4FEE\u6539" })
1778
1799
  ] })
1779
1800
  ] }),
1780
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "xps-up-guide", children: [
1781
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "xps-up-guide-title", children: "\u53D1\u5E03\u8BF4\u660E" }),
1782
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("ol", { children: [
1783
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("li", { children: [
1784
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("b", { children: "\u81EA\u52A8\u8BC6\u522B\u586B\u5145:" }),
1801
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-up-guide", children: [
1802
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "xps-up-guide-title", children: "\u53D1\u5E03\u8BF4\u660E" }),
1803
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("ol", { children: [
1804
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("li", { children: [
1805
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("b", { children: "\u81EA\u52A8\u8BC6\u522B\u586B\u5145:" }),
1785
1806
  "\u9009\u62E9\u4EE3\u7801\u76EE\u5F55\u540E,\u5305\u540D\u3001\u7248\u672C\u3001\u4E00\u53E5\u8BDD\u63CF\u8FF0\u3001\u4F5C\u8005\u4F1A\u4ECE\u76EE\u5F55\u91CC package.json \u81EA\u52A8\u8BFB\u53D6\u5E76\u586B\u5145,\u9009\u4E2D\u540E\u4ECD\u53EF\u624B\u52A8\u4FEE\u6539;\u76EE\u5F55\u6839\u7684 README.md \u4F1A\u81EA\u52A8\u586B\u5165\u4E0B\u65B9\u300CREADME\u300D\u6846\u3002"
1786
1807
  ] }),
1787
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("li", { children: [
1788
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("b", { children: "README \u8BF7\u5C3D\u91CF\u5199\u6E05\u695A:" }),
1808
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("li", { children: [
1809
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("b", { children: "README \u8BF7\u5C3D\u91CF\u5199\u6E05\u695A:" }),
1789
1810
  "README \u662F\u5E02\u573A\u8BE6\u60C5\u9875\u7684\u5168\u90E8\u5C55\u793A\u5185\u5BB9,\u652F\u6301\u6807\u51C6 markdown(\u6807\u9898\u3001\u5217\u8868\u3001\u8868\u683C\u3001\u4EE3\u7801\u5757\u3001\u94FE\u63A5)\u3002\u5EFA\u8BAE\u5305\u542B:\u63D2\u4EF6\u89E3\u51B3\u4EC0\u4E48\u95EE\u9898\u3001\u5982\u4F55\u5B89\u88C5\u542F\u7528\u3001\u5404\u529F\u80FD\u600E\u4E48\u7528\u3001\u6709\u54EA\u4E9B\u914D\u7F6E\u9879\u4E0E\u6CE8\u610F\u4E8B\u9879 \u2014\u2014 \u8BF4\u660E\u8D8A\u5B8C\u6574,\u8D8A\u5BB9\u6613\u901A\u8FC7\u5BA1\u6838,\u4E5F\u8D8A\u5BB9\u6613\u88AB\u4F7F\u7528\u3002"
1790
1811
  ] }),
1791
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("li", { children: [
1792
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("b", { children: "\u4EA7\u7269\u5305(*.tgz):" }),
1812
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("li", { children: [
1813
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("b", { children: "\u4EA7\u7269\u5305(*.tgz):" }),
1793
1814
  "\u76EE\u5F55\u5185\u9700\u5305\u542B npm pack \u4EA7\u51FA\u7684\u4EA7\u7269\u5305,\u5305\u540D / \u7248\u672C\u5FC5\u987B\u4E0E package.json \u4E00\u81F4(\u5426\u5219\u670D\u52A1\u7AEF\u62D2\u6536);\u76EE\u5F55\u91CC\u6CA1\u6709\u65F6\u70B9\u300C\u8865\u9009\u4EA7\u7269\u5305\u300D\u5355\u72EC\u9009\u62E9\u3002"
1794
1815
  ] }),
1795
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("li", { children: [
1796
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("b", { children: "\u6E90\u7801\u5305\u81EA\u52A8\u6253\u5305:" }),
1816
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("li", { children: [
1817
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("b", { children: "\u6E90\u7801\u5305\u81EA\u52A8\u6253\u5305:" }),
1797
1818
  "\u63D0\u4EA4\u65F6\u6574\u4E2A\u76EE\u5F55\u4F1A\u81EA\u52A8\u6253\u5305\u4E3A\u6E90\u7801,node_modules / .git / .DS_Store \u7B49\u4F1A\u81EA\u52A8\u5254\u9664;\u8BF7\u786E\u8BA4\u76EE\u5F55\u91CC\u4E0D\u542B\u5BC6\u94A5\u3001\u5185\u7F51\u5730\u5740\u7B49\u654F\u611F\u4FE1\u606F,\u4E14\u6587\u4EF6\u6570 \u2264 5000\u3001\u603B\u5927\u5C0F \u2264 190MB\u3002"
1798
1819
  ] }),
1799
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("li", { children: [
1800
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("b", { children: "\u7248\u672C\u53F7\u5FC5\u987B\u9012\u589E:" }),
1820
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("li", { children: [
1821
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("b", { children: "\u7248\u672C\u53F7\u5FC5\u987B\u9012\u589E:" }),
1801
1822
  "\u518D\u6B21\u63D0\u4EA4\u540C\u4E00\u63D2\u4EF6\u65F6,\u7248\u672C\u53F7\u5FC5\u987B\u5927\u4E8E\u5DF2\u53D1\u5E03\u7684\u6700\u65B0\u7248\u672C;\u540C\u4E00\u63D2\u4EF6 10 \u5206\u949F\u5185\u53EA\u80FD\u63D0\u4EA4\u4E00\u6B21\u3002"
1802
1823
  ] }),
1803
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("li", { children: [
1804
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("b", { children: "\u5BA1\u6838\u4E0A\u67B6:" }),
1824
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("li", { children: [
1825
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("b", { children: "\u5BA1\u6838\u4E0A\u67B6:" }),
1805
1826
  "\u63D0\u4EA4\u540E\u8FDB\u5165\u5BA1\u6838,\u5BA1\u6838\u901A\u8FC7\u5373\u4E0A\u67B6\u5E02\u573A;\u9A73\u56DE\u4F1A\u7ED9\u51FA\u7406\u7531,\u4FEE\u6539\u540E\u53EF\u91CD\u65B0\u63D0\u4EA4\u3002"
1806
1827
  ] })
1807
1828
  ] })
1808
1829
  ] }),
1809
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ToastHost, { items, onDismiss: dismiss })
1830
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ToastHost, { items, onDismiss: dismiss })
1810
1831
  ] });
1811
1832
  }
1812
1833
  function formatSize(bytes) {
@@ -1816,7 +1837,7 @@ function formatSize(bytes) {
1816
1837
  }
1817
1838
 
1818
1839
  // src/client/pages/DeveloperPage.tsx
1819
- var import_jsx_runtime11 = require("react/jsx-runtime");
1840
+ var import_jsx_runtime12 = require("react/jsx-runtime");
1820
1841
  function mergePluginDetail(list, detail) {
1821
1842
  const index = list.findIndex((item) => item.id === detail.id);
1822
1843
  if (index < 0) return [detail, ...list];
@@ -1974,25 +1995,25 @@ function DeveloperPage() {
1974
1995
  [applyDetail, push]
1975
1996
  );
1976
1997
  if (authLoading) {
1977
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Skeleton, { lines: 3 });
1998
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Skeleton, { lines: 3 });
1978
1999
  }
1979
2000
  if (auth === null) {
1980
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { children: [
1981
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "xps-page-head", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { children: [
1982
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("h1", { className: "xps-page-title", children: "\u6211\u7684" }),
1983
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "xps-page-intro", children: "\u4E0A\u4F20\u63D2\u4EF6\u5E76\u67E5\u770B\u5BA1\u6838\u72B6\u6001" })
2001
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { children: [
2002
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "xps-page-head", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { children: [
2003
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h1", { className: "xps-page-title", children: "\u6211\u7684" }),
2004
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "xps-page-intro", children: "\u4E0A\u4F20\u63D2\u4EF6\u5E76\u67E5\u770B\u5BA1\u6838\u72B6\u6001" })
1984
2005
  ] }) }),
1985
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-guide", children: [
1986
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "xps-guide-title", children: "\u{1F512} \u672A\u767B\u5F55\u5F00\u53D1\u8005\u8D26\u53F7" }),
1987
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "xps-guide-desc", children: "\u63D2\u4EF6\u7684\u53D1\u5E03\u4E0E\u5BA1\u6838\u5728\u5F00\u53D1\u8005\u5E73\u53F0\u7F51\u9875\u7AEF\u5B8C\u6210;\u767B\u5F55\u540E\u53EF\u5728\u672C\u9875\u4E0A\u4F20\u63D2\u4EF6\u3001\u8DDF\u8E2A\u5BA1\u6838\u8FDB\u5EA6\u3002" }),
1988
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("ol", { className: "xps-guide-steps", children: [
1989
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("li", { children: "\u767B\u5F55\u5F00\u53D1\u8005\u5E73\u53F0,\u5728\u300C\u4E2A\u4EBA\u8BBE\u7F6E \u2192 \u8BBF\u95EE\u4EE4\u724C\u300D\u751F\u6210\u8BBF\u95EE\u4EE4\u724C" }),
1990
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("li", { children: "\u672C\u5730\u5F00\u53D1\u63D2\u4EF6\u5E76\u6253\u5305(.tgz \u79C1\u6709\u53D1\u5E03,\u6216 npm \u516C\u5F00\u53D1\u5E03)" }),
1991
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("li", { children: "\u6253\u5F00 \u8BBE\u7F6E \u2192 \u901A\u7528\u8BBE\u7F6E \u2192 \u85AA\u4EBA\u85AA\u4E8B\u5E02\u573A,\u7C98\u8D34\u4EE4\u724C\u5B8C\u6210\u767B\u5F55" }),
1992
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("li", { children: "\u56DE\u5230\u672C\u9875\u4E0A\u4F20\u63D2\u4EF6\u3001\u8DDF\u8E2A\u5BA1\u6838\u72B6\u6001" })
2006
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "xps-guide", children: [
2007
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "xps-guide-title", children: "\u{1F512} \u672A\u767B\u5F55\u5F00\u53D1\u8005\u8D26\u53F7" }),
2008
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "xps-guide-desc", children: "\u63D2\u4EF6\u7684\u53D1\u5E03\u4E0E\u5BA1\u6838\u5728\u5F00\u53D1\u8005\u5E73\u53F0\u7F51\u9875\u7AEF\u5B8C\u6210;\u767B\u5F55\u540E\u53EF\u5728\u672C\u9875\u4E0A\u4F20\u63D2\u4EF6\u3001\u8DDF\u8E2A\u5BA1\u6838\u8FDB\u5EA6\u3002" }),
2009
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("ol", { className: "xps-guide-steps", children: [
2010
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("li", { children: "\u767B\u5F55\u5F00\u53D1\u8005\u5E73\u53F0,\u5728\u300C\u4E2A\u4EBA\u8BBE\u7F6E \u2192 \u8BBF\u95EE\u4EE4\u724C\u300D\u751F\u6210\u8BBF\u95EE\u4EE4\u724C" }),
2011
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("li", { children: "\u672C\u5730\u5F00\u53D1\u63D2\u4EF6\u5E76\u6253\u5305(.tgz \u79C1\u6709\u53D1\u5E03,\u6216 npm \u516C\u5F00\u53D1\u5E03)" }),
2012
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("li", { children: "\u6253\u5F00 \u8BBE\u7F6E \u2192 \u901A\u7528\u8BBE\u7F6E \u2192 \u85AA\u4EBA\u85AA\u4E8B\u5E02\u573A,\u7C98\u8D34\u4EE4\u724C\u5B8C\u6210\u767B\u5F55" }),
2013
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("li", { children: "\u56DE\u5230\u672C\u9875\u4E0A\u4F20\u63D2\u4EF6\u3001\u8DDF\u8E2A\u5BA1\u6838\u72B6\u6001" })
1993
2014
  ] }),
1994
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-guide-actions", children: [
1995
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2015
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "xps-guide-actions", children: [
2016
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1996
2017
  Button,
1997
2018
  {
1998
2019
  variant: "primary",
@@ -2006,7 +2027,7 @@ function DeveloperPage() {
2006
2027
  children: "\u524D\u5F80\u5F00\u53D1\u8005\u5E73\u53F0"
2007
2028
  }
2008
2029
  ),
2009
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2030
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2010
2031
  Button,
2011
2032
  {
2012
2033
  variant: "outline",
@@ -2020,15 +2041,15 @@ function DeveloperPage() {
2020
2041
  }
2021
2042
  )
2022
2043
  ] }),
2023
- portalUrl !== "" && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "xps-guide-url xps-mono", children: portalUrl })
2044
+ portalUrl !== "" && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "xps-guide-url xps-mono", children: portalUrl })
2024
2045
  ] }),
2025
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ToastHost, { items, onDismiss: dismiss })
2046
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ToastHost, { items, onDismiss: dismiss })
2026
2047
  ] });
2027
2048
  }
2028
2049
  if (view.kind === "upload") {
2029
2050
  const target = view.target;
2030
2051
  const formKey = target.kind === "new" ? "upload-new" : target.kind === "version" ? `version-${target.key}` : `resubmit-${target.key}-${target.version}`;
2031
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2052
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2032
2053
  UploadForm,
2033
2054
  {
2034
2055
  target: view.target,
@@ -2039,25 +2060,25 @@ function DeveloperPage() {
2039
2060
  formKey
2040
2061
  );
2041
2062
  }
2042
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { children: [
2043
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-page-head", children: [
2044
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { children: [
2045
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("h1", { className: "xps-page-title", children: "\u6211\u7684" }),
2046
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("p", { className: "xps-page-intro", children: [
2063
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { children: [
2064
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "xps-page-head", children: [
2065
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { children: [
2066
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h1", { className: "xps-page-title", children: "\u6211\u7684" }),
2067
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("p", { className: "xps-page-intro", children: [
2047
2068
  auth.developer.name,
2048
2069
  " \xB7",
2049
2070
  " ",
2050
2071
  auth.expiresAt === "" ? "token \u957F\u671F\u6709\u6548" : `token \u6709\u6548\u671F\u81F3 ${formatDateTime(auth.expiresAt)}`
2051
2072
  ] })
2052
2073
  ] }),
2053
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-page-actions", children: [
2054
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Button, { size: "small", variant: "ghost", onClick: handleLogout, children: "\u767B\u51FA" }),
2055
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("button", { type: "button", className: "xps-icon-btn", title: "\u5237\u65B0", onClick: loadPlugins, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(RefreshIcon, {}) }),
2056
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Button, { variant: "primary", onClick: () => openUpload({ kind: "new" }, {}), children: "+ \u4E0A\u4F20\u65B0\u63D2\u4EF6" })
2074
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "xps-page-actions", children: [
2075
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Button, { size: "small", variant: "ghost", onClick: handleLogout, children: "\u767B\u51FA" }),
2076
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("button", { type: "button", className: "xps-icon-btn", title: "\u5237\u65B0", onClick: loadPlugins, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(RefreshIcon, {}) }),
2077
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Button, { variant: "primary", onClick: () => openUpload({ kind: "new" }, {}), children: "+ \u4E0A\u4F20\u65B0\u63D2\u4EF6" })
2057
2078
  ] })
2058
2079
  ] }),
2059
- plugins === null && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Skeleton, { lines: 3 }),
2060
- plugins !== null && plugins.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2080
+ plugins === null && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Skeleton, { lines: 3 }),
2081
+ plugins !== null && plugins.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2061
2082
  EmptyState,
2062
2083
  {
2063
2084
  icon: "\u{1F4E4}",
@@ -2069,27 +2090,27 @@ function DeveloperPage() {
2069
2090
  const rejectReason = rejectReasonOf(plugin);
2070
2091
  const action = actionOf(plugin);
2071
2092
  const openPanel = panel !== null && panel.id === plugin.id ? panel.kind : null;
2072
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-dev-item", children: [
2073
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-dev-head", children: [
2074
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "xps-dev-icon", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PluginIcon, { name: plugin.name, iconUrl: plugin.iconUrl ?? "", size: 40 }) }),
2075
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-dev-main", children: [
2076
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-dev-title", children: [
2077
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "xps-dev-name", children: nameOf(plugin) }),
2078
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "xps-dev-pkg xps-mono", children: plugin.name }),
2079
- plugin.version !== "" && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "xps-dev-pkg xps-mono", children: [
2093
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "xps-dev-item", children: [
2094
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "xps-dev-head", children: [
2095
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "xps-dev-icon", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(PluginIcon, { name: plugin.name, iconUrl: plugin.iconUrl ?? "", size: 40 }) }),
2096
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "xps-dev-main", children: [
2097
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "xps-dev-title", children: [
2098
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "xps-dev-name", children: nameOf(plugin) }),
2099
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "xps-dev-pkg xps-mono", children: plugin.name }),
2100
+ plugin.version !== "" && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "xps-dev-pkg xps-mono", children: [
2080
2101
  "v",
2081
2102
  plugin.version
2082
2103
  ] })
2083
2104
  ] }),
2084
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "xps-dev-summary", children: plugin.summary }),
2085
- rejectReason !== "" && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-dev-reject", children: [
2105
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "xps-dev-summary", children: plugin.summary }),
2106
+ rejectReason !== "" && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "xps-dev-reject", children: [
2086
2107
  "\u9A73\u56DE\u7406\u7531:",
2087
2108
  rejectReason
2088
2109
  ] })
2089
2110
  ] }),
2090
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-dev-actions", children: [
2091
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PluginStatusBadge, { status: plugin.status }),
2092
- action !== null && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2111
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "xps-dev-actions", children: [
2112
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(PluginStatusBadge, { status: plugin.status }),
2113
+ action !== null && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2093
2114
  Button,
2094
2115
  {
2095
2116
  size: "small",
@@ -2098,7 +2119,7 @@ function DeveloperPage() {
2098
2119
  children: action.label
2099
2120
  }
2100
2121
  ),
2101
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2122
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2102
2123
  Button,
2103
2124
  {
2104
2125
  size: "small",
@@ -2108,7 +2129,7 @@ function DeveloperPage() {
2108
2129
  children: `\u7F16\u8F91\u8D44\u6599 ${openPanel === "edit" ? "\u25B4" : "\u25BE"}`
2109
2130
  }
2110
2131
  ),
2111
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2132
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2112
2133
  Button,
2113
2134
  {
2114
2135
  size: "small",
@@ -2119,7 +2140,7 @@ function DeveloperPage() {
2119
2140
  )
2120
2141
  ] })
2121
2142
  ] }),
2122
- openPanel === "edit" && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2143
+ openPanel === "edit" && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2123
2144
  MetaEditPanel,
2124
2145
  {
2125
2146
  plugin,
@@ -2130,7 +2151,7 @@ function DeveloperPage() {
2130
2151
  },
2131
2152
  plugin.id
2132
2153
  ),
2133
- openPanel === "versions" && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2154
+ openPanel === "versions" && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2134
2155
  VersionList,
2135
2156
  {
2136
2157
  versions: plugin.versions,
@@ -2140,8 +2161,8 @@ function DeveloperPage() {
2140
2161
  )
2141
2162
  ] }, plugin.id);
2142
2163
  }),
2143
- withdrawTarget !== null && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2144
- ConfirmDialog,
2164
+ withdrawTarget !== null && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2165
+ ConfirmDialog2,
2145
2166
  {
2146
2167
  title: "\u64A4\u56DE\u5F85\u5BA1\u7248\u672C",
2147
2168
  message: `\u786E\u8BA4\u64A4\u56DE v${withdrawTarget.version}?\u64A4\u56DE\u540E\u8BE5\u7248\u672C\u9700\u91CD\u65B0\u63D0\u4EA4\u5BA1\u6838(\u5BF9\u5E94\u6E90\u7801\u5206\u652F\u4F1A\u88AB\u5220\u9664),\u4E14\u4E0D\u4F1A\u91CD\u7F6E 10 \u5206\u949F\u7684\u63D0\u4EA4\u9650\u6D41\u7A97\u53E3\u3002`,
@@ -2152,7 +2173,7 @@ function DeveloperPage() {
2152
2173
  onConfirm: runWithdraw
2153
2174
  }
2154
2175
  ),
2155
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ToastHost, { items, onDismiss: dismiss })
2176
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ToastHost, { items, onDismiss: dismiss })
2156
2177
  ] });
2157
2178
  }
2158
2179
 
@@ -2160,6 +2181,9 @@ function DeveloperPage() {
2160
2181
  var import_react5 = require("react");
2161
2182
 
2162
2183
  // src/client/pages/market/install.ts
2184
+ function approveBuilds(packages) {
2185
+ return hostPost("/api/approve-builds", { packages: [...packages] });
2186
+ }
2163
2187
  function messageOf(error) {
2164
2188
  return error instanceof Error && error.message !== "" ? error.message : String(error);
2165
2189
  }
@@ -2169,6 +2193,9 @@ function degradedCommand(result) {
2169
2193
  }
2170
2194
  var DEGRADED_TITLE = "\u5BBF\u4E3B\u547D\u4EE4\u884C\u4E0D\u53EF\u7528,\u8BF7\u624B\u52A8\u6267\u884C\u547D\u4EE4(\u5B8C\u6210\u540E\u91CD\u542F\u5E94\u7528)";
2171
2195
  function runInstall(args) {
2196
+ return runInstallOnce(args, false);
2197
+ }
2198
+ function runInstallOnce(args, retried) {
2172
2199
  const notice = (value) => {
2173
2200
  if (args.onNotice !== void 0) args.onNotice(value);
2174
2201
  else args.onToast("error", `${value.title}:${value.body}`);
@@ -2184,7 +2211,11 @@ function runInstall(args) {
2184
2211
  `${args.name}@${args.version} \u5B89\u88C5\u5B8C\u6210,\u5B8C\u5168\u9000\u51FA\u5E76\u91CD\u542F\u5E94\u7528\u540E\u751F\u6548`
2185
2212
  );
2186
2213
  return { applied: true };
2187
- }).catch((error) => {
2214
+ }).catch(async (error) => {
2215
+ if (!retried && args.onBuildBlocked !== void 0 && error instanceof HostRpcError && error.errorCode === "BUILD_SCRIPTS_BLOCKED" && (error.pendingBuilds?.length ?? 0) > 0) {
2216
+ const approved = await args.onBuildBlocked(error.pendingBuilds ?? []);
2217
+ if (approved) return runInstallOnce(args, true);
2218
+ }
2188
2219
  notice({ title: `\u5B89\u88C5\u5931\u8D25:${args.name}@${args.version}`, body: messageOf(error) });
2189
2220
  return { applied: false };
2190
2221
  });
@@ -2217,14 +2248,14 @@ async function resolveSourceType(name) {
2217
2248
  }
2218
2249
 
2219
2250
  // src/client/pages/InstalledPage.tsx
2220
- var import_jsx_runtime12 = require("react/jsx-runtime");
2221
- function ConfirmDialog2(props) {
2222
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "xps-overlay", onClick: props.busy ? void 0 : props.onCancel, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "xps-dialog", onClick: (event) => event.stopPropagation(), children: [
2223
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "xps-dialog-title", children: props.title }),
2224
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "xps-dialog-body", children: props.message }),
2225
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "xps-dialog-actions", children: [
2226
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Button, { onClick: props.onCancel, disabled: props.busy, children: "\u53D6\u6D88" }),
2227
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2251
+ var import_jsx_runtime13 = require("react/jsx-runtime");
2252
+ function ConfirmDialog3(props) {
2253
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "xps-overlay", onClick: props.busy ? void 0 : props.onCancel, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "xps-dialog", onClick: (event) => event.stopPropagation(), children: [
2254
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "xps-dialog-title", children: props.title }),
2255
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "xps-dialog-body", children: props.message }),
2256
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "xps-dialog-actions", children: [
2257
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Button, { onClick: props.onCancel, disabled: props.busy, children: "\u53D6\u6D88" }),
2258
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2228
2259
  Button,
2229
2260
  {
2230
2261
  variant: props.danger ? "danger" : "primary",
@@ -2245,6 +2276,7 @@ function InstalledPage() {
2245
2276
  const [notice, setNotice] = (0, import_react5.useState)(null);
2246
2277
  const [busy, setBusy] = (0, import_react5.useState)(false);
2247
2278
  const [restartNeeded, setRestartNeeded] = (0, import_react5.useState)(false);
2279
+ const [buildConfirm, setBuildConfirm] = (0, import_react5.useState)(null);
2248
2280
  const load = (0, import_react5.useCallback)(() => {
2249
2281
  setList(null);
2250
2282
  setError(false);
@@ -2273,7 +2305,11 @@ function InstalledPage() {
2273
2305
  version,
2274
2306
  sourceType,
2275
2307
  onToast: push,
2276
- onNotice: collectNotice
2308
+ onNotice: collectNotice,
2309
+ onBuildBlocked: (packages) => {
2310
+ setConfirm(null);
2311
+ return new Promise((resolve) => setBuildConfirm({ packages, resolve }));
2312
+ }
2277
2313
  });
2278
2314
  applied = outcome.applied;
2279
2315
  } else {
@@ -2289,33 +2325,33 @@ function InstalledPage() {
2289
2325
  }
2290
2326
  })();
2291
2327
  }, [confirm, load, push]);
2292
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { children: [
2293
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "xps-page-head", children: [
2294
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { children: [
2295
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("h1", { className: "xps-page-title xps-title-with-badges", children: [
2328
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { children: [
2329
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "xps-page-head", children: [
2330
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { children: [
2331
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("h1", { className: "xps-page-title xps-title-with-badges", children: [
2296
2332
  "\u5DF2\u5B89\u88C5\u63D2\u4EF6",
2297
- list !== null && list.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Badge, { children: list.length }),
2298
- list !== null && list.some((item) => item.updateAvailable) && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Badge, { tone: "warning", children: [
2333
+ list !== null && list.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Badge, { children: list.length }),
2334
+ list !== null && list.some((item) => item.updateAvailable) && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Badge, { tone: "warning", children: [
2299
2335
  list.filter((item) => item.updateAvailable).length,
2300
2336
  " \u53EF\u66F4\u65B0"
2301
2337
  ] })
2302
2338
  ] }),
2303
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "xps-page-intro", children: "\u672C\u673A\u5F53\u524D profile \u5DF2\u5B89\u88C5\u7684\u63D2\u4EF6 bundle,\u5199\u64CD\u4F5C\u91CD\u542F\u540E\u751F\u6548" })
2339
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "xps-page-intro", children: "\u672C\u673A\u5F53\u524D profile \u5DF2\u5B89\u88C5\u7684\u63D2\u4EF6 bundle,\u5199\u64CD\u4F5C\u91CD\u542F\u540E\u751F\u6548" })
2304
2340
  ] }),
2305
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "xps-page-actions", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("button", { type: "button", className: "xps-icon-btn", title: "\u5237\u65B0", onClick: load, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(RefreshIcon, {}) }) })
2341
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "xps-page-actions", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("button", { type: "button", className: "xps-icon-btn", title: "\u5237\u65B0", onClick: load, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(RefreshIcon, {}) }) })
2306
2342
  ] }),
2307
- restartNeeded && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "xps-banner", children: "\u26A0\uFE0F \u5B89\u88C5 / \u5378\u8F7D / \u66F4\u65B0\u64CD\u4F5C\u5C06\u5728\u5B8C\u5168\u9000\u51FA\u5E76\u91CD\u542F\u5E94\u7528\u540E\u751F\u6548" }),
2308
- list === null && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Skeleton, { lines: 3 }),
2309
- error && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2343
+ restartNeeded && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "xps-banner", children: "\u26A0\uFE0F \u5B89\u88C5 / \u5378\u8F7D / \u66F4\u65B0\u64CD\u4F5C\u5C06\u5728\u5B8C\u5168\u9000\u51FA\u5E76\u91CD\u542F\u5E94\u7528\u540E\u751F\u6548" }),
2344
+ list === null && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Skeleton, { lines: 3 }),
2345
+ error && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2310
2346
  EmptyState,
2311
2347
  {
2312
2348
  icon: "\u{1F6DC}",
2313
2349
  title: "\u670D\u52A1\u4E0D\u53EF\u8FBE",
2314
2350
  description: "\u65E0\u6CD5\u8BFB\u53D6\u672C\u673A\u5DF2\u5B89\u88C5\u63D2\u4EF6,\u8BF7\u786E\u8BA4\u5BBF\u4E3B\u670D\u52A1\u6B63\u5E38\u540E\u91CD\u8BD5",
2315
- action: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Button, { onClick: load, children: "\u91CD\u8BD5" })
2351
+ action: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Button, { onClick: load, children: "\u91CD\u8BD5" })
2316
2352
  }
2317
2353
  ),
2318
- !error && list !== null && list.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2354
+ !error && list !== null && list.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2319
2355
  EmptyState,
2320
2356
  {
2321
2357
  icon: "\u{1F4E6}",
@@ -2323,22 +2359,22 @@ function InstalledPage() {
2323
2359
  description: "\u524D\u5F80\u300C\u5E02\u573A\u300D\u9875\u6311\u9009\u5E76\u5B89\u88C5\u63D2\u4EF6"
2324
2360
  }
2325
2361
  ),
2326
- !error && list !== null && list.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "xps-row-list", children: list.map((plugin) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "xps-row", style: { cursor: "default" }, children: [
2327
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(PluginIcon, { name: displayNameOf(plugin), iconUrl: "", size: 40 }),
2328
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "xps-row-main", children: [
2329
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "xps-row-title", children: [
2330
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "xps-row-name", children: displayNameOf(plugin) }),
2331
- hasDisplayName(plugin) && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "xps-row-pkg xps-mono", children: plugin.name }),
2332
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "xps-row-pkg xps-mono", children: [
2362
+ !error && list !== null && list.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "xps-row-list", children: list.map((plugin) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "xps-row", style: { cursor: "default" }, children: [
2363
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(PluginIcon, { name: displayNameOf(plugin), iconUrl: "", size: 40 }),
2364
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "xps-row-main", children: [
2365
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "xps-row-title", children: [
2366
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "xps-row-name", children: displayNameOf(plugin) }),
2367
+ hasDisplayName(plugin) && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "xps-row-pkg xps-mono", children: plugin.name }),
2368
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "xps-row-pkg xps-mono", children: [
2333
2369
  "v",
2334
2370
  plugin.version
2335
2371
  ] })
2336
2372
  ] }),
2337
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "xps-row-desc", children: plugin.summary !== void 0 && plugin.summary !== null && plugin.summary.trim() !== "" ? plugin.summary : `\u5F53\u524D v${plugin.version}${plugin.updateAvailable && plugin.latestVersion !== null ? ` \xB7 \u6700\u65B0 v${plugin.latestVersion}` : ""}${plugin.sourceType !== void 0 ? ` \xB7 ${plugin.sourceType === "npm" ? "\u516C\u5F00\u53D1\u5E03" : "\u79C1\u6709\u53D1\u5E03"}` : ""}` })
2373
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "xps-row-desc", children: plugin.summary !== void 0 && plugin.summary !== null && plugin.summary.trim() !== "" ? plugin.summary : `\u5F53\u524D v${plugin.version}${plugin.updateAvailable && plugin.latestVersion !== null ? ` \xB7 \u6700\u65B0 v${plugin.latestVersion}` : ""}${plugin.sourceType !== void 0 ? ` \xB7 ${plugin.sourceType === "npm" ? "\u516C\u5F00\u53D1\u5E03" : "\u79C1\u6709\u53D1\u5E03"}` : ""}` })
2338
2374
  ] }),
2339
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "xps-row-end", children: [
2340
- plugin.updateAvailable && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Badge, { tone: "warning", children: "\u53EF\u66F4\u65B0" }),
2341
- plugin.updateAvailable && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2375
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "xps-row-end", children: [
2376
+ plugin.updateAvailable && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Badge, { tone: "warning", children: "\u53EF\u66F4\u65B0" }),
2377
+ plugin.updateAvailable && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2342
2378
  Button,
2343
2379
  {
2344
2380
  size: "small",
@@ -2347,7 +2383,7 @@ function InstalledPage() {
2347
2383
  children: "\u66F4\u65B0"
2348
2384
  }
2349
2385
  ),
2350
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2386
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2351
2387
  Button,
2352
2388
  {
2353
2389
  size: "small",
@@ -2358,8 +2394,8 @@ function InstalledPage() {
2358
2394
  )
2359
2395
  ] })
2360
2396
  ] }, plugin.name)) }),
2361
- confirm !== null && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2362
- ConfirmDialog2,
2397
+ confirm !== null && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2398
+ ConfirmDialog3,
2363
2399
  {
2364
2400
  title: confirm.action === "update" ? "\u66F4\u65B0\u63D2\u4EF6" : "\u5378\u8F7D\u63D2\u4EF6",
2365
2401
  message: confirm.action === "update" ? `\u5C06 ${displayNameOf(confirm.plugin)} \u4ECE v${confirm.plugin.version} \u66F4\u65B0\u81F3 v${confirm.plugin.latestVersion ?? confirm.plugin.version}?` : `\u786E\u8BA4\u5378\u8F7D ${displayNameOf(confirm.plugin)}?\u5378\u8F7D\u540E\u9700\u5B8C\u5168\u9000\u51FA\u5E76\u91CD\u542F\u5E94\u7528\u624D\u4F1A\u5B8C\u5168\u79FB\u9664\u3002`,
@@ -2370,7 +2406,36 @@ function InstalledPage() {
2370
2406
  onConfirm: handleConfirm
2371
2407
  }
2372
2408
  ),
2373
- notice !== null && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2409
+ buildConfirm !== null && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2410
+ ConfirmDialog,
2411
+ {
2412
+ title: "\u9700\u8981\u5141\u8BB8\u4F9D\u8D56\u6267\u884C\u5B89\u88C5\u811A\u672C",
2413
+ body: [
2414
+ "\u4EE5\u4E0B\u4F9D\u8D56\u5305\u7684\u5B89\u88C5\u811A\u672C\u88AB pnpm \u62E6\u622A(\u4F9B\u5E94\u94FE\u9632\u62A4),\u4E0D\u6279\u51C6\u65E0\u6CD5\u5B8C\u6210\u5B89\u88C5:",
2415
+ "",
2416
+ ` ${buildConfirm.packages.join(" , ")}`,
2417
+ "",
2418
+ "\u70B9\u51FB\u300C\u5141\u8BB8\u300D\u540E\u63D2\u4EF6\u5E02\u573A\u4F1A\u5199\u5165\u6279\u51C6\u8BB0\u5F55\u5E76\u81EA\u52A8\u91CD\u65B0\u5B89\u88C5\u3002",
2419
+ "\u6279\u51C6 = \u5141\u8BB8\u8FD9\u4E9B\u5305\u5728\u672C\u673A\u6267\u884C\u5B89\u88C5\u811A\u672C,\u8BF7\u786E\u8BA4\u63D2\u4EF6\u6765\u6E90\u53EF\u4FE1\u3002"
2420
+ ].join("\n"),
2421
+ confirmText: "\u5141\u8BB8\u5E76\u91CD\u8BD5",
2422
+ busy,
2423
+ onConfirm: () => {
2424
+ const { packages, resolve } = buildConfirm;
2425
+ void approveBuilds(packages).then(() => {
2426
+ resolve(true);
2427
+ }).catch((error2) => {
2428
+ resolve(false);
2429
+ push("error", `\u6279\u51C6\u5931\u8D25:${messageOf(error2)}`);
2430
+ }).finally(() => setBuildConfirm(null));
2431
+ },
2432
+ onCancel: () => {
2433
+ buildConfirm.resolve(false);
2434
+ setBuildConfirm(null);
2435
+ }
2436
+ }
2437
+ ),
2438
+ notice !== null && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2374
2439
  "div",
2375
2440
  {
2376
2441
  style: { display: "contents" },
@@ -2380,7 +2445,7 @@ function InstalledPage() {
2380
2445
  if (event.key === "Escape") setNotice(null);
2381
2446
  },
2382
2447
  onKeyUp: (event) => event.stopPropagation(),
2383
- children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2448
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2384
2449
  NoticeDialog,
2385
2450
  {
2386
2451
  title: notice.title,
@@ -2390,7 +2455,7 @@ function InstalledPage() {
2390
2455
  )
2391
2456
  }
2392
2457
  ),
2393
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ToastHost, { items, onDismiss: dismiss })
2458
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ToastHost, { items, onDismiss: dismiss })
2394
2459
  ] });
2395
2460
  }
2396
2461
 
@@ -2398,10 +2463,10 @@ function InstalledPage() {
2398
2463
  var import_react7 = require("react");
2399
2464
 
2400
2465
  // src/client/pages/market/CategoryBadge.tsx
2401
- var import_jsx_runtime13 = require("react/jsx-runtime");
2466
+ var import_jsx_runtime14 = require("react/jsx-runtime");
2402
2467
  function CategoryBadge(props) {
2403
2468
  const color = primaryColorFor(props.category);
2404
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2469
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2405
2470
  "span",
2406
2471
  {
2407
2472
  className: "xps-mk-cat",
@@ -2484,13 +2549,15 @@ function satisfies(version, range) {
2484
2549
 
2485
2550
  // src/client/pages/market/InstallButton.tsx
2486
2551
  var import_react6 = require("react");
2487
- var import_jsx_runtime14 = require("react/jsx-runtime");
2552
+ var import_jsx_runtime15 = require("react/jsx-runtime");
2488
2553
  function InstallButton(props) {
2489
2554
  const [phase, setPhase] = (0, import_react6.useState)("idle");
2490
2555
  const [notice, setNotice] = (0, import_react6.useState)(null);
2556
+ const [buildConfirm, setBuildConfirm] = (0, import_react6.useState)(null);
2557
+ const [approving, setApproving] = (0, import_react6.useState)(false);
2491
2558
  const compat = checkCompat(props.compatRange, props.dshVersion);
2492
2559
  if (compat.ok === false) {
2493
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "xps-mk-install", onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2560
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "xps-mk-install", onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2494
2561
  Button,
2495
2562
  {
2496
2563
  size: props.size ?? "medium",
@@ -2508,14 +2575,29 @@ function InstallButton(props) {
2508
2575
  version: props.version,
2509
2576
  sourceType: props.sourceType,
2510
2577
  onToast: props.onToast,
2511
- onNotice: setNotice
2578
+ onNotice: setNotice,
2579
+ onBuildBlocked: (packages) => new Promise((resolve) => setBuildConfirm({ packages, resolve }))
2512
2580
  }).finally(() => setPhase("idle"));
2513
2581
  };
2514
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
2515
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "xps-mk-install", onClick: (e) => e.stopPropagation(), children: phase === "confirm" ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "xps-mk-confirm", children: [
2516
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Button, { size: "small", variant: "primary", onClick: doInstall, title: `\u786E\u8BA4\u5B89\u88C5 ${props.pluginName}@${props.version}`, children: "\u786E\u8BA4\u5B89\u88C5" }),
2517
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Button, { size: "small", variant: "ghost", onClick: () => setPhase("idle"), title: "\u53D6\u6D88\u5B89\u88C5", children: "\u53D6\u6D88" })
2518
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2582
+ const handleBuildApprove = () => {
2583
+ if (buildConfirm === null) return;
2584
+ const { packages, resolve } = buildConfirm;
2585
+ setApproving(true);
2586
+ void approveBuilds(packages).then(() => {
2587
+ resolve(true);
2588
+ }).catch((error) => {
2589
+ resolve(false);
2590
+ props.onToast("error", `\u6279\u51C6\u5931\u8D25:${messageOf(error)}`);
2591
+ }).finally(() => {
2592
+ setApproving(false);
2593
+ setBuildConfirm(null);
2594
+ });
2595
+ };
2596
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
2597
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "xps-mk-install", onClick: (e) => e.stopPropagation(), children: phase === "confirm" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "xps-mk-confirm", children: [
2598
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Button, { size: "small", variant: "primary", onClick: doInstall, title: `\u786E\u8BA4\u5B89\u88C5 ${props.pluginName}@${props.version}`, children: "\u786E\u8BA4\u5B89\u88C5" }),
2599
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Button, { size: "small", variant: "ghost", onClick: () => setPhase("idle"), title: "\u53D6\u6D88\u5B89\u88C5", children: "\u53D6\u6D88" })
2600
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2519
2601
  Button,
2520
2602
  {
2521
2603
  size: props.size ?? "medium",
@@ -2532,7 +2614,7 @@ function InstallButton(props) {
2532
2614
  children: phase === "installing" ? "\u5B89\u88C5\u4E2D\u2026" : "\u5B89\u88C5"
2533
2615
  }
2534
2616
  ) }),
2535
- notice !== null && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2617
+ notice !== null && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2536
2618
  "div",
2537
2619
  {
2538
2620
  style: { display: "contents" },
@@ -2542,7 +2624,7 @@ function InstallButton(props) {
2542
2624
  if (event.key === "Escape") setNotice(null);
2543
2625
  },
2544
2626
  onKeyUp: (event) => event.stopPropagation(),
2545
- children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2627
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2546
2628
  NoticeDialog,
2547
2629
  {
2548
2630
  title: notice.title,
@@ -2551,12 +2633,48 @@ function InstallButton(props) {
2551
2633
  }
2552
2634
  )
2553
2635
  }
2636
+ ),
2637
+ buildConfirm !== null && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2638
+ "div",
2639
+ {
2640
+ style: { display: "contents" },
2641
+ onClick: (event) => event.stopPropagation(),
2642
+ onKeyDown: (event) => {
2643
+ event.stopPropagation();
2644
+ if (event.key === "Escape" && approving === false) {
2645
+ buildConfirm.resolve(false);
2646
+ setBuildConfirm(null);
2647
+ }
2648
+ },
2649
+ onKeyUp: (event) => event.stopPropagation(),
2650
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2651
+ ConfirmDialog,
2652
+ {
2653
+ title: "\u9700\u8981\u5141\u8BB8\u4F9D\u8D56\u6267\u884C\u5B89\u88C5\u811A\u672C",
2654
+ body: [
2655
+ "\u4EE5\u4E0B\u4F9D\u8D56\u5305\u7684\u5B89\u88C5\u811A\u672C\u88AB pnpm \u62E6\u622A(\u4F9B\u5E94\u94FE\u9632\u62A4),\u4E0D\u6279\u51C6\u65E0\u6CD5\u5B8C\u6210\u5B89\u88C5:",
2656
+ "",
2657
+ ` ${buildConfirm.packages.join(" , ")}`,
2658
+ "",
2659
+ "\u70B9\u51FB\u300C\u5141\u8BB8\u300D\u540E\u63D2\u4EF6\u5E02\u573A\u4F1A\u5199\u5165\u6279\u51C6\u8BB0\u5F55\u5E76\u81EA\u52A8\u91CD\u65B0\u5B89\u88C5\u3002",
2660
+ "\u6279\u51C6 = \u5141\u8BB8\u8FD9\u4E9B\u5305\u5728\u672C\u673A\u6267\u884C\u5B89\u88C5\u811A\u672C,\u8BF7\u786E\u8BA4\u63D2\u4EF6\u6765\u6E90\u53EF\u4FE1\u3002"
2661
+ ].join("\n"),
2662
+ confirmText: "\u5141\u8BB8\u5E76\u91CD\u8BD5",
2663
+ busy: approving,
2664
+ onConfirm: handleBuildApprove,
2665
+ onCancel: () => {
2666
+ buildConfirm.resolve(false);
2667
+ setBuildConfirm(null);
2668
+ }
2669
+ }
2670
+ )
2671
+ }
2554
2672
  )
2555
2673
  ] });
2556
2674
  }
2557
2675
 
2558
2676
  // src/client/pages/market/PluginRow.tsx
2559
- var import_jsx_runtime15 = require("react/jsx-runtime");
2677
+ var import_jsx_runtime16 = require("react/jsx-runtime");
2560
2678
  function PluginRow(props) {
2561
2679
  const p = props.plugin;
2562
2680
  const title = displayNameOf(p);
@@ -2564,7 +2682,7 @@ function PluginRow(props) {
2564
2682
  const installed = props.installed;
2565
2683
  const upToDate = installed !== void 0 && !installed.updateAvailable;
2566
2684
  const open = () => props.onOpen?.(p.id);
2567
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
2685
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
2568
2686
  "div",
2569
2687
  {
2570
2688
  className: "xps-mk-row",
@@ -2576,33 +2694,33 @@ function PluginRow(props) {
2576
2694
  if (e.key === "Enter") open();
2577
2695
  },
2578
2696
  children: [
2579
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(PluginIcon, { name: title, iconUrl: p.iconUrl, size: 40 }),
2580
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "xps-mk-row-main", children: [
2581
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "xps-mk-row-title", children: [
2582
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "xps-mk-row-name", children: title }),
2583
- title !== p.name && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "xps-mk-row-pkg xps-mono", children: p.name }),
2584
- p.category !== "" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CategoryBadge, { category: p.category })
2697
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(PluginIcon, { name: title, iconUrl: p.iconUrl, size: 40 }),
2698
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "xps-mk-row-main", children: [
2699
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "xps-mk-row-title", children: [
2700
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "xps-mk-row-name", children: title }),
2701
+ title !== p.name && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "xps-mk-row-pkg xps-mono", children: p.name }),
2702
+ p.category !== "" && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(CategoryBadge, { category: p.category })
2585
2703
  ] }),
2586
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "xps-mk-row-summary", children: p.summary })
2704
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "xps-mk-row-summary", children: p.summary })
2587
2705
  ] }),
2588
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "xps-mk-row-meta", children: [
2589
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "xps-mk-row-version", children: [
2706
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "xps-mk-row-meta", children: [
2707
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "xps-mk-row-version", children: [
2590
2708
  "v",
2591
2709
  p.version
2592
2710
  ] }),
2593
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { title: `\u4E0B\u8F7D\u91CF ${p.downloads}`, children: [
2711
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { title: `\u4E0B\u8F7D\u91CF ${p.downloads}`, children: [
2594
2712
  "\u2B07 ",
2595
2713
  formatDownloads(p.downloads)
2596
2714
  ] }),
2597
- compat.ok === null ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Badge, { children: "? \u517C\u5BB9\u6027\u672A\u77E5" }) : compat.ok ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Badge, { tone: "success", children: "\u2714 \u517C\u5BB9\u672C\u673A" }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Badge, { tone: "warning", children: [
2715
+ compat.ok === null ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Badge, { children: "? \u517C\u5BB9\u6027\u672A\u77E5" }) : compat.ok ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Badge, { tone: "success", children: "\u2714 \u517C\u5BB9\u672C\u673A" }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Badge, { tone: "warning", children: [
2598
2716
  "\u26A0 \u9700 dsh ",
2599
2717
  p.compatRange
2600
2718
  ] }),
2601
- installed !== void 0 && (installed.updateAvailable ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Badge, { tone: "warning", children: [
2719
+ installed !== void 0 && (installed.updateAvailable ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Badge, { tone: "warning", children: [
2602
2720
  "\u2191 \u53EF\u66F4\u65B0 v",
2603
2721
  installed.version
2604
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Badge, { tone: "success", children: "\u2713 \u5DF2\u5B89\u88C5" })),
2605
- !upToDate && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2722
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Badge, { tone: "success", children: "\u2713 \u5DF2\u5B89\u88C5" })),
2723
+ !upToDate && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2606
2724
  InstallButton,
2607
2725
  {
2608
2726
  pluginName: p.name,
@@ -2621,7 +2739,7 @@ function PluginRow(props) {
2621
2739
  }
2622
2740
 
2623
2741
  // src/client/pages/MarketPage.tsx
2624
- var import_jsx_runtime16 = require("react/jsx-runtime");
2742
+ var import_jsx_runtime17 = require("react/jsx-runtime");
2625
2743
  var PAGE_SIZE = 10;
2626
2744
  var MAX_FULL_PAGES = 7;
2627
2745
  function pageSequence(current, totalPages) {
@@ -2669,7 +2787,7 @@ function withPage(prev, page, totalPages) {
2669
2787
  return next === prev.page ? prev : { ...prev, page: next };
2670
2788
  }
2671
2789
  function MarketPager(props) {
2672
- const navButton = (label, target, disabled) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2790
+ const navButton = (label, target, disabled) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2673
2791
  "button",
2674
2792
  {
2675
2793
  type: "button",
@@ -2681,10 +2799,10 @@ function MarketPager(props) {
2681
2799
  children: label
2682
2800
  }
2683
2801
  );
2684
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("nav", { className: "xps-mk-pager", "aria-label": "\u5206\u9875", children: [
2802
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("nav", { className: "xps-mk-pager", "aria-label": "\u5206\u9875", children: [
2685
2803
  navButton("\u4E0A\u4E00\u9875", props.page - 1, props.page <= 1),
2686
2804
  pageSequence(props.page, props.totalPages).map(
2687
- (token, index) => token === "\u2026" ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "xps-mk-page-gap", "aria-hidden": "true", children: "\u2026" }, `gap-${index}`) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2805
+ (token, index) => token === "\u2026" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "xps-mk-page-gap", "aria-hidden": "true", children: "\u2026" }, `gap-${index}`) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2688
2806
  "button",
2689
2807
  {
2690
2808
  type: "button",
@@ -2797,18 +2915,18 @@ function MarketPage(props) {
2797
2915
  const applySort = (next) => setQuery((prev) => withFilter(prev, { sort: next }));
2798
2916
  const goToPage = (page) => setQuery((prev) => withPage(prev, page, totalPages));
2799
2917
  const chipCls = (id) => `xps-mk-chip${query.category === id ? " xps-mk-chip-active" : ""}`;
2800
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "xps-mk-market", ref: rootRef, children: [
2801
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ToastHost, { items: toasts.items, onDismiss: toasts.dismiss }),
2802
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "xps-mk-head", children: [
2803
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "xps-mk-head-main", children: [
2804
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h1", { className: "xps-page-title", children: "\u85AA\u4EBA\u85AA\u4E8B\u5E02\u573A" }),
2805
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "xps-mk-head-sub", children: status === "ready" ? `\u56E2\u961F\u79C1\u6709\u63D2\u4EF6 \xB7 ${total} \u6B3E` : "\u56E2\u961F\u79C1\u6709\u63D2\u4EF6" })
2918
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "xps-mk-market", ref: rootRef, children: [
2919
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ToastHost, { items: toasts.items, onDismiss: toasts.dismiss }),
2920
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "xps-mk-head", children: [
2921
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "xps-mk-head-main", children: [
2922
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h1", { className: "xps-page-title", children: "\u85AA\u4EBA\u85AA\u4E8B\u5E02\u573A" }),
2923
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "xps-mk-head-sub", children: status === "ready" ? `\u56E2\u961F\u79C1\u6709\u63D2\u4EF6 \xB7 ${total} \u6B3E` : "\u56E2\u961F\u79C1\u6709\u63D2\u4EF6" })
2806
2924
  ] }),
2807
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { type: "button", className: "xps-icon-btn", title: "\u5237\u65B0", onClick: () => setReloadFlag((n) => n + 1), children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(RefreshIcon, {}) })
2925
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { type: "button", className: "xps-icon-btn", title: "\u5237\u65B0", onClick: () => setReloadFlag((n) => n + 1), children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(RefreshIcon, {}) })
2808
2926
  ] }),
2809
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "xps-mk-toolbar", children: [
2810
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Input, { value: keyword, onChange: setKeyword, placeholder: "\u641C\u7D22\u63D2\u4EF6(\u540D\u79F0 / \u5173\u952E\u8BCD)\u2026" }),
2811
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
2927
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "xps-mk-toolbar", children: [
2928
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Input, { value: keyword, onChange: setKeyword, placeholder: "\u641C\u7D22\u63D2\u4EF6(\u540D\u79F0 / \u5173\u952E\u8BCD)\u2026" }),
2929
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
2812
2930
  "select",
2813
2931
  {
2814
2932
  className: "xps-mk-select",
@@ -2816,33 +2934,33 @@ function MarketPage(props) {
2816
2934
  title: "\u6392\u5E8F\u65B9\u5F0F",
2817
2935
  onChange: (e) => applySort(e.target.value),
2818
2936
  children: [
2819
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: "downloads", children: "\u6309\u4E0B\u8F7D\u91CF" }),
2820
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: "updatedAt", children: "\u6309\u66F4\u65B0\u65F6\u95F4" })
2937
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "downloads", children: "\u6309\u4E0B\u8F7D\u91CF" }),
2938
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "updatedAt", children: "\u6309\u66F4\u65B0\u65F6\u95F4" })
2821
2939
  ]
2822
2940
  }
2823
2941
  )
2824
2942
  ] }),
2825
- categories !== null && categories.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "xps-mk-filterbar", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "xps-mk-chips", children: [
2826
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { type: "button", className: chipCls(""), onClick: () => applyCategory(""), children: "\u5168\u90E8" }),
2827
- categories.map((c) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("button", { type: "button", className: chipCls(c.id), onClick: () => applyCategory(c.id), children: [
2943
+ categories !== null && categories.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "xps-mk-filterbar", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "xps-mk-chips", children: [
2944
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { type: "button", className: chipCls(""), onClick: () => applyCategory(""), children: "\u5168\u90E8" }),
2945
+ categories.map((c) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { type: "button", className: chipCls(c.id), onClick: () => applyCategory(c.id), children: [
2828
2946
  c.name,
2829
2947
  " ",
2830
2948
  c.count
2831
2949
  ] }, c.id))
2832
2950
  ] }) }),
2833
- status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Skeleton, { lines: 4, height: 56 }),
2834
- status === "error" && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2951
+ status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Skeleton, { lines: 4, height: 56 }),
2952
+ status === "error" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2835
2953
  EmptyState,
2836
2954
  {
2837
2955
  icon: "\u{1F6DC}",
2838
2956
  title: "\u670D\u52A1\u4E0D\u53EF\u8FBE",
2839
2957
  description: "\u85AA\u4EBA\u85AA\u4E8B\u5E02\u573A\u670D\u52A1\u6682\u65F6\u4E0D\u53EF\u7528,\u8BF7\u68C0\u67E5\u7F51\u7EDC\u540E\u91CD\u8BD5",
2840
- action: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Button, { onClick: () => setReloadFlag((n) => n + 1), children: "\u91CD\u8BD5" })
2958
+ action: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Button, { onClick: () => setReloadFlag((n) => n + 1), children: "\u91CD\u8BD5" })
2841
2959
  }
2842
2960
  ),
2843
- status === "ready" && items.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(EmptyState, { icon: "\u{1F50D}", title: "\u672A\u627E\u5230\u5339\u914D\u7684\u63D2\u4EF6", description: "\u6362\u4E2A\u5173\u952E\u8BCD\u6216\u5206\u7C7B\u8BD5\u8BD5" }),
2844
- status === "ready" && items.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
2845
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: `xps-mk-list${refreshing ? " xps-mk-list-busy" : ""}`, "aria-busy": refreshing, children: items.map((p) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2961
+ status === "ready" && items.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(EmptyState, { icon: "\u{1F50D}", title: "\u672A\u627E\u5230\u5339\u914D\u7684\u63D2\u4EF6", description: "\u6362\u4E2A\u5173\u952E\u8BCD\u6216\u5206\u7C7B\u8BD5\u8BD5" }),
2962
+ status === "ready" && items.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
2963
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: `xps-mk-list${refreshing ? " xps-mk-list-busy" : ""}`, "aria-busy": refreshing, children: items.map((p) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2846
2964
  PluginRow,
2847
2965
  {
2848
2966
  plugin: p,
@@ -2854,7 +2972,7 @@ function MarketPage(props) {
2854
2972
  },
2855
2973
  p.id
2856
2974
  )) }),
2857
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "xps-mk-hint", children: [
2975
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "xps-mk-hint", children: [
2858
2976
  "\u5171 ",
2859
2977
  total,
2860
2978
  " \u4E2A\u63D2\u4EF6 \xB7 \u7B2C ",
@@ -2864,7 +2982,7 @@ function MarketPage(props) {
2864
2982
  " \u9875",
2865
2983
  refreshing ? " \xB7 \u52A0\u8F7D\u4E2D\u2026" : ""
2866
2984
  ] }),
2867
- totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(MarketPager, { page: query.page, totalPages, onGo: goToPage })
2985
+ totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(MarketPager, { page: query.page, totalPages, onGo: goToPage })
2868
2986
  ] })
2869
2987
  ] });
2870
2988
  }
@@ -2873,9 +2991,9 @@ function MarketPage(props) {
2873
2991
  var import_react8 = require("react");
2874
2992
 
2875
2993
  // src/client/pages/market/Markdown.tsx
2876
- var import_jsx_runtime17 = require("react/jsx-runtime");
2994
+ var import_jsx_runtime18 = require("react/jsx-runtime");
2877
2995
  function Markdown(props) {
2878
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "xps-md", children: renderBlocks(props.text) });
2996
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "xps-md", children: renderBlocks(props.text) });
2879
2997
  }
2880
2998
  var CODE_FENCE = /^\s*```/;
2881
2999
  var HEADING = /^(#{1,4})\s+(.*)$/;
@@ -2905,7 +3023,7 @@ function renderBlocks(text, depth = 0) {
2905
3023
  }
2906
3024
  i += 1;
2907
3025
  blocks.push(
2908
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("pre", { className: "xps-md-pre", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("code", { children: buf2.join("\n") }) }, key)
3026
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("pre", { className: "xps-md-pre", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("code", { children: buf2.join("\n") }) }, key)
2909
3027
  );
2910
3028
  key += 1;
2911
3029
  continue;
@@ -2916,15 +3034,15 @@ function renderBlocks(text, depth = 0) {
2916
3034
  const content = renderInline(heading[2] ?? "", `h${key}`);
2917
3035
  if (level <= 1) {
2918
3036
  blocks.push(
2919
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h2", { className: "xps-md-h2", children: content }, key)
3037
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h2", { className: "xps-md-h2", children: content }, key)
2920
3038
  );
2921
3039
  } else if (level === 2) {
2922
3040
  blocks.push(
2923
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h3", { className: "xps-md-h3", children: content }, key)
3041
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h3", { className: "xps-md-h3", children: content }, key)
2924
3042
  );
2925
3043
  } else {
2926
3044
  blocks.push(
2927
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h4", { className: "xps-md-h4", children: content }, key)
3045
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h4", { className: "xps-md-h4", children: content }, key)
2928
3046
  );
2929
3047
  }
2930
3048
  key += 1;
@@ -2932,7 +3050,7 @@ function renderBlocks(text, depth = 0) {
2932
3050
  continue;
2933
3051
  }
2934
3052
  if (HR.test(line) && !LIST_ITEM.test(line) && !ORDERED_ITEM.test(line)) {
2935
- blocks.push(/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("hr", { className: "xps-md-hr" }, key));
3053
+ blocks.push(/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("hr", { className: "xps-md-hr" }, key));
2936
3054
  key += 1;
2937
3055
  i += 1;
2938
3056
  continue;
@@ -2941,11 +3059,11 @@ function renderBlocks(text, depth = 0) {
2941
3059
  const items = [];
2942
3060
  while (i < lines.length && LIST_ITEM.test(lines[i] ?? "")) {
2943
3061
  const itemText = (lines[i] ?? "").replace(LIST_ITEM, "");
2944
- items.push(/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("li", { children: renderInline(itemText, `li${key}-${items.length}`) }, items.length));
3062
+ items.push(/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("li", { children: renderInline(itemText, `li${key}-${items.length}`) }, items.length));
2945
3063
  i += 1;
2946
3064
  }
2947
3065
  blocks.push(
2948
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("ul", { className: "xps-md-ul", children: items }, key)
3066
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("ul", { className: "xps-md-ul", children: items }, key)
2949
3067
  );
2950
3068
  key += 1;
2951
3069
  continue;
@@ -2954,11 +3072,11 @@ function renderBlocks(text, depth = 0) {
2954
3072
  const items = [];
2955
3073
  while (i < lines.length && ORDERED_ITEM.test(lines[i] ?? "")) {
2956
3074
  const itemText = (lines[i] ?? "").replace(ORDERED_ITEM, "");
2957
- items.push(/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("li", { children: renderInline(itemText, `ol${key}-${items.length}`) }, items.length));
3075
+ items.push(/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("li", { children: renderInline(itemText, `ol${key}-${items.length}`) }, items.length));
2958
3076
  i += 1;
2959
3077
  }
2960
3078
  blocks.push(
2961
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("ol", { className: "xps-md-ol", children: items }, key)
3079
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("ol", { className: "xps-md-ol", children: items }, key)
2962
3080
  );
2963
3081
  key += 1;
2964
3082
  continue;
@@ -2970,7 +3088,7 @@ function renderBlocks(text, depth = 0) {
2970
3088
  i += 1;
2971
3089
  }
2972
3090
  blocks.push(
2973
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("blockquote", { className: "xps-md-quote", children: depth >= MAX_QUOTE_DEPTH ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "xps-md-p", children: renderInline(buf2.join(" "), `qd${key}`) }) : renderBlocks(buf2.join("\n"), depth + 1) }, key)
3091
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("blockquote", { className: "xps-md-quote", children: depth >= MAX_QUOTE_DEPTH ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "xps-md-p", children: renderInline(buf2.join(" "), `qd${key}`) }) : renderBlocks(buf2.join("\n"), depth + 1) }, key)
2974
3092
  );
2975
3093
  key += 1;
2976
3094
  continue;
@@ -2984,12 +3102,12 @@ function renderBlocks(text, depth = 0) {
2984
3102
  rows.push(splitRow(lines[i] ?? ""));
2985
3103
  i += 1;
2986
3104
  }
2987
- const th = (text2, idx) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("th", { style: { textAlign: aligns[idx] }, children: renderInline(text2, `th${key}-${idx}`) }, idx);
2988
- const td = (row) => header.map((_, idx) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("td", { style: { textAlign: aligns[idx] }, children: renderInline(row[idx] ?? "", `td${key}-${idx}`) }, idx));
3105
+ const th = (text2, idx) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("th", { style: { textAlign: aligns[idx] }, children: renderInline(text2, `th${key}-${idx}`) }, idx);
3106
+ const td = (row) => header.map((_, idx) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("td", { style: { textAlign: aligns[idx] }, children: renderInline(row[idx] ?? "", `td${key}-${idx}`) }, idx));
2989
3107
  blocks.push(
2990
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "xps-md-table-wrap", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("table", { className: "xps-md-table", children: [
2991
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("tr", { children: header.map(th) }) }),
2992
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("tbody", { children: rows.map((row, rIdx) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("tr", { children: td(row) }, rIdx)) })
3108
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "xps-md-table-wrap", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("table", { className: "xps-md-table", children: [
3109
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("tr", { children: header.map(th) }) }),
3110
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("tbody", { children: rows.map((row, rIdx) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("tr", { children: td(row) }, rIdx)) })
2993
3111
  ] }) }, key)
2994
3112
  );
2995
3113
  key += 1;
@@ -3004,7 +3122,7 @@ function renderBlocks(text, depth = 0) {
3004
3122
  i += 1;
3005
3123
  }
3006
3124
  blocks.push(
3007
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "xps-md-p", children: renderInline(buf.join(" "), `p${key}`) }, key)
3125
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "xps-md-p", children: renderInline(buf.join(" "), `p${key}`) }, key)
3008
3126
  );
3009
3127
  key += 1;
3010
3128
  }
@@ -3021,15 +3139,15 @@ function renderInline(text, keyPrefix) {
3021
3139
  const token = m[0];
3022
3140
  if (token.startsWith("**")) {
3023
3141
  nodes.push(
3024
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("strong", { children: renderInline(token.slice(2, -2), `${keyPrefix}-b${seq}`) }, `${keyPrefix}-b${seq}`)
3142
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("strong", { children: renderInline(token.slice(2, -2), `${keyPrefix}-b${seq}`) }, `${keyPrefix}-b${seq}`)
3025
3143
  );
3026
3144
  } else if (token.startsWith("~~")) {
3027
3145
  nodes.push(
3028
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("del", { children: renderInline(token.slice(2, -2), `${keyPrefix}-d${seq}`) }, `${keyPrefix}-d${seq}`)
3146
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("del", { children: renderInline(token.slice(2, -2), `${keyPrefix}-d${seq}`) }, `${keyPrefix}-d${seq}`)
3029
3147
  );
3030
3148
  } else if (token.startsWith("`")) {
3031
3149
  nodes.push(
3032
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("code", { className: "xps-md-inline-code", children: token.slice(1, -1) }, `${keyPrefix}-c${seq}`)
3150
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("code", { className: "xps-md-inline-code", children: token.slice(1, -1) }, `${keyPrefix}-c${seq}`)
3033
3151
  );
3034
3152
  } else {
3035
3153
  const link = /^\[([^\]]*)\]\((.+)\)$/.exec(token);
@@ -3042,7 +3160,7 @@ function renderInline(text, keyPrefix) {
3042
3160
  const url = rawUrl.trim();
3043
3161
  if (/^https?:\/\//.test(url)) {
3044
3162
  nodes.push(
3045
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
3163
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3046
3164
  "span",
3047
3165
  {
3048
3166
  className: "xps-md-link",
@@ -3090,7 +3208,7 @@ function cellAlign(cell) {
3090
3208
  }
3091
3209
 
3092
3210
  // src/client/pages/PluginDetailPage.tsx
3093
- var import_jsx_runtime18 = require("react/jsx-runtime");
3211
+ var import_jsx_runtime19 = require("react/jsx-runtime");
3094
3212
  function PluginDetailPage(props) {
3095
3213
  ensureMarketStyles();
3096
3214
  const pluginId = props.pluginId ?? "";
@@ -3131,37 +3249,37 @@ function PluginDetailPage(props) {
3131
3249
  alive = false;
3132
3250
  };
3133
3251
  }, [pluginId, reloadFlag]);
3134
- const backButton = /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "xps-mk-back", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Button, { size: "small", variant: "ghost", onClick: () => props.onBack?.(), title: "\u8FD4\u56DE\u5E02\u573A\u5217\u8868", children: "\u2190 \u8FD4\u56DE\u5E02\u573A" }) });
3252
+ const backButton = /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "xps-mk-back", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Button, { size: "small", variant: "ghost", onClick: () => props.onBack?.(), title: "\u8FD4\u56DE\u5E02\u573A\u5217\u8868", children: "\u2190 \u8FD4\u56DE\u5E02\u573A" }) });
3135
3253
  if (status === "loading") {
3136
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "xps-mk-detail", children: [
3254
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "xps-mk-detail", children: [
3137
3255
  backButton,
3138
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Skeleton, { lines: 5, height: 56 })
3256
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Skeleton, { lines: 5, height: 56 })
3139
3257
  ] });
3140
3258
  }
3141
3259
  if (status === "missing") {
3142
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "xps-mk-detail", children: [
3260
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "xps-mk-detail", children: [
3143
3261
  backButton,
3144
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3262
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3145
3263
  EmptyState,
3146
3264
  {
3147
3265
  icon: "\u{1F9E9}",
3148
3266
  title: "\u63D2\u4EF6\u4E0D\u5B58\u5728\u6216\u5DF2\u4E0B\u67B6",
3149
3267
  description: "\u8BE5\u63D2\u4EF6\u53EF\u80FD\u5DF2\u88AB\u4F5C\u8005\u4E0B\u67B6,\u8FD4\u56DE\u5E02\u573A\u770B\u770B\u5176\u4ED6\u63D2\u4EF6",
3150
- action: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Button, { onClick: () => props.onBack?.(), children: "\u8FD4\u56DE\u5E02\u573A" })
3268
+ action: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Button, { onClick: () => props.onBack?.(), children: "\u8FD4\u56DE\u5E02\u573A" })
3151
3269
  }
3152
3270
  )
3153
3271
  ] });
3154
3272
  }
3155
3273
  if (status === "error" || detail === null) {
3156
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "xps-mk-detail", children: [
3274
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "xps-mk-detail", children: [
3157
3275
  backButton,
3158
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3276
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3159
3277
  EmptyState,
3160
3278
  {
3161
3279
  icon: "\u{1F6DC}",
3162
3280
  title: "\u670D\u52A1\u4E0D\u53EF\u8FBE",
3163
3281
  description: "\u85AA\u4EBA\u85AA\u4E8B\u5E02\u573A\u670D\u52A1\u6682\u65F6\u4E0D\u53EF\u7528,\u8BF7\u68C0\u67E5\u7F51\u7EDC\u540E\u91CD\u8BD5",
3164
- action: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Button, { onClick: () => setReloadFlag((n) => n + 1), children: "\u91CD\u8BD5" })
3282
+ action: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Button, { onClick: () => setReloadFlag((n) => n + 1), children: "\u91CD\u8BD5" })
3165
3283
  }
3166
3284
  )
3167
3285
  ] });
@@ -3172,36 +3290,36 @@ function PluginDetailPage(props) {
3172
3290
  const displayUpdatedAt = versionInfo?.publishedAt ?? detail.updatedAt;
3173
3291
  const compat = checkCompat(displayCompatRange, dshVersion);
3174
3292
  const title = displayNameOf(detail);
3175
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "xps-mk-detail", children: [
3176
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ToastHost, { items: toasts.items, onDismiss: toasts.dismiss }),
3293
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "xps-mk-detail", children: [
3294
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ToastHost, { items: toasts.items, onDismiss: toasts.dismiss }),
3177
3295
  backButton,
3178
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "xps-mk-detail-header", children: [
3179
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(PluginIcon, { name: title, iconUrl: detail.iconUrl, size: 48 }),
3180
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "xps-mk-detail-title", children: [
3181
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "xps-mk-detail-name", children: [
3296
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "xps-mk-detail-header", children: [
3297
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(PluginIcon, { name: title, iconUrl: detail.iconUrl, size: 48 }),
3298
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "xps-mk-detail-title", children: [
3299
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "xps-mk-detail-name", children: [
3182
3300
  title,
3183
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Badge, { tone: "info", children: [
3301
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Badge, { tone: "info", children: [
3184
3302
  "v",
3185
3303
  displayVersion
3186
3304
  ] })
3187
3305
  ] }),
3188
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "xps-mk-detail-sub", children: [
3189
- title !== detail.name && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "xps-mono", children: detail.name }),
3190
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { children: [
3306
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "xps-mk-detail-sub", children: [
3307
+ title !== detail.name && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "xps-mono", children: detail.name }),
3308
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { children: [
3191
3309
  "\u4F5C\u8005 ",
3192
3310
  detail.author
3193
3311
  ] }),
3194
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { children: [
3312
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { children: [
3195
3313
  "\u6765\u6E90 ",
3196
3314
  detail.sourceType === "npm" ? "\u516C\u5F00\u53D1\u5E03" : "\u79C1\u6709\u53D1\u5E03"
3197
3315
  ] }),
3198
- compat.ok === null ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Badge, { children: "? \u517C\u5BB9\u6027\u672A\u77E5" }) : compat.ok ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Badge, { tone: "success", children: "\u2714 \u517C\u5BB9\u672C\u673A" }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Badge, { tone: "warning", children: [
3316
+ compat.ok === null ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Badge, { children: "? \u517C\u5BB9\u6027\u672A\u77E5" }) : compat.ok ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Badge, { tone: "success", children: "\u2714 \u517C\u5BB9\u672C\u673A" }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Badge, { tone: "warning", children: [
3199
3317
  "\u26A0 \u9700 dsh ",
3200
3318
  displayCompatRange
3201
3319
  ] })
3202
3320
  ] })
3203
3321
  ] }),
3204
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3322
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3205
3323
  InstallButton,
3206
3324
  {
3207
3325
  pluginName: detail.name,
@@ -3213,31 +3331,31 @@ function PluginDetailPage(props) {
3213
3331
  }
3214
3332
  )
3215
3333
  ] }),
3216
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "xps-mk-detail-body", children: [
3217
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "xps-mk-readme", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Markdown, { text: detail.description }) }),
3218
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("aside", { className: "xps-mk-sidebar", children: [
3219
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "xps-mk-card", children: [
3220
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "xps-mk-card-title", children: "\u4FE1\u606F" }),
3221
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "xps-mk-info-row", children: [
3222
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "xps-mk-info-label", children: "\u5206\u7C7B" }),
3223
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "xps-mk-info-value", children: detail.category === "" ? "\u2014" : detail.category })
3334
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "xps-mk-detail-body", children: [
3335
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "xps-mk-readme", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Markdown, { text: detail.description }) }),
3336
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("aside", { className: "xps-mk-sidebar", children: [
3337
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "xps-mk-card", children: [
3338
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "xps-mk-card-title", children: "\u4FE1\u606F" }),
3339
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "xps-mk-info-row", children: [
3340
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "xps-mk-info-label", children: "\u5206\u7C7B" }),
3341
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "xps-mk-info-value", children: detail.category === "" ? "\u2014" : detail.category })
3224
3342
  ] }),
3225
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "xps-mk-info-row", children: [
3226
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "xps-mk-info-label", children: "\u4E0B\u8F7D\u91CF" }),
3227
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "xps-mk-info-value", children: formatDownloads(detail.downloads) })
3343
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "xps-mk-info-row", children: [
3344
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "xps-mk-info-label", children: "\u4E0B\u8F7D\u91CF" }),
3345
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "xps-mk-info-value", children: formatDownloads(detail.downloads) })
3228
3346
  ] }),
3229
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "xps-mk-info-row", children: [
3230
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "xps-mk-info-label", children: "\u66F4\u65B0\u65F6\u95F4" }),
3231
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "xps-mk-info-value", title: formatDate(displayUpdatedAt), children: formatRelative(displayUpdatedAt) })
3347
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "xps-mk-info-row", children: [
3348
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "xps-mk-info-label", children: "\u66F4\u65B0\u65F6\u95F4" }),
3349
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "xps-mk-info-value", title: formatDate(displayUpdatedAt), children: formatRelative(displayUpdatedAt) })
3232
3350
  ] }),
3233
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "xps-mk-info-row", children: [
3234
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "xps-mk-info-label", children: "\u517C\u5BB9\u8303\u56F4" }),
3235
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "xps-mk-info-value", children: displayCompatRange === "" ? "\u4E0D\u9650" : `dsh ${displayCompatRange}` })
3351
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "xps-mk-info-row", children: [
3352
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "xps-mk-info-label", children: "\u517C\u5BB9\u8303\u56F4" }),
3353
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "xps-mk-info-value", children: displayCompatRange === "" ? "\u4E0D\u9650" : `dsh ${displayCompatRange}` })
3236
3354
  ] })
3237
3355
  ] }),
3238
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "xps-mk-card", children: [
3239
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "xps-mk-card-title", children: "\u7248\u672C\u5386\u53F2" }),
3240
- detail.versions.map((v) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
3356
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "xps-mk-card", children: [
3357
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "xps-mk-card-title", children: "\u7248\u672C\u5386\u53F2" }),
3358
+ detail.versions.map((v) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
3241
3359
  "button",
3242
3360
  {
3243
3361
  type: "button",
@@ -3245,12 +3363,12 @@ function PluginDetailPage(props) {
3245
3363
  title: `\u5207\u6362\u5230 v${v.version}`,
3246
3364
  onClick: () => setSelectedVersion(v.version),
3247
3365
  children: [
3248
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { children: [
3366
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { children: [
3249
3367
  "v",
3250
3368
  v.version,
3251
3369
  v.version === detail.version ? " \xB7 \u6700\u65B0" : ""
3252
3370
  ] }),
3253
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "xps-mk-version-date", children: formatDate(v.publishedAt) })
3371
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "xps-mk-version-date", children: formatDate(v.publishedAt) })
3254
3372
  ]
3255
3373
  },
3256
3374
  v.version
@@ -3279,19 +3397,19 @@ function ensureThemeStyles() {
3279
3397
  }
3280
3398
 
3281
3399
  // src/client/MarketplaceApp.tsx
3282
- var import_jsx_runtime19 = require("react/jsx-runtime");
3400
+ var import_jsx_runtime20 = require("react/jsx-runtime");
3283
3401
  var NAV_ICONS = {
3284
- market: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
3285
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("circle", { cx: "11", cy: "11", r: "7" }),
3286
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("path", { d: "M21 21l-4.3-4.3" })
3402
+ market: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
3403
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("circle", { cx: "11", cy: "11", r: "7" }),
3404
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { d: "M21 21l-4.3-4.3" })
3287
3405
  ] }),
3288
- installed: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
3289
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("path", { d: "M21 8l-9-5-9 5v8l9 5 9-5V8z" }),
3290
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("path", { d: "M3 8l9 5 9-5" })
3406
+ installed: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
3407
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { d: "M21 8l-9-5-9 5v8l9 5 9-5V8z" }),
3408
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { d: "M3 8l9 5 9-5" })
3291
3409
  ] }),
3292
- developer: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
3293
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("circle", { cx: "12", cy: "8", r: "4" }),
3294
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("path", { d: "M4 21c0-4 4-6 8-6s8 2 8 6" })
3410
+ developer: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
3411
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("circle", { cx: "12", cy: "8", r: "4" }),
3412
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { d: "M4 21c0-4 4-6 8-6s8 2 8 6" })
3295
3413
  ] })
3296
3414
  };
3297
3415
  var NAV_ITEMS = [
@@ -3303,8 +3421,8 @@ function MarketplaceApp() {
3303
3421
  const [nav, setNav] = (0, import_react9.useState)("market");
3304
3422
  const [detailId, setDetailId] = (0, import_react9.useState)(null);
3305
3423
  ensureThemeStyles();
3306
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "xps-app", children: [
3307
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("nav", { className: "xps-nav", children: NAV_ITEMS.map((item) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
3424
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "xps-app", children: [
3425
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("nav", { className: "xps-nav", children: NAV_ITEMS.map((item) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
3308
3426
  "button",
3309
3427
  {
3310
3428
  type: "button",
@@ -3314,23 +3432,23 @@ function MarketplaceApp() {
3314
3432
  setDetailId(null);
3315
3433
  },
3316
3434
  children: [
3317
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "xps-nav-icon", children: NAV_ICONS[item.key] }),
3318
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "xps-nav-label", children: item.label })
3435
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "xps-nav-icon", children: NAV_ICONS[item.key] }),
3436
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "xps-nav-label", children: item.label })
3319
3437
  ]
3320
3438
  },
3321
3439
  item.key
3322
3440
  )) }),
3323
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("main", { className: "xps-content", children: [
3324
- nav === "market" && (detailId !== null ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(PluginDetailPage, { pluginId: detailId, onBack: () => setDetailId(null) }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(MarketPage, { onOpenDetail: (id) => setDetailId(id) })),
3325
- nav === "installed" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(InstalledPage, {}),
3326
- nav === "developer" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(DeveloperPage, {})
3441
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("main", { className: "xps-content", children: [
3442
+ nav === "market" && (detailId !== null ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(PluginDetailPage, { pluginId: detailId, onBack: () => setDetailId(null) }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(MarketPage, { onOpenDetail: (id) => setDetailId(id) })),
3443
+ nav === "installed" && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(InstalledPage, {}),
3444
+ nav === "developer" && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DeveloperPage, {})
3327
3445
  ] })
3328
3446
  ] });
3329
3447
  }
3330
3448
 
3331
3449
  // src/client/settings/GeneralTokenRow.tsx
3332
3450
  var import_react10 = require("react");
3333
- var import_jsx_runtime20 = require("react/jsx-runtime");
3451
+ var import_jsx_runtime21 = require("react/jsx-runtime");
3334
3452
  var rowStyle = {
3335
3453
  display: "flex",
3336
3454
  justifyContent: "space-between",
@@ -3428,14 +3546,14 @@ function GeneralTokenRow() {
3428
3546
  setError("");
3429
3547
  }).catch((err) => setError(messageOf2(err, "\u9000\u51FA\u767B\u5F55\u5931\u8D25"))).finally(() => setPending(false));
3430
3548
  };
3431
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: rowStyle, children: [
3432
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: leftStyle, children: [
3433
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: titleStyle, children: "\u85AA\u4EBA\u85AA\u4E8B\u5E02\u573A" }),
3434
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: descStyle, children: "\u7C98\u8D34\u5E73\u53F0\u8BBF\u95EE\u4EE4\u724C\u540E\u53EF\u4E0A\u4F20\u63D2\u4EF6\u3001\u67E5\u770B\u5BA1\u6838\u72B6\u6001" })
3549
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: rowStyle, children: [
3550
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: leftStyle, children: [
3551
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { style: titleStyle, children: "\u85AA\u4EBA\u85AA\u4E8B\u5E02\u573A" }),
3552
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { style: descStyle, children: "\u7C98\u8D34\u5E73\u53F0\u8BBF\u95EE\u4EE4\u724C\u540E\u53EF\u4E0A\u4F20\u63D2\u4EF6\u3001\u67E5\u770B\u5BA1\u6838\u72B6\u6001" })
3435
3553
  ] }),
3436
- loading ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { ...rightStyle, ...hintStyle }, children: "\u8BFB\u53D6\u4E2D\u2026" }) : auth === null ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: rightStyle, children: [
3437
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
3438
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { width: 220 }, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3554
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { style: { ...rightStyle, ...hintStyle }, children: "\u8BFB\u53D6\u4E2D\u2026" }) : auth === null ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: rightStyle, children: [
3555
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
3556
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { style: { width: 220 }, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3439
3557
  Input,
3440
3558
  {
3441
3559
  value: token,
@@ -3448,18 +3566,138 @@ function GeneralTokenRow() {
3448
3566
  disabled: pending
3449
3567
  }
3450
3568
  ) }),
3451
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Button, { variant: "primary", size: "small", onClick: handleSave, disabled: pending, children: pending ? "\u9A8C\u8BC1\u4E2D\u2026" : "\u4FDD\u5B58\u5E76\u9A8C\u8BC1" })
3569
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Button, { variant: "primary", size: "small", onClick: handleSave, disabled: pending, children: pending ? "\u9A8C\u8BC1\u4E2D\u2026" : "\u4FDD\u5B58\u5E76\u9A8C\u8BC1" })
3452
3570
  ] }),
3453
- error !== "" ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: errorStyle, children: error }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: hintStyle, children: "\u4EE4\u724C\u5728\u5E73\u53F0\u7F51\u9875\u7AEF \u4E2A\u4EBA\u8BBE\u7F6E \u2192 \u8BBF\u95EE\u4EE4\u724C \u751F\u6210" })
3454
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: { ...rightStyle, flexDirection: "row", alignItems: "center", gap: 12 }, children: [
3455
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: { textAlign: "right" }, children: [
3456
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: valueStyle, children: [
3571
+ error !== "" ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { style: errorStyle, children: error }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { style: hintStyle, children: "\u4EE4\u724C\u5728\u5E73\u53F0\u7F51\u9875\u7AEF \u4E2A\u4EBA\u8BBE\u7F6E \u2192 \u8BBF\u95EE\u4EE4\u724C \u751F\u6210" })
3572
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: { ...rightStyle, flexDirection: "row", alignItems: "center", gap: 12 }, children: [
3573
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: { textAlign: "right" }, children: [
3574
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: valueStyle, children: [
3457
3575
  "\u5DF2\u767B\u5F55:",
3458
3576
  auth.developer.name
3459
3577
  ] }),
3460
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: descStyle, children: auth.expiresAt === "" ? "token \u957F\u671F\u6709\u6548" : `\u6709\u6548\u671F\u81F3 ${formatDateTime2(auth.expiresAt)}` })
3578
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { style: descStyle, children: auth.expiresAt === "" ? "token \u957F\u671F\u6709\u6548" : `\u6709\u6548\u671F\u81F3 ${formatDateTime2(auth.expiresAt)}` })
3579
+ ] }),
3580
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Button, { size: "small", variant: "outline", onClick: handleLogout, disabled: pending, children: pending ? "\u9000\u51FA\u4E2D\u2026" : "\u9000\u51FA\u767B\u5F55" })
3581
+ ] })
3582
+ ] });
3583
+ }
3584
+
3585
+ // src/client/settings/GeneralUpdateRow.tsx
3586
+ var import_react11 = require("react");
3587
+ var import_jsx_runtime22 = require("react/jsx-runtime");
3588
+ var rowStyle2 = {
3589
+ display: "flex",
3590
+ justifyContent: "space-between",
3591
+ alignItems: "center",
3592
+ gap: 24,
3593
+ padding: "16px 0",
3594
+ borderBottom: "0.5px solid var(--dsw-alias-border-l2, #dee0e3)"
3595
+ };
3596
+ var leftStyle2 = { minWidth: 0 };
3597
+ var titleStyle2 = {
3598
+ fontSize: 14,
3599
+ lineHeight: "20px",
3600
+ color: "var(--dsw-alias-label-primary, #1f2329)"
3601
+ };
3602
+ var descStyle2 = {
3603
+ marginTop: 4,
3604
+ fontSize: 12,
3605
+ lineHeight: "18px",
3606
+ color: "var(--dsw-alias-label-secondary, #646a73)"
3607
+ };
3608
+ var valueStyle2 = {
3609
+ fontSize: 13,
3610
+ lineHeight: "20px",
3611
+ color: "var(--dsw-alias-label-primary, #1f2329)"
3612
+ };
3613
+ var hintStyle2 = {
3614
+ fontSize: 12,
3615
+ lineHeight: "18px",
3616
+ color: "var(--dsw-alias-label-tertiary, #8f959e)"
3617
+ };
3618
+ var errorStyle2 = {
3619
+ ...hintStyle2,
3620
+ color: "var(--dsw-alias-state-error-primary, #d83931)",
3621
+ whiteSpace: "pre-line"
3622
+ };
3623
+ var rightStyle2 = {
3624
+ flexShrink: 0,
3625
+ display: "flex",
3626
+ flexDirection: "column",
3627
+ alignItems: "flex-end",
3628
+ gap: 4
3629
+ };
3630
+ function messageOf3(error, fallback) {
3631
+ return error instanceof Error && error.message !== "" ? error.message : fallback;
3632
+ }
3633
+ function GeneralUpdateRow() {
3634
+ const [phase, setPhase] = (0, import_react11.useState)({ kind: "checking" });
3635
+ const [error, setError] = (0, import_react11.useState)("");
3636
+ const check = () => {
3637
+ setPhase({ kind: "checking" });
3638
+ setError("");
3639
+ void checkSelfUpdate().then((result) => setPhase({ kind: "checked", check: result })).catch((err) => {
3640
+ setPhase({ kind: "checked", check: { current: null, latest: null, updateAvailable: false } });
3641
+ setError(messageOf3(err, "\u68C0\u67E5\u66F4\u65B0\u5931\u8D25"));
3642
+ });
3643
+ };
3644
+ (0, import_react11.useEffect)(check, []);
3645
+ const handleUpdate = (target, check0) => {
3646
+ setPhase({ kind: "updating", check: check0 });
3647
+ setError("");
3648
+ void applySelfUpdate(target).then((result) => {
3649
+ if (result.command !== void 0 && result.command !== "") {
3650
+ setPhase({ kind: "degraded", command: result.command, version: target });
3651
+ return;
3652
+ }
3653
+ setPhase({ kind: "updated", version: target });
3654
+ }).catch((err) => {
3655
+ setPhase({ kind: "checked", check: check0 });
3656
+ setError(messageOf3(err, "\u66F4\u65B0\u5931\u8D25"));
3657
+ });
3658
+ };
3659
+ const checking = phase.kind === "checking";
3660
+ const updating = phase.kind === "updating";
3661
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: rowStyle2, children: [
3662
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: leftStyle2, children: [
3663
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { style: titleStyle2, children: "\u85AA\u4EBA\u85AA\u4E8B\u5E02\u573A \xB7 \u63D2\u4EF6\u66F4\u65B0" }),
3664
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { style: descStyle2, children: phase.kind === "checked" && phase.check.current !== null ? `\u5F53\u524D\u7248\u672C v${phase.check.current}` : "\u81EA\u52A8\u68C0\u6D4B npm \u4E0A\u7684\u65B0\u7248\u672C,\u4E00\u952E\u66F4\u65B0(\u66F4\u65B0\u540E\u9700\u91CD\u542F\u5E94\u7528\u751F\u6548)" })
3665
+ ] }),
3666
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: rightStyle2, children: [
3667
+ phase.kind === "checking" && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { style: hintStyle2, children: "\u6B63\u5728\u68C0\u67E5\u66F4\u65B0\u2026" }),
3668
+ phase.kind === "checked" && (phase.check.updateAvailable && phase.check.latest !== null ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
3669
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: valueStyle2, children: [
3670
+ "\u53D1\u73B0\u65B0\u7248\u672C v",
3671
+ phase.check.latest
3672
+ ] }),
3673
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3674
+ Button,
3675
+ {
3676
+ variant: "primary",
3677
+ size: "small",
3678
+ onClick: () => handleUpdate(phase.check.latest ?? "", phase.check),
3679
+ title: `\u66F4\u65B0\u5230 v${phase.check.latest}`,
3680
+ children: "\u4E00\u952E\u66F4\u65B0"
3681
+ }
3682
+ )
3683
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
3684
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { style: hintStyle2, children: phase.check.latest === null ? "\u65E0\u6CD5\u83B7\u53D6\u6700\u65B0\u7248\u672C\u4FE1\u606F" : "\u5DF2\u662F\u6700\u65B0\u7248\u672C" }),
3685
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Button, { size: "small", variant: "ghost", onClick: check, title: "\u91CD\u65B0\u68C0\u67E5 npm \u4E0A\u7684\u6700\u65B0\u7248\u672C", children: "\u91CD\u65B0\u68C0\u67E5" })
3686
+ ] })),
3687
+ updating && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { style: hintStyle2, children: "\u6B63\u5728\u66F4\u65B0,\u8BF7\u7A0D\u5019\u2026" }),
3688
+ phase.kind === "updated" && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: valueStyle2, children: [
3689
+ "\u5DF2\u66F4\u65B0\u5230 v",
3690
+ phase.version,
3691
+ ",\u5B8C\u5168\u9000\u51FA\u5E76\u91CD\u542F\u5E94\u7528\u540E\u751F\u6548"
3461
3692
  ] }),
3462
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Button, { size: "small", variant: "outline", onClick: handleLogout, disabled: pending, children: pending ? "\u9000\u51FA\u4E2D\u2026" : "\u9000\u51FA\u767B\u5F55" })
3693
+ phase.kind === "degraded" && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { maxWidth: 420, textAlign: "right" }, children: [
3694
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { style: errorStyle2, children: "\u5BBF\u4E3B\u547D\u4EE4\u884C\u4E0D\u53EF\u7528,\u8BF7\u624B\u52A8\u6267\u884C\u4EE5\u4E0B\u547D\u4EE4\u540E\u91CD\u542F\u5E94\u7528:" }),
3695
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { style: { ...hintStyle2, whiteSpace: "pre-wrap", wordBreak: "break-all" }, children: phase.command })
3696
+ ] }),
3697
+ error !== "" && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
3698
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { style: errorStyle2, children: error }),
3699
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Button, { size: "small", variant: "ghost", onClick: check, disabled: checking, children: "\u91CD\u8BD5" })
3700
+ ] })
3463
3701
  ] })
3464
3702
  ] });
3465
3703
  }
@@ -3476,7 +3714,7 @@ function injectTheme() {
3476
3714
  function StoreIcon(props) {
3477
3715
  const active = props.active === true;
3478
3716
  const size = typeof props.size === "number" ? props.size : 20;
3479
- return (0, import_react11.createElement)(
3717
+ return (0, import_react12.createElement)(
3480
3718
  "svg",
3481
3719
  {
3482
3720
  width: size,
@@ -3487,13 +3725,13 @@ function StoreIcon(props) {
3487
3725
  color: active ? "var(--dsw-alias-brand-primary, #3861fb)" : "var(--dsw-alias-label-secondary, #646a73)"
3488
3726
  }
3489
3727
  },
3490
- (0, import_react11.createElement)("path", {
3728
+ (0, import_react12.createElement)("path", {
3491
3729
  d: "M4 7h16l-1.2-3.2A1 1 0 0 0 17.85 3H6.15a1 1 0 0 0-.95.8L4 7Zm0 0v12a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1V7",
3492
3730
  stroke: "currentColor",
3493
3731
  strokeWidth: 1.6,
3494
3732
  strokeLinejoin: "round"
3495
3733
  }),
3496
- (0, import_react11.createElement)("path", {
3734
+ (0, import_react12.createElement)("path", {
3497
3735
  d: "M9 11a3 3 0 0 0 6 0",
3498
3736
  stroke: "currentColor",
3499
3737
  strokeWidth: 1.6,
@@ -3503,13 +3741,13 @@ function StoreIcon(props) {
3503
3741
  }
3504
3742
  function BundleConfigSeat(props) {
3505
3743
  if (props.view === "page") {
3506
- return (0, import_react11.createElement)(
3744
+ return (0, import_react12.createElement)(
3507
3745
  "div",
3508
3746
  { className: "xps-page-placeholder" },
3509
3747
  "\u85AA\u4EBA\u85AA\u4E8B\u5E02\u573A\u914D\u7F6E(\u5360\u4F4D):serviceBaseUrl / cacheDir / requestTimeout / cachePolicy"
3510
3748
  );
3511
3749
  }
3512
- return (0, import_react11.createElement)("div", null, "\u85AA\u4EBA\u85AA\u4E8B\u5E02\u573A:\u79C1\u6709\u63D2\u4EF6\u6D4F\u89C8\u3001\u5B89\u88C5\u4E0E\u5F00\u53D1\u8005\u4E0A\u4F20");
3750
+ return (0, import_react12.createElement)("div", null, "\u85AA\u4EBA\u85AA\u4E8B\u5E02\u573A:\u79C1\u6709\u63D2\u4EF6\u6D4F\u89C8\u3001\u5B89\u88C5\u4E0E\u5F00\u53D1\u8005\u4E0A\u4F20");
3513
3751
  }
3514
3752
  function apply(ctx) {
3515
3753
  const slots = ctx.get("slots");
@@ -3542,7 +3780,7 @@ function apply(ctx) {
3542
3780
  "main",
3543
3781
  () => safe(
3544
3782
  "main",
3545
- () => slots.register({ name: "main", key: "xrxs-plugins-store" }, () => (0, import_react11.createElement)(MarketplaceApp))
3783
+ () => slots.register({ name: "main", key: "xrxs-plugins-store" }, () => (0, import_react12.createElement)(MarketplaceApp))
3546
3784
  )
3547
3785
  ),
3548
3786
  "xrxs-plugins-store.main"
@@ -3554,12 +3792,25 @@ function apply(ctx) {
3554
3792
  "settings.general.item",
3555
3793
  () => slots.register(
3556
3794
  { name: "settings.general.item", id: "xrxs-plugins-store-token", order: 50 },
3557
- () => (0, import_react11.createElement)(GeneralTokenRow)
3795
+ () => (0, import_react12.createElement)(GeneralTokenRow)
3558
3796
  )
3559
3797
  )
3560
3798
  ),
3561
3799
  "xrxs-plugins-store.settings.general-item"
3562
3800
  );
3801
+ ctx.effect(
3802
+ () => slots.inject(
3803
+ "settings.general.item",
3804
+ () => safe(
3805
+ "settings.general.item",
3806
+ () => slots.register(
3807
+ { name: "settings.general.item", id: "xrxs-plugins-store-update", order: 51 },
3808
+ () => (0, import_react12.createElement)(GeneralUpdateRow)
3809
+ )
3810
+ )
3811
+ ),
3812
+ "xrxs-plugins-store.settings.general-update"
3813
+ );
3563
3814
  ctx.effect(
3564
3815
  () => slots.inject(
3565
3816
  "plugins.bundle.config",
@@ -3567,7 +3818,7 @@ function apply(ctx) {
3567
3818
  "plugins.bundle.config",
3568
3819
  () => slots.register(
3569
3820
  { name: "plugins.bundle.config", key: "@xrxs-ai/dsh-xrxs-plugins-store" },
3570
- (props) => (0, import_react11.createElement)(BundleConfigSeat, props)
3821
+ (props) => (0, import_react12.createElement)(BundleConfigSeat, props)
3571
3822
  )
3572
3823
  )
3573
3824
  ),