Skip to content

Releases: Colossus-Services/bones_ui

v3.0.7

20 Feb 20:11

Choose a tag to compare

  • UIComponent:

    • Rollback: avoid WeakReference issues with WASM on Chrome/Android.
      • Replaced DualWeakMap<UIElement, UIComponent> with Expando<WeakReference<UIComponent>> for _contentsUIComponents.
      • Updated _setContent and _recycle to store WeakReference(this) in _contentsUIComponents.
      • Updated getContentUIComponent to retrieve the target from the weak reference.
      • Removed _contentsUIComponents.purge() call from purgeGlobals.
  • Dependencies:

    • Updated dom_builder from ^3.0.4 to ^3.0.5.
    • Updated swiss_knife from ^3.3.7 to ^3.3.9.

v3.0.6

20 Feb 10:23

Choose a tag to compare

  • UIComponent:

    • getContentUIComponent: replaced direct map access with DualWeakMap.getNoPurge for _contentsUIComponents.
  • UIDOMGenerator:

    • Added override for isMappable method to exclude TextNode and certain DOMElement tags (br, p) from being mappable.
  • Dependencies:

    • Updated dom_builder from ^3.0.2 to ^3.0.4.
    • Updated swiss_knife from ^3.3.5 to ^3.3.7.

v3.0.5

20 Feb 01:37

Choose a tag to compare

  • UIComponent:

    • toRenderableList:
      • Changed return type from List<dynamic>? to List<Object>?.
      • Simplified list conversion logic; now accepts List<Object>, Iterable<Object?>, and Map with renderable keys/values.
    • _toContentElementsImpl:
      • Replaced _normalizeRenderListValue usage for HTML string rendering with direct $html call and DOM node building.
    • _normalizeRenderListValue:
      • Added null check returning null immediately.
      • Reordered and refined type checks for better clarity and correctness.
      • Removed redundant UIComponent check duplication.
    • _buildRenderList:
      • Added null check after normalization to skip null values.
  • Dependency updates:

    • dom_builder: ^3.0.2

v3.0.4

19 Feb 21:10

Choose a tag to compare

  • UIComponent:
    • _notifyFinishRendered: updated to prevent concurrent executions by caching a future and resetting it on completion.
    • _notifyFinishRenderedImpl: refactored to async method called by _notifyFinishRendered.
    • _onPurge: added early return if _subComponent is true to skip purging for subcomponents.

v3.0.3

19 Feb 18:38

Choose a tag to compare

  • Dependency updates in pubspec.yaml:
    • Updated dom_builder from ^3.0.0 to ^3.0.1.
    • Updated build_web_compilers from ^4.4.11 to ^4.4.12.

v3.0.2

19 Feb 01:24
c6317fa

Choose a tag to compare

  • UIComponent:

    • Added private _subComponent flag to distinguish subcomponents.
    • Refactored constructors:
      • Added private named constructor UIComponent._ to centralize initialization.
      • Added public mirror constructor UIComponent with detailed documentation on parameters controlling rendering, styling, and structure.
      • Added new constructor UIComponent.subComponent for creating components attached to an existing parentComponent, sharing its DOM mapping context.
    • Updated dispose method to avoid disposing shared domTreeMap when the component is a subcomponent.
  • UIButton (button.dart):

    • Extended $uiButtonLoader function to support additional attributes for loaded text styling and content:
      • Added parameters: loadedTextClass, loadedTextStyle, loadedTextErrorClass, loadedTextErrorStyle, loadedTextOK, loadedTextError.
      • Added corresponding attributes to the returned DOM element for these new parameters.

v3.0.1

18 Feb 20:46

