The current src/code/renderer/ hierarchy is an abstraction that doesn't fit the actual usage patterns. The Base renderer logic is entirely specific to Markdown component management, while the Neo renderer is a simple code executor.
This ticket aims to simplify the architecture by:
- Merging
src/code/renderer/Markdown.mjs into src/component/Markdown.mjs: The component should own the rendering logic directly.
- Deleting
src/code/renderer/Markdown.mjs: It will be obsolete.
- Deleting
src/code/renderer/Base.mjs: Its purpose vanishes with the removal of the Markdown renderer.
- Refactoring
src/code/LivePreview.mjs:
- Remove the "renderer" abstraction/loading logic.
- Directly use
Neo.component.Markdown for markdown content.
- Update how
NeoRenderer (or its successor) is used for Neo code execution.
- Renaming/Refactoring
src/code/renderer/Neo.mjs: It should likely become a standalone helper (e.g., src/util/NeoCodeExecutor.mjs or similar) since it no longer needs to be part of a "renderer" class hierarchy.
Goal: Remove the leaky "renderer" abstraction, simplify LivePreview, and fully encapsulate markdown logic within its component.
The current
src/code/renderer/hierarchy is an abstraction that doesn't fit the actual usage patterns. TheBaserenderer logic is entirely specific to Markdown component management, while theNeorenderer is a simple code executor.This ticket aims to simplify the architecture by:
src/code/renderer/Markdown.mjsintosrc/component/Markdown.mjs: The component should own the rendering logic directly.src/code/renderer/Markdown.mjs: It will be obsolete.src/code/renderer/Base.mjs: Its purpose vanishes with the removal of the Markdown renderer.src/code/LivePreview.mjs:Neo.component.Markdownfor markdown content.NeoRenderer(or its successor) is used for Neo code execution.src/code/renderer/Neo.mjs: It should likely become a standalone helper (e.g.,src/util/NeoCodeExecutor.mjsor similar) since it no longer needs to be part of a "renderer" class hierarchy.Goal: Remove the leaky "renderer" abstraction, simplify
LivePreview, and fully encapsulate markdown logic within its component.