verstak 0.22.412 → 0.22.503
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 +3 -2
- package/build/dist/source/api.d.ts +2 -2
- package/build/dist/source/api.js +2 -2
- package/build/dist/source/archive/RxDomV1.d.ts +1 -1
- package/build/dist/source/archive/RxDomV1.js +13 -13
- package/build/dist/source/core/Allocator.d.ts +64 -0
- package/build/dist/source/core/Allocator.js +141 -0
- package/build/dist/source/core/CellRange.d.ts +8 -0
- package/build/dist/source/core/CellRange.js +173 -0
- package/build/dist/source/core/Kernel.d.ts +77 -0
- package/build/dist/source/core/Kernel.js +504 -0
- package/build/dist/source/core/Restyler.d.ts +2 -2
- package/build/dist/source/core/Restyler.js +4 -4
- package/build/dist/source/core/api.d.ts +5 -4
- package/build/dist/source/core/api.js +5 -4
- package/build/dist/source/html/Blocks.d.ts +14 -0
- package/build/dist/source/html/Blocks.js +124 -0
- package/build/dist/source/html/HtmlApiExt.d.ts +1 -1
- package/build/dist/source/html/HtmlApiExt.js +3 -3
- package/build/dist/source/html/HtmlBlocks.d.ts +175 -0
- package/build/dist/source/html/HtmlBlocks.js +356 -0
- package/build/dist/source/html/HtmlDriver.d.ts +20 -0
- package/build/dist/source/html/{HtmlNodeFactory.js → HtmlDriver.js} +36 -34
- package/build/dist/source/html/ReactingFocuser.d.ts +2 -0
- package/build/dist/source/html/ReactingFocuser.js +16 -0
- package/build/dist/source/html/api.d.ts +18 -18
- package/build/dist/source/html/api.js +18 -18
- package/build/dist/source/html/sensors/BasePointerSensor.d.ts +4 -4
- package/build/dist/source/html/sensors/BasePointerSensor.js +2 -2
- package/build/dist/source/html/sensors/ButtonSensor.d.ts +3 -3
- package/build/dist/source/html/sensors/ButtonSensor.js +17 -17
- package/build/dist/source/html/sensors/DataForSensor.js +6 -6
- package/build/dist/source/html/sensors/FocusSensor.d.ts +3 -3
- package/build/dist/source/html/sensors/FocusSensor.js +27 -27
- package/build/dist/source/html/sensors/HoverSensor.d.ts +1 -1
- package/build/dist/source/html/sensors/HoverSensor.js +9 -9
- package/build/dist/source/html/sensors/HtmlDragSensor.d.ts +6 -6
- package/build/dist/source/html/sensors/HtmlDragSensor.js +28 -28
- package/build/dist/source/html/sensors/HtmlElementSensor.d.ts +3 -3
- package/build/dist/source/html/sensors/HtmlElementSensor.js +4 -4
- package/build/dist/source/html/sensors/HtmlSensors.d.ts +9 -9
- package/build/dist/source/html/sensors/HtmlSensors.js +10 -10
- package/build/dist/source/html/sensors/KeyboardSensor.d.ts +1 -1
- package/build/dist/source/html/sensors/KeyboardSensor.js +18 -18
- package/build/dist/source/html/sensors/PointerSensor.d.ts +4 -4
- package/build/dist/source/html/sensors/PointerSensor.js +20 -20
- package/build/dist/source/html/sensors/ResizeSensor.d.ts +3 -3
- package/build/dist/source/html/sensors/ResizeSensor.js +5 -5
- package/build/dist/source/html/sensors/Sensor.d.ts +1 -1
- package/build/dist/source/html/sensors/Sensor.js +1 -1
- package/build/dist/source/html/sensors/WheelSensor.d.ts +1 -1
- package/build/dist/source/html/sensors/WheelSensor.js +7 -7
- package/build/dist/source/html/sensors/WindowSensor.d.ts +2 -2
- package/build/dist/source/html/sensors/WindowSensor.js +5 -5
- package/package.json +8 -8
- package/build/dist/source/core/Elements.d.ts +0 -4
- package/build/dist/source/core/Elements.js +0 -7
- package/build/dist/source/core/RxNode.d.ts +0 -59
- package/build/dist/source/core/RxNode.js +0 -426
- package/build/dist/source/html/CellRange.d.ts +0 -11
- package/build/dist/source/html/CellRange.js +0 -175
- package/build/dist/source/html/HtmlElements.d.ts +0 -349
- package/build/dist/source/html/HtmlElements.js +0 -529
- package/build/dist/source/html/HtmlNodeFactory.d.ts +0 -19
- package/build/dist/source/html/RxFocuser.d.ts +0 -2
- package/build/dist/source/html/RxFocuser.js +0 -11
|
@@ -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 { options, sensitive, transactional, LoggingLevel } from
|
|
11
|
-
import { grabElementDataList, SymDataForSensor } from
|
|
12
|
-
import { HtmlElementSensor } from
|
|
10
|
+
import { options, sensitive, transactional, LoggingLevel } from "reactronic";
|
|
11
|
+
import { grabElementDataList, SymDataForSensor } from "./DataForSensor";
|
|
12
|
+
import { HtmlElementSensor } from "./HtmlElementSensor";
|
|
13
13
|
export var KeyboardModifiers;
|
|
14
14
|
(function (KeyboardModifiers) {
|
|
15
15
|
KeyboardModifiers[KeyboardModifiers["None"] = 0] = "None";
|
|
@@ -31,29 +31,29 @@ export var KeyboardModifiers;
|
|
|
31
31
|
export class KeyboardSensor extends HtmlElementSensor {
|
|
32
32
|
constructor() {
|
|
33
33
|
super();
|
|
34
|
-
this.down =
|
|
35
|
-
this.up =
|
|
34
|
+
this.down = "";
|
|
35
|
+
this.up = "";
|
|
36
36
|
this.modifiers = KeyboardModifiers.None;
|
|
37
37
|
}
|
|
38
38
|
listen(element, enabled = true) {
|
|
39
39
|
const existing = this.sourceElement;
|
|
40
40
|
if (element !== existing) {
|
|
41
41
|
if (existing) {
|
|
42
|
-
existing.removeEventListener(
|
|
43
|
-
existing.removeEventListener(
|
|
42
|
+
existing.removeEventListener("keydown", this.onKeyDown.bind(this), { capture: true });
|
|
43
|
+
existing.removeEventListener("keyup", this.onKeyUp.bind(this), { capture: true });
|
|
44
44
|
}
|
|
45
45
|
this.sourceElement = element;
|
|
46
46
|
if (element && enabled) {
|
|
47
|
-
element.addEventListener(
|
|
48
|
-
element.addEventListener(
|
|
47
|
+
element.addEventListener("keydown", this.onKeyDown.bind(this), { capture: true });
|
|
48
|
+
element.addEventListener("keyup", this.onKeyUp.bind(this), { capture: true });
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
reset() {
|
|
53
53
|
this.preventDefault = false;
|
|
54
54
|
this.stopPropagation = false;
|
|
55
|
-
this.down =
|
|
56
|
-
this.up =
|
|
55
|
+
this.down = "";
|
|
56
|
+
this.up = "";
|
|
57
57
|
this.modifiers = KeyboardModifiers.None;
|
|
58
58
|
}
|
|
59
59
|
onKeyDown(e) {
|
|
@@ -66,31 +66,31 @@ export class KeyboardSensor extends HtmlElementSensor {
|
|
|
66
66
|
}
|
|
67
67
|
keyDown(e) {
|
|
68
68
|
this.updateSensorData(e);
|
|
69
|
-
this.up =
|
|
69
|
+
this.up = "";
|
|
70
70
|
sensitive(true, () => this.down = e.key);
|
|
71
71
|
}
|
|
72
72
|
keyUp(e) {
|
|
73
73
|
this.updateSensorData(e);
|
|
74
|
-
this.down =
|
|
74
|
+
this.down = "";
|
|
75
75
|
sensitive(true, () => this.up = e.key);
|
|
76
76
|
}
|
|
77
77
|
updateSensorData(e) {
|
|
78
78
|
this.preventDefault = false;
|
|
79
79
|
this.stopPropagation = false;
|
|
80
80
|
const path = e.composedPath();
|
|
81
|
-
this.elementDataList = grabElementDataList(path, SymDataForSensor,
|
|
81
|
+
this.elementDataList = grabElementDataList(path, SymDataForSensor, "keyboard", this.elementDataList).dataList;
|
|
82
82
|
this.modifiers = extractModifierKeys(e);
|
|
83
83
|
this.revision++;
|
|
84
84
|
}
|
|
85
85
|
static getKeyAsModifierIfAny(key) {
|
|
86
86
|
let modifier = KeyboardModifiers.None;
|
|
87
|
-
if (key ===
|
|
87
|
+
if (key === "Control")
|
|
88
88
|
modifier = KeyboardModifiers.Ctrl;
|
|
89
|
-
else if (key ===
|
|
89
|
+
else if (key === "Shift")
|
|
90
90
|
modifier = KeyboardModifiers.Shift;
|
|
91
|
-
else if (key ===
|
|
91
|
+
else if (key === "Alt")
|
|
92
92
|
modifier = KeyboardModifiers.Alt;
|
|
93
|
-
else if (key ===
|
|
93
|
+
else if (key === "Meta")
|
|
94
94
|
modifier = KeyboardModifiers.Meta;
|
|
95
95
|
return modifier;
|
|
96
96
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { PointerButton, BasePointerSensor } from
|
|
2
|
-
import { FocusSensor } from
|
|
3
|
-
import { KeyboardModifiers } from
|
|
4
|
-
import { WindowSensor } from
|
|
1
|
+
import { PointerButton, BasePointerSensor } from "./BasePointerSensor";
|
|
2
|
+
import { FocusSensor } from "./FocusSensor";
|
|
3
|
+
import { KeyboardModifiers } from "./KeyboardSensor";
|
|
4
|
+
import { WindowSensor } from "./WindowSensor";
|
|
5
5
|
export declare class PointerSensor extends BasePointerSensor {
|
|
6
6
|
pointerButton: PointerButton;
|
|
7
7
|
private clickable;
|
|
@@ -7,10 +7,10 @@ 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 { options, reactive, Reentrance, transactional, raw, Transaction, LoggingLevel } from
|
|
11
|
-
import { extractPointerButton, isPointerButtonDown, PointerButton, BasePointerSensor } from
|
|
12
|
-
import { findTargetElementData, SymDataForSensor } from
|
|
13
|
-
import { extractModifierKeys, KeyboardModifiers } from
|
|
10
|
+
import { options, reactive, Reentrance, transactional, raw, Transaction, LoggingLevel } from "reactronic";
|
|
11
|
+
import { extractPointerButton, isPointerButtonDown, PointerButton, BasePointerSensor } from "./BasePointerSensor";
|
|
12
|
+
import { findTargetElementData, SymDataForSensor } from "./DataForSensor";
|
|
13
|
+
import { extractModifierKeys, KeyboardModifiers } from "./KeyboardSensor";
|
|
14
14
|
export class PointerSensor extends BasePointerSensor {
|
|
15
15
|
constructor(focusSensor, windowSensor) {
|
|
16
16
|
super(focusSensor, windowSensor);
|
|
@@ -55,19 +55,19 @@ export class PointerSensor extends BasePointerSensor {
|
|
|
55
55
|
const existing = this.sourceElement;
|
|
56
56
|
if (element !== existing) {
|
|
57
57
|
if (existing) {
|
|
58
|
-
existing.removeEventListener(
|
|
59
|
-
existing.removeEventListener(
|
|
60
|
-
existing.removeEventListener(
|
|
61
|
-
existing.removeEventListener(
|
|
62
|
-
existing.removeEventListener(
|
|
58
|
+
existing.removeEventListener("pointerdown", this.onPointerDown.bind(this), { capture: true });
|
|
59
|
+
existing.removeEventListener("pointermove", this.onPointerMove.bind(this), { capture: true });
|
|
60
|
+
existing.removeEventListener("pointerup", this.onPointerUp.bind(this), { capture: true });
|
|
61
|
+
existing.removeEventListener("lostpointercapture", this.onLostPointerCapture.bind(this), { capture: true });
|
|
62
|
+
existing.removeEventListener("keydown", this.onKeyDown.bind(this), { capture: true });
|
|
63
63
|
}
|
|
64
64
|
this.sourceElement = element;
|
|
65
65
|
if (element && enabled) {
|
|
66
|
-
element.addEventListener(
|
|
67
|
-
element.addEventListener(
|
|
68
|
-
element.addEventListener(
|
|
69
|
-
element.addEventListener(
|
|
70
|
-
element.addEventListener(
|
|
66
|
+
element.addEventListener("pointerdown", this.onPointerDown.bind(this), { capture: true });
|
|
67
|
+
element.addEventListener("pointermove", this.onPointerMove.bind(this), { capture: true });
|
|
68
|
+
element.addEventListener("pointerup", this.onPointerUp.bind(this), { capture: true });
|
|
69
|
+
element.addEventListener("lostpointercapture", this.onLostPointerCapture.bind(this), { capture: true });
|
|
70
|
+
element.addEventListener("keydown", this.onKeyDown.bind(this), { capture: true });
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
}
|
|
@@ -124,7 +124,7 @@ export class PointerSensor extends BasePointerSensor {
|
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
onKeyDown(e) {
|
|
127
|
-
if (e.key ===
|
|
127
|
+
if (e.key === "Escape" && (this.dragStarted || this.clickable)) {
|
|
128
128
|
this.cancelDragging();
|
|
129
129
|
this.reset();
|
|
130
130
|
}
|
|
@@ -139,7 +139,7 @@ export class PointerSensor extends BasePointerSensor {
|
|
|
139
139
|
this.stopPropagation = false;
|
|
140
140
|
const targetPath = e.composedPath();
|
|
141
141
|
const underPointer = document.elementsFromPoint(e.clientX, e.clientY);
|
|
142
|
-
const { data, window } = findTargetElementData(targetPath, underPointer, SymDataForSensor, [
|
|
142
|
+
const { data, window } = findTargetElementData(targetPath, underPointer, SymDataForSensor, ["click", "draggable"]);
|
|
143
143
|
const clickable = data === null || data === void 0 ? void 0 : data.click;
|
|
144
144
|
const draggable = data === null || data === void 0 ? void 0 : data.draggable;
|
|
145
145
|
if (clickable || draggable) {
|
|
@@ -147,7 +147,7 @@ export class PointerSensor extends BasePointerSensor {
|
|
|
147
147
|
this.clicking = clickable;
|
|
148
148
|
this.draggableData = draggable;
|
|
149
149
|
this.tryingDragging = draggable !== undefined;
|
|
150
|
-
this.dragSource = (_a = findTargetElementData(targetPath, underPointer, SymDataForSensor, [
|
|
150
|
+
this.dragSource = (_a = findTargetElementData(targetPath, underPointer, SymDataForSensor, ["drag"], true).data) === null || _a === void 0 ? void 0 : _a.drag;
|
|
151
151
|
this.pointerButton = extractPointerButton(e);
|
|
152
152
|
this.startX = e.clientX;
|
|
153
153
|
this.startY = e.clientY;
|
|
@@ -160,7 +160,7 @@ export class PointerSensor extends BasePointerSensor {
|
|
|
160
160
|
this.previousDragTarget = undefined;
|
|
161
161
|
Transaction.separate(() => {
|
|
162
162
|
var _a;
|
|
163
|
-
(_a = this.windowSensor) === null || _a === void 0 ? void 0 : _a.setActiveWindow(window,
|
|
163
|
+
(_a = this.windowSensor) === null || _a === void 0 ? void 0 : _a.setActiveWindow(window, "pointer");
|
|
164
164
|
});
|
|
165
165
|
}
|
|
166
166
|
this.revision++;
|
|
@@ -248,7 +248,7 @@ export class PointerSensor extends BasePointerSensor {
|
|
|
248
248
|
var _a;
|
|
249
249
|
const targetPath = e.composedPath();
|
|
250
250
|
const underPointer = document.elementsFromPoint(e.clientX, e.clientY);
|
|
251
|
-
const clickable = (_a = findTargetElementData(targetPath, underPointer, SymDataForSensor, [
|
|
251
|
+
const clickable = (_a = findTargetElementData(targetPath, underPointer, SymDataForSensor, ["click"]).data) === null || _a === void 0 ? void 0 : _a.click;
|
|
252
252
|
const isSameClickable = this.clickable === clickable;
|
|
253
253
|
if (isSameClickable)
|
|
254
254
|
this.clicking = clickable;
|
|
@@ -260,7 +260,7 @@ export class PointerSensor extends BasePointerSensor {
|
|
|
260
260
|
updateDragTarget(e) {
|
|
261
261
|
const targetPath = e.composedPath();
|
|
262
262
|
const underPointer = document.elementsFromPoint(e.clientX, e.clientY);
|
|
263
|
-
const { data, window } = findTargetElementData(targetPath, underPointer, SymDataForSensor, [
|
|
263
|
+
const { data, window } = findTargetElementData(targetPath, underPointer, SymDataForSensor, ["drag"]);
|
|
264
264
|
const dragTarget = data === null || data === void 0 ? void 0 : data.drag;
|
|
265
265
|
if (dragTarget !== this.dragTarget) {
|
|
266
266
|
this.previousDragTarget = this.dragTarget;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Sensor } from
|
|
1
|
+
import { VBlock } from "../../core/api";
|
|
2
|
+
import { Sensor } from "./Sensor";
|
|
3
3
|
export interface ResizedElement {
|
|
4
4
|
readonly borderBoxSize: ReadonlyArray<ResizeObserverSize>;
|
|
5
5
|
readonly contentBoxSize: ReadonlyArray<ResizeObserverSize>;
|
|
@@ -11,7 +11,7 @@ export declare class ResizeSensor extends Sensor {
|
|
|
11
11
|
resizedElements: Array<ResizedElement>;
|
|
12
12
|
constructor();
|
|
13
13
|
reset(): void;
|
|
14
|
-
observeResizing(
|
|
14
|
+
observeResizing(block: VBlock<any, any, any>, value: boolean, boxSizing?: ResizeObserverBoxOptions): void;
|
|
15
15
|
protected onResize(entries: Array<ResizeObserverEntry>): void;
|
|
16
16
|
protected resize(entries: Array<ResizeObserverEntry>): void;
|
|
17
17
|
protected doReset(): void;
|
|
@@ -7,8 +7,8 @@ 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 { options, transactional, LoggingLevel } from
|
|
11
|
-
import { Sensor } from
|
|
10
|
+
import { options, transactional, LoggingLevel } from "reactronic";
|
|
11
|
+
import { Sensor } from "./Sensor";
|
|
12
12
|
export class ResizeSensor extends Sensor {
|
|
13
13
|
constructor() {
|
|
14
14
|
super();
|
|
@@ -18,8 +18,8 @@ export class ResizeSensor extends Sensor {
|
|
|
18
18
|
reset() {
|
|
19
19
|
this.doReset();
|
|
20
20
|
}
|
|
21
|
-
observeResizing(
|
|
22
|
-
const native =
|
|
21
|
+
observeResizing(block, value, boxSizing = "content-box") {
|
|
22
|
+
const native = block.native;
|
|
23
23
|
if (native instanceof Element) {
|
|
24
24
|
if (value) {
|
|
25
25
|
if (native.resizeObserver !== undefined && native.resizeObserver !== this.observer)
|
|
@@ -35,7 +35,7 @@ export class ResizeSensor extends Sensor {
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
else
|
|
38
|
-
throw new Error(
|
|
38
|
+
throw new Error("cannot observe resizing of non-HTML block");
|
|
39
39
|
}
|
|
40
40
|
onResize(entries) {
|
|
41
41
|
this.resize(entries);
|
|
@@ -7,10 +7,10 @@ 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 { options, Reentrance, transactional, LoggingLevel } from
|
|
11
|
-
import { findTargetElementData, SymDataForSensor } from
|
|
12
|
-
import { extractModifierKeys, KeyboardModifiers } from
|
|
13
|
-
import { BasePointerSensor } from
|
|
10
|
+
import { options, Reentrance, transactional, LoggingLevel } from "reactronic";
|
|
11
|
+
import { findTargetElementData, SymDataForSensor } from "./DataForSensor";
|
|
12
|
+
import { extractModifierKeys, KeyboardModifiers } from "./KeyboardSensor";
|
|
13
|
+
import { BasePointerSensor } from "./BasePointerSensor";
|
|
14
14
|
export class WheelSensor extends BasePointerSensor {
|
|
15
15
|
constructor() {
|
|
16
16
|
super();
|
|
@@ -23,11 +23,11 @@ export class WheelSensor extends BasePointerSensor {
|
|
|
23
23
|
const existing = this.sourceElement;
|
|
24
24
|
if (element !== existing) {
|
|
25
25
|
if (existing) {
|
|
26
|
-
existing.removeEventListener(
|
|
26
|
+
existing.removeEventListener("wheel", this.onWheel.bind(this), { capture: true });
|
|
27
27
|
}
|
|
28
28
|
this.sourceElement = element;
|
|
29
29
|
if (element && enabled) {
|
|
30
|
-
element.addEventListener(
|
|
30
|
+
element.addEventListener("wheel", this.onWheel.bind(this), { capture: true, passive: true });
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
}
|
|
@@ -56,7 +56,7 @@ export class WheelSensor extends BasePointerSensor {
|
|
|
56
56
|
this.stopPropagation = false;
|
|
57
57
|
const targetPath = e.composedPath();
|
|
58
58
|
const underPointer = document.elementsFromPoint(e.clientX, e.clientY);
|
|
59
|
-
this.target = (_a = findTargetElementData(targetPath, underPointer, SymDataForSensor, [
|
|
59
|
+
this.target = (_a = findTargetElementData(targetPath, underPointer, SymDataForSensor, ["wheel"]).data) === null || _a === void 0 ? void 0 : _a.wheel;
|
|
60
60
|
this.modifiers = extractModifierKeys(e);
|
|
61
61
|
this.positionX = e.clientX;
|
|
62
62
|
this.positionY = e.clientY;
|
|
@@ -7,19 +7,19 @@ 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 { ToggleRef, transactional } from
|
|
11
|
-
import { objectHasMember } from
|
|
12
|
-
import { Sensor } from
|
|
10
|
+
import { ToggleRef, transactional } from "reactronic";
|
|
11
|
+
import { objectHasMember } from "../../core/Utils";
|
|
12
|
+
import { Sensor } from "./Sensor";
|
|
13
13
|
export class WindowSensor extends Sensor {
|
|
14
14
|
constructor() {
|
|
15
15
|
super(...arguments);
|
|
16
16
|
this.activeData = undefined;
|
|
17
17
|
this.previousActiveData = undefined;
|
|
18
18
|
}
|
|
19
|
-
setActiveWindow(window, debugHint =
|
|
19
|
+
setActiveWindow(window, debugHint = "") {
|
|
20
20
|
if (window !== this.activeData) {
|
|
21
21
|
const activeData = this.activeData;
|
|
22
|
-
if (activeData && objectHasMember(activeData,
|
|
22
|
+
if (activeData && objectHasMember(activeData, "popupToggle")) {
|
|
23
23
|
const popupToggle = activeData.popupToggle;
|
|
24
24
|
if (popupToggle instanceof ToggleRef) {
|
|
25
25
|
popupToggle.variable = popupToggle.valueOff;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "verstak",
|
|
3
|
-
"version": "0.22.
|
|
4
|
-
"description": "Verstak -
|
|
3
|
+
"version": "0.22.503",
|
|
4
|
+
"description": "Verstak - Front-End Library",
|
|
5
5
|
"publisher": "Nezaboodka Software",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"type": "module",
|
|
@@ -31,18 +31,18 @@
|
|
|
31
31
|
},
|
|
32
32
|
"homepage": "https://github.com/nezaboodka/verstak/blob/master/README.md#readme",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"reactronic": "^0.22.
|
|
34
|
+
"reactronic": "^0.22.503"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@types/node": "18.7
|
|
38
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
39
|
-
"@typescript-eslint/parser": "5.
|
|
37
|
+
"@types/node": "18.11.7",
|
|
38
|
+
"@typescript-eslint/eslint-plugin": "5.41.0",
|
|
39
|
+
"@typescript-eslint/parser": "5.41.0",
|
|
40
40
|
"ava": "4.3.3",
|
|
41
41
|
"c8": "7.12.0",
|
|
42
|
-
"eslint": "8.
|
|
42
|
+
"eslint": "8.26.0",
|
|
43
43
|
"ts-node": "10.9.1",
|
|
44
44
|
"tsconfig-paths": "4.1.0",
|
|
45
|
-
"typescript": "4.8.
|
|
45
|
+
"typescript": "4.8.4"
|
|
46
46
|
},
|
|
47
47
|
"scripts": {
|
|
48
48
|
"build": "eslint source/**/*.ts test/**/*.ts && tsc",
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { Monitor, LoggingOptions } from 'reactronic';
|
|
2
|
-
import { RxNode, Render, NodeFactory, Priority } from './RxNode';
|
|
3
|
-
export declare function Reaction<E = undefined, M = unknown, R = void>(name: string, triggers: unknown, renderer: Render<E, M, R>, priority?: Priority, monitor?: Monitor, throttling?: number, logging?: Partial<LoggingOptions>, factory?: NodeFactory<E>): RxNode<E, M, R>;
|
|
4
|
-
export declare function Inline<E = undefined, M = unknown, R = void>(name: string, renderer: Render<E, M, R>, priority?: Priority, factory?: NodeFactory<E>): RxNode<E, M, R>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { RxNode } from './RxNode';
|
|
2
|
-
export function Reaction(name, triggers, renderer, priority, monitor, throttling, logging, factory) {
|
|
3
|
-
return RxNode.claim(name, triggers, false, renderer, priority, monitor, throttling, logging, factory);
|
|
4
|
-
}
|
|
5
|
-
export function Inline(name, renderer, priority, factory) {
|
|
6
|
-
return RxNode.claim(name, undefined, true, renderer, priority, undefined, undefined, undefined, factory);
|
|
7
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { Monitor, LoggingOptions, Item, CollectionReader } from 'reactronic';
|
|
2
|
-
export declare type Callback<E = unknown> = (element: E) => void;
|
|
3
|
-
export declare type Render<E = unknown, M = unknown, R = void> = (element: E, node: RxNode<E, M, R>) => R;
|
|
4
|
-
export declare type AsyncRender<E = unknown, M = unknown> = (element: E, node: RxNode<E, M, Promise<void>>) => Promise<void>;
|
|
5
|
-
export declare const enum Priority {
|
|
6
|
-
SyncP0 = 0,
|
|
7
|
-
AsyncP1 = 1,
|
|
8
|
-
AsyncP2 = 2
|
|
9
|
-
}
|
|
10
|
-
export declare abstract class RxNode<E = any, M = unknown, R = void> {
|
|
11
|
-
static currentRenderingPriority: Priority;
|
|
12
|
-
static readonly shortFrameDuration = 16;
|
|
13
|
-
static readonly longFrameDuration = 300;
|
|
14
|
-
static frameDuration: number;
|
|
15
|
-
abstract readonly name: string;
|
|
16
|
-
abstract readonly factory: NodeFactory<E>;
|
|
17
|
-
abstract readonly inline: boolean;
|
|
18
|
-
abstract readonly triggers: unknown;
|
|
19
|
-
abstract readonly renderer: Render<E, M, R>;
|
|
20
|
-
abstract readonly wrapper: Render<E, M, R> | undefined;
|
|
21
|
-
abstract readonly monitor?: Monitor;
|
|
22
|
-
abstract readonly throttling?: number;
|
|
23
|
-
abstract readonly logging?: Partial<LoggingOptions>;
|
|
24
|
-
abstract readonly priority: Priority;
|
|
25
|
-
abstract readonly shuffle: boolean;
|
|
26
|
-
abstract model?: M;
|
|
27
|
-
abstract readonly level: number;
|
|
28
|
-
abstract readonly parent: RxNode;
|
|
29
|
-
abstract readonly children: CollectionReader<RxNode>;
|
|
30
|
-
abstract readonly item: Item<RxNode> | undefined;
|
|
31
|
-
abstract readonly stamp: number;
|
|
32
|
-
abstract readonly element?: E;
|
|
33
|
-
render(): R;
|
|
34
|
-
get isInitialRendering(): boolean;
|
|
35
|
-
abstract wrapBy(renderer: Render<E, M, R> | undefined): this;
|
|
36
|
-
static root(render: () => void): void;
|
|
37
|
-
static get current(): RxNode;
|
|
38
|
-
static shuffleChildrenRendering(shuffle: boolean): void;
|
|
39
|
-
static renderChildrenThenDo(action: (error: unknown) => void): void;
|
|
40
|
-
static forAllNodesDo<E>(action: (e: E) => void): void;
|
|
41
|
-
static claim<E = undefined, M = unknown, R = void>(name: string, triggers: unknown, inline: boolean, renderer: Render<E, M, R>, priority?: Priority, monitor?: Monitor, throttling?: number, logging?: Partial<LoggingOptions>, factory?: NodeFactory<E>): RxNode<E, M, R>;
|
|
42
|
-
static getDefaultLoggingOptions(): LoggingOptions | undefined;
|
|
43
|
-
static setDefaultLoggingOptions(logging?: LoggingOptions): void;
|
|
44
|
-
}
|
|
45
|
-
export declare class NodeFactory<E> {
|
|
46
|
-
static readonly default: NodeFactory<any>;
|
|
47
|
-
readonly name: string;
|
|
48
|
-
readonly strict: boolean;
|
|
49
|
-
constructor(name: string, strict: boolean);
|
|
50
|
-
initialize(node: RxNode<E>, element: E | undefined): void;
|
|
51
|
-
finalize(node: RxNode<E>, isLeader: boolean): boolean;
|
|
52
|
-
arrange(node: RxNode<E>, strict: boolean): void;
|
|
53
|
-
render(node: RxNode<E>): void | Promise<void>;
|
|
54
|
-
}
|
|
55
|
-
export declare class StaticNodeFactory<E> extends NodeFactory<E> {
|
|
56
|
-
readonly element: E;
|
|
57
|
-
constructor(name: string, sequential: boolean, element: E);
|
|
58
|
-
initialize(node: RxNode<E>, element: E | undefined): void;
|
|
59
|
-
}
|