Choose a tag to compare

  • UIComponent:

    • Updated render to notify UI roots finish render before purging UI components and roots asynchronously after a 300ms delay.
    • Added private async method _purgeUI to purge components and roots with yielding.
    • Replaced synchronous _onFinishRender with async _onPurge that purges DOM tree map and yields.
    • Made purgeGlobals async and added yields between purge calls.
  • UIRootComponent:

    • Modified notifyFinishRender to only emit event without purging.
    • Made purgeRoot async, purging UI components tree and DOM tree map with yields, and awaiting UIComponent.purgeGlobals.
  • bones_ui_utils.dart:

    • Added yeld utility function to yield to event loop for at least 1 millisecond.
  • UICapture:

    • Replaced all internal _yeld calls with yeld from bones_ui_utils.dart for consistent async yielding.

v3.0.0

17 Feb 20:49

Choose a tag to compare

3.0.0

  • Release v3.0.0

  • Dependencies:

    • Updated dom_tools from ^3.0.0-beta.19 to ^3.0.0.
    • Updated dom_builder from ^3.0.0-beta.11 to ^3.0.0.
    • intl_messages: ^3.0.0

3.0.0-beta.20

  • UIEventHandler:

    • Added unregisterEventListener and clearEventListeners methods.
  • EventHandlerPrivate:

    • Changed _eventListeners to nullable and lazily initialized.
    • Added _unregisterEventListener and _clearEventListeners implementations.
  • ElementProvider and CSSProvider:

    • Updated calls to buildDOM to include treeMap and setTreeMapRoot parameters.
  • UIComponent:

    • Replaced Expando with DualWeakMap for static field _asyncRenderingZoneComponent.
    • Added _domTreeMap field and domTreeMap getter for lazy DOM tree mapping.
    • Added domTreeMapIfInitialized getter and static domTreeMapDummy.
    • Replaced Expando with DualWeakMap for _contentsUIComponents.
    • Updated parent setting methods to use named parameter addToParent.
    • Added _resolveParentFromParentUIComponent to better resolve _parent.
    • Updated many list conversions from .toList() to .asListViewFixed for performance.
    • Added _onRender and _onChange lazy event streams.
    • Added _renderedUIRoots and _renderedUIComponents sets to track rendering.
    • Improved _markRenderTime and rendering finish notification logic.
    • Added dispose and _recycle methods for lifecycle management.
    • Added static purgeGlobals to clear global UI state.
    • Updated rendering and async content handling to use nullable collections.
    • Updated event listener attachment to use addEventListenerTyped.
  • bones_ui_extension.dart:

    • Added ElementStreamExtension and StreamSubscriptionExtension to track subscriptions in DOMTreeMap.
  • UIDOMGenerator:

    • Updated addExternalElementToElement and toElements to accept treeMap and context parameters.
    • Updated calls to buildDOM to pass treeMap and setTreeMapRoot.
  • UIRootComponent:

    • Changed _uiComponentsTree to nullable and lazily initialized.
    • Added _onPurgedUIComponents callback to dispose purged components.
    • Updated methods to safely handle nullable _uiComponentsTree.
    • Added purgeRoot method to purge tree and global UI state.
  • Added _UIDOMTreeReferenceMap subclass to prevent premature purging of components not fully initialized or disposed.

  • UIButtonBase and UIButtonLoader:

    • Updated event listener attachment to use addEventListenerTyped.
    • Fixed null safety and type checks for button elements.
  • UICapture:

    • Added new CaptureDataFormat.urlOrBlobUrl format.
    • Added selectedFileDataAsURLOrDataURLBase64 getter.
    • Updated _readFile and _filterCapturedData to support new format and improved async flow with _yeld helper.
    • Updated _CapturedData class to store optional MIME type and support new format.
    • Improved data format conversions to preserve MIME type.
    • Added helper _yeld function for async yielding.
  • UIDialogBase:

    • Fixed background color style to use rgb when alpha is 1.0.
  • _CanvasEditImage:

    • Added delayed _configure call after construction.
    • Updated _updateCanvasDimension to return bool indicating if dimension changed.
    • Improved zoom and translate setters to avoid unnecessary renders.
  • InputConfig:

    • Added optional parent parameter to rendering methods.
    • Updated DOM building calls to pass treeMap and setTreeMapRoot.
    • Updated _resolveValueText to use parent for intl message resolution.
  • UIInputTable:

    • Updated rendering of inputs and labels to pass domTreeMap and setTreeMapRoot.
  • UILoading:

    • Updated asDIVElement buildDOM calls to pass treeMap and setTreeMapRoot.
  • MasonryItem and _MasonryRenderItem:

    • Updated DOM generation calls to pass treeMap and setTreeMapRoot.
  • UITemplateElementGenerator:

    • Updated DOM generation calls to pass treeMap, context, and setTreeMapRoot.
    • Updated template building to use dsxResolution enum instead of boolean flags.
  • pubspec.yaml:

    • Updated dependencies:
      • web_utils: ^1.0.21
      • dom_tools: ^3.0.0-beta.19
      • dom_builder: ^3.0.0-beta.11
      • swiss_knife: ^3.3.5
      • statistics: ^1.2.1
      • test: ^1.29.0
      • test_api: ^0.7.9
      • test_core: ^0.6.15
      • build_web_compilers: ^4.4.11
      • build_runner: ^2.11.1
      • dependency_validator: ^5.0.4

