@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,669 +1,969 @@
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: '#1d2229',
9
- panelBackground: '#252d38',
10
- headerBackground: '#1a2028',
11
- itemBackground: 'rgba(255,255,255,0.02)',
12
- itemHover: 'rgba(255,255,255,0.05)',
13
- itemSelected: 'rgba(73, 140, 200, 0.2)',
14
- textPrimary: '#e0e6ed',
15
- textSecondary: '#8a99a8',
16
- accent: '#478cbf',
17
- success: '#38b54a',
18
- warning: '#e0c138',
19
- danger: '#dd5555',
20
- border: 'rgba(255,255,255,0.08)',
21
- godotBlue: '#478cbf',
22
- sceneColor: '#6ccdd8',
23
- scriptColor: '#a3d17a',
24
- resourceColor: '#c9bc57',
7
+ background: "#1d2229",
8
+ panelBackground: "#252d38",
9
+ headerBackground: "#1a2028",
10
+ itemBackground: "rgba(255,255,255,0.02)",
11
+ itemHover: "rgba(255,255,255,0.05)",
12
+ itemSelected: "rgba(73, 140, 200, 0.2)",
13
+ textPrimary: "#e0e6ed",
14
+ textSecondary: "#8a99a8",
15
+ accent: "#478cbf",
16
+ success: "#38b54a",
17
+ warning: "#e0c138",
18
+ danger: "#dd5555",
19
+ border: "rgba(255,255,255,0.08)",
20
+ godotBlue: "#478cbf",
21
+ sceneColor: "#6ccdd8",
22
+ scriptColor: "#a3d17a",
23
+ resourceColor: "#c9bc57"
25
24
  };
