@webspatial/platform-visionos 0.0.1 → 0.0.2

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.
Files changed (31) hide show
  1. package/package.json +1 -1
  2. package/web-spatial/libs/EventEmitter.swift +0 -7
  3. package/web-spatial/libs/SpatialComponent.swift +0 -7
  4. package/web-spatial/libs/SpatialEntity.swift +0 -7
  5. package/web-spatial/libs/SpatialInputComponent.swift +0 -7
  6. package/web-spatial/libs/SpatialMeshResource.swift +0 -7
  7. package/web-spatial/libs/SpatialModelComponent.swift +0 -7
  8. package/web-spatial/libs/SpatialObject.swift +0 -7
  9. package/web-spatial/libs/SpatialViewComponent.swift +0 -7
  10. package/web-spatial/libs/SpatialWindowComponent.swift +0 -8
  11. package/web-spatial/libs/SpatialWindowContainer.swift +0 -7
  12. package/web-spatial/libs/Utils/CommandManager.swift +0 -6
  13. package/web-spatial/libs/Utils/Logger.swift +0 -7
  14. package/web-spatial/libs/Utils/SceneManager.swift +0 -7
  15. package/web-spatial/libs/Utils/WindowContainerMgr.swift +0 -14
  16. package/web-spatial/libs/json/JsonParser.swift +0 -7
  17. package/web-spatial/libs/uiKitDelegate/Window.swift +0 -7
  18. package/web-spatial/libs/webView/UpdateSystem.swift +0 -7
  19. package/web-spatial/libs/webView/backend/NativeWebView.swift +0 -7
  20. package/web-spatial/views/ImmersiveView.swift +0 -7
  21. package/web-spatial/views/LoadingView.swift +0 -7
  22. package/web-spatial/views/MaterialWithBorderCornerModifier.swift +0 -6
  23. package/web-spatial/views/OpenDismissHandlerUI.swift +0 -7
  24. package/web-spatial/views/PlainWindowContainerView.swift +0 -7
  25. package/web-spatial/views/SpatialModel3DView.swift +0 -6
  26. package/web-spatial/views/SpatialWebViewUI.swift +0 -7
  27. package/web-spatial/views/VolumetricWindowContainerView.swift +0 -8
  28. package/web-spatial/views/ui/NavView.swift +0 -7
  29. package/web-spatial/web_spatialApp.swift +0 -7
  30. package/web-spatial.xcodeproj/project.pbxproj +14 -26
  31. package/web-spatialTests/web_spatialTests.swift +0 -34
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webspatial/platform-visionos",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "Used to publish WebSpatial projects to Apple Vision Pro",
5
5
  "type": "commonjs",
