Skip to main content

open_intelligent_ui_core 3.1.0 copy "open_intelligent_ui_core: ^3.1.0" to clipboard
open_intelligent_ui_core: ^3.1.0 copied to clipboard

Core of the Open Intelligent UI Flutter renderer: layout, text, controls, charts and tables, with no map, web view, TeX or chat dependency.

3.1.0 #

  • Markdown code fences can draw host widgets. The first word of a fence's info string is its tag; OpenUiServices(markdownFences: {'chart': ...}) maps tags to a MarkdownFenceBuilder, which gets a MarkdownFence (tag, info, body, isComplete). A fence that is still streaming reaches its builder with isComplete false; returning null, or a tag with no builder, keeps the plain code block. MarkdownBlocks is now exported from components.dart and takes fences:, which win over the scope's.
  • A Markdown heading that holds U+2028 or U+2029 no longer hangs the renderer.
  • An app can depend on ai_sdk_openui and this package from git at one commit, with no dependency_overrides: unreleased siblings are path dependencies (see docs/git-dependencies.md).
  • A component with no builder reports a render-error to the session's onError instead of rendering nothing silently. OpenUiView(fallback:) shows a widget when the settled answer has errors and no root, as when a ValidationPolicy fails it. intelligentUiFor(builders, library:) takes a host library and throws an ArgumentError naming each host-added component the lookup cannot build.
  • Theming without Material: OpenUiThemeScope gives a subtree its own OpenUiTheme (a dark view in a light app) with no Material Theme needed, and reaches the date picker and menus. The default fontFamily is now null (the platform font); OpenUiServices.fontFamily sets a fallback. Every colour comes from a token: new onTone, checkInk, chevron, floatShadow, inkOnLight and inkOnDark, and copyWith takes brightness. OpenUiComponentStyle takes fontSize and size per component (for example Button, Checkbox, Input, Carousel.arrow), and OpenUiTypography(tabularNums: true) sets tabular figures on all text. The iOS date popup in a dark view is now legible in a light app.
  • Button, IconButton and Pressable show a handled action's pending, done and failed states, ask for an inline confirmation when the action has confirm, and stay disabled after success with disableAfterSuccess. OpenUiNode gains actionStatus(prop) and run(confirmed:).
  • A handled action in the unknown phase (cut off by a restore, being checked by the host) shows a spinner and a "Checking…" note (OpenUiLocalizations.checkingAction), and takes no tap: it reads as neither failed nor retryable.
  • Every rendered element has a stable key from its statement id (inline elements: parent id and position). OpenUiView(semanticsIdentifiers: true) also sets Semantics identifiers for UI tests.
  • An unnamed field or Form is named after that element id, not a process-wide field-N counter, so what the user typed or picked survives a remount, a restore from initialState and other views rendered first. Two controls with the same label in one form keep separate values: the later one is named <label>~<id>.
  • Elements are keyed by statement id, so a statement that is renamed or moved inline mounts a new widget and drops its local widget state (an expanded map, a scroll position).
  • Chart values, tooltips and axis ticks follow the session's locale: OpenUiSession(locale: 'en_IN') writes ₹2,34,567 and compacts to ₹12.35L. With no locale they stay en-US. OpenUiNode.locale exposes it.
  • All user-visible text comes from OpenUiLocalizations (English by default). Register OpenUiLocalizationsDelegate({'fr': MyFrenchStrings()}) in localizationsDelegates to translate.
  • Right-to-left: layout, padding and positioned controls follow Directionality. Charts, drawings and the map canvas stay left-to-right.
  • The engine's clock and random seams are public as Impure (Impure.now, Impure.random); DatePicker's today uses them.
  • The golden tests (light and dark, every component) run on Linux only; regenerate with fvm flutter test --update-goldens test/goldens on Linux.
  • Theme tokens: OpenUiTheme takes radii, spacing, typography (scale, Text and Title sizes, weights, tabular figures) and components (per-component styles for Card, Button, Badge and Table), and builds from a host theme with OpenUiTheme.fromColorScheme or fromMaterial. Defaults are the reference's values, so nothing changes until you set them. The static radius, spacing and weight constants stay as the reference values.
  • Stock builders (buildCard, buildButton, ...) are exported from components.dart so a host can wrap one.
  • First release: the core renderer (OpenUiView, layout, text, controls, charts, tables, SVG, Markdown, code), the 13 built-in icons and the lucide icon library (package:open_intelligent_ui_core/lucide.dart), split from open_intelligent_ui.
  • allowImageHosts(hosts, maxBytes:, timeout:): an allow-listed image larger than maxBytes (10 MiB by default) or slower than timeout (30 seconds by default) fails instead of downloading without limit.
  • OpenUiServices and MapTiles compare by value, so an OpenUiScope rebuilt with equal services (the same tear-offs and values) no longer rebuilds every component that reads them.
  • Form validation errors come from OpenUiLocalizations, which now extends ValidationMessages: override fieldRequired, invalidEmail, atLeastCharacters and the rest to translate them. OpenUiFormValidation.messages holds the words a Form validates with.
  • Behaviour change: no network by default. Map tiles and images no longer load until you allow them: OpenUiServices(mapTiles: esriStreetTiles, imageLoader: networkImages), or allow a few hosts with imageLoader: allowImageHosts(['upload.wikimedia.org']). A blocked image shows the photo placeholder. The README's Network section lists every place that can reach the network.
  • DatePicker opens on today in its session's clock and time zone. OpenUiNode gains localNow.
0
likes
140
points
74
downloads

Documentation

API reference

Publisher

verified publisherhashstudios.dev

Weekly Downloads

Core of the Open Intelligent UI Flutter renderer: layout, text, controls, charts and tables, with no map, web view, TeX or chat dependency.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

ai_sdk_openui, flutter, intl, path_parsing

More

Packages that depend on open_intelligent_ui_core