cluaupp 1.0.0 → 1.4.0

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 (962) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/README.md +28 -16
  3. package/editors/vscode/extension.js +8 -31
  4. package/editors/vscode/package.json +2 -2
  5. package/examples/README.md +5 -6
  6. package/examples/game/.vscode/extensions.json +2 -1
  7. package/examples/game/default.project.json +16 -11
  8. package/examples/game/include/clpp/datatypes.clh +611 -0
  9. package/examples/game/include/clpp/generated/enums.clh +4920 -0
  10. package/examples/game/include/clpp/generated/instances.clh +87111 -0
  11. package/examples/game/include/clpp/libs/arrayindexer.clh +12 -0
  12. package/examples/game/include/clpp/libs/axiom.clh +154 -0
  13. package/examples/game/include/clpp/libs/bloom.clh +58 -0
  14. package/examples/game/include/clpp/libs/coil.clh +37 -0
  15. package/examples/game/include/clpp/libs/crest.clh +22 -0
  16. package/examples/game/include/clpp/libs/echo.clh +52 -0
  17. package/examples/game/include/clpp/libs/ember.clh +17 -0
  18. package/examples/game/include/clpp/libs/flare.clh +65 -0
  19. package/examples/game/include/clpp/libs/gleam.clh +111 -0
  20. package/examples/game/include/clpp/libs/guide.clh +42 -0
  21. package/examples/game/include/clpp/libs/helm.clh +31 -0
  22. package/examples/game/include/clpp/libs/hive.clh +20 -0
  23. package/examples/game/include/clpp/libs/keep.clh +158 -0
  24. package/examples/game/include/clpp/libs/lens.clh +24 -0
  25. package/examples/game/include/clpp/libs/mint.clh +28 -0
  26. package/examples/game/include/clpp/libs/net.clh +31 -0
  27. package/examples/game/include/clpp/libs/occlude.clh +15 -0
  28. package/examples/game/include/clpp/libs/pin.clh +28 -0
  29. package/examples/game/include/clpp/libs/promise.clh +24 -0
  30. package/examples/game/include/clpp/libs/roster.clh +117 -0
  31. package/examples/game/include/clpp/libs/shift.clh +22 -0
  32. package/examples/game/include/clpp/libs/spark.clh +28 -0
  33. package/examples/game/include/clpp/libs/stage.clh +23 -0
  34. package/examples/game/include/clpp/libs/sweep.clh +23 -0
  35. package/examples/game/include/clpp/libs/trace.clh +18 -0
  36. package/examples/game/include/clpp/libs/ward.clh +18 -0
  37. package/examples/game/include/clpp/libs.clh +31 -0
  38. package/examples/game/include/clpp/roblox.clh +42 -0
  39. package/examples/game/src/ReplicatedFirst/Loading/.gitkeep +1 -0
  40. package/examples/game/src/ReplicatedStorage/Shared/Constants/Classes/.gitkeep +1 -0
  41. package/examples/game/src/ReplicatedStorage/Shared/Constants/Datas/TemplateData.clh +40 -0
  42. package/examples/game/src/ReplicatedStorage/Shared/Constants/Primitives/.gitkeep +1 -0
  43. package/examples/game/src/ReplicatedStorage/Shared/Modules/.gitkeep +1 -0
  44. package/examples/game/src/ReplicatedStorage/Shared/Net/.gitkeep +1 -0
  45. package/examples/game/src/ReplicatedStorage/Shared/Services/.gitkeep +1 -0
  46. package/examples/game/src/ReplicatedStorage/Shared/Types/.gitkeep +1 -0
  47. package/examples/game/src/ReplicatedStorage/Shared/Utils/.gitkeep +1 -0
  48. package/examples/game/src/ServerScriptService/Boot/DataBoot.server.clpp +13 -0
  49. package/examples/game/src/ServerScriptService/Components/.gitkeep +1 -0
  50. package/examples/game/src/ServerScriptService/Configuration/ServerConfig.clp +4 -0
  51. package/examples/game/src/ServerScriptService/Handlers/Guard.server.clpp +7 -0
  52. package/examples/game/src/ServerScriptService/Handlers/PlayerHandler.server.clpp +23 -0
  53. package/examples/game/src/ServerScriptService/Services/.gitkeep +1 -0
  54. package/examples/game/src/ServerStorage/Configuration/.gitkeep +1 -0
  55. package/examples/game/src/ServerStorage/Modules/.gitkeep +1 -0
  56. package/{templates/game/src/client/init.client.clpp → examples/game/src/StarterPlayer/StarterCharacterScripts/Character/CharacterReady.client.clpp} +1 -1
  57. package/examples/game/src/StarterPlayer/StarterCharacterScripts/Combat/.gitkeep +1 -0
  58. package/examples/game/src/StarterPlayer/StarterCharacterScripts/Movement/.gitkeep +1 -0
  59. package/examples/game/src/StarterPlayer/StarterPlayerScripts/Controllers/DataController.client.clpp +7 -0
  60. package/examples/game/src/StarterPlayer/StarterPlayerScripts/Input/.gitkeep +1 -0
  61. package/examples/game/src/StarterPlayer/StarterPlayerScripts/UI/.gitkeep +1 -0
  62. package/examples/game/wally.toml +3 -3
  63. package/generated/cli.js +8 -2
  64. package/generated/clpp/contract.js +4 -3
  65. package/generated/clpp/index.js +3 -1
  66. package/generated/clpp/paths.js +2 -3
  67. package/generated/clpp/postprocess.js +64 -6
  68. package/generated/clpp/runner.js +167 -16
  69. package/generated/compile.js +30 -10
  70. package/generated/flare/emit.js +222 -0
  71. package/generated/flare/index.js +58 -0
  72. package/generated/flare/parse.js +130 -0
  73. package/generated/flare/types.js +2 -0
  74. package/generated/intellisense.js +4 -16
  75. package/generated/libs.js +146 -75
  76. package/generated/lsp.js +6 -30
  77. package/generated/native/index.js +482 -0
  78. package/generated/transpile.js +4 -0
  79. package/generated/utils/project.js +192 -46
  80. package/generated/utils/rojo-mapper.js +12 -6
  81. package/include/clpp/datatypes.clh +40 -14
  82. package/include/clpp/generated/instances.clh +79876 -5254
  83. package/include/clpp/libs/arrayindexer.clh +12 -0
  84. package/include/clpp/libs/axiom.clh +154 -0
  85. package/include/clpp/libs/bloom.clh +58 -0
  86. package/include/clpp/libs/coil.clh +37 -0
  87. package/include/clpp/libs/crest.clh +22 -0
  88. package/include/clpp/libs/echo.clh +52 -0
  89. package/include/clpp/libs/ember.clh +17 -0
  90. package/include/clpp/libs/flare.clh +65 -0
  91. package/include/clpp/libs/gleam.clh +111 -0
  92. package/include/clpp/libs/guide.clh +42 -0
  93. package/include/clpp/libs/helm.clh +31 -0
  94. package/include/clpp/libs/hive.clh +20 -0
  95. package/include/clpp/libs/keep.clh +158 -0
  96. package/include/clpp/libs/lens.clh +24 -0
  97. package/include/clpp/libs/mint.clh +28 -0
  98. package/include/clpp/libs/net.clh +31 -40
  99. package/include/clpp/libs/occlude.clh +15 -0
  100. package/include/clpp/libs/pin.clh +28 -0
  101. package/include/clpp/libs/promise.clh +24 -27
  102. package/include/clpp/libs/roster.clh +117 -0
  103. package/include/clpp/libs/shift.clh +22 -0
  104. package/include/clpp/libs/spark.clh +28 -0
  105. package/include/clpp/libs/stage.clh +23 -0
  106. package/include/clpp/libs/sweep.clh +23 -0
  107. package/include/clpp/libs/trace.clh +18 -0
  108. package/include/clpp/libs/ward.clh +18 -0
  109. package/include/clpp/libs.clh +24 -17
  110. package/include/clpp/roblox.clh +21 -10
  111. package/package.json +9 -18
  112. package/runtime/ArrayIndexer/init.luau +127 -62
  113. package/runtime/Axiom/init.luau +605 -0
  114. package/runtime/Bloom/init.luau +433 -0
  115. package/runtime/Coil/init.luau +209 -0
  116. package/runtime/Crest/init.luau +425 -0
  117. package/runtime/Echo/init.luau +417 -0
  118. package/runtime/Ember/init.luau +365 -0
  119. package/runtime/Flare/init.luau +716 -0
  120. package/runtime/Gleam/init.luau +718 -0
  121. package/runtime/Guide/init.luau +215 -0
  122. package/runtime/Helm/init.luau +377 -0
  123. package/runtime/Hive/init.luau +219 -0
  124. package/runtime/Keep/Client.luau +114 -0
  125. package/runtime/{DataService → Keep}/Data.luau +883 -886
  126. package/runtime/Keep/Engine.luau +211 -0
  127. package/runtime/Keep/Replicator.luau +298 -0
  128. package/runtime/Keep/Server.luau +251 -0
  129. package/runtime/Keep/Store.luau +652 -0
  130. package/runtime/Keep/Trade.luau +455 -0
  131. package/runtime/{DataService → Keep}/init.luau +15 -14
  132. package/runtime/Lens/init.luau +609 -0
  133. package/runtime/Mint/init.luau +279 -0
  134. package/runtime/Net/init.luau +33 -2
  135. package/runtime/Net/src/codec.luau +98 -27
  136. package/runtime/Occlude/init.luau +64 -1
  137. package/runtime/Pin/init.luau +306 -0
  138. package/runtime/Roster/init.luau +678 -0
  139. package/runtime/SOURCES.md +28 -19
  140. package/runtime/Shift/init.luau +238 -0
  141. package/runtime/Spark/init.luau +484 -0
  142. package/runtime/Stage/init.luau +178 -0
  143. package/runtime/Sweep/init.luau +257 -0
  144. package/runtime/Trace/init.luau +210 -0
  145. package/runtime/Ward/init.luau +178 -0
  146. package/src/cli.ts +9 -3
  147. package/src/clpp/contract.ts +14 -2
  148. package/src/clpp/index.ts +3 -3
  149. package/src/clpp/paths.ts +2 -3
  150. package/src/clpp/postprocess.ts +69 -7
  151. package/src/clpp/runner.ts +188 -18
  152. package/src/compile.ts +42 -12
  153. package/src/flare/emit.ts +231 -0
  154. package/src/flare/index.ts +50 -0
  155. package/src/flare/parse.ts +147 -0
  156. package/src/flare/types.ts +61 -0
  157. package/src/intellisense.ts +5 -16
  158. package/src/libs.ts +147 -75
  159. package/src/lsp.ts +6 -31
  160. package/src/native/index.ts +509 -0
  161. package/src/transpile.ts +10 -1
  162. package/src/types.ts +1 -0
  163. package/src/utils/project.ts +210 -52
  164. package/src/utils/rojo-mapper.ts +12 -6
  165. package/templates/game/.vscode/extensions.json +2 -1
  166. package/templates/game/default.project.json +16 -11
  167. package/templates/game/include/clpp/datatypes.clh +611 -0
  168. package/templates/game/include/clpp/generated/enums.clh +4920 -0
  169. package/templates/game/include/clpp/generated/instances.clh +87111 -0
  170. package/templates/game/include/clpp/libs/arrayindexer.clh +12 -0
  171. package/templates/game/include/clpp/libs/axiom.clh +154 -0
  172. package/templates/game/include/clpp/libs/bloom.clh +58 -0
  173. package/templates/game/include/clpp/libs/coil.clh +37 -0
  174. package/templates/game/include/clpp/libs/crest.clh +22 -0
  175. package/templates/game/include/clpp/libs/echo.clh +52 -0
  176. package/templates/game/include/clpp/libs/ember.clh +17 -0
  177. package/templates/game/include/clpp/libs/flare.clh +65 -0
  178. package/templates/game/include/clpp/libs/gleam.clh +111 -0
  179. package/templates/game/include/clpp/libs/guide.clh +42 -0
  180. package/templates/game/include/clpp/libs/helm.clh +31 -0
  181. package/templates/game/include/clpp/libs/hive.clh +20 -0
  182. package/templates/game/include/clpp/libs/keep.clh +158 -0
  183. package/templates/game/include/clpp/libs/lens.clh +24 -0
  184. package/templates/game/include/clpp/libs/mint.clh +28 -0
  185. package/templates/game/include/clpp/libs/net.clh +31 -0
  186. package/templates/game/include/clpp/libs/occlude.clh +15 -0
  187. package/templates/game/include/clpp/libs/pin.clh +28 -0
  188. package/templates/game/include/clpp/libs/promise.clh +24 -0
  189. package/templates/game/include/clpp/libs/roster.clh +117 -0
  190. package/templates/game/include/clpp/libs/shift.clh +22 -0
  191. package/templates/game/include/clpp/libs/spark.clh +28 -0
  192. package/templates/game/include/clpp/libs/stage.clh +23 -0
  193. package/templates/game/include/clpp/libs/sweep.clh +23 -0
  194. package/templates/game/include/clpp/libs/trace.clh +18 -0
  195. package/templates/game/include/clpp/libs/ward.clh +18 -0
  196. package/templates/game/include/clpp/libs.clh +31 -0
  197. package/templates/game/include/clpp/roblox.clh +42 -0
  198. package/templates/game/src/ReplicatedFirst/Loading/.gitkeep +1 -0
  199. package/templates/game/src/ReplicatedStorage/Shared/Constants/Classes/.gitkeep +1 -0
  200. package/templates/game/src/ReplicatedStorage/Shared/Constants/Datas/TemplateData.clh +40 -0
  201. package/templates/game/src/ReplicatedStorage/Shared/Constants/Primitives/.gitkeep +1 -0
  202. package/templates/game/src/ReplicatedStorage/Shared/Modules/.gitkeep +1 -0
  203. package/templates/game/src/ReplicatedStorage/Shared/Net/.gitkeep +1 -0
  204. package/templates/game/src/ReplicatedStorage/Shared/Services/.gitkeep +1 -0
  205. package/templates/game/src/ReplicatedStorage/Shared/Types/.gitkeep +1 -0
  206. package/templates/game/src/ReplicatedStorage/Shared/Utils/.gitkeep +1 -0
  207. package/templates/game/src/ServerScriptService/Boot/DataBoot.server.clpp +13 -0
  208. package/templates/game/src/ServerScriptService/Components/.gitkeep +1 -0
  209. package/templates/game/src/ServerScriptService/Configuration/ServerConfig.clp +4 -0
  210. package/templates/game/src/ServerScriptService/Handlers/Guard.server.clpp +7 -0
  211. package/templates/game/src/ServerScriptService/Handlers/PlayerHandler.server.clpp +24 -0
  212. package/templates/game/src/ServerScriptService/Services/.gitkeep +1 -0
  213. package/templates/game/src/ServerStorage/Configuration/.gitkeep +1 -0
  214. package/templates/game/src/ServerStorage/Modules/.gitkeep +1 -0
  215. package/{examples/game/src/client/init.client.clpp → templates/game/src/StarterPlayer/StarterCharacterScripts/Character/CharacterReady.client.clpp} +1 -1
  216. package/templates/game/src/StarterPlayer/StarterCharacterScripts/Combat/.gitkeep +1 -0
  217. package/templates/game/src/StarterPlayer/StarterCharacterScripts/Movement/.gitkeep +1 -0
  218. package/templates/game/src/StarterPlayer/StarterPlayerScripts/Controllers/DataController.client.clpp +7 -0
  219. package/templates/game/src/StarterPlayer/StarterPlayerScripts/Input/.gitkeep +1 -0
  220. package/templates/game/src/StarterPlayer/StarterPlayerScripts/UI/.gitkeep +1 -0
  221. package/templates/game/wally.toml +4 -3
  222. package/docs/README.md +0 -27
  223. package/docs/architecture.md +0 -29
  224. package/docs/cli.md +0 -39
  225. package/docs/comparison.md +0 -19
  226. package/docs/config.md +0 -30
  227. package/docs/cpp-advanced.md +0 -78
  228. package/docs/cpp-const.md +0 -52
  229. package/docs/cpp-organization.md +0 -63
  230. package/docs/cpp-safety.md +0 -62
  231. package/docs/cpp-types.md +0 -68
  232. package/docs/examples/_category_.json +0 -5
  233. package/docs/examples/combat.md +0 -31
  234. package/docs/examples/data-boot.md +0 -98
  235. package/docs/examples/hud.md +0 -28
  236. package/docs/examples/index.md +0 -38
  237. package/docs/examples/leaderstats.md +0 -69
  238. package/docs/examples/shop.md +0 -122
  239. package/docs/examples/sword.md +0 -108
  240. package/docs/getting-started.md +0 -62
  241. package/docs/intellisense.md +0 -12
  242. package/docs/intro.md +0 -38
  243. package/docs/libraries/_category_.json +0 -5
  244. package/docs/libraries/dataservice.md +0 -107
  245. package/docs/libraries/index.md +0 -23
  246. package/docs/libraries/janitor.md +0 -65
  247. package/docs/libraries/more.md +0 -81
  248. package/docs/libraries/net.md +0 -35
  249. package/docs/libraries/promise.md +0 -27
  250. package/docs/libraries/ui.md +0 -76
  251. package/docs/migration.md +0 -38
  252. package/docs/oop/_category_.json +0 -5
  253. package/docs/oop/file-tags.md +0 -24
  254. package/docs/oop/index.md +0 -29
  255. package/docs/oop/modules.md +0 -88
  256. package/docs/oop/services.md +0 -76
  257. package/docs/print-cout.md +0 -91
  258. package/docs/roblox-api.md +0 -29
  259. package/docs/syntax.md +0 -80
  260. package/examples/game/src/client/hud.client.clpp +0 -54
  261. package/examples/game/src/server/combat.server.clpp +0 -85
  262. package/examples/game/src/server/leaderstats.server.clpp +0 -28
  263. package/examples/game/src/shared/PlayerData.clh +0 -20
  264. package/examples/game/src/shared/config.clp +0 -6
  265. package/examples/game/src/shared/features.clp +0 -88
  266. package/include/clpp/libs/chrono.clh +0 -26
  267. package/include/clpp/libs/cmdr.clh +0 -16
  268. package/include/clpp/libs/dataservice.clh +0 -138
  269. package/include/clpp/libs/display.clh +0 -12
  270. package/include/clpp/libs/ezvisual.clh +0 -16
  271. package/include/clpp/libs/formatnumber.clh +0 -14
  272. package/include/clpp/libs/fusion.clh +0 -41
  273. package/include/clpp/libs/iris.clh +0 -40
  274. package/include/clpp/libs/janitor.clh +0 -38
  275. package/include/clpp/libs/math.clh +0 -14
  276. package/include/clpp/libs/module3d.clh +0 -23
  277. package/include/clpp/libs/spring.clh +0 -17
  278. package/include/clpp/libs/statemachine.clh +0 -18
  279. package/include/clpp/libs/stickybillboard.clh +0 -13
  280. package/include/clpp/libs/topbarplus.clh +0 -28
  281. package/include/clpp/libs/twinkle.clh +0 -15
  282. package/include/clpp/libs/vfx.clh +0 -13
  283. package/runtime/Chrono/Client/ClientClock.luau +0 -202
  284. package/runtime/Chrono/Client/InterpolationBuffer.luau +0 -74
  285. package/runtime/Chrono/Client/ModelResolver.luau +0 -53
  286. package/runtime/Chrono/Client/Player.luau +0 -113
  287. package/runtime/Chrono/Client/Receiver.luau +0 -395
  288. package/runtime/Chrono/Client/Replicate.luau +0 -333
  289. package/runtime/Chrono/Client/Sender.luau +0 -205
  290. package/runtime/Chrono/LICENSE +0 -21
  291. package/runtime/Chrono/Server/EntityGrid.luau +0 -299
  292. package/runtime/Chrono/Server/Player.luau +0 -141
  293. package/runtime/Chrono/Server/Receiver.luau +0 -287
  294. package/runtime/Chrono/Server/Replicate.luau +0 -415
  295. package/runtime/Chrono/Server/Sender.luau +0 -306
  296. package/runtime/Chrono/Server/ServerClock.luau +0 -50
  297. package/runtime/Chrono/Shared/ApplyMounts.luau +0 -137
  298. package/runtime/Chrono/Shared/Bin.luau +0 -31
  299. package/runtime/Chrono/Shared/ClockUnwrap.luau +0 -70
  300. package/runtime/Chrono/Shared/Config.luau +0 -264
  301. package/runtime/Chrono/Shared/Entity.luau +0 -1016
  302. package/runtime/Chrono/Shared/Events.luau +0 -39
  303. package/runtime/Chrono/Shared/Holder.luau +0 -210
  304. package/runtime/Chrono/Shared/InterpolationMath.luau +0 -51
  305. package/runtime/Chrono/Shared/ModelHelper.luau +0 -122
  306. package/runtime/Chrono/Shared/Remotes/ClientClockRelay.model.json +0 -3
  307. package/runtime/Chrono/Shared/Remotes/ClientHeartbeat.model.json +0 -3
  308. package/runtime/Chrono/Shared/Remotes/ClientLoaded.model.json +0 -3
  309. package/runtime/Chrono/Shared/Remotes/Death.model.json +0 -3
  310. package/runtime/Chrono/Shared/Remotes/Heartbeat.model.json +0 -3
  311. package/runtime/Chrono/Shared/Remotes/Replicate.model.json +0 -3
  312. package/runtime/Chrono/Shared/Remotes/ReplicateFull.model.json +0 -3
  313. package/runtime/Chrono/Shared/Remotes/SafeReplicate.model.json +0 -3
  314. package/runtime/Chrono/Shared/ReplicationRules.luau +0 -122
  315. package/runtime/Chrono/Shared/Signal.luau +0 -219
  316. package/runtime/Chrono/Shared/Snapshots.luau +0 -218
  317. package/runtime/Chrono/Shared/Stats.luau +0 -204
  318. package/runtime/Chrono/Shared/Ticker.luau +0 -112
  319. package/runtime/Chrono/Shared/Types.luau +0 -247
  320. package/runtime/Chrono/Shared/Warn.luau +0 -33
  321. package/runtime/Chrono/Shared/_CUSTOM_MODEL_REP/init.model.json +0 -3
  322. package/runtime/Chrono/_impl/Client/ClientClock.luau +0 -202
  323. package/runtime/Chrono/_impl/Client/InterpolationBuffer.luau +0 -74
  324. package/runtime/Chrono/_impl/Client/ModelResolver.luau +0 -53
  325. package/runtime/Chrono/_impl/Client/Player.luau +0 -113
  326. package/runtime/Chrono/_impl/Client/Receiver.luau +0 -395
  327. package/runtime/Chrono/_impl/Client/Replicate.luau +0 -333
  328. package/runtime/Chrono/_impl/Client/Sender.luau +0 -205
  329. package/runtime/Chrono/_impl/LICENSE +0 -21
  330. package/runtime/Chrono/_impl/Server/EntityGrid.luau +0 -299
  331. package/runtime/Chrono/_impl/Server/Player.luau +0 -141
  332. package/runtime/Chrono/_impl/Server/Receiver.luau +0 -287
  333. package/runtime/Chrono/_impl/Server/Replicate.luau +0 -415
  334. package/runtime/Chrono/_impl/Server/Sender.luau +0 -306
  335. package/runtime/Chrono/_impl/Server/ServerClock.luau +0 -50
  336. package/runtime/Chrono/_impl/Shared/ApplyMounts.luau +0 -137
  337. package/runtime/Chrono/_impl/Shared/Bin.luau +0 -31
  338. package/runtime/Chrono/_impl/Shared/ClockUnwrap.luau +0 -70
  339. package/runtime/Chrono/_impl/Shared/Config.luau +0 -264
  340. package/runtime/Chrono/_impl/Shared/Entity.luau +0 -1016
  341. package/runtime/Chrono/_impl/Shared/Events.luau +0 -39
  342. package/runtime/Chrono/_impl/Shared/Holder.luau +0 -210
  343. package/runtime/Chrono/_impl/Shared/InterpolationMath.luau +0 -51
  344. package/runtime/Chrono/_impl/Shared/ModelHelper.luau +0 -122
  345. package/runtime/Chrono/_impl/Shared/Remotes/ClientClockRelay.model.json +0 -3
  346. package/runtime/Chrono/_impl/Shared/Remotes/ClientHeartbeat.model.json +0 -3
  347. package/runtime/Chrono/_impl/Shared/Remotes/ClientLoaded.model.json +0 -3
  348. package/runtime/Chrono/_impl/Shared/Remotes/Death.model.json +0 -3
  349. package/runtime/Chrono/_impl/Shared/Remotes/Heartbeat.model.json +0 -3
  350. package/runtime/Chrono/_impl/Shared/Remotes/Replicate.model.json +0 -3
  351. package/runtime/Chrono/_impl/Shared/Remotes/ReplicateFull.model.json +0 -3
  352. package/runtime/Chrono/_impl/Shared/Remotes/SafeReplicate.model.json +0 -3
  353. package/runtime/Chrono/_impl/Shared/ReplicationRules.luau +0 -122
  354. package/runtime/Chrono/_impl/Shared/Signal.luau +0 -219
  355. package/runtime/Chrono/_impl/Shared/Snapshots.luau +0 -218
  356. package/runtime/Chrono/_impl/Shared/Stats.luau +0 -204
  357. package/runtime/Chrono/_impl/Shared/Ticker.luau +0 -112
  358. package/runtime/Chrono/_impl/Shared/Types.luau +0 -247
  359. package/runtime/Chrono/_impl/Shared/Warn.luau +0 -33
  360. package/runtime/Chrono/_impl/Shared/_CUSTOM_MODEL_REP/init.model.json +0 -3
  361. package/runtime/Chrono/_impl/init.luau +0 -96
  362. package/runtime/Chrono/init.luau +0 -14
  363. package/runtime/Cmdr/BuiltInCommands/Admin/announce.luau +0 -21
  364. package/runtime/Cmdr/BuiltInCommands/Admin/announceServer.luau +0 -17
  365. package/runtime/Cmdr/BuiltInCommands/Admin/ban.luau +0 -59
  366. package/runtime/Cmdr/BuiltInCommands/Admin/banServer.luau +0 -30
  367. package/runtime/Cmdr/BuiltInCommands/Admin/gotoPlace.luau +0 -35
  368. package/runtime/Cmdr/BuiltInCommands/Admin/gotoPlaceServer.luau +0 -17
  369. package/runtime/Cmdr/BuiltInCommands/Admin/kick.luau +0 -19
  370. package/runtime/Cmdr/BuiltInCommands/Admin/kickServer.luau +0 -27
  371. package/runtime/Cmdr/BuiltInCommands/Admin/kill.luau +0 -13
  372. package/runtime/Cmdr/BuiltInCommands/Admin/killServer.luau +0 -13
  373. package/runtime/Cmdr/BuiltInCommands/Admin/respawn.luau +0 -15
  374. package/runtime/Cmdr/BuiltInCommands/Admin/respawnServer.luau +0 -7
  375. package/runtime/Cmdr/BuiltInCommands/Admin/teleport.luau +0 -30
  376. package/runtime/Cmdr/BuiltInCommands/Admin/teleportServer.luau +0 -26
  377. package/runtime/Cmdr/BuiltInCommands/Admin/unban.luau +0 -26
  378. package/runtime/Cmdr/BuiltInCommands/Admin/unbanServer.luau +0 -10
  379. package/runtime/Cmdr/BuiltInCommands/Debug/blink.luau +0 -35
  380. package/runtime/Cmdr/BuiltInCommands/Debug/fetch.luau +0 -12
  381. package/runtime/Cmdr/BuiltInCommands/Debug/fetchServer.luau +0 -7
  382. package/runtime/Cmdr/BuiltInCommands/Debug/getPlayerPlaceInstance.luau +0 -20
  383. package/runtime/Cmdr/BuiltInCommands/Debug/getPlayerPlaceInstanceServer.luau +0 -28
  384. package/runtime/Cmdr/BuiltInCommands/Debug/position.luau +0 -30
  385. package/runtime/Cmdr/BuiltInCommands/Debug/thru.luau +0 -50
  386. package/runtime/Cmdr/BuiltInCommands/Debug/uptime.luau +0 -6
  387. package/runtime/Cmdr/BuiltInCommands/Debug/uptimeServer.luau +0 -12
  388. package/runtime/Cmdr/BuiltInCommands/Debug/version.luau +0 -12
  389. package/runtime/Cmdr/BuiltInCommands/Utility/alias.luau +0 -22
  390. package/runtime/Cmdr/BuiltInCommands/Utility/bind.luau +0 -104
  391. package/runtime/Cmdr/BuiltInCommands/Utility/clear.luau +0 -20
  392. package/runtime/Cmdr/BuiltInCommands/Utility/convertTimestamp.luau +0 -18
  393. package/runtime/Cmdr/BuiltInCommands/Utility/echo.luau +0 -17
  394. package/runtime/Cmdr/BuiltInCommands/Utility/edit.luau +0 -75
  395. package/runtime/Cmdr/BuiltInCommands/Utility/exit.luau +0 -11
  396. package/runtime/Cmdr/BuiltInCommands/Utility/history.luau +0 -27
  397. package/runtime/Cmdr/BuiltInCommands/Utility/hover.luau +0 -21
  398. package/runtime/Cmdr/BuiltInCommands/Utility/jsonArrayDecode.luau +0 -25
  399. package/runtime/Cmdr/BuiltInCommands/Utility/jsonArrayEncode.luau +0 -18
  400. package/runtime/Cmdr/BuiltInCommands/Utility/len.luau +0 -16
  401. package/runtime/Cmdr/BuiltInCommands/Utility/math.luau +0 -36
  402. package/runtime/Cmdr/BuiltInCommands/Utility/pick.luau +0 -21
  403. package/runtime/Cmdr/BuiltInCommands/Utility/rand.luau +0 -27
  404. package/runtime/Cmdr/BuiltInCommands/Utility/replace.luau +0 -32
  405. package/runtime/Cmdr/BuiltInCommands/Utility/resolve.luau +0 -32
  406. package/runtime/Cmdr/BuiltInCommands/Utility/run.luau +0 -20
  407. package/runtime/Cmdr/BuiltInCommands/Utility/runLines.luau +0 -34
  408. package/runtime/Cmdr/BuiltInCommands/Utility/runif.luau +0 -95
  409. package/runtime/Cmdr/BuiltInCommands/Utility/unbind.luau +0 -27
  410. package/runtime/Cmdr/BuiltInCommands/Utility/var.luau +0 -29
  411. package/runtime/Cmdr/BuiltInCommands/Utility/varServer.luau +0 -37
  412. package/runtime/Cmdr/BuiltInCommands/Utility/varSet.luau +0 -30
  413. package/runtime/Cmdr/BuiltInCommands/Utility/varSetServer.luau +0 -29
  414. package/runtime/Cmdr/BuiltInCommands/help.luau +0 -96
  415. package/runtime/Cmdr/BuiltInTypes/BrickColor.luau +0 -258
  416. package/runtime/Cmdr/BuiltInTypes/Color3.luau +0 -59
  417. package/runtime/Cmdr/BuiltInTypes/Command.luau +0 -23
  418. package/runtime/Cmdr/BuiltInTypes/Duration.luau +0 -111
  419. package/runtime/Cmdr/BuiltInTypes/JSON.luau +0 -13
  420. package/runtime/Cmdr/BuiltInTypes/MathOperator.luau +0 -43
  421. package/runtime/Cmdr/BuiltInTypes/Player.luau +0 -36
  422. package/runtime/Cmdr/BuiltInTypes/PlayerId.luau +0 -66
  423. package/runtime/Cmdr/BuiltInTypes/Primitives.luau +0 -145
  424. package/runtime/Cmdr/BuiltInTypes/StoredKey.luau +0 -33
  425. package/runtime/Cmdr/BuiltInTypes/Team.luau +0 -49
  426. package/runtime/Cmdr/BuiltInTypes/Type.luau +0 -23
  427. package/runtime/Cmdr/BuiltInTypes/URL.luau +0 -18
  428. package/runtime/Cmdr/BuiltInTypes/UserInput.luau +0 -32
  429. package/runtime/Cmdr/BuiltInTypes/Vector.luau +0 -58
  430. package/runtime/Cmdr/CmdrClient/CmdrInterface/AutoComplete.luau +0 -240
  431. package/runtime/Cmdr/CmdrClient/CmdrInterface/CreateGui.luau +0 -227
  432. package/runtime/Cmdr/CmdrClient/CmdrInterface/Window.luau +0 -713
  433. package/runtime/Cmdr/CmdrClient/CmdrInterface/init.luau +0 -18
  434. package/runtime/Cmdr/CmdrClient/DefaultEventHandlers.luau +0 -18
  435. package/runtime/Cmdr/CmdrClient/Shared/Argument.luau +0 -395
  436. package/runtime/Cmdr/CmdrClient/Shared/BuiltInGuards/HasCharacter.luau +0 -39
  437. package/runtime/Cmdr/CmdrClient/Shared/BuiltInGuards/IsDataStoreAvailable.luau +0 -36
  438. package/runtime/Cmdr/CmdrClient/Shared/BuiltInGuards/MaxArrayLength.luau +0 -10
  439. package/runtime/Cmdr/CmdrClient/Shared/BuiltInGuards/MaxStringLength.luau +0 -10
  440. package/runtime/Cmdr/CmdrClient/Shared/BuiltInGuards/NonEmptyString.luau +0 -10
  441. package/runtime/Cmdr/CmdrClient/Shared/BuiltInGuards/NotEquals.luau +0 -8
  442. package/runtime/Cmdr/CmdrClient/Shared/Command.luau +0 -415
  443. package/runtime/Cmdr/CmdrClient/Shared/Dispatcher.luau +0 -407
  444. package/runtime/Cmdr/CmdrClient/Shared/Registry.luau +0 -717
  445. package/runtime/Cmdr/CmdrClient/Shared/Util.luau +0 -879
  446. package/runtime/Cmdr/CmdrClient/init.luau +0 -377
  447. package/runtime/Cmdr/LICENSE +0 -21
  448. package/runtime/Cmdr/_impl/BuiltInCommands/Admin/announce.luau +0 -21
  449. package/runtime/Cmdr/_impl/BuiltInCommands/Admin/announceServer.luau +0 -17
  450. package/runtime/Cmdr/_impl/BuiltInCommands/Admin/ban.luau +0 -59
  451. package/runtime/Cmdr/_impl/BuiltInCommands/Admin/banServer.luau +0 -30
  452. package/runtime/Cmdr/_impl/BuiltInCommands/Admin/gotoPlace.luau +0 -35
  453. package/runtime/Cmdr/_impl/BuiltInCommands/Admin/gotoPlaceServer.luau +0 -17
  454. package/runtime/Cmdr/_impl/BuiltInCommands/Admin/kick.luau +0 -19
  455. package/runtime/Cmdr/_impl/BuiltInCommands/Admin/kickServer.luau +0 -27
  456. package/runtime/Cmdr/_impl/BuiltInCommands/Admin/kill.luau +0 -13
  457. package/runtime/Cmdr/_impl/BuiltInCommands/Admin/killServer.luau +0 -13
  458. package/runtime/Cmdr/_impl/BuiltInCommands/Admin/respawn.luau +0 -15
  459. package/runtime/Cmdr/_impl/BuiltInCommands/Admin/respawnServer.luau +0 -7
  460. package/runtime/Cmdr/_impl/BuiltInCommands/Admin/teleport.luau +0 -30
  461. package/runtime/Cmdr/_impl/BuiltInCommands/Admin/teleportServer.luau +0 -26
  462. package/runtime/Cmdr/_impl/BuiltInCommands/Admin/unban.luau +0 -26
  463. package/runtime/Cmdr/_impl/BuiltInCommands/Admin/unbanServer.luau +0 -10
  464. package/runtime/Cmdr/_impl/BuiltInCommands/Debug/blink.luau +0 -35
  465. package/runtime/Cmdr/_impl/BuiltInCommands/Debug/fetch.luau +0 -12
  466. package/runtime/Cmdr/_impl/BuiltInCommands/Debug/fetchServer.luau +0 -7
  467. package/runtime/Cmdr/_impl/BuiltInCommands/Debug/getPlayerPlaceInstance.luau +0 -20
  468. package/runtime/Cmdr/_impl/BuiltInCommands/Debug/getPlayerPlaceInstanceServer.luau +0 -28
  469. package/runtime/Cmdr/_impl/BuiltInCommands/Debug/position.luau +0 -30
  470. package/runtime/Cmdr/_impl/BuiltInCommands/Debug/thru.luau +0 -50
  471. package/runtime/Cmdr/_impl/BuiltInCommands/Debug/uptime.luau +0 -6
  472. package/runtime/Cmdr/_impl/BuiltInCommands/Debug/uptimeServer.luau +0 -12
  473. package/runtime/Cmdr/_impl/BuiltInCommands/Debug/version.luau +0 -12
  474. package/runtime/Cmdr/_impl/BuiltInCommands/Utility/alias.luau +0 -22
  475. package/runtime/Cmdr/_impl/BuiltInCommands/Utility/bind.luau +0 -104
  476. package/runtime/Cmdr/_impl/BuiltInCommands/Utility/clear.luau +0 -20
  477. package/runtime/Cmdr/_impl/BuiltInCommands/Utility/convertTimestamp.luau +0 -18
  478. package/runtime/Cmdr/_impl/BuiltInCommands/Utility/echo.luau +0 -17
  479. package/runtime/Cmdr/_impl/BuiltInCommands/Utility/edit.luau +0 -75
  480. package/runtime/Cmdr/_impl/BuiltInCommands/Utility/exit.luau +0 -11
  481. package/runtime/Cmdr/_impl/BuiltInCommands/Utility/history.luau +0 -27
  482. package/runtime/Cmdr/_impl/BuiltInCommands/Utility/hover.luau +0 -21
  483. package/runtime/Cmdr/_impl/BuiltInCommands/Utility/jsonArrayDecode.luau +0 -25
  484. package/runtime/Cmdr/_impl/BuiltInCommands/Utility/jsonArrayEncode.luau +0 -18
  485. package/runtime/Cmdr/_impl/BuiltInCommands/Utility/len.luau +0 -16
  486. package/runtime/Cmdr/_impl/BuiltInCommands/Utility/math.luau +0 -36
  487. package/runtime/Cmdr/_impl/BuiltInCommands/Utility/pick.luau +0 -21
  488. package/runtime/Cmdr/_impl/BuiltInCommands/Utility/rand.luau +0 -27
  489. package/runtime/Cmdr/_impl/BuiltInCommands/Utility/replace.luau +0 -32
  490. package/runtime/Cmdr/_impl/BuiltInCommands/Utility/resolve.luau +0 -32
  491. package/runtime/Cmdr/_impl/BuiltInCommands/Utility/run.luau +0 -20
  492. package/runtime/Cmdr/_impl/BuiltInCommands/Utility/runLines.luau +0 -34
  493. package/runtime/Cmdr/_impl/BuiltInCommands/Utility/runif.luau +0 -95
  494. package/runtime/Cmdr/_impl/BuiltInCommands/Utility/unbind.luau +0 -27
  495. package/runtime/Cmdr/_impl/BuiltInCommands/Utility/var.luau +0 -29
  496. package/runtime/Cmdr/_impl/BuiltInCommands/Utility/varServer.luau +0 -37
  497. package/runtime/Cmdr/_impl/BuiltInCommands/Utility/varSet.luau +0 -30
  498. package/runtime/Cmdr/_impl/BuiltInCommands/Utility/varSetServer.luau +0 -29
  499. package/runtime/Cmdr/_impl/BuiltInCommands/help.luau +0 -96
  500. package/runtime/Cmdr/_impl/BuiltInTypes/BrickColor.luau +0 -258
  501. package/runtime/Cmdr/_impl/BuiltInTypes/Color3.luau +0 -59
  502. package/runtime/Cmdr/_impl/BuiltInTypes/Command.luau +0 -23
  503. package/runtime/Cmdr/_impl/BuiltInTypes/Duration.luau +0 -111
  504. package/runtime/Cmdr/_impl/BuiltInTypes/JSON.luau +0 -13
  505. package/runtime/Cmdr/_impl/BuiltInTypes/MathOperator.luau +0 -43
  506. package/runtime/Cmdr/_impl/BuiltInTypes/Player.luau +0 -36
  507. package/runtime/Cmdr/_impl/BuiltInTypes/PlayerId.luau +0 -66
  508. package/runtime/Cmdr/_impl/BuiltInTypes/Primitives.luau +0 -145
  509. package/runtime/Cmdr/_impl/BuiltInTypes/StoredKey.luau +0 -33
  510. package/runtime/Cmdr/_impl/BuiltInTypes/Team.luau +0 -49
  511. package/runtime/Cmdr/_impl/BuiltInTypes/Type.luau +0 -23
  512. package/runtime/Cmdr/_impl/BuiltInTypes/URL.luau +0 -18
  513. package/runtime/Cmdr/_impl/BuiltInTypes/UserInput.luau +0 -32
  514. package/runtime/Cmdr/_impl/BuiltInTypes/Vector.luau +0 -58
  515. package/runtime/Cmdr/_impl/CmdrClient/CmdrInterface/AutoComplete.luau +0 -240
  516. package/runtime/Cmdr/_impl/CmdrClient/CmdrInterface/CreateGui.luau +0 -227
  517. package/runtime/Cmdr/_impl/CmdrClient/CmdrInterface/Window.luau +0 -713
  518. package/runtime/Cmdr/_impl/CmdrClient/CmdrInterface/init.luau +0 -18
  519. package/runtime/Cmdr/_impl/CmdrClient/DefaultEventHandlers.luau +0 -18
  520. package/runtime/Cmdr/_impl/CmdrClient/Shared/Argument.luau +0 -395
  521. package/runtime/Cmdr/_impl/CmdrClient/Shared/BuiltInGuards/HasCharacter.luau +0 -39
  522. package/runtime/Cmdr/_impl/CmdrClient/Shared/BuiltInGuards/IsDataStoreAvailable.luau +0 -36
  523. package/runtime/Cmdr/_impl/CmdrClient/Shared/BuiltInGuards/MaxArrayLength.luau +0 -10
  524. package/runtime/Cmdr/_impl/CmdrClient/Shared/BuiltInGuards/MaxStringLength.luau +0 -10
  525. package/runtime/Cmdr/_impl/CmdrClient/Shared/BuiltInGuards/NonEmptyString.luau +0 -10
  526. package/runtime/Cmdr/_impl/CmdrClient/Shared/BuiltInGuards/NotEquals.luau +0 -8
  527. package/runtime/Cmdr/_impl/CmdrClient/Shared/Command.luau +0 -415
  528. package/runtime/Cmdr/_impl/CmdrClient/Shared/Dispatcher.luau +0 -407
  529. package/runtime/Cmdr/_impl/CmdrClient/Shared/Registry.luau +0 -717
  530. package/runtime/Cmdr/_impl/CmdrClient/Shared/Util.luau +0 -879
  531. package/runtime/Cmdr/_impl/CmdrClient/init.luau +0 -377
  532. package/runtime/Cmdr/_impl/LICENSE +0 -21
  533. package/runtime/Cmdr/_impl/init.luau +0 -178
  534. package/runtime/Cmdr/init.luau +0 -8
  535. package/runtime/DataService/Client.luau +0 -209
  536. package/runtime/DataService/Packages/quicknet/DataTypes.luau +0 -70
  537. package/runtime/DataService/Packages/quicknet/Enums.luau +0 -85
  538. package/runtime/DataService/Packages/quicknet/EnumsToNativeTypes.luau +0 -57
  539. package/runtime/DataService/Packages/quicknet/Parser.luau +0 -355
  540. package/runtime/DataService/Packages/quicknet/QuickNet.luau +0 -953
  541. package/runtime/DataService/Packages/quicknet/Serialize.luau +0 -2020
  542. package/runtime/DataService/Packages/quicknet/Types.luau +0 -72
  543. package/runtime/DataService/Packages/quicknet/init.luau +0 -1
  544. package/runtime/DataService/Packages/signal/init.luau +0 -433
  545. package/runtime/DataService/ProfileStore.luau +0 -2243
  546. package/runtime/DataService/Replicator.luau +0 -172
  547. package/runtime/DataService/Server.luau +0 -412
  548. package/runtime/Display/LICENSE +0 -201
  549. package/runtime/Display/_impl/LICENSE +0 -201
  550. package/runtime/Display/_impl/init.luau +0 -269
  551. package/runtime/Display/_impl/option.luau +0 -237
  552. package/runtime/Display/init.luau +0 -10
  553. package/runtime/Display/option.luau +0 -237
  554. package/runtime/EzVisualz/Dropshadow.luau +0 -148
  555. package/runtime/EzVisualz/Gradient.luau +0 -452
  556. package/runtime/EzVisualz/GradientTemplates/Bubblegum.luau +0 -16
  557. package/runtime/EzVisualz/GradientTemplates/Chrome.luau +0 -16
  558. package/runtime/EzVisualz/GradientTemplates/Death.luau +0 -15
  559. package/runtime/EzVisualz/GradientTemplates/Electric.luau +0 -14
  560. package/runtime/EzVisualz/GradientTemplates/Fire.luau +0 -13
  561. package/runtime/EzVisualz/GradientTemplates/Galaxy.luau +0 -11
  562. package/runtime/EzVisualz/GradientTemplates/Ghost.luau +0 -16
  563. package/runtime/EzVisualz/GradientTemplates/Gold.luau +0 -14
  564. package/runtime/EzVisualz/GradientTemplates/Green.luau +0 -14
  565. package/runtime/EzVisualz/GradientTemplates/Ice.luau +0 -14
  566. package/runtime/EzVisualz/GradientTemplates/Lava.luau +0 -15
  567. package/runtime/EzVisualz/GradientTemplates/Matrix.luau +0 -19
  568. package/runtime/EzVisualz/GradientTemplates/Neon.luau +0 -12
  569. package/runtime/EzVisualz/GradientTemplates/Oceanic.luau +0 -15
  570. package/runtime/EzVisualz/GradientTemplates/Rainbow.luau +0 -13
  571. package/runtime/EzVisualz/GradientTemplates/Silver.luau +0 -12
  572. package/runtime/EzVisualz/GradientTemplates/Sunset.luau +0 -11
  573. package/runtime/EzVisualz/GradientTemplates/Zebra.luau +0 -18
  574. package/runtime/EzVisualz/GradientTemplates/init.luau +0 -9
  575. package/runtime/EzVisualz/LICENSE.md +0 -21
  576. package/runtime/EzVisualz/Presets/Bubblegum.luau +0 -36
  577. package/runtime/EzVisualz/Presets/ChromeStroke.luau +0 -15
  578. package/runtime/EzVisualz/Presets/DeathStroke.luau +0 -15
  579. package/runtime/EzVisualz/Presets/ElectricStroke.luau +0 -54
  580. package/runtime/EzVisualz/Presets/FireStroke.luau +0 -29
  581. package/runtime/EzVisualz/Presets/GalaxyStroke.luau +0 -31
  582. package/runtime/EzVisualz/Presets/Ghost.luau +0 -10
  583. package/runtime/EzVisualz/Presets/GhostStroke.luau +0 -15
  584. package/runtime/EzVisualz/Presets/Gold.luau +0 -10
  585. package/runtime/EzVisualz/Presets/GoldStroke.luau +0 -15
  586. package/runtime/EzVisualz/Presets/GreenOutline.luau +0 -23
  587. package/runtime/EzVisualz/Presets/IceStroke.luau +0 -15
  588. package/runtime/EzVisualz/Presets/Lava.luau +0 -9
  589. package/runtime/EzVisualz/Presets/LavaStroke.luau +0 -13
  590. package/runtime/EzVisualz/Presets/Matrix.luau +0 -21
  591. package/runtime/EzVisualz/Presets/NeonStroke.luau +0 -30
  592. package/runtime/EzVisualz/Presets/OceanicStroke.luau +0 -15
  593. package/runtime/EzVisualz/Presets/Rainbow.luau +0 -9
  594. package/runtime/EzVisualz/Presets/RainbowOutline.luau +0 -23
  595. package/runtime/EzVisualz/Presets/RainbowStroke.luau +0 -13
  596. package/runtime/EzVisualz/Presets/Shine.luau +0 -48
  597. package/runtime/EzVisualz/Presets/ShineOutline.luau +0 -66
  598. package/runtime/EzVisualz/Presets/Silver.luau +0 -10
  599. package/runtime/EzVisualz/Presets/SilverStroke.luau +0 -15
  600. package/runtime/EzVisualz/Presets/SunsetStroke.luau +0 -31
  601. package/runtime/EzVisualz/Presets/WaveStroke.luau +0 -33
  602. package/runtime/EzVisualz/Presets/Zebra.luau +0 -21
  603. package/runtime/EzVisualz/Presets/init.luau +0 -9
  604. package/runtime/EzVisualz/Stroke.luau +0 -167
  605. package/runtime/EzVisualz/Util.luau +0 -7
  606. package/runtime/EzVisualz/_impl/Dropshadow.luau +0 -148
  607. package/runtime/EzVisualz/_impl/Gradient.luau +0 -452
  608. package/runtime/EzVisualz/_impl/GradientTemplates/Bubblegum.luau +0 -16
  609. package/runtime/EzVisualz/_impl/GradientTemplates/Chrome.luau +0 -16
  610. package/runtime/EzVisualz/_impl/GradientTemplates/Death.luau +0 -15
  611. package/runtime/EzVisualz/_impl/GradientTemplates/Electric.luau +0 -14
  612. package/runtime/EzVisualz/_impl/GradientTemplates/Fire.luau +0 -13
  613. package/runtime/EzVisualz/_impl/GradientTemplates/Galaxy.luau +0 -11
  614. package/runtime/EzVisualz/_impl/GradientTemplates/Ghost.luau +0 -16
  615. package/runtime/EzVisualz/_impl/GradientTemplates/Gold.luau +0 -14
  616. package/runtime/EzVisualz/_impl/GradientTemplates/Green.luau +0 -14
  617. package/runtime/EzVisualz/_impl/GradientTemplates/Ice.luau +0 -14
  618. package/runtime/EzVisualz/_impl/GradientTemplates/Lava.luau +0 -15
  619. package/runtime/EzVisualz/_impl/GradientTemplates/Matrix.luau +0 -19
  620. package/runtime/EzVisualz/_impl/GradientTemplates/Neon.luau +0 -12
  621. package/runtime/EzVisualz/_impl/GradientTemplates/Oceanic.luau +0 -15
  622. package/runtime/EzVisualz/_impl/GradientTemplates/Rainbow.luau +0 -13
  623. package/runtime/EzVisualz/_impl/GradientTemplates/Silver.luau +0 -12
  624. package/runtime/EzVisualz/_impl/GradientTemplates/Sunset.luau +0 -11
  625. package/runtime/EzVisualz/_impl/GradientTemplates/Zebra.luau +0 -18
  626. package/runtime/EzVisualz/_impl/GradientTemplates/init.luau +0 -9
  627. package/runtime/EzVisualz/_impl/LICENSE.md +0 -21
  628. package/runtime/EzVisualz/_impl/Presets/Bubblegum.luau +0 -36
  629. package/runtime/EzVisualz/_impl/Presets/ChromeStroke.luau +0 -15
  630. package/runtime/EzVisualz/_impl/Presets/DeathStroke.luau +0 -15
  631. package/runtime/EzVisualz/_impl/Presets/ElectricStroke.luau +0 -54
  632. package/runtime/EzVisualz/_impl/Presets/FireStroke.luau +0 -29
  633. package/runtime/EzVisualz/_impl/Presets/GalaxyStroke.luau +0 -31
  634. package/runtime/EzVisualz/_impl/Presets/Ghost.luau +0 -10
  635. package/runtime/EzVisualz/_impl/Presets/GhostStroke.luau +0 -15
  636. package/runtime/EzVisualz/_impl/Presets/Gold.luau +0 -10
  637. package/runtime/EzVisualz/_impl/Presets/GoldStroke.luau +0 -15
  638. package/runtime/EzVisualz/_impl/Presets/GreenOutline.luau +0 -23
  639. package/runtime/EzVisualz/_impl/Presets/IceStroke.luau +0 -15
  640. package/runtime/EzVisualz/_impl/Presets/Lava.luau +0 -9
  641. package/runtime/EzVisualz/_impl/Presets/LavaStroke.luau +0 -13
  642. package/runtime/EzVisualz/_impl/Presets/Matrix.luau +0 -21
  643. package/runtime/EzVisualz/_impl/Presets/NeonStroke.luau +0 -30
  644. package/runtime/EzVisualz/_impl/Presets/OceanicStroke.luau +0 -15
  645. package/runtime/EzVisualz/_impl/Presets/Rainbow.luau +0 -9
  646. package/runtime/EzVisualz/_impl/Presets/RainbowOutline.luau +0 -23
  647. package/runtime/EzVisualz/_impl/Presets/RainbowStroke.luau +0 -13
  648. package/runtime/EzVisualz/_impl/Presets/Shine.luau +0 -48
  649. package/runtime/EzVisualz/_impl/Presets/ShineOutline.luau +0 -66
  650. package/runtime/EzVisualz/_impl/Presets/Silver.luau +0 -10
  651. package/runtime/EzVisualz/_impl/Presets/SilverStroke.luau +0 -15
  652. package/runtime/EzVisualz/_impl/Presets/SunsetStroke.luau +0 -31
  653. package/runtime/EzVisualz/_impl/Presets/WaveStroke.luau +0 -33
  654. package/runtime/EzVisualz/_impl/Presets/Zebra.luau +0 -21
  655. package/runtime/EzVisualz/_impl/Presets/init.luau +0 -9
  656. package/runtime/EzVisualz/_impl/Stroke.luau +0 -167
  657. package/runtime/EzVisualz/_impl/Util.luau +0 -7
  658. package/runtime/EzVisualz/_impl/init.luau +0 -319
  659. package/runtime/EzVisualz/_impl/wally.lock +0 -8
  660. package/runtime/EzVisualz/_impl/wally.toml +0 -8
  661. package/runtime/EzVisualz/init.luau +0 -9
  662. package/runtime/EzVisualz/wally.lock +0 -8
  663. package/runtime/EzVisualz/wally.toml +0 -8
  664. package/runtime/FormatNumber/LICENSE.md +0 -25
  665. package/runtime/FormatNumber/Main/DecimalFormatSymbols.lua +0 -43
  666. package/runtime/FormatNumber/Main/IntegerWidth.lua +0 -41
  667. package/runtime/FormatNumber/Main/Notation.lua +0 -116
  668. package/runtime/FormatNumber/Main/Precision.lua +0 -179
  669. package/runtime/FormatNumber/Main/init.lua +0 -199
  670. package/runtime/FormatNumber/Simple/init.lua +0 -76
  671. package/runtime/FormatNumber/Version.lua +0 -82
  672. package/runtime/FormatNumber/_impl/LICENSE.md +0 -25
  673. package/runtime/FormatNumber/_impl/Main/DecimalFormatSymbols.lua +0 -43
  674. package/runtime/FormatNumber/_impl/Main/IntegerWidth.lua +0 -41
  675. package/runtime/FormatNumber/_impl/Main/Notation.lua +0 -116
  676. package/runtime/FormatNumber/_impl/Main/Precision.lua +0 -179
  677. package/runtime/FormatNumber/_impl/Main/init.lua +0 -199
  678. package/runtime/FormatNumber/_impl/Simple/init.lua +0 -76
  679. package/runtime/FormatNumber/_impl/Version.lua +0 -82
  680. package/runtime/FormatNumber/_impl/_internal/class.lua +0 -204
  681. package/runtime/FormatNumber/_impl/_internal/decimal_conversion.lua +0 -30
  682. package/runtime/FormatNumber/_impl/_internal/enums.lua +0 -55
  683. package/runtime/FormatNumber/_impl/_internal/format.lua +0 -342
  684. package/runtime/FormatNumber/_impl/_internal/formatter_settings.lua +0 -160
  685. package/runtime/FormatNumber/_impl/_internal/init.lua +0 -8
  686. package/runtime/FormatNumber/_impl/_internal/skeleton.lua +0 -541
  687. package/runtime/FormatNumber/_impl/init.lua +0 -20
  688. package/runtime/FormatNumber/_internal/class.lua +0 -204
  689. package/runtime/FormatNumber/_internal/decimal_conversion.lua +0 -30
  690. package/runtime/FormatNumber/_internal/enums.lua +0 -55
  691. package/runtime/FormatNumber/_internal/format.lua +0 -342
  692. package/runtime/FormatNumber/_internal/formatter_settings.lua +0 -160
  693. package/runtime/FormatNumber/_internal/init.lua +0 -8
  694. package/runtime/FormatNumber/_internal/skeleton.lua +0 -541
  695. package/runtime/FormatNumber/init.lua +0 -20
  696. package/runtime/FormatNumber/init.luau +0 -20
  697. package/runtime/Fusion/Animation/ExternalTime.luau +0 -84
  698. package/runtime/Fusion/Animation/Spring.luau +0 -313
  699. package/runtime/Fusion/Animation/Stopwatch.luau +0 -128
  700. package/runtime/Fusion/Animation/Tween.luau +0 -178
  701. package/runtime/Fusion/Animation/getTweenDuration.luau +0 -27
  702. package/runtime/Fusion/Animation/getTweenRatio.luau +0 -47
  703. package/runtime/Fusion/Animation/lerpType.luau +0 -164
  704. package/runtime/Fusion/Animation/packType.luau +0 -100
  705. package/runtime/Fusion/Animation/springCoefficients.luau +0 -80
  706. package/runtime/Fusion/Animation/unpackType.luau +0 -103
  707. package/runtime/Fusion/Colour/Oklab.luau +0 -70
  708. package/runtime/Fusion/Colour/sRGB.luau +0 -47
  709. package/runtime/Fusion/External.luau +0 -156
  710. package/runtime/Fusion/ExternalDebug.luau +0 -70
  711. package/runtime/Fusion/Graph/Observer.luau +0 -111
  712. package/runtime/Fusion/Graph/castToGraph.luau +0 -29
  713. package/runtime/Fusion/Graph/change.luau +0 -81
  714. package/runtime/Fusion/Graph/depend.luau +0 -33
  715. package/runtime/Fusion/Graph/evaluate.luau +0 -56
  716. package/runtime/Fusion/Instances/Attribute.luau +0 -58
  717. package/runtime/Fusion/Instances/AttributeChange.luau +0 -47
  718. package/runtime/Fusion/Instances/AttributeOut.luau +0 -63
  719. package/runtime/Fusion/Instances/Child.luau +0 -21
  720. package/runtime/Fusion/Instances/Children.luau +0 -148
  721. package/runtime/Fusion/Instances/Hydrate.luau +0 -29
  722. package/runtime/Fusion/Instances/New.luau +0 -48
  723. package/runtime/Fusion/Instances/OnChange.luau +0 -50
  724. package/runtime/Fusion/Instances/OnEvent.luau +0 -54
  725. package/runtime/Fusion/Instances/Out.luau +0 -69
  726. package/runtime/Fusion/Instances/Tag.luau +0 -61
  727. package/runtime/Fusion/Instances/applyInstanceProps.luau +0 -149
  728. package/runtime/Fusion/Instances/defaultProps.luau +0 -194
  729. package/runtime/Fusion/LICENSE +0 -21
  730. package/runtime/Fusion/Logging/formatError.luau +0 -49
  731. package/runtime/Fusion/Logging/messages.luau +0 -46
  732. package/runtime/Fusion/Logging/parseError.luau +0 -25
  733. package/runtime/Fusion/Memory/checkLifetime.luau +0 -134
  734. package/runtime/Fusion/Memory/deriveScope.luau +0 -24
  735. package/runtime/Fusion/Memory/deriveScopeImpl.luau +0 -40
  736. package/runtime/Fusion/Memory/doCleanup.luau +0 -91
  737. package/runtime/Fusion/Memory/innerScope.luau +0 -34
  738. package/runtime/Fusion/Memory/insert.luau +0 -22
  739. package/runtime/Fusion/Memory/needsDestruction.luau +0 -17
  740. package/runtime/Fusion/Memory/scoped.luau +0 -24
  741. package/runtime/Fusion/RobloxExternal.luau +0 -98
  742. package/runtime/Fusion/State/Computed.luau +0 -122
  743. package/runtime/Fusion/State/For/Disassembly.luau +0 -207
  744. package/runtime/Fusion/State/For/ForTypes.luau +0 -30
  745. package/runtime/Fusion/State/For/init.luau +0 -101
  746. package/runtime/Fusion/State/ForKeys.luau +0 -88
  747. package/runtime/Fusion/State/ForPairs.luau +0 -91
  748. package/runtime/Fusion/State/ForValues.luau +0 -88
  749. package/runtime/Fusion/State/Value.luau +0 -76
  750. package/runtime/Fusion/State/castToState.luau +0 -26
  751. package/runtime/Fusion/State/peek.luau +0 -31
  752. package/runtime/Fusion/State/updateAll.luau +0 -1
  753. package/runtime/Fusion/Types.luau +0 -318
  754. package/runtime/Fusion/Utility/Contextual.luau +0 -91
  755. package/runtime/Fusion/Utility/Safe.luau +0 -23
  756. package/runtime/Fusion/Utility/isSimilar.luau +0 -29
  757. package/runtime/Fusion/Utility/merge.luau +0 -35
  758. package/runtime/Fusion/Utility/nameOf.luau +0 -35
  759. package/runtime/Fusion/Utility/never.luau +0 -14
  760. package/runtime/Fusion/Utility/nicknames.luau +0 -11
  761. package/runtime/Fusion/Utility/xtypeof.luau +0 -27
  762. package/runtime/Fusion/_impl/Animation/ExternalTime.luau +0 -84
  763. package/runtime/Fusion/_impl/Animation/Spring.luau +0 -313
  764. package/runtime/Fusion/_impl/Animation/Stopwatch.luau +0 -128
  765. package/runtime/Fusion/_impl/Animation/Tween.luau +0 -178
  766. package/runtime/Fusion/_impl/Animation/getTweenDuration.luau +0 -27
  767. package/runtime/Fusion/_impl/Animation/getTweenRatio.luau +0 -47
  768. package/runtime/Fusion/_impl/Animation/lerpType.luau +0 -164
  769. package/runtime/Fusion/_impl/Animation/packType.luau +0 -100
  770. package/runtime/Fusion/_impl/Animation/springCoefficients.luau +0 -80
  771. package/runtime/Fusion/_impl/Animation/unpackType.luau +0 -103
  772. package/runtime/Fusion/_impl/Colour/Oklab.luau +0 -70
  773. package/runtime/Fusion/_impl/Colour/sRGB.luau +0 -47
  774. package/runtime/Fusion/_impl/External.luau +0 -156
  775. package/runtime/Fusion/_impl/ExternalDebug.luau +0 -70
  776. package/runtime/Fusion/_impl/Graph/Observer.luau +0 -111
  777. package/runtime/Fusion/_impl/Graph/castToGraph.luau +0 -29
  778. package/runtime/Fusion/_impl/Graph/change.luau +0 -81
  779. package/runtime/Fusion/_impl/Graph/depend.luau +0 -33
  780. package/runtime/Fusion/_impl/Graph/evaluate.luau +0 -56
  781. package/runtime/Fusion/_impl/Instances/Attribute.luau +0 -58
  782. package/runtime/Fusion/_impl/Instances/AttributeChange.luau +0 -47
  783. package/runtime/Fusion/_impl/Instances/AttributeOut.luau +0 -63
  784. package/runtime/Fusion/_impl/Instances/Child.luau +0 -21
  785. package/runtime/Fusion/_impl/Instances/Children.luau +0 -148
  786. package/runtime/Fusion/_impl/Instances/Hydrate.luau +0 -29
  787. package/runtime/Fusion/_impl/Instances/New.luau +0 -48
  788. package/runtime/Fusion/_impl/Instances/OnChange.luau +0 -50
  789. package/runtime/Fusion/_impl/Instances/OnEvent.luau +0 -54
  790. package/runtime/Fusion/_impl/Instances/Out.luau +0 -69
  791. package/runtime/Fusion/_impl/Instances/Tag.luau +0 -61
  792. package/runtime/Fusion/_impl/Instances/applyInstanceProps.luau +0 -149
  793. package/runtime/Fusion/_impl/Instances/defaultProps.luau +0 -194
  794. package/runtime/Fusion/_impl/LICENSE +0 -21
  795. package/runtime/Fusion/_impl/Logging/formatError.luau +0 -49
  796. package/runtime/Fusion/_impl/Logging/messages.luau +0 -46
  797. package/runtime/Fusion/_impl/Logging/parseError.luau +0 -25
  798. package/runtime/Fusion/_impl/Memory/checkLifetime.luau +0 -134
  799. package/runtime/Fusion/_impl/Memory/deriveScope.luau +0 -24
  800. package/runtime/Fusion/_impl/Memory/deriveScopeImpl.luau +0 -40
  801. package/runtime/Fusion/_impl/Memory/doCleanup.luau +0 -91
  802. package/runtime/Fusion/_impl/Memory/innerScope.luau +0 -34
  803. package/runtime/Fusion/_impl/Memory/insert.luau +0 -22
  804. package/runtime/Fusion/_impl/Memory/needsDestruction.luau +0 -17
  805. package/runtime/Fusion/_impl/Memory/scoped.luau +0 -24
  806. package/runtime/Fusion/_impl/RobloxExternal.luau +0 -98
  807. package/runtime/Fusion/_impl/State/Computed.luau +0 -122
  808. package/runtime/Fusion/_impl/State/For/Disassembly.luau +0 -207
  809. package/runtime/Fusion/_impl/State/For/ForTypes.luau +0 -30
  810. package/runtime/Fusion/_impl/State/For/init.luau +0 -101
  811. package/runtime/Fusion/_impl/State/ForKeys.luau +0 -88
  812. package/runtime/Fusion/_impl/State/ForPairs.luau +0 -91
  813. package/runtime/Fusion/_impl/State/ForValues.luau +0 -88
  814. package/runtime/Fusion/_impl/State/Value.luau +0 -76
  815. package/runtime/Fusion/_impl/State/castToState.luau +0 -26
  816. package/runtime/Fusion/_impl/State/peek.luau +0 -31
  817. package/runtime/Fusion/_impl/State/updateAll.luau +0 -1
  818. package/runtime/Fusion/_impl/Types.luau +0 -318
  819. package/runtime/Fusion/_impl/Utility/Contextual.luau +0 -91
  820. package/runtime/Fusion/_impl/Utility/Safe.luau +0 -23
  821. package/runtime/Fusion/_impl/Utility/isSimilar.luau +0 -29
  822. package/runtime/Fusion/_impl/Utility/merge.luau +0 -35
  823. package/runtime/Fusion/_impl/Utility/nameOf.luau +0 -35
  824. package/runtime/Fusion/_impl/Utility/never.luau +0 -14
  825. package/runtime/Fusion/_impl/Utility/nicknames.luau +0 -11
  826. package/runtime/Fusion/_impl/Utility/xtypeof.luau +0 -27
  827. package/runtime/Fusion/_impl/init.luau +0 -83
  828. package/runtime/Fusion/init.luau +0 -27
  829. package/runtime/Iris/API.lua +0 -2085
  830. package/runtime/Iris/Internal.lua +0 -895
  831. package/runtime/Iris/LICENSE.txt +0 -21
  832. package/runtime/Iris/PubTypes.lua +0 -43
  833. package/runtime/Iris/Types.lua +0 -660
  834. package/runtime/Iris/WidgetTypes.lua +0 -521
  835. package/runtime/Iris/_impl/API.lua +0 -2085
  836. package/runtime/Iris/_impl/Internal.lua +0 -895
  837. package/runtime/Iris/_impl/LICENSE.txt +0 -21
  838. package/runtime/Iris/_impl/PubTypes.lua +0 -43
  839. package/runtime/Iris/_impl/Types.lua +0 -660
  840. package/runtime/Iris/_impl/WidgetTypes.lua +0 -521
  841. package/runtime/Iris/_impl/config.lua +0 -305
  842. package/runtime/Iris/_impl/init.lua +0 -696
  843. package/runtime/Iris/_impl/widgets/Button.lua +0 -90
  844. package/runtime/Iris/_impl/widgets/Checkbox.lua +0 -115
  845. package/runtime/Iris/_impl/widgets/Combo.lua +0 -492
  846. package/runtime/Iris/_impl/widgets/Format.lua +0 -140
  847. package/runtime/Iris/_impl/widgets/Image.lua +0 -155
  848. package/runtime/Iris/_impl/widgets/Input.lua +0 -1232
  849. package/runtime/Iris/_impl/widgets/Menu.lua +0 -599
  850. package/runtime/Iris/_impl/widgets/Plot.lua +0 -639
  851. package/runtime/Iris/_impl/widgets/RadioButton.lua +0 -126
  852. package/runtime/Iris/_impl/widgets/Root.lua +0 -143
  853. package/runtime/Iris/_impl/widgets/Tab.lua +0 -333
  854. package/runtime/Iris/_impl/widgets/Table.lua +0 -635
  855. package/runtime/Iris/_impl/widgets/Text.lua +0 -132
  856. package/runtime/Iris/_impl/widgets/Tree.lua +0 -287
  857. package/runtime/Iris/_impl/widgets/Window.lua +0 -1075
  858. package/runtime/Iris/_impl/widgets/init.lua +0 -447
  859. package/runtime/Iris/config.lua +0 -305
  860. package/runtime/Iris/init.lua +0 -696
  861. package/runtime/Iris/init.luau +0 -12
  862. package/runtime/Iris/widgets/Button.lua +0 -90
  863. package/runtime/Iris/widgets/Checkbox.lua +0 -115
  864. package/runtime/Iris/widgets/Combo.lua +0 -492
  865. package/runtime/Iris/widgets/Format.lua +0 -140
  866. package/runtime/Iris/widgets/Image.lua +0 -155
  867. package/runtime/Iris/widgets/Input.lua +0 -1232
  868. package/runtime/Iris/widgets/Menu.lua +0 -599
  869. package/runtime/Iris/widgets/Plot.lua +0 -639
  870. package/runtime/Iris/widgets/RadioButton.lua +0 -126
  871. package/runtime/Iris/widgets/Root.lua +0 -143
  872. package/runtime/Iris/widgets/Tab.lua +0 -333
  873. package/runtime/Iris/widgets/Table.lua +0 -635
  874. package/runtime/Iris/widgets/Text.lua +0 -132
  875. package/runtime/Iris/widgets/Tree.lua +0 -287
  876. package/runtime/Iris/widgets/Window.lua +0 -1075
  877. package/runtime/Iris/widgets/init.lua +0 -447
  878. package/runtime/Janitor/FastDefer.luau +0 -33
  879. package/runtime/Janitor/LICENSE +0 -21
  880. package/runtime/Janitor/_impl/FastDefer.luau +0 -33
  881. package/runtime/Janitor/_impl/LICENSE +0 -21
  882. package/runtime/Janitor/_impl/init.luau +0 -999
  883. package/runtime/Janitor/init.luau +0 -15
  884. package/runtime/MathUtils/init.luau +0 -100
  885. package/runtime/Module3D/LICENSE +0 -21
  886. package/runtime/Module3D/_impl/LICENSE +0 -21
  887. package/runtime/Module3D/_impl/init.luau +0 -269
  888. package/runtime/Module3D/init.luau +0 -14
  889. package/runtime/Spring/LICENSE +0 -201
  890. package/runtime/Spring/_impl/LICENSE +0 -201
  891. package/runtime/Spring/_impl/init.luau +0 -111
  892. package/runtime/Spring/init.luau +0 -24
  893. package/runtime/StateMachine/Classes/State.lua +0 -375
  894. package/runtime/StateMachine/Classes/Transition.lua +0 -336
  895. package/runtime/StateMachine/Functions/deepCopy.lua +0 -19
  896. package/runtime/StateMachine/Functions/mergeTables.lua +0 -22
  897. package/runtime/StateMachine/LICENSE +0 -19
  898. package/runtime/StateMachine/Vendor/Signal.lua +0 -386
  899. package/runtime/StateMachine/Vendor/Trove.lua +0 -188
  900. package/runtime/StateMachine/_impl/Classes/State.lua +0 -375
  901. package/runtime/StateMachine/_impl/Classes/Transition.lua +0 -336
  902. package/runtime/StateMachine/_impl/Functions/deepCopy.lua +0 -19
  903. package/runtime/StateMachine/_impl/Functions/mergeTables.lua +0 -22
  904. package/runtime/StateMachine/_impl/LICENSE +0 -19
  905. package/runtime/StateMachine/_impl/Vendor/Signal.lua +0 -386
  906. package/runtime/StateMachine/_impl/Vendor/Trove.lua +0 -188
  907. package/runtime/StateMachine/_impl/init.lua +0 -595
  908. package/runtime/StateMachine/init.lua +0 -595
  909. package/runtime/StateMachine/init.luau +0 -10
  910. package/runtime/StickyBillboard/init.luau +0 -167
  911. package/runtime/TopbarPlus/Attribute.lua +0 -35
  912. package/runtime/TopbarPlus/Elements/Caption.lua +0 -316
  913. package/runtime/TopbarPlus/Elements/Container.lua +0 -215
  914. package/runtime/TopbarPlus/Elements/Dropdown.lua +0 -315
  915. package/runtime/TopbarPlus/Elements/Indicator.lua +0 -91
  916. package/runtime/TopbarPlus/Elements/Menu.lua +0 -180
  917. package/runtime/TopbarPlus/Elements/Notice.lua +0 -113
  918. package/runtime/TopbarPlus/Elements/Selection.lua +0 -49
  919. package/runtime/TopbarPlus/Elements/Widget.lua +0 -437
  920. package/runtime/TopbarPlus/Features/Gamepad.lua +0 -201
  921. package/runtime/TopbarPlus/Features/Overflow.lua +0 -360
  922. package/runtime/TopbarPlus/Features/Themes/Classic.lua +0 -27
  923. package/runtime/TopbarPlus/Features/Themes/Default.lua +0 -75
  924. package/runtime/TopbarPlus/Features/Themes/init.lua +0 -353
  925. package/runtime/TopbarPlus/LICENSE +0 -381
  926. package/runtime/TopbarPlus/Packages/GoodSignal.lua +0 -182
  927. package/runtime/TopbarPlus/Packages/Janitor.lua +0 -322
  928. package/runtime/TopbarPlus/Reference.lua +0 -30
  929. package/runtime/TopbarPlus/Types.lua +0 -477
  930. package/runtime/TopbarPlus/Utility.lua +0 -462
  931. package/runtime/TopbarPlus/VERSION.lua +0 -51
  932. package/runtime/TopbarPlus/_impl/Attribute.lua +0 -35
  933. package/runtime/TopbarPlus/_impl/Elements/Caption.lua +0 -316
  934. package/runtime/TopbarPlus/_impl/Elements/Container.lua +0 -215
  935. package/runtime/TopbarPlus/_impl/Elements/Dropdown.lua +0 -315
  936. package/runtime/TopbarPlus/_impl/Elements/Indicator.lua +0 -91
  937. package/runtime/TopbarPlus/_impl/Elements/Menu.lua +0 -180
  938. package/runtime/TopbarPlus/_impl/Elements/Notice.lua +0 -113
  939. package/runtime/TopbarPlus/_impl/Elements/Selection.lua +0 -49
  940. package/runtime/TopbarPlus/_impl/Elements/Widget.lua +0 -437
  941. package/runtime/TopbarPlus/_impl/Features/Gamepad.lua +0 -201
  942. package/runtime/TopbarPlus/_impl/Features/Overflow.lua +0 -360
  943. package/runtime/TopbarPlus/_impl/Features/Themes/Classic.lua +0 -27
  944. package/runtime/TopbarPlus/_impl/Features/Themes/Default.lua +0 -75
  945. package/runtime/TopbarPlus/_impl/Features/Themes/init.lua +0 -353
  946. package/runtime/TopbarPlus/_impl/LICENSE +0 -381
  947. package/runtime/TopbarPlus/_impl/Packages/GoodSignal.lua +0 -182
  948. package/runtime/TopbarPlus/_impl/Packages/Janitor.lua +0 -322
  949. package/runtime/TopbarPlus/_impl/Reference.lua +0 -30
  950. package/runtime/TopbarPlus/_impl/Types.lua +0 -477
  951. package/runtime/TopbarPlus/_impl/Utility.lua +0 -462
  952. package/runtime/TopbarPlus/_impl/VERSION.lua +0 -51
  953. package/runtime/TopbarPlus/_impl/init.lua +0 -1249
  954. package/runtime/TopbarPlus/init.lua +0 -1249
  955. package/runtime/TopbarPlus/init.luau +0 -8
  956. package/runtime/Twinkle/init.luau +0 -157
  957. package/runtime/VfxUtil/init.luau +0 -164
  958. package/templates/game/src/server/leaderstats.server.clpp +0 -29
  959. package/templates/game/src/shared/config.clp +0 -6
  960. /package/runtime/{DataService → Keep}/Enum.luau +0 -0
  961. /package/runtime/{DataService → Keep}/Enums.luau +0 -0
  962. /package/runtime/{DataService → Keep}/Path.luau +0 -0
