From: Thomas Walker Lynch Date: Thu, 6 Aug 2026 11:54:32 +0000 (+0000) Subject: . X-Git-Url: https://git.reasoningtechnology.com/?a=commitdiff_plain;h=4e7e972e6b3301b60024c1d6c0a7c05e85575d52;p=RT-Style . --- diff --git a/developer/authored/Manuscript.copy/Core/stage_manager.js b/developer/authored/Manuscript.copy/Core/stage_manager.js index b21ad8f..fb8777b 100644 --- a/developer/authored/Manuscript.copy/Core/stage_manager.js +++ b/developer/authored/Manuscript.copy/Core/stage_manager.js @@ -11,12 +11,15 @@ return; } + // Inject Utilities prior to execution + window.RT.load('Core/utility'); + // Prevent duplicate initialization if(window.RT.Element instanceof Set){ console.warn("RT stage_manager already initialized. Aborting duplicate run."); return; } - + /* Phase task queues/functions in order the phases are processed. Generators and element styling must run before pagination. Even styling changes the size of the document. diff --git a/developer/authored/Manuscript.copy/Core/theme_make.js b/developer/authored/Manuscript.copy/Core/theme_make.js index 9ed48af..127dc82 100644 --- a/developer/authored/Manuscript.copy/Core/theme_make.js +++ b/developer/authored/Manuscript.copy/Core/theme_make.js @@ -1,8 +1,8 @@ // see Theme/manifest, all themes are registered in the library by name -(function() { +(function(){ - if (!window.RT) { + if(!window.RT){ console.error("RT not defined - was RT-Manuscript_make run?"); return; } @@ -10,44 +10,44 @@ RT.theme_library = RT.theme_library || {}; // 'read' or 'write' the active theme fields, or 'load' a new theme - RT.theme = (function() { + RT.theme = (function(){ const dictionary = { - meta: { is_dark: false, name: "" }, - surface: { 0: "", 1: "", 2: "", 3: "", input: "", code: "", select: "" }, - content: { main: "", muted: "", subtle: "", inverse: "" }, - brand: { primary: "", secondary: "", tertiary: "", link: "" }, - 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: "" }, - custom_css: "" + meta: {is_dark: false ,name: ""} + ,surface: {screen: "" ,0: "" ,1: "" ,2: "" ,3: "" ,input: "" ,code: "" ,select: ""} + ,content: {main: "" ,muted: "" ,subtle: "" ,inverse: ""} + ,brand: {primary: "" ,secondary: "" ,tertiary: "" ,link: ""} + ,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: ""} + ,custom_css: "" }; - function resolve_path(path_array) { + function resolve_path(path_array){ let current = dictionary; - for (let i = 0; i < path_array.length - 1; i++) { + for(let i = 0; i < path_array.length - 1; i++){ const step = path_array[i]; - if (current[step] === undefined) return null; + if(current[step] === undefined) return null; current = current[step]; } - return { container: current, key: path_array[path_array.length - 1] }; + return {container: current ,key: path_array[path_array.length - 1]}; } - function apply_and_validate_theme(new_theme, fallback_color) { - const debug = RT.Debug || { error: function(){} }; + function apply_and_validate_theme(new_theme ,fallback_color){ + const debug = RT.Debug || {error: function(){}}; // Pass 1: Walk the structure of the active dictionary - function walk_current(curr, source, path) { - for (const key in curr) { + function walk_current(curr ,source ,path){ + for(const key in curr){ const current_path = path ? path + "." + key : key; - if (typeof curr[key] === 'object' && curr[key] !== null) { - walk_current(curr[key], source[key] || {}, current_path); - } else { - if (source[key] !== undefined && source[key] !== "") { + if(typeof curr[key] === 'object' && curr[key] !== null){ + walk_current(curr[key] ,source[key] || {} ,current_path); + }else{ + if(source[key] !== undefined && source[key] !== ""){ curr[key] = source[key]; - } else { - debug.error('theme', `Missing key in loaded theme: ${current_path}. Assigning fallback.`); + }else{ + debug.error('theme' ,`Missing key in loaded theme: ${current_path}. Assigning fallback.`); curr[key] = fallback_color; } } @@ -55,59 +55,59 @@ } // Pass 2: Walk the structure of the incoming theme dictionary - function walk_new(source, curr, path) { - for (const key in source) { + function walk_new(source ,curr ,path){ + for(const key in source){ const current_path = path ? path + "." + key : key; - if (typeof source[key] === 'object' && source[key] !== null) { - if (curr[key] === undefined) { - debug.error('theme', `Unexpected structure in loaded theme: ${current_path} is an object.`); - } else { - walk_new(source[key], curr[key] || {}, current_path); + if(typeof source[key] === 'object' && source[key] !== null){ + if(curr[key] === undefined){ + debug.error('theme' ,`Unexpected structure in loaded theme: ${current_path} is an object.`); + }else{ + walk_new(source[key] ,curr[key] || {} ,current_path); } - } else { - if (curr[key] === undefined) { - debug.error('theme', `Unexpected key in loaded theme: ${current_path}.`); + }else{ + if(curr[key] === undefined){ + debug.error('theme' ,`Unexpected key in loaded theme: ${current_path}.`); } } } } - walk_current(dictionary, new_theme, ""); - walk_new(new_theme, dictionary, ""); + walk_current(dictionary ,new_theme ,""); + walk_new(new_theme ,dictionary ,""); } - return function(command, ...args) { - if (command === 'read') { + return function(command ,...args){ + if(command === 'read'){ const target = resolve_path(args); return (target && target.container.hasOwnProperty(target.key)) ? target.container[target.key] : null; } - if (command === 'write') { - if (args.length < 2) return; + if(command === 'write'){ + if(args.length < 2) return; const value = args.pop(); const target = resolve_path(args); - if (target && target.container.hasOwnProperty(target.key)) { + if(target && target.container.hasOwnProperty(target.key)){ target.container[target.key] = value; } return; } - if (command === 'load') { + if(command === 'load'){ const theme_name = args[0]; const fallback = args[1] || "#FF00FF"; - if (!RT.theme_library.hasOwnProperty(theme_name)) { - RT.Debug.error('theme', `Load aborted: Theme '${theme_name}' is not in the theme_library.`); + if(!RT.theme_library.hasOwnProperty(theme_name)){ + RT.Debug.error('theme' ,`Load aborted: Theme '${theme_name}' is not in the theme_library.`); return false; } - apply_and_validate_theme(RT.theme_library[theme_name], fallback); + apply_and_validate_theme(RT.theme_library[theme_name] ,fallback); // --- CSS Fallback for Pseudo-Elements and External Libraries --- - let style_el = document.getElementById('rt-theme-custom-css'); - if (!style_el) { + let style_el = document.getElementById('RT·theme-custom-css'); + if(!style_el){ style_el = document.createElement('style'); - style_el.id = 'rt-theme-custom-css'; + style_el.id = 'RT·theme-custom-css'; document.head.appendChild(style_el); } // Write the string if it exists, otherwise clear the block @@ -116,15 +116,15 @@ return true; } - RT.Debug.error('theme', 'Invalid command passed to theme dictionary: ' + command); + RT.Debug.error('theme' ,'Invalid command passed to theme dictionary: ' + command); }; })(); - RT.theme_preference = function(author_pref, default_color = "#FF00FF") { + RT.theme_preference = function(author_pref ,default_color = "#FF00FF"){ const reader_pref = localStorage.getItem('RT-Manuscript·theme_preference'); const theme_to_load = reader_pref ? reader_pref : author_pref; - RT.theme('load', theme_to_load, default_color); + RT.theme('load' ,theme_to_load ,default_color); }; })(); diff --git a/developer/authored/Manuscript.copy/Core/utility.js b/developer/authored/Manuscript.copy/Core/utility.js new file mode 100644 index 0000000..3c131af --- /dev/null +++ b/developer/authored/Manuscript.copy/Core/utility.js @@ -0,0 +1,46 @@ +/* + Core/utility.js + Centralized utility functions for global registry queries and repetitive DOM operations. +*/ + +(function(){ + + window.RT = window.RT || {}; + window.RT.Utility = window.RT.Utility || {}; + + // Registry Management + window.RT.Utility.Registry = { + has: function(namespace_obj, key) { + return namespace_obj && Object.prototype.hasOwnProperty.call(namespace_obj, key); + }, + + register_make: function(namespace_obj, counter_name, node_ref, attributes) { + namespace_obj[counter_name] = namespace_obj[counter_name] || {}; + namespace_obj[counter_name].node = node_ref; + + if (attributes) { + for (let i = 0; i < attributes.length; i++) { + namespace_obj[counter_name][attributes[i]] = ""; // Flag presence + } + } + } + }; + + // DOM Structural Operations + window.RT.Utility.Dom = window.RT.Utility.Dom || {}; + + window.RT.Utility.Dom.get_structural_depth = function(element, counter_name) { + let depth = 0; + let curr = element.parentElement; + + while(curr) { + const tag = (curr.tagName || '').toLowerCase(); + if (tag === 'rt·section' || (tag === 'rt·counter·step' && curr.getAttribute('counter') === counter_name)) { + depth++; + } + curr = curr.parentElement; + } + return depth; + }; + +})(); diff --git a/developer/authored/Manuscript.copy/Document/design.html b/developer/authored/Manuscript.copy/Document/design.html new file mode 100644 index 0000000..0ef36e1 --- /dev/null +++ b/developer/authored/Manuscript.copy/Document/design.html @@ -0,0 +1,94 @@ + + + + + RT Manuscript: Design & Implementation Manual + + + + + + + + + + + + + + Global Variable Methodology +

