repo
stringclasses
350 values
file_path
stringlengths
29
200
language
stringclasses
2 values
file_type
stringclasses
4 values
code
stringlengths
2
1.01M
tokens
int64
2
598k
Neohertz/comet
Neohertz-comet-bd2e945/src/modules/button.ts
roblox-ts
.ts
import Signal from "@rbxts/lemon-signal"; import { CometError } from "../core/enum"; import { CometState } from "./../types/comet.d"; /** * Toolbar button instance with many great features. */ export class Button { private button: PluginToolbarButton; private buttonState: boolean; private clickEvent: Signal; c...
451
Neohertz/comet
Neohertz-comet-bd2e945/src/modules/view.ts
roblox-ts
.ts
import { CometState } from "../types/comet"; import { CometError } from "../core/enum"; import Signal from "@rbxts/lemon-signal"; import { Button } from "./button"; import { Logger } from "../util/logger"; const HttpService = game.GetService("HttpService"); /** * A view is a container for GUI elements. */ export cl...
1,106
Neohertz/comet
Neohertz-comet-bd2e945/src/systems/history.ts
roblox-ts
.ts
import { InternalSystem } from "../core"; import { CometState } from "../types/comet"; import { Logger } from "../util/logger"; const ChangeHistoryService = game.GetService("ChangeHistoryService"); interface RecordConfig { name: string; description?: string; onSuccess?: "commit" | "append" | "cancel"; } /** * A ...
980
sparkiyy/Compo
sparkiyy-Compo-b2cc911/plugin/src/assets/assets.luau
luau
.luau
local assets = { add = "rbxasset://.asphalt-plugin/add.png", caretDown = "rbxasset://.asphalt-plugin/caretDown.png", checkmark = "rbxasset://.asphalt-plugin/checkmark.png", extension = "rbxasset://.asphalt-plugin/extension.png", icons = { toolbarIcon = "rbxasset://.asphalt-plugin/icons/toolbarIcon.png", }, sea...
111
sparkiyy/Compo
sparkiyy-Compo-b2cc911/plugin/src/atoms/editorComponents.ts
roblox-ts
.ts
import { atom } from "@rbxts/charm"; export const enum ComponentRealm { Client = 1, Server = 2, } export const enum EditorComponentFieldType { String = 1, Number = 2, Boolean = 3, Vector3 = 4, Vector2 = 5, } export interface EditorComponent { instance: ModuleScript; name: string; realm: ComponentRealm; id: ...
169
sparkiyy/Compo
sparkiyy-Compo-b2cc911/plugin/src/atoms/selection.ts
roblox-ts
.ts
import { atom } from "@rbxts/charm"; export const SelectionAtom = atom<Instance>();
21
sparkiyy/Compo
sparkiyy-Compo-b2cc911/plugin/src/atoms/theme.ts
roblox-ts
.ts
import { Atom, atom } from "@rbxts/charm"; export const ThemeColors = { "MainBackground" : Enum.StudioStyleGuideColor.MainBackground, "MainText" : Enum.StudioStyleGuideColor.MainText, "ScrollBar" : Enum.StudioStyleGuideColor.ScrollBar, "ScrollBarBackground" : Enum.StudioStyleGuideColor.ScrollBarBackgr...
195
sparkiyy/Compo
sparkiyy-Compo-b2cc911/plugin/src/hooks/logic/useComponent.ts
roblox-ts
.ts
import { useEventListener } from "@rbxts/pretty-react-hooks"; import React, { useCallback, useEffect, useState } from "@rbxts/react"; import { act } from "@rbxts/react-roblox"; import { COMPONENT_ACTIVE } from "constants"; interface ComponentState { active: boolean; } export default function useComponent(id: string,...
218
sparkiyy/Compo
sparkiyy-Compo-b2cc911/plugin/src/hooks/logic/useComponentFields.ts
roblox-ts
.ts
import { useCallback, useEffect, useState } from "@rbxts/react"; import { EditorComponentField } from "atoms/editorComponents"; import useEditorComponets from "./useEditorComponents"; import { COMPONENT_FIELD } from "constants"; import { useEventListener } from "@rbxts/pretty-react-hooks"; import { String } from "@rbxt...
451
sparkiyy/Compo
sparkiyy-Compo-b2cc911/plugin/src/hooks/logic/useEditorComponents.ts
roblox-ts
.ts
import { useAtom } from "@rbxts/react-charm"; import { EditorComponentsAtom } from "atoms/editorComponents"; export default function useEditorComponets() { return useAtom(EditorComponentsAtom); }
44
sparkiyy/Compo
sparkiyy-Compo-b2cc911/plugin/src/hooks/logic/useInstanceComponents.ts
roblox-ts
.ts
import { String } from "@rbxts/jsnatives"; import { useCallback, useEffect, useState } from "@rbxts/react"; import { CollectionService } from "@rbxts/services"; import { Trash } from "@rbxts/trash"; import { EditorComponent, EditorComponentsAtom } from "atoms/editorComponents"; import { COMPONENT_ADDED_FLAG, COMPONENT_...
512
sparkiyy/Compo
sparkiyy-Compo-b2cc911/plugin/src/hooks/logic/useSelection.ts
roblox-ts
.ts
import { useAtom } from "@rbxts/react-charm"; import { SelectionAtom } from "atoms/selection"; export default function useSelection() { return useAtom(SelectionAtom) }
41
sparkiyy/Compo
sparkiyy-Compo-b2cc911/plugin/src/hooks/visuals/useInstanceIcon.tsx
roblox-ts
.tsx
import { useMemo } from "@rbxts/react"; const StudioService = game.GetService("StudioService"); export default function useInstanceIcon(instance: Instance | undefined) { return useMemo(() => { if (!instance) return ""; const icon = (StudioService.GetClassIcon(instance.ClassName) as { Image: string }).Image; re...
78
sparkiyy/Compo
sparkiyy-Compo-b2cc911/plugin/src/hooks/visuals/useTheme.tsx
roblox-ts
.tsx
import { useAtom } from "@rbxts/react-charm"; import { ThemeAtom } from "atoms/theme"; export default function useTheme() { return useAtom(ThemeAtom) }
40
sparkiyy/Compo
sparkiyy-Compo-b2cc911/plugin/src/index.server.ts
roblox-ts
.ts
import { Comet, LogLevel } from "@rbxts/comet"; Comet.createApp("Compo", true); Comet.addPaths(script.WaitForChild("systems")); Comet.configureLogger(LogLevel.VERBOSE) Comet.launch();
46
sparkiyy/Compo
sparkiyy-Compo-b2cc911/plugin/src/systems/editorComponentCollector.ts
roblox-ts
.ts
import Attributes from "@rbxts/attributes"; import { Dependency, OnStart, System, Track } from "@rbxts/comet"; import { String } from "@rbxts/jsnatives"; import { ServerScriptService, StarterPlayer, Workspace } from "@rbxts/services"; import { Trash } from "@rbxts/trash"; import { ComponentRealm, EditorComponentsAtom }...
922
sparkiyy/Compo
sparkiyy-Compo-b2cc911/plugin/src/systems/editorComponentField.ts
roblox-ts
.ts
import { COMPONENT_ID } from "constants"; import { Dependency, OnEnd, OnStart, Studio, System } from "@rbxts/comet"; import { ComponentBuilder, EditorComponent, EditorComponentField, EditorComponentsAtom } from "atoms/editorComponents"; import { sandboxload } from "utility/sandboxLoad"; import { effect } from "@rbxts/c...
585
sparkiyy/Compo
sparkiyy-Compo-b2cc911/plugin/src/systems/inspector.ts
roblox-ts
.ts
import { Dependency, GUI, OnStart, System, View } from "@rbxts/comet"; import { MainSystem } from "./main"; import { MountInspector } from "ui/inspector/mount"; @System() export class InspectorSystem implements OnStart { private mainSystem = Dependency(MainSystem); private gui = Dependency(GUI); public View: View; ...
149
sparkiyy/Compo
sparkiyy-Compo-b2cc911/plugin/src/systems/main.ts
roblox-ts
.ts
import { History, GUI, Button, Dependency, System, Studio } from "@rbxts/comet"; import assets from "assets/assets"; @System() export class MainSystem { private gui = Dependency(GUI); public button: Button; constructor() { this.button = this.gui.createButton( "Inspector", "Open the inspector window", as...
92
sparkiyy/Compo
sparkiyy-Compo-b2cc911/plugin/src/systems/selectionSystem.ts
roblox-ts
.ts
import { Dependency, OnInit, Studio, System } from "@rbxts/comet"; import { SelectionAtom } from "atoms/selection"; @System() export class SelectionSystem implements OnInit{ private studio = Dependency(Studio) onInit(): void { SelectionAtom(this.studio.getSelection()[0]) this.studio.onSelection...
89
sparkiyy/Compo
sparkiyy-Compo-b2cc911/plugin/src/systems/studioTheme/index.ts
roblox-ts
.ts
import { Logger, OnInit, System } from "@rbxts/comet"; import { StudioTheme, ThemeAtom, ThemeColors } from "atoms/theme"; @System() export class StudioThemeSystem implements OnInit { onInit () { this.onThemeChanged() settings().Studio.ThemeChanged.Connect(() => this.onThemeChanged()) } p...
178
sparkiyy/Compo
sparkiyy-Compo-b2cc911/plugin/src/ui/components/automaticScrollingFrame.tsx
roblox-ts
.tsx
import { useEventListener } from "@rbxts/pretty-react-hooks"; import React, { ReactNode, useRef, useState } from "@rbxts/react"; interface Props { children?: ReactNode; Size?: UDim2; Position?: UDim2; AnchorPoint?: Vector2; BackgroundColor3?: Color3; BackgroundTransparency?: number; BorderSizePixel?: number; L...
241
sparkiyy/Compo
sparkiyy-Compo-b2cc911/plugin/src/ui/components/checkbox.tsx
roblox-ts
.tsx
import React from "@rbxts/react"; import { checkmark } from "assets/assets"; import useTheme from "hooks/visuals/useTheme"; interface Props { checked: boolean; onClick?: () => void; } export default function CheckBox({ checked, onClick }: Props) { const theme = useTheme(); return ( <imagebutton Size={UDim2.f...
232
sparkiyy/Compo
sparkiyy-Compo-b2cc911/plugin/src/ui/components/padding.tsx
roblox-ts
.tsx
import React from "@rbxts/react"; interface PaddingProps { Padding? : UDim, Top? : UDim, Right? : UDim, Bottom? : UDim, Left? : UDim } export default function Padding({ Padding, Top, Right, Bottom, Left } : PaddingProps) { return ( <uipadding PaddingBottom={Padding ...
114
sparkiyy/Compo
sparkiyy-Compo-b2cc911/plugin/src/ui/components/separator.tsx
roblox-ts
.tsx
import React from "@rbxts/react"; import useTheme from "hooks/visuals/useTheme"; export default function Separator() { const theme = useTheme(); return ( <frame Size={new UDim2(1, 0, 0, 1)} BackgroundColor3={theme.Dark.Default} BackgroundTransparency={0.25}> <uicorner CornerRadius={new UDim(1, 0)} /> </frame>...
100
sparkiyy/Compo
sparkiyy-Compo-b2cc911/plugin/src/ui/inspector/app.tsx
roblox-ts
.tsx
import React from "@rbxts/react"; import { InspectorView } from "ui/inspector/components/inspectorView"; export default function App() { return <InspectorView />; }
38
sparkiyy/Compo
sparkiyy-Compo-b2cc911/plugin/src/ui/inspector/components/addComponent.tsx
roblox-ts
.tsx
import React from "@rbxts/react"; import assets from "assets/assets"; import useTheme from "hooks/visuals/useTheme"; import Padding from "ui/components/padding"; export default function AddComponentButton({ OnClick }: { OnClick?: () => void }) { const theme = useTheme(); return ( <frame BackgroundTransparency={1} ...
302
sparkiyy/Compo
sparkiyy-Compo-b2cc911/plugin/src/ui/inspector/components/common/inspectorSection.tsx
roblox-ts
.tsx
import React, { ReactNode } from "@rbxts/react"; import useTheme from "hooks/visuals/useTheme"; import Padding from "ui/components/padding"; export default function InspectorSection({ children, color }: { children: ReactNode; color?: Color3 }) { const theme = useTheme(); return ( <frame AutomaticSize={"Y"} Size={n...
173
sparkiyy/Compo
sparkiyy-Compo-b2cc911/plugin/src/ui/inspector/components/common/inspectorSectionButton.tsx
roblox-ts
.tsx
import React, { ReactNode, useEffect, useState } from "@rbxts/react"; import useTheme from "hooks/visuals/useTheme"; import Padding from "ui/components/padding"; export default function InspectorSectionButton({ Selected, OnClick, children, }: { children: ReactNode; OnClick?: () => void; Selected?: boolean; }) { ...
326
sparkiyy/Compo
sparkiyy-Compo-b2cc911/plugin/src/ui/inspector/components/inspectorComponentsList.tsx
roblox-ts
.tsx
import { Object, String } from "@rbxts/jsnatives"; import React, { Fragment, useMemo, useState } from "@rbxts/react"; import useEditorComponets from "hooks/logic/useEditorComponents"; import useTheme from "hooks/visuals/useTheme"; import Padding from "ui/components/padding"; import assets from "assets/assets"; import {...
1,116
sparkiyy/Compo
sparkiyy-Compo-b2cc911/plugin/src/ui/inspector/components/inspectorContainer.tsx
roblox-ts
.tsx
import React, { ReactNode } from "@rbxts/react"; import useTheme from "hooks/visuals/useTheme"; import Padding from "ui/components/padding"; export default function InspectorContainer({ children }: { children: ReactNode }) { const theme = useTheme(); return ( <scrollingframe Size={UDim2.fromScale(1, 1)} Borde...
174
sparkiyy/Compo
sparkiyy-Compo-b2cc911/plugin/src/ui/inspector/components/inspectorInstance.tsx
roblox-ts
.tsx
import React from "@rbxts/react"; import useSelection from "hooks/logic/useSelection"; import InspectorSection from "./common/inspectorSection"; import useTheme from "hooks/visuals/useTheme"; import useInstanceIcon from "hooks/visuals/useInstanceIcon"; export default function InspectorInstance() { const selection = us...
203
sparkiyy/Compo
sparkiyy-Compo-b2cc911/plugin/src/ui/inspector/components/inspectorView.tsx
roblox-ts
.tsx
import React, { Fragment, useEffect, useState } from "@rbxts/react"; import InspectorContainer from "./inspectorContainer"; import useSelection from "hooks/logic/useSelection"; import Padding from "ui/components/padding"; import useTheme from "hooks/visuals/useTheme"; import InspectorInstance from "./inspectorInstance"...
339
sparkiyy/Compo
sparkiyy-Compo-b2cc911/plugin/src/ui/inspector/components/instanceComponents.tsx
roblox-ts
.tsx
import React, { Fragment } from "@rbxts/react"; import useInstanceComponents from "hooks/logic/useInstanceComponents"; import InspectorSection from "./common/inspectorSection"; import Padding from "ui/components/padding"; import useTheme from "hooks/visuals/useTheme"; import { ComponentRealm } from "atoms/editorCompone...
228
sparkiyy/Compo
sparkiyy-Compo-b2cc911/plugin/src/ui/inspector/components/serializedComponent.tsx
roblox-ts
.tsx
import React, { useState } from "@rbxts/react"; import InspectorSection from "./common/inspectorSection"; import useComponent from "hooks/logic/useComponent"; import Padding from "ui/components/padding"; import assets from "assets/assets"; import useTheme from "hooks/visuals/useTheme"; import { EditorComponent } from "...
666
sparkiyy/Compo
sparkiyy-Compo-b2cc911/plugin/src/ui/inspector/components/serializedFields.tsx
roblox-ts
.tsx
import { Object, String } from "@rbxts/jsnatives"; import React, { Fragment, useEffect } from "@rbxts/react"; import { EditorComponent, EditorComponentFieldType } from "atoms/editorComponents"; import useTheme from "hooks/visuals/useTheme"; import useComponentFields from "hooks/logic/useComponentFields"; import RenderF...
401
sparkiyy/Compo
sparkiyy-Compo-b2cc911/plugin/src/ui/inspector/fields/booleanField.tsx
roblox-ts
.tsx
import React, { Fragment, useEffect } from "@rbxts/react"; import useTheme from "hooks/visuals/useTheme"; import CheckBox from "ui/components/checkbox"; import Padding from "ui/components/padding"; export default function BooleanInspectorField({ value, onChange, }: { value: boolean; onChange: (value: boolean) => v...
91
sparkiyy/Compo
sparkiyy-Compo-b2cc911/plugin/src/ui/inspector/fields/numberField.tsx
roblox-ts
.tsx
import React, { Fragment } from "@rbxts/react"; import useTheme from "hooks/visuals/useTheme"; import Padding from "ui/components/padding"; export default function NumberInspectorField({ value, onChange, }: { value: number; onChange: (value: number) => void; }) { const theme = useTheme(); return ( <textbox ...
250
sparkiyy/Compo
sparkiyy-Compo-b2cc911/plugin/src/ui/inspector/fields/renderField.tsx
roblox-ts
.tsx
import React, { Fragment, useEffect } from "@rbxts/react"; import { EditorComponentField, EditorComponentFieldType } from "atoms/editorComponents"; import StringInspectorField from "./stringField"; import NumberInspectorField from "./numberField"; import BooleanInspectorField from "./booleanField"; import Vector3Inspec...
366
sparkiyy/Compo
sparkiyy-Compo-b2cc911/plugin/src/ui/inspector/fields/stringField.tsx
roblox-ts
.tsx
import React, { Fragment } from "@rbxts/react"; import useTheme from "hooks/visuals/useTheme"; import Padding from "ui/components/padding"; export default function StringInspectorField({ value, onChange, }: { value: string; onChange: (value: string) => void; }) { const theme = useTheme(); return ( <textbox ...
214
sparkiyy/Compo
sparkiyy-Compo-b2cc911/plugin/src/ui/inspector/fields/vector2Field.tsx
roblox-ts
.tsx
import React, { Fragment } from "@rbxts/react"; import useTheme from "hooks/visuals/useTheme"; import Padding from "ui/components/padding"; export default function Vector2InspectorField({ value, onChange, }: { value: Vector2; onChange: (value: Vector2) => void; }) { const theme = useTheme(); return ( <frame Au...
542
sparkiyy/Compo
sparkiyy-Compo-b2cc911/plugin/src/ui/inspector/fields/vector3Field.tsx
roblox-ts
.tsx
import React, { Fragment } from "@rbxts/react"; import useTheme from "hooks/visuals/useTheme"; import Padding from "ui/components/padding"; export default function Vector3InspectorField({ value, onChange, }: { value: Vector3; onChange: (value: Vector3) => void; }) { const theme = useTheme(); return ( <frame Au...
753
sparkiyy/Compo
sparkiyy-Compo-b2cc911/plugin/src/ui/inspector/mount.tsx
roblox-ts
.tsx
import { createPortal, createRoot } from "@rbxts/react-roblox"; import App from "./app"; import React, { StrictMode } from "@rbxts/react"; export function MountInspector(parent: Instance) { const mountRoot = createRoot(parent) mountRoot.render(<StrictMode>{createPortal(<App />, parent)}</StrictMode>) retur...
85
sparkiyy/Compo
sparkiyy-Compo-b2cc911/runtime/Include/Linking.luau
luau
.luau
local compo = require(script.Packages.compo) export type component<TInstance, TFields> = compo.component<TInstance, TFields> return compo
34
sparkiyy/Compo
sparkiyy-Compo-b2cc911/runtime/src/constants.luau
luau
.luau
local RunService = game:GetService("RunService") local StarterPlayer = game:GetService("StarterPlayer") local ServerScriptService = game:GetService("ServerScriptService") return { realm = if RunService:IsServer() then ServerScriptService else StarterPlayer, update = if RunService:IsServer() then RunService.Heartbeat...
113
sparkiyy/Compo
sparkiyy-Compo-b2cc911/runtime/src/createComponent.luau
luau
.luau
local types = require(script.Parent.types) local function createComponent<TComponent>( transformer: (component: TComponent) -> (), fields: {} ): types.componentBuilder<any, any> return { constructor = function(instance: Instance, refinatedFields : any): types.component<any, any> local component = { instanc...
106
sparkiyy/Compo
sparkiyy-Compo-b2cc911/runtime/src/fields.luau
luau
.luau
local t = require(script.Parent.Parent.t) local function field<T>(checker: (T) -> { any }, defaultVal: T, fieldID: number) : (val: T) -> { default : T, field : number} return function(val) if (checker(val)) then return { default = val, field = fieldID } end return { default = defa...
164
sparkiyy/Compo
sparkiyy-Compo-b2cc911/runtime/src/init.luau
luau
.luau
-- hi ^.^ local types = require("@self/types") export type component<TInstance, TFields> = types.component<TInstance, TFields> return { launch = require("@self/launch"), createComponent = require("@self/createComponent"), fields = require("@self/fields") }
60
sparkiyy/Compo
sparkiyy-Compo-b2cc911/runtime/src/launch.luau
luau
.luau
local promise = require(script.Parent.Parent.promise) local componentCollector = require("./componentCollector") local prepareComponent = require("./prepareComponent") local scheduler = require("./scheduler") local _launched = false --[=[ Launches Compo and starts its lifecycle @return A promise that resolves when t...
214
sparkiyy/Compo
sparkiyy-Compo-b2cc911/runtime/src/prepareComponent/init.luau
luau
.luau
local CollectionService = game:GetService("CollectionService") local constants = require("./constants") local validate = require("@self/validate") local scheduler = require("./scheduler") local janitor = require(script.Parent.Parent.janitor) local t = require(script.Parent.Parent.t) local function getRefinatedFields(f...
1,079
sparkiyy/Compo
sparkiyy-Compo-b2cc911/runtime/src/prepareComponent/validate.luau
luau
.luau
local t = require(script.Parent.Parent.Parent.t) local types = require("../types") local IComponent = t.interface({ constructor = t.callback, fields = t.optional(t.table) }) return function(component: types.componentBuilder<any, any>) return IComponent(component) end
54
sparkiyy/Compo
sparkiyy-Compo-b2cc911/runtime/src/scheduler/helper.luau
luau
.luau
--[=[ Calls a function, if an error ocurred doesnt stop the thread. @param The callback to be called @return Whatever the callback returned ]=] local function call<T...>(callable: ((T...) -> any)?, yield: boolean?, ...:T...): any if not callable then return nil end local arg: any = {...} if yi...
188
sparkiyy/Compo
sparkiyy-Compo-b2cc911/runtime/src/types.luau
luau
.luau
--!strict export type component<TInstance, TFields> = { fields: TFields, instance: TInstance, -- life cycle methods awake: (() -> ())?, onEnable: (() -> ())?, start: (() -> ())?, update: ((deltaTime: number) -> ())?, fixedUpdate: (() -> ())?, onDisable: (() -> ())?, onDestroy: (() -> ())?, } export type com...
124
sparkiyy/Compo
sparkiyy-Compo-b2cc911/runtime/testing/killPart.component.luau
luau
.luau
local compo = require(game.ReplicatedStorage.compo) type component = compo.component<Part, { damage: number, }> return compo.createComponent(function(component: component) local c: RBXScriptConnection = nil local originalMaterial = component.instance.Material local originalColor = component.instance.Color local f...
304
sparkiyy/Compo
sparkiyy-Compo-b2cc911/runtime/testing/testing.server.luau
luau
.luau
local compo = require(game:GetService("ReplicatedStorage").compo) compo.launch():andThen(function() print("resolved") end)
31
focalorrr/roblox-moderation-bot
focalorrr-roblox-moderation-bot-86a246c/RobloxScript/ModerationMessaging.server.lua
luau
.lua
local MessagingService = game:GetService("MessagingService") local Players = game:GetService("Players") local HttpService = game:GetService("HttpService") local TOPIC = "DiscordModeration" -- Set this to the same 32+ character value as ROBLOX_MESSAGING_SHARED_SECRET. local MODERATION_SHARED_SECRET = "REPLACE_WITH_A_RA...
698
christopher-buss/eslint-config
christopher-buss-eslint-config-96f11ee/fixtures/input/luau.luau
luau
.luau
local function greet(name) local message="Hello, "..name.."!" print(message) return message end local function add(a,b) return a+b end local function processItems(items) local result={} for i=1,#items do local item=items[i] if item~=nil then if type(item)=="string" then...
468
christopher-buss/eslint-config
christopher-buss-eslint-config-96f11ee/fixtures/output/roblox-game/luau.luau
luau
.luau
local function greet(name) local message = "Hello, " .. name .. "!" print(message) return message end local function add(a, b) return a + b end local function processItems(items) local result = {} for i = 1, #items do local item = items[i] if item ~= nil then if type(item) == "string" then table.inse...
479
christopher-buss/eslint-config
christopher-buss-eslint-config-96f11ee/scripts/gen-package-extensions.ts
roblox-ts
.ts
/** * Renders `pnpm-plugin/extensions.mjs` into the `packageExtensions` block of * `pnpm-workspace.yaml`, so this repository's own install needs no pnpmfile. * * Native `packageExtensions` runs through the same `readPackage` machinery the * plugin hooks by hand, with the semantics the plugin reimplements: * `crea...
1,533
christopher-buss/eslint-config
christopher-buss-eslint-config-96f11ee/scripts/roblox-allowed-words-gen.ts
roblox-ts
.ts
import fs from "node:fs/promises"; import process from "node:process"; import { deriveRobloxAllowedWords } from "./roblox-allowed-words-shared.ts"; /** * Snapshot the Roblox names that `naming: { allowedWords: true }` hands to * `flawless/naming-convention` at build time. * * The names are scraped out of `@rbxts/...
556
christopher-buss/eslint-config
christopher-buss-eslint-config-96f11ee/scripts/versiongen.ts
roblox-ts
.ts
import fs from "node:fs/promises"; import { parsePnpmWorkspaceYaml } from "pnpm-workspace-yaml"; import { dependenciesMap } from "../src/cli/constants.ts"; const collator = new Intl.Collator(); const names = new Set(["eslint", ...Object.values(dependenciesMap).flat()]); const yaml = parsePnpmWorkspaceYaml( await f...
245
christopher-buss/eslint-config
christopher-buss-eslint-config-96f11ee/src/eslint/configs/naming.ts
roblox-ts
.ts
import { ROBLOX_ALLOWED_WORDS } from "../../generated/roblox-allowed-words.ts"; import { GLOB_DTS, GLOB_MARKDOWN, GLOB_TS, GLOB_TSX } from "../../globs.ts"; import { getTsConfig, interopDefault } from "../../utils.ts"; import type { NamingConfig, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, TypedFlat...
3,125
christopher-buss/eslint-config
christopher-buss-eslint-config-96f11ee/src/eslint/configs/package-json.ts
roblox-ts
.ts
import { GLOB_PACKAGE_JSON, GLOB_PACKAGE_JSON_ROOT } from "../../globs.ts"; import { findWorkspaceRoot, interopDefault } from "../../utils.ts"; import { lazyPlugin } from "../lazy-plugin.ts"; import type { OptionsHasRoblox, OptionsProjectType, OptionsStylistic, TypedFlatConfigItem, } from "../types.ts"; export asy...
1,750
christopher-buss/eslint-config
christopher-buss-eslint-config-96f11ee/src/eslint/configs/pnpm.ts
roblox-ts
.ts
import { findUp } from "find-up-simple"; import fs from "node:fs/promises"; import { GLOB_PACKAGE_JSON } from "../../globs.ts"; import { ensurePackages, interopDefault } from "../../utils.ts"; import { lazyPlugin } from "../lazy-plugin.ts"; import type { OptionsIsInEditor, OptionsPnpm, TypedFlatConfigItem } from "../t...
658
christopher-buss/eslint-config
christopher-buss-eslint-config-96f11ee/src/eslint/configs/test.ts
roblox-ts
.ts
import type PluginVitest from "@vitest/eslint-plugin"; import type PluginJest from "eslint-plugin-jest"; import { GLOB_TESTS, GLOB_TYPE_TESTS } from "../../globs.ts"; import { smallRulesTestRules } from "../../rules/small-rules.ts"; import { sonarjsTestRules } from "../../rules/sonarjs.ts"; import { jestRules, typeTe...
1,339
christopher-buss/eslint-config
christopher-buss-eslint-config-96f11ee/src/globs.ts
roblox-ts
.ts
// cspell:words cjsx lintable export const GLOB_ROOT = [ "*", "packages/*/*", "apps/*/*", "libs/*/*", "packages/*/*/*", "apps/*/*/*", "libs/*/*/*", ]; export const GLOB_ROOT_SRC = [ "packages/*/*.{,c,m}[jt]s{,x}", "apps/*/*.{,c,m}[jt]s{,x}", "libs/*/*.{,c,m}[jt]s{,x}", "packages/*/*/*.{,c,m}[jt]s{,x}", "ap...
1,664
christopher-buss/eslint-config
christopher-buss-eslint-config-96f11ee/src/lint-cli/lib/cache/package-hash.ts
roblox-ts
.ts
// cspell:words typeaware unparseable buildinfo import crypto from "node:crypto"; import path from "node:path"; import { isRecord } from "../../../guards.ts"; import { findWorkspaceRoot } from "../files/workspace.ts"; import { stableStringify } from "../stable-json.ts"; import { readFileIfPresent } from "../state.ts";...
800
christopher-buss/eslint-config
christopher-buss-eslint-config-96f11ee/src/lint-cli/lib/files/collect.ts
roblox-ts
.ts
// cspell:words lintable pathspec import { execFileSync } from "node:child_process"; import fs from "node:fs"; import path from "node:path"; import picomatch from "picomatch"; import { normalizePath } from "../cache/entries.ts"; import { toPosix } from "../paths.ts"; import { CACHE_BUST_PATTERNS, ESLINT_CONFIG_FILE_...
3,482
christopher-buss/eslint-config
christopher-buss-eslint-config-96f11ee/src/lint-cli/lib/files/workspace.ts
roblox-ts
.ts
// cspell:words unparseable import fs from "node:fs"; import path from "node:path"; import picomatch from "picomatch"; import { isRecord } from "../../../guards.ts"; import { toPosix } from "../paths.ts"; import { readFileIfPresent } from "../state.ts"; /** * Markers that identify a repository or pnpm-workspace root...
2,445
christopher-buss/eslint-config
christopher-buss-eslint-config-96f11ee/src/lint-cli/lib/state.ts
roblox-ts
.ts
import fs from "node:fs"; import path from "node:path"; import process from "node:process"; /** * Directory (relative to the project root) where the CLI keeps its persisted * state. Lives under `node_modules/.cache` so it is discarded with the * dependency tree and never committed. */ const CACHE_DIRECTORY = path....
1,797
christopher-buss/eslint-config
christopher-buss-eslint-config-96f11ee/src/lint-cli/lib/typescript/gate.ts
roblox-ts
.ts
// cspell:words buildinfo mtimes relativised import crypto from "node:crypto"; import path from "node:path"; import { MANIFEST_FIELDS, manifestSubset } from "../cache/package-hash.ts"; import { findWorkspaceMembers, findWorkspaceRoot } from "../files/workspace.ts"; import { stableStringify } from "../stable-json.ts"; ...
1,001
christopher-buss/eslint-config
christopher-buss-eslint-config-96f11ee/src/oxlint/configs/react.ts
roblox-ts
.ts
import { GLOB_JSX, GLOB_TSX } from "../../globs.ts"; import type { ReactRuleOptions } from "../../rules/react.ts"; import { reactRules } from "../../rules/react.ts"; import type { ConfigSettings, OptionsFiles, OptionsHasRoblox, OptionsOverrides, } from "../../types.ts"; import type { OxlintRules, TypedOxlintConfigI...
746
christopher-buss/eslint-config
christopher-buss-eslint-config-96f11ee/src/rules/test.ts
roblox-ts
.ts
import type { OptionsHasRoblox, OptionsIsInEditor, OptionsStylistic, TypedFlatConfigItem, } from "../types.ts"; export interface JestRuleOptions extends OptionsHasRoblox, OptionsIsInEditor, OptionsStylistic { extended?: boolean; } export interface VitestRuleOptions extends OptionsIsInEditor, OptionsStylistic { ...
2,837
sfr-development/Lua-Obfuscator-Clyde-Protection
sfr-development-Lua-Obfuscator-Clyde-Protection-e56f368/src/cli/vm-test.ts
roblox-ts
.ts
#!/usr/bin/env node import { readFileSync } from "fs"; import { join } from "path"; import { lex } from "../lexer/Lexer.js"; import { parse } from "../parser/Parser.js"; import { obfuscate } from "../obfuscator/Obfuscator.js"; import { compile } from "../vm/Compiler.js"; import { runVM } from "../vm/vm-runner.js"; co...
2,297
sfr-development/Lua-Obfuscator-Clyde-Protection
sfr-development-Lua-Obfuscator-Clyde-Protection-e56f368/src/obfuscator/Obfuscator.ts
roblox-ts
.ts
import type { Chunk, Statement, LastStatement, Expression, Var, Identifier, FuncName, Param, } from "../ast/types.js"; const KEYWORDS = new Set([ "and", "break", "continue", "do", "else", "elseif", "end", "export", "false", "for", "function", "if", "in", "local", "nil", "not", "or", "repeat", "re...
2,738
idkncc/better-react-components
idkncc-better-react-components-f5055b7/src/components/GridLayout.tsx
roblox-ts
.tsx
import React from "@rbxts/react"; import type { BindingVariants } from "../utils"; export type GridLayoutProps = BindingVariants<{ cellPadding?: UDim2 cellSize?: UDim2 cellAspectRatio?: number cellAspectType?: Enum.AspectType cellAspectAxis?: Enum.DominantAxis startCorner?: Enum.StartCorner ...
251
idkncc/better-react-components
idkncc-better-react-components-f5055b7/src/components/Image.ts
roblox-ts
.ts
import { BaseComponent } from "../helpers"; import { ColorOrHex, resolveColor3 } from "../utils"; import { mapBinding } from "@rbxts/pretty-react-hooks"; export interface ImageRect { offset: Vector2; size: Vector2; } export interface ImageProps { image?: string, imageColor?: ColorOrHex, imageTran...
198
idkncc/better-react-components
idkncc-better-react-components-f5055b7/src/components/ListLayout.tsx
roblox-ts
.tsx
import React from "@rbxts/react"; import { BindingVariants, resolveUDim } from "../utils"; export type ListLayoutProps = BindingVariants<{ padding?: number | UDim direction?: Enum.FillDirection order?: Enum.SortOrder horizontalAlign?: Enum.HorizontalAlignment verticalAlign?: Enum.VerticalAlignment...
221
idkncc/better-react-components
idkncc-better-react-components-f5055b7/src/components/ScrollingFrame.ts
roblox-ts
.ts
import Object from "@rbxts/object-utils"; import BaseComponent from "../helpers/BaseComponent"; import { resolveColor3 } from "../utils"; import { getBindingValue, mapBinding } from "@rbxts/pretty-react-hooks"; import type { InstanceAttributes } from "@rbxts/react"; export type ScrollingFrameProps = { automaticC...
591
idkncc/better-react-components
idkncc-better-react-components-f5055b7/src/helpers/BaseComponent.tsx
roblox-ts
.tsx
import React from "@rbxts/react"; import ExpandableComponent from "./ExpandableComponent"; import { ColorOrHex, ResolvableAnchorPoint, resolveAnchorPoint, resolveUDim } from "../utils"; import { getBaseColor, Gradient, GradientElement } from "./Gradient"; import type { InstanceProps } from "@rbxts/react"; export typ...
1,132
idkncc/better-react-components
idkncc-better-react-components-f5055b7/src/helpers/ExpandableComponent.ts
roblox-ts
.ts
import React, { ForwardedRef, InstanceProps, ReactChild, ReactNode } from "@rbxts/react"; import Object from "@rbxts/object-utils"; import { BindingVariants as BindingVariantsUtils, flat, ReactProps } from "../utils"; /** @deprecated import from `../utils`, not from here */ export type BindingVariants<T extends objec...
902
idkncc/better-react-components
idkncc-better-react-components-f5055b7/src/helpers/Gradient.tsx
roblox-ts
.tsx
import React, { Binding } from "@rbxts/react"; import { ColorOrHex, resolveColor3 } from "../utils"; import { BindingOrValue, getBindingValue, mapBinding } from "@rbxts/pretty-react-hooks"; export type Gradient = Array<ColorOrHex> | Array<ColorSequenceKeypoint> | ColorSequence export function createColorSequence(va...
520
idkncc/better-react-components
idkncc-better-react-components-f5055b7/src/helpers/TextComponent.ts
roblox-ts
.ts
import BaseComponent from "./BaseComponent"; import { ColorOrHex, resolveColor3 } from "../utils"; import { mapBinding } from "@rbxts/pretty-react-hooks"; import type { InferEnumNames, InstanceEvent } from "@rbxts/react"; export type TextComponentInstance = TextLabel | TextButton | TextBox export type TextComponentP...
439
idkncc/better-react-components
idkncc-better-react-components-f5055b7/src/stories/App.ts
roblox-ts
.ts
import React from "@rbxts/react"; import { Frame } from ".."; // @rbxts/better-react-components declare const _G: Record<string, unknown>; _G.__DEV__ = true; export function App(props: { children: React.ReactNode }) { return React.createElement( Frame, { size: UDim2.fromScale(1, 1), noBackground:...
90
idkncc/better-react-components
idkncc-better-react-components-f5055b7/src/stories/basics/1_helloworld.story.tsx
roblox-ts
.tsx
import React from "@rbxts/react"; import { Text } from "../.."; // @rbxts/better-react-components import { App } from "../App"; import { hoarcekat } from "@rbxts/pretty-react-hooks"; import { CatppuccinLatte } from "../utils"; export = hoarcekat(() => { return ( <App> <Text te...
185
idkncc/better-react-components
idkncc-better-react-components-f5055b7/src/stories/basics/2_padding.story.tsx
roblox-ts
.tsx
import React from "@rbxts/react"; import { AnchorPoints, Frame, Text } from "../.."; // @rbxts/better-react-components import { hoarcekat } from "@rbxts/pretty-react-hooks"; import { App } from "../App"; export = hoarcekat(() => { return ( <App> <Text text={"red - parent\nblue...
329
idkncc/better-react-components
idkncc-better-react-components-f5055b7/src/stories/basics/3_cornerRadius.story.tsx
roblox-ts
.tsx
import React from "@rbxts/react"; import { AnchorPoints, Frame } from "../.."; // @rbxts/better-react-components import { hoarcekat } from "@rbxts/pretty-react-hooks"; import { App } from "../App"; export = hoarcekat(() => { return ( <App> <Frame position={UDim2.fromScale(.5, ....
136
idkncc/better-react-components
idkncc-better-react-components-f5055b7/src/stories/basics/5_flexItem.story.tsx
roblox-ts
.tsx
import React, { useBinding } from "@rbxts/react"; import { Frame, Helpers, ListLayout } from "../../index"; // @rbxts/better-react-components import { hoarcekat } from "@rbxts/pretty-react-hooks"; import { App } from "../App"; // const { calculateAspectRatio } = Helpers; export = hoarcekat(() => { return ( ...
255
idkncc/better-react-components
idkncc-better-react-components-f5055b7/src/stories/examples/sidebar.story.tsx
roblox-ts
.tsx
import React from "@rbxts/react"; import { AnchorPoints, Button, Frame, ListLayout } from "../.."; // @rbxts/better-react-components import { App } from "../App"; import { hoarcekat } from "@rbxts/pretty-react-hooks"; import { CatppuccinLatte } from "../utils"; function CoolButton(props: { text: string, onClick: () ...
405
idkncc/better-react-components
idkncc-better-react-components-f5055b7/src/stories/examples/textBox.story.tsx
roblox-ts
.tsx
import React from "@rbxts/react"; import { hoarcekat } from "@rbxts/pretty-react-hooks"; import { App } from "../App"; import { AnchorPoints, TextBox } from "../.."; // @rbxts/better-react-components import { CatppuccinLatte } from "../utils"; export = hoarcekat(() => { return ( <App> <TextB...
249
idkncc/better-react-components
idkncc-better-react-components-f5055b7/src/stories/tests/bindings.story.tsx
roblox-ts
.tsx
import React, { useBinding } from "@rbxts/react"; import { Button, Frame, GridLayout, Text } from "../.."; // @rbxts/better-react-components import { hoarcekat } from "@rbxts/pretty-react-hooks"; import { CatppuccinLatte } from "../utils"; export = hoarcekat(() => { const [count, setCount] = useBinding(0); ...
393
idkncc/better-react-components
idkncc-better-react-components-f5055b7/src/stories/tests/context.story.tsx
roblox-ts
.tsx
import React, { Binding, useMemo } from "@rbxts/react"; import { Players } from "@rbxts/services"; import { Helpers } from "../.."; // @rbxts/better-react-components import { App } from "../App"; import { hoarcekat, joinAnyBindings } from "@rbxts/pretty-react-hooks"; const BaseComponent = Helpers.BaseComponent; typ...
382
idkncc/better-react-components
idkncc-better-react-components-f5055b7/src/stories/tests/gradients.story.tsx
roblox-ts
.tsx
import React from "@rbxts/react"; import { Button, Frame, ListLayout, resolveColor3Value, Text } from "../.."; // @rbxts/better-react-components import { App } from "../App"; import { hoarcekat } from "@rbxts/pretty-react-hooks"; import { brighten, useMotion } from "../utils"; // bindings example: function ButtonWi...
932
idkncc/better-react-components
idkncc-better-react-components-f5055b7/src/stories/tests/refs.story.tsx
roblox-ts
.tsx
import React, { useEffect, useRef, useState } from "@rbxts/react"; import { AnchorPoints, Text } from "../.."; // @rbxts/better-react-components import { App } from "../App"; import { hoarcekat } from "@rbxts/pretty-react-hooks"; export = hoarcekat(() => { const [textSizes, setTextSizes] = useState(new Vector2()...
252
idkncc/better-react-components
idkncc-better-react-components-f5055b7/src/stories/utils.ts
roblox-ts
.ts
import { useEventListener } from "@rbxts/pretty-react-hooks"; import { createMotion, Motion, MotionGoal } from "@rbxts/ripple"; import { Binding, useBinding, useMemo } from "@rbxts/react"; import { RunService } from "@rbxts/services"; export function useMotion(initialValue: number): LuaTuple<[Binding<number>, Motion]>...
967
idkncc/better-react-components
idkncc-better-react-components-f5055b7/src/utils.ts
roblox-ts
.ts
// tl t tr // cl c cr // bl b br import { Binding, type InferEnumNames, InstanceChangeEvent, InstanceEvent, InstanceProps, Key, ReactNode, RefObject, } from "@rbxts/react"; import { BindingOrValue, isBinding, mapBinding } from "@rbxts/pretty-react-hooks"; export type BindingVariants<T ...
884
yoits9090/plumber
yoits9090-plumber-79f7ff7/src/client/emulator-timeline.ts
roblox-ts
.ts
//!native import { UserInputService } from "@rbxts/services"; export type EmulatorTimelineLane = | "SCHED" | "CPU" | "VI" | "RSP" | "RASTER" | "RESOLVE" | "UPSCALE" | "UPLOAD" | "AUDIO"; interface TimelineEvent { readonly lane: EmulatorTimelineLane; readonly startedAt: num...
2,194
yoits9090/plumber
yoits9090-plumber-79f7ff7/src/client/movement-lab.ts
roblox-ts
.ts
// Archived prototype module. It is intentionally not a `.client.ts` entrypoint: // when a local ROM is embedded, only the real N64 frontend should execute. import { AssetService, Players, RunService, UserInputService } from "@rbxts/services"; import { PlumberAction, PlumberSimulation, PlumberState, COU...
8,398
yoits9090/plumber
yoits9090-plumber-79f7ff7/src/client/n64-frontend.ts
roblox-ts
.ts
//!native import { AssetService, Players, UserInputService } from "@rbxts/services"; /** N64 controller button bits, in the order used by the PIF controller packet. */ export const N64Button = { A: 0x8000, B: 0x4000, Z: 0x2000, Start: 0x1000, DPadUp: 0x0800, DPadDown: 0x0400, DPadLeft: 0x0...
3,454
yoits9090/plumber
yoits9090-plumber-79f7ff7/src/client/parallel-raster/parallel-raster-bench.client.ts
roblox-ts
.ts
//!native import { Players, RunService } from "@rbxts/services"; interface BenchWork { frameId: number; workerId: number; iterations: number; seed: number; } interface BenchResult { frameId: number; workerId: number; value: number; } const ENABLE_PARALLEL_BENCHMARK = true; const WORKERS ...
1,068