Skip to main content

Module loader

Module loader 

Source

Functions§

html_to_scenario_json
Transpile an HTML-dialect string into the scenario JSON value, for callers that need the raw value (e.g. the validation pipeline reads it by pointer).
is_html_path
True if the path uses the HTML dialect (.html/.htm).
load_html_annotations_sidecar
Read the annotations sidecar next to an HTML-dialect source: for foo.html, foo.annotations.json holding {"annotations": [...]} (same annotation object format as JSON scenarios’ annotations field; the studio writes it because HTML sources can’t carry the array inline). A missing sidecar is fine (empty); a present-but-invalid one is an error — never silently ignored.
load_input
Dispatch by file extension: .html/.htm use the HTML transpiler, everything else uses the JSON loader. Single entry point for all CLI commands.
load_input_with_vars
Like load_input but injects runtime variable overrides before substitution.
load_scenario
load_scenario_from_html
Load a scenario authored in the HTML/CSS dialect: transpile to the scenario JSON value, merge the annotations sidecar (if any), deserialize into Scenario, then resolve includes — reusing the exact same pipeline as the JSON loader.
load_scenario_from_html_with_vars
Like load_scenario_from_html but injects runtime variable overrides.
load_scenario_from_source
load_scenario_from_source_with_vars
Like load_scenario_from_source but injects runtime variable overrides.
load_scenario_with_vars
Like load_scenario but injects runtime variable overrides before substitution. Delegates to variables::apply_variables which handles both declared (config-based) and undeclared (HTML/no-config) overrides.
remove_html_inline_style
Remove one inline style declaration on an HTML-dialect element by JSON pointer (studio inspector, emptied style control).
set_html_attribute
Set/replace a plain attribute on an HTML-dialect element by JSON pointer (studio inspector, component root fields). An empty value removes the attribute. Attributes are strings; transpile coercion re-types them.
set_html_inline_style
Apply an inline-style edit to an HTML-dialect source by JSON pointer (used by the studio inspector to persist a property change into the HTML).
set_html_text_content
Replace an element’s text content in an HTML-dialect source by JSON pointer (used by the studio inspector’s content editor).