verstak 0.24.508 → 0.92.25003

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.
Files changed (38) hide show
  1. package/build/dist/source/core/ElDriver.js +7 -7
  2. package/build/dist/source/core/Elements.d.ts +10 -10
  3. package/build/dist/source/core/Elements.js +28 -28
  4. package/build/dist/source/core/Restyler.js +3 -3
  5. package/build/dist/source/core/WebDriver.d.ts +4 -4
  6. package/build/dist/source/core/WebDriver.js +7 -7
  7. package/build/dist/source/express/Button.v.js +3 -3
  8. package/build/dist/source/express/Field.v.js +4 -4
  9. package/build/dist/source/express/Icon.v.js +1 -1
  10. package/build/dist/source/express/Image.v.js +1 -1
  11. package/build/dist/source/express/Spinner.v.js +1 -1
  12. package/build/dist/source/express/Theme.js +2 -2
  13. package/build/dist/source/express/Toggle.v.js +10 -7
  14. package/build/dist/source/express/common/Utils.js +2 -2
  15. package/build/dist/source/express/theme/Button.s.js +4 -4
  16. package/build/dist/source/express/theme/Field.s.js +5 -5
  17. package/build/dist/source/express/theme/Icon.s.js +2 -2
  18. package/build/dist/source/express/theme/Styling.js +2 -2
  19. package/build/dist/source/express/theme/Toggle.s.js +4 -4
  20. package/build/dist/source/html/DraggableArea.view.js +1 -1
  21. package/build/dist/source/sensors/ButtonSensor.js +7 -7
  22. package/build/dist/source/sensors/FocusSensor.js +6 -6
  23. package/build/dist/source/sensors/Handlers.d.ts +1 -1
  24. package/build/dist/source/sensors/Handlers.js +11 -11
  25. package/build/dist/source/sensors/HoverSensor.js +6 -6
  26. package/build/dist/source/sensors/HtmlDragSensor.js +20 -20
  27. package/build/dist/source/sensors/HtmlElementSensor.js +5 -5
  28. package/build/dist/source/sensors/KeyboardSensor.js +4 -4
  29. package/build/dist/source/sensors/PointerSensor.js +17 -17
  30. package/build/dist/source/sensors/ResizeSensor.js +3 -3
  31. package/build/dist/source/sensors/ScrollSensor.js +3 -3
  32. package/build/dist/source/sensors/WheelSensor.js +3 -3
  33. package/build/dist/source/sensors/WindowSensor.js +2 -2
  34. package/package.json +8 -8
  35. package/build/dist/source/archive/RxDomV1.Types.d.ts +0 -46
  36. package/build/dist/source/archive/RxDomV1.Types.js +0 -22
  37. package/build/dist/source/archive/RxDomV1.d.ts +0 -45
  38. package/build/dist/source/archive/RxDomV1.js +0 -557
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
- import { ReactiveNode, BaseDriver, Transaction, obs, ObservableObject } from "reactronic";
10
+ import { ReactiveNode, BaseDriver, Transaction, observable, ObservableObject } from "reactronic";
11
11
  import { ElKind, Horizontal, Vertical, Direction } from "./El.js";
12
12
  import { equalElCoords, parseElCoords } from "./ElUtils.js";
13
13
  export class ElDriver extends BaseDriver {
@@ -561,27 +561,27 @@ export class ElLayoutInfo {
561
561
  }
562
562
  }
563
563
  __decorate([
564
- obs,
564
+ observable,
565
565
  __metadata("design:type", Number)
566
566
  ], ElLayoutInfo.prototype, "effectiveSizePx", void 0);
567
567
  __decorate([
568
- obs,
568
+ observable,
569
569
  __metadata("design:type", Number)
570
570
  ], ElLayoutInfo.prototype, "contentSizeXpx", void 0);
571
571
  __decorate([
572
- obs,
572
+ observable,
573
573
  __metadata("design:type", Number)
574
574
  ], ElLayoutInfo.prototype, "contentSizeYpx", void 0);
575
575
  __decorate([
576
- obs,
576
+ observable,
577
577
  __metadata("design:type", Number)
578
578
  ], ElLayoutInfo.prototype, "borderSizeYpx", void 0);
579
579
  __decorate([
580
- obs,
580
+ observable,
581
581
  __metadata("design:type", Number)
582
582
  ], ElLayoutInfo.prototype, "borderSizeXpx", void 0);
583
583
  __decorate([
584
- obs,
584
+ observable,
585
585
  __metadata("design:type", Boolean)
586
586
  ], ElLayoutInfo.prototype, "isUpdateFinished", void 0);
587
587
  var ElLayoutInfoFlags;