+ The RT-Style layout engine enforces a strict global namespace architecture to manage layout state cleanly and prevent execution collision across asynchronous element evaluations. +

+ +

+ The `window.RT` Root: All operational properties, layout configurations, execution queues, and registered semantic elements reside exclusively within the `window.RT` object. +

+ +

+ Element State Dictionaries: Every semantic element module registers its own specific namespace dictionary within the root object (e.g., `RT.Section = {}`). This allows individual modules to track their own initialization state across multiple execution phases. Consequently, an element evaluates its own object to determine if it has already been loaded, preventing duplicate instantiation when the layout engine iterates the DOM tree. +

+ +

+ DOM Reference & Attribute Tracking: The element-specific dictionaries maintain explicit references to active layout mechanics, reducing the need for computationally expensive DOM traversal. For example, a section element maps its underlying `` DOM node references by counter name directly into the `RT.Section` dictionary. +

+ +

+ By tracking the element's object within the dictionary, the semantic code dynamically references the exact attributes an element was created with. The presence of attributes such as `splitable` are stored directly within the counter's dictionary as a key (assigned an empty string or null value). The existence of the key itself acts as a boolean flag for the pagination engine to evaluate physical breaking limits. +

+
+ + + Execution Pipeline Schedule +

+ In the RT-Style framework when a page is rendered, the JS code associated with the semantic elements modifies the DOM. It does so in multiple passes so that page numbering, counters, and cross references function without need for forward referencing or concern about dependencies between them. Consequently what is seen in the element view of the browser debug window will not have a one to one correspondence with the elements found in the document. +

