@webspatial/platform-visionos 0.1.6 → 0.1.8

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.6",
3
+ "version": "0.1.8",
4
4
  "description": "Used to publish WebSpatial projects to Apple Vision Pro",
5
5
  "type": "commonjs",
6
6
  "engines": {
@@ -28,9 +28,12 @@ struct PWAManager: Codable {
28
28
  mutating func _init() {
29
29
  let urlType = start_url.split(separator: "://").first
30
30
  if !(urlType == "http" || urlType == "https") {
31
- start_url = Bundle.main.url(forResource: start_url, withExtension: "", subdirectory: "")!.absoluteString
32
- scope = "file://" + Bundle.main.bundlePath + "/" + scope
33
- scope = scope.replacingOccurrences(of: " ", with: "%20")
31
+ if scope == "" || scope == "/" {
32
+ scope = "./"
33
+ }
34
+ let startUrl = Bundle.main.url(forResource: start_url, withExtension: "", subdirectory: "")
35
+ start_url = startUrl!.absoluteString
36
+ scope = URL(string: scope, relativeTo: startUrl)!.absoluteString
34
37
  isLocal = true
35
38
  }
36
39
 
@@ -80,6 +83,7 @@ struct PWAManager: Codable {
80
83
  enum PWADisplayMode: Codable {
81
84
  case minimal
82
85
  case standalone
86
+ case fullscreen
83
87
  }
84
88
 
85
89
  struct PWAProtocol: Codable {
@@ -179,7 +179,7 @@ struct SpatialWebViewUI: View {
179
179
  .opacity(wv.opacity)
180
180
  .hidden(!ent.visible)
181
181
  .ornament(attachmentAnchor: .scene(.bottomTrailing), contentAlignment: .bottomTrailing) {
182
- if wv.isRootWebview() {
182
+ if wv.isRootWebview() && pwaManager.display != .fullscreen {
183
183
  NavView(swc: wv, navInfo: wv.navInfo)
184
184
  }
185
185
  }