repo
stringclasses
341 values
file_path
stringlengths
29
173
language
stringclasses
2 values
file_type
stringclasses
4 values
code
stringlengths
2
1.66M
tokens
int64
2
598k
YetAnotherClown/luau-futures
YetAnotherClown-luau-futures-e6e8cf8/src/__tests__/inspectError.test.luau
luau
.luau
local JestGlobals = require("@DevPackages/JestGlobals") local test = JestGlobals.test local expect = JestGlobals.expect local Futures = require("../init") local Future = Futures.Future test("inspectErr", function() local myFuture = Future.new(function() error("A", 0) end) myFuture:inspectErr(function(...) ex...
116
YetAnotherClown/luau-futures
YetAnotherClown-luau-futures-e6e8cf8/src/__tests__/inspectOk.test.luau
luau
.luau
local JestGlobals = require("@DevPackages/JestGlobals") local test = JestGlobals.test local expect = JestGlobals.expect local Futures = require("../init") local Future = Futures.Future test("inspectOk", function() expect.assertions(3) local myFuture = Future.new(function() return "a", "b", "c" end) myFuture:...
142
YetAnotherClown/luau-futures
YetAnotherClown-luau-futures-e6e8cf8/src/__tests__/join.test.luau
luau
.luau
local JestGlobals = require("@DevPackages/JestGlobals") local describe = JestGlobals.describe local test = JestGlobals.test local expect = JestGlobals.expect local Futures = require("../init") local Future = Futures.Future describe("join", function() test("ok", function() local myFuture = Future.new(function() ...
271
YetAnotherClown/luau-futures
YetAnotherClown-luau-futures-e6e8cf8/src/__tests__/joinAll.test.luau
luau
.luau
local JestGlobals = require("@DevPackages/JestGlobals") local test = JestGlobals.test local expect = JestGlobals.expect local Futures = require("../init") local Future = Futures.Future test("joinAll", function() local myFuture = Future.new(function() return "a", "b", "c" end) local nextFuture = myFuture:joinAl...
221
YetAnotherClown/luau-futures
YetAnotherClown-luau-futures-e6e8cf8/src/__tests__/mapError.test.luau
luau
.luau
local JestGlobals = require("@DevPackages/JestGlobals") local describe = JestGlobals.describe local test = JestGlobals.test local expect = JestGlobals.expect local Futures = require("../init") local Future = Futures.Future describe("mapErr", function() test("to error", function() local myFuture = Future.new(funct...
257
YetAnotherClown/luau-futures
YetAnotherClown-luau-futures-e6e8cf8/src/__tests__/mapOk.test.luau
luau
.luau
local JestGlobals = require("@DevPackages/JestGlobals") local test = JestGlobals.test local expect = JestGlobals.expect local Futures = require("../init") local Future = Futures.Future test("mapOk", function() local myFuture = Future.new(function() return "a", "b", "c" end) myFuture:mapOk(function(a, b, c) r...
152
YetAnotherClown/luau-futures
YetAnotherClown-luau-futures-e6e8cf8/src/__tests__/orElse.test.luau
luau
.luau
local JestGlobals = require("@DevPackages/JestGlobals") local test = JestGlobals.test local expect = JestGlobals.expect local Futures = require("../init") local Future = Futures.Future test("orElse", function() local myFuture = Future.new(function() error("A", 0) end) myFuture = myFuture:orElse(function(err) ...
151
YetAnotherClown/luau-futures
YetAnotherClown-luau-futures-e6e8cf8/src/__tests__/ordering.test.luau
luau
.luau
local JestGlobals = require("@DevPackages/JestGlobals") local test = JestGlobals.test local expect = JestGlobals.expect local describe = JestGlobals.describe local Futures = require("../init") local Future = Futures.Future describe("ordering", function() test("chaining", function() expect.assertions(7) local c...
465
YetAnotherClown/luau-futures
YetAnotherClown-luau-futures-e6e8cf8/src/__tests__/poll.test.luau
luau
.luau
local JestGlobals = require("@DevPackages/JestGlobals") local describe = JestGlobals.describe local test = JestGlobals.test local expect = JestGlobals.expect local Futures = require("../init") local Future = Futures.Future describe("poll", function() test("immediate", function() local myFuture = Future.new(functi...
286
YetAnotherClown/luau-futures
YetAnotherClown-luau-futures-e6e8cf8/src/__tests__/unwrapOrElse.test.luau
luau
.luau
local JestGlobals = require("@DevPackages/JestGlobals") local test = JestGlobals.test local expect = JestGlobals.expect local Futures = require("../init") local Future = Futures.Future test("unwrapOrElse", function() local myFuture = Future.new(function() error("A", 0) end) myFuture = myFuture:unwrapOrElse(fun...
144
YetAnotherClown/luau-futures
YetAnotherClown-luau-futures-e6e8cf8/src/init.luau
luau
.luau
local Poll = require("@self/Poll") export type Poll<E, U...> = Poll.Poll<E, U...> local Result = require("@self/Result") export type Result<E, U...> = Result.Result<E, U...> local Future = require("@self/Future") :: any -- FUTURE: FutureLike<E, U...> = Future<E, U...> for backwards compatibility -- This type should ...
2,168
YetAnotherClown/luau-futures
YetAnotherClown-luau-futures-e6e8cf8/src/jest.config.luau
luau
.luau
return { testMatch = { "**/__tests__/*.(spec|test)", }, testPathIgnorePatterns = { "Packages", "DevPackages", }, }
41
YetAnotherClown/luau-futures
YetAnotherClown-luau-futures-e6e8cf8/src/utils.luau
luau
.luau
-- https://stackoverflow.com/questions/7526223/how-do-i-know-if-a-table-is-an-array/52697380#52697380 local function isArray(t) if type(t) ~= "table" then return false end if #t > 0 then return true end for _, _ in pairs(t) do return false end return true end local function printArray(arr, indentation:...
673
bookek/satset
bookek-satset-4c30f8a/benchmarks/src/server/init.server.luau
luau
.luau
-- Benchmark server. Receives data from all modes and validates correctness. local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local RunService = game:GetService("RunService") local BenchmarkConfig = require(ReplicatedStorage.Shared.BenchmarkConfig) local Payload...
1,757
bookek/satset
bookek-satset-4c30f8a/benchmarks/src/shared/BenchmarkConfig.luau
luau
.luau
-- Satset benchmark control. This is not a public Satset mode. local activeMode = "default" -- Two-client correctness check for Satset Groups. This skips the benchmark matrix local groupSmokeTest = false -- Use "static" for best-case compression, "moving" for game-like state local payloadVariant = "static" local events...
323
bookek/satset
bookek-satset-4c30f8a/benchmarks/src/shared/GroupSmoke.luau
luau
.luau
local ReplicatedStorage = game:GetService("ReplicatedStorage") local Satset = require(ReplicatedStorage.references.Satset) return Satset.definePacket({ name = "GroupSmoke", schema = { stage = Satset.Types.u8, }, })
55
bookek/satset
bookek-satset-4c30f8a/benchmarks/src/shared/PayloadVariants.luau
luau
.luau
-- Payload variants: static (identical) and moving (per-frame + per-slot). local PayloadVariants = {} export type Variant = "static" | "moving" local VALID_VARIANTS = { static = true, moving = true, } local function byteOne(value: number): number return (value % 255) + 1 end local function makeVector(base: Vect...
920
bookek/satset
bookek-satset-4c30f8a/benchmarks/src/shared/benches/Booleans.luau
luau
.luau
-- 1000 boolean values. Tests minimal-payload throughput and packing efficiency. local Array = {} for _ = 1, 1000 do table.insert(Array, math.random() > 0.5) end return Array
49
bookek/satset
bookek-satset-4c30f8a/benchmarks/src/shared/benches/Entities.luau
luau
.luau
-- 100 entities, each with 6 u8 fields. Simulates a typical NPC/player sync payload. local Array = {} for _ = 1, 100 do table.insert(Array, { id = math.random(1, 255), x = math.random(1, 255), y = math.random(1, 255), z = math.random(1, 255), orientation = math.random(1, 255), animation = math.random(1, 25...
115
bookek/satset
bookek-satset-4c30f8a/benchmarks/src/shared/benches/Mixed.luau
luau
.luau
-- Realistic game packet: player state update with mixed types. -- Simulates what a typical game sends per player per frame. return { id = math.random(1, 255), health = math.random(0, 100), position = Vector3.new(math.random() * 2048 - 1024, math.random() * 512, math.random() * 2048 - 1024), velocity = Vector3.new(...
172
bookek/satset
bookek-satset-4c30f8a/benchmarks/src/shared/benches/SingleValue.luau
luau
.luau
-- Single u8 value. Tests per-call overhead with minimal payload. return math.random(1, 255)
23
bookek/satset
bookek-satset-4c30f8a/benchmarks/src/shared/benches/Strings.luau
luau
.luau
-- 100 short strings (8-32 chars). Tests variable-length serialization. local CHARS = "abcdefghijklmnopqrstuvwxyz0123456789" local Array = {} for _ = 1, 100 do local len = math.random(8, 32) local chars = table.create(len) for j = 1, len do local idx = math.random(1, #CHARS) chars[j] = string.sub(CHARS, idx, idx...
112
bookek/satset
bookek-satset-4c30f8a/benchmarks/src/shared/benches/Vectors.luau
luau
.luau
-- 100 Vector3 positions. Tests float serialization throughput. local Array = {} for _ = 1, 100 do table.insert(Array, Vector3.new(math.random() * 2048 - 1024, math.random() * 512, math.random() * 2048 - 1024)) end return Array
69
bookek/satset
bookek-satset-4c30f8a/benchmarks/src/shared/benches/init.luau
luau
.luau
-- This file is part of the Satset networking library and is licensed under MIT License; see LICENSE.txt for details -- Benchmark bench loader. Resets random seed for deterministic data across server/client. local Benches = {} for _, Bench in script:GetChildren() do math.randomseed(0) Benches[Bench.Name] = require(B...
79
bookek/satset
bookek-satset-4c30f8a/benchmarks/src/shared/modes/blink.luau
luau
.luau
local RunService = game:GetService("RunService") local Benches = require(game:GetService("ReplicatedStorage").Shared.benches) local IsServer = RunService:IsServer() local Events = {} local BlinkAPI if IsServer then BlinkAPI = require(script.Parent.blink_gen.server) else BlinkAPI = require(script.Parent.blink_gen.c...
202
bookek/satset
bookek-satset-4c30f8a/benchmarks/src/shared/modes/bridgenet2.luau
luau
.luau
-- BridgeNet2 benchmark mode (v1.0.0 API). -- BridgeNet2 uses ReferenceBridge with string identifiers. local BridgeNet2 = require(game:GetService("ReplicatedStorage").DevPackages.BridgeNet2) local Benches = require(game:GetService("ReplicatedStorage").Shared.benches) local Events = {} for Name in Benches do Events[...
100
bookek/satset
bookek-satset-4c30f8a/benchmarks/src/shared/modes/init.luau
luau
.luau
-- Mode loader. Each mode wraps a networking library with a common interface. -- Disabled modes are skipped (set to true to disable). local BenchmarkConfig = require(script.Parent.BenchmarkConfig) local DISABLED_MODES = {} local function isSelected(name: string): boolean local selectedTools = BenchmarkConfig.selecte...
150
bookek/satset
bookek-satset-4c30f8a/benchmarks/src/shared/modes/netray_compile.luau
luau
.luau
local RunService = game:GetService("RunService") local Benches = require(game:GetService("ReplicatedStorage").Shared.benches) local IsServer = RunService:IsServer() local Events = {} local NetRayAPI if IsServer then NetRayAPI = require(script.Parent.netray_compile_gen.Server) else NetRayAPI = require(script.Parent...
212
bookek/satset
bookek-satset-4c30f8a/benchmarks/src/shared/modes/netray_compile_gen/Client.luau
luau
.luau
--!strict --!native --!optimize 2 --!nolint LocalShadow --#selene: allow(shadowing) -- Name: Client -- Purpose: Generated runtime for client networking -- Generated-by: NetRay-Compiler -- Version: 0.1.1 local Types = require(script.Parent.Types) type u8 = typeof(Types.u8) type i8 = typeof(Types.i8) type u16 = typeof(T...
11,583
bookek/satset
bookek-satset-4c30f8a/benchmarks/src/shared/modes/netray_compile_gen/Server.luau
luau
.luau
--!strict --!native --!optimize 2 --!nolint LocalShadow --#selene: allow(shadowing) -- Name: Server -- Purpose: Generated runtime for server networking -- Generated-by: NetRay-Compiler -- Version: 0.1.1 local Types = require(script.Parent.Types) type u8 = typeof(Types.u8) type i8 = typeof(Types.i8) type u16 = typeof(T...
8,929
bookek/satset
bookek-satset-4c30f8a/benchmarks/src/shared/modes/netray_compile_gen/Types.luau
luau
.luau
--!strict --!native --!optimize 2 -- Name: Types -- Purpose: Generated Luau types for NetRay schema -- Generated-by: NetRay-Compiler export type TypeBranding = "Off" | "On" export type ActiveTypeBranding = "Off" export type Brand<T, B> = T & { __brand: B } export type u8 = number export type i8 = number export type u1...
2,537
bookek/satset
bookek-satset-4c30f8a/benchmarks/src/shared/modes/packet.luau
luau
.luau
-- Suphi Packet benchmark mode. -- Wraps each Packet object so `fire` is a self-bound closure, -- matching the benchmark harness convention (event.fire or event.Fire). local Packet = require(game:GetService("ReplicatedStorage").references.SuphiPacket) local function wrap(pkt) return { fire = function(data) pkt:F...
313
bookek/satset
bookek-satset-4c30f8a/benchmarks/src/shared/modes/quicknet.luau
luau
.luau
-- QuickNet benchmark mode. local BenchmarkConfig = require(script.Parent.Parent.BenchmarkConfig) local QuickNet = require(game:GetService("ReplicatedStorage").references.QuickNet) local Data = QuickNet.Data local BENCHMARK_RATE_LIMIT = 1_000_000 local debugStats = { clientEvents = 0, clientEventBytes = 0, } local ...
779
bookek/satset
bookek-satset-4c30f8a/benchmarks/src/shared/modes/quicknet/EnumsToNativeTypes.luau
luau
.luau
local Enums = require(script.Parent.Enums) return { [Enums.NumberU4] = "number", [Enums.NumberU8] = "number", [Enums.NumberU16] = "number", [Enums.NumberU32] = "number", [Enums.NumberI8] = "number", [Enums.NumberI16] = "number", [Enums.NumberI32] = "number", [Enums.NumberF16] = "number", [Enums.NumberF32] = "...
568
bookek/satset
bookek-satset-4c30f8a/benchmarks/src/shared/modes/roblox.luau
luau
.luau
-- Native Roblox baseline. One RemoteEvent per bench, no serialization. local ReplicatedStorage = game:GetService("ReplicatedStorage") local RunService = game:GetService("RunService") local Benches = require(ReplicatedStorage.Shared.benches) local Events = {} local IsServer = RunService:IsServer() for Name in Benche...
150
bookek/satset
bookek-satset-4c30f8a/benchmarks/src/shared/modes/satset.luau
luau
.luau
-- Satset benchmark mode. local RunService = game:GetService("RunService") local Satset = require(game:GetService("ReplicatedStorage").references.Satset) local SatsetBatcher = require(game:GetService("ReplicatedStorage").references.Satset.Core.Batcher) local Types = Satset.Types -- We don't call Satset.start() here an...
843
bookek/satset
bookek-satset-4c30f8a/benchmarks/src/shared/modes/warp/Booleans.luau
luau
.luau
local Buffer = require(script.Parent.lib).Buffer.Schema return Buffer.array(Buffer.boolean)
17
bookek/satset
bookek-satset-4c30f8a/benchmarks/src/shared/modes/warp/Entities.luau
luau
.luau
local Buffer = require(script.Parent.lib).Buffer.Schema return Buffer.array(Buffer.struct({ id = Buffer.u8, x = Buffer.u8, y = Buffer.u8, z = Buffer.u8, orientation = Buffer.u8, animation = Buffer.u8, }))
55
bookek/satset
bookek-satset-4c30f8a/benchmarks/src/shared/modes/warp/Mixed.luau
luau
.luau
local Buffer = require(script.Parent.lib).Buffer.Schema return Buffer.struct({ id = Buffer.u8, health = Buffer.u8, position = Buffer.vector3, velocity = Buffer.vector3, name = Buffer.string, isRunning = Buffer.boolean, animation = Buffer.u8, team = Buffer.u8, })
66
bookek/satset
bookek-satset-4c30f8a/benchmarks/src/shared/modes/warp/SingleValue.luau
luau
.luau
local Buffer = require(script.Parent.lib).Buffer.Schema return Buffer.u8
16
bookek/satset
bookek-satset-4c30f8a/benchmarks/src/shared/modes/warp/Strings.luau
luau
.luau
local Buffer = require(script.Parent.lib).Buffer.Schema return Buffer.array(Buffer.string)
17
bookek/satset
bookek-satset-4c30f8a/benchmarks/src/shared/modes/warp/Vectors.luau
luau
.luau
local Buffer = require(script.Parent.lib).Buffer.Schema return Buffer.array(Buffer.vector3)
18
bookek/satset
bookek-satset-4c30f8a/benchmarks/src/shared/modes/warp/init.luau
luau
.luau
-- Warp benchmark mode (v1.0.14 API). -- Warp uses string identifiers and separate Server/Client constructors that return event objects. local ReplicatedStorage = game:GetService("ReplicatedStorage") local RunService = game:GetService("RunService") local Benches = require(ReplicatedStorage.Shared.benches) local Warp =...
351
bookek/satset
bookek-satset-4c30f8a/benchmarks/src/shared/modes/warp/lib/Client/init.luau
luau
.luau
--!optimize 2 --!strict --@EternityDev local Client = {} local Buffer = require(script.Parent.Util.Buffer) local Replication = require(script.Parent.Replication) local Thread = require(script.Parent.Util.Thread) local Xor = require(script.Parent.Util.Xor) local RunService = game:GetService("RunService") local Event: ...
1,909
bookek/satset
bookek-satset-4c30f8a/benchmarks/src/shared/modes/warp/lib/Replication/init.luau
luau
.luau
--!optimize 2 --!strict local Replication = {} local RunService = game:GetService("RunService") local _repl: RemoteEvent = script.Parent:WaitForChild("_repl") local Buffer = require(script.Parent.Util.Buffer) local Identifier = require(script.Parent.Util.Identifier) local identifiers_schema = Buffer.Schema.string lo...
959
bookek/satset
bookek-satset-4c30f8a/benchmarks/src/shared/modes/warp/lib/Util/Identifier.luau
luau
.luau
--!optimize 2 --!strict --@EternityDev local BITS: number = 8 local MAX_VALUE: number = bit32.lshift(1, BITS) - 1 local hook_fn: (string, number) -> () if not shared.__warp_identifier_registry then shared.__warp_identifier_registry = { cache = {} :: { [string]: number }, name = {} :: { [number]: string }, count...
357
bookek/satset
bookek-satset-4c30f8a/benchmarks/src/shared/modes/warp/lib/Util/Thread.luau
luau
.luau
--!strict --!optimize 2 --@EternityDev local thread: thread? local function passer<T...>(func: (T...) -> (), ...: T...): () local HoldThread: thread = thread :: thread thread = nil func(...) thread = HoldThread end local function newThread(): () thread = coroutine.running() while true do passer(coroutine.yiel...
133
bookek/satset
bookek-satset-4c30f8a/benchmarks/src/shared/modes/warp/lib/Util/Xor.luau
luau
.luau
--!strict --!native --!optimize 2 local Xor = {} type XorEntry = { buf: buffer, len: number } local serverPrev: { [Player]: XorEntry } = {} local clientPrev: { [Player]: XorEntry } = {} local clientOutPrev: XorEntry? = nil local clientInPrev: XorEntry? = nil -- For benchmarking purpose only local debugStats = { cl...
1,207
bookek/satset
bookek-satset-4c30f8a/benchmarks/src/shared/modes/warp/lib/init.luau
luau
.luau
--!strict --@EternityDev local Remote = {} if game.RunService:IsServer() then if not script:FindFirstChild("_repl") then Instance.new("RemoteEvent", script).Name = "_repl" end if not script:FindFirstChild("Event") then Instance.new("RemoteEvent", script).Name = "Event" end if not script:FindFirstChild("Unreli...
221
bookek/satset
bookek-satset-4c30f8a/benchmarks/src/shared/modes/zap.luau
luau
.luau
local RunService = game:GetService("RunService") local Benches = require(game:GetService("ReplicatedStorage").Shared.benches) local IsServer = RunService:IsServer() local Events = {} local ZapAPI if IsServer then ZapAPI = require(script.Parent.zap_gen.server) else ZapAPI = require(script.Parent.zap_gen.client) end...
181
bookek/satset
bookek-satset-4c30f8a/benchmarks/zstd/booleans.luau
luau
.luau
local fs = require("@lune/fs") local process = require("@lune/process") local FRAMES = 600 local EVENTS = 200 local VALUES = 1000 local PACKED_BYTES = math.ceil(VALUES / 8) local TEMP_INPUT = "/tmp/satset-zstd-booleans.bin" local function writeVarUInt(out: buffer, cursor: number, value: number): number while value >...
1,974
bookek/satset
bookek-satset-4c30f8a/src/Core/Batcher.luau
luau
.luau
--!native --!optimize 2 -- This file is part of the Satset networking library and is licensed under MIT License; see LICENSE.txt for details -- Batcher — handles frame-level batching, dynamic segmentation, and rate-limited flushing. local RunService = game:GetService("RunService") local Bridge = require(script.Parent...
11,096
bookek/satset
bookek-satset-4c30f8a/src/Core/Bridge.luau
luau
.luau
-- This file is part of the Satset networking library and is licensed under MIT License; see LICENSE.txt for details -- Bridge owns Satset's RemoteEvent pair. local Transport = require(script.Parent.Transport) local ReplicatedStorage = game:GetService("ReplicatedStorage") local RunService = game:GetService("RunServic...
1,025
bookek/satset
bookek-satset-4c30f8a/src/Core/Guard.luau
luau
.luau
-- This file is part of the Satset networking library and is licensed under MIT License; see LICENSE.txt for details -- Guard runs Satset's server-side token bucket. local RunService = game:GetService("RunService") local IS_STUDIO = RunService:IsStudio() local DEFAULT_MAX_TOKENS = 1000 local DEFAULT_REFILL_RATE = 500...
643
bookek/satset
bookek-satset-4c30f8a/src/Core/Transport.luau
luau
.luau
-- This file is part of the Satset networking library and is licensed under MIT License; see LICENSE.txt for details export type Connection = { Disconnect: (self: Connection) -> (), } export type Transport = { sendToServer: (self: Transport, reliable: boolean, payload: buffer) -> (), sendToClient: (self: Transport...
272
bookek/satset
bookek-satset-4c30f8a/src/Networking/Group.luau
luau
.luau
-- This file is part of the Satset networking library and is licensed under MIT License; see LICENSE.txt for details local Players = game:GetService("Players") local RunService = game:GetService("RunService") local IS_SERVER = RunService:IsServer() export type Group = { add: (self: Group, player: Player) -> (), re...
560
bookek/satset
bookek-satset-4c30f8a/src/Networking/Packet.luau
luau
.luau
-- This file is part of the Satset networking library and is licensed under MIT License; see LICENSE.txt for details -- Packet — the public API for stateless, fire-and-forget networking. local Batcher = require(script.Parent.Parent.Core.Batcher) local Group = require(script.Parent.Group) local SchemaCompiler = require...
1,819
bookek/satset
bookek-satset-4c30f8a/src/Serialization/Sanitizer.luau
luau
.luau
--!native --!optimize 2 -- This file is part of the Satset networking library and is licensed under MIT License; see LICENSE.txt for details -- Sanitizer holds byte bounds and float poison checks. local Sanitizer = {} function Sanitizer.sanitizeFloat(value: number): number -- NaN check, plus Infinity for physics saf...
147
bookek/satset
bookek-satset-4c30f8a/src/Serialization/SchemaCompiler.luau
luau
.luau
--!optimize 2 -- This file is part of the Satset networking library and is licensed under MIT License; see LICENSE.txt for details -- SchemaCompiler — transforms a schema dictionary into a deterministic ordered structure. local Types = require(script.Parent.Parent.Types) -- [ Types ] export type FieldDef = { name: ...
1,770
bookek/satset
bookek-satset-4c30f8a/src/Serialization/Serializer.luau
luau
.luau
--!native --!optimize 2 -- This file is part of the Satset networking library and is licensed under MIT License; see LICENSE.txt for details -- Serializer moves schema data in and out of buffers. local Sanitizer = require(script.Parent.Sanitizer) local SchemaCompiler = require(script.Parent.SchemaCompiler) local Seri...
928
bookek/satset
bookek-satset-4c30f8a/tests/MockTransport.luau
luau
.luau
type Listener = { callback: (...any) -> (), connected: boolean, } type ListenerSet = { reliable: { Listener }, unreliable: { Listener }, } type ClientState = { listeners: ListenerSet, connected: boolean, } export type Connection = { Disconnect: (self: Connection) -> (), } export type MockNetwork = { server:...
748
bookek/satset
bookek-satset-4c30f8a/tests/transport.luau
luau
.luau
local MockTransport = require("./MockTransport") local Transport = require("../src/Core/Transport") local invalidOk, invalidError = pcall(Transport.assertValid, {}) assert( not invalidOk and string.find(tostring(invalidError), "sendToServer", 1, true) ~= nil, "transport validation accepted an incomplete transport" )...
674
DialogueMaker/plugin
DialogueMaker-plugin-fddef54/runTests.luau
luau
.luau
--!strict local ServerStorage = game:GetService("ServerStorage"); local IJW = require(ServerStorage.DialogueMakerPlugin.roblox_packages.ijw); local TestRunner = IJW.TestRunner; local tests = TestRunner:findTestsFromAncestors({ServerStorage.DialogueMakerPlugin:Clone()}, ".test"); local results = TestRunner:runTests(t...
91
DialogueMaker/plugin
DialogueMaker-plugin-fddef54/src/DialogueEditor/components/Button/init.luau
luau
.luau
--!strict local root = script.Parent.Parent.Parent; local React = require(root.roblox_packages.react); local useStudioColors = require(root.DialogueEditor.hooks.useStudioColors); local VirtualService = require(root.VirtualService); export type ButtonProperties = { text: string; isDisabled: boolean?; backgroundC...
468
DialogueMaker/plugin
DialogueMaker-plugin-fddef54/src/DialogueEditor/components/Checkbox/init.luau
luau
.luau
--!strict local root = script.Parent.Parent.Parent; local React = require(root.roblox_packages.react); local useStudioColors = require(root.DialogueEditor.hooks.useStudioColors); local useStudioIcons = require(root.DialogueEditor.hooks.useStudioIcons); local VirtualService = require(root.VirtualService); export type ...
723
DialogueMaker/plugin
DialogueMaker-plugin-fddef54/src/DialogueEditor/components/Dropdown/init.luau
luau
.luau
--!strict local root = script.Parent.Parent.Parent; local React = require(root.roblox_packages.react); local useStudioColors = require(root.DialogueEditor.hooks.useStudioColors); local VirtualService = require(root.VirtualService); export type DropdownProps = { text: string; children: any; size: UDim2?; layou...
1,372
DialogueMaker/plugin
DialogueMaker-plugin-fddef54/src/DialogueEditor/components/DropdownOption/init.luau
luau
.luau
--!strict local root = script.Parent.Parent.Parent; local React = require(root.roblox_packages.react); local useStudioColors = require(root.DialogueEditor.hooks.useStudioColors); local VirtualService = require(root.VirtualService); export type DropdownOptionProperties = { layoutOrder: number; onClick: () -> (); ...
544
DialogueMaker/plugin
DialogueMaker-plugin-fddef54/src/DialogueEditor/components/Explorer/components/DialogueGroupContainer/DialogueGroupContainer.test.luau
luau
.luau
--!strict local root = script.Parent.Parent.Parent.Parent.Parent.Parent; local DialogueGroupContainer = require(script.Parent); local VirtualService = require(root.VirtualService); local React = require(root.roblox_packages.react); local ReactErrorBoundary = require(root.roblox_packages.ReactErrorBoundary); local Erro...
2,237
DialogueMaker/plugin
DialogueMaker-plugin-fddef54/src/DialogueEditor/components/Explorer/components/DialogueGroupContainer/components/DialogueGroup/DialogueGroup.test.luau
luau
.luau
--!strict local root = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent; local DialogueGroup = require(script.Parent); local VirtualService = require(root.VirtualService); local React = require(root.roblox_packages.react); local ReactRoblox = require(root.roblox_packages["react-roblox"]); local IJW = req...
802
DialogueMaker/plugin
DialogueMaker-plugin-fddef54/src/DialogueEditor/components/Explorer/components/DialogueGroupContainer/components/DialogueGroup/components/DialogueItem/DialogueItem.test.luau
luau
.luau
--!strict local root = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent; local DialogueItem = require(script.Parent); local VirtualService = require(root.VirtualService); local VirtualSelection = require(root.DialogueEditor.mocks.Selection); local VirtualChangeHistoryService = require(root....
2,224
DialogueMaker/plugin
DialogueMaker-plugin-fddef54/src/DialogueEditor/components/Explorer/components/DialogueGroupContainer/components/DialogueGroup/init.luau
luau
.luau
--!strict local HttpService = game:GetService("HttpService"); local root = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent; local React = require(root.roblox_packages.react); local DialogueItem = require(script.components.DialogueItem); export type DialogueItemType = DialogueItem.DialogueItemType; export ty...
399
DialogueMaker/plugin
DialogueMaker-plugin-fddef54/src/DialogueEditor/components/Explorer/components/Preview/components/AutoTriggerCheckbox/AutoTriggerCheckbox.test.luau
luau
.luau
--!strict local StarterPlayer = game:GetService("StarterPlayer"); local root = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent; local AutoTriggerCheckbox = require(script.Parent); local VirtualService = require(root.VirtualService); local VirtualChangeHistoryService = require(root.DialogueEditor.mocks....
1,224
DialogueMaker/plugin
DialogueMaker-plugin-fddef54/src/DialogueEditor/components/Explorer/components/Preview/components/AutoTriggerCheckbox/init.luau
luau
.luau
--!strict local CollectionService = game:GetService("CollectionService"); local StarterPlayer = game:GetService("StarterPlayer"); local root = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent; local React = require(root.roblox_packages.react); local Checkbox = require(root.DialogueEditor.components.Checkbox); ...
539
DialogueMaker/plugin
DialogueMaker-plugin-fddef54/src/DialogueEditor/components/Explorer/components/Preview/components/ContentPreview/init.luau
luau
.luau
--!strict local root = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent; local React = require(root.roblox_packages.react); local useStudioColors = require(root.DialogueEditor.hooks.useStudioColors); export type ContentPreviewProperties = { layoutOrder: number; children: React.ReactNode; } local function ...
349
DialogueMaker/plugin
DialogueMaker-plugin-fddef54/src/DialogueEditor/components/Explorer/components/Preview/components/DialogueOptions/DialogueOptions.test.luau
luau
.luau
--!strict local root = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent; local DialogueOptions = require(script.Parent); local VirtualService = require(root.VirtualService); local React = require(root.roblox_packages.react); local ReactErrorBoundary = require(root.roblox_packages.ReactErrorBoundary); loc...
2,359
DialogueMaker/plugin
DialogueMaker-plugin-fddef54/src/DialogueEditor/components/Explorer/components/Preview/components/DialogueOptions/init.luau
luau
.luau
--!strict local root = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent; local React = require(root.roblox_packages.react); local Button = require(root.DialogueEditor.components.Button); local Dropdown = require(root.DialogueEditor.components.Dropdown); local DropdownOption = require(root.DialogueEditor.compone...
1,056
DialogueMaker/plugin
DialogueMaker-plugin-fddef54/src/DialogueEditor/components/Explorer/components/Preview/components/DynamicContentCheckbox/DynamicContentCheckbox.test.luau
luau
.luau
--!strict local root = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent; local DynamicContentCheckbox = require(script.Parent); local VirtualService = require(root.VirtualService); local React = require(root.roblox_packages.react); local ReactErrorBoundary = require(root.roblox_packages.ReactErrorBoundar...
1,498
DialogueMaker/plugin
DialogueMaker-plugin-fddef54/src/DialogueEditor/components/Explorer/components/Preview/components/DynamicContentCheckbox/init.luau
luau
.luau
--!strict local root = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent; local React = require(root.roblox_packages.react); local Checkbox = require(root.DialogueEditor.components.Checkbox); local useChangeHistory = require(root.DialogueEditor.hooks.useChangeHistory); local useDialogueContentScript = require(sc...
348
DialogueMaker/plugin
DialogueMaker-plugin-fddef54/src/DialogueEditor/components/Explorer/components/Preview/components/RedirectSelector/init.luau
luau
.luau
--!strict local root = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent; local React = require(root.roblox_packages.react); local ContentPreview = require(script.Parent.ContentPreview); local Paragraph = require(root.DialogueEditor.components.Paragraph); local InstanceInput = require(root.DialogueEditor.compone...
662
DialogueMaker/plugin
DialogueMaker-plugin-fddef54/src/DialogueEditor/components/Explorer/components/Preview/components/StaticContentEditor/init.luau
luau
.luau
--!strict local root = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent; local React = require(root.roblox_packages.react); local useChangeHistory = require(root.DialogueEditor.hooks.useChangeHistory); local useStudioColors = require(root.DialogueEditor.hooks.useStudioColors); export type StaticContentEditorPr...
600
DialogueMaker/plugin
DialogueMaker-plugin-fddef54/src/DialogueEditor/components/Explorer/components/Preview/hooks/useDialogueContentScript.luau
luau
.luau
--!strict local root = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent; local React = require(root.roblox_packages.react); local function useDialogueContentScript(dialogueScript: ModuleScript): (ModuleScript?, boolean) local getDialogueContentScript = React.useCallback(function(): ModuleScript? loca...
370
DialogueMaker/plugin
DialogueMaker-plugin-fddef54/src/DialogueEditor/components/Explorer/init.luau
luau
.luau
--!strict local TweenService = game:GetService("TweenService"); local root = script.Parent.Parent.Parent; local React = require(root.roblox_packages.react); local DialogueGroupContainer = require(script.components.DialogueGroupContainer); local Preview = require(script.components.Preview); local useStudioColors = req...
957
DialogueMaker/plugin
DialogueMaker-plugin-fddef54/src/DialogueEditor/components/InitialSetupScreen/init.luau
luau
.luau
--!strict local ReplicatedStorage = game:GetService("ReplicatedStorage"); local root = script.Parent.Parent.Parent; local React = require(root.roblox_packages.react); local Paragraph = require(root.DialogueEditor.components.Paragraph); local Button = require(root.DialogueEditor.components.Button); local InstanceInput...
743
DialogueMaker/plugin
DialogueMaker-plugin-fddef54/src/DialogueEditor/components/InstanceInput/init.luau
luau
.luau
--!strict local Selection = game:GetService("Selection"); local root = script.Parent.Parent.Parent; local Button = require(root.DialogueEditor.components.Button); local React = require(root.roblox_packages.react); export type InstanceInputProperties = { value: Instance?; defaultValue: Instance?; className: str...
362
DialogueMaker/plugin
DialogueMaker-plugin-fddef54/src/DialogueEditor/components/Paragraph/init.luau
luau
.luau
--!strict local root = script.Parent.Parent.Parent; local React = require(root.roblox_packages.react); local useStudioColors = require(root.DialogueEditor.hooks.useStudioColors); export type ParagraphProperties = { text: string; textColor3: Color3?; automaticSize: Enum.AutomaticSize?; textWrapped: boolean?; ...
329
DialogueMaker/plugin
DialogueMaker-plugin-fddef54/src/DialogueEditor/components/Settings/components/SettingGroup/components/Setting/init.luau
luau
.luau
--!strict local root = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent; local packages = root.roblox_packages; local React = require(packages.react); local InstanceInput = require(root.DialogueEditor.components.InstanceInput); local ToggleInput = require(root.DialogueEditor.components.ToggleInput); local TextI...
1,335
DialogueMaker/plugin
DialogueMaker-plugin-fddef54/src/DialogueEditor/components/Settings/components/SettingGroup/init.luau
luau
.luau
--!strict local root = script.Parent.Parent.Parent.Parent.Parent; local React = require(root.roblox_packages.react); local Setting = require(script.components.Setting); local useStudioColors = require(root.DialogueEditor.hooks.useStudioColors); local useChangeHistory = require(root.DialogueEditor.hooks.useChangeHistor...
1,538
DialogueMaker/plugin
DialogueMaker-plugin-fddef54/src/DialogueEditor/components/Settings/components/SettingsTabSelector/init.luau
luau
.luau
--!strict local CollectionService = game:GetService("CollectionService"); local root = script.Parent.Parent.Parent.Parent.Parent; local React = require(root.roblox_packages.react); local TabSelector = require(root.DialogueEditor.components.TabSelector); local TabSelectorButton = require(root.DialogueEditor.components...
608
DialogueMaker/plugin
DialogueMaker-plugin-fddef54/src/DialogueEditor/components/Settings/init.luau
luau
.luau
--!strict local root = script.Parent.Parent.Parent; local React = require(root.roblox_packages.react); local SettingGroup = require(script.components.SettingGroup); local settingsMetadata = require(script.settingsMetadata); local SettingsTabSelector = require(script.components.SettingsTabSelector); local useRefreshDia...
1,294
DialogueMaker/plugin
DialogueMaker-plugin-fddef54/src/DialogueEditor/components/TabSelector/TabSelectorButton.luau
luau
.luau
--!strict local root = script.Parent.Parent.Parent.Parent; local React = require(root.roblox_packages.react); local useStudioColors = require(root.DialogueEditor.hooks.useStudioColors); export type TabSelectorButtonProperties = { isSelected: boolean; isDisabled: boolean?; layoutOrder: number; text: string; ...
382
DialogueMaker/plugin
DialogueMaker-plugin-fddef54/src/DialogueEditor/components/TabSelector/init.luau
luau
.luau
--!strict local root = script.Parent.Parent.Parent; local React = require(root.roblox_packages.react); export type TabSelectorProperties = { children: React.ReactNode; }; local function TabSelector(properties: TabSelectorProperties) local children = properties.children; return React.createElement("Frame", { ...
156
DialogueMaker/plugin
DialogueMaker-plugin-fddef54/src/DialogueEditor/components/TextInput/init.luau
luau
.luau
--!strict local root = script.Parent.Parent.Parent; local React = require(root.roblox_packages.react); local useStudioColors = require(root.DialogueEditor.hooks.useStudioColors); export type TextInputProperties = { value: string?; placeholder: string?; onChanged: (value: string) -> (); layoutOrder: number; } ...
417
DialogueMaker/plugin
DialogueMaker-plugin-fddef54/src/DialogueEditor/components/ToggleInput/init.luau
luau
.luau
--!strict local root = script.Parent.Parent.Parent; local React = require(root.roblox_packages.react); local useStudioColors = require(root.DialogueEditor.hooks.useStudioColors); export type ToggleInputProperties = { isEnabled: boolean; onChanged: (value: boolean) -> (); layoutOrder: number; } local function T...
622
DialogueMaker/plugin
DialogueMaker-plugin-fddef54/src/DialogueEditor/components/Toolbar/ToolbarButton.luau
luau
.luau
--!strict local TweenService = game:GetService("TweenService"); local UserInputService = game:GetService("UserInputService"); local root = script.Parent.Parent.Parent.Parent; local React = require(root.roblox_packages.react); local useStudioColors = require(root.DialogueEditor.hooks.useStudioColors); export type Too...
916
DialogueMaker/plugin
DialogueMaker-plugin-fddef54/src/DialogueEditor/hooks/useAutomaticClose.luau
luau
.luau
--!strict local Selection = game:GetService("Selection"); local root = script.Parent.Parent.Parent; local React = require(root.roblox_packages.react); local function useAutomaticClose(closeDialogueEditor: () -> ()) React.useEffect(function(): () local selectionChangedConnection = Selection.SelectionChang...
124
DialogueMaker/plugin
DialogueMaker-plugin-fddef54/src/DialogueEditor/hooks/useChangeHistory.luau
luau
.luau
--!strict local root = script.Parent.Parent.Parent; local React = require(root.roblox_packages.react); local VirtualService = require(root.VirtualService); local function useChangeHistory() local game = VirtualService.globals.game; local ChangeHistoryService = game:GetService("ChangeHistoryService"); local st...
183
DialogueMaker/plugin
DialogueMaker-plugin-fddef54/src/DialogueEditor/hooks/useDialogueMakerPackages.luau
luau
.luau
--!strict local CollectionService = game:GetService("CollectionService"); local root = script.Parent.Parent.Parent; local React = require(root.roblox_packages.react); local function useDialogueMakerPackages() local getDialogueMakerPackages = React.useCallback(function() local dialogueMakerKits = Collection...
442
DialogueMaker/plugin
DialogueMaker-plugin-fddef54/src/DialogueEditor/hooks/useDialogueMakerScriptSelection.luau
luau
.luau
--!strict local root = script.Parent.Parent.Parent; local React = require(root.roblox_packages.react); local VirtualService = require(root.VirtualService); local function useDialogueMakerScriptSelection() local game = VirtualService.globals.game; local Selection = game:GetService("Selection"); local getScript...
506
DialogueMaker/plugin
DialogueMaker-plugin-fddef54/src/DialogueEditor/hooks/useDynamicSize.luau
luau
.luau
--!strict local root = script.Parent.Parent.Parent; local React = require(root.roblox_packages.react); local function useDynamicSize(gui: GuiBase2d, minimumWidth: number?, minimumHeight: number?): boolean local checkCondition = React.useCallback(function() local isAtOrAboveMinimumHeight = minimumHeight == nil...
220
DialogueMaker/plugin
DialogueMaker-plugin-fddef54/src/DialogueEditor/hooks/useRefreshDialogueMakerScripts.luau
luau
.luau
--!strict local CollectionService = game:GetService("CollectionService"); local root = script.Parent.Parent.Parent; local React = require(root.roblox_packages.react); local useDialogueMakerPackages = require(root.DialogueEditor.hooks.useDialogueMakerPackages); local function useRefreshDialogueMakerScripts() local...
1,282