From f04945dfadc5b239eb239a843946da1e62bd96cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguye=CC=82=CC=83n=20Tua=CC=82=CC=81n=20Vie=CC=A3=CC=82t?= Date: Thu, 8 Oct 2026 13:33:03 +0700 Subject: [PATCH 01/14] release: 1.13.0 (core 1.13.0, root 1.13.0) Character-range highlight geometry from #26 (by @DrkXo): RenderHyperBox.getBoxesForCharRange and debugLineFragments, plus the ellipsisVisibleLength fix on truncated line fragments. hyper_render requires hyper_render_core ^1.13.0. The other packages are unchanged and need no release. CHANGELOG headings, README, MIGRATION_GUIDE, CSS matrix and roadmaps updated. --- CHANGELOG.md | 6 ++++++ README.md | 4 ++-- ROADMAP.md | 1 + doc/CSS_PROPERTIES_MATRIX.md | 4 ++-- doc/MIGRATION_GUIDE.md | 14 +++++++++++++- doc/ROADMAP.md | 5 +++-- packages/hyper_render_core/CHANGELOG.md | 7 +++++++ packages/hyper_render_core/README.md | 2 +- packages/hyper_render_core/pubspec.yaml | 2 +- pubspec.yaml | 4 ++-- 10 files changed, 38 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ad60eb..0759d37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 1.13.0 + +- **Character-range highlight boxes:** `RenderHyperBox.getBoxesForCharRange(charStart, charEnd)` returns the rects of a character range, for drawing your own highlights (search hits, annotations, read-aloud). Offsets are local to each `RenderHyperBox`, so in virtualized / `auto` mode (>10k chars) they restart at 0 per chunk. Also new: `RenderHyperBox.debugLineFragments()` for the laid-out fragment geometry. By [@DrkXo](https://github.com/DrkXo) ([#26](https://github.com/brewkits/hyper_render/pull/26)). +- **`text-overflow: ellipsis` fixes** (in `hyper_render_core`): the `…` glyph is no longer counted as a hidden source character, a selection highlight no longer covers it, and an empty line where nothing fits before the ellipsis now shows `…`. +- **Requires `hyper_render_core` `^1.13.0`.** + ## 1.12.0 - **Dark surfaces: links, `
`, `` / `
` and `` now use dark-surface colors** ([#23](https://github.com/brewkits/hyper_render/issues/23)). In 1.11.0 only the default text color followed a dark theme; these built-in colors were still tuned for light surfaces and measured 4.1:1 (links), 3.9:1 (`
`) and **2.5:1** (`
`) on `#121212`. They now keep at least 4.5:1, and the inline `` / `` chips become dark chips instead of bright blocks. The palette is chosen from the *effective text color*: light text means a dark surface, so a dark `Theme` with `textColor: Colors.black87` (a white pane) keeps the light-surface palette, and a light `Theme` with a light `textColor` gets the dark one. Light-surface output is unchanged. Author CSS and inline styles still win. `
`, `` and table headers keep their light backgrounds (their text is kept readable by the 1.11.0 contrast guard). **Requires `hyper_render_core` `^1.12.0`** (`StyleResolver.darkSurface`). `hyper_render_epub` 0.1.3 needs no update: it goes through `HyperViewer`, so it picks this up automatically. diff --git a/README.md b/README.md index 8cb42d3..b040a5f 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ Already using `flutter_html`? You don't need to rewrite your widget tree or lear ```dart // 1. In your pubspec.yaml: // dependencies: -// hyper_render: ^1.12.0 +// hyper_render: ^1.13.0 // 2. In your Dart file — replace this single line: // ❌ import 'package:flutter_html/flutter_html.dart'; @@ -68,7 +68,7 @@ Html( ```yaml dependencies: - hyper_render: ^1.12.0 + hyper_render: ^1.13.0 ``` ```dart diff --git a/ROADMAP.md b/ROADMAP.md index 11c1458..03e78e7 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -14,6 +14,7 @@ This document outlines the architectural roadmap for **HyperRender** to become t | **v1.10.0** | Shipped 2026-10-02 | **DevTools v2 & Stylesheet CSS Correctness** | Timeline / Selection / live CSS-variable / snapshot DevTools tabs; stylesheet `var()`, `url()`, `calc()` and `:root` fixed. | | **v1.11.0** | Shipped 2026-10-04 | **Dark Mode & Root Colors** | Dark-`Theme` text default, `HyperViewer(textColor:)` / `EpubReader(textColor:)`, `body`/`html` `color`, `:root` fix, contrast guard (#20). | | **v1.12.0** | Shipped 2026-10-04 | **Dark-Surface Element Colors** | Links, `
`, `` / `
`, `` keep >= 4.5:1 on dark surfaces (#23). |
+| **v1.13.0** | Shipped 2026-10-08 | **Character-Range Highlight Geometry** | `getBoxesForCharRange` / `debugLineFragments` for app-drawn highlights; ellipsis character-count fix (#26). |
 | **Next** | Unscheduled | **Native Vector Diagramming & Headless Export** | Pure Canvas/Vector Mermaid.js & GraphViz (Zero-WebView), Headless Image & PDF byte stream generator. |
 | **v2.0.0** | Q1 2027 | **Interactive Editorial & Magazine Typography** | Medium-style Text Annotation/Highlighting layer, Multi-column layout (`column-count`), Z-Index Stacking Context, Vertical Text (`writing-mode: vertical-rl`). |
 
diff --git a/doc/CSS_PROPERTIES_MATRIX.md b/doc/CSS_PROPERTIES_MATRIX.md
index 0a65ac3..a82d480 100644
--- a/doc/CSS_PROPERTIES_MATRIX.md
+++ b/doc/CSS_PROPERTIES_MATRIX.md
@@ -1,7 +1,7 @@
 # CSS Properties Support Matrix
 
-Last Updated: October 4, 2026
-Version: 1.12.0
+Last Updated: October 8, 2026
+Version: 1.13.0
 
 This document lists CSS property support in HyperRender.
 
diff --git a/doc/MIGRATION_GUIDE.md b/doc/MIGRATION_GUIDE.md
index 2d8f97a..70466ad 100644
--- a/doc/MIGRATION_GUIDE.md
+++ b/doc/MIGRATION_GUIDE.md
@@ -1,6 +1,15 @@
 # Migration Guide
 
-> **Current version: v1.12.0**
+> **Current version: v1.13.0**
+
+## Upgrading to v1.13.0
+
+No breaking changes. New: `RenderHyperBox.getBoxesForCharRange` and `debugLineFragments` ([#26](https://github.com/brewkits/hyper_render/pull/26)). Two small `text-overflow: ellipsis` changes: selecting truncated text no longer highlights the `…` glyph, and a line where not even one character fits before the ellipsis now shows `…` instead of staying empty.
+
+```yaml
+dependencies:
+  hyper_render: ^1.13.0
+```
 
 ## Upgrading to v1.12.0
 
@@ -216,6 +225,9 @@ These APIs are stable and will remain backward-compatible in v2.0:
 
 ## Version History
 
+### v1.13.0 (October 2026)
+- `RenderHyperBox.getBoxesForCharRange` / `debugLineFragments`, ellipsis character-count fix ([#26](https://github.com/brewkits/hyper_render/pull/26))
+
 ### v1.12.0 (October 2026)
 - Dark-surface colors for links, `
