Web Runtime 0.10.0
Release notes for Web Runtime 0.10.0.
6 changes — 5 features, 1 fix
Minor Changes
-
#180
938aa55Thanks @dm-balakin! - Projects no longer list@soundor/core. It is now a regular dependency of every package that imports it, instead of a peer dependency the project had to provide. The CLI,@soundor/config,@soundor/runtime-sdkand@soundor/vitestpin the exact version their release group shares, so a project still gets one copy. The runtimes take it with a caret range. New projects fromcreate-soundor-appno longer include it, and an existing project can remove it from itsdevDependencies. -
#184
2a4f506Thanks @dm-balakin! - Acursorstyle sets the pointer's shape over a node and its children:'auto'(the default, the parent's: the arrow at the root, the I-beam in a text input),'default','none','pointer','text','crosshair','move', and the'ew-','ns-','nesw-'and'nwse-resize'cursors. While a pointer is pressed, the pressed node's cursor shows wherever it is dragged. Both runtimes resolve it the same way; the JUCE runtime shows the platform's own cursors.Hover follows what changes under a pointer that does not move, as in browsers: when the tree, a layout or a scroll puts another node under a still mouse,
pointerleaveandpointerenterfire (and Pressable'sonHoverIn/onHoverOut), and the cursor follows, in the next tick or frame. -
#185
be7853cThanks @dm-balakin! - Pointer events havemovementX/movementY: how far the pointer moved since its previous event, in logical pixels. A node can lock the pointer while it is pressed, for knobs and faders that turn past the screen's edge:node.requestPointerLock()(frompointerdown) hides the pointer, the screen's edges no longer stop it, its events stay at the position the lock began with only the movement changing, and on release (orexitPointerLock()) the pointer shows again where it began.pointerLockNode()is the node holding it. The JUCE runtime keeps the hidden pointer in the view, moving it back as it strays, and ends the lock however the press ends; the web runtime uses the browser's Pointer Lock. The implicit pointer capture now starts before thepointerdownlisteners run, so they can lock the press. The test runtime anduser.pointersupport both. -
#178
ce7601dThanks @dm-balakin! - Bring your own fonts:import inter from './Inter.ttf'(or.otf) bundles a font file, andregisterFont('Inter', inter, { weight, style })fromsoundor:uimakes it a face of a family, as CSS's@font-facedoes. Text whosefontFamilyis a registered family is set in its closest registered face (bold and italic synthesized where none is), in views and canvases alike; text already shown is laid out again. In the web runtime, afontFamilyis now quoted in CSS (unless generic), so names such as'Inter 18pt'work as they do natively. -
#180
938aa55Thanks @dm-balakin! - The runtime that runs another form of the UI now makes that form itself. The CLI bundles the UI into one ES module,bundle.mjs. The JUCE runtime lowers it for Hermes with thetoNativeModule()of the engine it links (@soundor/engine/native-module), into.soundor/cache/juce/ui-debugorui-release. The lowering therefore always matches the plugin's engine, and a web-only project no longer pays for it.ctx.ui.entryis removed. Insoundor dev,ctx.ui.livegainsonBuild(listener)andsourceMap(file, mapFile), so that a runtime can remake its form after every build and have its stack frames mapped.@soundor/coreno longer depends on@soundor/engineand no longer exportstoNativeModule(); import it from@soundor/engine/native-module.
Patch Changes
- #184
567a831Thanks @dm-balakin! - Selecting text in a text input with the mouse (dragging, double-clicking) works in Firefox: a press in an input no longer captures the pointer for the view, which kept Firefox's own text selection from getting the moves. The press still goes to the input, and a release outside the view still ends it.