Update config, BasaltLS definitions, bundle and changelog
This commit is contained in:
6130
BasaltLS.lua
6130
BasaltLS.lua
File diff suppressed because it is too large
Load Diff
620
config.lua
620
config.lua
@@ -1,404 +1,404 @@
|
||||
return {
|
||||
["metadata"] = {
|
||||
["generated"] = "Mon Mar 31 06:04:16 2025",
|
||||
["version"] = "2.0",
|
||||
},
|
||||
["categories"] = {
|
||||
["core"] = {
|
||||
["files"] = {
|
||||
["init"] = {
|
||||
["default"] = true,
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "init.lua",
|
||||
["description"] = "",
|
||||
["size"] = 583,
|
||||
},
|
||||
["main"] = {
|
||||
["default"] = true,
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "main.lua",
|
||||
["description"] = "",
|
||||
["size"] = 10282,
|
||||
},
|
||||
["propertySystem"] = {
|
||||
["default"] = true,
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "propertySystem.lua",
|
||||
["description"] = "",
|
||||
["size"] = 15224,
|
||||
},
|
||||
["errorManager"] = {
|
||||
["default"] = true,
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "errorManager.lua",
|
||||
["description"] = "",
|
||||
["size"] = 3789,
|
||||
},
|
||||
["log"] = {
|
||||
["default"] = true,
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "log.lua",
|
||||
["description"] = "",
|
||||
["size"] = 3142,
|
||||
},
|
||||
["elementManager"] = {
|
||||
["default"] = true,
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "elementManager.lua",
|
||||
["description"] = "",
|
||||
["size"] = 6297,
|
||||
},
|
||||
["render"] = {
|
||||
["default"] = true,
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "render.lua",
|
||||
["description"] = "",
|
||||
["size"] = 12422,
|
||||
},
|
||||
},
|
||||
["description"] = "Core Files",
|
||||
},
|
||||
["libraries"] = {
|
||||
["files"] = {
|
||||
["utils"] = {
|
||||
["default"] = true,
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "libraries/utils.lua",
|
||||
["description"] = "",
|
||||
["size"] = 2661,
|
||||
},
|
||||
["expect"] = {
|
||||
["size"] = 846,
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "libraries/expect.lua",
|
||||
["description"] = "",
|
||||
["size"] = 846,
|
||||
},
|
||||
["colorHex"] = {
|
||||
["size"] = 132,
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "libraries/colorHex.lua",
|
||||
},
|
||||
["utils"] = {
|
||||
["size"] = 2661,
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["size"] = 132,
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "libraries/utils.lua",
|
||||
},
|
||||
},
|
||||
["description"] = "Libraries",
|
||||
},
|
||||
["plugins"] = {
|
||||
["core"] = {
|
||||
["files"] = {
|
||||
["state"] = {
|
||||
["elementManager"] = {
|
||||
["size"] = 6297,
|
||||
["default"] = true,
|
||||
["requires"] = {
|
||||
[1] = "Container",
|
||||
},
|
||||
["path"] = "plugins/state.lua",
|
||||
["description"] = "",
|
||||
["size"] = 6926,
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "elementManager.lua",
|
||||
},
|
||||
["reactive"] = {
|
||||
["main"] = {
|
||||
["size"] = 10282,
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "plugins/reactive.lua",
|
||||
["description"] = "",
|
||||
["size"] = 6962,
|
||||
["path"] = "main.lua",
|
||||
},
|
||||
["canvas"] = {
|
||||
["errorManager"] = {
|
||||
["size"] = 3789,
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "plugins/canvas.lua",
|
||||
["description"] = "",
|
||||
["size"] = 8002,
|
||||
["path"] = "errorManager.lua",
|
||||
},
|
||||
["animation"] = {
|
||||
["propertySystem"] = {
|
||||
["size"] = 15224,
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "plugins/animation.lua",
|
||||
["description"] = "",
|
||||
["size"] = 14749,
|
||||
["path"] = "propertySystem.lua",
|
||||
},
|
||||
["debug"] = {
|
||||
["log"] = {
|
||||
["size"] = 3142,
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "plugins/debug.lua",
|
||||
["description"] = "",
|
||||
["size"] = 6175,
|
||||
["path"] = "log.lua",
|
||||
},
|
||||
["xml"] = {
|
||||
["init"] = {
|
||||
["size"] = 583,
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "plugins/xml.lua",
|
||||
["description"] = "",
|
||||
["size"] = 9901,
|
||||
["path"] = "init.lua",
|
||||
},
|
||||
["theme"] = {
|
||||
["render"] = {
|
||||
["size"] = 12422,
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "plugins/theme.lua",
|
||||
["description"] = "",
|
||||
["size"] = 5901,
|
||||
},
|
||||
["benchmark"] = {
|
||||
["default"] = true,
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "plugins/benchmark.lua",
|
||||
["description"] = "",
|
||||
["size"] = 12497,
|
||||
["path"] = "render.lua",
|
||||
},
|
||||
},
|
||||
["description"] = "Plugins",
|
||||
["description"] = "Core Files",
|
||||
},
|
||||
["elements"] = {
|
||||
["files"] = {
|
||||
["TextBox"] = {
|
||||
["default"] = false,
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/TextBox.lua",
|
||||
["description"] = "A multi-line text editor component with cursor support and text manipulation features",
|
||||
["size"] = 10904,
|
||||
},
|
||||
["LineChart"] = {
|
||||
["default"] = false,
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "elements/LineChart.lua",
|
||||
["description"] = "",
|
||||
["size"] = 2707,
|
||||
},
|
||||
["Tree"] = {
|
||||
["default"] = true,
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/Tree.lua",
|
||||
["description"] = "",
|
||||
["size"] = 7919,
|
||||
},
|
||||
["Label"] = {
|
||||
["default"] = true,
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/Label.lua",
|
||||
["description"] = "A simple text display element that automatically resizes its width based on the text content.",
|
||||
["size"] = 3069,
|
||||
},
|
||||
["Dropdown"] = {
|
||||
["default"] = false,
|
||||
["requires"] = {
|
||||
[1] = "List",
|
||||
},
|
||||
["path"] = "elements/Dropdown.lua",
|
||||
["description"] = "A dropdown menu that shows a list of selectable items",
|
||||
["size"] = 5941,
|
||||
},
|
||||
["List"] = {
|
||||
["default"] = true,
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/List.lua",
|
||||
["description"] = "A scrollable list of selectable items",
|
||||
["size"] = 8684,
|
||||
},
|
||||
["Image"] = {
|
||||
["default"] = false,
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/Image.lua",
|
||||
["description"] = "An element that displays an image in bimg format",
|
||||
["size"] = 15102,
|
||||
},
|
||||
["Frame"] = {
|
||||
["default"] = true,
|
||||
["requires"] = {
|
||||
[1] = "Container",
|
||||
},
|
||||
["path"] = "elements/Frame.lua",
|
||||
["description"] = "A frame element that serves as a grouping container for other elements.",
|
||||
["size"] = 4435,
|
||||
},
|
||||
["Scrollbar"] = {
|
||||
["default"] = true,
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/Scrollbar.lua",
|
||||
["description"] = "",
|
||||
["size"] = 9164,
|
||||
},
|
||||
["BaseElement"] = {
|
||||
["default"] = true,
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "elements/BaseElement.lua",
|
||||
["description"] = "The base class for all UI elements in Basalt.",
|
||||
["size"] = 9402,
|
||||
},
|
||||
["Input"] = {
|
||||
["default"] = true,
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/Input.lua",
|
||||
["description"] = "A text input field with various features",
|
||||
["size"] = 8358,
|
||||
},
|
||||
["BarChart"] = {
|
||||
["default"] = false,
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "elements/BarChart.lua",
|
||||
["description"] = "",
|
||||
["size"] = 2635,
|
||||
},
|
||||
["Menu"] = {
|
||||
["default"] = true,
|
||||
["requires"] = {
|
||||
[1] = "List",
|
||||
},
|
||||
["path"] = "elements/Menu.lua",
|
||||
["description"] = "A horizontal menu bar with selectable items.",
|
||||
["size"] = 4657,
|
||||
},
|
||||
["Display"] = {
|
||||
["default"] = false,
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/Display.lua",
|
||||
["description"] = "The Display is a special element which uses the cc window API which you can use.",
|
||||
["size"] = 3964,
|
||||
},
|
||||
["VisualElement"] = {
|
||||
["default"] = true,
|
||||
["requires"] = {
|
||||
[1] = "BaseElement",
|
||||
},
|
||||
["path"] = "elements/VisualElement.lua",
|
||||
["description"] = "The Visual Element class which is the base class for all visual UI elements",
|
||||
["size"] = 17732,
|
||||
},
|
||||
["BigFont"] = {
|
||||
["default"] = false,
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/BigFont.lua",
|
||||
["description"] = "",
|
||||
["size"] = 20670,
|
||||
},
|
||||
["Button"] = {
|
||||
["default"] = true,
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/Button.lua",
|
||||
["description"] = "",
|
||||
["size"] = 1632,
|
||||
},
|
||||
["BaseFrame"] = {
|
||||
["default"] = true,
|
||||
["requires"] = {
|
||||
[1] = "Container",
|
||||
},
|
||||
["path"] = "elements/BaseFrame.lua",
|
||||
["description"] = "This is the base frame class. It is the root element of all elements and the only element without a parent.",
|
||||
["size"] = 8439,
|
||||
},
|
||||
["ProgressBar"] = {
|
||||
["default"] = true,
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/ProgressBar.lua",
|
||||
["description"] = "",
|
||||
["size"] = 2272,
|
||||
},
|
||||
["Container"] = {
|
||||
["size"] = 24547,
|
||||
["default"] = true,
|
||||
["description"] = "The container class. It is a visual element that can contain other elements. It is the base class for all containers",
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/Container.lua",
|
||||
["description"] = "The container class. It is a visual element that can contain other elements. It is the base class for all containers",
|
||||
["size"] = 24547,
|
||||
},
|
||||
["Frame"] = {
|
||||
["size"] = 4435,
|
||||
["default"] = true,
|
||||
["description"] = "A frame element that serves as a grouping container for other elements.",
|
||||
["requires"] = {
|
||||
[1] = "Container",
|
||||
},
|
||||
["path"] = "elements/Frame.lua",
|
||||
},
|
||||
["Dropdown"] = {
|
||||
["size"] = 5941,
|
||||
["default"] = false,
|
||||
["description"] = "A dropdown menu that shows a list of selectable items",
|
||||
["requires"] = {
|
||||
[1] = "List",
|
||||
},
|
||||
["path"] = "elements/Dropdown.lua",
|
||||
},
|
||||
["Flexbox"] = {
|
||||
["size"] = 11530,
|
||||
["default"] = true,
|
||||
["description"] = "A flexbox container that arranges its children in a flexible layout.",
|
||||
["requires"] = {
|
||||
[1] = "Container",
|
||||
},
|
||||
["path"] = "elements/Flexbox.lua",
|
||||
["description"] = "A flexbox container that arranges its children in a flexible layout.",
|
||||
["size"] = 11530,
|
||||
},
|
||||
["Slider"] = {
|
||||
["BaseFrame"] = {
|
||||
["size"] = 8439,
|
||||
["default"] = true,
|
||||
["description"] = "This is the base frame class. It is the root element of all elements and the only element without a parent.",
|
||||
["requires"] = {
|
||||
[1] = "Container",
|
||||
},
|
||||
["path"] = "elements/BaseFrame.lua",
|
||||
},
|
||||
["ProgressBar"] = {
|
||||
["size"] = 2272,
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/Slider.lua",
|
||||
["description"] = "",
|
||||
["size"] = 4676,
|
||||
["path"] = "elements/ProgressBar.lua",
|
||||
},
|
||||
["Program"] = {
|
||||
["Input"] = {
|
||||
["size"] = 8358,
|
||||
["default"] = true,
|
||||
["description"] = "A text input field with various features",
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/Program.lua",
|
||||
["description"] = "",
|
||||
["size"] = 6295,
|
||||
["path"] = "elements/Input.lua",
|
||||
},
|
||||
["Graph"] = {
|
||||
["Button"] = {
|
||||
["size"] = 1632,
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/Button.lua",
|
||||
},
|
||||
["Display"] = {
|
||||
["size"] = 3964,
|
||||
["default"] = false,
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "elements/Graph.lua",
|
||||
["description"] = "A point based graph element",
|
||||
["size"] = 5940,
|
||||
},
|
||||
["Table"] = {
|
||||
["default"] = true,
|
||||
["description"] = "The Display is a special element which uses the cc window API which you can use.",
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/Table.lua",
|
||||
["description"] = "",
|
||||
["size"] = 7586,
|
||||
["path"] = "elements/Display.lua",
|
||||
},
|
||||
["Checkbox"] = {
|
||||
["size"] = 2872,
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/Checkbox.lua",
|
||||
},
|
||||
["Graph"] = {
|
||||
["size"] = 5940,
|
||||
["default"] = false,
|
||||
["description"] = "A point based graph element",
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "elements/Graph.lua",
|
||||
},
|
||||
["Program"] = {
|
||||
["size"] = 6295,
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["size"] = 2872,
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/Program.lua",
|
||||
},
|
||||
["List"] = {
|
||||
["size"] = 8684,
|
||||
["default"] = true,
|
||||
["description"] = "A scrollable list of selectable items",
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/List.lua",
|
||||
},
|
||||
["Menu"] = {
|
||||
["size"] = 4657,
|
||||
["default"] = true,
|
||||
["description"] = "A horizontal menu bar with selectable items.",
|
||||
["requires"] = {
|
||||
[1] = "List",
|
||||
},
|
||||
["path"] = "elements/Menu.lua",
|
||||
},
|
||||
["Scrollbar"] = {
|
||||
["size"] = 9164,
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/Scrollbar.lua",
|
||||
},
|
||||
["Label"] = {
|
||||
["size"] = 3069,
|
||||
["default"] = true,
|
||||
["description"] = "A simple text display element that automatically resizes its width based on the text content.",
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/Label.lua",
|
||||
},
|
||||
["Tree"] = {
|
||||
["size"] = 7919,
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/Tree.lua",
|
||||
},
|
||||
["VisualElement"] = {
|
||||
["size"] = 17732,
|
||||
["default"] = true,
|
||||
["description"] = "The Visual Element class which is the base class for all visual UI elements",
|
||||
["requires"] = {
|
||||
[1] = "BaseElement",
|
||||
},
|
||||
["path"] = "elements/VisualElement.lua",
|
||||
},
|
||||
["TextBox"] = {
|
||||
["size"] = 10904,
|
||||
["default"] = false,
|
||||
["description"] = "A multi-line text editor component with cursor support and text manipulation features",
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/TextBox.lua",
|
||||
},
|
||||
["BarChart"] = {
|
||||
["size"] = 2635,
|
||||
["default"] = false,
|
||||
["description"] = "",
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "elements/BarChart.lua",
|
||||
},
|
||||
["Slider"] = {
|
||||
["size"] = 4676,
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/Slider.lua",
|
||||
},
|
||||
["BaseElement"] = {
|
||||
["size"] = 9402,
|
||||
["default"] = true,
|
||||
["description"] = "The base class for all UI elements in Basalt.",
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "elements/BaseElement.lua",
|
||||
},
|
||||
["Table"] = {
|
||||
["size"] = 7586,
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/Table.lua",
|
||||
},
|
||||
["BigFont"] = {
|
||||
["size"] = 20670,
|
||||
["default"] = false,
|
||||
["description"] = "",
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/BigFont.lua",
|
||||
},
|
||||
["LineChart"] = {
|
||||
["size"] = 2707,
|
||||
["default"] = false,
|
||||
["description"] = "",
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "elements/LineChart.lua",
|
||||
},
|
||||
["Image"] = {
|
||||
["size"] = 15102,
|
||||
["default"] = false,
|
||||
["description"] = "An element that displays an image in bimg format",
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "elements/Image.lua",
|
||||
},
|
||||
},
|
||||
["description"] = "UI Elements",
|
||||
},
|
||||
},
|
||||
["metadata"] = {
|
||||
["version"] = "2.0",
|
||||
["generated"] = "Mon Mar 31 01:35:48 2025",
|
||||
["plugins"] = {
|
||||
["files"] = {
|
||||
["theme"] = {
|
||||
["size"] = 5901,
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "plugins/theme.lua",
|
||||
},
|
||||
["reactive"] = {
|
||||
["size"] = 6962,
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "plugins/reactive.lua",
|
||||
},
|
||||
["state"] = {
|
||||
["size"] = 6926,
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["requires"] = {
|
||||
[1] = "Container",
|
||||
},
|
||||
["path"] = "plugins/state.lua",
|
||||
},
|
||||
["debug"] = {
|
||||
["size"] = 6250,
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "plugins/debug.lua",
|
||||
},
|
||||
["xml"] = {
|
||||
["size"] = 9901,
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "plugins/xml.lua",
|
||||
},
|
||||
["benchmark"] = {
|
||||
["size"] = 12497,
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["requires"] = {
|
||||
[1] = "VisualElement",
|
||||
},
|
||||
["path"] = "plugins/benchmark.lua",
|
||||
},
|
||||
["canvas"] = {
|
||||
["size"] = 8002,
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "plugins/canvas.lua",
|
||||
},
|
||||
["animation"] = {
|
||||
["size"] = 14749,
|
||||
["default"] = true,
|
||||
["description"] = "",
|
||||
["requires"] = {
|
||||
},
|
||||
["path"] = "plugins/animation.lua",
|
||||
},
|
||||
},
|
||||
["description"] = "Plugins",
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -2245,55 +2245,55 @@ local db=cb.get("canvas")
|
||||
if db and#db.commands.post>0 then for _c,ac in
|
||||
ipairs(db.commands.post)do ac(cb)end end end;return
|
||||
{VisualElement=bb,API=da} end
|
||||
project["plugins/debug.lua"] = function(...) local da=require("log")local _b=require("libraries/colorHex")
|
||||
local ab=10;local bb=false
|
||||
local function cb(bc)
|
||||
local cc={renderCount=0,eventCount={},lastRender=os.epoch("utc"),properties={},children={}}
|
||||
project["plugins/debug.lua"] = function(...) local _b=require("log")local ab=require("libraries/colorHex")
|
||||
local bb=10;local cb=false;local db={ERROR=1,WARN=2,INFO=3,DEBUG=4}
|
||||
local function _c(dc)
|
||||
local _d={renderCount=0,eventCount={},lastRender=os.epoch("utc"),properties={},children={}}
|
||||
return
|
||||
{trackProperty=function(dc,_d)cc.properties[dc]=_d end,trackRender=function()
|
||||
cc.renderCount=cc.renderCount+1;cc.lastRender=os.epoch("utc")end,trackEvent=function(dc)cc.eventCount[dc]=(
|
||||
cc.eventCount[dc]or 0)+1 end,dump=function()return
|
||||
{type=bc.get("type"),id=bc.get("id"),stats=cc}end}end;local db={}function db.debug(bc,cc)bc._debugger=cb(bc)
|
||||
bc._debugLevel=cc or DEBUG_LEVELS.INFO;return bc end
|
||||
function db.dumpDebug(bc)if
|
||||
not bc._debugger then return end;return bc._debugger.dump()end;local _c={}
|
||||
function _c.showDebugLog(bc)
|
||||
if not bc._debugFrame then local cc=bc.get("width")
|
||||
local dc=bc.get("height")
|
||||
bc._debugFrame=bc:addFrame("basaltDebugLog"):setWidth(cc):setHeight(dc):setZ(999):listenEvent("mouse_scroll",true)
|
||||
bc.basalt.LOGGER.debug("Created debug log frame "..bc._debugFrame.get("name"))
|
||||
bc._debugFrame:addButton("basaltDebugLogClose"):setWidth(9):setHeight(1):setX(
|
||||
cc-8):setY(dc):setText("Close"):onMouseClick(function()
|
||||
bc:hideDebugLog()end)bc._debugFrame._scrollOffset=0
|
||||
bc._debugFrame._processedLogs={}
|
||||
local function _d(__a,a_a)local b_a={}while#__a>0 do local c_a=__a:sub(1,a_a)table.insert(b_a,c_a)__a=__a:sub(
|
||||
a_a+1)end;return b_a end
|
||||
local function ad()local __a={}local a_a=bc._debugFrame.get("width")
|
||||
for b_a,c_a in
|
||||
ipairs(da._logs)do local d_a=_d(c_a.message,a_a)for _aa,aaa in ipairs(d_a)do
|
||||
table.insert(__a,{text=aaa,level=c_a.level})end end;return __a end;local bd=#ad()-bc.get("height")bc._scrollOffset=bd
|
||||
local cd=bc._debugFrame.render
|
||||
bc._debugFrame.render=function(__a)cd(__a)__a._processedLogs=ad()
|
||||
local a_a=__a.get("height")-2;local b_a=#__a._processedLogs;local c_a=math.max(0,b_a-a_a)
|
||||
__a._scrollOffset=math.min(__a._scrollOffset,c_a)
|
||||
for i=1,a_a-2 do local d_a=i+__a._scrollOffset
|
||||
local _aa=__a._processedLogs[d_a]
|
||||
if _aa then
|
||||
local aaa=
|
||||
|
||||
_aa.level==da.LEVEL.ERROR and colors.red or _aa.level==
|
||||
da.LEVEL.WARN and colors.yellow or _aa.level==da.LEVEL.DEBUG and colors.lightGray or colors.white;__a:textFg(2,i,_aa.text,aaa)end end end;local dd=bc._debugFrame.dispatchEvent
|
||||
bc._debugFrame.dispatchEvent=function(__a,a_a,b_a,...)
|
||||
{trackProperty=function(ad,bd)_d.properties[ad]=bd end,trackRender=function()
|
||||
_d.renderCount=_d.renderCount+1;_d.lastRender=os.epoch("utc")end,trackEvent=function(ad)_d.eventCount[ad]=(
|
||||
_d.eventCount[ad]or 0)+1 end,dump=function()return
|
||||
{type=dc.get("type"),id=dc.get("id"),stats=_d}end}end;local ac={}
|
||||
function ac.debug(dc,_d)dc._debugger=_c(dc)dc._debugLevel=_d or db.INFO;return dc end;function ac.dumpDebug(dc)if not dc._debugger then return end
|
||||
return dc._debugger.dump()end;local bc={}
|
||||
function bc.openConsole(dc)
|
||||
if
|
||||
(a_a=="mouse_scroll")then
|
||||
__a._scrollOffset=math.max(0,__a._scrollOffset+b_a)__a:updateRender()return true else dd(__a,a_a,b_a,...)end end end;bc._debugFrame.set("visible",true)return bc end
|
||||
function _c.hideDebugLog(bc)if bc._debugFrame then
|
||||
bc._debugFrame.set("visible",false)end;return bc end;function _c.toggleDebugLog(bc)if bc._debugFrame and bc._debugFrame:isVisible()then
|
||||
bc:hideDebugLog()else bc:showDebugLog()end
|
||||
return bc end
|
||||
local ac={}
|
||||
function ac.debugChildren(bc,cc)bc:debug(cc)for dc,_d in pairs(bc.get("children"))do if _d.debug then
|
||||
_d:debug(cc)end end;return bc end;return{BaseElement=db,Container=ac,BaseFrame=_c} end
|
||||
not dc._debugFrame then local _d=dc.get("width")local ad=dc.get("height")
|
||||
dc._debugFrame=dc:addFrame("basaltDebugLog"):setWidth(_d):setHeight(ad):listenEvent("mouse_scroll",true)
|
||||
dc._debugFrame:addButton("basaltDebugLogClose"):setWidth(9):setHeight(1):setX(
|
||||
_d-8):setY(ad):setText("Close"):onClick(function()
|
||||
dc:closeConsole()end)dc._debugFrame._scrollOffset=0
|
||||
dc._debugFrame._processedLogs={}
|
||||
local function bd(b_a,c_a)local d_a={}while#b_a>0 do local _aa=b_a:sub(1,c_a)table.insert(d_a,_aa)b_a=b_a:sub(
|
||||
c_a+1)end;return d_a end
|
||||
local function cd()local b_a={}local c_a=dc._debugFrame.get("width")
|
||||
for d_a,_aa in
|
||||
ipairs(_b._logs)do local aaa=bd(_aa.message,c_a)for baa,caa in ipairs(aaa)do
|
||||
table.insert(b_a,{text=caa,level=_aa.level})end end;return b_a end;local dd=#cd()-dc.get("height")dc._scrollOffset=dd
|
||||
local __a=dc._debugFrame.render
|
||||
dc._debugFrame.render=function(b_a)__a(b_a)b_a._processedLogs=cd()
|
||||
local c_a=b_a.get("height")-2;local d_a=#b_a._processedLogs;local _aa=math.max(0,d_a-c_a)
|
||||
b_a._scrollOffset=math.min(b_a._scrollOffset,_aa)
|
||||
for i=1,c_a-2 do local aaa=i+b_a._scrollOffset
|
||||
local baa=b_a._processedLogs[aaa]
|
||||
if baa then
|
||||
local caa=
|
||||
|
||||
baa.level==_b.LEVEL.ERROR and colors.red or baa.level==
|
||||
_b.LEVEL.WARN and colors.yellow or baa.level==_b.LEVEL.DEBUG and colors.lightGray or colors.white;b_a:textFg(2,i,baa.text,caa)end end end;local a_a=dc._debugFrame.dispatchEvent
|
||||
dc._debugFrame.dispatchEvent=function(b_a,c_a,d_a,...)
|
||||
if
|
||||
(c_a=="mouse_scroll")then
|
||||
b_a._scrollOffset=math.max(0,b_a._scrollOffset+d_a)b_a:updateRender()return true else return a_a(b_a,c_a,d_a,...)end end end
|
||||
dc._debugFrame.set("width",dc.get("width"))
|
||||
dc._debugFrame.set("height",dc.get("height"))dc._debugFrame.set("visible",true)return dc end
|
||||
function bc.closeConsole(dc)if dc._debugFrame then
|
||||
dc._debugFrame.set("visible",false)end;return dc end;function bc.toggleConsole(dc)if dc._debugFrame and dc._debugFrame:getVisible()then
|
||||
dc:closeConsole()else dc:openConsole()end
|
||||
return dc end
|
||||
local cc={}
|
||||
function cc.debugChildren(dc,_d)dc:debug(_d)for ad,bd in pairs(dc.get("children"))do if bd.debug then
|
||||
bd:debug(_d)end end;return dc end;return{BaseElement=ac,Container=cc,BaseFrame=bc} end
|
||||
project["plugins/benchmark.lua"] = function(...) local ca=require("log")local da=setmetatable({},{__mode="k"})local function _b()return
|
||||
{methods={}}end
|
||||
local function ab(_c,ac)local bc=_c[ac]
|
||||
|
||||
Reference in New Issue
Block a user