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

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
@@ -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
  }
@@ -411,6 +413,19 @@ function NoticeDialog(props) {
411
413
  ] }) });
412
414
  }
413
415
 
416
+ // src/client/widgets/ConfirmDialog.tsx
417
+ var import_jsx_runtime8 = require("react/jsx-runtime");
418
+ function ConfirmDialog(props) {
419
+ 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: [
420
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "xps-dialog-title", children: props.title }),
421
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "xps-dialog-body xps-dialog-pre", children: props.body }),
422
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "xps-dialog-actions", children: [
423
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Button, { size: "small", disabled: props.busy === true, onClick: props.onConfirm, children: props.confirmText }),
424
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Button, { size: "small", variant: "ghost", disabled: props.busy === true, onClick: props.onCancel, children: props.cancelText ?? "\u53D6\u6D88" })
425
+ ] })
426
+ ] }) });
427
+ }
428
+
414
429
  // src/client/pages/admin/parts.tsx
415
430
  var import_react2 = require("react");
416
431
 
@@ -453,7 +468,7 @@ function formatRelative(text) {
453
468
  }
454
469
 
455
470
  // src/client/pages/admin/parts.tsx
456
- var import_jsx_runtime8 = require("react/jsx-runtime");
471
+ var import_jsx_runtime9 = require("react/jsx-runtime");
457
472
  var STATUS_BADGE = {
458
473
  pending: { label: "\u{1F550} \u5F85\u5BA1\u6838", tone: "warning" },
459
474
  approved: { label: "\u2705 \u5DF2\u4E0A\u67B6", tone: "success" },
@@ -483,28 +498,28 @@ function formatDateTime(text) {
483
498
  }
484
499
  function PluginStatusBadge(props) {
485
500
  const meta = badgeOf(STATUS_BADGE, props.status);
486
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Badge, { tone: meta.tone, children: meta.label });
501
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Badge, { tone: meta.tone, children: meta.label });
487
502
  }
488
503
  function VersionStatusBadge(props) {
489
504
  const meta = badgeOf(VERSION_BADGE, props.status);
490
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Badge, { tone: meta.tone, children: meta.label });
505
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Badge, { tone: meta.tone, children: meta.label });
491
506
  }
492
507
  function VersionList(props) {
493
508
  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" }) });
509
+ 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
510
  }
496
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "xps-dev-versions", children: props.versions.map((item) => {
511
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "xps-dev-versions", children: props.versions.map((item) => {
497
512
  const rejectReason = item.rejectReason?.trim() ?? "";
498
513
  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: [
514
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "xps-dev-ver", children: [
515
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "xps-dev-ver-head", children: [
516
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { className: "xps-dev-ver-no xps-mono", children: [
502
517
  "v",
503
518
  item.version
504
519
  ] }),
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)(
520
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(VersionStatusBadge, { status: item.status }),
521
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "xps-dev-ver-spacer" }),
522
+ item.withdrawable === true && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
508
523
  Button,
509
524
  {
510
525
  size: "small",
@@ -515,34 +530,34 @@ function VersionList(props) {
515
530
  }
516
531
  )
517
532
  ] }),
518
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "xps-dev-ver-meta", children: [
519
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
533
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "xps-dev-ver-meta", children: [
534
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { children: [
520
535
  "\u63D0\u4EA4 ",
521
536
  formatDateTime(item.submittedAt)
522
537
  ] }),
523
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
538
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { children: [
524
539
  "\u5BA1\u6838 ",
525
540
  formatDateTime(item.reviewedAt)
526
541
  ] })
527
542
  ] }),
528
- changelog !== "" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "xps-dev-ver-log", children: [
543
+ changelog !== "" && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "xps-dev-ver-log", children: [
529
544
  "\u66F4\u65B0\u8BF4\u660E:",
530
545
  changelog
531
546
  ] }),
532
- rejectReason !== "" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "xps-dev-ver-reject", children: [
547
+ rejectReason !== "" && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "xps-dev-ver-reject", children: [
533
548
  "\u9A73\u56DE\u7406\u7531:",
534
549
  rejectReason
535
550
  ] })
536
551
  ] }, item.version);
537
552
  }) });
538
553
  }
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)(
554
+ function ConfirmDialog2(props) {
555
+ 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: [
556
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "xps-dialog-title", children: props.title }),
557
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "xps-dialog-body", children: props.message }),
558
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "xps-dialog-actions", children: [
559
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Button, { onClick: props.onCancel, disabled: props.busy, children: "\u53D6\u6D88" }),
560
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
546
561
  Button,
547
562
  {
548
563
  variant: props.danger ? "danger" : "primary",
@@ -588,8 +603,8 @@ var editActionsStyle = {
588
603
  gap: 8
589
604
  };
590
605
  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 }),
606
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [
607
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { style: fieldLabelStyle, children: props.label }),
593
608
  props.children
594
609
  ] });
595
610
  }
