Commits
Ports the spirit of the raylib-transitions demo to clayterm: a 4×4 grid
of colored boxes that animate position, size, and bg color. Shuffle (s)
animates positions via Clay's transition system; recolor (c) toggles
between two palettes with animated bg interpolation; hover tints each
box by blending its bg toward white (overlay-color field is not yet in
the v1 command buffer, so lighten-on-hover substitutes). Full mouse
tracking is wired via mouseTracking() + pointer state from input events.
Scope v1 to what Clay currently supports without userData on transition
callbacks: one duration and one easing per element, applied to all listed
properties. Drop per-property longhand, enter/exit deltas, cubicBezier,
and corner radius — each with an explicit "Deferred Until Upstream Clay"
entry in §13 referencing nicbarker/clay#603 and the forthcoming exit-flag
work. Easings are plain string literals ("linear" | "easeIn" | "easeOut"
| "easeInOut") since v1 has no parametric easings.
Design spec for clayterm transitions: frame-snapshot-compatible interpolation
of element position, size, and color properties. Defines the deltaTime
convention, the animating signal on RenderResult, declarative enter/exit
semantics that replace Clay's function-pointer callbacks, and cancellation
as a structural consequence of re-describing state. Implementation is
gated on bumping the Clay submodule past the upstream transition commit.
Introduces specs/scroll-spec.md (v0.2) with caller-owned scroll model.
Clip API changes from { horizontal, vertical } to { x?, y? } with
numeric offsets. Adds scrollDelta on ElementInfo for wheel delta
reporting. Adds RenderOptions.event for input event integration.
Includes scroll demo with ~10k lines of lorem markdown.
📄 Add MIT license
Surface Clay layout errors on RenderResult
Clay reports errors (duplicate IDs, capacity exceeded, etc.) via a
callback during layout. These were previously silently discarded.
Collect them per-render on the Clayterm struct and expose them as
`errors: ClayError[]` on RenderResult.
Add RenderInfo with lazy element bounds lookup
Adds an `info: RenderInfo` field to RenderResult that provides
on-demand access to element bounding boxes after layout. Callers
query by element id via `info.get(id)`, which calls into WASM to
hash the id and look up the computed bounds via Clay_GetElementData().
A single WASM export handles the lookup — no tables or globals.
Uses the typedef struct infrastructure for BoundingBox field offsets.
Rename Op discriminant to directive, open() name to id
Restructures the Op type so the discriminant field is `directive`
instead of `id`, freeing `id` for the element identity string. The
`name` parameter on `open()` and `OpenElement` becomes `id`, aligning
with Clay's terminology.
Drops the `idx++` seed from Clay_HashString — element IDs are now
hashed with seed 0 and uniqueness is the caller's responsibility.
Duplicate IDs within a frame are undefined behavior.
Removes INV-7 (element identity disambiguation) from the spec and
updates Sections 8.3.1, 9.3, and 10.3 accordingly.
Closes #16
Add Clayterm current-state specification
Separate the combined spec into two documents aligned with INV-8
(architectural independence of rendering and input parsing):
- renderer-spec.md: rendering contract, directive model, rendering
modes (cursor update + line mode), pointer hit-testing
- input-spec.md: input parser API, scan model, InputEvent types
Also adds normative specification of cursor update mode (default)
and line mode with row offset to the renderer spec.
- Replace "descriptor" terminology with "directive" throughout
- Rename open() `name` parameter to `id` in spec
- Fix buffer diffing description: cells are copied, not swapped
- Add note that pointer hit detection requires render loop participation
- Reframe border-layout interaction as Clay's intended behavior
- Update WASM loading to reflect inlined base64 binary
- Move output buffer lifetime guarantee to normative section
- Clarify pack() is internal, validate() is public API
Decouple alternate buffer switching from clearing
Add `{ clear?: boolean }` option to `ALTSCREEN()` and
`alternateBuffer()`. When `clear` is false, uses xterm private mode 47
to switch without clearing the alternate buffer contents.
Closes #13
Adds the v0.1 draft specification covering the architectural model,
core invariants, public rendering API, descriptor model, and boundary
responsibilities. Non-normative sections document settling surfaces
(transfer encoding, input parsing, pointer events) separately from
the stable rendering core.
Ports the spirit of the raylib-transitions demo to clayterm: a 4×4 grid
of colored boxes that animate position, size, and bg color. Shuffle (s)
animates positions via Clay's transition system; recolor (c) toggles
between two palettes with animated bg interpolation; hover tints each
box by blending its bg toward white (overlay-color field is not yet in
the v1 command buffer, so lighten-on-hover substitutes). Full mouse
tracking is wired via mouseTracking() + pointer state from input events.
Scope v1 to what Clay currently supports without userData on transition
callbacks: one duration and one easing per element, applied to all listed
properties. Drop per-property longhand, enter/exit deltas, cubicBezier,
and corner radius — each with an explicit "Deferred Until Upstream Clay"
entry in §13 referencing nicbarker/clay#603 and the forthcoming exit-flag
work. Easings are plain string literals ("linear" | "easeIn" | "easeOut"
| "easeInOut") since v1 has no parametric easings.
Design spec for clayterm transitions: frame-snapshot-compatible interpolation
of element position, size, and color properties. Defines the deltaTime
convention, the animating signal on RenderResult, declarative enter/exit
semantics that replace Clay's function-pointer callbacks, and cancellation
as a structural consequence of re-describing state. Implementation is
gated on bumping the Clay submodule past the upstream transition commit.
Introduces specs/scroll-spec.md (v0.2) with caller-owned scroll model.
Clip API changes from { horizontal, vertical } to { x?, y? } with
numeric offsets. Adds scrollDelta on ElementInfo for wheel delta
reporting. Adds RenderOptions.event for input event integration.
Includes scroll demo with ~10k lines of lorem markdown.
Adds an `info: RenderInfo` field to RenderResult that provides
on-demand access to element bounding boxes after layout. Callers
query by element id via `info.get(id)`, which calls into WASM to
hash the id and look up the computed bounds via Clay_GetElementData().
A single WASM export handles the lookup — no tables or globals.
Uses the typedef struct infrastructure for BoundingBox field offsets.
Restructures the Op type so the discriminant field is `directive`
instead of `id`, freeing `id` for the element identity string. The
`name` parameter on `open()` and `OpenElement` becomes `id`, aligning
with Clay's terminology.
Drops the `idx++` seed from Clay_HashString — element IDs are now
hashed with seed 0 and uniqueness is the caller's responsibility.
Duplicate IDs within a frame are undefined behavior.
Removes INV-7 (element identity disambiguation) from the spec and
updates Sections 8.3.1, 9.3, and 10.3 accordingly.
Closes #16
Separate the combined spec into two documents aligned with INV-8
(architectural independence of rendering and input parsing):
- renderer-spec.md: rendering contract, directive model, rendering
modes (cursor update + line mode), pointer hit-testing
- input-spec.md: input parser API, scan model, InputEvent types
Also adds normative specification of cursor update mode (default)
and line mode with row offset to the renderer spec.
- Replace "descriptor" terminology with "directive" throughout
- Rename open() `name` parameter to `id` in spec
- Fix buffer diffing description: cells are copied, not swapped
- Add note that pointer hit detection requires render loop participation
- Reframe border-layout interaction as Clay's intended behavior
- Update WASM loading to reflect inlined base64 binary
- Move output buffer lifetime guarantee to normative section
- Clarify pack() is internal, validate() is public API
Add `{ clear?: boolean }` option to `ALTSCREEN()` and
`alternateBuffer()`. When `clear` is false, uses xterm private mode 47
to switch without clearing the alternate buffer contents.
Closes #13