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/plugins/brand/index.js
CHANGED
|
@@ -126,9 +126,20 @@
|
|
|
126
126
|
function mountBrand(host, { setTheme, capture, plugins }) {
|
|
127
127
|
const brand = document.createElement('div');
|
|
128
128
|
brand.className = 'clado-brand-plugin';
|
|
129
|
+
const brandLogo = '<svg viewBox="0 0 64 64" fill="none" aria-hidden="true">' +
|
|
130
|
+
'<defs>' +
|
|
131
|
+
'<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>' +
|
|
132
|
+
'<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>' +
|
|
133
|
+
'</defs>' +
|
|
134
|
+
'<rect x="4" y="4" width="56" height="56" rx="16" fill="url(#cladoLogoBg)"/>' +
|
|
135
|
+
'<rect x="4.5" y="4.5" width="55" height="55" rx="15.5" stroke="rgba(255,255,255,0.14)"/>' +
|
|
136
|
+
'<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"/>' +
|
|
137
|
+
'<circle cx="43.5" cy="32" r="3" fill="#60a5fa"/>' +
|
|
138
|
+
'<rect x="12" y="57.2" width="40" height="2.4" rx="1.2" fill="url(#cladoLogoAura)"/>' +
|
|
139
|
+
'</svg>';
|
|
129
140
|
brand.innerHTML = `
|
|
130
141
|
<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"
|
|
142
|
+
<span class="clado-brand-mark" aria-hidden="true">${brandLogo}</span><strong>clado</strong>
|
|
132
143
|
</button>
|
|
133
144
|
<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
145
|
<p id="clado-brand-settings-title">设置</p>
|
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
|
}
|
package/src/html/page.js
CHANGED
|
@@ -109,6 +109,7 @@ export function renderHtml(doc, diagnostics = [], options = {}) {
|
|
|
109
109
|
<meta charset="utf-8">
|
|
110
110
|
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
|
111
111
|
<title>${escapeHtml(title)}</title>
|
|
112
|
+
<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">
|
|
112
113
|
<meta name="generator" content="clado ${escapeHtml(version)}">
|
|
113
114
|
<style>
|
|
114
115
|
${vendorCss()}
|
package/src/html/plugin-ui.css
CHANGED
|
@@ -1,48 +1,70 @@
|
|
|
1
1
|
:root {
|
|
2
|
-
--clado-ui-text: #
|
|
3
|
-
--clado-ui-muted: #
|
|
4
|
-
--clado-ui-
|
|
5
|
-
--clado-ui-
|
|
6
|
-
--clado-ui-
|
|
7
|
-
--clado-ui-
|
|
8
|
-
--clado-ui-
|
|
9
|
-
--clado-ui-
|
|
10
|
-
--clado-ui-
|
|
11
|
-
--clado-ui-
|
|
12
|
-
--clado-ui-
|
|
13
|
-
--clado-ui-
|
|
14
|
-
--clado-ui-
|
|
15
|
-
--clado-ui-
|
|
16
|
-
--clado-ui-
|
|
2
|
+
--clado-ui-text: #14171f;
|
|
3
|
+
--clado-ui-muted: #5a6273;
|
|
4
|
+
--clado-ui-subtle: #8790a2;
|
|
5
|
+
--clado-ui-accent: #181a20;
|
|
6
|
+
--clado-ui-brand: #2563eb;
|
|
7
|
+
--clado-ui-brand-soft: rgb(37 99 235 / .11);
|
|
8
|
+
--clado-ui-surface: rgb(255 255 255 / .30);
|
|
9
|
+
--clado-ui-panel-surface: rgb(255 255 255 / .30);
|
|
10
|
+
--clado-ui-well: rgb(255 255 255 / .18);
|
|
11
|
+
--clado-ui-well-border: rgb(255 255 255 / .58);
|
|
12
|
+
--clado-ui-well-focus: rgb(255 255 255 / .38);
|
|
13
|
+
--clado-ui-track: rgb(255 255 255 / .14);
|
|
14
|
+
--clado-ui-hover: rgb(255 255 255 / .26);
|
|
15
|
+
--clado-ui-hover-border: rgb(255 255 255 / .64);
|
|
16
|
+
--clado-ui-active: rgb(255 255 255 / .40);
|
|
17
|
+
--clado-ui-active-shadow: 0 2px 10px rgb(15 23 42 / .08), 0 .5px 1px rgb(15 23 42 / .05), inset 0 1px 0 rgb(255 255 255 / .92);
|
|
18
|
+
--clado-ui-popover: rgb(255 255 255 / .84);
|
|
19
|
+
--clado-ui-solid: #f8f9fc;
|
|
20
|
+
--clado-ui-edge: rgb(15 23 42 / .09);
|
|
21
|
+
--clado-ui-highlight: rgb(255 255 255 / .94);
|
|
22
|
+
--clado-ui-rim: rgb(255 255 255 / .46);
|
|
23
|
+
--clado-ui-shadow: 0 10px 30px rgb(15 23 42 / .10), 0 2px 6px rgb(15 23 42 / .05);
|
|
24
|
+
--clado-ui-glass-outline: rgb(255 255 255 / .78);
|
|
25
|
+
--clado-ui-glass-outer: rgb(15 23 42 / .08);
|
|
26
|
+
--clado-ui-glass-shadow: 0 18px 48px rgb(15 23 42 / .12), 0 3px 12px rgb(15 23 42 / .05), 0 0 0 .5px var(--clado-ui-glass-outer), inset 0 1px 0 var(--clado-ui-highlight), inset 0 0 20px rgb(255 255 255 / .18);
|
|
27
|
+
--clado-ui-control-blur: 18px;
|
|
17
28
|
--clado-ui-panel-blur: 18px;
|
|
18
29
|
--clado-ui-radius: 16px;
|
|
19
30
|
--clado-ui-gap: 8px;
|
|
20
31
|
}
|
|
21
32
|
:root[data-theme="dark"] {
|
|
22
33
|
color-scheme: dark;
|
|
23
|
-
--clado-ui-text: #
|
|
24
|
-
--clado-ui-muted: #
|
|
25
|
-
--clado-ui-
|
|
26
|
-
--clado-ui-
|
|
27
|
-
--clado-ui-
|
|
28
|
-
--clado-ui-
|
|
29
|
-
--clado-ui-
|
|
30
|
-
--clado-ui-
|
|
31
|
-
--clado-ui-
|
|
32
|
-
--clado-ui-
|
|
33
|
-
--clado-ui-
|
|
34
|
-
--clado-ui-
|
|
35
|
-
--clado-ui-
|
|
36
|
-
--clado-ui-
|
|
37
|
-
--clado-ui-
|
|
38
|
-
--clado-ui-
|
|
34
|
+
--clado-ui-text: #f3f6fb;
|
|
35
|
+
--clado-ui-muted: #a4aec2;
|
|
36
|
+
--clado-ui-subtle: #78839a;
|
|
37
|
+
--clado-ui-accent: #f3f6fb;
|
|
38
|
+
--clado-ui-brand: #60a5fa;
|
|
39
|
+
--clado-ui-brand-soft: rgb(96 165 250 / .16);
|
|
40
|
+
--clado-ui-surface: rgb(18 22 32 / .34);
|
|
41
|
+
--clado-ui-panel-surface: rgb(18 22 32 / .34);
|
|
42
|
+
--clado-ui-well: rgb(255 255 255 / .06);
|
|
43
|
+
--clado-ui-well-border: rgb(255 255 255 / .14);
|
|
44
|
+
--clado-ui-well-focus: rgb(255 255 255 / .11);
|
|
45
|
+
--clado-ui-track: rgb(255 255 255 / .05);
|
|
46
|
+
--clado-ui-hover: rgb(255 255 255 / .085);
|
|
47
|
+
--clado-ui-hover-border: rgb(255 255 255 / .15);
|
|
48
|
+
--clado-ui-active: rgb(255 255 255 / .14);
|
|
49
|
+
--clado-ui-active-shadow: 0 2px 10px rgb(0 0 0 / .28), inset 0 1px 0 rgb(255 255 255 / .24);
|
|
50
|
+
--clado-ui-popover: rgb(22 27 40 / .88);
|
|
51
|
+
--clado-ui-solid: #181c26;
|
|
52
|
+
--clado-ui-edge: rgb(255 255 255 / .10);
|
|
53
|
+
--clado-ui-highlight: rgb(255 255 255 / .24);
|
|
54
|
+
--clado-ui-rim: rgb(255 255 255 / .12);
|
|
55
|
+
--clado-ui-shadow: 0 12px 34px rgb(0 0 0 / .44), 0 2px 8px rgb(0 0 0 / .24);
|
|
56
|
+
--clado-ui-glass-outline: rgb(255 255 255 / .18);
|
|
57
|
+
--clado-ui-glass-outer: rgb(0 0 0 / .46);
|
|
58
|
+
--clado-ui-glass-shadow: 0 22px 56px rgb(0 0 0 / .56), 0 4px 14px rgb(0 0 0 / .30), 0 0 0 .5px var(--clado-ui-glass-outer), inset 0 1px 0 var(--clado-ui-highlight), inset 0 0 20px rgb(255 255 255 / .04);
|
|
59
|
+
--clado-ui-control-blur: 18px;
|
|
60
|
+
--clado-ui-panel-blur: 18px;
|
|
39
61
|
}
|
|
40
62
|
.clado-plugin-slot {
|
|
41
63
|
position: fixed;
|
|
42
64
|
display: flex;
|
|
43
65
|
gap: var(--clado-ui-gap);
|
|
44
66
|
z-index: 18;
|
|
45
|
-
font: 13px/1.35 system-ui, sans-serif;
|
|
67
|
+
font: 13px/1.35 system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
|
|
46
68
|
pointer-events: none;
|
|
47
69
|
opacity: 1;
|
|
48
70
|
transform: none;
|
|
@@ -70,7 +92,6 @@
|
|
|
70
92
|
.clado-ui-glass {
|
|
71
93
|
--clado-ui-glass-fill: var(--clado-ui-surface);
|
|
72
94
|
--clado-ui-glass-blur: var(--clado-ui-control-blur);
|
|
73
|
-
--clado-ui-glass-feather: 3px;
|
|
74
95
|
color: var(--clado-ui-text);
|
|
75
96
|
background: var(--clado-ui-solid);
|
|
76
97
|
border: 1px solid var(--clado-ui-edge);
|
|
@@ -80,7 +101,7 @@
|
|
|
80
101
|
.clado-ui-glass.clado-ui-glass-panel {
|
|
81
102
|
--clado-ui-glass-fill: var(--clado-ui-panel-surface);
|
|
82
103
|
--clado-ui-glass-blur: var(--clado-ui-panel-blur);
|
|
83
|
-
|
|
104
|
+
border-radius: 20px;
|
|
84
105
|
}
|
|
85
106
|
.clado-ui-button {
|
|
86
107
|
appearance: none;
|
|
@@ -94,43 +115,58 @@
|
|
|
94
115
|
padding: 5px 10px;
|
|
95
116
|
cursor: pointer;
|
|
96
117
|
white-space: nowrap;
|
|
118
|
+
transition: background 150ms cubic-bezier(.22,.75,.24,1), border-color 150ms ease, color 150ms ease, box-shadow 150ms ease, transform 120ms ease;
|
|
97
119
|
}
|
|
98
|
-
.clado-ui-button:where(:
|
|
99
|
-
color: var(--clado-ui-
|
|
100
|
-
background: var(--clado-ui-
|
|
120
|
+
.clado-ui-button:hover:where(:not(:disabled)) {
|
|
121
|
+
color: var(--clado-ui-text);
|
|
122
|
+
background: var(--clado-ui-hover);
|
|
123
|
+
border-color: var(--clado-ui-hover-border);
|
|
101
124
|
}
|
|
102
|
-
.clado-ui-button:
|
|
103
|
-
|
|
125
|
+
.clado-ui-button:is([aria-pressed="true"], [aria-expanded="true"], [aria-current="page"]) {
|
|
126
|
+
color: var(--clado-ui-text);
|
|
127
|
+
background: var(--clado-ui-active);
|
|
128
|
+
border-color: var(--clado-ui-glass-outline);
|
|
129
|
+
box-shadow: var(--clado-ui-active-shadow);
|
|
130
|
+
}
|
|
131
|
+
.clado-ui-button.clado-ui-button-primary {
|
|
132
|
+
background: var(--clado-ui-accent);
|
|
133
|
+
border-color: transparent;
|
|
134
|
+
color: var(--clado-ui-solid);
|
|
135
|
+
font-weight: 600;
|
|
136
|
+
box-shadow: 0 2px 10px rgb(15 23 42 / .14);
|
|
137
|
+
}
|
|
138
|
+
.clado-ui-button.clado-ui-button-primary:hover:where(:not(:disabled)) {
|
|
139
|
+
opacity: .9;
|
|
140
|
+
background: var(--clado-ui-accent);
|
|
141
|
+
color: var(--clado-ui-solid);
|
|
142
|
+
border-color: transparent;
|
|
143
|
+
}
|
|
144
|
+
.clado-ui-button:focus-visible { outline: 2px solid var(--clado-ui-brand); outline-offset: 2px; }
|
|
145
|
+
.clado-ui-button:disabled { opacity: .48; cursor: default; }
|
|
104
146
|
.clado-ui-dialog {
|
|
105
147
|
--ink: var(--clado-ui-text);
|
|
106
148
|
--muted: var(--clado-ui-muted);
|
|
107
149
|
--line: var(--clado-ui-edge);
|
|
108
150
|
color: var(--clado-ui-text);
|
|
109
|
-
background:
|
|
110
|
-
backdrop-filter: blur(
|
|
111
|
-
-webkit-backdrop-filter: blur(
|
|
151
|
+
background: var(--clado-ui-popover);
|
|
152
|
+
backdrop-filter: blur(24px) saturate(185%);
|
|
153
|
+
-webkit-backdrop-filter: blur(24px) saturate(185%);
|
|
112
154
|
border: 1px solid var(--clado-ui-glass-outline);
|
|
113
|
-
border-radius:
|
|
114
|
-
box-shadow:
|
|
115
|
-
}
|
|
116
|
-
[data-theme="dark"] .clado-ui-dialog {
|
|
117
|
-
background: rgba(22, 27, 35, .88);
|
|
118
|
-
box-shadow: 0 16px 46px rgba(0, 0, 0, .48), inset 0 1px 0 rgba(255, 255, 255, .1);
|
|
155
|
+
border-radius: 20px;
|
|
156
|
+
box-shadow: var(--clado-ui-glass-shadow);
|
|
119
157
|
}
|
|
120
158
|
.clado-ui-dialog::backdrop {
|
|
121
159
|
background: rgba(15, 23, 42, .14);
|
|
122
|
-
backdrop-filter: blur(
|
|
160
|
+
backdrop-filter: blur(3px);
|
|
123
161
|
}
|
|
124
162
|
[data-theme="dark"] .clado-ui-dialog::backdrop {
|
|
125
|
-
background: rgba(0, 0, 0, .
|
|
163
|
+
background: rgba(0, 0, 0, .40);
|
|
126
164
|
}
|
|
127
165
|
.clado-ui-glass.clado-ui-button {
|
|
166
|
+
color: var(--clado-ui-text);
|
|
128
167
|
background-color: var(--clado-ui-solid);
|
|
129
168
|
border-color: var(--clado-ui-edge);
|
|
130
169
|
}
|
|
131
|
-
.clado-ui-glass.clado-ui-button:where(:hover:not(:disabled), [aria-expanded="true"], [aria-pressed="true"], [aria-current="page"], .clado-ui-button-primary) {
|
|
132
|
-
background-color: var(--clado-ui-active);
|
|
133
|
-
}
|
|
134
170
|
@supports (backdrop-filter: blur(1px)) {
|
|
135
171
|
@media (prefers-reduced-transparency: no-preference) {
|
|
136
172
|
.clado-ui-glass {
|
|
@@ -146,44 +182,20 @@
|
|
|
146
182
|
border-radius: inherit;
|
|
147
183
|
pointer-events: none;
|
|
148
184
|
background: var(--clado-ui-glass-fill);
|
|
149
|
-
backdrop-filter: blur(var(--clado-ui-glass-blur)) saturate(
|
|
150
|
-
-webkit-backdrop-filter: blur(var(--clado-ui-glass-blur)) saturate(
|
|
151
|
-
/* Retain enough blur at the edge to keep text behind the glass indistinct. */
|
|
152
|
-
mask-image:
|
|
153
|
-
linear-gradient(to right, rgb(0 0 0 / .95), #000 var(--clado-ui-glass-feather), #000 calc(100% - var(--clado-ui-glass-feather)), rgb(0 0 0 / .95)),
|
|
154
|
-
linear-gradient(to bottom, rgb(0 0 0 / .95), #000 var(--clado-ui-glass-feather), #000 calc(100% - var(--clado-ui-glass-feather)), rgb(0 0 0 / .95));
|
|
155
|
-
mask-composite: intersect;
|
|
156
|
-
}
|
|
157
|
-
.clado-ui-button, .clado-ui-glass.clado-ui-button {
|
|
158
|
-
--clado-ui-button-tint: 4%;
|
|
159
|
-
--clado-ui-button-outline: color-mix(in srgb, var(--clado-ui-edge) 36%, transparent);
|
|
160
|
-
background: color-mix(in srgb, var(--clado-ui-accent) var(--clado-ui-button-tint), transparent) padding-box;
|
|
161
|
-
border-color: var(--clado-ui-button-outline);
|
|
162
|
-
}
|
|
163
|
-
.clado-ui-button:hover:where(:not(:disabled)) {
|
|
164
|
-
--clado-ui-button-tint: 8%;
|
|
165
|
-
}
|
|
166
|
-
.clado-ui-button:is([aria-expanded="true"], [aria-pressed="true"], [aria-current="page"], .clado-ui-button-primary) {
|
|
167
|
-
--clado-ui-button-tint: 12%;
|
|
168
|
-
--clado-ui-button-outline: color-mix(in srgb, var(--clado-ui-accent) 16%, transparent);
|
|
185
|
+
backdrop-filter: blur(var(--clado-ui-glass-blur)) saturate(205%);
|
|
186
|
+
-webkit-backdrop-filter: blur(var(--clado-ui-glass-blur)) saturate(205%);
|
|
169
187
|
}
|
|
170
188
|
.clado-ui-glass.clado-ui-button {
|
|
189
|
+
background: transparent;
|
|
171
190
|
border-color: var(--clado-ui-glass-outline);
|
|
191
|
+
box-shadow: var(--clado-ui-glass-shadow);
|
|
172
192
|
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
inset: -1px;
|
|
180
|
-
padding: 1px;
|
|
181
|
-
border-radius: inherit;
|
|
182
|
-
pointer-events: none;
|
|
183
|
-
background: linear-gradient(146deg, var(--clado-ui-highlight), transparent 32% 58%, var(--clado-ui-rim));
|
|
184
|
-
mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
|
|
185
|
-
mask-composite: exclude;
|
|
186
|
-
}
|
|
193
|
+
.clado-ui-glass.clado-ui-button:hover:where(:not(:disabled)),
|
|
194
|
+
.clado-ui-glass.clado-ui-button:is([aria-expanded="true"], [aria-pressed="true"], [aria-current="page"]) {
|
|
195
|
+
--clado-ui-glass-fill: var(--clado-ui-active);
|
|
196
|
+
background: transparent;
|
|
197
|
+
border-color: var(--clado-ui-glass-outline);
|
|
198
|
+
box-shadow: var(--clado-ui-glass-shadow);
|
|
187
199
|
}
|
|
188
200
|
}
|
|
189
201
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
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="stylesheet" href="library.css"><!--CLADO-PLUGIN-STYLES--></head>
|
|
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>
|
|
4
4
|
<body>
|
|
5
5
|
<div class="viewer">
|
|
6
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>
|