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