(function (global) { 'use strict'; if (global.tablesApp) { return; } global.tablesApp = { context: null, state: { rows: [], sort: [], filter: {}, // Editor-mode state (Phase 1): // selected: {row: rowId, col: field} | null — currently // focused cell. row is the row's id (or rowsRel for the // row file path); col is the column's `field`. // editing: bool — whether a cell-editor input is mounted. // drafts: {rowId: {field: value, ...}, ...} — uncommitted // edits, displayed in lieu of row.data while present. // Cleared per-row when that row's PUT succeeds (Phase 3). selected: null, editing: false, drafts: {} }, modules: {} }; })(window);