wgsl-play 0.0.28 → 0.0.30

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.
@@ -287,6 +287,9 @@ var WgslPlay = class extends HTMLElement {
287
287
  this.controls.setPlaying(false);
288
288
  }
289
289
  this.initialize();
290
+ upgradeProperty(this, "conditions");
291
+ upgradeProperty(this, "source");
292
+ upgradeProperty(this, "project");
290
293
  }
291
294
  disconnectedCallback() {
292
295
  this.resizeObserver.disconnect();
@@ -609,6 +612,14 @@ function getStyles() {
609
612
  }
610
613
  return styles;
611
614
  }
615
+ /** Absorb instance properties set before custom element upgrade. */
616
+ function upgradeProperty(el, prop) {
617
+ if (Object.hasOwn(el, prop)) {
618
+ const value = el[prop];
619
+ delete el[prop];
620
+ el[prop] = value;
621
+ }
622
+ }
612
623
  /** Convert file path to module path (e.g., "effects/main.wesl" -> "package::effects::main"). */
613
624
  function toModulePath(filePath) {
614
625
  return fileToModulePath(filePath, "package", false);
package/dist/WgslPlay.js CHANGED
@@ -1,3 +1,3 @@
1
- import { i as resetConfig, n as defaults, r as getConfig, t as WgslPlay } from "./WgslPlay-CCLBqqBa.js";
1
+ import { i as resetConfig, n as defaults, r as getConfig, t as WgslPlay } from "./WgslPlay-B5UCLKGK.js";
2
2
 
3
3
  export { WgslPlay, defaults, getConfig, resetConfig };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { i as resetConfig, n as defaults, r as getConfig, t as WgslPlay } from "./WgslPlay-CCLBqqBa.js";
1
+ import { i as resetConfig, n as defaults, r as getConfig, t as WgslPlay } from "./WgslPlay-B5UCLKGK.js";
2
2
 
3
3
  export * from "wesl-fetch"
4
4