.
authorThomas Walker Lynch <eknp9n@reasoningtechnology.com>
Sun, 28 Jun 2026 12:59:37 +0000 (12:59 +0000)
committerThomas Walker Lynch <eknp9n@reasoningtechnology.com>
Sun, 28 Jun 2026 12:59:37 +0000 (12:59 +0000)
18 files changed:
developer/authored/Manuscript.copy/Core/RT-Style_make.js
developer/authored/Manuscript.copy/Core/stage_manager.js
developer/authored/Manuscript.copy/Core/theme_make.js
developer/authored/Manuscript.copy/Document/RT-Style_locator.js
developer/authored/Manuscript.copy/Element/TOC.js
developer/authored/Manuscript.copy/Element/chapter.js
developer/authored/Manuscript.copy/Element/code.js
developer/authored/Manuscript.copy/Element/constraint.js
developer/authored/Manuscript.copy/Element/crossref.js
developer/authored/Manuscript.copy/Element/endnote.js
developer/authored/Manuscript.copy/Element/term.js
developer/authored/Manuscript.copy/Element/title.js
developer/authored/Manuscript.copy/Layout/article_tech_ref.js
developer/authored/Manuscript.copy/Layout/page_fixed_glow.js [deleted file]
developer/authored/Manuscript.copy/Layout/paginate_by_element.js
developer/authored/Manuscript.copy/Theme/golden_wheat.js
developer/authored/Manuscript.copy/Theme/inverse_wheat.js
developer/authored/Manuscript.copy/Theme/wheat.js

index ea53313..f5faef9 100644 (file)
@@ -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();
       
index e1057cb..2f980d7 100644 (file)
@@ -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();
index eea792a..04b2280 100644 (file)
@@ -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);
   };
 })();
index b8dd367..4498e6b 100644 (file)
@@ -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('<script src="' + window.RT.dirpr_library + '/Core/RT-Style_make.js"><\/script>');
-  
-  // 2. Inject a secondary script block for the core dependencies
-  document.write(
-    '<script>' +
-    'window.RT.load("Element/theme_selector");' +
-    '<\/script>'
-  );
 })();