+ + + + Evaluates raw 1D streams. Injects section wrappers, maps counter states, evaluates math tokens, and isolates explicit string payloads. + + + Initial document chunking. Slices the continuous DOM into discrete <RT·page> boundaries based on height configurations. Modifies the tree aggressively. + + + Applies geometric CSS configurations to the generated pages. + + + Walks the tree to increment the state machines and populates snapshot variables. Must run after pagination to ensure page numbers exist. + + + Resolves mapping dictionaries bridging logical content with its physically paginated layout geometry. + + + Absorbs dimensional deltas. Expands page limits to accommodate space consumed by injected cross-references and generated indices. + + +
+ + + Implementation Notes + + + + The <RT·book> element is a planned extension. We are deliberately delaying its separation from the article layout until the core engine's pagination and state machine logic are fully stabilized. Currently, book mechanics operate by triggering page breaks and section scoping within the standard article stream. + + + The <RT·memo> container inherits all layout functionality from the Article configuration but enforces a static, print-ready CSS environment. This layout model is currently maintained as a legacy execution branch. Continued parity with the core layout engine is not guaranteed. + + + + + +
+ + diff --git a/developer/authored/Manuscript.copy/Document/user.html b/developer/authored/Manuscript.copy/Document/user.html new file mode 100644 index 0000000..71b2d87 --- /dev/null +++ b/developer/authored/Manuscript.copy/Document/user.html @@ -0,0 +1,264 @@ + + + + + RT Manuscript: User Manual + + + + + + + + + + +

+ A semantic JavaScript engine for intercepting and compiling raw DOM data graphs into formatted technical manuscripts. +

+ + + + + Philosophical Approach +

+ An RT-Style document follows an abstraction hierarchy. At the highest level there is theme. The current working theme is inverse_wheat. Theme colors are set by the role played in the document; they do not refer to any DOM elements. The next layer down the abstraction stack is layout. The current working layout is article_tech_ref. The purpose of layout is to set the general size and placement of elements. article_tech_ref assumes the text will be laid out across pages and displayed in a browser. It allows page length to be flexible so that some elements can appear without breaks in them. Then the RT semantic elements are placed in the layout. An RT semantic element is named by the role it plays in the document, such as title page, section, code, math, etc. +

+ +

+ There is no CSS file to edit. CSS is a miniature language for static styling. However, it lacks loops or conditionals, and even variables are an awkward addition. In RT-Style, style is painted onto elements from JavaScript functions. If something isn't working out in the presentation, this is considered to be a design problem, not a reason to be modifying style. +

+ +

+ RT-Style uses the middle dot as a namespace separator in tags. On macOS: Option + Shift + 9. On Windows: Hold Alt and type 0183 on the numeric keypad. Linux: Compose Key followed by . and -. +

+ +

+ As a quick review of terminology, note that content is found between the opening HTML tag and the closing HTML tag. E.g. <RT·noop>This is content.</RT·noop>. Whereas an attribute is a name-value pair found within an opening HTML tag. E.g. <RT·noop name="value">. +

+
+ + + Manuscript Types +

+ These are the top-level semantic environments. They establish the macro-boundaries that enforce the rendering constraints for all scoped child content. +

+ + + + Standard technical document architecture designed for continuous digital reading. + + + Strict print layout constraint designed to mirror standard physical paper dimensions. + + + Multi-chapter assembly architecture. + + +
+ + + Article Environment +

The standard operational header template for an article instance:

+ + + <!DOCTYPE html> + <html lang="en"> + <head> + <meta charset="UTF-8"> + <title>RT Manuscript: Reference Manual</title> + <script src="RT-Manuscript_locator.js"></script> + <script> + window.RT.theme_preference('inverse_wheat'); + window.RT.load('Layout/paginate'); + window.RT.load('Layout/article_tech_ref'); + window.RT.load('Element/theme_selector'); + </script> + </head> + <body> + <RT·theme-selector></RT·theme-selector> + <RT·article> + … + </RT·article> + </body> + </html> + + + + Decorators + + + Semantic anchor for technical terminology. Formats the initial occurrence and registers the element ID for index generation. Authors should decorate all occurrences of the term so that they can be indexed. + + + Semantic anchor for a novel term coined within the current document boundaries. Again all instances should be decorated. + + + + + + Layout environments +

+ Context-aware formatting blocks. Valid inline or as distinct segments. +

+ + + Scoped nestable section marker. Each nesting level is styled differently. + + + Gives a name to the immediately container. Evaluated by sections to set the section heading, by relations to name a relation, and by matrices to name vectors, etc. Multiple instances are concatenated with newlines. + + + Code span or pre-formatted code block. If opening and closing tags are on the same line, content is considered to be inline span code. Otherwise, the content is considered to be a block of code. + + + Injects mathematical layout evaluation via the MathJax rendering engine. + + +
+ + + Grid environments +

