verstak 0.92.25015 → 0.93.25026
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 +2 -1
- package/build/dist/source/components/Button.v.js +5 -5
- package/build/dist/source/components/Icon.v.js +2 -2
- package/build/dist/source/components/Image.v.js +4 -4
- package/build/dist/source/components/{Field.v.d.ts → Input.v.d.ts} +3 -3
- package/build/dist/source/components/{Field.v.js → Input.v.js} +22 -22
- package/build/dist/source/components/Markdown.v.js +2 -2
- package/build/dist/source/components/RealTimeClock.d.ts +2 -2
- package/build/dist/source/components/RealTimeClock.js +3 -3
- package/build/dist/source/components/Spinner.v.js +5 -5
- package/build/dist/source/components/Theme.d.ts +4 -4
- package/build/dist/source/components/Theme.js +4 -4
- package/build/dist/source/components/Toggle.v.js +5 -5
- package/build/dist/source/components/api.d.ts +2 -2
- package/build/dist/source/components/api.js +2 -2
- package/build/dist/source/components/common/Utils.d.ts +1 -1
- package/build/dist/source/components/common/Utils.js +4 -4
- package/build/dist/source/components/theme/Button.s.js +4 -4
- package/build/dist/source/components/theme/Icon.s.js +2 -2
- package/build/dist/source/components/theme/{Field.s.d.ts → Input.s.d.ts} +4 -4
- package/build/dist/source/components/theme/{Field.s.js → Input.s.js} +11 -11
- package/build/dist/source/components/theme/Styling.d.ts +2 -2
- package/build/dist/source/components/theme/Styling.js +3 -3
- package/build/dist/source/components/theme/Toggle.s.js +4 -4
- package/build/dist/source/core/El.d.ts +3 -3
- package/build/dist/source/core/El.js +3 -3
- package/build/dist/source/core/ElDriver.d.ts +1 -1
- package/build/dist/source/core/ElDriver.js +12 -12
- package/build/dist/source/core/Elements.d.ts +11 -11
- package/build/dist/source/core/Elements.js +23 -23
- package/build/dist/source/core/Restyler.d.ts +2 -2
- package/build/dist/source/core/Restyler.js +5 -5
- package/build/dist/source/core/sensors/Handlers.js +12 -12
- package/build/dist/source/core/sensors/HtmlDragSensor.js +10 -10
- package/build/dist/source/core/sensors/HtmlElementSensor.js +5 -5
- package/build/dist/source/core/sensors/KeyboardSensor.js +3 -3
- package/build/dist/source/core/sensors/PointerSensor.js +7 -7
- package/build/dist/source/core/sensors/Sensor.d.ts +2 -2
- package/build/dist/source/core/sensors/Sensor.js +2 -2
- package/build/dist/source/html/DraggableArea.view.js +2 -2
- package/package.json +2 -2
|
@@ -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,
|
|
10
|
+
import { ReactiveNode, BaseDriver, Transaction, trigger, TriggeringObject } 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 {
|
|
@@ -23,7 +23,7 @@ export class ElImpl {
|
|
|
23
23
|
this.layoutInfo = undefined;
|
|
24
24
|
this.native = undefined;
|
|
25
25
|
this.model = undefined;
|
|
26
|
-
this._kind = ElKind.
|
|
26
|
+
this._kind = ElKind.partition;
|
|
27
27
|
this._place = undefined;
|
|
28
28
|
this._coords = UndefinedElCoords;
|
|
29
29
|
this._width = new Size();
|
|
@@ -45,9 +45,9 @@ export class ElImpl {
|
|
|
45
45
|
this._hasStylingPresets = false;
|
|
46
46
|
}
|
|
47
47
|
get index() { return this.node.slot.index; }
|
|
48
|
-
get
|
|
48
|
+
get isDivision() { return this.kind === ElKind.division; }
|
|
49
49
|
get isTable() { return this.kind === ElKind.table; }
|
|
50
|
-
get isAuxiliary() { return this.kind > ElKind.
|
|
50
|
+
get isAuxiliary() { return this.kind > ElKind.text; }
|
|
51
51
|
get kind() { return this._kind; }
|
|
52
52
|
set kind(value) {
|
|
53
53
|
if (value !== this._kind || this.node.stamp >= Number.MAX_SAFE_INTEGER - 1) {
|
|
@@ -535,7 +535,7 @@ export class ElImpl {
|
|
|
535
535
|
native.className = enabled ? styleName : "";
|
|
536
536
|
}
|
|
537
537
|
}
|
|
538
|
-
class Size extends
|
|
538
|
+
class Size extends TriggeringObject {
|
|
539
539
|
constructor() {
|
|
540
540
|
super();
|
|
541
541
|
this.raw = { min: "", max: "" };
|
|
@@ -561,27 +561,27 @@ export class ElLayoutInfo {
|
|
|
561
561
|
}
|
|
562
562
|
}
|
|
563
563
|
__decorate([
|
|
564
|
-
|
|
564
|
+
trigger,
|
|
565
565
|
__metadata("design:type", Number)
|
|
566
566
|
], ElLayoutInfo.prototype, "effectiveSizePx", void 0);
|
|
567
567
|
__decorate([
|
|
568
|
-
|
|
568
|
+
trigger,
|
|
569
569
|
__metadata("design:type", Number)
|
|
570
570
|
], ElLayoutInfo.prototype, "contentSizeXpx", void 0);
|
|
571
571
|
__decorate([
|
|
572
|
-
|
|
572
|
+
trigger,
|
|
573
573
|
__metadata("design:type", Number)
|
|
574
574
|
], ElLayoutInfo.prototype, "contentSizeYpx", void 0);
|
|
575
575
|
__decorate([
|
|
576
|
-
|
|
576
|
+
trigger,
|
|
577
577
|
__metadata("design:type", Number)
|
|
578
578
|
], ElLayoutInfo.prototype, "borderSizeYpx", void 0);
|
|
579
579
|
__decorate([
|
|
580
|
-
|
|
580
|
+
trigger,
|
|
581
581
|
__metadata("design:type", Number)
|
|
582
582
|
], ElLayoutInfo.prototype, "borderSizeXpx", void 0);
|
|
583
583
|
__decorate([
|
|
584
|
-
|
|
584
|
+
trigger,
|
|
585
585
|
__metadata("design:type", Boolean)
|
|
586
586
|
], ElLayoutInfo.prototype, "isUpdateFinished", void 0);
|
|
587
587
|
var ElLayoutInfoFlags;
|
|
@@ -708,7 +708,7 @@ export const Constants = {
|
|
|
708
708
|
wrapper: "wrapper",
|
|
709
709
|
splitter: "splitter",
|
|
710
710
|
group: "group",
|
|
711
|
-
layouts: ["
|
|
711
|
+
layouts: ["division", "table", "text", "group", "", "", ""],
|
|
712
712
|
keyAttrName: "key",
|
|
713
713
|
kindAttrName: "kind",
|
|
714
714
|
};
|
|
@@ -4,8 +4,8 @@ import { CursorCommandDriver } from "./ElDriver.js";
|
|
|
4
4
|
import { HtmlDriver } from "./WebDriver.js";
|
|
5
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
|
|
8
|
-
export declare function
|
|
7
|
+
export declare function Division<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
|
+
export declare function Division<M = unknown>(declaration?: ReactiveNodeDecl<El<HTMLElement, M>>): ReactiveNode<El<HTMLElement, M>>;
|
|
9
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;
|
|
@@ -13,14 +13,14 @@ export declare function Splitter<M = unknown>(script?: Script<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
|
-
export declare function cursor(
|
|
17
|
-
export declare function
|
|
16
|
+
export declare function cursor(place: ElPlace): void;
|
|
17
|
+
export declare function JustText(content: string, formatted?: boolean, declaration?: ReactiveNodeDecl<El<HTMLElement, void>>): ReactiveNode<El<HTMLElement, void>>;
|
|
18
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
|
|
21
|
-
export declare function
|
|
22
|
-
export declare function
|
|
23
|
-
export declare class
|
|
20
|
+
export declare function Fragment<M = unknown>(script: Script<El<void, M>>): ReactiveNode<El<void, M>>;
|
|
21
|
+
export declare function PseudoElement<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
|
+
export declare function PseudoElement<M = unknown>(declaration?: ReactiveNodeDecl<El<void, M>>): ReactiveNode<El<void, M>>;
|
|
23
|
+
export declare class DivisionDriver<T extends HTMLElement> extends HtmlDriver<T> {
|
|
24
24
|
runScript(node: ReactiveNode<El<T>>): void | Promise<void>;
|
|
25
25
|
declareChild(ownerNode: ReactiveNode<El<T, any>>, childDriver: ReactiveNodeDriver<any>, childDeclaration?: ReactiveNodeDecl<any> | undefined, childBasis?: ReactiveNodeDecl<any> | undefined): MergedItem<ReactiveNode> | undefined;
|
|
26
26
|
}
|
|
@@ -30,13 +30,13 @@ export declare class PartitionDriver<T extends HTMLElement> extends HtmlDriver<T
|
|
|
30
30
|
provideHost(node: ReactiveNode<El<T, any>>): ReactiveNode<El<T, any>>;
|
|
31
31
|
}
|
|
32
32
|
export declare const Drivers: {
|
|
33
|
-
|
|
33
|
+
division: DivisionDriver<HTMLElement>;
|
|
34
34
|
table: HtmlDriver<HTMLElement, any>;
|
|
35
|
-
|
|
35
|
+
text: HtmlDriver<HTMLElement, any>;
|
|
36
36
|
group: HtmlDriver<HTMLElement, any>;
|
|
37
37
|
partition: PartitionDriver<HTMLElement>;
|
|
38
38
|
wrapper: HtmlDriver<HTMLElement, any>;
|
|
39
39
|
splitter: HtmlDriver<HTMLElement, any>;
|
|
40
40
|
cursor: CursorCommandDriver;
|
|
41
|
-
|
|
41
|
+
pseudo: ReactiveNodeDriver<El<void, any>>;
|
|
42
42
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactiveNode, Mode,
|
|
1
|
+
import { ReactiveNode, Mode, runNonReactively } 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";
|
|
@@ -6,11 +6,11 @@ import { getPrioritiesForEmptySpaceDistribution, getPrioritiesForSizeChanging, r
|
|
|
6
6
|
import { Axis, BodyFontSize, Dimension, toPx } from "./Sizes.js";
|
|
7
7
|
import { HtmlDriver, StaticDriver } from "./WebDriver.js";
|
|
8
8
|
export function Window(scriptOrDeclaration, scriptAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis) {
|
|
9
|
-
const driver = new StaticDriver(global.document.body, "Page", false, el => el.kind = ElKind.
|
|
9
|
+
const driver = new StaticDriver(global.document.body, "Page", false, el => el.kind = ElKind.division);
|
|
10
10
|
return ReactiveNode.declare(driver, scriptOrDeclaration, scriptAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis);
|
|
11
11
|
}
|
|
12
|
-
export function
|
|
13
|
-
return ReactiveNode.declare(Drivers.
|
|
12
|
+
export function Division(scriptOrDeclaration, scriptAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis) {
|
|
13
|
+
return ReactiveNode.declare(Drivers.division, scriptOrDeclaration, scriptAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis);
|
|
14
14
|
}
|
|
15
15
|
export function Table(scriptOrDeclaration, scriptAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis) {
|
|
16
16
|
return ReactiveNode.declare(Drivers.table, scriptOrDeclaration, scriptAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis);
|
|
@@ -37,7 +37,7 @@ export function declareSplitter(index, splitViewNode) {
|
|
|
37
37
|
const dataForSensor = e.dataForSensor;
|
|
38
38
|
dataForSensor.draggable = key;
|
|
39
39
|
dataForSensor.drag = key;
|
|
40
|
-
|
|
40
|
+
Fragment(() => {
|
|
41
41
|
var _a, _b, _c, _d;
|
|
42
42
|
const pointer = e.sensors.pointer;
|
|
43
43
|
if (pointer.dragSource === key) {
|
|
@@ -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
|
-
|
|
54
|
+
runNonReactively(() => 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
|
}
|
|
@@ -78,15 +78,15 @@ export function declareSplitter(index, splitViewNode) {
|
|
|
78
78
|
},
|
|
79
79
|
}));
|
|
80
80
|
}
|
|
81
|
-
export function cursor(
|
|
81
|
+
export function cursor(place) {
|
|
82
82
|
ReactiveNode.declare(Drivers.cursor, {
|
|
83
83
|
script: el => {
|
|
84
|
-
el.place =
|
|
84
|
+
el.place = place;
|
|
85
85
|
},
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
|
-
export function
|
|
89
|
-
return ReactiveNode.declare(Drivers.
|
|
88
|
+
export function JustText(content, formatted, declaration) {
|
|
89
|
+
return ReactiveNode.declare(Drivers.text, ReactiveNode.withBasis(declaration, {
|
|
90
90
|
script: el => {
|
|
91
91
|
if (formatted)
|
|
92
92
|
el.native.innerHTML = content;
|
|
@@ -98,13 +98,13 @@ export function Note(content, formatted, declaration) {
|
|
|
98
98
|
export function Group(scriptOrDeclaration, scriptAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis) {
|
|
99
99
|
return ReactiveNode.declare(Drivers.group, scriptOrDeclaration, scriptAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis);
|
|
100
100
|
}
|
|
101
|
-
export function
|
|
102
|
-
return
|
|
101
|
+
export function Fragment(script) {
|
|
102
|
+
return PseudoElement({ mode: Mode.autonomous, script });
|
|
103
103
|
}
|
|
104
|
-
export function
|
|
105
|
-
return ReactiveNode.declare(Drivers.
|
|
104
|
+
export function PseudoElement(scriptOrDeclaration, scriptAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis) {
|
|
105
|
+
return ReactiveNode.declare(Drivers.pseudo, scriptOrDeclaration, scriptAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis);
|
|
106
106
|
}
|
|
107
|
-
export class
|
|
107
|
+
export class DivisionDriver extends HtmlDriver {
|
|
108
108
|
runScript(node) {
|
|
109
109
|
rowBreak();
|
|
110
110
|
const el = node.element;
|
|
@@ -114,7 +114,7 @@ export class PanelDriver extends HtmlDriver {
|
|
|
114
114
|
el.layoutInfo = new ElLayoutInfo(InitialElLayoutInfo);
|
|
115
115
|
const layoutInfo = el.layoutInfo;
|
|
116
116
|
layoutInfo.isUpdateFinished = false;
|
|
117
|
-
|
|
117
|
+
Fragment(h => {
|
|
118
118
|
const native = el.native;
|
|
119
119
|
const resize = native.sensors.resize;
|
|
120
120
|
for (const x of resize.resizedElements) {
|
|
@@ -126,7 +126,7 @@ export class PanelDriver extends HtmlDriver {
|
|
|
126
126
|
layoutInfo.contentSizeYpx = contentBoxPx.blockSize;
|
|
127
127
|
}
|
|
128
128
|
});
|
|
129
|
-
const relayoutEl =
|
|
129
|
+
const relayoutEl = PseudoElement({
|
|
130
130
|
mode: Mode.autonomous,
|
|
131
131
|
script: () => {
|
|
132
132
|
const native = el.native;
|
|
@@ -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
|
-
|
|
171
|
+
runNonReactively(() => relayout(node, priorities.resizable, priorities.manuallyResizable, sizesPx));
|
|
172
172
|
}
|
|
173
173
|
},
|
|
174
174
|
});
|
|
@@ -217,7 +217,7 @@ export class PanelDriver extends HtmlDriver {
|
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
219
|
export function isSplitViewPartition(childDriver) {
|
|
220
|
-
return !childDriver.isPartition && childDriver !== Drivers.splitter && childDriver !== Drivers.
|
|
220
|
+
return !childDriver.isPartition && childDriver !== Drivers.splitter && childDriver !== Drivers.pseudo;
|
|
221
221
|
}
|
|
222
222
|
function overrideMethod(declaration, method, func) {
|
|
223
223
|
const baseScript = declaration[method];
|
|
@@ -268,13 +268,13 @@ export class PartitionDriver extends HtmlDriver {
|
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
270
|
export const Drivers = {
|
|
271
|
-
|
|
271
|
+
division: new DivisionDriver(Constants.element, false, el => el.kind = ElKind.division),
|
|
272
272
|
table: new HtmlDriver(Constants.element, false, el => el.kind = ElKind.table),
|
|
273
|
-
|
|
273
|
+
text: new HtmlDriver(Constants.element, false, el => el.kind = ElKind.text),
|
|
274
274
|
group: new HtmlDriver(Constants.group, false, el => el.kind = ElKind.group),
|
|
275
|
-
partition: new PartitionDriver(Constants.partition, true, el => el.kind = ElKind.
|
|
275
|
+
partition: new PartitionDriver(Constants.partition, true, el => el.kind = ElKind.partition),
|
|
276
276
|
wrapper: new HtmlDriver(Constants.wrapper, false, el => el.kind = ElKind.native),
|
|
277
277
|
splitter: new HtmlDriver(Constants.splitter, false, el => el.kind = ElKind.splitter),
|
|
278
278
|
cursor: new CursorCommandDriver(),
|
|
279
|
-
|
|
279
|
+
pseudo: new ElDriver("pseudo", false, el => el.kind = ElKind.group),
|
|
280
280
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare function restyler<T>(restyle: () => T):
|
|
2
|
-
export declare class
|
|
1
|
+
export declare function restyler<T>(restyle: () => T): TriggeringStyles<T>;
|
|
2
|
+
export declare class TriggeringStyles<T> {
|
|
3
3
|
private readonly restyle;
|
|
4
4
|
constructor(restyle: () => T);
|
|
5
5
|
protected cache(): T;
|
|
@@ -7,11 +7,11 @@ 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 {
|
|
10
|
+
import { cache, runAtomically } from "reactronic";
|
|
11
11
|
export function restyler(restyle) {
|
|
12
|
-
return
|
|
12
|
+
return runAtomically(() => new TriggeringStyles(restyle));
|
|
13
13
|
}
|
|
14
|
-
export class
|
|
14
|
+
export class TriggeringStyles {
|
|
15
15
|
constructor(restyle) {
|
|
16
16
|
this.restyle = restyle;
|
|
17
17
|
}
|
|
@@ -23,8 +23,8 @@ export class ObservablesStyles {
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
__decorate([
|
|
26
|
-
|
|
26
|
+
cache,
|
|
27
27
|
__metadata("design:type", Function),
|
|
28
28
|
__metadata("design:paramtypes", []),
|
|
29
29
|
__metadata("design:returntype", Object)
|
|
30
|
-
],
|
|
30
|
+
], TriggeringStyles.prototype, "cache", null);
|
|
@@ -7,11 +7,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import { Mode, ToggleRef,
|
|
11
|
-
import {
|
|
10
|
+
import { Mode, ToggleRef, runNonReactively } from "reactronic";
|
|
11
|
+
import { PseudoElement } from "../Elements.js";
|
|
12
12
|
export function OnClick(target, action, key) {
|
|
13
13
|
if (action !== undefined) {
|
|
14
|
-
|
|
14
|
+
PseudoElement({
|
|
15
15
|
key,
|
|
16
16
|
mode: Mode.autonomous,
|
|
17
17
|
triggers: { target },
|
|
@@ -19,10 +19,10 @@ export function OnClick(target, action, key) {
|
|
|
19
19
|
const pointer = target.sensors.pointer;
|
|
20
20
|
if (target.dataForSensor.click !== undefined && pointer.clicked === target.dataForSensor.click || target.dataForSensor.click === undefined && pointer.clicked) {
|
|
21
21
|
if (action instanceof Function) {
|
|
22
|
-
|
|
22
|
+
runNonReactively(() => action(pointer));
|
|
23
23
|
}
|
|
24
24
|
else if (action instanceof ToggleRef) {
|
|
25
|
-
|
|
25
|
+
runNonReactively(() => action.toggle());
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
},
|
|
@@ -31,7 +31,7 @@ export function OnClick(target, action, key) {
|
|
|
31
31
|
}
|
|
32
32
|
export function OnClickAsync(target, action, key) {
|
|
33
33
|
if (action !== undefined) {
|
|
34
|
-
|
|
34
|
+
PseudoElement({
|
|
35
35
|
key,
|
|
36
36
|
mode: Mode.autonomous,
|
|
37
37
|
triggers: { target },
|
|
@@ -39,10 +39,10 @@ export function OnClickAsync(target, action, key) {
|
|
|
39
39
|
const pointer = target.sensors.pointer;
|
|
40
40
|
if (target.dataForSensor.click !== undefined && pointer.clicked === target.dataForSensor.click || target.dataForSensor.click === undefined && pointer.clicked) {
|
|
41
41
|
if (action instanceof Function) {
|
|
42
|
-
yield
|
|
42
|
+
yield runNonReactively(() => action(pointer));
|
|
43
43
|
}
|
|
44
44
|
else if (action instanceof ToggleRef) {
|
|
45
|
-
|
|
45
|
+
runNonReactively(() => action.toggle());
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
}),
|
|
@@ -51,7 +51,7 @@ export function OnClickAsync(target, action, key) {
|
|
|
51
51
|
}
|
|
52
52
|
export function OnResize(target, action, key) {
|
|
53
53
|
if (action) {
|
|
54
|
-
|
|
54
|
+
PseudoElement({
|
|
55
55
|
key,
|
|
56
56
|
mode: Mode.autonomous,
|
|
57
57
|
triggers: { target },
|
|
@@ -65,7 +65,7 @@ export function OnResize(target, action, key) {
|
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
export function OnFocus(target, model, switchEditMode = undefined, key) {
|
|
68
|
-
|
|
68
|
+
PseudoElement({
|
|
69
69
|
key,
|
|
70
70
|
mode: Mode.autonomous,
|
|
71
71
|
triggers: { target, model },
|
|
@@ -94,8 +94,8 @@ export function prepareResizeHandler(action) {
|
|
|
94
94
|
return (element) => {
|
|
95
95
|
const size = element.borderBoxSize[0];
|
|
96
96
|
if (action instanceof Function)
|
|
97
|
-
|
|
97
|
+
runNonReactively(() => action(size.inlineSize, size.blockSize));
|
|
98
98
|
else if (action instanceof ResizeData && action.handler !== undefined)
|
|
99
|
-
|
|
99
|
+
runNonReactively(() => action.handler(size.inlineSize, size.blockSize));
|
|
100
100
|
};
|
|
101
101
|
}
|
|
@@ -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 { options,
|
|
10
|
+
import { options, reaction, atomic, trigger, Transaction, LoggingLevel } from "reactronic";
|
|
11
11
|
import { findTargetElementData, SymDataForSensor } from "./DataForSensor.js";
|
|
12
12
|
import { HtmlElementSensor } from "./HtmlElementSensor.js";
|
|
13
13
|
import { extractModifierKeys, KeyboardModifiers } from "./KeyboardSensor.js";
|
|
@@ -262,35 +262,35 @@ export class HtmlDragSensor extends HtmlElementSensor {
|
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
264
|
__decorate([
|
|
265
|
-
|
|
265
|
+
trigger(false),
|
|
266
266
|
__metadata("design:type", Map)
|
|
267
267
|
], HtmlDragSensor.prototype, "dataByFormat", void 0);
|
|
268
268
|
__decorate([
|
|
269
|
-
|
|
269
|
+
trigger(false),
|
|
270
270
|
__metadata("design:type", Object)
|
|
271
271
|
], HtmlDragSensor.prototype, "draggingImage", void 0);
|
|
272
272
|
__decorate([
|
|
273
|
-
|
|
273
|
+
trigger(false),
|
|
274
274
|
__metadata("design:type", Number)
|
|
275
275
|
], HtmlDragSensor.prototype, "draggingImageX", void 0);
|
|
276
276
|
__decorate([
|
|
277
|
-
|
|
277
|
+
trigger(false),
|
|
278
278
|
__metadata("design:type", Number)
|
|
279
279
|
], HtmlDragSensor.prototype, "draggingImageY", void 0);
|
|
280
280
|
__decorate([
|
|
281
|
-
|
|
281
|
+
trigger(false),
|
|
282
282
|
__metadata("design:type", String)
|
|
283
283
|
], HtmlDragSensor.prototype, "dropEffect", void 0);
|
|
284
284
|
__decorate([
|
|
285
|
-
|
|
285
|
+
trigger(false),
|
|
286
286
|
__metadata("design:type", Array)
|
|
287
287
|
], HtmlDragSensor.prototype, "dataTypesAllowed", void 0);
|
|
288
288
|
__decorate([
|
|
289
|
-
|
|
289
|
+
trigger(false),
|
|
290
290
|
__metadata("design:type", String)
|
|
291
291
|
], HtmlDragSensor.prototype, "effectAllowed", void 0);
|
|
292
292
|
__decorate([
|
|
293
|
-
|
|
293
|
+
trigger(false),
|
|
294
294
|
__metadata("design:type", Boolean)
|
|
295
295
|
], HtmlDragSensor.prototype, "dropAllowed", void 0);
|
|
296
296
|
__decorate([
|
|
@@ -364,7 +364,7 @@ __decorate([
|
|
|
364
364
|
__metadata("design:returntype", void 0)
|
|
365
365
|
], HtmlDragSensor.prototype, "reset", null);
|
|
366
366
|
__decorate([
|
|
367
|
-
|
|
367
|
+
reaction,
|
|
368
368
|
options({ throttling: 0 }),
|
|
369
369
|
__metadata("design:type", Function),
|
|
370
370
|
__metadata("design:paramtypes", []),
|
|
@@ -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 {
|
|
10
|
+
import { trigger } from "reactronic";
|
|
11
11
|
import { SymDataForSensor } from "./DataForSensor.js";
|
|
12
12
|
import { Sensor } from "./Sensor.js";
|
|
13
13
|
import { WindowSensor } from "./WindowSensor.js";
|
|
@@ -34,18 +34,18 @@ export class HtmlElementSensor extends Sensor {
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
__decorate([
|
|
37
|
-
|
|
37
|
+
trigger(false),
|
|
38
38
|
__metadata("design:type", Object)
|
|
39
39
|
], HtmlElementSensor.prototype, "sourceElement", void 0);
|
|
40
40
|
__decorate([
|
|
41
|
-
|
|
41
|
+
trigger(false),
|
|
42
42
|
__metadata("design:type", WindowSensor)
|
|
43
43
|
], HtmlElementSensor.prototype, "windowSensor", void 0);
|
|
44
44
|
__decorate([
|
|
45
|
-
|
|
45
|
+
trigger(false),
|
|
46
46
|
__metadata("design:type", Boolean)
|
|
47
47
|
], HtmlElementSensor.prototype, "preventDefault", void 0);
|
|
48
48
|
__decorate([
|
|
49
|
-
|
|
49
|
+
trigger(false),
|
|
50
50
|
__metadata("design:type", Boolean)
|
|
51
51
|
], HtmlElementSensor.prototype, "stopPropagation", 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 { options,
|
|
10
|
+
import { options, runSensitively, atomic, LoggingLevel, Transaction } from "reactronic";
|
|
11
11
|
import { grabElementDataList, SymDataForSensor } from "./DataForSensor.js";
|
|
12
12
|
import { HtmlElementSensor } from "./HtmlElementSensor.js";
|
|
13
13
|
export var KeyboardModifiers;
|
|
@@ -74,12 +74,12 @@ export class KeyboardSensor extends HtmlElementSensor {
|
|
|
74
74
|
keyDown(e) {
|
|
75
75
|
this.updateSensorData(e);
|
|
76
76
|
this.up = "";
|
|
77
|
-
|
|
77
|
+
runSensitively(true, () => this.down = e.key);
|
|
78
78
|
}
|
|
79
79
|
keyUp(e) {
|
|
80
80
|
this.updateSensorData(e);
|
|
81
81
|
this.down = "";
|
|
82
|
-
|
|
82
|
+
runSensitively(true, () => this.up = e.key);
|
|
83
83
|
}
|
|
84
84
|
updateSensorData(e) {
|
|
85
85
|
this.preventDefault = false;
|
|
@@ -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 { options,
|
|
10
|
+
import { options, trigger, atomic, reaction, Reentrance, Transaction, LoggingLevel } from "reactronic";
|
|
11
11
|
import { extractPointerButton, isPointerButtonDown, PointerButton, BasePointerSensor } from "./BasePointerSensor.js";
|
|
12
12
|
import { findTargetElementData, SymDataForSensor } from "./DataForSensor.js";
|
|
13
13
|
import { extractModifierKeys, KeyboardModifiers } from "./KeyboardSensor.js";
|
|
@@ -292,19 +292,19 @@ export class PointerSensor extends BasePointerSensor {
|
|
|
292
292
|
}
|
|
293
293
|
PointerSensor.DraggingThreshold = 4;
|
|
294
294
|
__decorate([
|
|
295
|
-
|
|
295
|
+
trigger(false),
|
|
296
296
|
__metadata("design:type", Object)
|
|
297
297
|
], PointerSensor.prototype, "clickable", void 0);
|
|
298
298
|
__decorate([
|
|
299
|
-
|
|
299
|
+
trigger(false),
|
|
300
300
|
__metadata("design:type", Boolean)
|
|
301
301
|
], PointerSensor.prototype, "tryingDragging", void 0);
|
|
302
302
|
__decorate([
|
|
303
|
-
|
|
303
|
+
trigger(false),
|
|
304
304
|
__metadata("design:type", Object)
|
|
305
305
|
], PointerSensor.prototype, "draggingData", void 0);
|
|
306
306
|
__decorate([
|
|
307
|
-
|
|
307
|
+
trigger(false),
|
|
308
308
|
__metadata("design:type", Boolean)
|
|
309
309
|
], PointerSensor.prototype, "dropAllowed", void 0);
|
|
310
310
|
__decorate([
|
|
@@ -378,14 +378,14 @@ __decorate([
|
|
|
378
378
|
__metadata("design:returntype", void 0)
|
|
379
379
|
], PointerSensor.prototype, "reset", null);
|
|
380
380
|
__decorate([
|
|
381
|
-
|
|
381
|
+
reaction,
|
|
382
382
|
options({ throttling: 0 }),
|
|
383
383
|
__metadata("design:type", Function),
|
|
384
384
|
__metadata("design:paramtypes", []),
|
|
385
385
|
__metadata("design:returntype", void 0)
|
|
386
386
|
], PointerSensor.prototype, "whenClickingOrDragging", null);
|
|
387
387
|
__decorate([
|
|
388
|
-
|
|
388
|
+
reaction,
|
|
389
389
|
options({ throttling: 0 }),
|
|
390
390
|
__metadata("design:type", Function),
|
|
391
391
|
__metadata("design:paramtypes", []),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare class Sensor extends
|
|
1
|
+
import { TriggeringObject } from "reactronic";
|
|
2
|
+
export declare class Sensor extends TriggeringObject {
|
|
3
3
|
revision: number;
|
|
4
4
|
elementDataList: unknown[];
|
|
5
5
|
get topElementData(): unknown;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Mode, ReactiveNode } from "reactronic";
|
|
2
2
|
import { Div } from "./HtmlElements.js";
|
|
3
|
-
import {
|
|
3
|
+
import { Fragment } from "../core/Elements.js";
|
|
4
4
|
export function DraggableArea(draggingId, builder) {
|
|
5
5
|
return (Div(ReactiveNode.withBasis(builder, {
|
|
6
6
|
mode: Mode.autonomous,
|
|
@@ -10,7 +10,7 @@ export function DraggableArea(draggingId, builder) {
|
|
|
10
10
|
const dataForSensor = e.dataForSensor;
|
|
11
11
|
dataForSensor.draggable = draggingId;
|
|
12
12
|
dataForSensor.drag = draggingId;
|
|
13
|
-
|
|
13
|
+
Fragment(() => {
|
|
14
14
|
var _a, _b, _c, _d;
|
|
15
15
|
const pointer = e.sensors.pointer;
|
|
16
16
|
if (pointer.dragSource === draggingId) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "verstak",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.93.25026",
|
|
4
4
|
"description": "Verstak - Front-End Library",
|
|
5
5
|
"publisher": "Nezaboodka Software",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"markdown-it": "^14.1.0",
|
|
43
43
|
"markdown-it-prism": "^2.3.0",
|
|
44
44
|
"prismjs": "^1.29.0",
|
|
45
|
-
"reactronic": "^0.
|
|
45
|
+
"reactronic": "^0.93.25026"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/markdown-it": "14.1.2",
|