@nice2dev/game-engine 1.3.15 → 1.3.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (434) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/cjs/accessibility/Accessibility.js +152 -165
  3. package/dist/cjs/ai/AI.js +292 -294
  4. package/dist/cjs/ai/BehaviorTree.js +1029 -1113
  5. package/dist/cjs/ai/StateMachine.js +694 -756
  6. package/dist/cjs/animation/Animation.js +232 -241
  7. package/dist/cjs/audio/AudioAdvanced.js +221 -236
  8. package/dist/cjs/audio/AudioBridge.js +441 -435
  9. package/dist/cjs/audio/AudioManager.js +242 -259
  10. package/dist/cjs/build-cloud/BuildOrchestration.js +1059 -1098
  11. package/dist/cjs/build-cloud/GodotBuildCloud.js +641 -670
  12. package/dist/cjs/build-cloud/UnityBuildCloud.js +563 -610
  13. package/dist/cjs/build-cloud/UnrealBuildCloud.js +610 -635
  14. package/dist/cjs/core/EventBus.js +51 -56
  15. package/dist/cjs/core/GameClock.js +62 -66
  16. package/dist/cjs/core/GameConfig.js +72 -79
  17. package/dist/cjs/core/GameLoop.js +80 -89
  18. package/dist/cjs/core/ServiceLocator.js +61 -65
  19. package/dist/cjs/core/Validation.js +72 -82
  20. package/dist/cjs/core/math.js +108 -112
  21. package/dist/cjs/devtools/DevTools.js +542 -563
  22. package/dist/cjs/devtools/DeveloperExperience.js +521 -559
  23. package/dist/cjs/devtools/GameplayAnalytics.js +636 -646
  24. package/dist/cjs/dialogue/DialogueSystem.js +984 -986
  25. package/dist/cjs/docs/DocGenerator.js +339 -364
  26. package/dist/cjs/ecs/World.js +355 -371
  27. package/dist/cjs/editor/AchievementEditor.js +580 -636
  28. package/dist/cjs/editor/AdvancedEditor.js +184 -191
  29. package/dist/cjs/editor/AnimationRetargeting.js +696 -741
  30. package/dist/cjs/editor/AssetBrowser.js +1072 -1160
  31. package/dist/cjs/editor/AssetManager.js +187 -192
  32. package/dist/cjs/editor/ConsolePro.js +971 -1061
  33. package/dist/cjs/editor/CraftingEditor.js +680 -730
  34. package/dist/cjs/editor/DebugTools.js +187 -185
  35. package/dist/cjs/editor/DialogueSystem.js +844 -901
  36. package/dist/cjs/editor/LeaderboardSystem.js +429 -483
  37. package/dist/cjs/editor/NiceGameEditor.js +1903 -1201
  38. package/dist/cjs/editor/PrefabSystem.js +772 -838
  39. package/dist/cjs/editor/ProfilerPanel.js +649 -700
  40. package/dist/cjs/editor/QuestEditor.js +792 -839
  41. package/dist/cjs/editor/ReplaySystem.js +585 -634
  42. package/dist/cjs/editor/SceneEditor.js +176 -200
  43. package/dist/cjs/editor/ScreenshotMode.js +621 -688
  44. package/dist/cjs/editor/ShaderGraph.js +1556 -1582
  45. package/dist/cjs/editor/TimelineEditor.js +715 -778
  46. package/dist/cjs/editor/UndoRedoPro.js +830 -904
  47. package/dist/cjs/editor/VRARMode.js +582 -645
  48. package/dist/cjs/engine/NiceGameEngine.js +141 -164
  49. package/dist/cjs/engine/SaveSystem.js +441 -495
  50. package/dist/cjs/enterprise/Enterprise.js +254 -261
  51. package/dist/cjs/export/BevyExporter.js +927 -967
  52. package/dist/cjs/export/CocosExporter.js +644 -673
  53. package/dist/cjs/export/Construct3Exporter.js +783 -794
  54. package/dist/cjs/export/DefoldExporter.js +1028 -1069
  55. package/dist/cjs/export/GDevelopExporter.js +674 -708
  56. package/dist/cjs/export/GameMakerExporter.js +791 -805
  57. package/dist/cjs/export/GodotExporter.js +1003 -1045
  58. package/dist/cjs/export/MinecraftBedrockExporter.js +573 -578
  59. package/dist/cjs/export/MonoGameExporter.js +1265 -1293
  60. package/dist/cjs/export/Pico8Exporter.js +766 -812
  61. package/dist/cjs/export/PlatformExporter.js +188 -206
  62. package/dist/cjs/export/RPGMakerExporter.js +860 -879
  63. package/dist/cjs/export/RobloxExporter.js +883 -919
  64. package/dist/cjs/export/Solar2DExporter.js +1218 -1256
  65. package/dist/cjs/export/ThreeJSExporter.js +1006 -1073
  66. package/dist/cjs/export/Tic80Exporter.js +1210 -1267
  67. package/dist/cjs/export/UnityExporter.js +1116 -1131
  68. package/dist/cjs/export/UnrealExporter.js +889 -919
  69. package/dist/cjs/export/WebExporter.js +931 -970
  70. package/dist/cjs/export/index.js +42 -65
  71. package/dist/cjs/godot-integration/GodotAssetLibrary.js +659 -692
  72. package/dist/cjs/godot-integration/GodotImport.js +929 -1027
  73. package/dist/cjs/godot-integration/GodotLiveLink.js +915 -945
  74. package/dist/cjs/godot-integration/components/GodotProjectBrowser.js +911 -611
  75. package/dist/cjs/i18n/I18n.js +860 -900
  76. package/dist/cjs/i18n/useTranslation.js +84 -89
  77. package/dist/cjs/import/AsepriteImporter.js +658 -716
  78. package/dist/cjs/import/DragonBonesImporter.js +437 -461
  79. package/dist/cjs/import/GameMakerImporter.js +511 -521
  80. package/dist/cjs/import/GodotSceneImporter.js +788 -822
  81. package/dist/cjs/import/LDtkImporter.js +436 -454
  82. package/dist/cjs/import/Live2DImporter.js +497 -518
  83. package/dist/cjs/import/NdgFormat.js +424 -457
  84. package/dist/cjs/import/OgmoImporter.js +466 -493
  85. package/dist/cjs/import/RPGMakerImporter.js +451 -477
  86. package/dist/cjs/import/SceneImporter.js +378 -423
  87. package/dist/cjs/import/SpineImporter.js +511 -546
  88. package/dist/cjs/import/SpriterImporter.js +590 -613
  89. package/dist/cjs/import/TiledMapImporter.js +811 -846
  90. package/dist/cjs/import/UnitySceneImporter.js +687 -703
  91. package/dist/cjs/import/index.js +206 -251
  92. package/dist/cjs/index.js +275 -278
  93. package/dist/cjs/input/GamepadNavigation.js +185 -205
  94. package/dist/cjs/input/InputManager.js +397 -421
  95. package/dist/cjs/input/useGamepads.js +70 -81
  96. package/dist/cjs/integration/IconSprite.js +129 -256
  97. package/dist/cjs/inventory/InventorySystem.js +920 -995
  98. package/dist/cjs/kids/KidMode.js +997 -1022
  99. package/dist/cjs/kids/KidTools.js +570 -594
  100. package/dist/cjs/monetization/Monetization.js +170 -177
  101. package/dist/cjs/multiplayer/LocalMultiplayer.js +287 -287
  102. package/dist/cjs/multiplayer/MiniGameTypes.js +49 -59
  103. package/dist/cjs/native-engine/AnimationSystem.js +731 -806
  104. package/dist/cjs/native-engine/AssetPipeline.js +454 -515
  105. package/dist/cjs/native-engine/AudioEngine.js +763 -804
  106. package/dist/cjs/native-engine/InputSystem.js +1075 -1145
  107. package/dist/cjs/native-engine/NetworkingSystem.js +733 -793
  108. package/dist/cjs/native-engine/PhysicsEngine.js +583 -607
  109. package/dist/cjs/native-engine/RenderingEngine.js +302 -350
  110. package/dist/cjs/native-engine/SceneGraph.js +769 -808
  111. package/dist/cjs/network/MultiplayerTransport.js +97 -132
  112. package/dist/cjs/network/Networking.js +549 -564
  113. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/AbortController.js +21 -29
  114. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/AccessTokenHttpClient.js +40 -48
  115. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/DefaultHttpClient.js +35 -43
  116. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/DefaultReconnectPolicy.js +10 -15
  117. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/Errors.js +103 -135
  118. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/FetchHttpClient.js +131 -158
  119. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/HandshakeProtocol.js +39 -53
  120. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/HeaderNames.js +5 -8
  121. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/HttpClient.js +40 -48
  122. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/HttpConnection.js +494 -572
  123. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/HubConnection.js +826 -953
  124. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/HubConnectionBuilder.js +125 -146
  125. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/IHubProtocol.js +13 -23
  126. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/ILogger.js +11 -25
  127. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/ITransport.js +13 -24
  128. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/JsonHubProtocol.js +108 -121
  129. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/Loggers.js +10 -14
  130. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/LongPollingTransport.js +150 -185
  131. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/MessageBuffer.js +158 -196
  132. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/ServerSentEventsTransport.js +90 -105
  133. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/Subject.js +30 -35
  134. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/TextMessageFormat.js +16 -21
  135. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/Utils.js +215 -248
  136. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/WebSocketTransport.js +135 -157
  137. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/XhrHttpClient.js +76 -85
  138. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/index.js +24 -27
  139. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/pkg-version.js +3 -4
  140. package/dist/cjs/pathfinding/Pathfinding.js +245 -263
  141. package/dist/cjs/performance/AssetStreaming.js +561 -635
  142. package/dist/cjs/performance/BenchmarkSuite.js +283 -311
  143. package/dist/cjs/performance/DeltaCompression.js +467 -526
  144. package/dist/cjs/performance/DeterministicPhysics.js +450 -498
  145. package/dist/cjs/performance/ECSOptimization.js +644 -695
  146. package/dist/cjs/performance/GameSaveSystem.js +509 -556
  147. package/dist/cjs/performance/HotReload.js +447 -500
  148. package/dist/cjs/performance/InputRecording.js +511 -561
  149. package/dist/cjs/performance/InterestManagement.js +453 -500
  150. package/dist/cjs/performance/LocalizationRuntime.js +376 -423
  151. package/dist/cjs/performance/MemoryManagement.js +410 -470
  152. package/dist/cjs/performance/ModSupport.js +445 -496
  153. package/dist/cjs/performance/MultiThreadedPhysics.js +400 -443
  154. package/dist/cjs/performance/NetworkPrediction.js +424 -482
  155. package/dist/cjs/performance/ObjectPooling.js +569 -617
  156. package/dist/cjs/performance/Performance.js +174 -190
  157. package/dist/cjs/performance/PerformanceAdvanced.js +614 -637
  158. package/dist/cjs/performance/WebGPURenderer.js +656 -683
  159. package/dist/cjs/physics/PhysicsAdvanced.js +345 -379
  160. package/dist/cjs/physics/PhysicsEngine2D.js +391 -427
  161. package/dist/cjs/plugins/PluginSDK.js +432 -466
  162. package/dist/cjs/plugins/PluginTestKit.js +307 -330
  163. package/dist/cjs/procedural/Procedural.js +243 -254
  164. package/dist/cjs/procedural/WorldBuilding.js +297 -314
  165. package/dist/cjs/quest/QuestSystem.js +975 -932
  166. package/dist/cjs/release/MobileExport.js +157 -163
  167. package/dist/cjs/release/Release.js +225 -238
  168. package/dist/cjs/rendering/Camera2D.js +121 -124
  169. package/dist/cjs/rendering/Renderer2D.js +321 -335
  170. package/dist/cjs/rendering/WebGPURenderPipeline.js +632 -651
  171. package/dist/cjs/runtime3d/Runtime3D.js +359 -378
  172. package/dist/cjs/runtime3d/SceneEditor3D.js +252 -263
  173. package/dist/cjs/scene/SceneManager.js +177 -193
  174. package/dist/cjs/scripting/GraphToAST.js +574 -547
  175. package/dist/cjs/scripting/LanguageExporter.js +254 -279
  176. package/dist/cjs/scripting/NodeGraph.js +546 -570
  177. package/dist/cjs/scripting/ScriptAST.js +31 -39
  178. package/dist/cjs/scripting/VisualScripting2.js +1016 -1065
  179. package/dist/cjs/scripting/exporters/CSharpExporter.js +464 -496
  180. package/dist/cjs/scripting/exporters/GDScriptExporter.js +390 -442
  181. package/dist/cjs/scripting/exporters/LuaExporter.js +406 -447
  182. package/dist/cjs/scripting/exporters/PythonExporter.js +484 -549
  183. package/dist/cjs/scripting/exporters/RustExporter.js +459 -512
  184. package/dist/cjs/scripting/exporters/TypeScriptExporter.js +505 -556
  185. package/dist/cjs/social/Social.js +72 -80
  186. package/dist/cjs/systems/LightingSystem.js +844 -931
  187. package/dist/cjs/systems/ParticleSystem2.js +1447 -1451
  188. package/dist/cjs/systems/PhysicsDebugSystem.js +1070 -1141
  189. package/dist/cjs/systems/TerrainSystem.js +985 -1098
  190. package/dist/cjs/templates/ActionTemplates.js +296 -309
  191. package/dist/cjs/templates/FightingTemplate.js +417 -463
  192. package/dist/cjs/templates/MetroidvaniaTemplate.js +353 -405
  193. package/dist/cjs/templates/PartyTemplates.js +190 -202
  194. package/dist/cjs/templates/PuzzleTemplates.js +245 -261
  195. package/dist/cjs/templates/RPGTemplates.js +160 -178
  196. package/dist/cjs/templates/SportsTemplates.js +237 -250
  197. package/dist/cjs/templates/StrategyTemplates.js +143 -153
  198. package/dist/cjs/templates/SurvivalTemplate.js +336 -380
  199. package/dist/cjs/templates/WaveDefense.js +499 -526
  200. package/dist/cjs/tilemap/Tilemap.js +207 -214
  201. package/dist/cjs/tutorials/TutorialBranching.js +396 -417
  202. package/dist/cjs/tutorials/TutorialEngine.js +888 -931
  203. package/dist/cjs/tutorials/TutorialOverlay.js +602 -640
  204. package/dist/cjs/tutorials/content/Tutorials_T05_T08.js +787 -809
  205. package/dist/cjs/tutorials/content/Tutorials_T09_T11.js +736 -756
  206. package/dist/cjs/tutorials/content/Tutorials_T12_T15.js +754 -778
  207. package/dist/cjs/ui/GameUI.js +295 -312
  208. package/dist/cjs/unity-integration/UnityAssetStore.js +700 -741
  209. package/dist/cjs/unity-integration/UnityImport.js +1066 -1176
  210. package/dist/cjs/unity-integration/UnityLiveLink.js +934 -981
  211. package/dist/cjs/unity-integration/components/UnityAssetStoreBrowser.js +1233 -757
  212. package/dist/cjs/unity-integration/components/UnityProjectBrowser.js +1240 -768
  213. package/dist/cjs/unreal-integration/UnrealImport.js +391 -412
  214. package/dist/cjs/unreal-integration/UnrealLiveLink.js +1102 -1137
  215. package/dist/cjs/unreal-integration/UnrealMarketplace.js +436 -473
  216. package/dist/cjs/unreal-integration/components/UnrealProjectBrowser.js +1150 -767
  217. package/dist/cjs/xr/ARVR.js +167 -175
  218. package/dist/esm/accessibility/Accessibility.js +160 -164
  219. package/dist/esm/ai/AI.js +310 -293
  220. package/dist/esm/ai/BehaviorTree.js +1057 -1112
  221. package/dist/esm/ai/StateMachine.js +709 -755
  222. package/dist/esm/animation/Animation.js +237 -240
  223. package/dist/esm/audio/AudioAdvanced.js +239 -235
  224. package/dist/esm/audio/AudioBridge.js +448 -434
  225. package/dist/esm/audio/AudioManager.js +243 -258
  226. package/dist/esm/build-cloud/BuildOrchestration.js +1071 -1097
  227. package/dist/esm/build-cloud/GodotBuildCloud.js +647 -669
  228. package/dist/esm/build-cloud/UnityBuildCloud.js +571 -609
  229. package/dist/esm/build-cloud/UnrealBuildCloud.js +615 -634
  230. package/dist/esm/core/EventBus.js +52 -55
  231. package/dist/esm/core/GameClock.js +63 -65
  232. package/dist/esm/core/GameConfig.js +77 -78
  233. package/dist/esm/core/GameLoop.js +81 -88
  234. package/dist/esm/core/ServiceLocator.js +63 -64
  235. package/dist/esm/core/Validation.js +82 -81
  236. package/dist/esm/core/math.js +109 -111
  237. package/dist/esm/devtools/DevTools.js +546 -562
  238. package/dist/esm/devtools/DeveloperExperience.js +535 -558
  239. package/dist/esm/devtools/GameplayAnalytics.js +647 -645
  240. package/dist/esm/dialogue/DialogueSystem.js +998 -985
  241. package/dist/esm/docs/DocGenerator.js +342 -363
  242. package/dist/esm/ecs/World.js +358 -370
  243. package/dist/esm/editor/AchievementEditor.js +584 -635
  244. package/dist/esm/editor/AdvancedEditor.js +191 -190
  245. package/dist/esm/editor/AnimationRetargeting.js +700 -740
  246. package/dist/esm/editor/AssetBrowser.js +1078 -1159
  247. package/dist/esm/editor/AssetManager.js +188 -191
  248. package/dist/esm/editor/ConsolePro.js +977 -1060
  249. package/dist/esm/editor/CraftingEditor.js +684 -729
  250. package/dist/esm/editor/DebugTools.js +194 -184
  251. package/dist/esm/editor/DialogueSystem.js +849 -900
  252. package/dist/esm/editor/LeaderboardSystem.js +433 -482
  253. package/dist/esm/editor/NiceGameEditor.js +1908 -1200
  254. package/dist/esm/editor/PrefabSystem.js +777 -837
  255. package/dist/esm/editor/ProfilerPanel.js +654 -699
  256. package/dist/esm/editor/QuestEditor.js +795 -838
  257. package/dist/esm/editor/ReplaySystem.js +591 -633
  258. package/dist/esm/editor/SceneEditor.js +189 -199
  259. package/dist/esm/editor/ScreenshotMode.js +628 -687
  260. package/dist/esm/editor/ShaderGraph.js +1565 -1581
  261. package/dist/esm/editor/TimelineEditor.js +733 -777
  262. package/dist/esm/editor/UndoRedoPro.js +835 -903
  263. package/dist/esm/editor/VRARMode.js +586 -644
  264. package/dist/esm/engine/NiceGameEngine.js +142 -163
  265. package/dist/esm/engine/SaveSystem.js +447 -494
  266. package/dist/esm/enterprise/Enterprise.js +265 -260
  267. package/dist/esm/export/BevyExporter.js +929 -966
  268. package/dist/esm/export/CocosExporter.js +646 -672
  269. package/dist/esm/export/Construct3Exporter.js +785 -793
  270. package/dist/esm/export/DefoldExporter.js +1030 -1068
  271. package/dist/esm/export/GDevelopExporter.js +676 -707
  272. package/dist/esm/export/GameMakerExporter.js +793 -804
  273. package/dist/esm/export/GodotExporter.js +1004 -1044
  274. package/dist/esm/export/MinecraftBedrockExporter.js +575 -577
  275. package/dist/esm/export/MonoGameExporter.js +1267 -1292
  276. package/dist/esm/export/Pico8Exporter.js +768 -811
  277. package/dist/esm/export/PlatformExporter.js +193 -205
  278. package/dist/esm/export/RPGMakerExporter.js +862 -878
  279. package/dist/esm/export/RobloxExporter.js +885 -918
  280. package/dist/esm/export/Solar2DExporter.js +1220 -1255
  281. package/dist/esm/export/ThreeJSExporter.js +1007 -1072
  282. package/dist/esm/export/Tic80Exporter.js +1212 -1266
  283. package/dist/esm/export/UnityExporter.js +1117 -1130
  284. package/dist/esm/export/UnrealExporter.js +891 -918
  285. package/dist/esm/export/WebExporter.js +933 -969
  286. package/dist/esm/export/index.js +86 -71
  287. package/dist/esm/godot-integration/GodotAssetLibrary.js +663 -691
  288. package/dist/esm/godot-integration/GodotImport.js +935 -1026
  289. package/dist/esm/godot-integration/GodotLiveLink.js +918 -944
  290. package/dist/esm/godot-integration/components/GodotProjectBrowser.js +912 -610
  291. package/dist/esm/i18n/I18n.js +871 -899
  292. package/dist/esm/i18n/useTranslation.js +88 -88
  293. package/dist/esm/import/AsepriteImporter.js +637 -715
  294. package/dist/esm/import/DragonBonesImporter.js +417 -460
  295. package/dist/esm/import/GameMakerImporter.js +491 -520
  296. package/dist/esm/import/GodotSceneImporter.js +767 -821
  297. package/dist/esm/import/LDtkImporter.js +415 -453
  298. package/dist/esm/import/Live2DImporter.js +477 -517
  299. package/dist/esm/import/NdgFormat.js +410 -456
  300. package/dist/esm/import/OgmoImporter.js +446 -492
  301. package/dist/esm/import/RPGMakerImporter.js +431 -476
  302. package/dist/esm/import/SceneImporter.js +385 -422
  303. package/dist/esm/import/SpineImporter.js +491 -545
  304. package/dist/esm/import/SpriterImporter.js +570 -612
  305. package/dist/esm/import/TiledMapImporter.js +790 -845
  306. package/dist/esm/import/UnitySceneImporter.js +666 -702
  307. package/dist/esm/import/index.js +247 -258
  308. package/dist/esm/index.js +1332 -188
  309. package/dist/esm/input/GamepadNavigation.js +187 -204
  310. package/dist/esm/input/InputManager.js +401 -420
  311. package/dist/esm/input/useGamepads.js +72 -80
  312. package/dist/esm/integration/IconSprite.js +143 -255
  313. package/dist/esm/inventory/InventorySystem.js +925 -994
  314. package/dist/esm/kids/KidMode.js +1003 -1021
  315. package/dist/esm/kids/KidTools.js +573 -593
  316. package/dist/esm/monetization/Monetization.js +180 -176
  317. package/dist/esm/multiplayer/LocalMultiplayer.js +290 -286
  318. package/dist/esm/multiplayer/MiniGameTypes.js +58 -58
  319. package/dist/esm/native-engine/AnimationSystem.js +735 -805
  320. package/dist/esm/native-engine/AssetPipeline.js +456 -514
  321. package/dist/esm/native-engine/AudioEngine.js +765 -803
  322. package/dist/esm/native-engine/InputSystem.js +1079 -1144
  323. package/dist/esm/native-engine/NetworkingSystem.js +740 -792
  324. package/dist/esm/native-engine/PhysicsEngine.js +585 -606
  325. package/dist/esm/native-engine/RenderingEngine.js +304 -349
  326. package/dist/esm/native-engine/SceneGraph.js +773 -807
  327. package/dist/esm/network/MultiplayerTransport.js +99 -131
  328. package/dist/esm/network/Networking.js +556 -563
  329. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/AbortController.js +22 -28
  330. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/AccessTokenHttpClient.js +41 -47
  331. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/DefaultHttpClient.js +36 -42
  332. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/DefaultReconnectPolicy.js +11 -14
  333. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/Errors.js +111 -134
  334. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/FetchHttpClient.js +132 -157
  335. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/HandshakeProtocol.js +40 -52
  336. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/HeaderNames.js +6 -7
  337. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/HttpClient.js +42 -47
  338. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/HttpConnection.js +496 -571
  339. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/HubConnection.js +828 -952
  340. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/HubConnectionBuilder.js +126 -145
  341. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/IHubProtocol.js +14 -23
  342. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/ILogger.js +12 -25
  343. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/ITransport.js +15 -24
  344. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/JsonHubProtocol.js +109 -120
  345. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/Loggers.js +11 -13
  346. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/LongPollingTransport.js +151 -184
  347. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/MessageBuffer.js +159 -195
  348. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/ServerSentEventsTransport.js +91 -104
  349. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/Subject.js +31 -34
  350. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/TextMessageFormat.js +17 -20
  351. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/Utils.js +230 -248
  352. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/WebSocketTransport.js +136 -156
  353. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/XhrHttpClient.js +77 -84
  354. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/index.js +31 -12
  355. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/pkg-version.js +4 -3
  356. package/dist/esm/pathfinding/Pathfinding.js +249 -262
  357. package/dist/esm/performance/AssetStreaming.js +567 -634
  358. package/dist/esm/performance/BenchmarkSuite.js +285 -310
  359. package/dist/esm/performance/DeltaCompression.js +478 -525
  360. package/dist/esm/performance/DeterministicPhysics.js +479 -497
  361. package/dist/esm/performance/ECSOptimization.js +653 -694
  362. package/dist/esm/performance/GameSaveSystem.js +515 -555
  363. package/dist/esm/performance/HotReload.js +454 -499
  364. package/dist/esm/performance/InputRecording.js +520 -560
  365. package/dist/esm/performance/InterestManagement.js +460 -499
  366. package/dist/esm/performance/LocalizationRuntime.js +382 -422
  367. package/dist/esm/performance/MemoryManagement.js +415 -469
  368. package/dist/esm/performance/ModSupport.js +455 -495
  369. package/dist/esm/performance/MultiThreadedPhysics.js +408 -442
  370. package/dist/esm/performance/NetworkPrediction.js +436 -481
  371. package/dist/esm/performance/ObjectPooling.js +582 -616
  372. package/dist/esm/performance/Performance.js +182 -189
  373. package/dist/esm/performance/PerformanceAdvanced.js +621 -636
  374. package/dist/esm/performance/WebGPURenderer.js +660 -682
  375. package/dist/esm/physics/PhysicsAdvanced.js +359 -378
  376. package/dist/esm/physics/PhysicsEngine2D.js +393 -426
  377. package/dist/esm/plugins/PluginSDK.js +435 -465
  378. package/dist/esm/plugins/PluginTestKit.js +315 -329
  379. package/dist/esm/procedural/Procedural.js +248 -253
  380. package/dist/esm/procedural/WorldBuilding.js +316 -313
  381. package/dist/esm/quest/QuestSystem.js +982 -931
  382. package/dist/esm/release/MobileExport.js +163 -162
  383. package/dist/esm/release/Release.js +234 -237
  384. package/dist/esm/rendering/Camera2D.js +122 -123
  385. package/dist/esm/rendering/Renderer2D.js +323 -334
  386. package/dist/esm/rendering/WebGPURenderPipeline.js +647 -650
  387. package/dist/esm/runtime3d/Runtime3D.js +368 -377
  388. package/dist/esm/runtime3d/SceneEditor3D.js +268 -262
  389. package/dist/esm/scene/SceneManager.js +178 -192
  390. package/dist/esm/scripting/GraphToAST.js +576 -546
  391. package/dist/esm/scripting/LanguageExporter.js +263 -278
  392. package/dist/esm/scripting/NodeGraph.js +550 -569
  393. package/dist/esm/scripting/ScriptAST.js +45 -38
  394. package/dist/esm/scripting/VisualScripting2.js +1025 -1064
  395. package/dist/esm/scripting/exporters/CSharpExporter.js +465 -495
  396. package/dist/esm/scripting/exporters/GDScriptExporter.js +391 -441
  397. package/dist/esm/scripting/exporters/LuaExporter.js +407 -446
  398. package/dist/esm/scripting/exporters/PythonExporter.js +485 -548
  399. package/dist/esm/scripting/exporters/RustExporter.js +460 -511
  400. package/dist/esm/scripting/exporters/TypeScriptExporter.js +506 -555
  401. package/dist/esm/social/Social.js +77 -79
  402. package/dist/esm/systems/LightingSystem.js +855 -930
  403. package/dist/esm/systems/ParticleSystem2.js +1453 -1450
  404. package/dist/esm/systems/PhysicsDebugSystem.js +1078 -1140
  405. package/dist/esm/systems/TerrainSystem.js +996 -1097
  406. package/dist/esm/templates/ActionTemplates.js +307 -308
  407. package/dist/esm/templates/FightingTemplate.js +439 -462
  408. package/dist/esm/templates/MetroidvaniaTemplate.js +391 -404
  409. package/dist/esm/templates/PartyTemplates.js +206 -201
  410. package/dist/esm/templates/PuzzleTemplates.js +260 -260
  411. package/dist/esm/templates/RPGTemplates.js +172 -177
  412. package/dist/esm/templates/SportsTemplates.js +251 -249
  413. package/dist/esm/templates/StrategyTemplates.js +158 -152
  414. package/dist/esm/templates/SurvivalTemplate.js +367 -379
  415. package/dist/esm/templates/WaveDefense.js +501 -525
  416. package/dist/esm/tilemap/Tilemap.js +209 -213
  417. package/dist/esm/tutorials/TutorialBranching.js +399 -416
  418. package/dist/esm/tutorials/TutorialEngine.js +893 -930
  419. package/dist/esm/tutorials/TutorialOverlay.js +603 -639
  420. package/dist/esm/tutorials/content/Tutorials_T05_T08.js +792 -808
  421. package/dist/esm/tutorials/content/Tutorials_T09_T11.js +740 -755
  422. package/dist/esm/tutorials/content/Tutorials_T12_T15.js +759 -777
  423. package/dist/esm/ui/GameUI.js +296 -311
  424. package/dist/esm/unity-integration/UnityAssetStore.js +704 -740
  425. package/dist/esm/unity-integration/UnityImport.js +1071 -1175
  426. package/dist/esm/unity-integration/UnityLiveLink.js +938 -980
  427. package/dist/esm/unity-integration/components/UnityAssetStoreBrowser.js +1234 -756
  428. package/dist/esm/unity-integration/components/UnityProjectBrowser.js +1241 -767
  429. package/dist/esm/unreal-integration/UnrealImport.js +395 -411
  430. package/dist/esm/unreal-integration/UnrealLiveLink.js +1105 -1136
  431. package/dist/esm/unreal-integration/UnrealMarketplace.js +442 -472
  432. package/dist/esm/unreal-integration/components/UnrealProjectBrowser.js +1151 -766
  433. package/dist/esm/xr/ARVR.js +181 -174
  434. package/package.json +7 -12
