@rbxts/centurion-ui 1.0.8 → 2.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +60 -15
- package/centurion.luau +10 -0
- package/package.json +13 -23
- package/src/analyse/cursor.luau +25 -0
- package/src/analyse/highlight.luau +91 -0
- package/src/analyse/init.luau +318 -0
- package/src/analyse/leventine.luau +298 -0
- package/src/analyse/match.luau +39 -0
- package/src/analyse/suggest.luau +41 -0
- package/src/app/header.luau +128 -0
- package/src/app/history.luau +258 -0
- package/src/app/init.luau +699 -0
- package/src/app/suggestions.luau +419 -0
- package/src/button.luau +13 -0
- package/src/components/background.luau +37 -0
- package/src/components/container.luau +33 -0
- package/src/components/corner.luau +11 -0
- package/src/components/divider.luau +28 -0
- package/src/components/flex.luau +108 -0
- package/src/components/gap.luau +25 -0
- package/src/components/image.luau +33 -0
- package/src/components/padding.luau +59 -0
- package/src/components/stroke.luau +20 -0
- package/src/components/text.luau +57 -0
- package/src/components/textbox.luau +186 -0
- package/src/fade.luau +23 -0
- package/src/init.luau +142 -0
- package/src/input.luau +16 -0
- package/src/px.luau +68 -0
- package/src/rich.luau +14 -0
- package/src/state.luau +33 -0
- package/src/theme.luau +70 -0
- package/src/ts/index.d.ts +60 -0
- package/src/ts/init.luau +5 -0
- package/src/types.luau +85 -0
- package/vide/init.luau +8 -0
- package/vide/src/action.luau +25 -0
- package/vide/src/apply.luau +162 -0
- package/vide/src/batch.luau +23 -0
- package/vide/src/branch.luau +40 -0
- package/vide/src/changed.luau +18 -0
- package/vide/src/cleanup.luau +43 -0
- package/vide/src/context.luau +74 -0
- package/vide/src/create.luau +107 -0
- package/vide/src/defaults.luau +113 -0
- package/vide/src/derive.luau +18 -0
- package/vide/src/effect.luau +12 -0
- package/vide/src/flags.luau +12 -0
- package/vide/src/graph.luau +321 -0
- package/vide/src/implicit_effect.luau +125 -0
- package/vide/src/indexes.luau +121 -0
- package/vide/src/init.luau +10 -0
- package/vide/src/lib.luau +120 -0
- package/vide/src/mount.luau +11 -0
- package/vide/src/read.luau +5 -0
- package/vide/src/root.luau +35 -0
- package/vide/src/show.luau +36 -0
- package/vide/src/source.luau +31 -0
- package/vide/src/spring.luau +328 -0
- package/vide/src/switch.luau +114 -0
- package/vide/src/timeout.luau +27 -0
- package/vide/src/untrack.luau +25 -0
- package/vide/src/values.luau +131 -0
- package/out/app/centurion-app.d.ts +0 -3
- package/out/app/centurion-app.luau +0 -86
- package/out/app/index.d.ts +0 -32
- package/out/app/init.luau +0 -105
- package/out/components/history/history-line.d.ts +0 -9
- package/out/components/history/history-line.luau +0 -88
- package/out/components/history/history-list.d.ts +0 -11
- package/out/components/history/history-list.luau +0 -67
- package/out/components/history/index.d.ts +0 -1
- package/out/components/history/init.luau +0 -7
- package/out/components/index.d.ts +0 -2
- package/out/components/init.luau +0 -10
- package/out/components/suggestions/badge.d.ts +0 -16
- package/out/components/suggestions/badge.luau +0 -40
- package/out/components/suggestions/index.d.ts +0 -1
- package/out/components/suggestions/init.luau +0 -7
- package/out/components/suggestions/main-suggestion.d.ts +0 -9
- package/out/components/suggestions/main-suggestion.luau +0 -232
- package/out/components/suggestions/suggestion-list.d.ts +0 -8
- package/out/components/suggestions/suggestion-list.luau +0 -96
- package/out/components/suggestions/suggestions.d.ts +0 -2
- package/out/components/suggestions/suggestions.luau +0 -64
- package/out/components/suggestions/types.d.ts +0 -6
- package/out/components/suggestions/types.luau +0 -2
- package/out/components/suggestions/util.d.ts +0 -1
- package/out/components/suggestions/util.luau +0 -22
- package/out/components/terminal/command.d.ts +0 -6
- package/out/components/terminal/command.luau +0 -74
- package/out/components/terminal/index.d.ts +0 -1
- package/out/components/terminal/init.luau +0 -7
- package/out/components/terminal/suggestion.d.ts +0 -26
- package/out/components/terminal/suggestion.luau +0 -205
- package/out/components/terminal/terminal-text-field/index.d.ts +0 -1
- package/out/components/terminal/terminal-text-field/init.luau +0 -7
- package/out/components/terminal/terminal-text-field/suggestion.d.ts +0 -5
- package/out/components/terminal/terminal-text-field/suggestion.luau +0 -124
- package/out/components/terminal/terminal-text-field/terminal-text-field.d.ts +0 -13
- package/out/components/terminal/terminal-text-field/terminal-text-field.luau +0 -278
- package/out/components/terminal/terminal.d.ts +0 -2
- package/out/components/terminal/terminal.luau +0 -304
- package/out/components/ui/frame.d.ts +0 -17
- package/out/components/ui/frame.luau +0 -32
- package/out/components/ui/group.d.ts +0 -15
- package/out/components/ui/group.luau +0 -29
- package/out/components/ui/layer.d.ts +0 -8
- package/out/components/ui/layer.luau +0 -26
- package/out/components/ui/outline.d.ts +0 -15
- package/out/components/ui/outline.luau +0 -116
- package/out/components/ui/padding.d.ts +0 -10
- package/out/components/ui/padding.luau +0 -19
- package/out/components/ui/scrolling-frame.d.ts +0 -14
- package/out/components/ui/scrolling-frame.luau +0 -44
- package/out/components/ui/text-field.d.ts +0 -12
- package/out/components/ui/text-field.luau +0 -60
- package/out/components/ui/text.d.ts +0 -17
- package/out/components/ui/text.luau +0 -61
- package/out/constants/options.d.ts +0 -2
- package/out/constants/options.luau +0 -27
- package/out/constants/text.d.ts +0 -3
- package/out/constants/text.luau +0 -9
- package/out/constants/util.d.ts +0 -1
- package/out/constants/util.luau +0 -7
- package/out/hooks/use-client.d.ts +0 -2
- package/out/hooks/use-client.luau +0 -17
- package/out/hooks/use-event.d.ts +0 -14
- package/out/hooks/use-event.luau +0 -58
- package/out/hooks/use-px.d.ts +0 -19
- package/out/hooks/use-px.luau +0 -78
- package/out/index.d.ts +0 -2
- package/out/init.luau +0 -10
- package/out/palette.d.ts +0 -47
- package/out/palette.luau +0 -42
- package/out/store.d.ts +0 -12
- package/out/store.luau +0 -26
- package/out/types.d.ts +0 -44
- package/out/types.luau +0 -2
- package/out/utils/string.d.ts +0 -5
- package/out/utils/string.luau +0 -25
package/out/palette.d.ts
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
export interface InterfacePalette {
|
|
2
|
-
background: Color3;
|
|
3
|
-
surface: Color3;
|
|
4
|
-
text: Color3;
|
|
5
|
-
subtext: Color3;
|
|
6
|
-
highlight: Color3;
|
|
7
|
-
success: Color3;
|
|
8
|
-
error: Color3;
|
|
9
|
-
}
|
|
10
|
-
export declare const DefaultPalette: {
|
|
11
|
-
readonly mocha: {
|
|
12
|
-
readonly background: Color3;
|
|
13
|
-
readonly surface: Color3;
|
|
14
|
-
readonly text: Color3;
|
|
15
|
-
readonly subtext: Color3;
|
|
16
|
-
readonly highlight: Color3;
|
|
17
|
-
readonly success: Color3;
|
|
18
|
-
readonly error: Color3;
|
|
19
|
-
};
|
|
20
|
-
readonly macchiato: {
|
|
21
|
-
readonly background: Color3;
|
|
22
|
-
readonly surface: Color3;
|
|
23
|
-
readonly text: Color3;
|
|
24
|
-
readonly subtext: Color3;
|
|
25
|
-
readonly highlight: Color3;
|
|
26
|
-
readonly success: Color3;
|
|
27
|
-
readonly error: Color3;
|
|
28
|
-
};
|
|
29
|
-
readonly frappe: {
|
|
30
|
-
readonly background: Color3;
|
|
31
|
-
readonly surface: Color3;
|
|
32
|
-
readonly text: Color3;
|
|
33
|
-
readonly subtext: Color3;
|
|
34
|
-
readonly highlight: Color3;
|
|
35
|
-
readonly success: Color3;
|
|
36
|
-
readonly error: Color3;
|
|
37
|
-
};
|
|
38
|
-
readonly latte: {
|
|
39
|
-
readonly background: Color3;
|
|
40
|
-
readonly surface: Color3;
|
|
41
|
-
readonly text: Color3;
|
|
42
|
-
readonly subtext: Color3;
|
|
43
|
-
readonly highlight: Color3;
|
|
44
|
-
readonly success: Color3;
|
|
45
|
-
readonly error: Color3;
|
|
46
|
-
};
|
|
47
|
-
};
|
package/out/palette.luau
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
-- Compiled with roblox-ts v3.0.0
|
|
2
|
-
local DefaultPalette = {
|
|
3
|
-
mocha = {
|
|
4
|
-
background = Color3.fromRGB(24, 24, 37),
|
|
5
|
-
surface = Color3.fromRGB(30, 30, 46),
|
|
6
|
-
text = Color3.fromRGB(205, 214, 244),
|
|
7
|
-
subtext = Color3.fromRGB(166, 173, 200),
|
|
8
|
-
highlight = Color3.fromRGB(137, 180, 250),
|
|
9
|
-
success = Color3.fromRGB(166, 227, 161),
|
|
10
|
-
error = Color3.fromRGB(243, 139, 168),
|
|
11
|
-
},
|
|
12
|
-
macchiato = {
|
|
13
|
-
background = Color3.fromRGB(30, 32, 48),
|
|
14
|
-
surface = Color3.fromRGB(36, 39, 58),
|
|
15
|
-
text = Color3.fromRGB(202, 211, 245),
|
|
16
|
-
subtext = Color3.fromRGB(165, 173, 203),
|
|
17
|
-
highlight = Color3.fromRGB(138, 173, 244),
|
|
18
|
-
success = Color3.fromRGB(166, 218, 149),
|
|
19
|
-
error = Color3.fromRGB(237, 135, 150),
|
|
20
|
-
},
|
|
21
|
-
frappe = {
|
|
22
|
-
background = Color3.fromRGB(41, 44, 60),
|
|
23
|
-
surface = Color3.fromRGB(48, 52, 70),
|
|
24
|
-
text = Color3.fromRGB(198, 208, 245),
|
|
25
|
-
subtext = Color3.fromRGB(165, 173, 206),
|
|
26
|
-
highlight = Color3.fromRGB(140, 170, 238),
|
|
27
|
-
success = Color3.fromRGB(166, 209, 137),
|
|
28
|
-
error = Color3.fromRGB(231, 130, 132),
|
|
29
|
-
},
|
|
30
|
-
latte = {
|
|
31
|
-
background = Color3.fromRGB(230, 233, 239),
|
|
32
|
-
surface = Color3.fromRGB(239, 241, 245),
|
|
33
|
-
text = Color3.fromRGB(76, 79, 105),
|
|
34
|
-
subtext = Color3.fromRGB(92, 95, 119),
|
|
35
|
-
highlight = Color3.fromRGB(30, 102, 245),
|
|
36
|
-
success = Color3.fromRGB(64, 160, 43),
|
|
37
|
-
error = Color3.fromRGB(210, 15, 57),
|
|
38
|
-
},
|
|
39
|
-
}
|
|
40
|
-
return {
|
|
41
|
-
DefaultPalette = DefaultPalette,
|
|
42
|
-
}
|
package/out/store.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ImmutableRegistryPath } from "@rbxts/centurion";
|
|
2
|
-
import { Suggestion } from "./types";
|
|
3
|
-
export declare const visible: import("@rbxts/vide").Source<boolean>;
|
|
4
|
-
export declare const options: import("@rbxts/vide").Source<import("./types").InterfaceOptions>;
|
|
5
|
-
export declare const mouseOverInterface: import("@rbxts/vide").Source<boolean>;
|
|
6
|
-
export declare const currentCommandPath: import("@rbxts/vide").Source<ImmutableRegistryPath | undefined>;
|
|
7
|
-
export declare const commandArgIndex: import("@rbxts/vide").Source<number | undefined>;
|
|
8
|
-
export declare const terminalArgIndex: import("@rbxts/vide").Source<number | undefined>;
|
|
9
|
-
export declare const currentSuggestion: import("@rbxts/vide").Source<Suggestion | undefined>;
|
|
10
|
-
export declare const terminalText: import("@rbxts/vide").Source<string>;
|
|
11
|
-
export declare const terminalTextValid: import("@rbxts/vide").Source<boolean>;
|
|
12
|
-
export declare const currentTextPart: import("@rbxts/vide").Source<string | undefined>;
|
package/out/store.luau
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
-- Compiled with roblox-ts v3.0.0
|
|
2
|
-
local TS = _G[script]
|
|
3
|
-
local source = TS.import(script, TS.getModule(script, "@rbxts", "vide").src).source
|
|
4
|
-
local DEFAULT_INTERFACE_OPTIONS = TS.import(script, script.Parent, "constants", "options").DEFAULT_INTERFACE_OPTIONS
|
|
5
|
-
local visible = source(false)
|
|
6
|
-
local options = source(DEFAULT_INTERFACE_OPTIONS)
|
|
7
|
-
local mouseOverInterface = source(false)
|
|
8
|
-
local currentCommandPath = source(nil)
|
|
9
|
-
local commandArgIndex = source(nil)
|
|
10
|
-
local terminalArgIndex = source(nil)
|
|
11
|
-
local currentSuggestion = source(nil)
|
|
12
|
-
local terminalText = source("")
|
|
13
|
-
local terminalTextValid = source(false)
|
|
14
|
-
local currentTextPart = source(nil)
|
|
15
|
-
return {
|
|
16
|
-
visible = visible,
|
|
17
|
-
options = options,
|
|
18
|
-
mouseOverInterface = mouseOverInterface,
|
|
19
|
-
currentCommandPath = currentCommandPath,
|
|
20
|
-
commandArgIndex = commandArgIndex,
|
|
21
|
-
terminalArgIndex = terminalArgIndex,
|
|
22
|
-
currentSuggestion = currentSuggestion,
|
|
23
|
-
terminalText = terminalText,
|
|
24
|
-
terminalTextValid = terminalTextValid,
|
|
25
|
-
currentTextPart = currentTextPart,
|
|
26
|
-
}
|
package/out/types.d.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { CommandShortcut, HistoryEntry } from "@rbxts/centurion";
|
|
2
|
-
import { ScaleFunction } from "./hooks/use-px";
|
|
3
|
-
import { InterfacePalette } from "./palette";
|
|
4
|
-
export interface InterfaceOptions {
|
|
5
|
-
anchor: Vector2;
|
|
6
|
-
position: UDim2 | ((px: ScaleFunction) => UDim2);
|
|
7
|
-
size: UDim2 | ((px: ScaleFunction) => UDim2);
|
|
8
|
-
displayOrder: number;
|
|
9
|
-
backgroundTransparency: number;
|
|
10
|
-
hideOnLostFocus: boolean;
|
|
11
|
-
activationKeys: Enum.KeyCode[];
|
|
12
|
-
font: {
|
|
13
|
-
regular: Font;
|
|
14
|
-
medium: Font;
|
|
15
|
-
bold: Font;
|
|
16
|
-
};
|
|
17
|
-
palette: InterfacePalette;
|
|
18
|
-
autoLocalize: boolean;
|
|
19
|
-
}
|
|
20
|
-
export interface HistoryLineData {
|
|
21
|
-
entry: HistoryEntry;
|
|
22
|
-
height: number;
|
|
23
|
-
}
|
|
24
|
-
export interface HistoryData {
|
|
25
|
-
lines: HistoryLineData[];
|
|
26
|
-
height: number;
|
|
27
|
-
}
|
|
28
|
-
export interface CommandSuggestion {
|
|
29
|
-
type: "command";
|
|
30
|
-
title: string;
|
|
31
|
-
others: string[];
|
|
32
|
-
description?: string;
|
|
33
|
-
shortcuts?: CommandShortcut[];
|
|
34
|
-
}
|
|
35
|
-
export interface ArgumentSuggestion {
|
|
36
|
-
type: "argument";
|
|
37
|
-
title: string;
|
|
38
|
-
others: string[];
|
|
39
|
-
description?: string;
|
|
40
|
-
dataType: string;
|
|
41
|
-
optional: boolean;
|
|
42
|
-
error?: string;
|
|
43
|
-
}
|
|
44
|
-
export type Suggestion = CommandSuggestion | ArgumentSuggestion;
|
package/out/types.luau
DELETED
package/out/utils/string.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare function containsSpace(text: string): boolean;
|
|
2
|
-
export declare function stripQuotes(text: string): string;
|
|
3
|
-
export declare function getQuoteChar(text: string): string;
|
|
4
|
-
export declare function isQuoteStarted(text: string): boolean;
|
|
5
|
-
export declare function isQuoteEnded(text: string): boolean;
|
package/out/utils/string.luau
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
-- Compiled with roblox-ts v3.0.0
|
|
2
|
-
local START_QUOTE_PATTERN = `^(['"])`
|
|
3
|
-
local END_QUOTE_PATTERN = `(['"])%s*$`
|
|
4
|
-
local function containsSpace(text)
|
|
5
|
-
return not (#{ string.match(text, "%s") } == 0)
|
|
6
|
-
end
|
|
7
|
-
local function stripQuotes(text)
|
|
8
|
-
return (string.gsub((string.gsub(text, START_QUOTE_PATTERN, "")), END_QUOTE_PATTERN, ""))
|
|
9
|
-
end
|
|
10
|
-
local function getQuoteChar(text)
|
|
11
|
-
return (string.match(text, START_QUOTE_PATTERN))
|
|
12
|
-
end
|
|
13
|
-
local function isQuoteStarted(text)
|
|
14
|
-
return (string.match(text, START_QUOTE_PATTERN)) ~= nil
|
|
15
|
-
end
|
|
16
|
-
local function isQuoteEnded(text)
|
|
17
|
-
return (string.match(text, END_QUOTE_PATTERN)) ~= nil
|
|
18
|
-
end
|
|
19
|
-
return {
|
|
20
|
-
containsSpace = containsSpace,
|
|
21
|
-
stripQuotes = stripQuotes,
|
|
22
|
-
getQuoteChar = getQuoteChar,
|
|
23
|
-
isQuoteStarted = isQuoteStarted,
|
|
24
|
-
isQuoteEnded = isQuoteEnded,
|
|
25
|
-
}
|