@webspatial/platform-visionos 0.1.11 → 0.1.13

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webspatial/platform-visionos",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
4
4
  "description": "Used to publish WebSpatial projects to Apple Vision Pro",
5
5
  "type": "commonjs",
6
6
  "engines": {
@@ -492,14 +492,14 @@ class CommandManager {
492
492
  }
493
493
 
494
494
  if let backgroundMaterial: BackgroundMaterial = data.update?.style?.backgroundMaterial {
495
- if target.isLoading {
496
- target.loadingStyles.backgroundMaterial = backgroundMaterial
495
+ if spatialWindowComponent.isLoading {
496
+ spatialWindowComponent.loadingStyles.backgroundMaterial = backgroundMaterial
497
497
  }
498
498
  spatialWindowComponent.backgroundMaterial = backgroundMaterial
499
499
  }
500
500
  if let cornerRadius: CornerRadius = data.update?.style?.cornerRadius {
501
- if target.isLoading {
502
- target.loadingStyles.cornerRadius = cornerRadius
501
+ if spatialWindowComponent.isLoading {
502
+ spatialWindowComponent.loadingStyles.cornerRadius = cornerRadius
503
503
  }
504
504
  spatialWindowComponent.cornerRadius = cornerRadius
505
505
  }
@@ -617,6 +617,15 @@ class CommandManager {
617
617
  WindowContainerMgr.Instance.updateWindowContainerPlainDefaultValues(cfg)
618
618
  return
619
619
  }
620
+
621
+ if let shouldClose = data.update?.close,
622
+ let wg = SpatialWindowContainer.getSpatialWindowContainer(target.readWindowContainerID(id: info.windowContainerID))
623
+ {
624
+ if shouldClose {
625
+ wg.destroy()
626
+ }
627
+ }
628
+
620
629
  target.completeEvent(requestID: info.requestID)
621
630
  }
622
631
 
@@ -726,6 +735,7 @@ struct JSResourceData: Codable {
726
735
  var windowID: String?
727
736
  var style: JSEntityStyle?
728
737
  var nextOpenSettings: JSNextOpen?
738
+ var close: Bool?
729
739
  var getBoundingBox: Bool?
730
740
  var zIndex: Double?
731
741
  var visible: Bool?