Packages

A pure Elixir library for structured document representation with rich text support

Current section

Files

Jump to
quillon CHANGELOG.md
Raw

CHANGELOG.md

# Changelog
## v0.2.2
### Bug Fixes
- **Fix `to_json` crash on non-mark list attrs**`encode_value/1` treated all list attrs as mark lists, crashing with `FunctionClauseError` on string lists, map lists, or nested maps. Now only the `:marks` key gets mark-specific encoding; all other values use generic recursive encoding that correctly handles lists, maps, booleans, nil, and atoms.
## v0.2.1
### New Features
- **Extensible JSON decoding** - `from_json/2` and `from_json!/2` now accept options to extend valid types:
- `schema:` — validate types against a custom `Quillon.Schema` (recommended)
- `extra_types:` — list of additional node type atoms to accept
- `extra_marks:` — list of additional mark type atoms to accept
- Default `from_json/1` behavior unchanged — only built-in types accepted
### Why
Consumers extending Quillon with custom node types (e.g., form builders with `:form`, `:text_input`) could not delegate JSON deserialization to Quillon because `from_json/1` hardcoded type validation against `Types.node_types()`. Now they can.
## v0.2.0
### New Features
- **Layout properties** - Optional Tailwind-inspired layout tokens on all block nodes: `align`, `width`, `spacing`, `indent`, `valign`
- **Styling properties** - Optional styling tokens: `font_size`, `font_weight`, `line_height`, `color`, `background`, `border`, `border_color`, `border_style`, `opacity`, `shadow`, `rounded`
- **Row node** - New `:row` flex container node with `justify`, `items`, `wrap`, `gap` attrs
- **Grid node** - New `:grid` container node with `columns`, `gap` attrs
- All properties use constrained value sets (atoms), not arbitrary CSS values
- Full JSON round-trip support for layout/style attrs
- Factory functions accept layout/style options via keyword lists
### Backward Compatibility
- All layout/style properties are optional - existing code is fully compatible
- No breaking changes to existing API
## v0.1.0
- Initial release
- Document AST with tuple-based nodes `{type, attrs, children}`
- Node types: document, paragraph, heading, divider, blockquote, callout, code_block, image, video, bullet_list, ordered_list, table
- Marks system: bold, italic, underline, strike, code, subscript, superscript, link, highlight, font_color, mention
- Formatting commands with character-range operations
- Path-based tree traversal and manipulation
- Schema validation with content expressions
- JSON serialization/deserialization