aberdeen 0.5.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/dist/aberdeen.d.ts +17 -2
- package/dist/aberdeen.js.map +2 -2
- package/dist-min/aberdeen.js.map +2 -2
- package/package.json +1 -1
- package/src/aberdeen.ts +17 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
A TypeScript/JavaScript library for quickly building performant declarative user interfaces *without* the use of a virtual DOM.
|
|
2
2
|
|
|
3
|
-
The key insight is the use of many small anonymous functions, that will automatically rerun when the underlying data changes. In order to trigger updates, that data should be encapsulated in any number of *proxied* JavaScript objects. They can hold anything, from simple values to complex and deeply nested data structures, in which case user-interface functions can (automatically) subscribe to just the parts they depend upon.
|
|
3
|
+
The key insight is the use of many small anonymous functions, that will automatically rerun when the underlying data changes. In order to trigger updates, that data should be encapsulated in any number of *proxied* JavaScript objects. They can hold anything, from simple values to complex, typed and deeply nested data structures, in which case user-interface functions can (automatically) subscribe to just the parts they depend upon.
|
|
4
4
|
|
|
5
5
|
## Why use Aberdeen?
|
|
6
6
|
|
|
@@ -165,6 +165,10 @@ Some further examples:
|
|
|
165
165
|
- [Tutorial](https://vanviegen.github.io/aberdeen/Tutorial/)
|
|
166
166
|
- [Reference documentation](https://vanviegen.github.io/aberdeen/modules.html)
|
|
167
167
|
|
|
168
|
+
## News
|
|
169
|
+
|
|
170
|
+
- **2025-5-07**: After five years of working on this library on and off, I'm finally happy with its API and the developer experience it offers. I'm calling it 1.0! To celebrate, I've created some pretty fancy (if I may say so myself) interactive documentation and a tutorial.
|
|
171
|
+
|
|
168
172
|
## Roadmap
|
|
169
173
|
|
|
170
174
|
- [x] Support for (dis)appear transitions.
|
package/dist/aberdeen.d.ts
CHANGED
|
@@ -163,7 +163,10 @@ export declare function proxy<T extends DatumType>(target: T): ValueRef<T extend
|
|
|
163
163
|
* setTimeout(() => rawUser.name += '?', 2000);
|
|
164
164
|
*
|
|
165
165
|
* // Both userProxy and rawUser end up as `{name: 'Frank!?'}`
|
|
166
|
-
* setTimeout(() =>
|
|
166
|
+
* setTimeout(() => {
|
|
167
|
+
* console.log('final proxied', userProxy)
|
|
168
|
+
* console.log('final unproxied', rawUser)
|
|
169
|
+
* }, 3000);
|
|
167
170
|
* ```
|
|
168
171
|
*/
|
|
169
172
|
export declare function unproxy<T>(target: T): T;
|
|
@@ -428,7 +431,7 @@ export declare function insertCss(style: object, global?: boolean): string;
|
|
|
428
431
|
*
|
|
429
432
|
* try {
|
|
430
433
|
* // Attempt to show a custom message in the UI
|
|
431
|
-
* $('div.error-
|
|
434
|
+
* $('div.error-message:Oops, something went wrong!');
|
|
432
435
|
* } catch (e) {
|
|
433
436
|
* // Ignore errors during error handling itself
|
|
434
437
|
* }
|
|
@@ -436,8 +439,20 @@ export declare function insertCss(style: object, global?: boolean): string;
|
|
|
436
439
|
* return false; // Suppress default console log and DOM error message
|
|
437
440
|
* });
|
|
438
441
|
*
|
|
442
|
+
* // Styling for our custom error message
|
|
443
|
+
* insertCss({
|
|
444
|
+
* '.error-message': {
|
|
445
|
+
* backgroundColor: '#e31f00',
|
|
446
|
+
* display: 'inline-block',
|
|
447
|
+
* color: 'white',
|
|
448
|
+
* borderRadius: '3px',
|
|
449
|
+
* padding: '2px 4px',
|
|
450
|
+
* }
|
|
451
|
+
* }, true); // global style
|
|
452
|
+
*
|
|
439
453
|
* // Cause an error within a render scope.
|
|
440
454
|
* $('div.box', () => {
|
|
455
|
+
* // Will cause our error handler to insert an error message within the box
|
|
441
456
|
* noSuchFunction();
|
|
442
457
|
* })
|
|
443
458
|
* ```
|