6
6
  "engines": {
@@ -1,10 +1,3 @@
1
- //
2
- // EventEmitter.swift
3
- // web-spatial
4
- //
5
- // Created by ByteDance on 9/10/24.
6
- //
7
-
8
1
  class EventEmitter {
9
2
  private var listeners: [String: [(_ object: Any, _ data: Any) -> Void]] = [:]
10
3
 
@@ -1,10 +1,3 @@
1
- //
2
- // SpatialComponent.swift
3
- // web-spatial
4
- //
5
- // Created by ByteDance on 9/10/24.
6
- //
7
-
8
1
  import Foundation
9
2
 
10
3
  class SpatialComponent: SpatialObject {
@@ -1,10 +1,3 @@
1
- //
2
- // SpatialEntity.swift
3
- // web-spatial
4
- //
5
- // Created by ByteDance on 9/10/24.
6
- //
7
-
8
1
  import Combine
9
2
  import Foundation
10
3
  import RealityKit
@@ -1,10 +1,3 @@
1
- //
2
- // SpatialInputComponent.swift
3
- // web-spatial
4
- //
5
- // Created by ByteDance on 9/10/24.
6
- //
7
-
8
1
  import Combine
9
2
  import Foundation
10
3
  import RealityKit
@@ -1,10 +1,3 @@
1
- //
2
- // SpatialMeshResource.swift
3
- // web-spatial
4
- //
5
- // Created by ByteDance on 9/10/24.
6
- //
7
-
8
1
  import Foundation
9
2
  import RealityKit
10
3
 
@@ -1,10 +1,3 @@
1
- //
2
- // SpatialModelComponent.swift
3
- // web-spatial
4
- //
5
- // Created by ByteDance on 9/10/24.
6
- //
7
-
8
1
  import Combine
9
2
  import Foundation
10
3
  import RealityKit
@@ -1,10 +1,3 @@
1
- //
2
- // SpatialObject.swift
3
- // web-spatial
4
- //
5
- // Created by ByteDance on 9/10/24.
6
- //
7
-
8
1
  import Foundation
9
2
 
10
3
  struct SpatialObjectInfo: Codable {
@@ -1,10 +1,3 @@
1
- //
2
- // SpatialViewComponent.swift
3
- // web-spatial
4
- //
5
- // Created by ByteDance on 9/10/24.
6
- //
7
-
8
1
  import Foundation
9
2
 
10
3
  @Observable
@@ -1,11 +1,3 @@
1
-
2
- //
3
- // SpatialWindowComponent.swift
4
- // web-spatial
5
- //
6
- // Created by ByteDance on 5/9/24.
7
- //
8
-
9
1
  import Combine
10
2
  import Foundation
11
3
  import RealityKit
@@ -1,10 +1,3 @@
1
- //
2
- // SpatialWindowContainer.swift
3
- // web-spatial
4
- //
5
- // Created by ByteDance on 9/10/24.
6
- //
7
-
8
1
  import Combine
9
2
  import Foundation
10
3
  import RealityKit
@@ -1,9 +1,3 @@
1
- //
2
- // CommandManager.swift
3
- // web-spatial
4
- //
5
- // Created by ByteDance on 2024/10/15.
6
- //
7
1
  import Foundation
8
2
  import RealityKit
9
3
  import SwiftUI
@@ -1,10 +1,3 @@
1
- //
2
- // Logger.swift
3
- // web-spatial
4
- //
5
- // Created by ByteDance on 7/18/24.
6
- //
7
-
8
1
  import Foundation
9
2
 
10
3
  class Logger {
@@ -1,10 +1,3 @@
1
- //
2
- // SceneManager.swift
3
- // web-spatial
4
- //
5
- // Created by ByteDance on 2025/2/6.
6
- //
7
-
8
1
  import Foundation
9
2
 
10
3
  class SceneManager {
@@ -1,17 +1,3 @@
1
- //
2
- // WindowContainerMgr.swift
3
- // web-spatial
4
- //
5
- // Created by ByteDance on 2024/12/13.
6
- //
7
-
8
- //
9
- // WindowContainerModel.swift
10
- // web-spatial
11
- //
12
- // Created by ByteDance on 2024/11/25.
13
- //
14
-
15
1
  import Combine
16
2
  import SwiftUI
17
3
  import UIKit
@@ -1,10 +1,3 @@
1
- //
2
- // JsonParser.swift
3
- // web-spatial
4
- //
5
- // Created by ByteDance on 5/9/24.
6
- //
7
-
8
1
  import Foundation
9
2
 
10
3
  class JsonParser {
@@ -1,10 +1,3 @@
1
- //
2
- // Window.swift
3
- // web-spatial
4
- //
5
- // Created by ByteDance on 7/3/24.
6
- //
7
-
8
1
  import Foundation
9
2
  import SwiftUI
10
3
 
@@ -1,10 +1,3 @@
1
- //
2
- // UpdateSystem.swift
3
- // web-spatial
4
- //
5
- // Created by ByteDance on 5/21/24.
6
- //
7
-
8
1
  import Foundation
9
2
  import RealityKit
10
3
 
@@ -1,10 +1,3 @@
1
- //
2
- // NativeWebView.swift
3
- // web-spatial
4
- //
5
- // Created by ByteDance on 5/9/24.
6
- //
7
-
8
1
  import Combine
9
2
  import Foundation
10
3
  import RealityKit
@@ -1,10 +1,3 @@
1
- //
2
- // ImmersiveView.swift
3
- // web-spatial
4
- //
5
- // Created by ByteDance on 5/8/24.
6
- //
7
-
8
1
  import RealityKit
9
2
  import RealityKitContent
10
3
  import SwiftUI
@@ -1,10 +1,3 @@
1
- //
2
- // LoadingView.swift
3
- // web-spatial
4
- //
5
- // Created by ByteDance on 2025/1/24.
6
- //
7
-
8
1
  import SwiftUI
9
2
  import SwiftUICore
10
3
 
@@ -1,9 +1,3 @@
1
- //
2
- // MaterialWithBorderCornerModifier.swift
3
- // web-spatial
4
- //
5
- // Created by ByteDance on 12/4/24.
6
- //
7
1
  import SwiftUI
8
2
 
9
3
  enum BackgroundMaterial: String, Codable {
@@ -1,10 +1,3 @@
1
- //
2
- // OpenDismissHandlerUI.swift
3
- // web-spatial
4
- //
5
- // Created by ByteDance on 8/20/24.
6
- //
7
-
8
1
  import SwiftUI
9
2
 
10
3
  struct OpenDismissHandlerUI: View {
@@ -1,10 +1,3 @@
1
- //
2
- // PlainWindowContainerView.swift
3
- // web-spatial
4
- //
5
- // Created by ByteDance on 5/9/24.
6
- //
7
-
8
1
  import RealityKit
9
2
  import SwiftUI
10
3
 
@@ -1,9 +1,3 @@
1
- //
2
- // SpatialModel3DView.swift
3
- // web-spatial
4
- //
5
- // Created by ByteDance on 1/21/25.
6
- //
7
1
  import RealityKit
8
2
  import SwiftUI
9
3
 
@@ -1,10 +1,3 @@
1
- //
2
- // SpatialWebViewUI.swift
3
- // web-spatial
4
- //
5
- // Created by ByteDance on 5/9/24.
6
- //
7
-
8
1
  import RealityKit
9
2
  import SwiftUI
10
3
 
@@ -1,11 +1,3 @@
1
-
2
- //
3
- // VolumetricWindowContainerView.swift
4
- // web-spatial
5
- //
6
- // Created by ByteDance on 5/9/24.
7
- //
8
-
9
1
  import typealias RealityKit.Attachment
10
2
  import typealias RealityKit.Entity
11
3
  import typealias RealityKit.MeshResource
@@ -1,10 +1,3 @@
1
- //
2
- // NavView.swift
3
- // web-spatial
4
- //
5
- // Created by ByteDance on 2025/1/8.
6
- //
7
-
8
1
  import SwiftUI
9
2
  import WebKit
10
3
 
@@ -1,10 +1,3 @@
1
- //
2
- // web_spatialApp.swift
3
- // web-spatial
4
- //
5
- // Created by ByteDance on 5/8/24.
6
- //
7
-
8
1
  import typealias RealityKit.Attachment
9
2
  import typealias RealityKit.Entity
10
3
  import typealias RealityKit.MeshResource
@@ -15,7 +15,6 @@
15
15
  2B2F1D6F2BEBFAAA006897EE /* ImmersiveView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B2F1D6E2BEBFAAA006897EE /* ImmersiveView.swift */; };
16
16
  2B2F1D712BEBFAAC006897EE /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2B2F1D702BEBFAAC006897EE /* Assets.xcassets */; };
17
17
  2B2F1D742BEBFAAC006897EE /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2B2F1D732BEBFAAC006897EE /* Preview Assets.xcassets */; };
18
- 2B2F1D7F2BEBFAAD006897EE /* web_spatialTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B2F1D7E2BEBFAAD006897EE /* web_spatialTests.swift */; };
19
18
  2B2F1D8F2BED4D7A006897EE /* JsonParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B2F1D8E2BED4D7A006897EE /* JsonParser.swift */; };
20
19
  2B2F1D912BED61A8006897EE /* NativeWebView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B2F1D902BED61A8006897EE /* NativeWebView.swift */; };
21
20
  2B2F1D992BEDA8EF006897EE /* VolumetricWindowContainerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B2F1D982BEDA8EF006897EE /* VolumetricWindowContainerView.swift */; };
@@ -61,15 +60,14 @@
61
60
  2B0B1C0F2C494E5400E644F9 /* Logger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Logger.swift; sourceTree = "<group>"; };
62
61
  2B0B43092CBE21540003CEF3 /* CommandManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommandManager.swift; sourceTree = "<group>"; };
63
62
  2B23CB3E2D0BEE6900E70D95 /* WindowContainerMgr.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WindowContainerMgr.swift; sourceTree = "<group>"; };
64
- 2B2F1D632BEBFAAA006897EE /* web-spatial.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "web-spatial.app"; sourceTree = BUILT_PRODUCTS_DIR; };
63
+ 2B2F1D632BEBFAAA006897EE /* WebSpatial.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WebSpatial.app; sourceTree = BUILT_PRODUCTS_DIR; };
65
64
  2B2F1D672BEBFAAA006897EE /* RealityKitContent */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = RealityKitContent; sourceTree = "<group>"; };
66
65
  2B2F1D6A2BEBFAAA006897EE /* web_spatialApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = web_spatialApp.swift; sourceTree = "<group>"; };
67
66
  2B2F1D6E2BEBFAAA006897EE /* ImmersiveView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImmersiveView.swift; sourceTree = "<group>"; };
68
67
  2B2F1D702BEBFAAC006897EE /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
69
68
  2B2F1D732BEBFAAC006897EE /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
70
69
  2B2F1D752BEBFAAC006897EE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
71
- 2B2F1D7A2BEBFAAD006897EE /* web-spatialTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "web-spatialTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
72
- 2B2F1D7E2BEBFAAD006897EE /* web_spatialTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = web_spatialTests.swift; sourceTree = "<group>"; };
70
+ 2B2F1D7A2BEBFAAD006897EE /* WebSpatial.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = WebSpatial.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
73
71
  2B2F1D8E2BED4D7A006897EE /* JsonParser.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JsonParser.swift; sourceTree = "<group>"; };
74
72
  2B2F1D902BED61A8006897EE /* NativeWebView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NativeWebView.swift; sourceTree = "<group>"; };
75
73
  2B2F1D982BEDA8EF006897EE /* VolumetricWindowContainerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VolumetricWindowContainerView.swift; sourceTree = "<group>"; };
@@ -136,7 +134,6 @@
136
134
  children = (
137
135
  2B2F1D652BEBFAAA006897EE /* web-spatial */,
138
136
  2B2F1D662BEBFAAA006897EE /* Packages */,
139
- 2B2F1D7D2BEBFAAD006897EE /* web-spatialTests */,
140
137
  2B2F1D642BEBFAAA006897EE /* Products */,
141
138
  );