+ These elements map semantic data into an internal Cartesian grid state prior to CSS projection, isolating the markup from physical layout mechanics. +

+ + + Base Cartesian coordinate grid. Projects child <RT·e> elements based on explicitly defined x and y index geometries.
+
+
Attributes:
+ model: Projection strategy. "html-grid-direct" or "html-grid-transpose". (Default: "html-grid-direct")
+ major: Carriage return trigger direction. "x" or "y". (Default: "x")
+
+ Child Element: <RT·e>
+ x: Target x-axis index or index range (e.g., "0-2", where 2 is the maximum index into an array regardless of data type). Default when no y value, is to auto increment, default with a y value is to reset to 0.
+ y: Target y-axis index or index range. Default is to keep the prior value.
+ type: Decoration type. "data", "x-label", "y-label", or "name". (Default: "data") +
+
+ + Two-column associative layout mapping explicitly declared keys to their scoped definitions.
+
+
Attributes:
+ key: Header text for the identifier column.
+ definition: Header text for the data payload column.
+
+ Child Element: <RT·entry>
+ key: The term being defined. The scoped HTML of the entry forms the definition value. +
+
+ + Relational algebra layout formatter. Enforces multi-line text wrapping limits, calculates row distinction boundaries, and restricts column headers to the tuple scope.
+
+
Attributes:
+ layout-intention: "row-tuple" or "column-tuple". (Default: "row-tuple")
+
+ Child Elements:
+ <RT·tuple-meta>: Describes the components rather than providing them. E.g.<RT·label> provides a component label.
+ <RT·tuple>: Container for components. Each <RT·name> is taken as a first component. Component data values are given in <RT·e> tags, these are taken in the order they occur. +
+
+ + Linear algebraic matrix representation. Enforces rigid padding, brackets mathematical delimiters, and suppresses the exterior grid coordinate layout. + +
+
+ + + Generators +

Data-injection nodes. These elements do not wrap content; execution is governed strictly by the attributes provided.

+ + + Constructs the primary document header block. + + + Compiles an automated Table of Contents by scanning the document's nested <RT·section> hierarchy depth. + + + Generates the numeric list of endnote payloads. Replaces all inline endnote citations with bracketed indices. + + +
+ + + Counters +

+ Counters operate as explicit state machines. Initialization requires a unique identifier. Execution evaluates scope depth and increments the state. +

+ + + Initializes the named counter state machine. + + + Increments the counter block. Executing a step inside an existing step boundary pushes the state to the next depth index. + + + Clones the active count variables into the lookup dictionary. Snapshot processing operates independently of the layout pass, allowing global retrieval regardless of physical placement. + + + Retrieves the stored snapshot and projects it as innerHTML. + + +
+ + + Cross reference +

+ A two-pass mechanism bridging logical content with its physically paginated layout geometry. +

