This commit is contained in:
Robert Jelic
2025-10-03 03:25:52 +02:00
3 changed files with 4457 additions and 4446 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,439 +1,439 @@
return { return {
["metadata"] = {
["generated"] = "Tue Sep 30 17:23:24 2025",
["version"] = "2.0",
},
["categories"] = { ["categories"] = {
["plugins"] = {
["description"] = "Plugins",
["files"] = {
["theme"] = {
["default"] = true,
["requires"] = {
},
["size"] = 7042,
["description"] = "",
["path"] = "plugins/theme.lua",
},
["debug"] = {
["default"] = true,
["requires"] = {
},
["size"] = 6250,
["description"] = "",
["path"] = "plugins/debug.lua",
},
["benchmark"] = {
["default"] = true,
["requires"] = {
[1] = "VisualElement",
},
["size"] = 12581,
["description"] = "",
["path"] = "plugins/benchmark.lua",
},
["state"] = {
["default"] = true,
["requires"] = {
[1] = "Container",
},
["size"] = 6896,
["description"] = "",
["path"] = "plugins/state.lua",
},
["xml"] = {
["default"] = true,
["requires"] = {
},
["size"] = 9940,
["description"] = "",
["path"] = "plugins/xml.lua",
},
["canvas"] = {
["default"] = true,
["requires"] = {
},
["size"] = 7873,
["description"] = "",
["path"] = "plugins/canvas.lua",
},
["reactive"] = {
["default"] = true,
["requires"] = {
},
["size"] = 7580,
["description"] = "",
["path"] = "plugins/reactive.lua",
},
["animation"] = {
["default"] = true,
["requires"] = {
},
["size"] = 18421,
["description"] = "",
["path"] = "plugins/animation.lua",
},
},
},
["libraries"] = {
["description"] = "Libraries",
["files"] = {
["colorHex"] = {
["default"] = true,
["requires"] = {
},
["size"] = 132,
["description"] = "",
["path"] = "libraries/colorHex.lua",
},
["utils"] = {
["default"] = true,
["requires"] = {
},
["size"] = 2661,
["description"] = "",
["path"] = "libraries/utils.lua",
},
["expect"] = {
["default"] = true,
["requires"] = {
},
["size"] = 846,
["description"] = "",
["path"] = "libraries/expect.lua",
},
},
},
["elements"] = { ["elements"] = {
["description"] = "UI Elements",
["files"] = { ["files"] = {
["BarChart"] = { ["Display"] = {
["default"] = true, ["size"] = 5071,
["requires"] = {
},
["size"] = 3590,
["description"] = "",
["path"] = "elements/BarChart.lua",
},
["Tree"] = {
["default"] = true,
["requires"] = { ["requires"] = {
[1] = "VisualElement", [1] = "VisualElement",
}, },
["size"] = 7942, ["description"] = "The Display is a special element which uses the CC Window API which you can use.",
["description"] = "", ["path"] = "elements/Display.lua",
["path"] = "elements/Tree.lua", ["default"] = false,
}, },
["Frame"] = { ["Input"] = {
["size"] = 9558,
["requires"] = {
[1] = "VisualElement",
},
["description"] = "A text input field with various features",
["path"] = "elements/Input.lua",
["default"] = true, ["default"] = true,
},
["BigFont"] = {
["size"] = 21649,
["requires"] = {
[1] = "VisualElement",
},
["description"] = "",
["path"] = "elements/BigFont.lua",
["default"] = false,
},
["FlexBox"] = {
["size"] = 32431,
["requires"] = { ["requires"] = {
[1] = "Container", [1] = "Container",
}, },
["size"] = 6508, ["description"] = "A flexbox container that arranges its children in a flexible layout.",
["description"] = "A frame element that serves as a grouping container for other elements.", ["path"] = "elements/FlexBox.lua",
["path"] = "elements/Frame.lua", ["default"] = true,
},
["TextBox"] = {
["default"] = false,
["requires"] = {
[1] = "VisualElement",
},
["size"] = 43466,
["description"] = "A multi-line text editor component with cursor support and text manipulation features",
["path"] = "elements/TextBox.lua",
}, },
["Button"] = { ["Button"] = {
["default"] = true, ["size"] = 2540,
["requires"] = { ["requires"] = {
[1] = "VisualElement", [1] = "VisualElement",
}, },
["size"] = 2540,
["description"] = "The Button is a standard button element with click handling and state management.", ["description"] = "The Button is a standard button element with click handling and state management.",
["path"] = "elements/Button.lua", ["path"] = "elements/Button.lua",
},
["TabControl"] = {
["default"] = true, ["default"] = true,
},
["List"] = {
["size"] = 8758,
["requires"] = {
[1] = "VisualElement",
},
["description"] = "A scrollable list of selectable items",
["path"] = "elements/List.lua",
["default"] = true,
},
["BaseFrame"] = {
["size"] = 9017,
["requires"] = { ["requires"] = {
[1] = "Container", [1] = "Container",
}, },
["size"] = 15300, ["description"] = "This is the base frame class. It is the root element of all elements and the only element without a parent.",
["description"] = "A TabControl element that provides tabbed interface with multiple content areas.", ["path"] = "elements/BaseFrame.lua",
["path"] = "elements/TabControl.lua",
},
["Switch"] = {
["default"] = true, ["default"] = true,
},
["Tree"] = {
["size"] = 7942,
["requires"] = { ["requires"] = {
[1] = "VisualElement", [1] = "VisualElement",
}, },
["size"] = 3269, ["description"] = "",
["description"] = "The Switch is a standard Switch element with click handling and state management.", ["path"] = "elements/Tree.lua",
["path"] = "elements/Switch.lua", ["default"] = true,
},
["Label"] = {
["size"] = 3092,
["requires"] = {
[1] = "VisualElement",
},
["description"] = "A simple text display element that automatically resizes its width based on the text content.",
["path"] = "elements/Label.lua",
["default"] = true,
},
["BaseElement"] = {
["size"] = 10012,
["requires"] = {
},
["description"] = "The base class for all UI elements in Basalt.",
["path"] = "elements/BaseElement.lua",
["default"] = true,
},
["Table"] = {
["size"] = 16214,
["requires"] = {
[1] = "VisualElement",
},
["description"] = "",
["path"] = "elements/Table.lua",
["default"] = true,
},
["Graph"] = {
["size"] = 6989,
["requires"] = {
},
["description"] = "A point based graph element",
["path"] = "elements/Graph.lua",
["default"] = false,
}, },
["VisualElement"] = { ["VisualElement"] = {
["default"] = true, ["size"] = 22480,
["requires"] = { ["requires"] = {
[1] = "BaseElement", [1] = "BaseElement",
}, },
["size"] = 22480,
["description"] = "The Visual Element class which is the base class for all visual UI elements", ["description"] = "The Visual Element class which is the base class for all visual UI elements",
["path"] = "elements/VisualElement.lua", ["path"] = "elements/VisualElement.lua",
},
["Input"] = {
["default"] = true, ["default"] = true,
},
["Program"] = {
["size"] = 11430,
["requires"] = { ["requires"] = {
[1] = "VisualElement", [1] = "VisualElement",
}, },
["size"] = 9558,
["description"] = "A text input field with various features",
["path"] = "elements/Input.lua",
},
["Display"] = {
["default"] = false,
["requires"] = {
[1] = "VisualElement",
},
["size"] = 5071,
["description"] = "The Display is a special element which uses the CC Window API which you can use.",
["path"] = "elements/Display.lua",
},
["LineChart"] = {
["default"] = false,
["requires"] = {
},
["size"] = 3227,
["description"] = "", ["description"] = "",
["path"] = "elements/LineChart.lua", ["path"] = "elements/Program.lua",
},
["BaseElement"] = {
["default"] = true, ["default"] = true,
["requires"] = {
},
["size"] = 10012,
["description"] = "The base class for all UI elements in Basalt.",
["path"] = "elements/BaseElement.lua",
}, },
["DropDown"] = { ["DropDown"] = {
["default"] = false, ["size"] = 6359,
["requires"] = { ["requires"] = {
[1] = "List", [1] = "List",
}, },
["size"] = 6359,
["description"] = "A DropDown menu that shows a list of selectable items", ["description"] = "A DropDown menu that shows a list of selectable items",
["path"] = "elements/DropDown.lua", ["path"] = "elements/DropDown.lua",
["default"] = false,
}, },
["Menu"] = { ["Frame"] = {
["default"] = true, ["size"] = 6508,
["requires"] = {
[1] = "List",
},
["size"] = 4679,
["description"] = "A horizontal menu bar with selectable items.",
["path"] = "elements/Menu.lua",
},
["BaseFrame"] = {
["default"] = true,
["requires"] = { ["requires"] = {
[1] = "Container", [1] = "Container",
}, },
["size"] = 9017, ["description"] = "A frame element that serves as a grouping container for other elements.",
["description"] = "This is the base frame class. It is the root element of all elements and the only element without a parent.", ["path"] = "elements/Frame.lua",
["path"] = "elements/BaseFrame.lua",
},
["Slider"] = {
["default"] = true, ["default"] = true,
["requires"] = {
[1] = "VisualElement",
},
["size"] = 4977,
["description"] = "",
["path"] = "elements/Slider.lua",
},
["Program"] = {
["default"] = true,
["requires"] = {
[1] = "VisualElement",
},
["size"] = 11430,
["description"] = "",
["path"] = "elements/Program.lua",
}, },
["ScrollBar"] = { ["ScrollBar"] = {
["default"] = true, ["size"] = 9665,
["requires"] = { ["requires"] = {
[1] = "VisualElement", [1] = "VisualElement",
}, },
["size"] = 9665,
["description"] = "A ScrollBar element that can be attached to other elements to control their scroll properties.", ["description"] = "A ScrollBar element that can be attached to other elements to control their scroll properties.",
["path"] = "elements/ScrollBar.lua", ["path"] = "elements/ScrollBar.lua",
["default"] = true,
}, },
["BigFont"] = { ["LineChart"] = {
["size"] = 3227,
["requires"] = {
},
["description"] = "",
["path"] = "elements/LineChart.lua",
["default"] = false, ["default"] = false,
},
["Container"] = {
["size"] = 26148,
["requires"] = {
[1] = "VisualElement",
},
["description"] = "The container class. It is a visual element that can contain other elements. It is the base class for all containers",
["path"] = "elements/Container.lua",
["default"] = true,
},
["TextBox"] = {
["size"] = 43466,
["requires"] = {
[1] = "VisualElement",
},
["description"] = "A multi-line text editor component with cursor support and text manipulation features",
["path"] = "elements/TextBox.lua",
["default"] = false,
},
["Slider"] = {
["size"] = 4977,
["requires"] = { ["requires"] = {
[1] = "VisualElement", [1] = "VisualElement",
}, },
["size"] = 21649,
["description"] = "", ["description"] = "",
["path"] = "elements/BigFont.lua", ["path"] = "elements/Slider.lua",
["default"] = true,
},
["Menu"] = {
["size"] = 4679,
["requires"] = {
[1] = "List",
},
["description"] = "A horizontal menu bar with selectable items.",
["path"] = "elements/Menu.lua",
["default"] = true,
},
["Switch"] = {
["size"] = 3269,
["requires"] = {
[1] = "VisualElement",
},
["description"] = "The Switch is a standard Switch element with click handling and state management.",
["path"] = "elements/Switch.lua",
["default"] = true,
},
["BarChart"] = {
["size"] = 3590,
["requires"] = {
},
["description"] = "",
["path"] = "elements/BarChart.lua",
["default"] = true,
}, },
["ProgressBar"] = { ["ProgressBar"] = {
["default"] = true, ["size"] = 3397,
["requires"] = { ["requires"] = {
[1] = "VisualElement", [1] = "VisualElement",
}, },
["size"] = 3397,
["description"] = "", ["description"] = "",
["path"] = "elements/ProgressBar.lua", ["path"] = "elements/ProgressBar.lua",
},
["Graph"] = {
["default"] = false,
["requires"] = {
},
["size"] = 6989,
["description"] = "A point based graph element",
["path"] = "elements/Graph.lua",
},
["List"] = {
["default"] = true, ["default"] = true,
},
["Timer"] = {
["size"] = 2914,
["requires"] = {
[1] = "BaseElement",
},
["description"] = "",
["path"] = "elements/Timer.lua",
["default"] = true,
},
["TabControl"] = {
["size"] = 15300,
["requires"] = {
[1] = "Container",
},
["description"] = "A TabControl element that provides tabbed interface with multiple content areas.",
["path"] = "elements/TabControl.lua",
["default"] = true,
},
["Image"] = {
["size"] = 15125,
["requires"] = { ["requires"] = {
[1] = "VisualElement", [1] = "VisualElement",
}, },
["size"] = 8758, ["description"] = "An element that displays an image in bimg format",
["description"] = "A scrollable list of selectable items", ["path"] = "elements/Image.lua",
["path"] = "elements/List.lua", ["default"] = false,
},
["CheckBox"] = {
["size"] = 3731,
["requires"] = {
},
["description"] = "This is a checkbox. It is a visual element that can be checked.",
["path"] = "elements/CheckBox.lua",
["default"] = true,
}, },
["ComboBox"] = { ["ComboBox"] = {
["default"] = false, ["size"] = 15122,
["requires"] = { ["requires"] = {
[1] = "DropDown", [1] = "DropDown",
}, },
["size"] = 15122,
["description"] = "A ComboBox that combines dropdown selection with editable text input", ["description"] = "A ComboBox that combines dropdown selection with editable text input",
["path"] = "elements/ComboBox.lua", ["path"] = "elements/ComboBox.lua",
},
["CheckBox"] = {
["default"] = true,
["requires"] = {
},
["size"] = 3731,
["description"] = "This is a checkbox. It is a visual element that can be checked.",
["path"] = "elements/CheckBox.lua",
},
["Label"] = {
["default"] = true,
["requires"] = {
[1] = "VisualElement",
},
["size"] = 3092,
["description"] = "A simple text display element that automatically resizes its width based on the text content.",
["path"] = "elements/Label.lua",
},
["Table"] = {
["default"] = true,
["requires"] = {
[1] = "VisualElement",
},
["size"] = 16214,
["description"] = "",
["path"] = "elements/Table.lua",
},
["Container"] = {
["default"] = true,
["requires"] = {
[1] = "VisualElement",
},
["size"] = 25963,
["description"] = "The container class. It is a visual element that can contain other elements. It is the base class for all containers",
["path"] = "elements/Container.lua",
},
["Timer"] = {
["default"] = true,
["requires"] = {
[1] = "BaseElement",
},
["size"] = 2914,
["description"] = "",
["path"] = "elements/Timer.lua",
},
["Image"] = {
["default"] = false, ["default"] = false,
["requires"] = {
[1] = "VisualElement",
},
["size"] = 15125,
["description"] = "An element that displays an image in bimg format",
["path"] = "elements/Image.lua",
}, },
["FlexBox"] = { },
["description"] = "UI Elements",
},
["plugins"] = {
["files"] = {
["reactive"] = {
["size"] = 8619,
["requires"] = {
},
["description"] = "",
["path"] = "plugins/reactive.lua",
["default"] = true, ["default"] = true,
},
["theme"] = {
["size"] = 7042,
["requires"] = {
},
["description"] = "",
["path"] = "plugins/theme.lua",
["default"] = true,
},
["xml"] = {
["size"] = 9940,
["requires"] = {
},
["description"] = "",
["path"] = "plugins/xml.lua",
["default"] = true,
},
["state"] = {
["size"] = 6896,
["requires"] = { ["requires"] = {
[1] = "Container", [1] = "Container",
}, },
["size"] = 32431, ["description"] = "",
["description"] = "A flexbox container that arranges its children in a flexible layout.", ["path"] = "plugins/state.lua",
["path"] = "elements/FlexBox.lua", ["default"] = true,
},
["canvas"] = {
["size"] = 7873,
["requires"] = {
},
["description"] = "",
["path"] = "plugins/canvas.lua",
["default"] = true,
},
["animation"] = {
["size"] = 18421,
["requires"] = {
},
["description"] = "",
["path"] = "plugins/animation.lua",
["default"] = true,
},
["debug"] = {
["size"] = 6250,
["requires"] = {
},
["description"] = "",
["path"] = "plugins/debug.lua",
["default"] = true,
},
["benchmark"] = {
["size"] = 12581,
["requires"] = {
[1] = "VisualElement",
},
["description"] = "",
["path"] = "plugins/benchmark.lua",
["default"] = true,
}, },
}, },
["description"] = "Plugins",
},
["libraries"] = {
["files"] = {
["expect"] = {
["size"] = 846,
["requires"] = {
},
["description"] = "",
["path"] = "libraries/expect.lua",
["default"] = true,
},
["colorHex"] = {
["size"] = 132,
["requires"] = {
},
["description"] = "",
["path"] = "libraries/colorHex.lua",
["default"] = true,
},
["utils"] = {
["size"] = 2661,
["requires"] = {
},
["description"] = "",
["path"] = "libraries/utils.lua",
["default"] = true,
},
},
["description"] = "Libraries",
}, },
["core"] = { ["core"] = {
["description"] = "Core Files",
["files"] = { ["files"] = {
["propertySystem"] = {
["default"] = true,
["requires"] = {
},
["size"] = 15524,
["description"] = "",
["path"] = "propertySystem.lua",
},
["main"] = { ["main"] = {
["default"] = true, ["size"] = 14085,
["requires"] = { ["requires"] = {
}, },
["size"] = 14085,
["description"] = "", ["description"] = "",
["path"] = "main.lua", ["path"] = "main.lua",
},
["log"] = {
["default"] = true, ["default"] = true,
["requires"] = {
},
["size"] = 3142,
["description"] = "",
["path"] = "log.lua",
},
["errorManager"] = {
["default"] = true,
["requires"] = {
},
["size"] = 3789,
["description"] = "",
["path"] = "errorManager.lua",
},
["elementManager"] = {
["default"] = true,
["requires"] = {
},
["size"] = 6297,
["description"] = "",
["path"] = "elementManager.lua",
}, },
["init"] = { ["init"] = {
["default"] = true, ["size"] = 622,
["requires"] = { ["requires"] = {
}, },
["size"] = 622,
["description"] = "", ["description"] = "",
["path"] = "init.lua", ["path"] = "init.lua",
},
["render"] = {
["default"] = true, ["default"] = true,
},
["errorManager"] = {
["size"] = 3789,
["requires"] = { ["requires"] = {
}, },
["description"] = "",
["path"] = "errorManager.lua",
["default"] = true,
},
["log"] = {
["size"] = 3142,
["requires"] = {
},
["description"] = "",
["path"] = "log.lua",
["default"] = true,
},
["render"] = {
["size"] = 12422, ["size"] = 12422,
["requires"] = {
},
["description"] = "", ["description"] = "",
["path"] = "render.lua", ["path"] = "render.lua",
["default"] = true,
},
["elementManager"] = {
["size"] = 6297,
["requires"] = {
},
["description"] = "",
["path"] = "elementManager.lua",
["default"] = true,
},
["propertySystem"] = {
["size"] = 15524,
["requires"] = {
},
["description"] = "",
["path"] = "propertySystem.lua",
["default"] = true,
}, },
}, },
["description"] = "Core Files",
}, },
}, },
["metadata"] = {
["generated"] = "Tue Sep 30 12:42:47 2025",
["version"] = "2.0",
},
} }