@@ -1,799 +1,1275 @@
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: '#0f0f17',
9
- surfaceBackground: '#1a1a28',
10
- cardBackground: '#252538',
11
- headerBackground: '#15151f',
12
- textPrimary: '#e2e8f0',
13
- textSecondary: '#94a3b8',
14
- accent: '#6366f1',
15
- success: '#22c55e',
16
- warning: '#f59e0b',
17
- danger: '#ef4444',
18
- star: '#fbbf24',
19
- border: 'rgba(255,255,255,0.08)',
20
- freeBadge: '#22c55e',
21
- ownedBadge: '#3b82f6',
22
- saleBadge: '#ef4444',
7
+ background: "#0f0f17",
8
+ surfaceBackground: "#1a1a28",
9
+ cardBackground: "#252538",
10
+ headerBackground: "#15151f",
11
+ textPrimary: "#e2e8f0",
12
+ textSecondary: "#94a3b8",
13
+ accent: "#6366f1",
14
+ success: "#22c55e",
15
+ warning: "#f59e0b",
16
+ danger: "#ef4444",
17
+ star: "#fbbf24",
18
+ border: "rgba(255,255,255,0.08)",
19
+ freeBadge: "#22c55e",
20
+ ownedBadge: "#3b82f6",
21
+ saleBadge: "#ef4444"
23
22
  };