26
25
  function browserReducer(state, action) {
27
- switch (action.type) {
28
- case 'SET_PROJECT':
29
- return { ...state, projectInfo: action.info, selectedResources: new Set() };
30
- case 'CLEAR_PROJECT':
31
- return { ...state, projectInfo: null, selectedResources: new Set() };
32
- case 'SELECT_RESOURCE':
33
- if (action.additive) {
34
- const newSet = new Set(state.selectedResources);
35
- if (newSet.has(action.id)) {
36
- newSet.delete(action.id);
37
- }
38
- else {
39
- newSet.add(action.id);
40
- }
41
- return { ...state, selectedResources: newSet };
42
- }
43
- return { ...state, selectedResources: new Set([action.id]) };
44
- case 'SELECT_ALL':
45
- return {
46
- ...state,
47
- selectedResources: new Set(state.projectInfo?.resources.map((r) => r.id) ?? []),
48
- };
49
- case 'DESELECT_ALL':
50
- return { ...state, selectedResources: new Set() };
51
- case 'TOGGLE_FOLDER': {
52
- const expanded = new Set(state.expandedFolders);
53
- if (expanded.has(action.path)) {
54
- expanded.delete(action.path);
55
- }
56
- else {
57
- expanded.add(action.path);
58
- }
59
- return { ...state, expandedFolders: expanded };
26
+ switch (action.type) {
27
+ case "SET_PROJECT":
28
+ return { ...state, projectInfo: action.info, selectedResources: /* @__PURE__ */ new Set() };
29
+ case "CLEAR_PROJECT":
30
+ return { ...state, projectInfo: null, selectedResources: /* @__PURE__ */ new Set() };
31
+ case "SELECT_RESOURCE":
32
+ if (action.additive) {
33
+ const newSet = new Set(state.selectedResources);
34
+ if (newSet.has(action.id)) {
35
+ newSet.delete(action.id);
36
+ } else {
37
+ newSet.add(action.id);
60
38
  }
61
- case 'SET_SEARCH':
62
- return { ...state, searchQuery: action.query };
63
- case 'SET_FILTER':
64
- return { ...state, filterType: action.filter };
65
- case 'SET_VIEW_MODE':
66
- return { ...state, viewMode: action.mode };
67
- case 'SET_PREVIEW':
68
- return { ...state, previewResource: action.resource };
69
- case 'SET_SYNC_STATUS':
70
- return { ...state, syncStatus: action.status };
71
- case 'SET_IMPORTING':
72
- return {
73
- ...state,
74
- importing: action.importing,
75
- importProgress: action.progress ?? state.importProgress,
76
- };
77
- case 'SET_TAB':
78
- return { ...state, tab: action.tab };
79
- default:
80
- return state;
39
+ return { ...state, selectedResources: newSet };
40
+ }
41
+ return { ...state, selectedResources: /* @__PURE__ */ new Set([action.id]) };
42
+ case "SELECT_ALL":
43
+ return {
44
+ ...state,
45
+ selectedResources: new Set(state.projectInfo?.resources.map((r) => r.id) ?? [])
46
+ };
47
+ case "DESELECT_ALL":
48
+ return { ...state, selectedResources: /* @__PURE__ */ new Set() };
49
+ case "TOGGLE_FOLDER": {
50
+ const expanded = new Set(state.expandedFolders);
51
+ if (expanded.has(action.path)) {
52
+ expanded.delete(action.path);
53
+ } else {
54
+ expanded.add(action.path);
55
+ }
56
+ return { ...state, expandedFolders: expanded };
81
57
  }
58
+ case "SET_SEARCH":
59
+ return { ...state, searchQuery: action.query };
60
+ case "SET_FILTER":
61
+ return { ...state, filterType: action.filter };
62
+ case "SET_VIEW_MODE":
63
+ return { ...state, viewMode: action.mode };
64
+ case "SET_PREVIEW":
65
+ return { ...state, previewResource: action.resource };
66
+ case "SET_SYNC_STATUS":
67
+ return { ...state, syncStatus: action.status };
68
+ case "SET_IMPORTING":
69
+ return {
70
+ ...state,
71
+ importing: action.importing,
72
+ importProgress: action.progress ?? state.importProgress
73
+ };
74
+ case "SET_TAB":
75
+ return { ...state, tab: action.tab };
76
+ default:
77
+ return state;
78
+ }
82
79
  }
83
80
  const INITIAL_STATE = {
84
- projectInfo: null,
85
- selectedResources: new Set(),
86
- expandedFolders: new Set(['res://']),
87
- searchQuery: '',
88
- filterType: 'all',
89
- viewMode: 'tree',
90
- previewResource: null,
91
- syncStatus: { connected: false, isRunning: false, debuggerConnected: false },
92
- importing: false,
93
- importProgress: 0,
94
- tab: 'files',
81
+ projectInfo: null,
82
+ selectedResources: /* @__PURE__ */ new Set(),
83
+ expandedFolders: /* @__PURE__ */ new Set(["res://"]),
84
+ searchQuery: "",
85
+ filterType: "all",
86
+ viewMode: "tree",
87
+ previewResource: null,
88
+ syncStatus: { connected: false, isRunning: false, debuggerConnected: false },
89
+ importing: false,
90
+ importProgress: 0,
91
+ tab: "files"
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 GodotProjectBrowser');
101
- }
102
- return ctx;
95
+ const ctx = React.useContext(BrowserContext);
96
+ if (!ctx) {
97
+ throw new Error("useBrowser must be used within GodotProjectBrowser");
98
+ }
99
+ return ctx;
103
100
  }
104
- /* ── Helper Functions ─────────────────────────────────────────── */
105
101
  function getResourceIcon(type) {
106
- switch (type) {
107
- case 'scene':
108
- return 'video';
109
- case 'script':
110
- return 'code';
111
- case 'resource':
112
- return 'file';
113
- case 'texture':
114
- return 'image';
115
- case 'audio':
116
- return 'volume';
117
- case 'mesh':
118
- return 'hexagon';
119
- case 'material':
120
- return 'palette';
121
- case 'animation':
122
- return 'play';
123
- case 'shader':
124
- return 'wand';
125
- case 'theme':
126
- return 'layers';
127
- default:
128
- return 'file';
129
- }
102
+ switch (type) {
103
+ case "scene":
104
+ return "video";
105
+ case "script":
106
+ return "code";
107
+ case "resource":
108
+ return "file";
109
+ case "texture":
110
+ return "image";
111
+ case "audio":
112
+ return "volume";
113
+ case "mesh":
114
+ return "hexagon";
115
+ case "material":
116
+ return "palette";
117
+ case "animation":
118
+ return "play";
119
+ case "shader":
120
+ return "wand";
121
+ case "theme":
122
+ return "layers";
123
+ default:
124
+ return "file";
125
+ }
130
126
  }
131
127
  function formatFileSize(bytes) {
132
- if (bytes < 1024) {
133
- return `${bytes} B`;
134
- }
135
- if (bytes < 1024 * 1024) {
136
- return `${(bytes / 1024).toFixed(1)} KB`;
137
- }
138
- return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
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`;
139
135
  }
140
- /* ── Header Component ─────────────────────────────────────────── */
141
136
  const BrowserHeader = () => {
142
- const { state, dispatch: _dispatch, theme, connectSync, disconnectSync } = useBrowser();
143
- return (jsxRuntime.jsxs("div", { style: {
144
- display: 'flex',
145
- alignItems: 'center',
146
- gap: 12,
147
- padding: '12px 16px',
148
- backgroundColor: theme.headerBackground,
149
- borderBottom: `1px solid ${theme.border}`,
150
- }, children: [jsxRuntime.jsx("div", { style: {
151
- width: 32,
152
- height: 32,
153
- backgroundColor: theme.godotBlue,
137
+ const { state, dispatch: _dispatch, theme, connectSync, disconnectSync } = useBrowser();
138
+ return /* @__PURE__ */ jsxRuntime.jsxs(
139
+ "div",
140
+ {
141
+ style: {
142
+ display: "flex",
143
+ alignItems: "center",
144
+ gap: 12,
145
+ padding: "12px 16px",
146
+ backgroundColor: theme.headerBackground,
147
+ borderBottom: `1px solid ${theme.border}`
148
+ },
149
+ children: [
150
+ /* @__PURE__ */ jsxRuntime.jsx(
151
+ "div",
152
+ {
153
+ style: {
154
+ width: 32,
155
+ height: 32,
156
+ backgroundColor: theme.godotBlue,
157
+ borderRadius: 4,
158
+ display: "flex",
159
+ alignItems: "center",
160
+ justifyContent: "center",
161
+ fontSize: 18
162
+ },
163
+ children: /* @__PURE__ */ jsxRuntime.jsx(ui.NiceIcon, { name: "gamepad", size: 18 })
164
+ }
165
+ ),
166
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: 1 }, children: [
167
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 14, fontWeight: 600, color: theme.textPrimary }, children: state.projectInfo?.name ?? "No Project Loaded" }),
168
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 11, color: theme.textSecondary }, children: state.projectInfo ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
169
+ "Godot ",
170
+ state.projectInfo.godotVersion,
171
+ " •",
172
+ " ",
173
+ state.projectInfo.renderer.replace("_", " "),
174
+ state.projectInfo.dotnetEnabled && " • C#"
175
+ ] }) : "Select a Godot project.godot file" })
176
+ ] }),
177
+ /* @__PURE__ */ jsxRuntime.jsxs(
178
+ "div",
179
+ {
180
+ style: {
181
+ display: "flex",
182
+ alignItems: "center",
183
+ gap: 8,
184
+ padding: "6px 12px",
185
+ backgroundColor: state.syncStatus.connected ? "rgba(56, 181, 74, 0.1)" : "rgba(0,0,0,0.2)",
186
+ borderRadius: 20,
187
+ border: `1px solid ${state.syncStatus.connected ? theme.success : theme.border}`
188
+ },
189
+ children: [
190
+ /* @__PURE__ */ jsxRuntime.jsx(
191
+ "div",
192
+ {
193
+ style: {
194
+ width: 8,
195
+ height: 8,
196
+ borderRadius: "50%",
197
+ backgroundColor: state.syncStatus.connected ? state.syncStatus.isRunning ? theme.warning : theme.success : theme.textSecondary
198
+ }
199
+ }
200
+ ),
201
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 11, color: theme.textPrimary }, children: state.syncStatus.connected ? state.syncStatus.isRunning ? "Running" : "Connected" : "Disconnected" }),
202
+ /* @__PURE__ */ jsxRuntime.jsx(
203
+ "button",
204
+ {
205
+ onClick: () => state.syncStatus.connected ? disconnectSync() : connectSync(),
206
+ style: {
207
+ padding: "2px 8px",
208
+ fontSize: 10,
209
+ backgroundColor: theme.accent,
210
+ border: "none",
154
211
  borderRadius: 4,
155
- display: 'flex',
156
- alignItems: 'center',
157
- justifyContent: 'center',
158
- fontSize: 18,
159
- }, 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: ["Godot ", state.projectInfo.godotVersion, " \u2022", ' ', state.projectInfo.renderer.replace('_', ' '), state.projectInfo.dotnetEnabled && ' • C#'] })) : ('Select a Godot project.godot file') })] }), jsxRuntime.jsxs("div", { style: {
160
- display: 'flex',
161
- alignItems: 'center',
162
- gap: 8,
163
- padding: '6px 12px',
164
- backgroundColor: state.syncStatus.connected
165
- ? 'rgba(56, 181, 74, 0.1)'
166
- : 'rgba(0,0,0,0.2)',
167
- borderRadius: 20,
168
- border: `1px solid ${state.syncStatus.connected ? theme.success : theme.border}`,
169
- }, children: [jsxRuntime.jsx("div", { style: {
170
- width: 8,
171
- height: 8,
172
- borderRadius: '50%',
173
- backgroundColor: state.syncStatus.connected
174
- ? state.syncStatus.isRunning
175
- ? theme.warning
176
- : theme.success
177
- : theme.textSecondary,
178
- } }), jsxRuntime.jsx("span", { style: { fontSize: 11, color: theme.textPrimary }, children: state.syncStatus.connected
179
- ? state.syncStatus.isRunning
180
- ? 'Running'
181
- : 'Connected'
182
- : 'Disconnected' }), jsxRuntime.jsx("button", { onClick: () => (state.syncStatus.connected ? disconnectSync() : connectSync()), style: {
183
- padding: '2px 8px',
184
- fontSize: 10,
185
- backgroundColor: theme.accent,
186
- border: 'none',
187
- borderRadius: 4,
188
- color: '#fff',
189
- cursor: 'pointer',
190
- }, children: state.syncStatus.connected ? 'Disconnect' : 'Connect' })] })] }));
212
+ color: "#fff",
213
+ cursor: "pointer"
214
+ },
215
+ children: state.syncStatus.connected ? "Disconnect" : "Connect"
216
+ }
217
+ )
218
+ ]
219
+ }
220
+ )
221
+ ]
222
+ }
223
+ );
191
224
  };
192
- /* ── Toolbar Component ────────────────────────────────────────── */
193
225
  const BrowserToolbar = () => {
194
- const { state, dispatch, theme, importSelectedResources } = useBrowser();
195
- const filters = [
196
- { value: 'all', label: 'All' },
197
- { value: 'scene', label: 'Scenes' },
198
- { value: 'script', label: 'Scripts' },
199
- { value: 'resource', label: 'Resources' },
200
- { value: 'texture', label: 'Textures' },
201
- { value: 'mesh', label: 'Meshes' },
202
- { value: 'material', label: 'Materials' },
203
- { value: 'shader', label: 'Shaders' },
204
- { value: 'audio', label: 'Audio' },
205
- ];
206
- return (jsxRuntime.jsxs("div", { style: {
207
- display: 'flex',
208
- alignItems: 'center',
209
- gap: 8,
210
- padding: '8px 16px',
211
- backgroundColor: theme.panelBackground,
212
- borderBottom: `1px solid ${theme.border}`,
213
- }, children: [jsxRuntime.jsx("div", { style: { flex: 1, maxWidth: 300 }, children: jsxRuntime.jsx("input", { type: "text", placeholder: "Search resources...", value: state.searchQuery, onChange: (e) => dispatch({ type: 'SET_SEARCH', query: e.target.value }), style: {
214
- width: '100%',
215
- padding: '6px 12px',
216
- fontSize: 12,
217
- backgroundColor: 'rgba(0,0,0,0.2)',
218
- border: `1px solid ${theme.border}`,
219
- borderRadius: 6,
220
- color: theme.textPrimary,
221
- outline: 'none',
222
- } }) }), jsxRuntime.jsx("select", { value: state.filterType, onChange: (e) => dispatch({ type: 'SET_FILTER', filter: e.target.value }), style: {
223
- padding: '6px 10px',
226
+ const { state, dispatch, theme, importSelectedResources } = useBrowser();
227
+ const filters = [
228
+ { value: "all", label: "All" },
229
+ { value: "scene", label: "Scenes" },
230
+ { value: "script", label: "Scripts" },
231
+ { value: "resource", label: "Resources" },
232
+ { value: "texture", label: "Textures" },
233
+ { value: "mesh", label: "Meshes" },
234
+ { value: "material", label: "Materials" },
235
+ { value: "shader", label: "Shaders" },
236
+ { value: "audio", label: "Audio" }
237
+ ];
238
+ return /* @__PURE__ */ jsxRuntime.jsxs(
239
+ "div",
240
+ {
241
+ style: {
242
+ display: "flex",
243
+ alignItems: "center",
244
+ gap: 8,
245
+ padding: "8px 16px",
246
+ backgroundColor: theme.panelBackground,
247
+ borderBottom: `1px solid ${theme.border}`
248
+ },
249
+ children: [
250
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 1, maxWidth: 300 }, children: /* @__PURE__ */ jsxRuntime.jsx(
251
+ "input",
252
+ {
253
+ type: "text",
254
+ placeholder: "Search resources...",
255
+ value: state.searchQuery,
256
+ onChange: (e) => dispatch({ type: "SET_SEARCH", query: e.target.value }),
257
+ style: {
258
+ width: "100%",
259
+ padding: "6px 12px",
260
+ fontSize: 12,
261
+ backgroundColor: "rgba(0,0,0,0.2)",
262
+ border: `1px solid ${theme.border}`,
263
+ borderRadius: 6,
264
+ color: theme.textPrimary,
265
+ outline: "none"
266
+ }
267
+ }
268
+ ) }),
269
+ /* @__PURE__ */ jsxRuntime.jsx(
270
+ "select",
271
+ {
272
+ value: state.filterType,
273
+ onChange: (e) => dispatch({ type: "SET_FILTER", filter: e.target.value }),
274
+ style: {
275
+ padding: "6px 10px",
276
+ fontSize: 12,
277
+ backgroundColor: "rgba(0,0,0,0.2)",
278
+ border: `1px solid ${theme.border}`,
279
+ borderRadius: 6,
280
+ color: theme.textPrimary
281
+ },
282
+ children: filters.map((f) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: f.value, children: f.label }, f.value))
283
+ }
284
+ ),
285
+ /* @__PURE__ */ jsxRuntime.jsxs(
286
+ "div",
287
+ {
288
+ style: {
289
+ display: "flex",
290
+ backgroundColor: "rgba(0,0,0,0.2)",
291
+ borderRadius: 6,
292
+ overflow: "hidden"
293
+ },
294
+ children: [
295
+ /* @__PURE__ */ jsxRuntime.jsx(
296
+ "button",
297
+ {
298
+ onClick: () => dispatch({ type: "SET_VIEW_MODE", mode: "tree" }),
299
+ "aria-label": "Tree view",
300
+ style: {
301
+ padding: "6px 10px",
224
302
  fontSize: 12,
225
- backgroundColor: 'rgba(0,0,0,0.2)',
226
- border: `1px solid ${theme.border}`,
227
- borderRadius: 6,
228
- color: theme.textPrimary,
229
- }, children: filters.map((f) => (jsxRuntime.jsx("option", { value: f.value, children: f.label }, f.value))) }), jsxRuntime.jsxs("div", { style: {
230
- display: 'flex',
231
- backgroundColor: 'rgba(0,0,0,0.2)',
232
- borderRadius: 6,
233
- overflow: 'hidden',
234
- }, children: [jsxRuntime.jsx("button", { onClick: () => dispatch({ type: 'SET_VIEW_MODE', mode: 'tree' }), "aria-label": "Tree view", style: {
235
- padding: '6px 10px',
236
- fontSize: 12,
237
- backgroundColor: state.viewMode === 'tree' ? theme.accent : 'transparent',
238
- border: 'none',
239
- color: '#fff',
240
- cursor: 'pointer',
241
- }, 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: {
242
- padding: '6px 10px',
243
- fontSize: 12,
244
- backgroundColor: state.viewMode === 'grid' ? theme.accent : 'transparent',
245
- border: 'none',
246
- color: '#fff',
247
- cursor: 'pointer',
248
- }, 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.selectedResources.size, " selected"] }), jsxRuntime.jsxs("button", { onClick: importSelectedResources, disabled: state.selectedResources.size === 0 || state.importing, style: {
249
- padding: '8px 16px',
303
+ backgroundColor: state.viewMode === "tree" ? theme.accent : "transparent",
304
+ border: "none",
305
+ color: "#fff",
306
+ cursor: "pointer"
307
+ },
308
+ children: /* @__PURE__ */ jsxRuntime.jsx(ui.NiceIcon, { name: "list", size: 14 })
309
+ }
310
+ ),
311
+ /* @__PURE__ */ jsxRuntime.jsx(
312
+ "button",
313
+ {
314
+ onClick: () => dispatch({ type: "SET_VIEW_MODE", mode: "grid" }),
315
+ "aria-label": "Grid view",
316
+ style: {
317
+ padding: "6px 10px",
250
318
  fontSize: 12,
251
- fontWeight: 500,
252
- backgroundColor: state.selectedResources.size > 0 && !state.importing
253
- ? theme.accent
254
- : theme.textSecondary,
255
- border: 'none',
256
- borderRadius: 6,
257
- color: '#fff',
258
- cursor: state.selectedResources.size > 0 && !state.importing ? 'pointer' : 'not-allowed',
259
- opacity: state.selectedResources.size > 0 && !state.importing ? 1 : 0.5,
260
- }, children: [jsxRuntime.jsx(ui.NiceIcon, { name: state.importing ? 'clock' : 'download', size: 14 }), ' ', state.importing ? `${state.importProgress}%` : 'Import Selected'] })] }));
319
+ backgroundColor: state.viewMode === "grid" ? theme.accent : "transparent",
320
+ border: "none",
321
+ color: "#fff",
322
+ cursor: "pointer"
323
+ },
324
+ children: /* @__PURE__ */ jsxRuntime.jsx(ui.NiceIcon, { name: "grid", size: 14 })
325
+ }
326
+ )
327
+ ]
328
+ }
329
+ ),
330
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 1 } }),
331
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontSize: 11, color: theme.textSecondary }, children: [
332
+ state.selectedResources.size,
333
+ " selected"
334
+ ] }),
335
+ /* @__PURE__ */ jsxRuntime.jsxs(
336
+ "button",
337
+ {
338
+ onClick: importSelectedResources,
339
+ disabled: state.selectedResources.size === 0 || state.importing,
340
+ style: {
341
+ padding: "8px 16px",
342
+ fontSize: 12,
343
+ fontWeight: 500,
344
+ backgroundColor: state.selectedResources.size > 0 && !state.importing ? theme.accent : theme.textSecondary,
345
+ border: "none",
346
+ borderRadius: 6,
347
+ color: "#fff",
348
+ cursor: state.selectedResources.size > 0 && !state.importing ? "pointer" : "not-allowed",
349
+ opacity: state.selectedResources.size > 0 && !state.importing ? 1 : 0.5
350
+ },
351
+ children: [
352
+ /* @__PURE__ */ jsxRuntime.jsx(ui.NiceIcon, { name: state.importing ? "clock" : "download", size: 14 }),
353
+ " ",
354
+ state.importing ? `${state.importProgress}%` : "Import Selected"
355
+ ]
356
+ }
357
+ )
358
+ ]
359
+ }
360
+ );
261
361
  };
262
- /* ── Tab Bar ─────────────────────────────────────────────────── */
263
362
  const TabBar = () => {
264
- const { state, dispatch, theme } = useBrowser();
265
- const tabs = [
266
- { id: 'files', label: 'Files', icon: 'folder' },
267
- { id: 'autoloads', label: 'Autoloads', icon: 'rocket' },
268
- { id: 'plugins', label: 'Plugins', icon: 'plug' },
269
- { id: 'exports', label: 'Exports', icon: 'box' },
270
- ];
271
- return (jsxRuntime.jsx("div", { style: {
272
- display: 'flex',
273
- backgroundColor: theme.panelBackground,
274
- borderBottom: `1px solid ${theme.border}`,
275
- }, children: tabs.map((tab) => (jsxRuntime.jsxs("button", { onClick: () => dispatch({ type: 'SET_TAB', tab: tab.id }), style: {
276
- flex: 1,
277
- padding: '10px 16px',
278
- fontSize: 12,
279
- backgroundColor: state.tab === tab.id ? theme.background : 'transparent',
280
- border: 'none',
281
- borderBottom: state.tab === tab.id ? `2px solid ${theme.accent}` : '2px solid transparent',
282
- color: state.tab === tab.id ? theme.textPrimary : theme.textSecondary,
283
- cursor: 'pointer',
284
- }, children: [jsxRuntime.jsx(ui.NiceIcon, { name: tab.icon, size: 14 }), " ", tab.label] }, tab.id))) }));
363
+ const { state, dispatch, theme } = useBrowser();
364
+ const tabs = [
365
+ { id: "files", label: "Files", icon: "folder" },
366
+ { id: "autoloads", label: "Autoloads", icon: "rocket" },
367
+ { id: "plugins", label: "Plugins", icon: "plug" },
368
+ { id: "exports", label: "Exports", icon: "box" }
369
+ ];
370
+ return /* @__PURE__ */ jsxRuntime.jsx(
371
+ "div",
372
+ {
373
+ style: {
374
+ display: "flex",
375
+ backgroundColor: theme.panelBackground,
376
+ borderBottom: `1px solid ${theme.border}`
377
+ },
378
+ children: tabs.map((tab) => /* @__PURE__ */ jsxRuntime.jsxs(
379
+ "button",
380
+ {
381
+ onClick: () => dispatch({ type: "SET_TAB", tab: tab.id }),
382
+ style: {
383
+ flex: 1,
384
+ padding: "10px 16px",
385
+ fontSize: 12,
386
+ backgroundColor: state.tab === tab.id ? theme.background : "transparent",
387
+ border: "none",
388
+ borderBottom: state.tab === tab.id ? `2px solid ${theme.accent}` : "2px solid transparent",
389
+ color: state.tab === tab.id ? theme.textPrimary : theme.textSecondary,
390
+ cursor: "pointer"
391
+ },
392
+ children: [
393
+ /* @__PURE__ */ jsxRuntime.jsx(ui.NiceIcon, { name: tab.icon, size: 14 }),
394
+ " ",
395
+ tab.label
396
+ ]
397
+ },
398
+ tab.id
399
+ ))
400
+ }
401
+ );
285
402
  };
286
- /* ── Resource Tree Item ───────────────────────────────────────── */
287
- const ResourceTreeItem = ({ resource, indent, }) => {
288
- const { state, dispatch, theme } = useBrowser();
289
- const isSelected = state.selectedResources.has(resource.id);
290
- return (jsxRuntime.jsxs("div", { role: "button", tabIndex: 0, onKeyDown: ui.clickOnActivationKey, onClick: (e) => dispatch({ type: 'SELECT_RESOURCE', id: resource.id, additive: e.ctrlKey || e.metaKey }), onDoubleClick: () => dispatch({ type: 'SET_PREVIEW', resource }), style: {
291
- display: 'flex',
292
- alignItems: 'center',
293
- gap: 8,
294
- padding: '4px 8px',
295
- paddingLeft: indent * 16 + 8,
296
- backgroundColor: isSelected ? theme.itemSelected : 'transparent',
297
- cursor: 'pointer',
298
- }, children: [jsxRuntime.jsx("input", { type: "checkbox", checked: isSelected, onChange: () => dispatch({ type: 'SELECT_RESOURCE', id: resource.id, additive: true }), onClick: (e) => e.stopPropagation() }), jsxRuntime.jsx(ui.NiceIcon, { name: getResourceIcon(resource.type), size: 14 }), jsxRuntime.jsx("span", { style: {
299
- flex: 1,
300
- fontSize: 12,
301
- color: isSelected ? theme.textPrimary : theme.textSecondary,
302
- overflow: 'hidden',
303
- textOverflow: 'ellipsis',
304
- whiteSpace: 'nowrap',
305
- }, children: resource.name }), jsxRuntime.jsx("span", { style: { fontSize: 10, color: theme.textSecondary }, children: formatFileSize(resource.size) })] }));
403
+ const ResourceTreeItem = ({
404
+ resource,
405
+ indent
406
+ }) => {
407
+ const { state, dispatch, theme } = useBrowser();
408
+ const isSelected = state.selectedResources.has(resource.id);
409
+ return /* @__PURE__ */ jsxRuntime.jsxs(
410
+ "div",
411
+ {
412
+ role: "button",
413
+ tabIndex: 0,
414
+ onKeyDown: ui.clickOnActivationKey,
415
+ onClick: (e) => dispatch({ type: "SELECT_RESOURCE", id: resource.id, additive: e.ctrlKey || e.metaKey }),
416
+ onDoubleClick: () => dispatch({ type: "SET_PREVIEW", resource }),
417
+ style: {
418
+ display: "flex",
419
+ alignItems: "center",
420
+ gap: 8,
421
+ padding: "4px 8px",
422
+ paddingLeft: indent * 16 + 8,
423
+ backgroundColor: isSelected ? theme.itemSelected : "transparent",
424
+ cursor: "pointer"
425
+ },
426
+ children: [
427
+ /* @__PURE__ */ jsxRuntime.jsx(
428
+ "input",
429
+ {
430
+ type: "checkbox",
431
+ checked: isSelected,
432
+ onChange: () => dispatch({ type: "SELECT_RESOURCE", id: resource.id, additive: true }),
433
+ onClick: (e) => e.stopPropagation()
434
+ }
435
+ ),
436
+ /* @__PURE__ */ jsxRuntime.jsx(ui.NiceIcon, { name: getResourceIcon(resource.type), size: 14 }),
437
+ /* @__PURE__ */ jsxRuntime.jsx(
438
+ "span",
439
+ {
440
+ style: {
441
+ flex: 1,
442
+ fontSize: 12,
443
+ color: isSelected ? theme.textPrimary : theme.textSecondary,
444
+ overflow: "hidden",
445
+ textOverflow: "ellipsis",
446
+ whiteSpace: "nowrap"
447
+ },
448
+ children: resource.name
449
+ }
450
+ ),
451
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 10, color: theme.textSecondary }, children: formatFileSize(resource.size) })
452
+ ]
453
+ }
454
+ );
306
455
  };
307
456
  const FolderTreeItem = ({ folder, indent }) => {
308
- const { state, dispatch, theme } = useBrowser();
309
- const isExpanded = state.expandedFolders.has(folder.path);
310
- const filteredChildren = React.useMemo(() => {
311
- return folder.children.filter((child) => {
312
- if ('children' in child) {
313
- return true;
314
- }
315
- const resource = child;
316
- if (state.filterType !== 'all' && resource.type !== state.filterType) {
317
- return false;
318
- }
319
- if (state.searchQuery) {
320
- return resource.name.toLowerCase().includes(state.searchQuery.toLowerCase());
457
+ const { state, dispatch, theme } = useBrowser();
458
+ const isExpanded = state.expandedFolders.has(folder.path);
459
+ const filteredChildren = React.useMemo(() => {
460
+ return folder.children.filter((child) => {
461
+ if ("children" in child) {
462
+ return true;
463
+ }
464
+ const resource = child;
465
+ if (state.filterType !== "all" && resource.type !== state.filterType) {
466
+ return false;
467
+ }
468
+ if (state.searchQuery) {
469
+ return resource.name.toLowerCase().includes(state.searchQuery.toLowerCase());
470
+ }
471
+ return true;
472
+ });
473
+ }, [folder.children, state.filterType, state.searchQuery]);
474
+ if (filteredChildren.length === 0 && state.searchQuery) {
475
+ return null;
476
+ }
477
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
478
+ /* @__PURE__ */ jsxRuntime.jsxs(
479
+ "div",
480
+ {
481
+ role: "button",
482
+ tabIndex: 0,
483
+ "aria-expanded": isExpanded,
484
+ onKeyDown: ui.clickOnActivationKey,
485
+ onClick: () => dispatch({ type: "TOGGLE_FOLDER", path: folder.path }),
486
+ style: {
487
+ display: "flex",
488
+ alignItems: "center",
489
+ gap: 8,
490
+ padding: "4px 8px",
491
+ paddingLeft: indent * 16 + 8,
492
+ cursor: "pointer"
493
+ },
494
+ children: [
495
+ /* @__PURE__ */ jsxRuntime.jsx(
496
+ ui.NiceIcon,
497
+ {
498
+ name: isExpanded ? "chevron-down" : "chevron-right",
499
+ size: 10,
500
+ color: theme.textSecondary
321
501
  }
322
- return true;
323
- });
324
- }, [folder.children, state.filterType, state.searchQuery]);
325
- if (filteredChildren.length === 0 && state.searchQuery) {
326
- return null;
327
- }
328
- 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: {
329
- display: 'flex',
330
- alignItems: 'center',
331
- gap: 8,
332
- padding: '4px 8px',
333
- paddingLeft: indent * 16 + 8,
334
- cursor: 'pointer',
335
- }, children: [jsxRuntime.jsx(ui.NiceIcon, { name: isExpanded ? 'chevron-down' : 'chevron-right', size: 10, color: theme.textSecondary }), jsxRuntime.jsx(ui.NiceIcon, { name: "folder", size: 14 }), 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 &&
336
- filteredChildren.map((child, _i) => 'children' in child ? (jsxRuntime.jsx(FolderTreeItem, { folder: child, indent: indent + 1 }, child.path)) : (jsxRuntime.jsx(ResourceTreeItem, { resource: child, indent: indent + 1 }, child.id)))] }));
502
+ ),
503
+ /* @__PURE__ */ jsxRuntime.jsx(ui.NiceIcon, { name: "folder", size: 14 }),
504
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 12, color: theme.textPrimary, fontWeight: 500 }, children: folder.name }),
505
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontSize: 10, color: theme.textSecondary }, children: [
506
+ "(",
507
+ filteredChildren.length,
508
+ ")"
509
+ ] })
510
+ ]
511
+ }
512
+ ),
513
+ isExpanded && filteredChildren.map(
514
+ (child, _i) => "children" in child ? /* @__PURE__ */ jsxRuntime.jsx(FolderTreeItem, { folder: child, indent: indent + 1 }, child.path) : /* @__PURE__ */ jsxRuntime.jsx(ResourceTreeItem, { resource: child, indent: indent + 1 }, child.id)
515
+ )
516
+ ] });
337
517
  };
338
- /* ── Files Panel ──────────────────────────────────────────────── */
339
518
  const FilesPanel = () => {
340
- const { state } = useBrowser();
341
- if (!state.projectInfo) {
342
- return (jsxRuntime.jsx("div", { style: { padding: 20, textAlign: 'center', color: '#8a99a8' }, children: "No project loaded. Select a Godot project to browse." }));
343
- }
344
- if (state.viewMode === 'tree') {
345
- return (jsxRuntime.jsx("div", { style: { padding: 8 }, children: jsxRuntime.jsx(FolderTreeItem, { folder: state.projectInfo.rootFolder, indent: 0 }) }));
519
+ const { state } = useBrowser();
520
+ if (!state.projectInfo) {
521
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: 20, textAlign: "center", color: "#8a99a8" }, children: "No project loaded. Select a Godot project to browse." });
522
+ }
523
+ if (state.viewMode === "tree") {
524
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: 8 }, children: /* @__PURE__ */ jsxRuntime.jsx(FolderTreeItem, { folder: state.projectInfo.rootFolder, indent: 0 }) });
525
+ }
526
+ return /* @__PURE__ */ jsxRuntime.jsx(
527
+ "div",
528
+ {
529
+ style: {
530
+ display: "grid",
531
+ gridTemplateColumns: "repeat(auto-fill, minmax(120px, 1fr))",
532
+ gap: 12,
533
+ padding: 12
534
+ },
535
+ children: state.projectInfo.resources.filter((r) => {
536
+ if (state.filterType !== "all" && r.type !== state.filterType) {
537
+ return false;
538
+ }
539
+ if (state.searchQuery) {
540
+ return r.name.toLowerCase().includes(state.searchQuery.toLowerCase());
541
+ }
542
+ return true;
543
+ }).map((resource) => {
544
+ const isSelected = state.selectedResources.has(resource.id);
545
+ return /* @__PURE__ */ jsxRuntime.jsx(ResourceGridItem, { resource, isSelected }, resource.id);
546
+ })
346
547
  }
347
- // Grid view
348
- return (jsxRuntime.jsx("div", { style: {
349
- display: 'grid',
350
- gridTemplateColumns: 'repeat(auto-fill, minmax(120px, 1fr))',
351
- gap: 12,
352
- padding: 12,
353
- }, children: state.projectInfo.resources
354
- .filter((r) => {
355
- if (state.filterType !== 'all' && r.type !== state.filterType) {
356
- return false;
357
- }
358
- if (state.searchQuery) {
359
- return r.name.toLowerCase().includes(state.searchQuery.toLowerCase());
360
- }
361
- return true;
362
- })
363
- .map((resource) => {
364
- const isSelected = state.selectedResources.has(resource.id);
365
- return jsxRuntime.jsx(ResourceGridItem, { resource: resource, isSelected: isSelected }, resource.id);
366
- }) }));
548
+ );
367
549
  };
368
- const ResourceGridItem = ({ resource, isSelected, }) => {
369
- const { dispatch, theme } = useBrowser();
370
- return (jsxRuntime.jsxs("div", { role: "button", tabIndex: 0, onKeyDown: ui.clickOnActivationKey, onClick: (e) => dispatch({ type: 'SELECT_RESOURCE', id: resource.id, additive: e.ctrlKey || e.metaKey }), onDoubleClick: () => dispatch({ type: 'SET_PREVIEW', resource }), style: {
371
- display: 'flex',
372
- flexDirection: 'column',
373
- alignItems: 'center',
374
- padding: 12,
375
- backgroundColor: isSelected ? theme.itemSelected : theme.itemBackground,
376
- borderRadius: 8,
377
- border: `1px solid ${isSelected ? theme.accent : theme.border}`,
378
- cursor: 'pointer',
379
- }, children: [jsxRuntime.jsx("div", { style: { marginBottom: 8 }, children: jsxRuntime.jsx(ui.NiceIcon, { name: getResourceIcon(resource.type), size: 32 }) }), jsxRuntime.jsx("span", { style: {
380
- fontSize: 11,
381
- color: theme.textPrimary,
382
- textAlign: 'center',
383
- overflow: 'hidden',
384
- textOverflow: 'ellipsis',
385
- whiteSpace: 'nowrap',
386
- width: '100%',
387
- }, children: resource.name }), jsxRuntime.jsx("span", { style: { fontSize: 9, color: theme.textSecondary }, children: formatFileSize(resource.size) })] }));
550
+ const ResourceGridItem = ({
551
+ resource,
552
+ isSelected
553
+ }) => {
554
+ const { dispatch, theme } = useBrowser();
555
+ return /* @__PURE__ */ jsxRuntime.jsxs(
556
+ "div",
557
+ {
558
+ role: "button",
559
+ tabIndex: 0,
560
+ onKeyDown: ui.clickOnActivationKey,
561
+ onClick: (e) => dispatch({ type: "SELECT_RESOURCE", id: resource.id, additive: e.ctrlKey || e.metaKey }),
562
+ onDoubleClick: () => dispatch({ type: "SET_PREVIEW", resource }),
563
+ style: {
564
+ display: "flex",
565
+ flexDirection: "column",
566
+ alignItems: "center",
567
+ padding: 12,
568
+ backgroundColor: isSelected ? theme.itemSelected : theme.itemBackground,
569
+ borderRadius: 8,
570
+ border: `1px solid ${isSelected ? theme.accent : theme.border}`,
571
+ cursor: "pointer"
572
+ },
573
+ children: [
574
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginBottom: 8 }, children: /* @__PURE__ */ jsxRuntime.jsx(ui.NiceIcon, { name: getResourceIcon(resource.type), size: 32 }) }),
575
+ /* @__PURE__ */ jsxRuntime.jsx(
576
+ "span",
577
+ {
578
+ style: {
579
+ fontSize: 11,
580
+ color: theme.textPrimary,
581
+ textAlign: "center",
582
+ overflow: "hidden",
583
+ textOverflow: "ellipsis",
584
+ whiteSpace: "nowrap",
585
+ width: "100%"
586
+ },
587
+ children: resource.name
588
+ }
589
+ ),
590
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 9, color: theme.textSecondary }, children: formatFileSize(resource.size) })
591
+ ]
592
+ }
593
+ );
388
594
  };
389
- /* ── Autoloads Panel ──────────────────────────────────────────── */
390
595
  const AutoloadsPanel = () => {
391
- const { state, theme } = useBrowser();
392
- if (!state.projectInfo) {
393
- return null;
394
- }
395
- return (jsxRuntime.jsxs("div", { style: { padding: 16 }, children: [jsxRuntime.jsx("h3", { style: { margin: '0 0 16px', fontSize: 14, fontWeight: 600, color: theme.textPrimary }, children: "Autoload Scripts (Singletons)" }), state.projectInfo.autoloads.map((autoload) => (jsxRuntime.jsxs("div", { style: {
396
- display: 'flex',
397
- alignItems: 'center',
398
- gap: 12,
399
- padding: '10px 12px',
400
- marginBottom: 4,
401
- backgroundColor: theme.itemBackground,
402
- borderRadius: 6,
403
- }, children: [jsxRuntime.jsx("input", { type: "checkbox", checked: autoload.enabled, readOnly: true }), jsxRuntime.jsx("span", { style: { fontSize: 13, color: theme.textPrimary, fontWeight: 500 }, children: autoload.name }), jsxRuntime.jsx("span", { style: { fontSize: 11, color: theme.textSecondary, flex: 1 }, children: autoload.path })] }, autoload.name))), state.projectInfo.autoloads.length === 0 && (jsxRuntime.jsx("div", { style: { color: theme.textSecondary }, children: "No autoloads configured" }))] }));
596
+ const { state, theme } = useBrowser();
597
+ if (!state.projectInfo) {
598
+ return null;
599
+ }
600
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { padding: 16 }, children: [
601
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { style: { margin: "0 0 16px", fontSize: 14, fontWeight: 600, color: theme.textPrimary }, children: "Autoload Scripts (Singletons)" }),
602
+ state.projectInfo.autoloads.map((autoload) => /* @__PURE__ */ jsxRuntime.jsxs(
603
+ "div",
604
+ {
605
+ style: {
606
+ display: "flex",
607
+ alignItems: "center",
608
+ gap: 12,
609
+ padding: "10px 12px",
610
+ marginBottom: 4,
611
+ backgroundColor: theme.itemBackground,
612
+ borderRadius: 6
613
+ },
614
+ children: [
615
+ /* @__PURE__ */ jsxRuntime.jsx("input", { type: "checkbox", checked: autoload.enabled, readOnly: true }),
616
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 13, color: theme.textPrimary, fontWeight: 500 }, children: autoload.name }),
617
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 11, color: theme.textSecondary, flex: 1 }, children: autoload.path })
618
+ ]
619
+ },
620
+ autoload.name
621
+ )),
622
+ state.projectInfo.autoloads.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: theme.textSecondary }, children: "No autoloads configured" })
623
+ ] });
404
624
  };
405
- /* ── Plugins Panel ────────────────────────────────────────────── */
406
625
  const PluginsPanel = () => {
407
- const { state, theme } = useBrowser();
408
- if (!state.projectInfo) {
409
- return null;
410
- }
411
- return (jsxRuntime.jsxs("div", { style: { padding: 16 }, children: [jsxRuntime.jsx("h3", { style: { margin: '0 0 16px', fontSize: 14, fontWeight: 600, color: theme.textPrimary }, children: "Editor Plugins" }), state.projectInfo.plugins.map((plugin) => (jsxRuntime.jsxs("div", { style: {
412
- display: 'flex',
413
- alignItems: 'center',
414
- gap: 12,
415
- padding: '10px 12px',
416
- marginBottom: 4,
417
- backgroundColor: theme.itemBackground,
418
- borderRadius: 6,
419
- }, children: [jsxRuntime.jsx("div", { style: {
420
- width: 8,
421
- height: 8,
422
- borderRadius: '50%',
423
- backgroundColor: plugin.enabled ? theme.success : theme.textSecondary,
424
- } }), jsxRuntime.jsx("span", { style: { fontSize: 13, color: theme.textPrimary }, children: plugin.name }), jsxRuntime.jsx("span", { style: {
425
- marginLeft: 'auto',
426
- padding: '2px 8px',
427
- fontSize: 10,
428
- backgroundColor: plugin.enabled ? theme.success : 'rgba(255,255,255,0.1)',
429
- borderRadius: 4,
430
- color: '#fff',
431
- }, children: plugin.enabled ? 'Enabled' : 'Disabled' })] }, plugin.name))), state.projectInfo.plugins.length === 0 && (jsxRuntime.jsx("div", { style: { color: theme.textSecondary }, children: "No plugins installed" }))] }));
626
+ const { state, theme } = useBrowser();
627
+ if (!state.projectInfo) {
628
+ return null;
629
+ }
630
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { padding: 16 }, children: [
631
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { style: { margin: "0 0 16px", fontSize: 14, fontWeight: 600, color: theme.textPrimary }, children: "Editor Plugins" }),
632
+ state.projectInfo.plugins.map((plugin) => /* @__PURE__ */ jsxRuntime.jsxs(
633
+ "div",
634
+ {
635
+ style: {
636
+ display: "flex",
637
+ alignItems: "center",
638
+ gap: 12,
639
+ padding: "10px 12px",
640
+ marginBottom: 4,
641
+ backgroundColor: theme.itemBackground,
642
+ borderRadius: 6
643
+ },
644
+ children: [
645
+ /* @__PURE__ */ jsxRuntime.jsx(
646
+ "div",
647
+ {
648
+ style: {
649
+ width: 8,
650
+ height: 8,
651
+ borderRadius: "50%",
652
+ backgroundColor: plugin.enabled ? theme.success : theme.textSecondary
653
+ }
654
+ }
655
+ ),
656
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 13, color: theme.textPrimary }, children: plugin.name }),
657
+ /* @__PURE__ */ jsxRuntime.jsx(
658
+ "span",
659
+ {
660
+ style: {
661
+ marginLeft: "auto",
662
+ padding: "2px 8px",
663
+ fontSize: 10,
664
+ backgroundColor: plugin.enabled ? theme.success : "rgba(255,255,255,0.1)",
665
+ borderRadius: 4,
666
+ color: "#fff"
667
+ },
668
+ children: plugin.enabled ? "Enabled" : "Disabled"
669
+ }
670
+ )
671
+ ]
672
+ },
673
+ plugin.name
674
+ )),
675
+ state.projectInfo.plugins.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: theme.textSecondary }, children: "No plugins installed" })
676
+ ] });
432
677
  };
433
- /* ── Exports Panel ────────────────────────────────────────────── */
434
678
  const ExportsPanel = () => {
435
- const { state, theme } = useBrowser();
436
- if (!state.projectInfo) {
437
- return null;
679
+ const { state, theme } = useBrowser();
680
+ if (!state.projectInfo) {
681
+ return null;
682
+ }
683
+ const getPlatformIcon = (platform) => {
684
+ switch (platform.toLowerCase()) {
685
+ case "windows":
686
+ return "monitor";
687
+ case "linux":
688
+ return "terminal";
689
+ case "macos":
690
+ return "monitor";
691
+ case "android":
692
+ return "phone";
693
+ case "ios":
694
+ return "phone";
695
+ case "web":
696
+ return "globe";
697
+ default:
698
+ return "box";
438
699
  }
439
- const getPlatformIcon = (platform) => {
440
- switch (platform.toLowerCase()) {
441
- case 'windows':
442
- return 'monitor';
443
- case 'linux':
444
- return 'terminal';
445
- case 'macos':
446
- return 'monitor';
447
- case 'android':
448
- return 'phone';
449
- case 'ios':
450
- return 'phone';
451
- case 'web':
452
- return 'globe';
453
- default:
454
- return 'box';
455
- }
456
- };
457
- return (jsxRuntime.jsxs("div", { style: { padding: 16 }, children: [jsxRuntime.jsx("h3", { style: { margin: '0 0 16px', fontSize: 14, fontWeight: 600, color: theme.textPrimary }, children: "Export Presets" }), state.projectInfo.exportPresets.map((preset, i) => (jsxRuntime.jsxs("div", { style: {
458
- display: 'flex',
459
- alignItems: 'center',
460
- gap: 12,
461
- padding: '12px',
462
- marginBottom: 4,
463
- backgroundColor: theme.itemBackground,
464
- borderRadius: 6,
465
- }, children: [jsxRuntime.jsx(ui.NiceIcon, { name: getPlatformIcon(preset.platform), size: 20 }), jsxRuntime.jsxs("div", { style: { flex: 1 }, children: [jsxRuntime.jsx("div", { style: { fontSize: 13, color: theme.textPrimary, fontWeight: 500 }, children: preset.name }), jsxRuntime.jsx("div", { style: { fontSize: 11, color: theme.textSecondary }, children: preset.platform })] }), jsxRuntime.jsx("button", { style: {
466
- padding: '6px 12px',
467
- fontSize: 11,
468
- backgroundColor: theme.accent,
469
- border: 'none',
470
- borderRadius: 4,
471
- color: '#fff',
472
- cursor: 'pointer',
473
- }, children: "Export" })] }, i))), state.projectInfo.exportPresets.length === 0 && (jsxRuntime.jsx("div", { style: { color: theme.textSecondary }, children: "No export presets configured" }))] }));
474
- };
475
- // Demo project
476
- const DEMO_PROJECT = {
477
- name: 'MyGodotGame',
478
- path: 'C:/Projects/MyGodotGame',
479
- godotVersion: '4.2.1',
480
- renderer: 'forward_plus',
481
- dotnetEnabled: false,
482
- features: ['Mobile', '3D', 'Physics'],
483
- resources: [
484
- {
485
- id: '1',
486
- name: 'main.tscn',
487
- path: 'res://scenes/main.tscn',
488
- type: 'scene',
489
- size: 12000,
490
- lastModified: '2024-01-15',
491
- selected: false,
492
- },
493
- {
494
- id: '2',
495
- name: 'player.tscn',
496
- path: 'res://scenes/player.tscn',
497
- type: 'scene',
498
- size: 8500,
499
- lastModified: '2024-01-14',
500
- selected: false,
501
- },
502
- {
503
- id: '3',
504
- name: 'player.gd',
505
- path: 'res://scripts/player.gd',
506
- type: 'script',
507
- size: 3200,
508
- lastModified: '2024-01-14',
509
- selected: false,
510
- },
511
- {
512
- id: '4',
513
- name: 'enemy.gd',
514
- path: 'res://scripts/enemy.gd',
515
- type: 'script',
516
- size: 2800,
517
- lastModified: '2024-01-13',
518
- selected: false,
519
- },
520
- {
521
- id: '5',
522
- name: 'player_texture.png',
523
- path: 'res://textures/player_texture.png',
524
- type: 'texture',
525
- size: 524000,
526
- lastModified: '2024-01-12',
527
- selected: false,
700
+ };
701
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { padding: 16 }, children: [
702
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { style: { margin: "0 0 16px", fontSize: 14, fontWeight: 600, color: theme.textPrimary }, children: "Export Presets" }),
703
+ state.projectInfo.exportPresets.map((preset, i) => /* @__PURE__ */ jsxRuntime.jsxs(
704
+ "div",
705
+ {
706
+ style: {
707
+ display: "flex",
708
+ alignItems: "center",
709
+ gap: 12,
710
+ padding: "12px",
711
+ marginBottom: 4,
712
+ backgroundColor: theme.itemBackground,
713
+ borderRadius: 6
528
714
  },
529
- {
530
- id: '6',
531
- name: 'standard_material.tres',
532
- path: 'res://materials/standard_material.tres',
533
- type: 'material',
534
- size: 1200,
535
- lastModified: '2024-01-11',
536
- selected: false,
537
- },
538
- {
539
- id: '7',
540
- name: 'custom_shader.gdshader',
541
- path: 'res://shaders/custom_shader.gdshader',
542
- type: 'shader',
543
- size: 2500,
544
- lastModified: '2024-01-10',
545
- selected: false,
546
- },
547
- {
548
- id: '8',
549
- name: 'jump.wav',
550
- path: 'res://audio/jump.wav',
551
- type: 'audio',
552
- size: 45000,
553
- lastModified: '2024-01-09',
554
- selected: false,
555
- },
556
- ],
557
- rootFolder: {
558
- path: 'res://',
559
- name: 'res://',
560
- expanded: true,
561
715
  children: [
562
- { path: 'res://scenes', name: 'scenes', expanded: false, children: [] },
563
- { path: 'res://scripts', name: 'scripts', expanded: false, children: [] },
564
- { path: 'res://textures', name: 'textures', expanded: false, children: [] },
565
- { path: 'res://materials', name: 'materials', expanded: false, children: [] },
566
- { path: 'res://shaders', name: 'shaders', expanded: false, children: [] },
567
- { path: 'res://audio', name: 'audio', expanded: false, children: [] },
568
- ],
716
+ /* @__PURE__ */ jsxRuntime.jsx(ui.NiceIcon, { name: getPlatformIcon(preset.platform), size: 20 }),
717
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: 1 }, children: [
718
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 13, color: theme.textPrimary, fontWeight: 500 }, children: preset.name }),
719
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 11, color: theme.textSecondary }, children: preset.platform })
720
+ ] }),
721
+ /* @__PURE__ */ jsxRuntime.jsx(
722
+ "button",
723
+ {
724
+ style: {
725
+ padding: "6px 12px",
726
+ fontSize: 11,
727
+ backgroundColor: theme.accent,
728
+ border: "none",
729
+ borderRadius: 4,
730
+ color: "#fff",
731
+ cursor: "pointer"
732
+ },
733
+ children: "Export"
734
+ }
735
+ )
736
+ ]
737
+ },
738
+ i
739
+ )),
740
+ state.projectInfo.exportPresets.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: theme.textSecondary }, children: "No export presets configured" })
741
+ ] });
742
+ };
743
+ const DEMO_PROJECT = {
744
+ name: "MyGodotGame",
745
+ path: "C:/Projects/MyGodotGame",
746
+ godotVersion: "4.2.1",
747
+ renderer: "forward_plus",
748
+ dotnetEnabled: false,
749
+ features: ["Mobile", "3D", "Physics"],
750
+ resources: [
751
+ {
752
+ id: "1",
753
+ name: "main.tscn",
754
+ path: "res://scenes/main.tscn",
755
+ type: "scene",
756
+ size: 12e3,
757
+ lastModified: "2024-01-15",
758
+ selected: false
759
+ },
760
+ {
761
+ id: "2",
762
+ name: "player.tscn",
763
+ path: "res://scenes/player.tscn",
764
+ type: "scene",
765
+ size: 8500,
766
+ lastModified: "2024-01-14",
767
+ selected: false
569
768
  },
570
- autoloads: [
571
- { name: 'GameManager', path: 'res://scripts/game_manager.gd', enabled: true },
572
- { name: 'AudioManager', path: 'res://scripts/audio_manager.gd', enabled: true },
573
- ],
574
- plugins: [
575
- { name: 'godot-git-plugin', enabled: true },
576
- { name: 'dialogue-addon', enabled: false },
577
- ],
578
- exportPresets: [
579
- { name: 'Windows Desktop', platform: 'Windows' },
580
- { name: 'Linux Desktop', platform: 'Linux' },
581
- { name: 'Web Build', platform: 'Web' },
582
- ],
769
+ {
770
+ id: "3",
771
+ name: "player.gd",
772
+ path: "res://scripts/player.gd",
773
+ type: "script",
774
+ size: 3200,
775
+ lastModified: "2024-01-14",
776
+ selected: false
777
+ },
778
+ {
779
+ id: "4",
780
+ name: "enemy.gd",
781
+ path: "res://scripts/enemy.gd",
782
+ type: "script",
783
+ size: 2800,
784
+ lastModified: "2024-01-13",
785
+ selected: false
786
+ },
787
+ {
788
+ id: "5",
789
+ name: "player_texture.png",
790
+ path: "res://textures/player_texture.png",
791
+ type: "texture",
792
+ size: 524e3,
793
+ lastModified: "2024-01-12",
794
+ selected: false
795
+ },
796
+ {
797
+ id: "6",
798
+ name: "standard_material.tres",
799
+ path: "res://materials/standard_material.tres",
800
+ type: "material",
801
+ size: 1200,
802
+ lastModified: "2024-01-11",
803
+ selected: false
804
+ },
805
+ {
806
+ id: "7",
807
+ name: "custom_shader.gdshader",
808
+ path: "res://shaders/custom_shader.gdshader",
809
+ type: "shader",
810
+ size: 2500,
811
+ lastModified: "2024-01-10",
812
+ selected: false
813
+ },
814
+ {
815
+ id: "8",
816
+ name: "jump.wav",
817
+ path: "res://audio/jump.wav",
818
+ type: "audio",
819
+ size: 45e3,
820
+ lastModified: "2024-01-09",
821
+ selected: false
822
+ }
823
+ ],
824
+ rootFolder: {
825
+ path: "res://",
826
+ name: "res://",
827
+ expanded: true,
828
+ children: [
829
+ { path: "res://scenes", name: "scenes", expanded: false, children: [] },
830
+ { path: "res://scripts", name: "scripts", expanded: false, children: [] },
831
+ { path: "res://textures", name: "textures", expanded: false, children: [] },
832
+ { path: "res://materials", name: "materials", expanded: false, children: [] },
833
+ { path: "res://shaders", name: "shaders", expanded: false, children: [] },
834
+ { path: "res://audio", name: "audio", expanded: false, children: [] }
835
+ ]
836
+ },
837
+ autoloads: [
838
+ { name: "GameManager", path: "res://scripts/game_manager.gd", enabled: true },
839
+ { name: "AudioManager", path: "res://scripts/audio_manager.gd", enabled: true }
840
+ ],
841
+ plugins: [
842
+ { name: "godot-git-plugin", enabled: true },
843
+ { name: "dialogue-addon", enabled: false }
844
+ ],
845
+ exportPresets: [
846
+ { name: "Windows Desktop", platform: "Windows" },
847
+ { name: "Linux Desktop", platform: "Linux" },
848
+ { name: "Web Build", platform: "Web" }
849
+ ]
583
850
  };
584
851
  const GodotProjectBrowser = /* @__PURE__ */ Object.assign(
585
- /* @__PURE__ */ React.forwardRef(({ projectPath: _projectPath, theme: themeOverride, onProjectLoad, onImport, onSyncConnect, onSyncDisconnect, className, style, }, ref) => {
586
- const [state, dispatch] = React.useReducer(browserReducer, {
852
+ /* @__PURE__ */ React.forwardRef(
853
+ ({
854
+ projectPath: _projectPath,
855
+ theme: themeOverride,
856
+ onProjectLoad,
857
+ onImport,
858
+ onSyncConnect,
859
+ onSyncDisconnect,
860
+ className,
861
+ style
862
+ }, ref) => {
863
+ const [state, dispatch] = React.useReducer(browserReducer, {
587
864
  ...INITIAL_STATE,
588
- projectInfo: DEMO_PROJECT,
589
- });
590
- const theme = React.useMemo(() => ({ ...DEFAULT_THEME, ...themeOverride }), [themeOverride]);
591
- // Import selected resources
592
- const importSelectedResources = React.useCallback(async () => {
865
+ projectInfo: DEMO_PROJECT
866
+ });
867
+ const theme = React.useMemo(() => ({ ...DEFAULT_THEME, ...themeOverride }), [themeOverride]);
868
+ const importSelectedResources = React.useCallback(async () => {
593
869
  if (state.selectedResources.size === 0 || !state.projectInfo) {
594
- return;
870
+ return;
595
871
  }
596
- const selectedResources = state.projectInfo.resources.filter((r) => state.selectedResources.has(r.id));
597
- dispatch({ type: 'SET_IMPORTING', importing: true, progress: 0 });
872
+ const selectedResources = state.projectInfo.resources.filter(
873
+ (r) => state.selectedResources.has(r.id)
874
+ );
875
+ dispatch({ type: "SET_IMPORTING", importing: true, progress: 0 });
598
876
  try {
599
- for (let i = 0; i < selectedResources.length; i++) {
600
- dispatch({
601
- type: 'SET_IMPORTING',
602
- importing: true,
603
- progress: Math.round(((i + 1) / selectedResources.length) * 100),
604
- });
605
- await new Promise((resolve) => setTimeout(resolve, 200));
606
- }
607
- if (onImport) {
608
- await onImport(selectedResources);
609
- }
610
- dispatch({ type: 'DESELECT_ALL' });
611
- }
612
- finally {
613
- dispatch({ type: 'SET_IMPORTING', importing: false });
614
- }
615
- }, [state.selectedResources, state.projectInfo, onImport]);
616
- // Sync connection
617
- const connectSync = React.useCallback(async () => {
618
- if (onSyncConnect) {
619
- const status = await onSyncConnect();
620
- dispatch({ type: 'SET_SYNC_STATUS', status });
621
- }
622
- else {
877
+ for (let i = 0; i < selectedResources.length; i++) {
623
878
  dispatch({
624
- type: 'SET_SYNC_STATUS',
625
- status: {
626
- connected: true,
627
- godotVersion: '4.2.1',
628
- projectName: 'MyGodotGame',
629
- isRunning: false,
630
- debuggerConnected: true,
631
- },
879
+ type: "SET_IMPORTING",
880
+ importing: true,
881
+ progress: Math.round((i + 1) / selectedResources.length * 100)
632
882
  });
883
+ await new Promise((resolve) => setTimeout(resolve, 200));
884
+ }
885
+ if (onImport) {
886
+ await onImport(selectedResources);
887
+ }
888
+ dispatch({ type: "DESELECT_ALL" });
889
+ } finally {
890
+ dispatch({ type: "SET_IMPORTING", importing: false });
891
+ }
892
+ }, [state.selectedResources, state.projectInfo, onImport]);
893
+ const connectSync = React.useCallback(async () => {
894
+ if (onSyncConnect) {
895
+ const status = await onSyncConnect();
896
+ dispatch({ type: "SET_SYNC_STATUS", status });
897
+ } else {
898
+ dispatch({
899
+ type: "SET_SYNC_STATUS",
900
+ status: {
901
+ connected: true,
902
+ godotVersion: "4.2.1",
903
+ projectName: "MyGodotGame",
904
+ isRunning: false,
905
+ debuggerConnected: true
906
+ }
907
+ });
633
908
  }
634
- }, [onSyncConnect]);
635
- const disconnectSync = React.useCallback(() => {
909
+ }, [onSyncConnect]);
910
+ const disconnectSync = React.useCallback(() => {
636
911
  onSyncDisconnect?.();
637
912
  dispatch({
638
- type: 'SET_SYNC_STATUS',
639
- status: { connected: false, isRunning: false, debuggerConnected: false },
913
+ type: "SET_SYNC_STATUS",
914
+ status: { connected: false, isRunning: false, debuggerConnected: false }
640
915
  });
641
- }, [onSyncDisconnect]);
642
- // Imperative handle
643
- React.useImperativeHandle(ref, () => ({
644
- loadProject: async (_path) => {
645
- dispatch({ type: 'SET_PROJECT', info: DEMO_PROJECT });
916
+ }, [onSyncDisconnect]);
917
+ React.useImperativeHandle(
918
+ ref,
919
+ () => ({
920
+ loadProject: async (_path) => {
921
+ dispatch({ type: "SET_PROJECT", info: DEMO_PROJECT });
646
922
  onProjectLoad?.(DEMO_PROJECT);
647
- },
648
- getSelectedResources: () => {
923
+ },
924
+ getSelectedResources: () => {
649
925
  if (!state.projectInfo) {
650
- return [];
926
+ return [];
651
927
  }
652
928
  return state.projectInfo.resources.filter((r) => state.selectedResources.has(r.id));
653
- },
654
- importSelected: importSelectedResources,
655
- }), [state.projectInfo, state.selectedResources, importSelectedResources, onProjectLoad]);
656
- const ctxValue = React.useMemo(() => ({ state, dispatch, theme, importSelectedResources, connectSync, disconnectSync }), [state, theme, importSelectedResources, connectSync, disconnectSync]);
657
- return (jsxRuntime.jsx(BrowserContext.Provider, { value: ctxValue, children: jsxRuntime.jsxs("div", { className: `godot-project-browser ${className ?? ''}`, style: {
658
- display: 'flex',
659
- flexDirection: 'column',
660
- width: '100%',
661
- height: '100%',
662
- backgroundColor: theme.background,
663
- fontFamily: 'system-ui, sans-serif',
664
- overflow: 'hidden',
665
- ...style,
666
- }, children: [jsxRuntime.jsx(BrowserHeader, {}), jsxRuntime.jsx(BrowserToolbar, {}), jsxRuntime.jsx(TabBar, {}), jsxRuntime.jsxs("div", { style: { flex: 1, overflow: 'auto' }, children: [state.tab === 'files' && jsxRuntime.jsx(FilesPanel, {}), state.tab === 'autoloads' && jsxRuntime.jsx(AutoloadsPanel, {}), state.tab === 'plugins' && jsxRuntime.jsx(PluginsPanel, {}), state.tab === 'exports' && jsxRuntime.jsx(ExportsPanel, {})] })] }) }));
667
- }), { displayName: 'GodotProjectBrowser' });
668
-
929
+ },
930
+ importSelected: importSelectedResources
931
+ }),
932
+ [state.projectInfo, state.selectedResources, importSelectedResources, onProjectLoad]
933
+ );
934
+ const ctxValue = React.useMemo(
935
+ () => ({ state, dispatch, theme, importSelectedResources, connectSync, disconnectSync }),
936
+ [state, theme, importSelectedResources, connectSync, disconnectSync]
937
+ );
938
+ return /* @__PURE__ */ jsxRuntime.jsx(BrowserContext.Provider, { value: ctxValue, children: /* @__PURE__ */ jsxRuntime.jsxs(
939
+ "div",
940
+ {
941
+ className: `godot-project-browser ${className ?? ""}`,
942
+ style: {
943
+ display: "flex",
944
+ flexDirection: "column",
945
+ width: "100%",
946
+ height: "100%",
947
+ backgroundColor: theme.background,
948
+ fontFamily: "system-ui, sans-serif",
949
+ overflow: "hidden",
950
+ ...style
951
+ },
952
+ children: [
953
+ /* @__PURE__ */ jsxRuntime.jsx(BrowserHeader, {}),
954
+ /* @__PURE__ */ jsxRuntime.jsx(BrowserToolbar, {}),
955
+ /* @__PURE__ */ jsxRuntime.jsx(TabBar, {}),
956
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: 1, overflow: "auto" }, children: [
957
+ state.tab === "files" && /* @__PURE__ */ jsxRuntime.jsx(FilesPanel, {}),
958
+ state.tab === "autoloads" && /* @__PURE__ */ jsxRuntime.jsx(AutoloadsPanel, {}),
959
+ state.tab === "plugins" && /* @__PURE__ */ jsxRuntime.jsx(PluginsPanel, {}),
960
+ state.tab === "exports" && /* @__PURE__ */ jsxRuntime.jsx(ExportsPanel, {})
961
+ ] })
962
+ ]
963
+ }
964
+ ) });
965
+ }
966
+ ),
967
+ { displayName: "GodotProjectBrowser" }
968
+ );
669
969
  exports.GodotProjectBrowser = GodotProjectBrowser;