index c790536..1aa0eef 100644 (file)
@@ -21,7 +21,7 @@ Next heading 2                3
 window.RT = window.RT || {};
 
 window.RT.TOC = function(){
-  const debug = window.RT.debug || { log: function(){} };
+  const debug = window.RT.Debug || { log: function(){} };
   const TOC_seq = document.querySelectorAll('rt·toc');
 
   TOC_seq.forEach( (container ,TOC_index) => {
index 8e0e38e..2114114 100644 (file)
@@ -5,7 +5,7 @@
 window.RT = window.RT || {};
 
 window.RT.chapter = function(){
-  const debug = window.RT.debug || { log: function(){} };
+  const debug = window.RT.Debug || { log: function(){} };
 
   document.querySelectorAll('RT·chapter').forEach( (el ,index) => {
     if(debug.log) debug.log('chapter' ,`Processing chapter ${index + 1}`);
index 79a8a3b..2eeca8b 100644 (file)
@@ -6,12 +6,12 @@
 */
 function code() {
   const RT = window.RT;
-  const U = RT.utility;
-  const debug = RT.debug;
+  const U = RT.Utility;
+  const debug = RT.Debug;
 
   debug.log('code', 'Starting render cycle.');
 
-  const metrics = U.measure_ink_ratio('monospace');
+  const metrics = U.Font.measure_ink_ratio('monospace');
   
   document.querySelectorAll('rt·code').forEach((el) => {
     el.style.fontFamily = 'monospace';
@@ -19,9 +19,9 @@ function code() {
     const computed = window.getComputedStyle(el);
     const accent = computed.getPropertyValue('--RT·accent').trim() || 'gold';
     
-    const is_block = U.is_block_content(el);
+    const is_block = U.Dom.is_block_content(el);
     const parentColor = computed.color;
-    const is_text_light = U.is_color_light(parentColor);
+    const is_text_light = U.Color.is_light(parentColor);
     
     const alpha = is_block ? 0.08 : 0.15;
     const overlay = is_text_light ? `rgba(255,255,255,${alpha})` : `rgba(0,0,0,${alpha})`;
index a2b1747..8ac0c97 100644 (file)
@@ -4,10 +4,10 @@ window.RT = window.RT || {};
 window.RT.constraint = function(){
   document.querySelectorAll('rt·constraint').forEach( (el) => {
     el.style.display = 'block';
-    el.style.borderLeft = '4px solid var(--RT·state-warning)';
-    el.style.backgroundColor = 'var(--RT·surface-1)';
+    el.style.borderLeft = `4px solid ${window.RT.theme('read', 'state', 'warning')}`;
+    el.style.backgroundColor = window.RT.theme('read', 'surface', '1');
     el.style.padding = '1rem';
     el.style.margin = '1.5rem 0';
-    el.style.color = 'var(--RT·content-main)';
+    el.style.color = window.RT.theme('read', 'content', 'main');
   });
 };
index c7c5f86..fb15622 100644 (file)
@@ -3,13 +3,10 @@ window.RT = window.RT || {};
 
 window.RT.crossref = function(){
   document.querySelectorAll('rt·crossref').forEach( (el) => {
-    el.style.color = 'var(--RT·brand-link)';
+    el.style.color = window.RT.theme('read', 'brand', 'link');
     el.style.textDecoration = 'underline';
     el.style.cursor = 'pointer';
     el.style.fontWeight = '500';
-    
-    // Note: To make this fully context-aware across soft limits,
-    // this module will eventually need to hook into the page 
-    // registry built by paginate_by_element.js.
   });
 };
+
index fa78943..a407ad6 100644 (file)
@@ -37,7 +37,7 @@ window.RT.endnote = function(){
     
     cite.innerHTML = `<a href="#note-${refNum}" id="cite-${refNum}">[${refNum}]</a>`;
     cite.style.cursor = 'pointer';
-    cite.style.color = 'var(--RT·brand-link)';
+    cite.style.color = window.RT.theme('read', 'brand', 'link');
     cite.style.textDecoration = 'none';
 
     // Append the corresponding entry into the endnotes list
@@ -50,6 +50,6 @@ window.RT.endnote = function(){
   // Style the container
   endnoteContainer.style.display = 'block';
   endnoteContainer.style.marginTop = '1rem';
-  endnoteContainer.style.borderTop = '1px solid var(--RT·surface-3)';
+  endnoteContainer.style.borderTop = `1px solid ${window.RT.theme('read', 'surface', '3')}`;
   endnoteContainer.style.paddingTop = '1rem';
 };
index ac2a375..19c4dbe 100644 (file)
@@ -10,7 +10,7 @@ window.RT = window.RT || {};
 window.RT.term = function() {
   const RT = window.RT;
 
-  const debug = RT.debug || {
+  const debug = RT.Debug || {
     log: function() {}
     ,warn: function() {}
     ,error: function() {}
@@ -22,13 +22,14 @@ window.RT.term = function() {
     // Track seen terms so only the first occurrence is decorated
     const seen_terms_dpa = new Set();
 
+    // Inside the apply_style function
     const apply_style = (el, is_neologism_b) => {
       el.style.fontStyle = 'italic';
       el.style.fontWeight = is_neologism_b ? '600' : '500';
       el.style.color = is_neologism_b
-        ? 'var(--RT·brand-secondary)'
-        : 'var(--RT·brand-primary)';
-      el.style.paddingRight = '0.1em'; // Compensation for italic slant
+        ? window.RT.theme('read', 'brand', 'secondary')
+        : window.RT.theme('read', 'brand', 'primary');
+      el.style.paddingRight = '0.1em';
       el.style.display = 'inline';
     };
 
index d3cf4bd..c08bbb5 100644 (file)
@@ -8,7 +8,7 @@
 window.RT = window.RT || {};
 
 window.RT.title = function() {
-  const debug = window.RT.debug || { log: function(){} };
+  const debug = window.RT.Debug || { log: function(){} };
   
   document.querySelectorAll('rt·title').forEach(el => {
     const title = el.getAttribute('title') || 'Untitled Document';
index d015b0d..8415381 100644 (file)
       if (typeof RT[name] === 'function') {
         RT.Element.push(RT[name]);
       } else {
-        RT.debug.warn('layout', 'Required element function missing: RT.' + name);
+        RT.Debug.warn('layout', 'Required element function missing: RT.' + name);
       }
     });
   }
diff --git a/developer/authored/Manuscript.copy/Layout/page_fixed_glow.js b/developer/authored/Manuscript.copy/Layout/page_fixed_glow.js
deleted file mode 100644 (file)
index be1c1be..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
-  Page Layout: Fixed Glow
-  Standard: Theme 1.0
-  Description: A variable-height container with a glowing border effect that matches the active theme.
-*/
-(function(){
-  const RT = window.RT = window.RT || {};
-
-  RT.page = function() {
-    RT.config = RT.config || {};
-    
-    // Default Configuration
-    const defaults = {
-       width: "100%"
-      ,min_height: "15rem" // Replaces fixed height
-      ,padding: "3rem"
-      ,margin: "4rem auto"
-      
-      ,bg_color:     "var(--RT·surface-0)"         
-      ,border_color: "var(--RT·brand-primary)"     
-      ,text_color:   "var(--RT·brand-primary)"     
-      
-      ,shadow: "drop-shadow(0px 0px 15px var(--RT·brand-primary))" 
-    };
-
-    RT.config.page = Object.assign({}, defaults, RT.config.page || {});
-
-    const conf = RT.config.page;
-    const style_id = 'RT·page-fixed-glow';
-    
-    if (!document.getElementById(style_id)) {
-      const style_el = document.createElement('style');
-      style_el.id = style_id;
-      
-      style_el.textContent = `
-        /* Reset page counter on the article container */
-        RT·article {
-          counter-reset: RT·page-counter;
-        }
-
-        RT·page {
-          display: block;
-          position: relative;
-          box-sizing: border-box;
-          overflow: hidden; 
-
-          /* Dimensions */
-          width: ${conf.width};
-          min-height: ${conf.min_height};
-          margin: ${conf.margin};
-          padding: ${conf.padding};
-          
-          /* Theming */
-          background-color: ${conf.bg_color}; 
-          border: 1px solid ${conf.border_color};
-          
-          /* The "Glow" Effect */
-          filter: ${conf.shadow};
-          
-          /* Counter Increment */
-          counter-increment: RT·page-counter;
-        }
-
-        /* Page Numbering */
-        RT·page::after {
-          content: "Page " counter(RT·page-counter);
-          position: absolute;
-          bottom: 1.5rem;
-          right: 3rem;
-          
-          font-family: "Noto Sans", sans-serif;
-          font-size: 0.9rem;
-          font-weight: bold;
-          
-          color: ${conf.text_color}; 
-          opacity: 0.8;
-          pointer-events: none;
-        }
-      `;
-      document.head.appendChild(style_el);
-    }
-  };
-})();
index 2a0014b..19fa23c 100644 (file)
@@ -1,6 +1,6 @@
 window.RT.paginate_by_element = function () {
   const RT = window.RT;
-  const debug = RT.debug || { log: function(){}, error: function(){} };
+  const debug = RT.Debug || { log: function(){}, error: function(){} };
   const page_conf = (RT.config && RT.config.page) ? RT.config.page : {};
   const page_height_limit = page_conf.height_limit || 1000;
 
index 8ccaa16..1633efe 100644 (file)
@@ -46,6 +46,16 @@ window.RT.theme_library['golden_wheat'] = {
     func: "oklch(0.45 0.12 35)",
     comment: "oklch(0.60 0.02 90)"
   },
+  page: {
+    width: "6.5in",
+    min_height: "9in",
+    padding: "0.5in 1in",
+    margin: "20px auto",
+    bg_color: "oklch(0.95 0.02 90)",
+    border_color: "oklch(0.85 0.02 90)",
+    text_color: "oklch(0.20 0.02 25)",
+    shadow: "0 4px 15px rgba(0,0,0,0.1)"
+  },
   custom_css: `
     rt-article p, rt-article li { text-shadow: 0px 0px 0.5px rgba(0,0,0, 0.2); }
     .MathJax, .MathJax_Display, .mjx-chtml {
index c4acc80..f0c33e5 100644 (file)
@@ -46,6 +46,16 @@ window.RT.theme_library['inverse_wheat'] = {
     func: "oklch(0.80 0.12 85)",
     comment: "oklch(0.55 0.02 90)"
   },
+  page: {
+    width: "6.5in",
+    min_height: "9in",
+    padding: "0.5in 1in",
+    margin: "20px auto",
+    bg_color: "oklch(0.95 0.02 90)",
+    border_color: "oklch(0.85 0.02 90)",
+    text_color: "oklch(0.20 0.02 25)",
+    shadow: "0 4px 15px rgba(0,0,0,0.1)"
+  },
   custom_css: `
     img.rt-diagram { filter: invert(1) hue-rotate(180deg); }
   `
index 8a1e751..44761e8 100644 (file)
@@ -46,5 +46,14 @@ window.RT.theme_library['wheat'] = {
     func: "oklch(0.50 0.10 320)",
     comment: "oklch(0.65 0.02 80)"
   },
-  custom_css: ``
+  page: {
+    width: "6.5in",
+    min_height: "9in",
+    padding: "0.5in 1in",
+    margin: "20px auto",
+    bg_color: "oklch(0.95 0.02 90)",
+    border_color: "oklch(0.85 0.02 90)",
+    text_color: "oklch(0.20 0.02 25)",
+    shadow: "0 4px 15px rgba(0,0,0,0.1)"
+  },
 };