24
23
  function storeReducer(state, action) {
25
- switch (action.type) {
26
- case 'SET_QUERY':
27
- return { ...state, query: { ...state.query, ...action.query } };
28
- case 'SET_RESULTS':
29
- return { ...state, results: action.results, totalResults: action.total };
30
- case 'SET_LOADING':
31
- return { ...state, loading: action.loading };
32
- case 'SET_ERROR':
33
- return { ...state, error: action.error };
34
- case 'SELECT_ASSET':
35
- return { ...state, selectedAsset: action.asset };
36
- case 'ADD_TO_CART':
37
- return { ...state, cart: new Set([...state.cart, action.id]) };
38
- case 'REMOVE_FROM_CART': {
39
- const newCart = new Set(state.cart);
40
- newCart.delete(action.id);
41
- return { ...state, cart: newCart };
42
- }
43
- case 'CLEAR_CART':
44
- return { ...state, cart: new Set() };
45
- case 'SET_DOWNLOAD_PROGRESS': {
46
- const newDownloads = new Map(state.downloading);
47
- newDownloads.set(action.id, action.progress);
48
- return { ...state, downloading: newDownloads };
49
- }
50
- case 'CLEAR_DOWNLOAD': {
51
- const cleared = new Map(state.downloading);
52
- cleared.delete(action.id);
53
- return { ...state, downloading: cleared };
54
- }
55
- case 'SET_VIEW':
56
- return { ...state, view: action.view };
57
- case 'TOGGLE_MY_ASSETS':
58
- return { ...state, myAssets: !state.myAssets };
59
- default:
60
- return state;
24
+ switch (action.type) {
25
+ case "SET_QUERY":
26
+ return { ...state, query: { ...state.query, ...action.query } };
27
+ case "SET_RESULTS":
28
+ return { ...state, results: action.results, totalResults: action.total };
29
+ case "SET_LOADING":
30
+ return { ...state, loading: action.loading };
31
+ case "SET_ERROR":
32
+ return { ...state, error: action.error };
33
+ case "SELECT_ASSET":
34
+ return { ...state, selectedAsset: action.asset };
35
+ case "ADD_TO_CART":
36
+ return { ...state, cart: /* @__PURE__ */ new Set([...state.cart, action.id]) };
37
+ case "REMOVE_FROM_CART": {
38
+ const newCart = new Set(state.cart);
39
+ newCart.delete(action.id);
40
+ return { ...state, cart: newCart };
41
+ }
42
+ case "CLEAR_CART":
43
+ return { ...state, cart: /* @__PURE__ */ new Set() };
44
+ case "SET_DOWNLOAD_PROGRESS": {
45
+ const newDownloads = new Map(state.downloading);
46
+ newDownloads.set(action.id, action.progress);
47
+ return { ...state, downloading: newDownloads };
48
+ }
49
+ case "CLEAR_DOWNLOAD": {
50
+ const cleared = new Map(state.downloading);
51
+ cleared.delete(action.id);
52
+ return { ...state, downloading: cleared };
61
53
  }
54
+ case "SET_VIEW":
55
+ return { ...state, view: action.view };
56
+ case "TOGGLE_MY_ASSETS":
57
+ return { ...state, myAssets: !state.myAssets };
58
+ default:
59
+ return state;
60
+ }
62
61
  }
63
62
  const INITIAL_STATE = {
64
- query: {
65
- query: '',
66
- category: 'all',
67
- pricing: 'all',
68
- minRating: 0,
69
- sortBy: 'relevance',
70
- page: 1,
71
- pageSize: 24,
72
- },
73
- results: [],
74
- totalResults: 0,
75
- loading: false,
76
- error: null,
77
- selectedAsset: null,
78
- cart: new Set(),
79
- downloading: new Map(),
80
- view: 'grid',
81
- myAssets: false,
63
+ query: {
64
+ query: "",
65
+ category: "all",
66
+ pricing: "all",
67
+ minRating: 0,
68
+ sortBy: "relevance",
69
+ page: 1,
70
+ pageSize: 24
71
+ },
72
+ results: [],
73
+ totalResults: 0,
74
+ loading: false,
75
+ error: null,
76
+ selectedAsset: null,
77
+ cart: /* @__PURE__ */ new Set(),
78
+ downloading: /* @__PURE__ */ new Map(),
79
+ view: "grid",
80
+ myAssets: false
82
81
  };
83
82
  const StoreContext = /* @__PURE__ */ React.createContext(null);
84
83
  function useStore() {
85
- const ctx = React.useContext(StoreContext);
86
- if (!ctx) {
87
- throw new Error('useStore must be used within UnityAssetStoreBrowser');
88
- }
89
- return ctx;
84
+ const ctx = React.useContext(StoreContext);
85
+ if (!ctx) {
86
+ throw new Error("useStore must be used within UnityAssetStoreBrowser");
87
+ }
88
+ return ctx;
90
89
  }
91
- /* ── Helper Functions ─────────────────────────────────────────── */
92
90
  function formatPrice(price, currency) {
93
- if (price === 0) {
94
- return 'Free';
95
- }
96
- return new Intl.NumberFormat('en-US', { style: 'currency', currency }).format(price);
91
+ if (price === 0) {
92
+ return "Free";
93
+ }
94
+ return new Intl.NumberFormat("en-US", { style: "currency", currency }).format(price);
97
95
  }
98
96
  function formatFileSize(bytes) {
99
- if (bytes < 1024 * 1024) {
100
- return `${(bytes / 1024).toFixed(1)} KB`;
101
- }
102
- if (bytes < 1024 * 1024 * 1024) {
103
- return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
104
- }
105
- return `${(bytes / (1024 * 1024 * 1024)).toFixed(1)} GB`;
97
+ if (bytes < 1024 * 1024) {
98
+ return `${(bytes / 1024).toFixed(1)} KB`;
99
+ }
100
+ if (bytes < 1024 * 1024 * 1024) {
101
+ return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
102
+ }
103
+ return `${(bytes / (1024 * 1024 * 1024)).toFixed(1)} GB`;
106
104
  }
107
105
  function getCategoryIcon(category) {
108
- switch (category) {
109
- case '3d':
110
- return 'box';
111
- case '2d':
112
- return 'image';
113
- case 'tools':
114
- return 'settings';
115
- case 'vfx':
116
- return 'star';
117
- case 'audio':
118
- return 'volume';
119
- case 'templates':
120
- return 'clipboard';
121
- case 'add-ons':
122
- return 'puzzle';
123
- default:
124
- return 'box';
125
- }
106
+ switch (category) {
107
+ case "3d":
108
+ return "box";
109
+ case "2d":
110
+ return "image";
111
+ case "tools":
112
+ return "settings";
113
+ case "vfx":
114
+ return "star";
115
+ case "audio":
116
+ return "volume";
117
+ case "templates":
118
+ return "clipboard";
119
+ case "add-ons":
120
+ return "puzzle";
121
+ default:
122
+ return "box";
123
+ }
126
124
  }
127
- /* ── Search Header ────────────────────────────────────────────── */
128
125
  const SearchHeader = () => {
129
- const { state, dispatch, theme, search } = useStore();
130
- const [localQuery, setLocalQuery] = React.useState(state.query.query);
131
- const handleSearch = () => {
132
- dispatch({ type: 'SET_QUERY', query: { query: localQuery, page: 1 } });
133
- search();
134
- };
135
- const categories = [
136
- { value: 'all', label: 'All Categories' },
137
- { value: '3d', label: '3D' },
138
- { value: '2d', label: '2D' },
139
- { value: 'tools', label: 'Tools' },
140
- { value: 'vfx', label: 'VFX' },
141
- { value: 'audio', label: 'Audio' },
142
- { value: 'templates', label: 'Templates' },
143
- { value: 'add-ons', label: 'Add-ons' },
144
- ];
145
- return (jsxRuntime.jsxs("div", { style: {
146
- padding: '16px 24px',
147
- backgroundColor: theme.headerBackground,
148
- borderBottom: `1px solid ${theme.border}`,
149
- }, children: [jsxRuntime.jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 12, marginBottom: 12 }, children: [jsxRuntime.jsx(ui.NiceIcon, { name: "building", size: 24 }), jsxRuntime.jsx("h1", { style: { margin: 0, fontSize: 18, fontWeight: 600, color: theme.textPrimary }, children: "Unity Asset Store" }), jsxRuntime.jsx("div", { style: { flex: 1 } }), jsxRuntime.jsxs("button", { style: {
150
- display: 'flex',
151
- alignItems: 'center',
152
- gap: 6,
153
- padding: '8px 12px',
154
- backgroundColor: state.cart.size > 0 ? theme.accent : 'rgba(0,0,0,0.2)',
155
- border: 'none',
156
- borderRadius: 6,
157
- color: '#fff',
158
- cursor: 'pointer',
159
- }, children: [jsxRuntime.jsx(ui.NiceIcon, { name: "box", size: 14 }), " Cart (", state.cart.size, ")"] }), jsxRuntime.jsxs("button", { onClick: () => dispatch({ type: 'TOGGLE_MY_ASSETS' }), style: {
160
- padding: '8px 12px',
161
- backgroundColor: state.myAssets ? theme.accent : 'rgba(0,0,0,0.2)',
162
- border: 'none',
163
- borderRadius: 6,
164
- color: '#fff',
165
- cursor: 'pointer',
166
- }, children: [jsxRuntime.jsx(ui.NiceIcon, { name: "book", size: 14 }), " My Assets"] })] }), jsxRuntime.jsxs("div", { style: { display: 'flex', gap: 8 }, children: [jsxRuntime.jsxs("div", { style: { flex: 1, position: 'relative' }, children: [jsxRuntime.jsx("input", { type: "text", placeholder: "Search assets...", value: localQuery, onChange: (e) => setLocalQuery(e.target.value), onKeyDown: (e) => e.key === 'Enter' && handleSearch(), style: {
167
- width: '100%',
168
- padding: '10px 16px',
169
- paddingRight: 50,
170
- fontSize: 14,
171
- backgroundColor: 'rgba(0,0,0,0.3)',
172
- border: `1px solid ${theme.border}`,
173
- borderRadius: 8,
174
- color: theme.textPrimary,
175
- outline: 'none',
176
- } }), jsxRuntime.jsx("button", { onClick: handleSearch, style: {
177
- position: 'absolute',
178
- right: 4,
179
- top: 4,
180
- bottom: 4,
181
- padding: '0 12px',
182
- backgroundColor: theme.accent,
183
- border: 'none',
184
- borderRadius: 6,
185
- color: '#fff',
186
- cursor: 'pointer',
187
- }, children: jsxRuntime.jsx(ui.NiceIcon, { name: "search", size: 14 }) })] }), jsxRuntime.jsx("select", { value: state.query.category, onChange: (e) => {
188
- dispatch({
189
- type: 'SET_QUERY',
190
- query: { category: e.target.value, page: 1 },
191
- });
192
- search();
193
- }, style: {
194
- padding: '10px 16px',
195
- fontSize: 14,
196
- backgroundColor: 'rgba(0,0,0,0.3)',
197
- border: `1px solid ${theme.border}`,
198
- borderRadius: 8,
199
- color: theme.textPrimary,
200
- }, children: categories.map((c) => (jsxRuntime.jsx("option", { value: c.value, children: c.label }, c.value))) }), jsxRuntime.jsxs("select", { value: state.query.pricing, onChange: (e) => {
201
- dispatch({
202
- type: 'SET_QUERY',
203
- query: { pricing: e.target.value, page: 1 },
204
- });
205
- search();
206
- }, style: {
207
- padding: '10px 16px',
208
- fontSize: 14,
209
- backgroundColor: 'rgba(0,0,0,0.3)',
210
- border: `1px solid ${theme.border}`,
211
- borderRadius: 8,
212
- color: theme.textPrimary,
213
- }, children: [jsxRuntime.jsx("option", { value: "all", children: "All Prices" }), jsxRuntime.jsx("option", { value: "free", children: "Free" }), jsxRuntime.jsx("option", { value: "paid", children: "Paid" }), jsxRuntime.jsx("option", { value: "sale", children: "On Sale" })] }), jsxRuntime.jsxs("select", { value: state.query.sortBy, onChange: (e) => {
214
- dispatch({
215
- type: 'SET_QUERY',
216
- query: { sortBy: e.target.value, page: 1 },
217
- });
218
- search();
219
- }, style: {
220
- padding: '10px 16px',
221
- fontSize: 14,
222
- backgroundColor: 'rgba(0,0,0,0.3)',
223
- border: `1px solid ${theme.border}`,
224
- borderRadius: 8,
225
- color: theme.textPrimary,
226
- }, children: [jsxRuntime.jsx("option", { value: "relevance", children: "Relevance" }), jsxRuntime.jsx("option", { value: "popularity", children: "Popularity" }), jsxRuntime.jsx("option", { value: "rating", children: "Rating" }), jsxRuntime.jsx("option", { value: "price_asc", children: "Price: Low to High" }), jsxRuntime.jsx("option", { value: "price_desc", children: "Price: High to Low" }), jsxRuntime.jsx("option", { value: "newest", children: "Newest" })] })] })] }));
126
+ const { state, dispatch, theme, search } = useStore();
127
+ const [localQuery, setLocalQuery] = React.useState(state.query.query);
128
+ const handleSearch = () => {
129
+ dispatch({ type: "SET_QUERY", query: { query: localQuery, page: 1 } });
130
+ search();
131
+ };
132
+ const categories = [
133
+ { value: "all", label: "All Categories" },
134
+ { value: "3d", label: "3D" },
135
+ { value: "2d", label: "2D" },
136
+ { value: "tools", label: "Tools" },
137
+ { value: "vfx", label: "VFX" },
138
+ { value: "audio", label: "Audio" },
139
+ { value: "templates", label: "Templates" },
140
+ { value: "add-ons", label: "Add-ons" }
141
+ ];
142
+ return /* @__PURE__ */ jsxRuntime.jsxs(
143
+ "div",
144
+ {
145
+ style: {
146
+ padding: "16px 24px",
147
+ backgroundColor: theme.headerBackground,
148
+ borderBottom: `1px solid ${theme.border}`
149
+ },
150
+ children: [
151
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 12, marginBottom: 12 }, children: [
152
+ /* @__PURE__ */ jsxRuntime.jsx(ui.NiceIcon, { name: "building", size: 24 }),
153
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { style: { margin: 0, fontSize: 18, fontWeight: 600, color: theme.textPrimary }, children: "Unity Asset Store" }),
154
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 1 } }),
155
+ /* @__PURE__ */ jsxRuntime.jsxs(
156
+ "button",
157
+ {
158
+ style: {
159
+ display: "flex",
160
+ alignItems: "center",
161
+ gap: 6,
162
+ padding: "8px 12px",
163
+ backgroundColor: state.cart.size > 0 ? theme.accent : "rgba(0,0,0,0.2)",
164
+ border: "none",
165
+ borderRadius: 6,
166
+ color: "#fff",
167
+ cursor: "pointer"
168
+ },
169
+ children: [
170
+ /* @__PURE__ */ jsxRuntime.jsx(ui.NiceIcon, { name: "box", size: 14 }),
171
+ " Cart (",
172
+ state.cart.size,
173
+ ")"
174
+ ]
175
+ }
176
+ ),
177
+ /* @__PURE__ */ jsxRuntime.jsxs(
178
+ "button",
179
+ {
180
+ onClick: () => dispatch({ type: "TOGGLE_MY_ASSETS" }),
181
+ style: {
182
+ padding: "8px 12px",
183
+ backgroundColor: state.myAssets ? theme.accent : "rgba(0,0,0,0.2)",
184
+ border: "none",
185
+ borderRadius: 6,
186
+ color: "#fff",
187
+ cursor: "pointer"
188
+ },
189
+ children: [
190
+ /* @__PURE__ */ jsxRuntime.jsx(ui.NiceIcon, { name: "book", size: 14 }),
191
+ " My Assets"
192
+ ]
193
+ }
194
+ )
195
+ ] }),
196
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", gap: 8 }, children: [
197
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: 1, position: "relative" }, children: [
198
+ /* @__PURE__ */ jsxRuntime.jsx(
199
+ "input",
200
+ {
201
+ type: "text",
202
+ placeholder: "Search assets...",
203
+ value: localQuery,
204
+ onChange: (e) => setLocalQuery(e.target.value),
205
+ onKeyDown: (e) => e.key === "Enter" && handleSearch(),
206
+ style: {
207
+ width: "100%",
208
+ padding: "10px 16px",
209
+ paddingRight: 50,
210
+ fontSize: 14,
211
+ backgroundColor: "rgba(0,0,0,0.3)",
212
+ border: `1px solid ${theme.border}`,
213
+ borderRadius: 8,
214
+ color: theme.textPrimary,
215
+ outline: "none"
216
+ }
217
+ }
218
+ ),
219
+ /* @__PURE__ */ jsxRuntime.jsx(
220
+ "button",
221
+ {
222
+ onClick: handleSearch,
223
+ style: {
224
+ position: "absolute",
225
+ right: 4,
226
+ top: 4,
227
+ bottom: 4,
228
+ padding: "0 12px",
229
+ backgroundColor: theme.accent,
230
+ border: "none",
231
+ borderRadius: 6,
232
+ color: "#fff",
233
+ cursor: "pointer"
234
+ },
235
+ children: /* @__PURE__ */ jsxRuntime.jsx(ui.NiceIcon, { name: "search", size: 14 })
236
+ }
237
+ )
238
+ ] }),
239
+ /* @__PURE__ */ jsxRuntime.jsx(
240
+ "select",
241
+ {
242
+ value: state.query.category,
243
+ onChange: (e) => {
244
+ dispatch({
245
+ type: "SET_QUERY",
246
+ query: { category: e.target.value, page: 1 }
247
+ });
248
+ search();
249
+ },
250
+ style: {
251
+ padding: "10px 16px",
252
+ fontSize: 14,
253
+ backgroundColor: "rgba(0,0,0,0.3)",
254
+ border: `1px solid ${theme.border}`,
255
+ borderRadius: 8,
256
+ color: theme.textPrimary
257
+ },
258
+ children: categories.map((c) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: c.value, children: c.label }, c.value))
259
+ }
260
+ ),
261
+ /* @__PURE__ */ jsxRuntime.jsxs(
262
+ "select",
263
+ {
264
+ value: state.query.pricing,
265
+ onChange: (e) => {
266
+ dispatch({
267
+ type: "SET_QUERY",
268
+ query: { pricing: e.target.value, page: 1 }
269
+ });
270
+ search();
271
+ },
272
+ style: {
273
+ padding: "10px 16px",
274
+ fontSize: 14,
275
+ backgroundColor: "rgba(0,0,0,0.3)",
276
+ border: `1px solid ${theme.border}`,
277
+ borderRadius: 8,
278
+ color: theme.textPrimary
279
+ },
280
+ children: [
281
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "all", children: "All Prices" }),
282
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "free", children: "Free" }),
283
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "paid", children: "Paid" }),
284
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "sale", children: "On Sale" })
285
+ ]
286
+ }
287
+ ),
288
+ /* @__PURE__ */ jsxRuntime.jsxs(
289
+ "select",
290
+ {
291
+ value: state.query.sortBy,
292
+ onChange: (e) => {
293
+ dispatch({
294
+ type: "SET_QUERY",
295
+ query: { sortBy: e.target.value, page: 1 }
296
+ });
297
+ search();
298
+ },
299
+ style: {
300
+ padding: "10px 16px",
301
+ fontSize: 14,
302
+ backgroundColor: "rgba(0,0,0,0.3)",
303
+ border: `1px solid ${theme.border}`,
304
+ borderRadius: 8,
305
+ color: theme.textPrimary
306
+ },
307
+ children: [
308
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "relevance", children: "Relevance" }),
309
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "popularity", children: "Popularity" }),
310
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "rating", children: "Rating" }),
311
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "price_asc", children: "Price: Low to High" }),
312
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "price_desc", children: "Price: High to Low" }),
313
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "newest", children: "Newest" })
314
+ ]
315
+ }
316
+ )
317
+ ] })
318
+ ]
319
+ }
320
+ );
227
321
  };
