@veltra/desktop 1.10.0 → 1.12.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/dist/components/ai-button/ai-button.js +117 -0
- package/dist/components/ai-button/ai-button.js.map +1 -0
- package/dist/components/ai-button/style.d.ts +1 -0
- package/dist/components/ai-button/style.js +3 -0
- package/dist/components/ai-button/style2.css +29 -0
- package/dist/components/code-editor/basic-setup.js +5 -5
- package/dist/components/code-editor/code-editor.js +2 -2
- package/dist/components/code-editor/langs/bash/index.js +2 -2
- package/dist/components/code-editor/langs/powershell/index.js +2 -2
- package/dist/components/code-editor/langs/spel/index.js +1 -1
- package/dist/components/code-editor/langs/spel/language.js +1 -1
- package/dist/components/code-editor/shell-extension.js +2 -2
- package/dist/components/file-viewer/previewers/image-previewer.js +28 -124
- package/dist/components/file-viewer/previewers/image-previewer.js.map +1 -1
- package/dist/components/file-viewer/previewers/pdf-worker-wrapper.js.map +1 -1
- package/dist/components/file-viewer/previewers/sheet-previewer.js +5 -5
- package/dist/components/file-viewer/previewers/sheet-previewer.js.map +1 -1
- package/dist/components/file-viewer/style2.css +42 -203
- package/dist/components/image-previewer/image-previewer.js +286 -0
- package/dist/components/image-previewer/image-previewer.js.map +1 -0
- package/dist/components/image-previewer/style.d.ts +1 -0
- package/dist/components/image-previewer/style.js +2 -0
- package/dist/components/image-previewer/style2.css +174 -0
- package/dist/components/index.d.ts +21 -19
- package/dist/components/index.js +41 -37
- package/dist/components/index.js.map +1 -1
- package/dist/index.d.ts +110 -106
- package/dist/index.js +108 -106
- package/dist/node_modules/.bun/@codemirror_autocomplete@6.20.3/node_modules/@codemirror/autocomplete/dist/index.js +3 -3
- package/dist/node_modules/.bun/@codemirror_autocomplete@6.20.3/node_modules/@codemirror/autocomplete/dist/index.js.map +1 -1
- package/dist/node_modules/.bun/{@codemirror_commands@6.11.0 → @codemirror_commands@6.11.1}/node_modules/@codemirror/commands/dist/index.js +6 -6
- package/dist/node_modules/.bun/@codemirror_commands@6.11.1/node_modules/@codemirror/commands/dist/index.js.map +1 -0
- package/dist/node_modules/.bun/@codemirror_lang-css@6.3.1/node_modules/@codemirror/lang-css/dist/index.js +1 -1
- package/dist/node_modules/.bun/@codemirror_lang-css@6.3.1/node_modules/@codemirror/lang-css/dist/index.js.map +1 -1
- package/dist/node_modules/.bun/@codemirror_lang-html@6.4.12/node_modules/@codemirror/lang-html/dist/index.js +3 -3
- package/dist/node_modules/.bun/@codemirror_lang-html@6.4.12/node_modules/@codemirror/lang-html/dist/index.js.map +1 -1
- package/dist/node_modules/.bun/@codemirror_lang-java@6.0.2/node_modules/@codemirror/lang-java/dist/index.js +1 -1
- package/dist/node_modules/.bun/@codemirror_lang-java@6.0.2/node_modules/@codemirror/lang-java/dist/index.js.map +1 -1
- package/dist/node_modules/.bun/@codemirror_lang-javascript@6.2.5/node_modules/@codemirror/lang-javascript/dist/index.js +3 -3
- package/dist/node_modules/.bun/@codemirror_lang-javascript@6.2.5/node_modules/@codemirror/lang-javascript/dist/index.js.map +1 -1
- package/dist/node_modules/.bun/@codemirror_lang-json@6.0.2/node_modules/@codemirror/lang-json/dist/index.js +1 -1
- package/dist/node_modules/.bun/@codemirror_lang-json@6.0.2/node_modules/@codemirror/lang-json/dist/index.js.map +1 -1
- package/dist/node_modules/.bun/@codemirror_lang-markdown@6.5.2/node_modules/@codemirror/lang-markdown/dist/index.js +3 -3
- package/dist/node_modules/.bun/@codemirror_lang-markdown@6.5.2/node_modules/@codemirror/lang-markdown/dist/index.js.map +1 -1
- package/dist/node_modules/.bun/@codemirror_lang-sql@6.10.0/node_modules/@codemirror/lang-sql/dist/index.js +1 -1
- package/dist/node_modules/.bun/@codemirror_lang-sql@6.10.0/node_modules/@codemirror/lang-sql/dist/index.js.map +1 -1
- package/dist/node_modules/.bun/{@codemirror_language@6.12.4 → @codemirror_language@6.13.1}/node_modules/@codemirror/language/dist/index.js +5 -168
- package/dist/node_modules/.bun/@codemirror_language@6.13.1/node_modules/@codemirror/language/dist/index.js.map +1 -0
- package/dist/node_modules/.bun/{@codemirror_legacy-modes@6.5.4 → @codemirror_legacy-modes@6.5.5}/node_modules/@codemirror/legacy-modes/mode/powershell.js +1 -1
- package/dist/node_modules/.bun/{@codemirror_legacy-modes@6.5.4 → @codemirror_legacy-modes@6.5.5}/node_modules/@codemirror/legacy-modes/mode/powershell.js.map +1 -1
- package/dist/node_modules/.bun/{@codemirror_legacy-modes@6.5.4 → @codemirror_legacy-modes@6.5.5}/node_modules/@codemirror/legacy-modes/mode/shell.js +1 -1
- package/dist/node_modules/.bun/{@codemirror_legacy-modes@6.5.4 → @codemirror_legacy-modes@6.5.5}/node_modules/@codemirror/legacy-modes/mode/shell.js.map +1 -1
- package/dist/node_modules/.bun/@codemirror_lint@6.9.7/node_modules/@codemirror/lint/dist/index.js +2 -2
- package/dist/node_modules/.bun/@codemirror_lint@6.9.7/node_modules/@codemirror/lint/dist/index.js.map +1 -1
- package/dist/node_modules/.bun/{@codemirror_search@6.7.1 → @codemirror_search@6.7.2}/node_modules/@codemirror/search/dist/index.js +10 -3
- package/dist/node_modules/.bun/@codemirror_search@6.7.2/node_modules/@codemirror/search/dist/index.js.map +1 -0
- package/dist/node_modules/.bun/{@codemirror_state@6.7.1 → @codemirror_state@6.7.6}/node_modules/@codemirror/state/dist/index.js +50 -16
- package/dist/node_modules/.bun/@codemirror_state@6.7.6/node_modules/@codemirror/state/dist/index.js.map +1 -0
- package/dist/node_modules/.bun/@codemirror_streamparser@6.0.0/node_modules/@codemirror/streamparser/dist/index.js +169 -0
- package/dist/node_modules/.bun/@codemirror_streamparser@6.0.0/node_modules/@codemirror/streamparser/dist/index.js.map +1 -0
- package/dist/node_modules/.bun/@codemirror_theme-one-dark@6.1.3/node_modules/@codemirror/theme-one-dark/dist/index.js +2 -2
- package/dist/node_modules/.bun/@codemirror_theme-one-dark@6.1.3/node_modules/@codemirror/theme-one-dark/dist/index.js.map +1 -1
- package/dist/node_modules/.bun/{@codemirror_view@6.43.9 → @codemirror_view@6.43.14}/node_modules/@codemirror/view/dist/index.js +159 -93
- package/dist/node_modules/.bun/@codemirror_view@6.43.14/node_modules/@codemirror/view/dist/index.js.map +1 -0
- package/dist/node_modules/.bun/@lezer_common@1.5.3/node_modules/@lezer/common/dist/index.js.map +1 -1
- package/dist/node_modules/.bun/@lezer_css@1.3.9/node_modules/@lezer/css/dist/index.js.map +1 -1
- package/dist/node_modules/.bun/@lezer_highlight@1.2.5/node_modules/@lezer/highlight/dist/index.js.map +1 -1
- package/dist/node_modules/.bun/@lezer_html@1.3.13/node_modules/@lezer/html/dist/index.js.map +1 -1
- package/dist/node_modules/.bun/@lezer_java@1.1.5/node_modules/@lezer/java/dist/index.js.map +1 -1
- package/dist/node_modules/.bun/@lezer_javascript@1.5.6/node_modules/@lezer/javascript/dist/index.js.map +1 -1
- package/dist/node_modules/.bun/@lezer_json@1.0.3/node_modules/@lezer/json/dist/index.js.map +1 -1
- package/dist/node_modules/.bun/@lezer_lr@1.4.11/node_modules/@lezer/lr/dist/index.js.map +1 -1
- package/dist/node_modules/.bun/@lezer_markdown@1.8.0/node_modules/@lezer/markdown/dist/index.js.map +1 -1
- package/dist/node_modules/.bun/@marijn_find-cluster-break@1.0.4/node_modules/@marijn/find-cluster-break/src/index.js.map +1 -1
- package/dist/node_modules/.bun/crelt@1.0.7/node_modules/crelt/index.js.map +1 -1
- package/dist/node_modules/.bun/style-mod@4.1.4/node_modules/style-mod/src/style-mod.js.map +1 -1
- package/dist/node_modules/.bun/w3c-keyname@2.2.8/node_modules/w3c-keyname/index.js.map +1 -1
- package/dist/types/ai-button.d.ts +42 -0
- package/dist/types/image-previewer.d.ts +48 -0
- package/dist/types/index.d.ts +3 -1
- package/package.json +16 -16
- package/src/components/ai-button/__test__/ai-button.test.ts +375 -0
- package/src/components/ai-button/ai-button.vue +87 -0
- package/src/components/ai-button/index.ts +1 -0
- package/src/components/ai-button/style.scss +19 -0
- package/src/components/ai-button/style.ts +3 -0
- package/src/components/file-viewer/__test__/file-viewer.test.ts +58 -0
- package/src/components/file-viewer/previewers/image-previewer.vue +25 -138
- package/src/components/file-viewer/previewers/sheet-previewer.vue +1 -1
- package/src/components/file-viewer/style.scss +54 -266
- package/src/components/image-previewer/__test__/image-previewer.test.ts +292 -0
- package/src/components/image-previewer/image-previewer.vue +314 -0
- package/src/components/image-previewer/index.ts +1 -0
- package/src/components/image-previewer/style.scss +188 -0
- package/src/components/image-previewer/style.ts +2 -0
- package/src/components/index.ts +4 -0
- package/src/types/ai-button.ts +44 -0
- package/src/types/image-previewer.ts +50 -0
- package/src/types/index.ts +3 -0
- package/dist/node_modules/.bun/@codemirror_commands@6.11.0/node_modules/@codemirror/commands/dist/index.js.map +0 -1
- package/dist/node_modules/.bun/@codemirror_language@6.12.4/node_modules/@codemirror/language/dist/index.js.map +0 -1
- package/dist/node_modules/.bun/@codemirror_search@6.7.1/node_modules/@codemirror/search/dist/index.js.map +0 -1
- package/dist/node_modules/.bun/@codemirror_state@6.7.1/node_modules/@codemirror/state/dist/index.js.map +0 -1
- package/dist/node_modules/.bun/@codemirror_view@6.43.9/node_modules/@codemirror/view/dist/index.js.map +0 -1
|
@@ -4,56 +4,17 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* 文件查看器样式
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
7
|
+
* 画布与模态均跟随主题:内嵌与模态共用同一套主题表面(bg-color.bottom 做画布底、
|
|
8
|
+
* bg-color.middle 做顶部微亮渐变),模态仅以全屏接管 + 入场动画表达层级,与 dialog
|
|
9
|
+
* 的遮罩/表面策略保持一致。纸面(图片/PDF/OFD/DOCX 页面)始终恒白,不随主题切换,
|
|
10
|
+
* 其色值收敛到下方文件头变量块(待 styles 包扩充深色中性阶 token 后可替换)。
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
@include m.b(file-viewer) {
|
|
14
|
-
// ──
|
|
15
|
-
--u-file-viewer-canvas: #101114;
|
|
16
|
-
--u-file-viewer-canvas-soft: #17191f;
|
|
17
|
-
--u-file-viewer-canvas-overlay: rgba(16, 17, 20, 0.74);
|
|
18
|
-
|
|
19
|
-
// ── 恒定亮面:纸面与模态主按钮的恒白表面及墨色(画布恒暗的配对设计)──
|
|
14
|
+
// ── 恒定亮面:纸面的恒白表面及墨色(画布随主题的配对设计)──
|
|
20
15
|
--u-file-viewer-light-surface: #fff;
|
|
21
16
|
--u-file-viewer-light-ink: #222;
|
|
22
17
|
|
|
23
|
-
// 纸张投影:三级阴影 token 按浅底设计,在恒暗画布上几乎不可见,故保留定制重投影
|
|
24
|
-
--u-file-viewer-page-shadow: 0 24px 72px rgba(0, 0, 0, 0.34);
|
|
25
|
-
// 模态纸张投影:重投影 + 白色发丝描边的组合阴影,三级阴影 token 无法等价表达
|
|
26
|
-
--u-file-viewer-page-shadow-modal:
|
|
27
|
-
0 38px 110px rgba(0, 0, 0, 0.5),
|
|
28
|
-
0 0 0 1px rgba(255, 255, 255, 0.04);
|
|
29
|
-
|
|
30
|
-
// ── 模态沉浸层恒暗表面(不随主题切换;styles 包暂无 mask/overlay 类 token,待扩充后收敛)──
|
|
31
|
-
--u-file-viewer-modal-backdrop: linear-gradient(
|
|
32
|
-
180deg,
|
|
33
|
-
rgba(5, 7, 11, 0.78),
|
|
34
|
-
rgba(4, 5, 8, 0.94)
|
|
35
|
-
);
|
|
36
|
-
--u-file-viewer-modal-sidebar: linear-gradient(
|
|
37
|
-
90deg,
|
|
38
|
-
rgba(8, 10, 15, 0.76),
|
|
39
|
-
rgba(8, 10, 15, 0.58) 78%,
|
|
40
|
-
rgba(8, 10, 15, 0.34)
|
|
41
|
-
);
|
|
42
|
-
--u-file-viewer-modal-stage-head: linear-gradient(
|
|
43
|
-
180deg,
|
|
44
|
-
rgba(9, 11, 16, 0.72),
|
|
45
|
-
rgba(9, 11, 16, 0.28) 72%,
|
|
46
|
-
transparent
|
|
47
|
-
);
|
|
48
|
-
--u-file-viewer-modal-body: linear-gradient(
|
|
49
|
-
180deg,
|
|
50
|
-
rgba(13, 16, 23, 0.58),
|
|
51
|
-
rgba(5, 6, 10, 0.82)
|
|
52
|
-
);
|
|
53
|
-
--u-file-viewer-modal-surface: rgba(8, 10, 14, 0.82);
|
|
54
|
-
--u-file-viewer-modal-panel: rgba(10, 12, 18, 0.78);
|
|
55
|
-
--u-file-viewer-modal-text: rgba(5, 7, 10, 0.76);
|
|
56
|
-
|
|
57
18
|
// ── kind badge 彩色:pink/violet 无对应色板 token(包内仅 primary/success/warning/danger/info),
|
|
58
19
|
// 待 styles 包扩充色板后收敛 ──
|
|
59
20
|
--u-file-viewer-kind-video: #db2777;
|
|
@@ -101,17 +62,8 @@
|
|
|
101
62
|
&.is-modal &__backdrop {
|
|
102
63
|
position: absolute;
|
|
103
64
|
inset: 0;
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
linear-gradient(
|
|
107
|
-
90deg,
|
|
108
|
-
fn.color-a(text-color, 5, white),
|
|
109
|
-
transparent 24%,
|
|
110
|
-
transparent 76%,
|
|
111
|
-
fn.color-a(text-color, 4, white)
|
|
112
|
-
);
|
|
113
|
-
backdrop-filter: fn.use-var(bg-filter);
|
|
114
|
-
-webkit-backdrop-filter: fn.use-var(bg-filter);
|
|
65
|
+
// 全屏接管的主题底色:侧栏与舞台均不透明,遮罩只作为兜底表面(与 dialog 表面策略一致)
|
|
66
|
+
background: fn.use-var(bg-color, bottom);
|
|
115
67
|
}
|
|
116
68
|
|
|
117
69
|
&.is-modal &__sidebar,
|
|
@@ -134,14 +86,6 @@
|
|
|
134
86
|
border-right: 1px solid fn.use-var(border, color);
|
|
135
87
|
}
|
|
136
88
|
|
|
137
|
-
&.is-modal &__sidebar {
|
|
138
|
-
color: fn.color-a(text-color, 86, white);
|
|
139
|
-
background: var(--u-file-viewer-modal-sidebar);
|
|
140
|
-
border-right: 1px solid fn.color-a(text-color, 5, white);
|
|
141
|
-
backdrop-filter: fn.use-var(bg-filter);
|
|
142
|
-
-webkit-backdrop-filter: fn.use-var(bg-filter);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
89
|
@include m.e(sidebar-head) {
|
|
146
90
|
display: flex;
|
|
147
91
|
align-items: center;
|
|
@@ -151,10 +95,6 @@
|
|
|
151
95
|
color: fn.use-var(text-color, title);
|
|
152
96
|
}
|
|
153
97
|
|
|
154
|
-
&.is-modal &__sidebar-head {
|
|
155
|
-
color: fn.color-a(text-color, 70, white);
|
|
156
|
-
}
|
|
157
|
-
|
|
158
98
|
@include m.e(sidebar-title) {
|
|
159
99
|
font-size: 12px;
|
|
160
100
|
font-weight: 620;
|
|
@@ -168,11 +108,6 @@
|
|
|
168
108
|
color: fn.use-var(text-color, second);
|
|
169
109
|
}
|
|
170
110
|
|
|
171
|
-
&.is-modal &__sidebar-count,
|
|
172
|
-
&.is-modal &__item-size {
|
|
173
|
-
color: fn.color-a(text-color, 50, white);
|
|
174
|
-
}
|
|
175
|
-
|
|
176
111
|
@include m.e(list) {
|
|
177
112
|
flex: 1;
|
|
178
113
|
min-height: 0;
|
|
@@ -192,10 +127,10 @@
|
|
|
192
127
|
display: flex;
|
|
193
128
|
align-items: center;
|
|
194
129
|
gap: 12px;
|
|
195
|
-
min-height:
|
|
196
|
-
padding: 7px 8px 7px
|
|
130
|
+
min-height: 44px;
|
|
131
|
+
padding: 7px 8px 7px 14px;
|
|
197
132
|
margin: 0;
|
|
198
|
-
border-radius:
|
|
133
|
+
border-radius: 8px;
|
|
199
134
|
cursor: pointer;
|
|
200
135
|
transition:
|
|
201
136
|
background fn.use-var(transition, fast) fn.use-var(transition, ease),
|
|
@@ -203,9 +138,9 @@
|
|
|
203
138
|
|
|
204
139
|
&::before {
|
|
205
140
|
position: absolute;
|
|
206
|
-
left:
|
|
207
|
-
top:
|
|
208
|
-
bottom:
|
|
141
|
+
left: 4px;
|
|
142
|
+
top: 10px;
|
|
143
|
+
bottom: 10px;
|
|
209
144
|
width: 2px;
|
|
210
145
|
border-radius: 999px;
|
|
211
146
|
background: fn.use-var(color, primary);
|
|
@@ -231,23 +166,6 @@
|
|
|
231
166
|
}
|
|
232
167
|
}
|
|
233
168
|
|
|
234
|
-
&.is-modal &__item {
|
|
235
|
-
color: fn.color-a(text-color, 70, white);
|
|
236
|
-
|
|
237
|
-
&:hover {
|
|
238
|
-
background: fn.color-a(text-color, 5, white);
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
@include m.is(active) {
|
|
242
|
-
color: fn.use-var(text-color, white);
|
|
243
|
-
background: fn.color-a(text-color, 8, white);
|
|
244
|
-
|
|
245
|
-
&::before {
|
|
246
|
-
background: fn.color-a(text-color, 86, white);
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
|
|
251
169
|
@include m.e(item-meta) {
|
|
252
170
|
display: flex;
|
|
253
171
|
flex: 1;
|
|
@@ -265,10 +183,6 @@
|
|
|
265
183
|
@include m.ellipsis;
|
|
266
184
|
}
|
|
267
185
|
|
|
268
|
-
&.is-modal &__item-name {
|
|
269
|
-
color: fn.color-a(text-color, 86, white);
|
|
270
|
-
}
|
|
271
|
-
|
|
272
186
|
@include m.e(item-size) {
|
|
273
187
|
font-size: 11px;
|
|
274
188
|
line-height: 1;
|
|
@@ -285,14 +199,6 @@
|
|
|
285
199
|
text-align: right;
|
|
286
200
|
}
|
|
287
201
|
|
|
288
|
-
&.is-modal &__item-kind {
|
|
289
|
-
color: fn.color-a(text-color, 40, white);
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
&.is-modal &__item.is-active &__item-kind {
|
|
293
|
-
color: fn.color-a(text-color, 70, white);
|
|
294
|
-
}
|
|
295
|
-
|
|
296
202
|
@include m.e(badge) {
|
|
297
203
|
--u-file-viewer-kind: #{fn.use-var(text-color, second)};
|
|
298
204
|
--u-file-viewer-kind-border: #{fn.color-a(text-color, 28, second)};
|
|
@@ -360,34 +266,19 @@
|
|
|
360
266
|
background: fn.use-var(bg-color, top);
|
|
361
267
|
}
|
|
362
268
|
|
|
363
|
-
&.is-modal &__stage {
|
|
364
|
-
position: relative;
|
|
365
|
-
color: fn.color-a(text-color, 86, white);
|
|
366
|
-
background: transparent;
|
|
367
|
-
}
|
|
368
|
-
|
|
369
269
|
@include m.e(stage-head) {
|
|
370
270
|
display: flex;
|
|
371
271
|
align-items: center;
|
|
372
272
|
justify-content: space-between;
|
|
373
273
|
gap: 16px;
|
|
374
|
-
min-height:
|
|
375
|
-
padding:
|
|
274
|
+
min-height: 58px;
|
|
275
|
+
padding: 10px 14px 10px 16px;
|
|
376
276
|
background:
|
|
377
277
|
linear-gradient(180deg, fn.color-a(text-color, 4, white), transparent), fn.use-var(bg-color, top);
|
|
378
278
|
border-bottom: 1px solid fn.use-var(border, color);
|
|
379
279
|
flex-shrink: 0;
|
|
380
280
|
}
|
|
381
281
|
|
|
382
|
-
&.is-modal &__stage-head {
|
|
383
|
-
min-height: 64px;
|
|
384
|
-
color: fn.color-a(text-color, 86, white);
|
|
385
|
-
background: var(--u-file-viewer-modal-stage-head);
|
|
386
|
-
border-bottom-color: transparent;
|
|
387
|
-
backdrop-filter: fn.use-var(bg-filter);
|
|
388
|
-
-webkit-backdrop-filter: fn.use-var(bg-filter);
|
|
389
|
-
}
|
|
390
|
-
|
|
391
282
|
@include m.e(stage-title) {
|
|
392
283
|
display: flex;
|
|
393
284
|
align-items: center;
|
|
@@ -411,10 +302,6 @@
|
|
|
411
302
|
@include m.ellipsis;
|
|
412
303
|
}
|
|
413
304
|
|
|
414
|
-
&.is-modal &__stage-name {
|
|
415
|
-
color: fn.color-a(text-color, 86, white);
|
|
416
|
-
}
|
|
417
|
-
|
|
418
305
|
@include m.e(stage-sub) {
|
|
419
306
|
display: flex;
|
|
420
307
|
align-items: center;
|
|
@@ -443,10 +330,6 @@
|
|
|
443
330
|
}
|
|
444
331
|
}
|
|
445
332
|
|
|
446
|
-
&.is-modal &__stage-sub {
|
|
447
|
-
color: fn.color-a(text-color, 52, white);
|
|
448
|
-
}
|
|
449
|
-
|
|
450
333
|
@include m.e(stage-actions) {
|
|
451
334
|
display: flex;
|
|
452
335
|
align-items: center;
|
|
@@ -463,15 +346,10 @@
|
|
|
463
346
|
height: 34px;
|
|
464
347
|
padding: 2px;
|
|
465
348
|
border: 1px solid fn.color-a(border, 86, color);
|
|
466
|
-
border-radius:
|
|
349
|
+
border-radius: 10px;
|
|
467
350
|
background: fn.use-var(bg-color, middle);
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
&.is-modal &__action-group {
|
|
471
|
-
border-color: fn.color-a(text-color, 8, white);
|
|
472
|
-
background: fn.color-a(text-color, 5, white);
|
|
473
|
-
// 内侧白色发丝高光(非海拔投影,不适用三级阴影 token)
|
|
474
|
-
box-shadow: 0 1px 0 fn.color-a(text-color, 5, white) inset;
|
|
351
|
+
// 顶部内侧发丝高光,让按钮组有一点胶囊体积感
|
|
352
|
+
box-shadow: 0 1px 0 fn.color-a(text-color, 4, white) inset;
|
|
475
353
|
}
|
|
476
354
|
|
|
477
355
|
@include m.e(action) {
|
|
@@ -512,15 +390,6 @@
|
|
|
512
390
|
}
|
|
513
391
|
}
|
|
514
392
|
|
|
515
|
-
&.is-modal &__action {
|
|
516
|
-
color: fn.color-a(text-color, 70, white);
|
|
517
|
-
|
|
518
|
-
&:not(:disabled):hover {
|
|
519
|
-
color: fn.use-var(text-color, white);
|
|
520
|
-
background: fn.color-a(text-color, 10, white);
|
|
521
|
-
}
|
|
522
|
-
}
|
|
523
|
-
|
|
524
393
|
@include m.em(action, icon) {
|
|
525
394
|
width: 30px;
|
|
526
395
|
padding: 0;
|
|
@@ -537,17 +406,6 @@
|
|
|
537
406
|
}
|
|
538
407
|
}
|
|
539
408
|
|
|
540
|
-
&.is-modal &__action--primary {
|
|
541
|
-
color: var(--u-file-viewer-light-ink);
|
|
542
|
-
background: fn.color-a(text-color, 86, white);
|
|
543
|
-
border-color: fn.color-a(text-color, 86, white);
|
|
544
|
-
|
|
545
|
-
&:not(:disabled):hover {
|
|
546
|
-
color: var(--u-file-viewer-light-ink);
|
|
547
|
-
background: var(--u-file-viewer-light-surface);
|
|
548
|
-
}
|
|
549
|
-
}
|
|
550
|
-
|
|
551
409
|
@include m.e(zoom-value) {
|
|
552
410
|
min-width: 48px;
|
|
553
411
|
color: fn.use-var(text-color, title);
|
|
@@ -557,30 +415,15 @@
|
|
|
557
415
|
user-select: none;
|
|
558
416
|
}
|
|
559
417
|
|
|
560
|
-
&.is-modal &__zoom-value {
|
|
561
|
-
color: fn.color-a(text-color, 86, white);
|
|
562
|
-
}
|
|
563
|
-
|
|
564
418
|
@include m.e(body) {
|
|
565
419
|
position: relative;
|
|
566
420
|
flex: 1;
|
|
567
421
|
min-height: 0;
|
|
568
422
|
overflow: hidden;
|
|
423
|
+
// 顶部微亮的径向渐变给画布一点纵深,画布底用 bg-color 最深一档与纸面拉开层次
|
|
569
424
|
background:
|
|
570
|
-
|
|
571
|
-
var(
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
&.is-modal &__body {
|
|
575
|
-
background:
|
|
576
|
-
var(--u-file-viewer-modal-body),
|
|
577
|
-
linear-gradient(
|
|
578
|
-
90deg,
|
|
579
|
-
fn.color-a(text-color, 4, white),
|
|
580
|
-
transparent 22%,
|
|
581
|
-
transparent 78%,
|
|
582
|
-
fn.color-a(text-color, 4, white)
|
|
583
|
-
);
|
|
425
|
+
radial-gradient(120% 80% at 50% 0%, fn.use-var(bg-color, middle), transparent 62%),
|
|
426
|
+
fn.use-var(bg-color, bottom);
|
|
584
427
|
}
|
|
585
428
|
|
|
586
429
|
@include m.e(viewport) {
|
|
@@ -598,50 +441,16 @@
|
|
|
598
441
|
display: flex;
|
|
599
442
|
align-items: center;
|
|
600
443
|
justify-content: center;
|
|
601
|
-
color: fn.
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
@include m.e(image) {
|
|
605
|
-
position: absolute;
|
|
606
|
-
inset: 0;
|
|
607
|
-
display: flex;
|
|
608
|
-
align-items: center;
|
|
609
|
-
justify-content: center;
|
|
610
|
-
padding: clamp(20px, 3vw, 44px);
|
|
611
|
-
user-select: none;
|
|
612
|
-
// 图片缩放/拖拽的 transform 直接写在本元素 style 上(见 image-previewer 的 applyTransform)
|
|
613
|
-
transform-origin: center center;
|
|
614
|
-
transition: transform fn.use-var(transition, fast) fn.use-var(transition, ease);
|
|
615
|
-
will-change: transform;
|
|
616
|
-
|
|
617
|
-
&.is-pannable {
|
|
618
|
-
cursor: grab;
|
|
619
|
-
touch-action: none;
|
|
620
|
-
}
|
|
621
|
-
|
|
622
|
-
&.is-dragging {
|
|
623
|
-
cursor: grabbing;
|
|
624
|
-
// 拖拽期间禁用过渡保证跟手
|
|
625
|
-
transition: none;
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
img {
|
|
629
|
-
max-width: 100%;
|
|
630
|
-
max-height: 100%;
|
|
631
|
-
object-fit: contain;
|
|
632
|
-
border-radius: 6px;
|
|
633
|
-
background: var(--u-file-viewer-light-surface);
|
|
634
|
-
box-shadow: var(--u-file-viewer-page-shadow);
|
|
635
|
-
}
|
|
444
|
+
color: fn.use-var(text-color, second);
|
|
636
445
|
}
|
|
637
446
|
|
|
447
|
+
// 图片预览基础视觉由 UImagePreviewer(components/image-previewer)自带;
|
|
448
|
+
// 本类经 file-viewer previewer 适配层落到预览面上,仅保留模态模式的间距 / 圆角覆盖
|
|
638
449
|
&.is-modal &__image {
|
|
639
450
|
padding: clamp(18px, 4vw, 64px);
|
|
640
451
|
|
|
641
452
|
img {
|
|
642
|
-
background: fn.color-a(text-color, 4, white);
|
|
643
453
|
border-radius: 4px;
|
|
644
|
-
box-shadow: var(--u-file-viewer-page-shadow-modal);
|
|
645
454
|
}
|
|
646
455
|
}
|
|
647
456
|
|
|
@@ -667,18 +476,14 @@
|
|
|
667
476
|
@include m.e(text) {
|
|
668
477
|
position: absolute;
|
|
669
478
|
inset: 0;
|
|
670
|
-
|
|
671
|
-
}
|
|
672
|
-
|
|
673
|
-
&.is-modal &__text {
|
|
674
|
-
background: var(--u-file-viewer-modal-text);
|
|
479
|
+
// 透明继承 __body 的主题画布底色
|
|
675
480
|
}
|
|
676
481
|
|
|
677
482
|
@include m.e(text-pre) {
|
|
678
483
|
min-width: max-content;
|
|
679
484
|
margin: 0;
|
|
680
485
|
padding: 22px 26px;
|
|
681
|
-
color: fn.
|
|
486
|
+
color: fn.use-var(text-color, main);
|
|
682
487
|
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
|
683
488
|
font-size: 12.5px;
|
|
684
489
|
line-height: 1.65;
|
|
@@ -716,9 +521,8 @@
|
|
|
716
521
|
}
|
|
717
522
|
|
|
718
523
|
@include m.e(pdf-page) {
|
|
719
|
-
margin:
|
|
524
|
+
margin: 28px auto;
|
|
720
525
|
background: var(--u-file-viewer-light-surface);
|
|
721
|
-
box-shadow: var(--u-file-viewer-page-shadow);
|
|
722
526
|
|
|
723
527
|
// 物理分辨率与 CSS 尺寸解耦:canvas 固定铺满占位块(超限降采样时由 CSS 拉伸)
|
|
724
528
|
canvas {
|
|
@@ -730,7 +534,6 @@
|
|
|
730
534
|
|
|
731
535
|
&.is-modal &__pdf-page {
|
|
732
536
|
margin: clamp(24px, 3vw, 44px) auto;
|
|
733
|
-
box-shadow: var(--u-file-viewer-page-shadow-modal);
|
|
734
537
|
}
|
|
735
538
|
|
|
736
539
|
// 加载失败的错误态,视觉与 loading 一致(覆盖整个画布的居中提示),文案用 danger 语义色
|
|
@@ -741,7 +544,9 @@
|
|
|
741
544
|
align-items: center;
|
|
742
545
|
justify-content: center;
|
|
743
546
|
color: fn.use-var(color, danger);
|
|
744
|
-
background:
|
|
547
|
+
background: fn.color-a(bg-color, 70, bottom);
|
|
548
|
+
backdrop-filter: blur(4px);
|
|
549
|
+
-webkit-backdrop-filter: blur(4px);
|
|
745
550
|
font-size: 13px;
|
|
746
551
|
pointer-events: none;
|
|
747
552
|
}
|
|
@@ -758,9 +563,8 @@
|
|
|
758
563
|
}
|
|
759
564
|
|
|
760
565
|
@include m.e(ofd-page) {
|
|
761
|
-
margin:
|
|
566
|
+
margin: 28px auto;
|
|
762
567
|
background: var(--u-file-viewer-light-surface);
|
|
763
|
-
box-shadow: var(--u-file-viewer-page-shadow);
|
|
764
568
|
|
|
765
569
|
svg {
|
|
766
570
|
display: block;
|
|
@@ -788,17 +592,12 @@
|
|
|
788
592
|
margin: 0 auto;
|
|
789
593
|
color: var(--u-file-viewer-light-ink);
|
|
790
594
|
background: var(--u-file-viewer-light-surface);
|
|
791
|
-
box-shadow: var(--u-file-viewer-page-shadow);
|
|
792
595
|
}
|
|
793
596
|
|
|
794
597
|
&.is-modal &__docx-body {
|
|
795
598
|
padding: clamp(24px, 4vw, 64px);
|
|
796
599
|
}
|
|
797
600
|
|
|
798
|
-
&.is-modal &__docx-doc {
|
|
799
|
-
box-shadow: var(--u-file-viewer-page-shadow-modal);
|
|
800
|
-
}
|
|
801
|
-
|
|
802
601
|
@include m.e(sheet) {
|
|
803
602
|
position: absolute;
|
|
804
603
|
inset: 0;
|
|
@@ -807,10 +606,6 @@
|
|
|
807
606
|
background: fn.use-var(bg-color, top);
|
|
808
607
|
}
|
|
809
608
|
|
|
810
|
-
&.is-modal &__sheet {
|
|
811
|
-
background: var(--u-file-viewer-modal-surface);
|
|
812
|
-
}
|
|
813
|
-
|
|
814
609
|
@include m.e(sheet-note) {
|
|
815
610
|
padding: 8px 16px;
|
|
816
611
|
color: fn.use-var(text-color, second);
|
|
@@ -821,21 +616,22 @@
|
|
|
821
616
|
flex-shrink: 0;
|
|
822
617
|
}
|
|
823
618
|
|
|
824
|
-
&.is-modal &__sheet-note,
|
|
825
|
-
&.is-modal &__sheet-tabs {
|
|
826
|
-
color: fn.color-a(text-color, 60, white);
|
|
827
|
-
background: var(--u-file-viewer-modal-panel);
|
|
828
|
-
border-bottom-color: fn.color-a(text-color, 8, white);
|
|
829
|
-
}
|
|
830
|
-
|
|
831
619
|
@include m.e(sheet-tabs) {
|
|
832
620
|
display: flex;
|
|
833
621
|
gap: 6px;
|
|
834
622
|
padding: 9px 12px;
|
|
835
|
-
|
|
623
|
+
// 表签条位于预览区下方,分隔线朝上
|
|
624
|
+
border-top: 1px solid fn.use-var(border, color);
|
|
836
625
|
background: fn.use-var(bg-color, top);
|
|
837
626
|
flex-shrink: 0;
|
|
838
627
|
overflow-x: auto;
|
|
628
|
+
// 表签条横向滚动时隐藏原生滚动条,保持胶囊观感
|
|
629
|
+
scrollbar-width: none;
|
|
630
|
+
|
|
631
|
+
&::-webkit-scrollbar {
|
|
632
|
+
width: 0;
|
|
633
|
+
height: 0;
|
|
634
|
+
}
|
|
839
635
|
}
|
|
840
636
|
|
|
841
637
|
@include m.e(sheet-tab) {
|
|
@@ -869,21 +665,6 @@
|
|
|
869
665
|
}
|
|
870
666
|
}
|
|
871
667
|
|
|
872
|
-
&.is-modal &__sheet-tab {
|
|
873
|
-
color: fn.color-a(text-color, 60, white);
|
|
874
|
-
|
|
875
|
-
&:hover {
|
|
876
|
-
color: fn.color-a(text-color, 86, white);
|
|
877
|
-
background: fn.color-a(text-color, 8, white);
|
|
878
|
-
}
|
|
879
|
-
|
|
880
|
-
@include m.is(active) {
|
|
881
|
-
color: fn.use-var(text-color, white);
|
|
882
|
-
background: fn.color-a(text-color, 10, white);
|
|
883
|
-
border-color: fn.color-a(text-color, 11, white);
|
|
884
|
-
}
|
|
885
|
-
}
|
|
886
|
-
|
|
887
668
|
@include m.e(sheet-stage) {
|
|
888
669
|
flex: 1;
|
|
889
670
|
min-height: 0;
|
|
@@ -896,9 +677,12 @@
|
|
|
896
677
|
display: flex;
|
|
897
678
|
align-items: center;
|
|
898
679
|
justify-content: center;
|
|
899
|
-
color: fn.
|
|
900
|
-
background:
|
|
680
|
+
color: fn.use-var(text-color, second);
|
|
681
|
+
background: fn.color-a(bg-color, 70, bottom);
|
|
682
|
+
backdrop-filter: blur(4px);
|
|
683
|
+
-webkit-backdrop-filter: blur(4px);
|
|
901
684
|
font-size: 13px;
|
|
685
|
+
letter-spacing: 0.02em;
|
|
902
686
|
pointer-events: none;
|
|
903
687
|
}
|
|
904
688
|
|
|
@@ -919,11 +703,6 @@
|
|
|
919
703
|
border-bottom: 1px solid fn.use-var(border, color);
|
|
920
704
|
}
|
|
921
705
|
|
|
922
|
-
&.is-modal &__sidebar {
|
|
923
|
-
border-bottom-color: fn.color-a(text-color, 8, white);
|
|
924
|
-
border-right: none;
|
|
925
|
-
}
|
|
926
|
-
|
|
927
706
|
@include m.e(stage-head) {
|
|
928
707
|
align-items: flex-start;
|
|
929
708
|
flex-direction: column;
|
|
@@ -955,6 +734,15 @@
|
|
|
955
734
|
will-change: opacity;
|
|
956
735
|
}
|
|
957
736
|
|
|
737
|
+
// 打开时舞台自下而上轻微上浮,与背景淡入配合出纵深(参考 Drive / flyfish file-viewer 的入场)
|
|
738
|
+
.u-file-viewer-modal-enter-active .u-file-viewer__stage {
|
|
739
|
+
transition: transform fn.use-var(transition, normal) fn.use-var(transition, ease);
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
.u-file-viewer-modal-enter-from .u-file-viewer__stage {
|
|
743
|
+
transform: translateY(10px) scale(0.99);
|
|
744
|
+
}
|
|
745
|
+
|
|
958
746
|
.u-file-viewer-modal-leave-active {
|
|
959
747
|
pointer-events: none;
|
|
960
748
|
}
|