@omrips/viewstl 0.0.0-stage → 2.0.0-rc.2

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 (35) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +176 -2
  3. package/THIRD-PARTY-NOTICES.txt +1129 -0
  4. package/build/v2/README.md +11 -0
  5. package/build/v2/THIRD-PARTY-NOTICES.txt +1129 -0
  6. package/build/v2/cad/occt-import-js.js +8 -0
  7. package/build/v2/cad/occt-import-js.source.txt +57 -0
  8. package/build/v2/cad/occt-import-js.wasm +0 -0
  9. package/build/v2/cad/prepare-cad.source.txt +112 -0
  10. package/build/v2/chunks/archive-VGS4J4Z7.js +1 -0
  11. package/build/v2/chunks/cad-VY42CMP4.js +1 -0
  12. package/build/v2/chunks/chunk-JH3H3JWA.js +1 -0
  13. package/build/v2/chunks/chunk-JS56KC3I.js +1 -0
  14. package/build/v2/chunks/chunk-R3HNTB5A.js +38 -0
  15. package/build/v2/chunks/chunk-U33KANV7.js +1 -0
  16. package/build/v2/chunks/chunk-ZMK3UZZE.js +1 -0
  17. package/build/v2/chunks/chunk-ZSV4PTIA.js +1 -0
  18. package/build/v2/chunks/export-7OP4ZGGJ.js +29 -0
  19. package/build/v2/chunks/export-cad-QPBT756V.js +13 -0
  20. package/build/v2/chunks/export-zip-EDCWH5PX.js +1 -0
  21. package/build/v2/chunks/print-check-2PU7CSL3.js +1 -0
  22. package/build/v2/chunks/scene-export-KQBS7VRJ.js +1 -0
  23. package/build/v2/chunks/scene-reader-APUJOPUR.js +1 -0
  24. package/build/v2/stl_viewer.min.js +51 -0
  25. package/build/v2/viewstl.cjs +5445 -0
  26. package/build/v2/viewstl.d.cts +446 -0
  27. package/build/v2/viewstl.d.ts +446 -0
  28. package/build/v2/viewstl.js +5426 -0
  29. package/build/v2/viewstl.min.js +51 -0
  30. package/build/v2/viewstl.worker.js +1 -0
  31. package/docs/v2-compatibility.md +204 -0
  32. package/docs/v2-usage.md +739 -0
  33. package/docs/v2-verification.md +437 -0
  34. package/legacy/README.md +43 -0
  35. package/package.json +73 -4
