@needle-tools/materialx 1.7.0-next.8333b4d → 1.7.0-next.9ec2906

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
16
16
 
17
17
  ### Fixed
18
18
  - Removed browser-hostile runtime imports of `three/src`, `UniformsLib`, and WebGL-only Three.js exports so the package can share the host application's Three.js import map in WebGL and WebGPU contexts.
19
+ - Added the JSON module import attribute for `package.json` so raw browser ESM imports can read the package version without MIME errors.
19
20
  - Corrected material parameter editing for color values, environment controls, and graph-loaded materials in the viewer examples.
20
21
  - Kept viewer debug panels and camera controls consistent across the material library, graph, shadows, and complex scenes.
21
22
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@needle-tools/materialx",
3
3
  "description": "MaterialX material support for three.js and Needle Engine – render physically based MaterialX shaders in the browser via WebAssembly",
4
- "version": "1.7.0-next.8333b4d",
4
+ "version": "1.7.0-next.9ec2906",
5
5
  "type": "module",
6
6
  "license": "PolyForm-Noncommercial-1.0.0",
7
7
  "main": "index.js",
package/src/constants.js CHANGED
@@ -1,5 +1,5 @@
1
- // Bare JSON import works in bundlers (Vite, Webpack, Rollup) and keeps the
2
- // runtime version tied to package.json. Node.js 22+ requires JSON import
3
- // attributes, so unit tests use tests/unit/register-json-loader.js.
4
- import pkg from '../package.json';
1
+ // Keep the runtime version tied to package.json. The import attribute is
2
+ // required by browsers and Node.js for JSON modules; bundlers also understand
3
+ // this shape.
4
+ import pkg from '../package.json' with { type: 'json' };
5
5
  export const VERSION = pkg.version;