{"_id":"@cabin3d/viewer","_rev":"9-3f390b0b9ff7a32ef77448f98d9111db","name":"@cabin3d/viewer","dist-tags":{"latest":"1.2.0"},"versions":{"0.1.0":{"name":"@cabin3d/viewer","version":"0.1.0","keywords":["3d","viewer","react","three","product-configurator","webgl"],"license":"MIT","_id":"@cabin3d/viewer@0.1.0","maintainers":[{"name":"admincabinid","email":"admin@cabineat.vn"}],"homepage":"https://github.com/cabinfood/cabin-3d-product#readme","bugs":{"url":"https://github.com/cabinfood/cabin-3d-product/issues"},"dist":{"shasum":"f6b04e8bb6a770426e50e4aacd19820179bb0c1b","tarball":"https://registry.npmjs.org/@cabin3d/viewer/-/viewer-0.1.0.tgz","fileCount":26,"integrity":"sha512-9R3JRua7evi7IdAmQqJxVktAbrAss3jQUMosVfyZbB/JOjyNX27kLsBb+mbKp+JB1qYZBX47uavkDu/TSi47Sg==","signatures":[{"sig":"MEQCIHza2GWRjfZEESX0J8ZgdN1emz2hDOISMvg2EXwy81D+AiANBAOerSerX9Ta+RJp/S8fSHN5Fs4oErFWyP6PhS+IBw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":182652},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./features/materials":{"types":"./dist/features/materials.d.ts","import":"./dist/features/materials.mjs","require":"./dist/features/materials.js"},"./features/mesh-toggle":{"types":"./dist/features/mesh-toggle.d.ts","import":"./dist/features/mesh-toggle.mjs","require":"./dist/features/mesh-toggle.js"}},"gitHead":"614ab00928e67f206fb0b79fa7080a585675a905","scripts":{"dev":"tsup --watch","lint":"eslint .","build":"tsup","prepublishOnly":"pnpm build"},"_npmUser":{"name":"admincabinid","email":"admin@cabineat.vn"},"repository":{"url":"git+https://github.com/cabinfood/cabin-3d-product.git","type":"git","directory":"packages/viewer"},"_npmVersion":"10.9.0","description":"3D Product Viewer with modular features for materials, mesh toggle, and more","directories":{},"_nodeVersion":"22.12.0","dependencies":{"zustand":"^5.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","draco3d":"^1.5.7","typescript":"^5.0.0","@types/react":"^19","@types/three":"^0.181.0"},"peerDependencies":{"react":">=18","three":"^0.170.0","react-dom":">=18","@react-three/drei":"^10.0.0","@react-three/fiber":"^9.0.0"},"_npmOperationalInternal":{"tmp":"tmp/viewer_0.1.0_1765905441410_0.8423927243061935","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@cabin3d/viewer","version":"0.2.0","keywords":["3d","viewer","react","three","product-configurator","webgl"],"license":"MIT","_id":"@cabin3d/viewer@0.2.0","maintainers":[{"name":"admincabinid","email":"admin@cabineat.vn"}],"homepage":"https://github.com/cabinfood/cabin-3d-product#readme","bugs":{"url":"https://github.com/cabinfood/cabin-3d-product/issues"},"dist":{"shasum":"e0b9df3117cba19df92749377bb19498e0880911","tarball":"https://registry.npmjs.org/@cabin3d/viewer/-/viewer-0.2.0.tgz","fileCount":38,"integrity":"sha512-QRhK9z2b/PphalQKDJE5FETsGx/3dZTZ0fQ8gUPxgzictWFWSMhGp9LdHQ5XqVYjFf8ACy7lYNtYyariVXKcUQ==","signatures":[{"sig":"MEUCIQDc9s4sCDzDt2klEMqCbGw738FmdPAIMQIVCg0s3fZljwIgcRJ4M+fZ52194bbgTKuaRLlDvfeUusKZBiYQlrlbb8I=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":636773},"main":"./dist/index.js","_from":"file:cabin3d-viewer-0.2.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./features/materials":{"types":"./dist/features/materials.d.ts","import":"./dist/features/materials.mjs","require":"./dist/features/materials.js"},"./features/mesh-toggle":{"types":"./dist/features/mesh-toggle.d.ts","import":"./dist/features/mesh-toggle.mjs","require":"./dist/features/mesh-toggle.js"}},"scripts":{"dev":"tsup --watch","lint":"eslint .","build":"tsup"},"_npmUser":{"name":"admincabinid","email":"admin@cabineat.vn"},"_resolved":"/private/var/folders/w_/vq05wy997y1c1vlsm_8k11240000gn/T/ddd1b4efa81b6ed6bde88a395301d882/cabin3d-viewer-0.2.0.tgz","_integrity":"sha512-QRhK9z2b/PphalQKDJE5FETsGx/3dZTZ0fQ8gUPxgzictWFWSMhGp9LdHQ5XqVYjFf8ACy7lYNtYyariVXKcUQ==","repository":{"url":"git+https://github.com/cabinfood/cabin-3d-product.git","type":"git","directory":"packages/viewer"},"_npmVersion":"10.9.0","description":"3D Product Viewer with modular features for materials, mesh toggle, and more","directories":{},"_nodeVersion":"22.12.0","dependencies":{"zustand":"^5.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","draco3d":"^1.5.7","typescript":"^5.0.0","@types/react":"^19","@types/three":"^0.181.0"},"peerDependencies":{"react":">=18","three":">=0.170.0","react-dom":">=18","@react-three/drei":">=10.0.0","@react-three/fiber":">=9.0.0"},"_npmOperationalInternal":{"tmp":"tmp/viewer_0.2.0_1766052969845_0.5844255445981599","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@cabin3d/viewer","version":"0.3.0","keywords":["3d","viewer","react","three","product-configurator","webgl"],"license":"MIT","_id":"@cabin3d/viewer@0.3.0","maintainers":[{"name":"admincabinid","email":"admin@cabineat.vn"}],"homepage":"https://github.com/cabinfood/cabin-3d-product#readme","bugs":{"url":"https://github.com/cabinfood/cabin-3d-product/issues"},"dist":{"shasum":"8ea82673965a5b38af965b643cc7b4246418fce1","tarball":"https://registry.npmjs.org/@cabin3d/viewer/-/viewer-0.3.0.tgz","fileCount":38,"integrity":"sha512-qDyteyuaCTi8zrBUHB3/JKQCtTTi/JaOnISuXBYAH69JTPnuDwXSt0ztz1BXn59gicjCxNKP1JKv7jEmQe4EmQ==","signatures":[{"sig":"MEQCIDaAuwW9/ZBf+pjnHubAs+rlUX+7dp34Vw3KOofEaBPZAiALAyJ+TbpX8nl+QKzGM7ECj4ozB8JorVQwDcGYQa2ypg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":654656},"main":"./dist/index.js","_from":"file:cabin3d-viewer-0.3.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./features/materials":{"types":"./dist/features/materials.d.ts","import":"./dist/features/materials.mjs","require":"./dist/features/materials.js"},"./features/mesh-toggle":{"types":"./dist/features/mesh-toggle.d.ts","import":"./dist/features/mesh-toggle.mjs","require":"./dist/features/mesh-toggle.js"}},"scripts":{"dev":"tsup --watch","lint":"eslint .","build":"tsup"},"_npmUser":{"name":"admincabinid","email":"admin@cabineat.vn"},"_resolved":"/private/var/folders/w_/vq05wy997y1c1vlsm_8k11240000gn/T/d6c6cfd7bca85f277d5cf360b217962d/cabin3d-viewer-0.3.0.tgz","_integrity":"sha512-qDyteyuaCTi8zrBUHB3/JKQCtTTi/JaOnISuXBYAH69JTPnuDwXSt0ztz1BXn59gicjCxNKP1JKv7jEmQe4EmQ==","repository":{"url":"git+https://github.com/cabinfood/cabin-3d-product.git","type":"git","directory":"packages/viewer"},"_npmVersion":"10.9.0","description":"3D Product Viewer with modular features for materials, mesh toggle, and more","directories":{},"_nodeVersion":"22.12.0","dependencies":{"zustand":"^5.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","draco3d":"^1.5.7","typescript":"^5.0.0","@types/react":"^19","@types/three":"^0.181.0"},"peerDependencies":{"react":">=18","three":">=0.170.0","react-dom":">=18","@react-three/drei":">=10.0.0","@react-three/fiber":">=9.0.0"},"_npmOperationalInternal":{"tmp":"tmp/viewer_0.3.0_1766125170875_0.6343873102509001","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@cabin3d/viewer","version":"0.4.0","keywords":["3d","viewer","react","three","product-configurator","webgl"],"license":"MIT","_id":"@cabin3d/viewer@0.4.0","maintainers":[{"name":"admincabinid","email":"admin@cabineat.vn"}],"homepage":"https://github.com/cabinfood/cabin-3d-product#readme","bugs":{"url":"https://github.com/cabinfood/cabin-3d-product/issues"},"dist":{"shasum":"8e002626e3712e0cac3381c1aadbfa3455be3435","tarball":"https://registry.npmjs.org/@cabin3d/viewer/-/viewer-0.4.0.tgz","fileCount":42,"integrity":"sha512-vsXTaj4vWIJ+zoXYQbDutnIEm+FldqhPne1FBOQxisrk7FIpTtEam6GyeF/d+1Q6z9NK3emAdGPuVw+MvLisnA==","signatures":[{"sig":"MEUCIQDVJUXxyZ1EVmTtjoC9nhgbnL8DE1yMjO/3BdbD0IihvgIgGtNoRO7DINjG6DQMDbQftf29gLT8P2Np5yJXgSLkqys=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1030069},"main":"./dist/index.js","_from":"file:cabin3d-viewer-0.4.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./features/materials":{"types":"./dist/features/materials.d.ts","import":"./dist/features/materials.mjs","require":"./dist/features/materials.js"},"./features/mesh-toggle":{"types":"./dist/features/mesh-toggle.d.ts","import":"./dist/features/mesh-toggle.mjs","require":"./dist/features/mesh-toggle.js"}},"scripts":{"dev":"tsup --watch","lint":"eslint .","build":"tsup"},"_npmUser":{"name":"admincabinid","email":"admin@cabineat.vn"},"_resolved":"/private/var/folders/w_/vq05wy997y1c1vlsm_8k11240000gn/T/0b01aca761442c03b90a8a3d887f659c/cabin3d-viewer-0.4.0.tgz","_integrity":"sha512-vsXTaj4vWIJ+zoXYQbDutnIEm+FldqhPne1FBOQxisrk7FIpTtEam6GyeF/d+1Q6z9NK3emAdGPuVw+MvLisnA==","repository":{"url":"git+https://github.com/cabinfood/cabin-3d-product.git","type":"git","directory":"packages/viewer"},"_npmVersion":"10.9.0","description":"3D Product Viewer with modular features for materials, mesh toggle, and more","directories":{},"_nodeVersion":"22.12.0","dependencies":{"zustand":"^5.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","draco3d":"^1.5.7","typescript":"^5.0.0","@types/react":"^19","@types/three":"^0.181.0"},"peerDependencies":{"react":">=18","three":">=0.170.0","react-dom":">=18","@react-three/drei":">=10.0.0","@react-three/fiber":">=9.0.0"},"_npmOperationalInternal":{"tmp":"tmp/viewer_0.4.0_1766374643421_0.8451156620512241","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@cabin3d/viewer","version":"0.5.0","keywords":["3d","viewer","react","three","product-configurator","webgl"],"license":"MIT","_id":"@cabin3d/viewer@0.5.0","maintainers":[{"name":"admincabinid","email":"admin@cabineat.vn"}],"homepage":"https://github.com/cabinfood/cabin-3d-product#readme","bugs":{"url":"https://github.com/cabinfood/cabin-3d-product/issues"},"dist":{"shasum":"fa996659ea06b290bb0841cadbbf8de6fd443048","tarball":"https://registry.npmjs.org/@cabin3d/viewer/-/viewer-0.5.0.tgz","fileCount":42,"integrity":"sha512-n9eeDUFTWqbutckPXsEmyb2SeJGsvYVFTmWuxTvBdp1Egc9hsMKuHWpYHjknFzNdlRjpdm+JqUwCWb4xG4c3tg==","signatures":[{"sig":"MEUCIQDU+AECojABiqgsMf0FYS5PPUc69SDZIwiZpbT5XbQVygIgYItg183RVKNI/9YL0EgYA/hLCXbs+ZW4iN2cpcrt4Tc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1055453},"main":"./dist/index.js","_from":"file:cabin3d-viewer-0.5.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./features/materials":{"types":"./dist/features/materials.d.ts","import":"./dist/features/materials.mjs","require":"./dist/features/materials.js"},"./features/mesh-toggle":{"types":"./dist/features/mesh-toggle.d.ts","import":"./dist/features/mesh-toggle.mjs","require":"./dist/features/mesh-toggle.js"}},"scripts":{"dev":"tsup --watch","lint":"eslint .","build":"tsup"},"_npmUser":{"name":"admincabinid","email":"admin@cabineat.vn"},"_resolved":"/private/var/folders/w_/vq05wy997y1c1vlsm_8k11240000gn/T/ae20d9c38fda16183f3d05d43606b716/cabin3d-viewer-0.5.0.tgz","_integrity":"sha512-n9eeDUFTWqbutckPXsEmyb2SeJGsvYVFTmWuxTvBdp1Egc9hsMKuHWpYHjknFzNdlRjpdm+JqUwCWb4xG4c3tg==","repository":{"url":"git+https://github.com/cabinfood/cabin-3d-product.git","type":"git","directory":"packages/viewer"},"_npmVersion":"10.9.0","description":"3D Product Viewer with modular features for materials, mesh toggle, and more","directories":{},"_nodeVersion":"22.12.0","dependencies":{"zustand":"^5.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","draco3d":"^1.5.7","typescript":"^5.0.0","@types/react":"^19","@types/three":"^0.181.0"},"peerDependencies":{"react":">=18","three":">=0.170.0","react-dom":">=18","@react-three/drei":">=10.0.0","@react-three/fiber":">=9.0.0"},"_npmOperationalInternal":{"tmp":"tmp/viewer_0.5.0_1766398318673_0.5037770502937449","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@cabin3d/viewer","version":"1.0.0","keywords":["3d","viewer","react","three","product-configurator","webgl"],"license":"MIT","_id":"@cabin3d/viewer@1.0.0","maintainers":[{"name":"admincabinid","email":"admin@cabineat.vn"}],"homepage":"https://github.com/cabinfood/cabin-3d-product#readme","bugs":{"url":"https://github.com/cabinfood/cabin-3d-product/issues"},"dist":{"shasum":"3ac1e4a5ff9af68d03100088d2e7c42501275826","tarball":"https://registry.npmjs.org/@cabin3d/viewer/-/viewer-1.0.0.tgz","fileCount":28,"integrity":"sha512-l0Mw46MviXfFs9bJnbE5HrBlasgxkgh99ApbCaGUUwgsOgF7/4zDMmJoXXRIxXH5KfOR2keqZ+Z+y1So5lxsXg==","signatures":[{"sig":"MEQCIHQyau2hNEY4KFhWByJ10wDObesuAmNBGd+frv+g0wxjAiAIpvPUrkbcOi5Ro/PcdNPeQq2sEh3LzUEEiz7C737PYQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1079639},"main":"./dist/index.js","_from":"file:cabin3d-viewer-1.0.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./features/materials":{"types":"./dist/features/materials.d.ts","import":"./dist/features/materials.mjs","require":"./dist/features/materials.js"}},"scripts":{"dev":"tsup --watch","lint":"eslint .","build":"tsup"},"_npmUser":{"name":"admincabinid","email":"admin@cabineat.vn"},"_resolved":"/private/var/folders/w_/vq05wy997y1c1vlsm_8k11240000gn/T/32dbba89fd633e5a497b7fb076823753/cabin3d-viewer-1.0.0.tgz","_integrity":"sha512-l0Mw46MviXfFs9bJnbE5HrBlasgxkgh99ApbCaGUUwgsOgF7/4zDMmJoXXRIxXH5KfOR2keqZ+Z+y1So5lxsXg==","repository":{"url":"git+https://github.com/cabinfood/cabin-3d-product.git","type":"git","directory":"packages/viewer"},"_npmVersion":"10.9.0","description":"3D Product Viewer with modular features for materials, mesh toggle, and more","directories":{},"_nodeVersion":"22.12.0","dependencies":{"zustand":"^5.0.0","three-mesh-bvh":"^0.9.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","draco3d":"^1.5.7","typescript":"^5.0.0","@types/react":"^19","@types/three":"^0.181.0"},"peerDependencies":{"react":">=18","three":">=0.170.0","react-dom":">=18","@react-three/drei":">=10.0.0","@react-three/fiber":">=9.0.0"},"_npmOperationalInternal":{"tmp":"tmp/viewer_1.0.0_1766932450703_0.9968975026496143","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@cabin3d/viewer","version":"1.0.1","keywords":["3d","viewer","react","three","product-configurator","webgl"],"license":"MIT","_id":"@cabin3d/viewer@1.0.1","maintainers":[{"name":"admincabinid","email":"admin@cabineat.vn"}],"homepage":"https://github.com/cabinfood/cabin-3d-product#readme","bugs":{"url":"https://github.com/cabinfood/cabin-3d-product/issues"},"dist":{"shasum":"581f3d0461ea7099c677e55e15a456626396775c","tarball":"https://registry.npmjs.org/@cabin3d/viewer/-/viewer-1.0.1.tgz","fileCount":32,"integrity":"sha512-0CG3ksYvZm69zHHdivbkRjFu7/YCGrJohCdGHvC5L/Sm1na+QN7u17+QoZ2Owt6p4tIE4FNe63SGxVFytWfPLA==","signatures":[{"sig":"MEUCIQDqThohMYU3pSsXSr3B5rEzUTM7ENYyxNl6SdtWBlxgZQIgN7oaWpRUVhZLL5TMLnuToMyoR/Qu/mr+mgZM1KoB1rU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1099085},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./features/materials":{"types":"./dist/features/materials.d.ts","import":"./dist/features/materials.mjs","require":"./dist/features/materials.js"}},"gitHead":"59f10c8e6c47cffaecada0d5df60021b47f41b1b","scripts":{"dev":"tsup --watch","lint":"eslint .","build":"tsup","prepublishOnly":"pnpm build"},"_npmUser":{"name":"admincabinid","email":"admin@cabineat.vn"},"repository":{"url":"git+https://github.com/cabinfood/cabin-3d-product.git","type":"git","directory":"packages/viewer"},"_npmVersion":"10.9.4","description":"3D Product Viewer with modular features for materials, mesh toggle, and more","directories":{},"_nodeVersion":"22.21.0","dependencies":{"zustand":"^5.0.0","three-mesh-bvh":"^0.9.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","draco3d":"^1.5.7","typescript":"^5.0.0","@types/react":"^19","@types/three":"^0.181.0"},"peerDependencies":{"react":">=18","three":">=0.170.0","react-dom":">=18","@react-three/drei":">=10.0.0","@react-three/fiber":">=9.0.0"},"_npmOperationalInternal":{"tmp":"tmp/viewer_1.0.1_1775150137853_0.5594669931416718","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@cabin3d/viewer","version":"1.1.0","keywords":["3d","viewer","react","three","product-configurator","webgl"],"license":"MIT","_id":"@cabin3d/viewer@1.1.0","maintainers":[{"name":"admincabinid","email":"admin@cabineat.vn"}],"homepage":"https://github.com/cabinfood/cabin-3d-product#readme","bugs":{"url":"https://github.com/cabinfood/cabin-3d-product/issues"},"dist":{"shasum":"469bbec9423e7a94ec6cb23e4e5a808f8c47ce89","tarball":"https://registry.npmjs.org/@cabin3d/viewer/-/viewer-1.1.0.tgz","fileCount":32,"integrity":"sha512-e+e5ugeVrdDK9mV+PM4Febiho0XDLc5b5GKDbZ0WnydeHMTq5crYwPYOa9Rj32FPi4ge+PBrVY9joSPUAuFghQ==","signatures":[{"sig":"MEQCIBikW2YL4kdUEXtgqhdWSdqWz9y1hQzYF8HUrNVBn1oSAiAwgrYX/ChtBUZXqO/4qXbtKsVwflz5pCdGeucszvVkWQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1091053},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./features/materials":{"types":"./dist/features/materials.d.ts","import":"./dist/features/materials.mjs","require":"./dist/features/materials.js"}},"gitHead":"6de49033caf1031fdfc515f9856839de83a5dc6e","scripts":{"dev":"tsup --watch","lint":"eslint .","build":"tsup","prepublishOnly":"pnpm build"},"_npmUser":{"name":"admincabinid","email":"admin@cabineat.vn"},"repository":{"url":"git+https://github.com/cabinfood/cabin-3d-product.git","type":"git","directory":"packages/viewer"},"_npmVersion":"10.9.4","description":"3D Product Viewer with modular features for materials, mesh toggle, and more","directories":{},"_nodeVersion":"22.21.0","dependencies":{"zustand":"^5.0.0","three-mesh-bvh":"^0.9.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","draco3d":"^1.5.7","typescript":"^5.0.0","@types/react":"^19","@types/three":"^0.181.0"},"peerDependencies":{"react":">=18","three":">=0.170.0","react-dom":">=18","@react-three/drei":">=10.0.0","@react-three/fiber":">=9.0.0"},"_npmOperationalInternal":{"tmp":"tmp/viewer_1.1.0_1781501563520_0.5418822551643556","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@cabin3d/viewer","version":"1.2.0","description":"3D Product Viewer with modular features for materials, mesh toggle, and more","main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./features/materials":{"types":"./dist/features/materials.d.ts","import":"./dist/features/materials.mjs","require":"./dist/features/materials.js"}},"peerDependencies":{"@react-three/drei":">=10.0.0","@react-three/fiber":">=9.0.0","react":">=18","react-dom":">=18","three":">=0.170.0"},"dependencies":{"three-mesh-bvh":"^0.9.4","zustand":"^5.0.0"},"devDependencies":{"@types/react":"^19","@types/three":"^0.181.0","draco3d":"^1.5.7","tsup":"^8.0.0","typescript":"^5.0.0"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/cabinfood/cabin-3d-product.git","directory":"packages/viewer"},"keywords":["3d","viewer","react","three","product-configurator","webgl"],"license":"MIT","scripts":{"build":"tsup","dev":"tsup --watch","lint":"eslint ."},"_id":"@cabin3d/viewer@1.2.0","bugs":{"url":"https://github.com/cabinfood/cabin-3d-product/issues"},"homepage":"https://github.com/cabinfood/cabin-3d-product#readme","_integrity":"sha512-6utUtsp7zwURNf1aZarlQ14iwqJKy2kU4WrzrXSGSPoI+NIiBGgmR7rLrosR59Rx+SMMHl5c9U2TJNCfSjyeGg==","_resolved":"/private/var/folders/w_/vq05wy997y1c1vlsm_8k11240000gn/T/884f50a955a86a32031f338c407eb433/cabin3d-viewer-1.2.0.tgz","_from":"file:cabin3d-viewer-1.2.0.tgz","_nodeVersion":"22.21.0","_npmVersion":"10.9.4","dist":{"integrity":"sha512-6utUtsp7zwURNf1aZarlQ14iwqJKy2kU4WrzrXSGSPoI+NIiBGgmR7rLrosR59Rx+SMMHl5c9U2TJNCfSjyeGg==","shasum":"cf3cafb131057a7e0534b1823a91ae055563896a","tarball":"https://registry.npmjs.org/@cabin3d/viewer/-/viewer-1.2.0.tgz","fileCount":44,"unpackedSize":1152933,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDQZGzgcip5r+fz3nCAohRmRrTwSu1inZPvkwXEAcZFYAiA6pZxKgTKtFFGpmqyY3zjGa8L5zyvgD8wxVxDJYR5M+Q=="}]},"_npmUser":{"name":"admincabinid","email":"admin@cabineat.vn"},"directories":{},"maintainers":[{"name":"admincabinid","email":"admin@cabineat.vn"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/viewer_1.2.0_1781944208112_0.38209221545408245"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-16T17:17:21.303Z","modified":"2026-06-20T08:30:08.393Z","0.1.0":"2025-12-16T17:17:21.568Z","0.2.0":"2025-12-18T10:16:10.023Z","0.3.0":"2025-12-19T06:19:31.072Z","0.4.0":"2025-12-22T03:37:23.615Z","0.5.0":"2025-12-22T10:11:58.840Z","1.0.0":"2025-12-28T14:34:10.894Z","1.0.1":"2026-04-02T17:15:38.031Z","1.1.0":"2026-06-15T05:32:43.684Z","1.2.0":"2026-06-20T08:30:08.285Z"},"bugs":{"url":"https://github.com/cabinfood/cabin-3d-product/issues"},"license":"MIT","homepage":"https://github.com/cabinfood/cabin-3d-product#readme","keywords":["3d","viewer","react","three","product-configurator","webgl"],"repository":{"type":"git","url":"git+https://github.com/cabinfood/cabin-3d-product.git","directory":"packages/viewer"},"description":"3D Product Viewer with modular features for materials, mesh toggle, and more","maintainers":[{"name":"admincabinid","email":"admin@cabineat.vn"}],"readme":"# @cabin3d/viewer\n\nA modular 3D product viewer for React with lazy-loadable features.\n\n## Installation\n\n```bash\nnpm install @cabin3d/viewer\n# or\npnpm add @cabin3d/viewer\n```\n\n### Peer Dependencies\n\n```bash\nnpm install react react-dom three @react-three/fiber @react-three/drei\n```\n\n## Quick Start\n\n```tsx\nimport { CabinViewer } from '@cabin3d/viewer';\n\nfunction App() {\n  return (\n    <CabinViewer\n      projectId=\"your-project-id\"\n      apiUrl=\"https://your-api.com/api\"\n    />\n  );\n}\n```\n\n## Features\n\n### Materials Feature\nApply materials and switch between color/texture variants.\n\n```tsx\n<CabinViewer\n  projectId=\"xxx\"\n  features={{\n    materials: { showVariants: true }\n  }}\n/>\n```\n\n### Mesh Toggle Feature\nShow/hide individual mesh parts.\n\n```tsx\n<CabinViewer\n  projectId=\"xxx\"\n  features={{\n    meshToggle: { showInUI: true }\n  }}\n/>\n```\n\n### Transform Feature (New)\nEnable interactive mesh transformations with gizmo controls.\n\n```tsx\n<CabinViewer\n  projectId=\"xxx\"\n  features={{\n    transform: {\n      showGizmo: true,\n      meshConfigs: {\n        'mesh_name': {\n          enabled: true,\n          allowedProperties: {\n            position: { x: true, y: true, z: false },\n            rotation: { x: true, y: true, z: true },\n            scale: { x: true, y: true, z: true, uniform: true }\n          },\n          limits: { scale: { min: 0.5, max: 2.0 } }\n        }\n      }\n    }\n  }}\n/>\n```\n\n### Mesh States Feature (New)\nManage multiple states per mesh with smooth transitions.\n\n```tsx\n<CabinViewer\n  projectId=\"xxx\"\n  features={{\n    meshStates: {\n      meshConfigs: {\n        'door_mesh': {\n          enabled: true,\n          states: [\n            { id: 'closed', name: 'Closed', isDefault: true, transform: {...} },\n            { id: 'open', name: 'Open', transform: {...}, transition: { duration: 0.5, easing: 'easeOut' } }\n          ]\n        }\n      }\n    }\n  }}\n/>\n```\n\n### Mesh Events Feature (New)\nConfigure cursor interactions, collision detection, and event actions.\n\n```tsx\n<CabinViewer\n  projectId=\"xxx\"\n  features={{\n    meshEvents: {\n      meshConfigs: {\n        'interactive_mesh': {\n          enabled: true,\n          cursor: {\n            onHover: { cursor: 'pointer', highlight: true, highlightColor: '#ffffff' },\n            onClick: [{ type: 'changeState', params: { targetStateId: 'open' } }]\n          }\n        }\n      }\n    }\n  }}\n/>\n```\n\n---\n\n## API Reference\n\n### Mesh Configuration API\n\nAll mesh configurations are stored per-project and fetched from the dashboard API.\n\n#### GET /api/projects/{projectId}/mesh-configs\n\nFetch all mesh configurations for a project.\n\n**Query Parameters:**\n| Param | Type | Required | Description |\n|-------|------|----------|-------------|\n| modelId | UUID | No | Filter by specific model |\n\n**Response:**\n```json\n{\n  \"meshConfigs\": [\n    {\n      \"id\": \"uuid\",\n      \"projectId\": \"uuid\",\n      \"modelId\": \"uuid\",\n      \"meshName\": \"string\",\n      \"displayName\": \"string | null\",\n      \"thumbnailUrl\": \"string | null\",\n      \"displayOrder\": \"number | null\",\n      \"transformConfig\": {\n        \"enabled\": true,\n        \"allowedProperties\": { ... },\n        \"limits\": { ... },\n        \"allowFlip\": { \"x\": false, \"y\": false, \"z\": false }\n      },\n      \"statesConfig\": {\n        \"enabled\": true,\n        \"states\": [{ \"id\": \"uuid\", \"name\": \"string\", ... }],\n        \"currentStateId\": \"uuid | null\"\n      },\n      \"eventsConfig\": {\n        \"enabled\": true,\n        \"draggable\": { ... },\n        \"collision\": { ... },\n        \"cursor\": { ... },\n        \"events\": []\n      }\n    }\n  ]\n}\n```\n\n#### PATCH /api/projects/{projectId}/mesh-configs\n\nUpsert a mesh configuration.\n\n**Request Body:**\n```json\n{\n  \"modelId\": \"uuid (required)\",\n  \"meshName\": \"string (required)\",\n  \"displayName\": \"optional string\",\n  \"thumbnailUrl\": \"optional string\",\n  \"displayOrder\": \"optional number\",\n  \"transformConfig\": { /* MeshTransformConfig */ },\n  \"statesConfig\": { /* MeshStatesConfig */ },\n  \"eventsConfig\": { /* MeshEventsConfig */ }\n}\n```\n\n#### DELETE /api/projects/{projectId}/mesh-configs\n\nDelete a mesh configuration.\n\n**Query Parameters:**\n| Param | Type | Required | Description |\n|-------|------|----------|-------------|\n| modelId | UUID | Yes | Model ID |\n| meshName | string | Yes | Mesh name |\n\n---\n\n## Event System\n\nThe viewer uses an event bus for communication between features and parent application.\n\n### Using Events\n\n```tsx\nimport { EventBus, useEventBus } from '@cabin3d/viewer';\n\n// Subscribe to events\nuseEventBus('mesh:click', (payload) => {\n  console.log('Mesh clicked:', payload.meshName);\n});\n\n// Emit events\nEventBus.emit('mesh:changeState', { meshName: 'door', stateId: 'open' });\n```\n\n### Available Events\n\n| Event | Payload | Description |\n|-------|---------|-------------|\n| `mesh:click` | `{ meshName, position }` | When mesh is clicked |\n| `mesh:transformed` | `{ meshName, position, rotation, scale }` | After transform change |\n| `mesh:changeState` | `{ meshName, stateId }` | Request/notify state change |\n| `mesh:visibility` | `{ meshName, visible }` | Toggle mesh visibility |\n| `mesh:collision` | `{ meshName, targetMesh }` | Collision detected |\n| `mesh:showInfo` | `{ meshName, title, description }` | Show info popup |\n| `mesh:select` | `{ meshName }` | Select mesh for transform |\n| `model:loaded` | `{ scene }` | When model finishes loading |\n| `materials:update` | `[{ meshName, material, activeVariantId }]` | Update material assignments |\n\n### Event Actions\n\nActions that can be triggered by mesh events:\n\n| Action Type | Params | Description |\n|-------------|--------|-------------|\n| `changeState` | `{ targetStateId }` | Switch to a specific state |\n| `toggleVisibility` | - | Toggle mesh visibility |\n| `emit` | `{ eventName, eventData }` | Emit custom event |\n| `openUrl` | `{ url }` | Open URL in new tab |\n| `showInfo` | `{ title, description }` | Display info popup |\n\n---\n\n## Lazy Loading Features\n\nFeatures are code-split and loaded on demand:\n\n```tsx\n// Main bundle: ~7KB\nimport { CabinViewer } from '@cabin3d/viewer';\n\n// Optional: Import features directly (~4KB each)\nimport { MaterialsFeature } from '@cabin3d/viewer/features/materials';\nimport { MeshToggleFeature } from '@cabin3d/viewer/features/mesh-toggle';\n```\n\n## Bundle Sizes\n\n| Bundle | Size (uncompressed) |\n|--------|---------------------|\n| Core | 7.07 KB |\n| Materials | 4.28 KB |\n| Mesh Toggle | 2.40 KB |\n| Mesh Transform | ~2.5 KB |\n| Mesh States | ~2.7 KB |\n| Mesh Events | ~3.4 KB |\n| **Total** | **~22 KB** |\n\n## Props\n\n| Prop | Type | Description |\n|------|------|-------------|\n| `projectId` | `string` | Required. Your project ID |\n| `apiUrl` | `string` | API base URL (default: `http://localhost:3000/api`) |\n| `apiKey` | `string` | Optional. API key for authentication (deprecated, use domain allowlist instead) |\n| `features` | `object` | Feature configuration |\n| `ui` | `object` | UI customization (theme, toolbar position) |\n| `className` | `string` | CSS class for container |\n| `style` | `CSSProperties` | Inline styles |\n| `loadingComponent` | `ReactNode` | Custom loading state |\n| `errorComponent` | `FC<{error}>` | Custom error state |\n\n## Security\n\nFor production, configure allowed domains in your dashboard instead of using API keys:\n\n1. Go to Project Settings → Viewer Settings → Domains\n2. Add your production domains\n3. Remove `apiKey` prop from `<CabinViewer />`\n\n## License\n\nMIT\n","readmeFilename":"README.md"}