lemon_js_ui library

Classes

JsUiBundle
A validated set of JavaScript modules and resources for one JSUI page.
JsUiCacheManifest
Describes package resource caching preferences.
JsUiCapabilityGroup
A named collection of runtime features, permissions, and method metadata.
JsUiComponentController
Public JSUI js ui component controller API.
JsUiComponentRegistry
Public JSUI js ui component registry API.
JsUiController
Controller for one quickjs_ui page instance.
JsUiDesignTokens
Public JSUI js ui design tokens API.
JsUiDevOptions
Development-time options for quickjs_ui pages.
JsUiDiffStats
Renderer diff statistics for one build pass.
JsUiErrorContext
Optional location and operation metadata attached to a JsUiError.
JsUiErrorOverlay
Public JSUI js ui error overlay API.
JsUiEventDispatcher
Applies throttling, debouncing, dropping, and sample coalescing to events.
JsUiEventEnvelope
从 Flutter 渲染层发送到 JavaScript 页面的事件。
JsUiFileNetworkCacheStore
A persistent file-backed cache store where file I/O is supported.
JsUiHostApiHandlers
Supplies application callbacks for the built-in jsUiHost services.
JsUiHostCapabilityOptions
Selects which built-in jsUiHost services are installed.
JsUiHostFeatures
Resolves capability groups into installable Lemon JS runtime features.
JsUiHostMethod
Describes an application host method exposed to a QuickJS UI page.
JsUiHostMethodDeclaration
Metadata describing a JavaScript method exposed by a capability group.
JsUiInspector
Collects quickjs_ui runtime diagnostics for development and debugging.
JsUiInspectorPanel
Development panel that visualizes JsUiInspector data.
JsUiLifecycleEvent
One recorded lifecycle or action event for inspector timelines.
JsUiLoadMetrics
Structured timing data for one quickjs_ui page load.
JsUiManifest
Describes the modules, resources, routes, and permissions in a JSUI package.
JsUiMemoryNetworkCacheStore
An in-memory network cache store.
JsUiModuleManifest
Describes one JavaScript module declared by a package manifest.
JsUiNavigationOptions
Reliability limits for JSUI-internal navigation.
JsUiNavigator
Opens JavaScript UI pages through Flutter's Navigator.
JsUiNetworkCacheEntry
A cached network response body and its validation metadata.
JsUiNetworkCacheStore
Persists text responses used by the JSUI network loader.
JsUiNetworkJournal
Collects bundle loader and host API network activity into structured records.
JsUiNetworkLoader
Loads JavaScript UI bundles and manifest packages over HTTP.
JsUiNetworkLogEvent
A structured network loader diagnostic event.
JsUiNetworkRecord
One network request observed by quickjs_ui development tooling.
JsUiNetworkRequest
A text resource request issued by JsUiNetworkLoader.
JsUiNetworkResponse
A text response returned by JsUiNetworkFetch.
JsUiNode
Serializable UI node returned by a quickjs_ui page renderer.
JsUiPagePlugin
Builds QuickJS plugins from export default Page(...) UI modules.
JsUiPageSnapshot
Serializable page snapshot for debugging and issue reproduction.
JsUiPerformanceController
Host-owned performance controller for renderer-local effect degradation.
JsUiPerformanceReport
A portable performance capture produced by JsUiPerformanceController.
JsUiPerformanceSnapshot
An immutable snapshot of performance state and renderer workload counters.
JsUiPermissionPolicy
Optional application-layer permission policy for quickjs_ui pages.
JsUiPlugin
安装到 JsUiView 的原生 UI 扩展插件。
JsUiProps
Strict converters from JSON-compatible component props to Flutter values.
JsUiQualityEvent
One effective-quality state in a performance report timeline.
JsUiRenderContext
Rendering services and protocol converters available to components.
JsUiRenderer
Public JSUI js ui renderer API.
JsUiResourceCache
Bounded cache for parsed dynamic-UI bundles.
JsUiResourcePolicy
Restricts URI schemes accepted while parsing resource references.
JsUiResourceReference
A validated, typed reference to a JSUI resource.
JsUiResourceResolver
Loads normalized JSUI text resources from a configured backing store.
JsUiRoute
Declares a JavaScript UI page that can be registered for navigation.
JsUiRouteManifest
Declares a named navigation entry exported by a JSUI package.
JsUiRoutePolicy
Restricts JSUI navigation by route name, resolved path, and dynamic guard.
JsUiRouteRegistry
Maps route names to native builders or JavaScript page declarations.
JsUiRouteRequest
Describes a route operation presented to a JsUiRoutePolicy.
JsUiRouteTransition
Configures the animation used by native and JSUI-internal navigation.
JsUiRuntime
Application-scoped QuickJS runtime shared by dynamic UI page contexts.
JsUiRuntimeLease
Exclusive page context returned by JsUiRuntime.
JsUiSnapshot
Public JSUI js ui snapshot API.
JsUiSnapshotBoundary
Public JSUI js ui snapshot boundary API.
JsUiSnapshotRegistry
Page-scoped registry for captured Flutter subtree images.
JsUiView
QuickJS UI 页面容器 Widget。

