@nice2dev/game-engine 1.3.15 → 1.3.16

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 (434) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/cjs/accessibility/Accessibility.js +152 -165
  3. package/dist/cjs/ai/AI.js +292 -294
  4. package/dist/cjs/ai/BehaviorTree.js +1029 -1113
  5. package/dist/cjs/ai/StateMachine.js +694 -756
  6. package/dist/cjs/animation/Animation.js +232 -241
  7. package/dist/cjs/audio/AudioAdvanced.js +221 -236
  8. package/dist/cjs/audio/AudioBridge.js +441 -435
  9. package/dist/cjs/audio/AudioManager.js +242 -259
  10. package/dist/cjs/build-cloud/BuildOrchestration.js +1059 -1098
  11. package/dist/cjs/build-cloud/GodotBuildCloud.js +641 -670
  12. package/dist/cjs/build-cloud/UnityBuildCloud.js +563 -610
  13. package/dist/cjs/build-cloud/UnrealBuildCloud.js +610 -635
  14. package/dist/cjs/core/EventBus.js +51 -56
  15. package/dist/cjs/core/GameClock.js +62 -66
  16. package/dist/cjs/core/GameConfig.js +72 -79
  17. package/dist/cjs/core/GameLoop.js +80 -89
  18. package/dist/cjs/core/ServiceLocator.js +61 -65
  19. package/dist/cjs/core/Validation.js +72 -82
  20. package/dist/cjs/core/math.js +108 -112
  21. package/dist/cjs/devtools/DevTools.js +542 -563
  22. package/dist/cjs/devtools/DeveloperExperience.js +521 -559
  23. package/dist/cjs/devtools/GameplayAnalytics.js +636 -646
  24. package/dist/cjs/dialogue/DialogueSystem.js +984 -986
  25. package/dist/cjs/docs/DocGenerator.js +339 -364
  26. package/dist/cjs/ecs/World.js +355 -371
  27. package/dist/cjs/editor/AchievementEditor.js +580 -636
  28. package/dist/cjs/editor/AdvancedEditor.js +184 -191
  29. package/dist/cjs/editor/AnimationRetargeting.js +696 -741
  30. package/dist/cjs/editor/AssetBrowser.js +1072 -1160
  31. package/dist/cjs/editor/AssetManager.js +187 -192
  32. package/dist/cjs/editor/ConsolePro.js +971 -1061
  33. package/dist/cjs/editor/CraftingEditor.js +680 -730
  34. package/dist/cjs/editor/DebugTools.js +187 -185
  35. package/dist/cjs/editor/DialogueSystem.js +844 -901
  36. package/dist/cjs/editor/LeaderboardSystem.js +429 -483
  37. package/dist/cjs/editor/NiceGameEditor.js +1903 -1201
  38. package/dist/cjs/editor/PrefabSystem.js +772 -838
  39. package/dist/cjs/editor/ProfilerPanel.js +649 -700
  40. package/dist/cjs/editor/QuestEditor.js +792 -839
  41. package/dist/cjs/editor/ReplaySystem.js +585 -634
  42. package/dist/cjs/editor/SceneEditor.js +176 -200
  43. package/dist/cjs/editor/ScreenshotMode.js +621 -688
  44. package/dist/cjs/editor/ShaderGraph.js +1556 -1582
  45. package/dist/cjs/editor/TimelineEditor.js +715 -778
  46. package/dist/cjs/editor/UndoRedoPro.js +830 -904
  47. package/dist/cjs/editor/VRARMode.js +582 -645
  48. package/dist/cjs/engine/NiceGameEngine.js +141 -164
  49. package/dist/cjs/engine/SaveSystem.js +441 -495
  50. package/dist/cjs/enterprise/Enterprise.js +254 -261
  51. package/dist/cjs/export/BevyExporter.js +927 -967
  52. package/dist/cjs/export/CocosExporter.js +644 -673
  53. package/dist/cjs/export/Construct3Exporter.js +783 -794
  54. package/dist/cjs/export/DefoldExporter.js +1028 -1069
  55. package/dist/cjs/export/GDevelopExporter.js +674 -708
  56. package/dist/cjs/export/GameMakerExporter.js +791 -805
  57. package/dist/cjs/export/GodotExporter.js +1003 -1045
  58. package/dist/cjs/export/MinecraftBedrockExporter.js +573 -578
  59. package/dist/cjs/export/MonoGameExporter.js +1265 -1293
  60. package/dist/cjs/export/Pico8Exporter.js +766 -812
  61. package/dist/cjs/export/PlatformExporter.js +188 -206
  62. package/dist/cjs/export/RPGMakerExporter.js +860 -879
  63. package/dist/cjs/export/RobloxExporter.js +883 -919
  64. package/dist/cjs/export/Solar2DExporter.js +1218 -1256
  65. package/dist/cjs/export/ThreeJSExporter.js +1006 -1073
  66. package/dist/cjs/export/Tic80Exporter.js +1210 -1267
  67. package/dist/cjs/export/UnityExporter.js +1116 -1131
  68. package/dist/cjs/export/UnrealExporter.js +889 -919
  69. package/dist/cjs/export/WebExporter.js +931 -970
  70. package/dist/cjs/export/index.js +42 -65
  71. package/dist/cjs/godot-integration/GodotAssetLibrary.js +659 -692
  72. package/dist/cjs/godot-integration/GodotImport.js +929 -1027
  73. package/dist/cjs/godot-integration/GodotLiveLink.js +915 -945
  74. package/dist/cjs/godot-integration/components/GodotProjectBrowser.js +911 -611
  75. package/dist/cjs/i18n/I18n.js +860 -900
  76. package/dist/cjs/i18n/useTranslation.js +84 -89
  77. package/dist/cjs/import/AsepriteImporter.js +658 -716
  78. package/dist/cjs/import/DragonBonesImporter.js +437 -461
  79. package/dist/cjs/import/GameMakerImporter.js +511 -521
  80. package/dist/cjs/import/GodotSceneImporter.js +788 -822
  81. package/dist/cjs/import/LDtkImporter.js +436 -454
  82. package/dist/cjs/import/Live2DImporter.js +497 -518
  83. package/dist/cjs/import/NdgFormat.js +424 -457
  84. package/dist/cjs/import/OgmoImporter.js +466 -493
  85. package/dist/cjs/import/RPGMakerImporter.js +451 -477
  86. package/dist/cjs/import/SceneImporter.js +378 -423
  87. package/dist/cjs/import/SpineImporter.js +511 -546
  88. package/dist/cjs/import/SpriterImporter.js +590 -613
  89. package/dist/cjs/import/TiledMapImporter.js +811 -846
  90. package/dist/cjs/import/UnitySceneImporter.js +687 -703
  91. package/dist/cjs/import/index.js +206 -251
  92. package/dist/cjs/index.js +275 -278
  93. package/dist/cjs/input/GamepadNavigation.js +185 -205
  94. package/dist/cjs/input/InputManager.js +397 -421
  95. package/dist/cjs/input/useGamepads.js +70 -81
  96. package/dist/cjs/integration/IconSprite.js +129 -256
  97. package/dist/cjs/inventory/InventorySystem.js +920 -995
  98. package/dist/cjs/kids/KidMode.js +997 -1022
  99. package/dist/cjs/kids/KidTools.js +570 -594
  100. package/dist/cjs/monetization/Monetization.js +170 -177
  101. package/dist/cjs/multiplayer/LocalMultiplayer.js +287 -287
  102. package/dist/cjs/multiplayer/MiniGameTypes.js +49 -59
  103. package/dist/cjs/native-engine/AnimationSystem.js +731 -806
  104. package/dist/cjs/native-engine/AssetPipeline.js +454 -515
  105. package/dist/cjs/native-engine/AudioEngine.js +763 -804
  106. package/dist/cjs/native-engine/InputSystem.js +1075 -1145
  107. package/dist/cjs/native-engine/NetworkingSystem.js +733 -793
  108. package/dist/cjs/native-engine/PhysicsEngine.js +583 -607
  109. package/dist/cjs/native-engine/RenderingEngine.js +302 -350
  110. package/dist/cjs/native-engine/SceneGraph.js +769 -808
  111. package/dist/cjs/network/MultiplayerTransport.js +97 -132
  112. package/dist/cjs/network/Networking.js +549 -564
  113. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/AbortController.js +21 -29
  114. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/AccessTokenHttpClient.js +40 -48
  115. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/DefaultHttpClient.js +35 -43
  116. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/DefaultReconnectPolicy.js +10 -15
  117. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/Errors.js +103 -135
  118. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/FetchHttpClient.js +131 -158
  119. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/HandshakeProtocol.js +39 -53
  120. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/HeaderNames.js +5 -8
  121. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/HttpClient.js +40 -48
  122. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/HttpConnection.js +494 -572
  123. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/HubConnection.js +826 -953
  124. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/HubConnectionBuilder.js +125 -146
  125. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/IHubProtocol.js +13 -23
  126. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/ILogger.js +11 -25
  127. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/ITransport.js +13 -24
  128. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/JsonHubProtocol.js +108 -121
  129. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/Loggers.js +10 -14
  130. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/LongPollingTransport.js +150 -185
  131. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/MessageBuffer.js +158 -196
  132. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/ServerSentEventsTransport.js +90 -105
  133. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/Subject.js +30 -35
  134. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/TextMessageFormat.js +16 -21
  135. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/Utils.js +215 -248
  136. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/WebSocketTransport.js +135 -157
  137. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/XhrHttpClient.js +76 -85
  138. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/index.js +24 -27
  139. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/pkg-version.js +3 -4
  140. package/dist/cjs/pathfinding/Pathfinding.js +245 -263
  141. package/dist/cjs/performance/AssetStreaming.js +561 -635
  142. package/dist/cjs/performance/BenchmarkSuite.js +283 -311
  143. package/dist/cjs/performance/DeltaCompression.js +467 -526
  144. package/dist/cjs/performance/DeterministicPhysics.js +450 -498
  145. package/dist/cjs/performance/ECSOptimization.js +644 -695
  146. package/dist/cjs/performance/GameSaveSystem.js +509 -556
  147. package/dist/cjs/performance/HotReload.js +447 -500
  148. package/dist/cjs/performance/InputRecording.js +511 -561
  149. package/dist/cjs/performance/InterestManagement.js +453 -500
  150. package/dist/cjs/performance/LocalizationRuntime.js +376 -423
  151. package/dist/cjs/performance/MemoryManagement.js +410 -470
  152. package/dist/cjs/performance/ModSupport.js +445 -496
  153. package/dist/cjs/performance/MultiThreadedPhysics.js +400 -443
  154. package/dist/cjs/performance/NetworkPrediction.js +424 -482
  155. package/dist/cjs/performance/ObjectPooling.js +569 -617
  156. package/dist/cjs/performance/Performance.js +174 -190
  157. package/dist/cjs/performance/PerformanceAdvanced.js +614 -637
  158. package/dist/cjs/performance/WebGPURenderer.js +656 -683
  159. package/dist/cjs/physics/PhysicsAdvanced.js +345 -379
  160. package/dist/cjs/physics/PhysicsEngine2D.js +391 -427
  161. package/dist/cjs/plugins/PluginSDK.js +432 -466
  162. package/dist/cjs/plugins/PluginTestKit.js +307 -330
  163. package/dist/cjs/procedural/Procedural.js +243 -254
  164. package/dist/cjs/procedural/WorldBuilding.js +297 -314
  165. package/dist/cjs/quest/QuestSystem.js +975 -932
  166. package/dist/cjs/release/MobileExport.js +157 -163
  167. package/dist/cjs/release/Release.js +225 -238
  168. package/dist/cjs/rendering/Camera2D.js +121 -124
  169. package/dist/cjs/rendering/Renderer2D.js +321 -335
  170. package/dist/cjs/rendering/WebGPURenderPipeline.js +632 -651
  171. package/dist/cjs/runtime3d/Runtime3D.js +359 -378
  172. package/dist/cjs/runtime3d/SceneEditor3D.js +252 -263
  173. package/dist/cjs/scene/SceneManager.js +177 -193
  174. package/dist/cjs/scripting/GraphToAST.js +574 -547
  175. package/dist/cjs/scripting/LanguageExporter.js +254 -279
  176. package/dist/cjs/scripting/NodeGraph.js +546 -570
  177. package/dist/cjs/scripting/ScriptAST.js +31 -39
  178. package/dist/cjs/scripting/VisualScripting2.js +1016 -1065
  179. package/dist/cjs/scripting/exporters/CSharpExporter.js +464 -496
  180. package/dist/cjs/scripting/exporters/GDScriptExporter.js +390 -442
  181. package/dist/cjs/scripting/exporters/LuaExporter.js +406 -447
  182. package/dist/cjs/scripting/exporters/PythonExporter.js +484 -549
  183. package/dist/cjs/scripting/exporters/RustExporter.js +459 -512
  184. package/dist/cjs/scripting/exporters/TypeScriptExporter.js +505 -556
  185. package/dist/cjs/social/Social.js +72 -80
  186. package/dist/cjs/systems/LightingSystem.js +844 -931
  187. package/dist/cjs/systems/ParticleSystem2.js +1447 -1451
  188. package/dist/cjs/systems/PhysicsDebugSystem.js +1070 -1141
  189. package/dist/cjs/systems/TerrainSystem.js +985 -1098
  190. package/dist/cjs/templates/ActionTemplates.js +296 -309
  191. package/dist/cjs/templates/FightingTemplate.js +417 -463
  192. package/dist/cjs/templates/MetroidvaniaTemplate.js +353 -405
  193. package/dist/cjs/templates/PartyTemplates.js +190 -202
  194. package/dist/cjs/templates/PuzzleTemplates.js +245 -261
  195. package/dist/cjs/templates/RPGTemplates.js +160 -178
  196. package/dist/cjs/templates/SportsTemplates.js +237 -250
  197. package/dist/cjs/templates/StrategyTemplates.js +143 -153
  198. package/dist/cjs/templates/SurvivalTemplate.js +336 -380
  199. package/dist/cjs/templates/WaveDefense.js +499 -526
  200. package/dist/cjs/tilemap/Tilemap.js +207 -214
  201. package/dist/cjs/tutorials/TutorialBranching.js +396 -417
  202. package/dist/cjs/tutorials/TutorialEngine.js +888 -931
  203. package/dist/cjs/tutorials/TutorialOverlay.js +602 -640
  204. package/dist/cjs/tutorials/content/Tutorials_T05_T08.js +787 -809
  205. package/dist/cjs/tutorials/content/Tutorials_T09_T11.js +736 -756
  206. package/dist/cjs/tutorials/content/Tutorials_T12_T15.js +754 -778
  207. package/dist/cjs/ui/GameUI.js +295 -312
  208. package/dist/cjs/unity-integration/UnityAssetStore.js +700 -741
  209. package/dist/cjs/unity-integration/UnityImport.js +1066 -1176
  210. package/dist/cjs/unity-integration/UnityLiveLink.js +934 -981
  211. package/dist/cjs/unity-integration/components/UnityAssetStoreBrowser.js +1233 -757
  212. package/dist/cjs/unity-integration/components/UnityProjectBrowser.js +1240 -768
  213. package/dist/cjs/unreal-integration/UnrealImport.js +391 -412
  214. package/dist/cjs/unreal-integration/UnrealLiveLink.js +1102 -1137
  215. package/dist/cjs/unreal-integration/UnrealMarketplace.js +436 -473
  216. package/dist/cjs/unreal-integration/components/UnrealProjectBrowser.js +1150 -767
  217. package/dist/cjs/xr/ARVR.js +167 -175
  218. package/dist/esm/accessibility/Accessibility.js +160 -164
  219. package/dist/esm/ai/AI.js +310 -293
  220. package/dist/esm/ai/BehaviorTree.js +1057 -1112
  221. package/dist/esm/ai/StateMachine.js +709 -755
  222. package/dist/esm/animation/Animation.js +237 -240
  223. package/dist/esm/audio/AudioAdvanced.js +239 -235
  224. package/dist/esm/audio/AudioBridge.js +448 -434
  225. package/dist/esm/audio/AudioManager.js +243 -258
  226. package/dist/esm/build-cloud/BuildOrchestration.js +1071 -1097
  227. package/dist/esm/build-cloud/GodotBuildCloud.js +647 -669
  228. package/dist/esm/build-cloud/UnityBuildCloud.js +571 -609
  229. package/dist/esm/build-cloud/UnrealBuildCloud.js +615 -634
  230. package/dist/esm/core/EventBus.js +52 -55
  231. package/dist/esm/core/GameClock.js +63 -65
  232. package/dist/esm/core/GameConfig.js +77 -78
  233. package/dist/esm/core/GameLoop.js +81 -88
  234. package/dist/esm/core/ServiceLocator.js +63 -64
  235. package/dist/esm/core/Validation.js +82 -81
  236. package/dist/esm/core/math.js +109 -111
  237. package/dist/esm/devtools/DevTools.js +546 -562
  238. package/dist/esm/devtools/DeveloperExperience.js +535 -558
  239. package/dist/esm/devtools/GameplayAnalytics.js +647 -645
  240. package/dist/esm/dialogue/DialogueSystem.js +998 -985
  241. package/dist/esm/docs/DocGenerator.js +342 -363
  242. package/dist/esm/ecs/World.js +358 -370
  243. package/dist/esm/editor/AchievementEditor.js +584 -635
  244. package/dist/esm/editor/AdvancedEditor.js +191 -190
  245. package/dist/esm/editor/AnimationRetargeting.js +700 -740
  246. package/dist/esm/editor/AssetBrowser.js +1078 -1159
  247. package/dist/esm/editor/AssetManager.js +188 -191
  248. package/dist/esm/editor/ConsolePro.js +977 -1060
  249. package/dist/esm/editor/CraftingEditor.js +684 -729
  250. package/dist/esm/editor/DebugTools.js +194 -184
  251. package/dist/esm/editor/DialogueSystem.js +849 -900
  252. package/dist/esm/editor/LeaderboardSystem.js +433 -482
  253. package/dist/esm/editor/NiceGameEditor.js +1908 -1200
  254. package/dist/esm/editor/PrefabSystem.js +777 -837
  255. package/dist/esm/editor/ProfilerPanel.js +654 -699
  256. package/dist/esm/editor/QuestEditor.js +795 -838
  257. package/dist/esm/editor/ReplaySystem.js +591 -633
  258. package/dist/esm/editor/SceneEditor.js +189 -199
  259. package/dist/esm/editor/ScreenshotMode.js +628 -687
  260. package/dist/esm/editor/ShaderGraph.js +1565 -1581
  261. package/dist/esm/editor/TimelineEditor.js +733 -777
  262. package/dist/esm/editor/UndoRedoPro.js +835 -903
  263. package/dist/esm/editor/VRARMode.js +586 -644
  264. package/dist/esm/engine/NiceGameEngine.js +142 -163
  265. package/dist/esm/engine/SaveSystem.js +447 -494
  266. package/dist/esm/enterprise/Enterprise.js +265 -260
  267. package/dist/esm/export/BevyExporter.js +929 -966
  268. package/dist/esm/export/CocosExporter.js +646 -672
  269. package/dist/esm/export/Construct3Exporter.js +785 -793
  270. package/dist/esm/export/DefoldExporter.js +1030 -1068
  271. package/dist/esm/export/GDevelopExporter.js +676 -707
  272. package/dist/esm/export/GameMakerExporter.js +793 -804
  273. package/dist/esm/export/GodotExporter.js +1004 -1044
  274. package/dist/esm/export/MinecraftBedrockExporter.js +575 -577
  275. package/dist/esm/export/MonoGameExporter.js +1267 -1292
  276. package/dist/esm/export/Pico8Exporter.js +768 -811
  277. package/dist/esm/export/PlatformExporter.js +193 -205
  278. package/dist/esm/export/RPGMakerExporter.js +862 -878
  279. package/dist/esm/export/RobloxExporter.js +885 -918
  280. package/dist/esm/export/Solar2DExporter.js +1220 -1255
  281. package/dist/esm/export/ThreeJSExporter.js +1007 -1072
  282. package/dist/esm/export/Tic80Exporter.js +1212 -1266
  283. package/dist/esm/export/UnityExporter.js +1117 -1130
  284. package/dist/esm/export/UnrealExporter.js +891 -918
  285. package/dist/esm/export/WebExporter.js +933 -969
  286. package/dist/esm/export/index.js +86 -71
  287. package/dist/esm/godot-integration/GodotAssetLibrary.js +663 -691
  288. package/dist/esm/godot-integration/GodotImport.js +935 -1026
  289. package/dist/esm/godot-integration/GodotLiveLink.js +918 -944
  290. package/dist/esm/godot-integration/components/GodotProjectBrowser.js +912 -610
  291. package/dist/esm/i18n/I18n.js +871 -899
  292. package/dist/esm/i18n/useTranslation.js +88 -88
  293. package/dist/esm/import/AsepriteImporter.js +637 -715
  294. package/dist/esm/import/DragonBonesImporter.js +417 -460
  295. package/dist/esm/import/GameMakerImporter.js +491 -520
  296. package/dist/esm/import/GodotSceneImporter.js +767 -821
  297. package/dist/esm/import/LDtkImporter.js +415 -453
  298. package/dist/esm/import/Live2DImporter.js +477 -517
  299. package/dist/esm/import/NdgFormat.js +410 -456
  300. package/dist/esm/import/OgmoImporter.js +446 -492
  301. package/dist/esm/import/RPGMakerImporter.js +431 -476
  302. package/dist/esm/import/SceneImporter.js +385 -422
  303. package/dist/esm/import/SpineImporter.js +491 -545
  304. package/dist/esm/import/SpriterImporter.js +570 -612
  305. package/dist/esm/import/TiledMapImporter.js +790 -845
  306. package/dist/esm/import/UnitySceneImporter.js +666 -702
  307. package/dist/esm/import/index.js +247 -258
  308. package/dist/esm/index.js +1332 -188
  309. package/dist/esm/input/GamepadNavigation.js +187 -204
  310. package/dist/esm/input/InputManager.js +401 -420
  311. package/dist/esm/input/useGamepads.js +72 -80
  312. package/dist/esm/integration/IconSprite.js +143 -255
  313. package/dist/esm/inventory/InventorySystem.js +925 -994
  314. package/dist/esm/kids/KidMode.js +1003 -1021
  315. package/dist/esm/kids/KidTools.js +573 -593
  316. package/dist/esm/monetization/Monetization.js +180 -176
  317. package/dist/esm/multiplayer/LocalMultiplayer.js +290 -286
  318. package/dist/esm/multiplayer/MiniGameTypes.js +58 -58
  319. package/dist/esm/native-engine/AnimationSystem.js +735 -805
  320. package/dist/esm/native-engine/AssetPipeline.js +456 -514
  321. package/dist/esm/native-engine/AudioEngine.js +765 -803
  322. package/dist/esm/native-engine/InputSystem.js +1079 -1144
  323. package/dist/esm/native-engine/NetworkingSystem.js +740 -792
  324. package/dist/esm/native-engine/PhysicsEngine.js +585 -606
  325. package/dist/esm/native-engine/RenderingEngine.js +304 -349
  326. package/dist/esm/native-engine/SceneGraph.js +773 -807
  327. package/dist/esm/network/MultiplayerTransport.js +99 -131
  328. package/dist/esm/network/Networking.js +556 -563
  329. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/AbortController.js +22 -28
  330. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/AccessTokenHttpClient.js +41 -47
  331. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/DefaultHttpClient.js +36 -42
  332. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/DefaultReconnectPolicy.js +11 -14
  333. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/Errors.js +111 -134
  334. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/FetchHttpClient.js +132 -157
  335. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/HandshakeProtocol.js +40 -52
  336. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/HeaderNames.js +6 -7
  337. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/HttpClient.js +42 -47
  338. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/HttpConnection.js +496 -571
  339. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/HubConnection.js +828 -952
  340. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/HubConnectionBuilder.js +126 -145
  341. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/IHubProtocol.js +14 -23
  342. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/ILogger.js +12 -25
  343. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/ITransport.js +15 -24
  344. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/JsonHubProtocol.js +109 -120
  345. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/Loggers.js +11 -13
  346. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/LongPollingTransport.js +151 -184
  347. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/MessageBuffer.js +159 -195
  348. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/ServerSentEventsTransport.js +91 -104
  349. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/Subject.js +31 -34
  350. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/TextMessageFormat.js +17 -20
  351. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/Utils.js +230 -248
  352. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/WebSocketTransport.js +136 -156
  353. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/XhrHttpClient.js +77 -84
  354. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/index.js +31 -12
  355. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/pkg-version.js +4 -3
  356. package/dist/esm/pathfinding/Pathfinding.js +249 -262
  357. package/dist/esm/performance/AssetStreaming.js +567 -634
  358. package/dist/esm/performance/BenchmarkSuite.js +285 -310
  359. package/dist/esm/performance/DeltaCompression.js +478 -525
  360. package/dist/esm/performance/DeterministicPhysics.js +479 -497
  361. package/dist/esm/performance/ECSOptimization.js +653 -694
  362. package/dist/esm/performance/GameSaveSystem.js +515 -555
  363. package/dist/esm/performance/HotReload.js +454 -499
  364. package/dist/esm/performance/InputRecording.js +520 -560
  365. package/dist/esm/performance/InterestManagement.js +460 -499
  366. package/dist/esm/performance/LocalizationRuntime.js +382 -422
  367. package/dist/esm/performance/MemoryManagement.js +415 -469
  368. package/dist/esm/performance/ModSupport.js +455 -495
  369. package/dist/esm/performance/MultiThreadedPhysics.js +408 -442
  370. package/dist/esm/performance/NetworkPrediction.js +436 -481
  371. package/dist/esm/performance/ObjectPooling.js +582 -616
  372. package/dist/esm/performance/Performance.js +182 -189
  373. package/dist/esm/performance/PerformanceAdvanced.js +621 -636
  374. package/dist/esm/performance/WebGPURenderer.js +660 -682
  375. package/dist/esm/physics/PhysicsAdvanced.js +359 -378
  376. package/dist/esm/physics/PhysicsEngine2D.js +393 -426
  377. package/dist/esm/plugins/PluginSDK.js +435 -465
  378. package/dist/esm/plugins/PluginTestKit.js +315 -329
  379. package/dist/esm/procedural/Procedural.js +248 -253
  380. package/dist/esm/procedural/WorldBuilding.js +316 -313
  381. package/dist/esm/quest/QuestSystem.js +982 -931
  382. package/dist/esm/release/MobileExport.js +163 -162
  383. package/dist/esm/release/Release.js +234 -237
  384. package/dist/esm/rendering/Camera2D.js +122 -123
  385. package/dist/esm/rendering/Renderer2D.js +323 -334
  386. package/dist/esm/rendering/WebGPURenderPipeline.js +647 -650
  387. package/dist/esm/runtime3d/Runtime3D.js +368 -377
  388. package/dist/esm/runtime3d/SceneEditor3D.js +268 -262
  389. package/dist/esm/scene/SceneManager.js +178 -192
  390. package/dist/esm/scripting/GraphToAST.js +576 -546
  391. package/dist/esm/scripting/LanguageExporter.js +263 -278
  392. package/dist/esm/scripting/NodeGraph.js +550 -569
  393. package/dist/esm/scripting/ScriptAST.js +45 -38
  394. package/dist/esm/scripting/VisualScripting2.js +1025 -1064
  395. package/dist/esm/scripting/exporters/CSharpExporter.js +465 -495
  396. package/dist/esm/scripting/exporters/GDScriptExporter.js +391 -441
  397. package/dist/esm/scripting/exporters/LuaExporter.js +407 -446
  398. package/dist/esm/scripting/exporters/PythonExporter.js +485 -548
  399. package/dist/esm/scripting/exporters/RustExporter.js +460 -511
  400. package/dist/esm/scripting/exporters/TypeScriptExporter.js +506 -555
  401. package/dist/esm/social/Social.js +77 -79
  402. package/dist/esm/systems/LightingSystem.js +855 -930
  403. package/dist/esm/systems/ParticleSystem2.js +1453 -1450
  404. package/dist/esm/systems/PhysicsDebugSystem.js +1078 -1140
  405. package/dist/esm/systems/TerrainSystem.js +996 -1097
  406. package/dist/esm/templates/ActionTemplates.js +307 -308
  407. package/dist/esm/templates/FightingTemplate.js +439 -462
  408. package/dist/esm/templates/MetroidvaniaTemplate.js +391 -404
  409. package/dist/esm/templates/PartyTemplates.js +206 -201
  410. package/dist/esm/templates/PuzzleTemplates.js +260 -260
  411. package/dist/esm/templates/RPGTemplates.js +172 -177
  412. package/dist/esm/templates/SportsTemplates.js +251 -249
  413. package/dist/esm/templates/StrategyTemplates.js +158 -152
  414. package/dist/esm/templates/SurvivalTemplate.js +367 -379
  415. package/dist/esm/templates/WaveDefense.js +501 -525
  416. package/dist/esm/tilemap/Tilemap.js +209 -213
  417. package/dist/esm/tutorials/TutorialBranching.js +399 -416
  418. package/dist/esm/tutorials/TutorialEngine.js +893 -930
  419. package/dist/esm/tutorials/TutorialOverlay.js +603 -639
  420. package/dist/esm/tutorials/content/Tutorials_T05_T08.js +792 -808
  421. package/dist/esm/tutorials/content/Tutorials_T09_T11.js +740 -755
  422. package/dist/esm/tutorials/content/Tutorials_T12_T15.js +759 -777
  423. package/dist/esm/ui/GameUI.js +296 -311
  424. package/dist/esm/unity-integration/UnityAssetStore.js +704 -740
  425. package/dist/esm/unity-integration/UnityImport.js +1071 -1175
  426. package/dist/esm/unity-integration/UnityLiveLink.js +938 -980
  427. package/dist/esm/unity-integration/components/UnityAssetStoreBrowser.js +1234 -756
  428. package/dist/esm/unity-integration/components/UnityProjectBrowser.js +1241 -767
  429. package/dist/esm/unreal-integration/UnrealImport.js +395 -411
  430. package/dist/esm/unreal-integration/UnrealLiveLink.js +1105 -1136
  431. package/dist/esm/unreal-integration/UnrealMarketplace.js +442 -472
  432. package/dist/esm/unreal-integration/components/UnrealProjectBrowser.js +1151 -766
  433. package/dist/esm/xr/ARVR.js +181 -174
  434. package/package.json +7 -12
