Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
27acbaf
v3.0.0-beta.1
gmpassos Jan 4, 2025
656d359
v3.0.0-beta.1
gmpassos Feb 18, 2025
ed7da00
v3.0.0-beta.1
gmpassos Feb 18, 2025
4727d6c
v3.0.0-beta.2
gmpassos Feb 19, 2025
740704b
v3.0.0-beta.3
gmpassos Feb 22, 2025
b45ca19
v3.0.0-beta.3
gmpassos Feb 22, 2025
c18deb3
v3.0.0-beta.4
gmpassos Feb 23, 2025
f4d026c
v3.0.0-beta.5
gmpassos Feb 24, 2025
1512148
dart format
gmpassos Feb 24, 2025
530875b
web: ^1.1.1
gmpassos Feb 27, 2025
8c927d6
web: ^1.1.1
gmpassos Feb 27, 2025
a96459c
- Avoids using `identical` with `Element` (`JSObject`) to avoid incon…
gmpassos Feb 27, 2025
70f8e10
v3.0.0-beta.6
gmpassos Feb 27, 2025
cecf1d4
Merge remote-tracking branch 'origin/master' into web-migration
gmpassos Feb 27, 2025
b105084
clean code
gmpassos Feb 27, 2025
ede5539
v3.0.0-beta.7
gmpassos Mar 1, 2025
5f3f494
DART_VERSION: "latest"
gmpassos Mar 1, 2025
6b4dd89
✨🚧 lib(bones_ui_test_tools): refactor: update select methods for bett…
gmpassos Mar 1, 2025
5df71af
optimize
gmpassos Mar 1, 2025
d18c6b9
optimize
gmpassos Mar 1, 2025
cabc224
v3.0.0-beta.8
gmpassos Mar 6, 2025
8bdca60
Merge remote-tracking branch 'origin/master' into web-migration
gmpassos Apr 17, 2025
a5ed6ed
v3.0.0-beta.9
gmpassos Apr 17, 2025
344a378
- `UISVG`:
gmpassos Jun 1, 2025
c90ce6c
- `UIComponent`:
gmpassos Jun 1, 2025
e065134
v3.0.0-beta.10
gmpassos Jun 1, 2025
8289c55
v3.0.0-beta.10
gmpassos Jun 1, 2025
ca3fa30
Merge remote-tracking branch 'origin/master' into web-migration
gmpassos Jun 18, 2025
6e4ed32
v3.0.0-beta.11
gmpassos Jun 18, 2025
1e497d2
Merge remote-tracking branch 'origin/master' into web-migration
gmpassos Jul 14, 2025
801ce68
v3.0.0-beta.12
gmpassos Jul 14, 2025
37ea78b
Merge remote-tracking branch 'origin/master' into web-migration
gmpassos Jul 25, 2025
e7578de
swiss_knife: ^3.3.3
gmpassos Jul 25, 2025
59381ef
clean code
gmpassos Jul 25, 2025
b1f139c
Merge remote-tracking branch 'origin/master' into web-migration
gmpassos Jul 25, 2025
de3816e
3.0.0-beta.14
gmpassos Jul 25, 2025
3a87317
Merge remote-tracking branch 'origin/master' into web-migration
gmpassos Aug 2, 2025
258236e
v3.0.0-beta.15
gmpassos Aug 2, 2025
2f7e239
clean code
gmpassos Nov 22, 2025
2ecf5ac
- New `KeyboardEventExtension`:
gmpassos Nov 22, 2025
2259314
use keyCodeSafe
gmpassos Nov 22, 2025
1c71df1
- `UIDOMGenerator`:
gmpassos Nov 22, 2025
58ed2e2
use keyCodeSafe
gmpassos Nov 22, 2025
27208da
v3.0.0-beta.16
gmpassos Nov 22, 2025
fa80e28
v3.0.0-beta.16
gmpassos Nov 23, 2025
fc588a3
Moved KeyboardEventExtension to package web_utils
gmpassos Nov 23, 2025
e25bd49
Update bones_ui_component.dart and input_config.dart with new collect…
gmpassos Nov 23, 2025
e52cc49
v3.0.0-beta.17
gmpassos Nov 24, 2025
0927af6
v3.0.0-beta.18
gmpassos Nov 24, 2025
1f04e39
v3.0.0-beta.19
gmpassos Nov 24, 2025
dd5649c
v3.0.0-beta.19
gmpassos Nov 25, 2025
2172ac9
- `UIButtonBase` and `UIButtonLoader`:
gmpassos Feb 15, 2026
c5862ff
- `UIDialogBase`:
gmpassos Feb 15, 2026
f378eaf
- `bones_ui_extension.dart`:
gmpassos Feb 15, 2026
3cf212d
- `UIEventHandler`:
gmpassos Feb 15, 2026
a5cb563
- `_CanvasEditImage`:
gmpassos Feb 15, 2026
d2c4418
- `ElementProvider` and `CSSProvider`:
gmpassos Feb 15, 2026
8d80375
- `UIDOMGenerator`:
gmpassos Feb 15, 2026
8cd7c89
- `UICapture`:
gmpassos Feb 15, 2026
d07bc0e
- `UILoading`:
gmpassos Feb 15, 2026
8b31076
- `MasonryItem` and `_MasonryRenderItem`:
gmpassos Feb 15, 2026
81e5e22
- `UITemplateElementGenerator`:
gmpassos Feb 15, 2026
46f0aa8
🐛 fix(lib/src/bones_ui_navigator.dart): use children.asListViewFixed …
gmpassos Feb 15, 2026
0face63
- `InputConfig`:
gmpassos Feb 15, 2026
e7df94c
🐛 fix(lib/src/bones_ui_base.dart): provide domTreeMapDummy and disabl…
gmpassos Feb 15, 2026
17fefc2
- `UIComponent`:
gmpassos Feb 15, 2026
034d5fc
- `UIComponent`:
gmpassos Feb 15, 2026
4e66a26
- `UIRootComponent`:
gmpassos Feb 15, 2026
34f34bf
v3.0.0-beta.20
gmpassos Feb 15, 2026
7e47af5
bump.sh
gmpassos Feb 15, 2026
d6827ff
v3.0.0
gmpassos Feb 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Dart CI

