flutter_mcp_ui_generator 0.6.3
flutter_mcp_ui_generator: ^0.6.3 copied to clipboard
JSON generation tools for Flutter MCP UI Renderer. Create UI definitions programmatically with templates and fluent API.
0.6.3 - 2026-08-23 #
Added — JsonGenerator.locationAction (UI DSL §4.25) #
- Emits the
locationaction.precisiondefaults tocoarseand rejects anything butcoarse/fine: the value is a ceiling the host honours, so a spelling nobody recognises must fail where it is written rather than quietly widen at the other end. - No continuous form is emitted, because §4.25 defines none.
MCPUIJsonGenerator.paymentAction (DSL §4.24) #
Emits {type: 'payment', itemId, …} with optional seller, amount,
onSuccess and onError. There is no provider or address parameter, because
a document does not choose them — the host assembles the address.
seller is omitted where the receiving party is not the document's to name (a
device-served document, where the host verifies the device instead). amount
is for customer-priced items only and is rejected here when it is not
positive — a price of zero caught at build time beats one caught at checkout.
0.6.2 - 2026-08-11 #
identityAction — the one shape in §17.2.2 this package could not emit #
identityPromoteAction / identityReleaseAction emit the dotted spellings.
§17.3.4 makes the grouped form ({"type": "identity", "action": "promote"})
the canonical one, and a caller wanting it had to hand-write the map.
Regenerated builders #
widget_builders.g.dart had not been regenerated since the registry declared
dataTable.onCellEdit and tree.onDrop, so neither was emittable, and four
parameter types had drifted from their declared shapes.
0.6.1 - 2026-08-07 — the sound and media actions are emittable #
17_Naming.md §17.2.2 gained six action types and this package emitted none of
them, so a caller wanting a sound had to hand-write the map. Added:
soundPlayAction · soundStopAction · mediaPlayAction · mediaPauseAction ·
mediaToggleAction · mediaSeekAction.
drift_audit §I checks this: every action the spec declares must be reachable
from the generator, or a bundle that needs it drops to raw maps.
0.6.0 - 2026-08-05 — builders regenerated against spec 1.4.1 #
The registry gained 330 properties and lost three legacy spellings, and the builders are generated from it, so both sides move together. What a caller sees:
otpInputBuilderemitsonComplete, notautoSubmit. §17.1.4 spells callbackson+ PascalCase, so the old name left the canonical surface; a runtime still accepts it, and a document generated here now carries the spelling the registry declares. This was the one place the rename had not reached — the generated file still emittedautoSubmitafter the spec and runtime had both moved.- Promoted properties are reachable as named arguments —
inkWell's splash / hover / focus colours,tabBar's indicator set,tooltip'spreferBelow/showDuration,listItem'sdense/tileColor, and the rest of the 330. Before this a caller had to drop to a raw map for any of them. linear.distributionandqrCode.errorCorrectiontake the canonical values only (spaceBetween…,low/medium/quartile/high).
No API removals; every existing builder keeps its signature.
0.5.1 - 2026-08-03 — builders regenerated #
Picks up the spec 1.4 registry fixes in flutter_mcp_ui_core 0.5.1: lazy
gains the properties its duplicate definition had been hiding, and
graph.data / markdown.text accept the binding their truncated entries
denied. The floor stays ^0.5.0 and the builder API is unchanged.
Three action types §17.2.2 registers had no builder: submitAction() (§4.22),
eventAction() (§4.23) and permissionAction() — the canonical grouped
{type: "permission", action: "revoke"} form, where permissionRevokeAction()
emits the §17.3.4 legacy dotted spelling.
example/pubspec_overrides.yaml is no longer tracked, so it stops shipping in
the archive — 0.5.0 published it by accident.
0.5.0 - 2026-08-03 — Builders for spec 1.4 (134 → 158) #
Fixed #
generator_codegen was pinned to spec 1.3 while the spec moved on, so every
1.4 widget was missing from this package by construction rather than by
omission — including the Composition Profile's view, absent since 1.4
landed. The tool now takes --spec-version and defaults to the current spec.
Added #
- 24 widget builders:
accordionbarcodebreadcrumbcomboboxcontextMenudateTimePickerdiffViewerfileInputganttkanbanlinkmenumultiSelectotpInputpaginationpdfViewerpopoverqrCoderesizablerichTextEditorspreadsheetsplitterviewvoiceInput. identityPromoteAction/identityReleaseAction(spec §8.9.3). Neither takes credentials nor returns any; the closedoutcomevocabulary is what lets a document telldeclinedfromunavailable— one invites a second try, the other must stop asking.origin(connectionId)(spec §1.9). Takes an id rather than a sealed enum, because the primitive is deliberately open.
Changed #
applicationConfig/pageConfigare marked@Deprecated. They returnApplicationConfig/PageConfig, which are themselves deprecated in favour of the typedApplicationDefinition/PageDefinition. Kept rather than removed — they are public API, and moving is the caller's decision.- README rewritten against the real API: the Quick Start called
MCPUIJsonGenerator.application(metadata:)with notitle/version/routes, passed aThemeDefinitionwhere aMapis required, and usedtext(value:)— none of it compiled.
Changed (build) #
- Generated file now carries
// ignore_for_file: non_constant_identifier_names. Nested array properties keep their spec path in the parameter name (markers[].color→markers___color), which is how a caller sees which nested field it fills; renaming them would break every caller. flutter_mcp_ui_core ^0.4.1 → ^0.5.0,mcp_bundle ^0.4.0 → ^0.4.9.
0.4.1 - 2026-05-23 — common widget property fanout (spec 1.3.4) + mcp_bundle 0.4.0 cascade #
Changed (cascade) #
mcp_bundlecaret bumped from^0.3.0to^0.4.0. The downstreamUiSection.pagesfield switched toMap<String, PageDefinition>.BundleUiWriteAdapternow hands the in-memoryList<PageDefinition>it builds to the newUiSection.fromPagesListfactory, so existing caller code stays unchanged.flutter_mcp_ui_corecaret bumped to^0.4.1(mcp_bundle cascade).
Added #
- Every
MCPUIWidgetBuilders.<widget>static builder gains optionalclickandtooltiptyped parameters (spec 1.3.4 §2.2). Sourced fromspecs/mcp_ui_dsl/spec/1.3/widgets/_common.yamland merged by the generator codegen into every widget's parameter set; a widget-declared same-named property still wins. Bundles that omitclick/tooltipare unaffected — additive.
0.4.0 - 2026-05-03 - Spec ↔ implementation alignment (1.3.3) #
MCPUIWidgetBuilders(widget_builders.g.dart) — generated 1:1 from yaml so every spec widget has a builder.- Action helpers added —
parallelAction/sequenceAction/cancelAction/notificationAction/animationAction/dialogAction/permissionRevokeAction/clientClipboard/clientNotification/clientStorage*. ApplicationBuilder.i18n / .services / .templateLibrariesfluent setters;publisher.url→website.- Channel helpers wrap type-specific fields in
params:;channelActionemits canonical{type: "channel", action: "channel.<sub>"}; newwebsocketChannel. - New code generators:
CCodeGenerator(single-include.hreturning escaped JSONconst char*),CppCodeGenerator(single-include.hppwith C++11 raw-stringinline std::string+ namespace option). - Bumps
flutter_mcp_ui_coreto^0.4.0.
0.3.0 - 2026-04-28 - MCP UI DSL 1.3 (Material 3 Helpers) #
Changed (breaking) #
themeDefinition(...)new helper produces a strongly-typedcore.ThemeDefinitioncovering all 14 token domains. Replaces legacythemeConfig(...)5-section helper.themeColors(...)rewritten for M3 28-role + 6 semantic +seed+stateLayer. Seed-only calls let the runtime derive the rest via HCT.themeTypography(...)rewritten for M3 15-role with canonical type-scale defaults.themeSpacing(...)rewritten for the 9-step 8pt grid plus optional layout aliases. Larger-step keys now follow2xl / 3xl / 4xl.themeElevation(...)rewritten for M3 6-level with{shadow, tint}records.- Binding helpers now resolve to the new theme paths (
theme.color.<slot>,theme.shape.<family>,theme.elevation.<level>.shadow). - License changed from Apache-2.0 to MIT.
Added #
themeShape(...)— new M3 7-family helper.- New dependency:
mcp_bundle ^0.3.0.
Removed #
themeBorderRadiusValuebinding helper.
0.2.4 #
- Bug fixes
0.2.3 #
- Bug fixes
0.2.2 #
0.2.1 #
Bug Fixes #
- Fixed app generator to use pub.dev packages instead of git URLs
- Added configurable runtime version support
0.2.0 #
Refactoring #
- Major internal refactoring for improved maintainability
- Enhanced code organization and structure
- Improved type safety and validation
- Better separation of concerns
0.1.0 #
Initial Release #
- JSON generation toolkit for creating UI definitions
- Widget templates for all 77+ supported widgets
- Fluent Builder API for programmatic UI construction
- Pre-built UI patterns (forms, dashboards, lists)
- Complete theme system with light/dark mode support
- Theme binding expressions
- Application configuration generator
- Type-safe widget property generation
- Support for all widget categories
- JSON export with formatting
- Based on MCP UI DSL v1.0 specification