cladogram 0.5.5-beta.9 → 0.6.0-beta.1

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.
@@ -1,11 +1,396 @@
1
- :root{color-scheme:light;--panel:#fff;--bg:#fafafc;--ink:#18181b;--muted:#71717a;--line:rgba(15,23,42,.09);--accent:#2563eb;--soft:rgba(37,99,235,.09);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;font-size:12px}
2
- *{box-sizing:border-box}body{margin:0;height:100dvh;overflow:hidden;color:var(--ink);background:var(--panel)}
3
- .viewer,.viewer main{position:absolute;inset:0}iframe{height:100%;width:100%;display:block;border:0}
4
- .canvas-loading{position:absolute;inset:0;background:var(--panel);color:var(--muted);display:grid;place-items:center;font-size:12px;z-index:2}.canvas-loading[hidden],#directory[hidden],.update-error[hidden],.empty-state[hidden],.skipped[hidden]{display:none}.update-error{position:absolute;top:60px;left:16px;right:16px;z-index:5;background:#fff6dd;color:#896213;border:1px solid #ecd9a6;border-radius:7px;padding:10px 13px;font-size:11px;box-shadow:0 3px 12px #0001}.empty-state{position:absolute;inset:0;background:var(--panel);padding:70px 35px;text-align:center}.empty-state h1{font-size:17px;font-weight:550}.empty-state p{font-size:12px;line-height:1.9;color:var(--muted);max-width:360px;margin:15px auto}
5
- [data-theme="dark"]{color-scheme:dark;--panel:#161b22;--bg:#0f1217;--ink:#f1f5f9;--muted:#a1a1aa;--line:rgba(255,255,255,.1);--soft:rgba(96,165,250,.15)}
6
- .empty-workspaces{margin:24px auto 0;max-width:460px;display:flex;flex-direction:column;gap:8px;text-align:left}
7
- .empty-workspaces-title{font-size:11px;color:var(--muted);font-weight:600}
8
- .empty-workspace-card{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 14px;border:1px solid var(--line);border-radius:10px;background:var(--bg);color:var(--ink);text-decoration:none;font-size:12px}
9
- .empty-workspace-card:hover{border-color:var(--accent)}
10
- .empty-workspace-card small{color:var(--muted);font-size:11px;flex:none}
11
- [hidden]{display:none!important}
1
+ :root {
2
+ color-scheme: light;
3
+ --panel: #f6f8fc;
4
+ --bg: #f6f8fc;
5
+ --ink: #161b26;
6
+ --muted: #64748b;
7
+ --line: rgba(15, 23, 42, 0.075);
8
+ --accent: #0284c7;
9
+ --soft: rgba(56, 189, 248, 0.14);
10
+ font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
11
+ font-size: 13px;
12
+ }
13
+ [data-theme="dark"] {
14
+ color-scheme: dark;
15
+ --panel: #0b0f18;
16
+ --bg: #0b0f18;
17
+ --ink: #f1f5f9;
18
+ --muted: #94a3b8;
19
+ --line: rgba(255, 255, 255, 0.09);
20
+ --soft: rgba(56, 189, 248, 0.18);
21
+ }
22
+
23
+ * { box-sizing: border-box; }
24
+ html, body {
25
+ margin: 0;
26
+ width: 100%;
27
+ height: 100%;
28
+ overflow: hidden;
29
+ color: var(--ink);
30
+ background: var(--bg);
31
+ -webkit-font-smoothing: antialiased;
32
+ }
33
+
34
+ /* ============ Scalable Desktop Stage (Zero-squish on mobile!) ============ */
35
+ #clado-viewport {
36
+ position: fixed;
37
+ inset: 0;
38
+ overflow: hidden;
39
+ background-color: var(--clado-ui-canvas-bg, var(--bg));
40
+ background-image: radial-gradient(var(--clado-ui-dot-color, rgba(148, 163, 184, 0.30)) 1.15px, transparent 1.15px);
41
+ background-size: 22px 22px;
42
+ touch-action: none;
43
+ }
44
+ #clado-stage {
45
+ position: absolute;
46
+ top: 0;
47
+ left: 0;
48
+ width: 100%;
49
+ height: 100%;
50
+ transform-origin: 0 0;
51
+ overflow: hidden;
52
+ }
53
+ #clado-viewport.scaled-mode #clado-stage {
54
+ width: 1280px;
55
+ height: 820px;
56
+ border-radius: 20px;
57
+ background-color: var(--clado-ui-canvas-bg, var(--bg));
58
+ background-image: radial-gradient(var(--clado-ui-dot-color, rgba(148, 163, 184, 0.30)) 1.15px, transparent 1.15px);
59
+ background-size: 22px 22px;
60
+ box-shadow: 0 22px 72px rgba(15, 23, 42, 0.10), 0 0 0 1px var(--line);
61
+ }
62
+
63
+ /* Ethereal ambient light refraction layer behind frosted glass */
64
+ .clado-ambient-light {
65
+ position: absolute;
66
+ inset: 0;
67
+ pointer-events: none;
68
+ overflow: hidden;
69
+ z-index: 0;
70
+ }
71
+ .clado-ambient-blob {
72
+ position: absolute;
73
+ border-radius: 50%;
74
+ filter: blur(76px);
75
+ opacity: 0.42;
76
+ }
77
+ [data-theme="dark"] .clado-ambient-blob { opacity: 0.22; }
78
+ .clado-ambient-blob.b1 {
79
+ width: 520px; height: 420px; top: -120px; right: 6%;
80
+ background: radial-gradient(circle, rgba(125, 211, 252, 0.42), rgba(196, 181, 253, 0.22) 55%, transparent 75%);
81
+ }
82
+ .clado-ambient-blob.b2 {
83
+ width: 540px; height: 440px; bottom: -140px; left: 10%;
84
+ background: radial-gradient(circle, rgba(167, 243, 208, 0.34), rgba(186, 230, 253, 0.22) 55%, transparent 75%);
85
+ }
86
+ .clado-ambient-blob.b3 {
87
+ width: 460px; height: 380px; bottom: -100px; right: 12%;
88
+ background: radial-gradient(circle, rgba(253, 186, 116, 0.30), rgba(244, 114, 182, 0.18) 55%, transparent 75%);
89
+ }
90
+
91
+ /* Mobile Zoom HUD */
92
+ .clado-mobile-zoom-hud {
93
+ position: fixed;
94
+ left: 50%;
95
+ bottom: max(14px, env(safe-area-inset-bottom));
96
+ transform: translateX(-50%);
97
+ z-index: 200;
98
+ display: none;
99
+ align-items: center;
100
+ gap: 4px;
101
+ padding: 4px 6px;
102
+ border-radius: 999px;
103
+ background: var(--clado-ui-popover, rgba(255, 255, 255, 0.86));
104
+ backdrop-filter: blur(20px) saturate(185%);
105
+ -webkit-backdrop-filter: blur(20px) saturate(185%);
106
+ border: 1px solid var(--clado-ui-glass-outline, rgba(255, 255, 255, 0.88));
107
+ box-shadow: var(--clado-ui-shadow);
108
+ font-size: 12px;
109
+ color: var(--ink);
110
+ }
111
+ #clado-viewport.scaled-mode .clado-mobile-zoom-hud { display: flex; }
112
+ .clado-mz-btn {
113
+ border: 0;
114
+ background: transparent;
115
+ color: var(--ink);
116
+ padding: 4px 9px;
117
+ border-radius: 999px;
118
+ font: inherit;
119
+ font-weight: 560;
120
+ cursor: pointer;
121
+ }
122
+ .clado-mz-hint {
123
+ font-size: 11px;
124
+ color: var(--muted);
125
+ padding: 0 6px;
126
+ border-left: 1px solid var(--line);
127
+ white-space: nowrap;
128
+ }
129
+
130
+ .viewer, .viewer main { position: absolute; inset: 0; z-index: 1; }
131
+ iframe { height: 100%; width: 100%; display: block; border: 0; background: transparent; }
132
+
133
+ .canvas-loading {
134
+ position: absolute;
135
+ inset: 0;
136
+ background: transparent;
137
+ color: var(--muted);
138
+ display: grid;
139
+ place-items: center;
140
+ font-size: 13px;
141
+ z-index: 2;
142
+ }
143
+ .update-error {
144
+ position: absolute;
145
+ top: 64px;
146
+ left: 50%;
147
+ transform: translateX(-50%);
148
+ z-index: 35;
149
+ background: var(--clado-ui-decision-bg);
150
+ color: var(--ink);
151
+ border: 1px solid var(--clado-ui-decision-border);
152
+ border-radius: 14px;
153
+ padding: 10px 16px;
154
+ font-size: 12px;
155
+ box-shadow: var(--clado-ui-decision-shadow);
156
+ }
157
+
158
+ /* ============ View 1: Workspace Lobby (Liquid Crystal Glass) ============ */
159
+ .clado-lobby {
160
+ position: absolute;
161
+ inset: 0;
162
+ z-index: 55;
163
+ background-color: var(--clado-ui-canvas-bg, var(--bg));
164
+ background-image: radial-gradient(var(--clado-ui-dot-color, rgba(148, 163, 184, 0.30)) 1.15px, transparent 1.15px);
165
+ background-size: 22px 22px;
166
+ overflow-y: auto;
167
+ }
168
+ .clado-lobby-inner {
169
+ max-width: 1120px;
170
+ margin: 0 auto;
171
+ padding: 44px 52px 36px;
172
+ display: flex;
173
+ flex-direction: column;
174
+ position: relative;
175
+ z-index: 2;
176
+ }
177
+ .clado-lobby-head {
178
+ display: flex;
179
+ align-items: center;
180
+ justify-content: space-between;
181
+ gap: 16px;
182
+ padding-bottom: 28px;
183
+ }
184
+ .clado-brand-gem {
185
+ width: 38px;
186
+ height: 38px;
187
+ border-radius: 12px;
188
+ background: var(--clado-ui-popover);
189
+ border: 1px solid var(--clado-ui-glass-outline);
190
+ box-shadow: var(--clado-ui-shadow);
191
+ position: relative;
192
+ display: inline-flex;
193
+ align-items: center;
194
+ justify-content: center;
195
+ overflow: hidden;
196
+ flex: none;
197
+ }
198
+ .clado-brand-gem::before {
199
+ content: "";
200
+ position: absolute;
201
+ inset: 0;
202
+ background: radial-gradient(circle at 30% 25%, rgba(125, 211, 252, 0.32), rgba(167, 139, 250, 0.24) 60%, rgba(244, 114, 182, 0.16));
203
+ }
204
+ .clado-brand-gem svg { position: relative; z-index: 1; }
205
+
206
+ .clado-lobby-grid {
207
+ display: grid;
208
+ grid-template-columns: repeat(3, minmax(0, 1fr));
209
+ gap: 18px;
210
+ margin-top: 20px;
211
+ }
212
+ .clado-ws-card {
213
+ border-radius: 22px;
214
+ padding: 22px;
215
+ background: var(--clado-ui-surface);
216
+ backdrop-filter: blur(24px) saturate(190%) brightness(1.03);
217
+ -webkit-backdrop-filter: blur(24px) saturate(190%) brightness(1.03);
218
+ border: 1px solid var(--clado-ui-glass-outline);
219
+ box-shadow: var(--clado-ui-glass-shadow);
220
+ display: flex;
221
+ flex-direction: column;
222
+ justify-content: space-between;
223
+ gap: 18px;
224
+ cursor: pointer;
225
+ position: relative;
226
+ overflow: hidden;
227
+ text-align: left;
228
+ transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1), border-color 180ms ease, box-shadow 200ms ease;
229
+ }
230
+ .clado-ws-card::after {
231
+ content: "";
232
+ position: absolute;
233
+ left: 16%;
234
+ right: 16%;
235
+ bottom: -18px;
236
+ height: 36px;
237
+ border-radius: 50%;
238
+ background: radial-gradient(circle, rgba(56, 189, 248, 0.50), rgba(167, 139, 250, 0.32), transparent 72%);
239
+ filter: blur(18px);
240
+ opacity: 0;
241
+ transition: opacity 220ms ease;
242
+ pointer-events: none;
243
+ }
244
+ .clado-ws-card:hover {
245
+ transform: translateY(-3px);
246
+ border-color: var(--clado-ui-hover-border);
247
+ box-shadow: 0 24px 52px -14px rgba(56, 189, 248, 0.16), var(--clado-ui-glass-shadow);
248
+ }
249
+ .clado-ws-card:hover::after { opacity: 0.85; }
250
+ .clado-ws-mono {
251
+ width: 34px;
252
+ height: 34px;
253
+ border-radius: 11px;
254
+ background: var(--clado-ui-well);
255
+ border: 1px solid var(--clado-ui-well-border);
256
+ box-shadow: inset 0 1px 0 var(--clado-ui-highlight);
257
+ display: flex;
258
+ align-items: center;
259
+ justify-content: center;
260
+ font-size: 12px;
261
+ font-weight: 650;
262
+ color: var(--clado-ui-text-soft);
263
+ flex: none;
264
+ }
265
+
266
+ /* ============ View 2: Empty-Repo Code-Analysis Onboarding ============ */
267
+ .empty-state {
268
+ position: absolute;
269
+ inset: 0;
270
+ display: flex;
271
+ align-items: center;
272
+ justify-content: center;
273
+ padding: 64px 28px 28px;
274
+ background: transparent;
275
+ z-index: 12;
276
+ }
277
+ .clado-empty-card {
278
+ width: min(720px, calc(100% - 32px));
279
+ border-radius: 26px;
280
+ padding: 32px;
281
+ position: relative;
282
+ background: var(--clado-ui-surface);
283
+ backdrop-filter: blur(24px) saturate(190%) brightness(1.03);
284
+ -webkit-backdrop-filter: blur(24px) saturate(190%) brightness(1.03);
285
+ border: 1px solid var(--clado-ui-glass-outline);
286
+ box-shadow: var(--clado-ui-glass-shadow);
287
+ text-align: left;
288
+ }
289
+ .clado-prism-aura-under {
290
+ position: absolute;
291
+ left: 12%;
292
+ right: 12%;
293
+ bottom: -24px;
294
+ height: 46px;
295
+ border-radius: 999px;
296
+ background: linear-gradient(90deg, rgba(56, 189, 248, 0.58), rgba(167, 139, 250, 0.56), rgba(244, 114, 182, 0.44), rgba(251, 191, 36, 0.36));
297
+ filter: blur(28px);
298
+ opacity: 0.46;
299
+ pointer-events: none;
300
+ z-index: -1;
301
+ }
302
+ .clado-tpl-grid {
303
+ display: grid;
304
+ grid-template-columns: repeat(3, minmax(0, 1fr));
305
+ gap: 12px;
306
+ margin-top: 20px;
307
+ }
308
+ .clado-tpl-btn {
309
+ text-align: left;
310
+ border-radius: 17px;
311
+ padding: 16px;
312
+ cursor: pointer;
313
+ display: flex;
314
+ flex-direction: column;
315
+ gap: 8px;
316
+ background: var(--clado-ui-well);
317
+ border: 1px solid var(--clado-ui-well-border);
318
+ box-shadow: inset 0 1px 0 var(--clado-ui-highlight);
319
+ color: var(--ink);
320
+ font: inherit;
321
+ transition: all 170ms cubic-bezier(0.22, 1, 0.36, 1);
322
+ }
323
+ .clado-tpl-btn:hover {
324
+ background: var(--clado-ui-hover);
325
+ border-color: var(--clado-ui-hover-border);
326
+ transform: translateY(-2px);
327
+ }
328
+ .clado-tpl-btn.selected {
329
+ background: var(--clado-ui-prism-bg);
330
+ border-color: var(--clado-ui-prism-border);
331
+ box-shadow: var(--clado-ui-prism-shadow);
332
+ }
333
+
334
+ /* Toast */
335
+ .clado-toast {
336
+ position: absolute;
337
+ left: 50%;
338
+ bottom: 24px;
339
+ transform: translateX(-50%) translateY(10px);
340
+ z-index: 120;
341
+ padding: 8px 16px;
342
+ border-radius: 999px;
343
+ font-size: 12.5px;
344
+ font-weight: 540;
345
+ opacity: 0;
346
+ pointer-events: none;
347
+ display: inline-flex;
348
+ align-items: center;
349
+ gap: 8px;
350
+ background: var(--clado-ui-popover);
351
+ backdrop-filter: blur(22px) saturate(190%);
352
+ -webkit-backdrop-filter: blur(22px) saturate(190%);
353
+ border: 1px solid var(--clado-ui-glass-outline);
354
+ box-shadow: var(--clado-ui-shadow);
355
+ transition: all 180ms cubic-bezier(0.22, 1, 0.36, 1);
356
+ }
357
+ .clado-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
358
+
359
+ /* Folder Browser Modal inside #clado-stage */
360
+ .clado-folder-sheet {
361
+ width: min(520px, calc(100% - 32px));
362
+ border-radius: 24px;
363
+ padding: 20px;
364
+ background: var(--clado-ui-popover);
365
+ backdrop-filter: blur(28px) saturate(200%);
366
+ -webkit-backdrop-filter: blur(28px) saturate(200%);
367
+ border: 1px solid var(--clado-ui-glass-outline);
368
+ box-shadow: var(--clado-ui-glass-shadow);
369
+ display: flex;
370
+ flex-direction: column;
371
+ gap: 12px;
372
+ color: var(--ink);
373
+ }
374
+ .clado-folder-row {
375
+ appearance: none;
376
+ width: 100%;
377
+ border: 1px solid transparent;
378
+ background: transparent;
379
+ color: var(--ink);
380
+ border-radius: 11px;
381
+ padding: 8px 10px;
382
+ font: inherit;
383
+ font-size: 12.5px;
384
+ cursor: pointer;
385
+ display: flex;
386
+ align-items: center;
387
+ justify-content: space-between;
388
+ gap: 10px;
389
+ text-align: left;
390
+ }
391
+ .clado-folder-row:hover {
392
+ background: var(--clado-ui-hover);
393
+ border-color: var(--clado-ui-hover-border);
394
+ }
395
+
396
+ [hidden] { display: none !important; }
@@ -1,10 +1,43 @@
1
1
  <!doctype html>
