dsh-motion-ui 0.8.5 → 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 +29 -0
- package/client.js +81 -16
- 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,34 @@
|
|
|
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
|
+
|
|
17
|
+
## 0.8.6 — 2026-10-18
|
|
18
|
+
|
|
19
|
+
### 内部组件与皮肤兼容
|
|
20
|
+
|
|
21
|
+
- 修复皮肤补丁对聊天区域使用 border-radius: 0 !important 时,原生卡片、指标、控件、图表、表格外框与画布边框变成直角的问题(Issue #3)。
|
|
22
|
+
- 为内部组件增加独立的样式边界,保留各风格原有的圆角、非对称形状、响应式排版和有意使用的直角。
|
|
23
|
+
- 防止外部圆角变量重置影响组件;自由模式、设置预览及模型生成的 HTML/SVG 内容保持原有设计。
|
|
24
|
+
- 保留已修复的阅读/极简无外壳排版,以及视频定位、播放器状态和交互参数。
|
|
25
|
+
|
|
26
|
+
### 验证
|
|
27
|
+
|
|
28
|
+
- 根据报告者提供的 skin-center patches 原始覆盖规则复现并验证修复。
|
|
29
|
+
- 2,304 个内部组件组合检查,覆盖六种风格、八种排版、三种宽度、明暗主题与两种加载顺序。
|
|
30
|
+
- 执行完整回归及正式包安装验证。
|
|
31
|
+
|
|
3
32
|
## 0.8.5 — 2026-10-18
|
|
4
33
|
|
|
5
34
|
### 文档外壳与皮肤兼容
|
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,15 +5948,6 @@ var streamUiDefinition = {
|
|
|
5874
5948
|
}
|
|
5875
5949
|
};
|
|
5876
5950
|
|
|
5877
|
-
// src/host-boundary.js
|
|
5878
|
-
var root = ".dgui-root[data-preset]:not(.dgui-style-preview)";
|
|
5879
|
-
var HOST_BOUNDARY_CSS = `
|
|
5880
|
-
${root}{border-radius:var(--du-shell-radius,16px)!important;corner-shape:round}
|
|
5881
|
-
` + Object.entries(STYLE_SYSTEM).map(([id2, { native }]) => `${root}[data-visual-style=${id2}]{--du-shell-radius:${id2 === "editorial" ? 0 : id2 === "soft" ? 30 : native.radius}px}`).join("\n") + `
|
|
5882
|
-
${root}:is([data-preset=reading],[data-preset=minimal]){--du-shell-radius:0px}
|
|
5883
|
-
.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}
|
|
5884
|
-
`;
|
|
5885
|
-
|
|
5886
5951
|
// src/native-style.js
|
|
5887
5952
|
var root2 = ".dgui-root[data-preset][data-visual-style]";
|
|
5888
5953
|
var grammar = (id2, css) => css.replaceAll("&", root2 + "[data-visual-style=" + id2 + "]");
|
|
@@ -6190,7 +6255,7 @@ var READING_CSS = `
|
|
|
6190
6255
|
`;
|
|
6191
6256
|
|
|
6192
6257
|
// src/styles.js
|
|
6193
|
-
var CSS2 = `
|
|
6258
|
+
var CSS2 = nativeGeometryCss(`
|
|
6194
6259
|
.dgui-chart-data-button{margin-left:auto;border:0;background:transparent;color:var(--du-muted);font:inherit;cursor:pointer;padding:4px 8px}.dgui-chart-data-button:hover{color:var(--du-accent)}.dgui-sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important}.dgui-canvas{position:relative}.dgui-action-menu{position:absolute;top:6px;right:6px;z-index:2}.dgui-menu-trigger{width:32px;height:32px;border:1px solid var(--du-line);border-radius:8px;background:var(--du-bg);color:var(--du-muted);font-size:24px;line-height:1;cursor:pointer}.dgui-menu-content{position:absolute;top:38px;right:0;display:grid;min-width:156px;padding:5px;border:1px solid var(--du-line);border-radius:10px;background:var(--du-bg);box-shadow:0 6px 20px #0002}.dgui-menu-content button{border:0;border-radius:6px;background:transparent;color:var(--du-ink);padding:9px 12px;text-align:left;font:inherit;white-space:nowrap;cursor:pointer}.dgui-menu-content button:hover{background:var(--du-soft)}.dgui-menu-content button:disabled{opacity:.45;cursor:default}.dgui-action-menu button:focus-visible{outline:2px solid var(--du-accent);outline-offset:2px}
|
|
6195
6260
|
.dgui-root.dgui-settings{border:0;border-radius:0;box-shadow:none;background:transparent;padding:0;margin:0;max-width:720px;display:flex;flex-direction:column;gap:14px;font-size:13px;line-height:1.65}
|
|
6196
6261
|
.dgui-settings h3{font-size:14px;font-weight:600;margin:0}.dgui-settings label{font-weight:500}.dgui-settings p{color:var(--du-muted)}
|
|
@@ -6214,7 +6279,7 @@ body[data-ds-dark-theme] .dgui-root,.dgui-root[data-preview-theme=dark]{--du-acc
|
|
|
6214
6279
|
.dgui-panel{padding:16px;min-width:0;overflow:auto;height:100%;box-sizing:border-box}.dgui-panel>.dgui-root{margin-bottom:16px}.dgui-panel label{display:flex;align-items:center;flex-wrap:wrap;gap:10px}.dgui-panel select{max-width:100%;flex:1;min-width:120px;border:1px solid var(--du-line);border-radius:8px;padding:8px;background:var(--du-bg);color:var(--du-ink)}
|
|
6215
6280
|
.dgui-history-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:10px 0;border-bottom:1px solid var(--du-line)}.dgui-history-row>span{flex:1;min-width:140px}.dgui-version-preview{margin-top:14px;border:1px solid var(--du-line);border-radius:12px;padding:12px}.dgui-version-preview .dgui-root{margin-top:12px}
|
|
6216
6281
|
[data-dgui-presentation]>.dgui-secondary{margin:8px 0}[data-dgui-marker]{min-width:0}
|
|
6217
|
-
` + SOFT_CSS + READING_CSS + NATIVE_STYLE_CSS + MOTION_CSS + EXPRESSIVE_CSS + STYLE_SETTINGS_CSS + HOST_BOUNDARY_CSS;
|
|
6282
|
+
` + SOFT_CSS + READING_CSS + NATIVE_STYLE_CSS + MOTION_CSS + EXPRESSIVE_CSS + STYLE_SETTINGS_CSS) + HOST_BOUNDARY_CSS;
|
|
6218
6283
|
|
|
6219
6284
|
// src/motion-library.js
|
|
6220
6285
|
var import_react20 = __toESM(require("react"), 1);
|