142
139
  sourceTree = "<group>";
@@ -144,8 +141,8 @@
144
141
  2B2F1D642BEBFAAA006897EE /* Products */ = {
145
142
  isa = PBXGroup;
146
143
  children = (
147
- 2B2F1D632BEBFAAA006897EE /* web-spatial.app */,
148
- 2B2F1D7A2BEBFAAD006897EE /* web-spatialTests.xctest */,
144
+ 2B2F1D632BEBFAAA006897EE /* WebSpatial.app */,
145
+ 2B2F1D7A2BEBFAAD006897EE /* WebSpatial.xctest */,
149
146
  );
150
147
  name = Products;
151
148
  sourceTree = "<group>";
@@ -180,14 +177,6 @@
180
177
  path = "Preview Content";
181
178
  sourceTree = "<group>";
182
179
  };
183
- 2B2F1D7D2BEBFAAD006897EE /* web-spatialTests */ = {
184
- isa = PBXGroup;
185
- children = (
186
- 2B2F1D7E2BEBFAAD006897EE /* web_spatialTests.swift */,
187
- );
188
- path = "web-spatialTests";
189
- sourceTree = "<group>";
190
- };
191
180
  2B2F1D8A2BED4CD0006897EE /* libs */ = {
192
181
  isa = PBXGroup;
193
182
  children = (
@@ -291,7 +280,7 @@
291
280
  2B2F1D682BEBFAAA006897EE /* RealityKitContent */,
292
281
  );
293
282
  productName = "web-spatial";
294
- productReference = 2B2F1D632BEBFAAA006897EE /* web-spatial.app */;
283
+ productReference = 2B2F1D632BEBFAAA006897EE /* WebSpatial.app */;
295
284
  productType = "com.apple.product-type.application";
296
285
  };
