cluaupp 0.1.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.
- package/CHANGELOG.md +20 -0
- package/LICENSE +21 -0
- package/README.md +119 -0
- package/bin/cluau.js +4 -0
- package/bin/cluaupp.js +4 -0
- package/docs/README.md +20 -0
- package/docs/architecture.md +110 -0
- package/docs/cli.md +69 -0
- package/docs/comparison.md +37 -0
- package/docs/config.md +31 -0
- package/docs/cpp-advanced.md +71 -0
- package/docs/cpp-const.md +52 -0
- package/docs/cpp-organization.md +61 -0
- package/docs/cpp-safety.md +58 -0
- package/docs/cpp-types.md +66 -0
- package/docs/getting-started.md +169 -0
- package/docs/intro.md +37 -0
- package/docs/libraries.md +77 -0
- package/docs/roblox-api.md +81 -0
- package/docs/syntax.md +131 -0
- package/include/cluaupp/datatypes.hpp +581 -0
- package/include/cluaupp/generated/enums.hpp +4920 -0
- package/include/cluaupp/generated/instances.hpp +12489 -0
- package/include/cluaupp/libs/chrono.hpp +26 -0
- package/include/cluaupp/libs/cmdr.hpp +16 -0
- package/include/cluaupp/libs/dataservice.hpp +141 -0
- package/include/cluaupp/libs/display.hpp +13 -0
- package/include/cluaupp/libs/ezvisual.hpp +18 -0
- package/include/cluaupp/libs/formatnumber.hpp +15 -0
- package/include/cluaupp/libs/fusion.hpp +41 -0
- package/include/cluaupp/libs/iris.hpp +40 -0
- package/include/cluaupp/libs/janitor.hpp +35 -0
- package/include/cluaupp/libs/math.hpp +14 -0
- package/include/cluaupp/libs/module3d.hpp +25 -0
- package/include/cluaupp/libs/net.hpp +42 -0
- package/include/cluaupp/libs/promise.hpp +30 -0
- package/include/cluaupp/libs/spring.hpp +18 -0
- package/include/cluaupp/libs/statemachine.hpp +19 -0
- package/include/cluaupp/libs/stickybillboard.hpp +14 -0
- package/include/cluaupp/libs/topbarplus.hpp +29 -0
- package/include/cluaupp/libs/twinkle.hpp +15 -0
- package/include/cluaupp/libs/vfx.hpp +13 -0
- package/include/cluaupp/libs.hpp +25 -0
- package/include/cluaupp/roblox.hpp +28 -0
- package/package.json +65 -0
- package/runtime/ArrayIndexer/init.luau +144 -0
- package/runtime/Chrono/Client/ClientClock.luau +202 -0
- package/runtime/Chrono/Client/InterpolationBuffer.luau +74 -0
- package/runtime/Chrono/Client/ModelResolver.luau +53 -0
- package/runtime/Chrono/Client/Player.luau +113 -0
- package/runtime/Chrono/Client/Receiver.luau +395 -0
- package/runtime/Chrono/Client/Replicate.luau +333 -0
- package/runtime/Chrono/Client/Sender.luau +205 -0
- package/runtime/Chrono/LICENSE +21 -0
- package/runtime/Chrono/Server/EntityGrid.luau +299 -0
- package/runtime/Chrono/Server/Player.luau +141 -0
- package/runtime/Chrono/Server/Receiver.luau +287 -0
- package/runtime/Chrono/Server/Replicate.luau +415 -0
- package/runtime/Chrono/Server/Sender.luau +306 -0
- package/runtime/Chrono/Server/ServerClock.luau +50 -0
- package/runtime/Chrono/Shared/ApplyMounts.luau +137 -0
- package/runtime/Chrono/Shared/Bin.luau +31 -0
- package/runtime/Chrono/Shared/ClockUnwrap.luau +70 -0
- package/runtime/Chrono/Shared/Config.luau +264 -0
- package/runtime/Chrono/Shared/Entity.luau +1016 -0
- package/runtime/Chrono/Shared/Events.luau +39 -0
- package/runtime/Chrono/Shared/Holder.luau +210 -0
- package/runtime/Chrono/Shared/InterpolationMath.luau +51 -0
- package/runtime/Chrono/Shared/ModelHelper.luau +122 -0
- package/runtime/Chrono/Shared/Remotes/ClientClockRelay.model.json +3 -0
- package/runtime/Chrono/Shared/Remotes/ClientHeartbeat.model.json +3 -0
- package/runtime/Chrono/Shared/Remotes/ClientLoaded.model.json +3 -0
- package/runtime/Chrono/Shared/Remotes/Death.model.json +3 -0
- package/runtime/Chrono/Shared/Remotes/Heartbeat.model.json +3 -0
- package/runtime/Chrono/Shared/Remotes/Replicate.model.json +3 -0
- package/runtime/Chrono/Shared/Remotes/ReplicateFull.model.json +3 -0
- package/runtime/Chrono/Shared/Remotes/SafeReplicate.model.json +3 -0
- package/runtime/Chrono/Shared/ReplicationRules.luau +122 -0
- package/runtime/Chrono/Shared/Signal.luau +219 -0
- package/runtime/Chrono/Shared/Snapshots.luau +218 -0
- package/runtime/Chrono/Shared/Stats.luau +204 -0
- package/runtime/Chrono/Shared/Ticker.luau +112 -0
- package/runtime/Chrono/Shared/Types.luau +247 -0
- package/runtime/Chrono/Shared/Warn.luau +33 -0
- package/runtime/Chrono/Shared/_CUSTOM_MODEL_REP/init.model.json +3 -0
- package/runtime/Chrono/_impl/Client/ClientClock.luau +202 -0
- package/runtime/Chrono/_impl/Client/InterpolationBuffer.luau +74 -0
- package/runtime/Chrono/_impl/Client/ModelResolver.luau +53 -0
- package/runtime/Chrono/_impl/Client/Player.luau +113 -0
- package/runtime/Chrono/_impl/Client/Receiver.luau +395 -0
- package/runtime/Chrono/_impl/Client/Replicate.luau +333 -0
- package/runtime/Chrono/_impl/Client/Sender.luau +205 -0
- package/runtime/Chrono/_impl/LICENSE +21 -0
- package/runtime/Chrono/_impl/Server/EntityGrid.luau +299 -0
- package/runtime/Chrono/_impl/Server/Player.luau +141 -0
- package/runtime/Chrono/_impl/Server/Receiver.luau +287 -0
- package/runtime/Chrono/_impl/Server/Replicate.luau +415 -0
- package/runtime/Chrono/_impl/Server/Sender.luau +306 -0
- package/runtime/Chrono/_impl/Server/ServerClock.luau +50 -0
- package/runtime/Chrono/_impl/Shared/ApplyMounts.luau +137 -0
- package/runtime/Chrono/_impl/Shared/Bin.luau +31 -0
- package/runtime/Chrono/_impl/Shared/ClockUnwrap.luau +70 -0
- package/runtime/Chrono/_impl/Shared/Config.luau +264 -0
- package/runtime/Chrono/_impl/Shared/Entity.luau +1016 -0
- package/runtime/Chrono/_impl/Shared/Events.luau +39 -0
- package/runtime/Chrono/_impl/Shared/Holder.luau +210 -0
- package/runtime/Chrono/_impl/Shared/InterpolationMath.luau +51 -0
- package/runtime/Chrono/_impl/Shared/ModelHelper.luau +122 -0
- package/runtime/Chrono/_impl/Shared/Remotes/ClientClockRelay.model.json +3 -0
- package/runtime/Chrono/_impl/Shared/Remotes/ClientHeartbeat.model.json +3 -0
- package/runtime/Chrono/_impl/Shared/Remotes/ClientLoaded.model.json +3 -0
- package/runtime/Chrono/_impl/Shared/Remotes/Death.model.json +3 -0
- package/runtime/Chrono/_impl/Shared/Remotes/Heartbeat.model.json +3 -0
- package/runtime/Chrono/_impl/Shared/Remotes/Replicate.model.json +3 -0
- package/runtime/Chrono/_impl/Shared/Remotes/ReplicateFull.model.json +3 -0
- package/runtime/Chrono/_impl/Shared/Remotes/SafeReplicate.model.json +3 -0
- package/runtime/Chrono/_impl/Shared/ReplicationRules.luau +122 -0
- package/runtime/Chrono/_impl/Shared/Signal.luau +219 -0
- package/runtime/Chrono/_impl/Shared/Snapshots.luau +218 -0
- package/runtime/Chrono/_impl/Shared/Stats.luau +204 -0
- package/runtime/Chrono/_impl/Shared/Ticker.luau +112 -0
- package/runtime/Chrono/_impl/Shared/Types.luau +247 -0
- package/runtime/Chrono/_impl/Shared/Warn.luau +33 -0
- package/runtime/Chrono/_impl/Shared/_CUSTOM_MODEL_REP/init.model.json +3 -0
- package/runtime/Chrono/_impl/init.luau +96 -0
- package/runtime/Chrono/init.luau +14 -0
- package/runtime/Cmdr/BuiltInCommands/Admin/announce.luau +21 -0
- package/runtime/Cmdr/BuiltInCommands/Admin/announceServer.luau +17 -0
- package/runtime/Cmdr/BuiltInCommands/Admin/ban.luau +59 -0
- package/runtime/Cmdr/BuiltInCommands/Admin/banServer.luau +30 -0
- package/runtime/Cmdr/BuiltInCommands/Admin/gotoPlace.luau +35 -0
- package/runtime/Cmdr/BuiltInCommands/Admin/gotoPlaceServer.luau +17 -0
- package/runtime/Cmdr/BuiltInCommands/Admin/kick.luau +19 -0
- package/runtime/Cmdr/BuiltInCommands/Admin/kickServer.luau +27 -0
- package/runtime/Cmdr/BuiltInCommands/Admin/kill.luau +13 -0
- package/runtime/Cmdr/BuiltInCommands/Admin/killServer.luau +13 -0
- package/runtime/Cmdr/BuiltInCommands/Admin/respawn.luau +15 -0
- package/runtime/Cmdr/BuiltInCommands/Admin/respawnServer.luau +7 -0
- package/runtime/Cmdr/BuiltInCommands/Admin/teleport.luau +30 -0
- package/runtime/Cmdr/BuiltInCommands/Admin/teleportServer.luau +26 -0
- package/runtime/Cmdr/BuiltInCommands/Admin/unban.luau +26 -0
- package/runtime/Cmdr/BuiltInCommands/Admin/unbanServer.luau +10 -0
- package/runtime/Cmdr/BuiltInCommands/Debug/blink.luau +35 -0
- package/runtime/Cmdr/BuiltInCommands/Debug/fetch.luau +12 -0
- package/runtime/Cmdr/BuiltInCommands/Debug/fetchServer.luau +7 -0
- package/runtime/Cmdr/BuiltInCommands/Debug/getPlayerPlaceInstance.luau +20 -0
- package/runtime/Cmdr/BuiltInCommands/Debug/getPlayerPlaceInstanceServer.luau +28 -0
- package/runtime/Cmdr/BuiltInCommands/Debug/position.luau +30 -0
- package/runtime/Cmdr/BuiltInCommands/Debug/thru.luau +50 -0
- package/runtime/Cmdr/BuiltInCommands/Debug/uptime.luau +6 -0
- package/runtime/Cmdr/BuiltInCommands/Debug/uptimeServer.luau +12 -0
- package/runtime/Cmdr/BuiltInCommands/Debug/version.luau +12 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/alias.luau +22 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/bind.luau +104 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/clear.luau +20 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/convertTimestamp.luau +18 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/echo.luau +17 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/edit.luau +75 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/exit.luau +11 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/history.luau +27 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/hover.luau +21 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/jsonArrayDecode.luau +25 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/jsonArrayEncode.luau +18 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/len.luau +16 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/math.luau +36 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/pick.luau +21 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/rand.luau +27 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/replace.luau +32 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/resolve.luau +32 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/run.luau +20 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/runLines.luau +34 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/runif.luau +95 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/unbind.luau +27 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/var.luau +29 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/varServer.luau +37 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/varSet.luau +30 -0
- package/runtime/Cmdr/BuiltInCommands/Utility/varSetServer.luau +29 -0
- package/runtime/Cmdr/BuiltInCommands/help.luau +96 -0
- package/runtime/Cmdr/BuiltInTypes/BrickColor.luau +258 -0
- package/runtime/Cmdr/BuiltInTypes/Color3.luau +59 -0
- package/runtime/Cmdr/BuiltInTypes/Command.luau +23 -0
- package/runtime/Cmdr/BuiltInTypes/Duration.luau +111 -0
- package/runtime/Cmdr/BuiltInTypes/JSON.luau +13 -0
- package/runtime/Cmdr/BuiltInTypes/MathOperator.luau +43 -0
- package/runtime/Cmdr/BuiltInTypes/Player.luau +36 -0
- package/runtime/Cmdr/BuiltInTypes/PlayerId.luau +66 -0
- package/runtime/Cmdr/BuiltInTypes/Primitives.luau +145 -0
- package/runtime/Cmdr/BuiltInTypes/StoredKey.luau +33 -0
- package/runtime/Cmdr/BuiltInTypes/Team.luau +49 -0
- package/runtime/Cmdr/BuiltInTypes/Type.luau +23 -0
- package/runtime/Cmdr/BuiltInTypes/URL.luau +18 -0
- package/runtime/Cmdr/BuiltInTypes/UserInput.luau +32 -0
- package/runtime/Cmdr/BuiltInTypes/Vector.luau +58 -0
- package/runtime/Cmdr/CmdrClient/CmdrInterface/AutoComplete.luau +240 -0
- package/runtime/Cmdr/CmdrClient/CmdrInterface/CreateGui.luau +227 -0
- package/runtime/Cmdr/CmdrClient/CmdrInterface/Window.luau +713 -0
- package/runtime/Cmdr/CmdrClient/CmdrInterface/init.luau +18 -0
- package/runtime/Cmdr/CmdrClient/DefaultEventHandlers.luau +18 -0
- package/runtime/Cmdr/CmdrClient/Shared/Argument.luau +395 -0
- package/runtime/Cmdr/CmdrClient/Shared/BuiltInGuards/HasCharacter.luau +39 -0
- package/runtime/Cmdr/CmdrClient/Shared/BuiltInGuards/IsDataStoreAvailable.luau +36 -0
- package/runtime/Cmdr/CmdrClient/Shared/BuiltInGuards/MaxArrayLength.luau +10 -0
- package/runtime/Cmdr/CmdrClient/Shared/BuiltInGuards/MaxStringLength.luau +10 -0
- package/runtime/Cmdr/CmdrClient/Shared/BuiltInGuards/NonEmptyString.luau +10 -0
- package/runtime/Cmdr/CmdrClient/Shared/BuiltInGuards/NotEquals.luau +8 -0
- package/runtime/Cmdr/CmdrClient/Shared/Command.luau +415 -0
- package/runtime/Cmdr/CmdrClient/Shared/Dispatcher.luau +407 -0
- package/runtime/Cmdr/CmdrClient/Shared/Registry.luau +717 -0
- package/runtime/Cmdr/CmdrClient/Shared/Util.luau +879 -0
- package/runtime/Cmdr/CmdrClient/init.luau +377 -0
- package/runtime/Cmdr/LICENSE +21 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Admin/announce.luau +21 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Admin/announceServer.luau +17 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Admin/ban.luau +59 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Admin/banServer.luau +30 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Admin/gotoPlace.luau +35 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Admin/gotoPlaceServer.luau +17 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Admin/kick.luau +19 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Admin/kickServer.luau +27 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Admin/kill.luau +13 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Admin/killServer.luau +13 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Admin/respawn.luau +15 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Admin/respawnServer.luau +7 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Admin/teleport.luau +30 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Admin/teleportServer.luau +26 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Admin/unban.luau +26 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Admin/unbanServer.luau +10 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Debug/blink.luau +35 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Debug/fetch.luau +12 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Debug/fetchServer.luau +7 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Debug/getPlayerPlaceInstance.luau +20 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Debug/getPlayerPlaceInstanceServer.luau +28 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Debug/position.luau +30 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Debug/thru.luau +50 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Debug/uptime.luau +6 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Debug/uptimeServer.luau +12 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Debug/version.luau +12 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/alias.luau +22 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/bind.luau +104 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/clear.luau +20 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/convertTimestamp.luau +18 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/echo.luau +17 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/edit.luau +75 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/exit.luau +11 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/history.luau +27 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/hover.luau +21 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/jsonArrayDecode.luau +25 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/jsonArrayEncode.luau +18 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/len.luau +16 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/math.luau +36 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/pick.luau +21 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/rand.luau +27 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/replace.luau +32 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/resolve.luau +32 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/run.luau +20 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/runLines.luau +34 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/runif.luau +95 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/unbind.luau +27 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/var.luau +29 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/varServer.luau +37 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/varSet.luau +30 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/Utility/varSetServer.luau +29 -0
- package/runtime/Cmdr/_impl/BuiltInCommands/help.luau +96 -0
- package/runtime/Cmdr/_impl/BuiltInTypes/BrickColor.luau +258 -0
- package/runtime/Cmdr/_impl/BuiltInTypes/Color3.luau +59 -0
- package/runtime/Cmdr/_impl/BuiltInTypes/Command.luau +23 -0
- package/runtime/Cmdr/_impl/BuiltInTypes/Duration.luau +111 -0
- package/runtime/Cmdr/_impl/BuiltInTypes/JSON.luau +13 -0
- package/runtime/Cmdr/_impl/BuiltInTypes/MathOperator.luau +43 -0
- package/runtime/Cmdr/_impl/BuiltInTypes/Player.luau +36 -0
- package/runtime/Cmdr/_impl/BuiltInTypes/PlayerId.luau +66 -0
- package/runtime/Cmdr/_impl/BuiltInTypes/Primitives.luau +145 -0
- package/runtime/Cmdr/_impl/BuiltInTypes/StoredKey.luau +33 -0
- package/runtime/Cmdr/_impl/BuiltInTypes/Team.luau +49 -0
- package/runtime/Cmdr/_impl/BuiltInTypes/Type.luau +23 -0
- package/runtime/Cmdr/_impl/BuiltInTypes/URL.luau +18 -0
- package/runtime/Cmdr/_impl/BuiltInTypes/UserInput.luau +32 -0
- package/runtime/Cmdr/_impl/BuiltInTypes/Vector.luau +58 -0
- package/runtime/Cmdr/_impl/CmdrClient/CmdrInterface/AutoComplete.luau +240 -0
- package/runtime/Cmdr/_impl/CmdrClient/CmdrInterface/CreateGui.luau +227 -0
- package/runtime/Cmdr/_impl/CmdrClient/CmdrInterface/Window.luau +713 -0
- package/runtime/Cmdr/_impl/CmdrClient/CmdrInterface/init.luau +18 -0
- package/runtime/Cmdr/_impl/CmdrClient/DefaultEventHandlers.luau +18 -0
- package/runtime/Cmdr/_impl/CmdrClient/Shared/Argument.luau +395 -0
- package/runtime/Cmdr/_impl/CmdrClient/Shared/BuiltInGuards/HasCharacter.luau +39 -0
- package/runtime/Cmdr/_impl/CmdrClient/Shared/BuiltInGuards/IsDataStoreAvailable.luau +36 -0
- package/runtime/Cmdr/_impl/CmdrClient/Shared/BuiltInGuards/MaxArrayLength.luau +10 -0
- package/runtime/Cmdr/_impl/CmdrClient/Shared/BuiltInGuards/MaxStringLength.luau +10 -0
- package/runtime/Cmdr/_impl/CmdrClient/Shared/BuiltInGuards/NonEmptyString.luau +10 -0
- package/runtime/Cmdr/_impl/CmdrClient/Shared/BuiltInGuards/NotEquals.luau +8 -0
- package/runtime/Cmdr/_impl/CmdrClient/Shared/Command.luau +415 -0
- package/runtime/Cmdr/_impl/CmdrClient/Shared/Dispatcher.luau +407 -0
- package/runtime/Cmdr/_impl/CmdrClient/Shared/Registry.luau +717 -0
- package/runtime/Cmdr/_impl/CmdrClient/Shared/Util.luau +879 -0
- package/runtime/Cmdr/_impl/CmdrClient/init.luau +377 -0
- package/runtime/Cmdr/_impl/LICENSE +21 -0
- package/runtime/Cmdr/_impl/init.luau +178 -0
- package/runtime/Cmdr/init.luau +8 -0
- package/runtime/DataService/Client.luau +209 -0
- package/runtime/DataService/Data.luau +886 -0
- package/runtime/DataService/Enum.luau +6 -0
- package/runtime/DataService/Enums.luau +10 -0
- package/runtime/DataService/Packages/quicknet/DataTypes.luau +70 -0
- package/runtime/DataService/Packages/quicknet/Enums.luau +85 -0
- package/runtime/DataService/Packages/quicknet/EnumsToNativeTypes.luau +57 -0
- package/runtime/DataService/Packages/quicknet/Parser.luau +355 -0
- package/runtime/DataService/Packages/quicknet/QuickNet.luau +953 -0
- package/runtime/DataService/Packages/quicknet/Serialize.luau +2020 -0
- package/runtime/DataService/Packages/quicknet/Types.luau +72 -0
- package/runtime/DataService/Packages/quicknet/init.luau +1 -0
- package/runtime/DataService/Packages/signal/init.luau +433 -0
- package/runtime/DataService/Path.luau +236 -0
- package/runtime/DataService/ProfileStore.luau +2243 -0
- package/runtime/DataService/Replicator.luau +172 -0
- package/runtime/DataService/Server.luau +412 -0
- package/runtime/DataService/init.luau +204 -0
- package/runtime/Display/LICENSE +201 -0
- package/runtime/Display/_impl/LICENSE +201 -0
- package/runtime/Display/_impl/init.luau +269 -0
- package/runtime/Display/_impl/option.luau +237 -0
- package/runtime/Display/init.luau +10 -0
- package/runtime/Display/option.luau +237 -0
- package/runtime/EzVisualz/Dropshadow.luau +148 -0
- package/runtime/EzVisualz/Gradient.luau +452 -0
- package/runtime/EzVisualz/GradientTemplates/Bubblegum.luau +16 -0
- package/runtime/EzVisualz/GradientTemplates/Chrome.luau +16 -0
- package/runtime/EzVisualz/GradientTemplates/Death.luau +15 -0
- package/runtime/EzVisualz/GradientTemplates/Electric.luau +14 -0
- package/runtime/EzVisualz/GradientTemplates/Fire.luau +13 -0
- package/runtime/EzVisualz/GradientTemplates/Galaxy.luau +11 -0
- package/runtime/EzVisualz/GradientTemplates/Ghost.luau +16 -0
- package/runtime/EzVisualz/GradientTemplates/Gold.luau +14 -0
- package/runtime/EzVisualz/GradientTemplates/Green.luau +14 -0
- package/runtime/EzVisualz/GradientTemplates/Ice.luau +14 -0
- package/runtime/EzVisualz/GradientTemplates/Lava.luau +15 -0
- package/runtime/EzVisualz/GradientTemplates/Matrix.luau +19 -0
- package/runtime/EzVisualz/GradientTemplates/Neon.luau +12 -0
- package/runtime/EzVisualz/GradientTemplates/Oceanic.luau +15 -0
- package/runtime/EzVisualz/GradientTemplates/Rainbow.luau +13 -0
- package/runtime/EzVisualz/GradientTemplates/Silver.luau +12 -0
- package/runtime/EzVisualz/GradientTemplates/Sunset.luau +11 -0
- package/runtime/EzVisualz/GradientTemplates/Zebra.luau +18 -0
- package/runtime/EzVisualz/GradientTemplates/init.luau +9 -0
- package/runtime/EzVisualz/LICENSE.md +21 -0
- package/runtime/EzVisualz/Presets/Bubblegum.luau +36 -0
- package/runtime/EzVisualz/Presets/ChromeStroke.luau +15 -0
- package/runtime/EzVisualz/Presets/DeathStroke.luau +15 -0
- package/runtime/EzVisualz/Presets/ElectricStroke.luau +54 -0
- package/runtime/EzVisualz/Presets/FireStroke.luau +29 -0
- package/runtime/EzVisualz/Presets/GalaxyStroke.luau +31 -0
- package/runtime/EzVisualz/Presets/Ghost.luau +10 -0
- package/runtime/EzVisualz/Presets/GhostStroke.luau +15 -0
- package/runtime/EzVisualz/Presets/Gold.luau +10 -0
- package/runtime/EzVisualz/Presets/GoldStroke.luau +15 -0
- package/runtime/EzVisualz/Presets/GreenOutline.luau +23 -0
- package/runtime/EzVisualz/Presets/IceStroke.luau +15 -0
- package/runtime/EzVisualz/Presets/Lava.luau +9 -0
- package/runtime/EzVisualz/Presets/LavaStroke.luau +13 -0
- package/runtime/EzVisualz/Presets/Matrix.luau +21 -0
- package/runtime/EzVisualz/Presets/NeonStroke.luau +30 -0
- package/runtime/EzVisualz/Presets/OceanicStroke.luau +15 -0
- package/runtime/EzVisualz/Presets/Rainbow.luau +9 -0
- package/runtime/EzVisualz/Presets/RainbowOutline.luau +23 -0
- package/runtime/EzVisualz/Presets/RainbowStroke.luau +13 -0
- package/runtime/EzVisualz/Presets/Shine.luau +48 -0
- package/runtime/EzVisualz/Presets/ShineOutline.luau +66 -0
- package/runtime/EzVisualz/Presets/Silver.luau +10 -0
- package/runtime/EzVisualz/Presets/SilverStroke.luau +15 -0
- package/runtime/EzVisualz/Presets/SunsetStroke.luau +31 -0
- package/runtime/EzVisualz/Presets/WaveStroke.luau +33 -0
- package/runtime/EzVisualz/Presets/Zebra.luau +21 -0
- package/runtime/EzVisualz/Presets/init.luau +9 -0
- package/runtime/EzVisualz/Stroke.luau +167 -0
- package/runtime/EzVisualz/Util.luau +7 -0
- package/runtime/EzVisualz/_impl/Dropshadow.luau +148 -0
- package/runtime/EzVisualz/_impl/Gradient.luau +452 -0
- package/runtime/EzVisualz/_impl/GradientTemplates/Bubblegum.luau +16 -0
- package/runtime/EzVisualz/_impl/GradientTemplates/Chrome.luau +16 -0
- package/runtime/EzVisualz/_impl/GradientTemplates/Death.luau +15 -0
- package/runtime/EzVisualz/_impl/GradientTemplates/Electric.luau +14 -0
- package/runtime/EzVisualz/_impl/GradientTemplates/Fire.luau +13 -0
- package/runtime/EzVisualz/_impl/GradientTemplates/Galaxy.luau +11 -0
- package/runtime/EzVisualz/_impl/GradientTemplates/Ghost.luau +16 -0
- package/runtime/EzVisualz/_impl/GradientTemplates/Gold.luau +14 -0
- package/runtime/EzVisualz/_impl/GradientTemplates/Green.luau +14 -0
- package/runtime/EzVisualz/_impl/GradientTemplates/Ice.luau +14 -0
- package/runtime/EzVisualz/_impl/GradientTemplates/Lava.luau +15 -0
- package/runtime/EzVisualz/_impl/GradientTemplates/Matrix.luau +19 -0
- package/runtime/EzVisualz/_impl/GradientTemplates/Neon.luau +12 -0
- package/runtime/EzVisualz/_impl/GradientTemplates/Oceanic.luau +15 -0
- package/runtime/EzVisualz/_impl/GradientTemplates/Rainbow.luau +13 -0
- package/runtime/EzVisualz/_impl/GradientTemplates/Silver.luau +12 -0
- package/runtime/EzVisualz/_impl/GradientTemplates/Sunset.luau +11 -0
- package/runtime/EzVisualz/_impl/GradientTemplates/Zebra.luau +18 -0
- package/runtime/EzVisualz/_impl/GradientTemplates/init.luau +9 -0
- package/runtime/EzVisualz/_impl/LICENSE.md +21 -0
- package/runtime/EzVisualz/_impl/Presets/Bubblegum.luau +36 -0
- package/runtime/EzVisualz/_impl/Presets/ChromeStroke.luau +15 -0
- package/runtime/EzVisualz/_impl/Presets/DeathStroke.luau +15 -0
- package/runtime/EzVisualz/_impl/Presets/ElectricStroke.luau +54 -0
- package/runtime/EzVisualz/_impl/Presets/FireStroke.luau +29 -0
- package/runtime/EzVisualz/_impl/Presets/GalaxyStroke.luau +31 -0
- package/runtime/EzVisualz/_impl/Presets/Ghost.luau +10 -0
- package/runtime/EzVisualz/_impl/Presets/GhostStroke.luau +15 -0
- package/runtime/EzVisualz/_impl/Presets/Gold.luau +10 -0
- package/runtime/EzVisualz/_impl/Presets/GoldStroke.luau +15 -0
- package/runtime/EzVisualz/_impl/Presets/GreenOutline.luau +23 -0
- package/runtime/EzVisualz/_impl/Presets/IceStroke.luau +15 -0
- package/runtime/EzVisualz/_impl/Presets/Lava.luau +9 -0
- package/runtime/EzVisualz/_impl/Presets/LavaStroke.luau +13 -0
- package/runtime/EzVisualz/_impl/Presets/Matrix.luau +21 -0
- package/runtime/EzVisualz/_impl/Presets/NeonStroke.luau +30 -0
- package/runtime/EzVisualz/_impl/Presets/OceanicStroke.luau +15 -0
- package/runtime/EzVisualz/_impl/Presets/Rainbow.luau +9 -0
- package/runtime/EzVisualz/_impl/Presets/RainbowOutline.luau +23 -0
- package/runtime/EzVisualz/_impl/Presets/RainbowStroke.luau +13 -0
- package/runtime/EzVisualz/_impl/Presets/Shine.luau +48 -0
- package/runtime/EzVisualz/_impl/Presets/ShineOutline.luau +66 -0
- package/runtime/EzVisualz/_impl/Presets/Silver.luau +10 -0
- package/runtime/EzVisualz/_impl/Presets/SilverStroke.luau +15 -0
- package/runtime/EzVisualz/_impl/Presets/SunsetStroke.luau +31 -0
- package/runtime/EzVisualz/_impl/Presets/WaveStroke.luau +33 -0
- package/runtime/EzVisualz/_impl/Presets/Zebra.luau +21 -0
- package/runtime/EzVisualz/_impl/Presets/init.luau +9 -0
- package/runtime/EzVisualz/_impl/Stroke.luau +167 -0
- package/runtime/EzVisualz/_impl/Util.luau +7 -0
- package/runtime/EzVisualz/_impl/init.luau +319 -0
- package/runtime/EzVisualz/_impl/wally.lock +8 -0
- package/runtime/EzVisualz/_impl/wally.toml +8 -0
- package/runtime/EzVisualz/init.luau +9 -0
- package/runtime/EzVisualz/wally.lock +8 -0
- package/runtime/EzVisualz/wally.toml +8 -0
- package/runtime/FormatNumber/LICENSE.md +25 -0
- package/runtime/FormatNumber/Main/DecimalFormatSymbols.lua +43 -0
- package/runtime/FormatNumber/Main/IntegerWidth.lua +41 -0
- package/runtime/FormatNumber/Main/Notation.lua +116 -0
- package/runtime/FormatNumber/Main/Precision.lua +179 -0
- package/runtime/FormatNumber/Main/init.lua +199 -0
- package/runtime/FormatNumber/Simple/init.lua +76 -0
- package/runtime/FormatNumber/Version.lua +82 -0
- package/runtime/FormatNumber/_impl/LICENSE.md +25 -0
- package/runtime/FormatNumber/_impl/Main/DecimalFormatSymbols.lua +43 -0
- package/runtime/FormatNumber/_impl/Main/IntegerWidth.lua +41 -0
- package/runtime/FormatNumber/_impl/Main/Notation.lua +116 -0
- package/runtime/FormatNumber/_impl/Main/Precision.lua +179 -0
- package/runtime/FormatNumber/_impl/Main/init.lua +199 -0
- package/runtime/FormatNumber/_impl/Simple/init.lua +76 -0
- package/runtime/FormatNumber/_impl/Version.lua +82 -0
- package/runtime/FormatNumber/_impl/_internal/class.lua +204 -0
- package/runtime/FormatNumber/_impl/_internal/decimal_conversion.lua +30 -0
- package/runtime/FormatNumber/_impl/_internal/enums.lua +55 -0
- package/runtime/FormatNumber/_impl/_internal/format.lua +342 -0
- package/runtime/FormatNumber/_impl/_internal/formatter_settings.lua +160 -0
- package/runtime/FormatNumber/_impl/_internal/init.lua +8 -0
- package/runtime/FormatNumber/_impl/_internal/skeleton.lua +541 -0
- package/runtime/FormatNumber/_impl/init.lua +20 -0
- package/runtime/FormatNumber/_internal/class.lua +204 -0
- package/runtime/FormatNumber/_internal/decimal_conversion.lua +30 -0
- package/runtime/FormatNumber/_internal/enums.lua +55 -0
- package/runtime/FormatNumber/_internal/format.lua +342 -0
- package/runtime/FormatNumber/_internal/formatter_settings.lua +160 -0
- package/runtime/FormatNumber/_internal/init.lua +8 -0
- package/runtime/FormatNumber/_internal/skeleton.lua +541 -0
- package/runtime/FormatNumber/init.lua +20 -0
- package/runtime/FormatNumber/init.luau +20 -0
- package/runtime/Fusion/Animation/ExternalTime.luau +84 -0
- package/runtime/Fusion/Animation/Spring.luau +313 -0
- package/runtime/Fusion/Animation/Stopwatch.luau +128 -0
- package/runtime/Fusion/Animation/Tween.luau +178 -0
- package/runtime/Fusion/Animation/getTweenDuration.luau +27 -0
- package/runtime/Fusion/Animation/getTweenRatio.luau +47 -0
- package/runtime/Fusion/Animation/lerpType.luau +164 -0
- package/runtime/Fusion/Animation/packType.luau +100 -0
- package/runtime/Fusion/Animation/springCoefficients.luau +80 -0
- package/runtime/Fusion/Animation/unpackType.luau +103 -0
- package/runtime/Fusion/Colour/Oklab.luau +70 -0
- package/runtime/Fusion/Colour/sRGB.luau +47 -0
- package/runtime/Fusion/External.luau +156 -0
- package/runtime/Fusion/ExternalDebug.luau +70 -0
- package/runtime/Fusion/Graph/Observer.luau +111 -0
- package/runtime/Fusion/Graph/castToGraph.luau +29 -0
- package/runtime/Fusion/Graph/change.luau +81 -0
- package/runtime/Fusion/Graph/depend.luau +33 -0
- package/runtime/Fusion/Graph/evaluate.luau +56 -0
- package/runtime/Fusion/Instances/Attribute.luau +58 -0
- package/runtime/Fusion/Instances/AttributeChange.luau +47 -0
- package/runtime/Fusion/Instances/AttributeOut.luau +63 -0
- package/runtime/Fusion/Instances/Child.luau +21 -0
- package/runtime/Fusion/Instances/Children.luau +148 -0
- package/runtime/Fusion/Instances/Hydrate.luau +29 -0
- package/runtime/Fusion/Instances/New.luau +48 -0
- package/runtime/Fusion/Instances/OnChange.luau +50 -0
- package/runtime/Fusion/Instances/OnEvent.luau +54 -0
- package/runtime/Fusion/Instances/Out.luau +69 -0
- package/runtime/Fusion/Instances/Tag.luau +61 -0
- package/runtime/Fusion/Instances/applyInstanceProps.luau +149 -0
- package/runtime/Fusion/Instances/defaultProps.luau +194 -0
- package/runtime/Fusion/LICENSE +21 -0
- package/runtime/Fusion/Logging/formatError.luau +49 -0
- package/runtime/Fusion/Logging/messages.luau +46 -0
- package/runtime/Fusion/Logging/parseError.luau +25 -0
- package/runtime/Fusion/Memory/checkLifetime.luau +134 -0
- package/runtime/Fusion/Memory/deriveScope.luau +24 -0
- package/runtime/Fusion/Memory/deriveScopeImpl.luau +40 -0
- package/runtime/Fusion/Memory/doCleanup.luau +91 -0
- package/runtime/Fusion/Memory/innerScope.luau +34 -0
- package/runtime/Fusion/Memory/insert.luau +22 -0
- package/runtime/Fusion/Memory/needsDestruction.luau +17 -0
- package/runtime/Fusion/Memory/scoped.luau +24 -0
- package/runtime/Fusion/RobloxExternal.luau +98 -0
- package/runtime/Fusion/State/Computed.luau +122 -0
- package/runtime/Fusion/State/For/Disassembly.luau +207 -0
- package/runtime/Fusion/State/For/ForTypes.luau +30 -0
- package/runtime/Fusion/State/For/init.luau +101 -0
- package/runtime/Fusion/State/ForKeys.luau +88 -0
- package/runtime/Fusion/State/ForPairs.luau +91 -0
- package/runtime/Fusion/State/ForValues.luau +88 -0
- package/runtime/Fusion/State/Value.luau +76 -0
- package/runtime/Fusion/State/castToState.luau +26 -0
- package/runtime/Fusion/State/peek.luau +31 -0
- package/runtime/Fusion/State/updateAll.luau +1 -0
- package/runtime/Fusion/Types.luau +318 -0
- package/runtime/Fusion/Utility/Contextual.luau +91 -0
- package/runtime/Fusion/Utility/Safe.luau +23 -0
- package/runtime/Fusion/Utility/isSimilar.luau +29 -0
- package/runtime/Fusion/Utility/merge.luau +35 -0
- package/runtime/Fusion/Utility/nameOf.luau +35 -0
- package/runtime/Fusion/Utility/never.luau +14 -0
- package/runtime/Fusion/Utility/nicknames.luau +11 -0
- package/runtime/Fusion/Utility/xtypeof.luau +27 -0
- package/runtime/Fusion/_impl/Animation/ExternalTime.luau +84 -0
- package/runtime/Fusion/_impl/Animation/Spring.luau +313 -0
- package/runtime/Fusion/_impl/Animation/Stopwatch.luau +128 -0
- package/runtime/Fusion/_impl/Animation/Tween.luau +178 -0
- package/runtime/Fusion/_impl/Animation/getTweenDuration.luau +27 -0
- package/runtime/Fusion/_impl/Animation/getTweenRatio.luau +47 -0
- package/runtime/Fusion/_impl/Animation/lerpType.luau +164 -0
- package/runtime/Fusion/_impl/Animation/packType.luau +100 -0
- package/runtime/Fusion/_impl/Animation/springCoefficients.luau +80 -0
- package/runtime/Fusion/_impl/Animation/unpackType.luau +103 -0
- package/runtime/Fusion/_impl/Colour/Oklab.luau +70 -0
- package/runtime/Fusion/_impl/Colour/sRGB.luau +47 -0
- package/runtime/Fusion/_impl/External.luau +156 -0
- package/runtime/Fusion/_impl/ExternalDebug.luau +70 -0
- package/runtime/Fusion/_impl/Graph/Observer.luau +111 -0
- package/runtime/Fusion/_impl/Graph/castToGraph.luau +29 -0
- package/runtime/Fusion/_impl/Graph/change.luau +81 -0
- package/runtime/Fusion/_impl/Graph/depend.luau +33 -0
- package/runtime/Fusion/_impl/Graph/evaluate.luau +56 -0
- package/runtime/Fusion/_impl/Instances/Attribute.luau +58 -0
- package/runtime/Fusion/_impl/Instances/AttributeChange.luau +47 -0
- package/runtime/Fusion/_impl/Instances/AttributeOut.luau +63 -0
- package/runtime/Fusion/_impl/Instances/Child.luau +21 -0
- package/runtime/Fusion/_impl/Instances/Children.luau +148 -0
- package/runtime/Fusion/_impl/Instances/Hydrate.luau +29 -0
- package/runtime/Fusion/_impl/Instances/New.luau +48 -0
- package/runtime/Fusion/_impl/Instances/OnChange.luau +50 -0
- package/runtime/Fusion/_impl/Instances/OnEvent.luau +54 -0
- package/runtime/Fusion/_impl/Instances/Out.luau +69 -0
- package/runtime/Fusion/_impl/Instances/Tag.luau +61 -0
- package/runtime/Fusion/_impl/Instances/applyInstanceProps.luau +149 -0
- package/runtime/Fusion/_impl/Instances/defaultProps.luau +194 -0
- package/runtime/Fusion/_impl/LICENSE +21 -0
- package/runtime/Fusion/_impl/Logging/formatError.luau +49 -0
- package/runtime/Fusion/_impl/Logging/messages.luau +46 -0
- package/runtime/Fusion/_impl/Logging/parseError.luau +25 -0
- package/runtime/Fusion/_impl/Memory/checkLifetime.luau +134 -0
- package/runtime/Fusion/_impl/Memory/deriveScope.luau +24 -0
- package/runtime/Fusion/_impl/Memory/deriveScopeImpl.luau +40 -0
- package/runtime/Fusion/_impl/Memory/doCleanup.luau +91 -0
- package/runtime/Fusion/_impl/Memory/innerScope.luau +34 -0
- package/runtime/Fusion/_impl/Memory/insert.luau +22 -0
- package/runtime/Fusion/_impl/Memory/needsDestruction.luau +17 -0
- package/runtime/Fusion/_impl/Memory/scoped.luau +24 -0
- package/runtime/Fusion/_impl/RobloxExternal.luau +98 -0
- package/runtime/Fusion/_impl/State/Computed.luau +122 -0
- package/runtime/Fusion/_impl/State/For/Disassembly.luau +207 -0
- package/runtime/Fusion/_impl/State/For/ForTypes.luau +30 -0
- package/runtime/Fusion/_impl/State/For/init.luau +101 -0
- package/runtime/Fusion/_impl/State/ForKeys.luau +88 -0
- package/runtime/Fusion/_impl/State/ForPairs.luau +91 -0
- package/runtime/Fusion/_impl/State/ForValues.luau +88 -0
- package/runtime/Fusion/_impl/State/Value.luau +76 -0
- package/runtime/Fusion/_impl/State/castToState.luau +26 -0
- package/runtime/Fusion/_impl/State/peek.luau +31 -0
- package/runtime/Fusion/_impl/State/updateAll.luau +1 -0
- package/runtime/Fusion/_impl/Types.luau +318 -0
- package/runtime/Fusion/_impl/Utility/Contextual.luau +91 -0
- package/runtime/Fusion/_impl/Utility/Safe.luau +23 -0
- package/runtime/Fusion/_impl/Utility/isSimilar.luau +29 -0
- package/runtime/Fusion/_impl/Utility/merge.luau +35 -0
- package/runtime/Fusion/_impl/Utility/nameOf.luau +35 -0
- package/runtime/Fusion/_impl/Utility/never.luau +14 -0
- package/runtime/Fusion/_impl/Utility/nicknames.luau +11 -0
- package/runtime/Fusion/_impl/Utility/xtypeof.luau +27 -0
- package/runtime/Fusion/_impl/init.luau +83 -0
- package/runtime/Fusion/init.luau +27 -0
- package/runtime/Iris/API.lua +2085 -0
- package/runtime/Iris/Internal.lua +895 -0
- package/runtime/Iris/LICENSE.txt +21 -0
- package/runtime/Iris/PubTypes.lua +43 -0
- package/runtime/Iris/Types.lua +660 -0
- package/runtime/Iris/WidgetTypes.lua +521 -0
- package/runtime/Iris/_impl/API.lua +2085 -0
- package/runtime/Iris/_impl/Internal.lua +895 -0
- package/runtime/Iris/_impl/LICENSE.txt +21 -0
- package/runtime/Iris/_impl/PubTypes.lua +43 -0
- package/runtime/Iris/_impl/Types.lua +660 -0
- package/runtime/Iris/_impl/WidgetTypes.lua +521 -0
- package/runtime/Iris/_impl/config.lua +305 -0
- package/runtime/Iris/_impl/init.lua +696 -0
- package/runtime/Iris/_impl/widgets/Button.lua +90 -0
- package/runtime/Iris/_impl/widgets/Checkbox.lua +115 -0
- package/runtime/Iris/_impl/widgets/Combo.lua +492 -0
- package/runtime/Iris/_impl/widgets/Format.lua +140 -0
- package/runtime/Iris/_impl/widgets/Image.lua +155 -0
- package/runtime/Iris/_impl/widgets/Input.lua +1232 -0
- package/runtime/Iris/_impl/widgets/Menu.lua +599 -0
- package/runtime/Iris/_impl/widgets/Plot.lua +639 -0
- package/runtime/Iris/_impl/widgets/RadioButton.lua +126 -0
- package/runtime/Iris/_impl/widgets/Root.lua +143 -0
- package/runtime/Iris/_impl/widgets/Tab.lua +333 -0
- package/runtime/Iris/_impl/widgets/Table.lua +635 -0
- package/runtime/Iris/_impl/widgets/Text.lua +132 -0
- package/runtime/Iris/_impl/widgets/Tree.lua +287 -0
- package/runtime/Iris/_impl/widgets/Window.lua +1075 -0
- package/runtime/Iris/_impl/widgets/init.lua +447 -0
- package/runtime/Iris/config.lua +305 -0
- package/runtime/Iris/init.lua +696 -0
- package/runtime/Iris/init.luau +12 -0
- package/runtime/Iris/widgets/Button.lua +90 -0
- package/runtime/Iris/widgets/Checkbox.lua +115 -0
- package/runtime/Iris/widgets/Combo.lua +492 -0
- package/runtime/Iris/widgets/Format.lua +140 -0
- package/runtime/Iris/widgets/Image.lua +155 -0
- package/runtime/Iris/widgets/Input.lua +1232 -0
- package/runtime/Iris/widgets/Menu.lua +599 -0
- package/runtime/Iris/widgets/Plot.lua +639 -0
- package/runtime/Iris/widgets/RadioButton.lua +126 -0
- package/runtime/Iris/widgets/Root.lua +143 -0
- package/runtime/Iris/widgets/Tab.lua +333 -0
- package/runtime/Iris/widgets/Table.lua +635 -0
- package/runtime/Iris/widgets/Text.lua +132 -0
- package/runtime/Iris/widgets/Tree.lua +287 -0
- package/runtime/Iris/widgets/Window.lua +1075 -0
- package/runtime/Iris/widgets/init.lua +447 -0
- package/runtime/Janitor/FastDefer.luau +33 -0
- package/runtime/Janitor/LICENSE +21 -0
- package/runtime/Janitor/_impl/FastDefer.luau +33 -0
- package/runtime/Janitor/_impl/LICENSE +21 -0
- package/runtime/Janitor/_impl/init.luau +999 -0
- package/runtime/Janitor/init.luau +45 -0
- package/runtime/MathUtils/init.luau +100 -0
- package/runtime/Module3D/LICENSE +21 -0
- package/runtime/Module3D/_impl/LICENSE +21 -0
- package/runtime/Module3D/_impl/init.luau +269 -0
- package/runtime/Module3D/init.luau +14 -0
- package/runtime/Net/init.luau +125 -0
- package/runtime/Net/src/codec.luau +153 -0
- package/runtime/Occlude/init.luau +54 -0
- package/runtime/Promise/LICENSE +21 -0
- package/runtime/Promise/_impl/LICENSE +21 -0
- package/runtime/Promise/_impl/init.lua +1991 -0
- package/runtime/Promise/init.lua +1990 -0
- package/runtime/Promise/init.luau +13 -0
- package/runtime/Promise/types.luau +46 -0
- package/runtime/SOURCES.md +22 -0
- package/runtime/Spring/LICENSE +201 -0
- package/runtime/Spring/_impl/LICENSE +201 -0
- package/runtime/Spring/_impl/init.luau +111 -0
- package/runtime/Spring/init.luau +24 -0
- package/runtime/StateMachine/Classes/State.lua +375 -0
- package/runtime/StateMachine/Classes/Transition.lua +336 -0
- package/runtime/StateMachine/Functions/deepCopy.lua +19 -0
- package/runtime/StateMachine/Functions/mergeTables.lua +22 -0
- package/runtime/StateMachine/LICENSE +19 -0
- package/runtime/StateMachine/Vendor/Signal.lua +386 -0
- package/runtime/StateMachine/Vendor/Trove.lua +188 -0
- package/runtime/StateMachine/_impl/Classes/State.lua +375 -0
- package/runtime/StateMachine/_impl/Classes/Transition.lua +336 -0
- package/runtime/StateMachine/_impl/Functions/deepCopy.lua +19 -0
- package/runtime/StateMachine/_impl/Functions/mergeTables.lua +22 -0
- package/runtime/StateMachine/_impl/LICENSE +19 -0
- package/runtime/StateMachine/_impl/Vendor/Signal.lua +386 -0
- package/runtime/StateMachine/_impl/Vendor/Trove.lua +188 -0
- package/runtime/StateMachine/_impl/init.lua +595 -0
- package/runtime/StateMachine/init.lua +595 -0
- package/runtime/StateMachine/init.luau +10 -0
- package/runtime/StickyBillboard/init.luau +167 -0
- package/runtime/TopbarPlus/Attribute.lua +35 -0
- package/runtime/TopbarPlus/Elements/Caption.lua +316 -0
- package/runtime/TopbarPlus/Elements/Container.lua +215 -0
- package/runtime/TopbarPlus/Elements/Dropdown.lua +315 -0
- package/runtime/TopbarPlus/Elements/Indicator.lua +91 -0
- package/runtime/TopbarPlus/Elements/Menu.lua +180 -0
- package/runtime/TopbarPlus/Elements/Notice.lua +113 -0
- package/runtime/TopbarPlus/Elements/Selection.lua +49 -0
- package/runtime/TopbarPlus/Elements/Widget.lua +437 -0
- package/runtime/TopbarPlus/Features/Gamepad.lua +201 -0
- package/runtime/TopbarPlus/Features/Overflow.lua +360 -0
- package/runtime/TopbarPlus/Features/Themes/Classic.lua +27 -0
- package/runtime/TopbarPlus/Features/Themes/Default.lua +75 -0
- package/runtime/TopbarPlus/Features/Themes/init.lua +353 -0
- package/runtime/TopbarPlus/LICENSE +381 -0
- package/runtime/TopbarPlus/Packages/GoodSignal.lua +182 -0
- package/runtime/TopbarPlus/Packages/Janitor.lua +322 -0
- package/runtime/TopbarPlus/Reference.lua +30 -0
- package/runtime/TopbarPlus/Types.lua +477 -0
- package/runtime/TopbarPlus/Utility.lua +462 -0
- package/runtime/TopbarPlus/VERSION.lua +51 -0
- package/runtime/TopbarPlus/_impl/Attribute.lua +35 -0
- package/runtime/TopbarPlus/_impl/Elements/Caption.lua +316 -0
- package/runtime/TopbarPlus/_impl/Elements/Container.lua +215 -0
- package/runtime/TopbarPlus/_impl/Elements/Dropdown.lua +315 -0
- package/runtime/TopbarPlus/_impl/Elements/Indicator.lua +91 -0
- package/runtime/TopbarPlus/_impl/Elements/Menu.lua +180 -0
- package/runtime/TopbarPlus/_impl/Elements/Notice.lua +113 -0
- package/runtime/TopbarPlus/_impl/Elements/Selection.lua +49 -0
- package/runtime/TopbarPlus/_impl/Elements/Widget.lua +437 -0
- package/runtime/TopbarPlus/_impl/Features/Gamepad.lua +201 -0
- package/runtime/TopbarPlus/_impl/Features/Overflow.lua +360 -0
- package/runtime/TopbarPlus/_impl/Features/Themes/Classic.lua +27 -0
- package/runtime/TopbarPlus/_impl/Features/Themes/Default.lua +75 -0
- package/runtime/TopbarPlus/_impl/Features/Themes/init.lua +353 -0
- package/runtime/TopbarPlus/_impl/LICENSE +381 -0
- package/runtime/TopbarPlus/_impl/Packages/GoodSignal.lua +182 -0
- package/runtime/TopbarPlus/_impl/Packages/Janitor.lua +322 -0
- package/runtime/TopbarPlus/_impl/Reference.lua +30 -0
- package/runtime/TopbarPlus/_impl/Types.lua +477 -0
- package/runtime/TopbarPlus/_impl/Utility.lua +462 -0
- package/runtime/TopbarPlus/_impl/VERSION.lua +51 -0
- package/runtime/TopbarPlus/_impl/init.lua +1249 -0
- package/runtime/TopbarPlus/init.lua +1249 -0
- package/runtime/TopbarPlus/init.luau +8 -0
- package/runtime/Twinkle/init.luau +157 -0
- package/runtime/VfxUtil/init.luau +164 -0
- package/src/api.generated.js +3675 -0
- package/src/api.js +57 -0
- package/src/architecture.js +393 -0
- package/src/cli.js +192 -0
- package/src/compile.js +40 -0
- package/src/emit.js +213 -0
- package/src/lex.js +149 -0
- package/src/libs.js +355 -0
- package/src/parse.js +421 -0
- package/src/preprocess.js +80 -0
- package/src/understand.js +453 -0
- package/templates/game/.clangd +5 -0
- package/templates/game/.vscode/c_cpp_properties.json +23 -0
- package/templates/game/.vscode/settings.json +12 -0
- package/templates/game/Packages/.gitkeep +0 -0
- package/templates/game/cluaupp.config.json +6 -0
- package/templates/game/compile_flags.txt +3 -0
- package/templates/game/default.project.json +39 -0
- package/templates/game/package.json +9 -0
- package/templates/game/src/client/init.client.cpp +5 -0
- package/templates/game/src/server/leaderstats.server.cpp +28 -0
- package/templates/game/src/shared/config.cpp +5 -0
- package/templates/game/src/shared/config.h +3 -0
- package/templates/game/wally.toml +11 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
|
|
2
|
+
export type Signal<T...> = {
|
|
3
|
+
Connect: (self: Signal<T...>, callback: (T...) -> ()) -> QuickNetConnection,
|
|
4
|
+
ConnectAsync: (self: Signal<T...>, callback: (T...) -> ()) -> QuickNetConnection,
|
|
5
|
+
Once: (self: Signal<T...>, callback: (T...) -> ()) -> QuickNetConnection,
|
|
6
|
+
Wait: (self: Signal<T...>) -> T...,
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export type NetworkFunction<A..., B...> = {
|
|
10
|
+
--server
|
|
11
|
+
OnServerInvoke: (Player, A...) -> B...,
|
|
12
|
+
OnServerInvokeAsync: (Player, A...) -> B...,
|
|
13
|
+
--shared
|
|
14
|
+
SetRateLimit: (self: NetworkFunction<A..., B...>, max: number, timeWindow: number) -> NetworkFunction<A..., B...>,
|
|
15
|
+
SetResponseTimeout: (self: NetworkFunction<A..., B...>, timeout: number) -> NetworkFunction<A..., B...>,
|
|
16
|
+
--client
|
|
17
|
+
InvokeServer: (self: NetworkFunction<A..., B...>, A...) -> B...,
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type NetworkEvent<A...> = {
|
|
21
|
+
--server
|
|
22
|
+
OnServerEvent: Signal<(Player, A...)>,
|
|
23
|
+
FireClient: (self: NetworkEvent<A...>, player: Player, A...) -> (),
|
|
24
|
+
FireClients: (self: NetworkEvent<A...>, players: {Player}, A...) -> (),
|
|
25
|
+
FireAllClients: (self: NetworkEvent<A...>, A...) -> (),
|
|
26
|
+
FireAllExcept: (self: NetworkEvent<A...>, excludePlayer: Player, A...) -> (),
|
|
27
|
+
--shared
|
|
28
|
+
Response: <B...>(self: NetworkEvent<A...>, B...) -> NetworkFunction<A..., B...>,
|
|
29
|
+
Unreliable: (self: NetworkEvent<A...>) -> NetworkEvent<A...>,
|
|
30
|
+
SetRateLimit: (self: NetworkEvent<A...>, max: number, timeWindow: number) -> NetworkEvent<A...>,
|
|
31
|
+
--client
|
|
32
|
+
OnClientEvent: Signal<A...>,
|
|
33
|
+
FireServer: (self: NetworkEvent<A...>, A...) -> (),
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export type QuickNetConnection = {
|
|
37
|
+
Connected: boolean,
|
|
38
|
+
Disconnect: (self: QuickNetConnection) -> (),
|
|
39
|
+
Destroy: (self: QuickNetConnection) -> (),
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export type NetworkInfo<A..., B...> = {
|
|
43
|
+
Name: string,
|
|
44
|
+
Id: number,
|
|
45
|
+
NetworkType: number,
|
|
46
|
+
RateLimit: {Time: number, Max: number},
|
|
47
|
+
SendSchema: {any},
|
|
48
|
+
ResponseSchema: {any}?,
|
|
49
|
+
Callbacks: {[QuickNetConnection]: (...any) -> (...any)},
|
|
50
|
+
AsyncCallbacks: {[QuickNetConnection]: (...any) -> (...any)},
|
|
51
|
+
OnceCallbacks: {[QuickNetConnection]: (...any) -> ()},
|
|
52
|
+
NumOnceCallbacks: number,
|
|
53
|
+
WaitThreads: {thread},
|
|
54
|
+
Object: NetworkEvent<A...> | NetworkFunction<A..., B...>,
|
|
55
|
+
ResponseTimeout: number,
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export type SchemaArg = {any} | number
|
|
59
|
+
|
|
60
|
+
export type Queue = {
|
|
61
|
+
QueueSize: number,
|
|
62
|
+
ByteSize: number,
|
|
63
|
+
TempBuffer: buffer,
|
|
64
|
+
Instances: {Instance},
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export type Literal = number | string | boolean | Vector3
|
|
68
|
+
|
|
69
|
+
local module = {}
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
return module
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
return require(script.QuickNet)
|
|
@@ -0,0 +1,433 @@
|
|
|
1
|
+
-- -----------------------------------------------------------------------------
|
|
2
|
+
-- Batched Yield-Safe Signal Implementation --
|
|
3
|
+
-- This is a Signal class which has effectively identical behavior to a --
|
|
4
|
+
-- normal RBXScriptSignal, with the only difference being a couple extra --
|
|
5
|
+
-- stack frames at the bottom of the stack trace when an error is thrown. --
|
|
6
|
+
-- This implementation caches runner coroutines, so the ability to yield in --
|
|
7
|
+
-- the signal handlers comes at minimal extra cost over a naive signal --
|
|
8
|
+
-- implementation that either always or never spawns a thread. --
|
|
9
|
+
-- --
|
|
10
|
+
-- License: --
|
|
11
|
+
-- Licensed under the MIT license. --
|
|
12
|
+
-- --
|
|
13
|
+
-- Authors: --
|
|
14
|
+
-- stravant - July 31st, 2021 - Created the file. --
|
|
15
|
+
-- sleitnick - August 3rd, 2021 - Modified for Knit. --
|
|
16
|
+
-- -----------------------------------------------------------------------------
|
|
17
|
+
|
|
18
|
+
-- Signal types
|
|
19
|
+
export type Connection = {
|
|
20
|
+
Disconnect: (self: Connection) -> (),
|
|
21
|
+
Destroy: (self: Connection) -> (),
|
|
22
|
+
Connected: boolean,
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export type Signal<T...> = {
|
|
26
|
+
Fire: (self: Signal<T...>, T...) -> (),
|
|
27
|
+
FireDeferred: (self: Signal<T...>, T...) -> (),
|
|
28
|
+
Connect: (self: Signal<T...>, fn: (T...) -> ()) -> Connection,
|
|
29
|
+
Once: (self: Signal<T...>, fn: (T...) -> ()) -> Connection,
|
|
30
|
+
DisconnectAll: (self: Signal<T...>) -> (),
|
|
31
|
+
GetConnections: (self: Signal<T...>) -> { Connection },
|
|
32
|
+
Destroy: (self: Signal<T...>) -> (),
|
|
33
|
+
Wait: (self: Signal<T...>) -> T...,
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
-- The currently idle thread to run the next handler on
|
|
37
|
+
local freeRunnerThread = nil
|
|
38
|
+
|
|
39
|
+
-- Function which acquires the currently idle handler runner thread, runs the
|
|
40
|
+
-- function fn on it, and then releases the thread, returning it to being the
|
|
41
|
+
-- currently idle one.
|
|
42
|
+
-- If there was a currently idle runner thread already, that's okay, that old
|
|
43
|
+
-- one will just get thrown and eventually GCed.
|
|
44
|
+
local function acquireRunnerThreadAndCallEventHandler(fn, ...)
|
|
45
|
+
local acquiredRunnerThread = freeRunnerThread
|
|
46
|
+
freeRunnerThread = nil
|
|
47
|
+
fn(...)
|
|
48
|
+
-- The handler finished running, this runner thread is free again.
|
|
49
|
+
freeRunnerThread = acquiredRunnerThread
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
-- Coroutine runner that we create coroutines of. The coroutine can be
|
|
53
|
+
-- repeatedly resumed with functions to run followed by the argument to run
|
|
54
|
+
-- them with.
|
|
55
|
+
local function runEventHandlerInFreeThread(...)
|
|
56
|
+
acquireRunnerThreadAndCallEventHandler(...)
|
|
57
|
+
while true do
|
|
58
|
+
acquireRunnerThreadAndCallEventHandler(coroutine.yield())
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
--[=[
|
|
63
|
+
@within Signal
|
|
64
|
+
@interface SignalConnection
|
|
65
|
+
.Connected boolean
|
|
66
|
+
.Disconnect (SignalConnection) -> ()
|
|
67
|
+
|
|
68
|
+
Represents a connection to a signal.
|
|
69
|
+
```lua
|
|
70
|
+
local connection = signal:Connect(function() end)
|
|
71
|
+
print(connection.Connected) --> true
|
|
72
|
+
connection:Disconnect()
|
|
73
|
+
print(connection.Connected) --> false
|
|
74
|
+
```
|
|
75
|
+
]=]
|
|
76
|
+
|
|
77
|
+
-- Connection class
|
|
78
|
+
local Connection = {}
|
|
79
|
+
Connection.__index = Connection
|
|
80
|
+
|
|
81
|
+
function Connection:Disconnect()
|
|
82
|
+
if not self.Connected then
|
|
83
|
+
return
|
|
84
|
+
end
|
|
85
|
+
self.Connected = false
|
|
86
|
+
|
|
87
|
+
-- Unhook the node, but DON'T clear it. That way any fire calls that are
|
|
88
|
+
-- currently sitting on this node will be able to iterate forwards off of
|
|
89
|
+
-- it, but any subsequent fire calls will not hit it, and it will be GCed
|
|
90
|
+
-- when no more fire calls are sitting on it.
|
|
91
|
+
if self._signal._handlerListHead == self then
|
|
92
|
+
self._signal._handlerListHead = self._next
|
|
93
|
+
else
|
|
94
|
+
local prev = self._signal._handlerListHead
|
|
95
|
+
while prev and prev._next ~= self do
|
|
96
|
+
prev = prev._next
|
|
97
|
+
end
|
|
98
|
+
if prev then
|
|
99
|
+
prev._next = self._next
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
Connection.Destroy = Connection.Disconnect
|
|
105
|
+
|
|
106
|
+
-- Make Connection strict
|
|
107
|
+
setmetatable(Connection, {
|
|
108
|
+
__index = function(_tb, key)
|
|
109
|
+
error(("Attempt to get Connection::%s (not a valid member)"):format(tostring(key)), 2)
|
|
110
|
+
end,
|
|
111
|
+
__newindex = function(_tb, key, _value)
|
|
112
|
+
error(("Attempt to set Connection::%s (not a valid member)"):format(tostring(key)), 2)
|
|
113
|
+
end,
|
|
114
|
+
})
|
|
115
|
+
|
|
116
|
+
--[=[
|
|
117
|
+
@within Signal
|
|
118
|
+
@type ConnectionFn (...any) -> ()
|
|
119
|
+
|
|
120
|
+
A function connected to a signal.
|
|
121
|
+
]=]
|
|
122
|
+
|
|
123
|
+
--[=[
|
|
124
|
+
@class Signal
|
|
125
|
+
@ignore
|
|
126
|
+
|
|
127
|
+
A Signal is a data structure that allows events to be dispatched
|
|
128
|
+
and observed.
|
|
129
|
+
|
|
130
|
+
This implementation is a direct copy of the de facto standard, [GoodSignal](https://devforum.roblox.com/t/lua-signal-class-comparison-optimal-goodsignal-class/1387063),
|
|
131
|
+
with some added methods and typings.
|
|
132
|
+
|
|
133
|
+
For example:
|
|
134
|
+
```lua
|
|
135
|
+
local signal = Signal.new()
|
|
136
|
+
|
|
137
|
+
-- Subscribe to a signal:
|
|
138
|
+
signal:Connect(function(msg)
|
|
139
|
+
print("Got message:", msg)
|
|
140
|
+
end)
|
|
141
|
+
|
|
142
|
+
-- Dispatch an event:
|
|
143
|
+
signal:Fire("Hello world!")
|
|
144
|
+
```
|
|
145
|
+
]=]
|
|
146
|
+
local Signal = {}
|
|
147
|
+
Signal.__index = Signal
|
|
148
|
+
|
|
149
|
+
--[=[
|
|
150
|
+
Constructs a new Signal
|
|
151
|
+
|
|
152
|
+
@return Signal
|
|
153
|
+
]=]
|
|
154
|
+
function Signal.new<T...>(): Signal<T...>
|
|
155
|
+
local self = setmetatable({
|
|
156
|
+
_handlerListHead = false,
|
|
157
|
+
_proxyHandler = nil,
|
|
158
|
+
_yieldedThreads = nil,
|
|
159
|
+
}, Signal)
|
|
160
|
+
|
|
161
|
+
return self
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
--[=[
|
|
165
|
+
Constructs a new Signal that wraps around an RBXScriptSignal.
|
|
166
|
+
|
|
167
|
+
@param rbxScriptSignal RBXScriptSignal -- Existing RBXScriptSignal to wrap
|
|
168
|
+
@return Signal
|
|
169
|
+
|
|
170
|
+
For example:
|
|
171
|
+
```lua
|
|
172
|
+
local signal = Signal.Wrap(workspace.ChildAdded)
|
|
173
|
+
signal:Connect(function(part) print(part.Name .. " added") end)
|
|
174
|
+
Instance.new("Part").Parent = workspace
|
|
175
|
+
```
|
|
176
|
+
]=]
|
|
177
|
+
function Signal.Wrap<T...>(rbxScriptSignal: RBXScriptSignal): Signal<T...>
|
|
178
|
+
assert(
|
|
179
|
+
typeof(rbxScriptSignal) == "RBXScriptSignal",
|
|
180
|
+
"Argument #1 to Signal.Wrap must be a RBXScriptSignal; got " .. typeof(rbxScriptSignal)
|
|
181
|
+
)
|
|
182
|
+
|
|
183
|
+
local signal = Signal.new()
|
|
184
|
+
signal._proxyHandler = rbxScriptSignal:Connect(function(...)
|
|
185
|
+
signal:Fire(...)
|
|
186
|
+
end)
|
|
187
|
+
|
|
188
|
+
return signal
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
--[=[
|
|
192
|
+
Checks if the given object is a Signal.
|
|
193
|
+
|
|
194
|
+
@param obj any -- Object to check
|
|
195
|
+
@return boolean -- `true` if the object is a Signal.
|
|
196
|
+
]=]
|
|
197
|
+
function Signal.Is(obj: any): boolean
|
|
198
|
+
return type(obj) == "table" and getmetatable(obj) == Signal
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
--[=[
|
|
202
|
+
@param fn ConnectionFn
|
|
203
|
+
@return SignalConnection
|
|
204
|
+
|
|
205
|
+
Connects a function to the signal, which will be called anytime the signal is fired.
|
|
206
|
+
```lua
|
|
207
|
+
signal:Connect(function(msg, num)
|
|
208
|
+
print(msg, num)
|
|
209
|
+
end)
|
|
210
|
+
|
|
211
|
+
signal:Fire("Hello", 25)
|
|
212
|
+
```
|
|
213
|
+
]=]
|
|
214
|
+
function Signal:Connect(fn)
|
|
215
|
+
local connection = setmetatable({
|
|
216
|
+
Connected = true,
|
|
217
|
+
_signal = self,
|
|
218
|
+
_fn = fn,
|
|
219
|
+
_next = false,
|
|
220
|
+
}, Connection)
|
|
221
|
+
|
|
222
|
+
if self._handlerListHead then
|
|
223
|
+
connection._next = self._handlerListHead
|
|
224
|
+
self._handlerListHead = connection
|
|
225
|
+
else
|
|
226
|
+
self._handlerListHead = connection
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
return connection
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
--[=[
|
|
233
|
+
@deprecated v1.3.0 -- Use `Signal:Once` instead.
|
|
234
|
+
@param fn ConnectionFn
|
|
235
|
+
@return SignalConnection
|
|
236
|
+
]=]
|
|
237
|
+
function Signal:ConnectOnce(fn)
|
|
238
|
+
return self:Once(fn)
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
--[=[
|
|
242
|
+
@param fn ConnectionFn
|
|
243
|
+
@return SignalConnection
|
|
244
|
+
|
|
245
|
+
Connects a function to the signal, which will be called the next time the signal fires. Once
|
|
246
|
+
the connection is triggered, it will disconnect itself.
|
|
247
|
+
```lua
|
|
248
|
+
signal:Once(function(msg, num)
|
|
249
|
+
print(msg, num)
|
|
250
|
+
end)
|
|
251
|
+
|
|
252
|
+
signal:Fire("Hello", 25)
|
|
253
|
+
signal:Fire("This message will not go through", 10)
|
|
254
|
+
```
|
|
255
|
+
]=]
|
|
256
|
+
function Signal:Once(fn)
|
|
257
|
+
local connection
|
|
258
|
+
local done = false
|
|
259
|
+
|
|
260
|
+
connection = self:Connect(function(...)
|
|
261
|
+
if done then
|
|
262
|
+
return
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
done = true
|
|
266
|
+
connection:Disconnect()
|
|
267
|
+
fn(...)
|
|
268
|
+
end)
|
|
269
|
+
|
|
270
|
+
return connection
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
function Signal:GetConnections()
|
|
274
|
+
local items = {}
|
|
275
|
+
|
|
276
|
+
local item = self._handlerListHead
|
|
277
|
+
while item do
|
|
278
|
+
table.insert(items, item)
|
|
279
|
+
item = item._next
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
return items
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
-- Disconnect all handlers. Since we use a linked list it suffices to clear the
|
|
286
|
+
-- reference to the head handler.
|
|
287
|
+
--[=[
|
|
288
|
+
Disconnects all connections from the signal.
|
|
289
|
+
```lua
|
|
290
|
+
signal:DisconnectAll()
|
|
291
|
+
```
|
|
292
|
+
]=]
|
|
293
|
+
function Signal:DisconnectAll()
|
|
294
|
+
local item = self._handlerListHead
|
|
295
|
+
while item do
|
|
296
|
+
item.Connected = false
|
|
297
|
+
item = item._next
|
|
298
|
+
end
|
|
299
|
+
self._handlerListHead = false
|
|
300
|
+
|
|
301
|
+
local yieldedThreads = rawget(self, "_yieldedThreads")
|
|
302
|
+
if yieldedThreads then
|
|
303
|
+
for thread in yieldedThreads do
|
|
304
|
+
if coroutine.status(thread) == "suspended" then
|
|
305
|
+
warn(debug.traceback(thread, "signal disconnected; yielded thread cancelled", 2))
|
|
306
|
+
task.cancel(thread)
|
|
307
|
+
end
|
|
308
|
+
end
|
|
309
|
+
table.clear(self._yieldedThreads)
|
|
310
|
+
end
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
-- Signal:Fire(...) implemented by running the handler functions on the
|
|
314
|
+
-- coRunnerThread, and any time the resulting thread yielded without returning
|
|
315
|
+
-- to us, that means that it yielded to the Roblox scheduler and has been taken
|
|
316
|
+
-- over by Roblox scheduling, meaning we have to make a new coroutine runner.
|
|
317
|
+
--[=[
|
|
318
|
+
@param ... any
|
|
319
|
+
|
|
320
|
+
Fire the signal, which will call all of the connected functions with the given arguments.
|
|
321
|
+
```lua
|
|
322
|
+
signal:Fire("Hello")
|
|
323
|
+
|
|
324
|
+
-- Any number of arguments can be fired:
|
|
325
|
+
signal:Fire("Hello", 32, {Test = "Test"}, true)
|
|
326
|
+
```
|
|
327
|
+
]=]
|
|
328
|
+
function Signal:Fire(...)
|
|
329
|
+
local item = self._handlerListHead
|
|
330
|
+
while item do
|
|
331
|
+
if item.Connected then
|
|
332
|
+
if not freeRunnerThread then
|
|
333
|
+
freeRunnerThread = coroutine.create(runEventHandlerInFreeThread)
|
|
334
|
+
end
|
|
335
|
+
task.spawn(freeRunnerThread, item._fn, ...)
|
|
336
|
+
end
|
|
337
|
+
item = item._next
|
|
338
|
+
end
|
|
339
|
+
end
|
|
340
|
+
|
|
341
|
+
--[=[
|
|
342
|
+
@param ... any
|
|
343
|
+
|
|
344
|
+
Same as `Fire`, but uses `task.defer` internally & doesn't take advantage of thread reuse.
|
|
345
|
+
```lua
|
|
346
|
+
signal:FireDeferred("Hello")
|
|
347
|
+
```
|
|
348
|
+
]=]
|
|
349
|
+
function Signal:FireDeferred(...)
|
|
350
|
+
local item = self._handlerListHead
|
|
351
|
+
while item do
|
|
352
|
+
local conn = item
|
|
353
|
+
task.defer(function(...)
|
|
354
|
+
if conn.Connected then
|
|
355
|
+
conn._fn(...)
|
|
356
|
+
end
|
|
357
|
+
end, ...)
|
|
358
|
+
item = item._next
|
|
359
|
+
end
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
--[=[
|
|
363
|
+
@return ... any
|
|
364
|
+
@yields
|
|
365
|
+
|
|
366
|
+
Yields the current thread until the signal is fired, and returns the arguments fired from the signal.
|
|
367
|
+
Yielding the current thread is not always desirable. If the desire is to only capture the next event
|
|
368
|
+
fired, using `Once` might be a better solution.
|
|
369
|
+
```lua
|
|
370
|
+
task.spawn(function()
|
|
371
|
+
local msg, num = signal:Wait()
|
|
372
|
+
print(msg, num) --> "Hello", 32
|
|
373
|
+
end)
|
|
374
|
+
signal:Fire("Hello", 32)
|
|
375
|
+
```
|
|
376
|
+
]=]
|
|
377
|
+
function Signal:Wait()
|
|
378
|
+
local yieldedThreads = rawget(self, "_yieldedThreads")
|
|
379
|
+
if not yieldedThreads then
|
|
380
|
+
yieldedThreads = {}
|
|
381
|
+
rawset(self, "_yieldedThreads", yieldedThreads)
|
|
382
|
+
end
|
|
383
|
+
|
|
384
|
+
local thread = coroutine.running()
|
|
385
|
+
yieldedThreads[thread] = true
|
|
386
|
+
|
|
387
|
+
self:Once(function(...)
|
|
388
|
+
yieldedThreads[thread] = nil
|
|
389
|
+
|
|
390
|
+
if coroutine.status(thread) == "suspended" then
|
|
391
|
+
task.spawn(thread, ...)
|
|
392
|
+
end
|
|
393
|
+
end)
|
|
394
|
+
|
|
395
|
+
return coroutine.yield()
|
|
396
|
+
end
|
|
397
|
+
|
|
398
|
+
--[=[
|
|
399
|
+
Cleans up the signal.
|
|
400
|
+
|
|
401
|
+
Technically, this is only necessary if the signal is created using
|
|
402
|
+
`Signal.Wrap`. Connections should be properly GC'd once the signal
|
|
403
|
+
is no longer referenced anywhere. However, it is still good practice
|
|
404
|
+
to include ways to strictly clean up resources. Calling `Destroy`
|
|
405
|
+
on a signal will also disconnect all connections immediately.
|
|
406
|
+
```lua
|
|
407
|
+
signal:Destroy()
|
|
408
|
+
```
|
|
409
|
+
]=]
|
|
410
|
+
function Signal:Destroy()
|
|
411
|
+
self:DisconnectAll()
|
|
412
|
+
|
|
413
|
+
local proxyHandler = rawget(self, "_proxyHandler")
|
|
414
|
+
if proxyHandler then
|
|
415
|
+
proxyHandler:Disconnect()
|
|
416
|
+
end
|
|
417
|
+
end
|
|
418
|
+
|
|
419
|
+
-- Make signal strict
|
|
420
|
+
setmetatable(Signal, {
|
|
421
|
+
__index = function(_tb, key)
|
|
422
|
+
error(("Attempt to get Signal::%s (not a valid member)"):format(tostring(key)), 2)
|
|
423
|
+
end,
|
|
424
|
+
__newindex = function(_tb, key, _value)
|
|
425
|
+
error(("Attempt to set Signal::%s (not a valid member)"):format(tostring(key)), 2)
|
|
426
|
+
end,
|
|
427
|
+
})
|
|
428
|
+
|
|
429
|
+
return table.freeze({
|
|
430
|
+
new = Signal.new,
|
|
431
|
+
Wrap = Signal.Wrap,
|
|
432
|
+
Is = Signal.Is,
|
|
433
|
+
})
|