appplayer_form_view 0.1.0
appplayer_form_view: ^0.1.0 copied to clipboard
Read-only Flutter viewer for mcp_form documents — renders a FormDocument as the actual paper form (styles, tables, images), with block tagging for LLM coordinate scans, tap-to-inspect callbacks, and P [...]
appplayer_form_view #
A read-only Flutter viewer for mcp_form documents. Renders a FormDocument as the actual paper form — the template's own borders, font effects, shading, tables and images (a seal) on a white sheet — so both people and LLMs see the document, not its schema.
Features #
- Faithful render — outlines, fonts, shading, tables and images, paged so a short document still fills a full sheet.
- LLM coordinate scan — every block is tagged (
MetaData {type: formBlock, id: <blockId>}) so a UI driver can locate a block by coordinates. - PNG capture —
FormViewController.capturePng()for a self-verification loop (the model sees the form it produced). - Inspector / editor seed —
onBlockTap(FormBlockRef)+selectedBlockIdhighlight for tap-to-inspect and direct editing. - Page models —
paged(a full sheet even when content is short) orsectionPerPage(one section per page).
Input #
- Canonical — a typed
FormDocument(no style loss). - Transitional —
formDocumentFromUiDsl(tree)reverse-maps a frozenform.render {format: 'uiDsl'}tree.
Usage #
import 'package:appplayer_form_view/appplayer_form_view.dart';
FormView(
document: myFormDocument,
controller: controller,
onBlockTap: (ref) {
// show an inspector for ref.blockId
},
);
License #
MIT — see LICENSE.