@blendviewer/vision-scope 0.1.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.
Files changed (87) hide show
  1. package/README.md +95 -0
  2. package/dist/index.js +187288 -0
  3. package/dist/nestcad-envmaps/citadella/negx.jpg +0 -0
  4. package/dist/nestcad-envmaps/citadella/negy.jpg +0 -0
  5. package/dist/nestcad-envmaps/citadella/negz.jpg +0 -0
  6. package/dist/nestcad-envmaps/citadella/posx.jpg +0 -0
  7. package/dist/nestcad-envmaps/citadella/posy.jpg +0 -0
  8. package/dist/nestcad-envmaps/citadella/posz.jpg +0 -0
  9. package/dist/nestcad-envmaps/citadella/readme.txt +13 -0
  10. package/dist/nestcad-envmaps/citadella.jpg +0 -0
  11. package/dist/nestcad-envmaps/fishermans_bastion/negx.jpg +0 -0
  12. package/dist/nestcad-envmaps/fishermans_bastion/negy.jpg +0 -0
  13. package/dist/nestcad-envmaps/fishermans_bastion/negz.jpg +0 -0
  14. package/dist/nestcad-envmaps/fishermans_bastion/posx.jpg +0 -0
  15. package/dist/nestcad-envmaps/fishermans_bastion/posy.jpg +0 -0
  16. package/dist/nestcad-envmaps/fishermans_bastion/posz.jpg +0 -0
  17. package/dist/nestcad-envmaps/fishermans_bastion/readme.txt +13 -0
  18. package/dist/nestcad-envmaps/fishermans_bastion.jpg +0 -0
  19. package/dist/nestcad-envmaps/ice_river/negx.jpg +0 -0
  20. package/dist/nestcad-envmaps/ice_river/negy.jpg +0 -0
  21. package/dist/nestcad-envmaps/ice_river/negz.jpg +0 -0
  22. package/dist/nestcad-envmaps/ice_river/posx.jpg +0 -0
  23. package/dist/nestcad-envmaps/ice_river/posy.jpg +0 -0
  24. package/dist/nestcad-envmaps/ice_river/posz.jpg +0 -0
  25. package/dist/nestcad-envmaps/ice_river/readme.txt +13 -0
  26. package/dist/nestcad-envmaps/ice_river.jpg +0 -0
  27. package/dist/nestcad-envmaps/maskonaive/negx.jpg +0 -0
  28. package/dist/nestcad-envmaps/maskonaive/negy.jpg +0 -0
  29. package/dist/nestcad-envmaps/maskonaive/negz.jpg +0 -0
  30. package/dist/nestcad-envmaps/maskonaive/posx.jpg +0 -0
  31. package/dist/nestcad-envmaps/maskonaive/posy.jpg +0 -0
  32. package/dist/nestcad-envmaps/maskonaive/posz.jpg +0 -0
  33. package/dist/nestcad-envmaps/maskonaive/readme.txt +13 -0
  34. package/dist/nestcad-envmaps/maskonaive.jpg +0 -0
  35. package/dist/nestcad-envmaps/noimage.jpg +0 -0
  36. package/dist/nestcad-envmaps/park/1.png +0 -0
  37. package/dist/nestcad-envmaps/park/2.png +0 -0
  38. package/dist/nestcad-envmaps/park/3.png +0 -0
  39. package/dist/nestcad-envmaps/park/4.png +0 -0
  40. package/dist/nestcad-envmaps/park/5.png +0 -0
  41. package/dist/nestcad-envmaps/park/6.png +0 -0
  42. package/dist/nestcad-envmaps/park/7.png +0 -0
  43. package/dist/nestcad-envmaps/park/negx.jpg +0 -0
  44. package/dist/nestcad-envmaps/park/negy.jpg +0 -0
  45. package/dist/nestcad-envmaps/park/negz.jpg +0 -0
  46. package/dist/nestcad-envmaps/park/posx.jpg +0 -0
  47. package/dist/nestcad-envmaps/park/posy.jpg +0 -0
  48. package/dist/nestcad-envmaps/park/posz.jpg +0 -0
  49. package/dist/nestcad-envmaps/park/readme.txt +13 -0
  50. package/dist/nestcad-envmaps/park.jpg +0 -0
  51. package/dist/nestcad-envmaps/teide/negx.jpg +0 -0
  52. package/dist/nestcad-envmaps/teide/negy.jpg +0 -0
  53. package/dist/nestcad-envmaps/teide/negz.jpg +0 -0
  54. package/dist/nestcad-envmaps/teide/posx.jpg +0 -0
  55. package/dist/nestcad-envmaps/teide/posy.jpg +0 -0
  56. package/dist/nestcad-envmaps/teide/posz.jpg +0 -0
  57. package/dist/nestcad-envmaps/teide/readme.txt +13 -0
  58. package/dist/nestcad-envmaps/teide.jpg +0 -0
  59. package/dist/nestcad-loaders/draco.license.md +252 -0
  60. package/dist/nestcad-loaders/draco_decoder.js +118 -0
  61. package/dist/nestcad-loaders/draco_decoder.wasm +0 -0
  62. package/dist/nestcad-loaders/occt-import-js-worker.js +15 -0
  63. package/dist/nestcad-loaders/occt-import-js.js +21 -0
  64. package/dist/nestcad-loaders/occt-import-js.license.md +504 -0
  65. package/dist/nestcad-loaders/occt-import-js.wasm +0 -0
  66. package/dist/nestcad-loaders/rhino3dm.license.md +21 -0
  67. package/dist/nestcad-loaders/rhino3dm.min.js +21 -0
  68. package/dist/nestcad-loaders/rhino3dm.wasm +0 -0
  69. package/dist/nestcad-loaders/web-ifc-api-browser.js +54925 -0
  70. package/dist/nestcad-loaders/web-ifc.license.md +375 -0
  71. package/dist/nestcad-loaders/web-ifc.wasm +0 -0
  72. package/dist/samples/.gitkeep +3 -0
  73. package/dist/samples/config-sample.json +6 -0
  74. package/dist/samples/logo-sample.svg +4 -0
  75. package/dist/samples/readme-sample.md +10 -0
  76. package/dist/styles/archive.css +431 -0
  77. package/dist/styles/code.css +119 -0
  78. package/dist/styles/document.css +1158 -0
  79. package/dist/styles/image.css +77 -0
  80. package/dist/styles/loading.css +124 -0
  81. package/dist/styles/media.css +99 -0
  82. package/dist/styles/native-three.css +54 -0
  83. package/dist/styles/spatial.css +39 -0
  84. package/dist/styles/tabular.css +157 -0
  85. package/dist/ui-styles/ui.css +1171 -0
  86. package/dist/vision-scope.css +1 -0
  87. package/package.json +80 -0