`, `` / `
` and `` ([#23](https://github.com/brewkits/hyper_render/issues/23))
 
diff --git a/doc/ROADMAP.md b/doc/ROADMAP.md
index a03ac6e..54db51c 100644
--- a/doc/ROADMAP.md
+++ b/doc/ROADMAP.md
@@ -1,7 +1,7 @@
 # HyperRender — Product Roadmap
 
-**Last Updated**: 2026-10-03
-**Current Stable**: v1.12.0
+**Last Updated**: 2026-10-08
+**Current Stable**: v1.13.0
 **Repository**: [github.com/brewkits/hyper_render](https://github.com/brewkits/hyper_render)
 
 This document tracks the long-term direction of the HyperRender ecosystem.
@@ -33,6 +33,7 @@ For detailed CSS property tracking, see [`CSS_PROPERTIES_MATRIX.md`](CSS_PROPERT
   `hyper_render_markdown`, `hyper_render_highlight`, `hyper_render_clipboard`
 - **`hyper_render_devtools` v1.0.0** — UDT Tree inspector, Computed Style panel, Layout fragment/line data, demo mode (no live app required); published to pub.dev
 - **`hyper_render_devtools` v1.8.0** (2026-10-02) — the panel actually connects now (#17), plus Timeline, Selection debugger, live CSS-variable editing and JSON snapshot export. Requires `hyper_render_core` 1.10.0.
+- **Character-range highlight geometry** (1.13.0) — `RenderHyperBox.getBoxesForCharRange` returns line-aligned rects for any character range (search hits, annotations), and `debugLineFragments()` exposes laid-out fragment geometry; `text-overflow: ellipsis` no longer counts the `…` glyph as a source character (#26, by @DrkXo).
 - **Dark-surface element colors** (1.12.0) — links, `
`, `` / `
` and `` switch to dark-surface variants (>= 4.5:1) when the effective text color is light (#23).
 - **Dark mode & root colors** (1.11.0) — unstyled text follows a dark `Theme`, `HyperViewer(textColor:)` / `EpubReader(textColor:)`, `body`/`html` `color` honoured, `:root` matches only the document root, readable text on light UA surfaces (#20). Block plugins on custom tags (``) now render (#22).
 - **Stylesheet CSS correctness** (core 1.10.0) — `var()`, `url()`, `calc()` in `