dsh-motion-ui 0.8.7 → 0.8.8
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 +1 -1
- package/DESIGN.zh-CN.md +2 -2
- package/README.md +18 -18
- package/VERIFICATION.md +10 -10
- package/client.js +1 -1
- package/lib/assets/katex.css +1 -1
- package/lib/assets/mermaid.js +2 -2
- package/lib/assets/standalone-runtime.js +3 -3
- package/lib/assets/visual.js +21 -21
- package/lib/build-info.js +1 -1
- package/lib/catalog.js +94 -94
- package/lib/mechanism-css.js +1 -1
- package/lib/mechanism-geometry.js +2 -2
- package/lib/mechanism-scenes.js +1 -1
- package/lib/protocol.js +352 -352
- package/lib/scene-entry.js +1 -1
- package/lib/third-party/anatomy-NOTICE.md +1 -1
- package/lib/third-party/dsh-genui-LICENSE.txt +21 -21
- package/lib/third-party/lucian-uxui-LICENSE.txt +21 -21
- package/lib/ui-skill.js +29 -29
- package/lib/visual.js +1 -1
- package/package.json +8 -7
- package/skills/motion-design/upstream.json +8 -8
package/lib/scene-entry.js
CHANGED
|
@@ -38,4 +38,4 @@ export function sceneDocument(args={}){
|
|
|
38
38
|
return validateDocument(doc);
|
|
39
39
|
}
|
|
40
40
|
export function previewScene(raw){try{if(typeof raw!=='string'||raw.length>LIMITS.bytes)return null;return sceneDocument(JSON.parse(raw))}catch{return null}}
|
|
41
|
-
export function sceneReference(){return{topic:'quick',tool:'render_scene',scenes:SCENE_IDS,examples:[{scene:'flow',items:[{title:'明确目标'},{title:'交付结果'}]},{scene:'comparison',items:[{title:'方案A',description:'适合日常使用'},{title:'方案B',description:'适合深入分析'}]},{scene:'allocation',total:60,unit:'分钟',items:[{label:'阅读',percent:40},{label:'练习',percent:40},{label:'复盘',percent:20}]},{scene:'budget',title:'假设旅行预算',values:{people:3,nights:3,roomRate:600,transportPerPerson:800}}],note:'Examples are illustrative, not measured data. Use supplied/explicitly assumed task values. Full custom UI remains available via render_ui/render_canvas.'}}
|
|
41
|
+
export function sceneReference(){return{topic:'quick',tool:'render_scene',scenes:SCENE_IDS,examples:[{scene:'flow',items:[{title:'明确目标'},{title:'交付结果'}]},{scene:'comparison',items:[{title:'方案A',description:'适合日常使用'},{title:'方案B',description:'适合深入分析'}]},{scene:'allocation',total:60,unit:'分钟',items:[{label:'阅读',percent:40},{label:'练习',percent:40},{label:'复盘',percent:20}]},{scene:'budget',title:'假设旅行预算',values:{people:3,nights:3,roomRate:600,transportPerPerson:800}}],note:'Examples are illustrative, not measured data. Use supplied/explicitly assumed task values. Full custom UI remains available via render_ui/render_canvas.'}}
|
|
@@ -10,4 +10,4 @@ License: anatomy-LICENSE.txt. Copyright (c) 2026 Ryan.
|
|
|
10
10
|
|
|
11
11
|
Motion UI's scene validation, renderer, state bridge, controls, simplified mechanism
|
|
12
12
|
models and examples are original integration code. This is a compact explanatory
|
|
13
|
-
renderer, not Anatomy's full collision/audit system or its beta 3D/WebGL runtime.
|
|
13
|
+
renderer, not Anatomy's full collision/audit system or its beta 3D/WebGL runtime.
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 dsh-external
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 dsh-external
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Seokwoooo
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Seokwoooo
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/lib/ui-skill.js
CHANGED
|
@@ -5,35 +5,35 @@ import {FREE_UI_CONTRACT} from './freeform.js';
|
|
|
5
5
|
import {UI_INTENT_POLICY} from './ui-intent.js';
|
|
6
6
|
import {DEFAULT_VISUAL_STYLE,stylePrompt,visualStyle} from './visual-styles.js';
|
|
7
7
|
|
|
8
|
-
// Authored examples are deliberately small enough to be present in every model's context.
|
|
9
|
-
export const SKILL_EXAMPLES = [
|
|
10
|
-
{
|
|
11
|
-
version: 1, title: '示例 · 数量与费用', fallback: '演示:单价 12 元,数量默认 2,总额 24 元。不是报价。',
|
|
12
|
-
presentation: { layout: 'workbench', accent: 'teal', density: 'comfortable' },
|
|
13
|
-
state: { quantity: { type: 'number', default: 2, min: 1, max: 10, step: 1 } },
|
|
14
|
-
derived: { total: { expr: 'state.quantity * 12' } },
|
|
15
|
-
nodes: [
|
|
16
|
-
{ id: 'quantity', type: 'slider', label: '数量(件)', bind: 'state.quantity' },
|
|
17
|
-
{ id: 'total', type: 'metric', label: '演示总额', value: { ref: 'derived.total' }, unit: '元', decimals: 0 },
|
|
18
|
-
{ id: 'note', type: 'text', text: '示例单价,非实际报价。' }
|
|
19
|
-
]
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
version: 1, title: '示例 · 周期运动', fallback: '一个圆点沿横向做周期运动。速度可调,运行可暂停;数学动画示意,非真实物理仿真。',
|
|
23
|
-
presentation: { layout: 'workbench', accent: 'blue' },
|
|
24
|
-
state: { speed: { type: 'number', default: 1, min: 1, max: 3, step: 1 }, running: { type: 'boolean', default: false } },
|
|
25
|
-
nodes: [
|
|
26
|
-
{ id: 'motion', type: 'sandbox', title: '周期运动示意', height: 220, stateKeys: ['speed', 'running'], fallback: '圆点沿直线往返。运行开关控制暂停,速度从 1 到 3。',
|
|
27
|
-
html: '<svg viewBox="0 0 360 140" role="img" aria-label="圆点沿直线往返"><path d="M40 70H320" stroke="var(--canvas-line)"/><circle id="dot" cx="180" cy="70" r="16" fill="var(--canvas-accent)"/></svg><p id="caption"></p>',
|
|
28
|
-
css: 'svg{display:block;width:100%;height:150px}p{margin:8px 12px;font-size:14px;color:var(--canvas-ink)}',
|
|
29
|
-
script: "let state={speed:1,running:false},phase=0;const dot=document.getElementById('dot'),caption=document.getElementById('caption');const unsubscribe=DSHUI.subscribe(s=>{state=s.state;caption.textContent=(state.running?'运行':'暂停')+' · 速度 '+state.speed+' · 数学示意,非物理仿真'});const stop=DSHUI.animate(({delta,reducedMotion,visible})=>{if(state.running&&!reducedMotion&&visible)phase+=delta*state.speed;dot.setAttribute('cx',String(180+120*Math.sin(phase)))});addEventListener('pagehide',()=>{stop();unsubscribe()},{once:true});"
|
|
30
|
-
},
|
|
31
|
-
{ id: 'speed', type: 'slider', label: '演示速度(倍)', bind: 'state.speed' },
|
|
32
|
-
{ id: 'running', type: 'toggle', label: '运行(关闭后保持当前位置)', bind: 'state.running' }
|
|
33
|
-
]
|
|
34
|
-
}
|
|
35
|
-
];
|
|
36
|
-
|
|
8
|
+
// Authored examples are deliberately small enough to be present in every model's context.
|
|
9
|
+
export const SKILL_EXAMPLES = [
|
|
10
|
+
{
|
|
11
|
+
version: 1, title: '示例 · 数量与费用', fallback: '演示:单价 12 元,数量默认 2,总额 24 元。不是报价。',
|
|
12
|
+
presentation: { layout: 'workbench', accent: 'teal', density: 'comfortable' },
|
|
13
|
+
state: { quantity: { type: 'number', default: 2, min: 1, max: 10, step: 1 } },
|
|
14
|
+
derived: { total: { expr: 'state.quantity * 12' } },
|
|
15
|
+
nodes: [
|
|
16
|
+
{ id: 'quantity', type: 'slider', label: '数量(件)', bind: 'state.quantity' },
|
|
17
|
+
{ id: 'total', type: 'metric', label: '演示总额', value: { ref: 'derived.total' }, unit: '元', decimals: 0 },
|
|
18
|
+
{ id: 'note', type: 'text', text: '示例单价,非实际报价。' }
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
version: 1, title: '示例 · 周期运动', fallback: '一个圆点沿横向做周期运动。速度可调,运行可暂停;数学动画示意,非真实物理仿真。',
|
|
23
|
+
presentation: { layout: 'workbench', accent: 'blue' },
|
|
24
|
+
state: { speed: { type: 'number', default: 1, min: 1, max: 3, step: 1 }, running: { type: 'boolean', default: false } },
|
|
25
|
+
nodes: [
|
|
26
|
+
{ id: 'motion', type: 'sandbox', title: '周期运动示意', height: 220, stateKeys: ['speed', 'running'], fallback: '圆点沿直线往返。运行开关控制暂停,速度从 1 到 3。',
|
|
27
|
+
html: '<svg viewBox="0 0 360 140" role="img" aria-label="圆点沿直线往返"><path d="M40 70H320" stroke="var(--canvas-line)"/><circle id="dot" cx="180" cy="70" r="16" fill="var(--canvas-accent)"/></svg><p id="caption"></p>',
|
|
28
|
+
css: 'svg{display:block;width:100%;height:150px}p{margin:8px 12px;font-size:14px;color:var(--canvas-ink)}',
|
|
29
|
+
script: "let state={speed:1,running:false},phase=0;const dot=document.getElementById('dot'),caption=document.getElementById('caption');const unsubscribe=DSHUI.subscribe(s=>{state=s.state;caption.textContent=(state.running?'运行':'暂停')+' · 速度 '+state.speed+' · 数学示意,非物理仿真'});const stop=DSHUI.animate(({delta,reducedMotion,visible})=>{if(state.running&&!reducedMotion&&visible)phase+=delta*state.speed;dot.setAttribute('cx',String(180+120*Math.sin(phase)))});addEventListener('pagehide',()=>{stop();unsubscribe()},{once:true});"
|
|
30
|
+
},
|
|
31
|
+
{ id: 'speed', type: 'slider', label: '演示速度(倍)', bind: 'state.speed' },
|
|
32
|
+
{ id: 'running', type: 'toggle', label: '运行(关闭后保持当前位置)', bind: 'state.running' }
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
];
|
|
36
|
+
|
|
37
37
|
const workedExamples=style=>'Selected visual-style examples (adapt the composition to the task; no obligation to reproduce every module):\n'+JSON.stringify(visualStyle(style).examples[0])+'\n'+JSON.stringify({tool:'render_ui',args:{document:SKILL_EXAMPLES[0]}});
|
|
38
38
|
const skill=readFileSync(new URL('../skills/intelligent-ui/SKILL.md',import.meta.url),'utf8');
|
|
39
39
|
export const UI_SKILL_SECTIONS=Object.freeze([
|
package/lib/visual.js
CHANGED
|
@@ -37,4 +37,4 @@ export const VISUAL_EXAMPLES=[
|
|
|
37
37
|
{title:'函数探索',items:[{type:'plot',title:'振幅变化',xMin:-6.28,xMax:6.28,series:[{expr:'a*sin(x)',label:'正弦曲线',params:[{name:'a',value:1,min:0,max:3}]}]}]},
|
|
38
38
|
{title:'示例销量',items:[{type:'input',id:'search',label:'筛选商品'},{type:'table',columns:['商品','数量'],rows:[['示例 A',12],['示例 B',24]],filter:'search',types:['text','num']},{type:'chart',kind:'donut',data:[{label:'示例 A',value:12},{label:'示例 B',value:24}]}]}
|
|
39
39
|
];
|
|
40
|
-
|
|
40
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-motion-ui",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.8",
|
|
4
4
|
"description": "Readable conversational UI, interactive HTML/SVG, editable motion and local MP4 production for DeepSeek Harness.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"platform": "web"
|
|
38
38
|
},
|
|
39
39
|
"compatibility": {
|
|
40
|
-
"dsh": "0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2",
|
|
40
|
+
"dsh": "0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3",
|
|
41
41
|
"node": ">=22.19",
|
|
42
42
|
"profiles": [
|
|
43
43
|
"web",
|
|
@@ -46,13 +46,14 @@
|
|
|
46
46
|
"dshReleases": {
|
|
47
47
|
"0.2.0-rc.2": "compatible",
|
|
48
48
|
"0.2.1-rc.1": "compatible",
|
|
49
|
-
"0.2.1-rc.2": "compatible"
|
|
49
|
+
"0.2.1-rc.2": "compatible",
|
|
50
|
+
"0.2.1-rc.3": "compatible"
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
53
|
},
|
|
53
54
|
"peerDependencies": {
|
|
54
|
-
"@deepseek-ai/dsh-home-paths": "0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2",
|
|
55
|
-
"@deepseek-ai/dsh-tools": "0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2",
|
|
55
|
+
"@deepseek-ai/dsh-home-paths": "0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3",
|
|
56
|
+
"@deepseek-ai/dsh-tools": "0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3",
|
|
56
57
|
"react": "^18.2.0 || ^19.0.0",
|
|
57
58
|
"react-dom": "^18.2.0 || ^19.0.0"
|
|
58
59
|
},
|
|
@@ -66,8 +67,8 @@
|
|
|
66
67
|
"react": "^18.3.1",
|
|
67
68
|
"react-dom": "^18.3.1",
|
|
68
69
|
"three": "^0.180.0",
|
|
69
|
-
"@deepseek-ai/dsh-tools": "0.2.1-rc.
|
|
70
|
-
"@deepseek-ai/dsh-home-paths": "0.2.1-rc.
|
|
70
|
+
"@deepseek-ai/dsh-tools": "0.2.1-rc.3",
|
|
71
|
+
"@deepseek-ai/dsh-home-paths": "0.2.1-rc.3"
|
|
71
72
|
},
|
|
72
73
|
"dependencies": {
|
|
73
74
|
"@deepseek-ai/schemastery": "^3.18.4",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
{
|
|
2
|
-
"modified": false,
|
|
3
|
-
"retrieved": "2026-10-17",
|
|
4
|
-
"sha256": "19525f19eb62f0f69924c679e08e9a9c07d5bc378fa1fabd736af26413603b76",
|
|
5
|
-
"path": "skills/motion-design/SKILL.md",
|
|
6
|
-
"upstream": "https://github.com/nexu-io/open-design",
|
|
7
|
-
"commit": "14fee234e6eb268058fed17ba979d8e22798dd34"
|
|
8
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"modified": false,
|
|
3
|
+
"retrieved": "2026-10-17",
|
|
4
|
+
"sha256": "19525f19eb62f0f69924c679e08e9a9c07d5bc378fa1fabd736af26413603b76",
|
|
5
|
+
"path": "skills/motion-design/SKILL.md",
|
|
6
|
+
"upstream": "https://github.com/nexu-io/open-design",
|
|
7
|
+
"commit": "14fee234e6eb268058fed17ba979d8e22798dd34"
|
|
8
|
+
}
|