3.0.0-beta.19

  • dom_tools: ^3.0.0-beta.13
  • dom_builder: ^3.0.0-beta.7
  • web_utils: ^1.0.19

3.0.0-beta.18

  • UIDOMGenerator:

    • toElements:
      • Fix resolution of UIComponent, calling UIComponent.ensureRendered before return UIComponent.content.
  • dom_builder: ^3.0.0-beta.6

3.0.0-beta.17

  • UIComponent:

    • getFieldElementTyped: use asElementOfNullable.
  • web_utils: ^1.0.18

3.0.0-beta.16

  • UIDOMGenerator:

    • addExternalElementToElement: improve external element resolution.
    • attachFutureElement: improve element resolution.
  • js_interop_utils: ^1.0.9

  • web_utils: ^1.0.17

  • dom_tools: ^3.0.0-beta.12

  • dom_builder: ^3.0.0-beta.5

  • expressions: ^0.2.5+3

  • collection: ^1.19.1

  • test: ^1.28.0

  • test_api: ^0.7.8

  • test_core: ^0.6.14

  • build_web_compilers: ^4.4.3

  • build_runner: ^2.10.4

  • dependency_validator: ^5.0.3

3.0.0-beta.15

  • Merge 2.5.21
    • InputConfig:
      • Added field precision.
      • Added support for type decimal.

3.0.0-beta.14

  • Merge 2.5.20:
    • UIComponent:
      • Optimize findChildDeep with a BFS queue.

3.0.0-beta.13

  • Merge 2.5.19:

    • UIComponent:
      • _getContentChildrenImpl, _findInContentChildDeepImpl, _findChildrenDeepImpl, _listFieldsEntriesInContentDeepImpl: Switched to iterative breadth-first search for up to 10× faster element lookup in deep UI trees.
      • getFields, getFieldElementByValue, getElementFieldName, getFieldsElementsMap, parseChildElementValue:
        • added parameter resolveUIComponents = true.
  • test: ^1.26.3

  • test_api: ^0.7.7

  • test_core: ^0.6.12

3.0.0-beta.12

  • Merge 2.5.17:

    • UIDialog:
      • Added properties autoScrollY and autoScrollX.
  • dom_tools: ^3.0.0-beta.11

  • swiss_knife: ^3.3.1

  • build_web_compilers: ^4.2.0

  • build_runner: ^2.5.4

3.0.0-beta.11

  • Merge 2.5.16:
    • UIComponent:
      • Optimized subUIComponentsDeeply and getRenderedUIComponents

        • Both now return Iterable<UIComponent>.
        • subUIComponentsDeeply is optimized as a lazy sync* generator and recursively calls subElem.subUIComponentsDeeply.
      • Improve _resolveUIRootComponent.

      • _callRenderImpl: fix issue when parent is passed on constructor but it's already appended in a sub-element.

      • test: ^1.26.2

      • test_api: ^0.7.6

      • test_core: ^0.6.11

      • dependency_validator: ^5.0.2

