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 |
|---|---|---|---|---|---|
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/filter.luau | luau | .luau | local Dash = script.Parent
local Types = require(Dash.Types)
export type FilterHandler<Key, Value> = (Value, Key) -> boolean
--[=[
Returns a new array containing the elements of the _input_ table for which _handler_ returns truthy.
For an array input, the order of elements is preserved in the output.
For a Map/ta... | 195 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/find.luau | luau | .luau | export type FindHandler<Key, Value> = (Value, Key) -> boolean
--[=[
Returns the first element in the _input_ table that satisfies the _handler_ predicate.
For an array input, the first matching element in order 1..n is returned.
For a Map input, an arbitrary matching element is returned.
@param input The table t... | 171 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/findIndex.luau | luau | .luau | export type FindHandler<Value> = (Value, number) -> boolean
--[=[
Returns the index of the first element in the _input_ array that satisfies the _handler_ predicate.
@param input The array to search.
@param handler Function called as `(value, index)` for each element; return `true` to select the index.
@return Th... | 149 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/flat.luau | luau | .luau | local Dash = script.Parent
local append = require(Dash.append)
local forEach = require(Dash.forEach)
-- TODO Luau: Support function generics
--[=[
Flattens the input array by a single level.
Outputs a new array of elements merged from the _input_ array arguments in left-to-right order.
@param input The array of a... | 138 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/forEach.luau | luau | .luau | export type ForEachHandler<Key, Value> = (Value, Key) -> ()
--[=[
Iterates through the elements of the _input_ table and calls _handler_ for each entry.
For an array input, the elements are visited in order 1..n.
For a Map input, the keys are visited in an arbitrary order.
@param input The table to iterate over.... | 134 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/forEachArgs.luau | luau | .luau | export type ForEachArgsHandler<Value> = (Value, number) -> ()
--[=[
Iterates through the tail arguments in order, including nil values up to the argument list length.
@param handler Function called as `(value, index)` for each argument.
@param ... Variable arguments to iterate over.
]=]
local function forEachArgs<... | 111 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/format.luau | luau | .luau | local Dash = script.Parent
local formatValue = require(Dash.formatValue)
local splitOn = require(Dash.splitOn)
local startsWith = require(Dash.startsWith)
local concat = table.concat
local insert = table.insert
--[=[
Returns the _format_ string with placeholders `{...}` substituted with readable representations of t... | 939 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/formatValue.luau | luau | .luau | local Dash = script.Parent
--[=[
Formats a specific _value_ using the specified _displayString_.
@param value The value to format.
@param displayString Optional display string specifying the format.
@return The formatted string representation of the value.
@example
```luau
formatValue(255, "06X") --> "0000FF"... | 422 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/freeze.luau | luau | .luau | local Dash = script.Parent
local Error = require(Dash.Error)
local format = require(Dash.format)
local ReadonlyKey =
Error.new("ReadonlyKey", "Attempted to write to readonly key {key:?} of frozen object {objectName:?}")
local MissingKey = Error.new("MissingKey", "Attempted to read missing key {key:?} of frozen object... | 686 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/frequencies.luau | luau | .luau | local Dash = script.Parent
local Types = require(Dash.Types)
local reduce = require(Dash.reduce)
type FrequenciesHandler<Key, Value, NewKey> = (Value, Key) -> NewKey
--[=[
Returns a map counting the frequency of unique values in the _input_ table.
If no _handler_ is provided, counts occurrences of each unique valu... | 398 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/get.luau | luau | .luau | --[=[
Returns the value at _path_ from _object_. If resolution yields `nil`, _defaultValue_ is returned instead.
@param object The table to query.
@param path An array of keys to traverse on _object_.
@param defaultValue The value to return when the resolved value is `nil`.
@return The resolved value at _path_, o... | 290 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/getOrSet.luau | luau | .luau | export type GetValueHandler<Key, Value> = ({ [Key]: Value }, Key) -> Value
--[=[
Returns the value at _key_ from the _input_ table.
If the key is missing, calls _getValue_ to compute a value, stores it on _input_, and returns it.
@param input The table to read from (and potentially write to).
@param key The key ... | 179 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/identity.luau | luau | .luau | --[=[
Returns the input parameters unchanged.
Can be used to make it clear that a handler returns its inputs unchanged.
@param ... The input parameters to return.
@return The input parameters unchanged.
]=]
local function identity<T...>(...: T...): T...
return ...
end
return identity
| 62 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/includes.luau | luau | .luau | --[=[
Returns `true` if the _item_ exists as a value in the _input_ table.
A nil _item_ will always return `false`.
@param input The table to search in.
@param item The value to search for.
@return `true` if the item is found, `false` otherwise.
]=]
local function includes(input: {}, item: any?): boolean
if ite... | 124 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/init.luau | luau | .luau | local Types = require(script.Types)
export type Map<Key, Value> = Types.Map<Key, Value>
export type Set<Key> = Types.Set<Key>
export type Table = Types.Table
export type Class<Object> = Types.Class<Object>
export type AnyFunction = Types.AnyFunction
local Dash = {
all = require(script.all),
append = require(script.... | 607 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/isCallable.luau | luau | .luau | --[=[
Returns `true` if the value can be called i.e. you can write `value(...)`.
@param value The value to check if it's callable.
@return `true` if the value is callable, `false` otherwise.
]=]
local function isCallable<T>(value: T): boolean
return type(value) == "function"
or (type(value) == "table" and getmet... | 107 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/isLowercase.luau | luau | .luau | local Dash = script.Parent
local assertEqual = require(Dash.assertEqual)
--[=[
Returns `true` if the first character of _input_ is a lower-case character.
Throws if the _input_ is not a string or it is the empty string.
Our current version of Lua unfortunately does not support upper or lower-case detection outsid... | 192 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/isUppercase.luau | luau | .luau | local Dash = script.Parent
local assertEqual = require(Dash.assertEqual)
--[=[
Returns `true` if the first character of _input_ is an upper-case character.
Throws if the _input_ is not a string or it is the empty string.
Our current version of Lua unfortunately does not support upper or lower-case detection outsi... | 196 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/iterable.luau | luau | .luau | local Dash = script.Parent
local Types = require(Dash.Types)
--[=[
Creates a stateful iterator for the _input_ table, first visiting ordered numeric keys 1..n and then the remaining unordered keys in any order.
@param input The table to create an iterator for.
@return A stateful iterator function that yields `(key... | 311 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/iterator.luau | luau | .luau | local Dash = script.Parent
local Types = require(Dash.Types)
--[=[
Returns an iterator for _input_: `ipairs` when it's a non-empty array, otherwise `pairs` for tables; if _input_ is a function, it is returned as-is.
This function can be used to build behavior that iterates over both arrays and Maps.
@return A sta... | 203 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/join.luau | luau | .luau | local Dash = script.Parent
local Types = require(Dash.Types)
local assign = require(Dash.assign)
--[=[
Returns a new Map by merging all keys from the provided Map arguments in left-to-right order.
The `None` symbol can be used to remove existing elements.
@param ... Any number of tables to merge.
@return A new M... | 99 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/joinArrays.luau | luau | .luau | local Dash = script.Parent
local Types = require(Dash.Types)
--[=[
Returns a new array containing the joined elements of the arrays passed.
@param ... Any number of arrays to join.
@return A new array containing the joined elements.
]=]
local function joinArrays(...: {}?): Types.Table
local arrays = { ... }
loca... | 121 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/joinDeep.luau | luau | .luau | local Dash = script.Parent
local None = require(Dash.None)
local Types = require(Dash.Types)
local forEach = require(Dash.forEach)
-- TODO Luau: Support typing varargs
-- TODO Luau: Support function generics
--[=[
Creates a shallow clone of the _source_ map, and copies the values from the _delta_ map by key, like the... | 325 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/keys.luau | luau | .luau | local insert = table.insert
--[=[
Returns an array of the keys in the _input_ table.
If the input is an array, ordering is preserved.
If the input is a Map, elements are returned in an arbitrary order.
@param input The table to extract keys from.
@return An array containing all keys from the input table.
]=]
lo... | 105 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/last.luau | luau | .luau | export type FindHandler<Value> = (Value, number) -> boolean
--[=[
Returns the last element in the _input_ array that satisfies the _handler_ predicate.
If no _handler_ is provided, returns the last element of the array.
If no entries satisfy the condition, returns `nil`.
@param input The array to search.
@param... | 195 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/leftPad.luau | luau | .luau | --[=[
Makes a string of _length_ from _input_ by repeating characters from _prefix_ at the start of the string.
@param input The string to pad.
@param length The desired total length of the result.
@param prefix The character(s) to use for padding; defaults to a single space.
@return A new string padded to the sp... | 246 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/map.luau | luau | .luau | local Dash = script.Parent
local Types = require(Dash.Types)
local assertEqual = require(Dash.assertEqual)
export type MapHandler<Key, Value, NewValue> = (Value, Key) -> NewValue
--[=[
Returns a new table by applying the _handler_ to each element of _input_.
For an array input, the elements are visited in order 1.... | 240 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/mapFirst.luau | luau | .luau | export type MapHandler<Value, NewValue> = (Value, number) -> NewValue?
--[=[
Iterates through the elements of the _input_ array in order 1..n and returns the first non-nil value from the _handler_.
If all values returned by the _handler_ are `nil`, `nil` is returned.
@param input The array to iterate over.
@para... | 189 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/mapLast.luau | luau | .luau | export type MapHandler<Value, NewValue> = (Value, number) -> NewValue?
--[=[
Iterates through the elements of the _input_ array in reverse order n..1 and returns the first non-nil value from the _handler_.
If all values returned by the _handler_ are `nil`, `nil` is returned.
@param input The array to iterate over... | 199 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/mapNotNil.luau | luau | .luau | local Dash = script.Parent
local Types = require(Dash.Types)
export type MapHandler<Key, Value, NewValue> = (Value, Key) -> NewValue
--[=[
Returns a new table by applying the _handler_ to each element of _input_.
For a Map input, the elements are visited in an arbitrary order.
If a nil value is returned from the... | 214 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/mapOne.luau | luau | .luau | export type MapHandler<Key, Value, NewValue> = (Value, Key) -> NewValue?
--[=[
Iterates through the elements of the _input_ table in no particular order and returns the first non-nil value.
If a _handler_ is provided, returns the first non-nil value returned by the handler.
If no _handler_ is provided, returns the... | 220 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/max.luau | luau | .luau | local Dash = script.Parent
local reduce = require(Dash.reduce)
-- Return true if a > b
type MaxComparator = (any, any) -> boolean
type MaxHandler = (any, any) -> any
local defaultComparator = function(a: number | string, b: number | string)
return a > b
end
--[=[
Returns the maximum value in the _input_ table. By ... | 561 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/memoize.luau | luau | .luau | local Dash = script.Parent
local Types = require(Dash.Types)
export type ResolverFunction = (...any) -> string
--[=[
Creates a function that memoizes the result of _func_. The memoized function will cache results based on the arguments provided. If a resolver function is provided, it will be used to generate the cac... | 331 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/min.luau | luau | .luau | local Dash = script.Parent
local reduce = require(Dash.reduce)
-- Return true if a < b
type MinComparator = (any, any) -> boolean
type MinHandler = (any, any) -> any
local defaultComparator = function(a, b)
return a < b
end
-- TODO (AleksandrSl 03/06/2024): Can be further "optimized" by writing a compare function t... | 590 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/noop.luau | luau | .luau | --[=[
A function which does nothing.
Can be used to make it clear that a handler has no function.
@return Always returns `nil`.
]=]
-- selene: allow(unused_variable)
local function noop(...: any) end
return noop
| 53 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/omit.luau | luau | .luau | local Dash = script.Parent
local collectSet = require(Dash.collectSet)
local forEach = require(Dash.forEach)
local Types = require(Dash.Types)
--[=[
Returns a new table made from entries in the _input_ table whose key is not in the _keys_ array.
If the input is an array, ordering is preserved.
If the input is a Ma... | 181 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/pick.luau | luau | .luau | local Dash = script.Parent
local Types = require(Dash.Types)
export type PickHandler<Key, Value> = (Value, Key) -> boolean
--[=[
Returns a new table containing only the entries from _input_ for which the _handler_ returns truthy.
@param input The table to filter.
@param handler Function called as `(value, key)` fo... | 157 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/pipe.luau | luau | .luau | --[=[
Creates a function that returns the result of passing a value through a pipeline of functions.
Each function in the pipeline receives the result of the previous function.
Functions are executed from left to right.
@param f The first function in the pipeline.
@param ... Additional functions to pipe.
@return... | 283 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/pretty.luau | luau | .luau | local Dash = script.Parent
local Types = require(Dash.Types)
local append = require(Dash.append)
local assign = require(Dash.assign)
local cycles = require(Dash.cycles)
local includes = require(Dash.includes)
local join = require(Dash.join)
local map = require(Dash.map)
local keys = require(Dash.keys)
local slice = re... | 1,560 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/product.luau | luau | .luau | local Dash = script.Parent
local reduce = require(Dash.reduce)
--[=[
Multiplies all numbers in the _input_ array.
If the _input_ has no elements, returns `1`.
@param input The array of numbers to multiply.
@return The product of all numbers in the array.
@example
```luau
Dash.product({3, 3, 2}) --> 18
```
]... | 129 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/reduce.luau | luau | .luau | export type ReduceHandler<Key, Value, Accumulator> = (Accumulator, Value, Key) -> Accumulator
--[=[
Iterates through the elements of the _input_ table and calls the _handler_ for each element,
passing the return of the previous call as the first argument.
The _initial_ value is passed into the first call, and the ... | 191 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/reverse.luau | luau | .luau | local insert = table.insert
--[=[
Reverses the order of the elements in the _input_ array.
@param input The array to reverse.
@return A new array with elements in reverse order.
]=]
local function reverse<T>(input: { T }): { T }
local output: { T } = {}
for i = #input, 1, -1 do
insert(output, input[i])
end
r... | 96 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/rightPad.luau | luau | .luau | --[=[
Makes a string of _length_ from _input_ by repeating characters from _suffix_ at the end of the string.
By default, suffix is " ".
@param input The string to pad.
@param length The desired total length of the result.
@param suffix The character(s) to use for padding; defaults to a single space.
@return A ... | 252 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/shallowEqual.luau | luau | .luau | --[=[
Returns `true` if the _left_ and _right_ values are equal (by the equality operator) or the inputs are tables, and all their keys are equal.
@param left The first value to compare.
@param right The second value to compare.
@return `true` if the values are shallowly equal, `false` otherwise.
]=]
local functio... | 208 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/slice.luau | luau | .luau | local insert = table.insert
--[=[
Returns a portion of the _input_ array starting with the element at the _left_ index and ending with the element at the _right_ index (i.e. an inclusive range).
If _left_ is not defined, it defaults to 1.
If _right_ is not defined, it defaults to the length of the array (i.e. the ... | 304 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/some.luau | luau | .luau | export type SomeHandler<Key, Value> = (Value, Key) -> boolean
--[=[
Iterates through the elements of the _input_ table in no particular order.
Calls the _handler_ for each entry and returns `true` if the handler returns truthy for any element which it is called with.
@param input The table to iterate over.
@para... | 166 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/splitOn.luau | luau | .luau | local insert = table.insert
--[=[
Splits _input_ into parts based on a _pattern_ delimiter and returns a table of the parts, followed by a table of the matched delimiters.
@param input The string to split.
@param pattern The delimiter pattern to split on.
@return A tuple containing the parts array and delimiters ... | 238 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/startsWith.luau | luau | .luau | --[=[
Checks whether _input_ starts with the string _prefix_.
@param input The string to check.
@param prefix The prefix to check for.
@return `true` if _input_ starts with _prefix_; otherwise `false`.
@example
```luau
startsWith("Fun Roblox Games", "Fun") --> true
```
@example
```luau
startsWith("Chess",... | 135 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/sum.luau | luau | .luau | local Dash = script.Parent
local reduce = require(Dash.reduce)
--[=[
Sums all numbers in the _input_ array.
If the input array has no elements, returns `0`.
@param input The array of numbers to sum.
@return The sum of all numbers in the array.
@example
```luau
Dash.sum({3, 2, 1}) --> 6
```
]=]
local functio... | 127 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/throttle.luau | luau | .luau | local Dash = script.Parent
local assign = require(Dash.assign)
type ThrottleOptions = {
leading: boolean?,
trailing: boolean?,
}
type ThrottleOptionsInternal = {
leading: boolean,
trailing: boolean,
}
-- `& (...any) -> ...any` in the function type is a funky way to mimick `T extends function`
type AnyVoidFunctio... | 912 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/union.luau | luau | .luau | local Dash = script.Parent
local None = require(Dash.None)
local Types = require(Dash.Types)
--[=[
Returns a new Map by merging all keys in the two Maps in left-to-right order.
The `None` symbol can be used to remove existing elements.
@param map1 The first Map to union
@param map2 The second Map to union
@retu... | 162 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/values.luau | luau | .luau | local Dash = script.Parent
local Types = require(Dash.Types)
local insert = table.insert
--[=[
Returns an array of the values in the _input_ table.
If the input is an array, ordering is preserved.
If the input is a Map, elements are returned in an arbitrary order.
@param input The table to extract values from.
... | 122 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Dash/zip.luau | luau | .luau | --[=[
Returns an iterator over two given arrays that produces pairs of elements with the same index from both arrays.
The iterator stops when the shortest array ends, i.e. when it encounters nil in one of the arrays.
@param array1 The first array to zip.
@param array2 The second array to zip.
@return An iterator... | 188 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/FoundationCloudAssets/Generated/AssetMetadata.luau | luau | .luau | return {
pictograms = {
ads = Vector2.new(960, 540),
alert = Vector2.new(300, 300),
alert_lg = Vector2.new(960, 540),
api_key = Vector2.new(960, 540),
audio = Vector2.new(960, 540),
avatar = Vector2.new(960, 540),
avatar_issue = Vector2.new(960, 540),
avatar_setup = Vec... | 722 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/FoundationCloudAssets/Generated/Assets.luau | luau | .luau | -- This file was @generated by Tarmac. It is not intended for manual editing.
return {
pictograms = {
ads = "rbxassetid://78173993127341",
alert = "rbxassetid://97628760291739",
alert_lg = "rbxassetid://118048071626044",
api_key = "rbxassetid://86891131681367",
audio = "rbxassetid://86296775732265",
avatar... | 955 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/FoundationCloudAssets/Generated/ConsolidatedAssets.luau | luau | .luau | -- Consolidated assets with metadata
-- Generated by ConsolidateAssets.py
return {
["pictograms/ads"] = {
assetId = "rbxassetid://78173993127341",
size = Vector2.new(960, 540),
},
["pictograms/alert"] = {
assetId = "rbxassetid://97628760291739",
size = Vector2.new(300, 300),
... | 2,281 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/FoundationCloudAssets/init.luau | luau | .luau | local FoundationCloudAssets = script
local preloadAsset = require(FoundationCloudAssets.preloadAsset)
local assets = require(FoundationCloudAssets.Generated.ConsolidatedAssets)
return {
Assets = assets,
preloadAsset = preloadAsset,
}
| 49 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/FoundationCloudAssets/preloadAsset.luau | luau | .luau | local FoundationCloudAssets = script.Parent
local Assets = require(FoundationCloudAssets.Generated.ConsolidatedAssets)
local ContentProvider = game:GetService("ContentProvider")
local function preloadAsset(assetKey: string)
-- create image label instance
local assetImage = Instance.new("ImageLabel")
assetImage.Imag... | 108 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/FoundationImages/Flags.luau | luau | .luau | return {
FixBlurryImages = true
}
| 11 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/FoundationImages/Generated/FallbackImages.luau | luau | .luau | -- This file was @generated by Tarmac. It is not intended for manual editing.
return {
img_set_1x_1 = "rbxassetid://83453477035722",
img_set_1x_10 = "rbxassetid://137552943987369",
img_set_1x_11 = "rbxassetid://122786385008844",
img_set_1x_2 = "rbxassetid://104435217212956",
img_set_1x_3 = "rbxassetid://8412354927... | 1,241 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/FoundationImages/Images.luau | luau | .luau | local FoundationImages = script.Parent
local GetImageSetData = require(FoundationImages.Generated.GetImageSetData)
local FALLBACK_IMAGES = require(FoundationImages.Generated.FallbackImages)
local ImagesTypes = require(FoundationImages.ImagesTypes)
local getResolutionScale = require(FoundationImages.getResolutionScale... | 459 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/FoundationImages/ImagesTypes.luau | luau | .luau | -- This file just provides a convenient interface to query for images
export type ImageSetImage = {
ImageRectOffset: Vector2,
ImageRectSize: Vector2,
Image: string,
}
export type Images = {
[string]: ImageSetImage,
}
return {}
| 54 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/FoundationImages/getResolutionScale.luau | luau | .luau | local GuiService = game:GetService("GuiService")
local CorePackages = script:FindFirstAncestor("CorePackages")
local success, scale = pcall(GuiService.GetResolutionScale, GuiService)
local FoundationImages = script.Parent
local GetImageSetData = require(FoundationImages.Generated.GetImageSetData)
local Flags = requir... | 191 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/FoundationImages/init.luau | luau | .luau | local ImagesTypes = require(script.ImagesTypes)
export type ImageSetImage = ImagesTypes.ImageSetImage
export type Images = ImagesTypes.Images
return {
getResolutionScale = require(script.getResolutionScale),
Images = require(script.Images),
}
| 49 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Fusion/Instances/OnChange.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Constructs special keys for property tables which connect property change
listeners to an instance.
]]
local Package = script.Parent.Parent
local Types = require(Package.Types)
local External = re... | 322 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Fusion/Instances/Tags.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
A special key for property tables, which allows users to apply a
space-separated set of CollectionService tags to instances.
This is a custom implementation that supports space-seperated tags.
]... | 460 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Fusion/Instances/applyInstanceProps.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Applies a table of properties to an instance, including binding to any
given state objects and applying any special keys.
No strong reference is kept by default - special keys should take care no... | 1,100 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Fusion/Instances/defaultProps.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Stores 'sensible default' properties to be applied to instances created by
the New function.
Modified to remove some UI related default properties due to them overriding style tokens.
]]
return... | 766 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Fusion/Memory/checkLifetime.luau | luau | .luau |
--!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Procedures for checking lifetimes and printing helpful warnings about them.
]]
local Package = script.Parent.Parent
local Types = require(Package.Types)
local External = require(Package.External)... | 1,084 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Fusion/Types.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Stores common public-facing type information for Fusion APIs.
]]
export type Error = {
type: "Error",
raw: string,
message: string,
trace: string,
context: string?
}
-- Types that can be expr... | 3,256 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Fusion/init.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
The entry point for the Fusion library.
WARNING: This is a modified version of 0.3 that may behave slightly different from upstream.
]]
local Types = require(script.Types)
local External = require(... | 663 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/RbxDesignFoundations/init.luau | luau | .luau | local Tokens = require(script.tokens)
export type TokenPath = Tokens.TokenPath
return {
Tokens = Tokens
}
| 24 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/RbxDesignFoundations/tokens/Dark.luau | luau | .luau | return function(scale)
return table.freeze {
Color = {
ActionAlert = {
Background = { Color3 = Color3.fromRGB(208, 217, 251), Transparency = 0.88 },
Border = { Color3 = Color3.fromRGB(0, 0, 0), Transparency = 1 },
Foreground = { Color3 = Color3.fromRGB(240, 68, 51), Transparency = 0 },
},
Action... | 23,470 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/RbxDesignFoundations/tokens/Light.luau | luau | .luau | return function(scale)
return table.freeze {
Color = {
ActionAlert = {
Background = { Color3 = Color3.fromRGB(27, 37, 75), Transparency = 0.88 },
Border = { Color3 = Color3.fromRGB(0, 0, 0), Transparency = 1 },
Foreground = { Color3 = Color3.fromRGB(217, 28, 21), Transparency = 0 },
},
ActionEmp... | 23,470 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/RbxDesignFoundations/tokens/init.luau | luau | .luau | export type TokenPath =
| "Config.Theme.Name"
| "Config.Theme.isFoundation"
| "Config.Theme.isUIBlox"
| "Config.UI.Interval"
| "Config.UI.Scale"
| "Config.UI.StrokeBase"
| "Config.Text.Interval"
| "Config.Text.Scale"
| "Config.Text.Font"
| "Config.Text.NominalScale"
| "Config.Text.InverseScale"
| "Config.Co... | 6,542 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Signal/createReadableSignal.luau | luau | .luau | --!strict
--[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law... | 379 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Signal/createSignal.luau | luau | .luau | --!strict
--[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law... | 503 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Signal/init.luau | luau | .luau | --!strict
--[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law... | 228 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/Packages/Signal/types.luau | luau | .luau | --!strict
--[[
* Copyright (c) Roblox Corporation. All rights reserved.
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law... | 249 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/PackageManager/init.luau | luau | .luau | --!strict
-- Written by @TenebrisNoctua
-- Handles the initialization and usage of packages.
--// Variables
local PackagesSrc = script.Packages
local RBXDesignFoundations = require(PackagesSrc.RbxDesignFoundations)
local Dash = require(PackagesSrc.Dash)
local Fusion = require(PackagesSrc.Fusion)
local BuilderIcons ... | 424 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/Providers/CursorProvider.luau | luau | .luau | -- Written by @TenebrisNoctua
-- Provides cursor management for Foundation components.
local Foundation = script.Parent.Parent
local Utility = Foundation.Utility
local Types = require(Utility.Types)
local CursorType = require(Foundation.Enums.CursorType)
type CursorType = CursorType.CursorType
type Scope = Types.Sc... | 269 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/Providers/ElevationProvider/init.luau | luau | .luau | -- Written by @TenebrisNoctua
-- Provides the elevation layer used by certain components.
local Foundation = script.Parent.Parent
local Enums = Foundation.Enums
local ElevationLayer = require(Enums.ElevationLayer)
local ELEVATION_LAYERS: { [ElevationLayer]: ElevationLayerSpec } = {
[ElevationLayer.Popover] = { start... | 843 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/Providers/ElevationProvider/useElevation.luau | luau | .luau | local Foundation = script.Parent.Parent.Parent
local Utility = Foundation.Utility
local Enums = Foundation.Enums
local unwrap = require(Utility.unwrap)
local Types = require(Utility.Types)
local ElevationLayer = require(Enums.ElevationLayer)
local ElevationProvider = require(script.Parent)
type UsedAs<T> = Types.Us... | 652 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/Providers/OverlayProvider/init.luau | luau | .luau | -- Written by @TenebrisNoctua
-- Provides an overlay ScreenGui for rendering floating content (popovers, dialogs, etc.).
local Foundation = script.Parent.Parent
local Utility = Foundation.Utility
local useKeyboardAwareSize = require(script.useKeyboardAwareSize)
local ThemeProvider = require(script.Parent.ThemeProvide... | 742 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/Providers/OverlayProvider/useKeyboardAwareSize.luau | luau | .luau | -- Written by @TenebrisNoctua
-- Tracks the on-screen keyboard position and adjusts the safe area size accordingly.
local Foundation = script.Parent.Parent.Parent
local Utility = Foundation.Utility
local unwrap = require(Utility.unwrap)
local Types = require(Utility.Types)
local Wrappers = require(Utility.Wrappers)
... | 497 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/Providers/PanelsProvider/Managers/PopoverManager.luau | luau | .luau | --[[
NOTE: This manager is only usable within built-in plugins.
It is only provided under Fusion Foundation to provide parity between the React and Fusion versions.
Do not depend on this module. It may be removed or changed at any time.
]]
local HttpService = game:GetService("HttpService")
local Foundation = scrip... | 2,244 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/Providers/PanelsProvider/Types.luau | luau | .luau | local Foundation = script:FindFirstAncestor("Foundation")
local StudioUri = require(Foundation.Utility.Plugin.StudioUri)
type StudioUri = StudioUri.StudioUri
local PopoverAlign = require(Foundation.Enums.PopoverAlign)
local PopoverSide = require(Foundation.Enums.PopoverSide)
type PopoverAlign = PopoverAlign.PopoverAl... | 273 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/Providers/PanelsProvider/init.luau | luau | .luau | -- Written by @TenebrisNoctua
-- Handles panel functionality for plugins.
local Foundation = script.Parent.Parent
local Utility = Foundation.Utility
local PopoverManager = require(script.Managers.PopoverManager)
local ProviderTypes = require(script.Types)
local StudioUri = require(Utility.Plugin.StudioUri)
local Typ... | 380 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/Providers/PanelsProvider/usePanel.luau | luau | .luau | local Foundation = script.Parent.Parent.Parent
local Utility = Foundation.Utility
local unwrap = require(Utility.unwrap)
local isState = require(Utility.isState)
local StudioUri = require(Utility.Plugin.StudioUri)
local Types = require(Utility.Types)
local ProviderTypes = require(script.Parent.Types)
type Scope = Ty... | 863 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/Providers/PluginProvider/init.luau | luau | .luau | -- Written by @TenebrisNoctua
-- Provides the currently registered plugin if it exists.
local isPluginElevated = require(script.isPluginElevated)
local pluginProvider = {
plugin = nil :: Plugin
}
type pluginProvider = typeof(pluginProvider)
--// Main Functions
function pluginProvider.isPluginElevated(self: plugin... | 128 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/Providers/PluginProvider/isPluginElevated.luau | luau | .luau | --[[
Parts of our plugin path requires elevated APIs like the Panels component to be available.
Currently, this is only available to internal plugins.
]]
local function isPluginElevated(plugin: Plugin): boolean
local success = pcall(function()
return plugin:GetPluginComponent("Panels")
end)
return success
end
... | 75 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/Providers/PluginProvider/usePlugin.luau | luau | .luau | local PluginContext = require(script.Parent.PluginContext)
local isPluginElevated = require(script.Parent.isPluginElevated)
local function usePlugin(): (Plugin?, boolean)
local plugin = PluginContext:now()
if plugin then
return plugin, isPluginElevated(plugin)
end
return nil, false
end
return usePlugin | 71 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/Providers/ResponsiveProvider/Hooks/useViewportBreakpoint.luau | luau | .luau | local Foundation = script.Parent.Parent.Parent.Parent
local Utility = Foundation.Utility
local Enums = Foundation.Enums
local useBreakpoint = require(script.Parent.useBreakpoint)
local Types = require(Utility.Types)
local Breakpoint = require(Enums.Breakpoint)
local OverlayProvider = require(Foundation.Providers.Ov... | 128 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/Providers/ThemeProvider/Tokens/TokenProcessingUtilities.luau | luau | .luau | --[[
Shared utilities for processing and formatting tokens across different browsers
(Storybook story and web documentation browser)
]]
local Foundation = script.Parent.Parent.Parent.Parent
local Types = require(Foundation.Utility.Types)
type ColorStyle = Types.ColorStyle
export type TokenItem = {
key: string,
v... | 1,921 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/Providers/ThemeProvider/Tokens/Tokens.story.luau | luau | .luau | local Foundation = script.Parent.Parent.Parent.Parent
local PackageManager = require(Foundation.PackageManager)
local Fusion = PackageManager.getPackage("Fusion")
local Dash = PackageManager.getPackage("Dash")
local Utility = Foundation.Utility
local Enums = Foundation.Enums
local unwrap = require(Utility.unwrap)
lo... | 2,039 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/Providers/ThemeProvider/Tokens/init.luau | luau | .luau | local Foundation = script.Parent.Parent.Parent
local PackageManager = require(Foundation.PackageManager)
local RbxDesignFoundations = PackageManager.getPackage("RBXDesignFoundations")
local Device = require(Foundation.Enums.Device)
local Theme = require(Foundation.Enums.Theme)
type Theme = Theme.Theme
type Device = ... | 491 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/Providers/ThemeProvider/useRegistryStyleSheet.luau | luau | .luau | local Foundation = script.Parent.Parent.Parent
local StyleSheetRegistry = require(Foundation.StyleSheet.StyleSheetRegistry)
local Utility = Foundation.Utility
local Enums = Foundation.Enums
local unwrap = require(Utility.unwrap)
local Types = require(Utility.Types)
local Device = require(Enums.Device)
local Theme = ... | 418 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/Providers/ThemeProvider/useStyleTags.luau | luau | .luau | local Foundation = script.Parent.Parent.Parent
local Utility = Foundation.Utility
local getFormattedTags = require(Utility.getFormattedTags)
local unwrap = require(Utility.unwrap)
local Types = require(Utility.Types)
type UsedAs<T> = Types.UsedAs<T>
type Scope = Types.Scope
type Use = Types.Use
type Tags = Types.Tags... | 230 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/Providers/ThemeProvider/useTagsState.luau | luau | .luau | local Foundation = script.Parent.Parent.Parent
local PackageManager = require(Foundation.PackageManager)
local Fusion = PackageManager.getPackage("Fusion")
local Utility = Foundation.Utility
local unwrap = require(Utility.unwrap)
local Types = require(Utility.Types)
type UsedAs<T> = Types.UsedAs<T>
type Value<T> = T... | 286 |
TenebrisNoctua/FusionFoundation | TenebrisNoctua-FusionFoundation-7445323/Foundation/Providers/WidgetsProvider/Types.luau | luau | .luau | local Foundation = script.Parent.Parent.Parent
local StudioUri = require(Foundation.Utility.Plugin.StudioUri)
local WidgetManager = require(script.Parent.WidgetManager)
type StudioUri = StudioUri.StudioUri
export type WidgetManager = WidgetManager.WidgetManager
export type WidgetsContext = {
register: (uri: Studio... | 168 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.