verstak 0.23.113 → 0.23.115
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/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 +1 -1
- package/build/dist/source/core/Interfaces.d.ts +3 -3
- package/build/dist/source/core/Utils.d.ts +1 -1
- package/build/dist/source/core/Utils.js +1 -1
- package/build/dist/source/core/Verstak.d.ts +5 -5
- package/build/dist/source/core/Verstak.js +49 -49
- package/build/dist/source/core/api.d.ts +4 -4
- package/build/dist/source/core/api.js +4 -4
- package/build/dist/source/html/Blocks.d.ts +4 -4
- package/build/dist/source/html/Blocks.js +7 -7
- package/build/dist/source/html/HtmlApiExt.d.ts +1 -1
- package/build/dist/source/html/HtmlApiExt.js +1 -1
- package/build/dist/source/html/HtmlBlocks.d.ts +1 -1
- package/build/dist/source/html/HtmlBlocks.js +2 -2
- package/build/dist/source/html/HtmlDriver.d.ts +2 -2
- package/build/dist/source/html/HtmlDriver.js +4 -4
- package/build/dist/source/html/ReactingFocuser.d.ts +1 -1
- package/build/dist/source/html/ReactingFocuser.js +2 -2
- 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 +3 -3
- package/build/dist/source/html/sensors/FocusSensor.d.ts +2 -2
- package/build/dist/source/html/sensors/FocusSensor.js +3 -3
- package/build/dist/source/html/sensors/HoverSensor.d.ts +1 -1
- package/build/dist/source/html/sensors/HoverSensor.js +3 -3
- package/build/dist/source/html/sensors/HtmlDragSensor.d.ts +4 -4
- package/build/dist/source/html/sensors/HtmlDragSensor.js +3 -3
- package/build/dist/source/html/sensors/HtmlElementSensor.d.ts +3 -3
- package/build/dist/source/html/sensors/HtmlElementSensor.js +3 -3
- package/build/dist/source/html/sensors/HtmlSensors.d.ts +9 -9
- package/build/dist/source/html/sensors/HtmlSensors.js +9 -9
- package/build/dist/source/html/sensors/KeyboardSensor.d.ts +1 -1
- package/build/dist/source/html/sensors/KeyboardSensor.js +2 -2
- package/build/dist/source/html/sensors/PointerSensor.d.ts +4 -4
- package/build/dist/source/html/sensors/PointerSensor.js +3 -3
- package/build/dist/source/html/sensors/ResizeSensor.d.ts +2 -2
- package/build/dist/source/html/sensors/ResizeSensor.js +1 -1
- package/build/dist/source/html/sensors/WheelSensor.d.ts +1 -1
- package/build/dist/source/html/sensors/WheelSensor.js +3 -3
- package/build/dist/source/html/sensors/WindowSensor.d.ts +1 -1
- package/build/dist/source/html/sensors/WindowSensor.js +2 -2
- package/package.json +10 -10
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./core/api";
|
|
2
|
-
export * from "./html/api";
|
|
1
|
+
export * from "./core/api.js";
|
|
2
|
+
export * from "./html/api.js";
|
package/build/dist/source/api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./core/api";
|
|
2
|
-
export * from "./html/api";
|
|
1
|
+
export * from "./core/api.js";
|
|
2
|
+
export * from "./html/api.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Render, SuperRender, RxNodeType, RxNodeInstance, RxNode } from "./RxDomV1.Types";
|
|
1
|
+
import { Render, SuperRender, RxNodeType, RxNodeInstance, RxNode } from "./RxDomV1.Types.js";
|
|
2
2
|
export declare class BasicNodeType<E, O> implements RxNodeType<E, O> {
|
|
3
3
|
readonly name: string;
|
|
4
4
|
readonly sequential: boolean;
|
|
@@ -17,7 +17,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
17
17
|
});
|
|
18
18
|
};
|
|
19
19
|
import { reactive, nonreactive, Transaction, Rx, options, Reentrance } from "reactronic";
|
|
20
|
-
import { RxNode } from "./RxDomV1.Types";
|
|
20
|
+
import { RxNode } from "./RxDomV1.Types.js";
|
|
21
21
|
export class BasicNodeType {
|
|
22
22
|
constructor(name, sequential) {
|
|
23
23
|
this.name = name;
|
|
@@ -31,10 +31,10 @@ export interface Block<T = unknown, M = unknown, C = unknown, R = void> {
|
|
|
31
31
|
blockAlignment: Align;
|
|
32
32
|
contentWrapping: boolean;
|
|
33
33
|
overlayVisible: boolean | undefined;
|
|
34
|
-
|
|
34
|
+
rebuildPriority?: Priority;
|
|
35
35
|
childrenShuffling: boolean;
|
|
36
36
|
strictOrder: boolean;
|
|
37
|
-
readonly
|
|
37
|
+
readonly isInitialRebuild: boolean;
|
|
38
38
|
useStyle(styleName: string, enabled?: boolean): void;
|
|
39
39
|
configureReactronic(options: Partial<MemberOptions>): MemberOptions;
|
|
40
40
|
}
|
|
@@ -76,7 +76,7 @@ export interface Driver<T, C = unknown> {
|
|
|
76
76
|
}): void;
|
|
77
77
|
initialize(block: Block<T, unknown, C>): void;
|
|
78
78
|
mount(block: Block<T, unknown, C>): void;
|
|
79
|
-
|
|
79
|
+
rebuild(block: Block<T, unknown, C>): void | Promise<void>;
|
|
80
80
|
finalize(block: Block<T, unknown, C>, isLeader: boolean): boolean;
|
|
81
81
|
applyKind(block: Block<T, any, C, any>, value: BlockKind): void;
|
|
82
82
|
applyCoords(block: Block<T, any, C, any>, value: BlockCoords | undefined): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BlockCoords } from "./Interfaces";
|
|
1
|
+
import { BlockCoords } from "./Interfaces.js";
|
|
2
2
|
export declare function parseBlockCoords(text: string, result: BlockCoords): BlockCoords;
|
|
3
3
|
export declare function emitBlockCoords(value: BlockCoords): string;
|
|
4
4
|
export declare function emitLetters(n: number): string;
|
|
@@ -187,7 +187,7 @@ export function getCallerInfo(prefix) {
|
|
|
187
187
|
i = i >= 0 ? i + 2 : 5;
|
|
188
188
|
let caller = extractFunctionAndLocation(lines[i]);
|
|
189
189
|
let location = caller;
|
|
190
|
-
if (caller.func.endsWith(".
|
|
190
|
+
if (caller.func.endsWith(".rebuild")) {
|
|
191
191
|
i = i - 1;
|
|
192
192
|
caller = extractFunctionAndLocation(lines[i]);
|
|
193
193
|
location = extractFunctionAndLocation(lines[i + 1]);
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { LoggingOptions } from "reactronic";
|
|
2
|
-
import { BlockCoords, BlockKind, Priority, Align, BlockBuilder, Block, Driver, SimpleDelegate } from "./Interfaces";
|
|
2
|
+
import { BlockCoords, BlockKind, Priority, Align, BlockBuilder, Block, Driver, SimpleDelegate } from "./Interfaces.js";
|
|
3
3
|
export declare class Verstak {
|
|
4
4
|
static readonly shortFrameDuration = 16;
|
|
5
5
|
static readonly longFrameDuration = 300;
|
|
6
|
-
static
|
|
6
|
+
static currentRebuildPriority: Priority;
|
|
7
7
|
static frameDuration: number;
|
|
8
8
|
static claim<T = undefined, M = unknown, C = unknown, R = void>(driver: Driver<T>, builder?: BlockBuilder<T, M, C, R>, base?: BlockBuilder<T, M, C, R>): Block<T, M, C, R>;
|
|
9
9
|
static get block(): Block;
|
|
10
|
-
static
|
|
11
|
-
static
|
|
10
|
+
static triggerRebuild(block: Block<any, any, any, void>, triggers: unknown): void;
|
|
11
|
+
static rebuildNestedTreesThenDo(action: (error: unknown) => void): void;
|
|
12
12
|
static getDefaultLoggingOptions(): LoggingOptions | undefined;
|
|
13
13
|
static setDefaultLoggingOptions(logging?: LoggingOptions): void;
|
|
14
14
|
}
|
|
@@ -25,7 +25,7 @@ export declare class BaseDriver<T, C = unknown> implements Driver<T, C> {
|
|
|
25
25
|
}): void;
|
|
26
26
|
initialize(block: Block<T, unknown, C>): void;
|
|
27
27
|
mount(block: Block<T, unknown, C>): void;
|
|
28
|
-
|
|
28
|
+
rebuild(block: Block<T, unknown, C>): void | Promise<void>;
|
|
29
29
|
finalize(block: Block<T, unknown, C>, isLeader: boolean): boolean;
|
|
30
30
|
applyKind(block: Block<T, any, C, any>, value: BlockKind): void;
|
|
31
31
|
applyCoords(block: Block<T, any, C, any>, value: BlockCoords | undefined): void;
|
|
@@ -17,8 +17,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
17
17
|
});
|
|
18
18
|
};
|
|
19
19
|
import { reactive, nonreactive, Transaction, options, Reentrance, Rx, Collection, ObservableObject, raw } from "reactronic";
|
|
20
|
-
import { BlockKind, Priority, Mode, Align } from "./Interfaces";
|
|
21
|
-
import { emitLetters, equalBlockCoords, parseBlockCoords, getCallerInfo } from "./Utils";
|
|
20
|
+
import { BlockKind, Priority, Mode, Align } from "./Interfaces.js";
|
|
21
|
+
import { emitLetters, equalBlockCoords, parseBlockCoords, getCallerInfo } from "./Utils.js";
|
|
22
22
|
export class Verstak {
|
|
23
23
|
static claim(driver, builder, base) {
|
|
24
24
|
var _a;
|
|
@@ -37,7 +37,7 @@ export class Verstak {
|
|
|
37
37
|
if (((_a = last === null || last === void 0 ? void 0 : last.instance) === null || _a === void 0 ? void 0 : _a.node.driver) === driver)
|
|
38
38
|
ex = last;
|
|
39
39
|
}
|
|
40
|
-
ex !== null && ex !== void 0 ? ex : (ex = children.claim(key = key || generateKey(owner), undefined, "nested blocks can be declared inside
|
|
40
|
+
ex !== null && ex !== void 0 ? ex : (ex = children.claim(key = key || generateKey(owner), undefined, "nested blocks can be declared inside rebuild function only"));
|
|
41
41
|
if (ex) {
|
|
42
42
|
result = ex.instance;
|
|
43
43
|
const node = result.node;
|
|
@@ -56,7 +56,7 @@ export class Verstak {
|
|
|
56
56
|
else {
|
|
57
57
|
result = new BlockImpl(key || "", driver, owner, builder);
|
|
58
58
|
result.node.ties = Collection.createItem(result);
|
|
59
|
-
|
|
59
|
+
triggerRebuild(result.node.ties);
|
|
60
60
|
}
|
|
61
61
|
return result;
|
|
62
62
|
}
|
|
@@ -65,16 +65,16 @@ export class Verstak {
|
|
|
65
65
|
throw new Error("current block is undefined");
|
|
66
66
|
return gCurrent.instance;
|
|
67
67
|
}
|
|
68
|
-
static
|
|
68
|
+
static triggerRebuild(block, triggers) {
|
|
69
69
|
const b = block;
|
|
70
70
|
const builder = b.node.builder;
|
|
71
71
|
if (!triggersAreEqual(triggers, builder.triggers)) {
|
|
72
72
|
builder.triggers = triggers;
|
|
73
|
-
|
|
73
|
+
triggerRebuild(b.node.ties);
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
static
|
|
77
|
-
|
|
76
|
+
static rebuildNestedTreesThenDo(action) {
|
|
77
|
+
runRebuildNestedTreesThenDo(undefined, action);
|
|
78
78
|
}
|
|
79
79
|
static getDefaultLoggingOptions() {
|
|
80
80
|
return BlockImpl.logging;
|
|
@@ -85,7 +85,7 @@ export class Verstak {
|
|
|
85
85
|
}
|
|
86
86
|
Verstak.shortFrameDuration = 16;
|
|
87
87
|
Verstak.longFrameDuration = 300;
|
|
88
|
-
Verstak.
|
|
88
|
+
Verstak.currentRebuildPriority = Priority.Realtime;
|
|
89
89
|
Verstak.frameDuration = Verstak.longFrameDuration;
|
|
90
90
|
export class BaseDriver {
|
|
91
91
|
constructor(name, isRow, preset) {
|
|
@@ -108,8 +108,8 @@ export class BaseDriver {
|
|
|
108
108
|
}
|
|
109
109
|
mount(block) {
|
|
110
110
|
}
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
rebuild(block) {
|
|
112
|
+
chainedRebuild(block, block.node.builder);
|
|
113
113
|
}
|
|
114
114
|
finalize(block, isLeader) {
|
|
115
115
|
const b = block;
|
|
@@ -169,13 +169,13 @@ function chainedInitialize(block, bb) {
|
|
|
169
169
|
else if (base)
|
|
170
170
|
chainedInitialize(block, base);
|
|
171
171
|
}
|
|
172
|
-
function
|
|
173
|
-
const
|
|
172
|
+
function chainedRebuild(block, bb) {
|
|
173
|
+
const rebuild = bb.rebuild;
|
|
174
174
|
const base = bb.base;
|
|
175
|
-
if (
|
|
176
|
-
|
|
175
|
+
if (rebuild)
|
|
176
|
+
rebuild(block, base ? () => chainedRebuild(block, base) : NOP);
|
|
177
177
|
else if (base)
|
|
178
|
-
|
|
178
|
+
chainedRebuild(block, base);
|
|
179
179
|
}
|
|
180
180
|
function chainedFinalize(block, bb) {
|
|
181
181
|
const finalize = bb.finalize;
|
|
@@ -302,23 +302,23 @@ class BlockImpl {
|
|
|
302
302
|
this._contentWrapping = true;
|
|
303
303
|
this._overlayVisible = undefined;
|
|
304
304
|
this._hasStyles = false;
|
|
305
|
-
this.
|
|
305
|
+
this.rebuildPriority = Priority.Realtime;
|
|
306
306
|
this.childrenShuffling = false;
|
|
307
307
|
BlockImpl.grandBlockCount++;
|
|
308
308
|
if (this.isOn(Mode.PinpointRebuild))
|
|
309
309
|
BlockImpl.disposableBlockCount++;
|
|
310
310
|
}
|
|
311
|
-
|
|
312
|
-
|
|
311
|
+
rebuild(_triggers) {
|
|
312
|
+
rebuildNow(this.node.ties);
|
|
313
313
|
}
|
|
314
|
-
|
|
314
|
+
prepareForRebuild() {
|
|
315
315
|
this._area = undefined;
|
|
316
316
|
this._hasStyles = false;
|
|
317
317
|
}
|
|
318
318
|
isOn(mode) {
|
|
319
319
|
return (chainedMode(this.node.builder) & mode) === mode;
|
|
320
320
|
}
|
|
321
|
-
get
|
|
321
|
+
get isInitialRebuild() { return this.node.stamp === 2; }
|
|
322
322
|
get isAuxiliary() { return this.kind > BlockKind.Note; }
|
|
323
323
|
get isSection() { return this.kind === BlockKind.Section; }
|
|
324
324
|
get isTable() { return this.kind === BlockKind.Table; }
|
|
@@ -430,7 +430,7 @@ class BlockImpl {
|
|
|
430
430
|
configureReactronic(options) {
|
|
431
431
|
if (this.node.stamp !== 1 || !this.isOn(Mode.PinpointRebuild))
|
|
432
432
|
throw new Error("reactronic can be configured only for blocks with separate reaction mode and only inside initialize");
|
|
433
|
-
return Rx.getController(this.
|
|
433
|
+
return Rx.getController(this.rebuild).configure(options);
|
|
434
434
|
}
|
|
435
435
|
static get curr() {
|
|
436
436
|
if (!gCurrent)
|
|
@@ -498,7 +498,7 @@ __decorate([
|
|
|
498
498
|
__metadata("design:type", Function),
|
|
499
499
|
__metadata("design:paramtypes", [Object]),
|
|
500
500
|
__metadata("design:returntype", void 0)
|
|
501
|
-
], BlockImpl.prototype, "
|
|
501
|
+
], BlockImpl.prototype, "rebuild", null);
|
|
502
502
|
function getBlockKey(block) {
|
|
503
503
|
const node = block.node;
|
|
504
504
|
return node.stamp >= 0 ? node.key : undefined;
|
|
@@ -580,7 +580,7 @@ function getEffectiveBlockCoords(isRegularBlock, area, maxX, maxY, cursorPositio
|
|
|
580
580
|
throw new Error("relative layout requires sequential children");
|
|
581
581
|
return result;
|
|
582
582
|
}
|
|
583
|
-
function
|
|
583
|
+
function runRebuildNestedTreesThenDo(error, action) {
|
|
584
584
|
var _a;
|
|
585
585
|
const curr = BlockImpl.curr;
|
|
586
586
|
const owner = curr.instance;
|
|
@@ -604,10 +604,10 @@ function runUpdateNestedTreesThenDo(error, action) {
|
|
|
604
604
|
const block = item.instance;
|
|
605
605
|
const isRow = block.node.driver.isRow;
|
|
606
606
|
const host = isRow ? owner : hostingRow;
|
|
607
|
-
const p = (_a = block.
|
|
607
|
+
const p = (_a = block.rebuildPriority) !== null && _a !== void 0 ? _a : Priority.Realtime;
|
|
608
608
|
mounting = markToMountIfNecessary(mounting, host, item, children, sequential);
|
|
609
609
|
if (p === Priority.Realtime)
|
|
610
|
-
|
|
610
|
+
triggerRebuild(item);
|
|
611
611
|
else if (p === Priority.Normal)
|
|
612
612
|
p1 = push(item, p1);
|
|
613
613
|
else
|
|
@@ -616,7 +616,7 @@ function runUpdateNestedTreesThenDo(error, action) {
|
|
|
616
616
|
hostingRow = block;
|
|
617
617
|
}
|
|
618
618
|
if (!Transaction.isCanceled && (p1 !== undefined || p2 !== undefined))
|
|
619
|
-
promised =
|
|
619
|
+
promised = startIncrementalRebuild(curr, children, p1, p2).then(() => action(error), e => action(e));
|
|
620
620
|
}
|
|
621
621
|
}
|
|
622
622
|
finally {
|
|
@@ -639,34 +639,34 @@ function markToMountIfNecessary(mounting, host, ties, children, sequential) {
|
|
|
639
639
|
node.host = host;
|
|
640
640
|
return mounting;
|
|
641
641
|
}
|
|
642
|
-
function
|
|
642
|
+
function startIncrementalRebuild(owner, allChildren, priority1, priority2) {
|
|
643
643
|
return __awaiter(this, void 0, void 0, function* () {
|
|
644
644
|
const stamp = owner.instance.node.stamp;
|
|
645
645
|
if (priority1)
|
|
646
|
-
yield
|
|
646
|
+
yield rebuildIncrementally(owner, stamp, allChildren, priority1, Priority.Normal);
|
|
647
647
|
if (priority2)
|
|
648
|
-
yield
|
|
648
|
+
yield rebuildIncrementally(owner, stamp, allChildren, priority2, Priority.Background);
|
|
649
649
|
});
|
|
650
650
|
}
|
|
651
|
-
function
|
|
651
|
+
function rebuildIncrementally(owner, stamp, allChildren, items, priority) {
|
|
652
652
|
return __awaiter(this, void 0, void 0, function* () {
|
|
653
653
|
yield Transaction.requestNextFrame();
|
|
654
654
|
const block = owner.instance;
|
|
655
655
|
if (!Transaction.isCanceled || !Transaction.isFrameOver(1, Verstak.shortFrameDuration / 3)) {
|
|
656
|
-
let outerPriority = Verstak.
|
|
657
|
-
Verstak.
|
|
656
|
+
let outerPriority = Verstak.currentRebuildPriority;
|
|
657
|
+
Verstak.currentRebuildPriority = priority;
|
|
658
658
|
try {
|
|
659
659
|
if (block.childrenShuffling)
|
|
660
660
|
shuffle(items);
|
|
661
661
|
const frameDurationLimit = priority === Priority.Background ? Verstak.shortFrameDuration : Infinity;
|
|
662
662
|
let frameDuration = Math.min(frameDurationLimit, Math.max(Verstak.frameDuration / 4, Verstak.shortFrameDuration));
|
|
663
663
|
for (const child of items) {
|
|
664
|
-
|
|
664
|
+
triggerRebuild(child);
|
|
665
665
|
if (Transaction.isFrameOver(1, frameDuration)) {
|
|
666
|
-
Verstak.
|
|
666
|
+
Verstak.currentRebuildPriority = outerPriority;
|
|
667
667
|
yield Transaction.requestNextFrame(0);
|
|
668
|
-
outerPriority = Verstak.
|
|
669
|
-
Verstak.
|
|
668
|
+
outerPriority = Verstak.currentRebuildPriority;
|
|
669
|
+
Verstak.currentRebuildPriority = priority;
|
|
670
670
|
frameDuration = Math.min(4 * frameDuration, Math.min(frameDurationLimit, Verstak.frameDuration));
|
|
671
671
|
}
|
|
672
672
|
if (Transaction.isCanceled && Transaction.isFrameOver(1, Verstak.shortFrameDuration / 3))
|
|
@@ -674,12 +674,12 @@ function updateIncrementally(owner, stamp, allChildren, items, priority) {
|
|
|
674
674
|
}
|
|
675
675
|
}
|
|
676
676
|
finally {
|
|
677
|
-
Verstak.
|
|
677
|
+
Verstak.currentRebuildPriority = outerPriority;
|
|
678
678
|
}
|
|
679
679
|
}
|
|
680
680
|
});
|
|
681
681
|
}
|
|
682
|
-
function
|
|
682
|
+
function triggerRebuild(ties) {
|
|
683
683
|
const b = ties.instance;
|
|
684
684
|
const node = b.node;
|
|
685
685
|
if (node.stamp >= 0) {
|
|
@@ -688,15 +688,15 @@ function triggerUpdate(ties) {
|
|
|
688
688
|
Transaction.outside(() => {
|
|
689
689
|
if (Rx.isLogging)
|
|
690
690
|
Rx.setLoggingHint(b, node.key);
|
|
691
|
-
Rx.getController(b.
|
|
691
|
+
Rx.getController(b.rebuild).configure({
|
|
692
692
|
order: node.level,
|
|
693
693
|
});
|
|
694
694
|
});
|
|
695
695
|
}
|
|
696
|
-
nonreactive(b.
|
|
696
|
+
nonreactive(b.rebuild, node.builder.triggers);
|
|
697
697
|
}
|
|
698
698
|
else
|
|
699
|
-
|
|
699
|
+
rebuildNow(ties);
|
|
700
700
|
}
|
|
701
701
|
}
|
|
702
702
|
function mountIfNecessary(block) {
|
|
@@ -714,7 +714,7 @@ function mountIfNecessary(block) {
|
|
|
714
714
|
else if (block.isMoved && block.isAutoMountEnabled)
|
|
715
715
|
nonreactive(() => driver.mount(block));
|
|
716
716
|
}
|
|
717
|
-
function
|
|
717
|
+
function rebuildNow(ties) {
|
|
718
718
|
const b = ties.instance;
|
|
719
719
|
const node = b.node;
|
|
720
720
|
if (node.stamp >= 0) {
|
|
@@ -724,20 +724,20 @@ function updateNow(ties) {
|
|
|
724
724
|
mountIfNecessary(b);
|
|
725
725
|
node.stamp++;
|
|
726
726
|
node.numerator = 0;
|
|
727
|
-
b.
|
|
727
|
+
b.prepareForRebuild();
|
|
728
728
|
node.children.beginMerge();
|
|
729
729
|
const driver = node.driver;
|
|
730
|
-
result = driver.
|
|
730
|
+
result = driver.rebuild(b);
|
|
731
731
|
if (b.area === undefined && node.owner.isTable)
|
|
732
732
|
b.area = undefined;
|
|
733
733
|
if (result instanceof Promise)
|
|
734
|
-
result.then(v => {
|
|
734
|
+
result.then(v => { runRebuildNestedTreesThenDo(undefined, NOP); return v; }, e => { console.log(e); runRebuildNestedTreesThenDo(e !== null && e !== void 0 ? e : new Error("unknown error"), NOP); });
|
|
735
735
|
else
|
|
736
|
-
|
|
736
|
+
runRebuildNestedTreesThenDo(undefined, NOP);
|
|
737
737
|
}
|
|
738
738
|
catch (e) {
|
|
739
|
-
|
|
740
|
-
console.log(`
|
|
739
|
+
runRebuildNestedTreesThenDo(e, NOP);
|
|
740
|
+
console.log(`Rebuild failed: ${node.key}`);
|
|
741
741
|
console.log(`${e}`);
|
|
742
742
|
}
|
|
743
743
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from "./Interfaces";
|
|
2
|
-
export * from "./Utils";
|
|
3
|
-
export * from "./Restyler";
|
|
4
|
-
export * from "./Verstak";
|
|
1
|
+
export * from "./Interfaces.js";
|
|
2
|
+
export * from "./Utils.js";
|
|
3
|
+
export * from "./Restyler.js";
|
|
4
|
+
export * from "./Verstak.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from "./Interfaces";
|
|
2
|
-
export * from "./Utils";
|
|
3
|
-
export * from "./Restyler";
|
|
4
|
-
export * from "./Verstak";
|
|
1
|
+
export * from "./Interfaces.js";
|
|
2
|
+
export * from "./Utils.js";
|
|
3
|
+
export * from "./Restyler.js";
|
|
4
|
+
export * from "./Verstak.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Block, BlockKind, BlockBuilder, Align, BlockCoords, BlockArea } from "../core/api";
|
|
2
|
-
import { HtmlDriver } from "./HtmlDriver";
|
|
1
|
+
import { Block, BlockKind, BlockBuilder, Align, BlockCoords, BlockArea } from "../core/api.js";
|
|
2
|
+
import { HtmlDriver } from "./HtmlDriver.js";
|
|
3
3
|
export declare function Section<M = unknown, R = void>(builder?: BlockBuilder<HTMLElement, M, R>, base?: BlockBuilder<HTMLElement, M, R>): Block<HTMLElement, M, R>;
|
|
4
4
|
export declare function Table<M = unknown, R = void>(builder?: BlockBuilder<HTMLElement, M, R>, base?: BlockBuilder<HTMLElement, M, R>): Block<HTMLElement, M, R>;
|
|
5
5
|
export declare function row<T = void>(builder?: (block: void) => T, shiftCursorDown?: number): void;
|
|
6
|
-
export declare function
|
|
6
|
+
export declare function startNewRow(shiftCursorDown?: number): void;
|
|
7
7
|
export declare function cursor(areaParams: BlockArea): void;
|
|
8
8
|
export declare function Note(content: string, builder?: BlockBuilder<HTMLElement, void, void>): Block<HTMLElement, void, void>;
|
|
9
9
|
export declare function HtmlNote(content: string, builder?: BlockBuilder<HTMLElement, void, void>): Block<HTMLElement, void, void>;
|
|
@@ -23,5 +23,5 @@ export declare class VerstakHtmlDriver<T extends HTMLElement> extends HtmlDriver
|
|
|
23
23
|
applyContentWrapping(block: Block<T>, value: boolean): void;
|
|
24
24
|
applyOverlayVisible(block: Block<T>, value: boolean | undefined): void;
|
|
25
25
|
applyStyle(block: Block<T, any, any>, secondary: boolean, styleName: string, enabled?: boolean): void;
|
|
26
|
-
|
|
26
|
+
rebuild(block: Block<T>): void | Promise<void>;
|
|
27
27
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Verstak, BlockKind, Align, CursorCommandDriver, BaseDriver } from "../core/api";
|
|
2
|
-
import { HtmlDriver } from "./HtmlDriver";
|
|
1
|
+
import { Verstak, BlockKind, Align, CursorCommandDriver, BaseDriver } from "../core/api.js";
|
|
2
|
+
import { HtmlDriver } from "./HtmlDriver.js";
|
|
3
3
|
export function Section(builder, base) {
|
|
4
4
|
return Verstak.claim(Drivers.section, builder, base);
|
|
5
5
|
}
|
|
@@ -7,10 +7,10 @@ export function Table(builder, base) {
|
|
|
7
7
|
return Verstak.claim(Drivers.table, builder, base);
|
|
8
8
|
}
|
|
9
9
|
export function row(builder, shiftCursorDown) {
|
|
10
|
-
|
|
10
|
+
startNewRow(shiftCursorDown);
|
|
11
11
|
builder === null || builder === void 0 ? void 0 : builder();
|
|
12
12
|
}
|
|
13
|
-
export function
|
|
13
|
+
export function startNewRow(shiftCursorDown) {
|
|
14
14
|
Verstak.claim(Drivers.row);
|
|
15
15
|
}
|
|
16
16
|
export function cursor(areaParams) {
|
|
@@ -177,10 +177,10 @@ export class VerstakHtmlDriver extends HtmlDriver {
|
|
|
177
177
|
else
|
|
178
178
|
e.className = enabled ? styleName : "";
|
|
179
179
|
}
|
|
180
|
-
|
|
180
|
+
rebuild(block) {
|
|
181
181
|
if (block.kind <= BlockKind.Table)
|
|
182
|
-
|
|
183
|
-
return super.
|
|
182
|
+
startNewRow();
|
|
183
|
+
return super.rebuild(block);
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
186
|
const Constants = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SymDataForSensor, SymResizeObserver } from "./sensors/DataForSensor";
|
|
1
|
+
import { SymDataForSensor, SymResizeObserver } from "./sensors/DataForSensor.js";
|
|
2
2
|
const ElementType = global.Element;
|
|
3
3
|
if (ElementType !== undefined) {
|
|
4
4
|
Object.defineProperty(ElementType.prototype, "dataForSensor", {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Block, BlockBuilder } from "../core/api";
|
|
1
|
+
import { Block, BlockBuilder } from "../core/api.js";
|
|
2
2
|
export declare function HtmlBody(builder?: BlockBuilder<HTMLElement>, base?: BlockBuilder<HTMLElement>): Block<HTMLElement>;
|
|
3
3
|
export declare function A<M = unknown, R = void>(builder?: BlockBuilder<HTMLAnchorElement, M, void, R>, base?: BlockBuilder<HTMLAnchorElement, M, void, R>): Block<HTMLAnchorElement, M, void, R>;
|
|
4
4
|
export declare function Abbr<M = unknown, R = void>(builder?: BlockBuilder<HTMLElement, M, void, R>, base?: BlockBuilder<HTMLElement, M, void, R>): Block<HTMLElement, M, void, R>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Verstak, StaticDriver, BlockKind } from "../core/api";
|
|
2
|
-
import { HtmlDriver, SvgDriver } from "./HtmlDriver";
|
|
1
|
+
import { Verstak, StaticDriver, BlockKind } from "../core/api.js";
|
|
2
|
+
import { HtmlDriver, SvgDriver } from "./HtmlDriver.js";
|
|
3
3
|
export function HtmlBody(builder, base) {
|
|
4
4
|
const driver = new StaticDriver(global.document.body, "HtmlBody", false, b => b.kind = BlockKind.Section);
|
|
5
5
|
return Verstak.claim(driver, builder, base);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Item } from "reactronic";
|
|
2
|
-
import { Block, BaseDriver } from "../core/api";
|
|
2
|
+
import { Block, BaseDriver } from "../core/api.js";
|
|
3
3
|
export declare abstract class BaseHtmlDriver<T extends Element, C = unknown> extends BaseDriver<T, C> {
|
|
4
4
|
create(block: Block<T, unknown, C, void>, b: {
|
|
5
5
|
native?: T;
|
|
@@ -9,7 +9,7 @@ export declare abstract class BaseHtmlDriver<T extends Element, C = unknown> ext
|
|
|
9
9
|
finalize(block: Block<T, unknown, C>, isLeader: boolean): boolean;
|
|
10
10
|
mount(block: Block<T, unknown, C>): void;
|
|
11
11
|
relocate(block: Block<T, unknown, C>): void;
|
|
12
|
-
|
|
12
|
+
rebuild(block: Block<T, unknown, C>): void | Promise<void>;
|
|
13
13
|
static get blinkingEffectMarker(): string | undefined;
|
|
14
14
|
static set blinkingEffectMarker(value: string | undefined);
|
|
15
15
|
static findEffectiveHtmlBlockHost(block: Block<any>): Block<HTMLElement | SVGElement>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Rx } from "reactronic";
|
|
2
|
-
import { Verstak, BaseDriver } from "../core/api";
|
|
2
|
+
import { Verstak, BaseDriver } from "../core/api.js";
|
|
3
3
|
export class BaseHtmlDriver extends BaseDriver {
|
|
4
4
|
create(block, b) {
|
|
5
5
|
super.create(block, b);
|
|
@@ -48,10 +48,10 @@ export class BaseHtmlDriver extends BaseDriver {
|
|
|
48
48
|
}
|
|
49
49
|
relocate(block) {
|
|
50
50
|
}
|
|
51
|
-
|
|
52
|
-
const result = super.
|
|
51
|
+
rebuild(block) {
|
|
52
|
+
const result = super.rebuild(block);
|
|
53
53
|
if (gBlinkingEffectMarker)
|
|
54
|
-
blink(block.native, Verstak.
|
|
54
|
+
blink(block.native, Verstak.currentRebuildPriority, block.node.stamp);
|
|
55
55
|
return result;
|
|
56
56
|
}
|
|
57
57
|
static get blinkingEffectMarker() {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { FocusModel } from "./sensors/FocusSensor";
|
|
1
|
+
import { FocusModel } from "./sensors/FocusSensor.js";
|
|
2
2
|
export declare function FocuserReaction(key: string, target: HTMLElement, model: FocusModel, switchEditMode?: ((model?: FocusModel) => void) | undefined): void;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export * from "./HtmlDriver";
|
|
2
|
-
export * from "./HtmlBlocks";
|
|
3
|
-
export * from "./HtmlApiExt";
|
|
4
|
-
export * from "./Blocks";
|
|
5
|
-
export * from "./ReactingFocuser";
|
|
6
|
-
export * from "./sensors/Sensor";
|
|
7
|
-
export * from "./sensors/PointerSensor";
|
|
8
|
-
export * from "./sensors/BasePointerSensor";
|
|
9
|
-
export * from "./sensors/FocusSensor";
|
|
10
|
-
export * from "./sensors/ButtonSensor";
|
|
11
|
-
export * from "./sensors/HoverSensor";
|
|
12
|
-
export * from "./sensors/WheelSensor";
|
|
13
|
-
export * from "./sensors/KeyboardSensor";
|
|
14
|
-
export * from "./sensors/ResizeSensor";
|
|
15
|
-
export * from "./sensors/HtmlDragSensor";
|
|
16
|
-
export * from "./sensors/HtmlSensors";
|
|
17
|
-
export * from "./sensors/WindowSensor";
|
|
18
|
-
import "./HtmlApiExt";
|
|
1
|
+
export * from "./HtmlDriver.js";
|
|
2
|
+
export * from "./HtmlBlocks.js";
|
|
3
|
+
export * from "./HtmlApiExt.js";
|
|
4
|
+
export * from "./Blocks.js";
|
|
5
|
+
export * from "./ReactingFocuser.js";
|
|
6
|
+
export * from "./sensors/Sensor.js";
|
|
7
|
+
export * from "./sensors/PointerSensor.js";
|
|
8
|
+
export * from "./sensors/BasePointerSensor.js";
|
|
9
|
+
export * from "./sensors/FocusSensor.js";
|
|
10
|
+
export * from "./sensors/ButtonSensor.js";
|
|
11
|
+
export * from "./sensors/HoverSensor.js";
|
|
12
|
+
export * from "./sensors/WheelSensor.js";
|
|
13
|
+
export * from "./sensors/KeyboardSensor.js";
|
|
14
|
+
export * from "./sensors/ResizeSensor.js";
|
|
15
|
+
export * from "./sensors/HtmlDragSensor.js";
|
|
16
|
+
export * from "./sensors/HtmlSensors.js";
|
|
17
|
+
export * from "./sensors/WindowSensor.js";
|
|
18
|
+
import "./HtmlApiExt.js";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export * from "./HtmlDriver";
|
|
2
|
-
export * from "./HtmlBlocks";
|
|
3
|
-
export * from "./HtmlApiExt";
|
|
4
|
-
export * from "./Blocks";
|
|
5
|
-
export * from "./ReactingFocuser";
|
|
6
|
-
export * from "./sensors/Sensor";
|
|
7
|
-
export * from "./sensors/PointerSensor";
|
|
8
|
-
export * from "./sensors/BasePointerSensor";
|
|
9
|
-
export * from "./sensors/FocusSensor";
|
|
10
|
-
export * from "./sensors/ButtonSensor";
|
|
11
|
-
export * from "./sensors/HoverSensor";
|
|
12
|
-
export * from "./sensors/WheelSensor";
|
|
13
|
-
export * from "./sensors/KeyboardSensor";
|
|
14
|
-
export * from "./sensors/ResizeSensor";
|
|
15
|
-
export * from "./sensors/HtmlDragSensor";
|
|
16
|
-
export * from "./sensors/HtmlSensors";
|
|
17
|
-
export * from "./sensors/WindowSensor";
|
|
18
|
-
import "./HtmlApiExt";
|
|
1
|
+
export * from "./HtmlDriver.js";
|
|
2
|
+
export * from "./HtmlBlocks.js";
|
|
3
|
+
export * from "./HtmlApiExt.js";
|
|
4
|
+
export * from "./Blocks.js";
|
|
5
|
+
export * from "./ReactingFocuser.js";
|
|
6
|
+
export * from "./sensors/Sensor.js";
|
|
7
|
+
export * from "./sensors/PointerSensor.js";
|
|
8
|
+
export * from "./sensors/BasePointerSensor.js";
|
|
9
|
+
export * from "./sensors/FocusSensor.js";
|
|
10
|
+
export * from "./sensors/ButtonSensor.js";
|
|
11
|
+
export * from "./sensors/HoverSensor.js";
|
|
12
|
+
export * from "./sensors/WheelSensor.js";
|
|
13
|
+
export * from "./sensors/KeyboardSensor.js";
|
|
14
|
+
export * from "./sensors/ResizeSensor.js";
|
|
15
|
+
export * from "./sensors/HtmlDragSensor.js";
|
|
16
|
+
export * from "./sensors/HtmlSensors.js";
|
|
17
|
+
export * from "./sensors/WindowSensor.js";
|
|
18
|
+
import "./HtmlApiExt.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { FocusSensor } from "./FocusSensor";
|
|
2
|
-
import { HtmlElementSensor } from "./HtmlElementSensor";
|
|
3
|
-
import { KeyboardModifiers } from "./KeyboardSensor";
|
|
4
|
-
import { WindowSensor } from "./WindowSensor";
|
|
1
|
+
import { FocusSensor } from "./FocusSensor.js";
|
|
2
|
+
import { HtmlElementSensor } from "./HtmlElementSensor.js";
|
|
3
|
+
import { KeyboardModifiers } from "./KeyboardSensor.js";
|
|
4
|
+
import { WindowSensor } from "./WindowSensor.js";
|
|
5
5
|
export declare enum PointerButton {
|
|
6
6
|
None = 0,
|
|
7
7
|
Left = 1,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { HtmlElementSensor } from "./HtmlElementSensor";
|
|
2
|
-
import { KeyboardModifiers } from "./KeyboardSensor";
|
|
1
|
+
import { HtmlElementSensor } from "./HtmlElementSensor.js";
|
|
2
|
+
import { KeyboardModifiers } from "./KeyboardSensor.js";
|
|
3
3
|
export var PointerButton;
|
|
4
4
|
(function (PointerButton) {
|
|
5
5
|
PointerButton[PointerButton["None"] = 0] = "None";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PointerButton, BasePointerSensor } from "./BasePointerSensor";
|
|
2
|
-
import { FocusSensor } from "./FocusSensor";
|
|
3
|
-
import { WindowSensor } from "./WindowSensor";
|
|
1
|
+
import { PointerButton, BasePointerSensor } from "./BasePointerSensor.js";
|
|
2
|
+
import { FocusSensor } from "./FocusSensor.js";
|
|
3
|
+
import { WindowSensor } from "./WindowSensor.js";
|
|
4
4
|
export declare enum ButtonState {
|
|
5
5
|
Pressed = 0,
|
|
6
6
|
Selecting = 1,
|
|
@@ -8,9 +8,9 @@ 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
10
|
import { options, Reentrance, transactional, Transaction, LoggingLevel } from "reactronic";
|
|
11
|
-
import { extractPointerButton, isPointerButtonDown, PointerButton, BasePointerSensor } from "./BasePointerSensor";
|
|
12
|
-
import { findTargetElementData, SymDataForSensor } from "./DataForSensor";
|
|
13
|
-
import { extractModifierKeys, KeyboardModifiers } from "./KeyboardSensor";
|
|
11
|
+
import { extractPointerButton, isPointerButtonDown, PointerButton, BasePointerSensor } from "./BasePointerSensor.js";
|
|
12
|
+
import { findTargetElementData, SymDataForSensor } from "./DataForSensor.js";
|
|
13
|
+
import { extractModifierKeys, KeyboardModifiers } from "./KeyboardSensor.js";
|
|
14
14
|
export var ButtonState;
|
|
15
15
|
(function (ButtonState) {
|
|
16
16
|
ButtonState[ButtonState["Pressed"] = 0] = "Pressed";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ToggleRef } from "reactronic";
|
|
2
|
-
import { HtmlElementSensor } from "./HtmlElementSensor";
|
|
3
|
-
import { WindowSensor } from "./WindowSensor";
|
|
2
|
+
import { HtmlElementSensor } from "./HtmlElementSensor.js";
|
|
3
|
+
import { WindowSensor } from "./WindowSensor.js";
|
|
4
4
|
export interface FocusModel {
|
|
5
5
|
isEditMode: boolean;
|
|
6
6
|
onFocusIn?: (focus: FocusSensor) => void;
|
|
@@ -8,9 +8,9 @@ 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
10
|
import { options, transactional, LoggingLevel } from "reactronic";
|
|
11
|
-
import { objectHasMember } from "../../core/Utils";
|
|
12
|
-
import { grabElementDataList, SymDataForSensor } from "./DataForSensor";
|
|
13
|
-
import { HtmlElementSensor } from "./HtmlElementSensor";
|
|
11
|
+
import { objectHasMember } from "../../core/Utils.js";
|
|
12
|
+
import { grabElementDataList, SymDataForSensor } from "./DataForSensor.js";
|
|
13
|
+
import { HtmlElementSensor } from "./HtmlElementSensor.js";
|
|
14
14
|
export class FocusSensor extends HtmlElementSensor {
|
|
15
15
|
constructor(windowSensor) {
|
|
16
16
|
super(undefined, windowSensor);
|
|
@@ -8,9 +8,9 @@ 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
10
|
import { options, transactional, LoggingLevel } from "reactronic";
|
|
11
|
-
import { findTargetElementData, SymDataForSensor } from "./DataForSensor";
|
|
12
|
-
import { extractModifierKeys, KeyboardModifiers } from "./KeyboardSensor";
|
|
13
|
-
import { BasePointerSensor } from "./BasePointerSensor";
|
|
11
|
+
import { findTargetElementData, SymDataForSensor } from "./DataForSensor.js";
|
|
12
|
+
import { extractModifierKeys, KeyboardModifiers } from "./KeyboardSensor.js";
|
|
13
|
+
import { BasePointerSensor } from "./BasePointerSensor.js";
|
|
14
14
|
export class HoverSensor extends BasePointerSensor {
|
|
15
15
|
constructor() {
|
|
16
16
|
super();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { FocusSensor } from "./FocusSensor";
|
|
2
|
-
import { HtmlElementSensor } from "./HtmlElementSensor";
|
|
3
|
-
import { KeyboardModifiers } from "./KeyboardSensor";
|
|
4
|
-
import { WindowSensor } from "./WindowSensor";
|
|
1
|
+
import { FocusSensor } from "./FocusSensor.js";
|
|
2
|
+
import { HtmlElementSensor } from "./HtmlElementSensor.js";
|
|
3
|
+
import { KeyboardModifiers } from "./KeyboardSensor.js";
|
|
4
|
+
import { WindowSensor } from "./WindowSensor.js";
|
|
5
5
|
export type DragEffectAllowed = "none" | "copy" | "copyLink" | "copyMove" | "link" | "linkMove" | "move" | "all" | "uninitialized";
|
|
6
6
|
export type DropEffect = "none" | "copy" | "link" | "move";
|
|
7
7
|
export declare class HtmlDragSensor extends HtmlElementSensor {
|
|
@@ -8,9 +8,9 @@ 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
10
|
import { options, reactive, transactional, raw, Transaction, LoggingLevel } from "reactronic";
|
|
11
|
-
import { findTargetElementData, SymDataForSensor } from "./DataForSensor";
|
|
12
|
-
import { HtmlElementSensor } from "./HtmlElementSensor";
|
|
13
|
-
import { extractModifierKeys, KeyboardModifiers } from "./KeyboardSensor";
|
|
11
|
+
import { findTargetElementData, SymDataForSensor } from "./DataForSensor.js";
|
|
12
|
+
import { HtmlElementSensor } from "./HtmlElementSensor.js";
|
|
13
|
+
import { extractModifierKeys, KeyboardModifiers } from "./KeyboardSensor.js";
|
|
14
14
|
export class HtmlDragSensor extends HtmlElementSensor {
|
|
15
15
|
constructor(focusSensor, windowSensor) {
|
|
16
16
|
super(focusSensor, windowSensor);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DataForSensor } from "./DataForSensor";
|
|
2
|
-
import { Sensor } from "./Sensor";
|
|
3
|
-
import { WindowSensor } from "./WindowSensor";
|
|
1
|
+
import { DataForSensor } from "./DataForSensor.js";
|
|
2
|
+
import { Sensor } from "./Sensor.js";
|
|
3
|
+
import { WindowSensor } from "./WindowSensor.js";
|
|
4
4
|
export declare class HtmlElementSensor extends Sensor {
|
|
5
5
|
readonly focusSensor?: any;
|
|
6
6
|
readonly windowSensor?: WindowSensor;
|
|
@@ -8,9 +8,9 @@ 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
10
|
import { raw } from "reactronic";
|
|
11
|
-
import { SymDataForSensor } from "./DataForSensor";
|
|
12
|
-
import { Sensor } from "./Sensor";
|
|
13
|
-
import { WindowSensor } from "./WindowSensor";
|
|
11
|
+
import { SymDataForSensor } from "./DataForSensor.js";
|
|
12
|
+
import { Sensor } from "./Sensor.js";
|
|
13
|
+
import { WindowSensor } from "./WindowSensor.js";
|
|
14
14
|
export class HtmlElementSensor extends Sensor {
|
|
15
15
|
constructor(focusSensor, windowSensor) {
|
|
16
16
|
super();
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { FocusSensor } from "./FocusSensor";
|
|
2
|
-
import { HoverSensor } from "./HoverSensor";
|
|
3
|
-
import { HtmlDragSensor } from "./HtmlDragSensor";
|
|
4
|
-
import { KeyboardSensor } from "./KeyboardSensor";
|
|
5
|
-
import { ButtonSensor } from "./ButtonSensor";
|
|
6
|
-
import { ResizeSensor } from "./ResizeSensor";
|
|
7
|
-
import { WheelSensor } from "./WheelSensor";
|
|
8
|
-
import { WindowSensor } from "./WindowSensor";
|
|
9
|
-
import { PointerSensor } from "./PointerSensor";
|
|
1
|
+
import { FocusSensor } from "./FocusSensor.js";
|
|
2
|
+
import { HoverSensor } from "./HoverSensor.js";
|
|
3
|
+
import { HtmlDragSensor } from "./HtmlDragSensor.js";
|
|
4
|
+
import { KeyboardSensor } from "./KeyboardSensor.js";
|
|
5
|
+
import { ButtonSensor } from "./ButtonSensor.js";
|
|
6
|
+
import { ResizeSensor } from "./ResizeSensor.js";
|
|
7
|
+
import { WheelSensor } from "./WheelSensor.js";
|
|
8
|
+
import { WindowSensor } from "./WindowSensor.js";
|
|
9
|
+
import { PointerSensor } from "./PointerSensor.js";
|
|
10
10
|
export declare class HtmlSensors {
|
|
11
11
|
readonly window: WindowSensor;
|
|
12
12
|
readonly focus: FocusSensor;
|
|
@@ -8,15 +8,15 @@ 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
10
|
import { transactional } from "reactronic";
|
|
11
|
-
import { FocusSensor } from "./FocusSensor";
|
|
12
|
-
import { HoverSensor } from "./HoverSensor";
|
|
13
|
-
import { HtmlDragSensor } from "./HtmlDragSensor";
|
|
14
|
-
import { KeyboardSensor } from "./KeyboardSensor";
|
|
15
|
-
import { ButtonSensor } from "./ButtonSensor";
|
|
16
|
-
import { ResizeSensor } from "./ResizeSensor";
|
|
17
|
-
import { WheelSensor } from "./WheelSensor";
|
|
18
|
-
import { WindowSensor } from "./WindowSensor";
|
|
19
|
-
import { PointerSensor } from "./PointerSensor";
|
|
11
|
+
import { FocusSensor } from "./FocusSensor.js";
|
|
12
|
+
import { HoverSensor } from "./HoverSensor.js";
|
|
13
|
+
import { HtmlDragSensor } from "./HtmlDragSensor.js";
|
|
14
|
+
import { KeyboardSensor } from "./KeyboardSensor.js";
|
|
15
|
+
import { ButtonSensor } from "./ButtonSensor.js";
|
|
16
|
+
import { ResizeSensor } from "./ResizeSensor.js";
|
|
17
|
+
import { WheelSensor } from "./WheelSensor.js";
|
|
18
|
+
import { WindowSensor } from "./WindowSensor.js";
|
|
19
|
+
import { PointerSensor } from "./PointerSensor.js";
|
|
20
20
|
export class HtmlSensors {
|
|
21
21
|
constructor() {
|
|
22
22
|
this.window = new WindowSensor();
|
|
@@ -8,8 +8,8 @@ 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
10
|
import { options, sensitive, transactional, LoggingLevel } from "reactronic";
|
|
11
|
-
import { grabElementDataList, SymDataForSensor } from "./DataForSensor";
|
|
12
|
-
import { HtmlElementSensor } from "./HtmlElementSensor";
|
|
11
|
+
import { grabElementDataList, SymDataForSensor } from "./DataForSensor.js";
|
|
12
|
+
import { HtmlElementSensor } from "./HtmlElementSensor.js";
|
|
13
13
|
export var KeyboardModifiers;
|
|
14
14
|
(function (KeyboardModifiers) {
|
|
15
15
|
KeyboardModifiers[KeyboardModifiers["None"] = 0] = "None";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { PointerButton, BasePointerSensor } from "./BasePointerSensor";
|
|
2
|
-
import { FocusSensor } from "./FocusSensor";
|
|
3
|
-
import { KeyboardModifiers } from "./KeyboardSensor";
|
|
4
|
-
import { WindowSensor } from "./WindowSensor";
|
|
1
|
+
import { PointerButton, BasePointerSensor } from "./BasePointerSensor.js";
|
|
2
|
+
import { FocusSensor } from "./FocusSensor.js";
|
|
3
|
+
import { KeyboardModifiers } from "./KeyboardSensor.js";
|
|
4
|
+
import { WindowSensor } from "./WindowSensor.js";
|
|
5
5
|
export declare class PointerSensor extends BasePointerSensor {
|
|
6
6
|
pointerButton: PointerButton;
|
|
7
7
|
private clickable;
|
|
@@ -8,9 +8,9 @@ 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
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";
|
|
11
|
+
import { extractPointerButton, isPointerButtonDown, PointerButton, BasePointerSensor } from "./BasePointerSensor.js";
|
|
12
|
+
import { findTargetElementData, SymDataForSensor } from "./DataForSensor.js";
|
|
13
|
+
import { extractModifierKeys, KeyboardModifiers } from "./KeyboardSensor.js";
|
|
14
14
|
export class PointerSensor extends BasePointerSensor {
|
|
15
15
|
constructor(focusSensor, windowSensor) {
|
|
16
16
|
super(focusSensor, windowSensor);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Block } from "../../core/api";
|
|
2
|
-
import { Sensor } from "./Sensor";
|
|
1
|
+
import { Block } from "../../core/api.js";
|
|
2
|
+
import { Sensor } from "./Sensor.js";
|
|
3
3
|
export interface ResizedElement {
|
|
4
4
|
readonly borderBoxSize: ReadonlyArray<ResizeObserverSize>;
|
|
5
5
|
readonly contentBoxSize: ReadonlyArray<ResizeObserverSize>;
|
|
@@ -8,7 +8,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
10
|
import { options, transactional, LoggingLevel } from "reactronic";
|
|
11
|
-
import { Sensor } from "./Sensor";
|
|
11
|
+
import { Sensor } from "./Sensor.js";
|
|
12
12
|
export class ResizeSensor extends Sensor {
|
|
13
13
|
constructor() {
|
|
14
14
|
super();
|
|
@@ -8,9 +8,9 @@ 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
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";
|
|
11
|
+
import { findTargetElementData, SymDataForSensor } from "./DataForSensor.js";
|
|
12
|
+
import { extractModifierKeys, KeyboardModifiers } from "./KeyboardSensor.js";
|
|
13
|
+
import { BasePointerSensor } from "./BasePointerSensor.js";
|
|
14
14
|
export class WheelSensor extends BasePointerSensor {
|
|
15
15
|
constructor() {
|
|
16
16
|
super();
|
|
@@ -8,8 +8,8 @@ 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
10
|
import { ToggleRef, transactional } from "reactronic";
|
|
11
|
-
import { objectHasMember } from "../../core/Utils";
|
|
12
|
-
import { Sensor } from "./Sensor";
|
|
11
|
+
import { objectHasMember } from "../../core/Utils.js";
|
|
12
|
+
import { Sensor } from "./Sensor.js";
|
|
13
13
|
export class WindowSensor extends Sensor {
|
|
14
14
|
constructor() {
|
|
15
15
|
super(...arguments);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "verstak",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.115",
|
|
4
4
|
"description": "Verstak - Front-End Library",
|
|
5
5
|
"publisher": "Nezaboodka Software",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -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.23.
|
|
34
|
+
"reactronic": "^0.23.104"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@types/node": "
|
|
38
|
-
"@typescript-eslint/eslint-plugin": "
|
|
39
|
-
"@typescript-eslint/parser": "
|
|
40
|
-
"ava": "
|
|
41
|
-
"c8": "
|
|
42
|
-
"eslint": "8.
|
|
37
|
+
"@types/node": "20.6.3",
|
|
38
|
+
"@typescript-eslint/eslint-plugin": "6.7.2",
|
|
39
|
+
"@typescript-eslint/parser": "6.7.2",
|
|
40
|
+
"ava": "5.3.1",
|
|
41
|
+
"c8": "8.0.1",
|
|
42
|
+
"eslint": "8.49.0",
|
|
43
43
|
"ts-node": "10.9.1",
|
|
44
|
-
"tsconfig-paths": "4.
|
|
45
|
-
"typescript": "
|
|
44
|
+
"tsconfig-paths": "4.2.0",
|
|
45
|
+
"typescript": "5.2.2"
|
|
46
46
|
},
|
|
47
47
|
"scripts": {
|
|
48
48
|
"build": "eslint source/**/*.ts test/**/*.ts && tsc",
|