3.0.0-beta.10

  • UISVG:

    • replace createHTML with createElement for SVG element creation.
  • UIComponent:

    • replace append with appendChild for DOM consistency.
  • js_interop_utils: ^1.0.8

  • web_utils: ^1.0.15

  • dom_tools: ^3.0.0-beta.10

  • archive: ^4.0.7

  • test: ^1.26.2

  • test_api: ^0.7.6

  • test_core: ^0.6.11

  • build_web_compilers: ^4.1.5

3.0.0-beta.9

  • Merge v2.5.15

    • UIComponent:
      • Added renderedElementsAsync.
    • UIDialogBase:
      • Added configureButtons to configure the buttons onClick.
      • posRender and posAsyncRender calls configureButtons.
  • js_interop_utils: ^1.0.7

  • web_utils: ^1.0.14

  • dom_tools: ^3.0.0-beta.9

  • dom_builder: ^3.0.0-beta.4

  • archive: ^4.0.5

3.0.0-beta.8

  • web_utils: ^1.0.12

  • dom_tools: ^3.0.0-beta.8

  • project_template: ^1.1.1

  • archive: ^4.0.4

  • dependency_validator: ^5.0.2

3.0.0-beta.7

✨♻️ refactor(bones_ui_test_tools):

  • Standardize selectNonTyped and rename it to select.

  • Standardize selectNonTypedAll / selectAllNonTyped and rename it to selectAll.

  • Ensure that selectTyped exists where querySelectorTyped exists.

  • web_utils: ^1.0.11

3.0.0-beta.6

  • Avoids using identical with Element (JSObject) to avoid inconsistencies in Wasm.

  • dom_tools: ^3.0.0-beta.7

  • dom_builder: ^3.0.0-beta.3

  • web: ^1.1.1

  • mercury_client: ^2.3.0

3.0.0-beta.5

  • web_utils: ^1.0.9
  • intl_messages: ^3.0.0-beta.1
  • dom_tools: ^3.0.0-beta.5
  • swiss_knife: ^3.3.0
  • statistics: ^1.2.0
  • resource_portable: ^3.1.2
  • intl: ^0.20.2

3.0.0-beta.4

  • js_interop_utils: ^1.0.6

3.0.0-beta.3

  • web_utils: ^1.0.7
  • mercury_client: ^2.2.5

3.0.0-beta.2

  • web_utils: ^1.0.6
  • dom_tools: ^3.0.0-beta.4
  • dom_builder: ^3.0.0-beta.2

3.0.0-beta.1

  • CI: test with dart2js and dart2wasm (on Chrome).

  • sdk: '>=3.6.0 <4.0.0'

  • js_interop_utils: ^1.0.5

  • web_utils: ^1.0.5

  • dom_tools: ^3.0.0-beta.3

  • dom_builder: ^3.0.0-beta.1

  • web: ^1.1.0

  • collection: ^1.19.0

  • test: ^1.25.15

  • stream_channel: ^2.1.4

  • lints: ^5.1.1

  • build_web_compilers: ^4.1.1

  • build_runner: ^2.4.15

v3.0.0-beta.20

15 Feb 23:10

