verstak 0.93.25026 → 0.94.25029
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/components/Button.v.d.ts +2 -2
- package/build/dist/source/components/Button.v.js +3 -3
- package/build/dist/source/components/Icon.v.d.ts +2 -2
- package/build/dist/source/components/Icon.v.js +2 -2
- package/build/dist/source/components/Image.v.d.ts +2 -2
- package/build/dist/source/components/Image.v.js +2 -2
- package/build/dist/source/components/Input.v.d.ts +2 -2
- package/build/dist/source/components/Input.v.js +2 -2
- package/build/dist/source/components/Markdown.v.d.ts +1 -1
- 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.d.ts +2 -2
- package/build/dist/source/components/Spinner.v.js +2 -2
- package/build/dist/source/components/Theme.js +2 -2
- package/build/dist/source/components/Toggle.v.d.ts +2 -2
- package/build/dist/source/components/Toggle.v.js +3 -3
- package/build/dist/source/components/common/Utils.js +2 -2
- 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/Input.s.js +5 -5
- 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 +2 -2
- package/build/dist/source/core/ElDriver.d.ts +5 -5
- package/build/dist/source/core/ElDriver.js +9 -9
- package/build/dist/source/core/Elements.d.ts +22 -22
- package/build/dist/source/core/Elements.js +13 -13
- package/build/dist/source/core/Restyler.js +2 -2
- package/build/dist/source/core/Sizes.d.ts +3 -3
- package/build/dist/source/core/Sizes.js +3 -3
- package/build/dist/source/core/SplitViewMath.d.ts +10 -10
- package/build/dist/source/core/WebDriver.d.ts +11 -11
- package/build/dist/source/core/WebDriver.js +6 -6
- 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/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.d.ts +2 -2
- package/build/dist/source/html/DraggableArea.view.js +2 -2
- package/build/dist/source/html/HtmlElements.d.ts +115 -115
- package/build/dist/source/html/HtmlElements.js +115 -115
- package/build/dist/source/svg/SvgElements.d.ts +60 -60
- package/build/dist/source/svg/SvgElements.js +60 -60
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactiveTree, 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";
|
|
@@ -7,23 +7,23 @@ 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
9
|
const driver = new StaticDriver(global.document.body, "Page", false, el => el.kind = ElKind.division);
|
|
10
|
-
return
|
|
10
|
+
return ReactiveTree.declare(driver, scriptOrDeclaration, scriptAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis);
|
|
11
11
|
}
|
|
12
12
|
export function Division(scriptOrDeclaration, scriptAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis) {
|
|
13
|
-
return
|
|
13
|
+
return ReactiveTree.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
|
-
return
|
|
16
|
+
return ReactiveTree.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
22
|
export function Splitter(scriptOrDeclaration, scriptAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis) {
|
|
23
|
-
return
|
|
23
|
+
return ReactiveTree.declare(Drivers.splitter, scriptOrDeclaration, scriptAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis);
|
|
24
24
|
}
|
|
25
25
|
export function rowBreak(shiftCursorDown) {
|
|
26
|
-
|
|
26
|
+
ReactiveTree.declare(Drivers.partition);
|
|
27
27
|
}
|
|
28
28
|
export function declareSplitter(index, splitViewNode) {
|
|
29
29
|
const key = `splitter-${index}`;
|
|
@@ -79,14 +79,14 @@ export function declareSplitter(index, splitViewNode) {
|
|
|
79
79
|
}));
|
|
80
80
|
}
|
|
81
81
|
export function cursor(place) {
|
|
82
|
-
|
|
82
|
+
ReactiveTree.declare(Drivers.cursor, {
|
|
83
83
|
script: el => {
|
|
84
84
|
el.place = place;
|
|
85
85
|
},
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
88
|
export function JustText(content, formatted, declaration) {
|
|
89
|
-
return
|
|
89
|
+
return ReactiveTree.declare(Drivers.text, ReactiveTree.withBasis(declaration, {
|
|
90
90
|
script: el => {
|
|
91
91
|
if (formatted)
|
|
92
92
|
el.native.innerHTML = content;
|
|
@@ -96,13 +96,13 @@ export function JustText(content, formatted, declaration) {
|
|
|
96
96
|
}));
|
|
97
97
|
}
|
|
98
98
|
export function Group(scriptOrDeclaration, scriptAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis) {
|
|
99
|
-
return
|
|
99
|
+
return ReactiveTree.declare(Drivers.group, scriptOrDeclaration, scriptAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis);
|
|
100
100
|
}
|
|
101
101
|
export function Fragment(script) {
|
|
102
102
|
return PseudoElement({ mode: Mode.autonomous, script });
|
|
103
103
|
}
|
|
104
104
|
export function PseudoElement(scriptOrDeclaration, scriptAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis) {
|
|
105
|
-
return
|
|
105
|
+
return ReactiveTree.declare(Drivers.pseudo, scriptOrDeclaration, scriptAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis);
|
|
106
106
|
}
|
|
107
107
|
export class DivisionDriver extends HtmlDriver {
|
|
108
108
|
runScript(node) {
|
|
@@ -172,9 +172,9 @@ export class DivisionDriver extends HtmlDriver {
|
|
|
172
172
|
}
|
|
173
173
|
},
|
|
174
174
|
});
|
|
175
|
-
|
|
175
|
+
ReactiveTree.runNestedNodeScriptsThenDo(() => {
|
|
176
176
|
layoutInfo.isUpdateFinished = true;
|
|
177
|
-
|
|
177
|
+
ReactiveTree.triggerScriptRun(relayoutEl, { stamp: node.stamp });
|
|
178
178
|
});
|
|
179
179
|
}
|
|
180
180
|
return result;
|
|
@@ -231,7 +231,7 @@ export class PartitionDriver extends HtmlDriver {
|
|
|
231
231
|
const ownerEl = node.owner.element;
|
|
232
232
|
if (ownerEl.sealed !== undefined) {
|
|
233
233
|
node.element.style.flexGrow = "1";
|
|
234
|
-
|
|
234
|
+
ReactiveTree.declare(Drivers.wrapper, {
|
|
235
235
|
script: el => {
|
|
236
236
|
const ownerEl = el.node.owner.owner.element;
|
|
237
237
|
if (ownerEl.splitView !== undefined) {
|
|
@@ -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 { cached, runAtomically } from "reactronic";
|
|
11
11
|
export function restyler(restyle) {
|
|
12
12
|
return runAtomically(() => new TriggeringStyles(restyle));
|
|
13
13
|
}
|
|
@@ -23,7 +23,7 @@ export class TriggeringStyles {
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
__decorate([
|
|
26
|
-
|
|
26
|
+
cached,
|
|
27
27
|
__metadata("design:type", Function),
|
|
28
28
|
__metadata("design:paramtypes", []),
|
|
29
29
|
__metadata("design:returntype", Object)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactiveTreeVariable } from "reactronic";
|
|
2
2
|
export declare enum Axis {
|
|
3
3
|
X = 0,
|
|
4
4
|
Y = 1
|
|
@@ -13,11 +13,11 @@ export declare class Dimension<T = NoUnit> {
|
|
|
13
13
|
equalsTo(another: Dimension<T>): boolean;
|
|
14
14
|
static parse<T>(text: string): Dimension<T>;
|
|
15
15
|
static emit<T>(value: Dimension<T>): string;
|
|
16
|
-
static readonly gFontSizePx:
|
|
16
|
+
static readonly gFontSizePx: ReactiveTreeVariable<number>;
|
|
17
17
|
private static readonly gLineSizePx;
|
|
18
18
|
static get lineSizePx(): number;
|
|
19
19
|
static set lineSizePx(value: number);
|
|
20
|
-
static getLineSizePx():
|
|
20
|
+
static getLineSizePx(): ReactiveTreeVariable<number>;
|
|
21
21
|
}
|
|
22
22
|
export declare function dim<T = NoUnit>(num: number, unit?: T): Dimension<T>;
|
|
23
23
|
export type SizeConverterOptions = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactiveTreeVariable } from "reactronic";
|
|
2
2
|
export var Axis;
|
|
3
3
|
(function (Axis) {
|
|
4
4
|
Axis[Axis["X"] = 0] = "X";
|
|
@@ -36,8 +36,8 @@ export class Dimension {
|
|
|
36
36
|
return Dimension.gLineSizePx;
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
Dimension.gFontSizePx = new
|
|
40
|
-
Dimension.gLineSizePx = new
|
|
39
|
+
Dimension.gFontSizePx = new ReactiveTreeVariable();
|
|
40
|
+
Dimension.gLineSizePx = new ReactiveTreeVariable();
|
|
41
41
|
export function dim(num, unit) {
|
|
42
42
|
return new Dimension(num, unit);
|
|
43
43
|
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactiveTreeNode, MergeList } from "reactronic";
|
|
2
2
|
import { ElImpl } from "./ElDriver.js";
|
|
3
3
|
export declare function equal(a: number, b: number): boolean;
|
|
4
4
|
export declare function less(a: number, b: number): boolean;
|
|
5
5
|
export declare function greater(a: number, b: number): boolean;
|
|
6
|
-
export declare function relayoutUsingSplitter(splitViewNode:
|
|
7
|
-
node:
|
|
6
|
+
export declare function relayoutUsingSplitter(splitViewNode: ReactiveTreeNode<ElImpl>, deltaPx: number, index: number, initialSizesPx: Array<{
|
|
7
|
+
node: ReactiveTreeNode<ElImpl>;
|
|
8
8
|
sizePx: number;
|
|
9
9
|
}>, priorities?: ReadonlyArray<number>): void;
|
|
10
|
-
export declare function relayout(splitViewNode:
|
|
11
|
-
node:
|
|
10
|
+
export declare function relayout(splitViewNode: ReactiveTreeNode<ElImpl>, priorities: ReadonlyArray<number>, manuallyResizablePriorities: ReadonlyArray<number>, sizesPx: Array<{
|
|
11
|
+
node: ReactiveTreeNode<ElImpl>;
|
|
12
12
|
sizePx: number;
|
|
13
13
|
}>): void;
|
|
14
|
-
export declare function resizeUsingDelta(splitViewNode:
|
|
15
|
-
node:
|
|
14
|
+
export declare function resizeUsingDelta(splitViewNode: ReactiveTreeNode<ElImpl>, deltaPx: number, index: number, priorities: ReadonlyArray<number>, sizesPx: Array<{
|
|
15
|
+
node: ReactiveTreeNode<ElImpl>;
|
|
16
16
|
sizePx: number;
|
|
17
17
|
}>, force?: boolean): number;
|
|
18
|
-
export declare function layout(splitViewNode:
|
|
18
|
+
export declare function layout(splitViewNode: ReactiveTreeNode<ElImpl>): void;
|
|
19
19
|
export declare function getPrioritiesForSplitter(index: number, size: number): ReadonlyArray<number>;
|
|
20
|
-
export declare function getPrioritiesForSizeChanging(isHorizontal: boolean, children: MergeList<
|
|
20
|
+
export declare function getPrioritiesForSizeChanging(isHorizontal: boolean, children: MergeList<ReactiveTreeNode>, indexes: Array<number>): {
|
|
21
21
|
resizable: ReadonlyArray<number>;
|
|
22
22
|
manuallyResizable: ReadonlyArray<number>;
|
|
23
23
|
};
|
|
24
|
-
export declare function getPrioritiesForEmptySpaceDistribution(isHorizontal: boolean, children: MergeList<
|
|
24
|
+
export declare function getPrioritiesForEmptySpaceDistribution(isHorizontal: boolean, children: MergeList<ReactiveTreeNode>): {
|
|
25
25
|
resizable: ReadonlyArray<number>;
|
|
26
26
|
manuallyResizable: ReadonlyArray<number>;
|
|
27
27
|
};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactiveTreeNode, Handler } from "reactronic";
|
|
2
2
|
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
|
-
setNativeElement(node:
|
|
6
|
-
runPreparation(node:
|
|
7
|
-
runFinalization(node:
|
|
8
|
-
runMount(node:
|
|
9
|
-
runScript(node:
|
|
10
|
-
static findBrotherlyHost<T, R>(node:
|
|
11
|
-
static findBrotherlyPrevSibling<T, R>(node:
|
|
5
|
+
setNativeElement(node: ReactiveTreeNode<El<T, M>>): void;
|
|
6
|
+
runPreparation(node: ReactiveTreeNode<El<T, M>>): void | Promise<void>;
|
|
7
|
+
runFinalization(node: ReactiveTreeNode<El<T, M>>, isLeader: boolean): boolean;
|
|
8
|
+
runMount(node: ReactiveTreeNode<El<T, M>>): void;
|
|
9
|
+
runScript(node: ReactiveTreeNode<El<T, M>>): void | Promise<void>;
|
|
10
|
+
static findBrotherlyHost<T, R>(node: ReactiveTreeNode<El<T>>): ReactiveTreeNode<El<R>> | undefined;
|
|
11
|
+
static findBrotherlyPrevSibling<T, R>(node: ReactiveTreeNode<El<T>>): ReactiveTreeNode<El<R>> | undefined;
|
|
12
12
|
static get blinkingEffectMarker(): string | undefined;
|
|
13
13
|
static set blinkingEffectMarker(value: string | undefined);
|
|
14
14
|
}
|
|
15
15
|
export declare class StaticDriver<T extends HTMLElement> extends WebDriver<T> {
|
|
16
16
|
readonly native: T;
|
|
17
17
|
constructor(native: T, name: string, isRow: boolean, initialize?: Handler<El<T>>);
|
|
18
|
-
setNativeElement(node:
|
|
18
|
+
setNativeElement(node: ReactiveTreeNode<El<T>>): void;
|
|
19
19
|
}
|
|
20
20
|
export declare class HtmlDriver<T extends HTMLElement, M = any> extends WebDriver<T, M> {
|
|
21
|
-
setNativeElement(node:
|
|
21
|
+
setNativeElement(node: ReactiveTreeNode<El<T, M>>): void;
|
|
22
22
|
}
|
|
23
23
|
export declare class SvgDriver<T extends SVGElement, M = any> extends WebDriver<T, M> {
|
|
24
|
-
setNativeElement(node:
|
|
24
|
+
setNativeElement(node: ReactiveTreeNode<El<T, M>>): void;
|
|
25
25
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactiveTree, ReactiveTreeNode, ReactiveSystem, proceedSyncOrAsync } from "reactronic";
|
|
2
2
|
import { Constants, ElDriver, ElImpl } from "./ElDriver.js";
|
|
3
3
|
export class WebDriver extends ElDriver {
|
|
4
4
|
setNativeElement(node) {
|
|
@@ -31,13 +31,13 @@ export class WebDriver extends ElDriver {
|
|
|
31
31
|
const native = element.native;
|
|
32
32
|
if (native) {
|
|
33
33
|
const sequential = node.owner.children.isStrict;
|
|
34
|
-
const automaticHost =
|
|
34
|
+
const automaticHost = ReactiveTree.findMatchingHost(node, n => n.element.native instanceof HTMLElement || n.element.native instanceof SVGElement);
|
|
35
35
|
const automaticNativeHost = automaticHost !== node.owner
|
|
36
36
|
? automaticHost === null || automaticHost === void 0 ? void 0 : automaticHost.driver.provideHost(automaticHost).element.native
|
|
37
37
|
: automaticHost === null || automaticHost === void 0 ? void 0 : automaticHost.element.native;
|
|
38
38
|
if (automaticNativeHost) {
|
|
39
39
|
if (sequential && !node.driver.isPartition) {
|
|
40
|
-
const after =
|
|
40
|
+
const after = ReactiveTree.findMatchingPrevSibling(node, n => n.element.native instanceof HTMLElement || n.element.native instanceof SVGElement);
|
|
41
41
|
if (after === undefined || after.driver.isPartition) {
|
|
42
42
|
if (automaticNativeHost !== native.parentNode || !native.previousSibling)
|
|
43
43
|
automaticNativeHost.prepend(native);
|
|
@@ -67,16 +67,16 @@ export class WebDriver extends ElDriver {
|
|
|
67
67
|
element.place = undefined;
|
|
68
68
|
}
|
|
69
69
|
if (gBlinkingEffectMarker)
|
|
70
|
-
blink(element.native,
|
|
70
|
+
blink(element.native, ReactiveTreeNode.effectiveScriptPriority, node.stamp);
|
|
71
71
|
}, e => {
|
|
72
72
|
});
|
|
73
73
|
return result;
|
|
74
74
|
}
|
|
75
75
|
static findBrotherlyHost(node) {
|
|
76
|
-
return
|
|
76
|
+
return ReactiveTree.findMatchingHost(node, n => n.element.native instanceof HTMLElement || n.element.native instanceof SVGElement);
|
|
77
77
|
}
|
|
78
78
|
static findBrotherlyPrevSibling(node) {
|
|
79
|
-
return
|
|
79
|
+
return ReactiveTree.findMatchingPrevSibling(node, n => n.element.native instanceof HTMLElement || n.element.native instanceof SVGElement);
|
|
80
80
|
}
|
|
81
81
|
static get blinkingEffectMarker() {
|
|
82
82
|
return gBlinkingEffectMarker;
|
|
@@ -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, reactive, atomic, observable, 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
|
+
observable(false),
|
|
266
266
|
__metadata("design:type", Map)
|
|
267
267
|
], HtmlDragSensor.prototype, "dataByFormat", void 0);
|
|
268
268
|
__decorate([
|
|
269
|
-
|
|
269
|
+
observable(false),
|
|
270
270
|
__metadata("design:type", Object)
|
|
271
271
|
], HtmlDragSensor.prototype, "draggingImage", void 0);
|
|
272
272
|
__decorate([
|
|
273
|
-
|
|
273
|
+
observable(false),
|
|
274
274
|
__metadata("design:type", Number)
|
|
275
275
|
], HtmlDragSensor.prototype, "draggingImageX", void 0);
|
|
276
276
|
__decorate([
|
|
277
|
-
|
|
277
|
+
observable(false),
|
|
278
278
|
__metadata("design:type", Number)
|
|
279
279
|
], HtmlDragSensor.prototype, "draggingImageY", void 0);
|
|
280
280
|
__decorate([
|
|
281
|
-
|
|
281
|
+
observable(false),
|
|
282
282
|
__metadata("design:type", String)
|
|
283
283
|
], HtmlDragSensor.prototype, "dropEffect", void 0);
|
|
284
284
|
__decorate([
|
|
285
|
-
|
|
285
|
+
observable(false),
|
|
286
286
|
__metadata("design:type", Array)
|
|
287
287
|
], HtmlDragSensor.prototype, "dataTypesAllowed", void 0);
|
|
288
288
|
__decorate([
|
|
289
|
-
|
|
289
|
+
observable(false),
|
|
290
290
|
__metadata("design:type", String)
|
|
291
291
|
], HtmlDragSensor.prototype, "effectAllowed", void 0);
|
|
292
292
|
__decorate([
|
|
293
|
-
|
|
293
|
+
observable(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
|
+
reactive,
|
|
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 { observable } 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
|
+
observable(false),
|
|
38
38
|
__metadata("design:type", Object)
|
|
39
39
|
], HtmlElementSensor.prototype, "sourceElement", void 0);
|
|
40
40
|
__decorate([
|
|
41
|
-
|
|
41
|
+
observable(false),
|
|
42
42
|
__metadata("design:type", WindowSensor)
|
|
43
43
|
], HtmlElementSensor.prototype, "windowSensor", void 0);
|
|
44
44
|
__decorate([
|
|
45
|
-
|
|
45
|
+
observable(false),
|
|
46
46
|
__metadata("design:type", Boolean)
|
|
47
47
|
], HtmlElementSensor.prototype, "preventDefault", void 0);
|
|
48
48
|
__decorate([
|
|
49
|
-
|
|
49
|
+
observable(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, observable, atomic, reactive, 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
|
+
observable(false),
|
|
296
296
|
__metadata("design:type", Object)
|
|
297
297
|
], PointerSensor.prototype, "clickable", void 0);
|
|
298
298
|
__decorate([
|
|
299
|
-
|
|
299
|
+
observable(false),
|
|
300
300
|
__metadata("design:type", Boolean)
|
|
301
301
|
], PointerSensor.prototype, "tryingDragging", void 0);
|
|
302
302
|
__decorate([
|
|
303
|
-
|
|
303
|
+
observable(false),
|
|
304
304
|
__metadata("design:type", Object)
|
|
305
305
|
], PointerSensor.prototype, "draggingData", void 0);
|
|
306
306
|
__decorate([
|
|
307
|
-
|
|
307
|
+
observable(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
|
+
reactive,
|
|
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
|
+
reactive,
|
|
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 { ObservableObject } from "reactronic";
|
|
2
|
+
export declare class Sensor extends ObservableObject {
|
|
3
3
|
revision: number;
|
|
4
4
|
elementDataList: unknown[];
|
|
5
5
|
get topElementData(): unknown;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactiveTreeNode, ReactiveTreeNodeDecl } from "reactronic";
|
|
2
2
|
import { El } from "../core/El.js";
|
|
3
3
|
import { PointerSensor } from "../core/sensors/PointerSensor.js";
|
|
4
4
|
export type DragAndDropHandler = (pointer: PointerSensor) => void;
|
|
@@ -8,4 +8,4 @@ export interface DraggableAreaModel {
|
|
|
8
8
|
droppedAction?: DragAndDropHandler;
|
|
9
9
|
dragFinishedAction?: DragAndDropHandler;
|
|
10
10
|
}
|
|
11
|
-
export declare function DraggableArea(draggingId: string, builder:
|
|
11
|
+
export declare function DraggableArea(draggingId: string, builder: ReactiveTreeNodeDecl<El<HTMLDivElement, DraggableAreaModel>>): ReactiveTreeNode<El<HTMLDivElement>>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactiveTree, Mode } from "reactronic";
|
|
2
2
|
import { Div } from "./HtmlElements.js";
|
|
3
3
|
import { Fragment } from "../core/Elements.js";
|
|
4
4
|
export function DraggableArea(draggingId, builder) {
|
|
5
|
-
return (Div(
|
|
5
|
+
return (Div(ReactiveTree.withBasis(builder, {
|
|
6
6
|
mode: Mode.autonomous,
|
|
7
7
|
script: b => {
|
|
8
8
|
const e = b.native;
|