@cadcrawl/cad-browser 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/LICENSE.md +5 -0
- package/README.md +65 -0
- package/bin/cad-browser +4 -0
- package/dist/client/assets/index-C1XW2UmF.css +1 -0
- package/dist/client/assets/index-HFIcPO3j.js +204 -0
- package/dist/client/index.html +14 -0
- package/package.json +62 -0
- package/src/analyzer.js +31 -0
- package/src/args.js +16 -0
- package/src/cache.js +38 -0
- package/src/cli.js +53 -0
- package/src/file-types.js +15 -0
- package/src/main.jsx +567 -0
- package/src/path-safety.js +15 -0
- package/src/project-store.js +127 -0
- package/src/reveal-file.js +36 -0
- package/src/scanner.js +75 -0
- package/src/server.js +103 -0
- package/src/styles.css +435 -0
package/src/styles.css
ADDED
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
color: #252623;
|
|
3
|
+
background: #f3f2ee;
|
|
4
|
+
font-family: "Segoe UI Variable Text", "Segoe UI", sans-serif;
|
|
5
|
+
font-size: 14px;
|
|
6
|
+
font-synthesis: none;
|
|
7
|
+
--paper: #fbfaf7;
|
|
8
|
+
--panel: #f5f4ef;
|
|
9
|
+
--sidebar-bg: #efeee9;
|
|
10
|
+
--ink: #252623;
|
|
11
|
+
--muted: #71736d;
|
|
12
|
+
--faint: #9a9c96;
|
|
13
|
+
--line: #deddd7;
|
|
14
|
+
--line-soft: #e9e8e2;
|
|
15
|
+
--accent: #2f6657;
|
|
16
|
+
--accent-soft: #e4eee9;
|
|
17
|
+
--sidebar: 250px;
|
|
18
|
+
--inspector: 360px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
* { box-sizing: border-box; }
|
|
22
|
+
html, body, #root { min-width: 1024px; min-height: 100%; margin: 0; }
|
|
23
|
+
body { overflow: hidden; }
|
|
24
|
+
button, input, select { font: inherit; }
|
|
25
|
+
button, select { color: inherit; }
|
|
26
|
+
button:focus-visible, input:focus-visible, select:focus-visible, article:focus-visible {
|
|
27
|
+
outline: 2px solid rgba(47, 102, 87, .45);
|
|
28
|
+
outline-offset: 2px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.app-shell {
|
|
32
|
+
height: 100vh;
|
|
33
|
+
display: grid;
|
|
34
|
+
grid-template: 56px calc(100vh - 56px) / var(--sidebar) minmax(480px, 1fr) var(--inspector);
|
|
35
|
+
background: var(--panel);
|
|
36
|
+
}
|
|
37
|
+
.app-shell.sidebar-collapsed { grid-template-columns: 0 minmax(480px, 1fr) var(--inspector); }
|
|
38
|
+
|
|
39
|
+
.topbar {
|
|
40
|
+
grid-column: 1 / -1;
|
|
41
|
+
z-index: 10;
|
|
42
|
+
display: grid;
|
|
43
|
+
grid-template-columns: minmax(270px, 1fr) minmax(360px, 620px) minmax(270px, 1fr);
|
|
44
|
+
align-items: center;
|
|
45
|
+
padding: 0 14px;
|
|
46
|
+
background: rgba(251, 250, 247, .98);
|
|
47
|
+
border-bottom: 1px solid var(--line);
|
|
48
|
+
}
|
|
49
|
+
.brand, .top-actions, .search, .status-pill { display: flex; align-items: center; }
|
|
50
|
+
.brand { gap: 9px; font-size: 14px; font-weight: 650; }
|
|
51
|
+
.brand-mark {
|
|
52
|
+
display: grid;
|
|
53
|
+
place-items: center;
|
|
54
|
+
width: 30px;
|
|
55
|
+
height: 30px;
|
|
56
|
+
color: white;
|
|
57
|
+
background: #2b2d29;
|
|
58
|
+
border-radius: 7px;
|
|
59
|
+
}
|
|
60
|
+
.project-chip {
|
|
61
|
+
max-width: 180px;
|
|
62
|
+
padding: 4px 8px;
|
|
63
|
+
overflow: hidden;
|
|
64
|
+
border-radius: 5px;
|
|
65
|
+
background: #efede7;
|
|
66
|
+
color: var(--muted);
|
|
67
|
+
font-size: 12px;
|
|
68
|
+
font-weight: 500;
|
|
69
|
+
text-overflow: ellipsis;
|
|
70
|
+
white-space: nowrap;
|
|
71
|
+
}
|
|
72
|
+
.search {
|
|
73
|
+
height: 36px;
|
|
74
|
+
gap: 9px;
|
|
75
|
+
padding: 0 10px;
|
|
76
|
+
color: var(--muted);
|
|
77
|
+
background: #efeee9;
|
|
78
|
+
border: 1px solid transparent;
|
|
79
|
+
border-radius: 7px;
|
|
80
|
+
}
|
|
81
|
+
.search:focus-within {
|
|
82
|
+
background: #fff;
|
|
83
|
+
border-color: #bbbdb6;
|
|
84
|
+
box-shadow: 0 0 0 3px rgba(47, 102, 87, .08);
|
|
85
|
+
}
|
|
86
|
+
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; }
|
|
87
|
+
.search input::placeholder { color: #92948e; }
|
|
88
|
+
.search button { display: grid; padding: 2px; border: 0; background: transparent; cursor: pointer; }
|
|
89
|
+
.search kbd, .shortcut-list kbd {
|
|
90
|
+
padding: 2px 6px;
|
|
91
|
+
border: 1px solid #d8d7d1;
|
|
92
|
+
border-bottom-color: #c8c7c1;
|
|
93
|
+
border-radius: 4px;
|
|
94
|
+
background: #f8f7f3;
|
|
95
|
+
color: #777972;
|
|
96
|
+
font-family: inherit;
|
|
97
|
+
font-size: 10px;
|
|
98
|
+
box-shadow: 0 1px 0 #d6d5cf;
|
|
99
|
+
}
|
|
100
|
+
.top-actions { justify-content: flex-end; gap: 9px; }
|
|
101
|
+
.icon-button {
|
|
102
|
+
display: grid;
|
|
103
|
+
place-items: center;
|
|
104
|
+
width: 32px;
|
|
105
|
+
height: 32px;
|
|
106
|
+
padding: 0;
|
|
107
|
+
border: 1px solid var(--line);
|
|
108
|
+
border-radius: 6px;
|
|
109
|
+
background: var(--paper);
|
|
110
|
+
cursor: pointer;
|
|
111
|
+
}
|
|
112
|
+
.icon-button:hover { background: #efeee9; }
|
|
113
|
+
.icon-button.quiet { border-color: transparent; background: transparent; color: var(--muted); }
|
|
114
|
+
.status-pill { gap: 7px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 11px; }
|
|
115
|
+
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #4f8968; box-shadow: 0 0 0 3px #e2eee6; }
|
|
116
|
+
|
|
117
|
+
.sidebar {
|
|
118
|
+
min-width: 0;
|
|
119
|
+
display: grid;
|
|
120
|
+
grid-template-rows: 46px 1fr 48px;
|
|
121
|
+
overflow: hidden;
|
|
122
|
+
background: var(--sidebar-bg);
|
|
123
|
+
border-right: 1px solid var(--line);
|
|
124
|
+
}
|
|
125
|
+
.sidebar-collapsed .sidebar { opacity: 0; pointer-events: none; }
|
|
126
|
+
.sidebar-head {
|
|
127
|
+
display: flex;
|
|
128
|
+
align-items: center;
|
|
129
|
+
justify-content: space-between;
|
|
130
|
+
padding: 0 10px 0 15px;
|
|
131
|
+
color: var(--muted);
|
|
132
|
+
font-size: 11px;
|
|
133
|
+
font-weight: 700;
|
|
134
|
+
letter-spacing: .07em;
|
|
135
|
+
text-transform: uppercase;
|
|
136
|
+
}
|
|
137
|
+
.tree-scroll { padding: 2px 7px 14px; overflow: auto; }
|
|
138
|
+
.tree-row {
|
|
139
|
+
width: 100%;
|
|
140
|
+
height: 31px;
|
|
141
|
+
display: flex;
|
|
142
|
+
align-items: center;
|
|
143
|
+
gap: 7px;
|
|
144
|
+
padding: 0 7px 0 calc(5px + var(--depth) * 15px);
|
|
145
|
+
border: 0;
|
|
146
|
+
border-radius: 5px;
|
|
147
|
+
background: transparent;
|
|
148
|
+
color: #54564f;
|
|
149
|
+
font-size: 12px;
|
|
150
|
+
text-align: left;
|
|
151
|
+
cursor: pointer;
|
|
152
|
+
}
|
|
153
|
+
.tree-row:hover { background: rgba(255,255,255,.65); }
|
|
154
|
+
.tree-row.active { background: #dcddd7; color: #242521; font-weight: 600; }
|
|
155
|
+
.tree-toggle { display: grid; width: 14px; color: #898b84; }
|
|
156
|
+
.tree-label { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
157
|
+
.tree-count { color: #999b95; font-size: 10px; font-variant-numeric: tabular-nums; }
|
|
158
|
+
.sidebar-footer { display: flex; align-items: center; gap: 15px; padding: 0 15px; border-top: 1px solid var(--line); color: #8b8d87; font-size: 10px; }
|
|
159
|
+
.sidebar-footer strong { color: #555750; }
|
|
160
|
+
.sidebar-reveal {
|
|
161
|
+
position: fixed;
|
|
162
|
+
z-index: 15;
|
|
163
|
+
left: 12px;
|
|
164
|
+
top: 68px;
|
|
165
|
+
display: grid;
|
|
166
|
+
place-items: center;
|
|
167
|
+
width: 34px;
|
|
168
|
+
height: 34px;
|
|
169
|
+
padding: 0;
|
|
170
|
+
border: 1px solid var(--line);
|
|
171
|
+
border-radius: 7px;
|
|
172
|
+
background: var(--paper);
|
|
173
|
+
box-shadow: 0 5px 18px rgba(30,32,28,.12);
|
|
174
|
+
cursor: pointer;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.workspace { min-width: 0; overflow: auto; background: var(--paper); }
|
|
178
|
+
.content-head {
|
|
179
|
+
position: sticky;
|
|
180
|
+
z-index: 4;
|
|
181
|
+
top: 0;
|
|
182
|
+
min-height: 108px;
|
|
183
|
+
display: flex;
|
|
184
|
+
align-items: flex-end;
|
|
185
|
+
justify-content: space-between;
|
|
186
|
+
gap: 24px;
|
|
187
|
+
padding: 20px 26px 18px;
|
|
188
|
+
background: rgba(251, 250, 247, .96);
|
|
189
|
+
border-bottom: 1px solid var(--line-soft);
|
|
190
|
+
backdrop-filter: blur(12px);
|
|
191
|
+
}
|
|
192
|
+
.content-title { min-width: 0; }
|
|
193
|
+
.breadcrumbs { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; color: var(--faint); font-size: 11px; }
|
|
194
|
+
.breadcrumbs button { max-width: 170px; padding: 0; overflow: hidden; border: 0; background: transparent; color: inherit; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
|
|
195
|
+
.breadcrumbs button:hover { color: var(--ink); }
|
|
196
|
+
.content-head h1 { margin: 0; overflow: hidden; color: #292a26; font-family: Georgia, "Times New Roman", serif; font-size: 25px; font-weight: 500; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
|
|
197
|
+
.content-head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
|
|
198
|
+
.browser-toolbar { display: flex; align-items: center; gap: 7px; }
|
|
199
|
+
.dropdown, .sort-control, .grid-scale, .view-switcher {
|
|
200
|
+
height: 32px;
|
|
201
|
+
display: flex;
|
|
202
|
+
align-items: center;
|
|
203
|
+
border: 1px solid var(--line);
|
|
204
|
+
border-radius: 6px;
|
|
205
|
+
background: #f3f2ed;
|
|
206
|
+
color: #686a64;
|
|
207
|
+
}
|
|
208
|
+
.dropdown { position: relative; }
|
|
209
|
+
.dropdown-trigger {
|
|
210
|
+
height: 30px;
|
|
211
|
+
display: flex;
|
|
212
|
+
align-items: center;
|
|
213
|
+
gap: 6px;
|
|
214
|
+
padding: 0 8px;
|
|
215
|
+
border: 0;
|
|
216
|
+
border-radius: 5px;
|
|
217
|
+
background: transparent;
|
|
218
|
+
color: #5c5e58;
|
|
219
|
+
font-size: 11px;
|
|
220
|
+
cursor: pointer;
|
|
221
|
+
}
|
|
222
|
+
.dropdown-trigger > span { white-space: nowrap; }
|
|
223
|
+
.dropdown.open .dropdown-trigger, .dropdown-trigger:hover { background: #fff; color: var(--ink); }
|
|
224
|
+
.dropdown-menu {
|
|
225
|
+
position: absolute;
|
|
226
|
+
z-index: 20;
|
|
227
|
+
top: calc(100% + 5px);
|
|
228
|
+
left: 0;
|
|
229
|
+
min-width: 100%;
|
|
230
|
+
padding: 5px;
|
|
231
|
+
border: 1px solid #d6d7d1;
|
|
232
|
+
border-radius: 7px;
|
|
233
|
+
background: #fff;
|
|
234
|
+
box-shadow: 0 10px 28px rgba(30,32,28,.14);
|
|
235
|
+
}
|
|
236
|
+
.dropdown-menu button {
|
|
237
|
+
width: 100%;
|
|
238
|
+
min-width: 130px;
|
|
239
|
+
height: 30px;
|
|
240
|
+
display: flex;
|
|
241
|
+
align-items: center;
|
|
242
|
+
justify-content: space-between;
|
|
243
|
+
gap: 16px;
|
|
244
|
+
padding: 0 8px;
|
|
245
|
+
border: 0;
|
|
246
|
+
border-radius: 5px;
|
|
247
|
+
background: transparent;
|
|
248
|
+
color: #555750;
|
|
249
|
+
font-size: 11px;
|
|
250
|
+
text-align: left;
|
|
251
|
+
cursor: pointer;
|
|
252
|
+
}
|
|
253
|
+
.dropdown-menu button:hover { background: #f1f2ee; color: var(--ink); }
|
|
254
|
+
.dropdown-menu button.selected { color: #28584b; font-weight: 650; }
|
|
255
|
+
.sort-control .dropdown { border: 0; background: transparent; }
|
|
256
|
+
.sort-control .dropdown-trigger { padding-left: 8px; }
|
|
257
|
+
.sort-control > button, .grid-scale button, .view-switcher button {
|
|
258
|
+
display: grid;
|
|
259
|
+
place-items: center;
|
|
260
|
+
height: 30px;
|
|
261
|
+
padding: 0;
|
|
262
|
+
border: 0;
|
|
263
|
+
border-radius: 5px;
|
|
264
|
+
background: transparent;
|
|
265
|
+
color: #74766f;
|
|
266
|
+
cursor: pointer;
|
|
267
|
+
}
|
|
268
|
+
.sort-control > button { width: 29px; border-left: 1px solid var(--line); border-radius: 0 5px 5px 0; }
|
|
269
|
+
.grid-scale button { width: 27px; }
|
|
270
|
+
.grid-scale button:hover:not(:disabled), .view-switcher button:hover, .sort-control > button:hover { background: #fff; color: var(--ink); }
|
|
271
|
+
.grid-scale button:disabled { opacity: .28; cursor: default; }
|
|
272
|
+
.grid-scale span { min-width: 25px; color: #62645e; font-size: 10px; text-align: center; font-variant-numeric: tabular-nums; }
|
|
273
|
+
.grid-scale span::after { content: " col"; color: #999b95; }
|
|
274
|
+
.view-switcher { padding: 1px; }
|
|
275
|
+
.view-switcher button { width: 29px; height: 28px; }
|
|
276
|
+
.view-switcher button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(30,32,28,.12); }
|
|
277
|
+
|
|
278
|
+
.file-grid { display: grid; grid-template-columns: repeat(var(--grid-columns, 4), minmax(0, 1fr)); gap: 15px; padding: 20px 26px 40px; }
|
|
279
|
+
.file-card {
|
|
280
|
+
min-width: 0;
|
|
281
|
+
overflow: hidden;
|
|
282
|
+
border: 1px solid var(--line-soft);
|
|
283
|
+
border-radius: 8px;
|
|
284
|
+
background: #fff;
|
|
285
|
+
cursor: default;
|
|
286
|
+
opacity: 0;
|
|
287
|
+
transform: translateY(4px);
|
|
288
|
+
animation: reveal .25s ease forwards;
|
|
289
|
+
animation-delay: var(--delay);
|
|
290
|
+
transition: border-color .14s, background-color .14s;
|
|
291
|
+
}
|
|
292
|
+
@keyframes reveal { to { opacity: 1; transform: translateY(0); } }
|
|
293
|
+
.file-card:hover { border-color: #bfc1ba; background: #fdfdfa; }
|
|
294
|
+
.file-card.selected { border-color: #4f7b6c; background: #fbfdfc; }
|
|
295
|
+
.thumb {
|
|
296
|
+
position: relative;
|
|
297
|
+
aspect-ratio: 4 / 3;
|
|
298
|
+
display: grid;
|
|
299
|
+
place-items: center;
|
|
300
|
+
overflow: hidden;
|
|
301
|
+
background: #f4f3ef;
|
|
302
|
+
border-bottom: 1px solid var(--line-soft);
|
|
303
|
+
}
|
|
304
|
+
.thumb img { width: 100%; height: 100%; object-fit: contain; }
|
|
305
|
+
.placeholder { width: 100%; height: 100%; display: grid; place-content: center; justify-items: center; gap: 8px; color: #878a83; }
|
|
306
|
+
.placeholder span { font-family: Georgia, "Times New Roman", serif; font-size: 11px; font-style: italic; font-weight: 400; }
|
|
307
|
+
.placeholder.kind-cad { color: #557568; background: #edf2ef; }
|
|
308
|
+
.placeholder.kind-pdf { color: #9a5b49; background: #f4ece8; }
|
|
309
|
+
.placeholder.kind-image { color: #636d82; background: #eceff3; }
|
|
310
|
+
.type-badge {
|
|
311
|
+
position: absolute;
|
|
312
|
+
left: 8px;
|
|
313
|
+
top: 8px;
|
|
314
|
+
padding: 3px 6px;
|
|
315
|
+
border: 1px solid rgba(40,42,37,.12);
|
|
316
|
+
border-radius: 4px;
|
|
317
|
+
background: rgba(255,255,255,.9);
|
|
318
|
+
color: #64665f;
|
|
319
|
+
font-size: 9px;
|
|
320
|
+
font-weight: 700;
|
|
321
|
+
letter-spacing: .055em;
|
|
322
|
+
text-transform: uppercase;
|
|
323
|
+
backdrop-filter: blur(5px);
|
|
324
|
+
}
|
|
325
|
+
.processing { position: absolute; inset: auto 8px 8px; display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 5px; background: rgba(36,38,33,.84); color: #fff; font-size: 10px; }
|
|
326
|
+
.processing svg, .analysis-note svg, .loading-screen > svg { animation: spin 1s linear infinite; }
|
|
327
|
+
@keyframes spin { to { transform: rotate(360deg); } }
|
|
328
|
+
.file-copy { padding: 10px 11px 11px; }
|
|
329
|
+
.file-name { overflow: hidden; color: #31322e; font-size: 12px; font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }
|
|
330
|
+
.file-copy span { display: block; margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
|
|
331
|
+
|
|
332
|
+
.file-grid.density-compact { gap: 8px; padding-inline: 18px; }
|
|
333
|
+
.file-grid.density-compact .file-copy { padding: 7px; }
|
|
334
|
+
.file-grid.density-compact .file-name { font-size: 10px; }
|
|
335
|
+
.file-grid.density-compact .file-copy span { font-size: 8px; }
|
|
336
|
+
.file-grid.density-compact .type-badge { left: 5px; top: 5px; padding: 2px 4px; font-size: 7px; }
|
|
337
|
+
.file-grid.density-micro { gap: 5px; padding-inline: 13px; }
|
|
338
|
+
.file-grid.density-micro .file-card { border-radius: 5px; }
|
|
339
|
+
.file-grid.density-micro .file-copy { padding: 5px 6px 6px; }
|
|
340
|
+
.file-grid.density-micro .file-name { font-size: 8px; }
|
|
341
|
+
.file-grid.density-micro .file-copy span { display: none; }
|
|
342
|
+
.file-grid.density-micro .type-badge { left: 3px; top: 3px; padding: 1px 3px; border-radius: 3px; font-size: 6px; }
|
|
343
|
+
|
|
344
|
+
.file-list { padding: 13px 26px 36px; }
|
|
345
|
+
.file-list .file-card { display: grid; grid-template-columns: 88px minmax(0, 1fr); margin-bottom: 7px; }
|
|
346
|
+
.file-list .thumb { height: 68px; aspect-ratio: auto; border: 0; border-right: 1px solid var(--line-soft); }
|
|
347
|
+
.file-list .placeholder svg { width: 23px; }
|
|
348
|
+
.file-list .placeholder span, .file-list .type-badge { display: none; }
|
|
349
|
+
.file-list .file-copy { align-self: center; }
|
|
350
|
+
|
|
351
|
+
.inspector { min-width: 0; overflow-y: auto; background: #f8f7f3; border-left: 1px solid var(--line); }
|
|
352
|
+
.empty-inspector { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 36px; color: var(--muted); text-align: center; }
|
|
353
|
+
.inspector-empty-mark { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: #787a74; }
|
|
354
|
+
.empty-inspector h2 { margin: 15px 0 5px; color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: 18px; font-weight: 400; }
|
|
355
|
+
.empty-inspector p { max-width: 250px; margin: 0; font-size: 12px; line-height: 1.55; }
|
|
356
|
+
.shortcut-list { width: 210px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 12px; margin-top: 22px; color: #7e807a; font-size: 11px; text-align: left; }
|
|
357
|
+
.inspector-head { min-height: 61px; display: grid; grid-template-columns: 36px minmax(0, 1fr) 32px; align-items: center; gap: 10px; padding: 11px 11px 11px 14px; border-bottom: 1px solid var(--line-soft); }
|
|
358
|
+
.inspector-title { min-width: 0; }
|
|
359
|
+
.inspector-title strong, .inspector-title span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
360
|
+
.inspector-title strong { color: #2b2c28; font-size: 13px; font-weight: 650; }
|
|
361
|
+
.inspector-title span { margin-top: 3px; color: var(--muted); font-size: 11px; }
|
|
362
|
+
.type-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: #e8e7e1; color: #656760; }
|
|
363
|
+
.type-icon.kind-cad { background: #e2ece7; color: #46705f; }
|
|
364
|
+
.type-icon.kind-pdf { background: #f0e3dd; color: #9a513d; }
|
|
365
|
+
.inspector-preview { position: relative; width: calc(100% - 28px); aspect-ratio: 4 / 3; display: grid; place-items: center; margin: 14px; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #f0efea; cursor: zoom-in; }
|
|
366
|
+
.inspector-preview:disabled { cursor: default; }
|
|
367
|
+
.inspector-preview img { width: 100%; height: 100%; object-fit: contain; }
|
|
368
|
+
.inspector-actions { display: grid; grid-template-columns: 1.3fr 1fr 34px; gap: 7px; margin: -1px 14px 14px; }
|
|
369
|
+
.inspector-actions button {
|
|
370
|
+
height: 34px;
|
|
371
|
+
display: flex;
|
|
372
|
+
align-items: center;
|
|
373
|
+
justify-content: center;
|
|
374
|
+
gap: 7px;
|
|
375
|
+
padding: 0 9px;
|
|
376
|
+
border: 1px solid #cccec7;
|
|
377
|
+
border-radius: 6px;
|
|
378
|
+
background: #fff;
|
|
379
|
+
color: #4c4e48;
|
|
380
|
+
font-size: 11px;
|
|
381
|
+
font-weight: 600;
|
|
382
|
+
cursor: pointer;
|
|
383
|
+
}
|
|
384
|
+
.inspector-actions button:hover { border-color: #aeb1a9; background: #fdfdfb; }
|
|
385
|
+
.inspector-actions .primary-action { border-color: #315f52; background: #315f52; color: white; }
|
|
386
|
+
.inspector-actions .primary-action:hover { background: #274f44; }
|
|
387
|
+
.analysis-note, .error-note { margin: 0 14px 13px; padding: 10px 11px; border-radius: 6px; font-size: 12px; line-height: 1.45; }
|
|
388
|
+
.analysis-note { display: flex; align-items: center; gap: 8px; background: #e5eee9; color: #4e695e; }
|
|
389
|
+
.error-note { background: #f2e3df; color: #884534; }
|
|
390
|
+
.inspector-section { padding: 17px 18px 18px; border-top: 1px solid var(--line-soft); }
|
|
391
|
+
.inspector-section h3 { margin: 0 0 12px; color: #656861; font-size: 11px; font-weight: 700; letter-spacing: .065em; text-transform: uppercase; }
|
|
392
|
+
.property, .vector { min-height: 32px; display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: 13px; }
|
|
393
|
+
.property span, .vector span { color: var(--muted); }
|
|
394
|
+
.property strong { overflow: hidden; color: #292a27; font-weight: 600; text-align: right; text-overflow: ellipsis; }
|
|
395
|
+
.vector code { color: #4f514b; font-family: "Cascadia Mono", Consolas, monospace; font-size: 11px; }
|
|
396
|
+
.dimension-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-bottom: 9px; }
|
|
397
|
+
.dimension-strip div { min-width: 0; padding: 10px; border-radius: 6px; background: #ebeae5; }
|
|
398
|
+
.dimension-strip span, .dimension-strip strong { display: block; }
|
|
399
|
+
.dimension-strip span { margin-bottom: 4px; color: #898b85; font-size: 10px; font-weight: 700; }
|
|
400
|
+
.dimension-strip strong { overflow: hidden; color: #292a27; font-size: 13px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; }
|
|
401
|
+
.swatches { display: grid; gap: 8px; }
|
|
402
|
+
.swatch { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 9px; font-size: 12px; }
|
|
403
|
+
.swatch > span { width: 22px; height: 22px; border: 1px solid rgba(0,0,0,.14); border-radius: 5px; }
|
|
404
|
+
.swatch code, .model-tree { font-family: "Cascadia Mono", Consolas, monospace; }
|
|
405
|
+
.swatch code { font-size: 11px; }
|
|
406
|
+
.swatch small { color: var(--muted); font-size: 11px; }
|
|
407
|
+
.material-name { margin-bottom: 7px; font-size: 12px; font-weight: 600; }
|
|
408
|
+
.text-preview { max-height: 180px; overflow: auto; margin-top: 8px; padding: 11px; border-radius: 6px; background: #eeede8; color: #4e504a; font-family: Georgia, "Times New Roman", serif; font-size: 13px; line-height: 1.6; white-space: pre-wrap; }
|
|
409
|
+
.model-tree { max-height: 240px; margin: 0; overflow: auto; padding: 11px; border-radius: 6px; background: #ebeae5; color: #474944; font-size: 11px; line-height: 1.65; white-space: pre; }
|
|
410
|
+
.inspector-footer { padding: 14px 18px 20px; border-top: 1px solid var(--line-soft); }
|
|
411
|
+
.inspector-footer button { display: flex; align-items: center; gap: 7px; padding: 0; border: 0; background: transparent; color: #60635c; font-size: 11px; cursor: pointer; }
|
|
412
|
+
.inspector-footer button:hover { color: var(--ink); }
|
|
413
|
+
|
|
414
|
+
.modal-backdrop { position: fixed; z-index: 30; inset: 0; display: grid; place-items: center; padding: 38px; background: rgba(30,32,28,.58); backdrop-filter: blur(7px); animation: fade-in .14s ease; }
|
|
415
|
+
@keyframes fade-in { from { opacity: 0; } }
|
|
416
|
+
.preview-modal { width: min(1100px, 91vw); height: min(820px, 89vh); display: grid; grid-template-rows: 58px 1fr; overflow: hidden; border: 1px solid rgba(255,255,255,.2); border-radius: 10px; background: #f8f7f3; box-shadow: 0 28px 80px rgba(20,21,18,.34); }
|
|
417
|
+
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 0 12px 0 18px; border-bottom: 1px solid var(--line); }
|
|
418
|
+
.modal-head strong, .modal-head span { display: block; }
|
|
419
|
+
.modal-head strong { font-size: 13px; }
|
|
420
|
+
.modal-head span { margin-top: 3px; color: var(--muted); font-size: 11px; }
|
|
421
|
+
.modal-canvas { min-height: 0; display: grid; place-items: center; padding: 24px; background: #e9e8e3; }
|
|
422
|
+
.modal-canvas img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 10px 34px rgba(35,36,32,.16); }
|
|
423
|
+
|
|
424
|
+
.empty-state { grid-column: 1 / -1; min-height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); text-align: center; }
|
|
425
|
+
.empty-state h2 { margin: 12px 0 4px; color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: 18px; font-weight: 400; }
|
|
426
|
+
.empty-state p { max-width: 390px; margin: 0; font-size: 12px; line-height: 1.5; }
|
|
427
|
+
.loading-screen { height: 100vh; display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--paper); color: var(--muted); font-size: 13px; }
|
|
428
|
+
.toast { position: fixed; z-index: 40; left: 50%; bottom: 22px; display: flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid rgba(255,255,255,.13); border-radius: 7px; background: rgba(37,39,34,.94); color: white; font-size: 12px; box-shadow: 0 10px 30px rgba(25,26,23,.22); transform: translateX(-50%); }
|
|
429
|
+
.toast.error { background: rgba(119, 50, 38, .96); }
|
|
430
|
+
|
|
431
|
+
@media (max-width: 1220px) {
|
|
432
|
+
:root { --sidebar: 220px; --inspector: 330px; }
|
|
433
|
+
.content-head, .file-grid, .file-list { padding-inline: 18px; }
|
|
434
|
+
.browser-toolbar { gap: 5px; }
|
|
435
|
+
}
|