@lumesync/studio 0.0.0-stage → 1.0.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 +229 -2
- package/bin/lumesync-studio.js +7 -0
- package/package.json +33 -4
- package/skills/courseware-authoring/SKILL.md +226 -0
- package/skills/courseware-authoring/references/tools.md +133 -0
- package/src/chat/mailbox.js +307 -0
- package/src/cli/main.js +669 -0
- package/src/core/document.js +349 -0
- package/src/core/errors.js +44 -0
- package/src/core/exporter.js +272 -0
- package/src/core/model.js +305 -0
- package/src/core/rules.js +288 -0
- package/src/core/storage.js +616 -0
- package/src/core/transaction.js +250 -0
- package/src/core/validate.js +503 -0
- package/src/core/zip.js +251 -0
- package/src/editing/operations.js +671 -0
- package/src/editing/session.js +838 -0
- package/src/server/http.js +944 -0
- package/src/server/ws.js +128 -0
- package/src/templates/courseware.js +48 -0
- package/src/templates/init.js +374 -0
- package/src/tools/registry.js +487 -0
- package/ui/app.js +2671 -0
- package/ui/home.html +32 -0
- package/ui/home.js +148 -0
- package/ui/index.html +210 -0
- package/ui/shared/edit-model.js +105 -0
- package/ui/shared/quiz-view.js +455 -0
- package/ui/style.css +1161 -0
package/ui/style.css
ADDED
|
@@ -0,0 +1,1161 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
color-scheme: light;
|
|
3
|
+
--bg: #f6f7f9;
|
|
4
|
+
--surface: #ffffff;
|
|
5
|
+
--surface-alt: #f1f3f6;
|
|
6
|
+
--border: #e2e6ec;
|
|
7
|
+
--border-strong: #cbd3dd;
|
|
8
|
+
--text: #1b2430;
|
|
9
|
+
--text-muted: #64748b;
|
|
10
|
+
--accent: #3b4fd8;
|
|
11
|
+
--accent-soft: #eef0fe;
|
|
12
|
+
--success: #147a55;
|
|
13
|
+
--success-soft: #e4f6ee;
|
|
14
|
+
--warning: #8a5a00;
|
|
15
|
+
--warning-soft: #fdf1da;
|
|
16
|
+
--danger: #a72b2b;
|
|
17
|
+
--danger-soft: #fbeaea;
|
|
18
|
+
--radius: 10px;
|
|
19
|
+
--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
* { box-sizing: border-box; }
|
|
23
|
+
|
|
24
|
+
/* 组件样式里的 display 会覆盖 UA 的 [hidden],这里统一兜底,
|
|
25
|
+
否则 empty-state 与 iframe 的显隐切换会失效。 */
|
|
26
|
+
[hidden] { display: none !important; }
|
|
27
|
+
|
|
28
|
+
/* 页面固定为视口高度:所有溢出都交给内部面板滚动,页面本身不出现滚动条。 */
|
|
29
|
+
html, body { height: 100%; overflow: hidden; }
|
|
30
|
+
|
|
31
|
+
body {
|
|
32
|
+
margin: 0;
|
|
33
|
+
display: flex;
|
|
34
|
+
flex-direction: column;
|
|
35
|
+
height: 100vh;
|
|
36
|
+
min-height: 0;
|
|
37
|
+
background: var(--bg);
|
|
38
|
+
color: var(--text);
|
|
39
|
+
font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
|
|
40
|
+
font-size: 14px;
|
|
41
|
+
line-height: 1.6;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
button { font: inherit; cursor: pointer; }
|
|
45
|
+
|
|
46
|
+
.mark {
|
|
47
|
+
display: grid;
|
|
48
|
+
place-items: center;
|
|
49
|
+
flex: none;
|
|
50
|
+
width: 24px;
|
|
51
|
+
height: 24px;
|
|
52
|
+
border-radius: 7px;
|
|
53
|
+
background: var(--accent);
|
|
54
|
+
color: #fff;
|
|
55
|
+
font-size: 10px;
|
|
56
|
+
letter-spacing: .06em;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.brand-line { display: flex; align-items: center; gap: 8px; min-width: 0; color: inherit; text-decoration: none; }
|
|
60
|
+
.brand-line:hover strong { color: var(--accent); }
|
|
61
|
+
.brand-line strong { font-size: 13px; white-space: nowrap; }
|
|
62
|
+
.course-title {
|
|
63
|
+
font-size: 12px;
|
|
64
|
+
overflow: hidden;
|
|
65
|
+
text-overflow: ellipsis;
|
|
66
|
+
white-space: nowrap;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.badge {
|
|
70
|
+
padding: 3px 10px;
|
|
71
|
+
border-radius: 999px;
|
|
72
|
+
border: 1px solid var(--border-strong);
|
|
73
|
+
background: var(--surface-alt);
|
|
74
|
+
font-size: 12px;
|
|
75
|
+
font-variant-numeric: tabular-nums;
|
|
76
|
+
}
|
|
77
|
+
.badge-info { background: var(--accent-soft); border-color: #c7ccf7; color: var(--accent); }
|
|
78
|
+
.badge-ok { background: var(--success-soft); border-color: #b7e3d0; color: var(--success); }
|
|
79
|
+
.badge-warn { background: var(--warning-soft); border-color: #f0dcae; color: var(--warning); }
|
|
80
|
+
.badge-danger { background: var(--danger-soft); border-color: #f0c4c4; color: var(--danger); }
|
|
81
|
+
|
|
82
|
+
.ghost-button {
|
|
83
|
+
padding: 5px 12px;
|
|
84
|
+
border-radius: 8px;
|
|
85
|
+
border: 1px solid var(--border-strong);
|
|
86
|
+
background: var(--surface);
|
|
87
|
+
color: var(--text);
|
|
88
|
+
font-size: 13px;
|
|
89
|
+
}
|
|
90
|
+
.ghost-button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
|
|
91
|
+
.ghost-button:disabled { opacity: .45; cursor: not-allowed; }
|
|
92
|
+
|
|
93
|
+
/* PowerPoint 式布局:顶部工具栏 + 左侧幻灯片缩略图 + 中间预览与讲稿 + 右侧组件属性。 */
|
|
94
|
+
.topbar {
|
|
95
|
+
display: flex;
|
|
96
|
+
align-items: center;
|
|
97
|
+
gap: 14px;
|
|
98
|
+
flex-wrap: wrap;
|
|
99
|
+
padding: 9px 14px;
|
|
100
|
+
background: var(--surface);
|
|
101
|
+
border-bottom: 1px solid var(--border);
|
|
102
|
+
}
|
|
103
|
+
.topbar .course-title { flex: 1; min-width: 120px; }
|
|
104
|
+
.topbar-tools { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
|
|
105
|
+
|
|
106
|
+
/* 顶栏操作只用图标,不描边框;悬停时给一层浅色底反馈。 */
|
|
107
|
+
.icon-button {
|
|
108
|
+
display: inline-grid;
|
|
109
|
+
place-items: center;
|
|
110
|
+
width: 30px;
|
|
111
|
+
height: 30px;
|
|
112
|
+
padding: 0;
|
|
113
|
+
border: 0;
|
|
114
|
+
border-radius: 7px;
|
|
115
|
+
background: transparent;
|
|
116
|
+
color: var(--text-muted);
|
|
117
|
+
}
|
|
118
|
+
.icon-button:hover:not(:disabled) { background: var(--surface-alt); color: var(--text); }
|
|
119
|
+
.icon-button:active:not(:disabled) { background: var(--border); }
|
|
120
|
+
.icon-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
|
|
121
|
+
.icon-button:disabled { opacity: .35; cursor: not-allowed; }
|
|
122
|
+
.icon-button svg { width: 17px; height: 17px; }
|
|
123
|
+
.topbar-status { display: flex; align-items: center; gap: 6px; }
|
|
124
|
+
|
|
125
|
+
.layout {
|
|
126
|
+
--scene-width: 256px;
|
|
127
|
+
--inspector-width: 316px;
|
|
128
|
+
flex: 1;
|
|
129
|
+
display: grid;
|
|
130
|
+
grid-template-columns: var(--scene-width) 10px minmax(0, 1fr) 10px var(--inspector-width);
|
|
131
|
+
gap: 0;
|
|
132
|
+
padding: 14px;
|
|
133
|
+
min-height: 0;
|
|
134
|
+
overflow: hidden;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.panel {
|
|
138
|
+
display: flex;
|
|
139
|
+
flex-direction: column;
|
|
140
|
+
min-height: 0;
|
|
141
|
+
background: var(--surface);
|
|
142
|
+
border: 1px solid var(--border);
|
|
143
|
+
border-radius: var(--radius);
|
|
144
|
+
overflow: hidden;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/* 左侧幻灯片不做卡片包裹,只用它与预览之间的竖线分隔。 */
|
|
148
|
+
.scene-panel {
|
|
149
|
+
padding-right: 10px;
|
|
150
|
+
border: 0;
|
|
151
|
+
border-radius: 0;
|
|
152
|
+
background: transparent;
|
|
153
|
+
overflow: visible;
|
|
154
|
+
}
|
|
155
|
+
.scene-panel .panel-head { padding: 0 0 10px; border-bottom: 0; }
|
|
156
|
+
.scene-panel .panel-foot { padding: 10px 0 0; border-top: 0; }
|
|
157
|
+
|
|
158
|
+
/* 可拖拽分隔线:10px 命中区,视觉上只有中间 1px 竖线。 */
|
|
159
|
+
.scene-resizer,
|
|
160
|
+
.inspector-resizer { position: relative; z-index: 3; cursor: col-resize; touch-action: none; outline: none; }
|
|
161
|
+
.scene-resizer::before,
|
|
162
|
+
.inspector-resizer::before {
|
|
163
|
+
content: '';
|
|
164
|
+
position: absolute;
|
|
165
|
+
top: 2px;
|
|
166
|
+
bottom: 2px;
|
|
167
|
+
left: 4px;
|
|
168
|
+
width: 1px;
|
|
169
|
+
background: var(--border);
|
|
170
|
+
transition: background .12s ease, width .12s ease, left .12s ease;
|
|
171
|
+
}
|
|
172
|
+
.scene-resizer:hover::before,
|
|
173
|
+
.inspector-resizer:hover::before,
|
|
174
|
+
.scene-resizer:focus-visible::before,
|
|
175
|
+
.inspector-resizer:focus-visible::before,
|
|
176
|
+
.scene-resizer.is-dragging::before,
|
|
177
|
+
.inspector-resizer.is-dragging::before {
|
|
178
|
+
left: 3px;
|
|
179
|
+
width: 2px;
|
|
180
|
+
background: var(--accent);
|
|
181
|
+
}
|
|
182
|
+
body.is-resizing { cursor: col-resize; user-select: none; }
|
|
183
|
+
body.is-resizing iframe { pointer-events: none; }
|
|
184
|
+
|
|
185
|
+
.panel-head {
|
|
186
|
+
display: flex;
|
|
187
|
+
align-items: center;
|
|
188
|
+
justify-content: space-between;
|
|
189
|
+
padding: 12px 14px;
|
|
190
|
+
border-bottom: 1px solid var(--border);
|
|
191
|
+
}
|
|
192
|
+
.panel-head h2 { margin: 0; font-size: 13px; font-weight: 500; }
|
|
193
|
+
|
|
194
|
+
/* 右侧面板:结构 / 属性 两个 tab,收起时只留展开按钮。 */
|
|
195
|
+
.inspector-head { padding: 8px 10px; }
|
|
196
|
+
.inspector-tabs {
|
|
197
|
+
display: flex;
|
|
198
|
+
gap: 2px;
|
|
199
|
+
padding: 2px;
|
|
200
|
+
border-radius: 8px;
|
|
201
|
+
background: var(--surface-alt);
|
|
202
|
+
}
|
|
203
|
+
.inspector-tab {
|
|
204
|
+
padding: 4px 14px;
|
|
205
|
+
border: 0;
|
|
206
|
+
border-radius: 6px;
|
|
207
|
+
background: transparent;
|
|
208
|
+
color: var(--text-muted);
|
|
209
|
+
font-size: 12px;
|
|
210
|
+
}
|
|
211
|
+
.inspector-tab[aria-selected="true"] {
|
|
212
|
+
background: var(--surface);
|
|
213
|
+
color: var(--text);
|
|
214
|
+
box-shadow: 0 1px 2px rgb(15 23 42 / .08);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/* 右侧组件区可折叠成窄条,为预览释放宽度。 */
|
|
218
|
+
.layout.inspector-collapsed { grid-template-columns: var(--scene-width) 10px minmax(0, 1fr) 44px; }
|
|
219
|
+
.inspector-collapsed .inspector-resizer { display: none; }
|
|
220
|
+
.inspector-collapsed .inspector .panel-head {
|
|
221
|
+
flex-direction: column;
|
|
222
|
+
gap: 10px;
|
|
223
|
+
padding: 10px 4px;
|
|
224
|
+
}
|
|
225
|
+
.inspector-collapsed .inspector-tabs { display: none; }
|
|
226
|
+
.inspector-collapsed #toggleInspector svg { transform: rotate(180deg); }
|
|
227
|
+
.inspector-collapsed .inspector-body { display: none; }
|
|
228
|
+
|
|
229
|
+
.scene-list {
|
|
230
|
+
flex: 1;
|
|
231
|
+
margin: 0;
|
|
232
|
+
/* 留出 4px 内边距,容纳缩略图的选中/悬停描边(2px + offset),
|
|
233
|
+
否则描边会被滚动容器的裁剪边切掉。 */
|
|
234
|
+
padding: 4px;
|
|
235
|
+
list-style: none;
|
|
236
|
+
overflow-y: auto;
|
|
237
|
+
display: flex;
|
|
238
|
+
flex-direction: column;
|
|
239
|
+
gap: 10px;
|
|
240
|
+
/* 隐藏缩略图列表滚动条,滚动仍可用(滚轮/触控板/键盘)。 */
|
|
241
|
+
scrollbar-width: none;
|
|
242
|
+
}
|
|
243
|
+
.scene-list::-webkit-scrollbar { display: none; }
|
|
244
|
+
|
|
245
|
+
.scene-item {
|
|
246
|
+
position: relative;
|
|
247
|
+
display: block;
|
|
248
|
+
width: 100%;
|
|
249
|
+
padding: 0;
|
|
250
|
+
border: 0;
|
|
251
|
+
background: transparent;
|
|
252
|
+
color: var(--text);
|
|
253
|
+
text-align: left;
|
|
254
|
+
}
|
|
255
|
+
/* 不在缩略图外再包卡片,选中/悬停状态直接描边画面本身。 */
|
|
256
|
+
.scene-item:hover .scene-thumb { outline: 2px solid var(--border-strong); outline-offset: 1px; }
|
|
257
|
+
.scene-item.active .scene-thumb { outline: 2px solid var(--accent); outline-offset: 1px; }
|
|
258
|
+
.scene-item:focus-visible { outline: none; }
|
|
259
|
+
.scene-item:focus-visible .scene-thumb { outline: 2px solid var(--accent); outline-offset: 2px; }
|
|
260
|
+
|
|
261
|
+
/* 缩略图用同源 iframe 按 1280 逻辑宽渲染,再由 app.js 等比缩放到侧栏宽度。 */
|
|
262
|
+
.scene-thumb {
|
|
263
|
+
position: relative;
|
|
264
|
+
width: 100%;
|
|
265
|
+
overflow: hidden;
|
|
266
|
+
border-radius: 2px;
|
|
267
|
+
background: #fff;
|
|
268
|
+
}
|
|
269
|
+
.scene-thumb iframe {
|
|
270
|
+
position: absolute;
|
|
271
|
+
top: 0;
|
|
272
|
+
left: 0;
|
|
273
|
+
display: block;
|
|
274
|
+
border: 0;
|
|
275
|
+
background: #fff;
|
|
276
|
+
transform-origin: top left;
|
|
277
|
+
pointer-events: none;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/* 页码叠在缩略图左上角。 */
|
|
281
|
+
.scene-item .ordinal {
|
|
282
|
+
position: absolute;
|
|
283
|
+
top: 6px;
|
|
284
|
+
left: 6px;
|
|
285
|
+
z-index: 1;
|
|
286
|
+
padding: 0 5px;
|
|
287
|
+
border-radius: 4px;
|
|
288
|
+
background: rgb(15 23 42 / .55);
|
|
289
|
+
color: #fff;
|
|
290
|
+
font-family: var(--mono);
|
|
291
|
+
font-size: 10px;
|
|
292
|
+
line-height: 16px;
|
|
293
|
+
pointer-events: none;
|
|
294
|
+
}
|
|
295
|
+
.scene-item .stale-chip {
|
|
296
|
+
position: absolute;
|
|
297
|
+
top: 6px;
|
|
298
|
+
right: 6px;
|
|
299
|
+
z-index: 1;
|
|
300
|
+
margin: 0;
|
|
301
|
+
font-size: 10px;
|
|
302
|
+
pointer-events: none;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
/* 缩略图拖动排序:拖动中降低透明度,目标位置显示插入线。 */
|
|
306
|
+
.scene-list > li { position: relative; }
|
|
307
|
+
.scene-list > li .scene-item { cursor: grab; }
|
|
308
|
+
.scene-list > li.dragging .scene-item { opacity: .45; cursor: grabbing; }
|
|
309
|
+
.scene-list > li.drop-before::before,
|
|
310
|
+
.scene-list > li.drop-after::after {
|
|
311
|
+
content: '';
|
|
312
|
+
position: absolute;
|
|
313
|
+
left: 6px;
|
|
314
|
+
right: 6px;
|
|
315
|
+
height: 2px;
|
|
316
|
+
border-radius: 2px;
|
|
317
|
+
background: var(--accent);
|
|
318
|
+
pointer-events: none;
|
|
319
|
+
}
|
|
320
|
+
.scene-list > li.drop-before::before { top: -6px; }
|
|
321
|
+
.scene-list > li.drop-after::after { bottom: -6px; }
|
|
322
|
+
|
|
323
|
+
.panel-foot {
|
|
324
|
+
display: flex;
|
|
325
|
+
align-items: center;
|
|
326
|
+
justify-content: space-between;
|
|
327
|
+
padding: 8px 10px;
|
|
328
|
+
border-top: 1px solid var(--border);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.stage { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; gap: 10px; padding-left: 14px; overflow: hidden; }
|
|
332
|
+
/* 右侧属性区同样不做卡片包裹,只用分隔线划分。 */
|
|
333
|
+
.inspector {
|
|
334
|
+
margin-left: 0;
|
|
335
|
+
padding-left: 10px;
|
|
336
|
+
border: 0;
|
|
337
|
+
border-radius: 0;
|
|
338
|
+
background: transparent;
|
|
339
|
+
overflow: visible;
|
|
340
|
+
}
|
|
341
|
+
.inspector .panel-head { padding: 0 0 10px; border-bottom: 0; }
|
|
342
|
+
|
|
343
|
+
/* 中间区域的预览/源码切换按钮,浮在右上角。 */
|
|
344
|
+
.source-toggle {
|
|
345
|
+
position: absolute;
|
|
346
|
+
top: 6px;
|
|
347
|
+
right: 6px;
|
|
348
|
+
z-index: 3;
|
|
349
|
+
background: var(--surface);
|
|
350
|
+
box-shadow: 0 1px 5px rgb(15 23 42 / .16);
|
|
351
|
+
}
|
|
352
|
+
.source-toggle:hover:not(:disabled) { background: var(--surface); color: var(--accent); box-shadow: 0 2px 8px rgb(15 23 42 / .22); }
|
|
353
|
+
.source-toggle .source-toggle-preview { display: none; }
|
|
354
|
+
.source-toggle.is-code { color: var(--accent); }
|
|
355
|
+
.source-toggle.is-code .source-toggle-code { display: none; }
|
|
356
|
+
.source-toggle.is-code .source-toggle-preview { display: block; }
|
|
357
|
+
|
|
358
|
+
/* 源码编辑:保持与预览同宽,直接改场景 HTML 后由保存按钮提交。 */
|
|
359
|
+
.source-editor { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
|
|
360
|
+
.source-bar { display: flex; align-items: center; gap: 10px; padding: 0 44px 0 2px; font-size: 12px; }
|
|
361
|
+
.source-name {
|
|
362
|
+
font-family: var(--mono);
|
|
363
|
+
font-size: 11px;
|
|
364
|
+
color: var(--text-muted);
|
|
365
|
+
overflow: hidden;
|
|
366
|
+
text-overflow: ellipsis;
|
|
367
|
+
white-space: nowrap;
|
|
368
|
+
}
|
|
369
|
+
.source-state { margin-left: auto; }
|
|
370
|
+
.source-code-shell {
|
|
371
|
+
flex: 1;
|
|
372
|
+
min-height: 0;
|
|
373
|
+
display: flex;
|
|
374
|
+
overflow: hidden;
|
|
375
|
+
border: 1px solid var(--border);
|
|
376
|
+
border-radius: var(--radius);
|
|
377
|
+
background: var(--surface);
|
|
378
|
+
}
|
|
379
|
+
.source-code-shell:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
|
|
380
|
+
/* 行号列与代码层共用同一字号/行高,滚动位置由 app.js 同步。 */
|
|
381
|
+
.source-gutter {
|
|
382
|
+
flex: none;
|
|
383
|
+
margin: 0;
|
|
384
|
+
padding: 12px 10px 12px 12px;
|
|
385
|
+
border-right: 1px solid var(--border);
|
|
386
|
+
background: var(--surface-alt);
|
|
387
|
+
color: var(--text-muted);
|
|
388
|
+
font-family: var(--mono);
|
|
389
|
+
font-size: 12px;
|
|
390
|
+
line-height: 1.6;
|
|
391
|
+
text-align: right;
|
|
392
|
+
overflow: hidden;
|
|
393
|
+
user-select: none;
|
|
394
|
+
}
|
|
395
|
+
.source-code-layer { position: relative; flex: 1; min-width: 0; }
|
|
396
|
+
.source-highlight,
|
|
397
|
+
.source-code {
|
|
398
|
+
position: absolute;
|
|
399
|
+
inset: 0;
|
|
400
|
+
margin: 0;
|
|
401
|
+
padding: 12px 14px;
|
|
402
|
+
font-family: var(--mono);
|
|
403
|
+
font-size: 12px;
|
|
404
|
+
line-height: 1.6;
|
|
405
|
+
tab-size: 2;
|
|
406
|
+
white-space: pre;
|
|
407
|
+
}
|
|
408
|
+
.source-highlight { overflow: hidden; color: var(--text); pointer-events: none; }
|
|
409
|
+
.source-code {
|
|
410
|
+
width: 100%;
|
|
411
|
+
height: 100%;
|
|
412
|
+
border: 0;
|
|
413
|
+
background: transparent;
|
|
414
|
+
color: transparent;
|
|
415
|
+
caret-color: var(--text);
|
|
416
|
+
overflow: auto;
|
|
417
|
+
resize: none;
|
|
418
|
+
}
|
|
419
|
+
.source-code:focus { outline: none; }
|
|
420
|
+
.source-code::placeholder { color: var(--text-muted); }
|
|
421
|
+
.source-code::selection { background: rgb(59 79 216 / .22); }
|
|
422
|
+
/* 输入法组合期间隐藏高亮层,避免与候选文字重影。 */
|
|
423
|
+
.source-code-layer.is-composing .source-highlight { visibility: hidden; }
|
|
424
|
+
.source-code.is-composing { color: var(--text); }
|
|
425
|
+
|
|
426
|
+
/* 源码高亮配色:标签/属性/字符串/注释/数字/关键字。 */
|
|
427
|
+
.tok-comment { color: #7a8699; font-style: italic; }
|
|
428
|
+
.tok-tag { color: #2563eb; }
|
|
429
|
+
.tok-attr { color: #b45309; }
|
|
430
|
+
.tok-string { color: #15803d; }
|
|
431
|
+
.tok-keyword { color: #7c3aed; }
|
|
432
|
+
.tok-number { color: #c2410c; }
|
|
433
|
+
.tok-doctype { color: #64748b; }
|
|
434
|
+
|
|
435
|
+
/* 预览直接铺在中间区域,不再叠加工作台外框;由 app.js 计算缩放尺寸。 */
|
|
436
|
+
.frame-viewport {
|
|
437
|
+
position: relative;
|
|
438
|
+
flex: 1;
|
|
439
|
+
min-height: 0;
|
|
440
|
+
display: grid;
|
|
441
|
+
place-items: center;
|
|
442
|
+
overflow: hidden;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
.slide-fit {
|
|
446
|
+
position: relative;
|
|
447
|
+
overflow: hidden;
|
|
448
|
+
background: #fff;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
/* 双缓冲:两份 iframe 叠放,新页面加载完成后交叉淡入,避免切页闪白。 */
|
|
452
|
+
.preview-frame {
|
|
453
|
+
position: absolute;
|
|
454
|
+
top: 0;
|
|
455
|
+
left: 0;
|
|
456
|
+
display: block;
|
|
457
|
+
border: 0;
|
|
458
|
+
background: #fff;
|
|
459
|
+
transform-origin: top left;
|
|
460
|
+
opacity: 0;
|
|
461
|
+
visibility: hidden;
|
|
462
|
+
pointer-events: none;
|
|
463
|
+
transition: opacity .14s ease;
|
|
464
|
+
}
|
|
465
|
+
.preview-frame.is-active { opacity: 1; visibility: visible; pointer-events: auto; }
|
|
466
|
+
|
|
467
|
+
.empty-state {
|
|
468
|
+
position: absolute;
|
|
469
|
+
inset: 0;
|
|
470
|
+
display: grid;
|
|
471
|
+
place-items: center;
|
|
472
|
+
background: var(--surface);
|
|
473
|
+
color: var(--text-muted);
|
|
474
|
+
font-size: 13px;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
/* 空态、缩放容器与 iframe 都使用 display 切换,避免依赖 [hidden] 的样式优先级。 */
|
|
478
|
+
.empty-state.is-hidden { display: none; }
|
|
479
|
+
#slideFit.is-hidden { display: none; }
|
|
480
|
+
.preview-frame.is-hidden { display: none; }
|
|
481
|
+
|
|
482
|
+
.stage-foot {
|
|
483
|
+
display: flex;
|
|
484
|
+
align-items: center;
|
|
485
|
+
justify-content: space-between;
|
|
486
|
+
gap: 12px;
|
|
487
|
+
padding: 0 4px;
|
|
488
|
+
font-size: 12px;
|
|
489
|
+
}
|
|
490
|
+
.stage-foot-right { display: flex; align-items: center; gap: 12px; min-width: 0; }
|
|
491
|
+
.stage-foot-right > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
492
|
+
|
|
493
|
+
/* 中间底部固定为演讲稿区域,和 PPT 的备注栏一致。 */
|
|
494
|
+
.notes-pane {
|
|
495
|
+
flex: none;
|
|
496
|
+
display: flex;
|
|
497
|
+
flex-direction: column;
|
|
498
|
+
height: 148px;
|
|
499
|
+
min-height: 96px;
|
|
500
|
+
background: var(--surface);
|
|
501
|
+
border: 1px solid var(--border);
|
|
502
|
+
border-radius: var(--radius);
|
|
503
|
+
overflow: hidden;
|
|
504
|
+
}
|
|
505
|
+
.notes-head {
|
|
506
|
+
display: flex;
|
|
507
|
+
align-items: center;
|
|
508
|
+
justify-content: space-between;
|
|
509
|
+
gap: 10px;
|
|
510
|
+
padding: 7px 12px;
|
|
511
|
+
border-bottom: 1px solid var(--border);
|
|
512
|
+
background: var(--surface-alt);
|
|
513
|
+
}
|
|
514
|
+
.notes-head h2 { margin: 0; font-size: 12px; font-weight: 500; color: var(--text-muted); letter-spacing: .04em; }
|
|
515
|
+
.notes-actions { display: flex; align-items: center; gap: 8px; }
|
|
516
|
+
.notes-actions .ghost-button { padding: 3px 10px; font-size: 12px; }
|
|
517
|
+
.notes-input {
|
|
518
|
+
flex: 1;
|
|
519
|
+
width: 100%;
|
|
520
|
+
min-height: 0;
|
|
521
|
+
padding: 10px 12px;
|
|
522
|
+
border: 0;
|
|
523
|
+
resize: none;
|
|
524
|
+
background: var(--surface);
|
|
525
|
+
color: var(--text);
|
|
526
|
+
font: inherit;
|
|
527
|
+
font-size: 13px;
|
|
528
|
+
line-height: 1.65;
|
|
529
|
+
}
|
|
530
|
+
.notes-input:focus { outline: none; box-shadow: inset 0 0 0 1px var(--accent-soft); }
|
|
531
|
+
.notes-input:disabled { background: var(--surface-alt); color: var(--text-muted); }
|
|
532
|
+
|
|
533
|
+
.inspector-body { flex: 1; padding: 12px 14px; overflow-y: auto; }
|
|
534
|
+
|
|
535
|
+
/* 结构 tab:上半部分页面结构树,下半部分本页组件说明,两段各自滚动。 */
|
|
536
|
+
.inspector-body.is-split { display: flex; flex-direction: column; overflow: hidden; }
|
|
537
|
+
.inspector-split { display: flex; flex: 1; flex-direction: column; gap: 10px; min-height: 0; }
|
|
538
|
+
.inspector-pane { flex: 1 1 50%; min-height: 0; padding-bottom: 12px; overflow-y: auto; }
|
|
539
|
+
.structure-pane { border-bottom: 1px solid var(--border); }
|
|
540
|
+
.inspector-pane .section-title:first-child { margin-top: 0; }
|
|
541
|
+
.component-definition { margin: 0 0 10px; font-size: 11px; line-height: 1.6; color: var(--text-muted); }
|
|
542
|
+
.component-brief {
|
|
543
|
+
margin-bottom: 10px;
|
|
544
|
+
padding: 9px 10px;
|
|
545
|
+
border: 1px solid var(--border);
|
|
546
|
+
border-radius: 9px;
|
|
547
|
+
background: var(--surface-alt);
|
|
548
|
+
}
|
|
549
|
+
.component-brief-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
|
|
550
|
+
.component-cid { font-family: var(--mono); font-size: 12px; font-weight: 500; }
|
|
551
|
+
.component-type { flex: 1; min-width: 0; font-size: 10px; color: var(--text-muted); }
|
|
552
|
+
.component-purpose { margin: 6px 0; font-size: 11px; line-height: 1.55; }
|
|
553
|
+
.component-param { display: flex; gap: 8px; font-size: 11px; line-height: 1.7; }
|
|
554
|
+
.component-param-label { flex: none; width: 44px; color: var(--text-muted); }
|
|
555
|
+
.component-param-value { flex: 1; min-width: 0; word-break: break-word; }
|
|
556
|
+
|
|
557
|
+
/* 场景结构树:场景文件为根,子节点是页面里的真实 HTML 标签。 */
|
|
558
|
+
.tree { margin: 0; padding: 0; list-style: none; }
|
|
559
|
+
.tree-row {
|
|
560
|
+
display: flex;
|
|
561
|
+
align-items: center;
|
|
562
|
+
gap: 7px;
|
|
563
|
+
width: 100%;
|
|
564
|
+
padding: 4px 6px;
|
|
565
|
+
border: 0;
|
|
566
|
+
border-radius: 6px;
|
|
567
|
+
background: transparent;
|
|
568
|
+
color: var(--text);
|
|
569
|
+
font-size: 12px;
|
|
570
|
+
text-align: left;
|
|
571
|
+
}
|
|
572
|
+
.tree-root { color: var(--text-muted); }
|
|
573
|
+
.tree-caret {
|
|
574
|
+
flex: none;
|
|
575
|
+
width: 0;
|
|
576
|
+
height: 0;
|
|
577
|
+
border-top: 4px solid transparent;
|
|
578
|
+
border-bottom: 4px solid transparent;
|
|
579
|
+
border-left: 5px solid currentColor;
|
|
580
|
+
transform: rotate(90deg);
|
|
581
|
+
}
|
|
582
|
+
.tree-caret.is-leaf { visibility: hidden; }
|
|
583
|
+
.tree-file-name { font-family: var(--mono); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
584
|
+
.tree-children {
|
|
585
|
+
margin: 2px 0 0 9px;
|
|
586
|
+
padding: 2px 0 2px 10px;
|
|
587
|
+
border-left: 1px solid var(--border);
|
|
588
|
+
list-style: none;
|
|
589
|
+
}
|
|
590
|
+
.tree-item.is-collapsed > .tree-children { display: none; }
|
|
591
|
+
.tree-item.is-collapsed > .tree-row .tree-caret { transform: rotate(0deg); }
|
|
592
|
+
.tree-node.is-branch { cursor: pointer; }
|
|
593
|
+
.tree-node.is-branch:hover { background: var(--surface-alt); }
|
|
594
|
+
.tree-name { flex: none; max-width: 62%; font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
595
|
+
.tree-type { flex: 1; min-width: 0; font-size: 10px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
596
|
+
.tree-empty { padding: 4px 6px; color: var(--text-muted); font-size: 12px; }
|
|
597
|
+
|
|
598
|
+
.field { margin-bottom: 14px; }
|
|
599
|
+
.field label { display: block; margin-bottom: 4px; font-size: 12px; color: var(--text-muted); }
|
|
600
|
+
.field .value { font-size: 13px; word-break: break-word; }
|
|
601
|
+
.field .mono { font-family: var(--mono); font-size: 12px; }
|
|
602
|
+
|
|
603
|
+
.kv { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 4px 10px; font-size: 12px; }
|
|
604
|
+
.kv dt { color: var(--text-muted); }
|
|
605
|
+
.kv dd { margin: 0; word-break: break-word; }
|
|
606
|
+
|
|
607
|
+
.section-title { margin: 16px 0 8px; font-size: 12px; font-weight: 500; color: var(--text-muted); letter-spacing: .04em; }
|
|
608
|
+
/* 属性 tab 的区块标题也作为网格行,下面接分隔线。 */
|
|
609
|
+
.inspector-body.is-props .section-title { margin: 0; padding: 10px 0 8px; border-bottom: 1px solid var(--border); }
|
|
610
|
+
|
|
611
|
+
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
|
|
612
|
+
.chip { padding: 2px 8px; border-radius: 6px; background: var(--surface-alt); border: 1px solid var(--border); font-size: 11px; }
|
|
613
|
+
.chip-ok { background: var(--success-soft); border-color: #b7e3d0; color: var(--success); }
|
|
614
|
+
.chip-warn { background: var(--warning-soft); border-color: #f0dcae; color: var(--warning); }
|
|
615
|
+
.chip-danger { background: var(--danger-soft); border-color: #f0c4c4; color: var(--danger); }
|
|
616
|
+
|
|
617
|
+
/* 校验结果同样按行分隔,不使用卡片底色。 */
|
|
618
|
+
.diagnostic {
|
|
619
|
+
padding: 8px 0;
|
|
620
|
+
margin: 0;
|
|
621
|
+
border: 0;
|
|
622
|
+
border-top: 1px solid var(--border);
|
|
623
|
+
border-radius: 0;
|
|
624
|
+
background: transparent;
|
|
625
|
+
font-size: 12px;
|
|
626
|
+
}
|
|
627
|
+
.diagnostic.error strong { color: var(--danger); }
|
|
628
|
+
.diagnostic.warning strong { color: var(--warning); }
|
|
629
|
+
.diagnostic .code { font-family: var(--mono); font-size: 11px; color: var(--text-muted); }
|
|
630
|
+
|
|
631
|
+
/* 属性 tab:不画卡片,区块之间用横向网格线分隔。 */
|
|
632
|
+
.quiz-card {
|
|
633
|
+
margin-bottom: 0;
|
|
634
|
+
padding: 0;
|
|
635
|
+
border: 0;
|
|
636
|
+
border-radius: 0;
|
|
637
|
+
background: transparent;
|
|
638
|
+
}
|
|
639
|
+
.quiz-card + .quiz-card { border-top: 1px solid var(--border); }
|
|
640
|
+
.quiz-head {
|
|
641
|
+
display: flex;
|
|
642
|
+
flex-direction: column;
|
|
643
|
+
gap: 5px;
|
|
644
|
+
margin-bottom: 0;
|
|
645
|
+
padding: 10px 0 12px;
|
|
646
|
+
}
|
|
647
|
+
.quiz-title-row { display: flex; align-items: center; gap: 8px; }
|
|
648
|
+
.quiz-title-row strong { font-size: 13px; font-weight: 600; }
|
|
649
|
+
.quiz-chip {
|
|
650
|
+
padding: 2px 8px;
|
|
651
|
+
border-radius: 999px;
|
|
652
|
+
background: var(--accent-soft);
|
|
653
|
+
color: var(--accent);
|
|
654
|
+
font-size: 10px;
|
|
655
|
+
line-height: 1.5;
|
|
656
|
+
}
|
|
657
|
+
.quiz-meta { font-family: var(--mono); font-size: 10px; color: var(--text-muted); }
|
|
658
|
+
|
|
659
|
+
.quiz-section { margin-bottom: 0; padding: 12px 0; border-top: 1px solid var(--border); }
|
|
660
|
+
.quiz-section.muted { font-size: 12px; }
|
|
661
|
+
.quiz-label { margin-bottom: 6px; font-size: 11px; color: var(--text-muted); letter-spacing: .03em; }
|
|
662
|
+
.quiz-stem { min-height: 64px; line-height: 1.55; resize: vertical; }
|
|
663
|
+
|
|
664
|
+
.answer-list { display: grid; gap: 0; border-top: 1px solid var(--border); }
|
|
665
|
+
.answer-item {
|
|
666
|
+
display: flex;
|
|
667
|
+
align-items: center;
|
|
668
|
+
gap: 8px;
|
|
669
|
+
padding: 8px 2px;
|
|
670
|
+
border-bottom: 1px solid var(--border);
|
|
671
|
+
font-size: 12px;
|
|
672
|
+
}
|
|
673
|
+
.answer-list > .answer-item:last-child { border-bottom: 0; }
|
|
674
|
+
.answer-item input { margin: 3px 0 0; accent-color: var(--accent); }
|
|
675
|
+
.answer-item input.quiz-option-input { margin: 0; }
|
|
676
|
+
|
|
677
|
+
/* 学生视角预览:复用场景内 <lume-quiz> 的渲染结果,不再另写一套展示结构。 */
|
|
678
|
+
.quiz-preview { padding-top: 10px; }
|
|
679
|
+
.quiz-option-tools { display: flex; justify-content: flex-end; padding-top: 8px; }
|
|
680
|
+
.quiz-option-add { padding: 3px 10px; font-size: 12px; }
|
|
681
|
+
.quiz-option-input {
|
|
682
|
+
flex: 1;
|
|
683
|
+
min-width: 0;
|
|
684
|
+
padding: 4px 8px;
|
|
685
|
+
border: 1px solid transparent;
|
|
686
|
+
border-radius: 6px;
|
|
687
|
+
background: transparent;
|
|
688
|
+
color: var(--text);
|
|
689
|
+
font: inherit;
|
|
690
|
+
}
|
|
691
|
+
.quiz-option-input:hover { border-color: var(--border-strong); }
|
|
692
|
+
.quiz-option-input:focus { outline: none; border-color: var(--accent); background: var(--surface); }
|
|
693
|
+
.quiz-option-remove {
|
|
694
|
+
flex: none;
|
|
695
|
+
width: 22px;
|
|
696
|
+
height: 22px;
|
|
697
|
+
border: 0;
|
|
698
|
+
border-radius: 6px;
|
|
699
|
+
background: transparent;
|
|
700
|
+
color: var(--text-muted);
|
|
701
|
+
font-size: 15px;
|
|
702
|
+
line-height: 1;
|
|
703
|
+
}
|
|
704
|
+
.quiz-option-remove:hover:not(:disabled) { background: var(--danger-soft); color: var(--danger); }
|
|
705
|
+
.quiz-option-remove:disabled { opacity: .3; cursor: not-allowed; }
|
|
706
|
+
.answer-key {
|
|
707
|
+
flex: none;
|
|
708
|
+
display: grid;
|
|
709
|
+
place-items: center;
|
|
710
|
+
width: 18px;
|
|
711
|
+
height: 18px;
|
|
712
|
+
border: 1px solid var(--border);
|
|
713
|
+
border-radius: 5px;
|
|
714
|
+
background: var(--surface);
|
|
715
|
+
color: var(--text-muted);
|
|
716
|
+
font-family: var(--mono);
|
|
717
|
+
font-size: 10px;
|
|
718
|
+
}
|
|
719
|
+
.answer-text { flex: 1; min-width: 0; line-height: 1.5; word-break: break-word; }
|
|
720
|
+
.answer-item:has(input:checked) { background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); }
|
|
721
|
+
.answer-item:has(input:checked) .answer-key { border-color: var(--accent); color: var(--accent); }
|
|
722
|
+
|
|
723
|
+
.hint-warn {
|
|
724
|
+
padding: 8px 0 8px 10px;
|
|
725
|
+
border: 0;
|
|
726
|
+
border-left: 2px solid #f0dcae;
|
|
727
|
+
border-radius: 0;
|
|
728
|
+
background: transparent;
|
|
729
|
+
color: var(--warning);
|
|
730
|
+
font-size: 12px;
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
.quiz-advanced {
|
|
734
|
+
margin: 0;
|
|
735
|
+
padding: 10px 0;
|
|
736
|
+
border-top: 1px solid var(--border);
|
|
737
|
+
}
|
|
738
|
+
.quiz-advanced > summary {
|
|
739
|
+
display: flex;
|
|
740
|
+
align-items: baseline;
|
|
741
|
+
justify-content: space-between;
|
|
742
|
+
gap: 8px;
|
|
743
|
+
cursor: pointer;
|
|
744
|
+
list-style: none;
|
|
745
|
+
font-size: 11px;
|
|
746
|
+
color: var(--text-muted);
|
|
747
|
+
}
|
|
748
|
+
.quiz-advanced > summary::-webkit-details-marker { display: none; }
|
|
749
|
+
.quiz-advanced > summary::before { content: '▸'; margin-right: 6px; font-size: 9px; }
|
|
750
|
+
.quiz-advanced[open] > summary::before { content: '▾'; }
|
|
751
|
+
.quiz-advanced[open] > summary { margin-bottom: 12px; color: var(--text); }
|
|
752
|
+
.quiz-summary-hint { flex: none; font-size: 10px; color: var(--text-muted); }
|
|
753
|
+
|
|
754
|
+
.quiz-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
|
|
755
|
+
.quiz-grid .field { margin-bottom: 0; }
|
|
756
|
+
.quiz-span-2 { grid-column: span 2; }
|
|
757
|
+
.quiz-toggles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 10px; }
|
|
758
|
+
|
|
759
|
+
.ghost-button.danger { color: var(--danger); border-color: #f0c4c4; }
|
|
760
|
+
.ghost-button.danger:hover:not(:disabled) { background: var(--danger-soft); border-color: var(--danger); }
|
|
761
|
+
|
|
762
|
+
.stale-chip { font-size: 10px; }
|
|
763
|
+
|
|
764
|
+
.diff-panel {
|
|
765
|
+
max-height: 46vh;
|
|
766
|
+
overflow-y: auto;
|
|
767
|
+
padding: 10px 14px;
|
|
768
|
+
border-top: 1px solid var(--border);
|
|
769
|
+
font-size: 12px;
|
|
770
|
+
}
|
|
771
|
+
.confirm-body { padding: 12px 16px 16px; }
|
|
772
|
+
.confirm-body .diff-panel { max-height: 40vh; border: 1px solid var(--border); border-radius: 8px; }
|
|
773
|
+
.diff-summary { margin-bottom: 8px; font-size: 12px; color: var(--text-muted); }
|
|
774
|
+
.diff-file { margin-bottom: 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
|
|
775
|
+
.diff-file summary { display: flex; align-items: center; gap: 6px; padding: 7px 10px; cursor: pointer; font-size: 12px; }
|
|
776
|
+
.diff-kind { padding: 1px 6px; border-radius: 5px; font-family: var(--mono); font-size: 10px; background: var(--surface-alt); }
|
|
777
|
+
.diff-kind.added { background: var(--success-soft); color: var(--success); }
|
|
778
|
+
.diff-kind.deleted { background: var(--danger-soft); color: var(--danger); }
|
|
779
|
+
.diff-kind.modified { background: var(--accent-soft); color: var(--accent); }
|
|
780
|
+
.diff-caption { padding: 4px 10px 0; font-family: var(--mono); font-size: 10px; color: var(--text-muted); }
|
|
781
|
+
.diff-file pre {
|
|
782
|
+
margin: 4px 0 0;
|
|
783
|
+
padding: 8px 10px;
|
|
784
|
+
max-height: 220px;
|
|
785
|
+
overflow: auto;
|
|
786
|
+
background: #0f172a;
|
|
787
|
+
color: #dbe4f3;
|
|
788
|
+
font-family: var(--mono);
|
|
789
|
+
font-size: 11px;
|
|
790
|
+
line-height: 1.5;
|
|
791
|
+
white-space: pre-wrap;
|
|
792
|
+
word-break: break-word;
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
.history-link {
|
|
796
|
+
display: block;
|
|
797
|
+
width: 100%;
|
|
798
|
+
padding: 0;
|
|
799
|
+
border: 0;
|
|
800
|
+
background: transparent;
|
|
801
|
+
color: var(--text);
|
|
802
|
+
text-align: left;
|
|
803
|
+
font-size: 12px;
|
|
804
|
+
}
|
|
805
|
+
.history-link:hover strong { color: var(--accent); }
|
|
806
|
+
.history-item .ghost-button { margin-top: 6px; }
|
|
807
|
+
|
|
808
|
+
.quiz-input {
|
|
809
|
+
width: 100%;
|
|
810
|
+
padding: 6px 8px;
|
|
811
|
+
border: 1px solid var(--border-strong);
|
|
812
|
+
border-radius: 7px;
|
|
813
|
+
background: var(--surface);
|
|
814
|
+
color: var(--text);
|
|
815
|
+
font: inherit;
|
|
816
|
+
font-size: 12px;
|
|
817
|
+
}
|
|
818
|
+
.quiz-input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
|
|
819
|
+
|
|
820
|
+
.check-row { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text); }
|
|
821
|
+
.check-row input { accent-color: var(--accent); margin: 0; }
|
|
822
|
+
|
|
823
|
+
.quiz-actions {
|
|
824
|
+
display: flex;
|
|
825
|
+
align-items: center;
|
|
826
|
+
gap: 10px;
|
|
827
|
+
margin-top: 0;
|
|
828
|
+
padding: 10px 0;
|
|
829
|
+
border-top: 1px solid var(--border);
|
|
830
|
+
}
|
|
831
|
+
.quiz-card .quiz-footer { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
|
|
832
|
+
.quiz-state { font-size: 11px; }
|
|
833
|
+
|
|
834
|
+
.muted { color: var(--text-muted); }
|
|
835
|
+
|
|
836
|
+
.dialog {
|
|
837
|
+
width: min(560px, 92vw);
|
|
838
|
+
padding: 0;
|
|
839
|
+
border: 1px solid var(--border-strong);
|
|
840
|
+
border-radius: 12px;
|
|
841
|
+
background: var(--surface);
|
|
842
|
+
color: var(--text);
|
|
843
|
+
}
|
|
844
|
+
.dialog::backdrop { background: rgb(15 23 42 / .35); }
|
|
845
|
+
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); }
|
|
846
|
+
.dialog-head h2 { margin: 0; font-size: 13px; font-weight: 500; }
|
|
847
|
+
.settings-body { padding: 4px 16px 16px; }
|
|
848
|
+
.settings-body .section-title:first-child { margin-top: 2px; }
|
|
849
|
+
.settings-hint { margin-top: 4px; font-size: 11px; line-height: 1.5; }
|
|
850
|
+
.history-list { margin: 0; padding: 10px 16px 16px; list-style: none; }
|
|
851
|
+
.history-item { padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 12px; }
|
|
852
|
+
.history-item strong { font-family: var(--mono); font-size: 11px; color: var(--text-muted); }
|
|
853
|
+
|
|
854
|
+
@media (max-width: 1180px) {
|
|
855
|
+
.layout { --scene-width: 208px; --inspector-width: 264px; padding: 10px; }
|
|
856
|
+
.stage { padding-left: 10px; }
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
@media (max-width: 860px) {
|
|
860
|
+
.layout { grid-template-columns: minmax(0, 1fr) 10px 260px; }
|
|
861
|
+
.layout.inspector-collapsed { grid-template-columns: minmax(0, 1fr) 44px; }
|
|
862
|
+
.scene-panel, .scene-resizer { display: none; }
|
|
863
|
+
.stage { padding-left: 0; }
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
@media (max-width: 640px) {
|
|
867
|
+
.layout { grid-template-columns: minmax(0, 1fr); }
|
|
868
|
+
.layout.inspector-collapsed { grid-template-columns: minmax(0, 1fr); }
|
|
869
|
+
.inspector, .inspector-resizer { display: none; }
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
/* 矮窗口下压缩讲稿栏,保证预览与工具栏仍完整落在视口内。 */
|
|
873
|
+
@media (max-height: 640px) {
|
|
874
|
+
.notes-pane { height: 108px; min-height: 84px; }
|
|
875
|
+
.notes-input { padding: 6px 12px; }
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
/* AI 对话:右侧浮层,不改变三栏布局,预览与元素选择仍可继续操作。 */
|
|
879
|
+
.chat-panel {
|
|
880
|
+
position: fixed;
|
|
881
|
+
top: 54px;
|
|
882
|
+
right: 14px;
|
|
883
|
+
bottom: 14px;
|
|
884
|
+
z-index: 30;
|
|
885
|
+
display: flex;
|
|
886
|
+
flex-direction: column;
|
|
887
|
+
width: min(372px, calc(100vw - 28px));
|
|
888
|
+
background: var(--surface);
|
|
889
|
+
border: 1px solid var(--border-strong);
|
|
890
|
+
border-radius: 12px;
|
|
891
|
+
box-shadow: 0 18px 48px rgb(15 23 42 / .18);
|
|
892
|
+
overflow: hidden;
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
.chat-head {
|
|
896
|
+
display: flex;
|
|
897
|
+
align-items: center;
|
|
898
|
+
justify-content: space-between;
|
|
899
|
+
gap: 8px;
|
|
900
|
+
padding: 7px 8px 7px 12px;
|
|
901
|
+
border-bottom: 1px solid var(--border);
|
|
902
|
+
background: var(--surface-alt);
|
|
903
|
+
}
|
|
904
|
+
.chat-title { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
|
|
905
|
+
.chat-title strong { font-size: 13px; font-weight: 600; white-space: nowrap; }
|
|
906
|
+
.chat-title span { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
907
|
+
.chat-actions { display: flex; align-items: center; gap: 2px; }
|
|
908
|
+
.chat-actions .icon-button.is-active { background: var(--accent-soft); color: var(--accent); }
|
|
909
|
+
|
|
910
|
+
.chat-messages {
|
|
911
|
+
flex: 1;
|
|
912
|
+
min-height: 0;
|
|
913
|
+
overflow-y: auto;
|
|
914
|
+
display: flex;
|
|
915
|
+
flex-direction: column;
|
|
916
|
+
gap: 9px;
|
|
917
|
+
padding: 12px;
|
|
918
|
+
background: var(--bg);
|
|
919
|
+
}
|
|
920
|
+
.chat-empty { margin: 0; font-size: 12px; line-height: 1.7; }
|
|
921
|
+
|
|
922
|
+
.chat-msg {
|
|
923
|
+
max-width: 92%;
|
|
924
|
+
padding: 8px 10px;
|
|
925
|
+
border-radius: 10px;
|
|
926
|
+
font-size: 12px;
|
|
927
|
+
line-height: 1.6;
|
|
928
|
+
}
|
|
929
|
+
.chat-msg.user {
|
|
930
|
+
align-self: flex-end;
|
|
931
|
+
background: var(--accent);
|
|
932
|
+
color: #fff;
|
|
933
|
+
border-bottom-right-radius: 3px;
|
|
934
|
+
}
|
|
935
|
+
.chat-msg.agent {
|
|
936
|
+
align-self: flex-start;
|
|
937
|
+
background: var(--surface);
|
|
938
|
+
border: 1px solid var(--border);
|
|
939
|
+
border-bottom-left-radius: 3px;
|
|
940
|
+
}
|
|
941
|
+
.chat-msg.system {
|
|
942
|
+
align-self: center;
|
|
943
|
+
max-width: 100%;
|
|
944
|
+
padding: 4px 10px;
|
|
945
|
+
background: var(--surface-alt);
|
|
946
|
+
color: var(--text-muted);
|
|
947
|
+
font-size: 11px;
|
|
948
|
+
text-align: center;
|
|
949
|
+
}
|
|
950
|
+
.chat-msg-head {
|
|
951
|
+
display: flex;
|
|
952
|
+
align-items: center;
|
|
953
|
+
gap: 6px;
|
|
954
|
+
margin-bottom: 3px;
|
|
955
|
+
font-size: 10px;
|
|
956
|
+
opacity: .72;
|
|
957
|
+
}
|
|
958
|
+
.chat-msg-body { white-space: pre-wrap; word-break: break-word; }
|
|
959
|
+
|
|
960
|
+
.chat-ref {
|
|
961
|
+
display: inline-flex;
|
|
962
|
+
align-items: center;
|
|
963
|
+
gap: 4px;
|
|
964
|
+
max-width: 100%;
|
|
965
|
+
margin-top: 5px;
|
|
966
|
+
padding: 2px 7px;
|
|
967
|
+
border-radius: 999px;
|
|
968
|
+
background: var(--accent-soft);
|
|
969
|
+
color: var(--accent);
|
|
970
|
+
font-size: 10px;
|
|
971
|
+
overflow: hidden;
|
|
972
|
+
text-overflow: ellipsis;
|
|
973
|
+
white-space: nowrap;
|
|
974
|
+
}
|
|
975
|
+
.chat-msg.user .chat-ref { background: rgb(255 255 255 / .2); color: #fff; }
|
|
976
|
+
.chat-rev { font-family: var(--mono); font-size: 9px; padding: 0 4px; border-radius: 4px; background: rgb(15 23 42 / .08); }
|
|
977
|
+
.chat-msg.user .chat-rev { background: rgb(255 255 255 / .22); }
|
|
978
|
+
.chat-status { font-size: 10px; opacity: .8; }
|
|
979
|
+
.chat-status.is-claimed { opacity: 1; font-weight: 600; }
|
|
980
|
+
|
|
981
|
+
.chat-selection {
|
|
982
|
+
display: flex;
|
|
983
|
+
align-items: center;
|
|
984
|
+
gap: 6px;
|
|
985
|
+
padding: 6px 10px;
|
|
986
|
+
border-top: 1px solid var(--border);
|
|
987
|
+
background: var(--accent-soft);
|
|
988
|
+
color: var(--accent);
|
|
989
|
+
font-size: 11px;
|
|
990
|
+
}
|
|
991
|
+
.chat-selection .chat-ref { flex: 1; min-width: 0; margin: 0; padding: 0; background: transparent; }
|
|
992
|
+
.chat-selection .icon-button { width: 22px; height: 22px; color: var(--accent); }
|
|
993
|
+
|
|
994
|
+
.chat-form {
|
|
995
|
+
flex: none;
|
|
996
|
+
padding: 8px 10px 10px;
|
|
997
|
+
border-top: 1px solid var(--border);
|
|
998
|
+
background: var(--surface);
|
|
999
|
+
}
|
|
1000
|
+
.chat-input {
|
|
1001
|
+
width: 100%;
|
|
1002
|
+
min-height: 58px;
|
|
1003
|
+
max-height: 148px;
|
|
1004
|
+
padding: 8px 10px;
|
|
1005
|
+
border: 1px solid var(--border-strong);
|
|
1006
|
+
border-radius: 8px;
|
|
1007
|
+
background: var(--surface);
|
|
1008
|
+
color: var(--text);
|
|
1009
|
+
font: inherit;
|
|
1010
|
+
font-size: 12px;
|
|
1011
|
+
line-height: 1.6;
|
|
1012
|
+
resize: vertical;
|
|
1013
|
+
}
|
|
1014
|
+
.chat-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
|
|
1015
|
+
.chat-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
|
|
1016
|
+
.chat-form-foot .muted { font-size: 10px; line-height: 1.4; }
|
|
1017
|
+
.chat-form-foot .ghost-button { flex: none; padding: 4px 14px; font-size: 12px; }
|
|
1018
|
+
|
|
1019
|
+
#chatButton { position: relative; }
|
|
1020
|
+
#chatButton.is-active { background: var(--accent-soft); color: var(--accent); }
|
|
1021
|
+
#chatButton.has-unread::after {
|
|
1022
|
+
content: '';
|
|
1023
|
+
position: absolute;
|
|
1024
|
+
top: 5px;
|
|
1025
|
+
right: 5px;
|
|
1026
|
+
width: 6px;
|
|
1027
|
+
height: 6px;
|
|
1028
|
+
border-radius: 50%;
|
|
1029
|
+
background: var(--accent);
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
.pick-hint {
|
|
1033
|
+
position: absolute;
|
|
1034
|
+
left: 50%;
|
|
1035
|
+
bottom: 12px;
|
|
1036
|
+
z-index: 4;
|
|
1037
|
+
transform: translateX(-50%);
|
|
1038
|
+
padding: 5px 12px;
|
|
1039
|
+
border-radius: 999px;
|
|
1040
|
+
background: rgb(27 36 48 / .86);
|
|
1041
|
+
color: #fff;
|
|
1042
|
+
font-size: 11px;
|
|
1043
|
+
pointer-events: none;
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
@media (max-width: 640px) {
|
|
1047
|
+
.chat-panel { top: 50px; right: 8px; bottom: 8px; width: calc(100vw - 16px); }
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
/* 课件主页:独立滚动页面,沿用编辑器的浅色主题。 */
|
|
1051
|
+
html.home-root, html.home-root body { height: auto; overflow: auto; }
|
|
1052
|
+
body.home-body { display: block; min-height: 100vh; background: var(--bg); }
|
|
1053
|
+
.home-topbar {
|
|
1054
|
+
position: sticky;
|
|
1055
|
+
top: 0;
|
|
1056
|
+
z-index: 10;
|
|
1057
|
+
display: flex;
|
|
1058
|
+
align-items: center;
|
|
1059
|
+
gap: 14px;
|
|
1060
|
+
padding: 10px 24px;
|
|
1061
|
+
border-bottom: 1px solid var(--border);
|
|
1062
|
+
background: rgb(255 255 255 / .92);
|
|
1063
|
+
backdrop-filter: blur(8px);
|
|
1064
|
+
}
|
|
1065
|
+
.home-crumb { font-size: 12px; color: var(--text-muted); }
|
|
1066
|
+
.home-back { margin-left: auto; text-decoration: none; }
|
|
1067
|
+
.home-main { width: min(1180px, 100%); margin: 0 auto; padding: 36px 24px 64px; }
|
|
1068
|
+
.home-hero h1 { margin: 0 0 6px; font-size: 26px; letter-spacing: -.02em; }
|
|
1069
|
+
.home-hero p { margin: 0; max-width: 720px; font-size: 13px; }
|
|
1070
|
+
.home-toolbar { display: flex; align-items: center; gap: 10px; margin: 26px 0 14px; }
|
|
1071
|
+
.home-toolbar .ghost-button { margin-left: auto; }
|
|
1072
|
+
.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
|
|
1073
|
+
.home-card {
|
|
1074
|
+
overflow: hidden;
|
|
1075
|
+
border: 1px solid var(--border);
|
|
1076
|
+
border-radius: 14px;
|
|
1077
|
+
background: var(--surface);
|
|
1078
|
+
transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
|
|
1079
|
+
}
|
|
1080
|
+
.home-card:hover { transform: translateY(-2px); border-color: var(--border-strong); box-shadow: 0 10px 28px rgb(27 36 48 / .08); }
|
|
1081
|
+
.home-card.is-current { border-color: var(--accent); }
|
|
1082
|
+
.home-card.is-busy { opacity: .6; pointer-events: none; }
|
|
1083
|
+
.home-card-open {
|
|
1084
|
+
display: block;
|
|
1085
|
+
width: 100%;
|
|
1086
|
+
padding: 0;
|
|
1087
|
+
border: 0;
|
|
1088
|
+
background: none;
|
|
1089
|
+
color: inherit;
|
|
1090
|
+
text-align: left;
|
|
1091
|
+
}
|
|
1092
|
+
.home-cover {
|
|
1093
|
+
position: relative;
|
|
1094
|
+
display: grid;
|
|
1095
|
+
place-items: center;
|
|
1096
|
+
aspect-ratio: 16 / 9;
|
|
1097
|
+
background: linear-gradient(135deg, hsl(var(--cover-hue) 72% 93%), hsl(var(--cover-hue) 52% 82%));
|
|
1098
|
+
}
|
|
1099
|
+
.home-cover-mark { font-size: 30px; font-weight: 650; letter-spacing: -.03em; color: hsl(var(--cover-hue) 45% 30%); }
|
|
1100
|
+
.home-status {
|
|
1101
|
+
position: absolute;
|
|
1102
|
+
top: 10px;
|
|
1103
|
+
right: 10px;
|
|
1104
|
+
padding: 1px 8px;
|
|
1105
|
+
border-radius: 999px;
|
|
1106
|
+
font-size: 10px;
|
|
1107
|
+
font-weight: 500;
|
|
1108
|
+
background: rgb(255 255 255 / .86);
|
|
1109
|
+
}
|
|
1110
|
+
.home-status.is-running { color: var(--success); }
|
|
1111
|
+
.home-status.is-idle { color: var(--text-muted); }
|
|
1112
|
+
.home-card-body { padding: 13px 14px 14px; }
|
|
1113
|
+
.home-card-title { font-size: 14px; font-weight: 600; line-height: 1.45; }
|
|
1114
|
+
.home-card-meta { margin-top: 4px; font-size: 12px; color: var(--text-muted); }
|
|
1115
|
+
.home-card-foot {
|
|
1116
|
+
display: flex;
|
|
1117
|
+
justify-content: space-between;
|
|
1118
|
+
gap: 8px;
|
|
1119
|
+
margin-top: 10px;
|
|
1120
|
+
padding-top: 9px;
|
|
1121
|
+
border-top: 1px solid var(--border);
|
|
1122
|
+
font-family: var(--mono);
|
|
1123
|
+
font-size: 10px;
|
|
1124
|
+
color: var(--text-muted);
|
|
1125
|
+
}
|
|
1126
|
+
.home-card-path {
|
|
1127
|
+
margin-top: 7px;
|
|
1128
|
+
overflow: hidden;
|
|
1129
|
+
font-family: var(--mono);
|
|
1130
|
+
font-size: 10px;
|
|
1131
|
+
color: var(--text-muted);
|
|
1132
|
+
text-overflow: ellipsis;
|
|
1133
|
+
white-space: nowrap;
|
|
1134
|
+
}
|
|
1135
|
+
.home-empty {
|
|
1136
|
+
grid-column: 1 / -1;
|
|
1137
|
+
padding: 46px 20px;
|
|
1138
|
+
border: 1px dashed var(--border-strong);
|
|
1139
|
+
border-radius: 14px;
|
|
1140
|
+
background: var(--surface);
|
|
1141
|
+
color: var(--text-muted);
|
|
1142
|
+
font-size: 13px;
|
|
1143
|
+
text-align: center;
|
|
1144
|
+
line-height: 1.9;
|
|
1145
|
+
}
|
|
1146
|
+
.home-empty code { padding: 2px 6px; border-radius: 5px; background: var(--surface-alt); font-family: var(--mono); font-size: 12px; }
|
|
1147
|
+
.home-error {
|
|
1148
|
+
margin: 18px 0 0;
|
|
1149
|
+
padding: 10px 12px;
|
|
1150
|
+
border-radius: 9px;
|
|
1151
|
+
background: var(--danger-soft);
|
|
1152
|
+
color: var(--danger);
|
|
1153
|
+
font-size: 12px;
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
@media (max-width: 640px) {
|
|
1157
|
+
.home-topbar { padding: 10px 14px; }
|
|
1158
|
+
.home-crumb { display: none; }
|
|
1159
|
+
.home-main { padding: 24px 14px 48px; }
|
|
1160
|
+
}
|
|
1161
|
+
|