Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ TEST_FIX_SUMMARY.md
TEST_SUMMARY.md
IMPROVEMENTS_SUMMARY.md
PRIORITY_ACTION_PLAN.md
release_notes.txt

# User-specific / Local config
.vscode/
Expand Down
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# Changelog

## [1.3.3] - 2026-06-04

### 🚀 Production Readiness
- **Publishing Candidate**: Comprehensive code cleanup, removal of unnecessary TODOs, and linting fixes.
- **Test Coverage Verified**: Passed 973 test cases covering unit, integration, system, performance, stress, and security testing.
- **Dependency Resolution**: Ensured all internal sub-packages (`hyper_render_math`, etc.) are fully resolved and analyzed.

### ✨ New CSS Properties

- **`object-fit`**: `cover`, `contain`, `fill`, `none`, `scale-down` — applies to `<img>` elements. Controls how the image content is resized to fit its layout box. Previously, images incorrectly fell through to the `background-size` mapping; `object-fit` now takes priority as the semantically correct property for replaced elements.

### ✨ New Features

- **`onMemoryPressure` callback**: `HyperViewer` now exposes an optional `VoidCallback? onMemoryPressure` parameter (available on all constructors: default, `.delta`, `.markdown`, `.fromNode`). Invoked after HyperRender clears its internal TextPainter, image, and painting caches in response to `didHaveMemoryPressure`. Enables host apps to release their own resources (video players, download queues, custom caches) in the same memory-pressure cycle.

### 🔧 Improvements

- **Float carryover `imagePixelOffset`**: `FloatCarryover` now carries an `imagePixelOffset` field computed from the originating section's layout. When a tall float image overhangs a virtualized section boundary, the offset records how many pixels of the image were already painted — enabling future visual rendering of the remaining portion in the next section without repeating the top. The `_onFloatCarryover` comparison in `HyperViewer` now includes `imagePixelOffset` to avoid missing updates.

### 📝 Documentation

- **ROADMAP corrected**: `list-style-type` and `list-style-position` were marked as incomplete (`[ ]`) despite being fully shipped in v1.3.1. Now correctly marked as `[x]`. `object-fit` moved from Backlog to Completed.

---

## [1.3.2] - 2026-05-18

