@nice2dev/game-engine 1.3.15 → 1.3.17

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