228
- /* ── Rating Stars ─────────────────────────────────────────────── */
229
322
  const RatingStars = ({ rating, count }) => {
230
- const { theme } = useStore();
231
- return (jsxRuntime.jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 4 }, children: [[1, 2, 3, 4, 5].map((star) => (jsxRuntime.jsx("span", { style: {
232
- fontSize: 12,
233
- color: star <= Math.round(rating) ? theme.star : theme.textSecondary,
234
- }, children: jsxRuntime.jsx(ui.NiceIcon, { name: "star", size: 12 }) }, star))), count !== undefined && (jsxRuntime.jsxs("span", { style: { fontSize: 11, color: theme.textSecondary, marginLeft: 4 }, children: ["(", count, ")"] }))] }));
323
+ const { theme } = useStore();
324
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 4 }, children: [
325
+ [1, 2, 3, 4, 5].map((star) => /* @__PURE__ */ jsxRuntime.jsx(
326
+ "span",
327
+ {
328
+ style: {
329
+ fontSize: 12,
330
+ color: star <= Math.round(rating) ? theme.star : theme.textSecondary
331
+ },
332
+ children: /* @__PURE__ */ jsxRuntime.jsx(ui.NiceIcon, { name: "star", size: 12 })
333
+ },
334
+ star
335
+ )),
336
+ count !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontSize: 11, color: theme.textSecondary, marginLeft: 4 }, children: [
337
+ "(",
338
+ count,
339
+ ")"
340
+ ] })
341
+ ] });
235
342
  };
