dsh-plugin-core-demo 0.42.2 → 0.42.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/client.js +25 -11
  2. package/package.json +1 -1
package/dist/client.js CHANGED
@@ -6576,7 +6576,17 @@ var HOST_ALERT_FIELDS = ["title", "message", "confirmText", "skin"];
6576
6576
  function hostIgnoredFields(opts, allowed) {
6577
6577
  const ignored = [];
6578
6578
  for (const [key, value] of Object.entries(opts)) {
6579
- if (value !== void 0 && !allowed.includes(key))
6579
+ if (value === void 0)
6580
+ continue;
6581
+ if (Array.isArray(value) && value.length === 0)
6582
+ continue;
6583
+ if (value === "")
6584
+ continue;
6585
+ if (key === "lockExceptions" && value === false)
6586
+ continue;
6587
+ if (key === "closeOnMask" && value === true)
6588
+ continue;
6589
+ if (!allowed.includes(key))
6580
6590
  ignored.push(key);
6581
6591
  }
6582
6592
  return ignored;
@@ -6588,7 +6598,8 @@ function confirmModal(opts) {
6588
6598
  ignored.push("tone");
6589
6599
  if (ignored.length > 0) {
6590
6600
  console.warn(`[dsh-plugin-core] confirmModal skin:"host" \u4E0D\u652F\u6301 ${ignored.join(" / ")}\uFF0C\u5DF2\u56DE\u843D\u5230 core \u76AE\u80A4\uFF1B\u8981\u4FDD\u4F4F host \u76AE\u80A4\u8BF7\u53BB\u6389\u8FD9\u4E9B\u5B57\u6BB5\uFF0C\u6216\u76F4\u63A5\u7701\u6389 skin:"host" \u7528 core`);
6591
- } else if (hostHandlers !== null) {
6601
+ }
6602
+ if (ignored.length === 0 && hostHandlers !== null) {
6592
6603
  return hostHandlers.confirm({
6593
6604
  title: opts.title == null ? void 0 : String(opts.title),
6594
6605
  description: opts.message == null ? void 0 : String(opts.message),
@@ -6596,7 +6607,8 @@ function confirmModal(opts) {
6596
6607
  cancelText: opts.cancelText,
6597
6608
  danger: opts.tone === "danger"
6598
6609
  });
6599
- } else {
6610
+ }
6611
+ if (hostHandlers === null) {
6600
6612
  console.warn('[dsh-plugin-core] confirmModal skin:"host" \u9700\u5148\u5F15\u5165\u5B98\u65B9\u9002\u914D\u5C42 official.js\uFF0C\u5DF2\u56DE\u843D\u5230 core \u76AE\u80A4');
6601
6613
  }
6602
6614
  }
@@ -6647,13 +6659,15 @@ function alertModal(opts) {
6647
6659
  const ignored = hostIgnoredFields(opts, HOST_ALERT_FIELDS);
6648
6660
  if (ignored.length > 0) {
6649
6661
  console.warn(`[dsh-plugin-core] alertModal skin:"host" \u4E0D\u652F\u6301 ${ignored.join(" / ")}\uFF0C\u5DF2\u56DE\u843D\u5230 core \u76AE\u80A4\uFF1B\u8981\u4FDD\u4F4F host \u76AE\u80A4\u8BF7\u53BB\u6389\u8FD9\u4E9B\u5B57\u6BB5\uFF0C\u6216\u76F4\u63A5\u7701\u6389 skin:"host" \u7528 core`);
6650
- } else if (hostHandlers !== null) {
6662
+ }
6663
+ if (ignored.length === 0 && hostHandlers !== null) {
6651
6664
  return hostHandlers.alert({
6652
6665
  title: opts.title == null ? void 0 : String(opts.title),
6653
6666
  description: opts.message == null ? void 0 : String(opts.message),
6654
6667
  confirmText: opts.confirmText
6655
6668
  });
6656
- } else {
6669
+ }
6670
+ if (hostHandlers === null) {
6657
6671
  console.warn('[dsh-plugin-core] alertModal skin:"host" \u9700\u5148\u5F15\u5165\u5B98\u65B9\u9002\u914D\u5C42 official.js\uFF0C\u5DF2\u56DE\u843D\u5230 core \u76AE\u80A4');
6658
6672
  }
6659
6673
  }
@@ -77256,9 +77270,9 @@ function ReferencePage() {
77256
77270
  "tbody",
77257
77271
  null,
77258
77272
  [
77259
- [t3("buildCore"), `v${"0.42.2"}`],
77260
- [t3("buildDemo"), `v${"0.42.2"}`],
77261
- [t3("buildStamp"), "261117-071856-088"]
77273
+ [t3("buildCore"), `v${"0.42.4"}`],
77274
+ [t3("buildDemo"), `v${"0.42.4"}`],
77275
+ [t3("buildStamp"), "261117-075735-503"]
77262
77276
  ].map(
77263
77277
  ([label, value]) => (0, import_react110.createElement)(
77264
77278
  "tr",
@@ -77577,9 +77591,9 @@ function DemoPage() {
77577
77591
  lineHeight: "14px"
77578
77592
  }
77579
77593
  },
77580
- (0, import_react112.createElement)("span", null, `core v${"0.42.2"}`),
77581
- (0, import_react112.createElement)("span", null, `demo v${"0.42.2"}`),
77582
- (0, import_react112.createElement)("span", { style: { marginTop: "4px", fontSize: "9px" } }, "261117-071856-088")
77594
+ (0, import_react112.createElement)("span", null, `core v${"0.42.4"}`),
77595
+ (0, import_react112.createElement)("span", null, `demo v${"0.42.4"}`),
77596
+ (0, import_react112.createElement)("span", { style: { marginTop: "4px", fontSize: "9px" } }, "261117-075735-503")
77583
77597
  )
77584
77598
  )
77585
77599
  ),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-plugin-core-demo",
3
- "version": "0.42.2",
3
+ "version": "0.42.4",
4
4
  "description": "The shared UI foundation for DSH plugins, with a live component preview: design tokens, common controls, workspace browsing and notifications maintained in one place — install it to preview every component in a real host.",
5
5
  "icon": "./assets/icon-components.svg",
6
6
  "keywords": [