js_widget_runtime 0.4.5
js_widget_runtime: ^0.4.5 copied to clipboard
Run JavaScript widgets as Flutter widgets using QuickJS (VM) or Web Workers (web).
0.4.5 #
- Add a
mapnode to the JSON renderer, built onflutter_map+latlong2with OpenStreetMap tiles (no API key). Props:center {lat, lng},zoom,markers [{id, lat, lng, label?, color?}],polylines [{points, color?, width?}], andfitBounds(trueto fit all markers/polylines, or an explicit[[lat, lng], [lat, lng]]corner list). Events route through the standard bridge:onTapfires with{lat, lng}andonMarkerTapwith{id}.JsonWidgetRenderer.mapTileProviderlets hosts/tests inject a customTileProviderso tile loading never has to hit the network.
0.4.4 #
- Automated patch bump.
0.4.3 #
- Renderer no longer crashes on malformed numeric props from generated
widgets:
jsDouble/jsDoubleOrNullnow parse numeric strings, take the first numeric element of a list, and fall back instead of throwing a cast error (e.g.borderRadius: [14, 14, 0, 0]previously killed the whole render tree).borderRadiusin decorations, cards, inkWell and clipRRect also accepts CSS-style corner lists ([all],[tl-br, tr-bl],[tl, tr-bl, br],[tl, tr, br, bl]) via the newjsBorderRadius.
0.4.2 #
- Fix web compilation of
JsWidgetEngine:_defaultBackendreferencedFlutterJsWidgetEngineBackendunconditionally, but the conditional import resolves to the Web Worker backend on the web, so any web build importing the wrapper failed with "Method not found: 'FlutterJsWidgetEngineBackend'". The platform pick now lives in a factory behind its own conditional import (js_widget_engine_default.dart/js_widget_engine_default_web.dart).
0.4.1 #
- Fix
JsWidgetBridge.callEventfor rapid-fire gestures: concurrent events (tap-down / tap-up / tap) raced on a single completer, so a stale__jsr_event_donecompleted the next event early and the following callEvent crashed with "Future already completed", permanently wedging event delivery (dead buttons in gesture-heavy widgets). Events are now serialized through an internal queue, and__jsr_event_donehandling is take-and-null so stray/duplicate dones are ignored.
0.4.0 #
- Add pluggable JS engine backend:
- New
JsWidgetEngineBackendinterface. JsRuntimeConfig.backendlets hosts use a custom engine (e.g. QuickJS FFI).- Default backends remain
flutter_json VM and Web Worker on web.
- New
- Add host-provided media support for
video/audionodes:JsMediaHost,JsVideoController,JsAudioControllerinterfaces.JsonWidgetRenderer.mediaHostwires real players while the core package stays free of heavy native media dependencies.
- Add
ExternalAssetResolverandJsonWidgetRenderer.externalAssetResolverforexternal:<id>image sources. - Add dynamic font loading via
JsFontResolver,JsFontLoader, and thefontFamilytext style prop.
0.3.2 #
- Export
UiViewTreeNormalizerfrom the public API so hosts can reuse the same React/HTML-style node-name aliases.
0.3.1 #
- Automated patch bump.
0.3.0 #
- Add
pathnode for SVG path stroking with optional progress animation. - Add
absoluteFillnode (aliasfill) for expanded background fills. - Add
stack.fitsupport (expand/loose). - Add universal effect props (
offsetX/offsetY,scale,rotation,opacity,blur) on any node. - Text improvements:
style.gradientrenders text with a gradient viaShaderMask.style.fontStyle: 'italic'supported in addition toitalic: true.style.lineHeightaliasesstyle.height.
- Image improvements:
asset:andfile:source prefixes.- Optional
imageResolvercallback for custom image providers.
- Add
customBuildersmap for host-defined node types. - Add
videoandaudioplaceholder nodes.
0.2.0 #
- Add
jsr.ease.*easing helpers (linear,easeIn,easeOut,easeInOut,bounce,elastic,backIn,backOut). - Add renderer effects from YoClip:
- Radial gradients (
gradient.type: 'radial'). - Box shadows (
decoration.shadows). - Blur node and
blurproperty on containers. clip: trueon rounded containers.- Static 3D transforms (
rotateX,rotateY,perspective) on containers. - Text shadows and
textTransform(uppercase/lowercase).
- Radial gradients (
0.1.1 #
- Automated patch bump.
0.1.0 #
- BREAKING CHANGE: Rename global JS object and channels from
yoloittojsr.- All widgets must use
jsr.render(),jsr.onEvent(),jsr.fetchJson(), etc. - All internal bridge channels are now prefixed with
__jsr_instead of__yoloit_.
- All widgets must use
- Add
JsRuntimeConfig.hostBootstrapJsso hosts can inject host-specific APIs (e.g.,jsr.yoloit = {...}) without polluting the core runtime. - Update example widgets and documentation to use the new
jsrAPI. - Add
AGENTS.md,CLAUDE.md, and agent skills for widget authoring and engine maintenance.
0.0.7 #
- Automated patch bump.
0.0.6 #
- Automated patch bump.
0.0.5 #
- Automated patch bump.
0.0.4 #
- Automated patch bump.
0.0.3 #
- Automated patch bump.
0.0.1 #
- Initial release.
- JavaScript widget runtime for Flutter (VM via
flutter_js, web via Web Workers). - JSON-to-Flutter renderer (
JsonWidgetRenderer) with layout, input, list, image, chart and animation nodes. - Widget manifest loader (
WidgetManifest,WidgetFileReader,AssetWidgetFileReader). - Bridge APIs:
render,fetchJson,exec,storage,secrets, timers andrequestAnimationFrame.