Skip to content
This repository was archived by the owner on Feb 18, 2026. It is now read-only.

Version 0.6.2

Pre-release
Pre-release

Choose a tag to compare

@estherbrunner estherbrunner released this 03 Jul 08:11
· 364 commits to main since this release

What's Changed

Licence changed from BSD 3-Clause to MIT

New Features

  • New static function define(tagName: string, registry = customElements: CustomElementRegistry) to register the custom element
  • Method this.set() accepts a third optional parameter update = true: boolean to set a default not overwriting the current value if set
  • New method this.pass(element: UIElement, states: Record<PropertyKey, PropertyKey | () => any>, registry = customElements: CustomElementsRegistry) that awaits the child element being defined and then sets state signals on it
  • Effect callback functions get a queue function passed to enqueue fine-grained DOM updates for concurrent view refreshes
  • Effects now have a targets property containing a map of targeted DOM elements with enqueued DOM updates
  • Add ancillary utilities:
    • /lib/cause-effect.js with the base signals functions cause(), derive() and effect() used under the hood by UIElement
    • /lib/debug-element.js is a base class DebugElement extends UIElement to log lifecycle callbacks and changes in the signal chain on elements with property debug = true;
    • /lib/dom-utils.js provides DOMUpdater functions to be used in effects: setText(), setProp(), setAttr(), setClass() and setStyle(); in addition autoEffects(this); will auto-create simple effects from HTML attributes in the DOM subtree: ui-text, ui-prop, ui-attr, ui-class, ui-style
    • /lib/context-controller.js implements the Context Community Protocol with ContextProvider and ContextConsumer which communicate via ContextRequestEvents
    • /lib/visibility-observer.js showcases composition of shared functionality in UIElement classes with a simple IntersectionObserver to set a visible state on the element

Breaking Changes since v0.4.0

  • Property attributeMapping is now called attributeMap

Full Changelog: v0.4.0...v0.6.2