## Interface: 120005, 120007
## Title: Vamoose's Dye Studio
## Notes: Browse, preview, and manage housing dyes
## Author: Vamoose
## Version: 2.3.0
## SavedVariables: VDS_DB
## IconTexture: Interface/AddOns/VamoosesDyeStudio/textures/vds_icon
## AddonCompartmentFunc: VDS_OnAddonCompartmentClick
## AddonCompartmentFuncOnEnter: VDS_OnAddonCompartmentEnter
## AddonCompartmentFuncOnLeave: VDS_OnAddonCompartmentLeave
## Category-enUS: Housing

# ============================================================================
# LOAD ORDER INVARIANT (LESSON: HDGR 692c77ab)
# ============================================================================
# WoW loads .toc files top-to-bottom. A file at line N can index any global
# defined by a file at line < N -- but NOT vice versa. The combination of:
#   - file-load-time registrations (e.g. cell-kind / widget-kind / Skinner)
#   - no-defensive-guards discipline (cookbook 12)
# means CONSUMERS must load AFTER their PRIMITIVES.
#
# The historical incident: HDGR_HouseEditorCompanion.lua:47 indexed
# HDGR.CardGrid (nil) at file-load time because CardGrid loaded AFTER
# Companion. The previous fix was a defensive guard (`if HDGR.CardGrid and
# HDGR.CardGrid.RegisterCellKind then`) -- which hid the load-order bug.
# Once the guard was correctly removed (Invariant 4), the underlying
# ordering had to be fixed in the TOC.
#
# Rule: registries first (VDS.Selectors, VDS.WidgetTypes, VDS.Theme,
# VDS.Palette, VDS.BlizzardEvents), then primitives that register into them
# (VDS.Components, VDS.RowRegistry), then consumers (VDS.LayoutConfig,
# VDS.MainFrame, Modules/, Controllers/). Init.lua loads LAST.
# ============================================================================

# ===== Embedded libraries =====
Libs\LibStub.lua
Libs\CallbackHandler-1.0\CallbackHandler-1.0.lua
Libs\LibDataBroker-1.1\LibDataBroker-1.1.lua
Libs\LibDBIcon-1.0\LibDBIcon-1.0.lua

# ===== Core utilities (pure functions / data; no engine deps) =====
Core\VDS_Constants.lua
Core\VDS_SchemeConstants.lua
Core\VDS_Paths.lua
Core\VDS_Log.lua
Core\VDS_TableUtils.lua
Core\VDS_Memo.lua
Core\VDS_ColorMath.lua
Core\VDS_HarmonyWheel.lua
Core\VDS_Harmony.lua

# ===== Core engines =====
Core\VDS_Store.lua
Core\VDS_ActionMeta.lua
Core\VDS_Environment.lua

# ===== Data (pure static data; load before consumers) =====
Data\VDS_DyeCraftingDB.lua
Data\VDS_DecorDyeSlotsDB.lua
Data\VDS_PaletteDB.lua
Data\VDS_ColorMapDB.lua

# ===== UI registries (must precede any file that registers into them) =====
UI\VDS_Selectors.lua
UI\VDS_WidgetTypes.lua
UI\VDS_Theme.lua
UI\VDS_Palette.lua

# ===== UI primitives (register into the above registries at file-load) =====
UI\VDS_Components.lua
UI\VDS_Components_Custom.lua
UI\VDS_Components_CanvasScope.lua
UI\VDS_Components_CanvasCategory.lua
UI\VDS_Components_CanvasLoadouts.lua
UI\VDS_Components_Harmony.lua
UI\VDS_BindingEngine.lua
UI\VDS_RowRegistry.lua
Core\VDS_TooltipEngine.lua
Core\VDS_TooltipRecipes.lua
UI\VDS_Modules.lua
UI\VDS_BlizzardEvents.lua

# ===== Middleware (depends on Store + BlizzardEvents + Log + Constants) =====
Core\VDS_Middleware.lua

# ===== UI consumers (read from registries) =====
UI\VDS_Layout.lua
UI\VDS_LayoutNormalize.lua
UI\VDS_LayoutDebug.lua
UI\VDS_LayoutConfig.lua
UI\VDS_LayoutConfig_Default.lua
UI\VDS_LayoutConfig_Canvas.lua
UI\VDS_LayoutConfig_Live.lua
UI\VDS_LayoutConfig_Warehouse.lua
UI\VDS_Rows_Dye.lua
UI\VDS_Rows_Herb.lua
UI\VDS_Rows_CanvasDecor.lua
UI\VDS_Rows_CustomPalette.lua
UI\VDS_Rows_GalleryTile.lua
UI\VDS_Rows_Warehouse.lua
UI\VDS_Controller_Title.lua
UI\VDS_Controller_Search.lua
UI\VDS_Controller_Browse.lua
UI\VDS_Controller_Detail.lua
UI\VDS_Controller_Canvas.lua
UI\VDS_Controller_Live.lua
UI\VDS_Controller_LiveBridge.lua
UI\VDS_Controller_Minimap.lua
UI\VDS_Controller_Warehouse.lua
UI\VDS_Controller_Harmony.lua
UI\VDS_Popups.lua
UI\VDS_MainFrame.lua

# ===== Feature surface (Selectors + Controllers) =====
UI\VDS_Selectors_Progress.lua
UI\VDS_Selectors_View.lua
UI\VDS_Selectors_Browse.lua
UI\VDS_Selectors_Detail.lua
UI\VDS_Selectors_Warehouse.lua
UI\VDS_Selectors_Canvas.lua
UI\VDS_Selectors_CanvasScope.lua
UI\VDS_Selectors_CanvasDecor.lua
UI\VDS_Selectors_Live.lua
UI\VDS_Selectors_Harmony.lua

# ===== Modules (observers + facades + identity) =====
Modules\VDS_SessionIdentity.lua
Modules\VDS_StaticData.lua
Modules\VDS_BagObserver.lua
Modules\VDS_ItemNameResolver.lua
Modules\VDS_AuctionatorBridge.lua
Modules\VDS_DyeOwnershipObserver.lua
Modules\VDS_LiveCustomizeObserver.lua
Modules\VDS_DecorInfoResolver.lua

# ===== Boot (LAST -- ties everything together) =====
Core\VDS_Init.lua
