merman 0.9.2
merman: ^0.9.2 copied to clipboard
Flutter and Dart FFI bindings for merman headless Mermaid rendering.
Changelog #
0.9.2 - 2026-10-22 #
- Host themes keep C4 boundary contents and relationships visible, color Wardley anchors, and apply a coherent ZenUML palette. Diagram-selected Mermaid palettes retain matching text and fills. #235, issue #229, issue #230, issue #231, issue #232
- Custom artifacts with native font support skip symbolic and pictorial fonts during implicit font and missing-glyph fallback; explicitly named fonts remain selectable. #235, issue #228
- Look selectors and Block/Requirement source CSS are validated before SVG emission. SVG CSS cleanup rejects unterminated strings, comments, and URLs while preserving safe neighboring declarations. #227, #235, #237
- Repeated Flowchart
classDefdeclarations retain earlier styles, and unsupported Unicode characters preserve valid error spans and lexer progress. Malformed Pie/Info headers and empty XYChart sources behave consistently across parser and editor entrypoints. #178, #227, #237
The existing Presentation and binding options contracts are unchanged. Review regenerated SVG and exported-image snapshots; see the workspace changelog for the complete maintenance release.
0.9.1 - 2026-10-18 #
- ER diagram SVG emission reuses prepared entity geometry, avoiding false missing-size errors on larger diagrams.
- Diagram lexers now make progress and honor cancellation while skipping malformed or empty input.
- Generated HTML label IDs are scoped to the diagram root so multiple diagrams can share a document.
0.9.0 - 2026-10-12 #
Version 0.9.0 retains native ABI 3 from 0.8.0. Keep the generated wrapper and native artifacts paired.
Added #
- SVG-capable operations add
edge-geometry-jsonfor Flowchart, Swimlane, and Agentflow clipped edge points and painted label centers.layout-jsonkeeps its pre-paint coordinates; inspect the installed operation catalog. PR #174, PR #177 - Flowchart, Swimlane, and State ASCII/Unicode node padding accepts independent X/Y overrides, including zero, separately from graph spacing. PR #188
Upgrade #
- Host text-measurement protocol 1 adds signed raw bounding-box Y-offset operations 19–21. Update exhaustive callback handlers without changing the protocol number. Native CLI font flags do not enable native font discovery in the default package. PR #193
- Review transparent SVG backgrounds and corrected geometry/wrapping snapshots. Set
svg.root_background_colorthrough the binding options when opaque SVG is required; match the installed runtime catalog rather than assuming every optional operation is compiled.
Fixed #
- Corrected Unicode HTML wrapping and resvg-safe hollow Class/ER markers; SVG leaves the canvas unset unless an explicit background is requested. PR #180, PR #182, PR #192
- Deep input cleanup no longer relies on recursive ownership. Block child metadata and repeated composite declarations follow the pinned Mermaid behavior. PR #191
- ASCII/Unicode output preserves loop-back contacts, transition labels, compound frames, Sequence spacing, and diamond shoulders. Resource ceilings retain their existing meanings. PR #179, PR #188
See the package guide and upgrade guide.
0.8.0 - 2026-10-06 #
This is the cumulative migration from the 0.7.0 package to 0.8.0, including changes introduced during the alphas. Version 0.8.0 was published on pub.dev on 2026-10-06; keep the Dart facade and native artifacts together.
Breaking changes #
- Replace the legacy plugin integration with
package_ffiand Native Assets. Requires Dart 3.10 / Flutter 3.38; package platform minima are Android 24, iOS 13, and macOS 11. Remove plugin registrars andopenMermanLibrary(); useMerman.open(). - Replace
MermanReusableEngine, engine-owning facade instances, anddispose()with a directly constructedMermanEngineandclose(). Supply immutable text-measurement/icon services at construction; mutable callback installation is removed. - The native contract is C ABI 3 with Options JSON schema 2, analysis facts schema 2, and ASCII report schema 3. Upgrade custom FFI/JSON decoders as well as the library; an unchanged ABI does not freeze payload schemas. Rename viewport fields to
container_width/container_heightand adopt requested/effective ASCII layout and structured-text fallback metadata.
Added #
- Added operation controls with cooperative cancellation/deadlines, structured diagnostic/resource details, capability catalogs, richer terminal plans, and bounded
autolayout. Same-isolate timers cannot interrupt a synchronous call.
Changed #
- The selected engine advances from Mermaid 11.15.0 in the previous stable line to Mermaid 12.1.0. Review ELK layout defaults, Redux/Neo appearance, SVG IDs, and geometry; request top-level
layout: dagre,theme: default, andlook: classicwhen those presentation choices are required. This does not preserve every old SVG byte. - Default native artifacts include SVG, Cytoscape/ELK, ASCII, analysis, validation, and document analysis. Math, PNG/JPEG/PDF, and native runtime adapters require a matching custom artifact; query the loaded runtime catalog before using optional operations.
Fixed #
- Corrected C4 and ELK relationship routing/layering, Packet/XYChart presentation, partial theme overrides, and diagnostic locations; restored Usecase/ER styles and prevented malformed Unicode colors from panicking.
- Native Assets replaces legacy platform-wrapper loading and Apple relocation/symlink paths; keep the generated package and all bundled slices aligned.
Further reading #
- Follow the stable upgrade guide and root changelog. Published alpha sections below remain historical contracts; native Rust timings do not measure Dart/Flutter transport performance.
0.8.0-alpha.7 - 2026-09-30 #
Added #
- Added Mermaid 12 Agentflow and Usecase parsing and SVG rendering. Agentflow follows upstream beta syntax; neither family supports ASCII output.
Changed #
- Updated the engine from Mermaid 11.17.2 to 12.0.0, including ELK layout defaults and the new theme/look defaults for supported families. Refresh SVG snapshots; use top-level
layout: dagre,theme: default, andlook: classicwhen the previous presentation is needed. The bundled artifact already included ELK and retains its EPL-2.0 notices. - Safe diagram-local theme variables and fonts are admitted from frontmatter and directives while host security policy remains authoritative.
Breaking changes #
- Added opt-in
autoASCII layout for bounded Flowchart and Sequence output, with a Compact retry before overflow handling. ASCII output reports now use schema3; update custom decoders for requested/effective layout and Compact-attempt fields. - Update the Dart facade and bundled Native Assets together. The C ABI remains
3; an unchanged ABI number does not make old payload decoders compatible with the new ASCII schema.
0.8.0-alpha.6 - 2026-09-02 #
This section describes alpha.6, published to pub.dev on 2026-09-04 after the complete Native Assets matrix passed the tag-triggered release workflow.
Added #
- Added
MermanOperationControlfor reusable cooperative deadlines and cancellation, including structuredMermanCancelledExceptiondetails. Controls are isolate-local; same-isolate timers cannot interrupt a synchronous execution call. - Added
MermanExactResourceErrorDetailsso unsigned 64-bit resource counts remain available as canonical decimal strings. The existing signed-intprojection remains available when both counts fit its compatibility range. - Added
MermanDiagnosticErrorDetailsandMermanDiagnosticSpanso parser and ASCII renderer failures preserve native diagnostic codes, byte spans, fields, and diagram types without parsing human-facing messages.
Breaking changes #
- Analysis facts now use schema 2 and remove the unused Flowchart-only rich graph; regenerate facts consumers together with the matching native artifact.
- ASCII capability records now expose independent semantic coverage and primary projection fields, and rename
summaryFallbacktostructuredTextFallback. Structured ASCII resource and diagnostic payloads follow the expanded six-phase renderer contract; upgrade Dart and bundled native artifacts together.
0.8.0-alpha.5 - 2026-08-12 #
This is the first pub.dev release of 0.8.0-alpha.5. It is built from the reviewed Flutter release commit rather than the earlier workspace tag.
Breaking changes #
- The native libraries bundled on pub.dev now provide SVG, both layout engines, ASCII, analysis, validation, and document analysis. Math, PNG, JPEG, PDF, and native runtime adapters require a current-contract custom library loaded through
Merman.openPath(...)orMerman.fromDynamicLibrary(...); bundled calls fail with typed missing-capability or unsupported-operation errors. - Replaced the legacy Flutter plugin integration with Dart
package_ffiand Native Assets. The package now requires Dart 3.10 or newer; Flutter consumers require Flutter 3.38 or newer, Android API 24 or newer, iOS 13 or newer, and macOS 11 or newer. The public rendering API remains unchanged, while the platform plugin registrars andopenMermanLibrary()helper are removed. - Replaced the prerelease ABI 2 wrapper with generated ABI 3 table discovery. Upgrade the Dart package and all bundled native artifacts together; direct
merman_*symbol lookup, manually maintained raw FFI records, and partial-table compatibility are no longer supported. - Split the public SDK into a stateless
Mermandiscovery/one-shot facade and a directly constructed, explicitly closeableMermanEngine. ReplaceMermanReusableEngine,Merman.reusableEngine(...), engine-owningMermaninstances,dispose(), and callback-specialized facade constructors. - Moved host text measurement and icon packs into immutable constructor-owned
MermanEngineServices. The post-construction callback API is removed; callback-enabled engines report typedBUSYorREENTRANTfailures, and engine close is retryable and idempotent. - Replaced format-specific option envelopes with generic
optionsJsonand Options JSON schema2. Rename viewport fields tocontainer_width/container_height, move text/math selectors underenvironment, move semantic theme values underpresentation.theme, use top-levelsite_configandsvg, remove the legacy Flowchart ELK selector, and use documented kebab-case values. - Replaced parser-backed document facts with their final schema 1 shape, raw operation metadata maps with typed
MermanOperationMetadata/MermanOutputPlanvalues, and closed operation/resource enums with generated open value objects. Iterate.knownValues, preserve unknown output plans throughrawJson, and usepresentationCatalog()instead ofsupportedHostThemePresets().
Added #
- Added validated
MermanRuntimeCatalogdiscovery plus generated operation, payload, resource, metadata, and constructor-service contracts for the exact loaded artifact. - Added generic execution and named helpers for SVG, PNG, JPEG, PDF, ASCII, semantic/layout/analysis JSON, document analysis, and validation, including typed raster/PDF output plans and result-returning binary helpers.
- Added immutable
MermanIconPack/MermanIconPackSet, generated resource builders for the standard runtime profiles, and typed cached diagram, parser/render, lint, Mermaid-theme, and presentation metadata APIs.
Changed #
- Flutter native builds now consume the shared size-oriented default native artifact recipe, bundle precompiled libraries through one Native Assets hook, and enforce the pub.dev compressed-upload budget during release preflight.
- Added Android
armeabi-v7ato the packaged native matrix alongsidearm64-v8aandx86_64. - Updated the bundled engine to the Mermaid 11.16.1 compatibility baseline and the shared 35-family parser, layout, SVG, theme, editor, and resource-limit contracts.
- Flutter native builds consume the exact artifact recipe; Apple slices compile-check the complete public C headers, and the pub package carries the project license, source provenance, and exact third-party license texts.
Fixed #
- Native Assets removes the legacy macOS dylib relocation, Linux Windows-wrapper linkage, and SwiftPM symlink failure surfaces reported in #55, #56, and #57. Apple install names are normalized before signing, and Flutter performs final framework assembly and signing.
0.8.0-alpha.3 - 2026-07-09 #
- Documented Flutter/Dart host text-measurement guidance for
MermanReusableEnginecallbacks. - Added pub.dev metadata links and README compatibility notes for C ABI release discovery.
- Updated package metadata for the merman workspace
0.8.0-alpha.3release.
0.8.0-alpha.2 - 2026-06-23 #
- Updated package metadata for the merman workspace
0.8.0-alpha.2release.
0.8.0-alpha.1 - 2026-06-10 #
- Updated package metadata for the merman workspace
0.8.0-alpha.1release.
0.7.0 - 2026-06-09 #
- Updated package metadata for the merman workspace
0.7.0release. - Added host theme preset and supported theme discovery through the bundled native bindings.
0.7.0-alpha.2 - 2026-06-08 #
- Updated package metadata for the merman workspace
0.7.0-alpha.2release.
0.7.0-alpha.1 - 2026-06-05 #
- Initial experimental Flutter/Dart FFI package for the merman C ABI, including bundled native artifacts for Android, iOS, macOS, Windows, and Linux.