236
- /* ── Asset Card ───────────────────────────────────────────────── */
237
343
  const AssetCard = ({ asset }) => {
238
- const { state, dispatch, theme, downloadAsset, openInBrowser } = useStore();
239
- const isDownloading = state.downloading.has(asset.id);
240
- const downloadProgress = state.downloading.get(asset.id) ?? 0;
241
- const isInCart = state.cart.has(asset.id);
242
- return (jsxRuntime.jsxs("div", { role: "button", tabIndex: 0, onKeyDown: ui.clickOnActivationKey, style: {
243
- backgroundColor: theme.cardBackground,
244
- borderRadius: 12,
245
- overflow: 'hidden',
246
- cursor: 'pointer',
247
- transition: 'transform 0.2s, box-shadow 0.2s',
248
- border: `1px solid ${theme.border}`,
249
- }, onClick: () => dispatch({ type: 'SELECT_ASSET', asset }), children: [jsxRuntime.jsxs("div", { style: {
250
- position: 'relative',
251
- width: '100%',
252
- paddingTop: '56.25%',
253
- backgroundColor: 'rgba(0,0,0,0.3)',
254
- }, children: [asset.thumbnailUrl && (jsxRuntime.jsx("div", { style: {
255
- position: 'absolute',
256
- top: 0,
257
- left: 0,
258
- right: 0,
259
- bottom: 0,
260
- backgroundImage: `url(${asset.thumbnailUrl})`,
261
- backgroundSize: 'cover',
262
- backgroundPosition: 'center',
263
- } })), jsxRuntime.jsxs("div", { style: { position: 'absolute', top: 8, left: 8, display: 'flex', gap: 4 }, children: [asset.isFree && (jsxRuntime.jsx("span", { style: {
264
- padding: '2px 8px',
265
- fontSize: 10,
266
- fontWeight: 600,
267
- backgroundColor: theme.freeBadge,
268
- borderRadius: 4,
269
- color: '#fff',
270
- }, children: "FREE" })), asset.isOwned && (jsxRuntime.jsx("span", { style: {
271
- padding: '2px 8px',
272
- fontSize: 10,
273
- fontWeight: 600,
274
- backgroundColor: theme.ownedBadge,
275
- borderRadius: 4,
276
- color: '#fff',
277
- }, children: "OWNED" })), asset.originalPrice && (jsxRuntime.jsxs("span", { style: {
278
- padding: '2px 8px',
279
- fontSize: 10,
280
- fontWeight: 600,
281
- backgroundColor: theme.saleBadge,
282
- borderRadius: 4,
283
- color: '#fff',
284
- }, children: ["-", Math.round((1 - asset.price / asset.originalPrice) * 100), "%"] }))] }), jsxRuntime.jsx("div", { style: {
285
- position: 'absolute',
286
- bottom: 8,
287
- right: 8,
288
- width: 28,
289
- height: 28,
290
- backgroundColor: 'rgba(0,0,0,0.6)',
291
- borderRadius: 6,
292
- display: 'flex',
293
- alignItems: 'center',
294
- justifyContent: 'center',
295
- fontSize: 14,
296
- }, children: jsxRuntime.jsx(ui.NiceIcon, { name: getCategoryIcon(asset.category), size: 32 }) })] }), jsxRuntime.jsxs("div", { style: { padding: 12 }, children: [jsxRuntime.jsx("h3", { style: {
297
- margin: 0,
298
- fontSize: 13,
299
- fontWeight: 600,
300
- color: theme.textPrimary,
301
- overflow: 'hidden',
302
- textOverflow: 'ellipsis',
303
- whiteSpace: 'nowrap',
304
- }, children: asset.name }), jsxRuntime.jsx("div", { style: {
305
- fontSize: 11,
306
- color: theme.textSecondary,
307
- marginTop: 4,
308
- overflow: 'hidden',
309
- textOverflow: 'ellipsis',
310
- whiteSpace: 'nowrap',
311
- }, children: asset.publisher }), jsxRuntime.jsxs("div", { style: {
312
- display: 'flex',
313
- alignItems: 'center',
314
- justifyContent: 'space-between',
315
- marginTop: 8,
316
- }, children: [jsxRuntime.jsx(RatingStars, { rating: asset.rating, count: asset.ratingCount }), jsxRuntime.jsxs("div", { style: { textAlign: 'right' }, children: [asset.originalPrice && (jsxRuntime.jsx("div", { style: {
317
- fontSize: 10,
318
- color: theme.textSecondary,
319
- textDecoration: 'line-through',
320
- }, children: formatPrice(asset.originalPrice, asset.currency) })), jsxRuntime.jsx("div", { style: {
321
- fontSize: 14,
322
- fontWeight: 600,
323
- color: asset.isFree ? theme.freeBadge : theme.textPrimary,
324
- }, children: formatPrice(asset.price, asset.currency) })] })] }), jsxRuntime.jsxs("div", { style: { display: 'flex', gap: 8, marginTop: 12 }, children: [asset.isOwned ? (jsxRuntime.jsx("button", { onClick: (e) => {
325
- e.stopPropagation();
326
- downloadAsset(asset.id);
327
- }, disabled: isDownloading, style: {
328
- flex: 1,
329
- padding: '8px 12px',
330
- fontSize: 11,
331
- fontWeight: 500,
332
- backgroundColor: isDownloading ? theme.textSecondary : theme.success,
333
- border: 'none',
334
- borderRadius: 6,
335
- color: '#fff',
336
- cursor: isDownloading ? 'not-allowed' : 'pointer',
337
- }, children: isDownloading ? `${downloadProgress}%` : 'Download' })) : (jsxRuntime.jsx("button", { onClick: (e) => {
338
- e.stopPropagation();
339
- if (isInCart) {
340
- dispatch({ type: 'REMOVE_FROM_CART', id: asset.id });
341
- }
342
- else {
343
- dispatch({ type: 'ADD_TO_CART', id: asset.id });
344
- }
345
- }, style: {
346
- flex: 1,
347
- padding: '8px 12px',
348
- fontSize: 11,
349
- fontWeight: 500,
350
- backgroundColor: isInCart ? theme.warning : theme.accent,
351
- border: 'none',
352
- borderRadius: 6,
353
- color: '#fff',
354
- cursor: 'pointer',
355
- }, children: isInCart ? 'In Cart' : 'Add to Cart' })), jsxRuntime.jsx("button", { onClick: (e) => {
356
- e.stopPropagation();
357
- openInBrowser(asset);
358
- }, style: {
359
- padding: '8px 12px',
360
- fontSize: 11,
361
- backgroundColor: 'rgba(0,0,0,0.2)',
362
- border: `1px solid ${theme.border}`,
363
- borderRadius: 6,
364
- color: theme.textSecondary,
365
- cursor: 'pointer',
366
- }, children: jsxRuntime.jsx(ui.NiceIcon, { name: "link", size: 14 }) })] })] })] }));
367
- };
368
- /* ── Asset Grid ───────────────────────────────────────────────── */
369
- const AssetGrid = () => {
370
- const { state, theme } = useStore();
371
- if (state.loading) {
372
- return (jsxRuntime.jsx("div", { style: {
373
- flex: 1,
374
- display: 'flex',
375
- alignItems: 'center',
376
- justifyContent: 'center',
344
+ const { state, dispatch, theme, downloadAsset, openInBrowser } = useStore();
345
+ const isDownloading = state.downloading.has(asset.id);
346
+ const downloadProgress = state.downloading.get(asset.id) ?? 0;
347
+ const isInCart = state.cart.has(asset.id);
348
+ return /* @__PURE__ */ jsxRuntime.jsxs(
349
+ "div",
350
+ {
351
+ role: "button",
352
+ tabIndex: 0,
353
+ onKeyDown: ui.clickOnActivationKey,
354
+ style: {
355
+ backgroundColor: theme.cardBackground,
356
+ borderRadius: 12,
357
+ overflow: "hidden",
358
+ cursor: "pointer",
359
+ transition: "transform 0.2s, box-shadow 0.2s",
360
+ border: `1px solid ${theme.border}`
361
+ },
362
+ onClick: () => dispatch({ type: "SELECT_ASSET", asset }),
363
+ children: [
364
+ /* @__PURE__ */ jsxRuntime.jsxs(
365
+ "div",
366
+ {
367
+ style: {
368
+ position: "relative",
369
+ width: "100%",
370
+ paddingTop: "56.25%",
371
+ backgroundColor: "rgba(0,0,0,0.3)"
372
+ },
373
+ children: [
374
+ asset.thumbnailUrl && /* @__PURE__ */ jsxRuntime.jsx(
375
+ "div",
376
+ {
377
+ style: {
378
+ position: "absolute",
379
+ top: 0,
380
+ left: 0,
381
+ right: 0,
382
+ bottom: 0,
383
+ backgroundImage: `url(${asset.thumbnailUrl})`,
384
+ backgroundSize: "cover",
385
+ backgroundPosition: "center"
386
+ }
387
+ }
388
+ ),
389
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { position: "absolute", top: 8, left: 8, display: "flex", gap: 4 }, children: [
390
+ asset.isFree && /* @__PURE__ */ jsxRuntime.jsx(
391
+ "span",
392
+ {
393
+ style: {
394
+ padding: "2px 8px",
395
+ fontSize: 10,
396
+ fontWeight: 600,
397
+ backgroundColor: theme.freeBadge,
398
+ borderRadius: 4,
399
+ color: "#fff"
400
+ },
401
+ children: "FREE"
402
+ }
403
+ ),
404
+ asset.isOwned && /* @__PURE__ */ jsxRuntime.jsx(
405
+ "span",
406
+ {
407
+ style: {
408
+ padding: "2px 8px",
409
+ fontSize: 10,
410
+ fontWeight: 600,
411
+ backgroundColor: theme.ownedBadge,
412
+ borderRadius: 4,
413
+ color: "#fff"
414
+ },
415
+ children: "OWNED"
416
+ }
417
+ ),
418
+ asset.originalPrice && /* @__PURE__ */ jsxRuntime.jsxs(
419
+ "span",
420
+ {
421
+ style: {
422
+ padding: "2px 8px",
423
+ fontSize: 10,
424
+ fontWeight: 600,
425
+ backgroundColor: theme.saleBadge,
426
+ borderRadius: 4,
427
+ color: "#fff"
428
+ },
429
+ children: [
430
+ "-",
431
+ Math.round((1 - asset.price / asset.originalPrice) * 100),
432
+ "%"
433
+ ]
434
+ }
435
+ )
436
+ ] }),
437
+ /* @__PURE__ */ jsxRuntime.jsx(
438
+ "div",
439
+ {
440
+ style: {
441
+ position: "absolute",
442
+ bottom: 8,
443
+ right: 8,
444
+ width: 28,
445
+ height: 28,
446
+ backgroundColor: "rgba(0,0,0,0.6)",
447
+ borderRadius: 6,
448
+ display: "flex",
449
+ alignItems: "center",
450
+ justifyContent: "center",
451
+ fontSize: 14
452
+ },
453
+ children: /* @__PURE__ */ jsxRuntime.jsx(ui.NiceIcon, { name: getCategoryIcon(asset.category), size: 32 })
454
+ }
455
+ )
456
+ ]
457
+ }
458
+ ),
459
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { padding: 12 }, children: [
460
+ /* @__PURE__ */ jsxRuntime.jsx(
461
+ "h3",
462
+ {
463
+ style: {
464
+ margin: 0,
465
+ fontSize: 13,
466
+ fontWeight: 600,
467
+ color: theme.textPrimary,
468
+ overflow: "hidden",
469
+ textOverflow: "ellipsis",
470
+ whiteSpace: "nowrap"
471
+ },
472
+ children: asset.name
473
+ }
474
+ ),
475
+ /* @__PURE__ */ jsxRuntime.jsx(
476
+ "div",
477
+ {
478
+ style: {
479
+ fontSize: 11,
377
480
  color: theme.textSecondary,
378
- }, children: "Loading assets..." }));
379
- }
380
- if (state.error) {
381
- return (jsxRuntime.jsxs("div", { style: {
382
- flex: 1,
383
- display: 'flex',
384
- alignItems: 'center',
385
- justifyContent: 'center',
386
- color: theme.danger,
387
- }, children: [jsxRuntime.jsx(ui.NiceIcon, { name: "error", size: 14 }), " ", state.error] }));
481
+ marginTop: 4,
482
+ overflow: "hidden",
483
+ textOverflow: "ellipsis",
484
+ whiteSpace: "nowrap"
485
+ },
486
+ children: asset.publisher
487
+ }
488
+ ),
489
+ /* @__PURE__ */ jsxRuntime.jsxs(
490
+ "div",
491
+ {
492
+ style: {
493
+ display: "flex",
494
+ alignItems: "center",
495
+ justifyContent: "space-between",
496
+ marginTop: 8
497
+ },
498
+ children: [
499
+ /* @__PURE__ */ jsxRuntime.jsx(RatingStars, { rating: asset.rating, count: asset.ratingCount }),
500
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { textAlign: "right" }, children: [
501
+ asset.originalPrice && /* @__PURE__ */ jsxRuntime.jsx(
502
+ "div",
503
+ {
504
+ style: {
505
+ fontSize: 10,
506
+ color: theme.textSecondary,
507
+ textDecoration: "line-through"
508
+ },
509
+ children: formatPrice(asset.originalPrice, asset.currency)
510
+ }
511
+ ),
512
+ /* @__PURE__ */ jsxRuntime.jsx(
513
+ "div",
514
+ {
515
+ style: {
516
+ fontSize: 14,
517
+ fontWeight: 600,
518
+ color: asset.isFree ? theme.freeBadge : theme.textPrimary
519
+ },
520
+ children: formatPrice(asset.price, asset.currency)
521
+ }
522
+ )
523
+ ] })
524
+ ]
525
+ }
526
+ ),
527
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", gap: 8, marginTop: 12 }, children: [
528
+ asset.isOwned ? /* @__PURE__ */ jsxRuntime.jsx(
529
+ "button",
530
+ {
531
+ onClick: (e) => {
532
+ e.stopPropagation();
533
+ downloadAsset(asset.id);
534
+ },
535
+ disabled: isDownloading,
536
+ style: {
537
+ flex: 1,
538
+ padding: "8px 12px",
539
+ fontSize: 11,
540
+ fontWeight: 500,
541
+ backgroundColor: isDownloading ? theme.textSecondary : theme.success,
542
+ border: "none",
543
+ borderRadius: 6,
544
+ color: "#fff",
545
+ cursor: isDownloading ? "not-allowed" : "pointer"
546
+ },
547
+ children: isDownloading ? `${downloadProgress}%` : "Download"
548
+ }
549
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
550
+ "button",
551
+ {
552
+ onClick: (e) => {
553
+ e.stopPropagation();
554
+ if (isInCart) {
555
+ dispatch({ type: "REMOVE_FROM_CART", id: asset.id });
556
+ } else {
557
+ dispatch({ type: "ADD_TO_CART", id: asset.id });
558
+ }
559
+ },
560
+ style: {
561
+ flex: 1,
562
+ padding: "8px 12px",
563
+ fontSize: 11,
564
+ fontWeight: 500,
565
+ backgroundColor: isInCart ? theme.warning : theme.accent,
566
+ border: "none",
567
+ borderRadius: 6,
568
+ color: "#fff",
569
+ cursor: "pointer"
570
+ },
571
+ children: isInCart ? "In Cart" : "Add to Cart"
572
+ }
573
+ ),
574
+ /* @__PURE__ */ jsxRuntime.jsx(
575
+ "button",
576
+ {
577
+ onClick: (e) => {
578
+ e.stopPropagation();
579
+ openInBrowser(asset);
580
+ },
581
+ style: {
582
+ padding: "8px 12px",
583
+ fontSize: 11,
584
+ backgroundColor: "rgba(0,0,0,0.2)",
585
+ border: `1px solid ${theme.border}`,
586
+ borderRadius: 6,
587
+ color: theme.textSecondary,
588
+ cursor: "pointer"
589
+ },
590
+ children: /* @__PURE__ */ jsxRuntime.jsx(ui.NiceIcon, { name: "link", size: 14 })
591
+ }
592
+ )
593
+ ] })
594
+ ] })
595
+ ]
388
596
  }
389
- if (state.results.length === 0) {
390
- return (jsxRuntime.jsxs("div", { style: {
391
- flex: 1,
392
- display: 'flex',
393
- flexDirection: 'column',
394
- alignItems: 'center',
395
- justifyContent: 'center',
396
- color: theme.textSecondary,
397
- }, children: [jsxRuntime.jsx("div", { style: { marginBottom: 16 }, children: jsxRuntime.jsx(ui.NiceIcon, { name: "archive", size: 48 }) }), jsxRuntime.jsx("div", { children: "No assets found" })] }));
597
+ );
598
+ };
599
+ const AssetGrid = () => {
600
+ const { state, theme } = useStore();
601
+ if (state.loading) {
602
+ return /* @__PURE__ */ jsxRuntime.jsx(
603
+ "div",
604
+ {
605
+ style: {
606
+ flex: 1,
607
+ display: "flex",
608
+ alignItems: "center",
609
+ justifyContent: "center",
610
+ color: theme.textSecondary
611
+ },
612
+ children: "Loading assets..."
613
+ }
614
+ );
615
+ }
616
+ if (state.error) {
617
+ return /* @__PURE__ */ jsxRuntime.jsxs(
618
+ "div",
619
+ {
620
+ style: {
621
+ flex: 1,
622
+ display: "flex",
623
+ alignItems: "center",
624
+ justifyContent: "center",
625
+ color: theme.danger
626
+ },
627
+ children: [
628
+ /* @__PURE__ */ jsxRuntime.jsx(ui.NiceIcon, { name: "error", size: 14 }),
629
+ " ",
630
+ state.error
631
+ ]
632
+ }
633
+ );
634
+ }
635
+ if (state.results.length === 0) {
636
+ return /* @__PURE__ */ jsxRuntime.jsxs(
637
+ "div",
638
+ {
639
+ style: {
640
+ flex: 1,
641
+ display: "flex",
642
+ flexDirection: "column",
643
+ alignItems: "center",
644
+ justifyContent: "center",
645
+ color: theme.textSecondary
646
+ },
647
+ children: [
648
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginBottom: 16 }, children: /* @__PURE__ */ jsxRuntime.jsx(ui.NiceIcon, { name: "archive", size: 48 }) }),
649
+ /* @__PURE__ */ jsxRuntime.jsx("div", { children: "No assets found" })
650
+ ]
651
+ }
652
+ );
653
+ }
654
+ return /* @__PURE__ */ jsxRuntime.jsx(
655
+ "div",
656
+ {
657
+ style: {
658
+ display: "grid",
659
+ gridTemplateColumns: "repeat(auto-fill, minmax(220px, 1fr))",
660
+ gap: 16,
661
+ padding: 16
662
+ },
663
+ children: state.results.map((asset) => /* @__PURE__ */ jsxRuntime.jsx(AssetCard, { asset }, asset.id))
398
664
  }
399
- return (jsxRuntime.jsx("div", { style: {
400
- display: 'grid',
401
- gridTemplateColumns: 'repeat(auto-fill, minmax(220px, 1fr))',
402
- gap: 16,
403
- padding: 16,
404
- }, children: state.results.map((asset) => (jsxRuntime.jsx(AssetCard, { asset: asset }, asset.id))) }));
665
+ );
405
666
  };