@@ -1,886 +1,883 @@
1
- local packages = script.Parent.Packages
2
-
3
- const Signal = require(packages.signal)
4
-
5
- const Path = require(script.Parent.Path)
6
- const Enums = require(script.Parent.Enums)
7
- const PackageEnum = require(script.Parent.Enum)
8
-
9
- type SignalT = typeof(Signal.new())
10
- type AnyConnection = RBXScriptConnection
11
- type TypedSignal<T...> = {
12
- Connect: (self: TypedSignal<T...>, fn: (T...) -> ()) -> AnyConnection,
13
- Once: (self: TypedSignal<T...>, fn: (T...) -> ()) -> AnyConnection,
14
- Wait: (self: TypedSignal<T...>) -> T...,
15
- }
16
-
17
- const Data = {}
18
-
19
- --[=[
20
- @class Data
21
- Per-player data instance. Writable on the server, read-only on the client.
22
- Use `Get()` for merged reads and `GetPersisted()` for saved ProfileStore values.
23
- ]=]
24
- const ROOT_KEY = {}
25
- const WRITABLE_KEY = {}
26
- const STRICT_PATHS_KEY = {}
27
- const AUTO_CREATE_KEY = {}
28
- const CHANGED_MAP_KEY = {}
29
- const INDEX_CHANGED_MAP_KEY = {}
30
- const ARRAY_INSERTED_MAP_KEY = {}
31
- const ARRAY_REMOVED_MAP_KEY = {}
32
- const TRANSIENT_KEY = {}
33
-
34
- export type DataPath = Path.Path
35
- export type DataPathLike = Path.Path | Path.PathToken<never>
36
- export type DataOptions<T = never> = {
37
- StrictPaths: boolean?,
38
- AutoCreateMissingTables: boolean?,
39
- Template: T?,
40
- }
41
- export type OrderedListOrder = typeof(PackageEnum.OrderList.Asc) | typeof(PackageEnum.OrderList.Desc) | "asc" | "desc"
42
- export type OrderedListOptions = {
43
- key: string,
44
- order: OrderedListOrder?,
45
- limit: number?,
46
- }
47
- export type OrderedListEntry<V> = {
48
- index: number,
49
- value: V,
50
- priority: any,
51
- }
52
- type TypedPath<V> = Path.PathToken<V>
53
- type ChangedSignal<V> = TypedSignal<V, V>
54
- type IndexChangedSignal<V> = TypedSignal<string | number, V, V>
55
- type ArrayInsertedSignal<V> = TypedSignal<number, V>
56
- type ArrayRemovedSignal<V> = TypedSignal<number, V>
57
- type DataCore<T> = {
58
- Changed: SignalT,
59
- Destroyed: boolean,
60
- Typed: <V>(self: DataCore<T>, path: DataPathLike) -> TypedPath<V>,
61
- Get: <V>(self: DataCore<T>, path: TypedPath<V> | DataPathLike?) -> V,
62
- GetPersisted: <V>(self: DataCore<T>, path: TypedPath<V> | DataPathLike?) -> V,
63
- GetTransient: <V>(self: DataCore<T>, path: TypedPath<V> | DataPathLike?) -> V?,
64
- HasTransient: (self: DataCore<T>, path: DataPathLike?) -> boolean,
65
- Set: <V>(self: DataCore<T>, path: TypedPath<V> | DataPathLike, value: V) -> (),
66
- SetTransient: <V>(self: DataCore<T>, path: TypedPath<V> | DataPathLike, value: V) -> (),
67
- Update: <V>(self: DataCore<T>, path: TypedPath<V> | DataPathLike, fn: (V) -> V) -> V,
68
- UpdateTransient: <V>(self: DataCore<T>, path: TypedPath<V> | DataPathLike, fn: (V) -> V) -> V,
69
- ClearTransient: (self: DataCore<T>, path: DataPathLike?) -> (),
70
- ArrayInsert: <V>(self: DataCore<T>, path: TypedPath<{ V }> | DataPathLike, value: V, index: number?) -> (),
71
- ArrayInsertTransient: <V>(self: DataCore<T>, path: TypedPath<{ V }> | DataPathLike, value: V, index: number?) -> (),
72
- ArrayRemove: <V>(self: DataCore<T>, path: TypedPath<{ V }> | DataPathLike, index: number) -> V,
73
- ArrayRemoveTransient: <V>(self: DataCore<T>, path: TypedPath<{ V }> | DataPathLike, index: number) -> V,
74
- GetOrderedList: <V>(self: DataCore<T>, path: TypedPath<{ V }> | DataPathLike, options: OrderedListOptions) -> { OrderedListEntry<V> },
75
- GetOrderedListWithPriority: <V>(
76
- self: DataCore<T>,
77
- path: TypedPath<{ V }> | DataPathLike,
78
- key: string,
79
- order: OrderedListOrder?
80
- ) -> { OrderedListEntry<V> },
81
- GetChangedSignal: <V>(self: DataCore<T>, path: TypedPath<V> | DataPathLike) -> ChangedSignal<V>,
82
- GetPathChangedSignal: <V>(self: DataCore<T>, path: TypedPath<V> | DataPathLike) -> ChangedSignal<V>,
83
- GetIndexChangedSignal: <V>(self: DataCore<T>, path: TypedPath<V> | DataPathLike) -> IndexChangedSignal<V>,
84
- GetArrayInsertedSignal: <V>(self: DataCore<T>, path: TypedPath<{ V }> | DataPathLike) -> ArrayInsertedSignal<V>,
85
- GetArrayRemovedSignal: <V>(self: DataCore<T>, path: TypedPath<{ V }> | DataPathLike) -> ArrayRemovedSignal<V>,
86
- Destroy: (self: DataCore<T>) -> (),
87
- }
88
- export type Data<T> = DataCore<T>
89
-
90
- const READ_ONLY_ERROR = "DataService: Data on the client is read-only. Mutations are server-driven."
91
- const INVALID_PATH_ERROR = "DataService: invalid data path %q"
92
-
93
- const pathToString = function(path: DataPath): string
94
- if #path == 0 then
95
- return "<root>"
96
- end
97
- local parts = table.create(#path)
98
- for i, segment in path do
99
- parts[i] = tostring(segment)
100
- end
101
- return table.concat(parts, ".")
102
- end
103
-
104
- const normalizePath = function(pathLike: DataPathLike?, allowNil: boolean?): DataPath?
105
- local resolved = Path.toArray(pathLike)
106
- if resolved == nil then
107
- if allowNil then
108
- return nil
109
- end
110
- error("DataService: path is required")
111
- end
112
- if not Path.validate(resolved) then
113
- error(string.format(INVALID_PATH_ERROR, pathToString(resolved)))
114
- end
115
- return resolved
116
- end
117
-
118
- const pathFromKey = function(key: string): DataPath
119
- if key == "" then
120
- return {}
121
- end
122
- local path = table.create(4)
123
- for part in string.gmatch(key, "[^\0]+") do
124
- local kind = string.sub(part, 1, 1)
125
- local value = string.sub(part, 3)
126
- if kind == "s" then
127
- path[#path + 1] = value
128
- elseif kind == "n" then
129
- path[#path + 1] = tonumber(value)
130
- end
131
- end
132
- return path
133
- end
134
-
135
- const isDescendantPath = function(childKey: string, parentKey: string): boolean
136
- if parentKey == "" then
137
- return childKey ~= ""
138
- end
139
- return childKey == parentKey or string.sub(childKey, 1, #parentKey + 1) == parentKey .. "\0"
140
- end
141
-
142
- local function deepCopyTable(value: any): any
143
- if type(value) ~= "table" then
144
- return value
145
- end
146
- local out = {}
147
- for k, v in value do
148
- out[k] = deepCopyTable(v)
149
- end
150
- return out
151
- end
152
-
153
- const setAtPath = function(root: any, path: DataPath, value: any)
154
- if #path == 0 then
155
- return
156
- end
157
- local parent = root
158
- for i = 1, #path - 1 do
159
- local k = path[i]
160
- local nextValue = rawget(parent, k)
161
- if type(nextValue) ~= "table" then
162
- nextValue = {}
163
- rawset(parent, k, nextValue)
164
- end
165
- parent = nextValue
166
- end
167
- rawset(parent, path[#path], value)
168
- end
169
-
170
- const getPersistedAt = function(root: any, path: DataPath?): any
171
- if not path or #path == 0 then
172
- return root
173
- end
174
- local cur: any = root
175
- for _, k in path do
176
- if type(cur) ~= "table" then
177
- return nil
178
- end
179
- cur = rawget(cur, k)
180
- end
181
- return cur
182
- end
183
-
184
- const getMergedValue = function(self: any, path: DataPath): any
185
- local transient = self[TRANSIENT_KEY]
186
- local key = Path.toKey(path)
187
- local direct = transient[key]
188
- if direct ~= nil then
189
- return direct
190
- end
191
-
192
- if #path == 0 then
193
- local persisted = self[ROOT_KEY]
194
- local out = if type(persisted) == "table" then deepCopyTable(persisted) else {}
195
- for tKey, tVal in transient do
196
- setAtPath(out, pathFromKey(tKey), tVal)
197
- end
198
- return out
199
- end
200
-
201
- local persisted = getPersistedAt(self[ROOT_KEY], path)
202
- local hasDescendant = false
203
- for tKey in transient do
204
- if isDescendantPath(tKey, key) then
205
- hasDescendant = true
206
- break
207
- end
208
- end
209
- if not hasDescendant then
210
- return persisted
211
- end
212
-
213
- local out = if type(persisted) == "table" then deepCopyTable(persisted) else {}
214
- for tKey, tVal in transient do
215
- if isDescendantPath(tKey, key) then
216
- local tPath = pathFromKey(tKey)
217
- local relative = table.create(math.max(#tPath - #path, 0))
218
- for i = #path + 1, #tPath do
219
- relative[#relative + 1] = tPath[i]
220
- end
221
- if #relative > 0 then
222
- setAtPath(out, relative, tVal)
223
- end
224
- end
225
- end
226
- return out
227
- end
228
-
229
- const copyArray = function(value: any): { any }
230
- local out = table.create(#value)
231
- for index, item in value do
232
- out[index] = if type(item) == "table" then deepCopyTable(item) else item
233
- end
234
- return out
235
- end
236
-
237
- function Data.new<T>(initial: T, writable: boolean?, options: DataOptions<T>?): Data<T>
238
- local self: any
239
- self = {
240
- Get = function(a, b)
241
- local path = if a == self then b else a
242
- return Data.Get(self, path)
243
- end,
244
- GetPersisted = function(a, b)
245
- local path = if a == self then b else a
246
- return Data.GetPersisted(self, path)
247
- end,
248
- GetTransient = function(a, b)
249
- local path = if a == self then b else a
250
- return Data.GetTransient(self, path)
251
- end,
252
- HasTransient = function(a, b)
253
- local path = if a == self then b else a
254
- return Data.HasTransient(self, path)
255
- end,
256
- Set = function(a, b, c)
257
- local path = if a == self then b else a
258
- local value = if a == self then c else b
259
- return Data.Set(self, path, value)
260
- end,
261
- SetTransient = function(a, b, c)
262
- local path = if a == self then b else a
263
- local value = if a == self then c else b
264
- return Data.SetTransient(self, path, value)
265
- end,
266
- Update = function(a, b, c)
267
- local path = if a == self then b else a
268
- local fn = if a == self then c else b
269
- return Data.Update(self, path, fn)
270
- end,
271
- UpdateTransient = function(a, b, c)
272
- local path = if a == self then b else a
273
- local fn = if a == self then c else b
274
- return Data.UpdateTransient(self, path, fn)
275
- end,
276
- ClearTransient = function(a, b)
277
- local path = if a == self then b else a
278
- return Data.ClearTransient(self, path)
279
- end,
280
- ArrayInsert = function(a, b, c, d)
281
- local path = if a == self then b else a
282
- local value = if a == self then c else b
283
- local index = if a == self then d else c
284
- return Data.ArrayInsert(self, path, value, index)
285
- end,
286
- ArrayInsertTransient = function(a, b, c, d)
287
- local path = if a == self then b else a
288
- local value = if a == self then c else b
289
- local index = if a == self then d else c
290
- return Data.ArrayInsertTransient(self, path, value, index)
291
- end,
292
- ArrayRemove = function(a, b, c)
293
- local path = if a == self then b else a
294
- local index = if a == self then c else b
295
- return Data.ArrayRemove(self, path, index)
296
- end,
297
- ArrayRemoveTransient = function(a, b, c)
298
- local path = if a == self then b else a
299
- local index = if a == self then c else b
300
- return Data.ArrayRemoveTransient(self, path, index)
301
- end,
302
- GetOrderedList = function(a, b, c)
303
- local path = if a == self then b else a
304
- local options = if a == self then c else b
305
- return Data.GetOrderedList(self, path, options)
306
- end,
307
- GetOrderedListWithPriority = function(a, b, c, d)
308
- local path = if a == self then b else a
309
- local key = if a == self then c else b
310
- local order = if a == self then d else c
311
- return Data.GetOrderedListWithPriority(self, path, key, order)
312
- end,
313
- GetChangedSignal = function(a, b)
314
- local path = if a == self then b else a
315
- return Data.GetChangedSignal(self, path)
316
- end,
317
- GetPathChangedSignal = function(a, b)
318
- local path = if a == self then b else a
319
- return Data.GetPathChangedSignal(self, path)
320
- end,
321
- GetIndexChangedSignal = function(a, b)
322
- local path = if a == self then b else a
323
- return Data.GetIndexChangedSignal(self, path)
324
- end,
325
- GetArrayInsertedSignal = function(a, b)
326
- local path = if a == self then b else a
327
- return Data.GetArrayInsertedSignal(self, path)
328
- end,
329
- GetArrayRemovedSignal = function(a, b)
330
- local path = if a == self then b else a
331
- return Data.GetArrayRemovedSignal(self, path)
332
- end,
333
- Typed = function(a, b)
334
- local path = if a == self then b else a
335
- return Data.Typed(self, path)
336
- end,
337
- Destroy = function()
338
- return Data.Destroy(self)
339
- end,
340
- [ROOT_KEY] = initial,
341
- [WRITABLE_KEY] = writable ~= false,
342
- [STRICT_PATHS_KEY] = if options and options.StrictPaths ~= nil then options.StrictPaths else true,
343
- [AUTO_CREATE_KEY] = if options and options.AutoCreateMissingTables ~= nil then options.AutoCreateMissingTables else false,
344
- [CHANGED_MAP_KEY] = {} :: { [string]: SignalT },
345
- [INDEX_CHANGED_MAP_KEY] = {} :: { [string]: SignalT },
346
- [ARRAY_INSERTED_MAP_KEY] = {} :: { [string]: SignalT },
347
- [ARRAY_REMOVED_MAP_KEY] = {} :: { [string]: SignalT },
348
- [TRANSIENT_KEY] = {} :: { [string]: any },
349
- Changed = Signal.new(),
350
- Destroyed = false,
351
- }
352
-
353
- return (self :: any) :: Data<T>
354
- end
355
-
356
- const descend = function(root: any, path: DataPath?, ensureLeaf: boolean): (any?, any?)
357
- if not path or #path == 0 then
358
- return nil, nil
359
- end
360
- local parent = root
361
- for i = 1, #path - 1 do
362
- local k = path[i]
363
- local nextValue = rawget(parent, k)
364
- if type(nextValue) ~= "table" then
365
- if ensureLeaf then
366
- rawset(parent, k, {})
367
- nextValue = rawget(parent, k)
368
- else
369
- return nil, nil
370
- end
371
- end
372
- parent = nextValue
373
- end
374
- return parent, path[#path]
375
- end
376
-
377
- --[=[
378
- @method Get
379
- @within Data
380
- @param path PathToken? -- Path tipado ou array legado. Omita para a raiz merged.
381
- @return any
382
- Reads the merged value (persisted + transient overlay). Omit path for the full root.
383
- ]=]
384
- function Data:Get(path: DataPathLike?): any
385
- local normalized = normalizePath(path, true) or {}
386
- return getMergedValue(self, normalized)
387
- end
388
-
389
- --[=[
390
- @method GetPersisted
391
- @within Data
392
- @tag Query
393
- @param path PathToken?
394
- @return any
395
- Reads the saved ProfileStore value only (ignores transient overlay).
396
- ]=]
397
- function Data:GetPersisted(path: DataPathLike?): any
398
- local normalized = normalizePath(path, true)
399
- if not normalized or #normalized == 0 then
400
- return self[ROOT_KEY]
401
- end
402
- return getPersistedAt(self[ROOT_KEY], normalized)
403
- end
404
-
405
- --[=[
406
- @method GetTransient
407
- @within Data
408
- @tag Query
409
- @param path PathToken?
410
- @return any?
411
- Reads the transient overlay at path, if present.
412
- ]=]
413
- function Data:GetTransient(path: DataPathLike?): any
414
- local normalized = normalizePath(path, true) or {}
415
- return self[TRANSIENT_KEY][Path.toKey(normalized)]
416
- end
417
-
418
- --[=[
419
- @method HasTransient
420
- @within Data
421
- @tag Query
422
- @param path PathToken?
423
- @return boolean
424
- Returns whether a transient overlay exists at or below the path.
425
- ]=]
426
- function Data:HasTransient(path: DataPathLike?): boolean
427
- local normalized = normalizePath(path, true) or {}
428
- local key = Path.toKey(normalized)
429
- local transient = self[TRANSIENT_KEY]
430
- if transient[key] ~= nil then
431
- return true
432
- end
433
- for tKey in transient do
434
- if isDescendantPath(tKey, key) then
435
- return true
436
- end
437
- end
438
- return false
439
- end
440
-
441
- --[=[
442
- @method Typed
443
- @within Data
444
- @param path PathToken
445
- @return PathToken
446
- Type helper for stronger inference in signals and read/write calls.
447
- ]=]
448
- function Data:Typed(path: DataPathLike): any
449
- return path :: any
450
- end
451
-
452
- function Data:_fireChanged(path: DataPath, newValue: any, oldValue: any)
453
- if newValue == oldValue then
454
- return
455
- end
456
- local key = Path.toKey(path)
457
- local sig = self[CHANGED_MAP_KEY][key]
458
- if sig then
459
- sig:Fire(newValue, oldValue)
460
- end
461
- if #path > 0 then
462
- local parentKey = Path.toKey(Path.parent(path))
463
- local idx = self[INDEX_CHANGED_MAP_KEY][parentKey]
464
- if idx then
465
- idx:Fire(path[#path], newValue, oldValue)
466
- end
467
- end
468
- end
469
-
470
- function Data:_applySet(path: DataPath, value: any)
471
- assert(path and #path > 0, "Data: path must be non-empty")
472
- local parent, key = descend(self[ROOT_KEY], path, self[AUTO_CREATE_KEY])
473
- assert(parent ~= nil and key ~= nil, string.format(INVALID_PATH_ERROR, pathToString(path)))
474
- local old = rawget(parent, key)
475
- if self[STRICT_PATHS_KEY] and not self[AUTO_CREATE_KEY] and old == nil and type(key) ~= "number" then
476
- error(string.format(INVALID_PATH_ERROR, pathToString(path)))
477
- end
478
- rawset(parent, key, value)
479
- Data._fireChanged(self, path, value, old)
480
- end
481
-
482
- function Data._applyTransientSet(self: any, path: DataPath, value: any)
483
- local oldMerged = Data.Get(self, path)
484
- self[TRANSIENT_KEY][Path.toKey(path)] = value
485
- local newMerged = Data.Get(self, path)
486
- Data._fireChanged(self, path, newMerged, oldMerged)
487
- end
488
-
489
- function Data._applyTransientArrayInsert(self: any, path: DataPath, value: any, index: number?)
490
- local current = Data.Get(self, path)
491
- local arr = if type(current) == "table" then copyArray(current) else {}
492
- if index then
493
- table.insert(arr, index, value)
494
- else
495
- table.insert(arr, value)
496
- index = #arr
497
- end
498
- Data._applyTransientSet(self, path, arr)
499
- local sig = self[ARRAY_INSERTED_MAP_KEY][Path.toKey(path)]
500
- if sig then
501
- sig:Fire(index, value)
502
- end
503
- end
504
-
505
- function Data._applyTransientArrayRemove(self: any, path: DataPath, index: number): any
506
- local current = Data.Get(self, path)
507
- local arr = if type(current) == "table" then copyArray(current) else {}
508
- local removed = table.remove(arr, index)
509
- Data._applyTransientSet(self, path, arr)
510
- local sig = self[ARRAY_REMOVED_MAP_KEY][Path.toKey(path)]
511
- if sig then
512
- sig:Fire(index, removed)
513
- end
514
- return removed
515
- end
516
-
517
- function Data._applyTransientClear(self: any, path: DataPath?)
518
- if path then
519
- local key = Path.toKey(path)
520
- if self[TRANSIENT_KEY][key] == nil then
521
- return
522
- end
523
- local oldMerged = Data.Get(self, path)
524
- self[TRANSIENT_KEY][key] = nil
525
- local newMerged = Data.Get(self, path)
526
- Data._fireChanged(self, path, newMerged, oldMerged)
527
- return
528
- end
529
-
530
- if next(self[TRANSIENT_KEY]) == nil then
531
- return
532
- end
533
- table.clear(self[TRANSIENT_KEY])
534
- end
535
-
536
- function Data:_applyArrayInsert(path: DataPath, value: any, index: number?)
537
- local arr = getPersistedAt(self[ROOT_KEY], path)
538
- assert(type(arr) == "table", "Data: ArrayInsert requires an array path")
539
- if index then
540
- table.insert(arr, index, value)
541
- else
542
- table.insert(arr, value)
543
- index = #arr
544
- end
545
- local sig = self[ARRAY_INSERTED_MAP_KEY][Path.toKey(path)]
546
- if sig then
547
- sig:Fire(index, value)
548
- end
549
- end
550
-
551
- function Data:_applyArrayRemove(path: DataPath, index: number): any
552
- local arr = getPersistedAt(self[ROOT_KEY], path)
553
- assert(type(arr) == "table", "Data: ArrayRemove requires an array path")
554
- local removed = table.remove(arr, index)
555
- local sig = self[ARRAY_REMOVED_MAP_KEY][Path.toKey(path)]
556
- if sig then
557
- sig:Fire(index, removed)
558
- end
559
- return removed
560
- end
561
-
562
- --[=[
563
- @method Set
564
- @within Data
565
- @tag Mutation
566
- @param path PathToken
567
- @param value any
568
- Writes and persists to ProfileStore. **Server only.**
569
- ]=]
570
- function Data:Set(path: DataPathLike, value: any)
571
- assert(self[WRITABLE_KEY], READ_ONLY_ERROR)
572
- local normalized = normalizePath(path, false) :: DataPath
573
- Data._applySet(self, normalized, value)
574
- self.Changed:Fire(Enums.Set, normalized, value)
575
- end
576
-
577
- --[=[
578
- @method SetTransient
579
- @within Data
580
- @tag Mutation
581
- @param path PathToken
582
- @param value any
583
- Writes a transient overlay visible in `Get()` but **not saved**. **Server only.**
584
- ]=]
585
- function Data:SetTransient(path: DataPathLike, value: any)
586
- assert(self[WRITABLE_KEY], READ_ONLY_ERROR)
587
- local normalized = normalizePath(path, false) :: DataPath
588
- Data._applyTransientSet(self, normalized, value)
589
- self.Changed:Fire(Enums.SetTransient, normalized, value)
590
- end
591
-
592
- --[=[
593
- @method Update
594
- @within Data
595
- @tag Mutation
596
- @param path PathToken
597
- @param fn (any) -> any
598
- Updates the persisted value using a callback. **Server only.**
599
- ]=]
600
- function Data:Update(path: DataPathLike, fn: (any) -> any): any
601
- assert(self[WRITABLE_KEY], READ_ONLY_ERROR)
602
- local normalized = normalizePath(path, false) :: DataPath
603
- local current = self:GetPersisted(normalized)
604
- local new = fn(current)
605
- self:Set(normalized, new)
606
- return new
607
- end
608
-
609
- --[=[
610
- @method UpdateTransient
611
- @within Data
612
- @tag Mutation
613
- @param path PathToken
614
- @param fn (any) -> any
615
- Updates the merged value through a transient overlay. **Server only.**
616
- ]=]
617
- function Data:UpdateTransient(path: DataPathLike, fn: (any) -> any): any
618
- assert(self[WRITABLE_KEY], READ_ONLY_ERROR)
619
- local normalized = normalizePath(path, false) :: DataPath
620
- local current = self:Get(normalized)
621
- local new = fn(current)
622
- self:SetTransient(normalized, new)
623
- return new
624
- end
625
-
626
- --[=[
627
- @method ClearTransient
628
- @within Data
629
- @tag Mutation
630
- @param path PathToken?
631
- Clears transient overlay at path, or all overlays when `path` is omitted. **Server only.**
632
- ]=]
633
- function Data:ClearTransient(path: DataPathLike?)
634
- assert(self[WRITABLE_KEY], READ_ONLY_ERROR)
635
- if path ~= nil then
636
- local normalized = normalizePath(path, false) :: DataPath
637
- Data._applyTransientClear(self, normalized)
638
- self.Changed:Fire(Enums.ClearTransient, normalized)
639
- return
640
- end
641
- Data._applyTransientClear(self, nil)
642
- self.Changed:Fire(Enums.ClearTransient, nil)
643
- end
644
-
645
- --[=[
646
- @method ArrayInsert
647
- @within Data
648
- @tag Mutation
649
- @param path PathToken
650
- @param value any
651
- @param index number?
652
- Inserts into a persisted array. **Server only.**
653
- ]=]
654
- function Data:ArrayInsert(path: DataPathLike, value: any, index: number?)
655
- assert(self[WRITABLE_KEY], READ_ONLY_ERROR)
656
- local normalized = normalizePath(path, false) :: DataPath
657
- local arr = getPersistedAt(self[ROOT_KEY], normalized)
658
- assert(type(arr) == "table", "Data:ArrayInsert requires an array path")
659
- if index then
660
- table.insert(arr, index, value)
661
- else
662
- table.insert(arr, value)
663
- index = #arr
664
- end
665
- local sig = self[ARRAY_INSERTED_MAP_KEY][Path.toKey(normalized)]
666
- if sig then
667
- sig:Fire(index, value)
668
- end
669
- self.Changed:Fire(Enums.ArrayInsert, normalized, value, index)
670
- end
671
-
672
- --[=[
673
- @method ArrayInsertTransient
674
- @within Data
675
- @tag Mutation
676
- Inserts into an array through transient overlay. **Server only.**
677
- ]=]
678
- function Data:ArrayInsertTransient(path: DataPathLike, value: any, index: number?)
679
- assert(self[WRITABLE_KEY], READ_ONLY_ERROR)
680
- local normalized = normalizePath(path, false) :: DataPath
681
- Data._applyTransientArrayInsert(self, normalized, value, index)
682
- self.Changed:Fire(Enums.ArrayInsertTransient, normalized, value, index)
683
- end
684
-
685
- --[=[
686
- @method ArrayRemove
687
- @within Data
688
- @tag Mutation
689
- @param path PathToken
690
- @param index number
691
- Removes from a persisted array and returns the removed value. **Server only.**
692
- ]=]
693
- function Data:ArrayRemove(path: DataPathLike, index: number): any
694
- assert(self[WRITABLE_KEY], READ_ONLY_ERROR)
695
- local normalized = normalizePath(path, false) :: DataPath
696
- local arr = getPersistedAt(self[ROOT_KEY], normalized)
697
- assert(type(arr) == "table", "Data:ArrayRemove requires an array path")
698
- local removed = table.remove(arr, index)
699
- local sig = self[ARRAY_REMOVED_MAP_KEY][Path.toKey(normalized)]
700
- if sig then
701
- sig:Fire(index, removed)
702
- end
703
- self.Changed:Fire(Enums.ArrayRemove, normalized, index)
704
- return removed
705
- end
706
-
707
- --[=[
708
- @method ArrayRemoveTransient
709
- @within Data
710
- @tag Mutation
711
- Removes from an array through transient overlay. **Server only.**
712
- ]=]
713
- function Data:ArrayRemoveTransient(path: DataPathLike, index: number): any
714
- assert(self[WRITABLE_KEY], READ_ONLY_ERROR)
715
- local normalized = normalizePath(path, false) :: DataPath
716
- local removed = Data._applyTransientArrayRemove(self, normalized, index)
717
- self.Changed:Fire(Enums.ArrayRemoveTransient, normalized, index)
718
- return removed
719
- end
720
-
721
- const normalizeOrder = function(order: OrderedListOrder?): string
722
- if order == nil then
723
- return PackageEnum.OrderList.Desc
724
- end
725
- if order == PackageEnum.OrderList.Asc or order == "asc" then
726
- return PackageEnum.OrderList.Asc
727
- end
728
- return PackageEnum.OrderList.Desc
729
- end
730
-
731
- --[=[
732
- @method GetOrderedList
733
- @within Data
734
- @tag Query
735
- @param path PathToken
736
- @param options OrderedListOptions
737
- @return { OrderedListEntry }
738
- Collects and sorts table entries by `options.key`. Supports `order` and `limit`.
739
- ]=]
740
- function Data:GetOrderedList(path: DataPathLike, options: OrderedListOptions): { OrderedListEntry<any> }
741
- local normalized = normalizePath(path, false) :: DataPath
742
- local list = self:Get(normalized)
743
- assert(type(list) == "table", "Data:GetOrderedList requires a table path")
744
-
745
- local key = options.key
746
- local order = normalizeOrder(options.order)
747
- local entries = table.create(#list)
748
-
749
- for index, item in list do
750
- if type(item) == "table" then
751
- entries[#entries + 1] = {
752
- index = index,
753
- value = item,
754
- priority = item[key],
755
- }
756
- end
757
- end
758
-
759
- table.sort(entries, function(a, b)
760
- local left = a.priority
761
- local right = b.priority
762
- if order == PackageEnum.OrderList.Desc then
763
- return (left or 0) > (right or 0)
764
- end
765
- return (left or 0) < (right or 0)
766
- end)
767
-
768
- local limit = options.limit
769
- if limit and limit < #entries then
770
- local trimmed = table.create(limit)
771
- for i = 1, limit do
772
- trimmed[i] = entries[i]
773
- end
774
- return trimmed
775
- end
776
-
777
- return entries
778
- end
779
-
780
- --[=[
781
- @method GetOrderedListWithPriority
782
- @within Data
783
- @tag Query
784
- @param path PathToken
785
- @param key string
786
- @param order OrderedListOrder?
787
- Shortcut for `GetOrderedList` sorted by one field. Default order: `Enum.OrderList.Desc`.
788
- ]=]
789
- function Data:GetOrderedListWithPriority(path: DataPathLike, key: string, order: OrderedListOrder?): { OrderedListEntry<any> }
790
- return self:GetOrderedList(path, {
791
- key = key,
792
- order = order or PackageEnum.OrderList.Desc,
793
- })
794
- end
795
-
796
- const ensureSignal = function(map: { [string]: SignalT }, key: string): SignalT
797
- if not map[key] then
798
- map[key] = Signal.new()
799
- end
800
- return map[key]
801
- end
802
-
803
- --[=[
804
- @method GetChangedSignal
805
- @within Data
806
- @tag Signals
807
- @param path PathToken
808
- @return Signal
809
- Fires when the merged value at path changes `(newValue, oldValue)`.
810
- ]=]
811
- function Data:GetChangedSignal<V>(path: TypedPath<V> | DataPathLike): ChangedSignal<V>
812
- local normalized = normalizePath(path, false) :: DataPath
813
- return ensureSignal(self[CHANGED_MAP_KEY], Path.toKey(normalized)) :: ChangedSignal<V>
814
- end
815
-
816
- --[=[
817
- @method GetPathChangedSignal
818
- @within Data
819
- @tag Signals
820
- Alias of `GetChangedSignal`.
821
- ]=]
822
- function Data:GetPathChangedSignal<V>(path: TypedPath<V> | DataPathLike): ChangedSignal<V>
823
- return self:GetChangedSignal(path)
824
- end
825
-
826
- --[=[
827
- @method GetIndexChangedSignal
828
- @within Data
829
- @tag Signals
830
- Fires when a direct child changes `(key, newValue, oldValue)`.
831
- ]=]
832
- function Data:GetIndexChangedSignal<V>(path: TypedPath<V> | DataPathLike): IndexChangedSignal<V>
833
- local normalized = normalizePath(path, false) :: DataPath
834
- return ensureSignal(self[INDEX_CHANGED_MAP_KEY], Path.toKey(normalized)) :: IndexChangedSignal<V>
835
- end
836
-
837
- --[=[
838
- @method GetArrayInsertedSignal
839
- @within Data
840
- @tag Signals
841
- Fires when an item is inserted `(index, value)`.
842
- ]=]
843
- function Data:GetArrayInsertedSignal<V>(path: TypedPath<{ V }> | DataPathLike): ArrayInsertedSignal<V>
844
- local normalized = normalizePath(path, false) :: DataPath
845
- return ensureSignal(self[ARRAY_INSERTED_MAP_KEY], Path.toKey(normalized)) :: ArrayInsertedSignal<V>
846
- end
847
-
848
- --[=[
849
- @method GetArrayRemovedSignal
850
- @within Data
851
- @tag Signals
852
- Fires when an item is removed `(index, removedValue)`.
853
- ]=]
854
- function Data:GetArrayRemovedSignal<V>(path: TypedPath<{ V }> | DataPathLike): ArrayRemovedSignal<V>
855
- local normalized = normalizePath(path, false) :: DataPath
856
- return ensureSignal(self[ARRAY_REMOVED_MAP_KEY], Path.toKey(normalized)) :: ArrayRemovedSignal<V>
857
- end
858
-
859
- --[=[
860
- @method Destroy
861
- @within Data
862
- @tag Lifecycle
863
- Destroys internal signals and clears transient state.
864
- ]=]
865
- function Data:Destroy()
866
- if self.Destroyed then
867
- return
868
- end
869
- self.Destroyed = true
870
- table.clear(self[TRANSIENT_KEY])
871
- for _, s in self[CHANGED_MAP_KEY] do
872
- s:Destroy()
873
- end
874
- for _, s in self[INDEX_CHANGED_MAP_KEY] do
875
- s:Destroy()
876
- end
877
- for _, s in self[ARRAY_INSERTED_MAP_KEY] do
878
- s:Destroy()
879
- end
880
- for _, s in self[ARRAY_REMOVED_MAP_KEY] do
881
- s:Destroy()
882
- end
883
- self.Changed:Destroy()
884
- end
885
-
886
- return Data
1
+ local Path = require(script.Parent.Path)
2
+ const Enums = require(script.Parent.Enums)
3
+ const PackageEnum = require(script.Parent.Enum)
4
+ const Signal = require(script.Parent.Parent.Spark)
5
+
6
+ type SignalT = typeof(Signal.new())
7
+ type AnyConnection = RBXScriptConnection
8
+ type TypedSignal<T...> = {
9
+ Connect: (self: TypedSignal<T...>, fn: (T...) -> ()) -> AnyConnection,
10
+ Once: (self: TypedSignal<T...>, fn: (T...) -> ()) -> AnyConnection,
11
+ Wait: (self: TypedSignal<T...>) -> T...,
12
+ }
13
+
14
+ const Data = {}
15
+
16
+ --[=[
17
+ @class Data
18
+ Per-player data instance. Writable on the server, read-only on the client.
19
+ Use `Get()` for merged reads and `GetPersisted()` for saved ProfileStore values.
20
+ ]=]
21
+ const ROOT_KEY = {}
22
+ const WRITABLE_KEY = {}
23
+ const STRICT_PATHS_KEY = {}
24
+ const AUTO_CREATE_KEY = {}
25
+ const CHANGED_MAP_KEY = {}
26
+ const INDEX_CHANGED_MAP_KEY = {}
27
+ const ARRAY_INSERTED_MAP_KEY = {}
28
+ const ARRAY_REMOVED_MAP_KEY = {}
29
+ const TRANSIENT_KEY = {}
30
+
31
+ export type DataPath = Path.Path
32
+ export type DataPathLike = Path.Path | Path.PathToken<never>
33
+ export type DataOptions<T = never> = {
34
+ StrictPaths: boolean?,
35
+ AutoCreateMissingTables: boolean?,
36
+ Template: T?,
37
+ }
38
+ export type OrderedListOrder = typeof(PackageEnum.OrderList.Asc) | typeof(PackageEnum.OrderList.Desc) | "asc" | "desc"
39
+ export type OrderedListOptions = {
40
+ key: string,
41
+ order: OrderedListOrder?,
42
+ limit: number?,
43
+ }
44
+ export type OrderedListEntry<V> = {
45
+ index: number,
46
+ value: V,
47
+ priority: any,
48
+ }
49
+ type TypedPath<V> = Path.PathToken<V>
50
+ type ChangedSignal<V> = TypedSignal<V, V>
51
+ type IndexChangedSignal<V> = TypedSignal<string | number, V, V>
52
+ type ArrayInsertedSignal<V> = TypedSignal<number, V>
53
+ type ArrayRemovedSignal<V> = TypedSignal<number, V>
54
+ type DataCore<T> = {
55
+ Changed: SignalT,
56
+ Destroyed: boolean,
57
+ Typed: <V>(self: DataCore<T>, path: DataPathLike) -> TypedPath<V>,
58
+ Get: <V>(self: DataCore<T>, path: TypedPath<V> | DataPathLike?) -> V,
59
+ GetPersisted: <V>(self: DataCore<T>, path: TypedPath<V> | DataPathLike?) -> V,
60
+ GetTransient: <V>(self: DataCore<T>, path: TypedPath<V> | DataPathLike?) -> V?,
61
+ HasTransient: (self: DataCore<T>, path: DataPathLike?) -> boolean,
62
+ Set: <V>(self: DataCore<T>, path: TypedPath<V> | DataPathLike, value: V) -> (),
63
+ SetTransient: <V>(self: DataCore<T>, path: TypedPath<V> | DataPathLike, value: V) -> (),
64
+ Update: <V>(self: DataCore<T>, path: TypedPath<V> | DataPathLike, fn: (V) -> V) -> V,
65
+ UpdateTransient: <V>(self: DataCore<T>, path: TypedPath<V> | DataPathLike, fn: (V) -> V) -> V,
66
+ ClearTransient: (self: DataCore<T>, path: DataPathLike?) -> (),
67
+ ArrayInsert: <V>(self: DataCore<T>, path: TypedPath<{ V }> | DataPathLike, value: V, index: number?) -> (),
68
+ ArrayInsertTransient: <V>(self: DataCore<T>, path: TypedPath<{ V }> | DataPathLike, value: V, index: number?) -> (),
69
+ ArrayRemove: <V>(self: DataCore<T>, path: TypedPath<{ V }> | DataPathLike, index: number) -> V,
70
+ ArrayRemoveTransient: <V>(self: DataCore<T>, path: TypedPath<{ V }> | DataPathLike, index: number) -> V,
71
+ GetOrderedList: <V>(self: DataCore<T>, path: TypedPath<{ V }> | DataPathLike, options: OrderedListOptions) -> { OrderedListEntry<V> },
72
+ GetOrderedListWithPriority: <V>(
73
+ self: DataCore<T>,
74
+ path: TypedPath<{ V }> | DataPathLike,
75
+ key: string,
76
+ order: OrderedListOrder?
77
+ ) -> { OrderedListEntry<V> },
78
+ GetChangedSignal: <V>(self: DataCore<T>, path: TypedPath<V> | DataPathLike) -> ChangedSignal<V>,
79
+ GetPathChangedSignal: <V>(self: DataCore<T>, path: TypedPath<V> | DataPathLike) -> ChangedSignal<V>,
80
+ GetIndexChangedSignal: <V>(self: DataCore<T>, path: TypedPath<V> | DataPathLike) -> IndexChangedSignal<V>,
81
+ GetArrayInsertedSignal: <V>(self: DataCore<T>, path: TypedPath<{ V }> | DataPathLike) -> ArrayInsertedSignal<V>,
82
+ GetArrayRemovedSignal: <V>(self: DataCore<T>, path: TypedPath<{ V }> | DataPathLike) -> ArrayRemovedSignal<V>,
83
+ Destroy: (self: DataCore<T>) -> (),
84
+ }
85
+ export type Data<T> = DataCore<T>
86
+
87
+ const READ_ONLY_ERROR = "DataService: Data on the client is read-only. Mutations are server-driven."
88
+ const INVALID_PATH_ERROR = "DataService: invalid data path %q"
89
+
90
+ const pathToString = function(path: DataPath): string
91
+ if #path == 0 then
92
+ return "<root>"
93
+ end
94
+ local parts = table.create(#path)
95
+ for i, segment in path do
96
+ parts[i] = tostring(segment)
97
+ end
98
+ return table.concat(parts, ".")
99
+ end
100
+
101
+ const normalizePath = function(pathLike: DataPathLike?, allowNil: boolean?): DataPath?
102
+ local resolved = Path.toArray(pathLike)
103
+ if resolved == nil then
104
+ if allowNil then
105
+ return nil
106
+ end
107
+ error("DataService: path is required")
108
+ end
109
+ if not Path.validate(resolved) then
110
+ error(string.format(INVALID_PATH_ERROR, pathToString(resolved)))
111
+ end
112
+ return resolved
113
+ end
114
+
115
+ const pathFromKey = function(key: string): DataPath
116
+ if key == "" then
117
+ return {}
118
+ end
119
+ local path = table.create(4)
120
+ for part in string.gmatch(key, "[^\0]+") do
121
+ local kind = string.sub(part, 1, 1)
122
+ local value = string.sub(part, 3)
123
+ if kind == "s" then
124
+ path[#path + 1] = value
125
+ elseif kind == "n" then
126
+ path[#path + 1] = tonumber(value)
127
+ end
128
+ end
129
+ return path
130
+ end
131
+
132
+ const isDescendantPath = function(childKey: string, parentKey: string): boolean
133
+ if parentKey == "" then
134
+ return childKey ~= ""
135
+ end
136
+ return childKey == parentKey or string.sub(childKey, 1, #parentKey + 1) == parentKey .. "\0"
137
+ end
138
+
139
+ local function deepCopyTable(value: any): any
140
+ if type(value) ~= "table" then
141
+ return value
142
+ end
143
+ local out = {}
144
+ for k, v in value do
145
+ out[k] = deepCopyTable(v)
146
+ end
147
+ return out
148
+ end
149
+
150
+ const setAtPath = function(root: any, path: DataPath, value: any)
151
+ if #path == 0 then
152
+ return
153
+ end
154
+ local parent = root
155
+ for i = 1, #path - 1 do
156
+ local k = path[i]
157
+ local nextValue = rawget(parent, k)
158
+ if type(nextValue) ~= "table" then
159
+ nextValue = {}
160
+ rawset(parent, k, nextValue)
161
+ end
162
+ parent = nextValue
163
+ end
164
+ rawset(parent, path[#path], value)
165
+ end
166
+
167
+ const getPersistedAt = function(root: any, path: DataPath?): any
168
+ if not path or #path == 0 then
169
+ return root
170
+ end
171
+ local cur: any = root
172
+ for _, k in path do
173
+ if type(cur) ~= "table" then
174
+ return nil
175
+ end
176
+ cur = rawget(cur, k)
177
+ end
178
+ return cur
179
+ end
180
+
181
+ const getMergedValue = function(self: any, path: DataPath): any
182
+ local transient = self[TRANSIENT_KEY]
183
+ local key = Path.toKey(path)
184
+ local direct = transient[key]
185
+ if direct ~= nil then
186
+ return direct
187
+ end
188
+
189
+ if #path == 0 then
190
+ local persisted = self[ROOT_KEY]
191
+ local out = if type(persisted) == "table" then deepCopyTable(persisted) else {}
192
+ for tKey, tVal in transient do
193
+ setAtPath(out, pathFromKey(tKey), tVal)
194
+ end
195
+ return out
196
+ end
197
+
198
+ local persisted = getPersistedAt(self[ROOT_KEY], path)
199
+ local hasDescendant = false
200
+ for tKey in transient do
201
+ if isDescendantPath(tKey, key) then
202
+ hasDescendant = true
203
+ break
204
+ end
205
+ end
206
+ if not hasDescendant then
207
+ return persisted
208
+ end
209
+
210
+ local out = if type(persisted) == "table" then deepCopyTable(persisted) else {}
211
+ for tKey, tVal in transient do
212
+ if isDescendantPath(tKey, key) then
213
+ local tPath = pathFromKey(tKey)
214
+ local relative = table.create(math.max(#tPath - #path, 0))
215
+ for i = #path + 1, #tPath do
216
+ relative[#relative + 1] = tPath[i]
217
+ end
218
+ if #relative > 0 then
219
+ setAtPath(out, relative, tVal)
220
+ end
221
+ end
222
+ end
223
+ return out
224
+ end
225
+
226
+ const copyArray = function(value: any): { any }
227
+ local out = table.create(#value)
228
+ for index, item in value do
229
+ out[index] = if type(item) == "table" then deepCopyTable(item) else item
230
+ end
231
+ return out
232
+ end
233
+
234
+ function Data.new<T>(initial: T, writable: boolean?, options: DataOptions<T>?): Data<T>
235
+ local self: any
236
+ self = {
237
+ Get = function(a, b)
238
+ local path = if a == self then b else a
239
+ return Data.Get(self, path)
240
+ end,
241
+ GetPersisted = function(a, b)
242
+ local path = if a == self then b else a
243
+ return Data.GetPersisted(self, path)
244
+ end,
245
+ GetTransient = function(a, b)
246
+ local path = if a == self then b else a
247
+ return Data.GetTransient(self, path)
248
+ end,
249
+ HasTransient = function(a, b)
250
+ local path = if a == self then b else a
251
+ return Data.HasTransient(self, path)
252
+ end,
253
+ Set = function(a, b, c)
254
+ local path = if a == self then b else a
255
+ local value = if a == self then c else b
256
+ return Data.Set(self, path, value)
257
+ end,
258
+ SetTransient = function(a, b, c)
259
+ local path = if a == self then b else a
260
+ local value = if a == self then c else b
261
+ return Data.SetTransient(self, path, value)
262
+ end,
263
+ Update = function(a, b, c)
264
+ local path = if a == self then b else a
265
+ local fn = if a == self then c else b
266
+ return Data.Update(self, path, fn)
267
+ end,
268
+ UpdateTransient = function(a, b, c)
269
+ local path = if a == self then b else a
270
+ local fn = if a == self then c else b
271
+ return Data.UpdateTransient(self, path, fn)
272
+ end,
273
+ ClearTransient = function(a, b)
274
+ local path = if a == self then b else a
275
+ return Data.ClearTransient(self, path)
276
+ end,
277
+ ArrayInsert = function(a, b, c, d)
278
+ local path = if a == self then b else a
279
+ local value = if a == self then c else b
280
+ local index = if a == self then d else c
281
+ return Data.ArrayInsert(self, path, value, index)
282
+ end,
283
+ ArrayInsertTransient = function(a, b, c, d)
284
+ local path = if a == self then b else a
285
+ local value = if a == self then c else b
286
+ local index = if a == self then d else c
287
+ return Data.ArrayInsertTransient(self, path, value, index)
288
+ end,
289
+ ArrayRemove = function(a, b, c)
290
+ local path = if a == self then b else a
291
+ local index = if a == self then c else b
292
+ return Data.ArrayRemove(self, path, index)
293
+ end,
294
+ ArrayRemoveTransient = function(a, b, c)
295
+ local path = if a == self then b else a
296
+ local index = if a == self then c else b
297
+ return Data.ArrayRemoveTransient(self, path, index)
298
+ end,
299
+ GetOrderedList = function(a, b, c)
300
+ local path = if a == self then b else a
301
+ local options = if a == self then c else b
302
+ return Data.GetOrderedList(self, path, options)
303
+ end,
304
+ GetOrderedListWithPriority = function(a, b, c, d)
305
+ local path = if a == self then b else a
306
+ local key = if a == self then c else b
307
+ local order = if a == self then d else c
308
+ return Data.GetOrderedListWithPriority(self, path, key, order)
309
+ end,
310
+ GetChangedSignal = function(a, b)
311
+ local path = if a == self then b else a
312
+ return Data.GetChangedSignal(self, path)
313
+ end,
314
+ GetPathChangedSignal = function(a, b)
315
+ local path = if a == self then b else a
316
+ return Data.GetPathChangedSignal(self, path)
317
+ end,
318
+ GetIndexChangedSignal = function(a, b)
319
+ local path = if a == self then b else a
320
+ return Data.GetIndexChangedSignal(self, path)
321
+ end,
322
+ GetArrayInsertedSignal = function(a, b)
323
+ local path = if a == self then b else a
324
+ return Data.GetArrayInsertedSignal(self, path)
325
+ end,
326
+ GetArrayRemovedSignal = function(a, b)
327
+ local path = if a == self then b else a
328
+ return Data.GetArrayRemovedSignal(self, path)
329
+ end,
330
+ Typed = function(a, b)
331
+ local path = if a == self then b else a
332
+ return Data.Typed(self, path)
333
+ end,
334
+ Destroy = function()
335
+ return Data.Destroy(self)
336
+ end,
337
+ [ROOT_KEY] = initial,
338
+ [WRITABLE_KEY] = writable ~= false,
339
+ [STRICT_PATHS_KEY] = if options and options.StrictPaths ~= nil then options.StrictPaths else true,
340
+ [AUTO_CREATE_KEY] = if options and options.AutoCreateMissingTables ~= nil then options.AutoCreateMissingTables else false,
341
+ [CHANGED_MAP_KEY] = {} :: { [string]: SignalT },
342
+ [INDEX_CHANGED_MAP_KEY] = {} :: { [string]: SignalT },
343
+ [ARRAY_INSERTED_MAP_KEY] = {} :: { [string]: SignalT },
344
+ [ARRAY_REMOVED_MAP_KEY] = {} :: { [string]: SignalT },
345
+ [TRANSIENT_KEY] = {} :: { [string]: any },
346
+ Changed = Signal.new(),
347
+ Destroyed = false,
348
+ }
349
+
350
+ return (self :: any) :: Data<T>
351
+ end
352
+
353
+ const descend = function(root: any, path: DataPath?, ensureLeaf: boolean): (any?, any?)
354
+ if not path or #path == 0 then
355
+ return nil, nil
356
+ end
357
+ local parent = root
358
+ for i = 1, #path - 1 do
359
+ local k = path[i]
360
+ local nextValue = rawget(parent, k)
361
+ if type(nextValue) ~= "table" then
362
+ if ensureLeaf then
363
+ rawset(parent, k, {})
364
+ nextValue = rawget(parent, k)
365
+ else
366
+ return nil, nil
367
+ end
368
+ end
369
+ parent = nextValue
370
+ end
371
+ return parent, path[#path]
372
+ end
373
+
374
+ --[=[
375
+ @method Get
376
+ @within Data
377
+ @param path PathToken? -- Typed path or legacy array. Omit for the merged root.
378
+ @return any
379
+ Reads the merged value (persisted + transient overlay). Omit path for the full root.
380
+ ]=]
381
+ function Data:Get(path: DataPathLike?): any
382
+ local normalized = normalizePath(path, true) or {}
383
+ return getMergedValue(self, normalized)
384
+ end
385
+
386
+ --[=[
387
+ @method GetPersisted
388
+ @within Data
389
+ @tag Query
390
+ @param path PathToken?
391
+ @return any
392
+ Reads the saved ProfileStore value only (ignores transient overlay).
393
+ ]=]
394
+ function Data:GetPersisted(path: DataPathLike?): any
395
+ local normalized = normalizePath(path, true)
396
+ if not normalized or #normalized == 0 then
397
+ return self[ROOT_KEY]
398
+ end
399
+ return getPersistedAt(self[ROOT_KEY], normalized)
400
+ end
401
+
402
+ --[=[
403
+ @method GetTransient
404
+ @within Data
405
+ @tag Query
406
+ @param path PathToken?
407
+ @return any?
408
+ Reads the transient overlay at path, if present.
409
+ ]=]
410
+ function Data:GetTransient(path: DataPathLike?): any
411
+ local normalized = normalizePath(path, true) or {}
412
+ return self[TRANSIENT_KEY][Path.toKey(normalized)]
413
+ end
414
+
415
+ --[=[
416
+ @method HasTransient
417
+ @within Data
418
+ @tag Query
419
+ @param path PathToken?
420
+ @return boolean
421
+ Returns whether a transient overlay exists at or below the path.
422
+ ]=]
423
+ function Data:HasTransient(path: DataPathLike?): boolean
424
+ local normalized = normalizePath(path, true) or {}
425
+ local key = Path.toKey(normalized)
426
+ local transient = self[TRANSIENT_KEY]
427
+ if transient[key] ~= nil then
428
+ return true
429
+ end
430
+ for tKey in transient do
431
+ if isDescendantPath(tKey, key) then
432
+ return true
433
+ end
434
+ end
435
+ return false
436
+ end
437
+
438
+ --[=[
439
+ @method Typed
440
+ @within Data
441
+ @param path PathToken
442
+ @return PathToken
443
+ Type helper for stronger inference in signals and read/write calls.
444
+ ]=]
445
+ function Data:Typed(path: DataPathLike): any
446
+ return path :: any
447
+ end
448
+
449
+ function Data:_fireChanged(path: DataPath, newValue: any, oldValue: any)
450
+ if newValue == oldValue then
451
+ return
452
+ end
453
+ local key = Path.toKey(path)
454
+ local sig = self[CHANGED_MAP_KEY][key]
455
+ if sig then
456
+ sig:Fire(newValue, oldValue)
457
+ end
458
+ if #path > 0 then
459
+ local parentKey = Path.toKey(Path.parent(path))
460
+ local idx = self[INDEX_CHANGED_MAP_KEY][parentKey]
461
+ if idx then
462
+ idx:Fire(path[#path], newValue, oldValue)
463
+ end
464
+ end
465
+ end
466
+
467
+ function Data:_applySet(path: DataPath, value: any)
468
+ assert(path and #path > 0, "Data: path must be non-empty")
469
+ local parent, key = descend(self[ROOT_KEY], path, self[AUTO_CREATE_KEY])
470
+ assert(parent ~= nil and key ~= nil, string.format(INVALID_PATH_ERROR, pathToString(path)))
471
+ local old = rawget(parent, key)
472
+ if self[STRICT_PATHS_KEY] and not self[AUTO_CREATE_KEY] and old == nil and type(key) ~= "number" then
473
+ error(string.format(INVALID_PATH_ERROR, pathToString(path)))
474
+ end
475
+ rawset(parent, key, value)
476
+ Data._fireChanged(self, path, value, old)
477
+ end
478
+
479
+ function Data._applyTransientSet(self: any, path: DataPath, value: any)
480
+ local oldMerged = Data.Get(self, path)
481
+ self[TRANSIENT_KEY][Path.toKey(path)] = value
482
+ local newMerged = Data.Get(self, path)
483
+ Data._fireChanged(self, path, newMerged, oldMerged)
484
+ end
485
+
486
+ function Data._applyTransientArrayInsert(self: any, path: DataPath, value: any, index: number?)
487
+ local current = Data.Get(self, path)
488
+ local arr = if type(current) == "table" then copyArray(current) else {}
489
+ if index then
490
+ table.insert(arr, index, value)
491
+ else
492
+ table.insert(arr, value)
493
+ index = #arr
494
+ end
495
+ Data._applyTransientSet(self, path, arr)
496
+ local sig = self[ARRAY_INSERTED_MAP_KEY][Path.toKey(path)]
497
+ if sig then
498
+ sig:Fire(index, value)
499
+ end
500
+ end
501
+
502
+ function Data._applyTransientArrayRemove(self: any, path: DataPath, index: number): any
503
+ local current = Data.Get(self, path)
504
+ local arr = if type(current) == "table" then copyArray(current) else {}
505
+ local removed = table.remove(arr, index)
506
+ Data._applyTransientSet(self, path, arr)
507
+ local sig = self[ARRAY_REMOVED_MAP_KEY][Path.toKey(path)]
508
+ if sig then
509
+ sig:Fire(index, removed)
510
+ end
511
+ return removed
512
+ end
513
+
514
+ function Data._applyTransientClear(self: any, path: DataPath?)
515
+ if path then
516
+ local key = Path.toKey(path)
517
+ if self[TRANSIENT_KEY][key] == nil then
518
+ return
519
+ end
520
+ local oldMerged = Data.Get(self, path)
521
+ self[TRANSIENT_KEY][key] = nil
522
+ local newMerged = Data.Get(self, path)
523
+ Data._fireChanged(self, path, newMerged, oldMerged)
524
+ return
525
+ end
526
+
527
+ if next(self[TRANSIENT_KEY]) == nil then
528
+ return
529
+ end
530
+ table.clear(self[TRANSIENT_KEY])
531
+ end
532
+
533
+ function Data:_applyArrayInsert(path: DataPath, value: any, index: number?)
534
+ local arr = getPersistedAt(self[ROOT_KEY], path)
535
+ assert(type(arr) == "table", "Data: ArrayInsert requires an array path")
536
+ if index then
537
+ table.insert(arr, index, value)
538
+ else
539
+ table.insert(arr, value)
540
+ index = #arr
541
+ end
542
+ local sig = self[ARRAY_INSERTED_MAP_KEY][Path.toKey(path)]
543
+ if sig then
544
+ sig:Fire(index, value)
545
+ end
546
+ end
547
+
548
+ function Data:_applyArrayRemove(path: DataPath, index: number): any
549
+ local arr = getPersistedAt(self[ROOT_KEY], path)
550
+ assert(type(arr) == "table", "Data: ArrayRemove requires an array path")
551
+ local removed = table.remove(arr, index)
552
+ local sig = self[ARRAY_REMOVED_MAP_KEY][Path.toKey(path)]
553
+ if sig then
554
+ sig:Fire(index, removed)
555
+ end
556
+ return removed
557
+ end
558
+
559
+ --[=[
560
+ @method Set
561
+ @within Data
562
+ @tag Mutation
563
+ @param path PathToken
564
+ @param value any
565
+ Writes and persists to ProfileStore. **Server only.**
566
+ ]=]
567
+ function Data:Set(path: DataPathLike, value: any)
568
+ assert(self[WRITABLE_KEY], READ_ONLY_ERROR)
569
+ local normalized = normalizePath(path, false) :: DataPath
570
+ Data._applySet(self, normalized, value)
571
+ self.Changed:Fire(Enums.Set, normalized, value)
572
+ end
573
+
574
+ --[=[
575
+ @method SetTransient
576
+ @within Data
577
+ @tag Mutation
578
+ @param path PathToken
579
+ @param value any
580
+ Writes a transient overlay visible in `Get()` but **not saved**. **Server only.**
581
+ ]=]
582
+ function Data:SetTransient(path: DataPathLike, value: any)
583
+ assert(self[WRITABLE_KEY], READ_ONLY_ERROR)
584
+ local normalized = normalizePath(path, false) :: DataPath
585
+ Data._applyTransientSet(self, normalized, value)
586
+ self.Changed:Fire(Enums.SetTransient, normalized, value)
587
+ end
588
+
589
+ --[=[
590
+ @method Update
591
+ @within Data
592
+ @tag Mutation
593
+ @param path PathToken
594
+ @param fn (any) -> any
595
+ Updates the persisted value using a callback. **Server only.**
596
+ ]=]
597
+ function Data:Update(path: DataPathLike, fn: (any) -> any): any
598
+ assert(self[WRITABLE_KEY], READ_ONLY_ERROR)
599
+ local normalized = normalizePath(path, false) :: DataPath
600
+ local current = self:GetPersisted(normalized)
601
+ local new = fn(current)
602
+ self:Set(normalized, new)
603
+ return new
604
+ end
605
+
606
+ --[=[
607
+ @method UpdateTransient
608
+ @within Data
609
+ @tag Mutation
610
+ @param path PathToken
611
+ @param fn (any) -> any
612
+ Updates the merged value through a transient overlay. **Server only.**
613
+ ]=]
614
+ function Data:UpdateTransient(path: DataPathLike, fn: (any) -> any): any
615
+ assert(self[WRITABLE_KEY], READ_ONLY_ERROR)
616
+ local normalized = normalizePath(path, false) :: DataPath
617
+ local current = self:Get(normalized)
618
+ local new = fn(current)
619
+ self:SetTransient(normalized, new)
620
+ return new
621
+ end
622
+
623
+ --[=[
624
+ @method ClearTransient
625
+ @within Data
626
+ @tag Mutation
627
+ @param path PathToken?
628
+ Clears transient overlay at path, or all overlays when `path` is omitted. **Server only.**
629
+ ]=]
630
+ function Data:ClearTransient(path: DataPathLike?)
631
+ assert(self[WRITABLE_KEY], READ_ONLY_ERROR)
632
+ if path ~= nil then
633
+ local normalized = normalizePath(path, false) :: DataPath
634
+ Data._applyTransientClear(self, normalized)
635
+ self.Changed:Fire(Enums.ClearTransient, normalized)
636
+ return
637
+ end
638
+ Data._applyTransientClear(self, nil)
639
+ self.Changed:Fire(Enums.ClearTransient, nil)
640
+ end
641
+
642
+ --[=[
643
+ @method ArrayInsert
644
+ @within Data
645
+ @tag Mutation
646
+ @param path PathToken
647
+ @param value any
648
+ @param index number?
649
+ Inserts into a persisted array. **Server only.**
650
+ ]=]
651
+ function Data:ArrayInsert(path: DataPathLike, value: any, index: number?)
652
+ assert(self[WRITABLE_KEY], READ_ONLY_ERROR)
653
+ local normalized = normalizePath(path, false) :: DataPath
654
+ local arr = getPersistedAt(self[ROOT_KEY], normalized)
655
+ assert(type(arr) == "table", "Data:ArrayInsert requires an array path")
656
+ if index then
657
+ table.insert(arr, index, value)
658
+ else
659
+ table.insert(arr, value)
660
+ index = #arr
661
+ end
662
+ local sig = self[ARRAY_INSERTED_MAP_KEY][Path.toKey(normalized)]
663
+ if sig then
664
+ sig:Fire(index, value)
665
+ end
666
+ self.Changed:Fire(Enums.ArrayInsert, normalized, value, index)
667
+ end
668
+
669
+ --[=[
670
+ @method ArrayInsertTransient
671
+ @within Data
672
+ @tag Mutation
673
+ Inserts into an array through transient overlay. **Server only.**
674
+ ]=]
675
+ function Data:ArrayInsertTransient(path: DataPathLike, value: any, index: number?)
676
+ assert(self[WRITABLE_KEY], READ_ONLY_ERROR)
677
+ local normalized = normalizePath(path, false) :: DataPath
678
+ Data._applyTransientArrayInsert(self, normalized, value, index)
679
+ self.Changed:Fire(Enums.ArrayInsertTransient, normalized, value, index)
680
+ end
681
+
682
+ --[=[
683
+ @method ArrayRemove
684
+ @within Data
685
+ @tag Mutation
686
+ @param path PathToken
687
+ @param index number
688
+ Removes from a persisted array and returns the removed value. **Server only.**
689
+ ]=]
690
+ function Data:ArrayRemove(path: DataPathLike, index: number): any
691
+ assert(self[WRITABLE_KEY], READ_ONLY_ERROR)
692
+ local normalized = normalizePath(path, false) :: DataPath
693
+ local arr = getPersistedAt(self[ROOT_KEY], normalized)
694
+ assert(type(arr) == "table", "Data:ArrayRemove requires an array path")
695
+ local removed = table.remove(arr, index)
696
+ local sig = self[ARRAY_REMOVED_MAP_KEY][Path.toKey(normalized)]
697
+ if sig then
698
+ sig:Fire(index, removed)
699
+ end
700
+ self.Changed:Fire(Enums.ArrayRemove, normalized, index)
701
+ return removed
702
+ end
703
+
704
+ --[=[
705
+ @method ArrayRemoveTransient
706
+ @within Data
707
+ @tag Mutation
708
+ Removes from an array through transient overlay. **Server only.**
709
+ ]=]
710
+ function Data:ArrayRemoveTransient(path: DataPathLike, index: number): any
711
+ assert(self[WRITABLE_KEY], READ_ONLY_ERROR)
712
+ local normalized = normalizePath(path, false) :: DataPath
713
+ local removed = Data._applyTransientArrayRemove(self, normalized, index)
714
+ self.Changed:Fire(Enums.ArrayRemoveTransient, normalized, index)
715
+ return removed
716
+ end
717
+
718
+ const normalizeOrder = function(order: OrderedListOrder?): string
719
+ if order == nil then
720
+ return PackageEnum.OrderList.Desc
721
+ end
722
+ if order == PackageEnum.OrderList.Asc or order == "asc" then
723
+ return PackageEnum.OrderList.Asc
724
+ end
725
+ return PackageEnum.OrderList.Desc
726
+ end
727
+
728
+ --[=[
729
+ @method GetOrderedList
730
+ @within Data
731
+ @tag Query
732
+ @param path PathToken
733
+ @param options OrderedListOptions
734
+ @return { OrderedListEntry }
735
+ Collects and sorts table entries by `options.key`. Supports `order` and `limit`.
736
+ ]=]
737
+ function Data:GetOrderedList(path: DataPathLike, options: OrderedListOptions): { OrderedListEntry<any> }
738
+ local normalized = normalizePath(path, false) :: DataPath
739
+ local list = self:Get(normalized)
740
+ assert(type(list) == "table", "Data:GetOrderedList requires a table path")
741
+
742
+ local key = options.key
743
+ local order = normalizeOrder(options.order)
744
+ local entries = table.create(#list)
745
+
746
+ for index, item in list do
747
+ if type(item) == "table" then
748
+ entries[#entries + 1] = {
749
+ index = index,
750
+ value = item,
751
+ priority = item[key],
752
+ }
753
+ end
754
+ end
755
+
756
+ table.sort(entries, function(a, b)
757
+ local left = a.priority
758
+ local right = b.priority
759
+ if order == PackageEnum.OrderList.Desc then
760
+ return (left or 0) > (right or 0)
761
+ end
762
+ return (left or 0) < (right or 0)
763
+ end)
764
+
765
+ local limit = options.limit
766
+ if limit and limit < #entries then
767
+ local trimmed = table.create(limit)
768
+ for i = 1, limit do
769
+ trimmed[i] = entries[i]
770
+ end
771
+ return trimmed
772
+ end
773
+
774
+ return entries
775
+ end
776
+
777
+ --[=[
778
+ @method GetOrderedListWithPriority
779
+ @within Data
780
+ @tag Query
781
+ @param path PathToken
782
+ @param key string
783
+ @param order OrderedListOrder?
784
+ Shortcut for `GetOrderedList` sorted by one field. Default order: `Enum.OrderList.Desc`.
785
+ ]=]
786
+ function Data:GetOrderedListWithPriority(path: DataPathLike, key: string, order: OrderedListOrder?): { OrderedListEntry<any> }
787
+ return self:GetOrderedList(path, {
788
+ key = key,
789
+ order = order or PackageEnum.OrderList.Desc,
790
+ })
791
+ end
792
+
793
+ const ensureSignal = function(map: { [string]: SignalT }, key: string): SignalT
794
+ if not map[key] then
795
+ map[key] = Signal.new()
796
+ end
797
+ return map[key]
798
+ end
799
+
800
+ --[=[
801
+ @method GetChangedSignal
802
+ @within Data
803
+ @tag Signals
804
+ @param path PathToken
805
+ @return Signal
806
+ Fires when the merged value at path changes `(newValue, oldValue)`.
807
+ ]=]
808
+ function Data:GetChangedSignal<V>(path: TypedPath<V> | DataPathLike): ChangedSignal<V>
809
+ local normalized = normalizePath(path, false) :: DataPath
810
+ return ensureSignal(self[CHANGED_MAP_KEY], Path.toKey(normalized)) :: ChangedSignal<V>
811
+ end
812
+
813
+ --[=[
814
+ @method GetPathChangedSignal
815
+ @within Data
816
+ @tag Signals
817
+ Alias of `GetChangedSignal`.
818
+ ]=]
819
+ function Data:GetPathChangedSignal<V>(path: TypedPath<V> | DataPathLike): ChangedSignal<V>
820
+ return self:GetChangedSignal(path)
821
+ end
822
+
823
+ --[=[
824
+ @method GetIndexChangedSignal
825
+ @within Data
826
+ @tag Signals
827
+ Fires when a direct child changes `(key, newValue, oldValue)`.
828
+ ]=]
829
+ function Data:GetIndexChangedSignal<V>(path: TypedPath<V> | DataPathLike): IndexChangedSignal<V>
830
+ local normalized = normalizePath(path, false) :: DataPath
831
+ return ensureSignal(self[INDEX_CHANGED_MAP_KEY], Path.toKey(normalized)) :: IndexChangedSignal<V>
832
+ end
833
+
834
+ --[=[
835
+ @method GetArrayInsertedSignal
836
+ @within Data
837
+ @tag Signals
838
+ Fires when an item is inserted `(index, value)`.
839
+ ]=]
840
+ function Data:GetArrayInsertedSignal<V>(path: TypedPath<{ V }> | DataPathLike): ArrayInsertedSignal<V>
841
+ local normalized = normalizePath(path, false) :: DataPath
842
+ return ensureSignal(self[ARRAY_INSERTED_MAP_KEY], Path.toKey(normalized)) :: ArrayInsertedSignal<V>
843
+ end
844
+
845
+ --[=[
846
+ @method GetArrayRemovedSignal
847
+ @within Data
848
+ @tag Signals
849
+ Fires when an item is removed `(index, removedValue)`.
850
+ ]=]
851
+ function Data:GetArrayRemovedSignal<V>(path: TypedPath<{ V }> | DataPathLike): ArrayRemovedSignal<V>
852
+ local normalized = normalizePath(path, false) :: DataPath
853
+ return ensureSignal(self[ARRAY_REMOVED_MAP_KEY], Path.toKey(normalized)) :: ArrayRemovedSignal<V>
854
+ end
855
+
856
+ --[=[
857
+ @method Destroy
858
+ @within Data
859
+ @tag Lifecycle
860
+ Destroys internal signals and clears transient state.
861
+ ]=]
862
+ function Data:Destroy()
863
+ if self.Destroyed then
864
+ return
865
+ end
866
+ self.Destroyed = true
867
+ table.clear(self[TRANSIENT_KEY])
868
+ for _, s in self[CHANGED_MAP_KEY] do
869
+ s:Destroy()
870
+ end
871
+ for _, s in self[INDEX_CHANGED_MAP_KEY] do
872
+ s:Destroy()
873
+ end
874
+ for _, s in self[ARRAY_INSERTED_MAP_KEY] do
875
+ s:Destroy()
876
+ end
877
+ for _, s in self[ARRAY_REMOVED_MAP_KEY] do
878
+ s:Destroy()
879
+ end
880
+ self.Changed:Destroy()
881
+ end
882
+
883
+ return Data