Ekhorn / spaced

Make space for your thoughts :)
MIT License
0 stars 0 forks source link

Interactive Rendering Engine #50

Open Ekhorn opened 1 week ago

Ekhorn commented 1 week ago

Description

The interactive rendering engine would be designed to be as close to HTML elements as possible and their properties. The item schema will contain the component, and it's attributes. All components can have custom styles, but inherit the default configured styles from the users' settings.

The engine should allow dragging and dropping components based on a grid, and resizing them relative to the columns and rows present. To add a component a grid cell can be clicked.

All components have a read-only variant. Most components have a write variant as well which can be hooked up to any exposed internal operation or (reactive) state.

Some components could have additional decorators, like inputs to place an icon at the start or end inside the input box. This may change to something flexible later on, however it does bring forward that custom SVGs should also be configurable.

Any component can be composed together with others to create a template, these templates should be reusable.

Additionally some very custom components may be implemented through some form of plugin system if none of HTML elements individually or combined, can solve the needed use case.

The engine can be very useful as standalone HTML generator. Creating a library out of it, and being able to integrate either it as runtime or generate static HTML would be ideal (maybe even a hybrid).

Components

Component Description Variants Allowed descendants
div Renders text, the component records which characters are per each of the following options: italic, bold, strikeout, heading, sub, sup, font, marking. The text may wrap around nested elements. Markdown Any* (Markdown uses it's own style)
input The input can have decorators depending on the type to e.g. make a password field, to add icons or a label single-line, multi-line, time, date-time, date, radio, check, number, file, color Decorators
select Decorators
button Decorators
link Decorators
aside Any
audio Decorators
break None
separator None
figure Displays anything a <canvas> or <img> tag can do.
code
details Can hide content, supports a summary Any
dialog Any
list
embed None
progress Decorators
table Dedicated component to render borders for each cell in any style imaginable. The component should allow for sorting. Any
video
```