2
2
  <html lang="zh-CN" data-theme="light">
3
- <head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover"><title>Clado · Markdown 目录预览</title><link rel="icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect x='2' y='2' width='60' height='60' rx='16' fill='%231c2028'/%3E%3Cpath 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' fill='none' stroke='%23fff' stroke-width='5.4' stroke-linecap='round'/%3E%3Ccircle cx='43.5' cy='32' r='3.2' fill='%2360a5fa'/%3E%3C/svg%3E"><link rel="stylesheet" href="library.css"><!--CLADO-PLUGIN-STYLES--></head>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=4,user-scalable=yes,viewport-fit=cover">
6
+ <title>Clado · 空间画布工作台</title>
7
+ <link rel="icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect x='2' y='2' width='60' height='60' rx='16' fill='%23eef4ff' stroke='%2393c5fd' stroke-width='2'/%3E%3Cpath 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' fill='none' stroke='%231e3a5f' stroke-width='5.2' stroke-linecap='round'/%3E%3Ccircle cx='43.5' cy='32' r='3.4' fill='%2338bdf8'/%3E%3C/svg%3E">
8
+ <link rel="stylesheet" href="library.css">
9
+ <!--CLADO-PLUGIN-STYLES-->
10
+ </head>
4
11
  <body>
