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 |
|---|---|---|---|---|---|
BrookenRecord/studio-activity | BrookenRecord-studio-activity-2d05cc2/plugin/src/PresenceManager/ProfileStore/init.luau | luau | .luau | local Plugin = script:FindFirstAncestor("StudioActivity")
local createProfileStore = require(script.createProfileStore)
local createSingleton = require(Plugin.Source.Common.createSingleton)
export type ProfileStore = createProfileStore.ProfileStore
export type Profile = createProfileStore.Profile
return table.freeze... | 69 |
BrookenRecord/studio-activity | BrookenRecord-studio-activity-2d05cc2/plugin/src/PresenceManager/ProfileStore/presets.luau | luau | .luau | local Plugin = script:FindFirstAncestor("StudioActivity")
local Packages = Plugin.Packages
local Foundation = require(Packages.Foundation)
local BuildContext = require(script.Parent.BuildContext)
local Constants = require(Plugin.Source.Common.Constants)
local createPresenceManager = require(Plugin.Source.PresenceMana... | 627 |
BrookenRecord/studio-activity | BrookenRecord-studio-activity-2d05cc2/plugin/src/PresenceManager/init.luau | luau | .luau | local Plugin = script:FindFirstAncestor("StudioActivity")
local BuildVars = require(Plugin.Source.BuildVars)
local DiscordApi = require(Plugin.Source.Api.Discord)
local createPresenceManager = require(script.createPresenceManager)
local createSingleton = require(Plugin.Source.Common.createSingleton)
export type Prese... | 141 |
BrookenRecord/studio-activity | BrookenRecord-studio-activity-2d05cc2/plugin/src/QRCode/ErrorCorrection.luau | luau | .luau | export type Level = "Low" | "Medium" | "Quartile" | "High"
local NUMERIC_LEVEL: { [Level]: number } = {
Low = 1,
Medium = 2,
Quartile = 3,
High = 4,
}
local function toNumber(level: Level): number
return NUMERIC_LEVEL[level]
end
return {
Low = "Low" :: "Low",
Medium = "Medium" :: "Medium",
Quartile = "Quarti... | 134 |
BrookenRecord/studio-activity | BrookenRecord-studio-activity-2d05cc2/plugin/src/QRCode/QRCodeDisplay.luau | luau | .luau | local AssetService = game:GetService("AssetService")
local Plugin = script:FindFirstAncestor("StudioActivity")
local Packages = Plugin.Packages
local Foundation = require(Packages.Foundation)
local React = require(Packages.React)
local ErrorCorrection = require(script.Parent.ErrorCorrection)
local getResolutionScale... | 552 |
BrookenRecord/studio-activity | BrookenRecord-studio-activity-2d05cc2/plugin/src/QRCode/init.luau | luau | .luau | local ErrorCorrection = require(script.ErrorCorrection)
local QRCodeDisplay = require(script.QRCodeDisplay)
export type ErrorCorrectionLevel = ErrorCorrection.Level
export type QRCodeDisplayProps = QRCodeDisplay.Props
return {
QRCodeDisplay = QRCodeDisplay,
ErrorCorrection = ErrorCorrection,
}
| 62 |
BrookenRecord/studio-activity | BrookenRecord-studio-activity-2d05cc2/plugin/src/QRCode/renderMatrixToImage.luau | luau | .luau | --[[
Writes a QR code matrix as pixel data onto an EditableImage.
Foreground modules are drawn with the given color and alpha.
Background modules are fully transparent.
]]
local function renderMatrixToImage(
image: EditableImage,
imageSize: number,
matrix: { [number]: { [number]: number } },
color: Color3,
alph... | 387 |
BrookenRecord/studio-activity | BrookenRecord-studio-activity-2d05cc2/plugin/src/QRCode/useQRCodeMatrix.luau | luau | .luau | local Plugin = script:FindFirstAncestor("StudioActivity")
local Packages = Plugin.Packages
local QRCode = require(Packages.QRCode)
local React = require(Packages.React)
local ErrorCorrection = require(script.Parent.ErrorCorrection)
export type Matrix = { [number]: { [number]: number } }
local function useQRCodeMatr... | 128 |
BrookenRecord/studio-activity | BrookenRecord-studio-activity-2d05cc2/plugin/src/StudioPresence.storybook.luau | luau | .luau | local Plugin = script:FindFirstAncestor("StudioActivity")
local Packages = Plugin.Packages
local Foundation = require(Packages.Foundation)
local React = require(Packages.React)
local ReactRoblox = require(Packages.ReactRoblox)
local ContextProviders = require(Plugin.Source.Common.ContextProviders)
local MockPlugin = ... | 229 |
BrookenRecord/studio-activity | BrookenRecord-studio-activity-2d05cc2/plugin/src/Telemetry/TelemetryOptOutDialog.luau | luau | .luau | local Plugin = script:FindFirstAncestor("StudioActivity")
local Packages = Plugin.Packages
local Foundation = require(Packages.Foundation)
local React = require(Packages.React)
local ReactCharm = require(Packages.ReactCharm)
local ReactUtils = require(Packages.ReactUtils)
local Sift = require(Packages.Sift)
local Loc... | 890 |
BrookenRecord/studio-activity | BrookenRecord-studio-activity-2d05cc2/plugin/src/Telemetry/Types.luau | luau | .luau | --[[
Re-exports protobuf-generated telemetry event constructors.
Callers use this module instead of importing from the codegen path directly:
local Types = require(Telemetry.Types)
local event = { type = "pluginLoaded", value = Types.PluginLoaded.new({ ... }) }
]]
local Plugin = script:FindFirstAncestor("Studi... | 428 |
BrookenRecord/studio-activity | BrookenRecord-studio-activity-2d05cc2/plugin/src/Telemetry/getAnonymizedUserId.luau | luau | .luau | local HttpService = game:GetService("HttpService")
local Plugin = script:FindFirstAncestor("StudioActivity")
local LocalStorageStore = require(Plugin.Source.Plugin.LocalStorageStore)
--[[
The events we send to the backend need some persistent identifier so we can
group them by install. Keep this value independent ... | 194 |
BrookenRecord/studio-activity | BrookenRecord-studio-activity-2d05cc2/plugin/src/Testing/MockPlugin.luau | luau | .luau | local MockPlugin = {}
MockPlugin.__index = MockPlugin
function MockPlugin.new(): Plugin
local self = {
_settings = {},
}
return setmetatable(self, MockPlugin) :: any
end
function MockPlugin:GetSetting(settingName: string)
return self._settings[settingName]
end
function MockPlugin:SetSetting(settingName: strin... | 119 |
BrookenRecord/studio-activity | BrookenRecord-studio-activity-2d05cc2/plugin/src/UserSettings/DefaultSettings.luau | luau | .luau | export type SettingType = "checkbox" | "dropdown" | "number"
local SettingType = {
Checkbox = "checkbox" :: "checkbox",
Dropdown = "dropdown" :: "dropdown",
Number = "number" :: "number",
}
export type SettingGroup = "UI" | "Telemetry"
local SettingGroup = {
UI = "UI" :: SettingGroup,
Telemetry = "Telemetry" ::... | 488 |
BrookenRecord/studio-activity | BrookenRecord-studio-activity-2d05cc2/plugin/src/UserSettings/SettingRow.luau | luau | .luau | local Plugin = script:FindFirstAncestor("StudioActivity")
local Packages = Plugin.Packages
local Foundation = require(Packages.Foundation)
local React = require(Packages.React)
local ReactCharm = require(Packages.ReactCharm)
local Sift = require(Packages.Sift)
local DefaultSettings = require(script.Parent.DefaultSett... | 772 |
BrookenRecord/studio-activity | BrookenRecord-studio-activity-2d05cc2/plugin/src/UserSettings/SettingsModal.luau | luau | .luau | local Plugin = script:FindFirstAncestor("StudioActivity")
local Packages = Plugin.Packages
local Foundation = require(Packages.Foundation)
local React = require(Packages.React)
local ReactUtils = require(Packages.ReactUtils)
local SettingsView = require(script.Parent.SettingsView)
local Text = Foundation.Text
local ... | 281 |
BrookenRecord/studio-activity | BrookenRecord-studio-activity-2d05cc2/plugin/src/UserSettings/SettingsView.luau | luau | .luau | local Plugin = script:FindFirstAncestor("StudioActivity")
local Packages = Plugin.Packages
local Foundation = require(Packages.Foundation)
local React = require(Packages.React)
local ReactUtils = require(Packages.ReactUtils)
local Sift = require(Packages.Sift)
local DefaultSettings = require(script.Parent.DefaultSett... | 520 |
BrookenRecord/studio-activity | BrookenRecord-studio-activity-2d05cc2/plugin/src/UserSettings/UserSettingsStore.luau | luau | .luau | local Plugin = script:FindFirstAncestor("StudioActivity")
local Packages = Plugin.Packages
local t = require(Packages.t)
local createPluginSettingsStore = require(Plugin.Source.Plugin.createPluginSettingsStore)
local createSingleton = require(Plugin.Source.Common.createSingleton)
local defaultSettings = require(scrip... | 214 |
BrookenRecord/studio-activity | BrookenRecord-studio-activity-2d05cc2/plugin/src/jest.config.luau | luau | .luau | return {
testPathIgnorePatterns = { "Packages" },
}
| 13 |
BrookenRecord/studio-activity | BrookenRecord-studio-activity-2d05cc2/project.luau | luau | .luau | local path = require("@std/path")
return {
REPO_PATH = path.resolve("."),
PLUGIN_PATH = path.resolve("./plugin"),
BUILD_PATH = path.resolve("./plugin/build"),
BUILD_CACHE_PATH = path.resolve("./plugin/build/build-cache.json"),
BUILD_VARS_PATH = path.resolve("./plugin/src/BuildVars/BuildVars.json"),
PACKAGES_PATH... | 266 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/App.luau | luau | .luau | local plugin = script:FindFirstAncestorWhichIsA("Plugin")
local Players = game:GetService("Players")
local ContentProvider = game:GetService("ContentProvider")
local UserService = game:GetService("UserService")
local MarketplaceService = game:GetService("MarketplaceService")
local HttpService = game:GetService("HttpSe... | 7,330 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/ClientFalbackApp/init.luau | luau | .luau | -- If the user is play-testing on the client, fallback to this since the plugin won't work
local plugin = script:FindFirstAncestorOfClass("Plugin")
local ClientFallbackApp = {}
ClientFallbackApp.__index = ClientFallbackApp
local Theme = require(script.Parent.UI.Theme).global
local StyleState = script.Parent.UI.Style... | 416 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/DeserializerState.luau | luau | .luau | --!strict
-- Stuff for deserialization with buffers.
local plugin = script:FindFirstAncestorOfClass("Plugin")
local DESERIALIZATION_KEY = "DataDelve_Deserialization"
type PlaceSettings = {
-- path to the default deserializer
defaultDeserializer: {string}?,
}
type DeserializationSettings = {
[--[[placeId:]] stri... | 957 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/ExportImportHelper.luau | luau | .luau | local plugin = script:FindFirstAncestorWhichIsA("Plugin")
local SelectionService = game:GetService("Selection")
local StudioService = game:GetService("StudioService")
local HttpService = game:GetService("HttpService")
local ScriptEditorService = game:GetService("ScriptEditorService")
local RunService = game:GetServic... | 627 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/History.luau | luau | .luau | -- History for datastore connections and keys
local MAIN_HISTORY_KEY = "DataDelveHistory alpha 1"
local Types = require(script.Parent.Types)
local History = {}
History.__index = History
function History.new(gameId: number)
local self = setmetatable({
gameId = tostring(gameId),
}, History)
-- Sorted by most re... | 906 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/Pages.luau | luau | .luau | -- Wrapper for page APIs
-- TBH this causes too much indirection, kind of annoying to use
local Pages = {}
Pages.__index = Pages
type PagesState = unknown
type PagesInterface = {
initialize: () -> (PagesState?, string?),
next: (PagesState) -> { items: { unknown }?, isFinished: boolean } | { error: string },
}
funct... | 767 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/Session.luau | luau | .luau | -- Main interface with datastores
local Types = require(script.Parent.Types)
local Pages = require(script.Parent.Pages)
local DataStoreService = game:GetService("DataStoreService")
local Settings = require(script.Parent.Settings)
local Session = {}
Session.__index = Session
-- Static
function Session.new()
local... | 2,392 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/Settings.luau | luau | .luau | --!strict
local ViewerTypes = require(script.Parent.UI.Viewers.Types)
local BufferViewerTypes = require(script.Parent.UI.BufferViewers.Types)
local MAIN_SETTINGS_KEY = "DataDelveSetting alpha 1"
export type SettingsData = {
themePreset: string,
themeAccent: string,
hideGameName: boolean,
highlightColors: "Defaul... | 378 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/Transactor.luau | luau | .luau | --!strict
export type Transaction = () -> ()
export type TransactorImplementation = {
__index: TransactorImplementation,
new: () -> Transactor,
destroy: (Transactor) -> (),
transact: (Transactor, Transaction) -> boolean,
}
export type TransactorFields = {
locked: boolean,
lockedChanged: RBXScriptSignal,
_lo... | 288 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/Types.luau | luau | .luau | --!strict
-- I was going to use this more, but I forgot about it. Now it houses these two types.
type OldDataStoreConnectionBase = {
name: string,
scope: string?,
isOrdered: boolean,
}
type OldAllScopesDataStoreConnection = OldDataStoreConnectionBase & {
isOrdered: false,
allScopes: true,
}
type OldNormalDataSto... | 292 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/BufferViewers/Deserializer.luau | luau | .luau | --!strict
local SelectionService = game:GetService("Selection")
local ScriptEditorService = game:GetService("ScriptEditorService")
local Types = require(script.Parent.Types)
local ViewerTypes = require(script.Parent.Parent.Viewers.Types)
local UIMessages = require(script.Parent.Parent.UIMessages)
local Theme = requir... | 2,767 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/BufferViewers/Hex/DataInspector.luau | luau | .luau | --!strict
-- I will document later. For now, good luck! 🫡
export type DataInspectorSizing = "fillContainer" | "fillContainerY"
export type DataInspectorNewParams = {
container: GuiObject,
-- Default is "fillContainer"
sizing: DataInspectorSizing?,
theme: ThemeData,
}
export type ThemeData = {
background: Color... | 2,968 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/BufferViewers/Hex/FormProvider/init.luau | luau | .luau | --!strict
local HexEditor = require(script.Parent.HexEditor)
local Validators = require(script.Parent.Parent.Parent.Parent.Validators)
local constrainTextBoxStyleState = require(script.Parent.Parent.Parent.Utilities.constrainTextBoxStyleState)
local StyleState = script.Parent.Parent.Parent.StyleState
local LabelStyl... | 1,167 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/BufferViewers/Hex/HexEditor.luau | luau | .luau | --!strict
-- I will document later. For now, good luck! 🫡
-- Parameters when using HexEditor.new(container, params, dependencies):
-- "fillContainer" makes the hex editor fill up the entire container (UDim2.fromScale(1, 1))
-- "fillContainerY" makes the hex hex editor fill up the Y-axis, but take up only as much spa... | 15,219 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/BufferViewers/Hex/init.luau | luau | .luau | --!strict
local Theme = require(script.Parent.Parent.Theme)
local Types = require(script.Parent.Types)
local HexEditor = require(script.HexEditor)
local DataInspector = require(script.DataInspector)
local FormProvider = require(script.FormProvider)
export type HexImplementation = {
__index: HexImplementation,
from... | 1,373 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/BufferViewers/Types.luau | luau | .luau | --!strict
local UIMessages = require(script.Parent.Parent.UIMessages)
local Theme = require(script.Parent.Parent.Theme)
export type BufferViewerMode = "Hex" | "Deserializer"
export type BufferViewerFromOptions = {
uiMessages: UIMessages.UIMessages,
theme: Theme.Theme,
inputReceiver: GuiObject,
widget: PluginGui,... | 187 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/ModalState.luau | luau | .luau | --!strict
-- Keeps track if the UI has a modal or not.
type ModalStateImplementation = {
__index: ModalStateImplementation,
new: () -> ModalState,
push: (ModalState) -> (),
pop: (ModalState) -> (),
wrap: <T>(ModalState, action: () -> T) -> T,
pushId: (ModalState, id: string) -> (),
popId: (ModalState, id... | 357 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/PopupHelper/init.luau | luau | .luau | -- Helps with popup stuff
-- `clamp` clamps an object so it doesn't go out of bounds of a container
-- `attach` attach an object to another object so it moves with that object
-- `modal` turns an object into a modal so it blocks input from other objects
-- `attach` and `modal` return objects that should be destroyed on... | 1,956 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/StyleState/BackgroundStyleState.luau | luau | .luau | local TweenService = game:GetService("TweenService")
local StyleStateHelper = require(script.Parent.StyleStateHelper)
local BackgroundStyleState = {}
BackgroundStyleState.__index = BackgroundStyleState
type BackgroundStyleStateOptions = {
style: "default" | "popup" | "image" | "header",
}
function BackgroundStyleSta... | 373 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/StyleState/BreadcrumbsStyleState/init.luau | luau | .luau | -- Handles bread crumbs
-- If the breadcrumbs is too long for the window, it will switch into a dropdown
local TweenService = game:GetService("TweenService")
local StyleStateHelper = require(script.Parent.StyleStateHelper)
local ButtonStyleState = require(script.Parent.ButtonStyleState)
local SelectStyleState = requi... | 2,346 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/StyleState/ButtonStyleState.luau | luau | .luau | local StyleStateHelper = require(script.Parent.StyleStateHelper)
local ButtonStyleState = {}
ButtonStyleState.__index = ButtonStyleState
export type ButtonStyle = "primary" | "secondary" | "transparent" | "dormant" | "input"
export type ButtonStyleStateFromOptions = {
style: ButtonStyle | nil,
disabled: boolean?,
}... | 1,361 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/StyleState/Input/CheckboxStyleState.luau | luau | .luau | local TweenService = game:GetService("TweenService")
local StyleStateHelper = require(script.Parent.Parent.StyleStateHelper)
local ButtonStyleState = require(script.Parent.Parent.ButtonStyleState)
local CheckboxStyleState = {}
CheckboxStyleState.__index = CheckboxStyleState
export type CheckboxOptions = {
default: b... | 778 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/StyleState/Input/DatePickerStyleState.luau | luau | .luau | --!strict
-- This wraps over TextBox
-- Maybe later, can adjust for other locales.
-- Also could add a calender popup.
-- Use :getValue to get the value (unix timestamp milliseconds)
-- Valid Formats:
-- MM/DD/YY
-- MM-DD-YY
-- Month Day, Year
-- Month Day
-- ISO 8601
local TextBoxStyleState = require(script.Parent... | 1,661 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/StyleState/Input/OverlayTextBoxStyleState.luau | luau | .luau | --!strict
-- Only works with text box that are not multiline
-- Does not support text boxes with UIPadding that uses Scale
local TextService = game:GetService("TextService")
local Players = game:GetService("Players")
local StyleStateHelper = require(script.Parent.Parent.StyleStateHelper)
local Theme = require(script... | 1,201 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/StyleState/Input/SelectStyleState/init.luau | luau | .luau | --!strict
local TextService = game:GetService("TextService")
local TweenService = game:GetService("TweenService")
local Theme = require(script.Parent.Parent.Parent.Theme)
local PopupHelper = require(script.Parent.Parent.Parent.PopupHelper)
local StyleStateHelper = require(script.Parent.Parent.StyleStateHelper)
local... | 2,305 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/StyleState/Input/ShortcutsTextBoxStyleState/init.luau | luau | .luau | --!strict
-- This handles "shortcuts text box" which are text box with shortcuts that auto replace special sequences.
-- Shortcuts:
-- @username: This will replace @username with the id of the user with that name
-- Use :getText(errorHandler) to get the text instead of textBox.Text
-- Must pass in a function to han... | 662 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/StyleState/Input/ShortcutsTextBoxStyleState/parseShortcuts.luau | luau | .luau | --!strict
export type ShortcutType = "normal" | "escapedNormal" | "mention"
export type ShortcutPiece = {
type: ShortcutType,
content: string,
-- "escapedNormal" will always start with \\ which should be ignored
-- "mention" will always start with @ which should be ignored
}
export type ShortcutsString = { Shortc... | 1,006 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/StyleState/Input/SwitchStyleState.luau | luau | .luau | --!strict
-- Same as Checkbox, just styled differently
local StyleStateHelper = require(script.Parent.Parent.StyleStateHelper)
local ButtonStyleState = require(script.Parent.Parent.ButtonStyleState)
local SwitchStyleState = {}
SwitchStyleState.__index = SwitchStyleState
export type SwitchOptions = {
default: boolea... | 579 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/StyleState/Input/TextBoxStyleState/init.luau | luau | .luau | local PopupHelper = require(script.Parent.Parent.Parent.PopupHelper)
local StyleStateHelper = require(script.Parent.Parent.StyleStateHelper)
local TextBoxStyleState = {}
TextBoxStyleState.__index = TextBoxStyleState
function TextBoxStyleState.from(theme: any, textBox: TextBox & { UIStroke: UIStroke })
local self = s... | 1,112 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/StyleState/LabelStyleState.luau | luau | .luau | local TweenService = game:GetService("TweenService")
local StyleStateHelper = require(script.Parent.StyleStateHelper)
local LabelStyleState = {}
LabelStyleState.__index = LabelStyleState
export type LabelStyleStateFromOptions = {
style: "text" | "error" | nil,
emphasis: "normal" | "light" | nil
}
function LabelStyl... | 574 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/StyleState/LoadMoreListStyleState.luau | luau | .luau | -- Provide a `createItemStyleState(...)` function.
-- Other consumers of the StyleState can then call `:add(...)` which will use the `createItemStyleState` to add a StyleState into the list.
-- `Pages` does this when a new page is loaded.
--
-- StyleStates produced from `createItemStyleState` can have method `setSelect... | 940 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/StyleState/ScrollingFrameStyleState.luau | luau | .luau | --!strict
local TweenService = game:GetService("TweenService")
local StyleStateHelper = require(script.Parent.StyleStateHelper)
local ScrollingFrame = {}
ScrollingFrame.__index = ScrollingFrame
function ScrollingFrame.from(theme, scrollingFrame: ScrollingFrame)
local self = setmetatable({
scrollingFrame = scrollin... | 190 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/StyleState/SeparatorStyleState.luau | luau | .luau | local TweenService = game:GetService("TweenService")
local StyleStateHelper = require(script.Parent.StyleStateHelper)
local SeparatorStyleState = {}
SeparatorStyleState.__index = SeparatorStyleState
function SeparatorStyleState.from(theme, separator: Frame)
local self = setmetatable({
separator = separator,
them... | 263 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/StyleState/StyleStateHelper.luau | luau | .luau | export type TransitionSpeed = "fast" | "slow" | "instant" | "veryFast" | "superDuperFast" | nil
export type StyleState = {
from: (theme: any, object: GuiObject, ...any) -> StyleState,
update: (StyleState, TransitionSpeed) -> (),
destroy: (StyleState, completely: boolean?) -> (),
}
local TweenService = game:GetServ... | 550 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/StyleState/StyleStateWrapper.luau | luau | .luau | -- Utility class useful for one-off style states.
-- See `UI.createUserCard` for example
local StyleStateHelper = require(script.Parent.StyleStateHelper)
local StyleStateWrapper = {}
StyleStateWrapper.__index = StyleStateWrapper
export type StyleStateWrapperOptions = {
autoFollowTheme: boolean?, -- default: true
o... | 352 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/StyleState/TabsStyleState/init.luau | luau | .luau | local TweenService = game:GetService("TweenService")
local StyleStateHelper = require(script.Parent.StyleStateHelper)
local ButtonStyleState = require(script.Parent.ButtonStyleState)
local TabsStyleState = {}
TabsStyleState.__index = TabsStyleState
function TabsStyleState.from(theme, frame: Frame)
local buttons = {}... | 736 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/StyleState/Utility/ConfirmDialogStyleState/init.luau | luau | .luau | -- TODO: should auto-follow theme when using.createDialog
local StyleStateHelper = require(script.Parent.Parent.StyleStateHelper)
local PopupHelper = require(script.Parent.Parent.Parent.PopupHelper)
local BackgroundStyleState = require(script.Parent.Parent.BackgroundStyleState)
local ButtonStyleState = require(script... | 734 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/StyleState/Utility/ContextMenuStyleState/init.luau | luau | .luau | -- TODO: should auto-follow theme when using.createMenu
local TweenService = game:GetService("TweenService")
local StyleStateHelper = require(script.Parent.Parent.StyleStateHelper)
local PopupHelper = require(script.Parent.Parent.Parent.PopupHelper)
local TRY_CLOSE_SUBMENU_DELAY = 0.275
local ContextMenuStyleState ... | 2,844 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/StyleState/Utility/LoadingBarStyleState/init.luau | luau | .luau | -- Should be used ephemerally
-- Example:
-- ```
-- local styleState = LoadingBarStyleState.from(theme, frame)
-- task.spawn(styleState.animate, styleState)
-- task.wait(5)
-- styleState:destroy()
-- ```
local Theme = require(script.Parent.Parent.Parent.Theme)
local GRADIENT_BILINEAR = NumberSequence.new({
NumberSe... | 684 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/StyleState/Utility/PopupFormStyleState/init.luau | luau | .luau | --!strict
local StyleStateHelper = require(script.Parent.Parent.StyleStateHelper)
local StyleStateWrapper = require(script.Parent.Parent.StyleStateWrapper)
local PopupHelper = require(script.Parent.Parent.Parent.PopupHelper)
local BackgroundStyleState = require(script.Parent.Parent.BackgroundStyleState)
local ButtonS... | 639 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/StyleState/Utility/SkeletonStyleState/init.luau | luau | .luau | -- Should be used ephemerally
-- Just apply this to any object.
-- Objects in the children that have attribute "SkeletonPlaceholder" will be styled.
-- If they also have "DeleteWithSkeleton" attribute they will be deleted when the skeleton is deleted.
--- Call :animate to animate the skeleton
local TweenService = ga... | 587 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/Theme/Oklab.luau | luau | .luau | local Oklab = {}
function Oklab.fromLinearSrgb(c: vector): vector
local l = 0.4122214708 * c.x + 0.5363325363 * c.y + 0.0514459929 * c.z;
local m = 0.2119034982 * c.x + 0.6806995451 * c.y + 0.1073969566 * c.z;
local s = 0.0883024619 * c.x + 0.2817188376 * c.y + 0.6299787005 * c.z;
local l_ = l ^ (1/3);
local m_ ... | 833 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/Theme/init.luau | luau | .luau | --!strict
local StudioSettings = settings().Studio
local Oklab = require(script.Oklab)
local Theme = {}
Theme.__index = Theme
Theme.accentHues = {
red = 0,
orange = 21,
yellow = 42,
yellowGreen = 72,
green = 115,
greenBlue = 140,
seaGreen = 165,
cyan = 190,
blue = 220,
purpleBlue = 235,
purple = 265,
pin... | 8,678 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/Tooltip/init.luau | luau | .luau | --!strict
local TextService = game:GetService("TextService")
local TweenService = game:GetService("TweenService")
local PopupHelper = require(script.Parent.PopupHelper)
local Tooltip = {}
Tooltip.__index = Tooltip
local FrameTemplate = script.FrameTemplate
local DropShadowTemplate = script.DropShadowTemplate
local ... | 1,717 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/UIMessages/init.luau | luau | .luau | -- Utility to send alerts/toasts
-- Layout manually calculated (no AutomaticSize).
local TweenService = game:GetService("TweenService")
local TextService = game:GetService("TextService")
local StyleState = script.Parent.StyleState
local PopupHelper = require(script.Parent.PopupHelper)
local StyleStateWrapper = requi... | 2,161 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/Utilities/TimestampHelper.luau | luau | .luau | --!strict
local TimestampHelper = {}
-- Guesses what time of timestamp a number is, or nil if it doesn't look like a timestamp
-- The second parameter is if the guess should be conservative and guess it's not a timestamp
-- more often.
function TimestampHelper.guessTimestampType(n: number, conservative: "conservative... | 315 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/Utilities/byteLengthToReadableString.luau | luau | .luau | --!strict
local giga = 10^9
local mega = 10^6
local kilo = 10^3
return function(bytes: number)
return tostring(bytes):reverse():gsub("(%d%d%d)", "%1,"):gsub(",$", ""):reverse()
end | 61 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/Utilities/checkTrulyVisible.luau | luau | .luau | --!strict
return function(object: GuiObject): boolean
local current: any = object
while current do
if (not current) or not current.Visible then
return false
end
current = current.Parent
if current:IsA("LayerCollector") then
break
elseif not current:IsA("GuiObject") then
return false
end
end
re... | 88 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/Utilities/constrainTextBoxStyleState.luau | luau | .luau | --!strict
-- Makes sure a TextBox matches a validator.
return function(textBoxStyleState, validators: { (string) -> (boolean, string?) })
textBoxStyleState.textBox:GetPropertyChangedSignal("Text"):Connect(function()
if textBoxStyleState.textBox.Text == "" then
textBoxStyleState:setError(nil :: string?):update("... | 142 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/Utilities/createTabSwitchGroup.luau | luau | .luau | --!strict
-- Makes it so when you press tab, it switches between the TextBoxes.
local checkTrulyVisible = require(script.Parent.checkTrulyVisible)
return function(textBoxes: { TextBox })
local currentSelected = nil
local currentConnection: RBXScriptConnection? = nil
for i, textBox in textBoxes do
-- Don't need... | 410 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/Utilities/disableFrameWhenModalAppears.luau | luau | .luau | -- `PopupHelper.modal` creates a frame to block input, but it does not block MouseMovement inputs.
-- To fix that, this utility function will detect when the input blocking frame of `PopupHelper.modal`
-- appears and disable `Interactable` for all the frames you give it. This will prevent MouseMovement
-- inputs from b... | 334 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/Utilities/getHighlightColors.luau | luau | .luau | -- Gets highlight colors for the TreeViewer. Depends on global state from `Settings`
-- to see if it should use the built-in theme or the script editors theme.
export type Colors = {
plain: Color3,
background: Color3,
hoverBackground: Color3,
selectBackground: Color3,
scrollbar: Color3,
mainAccent: Color3,
r... | 909 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/Utilities/lockObjectWithoutResize.luau | luau | .luau | --!strict
-- Sets the position of an object without triggering AutomaticSize resizing.
-- Assumes UIPadding only has offset padding.
-- EXAMPLE: This is used in the `Insert Into/After` menus for the expand button which is
-- positioned at the top right.
return function(
object: GuiObject,
container: GuiOb... | 240 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/Utilities/promptKeyValueForm.luau | luau | .luau | -- Form that has two fields (each one is optional, but you must have one field active)
-- Used in:
-- - Insert Into/After
-- - Insert for OrderedDataStore
local Assets = script.Parent.Parent.Assets
local StyleState = script.Parent.Parent.StyleState
local StyleStateWrapper = require(StyleState.StyleStateWrapper)
local... | 1,849 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/Utilities/showShadowOnScroll.luau | luau | .luau | return function(scrollingFrame: ScrollingFrame, shadow: Frame)
return scrollingFrame:GetPropertyChangedSignal("CanvasPosition"):Connect(function()
shadow.Visible = scrollingFrame.CanvasPosition.Y > 10
end)
end
| 45 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/Viewers/Code/CodeEditor.luau | luau | .luau | --!strict
local TextService = game:GetService("TextService")
local Types = require(script.Parent.Types)
export type NewOptions = {
theme: Types.Theme,
doLex: (source: string) -> {Token},
}
export type Token = {
kind: string,
start: number,
length: number,
}
type CodeEditorObject = Types.TextEditorObject & {
_... | 3,219 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/Viewers/Code/DumbEditor.luau | luau | .luau | --!strict
-- Editor with missing no highlighting or error capabilties.
local Types = require(script.Parent.Types)
export type NewOptions = {
theme: Types.Theme,
}
export type DumbEditorObject = Types.TextEditorObject & {
_textChanged: BindableEvent,
_activeErrorsChanged: BindableEvent,
_frame: ScrollingFrame,... | 916 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/Viewers/Code/Types.luau | luau | .luau | --!strict
export type Theme = {
padding: {top: number, left: number, bottom: number, right: number},
font: Font, -- should be monospace
textSize: number,
backgroundColor: Color3,
textColor: Color3,
disabledTextColor: Color3,
scrollbarThickness: number,
scrollbarColor: Color3,
tokenColors: {[string]: string},... | 301 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/Viewers/Code/init.luau | luau | .luau | --!strict
local Settings = require(script.Parent.Parent.Parent.Settings)
local Theme = require(script.Parent.Parent.Theme)
local UIMessages = require(script.Parent.Parent.UIMessages)
local json5 = require(script.Parent.Parent.Parent.json5)
local JSONHelper = require(script.Parent.Parent.Parent.JSONHelper)
local Type... | 2,306 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/Viewers/Types.luau | luau | .luau | --!strict
local JSONHelper = require(script.Parent.Parent.Parent.JSONHelper)
local Theme = require(script.Parent.Parent.Theme)
local UIMessages = require(script.Parent.Parent.UIMessages)
local ModalState = require(script.Parent.Parent.ModalState)
export type ViewerMode = "Tree" | "Code"
export type KeyInfo = {
Crea... | 615 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/Views/HistoryView.luau | luau | .luau | --!strict
local Theme = require(script.Parent.Parent.Theme)
local History = require(script.Parent.Parent.Parent.History)
local Types = require(script.Parent.Parent.Parent.Types)
local Assets = script.Parent.Parent.Assets
local StyleState = script.Parent.Parent.StyleState
local StyleStateHelper = require(StyleState.S... | 1,490 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/Views/OrderedDataStoreView/OrderedDataStoreKeyStyleState.luau | luau | .luau | local OrderedDataStoreKeyStyleState = {}
OrderedDataStoreKeyStyleState.__index = OrderedDataStoreKeyStyleState
function OrderedDataStoreKeyStyleState.from(theme, highlightColors, frame)
local self = setmetatable({
theme = theme,
frame = frame,
_highlightColors = highlightColors,
selecting = false,
_disabl... | 503 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/Views/OrderedDataStoreView/init.luau | luau | .luau | --!strict
local DESCENDING_ICON = "rbxassetid://17650920474"
local ASCENDING_ICON = "rbxassetid://17650919434"
local rfmt = require(script.Parent.Parent.Parent.rfmt)
local StyleState = script.Parent.Parent.StyleState
local Assets = script.Parent.Parent.Assets
local Settings = require(script.Parent.Parent.Parent.Set... | 3,886 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/Views/SearchView.luau | luau | .luau | --!strict
local TweenService = game:GetService("TweenService")
local Assets = script.Parent.Parent.Assets
local StyleState = script.Parent.Parent.StyleState
local Theme = require(script.Parent.Parent.Theme)
local PopupHelper = require(script.Parent.Parent.PopupHelper)
local ViewerTypes = require(script.Parent.Parent... | 1,590 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/Views/SettingsView/AccentColorButtonStyleState.luau | luau | .luau | local TweenService = game:GetService("TweenService")
local Theme = require(script.Parent.Parent.Parent.Theme)
local StyleStateHelper = require(script.Parent.Parent.Parent.StyleState.StyleStateHelper)
local ButtonStyleState = require(script.Parent.Parent.Parent.StyleState.ButtonStyleState)
local AccentColorButtonStyl... | 341 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/Views/SettingsView/init.luau | luau | .luau | --!strict
local SelectionService = game:GetService("Selection")
local ServerScriptService = game:GetService("ServerScriptService")
local ChangeHistoryService = game:GetService("ChangeHistoryService")
local rfmt = require(script.Parent.Parent.Parent.rfmt)
local StyleState = script.Parent.Parent.StyleState
local Asset... | 2,365 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/Views/VersionsView.luau | luau | .luau | --!strict
local DESCENDING_ICON = "rbxassetid://17650920474"
local ASCENDING_ICON = "rbxassetid://17650919434"
local rfmt = require(script.Parent.Parent.Parent.rfmt)
local StyleState = script.Parent.Parent.StyleState
local Assets = script.Parent.Parent.Assets
local Session = require(script.Parent.Parent.Parent.Sess... | 3,523 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/Widgets/BufferWidget.luau | luau | .luau | --!strict
local plugin = script:FindFirstAncestorOfClass("Plugin")
local StudioService = game:GetService("StudioService")
local Settings = require(script.Parent.Parent.Parent.Settings)
local UIMessages = require(script.Parent.Parent.UIMessages)
local Theme = require(script.Parent.Parent.Theme)
local Types = require(... | 1,470 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/Widgets/SingleKeyWidget.luau | luau | .luau | --!strict
-- This is a widget for a single key, used for "Open in New Widget"
local plugin = script:FindFirstAncestorOfClass("Plugin")
local HttpService = game:GetService("HttpService")
local Theme = require(script.Parent.Parent.Theme)
local Session = require(script.Parent.Parent.Parent.Session)
local Transactor = r... | 1,524 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/UI/init.luau | luau | .luau | local rfmt = require(script.Parent.rfmt)
local Types = require(script.Parent.Types)
local Theme = require(script.Theme)
local Validators = require(script.Parent.Validators)
local PopupHelper = require(script.PopupHelper)
local Tooltip = require(script.Tooltip)
local Assets = script.Assets
local StyleState = script.S... | 4,604 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/Validators.luau | luau | .luau | --!strict
export type Validator = (any) -> (boolean, string?) -- return 1: success, return 2: reason
local Validators: { [string]: Validator } = {}
local function isValidInteger(str: unknown): boolean
local number = tonumber(str)
if number then
local isValidInteger = (number == math.floor(number)) and number == n... | 687 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/main.server.luau | luau | .luau | --!strict
type App = {
new: (id: string) -> App,
toggleEnabled: (App) -> (),
getEnabled: (App) -> boolean,
enabledChanged: RBXScriptSignal,
}
local IS_CANARY = script.Parent.IsCanaryRelease.Value
local RunService = game:GetService("RunService")
local App = require(script.Parent.App) :: App
local ClientFallback... | 495 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/rfmt.luau | luau | .luau | -- Rich-Text ForMaT
-- Convience functions for wrapping things in rich text tags.
local rfmt = {}
function rfmt.code(s: string): string
return `<font face="RobotoMono">{s}</font>`
end
return rfmt
| 53 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/tests/JSONHelper.server.luau | luau | .luau | local JSONHelper = require(script.Parent.Parent.JSONHelper)
assert(JSONHelper.toInputString({}, "array") == "[]")
assert(JSONHelper.toInputString({ 1, 2, 3, 4, 5, 6 }, "array") == "[]")
assert(JSONHelper.toInputString({}, "object") == "{}")
assert(JSONHelper.toInputString({ hey = "world" }, "object") == "{}")
assert... | 275 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/tests/TreeViewer/fuzzJSON.luau | luau | .luau | --!strict
-- Actions to generate random JSON+buffer-acceptable value
type Action = (depth: number) -> any
local MAX_DEPTH = 10
local actions: { Action }
local stringAction: Action = function()
local s = table.create(12)
while true do
local got = math.random()
if got < 0.3 then
break
else
table.insert(... | 483 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/tests/TreeViewer/fuzzUserIds.luau | luau | .luau | --!strict
return function()
local ids = {}
for _ = 1, math.random(0, 100) do
table.insert(ids, math.random(1, 10_000_000))
end
return ids
end
| 51 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/tests/TreeViewer/init.server.luau | luau | .luau | -- Tests for tree viewer
local FUZZ_TESTS = 25
local Theme = require(script.Parent.Parent.UI.Theme)
local Tree = require(script.Parent.Parent.UI.Viewers.Tree)
local fuzzUserIds = require(script.fuzzUserIds)
local fuzzJSON = require(script.fuzzJSON)
type SearchForQuery = { key: string | number, value: any?, isContai... | 14,064 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/tests/Validators.server.luau | luau | .luau | local Validators = require(script.Parent.Parent.Validators)
assert(Validators.empty(math.random(100000000)))
assert(Validators.integer(0))
assert(Validators.integer(10))
assert(Validators.integer(-10))
assert(not Validators.integer(0.001))
assert(not Validators.integer(10.1))
assert(not Validators.integer(-10.1))
ass... | 199 |
littensy/remo | littensy-remo-da8fe74/examples/lua/src/client/todos.client.lua | luau | .lua | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local remotes = require(ReplicatedStorage.Shared.remotes)
local names = require(ReplicatedStorage.Shared.names)
local todos: { string } = {}
local function addTodo()
remotes.addTodo:fire(names.getRandomName())
end
local function removeTodo()
if #todos... | 214 |
littensy/remo | littensy-remo-da8fe74/examples/lua/src/server/todos.server.lua | luau | .lua | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")
local remotes = require(ReplicatedStorage.Shared.remotes)
local todos: { string } = { "Milk", "Eggs" }
local changed = false
remotes.addTodo:connect(function(player, todo)
table.insert(todos, todo)
chang... | 181 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.