diff --git a/CHANGELOG.md b/CHANGELOG.md index cc01876..548ac46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ Follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) · versioned wi ## [Unreleased] ### Changed +- **Character-column namespace migration.** Character-table metadata, persisted column visibility, and completeness + helpers now use a private scope with compatibility exports and a `window.TTVC.characterColumns` API. - **Constrained character pagination.** Character-library pages now stop at 25 rendered characters on every device, preserving incremental loading while keeping the large-cast DOM below the measured 5,000-node budget. - **Character pagination budget.** Character-library pages render bounded batches, diff --git a/VERSION b/VERSION index 2e6ca19..9dc425a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.24.92 +1.24.93 diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index c36acb8..915a0c1 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -79,6 +79,7 @@ Done incrementally as global-scope ordered files (no ES-module change needed) - ✅ Character-library rendering, detail, avatar, and generation actions use a private scope with compatibility exports and a namespace API. - ✅ Voice-inspector selection state uses a private scope with a compatibility export and namespace API. - ✅ Shared utility helpers use a private scope with explicit compatibility exports and a `window.TTVC.utils` API. +- ✅ Character-table metadata and column/completeness helpers use a private scope with a namespace API. - ✅ `static/css/resource-diagnostics.css` — isolated Performance/resource diagnostic panel styles. - ✅ `static/css/background-jobs.css` — isolated background-job history and retry-panel styles. - ✅ `static/css/voice-design.css` — isolated Voice Design form, samples, and preview-match styles. diff --git a/static/index.html b/static/index.html index d8c863b..6b77cd5 100644 --- a/static/index.html +++ b/static/index.html @@ -10,7 +10,7 @@ - + @@ -27,12 +27,12 @@ - - - - - - + + + + + + @@ -397,7 +397,7 @@ window.toggleNavTree = function(treeId, chevronId) { - + diff --git a/static/js/character-columns.js b/static/js/character-columns.js index a433bf3..fcbe07d 100644 --- a/static/js/character-columns.js +++ b/static/js/character-columns.js @@ -2,6 +2,8 @@ // Kept separate from the character renderer so table layout can evolve // without making library-characters.js responsible for every table concern. +(function (root) { + const _CHAR_PROFILE_COMPLETENESS_FIELDS = [ 'gender', 'age_estimate', 'race_species', 'languages', 'nationality_background', 'social_class', 'profession', 'title', 'archetype', 'physical', 'clothing', @@ -47,3 +49,17 @@ function _charProfileCompleteness(sheet) { }).length; return { filled: filled, total: _CHAR_PROFILE_COMPLETENESS_FIELDS.length }; } + +Object.assign(root, { + _CHAR_PROFILE_COMPLETENESS_FIELDS, _CHAR_TABLE_COLUMN_DEFS, + _charTableHiddenColumns, _applyCharTableColumns, _charProfileCompleteness, +}); +root.TTVC = root.TTVC || {}; +root.TTVC.characterColumns = root.TTVC.characterColumns || {}; +Object.assign(root.TTVC.characterColumns, { + definitions: _CHAR_TABLE_COLUMN_DEFS, + hidden: _charTableHiddenColumns, + apply: _applyCharTableColumns, + completeness: _charProfileCompleteness, +}); +})(window);