From c7a93cc11032f8b56993121874b8008abbbdfd68 Mon Sep 17 00:00:00 2001 From: Thomas Walker Lynch Date: Sun, 28 Jun 2026 12:59:37 +0000 Subject: [PATCH] . --- .../Manuscript.copy/Core/RT-Style_make.js | 14 ++-- .../Manuscript.copy/Core/stage_manager.js | 7 +- .../Manuscript.copy/Core/theme_make.js | 9 +- .../Document/RT-Style_locator.js | 17 ++-- .../authored/Manuscript.copy/Element/TOC.js | 2 +- .../Manuscript.copy/Element/chapter.js | 2 +- .../authored/Manuscript.copy/Element/code.js | 10 +-- .../Manuscript.copy/Element/constraint.js | 6 +- .../Manuscript.copy/Element/crossref.js | 7 +- .../Manuscript.copy/Element/endnote.js | 4 +- .../authored/Manuscript.copy/Element/term.js | 9 +- .../authored/Manuscript.copy/Element/title.js | 2 +- .../Layout/article_tech_ref.js | 2 +- .../Manuscript.copy/Layout/page_fixed_glow.js | 83 ------------------- .../Layout/paginate_by_element.js | 2 +- .../Manuscript.copy/Theme/golden_wheat.js | 10 +++ .../Manuscript.copy/Theme/inverse_wheat.js | 10 +++ .../authored/Manuscript.copy/Theme/wheat.js | 11 ++- 18 files changed, 70 insertions(+), 137 deletions(-) delete mode 100644 developer/authored/Manuscript.copy/Layout/page_fixed_glow.js diff --git a/developer/authored/Manuscript.copy/Core/RT-Style_make.js b/developer/authored/Manuscript.copy/Core/RT-Style_make.js index ea53313..f5faef9 100644 --- a/developer/authored/Manuscript.copy/Core/RT-Style_make.js +++ b/developer/authored/Manuscript.copy/Core/RT-Style_make.js @@ -7,7 +7,7 @@ window.RT.Module = window.RT.Module || new Set(); // 2. Establish the Debug System -window.RT.debug = { +window.RT.Debug = { active_tokens: new Set([ 'scroll' ]), @@ -33,9 +33,9 @@ window.RT.debug = { }; // 3. Establish the Utilities -window.RT.utility = { +window.RT.Utility = { - string: { + String: { to_roman: function(num) { if (num < 1) return num.toString(); const lookup = {M:1000, CM:900, D:500, CD:400, C:100, XC:90, L:50, XL:40, X:10, IX:9, V:5, IV:4, I:1}; @@ -90,7 +90,7 @@ window.RT.utility = { } }, - dom: { + Dom: { measure_outer_height: function(el) { const wasInDOM = el.parentNode !== null; if (!wasInDOM) document.body.appendChild(el); @@ -106,9 +106,9 @@ window.RT.utility = { } }, - font: { + Font: { measure_ink_ratio: function(target_font, ref_font = null) { - const debug = window.RT.debug; + const debug = window.RT.Debug; debug.log('layout', `Measuring ink ratio for ${target_font}`); const canvas = document.createElement('canvas'); @@ -140,7 +140,7 @@ window.RT.utility = { } }, - color: { + Color: { extract_l: function(color_string) { const str = String(color_string).trim(); diff --git a/developer/authored/Manuscript.copy/Core/stage_manager.js b/developer/authored/Manuscript.copy/Core/stage_manager.js index e1057cb..2f980d7 100644 --- a/developer/authored/Manuscript.copy/Core/stage_manager.js +++ b/developer/authored/Manuscript.copy/Core/stage_manager.js @@ -5,7 +5,7 @@ window.RT.Element = window.RT.Element || []; window.RT.Module = window.RT.Module || new Set(); (function(){ - const debug = window.RT.debug || { log: function(){} }; + const debug = window.RT.Debug || { log: function(){} }; let target_y = 0; let is_reload = false; @@ -92,7 +92,6 @@ window.RT.Module = window.RT.Module || new Set(); function execute_pagination_and_scroll(){ debug.log('scroll' ,`Pagination layout starting.`); if(window.RT.paginate_by_element) window.RT.paginate_by_element(); - if(window.RT.page) window.RT.page(); let final_target = target_y; let use_hash = false; @@ -109,10 +108,6 @@ window.RT.Module = window.RT.Module || new Set(); function process_elements_and_layout() { debug.log('lifecycle', 'Processing registered elements.'); - if (window.RT.theme) { - window.RT.theme(); - } - if (window.RT.Element && Array.isArray(window.RT.Element)) { while (window.RT.Element.length > 0) { const element_fn = window.RT.Element.shift(); diff --git a/developer/authored/Manuscript.copy/Core/theme_make.js b/developer/authored/Manuscript.copy/Core/theme_make.js index eea792a..04b2280 100644 --- a/developer/authored/Manuscript.copy/Core/theme_make.js +++ b/developer/authored/Manuscript.copy/Core/theme_make.js @@ -4,6 +4,7 @@ window.RT.theme_library = window.RT.theme_library || {}; window.RT.theme = (function() { + const dictionary = { meta: { is_dark: false, name: "" }, surface: { 0: "", 1: "", 2: "", 3: "", input: "", code: "", select: "" }, @@ -12,7 +13,7 @@ window.RT.theme = (function() { border: { faint: "", regular: "", strong: "" }, state: { success: "", warning: "", error: "", info: "" }, syntax: { keyword: "", string: "", func: "", comment: "" }, - page: { width: "", min_height: "", padding: "", margin: "", bg_color: "", border_color: "", text_color: "", shadow: "" } + page: { width: "", min_height: "", padding: "", margin: "", bg_color: "", border_color: "", text_color: "", shadow: "" }, }; function resolve_path(path_array) { @@ -26,7 +27,7 @@ window.RT.theme = (function() { } function apply_and_validate_theme(new_theme, fallback_color) { - const debug = window.RT.debug || { error: function(){} }; + const debug = window.RT.Debug || { error: function(){} }; // Pass 1: Walk the structure of the active dictionary function walk_current(curr, source, path) { @@ -88,7 +89,7 @@ window.RT.theme = (function() { const fallback = args[1] || "#FF00FF"; if (!window.RT.theme_library.hasOwnProperty(theme_name)) { - window.RT.debug.error('theme', `Load aborted: Theme '${theme_name}' is not in the theme_library.`); + window.RT.Debug.error('theme', `Load aborted: Theme '${theme_name}' is not in the theme_library.`); return false; } @@ -96,6 +97,6 @@ window.RT.theme = (function() { return true; } - window.RT.debug.error('theme', 'Invalid command passed to theme dictionary: ' + command); + window.RT.Debug.error('theme', 'Invalid command passed to theme dictionary: ' + command); }; })(); diff --git a/developer/authored/Manuscript.copy/Document/RT-Style_locator.js b/developer/authored/Manuscript.copy/Document/RT-Style_locator.js index b8dd367..4498e6b 100644 --- a/developer/authored/Manuscript.copy/Document/RT-Style_locator.js +++ b/developer/authored/Manuscript.copy/Document/RT-Style_locator.js @@ -1,13 +1,13 @@ /* immediate.js - We have four scenarios + There are 4 variations for RT-Style-locator.js: - immediate - used in the RT-style distribution itself (authored, consummer, staged) - direct - used in the RT-style project itself, but not in the distribution - indirect - the version all Harmony projects use - URL_only - always pulls style through a URL, a webserver must be present + URL_only - used by websites + indirect - used by Harmony projects, except for RT-style + immediate - used by RT-style in the distribution (authored, consummer, staged) + direct - used by RT-style project outside of the distribution, e.g. the main document directory */ window.RT = window.RT || {}; @@ -15,11 +15,4 @@ window.RT = window.RT || {}; (function() { window.RT.dirpr_library = ".."; document.write('