Enums

JsUiCapabilityConflictPolicy
Determines how JsUiHostFeatures resolves conflicting feature groups.
JsUiEffectQuality
The effective renderer quality used to scale expensive visual effects.
JsUiErrorKind
Categorizes failures reported by the JSUI runtime and renderer.
JsUiEventKind
UI 事件的调度类型。
JsUiHostCapability
A system service that may be exposed to a QuickJS UI page.
JsUiLifecycle
Lifecycle hooks supported by a JavaScript UI page.
JsUiNetworkRecordPhase
The observed lifecycle state of a network request.
JsUiNetworkRefreshMode
Controls how package resources interact with the network cache.
JsUiNetworkSource
Identifies the subsystem that produced a network record.
JsUiPerformanceMode
Selects automatic or fixed renderer effect quality.
JsUiResourceKind
Identifies how a JSUI resource location is resolved.
JsUiRouteTransitionKind
The animation strategy used when entering or leaving a JSUI route.
JsUiTokenCategory
Values supported by js ui token category.

Constants

jsUiManifestSchemaVersion → const int
The package manifest schema version supported by this library.
jsUiPackageEntry → const String
The required entry module for a package-root manifest.
jsUiPackageManifest → const String
The conventional package manifest file name.
jsUiPagePluginExports → const List<String>
Protocol exports provided by the generated JSUI page adapter module.

Properties

jsUiSnapshotComponentBuilders JsUiComponentBuilderMap
The js ui snapshot component builders value.
final

Functions

instrumentHostNetworkLogging(JsUiHostApiHandlers handlers, JsUiNetworkJournal journal) JsUiHostApiHandlers
Wraps handlers.onNetworkRequest so host HTTP calls appear in the journal.
isJsUiRouteOverlayType(String type) bool
Whether type represents a route-level overlay component.
jsUiIsRelativeImport(String specifier) bool
Whether specifier is a ./ or ../ relative module import.
jsUiSha256Hex(String source) String
Returns the lowercase SHA-256 digest of UTF-8 source.
jsUiStaticImports(String source) Iterable<String>
Extracts static import and re-export specifiers from module source.

Typedefs