@@ -627,33 +642,33 @@ function MetaEditPanel(props) {
627
642
  setError(null);
628
643
  props.onSubmit(patch);
629
644
  };
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)" })
645
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "xps-dev-versions", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { style: editPanelStyle, children: [
646
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { style: editHeadStyle, children: [
647
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "xps-dev-ver-no", children: "\u7F16\u8F91\u8D44\u6599" }),
648
+ /* @__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
649
  ] }),
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)(
650
+ /* @__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" }) }) }),
651
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { style: { display: "flex", gap: 6, marginBottom: 6 }, children: [
652
+ /* @__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" }) }),
653
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Field, { label: "\u5206\u7C7B(\u53EF\u9009)", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
639
654
  "select",
640
655
  {
641
656
  className: "xps-input",
642
657
  value: categoryId,
643
658
  onChange: (event) => setCategoryId(event.target.value),
644
659
  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))
660
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("option", { value: "", children: "\u672A\u5206\u7C7B" }),
661
+ options.map((item) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("option", { value: item.id, children: item.name }, item.id))
647
662
  ]
648
663
  }
649
664
  ) })
650
665
  ] }),
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" })
666
+ /* @__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" }) }) }),
667
+ /* @__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" }),
668
+ error !== null && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "xps-banner xps-banner-error", style: { margin: "8px 0 0" }, children: error }),
669
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { style: editActionsStyle, children: [
670
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Button, { size: "small", variant: "ghost", onClick: props.onCancel, disabled: props.busy, children: "\u53D6\u6D88" }),
671
+ /* @__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
672
  ] })
658
673
  ] }) });
659
674
  }
@@ -773,16 +788,16 @@ function primaryColorFor(name) {
773
788
  }
774
789
 
775
790
  // src/client/pages/market/PluginIcon.tsx
776
- var import_jsx_runtime9 = require("react/jsx-runtime");
791
+ var import_jsx_runtime10 = require("react/jsx-runtime");
777
792
  function PluginIcon(props) {
778
793
  const size = props.size ?? 40;
779
794
  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 } });
795
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("img", { className: "xps-mk-icon", src: props.iconUrl, alt: "", style: { width: size, height: size } });
781
796
  }
782
797
  const short = (props.name.split("/").pop() ?? props.name).replace(/^dsh-xrxs-?/, "");
783
798
  const letter = short.charAt(0).toUpperCase();
784
799
  const [from, to] = gradientFor(props.name);
785
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
800
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
786
801
  "span",
787
802
  {
788
803
  className: "xps-mk-icon",
@@ -1124,7 +1139,7 @@ function ensureMarketStyles() {
1124
1139
 
1125
1140
  // src/client/pages/UploadForm.tsx
1126
1141
  var import_react3 = require("react");
1127
- var import_jsx_runtime10 = require("react/jsx-runtime");
1142
+ var import_jsx_runtime11 = require("react/jsx-runtime");
1128
1143
  var MAX_ARTIFACT_BYTES = 50 * 1024 * 1024;
1129
1144
  var VERSION_PATTERN = /^\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?$/;
1130
1145
  var FLOW_STEPS = [
@@ -1280,11 +1295,11 @@ async function walkEntry(entry, out) {
1280
1295
  }
1281
1296
  }
1282
1297
  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: "* " }),
1298
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [
1299
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { style: labelStyle, children: [
1300
+ props.required && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { style: { color: "var(--dsw-alias-state-error-primary, #d83931)" }, children: "* " }),
1286
1301
  props.label,
1287
- props.hint !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { style: { marginLeft: 6 }, children: props.hint })
1302
+ props.hint !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { style: { marginLeft: 6 }, children: props.hint })
1288
1303
  ] }),
1289
1304
  props.children
1290
1305
  ] });
@@ -1565,24 +1580,24 @@ function UploadForm(props) {
1565
1580
  onDragLeave: () => setDragOver(false),
1566
1581
  onDrop: handleDrop
1567
1582
  };
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" })
1583
+ const dropInner = /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
1584
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "xps-up-drop-icon", children: "\u{1F4E6}" }),
1585
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "xps-up-drop-title", children: "\u62D6\u5165\u63D2\u4EF6\u4EE3\u7801\u76EE\u5F55" }),
1586
+ /* @__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)" }),
1587
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-up-drop-actions", onClick: (event) => event.stopPropagation(), children: [
1588
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Button, { size: "small", onClick: () => dirInputRef.current?.click(), children: "\u9009\u62E9\u76EE\u5F55" }),
1589
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Button, { size: "small", variant: "ghost", onClick: () => fileInputRef.current?.click(), children: "\u4EC5\u9009 tgz \u4EA7\u7269\u5305" })
1575
1590
  ] })
1576
1591
  ] });
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" })
1592
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { children: [
1593
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-page-head", children: [
1594
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { children: [
1595
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("h1", { className: "xps-page-title", children: heading }),
1596
+ /* @__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
1597
  ] }),
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" }) })
1598
+ /* @__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
1599
  ] }),
1585
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1600
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1586
1601
  "input",
1587
1602
  {
1588
1603
  ref: dirInputRef,
@@ -1595,7 +1610,7 @@ function UploadForm(props) {
1595
1610
  }
1596
1611
  }
1597
1612
  ),
1598
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1613
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1599
1614
  "input",
1600
1615
  {
1601
1616
  ref: artifactInputRef,
@@ -1608,7 +1623,7 @@ function UploadForm(props) {
1608
1623
  }
1609
1624
  }
1610
1625
  ),
1611
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1626
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1612
1627
  "input",
1613
1628
  {
1614
1629
  ref: fileInputRef,
@@ -1622,27 +1637,27 @@ function UploadForm(props) {
1622
1637
  }
1623
1638
  }
1624
1639
  ),
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 })
1640
+ scanned ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-up-layout", children: [
1641
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: `xps-up-drop xps-up-side-drop${dragOver ? " xps-up-drop-over" : ""}`, ...dropHandlers, children: dropInner }),
1642
+ (sourceNotice !== null || inspectError !== null) && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-up-side-notice", children: [
1643
+ sourceNotice !== null && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "xps-banner", children: sourceNotice }),
1644
+ inspectError !== null && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "xps-banner xps-banner-error", children: inspectError })
1630
1645
  ] }),
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" }) })
1646
+ scanned && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-up-card xps-up-side-scan", children: [
1647
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-up-card-title", children: [
1648
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "xps-up-step-chip", children: "\u7B2C 1 \u6B65" }),
1649
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: "\u786E\u8BA4\u53D1\u5E03\u5185\u5BB9" }),
1650
+ /* @__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
1651
  ] }),
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)(
1652
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { style: { marginBottom: 10 }, children: [
1653
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { style: { ...labelStyle, marginBottom: 4 }, children: "\u{1F4E6} \u4EA7\u7269\u5305(\u5FC5\u586B)" }),
1654
+ 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" }),
1655
+ artifactCandidates.map((item) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
1641
1656
  "label",
1642
1657
  {
1643
1658
  className: `xps-up-candidate${selectedArtifact === item.path ? " xps-up-candidate-active" : ""}`,
1644
1659
  children: [
1645
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1660
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1646
1661
  "input",
1647
1662
  {
1648
1663
  type: "radio",
@@ -1651,10 +1666,10 @@ function UploadForm(props) {
1651
1666
  onChange: () => setSelectedArtifact(item.path)
1652
1667
  }
1653
1668
  ),
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: [
1669
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: "\u{1F4E6}" }),
1670
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "xps-up-candidate-main", children: [
1671
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "xps-up-candidate-name", children: item.file.name }),
1672
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "xps-up-candidate-path", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("bdi", { children: [
1658
1673
  formatSize(item.file.size),
1659
1674
  item.path !== item.file.name ? ` \xB7 ${item.path}` : ""
1660
1675
  ] }) })
@@ -1664,22 +1679,22 @@ function UploadForm(props) {
1664
1679
  item.path
1665
1680
  ))
1666
1681
  ] }),
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" })
1682
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { children: [
1683
+ /* @__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)" }),
1684
+ 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: [
1685
+ /* @__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" }),
1686
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Button, { size: "small", onClick: () => dirInputRef.current?.click(), children: "\u9009\u62E9\u76EE\u5F55" })
1672
1687
  ] })
1673
1688
  ] })
1674
1689
  ] }),
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" })
1690
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
1691
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-up-card xps-up-main-form", children: [
1692
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-up-card-title", children: [
1693
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "xps-up-step-chip", children: "\u7B2C 2 \u6B65" }),
1694
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: "\u586B\u5199\u63D2\u4EF6\u4FE1\u606F" })
1680
1695
  ] }),
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)(
1696
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-up-grid", children: [
1697
+ /* @__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
1698
  Input,
1684
1699
  {
1685
1700
  value: packageName,
@@ -1687,7 +1702,7 @@ function UploadForm(props) {
1687
1702
  placeholder: "@xrxs-ai/dsh-xrxs-xxx"
1688
1703
  }
1689
1704
  ) }),
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)(
1705
+ /* @__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
1706
  Input,
1692
1707
  {
1693
1708
  value: versionLocked ? lockedVersion : version,
@@ -1697,32 +1712,32 @@ function UploadForm(props) {
1697
1712
  }
1698
1713
  ) })
1699
1714
  ] }),
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" }) })
1715
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-up-grid", children: [
1716
+ /* @__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" }) }),
1717
+ /* @__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
1718
  ] }),
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)(
1719
+ /* @__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" }) }) }),
1720
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-up-grid", children: [
1721
+ /* @__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" }) }),
1722
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Labeled, { label: "\u5206\u7C7B", required: false, hint: "(\u53EF\u9009)", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
1708
1723
  "select",
1709
1724
  {
1710
1725
  className: "xps-input",
1711
1726
  value: category,
1712
1727
  onChange: (event) => setCategory(event.target.value),
1713
1728
  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))
1729
+ categoryOptions.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("option", { value: "", children: "\u52A0\u8F7D\u4E2D\u2026" }),
1730
+ categoryOptions.map((item) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("option", { value: item.id, children: item.name }, item.id))
1716
1731
  ]
1717
1732
  }
1718
1733
  ) })
1719
1734
  ] }),
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" }) })
1735
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-up-grid", children: [
1736
+ /* @__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)" }) }) }),
1737
+ /* @__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
1738
  ] }),
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)(
1739
+ /* @__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" }) }) }),
1740
+ /* @__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
1741
  "textarea",
1727
1742
  {
1728
1743
  className: "xps-input",
@@ -1732,7 +1747,7 @@ function UploadForm(props) {
1732
1747
  onChange: (event) => setDescription(event.target.value)
1733
1748
  }
1734
1749
  ) }) }),
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)(
1750
+ /* @__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
1751
  "textarea",
1737
1752
  {
1738
1753
  className: "xps-input",
@@ -1743,9 +1758,9 @@ function UploadForm(props) {
1743
1758
  }
1744
1759
  ) }) })
1745
1760
  ] }),
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)(
1761
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-up-main-submit", children: [
1762
+ submitError !== null && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "xps-banner xps-banner-error", style: { marginBottom: 10 }, children: submitError }),
1763
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1749
1764
  "button",
1750
1765
  {
1751
1766
  type: "button",
@@ -1758,55 +1773,55 @@ function UploadForm(props) {
1758
1773
  children: submitting ? "\u63D0\u4EA4\u4E2D\u2026" : "\u63D0\u4EA4\u5BA1\u6838"
1759
1774
  }
1760
1775
  ),
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" })
1776
+ /* @__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
1777
  ] })
1763
1778
  ] })
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 })
1779
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-up-empty-grid", children: [
1780
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: `xps-up-drop${dragOver ? " xps-up-drop-over" : ""}`, ...dropHandlers, children: dropInner }),
1781
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-up-empty xps-up-empty-static", children: [
1782
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-up-flow", children: [
1783
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "xps-up-flow-title", children: "\u53D1\u5E03\u6D41\u7A0B" }),
1784
+ FLOW_STEPS.map((step) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-up-flow-item", children: [
1785
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "xps-up-flow-no", children: step.no }),
1786
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "xps-up-flow-main", children: [
1787
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "xps-up-flow-item-title", children: step.title }),
1788
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "xps-up-flow-item-desc", children: step.desc })
1774
1789
  ] })
1775
1790
  ] }, step.no))
1776
1791
  ] }),
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" })
1792
+ /* @__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
1793
  ] })
1779
1794
  ] }),
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:" }),
1795
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-up-guide", children: [
1796
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "xps-up-guide-title", children: "\u53D1\u5E03\u8BF4\u660E" }),
1797
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("ol", { children: [
1798
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("li", { children: [
1799
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("b", { children: "\u81EA\u52A8\u8BC6\u522B\u586B\u5145:" }),
1785
1800
  "\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
1801
  ] }),
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:" }),
1802
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("li", { children: [
1803
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("b", { children: "README \u8BF7\u5C3D\u91CF\u5199\u6E05\u695A:" }),
1789
1804
  "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
1805
  ] }),
1791
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("li", { children: [
1792
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("b", { children: "\u4EA7\u7269\u5305(*.tgz):" }),
1806
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("li", { children: [
1807
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("b", { children: "\u4EA7\u7269\u5305(*.tgz):" }),
1793
1808
  "\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
1809
  ] }),
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:" }),
1810
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("li", { children: [
1811
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("b", { children: "\u6E90\u7801\u5305\u81EA\u52A8\u6253\u5305:" }),
1797
1812
  "\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
1813
  ] }),
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:" }),
1814
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("li", { children: [
1815
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("b", { children: "\u7248\u672C\u53F7\u5FC5\u987B\u9012\u589E:" }),
1801
1816
  "\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
1817
  ] }),
1803
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("li", { children: [
1804
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("b", { children: "\u5BA1\u6838\u4E0A\u67B6:" }),
1818
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("li", { children: [
1819
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("b", { children: "\u5BA1\u6838\u4E0A\u67B6:" }),
1805
1820
  "\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
1821
  ] })
1807
1822
  ] })
1808
1823
  ] }),
1809
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ToastHost, { items, onDismiss: dismiss })
1824
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ToastHost, { items, onDismiss: dismiss })
1810
1825
  ] });
1811
1826
  }
1812
1827
  function formatSize(bytes) {
@@ -1816,7 +1831,7 @@ function formatSize(bytes) {
1816
1831
  }
1817
1832
 
1818
1833
  // src/client/pages/DeveloperPage.tsx
1819
- var import_jsx_runtime11 = require("react/jsx-runtime");
1834
+ var import_jsx_runtime12 = require("react/jsx-runtime");
1820
1835
  function mergePluginDetail(list, detail) {
1821
1836
  const index = list.findIndex((item) => item.id === detail.id);
1822
1837
  if (index < 0) return [detail, ...list];
@@ -1974,25 +1989,25 @@ function DeveloperPage() {
1974
1989
  [applyDetail, push]
1975
1990
  );
1976
1991
  if (authLoading) {
1977
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Skeleton, { lines: 3 });
1992
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Skeleton, { lines: 3 });
1978
1993
  }
1979
1994
  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" })
1995
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { children: [
1996
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "xps-page-head", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { children: [
1997
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h1", { className: "xps-page-title", children: "\u6211\u7684" }),
1998
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "xps-page-intro", children: "\u4E0A\u4F20\u63D2\u4EF6\u5E76\u67E5\u770B\u5BA1\u6838\u72B6\u6001" })
1984
1999
  ] }) }),
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" })
2000
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "xps-guide", children: [
2001
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "xps-guide-title", children: "\u{1F512} \u672A\u767B\u5F55\u5F00\u53D1\u8005\u8D26\u53F7" }),
2002
+ /* @__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" }),
2003
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("ol", { className: "xps-guide-steps", children: [
2004
+ /* @__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" }),
2005
+ /* @__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)" }),
2006
+ /* @__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" }),
2007
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("li", { children: "\u56DE\u5230\u672C\u9875\u4E0A\u4F20\u63D2\u4EF6\u3001\u8DDF\u8E2A\u5BA1\u6838\u72B6\u6001" })
1993
2008
  ] }),
1994
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "xps-guide-actions", children: [
1995
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2009
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "xps-guide-actions", children: [
2010
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1996
2011
  Button,
1997
2012
  {
1998
2013
  variant: "primary",
@@ -2006,7 +2021,7 @@ function DeveloperPage() {
2006
2021
  children: "\u524D\u5F80\u5F00\u53D1\u8005\u5E73\u53F0"
2007
2022
  }
2008
2023
  ),
2009
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2024
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2010
2025
  Button,
2011
2026
  {
2012
2027
  variant: "outline",
@@ -2020,15 +2035,15 @@ function DeveloperPage() {
2020
2035
  }
2021
2036
  )
2022
2037
  ] }),
2023
- portalUrl !== "" && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "xps-guide-url xps-mono", children: portalUrl })
2038
+ portalUrl !== "" && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "xps-guide-url xps-mono", children: portalUrl })
2024
2039
  ] }),
2025
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ToastHost, { items, onDismiss: dismiss })
2040
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ToastHost, { items, onDismiss: dismiss })
2026
2041
  ] });
2027
2042
  }
2028
2043
  if (view.kind === "upload") {
2029
2044
  const target = view.target;
2030
2045
  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)(
2046
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2032
2047
  UploadForm,
2033
2048
  {
2034
2049
  target: view.target,
@@ -2039,25 +2054,25 @@ function DeveloperPage() {
2039
2054
  formKey
2040
2055
  );
2041
2056
  }
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: [
2057
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { children: [
2058
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "xps-page-head", children: [
2059
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { children: [
2060
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h1", { className: "xps-page-title", children: "\u6211\u7684" }),
2061
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("p", { className: "xps-page-intro", children: [
2047
2062
  auth.developer.name,
2048
2063
  " \xB7",
2049
2064
  " ",
2050
2065
  auth.expiresAt === "" ? "token \u957F\u671F\u6709\u6548" : `token \u6709\u6548\u671F\u81F3 ${formatDateTime(auth.expiresAt)}`
2051
2066
  ] })
2052
2067
  ] }),
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" })
2068
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "xps-page-actions", children: [
2069
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Button, { size: "small", variant: "ghost", onClick: handleLogout, children: "\u767B\u51FA" }),
2070
+ /* @__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, {}) }),
2071
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Button, { variant: "primary", onClick: () => openUpload({ kind: "new" }, {}), children: "+ \u4E0A\u4F20\u65B0\u63D2\u4EF6" })
2057
2072
  ] })
2058
2073
  ] }),
2059
- plugins === null && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Skeleton, { lines: 3 }),
2060
- plugins !== null && plugins.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2074
+ plugins === null && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Skeleton, { lines: 3 }),
2075
+ plugins !== null && plugins.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2061
2076
  EmptyState,
2062
2077
  {
2063
2078
  icon: "\u{1F4E4}",
@@ -2069,27 +2084,27 @@ function DeveloperPage() {
2069
2084
  const rejectReason = rejectReasonOf(plugin);
2070
2085
  const action = actionOf(plugin);
2071
2086
  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: [
2087
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "xps-dev-item", children: [
2088
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "xps-dev-head", children: [
2089
+ /* @__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 }) }),
2090
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "xps-dev-main", children: [
2091
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "xps-dev-title", children: [
2092
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "xps-dev-name", children: nameOf(plugin) }),
2093
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "xps-dev-pkg xps-mono", children: plugin.name }),
2094
+ plugin.version !== "" && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "xps-dev-pkg xps-mono", children: [
2080
2095
  "v",
2081
2096
  plugin.version
2082
2097
  ] })
2083
2098
  ] }),
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: [
2099
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "xps-dev-summary", children: plugin.summary }),
2100
+ rejectReason !== "" && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "xps-dev-reject", children: [
2086
2101
  "\u9A73\u56DE\u7406\u7531:",
2087
2102
  rejectReason
2088
2103
  ] })
2089
2104
  ] }),
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)(
2105
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "xps-dev-actions", children: [
2106
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(PluginStatusBadge, { status: plugin.status }),
2107
+ action !== null && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2093
2108
  Button,
2094
2109
  {
2095
2110
  size: "small",
@@ -2098,7 +2113,7 @@ function DeveloperPage() {
2098
2113
  children: action.label
2099
2114
  }
2100
2115
  ),
2101
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2116
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2102
2117
  Button,
2103
2118
  {
2104
2119
  size: "small",
@@ -2108,7 +2123,7 @@ function DeveloperPage() {
2108
2123
  children: `\u7F16\u8F91\u8D44\u6599 ${openPanel === "edit" ? "\u25B4" : "\u25BE"}`
2109
2124
  }
2110
2125
  ),
2111
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2126
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2112
2127
  Button,
2113
2128
  {
2114
2129
  size: "small",
@@ -2119,7 +2134,7 @@ function DeveloperPage() {
2119
2134
  )
2120
2135
  ] })
2121
2136
  ] }),
2122
- openPanel === "edit" && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2137
+ openPanel === "edit" && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2123
2138
  MetaEditPanel,
2124
2139
  {
2125
2140
  plugin,
@@ -2130,7 +2145,7 @@ function DeveloperPage() {
2130
2145
  },
2131
2146
  plugin.id
2132
2147
  ),
2133
- openPanel === "versions" && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2148
+ openPanel === "versions" && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2134
2149
  VersionList,
2135
2150
  {
2136
2151
  versions: plugin.versions,
@@ -2140,8 +2155,8 @@ function DeveloperPage() {
2140
2155
  )
2141
2156
  ] }, plugin.id);
2142
2157
  }),
2143
- withdrawTarget !== null && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2144
- ConfirmDialog,
2158
+ withdrawTarget !== null && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2159
+ ConfirmDialog2,
2145
2160
  {
2146
2161
  title: "\u64A4\u56DE\u5F85\u5BA1\u7248\u672C",
2147
2162
  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 +2167,7 @@ function DeveloperPage() {
2152
2167
  onConfirm: runWithdraw
2153
2168
  }
2154
2169
  ),
2155
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ToastHost, { items, onDismiss: dismiss })
2170
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ToastHost, { items, onDismiss: dismiss })
2156
2171
  ] });
2157
2172
  }
2158
2173
 
@@ -2160,6 +2175,9 @@ function DeveloperPage() {
2160
2175
  var import_react5 = require("react");
2161
2176
 
2162
2177
  // src/client/pages/market/install.ts
2178
+ function approveBuilds(packages) {
2179
+ return hostPost("/api/approve-builds", { packages: [...packages] });
2180
+ }
2163
2181
  function messageOf(error) {
2164
2182
  return error instanceof Error && error.message !== "" ? error.message : String(error);
2165
2183
  }
@@ -2169,6 +2187,9 @@ function degradedCommand(result) {
2169
2187
  }
2170
2188
  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
2189
  function runInstall(args) {
2190
+ return runInstallOnce(args, false);
2191
+ }
2192
+ function runInstallOnce(args, retried) {
2172
2193
  const notice = (value) => {
2173
2194
  if (args.onNotice !== void 0) args.onNotice(value);
2174
2195
  else args.onToast("error", `${value.title}:${value.body}`);
@@ -2184,7 +2205,11 @@ function runInstall(args) {
2184
2205
  `${args.name}@${args.version} \u5B89\u88C5\u5B8C\u6210,\u5B8C\u5168\u9000\u51FA\u5E76\u91CD\u542F\u5E94\u7528\u540E\u751F\u6548`
2185
2206
  );
2186
2207
  return { applied: true };
2187
- }).catch((error) => {
2208
+ }).catch(async (error) => {
2209
+ if (!retried && args.onBuildBlocked !== void 0 && error instanceof HostRpcError && error.errorCode === "BUILD_SCRIPTS_BLOCKED" && (error.pendingBuilds?.length ?? 0) > 0) {
2210
+ const approved = await args.onBuildBlocked(error.pendingBuilds ?? []);
2211
+ if (approved) return runInstallOnce(args, true);
2212
+ }
2188
2213
  notice({ title: `\u5B89\u88C5\u5931\u8D25:${args.name}@${args.version}`, body: messageOf(error) });
2189
2214
  return { applied: false };
2190
2215
  });
@@ -2217,14 +2242,14 @@ async function resolveSourceType(name) {
2217
2242
  }
2218
2243
 
2219
2244
  // 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)(
2245
+ var import_jsx_runtime13 = require("react/jsx-runtime");
2246
+ function ConfirmDialog3(props) {
2247
+ 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: [
2248
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "xps-dialog-title", children: props.title }),
2249
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "xps-dialog-body", children: props.message }),
2250
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "xps-dialog-actions", children: [
2251
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Button, { onClick: props.onCancel, disabled: props.busy, children: "\u53D6\u6D88" }),
2252
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2228
2253
  Button,
2229
2254
  {
2230
2255
  variant: props.danger ? "danger" : "primary",
@@ -2245,6 +2270,7 @@ function InstalledPage() {
2245
2270
  const [notice, setNotice] = (0, import_react5.useState)(null);
2246
2271
  const [busy, setBusy] = (0, import_react5.useState)(false);
2247
2272
  const [restartNeeded, setRestartNeeded] = (0, import_react5.useState)(false);
2273
+ const [buildConfirm, setBuildConfirm] = (0, import_react5.useState)(null);
2248
2274
  const load = (0, import_react5.useCallback)(() => {
2249
2275
  setList(null);
2250
2276
  setError(false);
@@ -2273,7 +2299,11 @@ function InstalledPage() {
2273
2299
  version,
2274
2300
  sourceType,
2275
2301
  onToast: push,
2276
- onNotice: collectNotice
2302
+ onNotice: collectNotice,
2303
+ onBuildBlocked: (packages) => {
2304
+ setConfirm(null);
2305
+ return new Promise((resolve) => setBuildConfirm({ packages, resolve }));
2306
+ }
2277
2307
  });
2278
2308
  applied = outcome.applied;
2279
2309
  } else {
@@ -2289,33 +2319,33 @@ function InstalledPage() {
2289
2319
  }
2290
2320
  })();
2291
2321
  }, [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: [
2322
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { children: [
2323
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "xps-page-head", children: [
2324
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { children: [
2325
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("h1", { className: "xps-page-title xps-title-with-badges", children: [
2296
2326
  "\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: [
2327
+ list !== null && list.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Badge, { children: list.length }),
2328
+ list !== null && list.some((item) => item.updateAvailable) && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Badge, { tone: "warning", children: [
2299
2329
  list.filter((item) => item.updateAvailable).length,
2300
2330
  " \u53EF\u66F4\u65B0"
2301
2331
  ] })
2302
2332
  ] }),
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" })
2333
+ /* @__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
2334
  ] }),
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, {}) }) })
2335
+ /* @__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
2336
  ] }),
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)(
2337
+ 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" }),
2338
+ list === null && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Skeleton, { lines: 3 }),
2339
+ error && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2310
2340
  EmptyState,
2311
2341
  {
2312
2342
  icon: "\u{1F6DC}",
2313
2343
  title: "\u670D\u52A1\u4E0D\u53EF\u8FBE",
2314
2344
  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" })
2345
+ action: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Button, { onClick: load, children: "\u91CD\u8BD5" })
2316
2346
  }
2317
2347
  ),
2318
- !error && list !== null && list.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2348
+ !error && list !== null && list.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2319
2349
  EmptyState,
2320
2350
  {
2321
2351
  icon: "\u{1F4E6}",
@@ -2323,22 +2353,22 @@ function InstalledPage() {
2323
2353
  description: "\u524D\u5F80\u300C\u5E02\u573A\u300D\u9875\u6311\u9009\u5E76\u5B89\u88C5\u63D2\u4EF6"
2324
2354
  }
2325
2355
  ),
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: [
2356
+ !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: [
2357
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(PluginIcon, { name: displayNameOf(plugin), iconUrl: "", size: 40 }),
2358
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "xps-row-main", children: [
2359
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "xps-row-title", children: [
2360
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "xps-row-name", children: displayNameOf(plugin) }),
2361
+ hasDisplayName(plugin) && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "xps-row-pkg xps-mono", children: plugin.name }),
2362
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "xps-row-pkg xps-mono", children: [
2333
2363
  "v",
2334
2364
  plugin.version
2335
2365
  ] })
2336
2366
  ] }),
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"}` : ""}` })
2367
+ /* @__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
2368
  ] }),
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)(
2369
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "xps-row-end", children: [
2370
+ plugin.updateAvailable && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Badge, { tone: "warning", children: "\u53EF\u66F4\u65B0" }),
2371
+ plugin.updateAvailable && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2342
2372
  Button,
2343
2373
  {
2344
2374
  size: "small",
@@ -2347,7 +2377,7 @@ function InstalledPage() {
2347
2377
  children: "\u66F4\u65B0"
2348
2378
  }
2349
2379
  ),
2350
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2380
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2351
2381
  Button,
2352
2382
  {
2353
2383
  size: "small",
@@ -2358,8 +2388,8 @@ function InstalledPage() {
2358
2388
  )
2359
2389
  ] })
2360
2390
  ] }, plugin.name)) }),
2361
- confirm !== null && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2362
- ConfirmDialog2,
2391
+ confirm !== null && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2392
+ ConfirmDialog3,
2363
2393
  {
2364
2394
  title: confirm.action === "update" ? "\u66F4\u65B0\u63D2\u4EF6" : "\u5378\u8F7D\u63D2\u4EF6",
2365
2395
  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 +2400,36 @@ function InstalledPage() {
2370
2400
  onConfirm: handleConfirm
2371
2401
  }
2372
2402
  ),
2373
- notice !== null && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2403
+ buildConfirm !== null && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2404
+ ConfirmDialog,
2405
+ {
2406
+ title: "\u9700\u8981\u5141\u8BB8\u4F9D\u8D56\u6267\u884C\u5B89\u88C5\u811A\u672C",
2407
+ body: [
2408
+ "\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:",
2409
+ "",
2410
+ ` ${buildConfirm.packages.join(" , ")}`,
2411
+ "",
2412
+ "\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",
2413
+ "\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"
2414
+ ].join("\n"),
2415
+ confirmText: "\u5141\u8BB8\u5E76\u91CD\u8BD5",
2416
+ busy,
2417
+ onConfirm: () => {
2418
+ const { packages, resolve } = buildConfirm;
2419
+ void approveBuilds(packages).then(() => {
2420
+ resolve(true);
2421
+ }).catch((error2) => {
2422
+ resolve(false);
2423
+ push("error", `\u6279\u51C6\u5931\u8D25:${messageOf(error2)}`);
2424
+ }).finally(() => setBuildConfirm(null));
2425
+ },
2426
+ onCancel: () => {
2427
+ buildConfirm.resolve(false);
2428
+ setBuildConfirm(null);
2429
+ }
2430
+ }
2431
+ ),
2432
+ notice !== null && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2374
2433
  "div",
2375
2434
  {
2376
2435
  style: { display: "contents" },
@@ -2380,7 +2439,7 @@ function InstalledPage() {
2380
2439
  if (event.key === "Escape") setNotice(null);
2381
2440
  },
2382
2441
  onKeyUp: (event) => event.stopPropagation(),
2383
- children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2442
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2384
2443
  NoticeDialog,
2385
2444
  {
2386
2445
  title: notice.title,
@@ -2390,7 +2449,7 @@ function InstalledPage() {
2390
2449
  )
2391
2450
  }
2392
2451
  ),
2393
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ToastHost, { items, onDismiss: dismiss })
2452
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ToastHost, { items, onDismiss: dismiss })
2394
2453
  ] });
2395
2454
  }
2396
2455
 
@@ -2398,10 +2457,10 @@ function InstalledPage() {
2398
2457
  var import_react7 = require("react");
2399
2458
 
2400
2459
  // src/client/pages/market/CategoryBadge.tsx
2401
- var import_jsx_runtime13 = require("react/jsx-runtime");
2460
+ var import_jsx_runtime14 = require("react/jsx-runtime");
2402
2461
  function CategoryBadge(props) {
2403
2462
  const color = primaryColorFor(props.category);
2404
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2463
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2405
2464
  "span",
2406
2465
  {
2407
2466
  className: "xps-mk-cat",
@@ -2484,13 +2543,15 @@ function satisfies(version, range) {
2484
2543
 
2485
2544
  // src/client/pages/market/InstallButton.tsx
2486
2545
  var import_react6 = require("react");
2487
- var import_jsx_runtime14 = require("react/jsx-runtime");
2546
+ var import_jsx_runtime15 = require("react/jsx-runtime");
2488
2547
  function InstallButton(props) {
2489
2548
  const [phase, setPhase] = (0, import_react6.useState)("idle");
2490
2549
  const [notice, setNotice] = (0, import_react6.useState)(null);
2550
+ const [buildConfirm, setBuildConfirm] = (0, import_react6.useState)(null);
2551
+ const [approving, setApproving] = (0, import_react6.useState)(false);
2491
2552
  const compat = checkCompat(props.compatRange, props.dshVersion);
2492
2553
  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)(
2554
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "xps-mk-install", onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2494
2555
  Button,
2495
2556
  {
2496
2557
  size: props.size ?? "medium",
@@ -2508,14 +2569,29 @@ function InstallButton(props) {
2508
2569
  version: props.version,
2509
2570
  sourceType: props.sourceType,
2510
2571
  onToast: props.onToast,
2511
- onNotice: setNotice
2572
+ onNotice: setNotice,
2573
+ onBuildBlocked: (packages) => new Promise((resolve) => setBuildConfirm({ packages, resolve }))
2512
2574
  }).finally(() => setPhase("idle"));
2513
2575
  };
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)(
2576
+ const handleBuildApprove = () => {
2577
+ if (buildConfirm === null) return;
2578
+ const { packages, resolve } = buildConfirm;
2579
+ setApproving(true);
2580
+ void approveBuilds(packages).then(() => {
2581
+ resolve(true);
2582
+ }).catch((error) => {
2583
+ resolve(false);
2584
+ props.onToast("error", `\u6279\u51C6\u5931\u8D25:${messageOf(error)}`);
2585
+ }).finally(() => {
2586
+ setApproving(false);
2587
+ setBuildConfirm(null);
2588
+ });
2589
+ };
2590
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
2591
+ /* @__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: [
2592
+ /* @__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" }),
2593
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Button, { size: "small", variant: "ghost", onClick: () => setPhase("idle"), title: "\u53D6\u6D88\u5B89\u88C5", children: "\u53D6\u6D88" })
2594
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2519
2595
  Button,
2520
2596
  {
2521
2597
  size: props.size ?? "medium",
@@ -2532,7 +2608,7 @@ function InstallButton(props) {
2532
2608
  children: phase === "installing" ? "\u5B89\u88C5\u4E2D\u2026" : "\u5B89\u88C5"
2533
2609
  }
2534
2610
  ) }),
2535
- notice !== null && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2611
+ notice !== null && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2536
2612
  "div",
2537
2613
  {
2538
2614
  style: { display: "contents" },
@@ -2542,7 +2618,7 @@ function InstallButton(props) {
2542
2618
  if (event.key === "Escape") setNotice(null);
2543
2619
  },
2544
2620
  onKeyUp: (event) => event.stopPropagation(),
2545
- children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2621
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2546
2622
  NoticeDialog,
2547
2623
  {
2548
2624
  title: notice.title,
@@ -2551,12 +2627,48 @@ function InstallButton(props) {
2551
2627
  }
2552
2628
  )
2553
2629
  }
2630
+ ),
2631
+ buildConfirm !== null && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2632
+ "div",
2633
+ {
2634
+ style: { display: "contents" },
2635
+ onClick: (event) => event.stopPropagation(),
2636
+ onKeyDown: (event) => {
2637
+ event.stopPropagation();
2638
+ if (event.key === "Escape" && approving === false) {
2639
+ buildConfirm.resolve(false);
2640
+ setBuildConfirm(null);
2641
+ }
2642
+ },
2643
+ onKeyUp: (event) => event.stopPropagation(),
2644
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2645
+ ConfirmDialog,
2646
+ {
2647
+ title: "\u9700\u8981\u5141\u8BB8\u4F9D\u8D56\u6267\u884C\u5B89\u88C5\u811A\u672C",
2648
+ body: [
2649
+ "\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:",
2650
+ "",
2651
+ ` ${buildConfirm.packages.join(" , ")}`,
2652
+ "",
2653
+ "\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",
2654
+ "\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"
2655
+ ].join("\n"),
2656
+ confirmText: "\u5141\u8BB8\u5E76\u91CD\u8BD5",
2657
+ busy: approving,
2658
+ onConfirm: handleBuildApprove,
2659
+ onCancel: () => {
2660
+ buildConfirm.resolve(false);
2661
+ setBuildConfirm(null);
2662
+ }
2663
+ }
2664
+ )
2665
+ }
2554
2666
  )
2555
2667
  ] });
2556
2668
  }
2557
2669
 
2558
2670
  // src/client/pages/market/PluginRow.tsx
2559
- var import_jsx_runtime15 = require("react/jsx-runtime");
2671
+ var import_jsx_runtime16 = require("react/jsx-runtime");
2560
2672
  function PluginRow(props) {
2561
2673
  const p = props.plugin;
2562
2674
  const title = displayNameOf(p);
@@ -2564,7 +2676,7 @@ function PluginRow(props) {
2564
2676
  const installed = props.installed;
2565
2677
  const upToDate = installed !== void 0 && !installed.updateAvailable;
2566
2678
  const open = () => props.onOpen?.(p.id);
2567
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
2679
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
2568
2680
  "div",
2569
2681
  {
2570
2682
  className: "xps-mk-row",
@@ -2576,33 +2688,33 @@ function PluginRow(props) {
2576
2688
  if (e.key === "Enter") open();
2577
2689
  },
2578
2690
  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 })
2691
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(PluginIcon, { name: title, iconUrl: p.iconUrl, size: 40 }),
2692
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "xps-mk-row-main", children: [
2693
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "xps-mk-row-title", children: [
2694
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "xps-mk-row-name", children: title }),
2695
+ title !== p.name && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "xps-mk-row-pkg xps-mono", children: p.name }),
2696
+ p.category !== "" && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(CategoryBadge, { category: p.category })
2585
2697
  ] }),
2586
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "xps-mk-row-summary", children: p.summary })
2698
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "xps-mk-row-summary", children: p.summary })
2587
2699
  ] }),
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: [
2700
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "xps-mk-row-meta", children: [
2701
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "xps-mk-row-version", children: [
2590
2702
  "v",
2591
2703
  p.version
2592
2704
  ] }),
2593
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { title: `\u4E0B\u8F7D\u91CF ${p.downloads}`, children: [
2705
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { title: `\u4E0B\u8F7D\u91CF ${p.downloads}`, children: [
2594
2706
  "\u2B07 ",
2595
2707
  formatDownloads(p.downloads)
2596
2708
  ] }),
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: [
2709
+ 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
2710
  "\u26A0 \u9700 dsh ",
2599
2711
  p.compatRange
2600
2712
  ] }),
2601
- installed !== void 0 && (installed.updateAvailable ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Badge, { tone: "warning", children: [
2713
+ installed !== void 0 && (installed.updateAvailable ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Badge, { tone: "warning", children: [
2602
2714
  "\u2191 \u53EF\u66F4\u65B0 v",
2603
2715
  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)(
2716
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Badge, { tone: "success", children: "\u2713 \u5DF2\u5B89\u88C5" })),
2717
+ !upToDate && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2606
2718
  InstallButton,
2607
2719
  {
2608
2720
  pluginName: p.name,
@@ -2621,7 +2733,7 @@ function PluginRow(props) {
2621
2733
  }
2622
2734
 
2623
2735
  // src/client/pages/MarketPage.tsx
2624
- var import_jsx_runtime16 = require("react/jsx-runtime");
2736
+ var import_jsx_runtime17 = require("react/jsx-runtime");
2625
2737
  var PAGE_SIZE = 10;
2626
2738
  var MAX_FULL_PAGES = 7;
2627
2739
  function pageSequence(current, totalPages) {
@@ -2669,7 +2781,7 @@ function withPage(prev, page, totalPages) {
2669
2781
  return next === prev.page ? prev : { ...prev, page: next };
2670
2782
  }
2671
2783
  function MarketPager(props) {
2672
- const navButton = (label, target, disabled) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2784
+ const navButton = (label, target, disabled) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2673
2785
  "button",
2674
2786
  {
2675
2787
  type: "button",
@@ -2681,10 +2793,10 @@ function MarketPager(props) {
2681
2793
  children: label
2682
2794
  }
2683
2795
  );
2684
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("nav", { className: "xps-mk-pager", "aria-label": "\u5206\u9875", children: [
2796
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("nav", { className: "xps-mk-pager", "aria-label": "\u5206\u9875", children: [
2685
2797
  navButton("\u4E0A\u4E00\u9875", props.page - 1, props.page <= 1),
2686
2798
  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)(
2799
+ (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
2800
  "button",
2689
2801
  {
2690
2802
  type: "button",
@@ -2797,18 +2909,18 @@ function MarketPage(props) {
2797
2909
  const applySort = (next) => setQuery((prev) => withFilter(prev, { sort: next }));
2798
2910
  const goToPage = (page) => setQuery((prev) => withPage(prev, page, totalPages));
2799
2911
  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" })
2912
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "xps-mk-market", ref: rootRef, children: [
2913
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ToastHost, { items: toasts.items, onDismiss: toasts.dismiss }),
2914
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "xps-mk-head", children: [
2915
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "xps-mk-head-main", children: [
2916
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h1", { className: "xps-page-title", children: "\u85AA\u4EBA\u85AA\u4E8B\u5E02\u573A" }),
2917
+ /* @__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
2918
  ] }),
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, {}) })
2919
+ /* @__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
2920
  ] }),
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)(
2921
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "xps-mk-toolbar", children: [
2922
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Input, { value: keyword, onChange: setKeyword, placeholder: "\u641C\u7D22\u63D2\u4EF6(\u540D\u79F0 / \u5173\u952E\u8BCD)\u2026" }),
2923
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
2812
2924
  "select",
2813
2925
  {
2814
2926
  className: "xps-mk-select",
@@ -2816,33 +2928,33 @@ function MarketPage(props) {
2816
2928
  title: "\u6392\u5E8F\u65B9\u5F0F",
2817
2929
  onChange: (e) => applySort(e.target.value),
2818
2930
  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" })
2931
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "downloads", children: "\u6309\u4E0B\u8F7D\u91CF" }),
2932
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "updatedAt", children: "\u6309\u66F4\u65B0\u65F6\u95F4" })
2821
2933
  ]
2822
2934
  }
2823
2935
  )
2824
2936
  ] }),
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: [
2937
+ 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: [
2938
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { type: "button", className: chipCls(""), onClick: () => applyCategory(""), children: "\u5168\u90E8" }),
2939
+ categories.map((c) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { type: "button", className: chipCls(c.id), onClick: () => applyCategory(c.id), children: [
2828
2940
  c.name,
2829
2941
  " ",
2830
2942
  c.count
2831
2943
  ] }, c.id))
2832
2944
  ] }) }),
2833
- status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Skeleton, { lines: 4, height: 56 }),
2834
- status === "error" && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2945
+ status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Skeleton, { lines: 4, height: 56 }),
2946
+ status === "error" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2835
2947
  EmptyState,
2836
2948
  {
2837
2949
  icon: "\u{1F6DC}",
2838
2950
  title: "\u670D\u52A1\u4E0D\u53EF\u8FBE",
2839
2951
  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" })
2952
+ action: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Button, { onClick: () => setReloadFlag((n) => n + 1), children: "\u91CD\u8BD5" })
2841
2953
  }
2842
2954
  ),
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)(
2955
+ 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" }),
2956
+ status === "ready" && items.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
2957
+ /* @__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
2958
  PluginRow,
2847
2959
  {
2848
2960
  plugin: p,
@@ -2854,7 +2966,7 @@ function MarketPage(props) {
2854
2966
  },
2855
2967
  p.id
2856
2968
  )) }),
2857
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "xps-mk-hint", children: [
2969
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "xps-mk-hint", children: [
2858
2970
  "\u5171 ",
2859
2971
  total,
2860
2972
  " \u4E2A\u63D2\u4EF6 \xB7 \u7B2C ",
@@ -2864,7 +2976,7 @@ function MarketPage(props) {
2864
2976
  " \u9875",
2865
2977
  refreshing ? " \xB7 \u52A0\u8F7D\u4E2D\u2026" : ""
2866
2978
  ] }),
2867
- totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(MarketPager, { page: query.page, totalPages, onGo: goToPage })
2979
+ totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(MarketPager, { page: query.page, totalPages, onGo: goToPage })
2868
2980
  ] })
2869
2981
  ] });
2870
2982
  }
@@ -2873,9 +2985,9 @@ function MarketPage(props) {
2873
2985
  var import_react8 = require("react");
2874
2986
 
2875
2987
  // src/client/pages/market/Markdown.tsx
2876
- var import_jsx_runtime17 = require("react/jsx-runtime");
2988
+ var import_jsx_runtime18 = require("react/jsx-runtime");
2877
2989
  function Markdown(props) {
2878
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "xps-md", children: renderBlocks(props.text) });
2990
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "xps-md", children: renderBlocks(props.text) });
2879
2991
  }
2880
2992
  var CODE_FENCE = /^\s*```/;
2881
2993
  var HEADING = /^(#{1,4})\s+(.*)$/;
@@ -2905,7 +3017,7 @@ function renderBlocks(text, depth = 0) {
2905
3017
  }
2906
3018
  i += 1;
2907
3019
  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)
3020
+ /* @__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
3021
  );
2910
3022
  key += 1;
2911
3023
  continue;
@@ -2916,15 +3028,15 @@ function renderBlocks(text, depth = 0) {
2916
3028
  const content = renderInline(heading[2] ?? "", `h${key}`);
2917
3029
  if (level <= 1) {
2918
3030
  blocks.push(
2919
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h2", { className: "xps-md-h2", children: content }, key)
3031
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h2", { className: "xps-md-h2", children: content }, key)
2920
3032
  );
2921
3033
  } else if (level === 2) {
2922
3034
  blocks.push(
2923
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h3", { className: "xps-md-h3", children: content }, key)
3035
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h3", { className: "xps-md-h3", children: content }, key)
2924
3036
  );
2925
3037
  } else {
2926
3038
  blocks.push(
2927
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h4", { className: "xps-md-h4", children: content }, key)
3039
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h4", { className: "xps-md-h4", children: content }, key)
2928
3040
  );
2929
3041
  }
2930
3042
  key += 1;
@@ -2932,7 +3044,7 @@ function renderBlocks(text, depth = 0) {
2932
3044
  continue;
2933
3045
  }
2934
3046
  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));
3047
+ blocks.push(/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("hr", { className: "xps-md-hr" }, key));
2936
3048
  key += 1;
2937
3049
  i += 1;
2938
3050
  continue;
@@ -2941,11 +3053,11 @@ function renderBlocks(text, depth = 0) {
2941
3053
  const items = [];
2942
3054
  while (i < lines.length && LIST_ITEM.test(lines[i] ?? "")) {
2943
3055
  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));
3056
+ items.push(/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("li", { children: renderInline(itemText, `li${key}-${items.length}`) }, items.length));
2945
3057
  i += 1;
2946
3058
  }
2947
3059
  blocks.push(
2948
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("ul", { className: "xps-md-ul", children: items }, key)
3060
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("ul", { className: "xps-md-ul", children: items }, key)
2949
3061
  );
2950
3062
  key += 1;
2951
3063
  continue;
@@ -2954,11 +3066,11 @@ function renderBlocks(text, depth = 0) {
2954
3066
  const items = [];
2955
3067
  while (i < lines.length && ORDERED_ITEM.test(lines[i] ?? "")) {
2956
3068
  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));
3069
+ items.push(/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("li", { children: renderInline(itemText, `ol${key}-${items.length}`) }, items.length));
2958
3070
  i += 1;
2959
3071
  }
2960
3072
  blocks.push(
2961
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("ol", { className: "xps-md-ol", children: items }, key)
3073
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("ol", { className: "xps-md-ol", children: items }, key)
2962
3074
  );
2963
3075
  key += 1;
2964
3076
  continue;
@@ -2970,7 +3082,7 @@ function renderBlocks(text, depth = 0) {
2970
3082
  i += 1;
2971
3083
  }
2972
3084
  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)
3085
+ /* @__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
3086
  );
2975
3087
  key += 1;
2976
3088
  continue;
@@ -2984,12 +3096,12 @@ function renderBlocks(text, depth = 0) {
2984
3096
  rows.push(splitRow(lines[i] ?? ""));
2985
3097
  i += 1;
2986
3098
  }
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));
3099
+ const th = (text2, idx) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("th", { style: { textAlign: aligns[idx] }, children: renderInline(text2, `th${key}-${idx}`) }, idx);
3100
+ 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
3101
  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)) })
3102
+ /* @__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: [
3103
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("tr", { children: header.map(th) }) }),
3104
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("tbody", { children: rows.map((row, rIdx) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("tr", { children: td(row) }, rIdx)) })
2993
3105
  ] }) }, key)
2994
3106
  );
2995
3107
  key += 1;
@@ -3004,7 +3116,7 @@ function renderBlocks(text, depth = 0) {
3004
3116
  i += 1;
3005
3117
  }
3006
3118
  blocks.push(
3007
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "xps-md-p", children: renderInline(buf.join(" "), `p${key}`) }, key)
3119
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "xps-md-p", children: renderInline(buf.join(" "), `p${key}`) }, key)
3008
3120
  );
3009
3121
  key += 1;
3010
3122
  }
@@ -3021,15 +3133,15 @@ function renderInline(text, keyPrefix) {
3021
3133
  const token = m[0];
3022
3134
  if (token.startsWith("**")) {
3023
3135
  nodes.push(
3024
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("strong", { children: renderInline(token.slice(2, -2), `${keyPrefix}-b${seq}`) }, `${keyPrefix}-b${seq}`)
3136
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("strong", { children: renderInline(token.slice(2, -2), `${keyPrefix}-b${seq}`) }, `${keyPrefix}-b${seq}`)
3025
3137
  );
3026
3138
  } else if (token.startsWith("~~")) {
3027
3139
  nodes.push(
3028
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("del", { children: renderInline(token.slice(2, -2), `${keyPrefix}-d${seq}`) }, `${keyPrefix}-d${seq}`)
3140
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("del", { children: renderInline(token.slice(2, -2), `${keyPrefix}-d${seq}`) }, `${keyPrefix}-d${seq}`)
3029
3141
  );
3030
3142
  } else if (token.startsWith("`")) {
3031
3143
  nodes.push(
3032
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("code", { className: "xps-md-inline-code", children: token.slice(1, -1) }, `${keyPrefix}-c${seq}`)
3144
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("code", { className: "xps-md-inline-code", children: token.slice(1, -1) }, `${keyPrefix}-c${seq}`)
3033
3145
  );
3034
3146
  } else {
3035
3147
  const link = /^\[([^\]]*)\]\((.+)\)$/.exec(token);
@@ -3042,7 +3154,7 @@ function renderInline(text, keyPrefix) {
3042
3154
  const url = rawUrl.trim();
3043
3155
  if (/^https?:\/\//.test(url)) {
3044
3156
  nodes.push(
3045
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
3157
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3046
3158
  "span",
3047
3159
  {
3048
3160
  className: "xps-md-link",
@@ -3090,7 +3202,7 @@ function cellAlign(cell) {
3090
3202
  }
3091
3203
 
3092
3204
  // src/client/pages/PluginDetailPage.tsx
3093
- var import_jsx_runtime18 = require("react/jsx-runtime");
3205
+ var import_jsx_runtime19 = require("react/jsx-runtime");
3094
3206
  function PluginDetailPage(props) {
3095
3207
  ensureMarketStyles();
3096
3208
  const pluginId = props.pluginId ?? "";
@@ -3131,37 +3243,37 @@ function PluginDetailPage(props) {
3131
3243
  alive = false;
3132
3244
  };
3133
3245
  }, [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" }) });
3246
+ 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
3247
  if (status === "loading") {
3136
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "xps-mk-detail", children: [
3248
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "xps-mk-detail", children: [
3137
3249
  backButton,
3138
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Skeleton, { lines: 5, height: 56 })
3250
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Skeleton, { lines: 5, height: 56 })
3139
3251
  ] });
3140
3252
  }
3141
3253
  if (status === "missing") {
3142
- 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: [
3143
3255
  backButton,
3144
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3256
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3145
3257
  EmptyState,
3146
3258
  {
3147
3259
  icon: "\u{1F9E9}",
3148
3260
  title: "\u63D2\u4EF6\u4E0D\u5B58\u5728\u6216\u5DF2\u4E0B\u67B6",
3149
3261
  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" })
3262
+ action: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Button, { onClick: () => props.onBack?.(), children: "\u8FD4\u56DE\u5E02\u573A" })
3151
3263
  }
3152
3264
  )
3153
3265
  ] });
3154
3266
  }
3155
3267
  if (status === "error" || detail === null) {
3156
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "xps-mk-detail", children: [
3268
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "xps-mk-detail", children: [
3157
3269
  backButton,
3158
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3270
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3159
3271
  EmptyState,
3160
3272
  {
3161
3273
  icon: "\u{1F6DC}",
3162
3274
  title: "\u670D\u52A1\u4E0D\u53EF\u8FBE",
3163
3275
  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" })
3276
+ action: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Button, { onClick: () => setReloadFlag((n) => n + 1), children: "\u91CD\u8BD5" })
3165
3277
  }
3166
3278
  )
3167
3279
  ] });
@@ -3172,36 +3284,36 @@ function PluginDetailPage(props) {
3172
3284
  const displayUpdatedAt = versionInfo?.publishedAt ?? detail.updatedAt;
3173
3285
  const compat = checkCompat(displayCompatRange, dshVersion);
3174
3286
  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 }),
3287
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "xps-mk-detail", children: [
3288
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ToastHost, { items: toasts.items, onDismiss: toasts.dismiss }),
3177
3289
  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: [
3290
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "xps-mk-detail-header", children: [
3291
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(PluginIcon, { name: title, iconUrl: detail.iconUrl, size: 48 }),
3292
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "xps-mk-detail-title", children: [
3293
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "xps-mk-detail-name", children: [
3182
3294
  title,
3183
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Badge, { tone: "info", children: [
3295
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Badge, { tone: "info", children: [
3184
3296
  "v",
3185
3297
  displayVersion
3186
3298
  ] })
3187
3299
  ] }),
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: [
3300
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "xps-mk-detail-sub", children: [
3301
+ title !== detail.name && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "xps-mono", children: detail.name }),
3302
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { children: [
3191
3303
  "\u4F5C\u8005 ",
3192
3304
  detail.author
3193
3305
  ] }),
3194
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { children: [
3306
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { children: [
3195
3307
  "\u6765\u6E90 ",
3196
3308
  detail.sourceType === "npm" ? "\u516C\u5F00\u53D1\u5E03" : "\u79C1\u6709\u53D1\u5E03"
3197
3309
  ] }),
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: [
3310
+ 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
3311
  "\u26A0 \u9700 dsh ",
3200
3312
  displayCompatRange
3201
3313
  ] })
3202
3314
  ] })
3203
3315
  ] }),
3204
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3316
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3205
3317
  InstallButton,
3206
3318
  {
3207
3319
  pluginName: detail.name,
@@ -3213,31 +3325,31 @@ function PluginDetailPage(props) {
3213
3325
  }
3214
3326
  )
3215
3327
  ] }),
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 })
3328
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "xps-mk-detail-body", children: [
3329
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "xps-mk-readme", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Markdown, { text: detail.description }) }),
3330
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("aside", { className: "xps-mk-sidebar", children: [
3331
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "xps-mk-card", children: [
3332
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "xps-mk-card-title", children: "\u4FE1\u606F" }),
3333
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "xps-mk-info-row", children: [
3334
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "xps-mk-info-label", children: "\u5206\u7C7B" }),
3335
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "xps-mk-info-value", children: detail.category === "" ? "\u2014" : detail.category })
3224
3336
  ] }),
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) })
3337
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "xps-mk-info-row", children: [
3338
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "xps-mk-info-label", children: "\u4E0B\u8F7D\u91CF" }),
3339
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "xps-mk-info-value", children: formatDownloads(detail.downloads) })
3228
3340
  ] }),
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) })
3341
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "xps-mk-info-row", children: [
3342
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "xps-mk-info-label", children: "\u66F4\u65B0\u65F6\u95F4" }),
3343
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "xps-mk-info-value", title: formatDate(displayUpdatedAt), children: formatRelative(displayUpdatedAt) })
3232
3344
  ] }),
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}` })
3345
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "xps-mk-info-row", children: [
3346
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "xps-mk-info-label", children: "\u517C\u5BB9\u8303\u56F4" }),
3347
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "xps-mk-info-value", children: displayCompatRange === "" ? "\u4E0D\u9650" : `dsh ${displayCompatRange}` })
3236
3348
  ] })
3237
3349
  ] }),
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)(
3350
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "xps-mk-card", children: [
3351
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "xps-mk-card-title", children: "\u7248\u672C\u5386\u53F2" }),
3352
+ detail.versions.map((v) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
3241
3353
  "button",
3242
3354
  {
3243
3355
  type: "button",
@@ -3245,12 +3357,12 @@ function PluginDetailPage(props) {
3245
3357
  title: `\u5207\u6362\u5230 v${v.version}`,
3246
3358
  onClick: () => setSelectedVersion(v.version),
3247
3359
  children: [
3248
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { children: [
3360
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { children: [
3249
3361
  "v",
3250
3362
  v.version,
3251
3363
  v.version === detail.version ? " \xB7 \u6700\u65B0" : ""
3252
3364
  ] }),
3253
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "xps-mk-version-date", children: formatDate(v.publishedAt) })
3365
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "xps-mk-version-date", children: formatDate(v.publishedAt) })
3254
3366
  ]
3255
3367
  },
3256
3368
  v.version
@@ -3279,19 +3391,19 @@ function ensureThemeStyles() {
3279
3391
  }
3280
3392
 
3281
3393
  // src/client/MarketplaceApp.tsx
3282
- var import_jsx_runtime19 = require("react/jsx-runtime");
3394
+ var import_jsx_runtime20 = require("react/jsx-runtime");
3283
3395
  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" })
3396
+ market: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
3397
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("circle", { cx: "11", cy: "11", r: "7" }),
3398
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { d: "M21 21l-4.3-4.3" })
3287
3399
  ] }),
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" })
3400
+ installed: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
3401
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { d: "M21 8l-9-5-9 5v8l9 5 9-5V8z" }),
3402
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { d: "M3 8l9 5 9-5" })
3291
3403
  ] }),
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" })
3404
+ developer: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
3405
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("circle", { cx: "12", cy: "8", r: "4" }),
3406
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { d: "M4 21c0-4 4-6 8-6s8 2 8 6" })
3295
3407
  ] })
3296
3408
  };
3297
3409
  var NAV_ITEMS = [
@@ -3303,8 +3415,8 @@ function MarketplaceApp() {
3303
3415
  const [nav, setNav] = (0, import_react9.useState)("market");
3304
3416
  const [detailId, setDetailId] = (0, import_react9.useState)(null);
3305
3417
  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)(
3418
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "xps-app", children: [
3419
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("nav", { className: "xps-nav", children: NAV_ITEMS.map((item) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
3308
3420
  "button",
3309
3421
  {
3310
3422
  type: "button",
@@ -3314,23 +3426,23 @@ function MarketplaceApp() {
3314
3426
  setDetailId(null);
3315
3427
  },
3316
3428
  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 })
3429
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "xps-nav-icon", children: NAV_ICONS[item.key] }),
3430
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "xps-nav-label", children: item.label })
3319
3431
  ]
3320
3432
  },
3321
3433
  item.key
3322
3434
  )) }),
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, {})
3435
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("main", { className: "xps-content", children: [
3436
+ 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) })),
3437
+ nav === "installed" && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(InstalledPage, {}),
3438
+ nav === "developer" && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DeveloperPage, {})
3327
3439
  ] })
3328
3440
  ] });
3329
3441
  }
3330
3442
 
3331
3443
  // src/client/settings/GeneralTokenRow.tsx
3332
3444
  var import_react10 = require("react");
3333
- var import_jsx_runtime20 = require("react/jsx-runtime");
3445
+ var import_jsx_runtime21 = require("react/jsx-runtime");
3334
3446
  var rowStyle = {
3335
3447
  display: "flex",
3336
3448
  justifyContent: "space-between",
@@ -3428,14 +3540,14 @@ function GeneralTokenRow() {
3428
3540
  setError("");
3429
3541
  }).catch((err) => setError(messageOf2(err, "\u9000\u51FA\u767B\u5F55\u5931\u8D25"))).finally(() => setPending(false));
3430
3542
  };
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" })
3543
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: rowStyle, children: [
3544
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: leftStyle, children: [
3545
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { style: titleStyle, children: "\u85AA\u4EBA\u85AA\u4E8B\u5E02\u573A" }),
3546
+ /* @__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
3547
  ] }),
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)(
3548
+ 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: [
3549
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
3550
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { style: { width: 220 }, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3439
3551
  Input,
3440
3552
  {
3441
3553
  value: token,
@@ -3448,18 +3560,18 @@ function GeneralTokenRow() {
3448
3560
  disabled: pending
3449
3561
  }
3450
3562
  ) }),
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" })
3563
+ /* @__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
3564
  ] }),
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: [
3565
+ 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" })
3566
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: { ...rightStyle, flexDirection: "row", alignItems: "center", gap: 12 }, children: [
3567
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: { textAlign: "right" }, children: [
3568
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: valueStyle, children: [
3457
3569
  "\u5DF2\u767B\u5F55:",
3458
3570
  auth.developer.name
3459
3571
  ] }),
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)}` })
3572
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { style: descStyle, children: auth.expiresAt === "" ? "token \u957F\u671F\u6709\u6548" : `\u6709\u6548\u671F\u81F3 ${formatDateTime2(auth.expiresAt)}` })
3461
3573
  ] }),
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" })
3574
+ /* @__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" })
3463
3575
  ] })
3464
3576
  ] });
3465
3577
  }