297
286
  2B2F1D792BEBFAAD006897EE /* web-spatialTests */ = {
@@ -309,7 +298,7 @@
309
298
  );
310
299
  name = "web-spatialTests";
311
300
  productName = "web-spatialTests";
312
- productReference = 2B2F1D7A2BEBFAAD006897EE /* web-spatialTests.xctest */;
301
+ productReference = 2B2F1D7A2BEBFAAD006897EE /* WebSpatial.xctest */;
313
302
  productType = "com.apple.product-type.bundle.unit-test";
314
303
  };
315
304
  /* End PBXNativeTarget section */
@@ -417,7 +406,6 @@
417
406
  isa = PBXSourcesBuildPhase;
418
407
  buildActionMask = 2147483647;
419
408
  files = (
420
- 2B2F1D7F2BEBFAAD006897EE /* web_spatialTests.swift in Sources */,
421
409
  );
422
410
  runOnlyForDeploymentPostprocessing = 0;
423
411
  };
@@ -568,8 +556,8 @@
568
556
  "@executable_path/Frameworks",
569
557
  );
570
558
  MARKETING_VERSION = 1.0;
571
- PRODUCT_BUNDLE_IDENTIFIER = "com.webspatial.test";
572
- PRODUCT_NAME = "WebSpatial";
559
+ PRODUCT_BUNDLE_IDENTIFIER = com.webspatial.test;
560
+ PRODUCT_NAME = WebSpatial;
573
561
  SUPPORTED_PLATFORMS = "xros xrsimulator";
