dsh-motion-ui 0.8.6 → 0.8.7
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/CHANGELOG.md +14 -0
- package/client.js +79 -24
- package/lib/assets/standalone-runtime.js +34 -24
- package/lib/assets/visual.js +41 -31
- package/lib/build-info.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# DSH Motion UI
|
|
2
2
|
|
|
3
|
+
## 0.8.7 — 2026-10-18
|
|
4
|
+
|
|
5
|
+
### 补齐原生组件的皮肤兼容
|
|
6
|
+
|
|
7
|
+
- 修复步骤卡片和提示块遗漏圆角防护的问题(Issue #4):明亮扁平的步骤卡片恢复 18px,提示块保留左侧直角、右侧圆角。
|
|
8
|
+
- 扩展防护至步骤编号、按钮、徽标、标签、进度、分段选择、步进控件、操作菜单与开关滑块等原生元素,避免相同皮肤补丁继续清除局部形状。
|
|
9
|
+
- 为文本/代码复制块的独立样式记录原始圆角,保留各风格和自由模式下的桌面/窄屏设计。
|
|
10
|
+
- 保留非对称圆角、有意使用的直角、设置预览及模型画布内部样式。
|
|
11
|
+
|
|
12
|
+
### 验证
|
|
13
|
+
|
|
14
|
+
- 扩展原有 2,304 个组合检查,逐个核对步骤、提示块及更多原生元素的四角几何,并检查开关伪元素。
|
|
15
|
+
- 执行完整回归及正式包安装验证。
|
|
16
|
+
|
|
3
17
|
## 0.8.6 — 2026-10-18
|
|
4
18
|
|
|
5
19
|
### 内部组件与皮肤兼容
|
package/client.js
CHANGED
|
@@ -4260,7 +4260,7 @@ function Sandbox({ node, document: doc, state: state2, data, derived, disabled,
|
|
|
4260
4260
|
}
|
|
4261
4261
|
|
|
4262
4262
|
// lib/build-info.js
|
|
4263
|
-
var BUILD_INFO = Object.freeze({ "version": "0.8.
|
|
4263
|
+
var BUILD_INFO = Object.freeze({ "version": "0.8.7", "id": "0.8.7+b49a94e536b0", "sourceHash": "b49a94e536b010c02561479d3e8daffea6997fe97b0c711057cdffa554998761" });
|
|
4264
4264
|
|
|
4265
4265
|
// lib/refinement.js
|
|
4266
4266
|
var AUDIT_MESSAGES = Object.freeze({ overflow: "\u5185\u5BB9\u8D85\u51FA\u89C6\u53E3\u5BBD\u5EA6", smallText: "\u6587\u5B57\u5B9E\u9645\u663E\u793A\u5C3A\u5BF8\u5C0F\u4E8E 12px", contrast: "\u6587\u5B57\u4E0E\u80CC\u666F\u5BF9\u6BD4\u5EA6\u504F\u4F4E", missingLabel: "\u4EA4\u4E92\u63A7\u4EF6\u7F3A\u5C11\u53EF\u8BBF\u95EE\u540D\u79F0", runtimeError: "\u753B\u5E03\u62A5\u544A\u8FD0\u884C\u5F02\u5E38", clippedText: "\u6587\u5B57\u53EF\u80FD\u88AB\u9690\u85CF\u6216\u88C1\u5207", cardTextOverflow: "\u6587\u5B57\u8D85\u51FA\u5361\u7247\u5185\u5BB9\u8FB9\u754C\uFF1B\u8BF7\u4FDD\u7559\u9634\u5F71\u5E76\u8C03\u6574\u5BB9\u5668\u5C3A\u5BF8\u3001\u5185\u8FB9\u8DDD\u6216\u6587\u5B57\u6392\u7248", bottomWhitespace: "\u5185\u5BB9\u4E0B\u65B9\u5B58\u5728\u660E\u663E\u7A7A\u767D" });
|
|
@@ -5177,8 +5177,8 @@ function StreamSurface({ stream, sessionId, committedIds = [] }) {
|
|
|
5177
5177
|
clearTimeout(entry.timer);
|
|
5178
5178
|
entry.timer = null;
|
|
5179
5179
|
entry.finishing = () => {
|
|
5180
|
-
const
|
|
5181
|
-
if (!committedIds.length ||
|
|
5180
|
+
const surfaces2 = [...scroll.querySelectorAll("[data-dsh-generative-ui]")].filter((el) => committedIds.includes(el.dataset.dshGenerativeUi) && !el.hasAttribute("data-preview"));
|
|
5181
|
+
if (!committedIds.length || surfaces2.length === committedIds.length && surfaces2.every((el) => !el.querySelector("[data-canvas-phase=loading]"))) dispose(entry);
|
|
5182
5182
|
};
|
|
5183
5183
|
entry.finishing();
|
|
5184
5184
|
}
|
|
@@ -5392,6 +5392,80 @@ function resolveSourceFence(raw, { svg = false } = {}) {
|
|
|
5392
5392
|
|
|
5393
5393
|
// src/copy-block.js
|
|
5394
5394
|
var import_react16 = __toESM(require("react"), 1);
|
|
5395
|
+
|
|
5396
|
+
// src/host-boundary.js
|
|
5397
|
+
var surfaces = [
|
|
5398
|
+
".dgui-card",
|
|
5399
|
+
".dgui-metric",
|
|
5400
|
+
".dgui-control",
|
|
5401
|
+
".dgui-chart",
|
|
5402
|
+
".dgui-table-wrap",
|
|
5403
|
+
".dgui-steps li",
|
|
5404
|
+
".dgui-step-dot",
|
|
5405
|
+
".dgui-copy",
|
|
5406
|
+
".dgui-header",
|
|
5407
|
+
".dgui-heading-icon",
|
|
5408
|
+
".dgui-badge",
|
|
5409
|
+
".dgui-tag",
|
|
5410
|
+
".dgui-details",
|
|
5411
|
+
".dgui-progress",
|
|
5412
|
+
".dgui-progress progress",
|
|
5413
|
+
".dgui-button",
|
|
5414
|
+
".dgui-secondary",
|
|
5415
|
+
".dgui-toggle",
|
|
5416
|
+
".dgui-control output",
|
|
5417
|
+
".dgui-control input:not([type=range]):not([type=checkbox])",
|
|
5418
|
+
".dgui-control select",
|
|
5419
|
+
".dgui-root textarea",
|
|
5420
|
+
".dgui-root pre",
|
|
5421
|
+
".dgui-plot",
|
|
5422
|
+
".dgui-menu-trigger",
|
|
5423
|
+
".dgui-menu-content",
|
|
5424
|
+
".dgui-menu-content button",
|
|
5425
|
+
".dgui-canvas-loading",
|
|
5426
|
+
".dgui-canvas-spinner",
|
|
5427
|
+
".dgui-canvas-placeholder",
|
|
5428
|
+
".dgui-canvas-issue",
|
|
5429
|
+
".dgui-canvas-stage iframe",
|
|
5430
|
+
".dgui-version-preview",
|
|
5431
|
+
".dgui-segmented",
|
|
5432
|
+
".dgui-segment-indicator",
|
|
5433
|
+
".dgui-segmented button",
|
|
5434
|
+
".dgui-action-orb",
|
|
5435
|
+
".dgui-elastic",
|
|
5436
|
+
".dgui-stepper",
|
|
5437
|
+
".dgui-stepper>button",
|
|
5438
|
+
".dgui-card>.dgui-section-title",
|
|
5439
|
+
".dgui-row:has(>.dgui-metric)",
|
|
5440
|
+
".motion-copy-block",
|
|
5441
|
+
".motion-copy-button",
|
|
5442
|
+
"[data-motion-component=card]",
|
|
5443
|
+
"[data-motion-component=stat]"
|
|
5444
|
+
];
|
|
5445
|
+
var descendants = surfaces.map((s) => s.replace(/^\.dgui-root /, "")).join(",");
|
|
5446
|
+
function nativeGeometryCss(css) {
|
|
5447
|
+
const defaults = `:where(.dgui-root :is(${descendants})){--du-component-radius:0px}
|
|
5448
|
+
.dgui-toggle::before{--du-component-radius:0px}
|
|
5449
|
+
`;
|
|
5450
|
+
return defaults + recordNativeGeometry(css);
|
|
5451
|
+
}
|
|
5452
|
+
function recordNativeGeometry(css) {
|
|
5453
|
+
return css.replace(/border-radius\s*:\s*([^;}]+)/g, (rule, value) => rule + ";--du-component-radius:" + value.replaceAll("var(--du-radius-inner", "var(--du-owned-radius-inner").replaceAll("var(--du-radius", "var(--du-owned-radius"));
|
|
5454
|
+
}
|
|
5455
|
+
var root = ".dgui-root[data-preset]:not(.dgui-style-preview)";
|
|
5456
|
+
var INTERNAL_BOUNDARY_CSS = `
|
|
5457
|
+
${root} :is(${descendants}){border-radius:var(--du-component-radius,0px)!important;corner-shape:round}
|
|
5458
|
+
${root} .dgui-toggle::before{border-radius:var(--du-component-radius,50%)!important;corner-shape:round}
|
|
5459
|
+
`;
|
|
5460
|
+
var HOST_BOUNDARY_CSS = `
|
|
5461
|
+
${root}{--du-owned-radius:16px;--du-owned-radius-inner:12px;border-radius:var(--du-shell-radius,16px)!important;corner-shape:round}
|
|
5462
|
+
` + Object.entries(STYLE_SYSTEM).map(([id2, { native }]) => `${root}[data-visual-style=${id2}]{--du-shell-radius:${id2 === "editorial" ? 0 : id2 === "soft" ? 30 : native.radius}px;--du-owned-radius:${native.radius}px;--du-owned-radius-inner:${native.radius - 4}px}`).join("\n") + `
|
|
5463
|
+
` + INTERNAL_BOUNDARY_CSS + `
|
|
5464
|
+
${root}:is([data-preset=reading],[data-preset=minimal]){--du-shell-radius:0px}
|
|
5465
|
+
.dgui-marker[data-dgui-marker]{border:0!important;background:transparent!important;box-shadow:none!important;border-radius:0!important;padding:0!important;min-width:0;box-sizing:border-box}
|
|
5466
|
+
`;
|
|
5467
|
+
|
|
5468
|
+
// src/copy-block.js
|
|
5395
5469
|
var h11 = import_react16.default.createElement;
|
|
5396
5470
|
async function copyContent(text3) {
|
|
5397
5471
|
try {
|
|
@@ -5424,7 +5498,7 @@ async function copyContent(text3) {
|
|
|
5424
5498
|
}
|
|
5425
5499
|
}
|
|
5426
5500
|
}
|
|
5427
|
-
var COPY_BLOCK_CSS = `
|
|
5501
|
+
var COPY_BLOCK_CSS = recordNativeGeometry(`
|
|
5428
5502
|
.motion-copy-block{position:relative;min-width:0;border:1px solid var(--du-line,var(--dsw-alias-border-default,#ddd));border-radius:24px;padding:18px 22px;color:var(--du-ink,var(--dsw-alias-label-primary,inherit));background:var(--du-bg,var(--dsw-alias-bg-layer-1,transparent));overflow:hidden;margin:8px 0}
|
|
5429
5503
|
.motion-copy-block[data-code]{background:var(--du-soft,var(--dsw-alias-bg-layer-2,#8881))}
|
|
5430
5504
|
.motion-copy-bar{display:flex;align-items:center;gap:10px;min-height:30px;margin-bottom:12px;color:var(--du-muted,var(--dsw-alias-label-secondary,#888));font-size:14px;line-height:1.4}
|
|
@@ -5434,7 +5508,7 @@ var COPY_BLOCK_CSS = `
|
|
|
5434
5508
|
.motion-copy-button[data-status=done] .dgui-icon{animation:motion-copy-confirm 420ms cubic-bezier(.34,1.45,.64,1)}.motion-copy-button[data-status=done] path{stroke-dasharray:28;animation:motion-check-draw 450ms ease-out}@keyframes motion-check-draw{from{stroke-dashoffset:28}to{stroke-dashoffset:0}}@keyframes motion-copy-confirm{from{opacity:.5;transform:scale(.8)}to{opacity:1;transform:none}}
|
|
5435
5509
|
@media(prefers-reduced-motion:reduce){.motion-copy-button .dgui-icon,.motion-copy-button path{animation:none!important;transition:none!important}}
|
|
5436
5510
|
@media(max-width:600px){.motion-copy-block{padding:14px 16px;border-radius:20px}}
|
|
5437
|
-
|
|
5511
|
+
`);
|
|
5438
5512
|
function CopyBlock({ text: text3, children, title, lang, code = false, wrap = false, disabled = false, style, nodeId, copyLabel, copiedLabel }) {
|
|
5439
5513
|
const [status, setStatus] = (0, import_react16.useState)("idle"), timer = (0, import_react16.useRef)();
|
|
5440
5514
|
(0, import_react16.useEffect)(() => () => clearTimeout(timer.current), []);
|
|
@@ -5874,25 +5948,6 @@ var streamUiDefinition = {
|
|
|
5874
5948
|
}
|
|
5875
5949
|
};
|
|
5876
5950
|
|
|
5877
|
-
// src/host-boundary.js
|
|
5878
|
-
function nativeGeometryCss(css) {
|
|
5879
|
-
const defaults = ":where(.dgui-root .dgui-card,.dgui-root .dgui-metric,.dgui-root .dgui-control,.dgui-root .dgui-chart,.dgui-root .dgui-table-wrap,.dgui-root .dgui-control input,.dgui-root .dgui-control select,.dgui-root .dgui-canvas-stage iframe){--du-component-radius:0px}\n";
|
|
5880
|
-
return defaults + css.replace(/border-radius\s*:\s*([^;}]+)/g, (rule, value) => rule + ";--du-component-radius:" + value.replaceAll("var(--du-radius-inner", "var(--du-owned-radius-inner").replaceAll("var(--du-radius", "var(--du-owned-radius"));
|
|
5881
|
-
}
|
|
5882
|
-
var root = ".dgui-root[data-preset]:not(.dgui-style-preview)";
|
|
5883
|
-
var INTERNAL_BOUNDARY_CSS = `
|
|
5884
|
-
${root} :is(.dgui-card,.dgui-metric,.dgui-control,.dgui-chart,.dgui-table-wrap){border-radius:var(--du-component-radius,16px)!important;corner-shape:round}
|
|
5885
|
-
${root} .dgui-control :is(input:not([type=range]):not([type=checkbox]),select){border-radius:var(--du-component-radius,12px)!important;corner-shape:round}
|
|
5886
|
-
${root} .dgui-canvas-stage iframe{border-radius:var(--du-component-radius,16px)!important;corner-shape:round}
|
|
5887
|
-
`;
|
|
5888
|
-
var HOST_BOUNDARY_CSS = `
|
|
5889
|
-
${root}{--du-owned-radius:16px;--du-owned-radius-inner:12px;border-radius:var(--du-shell-radius,16px)!important;corner-shape:round}
|
|
5890
|
-
` + Object.entries(STYLE_SYSTEM).map(([id2, { native }]) => `${root}[data-visual-style=${id2}]{--du-shell-radius:${id2 === "editorial" ? 0 : id2 === "soft" ? 30 : native.radius}px;--du-owned-radius:${native.radius}px;--du-owned-radius-inner:${native.radius - 4}px}`).join("\n") + `
|
|
5891
|
-
` + INTERNAL_BOUNDARY_CSS + `
|
|
5892
|
-
${root}:is([data-preset=reading],[data-preset=minimal]){--du-shell-radius:0px}
|
|
5893
|
-
.dgui-marker[data-dgui-marker]{border:0!important;background:transparent!important;box-shadow:none!important;border-radius:0!important;padding:0!important;min-width:0;box-sizing:border-box}
|
|
5894
|
-
`;
|
|
5895
|
-
|
|
5896
5951
|
// src/native-style.js
|
|
5897
5952
|
var root2 = ".dgui-root[data-preset][data-visual-style]";
|
|
5898
5953
|
var grammar = (id2, css) => css.replaceAll("&", root2 + "[data-visual-style=" + id2 + "]");
|