hyper_render 1.1.2
hyper_render: ^1.1.2 copied to clipboard
Render HTML/Markdown/Delta at 60 FPS. The only Flutter renderer with CSS float layout, crash-free text selection, and CJK Ruby typography. Drop-in flutter_html alternative.
Changelog #
All notable changes to HyperRender will be documented in this file.
The format is based on Keep a Changelog,
1.1.2 - 2026-03-25 #
✨ New Features #
- CSS @keyframes (
DefaultCssParser.parseKeyframes):@keyframesblocks are now parsed from<style>tags automatically.HyperViewerextracts keyframes on each_parseContent()call and wires them toHyperAnimatedWidgetviakeyframesLookup— no Dart code needed to animate HTML content.- Supports
opacity,translateX/Y,translate,scale,rotatetransform functions - Supports
from/toand percentage selectors (0%,50%,100%) - Supports comma-separated selectors (
75%, 100% { … }) - Supports vendor prefixes:
@-webkit-keyframes,@-moz-keyframes,@-ms-keyframes HyperAnimatedWidgetgainskeyframesLookupparam (custom registry checked before built-in presets)HyperAnimations.allstatic getter exposes all 12 built-in presets as a map
- Supports
🐛 Bug Fixes #
- Ruby/furigana selection — 5 bugs fixed:
FragmentType.rubywas silently skipped in every selection pipeline step, causing character offset desynchronisation for all content after a ruby fragment._buildCharacterMapping(): ruby fragments now counted in_totalCharacterCount_paintSelection(): selection highlight drawn over ruby; offset correctly advancedgetSelectedText(): ruby base text now included in clipboard copygetSelectionRects(): ruby rects returned for correct handle positioning_getCharacterPositionAtOffset(): ruby chars counted when skipping past earlier lines
LineInfo.characterCount: now counts ruby base-text characters
🏗️ Code Quality #
- Removed all internal
/// Reference: doc[0-9]comments (referencing private design docs) from public source files - Removed Vietnamese-language text from dartdoc comments across
lib/src/model/,lib/src/core/,lib/src/style/ - Fixed stale dartdoc:
DisplayType.gridandInputType.markdownno longer marked as "future" - Removed lone
TODOintest/integration_test.dart
🔬 Tests #
- +17 tests —
packages/hyper_render_core/test/ruby_layout_test.dart:LineInfo.characterCountwith ruby, selection offset accumulation, character position mapping - +9 widget tests —
test/ruby_selection_test.dart: integration coverage for ruby selection (no exceptions, mixed content, multi-line, staggered ruby)
1.1.1 - 2026-03-23 #
🐛 Bug Fixes #
- Static analysis: Fixed all
dart analyzewarnings inlib/— 0 issues- Wrapped
<details>/<summary>angle brackets in backticks in doc comments - Fixed invalid regexp syntax and unnecessary escapes in
resolver.dart - Added curly braces to single-statement
ifbranches (curly_braces_in_flow_control_structures) - Replaced trivial
onLinkTapgetter/setter with a direct public field (unnecessary_getters_setters)
- Wrapped
- Layout: Removed stale
docs/directory (plural) — pub.dev convention requiresdoc/(singular)
and this project adheres to Semantic Versioning.
1.1.0 - 2026-03-20 #
🏗️ Architecture #
- Code consolidation: Eliminated 26 duplicate source files between
lib/src/andpackages/hyper_render_core/lib/src/.hyper_renderis now a true thin wrapper — core engine lives exclusively inhyper_render_core. - Single source of truth: All fixes and features now only need to be applied in one place.
✨ New Features #
- CSS Box Shadow: Full support for box-shadow with multiple shadows, blur, and spread.
- CSS Gradients:
linear-gradientinbackgroundandbackground-image. - Typography: Font features (ligatures, proportional figures) enabled by default.
- Consistent Text Rendering:
TextHeightBehaviorfor predictable vertical rhythm across platforms. - Retina-Ready Images:
FilterQuality.mediumfor all images — crisp on high-DPI displays. - Anti-Aliasing: Anti-aliasing explicitly enabled on all paint operations.
- Crisp Borders:
StrokeCap.squarefor professional-looking corners. - Adaptive Selection: Text selection colors adapt to platform (iOS Blue vs Material Blue).
- Theme-Aware Selection: Added
selectionColorproperty toHyperViewerandHyperRenderWidget.
🐛 Bug Fixes #
- Copy/paste newlines: Text selection spanning block elements (
<li>,<h3>,<p>) now correctly inserts\nbetween blocks when copied to clipboard. - Stability: Comprehensive error boundaries in layout and paint cycles prevent crashes from malformed content.
- Security: Reinforced JSON parsing error handling in Delta adapters.
- Layout — characterOffset: Second fragment after forced split no longer adds trimmed leading spaces to
characterOffset— selection mapping is now accurate. - Layout — link boundary:
_sameLinkContext()guard prevents merging text nodes from different<a>ancestors — fixes incorrect link tap targets. - Layout — float crash: Early-return guard in
_layoutFloat()for unconstrained (Infinite) parent width. - Layout — float double-layout: Float intrinsic size uses
getMaxIntrinsicWidth/Heightinstead ofchild.layout(). - Layout — null fragment text:
_measureFragmentsguards against nulltexton atomic/ruby fragments. - Memory — recognizer leak:
_disposeLinkRecognizers()called whendocumentis replaced — preventsTapGestureRecognizerleak. - Performance —
enableComplexFilters: New flag onHyperViewer/HyperRenderWidgetgates allcanvas.saveLayercalls forbackdrop-filter/filtereffects — eliminates unnecessary GPU compositing layers when effects are unused. - Performance — O(1) child lookup:
_fragmentChildMapreplaces O(N) linear scan in paint cycle. - Performance — O(1) accessibility:
_nodeRectCachebuilt during layout (Step 8) replaces O(N²) VoiceOver/TalkBack rect computation. - Nested Decorations:
nodeToDecoratedchanged toMap<UDTNode, List<UDTNode>>— inner spans no longer overwrite outer spans in text decoration maps.
🔬 Tests (hyper_render_core) #
- +238 new tests across 6 new test files covering previously-untested areas:
ruby_layout_test.dart— RubyNode model + Fragment.ruby lifecycle (27 tests)float_layout_test.dart— HyperFloat/HyperClear enums, LineInfo insets (30 tests)text_breaking_test.dart— canBreak, isWhitespace, Kinsoku CJK (44 tests)layout_algorithm_test.dart— Bug 1–4 regression tests, link context, rect cache (52 tests)details_element_test.dart—<details>/<summary>model + widget (32 tests)rtl_bidi_test.dart— HyperTextDirection, Arabic/Hebrew, RTL widget integration (53 tests)
1.0.3 - 2026-03-10 #
- Fix root .pubignore — remove packages/ blanket exclusion that breaks sub-package publishing.
- Restore hyper_render_clipboard path dep post-publish.
1.0.2 - 2026-03-08 #
- Fix .pubignore to exclude packages/, test/, IDE files — reduces upload size.
- Bump hyper_render_clipboard to ^1.0.2 (share_plus 12.x + super_clipboard 0.9.x support).
1.0.1 - 2026-03-08 #
- Add example/example.dart for pub.dev example scoring.
- Fix .pubignore to correctly exclude build artifacts while keeping example.
1.0.0 - 2026-03-01 #
First stable release. Core features, plugin architecture, and cross-platform support are production-ready.