@@ -2,31 +2,31 @@ import { ReactiveNodeDecl, ReactiveNodeDriver, ReactiveNode, Script, Mode, Merge
2
2
  import { El, ElPlace } from "./El.js";
3
3
  import { CursorCommandDriver } from "./ElDriver.js";
4
4
  import { HtmlDriver } from "./WebDriver.js";
5
- export declare function Window(content?: Script<El<HTMLBodyElement>>, contentAsync?: ScriptAsync<El<HTMLBodyElement>>, key?: string, mode?: Mode, preparation?: Script<El<HTMLBodyElement>>, preparationAsync?: ScriptAsync<El<HTMLBodyElement>>, finalization?: Script<El<HTMLBodyElement>>, triggers?: unknown, basis?: ReactiveNodeDecl<El<HTMLBodyElement>>): ReactiveNode<El<HTMLBodyElement>>;
5
+ export declare function Window(script?: Script<El<HTMLBodyElement>>, scriptAsync?: ScriptAsync<El<HTMLBodyElement>>, key?: string, mode?: Mode, preparation?: Script<El<HTMLBodyElement>>, preparationAsync?: ScriptAsync<El<HTMLBodyElement>>, finalization?: Script<El<HTMLBodyElement>>, triggers?: unknown, basis?: ReactiveNodeDecl<El<HTMLBodyElement>>): ReactiveNode<El<HTMLBodyElement>>;
6
6
  export declare function Window(declaration?: ReactiveNodeDecl<El<HTMLBodyElement>>): ReactiveNode<El<HTMLBodyElement>>;
7
- export declare function Panel<M = unknown>(content?: Script<El<HTMLElement, M>>, contentAsync?: ScriptAsync<El<HTMLElement, M>>, key?: string, mode?: Mode, preparation?: Script<El<HTMLElement, M>>, preparationAsync?: ScriptAsync<El<HTMLElement, M>>, finalization?: Script<El<HTMLElement, M>>, triggers?: unknown, basis?: ReactiveNodeDecl<El<HTMLElement, M>>): ReactiveNode<El<HTMLElement, M>>;
7
+ export declare function Panel<M = unknown>(script?: Script<El<HTMLElement, M>>, scriptAsync?: ScriptAsync<El<HTMLElement, M>>, key?: string, mode?: Mode, preparation?: Script<El<HTMLElement, M>>, preparationAsync?: ScriptAsync<El<HTMLElement, M>>, finalization?: Script<El<HTMLElement, M>>, triggers?: unknown, basis?: ReactiveNodeDecl<El<HTMLElement, M>>): ReactiveNode<El<HTMLElement, M>>;
8
8
  export declare function Panel<M = unknown>(declaration?: ReactiveNodeDecl<El<HTMLElement, M>>): ReactiveNode<El<HTMLElement, M>>;
9
- export declare function Table<M = unknown>(content?: Script<El<HTMLElement, M>>, contentAsync?: ScriptAsync<El<HTMLElement, M>>, key?: string, mode?: Mode, preparation?: Script<El<HTMLElement, M>>, preparationAsync?: ScriptAsync<El<HTMLElement, M>>, finalization?: Script<El<HTMLElement, M>>, triggers?: unknown, basis?: ReactiveNodeDecl<El<HTMLElement, M>>): ReactiveNode<El<HTMLElement, M>>;
9
+ export declare function Table<M = unknown>(script?: Script<El<HTMLElement, M>>, scriptAsync?: ScriptAsync<El<HTMLElement, M>>, key?: string, mode?: Mode, preparation?: Script<El<HTMLElement, M>>, preparationAsync?: ScriptAsync<El<HTMLElement, M>>, finalization?: Script<El<HTMLElement, M>>, triggers?: unknown, basis?: ReactiveNodeDecl<El<HTMLElement, M>>): ReactiveNode<El<HTMLElement, M>>;
10
10
  export declare function Table<M = unknown>(declaration?: ReactiveNodeDecl<El<HTMLElement, M>>): ReactiveNode<El<HTMLElement, M>>;
11
11
  export declare function row<T = void>(builder?: (element: void) => T, shiftCursorDown?: number): void;
12
- export declare function Splitter<M = unknown>(content?: Script<El<HTMLElement, M>>, contentAsync?: ScriptAsync<El<HTMLElement, M>>, key?: string, mode?: Mode, preparation?: Script<El<HTMLElement, M>>, preparationAsync?: ScriptAsync<El<HTMLElement, M>>, finalization?: Script<El<HTMLElement, M>>, triggers?: unknown, basis?: ReactiveNodeDecl<El<HTMLElement, M>>): ReactiveNode<El<HTMLElement, M>>;
12
+ export declare function Splitter<M = unknown>(script?: Script<El<HTMLElement, M>>, scriptAsync?: ScriptAsync<El<HTMLElement, M>>, key?: string, mode?: Mode, preparation?: Script<El<HTMLElement, M>>, preparationAsync?: ScriptAsync<El<HTMLElement, M>>, finalization?: Script<El<HTMLElement, M>>, triggers?: unknown, basis?: ReactiveNodeDecl<El<HTMLElement, M>>): ReactiveNode<El<HTMLElement, M>>;
13
13
  export declare function Splitter<M = unknown>(declaration?: ReactiveNodeDecl<El<HTMLElement, M>>): ReactiveNode<El<HTMLElement, M>>;
14
14
  export declare function rowBreak(shiftCursorDown?: number): void;
15
15
  export declare function declareSplitter<T>(index: number, splitViewNode: ReactiveNode<El<T>>): ReactiveNode<El<HTMLElement>>;
16
16
  export declare function cursor(areaParams: ElPlace): void;
17
17
  export declare function Note(content: string, formatted?: boolean, declaration?: ReactiveNodeDecl<El<HTMLElement, void>>): ReactiveNode<El<HTMLElement, void>>;
18
- export declare function Group<M = unknown>(content?: Script<El<HTMLElement, M>>, contentAsync?: ScriptAsync<El<HTMLElement, M>>, key?: string, mode?: Mode, preparation?: Script<El<HTMLElement, M>>, preparationAsync?: ScriptAsync<El<HTMLElement, M>>, finalization?: Script<El<HTMLElement, M>>, triggers?: unknown, basis?: ReactiveNodeDecl<El<HTMLElement, M>>): ReactiveNode<El<HTMLElement, M>>;
18
+ export declare function Group<M = unknown>(script?: Script<El<HTMLElement, M>>, scriptAsync?: ScriptAsync<El<HTMLElement, M>>, key?: string, mode?: Mode, preparation?: Script<El<HTMLElement, M>>, preparationAsync?: ScriptAsync<El<HTMLElement, M>>, finalization?: Script<El<HTMLElement, M>>, triggers?: unknown, basis?: ReactiveNodeDecl<El<HTMLElement, M>>): ReactiveNode<El<HTMLElement, M>>;
19
19
  export declare function Group<M = unknown>(declaration?: ReactiveNodeDecl<El<HTMLElement, M>>): ReactiveNode<El<HTMLElement, M>>;
20
- export declare function Handling<M = unknown>(content: Script<El<void, M>>): ReactiveNode<El<void, M>>;
21
- export declare function SyntheticElement<M = unknown>(content?: Script<El<void, M>>, contentAsync?: ScriptAsync<El<void, M>>, key?: string, mode?: Mode, preparation?: Script<El<void, M>>, preparationAsync?: ScriptAsync<El<void, M>>, finalization?: Script<El<void, M>>, triggers?: unknown, basis?: ReactiveNodeDecl<El<void, M>>): ReactiveNode<El<void, M>>;
20
+ export declare function Handling<M = unknown>(script: Script<El<void, M>>): ReactiveNode<El<void, M>>;
21
+ export declare function SyntheticElement<M = unknown>(script?: Script<El<void, M>>, scriptAsync?: ScriptAsync<El<void, M>>, key?: string, mode?: Mode, preparation?: Script<El<void, M>>, preparationAsync?: ScriptAsync<El<void, M>>, finalization?: Script<El<void, M>>, triggers?: unknown, basis?: ReactiveNodeDecl<El<void, M>>): ReactiveNode<El<void, M>>;
22
22
  export declare function SyntheticElement<M = unknown>(declaration?: ReactiveNodeDecl<El<void, M>>): ReactiveNode<El<void, M>>;
23
23
  export declare class PanelDriver<T extends HTMLElement> extends HtmlDriver<T> {
24
- update(node: ReactiveNode<El<T>>): void | Promise<void>;
25
- child(ownerNode: ReactiveNode<El<T, any>>, childDriver: ReactiveNodeDriver<any>, childDeclaration?: ReactiveNodeDecl<any> | undefined, childBasis?: ReactiveNodeDecl<any> | undefined): MergedItem<ReactiveNode> | undefined;
24
+ runScript(node: ReactiveNode<El<T>>): void | Promise<void>;
25
+ declareChild(ownerNode: ReactiveNode<El<T, any>>, childDriver: ReactiveNodeDriver<any>, childDeclaration?: ReactiveNodeDecl<any> | undefined, childBasis?: ReactiveNodeDecl<any> | undefined): MergedItem<ReactiveNode> | undefined;
26
26
  }
27
27
  export declare function isSplitViewPartition(childDriver: ReactiveNodeDriver): boolean;
28
28
  export declare class PartitionDriver<T extends HTMLElement> extends HtmlDriver<T> {
29
- update(node: ReactiveNode<El<T>>): void | Promise<void>;
29
+ runScript(node: ReactiveNode<El<T>>): void | Promise<void>;
30
30
  provideHost(node: ReactiveNode<El<T, any>>): ReactiveNode<El<T, any>>;
31
31
  }
32
32
  export declare const Drivers: {
@@ -1,26 +1,26 @@
1
- import { ReactiveNode, Mode, unobs } from "reactronic";
1
+ import { ReactiveNode, Mode, nonreactive } from "reactronic";
2
2
  import { ElKind, Direction } from "./El.js";
3
3
  import { clamp } from "./ElUtils.js";
4
4
  import { Constants, CursorCommandDriver, ElDriver, ElLayoutInfo, InitialElLayoutInfo } from "./ElDriver.js";
5
5
  import { getPrioritiesForEmptySpaceDistribution, getPrioritiesForSizeChanging, relayout, relayoutUsingSplitter } from "./SplitViewMath.js";
6
6
  import { Axis, BodyFontSize, Dimension, toPx } from "./Sizes.js";
7
7
  import { HtmlDriver, StaticDriver } from "./WebDriver.js";
8
- export function Window(contentOrDeclaration, contentAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis) {
8
+ export function Window(scriptOrDeclaration, scriptAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis) {
9
9
  const driver = new StaticDriver(global.document.body, "Page", false, el => el.kind = ElKind.panel);
10
- return ReactiveNode.declare(driver, contentOrDeclaration, contentAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis);
10
+ return ReactiveNode.declare(driver, scriptOrDeclaration, scriptAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis);
11
11
  }
12
- export function Panel(contentOrDeclaration, contentAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis) {
13
- return ReactiveNode.declare(Drivers.panel, contentOrDeclaration, contentAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis);
12
+ export function Panel(scriptOrDeclaration, scriptAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis) {
13
+ return ReactiveNode.declare(Drivers.panel, scriptOrDeclaration, scriptAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis);
14
14
  }
15
- export function Table(contentOrDeclaration, contentAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis) {
16
- return ReactiveNode.declare(Drivers.table, contentOrDeclaration, contentAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis);
15
+ export function Table(scriptOrDeclaration, scriptAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis) {
16
+ return ReactiveNode.declare(Drivers.table, scriptOrDeclaration, scriptAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis);
17
17
  }
18
18
  export function row(builder, shiftCursorDown) {
19
19
  rowBreak(shiftCursorDown);
20
20
  builder === null || builder === void 0 ? void 0 : builder();
21
21
  }
22
- export function Splitter(contentOrDeclaration, contentAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis) {
23
- return ReactiveNode.declare(Drivers.splitter, contentOrDeclaration, contentAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis);
22
+ export function Splitter(scriptOrDeclaration, scriptAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis) {
23
+ return ReactiveNode.declare(Drivers.splitter, scriptOrDeclaration, scriptAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis);
24
24
  }
25
25
  export function rowBreak(shiftCursorDown) {
26
26
  ReactiveNode.declare(Drivers.partition);
@@ -31,7 +31,7 @@ export function declareSplitter(index, splitViewNode) {
31
31
  key,
32
32
  mode: Mode.autonomous,
33
33
  preparation: el => el.native.className = `splitter ${key}`,
34
- content: b => {
34
+ script: b => {
35
35
  const e = b.native;
36
36
  const model = b.model;
37
37
  const dataForSensor = e.dataForSensor;
@@ -51,7 +51,7 @@ export function declareSplitter(index, splitViewNode) {
51
51
  for (const item of initialSizesPx) {
52
52
  clonedSizesPx.push({ node: item.node, sizePx: item.sizePx });
53
53
  }
54
- unobs(() => relayoutUsingSplitter(splitViewNode, deltaPx, index, clonedSizesPx));
54
+ nonreactive(() => relayoutUsingSplitter(splitViewNode, deltaPx, index, clonedSizesPx));
55
55
  if (pointer.dropped) {
56
56
  (_a = model === null || model === void 0 ? void 0 : model.droppedAction) === null || _a === void 0 ? void 0 : _a.call(model, pointer);
57
57
  }
@@ -80,14 +80,14 @@ export function declareSplitter(index, splitViewNode) {
80
80
  }
81
81
  export function cursor(areaParams) {
82
82
  ReactiveNode.declare(Drivers.cursor, {
83
- content: el => {
83
+ script: el => {
84
84
  el.place = areaParams;
85
85
  },
86
86
  });
87
87
  }
88
88
  export function Note(content, formatted, declaration) {
89
89
  return ReactiveNode.declare(Drivers.note, ReactiveNode.withBasis(declaration, {
90
- content: el => {
90
+ script: el => {
91
91
  if (formatted)
92
92
  el.native.innerHTML = content;
93
93
  else
@@ -95,20 +95,20 @@ export function Note(content, formatted, declaration) {
95
95
  },
96
96
  }));
97
97
  }
98
- export function Group(contentOrDeclaration, contentAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis) {
99
- return ReactiveNode.declare(Drivers.group, contentOrDeclaration, contentAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis);
98
+ export function Group(scriptOrDeclaration, scriptAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis) {
99
+ return ReactiveNode.declare(Drivers.group, scriptOrDeclaration, scriptAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis);
100
100
  }
101
- export function Handling(content) {
102
- return SyntheticElement({ mode: Mode.autonomous, content });
101
+ export function Handling(script) {
102
+ return SyntheticElement({ mode: Mode.autonomous, script });
103
103
  }
104
- export function SyntheticElement(contentOrDeclaration, contentAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis) {
105
- return ReactiveNode.declare(Drivers.synthetic, contentOrDeclaration, contentAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis);
104
+ export function SyntheticElement(scriptOrDeclaration, scriptAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis) {
105
+ return ReactiveNode.declare(Drivers.synthetic, scriptOrDeclaration, scriptAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis);
106
106
  }
107
107
  export class PanelDriver extends HtmlDriver {
108
- update(node) {
108
+ runScript(node) {
109
109
  rowBreak();
110
110
  const el = node.element;
111
- const result = super.update(node);
111
+ const result = super.runScript(node);
112
112
  if (el.splitView !== undefined) {
113
113
  if (el.layoutInfo === undefined)
114
114
  el.layoutInfo = new ElLayoutInfo(InitialElLayoutInfo);
@@ -128,7 +128,7 @@ export class PanelDriver extends HtmlDriver {
128
128
  });
129
129
  const relayoutEl = SyntheticElement({
130
130
  mode: Mode.autonomous,
131
- content: () => {
131
+ script: () => {
132
132
  const native = el.native;
133
133
  const isHorizontal = el.splitView === Direction.horizontal;
134
134
  if (layoutInfo.isUpdateFinished) {
@@ -168,7 +168,7 @@ export class PanelDriver extends HtmlDriver {
168
168
  const priorities = preferred.length > 0
169
169
  ? getPrioritiesForSizeChanging(isHorizontal, node.children, preferred)
170
170
  : getPrioritiesForEmptySpaceDistribution(isHorizontal, node.children);
171
- unobs(() => relayout(node, priorities.resizable, priorities.manuallyResizable, sizesPx));
171
+ nonreactive(() => relayout(node, priorities.resizable, priorities.manuallyResizable, sizesPx));
172
172
  }
173
173
  },
174
174
  });
@@ -179,7 +179,7 @@ export class PanelDriver extends HtmlDriver {
179
179
  }
180
180
  return result;
181
181
  }
182
- child(ownerNode, childDriver, childDeclaration, childBasis) {
182
+ declareChild(ownerNode, childDriver, childDeclaration, childBasis) {
183
183
  var _a;
184
184
  let result = undefined;
185
185
  const el = ownerNode.element;
@@ -195,7 +195,7 @@ export class PanelDriver extends HtmlDriver {
195
195
  if (childDeclaration.triggers === undefined)
196
196
  childDeclaration.triggers = {};
197
197
  Object.defineProperty(childDeclaration.triggers, "index", { value: partCount });
198
- overrideMethod(childDeclaration, "content", el => {
198
+ overrideMethod(childDeclaration, "script", el => {
199
199
  if (isHorizontal)
200
200
  el.style.gridColumn = `${partCount + 1}`;
201
201
  else
@@ -226,13 +226,13 @@ function overrideMethod(declaration, method, func) {
226
226
  : (el, base) => { base(); func(el); };
227
227
  }
228
228
  export class PartitionDriver extends HtmlDriver {
229
- update(node) {
230
- const result = super.update(node);
229
+ runScript(node) {
230
+ const result = super.runScript(node);
231
231
  const ownerEl = node.owner.element;
232
232
  if (ownerEl.sealed !== undefined) {
233
233
  node.element.style.flexGrow = "1";
234
234
  ReactiveNode.declare(Drivers.wrapper, {
235
- content: el => {
235
+ script: el => {
236
236
  const ownerEl = el.node.owner.owner.element;
237
237
  if (ownerEl.splitView !== undefined) {
238
238
  el.style.display = "grid";
@@ -7,9 +7,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
- import { cached, Transaction } from "reactronic";
10
+ import { cache, apply } from "reactronic";
11
11
  export function restyler(restyle) {
12
- return Transaction.run(null, () => new ObservablesStyles(restyle));
12
+ return apply(() => new ObservablesStyles(restyle));
13
13
  }
14
14
  export class ObservablesStyles {
15
15
  constructor(restyle) {
@@ -23,7 +23,7 @@ export class ObservablesStyles {
23
23
  }
24
24
  }
25
25
  __decorate([
26
- cached,
26
+ cache,
27
27
  __metadata("design:type", Function),
28
28
  __metadata("design:paramtypes", []),
29
29
  __metadata("design:returntype", Object)
@@ -3,10 +3,10 @@ import { El } from "./El.js";
3
3
  import { ElDriver } from "./ElDriver.js";
4
4
  export declare class WebDriver<T extends Element, M = unknown> extends ElDriver<T, M> {
5
5
  setNativeElement(node: ReactiveNode<El<T, M>>): void;
6
- prepare(node: ReactiveNode<El<T, M>>): void | Promise<void>;
7
- finalize(node: ReactiveNode<El<T, M>>, isLeader: boolean): boolean;
8
- mount(node: ReactiveNode<El<T, M>>): void;
9
- update(node: ReactiveNode<El<T, M>>): void | Promise<void>;
6
+ runPreparation(node: ReactiveNode<El<T, M>>): void | Promise<void>;
7
+ runFinalization(node: ReactiveNode<El<T, M>>, isLeader: boolean): boolean;
8
+ runMount(node: ReactiveNode<El<T, M>>): void;
9
+ runScript(node: ReactiveNode<El<T, M>>): void | Promise<void>;
10
10
  static findBrotherlyHost<T, R>(node: ReactiveNode<El<T>>): ReactiveNode<El<R>> | undefined;
11
11
  static findBrotherlyPrevSibling<T, R>(node: ReactiveNode<El<T>>): ReactiveNode<El<R>> | undefined;
12
12
  static get blinkingEffectMarker(): string | undefined;
@@ -3,17 +3,17 @@ import { Constants, ElDriver, ElImpl } from "./ElDriver.js";
3
3
  export class WebDriver extends ElDriver {
4
4
  setNativeElement(node) {
5
5
  }
6
- prepare(node) {
6
+ runPreparation(node) {
7
7
  this.setNativeElement(node);
8
8
  const e = node.element.native;
9
9
  if (ReactiveSystem.isLogging && e !== undefined && !node.driver.isPartition)
10
10
  e.setAttribute(Constants.keyAttrName, node.key);
11
- const result = super.prepare(node);
11
+ const result = super.runPreparation(node);
12
12
  if (e == undefined && ReactiveSystem.isLogging && !node.driver.isPartition)
13
13
  node.element.native.setAttribute(Constants.keyAttrName, node.key);
14
14
  return result;
15
15
  }
16
- finalize(node, isLeader) {
16
+ runFinalization(node, isLeader) {
17
17
  var _a;
18
18
  const element = node.element;
19
19
  const native = element.native;
@@ -22,11 +22,11 @@ export class WebDriver extends ElDriver {
22
22
  if (isLeader)
23
23
  native.remove();
24
24
  }
25
- super.finalize(node, isLeader);
25
+ super.runFinalization(node, isLeader);
26
26
  element.native = null;
27
27
  return false;
28
28
  }
29
- mount(node) {
29
+ runMount(node) {
30
30
  const element = node.element;
31
31
  const native = element.native;
32
32
  if (native) {
@@ -55,11 +55,11 @@ export class WebDriver extends ElDriver {
55
55
  }
56
56
  }
57
57
  }
58
- update(node) {
58
+ runScript(node) {
59
59
  const element = node.element;
60
60
  if (element instanceof ElImpl)
61
61
  element.prepareForUpdate();
62
- let result = super.update(node);
62
+ let result = super.runScript(node);
63
63
  result = proceedSyncOrAsync(result, v => {
64
64
  if (element.place === undefined) {
65
65
  const oel = node.owner.element;
@@ -13,13 +13,13 @@ export function Button(declaration) {
13
13
  label: ReactiveNode.key,
14
14
  }));
15
15
  },
16
- content: el => {
16
+ script: el => {
17
17
  const m = el.model;
18
18
  const theme = Theme.current.button;
19
19
  el.useStylingPreset(theme.main);
20
20
  if (m.icon) {
21
21
  Icon(m.icon, {
22
- content: (el, base) => {
22
+ script: (el, base) => {
23
23
  base();
24
24
  el.useStylingPreset(theme.icon);
25
25
  },
@@ -27,7 +27,7 @@ export function Button(declaration) {
27
27
  }
28
28
  if (m.label) {
29
29
  Note(m.label, false, {
30
- content: (el, base) => {
30
+ script: (el, base) => {
31
31
  base();
32
32
  el.useStylingPreset(theme.label);
33
33
  },
@@ -11,13 +11,13 @@ export function Field(declaration) {
11
11
  (_a = el.model) !== null && _a !== void 0 ? _a : (el.model = composeFieldModel());
12
12
  el.native.dataForSensor.focus = el.model;
13
13
  },
14
- content: el => {
14
+ script: el => {
15
15
  const m = el.model;
16
16
  const theme = Theme.current.field;
17
17
  el.useStylingPreset(theme.main);
18
18
  if (m.icon)
19
19
  Icon(m.icon, {
20
- content: (el, base) => {
20
+ script: (el, base) => {
21
21
  base();
22
22
  el.useStylingPreset(theme.icon);
23
23
  },
@@ -55,7 +55,7 @@ function FieldInput(model, s) {
55
55
  e.dataForSensor.focus = model;
56
56
  base();
57
57
  },
58
- content: el => {
58
+ script: el => {
59
59
  const e = el.native;
60
60
  if (!model.isEditMode)
61
61
  e.innerText = model.text;
@@ -81,7 +81,7 @@ function FieldInput(model, s) {
81
81
  function FieldPopup(model, s) {
82
82
  return (Panel({
83
83
  key: FieldPopup.name,
84
- content: el => {
84
+ script: el => {
85
85
  el.useStylingPreset(s.popup);
86
86
  Handling(() => model.position = el.native.sensors.scroll.y);
87
87
  const visible = el.overlayVisible = model.isEditMode;
@@ -5,7 +5,7 @@ export function Icon(name, declaration) {
5
5
  return (Panel(ReactiveNode.withBasis(declaration, {
6
6
  mode: Mode.autonomous,
7
7
  triggers: { name },
8
- content: el => {
8
+ script: el => {
9
9
  const theme = Theme.current.icon;
10
10
  el.useStylingPreset(name);
11
11
  el.useStylingPreset(theme.main);
@@ -8,7 +8,7 @@ export function Image(declaration) {
8
8
  var _a;
9
9
  (_a = el.model) !== null && _a !== void 0 ? _a : (el.model = observableModel({ source: undefined }));
10
10
  },
11
- content: el => {
11
+ script: el => {
12
12
  const m = el.model;
13
13
  el.style.backgroundImage = `url(${m.source})`;
14
14
  el.style.backgroundSize = "contain";
@@ -8,7 +8,7 @@ export function Spinner(declaration) {
8
8
  var _a;
9
9
  (_a = el.model) !== null && _a !== void 0 ? _a : (el.model = composeSpinnerModel());
10
10
  },
11
- content: el => {
11
+ script: el => {
12
12
  const m = el.model;
13
13
  m.active && Note("loading...");
14
14
  },
@@ -1,4 +1,4 @@
1
- import { Transaction, ReactiveNodeVariable, Isolation } from "reactronic";
1
+ import { apply, ReactiveNodeVariable, Isolation } from "reactronic";
2
2
  import { DefaultButtonStyling } from "./theme/Button.s.js";
3
3
  import { DefaultFieldStyling } from "./theme/Field.s.js";
4
4
  import { DefaultIconStyling } from "./theme/Icon.s.js";
@@ -27,4 +27,4 @@ export class Theme {
27
27
  Theme.gCurrent.value = value;
28
28
  }
29
29
  }
30
- Theme.gCurrent = new ReactiveNodeVariable(Transaction.run({ isolation: Isolation.disjoinFromOuterTransaction }, () => new Theme()));
30
+ Theme.gCurrent = new ReactiveNodeVariable(apply({ isolation: Isolation.disjoinFromOuterTransaction }, () => new Theme()));
@@ -1,5 +1,5 @@
1
- import { Transaction, Mode, ReactiveNode } from "reactronic";
2
- import { Panel, Note } from "verstak";
1
+ import { Mode, ReactiveNode } from "reactronic";
2
+ import { Panel, Note, OnClick } from "verstak";
3
3
  import { observableModel } from "./common/Utils.js";
4
4
  import { Theme } from "./Theme.js";
5
5
  import { Icon } from "./Icon.v.js";
@@ -13,28 +13,31 @@ export function Toggle(declaration) {
13
13
  checked: true,
14
14
  color: "green"
15
15
  }));
16
- el.native.onclick = () => Transaction.run(null, () => el.model.checked = !el.model.checked);
17
16
  },
18
- content: el => {
17
+ script: el => {
19
18
  const m = el.model;
20
19
  const theme = Theme.current;
21
20
  const toggleTheme = theme.toggle;
22
21
  el.useStylingPreset(toggleTheme.main);
23
22
  Icon(`fa-solid fa-toggle-${m.checked ? "on" : "off"}`, {
24
- content: (el, base) => {
23
+ script: (el, base) => {
25
24
  var _a;
26
25
  base();
27
26
  el.useStylingPreset(toggleTheme.icon);
28
27
  el.style.color = m.checked ? ((_a = theme.positiveColor) !== null && _a !== void 0 ? _a : "") : "";
29
28
  },
30
29
  });
31
- if (m.label)
30
+ if (m.label) {
32
31
  Note(m.label, false, {
33
- content: (el, base) => {
32
+ script: (el, base) => {
34
33
  base();
35
34
  el.useStylingPreset(toggleTheme.label);
36
35
  },
37
36
  });
37
+ }
38
+ OnClick(el.native, () => {
39
+ el.model.checked = !el.model.checked;
40
+ });
38
41
  },
39
42
  })));
40
43
  }
@@ -1,6 +1,6 @@
1
- import { ObservableObject, Ref, Transaction, Isolation } from "reactronic";
1
+ import { ObservableObject, Ref, apply, Isolation } from "reactronic";
2
2
  export function observableModel(modelProps) {
3
- return Transaction.run({ isolation: Isolation.disjoinFromOuterTransaction }, () => new ObservableComposition(modelProps));
3
+ return apply({ isolation: Isolation.disjoinFromOuterTransaction }, () => new ObservableComposition(modelProps));
4
4
  }
5
5
  class ObservableComposition extends ObservableObject {
6
6
  constructor(composition) {
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
- import { cached } from "reactronic";
10
+ import { cache } from "reactronic";
11
11
  import { css } from "@emotion/css";
12
12
  import { Styling } from "./Styling.js";
13
13
  export class DefaultButtonStyling extends Styling {
@@ -33,17 +33,17 @@ export class DefaultButtonStyling extends Styling {
33
33
  }
34
34
  }
35
35
  __decorate([
36
- cached,
36
+ cache,
37
37
  __metadata("design:type", String),
38
38
  __metadata("design:paramtypes", [])
39
39
  ], DefaultButtonStyling.prototype, "main", null);
40
40
  __decorate([
41
- cached,
41
+ cache,
42
42
  __metadata("design:type", String),
43
43
  __metadata("design:paramtypes", [])
44
44
  ], DefaultButtonStyling.prototype, "icon", null);
45
45
  __decorate([
46
- cached,
46
+ cache,
47
47
  __metadata("design:type", String),
48
48
  __metadata("design:paramtypes", [])
49
49
  ], DefaultButtonStyling.prototype, "label", null);
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
- import { cached } from "reactronic";
10
+ import { cache } from "reactronic";
11
11
  import { css } from "@emotion/css";
12
12
  import { Styling } from "./Styling.js";
13
13
  export class DefaultFieldStyling extends Styling {
@@ -47,22 +47,22 @@ export class DefaultFieldStyling extends Styling {
47
47
  }
48
48
  }
49
49
  __decorate([
50
- cached,
50
+ cache,
51
51
  __metadata("design:type", String),
52
52
  __metadata("design:paramtypes", [])
53
53
  ], DefaultFieldStyling.prototype, "main", null);
54
54
  __decorate([
55
- cached,
55
+ cache,
56
56
  __metadata("design:type", String),
57
57
  __metadata("design:paramtypes", [])
58
58
  ], DefaultFieldStyling.prototype, "icon", null);
59
59
  __decorate([
60
- cached,
60
+ cache,
61
61
  __metadata("design:type", String),
62
62
  __metadata("design:paramtypes", [])
63
63
  ], DefaultFieldStyling.prototype, "input", null);
64
64
  __decorate([
65
- cached,
65
+ cache,
66
66
  __metadata("design:type", String),
67
67
  __metadata("design:paramtypes", [])
68
68
  ], DefaultFieldStyling.prototype, "popup", null);
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
- import { cached } from "reactronic";
10
+ import { cache } from "reactronic";
11
11
  import { css } from "@emotion/css";
12
12
  import { Styling } from "./Styling.js";
13
13
  export class DefaultIconStyling extends Styling {
@@ -20,7 +20,7 @@ export class DefaultIconStyling extends Styling {
20
20
  }
21
21
  }
22
22
  __decorate([
23
- cached,
23
+ cache,
24
24
  __metadata("design:type", String),
25
25
  __metadata("design:paramtypes", [])
26
26
  ], DefaultIconStyling.prototype, "main", null);
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
- import { ObservableObject, raw } from "reactronic";
10
+ import { ObservableObject, unobservable } from "reactronic";
11
11
  export class Styling extends ObservableObject {
12
12
  constructor($) {
13
13
  super();
@@ -15,6 +15,6 @@ export class Styling extends ObservableObject {
15
15
  }
16
16
  }
17
17
  __decorate([
18
- raw,
18
+ unobservable,
19
19
  __metadata("design:type", Object)
20
20
  ], Styling.prototype, "$", void 0);
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
- import { cached } from "reactronic";
10
+ import { cache } from "reactronic";
11
11
  import { css } from "@emotion/css";
12
12
  import { Styling } from "./Styling.js";
13
13
  export class DefaultToggleStyling extends Styling {
@@ -32,17 +32,17 @@ export class DefaultToggleStyling extends Styling {
32
32
  }
33
33
  }
34
34
  __decorate([
35
- cached,
35
+ cache,
36
36
  __metadata("design:type", String),
37
37
  __metadata("design:paramtypes", [])
38
38
  ], DefaultToggleStyling.prototype, "main", null);
39
39
  __decorate([
40
- cached,
40
+ cache,
41
41
  __metadata("design:type", String),
42
42
  __metadata("design:paramtypes", [])
43
43
  ], DefaultToggleStyling.prototype, "icon", null);
44
44
  __decorate([
45
- cached,
45
+ cache,
46
46
  __metadata("design:type", String),
47
47
  __metadata("design:paramtypes", [])
48
48
  ], DefaultToggleStyling.prototype, "label", null);
@@ -4,7 +4,7 @@ import { Handling } from "../core/Elements.js";
4
4
  export function DraggableArea(draggingId, builder) {
5
5
  return (Div(ReactiveNode.withBasis(builder, {
6
6
  mode: Mode.autonomous,
7
- content: b => {
7
+ script: b => {
8
8
  const e = b.native;
9
9
  const model = b.model;
10
10
  const dataForSensor = e.dataForSensor;