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 |
|---|---|---|---|---|---|
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/.lune/Packages/TypeOf.luau | luau | .luau | --!optimize 2
--!strict
local STRING_CASES: {[string]: string} = {}
local function TypeOf(value: any): string
local typeOf = typeof(value)
if typeOf == "userdata" or typeOf == "table" then
local metatable = getmetatable(value)
if metatable then
if type(metatable) == "table" then
local internalType = meta... | 155 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/.lune/Utilities/FastSpawn.luau | luau | .luau | --!native
--!optimize 2
--!strict
local task = require("@lune/task")
local freeThreads: {thread} = table.create(500)
local freeAmount = 0
local function Execute<Arguments...>(callback: (Arguments...) -> (), thread: thread, ...: Arguments...)
callback(...)
freeAmount += 1
freeThreads[freeAmount] = thread
end
loca... | 199 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/.lune/Utilities/FileSystemUtilities.luau | luau | .luau | --!optimize 2
--!strict
local Debug = require("@packages/Debug")
local PathFileSystem = require("@packages/PathFileSystem")
local FileSystemUtilities = {}
local Path = PathFileSystem.Path
local function AsPathToString(asPath: PathFileSystem.AsPath): string
if type(asPath) == "string" then
return asPath
end
ret... | 1,146 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/.lune/Utilities/PathUtilities.luau | luau | .luau | --!optimize 2
--!strict
local process = require("@lune/process")
local PathUtilities = {}
local SEPARATOR = if process.os == "windows" then "\\" else "/"
PathUtilities.Separator = SEPARATOR
--- Fixes the path so that it's properly formatted to the local operating system
--- @param path The path to format
--- @return... | 531 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/.lune/Utilities/ReadWallyToml.luau | luau | .luau | --!optimize 2
--!strict
local GreenTea = require("@packages/GreenTea")
local PathFileSystem = require("@packages/PathFileSystem")
local serde = require("@lune/serde")
export type Result<T, E> = {
Success: true,
Value: T,
} | {
Success: false,
Error: E,
}
local isWallyPackage = GreenTea.build({
dependencies = Gr... | 653 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/.lune/Utilities/ReducedInstance.luau | luau | .luau | --!native
--!optimize 2
--!strict
--[[
MIT License
Copyright (c) 2024 BusyCityGuy
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to ... | 687 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/.lune/Utilities/Runtime.luau | luau | .luau | --!native
--!optimize 2
--!strict
--[[
MIT License
Copyright (c) 2024 BusyCityGuy
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to ... | 550 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/.lune/Utilities/StringUtilities.luau | luau | .luau | --!optimize 2
--!strict
local StringUtilities = {}
function StringUtilities.ToPascalCase(value: string)
return (
string.gsub(
string.gsub(string.gsub(string.lower(value), "[ _-](%a)", string.upper), "^%a", string.upper),
"%p",
""
)
)
end
return table.freeze(StringUtilities)
| 79 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/.lune/Utilities/WallyPackageTypes.luau | luau | .luau | --!optimize 2
--!strict
--[[
Wraps `wally install` with type exports in link files.
Roughly equivalent to wally-package-types, but with support for generics
with defaults and some support for WaitForChild require paths.
--]]
local Option = require("@classes/Option")
local LuauLexer = require("@packages/LuauLexer"... | 2,039 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/.lune/build-release.luau | luau | .luau | --!optimize 2
--!strict
--[=[ lunar
about = "Creates a built release of the project."
args = "[-s --skip-confirmation] [-i --include-packages] [-b --bad-package-types] [package-name]"
]=]
local FileInstance = require("@classes/FileInstance")
local LuauPolyfill = require("@packages/LuauPolyfill")
local PathFileSystem... | 2,528 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/.lune/enable-loadmodule.luau | luau | .luau | --!optimize 2
--!strict
--[=[ lunar
about = "Enables FFlagEnableLoadModule in ClientAppSettings.json for Jest tests on Windows."
]=]
local LuauPolyfill = require("@packages/LuauPolyfill")
local PathFileSystem = require("@packages/PathFileSystem")
local process = require("@lune/process")
local serde = require("@lune/s... | 591 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/.lune/run-unit-tests-local.luau | luau | .luau | --!optimize 2
--!strict
--[=[ lunar
about = "Builds and runs the unit tests place file."
args = "[-d, --debug] [rojo-path]"
]=]
local LuauPolyfill = require("@packages/LuauPolyfill")
local PathFileSystem = require("@packages/PathFileSystem")
local ReducedInstance = require("@utilities/ReducedInstance")
local Runtime... | 1,567 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/.lune/run-unit-tests.luau | luau | .luau | --!optimize 2
--!strict
--[=[ lunar
about = "Builds and runs the unit tests place file."
args = ""
]=]
error("This is not to be used. Just use the local version.")
local Execute = require("@utilities/Execute")
local PathFileSystem = require("@packages/PathFileSystem")
if not PathFileSystem.IsFile("test-place.rbxl"... | 178 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/.lune/update-versions.luau | luau | .luau | --!optimize 2
--!strict
--[=[ lunar
about = "Updates the versions in the Wally configuration as well as the documentation."
args = "[next-version]"
]=]
local LuauPolyfill = require("@packages/LuauPolyfill")
local PathFileSystem = require("@packages/PathFileSystem")
local SemanticVersion = require("@packages/Semantic... | 469 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/src/Arrays/SortedArray.luau | luau | .luau | --!native
--!optimize 2
--!strict
local Error = require(script.Parent.Parent.Parent.Error)
local GreenTea = require(script.Parent.Parent.Parent.GreenTea)
local GreenTeaUtilities = require(script.Parent.Parent.Parent.GreenTeaUtilities)
local Types = require(script.Parent.Parent.Types)
type ComparisonFunction<T> = Typ... | 6,019 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/src/Caches/LRUCache.luau | luau | .luau | --!native
--!optimize 2
--!strict
local Error = require(script.Parent.Parent.Parent.Error)
local GreenTea = require(script.Parent.Parent.Parent.GreenTea)
type Node<K, V> = {
Key: K,
Next: Node<K, V>?,
Previous: Node<K, V>?,
Value: V,
}
export type LRUCache<K, V> = typeof(setmetatable(
{} :: {
Capacity: number... | 2,921 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/src/Caches/__tests__/LRUCache.test.luau | luau | .luau | --!optimize 2
--!strict
local TestService = game:GetService("TestService")
local JestGlobals = require(TestService.UnitTesting.DevPackages.JestGlobals)
local LRUCache = require(script.Parent.Parent.LRUCache)
local describe = JestGlobals.describe
local expect = JestGlobals.expect
local it = JestGlobals.it
type LRUCa... | 799 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/src/Queues/MaxPriorityQueue.luau | luau | .luau | --!native
--!optimize 2
--!strict
local Error = require(script.Parent.Parent.Parent.Error)
local GreenTea = require(script.Parent.Parent.Parent.GreenTea)
local Types = require(script.Parent.Parent.Types)
type ComparisonFunction<T> = Types.ComparisonFunction<T>
type HeapEntry<T> = Types.HeapEntry<T>
export type MaxP... | 3,659 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/src/Queues/MinPriorityQueue.luau | luau | .luau | --!native
--!optimize 2
--!strict
local Error = require(script.Parent.Parent.Parent.Error)
local GreenTea = require(script.Parent.Parent.Parent.GreenTea)
local Types = require(script.Parent.Parent.Types)
type ComparisonFunction<T> = Types.ComparisonFunction<T>
type HeapEntry<T> = Types.HeapEntry<T>
export type MinP... | 3,665 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/src/Queues/__tests__/MaxPriorityQueue.test.luau | luau | .luau | --!optimize 2
--!strict
local TestService = game:GetService("TestService")
local JestGlobals = require(TestService.UnitTesting.DevPackages.JestGlobals)
local MaxPriorityQueue = require(script.Parent.Parent.MaxPriorityQueue)
local describe = JestGlobals.describe
local expect = JestGlobals.expect
local it = JestGlobal... | 643 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/src/Queues/__tests__/MinPriorityQueue.test.luau | luau | .luau | --!optimize 2
--!strict
local TestService = game:GetService("TestService")
local JestGlobals = require(TestService.UnitTesting.DevPackages.JestGlobals)
local MinPriorityQueue = require(script.Parent.Parent.MinPriorityQueue)
local describe = JestGlobals.describe
local expect = JestGlobals.expect
local it = JestGlobal... | 647 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/src/Random/LiveRandom.luau | luau | .luau | --!native
--!optimize 2
--!strict
local Error = require(script.Parent.Parent.Parent.Error)
local GreenTea = require(script.Parent.Parent.Parent.GreenTea)
export type LiveRandom = {
Get: (self: LiveRandom) -> number,
Peek: (self: LiveRandom) -> number,
Rig: (self: LiveRandom, value: number) -> LiveRandom,
}
type Pr... | 1,714 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/src/Random/__tests__/LiveRandom.test.luau | luau | .luau | --!optimize 2
--!strict
local TestService = game:GetService("TestService")
local JestGlobals = require(TestService.UnitTesting.DevPackages.JestGlobals)
local LiveRandom = require(script.Parent.Parent.LiveRandom)
local describe = JestGlobals.describe
local expect = JestGlobals.expect
local it = JestGlobals.it
local ... | 602 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/src/Tries/SimpleTrie.luau | luau | .luau | --!native
--!optimize 2
--!strict
local Error = require(script.Parent.Parent.Parent.Error)
local GreenTea = require(script.Parent.Parent.Parent.GreenTea)
local Types = require(script.Parent.Types)
export type SimpleTrie = Types.BasicTrie
type Static = {
ClassName: "SimpleTrie",
new: () -> SimpleTrie,
Is: (value:... | 2,116 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/src/Tries/Types.luau | luau | .luau | --!optimize 2
--!strict
export type BasicTrie = {
Root: Node,
Insert: (self: BasicTrie, word: string) -> (),
Search: (self: BasicTrie, word: string) -> boolean,
StartsWith: (self: BasicTrie, prefix: string) -> boolean,
}
export type Node = {
Children: {[number]: Node},
IsEnding: boolean,
}
return false
| 96 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/src/Tries/Utf8Trie.luau | luau | .luau | --!native
--!optimize 2
--!strict
local Error = require(script.Parent.Parent.Parent.Error)
local GreenTea = require(script.Parent.Parent.Parent.GreenTea)
local Types = require(script.Parent.Types)
export type Utf8Trie = Types.BasicTrie
type Static = {
ClassName: "Utf8Trie",
new: () -> Utf8Trie,
Is: (value: any) ... | 2,201 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/src/Tries/__tests__/SimpleTrie.test.luau | luau | .luau | --!optimize 2
--!strict
local TestService = game:GetService("TestService")
local JestGlobals = require(TestService.UnitTesting.DevPackages.JestGlobals)
local SimpleTrie = require(script.Parent.Parent.SimpleTrie)
local beforeEach = JestGlobals.beforeEach
local describe = JestGlobals.describe
local expect = JestGlobal... | 496 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/src/Tries/__tests__/Utf8Trie.test.luau | luau | .luau | --!optimize 2
--!strict
local TestService = game:GetService("TestService")
local JestGlobals = require(TestService.UnitTesting.DevPackages.JestGlobals)
local Utf8Trie = require(script.Parent.Parent.Utf8Trie)
local beforeEach = JestGlobals.beforeEach
local describe = JestGlobals.describe
local expect = JestGlobals.ex... | 723 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/src/Types.luau | luau | .luau | --!strict
--[=[
All the types related to this library.
@class Types
]=]
local Types = {}
-- Luau really, really, really needs strict arrays.
export type Tuple<K, V> = {K | V}
--[=[
The data structure that represents an element in a [MaxPriorityQueue] or
[MinPriorityQueue].
@interface HeapEntry
@field Priority... | 188 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/src/init.luau | luau | .luau | --!optimize 2
--!strict
local LRUCache = require(script.Caches.LRUCache)
local LiveRandom = require(script.Random.LiveRandom)
local MaxPriorityQueue = require(script.Queues.MaxPriorityQueue)
local MinPriorityQueue = require(script.Queues.MinPriorityQueue)
local SimpleTrie = require(script.Tries.SimpleTrie)
local Sorte... | 316 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/src/jest.config.luau | luau | .luau | type Serialize = (
value: unknown,
config: unknown,
indentation: number,
depth: number,
references: unknown,
printer: Serialize
) -> string
type Serializer = {
serialize: Serialize,
test: (value: unknown) -> boolean,
}
type JestConfiguration = {
clearmocks: boolean?,
displayName: {
color: string,
name: st... | 301 |
Bura-Games/data-structures | Bura-Games-data-structures-00bb85a/tests/Execute.server.luau | luau | .luau | --!optimize 2
--!strict
--[[
MIT License
Copyright (c) 2024 BusyCityGuy
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy,... | 474 |
osyrisrblx/rbxts-build | osyrisrblx-rbxts-build-4f8b7e9/scripts/model_export.luau | luau | .luau | local fs = require("@lune/fs")
local roblox = require("@lune/roblox")
local process = require("@lune/process")
local placePath = process.args[1]
local game = roblox.deserializePlace(fs.readFile(placePath))
local Workspace = game:GetService("Workspace")
for _, folder in Workspace:GetChildren() do
if folder.ClassN... | 158 |
osyrisrblx/rbxts-build | osyrisrblx-rbxts-build-4f8b7e9/scripts/model_import.luau | luau | .luau | -- luacheck: globals Instance
local fs = require("@lune/fs")
local roblox = require("@lune/roblox")
local process = require("@lune/process")
local Instance = roblox.Instance
local game = Instance.new("DataModel")
local Workspace = game:GetService("Workspace")
local args = table.clone(process.args)
local placePath =... | 150 |
osyrisrblx/rbxts-build | osyrisrblx-rbxts-build-4f8b7e9/scripts/sync.luau | luau | .luau | local fs = require("@lune/fs")
local roblox = require("@lune/roblox")
local process = require("@lune/process")
local placeFilePath = process.args[1]
local outPath = process.args[2]
local game = roblox.deserializePlace(fs.readFile(placeFilePath))
local SERVICE_BLACKLIST = {
StarterPlayer = true,
}
local output = ""... | 485 |
R-unic/mechanism | R-unic-mechanism-39b6a97/src/axis-action.ts | roblox-ts | .ts | import Signal from "@rbxts/lemon-signal";
import { BaseAction } from "./base-action";
import { getRawInput, type RawInput } from "./common";
export abstract class AxisAction extends BaseAction {
public readonly updated = this.trash.add(new Signal);
public readonly axes: RawInput[];
public readonly delta = new V... | 291 |
R-unic/mechanism | R-unic-mechanism-39b6a97/src/base-action.ts | roblox-ts | .ts | import { BaseID } from "@rbxts/id";
import Destroyable from "@rbxts/destroyable";
export abstract class BaseAction extends Destroyable implements BaseID<string | number> {
public readonly id: string | number = "default";
public readonly processed: boolean = false;
public readonly callbacks: Callback[] = [];
/... | 92 |
R-unic/mechanism | R-unic-mechanism-39b6a97/src/input-manager.ts | roblox-ts | .ts | import { UserInputService as InputService } from "@rbxts/services";
import Destroyable from "@rbxts/destroyable";
import { BaseAction } from "./base-action";
import { AxisAction } from "./axis-action";
import { gamepadInputs } from "./common";
type Maybe<T> = T | undefined;
type AbstractConstructor<T = object> = abst... | 568 |
R-unic/mechanism | R-unic-mechanism-39b6a97/src/standard-action.ts | roblox-ts | .ts | import Signal from "@rbxts/lemon-signal";
import { BaseAction } from "./base-action";
import { getInputEnum, type RawInput } from "./common";
export abstract class BaseStandardAction extends BaseAction {
public readonly activated = this.trash.add(new Signal);
public readonly deactivated = this.trash.add(new Signa... | 764 |
fisherjacobc/rbxts-transformer-web2rblx | fisherjacobc-rbxts-transformer-web2rblx-0dae6ad/src/transformer.ts | roblox-ts | .ts | import * as fs from "node:fs";
// import * as path from "path";
import ts from "typescript";
import parseCss from "./parseCss";
/**
* This is the transformer's configuration, the values are passed from the tsconfig.
*/
export interface TransformerConfig {
cssFilePath: string;
}
enum RobloxEquivelantTags {
body = ... | 10,077 |
bjlarouche/uiblox-rbxts | bjlarouche-uiblox-rbxts-7ef4ed6/src/theme/context/ThemeProducer.tsx | roblox-ts | .tsx | import { createProducer } from "@rbxts/reflex";
import { DEFAULT_THEME } from "theme/constants";
import { Theme } from "../interfaces/theme";
export const themeProducer = createProducer(DEFAULT_THEME, {
setTheme: (_state, theme: Theme) => theme
});
export type ThemeProducer = typeof themeProducer;
| 66 |
bjlarouche/uiblox-rbxts | bjlarouche-uiblox-rbxts-7ef4ed6/src/theme/context/ThemeProvider.tsx | roblox-ts | .tsx | import React, { StrictMode, useEffect } from "@rbxts/react";
import { ReflexProvider } from "@rbxts/react-reflex";
import { DEFAULT_THEME } from "theme/constants";
import { Theme } from "theme/interfaces";
import { CustomizedProps } from "theme/types";
import { themeProducer } from "./ThemeProducer";
export interface... | 175 |
bjlarouche/uiblox-rbxts | bjlarouche-uiblox-rbxts-7ef4ed6/src/theme/hooks/useTheme.ts | roblox-ts | .ts | import { useEffect, useMemo, useState } from "@rbxts/react";
import { themeProducer } from "../context/ThemeProducer";
import { Theme } from "theme/interfaces";
const useTheme = (): {
theme: Theme;
setTheme: (theme: Theme) => void;
} => {
const [theme, setTheme] = useState<Theme>(themeProducer.getState());
useEff... | 169 |
bjlarouche/uiblox-rbxts | bjlarouche-uiblox-rbxts-7ef4ed6/src/theme/types/types.ts | roblox-ts | .ts | /* eslint-disable @typescript-eslint/no-explicit-any */
import React, { PropsWithChildren } from "@rbxts/react";
import { WriteableStyle } from "theme/interfaces";
export interface CommonProps<T extends Instance> extends PropsWithChildren {
className?: WriteableStyle<T>;
component?: T;
id?: React.Key;
ref?: React.... | 244 |
bjlarouche/uiblox-rbxts | bjlarouche-uiblox-rbxts-7ef4ed6/src/ui/packages/button/components/Button.tsx | roblox-ts | .tsx | import React, { useEffect, useRef, useState } from "@rbxts/react";
import { TweenService } from "@rbxts/services";
import { CustomizedProps, WriteableStyle } from "theme";
import { ButtonSize, ButtonColor, ButtonVariant } from "../types";
import useButtonStyles from "./Button.styles";
import { LoadingStroke } from "ui/... | 891 |
bjlarouche/uiblox-rbxts | bjlarouche-uiblox-rbxts-7ef4ed6/src/ui/packages/divider/components/Divider.tsx | roblox-ts | .tsx | import React from "@rbxts/react";
import { CustomizedProps } from "theme";
import { Orientations } from "ui/enums";
import useDividerStyles from "./Divider.styles";
type DefaultDividerComponent = Frame;
export interface DividerProps {
position?: UDim2;
orientation?: Orientations;
padding?: number;
color?: Color3;... | 167 |
bjlarouche/uiblox-rbxts | bjlarouche-uiblox-rbxts-7ef4ed6/src/ui/packages/errorBoundary/components/ErrorBoundary.tsx | roblox-ts | .tsx | import React, { Component, ErrorInfo, ReactComponent } from "@rbxts/react";
export interface ErrorBoundaryProps {
fallback?: (error: unknown) => React.Element;
}
export interface ErrorBoundaryState {
hasError: boolean;
message?: unknown;
}
@ReactComponent
export class ErrorBoundary extends Component<ErrorBoundary... | 187 |
bjlarouche/uiblox-rbxts | bjlarouche-uiblox-rbxts-7ef4ed6/src/ui/packages/icon/components/Icon.tsx | roblox-ts | .tsx | import React from "@rbxts/react";
import { Icons } from "ui/enums";
import { CustomizedProps, WriteableStyle } from "theme";
import useIconStyles from "./Icon.styles";
export interface IconProps {
icon: Icons;
size?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl";
tint?: Color3;
}
type DefaultIconComponent = ImageLabel;... | 205 |
bjlarouche/uiblox-rbxts | bjlarouche-uiblox-rbxts-7ef4ed6/src/ui/packages/iconButton/components/IconButton.tsx | roblox-ts | .tsx | import React, { useState } from "@rbxts/react";
import { Icons } from "ui/enums";
import { CustomizedProps, WriteableStyle } from "theme";
import useIconButtonStyles from "./IconButton.styles";
export interface IconButtonProps {
icon: Icons;
size?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl";
tint: Color3;
selected?:... | 318 |
bjlarouche/uiblox-rbxts | bjlarouche-uiblox-rbxts-7ef4ed6/src/ui/packages/input/components/Input.tsx | roblox-ts | .tsx | import React, { useState } from "@rbxts/react";
import { classNames, CustomizedProps, WriteableStyle } from "theme";
import { Divider } from "../../divider";
import { Orientations } from "ui/enums";
import { InputColor, InputMargin, InputVariant } from "../types";
import useInputStyles from "./Input.styles";
export ty... | 747 |
bjlarouche/uiblox-rbxts | bjlarouche-uiblox-rbxts-7ef4ed6/src/ui/packages/loadingStroke/components/LoadingStroke.tsx | roblox-ts | .tsx | import React, { useEffect, useRef } from "@rbxts/react";
import { CustomizedProps } from "theme";
import { TweenService } from "@rbxts/services";
export interface LoadingStrokeProps {
animating?: boolean;
}
function LoadingStroke(props: CustomizedProps<UIStroke, LoadingStrokeProps>) {
const {
animating = false,
... | 456 |
bjlarouche/uiblox-rbxts | bjlarouche-uiblox-rbxts-7ef4ed6/src/ui/packages/preloader/components/Preloader.tsx | roblox-ts | .tsx | import React, { useState, useMemo, ComponentType, useEffect } from "@rbxts/react";
import { useAsyncEffect, useDeferState } from "@rbxts/pretty-react-hooks";
import { ContentProvider } from "@rbxts/services";
import { ProgressBar } from "ui/packages/progressBar";
import { CustomizedProps } from "theme";
import usePrelo... | 817 |
bjlarouche/uiblox-rbxts | bjlarouche-uiblox-rbxts-7ef4ed6/src/ui/packages/progressBar/components/ProgressBar.tsx | roblox-ts | .tsx | import React from "@rbxts/react";
import { CustomizedProps, WriteableStyle } from "theme";
import useProgressBarStyles from "./ProgressBar.styles";
export interface ProgressBarProps {
progress: number;
}
function ProgressBar(props: CustomizedProps<Frame, ProgressBarProps>) {
const { progress, className, id, ref } =... | 234 |
bjlarouche/uiblox-rbxts | bjlarouche-uiblox-rbxts-7ef4ed6/src/ui/packages/shadow/components/Shadow.tsx | roblox-ts | .tsx | import React, { useEffect, useState } from "@rbxts/react";
import { WriteableStyle } from "theme";
import useShadowStyles from "./Shadow.styles";
function Shadow() {
const { container } = useShadowStyles();
const [parent, setParent] = useState<GuiObject | undefined>(undefined);
const [cornerRadius, setCornerRadius]... | 324 |
bjlarouche/uiblox-rbxts | bjlarouche-uiblox-rbxts-7ef4ed6/src/ui/packages/sidebar/components/Sidebar.tsx | roblox-ts | .tsx | import React from "@rbxts/react";
import { CustomizedProps } from "theme";
import useSidebarStyles from "./Sidebar.styles";
export type DefaultSidebarComponent = Frame;
export interface SidebarProps {
size: "compact" | "large";
ignoreInset?: boolean;
}
function Sidebar<T extends DefaultSidebarComponent>(props: Cus... | 162 |
bjlarouche/uiblox-rbxts | bjlarouche-uiblox-rbxts-7ef4ed6/src/ui/packages/toast/components/Toast.tsx | roblox-ts | .tsx | import { BoatTween } from "@rbxts/boat-tween";
import React, { useEffect, useRef } from "@rbxts/react";
import { CustomizedProps, DEFAULT_THEME, WriteableStyle } from "theme";
import { Directions } from "ui/enums";
import { Shadow } from "ui/packages/shadow";
import ToastVariants from "../enums/ToastVariants";
import u... | 540 |
bjlarouche/uiblox-rbxts | bjlarouche-uiblox-rbxts-7ef4ed6/src/ui/packages/treeView/components/TreeView.tsx | roblox-ts | .tsx | import React, { useCallback, useEffect, useState } from "@rbxts/react";
import { CustomizedProps, DEFAULT_THEME, WriteableStyle } from "theme";
import { Icon } from "ui/packages/icon";
import { Typography } from "ui/packages/typography";
import { Icons } from "../../../enums";
import Branch from "../interfaces/Branch";... | 1,570 |
bjlarouche/uiblox-rbxts | bjlarouche-uiblox-rbxts-7ef4ed6/src/ui/packages/typography/components/Typography.tsx | roblox-ts | .tsx | import React from "@rbxts/react";
import { CustomizedProps } from "theme";
import { FontFamilyVariant, FontSizeVariant } from "theme/interfaces/typography";
import { TypographyAlignment } from "../types/TypographyAlignment";
import { TypographyColor } from "../types/TypographyColor";
import { TypographyDisplay } from "... | 240 |
rbxts-flamework/core | rbxts-flamework-core-454537d/src/prelude.ts | roblox-ts | .ts | /**
* This file contains preludes for the transformer.
*
* This is primarily necessary due to a bug with the `@rbxts/t` package.
*/
import { t } from "@rbxts/t";
export { t };
| 49 |
roblox-ts/roblox-ts | roblox-ts-roblox-ts-a2ebfa6/include/RuntimeLib.lua | luau | .lua | local Promise = require(script.Parent.Promise)
local RunService = game:GetService("RunService")
local OUTPUT_PREFIX = "roblox-ts: "
local NODE_MODULES = "node_modules"
local DEFAULT_SCOPE = "@rbxts"
local TS = {}
TS.Promise = Promise
local function isPlugin(context)
return RunService:IsStudio() and context:FindFi... | 1,586 |
roblox-ts/roblox-ts | roblox-ts-roblox-ts-a2ebfa6/src/Project/transformers/builtin/transformTypeReferenceDirectives.ts | roblox-ts | .ts | import ts from "typescript";
const SCOPE = "@rbxts/";
const PACKAGE = "types";
export function transformTypeReferenceDirectives() {
return (sourceFile: ts.SourceFile | ts.Bundle) => {
if (ts.isSourceFile(sourceFile)) {
for (const typeReferenceDirective of sourceFile.typeReferenceDirectives) {
if (typeRefere... | 120 |
roblox-ts/roblox-ts | roblox-ts-roblox-ts-a2ebfa6/src/TSTransformer/classes/MacroManager.ts | roblox-ts | .ts | import { ProjectError } from "Shared/errors/ProjectError";
import { assert } from "Shared/util/assert";
import { CALL_MACROS } from "TSTransformer/macros/callMacros";
import { CONSTRUCTOR_MACROS } from "TSTransformer/macros/constructorMacros";
import { IDENTIFIER_MACROS } from "TSTransformer/macros/identifierMacros";
i... | 1,630 |
roblox-ts/roblox-ts | roblox-ts-roblox-ts-a2ebfa6/tests/runTestsWithLune.lua | luau | .lua | local roblox = require("@lune/roblox")
local fs = require("@lune/fs")
local luau = require("@lune/luau")
local process = require("@lune/process")
local stdio = require("@lune/stdio")
local task = require("@lune/task")
local testPlacePath = process.args[1]
local game = roblox.deserializePlace(fs.readFile(testPlacePath... | 622 |
roblox-ts/roblox-ts | roblox-ts-roblox-ts-a2ebfa6/tests/src/diagnostics/noMacroObjectSpread.2.tsx | roblox-ts | .tsx | import Roact from "@rbxts/roact";
interface ComponentProps extends Array<number> {}
function Component(props: ComponentProps) {
return <frame />;
}
const e = <Component {...[123]} />;
| 43 |
roblox-ts/roblox-ts | roblox-ts-roblox-ts-a2ebfa6/tests/src/diagnostics/noPrecedingJsxSpreadElement.tsx | roblox-ts | .tsx | import Roact from "@rbxts/roact";
<frame>
{...[]}
<frame />
</frame>;
| 27 |
roblox-ts/roblox-ts | roblox-ts-roblox-ts-a2ebfa6/tests/src/main.server.ts | roblox-ts | .ts | /// <reference types="@rbxts/testez/globals" />
import { ServerScriptService } from "@rbxts/services";
import TestEZ from "@rbxts/testez";
const results = TestEZ.TestBootstrap.run([ServerScriptService.tests]);
if (results.errors.size() > 0 || results.failureCount > 0) {
error("Tests failed!");
}
| 76 |
littensy/charmed-icons | littensy-charmed-icons-a422031/src/main.ts | roblox-ts | .ts | import type { ExtensionContext } from "vscode";
import { workspace } from "vscode";
import { CONFIG_ROOT } from "~/constants";
import { updateThemes } from "./update";
import { isDefaultConfig } from "./utils/config";
import { isFreshInstall, promptReload } from "./utils/interactions";
export async function activate(c... | 150 |
littensy/charmed-icons | littensy-charmed-icons-a422031/src/utils/config.ts | roblox-ts | .ts | import type { Config } from "~/types";
import { defu } from "defu";
import { workspace } from "vscode";
import { CONFIG_ROOT, ConfigKey } from "~/constants";
import { defaultConfig } from "~/defaults";
export function getConfig(): Partial<Config> {
const config = workspace.getConfiguration(CONFIG_ROOT);
return {
... | 199 |
littensy/charmed-icons | littensy-charmed-icons-a422031/src/utils/definitions.ts | roblox-ts | .ts | import type { ExtensionContext } from "vscode";
import type { IconVariant } from "~/constants";
import type { IconDefinitions } from "~/types";
import { Uri, workspace } from "vscode";
export async function getIconDefinitions(context: ExtensionContext, variant: IconVariant) {
const path = Uri.joinPath(context.extensi... | 108 |
littensy/charmed-icons | littensy-charmed-icons-a422031/src/utils/interactions.ts | roblox-ts | .ts | import type { ExtensionContext } from "vscode";
import { Buffer } from "node:buffer";
import { commands, Uri, window, workspace } from "vscode";
export async function promptReload() {
const message = `Charmed Icons: Theme changed - Reload required.`;
const action = "Reload window";
return window.showInformationMess... | 264 |
roblox-aurora/rbx-net | roblox-aurora-rbx-net-2bf4525/lune/ci.luau | luau | .luau | --!strict
--[[
Automatic deployment and artefact builder for Net
]]
local process = require("@lune/process")
local path = require("modules/path")
local node = require("modules/node")
local fs = require("@lune/fs")
local luauDir = path.join(process.cwd, "luau")
local luauDistDir = path.join(luauDir, "dist")
local... | 628 |
roblox-aurora/rbx-net | roblox-aurora-rbx-net-2bf4525/lune/modules/node.luau | luau | .luau | local process = require("@lune/process")
local node = {}
function node.publish()
local params = { "publish" }
if process.os == "windows" then
return process.spawn("npm.cmd", params)
else
return process.spawn("npm", params)
end
end
return node
| 62 |
roblox-aurora/rbx-net | roblox-aurora-rbx-net-2bf4525/lune/modules/path.luau | luau | .luau | --!strict
local process = require("@lune/process")
local path = {}
local SEP = if process.os == "windows" then "\\" else "/"
--- Join multiple path parts into a combined path
--- @return A joined path
function path.join(...: string): string
return path.ospath(table.concat({ ... }, SEP))
end
--- Gets the extension of... | 425 |
roblox-aurora/rbx-net | roblox-aurora-rbx-net-2bf4525/src/internal/tables.lua | luau | .lua | local function isMixed(t)
assert(type(t) == "table")
local mixed = false
local _idxType
for index, value in next, t do
if _idxType and _idxType ~= type(index) then
return true
end
_idxType = type(index)
if type(value) == "table" then
mixed = mixed and isMixed(value) and not (not getmetatable(value))... | 112 |
roblox-aurora/rbx-net | roblox-aurora-rbx-net-2bf4525/src/internal/validator.ts | roblox-ts | .ts | import { isMixed } from "./tables";
export interface ValidatorLike {
readonly errorMessage: string;
readonly check: (value: unknown) => boolean;
}
export interface Validator<T> extends ValidatorLike {
readonly check: (value: unknown) => value is T;
}
type NetworkValue = string | number | boolean | Instance | CFra... | 558 |
roblox-aurora/rbx-net | roblox-aurora-rbx-net-2bf4525/src/messaging/MessagingService.lua | luau | .lua | local RunService = game:GetService("RunService")
local MessagingService = game:GetService("MessagingService")
local MockMessagingService = {}
local topics = {}
function MockMessagingService:PublishAsync(topicName, message)
local topic = topics[topicName]
if topic then
topic:Fire(
{
Sent = tick(),
Data ... | 187 |
roblox-aurora/rbx-net | roblox-aurora-rbx-net-2bf4525/src/middleware/LoggerMiddleware/init.lua | luau | .lua | local RunService = game:GetService("RunService")
local HttpService = game:GetService("HttpService")
local IS_STUDIO = RunService:IsStudio()
local function defaultLogger(name, args)
if IS_STUDIO then
local str = {};
for _, arg in ipairs(args) do
table.insert(str, HttpService:JSONEncode(a... | 176 |
roblox-aurora/rbx-net | roblox-aurora-rbx-net-2bf4525/src/middleware/RateLimitMiddleware/throttle.lua | luau | .lua | local Throttle = {
counters = {}
}
local RequestCounter = {}
RequestCounter.__index = RequestCounter
function RequestCounter.new()
local self = {
counter = {}
}
return setmetatable(self, RequestCounter)
end
function RequestCounter:Get(player)
local counter = self.counter
local playerQueue = counter[player.Us... | 246 |
roblox-aurora/rbx-net | roblox-aurora-rbx-net-2bf4525/src/middleware/TypeCheckMiddleware/init.lua | luau | .lua | local RunService = game:GetService("RunService")
local HttpService = game:GetService("HttpService")
local IS_STUDIO = RunService:IsStudio();
local function defaultErrorHandler(event, args, index)
local name = event:GetInstance().Name
if IS_STUDIO then
warn("[TypeCheckMiddleware] Call to " .. nam... | 393 |
roblox-aurora/rbx-net | roblox-aurora-rbx-net-2bf4525/src/server/MiddlewareEvent.ts | roblox-ts | .ts | import { $ifEnv } from "rbxts-transform-env";
import { NetGlobalMiddleware, NetMiddleware, NextCaller } from "../middleware";
/** @internal */
export type MutableMiddlewareList = Array<NetMiddleware<Array<unknown>>>;
export type MiddlewareList = ReadonlyArray<NetMiddleware<ReadonlyArray<unknown>>>;
abstract class Midd... | 320 |
roblox-aurora/rbx-net | roblox-aurora-rbx-net-2bf4525/src/server/ServerEvent.ts | roblox-ts | .ts | import { NetMiddleware, NextCaller } from "../middleware";
import { findOrCreateRemote, IS_CLIENT, IS_RUNNING, NetManagedInstance } from "../internal";
import MiddlewareEvent, { MiddlewareList } from "./MiddlewareEvent";
import { MiddlewareOverload } from "../middleware";
import { NetServerScriptSignal, NetServerSignal... | 1,155 |
roblox-aurora/rbx-net | roblox-aurora-rbx-net-2bf4525/src/server/ServerMessagingEvent.ts | roblox-ts | .ts | import ExperienceBroadcastEvent, {
isSubscriptionMessage,
ISubscriptionMessage,
} from "../messaging/ExperienceBroadcastEvent";
import { getGlobalRemote, IS_CLIENT, isLuaTable } from "../internal";
import ServerEvent from "./ServerEvent";
import { DefinitionConfiguration } from "../definitions";
const Players = game.... | 1,087 |
MonzterDev/Roblox-TS-Template | MonzterDev-Roblox-TS-Template-c80afcb/scripts/run-tests.server.lua | luau | .lua | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ServerScriptService = game:GetService("ServerScriptService")
local TestEZ = require(ReplicatedStorage.rbxts_include.node_modules["@rbxts"].testez.src)
TestEZ.TestBootstrap:run({
ServerScriptService.TS.test,
-- ReplicatedStorage.TS.test,
}, TestEZ.... | 81 |
MonzterDev/Roblox-TS-Template | MonzterDev-Roblox-TS-Template-c80afcb/src/client/cmdr.client.ts | roblox-ts | .ts | import { CmdrClient } from "@rbxts/cmdr";
CmdrClient.SetActivationKeys([Enum.KeyCode.F2]);
| 26 |
MonzterDev/Roblox-TS-Template | MonzterDev-Roblox-TS-Template-c80afcb/src/client/controllers/GuiController.tsx | roblox-ts | .tsx | import { Controller, OnStart } from "@flamework/core";
import React from "@rbxts/react";
import { ReflexProvider } from "@rbxts/react-reflex";
import { createPortal, createRoot } from "@rbxts/react-roblox";
import { Players } from "@rbxts/services";
import { store } from "client/store";
import HolderApp from "client/ui... | 193 |
MonzterDev/Roblox-TS-Template | MonzterDev-Roblox-TS-Template-c80afcb/src/client/store/index.ts | roblox-ts | .ts | import { InferState, combineProducers } from "@rbxts/reflex";
import { slices } from "shared/store";
import { receiverMiddleware } from "./middleware/receiver";
export type RootStore = typeof store;
export type RootState = InferState<RootStore>;
export function createStore() {
const store = combineProducers({
...... | 91 |
MonzterDev/Roblox-TS-Template | MonzterDev-Roblox-TS-Template-c80afcb/src/client/store/middleware/receiver.ts | roblox-ts | .ts | import { ProducerMiddleware, createBroadcastReceiver } from "@rbxts/reflex";
import { Events } from "client/network";
export function receiverMiddleware(): ProducerMiddleware {
const receiver = createBroadcastReceiver({
start: () => {
Events.reflex.start.fire();
},
});
Events.reflex.dispatch.connect((action... | 79 |
MonzterDev/Roblox-TS-Template | MonzterDev-Roblox-TS-Template-c80afcb/src/client/ui/apps/buttons/buttons-app.tsx | roblox-ts | .tsx | import { HolderPage, ImageName } from "shared/configs/Gui";
import React from "@rbxts/react";
import Frame from "client/ui/components/frame";
import Object from "@rbxts/object-utils";
import Button from "./components/button";
import { store } from "client/store";
import { selectHolderPage } from "shared/store/selectors... | 327 |
MonzterDev/Roblox-TS-Template | MonzterDev-Roblox-TS-Template-c80afcb/src/client/ui/apps/buttons/components/button.tsx | roblox-ts | .tsx | import React from "@rbxts/react"
import ImageLabel from "client/ui/components/imageLabel"
import TextButton from "client/ui/components/textButton"
import TextLabel from "client/ui/components/textLabel"
import { COLORS, ImageName } from "shared/configs/Gui"
interface Props {
button: string,
image: ImageName,
... | 307 |
MonzterDev/Roblox-TS-Template | MonzterDev-Roblox-TS-Template-c80afcb/src/client/ui/apps/currency/components/currency-frame.tsx | roblox-ts | .tsx | import { useSelectorCreator } from "@rbxts/react-reflex";
import React from "@rbxts/react";
import { Players } from "@rbxts/services";
import Frame from "client/ui/components/frame";
import ImageLabel from "client/ui/components/imageLabel";
import TextLabel from "client/ui/components/textLabel";
import { TextLabelButto... | 628 |
MonzterDev/Roblox-TS-Template | MonzterDev-Roblox-TS-Template-c80afcb/src/client/ui/apps/currency/currency-app.tsx | roblox-ts | .tsx | import ScreenGui from "client/ui/components/scaledGui";
import CurrencyFrame from "./components/currency-frame";
import { CURRENCIES } from "shared/configs/Currency";
import { store } from "client/store";
import React from "@rbxts/react";
import { ReflexProvider } from "@rbxts/react-reflex";
import Frame from "client/u... | 192 |
MonzterDev/Roblox-TS-Template | MonzterDev-Roblox-TS-Template-c80afcb/src/client/ui/apps/holder/holder-app.tsx | roblox-ts | .tsx | import React, { useEffect, useState } from "@rbxts/react";
import Frame from "client/ui/components/frame";
import SettingsApp from "../settings/settings-app";
import { useSelector } from "@rbxts/react-reflex";
import CurrencyApp from "../currency/currency-app";
import { HOLDER_PAGES } from "shared/configs/Gui";
import ... | 881 |
MonzterDev/Roblox-TS-Template | MonzterDev-Roblox-TS-Template-c80afcb/src/client/ui/apps/settings/components/setting-button.tsx | roblox-ts | .tsx | import { useSelector } from "@rbxts/react-reflex";
import React from "@rbxts/react";
import { Events } from "client/network";
import TextLabel from "client/ui/components/textLabel";
import { Setting } from "shared/configs/Settings";
import { Players, RunService } from "@rbxts/services";
import { selectPlayerSetting } f... | 564 |
MonzterDev/Roblox-TS-Template | MonzterDev-Roblox-TS-Template-c80afcb/src/client/ui/apps/settings/settings-app.tsx | roblox-ts | .tsx | import React from "@rbxts/react";
import ContainerFrame from "client/ui/components/containerFrame";
import Exit from "client/ui/components/exit";
import Frame from "client/ui/components/frame";
import Title from "client/ui/components/title";
import { SETTINGS } from "shared/configs/Settings";
import SettingButton from ... | 477 |
MonzterDev/Roblox-TS-Template | MonzterDev-Roblox-TS-Template-c80afcb/src/client/ui/components/containerFrame.tsx | roblox-ts | .tsx | import React from "@rbxts/react";
interface Props extends React.PropsWithChildren {
anchorPoint?: Vector2;
position?: UDim2;
size: UDim2;
scrollBarImageColor3?: Color3;
scrollBarThickness?: number;
automaticCanvasSize?: Enum.AutomaticSize;
backgroundColor3?: Color3;
backgroundTransparen... | 518 |
MonzterDev/Roblox-TS-Template | MonzterDev-Roblox-TS-Template-c80afcb/src/client/ui/components/exit.tsx | roblox-ts | .tsx | import React from "@rbxts/react";
import { store } from "client/store";
import { COLORS } from "shared/configs/Gui";
interface Props extends React.PropsWithChildren {
uiStrokeSize?: number;
position?: UDim2;
anchorPoint?: Vector2;
size: UDim2;
}
export default function Exit ( props: Props ) {
return (
<textbut... | 358 |
MonzterDev/Roblox-TS-Template | MonzterDev-Roblox-TS-Template-c80afcb/src/client/ui/components/frame.tsx | roblox-ts | .tsx | import React, { useEffect, useState } from "@rbxts/react";
import { TweenService } from "@rbxts/services";
interface Props extends React.PropsWithChildren {
position?: UDim2 | React.Binding<UDim2>;
anchorPoint?: Vector2;
size?: UDim2;
backgroundTransparency?: number;
backgroundColor3?: Color3;
... | 364 |
MonzterDev/Roblox-TS-Template | MonzterDev-Roblox-TS-Template-c80afcb/src/client/ui/components/imageLabel.tsx | roblox-ts | .tsx | import React, { useEffect, useState } from "@rbxts/react";
import { IMAGES, ImageName } from "shared/configs/Gui";
interface Props extends React.PropsWithChildren {
image?: ImageName;
position?: UDim2 | React.Binding<UDim2>;
anchorPoint?: Vector2;
size?: UDim2;
backgroundTransparency?: number;
... | 255 |
MonzterDev/Roblox-TS-Template | MonzterDev-Roblox-TS-Template-c80afcb/src/client/ui/components/scaledGui.tsx | roblox-ts | .tsx | import React, { createRef, useEffect } from "@rbxts/react";
import { CollectionService } from "@rbxts/services";
interface Props extends React.PropsWithChildren {
}
export default function ScreenGui(props: Props) {
const uiScaleRef = createRef<UIScale>()
useEffect(() => {
const uiScale = uiScaleRef.current
if ... | 176 |
MonzterDev/Roblox-TS-Template | MonzterDev-Roblox-TS-Template-c80afcb/src/client/ui/components/textButton.tsx | roblox-ts | .tsx | import React, { useEffect, useState } from "@rbxts/react";
import { COLORS } from "shared/configs/Gui";
interface Props extends React.PropsWithChildren {
key?: string;
text?: string;
textSize?: number;
size?: UDim2;
position?: UDim2;
anchorPoint?: Vector2;
automaticSize?: Enum.AutomaticSize... | 496 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.