@@ -0,0 +1,431 @@
1
+ /* Archive Renderer Styles - shadcn/ui inspired */
2
+
3
+ .vision-scope-archive {
4
+ width: 100%;
5
+ height: 100%;
6
+ display: flex;
7
+ flex-direction: column;
8
+ background: hsl(0 0% 100%);
9
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
10
+ overflow: hidden;
11
+ border-radius: 12px;
12
+ }
13
+
14
+ /* Header */
15
+ .archive-header {
16
+ display: flex;
17
+ justify-content: space-between;
18
+ align-items: center;
19
+ padding: 24px 32px;
20
+ background: hsl(0 0% 100%);
21
+ border-bottom: 1px solid hsl(240 5.9% 90%);
22
+ flex-shrink: 0;
23
+ }
24
+
25
+ .archive-info {
26
+ display: flex;
27
+ align-items: center;
28
+ gap: 16px;
29
+ }
30
+
31
+ .archive-icon {
32
+ line-height: 1;
33
+ color: hsl(240 10% 3.9%);
34
+ }
35
+
36
+ .archive-icon svg {
37
+ display: block;
38
+ }
39
+
40
+ .archive-stats {
41
+ display: flex;
42
+ flex-direction: column;
43
+ gap: 4px;
44
+ }
45
+
46
+ .archive-title {
47
+ font-size: 20px;
48
+ font-weight: 600;
49
+ color: hsl(240 10% 3.9%);
50
+ letter-spacing: -0.025em;
51
+ }
52
+
53
+ .archive-meta {
54
+ font-size: 14px;
55
+ color: hsl(240 3.8% 46.1%);
56
+ font-weight: 400;
57
+ }
58
+
59
+ .archive-actions {
60
+ display: flex;
61
+ gap: 8px;
62
+ }
63
+
64
+ .archive-btn {
65
+ display: inline-flex;
66
+ align-items: center;
67
+ justify-content: center;
68
+ gap: 8px;
69
+ padding: 0 16px;
70
+ height: 40px;
71
+ background: hsl(240 10% 3.9%);
72
+ color: hsl(0 0% 98%);
73
+ border: none;
74
+ border-radius: 6px;
75
+ font-size: 14px;
76
+ font-weight: 500;
77
+ cursor: pointer;
78
+ transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
79
+ white-space: nowrap;
80
+ }
81
+
82
+ .archive-btn svg {
83
+ flex-shrink: 0;
84
+ }
85
+
86
+ .archive-btn:hover {
87
+ background: hsl(240 10% 3.9% / 0.9);
88
+ }
89
+
90
+ .archive-btn:active {
91
+ transform: scale(0.98);
92
+ }
93
+
94
+ /* File List */
95
+ .archive-list {
96
+ flex: 1;
97
+ overflow: auto;
98
+ padding: 0;
99
+ }
100
+
101
+ .archive-table {
102
+ width: 100%;
103
+ background: transparent;
104
+ border-collapse: collapse;
105
+ border-spacing: 0;
106
+ }
107
+
108
+ .archive-table thead {
109
+ position: sticky;
110
+ top: 0;
111
+ z-index: 10;
112
+ background: hsl(0 0% 100%);
113
+ border-bottom: 1px solid hsl(240 5.9% 90%);
114
+ }
115
+
116
+ .archive-table th {
117
+ padding: 12px 32px;
118
+ text-align: left;
119
+ font-size: 12px;
120
+ font-weight: 500;
121
+ color: hsl(240 3.8% 46.1%);
122
+ white-space: nowrap;
123
+ text-transform: uppercase;
124
+ letter-spacing: 0.05em;
125
+ }
126
+
127
+ .archive-table th.col-icon {
128
+ width: 80px;
129
+ padding: 12px 24px 12px 32px;
130
+ }
131
+
132
+ .archive-table th.col-name {
133
+ width: auto;
134
+ }
135
+
136
+ .archive-table th.col-size,
137
+ .archive-table th.col-compressed {
138
+ width: 160px;
139
+ text-align: right;
140
+ }
141
+
142
+ .archive-table th.col-actions {
143
+ width: 120px;
144
+ text-align: center;
145
+ padding-right: 32px;
146
+ }
147
+
148
+ .archive-row {
149
+ border-bottom: 1px solid hsl(240 5.9% 90%);
150
+ transition: background-color 0.15s ease;
151
+ cursor: pointer;
152
+ }
153
+
154
+ .archive-row:hover {
155
+ background: hsl(240 4.8% 95.9%);
156
+ }
157
+
158
+ .archive-row:last-child {
159
+ border-bottom: none;
160
+ }
161
+
162
+ .archive-table td {
163
+ padding: 12px 32px;
164
+ font-size: 14px;
165
+ color: hsl(240 10% 3.9%);
166
+ vertical-align: middle;
167
+ line-height: 1.2;
168
+ }
169
+
170
+ .archive-table td.col-icon {
171
+ padding: 12px 24px 12px 32px;
172
+ text-align: center;
173
+ color: hsl(240 3.8% 46.1%);
174
+ }
175
+
176
+ .archive-table td.col-icon svg {
177
+ display: inline-block;
178
+ vertical-align: middle;
179
+ }
180
+
181
+ .file-name {
182
+ font-family: ui-monospace, 'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', monospace;
183
+ font-size: 14px;
184
+ overflow: hidden;
185
+ text-overflow: ellipsis;
186
+ white-space: nowrap;
187
+ color: hsl(240 10% 3.9%);
188
+ font-weight: 500;
189
+ display: flex;
190
+ align-items: center;
191
+ gap: 12px;
192
+ }
193
+
194
+ .file-name::before {
195
+ content: '├─';
196
+ color: hsl(240 3.8% 46.1%);
197
+ font-size: 14px;
198
+ flex-shrink: 0;
199
+ font-weight: 400;
200
+ }
201
+
202
+ .archive-row:last-child .file-name::before {
203
+ content: '└─';
204
+ }
205
+
206
+ .archive-table td.col-size,
207
+ .archive-table td.col-compressed {
208
+ color: hsl(240 3.8% 46.1%);
209
+ font-family: ui-monospace, 'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', monospace;
210
+ font-size: 13px;
211
+ font-weight: 500;
212
+ text-align: right;
213
+ font-variant-numeric: tabular-nums;
214
+ }
215
+
216
+ .compression-ratio {
217
+ display: inline-flex;
218
+ align-items: center;
219
+ margin-left: 8px;
220
+ font-size: 11px;
221
+ font-weight: 500;
222
+ color: hsl(142.1 76.2% 36.3%);
223
+ background: hsl(142.1 76.2% 36.3% / 0.1);
224
+ padding: 2px 8px;
225
+ border-radius: 4px;
226
+ border: 1px solid hsl(142.1 76.2% 36.3% / 0.2);
227
+ font-variant-numeric: tabular-nums;
228
+ }
229
+
230
+ .archive-table td.col-actions {
231
+ text-align: center;
232
+ padding: 12px 32px 12px 32px;
233
+ white-space: nowrap;
234
+ }
235
+
236
+ .action-btn {
237
+ display: inline-flex;
238
+ align-items: center;
239
+ justify-content: center;
240
+ width: 32px;
241
+ height: 32px;
242
+ background: transparent;
243
+ border: 1px solid hsl(240 5.9% 90%);
244
+ font-size: 16px;
245
+ cursor: pointer;
246
+ margin: 0 3px;
247
+ border-radius: 6px;
248
+ transition: all 0.15s ease;
249
+ color: hsl(240 3.8% 46.1%);
250
+ vertical-align: middle;
251
+ }
252
+
253
+ .action-btn:first-child {
254
+ margin-left: 0;
255
+ }
256
+
257
+ .action-btn:last-child {
258
+ margin-right: 0;
259
+ }
260
+
261
+ .action-btn:hover {
262
+ background: hsl(240 10% 3.9%);
263
+ border-color: hsl(240 10% 3.9%);
264
+ color: hsl(0 0% 98%);
265
+ }
266
+
267
+ .action-btn:active {
268
+ transform: scale(0.95);
269
+ }
270
+
271
+ /* Empty State */
272
+ .archive-empty {
273
+ padding: 80px 32px;
274
+ text-align: center;
275
+ color: hsl(240 3.8% 46.1%);
276
+ font-size: 14px;
277
+ }
278
+
279
+ /* Error State */
280
+ .archive-error {
281
+ display: flex;
282
+ flex-direction: column;
283
+ align-items: center;
284
+ justify-content: center;
285
+ height: 100%;
286
+ padding: 40px 32px;
287
+ text-align: center;
288
+ }
289
+
290
+ .error-icon {
291
+ font-size: 64px;
292
+ margin-bottom: 16px;
293
+ opacity: 0.5;
294
+ }
295
+
296
+ .error-message {
297
+ font-size: 16px;
298
+ font-weight: 600;
299
+ color: hsl(240 10% 3.9%);
300
+ margin-bottom: 8px;
301
+ }
302
+
303
+ .error-details {
304
+ font-size: 14px;
305
+ color: hsl(240 3.8% 46.1%);
306
+ font-family: ui-monospace, 'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', monospace;
307
+ background: hsl(240 4.8% 95.9%);
308
+ padding: 12px 16px;
309
+ border-radius: 6px;
310
+ max-width: 600px;
311
+ border: 1px solid hsl(240 5.9% 90%);
312
+ }
313
+
314
+ /* Scrollbar */
315
+ .archive-list::-webkit-scrollbar {
316
+ width: 10px;
317
+ height: 10px;
318
+ }
319
+
320
+ .archive-list::-webkit-scrollbar-track {
321
+ background: transparent;
322
+ }
323
+
324
+ .archive-list::-webkit-scrollbar-thumb {
325
+ background: hsl(240 5.9% 90%);
326
+ border-radius: 5px;
327
+ border: 2px solid hsl(0 0% 100%);
328
+ }
329
+
330
+ .archive-list::-webkit-scrollbar-thumb:hover {
331
+ background: hsl(240 3.8% 46.1%);
332
+ }
333
+
334
+ /* Dark mode support */
335
+ @media (prefers-color-scheme: dark) {
336
+ .vision-scope-archive {
337
+ background: hsl(240 10% 3.9%);
338
+ }
339
+
340
+ .archive-header {
341
+ background: hsl(240 10% 3.9%);
342
+ border-bottom-color: hsl(240 3.7% 15.9%);
343
+ }
344
+
345
+ .archive-title {
346
+ color: hsl(0 0% 98%);
347
+ }
348
+
349
+ .archive-meta {
350
+ color: hsl(240 5% 64.9%);
351
+ }
352
+
353
+ .archive-btn {
354
+ background: hsl(0 0% 98%);
355
+ color: hsl(240 10% 3.9%);
356
+ }
357
+
358
+ .archive-btn:hover {
359
+ background: hsl(0 0% 98% / 0.9);
360
+ }
361
+
362
+ .archive-table thead {
363
+ background: hsl(240 10% 3.9%);
364
+ border-bottom-color: hsl(240 3.7% 15.9%);
365
+ }
366
+
367
+ .archive-table th {
368
+ color: hsl(240 5% 64.9%);
369
+ }
370
+
371
+ .archive-row {
372
+ border-bottom-color: hsl(240 3.7% 15.9%);
373
+ }
374
+
375
+ .archive-row:hover {
376
+ background: hsl(240 3.7% 15.9%);
377
+ }
378
+
379
+ .archive-table td {
380
+ color: hsl(0 0% 98%);
381
+ }
382
+
383
+ .file-name {
384
+ color: hsl(0 0% 98%);
385
+ }
386
+
387
+ .file-name::before {
388
+ color: hsl(240 5% 64.9%);
389
+ }
390
+
391
+ .archive-table td.col-size,
392
+ .archive-table td.col-compressed {
393
+ color: hsl(240 5% 64.9%);
394
+ }
395
+
396
+ .compression-ratio {
397
+ color: hsl(142.1 70.6% 45.3%);
398
+ background: hsl(142.1 70.6% 45.3% / 0.1);
399
+ border-color: hsl(142.1 70.6% 45.3% / 0.2);
400
+ }
401
+
402
+ .action-btn {
403
+ border-color: hsl(240 3.7% 15.9%);
404
+ color: hsl(240 5% 64.9%);
405
+ }
406
+
407
+ .action-btn:hover {
408
+ background: hsl(0 0% 98%);
409
+ border-color: hsl(0 0% 98%);
410
+ color: hsl(240 10% 3.9%);
411
+ }
412
+
413
+ .error-message {
414
+ color: hsl(0 0% 98%);
415
+ }
416
+
417
+ .error-details {
418
+ color: hsl(240 5% 64.9%);
419
+ background: hsl(240 3.7% 15.9%);
420
+ border-color: hsl(240 3.7% 15.9%);
421
+ }
422
+
423
+ .archive-list::-webkit-scrollbar-thumb {
424
+ background: hsl(240 3.7% 15.9%);
425
+ border-color: hsl(240 10% 3.9%);
426
+ }
427
+
428
+ .archive-list::-webkit-scrollbar-thumb:hover {
429
+ background: hsl(240 5% 64.9%);
430
+ }
431
+ }
@@ -0,0 +1,119 @@
1
+ /* Code Renderer Styles */
2
+
3
+ .vision-scope-code {
4
+ position: relative;
5
+ width: 100%;
6
+ height: 100%;
7
+ background: #272822;
8
+ overflow: auto;
9
+ }
10
+
11
+ .vision-scope-code pre {
12
+ margin: 0;
13
+ padding: 20px;
14
+ min-height: 100%;
15
+ background: #272822;
16
+ }
17
+
18
+ .vision-scope-code code {
19
+ font-family: 'Monaco', 'Menlo', 'Courier New', 'Consolas', monospace;
20
+ font-size: 14px;
21
+ line-height: 1.6;
22
+ display: block;
23
+ }
24
+
25
+ /* Loading Indicator */
26
+ .vision-scope-code .vision-scope-loading {
27
+ position: absolute;
28
+ top: 50%;
29
+ left: 50%;
30
+ transform: translate(-50%, -50%);
31
+ display: flex;
32
+ flex-direction: column;
33
+ align-items: center;
34
+ gap: 15px;
35
+ background: rgba(0, 0, 0, 0.8);
36
+ padding: 30px;
37
+ border-radius: 12px;
38
+ color: white;
39
+ z-index: 1000;
40
+ }
41
+
42
+ .vision-scope-code .loading-spinner {
43
+ width: 40px;
44
+ height: 40px;
45
+ border: 3px solid rgba(255, 255, 255, 0.3);
46
+ border-top-color: #fff;
47
+ border-radius: 50%;
48
+ animation: vision-scope-code-spin 0.8s linear infinite;
49
+ }
50
+
51
+ @keyframes vision-scope-code-spin {
52
+ to {
53
+ transform: rotate(360deg);
54
+ }
55
+ }
56
+
57
+ .vision-scope-code .loading-text {
58
+ font-size: 14px;
59
+ font-weight: 500;
60
+ }
61
+
62
+ /* Line numbers (if using Prism line-numbers plugin) */
63
+ .vision-scope-code pre.line-numbers {
64
+ position: relative;
65
+ padding-left: 3.8em;
66
+ counter-reset: linenumber;
67
+ }
68
+
69
+ .vision-scope-code pre.line-numbers > code {
70
+ position: relative;
71
+ white-space: inherit;
72
+ }
73
+
74
+ .vision-scope-code .line-numbers .line-numbers-rows {
75
+ position: absolute;
76
+ pointer-events: none;
77
+ top: 0;
78
+ font-size: 100%;
79
+ left: -3.8em;
80
+ width: 3em;
81
+ letter-spacing: -1px;
82
+ border-right: 1px solid #999;
83
+ user-select: none;
84
+ color: #999;
85
+ }
86
+
87
+ .vision-scope-code .line-numbers-rows > span {
88
+ display: block;
89
+ counter-increment: linenumber;
90
+ }
91
+
92
+ .vision-scope-code .line-numbers-rows > span:before {
93
+ content: counter(linenumber);
94
+ display: block;
95
+ padding-right: 0.8em;
96
+ text-align: right;
97
+ }
98
+
99
+ /* Scrollbar styling */
100
+ .vision-scope-code::-webkit-scrollbar {
101
+ width: 10px;
102
+ height: 10px;
103
+ }
104
+
105
+ .vision-scope-code::-webkit-scrollbar-track {
106
+ background: #272822;
107
+ }
108
+
109
+ .vision-scope-code::-webkit-scrollbar-thumb {
110
+ background: #ccc;
111
+ border-radius: 5px;
112
+ }
113
+
114
+ .vision-scope-code::-webkit-scrollbar-thumb:hover {
115
+ background: #999;
116
+ }
117
+
118
+
119
+