env:
DART_VERSION: "3.6.2"
DART_VERSION: "latest"

on:
push:
Expand Down Expand Up @@ -74,8 +74,10 @@ jobs:
run: dart pub get
- name: Upgrade dependencies
run: dart pub upgrade
- name: Run tests (Chrome)
run: dart test --platform chrome --coverage=./coverage
- name: Run tests (Chrome Wasm)
run: dart test --platform chrome --compiler dart2wasm
- name: Run tests (Chrome JS)
run: dart test --platform chrome --compiler dart2js --coverage=./coverage
- name: Generate coverage report
run: |
dart pub global activate coverage
Expand Down
301 changes: 301 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,304 @@
## 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`.

## 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

## 2.5.21

- `InputConfig`:
Expand Down
1 change: 0 additions & 1 deletion bones_ui.iml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<excludeFolder url="file://$MODULE_DIR$/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/.pub" />
<excludeFolder url="file://$MODULE_DIR$/build" />
<excludeFolder url="file://$MODULE_DIR$/coverage" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
Expand Down
11 changes: 11 additions & 0 deletions bump.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

APIKEY=$1
shift # remove the first argument (API key) from "$@"

## dart pub global activate dart_bump

dart_bump . \
--extra-file "lib/src/bones_ui.dart=static\\s+const\\s+String\\s+version\\s+=\\s+['\"]([\\w.\\-]+)['\"]" \
--api-key $APIKEY \
"$@"
1 change: 1 addition & 0 deletions dart_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ define_platforms:
linux: firefox-esr

platforms: [chrome]
compilers: [dart2js, dart2wasm]
6 changes: 2 additions & 4 deletions example/main.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import 'dart:html';

import 'package:bones_ui/bones_ui_kit.dart';

void main() async {
// Create `bones_ui` root and initialize it:
var root = MyRoot(querySelector('#output'));
var root = MyRoot(document.querySelector('#output'));
root.initialize();
}

Expand Down Expand Up @@ -162,7 +160,7 @@ class MyComponents extends UIComponent {
'<hr>',
UIButton(content, 'UIButton')
..onClick.listen((event) => _showAlert('<b>UIButton Clicked:</b>',
'x: ${event.client.x}<br> y: ${event.client.y}')),
'x: ${event.clientX}<br> y: ${event.clientY}')),
'<hr>',
UIInputTable(content, [
InputConfig('name', 'Name', type: 'text'),
Expand Down
4 changes: 3 additions & 1 deletion lib/bones_ui_kit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ export 'package:dom_builder/dom_builder.dart';
export 'package:dom_tools/dom_tools.dart';
export 'package:dynamic_call/dynamic_call.dart';
export 'package:html_unescape/html_unescape.dart';
export 'package:json_object_mapper/json_object_mapper.dart';
export 'package:js_interop_utils/js_interop_utils.dart';
export 'package:mercury_client/mercury_client.dart';
export 'package:swiss_knife/swiss_knife.dart';
export 'package:web_utils/web_utils.dart'
hide CSS, HttpStatus, HttpRequest, Credential, MimeType, Geolocation;

export 'bones_ui.dart';
3 changes: 2 additions & 1 deletion lib/bones_ui_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
library;

export 'dart:async';
export 'dart:html';

export 'package:dom_builder/dom_builder.dart';
export 'package:dom_tools/dom_tools.dart';
export 'package:web_utils/web_utils.dart'
hide CSS, HttpStatus, HttpRequest, MimeType;

export 'bones_ui.dart';
export 'src/bones_ui_test_tools.dart';
Loading
Loading