+ + + Registers the scoped content and its finalized layout page index into the reference dictionary. + + + Queries the reference dictionary and injects the output. + + +
+ + + Annotation + + + Marks the scoped content for extraction and placement in the endnotes block. + + + Marks the scoped content for layout relocation to the active page's footer. + + + + + + Pagination + + + Physical document boundary generated dynamically by the paginator. Not for manual insertion. + + + Explicit directive terminating the current <RT·page> evaluation and pushing subsequent data to the next boundary. + + + +
+ + + Global widgets + + + Injects a floating overlay permitting real-time CSS theme execution. Writes the selection to the browser's localStorage. + + + + +
+ + diff --git a/developer/authored/Manuscript.copy/Element/section.js b/developer/authored/Manuscript.copy/Element/section.js index b03500a..cc3c59a 100644 --- a/developer/authored/Manuscript.copy/Element/section.js +++ b/developer/authored/Manuscript.copy/Element/section.js @@ -1,12 +1,19 @@ /* Element/section.js Expands macros into primitives. + Utilizes the global RT.Section namespace for state tracking and execution guards. */ (function(){ if(!window.RT) return; + window.RT.Section = window.RT.Section || {}; + + // Guard against multiple script inclusions + if(window.RT.Section.is_loaded) return; + window.RT.Section.is_loaded = true; + const apply_style = function(title_node ,depth ,config){ const base_size = 2.25; const size = Math.max(1.1 ,base_size - (depth * 0.35)); @@ -35,33 +42,33 @@ const debug = window.RT.Debug || { log: function(){} }; if(debug.log) debug.log('section' ,'Expanding section macros'); + const U = window.RT.Utility; const config = window.RT.layout_config || {}; const section_seq = document.querySelectorAll('RT·section, rt·section'); if(section_seq.length === 0) return; const article = document.querySelector('RT·article, rt·article, RT·memo, rt·memo'); - if(article && !document.querySelector('RT·counter·make[counter="RT_section"], rt·counter·make[counter="RT_section"]')){ + const counter_name = 'RT·Section·counter'; + + // Check the global dictionary for existence rather than traversing the DOM + if(article && !U.Registry.has(window.RT.Section, counter_name)){ const make = document.createElement('RT·counter·make'); - make.setAttribute('counter' ,'RT_section'); + make.setAttribute('counter' ,counter_name); make.setAttribute('style' ,'CountingNumber'); make.setAttribute('mode' ,'scoped'); make.setAttribute('on-first-step' ,'0'); article.insertBefore(make ,article.firstChild); + + // Register the physical node and its attributes into the global namespace + U.Registry.register_make(window.RT.Section, counter_name, make, ['splitable']); } let section_idx = 0; section_seq.forEach(section => { - let depth = 0; - let curr = section.parentElement; - while(curr){ - const tag = (curr.tagName || '').toLowerCase(); - if(tag === 'rt·section' || (tag === 'rt·counter·step' && curr.getAttribute('counter') === 'RT_section')){ - depth++; - } - curr = curr.parentElement; - } + // Utilize the abstracted structural depth utility + let depth = U.Dom.get_structural_depth(section, counter_name); if(depth === 0){ if(!section.previousElementSibling?.tagName?.toLowerCase().includes('page-break')){ @@ -73,12 +80,17 @@ const snap_id = section.id || ('section_snap_' + section_idx++); const step = document.createElement('RT·counter·step'); - step.setAttribute('counter' ,'RT_section'); - step.setAttribute('splitable' ,'true'); + step.setAttribute('counter' ,counter_name); + + // Query the global dictionary for the splitable flag + if(U.Registry.has(window.RT.Section[counter_name], 'splitable')) { + step.setAttribute('splitable', 'true'); + } + step.id = snap_id; const snap = document.createElement('RT·counter·snapshot'); - snap.setAttribute('counter' ,'RT_section'); + snap.setAttribute('counter' ,counter_name); snap.setAttribute('snapshot' ,snap_id); step.appendChild(snap); diff --git a/developer/authored/Manuscript.copy/Layout/article_tech_ref.js b/developer/authored/Manuscript.copy/Layout/article_tech_ref.js index eb612b7..a7dd3b6 100644 --- a/developer/authored/Manuscript.copy/Layout/article_tech_ref.js +++ b/developer/authored/Manuscript.copy/Layout/article_tech_ref.js @@ -24,7 +24,8 @@ function compile_configuration(){ window.RT.layout_config = { - surface_0: t('surface' ,'0') + surface_screen: t('surface', 'screen') + ,surface_0: t('surface' ,'0') ,surface_code: t('surface' ,'code') ,content_main: t('content' ,'main') ,brand_primary: t('brand' ,'primary') @@ -47,6 +48,13 @@ function apply_macro_boundaries(){ const conf = window.RT.layout_config; + + // Apply viewport screen boundary color, defaulting to surface_0 if undefined + const screen_bg = conf.surface_screen || conf.surface_0 || '#000000'; + document.documentElement.style.backgroundColor = screen_bg; + document.body.style.backgroundColor = screen_bg; + document.body.style.margin = "0"; // Prevent default browser margin bleeding + const article_seq = document.querySelectorAll('RT·article'); for(let i = 0; i < article_seq.length; i++){ @@ -70,14 +78,6 @@ } } - required_elements.forEach(name => RT.load('Element/' + name)); - - if(RT.Element && RT.PageStyle){ - RT.Element.add(compile_configuration); // Re-evaluate on render pass - RT.Element.add(apply_macro_boundaries); - RT.PageStyle.add(apply_macro_boundaries); - } - const page_seq = document.querySelectorAll('RT·article RT·page'); for(let i = 0; i < page_seq.length; i++){ let p_style = page_seq[i].style; diff --git a/developer/authored/Manuscript.copy/Theme/inverse_wheat.js b/developer/authored/Manuscript.copy/Theme/inverse_wheat.js index 1be5c97..76a88f4 100644 --- a/developer/authored/Manuscript.copy/Theme/inverse_wheat.js +++ b/developer/authored/Manuscript.copy/Theme/inverse_wheat.js @@ -2,80 +2,78 @@ (function(){ - if (!window.RT) { + if(!window.RT){ console.error("RT not defined - was RT-Manuscript_make run?"); return; } // Prevent duplicate initialization - if (window.RT.theme_library instanceof Set) { + if(window.RT.theme_library instanceof Set){ console.error("RT.theme_library missing,- was theme_make run?"); return; } window.RT.theme_library['inverse_wheat'] = { meta: { - is_dark: true, - name: "inverse_wheat" - }, - surface: { - 0: "oklch(0.157 0 0)", - 1: "oklch(0.198 0 0)", - 2: "oklch(0.221 0 0)", - 3: "oklch(0.240 0 0)", - input: "oklch(0.210 0 0)", - code: "oklch(0.204 0 0)", - select: "oklch(0.358 0.073 88)" - }, - content: { - main: "oklch(0.927 0.050 97)", - muted: "oklch(0.699 0.030 78)", - subtle: "oklch(0.522 0.022 82)", - inverse: "oklch(0.157 0 0)" - }, - brand: { - primary: "oklch(0.841 0.173 85)", - secondary: "oklch(0.827 0.135 78)", - tertiary: "oklch(0.795 0.081 66)", - link: "oklch(0.865 0.177 90)" - }, - border: { - faint: "oklch(0.280 0.018 78)", - regular: "oklch(0.386 0.028 82)", - strong: "oklch(0.533 0.041 77)" - }, - state: { - success: "oklch(0.671 0.168 137)", - warning: "oklch(0.767 0.159 68)", - error: "oklch(0.591 0.172 24)", - info: "oklch(0.661 0.078 232)" - }, - syntax: { - keyword: "oklch(0.825 0.146 72)", - string: "oklch(0.804 0.132 122)", - func: "oklch(0.756 0.134 39)", - comment: "oklch(0.573 0.035 78)" - }, - 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 { + is_dark: true + ,name: "inverse_wheat" + } + ,surface: { + screen: "#000000" + ,0: "oklch(0.157 0 0)" + ,1: "oklch(0.198 0 0)" + ,2: "oklch(0.221 0 0)" + ,3: "oklch(0.240 0 0)" + ,input: "oklch(0.210 0 0)" + ,code: "oklch(0.204 0 0)" + ,select: "oklch(0.358 0.073 88)" + } + ,content: { + main: "oklch(0.927 0.050 97)" + ,muted: "oklch(0.699 0.030 78)" + ,subtle: "oklch(0.522 0.022 82)" + ,inverse: "oklch(0.157 0 0)" + } + ,brand: { + primary: "oklch(0.841 0.173 85)" + ,secondary: "oklch(0.827 0.135 78)" + ,tertiary: "oklch(0.795 0.081 66)" + ,link: "oklch(0.865 0.177 90)" + } + ,border: { + faint: "oklch(0.280 0.018 78)" + ,regular: "oklch(0.386 0.028 82)" + ,strong: "oklch(0.533 0.041 77)" + } + ,state: { + success: "oklch(0.671 0.168 137)" + ,warning: "oklch(0.767 0.159 68)" + ,error: "oklch(0.591 0.172 24)" + ,info: "oklch(0.661 0.078 232)" + } + ,syntax: { + keyword: "oklch(0.825 0.146 72)" + ,string: "oklch(0.804 0.132 122)" + ,func: "oklch(0.756 0.134 39)" + ,comment: "oklch(0.573 0.035 78)" + } + ,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); max-width: 100%; height: auto; } ` - - }; })(); - diff --git a/tester/authored/Counter/test_0.html b/tester/authored/Counter/test_0.html index 9ec2a6d..508fe0a 100644 --- a/tester/authored/Counter/test_0.html +++ b/tester/authored/Counter/test_0.html @@ -1,47 +1,47 @@ @@ -79,9 +79,9 @@ snapshot() == (between,[1])
snapshot() -> ( - , - [] , - "" + + ,[] + ,"" )
@@ -91,11 +91,10 @@ snapshot() == (between,[1])
snapshot() == ( - , - [] , - "" - ) - // Expected: ( preamble ,[0] , "1" ) + + ,[] + ,"" + ) // Expected: ( preamble ,[0] ,"1" )
step("A"){
@@ -104,11 +103,10 @@ snapshot() == (between,[1])
snapshot() == ( - , - [] , - "" - ) - // Expected: ( preamble ,[0,0] , "1.1" ) + + ,[] + ,"" + ) // Expected: ( preamble ,[0,0] ,"1.1" )
@@ -117,11 +115,10 @@ snapshot() == (between,[1])
snapshot() == ( - , - [] , - "" - ) - // Expected: ( between ,[0,0] , "1" ) + + ,[] + ,"" + ) // Expected: ( between ,[0,0] ,"1" )
step("A"){
@@ -130,11 +127,10 @@ snapshot() == (between,[1])
snapshot() == ( - , - [] , - "" - ) - // Expected: ( preamble ,[0,1] , "1.2" ) + + ,[] + ,"" + ) // Expected: ( preamble ,[0,1] ,"1.2" )
@@ -143,11 +139,10 @@ snapshot() == (between,[1])
snapshot() == ( - , - [] , - "" - ) - // Expected: ( between ,[0,1] , "1" ) + + ,[] + ,"" + ) // Expected: ( between ,[0,1] ,"1" )
@@ -156,10 +151,10 @@ snapshot() == (between,[1])
snapshot() == ( - , - [] , - "" - ) // Expected: ( between ,[0] , "" ) + + ,[] + ,"" + ) // Expected: ( between ,[0] ,"" )
step("A"){
@@ -168,10 +163,10 @@ snapshot() == (between,[1])
snapshot() == ( - , - [] , - "" - ) // Expected: ( preamble ,[1] , "2" ) + + ,[] + ,"" + ) // Expected: ( preamble ,[1] ,"2" )
step("A"){
@@ -180,10 +175,10 @@ snapshot() == (between,[1])
snapshot() == ( - , - [] , - "" - ) // Expected: ( preamble ,[1,0] , "2.1" ) + + ,[] + ,"" + ) // Expected: ( preamble ,[1,0] ,"2.1" )
@@ -192,10 +187,10 @@ snapshot() == (between,[1])
snapshot() == ( - , - [] , - "" - ) // Expected: ( between ,[1,0] , "2" ) + + ,[] + ,"" + ) // Expected: ( between ,[1,0] ,"2" )
step("A"){
@@ -204,10 +199,10 @@ snapshot() == (between,[1])
snapshot() == ( - , - [] , - "" - ) // Expected: ( preamble ,[1,1] , "2.2" ) + + ,[] + ,"" + ) // Expected: ( preamble ,[1,1] ,"2.2" )
@@ -219,10 +214,10 @@ snapshot() == (between,[1])
snapshot() == ( - , - [] , - "" - ) // Expected: ( between ,[1] , "" ) + + ,[] + ,"" + ) // Expected: ( between ,[1] ,"" )
diff --git a/tester/authored/Counter/test_1.html b/tester/authored/Counter/test_1.html index 88956ac..08cf6d2 100644 --- a/tester/authored/Counter/test_1.html +++ b/tester/authored/Counter/test_1.html @@ -33,9 +33,9 @@
snapshot() -> ( - , - [] , - "" + + ,[] + ,"" )
@@ -45,11 +45,10 @@
snapshot() == ( - , - [] , - "" - ) - // Expected: ( preamble ,[0] , "0" ) + + ,[] + ,"" + ) // Expected: ( preamble ,[0] ,"I" )
step("A"){
@@ -58,11 +57,10 @@
snapshot() == ( - , - [] , - "" - ) - // Expected: ( preamble ,[0,0] , "0.A" ) + + ,[] + ,"" + ) // Expected: ( preamble ,[0,0] ,"I.A" )
@@ -71,11 +69,10 @@
snapshot() == ( - , - [] , - "" - ) - // Expected: ( between ,[0,0] , "0" ) + + ,[] + ,"" + ) // Expected: ( between ,[0,0] ,"I" )
step("A"){
@@ -84,11 +81,10 @@
snapshot() == ( - , - [] , - "" - ) - // Expected: ( preamble ,[0,1] , "0.B" ) + + ,[] + ,"" + ) // Expected: ( preamble ,[0,1] ,"I.B" )
@@ -97,11 +93,10 @@
snapshot() == ( - , - [] , - "" - ) - // Expected: ( between ,[0,1] , "0" ) + + ,[] + ,"" + ) // Expected: ( between ,[0,1] ,"I" )
@@ -110,10 +105,10 @@
snapshot() == ( - , - [] , - "" - ) // Expected: ( between ,[0] , "" ) + + ,[] + ,"" + ) // Expected: ( between ,[0] ,"" )
step("A"){
@@ -122,10 +117,10 @@
snapshot() == ( - , - [] , - "" - ) // Expected: ( preamble ,[1] , "I" ) + + ,[] + ,"" + ) // Expected: ( preamble ,[1] ,"II" )
step("A"){
@@ -134,10 +129,10 @@
snapshot() == ( - , - [] , - "" - ) // Expected: ( preamble ,[1,0] , "I.A" ) + + ,[] + ,"" + ) // Expected: ( preamble ,[1,0] ,"II.A" )
@@ -146,10 +141,10 @@
snapshot() == ( - , - [] , - "" - ) // Expected: ( between ,[1,0] , "I" ) + + ,[] + ,"" + ) // Expected: ( between ,[1,0] ,"II" )
step("A"){
@@ -158,10 +153,10 @@
snapshot() == ( - , - [] , - "" - ) // Expected: ( preamble ,[1,1] , "I.B" ) + + ,[] + ,"" + ) // Expected: ( preamble ,[1,1] ,"II.B" )
@@ -173,10 +168,10 @@
snapshot() == ( - , - [] , - "" - ) // Expected: ( between ,[1] , "" ) + + ,[] + ,"" + ) // Expected: ( between ,[1] ,"" )
diff --git a/tester/authored/Counter/test_2.html b/tester/authored/Counter/test_2.html index 7b6b3db..1f47d53 100644 --- a/tester/authored/Counter/test_2.html +++ b/tester/authored/Counter/test_2.html @@ -33,9 +33,9 @@
snapshot() -> ( - , - [] , - "" + + ,[] + ,"" )
@@ -45,11 +45,10 @@
snapshot() == ( - , - [] , - "" - ) - // Expected: ( preamble ,[0] , "I" ) + + ,[] + ,"" + ) // Expected: ( preamble ,[0] ,"I" )
step("A"){
@@ -58,11 +57,10 @@
snapshot() == ( - , - [] , - "" - ) - // Expected: ( preamble ,[0,0] , "I.A" ) + + ,[] + ,"" + ) // Expected: ( preamble ,[0,0] ,"I.A" )
@@ -71,11 +69,10 @@
snapshot() == ( - , - [] , - "" - ) - // Expected: ( between ,[0,0] , "I.A" ) + + ,[] + ,"" + ) // Expected: ( between ,[0,0] ,"I.A" )
step("A"){
@@ -84,11 +81,10 @@
snapshot() == ( - , - [] , - "" - ) - // Expected: ( preamble ,[0,1] , "I.B" ) + + ,[] + ,"" + ) // Expected: ( preamble ,[0,1] ,"I.B" )
@@ -97,11 +93,10 @@
snapshot() == ( - , - [] , - "" - ) - // Expected: ( between ,[0,1] , "I.B" ) + + ,[] + ,"" + ) // Expected: ( between ,[0,1] ,"I.B" )
@@ -110,10 +105,10 @@
snapshot() == ( - , - [] , - "" - ) // Expected: ( between ,[0] , "I" ) + + ,[] + ,"" + ) // Expected: ( between ,[0] ,"I" )
step("A"){
@@ -122,10 +117,10 @@
snapshot() == ( - , - [] , - "" - ) // Expected: ( preamble ,[1] , "II" ) + + ,[] + ,"" + ) // Expected: ( preamble ,[1] ,"II" )
step("A"){
@@ -134,10 +129,10 @@
snapshot() == ( - , - [] , - "" - ) // Expected: ( preamble ,[1,0] , "II.A" ) + + ,[] + ,"" + ) // Expected: ( preamble ,[1,0] ,"II.A" )
@@ -146,10 +141,10 @@
snapshot() == ( - , - [] , - "" - ) // Expected: ( between ,[1,0] , "II.A" ) + + ,[] + ,"" + ) // Expected: ( between ,[1,0] ,"II.A" )
step("A"){
@@ -158,10 +153,10 @@
snapshot() == ( - , - [] , - "" - ) // Expected: ( preamble ,[1,1] , "II.B" ) + + ,[] + ,"" + ) // Expected: ( preamble ,[1,1] ,"II.B" )
@@ -173,10 +168,10 @@
snapshot() == ( - , - [] , - "" - ) // Expected: ( between ,[1] , "II" ) + + ,[] + ,"" + ) // Expected: ( between ,[1] ,"II" )
diff --git a/tester/authored/Counter/test_3.html b/tester/authored/Counter/test_3.html index 2090867..e781837 100644 --- a/tester/authored/Counter/test_3.html +++ b/tester/authored/Counter/test_3.html @@ -1,4 +1,4 @@ - @@ -23,28 +23,28 @@ uses manual primitive page breaks and hard coded splits and continuations

Page 1: Initial Scope

The state machine initializes. Scopes 1, 3, and 4 breach the page boundary and are suspended (continued="true").

- + - - -

Node 1 execution: (Expected: I)

+ + +

Node 1 execution: (Expected: I)

- - -

Node 2 execution: (Expected: I.A) - Closes normally

-
+ + +

Node 2 execution: (Expected: I.A) - Closes normally

+
- - -

Node 3 execution: (Expected: I.B)

+ + +

Node 3 execution: (Expected: I.B)

- - -

Node 4 execution: (Expected: I.B.i)

+ + +

Node 4 execution: (Expected: I.B.i)

--- Page Boundary Reached ---

-
-
-
+
+
+
@@ -52,28 +52,28 @@ uses manual primitive page breaks and hard coded splits and continuations

Page 2: First Continuation

The graph is reassembled. Node 4 closes. Node 5 executes. The page boundary is breached again, forcing a second suspension of the outer scopes 1 and 3.

- + - - + + - + - - -

Node 4 continued payload. Current state: (Expected: I.B.i) - Closes normally

-
- - - -

Node 5 execution: (Expected: I.B.ii) - Closes normally

+ + +

Node 4 continued payload. Current state: (Expected: I.B.i) - Closes normally

+
+ + + +

Node 5 execution: (Expected: I.B.ii) - Closes normally

--- Page Boundary Reached ---

-
+
-
-
+
+
@@ -81,26 +81,26 @@ uses manual primitive page breaks and hard coded splits and continuations

Page 3: Second Continuation

The final graph reassembly. Node 3 closes. Node 6 executes. Node 1 closes.

- + - + - - -

Node 3 continued payload. Current state: (Expected: I.B) - Closes normally

-
+ + +

Node 3 continued payload. Current state: (Expected: I.B) - Closes normally

+
- - -

Node 6 execution: (Expected: I.C) - Closes normally

-
+ + +

Node 6 execution: (Expected: I.C) - Closes normally

+
- -

Node 1 continued payload. Current state: (Expected: I) - Closes normally

+ +

Node 1 continued payload. Current state: (Expected: I) - Closes normally

-
+
diff --git a/tester/authored/Counter/test_4.html b/tester/authored/Counter/test_4.html index ec7bb0d..65e75b7 100644 --- a/tester/authored/Counter/test_4.html +++ b/tester/authored/Counter/test_4.html @@ -17,25 +17,25 @@

Page 1: Pre-Split

This counter scope initiates normally and is deliberately severed by an explicit structural split break.

- + - - -

Pre-split evaluation: (Expected: 1)

+ + +

Pre-split evaluation: (Expected: 1)

Page 2: Post-Split Continuation

- -

Post-split evaluation: (Expected: 1)

+ +

Post-split evaluation: (Expected: 1)

The array extent remains static across the boundary because the continuation flag successfully suppressed the step increment.

- - - -

Nested step evaluation: (Expected: 1.A)

-
-
+ + +

Nested step evaluation: (Expected: 1.A)

+
+ +
diff --git a/tester/authored/Counter/test_5.html b/tester/authored/Counter/test_5.html index e8459ca..1aa8ed1 100644 --- a/tester/authored/Counter/test_5.html +++ b/tester/authored/Counter/test_5.html @@ -17,34 +17,34 @@

Page 1: Named Scope Initialization

This counter scope is assigned an internal name during evaluation. It is then severed.

- + - + Introduction to Systems Architecture - - -

Count: (Expected: I)

-

Name: (Expected: Introduction to Systems Architecture)

+ + +

Count: (Expected: I)

+

Name: (Expected: Introduction to Systems Architecture)

--- Issuing Forced Split Break ---

- +

Page 2: Continuation with Names

- +

The state arrays, including the parallel name array, are successfully cloned across the page boundary.

- -

Count: (Expected: I)

-

Name: (Expected: Introduction to Systems Architecture)

- +

Count: (Expected: I)

+

Name: (Expected: Introduction to Systems Architecture)

+ + Theoretical Foundations - - -

Count: (Expected: I.A)

-

Name: (Expected: Theoretical Foundations)

-
+ + +

Count: (Expected: I.A)

+

Name: (Expected: Theoretical Foundations)

+
-
+