@rbxts/centurion-ui 1.0.0-dev-c2dc3d9 → 1.0.0-dev-e01f578
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/out/app/init.lua +26 -0
- package/out/palette.d.ts +0 -9
- package/out/palette.lua +0 -9
- package/package.json +4 -4
package/out/app/init.lua
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v2.3.0-dev-26ec859
|
|
2
2
|
local TS = _G[script]
|
|
3
|
+
local CenturionType = TS.import(script, TS.getModule(script, "@rbxts", "centurion").out).CenturionType
|
|
3
4
|
local _services = TS.import(script, TS.getModule(script, "@rbxts", "services"))
|
|
4
5
|
local ContentProvider = _services.ContentProvider
|
|
5
6
|
local Players = _services.Players
|
|
6
7
|
local mount = TS.import(script, TS.getModule(script, "@rbxts", "vide").src).mount
|
|
7
8
|
local DEFAULT_INTERFACE_OPTIONS = TS.import(script, script.Parent, "constants", "options").DEFAULT_INTERFACE_OPTIONS
|
|
9
|
+
local DefaultPalette = TS.import(script, script.Parent, "palette").DefaultPalette
|
|
8
10
|
local interfaceOptions = TS.import(script, script.Parent, "store").interfaceOptions
|
|
9
11
|
local CenturionApp = TS.import(script, script, "centurion-app").CenturionApp
|
|
10
12
|
local CenturionUI = {}
|
|
@@ -23,11 +25,35 @@ do
|
|
|
23
25
|
end)
|
|
24
26
|
end
|
|
25
27
|
_container.updateOptions = updateOptions
|
|
28
|
+
local function registerCommands(registry)
|
|
29
|
+
registry:registerCommand({
|
|
30
|
+
name = "theme",
|
|
31
|
+
description = "Change the terminal's theme",
|
|
32
|
+
arguments = { {
|
|
33
|
+
name = "name",
|
|
34
|
+
description = "The name of the theme",
|
|
35
|
+
type = CenturionType.String,
|
|
36
|
+
suggestions = { "mocha", "macchiato", "frappe", "latte" },
|
|
37
|
+
} },
|
|
38
|
+
}, function(ctx, theme)
|
|
39
|
+
if not (DefaultPalette[theme] ~= nil) then
|
|
40
|
+
ctx:error("Invalid theme")
|
|
41
|
+
return nil
|
|
42
|
+
end
|
|
43
|
+
updateOptions({
|
|
44
|
+
palette = DefaultPalette[theme],
|
|
45
|
+
})
|
|
46
|
+
ctx:reply(`Set theme to '{theme}'`)
|
|
47
|
+
end, { "centurion" })
|
|
48
|
+
end
|
|
26
49
|
local function create(options)
|
|
27
50
|
if options == nil then
|
|
28
51
|
options = {}
|
|
29
52
|
end
|
|
30
53
|
return function(api)
|
|
54
|
+
if api.options.registerBuiltInCommands then
|
|
55
|
+
registerCommands(api.registry)
|
|
56
|
+
end
|
|
31
57
|
updateOptions(options)
|
|
32
58
|
-- Attempt to preload font
|
|
33
59
|
task.spawn(function()
|
package/out/palette.d.ts
CHANGED
|
@@ -44,13 +44,4 @@ export declare const DefaultPalette: {
|
|
|
44
44
|
readonly success: Color3;
|
|
45
45
|
readonly error: Color3;
|
|
46
46
|
};
|
|
47
|
-
readonly builder: {
|
|
48
|
-
readonly background: Color3;
|
|
49
|
-
readonly surface: Color3;
|
|
50
|
-
readonly text: Color3;
|
|
51
|
-
readonly subtext: Color3;
|
|
52
|
-
readonly highlight: Color3;
|
|
53
|
-
readonly success: Color3;
|
|
54
|
-
readonly error: Color3;
|
|
55
|
-
};
|
|
56
47
|
};
|
package/out/palette.lua
CHANGED
|
@@ -36,15 +36,6 @@ local DefaultPalette = {
|
|
|
36
36
|
success = Color3.fromRGB(64, 160, 43),
|
|
37
37
|
error = Color3.fromRGB(210, 15, 57),
|
|
38
38
|
},
|
|
39
|
-
builder = {
|
|
40
|
-
background = Color3.fromRGB(0, 0, 0),
|
|
41
|
-
surface = Color3.fromRGB(53, 53, 53),
|
|
42
|
-
text = Color3.fromRGB(255, 255, 255),
|
|
43
|
-
subtext = Color3.fromRGB(162, 162, 162),
|
|
44
|
-
highlight = Color3.fromRGB(239, 122, 54),
|
|
45
|
-
success = Color3.fromRGB(78, 204, 90),
|
|
46
|
-
error = Color3.fromRGB(255, 68, 68),
|
|
47
|
-
},
|
|
48
39
|
}
|
|
49
40
|
return {
|
|
50
41
|
DefaultPalette = DefaultPalette,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rbxts/centurion-ui",
|
|
3
3
|
"description": "Terminal UI for the Centurion command framework",
|
|
4
|
-
"version": "1.0.0-dev-
|
|
4
|
+
"version": "1.0.0-dev-e01f578",
|
|
5
5
|
"author": "paradoxuum",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "out/init.lua",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"dev": "shx rm -rf out && rbxtsc -w"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@rbxts/centurion": "^1.0.0-dev-
|
|
35
|
+
"@rbxts/centurion": "^1.0.0-dev-e01f578",
|
|
36
36
|
"@rbxts/compiler-types": "2.3.0-types.1",
|
|
37
37
|
"@rbxts/types": "^1.0.790",
|
|
38
38
|
"roblox-ts": "2.3.0-dev-26ec859",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@rbxts/vide": "^0.4.1"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@rbxts/centurion": "^1.0.0-dev-
|
|
50
|
+
"@rbxts/centurion": "^1.0.0-dev-e01f578"
|
|
51
51
|
},
|
|
52
|
-
"stableVersion": "
|
|
52
|
+
"stableVersion": "1.0.0"
|
|
53
53
|
}
|