406
- /* ── Asset Detail Modal ───────────────────────────────────────── */
407
667
  const AssetDetailModal = () => {
408
- const { state, dispatch, theme, downloadAsset, openInBrowser } = useStore();
409
- const [activeTab, setActiveTab] = React.useState('overview');
410
- if (!state.selectedAsset) {
411
- return null;
668
+ const { state, dispatch, theme, downloadAsset, openInBrowser } = useStore();
669
+ const [activeTab, setActiveTab] = React.useState("overview");
670
+ if (!state.selectedAsset) {
671
+ return null;
672
+ }
673
+ const asset = state.selectedAsset;
674
+ const isInCart = state.cart.has(asset.id);
675
+ const isDownloading = state.downloading.has(asset.id);
676
+ const downloadProgress = state.downloading.get(asset.id) ?? 0;
677
+ return /* @__PURE__ */ jsxRuntime.jsx(
678
+ "div",
679
+ {
680
+ role: "presentation",
681
+ style: {
682
+ position: "fixed",
683
+ top: 0,
684
+ left: 0,
685
+ right: 0,
686
+ bottom: 0,
687
+ backgroundColor: "rgba(0,0,0,0.8)",
688
+ display: "flex",
689
+ alignItems: "center",
690
+ justifyContent: "center",
691
+ zIndex: 1e3,
692
+ padding: 24
693
+ },
694
+ onClick: () => dispatch({ type: "SELECT_ASSET", asset: null }),
695
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
696
+ "div",
697
+ {
698
+ role: "presentation",
699
+ onClick: (e) => e.stopPropagation(),
700
+ style: {
701
+ width: "100%",
702
+ maxWidth: 900,
703
+ maxHeight: "90vh",
704
+ backgroundColor: theme.surfaceBackground,
705
+ borderRadius: 16,
706
+ overflow: "hidden",
707
+ display: "flex",
708
+ flexDirection: "column"
709
+ },
710
+ children: [
711
+ /* @__PURE__ */ jsxRuntime.jsxs(
712
+ "div",
713
+ {
714
+ style: {
715
+ display: "flex",
716
+ padding: 20,
717
+ backgroundColor: theme.headerBackground,
718
+ borderBottom: `1px solid ${theme.border}`
719
+ },
720
+ children: [
721
+ /* @__PURE__ */ jsxRuntime.jsx(
722
+ "div",
723
+ {
724
+ style: {
725
+ width: 200,
726
+ height: 112,
727
+ backgroundColor: "rgba(0,0,0,0.3)",
728
+ borderRadius: 8,
729
+ backgroundImage: `url(${asset.thumbnailUrl})`,
730
+ backgroundSize: "cover",
731
+ backgroundPosition: "center",
732
+ marginRight: 20,
733
+ flexShrink: 0
734
+ }
735
+ }
736
+ ),
737
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
738
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { style: { margin: 0, fontSize: 20, fontWeight: 600, color: theme.textPrimary }, children: asset.name }),
739
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { fontSize: 14, color: theme.textSecondary, marginTop: 4 }, children: [
740
+ "by ",
741
+ asset.publisher
742
+ ] }),
743
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 16, marginTop: 12 }, children: [
744
+ /* @__PURE__ */ jsxRuntime.jsx(RatingStars, { rating: asset.rating, count: asset.ratingCount }),
745
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 12, color: theme.textSecondary }, children: formatFileSize(asset.fileSize) }),
746
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontSize: 12, color: theme.textSecondary }, children: [
747
+ "Unity ",
748
+ asset.minUnityVersion,
749
+ "+"
750
+ ] })
751
+ ] }),
752
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexWrap: "wrap", gap: 6, marginTop: 12 }, children: [
753
+ asset.renderPipelines.map((rp) => /* @__PURE__ */ jsxRuntime.jsx(
754
+ "span",
755
+ {
756
+ style: {
757
+ padding: "2px 8px",
758
+ fontSize: 10,
759
+ backgroundColor: theme.accent,
760
+ borderRadius: 4,
761
+ color: "#fff",
762
+ textTransform: "uppercase"
763
+ },
764
+ children: rp
765
+ },
766
+ rp
767
+ )),
768
+ asset.tags.slice(0, 5).map((tag) => /* @__PURE__ */ jsxRuntime.jsx(
769
+ "span",
770
+ {
771
+ style: {
772
+ padding: "2px 8px",
773
+ fontSize: 10,
774
+ backgroundColor: "rgba(255,255,255,0.1)",
775
+ borderRadius: 4,
776
+ color: theme.textSecondary
777
+ },
778
+ children: tag
779
+ },
780
+ tag
781
+ ))
782
+ ] })
783
+ ] }),
784
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { textAlign: "right", marginLeft: 20 }, children: [
785
+ asset.originalPrice && /* @__PURE__ */ jsxRuntime.jsx(
786
+ "div",
787
+ {
788
+ style: { fontSize: 14, color: theme.textSecondary, textDecoration: "line-through" },
789
+ children: formatPrice(asset.originalPrice, asset.currency)
790
+ }
791
+ ),
792
+ /* @__PURE__ */ jsxRuntime.jsx(
793
+ "div",
794
+ {
795
+ style: {
796
+ fontSize: 28,
797
+ fontWeight: 700,
798
+ color: asset.isFree ? theme.freeBadge : theme.textPrimary
799
+ },
800
+ children: formatPrice(asset.price, asset.currency)
801
+ }
802
+ ),
803
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginTop: 12 }, children: [
804
+ asset.isOwned ? /* @__PURE__ */ jsxRuntime.jsx(
805
+ "button",
806
+ {
807
+ onClick: () => downloadAsset(asset.id),
808
+ disabled: isDownloading,
809
+ style: {
810
+ width: "100%",
811
+ padding: "12px 24px",
812
+ fontSize: 14,
813
+ fontWeight: 600,
814
+ backgroundColor: isDownloading ? theme.textSecondary : theme.success,
815
+ border: "none",
816
+ borderRadius: 8,
817
+ color: "#fff",
818
+ cursor: isDownloading ? "not-allowed" : "pointer"
819
+ },
820
+ children: isDownloading ? `Downloading ${downloadProgress}%` : "Download & Import"
821
+ }
822
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
823
+ "button",
824
+ {
825
+ onClick: () => isInCart ? dispatch({ type: "REMOVE_FROM_CART", id: asset.id }) : dispatch({ type: "ADD_TO_CART", id: asset.id }),
826
+ style: {
827
+ width: "100%",
828
+ padding: "12px 24px",
829
+ fontSize: 14,
830
+ fontWeight: 600,
831
+ backgroundColor: isInCart ? theme.warning : theme.accent,
832
+ border: "none",
833
+ borderRadius: 8,
834
+ color: "#fff",
835
+ cursor: "pointer"
836
+ },
837
+ children: isInCart ? "Remove from Cart" : "Add to Cart"
838
+ }
839
+ ),
840
+ /* @__PURE__ */ jsxRuntime.jsxs(
841
+ "button",
842
+ {
843
+ onClick: () => openInBrowser(asset),
844
+ style: {
845
+ width: "100%",
846
+ marginTop: 8,
847
+ padding: "10px 24px",
848
+ fontSize: 12,
849
+ backgroundColor: "transparent",
850
+ border: `1px solid ${theme.border}`,
851
+ borderRadius: 8,
852
+ color: theme.textSecondary,
853
+ cursor: "pointer"
854
+ },
855
+ children: [
856
+ /* @__PURE__ */ jsxRuntime.jsx(ui.NiceIcon, { name: "external-link", size: 14 }),
857
+ " View on Asset Store"
858
+ ]
859
+ }
860
+ )
861
+ ] })
862
+ ] }),
863
+ /* @__PURE__ */ jsxRuntime.jsx(
864
+ "button",
865
+ {
866
+ onClick: () => dispatch({ type: "SELECT_ASSET", asset: null }),
867
+ style: {
868
+ position: "absolute",
869
+ top: 16,
870
+ right: 16,
871
+ padding: 8,
872
+ fontSize: 18,
873
+ backgroundColor: "transparent",
874
+ border: "none",
875
+ color: theme.textSecondary,
876
+ cursor: "pointer"
877
+ },
878
+ children: /* @__PURE__ */ jsxRuntime.jsx(ui.NiceIcon, { name: "close", size: 14 })
879
+ }
880
+ )
881
+ ]
882
+ }
883
+ ),
884
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", borderBottom: `1px solid ${theme.border}` }, children: ["overview", "images", "reviews"].map((tab) => /* @__PURE__ */ jsxRuntime.jsx(
885
+ "button",
886
+ {
887
+ onClick: () => setActiveTab(tab),
888
+ style: {
889
+ flex: 1,
890
+ padding: "12px 16px",
891
+ fontSize: 13,
892
+ fontWeight: 500,
893
+ backgroundColor: "transparent",
894
+ border: "none",
895
+ borderBottom: activeTab === tab ? `2px solid ${theme.accent}` : "2px solid transparent",
896
+ color: activeTab === tab ? theme.textPrimary : theme.textSecondary,
897
+ cursor: "pointer",
898
+ textTransform: "capitalize"
899
+ },
900
+ children: tab
901
+ },
902
+ tab
903
+ )) }),
904
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: 1, overflow: "auto", padding: 20 }, children: [
905
+ activeTab === "overview" && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
906
+ /* @__PURE__ */ jsxRuntime.jsx(
907
+ "h3",
908
+ {
909
+ style: {
910
+ margin: "0 0 12px",
911
+ fontSize: 16,
912
+ fontWeight: 600,
913
+ color: theme.textPrimary
914
+ },
915
+ children: "Description"
916
+ }
917
+ ),
918
+ /* @__PURE__ */ jsxRuntime.jsx("p", { style: { margin: 0, fontSize: 14, lineHeight: 1.6, color: theme.textSecondary }, children: asset.description }),
919
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginTop: 24 }, children: [
920
+ /* @__PURE__ */ jsxRuntime.jsx(
921
+ "h3",
922
+ {
923
+ style: {
924
+ margin: "0 0 12px",
925
+ fontSize: 16,
926
+ fontWeight: 600,
927
+ color: theme.textPrimary
928
+ },
929
+ children: "Details"
930
+ }
931
+ ),
932
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 12 }, children: [
933
+ /* @__PURE__ */ jsxRuntime.jsxs(
934
+ "div",
935
+ {
936
+ style: { padding: 12, backgroundColor: theme.cardBackground, borderRadius: 8 },
937
+ children: [
938
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 11, color: theme.textSecondary }, children: "Version" }),
939
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 14, color: theme.textPrimary, fontWeight: 500 }, children: asset.version })
940
+ ]
941
+ }
942
+ ),
943
+ /* @__PURE__ */ jsxRuntime.jsxs(
944
+ "div",
945
+ {
946
+ style: { padding: 12, backgroundColor: theme.cardBackground, borderRadius: 8 },
947
+ children: [
948
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 11, color: theme.textSecondary }, children: "Last Updated" }),
949
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 14, color: theme.textPrimary, fontWeight: 500 }, children: asset.lastUpdated })
950
+ ]
951
+ }
952
+ ),
953
+ /* @__PURE__ */ jsxRuntime.jsxs(
954
+ "div",
955
+ {
956
+ style: { padding: 12, backgroundColor: theme.cardBackground, borderRadius: 8 },
957
+ children: [
958
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 11, color: theme.textSecondary }, children: "Min Unity Version" }),
959
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 14, color: theme.textPrimary, fontWeight: 500 }, children: asset.minUnityVersion })
960
+ ]
961
+ }
962
+ ),
963
+ /* @__PURE__ */ jsxRuntime.jsxs(
964
+ "div",
965
+ {
966
+ style: { padding: 12, backgroundColor: theme.cardBackground, borderRadius: 8 },
967
+ children: [
968
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 11, color: theme.textSecondary }, children: "File Size" }),
969
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 14, color: theme.textPrimary, fontWeight: 500 }, children: formatFileSize(asset.fileSize) })
970
+ ]
971
+ }
972
+ )
973
+ ] })
974
+ ] })
975
+ ] }),
976
+ activeTab === "images" && /* @__PURE__ */ jsxRuntime.jsxs(
977
+ "div",
978
+ {
979
+ style: {
980
+ display: "grid",
981
+ gridTemplateColumns: "repeat(auto-fill, minmax(200px, 1fr))",
982
+ gap: 12
983
+ },
984
+ children: [
985
+ asset.previewImages.map((url, i) => /* @__PURE__ */ jsxRuntime.jsx(
986
+ "div",
987
+ {
988
+ style: {
989
+ paddingTop: "56.25%",
990
+ backgroundColor: "rgba(0,0,0,0.3)",
991
+ borderRadius: 8,
992
+ backgroundImage: `url(${url})`,
993
+ backgroundSize: "cover",
994
+ backgroundPosition: "center"
995
+ }
996
+ },
997
+ i
998
+ )),
999
+ asset.previewImages.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: theme.textSecondary }, children: "No preview images available" })
1000
+ ]
1001
+ }
1002
+ ),
1003
+ activeTab === "reviews" && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: theme.textSecondary }, children: "Reviews would be loaded from the Asset Store API" })
1004
+ ] })
1005
+ ]
1006
+ }
1007
+ )
412
1008
  }