View File

@@ -1544,9 +1544,11 @@ not self.get("childrenEventsSorted")then for bc in pairs(self._values.childrenEv
self:sortChildrenEvents(bc)end end;for bc,cc in ipairs(self.get("visibleChildren"))do if cc==self then self:sortChildrenEvents(bc)end end;for bc,cc in ipairs(self.get("visibleChildren"))do if cc==self then
_b.error("CIRCULAR REFERENCE DETECTED!")return end;cc:render() _b.error("CIRCULAR REFERENCE DETECTED!")return end;cc:render()
cc:postRender()end end cc:postRender()end end
function db:destroy()if not self:isType("BaseFrame")then ab.destroy(self) function db:destroy()
return self else _b.header="Basalt Error" if not self:isType("BaseFrame")then
_b.error("Cannot destroy a BaseFrame.")end end;return db end for bc,cc in
ipairs(self._values.children)do if cc.destroy then cc:destroy()end end;self:removeAllObservers()ab.destroy(self)return self else
_b.header="Basalt Error"_b.error("Cannot destroy a BaseFrame.")end end;return db end
project["elements/Tree.lua"] = function(...) local _a=require("elements/VisualElement")local aa=string.sub project["elements/Tree.lua"] = function(...) local _a=require("elements/VisualElement")local aa=string.sub
local ba=setmetatable({},_a)ba.__index=ba local ba=setmetatable({},_a)ba.__index=ba
ba.defineProperty(ba,"nodes",{default={},type="table",canTriggerRender=true,setter=function(da,_b)if#_b>0 then ba.defineProperty(ba,"nodes",{default={},type="table",canTriggerRender=true,setter=function(da,_b)if#_b>0 then
@@ -2650,73 +2652,82 @@ if bd then local cd=bd.readAll()bd.close()
cb.default=textutils.unserializeJSON(cd)if not cb.default then cb.default=textutils.unserializeJSON(cd)if not cb.default then
ab.error("Failed to load theme from "..ad)end else ab.error("Failed to load theme from "..ad)end else
ab.error("Could not open theme file: "..ad)end end;return{BaseElement=_c,API=_d} end ab.error("Could not open theme file: "..ad)end end;return{BaseElement=_c,API=_d} end
project["plugins/reactive.lua"] = function(...) local ab=require("errorManager") project["plugins/reactive.lua"] = function(...) local bb=require("errorManager")
local bb=require("propertySystem")local cb={colors=true,math=true,clamp=true,round=true} local cb=require("propertySystem")local db={colors=true,math=true,clamp=true,round=true}
local db={clamp=function(ad,bd,cd)return local _c={clamp=function(cd,dd,__a)return
math.min(math.max(ad,bd),cd)end,round=function(ad) math.min(math.max(cd,dd),__a)end,round=function(cd)
return math.floor(ad+0.5)end,floor=math.floor,ceil=math.ceil,abs=math.abs} return math.floor(cd+0.5)end,floor=math.floor,ceil=math.ceil,abs=math.abs}
local function _c(ad,bd,cd)ad=ad:gsub("^{(.+)}$","%1") local function ac(cd)return
ad=ad:gsub("([%w_]+)%$([%w_]+)",function(b_a,c_a) {parent=cd:find("parent%."),self=cd:find("self%."),other=cd:find("[^(parent)][^(self)]%.")}end
if b_a=="self"then return local function bc(cd,dd,__a)local a_a=ac(cd)
string.format('__getState("%s")',c_a)elseif b_a=="parent"then return if a_a.parent and not dd.parent then
string.format('__getParentState("%s")',c_a)else return bb.header="Reactive evaluation error"
string.format('__getElementState("%s", "%s")',b_a,c_a)end end) bb.error("Expression uses parent but no parent available")return function()return nil end end;cd=cd:gsub("^{(.+)}$","%1")
ad=ad:gsub("([%w_]+)%.([%w_]+)",function(b_a,c_a)if cb[b_a]then return b_a.."."..c_a end;if cd=cd:gsub("([%w_]+)%$([%w_]+)",function(_aa,aaa)
tonumber(b_a)then return b_a.."."..c_a end;return if _aa=="self"then return
string.format('__getProperty("%s", "%s")',b_a,c_a)end) string.format('__getState("%s")',aaa)elseif _aa=="parent"then return
local dd=setmetatable({colors=colors,math=math,tostring=tostring,tonumber=tonumber,__getState=function(b_a)return bd:getState(b_a)end,__getParentState=function(b_a)return string.format('__getParentState("%s")',aaa)else return
bd.parent:getState(b_a)end,__getElementState=function(b_a,c_a)if tonumber(b_a)then return nil end string.format('__getElementState("%s", "%s")',_aa,aaa)end end)
local d_a=bd:getBaseFrame():getChild(b_a)if not d_a then ab.header="Reactive evaluation error" cd=cd:gsub("([%w_]+)%.([%w_]+)",function(_aa,aaa)if db[_aa]then return _aa.."."..aaa end;if
ab.error("Could not find element: "..b_a)return nil end;return tonumber(_aa)then return _aa.."."..aaa end;return
d_a:getState(c_a).value end,__getProperty=function(b_a,c_a)if string.format('__getProperty("%s", "%s")',_aa,aaa)end)
tonumber(b_a)then return nil end local b_a=setmetatable({colors=colors,math=math,tostring=tostring,tonumber=tonumber,__getState=function(_aa)return dd:getState(_aa)end,__getParentState=function(_aa)return
if b_a=="self"then return bd.get(c_a)elseif b_a=="parent"then return dd.parent:getState(_aa)end,__getElementState=function(_aa,aaa)if tonumber(_aa)then return nil end
bd.parent.get(c_a)else local d_a=bd.parent:getChild(b_a)if not d_a then local baa=dd:getBaseFrame():getChild(_aa)if not baa then bb.header="Reactive evaluation error"
ab.header="Reactive evaluation error" bb.error("Could not find element: ".._aa)return nil end;return
ab.error("Could not find element: "..b_a)return nil end baa:getState(aaa).value end,__getProperty=function(_aa,aaa)if
return d_a.get(c_a)end end},{__index=db})if(bd._properties[cd].type=="string")then tonumber(_aa)then return nil end
ad="tostring("..ad..")"elseif(bd._properties[cd].type=="number")then if _aa=="self"then return dd.get(aaa)elseif _aa=="parent"then return
ad="tonumber("..ad..")"end;local __a,a_a=load("return ".. dd.parent.get(aaa)else local baa=dd.parent:getChild(_aa)if not baa then
ad,"reactive","t",dd) bb.header="Reactive evaluation error"
if not __a then bb.error("Could not find element: ".._aa)return nil end
ab.header="Reactive evaluation error"ab.error("Invalid expression: "..a_a)return return baa.get(aaa)end end},{__index=_c})if(dd._properties[__a].type=="string")then
function()return nil end end;return __a end cd="tostring("..cd..")"elseif(dd._properties[__a].type=="number")then
local function ac(ad,bd) cd="tonumber("..cd..")"end;local c_a,d_a=load(
for cd in ad:gmatch("([%w_]+)%.")do "return "..cd,"reactive","t",b_a)
if not cb[cd]then if not c_a then
if cd=="self"then elseif cd=="parent"then bb.header="Reactive evaluation error"bb.error("Invalid expression: "..d_a)return
if not bd.parent then function()return nil end end;return c_a end
ab.header="Reactive evaluation error"ab.error("No parent element available")return false end else local function cc(cd,dd)
if(tonumber(cd)==nil)then local dd=bd.parent:getChild(cd)if not dd then for __a in cd:gmatch("([%w_]+)%.")do
ab.header="Reactive evaluation error" if not db[__a]then
ab.error("Referenced element not found: "..cd)return false end end end end end;return true end;local bc=setmetatable({},{__mode="k"}) if __a=="self"then elseif __a=="parent"then
local cc=setmetatable({},{__mode="k",__index=function(ad,bd)ad[bd]={} if not dd.parent then
return ad[bd]end}) bb.header="Reactive evaluation error"bb.error("No parent element available")return false end else
local function dc(ad,bd,cd) if(tonumber(__a)==nil)then local a_a=dd.parent:getChild(__a)if not a_a then
if cc[ad][cd]then for __a,a_a in ipairs(cc[ad][cd])do bb.header="Reactive evaluation error"
a_a.target:removeObserver(a_a.property,a_a.callback)end end;local dd={} bb.error("Referenced element not found: "..__a)return false end end end end end;return true end;local dc=setmetatable({},{__mode="k"})
for __a,a_a in bd:gmatch("([%w_]+)%.([%w_]+)")do local _d=setmetatable({},{__mode="k",__index=function(cd,dd)cd[dd]={}
if not cb[__a]then local b_a;if __a=="self"then b_a=ad elseif return cd[dd]end})
__a=="parent"then b_a=ad.parent else local function ad(cd,dd,__a)local a_a=ac(dd)
b_a=ad:getBaseFrame():getChild(__a)end;if b_a then if _d[cd][__a]then for c_a,d_a in ipairs(_d[cd][__a])do
local c_a={target=b_a,property=a_a,callback=function() d_a.target:removeObserver(d_a.property,d_a.callback)end end;local b_a={}
ad:updateRender()end}b_a:observe(a_a,c_a.callback) for c_a,d_a in dd:gmatch("([%w_]+)%.([%w_]+)")do
table.insert(dd,c_a)end end end;cc[ad][cd]=dd end if not db[c_a]then local _aa
bb.addSetterHook(function(ad,bd,cd,dd) if
if type(cd)=="string"and cd:match("^{.+}$")then c_a=="self"and a_a.self then _aa=cd elseif c_a=="parent"and a_a.parent then _aa=cd.parent elseif a_a.other then
local __a=cd:gsub("^{(.+)}$","%1")if not ac(__a,ad)then return dd.default end;dc(ad,__a,bd)if _aa=cd:getBaseFrame():getChild(c_a)end;if _aa then
not bc[ad]then bc[ad]={}end;if not bc[ad][cd]then local a_a=_c(cd,ad,bd) local aaa={target=_aa,property=d_a,callback=function()cd:updateRender()end}_aa:observe(d_a,aaa.callback)
bc[ad][cd]=a_a end table.insert(b_a,aaa)end end end;_d[cd][__a]=b_a end
cb.addSetterHook(function(cd,dd,__a,a_a)
if type(__a)=="string"and __a:match("^{.+}$")then
local b_a=__a:gsub("^{(.+)}$","%1")local c_a=ac(b_a)
if c_a.parent and not cd.parent then return a_a.default end;if not cc(b_a,cd)then return a_a.default end;ad(cd,b_a,dd)if not
dc[cd]then dc[cd]={}end;if not dc[cd][__a]then local d_a=bc(__a,cd,dd)
dc[cd][__a]=d_a end
return return
function(a_a)local b_a,c_a=pcall(bc[ad][cd]) function(d_a)if
if not b_a then cd._destroyed or(c_a.parent and not cd.parent)then return a_a.default end
ab.header="Reactive evaluation error" local _aa,aaa=pcall(dc[cd][__a])
if type(c_a)=="string"then if not _aa then if aaa and aaa:match("attempt to index.-nil value")then return
ab.error("Error evaluating expression: "..c_a)else ab.error("Error evaluating expression")end;return dd.default end;return c_a end end end)local _d={} a_a.default end
_d.hooks={destroy=function(ad) bb.header="Reactive evaluation error"
if cc[ad]then if type(aaa)=="string"then
for bd,cd in pairs(cc[ad])do for dd,__a in ipairs(cd)do bb.error("Error evaluating expression: "..aaa)else bb.error("Error evaluating expression")end;return a_a.default end;return aaa end end end)local bd={}
__a.target:removeObserver(__a.property,__a.callback)end end;cc[ad]=nil end end}return{BaseElement=_d} end bd.hooks={destroy=function(cd)
if _d[cd]then
for dd,__a in pairs(_d[cd])do for a_a,b_a in ipairs(__a)do
b_a.target:removeObserver(b_a.property,b_a.callback)end end;_d[cd]=nil;dc[cd]=nil end end}return{BaseElement=bd} end
project["plugins/state.lua"] = function(...) local _a=require("propertySystem") project["plugins/state.lua"] = function(...) local _a=require("propertySystem")
local aa=require("errorManager")local ba={}function ba.setup(da) local aa=require("errorManager")local ba={}function ba.setup(da)
da.defineProperty(da,"states",{default={},type="table"}) da.defineProperty(da,"states",{default={},type="table"})