@@ -1,835 +1,1309 @@
1
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
- import { NiceIcon, clickOnActivationKey } from '@nice2dev/ui';
3
- import { forwardRef, useReducer, useMemo, useCallback, useImperativeHandle, createContext, useContext } from 'react';
4
-
1
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
+ import { NiceIcon, clickOnActivationKey } from "@nice2dev/ui";
3
+ import { forwardRef, useReducer, useMemo, useCallback, useImperativeHandle, createContext, useContext } from "react";
5
4
  const DEFAULT_THEME = {
6
- background: '#1e1e2e',
7
- panelBackground: '#252536',
8
- headerBackground: '#1a1a28',
9
- itemBackground: 'rgba(255,255,255,0.02)',
10
- itemHover: 'rgba(255,255,255,0.05)',
11
- itemSelected: 'rgba(99, 102, 241, 0.2)',
12
- textPrimary: '#e2e8f0',
13
- textSecondary: '#94a3b8',
14
- accent: '#6366f1',
15
- success: '#22c55e',
16
- warning: '#f59e0b',
17
- danger: '#ef4444',
18
- border: 'rgba(255,255,255,0.1)',
19
- folderColor: '#fbbf24',
20
- sceneColor: '#3b82f6',
21
- prefabColor: '#10b981',
22
- materialColor: '#ec4899',
23
- scriptColor: '#f97316',
5
+ background: "#1e1e2e",
6
+ panelBackground: "#252536",
7
+ headerBackground: "#1a1a28",
8
+ itemBackground: "rgba(255,255,255,0.02)",
9
+ itemHover: "rgba(255,255,255,0.05)",
10
+ itemSelected: "rgba(99, 102, 241, 0.2)",
11
+ textPrimary: "#e2e8f0",
12
+ textSecondary: "#94a3b8",
13
+ accent: "#6366f1",
14
+ success: "#22c55e",
15
+ warning: "#f59e0b",
16
+ danger: "#ef4444",
17
+ border: "rgba(255,255,255,0.1)",
18
+ folderColor: "#fbbf24",
19
+ sceneColor: "#3b82f6",
20
+ prefabColor: "#10b981",
21
+ materialColor: "#ec4899",
22
+ scriptColor: "#f97316"
24
23
  };
