returningai_widget 0.1.2
returningai_widget: ^0.1.2 copied to clipboard
Official Flutter SDK for embedding ReturningAI widgets on Android and iOS.
Changelog #
0.1.2 #
- Removes
ReturningAIWidgetEndpoints.adssProduction. Hosts that need a branded tenant pass a customReturningAIWidgetEndpoints.
0.1.1 #
- Slims the published README to client install, usage, and controller APIs.
0.1.0 #
-
Distinguishes custom-data JSON types and structure in session fingerprints while ignoring object key order (EC-04).
-
Preserves Unicode keys and values in bridge replies by decoding Base64 bytes as UTF-8 before parsing JSON (EC-03).
-
Normalizes host provider/callback exceptions and omits raw authentication causes from public errors (EC-02).
-
Uses fixed authentication failure text and omits server hints to prevent opaque credential reflection (EC-01).
-
Hosts custom product embeds only. Removes first-class descriptor factories (
store,channel,social,milestone,currencyView,referralConditions). UseReturningAIWidgetDescriptor.customorReturningAIWidgetConfiguration.customBundle. -
Reloads the generated widget shell instead of the content-origin
/afterloadHtmlString. -
Adds package hot-path performance budget tests for HTML rendering, bridge encode/decode, navigation policy, and coordinator start. Budgets are CI-safe and do not measure device WebView time-to-interactive.
-
Defaults the web runtime to the unpkg IIFE at
https://unpkg.com/@returningai/widget-sdk/dist/rai-widget.iife.js. Hosts may passruntimeUrlon the primary constructor or oncustomBundleto pin a version. -
Emits HTML
languagefrom Dartlocale(same value; no second public field). -
Types
rai-session-expiredasReturningAIWidgetSessionExpiredand clears the cached access token. -
Ignores stale bridge envelopes after WebView reuse instead of emitting
bridgeProtocolFailed. -
Rejects off-allowlist subframe navigations without emitting
navigationRejectedto the host. Main-frame rejects still error; off-allowlist main-frame HTTPS is still delegated. -
Default-allowlists
milestoneCtaClickalongsidecallbackFieldOptionsandstorePurchaseSuccess. -
Loads the local shell with the widget content origin so split-bundle
import(app.js)is same-origin. Prefetches serverless auth while the shell loads. -
Treats
rai-mountedorrai-readyas session-ready. Reuses the WebView across configuration changes. -
Fills a transparent display background from the resolved theme. Keeps the WebView mounted on auth/
rai-error; ready timeout overlays instead of unmounting. -
Uses UUID v4 serverless nonces. Omits empty
loading-text. No default Flutter loading overlay. -
Gallery example: custom Store, Socials, Currency (
earning-overview), and Milestones public embeds. -
Initial unreleased Flutter SDK for embedding ReturningAI widgets on Android and iOS.
-
Adds typed configuration, secure Dart authentication, WebView bridge handling, events, callbacks, navigation policy, lifecycle control, and example documentation.
-
Enforces token-provider cancellation and timeout, canonical Origin headers, exact bridge shapes, safe error redaction, fresh-session retry, external-link delegation, platform-aware system themes, and subresource-safe WebView errors.
-
Adds Android and iOS example runners plus a loopback device integration test.