auto handle late init call(and error report) with element creation queue

This commit is contained in:
Michael Freno
2025-12-13 01:54:30 -05:00
parent c069b2be22
commit 6fe452ef97
5 changed files with 232 additions and 7 deletions

View File

@@ -20,6 +20,14 @@ local Context = {
_zIndexOrderedElements = {}, -- Array of elements sorted by z-index (lowest to highest)
-- Focus management guard
_settingFocus = false,
initialized = false,
-- Initialization state tracking
---@type "uninitialized"|"initializing"|"ready"
_initState = "uninitialized",
---@type table[] Queue of {props: ElementProps, callback: function(element)|nil}
_initQueue = {},
}
---@return number, number -- scaleX, scaleY