From: Thomas Walker Lynch Date: Sun, 28 Jun 2026 12:59:37 +0000 (+0000) Subject: . X-Git-Url: https://git.reasoningtechnology.com/%28%5B%5E?a=commitdiff_plain;h=c7a93cc11032f8b56993121874b8008abbbdfd68;p=RT-Style . --- 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('