markloom 0.3.0
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 +125 -0
- package/dist/ai/index.cjs +19 -0
- package/dist/ai/index.d.cts +10 -0
- package/dist/ai/index.d.ts +10 -0
- package/dist/ai/index.js +19 -0
- package/dist/ai/theme.css +304 -0
- package/dist/chunk-2X6AF7XH.cjs +9030 -0
- package/dist/chunk-7Q6AXLF2.cjs +1076 -0
- package/dist/chunk-GUPMZI6Q.js +1076 -0
- package/dist/chunk-HA6XHJUD.cjs +218 -0
- package/dist/chunk-ITVAR2UM.js +218 -0
- package/dist/chunk-J3QWW6CN.js +2305 -0
- package/dist/chunk-UCNEQGMY.js +9030 -0
- package/dist/chunk-VVFIQLVR.cjs +2305 -0
- package/dist/comments-USjT1wYN.d.cts +105 -0
- package/dist/comments-USjT1wYN.d.ts +105 -0
- package/dist/controller-Dm4uLD3I.d.ts +507 -0
- package/dist/controller-cE9iEYp3.d.cts +507 -0
- package/dist/index.cjs +424 -0
- package/dist/index.d.cts +184 -0
- package/dist/index.d.ts +184 -0
- package/dist/index.js +424 -0
- package/dist/react/index.cjs +45 -0
- package/dist/react/index.d.cts +22 -0
- package/dist/react/index.d.ts +22 -0
- package/dist/react/index.js +45 -0
- package/dist/view/index.cjs +368 -0
- package/dist/view/index.d.cts +155 -0
- package/dist/view/index.d.ts +155 -0
- package/dist/view/index.js +368 -0
- package/dist/view/theme.css +2627 -0
- package/package.json +89 -0
|
@@ -0,0 +1,2627 @@
|
|
|
1
|
+
/* loom 默认主题 —— 无头编辑器的开箱即用皮肤。
|
|
2
|
+
消费者 import 'loom/view/theme.css' 即可,不想用可以不导入、自己写。
|
|
3
|
+
变量名与 docsite 同构:--text-a/b/c, --bg-page/side/hover/active。 */
|
|
4
|
+
|
|
5
|
+
/* 变量兜底(亮色)—— 未定义时用灰阶默认值 */
|
|
6
|
+
:root {
|
|
7
|
+
--text-a: rgba(0, 0, 0, 0.88);
|
|
8
|
+
--text-b: rgba(0, 0, 0, 0.6);
|
|
9
|
+
--text-c: rgba(0, 0, 0, 0.35);
|
|
10
|
+
--bg-page: #fff;
|
|
11
|
+
--bg-side: #f9f9f9;
|
|
12
|
+
--bg-hover: rgba(0, 0, 0, 0.06);
|
|
13
|
+
--bg-active: rgba(233, 233, 233, 1);
|
|
14
|
+
--loom-link: #3370ff;
|
|
15
|
+
--loom-link-hover: #245bdb;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/* 行内链接:可见 + 可点(打开逻辑在 editor.onClick) */
|
|
19
|
+
.loom-doc a[data-mark="link"],
|
|
20
|
+
.loom-doc a.loom-link {
|
|
21
|
+
color: var(--loom-link);
|
|
22
|
+
text-decoration: underline;
|
|
23
|
+
text-underline-offset: 2px;
|
|
24
|
+
text-decoration-thickness: 1px;
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
}
|
|
27
|
+
.loom-doc a[data-mark="link"]:hover,
|
|
28
|
+
.loom-doc a.loom-link:hover {
|
|
29
|
+
color: var(--loom-link-hover);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/* 暗色兜底 */
|
|
33
|
+
@media (prefers-color-scheme: dark) {
|
|
34
|
+
:root {
|
|
35
|
+
--text-a: rgba(255, 255, 255, 0.88);
|
|
36
|
+
--text-b: rgba(255, 255, 255, 0.6);
|
|
37
|
+
--text-c: rgba(255, 255, 255, 0.35);
|
|
38
|
+
--bg-page: #171717;
|
|
39
|
+
--bg-side: #212121;
|
|
40
|
+
--bg-hover: rgba(255, 255, 255, 0.08);
|
|
41
|
+
--bg-active: rgba(255, 255, 255, 0.12);
|
|
42
|
+
--loom-link: #7aafff;
|
|
43
|
+
--loom-link-hover: #9bc4ff;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* ─── 表格 ─── */
|
|
48
|
+
/* 横向滚动壳:列宽之和超容器时表格在壳内横滚,不把整页撑宽(飞书式)。
|
|
49
|
+
margin 移到壳上(原在 table),间距不变;data-pass 让 selection 穿透,table 仍是结构直接子。 */
|
|
50
|
+
.loom-table-scroll {
|
|
51
|
+
margin: 1rem 0;
|
|
52
|
+
max-width: 100%;
|
|
53
|
+
overflow-x: auto;
|
|
54
|
+
/* 网格线独立令牌:分隔线是「结构」;抄 note 的 border-black/10(暗 white/20);宿主可覆盖。 */
|
|
55
|
+
--loom-table-line: rgba(0, 0, 0, 0.1);
|
|
56
|
+
}
|
|
57
|
+
@media (prefers-color-scheme: dark) {
|
|
58
|
+
.loom-table-scroll { --loom-table-line: rgba(255, 255, 255, 0.2); }
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.loom-table {
|
|
62
|
+
margin: 0;
|
|
63
|
+
border-radius: 4px;
|
|
64
|
+
border: 1px solid var(--loom-table-line);
|
|
65
|
+
overflow: hidden;
|
|
66
|
+
/* separate(非 collapse):collapse 会让引擎忽略 border-radius,圆角失效;
|
|
67
|
+
separate + border-spacing:0 让 overflow:hidden 能裁出真圆角。格只挂 right+bottom 边、
|
|
68
|
+
表挂外框,分隔线仍各画一次不重叠。 */
|
|
69
|
+
border-collapse: separate;
|
|
70
|
+
border-spacing: 0;
|
|
71
|
+
table-layout: fixed; /* colgroup>col 的 px 宽精确生效——不拉伸,colWidths 即真实列宽 */
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.loom-cell {
|
|
75
|
+
padding: 0.5rem 0.75rem;
|
|
76
|
+
font-size: 14px;
|
|
77
|
+
line-height: 1.5;
|
|
78
|
+
color: var(--text-a);
|
|
79
|
+
background-color: var(--bg-page);
|
|
80
|
+
border-right: 1px solid var(--loom-table-line);
|
|
81
|
+
border-bottom: 1px solid var(--loom-table-line);
|
|
82
|
+
outline: none;
|
|
83
|
+
vertical-align: top;
|
|
84
|
+
transition: background-color 0.12s;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* 表头(首行 th)——飞书式:浅灰底 + 半粗,与体行区隔。左对齐默认。
|
|
88
|
+
不复用 --bg-side(#f9f9f9 压在 #fff 上仅差 6 阶,表头几乎看不出),改用 rgba 叠色——
|
|
89
|
+
两种配色都成立(亮色压深一点、暗色提亮一点),视觉权重 = 语义权重。 */
|
|
90
|
+
.loom-table thead .loom-cell {
|
|
91
|
+
background-color: rgba(0, 0, 0, 0.035);
|
|
92
|
+
font-weight: 600;
|
|
93
|
+
color: var(--text-a);
|
|
94
|
+
text-align: left;
|
|
95
|
+
}
|
|
96
|
+
@media (prefers-color-scheme: dark) {
|
|
97
|
+
.loom-table thead .loom-cell {
|
|
98
|
+
background-color: rgba(255, 255, 255, 0.05);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* 最后一列/最后一行去掉重复边框(外框已由 .loom-table border 提供) */
|
|
103
|
+
.loom-table tr > .loom-cell:last-child {
|
|
104
|
+
border-right: none;
|
|
105
|
+
}
|
|
106
|
+
.loom-table tbody tr:last-child > .loom-cell {
|
|
107
|
+
border-bottom: none;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/* 格内替换元素受格宽约束:table-layout:fixed 下,img 以自然宽渲染会溢出格边界。
|
|
111
|
+
max-width:100% 把它压回格内,height:auto 保原比例。图片仍横向滚不了,交给格内换行。 */
|
|
112
|
+
.loom-doc .loom-cell img,
|
|
113
|
+
.loom-doc .loom-cell video,
|
|
114
|
+
.loom-doc .loom-cell canvas {
|
|
115
|
+
max-width: 100%;
|
|
116
|
+
height: auto;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/* 正文图片压回列宽内(避免大图溢出)。 */
|
|
120
|
+
.loom-doc img[data-atom="image"] {
|
|
121
|
+
max-width: 100%;
|
|
122
|
+
height: auto;
|
|
123
|
+
/* 块级图上下间距 12px:比段落(0.5rem=8px)略宽给图一点呼吸感,又不像浏览器默认 2rem 那么孤立。 */
|
|
124
|
+
margin: 12px 0;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/* 格内段落零外边距:.loom-doc p(0.5rem 外边距)同特异度但靠后会盖过 .loom-cell p,
|
|
128
|
+
需把格内段落拉到 .loom-doc .loom-cell p 才稳赢。首段还要去掉顶距,垂直 align:top 才贴顶。 */
|
|
129
|
+
.loom-doc .loom-cell p {
|
|
130
|
+
margin: 0;
|
|
131
|
+
line-height: 1.5;
|
|
132
|
+
}
|
|
133
|
+
.loom-doc .loom-cell p + p {
|
|
134
|
+
margin-top: 4px;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/* 行列联动(同行或同列的 cell 浅色底)—— 飞书式:选中格的整行整列淡色提示。
|
|
138
|
+
.loom-table 前缀拉高特异度,压过表头底色(thead .loom-cell),表头格联动时也变蓝。 */
|
|
139
|
+
.loom-table .loom-cell[data-highlight-row],
|
|
140
|
+
.loom-table .loom-cell[data-highlight-col] {
|
|
141
|
+
background-color: rgba(59, 130, 246, 0.07);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/* 整行/整列选中(点控制柄)—— 抄 note:selectedCell = blue-100 底 + blue-200 double 描边 */
|
|
145
|
+
.loom-table .loom-cell[data-selected] {
|
|
146
|
+
background-color: #dbeafe;
|
|
147
|
+
box-shadow: inset 0 0 0 1px #bfdbfe;
|
|
148
|
+
}
|
|
149
|
+
@media (prefers-color-scheme: dark) {
|
|
150
|
+
.loom-table .loom-cell[data-selected] {
|
|
151
|
+
background-color: rgba(59, 130, 246, 0.1);
|
|
152
|
+
box-shadow: inset 0 0 0 1px rgba(147, 197, 253, 0.2);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/* 冻结行/列 —— .loom-table-scroll 是横竖滚动容器,冻结格 position:sticky 锚在容器边。
|
|
157
|
+
render 给锚点行 <freezeRows 的格挂 data-freeze-row、列 <freezeCols 挂 data-freeze-col。
|
|
158
|
+
sticky 需不透明底(否则滚动内容透上来),故给白/深底盖住;z 抬起压过普通格。 */
|
|
159
|
+
.loom-table .loom-cell[data-freeze-row] {
|
|
160
|
+
position: sticky;
|
|
161
|
+
top: 0;
|
|
162
|
+
z-index: 2;
|
|
163
|
+
background-color: #fff;
|
|
164
|
+
}
|
|
165
|
+
.loom-table .loom-cell[data-freeze-col] {
|
|
166
|
+
position: sticky;
|
|
167
|
+
left: 0;
|
|
168
|
+
z-index: 2;
|
|
169
|
+
background-color: #fff;
|
|
170
|
+
}
|
|
171
|
+
.loom-table .loom-cell[data-freeze-row][data-freeze-col] {
|
|
172
|
+
z-index: 3; /* 行列交叉角:压过单向冻结格 */
|
|
173
|
+
}
|
|
174
|
+
@media (prefers-color-scheme: dark) {
|
|
175
|
+
.loom-table .loom-cell[data-freeze-row],
|
|
176
|
+
.loom-table .loom-cell[data-freeze-col] {
|
|
177
|
+
background-color: #1a1a1a;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/* 聚焦格 —— 行列联动之上再压一层,2px 蓝描边盖过相邻边框(z-index 抬起)*/
|
|
182
|
+
.loom-table .loom-cell:focus {
|
|
183
|
+
background-color: rgba(59, 130, 246, 0.12);
|
|
184
|
+
box-shadow: inset 0 0 0 2px rgb(59, 130, 246);
|
|
185
|
+
position: relative;
|
|
186
|
+
z-index: 1;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/* 暗色 */
|
|
190
|
+
@media (prefers-color-scheme: dark) {
|
|
191
|
+
.loom-table .loom-cell[data-highlight-row],
|
|
192
|
+
.loom-table .loom-cell[data-highlight-col] {
|
|
193
|
+
background-color: rgba(59, 130, 246, 0.1);
|
|
194
|
+
}
|
|
195
|
+
.loom-table .loom-cell:focus {
|
|
196
|
+
background-color: rgba(59, 130, 246, 0.18);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/* ─── 代码块 ─── */
|
|
201
|
+
[data-code-block] {
|
|
202
|
+
position: relative;
|
|
203
|
+
margin: 0.5rem 0;
|
|
204
|
+
outline: none;
|
|
205
|
+
box-shadow: none;
|
|
206
|
+
}
|
|
207
|
+
/* 聚焦时不要 outline / focus ring(浏览器/宿主 :focus-visible 常画一圈) */
|
|
208
|
+
[data-code-block]:focus,
|
|
209
|
+
[data-code-block]:focus-within,
|
|
210
|
+
[data-code-block]:focus-visible,
|
|
211
|
+
[data-code-block] pre,
|
|
212
|
+
[data-code-block] pre:focus,
|
|
213
|
+
[data-code-block] pre:focus-within,
|
|
214
|
+
[data-code-block] pre:focus-visible,
|
|
215
|
+
[data-code-block] [data-code-hl],
|
|
216
|
+
[data-code-block] [data-code-hl]:focus,
|
|
217
|
+
[data-code-block] [data-code-hl]:focus-within,
|
|
218
|
+
[data-code-block] [data-code-hl]:focus-visible,
|
|
219
|
+
.loom-doc > pre[data-block-id],
|
|
220
|
+
.loom-doc > pre[data-block-id]:focus,
|
|
221
|
+
.loom-doc > pre[data-block-id]:focus-within,
|
|
222
|
+
.loom-doc > pre[data-block-id]:focus-visible {
|
|
223
|
+
outline: none;
|
|
224
|
+
box-shadow: none;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
[data-code-block] pre {
|
|
228
|
+
margin: 0;
|
|
229
|
+
padding: 1rem 1.25rem;
|
|
230
|
+
border-radius: 12px;
|
|
231
|
+
background-color: var(--bg-side) !important;
|
|
232
|
+
font-size: 13px;
|
|
233
|
+
line-height: 1.6;
|
|
234
|
+
overflow-x: auto;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/* 语言标签(右上,排在复制按钮左侧:复制按钮宽 28px + top/right 0.5rem,留 6px 间隔) */
|
|
238
|
+
[data-code-block] [data-code-lang] {
|
|
239
|
+
position: absolute;
|
|
240
|
+
top: 0.5rem;
|
|
241
|
+
right: calc(0.5rem + 28px + 6px);
|
|
242
|
+
z-index: 10;
|
|
243
|
+
padding: 2px 8px;
|
|
244
|
+
border: none;
|
|
245
|
+
border-radius: 6px;
|
|
246
|
+
background-color: var(--bg-hover);
|
|
247
|
+
color: var(--text-c);
|
|
248
|
+
font-size: 12px;
|
|
249
|
+
line-height: 18px;
|
|
250
|
+
cursor: pointer;
|
|
251
|
+
opacity: 0;
|
|
252
|
+
transition: opacity 0.15s, color 0.15s, background-color 0.15s;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
[data-code-block]:hover [data-code-lang] {
|
|
256
|
+
opacity: 1;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
[data-code-block] [data-code-lang]:hover {
|
|
260
|
+
color: var(--text-a);
|
|
261
|
+
background-color: var(--bg-active);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
/* 复制按钮 */
|
|
265
|
+
[data-code-block] [data-copy] {
|
|
266
|
+
position: absolute;
|
|
267
|
+
top: 0.5rem;
|
|
268
|
+
right: 0.5rem;
|
|
269
|
+
z-index: 10;
|
|
270
|
+
display: flex;
|
|
271
|
+
align-items: center;
|
|
272
|
+
justify-content: center;
|
|
273
|
+
width: 28px;
|
|
274
|
+
height: 28px;
|
|
275
|
+
border: none;
|
|
276
|
+
border-radius: 6px;
|
|
277
|
+
background-color: var(--bg-hover);
|
|
278
|
+
color: var(--text-b);
|
|
279
|
+
cursor: pointer;
|
|
280
|
+
opacity: 0;
|
|
281
|
+
transition: opacity 0.15s, color 0.15s, background-color 0.15s;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
[data-code-block]:hover [data-copy] {
|
|
285
|
+
opacity: 1;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
[data-code-block] [data-copy]:hover {
|
|
289
|
+
color: var(--text-a);
|
|
290
|
+
background-color: var(--bg-active);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/* 复制图标 */
|
|
294
|
+
[data-code-block] [data-copy]::after {
|
|
295
|
+
content: '';
|
|
296
|
+
display: block;
|
|
297
|
+
width: 14px;
|
|
298
|
+
height: 14px;
|
|
299
|
+
background-color: currentColor;
|
|
300
|
+
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='13' height='13' rx='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E") center / contain no-repeat;
|
|
301
|
+
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='13' height='13' rx='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E") center / contain no-repeat;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/* 复制成功 */
|
|
305
|
+
[data-code-block] [data-copy][data-copied] {
|
|
306
|
+
opacity: 1;
|
|
307
|
+
transition: none; /* 打勾要瞬切,不让 color/bg 过渡把勾从灰色淡入 */
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
[data-code-block] [data-copy][data-copied]::after {
|
|
311
|
+
transition: none;
|
|
312
|
+
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
|
|
313
|
+
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/* ─── 引用块 ─── */
|
|
317
|
+
.loom-doc blockquote {
|
|
318
|
+
margin: 0.5rem 0;
|
|
319
|
+
padding-left: 1rem;
|
|
320
|
+
border-left: 3px solid var(--bg-active);
|
|
321
|
+
color: var(--text-b);
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/* ─── 高亮块 callout(飞书/Notion 提示框)─── */
|
|
325
|
+
/* 容器盒:左粗边框 + 浅背景,四 variant 各配一对(border 深 / bg 浅)。图标略——颜色已表达语义。 */
|
|
326
|
+
.loom-doc .loom-callout {
|
|
327
|
+
margin: 0.5rem 0;
|
|
328
|
+
padding: 0.75rem 1rem;
|
|
329
|
+
border-left: 3px solid;
|
|
330
|
+
border-radius: 4px;
|
|
331
|
+
position: relative;
|
|
332
|
+
}
|
|
333
|
+
/* 芯片在右上角,contentEditable=false 不吞光标;点它循环四色。 */
|
|
334
|
+
.loom-doc .loom-callout > .loom-callout-chip {
|
|
335
|
+
position: absolute;
|
|
336
|
+
top: 0.4rem;
|
|
337
|
+
right: 0.5rem;
|
|
338
|
+
padding: 0 6px;
|
|
339
|
+
height: 20px;
|
|
340
|
+
border: 1px solid transparent;
|
|
341
|
+
border-radius: 4px;
|
|
342
|
+
background: rgba(0, 0, 0, 0.04);
|
|
343
|
+
color: var(--text-b);
|
|
344
|
+
font: 500 11px/20px system-ui, sans-serif;
|
|
345
|
+
cursor: pointer;
|
|
346
|
+
user-select: none;
|
|
347
|
+
}
|
|
348
|
+
.loom-doc .loom-callout > .loom-callout-chip:hover {
|
|
349
|
+
background: rgba(0, 0, 0, 0.08);
|
|
350
|
+
}
|
|
351
|
+
.loom-doc .loom-callout > :not(.loom-callout-chip):first-of-type { margin-top: 0; }
|
|
352
|
+
.loom-doc .loom-callout > :last-child { margin-bottom: 0; }
|
|
353
|
+
.loom-doc .loom-callout[data-variant="info"] { border-color: #1456f0; background: rgba(20, 86, 240, 0.06); }
|
|
354
|
+
.loom-doc .loom-callout[data-variant="warn"] { border-color: #d97706; background: rgba(217, 119, 6, 0.08); }
|
|
355
|
+
.loom-doc .loom-callout[data-variant="success"] { border-color: #16a34a; background: rgba(22, 163, 74, 0.08); }
|
|
356
|
+
.loom-doc .loom-callout[data-variant="danger"] { border-color: #dc2626; background: rgba(220, 38, 38, 0.07); }
|
|
357
|
+
|
|
358
|
+
/* ─── 标题 ─── 选中浅蓝;折叠态 data-collapsed;三角在 hover 操作栏 */
|
|
359
|
+
.loom-doc .loom-heading {
|
|
360
|
+
position: relative;
|
|
361
|
+
border-radius: 4px;
|
|
362
|
+
transition: background 0.1s ease;
|
|
363
|
+
}
|
|
364
|
+
.loom-doc .loom-heading:focus-within {
|
|
365
|
+
background: rgba(51, 112, 255, 0.08);
|
|
366
|
+
}
|
|
367
|
+
.loom-doc [data-fold-hidden="true"] {
|
|
368
|
+
display: none !important;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
/* ─── 块左侧 hover 操作栏(飞书):H2 · 六点 · 三角 同一容器 ─── */
|
|
372
|
+
.loom-drag-hit {
|
|
373
|
+
position: fixed;
|
|
374
|
+
z-index: 64;
|
|
375
|
+
pointer-events: auto;
|
|
376
|
+
}
|
|
377
|
+
.loom-block-bar {
|
|
378
|
+
position: fixed;
|
|
379
|
+
z-index: 65;
|
|
380
|
+
display: inline-flex;
|
|
381
|
+
align-items: center;
|
|
382
|
+
justify-content: flex-end;
|
|
383
|
+
gap: 2px;
|
|
384
|
+
height: 22px;
|
|
385
|
+
padding: 0 2px;
|
|
386
|
+
box-sizing: border-box;
|
|
387
|
+
user-select: none;
|
|
388
|
+
/* top/left 由 JS: 首行垂直居中 + 右缘贴块左(translateX -100%) */
|
|
389
|
+
}
|
|
390
|
+
.loom-block-kind {
|
|
391
|
+
display: inline-flex;
|
|
392
|
+
align-items: center;
|
|
393
|
+
justify-content: center;
|
|
394
|
+
min-width: 22px;
|
|
395
|
+
height: 20px;
|
|
396
|
+
padding: 0 5px;
|
|
397
|
+
border-radius: 4px;
|
|
398
|
+
background: #eff0f1;
|
|
399
|
+
color: #646a73;
|
|
400
|
+
font: 500 11px/20px system-ui, -apple-system, 'Segoe UI', sans-serif;
|
|
401
|
+
letter-spacing: 0.02em;
|
|
402
|
+
pointer-events: none;
|
|
403
|
+
box-sizing: border-box;
|
|
404
|
+
flex: none;
|
|
405
|
+
line-height: 20px;
|
|
406
|
+
}
|
|
407
|
+
.loom-block-bar .loom-drag-handle,
|
|
408
|
+
.loom-block-bar .loom-add-handle,
|
|
409
|
+
.loom-block-bar .loom-heading-fold {
|
|
410
|
+
position: static;
|
|
411
|
+
z-index: auto;
|
|
412
|
+
flex: none;
|
|
413
|
+
width: 18px;
|
|
414
|
+
height: 20px;
|
|
415
|
+
margin: 0;
|
|
416
|
+
padding: 0;
|
|
417
|
+
display: inline-flex;
|
|
418
|
+
align-items: center;
|
|
419
|
+
justify-content: center;
|
|
420
|
+
box-sizing: border-box;
|
|
421
|
+
}
|
|
422
|
+
.loom-block-bar .loom-heading-fold {
|
|
423
|
+
border: none;
|
|
424
|
+
border-radius: 3px;
|
|
425
|
+
background: transparent;
|
|
426
|
+
cursor: pointer;
|
|
427
|
+
color: #000;
|
|
428
|
+
transition: background 0.1s ease, transform 0.15s ease;
|
|
429
|
+
transform-origin: center center;
|
|
430
|
+
}
|
|
431
|
+
.loom-block-bar .loom-heading-fold svg {
|
|
432
|
+
display: block;
|
|
433
|
+
width: 14px;
|
|
434
|
+
height: 14px;
|
|
435
|
+
}
|
|
436
|
+
.loom-block-bar .loom-heading-fold path {
|
|
437
|
+
fill: #000;
|
|
438
|
+
}
|
|
439
|
+
.loom-block-bar .loom-heading-fold.is-collapsed {
|
|
440
|
+
transform: rotate(-90deg);
|
|
441
|
+
}
|
|
442
|
+
.loom-block-bar .loom-heading-fold:hover {
|
|
443
|
+
background: rgba(0, 0, 0, 0.06);
|
|
444
|
+
}
|
|
445
|
+
/* H{n} 也是拖拽手柄;聚焦/菜单开时蓝框(飞书选中态) */
|
|
446
|
+
.loom-block-bar .loom-block-kind {
|
|
447
|
+
pointer-events: auto;
|
|
448
|
+
border: 1px solid transparent;
|
|
449
|
+
cursor: grab;
|
|
450
|
+
}
|
|
451
|
+
.loom-block-bar .loom-block-kind:active {
|
|
452
|
+
cursor: grabbing;
|
|
453
|
+
}
|
|
454
|
+
.loom-block-bar .loom-block-kind.is-on {
|
|
455
|
+
color: #3370ff;
|
|
456
|
+
background: #fff;
|
|
457
|
+
border-color: #3370ff;
|
|
458
|
+
box-shadow: 0 0 0 1px rgba(51, 112, 255, 0.12);
|
|
459
|
+
}
|
|
460
|
+
@media (prefers-color-scheme: dark) {
|
|
461
|
+
.loom-block-bar .loom-block-kind.is-on {
|
|
462
|
+
color: #7aafff;
|
|
463
|
+
background: var(--bg-page, #2a2a2a);
|
|
464
|
+
border-color: #4c8bf5;
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
/* 手柄悬停 → 块格式弹层(类型 / 加粗 / 颜色 / 对齐)
|
|
469
|
+
z 须高于 app 壳侧栏(~80),否则贴左时被笔记列表盖住 */
|
|
470
|
+
.loom-block-menu {
|
|
471
|
+
position: fixed;
|
|
472
|
+
z-index: 100;
|
|
473
|
+
min-width: 200px;
|
|
474
|
+
padding: 6px;
|
|
475
|
+
border-radius: 10px;
|
|
476
|
+
border: 1px solid rgba(0, 0, 0, 0.06);
|
|
477
|
+
background: #fff;
|
|
478
|
+
box-shadow:
|
|
479
|
+
0 0 0 0.5px rgba(0, 0, 0, 0.02),
|
|
480
|
+
0 8px 28px rgba(0, 0, 0, 0.1),
|
|
481
|
+
0 2px 6px rgba(0, 0, 0, 0.04);
|
|
482
|
+
display: flex;
|
|
483
|
+
flex-direction: column;
|
|
484
|
+
gap: 4px;
|
|
485
|
+
user-select: none;
|
|
486
|
+
}
|
|
487
|
+
.loom-block-menu-row {
|
|
488
|
+
display: flex;
|
|
489
|
+
flex-wrap: wrap;
|
|
490
|
+
align-items: center;
|
|
491
|
+
gap: 2px;
|
|
492
|
+
}
|
|
493
|
+
.loom-block-menu-sep {
|
|
494
|
+
height: 1px;
|
|
495
|
+
margin: 2px 4px;
|
|
496
|
+
background: rgba(0, 0, 0, 0.06);
|
|
497
|
+
}
|
|
498
|
+
.loom-block-menu-btn {
|
|
499
|
+
min-width: 28px;
|
|
500
|
+
height: 28px;
|
|
501
|
+
padding: 0 7px;
|
|
502
|
+
border: none;
|
|
503
|
+
border-radius: 6px;
|
|
504
|
+
background: transparent;
|
|
505
|
+
color: var(--text-a, rgba(0, 0, 0, 0.82));
|
|
506
|
+
font: 500 12px/1 system-ui, -apple-system, 'Segoe UI', sans-serif;
|
|
507
|
+
cursor: pointer;
|
|
508
|
+
transition: background 0.1s ease, color 0.1s ease;
|
|
509
|
+
}
|
|
510
|
+
.loom-block-menu-btn:hover {
|
|
511
|
+
background: rgba(0, 0, 0, 0.05);
|
|
512
|
+
}
|
|
513
|
+
.loom-block-menu-btn.is-on {
|
|
514
|
+
background: rgba(51, 112, 255, 0.1);
|
|
515
|
+
color: var(--accent, #3370ff);
|
|
516
|
+
}
|
|
517
|
+
.loom-block-menu-mark[data-mark="bold"] {
|
|
518
|
+
font-weight: 700;
|
|
519
|
+
}
|
|
520
|
+
.loom-block-menu-mark[data-mark="italic"] {
|
|
521
|
+
font-style: italic;
|
|
522
|
+
}
|
|
523
|
+
.loom-block-menu-colors {
|
|
524
|
+
padding: 2px 4px 4px;
|
|
525
|
+
gap: 6px;
|
|
526
|
+
}
|
|
527
|
+
.loom-block-menu-swatch {
|
|
528
|
+
width: 16px;
|
|
529
|
+
height: 16px;
|
|
530
|
+
padding: 0;
|
|
531
|
+
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
532
|
+
border-radius: 50%;
|
|
533
|
+
cursor: pointer;
|
|
534
|
+
box-sizing: border-box;
|
|
535
|
+
}
|
|
536
|
+
.loom-block-menu-swatch:hover {
|
|
537
|
+
transform: scale(1.12);
|
|
538
|
+
box-shadow: 0 0 0 2px rgba(51, 112, 255, 0.25);
|
|
539
|
+
}
|
|
540
|
+
@media (prefers-color-scheme: dark) {
|
|
541
|
+
.loom-block-menu {
|
|
542
|
+
background: var(--bg-page, #2a2a2a);
|
|
543
|
+
border-color: rgba(255, 255, 255, 0.08);
|
|
544
|
+
box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
|
|
545
|
+
}
|
|
546
|
+
.loom-block-menu-sep {
|
|
547
|
+
background: rgba(255, 255, 255, 0.1);
|
|
548
|
+
}
|
|
549
|
+
.loom-block-menu-btn {
|
|
550
|
+
color: var(--text-a, rgba(255, 255, 255, 0.88));
|
|
551
|
+
}
|
|
552
|
+
.loom-block-menu-btn:hover {
|
|
553
|
+
background: rgba(255, 255, 255, 0.08);
|
|
554
|
+
}
|
|
555
|
+
.loom-block-menu-btn.is-on {
|
|
556
|
+
background: rgba(76, 139, 245, 0.2);
|
|
557
|
+
color: #7aafff;
|
|
558
|
+
}
|
|
559
|
+
.loom-block-menu-swatch {
|
|
560
|
+
border-color: rgba(255, 255, 255, 0.2);
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
/* ─── 列表 ─── */
|
|
565
|
+
/* marker 蓝(抄 note tailwind prose --tw-prose-bullets/counters = #1456f0);正文仍走 --text-b。 */
|
|
566
|
+
.loom-doc ul {
|
|
567
|
+
margin: 0.5rem 0;
|
|
568
|
+
padding-left: 1.5rem;
|
|
569
|
+
list-style: disc;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
.loom-doc ol {
|
|
573
|
+
margin: 0.5rem 0;
|
|
574
|
+
padding-left: 1.5rem;
|
|
575
|
+
list-style: decimal;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
.loom-doc li {
|
|
579
|
+
margin: 0.25rem 0;
|
|
580
|
+
color: var(--text-b);
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
.loom-doc li::marker {
|
|
584
|
+
color: #1456f0;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
/* ─── 标题 ─── */
|
|
588
|
+
.loom-doc h1, .loom-doc h2, .loom-doc h3, .loom-doc h4, .loom-doc h5, .loom-doc h6 {
|
|
589
|
+
margin: 1rem 0 0.5rem;
|
|
590
|
+
font-weight: 600;
|
|
591
|
+
color: var(--text-a);
|
|
592
|
+
line-height: 1.3;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
.loom-doc h1 { font-size: 1.75rem; }
|
|
596
|
+
.loom-doc h2 { font-size: 1.5rem; }
|
|
597
|
+
.loom-doc h3 { font-size: 1.25rem; }
|
|
598
|
+
|
|
599
|
+
/* ─── 段落 ─── */
|
|
600
|
+
.loom-doc p {
|
|
601
|
+
margin: 0.5rem 0;
|
|
602
|
+
line-height: 1.6;
|
|
603
|
+
color: var(--text-b);
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
/* ─── 行内代码 ─── */
|
|
607
|
+
.loom-doc code:not(pre code) {
|
|
608
|
+
padding: 0.15em 0.4em;
|
|
609
|
+
border-radius: 4px;
|
|
610
|
+
background-color: var(--bg-side);
|
|
611
|
+
font-size: 0.9em;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
/* ─── 表格控制柄浮层 ─── */
|
|
615
|
+
/* overlay 挂 document.body,fixed 子元素按视口坐标定位;本身不拦事件,子元素各自 auto。 */
|
|
616
|
+
.loom-table-overlay {
|
|
617
|
+
position: fixed;
|
|
618
|
+
inset: 0;
|
|
619
|
+
z-index: 50;
|
|
620
|
+
pointer-events: none;
|
|
621
|
+
}
|
|
622
|
+
.loom-table-overlay .loom-tc > * {
|
|
623
|
+
pointer-events: auto;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
/* 行/列控制柄:灰条,hover/选中变蓝(抄 note grip-column/row)。
|
|
627
|
+
base black/5、hover black/10、selected blue-600;first/last 挂 2px 小圆角。 */
|
|
628
|
+
.loom-tc-handle {
|
|
629
|
+
position: fixed;
|
|
630
|
+
background-color: rgba(0, 0, 0, 0.05);
|
|
631
|
+
cursor: grab;
|
|
632
|
+
transition: background-color 0.12s;
|
|
633
|
+
}
|
|
634
|
+
.loom-tc-handle:hover {
|
|
635
|
+
background-color: rgba(0, 0, 0, 0.1);
|
|
636
|
+
}
|
|
637
|
+
.loom-tc-handle.is-selected {
|
|
638
|
+
background-color: #2563eb;
|
|
639
|
+
}
|
|
640
|
+
@media (prefers-color-scheme: dark) {
|
|
641
|
+
.loom-tc-handle { background-color: rgba(255, 255, 255, 0.1); }
|
|
642
|
+
.loom-tc-handle:hover { background-color: rgba(255, 255, 255, 0.2); }
|
|
643
|
+
.loom-tc-handle.is-selected { background-color: rgba(255, 255, 255, 0.3); }
|
|
644
|
+
}
|
|
645
|
+
/* 圆角贴 note:列柄首段上左角、末段上右角;行柄首段上左角、末段下左角;全选柄上左角。
|
|
646
|
+
首末段由 JS 打 is-first/is-last(序列两端),不靠 :first-of-type(混排 div 不可靠)。 */
|
|
647
|
+
.loom-tc-col.is-first { border-top-left-radius: 2px; }
|
|
648
|
+
.loom-tc-col.is-last { border-top-right-radius: 2px; }
|
|
649
|
+
.loom-tc-row.is-first { border-top-left-radius: 2px; }
|
|
650
|
+
.loom-tc-row.is-last { border-bottom-left-radius: 2px; }
|
|
651
|
+
.loom-tc-all { border-top-left-radius: 2px; }
|
|
652
|
+
|
|
653
|
+
/* 整表抓柄:表 focused(caret 在表内)或整表选中时,悬在表左上角外的 ⠿ 抓手。
|
|
654
|
+
点=选中整表,拖=移动整表到文档别处。命脉:它是唯一直观入口——表边框 <1px 点不中,必须有可见抓手。 */
|
|
655
|
+
.loom-tc-grip {
|
|
656
|
+
position: fixed;
|
|
657
|
+
display: flex;
|
|
658
|
+
align-items: center;
|
|
659
|
+
justify-content: center;
|
|
660
|
+
width: 18px;
|
|
661
|
+
height: 18px;
|
|
662
|
+
border-radius: 4px;
|
|
663
|
+
background-color: rgba(0, 0, 0, 0.05);
|
|
664
|
+
color: #9ca3af;
|
|
665
|
+
font-size: 12px;
|
|
666
|
+
line-height: 1;
|
|
667
|
+
cursor: grab;
|
|
668
|
+
z-index: 3;
|
|
669
|
+
transition: background-color 0.12s, color 0.12s;
|
|
670
|
+
}
|
|
671
|
+
.loom-tc-grip::after {
|
|
672
|
+
content: '⠿';
|
|
673
|
+
}
|
|
674
|
+
.loom-tc-grip:hover {
|
|
675
|
+
background-color: rgba(0, 0, 0, 0.1);
|
|
676
|
+
color: #6b7280;
|
|
677
|
+
}
|
|
678
|
+
.loom-tc-grip.is-selected {
|
|
679
|
+
background-color: #2563eb;
|
|
680
|
+
color: #fff;
|
|
681
|
+
}
|
|
682
|
+
@media (prefers-color-scheme: dark) {
|
|
683
|
+
.loom-tc-grip { background-color: rgba(255, 255, 255, 0.1); color: #9ca3af; }
|
|
684
|
+
.loom-tc-grip:hover { background-color: rgba(255, 255, 255, 0.2); color: #d1d5db; }
|
|
685
|
+
.loom-tc-grip.is-selected { background-color: #2563eb; color: #fff; }
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
/* 列/行边界插入点:两态(抄 note AddColumnButton)。底盒 24px 固定,margin -12 使圆心正落 JS 坐标点(边界线上);
|
|
689
|
+
默认 scale(0.15)≈3.6px 灰点 + ⊕ 藏起(font-size 0),克制常驻;hover scale(1) 长成 24px 蓝圆 + 白 ⊕。200ms ease-out。 */
|
|
690
|
+
/* 容器 = 24px 常驻命中区(抄 note w-6 group):承 click + hover。位置/尺寸由 JS 内联。 */
|
|
691
|
+
.loom-tc-ins {
|
|
692
|
+
position: fixed;
|
|
693
|
+
cursor: pointer;
|
|
694
|
+
pointer-events: auto;
|
|
695
|
+
z-index: 2;
|
|
696
|
+
}
|
|
697
|
+
/* 视觉圆点:填满容器,纯展示(不夺事件)。静止 scale(.15)≈3.6px 灰点 + ⊕ 藏起;
|
|
698
|
+
容器 hover 时(:hover 在 24px 容器上,不在缩小的点上)长成 24px 蓝圆 + 白 ⊕。 */
|
|
699
|
+
.loom-tc-dot {
|
|
700
|
+
position: absolute;
|
|
701
|
+
inset: 0;
|
|
702
|
+
display: flex;
|
|
703
|
+
align-items: center;
|
|
704
|
+
justify-content: center;
|
|
705
|
+
border-radius: 50%;
|
|
706
|
+
background-color: #d1d5db;
|
|
707
|
+
color: #fff;
|
|
708
|
+
font-size: 0;
|
|
709
|
+
line-height: 1;
|
|
710
|
+
font-weight: 600;
|
|
711
|
+
pointer-events: none;
|
|
712
|
+
transform: scale(0.15);
|
|
713
|
+
transform-origin: center;
|
|
714
|
+
transition: transform 0.2s ease-out, background-color 0.2s ease-out, font-size 0.2s ease-out;
|
|
715
|
+
}
|
|
716
|
+
.loom-tc-dot::after {
|
|
717
|
+
content: '+';
|
|
718
|
+
}
|
|
719
|
+
.loom-tc-ins:hover .loom-tc-dot {
|
|
720
|
+
transform: scale(1);
|
|
721
|
+
background-color: #2563eb;
|
|
722
|
+
font-size: 20px;
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
/* 插入引导线:容器 hover 时,从表边贯穿表身(col 竖线×表高、row 横线×表宽),预示落点。
|
|
726
|
+
线 position:fixed + JS 视口坐标,独立于容器定位;pointer-events:none 不夺 hover。 */
|
|
727
|
+
.loom-tc-guide {
|
|
728
|
+
position: fixed;
|
|
729
|
+
background-color: #2563eb;
|
|
730
|
+
opacity: 0;
|
|
731
|
+
pointer-events: none;
|
|
732
|
+
transition: opacity 0.2s ease-out;
|
|
733
|
+
z-index: 1;
|
|
734
|
+
}
|
|
735
|
+
.loom-tc-guide-col {
|
|
736
|
+
width: 2px;
|
|
737
|
+
margin-left: -1px;
|
|
738
|
+
}
|
|
739
|
+
.loom-tc-guide-row {
|
|
740
|
+
height: 2px;
|
|
741
|
+
margin-top: -1px;
|
|
742
|
+
}
|
|
743
|
+
.loom-tc-ins:hover .loom-tc-guide {
|
|
744
|
+
opacity: 1;
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
/* 列宽 resize handle:列右边界,hover 出竖线(抄 note column-resize-handle 的 1px black/20 观感,保 6px 命中区) */
|
|
748
|
+
.loom-tc-resize {
|
|
749
|
+
position: fixed;
|
|
750
|
+
width: 6px;
|
|
751
|
+
cursor: col-resize;
|
|
752
|
+
z-index: 1;
|
|
753
|
+
background-color: transparent;
|
|
754
|
+
transition: background-color 0.12s;
|
|
755
|
+
}
|
|
756
|
+
.loom-tc-resize:hover {
|
|
757
|
+
background-color: rgba(0, 0, 0, 0.2);
|
|
758
|
+
}
|
|
759
|
+
@media (prefers-color-scheme: dark) {
|
|
760
|
+
.loom-tc-resize:hover { background-color: rgba(255, 255, 255, 0.2); }
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
/* 拖拽重排时的落点指示线 */
|
|
764
|
+
.loom-tc-drop {
|
|
765
|
+
position: fixed;
|
|
766
|
+
background-color: rgb(59, 130, 246);
|
|
767
|
+
z-index: 3;
|
|
768
|
+
pointer-events: none;
|
|
769
|
+
}
|
|
770
|
+
.loom-tc-drop-col {
|
|
771
|
+
width: 2px;
|
|
772
|
+
margin-left: -1px;
|
|
773
|
+
}
|
|
774
|
+
.loom-tc-drop-row {
|
|
775
|
+
height: 2px;
|
|
776
|
+
margin-top: -1px;
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
/* 柄菜单:增删行列 */
|
|
780
|
+
.loom-tc-menu {
|
|
781
|
+
position: fixed;
|
|
782
|
+
z-index: 4;
|
|
783
|
+
min-width: 120px;
|
|
784
|
+
padding: 4px;
|
|
785
|
+
border-radius: 8px;
|
|
786
|
+
background-color: var(--bg-page);
|
|
787
|
+
border: 1px solid var(--bg-active);
|
|
788
|
+
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
|
|
789
|
+
}
|
|
790
|
+
.loom-tc-menu button {
|
|
791
|
+
display: block;
|
|
792
|
+
width: 100%;
|
|
793
|
+
padding: 6px 10px;
|
|
794
|
+
border: none;
|
|
795
|
+
border-radius: 4px;
|
|
796
|
+
background: none;
|
|
797
|
+
color: var(--text-a);
|
|
798
|
+
font-size: 13px;
|
|
799
|
+
text-align: left;
|
|
800
|
+
cursor: pointer;
|
|
801
|
+
}
|
|
802
|
+
.loom-tc-menu button:hover {
|
|
803
|
+
background-color: var(--bg-hover);
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
/* ─── 图片交互浮层(选中/四角改尺寸/放大)─── */
|
|
807
|
+
/* 结构同表格浮层:overlay 挂 body、fixed 按视口坐标定位,子元素各自 auto。 */
|
|
808
|
+
.loom-image-overlay {
|
|
809
|
+
position: fixed;
|
|
810
|
+
inset: 0;
|
|
811
|
+
z-index: 50;
|
|
812
|
+
pointer-events: none;
|
|
813
|
+
}
|
|
814
|
+
.loom-image-overlay .loom-ic > * {
|
|
815
|
+
pointer-events: auto;
|
|
816
|
+
}
|
|
817
|
+
/* 选中图外框:蓝色描边。点选 / 跨块选区共用同一框(图片组件自身选中态)。 */
|
|
818
|
+
.loom-ic-box {
|
|
819
|
+
position: fixed;
|
|
820
|
+
border: 1px solid #2563eb;
|
|
821
|
+
pointer-events: none;
|
|
822
|
+
}
|
|
823
|
+
/* 四角改尺寸手柄:小白方块蓝边,圆心落 JS 坐标点(margin 负半宽居中)。 */
|
|
824
|
+
.loom-ic-handle {
|
|
825
|
+
position: fixed;
|
|
826
|
+
width: 10px;
|
|
827
|
+
height: 10px;
|
|
828
|
+
margin: -5px 0 0 -5px;
|
|
829
|
+
background-color: #fff;
|
|
830
|
+
border: 1px solid #2563eb;
|
|
831
|
+
border-radius: 1px;
|
|
832
|
+
}
|
|
833
|
+
.loom-ic-nw, .loom-ic-se { cursor: nwse-resize; }
|
|
834
|
+
.loom-ic-ne, .loom-ic-sw { cursor: nesw-resize; }
|
|
835
|
+
/* 图工具条:图上方浮一排(对齐三钮 + 图注开关),同气泡菜单风格。图注开输入框第二行。 */
|
|
836
|
+
.loom-ic-tb {
|
|
837
|
+
position: fixed;
|
|
838
|
+
display: flex;
|
|
839
|
+
flex-direction: column;
|
|
840
|
+
gap: 4px;
|
|
841
|
+
padding: 4px;
|
|
842
|
+
background-color: var(--bg, #fff);
|
|
843
|
+
border: 1px solid var(--border, #e2e2e2);
|
|
844
|
+
border-radius: 6px;
|
|
845
|
+
box-shadow: 0 2px 8px rgb(0 0 0 / 12%);
|
|
846
|
+
}
|
|
847
|
+
.loom-ic-tb-row { display: flex; gap: 2px; }
|
|
848
|
+
.loom-ic-tb button {
|
|
849
|
+
width: 28px;
|
|
850
|
+
height: 28px;
|
|
851
|
+
border: none;
|
|
852
|
+
border-radius: 4px;
|
|
853
|
+
background: none;
|
|
854
|
+
cursor: pointer;
|
|
855
|
+
font-size: 14px;
|
|
856
|
+
}
|
|
857
|
+
.loom-ic-tb button:hover { background-color: var(--bg-hover, #f0f0f0); }
|
|
858
|
+
.loom-ic-tb button[data-active] { background-color: var(--bg-active, #dbeafe); }
|
|
859
|
+
.loom-ic-tb-caption {
|
|
860
|
+
width: 180px;
|
|
861
|
+
padding: 4px 6px;
|
|
862
|
+
border: 1px solid var(--border, #e2e2e2);
|
|
863
|
+
border-radius: 4px;
|
|
864
|
+
font-size: 13px;
|
|
865
|
+
}
|
|
866
|
+
/* 代码块语言下拉(host wireCodeLang 建,挂 body):竖排一列语言,同气泡菜单风格。 */
|
|
867
|
+
.loom-code-lang-menu {
|
|
868
|
+
display: flex;
|
|
869
|
+
flex-direction: column;
|
|
870
|
+
max-height: 260px;
|
|
871
|
+
overflow-y: auto;
|
|
872
|
+
padding: 4px;
|
|
873
|
+
background-color: var(--bg, #fff);
|
|
874
|
+
border: 1px solid var(--border, #e2e2e2);
|
|
875
|
+
border-radius: 6px;
|
|
876
|
+
box-shadow: 0 2px 8px rgb(0 0 0 / 12%);
|
|
877
|
+
}
|
|
878
|
+
.loom-code-lang-menu button {
|
|
879
|
+
padding: 4px 12px;
|
|
880
|
+
border: none;
|
|
881
|
+
border-radius: 4px;
|
|
882
|
+
background: none;
|
|
883
|
+
color: var(--text-a, #222);
|
|
884
|
+
font-size: 13px;
|
|
885
|
+
text-align: left;
|
|
886
|
+
cursor: pointer;
|
|
887
|
+
}
|
|
888
|
+
.loom-code-lang-menu button:hover { background-color: var(--bg-hover, #f0f0f0); }
|
|
889
|
+
/* 图注:figure 宽随 img(fit-content,见 render style),勿默认 100% 把选中框撑满行。 */
|
|
890
|
+
.loom-figure {
|
|
891
|
+
margin: 0;
|
|
892
|
+
width: fit-content;
|
|
893
|
+
max-width: 100%;
|
|
894
|
+
}
|
|
895
|
+
.loom-figure > img {
|
|
896
|
+
display: block;
|
|
897
|
+
max-width: 100%;
|
|
898
|
+
height: auto;
|
|
899
|
+
}
|
|
900
|
+
.loom-figure figcaption {
|
|
901
|
+
margin-top: 4px;
|
|
902
|
+
color: var(--text-dim, #888);
|
|
903
|
+
font-size: 13px;
|
|
904
|
+
}
|
|
905
|
+
/* 加载中/失败占位:失败画虚线框 + alt(attr() 显示替代文字)。加载中弱化(半透明)。 */
|
|
906
|
+
.loom-doc img[data-atom="image"][data-load="loading"] {
|
|
907
|
+
opacity: 0.6;
|
|
908
|
+
}
|
|
909
|
+
.loom-doc img[data-atom="image"][data-load="error"] {
|
|
910
|
+
min-width: 120px;
|
|
911
|
+
min-height: 48px;
|
|
912
|
+
opacity: 1;
|
|
913
|
+
border: 1px dashed var(--bg-active);
|
|
914
|
+
border-radius: 4px;
|
|
915
|
+
background-color: var(--bg-hover);
|
|
916
|
+
}
|
|
917
|
+
/* 选中框统一由 overlay 的 .loom-ic-box 出(与四角手柄同源坐标一致);此处不再叠 outline(重复焦点信号)。 */
|
|
918
|
+
/* 图选中态藏掉文本竖线:选中态 DOM 选区仍在(保 beforeinput/keydown 发事件、键盘响应),
|
|
919
|
+
但 contentEditable 有焦点+塌缩选区时浏览器必渲染 caret 竖线——与选中框成两个焦点信号打架。
|
|
920
|
+
caret-color:transparent 只藏竖线不动选区,唯一焦点回到选中框。:has 命中「内含选中图的可编辑宿主」。 */
|
|
921
|
+
[contenteditable="true"]:has([data-atom="image"][data-selected]) {
|
|
922
|
+
caret-color: transparent;
|
|
923
|
+
}
|
|
924
|
+
/* 整表选中态(两段删第一段):同图片——选中框由 overlay 的 .loom-ic-box 出,此处只藏塌缩到表后的 caret 竖线。
|
|
925
|
+
data-block-selected 只作状态标记不叠 outline,唯一焦点回到选中框(避免双焦点信号)。 */
|
|
926
|
+
[contenteditable="true"]:has(.loom-table[data-block-selected]) {
|
|
927
|
+
caret-color: transparent;
|
|
928
|
+
}
|
|
929
|
+
/* 点击放大:全屏半透明背景 + 居中大图,点背景关。 */
|
|
930
|
+
.loom-lightbox {
|
|
931
|
+
position: fixed;
|
|
932
|
+
inset: 0;
|
|
933
|
+
z-index: 60;
|
|
934
|
+
display: flex;
|
|
935
|
+
align-items: center;
|
|
936
|
+
justify-content: center;
|
|
937
|
+
background-color: rgba(0, 0, 0, 0.7);
|
|
938
|
+
cursor: zoom-out;
|
|
939
|
+
}
|
|
940
|
+
.loom-lightbox img {
|
|
941
|
+
max-width: 90vw;
|
|
942
|
+
max-height: 90vh;
|
|
943
|
+
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
|
|
944
|
+
}
|
|
945
|
+
/* 飞书式气泡 — 清爽:浅边、轻影、灰字、蓝只表选中 */
|
|
946
|
+
.loom-bubble {
|
|
947
|
+
position: fixed;
|
|
948
|
+
display: flex;
|
|
949
|
+
flex-direction: column;
|
|
950
|
+
align-items: stretch;
|
|
951
|
+
padding: 4px 6px;
|
|
952
|
+
border-radius: 8px;
|
|
953
|
+
border: 1px solid #dee0e3;
|
|
954
|
+
background: #fff;
|
|
955
|
+
box-shadow: 0 1px 4px rgba(31, 35, 41, 0.08), 0 4px 12px rgba(31, 35, 41, 0.06);
|
|
956
|
+
z-index: 100;
|
|
957
|
+
user-select: none;
|
|
958
|
+
opacity: 0;
|
|
959
|
+
transition: opacity 0.1s ease;
|
|
960
|
+
}
|
|
961
|
+
.loom-bubble.is-in {
|
|
962
|
+
opacity: 1;
|
|
963
|
+
}
|
|
964
|
+
.loom-bb-row {
|
|
965
|
+
display: flex;
|
|
966
|
+
align-items: center;
|
|
967
|
+
flex-wrap: wrap;
|
|
968
|
+
gap: 2px;
|
|
969
|
+
max-width: min(96vw, 720px);
|
|
970
|
+
}
|
|
971
|
+
.loom-bb-dd-wrap {
|
|
972
|
+
position: relative;
|
|
973
|
+
display: inline-flex;
|
|
974
|
+
align-items: center;
|
|
975
|
+
}
|
|
976
|
+
.loom-bubble .loom-bb-row > button,
|
|
977
|
+
.loom-bb-dd-wrap > button {
|
|
978
|
+
position: relative;
|
|
979
|
+
min-width: 28px;
|
|
980
|
+
height: 28px;
|
|
981
|
+
padding: 0 4px;
|
|
982
|
+
border: none;
|
|
983
|
+
border-radius: 6px;
|
|
984
|
+
background: transparent;
|
|
985
|
+
color: #646a73;
|
|
986
|
+
font: 500 13px/1 system-ui, -apple-system, 'Segoe UI', sans-serif;
|
|
987
|
+
cursor: pointer;
|
|
988
|
+
display: inline-flex;
|
|
989
|
+
align-items: center;
|
|
990
|
+
justify-content: center;
|
|
991
|
+
gap: 2px;
|
|
992
|
+
}
|
|
993
|
+
.loom-bubble .loom-bb-row > button > .loom-icon,
|
|
994
|
+
.loom-bb-dd-wrap > button > .loom-icon {
|
|
995
|
+
width: 16px;
|
|
996
|
+
height: 16px;
|
|
997
|
+
stroke-width: 1.75;
|
|
998
|
+
}
|
|
999
|
+
.loom-icon {
|
|
1000
|
+
display: block;
|
|
1001
|
+
flex: none;
|
|
1002
|
+
pointer-events: none;
|
|
1003
|
+
}
|
|
1004
|
+
.loom-bubble .loom-bb-row > button:hover,
|
|
1005
|
+
.loom-bb-dd-wrap > button:hover,
|
|
1006
|
+
.loom-bb-dd-wrap.is-open > button {
|
|
1007
|
+
background: #eff0f1;
|
|
1008
|
+
}
|
|
1009
|
+
.loom-bubble .loom-bb-row > button[data-active] {
|
|
1010
|
+
background: #e8f3ff;
|
|
1011
|
+
color: #3370ff;
|
|
1012
|
+
}
|
|
1013
|
+
.loom-bubble-sep {
|
|
1014
|
+
width: 1px;
|
|
1015
|
+
height: 14px;
|
|
1016
|
+
align-self: center;
|
|
1017
|
+
margin: 0 4px;
|
|
1018
|
+
background: #dee0e3;
|
|
1019
|
+
flex: none;
|
|
1020
|
+
}
|
|
1021
|
+
.loom-bb-dd {
|
|
1022
|
+
padding: 0 2px 0 6px !important;
|
|
1023
|
+
min-width: 28px !important;
|
|
1024
|
+
}
|
|
1025
|
+
.loom-bb-t {
|
|
1026
|
+
font: 600 14px/1 Georgia, 'Times New Roman', serif;
|
|
1027
|
+
font-style: italic;
|
|
1028
|
+
color: #1f2329;
|
|
1029
|
+
}
|
|
1030
|
+
.loom-bb-chev {
|
|
1031
|
+
opacity: 0.45;
|
|
1032
|
+
color: #8f959e;
|
|
1033
|
+
transition: transform 0.22s ease;
|
|
1034
|
+
}
|
|
1035
|
+
.loom-bubble .loom-bb-row > button > .loom-icon.loom-bb-chev,
|
|
1036
|
+
.loom-bb-dd-wrap > button > .loom-icon.loom-bb-chev {
|
|
1037
|
+
width: 12px;
|
|
1038
|
+
height: 12px;
|
|
1039
|
+
}
|
|
1040
|
+
.loom-bb-dd-wrap.is-open .loom-bb-chev {
|
|
1041
|
+
transform: rotate(180deg);
|
|
1042
|
+
}
|
|
1043
|
+
.loom-bb-mark {
|
|
1044
|
+
font-family: Georgia, 'Times New Roman', serif !important;
|
|
1045
|
+
font-size: 14px !important;
|
|
1046
|
+
min-width: 28px !important;
|
|
1047
|
+
padding: 0 !important;
|
|
1048
|
+
color: #1f2329;
|
|
1049
|
+
font-weight: 600 !important;
|
|
1050
|
+
}
|
|
1051
|
+
.loom-bb-bold { font-weight: 700 !important; }
|
|
1052
|
+
.loom-bb-italic { font-style: italic !important; font-weight: 500 !important; }
|
|
1053
|
+
.loom-bb-under { text-decoration: underline; text-underline-offset: 2px; }
|
|
1054
|
+
.loom-bb-strike { text-decoration: line-through; font-weight: 500 !important; }
|
|
1055
|
+
.loom-bb-color .loom-bb-a {
|
|
1056
|
+
display: inline-flex;
|
|
1057
|
+
align-items: center;
|
|
1058
|
+
justify-content: center;
|
|
1059
|
+
min-width: 18px;
|
|
1060
|
+
height: 18px;
|
|
1061
|
+
padding: 0 2px;
|
|
1062
|
+
border-radius: 3px;
|
|
1063
|
+
font: 600 13px/1 Georgia, serif;
|
|
1064
|
+
}
|
|
1065
|
+
/* 格式栏 AI 钮(图标+文案,显眼) */
|
|
1066
|
+
.loom-bb-ai {
|
|
1067
|
+
color: #3370ff !important;
|
|
1068
|
+
min-width: auto !important;
|
|
1069
|
+
padding: 0 8px !important;
|
|
1070
|
+
gap: 4px !important;
|
|
1071
|
+
font: 500 12px/1 system-ui, -apple-system, 'Segoe UI', sans-serif !important;
|
|
1072
|
+
}
|
|
1073
|
+
.loom-bb-ai:hover {
|
|
1074
|
+
background: rgba(51, 112, 255, 0.12) !important;
|
|
1075
|
+
}
|
|
1076
|
+
.loom-bb-ai-lab {
|
|
1077
|
+
letter-spacing: 0.02em;
|
|
1078
|
+
}
|
|
1079
|
+
.loom-bb-ai > .loom-icon {
|
|
1080
|
+
width: 14px !important;
|
|
1081
|
+
height: 14px !important;
|
|
1082
|
+
}
|
|
1083
|
+
/* tip:轻量、晚出现,不抢戏 */
|
|
1084
|
+
.loom-bubble-tip {
|
|
1085
|
+
display: none;
|
|
1086
|
+
position: absolute;
|
|
1087
|
+
left: 50%;
|
|
1088
|
+
bottom: calc(100% + 6px);
|
|
1089
|
+
transform: translateX(-50%);
|
|
1090
|
+
z-index: 2;
|
|
1091
|
+
min-width: max-content;
|
|
1092
|
+
max-width: 200px;
|
|
1093
|
+
padding: 6px 8px;
|
|
1094
|
+
border-radius: 6px;
|
|
1095
|
+
background: rgba(31, 35, 41, 0.88);
|
|
1096
|
+
color: #fff;
|
|
1097
|
+
font: 400 12px/1.4 system-ui, sans-serif;
|
|
1098
|
+
pointer-events: none;
|
|
1099
|
+
white-space: nowrap;
|
|
1100
|
+
}
|
|
1101
|
+
.loom-bubble-tip::after { display: none; }
|
|
1102
|
+
.loom-bubble-tip-t { font-weight: 400; }
|
|
1103
|
+
.loom-bubble-tip-md {
|
|
1104
|
+
margin-top: 2px;
|
|
1105
|
+
opacity: 0.65;
|
|
1106
|
+
font-size: 11px;
|
|
1107
|
+
}
|
|
1108
|
+
.loom-bubble .loom-bb-row > button:hover > .loom-bubble-tip,
|
|
1109
|
+
.loom-bb-dd-wrap > button:hover > .loom-bubble-tip {
|
|
1110
|
+
display: block;
|
|
1111
|
+
}
|
|
1112
|
+
.loom-bb-dd-wrap.is-open > button > .loom-bubble-tip {
|
|
1113
|
+
display: none !important;
|
|
1114
|
+
}
|
|
1115
|
+
/* 下拉:轻边轻影,自上淡入 */
|
|
1116
|
+
.loom-bb-menu {
|
|
1117
|
+
display: flex;
|
|
1118
|
+
position: absolute;
|
|
1119
|
+
top: calc(100% + 4px);
|
|
1120
|
+
left: 0;
|
|
1121
|
+
z-index: 5;
|
|
1122
|
+
flex-direction: column;
|
|
1123
|
+
gap: 1px;
|
|
1124
|
+
padding: 6px;
|
|
1125
|
+
min-width: 200px;
|
|
1126
|
+
border-radius: 8px;
|
|
1127
|
+
border: 1px solid #dee0e3;
|
|
1128
|
+
background: #fff;
|
|
1129
|
+
box-shadow: 0 2px 8px rgba(31, 35, 41, 0.08), 0 8px 24px rgba(31, 35, 41, 0.08);
|
|
1130
|
+
opacity: 0;
|
|
1131
|
+
visibility: hidden;
|
|
1132
|
+
pointer-events: none;
|
|
1133
|
+
transform: translateY(-4px);
|
|
1134
|
+
transition: opacity 0.12s ease, transform 0.14s ease, visibility 0s linear 0.14s;
|
|
1135
|
+
}
|
|
1136
|
+
.loom-bb-menu.is-open {
|
|
1137
|
+
opacity: 1;
|
|
1138
|
+
visibility: visible;
|
|
1139
|
+
pointer-events: auto;
|
|
1140
|
+
transform: translateY(0);
|
|
1141
|
+
transition: opacity 0.12s ease, transform 0.14s ease, visibility 0s;
|
|
1142
|
+
}
|
|
1143
|
+
.loom-bb-menu-item {
|
|
1144
|
+
display: flex;
|
|
1145
|
+
align-items: center;
|
|
1146
|
+
gap: 10px;
|
|
1147
|
+
width: 100%;
|
|
1148
|
+
min-height: 36px;
|
|
1149
|
+
padding: 6px 10px;
|
|
1150
|
+
border: none;
|
|
1151
|
+
border-radius: 6px;
|
|
1152
|
+
background: transparent;
|
|
1153
|
+
color: #1f2329;
|
|
1154
|
+
font: 400 14px/1.2 system-ui, -apple-system, 'Segoe UI', sans-serif;
|
|
1155
|
+
cursor: pointer;
|
|
1156
|
+
text-align: left;
|
|
1157
|
+
}
|
|
1158
|
+
.loom-bb-menu-item:hover {
|
|
1159
|
+
background: #eff0f1;
|
|
1160
|
+
}
|
|
1161
|
+
.loom-bb-menu-item.is-on {
|
|
1162
|
+
color: #3370ff;
|
|
1163
|
+
background: transparent;
|
|
1164
|
+
}
|
|
1165
|
+
.loom-bb-menu-item.is-on:hover {
|
|
1166
|
+
background: #eff0f1;
|
|
1167
|
+
}
|
|
1168
|
+
.loom-bb-menu-ico {
|
|
1169
|
+
width: 20px;
|
|
1170
|
+
display: inline-flex;
|
|
1171
|
+
align-items: center;
|
|
1172
|
+
justify-content: center;
|
|
1173
|
+
flex: none;
|
|
1174
|
+
color: #646a73;
|
|
1175
|
+
}
|
|
1176
|
+
.loom-bb-menu-item.is-on .loom-bb-menu-ico {
|
|
1177
|
+
color: #3370ff;
|
|
1178
|
+
}
|
|
1179
|
+
.loom-bb-menu-lab { flex: 1; }
|
|
1180
|
+
.loom-bb-menu-check {
|
|
1181
|
+
width: 16px;
|
|
1182
|
+
display: inline-flex;
|
|
1183
|
+
color: #3370ff;
|
|
1184
|
+
}
|
|
1185
|
+
.loom-bb-menu-sep {
|
|
1186
|
+
height: 1px;
|
|
1187
|
+
margin: 4px 8px;
|
|
1188
|
+
background: #eff0f1;
|
|
1189
|
+
}
|
|
1190
|
+
.loom-bb-hico {
|
|
1191
|
+
font: 600 13px/1 system-ui, sans-serif;
|
|
1192
|
+
letter-spacing: -0.02em;
|
|
1193
|
+
}
|
|
1194
|
+
.loom-bb-hico sub {
|
|
1195
|
+
font-size: 9px;
|
|
1196
|
+
vertical-align: baseline;
|
|
1197
|
+
position: relative;
|
|
1198
|
+
top: 0.2em;
|
|
1199
|
+
}
|
|
1200
|
+
/* 色板 */
|
|
1201
|
+
.loom-bb-menu-color {
|
|
1202
|
+
left: auto;
|
|
1203
|
+
right: 0;
|
|
1204
|
+
min-width: 260px;
|
|
1205
|
+
padding: 12px;
|
|
1206
|
+
gap: 0;
|
|
1207
|
+
}
|
|
1208
|
+
.loom-bb-color-sec {
|
|
1209
|
+
font: 400 13px/1 system-ui, sans-serif;
|
|
1210
|
+
color: #8f959e;
|
|
1211
|
+
margin: 0 0 8px;
|
|
1212
|
+
}
|
|
1213
|
+
.loom-bb-color-sec + .loom-bb-swatches + .loom-bb-color-sec {
|
|
1214
|
+
margin-top: 12px;
|
|
1215
|
+
}
|
|
1216
|
+
.loom-bb-swatches {
|
|
1217
|
+
display: flex;
|
|
1218
|
+
flex-wrap: wrap;
|
|
1219
|
+
gap: 8px;
|
|
1220
|
+
}
|
|
1221
|
+
.loom-bb-font-row {
|
|
1222
|
+
gap: 6px;
|
|
1223
|
+
}
|
|
1224
|
+
.loom-bb-font-a {
|
|
1225
|
+
width: 26px;
|
|
1226
|
+
height: 26px;
|
|
1227
|
+
border-radius: 4px;
|
|
1228
|
+
border: 1px solid #dee0e3;
|
|
1229
|
+
background: #fff;
|
|
1230
|
+
padding: 0;
|
|
1231
|
+
cursor: pointer;
|
|
1232
|
+
font: 600 13px/1 Georgia, 'Times New Roman', serif;
|
|
1233
|
+
display: inline-flex;
|
|
1234
|
+
align-items: center;
|
|
1235
|
+
justify-content: center;
|
|
1236
|
+
}
|
|
1237
|
+
.loom-bb-font-a:hover {
|
|
1238
|
+
border-color: #c9cdd4;
|
|
1239
|
+
}
|
|
1240
|
+
.loom-bb-font-a.is-on {
|
|
1241
|
+
border-color: #3370ff;
|
|
1242
|
+
box-shadow: inset 0 0 0 1px #3370ff;
|
|
1243
|
+
}
|
|
1244
|
+
.loom-bb-swatch {
|
|
1245
|
+
width: 26px;
|
|
1246
|
+
height: 26px;
|
|
1247
|
+
border-radius: 4px;
|
|
1248
|
+
border: none;
|
|
1249
|
+
padding: 0;
|
|
1250
|
+
cursor: pointer;
|
|
1251
|
+
background: #fff;
|
|
1252
|
+
}
|
|
1253
|
+
.loom-bb-swatch.is-on {
|
|
1254
|
+
box-shadow: 0 0 0 1.5px #fff, 0 0 0 3px #3370ff;
|
|
1255
|
+
}
|
|
1256
|
+
.loom-bb-swatch-none,
|
|
1257
|
+
.loom-bb-swatch[data-edge] {
|
|
1258
|
+
border: 1px solid #dee0e3;
|
|
1259
|
+
}
|
|
1260
|
+
.loom-bb-swatch-none.is-on,
|
|
1261
|
+
.loom-bb-swatch[data-edge].is-on {
|
|
1262
|
+
border-color: #3370ff;
|
|
1263
|
+
box-shadow: none;
|
|
1264
|
+
}
|
|
1265
|
+
.loom-bb-swatch-none {
|
|
1266
|
+
position: relative;
|
|
1267
|
+
background:
|
|
1268
|
+
linear-gradient(
|
|
1269
|
+
to top right,
|
|
1270
|
+
transparent calc(50% - 0.5px),
|
|
1271
|
+
#f54a45 50%,
|
|
1272
|
+
transparent calc(50% + 0.5px)
|
|
1273
|
+
),
|
|
1274
|
+
#fff;
|
|
1275
|
+
}
|
|
1276
|
+
.loom-bb-reset {
|
|
1277
|
+
width: 100%;
|
|
1278
|
+
margin-top: 12px;
|
|
1279
|
+
height: 32px;
|
|
1280
|
+
border: 1px solid #dee0e3;
|
|
1281
|
+
border-radius: 6px;
|
|
1282
|
+
background: #fff;
|
|
1283
|
+
color: #1f2329;
|
|
1284
|
+
font: 400 14px/1 system-ui, -apple-system, 'Segoe UI', sans-serif;
|
|
1285
|
+
cursor: pointer;
|
|
1286
|
+
}
|
|
1287
|
+
.loom-bb-reset:hover {
|
|
1288
|
+
background: #f5f6f7;
|
|
1289
|
+
}
|
|
1290
|
+
@media (prefers-color-scheme: dark) {
|
|
1291
|
+
.loom-bubble {
|
|
1292
|
+
background: #2b2b2b;
|
|
1293
|
+
border-color: rgba(255, 255, 255, 0.1);
|
|
1294
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
|
|
1295
|
+
}
|
|
1296
|
+
.loom-bubble .loom-bb-row > button,
|
|
1297
|
+
.loom-bb-dd-wrap > button {
|
|
1298
|
+
color: rgba(255, 255, 255, 0.65);
|
|
1299
|
+
}
|
|
1300
|
+
.loom-bb-t,
|
|
1301
|
+
.loom-bb-mark { color: rgba(255, 255, 255, 0.88); }
|
|
1302
|
+
.loom-bubble .loom-bb-row > button:hover,
|
|
1303
|
+
.loom-bb-dd-wrap > button:hover,
|
|
1304
|
+
.loom-bb-dd-wrap.is-open > button {
|
|
1305
|
+
background: rgba(255, 255, 255, 0.08);
|
|
1306
|
+
}
|
|
1307
|
+
.loom-bubble .loom-bb-row > button[data-active] {
|
|
1308
|
+
background: rgba(76, 139, 245, 0.16);
|
|
1309
|
+
color: #7aafff;
|
|
1310
|
+
}
|
|
1311
|
+
.loom-bubble-sep { background: rgba(255, 255, 255, 0.1); }
|
|
1312
|
+
.loom-bb-menu {
|
|
1313
|
+
background: #2b2b2b;
|
|
1314
|
+
border-color: rgba(255, 255, 255, 0.1);
|
|
1315
|
+
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
|
|
1316
|
+
}
|
|
1317
|
+
.loom-bb-menu-item { color: rgba(255, 255, 255, 0.88); }
|
|
1318
|
+
.loom-bb-menu-item:hover { background: rgba(255, 255, 255, 0.06); }
|
|
1319
|
+
.loom-bb-menu-item.is-on {
|
|
1320
|
+
color: #7aafff;
|
|
1321
|
+
background: transparent;
|
|
1322
|
+
}
|
|
1323
|
+
.loom-bb-menu-ico { color: rgba(255, 255, 255, 0.55); }
|
|
1324
|
+
.loom-bb-menu-item.is-on .loom-bb-menu-ico { color: #7aafff; }
|
|
1325
|
+
.loom-bb-menu-sep { background: rgba(255, 255, 255, 0.08); }
|
|
1326
|
+
.loom-bb-color-sec { color: rgba(255, 255, 255, 0.45); }
|
|
1327
|
+
.loom-bb-font-a {
|
|
1328
|
+
background: #1f1f1f;
|
|
1329
|
+
border-color: rgba(255, 255, 255, 0.12);
|
|
1330
|
+
}
|
|
1331
|
+
.loom-bb-swatch-none,
|
|
1332
|
+
.loom-bb-swatch[data-edge] {
|
|
1333
|
+
border-color: rgba(255, 255, 255, 0.14);
|
|
1334
|
+
}
|
|
1335
|
+
.loom-bb-swatch-none {
|
|
1336
|
+
background:
|
|
1337
|
+
linear-gradient(
|
|
1338
|
+
to top right,
|
|
1339
|
+
transparent calc(50% - 0.5px),
|
|
1340
|
+
#f54a45 50%,
|
|
1341
|
+
transparent calc(50% + 0.5px)
|
|
1342
|
+
),
|
|
1343
|
+
#1f1f1f;
|
|
1344
|
+
}
|
|
1345
|
+
.loom-bb-reset {
|
|
1346
|
+
background: transparent;
|
|
1347
|
+
border-color: rgba(255, 255, 255, 0.12);
|
|
1348
|
+
color: rgba(255, 255, 255, 0.88);
|
|
1349
|
+
}
|
|
1350
|
+
.loom-bb-reset:hover { background: rgba(255, 255, 255, 0.06); }
|
|
1351
|
+
}
|
|
1352
|
+
/* 操作栏内:拖柄 / + (尺寸统一 18×20, 与 H 胶囊同高对齐中) */
|
|
1353
|
+
.loom-drag-handle {
|
|
1354
|
+
display: inline-flex;
|
|
1355
|
+
align-items: center;
|
|
1356
|
+
justify-content: center;
|
|
1357
|
+
width: 18px;
|
|
1358
|
+
height: 20px;
|
|
1359
|
+
padding: 0;
|
|
1360
|
+
border: none;
|
|
1361
|
+
border-radius: 4px;
|
|
1362
|
+
background: transparent;
|
|
1363
|
+
color: #8f959e;
|
|
1364
|
+
cursor: grab;
|
|
1365
|
+
user-select: none;
|
|
1366
|
+
}
|
|
1367
|
+
.loom-drag-handle svg {
|
|
1368
|
+
display: block;
|
|
1369
|
+
}
|
|
1370
|
+
.loom-drag-handle:hover {
|
|
1371
|
+
background: rgba(31, 35, 41, 0.06);
|
|
1372
|
+
color: #646a73;
|
|
1373
|
+
}
|
|
1374
|
+
.loom-drag-handle:active {
|
|
1375
|
+
cursor: grabbing;
|
|
1376
|
+
background: rgba(31, 35, 41, 0.1);
|
|
1377
|
+
}
|
|
1378
|
+
.loom-add-handle {
|
|
1379
|
+
display: inline-flex;
|
|
1380
|
+
align-items: center;
|
|
1381
|
+
justify-content: center;
|
|
1382
|
+
width: 18px;
|
|
1383
|
+
height: 20px;
|
|
1384
|
+
padding: 0;
|
|
1385
|
+
border: none;
|
|
1386
|
+
border-radius: 4px;
|
|
1387
|
+
background: transparent;
|
|
1388
|
+
color: #8f959e;
|
|
1389
|
+
font: 500 15px/20px system-ui, sans-serif;
|
|
1390
|
+
cursor: pointer;
|
|
1391
|
+
user-select: none;
|
|
1392
|
+
}
|
|
1393
|
+
.loom-add-handle:hover {
|
|
1394
|
+
background: rgba(31, 35, 41, 0.06);
|
|
1395
|
+
color: #646a73;
|
|
1396
|
+
}
|
|
1397
|
+
.loom-drag-drop {
|
|
1398
|
+
position: fixed;
|
|
1399
|
+
height: 2px;
|
|
1400
|
+
background: var(--accent, #3370ff);
|
|
1401
|
+
border-radius: 1px;
|
|
1402
|
+
pointer-events: none;
|
|
1403
|
+
z-index: 66;
|
|
1404
|
+
}
|
|
1405
|
+
@media (prefers-color-scheme: dark) {
|
|
1406
|
+
.loom-block-kind {
|
|
1407
|
+
background: rgba(255, 255, 255, 0.1);
|
|
1408
|
+
color: rgba(255, 255, 255, 0.55);
|
|
1409
|
+
}
|
|
1410
|
+
.loom-drag-handle,
|
|
1411
|
+
.loom-add-handle {
|
|
1412
|
+
color: rgba(255, 255, 255, 0.4);
|
|
1413
|
+
}
|
|
1414
|
+
.loom-drag-handle:hover,
|
|
1415
|
+
.loom-add-handle:hover {
|
|
1416
|
+
background: rgba(255, 255, 255, 0.08);
|
|
1417
|
+
color: rgba(255, 255, 255, 0.7);
|
|
1418
|
+
}
|
|
1419
|
+
.loom-doc .loom-heading:focus-within {
|
|
1420
|
+
background: rgba(76, 139, 245, 0.12);
|
|
1421
|
+
}
|
|
1422
|
+
.loom-block-bar .loom-heading-fold path {
|
|
1423
|
+
fill: #fff;
|
|
1424
|
+
}
|
|
1425
|
+
.loom-block-bar .loom-heading-fold:hover {
|
|
1426
|
+
background: rgba(255, 255, 255, 0.1);
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1429
|
+
/* ─── 飞书式链接浮层:选区旁 输入+确认,无遮罩 ─── */
|
|
1430
|
+
.loom-link-pop-host {
|
|
1431
|
+
position: fixed;
|
|
1432
|
+
left: 0;
|
|
1433
|
+
top: 0;
|
|
1434
|
+
z-index: 120;
|
|
1435
|
+
pointer-events: none;
|
|
1436
|
+
}
|
|
1437
|
+
.loom-link-pop {
|
|
1438
|
+
position: fixed;
|
|
1439
|
+
display: flex;
|
|
1440
|
+
align-items: center;
|
|
1441
|
+
gap: 10px;
|
|
1442
|
+
padding: 12px 14px;
|
|
1443
|
+
border-radius: 8px;
|
|
1444
|
+
border: 1px solid #dee0e3;
|
|
1445
|
+
background: #fff;
|
|
1446
|
+
box-shadow: 0 2px 8px rgba(31, 35, 41, 0.08), 0 8px 24px rgba(31, 35, 41, 0.08);
|
|
1447
|
+
pointer-events: auto;
|
|
1448
|
+
opacity: 0;
|
|
1449
|
+
transform: translateY(-4px);
|
|
1450
|
+
animation: loom-link-pop-in 0.14s ease forwards;
|
|
1451
|
+
}
|
|
1452
|
+
@keyframes loom-link-pop-in {
|
|
1453
|
+
to { opacity: 1; transform: translateY(0); }
|
|
1454
|
+
}
|
|
1455
|
+
.loom-link-pop-input {
|
|
1456
|
+
width: 280px;
|
|
1457
|
+
height: 36px;
|
|
1458
|
+
box-sizing: border-box;
|
|
1459
|
+
margin: 0;
|
|
1460
|
+
padding: 0 12px;
|
|
1461
|
+
border: 1px solid #3370ff;
|
|
1462
|
+
border-radius: 6px;
|
|
1463
|
+
background: #fff;
|
|
1464
|
+
color: #1f2329;
|
|
1465
|
+
font: 400 14px/1 system-ui, -apple-system, 'Segoe UI', sans-serif;
|
|
1466
|
+
outline: none;
|
|
1467
|
+
box-shadow: 0 0 0 2px rgba(51, 112, 255, 0.12);
|
|
1468
|
+
}
|
|
1469
|
+
.loom-link-pop-input::placeholder {
|
|
1470
|
+
color: #8f959e;
|
|
1471
|
+
}
|
|
1472
|
+
.loom-link-pop-ok {
|
|
1473
|
+
flex: none;
|
|
1474
|
+
height: 36px;
|
|
1475
|
+
min-width: 72px;
|
|
1476
|
+
padding: 0 16px;
|
|
1477
|
+
border: none;
|
|
1478
|
+
border-radius: 6px;
|
|
1479
|
+
background: #bbbfc4;
|
|
1480
|
+
color: #fff;
|
|
1481
|
+
font: 500 14px/1 system-ui, -apple-system, 'Segoe UI', sans-serif;
|
|
1482
|
+
cursor: not-allowed;
|
|
1483
|
+
}
|
|
1484
|
+
.loom-link-pop-ok.is-ready {
|
|
1485
|
+
background: #3370ff;
|
|
1486
|
+
cursor: pointer;
|
|
1487
|
+
}
|
|
1488
|
+
.loom-link-pop-ok.is-ready:hover {
|
|
1489
|
+
background: #2b5fd9;
|
|
1490
|
+
}
|
|
1491
|
+
@media (prefers-color-scheme: dark) {
|
|
1492
|
+
.loom-link-pop {
|
|
1493
|
+
background: #2b2b2b;
|
|
1494
|
+
border-color: rgba(255, 255, 255, 0.1);
|
|
1495
|
+
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
|
|
1496
|
+
}
|
|
1497
|
+
.loom-link-pop-input {
|
|
1498
|
+
background: #1f1f1f;
|
|
1499
|
+
color: rgba(255, 255, 255, 0.9);
|
|
1500
|
+
border-color: #4c8bf5;
|
|
1501
|
+
box-shadow: 0 0 0 2px rgba(76, 139, 245, 0.2);
|
|
1502
|
+
}
|
|
1503
|
+
.loom-link-pop-input::placeholder {
|
|
1504
|
+
color: rgba(255, 255, 255, 0.4);
|
|
1505
|
+
}
|
|
1506
|
+
.loom-link-pop-ok { background: #5c5c5c; }
|
|
1507
|
+
.loom-link-pop-ok.is-ready { background: #4c8bf5; }
|
|
1508
|
+
.loom-link-pop-ok.is-ready:hover { background: #3d7ae0; }
|
|
1509
|
+
}
|
|
1510
|
+
|
|
1511
|
+
/* ─── 输入弹层(替代 window.prompt):公式·色号·表样式 ─── */
|
|
1512
|
+
.loom-prompt-mask {
|
|
1513
|
+
position: fixed;
|
|
1514
|
+
inset: 0;
|
|
1515
|
+
z-index: 200;
|
|
1516
|
+
display: flex;
|
|
1517
|
+
align-items: center;
|
|
1518
|
+
justify-content: center;
|
|
1519
|
+
padding: 24px;
|
|
1520
|
+
background: rgba(15, 17, 21, 0.45);
|
|
1521
|
+
backdrop-filter: blur(2px);
|
|
1522
|
+
animation: loom-prompt-in 0.12s ease-out;
|
|
1523
|
+
}
|
|
1524
|
+
@keyframes loom-prompt-in {
|
|
1525
|
+
from { opacity: 0; }
|
|
1526
|
+
to { opacity: 1; }
|
|
1527
|
+
}
|
|
1528
|
+
.loom-prompt-card {
|
|
1529
|
+
width: min(400px, 100%);
|
|
1530
|
+
padding: 20px 20px 16px;
|
|
1531
|
+
border-radius: 12px;
|
|
1532
|
+
border: 1px solid rgba(0, 0, 0, 0.06);
|
|
1533
|
+
background: var(--bg-page, #fff);
|
|
1534
|
+
box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.06);
|
|
1535
|
+
font: 400 14px/1.45 system-ui, -apple-system, 'Segoe UI', sans-serif;
|
|
1536
|
+
color: var(--text-a, #1f2328);
|
|
1537
|
+
animation: loom-prompt-card-in 0.14s ease-out;
|
|
1538
|
+
}
|
|
1539
|
+
@keyframes loom-prompt-card-in {
|
|
1540
|
+
from { opacity: 0; transform: translateY(6px) scale(0.98); }
|
|
1541
|
+
to { opacity: 1; transform: none; }
|
|
1542
|
+
}
|
|
1543
|
+
.loom-prompt-title {
|
|
1544
|
+
font: 600 16px/1.3 system-ui, sans-serif;
|
|
1545
|
+
color: var(--text-a, #1f2328);
|
|
1546
|
+
margin: 0 0 6px;
|
|
1547
|
+
}
|
|
1548
|
+
.loom-prompt-desc {
|
|
1549
|
+
font-size: 13px;
|
|
1550
|
+
color: var(--text-b, rgba(0, 0, 0, 0.55));
|
|
1551
|
+
margin: 0 0 14px;
|
|
1552
|
+
}
|
|
1553
|
+
.loom-prompt-input {
|
|
1554
|
+
display: block;
|
|
1555
|
+
width: 100%;
|
|
1556
|
+
box-sizing: border-box;
|
|
1557
|
+
margin: 0 0 8px;
|
|
1558
|
+
padding: 10px 12px;
|
|
1559
|
+
border: 1px solid rgba(0, 0, 0, 0.12);
|
|
1560
|
+
border-radius: 8px;
|
|
1561
|
+
background: var(--bg-side, #f7f7f8);
|
|
1562
|
+
color: var(--text-a, #1f2328);
|
|
1563
|
+
font: 400 14px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
1564
|
+
outline: none;
|
|
1565
|
+
resize: vertical;
|
|
1566
|
+
transition: border-color 0.12s, box-shadow 0.12s, background 0.12s;
|
|
1567
|
+
}
|
|
1568
|
+
.loom-prompt-input:focus {
|
|
1569
|
+
border-color: var(--accent, #3370ff);
|
|
1570
|
+
background: #fff;
|
|
1571
|
+
box-shadow: 0 0 0 3px rgba(51, 112, 255, 0.15);
|
|
1572
|
+
}
|
|
1573
|
+
.loom-prompt-input-err {
|
|
1574
|
+
border-color: #e11d48 !important;
|
|
1575
|
+
box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.12) !important;
|
|
1576
|
+
}
|
|
1577
|
+
.loom-prompt-err {
|
|
1578
|
+
font-size: 12px;
|
|
1579
|
+
color: #e11d48;
|
|
1580
|
+
margin: -2px 0 8px;
|
|
1581
|
+
}
|
|
1582
|
+
.loom-prompt-ft {
|
|
1583
|
+
display: flex;
|
|
1584
|
+
justify-content: flex-end;
|
|
1585
|
+
gap: 8px;
|
|
1586
|
+
margin-top: 12px;
|
|
1587
|
+
}
|
|
1588
|
+
.loom-prompt-btn {
|
|
1589
|
+
height: 34px;
|
|
1590
|
+
padding: 0 16px;
|
|
1591
|
+
border-radius: 8px;
|
|
1592
|
+
border: none;
|
|
1593
|
+
font: 500 13px/1 system-ui, sans-serif;
|
|
1594
|
+
cursor: pointer;
|
|
1595
|
+
}
|
|
1596
|
+
.loom-prompt-btn-primary {
|
|
1597
|
+
background: var(--accent, #3370ff);
|
|
1598
|
+
color: #fff;
|
|
1599
|
+
}
|
|
1600
|
+
.loom-prompt-btn-primary:hover {
|
|
1601
|
+
filter: brightness(1.06);
|
|
1602
|
+
}
|
|
1603
|
+
.loom-prompt-btn-ghost {
|
|
1604
|
+
background: transparent;
|
|
1605
|
+
color: var(--text-b, rgba(0, 0, 0, 0.55));
|
|
1606
|
+
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
1607
|
+
}
|
|
1608
|
+
.loom-prompt-btn-ghost:hover {
|
|
1609
|
+
background: var(--bg-hover, rgba(0, 0, 0, 0.04));
|
|
1610
|
+
}
|
|
1611
|
+
@media (prefers-color-scheme: dark) {
|
|
1612
|
+
.loom-prompt-mask { background: rgba(0, 0, 0, 0.55); }
|
|
1613
|
+
.loom-prompt-card {
|
|
1614
|
+
border-color: rgba(255, 255, 255, 0.08);
|
|
1615
|
+
box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
|
|
1616
|
+
}
|
|
1617
|
+
.loom-prompt-input {
|
|
1618
|
+
border-color: rgba(255, 255, 255, 0.12);
|
|
1619
|
+
background: var(--bg-side, #212121);
|
|
1620
|
+
}
|
|
1621
|
+
.loom-prompt-input:focus { background: var(--bg-page, #2a2a2a); }
|
|
1622
|
+
.loom-prompt-btn-ghost { border-color: rgba(255, 255, 255, 0.12); }
|
|
1623
|
+
}
|
|
1624
|
+
|
|
1625
|
+
/* 斜杠命令菜单:行首打 `/` 浮出块类型列表(fixed,place 算坐标)。分组标头 + 单色线性图标 + label。 */
|
|
1626
|
+
.loom-slash {
|
|
1627
|
+
position: fixed;
|
|
1628
|
+
display: flex;
|
|
1629
|
+
flex-direction: column;
|
|
1630
|
+
min-width: 240px;
|
|
1631
|
+
max-height: 380px;
|
|
1632
|
+
overflow-y: auto;
|
|
1633
|
+
padding: 8px;
|
|
1634
|
+
border-radius: 14px;
|
|
1635
|
+
border: 1px solid var(--slash-border, rgba(0, 0, 0, 0.08));
|
|
1636
|
+
background: var(--slash-bg, #fff);
|
|
1637
|
+
box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
|
|
1638
|
+
z-index: 100;
|
|
1639
|
+
user-select: none;
|
|
1640
|
+
}
|
|
1641
|
+
.loom-slash-section {
|
|
1642
|
+
padding: 10px 12px 4px;
|
|
1643
|
+
font: 600 11px/1 system-ui, sans-serif;
|
|
1644
|
+
letter-spacing: 0.08em;
|
|
1645
|
+
color: var(--slash-section, #9aa0a6);
|
|
1646
|
+
text-transform: uppercase;
|
|
1647
|
+
}
|
|
1648
|
+
.loom-slash button {
|
|
1649
|
+
display: flex;
|
|
1650
|
+
align-items: center;
|
|
1651
|
+
gap: 12px;
|
|
1652
|
+
padding: 8px 12px;
|
|
1653
|
+
border: none;
|
|
1654
|
+
border-radius: 8px;
|
|
1655
|
+
background: transparent;
|
|
1656
|
+
color: var(--slash-text, #1f2328);
|
|
1657
|
+
font: 500 15px/1.2 system-ui, sans-serif;
|
|
1658
|
+
text-align: left;
|
|
1659
|
+
cursor: pointer;
|
|
1660
|
+
}
|
|
1661
|
+
.loom-slash button:hover,
|
|
1662
|
+
.loom-slash button[data-active] {
|
|
1663
|
+
background: var(--slash-active, rgba(0, 0, 0, 0.05));
|
|
1664
|
+
}
|
|
1665
|
+
.loom-slash-icon {
|
|
1666
|
+
flex: none;
|
|
1667
|
+
width: 22px;
|
|
1668
|
+
display: flex;
|
|
1669
|
+
align-items: center;
|
|
1670
|
+
justify-content: center;
|
|
1671
|
+
color: var(--slash-icon, #6b7075);
|
|
1672
|
+
}
|
|
1673
|
+
.loom-slash-htxt {
|
|
1674
|
+
font: 700 14px/1 system-ui, sans-serif;
|
|
1675
|
+
}
|
|
1676
|
+
.loom-slash-htxt sub {
|
|
1677
|
+
font-size: 9px;
|
|
1678
|
+
font-weight: 700;
|
|
1679
|
+
}
|
|
1680
|
+
/* 公式:行内 atom。默认展示 $latex$ 源文;host 注入 KaTeX 后为渲染结果。 */
|
|
1681
|
+
.loom-math {
|
|
1682
|
+
font-family: 'Latin Modern Math', 'Cambria Math', 'Times New Roman', serif;
|
|
1683
|
+
padding: 0 2px;
|
|
1684
|
+
border-radius: 3px;
|
|
1685
|
+
background: var(--math-bg, rgba(0, 0, 0, 0.04));
|
|
1686
|
+
cursor: pointer;
|
|
1687
|
+
white-space: nowrap;
|
|
1688
|
+
}
|
|
1689
|
+
.loom-math-block {
|
|
1690
|
+
display: block;
|
|
1691
|
+
text-align: center;
|
|
1692
|
+
padding: 0.6em 0.4em;
|
|
1693
|
+
margin: 0.4em 0;
|
|
1694
|
+
white-space: normal;
|
|
1695
|
+
overflow-x: auto;
|
|
1696
|
+
}
|
|
1697
|
+
|
|
1698
|
+
/* 嵌入块:youtube/twitch iframe · audio · file */
|
|
1699
|
+
.loom-embed {
|
|
1700
|
+
margin: 0.75rem 0;
|
|
1701
|
+
border-radius: 8px;
|
|
1702
|
+
overflow: hidden;
|
|
1703
|
+
background: var(--bg-side, #f5f5f5);
|
|
1704
|
+
}
|
|
1705
|
+
.loom-embed[data-selected] {
|
|
1706
|
+
outline: 2px solid var(--accent, #1456f0);
|
|
1707
|
+
outline-offset: 2px;
|
|
1708
|
+
}
|
|
1709
|
+
.loom-embed-frame {
|
|
1710
|
+
display: block;
|
|
1711
|
+
width: 100%;
|
|
1712
|
+
aspect-ratio: 16 / 9;
|
|
1713
|
+
border: 0;
|
|
1714
|
+
background: #000;
|
|
1715
|
+
}
|
|
1716
|
+
.loom-embed-audio {
|
|
1717
|
+
display: block;
|
|
1718
|
+
width: 100%;
|
|
1719
|
+
padding: 8px;
|
|
1720
|
+
}
|
|
1721
|
+
.loom-embed-file {
|
|
1722
|
+
padding: 10px 14px;
|
|
1723
|
+
border: 1px solid var(--loom-table-line, rgba(0, 0, 0, 0.1));
|
|
1724
|
+
}
|
|
1725
|
+
.loom-embed-file-link {
|
|
1726
|
+
color: var(--text-a, inherit);
|
|
1727
|
+
text-decoration: none;
|
|
1728
|
+
font: 500 14px/1.4 system-ui, sans-serif;
|
|
1729
|
+
display: inline-flex;
|
|
1730
|
+
align-items: center;
|
|
1731
|
+
gap: 6px;
|
|
1732
|
+
}
|
|
1733
|
+
.loom-embed-file-link:hover {
|
|
1734
|
+
text-decoration: underline;
|
|
1735
|
+
}
|
|
1736
|
+
.loom-embed-file-ico {
|
|
1737
|
+
flex: none;
|
|
1738
|
+
}
|
|
1739
|
+
|
|
1740
|
+
/* @mention 行内 atom:文本流里的高亮 chip(contentEditable=false,占 1 字符位)。 */
|
|
1741
|
+
.loom-mention {
|
|
1742
|
+
color: var(--mention-text, #1a56db);
|
|
1743
|
+
background: var(--mention-bg, rgba(26, 86, 219, 0.08));
|
|
1744
|
+
border-radius: 4px;
|
|
1745
|
+
padding: 0 3px;
|
|
1746
|
+
cursor: pointer;
|
|
1747
|
+
white-space: nowrap;
|
|
1748
|
+
display: inline-flex;
|
|
1749
|
+
align-items: center;
|
|
1750
|
+
gap: 2px;
|
|
1751
|
+
vertical-align: baseline;
|
|
1752
|
+
}
|
|
1753
|
+
.loom-mention-ico {
|
|
1754
|
+
display: inline-block;
|
|
1755
|
+
flex: none;
|
|
1756
|
+
vertical-align: -0.1em;
|
|
1757
|
+
}
|
|
1758
|
+
/* @日期:同 mention 的行内 atom,绿色胶囊区分 person。 */
|
|
1759
|
+
.loom-mention-date {
|
|
1760
|
+
color: var(--mention-date-text, #15803d);
|
|
1761
|
+
background: var(--mention-date-bg, rgba(22, 163, 74, 0.1));
|
|
1762
|
+
}
|
|
1763
|
+
|
|
1764
|
+
/* 员工名片(点 @人):飞书式轻卡 */
|
|
1765
|
+
.loom-profile-card {
|
|
1766
|
+
padding: 16px;
|
|
1767
|
+
border-radius: 12px;
|
|
1768
|
+
border: 1px solid rgba(0, 0, 0, 0.06);
|
|
1769
|
+
background: #fff;
|
|
1770
|
+
box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.04);
|
|
1771
|
+
font: 400 13px/1.45 system-ui, -apple-system, 'Segoe UI', sans-serif;
|
|
1772
|
+
color: var(--text-a, #1f2328);
|
|
1773
|
+
user-select: text;
|
|
1774
|
+
}
|
|
1775
|
+
.loom-profile-head {
|
|
1776
|
+
display: flex;
|
|
1777
|
+
gap: 12px;
|
|
1778
|
+
align-items: center;
|
|
1779
|
+
}
|
|
1780
|
+
.loom-profile-avatar {
|
|
1781
|
+
width: 48px;
|
|
1782
|
+
height: 48px;
|
|
1783
|
+
border-radius: 50%;
|
|
1784
|
+
flex: none;
|
|
1785
|
+
object-fit: cover;
|
|
1786
|
+
}
|
|
1787
|
+
.loom-profile-avatar-fallback {
|
|
1788
|
+
display: flex;
|
|
1789
|
+
align-items: center;
|
|
1790
|
+
justify-content: center;
|
|
1791
|
+
background: linear-gradient(135deg, #7c6cf0, #5b8def);
|
|
1792
|
+
color: #fff;
|
|
1793
|
+
font: 600 18px/1 system-ui, sans-serif;
|
|
1794
|
+
}
|
|
1795
|
+
.loom-profile-name {
|
|
1796
|
+
font: 600 15px/1.3 system-ui, sans-serif;
|
|
1797
|
+
color: var(--text-a, #1f2328);
|
|
1798
|
+
}
|
|
1799
|
+
.loom-profile-title,
|
|
1800
|
+
.loom-profile-dept {
|
|
1801
|
+
font-size: 12px;
|
|
1802
|
+
color: var(--text-b, rgba(0, 0, 0, 0.55));
|
|
1803
|
+
margin-top: 2px;
|
|
1804
|
+
}
|
|
1805
|
+
.loom-profile-meta {
|
|
1806
|
+
margin-top: 14px;
|
|
1807
|
+
padding-top: 12px;
|
|
1808
|
+
border-top: 1px solid rgba(0, 0, 0, 0.06);
|
|
1809
|
+
display: flex;
|
|
1810
|
+
flex-direction: column;
|
|
1811
|
+
gap: 8px;
|
|
1812
|
+
}
|
|
1813
|
+
.loom-profile-row {
|
|
1814
|
+
display: flex;
|
|
1815
|
+
gap: 12px;
|
|
1816
|
+
align-items: baseline;
|
|
1817
|
+
}
|
|
1818
|
+
.loom-profile-k {
|
|
1819
|
+
flex: none;
|
|
1820
|
+
width: 36px;
|
|
1821
|
+
font-size: 12px;
|
|
1822
|
+
color: var(--text-c, #999);
|
|
1823
|
+
}
|
|
1824
|
+
.loom-profile-v {
|
|
1825
|
+
font-size: 13px;
|
|
1826
|
+
color: var(--text-a, #1f2328);
|
|
1827
|
+
word-break: break-all;
|
|
1828
|
+
}
|
|
1829
|
+
.loom-profile-link {
|
|
1830
|
+
color: var(--accent, #3370ff);
|
|
1831
|
+
text-decoration: none;
|
|
1832
|
+
}
|
|
1833
|
+
.loom-profile-link:hover { text-decoration: underline; }
|
|
1834
|
+
|
|
1835
|
+
/* 日期选择器(点 @日期) */
|
|
1836
|
+
.loom-date-picker {
|
|
1837
|
+
padding: 12px 14px 10px;
|
|
1838
|
+
border-radius: 12px;
|
|
1839
|
+
border: 1px solid rgba(0, 0, 0, 0.06);
|
|
1840
|
+
background: #fff;
|
|
1841
|
+
box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.04);
|
|
1842
|
+
font: 400 13px/1.4 system-ui, -apple-system, 'Segoe UI', sans-serif;
|
|
1843
|
+
color: var(--text-a, #1f2328);
|
|
1844
|
+
user-select: none;
|
|
1845
|
+
}
|
|
1846
|
+
.loom-date-hd {
|
|
1847
|
+
display: flex;
|
|
1848
|
+
align-items: center;
|
|
1849
|
+
justify-content: space-between;
|
|
1850
|
+
margin-bottom: 10px;
|
|
1851
|
+
}
|
|
1852
|
+
.loom-date-label {
|
|
1853
|
+
font: 600 14px/1 system-ui, sans-serif;
|
|
1854
|
+
}
|
|
1855
|
+
.loom-date-nav {
|
|
1856
|
+
width: 28px;
|
|
1857
|
+
height: 28px;
|
|
1858
|
+
border: none;
|
|
1859
|
+
border-radius: 6px;
|
|
1860
|
+
background: transparent;
|
|
1861
|
+
color: var(--text-b, #666);
|
|
1862
|
+
font-size: 18px;
|
|
1863
|
+
line-height: 1;
|
|
1864
|
+
cursor: pointer;
|
|
1865
|
+
}
|
|
1866
|
+
.loom-date-nav:hover { background: rgba(0, 0, 0, 0.05); }
|
|
1867
|
+
.loom-date-week {
|
|
1868
|
+
display: grid;
|
|
1869
|
+
grid-template-columns: repeat(7, 1fr);
|
|
1870
|
+
gap: 2px;
|
|
1871
|
+
margin-bottom: 4px;
|
|
1872
|
+
text-align: center;
|
|
1873
|
+
font-size: 11px;
|
|
1874
|
+
color: var(--text-c, #999);
|
|
1875
|
+
}
|
|
1876
|
+
.loom-date-grid {
|
|
1877
|
+
display: grid;
|
|
1878
|
+
grid-template-columns: repeat(7, 1fr);
|
|
1879
|
+
gap: 2px;
|
|
1880
|
+
}
|
|
1881
|
+
.loom-date-cell {
|
|
1882
|
+
height: 32px;
|
|
1883
|
+
border: none;
|
|
1884
|
+
border-radius: 6px;
|
|
1885
|
+
background: transparent;
|
|
1886
|
+
color: var(--text-a, #1f2328);
|
|
1887
|
+
font: 400 13px/32px system-ui, sans-serif;
|
|
1888
|
+
text-align: center;
|
|
1889
|
+
cursor: pointer;
|
|
1890
|
+
padding: 0;
|
|
1891
|
+
}
|
|
1892
|
+
.loom-date-cell:hover:not(.loom-date-empty) {
|
|
1893
|
+
background: rgba(0, 0, 0, 0.05);
|
|
1894
|
+
}
|
|
1895
|
+
.loom-date-empty { cursor: default; }
|
|
1896
|
+
.loom-date-today {
|
|
1897
|
+
color: var(--accent, #3370ff);
|
|
1898
|
+
font-weight: 600;
|
|
1899
|
+
}
|
|
1900
|
+
.loom-date-selected {
|
|
1901
|
+
background: var(--accent, #3370ff) !important;
|
|
1902
|
+
color: #fff !important;
|
|
1903
|
+
font-weight: 600;
|
|
1904
|
+
}
|
|
1905
|
+
.loom-time-row {
|
|
1906
|
+
display: flex;
|
|
1907
|
+
align-items: flex-end;
|
|
1908
|
+
justify-content: center;
|
|
1909
|
+
gap: 6px;
|
|
1910
|
+
margin-top: 12px;
|
|
1911
|
+
padding-top: 12px;
|
|
1912
|
+
border-top: 1px solid rgba(0, 0, 0, 0.05);
|
|
1913
|
+
}
|
|
1914
|
+
.loom-time-field {
|
|
1915
|
+
display: flex;
|
|
1916
|
+
flex-direction: column;
|
|
1917
|
+
align-items: center;
|
|
1918
|
+
gap: 4px;
|
|
1919
|
+
}
|
|
1920
|
+
.loom-time-field-lab {
|
|
1921
|
+
font-size: 11px;
|
|
1922
|
+
color: var(--text-c, #999);
|
|
1923
|
+
}
|
|
1924
|
+
.loom-time-input {
|
|
1925
|
+
width: 48px;
|
|
1926
|
+
height: 34px;
|
|
1927
|
+
padding: 0 4px;
|
|
1928
|
+
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
1929
|
+
border-radius: 6px;
|
|
1930
|
+
background: var(--bg-side, #f7f7f8);
|
|
1931
|
+
color: var(--text-a, #1f2328);
|
|
1932
|
+
font: 500 14px/34px ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
1933
|
+
text-align: center;
|
|
1934
|
+
outline: none;
|
|
1935
|
+
/* 藏掉 number 箭头在部分浏览器仍可用滚轮/键入 */
|
|
1936
|
+
-moz-appearance: textfield;
|
|
1937
|
+
}
|
|
1938
|
+
.loom-time-input::-webkit-outer-spin-button,
|
|
1939
|
+
.loom-time-input::-webkit-inner-spin-button {
|
|
1940
|
+
-webkit-appearance: none;
|
|
1941
|
+
margin: 0;
|
|
1942
|
+
}
|
|
1943
|
+
.loom-time-input:focus {
|
|
1944
|
+
border-color: var(--accent, #3370ff);
|
|
1945
|
+
background: #fff;
|
|
1946
|
+
box-shadow: 0 0 0 2px rgba(51, 112, 255, 0.12);
|
|
1947
|
+
}
|
|
1948
|
+
.loom-time-colon {
|
|
1949
|
+
font: 600 16px/34px system-ui, sans-serif;
|
|
1950
|
+
color: var(--text-b, #666);
|
|
1951
|
+
padding-bottom: 2px;
|
|
1952
|
+
}
|
|
1953
|
+
.loom-date-preview {
|
|
1954
|
+
margin-top: 10px;
|
|
1955
|
+
text-align: center;
|
|
1956
|
+
font: 500 13px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
1957
|
+
color: var(--text-b, #555);
|
|
1958
|
+
font-variant-numeric: tabular-nums;
|
|
1959
|
+
}
|
|
1960
|
+
.loom-date-ft {
|
|
1961
|
+
display: flex;
|
|
1962
|
+
align-items: center;
|
|
1963
|
+
justify-content: space-between;
|
|
1964
|
+
margin-top: 12px;
|
|
1965
|
+
padding-top: 10px;
|
|
1966
|
+
border-top: 1px solid rgba(0, 0, 0, 0.05);
|
|
1967
|
+
}
|
|
1968
|
+
.loom-date-today-btn {
|
|
1969
|
+
border: none;
|
|
1970
|
+
background: transparent;
|
|
1971
|
+
color: var(--accent, #3370ff);
|
|
1972
|
+
font: 500 13px/1 system-ui, sans-serif;
|
|
1973
|
+
cursor: pointer;
|
|
1974
|
+
padding: 6px 0;
|
|
1975
|
+
}
|
|
1976
|
+
.loom-date-today-btn:hover { opacity: 0.85; }
|
|
1977
|
+
.loom-date-ok {
|
|
1978
|
+
height: 30px;
|
|
1979
|
+
padding: 0 16px;
|
|
1980
|
+
border: none;
|
|
1981
|
+
border-radius: 6px;
|
|
1982
|
+
background: var(--accent, #3370ff);
|
|
1983
|
+
color: #fff;
|
|
1984
|
+
font: 500 13px/1 system-ui, sans-serif;
|
|
1985
|
+
cursor: pointer;
|
|
1986
|
+
}
|
|
1987
|
+
.loom-date-ok:hover { filter: brightness(1.05); }
|
|
1988
|
+
@media (prefers-color-scheme: dark) {
|
|
1989
|
+
.loom-profile-card,
|
|
1990
|
+
.loom-date-picker {
|
|
1991
|
+
background: var(--bg-page, #2a2a2a);
|
|
1992
|
+
border-color: rgba(255, 255, 255, 0.08);
|
|
1993
|
+
box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
|
|
1994
|
+
}
|
|
1995
|
+
.loom-profile-meta,
|
|
1996
|
+
.loom-date-ft,
|
|
1997
|
+
.loom-time-row { border-top-color: rgba(255, 255, 255, 0.08); }
|
|
1998
|
+
.loom-date-cell:hover:not(.loom-date-empty) { background: rgba(255, 255, 255, 0.08); }
|
|
1999
|
+
.loom-date-nav:hover { background: rgba(255, 255, 255, 0.08); }
|
|
2000
|
+
.loom-time-input {
|
|
2001
|
+
border-color: rgba(255, 255, 255, 0.12);
|
|
2002
|
+
background: var(--bg-side, #212121);
|
|
2003
|
+
}
|
|
2004
|
+
.loom-time-input:focus { background: var(--bg-page, #2a2a2a); }
|
|
2005
|
+
}
|
|
2006
|
+
/* @mention 候选菜单:与 slash 同视觉语言(独立 overlay)。 */
|
|
2007
|
+
.loom-mention-menu {
|
|
2008
|
+
position: fixed;
|
|
2009
|
+
display: flex;
|
|
2010
|
+
flex-direction: column;
|
|
2011
|
+
min-width: 200px;
|
|
2012
|
+
max-height: 300px;
|
|
2013
|
+
overflow-y: auto;
|
|
2014
|
+
padding: 6px;
|
|
2015
|
+
border-radius: 12px;
|
|
2016
|
+
border: 1px solid var(--slash-border, rgba(0, 0, 0, 0.08));
|
|
2017
|
+
background: var(--slash-bg, #fff);
|
|
2018
|
+
box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
|
|
2019
|
+
z-index: 100;
|
|
2020
|
+
user-select: none;
|
|
2021
|
+
}
|
|
2022
|
+
.loom-mention-menu button {
|
|
2023
|
+
padding: 7px 10px;
|
|
2024
|
+
border: none;
|
|
2025
|
+
border-radius: 8px;
|
|
2026
|
+
background: transparent;
|
|
2027
|
+
color: var(--slash-text, #1f2328);
|
|
2028
|
+
font: 500 14px/1.2 system-ui, sans-serif;
|
|
2029
|
+
display: flex;
|
|
2030
|
+
align-items: center;
|
|
2031
|
+
gap: 6px;
|
|
2032
|
+
text-align: left;
|
|
2033
|
+
cursor: pointer;
|
|
2034
|
+
}
|
|
2035
|
+
.loom-mention-menu button:hover,
|
|
2036
|
+
.loom-mention-menu button[data-active] {
|
|
2037
|
+
background: var(--slash-active, rgba(0, 0, 0, 0.05));
|
|
2038
|
+
}
|
|
2039
|
+
|
|
2040
|
+
/* 空块提示:paragraph → slash 引导;heading → H1…H6。::before 灰字,不占位、不进选区 */
|
|
2041
|
+
.loom-doc [data-placeholder] {
|
|
2042
|
+
position: relative;
|
|
2043
|
+
}
|
|
2044
|
+
.loom-doc [data-placeholder]::before {
|
|
2045
|
+
content: attr(data-placeholder);
|
|
2046
|
+
position: absolute;
|
|
2047
|
+
left: 0;
|
|
2048
|
+
top: 0;
|
|
2049
|
+
right: 0;
|
|
2050
|
+
color: #b0b3b8;
|
|
2051
|
+
font-weight: 400;
|
|
2052
|
+
font-style: normal;
|
|
2053
|
+
pointer-events: none;
|
|
2054
|
+
user-select: none;
|
|
2055
|
+
white-space: nowrap;
|
|
2056
|
+
overflow: hidden;
|
|
2057
|
+
text-overflow: ellipsis;
|
|
2058
|
+
}
|
|
2059
|
+
/* 空标题:字号/字重跟标题本身,灰字占位 H1… */
|
|
2060
|
+
.loom-doc .loom-heading[data-placeholder]::before {
|
|
2061
|
+
font-size: inherit;
|
|
2062
|
+
font-weight: inherit;
|
|
2063
|
+
letter-spacing: inherit;
|
|
2064
|
+
line-height: inherit;
|
|
2065
|
+
color: #c0c3c8;
|
|
2066
|
+
}
|
|
2067
|
+
@media (prefers-color-scheme: dark) {
|
|
2068
|
+
.loom-doc [data-placeholder]::before {
|
|
2069
|
+
color: rgba(255, 255, 255, 0.35);
|
|
2070
|
+
}
|
|
2071
|
+
.loom-doc .loom-heading[data-placeholder]::before {
|
|
2072
|
+
color: rgba(255, 255, 255, 0.28);
|
|
2073
|
+
}
|
|
2074
|
+
}
|
|
2075
|
+
|
|
2076
|
+
/* ─── 目录(飞书式:H1–H6 自动索引,与正文同底、无分割线) ─── */
|
|
2077
|
+
/* 定位:--loom-toc-left / --loom-toc-right / --loom-toc-top 让出 app 壳。
|
|
2078
|
+
默认贴左(--loom-toc-left:0)。贴右:--loom-toc-left:auto; --loom-toc-right:0;
|
|
2079
|
+
留白:--loom-toc-pad-start / --loom-toc-pad-end(默认 start=栏宽,end=0;贴右时对调) */
|
|
2080
|
+
.loom-toc-rail {
|
|
2081
|
+
position: fixed;
|
|
2082
|
+
top: var(--loom-toc-top, 0px);
|
|
2083
|
+
left: var(--loom-toc-left, 0px);
|
|
2084
|
+
right: var(--loom-toc-right, auto);
|
|
2085
|
+
bottom: 0;
|
|
2086
|
+
width: var(--loom-toc-w, 220px);
|
|
2087
|
+
z-index: 70;
|
|
2088
|
+
display: flex;
|
|
2089
|
+
flex-direction: column;
|
|
2090
|
+
background: var(--bg-page, #fff);
|
|
2091
|
+
border: none;
|
|
2092
|
+
font: 400 13px/1.4 system-ui, -apple-system, 'Segoe UI', sans-serif;
|
|
2093
|
+
color: var(--text-a, #1f2328);
|
|
2094
|
+
}
|
|
2095
|
+
/* 留白:优先落在滚动容器(.loom-toc-open 在 note-body / lab-root);全页 lab 时在 html */
|
|
2096
|
+
html.loom-toc-open,
|
|
2097
|
+
.loom-toc-open {
|
|
2098
|
+
padding-left: var(--loom-toc-pad-start, var(--loom-toc-w, 220px));
|
|
2099
|
+
padding-right: var(--loom-toc-pad-end, 0px);
|
|
2100
|
+
box-sizing: border-box;
|
|
2101
|
+
}
|
|
2102
|
+
.loom-toc-hd {
|
|
2103
|
+
flex: none;
|
|
2104
|
+
padding: 20px 16px 10px;
|
|
2105
|
+
font: 600 13px/1.2 system-ui, sans-serif;
|
|
2106
|
+
color: var(--text-b, rgba(0, 0, 0, 0.55));
|
|
2107
|
+
letter-spacing: 0.02em;
|
|
2108
|
+
}
|
|
2109
|
+
.loom-toc-nav {
|
|
2110
|
+
flex: 1;
|
|
2111
|
+
overflow-y: auto;
|
|
2112
|
+
padding: 4px 8px 24px;
|
|
2113
|
+
display: flex;
|
|
2114
|
+
flex-direction: column;
|
|
2115
|
+
gap: 1px;
|
|
2116
|
+
}
|
|
2117
|
+
.loom-toc-item {
|
|
2118
|
+
display: block;
|
|
2119
|
+
width: 100%;
|
|
2120
|
+
box-sizing: border-box;
|
|
2121
|
+
padding: 6px 10px 6px 12px;
|
|
2122
|
+
border: none;
|
|
2123
|
+
border-radius: 6px;
|
|
2124
|
+
background: transparent;
|
|
2125
|
+
color: var(--text-b, rgba(0, 0, 0, 0.65));
|
|
2126
|
+
font: 400 13px/1.35 system-ui, -apple-system, 'Segoe UI', sans-serif;
|
|
2127
|
+
text-align: left;
|
|
2128
|
+
cursor: pointer;
|
|
2129
|
+
overflow: hidden;
|
|
2130
|
+
text-overflow: ellipsis;
|
|
2131
|
+
white-space: nowrap;
|
|
2132
|
+
transition: background 0.1s, color 0.1s;
|
|
2133
|
+
}
|
|
2134
|
+
.loom-toc-item:hover {
|
|
2135
|
+
background: rgba(0, 0, 0, 0.04);
|
|
2136
|
+
color: var(--text-a, #1f2328);
|
|
2137
|
+
}
|
|
2138
|
+
.loom-toc-item-active {
|
|
2139
|
+
background: rgba(51, 112, 255, 0.08);
|
|
2140
|
+
color: var(--accent, #3370ff);
|
|
2141
|
+
font-weight: 500;
|
|
2142
|
+
}
|
|
2143
|
+
.loom-toc-item-active:hover {
|
|
2144
|
+
background: rgba(51, 112, 255, 0.12);
|
|
2145
|
+
}
|
|
2146
|
+
.loom-toc-empty {
|
|
2147
|
+
padding: 16px 12px;
|
|
2148
|
+
font-size: 12px;
|
|
2149
|
+
color: var(--text-c, #999);
|
|
2150
|
+
}
|
|
2151
|
+
@media (prefers-color-scheme: dark) {
|
|
2152
|
+
.loom-toc-rail {
|
|
2153
|
+
background: var(--bg-page, #171717);
|
|
2154
|
+
}
|
|
2155
|
+
.loom-toc-item:hover { background: rgba(255, 255, 255, 0.06); }
|
|
2156
|
+
.loom-toc-item-active {
|
|
2157
|
+
background: rgba(76, 139, 245, 0.15);
|
|
2158
|
+
color: #7aafff;
|
|
2159
|
+
}
|
|
2160
|
+
}
|
|
2161
|
+
|
|
2162
|
+
/* ─── 评论/批注(飞书式:正文琥珀高亮 + 文档右侧常驻栏) ─── */
|
|
2163
|
+
.loom-comment {
|
|
2164
|
+
background: rgba(255, 198, 50, 0.28);
|
|
2165
|
+
border-bottom: 1.5px solid rgba(230, 160, 20, 0.55);
|
|
2166
|
+
border-radius: 2px;
|
|
2167
|
+
cursor: pointer;
|
|
2168
|
+
transition: background 0.12s ease;
|
|
2169
|
+
}
|
|
2170
|
+
.loom-comment:hover {
|
|
2171
|
+
background: rgba(255, 198, 50, 0.42);
|
|
2172
|
+
}
|
|
2173
|
+
.loom-comment-active {
|
|
2174
|
+
background: rgba(255, 180, 20, 0.5);
|
|
2175
|
+
border-bottom-color: rgba(210, 140, 0, 0.85);
|
|
2176
|
+
}
|
|
2177
|
+
.loom-comment-resolved {
|
|
2178
|
+
background: rgba(0, 0, 0, 0.04);
|
|
2179
|
+
border-bottom: 1.5px dashed rgba(0, 0, 0, 0.18);
|
|
2180
|
+
}
|
|
2181
|
+
@media (prefers-color-scheme: dark) {
|
|
2182
|
+
.loom-comment {
|
|
2183
|
+
background: rgba(255, 198, 50, 0.18);
|
|
2184
|
+
border-bottom-color: rgba(255, 190, 60, 0.45);
|
|
2185
|
+
}
|
|
2186
|
+
.loom-comment:hover { background: rgba(255, 198, 50, 0.28); }
|
|
2187
|
+
.loom-comment-active { background: rgba(255, 190, 40, 0.36); }
|
|
2188
|
+
.loom-comment-resolved {
|
|
2189
|
+
background: rgba(255, 255, 255, 0.06);
|
|
2190
|
+
border-bottom-color: rgba(255, 255, 255, 0.2);
|
|
2191
|
+
}
|
|
2192
|
+
}
|
|
2193
|
+
|
|
2194
|
+
/* 右侧评论:与正文同一滚动容器(absolute 挂 scroll parent);滚动条在栏右侧外缘 */
|
|
2195
|
+
.loom-comment-overlay {
|
|
2196
|
+
position: absolute;
|
|
2197
|
+
top: 0;
|
|
2198
|
+
right: 0;
|
|
2199
|
+
bottom: auto;
|
|
2200
|
+
width: var(--loom-comment-rail-w, 320px);
|
|
2201
|
+
min-height: 100%;
|
|
2202
|
+
pointer-events: none; /* 空处点穿;卡/钮再开 */
|
|
2203
|
+
z-index: 80;
|
|
2204
|
+
}
|
|
2205
|
+
.loom-comment-rail {
|
|
2206
|
+
position: relative;
|
|
2207
|
+
width: 100%;
|
|
2208
|
+
min-height: 100%;
|
|
2209
|
+
display: flex;
|
|
2210
|
+
flex-direction: column;
|
|
2211
|
+
background: var(--bg-page, #fff);
|
|
2212
|
+
border-left: 1px solid rgba(0, 0, 0, 0.06);
|
|
2213
|
+
font: 400 13px/1.45 system-ui, -apple-system, 'Segoe UI', sans-serif;
|
|
2214
|
+
color: var(--text-a, #1f2328);
|
|
2215
|
+
pointer-events: auto;
|
|
2216
|
+
box-sizing: border-box;
|
|
2217
|
+
}
|
|
2218
|
+
/* 滚动容器右留栏宽;scrollbar 仍在容器最右(评论栏右侧) */
|
|
2219
|
+
.loom-comment-rail-open {
|
|
2220
|
+
position: relative;
|
|
2221
|
+
padding-right: var(--loom-comment-rail-w, 320px);
|
|
2222
|
+
box-sizing: border-box;
|
|
2223
|
+
}
|
|
2224
|
+
.loom-comment-rail-hd {
|
|
2225
|
+
display: flex;
|
|
2226
|
+
align-items: center;
|
|
2227
|
+
justify-content: space-between;
|
|
2228
|
+
gap: 8px;
|
|
2229
|
+
flex: none;
|
|
2230
|
+
padding: 16px 16px 12px;
|
|
2231
|
+
background: var(--bg-page, #fff);
|
|
2232
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.04);
|
|
2233
|
+
position: sticky;
|
|
2234
|
+
top: 0;
|
|
2235
|
+
z-index: 2;
|
|
2236
|
+
}
|
|
2237
|
+
.loom-comment-rail-title {
|
|
2238
|
+
font: 500 14px/1.2 system-ui, sans-serif;
|
|
2239
|
+
color: var(--text-a, #1f2328);
|
|
2240
|
+
}
|
|
2241
|
+
.loom-comment-rail-acts {
|
|
2242
|
+
display: flex;
|
|
2243
|
+
gap: 2px;
|
|
2244
|
+
}
|
|
2245
|
+
.loom-comment-rail-body {
|
|
2246
|
+
position: relative;
|
|
2247
|
+
flex: 1 0 auto;
|
|
2248
|
+
overflow: visible; /* 不单独出滚动条,跟正文共滚 */
|
|
2249
|
+
padding: 12px 14px 24px;
|
|
2250
|
+
}
|
|
2251
|
+
.loom-comment-empty {
|
|
2252
|
+
position: absolute;
|
|
2253
|
+
left: 0;
|
|
2254
|
+
right: 0;
|
|
2255
|
+
text-align: center;
|
|
2256
|
+
color: var(--text-c, #999);
|
|
2257
|
+
font-size: 13px;
|
|
2258
|
+
}
|
|
2259
|
+
|
|
2260
|
+
/* 卡:绝对定位贴高亮 y;顶琥珀条 */
|
|
2261
|
+
.loom-comment-card {
|
|
2262
|
+
position: absolute;
|
|
2263
|
+
left: 14px;
|
|
2264
|
+
right: 14px;
|
|
2265
|
+
display: flex;
|
|
2266
|
+
flex-direction: column;
|
|
2267
|
+
gap: 10px;
|
|
2268
|
+
padding: 12px 14px 12px;
|
|
2269
|
+
border-radius: 8px;
|
|
2270
|
+
border: 1px solid rgba(0, 0, 0, 0.06);
|
|
2271
|
+
background: #fff;
|
|
2272
|
+
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06), 0 0 1px rgba(0, 0, 0, 0.04);
|
|
2273
|
+
cursor: pointer;
|
|
2274
|
+
user-select: text;
|
|
2275
|
+
overflow: hidden;
|
|
2276
|
+
}
|
|
2277
|
+
.loom-comment-accent {
|
|
2278
|
+
position: absolute;
|
|
2279
|
+
top: 0;
|
|
2280
|
+
left: 0;
|
|
2281
|
+
right: 0;
|
|
2282
|
+
height: 3px;
|
|
2283
|
+
background: linear-gradient(90deg, #f5b942, #f0c14b);
|
|
2284
|
+
pointer-events: none;
|
|
2285
|
+
}
|
|
2286
|
+
.loom-comment-card:hover {
|
|
2287
|
+
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
|
|
2288
|
+
}
|
|
2289
|
+
.loom-comment-card-active {
|
|
2290
|
+
cursor: default;
|
|
2291
|
+
box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1);
|
|
2292
|
+
}
|
|
2293
|
+
.loom-comment-card-compose {
|
|
2294
|
+
cursor: default;
|
|
2295
|
+
}
|
|
2296
|
+
.loom-comment-card-resolved {
|
|
2297
|
+
opacity: 0.78;
|
|
2298
|
+
}
|
|
2299
|
+
.loom-comment-quote {
|
|
2300
|
+
margin: 2px 0 0;
|
|
2301
|
+
padding: 0 0 0 8px;
|
|
2302
|
+
border-left: 2px solid rgba(0, 0, 0, 0.12);
|
|
2303
|
+
color: var(--text-b, #666);
|
|
2304
|
+
font: 400 12px/1.4 system-ui, sans-serif;
|
|
2305
|
+
overflow: hidden;
|
|
2306
|
+
text-overflow: ellipsis;
|
|
2307
|
+
white-space: nowrap;
|
|
2308
|
+
}
|
|
2309
|
+
.loom-comment-card-hd {
|
|
2310
|
+
display: flex;
|
|
2311
|
+
align-items: flex-start;
|
|
2312
|
+
justify-content: space-between;
|
|
2313
|
+
gap: 8px;
|
|
2314
|
+
min-width: 0;
|
|
2315
|
+
}
|
|
2316
|
+
.loom-comment-card-hd .loom-comment-quote {
|
|
2317
|
+
flex: 1;
|
|
2318
|
+
min-width: 0;
|
|
2319
|
+
}
|
|
2320
|
+
.loom-comment-card-acts {
|
|
2321
|
+
display: flex;
|
|
2322
|
+
gap: 2px;
|
|
2323
|
+
flex: none;
|
|
2324
|
+
margin: -4px -4px 0 0;
|
|
2325
|
+
}
|
|
2326
|
+
.loom-comment-icon {
|
|
2327
|
+
width: 26px;
|
|
2328
|
+
height: 26px;
|
|
2329
|
+
padding: 0;
|
|
2330
|
+
border: none;
|
|
2331
|
+
border-radius: 6px;
|
|
2332
|
+
background: transparent;
|
|
2333
|
+
color: var(--text-b, rgba(0, 0, 0, 0.45));
|
|
2334
|
+
font: 500 14px/1 system-ui, sans-serif;
|
|
2335
|
+
cursor: pointer;
|
|
2336
|
+
}
|
|
2337
|
+
.loom-comment-icon:hover {
|
|
2338
|
+
background: var(--bg-hover, rgba(0, 0, 0, 0.06));
|
|
2339
|
+
color: var(--text-a, #1f2328);
|
|
2340
|
+
}
|
|
2341
|
+
.loom-comment-icon-on {
|
|
2342
|
+
background: rgba(0, 0, 0, 0.06);
|
|
2343
|
+
color: var(--text-a, #1f2328);
|
|
2344
|
+
}
|
|
2345
|
+
.loom-comment-preview {
|
|
2346
|
+
display: flex;
|
|
2347
|
+
flex-direction: column;
|
|
2348
|
+
gap: 6px;
|
|
2349
|
+
}
|
|
2350
|
+
.loom-comment-more {
|
|
2351
|
+
font-size: 12px;
|
|
2352
|
+
color: var(--text-c, #999);
|
|
2353
|
+
padding-left: 38px;
|
|
2354
|
+
}
|
|
2355
|
+
.loom-comment-msgs {
|
|
2356
|
+
display: flex;
|
|
2357
|
+
flex-direction: column;
|
|
2358
|
+
gap: 12px;
|
|
2359
|
+
}
|
|
2360
|
+
.loom-comment-msg {
|
|
2361
|
+
display: flex;
|
|
2362
|
+
gap: 10px;
|
|
2363
|
+
align-items: flex-start;
|
|
2364
|
+
}
|
|
2365
|
+
.loom-comment-avatar {
|
|
2366
|
+
width: 28px;
|
|
2367
|
+
height: 28px;
|
|
2368
|
+
border-radius: 50%;
|
|
2369
|
+
flex: none;
|
|
2370
|
+
object-fit: cover;
|
|
2371
|
+
}
|
|
2372
|
+
.loom-comment-avatar-fallback {
|
|
2373
|
+
display: flex;
|
|
2374
|
+
align-items: center;
|
|
2375
|
+
justify-content: center;
|
|
2376
|
+
background: linear-gradient(135deg, #7c6cf0, #5b8def);
|
|
2377
|
+
color: #fff;
|
|
2378
|
+
font: 600 12px/1 system-ui, sans-serif;
|
|
2379
|
+
}
|
|
2380
|
+
.loom-comment-msg-body {
|
|
2381
|
+
min-width: 0;
|
|
2382
|
+
flex: 1;
|
|
2383
|
+
}
|
|
2384
|
+
.loom-comment-msg-meta {
|
|
2385
|
+
display: flex;
|
|
2386
|
+
align-items: baseline;
|
|
2387
|
+
gap: 8px;
|
|
2388
|
+
margin-bottom: 2px;
|
|
2389
|
+
}
|
|
2390
|
+
.loom-comment-author {
|
|
2391
|
+
font-weight: 600;
|
|
2392
|
+
font-size: 13px;
|
|
2393
|
+
color: var(--text-a, #1f2328);
|
|
2394
|
+
}
|
|
2395
|
+
.loom-comment-time {
|
|
2396
|
+
font-size: 11px;
|
|
2397
|
+
color: var(--text-c, rgba(0, 0, 0, 0.35));
|
|
2398
|
+
}
|
|
2399
|
+
.loom-comment-text {
|
|
2400
|
+
font-size: 13px;
|
|
2401
|
+
line-height: 1.5;
|
|
2402
|
+
color: var(--text-a, #1f2328);
|
|
2403
|
+
white-space: pre-wrap;
|
|
2404
|
+
word-break: break-word;
|
|
2405
|
+
}
|
|
2406
|
+
.loom-comment-reply {
|
|
2407
|
+
display: flex;
|
|
2408
|
+
flex-direction: column;
|
|
2409
|
+
gap: 8px;
|
|
2410
|
+
padding-top: 4px;
|
|
2411
|
+
border-top: 1px solid rgba(0, 0, 0, 0.06);
|
|
2412
|
+
}
|
|
2413
|
+
.loom-comment-input {
|
|
2414
|
+
width: 100%;
|
|
2415
|
+
min-height: 36px;
|
|
2416
|
+
padding: 8px 10px;
|
|
2417
|
+
border: 1px solid rgba(0, 0, 0, 0.12);
|
|
2418
|
+
border-radius: 6px;
|
|
2419
|
+
background: #fff;
|
|
2420
|
+
color: var(--text-a, #1f2328);
|
|
2421
|
+
font: 400 13px/1.45 system-ui, sans-serif;
|
|
2422
|
+
resize: vertical;
|
|
2423
|
+
outline: none;
|
|
2424
|
+
box-sizing: border-box;
|
|
2425
|
+
}
|
|
2426
|
+
.loom-comment-input:focus {
|
|
2427
|
+
border-color: var(--accent, #1456f0);
|
|
2428
|
+
box-shadow: 0 0 0 2px rgba(20, 86, 240, 0.12);
|
|
2429
|
+
}
|
|
2430
|
+
.loom-comment-input-sm {
|
|
2431
|
+
min-height: 36px;
|
|
2432
|
+
}
|
|
2433
|
+
.loom-comment-card-ft {
|
|
2434
|
+
display: flex;
|
|
2435
|
+
justify-content: flex-end;
|
|
2436
|
+
gap: 8px;
|
|
2437
|
+
}
|
|
2438
|
+
.loom-comment-btn,
|
|
2439
|
+
.loom-comment-btn-ghost {
|
|
2440
|
+
height: 30px;
|
|
2441
|
+
padding: 0 14px;
|
|
2442
|
+
border-radius: 6px;
|
|
2443
|
+
border: none;
|
|
2444
|
+
font: 500 13px/1 system-ui, sans-serif;
|
|
2445
|
+
cursor: pointer;
|
|
2446
|
+
}
|
|
2447
|
+
.loom-comment-btn {
|
|
2448
|
+
background: var(--accent, #3370ff);
|
|
2449
|
+
color: #fff;
|
|
2450
|
+
}
|
|
2451
|
+
.loom-comment-btn:hover {
|
|
2452
|
+
filter: brightness(1.05);
|
|
2453
|
+
}
|
|
2454
|
+
.loom-comment-btn-ghost {
|
|
2455
|
+
background: transparent;
|
|
2456
|
+
color: var(--text-b, rgba(0, 0, 0, 0.55));
|
|
2457
|
+
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
2458
|
+
}
|
|
2459
|
+
.loom-comment-btn-ghost:hover {
|
|
2460
|
+
background: var(--bg-hover, rgba(0, 0, 0, 0.04));
|
|
2461
|
+
}
|
|
2462
|
+
@media (prefers-color-scheme: dark) {
|
|
2463
|
+
.loom-comment-rail {
|
|
2464
|
+
background: var(--bg-page, #171717);
|
|
2465
|
+
border-left-color: rgba(255, 255, 255, 0.08);
|
|
2466
|
+
}
|
|
2467
|
+
.loom-comment-rail-hd {
|
|
2468
|
+
background: transparent;
|
|
2469
|
+
border-bottom-color: rgba(255, 255, 255, 0.06);
|
|
2470
|
+
}
|
|
2471
|
+
.loom-comment-card {
|
|
2472
|
+
background: var(--bg-page, #2a2a2a);
|
|
2473
|
+
border-color: rgba(255, 255, 255, 0.08);
|
|
2474
|
+
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
|
|
2475
|
+
}
|
|
2476
|
+
.loom-comment-quote { border-left-color: rgba(255, 255, 255, 0.2); }
|
|
2477
|
+
.loom-comment-reply { border-top-color: rgba(255, 255, 255, 0.08); }
|
|
2478
|
+
.loom-comment-input {
|
|
2479
|
+
border-color: rgba(255, 255, 255, 0.12);
|
|
2480
|
+
background: var(--bg-side, #212121);
|
|
2481
|
+
}
|
|
2482
|
+
.loom-comment-btn-ghost {
|
|
2483
|
+
border-color: rgba(255, 255, 255, 0.12);
|
|
2484
|
+
}
|
|
2485
|
+
}
|
|
2486
|
+
|
|
2487
|
+
/* 显隐符(opt-in):.loom-doc.loom-invisible 下生效。伪元素/旁注不进 textContent,选区 offset 不漂。 */
|
|
2488
|
+
.loom-invisible .loom-inv-space,
|
|
2489
|
+
.loom-invisible .loom-inv-nbsp,
|
|
2490
|
+
.loom-invisible .loom-inv-tab {
|
|
2491
|
+
position: relative;
|
|
2492
|
+
}
|
|
2493
|
+
.loom-invisible .loom-inv-space::before,
|
|
2494
|
+
.loom-invisible .loom-inv-nbsp::before,
|
|
2495
|
+
.loom-invisible .loom-inv-tab::before {
|
|
2496
|
+
position: absolute;
|
|
2497
|
+
left: 50%;
|
|
2498
|
+
top: 50%;
|
|
2499
|
+
transform: translate(-50%, -50%);
|
|
2500
|
+
color: var(--text-c, #9aa0a6);
|
|
2501
|
+
pointer-events: none;
|
|
2502
|
+
font-weight: 400;
|
|
2503
|
+
line-height: 1;
|
|
2504
|
+
opacity: 0.85;
|
|
2505
|
+
}
|
|
2506
|
+
.loom-invisible .loom-inv-space::before { content: '·'; }
|
|
2507
|
+
.loom-invisible .loom-inv-nbsp::before { content: '°'; }
|
|
2508
|
+
.loom-invisible .loom-inv-tab::before { content: '→'; }
|
|
2509
|
+
/* 硬换行旁注:与 <br data-atom=hard_break> 并排,无 data-leaf,不占结构子序号。 */
|
|
2510
|
+
.loom-invisible .loom-inv-break {
|
|
2511
|
+
color: var(--text-c, #9aa0a6);
|
|
2512
|
+
font-size: 0.85em;
|
|
2513
|
+
user-select: none;
|
|
2514
|
+
pointer-events: none;
|
|
2515
|
+
margin-left: 0.1em;
|
|
2516
|
+
}
|
|
2517
|
+
/* 段末 ¶(仅 paragraph;heading/list 不标,避免噪音)。 */
|
|
2518
|
+
.loom-invisible > p[data-block-id]::after,
|
|
2519
|
+
.loom-invisible [data-block-id] > p[data-block-id]::after {
|
|
2520
|
+
content: '¶';
|
|
2521
|
+
color: var(--text-c, #9aa0a6);
|
|
2522
|
+
margin-left: 0.15em;
|
|
2523
|
+
font-size: 0.85em;
|
|
2524
|
+
user-select: none;
|
|
2525
|
+
pointer-events: none;
|
|
2526
|
+
}
|
|
2527
|
+
/* ─── 任务列表(飞书式) ─── 大 checkbox、行高、勾选删除线、hover 浅底 */
|
|
2528
|
+
.loom-doc ul:has(> li[data-task]),
|
|
2529
|
+
.loom-doc ol:has(> li[data-task]) {
|
|
2530
|
+
list-style: none;
|
|
2531
|
+
padding-left: 0;
|
|
2532
|
+
margin: 0.35rem 0;
|
|
2533
|
+
}
|
|
2534
|
+
.loom-doc li[data-task] {
|
|
2535
|
+
list-style: none;
|
|
2536
|
+
display: flex;
|
|
2537
|
+
align-items: flex-start;
|
|
2538
|
+
gap: 10px;
|
|
2539
|
+
margin: 2px 0;
|
|
2540
|
+
margin-left: 0;
|
|
2541
|
+
padding: 8px 12px 8px 10px;
|
|
2542
|
+
border-radius: 8px;
|
|
2543
|
+
min-height: 36px;
|
|
2544
|
+
box-sizing: border-box;
|
|
2545
|
+
transition: background 0.12s ease;
|
|
2546
|
+
}
|
|
2547
|
+
.loom-doc li[data-task]:hover {
|
|
2548
|
+
background: rgba(0, 0, 0, 0.03);
|
|
2549
|
+
}
|
|
2550
|
+
.loom-doc li[data-task]:focus-within {
|
|
2551
|
+
background: rgba(0, 0, 0, 0.04);
|
|
2552
|
+
}
|
|
2553
|
+
/* 飞书式 checkbox:白底 + 深描边圆角方框;勾选后仍白底 + 蓝色对勾 */
|
|
2554
|
+
.loom-doc li[data-task] > [data-task-check] {
|
|
2555
|
+
appearance: none;
|
|
2556
|
+
-webkit-appearance: none;
|
|
2557
|
+
flex: none;
|
|
2558
|
+
width: 20px;
|
|
2559
|
+
height: 20px;
|
|
2560
|
+
margin: 2px 0 0;
|
|
2561
|
+
padding: 0;
|
|
2562
|
+
border: 1px solid #1f2329;
|
|
2563
|
+
border-radius: 5px;
|
|
2564
|
+
background: #fff;
|
|
2565
|
+
cursor: pointer;
|
|
2566
|
+
box-sizing: border-box;
|
|
2567
|
+
position: relative;
|
|
2568
|
+
transition: border-color 0.12s, box-shadow 0.12s, background 0.12s;
|
|
2569
|
+
}
|
|
2570
|
+
.loom-doc li[data-task] > [data-task-check]:hover {
|
|
2571
|
+
border-color: #3370ff;
|
|
2572
|
+
box-shadow: 0 0 0 3px rgba(51, 112, 255, 0.12);
|
|
2573
|
+
}
|
|
2574
|
+
.loom-doc li[data-task] > [data-task-check]:checked {
|
|
2575
|
+
border-color: #1f2329;
|
|
2576
|
+
background: #fff;
|
|
2577
|
+
}
|
|
2578
|
+
/* 蓝色对勾:SVG 铺满格居中(不用 border+rotate 歪心) */
|
|
2579
|
+
.loom-doc li[data-task] > [data-task-check]:checked::after {
|
|
2580
|
+
content: '';
|
|
2581
|
+
position: absolute;
|
|
2582
|
+
inset: 0;
|
|
2583
|
+
background: center / 12px 12px no-repeat
|
|
2584
|
+
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.2 8.2l3.2 3.2 6.4-6.8' stroke='%233370ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
|
|
2585
|
+
}
|
|
2586
|
+
.loom-doc li[data-task] > :not([data-task-check]) {
|
|
2587
|
+
flex: 1;
|
|
2588
|
+
min-width: 0;
|
|
2589
|
+
margin: 0;
|
|
2590
|
+
padding: 0;
|
|
2591
|
+
line-height: 1.55;
|
|
2592
|
+
font-size: 15px;
|
|
2593
|
+
}
|
|
2594
|
+
/* 已完成:正文灰 + 删除线(飞书) */
|
|
2595
|
+
.loom-doc li[data-task][data-checked="true"] > :not([data-task-check]) {
|
|
2596
|
+
color: rgba(0, 0, 0, 0.35);
|
|
2597
|
+
text-decoration: line-through;
|
|
2598
|
+
text-decoration-color: rgba(0, 0, 0, 0.28);
|
|
2599
|
+
}
|
|
2600
|
+
.loom-doc li[data-task][data-checked="true"] > :not([data-task-check]) * {
|
|
2601
|
+
color: inherit;
|
|
2602
|
+
}
|
|
2603
|
+
@media (prefers-color-scheme: dark) {
|
|
2604
|
+
.loom-doc li[data-task]:hover,
|
|
2605
|
+
.loom-doc li[data-task]:focus-within {
|
|
2606
|
+
background: rgba(255, 255, 255, 0.06);
|
|
2607
|
+
}
|
|
2608
|
+
.loom-doc li[data-task] > [data-task-check] {
|
|
2609
|
+
border-color: rgba(255, 255, 255, 0.55);
|
|
2610
|
+
background: rgba(255, 255, 255, 0.06);
|
|
2611
|
+
}
|
|
2612
|
+
.loom-doc li[data-task] > [data-task-check]:hover {
|
|
2613
|
+
border-color: #7aafff;
|
|
2614
|
+
box-shadow: 0 0 0 3px rgba(76, 139, 245, 0.18);
|
|
2615
|
+
}
|
|
2616
|
+
.loom-doc li[data-task] > [data-task-check]:checked {
|
|
2617
|
+
border-color: rgba(255, 255, 255, 0.7);
|
|
2618
|
+
background: rgba(255, 255, 255, 0.06);
|
|
2619
|
+
}
|
|
2620
|
+
.loom-doc li[data-task] > [data-task-check]:checked::after {
|
|
2621
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.2 8.2l3.2 3.2 6.4-6.8' stroke='%237aafff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
|
|
2622
|
+
}
|
|
2623
|
+
.loom-doc li[data-task][data-checked="true"] > :not([data-task-check]) {
|
|
2624
|
+
color: rgba(255, 255, 255, 0.35);
|
|
2625
|
+
text-decoration-color: rgba(255, 255, 255, 0.28);
|
|
2626
|
+
}
|
|
2627
|
+
}
|