{"versions":{"0.6.0":{"name":"@flyfish-dev/cad-viewer","version":"0.6.0","description":"A production-oriented lightweight frontend CAD viewer for DWG, DXF, DWF and DWFx, built with TypeScript, worker-backed DWG WebAssembly parsing, native dwf-viewer integration, WebGL and Canvas overlays.","type":"module","license":"AGPL-3.0-only","author":{"name":"Yu Wang"},"homepage":"https://cad-viewer-iys.pages.dev","repository":{"type":"git","url":"git+https://github.com/flyfish-dev/cad-viewer.git"},"bugs":{"url":"https://github.com/flyfish-dev/cad-viewer/issues"},"keywords":["cad","dwg","dxf","dwf","dwfx","autocad","viewer","canvas","typescript","frontend","libredwg","web-worker","wasm","webgl","gpu","cad-viewer","w2d","w3d","dwf-viewer"],"sideEffects":["*.css","./dist/style.css","./src/styles.css","./demo/styles.css"],"main":"./dist/cad-viewer.umd.cjs","module":"./dist/cad-viewer.es.js","types":"./dist/types/index.d.ts","exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/cad-viewer.es.js","require":"./dist/cad-viewer.umd.cjs","default":"./dist/cad-viewer.es.js"},"./styles.css":"./dist/style.css","./package.json":"./package.json","./style.css":"./dist/style.css","./wasm/libredwg-web.wasm":"./dist/wasm/libredwg-web.wasm","./wasm/libredwg-web.js":"./dist/wasm/libredwg-web.js","./dist/index.js":"./dist/index.js","./dist/index.d.ts":"./dist/index.d.ts","./wasm/dwfv-render.wasm":"./dist/wasm/dwfv-render.wasm"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"engines":{"node":">=20.19.0"},"scripts":{"clean":"node ./scripts/clean.cjs","copy:wasm":"node ./scripts/copy-libredwg-wasm.cjs","dev":"npm run copy:wasm && vite --config vite.config.ts --host 0.0.0.0","typecheck":"tsc -p tsconfig.json --noEmit","build:types":"tsc -p tsconfig.build.json","build:lib":"npm run copy:wasm && vite build --config vite.lib.config.ts && npm run build:types && npm run build:assets","build:demo":"npm run copy:wasm && vite build --config vite.config.ts","build":"npm run clean && npm run typecheck && npm run build:lib && npm run build:demo","preview":"npm run build:demo && vite preview --config vite.config.ts --host 0.0.0.0","pack:dry":"npm pack --dry-run","release:npm":"npm publish --access public --auth-type=web","pages:dev":"npm run build:demo && wrangler pages dev dist-demo","deploy:pages":"npm run build:demo && wrangler pages deploy dist-demo --project-name cad-viewer","prepublishOnly":"npm run clean && npm run typecheck && npm run build:lib && npm run pack:dry","build:worker-check":"npm run typecheck && npm run build:demo","check:wasm":"node ./scripts/check-wasm.cjs","build:assets":"node ./scripts/copy-dist-assets.cjs","preview:demo":"npm run preview"},"dependencies":{"@mlightcad/libredwg-web":"^0.7.2","dxf-parser":"^1.1.2","dwf-viewer":"^0.5.0"},"devDependencies":{"@types/node":"^20.14.12","typescript":"^5.8.3","vite":"^5.4.11","wrangler":"^4.20.0"},"gitHead":"4d93cf654bbab5112c3dfd3fda24555877ccba0e","_id":"@flyfish-dev/cad-viewer@0.6.0","_nodeVersion":"26.0.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-Yu/wjSxZrQTRxkXWWzwcyYJn9ptDsciwnMAKJvPm2yspazV3ziRF+OA+YCR3F1F9OdGvKeiB9I2qJpmxRcFI9g==","shasum":"926a977acdccfc85467468706f07f2e1d1fd311f","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@flyfish-dev/cad-viewer/-/cad-viewer-0.6.0.tgz","fileCount":59,"unpackedSize":8056759,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDcCVv+NDkE6O8Sw/KUOEwrcC4rkUsS5wdwWBck/Pi51gIhAMk2FZUTl6nSqXg+9e2ngCzu9vTKl+gcOuj3KxNW1rqx"}],"size":2045942},"_npmUser":{"name":"anonymous","email":"wybaby168@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"wybaby168@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cad-viewer_0.6.0_1781225874697_0.3539358181164103"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-06-12T00:57:54.892Z","publish_time":1781225874892,"_source_registry_name":"default","contributors":[]},"0.5.3":{"name":"@flyfish-dev/cad-viewer","version":"0.5.3","keywords":["cad","dwg","dxf","dwf","dwfx","autocad","viewer","canvas","typescript","frontend","libredwg","web-worker","wasm","webgl","gpu","cad-viewer"],"author":{"name":"Yu Wang"},"license":"AGPL-3.0-only","_id":"@flyfish-dev/cad-viewer@0.5.3","maintainers":[{"name":"anonymous","email":"wybaby168@gmail.com"}],"homepage":"https://cad-viewer-iys.pages.dev","bugs":{"url":"https://github.com/flyfish-dev/cad-viewer/issues"},"dist":{"shasum":"5501c9ef9fba20f1f52dce502d61952415fe6488","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@flyfish-dev/cad-viewer/-/cad-viewer-0.5.3.tgz","fileCount":58,"integrity":"sha512-DNaDROGSelnV18WdoC0gNfZZfZiwN8RWZsPPfd1iwIuuObg2uN1MO7KmdpUq56qHD66hrgHqSYAmSX9megIMUw==","signatures":[{"sig":"MEQCIFrWo9TZgCEEQ9LePOKzDwBRZVuJOYhhD4DvV3p2v8H6AiAaOJ3Cu2Ydov0szQWM/+IUe+qTr4k4A+1StXiBWkPUYQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8015214,"size":2038273},"main":"./dist/cad-viewer.umd.cjs","type":"module","types":"./dist/types/index.d.ts","module":"./dist/cad-viewer.es.js","engines":{"node":">=20.19.0"},"exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/cad-viewer.es.js","default":"./dist/cad-viewer.es.js","require":"./dist/cad-viewer.umd.cjs"},"./style.css":"./dist/style.css","./styles.css":"./dist/style.css","./package.json":"./package.json","./dist/index.js":"./dist/index.js","./dist/index.d.ts":"./dist/index.d.ts","./wasm/libredwg-web.js":"./dist/wasm/libredwg-web.js","./wasm/libredwg-web.wasm":"./dist/wasm/libredwg-web.wasm"},"gitHead":"9f14ec3c9718a705f58956848cb369f39f5d807e","scripts":{"dev":"npm run copy:wasm && vite --config vite.config.ts --host 0.0.0.0","build":"npm run clean && npm run typecheck && npm run build:lib && npm run build:demo","clean":"node ./scripts/clean.cjs","preview":"npm run build:demo && vite preview --config vite.config.ts --host 0.0.0.0","pack:dry":"npm pack --dry-run","build:lib":"npm run copy:wasm && vite build --config vite.lib.config.ts && npm run build:types && npm run build:assets","copy:wasm":"node ./scripts/copy-libredwg-wasm.cjs","pages:dev":"npm run build:demo && wrangler pages dev dist-demo","typecheck":"tsc -p tsconfig.json --noEmit","build:demo":"npm run copy:wasm && vite build --config vite.config.ts","check:wasm":"node ./scripts/check-wasm.cjs","build:types":"tsc -p tsconfig.build.json","release:npm":"npm publish --access public","build:assets":"node ./scripts/copy-dist-assets.cjs","deploy:pages":"npm run build:demo && wrangler pages deploy dist-demo --project-name cad-viewer","preview:demo":"npm run preview","prepublishOnly":"npm run clean && npm run typecheck && npm run build:lib && npm run pack:dry","build:worker-check":"npm run typecheck && npm run build:demo"},"_npmUser":{"name":"anonymous","email":"wybaby168@gmail.com"},"repository":{"url":"git+https://github.com/flyfish-dev/cad-viewer.git","type":"git"},"_npmVersion":"11.12.1","description":"A production-oriented lightweight frontend CAD viewer for DWG, DXF and DWFx/DWF preview, built with TypeScript, WebGL, Canvas overlays and worker-backed DWG WebAssembly parsing.","directories":{},"sideEffects":["*.css","./dist/style.css","./src/styles.css","./demo/styles.css"],"_nodeVersion":"26.0.0","dependencies":{"fflate":"^0.8.2","dxf-parser":"^1.1.2","@mlightcad/libredwg-web":"^0.7.2"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.4.11","wrangler":"^4.20.0","typescript":"^5.8.3","@types/node":"^20.14.12"},"_npmOperationalInternal":{"tmp":"tmp/cad-viewer_0.5.3_1781172255680_0.10846483848159028","host":"s3://npm-registry-packages-npm-production"},"_cnpmcore_publish_time":"2026-06-11T10:04:15.836Z","publish_time":1781172255836,"_source_registry_name":"default","contributors":[]},"0.6.1":{"name":"@flyfish-dev/cad-viewer","version":"0.6.1","description":"A production-oriented lightweight frontend CAD viewer for DWG, DXF, DWF, DWFx and XPS, built with TypeScript, worker-backed DWG WebAssembly parsing, native dwf-viewer integration, WebGL 2D/3D rendering and Canvas overlays.","type":"module","license":"AGPL-3.0-only","author":{"name":"Yu Wang"},"homepage":"https://cad-viewer-iys.pages.dev","repository":{"type":"git","url":"git+https://github.com/flyfish-dev/cad-viewer.git"},"bugs":{"url":"https://github.com/flyfish-dev/cad-viewer/issues"},"keywords":["cad","dwg","dxf","dwf","dwfx","xps","autocad","viewer","canvas","typescript","frontend","libredwg","web-worker","wasm","webgl","gpu","cad-viewer","w2d","w3d","dwf-viewer"],"sideEffects":["*.css","./dist/style.css","./src/styles.css","./demo/styles.css"],"main":"./dist/cad-viewer.umd.cjs","module":"./dist/cad-viewer.es.js","types":"./dist/types/index.d.ts","exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/cad-viewer.es.js","require":"./dist/cad-viewer.umd.cjs","default":"./dist/cad-viewer.es.js"},"./styles.css":"./dist/style.css","./package.json":"./package.json","./style.css":"./dist/style.css","./wasm/libredwg-web.wasm":"./dist/wasm/libredwg-web.wasm","./wasm/libredwg-web.js":"./dist/wasm/libredwg-web.js","./dist/index.js":"./dist/index.js","./dist/index.d.ts":"./dist/index.d.ts","./wasm/dwfv-render.wasm":"./dist/wasm/dwfv-render.wasm"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"engines":{"node":">=20.19.0"},"scripts":{"clean":"node ./scripts/clean.cjs","copy:wasm":"node ./scripts/copy-libredwg-wasm.cjs","dev":"npm run copy:wasm && vite --config vite.config.ts --host 0.0.0.0","typecheck":"tsc -p tsconfig.json --noEmit","build:types":"tsc -p tsconfig.build.json","build:lib":"npm run copy:wasm && vite build --config vite.lib.config.ts && npm run build:types && npm run build:assets","build:demo":"npm run copy:wasm && vite build --config vite.config.ts","build":"npm run clean && npm run typecheck && npm run build:lib && npm run build:demo","preview":"npm run build:demo && vite preview --config vite.config.ts --host 0.0.0.0","pack:dry":"npm pack --dry-run","release:npm":"npm publish --access public --auth-type=web","pages:dev":"npm run build:demo && wrangler pages dev dist-demo","deploy:pages":"npm run build:demo && wrangler pages deploy dist-demo --project-name cad-viewer","prepublishOnly":"npm run clean && npm run typecheck && npm run build:lib && npm run pack:dry","build:worker-check":"npm run typecheck && npm run build:demo","check:wasm":"node ./scripts/check-wasm.cjs","build:assets":"node ./scripts/copy-dist-assets.cjs","preview:demo":"npm run preview"},"dependencies":{"@mlightcad/libredwg-web":"^0.7.2","dwf-viewer":"^0.6.1","dxf-parser":"^1.1.2"},"devDependencies":{"@types/node":"^20.14.12","typescript":"^5.8.3","vite":"^5.4.11","wrangler":"^4.20.0"},"gitHead":"f709e32e9cac29432e035fbaf12eda65e9799165","_id":"@flyfish-dev/cad-viewer@0.6.1","_nodeVersion":"26.0.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-rg0iXc6I4xHTALQP9+E3edJDue2nf/LFdXHMcrqHqkIznwstQMjX+EToLj/qeEfIZarI2GkdwTVed8qZpA516A==","shasum":"3c0497aac5ee9babae74279882dfaf5094ad082c","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@flyfish-dev/cad-viewer/-/cad-viewer-0.6.1.tgz","fileCount":59,"unpackedSize":8066363,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD8COpD4QxzRdZOBqtjRFGD5o7T/SQJBXx28QKT4D13+QIhAPNVavCcTLP1yqbAPzWE3+1MYhhwQuogj3jicPnNUMjl"}],"size":2049504},"_npmUser":{"name":"anonymous","email":"wybaby168@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"wybaby168@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cad-viewer_0.6.1_1781233304542_0.7489357152929084"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-06-12T03:01:44.770Z","publish_time":1781233304770,"_source_registry_name":"default","contributors":[]},"0.6.2":{"name":"@flyfish-dev/cad-viewer","version":"0.6.2","description":"A production-oriented lightweight frontend CAD viewer for DWG, DXF, DWF, DWFx and XPS, built with TypeScript, worker-backed DWG WebAssembly parsing, native dwf-viewer integration, WebGL 2D/3D rendering and Canvas overlays.","type":"module","license":"AGPL-3.0-only","author":{"name":"Yu Wang"},"homepage":"https://cad-viewer-iys.pages.dev","repository":{"type":"git","url":"git+https://github.com/flyfish-dev/cad-viewer.git"},"bugs":{"url":"https://github.com/flyfish-dev/cad-viewer/issues"},"keywords":["cad","dwg","dxf","dwf","dwfx","xps","autocad","viewer","canvas","typescript","frontend","libredwg","web-worker","wasm","webgl","gpu","cad-viewer","w2d","w3d","dwf-viewer"],"sideEffects":["*.css","./dist/style.css","./src/styles.css","./demo/styles.css"],"main":"./dist/cad-viewer.umd.cjs","module":"./dist/cad-viewer.es.js","types":"./dist/types/index.d.ts","exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/cad-viewer.es.js","require":"./dist/cad-viewer.umd.cjs","default":"./dist/cad-viewer.es.js"},"./styles.css":"./dist/style.css","./package.json":"./package.json","./style.css":"./dist/style.css","./wasm/libredwg-web.wasm":"./dist/wasm/libredwg-web.wasm","./wasm/libredwg-web.js":"./dist/wasm/libredwg-web.js","./dist/index.js":"./dist/index.js","./dist/index.d.ts":"./dist/index.d.ts","./wasm/dwfv-render.wasm":"./dist/wasm/dwfv-render.wasm"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"engines":{"node":">=20.19.0"},"scripts":{"clean":"node ./scripts/clean.cjs","copy:wasm":"node ./scripts/copy-libredwg-wasm.cjs","dev":"npm run copy:wasm && vite --config vite.config.ts --host 0.0.0.0","typecheck":"tsc -p tsconfig.json --noEmit","build:types":"tsc -p tsconfig.build.json","build:lib":"npm run copy:wasm && vite build --config vite.lib.config.ts && npm run build:types && npm run build:assets","build:demo":"npm run copy:wasm && vite build --config vite.config.ts","build":"npm run clean && npm run typecheck && npm run build:lib && npm run build:demo","preview":"npm run build:demo && vite preview --config vite.config.ts --host 0.0.0.0","pack:dry":"npm pack --dry-run","release:npm":"npm publish --access public --auth-type=web","pages:dev":"npm run build:demo && wrangler pages dev dist-demo","deploy:pages":"npm run build:demo && wrangler pages deploy dist-demo --project-name cad-viewer","prepublishOnly":"npm run clean && npm run typecheck && npm run build:lib && npm run pack:dry","build:worker-check":"npm run typecheck && npm run build:demo","check:wasm":"node ./scripts/check-wasm.cjs","build:assets":"node ./scripts/copy-dist-assets.cjs","preview:demo":"npm run preview"},"dependencies":{"@mlightcad/libredwg-web":"^0.7.2","dwf-viewer":"^0.6.4","dxf-parser":"^1.1.2"},"devDependencies":{"@types/node":"^20.14.12","typescript":"^5.8.3","vite":"^5.4.11","wrangler":"^4.20.0"},"gitHead":"6cf2201148206b68b27e58de9b8ffea2aa2a4f70","_id":"@flyfish-dev/cad-viewer@0.6.2","_nodeVersion":"26.0.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-bIdWX4vItwrdj+QAFJvvanuTUv5w362/QKVpitM2kAqIhO6XM1k54HKqMo8nsvSEMbE3ZCU7ApWyF0YPbRkM2A==","shasum":"9951ce9d7fbb628429fb342a3d55b8256334c0f5","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@flyfish-dev/cad-viewer/-/cad-viewer-0.6.2.tgz","fileCount":59,"unpackedSize":8066864,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQChOmWu5JGw2sc1zvtJmJoWyC0URVy+boQwGPxDYtb9eQIhAPLN277OLHRmplFFdLm9K9Vq3nly6SJlT9x381A9MoWh"}],"size":2049699},"_npmUser":{"name":"anonymous","email":"wybaby168@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"wybaby168@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cad-viewer_0.6.2_1781253735939_0.23899959840150098"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-06-12T08:42:16.209Z","publish_time":1781253736209,"_source_registry_name":"default","contributors":[]},"0.6.3":{"name":"@flyfish-dev/cad-viewer","version":"0.6.3","description":"A production-oriented lightweight frontend CAD viewer for DWG, DXF, DWF, DWFx and XPS, built with TypeScript, worker-backed DWG WebAssembly parsing, native dwf-viewer integration, WebGL 2D/3D rendering and Canvas overlays.","type":"module","license":"AGPL-3.0-only","author":{"name":"Yu Wang"},"homepage":"https://cad-viewer-iys.pages.dev","repository":{"type":"git","url":"git+https://github.com/flyfish-dev/cad-viewer.git"},"bugs":{"url":"https://github.com/flyfish-dev/cad-viewer/issues"},"keywords":["cad","dwg","dxf","dwf","dwfx","xps","autocad","viewer","canvas","typescript","frontend","libredwg","web-worker","wasm","webgl","gpu","cad-viewer","w2d","w3d","dwf-viewer"],"sideEffects":["*.css","./dist/style.css","./src/styles.css","./demo/styles.css"],"main":"./dist/cad-viewer.umd.cjs","module":"./dist/cad-viewer.es.js","types":"./dist/types/index.d.ts","exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/cad-viewer.es.js","require":"./dist/cad-viewer.umd.cjs","default":"./dist/cad-viewer.es.js"},"./styles.css":"./dist/style.css","./package.json":"./package.json","./style.css":"./dist/style.css","./wasm/libredwg-web.wasm":"./dist/wasm/libredwg-web.wasm","./wasm/libredwg-web.js":"./dist/wasm/libredwg-web.js","./dist/index.js":"./dist/index.js","./dist/index.d.ts":"./dist/index.d.ts","./wasm/dwfv-render.wasm":"./dist/wasm/dwfv-render.wasm"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"engines":{"node":">=20.19.0"},"scripts":{"clean":"node ./scripts/clean.cjs","copy:wasm":"node ./scripts/copy-libredwg-wasm.cjs","dev":"npm run copy:wasm && vite --config vite.config.ts --host 0.0.0.0","typecheck":"tsc -p tsconfig.json --noEmit","build:types":"tsc -p tsconfig.build.json","build:lib":"npm run copy:wasm && vite build --config vite.lib.config.ts && npm run build:types && npm run build:assets","build:demo":"npm run copy:wasm && vite build --config vite.config.ts","build":"npm run clean && npm run typecheck && npm run build:lib && npm run build:demo","preview":"npm run build:demo && vite preview --config vite.config.ts --host 0.0.0.0","pack:dry":"npm pack --dry-run","release:npm":"npm publish --access public --auth-type=web","pages:dev":"npm run build:demo && wrangler pages dev dist-demo","deploy:pages":"npm run build:demo && wrangler pages deploy dist-demo --project-name cad-viewer","prepublishOnly":"npm run clean && npm run typecheck && npm run build:lib && npm run pack:dry","build:worker-check":"npm run typecheck && npm run build:demo","check:wasm":"node ./scripts/check-wasm.cjs","build:assets":"node ./scripts/copy-dist-assets.cjs","preview:demo":"npm run preview"},"dependencies":{"@mlightcad/libredwg-web":"^0.7.2","dwf-viewer":"^0.6.4","dxf-parser":"^1.1.2"},"devDependencies":{"@types/node":"^20.14.12","typescript":"^5.8.3","vite":"^5.4.11","wrangler":"^4.20.0"},"gitHead":"38b3330dcee32fdbfdce85c07e9c98020df73e03","_id":"@flyfish-dev/cad-viewer@0.6.3","_nodeVersion":"26.0.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-dd8MrXlaipxDTql8SKjMAWgntDJtQJ/E6kD7GEoSI5b4gRo5Qtd5cmvjJJyCXmEXutBgc1vozkEyKGWcpU3kGA==","shasum":"58265e07fa83547684028f03cb3d5ab44c891a6f","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@flyfish-dev/cad-viewer/-/cad-viewer-0.6.3.tgz","fileCount":59,"unpackedSize":8093956,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCyLxnCf1sMJIoOOXjYILn1Qf0DxpoTi+g3O3ZWpRdqTgIgM92mbGf7nX8m5cgDSI4WDQPF8RAyPB2lGtywNrBvW6I="}],"size":2058785},"_npmUser":{"name":"anonymous","email":"wybaby168@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"wybaby168@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cad-viewer_0.6.3_1781487828650_0.281836515014082"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-06-15T01:43:48.830Z","publish_time":1781487828830,"_source_registry_name":"default","contributors":[]},"0.6.4":{"name":"@flyfish-dev/cad-viewer","version":"0.6.4","description":"A production-oriented lightweight frontend CAD viewer for DWG, DXF, DWF, DWFx and XPS, built with TypeScript, worker-backed DWG WebAssembly parsing, native dwf-viewer integration, WebGL 2D/3D rendering and Canvas overlays.","type":"module","license":"AGPL-3.0-only","author":{"name":"Yu Wang"},"homepage":"https://cad-viewer-iys.pages.dev","repository":{"type":"git","url":"git+https://github.com/flyfish-dev/cad-viewer.git"},"bugs":{"url":"https://github.com/flyfish-dev/cad-viewer/issues"},"keywords":["cad","dwg","dxf","dwf","dwfx","xps","autocad","viewer","canvas","typescript","frontend","libredwg","web-worker","wasm","webgl","gpu","cad-viewer","w2d","w3d","dwf-viewer"],"sideEffects":["*.css","./dist/style.css","./src/styles.css","./demo/styles.css"],"main":"./dist/cad-viewer.umd.cjs","module":"./dist/cad-viewer.es.js","types":"./dist/types/index.d.ts","exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/cad-viewer.es.js","require":"./dist/cad-viewer.umd.cjs","default":"./dist/cad-viewer.es.js"},"./styles.css":"./dist/style.css","./package.json":"./package.json","./style.css":"./dist/style.css","./wasm/libredwg-web.wasm":"./dist/wasm/libredwg-web.wasm","./wasm/libredwg-web.js":"./dist/wasm/libredwg-web.js","./wasm/dwg-worker.js":"./dist/wasm/dwg-worker.js","./dist/index.js":"./dist/index.js","./dist/index.d.ts":"./dist/index.d.ts","./wasm/dwfv-render.wasm":"./dist/wasm/dwfv-render.wasm"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"engines":{"node":">=20.19.0"},"scripts":{"clean":"node ./scripts/clean.cjs","copy:wasm":"node ./scripts/copy-libredwg-wasm.cjs","copy:worker":"node ./scripts/copy-worker-asset.cjs","dev":"npm run copy:wasm && npm run build:worker && npm run copy:worker && vite --config vite.config.ts --host 0.0.0.0","typecheck":"tsc -p tsconfig.json --noEmit","build:types":"tsc -p tsconfig.build.json","build:worker":"vite build --config vite.worker.config.ts","build:lib":"npm run copy:wasm && vite build --config vite.lib.config.ts && npm run build:worker && npm run build:types && npm run build:assets","build:demo":"npm run copy:wasm && npm run build:worker && npm run copy:worker && vite build --config vite.config.ts","build":"npm run clean && npm run typecheck && npm run build:lib && npm run build:demo","preview":"npm run build:demo && vite preview --config vite.config.ts --host 0.0.0.0","pack:dry":"npm pack --dry-run","release:npm":"npm publish --access public --auth-type=web","pages:dev":"npm run build:demo && wrangler pages dev dist-demo","deploy:pages":"npm run build:demo && wrangler pages deploy dist-demo --project-name cad-viewer","prepublishOnly":"npm run clean && npm run typecheck && npm run build:lib && npm run pack:dry","build:worker-check":"npm run typecheck && npm run build:demo","check:wasm":"node ./scripts/check-wasm.cjs","build:assets":"node ./scripts/copy-dist-assets.cjs","preview:demo":"npm run preview"},"dependencies":{"@mlightcad/libredwg-web":"^0.7.2","dwf-viewer":"^0.6.4","dxf-parser":"^1.1.2"},"devDependencies":{"@types/node":"^20.14.12","typescript":"^5.8.3","vite":"^5.4.11","wrangler":"^4.20.0"},"gitHead":"f9c0bb1235aa79336e17811eead559e72b27872a","_id":"@flyfish-dev/cad-viewer@0.6.4","_nodeVersion":"26.0.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-9GiILTzBfkyACcd65rSYiN9CMhoXzn1Bh9pvwaSMcWAHCkJoAx/xN1wP3M+z2KFtFVGqfipA1SmnPRVZIXaAow==","shasum":"f455f706e41d665987f5f5f67535eb2140673f86","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@flyfish-dev/cad-viewer/-/cad-viewer-0.6.4.tgz","fileCount":57,"unpackedSize":8017880,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD6AnF3CCQNxCG/o9UkANbt07OwRKxMPY5uOQoq7Lvk5gIgTXkH2wE+00OvkA1TJ34zGc/BDz707wVsnNLSK5qlYSk="}],"size":2049819},"_npmUser":{"name":"anonymous","email":"wybaby168@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"wybaby168@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cad-viewer_0.6.4_1781494721107_0.8077480719551351"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-06-15T03:38:41.338Z","publish_time":1781494721338,"_source_registry_name":"default","contributors":[]},"0.6.5":{"name":"@flyfish-dev/cad-viewer","version":"0.6.5","description":"A production-oriented lightweight frontend CAD viewer for DWG, DXF, DWF, DWFx and XPS, built with TypeScript, worker-backed DWG WebAssembly parsing, native dwf-viewer integration, WebGL 2D/3D rendering and Canvas overlays.","type":"module","license":"AGPL-3.0-only","author":{"name":"Yu Wang"},"homepage":"https://cad-viewer-iys.pages.dev","repository":{"type":"git","url":"git+https://github.com/flyfish-dev/cad-viewer.git"},"bugs":{"url":"https://github.com/flyfish-dev/cad-viewer/issues"},"keywords":["cad","dwg","dxf","dwf","dwfx","xps","autocad","viewer","canvas","typescript","frontend","libredwg","web-worker","wasm","webgl","gpu","cad-viewer","w2d","w3d","dwf-viewer"],"sideEffects":["*.css","./dist/style.css","./src/styles.css","./demo/styles.css"],"main":"./dist/cad-viewer.umd.cjs","module":"./dist/cad-viewer.es.js","types":"./dist/types/index.d.ts","exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/cad-viewer.es.js","require":"./dist/cad-viewer.umd.cjs","default":"./dist/cad-viewer.es.js"},"./styles.css":"./dist/style.css","./package.json":"./package.json","./style.css":"./dist/style.css","./wasm/libredwg-web.wasm":"./dist/wasm/libredwg-web.wasm","./wasm/libredwg-web.js":"./dist/wasm/libredwg-web.js","./wasm/dwg-worker.js":"./dist/wasm/dwg-worker.js","./dist/index.js":"./dist/index.js","./dist/index.d.ts":"./dist/index.d.ts","./wasm/dwfv-render.wasm":"./dist/wasm/dwfv-render.wasm"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"engines":{"node":">=20.19.0"},"scripts":{"clean":"node ./scripts/clean.cjs","copy:wasm":"node ./scripts/copy-libredwg-wasm.cjs","copy:worker":"node ./scripts/copy-worker-asset.cjs","dev":"npm run copy:wasm && npm run build:worker && npm run copy:worker && vite --config vite.config.ts --host 0.0.0.0","typecheck":"tsc -p tsconfig.json --noEmit","test":"npm run test:regression","test:regression":"npm run build:lib && node --test test/*.test.mjs","build:types":"tsc -p tsconfig.build.json","build:worker":"vite build --config vite.worker.config.ts","build:lib":"npm run copy:wasm && vite build --config vite.lib.config.ts && npm run build:worker && npm run build:types && npm run build:assets","build:demo":"npm run copy:wasm && npm run build:worker && npm run copy:worker && vite build --config vite.config.ts","build":"npm run clean && npm run typecheck && npm run build:lib && npm run build:demo","preview":"npm run build:demo && vite preview --config vite.config.ts --host 0.0.0.0","pack:dry":"npm pack --dry-run","release:npm":"npm publish --access public --auth-type=web","pages:dev":"npm run build:demo && wrangler pages dev dist-demo","deploy:pages":"npm run build:demo && wrangler pages deploy dist-demo --project-name cad-viewer","prepublishOnly":"npm run clean && npm run typecheck && npm run build:lib && node --test test/*.test.mjs && npm run pack:dry","build:worker-check":"npm run typecheck && npm run build:demo","check:wasm":"node ./scripts/check-wasm.cjs","build:assets":"node ./scripts/copy-dist-assets.cjs","preview:demo":"npm run preview"},"dependencies":{"@mlightcad/libredwg-web":"^0.7.2","dwf-viewer":"^0.6.4","dxf-parser":"^1.1.2"},"devDependencies":{"@types/node":"^20.14.12","typescript":"^5.8.3","vite":"^5.4.11","wrangler":"^4.20.0"},"gitHead":"3d26fb5ed42bcea6ea5fd54718d04823383a1c96","_id":"@flyfish-dev/cad-viewer@0.6.5","_nodeVersion":"26.0.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-FAkk1+yBAv43zmVjvPUtjnvvT2xY2OMwH+Af7DnheUU5QzpljWeycx1Gp+HIYiqm65u+QI9dx2O5Rq5GshkfIQ==","shasum":"29c64d30c8742e12c07fbc74347d2a1c8ef590bc","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@flyfish-dev/cad-viewer/-/cad-viewer-0.6.5.tgz","fileCount":61,"unpackedSize":8212809,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDh2iVMo8Kw2nVlKEoNj91/UHkEgg5kYHc4cyRu/cz1xQIgW1NUXZu2noQ8Zr6Z+bV68jM72ajDiUmIjcIij/d8wT0="}],"size":2104682},"_npmUser":{"name":"anonymous","email":"wybaby168@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"wybaby168@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cad-viewer_0.6.5_1784096317012_0.38214259568309683"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-07-15T06:18:37.206Z","publish_time":1784096317206,"_source_registry_name":"default","contributors":[]},"0.6.6":{"name":"@flyfish-dev/cad-viewer","version":"0.6.6","description":"A production-oriented lightweight frontend CAD viewer for DWG, DXF, DWF, DWFx and XPS, built with TypeScript, worker-backed DWG WebAssembly parsing, native dwf-viewer integration, WebGL 2D/3D rendering and Canvas overlays.","type":"module","license":"AGPL-3.0-only","author":{"name":"Yu Wang"},"homepage":"https://cad-viewer-iys.pages.dev","repository":{"type":"git","url":"git+https://github.com/flyfish-dev/cad-viewer.git"},"bugs":{"url":"https://github.com/flyfish-dev/cad-viewer/issues"},"keywords":["cad","dwg","dxf","dwf","dwfx","xps","autocad","viewer","canvas","typescript","frontend","libredwg","web-worker","wasm","webgl","gpu","cad-viewer","w2d","w3d","dwf-viewer"],"sideEffects":["*.css","./dist/style.css","./src/styles.css","./demo/styles.css"],"main":"./dist/cad-viewer.umd.cjs","module":"./dist/cad-viewer.es.js","types":"./dist/types/index.d.ts","exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/cad-viewer.es.js","require":"./dist/cad-viewer.umd.cjs","default":"./dist/cad-viewer.es.js"},"./styles.css":"./dist/style.css","./package.json":"./package.json","./style.css":"./dist/style.css","./wasm/libredwg-web.wasm":"./dist/wasm/libredwg-web.wasm","./wasm/libredwg-web.js":"./dist/wasm/libredwg-web.js","./wasm/dwg-worker.js":"./dist/wasm/dwg-worker.js","./dist/index.js":"./dist/index.js","./dist/index.d.ts":"./dist/index.d.ts","./wasm/dwfv-render.wasm":"./dist/wasm/dwfv-render.wasm"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"engines":{"node":">=20.19.0"},"scripts":{"clean":"node ./scripts/clean.cjs","copy:wasm":"node ./scripts/copy-libredwg-wasm.cjs","copy:worker":"node ./scripts/copy-worker-asset.cjs","dev":"npm run copy:wasm && npm run build:worker && npm run copy:worker && vite --config vite.config.ts --host 0.0.0.0","typecheck":"tsc -p tsconfig.json --noEmit","test":"npm run test:regression","test:regression":"npm run build:lib && node --test test/*.test.mjs","build:types":"tsc -p tsconfig.build.json","build:worker":"vite build --config vite.worker.config.ts","build:lib":"npm run copy:wasm && vite build --config vite.lib.config.ts && npm run build:worker && npm run build:types && npm run build:assets","build:demo":"npm run copy:wasm && npm run build:worker && npm run copy:worker && vite build --config vite.config.ts","build":"npm run clean && npm run typecheck && npm run build:lib && npm run build:demo","preview":"npm run build:demo && vite preview --config vite.config.ts --host 0.0.0.0","pack:dry":"npm pack --dry-run","release:npm":"npm publish --access public --auth-type=web","pages:dev":"npm run build:demo && wrangler pages dev dist-demo","deploy:pages":"npm run build:demo && wrangler pages deploy dist-demo --project-name cad-viewer","prepublishOnly":"npm run clean && npm run typecheck && npm run build:lib && node --test test/*.test.mjs && npm run pack:dry","build:worker-check":"npm run typecheck && npm run build:demo","check:wasm":"node ./scripts/check-wasm.cjs","build:assets":"node ./scripts/copy-dist-assets.cjs","preview:demo":"npm run preview"},"dependencies":{"@mlightcad/libredwg-web":"^0.7.2","dwf-viewer":"^0.6.4","dxf-parser":"^1.1.2"},"devDependencies":{"@types/node":"^20.14.12","typescript":"^5.8.3","vite":"^5.4.11","wrangler":"^4.20.0"},"gitHead":"97090d9b49650197ab3f7df2c721ddab85adf29d","_id":"@flyfish-dev/cad-viewer@0.6.6","_nodeVersion":"26.0.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-uONOYBssD2Km0eQUCiA3u7ZzuWsQV04cH7wiPuw6hp38jLz1a2KX0ZvmPjnJwUu0/F4K6oCyD8v0Gb6PU2b5tQ==","shasum":"15bd9cf0ed3608db444bb1157bcca2d388728f0e","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@flyfish-dev/cad-viewer/-/cad-viewer-0.6.6.tgz","fileCount":63,"unpackedSize":8229507,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCHuzZEokjGGIuTl8GKirWowGlT5hNovpfAaJTb2zWnQgIgZ5Lrso4o7RTSw7CHLAv3V0fMIoL52WNIdfzUlivBkVk="}],"size":2107345},"_npmUser":{"name":"anonymous","email":"wybaby168@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"wybaby168@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cad-viewer_0.6.6_1784098670439_0.6660852477571866"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-07-15T06:57:50.632Z","publish_time":1784098670632,"_source_registry_name":"default","contributors":[]},"0.7.0":{"name":"@flyfish-dev/cad-viewer","version":"0.7.0","description":"A production-oriented browser CAD viewer for DWG, DXF, DWF, DWFx and XPS with worker-backed LibreDWG WASM, WebGL/Canvas rendering, external SHX references and native DWF support.","type":"module","license":"AGPL-3.0-only","author":{"name":"Yu Wang"},"homepage":"https://cad-viewer-iys.pages.dev","repository":{"type":"git","url":"git+https://github.com/flyfish-dev/cad-viewer.git"},"bugs":{"url":"https://github.com/flyfish-dev/cad-viewer/issues"},"keywords":["cad","dwg","dxf","dwf","dwfx","xps","autocad","viewer","canvas","typescript","frontend","libredwg","shx","linetype","web-worker","wasm","webgl","gpu","cad-viewer","w2d","w3d","dwf-viewer"],"sideEffects":["*.css","./dist/style.css","./src/styles.css","./demo/styles.css"],"main":"./dist/cad-viewer.umd.cjs","module":"./dist/cad-viewer.es.js","types":"./dist/types/index.d.ts","exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/cad-viewer.es.js","require":"./dist/cad-viewer.umd.cjs","default":"./dist/cad-viewer.es.js"},"./styles.css":"./dist/style.css","./package.json":"./package.json","./style.css":"./dist/style.css","./wasm/libredwg-web.wasm":"./dist/wasm/libredwg-web.wasm","./wasm/libredwg-web.js":"./dist/wasm/libredwg-web.js","./wasm/dwg-worker.js":"./dist/wasm/dwg-worker.js","./dist/index.js":"./dist/index.js","./dist/index.d.ts":"./dist/index.d.ts","./wasm/dwfv-render.wasm":"./dist/wasm/dwfv-render.wasm"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"engines":{"node":">=20.19.0"},"scripts":{"clean":"node ./scripts/clean.cjs","copy:wasm":"node ./scripts/copy-libredwg-wasm.cjs","copy:worker":"node ./scripts/copy-worker-asset.cjs","dev":"npm run copy:wasm && npm run build:worker && npm run copy:worker && vite --config vite.config.ts --host 0.0.0.0","typecheck":"tsc -p tsconfig.json --noEmit","test":"npm run test:regression","test:regression":"npm run build:lib && node --test test/*.test.mjs","build:types":"tsc -p tsconfig.build.json","build:worker":"vite build --config vite.worker.config.ts","build:lib":"npm run copy:wasm && vite build --config vite.lib.config.ts && npm run build:worker && npm run build:types && npm run build:assets","build:demo":"npm run copy:wasm && npm run build:worker && npm run copy:worker && vite build --config vite.config.ts","build":"npm run clean && npm run typecheck && npm run build:lib && npm run build:demo","preview":"npm run build:demo && vite preview --config vite.config.ts --host 0.0.0.0","pack:dry":"npm pack --dry-run","release:npm":"npm publish --access public --auth-type=web","pages:dev":"npm run build:demo && wrangler pages dev dist-demo","deploy:pages":"npm run build:demo && wrangler pages deploy dist-demo --project-name cad-viewer","prepublishOnly":"npm run clean && npm run typecheck && npm run build:lib && node --test test/*.test.mjs && npm run pack:dry","build:worker-check":"npm run typecheck && npm run build:demo","check:wasm":"node ./scripts/check-wasm.cjs","build:assets":"node ./scripts/copy-dist-assets.cjs","preview:demo":"npm run preview"},"dependencies":{"@mlightcad/libredwg-web":"^0.7.2","@mlightcad/shx-parser":"^1.4.5","dwf-viewer":"^0.6.4","dxf-parser":"^1.1.2"},"devDependencies":{"@types/node":"^20.14.12","typescript":"^5.8.3","vite":"^5.4.11","wrangler":"^4.20.0"},"gitHead":"d43b4c1b38d252b9df6baaea9fd3461dc118bd11","_id":"@flyfish-dev/cad-viewer@0.7.0","_nodeVersion":"26.0.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-7O9SBWzflo1zz7DpxiYiZrKxc331LY3gCYU2PjIVmAfTPKKCZCVsAEdb/VurnqbXJKMcHTxkpbkEaJgxWmjLLg==","shasum":"b5291ccd2e4ac5101ffc4c44b59eb2b40c617f16","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@flyfish-dev/cad-viewer/-/cad-viewer-0.7.0.tgz","fileCount":65,"unpackedSize":8677973,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAPJWM5nnN1n8Nnuv5RoIXHEjXyP7ch0gxFCbE/YA9QGAiAhGjwutnxxkzYO9qcGFeznlKCjCZHayMSxAahkpHh/wA=="}],"size":2225644},"_npmUser":{"name":"anonymous","email":"wybaby168@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"wybaby168@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cad-viewer_0.7.0_1784166834689_0.8275084971647675"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-07-16T01:53:54.909Z","publish_time":1784166834909,"_source_registry_name":"default","contributors":[]},"0.8.0":{"name":"@flyfish-dev/cad-viewer","version":"0.8.0","description":"A production-oriented browser CAD viewer for DWG, DXF, DWF, DWFx and XPS with worker-backed LibreDWG WASM, WebGL/Canvas rendering, external SHX references and native DWF support.","type":"module","license":"AGPL-3.0-only","author":{"name":"Yu Wang"},"homepage":"https://cad-viewer-iys.pages.dev","repository":{"type":"git","url":"git+https://github.com/flyfish-dev/cad-viewer.git"},"bugs":{"url":"https://github.com/flyfish-dev/cad-viewer/issues"},"keywords":["cad","dwg","dxf","dwf","dwfx","xps","autocad","viewer","canvas","typescript","frontend","libredwg","shx","linetype","web-worker","wasm","webgl","gpu","cad-viewer","w2d","w3d","dwf-viewer"],"sideEffects":["*.css","./dist/style.css","./src/styles.css","./demo/styles.css"],"main":"./dist/cad-viewer.umd.cjs","module":"./dist/cad-viewer.es.js","types":"./dist/types/index.d.ts","exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/cad-viewer.es.js","require":"./dist/cad-viewer.umd.cjs","default":"./dist/cad-viewer.es.js"},"./styles.css":"./dist/style.css","./package.json":"./package.json","./style.css":"./dist/style.css","./wasm/libredwg-web.wasm":"./dist/wasm/libredwg-web.wasm","./wasm/libredwg-web.js":"./dist/wasm/libredwg-web.js","./wasm/dwg-worker.js":"./dist/wasm/dwg-worker.js","./dist/index.js":"./dist/index.js","./dist/index.d.ts":"./dist/index.d.ts","./wasm/dwfv-render.wasm":"./dist/wasm/dwfv-render.wasm"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"engines":{"node":">=20.19.0"},"scripts":{"clean":"node ./scripts/clean.cjs","copy:wasm":"node ./scripts/copy-libredwg-wasm.cjs","copy:worker":"node ./scripts/copy-worker-asset.cjs","dev":"npm run copy:wasm && npm run build:worker && npm run copy:worker && vite --config vite.config.ts --host 0.0.0.0","typecheck":"tsc -p tsconfig.json --noEmit","test":"npm run test:regression","test:regression":"npm run build:lib && node --test test/*.test.mjs","build:types":"tsc -p tsconfig.build.json","build:worker":"vite build --config vite.worker.config.ts","build:lib":"npm run copy:wasm && vite build --config vite.lib.config.ts && npm run build:worker && npm run build:types && npm run build:assets","build:demo":"npm run copy:wasm && npm run build:worker && npm run copy:worker && vite build --config vite.config.ts","build":"npm run clean && npm run typecheck && npm run build:lib && npm run build:demo","preview":"npm run build:demo && vite preview --config vite.config.ts --host 0.0.0.0","pack:dry":"npm pack --dry-run","release:npm":"npm publish --access public --auth-type=web","pages:dev":"npm run build:demo && wrangler pages dev dist-demo","deploy:pages":"npm run build:demo && wrangler pages deploy dist-demo --project-name cad-viewer","prepublishOnly":"npm run clean && npm run typecheck && npm run build:lib && node --test test/*.test.mjs && npm run pack:dry","build:worker-check":"npm run typecheck && npm run build:demo","check:wasm":"node ./scripts/check-wasm.cjs","build:assets":"node ./scripts/copy-dist-assets.cjs","preview:demo":"npm run preview"},"dependencies":{"@mlightcad/libredwg-web":"0.7.9","@mlightcad/shx-parser":"^1.4.5","dwf-viewer":"^0.6.4","dxf-parser":"^1.1.2"},"devDependencies":{"@types/node":"^20.14.12","typescript":"^5.8.3","vite":"^5.4.11","wrangler":"^4.20.0"},"gitHead":"2f2861e7831ef42667d6928284f5227cd62ba010","_id":"@flyfish-dev/cad-viewer@0.8.0","_nodeVersion":"26.0.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-oBhcDZ93UlkPPCCtaki3Nskfv6amE+4MnD/sTosE+e9Wv8vX/c2Z7V9aiInIDeI49YFfj6nqS1pj6zNgchkOxw==","shasum":"416cd5a0406c7e07b12d8f5bbfd32b45a3484d9c","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@flyfish-dev/cad-viewer/-/cad-viewer-0.8.0.tgz","fileCount":69,"unpackedSize":13061105,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGO2sYywyU7Jts9y74RZYlnP+e0W9ifRZWblbpGy/FbnAiEA78hR9Ha67cu2u7d+s5TKsqNufsbzyJ9x9h3uEn1Vk5s="}],"size":3029316},"_npmUser":{"name":"anonymous","email":"wybaby168@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"wybaby168@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cad-viewer_0.8.0_1784700914927_0.29624347141200746"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-07-22T06:15:15.136Z","publish_time":1784700915136,"_source_registry_name":"default","contributors":[]},"0.8.1":{"name":"@flyfish-dev/cad-viewer","version":"0.8.1","description":"A production-oriented browser CAD viewer for DWG, DXF, DWF, DWFx and XPS with worker-backed LibreDWG WASM, WebGL/Canvas rendering, external SHX references and native DWF support.","type":"module","license":"AGPL-3.0-only","author":{"name":"Yu Wang"},"homepage":"https://cad-viewer-iys.pages.dev","repository":{"type":"git","url":"git+https://github.com/flyfish-dev/cad-viewer.git"},"bugs":{"url":"https://github.com/flyfish-dev/cad-viewer/issues"},"keywords":["cad","dwg","dxf","dwf","dwfx","xps","autocad","viewer","canvas","typescript","frontend","libredwg","shx","linetype","web-worker","wasm","webgl","gpu","cad-viewer","w2d","w3d","dwf-viewer"],"sideEffects":["*.css","./dist/style.css","./src/styles.css","./demo/styles.css"],"main":"./dist/cad-viewer.umd.cjs","module":"./dist/cad-viewer.es.js","types":"./dist/types/index.d.ts","exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/cad-viewer.es.js","require":"./dist/cad-viewer.umd.cjs","default":"./dist/cad-viewer.es.js"},"./styles.css":"./dist/style.css","./package.json":"./package.json","./style.css":"./dist/style.css","./wasm/libredwg-web.wasm":"./dist/wasm/libredwg-web.wasm","./wasm/libredwg-web.js":"./dist/wasm/libredwg-web.js","./wasm/dwg-worker.js":"./dist/wasm/dwg-worker.js","./dist/index.js":"./dist/index.js","./dist/index.d.ts":"./dist/index.d.ts","./wasm/dwfv-render.wasm":"./dist/wasm/dwfv-render.wasm"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"engines":{"node":">=20.19.0"},"scripts":{"clean":"node ./scripts/clean.cjs","copy:wasm":"node ./scripts/copy-libredwg-wasm.cjs","copy:worker":"node ./scripts/copy-worker-asset.cjs","dev":"npm run copy:wasm && npm run build:worker && npm run copy:worker && vite --config vite.config.ts --host 0.0.0.0","typecheck":"tsc -p tsconfig.json --noEmit","test":"npm run test:regression","test:regression":"npm run build:lib && node --test test/*.test.mjs","build:types":"tsc -p tsconfig.build.json","build:worker":"vite build --config vite.worker.config.ts","build:lib":"npm run copy:wasm && vite build --config vite.lib.config.ts && npm run build:worker && npm run build:types && npm run build:assets","build:demo":"npm run copy:wasm && npm run build:worker && npm run copy:worker && vite build --config vite.config.ts","build":"npm run clean && npm run typecheck && npm run build:lib && npm run build:demo","preview":"npm run build:demo && vite preview --config vite.config.ts --host 0.0.0.0","pack:dry":"npm pack --dry-run","release:npm":"npm publish --access public --auth-type=web","pages:dev":"npm run build:demo && wrangler pages dev dist-demo","deploy:pages":"npm run build:demo && wrangler pages deploy dist-demo --project-name cad-viewer","prepublishOnly":"npm run clean && npm run typecheck && npm run build:lib && node --test test/*.test.mjs && npm run pack:dry","build:worker-check":"npm run typecheck && npm run build:demo","check:wasm":"node ./scripts/check-wasm.cjs","build:assets":"node ./scripts/copy-dist-assets.cjs","preview:demo":"npm run preview"},"dependencies":{"@mlightcad/libredwg-web":"0.7.9","@mlightcad/shx-parser":"^1.4.5","dwf-viewer":"^0.6.6","dxf-parser":"^1.1.2"},"devDependencies":{"@types/node":"^20.14.12","typescript":"^5.8.3","vite":"^5.4.11","wrangler":"^4.20.0"},"gitHead":"ca73b1084238a4c96613409491ee696a1344f6fa","_id":"@flyfish-dev/cad-viewer@0.8.1","_nodeVersion":"24.20.0","_npmVersion":"11.19.0","dist":{"integrity":"sha512-jdUqHZVdQzgAgX2N8iakkUIKyHMfrUVjk4P1WrUYijzXj6g3s1YcFKTr9K847JuA3JYNmjRaHjIhD/MIJifGLQ==","shasum":"5cbb8ff5fec2293345c75f1cf5bcf8ef545be217","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@flyfish-dev/cad-viewer/-/cad-viewer-0.8.1.tgz","fileCount":71,"unpackedSize":13091016,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFBR8p9oQ3lnLb9zBIfr772vL4M4i6G207j3sdOI0+RFAiB5kE5lZppVk2aPw39TG6eIgi2VwhzlXHCcwtq+CFljDA=="}],"size":3049672},"_npmUser":{"name":"anonymous","email":"wybaby168@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"wybaby168@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cad-viewer_0.8.1_1788597996139_0.24873166589929507"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-09-05T08:46:36.346Z","publish_time":1788597996346,"_source_registry_name":"default","contributors":[]},"0.8.2":{"name":"@flyfish-dev/cad-viewer","version":"0.8.2","description":"A production-oriented browser CAD viewer for DWG, DXF, DWF, DWFx and XPS with worker-backed LibreDWG WASM, WebGL/Canvas rendering, external SHX references and native DWF support.","type":"module","license":"AGPL-3.0-only","author":{"name":"Yu Wang"},"homepage":"https://cad-viewer-iys.pages.dev","repository":{"type":"git","url":"git+https://github.com/flyfish-dev/cad-viewer.git"},"bugs":{"url":"https://github.com/flyfish-dev/cad-viewer/issues"},"keywords":["cad","dwg","dxf","dwf","dwfx","xps","autocad","viewer","canvas","typescript","frontend","libredwg","shx","linetype","web-worker","wasm","webgl","gpu","cad-viewer","w2d","w3d","dwf-viewer"],"sideEffects":["*.css","./dist/style.css","./src/styles.css","./demo/styles.css"],"main":"./dist/cad-viewer.umd.cjs","module":"./dist/cad-viewer.es.js","types":"./dist/types/index.d.ts","exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/cad-viewer.es.js","require":"./dist/cad-viewer.umd.cjs","default":"./dist/cad-viewer.es.js"},"./styles.css":"./dist/style.css","./package.json":"./package.json","./style.css":"./dist/style.css","./wasm/libredwg-web.wasm":"./dist/wasm/libredwg-web.wasm","./wasm/libredwg-web.js":"./dist/wasm/libredwg-web.js","./wasm/dwg-worker.js":"./dist/wasm/dwg-worker.js","./dist/index.js":"./dist/index.js","./dist/index.d.ts":"./dist/index.d.ts","./wasm/dwfv-render.wasm":"./dist/wasm/dwfv-render.wasm"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"engines":{"node":">=20.19.0"},"scripts":{"clean":"node ./scripts/clean.cjs","copy:wasm":"node ./scripts/copy-libredwg-wasm.cjs","copy:worker":"node ./scripts/copy-worker-asset.cjs","dev":"npm run copy:wasm && npm run build:worker && npm run copy:worker && vite --config vite.config.ts --host 0.0.0.0","typecheck":"tsc -p tsconfig.json --noEmit","test":"npm run test:regression","test:regression":"npm run build:lib && node --test test/*.test.mjs","build:types":"tsc -p tsconfig.build.json","build:worker":"vite build --config vite.worker.config.ts","build:lib":"npm run copy:wasm && vite build --config vite.lib.config.ts && npm run build:worker && npm run build:types && npm run build:assets","build:demo":"npm run copy:wasm && npm run build:worker && npm run copy:worker && vite build --config vite.config.ts","build":"npm run clean && npm run typecheck && npm run build:lib && npm run build:demo","preview":"npm run build:demo && vite preview --config vite.config.ts --host 0.0.0.0","pack:dry":"npm pack --dry-run","release:npm":"npm publish --access public --auth-type=web","pages:dev":"npm run build:demo && wrangler pages dev dist-demo","deploy:pages":"npm run build:demo && wrangler pages deploy dist-demo --project-name cad-viewer","prepublishOnly":"npm run clean && npm run typecheck && npm run build:lib && node --test test/*.test.mjs && npm run pack:dry","build:worker-check":"npm run typecheck && npm run build:demo","check:wasm":"node ./scripts/check-wasm.cjs","build:assets":"node ./scripts/copy-dist-assets.cjs","preview:demo":"npm run preview"},"dependencies":{"@mlightcad/libredwg-web":"0.7.9","@mlightcad/shx-parser":"^1.4.5","dwf-viewer":"^0.6.7","dxf-parser":"^1.1.2"},"devDependencies":{"@types/node":"^20.14.12","typescript":"^5.8.3","vite":"^7.3.6","wrangler":"^4.129.1"},"_id":"@flyfish-dev/cad-viewer@0.8.2","_integrity":"sha512-GWOFPC741e4BEGWjWN2AuYxA6MJb0LFrRIw51BZPuZ1nv8O4GwHC+hDZ0Vm284QqJNLnfGm1LVEazTC8lY1BAw==","_resolved":"/private/tmp/fv-release-3.0.3/.release/launch-3.0.3/npm-release--flyfish-dev-cad-viewer-0.8.2/flyfish-dev-cad-viewer-0.8.2.tgz","_from":"file:/private/tmp/fv-release-3.0.3/.release/launch-3.0.3/npm-release--flyfish-dev-cad-viewer-0.8.2/flyfish-dev-cad-viewer-0.8.2.tgz","_nodeVersion":"24.20.0","_npmVersion":"11.19.0","dist":{"integrity":"sha512-GWOFPC741e4BEGWjWN2AuYxA6MJb0LFrRIw51BZPuZ1nv8O4GwHC+hDZ0Vm284QqJNLnfGm1LVEazTC8lY1BAw==","shasum":"eb7ed3e63670e07b76516a4a5e13d2300b99a8f2","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@flyfish-dev/cad-viewer/-/cad-viewer-0.8.2.tgz","fileCount":73,"unpackedSize":13174026,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDsJbcDjg7leEGPB/rYIXjyc6Q6+hPDrb/tfF7m8eduaAIgMnv853p4O2551xgomi6KjJ7S+nJiHrpx/ldMI3VwZz0="}],"size":3080172},"_npmUser":{"name":"anonymous","email":"wybaby168@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"wybaby168@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cad-viewer_0.8.2_1788878973283_0.1808609479968406"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-09-08T14:49:33.475Z","publish_time":1788878973475,"_source_registry_name":"default","contributors":[]},"0.8.3":{"_id":"@flyfish-dev/cad-viewer@0.8.3","bugs":{"url":"https://github.com/flyfish-dev/cad-viewer/issues"},"dist":{"shasum":"3c1ab3554de9991fa7eee6050a69f0553153f991","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@flyfish-dev/cad-viewer/-/cad-viewer-0.8.3.tgz","fileCount":75,"integrity":"sha512-HR2+Rt3Pb17QpmzOwz5lG87vamwoYcRrKaeRT+CBvJgK350z3qAV9VtAe2kt0XZjrTLTKYAglGBTjGY0IgDDPg==","signatures":[{"sig":"MEYCIQDlAErIgfA4MmhgenGNa0LjltJmIs+gFuO6Vw4PsHzohgIhAJ+W/FR2fpneTf7lmXwraCYQpTSURw4BytL3wZIKQFY8","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICUzlqJ96GkJzmIEeNCJ8u9Vz0MYK6U+DJJ8euqVTMTjAiEArqRFV3D9LU2NuP8L2AXBfHr1R35RxfFfevNcNH5OxSs="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@flyfish-dev%2fcad-viewer@0.8.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":13174974,"size":3080395},"main":"./dist/cad-viewer.umd.cjs","name":"@flyfish-dev/cad-viewer","type":"module","_from":"file:/home/runner/work/_temp/npm-release--flyfish-dev-cad-viewer-0.8.3/flyfish-dev-cad-viewer-0.8.3.tgz","types":"./dist/types/index.d.ts","author":{"name":"Yu Wang"},"module":"./dist/cad-viewer.es.js","engines":{"node":">=20.19.0"},"exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/cad-viewer.es.js","default":"./dist/cad-viewer.es.js","require":"./dist/cad-viewer.umd.cjs"},"./style.css":"./dist/style.css","./styles.css":"./dist/style.css","./package.json":"./package.json","./dist/index.js":"./dist/index.js","./dist/index.d.ts":"./dist/index.d.ts","./wasm/dwg-worker.js":"./dist/wasm/dwg-worker.js","./wasm/libredwg-web.js":"./dist/wasm/libredwg-web.js","./wasm/dwfv-render.wasm":"./dist/wasm/dwfv-render.wasm","./wasm/libredwg-web.wasm":"./dist/wasm/libredwg-web.wasm"},"license":"AGPL-3.0-only","scripts":{"dev":"npm run copy:wasm && npm run build:worker && npm run copy:worker && vite --config vite.config.ts --host 0.0.0.0","test":"npm run test:regression","build":"npm run clean && npm run typecheck && npm run build:lib && npm run build:demo","clean":"node ./scripts/clean.cjs","preview":"npm run build:demo && vite preview --config vite.config.ts --host 0.0.0.0","pack:dry":"npm pack --dry-run","build:lib":"npm run copy:wasm && vite build --config vite.lib.config.ts && npm run build:worker && npm run build:types && npm run build:assets","copy:wasm":"node ./scripts/copy-libredwg-wasm.cjs","pages:dev":"npm run build:demo && wrangler pages dev dist-demo","typecheck":"tsc -p tsconfig.json --noEmit","build:demo":"npm run copy:wasm && npm run build:worker && npm run copy:worker && vite build --config vite.config.ts","check:wasm":"node ./scripts/check-wasm.cjs","build:types":"tsc -p tsconfig.build.json","copy:worker":"node ./scripts/copy-worker-asset.cjs","release:npm":"npm publish --access public --auth-type=web","build:assets":"node ./scripts/copy-dist-assets.cjs","build:worker":"vite build --config vite.worker.config.ts","deploy:pages":"npm run build:demo && wrangler pages deploy dist-demo --project-name cad-viewer","preview:demo":"npm run preview","prepublishOnly":"npm run clean && npm run typecheck && npm run build:lib && node --test test/*.test.mjs && npm run pack:dry","test:regression":"npm run build:lib && node --test test/*.test.mjs","build:worker-check":"npm run typecheck && npm run build:demo"},"version":"0.8.3","_npmUser":{"name":"anonymous","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"2c9c1d9e-c159-4266-b9c8-055974eb2c17"}},"homepage":"https://cad-viewer-iys.pages.dev","keywords":["cad","dwg","dxf","dwf","dwfx","xps","autocad","viewer","canvas","typescript","frontend","libredwg","shx","linetype","web-worker","wasm","webgl","gpu","cad-viewer","w2d","w3d","dwf-viewer"],"_resolved":"/home/runner/work/_temp/npm-release--flyfish-dev-cad-viewer-0.8.3/flyfish-dev-cad-viewer-0.8.3.tgz","_integrity":"sha512-HR2+Rt3Pb17QpmzOwz5lG87vamwoYcRrKaeRT+CBvJgK350z3qAV9VtAe2kt0XZjrTLTKYAglGBTjGY0IgDDPg==","repository":{"url":"git+https://github.com/flyfish-dev/cad-viewer.git","type":"git"},"_npmVersion":"11.19.0","description":"A production-oriented browser CAD viewer for DWG, DXF, DWF, DWFx and XPS with worker-backed LibreDWG WASM, WebGL/Canvas rendering, external SHX references and native DWF support.","directories":{},"maintainers":[{"name":"anonymous","email":"wybaby168@gmail.com"}],"sideEffects":["*.css","./dist/style.css","./src/styles.css","./demo/styles.css"],"_nodeVersion":"24.21.0","dependencies":{"dwf-viewer":"^0.6.7","dxf-parser":"^1.1.2","@mlightcad/shx-parser":"^1.4.5","@mlightcad/libredwg-web":"0.7.9"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^7.3.6","wrangler":"^4.129.1","typescript":"^5.8.3","@types/node":"^20.14.12"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cad-viewer_0.8.3_1791681117745_0.8779290737500294"},"_cnpmcore_publish_time":"2026-10-11T01:11:57.924Z","publish_time":1791681117924,"_source_registry_name":"default","contributors":[]},"0.8.4":{"_id":"@flyfish-dev/cad-viewer@0.8.4","bugs":{"url":"https://github.com/flyfish-dev/cad-viewer/issues"},"dist":{"shasum":"dfe14cec97e21c344e175cf51047eec1f2cf5bbd","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@flyfish-dev/cad-viewer/-/cad-viewer-0.8.4.tgz","fileCount":79,"integrity":"sha512-o95aj+Tvy79VRPVbp3xeeIYQs+EkGwNfWPXbPy5B1ZR9v4ISmA7q7IUuTN5Js28bktLStf7tGjMO889zkBogFA==","signatures":[{"sig":"MEUCIQDliDdJyPgPZ9ksOJLjK2+5QlBnw/MHct0mXulbrjMJDwIgMWlX0xBiZe1RV4Ppv6z7qGrg9DfrfIaKB9uAuZpxIvM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCpAqxtYHWPF2ZFF1od3aIMT1qLp0zIn0iIzS0E/QJP4wIhANToUO+FuTMOfWWIWq+MPcOwXdmakHfXwmdyP12R0/Z/"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@flyfish-dev%2fcad-viewer@0.8.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":13381749,"size":3144157},"main":"./dist/cad-viewer.umd.cjs","name":"@flyfish-dev/cad-viewer","type":"module","_from":"file:/home/runner/work/_temp/npm-release--flyfish-dev-cad-viewer-0.8.4/flyfish-dev-cad-viewer-0.8.4.tgz","types":"./dist/types/index.d.ts","author":{"name":"Yu Wang"},"module":"./dist/cad-viewer.es.js","engines":{"node":">=20.19.0"},"exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/cad-viewer.es.js","default":"./dist/cad-viewer.es.js","require":"./dist/cad-viewer.umd.cjs"},"./style.css":"./dist/style.css","./styles.css":"./dist/style.css","./package.json":"./package.json","./dist/index.js":"./dist/index.js","./dist/index.d.ts":"./dist/index.d.ts","./wasm/dwg-worker.js":"./dist/wasm/dwg-worker.js","./wasm/libredwg-web.js":"./dist/wasm/libredwg-web.js","./wasm/dwfv-render.wasm":"./dist/wasm/dwfv-render.wasm","./wasm/libredwg-web.wasm":"./dist/wasm/libredwg-web.wasm"},"license":"AGPL-3.0-only","scripts":{"dev":"npm run copy:wasm && npm run build:worker && npm run copy:worker && vite --config vite.config.ts --host 0.0.0.0","test":"npm run test:regression","build":"npm run clean && npm run typecheck && npm run build:lib && npm run build:demo","clean":"node ./scripts/clean.cjs","preview":"npm run build:demo && vite preview --config vite.config.ts --host 0.0.0.0","pack:dry":"npm pack --dry-run","build:lib":"npm run copy:wasm && vite build --config vite.lib.config.ts && npm run build:worker && npm run build:types && npm run build:assets","copy:wasm":"node ./scripts/copy-libredwg-wasm.cjs","pages:dev":"npm run build:demo && wrangler pages dev dist-demo","typecheck":"tsc -p tsconfig.json --noEmit","build:demo":"npm run copy:wasm && npm run build:worker && npm run copy:worker && vite build --config vite.config.ts","check:wasm":"node ./scripts/check-wasm.cjs","build:types":"tsc -p tsconfig.build.json","copy:worker":"node ./scripts/copy-worker-asset.cjs","release:npm":"npm publish --access public --auth-type=web","build:assets":"node ./scripts/copy-dist-assets.cjs","build:worker":"vite build --config vite.worker.config.ts","deploy:pages":"npm run build:demo && wrangler pages deploy dist-demo --project-name cad-viewer","preview:demo":"npm run preview","prepublishOnly":"npm run clean && npm run typecheck && npm run build:lib && node --test test/*.test.mjs && npm run pack:dry","test:regression":"npm run build:lib && node --test test/*.test.mjs","build:worker-check":"npm run typecheck && npm run build:demo"},"version":"0.8.4","_npmUser":{"name":"anonymous","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"2c9c1d9e-c159-4266-b9c8-055974eb2c17"}},"homepage":"https://cad-viewer-iys.pages.dev","keywords":["cad","dwg","dxf","dwf","dwfx","xps","autocad","viewer","canvas","typescript","frontend","libredwg","shx","linetype","web-worker","wasm","webgl","gpu","cad-viewer","w2d","w3d","dwf-viewer"],"_resolved":"/home/runner/work/_temp/npm-release--flyfish-dev-cad-viewer-0.8.4/flyfish-dev-cad-viewer-0.8.4.tgz","_integrity":"sha512-o95aj+Tvy79VRPVbp3xeeIYQs+EkGwNfWPXbPy5B1ZR9v4ISmA7q7IUuTN5Js28bktLStf7tGjMO889zkBogFA==","repository":{"url":"git+https://github.com/flyfish-dev/cad-viewer.git","type":"git"},"_npmVersion":"11.19.1","description":"A production-oriented browser CAD viewer for DWG, DXF, DWF, DWFx and XPS with worker-backed LibreDWG WASM, WebGL/Canvas rendering, external SHX references and native DWF support.","directories":{},"maintainers":[{"name":"anonymous","email":"wybaby168@gmail.com"}],"sideEffects":["*.css","./dist/style.css","./src/styles.css","./demo/styles.css"],"_nodeVersion":"24.22.2","dependencies":{"dwf-viewer":"^0.6.8","dxf-parser":"^1.1.2","@mlightcad/shx-parser":"^1.4.5","@mlightcad/libredwg-web":"0.7.9"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^7.3.6","wrangler":"^4.129.1","typescript":"^5.8.3","@types/node":"^20.14.12"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cad-viewer_0.8.4_1795017773657_0.8870500105499324"},"_cnpmcore_publish_time":"2026-11-18T16:02:53.943Z","publish_time":1795017773943,"_source_registry_name":"default","contributors":[]}},"dist-tags":{"latest":"0.8.4"},"name":"@flyfish-dev/cad-viewer","time":{"created":"2026-06-12T00:58:06.479Z","modified":"2026-11-18T16:03:07.975Z","0.6.0":"2026-06-12T00:57:54.892Z","0.5.3":"2026-06-11T10:04:15.836Z","0.6.1":"2026-06-12T03:01:44.770Z","0.6.2":"2026-06-12T08:42:16.209Z","0.6.3":"2026-06-15T01:43:48.830Z","0.6.4":"2026-06-15T03:38:41.338Z","0.6.5":"2026-07-15T06:18:37.206Z","0.6.6":"2026-07-15T06:57:50.632Z","0.7.0":"2026-07-16T01:53:54.909Z","0.8.0":"2026-07-22T06:15:15.136Z","0.8.1":"2026-09-05T08:46:36.346Z","0.8.2":"2026-09-08T14:49:33.475Z","0.8.3":"2026-10-11T01:11:57.924Z","0.8.4":"2026-11-18T16:02:53.943Z"},"readme":"# @flyfish-dev/cad-viewer\n\nA professional, lightweight, extensible **frontend CAD viewer** for modern browsers.\n\n[![License: AGPL-3.0-only](https://img.shields.io/badge/license-AGPL--3.0--only-b31b1b.svg)](LICENSE)\n[![npm](https://img.shields.io/npm/v/@flyfish-dev/cad-viewer.svg)](https://www.npmjs.com/package/@flyfish-dev/cad-viewer)\n\n**Live demo:** [cad-viewer-iys.pages.dev](https://cad-viewer-iys.pages.dev)  \n**Source:** [github.com/flyfish-dev/cad-viewer](https://github.com/flyfish-dev/cad-viewer)\n\nThe project provides a clean loader architecture for **DWG**, **DXF**, **DWF**, **DWFx** and **XPS**. DWG/DXF are normalized into a common `CadDocument` and rendered through retained WebGL with a lightweight Canvas overlay; DWF/DWFx/XPS are delegated to the native `dwf-viewer` renderer for WebGL-accelerated W2D and XPS/DWFx vectors, W3D/HSF eModel geometry, embedded XPS fonts and optional WASM fallback. Files are read locally in the browser; the viewer does not upload drawings to a backend.\n\n> DWG support uses `@mlightcad/libredwg-web` / LibreDWG WebAssembly in a worker. DXF support uses JavaScript parsing plus a built-in fallback parser. DWF, DWFx and XPS support is powered by `dwf-viewer` 0.6.x, including DWF 6+ ZIP containers, WHIP/W2D 2D sheets, W3D/HSF 3D eModel geometry, DWFx/OPC/XPS pages, adaptive CAD line weights and an optional raster WASM fallback.\n\n## What changed in 0.8.0\n\n- Added typed BOM extraction for block attributes, `MINSERT` quantities, native tables, DataTable, XDATA, XRECORD and high-confidence text grids.\n- Added `CadViewer.getBom()`, `extractCadBom()`, plus spreadsheet-safe CSV and JSON export helpers.\n- Added a compact BOM inspector to the demo while keeping extraction independent of the renderer and browser UI.\n- Hardened DWG/DXF metadata normalization, bounded hostile or malformed table data, and kept linked external DataLink files offline and untouched.\n- Updated LibreDWG WebAssembly to 0.7.9 and guarded a null complex-linetype STYLE reference that otherwise prevented valid drawings from loading.\n\n## What changed in 0.7.0\n\n- Corrected block-contained DWG geometry after PLAN/UCS transforms, including canonical insert/text rotations, closed-polyline fallback detection and authored constant/vertex widths.\n- Preserved TEXT width factors, alignment points, vertical/horizontal alignment and generation flags through worker normalization and INSERT expansion.\n- Added world-space wide-polyline rendering to Canvas2D and retained WebGL, while keeping dash phase and entity/INSERT linetype scales stable.\n- Added complete external SHX reference handling for complex DWG linetypes: referenced files are exposed through metadata, missing files use a safe marker fallback, and uploaded `File`/`ArrayBuffer` content is parsed, validated, cached and redrawn as real shape/text outlines without resetting the current view.\n- Added `onReferenceStateChange`, `addReferenceFile()`, `addReferenceBuffer()`, `getMissingReferences()` and related lifecycle APIs, plus a contextual SHX upload control in the demo.\n\n## What changed in 0.6.6\n\n- Added automatic initial fitting based on meaningful geometry inside a valid active DWG viewport, preventing remote coordinate clusters from shrinking the main drawing into a dot.\n- Added `fitMode: 'auto' | 'saved-view' | 'extents'` and `viewer.fit(mode)` for automatic content fitting, exact saved-view restoration or complete drawing extents.\n- Unified bounds and fitting behavior across the retained WebGL renderer and Canvas2D fallback.\n\n## What changed in 0.6.5\n\n- Preserved active DWG VPORT/header UCS saved views and applied safe planar scene transforms exactly once across geometry, text, inserts, bounds and interaction coordinates.\n- Added DWG LTYPE normalization and Canvas2D/WebGL rendering for dashed, dotted, BYLAYER and BYBLOCK linetypes, including continuous polyline phase and entity/global scale handling.\n- Preserved LibreDWG closed-polyline flags and added guarded fallbacks for tilted views, complex SHX linetype glyphs and pathological microscopic patterns.\n- Added public line-pattern helpers, `getSourceDocument()` and an eight-case DWG normalization regression suite.\n\n## What changed in 0.6.4\n\n- Added a stable package export for `@flyfish-dev/cad-viewer/wasm/dwg-worker.js`.\n- DWG worker loading now defaults to the page-relative runtime asset `wasm/dwg-worker.js`, making npm package assets and static demo deployments use the same worker file.\n- Dev, demo, Cloudflare Pages and npm library builds now build and copy the DWG worker asset explicitly before serving or packaging runtime files.\n\n## What changed in 0.6.3\n\n- Added `dxfEncoding` for overriding DXF text decoding when legacy files omit or misdeclare `$DWGCODEPAGE`.\n- DXF decoding now honors BOMs and `$DWGCODEPAGE` values such as `ANSI_936`, `CP936`, `GBK`, `BIG5`, `SHIFT_JIS` and Windows code pages before falling back.\n- DXF text entities now normalize common CAD escapes such as `\\U+XXXX`, `%%c`, `%%d`, `%%p` and `\\P`.\n\n## What changed in 0.6.2\n\n- Updated the native DWF path to `dwf-viewer` 0.6.4 for upstream DWF/DWFx bug fixes while keeping this package on its own SemVer line.\n- Verified the exposed `CadViewer` DWF/XPS options still match the current `dwf-viewer` API.\n\n## What changed in 0.6.1\n\n- Updated the native DWF path to `dwf-viewer` 0.6.1.\n- Adopted the current renderer behavior for WebGL-accelerated XPS/DWFx and W2D 2D vector rendering, W3D/HSF 3D rendering, embedded XPS font loading and optional WASM raster fallback.\n- Exposed DWF/XPS overview tuning through `dwfLineWeightMode`, `dwfMinStrokeCssPx`, `dwfMaxOverviewStrokeCssPx`, `dwfMinTextCssPx` and `dwfMinFilledAreaCssPx`.\n- Refreshed README, format notes, architecture notes and package metadata for the latest DWF support.\n\n## What changed in 0.6.0\n\n- Replaced the previous DWFx/XPS subset parser with the published `dwf-viewer` native renderer.\n- DWF/DWFx/XPS files now mount a dedicated native viewer path instead of being forced into the DWG/DXF `CadDocument` renderer.\n- Added support for DWF 6+ ZIP packages, WHIP/W2D 2D sheets, W3D/HSF 3D eModel pages, DWFx/OPC/XPS pages and dwf-viewer's WebGL/WASM render backends.\n- Added `CadNativeRenderableLoader`, allowing loaders to mount an optimized DOM/WebGL viewer when a format needs more than the normalized 2D scene model.\n- Added `dwfWasmUrl`, `dwfPreferWebgl`, `dwfPreferWasm`, `dwfMaxCanvasPixels`, `dwfMaxGpuCacheBytes` and related production options.\n- Runtime asset scripts now copy and validate both `libredwg-web.wasm` and `dwfv-render.wasm`.\n- Removed the old classic-DWF warning path and the `fflate` dependency from this package.\n- Updated package licensing to AGPL-3.0-only to match the integrated DWF renderer.\n\n## What changed in 0.5.3\n\n- Fixed DWG color fidelity for layer-indexed drawings. Indexed LibreDWG layers now resolve from ACI instead of the converter placeholder `0xffffff`, preventing monochrome-white output.\n- Preserved DWG true-color values even when the RGB integer is in the ACI range, such as `0x0000ff`.\n- Added BYBLOCK color inheritance for expanded INSERT/block entities.\n\n## What changed in 0.5.2\n\n- Fixed the noisy Vite build output where `@mlightcad/libredwg-web` printed a multi-megabyte `data:application/wasm;base64,...` warning.\n- DWG worker builds now use the lean LibreDWG ESM wrapper and load `/wasm/libredwg-web.js` + `/wasm/libredwg-web.wasm` at runtime, avoiding duplicated inline wasm assets.\n- `build:lib` now creates `dist/index.js` as a compatibility re-export for integrations that still request `/dist/index.js`.\n- Vite dev mode now serves a small `/dist/index.js` compatibility shim that forwards stale demo pages to `/demo/main.ts`.\n- `npm run preview` now builds the demo first, so clean checkouts do not fail because `dist-demo` is missing.\n\n## What changed in 0.5\n\n- The default rendering backend is now a **retained WebGL renderer**. CAD primitives are flattened once and uploaded to GPU buffers; pan/zoom updates only view uniforms.\n- Added spatial indexing and viewport culling. Line, triangle and point batches are bucketed across the drawing bounds, so zoomed-in views submit only visible batches.\n- Added large-drawing memory controls: coordinates are stored relative to the drawing center in `Float32Array`, colors are stored in `Uint8Array`, and temporary CPU arrays are released after upload.\n- Text and images render in a separate overlay with minimum screen-height and maximum visible-label limits.\n- `CadViewer` now supports `renderer: 'auto' | 'webgl' | 'canvas2d'`; `auto` prefers WebGL and falls back to Canvas2D.\n- Demo now reports renderer backend, visible primitives and estimated GPU memory.\n\n## What changed in 0.4\n\n- DWG parsing now runs in a **dedicated Web Worker by default**, so LibreDWG WASM initialization and binary decoding no longer block pan/zoom/UI interactions.\n- The worker keeps the LibreDWG WASM instance warm and reuses it across DWG loads.\n- Added cancellable loading through `AbortSignal`, worker timeout support, progress events, and explicit worker asset configuration.\n- Reduced DWG memory pressure by stripping raw parser objects from worker payloads unless `keepRaw: true` is explicitly enabled.\n- Demo now includes a loading overlay, progress bar, cancel action and loader mode indicator.\n- `viewer.destroy()` disposes canvas listeners and terminates owned DWG workers, which is safe for SPA route changes.\n- Library exports `supportsDwgWorker` and `DwgWorkerClient` for advanced integrations.\n\n## Features\n\n- **Pure frontend viewer component**: `new CadViewer({ container })` or `new CadViewer({ canvas })`.\n- **Loader registry**: DWG, DXF and DWF loaders are independent and replaceable; native-renderable loaders can mount their own optimized viewer.\n- **DWG preview**: browser-local parsing through LibreDWG WebAssembly, executed in a Web Worker by default.\n- **DWG view and linetype fidelity**: active planar saved views, block-contained text alignment and widths, closed/wide polylines, LTYPE tables, BYLAYER/BYBLOCK inheritance, dash/dot patterns and stable pattern scaling.\n- **External SHX references**: detects missing complex-linetype shape fonts, accepts local files or API-provided bytes, validates required glyphs and renders SHX shape/text geometry in Canvas2D and WebGL.\n- **BOM extraction**: reads block attributes, cached CAD tables, DataTable, XDATA, XRECORD and high-confidence text grids into one typed API with safe CSV/JSON export.\n- **DXF preview**: JavaScript parser path with fallback support for common ASCII DXF `ENTITIES`.\n- **DWF/DWFx/XPS preview**: powered by `dwf-viewer` for DWF ZIP packages, WebGL-accelerated W2D and XPS/DWFx 2D vectors, W3D/HSF eModel geometry, embedded XPS fonts, adaptive CAD line weights and raster fallback.\n- **CAD color handling**: ACI, BYLAYER, BYBLOCK inheritance, DWG layer colors, true color, fill color, opacity and adaptive contrast.\n- **High-performance WebGL viewport controls**: retained GPU buffers, spatial culling, zoom, pan, fit-to-view, cursor world coordinates and zoom percentage.\n- **Professional demo UI**: drag-and-drop, compact toolbar, status strip, parse/render timing, entity summary and warnings.\n- **Library + demo builds**: publishable npm package and Cloudflare Pages demo.\n\n## Install\n\n```bash\nnpm install @flyfish-dev/cad-viewer\n```\n\nFor local development from this repository:\n\n```bash\nnpm install\nnpm run dev\n```\n\nThe DWG and DWF render paths need runtime assets in a public directory: `libredwg-web.js`, `libredwg-web.wasm`, `dwg-worker.js` and `dwfv-render.wasm`. This repository copies, builds and validates them for the demo:\n\n```bash\nnpm run copy:wasm\nnpm run build:worker\nnpm run copy:worker\nnpm run check:wasm\n```\n\nThe demo resolves `wasmPath` to an absolute URL before sending it to the DWG worker and uses the same directory for `dwfv-render.wasm`. The default DWG worker URL is `wasm/dwg-worker.js`, resolved against the page URL. In your own app, prefer absolute paths or URLs, for example `/wasm`, `/wasm/dwg-worker.js` or `new URL('wasm/', document.baseURI).href`. Avoid passing a worker-relative path such as `./wasm` unless it is resolved on the UI thread first.\n\nWhen publishing the npm package, `build:lib` copies these files into `dist/wasm` and exposes them as package subpaths, including `./wasm/dwg-worker.js`. Applications still need to serve the runtime files from a public URL and pass that directory as `wasmPath`, or pass `dwfWasmUrl` / `workerUrl` explicitly.\n\n\n## Demo startup notes\n\nUse Vite for the source demo:\n\n```bash\nnpm install\nnpm run dev\n```\n\nFor a production preview, use:\n\n```bash\nnpm run preview\n```\n\nDo not serve the source directory with a plain static server and expect TypeScript entries to run. If a stale page requests `/dist/index.js`, run `npm run build:lib` to create the compatibility entry, or use the Vite dev server above.\n\n## Basic usage\n\n```ts\nimport { CadViewer } from '@flyfish-dev/cad-viewer';\nimport '@flyfish-dev/cad-viewer/style.css';\n\nconst viewer = new CadViewer({\n  container: document.querySelector('#viewer')!,\n  renderer: 'auto',       // WebGL first, Canvas2D fallback\n  wasmPath: new URL('wasm/', document.baseURI).href,\n  dwfWasmUrl: new URL('wasm/dwfv-render.wasm', document.baseURI).href,\n  canvasOptions: {\n    background: '#05070d',\n    foreground: '#f8fafc',\n    fitMode: 'auto',\n    contrastMode: 'adaptive',\n    minColorContrast: 2.45\n  }\n});\n\nconst input = document.querySelector<HTMLInputElement>('input[type=file]')!;\ninput.addEventListener('change', async () => {\n  const file = input.files?.[0];\n  if (!file) return;\n  await viewer.loadFile(file);\n});\n```\n\n`fitMode: 'auto'` is the default. For DWG files with a valid active VPORT, it fits meaningful geometry inside the saved viewport, so remote survey coordinates or auxiliary geometry do not collapse the main sheet into a dot. Use `viewer.fit('saved-view')` to restore the exact saved viewport, or `viewer.fit('extents')` to include every coordinate cluster.\n\n\n## WebGL rendering and performance model\n\nThe default `renderer: 'auto'` path attempts to create `CadWebGLRenderer` first. Instead of traversing every entity and rebuilding Canvas2D paths on every zoom, the renderer builds a retained scene once in `setDocument()`:\n\n```text\nCadDocument\n  ↓\nflatten blocks / curves / fills\n  ↓\nFloat32Array positions + Uint8Array colors\n  ↓\nspatial GPU batches\n  ↓\nWebGL drawArrays with viewport culling\n```\n\nTunable options:\n\n```ts\nnew CadViewer({\n  container,\n  renderer: 'auto', // force 'webgl' or 'canvas2d' when needed\n  canvasOptions: {\n    enableSpatialIndex: true,\n    spatialIndexCellCount: 96,\n    maxVerticesPerBatch: 32768,\n    maxCurveSegments: 72,\n    textMinPixelHeight: 4,\n    maxVisibleTextLabels: 2400,\n    powerPreference: 'high-performance',\n    preserveDrawingBuffer: false\n  },\n  onRenderStats(stats) {\n    console.log(stats.backend, stats.visiblePrimitiveCount, stats.gpuMemoryBytes);\n  }\n});\n```\n\nFor very large drawings, lower `maxCurveSegments`, increase `spatialIndexCellCount`, and cap `maxVisibleTextLabels`.\n\n## Worker-backed DWG parsing\n\n`DwgLoader` uses a module Web Worker by default in browsers. The default worker URL is `wasm/dwg-worker.js`, resolved relative to the page. The worker imports `@mlightcad/libredwg-web`, initializes LibreDWG WASM inside the worker thread, caches that WASM instance, decodes DWG bytes, normalizes the result into a structured-clone-safe `CadDocument`, and sends only the normalized scene back to the UI thread. Canvas rendering remains on the main thread.\n\n```ts\nconst controller = new AbortController();\n\nconst viewer = new CadViewer({\n  container,\n  wasmPath: new URL('wasm/', document.baseURI).href,\n  dwfWasmUrl: new URL('wasm/dwfv-render.wasm', document.baseURI).href,\n  useWorker: true,\n  workerTimeoutMs: 120_000,\n  onLoadProgress(progress) {\n    console.log(progress.phase, progress.message, progress.percent);\n  }\n});\n\nawait viewer.preloadDwg(); // optional: warm the worker before the first file\nawait viewer.loadFile(file, { signal: controller.signal });\n\n// cancel a large DWG load\ncontroller.abort();\n```\n\nAdvanced deployments can override the worker URL or constructor when the bundler or CDN has a custom asset layout:\n\n```ts\nnew CadViewer({\n  container,\n  wasmPath: new URL('wasm/', document.baseURI).href,\n  dwfWasmUrl: new URL('wasm/dwfv-render.wasm', document.baseURI).href,\n  workerUrl: new URL('/assets/dwg-worker.js', window.location.origin)\n});\n```\n\nThe default package is worker-first. For non-browser runtimes, register a custom DWG loader instead of disabling workers.\n\n## Component API\n\n```ts\nconst viewer = new CadViewer({\n  container,             // HTMLElement; creates a canvas inside\n  canvas,                // optional existing HTMLCanvasElement\n  renderer: 'auto',      // 'auto' | 'webgl' | 'canvas2d'\n  wasmPath: '/wasm',     // directory containing libredwg-web.js, libredwg-web.wasm and dwfv-render.wasm\n  dxfEncoding: 'gb18030', // optional override when legacy DXF codepage metadata is wrong\n  dwfWasmUrl: '/wasm/dwfv-render.wasm',\n  autoFit: true,\n  canvasOptions: {\n    background: '#05070d',\n    foreground: '#ffffff',\n    fitMode: 'auto',                 // 'auto' | 'saved-view' | 'extents'\n    contrastMode: 'adaptive',       // 'adaptive' | 'preserve'\n    minColorContrast: 2.45,\n    showPageBounds: true,\n    showUnsupportedMarkers: false,\n    trueColorByteOrder: 'rgb',\n    enableSpatialIndex: true,\n    spatialIndexCellCount: 96,\n    maxVerticesPerBatch: 32768,\n    maxCurveSegments: 72,\n    textMinPixelHeight: 4,\n    maxVisibleTextLabels: 2400\n  },\n  useWorker: true,                 // default for DWG\n  workerUrl: '/wasm/dwg-worker.js', // optional override; this is the default path\n  workerTimeoutMs: 0,              // 0 = disabled\n  dwfPreferWebgl: true,\n  dwfPreferWasm: true,\n  dwfMaxCanvasPixels: 16_777_216,\n  dwfLineWeightMode: 'adaptive',  // 'adaptive' | 'physical' | 'hairline'\n  dwfMinStrokeCssPx: 0.42,\n  dwfMinTextCssPx: 1.05,\n  onLoadProgress(progress) {},\n  onLoad(result) {},\n  onError(error) {},\n  onRenderStats(stats) {},\n  onViewChange(event) {},\n  onReferenceStateChange(state) {} // missing/loaded external SHX resources\n});\n\nawait viewer.loadFile(file);\nawait viewer.loadBuffer(arrayBuffer, 'drawing.dxf');\nawait viewer.addReferenceFile(shxFile);\nawait viewer.addReferenceBuffer(shxArrayBuffer, 'LSG.SHX');\nviewer.getMissingReferences();      // CadMissingReference[]\nviewer.getLoadedReferences();       // CadLoadedReference[]\nviewer.fit();                       // automatic meaningful-content fit\nviewer.fit('saved-view');          // exact active DWG viewport\nviewer.fit('extents');             // all geometry, including remote coordinate clusters\nviewer.zoomIn();\nviewer.zoomOut();\nawait viewer.preloadDwg();       // optional DWG worker/WASM warmup\nviewer.setCanvasOptions({ background: '#f7f8fb', foreground: '#111827' });\nviewer.getDocument();            // transformed render-space CadDocument\nviewer.getSourceDocument();      // parser-owned WCS CadDocument\nviewer.getBom();                 // normalized CadBom from the source document\nviewer.clear();\nviewer.destroy();\n```\n\n### Current-view snapshots\n\nThe 0.8.2 candidate adds `await viewer.captureCanvas()`. It redraws the active view before copying Canvas2D or WebGL vectors and text overlays, and supports native DWF/DWFx through its loader. The returned canvas can encode PNG or JPEG with `toBlob()`; no source entities, camera state or source colors are changed. This captures the current viewport/current native page, not every sheet or vector PDF output. Unloaded viewers and unsupported native loaders reject the request instead of returning an empty image.\n\nNative background contrast requires the `dwf-viewer` 0.6.7 candidate. `canvasOptions.contrastMode: 'adaptive'` improves low-contrast vector/text colors; use `'preserve'` for exact source colors. Release the DWF dependency first and verify the resolved version before publishing this package.\n\n### BOM and drawing properties\n\n`getBom()` derives independent tables from the parser-owned document. It covers `ATTDEF` defaults with `ATTRIB` overrides, recursive `INSERT`/`MINSERT` quantities, cached native table cells, DataTable, XDATA, XRECORD, and aligned text grids when their structure is high-confidence. XDATA and XRECORD are opt-in because real drawings often contain hundreds of unrelated application caches.\n\n```ts\nimport { serializeCadBomCsv, serializeCadBomJson } from '@flyfish-dev/cad-viewer';\n\nawait viewer.loadFile(dwgFile);\nconst bom = viewer.getBom({ aggregateBlocks: true, textTables: 'auto' });\nif (bom) {\n  const csv = serializeCadBomCsv(bom, { tableId: bom.tables[0]?.id });\n  const json = serializeCadBomJson(bom); // DataLink connection strings are redacted by default\n}\n\nconst applicationRecords = viewer.getBom({ sources: ['xdata', 'xrecord'] });\n```\n\nDataLink targets are never opened or fetched. The API only returns link metadata and cell values already cached in the drawing. JSON export omits `connectionString` by default; use `{ includeSensitiveData: true }` only for a trusted destination. If a modern CAD table has no cells exposed by the parser, the result contains a structured warning instead of invented values. Native DWF/DWFx/XPS rendering does not currently expose normalized BOM metadata.\n\n### External SHX references\n\nComplex DWG linetypes reference SHX shape/font files by name; their outlines are not embedded in the drawing. `CadViewer` keeps the drawing usable with a marker fallback and reports missing resources through both `onReferenceStateChange` and `document.metadata.missingReferences`.\n\n```ts\nconst viewer = new CadViewer({\n  container,\n  onReferenceStateChange({ missing }) {\n    shxUploadButton.hidden = missing.length === 0;\n    shxUploadButton.textContent = missing.map(({ fileName }) => fileName).join(', ');\n  }\n});\n\nawait viewer.loadFile(dwgFile);\n\n// User-selected local file.\nawait viewer.addReferenceFile(shxFile);\n\n// Or bytes supplied by an application API. Keep the referenced file name.\nawait viewer.addReferenceBuffer(shxBytes, 'LSG.SHX');\n```\n\nReferences can be supplied before or after the drawing. Parsed fonts remain cached across drawing loads until `removeReference()`, `clearReferences()` or `destroy()` is called. Replacing a reference validates the glyphs required by the active drawing; a same-named but incompatible file remains in the missing state. All parsing stays in the browser.\n\n## Loader architecture\n\n```text\nFile / ArrayBuffer\n  ↓\nCadLoaderRegistry\n  ↓\nDwgLoader | DxfLoader | DwfLoader | custom loader\n  ↓\nDWG/DXF: CadDocument → CadWebGLRenderer | CadCanvasRenderer fallback\nDWF/DWFx/XPS: DwfLoader.mount() → dwf-viewer native WebGL vectors / 3D / WASM fallback\n```\n\nEach loader returns a normalized `CadDocument`:\n\n```ts\ninterface CadDocument {\n  format: 'dwg' | 'dxf' | 'dwf' | 'dwfx' | 'xps' | 'unknown';\n  layers: Record<string, CadLayer>;\n  blocks: Record<string, CadBlock>;\n  entities: CadEntity[];\n  pages?: CadPage[];\n  warnings: string[];\n  raw?: unknown;\n}\n```\n\nRegister a custom loader:\n\n```ts\nviewer.registerLoader({\n  id: 'my-cad-format',\n  label: 'My CAD Format',\n  formats: ['unknown'],\n  accepts(input) {\n    return input.fileName?.endsWith('.cad') ?? false;\n  },\n  async load(input) {\n    return {\n      document: {\n        format: 'unknown',\n        layers: {},\n        blocks: {},\n        entities: [],\n        metadata: {},\n        warnings: []\n      },\n      bytes: input.buffer instanceof Uint8Array ? input.buffer.byteLength : 0,\n      elapsedMs: 0,\n      format: 'unknown',\n      warnings: []\n    };\n  }\n});\n```\n\n## Format support\n\n| Format | Loader | Coverage |\n|---|---|---|\n| DWG | `DwgLoader` | Uses LibreDWG WebAssembly. Preserves active planar saved views, block-contained text transforms/alignment, closed and authored-width polylines, and LTYPE definitions. Canvas2D/WebGL render dash/dot patterns with BYLAYER/BYBLOCK inheritance. Referenced SHX fonts are reported as missing resources; supplied files render complex shape/text glyphs with authored scale, offset and rotation, while unavailable glyphs use a marker fallback. |\n| DXF | `DxfLoader` | Uses `dxf-parser` plus fallback parsing. Supports codepage-aware text decoding, CAD text escape normalization, core entities, blocks/inserts, colors/layers, polylines, hatch boundaries and splines as preview polylines. |\n| DWF | `DwfLoader` + `dwf-viewer` | DWF 6+ ZIP packages, WHIP/W2D 2D sheets, W3D/HSF 3D eModel pages, model tree metadata, WebGL rendering and optional WASM fallback. |\n| DWFx / XPS | `DwfLoader` + `dwf-viewer` | DWFx/OPC/XPS pages with WebGL-accelerated vector paths, embedded fonts, text, images, package resources and adaptive overview line weights through the native DWF renderer. |\n\n## Color handling\n\nThe color resolver follows CAD semantics instead of treating all numbers as RGB:\n\n1. explicit CSS color or true color object,\n2. explicit DWG true-color integer, including low RGB values such as `0x0000ff`,\n3. entity ACI (`colorIndex`, `colorNumber`, `color` in `1..255`),\n4. BYBLOCK inheritance (`0`) when expanding INSERT/block geometry,\n5. BYLAYER lookup (`256` / unset),\n6. viewer foreground fallback.\n\nLayer colors prefer a valid ACI index when a converter also exposes a placeholder RGB value. ACI `7` is foreground-dependent: it renders light on dark canvas and dark on light canvas. With `contrastMode: 'adaptive'`, colors too close to the current canvas background are adjusted just enough to stay readable. Use `contrastMode: 'preserve'` when exact plotted colors are more important than screen readability.\n\nIf a particular converter exposes true-color integers in BGR order:\n\n```ts\nnew CadViewer({ canvasOptions: { trueColorByteOrder: 'bgr' } });\n```\n\n## Development\n\nUse Node.js 22.12 or newer (Node.js 24 is used for the candidate checks).\nThe development toolchain uses Vite 7; the published library still targets ES2018.\n\n```bash\nnpm install\nnpm run dev          # run the demo\nnpm run typecheck    # TypeScript validation\nnpm test             # build the library and run DWG normalization regressions\nnpm run build        # library + demo\nnpm run preview      # preview built demo\n```\n\n## npm publishing\n\n1. Build and inspect the package:\n\n```bash\nnpm run build:lib\nnpm run pack:dry\n```\n\n2. Publish:\n\n```bash\nnpm login\nnpm publish --access public --auth-type=web\n```\n\nThe package also exposes:\n\n```bash\nnpm run release:npm\n```\n\n## Cloudflare Pages publishing\n\nDirect upload with Wrangler. The repository includes `public/_headers`, so Cloudflare Pages serves `.wasm` as `application/wasm` and caches it long-term:\n\n```bash\nnpm install\nnpm run build:demo\nnpx wrangler pages deploy dist-demo --project-name cad-viewer\n```\n\nOr use the included script:\n\n```bash\nnpm run deploy:pages\n```\n\nFor GitHub Actions, configure repository secrets:\n\n```text\nCLOUDFLARE_API_TOKEN\nCLOUDFLARE_ACCOUNT_ID\n```\n\nThe workflow is included at `.github/workflows/pages.yml`.\n\n## Repository layout\n\n```text\nsrc/\n  core/          shared format detection, colors, geometry, transforms, normalized types\n  loaders/       DwgLoader, DxfLoader, DwfLoader and CadLoaderRegistry\n  viewer/        CadViewer component and Canvas renderer\ndemo/            professional Vite demo UI\ndocs/            English and Chinese architecture / format notes\nscripts/         clean and runtime WASM copy/validation helpers\npublic/wasm/     demo WASM asset output directory\n```\n\n## License\n\nAGPL-3.0-only. The default DWG loader integrates `@mlightcad/libredwg-web` / LibreDWG, SHX decoding uses the MIT-licensed `@mlightcad/shx-parser`, and the DWF renderer integrates `dwf-viewer`. Keep attribution and license notices when redistributing, modifying, embedding or using this package as part of another application. For closed-source commercial products, review all dependency licenses and replace loaders where your licensing model requires it.","users":{}}