@@ -0,0 +1,437 @@
1
+ # ViewSTL v2 verification
2
+
3
+ This file records dated checks. Older sections describe the alpha at the time
4
+ of each check; release-candidate results are recorded separately below.
5
+
6
+ ## Quick-start documentation update 2.0.0-rc.2 — 2026-10-20
7
+
8
+ The README and usage guide now begin with the minimum installation step and
9
+ a three-line HTML example. The example was extracted unchanged from the README,
10
+ served with the complete distribution directory and a binary STL, and verified
11
+ in the desktop Codex Chromium browser: the model rendered, the worker and model
12
+ requests succeeded, and keyboard rotation responded without console errors.
13
+
14
+ All 112 unit tests and the legacy preservation check passed. Every runtime asset
15
+ was compared with the installed public `2.0.0-rc.1` package; only the embedded
16
+ version string changed. This update does not add browser/device coverage beyond
17
+ the release-candidate verification below. Evidence is in the ignored local
18
+ `test-results/npm-2.0.0-rc.2/` folder.
19
+
20
+ ## npm release candidate 2.0.0-rc.1 — 2026-10-19
21
+
22
+ Prepared the first public npm package as `@omrips/viewstl`, with the release
23
+ candidate on the `next` tag. The package version and `StlViewer.version` agree.
24
+ The GitHub legacy paths and all archived legacy files remain unchanged.
25
+
26
+ Validation against the packed tarball installed into a clean consumer:
27
+
28
+ - 112 Node tests pass, with strict TypeScript source-consumer checks.
29
+ - ESM imports and CommonJS requires work without a browser DOM. Both installed
30
+ package TypeScript entry points pass strict NodeNext checks.
31
+ - All 35 installed files match the release source by SHA-256. The allowlist
32
+ includes the viewer, module worker, lazy chunks, CAD glue/WASM, declarations,
33
+ documentation and license/source notices. No credentials, test data, local
34
+ server scripts, node_modules or legacy runtime files are packaged.
35
+ - Production builds succeed with Vite 8.3.4 and Webpack 5.112.0. Both follow the
36
+ documented complete-static-directory copy and explicit `worker_url` setup.
37
+ - 11 browser checks pass in each of four consumers: Vite, Webpack, direct ESM
38
+ and classic script (44 total). These use the installed distribution and real
39
+ WebGL 2/module workers for local binary STL, STL/OBJ/3MF/STEP/IGES exports and
40
+ reimports, print checks, PNG export, VSB save/load and VSJ export.
41
+ - Browser: desktop Codex in-app Chromium 155.0.0.0 on Windows, without device
42
+ emulation. The local pages use a same-origin CSP without JavaScript eval;
43
+ WebAssembly compilation is allowed. Parser/CAD assets are self-hosted.
44
+ - The legacy guard verifies unchanged tracked legacy files and all 14 archived
45
+ snapshot hashes.
46
+
47
+ Reproduction scripts, build fixtures, tarball inventory, terminal results,
48
+ browser output and screenshots are retained locally in the ignored
49
+ `test-results/npm-2.0.0-rc.1/` folder. Firefox, Safari, physical touch/mobile
50
+ devices and broader real-world large-CAD workloads remain unverified; this
51
+ release is a candidate, not a claim that those checks have passed. The optional
52
+ bundler `worker_factory` variant was not exercised by this release check.
53
+
54
+ ## URL drops in the optional app controller — 2026-10-02
55
+
56
+ `mountViewstlApp` routes dropped HTTP/HTTPS links through its configured relay and
57
+ existing URL import queue. Six new unit cases bring the plugin suite to 93 passing
58
+ tests; strict types and all 14 legacy integrity checks pass. The site's full
59
+ 96-assertion browser harness and 15 app lifecycle checks pass with this build.
60
+
61
+ Desktop headless Edge 154.0.4258.48 passes 15 local and 16 live URL-drop checks:
62
+ URI/plain-text/Firefox payloads, signed query preservation, deduplication, local
63
+ file precedence, untouched input behavior, unsupported schemes, failure recovery,
64
+ cancellation and an actual anchor drag. Firefox data is emulated; Firefox/Safari
65
+ and physical devices were not tested. Live preview also fetched and parsed a
66
+ real public STEP URL through Go. Other deterministic URL-drop response fixtures
67
+ are explicitly mocked in the browser runner. These changes and the preceding
68
+ export API build ship on preview in release `20261002-8f91150b7782`; export controls
69
+ are still not wired to the site. The legacy site was not changed.
70
+
71
+ ## Plugin mesh exports — 2026-10-02
72
+
73
+ The local v2 build adds `export_models` and `download_models` for binary STL,
74
+ OBJ/MTL, 3MF, STEP/STP and IGES/IGS. These are plugin-only changes; the website
75
+ and deployed preview assets have not been synchronized or changed for this work.
76
+ All writers are JavaScript worker modules; CAD export does not use the Go relay
77
+ or download a new CAD engine. The native WebGL2 renderer and legacy APIs remain.
78
+
79
+ Validation:
80
+
81
+ - 87 Node tests pass, including 14 export cases. The strict TypeScript consumer
82
+ check passes. All 14 archived legacy files verify unchanged.
83
+ - Open CASCADE independently reads generated STEP and IGES: open triangle
84
+ surfaces, multiple models, nonuniform scale, rotation, translation, millimeter
85
+ and inch units. Triangle counts, bounds and area match the expected mesh.
86
+ Checking area exposed IGES numeric tokens crossing padded parameter records;
87
+ writers now wrap at parameter boundaries and the regression covers this.
88
+ - Official 3MF Core/Materials XSD appendix validation passes with lxml. The
89
+ validation helper uses a stricter one-million occurrence cap because libxml2
90
+ 2.11 rejects the published `2147483647` value, and trims the leading space in
91
+ the Materials appendix's `type=" ST_Numbers"`. No geometry/schema rules are
92
+ relaxed. ZIP/XML tests also verify object separation, shared vertices, units,
93
+ per-vertex color gradients, safe names and material references.
94
+ - Headless desktop Edge **154.0.4258.48** passes all 9 export browser scenarios
95
+ and all 15 existing browser compatibility scenarios. The export page uses a
96
+ same-origin CSP without JavaScript eval. Tests cover real workers, all-format
97
+ reimport, preserved live buffers, selected export, OBJ ZIP, a real browser
98
+ download, running/queued cancellation, callback exceptions, scene cleanup,
99
+ memory rejection and subsequent recovery. No unexpected page/WebGL errors.
100
+ - Export/reimport requests were same-origin GETs; the actual download used a
101
+ local Blob. No file upload or external endpoint request occurred. Edge's
102
+ internal `edge://` downloads-panel resources are excluded from web traffic.
103
+ - A **1,000,000-triangle binary STL** produced **50,000,084 bytes** in **1,277 ms**
104
+ with **75 animation frames** during export. This is one synthetic local desktop
105
+ observation, not a performance guarantee or a measured process-memory peak.
106
+
107
+ Evidence: `test-results/exports/browser.json`, `browser.png`, `compatibility.txt`,
108
+ `assembly-mm.step`, `assembly-inch.step`, `assembly-mm.iges`, `assembly-inch.iges`
109
+ and `colored-scene.3mf`. These generated files are ignored by Git. Reproduce the
110
+ browser checks with a local plugin server and `scripts/check-export-browser.mjs`
111
+ (Playwright module supplied by `VIEWSTL_PLAYWRIGHT`, URL by `VIEWSTL_QA_URL`).
112
+
113
+ The optional `scripts/check-export-3mf-schema.py` reads the following downloaded
114
+ source files from `test-results/exports` and validates the generated 3MF fixture:
115
+
116
+ - `3mf-core-spec.txt`: https://raw.githubusercontent.com/3MFConsortium/spec_core/master/3MF%20Core%20Specification.md
117
+ - `3mf-materials-spec.txt`: https://raw.githubusercontent.com/3MFConsortium/spec_materials/master/3MF%20Materials%20Extension.md
118
+ - `xml.xsd`: https://www.w3.org/2001/xml.xsd
119
+
120
+ Limits: STEP/IGES contain planar mesh surfaces, not recovered analytic CAD solids
121
+ or feature history. No F3D is implemented. 3MF performs edge/winding/volume checks,
122
+ not full solid repair or self-intersection testing. Physical phones/tablets,
123
+ Safari/Firefox, commercial CAD applications and large STEP/IGES export workloads
124
+ have not been validated in this change. Export options and omissions are listed
125
+ in [usage](v2-usage.md#local-mesh-export).
126
+
127
+ ## STEP/IGES addition — 2026-10-01
128
+
129
+ The local build adds STEP/STP and IGES/IGS with lazy, self-hosted WASM in
130
+ disposable workers. The 54 plugin tests and TypeScript checks pass. Six CAD
131
+ tests also pass under Node's `--disallow-code-generation-from-strings` flag:
132
+ format aliases, unit conversion, assembly geometry/colors, malformed input,
133
+ recovery, index validation, input/output budgets and rejection of an allocation
134
+ beyond a 32 MiB configured WASM heap. The 14 archived legacy files verify unchanged.
135
+
136
+ The website's 16 unit tests and its complete browser harness pass in local
137
+ headless Edge 154.0.4258.37. Additional browser checks verify no CAD downloads
138
+ for the empty page or STL, cancellation during the reader download, subsequent
139
+ CAD recovery and GET-only same-origin asset requests without file uploads.
140
+ The browser harness exercises all four aliases, mm dimensions, colors, malformed
141
+ CAD recovery and multiple CAD files, alongside existing STL/OBJ/3MF and view tests.
142
+
143
+ These are desktop automated checks, with a 390px emulated viewport for layout.
144
+ Physical mobile devices, Safari/Firefox and large real-world CAD assemblies have
145
+ not been validated. No new browser-memory or large-CAD performance claim is made.
146
+ After explicit deployment authorization, the synchronized site and viewer were
147
+ deployed as preview release `20261001-f40c6b922ea5`. All 22 public file hashes
148
+ matched. Live headless Edge verified all four CAD aliases, correct mm dimensions,
149
+ assembly positions/colors, malformed-file recovery and existing STL/OBJ/3MF
150
+ loading. Observed network requests were same-origin GETs with no uploaded file
151
+ data. The WASM response used `application/wasm` and gzip; no CSP/page errors were
152
+ reported. Deployment evidence is in the website workspace's
153
+ `results/deploy-20261001-f40c6b922ea5/`. DNS and the legacy site were unchanged.
154
+
155
+ Checked on 2026-09-30, version `2.0.0-alpha.1`, on Windows in the
156
+ Codex in-app Chromium browser. These results describe this development
157
+ release, not a claim of complete compatibility with every legacy integration.
158
+
159
+ ## Completed checks
160
+
161
+ Update 2026-10-01, additional views: the Node suite now has 43 passing cases.
162
+ All 15 existing browser compatibility checks passed, plus 11 new appearance
163
+ checks in `tests/v2/appearance-browser.html`. Those validate actual PNG pixels
164
+ for mesh lines, studio shading, X-ray transparency, feature edges, wireframe,
165
+ front/back orientation colors, half-model clipping and reversed clipping;
166
+ all section axes/endpoints; independent smooth shading; VSJ/VSB persistence;
167
+ graphics context restoration; and repeated switching/resource cleanup.
168
+ Node cases cover section-aware picking, edge angles, budget rejection, worker
169
+ failure and stale view completion. Strict consumer types and all 14 archived
170
+ legacy hashes passed. The site passed 31 browser checks and 2 policy checks.
171
+ Responsive controls were inspected at 320 × 740 and 390 × 844, with no
172
+ horizontal overflow; these are desktop viewport simulations, not real touch
173
+ hardware tests. Live preview loading, smooth/edge derivation, Studio and
174
+ section controls passed with no browser warnings/errors. The new appearance
175
+ tests use small fixtures; no additional large-model stress test was run.
176
+
177
+ Update 2026-10-01: chunked local binary STL parsing, optional memory-budget checks,
178
+ OBJ line iteration and GPU-allocation failure cleanup were added. The 36-test
179
+ Node suite passed, followed by the additional GPU fault-injection test (37 total
180
+ cases). TypeScript and legacy preservation checks passed. All 15 browser cases
181
+ below passed again; the separate preview site passed 22 browser and 2 policy
182
+ checks. A 300,758,484-byte binary STL with 6,015,168 triangles rendered locally
183
+ and on preview.viewstl.com, exceeding the old byte and triangle limits. Its
184
+ wireframe request was rejected by the configured memory budget before map
185
+ allocation. The file stayed on the client. This is one desktop test, not a
186
+ guarantee for every model/device; large OBJ/3MF and low-memory mobile stress
187
+ tests remain outstanding. Existing package-tarball checks below are from the
188
+ September verification; no new npm publication occurred.
189
+
190
+ | Check | Result |
191
+ | --- | --- |
192
+ | Node automated tests | 30 passed, 0 failed |
193
+ | Real browser integration checks | 15 passed, 0 failed; no unexpected callback errors |
194
+ | TypeScript strict consumer checks | ESM and CommonJS package declarations checked |
195
+ | Local npm tarball installation | ESM/CJS constructors, worker/browser exports and types resolve |
196
+ | Legacy preservation | Original tracked source/build/dependencies unchanged; 14 local snapshot hashes match |
197
+ | Responsive demo | Single-column layout at 390 × 844; no horizontal document overflow |
198
+ | Local file picker | Keyboard-accessible picker loads a real cube STL; dimensions 2 × 2 × 2, 12 triangles |
199
+ | Direct manipulation | Mouse drag visibly rotates the loaded model; grid keyboard control and wireframe/smooth selection checked |
200
+
201
+ Automated coverage includes ASCII/binary STL, three color conventions,
202
+ invalid/truncated/non-finite data, OBJ indices, bounds/area/volume,
203
+ nonuniform scaling, matrix/picking calculations, transfer detachment,
204
+ worker limits/cancellation/timeouts, ZIP integrity/expansion limits,
205
+ real saved VSB archives, 3MF transforms/colors/relationships and invalid
206
+ XML/component cycles.
207
+
208
+ Browser coverage exercises classic-script and module entry points, actual
209
+ module workers, callback order, IDs including zero, idle rendering,
210
+ appearance/transforms/units, picking, disabled controls, animation,
211
+ VSJ relative URLs, multiple models, VSB round trips, 3MF/OBJ loading,
212
+ PNG capture, legacy API comparisons, the optional real Three.js mesh
213
+ bridge, cancellation with ID reuse, clean/dispose, context restoration,
214
+ and a visible initialization failure when WebGL2 is unavailable.
215
+
216
+ The legacy comparison deliberately records one corrected bug: model
217
+ dimensions now change after scaling. The legacy plugin returned stale
218
+ dimensions while already reporting scaled area and volume.
219
+
220
+ ## Performance observation
221
+
222
+ A generated **1,000,000-triangle binary STL (50.0 MB)** loaded through the
223
+ worker and reached the first rendered frames in **273 ms** in one desktop
224
+ run. WebGL reported no error. It used two tracked geometry buffers; after
225
+ `clean()`, there were **zero tracked GPU buffers and zero active workers**.
226
+
227
+ The input was an in-memory File generated before timing. This does not
228
+ measure network download, physical disk latency, peak memory, cold-browser
229
+ startup, or mobile performance. It is a reproducible smoke benchmark, not
230
+ a cross-device promise. Run it from `/tests/v2/browser.html`.
231
+
232
+ ## Build sizes
233
+
234
+ Sizes measured with Node gzip defaults; servers must enable compression
235
+ to achieve compressed transfer sizes. Decimal kB below.
236
+
237
+ | Asset | Raw | Gzip |
238
+ | --- | ---: | ---: |
239
+ | Classic minified viewer | 43.3 kB | 14.9 kB |
240
+ | Module worker | 4.6 kB | 2.1 kB |
241
+ | Shared worker geometry chunk | 3.8 kB | 1.9 kB |
242
+ | Lazy archive/XML chunk | 47.2 kB | 16.4 kB |
243
+ | Readable ESM viewer, alternative to classic | 69.0 kB | 18.5 kB |
244
+
245
+ The classic viewer plus initial STL worker code totals 51.6 kB raw /
246
+ 18.9 kB gzip. Archive/XML support loads only for archive operations.
247
+ The rendering/STL core includes no third-party runtime library.
248
+
249
+ ## Reproduction and remaining validation
250
+
251
+ ```sh
252
+ pnpm install --frozen-lockfile
253
+ pnpm build
254
+ pnpm test
255
+ pnpm check:types
256
+ pnpm check:legacy
257
+ pnpm start
258
+ pnpm pack
259
+ ```
260
+
261
+ The local tarball was installed into an isolated consumer directory with
262
+ scripts disabled, then its ESM import, CommonJS require, asset exports and
263
+ strict TypeScript consumers were checked. No npm package was published.
264
+ The package remains `private: true`; `@omrips/viewstl` is a provisional name.
265
+
266
+ Before a stable release or production replacement, test Firefox, Safari,
267
+ real touch/mobile hardware, high-DPI devices, representative large customer
268
+ models, peak memory, Vite/Webpack integration, and production-site callers.
269
+ The legacy site's direct Three.js internals need migration. The supported
270
+ 3MF/OBJ subsets and transparency limits are described in [usage](v2-usage.md).
271
+
272
+ Raw local browser results and the test tarball are in the ignored
273
+ `test-results/` directory. No production files, DNS, server configuration,
274
+ GitHub branch or npm registry entry were changed by this implementation.
275
+
276
+ ## Scene/grid verification — 2026-10-01
277
+
278
+ 47 Node tests passed, including aggregate scene memory accounting, serialized
279
+ budgeted parsing, reservation cleanup on allocation/dispatch failures and
280
+ multi-model derived-work guards. Strict TypeScript and 14-file legacy checks passed.
281
+ The Chromium browser passed 15 compatibility, 11 appearance and 8 new scene cases.
282
+ The scene cases exercise original coordinates, tint/restore without GPU buffer
283
+ reallocation, grid coverage beyond model bounds after pan/zoom, opaque depth
284
+ occlusion, PNG background color, finite-grid compatibility, infinite-grid VSB
285
+ round trip, context restoration/cleanup, aggregate budget rejection/recovery and
286
+ cancellation of derived work on model removal. Real mobile GPUs, Safari and Firefox
287
+ remain untested for these additions. The preview site was updated separately;
288
+ legacy files and npm publishing remain unchanged.
289
+
290
+ ## Editing frame and picking — 2026-10-01
291
+
292
+ 48 Node tests, strict TypeScript checking and the 14-file legacy integrity check
293
+ passed. Chromium passed 15 compatibility, 11 appearance and 11 scene browser
294
+ cases. Additional scene coverage verifies editing-frame pixels, clean PNG exports,
295
+ frame-buffer reuse during transforms, selection switching and cleanup, recovery
296
+ after graphics-context loss, and nearest visible surface picking after transforms.
297
+ Real mobile GPU, Safari and Firefox coverage remains outstanding.
298
+
299
+ ## Plugin-owned app controller — 2026-10-02
300
+
301
+ The website's application logic and four policy/transform helper modules now
302
+ compile into `viewstl.js`. The ESM, CommonJS and classic-script builds expose
303
+ `mountViewstlApp`; low-level `StlViewer` behavior is preserved. The suite now
304
+ contains 70 Node tests, including the 16 tests moved from the site. All pass,
305
+ along with strict TypeScript and the 14-file legacy integrity check.
306
+
307
+ Automated Edge 154.0.4258.48 passed the site's 96 browser assertions and 15
308
+ additional controller checks: lazy mounting, optional samples, duplicate-mount
309
+ rejection, public file loading, detached state, cancellation, disposal during
310
+ an active parser job, worker/canvas/listener cleanup, idempotent disposal,
311
+ refusing calls after disposal, late-read isolation during remounting, separate
312
+ embedded roots, radio groups and drop targets. CAD lazy loading, cancellation,
313
+ recovery and a 390px viewport were also rechecked. No new real-mobile, Safari
314
+ or Firefox coverage is claimed.
315
+
316
+ Preview release `20261002-79c817751172` passed all 18 asset hashes and live
317
+ HTTPS checks for STL, OBJ, 3MF and all four CAD aliases, malformed CAD recovery,
318
+ millimetre dimensions and assembly colors. Observed requests were same-origin
319
+ GETs without bodies; no CSP/page errors occurred. Evidence is in the sibling
320
+ website workspace under `results/plugin-app-refactor/` and
321
+ `results/deploy-20261002-79c817751172/`. No npm publication or GitHub push.
322
+
323
+ ## Optional Save dialog — 2026-10-08
324
+
325
+ The app controller binds an optional complete save-* control group. All behavior
326
+ is packaged in viewstl.js and delegates to the existing download_models API;
327
+ low-level writers are unchanged. The host supplies explanatory markup/styles.
328
+
329
+ 93 Node tests, strict types and all 14 legacy integrity hashes pass. Desktop
330
+ headless Edge 154.0.4258.62 passed 42 local and 42 deployed HTTPS Save checks:
331
+ actual STL/OBJ/3MF/STEP/IGES downloads and reimports, OBJ ZIP materials, translated
332
+ selected/all geometry, cancellation with actual stalled export workers, resource
333
+ cleanup, validation-error recovery, PNG regression and keyboard focus. 320/390px
334
+ layout and touch taps are emulation, not physical mobile tests. Twenty-four app
335
+ lifecycle checks cover export cancellation on clear/remove/dispose, independent
336
+ prefixed dialogs, optional-control omission and fail-fast incomplete groups.
337
+ Fifteen URL-drop regression checks also passed. No large-file performance claim
338
+ or Safari/Firefox coverage is added by these UI tests.
339
+
340
+ Preview release 20261008-580a812896b6 passed all 24 public file hashes. Observed
341
+ Save-test requests were same-origin GETs without uploads. Evidence and the
342
+ reproducible browser runners are in the sibling website workspace under
343
+ results/save-local, results/save-lifecycle, results/save-url-regression and
344
+ results/deploy-20261008-580a812896b6. No npm publication or GitHub push.
345
+
346
+ ## Scene saving — 2026-10-08
347
+
348
+ Release 20261008-625337233d51 exposes VSB/VSJ whole-scene saving in the preview.
349
+ The five regular mesh formats save only the selected model, per the owner's
350
+ clarification. New export_scene/download_scene Promise APIs use get_vsj manifests
351
+ and the existing VSB/STL archive layout, with worker-based VSB encoding,
352
+ cancellation, progress, memory admission and output limits. Legacy scene getters
353
+ and download methods retain their contracts.
354
+
355
+ 96 Node tests, strict types and all 14 legacy integrity hashes pass. Edge
356
+ 154.0.4258.62 passed 26 scene checks locally and live, including downloaded VSB
357
+ round trips, VSJ round trips with explicitly supplied referenced fixture files,
358
+ scene settings, source names, cancellation, memory/output/count limits and
359
+ callback errors. 42 mesh/PNG/UI regression checks passed locally and live;
360
+ 24 app lifecycle checks include cancellation of VSB workers on clear/remove/
361
+ dispose. Same-origin GET-only network evidence shows no export uploads. Narrow
362
+ and touch checks use emulation, not physical devices. Site scene reopening is
363
+ not implemented; round trips explicitly use the plugin's public scene loaders.
364
+ Evidence: sibling website results/scene-save-local, scene-save-mesh-regression,
365
+ scene-save-lifecycle and deploy-20261008-625337233d51. All 26 public hashes match.
366
+
367
+ ## Scene opening — 2026-10-08
368
+
369
+ Preview release `20261008-2bc0de3fc7ab` opens VSB/VSJ through the plugin-owned file,
370
+ drop and URL flows. The new `import_scene` API validates manifests/archives, stages
371
+ models until success, remaps IDs, resolves local companions or relayed public URL
372
+ references, and restores scene settings and editable model placement. Errors and
373
+ cancellation preserve the existing scene. Legacy scene loaders are unchanged.
374
+
375
+ 100 Node tests, strict types and all 14 legacy integrity hashes pass. Desktop
376
+ headless Edge 154.0.4258.62 passed 25 local and 27 live scene-opening checks,
377
+ including saved and legacy VSB files, local VSJ companions, editing/reset/re-saving,
378
+ missing files, malformed second-model rollback, cancellation during reading and
379
+ between models, recovery, URL routing and redirected VSJ base directories.
380
+ Live checks include real public VSJ/STL and VSB downloads through the deployed
381
+ Go relay; other remote fixtures are explicitly intercepted. Captured browser
382
+ traffic remains same-origin; local scene files and companions are not uploaded.
383
+ 42 mesh/PNG/save, 24 lifecycle and 15 URL-drop regression checks pass locally.
384
+ Narrow layout is emulated; physical mobile hardware, Safari and Firefox remain
385
+ unverified. These fixture tests do not establish large-scene peak memory or speed.
386
+
387
+ The relay's 12 top-level Go tests pass, including both scene formats and final
388
+ redirect-base metadata without query secrets. All 27 public asset hashes match.
389
+ Nginx and relay service configuration hashes remain unchanged. Evidence is in the
390
+ sibling website's `results/scene-open-local`, `scene-open-save-regression`,
391
+ `scene-open-lifecycle`, `scene-open-url-regression` and
392
+ `deploy-20261008-2bc0de3fc7ab/live-open`. No npm publication or GitHub push.
393
+
394
+ ## Print checks — 2026-10-17
395
+
396
+ 112 Node tests, strict TypeScript and 14 legacy integrity hashes pass. The new
397
+ fixtures cover open meshes, duplicates, degeneracy, winding, vertex-only contacts,
398
+ disconnected solids, nested cavities, intersecting shells, coplanar overlap,
399
+ near-coplanar neighbors, small gaps, large translations, nonuniform scale, units,
400
+ FDM estimates, time limits, memory rejection and bounded diagnostic samples.
401
+ A 100,000-triangle curved fixture exposed a false coplanar-neighbor intersection;
402
+ the shared-edge predicate was corrected and the case retained as a regression.
403
+
404
+ Desktop headless Edge 155.0.4283.45 passes 27 print integration checks locally:
405
+ lazy loading, basic/detailed coverage, cache isolation, native highlights,
406
+ unchanged geometry/colors/PNG, stale reports, 390px layout, keyboard closing/focus,
407
+ selected/all scope, cancellation/recovery, callback errors, memory accounting,
408
+ removal/disposal, optional host controls and touch-emulated interaction. Additional
409
+ regressions pass: 42 save/PNG, 25 scene-opening and 24 app-lifecycle checks. No
410
+ physical mobile devices, Firefox or Safari were tested. Browser traffic captured
411
+ by the print runner is same-origin GET; no analysis uploads occur.
412
+
413
+ The browser's 100,000-triangle closed torus completed detailed checks in about
414
+ 4.6 seconds with 279 animation frames and a maximum observed frame gap of 16.8 ms
415
+ in the initial recorded run. Results vary by run/device. The Node benchmark
416
+ `scripts/check-print-performance.mjs` measured about 0.6 s for 10,240 triangles
417
+ and 5.4 s for 100,000 triangles. Sampled JS heap reached about 164 MB on the larger
418
+ run; this is not a measurement of total/peak browser or GPU memory. Memory/time
419
+ limits deliberately reject or mark incomplete larger/ambiguous workloads.
420
+
421
+ Evidence: plugin `test-results/print-node.txt`, `print-performance.json`; sibling
422
+ website `results/print-local`, `print-save-regression`, `print-scene-regression`
423
+ and `print-lifecycle`. Reproduce browser checks with `site/qa/run-print-browser.mjs`.
424
+
425
+ Preview release `20261017-b0d9d98b838b` also passed all 27 print checks over
426
+ public HTTPS and all 29 public file hashes. Live evidence is in the sibling
427
+ website's `results/deploy-20261017-b0d9d98b838b/live-print`. The relay binary and
428
+ service/Nginx configuration hashes are unchanged; no npm publication or GitHub push.
429
+
430
+ The persistent-panel follow-up release `20261017-5b21747c4c8f` passes 39 browser
431
+ checks locally and over public HTTPS. Added coverage includes canvas focus,
432
+ appearance controls, other dialogs, repeat launch, narrow-screen toolbar access,
433
+ selection changes, loading/cancellation, adding/removing/clearing models and
434
+ explicit close from an empty scene. The panel remains open throughout unrelated
435
+ activity while stale reports and active jobs are handled safely. All 112 Node
436
+ tests, strict types and 14 legacy hashes pass again. Evidence: sibling website
437
+ `results/print-persistent/` and `results/deploy-20261017-5b21747c4c8f/`.
@@ -0,0 +1,43 @@
1
+ # Preserved legacy versions
2
+
3
+ The existing `src/`, top-level `build/` files, and `dependencies/` remain
4
+ the GitHub legacy implementation. Keep their existing download paths.
5
+ New v2 output belongs under `build/v2/`.
6
+
7
+ ## GitHub baseline
8
+
9
+ - Repository: https://github.com/omrips/viewstl
10
+ - Original default branch: `master`
11
+ - Baseline commit: `fbb7f5c3894862778c3a6c5d2630573e2496d01f`
12
+ - Local preservation tag: `legacy-before-v2-2026-09-30`
13
+ - Latest published release when inspected: `v1.13`
14
+
15
+ The baseline commit includes changes after the `v1.13` tag. Do not treat the
16
+ release tag and the current legacy branch as identical. The preservation
17
+ tag and development branch are local until explicitly pushed to GitHub.
18
+
19
+ ## Local website snapshot
20
+
21
+ [`local-1.14-2026-09-30/`](local-1.14-2026-09-30/) contains 14 files copied
22
+ without modification from the legacy website checkout. Its unminified
23
+ `plugin/stl_viewer.js` identifies itself as version 1.14. The
24
+ [`manifest.json`](local-1.14-2026-09-30/manifest.json) records every copied
25
+ file's original relative path, byte length and SHA-256 digest.
26
+
27
+ This is an archival snapshot, not a newly built or certified v1.14 release.
28
+ The source and minified files have not been verified as corresponding
29
+ builds. `TrackballControls.js` was absent from that checkout's `plugin/`
30
+ directory and has not been substituted from another version. The GitHub
31
+ legacy build separately contains its own TrackballControls dependency.
32
+
33
+ The local source differs from GitHub in click coordinate handling, updating
34
+ disabled controls, its material choice and loading unminified worker files.
35
+ These differences must be assessed when defining compatibility tests; they
36
+ must not be lost through an automatic overwrite from GitHub.
37
+
38
+ The `general/` files are the original JSZip and JSZipUtils copies, preserved
39
+ for historical reference. They are not dependencies of the new STL core.
40
+ Keep the original license notices in all archived files.
41
+
42
+ This snapshot does not establish which exact files the production server
43
+ currently serves. No server or production files were changed to create it.
package/package.json CHANGED
@@ -1,6 +1,75 @@
1
1
  {
2
2
  "name": "@omrips/viewstl",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "2.0.0-rc.2",
4
+ "description": "Local-first STL, OBJ, 3MF, STEP and IGES viewer with native WebGL2 and transferable worker geometry",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "homepage": "https://www.viewstl.com/plugin/",
8
+ "bugs": "https://github.com/omrips/viewstl/issues",
9
+ "keywords": [
10
+ "viewstl",
11
+ "webgl2",
12
+ "3d-viewer",
13
+ "stl",
14
+ "obj",
15
+ "3mf",
16
+ "step",
17
+ "iges"
18
+ ],
19
+ "publishConfig": {
20
+ "access": "public",
21
+ "tag": "next",
22
+ "registry": "https://registry.npmjs.org/"
23
+ },
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "https://github.com/omrips/viewstl.git"
27
+ },
28
+ "main": "./build/v2/viewstl.cjs",
29
+ "module": "./build/v2/viewstl.js",
30
+ "types": "./build/v2/viewstl.d.ts",
31
+ "exports": {
32
+ ".": {
33
+ "import": {
34
+ "types": "./build/v2/viewstl.d.ts",
35
+ "default": "./build/v2/viewstl.js"
36
+ },
37
+ "require": {
38
+ "types": "./build/v2/viewstl.d.cts",
39
+ "default": "./build/v2/viewstl.cjs"
40
+ }
41
+ },
42
+ "./worker": "./build/v2/viewstl.worker.js",
43
+ "./browser": "./build/v2/stl_viewer.min.js",
44
+ "./assets/*": "./build/v2/*",
45
+ "./package.json": "./package.json"
46
+ },
47
+ "files": [
48
+ "build/v2",
49
+ "LICENSE",
50
+ "docs/v2-usage.md",
51
+ "docs/v2-compatibility.md",
52
+ "docs/v2-verification.md",
53
+ "legacy/README.md",
54
+ "THIRD-PARTY-NOTICES.txt"
55
+ ],
56
+ "scripts": {
57
+ "build": "node scripts/build-v2.mjs",
58
+ "test": "node --test tests/v2/*.test.mjs",
59
+ "check:legacy": "node scripts/check-legacy.mjs",
60
+ "check:types": "tsc --noEmit --strict --module NodeNext --moduleResolution NodeNext --target ES2022 --lib ES2022,DOM tests/v2/types.ts",
61
+ "prepack": "node scripts/build-v2.mjs && node scripts/check-legacy.mjs",
62
+ "start": "node scripts/serve-v2.mjs"
63
+ },
64
+ "devDependencies": {
65
+ "esbuild": "0.28.2",
66
+ "fflate": "0.8.3",
67
+ "occt-import-js": "0.0.23",
68
+ "prettier": "3.9.9",
69
+ "saxes": "6.0.0",
70
+ "typescript": "5.9.3"
71
+ },
72
+ "engines": {
73
+ "node": ">=20"
74
+ }
75
+ }