574
562
  SWIFT_EMIT_LOC_STRINGS = YES;
575
563
  SWIFT_VERSION = 5.0;
@@ -595,8 +583,8 @@
595
583
  "@executable_path/Frameworks",
596
584
  );
597
585
  MARKETING_VERSION = 1.0;
598
- PRODUCT_BUNDLE_IDENTIFIER = "com.webspatial.test";
599
- PRODUCT_NAME = "WebSpatial";
586
+ PRODUCT_BUNDLE_IDENTIFIER = com.webspatial.test;
587
+ PRODUCT_NAME = WebSpatial;
600
588
  SUPPORTED_PLATFORMS = "xros xrsimulator";
601
589
  SWIFT_EMIT_LOC_STRINGS = YES;
602
590
  SWIFT_VERSION = 5.0;
@@ -613,8 +601,8 @@
613
601
  CURRENT_PROJECT_VERSION = 1;
614
602
  GENERATE_INFOPLIST_FILE = YES;
615
603
  MARKETING_VERSION = 1.0;
616
- PRODUCT_BUNDLE_IDENTIFIER = "com.webspatial.test";
617
- PRODUCT_NAME = "WebSpatial";
604
+ PRODUCT_BUNDLE_IDENTIFIER = com.webspatial.test;
605
+ PRODUCT_NAME = WebSpatial;
618
606
  SUPPORTED_PLATFORMS = "xros xrsimulator";
619
607
  SWIFT_EMIT_LOC_STRINGS = NO;
620
608
  SWIFT_VERSION = 5.0;
@@ -632,8 +620,8 @@
632
620
  CURRENT_PROJECT_VERSION = 1;
633
621
  GENERATE_INFOPLIST_FILE = YES;
634
622
  MARKETING_VERSION = 1.0;
635
- PRODUCT_BUNDLE_IDENTIFIER = "com.webspatial.test";
636
- PRODUCT_NAME = "WebSpatial";
623
+ PRODUCT_BUNDLE_IDENTIFIER = com.webspatial.test;
624
+ PRODUCT_NAME = WebSpatial;
637
625
  SUPPORTED_PLATFORMS = "xros xrsimulator";
638
626
  SWIFT_EMIT_LOC_STRINGS = NO;
639
627
  SWIFT_VERSION = 5.0;
@@ -1,34 +0,0 @@
1
- //
2
- // web_spatialTests.swift
3
- // web-spatialTests
4
- //
5
- // Created by ByteDance on 5/8/24.
6
- //
7
-
8
- @testable import web_spatial
9
- import XCTest
10
-
11
- class web_spatialTests: XCTestCase {
12
- override func setUpWithError() throws {
13
- // Put setup code here. This method is called before the invocation of each test method in the class.
14
- }
15
-
16
- override func tearDownWithError() throws {
17
- // Put teardown code here. This method is called after the invocation of each test method in the class.
18
- }
19
-
20
- func testExample() throws {
21
- // This is an example of a functional test case.
22
- // Use XCTAssert and related functions to verify your tests produce the correct results.
23
- // Any test you write for XCTest can be annotated as throws and async.
24
- // Mark your test throws to produce an unexpected failure when your test encounters an uncaught error.
25
- // Mark your test async to allow awaiting for asynchronous code to complete. Check the results with assertions afterwards.
26
- }
27
-
28
- func testPerformanceExample() throws {
29
- // This is an example of a performance test case.
30
- measure {
31
- // Put the code you want to measure the time of here.
32
- }
33
- }
34
- }