@dsh-plugin/dsh-ui-experience 1.0.0-dev.43486821486 → 1.0.0-dev.43487043940
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/README.md +1 -0
- package/lib/client.js +12 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -176,6 +176,7 @@ M3 族的 standard 与 emphasized 在 CSS 的三次贝塞尔下都退化为同
|
|
|
176
176
|
- M3 动效的「位移 / 效果」判定依据属性名与关键帧内容,不分析属性的实际取值变化;判定不出来的情况(例如只由 `all` 声明的过渡)按效果处理,宁可不给过冲。
|
|
177
177
|
- 跨源样式表里的规则无法改写,只会在日志中记录。
|
|
178
178
|
- 本层只改写曲线与时长,不新增、不改写关键帧本身;DSH 没定义的动效不会因此出现。
|
|
179
|
+
- 浏览器半在刷新页面时重载,宿主半只在进程重启时重载。两者版本不一致时(刚升级插件但没重启 DSH),M3 动效行会保持无操作并在控制台记录一行原因,配色功能不受影响。
|
|
179
180
|
|
|
180
181
|
## 样式基线
|
|
181
182
|
|
package/lib/client.js
CHANGED
|
@@ -653,6 +653,7 @@
|
|
|
653
653
|
let idleTick = 0;
|
|
654
654
|
let lastRpcProblem = "";
|
|
655
655
|
let lastPaletteProblem = "";
|
|
656
|
+
let motionUnsupported = false;
|
|
656
657
|
let paintedWidth = "";
|
|
657
658
|
let disposeOverride;
|
|
658
659
|
let borderSheet;
|
|
@@ -734,18 +735,23 @@
|
|
|
734
735
|
return envelope.value;
|
|
735
736
|
};
|
|
736
737
|
const adopt = (answer) => {
|
|
738
|
+
const motionAnswer = answer.motion ?? MOTION_OFF;
|
|
739
|
+
if (answer.motion === void 0 && !motionUnsupported) {
|
|
740
|
+
motionUnsupported = true;
|
|
741
|
+
console.error("ui-experience: this host build predates the motion settings; the M3 motion row stays inert until DSH restarts");
|
|
742
|
+
}
|
|
737
743
|
if (answer.paths.colors !== view.paths.colors || answer.paths.tokens !== view.paths.tokens || answer.borderWidth !== view.borderWidth) {
|
|
738
744
|
publish({ paths: answer.paths, borderWidth: answer.borderWidth });
|
|
739
745
|
}
|
|
740
|
-
if (motionDiffers(view.motion,
|
|
741
|
-
publish({ motion:
|
|
742
|
-
if (bootstrapped) applyMotion(
|
|
746
|
+
if (motionDiffers(view.motion, motionAnswer)) {
|
|
747
|
+
publish({ motion: motionAnswer });
|
|
748
|
+
if (bootstrapped) applyMotion(motionAnswer);
|
|
743
749
|
}
|
|
744
750
|
if (!bootstrapped) {
|
|
745
751
|
bootstrapped = true;
|
|
746
752
|
setBootAttribute(answer.active);
|
|
747
753
|
publish({ active: answer.active });
|
|
748
|
-
applyMotion(
|
|
754
|
+
applyMotion(motionAnswer);
|
|
749
755
|
} else if (!writing && view.active !== answer.active) {
|
|
750
756
|
publish({ active: answer.active });
|
|
751
757
|
if (answer.active) {
|
|
@@ -952,11 +958,10 @@
|
|
|
952
958
|
}, segment.label))
|
|
953
959
|
);
|
|
954
960
|
};
|
|
955
|
-
const checkbox = (
|
|
961
|
+
const checkbox = (checked, set, label, hint, disabled) => h(
|
|
956
962
|
"label",
|
|
957
|
-
{ className: "dsh-uix-check"
|
|
963
|
+
{ className: "dsh-uix-check" },
|
|
958
964
|
h("input", {
|
|
959
|
-
id,
|
|
960
965
|
type: "checkbox",
|
|
961
966
|
checked,
|
|
962
967
|
disabled,
|
|
@@ -1108,7 +1113,6 @@
|
|
|
1108
1113
|
"div",
|
|
1109
1114
|
{ className: "dsh-uix-form" },
|
|
1110
1115
|
checkbox(
|
|
1111
|
-
"dsh-uix-motion-split",
|
|
1112
1116
|
current.spatialSplit,
|
|
1113
1117
|
(next) => {
|
|
1114
1118
|
void saveMotion({ spatialSplit: next });
|
|
@@ -1118,7 +1122,6 @@
|
|
|
1118
1122
|
locked
|
|
1119
1123
|
),
|
|
1120
1124
|
checkbox(
|
|
1121
|
-
"dsh-uix-motion-quantize",
|
|
1122
1125
|
current.quantize,
|
|
1123
1126
|
(next) => {
|
|
1124
1127
|
void saveMotion({ quantize: next });
|
|
@@ -1128,7 +1131,6 @@
|
|
|
1128
1131
|
locked
|
|
1129
1132
|
),
|
|
1130
1133
|
checkbox(
|
|
1131
|
-
"dsh-uix-motion-reduced",
|
|
1132
1134
|
current.reduced === "always",
|
|
1133
1135
|
(next) => {
|
|
1134
1136
|
void saveMotion({ reduced: next ? "always" : "system" });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dsh-plugin/dsh-ui-experience",
|
|
3
|
-
"version": "1.0.0-dev.
|
|
3
|
+
"version": "1.0.0-dev.43487043940",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "UI experience enhancements for DeepSeek Harness: follow the system matugen Material You palette as the interface theme, and rewrite interface motion onto Material 3 / Material 3 Expressive curves.",
|
|
6
6
|
"license": "MIT",
|