Soundor
Soundor

Soundor 0.14.0

Release notes for Soundor 0.14.0.

All Soundor releases

10 changes — 8 features, 2 fixes

Minor Changes

  • #180 938aa55 Thanks @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-sdk and @soundor/vitest pin the exact version their release group shares, so a project still gets one copy. The runtimes take it with a caret range. New projects from create-soundor-app no longer include it, and an existing project can remove it from its devDependencies.

    Packages: @soundor/config, @soundor/runtime-sdk, @soundor/vitest, create-soundor-app, soundor.

  • #178 ce7601d Thanks @dm-balakin! - Bring your own fonts: import inter from './Inter.ttf' (or .otf) bundles a font file, and registerFont('Inter', inter, { weight, style }) from soundor:ui makes it a face of a family, as CSS's @font-face does. Text whose fontFamily is 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, a fontFamily is now quoted in CSS (unless generic), so names such as 'Inter 18pt' work as they do natively.

    Packages: @soundor/core, @soundor/test-runtime, soundor.

  • #180 938aa55 Thanks @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 the toNativeModule() of the engine it links (@soundor/engine/native-module), into .soundor/cache/juce/ui-debug or ui-release. The lowering therefore always matches the plugin's engine, and a web-only project no longer pays for it.

    ctx.ui.entry is removed. In soundor dev, ctx.ui.live gains onBuild(listener) and sourceMap(file, mapFile), so that a runtime can remake its form after every build and have its stack frames mapped. @soundor/core no longer depends on @soundor/engine and no longer exports toNativeModule(); import it from @soundor/engine/native-module.

    Packages: @soundor/config, @soundor/core, @soundor/runtime-sdk, soundor.

  • #180 938aa55 Thanks @dm-balakin! - Assets are plain strings. soundor:ui exports Asset, a bundled image's or font's id (a string), in place of the global, branded SoundorAsset. Image's source takes an Asset. Image and font imports are declared in their own assets.d.ts in .soundor/generated, apart from the Web globals.

    Packages: @soundor/core, @soundor/react.

  • #180 938aa55 Thanks @dm-balakin! - New package: @soundor/environment, the types of Soundor's JavaScript environment for libraries. It contains soundor:ui, image and font imports, and exactly the Web globals the runtime provides. It is types only and is generated by core: a library adds it as a development dependency and sets "types": ["@soundor/environment"]. Its parts (ui.d.ts, assets.d.ts, globals.d.ts) can also be included separately, for a toolchain that declares image imports itself or code that also runs in a plain web page. @soundor/core no longer ships these declarations (runtime/). A new guide, "Writing a UI library", covers this.

    Packages: @soundor/core, @soundor/environment.

  • #181 2e2080e Thanks @dm-balakin! - @soundor/environment declares soundor:host, soundor:storage and soundor:fs too, so libraries can use them, and it is now the source of every declaration that is the same for all plugins: core copies its files into .soundor/generated and generates only soundor:parameters and soundor:native. plugin.id and plugin.name in soundor:host are typed string, no longer as the config's literal values. Core no longer exports runtimeTypeFiles().

    Packages: @soundor/core, @soundor/environment.

  • #184 2a4f506 Thanks @dm-balakin! - A cursor style 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, pointerleave and pointerenter fire (and Pressable's onHoverIn/onHoverOut), and the cursor follows, in the next tick or frame.

    Packages: @soundor/environment, @soundor/test-runtime.

  • #185 be7853c Thanks @dm-balakin! - Pointer events have movementX/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() (from pointerdown) 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 (or exitPointerLock()) 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 the pointerdown listeners run, so they can lock the press. The test runtime and user.pointer support both.

    Packages: @soundor/environment, @soundor/test-runtime, @soundor/testing-library.

Patch Changes

  • #181 46ea13f Thanks @dm-balakin! - The UI bundle ships only the images and fonts its code still uses after tree shaking: a library's font helper that the plugin never calls no longer adds its files to the plugin.

    Packages: soundor.

  • #181 4588cca Thanks @dm-balakin! - registerFont's documentation says what happens to characters a registered font lacks: they are drawn in a system font that has them.

    Packages: @soundor/core, @soundor/environment.

On this page