JsUiBottomSheetHandler = FutureOr<Object?> Function(Map<String, Object?> payload)
Handles jsUiHost.bottomSheet(payload).
JsUiClipboardReadHandler = FutureOr<String?> Function()
Reads text from the platform clipboard, or returns null when unavailable.
JsUiClipboardWriteHandler = FutureOr<Object?> Function(String text)
Writes text to the platform clipboard.
JsUiColorResolver = Color? Function(Object? value)
Resolves a protocol value to a themed Flutter color.
JsUiComponentBuilder = Widget Function(JsUiRenderContext context, JsUiNode node)
JsUiComponentBuilderMap = Map<String, JsUiComponentBuilder>
JsUiComponentControllerFactory = JsUiComponentController Function(JsUiNode node)
Callback contract for js ui component controller factory.
JsUiConfirmHandler = FutureOr<bool> Function(String message, Map<String, Object?> options)
Handles jsUiHost.confirm(message, options) and returns the user's choice.
JsUiDialogHandler = FutureOr<Object?> Function(Map<String, Object?> payload)
Handles jsUiHost.dialog(payload) with an application-defined payload.
JsUiDiffStatsListener = void Function(JsUiDiffStats stats)
Callback contract for js ui diff stats listener.
JsUiEmptyBuilder = Widget Function(BuildContext context)
页面渲染结果为空时构建占位 UI 的回调。
JsUiErrorBuilder = Widget Function(BuildContext context, JsUiError error)
页面加载或渲染失败时构建错误 UI 的回调。
JsUiEventEnvelopeHandler = void Function(JsUiEventEnvelope event)
Handles an event with loss and coalescing semantics.
JsUiEventHandler = void Function(Map<String, Object?> event)
Handles a raw component event map.
JsUiFileSystemHandler = FutureOr<Object?> Function(Map<String, Object?> payload)
Handles a host-mediated file-system operation.
JsUiLifecycleComponentBuilder<T extends JsUiComponentController> = Widget Function(JsUiRenderContext context, JsUiNode node, T controller)
Callback contract for js ui lifecycle component builder.
JsUiLoadingBuilder = Widget Function(BuildContext context)
页面 JS bundle 尚未就绪时构建加载中 UI 的回调。
JsUiNativeCallHandler = FutureOr<Object?> Function(String method, Object? payload)
Invokes the application-defined native method with an optional payload.
JsUiNativeRouteBuilder = Widget Function(BuildContext context, Map<String, Object?> params)
Builds a native Flutter route from structured JSUI route parameters.
JsUiNavigationHandler = FutureOr<Object?> Function(Map<String, Object?> payload)
Handles a host-specific navigation intent.
JsUiNetworkCacheBuster = String Function(Uri uri)
Produces the query value used to bypass caches during forced refresh.
JsUiNetworkFetch = Future<JsUiNetworkResponse> Function(JsUiNetworkRequest request)
Fetches one text resource for a JsUiNetworkLoader.
JsUiNetworkHandler = FutureOr<Object?> Function(Map<String, Object?> payload)
Handles a host-mediated network request.
JsUiNetworkLogHandler = void Function(JsUiNetworkLogEvent event)
Receives request, response, and cache diagnostic events.
JsUiNodeBuilder = Widget Function(JsUiNode node)
Builds a Flutter widget for a schema node.
JsUiNumberResolver = double? Function(Object? value)
Resolves a protocol value to a themed numeric token.
JsUiPathNodeBuilder = Widget Function(JsUiNode node, String path)
Builds a node at its stable structural path.
JsUiPluginLoader = Future<JsPlugin> Function()
Loads or rebuilds the JavaScript plugin for a page.
JsUiRegistryConfigurator = void Function(JsUiComponentRegistry registry)
将 Flutter 组件注册逻辑写入 JsUiComponentRegistry 的回调类型。
JsUiRouteGuard = FutureOr<bool> Function(JsUiRouteRequest request)
Decides whether a JavaScript route request may proceed.
JsUiSnackbarHandler = FutureOr<Object?> Function(Map<String, Object?> payload)
Handles jsUiHost.snackbar(payload) with an application-defined payload.
JsUiTextStyleResolver = TextStyle? Function(Object? value)
Resolves a protocol value to a themed Flutter text style.
JsUiToastHandler = FutureOr<Object?> Function(String message, Map<String, Object?> options)
Handles jsUiHost.toast(message, options).

Exceptions / Errors

JsUiError
A classified JSUI failure retaining its original cause and context.
JsUiNetworkException
quickjs_ui 网络加载失败时抛出的异常。
JsUiPermissionException
Reports permissions rejected by policy or absent from runtime feature grants.