cladogram 0.5.5-beta.5 → 0.5.5-beta.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/README.md +2 -2
- package/docs/release.md +13 -0
- package/package.json +2 -4
- package/plugins/agent/index.js +1875 -357
- package/plugins/agent/style.css +1209 -324
- package/plugins/brand/index.js +211 -3
- package/plugins/brand/style.css +18 -14
- package/plugins/directory/style.css +110 -40
- package/plugins/view-controls/style.css +4 -7
- package/src/agent/context.js +430 -0
- package/src/agent/probe.js +58 -0
- package/src/agent/runtime.js +418 -28
- package/src/agent/sessions.js +237 -32
- package/src/html/canvas-ui.css +75 -11
- package/src/html/page.js +1 -0
- package/src/html/plugin-ui.css +382 -86
- package/src/server/agent.js +818 -50
- package/src/server/assets/library-canvas.js +305 -1
- package/src/server/assets/library.html +1 -1
- package/src/server/assets/library.js +329 -5
- package/src/server/plugin-registry.js +98 -0
- package/src/server/plugin-settings.js +1 -1
- package/src/server/workspace.js +113 -8
- package/src/workspace/objects.js +125 -0
- package/docs/plugin-development.md +0 -135
- package/docs/plugin-ui.md +0 -43
package/plugins/brand/index.js
CHANGED
|
@@ -123,12 +123,207 @@
|
|
|
123
123
|
};
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
function
|
|
126
|
+
function mountPluginMarket(market) {
|
|
127
|
+
if (!market || !document.body) return null;
|
|
128
|
+
const overlay = document.createElement('div');
|
|
129
|
+
overlay.id = 'clado-market-overlay';
|
|
130
|
+
overlay.className = 'clado-market-overlay';
|
|
131
|
+
overlay.innerHTML = `
|
|
132
|
+
<div class="clado-market-sheet">
|
|
133
|
+
<div class="clado-market-well" style="padding:12px;display:flex;flex-direction:column;gap:9px;">
|
|
134
|
+
<div style="display:flex;align-items:center;justify-content:space-between;gap:6px;flex-wrap:wrap;">
|
|
135
|
+
<strong style="font-size:15px;">插件市场</strong>
|
|
136
|
+
<div style="display:flex;align-items:center;gap:5px;">
|
|
137
|
+
<div class="clado-market-tabs">
|
|
138
|
+
<button type="button" class="clado-market-tab active" data-m-src="official">官方源</button>
|
|
139
|
+
<button type="button" class="clado-market-tab" data-m-src="team">团队私有源</button>
|
|
140
|
+
</div>
|
|
141
|
+
<button type="button" class="clado-market-tab active" data-m-close style="padding:4.5px 10px;">完成</button>
|
|
142
|
+
</div>
|
|
143
|
+
</div>
|
|
144
|
+
<input type="text" data-m-search placeholder="搜索插件…" style="width:100%;padding:8px 11px;border-radius:10px;border:1px solid var(--clado-ui-well-border);background:var(--clado-ui-well);color:var(--clado-ui-text);font:inherit;font-size:13px;outline:none;" />
|
|
145
|
+
<div style="display:flex;gap:4px;overflow-x:auto;">
|
|
146
|
+
<button type="button" class="clado-market-tab active" data-m-cat="all">全部</button>
|
|
147
|
+
<button type="button" class="clado-market-tab" data-m-cat="multi">多实例</button>
|
|
148
|
+
<button type="button" class="clado-market-tab" data-m-cat="tool">纯工具</button>
|
|
149
|
+
<button type="button" class="clado-market-tab" data-m-cat="hybrid">视图+工具</button>
|
|
150
|
+
<button type="button" class="clado-market-tab" data-m-cat="executor">执行器</button>
|
|
151
|
+
</div>
|
|
152
|
+
</div>
|
|
153
|
+
<div data-m-list style="display:flex;flex-direction:column;gap:8px;"></div>
|
|
154
|
+
<div data-m-detail class="clado-market-well" style="display:none;padding:14px;flex-direction:column;gap:11px;"></div>
|
|
155
|
+
</div>`;
|
|
156
|
+
document.body.append(overlay);
|
|
157
|
+
|
|
158
|
+
const searchInput = overlay.querySelector('[data-m-search]');
|
|
159
|
+
const listEl = overlay.querySelector('[data-m-list]');
|
|
160
|
+
const detailEl = overlay.querySelector('[data-m-detail]');
|
|
161
|
+
let sourceFilter = 'official';
|
|
162
|
+
let catFilter = 'all';
|
|
163
|
+
let catalog = [];
|
|
164
|
+
let installedSet = new Set();
|
|
165
|
+
|
|
166
|
+
const kindLabels = { multi: '多实例', tool: '纯工具', hybrid: '视图+工具', executor: '执行器', ui: '界面插件' };
|
|
167
|
+
const inferKind = p => p.kind || (p.category === 'executor' ? 'executor' : 'tool');
|
|
168
|
+
|
|
169
|
+
function renderList() {
|
|
170
|
+
const q = (searchInput.value || '').trim().toLowerCase();
|
|
171
|
+
detailEl.style.display = 'none';
|
|
172
|
+
listEl.style.display = 'flex';
|
|
173
|
+
listEl.replaceChildren();
|
|
174
|
+
|
|
175
|
+
const filtered = catalog.filter(p => {
|
|
176
|
+
const pSrc = p.source || 'official';
|
|
177
|
+
if (sourceFilter === 'team' && pSrc !== 'team') return false;
|
|
178
|
+
const k = inferKind(p);
|
|
179
|
+
if (catFilter !== 'all' && k !== catFilter) return false;
|
|
180
|
+
if (q && !(p.name + ' ' + p.description + ' ' + p.id).toLowerCase().includes(q)) return false;
|
|
181
|
+
return true;
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
if (!filtered.length) {
|
|
185
|
+
const empty = document.createElement('div');
|
|
186
|
+
empty.className = 'clado-market-well';
|
|
187
|
+
empty.style.cssText = 'padding:16px;text-align:center;color:var(--clado-ui-muted);font-size:12.5px;';
|
|
188
|
+
empty.textContent = '当前筛选下暂无匹配插件';
|
|
189
|
+
listEl.append(empty);
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
for (const p of filtered) {
|
|
194
|
+
const card = document.createElement('div');
|
|
195
|
+
card.className = 'clado-market-well clado-market-card';
|
|
196
|
+
card.dataset.mId = p.id;
|
|
197
|
+
const risk = p.audit?.highestRisk || 'low';
|
|
198
|
+
const k = inferKind(p);
|
|
199
|
+
const installed = installedSet.has(p.id);
|
|
200
|
+
card.innerHTML = `
|
|
201
|
+
<div style="display:flex;align-items:flex-start;gap:10px;">
|
|
202
|
+
<span style="width:36px;height:36px;border-radius:11px;background:var(--clado-ui-well);border:1px solid var(--clado-ui-well-border);display:inline-flex;align-items:center;justify-content:center;font-size:17px;flex:none;">${p.icon || '🧩'}</span>
|
|
203
|
+
<div style="flex:1;min-width:0;">
|
|
204
|
+
<div style="display:flex;align-items:center;gap:6px;flex-wrap:wrap;">
|
|
205
|
+
<strong style="font-size:13.5px;">${p.name}</strong>
|
|
206
|
+
<span style="padding:1px 6px;border-radius:6px;background:rgba(59,130,246,0.13);color:var(--clado-ui-brand);font-size:10px;font-weight:600;">${kindLabels[k] || '扩展'}</span>
|
|
207
|
+
${installed ? '<span style="font-size:10px;color:#059669;font-weight:600;">已安装</span>' : ''}
|
|
208
|
+
<span class="clado-risk-pill clado-risk-${risk}" style="margin-left:auto;">${risk}</span>
|
|
209
|
+
</div>
|
|
210
|
+
<div style="font-size:12px;color:var(--clado-ui-muted);margin-top:4px;line-height:1.45;">${p.description || ''}</div>
|
|
211
|
+
</div>
|
|
212
|
+
</div>`;
|
|
213
|
+
card.onclick = () => openDetail(p);
|
|
214
|
+
listEl.append(card);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
function openDetail(p) {
|
|
219
|
+
listEl.style.display = 'none';
|
|
220
|
+
detailEl.style.display = 'flex';
|
|
221
|
+
const risk = p.audit?.highestRisk || 'low';
|
|
222
|
+
const installed = installedSet.has(p.id);
|
|
223
|
+
const auditItems = Array.isArray(p.audit?.items) ? p.audit.items : [];
|
|
224
|
+
detailEl.innerHTML = `
|
|
225
|
+
<div style="display:flex;justify-content:space-between;align-items:center;">
|
|
226
|
+
<button type="button" class="clado-market-tab active" data-m-back>← 返回列表</button>
|
|
227
|
+
<span class="clado-risk-pill clado-risk-${risk}">权限风险:${risk}</span>
|
|
228
|
+
</div>
|
|
229
|
+
<div style="display:flex;align-items:center;gap:10px;">
|
|
230
|
+
<span style="width:42px;height:42px;border-radius:12px;background:var(--clado-ui-well);border:1px solid var(--clado-ui-well-border);display:inline-flex;align-items:center;justify-content:center;font-size:20px;flex:none;">${p.icon || '🧩'}</span>
|
|
231
|
+
<div style="flex:1;min-width:0;">
|
|
232
|
+
<div style="font-size:15px;font-weight:700;">${p.name}</div>
|
|
233
|
+
<div style="font-size:11.5px;color:var(--clado-ui-subtle);">${p.id} · v${p.version} · ${p.author || 'community'}</div>
|
|
234
|
+
</div>
|
|
235
|
+
<button type="button" data-m-toggle style="height:32px;padding:0 13px;border-radius:9px;border:0;background:${installed ? 'var(--clado-ui-well)' : 'var(--clado-ui-brand)'};color:${installed ? 'var(--clado-ui-text)' : '#fff'};font:inherit;font-size:12px;font-weight:600;cursor:pointer;">${installed ? '卸载' : '安装'}</button>
|
|
236
|
+
</div>
|
|
237
|
+
<div style="font-size:12.5px;line-height:1.55;color:var(--clado-ui-muted);">${p.readme || p.description || ''}</div>
|
|
238
|
+
<div style="border-top:1px solid var(--clado-ui-edge);padding-top:9px;font-size:11.5px;color:var(--clado-ui-muted);display:flex;flex-direction:column;gap:4px;">
|
|
239
|
+
<strong style="color:var(--clado-ui-text);font-size:11.5px;">权限审计明细</strong>
|
|
240
|
+
${auditItems.length ? auditItems.map(a => `<div>· [${a.risk}] ${a.summary}</div>`).join('') : '<div>· 无额外敏感权限声明</div>'}
|
|
241
|
+
</div>
|
|
242
|
+
<div data-m-status style="font-size:11.5px;color:var(--clado-ui-brand);"></div>`;
|
|
243
|
+
|
|
244
|
+
detailEl.querySelector('[data-m-back]').onclick = () => renderList();
|
|
245
|
+
const toggleBtn = detailEl.querySelector('[data-m-toggle]');
|
|
246
|
+
const statusLine = detailEl.querySelector('[data-m-status]');
|
|
247
|
+
toggleBtn.onclick = async () => {
|
|
248
|
+
toggleBtn.disabled = true;
|
|
249
|
+
statusLine.textContent = installed ? '正在卸载…' : '正在安装并审计…';
|
|
250
|
+
try {
|
|
251
|
+
if (installed) {
|
|
252
|
+
await market.uninstall(p.id);
|
|
253
|
+
installedSet.delete(p.id);
|
|
254
|
+
} else {
|
|
255
|
+
await market.install(p.id);
|
|
256
|
+
installedSet.add(p.id);
|
|
257
|
+
}
|
|
258
|
+
openDetail(p);
|
|
259
|
+
} catch (err) {
|
|
260
|
+
statusLine.textContent = err.message || '操作失败';
|
|
261
|
+
toggleBtn.disabled = false;
|
|
262
|
+
}
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
async function open() {
|
|
267
|
+
overlay.classList.add('show');
|
|
268
|
+
try {
|
|
269
|
+
const res = await market.load();
|
|
270
|
+
catalog = Array.isArray(res?.plugins) ? res.plugins : [];
|
|
271
|
+
installedSet = new Set(res?.installedIds || []);
|
|
272
|
+
if (res?.origin && res.origin !== 'builtin') {
|
|
273
|
+
for (const p of catalog) if (!p.source) p.source = 'team';
|
|
274
|
+
}
|
|
275
|
+
} catch {}
|
|
276
|
+
renderList();
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
function close() {
|
|
280
|
+
overlay.classList.remove('show');
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
overlay.addEventListener('click', ev => {
|
|
284
|
+
if (ev.target === overlay || ev.target.closest('[data-m-close]')) {
|
|
285
|
+
close();
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
const srcBtn = ev.target.closest('[data-m-src]');
|
|
289
|
+
if (srcBtn) {
|
|
290
|
+
sourceFilter = srcBtn.dataset.mSrc;
|
|
291
|
+
overlay.querySelectorAll('[data-m-src]').forEach(b => b.classList.toggle('active', b === srcBtn));
|
|
292
|
+
renderList();
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
295
|
+
const catBtn = ev.target.closest('[data-m-cat]');
|
|
296
|
+
if (catBtn) {
|
|
297
|
+
catFilter = catBtn.dataset.mCat;
|
|
298
|
+
overlay.querySelectorAll('[data-m-cat]').forEach(b => b.classList.toggle('active', b === catBtn));
|
|
299
|
+
renderList();
|
|
300
|
+
}
|
|
301
|
+
});
|
|
302
|
+
searchInput.addEventListener('input', () => renderList());
|
|
303
|
+
window.addEventListener('clado:open-market', () => open());
|
|
304
|
+
document.addEventListener('keydown', ev => {
|
|
305
|
+
if (ev.key === 'Escape' && overlay.classList.contains('show')) close();
|
|
306
|
+
});
|
|
307
|
+
return { open, close };
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
function mountBrand(host, { setTheme, capture, plugins, market }) {
|
|
127
311
|
const brand = document.createElement('div');
|
|
128
312
|
brand.className = 'clado-brand-plugin';
|
|
313
|
+
const brandLogo = '<svg viewBox="0 0 64 64" fill="none" aria-hidden="true">' +
|
|
314
|
+
'<defs>' +
|
|
315
|
+
'<linearGradient id="cladoLogoBg" x1="8" y1="6" x2="56" y2="58" gradientUnits="userSpaceOnUse"><stop offset="0%" stop-color="#333842"/><stop offset="100%" stop-color="#14171d"/></linearGradient>' +
|
|
316
|
+
'<linearGradient id="cladoLogoAura" x1="12" y1="56" x2="52" y2="56" gradientUnits="userSpaceOnUse"><stop offset="0%" stop-color="#38bdf8" stop-opacity="0"/><stop offset="28%" stop-color="#38bdf8" stop-opacity="0.95"/><stop offset="50%" stop-color="#818cf8" stop-opacity="1"/><stop offset="72%" stop-color="#e879f9" stop-opacity="0.9"/><stop offset="100%" stop-color="#f472b6" stop-opacity="0"/></linearGradient>' +
|
|
317
|
+
'</defs>' +
|
|
318
|
+
'<rect x="4" y="4" width="56" height="56" rx="16" fill="url(#cladoLogoBg)"/>' +
|
|
319
|
+
'<rect x="4.5" y="4.5" width="55" height="55" rx="15.5" stroke="rgba(255,255,255,0.14)"/>' +
|
|
320
|
+
'<path d="M40.5 23.2C38.6 20.6 35.6 19 32.1 19C25.5 19 20.5 24.4 20.5 32C20.5 39.6 25.5 45 32.1 45C35.7 45 38.7 43.3 40.6 40.6" stroke="#ffffff" stroke-width="5.2" stroke-linecap="round"/>' +
|
|
321
|
+
'<circle cx="43.5" cy="32" r="3" fill="#60a5fa"/>' +
|
|
322
|
+
'<rect x="12" y="57.2" width="40" height="2.4" rx="1.2" fill="url(#cladoLogoAura)"/>' +
|
|
323
|
+
'</svg>';
|
|
129
324
|
brand.innerHTML = `
|
|
130
325
|
<button type="button" class="clado-ui-glass clado-ui-button clado-brand" aria-label="Clado 设置" aria-expanded="false" aria-controls="clado-brand-settings" title="Clado 设置">
|
|
131
|
-
<span class="clado-brand-mark" aria-hidden="true"
|
|
326
|
+
<span class="clado-brand-mark" aria-hidden="true">${brandLogo}</span><strong>clado</strong>
|
|
132
327
|
</button>
|
|
133
328
|
<div class="clado-ui-glass clado-ui-glass-panel clado-brand-settings" id="clado-brand-settings" role="group" aria-labelledby="clado-brand-settings-title" hidden>
|
|
134
329
|
<p id="clado-brand-settings-title">设置</p>
|
|
@@ -167,6 +362,19 @@
|
|
|
167
362
|
};
|
|
168
363
|
panel.append(action);
|
|
169
364
|
}
|
|
365
|
+
const marketCtrl = mountPluginMarket(market);
|
|
366
|
+
if (marketCtrl) {
|
|
367
|
+
const marketBtn = document.createElement('button');
|
|
368
|
+
marketBtn.type = 'button';
|
|
369
|
+
marketBtn.className = 'clado-ui-button clado-brand-choice clado-brand-capture';
|
|
370
|
+
marketBtn.dataset.openMarket = 'true';
|
|
371
|
+
marketBtn.innerHTML = icon('<path d="M4 9h16l-1.5 10.5a2 2 0 0 1-2 1.5H7.5a2 2 0 0 1-2-1.5L4 9Zm2-5h12l2 5H4l2-5Z"/>') + '<span>插件市场</span>';
|
|
372
|
+
marketBtn.onclick = () => {
|
|
373
|
+
setOpen(false);
|
|
374
|
+
marketCtrl.open();
|
|
375
|
+
};
|
|
376
|
+
panel.append(marketBtn);
|
|
377
|
+
}
|
|
170
378
|
if (plugins) {
|
|
171
379
|
const action = document.createElement('button');
|
|
172
380
|
action.type = 'button';
|
|
@@ -254,7 +462,7 @@
|
|
|
254
462
|
sync(theme) {
|
|
255
463
|
for (const entry of choices) entry.choice.setAttribute('aria-pressed', String(entry.theme === theme));
|
|
256
464
|
},
|
|
257
|
-
close: () => setOpen(false),
|
|
465
|
+
close: () => { setOpen(false); marketCtrl?.close(); },
|
|
258
466
|
};
|
|
259
467
|
}
|
|
260
468
|
|
package/plugins/brand/style.css
CHANGED
|
@@ -14,37 +14,41 @@
|
|
|
14
14
|
place-items: center;
|
|
15
15
|
width: 28px;
|
|
16
16
|
height: 28px;
|
|
17
|
-
border-radius:
|
|
18
|
-
background:
|
|
19
|
-
box-shadow: inset 0 1px 1px #fff4, 0 2px 4px #17171738;
|
|
20
|
-
color: #fff;
|
|
21
|
-
font-weight: 750;
|
|
22
|
-
font-size: 15px;
|
|
17
|
+
border-radius: 8px;
|
|
18
|
+
background: transparent;
|
|
23
19
|
flex: none;
|
|
24
20
|
}
|
|
21
|
+
.clado-brand-mark svg {
|
|
22
|
+
display: block;
|
|
23
|
+
width: 100%;
|
|
24
|
+
height: 100%;
|
|
25
|
+
}
|
|
25
26
|
.clado-brand-settings {
|
|
26
27
|
position: absolute;
|
|
27
28
|
inset: calc(100% + 8px) auto auto 0;
|
|
28
|
-
width: min(
|
|
29
|
+
width: min(192px, calc(100vw - 32px));
|
|
29
30
|
display: grid;
|
|
30
|
-
gap:
|
|
31
|
+
gap: 3px;
|
|
31
32
|
padding: 8px;
|
|
33
|
+
border-radius: 18px;
|
|
32
34
|
}
|
|
33
35
|
.clado-brand-settings p {
|
|
34
36
|
margin: 0;
|
|
35
|
-
padding: 3px
|
|
36
|
-
color: var(--clado-ui-
|
|
37
|
+
padding: 3px 9px 4px;
|
|
38
|
+
color: var(--clado-ui-subtle);
|
|
37
39
|
font-size: 11px;
|
|
38
40
|
font-weight: 600;
|
|
39
41
|
}
|
|
40
42
|
.clado-brand-choice {
|
|
41
|
-
min-height:
|
|
42
|
-
padding-inline:
|
|
43
|
+
min-height: 36px;
|
|
44
|
+
padding-inline: 10px;
|
|
43
45
|
display: grid;
|
|
44
46
|
grid-template-columns: 16px 1fr 14px;
|
|
45
47
|
align-items: center;
|
|
46
48
|
gap: 8px;
|
|
47
49
|
text-align: start;
|
|
50
|
+
color: var(--clado-ui-text);
|
|
51
|
+
border-radius: 11px;
|
|
48
52
|
}
|
|
49
53
|
.clado-brand-choice[aria-pressed="true"] { font-weight: 600; }
|
|
50
54
|
.clado-brand-choice svg {
|
|
@@ -57,9 +61,9 @@
|
|
|
57
61
|
stroke-linecap: round;
|
|
58
62
|
stroke-linejoin: round;
|
|
59
63
|
}
|
|
60
|
-
.clado-brand-check { visibility: hidden; }
|
|
64
|
+
.clado-brand-check { visibility: hidden; color: var(--clado-ui-brand); }
|
|
61
65
|
.clado-brand-choice[aria-pressed="true"] .clado-brand-check { visibility: visible; }
|
|
62
|
-
.clado-brand-check svg { width: 14px; height: 14px; }
|
|
66
|
+
.clado-brand-check svg { width: 14px; height: 14px; stroke-width: 2.2; }
|
|
63
67
|
.clado-brand-capture {
|
|
64
68
|
margin-block-start: 3px;
|
|
65
69
|
grid-template-columns: 16px 1fr;
|
|
@@ -5,21 +5,61 @@
|
|
|
5
5
|
#currentFileName { min-width: 0; padding-inline-start: 8px; border-inline-start: 1px solid var(--clado-ui-edge); color: var(--clado-ui-muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
|
|
6
6
|
.directory-toggle[data-sync="error"] #fileCount { color: #a45900; }
|
|
7
7
|
[data-theme="dark"] .directory-toggle[data-sync="error"] #fileCount { color: #f1ba73; }
|
|
8
|
-
#directory { position: absolute; left: 0; bottom: calc(100% + 8px); width: min(308px, calc(100vw - 32px)); }
|
|
9
|
-
.directory-scroll { max-height: calc(100dvh - 94px); overflow: auto; border-radius: inherit; padding:
|
|
10
|
-
.directory-
|
|
8
|
+
#directory { position: absolute; left: 0; bottom: calc(100% + 8px); width: min(308px, calc(100vw - 32px)); border-radius: 20px; }
|
|
9
|
+
.directory-scroll { max-height: calc(100dvh - 94px); overflow: auto; border-radius: inherit; padding: 13px 10px 10px; }
|
|
10
|
+
.directory-scroll::-webkit-scrollbar { width: 4px; }
|
|
11
|
+
.directory-scroll::-webkit-scrollbar-thumb { background: rgb(120 130 150 / .24); border-radius: 99px; }
|
|
12
|
+
.directory-heading { padding: 0 8px 10px; }
|
|
13
|
+
.directory-heading strong { font-size: 12.5px; font-weight: 650; color: var(--clado-ui-text); }
|
|
14
|
+
.directory-heading span { display: block; font-size: 10px; color: var(--clado-ui-muted); margin-top: 4px; }
|
|
15
|
+
#documentList { display: flex; flex-direction: column; gap: 3px; }
|
|
16
|
+
.document-button {
|
|
17
|
+
position: relative;
|
|
18
|
+
display: block;
|
|
19
|
+
text-align: left;
|
|
20
|
+
padding: 9px 10px 9px 16px;
|
|
21
|
+
white-space: normal;
|
|
22
|
+
width: 100%;
|
|
23
|
+
border-radius: 11px;
|
|
24
|
+
color: var(--clado-ui-text);
|
|
25
|
+
}
|
|
26
|
+
.document-button::before {
|
|
27
|
+
content: "";
|
|
28
|
+
position: absolute;
|
|
29
|
+
left: 6px;
|
|
30
|
+
top: 50%;
|
|
31
|
+
transform: translateY(-50%);
|
|
32
|
+
width: 3px;
|
|
33
|
+
height: 16px;
|
|
34
|
+
border-radius: 99px;
|
|
35
|
+
background: transparent;
|
|
36
|
+
transition: background 150ms ease;
|
|
37
|
+
}
|
|
38
|
+
.document-button[aria-current="page"]::before {
|
|
39
|
+
background: var(--clado-ui-brand);
|
|
40
|
+
}
|
|
41
|
+
.document-button strong { font-size: 12.5px; font-weight: 500; display: block; color: var(--clado-ui-text); }
|
|
42
|
+
.document-button small { font-size: 10.5px; color: var(--clado-ui-subtle); display: block; margin-top: 2px; overflow-wrap: anywhere; }
|
|
11
43
|
.document-button[aria-current="page"] strong {
|
|
12
|
-
color: var(--clado-ui-
|
|
13
|
-
font-weight:
|
|
44
|
+
color: var(--clado-ui-text);
|
|
45
|
+
font-weight: 620;
|
|
14
46
|
}
|
|
47
|
+
.directory-current { padding: 10px 8px 8px; margin-top: 10px; border-top: 1px solid var(--clado-ui-edge); }
|
|
48
|
+
.directory-current strong { font-size: 10px; font-weight: 500; display: block; color: var(--clado-ui-muted); }
|
|
49
|
+
.directory-current span { display: block; color: var(--clado-ui-subtle); font-size: 10.5px; margin-top: 2px; overflow-wrap: anywhere; }
|
|
50
|
+
.directory-actions { display: flex; gap: 4px; padding: 0 4px; }
|
|
51
|
+
.directory-actions button { min-height: 28px; font-size: 11.5px; padding: 4px 8px; border-radius: 9px; }
|
|
52
|
+
.directory-actions #sourceButton { margin-left: auto; }
|
|
53
|
+
.skipped { margin-top: 10px; border: 0; border-top: 1px solid var(--clado-ui-edge); border-radius: 0; width: 100%; text-align: left; padding: 11px 10px 2px; font-size: 10.5px; color: var(--clado-ui-muted); white-space: normal; }
|
|
15
54
|
|
|
16
|
-
.sync-error{color
|
|
55
|
+
.sync-error { color: #b88628 !important; }
|
|
56
|
+
.sync-good:before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #10b981; vertical-align: middle; margin-right: 6px; }
|
|
17
57
|
.clado-directory-plugin dialog {
|
|
18
58
|
position: fixed;
|
|
19
59
|
width: min(660px, calc(100vw - 32px));
|
|
20
60
|
max-height: calc(100vh - 36px);
|
|
21
|
-
border: 1px solid var(--
|
|
22
|
-
border-radius:
|
|
61
|
+
border: 1px solid var(--clado-ui-glass-outline);
|
|
62
|
+
border-radius: 20px;
|
|
23
63
|
padding: 0;
|
|
24
64
|
}
|
|
25
65
|
.clado-directory-plugin dialog > header {
|
|
@@ -27,7 +67,7 @@
|
|
|
27
67
|
align-items: center;
|
|
28
68
|
gap: 12px;
|
|
29
69
|
padding: 15px 20px;
|
|
30
|
-
border-bottom: 1px solid var(--
|
|
70
|
+
border-bottom: 1px solid var(--clado-ui-edge);
|
|
31
71
|
}
|
|
32
72
|
.clado-directory-plugin dialog > header strong { font-size: 13px; font-weight: 600; }
|
|
33
73
|
.clado-directory-plugin dialog > header button {
|
|
@@ -37,42 +77,72 @@
|
|
|
37
77
|
border: 0;
|
|
38
78
|
}
|
|
39
79
|
#detailsBody { padding: 18px 20px; max-height: calc(100vh - 130px); overflow: auto; }
|
|
40
|
-
#detailsBody p { font-size:
|
|
80
|
+
#detailsBody p { font-size: 11.5px; color: var(--clado-ui-muted); line-height: 1.8; margin: 0 0 14px; }
|
|
41
81
|
#detailsBody pre {
|
|
42
|
-
font:
|
|
82
|
+
font: 11.5px/1.9 ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
43
83
|
white-space: pre-wrap;
|
|
44
84
|
overflow-wrap: anywhere;
|
|
45
85
|
margin: 0;
|
|
46
86
|
}
|
|
47
|
-
.skip-item{padding:10px 0;border-bottom:1px solid var(--
|
|
48
|
-
.
|
|
49
|
-
|
|
50
|
-
.
|
|
51
|
-
.directory-
|
|
52
|
-
.directory-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
87
|
+
.skip-item { padding: 10px 0; border-bottom: 1px solid var(--clado-ui-edge); }
|
|
88
|
+
.skip-item strong { font-size: 12px; }
|
|
89
|
+
.skip-item p { margin: 5px 0 !important; }
|
|
90
|
+
.skip-item code { font-size: 10.5px; }
|
|
91
|
+
.directory-search { display: block; padding: 0 4px 10px; }
|
|
92
|
+
.directory-search input {
|
|
93
|
+
box-sizing: border-box;
|
|
94
|
+
width: 100%;
|
|
95
|
+
border: 1px solid var(--clado-ui-well-border);
|
|
96
|
+
border-radius: 11px;
|
|
97
|
+
background: var(--clado-ui-well);
|
|
98
|
+
color: var(--clado-ui-text);
|
|
99
|
+
font: inherit;
|
|
100
|
+
font-size: 12.5px;
|
|
101
|
+
padding: 7px 11px;
|
|
102
|
+
outline: none;
|
|
103
|
+
box-shadow: inset 0 1px 0 rgb(255 255 255 / .40);
|
|
104
|
+
transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
|
|
105
|
+
}
|
|
106
|
+
[data-theme="dark"] .directory-search input {
|
|
107
|
+
box-shadow: inset 0 1px 0 rgb(255 255 255 / .06);
|
|
108
|
+
}
|
|
109
|
+
.directory-search input:focus {
|
|
110
|
+
background: var(--clado-ui-well-focus);
|
|
111
|
+
border-color: color-mix(in srgb, var(--clado-ui-brand) 48%, transparent);
|
|
112
|
+
box-shadow: 0 0 0 3px var(--clado-ui-brand-soft);
|
|
113
|
+
}
|
|
114
|
+
.tree-folder > summary { cursor: pointer; padding: 7px 8px; color: var(--clado-ui-text); font-size: 12px; font-weight: 560; border-radius: 9px; }
|
|
115
|
+
.tree-folder > summary:hover { background: var(--clado-ui-hover); }
|
|
116
|
+
.tree-children { margin-left: 11px; padding-left: 5px; border-left: 1px solid var(--clado-ui-edge); }
|
|
117
|
+
.tree-empty { padding: 8px; color: var(--clado-ui-muted); font-size: 12px; }
|
|
118
|
+
#currentWorkspaceName { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-inline-end: 8px; border-inline-end: 1px solid var(--clado-ui-edge); color: var(--clado-ui-brand); font-size: 12px; font-weight: 600; }
|
|
119
|
+
.directory-workspaces { padding: 0 4px 10px; margin-bottom: 10px; border-bottom: 1px solid var(--clado-ui-edge); }
|
|
120
|
+
.directory-workspaces-title { font-size: 10.5px; font-weight: 600; color: var(--clado-ui-subtle); margin-bottom: 6px; padding-inline: 4px; }
|
|
121
|
+
.directory-workspace-list { display: flex; flex-direction: column; gap: 3px; max-height: 160px; overflow: auto; }
|
|
122
|
+
.workspace-row { display: flex; align-items: center; gap: 4px; }
|
|
123
|
+
.workspace-button { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px; text-align: left; font-size: 12px; border-radius: 10px; }
|
|
124
|
+
.workspace-button[aria-current="page"] { color: var(--clado-ui-text); font-weight: 600; }
|
|
125
|
+
.workspace-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
126
|
+
.workspace-button small { flex: none; font-size: 10.5px; color: var(--clado-ui-subtle); }
|
|
127
|
+
.workspace-open-tab { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; padding: 0; font-size: 11px; text-decoration: none; color: var(--clado-ui-muted); border-radius: 8px; }
|
|
128
|
+
.workspace-open-tab:hover { color: var(--clado-ui-text); background: var(--clado-ui-hover); }
|
|
60
129
|
@media (max-width: 680px) {
|
|
61
130
|
.directory-toggle { max-width: calc(100vw - 116px); height: 42px; padding: 7px 11px; }
|
|
62
131
|
#currentWorkspaceName { max-width: 72px; }
|
|
63
132
|
#directory {
|
|
64
133
|
position: fixed;
|
|
65
|
-
left:
|
|
66
|
-
right:
|
|
67
|
-
bottom:
|
|
68
|
-
width:
|
|
69
|
-
max-width:
|
|
70
|
-
|
|
134
|
+
left: 10px;
|
|
135
|
+
right: 10px;
|
|
136
|
+
bottom: max(10px, env(safe-area-inset-bottom));
|
|
137
|
+
width: auto;
|
|
138
|
+
max-width: 440px;
|
|
139
|
+
margin: 0 auto;
|
|
140
|
+
border-radius: 26px;
|
|
71
141
|
z-index: 29;
|
|
72
142
|
}
|
|
73
143
|
.directory-scroll {
|
|
74
|
-
max-height:
|
|
75
|
-
padding:
|
|
144
|
+
max-height: 70dvh;
|
|
145
|
+
padding: 14px 12px 14px;
|
|
76
146
|
}
|
|
77
147
|
.directory-scroll::before {
|
|
78
148
|
content: "";
|
|
@@ -81,16 +151,16 @@
|
|
|
81
151
|
height: 4px;
|
|
82
152
|
border-radius: 99px;
|
|
83
153
|
background: var(--clado-ui-edge);
|
|
84
|
-
margin: -
|
|
154
|
+
margin: -4px auto 10px;
|
|
85
155
|
}
|
|
86
|
-
.document-button { min-height: 44px; padding: 10px 12px; }
|
|
156
|
+
.document-button { min-height: 44px; padding: 10px 12px 10px 18px; }
|
|
87
157
|
.directory-search input { font-size: 16px; min-height: 40px; }
|
|
88
158
|
.clado-directory-plugin dialog {
|
|
89
|
-
inset: auto
|
|
90
|
-
margin: 0;
|
|
91
|
-
width:
|
|
92
|
-
max-width:
|
|
93
|
-
max-height:
|
|
94
|
-
border-radius:
|
|
159
|
+
inset: auto 10px max(10px, env(safe-area-inset-bottom)) 10px;
|
|
160
|
+
margin: 0 auto;
|
|
161
|
+
width: auto;
|
|
162
|
+
max-width: 440px;
|
|
163
|
+
max-height: 80dvh;
|
|
164
|
+
border-radius: 24px;
|
|
95
165
|
}
|
|
96
166
|
}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
padding-inline: 14px;
|
|
14
14
|
background: transparent;
|
|
15
15
|
border-color: transparent;
|
|
16
|
+
box-shadow: none;
|
|
16
17
|
border-radius: calc(var(--clado-ui-radius) - 5px);
|
|
17
18
|
}
|
|
18
19
|
.clado-view-modes .clado-ui-button:hover:where(:not(:disabled):not([aria-pressed="true"])) {
|
|
@@ -27,17 +28,13 @@
|
|
|
27
28
|
inset: 0 auto 0 0;
|
|
28
29
|
width: calc(100% / 3);
|
|
29
30
|
border-radius: calc(var(--clado-ui-radius) - 5px);
|
|
30
|
-
border: 1px solid
|
|
31
|
-
background:
|
|
32
|
-
box-shadow:
|
|
31
|
+
border: 1px solid var(--clado-ui-glass-outline);
|
|
32
|
+
background: var(--clado-ui-active);
|
|
33
|
+
box-shadow: var(--clado-ui-active-shadow);
|
|
33
34
|
transform: translateX(calc(var(--clado-view-index, 0) * 100%));
|
|
34
35
|
transition: transform 220ms cubic-bezier(.22,.75,.24,1);
|
|
35
36
|
pointer-events: none;
|
|
36
37
|
}
|
|
37
|
-
[data-theme="dark"] .clado-view-thumb {
|
|
38
|
-
border-color: rgb(255 255 255 / .22);
|
|
39
|
-
background: rgb(255 255 255 / .11);
|
|
40
|
-
}
|
|
41
38
|
@media (prefers-reduced-motion: reduce) {
|
|
42
39
|
.clado-view-thumb { transition: none; }
|
|
43
40
|
}
|