### Bug Fixes (Critical)
Expand Down
4 changes: 2 additions & 2 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ HyperViewer(

---

## HyperViewer v1.2.1 stable API
## HyperViewer v1.3.3 stable API

```dart
HyperViewer({
Expand Down Expand Up @@ -267,4 +267,4 @@ HyperViewer.delta(delta: jsonString, ...)

---

*Last updated: March 2026 — HyperRender v1.2.1*
*Last updated: June 2026 — HyperRender v1.3.3*
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

```yaml
dependencies:
hyper_render: ^1.3.2
hyper_render: ^1.3.3
```

```dart
Expand Down Expand Up @@ -414,7 +414,7 @@ These packages bring native dependencies and are **not bundled** by default. Ins

```yaml
dependencies:
hyper_render_clipboard: ^1.3.2
hyper_render_clipboard: ^1.3.3
```

```dart
Expand Down Expand Up @@ -444,7 +444,7 @@ HyperViewer(

```yaml
dependencies:
hyper_render_math: ^1.3.2
hyper_render_math: ^1.3.3
```

```dart
Expand Down
42 changes: 21 additions & 21 deletions doc/COMPARISON_MATRIX.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# HyperRender v1.0 - Detailed Comparison Matrix
# HyperRender v1.3 - Detailed Comparison Matrix

**Feature-by-feature comparison with other libraries**

Last Updated: February 2026
Last Updated: June 2026

---

Expand All @@ -18,7 +18,7 @@ Last Updated: February 2026

## Performance Metrics

| Metric | FWFH | WebView | super_editor | HyperRender v1.0 |
| Metric | FWFH | WebView | super_editor | HyperRender v1.3.3 |
|--------|------|---------|--------------|------------------|
| **Parse Time (10K chars)** | 250ms ⚠️ | 400ms ⚠️ | N/A | **60ms ✅** |
| **Parse Time (25K chars)** | 420ms ❌ | 800ms ❌ | N/A | **95ms ✅** |
Expand All @@ -40,7 +40,7 @@ Last Updated: February 2026

## HTML Support

| Feature | FWFH | WebView | HyperRender v1.0 |
| Feature | FWFH | WebView | HyperRender v1.3.3 |
|---------|------|---------|------------------|
| **Basic Tags** | | | |
| `<p>`, `<div>`, `<span>` | ✅ | ✅ | ✅ |
Expand Down Expand Up @@ -77,7 +77,7 @@ Last Updated: February 2026
| `<ruby>`, `<rt>` | ❌ | ✅ | **✅ Full** |
| Kinsoku shori | ❌ | ✅ | **✅ Full** |
| Vertical text | ❌ | ✅ | 🔜 v1.1 |
| **Interactive (v1.0)** | | | |
| **Interactive (v1.3)** | | | |
| `<details>`, `<summary>` | ❌ | ✅ | **✅ Full** |
| `<button>` | ⚠️ | ✅ | 🔜 v1.2 |
| `<input>` | ⚠️ | ✅ | 🔜 v1.2 |
Expand All @@ -87,7 +87,7 @@ Last Updated: February 2026

## CSS Support

| Property | FWFH | WebView | HyperRender v1.0 |
| Property | FWFH | WebView | HyperRender v1.3.3 |
|----------|------|---------|------------------|
| **Text Properties** | | | |
| `color` | ✅ | ✅ | ✅ |
Expand Down Expand Up @@ -136,13 +136,13 @@ Last Updated: February 2026
**CSS Coverage Summary**:
- FWFH: ~50 properties
- WebView: ~300 properties (full spec)
- HyperRender v1.0: ~40 essential properties
- HyperRender v1.3.3: ~50 essential properties

---

## Accessibility

| Aspect | FWFH | WebView | HyperRender v1.0 |
| Aspect | FWFH | WebView | HyperRender v1.3.3 |
|--------|------|---------|------------------|
| **Screen reader support** | ⚠️ Basic | ✅ Full (browser a11y) | ✅ Semantics tree |
| **Headings (h1–h6)** | ⚠️ | ✅ | ✅ `isHeader` + level hint |
Expand All @@ -161,7 +161,7 @@ does not implement keyboard focus management or ARIA live regions.

## Platform Support

| Platform | FWFH | WebView | super_editor | HyperRender v1.0 |
| Platform | FWFH | WebView | super_editor | HyperRender v1.3.3 |
|----------|------|---------|--------------|------------------|
| **Mobile** | | | | |
| iOS | ✅ | ✅ | ✅ | ✅ |
Expand All @@ -178,7 +178,7 @@ does not implement keyboard focus management or ARIA live regions.

## Developer Experience

| Aspect | FWFH | WebView | super_editor | HyperRender v1.0 |
| Aspect | FWFH | WebView | super_editor | HyperRender v1.3.3 |
|--------|------|---------|--------------|------------------|
| **Ease of Use** | | | | |
| Learning curve | Easy ✅ | Medium ⚠️ | Hard ❌ | Medium ⚠️ |
Expand All @@ -200,7 +200,7 @@ does not implement keyboard focus management or ARIA live regions.

## Use Case Suitability

| Use Case | FWFH | WebView | super_editor | HyperRender v1.0 |
| Use Case | FWFH | WebView | super_editor | HyperRender v1.3.3 |
|----------|------|---------|--------------|------------------|
| **Content Display** | | | | |
| News articles (5K+ chars) | ⚠️ Slow | ✅ | N/A | **✅ Fast** |
Expand Down Expand Up @@ -228,7 +228,7 @@ does not implement keyboard focus management or ARIA live regions.

## Security & Safety

| Aspect | FWFH | WebView | HyperRender v1.0 |
| Aspect | FWFH | WebView | HyperRender v1.3.3 |
|--------|------|---------|------------------|
| **XSS Protection** | ⚠️ Manual | ⚠️ Sandboxed | ✅ Built-in `HtmlSanitizer` |
| **JavaScript Execution** | ❌ None | ✅ Full (risk) | ❌ None (safe) |
Expand All @@ -247,7 +247,7 @@ Enable `sanitize: true` (default in HyperRender) when rendering user-generated c

## Cost Analysis

| Factor | FWFH | WebView | HyperRender v1.0 |
| Factor | FWFH | WebView | HyperRender v1.3.3 |
|--------|------|---------|------------------|
| **License** | MIT (Free) | Apache (Free) | MIT (Free) |
| **Development Time** | Low ✅ | Medium ⚠️ | Medium ⚠️ |
Expand Down Expand Up @@ -289,7 +289,7 @@ Enable `sanitize: true` (default in HyperRender) when rendering user-generated c
- ✅ Need caret, keyboard, selection
- ✅ Rich text composition required

### Choose HyperRender v1.0 if:
### Choose HyperRender v1.3.3 if:
- ✅ **Large documents (5K+ chars)**
- ✅ **Performance critical (60fps required)**
- ✅ **CJK content (Japanese, Korean, Chinese)**
Expand All @@ -301,7 +301,7 @@ Enable `sanitize: true` (default in HyperRender) when rendering user-generated c

## Version Comparison (HyperRender Roadmap)

| Feature | v1.0 (Now) | v1.1 (Q2'26) | v1.2 (Q3'26) | v1.3 (Q4'26) | v2.0 (2027+) |
| Feature | v1.0 | v1.1 | v1.2 | v1.3 (Stable) | v2.0 (Planned) |
|---------|-----------|--------------|--------------|--------------|--------------|
| InlineSpan paradigm | ✅ | ✅ | ✅ | ✅ | ✅ |
| Performance (60fps) | ✅ | ✅ | ✅ | ✅ | ✅ |
Expand All @@ -325,8 +325,8 @@ Devices:
- Pixel 6 (Android 13)
- MacBook Pro M1 (macOS 14)

Flutter Version: 3.19.0
Dart Version: 3.3.0
Flutter Version: 3.22.0+
Dart Version: 3.5.0+

Test Documents:
- Small: 1,000 characters
Expand Down Expand Up @@ -361,7 +361,7 @@ Results available in: `benchmark/RESULTS.md`
| **FWFH** | Short docs, custom widgets | Large docs, performance-critical |
| **WebView** | JS required, 100% CSS | Bundle size, native feel matters |
| **super_editor** | Text editing | Read-only content display |
| **HyperRender v1.0** | **Large docs, CJK, performance** | Need JavaScript, full CSS |
| **HyperRender v1.3.3** | **Large docs, CJK, performance** | Need JavaScript, full CSS |

**Recommendation**:
- **Migrate to HyperRender** if you have performance issues with FWFH or bundle size issues with WebView
Expand All @@ -375,7 +375,7 @@ Results available in: `benchmark/RESULTS.md`
For import into spreadsheet:

```csv
Category,Feature,FWFH,WebView,HyperRender v1.0
Category,Feature,FWFH,WebView,HyperRender v1.3.3
Performance,Parse (10K chars),250ms,400ms,60ms
Performance,Memory (10K),15MB,30MB,5MB
Performance,Scroll FPS,35,55,60
Expand All @@ -394,5 +394,5 @@ Full CSV available at: `COMPARISON_MATRIX.csv` (if needed)

*This comparison matrix is maintained by the HyperRender team and updated with each release.*

*Last Updated: 2026-01-18*
*Next Review: 2026-04-01*
*Last Updated: 2026-06-04*
*Next Review: 2026-09-01*
5 changes: 3 additions & 2 deletions doc/LIMITATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ are silently ignored.
| `background-repeat` | Not parsed | N/A |
| `columns` / `column-count` | Multi-column layout not rendered | Use a CSS Grid layout (supported) |

### Supported in v1.2.0
### Supported in v1.2.0 - v1.3.3

| Property | Status |
|----------|--------|
Expand All @@ -34,6 +34,7 @@ are silently ignored.
| `background-image` | ✅ url() and `linear-gradient()` supported |
| `background-size` | ✅ cover, contain, fill supported |
| `display: grid` | ✅ full auto-placement, fr-units, and gap support |
| `object-fit` | ✅ cover, contain, fill, none, scale-down supported |

### Partial support

Expand Down Expand Up @@ -147,4 +148,4 @@ final registry = HyperPluginRegistry()

---

*Last updated: April 29, 2026 — HyperRender v1.3.0*
*Last updated: June 4, 2026 — HyperRender v1.3.3*
31 changes: 19 additions & 12 deletions doc/MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,29 @@
# Migration Guide

> **Current version: v1.3.2**
> **Current version: v1.3.3**

## Upgrading to 1.3.2
## Upgrading to v1.3.3 / v1.3.2

### ⚠️ Breaking change — clipboard and math are now opt-in
### ⚠️ Breaking change — clipboard and math are now opt-in (since v1.3.2)

`hyper_render_clipboard` and `hyper_render_math` are no longer transitive dependencies of the root `hyper_render` package. If you use either, add them explicitly:

```yaml
dependencies:
hyper_render: ^1.3.2
hyper_render_clipboard: ^1.3.2 # only if you use SuperClipboardHandler
hyper_render_math: ^1.3.2 # only if you use MathNodePlugin / LatexNodePlugin
hyper_render: ^1.3.3
hyper_render_clipboard: ^1.3.3 # only if you use SuperClipboardHandler
hyper_render_math: ^1.3.3 # only if you use MathNodePlugin / LatexNodePlugin
```

If you don't use either feature, **no changes are needed** — just bump the version and your Android build will no longer require a `compileSdk = 35` workaround.

### New in v1.3.3

- `onMemoryPressure` public callback for low-memory resource management
- CSS `object-fit` support for `<img>` elements (`cover`, `contain`, `fill`, `none`, `scale-down`)
- Performance: replaced CPU-side `Path.combine` with fast GPU-deferred `addRRect` calls in `_paintSelection`
- Version bumped across all sub-packages

### New in 1.3.2

- `list-style-type`, `list-style-position`, `list-style` shorthand CSS support
Expand All @@ -26,16 +33,16 @@ If you don't use either feature, **no changes are needed** — just bump the ver

---

## Starting fresh with 1.3.2
## Starting fresh with 1.3.3

**No migration needed!** If you're starting fresh:

```yaml
dependencies:
hyper_render: ^1.3.2
hyper_render: ^1.3.3
# opt-in extras:
hyper_render_clipboard: ^1.3.2 # image copy/save/share
hyper_render_math: ^1.3.2 # LaTeX/MathML
hyper_render_clipboard: ^1.3.3 # image copy/save/share
hyper_render_math: ^1.3.3 # LaTeX/MathML
```

```dart
Expand Down Expand Up @@ -180,12 +187,12 @@ These APIs are stable and will remain backward-compatible in v2.0:

## Getting Help

For the current v1.3.2 release:
For the current v1.3.3 release:
- See [README](../README.md) for usage
- Check [CHANGELOG](../CHANGELOG.md) for version history
- Review [Plugin Development Guide](PLUGIN_DEVELOPMENT.md) for extending
- File issues at [GitHub Issues](https://github.com/brewkits/hyper_render/issues)

---

*Last Updated: May 14, 2026 for v1.3.2*
*Last Updated: June 4, 2026 for v1.3.3*
4 changes: 2 additions & 2 deletions doc/PERFORMANCE_TUNING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Performance Tuning Guide

Last Updated: February 2026
Version: 1.0.0
Last Updated: June 2026
Version: 1.3.3

This guide helps you optimize HyperRender performance for different use cases.

Expand Down
4 changes: 2 additions & 2 deletions doc/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# HyperRender Documentation

Welcome to the documentation for **HyperRender v1.1.4** — the high-performance HTML/Markdown renderer for Flutter.
Welcome to the documentation for **HyperRender v1.3.3** — the high-performance HTML/Markdown renderer for Flutter.

## Documentation Index

Expand Down Expand Up @@ -77,4 +77,4 @@ Design decisions that shaped the engine, useful for contributors:

---

*Current stable: v1.1.4 — Last updated: March 2026*
*Current stable: v1.3.3 — Last updated: June 2026*
10 changes: 5 additions & 5 deletions doc/ROADMAP.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# HyperRender — Product Roadmap

**Last Updated**: 2026-05-19
**Current Stable**: v1.3.2
**Last Updated**: 2026-06-04
**Current Stable**: v1.3.3
**Repository**: [github.com/brewkits/hyper_render](https://github.com/brewkits/hyper_render)

This document tracks the long-term direction of the HyperRender ecosystem.
Expand Down Expand Up @@ -100,7 +100,7 @@ Scope:

Scope:
- [x] Implement `WidgetsBindingObserver` in `HyperViewer` — `didHaveMemoryPressure` clears TextPainter cache, `LazyImageQueue.clearPending()`, and `PaintingBinding.imageCache.clear()`
- [ ] Expose `onMemoryPressure` callback for host-app customization
- [x] Expose `onMemoryPressure` callback for host-app customization (v1.3.3)
- [ ] Debug-mode metrics: eviction count, bytes freed
- [ ] Smoke test on a 2 GB RAM device

Expand All @@ -112,7 +112,7 @@ Properties deferred from Phase 3 in [`internal/CSS_SUPPORT_ROADMAP.md`](internal
- [x] `text-overflow: ellipsis` — parsed + executed in `render_hyper_box_fragments.dart`
- [x] `box-shadow` — parsed + applied in `render_hyper_box_paint.dart`
- [x] `word-break`, `overflow-wrap` — parsed + executed in `render_hyper_box_layout.dart` (L1339–1375)
- [ ] `list-style-type`, `list-style-position` — not yet in resolver or painter
- [x] `list-style-type`, `list-style-position` — fully parsed, resolved, and painted (v1.3.1)
- [x] `background-repeat` — parsed + mapped to `ImageRepeat` in `paintImage()`
- [x] `background-position` — parsed + mapped to `Alignment` in `paintImage()` (keyword values: top/center/bottom/left/right and combinations)
- [x] `background-size` — parsed and applied
Expand Down Expand Up @@ -223,7 +223,7 @@ Items under consideration, not yet scheduled:
|------|-------|
| `position: absolute / fixed / sticky` | Complex with single-RenderObject model |
| `clip-path`, `filter` | Advanced visual effects |
| `object-fit` for `<img>` | Requires changes to image layout pass |
| ~~`object-fit` for `<img>`~~ | ✅ Completed in v1.3.3 |
| `aspect-ratio` | Responsive media sizing |
| Server-side UDT snapshot | Pre-render on server, hydrate on client |

Expand Down
Loading
Loading