413
- const asset = state.selectedAsset;
414
- const isInCart = state.cart.has(asset.id);
415
- const isDownloading = state.downloading.has(asset.id);
416
- const downloadProgress = state.downloading.get(asset.id) ?? 0;
417
- return (jsxRuntime.jsx("div", { role: "presentation", style: {
418
- position: 'fixed',
419
- top: 0,
420
- left: 0,
421
- right: 0,
422
- bottom: 0,
423
- backgroundColor: 'rgba(0,0,0,0.8)',
424
- display: 'flex',
425
- alignItems: 'center',
426
- justifyContent: 'center',
427
- zIndex: 1000,
428
- padding: 24,
429
- }, onClick: () => dispatch({ type: 'SELECT_ASSET', asset: null }), children: jsxRuntime.jsxs("div", { role: "presentation", onClick: (e) => e.stopPropagation(), style: {
430
- width: '100%',
431
- maxWidth: 900,
432
- maxHeight: '90vh',
433
- backgroundColor: theme.surfaceBackground,
434
- borderRadius: 16,
435
- overflow: 'hidden',
436
- display: 'flex',
437
- flexDirection: 'column',
438
- }, children: [jsxRuntime.jsxs("div", { style: {
439
- display: 'flex',
440
- padding: 20,
441
- backgroundColor: theme.headerBackground,
442
- borderBottom: `1px solid ${theme.border}`,
443
- }, children: [jsxRuntime.jsx("div", { style: {
444
- width: 200,
445
- height: 112,
446
- backgroundColor: 'rgba(0,0,0,0.3)',
447
- borderRadius: 8,
448
- backgroundImage: `url(${asset.thumbnailUrl})`,
449
- backgroundSize: 'cover',
450
- backgroundPosition: 'center',
451
- marginRight: 20,
452
- flexShrink: 0,
453
- } }), jsxRuntime.jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [jsxRuntime.jsx("h2", { style: { margin: 0, fontSize: 20, fontWeight: 600, color: theme.textPrimary }, children: asset.name }), jsxRuntime.jsxs("div", { style: { fontSize: 14, color: theme.textSecondary, marginTop: 4 }, children: ["by ", asset.publisher] }), jsxRuntime.jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 16, marginTop: 12 }, children: [jsxRuntime.jsx(RatingStars, { rating: asset.rating, count: asset.ratingCount }), jsxRuntime.jsx("span", { style: { fontSize: 12, color: theme.textSecondary }, children: formatFileSize(asset.fileSize) }), jsxRuntime.jsxs("span", { style: { fontSize: 12, color: theme.textSecondary }, children: ["Unity ", asset.minUnityVersion, "+"] })] }), jsxRuntime.jsxs("div", { style: { display: 'flex', flexWrap: 'wrap', gap: 6, marginTop: 12 }, children: [asset.renderPipelines.map((rp) => (jsxRuntime.jsx("span", { style: {
454
- padding: '2px 8px',
455
- fontSize: 10,
456
- backgroundColor: theme.accent,
457
- borderRadius: 4,
458
- color: '#fff',
459
- textTransform: 'uppercase',
460
- }, children: rp }, rp))), asset.tags.slice(0, 5).map((tag) => (jsxRuntime.jsx("span", { style: {
461
- padding: '2px 8px',
462
- fontSize: 10,
463
- backgroundColor: 'rgba(255,255,255,0.1)',
464
- borderRadius: 4,
465
- color: theme.textSecondary,
466
- }, children: tag }, tag)))] })] }), jsxRuntime.jsxs("div", { style: { textAlign: 'right', marginLeft: 20 }, children: [asset.originalPrice && (jsxRuntime.jsx("div", { style: { fontSize: 14, color: theme.textSecondary, textDecoration: 'line-through' }, children: formatPrice(asset.originalPrice, asset.currency) })), jsxRuntime.jsx("div", { style: {
467
- fontSize: 28,
468
- fontWeight: 700,
469
- color: asset.isFree ? theme.freeBadge : theme.textPrimary,
470
- }, children: formatPrice(asset.price, asset.currency) }), jsxRuntime.jsxs("div", { style: { marginTop: 12 }, children: [asset.isOwned ? (jsxRuntime.jsx("button", { onClick: () => downloadAsset(asset.id), disabled: isDownloading, style: {
471
- width: '100%',
472
- padding: '12px 24px',
473
- fontSize: 14,
474
- fontWeight: 600,
475
- backgroundColor: isDownloading ? theme.textSecondary : theme.success,
476
- border: 'none',
477
- borderRadius: 8,
478
- color: '#fff',
479
- cursor: isDownloading ? 'not-allowed' : 'pointer',
480
- }, children: isDownloading ? `Downloading ${downloadProgress}%` : 'Download & Import' })) : (jsxRuntime.jsx("button", { onClick: () => isInCart
481
- ? dispatch({ type: 'REMOVE_FROM_CART', id: asset.id })
482
- : dispatch({ type: 'ADD_TO_CART', id: asset.id }), style: {
483
- width: '100%',
484
- padding: '12px 24px',
485
- fontSize: 14,
486
- fontWeight: 600,
487
- backgroundColor: isInCart ? theme.warning : theme.accent,
488
- border: 'none',
489
- borderRadius: 8,
490
- color: '#fff',
491
- cursor: 'pointer',
492
- }, children: isInCart ? 'Remove from Cart' : 'Add to Cart' })), jsxRuntime.jsxs("button", { onClick: () => openInBrowser(asset), style: {
493
- width: '100%',
494
- marginTop: 8,
495
- padding: '10px 24px',
496
- fontSize: 12,
497
- backgroundColor: 'transparent',
498
- border: `1px solid ${theme.border}`,
499
- borderRadius: 8,
500
- color: theme.textSecondary,
501
- cursor: 'pointer',
502
- }, children: [jsxRuntime.jsx(ui.NiceIcon, { name: "external-link", size: 14 }), " View on Asset Store"] })] })] }), jsxRuntime.jsx("button", { onClick: () => dispatch({ type: 'SELECT_ASSET', asset: null }), style: {
503
- position: 'absolute',
504
- top: 16,
505
- right: 16,
506
- padding: 8,
507
- fontSize: 18,
508
- backgroundColor: 'transparent',
509
- border: 'none',
510
- color: theme.textSecondary,
511
- cursor: 'pointer',
512
- }, children: jsxRuntime.jsx(ui.NiceIcon, { name: "close", size: 14 }) })] }), jsxRuntime.jsx("div", { style: { display: 'flex', borderBottom: `1px solid ${theme.border}` }, children: ['overview', 'images', 'reviews'].map((tab) => (jsxRuntime.jsx("button", { onClick: () => setActiveTab(tab), style: {
513
- flex: 1,
514
- padding: '12px 16px',
515
- fontSize: 13,
516
- fontWeight: 500,
517
- backgroundColor: 'transparent',
518
- border: 'none',
519
- borderBottom: activeTab === tab ? `2px solid ${theme.accent}` : '2px solid transparent',
520
- color: activeTab === tab ? theme.textPrimary : theme.textSecondary,
521
- cursor: 'pointer',
522
- textTransform: 'capitalize',
523
- }, children: tab }, tab))) }), jsxRuntime.jsxs("div", { style: { flex: 1, overflow: 'auto', padding: 20 }, children: [activeTab === 'overview' && (jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("h3", { style: {
524
- margin: '0 0 12px',
525
- fontSize: 16,
526
- fontWeight: 600,
527
- color: theme.textPrimary,
528
- }, children: "Description" }), jsxRuntime.jsx("p", { style: { margin: 0, fontSize: 14, lineHeight: 1.6, color: theme.textSecondary }, children: asset.description }), jsxRuntime.jsxs("div", { style: { marginTop: 24 }, children: [jsxRuntime.jsx("h3", { style: {
529
- margin: '0 0 12px',
530
- fontSize: 16,
531
- fontWeight: 600,
532
- color: theme.textPrimary,
533
- }, children: "Details" }), jsxRuntime.jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 12 }, children: [jsxRuntime.jsxs("div", { style: { padding: 12, backgroundColor: theme.cardBackground, borderRadius: 8 }, children: [jsxRuntime.jsx("div", { style: { fontSize: 11, color: theme.textSecondary }, children: "Version" }), jsxRuntime.jsx("div", { style: { fontSize: 14, color: theme.textPrimary, fontWeight: 500 }, children: asset.version })] }), jsxRuntime.jsxs("div", { style: { padding: 12, backgroundColor: theme.cardBackground, borderRadius: 8 }, children: [jsxRuntime.jsx("div", { style: { fontSize: 11, color: theme.textSecondary }, children: "Last Updated" }), jsxRuntime.jsx("div", { style: { fontSize: 14, color: theme.textPrimary, fontWeight: 500 }, children: asset.lastUpdated })] }), jsxRuntime.jsxs("div", { style: { padding: 12, backgroundColor: theme.cardBackground, borderRadius: 8 }, children: [jsxRuntime.jsx("div", { style: { fontSize: 11, color: theme.textSecondary }, children: "Min Unity Version" }), jsxRuntime.jsx("div", { style: { fontSize: 14, color: theme.textPrimary, fontWeight: 500 }, children: asset.minUnityVersion })] }), jsxRuntime.jsxs("div", { style: { padding: 12, backgroundColor: theme.cardBackground, borderRadius: 8 }, children: [jsxRuntime.jsx("div", { style: { fontSize: 11, color: theme.textSecondary }, children: "File Size" }), jsxRuntime.jsx("div", { style: { fontSize: 14, color: theme.textPrimary, fontWeight: 500 }, children: formatFileSize(asset.fileSize) })] })] })] })] })), activeTab === 'images' && (jsxRuntime.jsxs("div", { style: {
534
- display: 'grid',
535
- gridTemplateColumns: 'repeat(auto-fill, minmax(200px, 1fr))',
536
- gap: 12,
537
- }, children: [asset.previewImages.map((url, i) => (jsxRuntime.jsx("div", { style: {
538
- paddingTop: '56.25%',
539
- backgroundColor: 'rgba(0,0,0,0.3)',
540
- borderRadius: 8,
541
- backgroundImage: `url(${url})`,
542
- backgroundSize: 'cover',
543
- backgroundPosition: 'center',
544
- } }, i))), asset.previewImages.length === 0 && (jsxRuntime.jsx("div", { style: { color: theme.textSecondary }, children: "No preview images available" }))] })), activeTab === 'reviews' && (jsxRuntime.jsx("div", { style: { color: theme.textSecondary }, children: "Reviews would be loaded from the Asset Store API" }))] })] }) }));
1009
+ );
545
1010
  };
546
- // Demo assets
547
1011
  const DEMO_ASSETS = [
548
- {
549
- id: '1',
550
- name: 'Polygon Fantasy Kingdom',
551
- publisher: 'Synty Studios',
552
- publisherId: 'synty',
553
- category: '3d',
554
- shortDescription: 'Low poly fantasy modular asset pack',
555
- description: 'A massive library of low-poly 3D assets perfect for creating fantasy worlds. Includes buildings, characters, props, weapons, and more.',
556
- price: 99.99,
557
- currency: 'USD',
558
- isFree: false,
559
- rating: 4.8,
560
- ratingCount: 2840,
561
- thumbnailUrl: '',
562
- previewImages: [],
563
- unityVersions: ['2020.3', '2021.3', '2022.3'],
564
- minUnityVersion: '2020.3',
565
- fileSize: 456000000,
566
- lastUpdated: '2024-01-10',
567
- version: '2.5.0',
568
- tags: ['lowpoly', 'fantasy', 'medieval', 'modular'],
569
- isOwned: false,
570
- renderPipelines: ['builtin', 'urp', 'hdrp'],
571
- url: 'https://assetstore.unity.com/',
572
- },
573
- {
574
- id: '2',
575
- name: 'DOTween Pro',
576
- publisher: 'Demigiant',
577
- publisherId: 'demigiant',
578
- category: 'tools',
579
- shortDescription: 'High-performance animation engine',
580
- description: 'DOTween is a fast, efficient, fully type-safe object-oriented animation engine for Unity, optimized for C# users.',
581
- price: 15.0,
582
- originalPrice: 20.0,
583
- currency: 'USD',
584
- isFree: false,
585
- rating: 5.0,
586
- ratingCount: 5621,
587
- thumbnailUrl: '',
588
- previewImages: [],
589
- unityVersions: ['2019.4', '2020.3', '2021.3', '2022.3'],
590
- minUnityVersion: '2019.4',
591
- fileSize: 1200000,
592
- lastUpdated: '2023-12-15',
593
- version: '1.0.375',
594
- tags: ['animation', 'tween', 'performance'],
595
- isOwned: true,
596
- renderPipelines: ['builtin', 'urp', 'hdrp'],
597
- url: 'https://assetstore.unity.com/',
598
- },
599
- {
600
- id: '3',
601
- name: 'Ultimate Character Controller',
602
- publisher: 'Opsive',
603
- publisherId: 'opsive',
604
- category: 'tools',
605
- shortDescription: 'Professional character controller',
606
- description: 'The Ultimate Character Controller is a professional, kinematic character controller designed to include the smoothest first and third person controls.',
607
- price: 75.0,
608
- currency: 'USD',
609
- isFree: false,
610
- rating: 4.7,
611
- ratingCount: 892,
612
- thumbnailUrl: '',
613
- previewImages: [],
614
- unityVersions: ['2020.3', '2021.3', '2022.3'],
615
- minUnityVersion: '2020.3',
616
- fileSize: 89000000,
617
- lastUpdated: '2024-01-05',
618
- version: '3.1.2',
619
- tags: ['character', 'controller', 'fps', 'tps'],
620
- isOwned: false,
621
- renderPipelines: ['builtin', 'urp'],
622
- url: 'https://assetstore.unity.com/',
623
- },
624
- {
625
- id: '4',
626
- name: 'AllSky - Free',
627
- publisher: 'rpgwhitelock',
628
- publisherId: 'rpgwhitelock',
629
- category: '2d',
630
- shortDescription: 'Free skybox pack',
631
- description: '10 free skyboxes in various styles. Perfect for prototyping or small projects.',
632
- price: 0,
633
- currency: 'USD',
634
- isFree: true,
635
- rating: 4.9,
636
- ratingCount: 3200,
637
- thumbnailUrl: '',
638
- previewImages: [],
639
- unityVersions: ['2019.4', '2020.3', '2021.3', '2022.3'],
640
- minUnityVersion: '2019.4',
641
- fileSize: 45000000,
642
- lastUpdated: '2023-06-20',
643
- version: '1.2.0',
644
- tags: ['skybox', 'environment', 'free'],
645
- isOwned: true,
646
- renderPipelines: ['builtin', 'urp', 'hdrp'],
647
- url: 'https://assetstore.unity.com/',
648
- },
649
- {
650
- id: '5',
651
- name: 'Magic Effects FREE',
652
- publisher: 'Hovl Studio',
653
- publisherId: 'hovl',
654
- category: 'vfx',
655
- shortDescription: 'Free VFX magic effects',
656
- description: 'A free pack of 20 magic spell effects with particles, trails, and meshes.',
657
- price: 0,
658
- currency: 'USD',
659
- isFree: true,
660
- rating: 4.8,
661
- ratingCount: 1560,
662
- thumbnailUrl: '',
663
- previewImages: [],
664
- unityVersions: ['2019.4', '2020.3', '2021.3', '2022.3'],
665
- minUnityVersion: '2019.4',
666
- fileSize: 78000000,
667
- lastUpdated: '2023-09-12',
668
- version: '1.5.0',
669
- tags: ['vfx', 'particles', 'magic', 'free'],
670
- isOwned: false,
671
- renderPipelines: ['builtin', 'urp'],
672
- url: 'https://assetstore.unity.com/',
673
- },
674
- {
675
- id: '6',
676
- name: 'Odin Inspector',
677
- publisher: 'Sirenix',
678
- publisherId: 'sirenix',
679
- category: 'tools',
680
- shortDescription: 'Powerful Unity inspector',
681
- description: 'Odin puts a complete inspector replacement, custom attribute system, and serialization suite at your fingertips.',
682
- price: 55.0,
683
- currency: 'USD',
684
- isFree: false,
685
- rating: 5.0,
686
- ratingCount: 4100,
687
- thumbnailUrl: '',
688
- previewImages: [],
689
- unityVersions: ['2019.4', '2020.3', '2021.3', '2022.3'],
690
- minUnityVersion: '2019.4',
691
- fileSize: 35000000,
692
- lastUpdated: '2024-01-12',
693
- version: '3.2.1',
694
- tags: ['inspector', 'serialization', 'editor', 'attributes'],
695
- isOwned: false,
696
- renderPipelines: ['builtin', 'urp', 'hdrp'],
697
- url: 'https://assetstore.unity.com/',
698
- },
1012
+ {
1013
+ id: "1",
1014
+ name: "Polygon Fantasy Kingdom",
1015
+ publisher: "Synty Studios",
1016
+ publisherId: "synty",
1017
+ category: "3d",
1018
+ shortDescription: "Low poly fantasy modular asset pack",
1019
+ description: "A massive library of low-poly 3D assets perfect for creating fantasy worlds. Includes buildings, characters, props, weapons, and more.",
1020
+ price: 99.99,
1021
+ currency: "USD",
1022
+ isFree: false,
1023
+ rating: 4.8,
1024
+ ratingCount: 2840,
1025
+ thumbnailUrl: "",
1026
+ previewImages: [],
1027
+ unityVersions: ["2020.3", "2021.3", "2022.3"],
1028
+ minUnityVersion: "2020.3",
1029
+ fileSize: 456e6,
1030
+ lastUpdated: "2024-01-10",
1031
+ version: "2.5.0",
1032
+ tags: ["lowpoly", "fantasy", "medieval", "modular"],
1033
+ isOwned: false,
1034
+ renderPipelines: ["builtin", "urp", "hdrp"],
1035
+ url: "https://assetstore.unity.com/"
1036
+ },
1037
+ {
1038
+ id: "2",
1039
+ name: "DOTween Pro",
1040
+ publisher: "Demigiant",
1041
+ publisherId: "demigiant",
1042
+ category: "tools",
1043
+ shortDescription: "High-performance animation engine",
1044
+ description: "DOTween is a fast, efficient, fully type-safe object-oriented animation engine for Unity, optimized for C# users.",
1045
+ price: 15,
1046
+ originalPrice: 20,
1047
+ currency: "USD",
1048
+ isFree: false,
1049
+ rating: 5,
1050
+ ratingCount: 5621,
1051
+ thumbnailUrl: "",
1052
+ previewImages: [],
1053
+ unityVersions: ["2019.4", "2020.3", "2021.3", "2022.3"],
1054
+ minUnityVersion: "2019.4",
1055
+ fileSize: 12e5,
1056
+ lastUpdated: "2023-12-15",
1057
+ version: "1.0.375",
1058
+ tags: ["animation", "tween", "performance"],
1059
+ isOwned: true,
1060
+ renderPipelines: ["builtin", "urp", "hdrp"],
1061
+ url: "https://assetstore.unity.com/"
1062
+ },
1063
+ {
1064
+ id: "3",
1065
+ name: "Ultimate Character Controller",
1066
+ publisher: "Opsive",
1067
+ publisherId: "opsive",
1068
+ category: "tools",
1069
+ shortDescription: "Professional character controller",
1070
+ description: "The Ultimate Character Controller is a professional, kinematic character controller designed to include the smoothest first and third person controls.",
1071
+ price: 75,
1072
+ currency: "USD",
1073
+ isFree: false,
1074
+ rating: 4.7,
1075
+ ratingCount: 892,
1076
+ thumbnailUrl: "",
1077
+ previewImages: [],
1078
+ unityVersions: ["2020.3", "2021.3", "2022.3"],
1079
+ minUnityVersion: "2020.3",
1080
+ fileSize: 89e6,
1081
+ lastUpdated: "2024-01-05",
1082
+ version: "3.1.2",
1083
+ tags: ["character", "controller", "fps", "tps"],
1084
+ isOwned: false,
1085
+ renderPipelines: ["builtin", "urp"],
1086
+ url: "https://assetstore.unity.com/"
1087
+ },
1088
+ {
1089
+ id: "4",
1090
+ name: "AllSky - Free",
1091
+ publisher: "rpgwhitelock",
1092
+ publisherId: "rpgwhitelock",
1093
+ category: "2d",
1094
+ shortDescription: "Free skybox pack",
1095
+ description: "10 free skyboxes in various styles. Perfect for prototyping or small projects.",
1096
+ price: 0,
1097
+ currency: "USD",
1098
+ isFree: true,
1099
+ rating: 4.9,
1100
+ ratingCount: 3200,
1101
+ thumbnailUrl: "",
1102
+ previewImages: [],
1103
+ unityVersions: ["2019.4", "2020.3", "2021.3", "2022.3"],
1104
+ minUnityVersion: "2019.4",
1105
+ fileSize: 45e6,
1106
+ lastUpdated: "2023-06-20",
1107
+ version: "1.2.0",
1108
+ tags: ["skybox", "environment", "free"],
1109
+ isOwned: true,
1110
+ renderPipelines: ["builtin", "urp", "hdrp"],
1111
+ url: "https://assetstore.unity.com/"
1112
+ },
1113
+ {
1114
+ id: "5",
1115
+ name: "Magic Effects FREE",
1116
+ publisher: "Hovl Studio",
1117
+ publisherId: "hovl",
1118
+ category: "vfx",
1119
+ shortDescription: "Free VFX magic effects",
1120
+ description: "A free pack of 20 magic spell effects with particles, trails, and meshes.",
1121
+ price: 0,
1122
+ currency: "USD",
1123
+ isFree: true,
1124
+ rating: 4.8,
1125
+ ratingCount: 1560,
1126
+ thumbnailUrl: "",
1127
+ previewImages: [],
1128
+ unityVersions: ["2019.4", "2020.3", "2021.3", "2022.3"],
1129
+ minUnityVersion: "2019.4",
1130
+ fileSize: 78e6,
1131
+ lastUpdated: "2023-09-12",
1132
+ version: "1.5.0",
1133
+ tags: ["vfx", "particles", "magic", "free"],
1134
+ isOwned: false,
1135
+ renderPipelines: ["builtin", "urp"],
1136
+ url: "https://assetstore.unity.com/"
1137
+ },
1138
+ {
1139
+ id: "6",
1140
+ name: "Odin Inspector",
1141
+ publisher: "Sirenix",
1142
+ publisherId: "sirenix",
1143
+ category: "tools",
1144
+ shortDescription: "Powerful Unity inspector",
1145
+ description: "Odin puts a complete inspector replacement, custom attribute system, and serialization suite at your fingertips.",
1146
+ price: 55,
1147
+ currency: "USD",
1148
+ isFree: false,
1149
+ rating: 5,
1150
+ ratingCount: 4100,
1151
+ thumbnailUrl: "",
1152
+ previewImages: [],
1153
+ unityVersions: ["2019.4", "2020.3", "2021.3", "2022.3"],
1154
+ minUnityVersion: "2019.4",
1155
+ fileSize: 35e6,
1156
+ lastUpdated: "2024-01-12",
1157
+ version: "3.2.1",
1158
+ tags: ["inspector", "serialization", "editor", "attributes"],
1159
+ isOwned: false,
1160
+ renderPipelines: ["builtin", "urp", "hdrp"],
1161
+ url: "https://assetstore.unity.com/"
1162
+ }
699
1163
  ];
