cladogram 0.5.5-beta.5 → 0.5.5-beta.6
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 +2 -2
- package/docs/release.md +6 -0
- package/package.json +1 -3
- package/plugins/agent/index.js +130 -0
- package/plugins/agent/style.css +310 -128
- package/plugins/brand/index.js +12 -1
- package/plugins/brand/style.css +18 -14
- package/plugins/directory/style.css +110 -40
- package/plugins/view-controls/style.css +4 -7
- package/src/html/page.js +1 -0
- package/src/html/plugin-ui.css +99 -87
- package/src/server/assets/library.html +1 -1
- package/docs/plugin-development.md +0 -135
- package/docs/plugin-ui.md +0 -43
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**你描述需求,AI 整理内容,网页实时展示。** Clado 把 Markdown 内容组织成可逐层阅读的画布,同一份内容可切换卡片、脑图和文档视图(默认卡片视图),适合从想法、需求讨论、测试用例到开发设计和系统归档。
|
|
4
4
|
|
|
5
|
-
> 📖
|
|
5
|
+
> 📖 **官方文档站(中英双语 · 支持全站搜索)**:前往 **[Clado 官方文档](https://godshelvis.github.io/clado-docs/)**(涵盖核心本体、快速开始、语义 Tag 与连线、内置插件详解、MCP 协议与插件开发)。
|
|
6
6
|
|
|
7
7
|
## 产品流程
|
|
8
8
|
|
|
@@ -75,7 +75,7 @@ clado serve /你的项目
|
|
|
75
75
|
|
|
76
76
|
交互式运行 `clado version` 或 `clado serve` 时,最多每天自动检查一次。在旧版还没有 `update` 命令时,先运行 `npm install -g cladogram@latest --registry=https://registry.npmjs.org/`。
|
|
77
77
|
|
|
78
|
-
在左上角 Clado 菜单选择「插件管理」→「安装插件」,选中包含 `clado-plugin.json` 的本地目录,查看权限后安装。插件保存在当前工作区的 `.clado/plugins
|
|
78
|
+
在左上角 Clado 菜单选择「插件管理」→「安装插件」,选中包含 `clado-plugin.json` 的本地目录,查看权限后安装。插件保存在当前工作区的 `.clado/plugins/`。详细开发与权限规范见 [Clado 插件开发指南](https://godshelvis.github.io/clado-docs/plugins/development)。
|
|
79
79
|
|
|
80
80
|
### 在画布里用「灵感」
|
|
81
81
|
|
package/docs/release.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# 版本更新说明
|
|
2
2
|
|
|
3
|
+
## 0.5.5-beta.6 · 30% 灵动晶透毛玻璃 UI、自研人设下拉浮层与全新品牌徽标(灰度版)
|
|
4
|
+
|
|
5
|
+
- **30% 灵动晶透毛玻璃体系(彻底去除内部灰块)**:全局插件基座(`clado.brand`、`clado.view-controls`、`clado.directory`、`clado.agent`)升级为标准 30% 晶透毛玻璃与顶部镜面细高光;取消未选中按钮、文档行和工作流 Tab 的灰底灰框,仅选中项浮起为通透晶亮胶囊,移动端抽屉升级为悬浮圆角液态毛玻璃卡片。
|
|
6
|
+
- **自研毛玻璃「人设 / 执行器」下拉浮层**:彻底替代浏览器与手机端原生系统 `<select>` 弹窗,内置角色色点、说明摘要、选中勾选与高可读磨砂浮层(`84% / 88%`)。
|
|
7
|
+
- **品牌徽标同步与文档体系升级**:同步全新 Clado 矢量 Logo(含精细蓝点与底部柔光丝带)至左上角插件与页面 Favicon;主仓库精简旧文档并统一指向官方文档站 `https://godshelvis.github.io/clado-docs/`。
|
|
8
|
+
|
|
3
9
|
## 0.5.5-beta.5 · 单色透明毛玻璃 UI、PC/移动端适配与统一语义 Tag 锚点(灰度版)
|
|
4
10
|
|
|
5
11
|
- **克制单色透明毛玻璃视觉与 AI 体感柔光**:移除卡片、决策卡与插件弹窗上的四周边彩框与不透明底色,升级为浅/深双色统一透明毛玻璃;仅在 AI 活跃处理或生成时,于卡片 / 灵感面板底部中央呈现延伸至 ≥80% 宽度的渐隐羽化呼吸柔光(普通点击与静止卡片零打扰)。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cladogram",
|
|
3
|
-
"version": "0.5.5-beta.
|
|
3
|
+
"version": "0.5.5-beta.6",
|
|
4
4
|
"description": "MDC 三视图工作区与 MCP 文档服务:模板、节点、链接、批量操作和单文件交付",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -15,8 +15,6 @@
|
|
|
15
15
|
"templates",
|
|
16
16
|
"README.md",
|
|
17
17
|
"docs/release.md",
|
|
18
|
-
"docs/plugin-development.md",
|
|
19
|
-
"docs/plugin-ui.md",
|
|
20
18
|
"LICENSE"
|
|
21
19
|
],
|
|
22
20
|
"engines": {
|
package/plugins/agent/index.js
CHANGED
|
@@ -97,6 +97,127 @@
|
|
|
97
97
|
method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify(data), keepalive,
|
|
98
98
|
});
|
|
99
99
|
const canSubmit = () => !running && (workflow === 'dispatch' || workflow === 'audit' || !!input.value.trim());
|
|
100
|
+
const personaDotColors = { architect: '#3b82f6', qa: '#10b981', auditor: '#8b5cf6' };
|
|
101
|
+
const personaDefaultSummaries = {
|
|
102
|
+
architect: '关注系统边界、调用链与幂等演进',
|
|
103
|
+
qa: '推导边界条件、并发竞争与回归用例树',
|
|
104
|
+
auditor: '严格核对代码 Diff 与设计契约偏差',
|
|
105
|
+
};
|
|
106
|
+
const glassDropdowns = [];
|
|
107
|
+
function attachGlassDropdown(selectEl, { dotColors = {}, fallbackSummaries = {}, defaultDot = '#64748b' } = {}) {
|
|
108
|
+
selectEl.classList.add('clado-agent-select-native');
|
|
109
|
+
selectEl.tabIndex = -1;
|
|
110
|
+
selectEl.setAttribute('aria-hidden', 'true');
|
|
111
|
+
const wrap = document.createElement('div');
|
|
112
|
+
wrap.className = 'clado-glass-dropdown';
|
|
113
|
+
const trigger = document.createElement('button');
|
|
114
|
+
trigger.type = 'button';
|
|
115
|
+
trigger.className = 'clado-glass-dropdown-trigger';
|
|
116
|
+
trigger.setAttribute('aria-haspopup', 'listbox');
|
|
117
|
+
trigger.setAttribute('aria-expanded', 'false');
|
|
118
|
+
trigger.innerHTML =
|
|
119
|
+
'<span class="clado-glass-dropdown-value"><span class="clado-glass-dropdown-dot"></span><span class="clado-glass-dropdown-label"></span></span>' +
|
|
120
|
+
'<svg class="clado-glass-dropdown-chevron" aria-hidden="true" viewBox="0 0 24 24"><path d="m6 9 6 6 6-6"/></svg>';
|
|
121
|
+
const menu = document.createElement('div');
|
|
122
|
+
menu.className = 'clado-glass-dropdown-menu';
|
|
123
|
+
menu.setAttribute('role', 'listbox');
|
|
124
|
+
menu.hidden = true;
|
|
125
|
+
wrap.append(trigger, menu);
|
|
126
|
+
selectEl.after(wrap);
|
|
127
|
+
|
|
128
|
+
const dotEl = trigger.querySelector('.clado-glass-dropdown-dot');
|
|
129
|
+
const labelEl = trigger.querySelector('.clado-glass-dropdown-label');
|
|
130
|
+
|
|
131
|
+
const setOpen = (open) => {
|
|
132
|
+
if (open && selectEl.disabled) return;
|
|
133
|
+
if (open) {
|
|
134
|
+
for (const other of glassDropdowns) {
|
|
135
|
+
if (other.menu !== menu && !other.menu.hidden) other.setOpen(false);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
menu.hidden = !open;
|
|
139
|
+
wrap.classList.toggle('open', open);
|
|
140
|
+
trigger.setAttribute('aria-expanded', String(open));
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
const sync = () => {
|
|
144
|
+
trigger.disabled = selectEl.disabled;
|
|
145
|
+
const opts = [...selectEl.options];
|
|
146
|
+
const activeVal = selectEl.value;
|
|
147
|
+
const currentOpt = opts.find(o => o.value === activeVal) || opts[0];
|
|
148
|
+
const color = (currentOpt && dotColors[currentOpt.value]) || defaultDot;
|
|
149
|
+
dotEl.style.background = color;
|
|
150
|
+
labelEl.textContent = currentOpt ? currentOpt.textContent : '';
|
|
151
|
+
menu.replaceChildren();
|
|
152
|
+
for (const opt of opts) {
|
|
153
|
+
const item = document.createElement('button');
|
|
154
|
+
item.type = 'button';
|
|
155
|
+
item.className = 'clado-ui-button clado-glass-dropdown-option';
|
|
156
|
+
item.setAttribute('role', 'option');
|
|
157
|
+
const selected = opt.value === activeVal;
|
|
158
|
+
item.setAttribute('aria-selected', String(selected));
|
|
159
|
+
if (selected) item.setAttribute('aria-current', 'page');
|
|
160
|
+
const itemDot = document.createElement('span');
|
|
161
|
+
itemDot.className = 'clado-glass-dropdown-dot';
|
|
162
|
+
itemDot.style.background = dotColors[opt.value] || defaultDot;
|
|
163
|
+
const copy = document.createElement('span');
|
|
164
|
+
copy.className = 'clado-glass-dropdown-copy';
|
|
165
|
+
const title = document.createElement('strong');
|
|
166
|
+
title.textContent = opt.textContent;
|
|
167
|
+
copy.append(title);
|
|
168
|
+
const descText = opt.title || fallbackSummaries[opt.value] || '';
|
|
169
|
+
if (descText) {
|
|
170
|
+
const desc = document.createElement('small');
|
|
171
|
+
desc.textContent = descText;
|
|
172
|
+
copy.append(desc);
|
|
173
|
+
}
|
|
174
|
+
const check = document.createElement('span');
|
|
175
|
+
check.className = 'clado-glass-dropdown-check';
|
|
176
|
+
check.textContent = '✓';
|
|
177
|
+
item.append(itemDot, copy, check);
|
|
178
|
+
item.onclick = () => {
|
|
179
|
+
if (selectEl.value !== opt.value) {
|
|
180
|
+
selectEl.value = opt.value;
|
|
181
|
+
selectEl.dispatchEvent(new Event('change', { bubbles: true }));
|
|
182
|
+
}
|
|
183
|
+
sync();
|
|
184
|
+
setOpen(false);
|
|
185
|
+
};
|
|
186
|
+
menu.append(item);
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
trigger.onclick = (event) => {
|
|
191
|
+
event.stopPropagation();
|
|
192
|
+
setOpen(menu.hidden);
|
|
193
|
+
};
|
|
194
|
+
const api = { wrap, menu, sync, setOpen };
|
|
195
|
+
glassDropdowns.push(api);
|
|
196
|
+
sync();
|
|
197
|
+
return api;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
const personaDropdown = attachGlassDropdown(personaSelect, {
|
|
201
|
+
dotColors: personaDotColors,
|
|
202
|
+
fallbackSummaries: personaDefaultSummaries,
|
|
203
|
+
defaultDot: '#3b82f6',
|
|
204
|
+
});
|
|
205
|
+
const executorDropdown = attachGlassDropdown(executorSelect, {
|
|
206
|
+
defaultDot: '#10b981',
|
|
207
|
+
});
|
|
208
|
+
document.addEventListener('pointerdown', event => {
|
|
209
|
+
for (const dd of glassDropdowns) {
|
|
210
|
+
if (!dd.menu.hidden && !dd.wrap.contains(event.target)) dd.setOpen(false);
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
document.addEventListener('keydown', event => {
|
|
214
|
+
if (event.key === 'Escape') {
|
|
215
|
+
for (const dd of glassDropdowns) {
|
|
216
|
+
if (!dd.menu.hidden) dd.setOpen(false);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
|
|
100
221
|
const syncActions = () => {
|
|
101
222
|
panel.classList.toggle('clado-ai-working', running);
|
|
102
223
|
send.disabled = !canSubmit();
|
|
@@ -111,6 +232,8 @@
|
|
|
111
232
|
personaBar.hidden = isDispatch;
|
|
112
233
|
executorSelect.disabled = running;
|
|
113
234
|
personaSelect.disabled = running;
|
|
235
|
+
personaDropdown.sync();
|
|
236
|
+
executorDropdown.sync();
|
|
114
237
|
for (const chip of chips) chip.disabled = running;
|
|
115
238
|
};
|
|
116
239
|
const showStatus = text => {
|
|
@@ -128,6 +251,10 @@
|
|
|
128
251
|
personaSelect.onchange = () => {
|
|
129
252
|
persona = personaSelect.value || 'architect';
|
|
130
253
|
personaLockedByUser = true;
|
|
254
|
+
personaDropdown.sync();
|
|
255
|
+
};
|
|
256
|
+
executorSelect.onchange = () => {
|
|
257
|
+
executorDropdown.sync();
|
|
131
258
|
};
|
|
132
259
|
|
|
133
260
|
function selectWorkflow(nextWorkflow) {
|
|
@@ -183,6 +310,8 @@
|
|
|
183
310
|
}
|
|
184
311
|
if (previous && list.some(item => item.id === previous)) executorSelect.value = previous;
|
|
185
312
|
}
|
|
313
|
+
personaDropdown.sync();
|
|
314
|
+
executorDropdown.sync();
|
|
186
315
|
} catch {}
|
|
187
316
|
}
|
|
188
317
|
|
|
@@ -270,6 +399,7 @@
|
|
|
270
399
|
if (record.persona) {
|
|
271
400
|
persona = record.persona;
|
|
272
401
|
personaSelect.value = persona;
|
|
402
|
+
personaDropdown.sync();
|
|
273
403
|
}
|
|
274
404
|
log.replaceChildren();
|
|
275
405
|
for (const msg of record.uiMessages || []) {
|