From 34e4fbc0b3a8f3233ee3c4f0c18cf7ada50e15ff Mon Sep 17 00:00:00 2001 From: Yury Chetyrko Date: Mon, 12 Feb 2024 18:17:43 +0300 Subject: [PATCH] 0.24.260 --- package-lock.json | 18 +++++++++--------- package.json | 4 ++-- source/html/Elements.ts | 8 ++++---- source/html/Handlers.ts | 8 ++++---- source/html/HtmlDriver.ts | 8 ++++---- 5 files changed, 23 insertions(+), 23 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6c0753b..770be33 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "verstak", - "version": "0.24.250", + "version": "0.24.260", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "verstak", - "version": "0.24.250", + "version": "0.24.260", "license": "Apache-2.0", "dependencies": { - "reactronic": "^0.24.250" + "reactronic": "^0.24.260" }, "devDependencies": { "@types/node": "20.11.17", @@ -2792,9 +2792,9 @@ ] }, "node_modules/reactronic": { - "version": "0.24.250", - "resolved": "https://registry.npmjs.org/reactronic/-/reactronic-0.24.250.tgz", - "integrity": "sha512-NQSTrbh7svDGFrKy45TZR1ryst87PL0btwwMn8QnVa8zUMp28oU1bIC+2PBeib2ty4q2U18J/L+D6Tkc3tg1hg==" + "version": "0.24.260", + "resolved": "https://registry.npmjs.org/reactronic/-/reactronic-0.24.260.tgz", + "integrity": "sha512-KybFxxDC0VK9FMAYnJBefunxxkpL1r/PQC5OcJiAaGbPt5ahJjkHl/3lZlXX86p/fSlksylh8Yfin52Ee/y9Ug==" }, "node_modules/readable-stream": { "version": "3.6.2", @@ -5590,9 +5590,9 @@ "dev": true }, "reactronic": { - "version": "0.24.250", - "resolved": "https://registry.npmjs.org/reactronic/-/reactronic-0.24.250.tgz", - "integrity": "sha512-NQSTrbh7svDGFrKy45TZR1ryst87PL0btwwMn8QnVa8zUMp28oU1bIC+2PBeib2ty4q2U18J/L+D6Tkc3tg1hg==" + "version": "0.24.260", + "resolved": "https://registry.npmjs.org/reactronic/-/reactronic-0.24.260.tgz", + "integrity": "sha512-KybFxxDC0VK9FMAYnJBefunxxkpL1r/PQC5OcJiAaGbPt5ahJjkHl/3lZlXX86p/fSlksylh8Yfin52Ee/y9Ug==" }, "readable-stream": { "version": "3.6.2", diff --git a/package.json b/package.json index d67e4cc..fbc4a09 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "verstak", - "version": "0.24.250", + "version": "0.24.260", "description": "Verstak - Front-End Library", "publisher": "Nezaboodka Software", "license": "Apache-2.0", @@ -31,7 +31,7 @@ }, "homepage": "https://github.com/nezaboodka/verstak/blob/master/README.md#readme", "dependencies": { - "reactronic": "^0.24.250" + "reactronic": "^0.24.260" }, "devDependencies": { "@types/node": "20.11.17", diff --git a/source/html/Elements.ts b/source/html/Elements.ts index 54af813..a1dcddd 100644 --- a/source/html/Elements.ts +++ b/source/html/Elements.ts @@ -57,7 +57,7 @@ export function startNewRow(shiftCursorDown?: number): void { export function cursor(areaParams: ElArea): void { RxNode.declare(Drivers.cursor, { - autorun: el => { + onChange: el => { el.area = areaParams }, }) @@ -68,7 +68,7 @@ export function cursor(areaParams: ElArea): void { export function Note(content: string, formatted?: boolean, declaration?: RxNodeDecl>): RxNode> { return RxNode.declare(Drivers.note, declaration, { - autorun: el => { + onChange: el => { if (formatted) el.native.innerHTML = content else @@ -88,8 +88,8 @@ export function Group( // Fragment export function Handling( - autorun: Delegate>): RxNode> { - return SyntheticElement({ mode: Mode.independentUpdate, autorun }) + onChange: Delegate>): RxNode> { + return SyntheticElement({ mode: Mode.independentUpdate, onChange }) } export function SyntheticElement( diff --git a/source/html/Handlers.ts b/source/html/Handlers.ts index 1779ba2..5757358 100644 --- a/source/html/Handlers.ts +++ b/source/html/Handlers.ts @@ -16,7 +16,7 @@ export function OnClick(target: HTMLElement, action: (() => void) | ToggleRef | key, mode: Mode.independentUpdate, triggers: { target/* , action */ }, - autorun: el => { + onChange: el => { const pointer = target.sensors.pointer if (pointer.clicked) { if (action instanceof Function) { @@ -37,7 +37,7 @@ export function OnResize(target: HTMLElement, action: ((element: ResizedElement) key, mode: Mode.independentUpdate, triggers: { target/* , action */ }, - autorun: el => { + onChange: el => { const resize = target.sensors.resize resize.resizedElements.forEach(x => { action(x) @@ -55,10 +55,10 @@ export function OnFocus( key, mode: Mode.independentUpdate, triggers: { target, model }, - activation: el => { + onCreate: el => { el.node.configureReactronic({ throttling: 0 }) }, - autorun: el => { + onChange: el => { if (switchEditMode !== undefined) { switchEditMode(model) } diff --git a/source/html/HtmlDriver.ts b/source/html/HtmlDriver.ts index 515f0f2..a1e907c 100644 --- a/source/html/HtmlDriver.ts +++ b/source/html/HtmlDriver.ts @@ -16,17 +16,17 @@ export class WebDriver extends ElDriver { // it's up to descendant class to define logic } - activate(node: RxNode>): void { + create(node: RxNode>): void { this.setNativeElement(node) const e = node.element.native if (RxSystem.isLogging && e !== undefined && !node.driver.isPartitionSeparator) e.setAttribute(Constants.keyAttrName, node.key) - super.activate(node) + super.create(node) if (e == undefined && RxSystem.isLogging && !node.driver.isPartitionSeparator) node.element.native.setAttribute(Constants.keyAttrName, node.key) } - deactivate(node: RxNode>, isLeader: boolean): boolean { + destroy(node: RxNode>, isLeader: boolean): boolean { const element = node.element const native = element.native as T | undefined // hack if (native) { @@ -34,7 +34,7 @@ export class WebDriver extends ElDriver { if (isLeader) native.remove() } - super.deactivate(node, isLeader) + super.destroy(node, isLeader) element.native = null as any return false // children elements having native HTML elements are not treated as leaders }