25
24
  function browserReducer(state, action) {
26
- switch (action.type) {
27
- case 'SET_PROJECT':
28
- return { ...state, projectInfo: action.info, selectedAssets: new Set() };
29
- case 'CLEAR_PROJECT':
30
- return { ...state, projectInfo: null, selectedAssets: new Set() };
31
- case 'SELECT_ASSET':
32
- if (action.additive) {
33
- const newSet = new Set(state.selectedAssets);
34
- if (newSet.has(action.id)) {
35
- newSet.delete(action.id);
36
- }
37
- else {
38
- newSet.add(action.id);
39
- }
40
- return { ...state, selectedAssets: newSet };
41
- }
42
- return { ...state, selectedAssets: new Set([action.id]) };
43
- case 'SELECT_ALL':
44
- return {
45
- ...state,
46
- selectedAssets: new Set(state.projectInfo?.assets.map((a) => a.id) ?? []),
47
- };
48
- case 'DESELECT_ALL':
49
- return { ...state, selectedAssets: new Set() };
50
- case 'TOGGLE_FOLDER': {
51
- const expanded = new Set(state.expandedFolders);
52
- if (expanded.has(action.path)) {
53
- expanded.delete(action.path);
54
- }
55
- else {
56
- expanded.add(action.path);
57
- }
58
- return { ...state, expandedFolders: expanded };
25
+ switch (action.type) {
26
+ case "SET_PROJECT":
27
+ return { ...state, projectInfo: action.info, selectedAssets: /* @__PURE__ */ new Set() };
28
+ case "CLEAR_PROJECT":
29
+ return { ...state, projectInfo: null, selectedAssets: /* @__PURE__ */ new Set() };
30
+ case "SELECT_ASSET":
31
+ if (action.additive) {
32
+ const newSet = new Set(state.selectedAssets);
33
+ if (newSet.has(action.id)) {
34
+ newSet.delete(action.id);
35
+ } else {
36
+ newSet.add(action.id);
59
37
  }
60
- case 'SET_SEARCH':
61
- return { ...state, searchQuery: action.query };
62
- case 'SET_FILTER':
63
- return { ...state, filterType: action.filter };
64
- case 'SET_SORT':
65
- return { ...state, sortBy: action.by, sortOrder: action.order ?? state.sortOrder };
66
- case 'SET_VIEW_MODE':
67
- return { ...state, viewMode: action.mode };
68
- case 'SET_PREVIEW':
69
- return { ...state, previewAsset: action.asset };
70
- case 'SET_IMPORT_PROGRESS':
71
- return { ...state, importProgress: action.progress };
72
- case 'SET_LIVE_LINK_STATUS':
73
- return { ...state, liveLinkStatus: action.status };
74
- case 'SET_TAB':
75
- return { ...state, tab: action.tab };
76
- default:
77
- return state;
38
+ return { ...state, selectedAssets: newSet };
39
+ }
40
+ return { ...state, selectedAssets: /* @__PURE__ */ new Set([action.id]) };
41
+ case "SELECT_ALL":
42
+ return {
43
+ ...state,
44
+ selectedAssets: new Set(state.projectInfo?.assets.map((a) => a.id) ?? [])
45
+ };
46
+ case "DESELECT_ALL":
47
+ return { ...state, selectedAssets: /* @__PURE__ */ new Set() };
48
+ case "TOGGLE_FOLDER": {
49
+ const expanded = new Set(state.expandedFolders);
50
+ if (expanded.has(action.path)) {
51
+ expanded.delete(action.path);
52
+ } else {
53
+ expanded.add(action.path);
54
+ }
55
+ return { ...state, expandedFolders: expanded };
78
56
  }
57
+ case "SET_SEARCH":
58
+ return { ...state, searchQuery: action.query };
59
+ case "SET_FILTER":
60
+ return { ...state, filterType: action.filter };
61
+ case "SET_SORT":
62
+ return { ...state, sortBy: action.by, sortOrder: action.order ?? state.sortOrder };
63
+ case "SET_VIEW_MODE":
64
+ return { ...state, viewMode: action.mode };
65
+ case "SET_PREVIEW":
66
+ return { ...state, previewAsset: action.asset };
67
+ case "SET_IMPORT_PROGRESS":
68
+ return { ...state, importProgress: action.progress };
69
+ case "SET_LIVE_LINK_STATUS":
70
+ return { ...state, liveLinkStatus: action.status };
71
+ case "SET_TAB":
72
+ return { ...state, tab: action.tab };
73
+ default:
74
+ return state;
75
+ }
79
76
  }
80
77
  const INITIAL_STATE = {
81
- projectInfo: null,
82
- selectedAssets: new Set(),
83
- expandedFolders: new Set(['Assets']),
84
- searchQuery: '',
85
- filterType: 'all',
86
- sortBy: 'name',
87
- sortOrder: 'asc',
88
- viewMode: 'tree',
89
- previewAsset: null,
90
- importProgress: null,
91
- liveLinkStatus: { connected: false, playMode: 'stopped' },
92
- tab: 'assets',
78
+ projectInfo: null,
79
+ selectedAssets: /* @__PURE__ */ new Set(),
80
+ expandedFolders: /* @__PURE__ */ new Set(["Assets"]),
81
+ searchQuery: "",
82
+ filterType: "all",
83
+ sortBy: "name",
84
+ sortOrder: "asc",
85
+ viewMode: "tree",
86
+ previewAsset: null,
87
+ importProgress: null,
88
+ liveLinkStatus: { connected: false, playMode: "stopped" },
89
+ tab: "assets"
93
90
  };
94
91
  const BrowserContext = /* @__PURE__ */ createContext(null);
95
92
  function useBrowser() {
96
- const ctx = useContext(BrowserContext);
97
- if (!ctx) {
98
- throw new Error('useBrowser must be used within UnityProjectBrowser');
99
- }
100
- return ctx;
93
+ const ctx = useContext(BrowserContext);
94
+ if (!ctx) {
95
+ throw new Error("useBrowser must be used within UnityProjectBrowser");
96
+ }
97
+ return ctx;
101
98
  }
102
- /* ── Helper Functions ─────────────────────────────────────────── */
103
99
  function getAssetIcon(type) {
104
- switch (type) {
105
- case 'scene':
106
- return 'video';
107
- case 'prefab':
108
- return 'box';
109
- case 'material':
110
- return 'palette';
111
- case 'texture':
112
- return 'image';
113
- case 'mesh':
114
- return 'hexagon';
115
- case 'animation':
116
- return 'play';
117
- case 'script':
118
- return 'code';
119
- case 'audio':
120
- return 'volume';
121
- default:
122
- return 'file';
123
- }
100
+ switch (type) {
101
+ case "scene":
102
+ return "video";
103
+ case "prefab":
104
+ return "box";
105
+ case "material":
106
+ return "palette";
107
+ case "texture":
108
+ return "image";
109
+ case "mesh":
110
+ return "hexagon";
111
+ case "animation":
112
+ return "play";
113
+ case "script":
114
+ return "code";
115
+ case "audio":
116
+ return "volume";
117
+ default:
118
+ return "file";
119
+ }
124
120
  }
125
121
  function formatFileSize(bytes) {
126
- if (bytes < 1024) {
127
- return `${bytes} B`;
128
- }
129
- if (bytes < 1024 * 1024) {
130
- return `${(bytes / 1024).toFixed(1)} KB`;
131
- }
132
- return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
122
+ if (bytes < 1024) {
123
+ return `${bytes} B`;
124
+ }
125
+ if (bytes < 1024 * 1024) {
126
+ return `${(bytes / 1024).toFixed(1)} KB`;
127
+ }
128
+ return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
133
129
  }
134
- /* ── Header Component ─────────────────────────────────────────── */
135
130
  const BrowserHeader = ({ projectPath }) => {
136
- const { state, dispatch: _dispatch, theme, connectLiveLink, disconnectLiveLink } = useBrowser();
137
- return (jsxs("div", { style: {
138
- display: 'flex',
139
- alignItems: 'center',
140
- gap: 12,
141
- padding: '12px 16px',
142
- backgroundColor: theme.headerBackground,
143
- borderBottom: `1px solid ${theme.border}`,
144
- }, children: [jsx("div", { style: {
145
- width: 32,
146
- height: 32,
147
- backgroundColor: '#1a1a1a',
131
+ const { state, dispatch: _dispatch, theme, connectLiveLink, disconnectLiveLink } = useBrowser();
132
+ return /* @__PURE__ */ jsxs(
133
+ "div",
134
+ {
135
+ style: {
136
+ display: "flex",
137
+ alignItems: "center",
138
+ gap: 12,
139
+ padding: "12px 16px",
140
+ backgroundColor: theme.headerBackground,
141
+ borderBottom: `1px solid ${theme.border}`
142
+ },
143
+ children: [
144
+ /* @__PURE__ */ jsx(
145
+ "div",
146
+ {
147
+ style: {
148
+ width: 32,
149
+ height: 32,
150
+ backgroundColor: "#1a1a1a",
151
+ borderRadius: 4,
152
+ display: "flex",
153
+ alignItems: "center",
154
+ justifyContent: "center",
155
+ fontSize: 20
156
+ },
157
+ children: /* @__PURE__ */ jsx(NiceIcon, { name: "gamepad", size: 18 })
158
+ }
159
+ ),
160
+ /* @__PURE__ */ jsxs("div", { style: { flex: 1 }, children: [
161
+ /* @__PURE__ */ jsx("div", { style: { fontSize: 14, fontWeight: 600, color: theme.textPrimary }, children: state.projectInfo?.name ?? "No Project Loaded" }),
162
+ /* @__PURE__ */ jsx("div", { style: { fontSize: 11, color: theme.textSecondary }, children: state.projectInfo ? /* @__PURE__ */ jsxs(Fragment, { children: [
163
+ "Unity ",
164
+ state.projectInfo.unityVersion,
165
+ " •",
166
+ " ",
167
+ state.projectInfo.renderPipeline.toUpperCase()
168
+ ] }) : projectPath ?? "Select a Unity project folder" })
169
+ ] }),
170
+ /* @__PURE__ */ jsxs(
171
+ "div",
172
+ {
173
+ style: {
174
+ display: "flex",
175
+ alignItems: "center",
176
+ gap: 8,
177
+ padding: "6px 12px",
178
+ backgroundColor: state.liveLinkStatus.connected ? "rgba(34, 197, 94, 0.1)" : "rgba(0,0,0,0.2)",
179
+ borderRadius: 20,
180
+ border: `1px solid ${state.liveLinkStatus.connected ? theme.success : theme.border}`
181
+ },
182
+ children: [
183
+ /* @__PURE__ */ jsx(
184
+ "div",
185
+ {
186
+ style: {
187
+ width: 8,
188
+ height: 8,
189
+ borderRadius: "50%",
190
+ backgroundColor: state.liveLinkStatus.connected ? theme.success : theme.textSecondary
191
+ }
192
+ }
193
+ ),
194
+ /* @__PURE__ */ jsx("span", { style: { fontSize: 11, color: theme.textPrimary }, children: state.liveLinkStatus.connected ? "Live Link" : "Disconnected" }),
195
+ /* @__PURE__ */ jsx(
196
+ "button",
197
+ {
198
+ onClick: () => state.liveLinkStatus.connected ? disconnectLiveLink() : connectLiveLink(),
199
+ style: {
200
+ padding: "2px 8px",
201
+ fontSize: 10,
202
+ backgroundColor: theme.accent,
203
+ border: "none",
148
204
  borderRadius: 4,
149
- display: 'flex',
150
- alignItems: 'center',
151
- justifyContent: 'center',
152
- fontSize: 20,
153
- }, children: jsx(NiceIcon, { name: "gamepad", size: 18 }) }), jsxs("div", { style: { flex: 1 }, children: [jsx("div", { style: { fontSize: 14, fontWeight: 600, color: theme.textPrimary }, children: state.projectInfo?.name ?? 'No Project Loaded' }), jsx("div", { style: { fontSize: 11, color: theme.textSecondary }, children: state.projectInfo ? (jsxs(Fragment, { children: ["Unity ", state.projectInfo.unityVersion, " \u2022", ' ', state.projectInfo.renderPipeline.toUpperCase()] })) : ((projectPath ?? 'Select a Unity project folder')) })] }), jsxs("div", { style: {
154
- display: 'flex',
155
- alignItems: 'center',
156
- gap: 8,
157
- padding: '6px 12px',
158
- backgroundColor: state.liveLinkStatus.connected
159
- ? 'rgba(34, 197, 94, 0.1)'
160
- : 'rgba(0,0,0,0.2)',
161
- borderRadius: 20,
162
- border: `1px solid ${state.liveLinkStatus.connected ? theme.success : theme.border}`,
163
- }, children: [jsx("div", { style: {
164
- width: 8,
165
- height: 8,
166
- borderRadius: '50%',
167
- backgroundColor: state.liveLinkStatus.connected ? theme.success : theme.textSecondary,
168
- } }), jsx("span", { style: { fontSize: 11, color: theme.textPrimary }, children: state.liveLinkStatus.connected ? 'Live Link' : 'Disconnected' }), jsx("button", { onClick: () => state.liveLinkStatus.connected ? disconnectLiveLink() : connectLiveLink(), style: {
169
- padding: '2px 8px',
170
- fontSize: 10,
171
- backgroundColor: theme.accent,
172
- border: 'none',
173
- borderRadius: 4,
174
- color: '#fff',
175
- cursor: 'pointer',
176
- }, children: state.liveLinkStatus.connected ? 'Disconnect' : 'Connect' })] })] }));
205
+ color: "#fff",
206
+ cursor: "pointer"
207
+ },
208
+ children: state.liveLinkStatus.connected ? "Disconnect" : "Connect"
209
+ }
210
+ )
211
+ ]
212
+ }
213
+ )
214
+ ]
215
+ }
216
+ );
177
217
  };
178
- /* ── Toolbar Component ────────────────────────────────────────── */
179
218
  const BrowserToolbar = () => {
180
- const { state, dispatch, theme, importSelectedAssets } = useBrowser();
181
- const filters = [
182
- { value: 'all', label: 'All' },
183
- { value: 'scene', label: 'Scenes' },
184
- { value: 'prefab', label: 'Prefabs' },
185
- { value: 'material', label: 'Materials' },
186
- { value: 'mesh', label: 'Meshes' },
187
- { value: 'texture', label: 'Textures' },
188
- { value: 'animation', label: 'Animations' },
189
- { value: 'script', label: 'Scripts' },
190
- { value: 'audio', label: 'Audio' },
191
- ];
192
- return (jsxs("div", { style: {
193
- display: 'flex',
194
- alignItems: 'center',
195
- gap: 8,
196
- padding: '8px 16px',
197
- backgroundColor: theme.panelBackground,
198
- borderBottom: `1px solid ${theme.border}`,
199
- }, children: [jsx("div", { style: { flex: 1, maxWidth: 300 }, children: jsx("input", { type: "text", placeholder: "Search assets...", value: state.searchQuery, onChange: (e) => dispatch({ type: 'SET_SEARCH', query: e.target.value }), style: {
200
- width: '100%',
201
- padding: '6px 12px',
202
- fontSize: 12,
203
- backgroundColor: 'rgba(0,0,0,0.2)',
204
- border: `1px solid ${theme.border}`,
205
- borderRadius: 6,
206
- color: theme.textPrimary,
207
- outline: 'none',
208
- } }) }), jsx("select", { value: state.filterType, onChange: (e) => dispatch({ type: 'SET_FILTER', filter: e.target.value }), style: {
209
- padding: '6px 10px',
219
+ const { state, dispatch, theme, importSelectedAssets } = useBrowser();
220
+ const filters = [
221
+ { value: "all", label: "All" },
222
+ { value: "scene", label: "Scenes" },
223
+ { value: "prefab", label: "Prefabs" },
224
+ { value: "material", label: "Materials" },
225
+ { value: "mesh", label: "Meshes" },
226
+ { value: "texture", label: "Textures" },
227
+ { value: "animation", label: "Animations" },
228
+ { value: "script", label: "Scripts" },
229
+ { value: "audio", label: "Audio" }
230
+ ];
231
+ return /* @__PURE__ */ jsxs(
232
+ "div",
233
+ {
234
+ style: {
235
+ display: "flex",
236
+ alignItems: "center",
237
+ gap: 8,
238
+ padding: "8px 16px",
239
+ backgroundColor: theme.panelBackground,
240
+ borderBottom: `1px solid ${theme.border}`
241
+ },
242
+ children: [
243
+ /* @__PURE__ */ jsx("div", { style: { flex: 1, maxWidth: 300 }, children: /* @__PURE__ */ jsx(
244
+ "input",
245
+ {
246
+ type: "text",
247
+ placeholder: "Search assets...",
248
+ value: state.searchQuery,
249
+ onChange: (e) => dispatch({ type: "SET_SEARCH", query: e.target.value }),
250
+ style: {
251
+ width: "100%",
252
+ padding: "6px 12px",
253
+ fontSize: 12,
254
+ backgroundColor: "rgba(0,0,0,0.2)",
255
+ border: `1px solid ${theme.border}`,
256
+ borderRadius: 6,
257
+ color: theme.textPrimary,
258
+ outline: "none"
259
+ }
260
+ }
261
+ ) }),
262
+ /* @__PURE__ */ jsx(
263
+ "select",
264
+ {
265
+ value: state.filterType,
266
+ onChange: (e) => dispatch({ type: "SET_FILTER", filter: e.target.value }),
267
+ style: {
268
+ padding: "6px 10px",
269
+ fontSize: 12,
270
+ backgroundColor: "rgba(0,0,0,0.2)",
271
+ border: `1px solid ${theme.border}`,
272
+ borderRadius: 6,
273
+ color: theme.textPrimary
274
+ },
275
+ children: filters.map((f) => /* @__PURE__ */ jsx("option", { value: f.value, children: f.label }, f.value))
276
+ }
277
+ ),
278
+ /* @__PURE__ */ jsxs(
279
+ "div",
280
+ {
281
+ style: {
282
+ display: "flex",
283
+ backgroundColor: "rgba(0,0,0,0.2)",
284
+ borderRadius: 6,
285
+ overflow: "hidden"
286
+ },
287
+ children: [
288
+ /* @__PURE__ */ jsx(
289
+ "button",
290
+ {
291
+ onClick: () => dispatch({ type: "SET_VIEW_MODE", mode: "tree" }),
292
+ "aria-label": "Tree view",
293
+ style: {
294
+ padding: "6px 10px",
210
295
  fontSize: 12,
211
- backgroundColor: 'rgba(0,0,0,0.2)',
212
- border: `1px solid ${theme.border}`,
213
- borderRadius: 6,
214
- color: theme.textPrimary,
215
- }, children: filters.map((f) => (jsx("option", { value: f.value, children: f.label }, f.value))) }), jsxs("div", { style: {
216
- display: 'flex',
217
- backgroundColor: 'rgba(0,0,0,0.2)',
218
- borderRadius: 6,
219
- overflow: 'hidden',
220
- }, children: [jsx("button", { onClick: () => dispatch({ type: 'SET_VIEW_MODE', mode: 'tree' }), "aria-label": "Tree view", style: {
221
- padding: '6px 10px',
222
- fontSize: 12,
223
- backgroundColor: state.viewMode === 'tree' ? theme.accent : 'transparent',
224
- border: 'none',
225
- color: '#fff',
226
- cursor: 'pointer',
227
- }, children: jsx(NiceIcon, { name: "list", size: 14 }) }), jsx("button", { onClick: () => dispatch({ type: 'SET_VIEW_MODE', mode: 'grid' }), "aria-label": "Grid view", style: {
228
- padding: '6px 10px',
229
- fontSize: 12,
230
- backgroundColor: state.viewMode === 'grid' ? theme.accent : 'transparent',
231
- border: 'none',
232
- color: '#fff',
233
- cursor: 'pointer',
234
- }, children: jsx(NiceIcon, { name: "grid", size: 14 }) })] }), jsx("div", { style: { flex: 1 } }), jsxs("span", { style: { fontSize: 11, color: theme.textSecondary }, children: [state.selectedAssets.size, " selected"] }), jsxs("button", { onClick: importSelectedAssets, disabled: state.selectedAssets.size === 0 || state.importProgress !== null, style: {
235
- padding: '8px 16px',
296
+ backgroundColor: state.viewMode === "tree" ? theme.accent : "transparent",
297
+ border: "none",
298
+ color: "#fff",
299
+ cursor: "pointer"
300
+ },
301
+ children: /* @__PURE__ */ jsx(NiceIcon, { name: "list", size: 14 })
302
+ }
303
+ ),
304
+ /* @__PURE__ */ jsx(
305
+ "button",
306
+ {
307
+ onClick: () => dispatch({ type: "SET_VIEW_MODE", mode: "grid" }),
308
+ "aria-label": "Grid view",
309
+ style: {
310
+ padding: "6px 10px",
236
311
  fontSize: 12,
237
- fontWeight: 500,
238
- backgroundColor: state.selectedAssets.size > 0 && !state.importProgress
239
- ? theme.accent
240
- : theme.textSecondary,
241
- border: 'none',
242
- borderRadius: 6,
243
- color: '#fff',
244
- cursor: state.selectedAssets.size > 0 && !state.importProgress ? 'pointer' : 'not-allowed',
245
- opacity: state.selectedAssets.size > 0 && !state.importProgress ? 1 : 0.5,
246
- }, children: [jsx(NiceIcon, { name: state.importProgress ? 'clock' : 'download', size: 14 }), ' ', state.importProgress ? 'Importing...' : 'Import Selected'] })] }));
312
+ backgroundColor: state.viewMode === "grid" ? theme.accent : "transparent",
313
+ border: "none",
314
+ color: "#fff",
315
+ cursor: "pointer"
316
+ },
317
+ children: /* @__PURE__ */ jsx(NiceIcon, { name: "grid", size: 14 })
318
+ }
319
+ )
320
+ ]
321
+ }
322
+ ),
323
+ /* @__PURE__ */ jsx("div", { style: { flex: 1 } }),
324
+ /* @__PURE__ */ jsxs("span", { style: { fontSize: 11, color: theme.textSecondary }, children: [
325
+ state.selectedAssets.size,
326
+ " selected"
327
+ ] }),
328
+ /* @__PURE__ */ jsxs(
329
+ "button",
330
+ {
331
+ onClick: importSelectedAssets,
332
+ disabled: state.selectedAssets.size === 0 || state.importProgress !== null,
333
+ style: {
334
+ padding: "8px 16px",
335
+ fontSize: 12,
336
+ fontWeight: 500,
337
+ backgroundColor: state.selectedAssets.size > 0 && !state.importProgress ? theme.accent : theme.textSecondary,
338
+ border: "none",
339
+ borderRadius: 6,
340
+ color: "#fff",
341
+ cursor: state.selectedAssets.size > 0 && !state.importProgress ? "pointer" : "not-allowed",
342
+ opacity: state.selectedAssets.size > 0 && !state.importProgress ? 1 : 0.5
343
+ },
344
+ children: [
345
+ /* @__PURE__ */ jsx(NiceIcon, { name: state.importProgress ? "clock" : "download", size: 14 }),
346
+ " ",
347
+ state.importProgress ? "Importing..." : "Import Selected"
348
+ ]
349
+ }
350
+ )
351
+ ]
352
+ }
353
+ );
247
354
  };
248
- /* ── Tab Bar Component ────────────────────────────────────────── */
249
355
  const TabBar = () => {
250
- const { state, dispatch, theme } = useBrowser();
251
- const tabs = [
252
- { id: 'assets', label: 'Assets', icon: 'folder' },
253
- { id: 'scenes', label: 'Scenes', icon: 'video' },
254
- { id: 'packages', label: 'Packages', icon: 'box' },
255
- { id: 'settings', label: 'Settings', icon: 'settings' },
256
- ];
257
- return (jsx("div", { style: {
258
- display: 'flex',
259
- gap: 0,
260
- backgroundColor: theme.panelBackground,
261
- borderBottom: `1px solid ${theme.border}`,
262
- }, children: tabs.map((tab) => (jsxs("button", { onClick: () => dispatch({ type: 'SET_TAB', tab: tab.id }), style: {
263
- flex: 1,
264
- padding: '10px 16px',
265
- fontSize: 12,
266
- backgroundColor: state.tab === tab.id ? theme.background : 'transparent',
267
- border: 'none',
268
- borderBottom: state.tab === tab.id ? `2px solid ${theme.accent}` : '2px solid transparent',
269
- color: state.tab === tab.id ? theme.textPrimary : theme.textSecondary,
270
- cursor: 'pointer',
271
- }, children: [jsx(NiceIcon, { name: tab.icon, size: 14 }), " ", tab.label] }, tab.id))) }));
356
+ const { state, dispatch, theme } = useBrowser();
357
+ const tabs = [
358
+ { id: "assets", label: "Assets", icon: "folder" },
359
+ { id: "scenes", label: "Scenes", icon: "video" },
360
+ { id: "packages", label: "Packages", icon: "box" },
361
+ { id: "settings", label: "Settings", icon: "settings" }
362
+ ];
363
+ return /* @__PURE__ */ jsx(
364
+ "div",
365
+ {
366
+ style: {
367
+ display: "flex",
368
+ gap: 0,
369
+ backgroundColor: theme.panelBackground,
370
+ borderBottom: `1px solid ${theme.border}`
371
+ },
372
+ children: tabs.map((tab) => /* @__PURE__ */ jsxs(
373
+ "button",
374
+ {
375
+ onClick: () => dispatch({ type: "SET_TAB", tab: tab.id }),
376
+ style: {
377
+ flex: 1,
378
+ padding: "10px 16px",
379
+ fontSize: 12,
380
+ backgroundColor: state.tab === tab.id ? theme.background : "transparent",
381
+ border: "none",
382
+ borderBottom: state.tab === tab.id ? `2px solid ${theme.accent}` : "2px solid transparent",
383
+ color: state.tab === tab.id ? theme.textPrimary : theme.textSecondary,
384
+ cursor: "pointer"
385
+ },
386
+ children: [
387
+ /* @__PURE__ */ jsx(NiceIcon, { name: tab.icon, size: 14 }),
388
+ " ",
389
+ tab.label
390
+ ]
391
+ },
392
+ tab.id
393
+ ))
394
+ }
395
+ );
272
396
  };
273
- /* ── Asset Tree View ──────────────────────────────────────────── */
274
397
  const AssetTreeItem = ({ asset, indent }) => {
275
- const { state, dispatch, theme } = useBrowser();
276
- const isSelected = state.selectedAssets.has(asset.id);
277
- return (jsxs("div", { role: "button", tabIndex: 0, onKeyDown: clickOnActivationKey, onClick: (e) => dispatch({ type: 'SELECT_ASSET', id: asset.id, additive: e.ctrlKey || e.metaKey }), onDoubleClick: () => dispatch({ type: 'SET_PREVIEW', asset }), style: {
278
- display: 'flex',
279
- alignItems: 'center',
280
- gap: 8,
281
- padding: '4px 8px',
282
- paddingLeft: indent * 16 + 8,
283
- backgroundColor: isSelected ? theme.itemSelected : 'transparent',
284
- cursor: 'pointer',
285
- }, children: [jsx("input", { type: "checkbox", checked: isSelected, onChange: () => dispatch({ type: 'SELECT_ASSET', id: asset.id, additive: true }), onClick: (e) => e.stopPropagation() }), jsx(NiceIcon, { name: getAssetIcon(asset.type), size: 14 }), jsx("span", { style: {
286
- flex: 1,
287
- fontSize: 12,
288
- color: isSelected ? theme.textPrimary : theme.textSecondary,
289
- overflow: 'hidden',
290
- textOverflow: 'ellipsis',
291
- whiteSpace: 'nowrap',
292
- }, children: asset.name }), jsx("span", { style: { fontSize: 10, color: theme.textSecondary }, children: formatFileSize(asset.size) })] }));
398
+ const { state, dispatch, theme } = useBrowser();
399
+ const isSelected = state.selectedAssets.has(asset.id);
400
+ return /* @__PURE__ */ jsxs(
401
+ "div",
402
+ {
403
+ role: "button",
404
+ tabIndex: 0,
405
+ onKeyDown: clickOnActivationKey,
406
+ onClick: (e) => dispatch({ type: "SELECT_ASSET", id: asset.id, additive: e.ctrlKey || e.metaKey }),
407
+ onDoubleClick: () => dispatch({ type: "SET_PREVIEW", asset }),
408
+ style: {
409
+ display: "flex",
410
+ alignItems: "center",
411
+ gap: 8,
412
+ padding: "4px 8px",
413
+ paddingLeft: indent * 16 + 8,
414
+ backgroundColor: isSelected ? theme.itemSelected : "transparent",
415
+ cursor: "pointer"
416
+ },
417
+ children: [
418
+ /* @__PURE__ */ jsx(
419
+ "input",
420
+ {
421
+ type: "checkbox",
422
+ checked: isSelected,
423
+ onChange: () => dispatch({ type: "SELECT_ASSET", id: asset.id, additive: true }),
424
+ onClick: (e) => e.stopPropagation()
425
+ }
426
+ ),
427
+ /* @__PURE__ */ jsx(NiceIcon, { name: getAssetIcon(asset.type), size: 14 }),
428
+ /* @__PURE__ */ jsx(
429
+ "span",
430
+ {
431
+ style: {
432
+ flex: 1,
433
+ fontSize: 12,
434
+ color: isSelected ? theme.textPrimary : theme.textSecondary,
435
+ overflow: "hidden",
436
+ textOverflow: "ellipsis",
437
+ whiteSpace: "nowrap"
438
+ },
439
+ children: asset.name
440
+ }
441
+ ),
442
+ /* @__PURE__ */ jsx("span", { style: { fontSize: 10, color: theme.textSecondary }, children: formatFileSize(asset.size) })
443
+ ]
444
+ }
445
+ );
293
446
  };
294
447
  const FolderTreeItem = ({ folder, indent }) => {
295
- const { state, dispatch, theme } = useBrowser();
296
- const isExpanded = state.expandedFolders.has(folder.path);
297
- const filteredChildren = useMemo(() => {
298
- return folder.children.filter((child) => {
299
- if ('children' in child) {
300
- return true;
301
- } // folder
302
- const asset = child;
303
- if (state.filterType !== 'all' && asset.type !== state.filterType) {
304
- return false;
305
- }
306
- if (state.searchQuery) {
307
- return asset.name.toLowerCase().includes(state.searchQuery.toLowerCase());
448
+ const { state, dispatch, theme } = useBrowser();
449
+ const isExpanded = state.expandedFolders.has(folder.path);
450
+ const filteredChildren = useMemo(() => {
451
+ return folder.children.filter((child) => {
452
+ if ("children" in child) {
453
+ return true;
454
+ }
455
+ const asset = child;
456
+ if (state.filterType !== "all" && asset.type !== state.filterType) {
457
+ return false;
458
+ }
459
+ if (state.searchQuery) {
460
+ return asset.name.toLowerCase().includes(state.searchQuery.toLowerCase());
461
+ }
462
+ return true;
463
+ });
464
+ }, [folder.children, state.filterType, state.searchQuery]);
465
+ if (filteredChildren.length === 0 && state.searchQuery) {
466
+ return null;
467
+ }
468
+ return /* @__PURE__ */ jsxs("div", { children: [
469
+ /* @__PURE__ */ jsxs(
470
+ "div",
471
+ {
472
+ role: "button",
473
+ tabIndex: 0,
474
+ "aria-expanded": isExpanded,
475
+ onKeyDown: clickOnActivationKey,
476
+ onClick: () => dispatch({ type: "TOGGLE_FOLDER", path: folder.path }),
477
+ style: {
478
+ display: "flex",
479
+ alignItems: "center",
480
+ gap: 8,
481
+ padding: "4px 8px",
482
+ paddingLeft: indent * 16 + 8,
483
+ cursor: "pointer"
484
+ },
485
+ children: [
486
+ /* @__PURE__ */ jsx(
487
+ NiceIcon,
488
+ {
489
+ name: isExpanded ? "chevron-down" : "chevron-right",
490
+ size: 10,
491
+ color: theme.textSecondary
308
492
  }
309
- return true;
310
- });
311
- }, [folder.children, state.filterType, state.searchQuery]);
312
- if (filteredChildren.length === 0 && state.searchQuery) {
313
- return null;
314
- }
315
- return (jsxs("div", { children: [jsxs("div", { role: "button", tabIndex: 0, "aria-expanded": isExpanded, onKeyDown: clickOnActivationKey, onClick: () => dispatch({ type: 'TOGGLE_FOLDER', path: folder.path }), style: {
316
- display: 'flex',
317
- alignItems: 'center',
318
- gap: 8,
319
- padding: '4px 8px',
320
- paddingLeft: indent * 16 + 8,
321
- cursor: 'pointer',
322
- }, children: [jsx(NiceIcon, { name: isExpanded ? 'chevron-down' : 'chevron-right', size: 10, color: theme.textSecondary }), jsx(NiceIcon, { name: "folder", size: 14, color: theme.folderColor }), jsx("span", { style: { fontSize: 12, color: theme.textPrimary, fontWeight: 500 }, children: folder.name }), jsxs("span", { style: { fontSize: 10, color: theme.textSecondary }, children: ["(", filteredChildren.length, ")"] })] }), isExpanded &&
323
- filteredChildren.map((child, _i) => 'children' in child ? (jsx(FolderTreeItem, { folder: child, indent: indent + 1 }, child.path)) : (jsx(AssetTreeItem, { asset: child, indent: indent + 1 }, child.id)))] }));
493
+ ),
494
+ /* @__PURE__ */ jsx(NiceIcon, { name: "folder", size: 14, color: theme.folderColor }),
495
+ /* @__PURE__ */ jsx("span", { style: { fontSize: 12, color: theme.textPrimary, fontWeight: 500 }, children: folder.name }),
496
+ /* @__PURE__ */ jsxs("span", { style: { fontSize: 10, color: theme.textSecondary }, children: [
497
+ "(",
498
+ filteredChildren.length,
499
+ ")"
500
+ ] })
501
+ ]
502
+ }
503
+ ),
504
+ isExpanded && filteredChildren.map(
505
+ (child, _i) => "children" in child ? /* @__PURE__ */ jsx(FolderTreeItem, { folder: child, indent: indent + 1 }, child.path) : /* @__PURE__ */ jsx(AssetTreeItem, { asset: child, indent: indent + 1 }, child.id)
506
+ )
507
+ ] });
324
508
  };
325
- /* ── Asset Grid View ──────────────────────────────────────────── */
326
509
  const AssetGridView = () => {
327
- const { state, dispatch, theme } = useBrowser();
328
- const filteredAssets = useMemo(() => {
329
- if (!state.projectInfo) {
330
- return [];
331
- }
332
- return state.projectInfo.assets.filter((asset) => {
333
- if (state.filterType !== 'all' && asset.type !== state.filterType) {
334
- return false;
335
- }
336
- if (state.searchQuery) {
337
- return asset.name.toLowerCase().includes(state.searchQuery.toLowerCase());
338
- }
339
- return true;
340
- });
341
- }, [state.projectInfo, state.filterType, state.searchQuery]);
342
- return (jsx("div", { style: {
343
- display: 'grid',
344
- gridTemplateColumns: 'repeat(auto-fill, minmax(120px, 1fr))',
345
- gap: 12,
346
- padding: 12,
347
- }, children: filteredAssets.map((asset) => {
348
- const isSelected = state.selectedAssets.has(asset.id);
349
- return (jsxs("div", { role: "button", tabIndex: 0, onKeyDown: clickOnActivationKey, onClick: (e) => dispatch({ type: 'SELECT_ASSET', id: asset.id, additive: e.ctrlKey || e.metaKey }), onDoubleClick: () => dispatch({ type: 'SET_PREVIEW', asset }), style: {
350
- display: 'flex',
351
- flexDirection: 'column',
352
- alignItems: 'center',
353
- padding: 12,
354
- backgroundColor: isSelected ? theme.itemSelected : theme.itemBackground,
510
+ const { state, dispatch, theme } = useBrowser();
511
+ const filteredAssets = useMemo(() => {
512
+ if (!state.projectInfo) {
513
+ return [];
514
+ }
515
+ return state.projectInfo.assets.filter((asset) => {
516
+ if (state.filterType !== "all" && asset.type !== state.filterType) {
517
+ return false;
518
+ }
519
+ if (state.searchQuery) {
520
+ return asset.name.toLowerCase().includes(state.searchQuery.toLowerCase());
521
+ }
522
+ return true;
523
+ });
524
+ }, [state.projectInfo, state.filterType, state.searchQuery]);
525
+ return /* @__PURE__ */ jsx(
526
+ "div",
527
+ {
528
+ style: {
529
+ display: "grid",
530
+ gridTemplateColumns: "repeat(auto-fill, minmax(120px, 1fr))",
531
+ gap: 12,
532
+ padding: 12
533
+ },
534
+ children: filteredAssets.map((asset) => {
535
+ const isSelected = state.selectedAssets.has(asset.id);
536
+ return /* @__PURE__ */ jsxs(
537
+ "div",
538
+ {
539
+ role: "button",
540
+ tabIndex: 0,
541
+ onKeyDown: clickOnActivationKey,
542
+ onClick: (e) => dispatch({ type: "SELECT_ASSET", id: asset.id, additive: e.ctrlKey || e.metaKey }),
543
+ onDoubleClick: () => dispatch({ type: "SET_PREVIEW", asset }),
544
+ style: {
545
+ display: "flex",
546
+ flexDirection: "column",
547
+ alignItems: "center",
548
+ padding: 12,
549
+ backgroundColor: isSelected ? theme.itemSelected : theme.itemBackground,
550
+ borderRadius: 8,
551
+ border: `1px solid ${isSelected ? theme.accent : theme.border}`,
552
+ cursor: "pointer"
553
+ },
554
+ children: [
555
+ /* @__PURE__ */ jsx(
556
+ "div",
557
+ {
558
+ style: {
559
+ width: 48,
560
+ height: 48,
561
+ backgroundColor: "rgba(0,0,0,0.2)",
355
562
  borderRadius: 8,
356
- border: `1px solid ${isSelected ? theme.accent : theme.border}`,
357
- cursor: 'pointer',
358
- }, children: [jsx("div", { style: {
359
- width: 48,
360
- height: 48,
361
- backgroundColor: 'rgba(0,0,0,0.2)',
362
- borderRadius: 8,
363
- display: 'flex',
364
- alignItems: 'center',
365
- justifyContent: 'center',
366
- fontSize: 24,
367
- marginBottom: 8,
368
- }, children: asset.thumbnail ? (jsx("img", { src: asset.thumbnail, alt: asset.name, style: { width: '100%', height: '100%', objectFit: 'cover', borderRadius: 8 } })) : (jsx(NiceIcon, { name: getAssetIcon(asset.type), size: 32 })) }), jsx("span", { style: {
369
- fontSize: 11,
370
- color: theme.textPrimary,
371
- textAlign: 'center',
372
- overflow: 'hidden',
373
- textOverflow: 'ellipsis',
374
- whiteSpace: 'nowrap',
375
- width: '100%',
376
- }, children: asset.name }), jsx("span", { style: { fontSize: 9, color: theme.textSecondary }, children: formatFileSize(asset.size) })] }, asset.id));
377
- }) }));
563
+ display: "flex",
564
+ alignItems: "center",
565
+ justifyContent: "center",
566
+ fontSize: 24,
567
+ marginBottom: 8
568
+ },
569
+ children: asset.thumbnail ? /* @__PURE__ */ jsx(
570
+ "img",
571
+ {
572
+ src: asset.thumbnail,
573
+ alt: asset.name,
574
+ style: { width: "100%", height: "100%", objectFit: "cover", borderRadius: 8 }
575
+ }
576
+ ) : /* @__PURE__ */ jsx(NiceIcon, { name: getAssetIcon(asset.type), size: 32 })
577
+ }
578
+ ),
579
+ /* @__PURE__ */ jsx(
580
+ "span",
581
+ {
582
+ style: {
583
+ fontSize: 11,
584
+ color: theme.textPrimary,
585
+ textAlign: "center",
586
+ overflow: "hidden",
587
+ textOverflow: "ellipsis",
588
+ whiteSpace: "nowrap",
589
+ width: "100%"
590
+ },
591
+ children: asset.name
592
+ }
593
+ ),
594
+ /* @__PURE__ */ jsx("span", { style: { fontSize: 9, color: theme.textSecondary }, children: formatFileSize(asset.size) })
595
+ ]
596
+ },
597
+ asset.id
598
+ );
599
+ })
600
+ }
601
+ );
378
602
  };
379
- /* ── Scenes Panel ─────────────────────────────────────────────── */
380
603
  const ScenesPanel = () => {
381
- const { state, theme } = useBrowser();
382
- if (!state.projectInfo) {
383
- return null;
384
- }
385
- return (jsxs("div", { style: { padding: 16 }, children: [jsx("h3", { style: { margin: '0 0 16px', fontSize: 14, fontWeight: 600, color: theme.textPrimary }, children: "Build Settings - Scenes" }), state.projectInfo.scenes.map((scene, i) => (jsxs("div", { style: {
386
- display: 'flex',
387
- alignItems: 'center',
388
- gap: 12,
389
- padding: '8px 12px',
390
- marginBottom: 4,
391
- backgroundColor: theme.itemBackground,
392
- borderRadius: 6,
393
- }, children: [jsx("input", { type: "checkbox", checked: scene.enabled, readOnly: true }), jsx("span", { style: { fontSize: 13, color: theme.textPrimary, flex: 1 }, children: scene.path }), jsxs("span", { style: { fontSize: 11, color: theme.textSecondary }, children: ["Index: ", i] })] }, scene.path)))] }));
604
+ const { state, theme } = useBrowser();
605
+ if (!state.projectInfo) {
606
+ return null;
607
+ }
608
+ return /* @__PURE__ */ jsxs("div", { style: { padding: 16 }, children: [
609
+ /* @__PURE__ */ jsx("h3", { style: { margin: "0 0 16px", fontSize: 14, fontWeight: 600, color: theme.textPrimary }, children: "Build Settings - Scenes" }),
610
+ state.projectInfo.scenes.map((scene, i) => /* @__PURE__ */ jsxs(
611
+ "div",
612
+ {
613
+ style: {
614
+ display: "flex",
615
+ alignItems: "center",
616
+ gap: 12,
617
+ padding: "8px 12px",
618
+ marginBottom: 4,
619
+ backgroundColor: theme.itemBackground,
620
+ borderRadius: 6
621
+ },
622
+ children: [
623
+ /* @__PURE__ */ jsx("input", { type: "checkbox", checked: scene.enabled, readOnly: true }),
624
+ /* @__PURE__ */ jsx("span", { style: { fontSize: 13, color: theme.textPrimary, flex: 1 }, children: scene.path }),
625
+ /* @__PURE__ */ jsxs("span", { style: { fontSize: 11, color: theme.textSecondary }, children: [
626
+ "Index: ",
627
+ i
628
+ ] })
629
+ ]
630
+ },
631
+ scene.path
632
+ ))
633
+ ] });
394
634
  };
395
- /* ── Packages Panel ───────────────────────────────────────────── */
396
635
  const PackagesPanel = () => {
397
- const { state, theme } = useBrowser();
398
- if (!state.projectInfo) {
399
- return null;
400
- }
401
- const getSourceBadge = (source) => {
402
- const colors = {
403
- registry: theme.accent,
404
- git: '#f97316',
405
- local: theme.warning,
406
- embedded: theme.success,
407
- };
408
- return colors[source] ?? theme.textSecondary;
636
+ const { state, theme } = useBrowser();
637
+ if (!state.projectInfo) {
638
+ return null;
639
+ }
640
+ const getSourceBadge = (source) => {
641
+ const colors = {
642
+ registry: theme.accent,
643
+ git: "#f97316",
644
+ local: theme.warning,
645
+ embedded: theme.success
409
646
  };
410
- return (jsxs("div", { style: { padding: 16 }, children: [jsxs("h3", { style: { margin: '0 0 16px', fontSize: 14, fontWeight: 600, color: theme.textPrimary }, children: ["Packages (", state.projectInfo.packages.length, ")"] }), state.projectInfo.packages.map((pkg) => (jsxs("div", { style: {
411
- display: 'flex',
412
- alignItems: 'center',
413
- gap: 12,
414
- padding: '10px 12px',
415
- marginBottom: 4,
416
- backgroundColor: theme.itemBackground,
417
- borderRadius: 6,
418
- }, children: [jsx(NiceIcon, { name: "box", size: 14 }), jsx("span", { style: { fontSize: 12, color: theme.textPrimary, flex: 1 }, children: pkg.name }), jsx("span", { style: {
419
- padding: '2px 8px',
420
- fontSize: 10,
421
- backgroundColor: getSourceBadge(pkg.source),
422
- borderRadius: 10,
423
- color: '#fff',
424
- }, children: pkg.source }), jsx("span", { style: { fontSize: 11, color: theme.textSecondary }, children: pkg.version })] }, pkg.name)))] }));
647
+ return colors[source] ?? theme.textSecondary;
648
+ };
649
+ return /* @__PURE__ */ jsxs("div", { style: { padding: 16 }, children: [
650
+ /* @__PURE__ */ jsxs("h3", { style: { margin: "0 0 16px", fontSize: 14, fontWeight: 600, color: theme.textPrimary }, children: [
651
+ "Packages (",
652
+ state.projectInfo.packages.length,
653
+ ")"
654
+ ] }),
655
+ state.projectInfo.packages.map((pkg) => /* @__PURE__ */ jsxs(
656
+ "div",
657
+ {
658
+ style: {
659
+ display: "flex",
660
+ alignItems: "center",
661
+ gap: 12,
662
+ padding: "10px 12px",
663
+ marginBottom: 4,
664
+ backgroundColor: theme.itemBackground,
665
+ borderRadius: 6
666
+ },
667
+ children: [
668
+ /* @__PURE__ */ jsx(NiceIcon, { name: "box", size: 14 }),
669
+ /* @__PURE__ */ jsx("span", { style: { fontSize: 12, color: theme.textPrimary, flex: 1 }, children: pkg.name }),
670
+ /* @__PURE__ */ jsx(
671
+ "span",
672
+ {
673
+ style: {
674
+ padding: "2px 8px",
675
+ fontSize: 10,
676
+ backgroundColor: getSourceBadge(pkg.source),
677
+ borderRadius: 10,
678
+ color: "#fff"
679
+ },
680
+ children: pkg.source
681
+ }
682
+ ),
683
+ /* @__PURE__ */ jsx("span", { style: { fontSize: 11, color: theme.textSecondary }, children: pkg.version })
684
+ ]
685
+ },
686
+ pkg.name
687
+ ))
688
+ ] });
425
689
  };
426
- /* ── Settings Panel ───────────────────────────────────────────── */
427
690
  const SettingsPanel = () => {
428
- const { state, theme } = useBrowser();
429
- if (!state.projectInfo) {
430
- return null;
691
+ const { state, theme } = useBrowser();
692
+ if (!state.projectInfo) {
693
+ return null;
694
+ }
695
+ const info = state.projectInfo;
696
+ const settingRow = (label, value) => /* @__PURE__ */ jsxs(
697
+ "div",
698
+ {
699
+ style: {
700
+ display: "flex",
701
+ justifyContent: "space-between",
702
+ padding: "8px 0",
703
+ borderBottom: `1px solid ${theme.border}`
704
+ },
705
+ children: [
706
+ /* @__PURE__ */ jsx("span", { style: { fontSize: 12, color: theme.textSecondary }, children: label }),
707
+ /* @__PURE__ */ jsx("span", { style: { fontSize: 12, color: theme.textPrimary, fontWeight: 500 }, children: value })
708
+ ]
431
709
  }
432
- const info = state.projectInfo;
433
- const settingRow = (label, value) => (jsxs("div", { style: {
434
- display: 'flex',
435
- justifyContent: 'space-between',
436
- padding: '8px 0',
437
- borderBottom: `1px solid ${theme.border}`,
438
- }, children: [jsx("span", { style: { fontSize: 12, color: theme.textSecondary }, children: label }), jsx("span", { style: { fontSize: 12, color: theme.textPrimary, fontWeight: 500 }, children: value })] }));
439
- return (jsxs("div", { style: { padding: 16 }, children: [jsx("h3", { style: { margin: '0 0 16px', fontSize: 14, fontWeight: 600, color: theme.textPrimary }, children: "Project Settings" }), jsxs("div", { style: { backgroundColor: theme.itemBackground, borderRadius: 8, padding: 12 }, children: [settingRow('Project Name', info.name), settingRow('Unity Version', info.unityVersion), settingRow('Render Pipeline', info.renderPipeline.toUpperCase()), settingRow('Scripting Backend', info.scriptingBackend), settingRow('API Compatibility', info.apiCompatibility.replace(/_/g, ' ')), settingRow('Total Assets', `${info.assets.length}`), settingRow('Scenes', `${info.scenes.length}`), settingRow('Packages', `${info.packages.length}`)] })] }));
710
+ );
711
+ return /* @__PURE__ */ jsxs("div", { style: { padding: 16 }, children: [
712
+ /* @__PURE__ */ jsx("h3", { style: { margin: "0 0 16px", fontSize: 14, fontWeight: 600, color: theme.textPrimary }, children: "Project Settings" }),
713
+ /* @__PURE__ */ jsxs("div", { style: { backgroundColor: theme.itemBackground, borderRadius: 8, padding: 12 }, children: [
714
+ settingRow("Project Name", info.name),
715
+ settingRow("Unity Version", info.unityVersion),
716
+ settingRow("Render Pipeline", info.renderPipeline.toUpperCase()),
717
+ settingRow("Scripting Backend", info.scriptingBackend),
718
+ settingRow("API Compatibility", info.apiCompatibility.replace(/_/g, " ")),
719
+ settingRow("Total Assets", `${info.assets.length}`),
720
+ settingRow("Scenes", `${info.scenes.length}`),
721
+ settingRow("Packages", `${info.packages.length}`)
722
+ ] })
723
+ ] });
440
724
  };
441
- /* ── Preview Panel ────────────────────────────────────────────── */
442
725
  const PreviewPanel = () => {
443
- const { state, dispatch, theme } = useBrowser();
444
- if (!state.previewAsset) {
445
- return null;
726
+ const { state, dispatch, theme } = useBrowser();
727
+ if (!state.previewAsset) {
728
+ return null;
729
+ }
730
+ const asset = state.previewAsset;
731
+ return /* @__PURE__ */ jsx(
732
+ "div",
733
+ {
734
+ role: "presentation",
735
+ style: {
736
+ position: "fixed",
737
+ top: 0,
738
+ left: 0,
739
+ right: 0,
740
+ bottom: 0,
741
+ backgroundColor: "rgba(0,0,0,0.8)",
742
+ display: "flex",
743
+ alignItems: "center",
744
+ justifyContent: "center",
745
+ zIndex: 1e3
746
+ },
747
+ onClick: () => dispatch({ type: "SET_PREVIEW", asset: null }),
748
+ children: /* @__PURE__ */ jsxs(
749
+ "div",
750
+ {
751
+ role: "presentation",
752
+ onClick: (e) => e.stopPropagation(),
753
+ style: {
754
+ width: "80%",
755
+ maxWidth: 800,
756
+ backgroundColor: theme.panelBackground,
757
+ borderRadius: 12,
758
+ overflow: "hidden"
759
+ },
760
+ children: [
761
+ /* @__PURE__ */ jsxs(
762
+ "div",
763
+ {
764
+ style: {
765
+ display: "flex",
766
+ alignItems: "center",
767
+ gap: 12,
768
+ padding: 16,
769
+ borderBottom: `1px solid ${theme.border}`
770
+ },
771
+ children: [
772
+ /* @__PURE__ */ jsx(NiceIcon, { name: getAssetIcon(asset.type), size: 24 }),
773
+ /* @__PURE__ */ jsxs("div", { style: { flex: 1 }, children: [
774
+ /* @__PURE__ */ jsx("div", { style: { fontSize: 16, fontWeight: 600, color: theme.textPrimary }, children: asset.name }),
775
+ /* @__PURE__ */ jsx("div", { style: { fontSize: 12, color: theme.textSecondary }, children: asset.path })
776
+ ] }),
777
+ /* @__PURE__ */ jsx(
778
+ "button",
779
+ {
780
+ onClick: () => dispatch({ type: "SET_PREVIEW", asset: null }),
781
+ style: {
782
+ padding: "4px 8px",
783
+ fontSize: 14,
784
+ backgroundColor: "transparent",
785
+ border: "none",
786
+ color: theme.textSecondary,
787
+ cursor: "pointer"
788
+ },
789
+ children: /* @__PURE__ */ jsx(NiceIcon, { name: "close", size: 14 })
790
+ }
791
+ )
792
+ ]
793
+ }
794
+ ),
795
+ /* @__PURE__ */ jsxs("div", { style: { padding: 16 }, children: [
796
+ /* @__PURE__ */ jsx(
797
+ "div",
798
+ {
799
+ style: {
800
+ width: "100%",
801
+ height: 300,
802
+ backgroundColor: "rgba(0,0,0,0.3)",
803
+ borderRadius: 8,
804
+ display: "flex",
805
+ alignItems: "center",
806
+ justifyContent: "center",
807
+ fontSize: 48,
808
+ marginBottom: 16
809
+ },
810
+ children: asset.thumbnail ? /* @__PURE__ */ jsx(
811
+ "img",
812
+ {
813
+ src: asset.thumbnail,
814
+ alt: asset.name,
815
+ style: { maxWidth: "100%", maxHeight: "100%", objectFit: "contain" }
816
+ }
817
+ ) : /* @__PURE__ */ jsx(NiceIcon, { name: getAssetIcon(asset.type), size: 32 })
818
+ }
819
+ ),
820
+ /* @__PURE__ */ jsxs("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 12 }, children: [
821
+ /* @__PURE__ */ jsxs("div", { children: [
822
+ /* @__PURE__ */ jsx("div", { style: { fontSize: 11, color: theme.textSecondary }, children: "Type" }),
823
+ /* @__PURE__ */ jsx("div", { style: { fontSize: 13, color: theme.textPrimary }, children: asset.type })
824
+ ] }),
825
+ /* @__PURE__ */ jsxs("div", { children: [
826
+ /* @__PURE__ */ jsx("div", { style: { fontSize: 11, color: theme.textSecondary }, children: "Size" }),
827
+ /* @__PURE__ */ jsx("div", { style: { fontSize: 13, color: theme.textPrimary }, children: formatFileSize(asset.size) })
828
+ ] }),
829
+ /* @__PURE__ */ jsxs("div", { children: [
830
+ /* @__PURE__ */ jsx("div", { style: { fontSize: 11, color: theme.textSecondary }, children: "GUID" }),
831
+ /* @__PURE__ */ jsx("div", { style: { fontSize: 13, color: theme.textPrimary, fontFamily: "monospace" }, children: asset.guid })
832
+ ] }),
833
+ /* @__PURE__ */ jsxs("div", { children: [
834
+ /* @__PURE__ */ jsx("div", { style: { fontSize: 11, color: theme.textSecondary }, children: "Last Modified" }),
835
+ /* @__PURE__ */ jsx("div", { style: { fontSize: 13, color: theme.textPrimary }, children: asset.lastModified })
836
+ ] })
837
+ ] }),
838
+ asset.dependencies && asset.dependencies.length > 0 && /* @__PURE__ */ jsxs("div", { style: { marginTop: 16 }, children: [
839
+ /* @__PURE__ */ jsxs(
840
+ "div",
841
+ {
842
+ style: { fontSize: 12, fontWeight: 500, color: theme.textPrimary, marginBottom: 8 },
843
+ children: [
844
+ "Dependencies (",
845
+ asset.dependencies.length,
846
+ ")"
847
+ ]
848
+ }
849
+ ),
850
+ /* @__PURE__ */ jsx("div", { style: { maxHeight: 100, overflow: "auto" }, children: asset.dependencies.map((dep, i) => /* @__PURE__ */ jsx(
851
+ "div",
852
+ {
853
+ style: {
854
+ padding: "4px 8px",
855
+ fontSize: 11,
856
+ color: theme.textSecondary,
857
+ backgroundColor: "rgba(0,0,0,0.2)",
858
+ borderRadius: 4,
859
+ marginBottom: 4
860
+ },
861
+ children: dep
862
+ },
863
+ i
864
+ )) })
865
+ ] })
866
+ ] }),
867
+ /* @__PURE__ */ jsx(
868
+ "div",
869
+ {
870
+ style: {
871
+ display: "flex",
872
+ justifyContent: "flex-end",
873
+ gap: 8,
874
+ padding: 16,
875
+ borderTop: `1px solid ${theme.border}`
876
+ },
877
+ children: /* @__PURE__ */ jsx(
878
+ "button",
879
+ {
880
+ onClick: () => {
881
+ dispatch({ type: "SELECT_ASSET", id: asset.id });
882
+ dispatch({ type: "SET_PREVIEW", asset: null });
883
+ },
884
+ style: {
885
+ padding: "8px 16px",
886
+ fontSize: 12,
887
+ backgroundColor: theme.accent,
888
+ border: "none",
889
+ borderRadius: 6,
890
+ color: "#fff",
891
+ cursor: "pointer"
892
+ },
893
+ children: "Select for Import"
894
+ }
895
+ )
896
+ }
897
+ )
898
+ ]
899
+ }
900
+ )
446
901
  }
447
- const asset = state.previewAsset;
448
- return (jsx("div", { role: "presentation", style: {
449
- position: 'fixed',
450
- top: 0,
451
- left: 0,
452
- right: 0,
453
- bottom: 0,
454
- backgroundColor: 'rgba(0,0,0,0.8)',
455
- display: 'flex',
456
- alignItems: 'center',
457
- justifyContent: 'center',
458
- zIndex: 1000,
459
- }, onClick: () => dispatch({ type: 'SET_PREVIEW', asset: null }), children: jsxs("div", { role: "presentation", onClick: (e) => e.stopPropagation(), style: {
460
- width: '80%',
461
- maxWidth: 800,
462
- backgroundColor: theme.panelBackground,
463
- borderRadius: 12,
464
- overflow: 'hidden',
465
- }, children: [jsxs("div", { style: {
466
- display: 'flex',
467
- alignItems: 'center',
468
- gap: 12,
469
- padding: 16,
470
- borderBottom: `1px solid ${theme.border}`,
471
- }, children: [jsx(NiceIcon, { name: getAssetIcon(asset.type), size: 24 }), jsxs("div", { style: { flex: 1 }, children: [jsx("div", { style: { fontSize: 16, fontWeight: 600, color: theme.textPrimary }, children: asset.name }), jsx("div", { style: { fontSize: 12, color: theme.textSecondary }, children: asset.path })] }), jsx("button", { onClick: () => dispatch({ type: 'SET_PREVIEW', asset: null }), style: {
472
- padding: '4px 8px',
473
- fontSize: 14,
474
- backgroundColor: 'transparent',
475
- border: 'none',
476
- color: theme.textSecondary,
477
- cursor: 'pointer',
478
- }, children: jsx(NiceIcon, { name: "close", size: 14 }) })] }), jsxs("div", { style: { padding: 16 }, children: [jsx("div", { style: {
479
- width: '100%',
480
- height: 300,
481
- backgroundColor: 'rgba(0,0,0,0.3)',
482
- borderRadius: 8,
483
- display: 'flex',
484
- alignItems: 'center',
485
- justifyContent: 'center',
486
- fontSize: 48,
487
- marginBottom: 16,
488
- }, children: asset.thumbnail ? (jsx("img", { src: asset.thumbnail, alt: asset.name, style: { maxWidth: '100%', maxHeight: '100%', objectFit: 'contain' } })) : (jsx(NiceIcon, { name: getAssetIcon(asset.type), size: 32 })) }), jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 12 }, children: [jsxs("div", { children: [jsx("div", { style: { fontSize: 11, color: theme.textSecondary }, children: "Type" }), jsx("div", { style: { fontSize: 13, color: theme.textPrimary }, children: asset.type })] }), jsxs("div", { children: [jsx("div", { style: { fontSize: 11, color: theme.textSecondary }, children: "Size" }), jsx("div", { style: { fontSize: 13, color: theme.textPrimary }, children: formatFileSize(asset.size) })] }), jsxs("div", { children: [jsx("div", { style: { fontSize: 11, color: theme.textSecondary }, children: "GUID" }), jsx("div", { style: { fontSize: 13, color: theme.textPrimary, fontFamily: 'monospace' }, children: asset.guid })] }), jsxs("div", { children: [jsx("div", { style: { fontSize: 11, color: theme.textSecondary }, children: "Last Modified" }), jsx("div", { style: { fontSize: 13, color: theme.textPrimary }, children: asset.lastModified })] })] }), asset.dependencies && asset.dependencies.length > 0 && (jsxs("div", { style: { marginTop: 16 }, children: [jsxs("div", { style: { fontSize: 12, fontWeight: 500, color: theme.textPrimary, marginBottom: 8 }, children: ["Dependencies (", asset.dependencies.length, ")"] }), jsx("div", { style: { maxHeight: 100, overflow: 'auto' }, children: asset.dependencies.map((dep, i) => (jsx("div", { style: {
489
- padding: '4px 8px',
490
- fontSize: 11,
491
- color: theme.textSecondary,
492
- backgroundColor: 'rgba(0,0,0,0.2)',
493
- borderRadius: 4,
494
- marginBottom: 4,
495
- }, children: dep }, i))) })] }))] }), jsx("div", { style: {
496
- display: 'flex',
497
- justifyContent: 'flex-end',
498
- gap: 8,
499
- padding: 16,
500
- borderTop: `1px solid ${theme.border}`,
501
- }, children: jsx("button", { onClick: () => {
502
- dispatch({ type: 'SELECT_ASSET', id: asset.id });
503
- dispatch({ type: 'SET_PREVIEW', asset: null });
504
- }, style: {
505
- padding: '8px 16px',
506
- fontSize: 12,
507
- backgroundColor: theme.accent,
508
- border: 'none',
509
- borderRadius: 6,
510
- color: '#fff',
511
- cursor: 'pointer',
512
- }, children: "Select for Import" }) })] }) }));
902
+ );
513
903
  };
514
- /* ── Import Progress Overlay ──────────────────────────────────── */
515
904
  const ImportProgressOverlay = () => {
516
- const { state, theme } = useBrowser();
517
- if (!state.importProgress) {
518
- return null;
905
+ const { state, theme } = useBrowser();
906
+ if (!state.importProgress) {
907
+ return null;
908
+ }
909
+ const progress = state.importProgress;
910
+ const percent = progress.total > 0 ? Math.round(progress.current / progress.total * 100) : 0;
911
+ return /* @__PURE__ */ jsx(
912
+ "div",
913
+ {
914
+ style: {
915
+ position: "absolute",
916
+ top: 0,
917
+ left: 0,
918
+ right: 0,
919
+ bottom: 0,
920
+ backgroundColor: "rgba(0,0,0,0.7)",
921
+ display: "flex",
922
+ alignItems: "center",
923
+ justifyContent: "center",
924
+ zIndex: 999
925
+ },
926
+ children: /* @__PURE__ */ jsxs(
927
+ "div",
928
+ {
929
+ style: {
930
+ width: 400,
931
+ backgroundColor: theme.panelBackground,
932
+ borderRadius: 12,
933
+ padding: 24
934
+ },
935
+ children: [
936
+ /* @__PURE__ */ jsxs("h3", { style: { margin: "0 0 16px", fontSize: 16, fontWeight: 600, color: theme.textPrimary }, children: [
937
+ /* @__PURE__ */ jsx(NiceIcon, { name: progress.phase === "complete" ? "success" : "download", size: 16 }),
938
+ " ",
939
+ progress.phase === "complete" ? "Import Complete" : "Importing Assets"
940
+ ] }),
941
+ /* @__PURE__ */ jsx("div", { style: { fontSize: 12, color: theme.textSecondary, marginBottom: 8 }, children: progress.message }),
942
+ progress.currentAsset && /* @__PURE__ */ jsx(
943
+ "div",
944
+ {
945
+ style: {
946
+ fontSize: 11,
947
+ color: theme.textPrimary,
948
+ backgroundColor: "rgba(0,0,0,0.2)",
949
+ padding: "6px 10px",
950
+ borderRadius: 4,
951
+ marginBottom: 12,
952
+ overflow: "hidden",
953
+ textOverflow: "ellipsis",
954
+ whiteSpace: "nowrap"
955
+ },
956
+ children: progress.currentAsset
957
+ }
958
+ ),
959
+ /* @__PURE__ */ jsx(
960
+ "div",
961
+ {
962
+ style: {
963
+ width: "100%",
964
+ height: 6,
965
+ backgroundColor: "rgba(0,0,0,0.3)",
966
+ borderRadius: 3,
967
+ overflow: "hidden"
968
+ },
969
+ children: /* @__PURE__ */ jsx(
970
+ "div",
971
+ {
972
+ style: {
973
+ width: `${percent}%`,
974
+ height: "100%",
975
+ backgroundColor: progress.phase === "error" ? theme.danger : theme.accent,
976
+ transition: "width 0.2s ease"
977
+ }
978
+ }
979
+ )
980
+ }
981
+ ),
982
+ /* @__PURE__ */ jsxs(
983
+ "div",
984
+ {
985
+ style: { fontSize: 11, color: theme.textSecondary, marginTop: 8, textAlign: "center" },
986
+ children: [
987
+ progress.current,
988
+ " / ",
989
+ progress.total,
990
+ " (",
991
+ percent,
992
+ "%)"
993
+ ]
994
+ }
995
+ )
996
+ ]
997
+ }
998
+ )
519
999
  }
520
- const progress = state.importProgress;
521
- const percent = progress.total > 0 ? Math.round((progress.current / progress.total) * 100) : 0;
522
- return (jsx("div", { style: {
523
- position: 'absolute',
524
- top: 0,
525
- left: 0,
526
- right: 0,
527
- bottom: 0,
528
- backgroundColor: 'rgba(0,0,0,0.7)',
529
- display: 'flex',
530
- alignItems: 'center',
531
- justifyContent: 'center',
532
- zIndex: 999,
533
- }, children: jsxs("div", { style: {
534
- width: 400,
535
- backgroundColor: theme.panelBackground,
536
- borderRadius: 12,
537
- padding: 24,
538
- }, children: [jsxs("h3", { style: { margin: '0 0 16px', fontSize: 16, fontWeight: 600, color: theme.textPrimary }, children: [jsx(NiceIcon, { name: progress.phase === 'complete' ? 'success' : 'download', size: 16 }), ' ', progress.phase === 'complete' ? 'Import Complete' : 'Importing Assets'] }), jsx("div", { style: { fontSize: 12, color: theme.textSecondary, marginBottom: 8 }, children: progress.message }), progress.currentAsset && (jsx("div", { style: {
539
- fontSize: 11,
540
- color: theme.textPrimary,
541
- backgroundColor: 'rgba(0,0,0,0.2)',
542
- padding: '6px 10px',
543
- borderRadius: 4,
544
- marginBottom: 12,
545
- overflow: 'hidden',
546
- textOverflow: 'ellipsis',
547
- whiteSpace: 'nowrap',
548
- }, children: progress.currentAsset })), jsx("div", { style: {
549
- width: '100%',
550
- height: 6,
551
- backgroundColor: 'rgba(0,0,0,0.3)',
552
- borderRadius: 3,
553
- overflow: 'hidden',
554
- }, children: jsx("div", { style: {
555
- width: `${percent}%`,
556
- height: '100%',
557
- backgroundColor: progress.phase === 'error' ? theme.danger : theme.accent,
558
- transition: 'width 0.2s ease',
559
- } }) }), jsxs("div", { style: { fontSize: 11, color: theme.textSecondary, marginTop: 8, textAlign: 'center' }, children: [progress.current, " / ", progress.total, " (", percent, "%)"] })] }) }));
1000
+ );
560
1001
  };
561
- // Default demo project
562
1002
  const DEMO_PROJECT = {
563
- name: 'MyUnityProject',
564
- path: 'C:/Projects/MyUnityProject',
565
- unityVersion: '2022.3.10f1',
566
- renderPipeline: 'urp',
567
- scriptingBackend: 'il2cpp',
568
- apiCompatibility: 'NET_Standard_2_1',
569
- assets: [
570
- {
571
- id: '1',
572
- name: 'MainScene.unity',
573
- path: 'Assets/Scenes/MainScene.unity',
574
- type: 'scene',
575
- guid: 'a1b2c3d4',
576
- size: 245000,
577
- lastModified: '2024-01-15',
578
- selected: false,
579
- },
580
- {
581
- id: '2',
582
- name: 'Player.prefab',
583
- path: 'Assets/Prefabs/Player.prefab',
584
- type: 'prefab',
585
- guid: 'e5f6g7h8',
586
- size: 12000,
587
- lastModified: '2024-01-14',
588
- selected: false,
589
- },
590
- {
591
- id: '3',
592
- name: 'Enemy.prefab',
593
- path: 'Assets/Prefabs/Enemy.prefab',
594
- type: 'prefab',
595
- guid: 'i9j0k1l2',
596
- size: 8000,
597
- lastModified: '2024-01-13',
598
- selected: false,
599
- },
600
- {
601
- id: '4',
602
- name: 'StandardMaterial.mat',
603
- path: 'Assets/Materials/StandardMaterial.mat',
604
- type: 'material',
605
- guid: 'm3n4o5p6',
606
- size: 2000,
607
- lastModified: '2024-01-12',
608
- selected: false,
609
- },
610
- {
611
- id: '5',
612
- name: 'PlayerController.cs',
613
- path: 'Assets/Scripts/PlayerController.cs',
614
- type: 'script',
615
- guid: 'q7r8s9t0',
616
- size: 5000,
617
- lastModified: '2024-01-11',
618
- selected: false,
619
- },
620
- {
621
- id: '6',
622
- name: 'hero_texture.png',
623
- path: 'Assets/Textures/hero_texture.png',
624
- type: 'texture',
625
- guid: 'u1v2w3x4',
626
- size: 2048000,
627
- lastModified: '2024-01-10',
628
- selected: false,
629
- },
630
- {
631
- id: '7',
632
- name: 'character_mesh.fbx',
633
- path: 'Assets/Models/character_mesh.fbx',
634
- type: 'mesh',
635
- guid: 'y5z6a7b8',
636
- size: 856000,
637
- lastModified: '2024-01-09',
638
- selected: false,
639
- },
640
- {
641
- id: '8',
642
- name: 'walk_animation.anim',
643
- path: 'Assets/Animations/walk_animation.anim',
644
- type: 'animation',
645
- guid: 'c9d0e1f2',
646
- size: 15000,
647
- lastModified: '2024-01-08',
648
- selected: false,
649
- },
650
- {
651
- id: '9',
652
- name: 'background_music.wav',
653
- path: 'Assets/Audio/background_music.wav',
654
- type: 'audio',
655
- guid: 'g3h4i5j6',
656
- size: 5120000,
657
- lastModified: '2024-01-07',
658
- selected: false,
659
- },
660
- ],
661
- folders: {
662
- path: 'Assets',
663
- name: 'Assets',
664
- expanded: true,
665
- children: [
666
- {
667
- path: 'Assets/Scenes',
668
- name: 'Scenes',
669
- expanded: false,
670
- children: [],
671
- },
672
- {
673
- path: 'Assets/Prefabs',
674
- name: 'Prefabs',
675
- expanded: false,
676
- children: [],
677
- },
678
- {
679
- path: 'Assets/Materials',
680
- name: 'Materials',
681
- expanded: false,
682
- children: [],
683
- },
684
- {
685
- path: 'Assets/Scripts',
686
- name: 'Scripts',
687
- expanded: false,
688
- children: [],
689
- },
690
- ],
1003
+ name: "MyUnityProject",
1004
+ path: "C:/Projects/MyUnityProject",
1005
+ unityVersion: "2022.3.10f1",
1006
+ renderPipeline: "urp",
1007
+ scriptingBackend: "il2cpp",
1008
+ apiCompatibility: "NET_Standard_2_1",
1009
+ assets: [
1010
+ {
1011
+ id: "1",
1012
+ name: "MainScene.unity",
1013
+ path: "Assets/Scenes/MainScene.unity",
1014
+ type: "scene",
1015
+ guid: "a1b2c3d4",
1016
+ size: 245e3,
1017
+ lastModified: "2024-01-15",
1018
+ selected: false
1019
+ },
1020
+ {
1021
+ id: "2",
1022
+ name: "Player.prefab",
1023
+ path: "Assets/Prefabs/Player.prefab",
1024
+ type: "prefab",
1025
+ guid: "e5f6g7h8",
1026
+ size: 12e3,
1027
+ lastModified: "2024-01-14",
1028
+ selected: false
1029
+ },
1030
+ {
1031
+ id: "3",
1032
+ name: "Enemy.prefab",
1033
+ path: "Assets/Prefabs/Enemy.prefab",
1034
+ type: "prefab",
1035
+ guid: "i9j0k1l2",
1036
+ size: 8e3,
1037
+ lastModified: "2024-01-13",
1038
+ selected: false
691
1039
  },
692
- packages: [
693
- { name: 'com.unity.render-pipelines.universal', version: '14.0.8', source: 'registry' },
694
- { name: 'com.unity.inputsystem', version: '1.7.0', source: 'registry' },
695
- { name: 'com.unity.cinemachine', version: '2.9.7', source: 'registry' },
696
- { name: 'com.unity.textmeshpro', version: '3.0.6', source: 'registry' },
697
- ],
698
- scenes: [
699
- { path: 'Assets/Scenes/MainScene.unity', enabled: true },
700
- { path: 'Assets/Scenes/Level1.unity', enabled: true },
701
- { path: 'Assets/Scenes/Level2.unity', enabled: true },
702
- ],
1040
+ {
1041
+ id: "4",
1042
+ name: "StandardMaterial.mat",
1043
+ path: "Assets/Materials/StandardMaterial.mat",
1044
+ type: "material",
1045
+ guid: "m3n4o5p6",
1046
+ size: 2e3,
1047
+ lastModified: "2024-01-12",
1048
+ selected: false
1049
+ },
1050
+ {
1051
+ id: "5",
1052
+ name: "PlayerController.cs",
1053
+ path: "Assets/Scripts/PlayerController.cs",
1054
+ type: "script",
1055
+ guid: "q7r8s9t0",
1056
+ size: 5e3,
1057
+ lastModified: "2024-01-11",
1058
+ selected: false
1059
+ },
1060
+ {
1061
+ id: "6",
1062
+ name: "hero_texture.png",
1063
+ path: "Assets/Textures/hero_texture.png",
1064
+ type: "texture",
1065
+ guid: "u1v2w3x4",
1066
+ size: 2048e3,
1067
+ lastModified: "2024-01-10",
1068
+ selected: false
1069
+ },
1070
+ {
1071
+ id: "7",
1072
+ name: "character_mesh.fbx",
1073
+ path: "Assets/Models/character_mesh.fbx",
1074
+ type: "mesh",
1075
+ guid: "y5z6a7b8",
1076
+ size: 856e3,
1077
+ lastModified: "2024-01-09",
1078
+ selected: false
1079
+ },
1080
+ {
1081
+ id: "8",
1082
+ name: "walk_animation.anim",
1083
+ path: "Assets/Animations/walk_animation.anim",
1084
+ type: "animation",
1085
+ guid: "c9d0e1f2",
1086
+ size: 15e3,
1087
+ lastModified: "2024-01-08",
1088
+ selected: false
1089
+ },
1090
+ {
1091
+ id: "9",
1092
+ name: "background_music.wav",
1093
+ path: "Assets/Audio/background_music.wav",
1094
+ type: "audio",
1095
+ guid: "g3h4i5j6",
1096
+ size: 512e4,
1097
+ lastModified: "2024-01-07",
1098
+ selected: false
1099
+ }
1100
+ ],
1101
+ folders: {
1102
+ path: "Assets",
1103
+ name: "Assets",
1104
+ expanded: true,
1105
+ children: [
1106
+ {
1107
+ path: "Assets/Scenes",
1108
+ name: "Scenes",
1109
+ expanded: false,
1110
+ children: []
1111
+ },
1112
+ {
1113
+ path: "Assets/Prefabs",
1114
+ name: "Prefabs",
1115
+ expanded: false,
1116
+ children: []
1117
+ },
1118
+ {
1119
+ path: "Assets/Materials",
1120
+ name: "Materials",
1121
+ expanded: false,
1122
+ children: []
1123
+ },
1124
+ {
1125
+ path: "Assets/Scripts",
1126
+ name: "Scripts",
1127
+ expanded: false,
1128
+ children: []
1129
+ }
1130
+ ]
1131
+ },
1132
+ packages: [
1133
+ { name: "com.unity.render-pipelines.universal", version: "14.0.8", source: "registry" },
1134
+ { name: "com.unity.inputsystem", version: "1.7.0", source: "registry" },
1135
+ { name: "com.unity.cinemachine", version: "2.9.7", source: "registry" },
1136
+ { name: "com.unity.textmeshpro", version: "3.0.6", source: "registry" }
1137
+ ],
1138
+ scenes: [
1139
+ { path: "Assets/Scenes/MainScene.unity", enabled: true },
1140
+ { path: "Assets/Scenes/Level1.unity", enabled: true },
1141
+ { path: "Assets/Scenes/Level2.unity", enabled: true }
1142
+ ]
703
1143
  };
704
1144
  const UnityProjectBrowser = /* @__PURE__ */ Object.assign(
705
- /* @__PURE__ */ forwardRef(({ projectPath, theme: themeOverride, onProjectLoad, onImport, onLiveLinkConnect, onLiveLinkDisconnect, className, style, }, ref) => {
706
- const [state, dispatch] = useReducer(browserReducer, {
1145
+ /* @__PURE__ */ forwardRef(
1146
+ ({
1147
+ projectPath,
1148
+ theme: themeOverride,
1149
+ onProjectLoad,
1150
+ onImport,
1151
+ onLiveLinkConnect,
1152
+ onLiveLinkDisconnect,
1153
+ className,
1154
+ style
1155
+ }, ref) => {
1156
+ const [state, dispatch] = useReducer(browserReducer, {
707
1157
  ...INITIAL_STATE,
708
- projectInfo: DEMO_PROJECT,
709
- });
710
- const theme = useMemo(() => ({ ...DEFAULT_THEME, ...themeOverride }), [themeOverride]);
711
- // Import selected assets
712
- const importSelectedAssets = useCallback(async () => {
1158
+ projectInfo: DEMO_PROJECT
1159
+ });
1160
+ const theme = useMemo(() => ({ ...DEFAULT_THEME, ...themeOverride }), [themeOverride]);
1161
+ const importSelectedAssets = useCallback(async () => {
713
1162
  if (state.selectedAssets.size === 0 || !state.projectInfo) {
714
- return;
1163
+ return;
715
1164
  }
716
- const selectedAssets = state.projectInfo.assets.filter((a) => state.selectedAssets.has(a.id));
1165
+ const selectedAssets = state.projectInfo.assets.filter(
1166
+ (a) => state.selectedAssets.has(a.id)
1167
+ );
717
1168
  dispatch({
718
- type: 'SET_IMPORT_PROGRESS',
719
- progress: {
720
- phase: 'scanning',
721
- current: 0,
722
- total: selectedAssets.length,
723
- currentAsset: '',
724
- message: 'Preparing import...',
725
- },
1169
+ type: "SET_IMPORT_PROGRESS",
1170
+ progress: {
1171
+ phase: "scanning",
1172
+ current: 0,
1173
+ total: selectedAssets.length,
1174
+ currentAsset: "",
1175
+ message: "Preparing import..."
1176
+ }
726
1177
  });
727
1178
  try {
728
- for (let i = 0; i < selectedAssets.length; i++) {
729
- dispatch({
730
- type: 'SET_IMPORT_PROGRESS',
731
- progress: {
732
- phase: 'importing',
733
- current: i + 1,
734
- total: selectedAssets.length,
735
- currentAsset: selectedAssets[i].path,
736
- message: `Importing asset ${i + 1} of ${selectedAssets.length}`,
737
- },
738
- });
739
- // Simulate import delay
740
- await new Promise((resolve) => setTimeout(resolve, 200));
741
- }
742
- if (onImport) {
743
- await onImport(selectedAssets);
744
- }
745
- dispatch({
746
- type: 'SET_IMPORT_PROGRESS',
747
- progress: {
748
- phase: 'complete',
749
- current: selectedAssets.length,
750
- total: selectedAssets.length,
751
- currentAsset: '',
752
- message: 'Import complete!',
753
- },
754
- });
755
- setTimeout(() => {
756
- dispatch({ type: 'SET_IMPORT_PROGRESS', progress: null });
757
- dispatch({ type: 'DESELECT_ALL' });
758
- }, 1500);
759
- }
760
- catch (error) {
1179
+ for (let i = 0; i < selectedAssets.length; i++) {
761
1180
  dispatch({
762
- type: 'SET_IMPORT_PROGRESS',
763
- progress: {
764
- phase: 'error',
765
- current: 0,
766
- total: 0,
767
- currentAsset: '',
768
- message: `Import failed: ${error}`,
769
- },
1181
+ type: "SET_IMPORT_PROGRESS",
1182
+ progress: {
1183
+ phase: "importing",
1184
+ current: i + 1,
1185
+ total: selectedAssets.length,
1186
+ currentAsset: selectedAssets[i].path,
1187
+ message: `Importing asset ${i + 1} of ${selectedAssets.length}`
1188
+ }
770
1189
  });
1190
+ await new Promise((resolve) => setTimeout(resolve, 200));
1191
+ }
1192
+ if (onImport) {
1193
+ await onImport(selectedAssets);
1194
+ }
1195
+ dispatch({
1196
+ type: "SET_IMPORT_PROGRESS",
1197
+ progress: {
1198
+ phase: "complete",
1199
+ current: selectedAssets.length,
1200
+ total: selectedAssets.length,
1201
+ currentAsset: "",
1202
+ message: "Import complete!"
1203
+ }
1204
+ });
1205
+ setTimeout(() => {
1206
+ dispatch({ type: "SET_IMPORT_PROGRESS", progress: null });
1207
+ dispatch({ type: "DESELECT_ALL" });
1208
+ }, 1500);
1209
+ } catch (error) {
1210
+ dispatch({
1211
+ type: "SET_IMPORT_PROGRESS",
1212
+ progress: {
1213
+ phase: "error",
1214
+ current: 0,
1215
+ total: 0,
1216
+ currentAsset: "",
1217
+ message: `Import failed: ${error}`
1218
+ }
1219
+ });
771
1220
  }
772
- }, [state.selectedAssets, state.projectInfo, onImport]);
773
- // Live Link
774
- const connectLiveLink = useCallback(async () => {
1221
+ }, [state.selectedAssets, state.projectInfo, onImport]);
1222
+ const connectLiveLink = useCallback(async () => {
775
1223
  if (onLiveLinkConnect) {
776
- const status = await onLiveLinkConnect();
777
- dispatch({ type: 'SET_LIVE_LINK_STATUS', status });
778
- }
779
- else {
780
- dispatch({
781
- type: 'SET_LIVE_LINK_STATUS',
782
- status: {
783
- connected: true,
784
- unityVersion: '2022.3.10f1',
785
- projectName: 'MyUnityProject',
786
- playMode: 'stopped',
787
- },
788
- });
1224
+ const status = await onLiveLinkConnect();
1225
+ dispatch({ type: "SET_LIVE_LINK_STATUS", status });
1226
+ } else {
1227
+ dispatch({
1228
+ type: "SET_LIVE_LINK_STATUS",
1229
+ status: {
1230
+ connected: true,
1231
+ unityVersion: "2022.3.10f1",
1232
+ projectName: "MyUnityProject",
1233
+ playMode: "stopped"
1234
+ }
1235
+ });
789
1236
  }
790
- }, [onLiveLinkConnect]);
791
- const disconnectLiveLink = useCallback(() => {
1237
+ }, [onLiveLinkConnect]);
1238
+ const disconnectLiveLink = useCallback(() => {
792
1239
  onLiveLinkDisconnect?.();
793
1240
  dispatch({
794
- type: 'SET_LIVE_LINK_STATUS',
795
- status: { connected: false, playMode: 'stopped' },
1241
+ type: "SET_LIVE_LINK_STATUS",
1242
+ status: { connected: false, playMode: "stopped" }
796
1243
  });
797
- }, [onLiveLinkDisconnect]);
798
- // Imperative handle
799
- useImperativeHandle(ref, () => ({
800
- loadProject: async (_path) => {
801
- // In real implementation, would load from path
802
- dispatch({ type: 'SET_PROJECT', info: DEMO_PROJECT });
1244
+ }, [onLiveLinkDisconnect]);
1245
+ useImperativeHandle(
1246
+ ref,
1247
+ () => ({
1248
+ loadProject: async (_path) => {
1249
+ dispatch({ type: "SET_PROJECT", info: DEMO_PROJECT });
803
1250
  onProjectLoad?.(DEMO_PROJECT);
804
- },
805
- getSelectedAssets: () => {
1251
+ },
1252
+ getSelectedAssets: () => {
806
1253
  if (!state.projectInfo) {
807
- return [];
1254
+ return [];
808
1255
  }
809
1256
  return state.projectInfo.assets.filter((a) => state.selectedAssets.has(a.id));
810
- },
811
- importSelected: importSelectedAssets,
812
- }), [state.projectInfo, state.selectedAssets, importSelectedAssets, onProjectLoad]);
813
- const ctxValue = useMemo(() => ({
814
- state,
815
- dispatch,
816
- theme,
817
- importSelectedAssets,
818
- connectLiveLink,
819
- disconnectLiveLink,
820
- }), [state, theme, importSelectedAssets, connectLiveLink, disconnectLiveLink]);
821
- return (jsx(BrowserContext.Provider, { value: ctxValue, children: jsxs("div", { className: `unity-project-browser ${className ?? ''}`, style: {
822
- display: 'flex',
823
- flexDirection: 'column',
824
- width: '100%',
825
- height: '100%',
826
- backgroundColor: theme.background,
827
- fontFamily: 'system-ui, sans-serif',
828
- position: 'relative',
829
- overflow: 'hidden',
830
- ...style,
831
- }, children: [jsx(BrowserHeader, { projectPath: projectPath }), jsx(BrowserToolbar, {}), jsx(TabBar, {}), jsxs("div", { style: { flex: 1, overflow: 'auto' }, children: [state.tab === 'assets' &&
832
- (state.viewMode === 'tree' && state.projectInfo ? (jsx("div", { style: { padding: 8 }, children: jsx(FolderTreeItem, { folder: state.projectInfo.folders, indent: 0 }) })) : (jsx(AssetGridView, {}))), state.tab === 'scenes' && jsx(ScenesPanel, {}), state.tab === 'packages' && jsx(PackagesPanel, {}), state.tab === 'settings' && jsx(SettingsPanel, {})] }), jsx(PreviewPanel, {}), jsx(ImportProgressOverlay, {})] }) }));
833
- }), { displayName: 'UnityProjectBrowser' });
834
-
835
- export { UnityProjectBrowser };
1257
+ },
1258
+ importSelected: importSelectedAssets
1259
+ }),
1260
+ [state.projectInfo, state.selectedAssets, importSelectedAssets, onProjectLoad]
1261
+ );
1262
+ const ctxValue = useMemo(
1263
+ () => ({
1264
+ state,
1265
+ dispatch,
1266
+ theme,
1267
+ importSelectedAssets,
1268
+ connectLiveLink,
1269
+ disconnectLiveLink
1270
+ }),
1271
+ [state, theme, importSelectedAssets, connectLiveLink, disconnectLiveLink]
1272
+ );
1273
+ return /* @__PURE__ */ jsx(BrowserContext.Provider, { value: ctxValue, children: /* @__PURE__ */ jsxs(
1274
+ "div",
1275
+ {
1276
+ className: `unity-project-browser ${className ?? ""}`,
1277
+ style: {
1278
+ display: "flex",
1279
+ flexDirection: "column",
1280
+ width: "100%",
1281
+ height: "100%",
1282
+ backgroundColor: theme.background,
1283
+ fontFamily: "system-ui, sans-serif",
1284
+ position: "relative",
1285
+ overflow: "hidden",
1286
+ ...style
1287
+ },
1288
+ children: [
1289
+ /* @__PURE__ */ jsx(BrowserHeader, { projectPath }),
1290
+ /* @__PURE__ */ jsx(BrowserToolbar, {}),
1291
+ /* @__PURE__ */ jsx(TabBar, {}),
1292
+ /* @__PURE__ */ jsxs("div", { style: { flex: 1, overflow: "auto" }, children: [
1293
+ state.tab === "assets" && (state.viewMode === "tree" && state.projectInfo ? /* @__PURE__ */ jsx("div", { style: { padding: 8 }, children: /* @__PURE__ */ jsx(FolderTreeItem, { folder: state.projectInfo.folders, indent: 0 }) }) : /* @__PURE__ */ jsx(AssetGridView, {})),
1294
+ state.tab === "scenes" && /* @__PURE__ */ jsx(ScenesPanel, {}),
1295
+ state.tab === "packages" && /* @__PURE__ */ jsx(PackagesPanel, {}),
1296
+ state.tab === "settings" && /* @__PURE__ */ jsx(SettingsPanel, {})
1297
+ ] }),
1298
+ /* @__PURE__ */ jsx(PreviewPanel, {}),
1299
+ /* @__PURE__ */ jsx(ImportProgressOverlay, {})
1300
+ ]
1301
+ }
1302
+ ) });
1303
+ }
1304
+ ),
1305
+ { displayName: "UnityProjectBrowser" }
1306
+ );
1307
+ export {
1308
+ UnityProjectBrowser
1309
+ };