verstak 0.24.250 → 0.24.260

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.
@@ -8,7 +8,7 @@ export declare function startNewRow(shiftCursorDown?: number): void;
8
8
  export declare function cursor(areaParams: ElArea): void;
9
9
  export declare function Note(content: string, formatted?: boolean, declaration?: RxNodeDecl<El<HTMLElement, void>>): RxNode<El<HTMLElement, void>>;
10
10
  export declare function Group<M = unknown, R = void>(declaration?: RxNodeDecl<El<HTMLElement, M>>, preset?: RxNodeDecl<El<HTMLElement, M>>): RxNode<El<HTMLElement, M>>;
11
- export declare function Handling<M = unknown>(autorun: Delegate<El<void, M>>): RxNode<El<void, M>>;
11
+ export declare function Handling<M = unknown>(onChange: Delegate<El<void, M>>): RxNode<El<void, M>>;
12
12
  export declare function SyntheticElement<M = unknown>(declaration?: RxNodeDecl<El<void, M>>, preset?: RxNodeDecl<El<void, M>>): RxNode<El<void, M>>;
13
13
  export declare class VerstakElementDriver<T extends HTMLElement> extends HtmlElementDriver<T> {
14
14
  update(node: RxNode<El<T>>): void | Promise<void>;
@@ -16,14 +16,14 @@ export function startNewRow(shiftCursorDown) {
16
16
  }
17
17
  export function cursor(areaParams) {
18
18
  RxNode.declare(Drivers.cursor, {
19
- autorun: el => {
19
+ onChange: el => {
20
20
  el.area = areaParams;
21
21
  },
22
22
  });
23
23
  }
24
24
  export function Note(content, formatted, declaration) {
25
25
  return RxNode.declare(Drivers.note, declaration, {
26
- autorun: el => {
26
+ onChange: el => {
27
27
  if (formatted)
28
28
  el.native.innerHTML = content;
29
29
  else
@@ -34,8 +34,8 @@ export function Note(content, formatted, declaration) {
34
34
  export function Group(declaration, preset) {
35
35
  return RxNode.declare(Drivers.group, declaration, preset);
36
36
  }
37
- export function Handling(autorun) {
38
- return SyntheticElement({ mode: Mode.independentUpdate, autorun });
37
+ export function Handling(onChange) {
38
+ return SyntheticElement({ mode: Mode.independentUpdate, onChange });
39
39
  }
40
40
  export function SyntheticElement(declaration, preset) {
41
41
  return RxNode.declare(Drivers.synthetic, declaration, preset);
@@ -6,7 +6,7 @@ export function OnClick(target, action, key) {
6
6
  key,
7
7
  mode: Mode.independentUpdate,
8
8
  triggers: { target },
9
- autorun: el => {
9
+ onChange: el => {
10
10
  const pointer = target.sensors.pointer;
11
11
  if (pointer.clicked) {
12
12
  if (action instanceof Function) {
@@ -26,7 +26,7 @@ export function OnResize(target, action, key) {
26
26
  key,
27
27
  mode: Mode.independentUpdate,
28
28
  triggers: { target },
29
- autorun: el => {
29
+ onChange: el => {
30
30
  const resize = target.sensors.resize;
31
31
  resize.resizedElements.forEach(x => {
32
32
  action(x);
@@ -40,10 +40,10 @@ export function OnFocus(target, model, switchEditMode = undefined, key) {
40
40
  key,
41
41
  mode: Mode.independentUpdate,
42
42
  triggers: { target, model },
43
- activation: el => {
43
+ onCreate: el => {
44
44
  el.node.configureReactronic({ throttling: 0 });
45
45
  },
46
- autorun: el => {
46
+ onChange: el => {
47
47
  if (switchEditMode !== undefined) {
48
48
  switchEditMode(model);
49
49
  }
@@ -2,8 +2,8 @@ import { RxNode, SimpleDelegate } from "reactronic";
2
2
  import { El, ElDriver } from "./El.js";
3
3
  export declare class WebDriver<T extends Element, M = unknown> extends ElDriver<T, M> {
4
4
  setNativeElement(node: RxNode<El<T, M>>): void;
5
- activate(node: RxNode<El<T, M>>): void;
6
- deactivate(node: RxNode<El<T, M>>, isLeader: boolean): boolean;
5
+ create(node: RxNode<El<T, M>>): void;
6
+ destroy(node: RxNode<El<T, M>>, isLeader: boolean): boolean;
7
7
  mount(node: RxNode<El<T, M>>): void;
8
8
  update(node: RxNode<El<T, M>>): void | Promise<void>;
9
9
  static findBrotherlyHost<T, R>(node: RxNode<El<T>>): RxNode<El<R>> | undefined;
@@ -3,16 +3,16 @@ import { Constants, ElDriver, ElImpl } from "./El.js";
3
3
  export class WebDriver extends ElDriver {
4
4
  setNativeElement(node) {
5
5
  }
6
- activate(node) {
6
+ create(node) {
7
7
  this.setNativeElement(node);
8
8
  const e = node.element.native;
9
9
  if (RxSystem.isLogging && e !== undefined && !node.driver.isPartitionSeparator)
10
10
  e.setAttribute(Constants.keyAttrName, node.key);
11
- super.activate(node);
11
+ super.create(node);
12
12
  if (e == undefined && RxSystem.isLogging && !node.driver.isPartitionSeparator)
13
13
  node.element.native.setAttribute(Constants.keyAttrName, node.key);
14
14
  }
15
- deactivate(node, isLeader) {
15
+ destroy(node, isLeader) {
16
16
  var _a;
17
17
  const element = node.element;
18
18
  const native = element.native;
@@ -21,7 +21,7 @@ export class WebDriver extends ElDriver {
21
21
  if (isLeader)
22
22
  native.remove();
23
23
  }
24
- super.deactivate(node, isLeader);
24
+ super.destroy(node, isLeader);
25
25
  element.native = null;
26
26
  return false;
27
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "verstak",
3
- "version": "0.24.250",
3
+ "version": "0.24.260",
4
4
  "description": "Verstak - Front-End Library",
5
5
  "publisher": "Nezaboodka Software",
6
6
  "license": "Apache-2.0",
@@ -31,7 +31,7 @@
31
31
  },
32
32
  "homepage": "https://github.com/nezaboodka/verstak/blob/master/README.md#readme",
33
33
  "dependencies": {
34
- "reactronic": "^0.24.250"
34
+ "reactronic": "^0.24.260"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/node": "20.11.17",