700
1164
  const UnityAssetStoreBrowser = /* @__PURE__ */ Object.assign(
701
- /* @__PURE__ */ React.forwardRef(({ theme: themeOverride, onDownload, onPurchase: _onPurchase, className, style }, ref) => {
702
- const [state, dispatch] = React.useReducer(storeReducer, {
1165
+ /* @__PURE__ */ React.forwardRef(
1166
+ ({ theme: themeOverride, onDownload, onPurchase: _onPurchase, className, style }, ref) => {
1167
+ const [state, dispatch] = React.useReducer(storeReducer, {
703
1168
  ...INITIAL_STATE,
704
1169
  results: DEMO_ASSETS,
705
- totalResults: DEMO_ASSETS.length,
706
- });
707
- const theme = React.useMemo(() => ({ ...DEFAULT_THEME, ...themeOverride }), [themeOverride]);
708
- // Search
709
- const search = React.useCallback(async () => {
710
- dispatch({ type: 'SET_LOADING', loading: true });
711
- dispatch({ type: 'SET_ERROR', error: null });
1170
+ totalResults: DEMO_ASSETS.length
1171
+ });
1172
+ const theme = React.useMemo(() => ({ ...DEFAULT_THEME, ...themeOverride }), [themeOverride]);
1173
+ const search = React.useCallback(async () => {
1174
+ dispatch({ type: "SET_LOADING", loading: true });
1175
+ dispatch({ type: "SET_ERROR", error: null });
712
1176
  try {
713
- // Simulate API call
714
- await new Promise((resolve) => setTimeout(resolve, 500));
715
- // Filter demo assets
716
- let filtered = [...DEMO_ASSETS];
717
- if (state.query.query) {
718
- const q = state.query.query.toLowerCase();
719
- filtered = filtered.filter((a) => a.name.toLowerCase().includes(q) ||
720
- a.publisher.toLowerCase().includes(q) ||
721
- a.tags.some((t) => t.toLowerCase().includes(q)));
722
- }
723
- if (state.query.category !== 'all') {
724
- filtered = filtered.filter((a) => a.category === state.query.category);
725
- }
726
- if (state.query.pricing === 'free') {
727
- filtered = filtered.filter((a) => a.isFree);
728
- }
729
- else if (state.query.pricing === 'paid') {
730
- filtered = filtered.filter((a) => !a.isFree);
731
- }
732
- else if (state.query.pricing === 'sale') {
733
- filtered = filtered.filter((a) => a.originalPrice !== undefined);
734
- }
735
- if (state.myAssets) {
736
- filtered = filtered.filter((a) => a.isOwned);
737
- }
738
- dispatch({ type: 'SET_RESULTS', results: filtered, total: filtered.length });
1177
+ await new Promise((resolve) => setTimeout(resolve, 500));
1178
+ let filtered = [...DEMO_ASSETS];
1179
+ if (state.query.query) {
1180
+ const q = state.query.query.toLowerCase();
1181
+ filtered = filtered.filter(
1182
+ (a) => a.name.toLowerCase().includes(q) || a.publisher.toLowerCase().includes(q) || a.tags.some((t) => t.toLowerCase().includes(q))
1183
+ );
1184
+ }
1185
+ if (state.query.category !== "all") {
1186
+ filtered = filtered.filter((a) => a.category === state.query.category);
1187
+ }
1188
+ if (state.query.pricing === "free") {
1189
+ filtered = filtered.filter((a) => a.isFree);
1190
+ } else if (state.query.pricing === "paid") {
1191
+ filtered = filtered.filter((a) => !a.isFree);
1192
+ } else if (state.query.pricing === "sale") {
1193
+ filtered = filtered.filter((a) => a.originalPrice !== void 0);
1194
+ }
1195
+ if (state.myAssets) {
1196
+ filtered = filtered.filter((a) => a.isOwned);
1197
+ }
1198
+ dispatch({ type: "SET_RESULTS", results: filtered, total: filtered.length });
1199
+ } catch (error) {
1200
+ dispatch({ type: "SET_ERROR", error: String(error) });
1201
+ } finally {
1202
+ dispatch({ type: "SET_LOADING", loading: false });
739
1203
  }
740
- catch (error) {
741
- dispatch({ type: 'SET_ERROR', error: String(error) });
742
- }
743
- finally {
744
- dispatch({ type: 'SET_LOADING', loading: false });
745
- }
746
- }, [state.query, state.myAssets]);
747
- // Download asset
748
- const downloadAsset = React.useCallback(async (id) => {
749
- dispatch({ type: 'SET_DOWNLOAD_PROGRESS', id, progress: 0 });
750
- try {
751
- // Simulate download
1204
+ }, [state.query, state.myAssets]);
1205
+ const downloadAsset = React.useCallback(
1206
+ async (id) => {
1207
+ dispatch({ type: "SET_DOWNLOAD_PROGRESS", id, progress: 0 });
1208
+ try {
752
1209
  for (let i = 1; i <= 10; i++) {
753
- await new Promise((resolve) => setTimeout(resolve, 200));
754
- dispatch({ type: 'SET_DOWNLOAD_PROGRESS', id, progress: i * 10 });
1210
+ await new Promise((resolve) => setTimeout(resolve, 200));
1211
+ dispatch({ type: "SET_DOWNLOAD_PROGRESS", id, progress: i * 10 });
755
1212
  }
756
1213
  if (onDownload) {
757
- await onDownload(id);
1214
+ await onDownload(id);
758
1215
  }
759
- }
760
- finally {
761
- dispatch({ type: 'CLEAR_DOWNLOAD', id });
762
- }
763
- }, [onDownload]);
764
- // Open in browser
765
- const openInBrowser = React.useCallback((asset) => {
766
- window.open(asset.url, '_blank');
767
- }, []);
768
- // Imperative handle
769
- React.useImperativeHandle(ref, () => ({
770
- search: async (query) => {
771
- if (query !== undefined) {
772
- dispatch({ type: 'SET_QUERY', query: { query } });
1216
+ } finally {
1217
+ dispatch({ type: "CLEAR_DOWNLOAD", id });
1218
+ }
1219
+ },
1220
+ [onDownload]
1221
+ );
1222
+ const openInBrowser = React.useCallback((asset) => {
1223
+ window.open(asset.url, "_blank");
1224
+ }, []);
1225
+ React.useImperativeHandle(
1226
+ ref,
1227
+ () => ({
1228
+ search: async (query) => {
1229
+ if (query !== void 0) {
1230
+ dispatch({ type: "SET_QUERY", query: { query } });
773
1231
  }
774
1232
  await search();
775
- },
776
- getCart: () => [...state.cart],
777
- clearCart: () => dispatch({ type: 'CLEAR_CART' }),
778
- }), [search, state.cart]);
779
- const ctxValue = React.useMemo(() => ({
780
- state,
781
- dispatch,
782
- theme,
783
- search,
784
- downloadAsset,
785
- openInBrowser,
786
- }), [state, theme, search, downloadAsset, openInBrowser]);
787
- return (jsxRuntime.jsx(StoreContext.Provider, { value: ctxValue, children: jsxRuntime.jsxs("div", { className: `unity-asset-store-browser ${className ?? ''}`, style: {
788
- display: 'flex',
789
- flexDirection: 'column',
790
- width: '100%',
791
- height: '100%',
792
- backgroundColor: theme.background,
793
- fontFamily: 'system-ui, sans-serif',
794
- overflow: 'hidden',
795
- ...style,
796
- }, children: [jsxRuntime.jsx(SearchHeader, {}), jsxRuntime.jsx("div", { style: { flex: 1, overflow: 'auto' }, children: jsxRuntime.jsx(AssetGrid, {}) }), jsxRuntime.jsx(AssetDetailModal, {})] }) }));
797
- }), { displayName: 'UnityAssetStoreBrowser' });
798
-
1233
+ },
1234
+ getCart: () => [...state.cart],
1235
+ clearCart: () => dispatch({ type: "CLEAR_CART" })
1236
+ }),
1237
+ [search, state.cart]
1238
+ );
1239
+ const ctxValue = React.useMemo(
1240
+ () => ({
1241
+ state,
1242
+ dispatch,
1243
+ theme,
1244
+ search,
1245
+ downloadAsset,
1246
+ openInBrowser
1247
+ }),
1248
+ [state, theme, search, downloadAsset, openInBrowser]
1249
+ );
1250
+ return /* @__PURE__ */ jsxRuntime.jsx(StoreContext.Provider, { value: ctxValue, children: /* @__PURE__ */ jsxRuntime.jsxs(
1251
+ "div",
1252
+ {
1253
+ className: `unity-asset-store-browser ${className ?? ""}`,
1254
+ style: {
1255
+ display: "flex",
1256
+ flexDirection: "column",
1257
+ width: "100%",
1258
+ height: "100%",
1259
+ backgroundColor: theme.background,
1260
+ fontFamily: "system-ui, sans-serif",
1261
+ overflow: "hidden",
1262
+ ...style
1263
+ },
1264
+ children: [
1265
+ /* @__PURE__ */ jsxRuntime.jsx(SearchHeader, {}),
1266
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 1, overflow: "auto" }, children: /* @__PURE__ */ jsxRuntime.jsx(AssetGrid, {}) }),
1267
+ /* @__PURE__ */ jsxRuntime.jsx(AssetDetailModal, {})
1268
+ ]
1269
+ }
1270
+ ) });
1271
+ }
1272
+ ),
1273
+ { displayName: "UnityAssetStoreBrowser" }
1274
+ );
799
1275
  exports.UnityAssetStoreBrowser = UnityAssetStoreBrowser;