5
- <div class="viewer">
6
- <main><div id="updateError" class="update-error" role="alert" hidden></div><iframe id="canvas" title="当前 Markdown 的卡片、脑图与文档"></iframe><div id="canvasLoading" class="canvas-loading">正在读取 Markdown…</div><div id="emptyState" class="empty-state" hidden><h1>目录中还没有可展示的画布</h1><p>让 AI 连接当前服务的 MCP,读取模板并创建 .mdc 文档,保存后会自动出现在这里。</p></div></main>
12
+ <div id="clado-viewport">
13
+ <div id="clado-stage">
14
+ <div class="clado-ambient-light" aria-hidden="true">
15
+ <div class="clado-ambient-blob b1"></div>
16
+ <div class="clado-ambient-blob b2"></div>
17
+ <div class="clado-ambient-blob b3"></div>
18
+ </div>
19
+
20
+ <div class="viewer">
21
+ <main>
22
+ <div id="updateError" class="update-error" role="alert" hidden></div>
23
+ <iframe id="canvas" title="当前 Markdown 的卡片、脑图与文档"></iframe>
24
+ <div id="canvasLoading" class="canvas-loading">正在读取画布…</div>
25
+ <div id="emptyState" class="empty-state" hidden><p>目录中还没有画布,可通过工作区引导分析代码或连接本地 MCP 创建。</p></div>
26
+ </main>
27
+ </div>
28
+
29
+ <section id="clado-lobby" class="clado-lobby" hidden aria-label="工作区大厅"></section>
30
+ <div id="clado-toast" class="clado-toast" role="status" aria-live="polite"></div>
31
+ </div>
32
+
33
+ <div id="clado-mobile-zoom-hud" class="clado-mobile-zoom-hud" aria-label="画布缩放控制">
34
+ <button type="button" class="clado-mz-btn" data-mz-out>−</button>
35
+ <button type="button" class="clado-mz-btn" data-mz-fit>适应</button>
36
+ <button type="button" class="clado-mz-btn" data-mz-in>+</button>
37
+ <span class="clado-mz-hint">双指缩放 / 拖拽</span>
38
+ </div>
7
39
  </div>
8
40
  <!--CLADO-PLUGIN-SCRIPTS-->
9
41
  <script src="library.js"></script>
10
- </body></html>
42
+ </body>
43
+ </html>