Choose a tag to compare

  • UIEventHandler:

    • Added unregisterEventListener and clearEventListeners methods.
  • EventHandlerPrivate:

    • Changed _eventListeners to nullable and lazily initialized.
    • Added _unregisterEventListener and _clearEventListeners implementations.
  • ElementProvider and CSSProvider:

    • Updated calls to buildDOM to include treeMap and setTreeMapRoot parameters.
  • UIComponent:

    • Replaced Expando with DualWeakMap for static field _asyncRenderingZoneComponent.
    • Added _domTreeMap field and domTreeMap getter for lazy DOM tree mapping.
    • Added domTreeMapIfInitialized getter and static domTreeMapDummy.
    • Replaced Expando with DualWeakMap for _contentsUIComponents.
    • Updated parent setting methods to use named parameter addToParent.
    • Added _resolveParentFromParentUIComponent to better resolve _parent.
    • Updated many list conversions from .toList() to .asListViewFixed for performance.
    • Added _onRender and _onChange lazy event streams.
    • Added _renderedUIRoots and _renderedUIComponents sets to track rendering.
    • Improved _markRenderTime and rendering finish notification logic.
    • Added dispose and _recycle methods for lifecycle management.
    • Added static purgeGlobals to clear global UI state.
    • Updated rendering and async content handling to use nullable collections.
    • Updated event listener attachment to use addEventListenerTyped.
  • bones_ui_extension.dart:

    • Added ElementStreamExtension and StreamSubscriptionExtension to track subscriptions in DOMTreeMap.
  • UIDOMGenerator:

    • Updated addExternalElementToElement and toElements to accept treeMap and context parameters.
    • Updated calls to buildDOM to pass treeMap and setTreeMapRoot.
  • UIRootComponent:

    • Changed _uiComponentsTree to nullable and lazily initialized.
    • Added _onPurgedUIComponents callback to dispose purged components.
    • Updated methods to safely handle nullable _uiComponentsTree.
    • Added purgeRoot method to purge tree and global UI state.
  • Added _UIDOMTreeReferenceMap subclass to prevent premature purging of components not fully initialized or disposed.

  • UIButtonBase and UIButtonLoader:

    • Updated event listener attachment to use addEventListenerTyped.
    • Fixed null safety and type checks for button elements.
  • UICapture:

    • Added new CaptureDataFormat.urlOrBlobUrl format.
    • Added selectedFileDataAsURLOrDataURLBase64 getter.
    • Updated _readFile and _filterCapturedData to support new format and improved async flow with _yeld helper.
    • Updated _CapturedData class to store optional MIME type and support new format.
    • Improved data format conversions to preserve MIME type.
    • Added helper _yeld function for async yielding.
  • UIDialogBase:

    • Fixed background color style to use rgb when alpha is 1.0.
  • _CanvasEditImage:

    • Added delayed _configure call after construction.
    • Updated _updateCanvasDimension to return bool indicating if dimension changed.
    • Improved zoom and translate setters to avoid unnecessary renders.
  • InputConfig:

    • Added optional parent parameter to rendering methods.
    • Updated DOM building calls to pass treeMap and setTreeMapRoot.
    • Updated _resolveValueText to use parent for intl message resolution.
  • UIInputTable:

    • Updated rendering of inputs and labels to pass domTreeMap and setTreeMapRoot.
  • UILoading:

    • Updated asDIVElement buildDOM calls to pass treeMap and setTreeMapRoot.
  • MasonryItem and _MasonryRenderItem:

    • Updated DOM generation calls to pass treeMap and setTreeMapRoot.
  • UITemplateElementGenerator:

    • Updated DOM generation calls to pass treeMap, context, and setTreeMapRoot.
    • Updated template building to use dsxResolution enum instead of boolean flags.
  • pubspec.yaml:

    • Updated dependencies:
      • web_utils: ^1.0.21
      • dom_tools: ^3.0.0-beta.19
      • dom_builder: ^3.0.0-beta.11
      • swiss_knife: ^3.3.5
      • statistics: ^1.2.1
      • test: ^1.29.0
      • test_api: ^0.7.9
      • test_core: ^0.6.15
      • build_web_compilers: ^4.4.11
      • build_runner: ^2.11.1
      • dependency_validator: ^5.0.4

v3.0.0-beta.19

25 Nov 01:03

Choose a tag to compare

  • dom_tools: ^3.0.0-beta.13
  • dom_builder: ^3.0.0-beta.7
  • web_utils: ^1.0.19