verstak 0.96.26022 → 0.96.26024
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.js +2 -2
- package/build/dist/source/components/Icon.v.js +2 -2
- package/build/dist/source/components/Image.v.js +2 -2
- package/build/dist/source/components/Input.v.js +5 -5
- package/build/dist/source/components/{RealTimeClock.d.ts → LiveTime.d.ts} +1 -5
- package/build/dist/source/components/{RealTimeClock.js → LiveTime.js} +8 -30
- package/build/dist/source/components/Spinner.v.js +2 -2
- package/build/dist/source/components/Toggle.v.js +2 -2
- package/build/dist/source/components/api.d.ts +1 -1
- package/build/dist/source/components/api.js +1 -1
- package/build/dist/source/core/El.d.ts +14 -12
- package/build/dist/source/core/El.js +16 -16
- package/build/dist/source/core/ElDriver.d.ts +39 -23
- package/build/dist/source/core/ElDriver.js +189 -268
- package/build/dist/source/core/Elements.d.ts +8 -3
- package/build/dist/source/core/Elements.js +294 -7
- package/build/dist/source/core/SplitViewMath.js +5 -5
- package/build/dist/source/core/WebDriver.d.ts +3 -3
- package/build/dist/source/core/WebDriver.js +9 -9
- package/build/dist/source/core/api.d.ts +2 -0
- package/build/dist/source/core/api.js +2 -0
- package/build/dist/source/html/DraggableArea.view.js +2 -2
- package/build/dist/source/html/api.d.ts +0 -2
- package/build/dist/source/html/api.js +0 -2
- package/package.json +2 -2
- /package/build/dist/source/{html → core}/HtmlApiExt.d.ts +0 -0
- /package/build/dist/source/{html → core}/HtmlApiExt.js +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ReactiveTreeNode,
|
|
1
|
+
import { ReactiveTreeNode, setBasis } from "reactronic";
|
|
2
2
|
import { Block, OnClick } from "verstak";
|
|
3
3
|
import { rxModel } from "./common/Utils.js";
|
|
4
4
|
import { Theme } from "./Theme.js";
|
|
5
5
|
import { Icon } from "./Icon.v.js";
|
|
6
6
|
export function Button(declaration) {
|
|
7
|
-
return (Block(
|
|
7
|
+
return (Block(setBasis(declaration, {
|
|
8
8
|
preparation() {
|
|
9
9
|
var _a;
|
|
10
10
|
(_a = this.model) !== null && _a !== void 0 ? _a : (this.model = rxModel({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { setBasis } from "reactronic";
|
|
2
2
|
import { Block } from "verstak";
|
|
3
3
|
import { Theme } from "./Theme.js";
|
|
4
4
|
export function Icon(name, declaration) {
|
|
5
|
-
return (Block(
|
|
5
|
+
return (Block(setBasis(declaration, {
|
|
6
6
|
signalArgs: { name },
|
|
7
7
|
body() {
|
|
8
8
|
const theme = Theme.current.icon;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { setBasis } from "reactronic";
|
|
2
2
|
import { Block } from "verstak";
|
|
3
3
|
import { rxModel } from "./common/Utils.js";
|
|
4
4
|
export function Image(declaration) {
|
|
5
|
-
return (Block(
|
|
5
|
+
return (Block(setBasis(declaration, {
|
|
6
6
|
preparation() {
|
|
7
7
|
var _a;
|
|
8
8
|
(_a = this.model) !== null && _a !== void 0 ? _a : (this.model = rxModel({ source: undefined }));
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Mode,
|
|
2
|
-
import { Block, OnFocus, rowBreak, Fragment, KeyboardModifiers,
|
|
1
|
+
import { Mode, setBasis } from "reactronic";
|
|
2
|
+
import { Block, OnFocus, rowBreak, Fragment, KeyboardModifiers, H, V } from "verstak";
|
|
3
3
|
import { rxModel } from "./common/Utils.js";
|
|
4
4
|
import { Theme } from "./Theme.js";
|
|
5
5
|
import { Icon } from "./Icon.v.js";
|
|
6
6
|
export function Input(declaration) {
|
|
7
|
-
return (Block(
|
|
7
|
+
return (Block(setBasis(declaration, {
|
|
8
8
|
preparation() {
|
|
9
9
|
var _a;
|
|
10
10
|
(_a = this.model) !== null && _a !== void 0 ? _a : (this.model = composeInputModel());
|
|
@@ -48,8 +48,8 @@ function InputField(model, styling) {
|
|
|
48
48
|
preparation(el, base) {
|
|
49
49
|
const e = this.native;
|
|
50
50
|
this.useStylingPreset(styling.field);
|
|
51
|
-
this.
|
|
52
|
-
this.
|
|
51
|
+
this.selfAlignmentHorizontal = H.stretch;
|
|
52
|
+
this.selfAlignmentVertical = V.stretch;
|
|
53
53
|
this.textIsEditable = true;
|
|
54
54
|
e.tabIndex = 0;
|
|
55
55
|
e.dataForSensor.focus = model;
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import { RxObject } from "reactronic";
|
|
2
|
-
export declare class
|
|
2
|
+
export declare class LiveTime extends RxObject {
|
|
3
3
|
hour: number;
|
|
4
4
|
minute: number;
|
|
5
5
|
second: number;
|
|
6
6
|
ms: number;
|
|
7
7
|
interval: number;
|
|
8
|
-
paused: boolean;
|
|
9
8
|
constructor(interval?: number);
|
|
10
|
-
pause(value?: boolean): void;
|
|
11
9
|
private tick;
|
|
12
|
-
protected activate(): void;
|
|
13
|
-
private put;
|
|
14
10
|
}
|
|
@@ -7,8 +7,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
|
-
import { RxObject, transaction
|
|
11
|
-
export class
|
|
10
|
+
import { RxObject, transaction } from "reactronic";
|
|
11
|
+
export class LiveTime extends RxObject {
|
|
12
12
|
constructor(interval = 1000) {
|
|
13
13
|
super();
|
|
14
14
|
this.hour = 0;
|
|
@@ -16,49 +16,27 @@ export class RealTimeClock extends RxObject {
|
|
|
16
16
|
this.second = 0;
|
|
17
17
|
this.ms = 0;
|
|
18
18
|
this.interval = 0;
|
|
19
|
-
this.paused = false;
|
|
20
19
|
this.interval = interval;
|
|
21
|
-
this.
|
|
22
|
-
}
|
|
23
|
-
pause(value = true) {
|
|
24
|
-
this.paused = value;
|
|
20
|
+
this.tick();
|
|
25
21
|
}
|
|
26
22
|
tick() {
|
|
27
23
|
let calibration = 0;
|
|
28
24
|
try {
|
|
29
25
|
const now = new Date();
|
|
30
|
-
this.
|
|
26
|
+
this.hour = now.getHours();
|
|
27
|
+
this.minute = now.getMinutes();
|
|
28
|
+
this.second = now.getSeconds();
|
|
29
|
+
this.ms = now.getMilliseconds();
|
|
31
30
|
calibration = now.getTime() % this.interval;
|
|
32
31
|
}
|
|
33
32
|
finally {
|
|
34
33
|
setTimeout(() => this.tick(), this.interval - calibration);
|
|
35
34
|
}
|
|
36
35
|
}
|
|
37
|
-
activate() {
|
|
38
|
-
this.tick();
|
|
39
|
-
}
|
|
40
|
-
put(time) {
|
|
41
|
-
this.hour = time.getHours();
|
|
42
|
-
this.minute = time.getMinutes();
|
|
43
|
-
this.second = time.getSeconds();
|
|
44
|
-
this.ms = time.getMilliseconds();
|
|
45
|
-
}
|
|
46
36
|
}
|
|
47
37
|
__decorate([
|
|
48
38
|
transaction,
|
|
49
39
|
__metadata("design:type", Function),
|
|
50
|
-
__metadata("design:paramtypes", [Boolean]),
|
|
51
|
-
__metadata("design:returntype", void 0)
|
|
52
|
-
], RealTimeClock.prototype, "pause", null);
|
|
53
|
-
__decorate([
|
|
54
|
-
transaction,
|
|
55
|
-
__metadata("design:type", Function),
|
|
56
|
-
__metadata("design:paramtypes", []),
|
|
57
|
-
__metadata("design:returntype", void 0)
|
|
58
|
-
], RealTimeClock.prototype, "tick", null);
|
|
59
|
-
__decorate([
|
|
60
|
-
reaction,
|
|
61
|
-
__metadata("design:type", Function),
|
|
62
40
|
__metadata("design:paramtypes", []),
|
|
63
41
|
__metadata("design:returntype", void 0)
|
|
64
|
-
],
|
|
42
|
+
], LiveTime.prototype, "tick", null);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Mode,
|
|
1
|
+
import { Mode, setBasis } from "reactronic";
|
|
2
2
|
import { Block } from "verstak";
|
|
3
3
|
import { rxModel } from "./common/Utils.js";
|
|
4
4
|
export function Spinner(declaration) {
|
|
5
|
-
return (Block(
|
|
5
|
+
return (Block(setBasis(declaration, {
|
|
6
6
|
preparation() {
|
|
7
7
|
var _a;
|
|
8
8
|
(_a = this.model) !== null && _a !== void 0 ? _a : (this.model = composeSpinnerModel());
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ReactiveTreeNode, Mode,
|
|
1
|
+
import { ReactiveTreeNode, Mode, setBasis } from "reactronic";
|
|
2
2
|
import { Block, OnClick } from "verstak";
|
|
3
3
|
import { rxModel } from "./common/Utils.js";
|
|
4
4
|
import { Theme } from "./Theme.js";
|
|
5
5
|
import { Icon } from "./Icon.v.js";
|
|
6
6
|
export function Toggle(declaration) {
|
|
7
|
-
return (Block(
|
|
7
|
+
return (Block(setBasis(declaration, {
|
|
8
8
|
preparation() {
|
|
9
9
|
var _a;
|
|
10
10
|
(_a = this.model) !== null && _a !== void 0 ? _a : (this.model = rxModel({
|
|
@@ -8,12 +8,14 @@ export type El<T = any, M = any> = {
|
|
|
8
8
|
place: ElPlace;
|
|
9
9
|
width: Range;
|
|
10
10
|
height: Range;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
alignmentHorizontal: H | undefined;
|
|
12
|
+
alignmentVertical: V | undefined;
|
|
13
|
+
alignmentVerticalRowWise: V | undefined;
|
|
14
|
+
selfAlignmentHorizontal: H | undefined;
|
|
15
|
+
selfAlignmentVertical: V | undefined;
|
|
16
|
+
selfAlignmentVerticalRowWise: V | undefined;
|
|
17
|
+
selfStretchingStrengthHorizontal: number | undefined;
|
|
18
|
+
selfStretchingStrengthVertical: number | undefined;
|
|
17
19
|
contentWrapping: boolean;
|
|
18
20
|
overlayVisible: boolean | undefined;
|
|
19
21
|
text: string | undefined;
|
|
@@ -48,16 +50,16 @@ export type ElCoords = {
|
|
|
48
50
|
x2: number;
|
|
49
51
|
y2: number;
|
|
50
52
|
};
|
|
51
|
-
export declare enum
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
export declare enum H {
|
|
54
|
+
center = 0,
|
|
55
|
+
left = 1,
|
|
54
56
|
right = 2,
|
|
55
57
|
stretch = 3,
|
|
56
58
|
stretchAndFix = 4
|
|
57
59
|
}
|
|
58
|
-
export declare enum
|
|
59
|
-
|
|
60
|
-
|
|
60
|
+
export declare enum V {
|
|
61
|
+
center = 0,
|
|
62
|
+
top = 1,
|
|
61
63
|
bottom = 2,
|
|
62
64
|
stretch = 3,
|
|
63
65
|
stretchAndFix = 4
|
|
@@ -8,22 +8,22 @@ export var ElKind;
|
|
|
8
8
|
ElKind[ElKind["cursor"] = 5] = "cursor";
|
|
9
9
|
ElKind[ElKind["native"] = 6] = "native";
|
|
10
10
|
})(ElKind || (ElKind = {}));
|
|
11
|
-
export var
|
|
12
|
-
(function (
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
})(
|
|
19
|
-
export var
|
|
20
|
-
(function (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
})(
|
|
11
|
+
export var H;
|
|
12
|
+
(function (H) {
|
|
13
|
+
H[H["center"] = 0] = "center";
|
|
14
|
+
H[H["left"] = 1] = "left";
|
|
15
|
+
H[H["right"] = 2] = "right";
|
|
16
|
+
H[H["stretch"] = 3] = "stretch";
|
|
17
|
+
H[H["stretchAndFix"] = 4] = "stretchAndFix";
|
|
18
|
+
})(H || (H = {}));
|
|
19
|
+
export var V;
|
|
20
|
+
(function (V) {
|
|
21
|
+
V[V["center"] = 0] = "center";
|
|
22
|
+
V[V["top"] = 1] = "top";
|
|
23
|
+
V[V["bottom"] = 2] = "bottom";
|
|
24
|
+
V[V["stretch"] = 3] = "stretch";
|
|
25
|
+
V[V["stretchAndFix"] = 4] = "stretchAndFix";
|
|
26
|
+
})(V || (V = {}));
|
|
27
27
|
export var Direction;
|
|
28
28
|
(function (Direction) {
|
|
29
29
|
Direction[Direction["horizontal"] = 0] = "horizontal";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactiveTreeNode, BaseDriver } from "reactronic";
|
|
2
|
-
import { El, ElKind,
|
|
2
|
+
import { El, ElKind, H, V, Range, ElPlace, Direction } from "./El.js";
|
|
3
3
|
export declare class ElDriver<T extends Element, M = unknown> extends BaseDriver<El<T, M>> {
|
|
4
4
|
create(node: ReactiveTreeNode<El<T, M>>): El<T, M>;
|
|
5
5
|
}
|
|
@@ -15,12 +15,14 @@ export declare class ElImpl<T extends Element = any, M = any> implements El<T, M
|
|
|
15
15
|
private _coords;
|
|
16
16
|
private _width;
|
|
17
17
|
private _height;
|
|
18
|
-
private
|
|
19
|
-
private
|
|
20
|
-
private
|
|
21
|
-
private
|
|
22
|
-
private
|
|
23
|
-
private
|
|
18
|
+
private _alignmentHorizontal;
|
|
19
|
+
private _alignmentVertical;
|
|
20
|
+
private _alignmentVerticalRowWise;
|
|
21
|
+
private _selfAlignmentHorizontal;
|
|
22
|
+
private _selfAlignmentVertical;
|
|
23
|
+
private _selfAlignmentVerticalRowWise;
|
|
24
|
+
private _selfStretchingStrengthHorizontal;
|
|
25
|
+
private _selfStretchingStrengthVertical;
|
|
24
26
|
private _contentWrapping;
|
|
25
27
|
private _overlayVisible;
|
|
26
28
|
private _text;
|
|
@@ -59,18 +61,22 @@ export declare class ElImpl<T extends Element = any, M = any> implements El<T, M
|
|
|
59
61
|
minPx: number;
|
|
60
62
|
maxPx: number;
|
|
61
63
|
});
|
|
62
|
-
get
|
|
63
|
-
set
|
|
64
|
-
get
|
|
65
|
-
set
|
|
66
|
-
get
|
|
67
|
-
set
|
|
68
|
-
get
|
|
69
|
-
set
|
|
70
|
-
get
|
|
71
|
-
set
|
|
72
|
-
get
|
|
73
|
-
set
|
|
64
|
+
get alignmentHorizontal(): H | undefined;
|
|
65
|
+
set alignmentHorizontal(value: H | undefined);
|
|
66
|
+
get alignmentVertical(): V | undefined;
|
|
67
|
+
set alignmentVertical(value: V | undefined);
|
|
68
|
+
get alignmentVerticalRowWise(): V | undefined;
|
|
69
|
+
set alignmentVerticalRowWise(value: V | undefined);
|
|
70
|
+
get selfAlignmentHorizontal(): H | undefined;
|
|
71
|
+
set selfAlignmentHorizontal(value: H | undefined);
|
|
72
|
+
get selfAlignmentVertical(): V | undefined;
|
|
73
|
+
set selfAlignmentVertical(value: V | undefined);
|
|
74
|
+
get selfAlignmentVerticalRowWise(): V | undefined;
|
|
75
|
+
set selfAlignmentVerticalRowWise(value: V | undefined);
|
|
76
|
+
get selfStretchingStrengthHorizontal(): number | undefined;
|
|
77
|
+
set selfStretchingStrengthHorizontal(value: number | undefined);
|
|
78
|
+
get selfStretchingStrengthVertical(): number | undefined;
|
|
79
|
+
set selfStretchingStrengthVertical(value: number | undefined);
|
|
74
80
|
get contentWrapping(): boolean;
|
|
75
81
|
set contentWrapping(value: boolean);
|
|
76
82
|
get overlayVisible(): boolean | undefined;
|
|
@@ -95,10 +101,14 @@ export declare class ElImpl<T extends Element = any, M = any> implements El<T, M
|
|
|
95
101
|
private static applyCoords;
|
|
96
102
|
private static applyWidth;
|
|
97
103
|
private static applyHeight;
|
|
98
|
-
private static
|
|
99
|
-
private static
|
|
100
|
-
private static
|
|
101
|
-
private static
|
|
104
|
+
private static applyAlignmentHorizontal;
|
|
105
|
+
private static applyAlignmentVertical;
|
|
106
|
+
private static applyAlignmentVerticalRowWise;
|
|
107
|
+
private static applySelfAlignmentHorizontal;
|
|
108
|
+
private static applyPartitionAlignmentVertical;
|
|
109
|
+
private static applySelfAlignmentVertical;
|
|
110
|
+
private static applySelfStretchingStrengthHorizontal;
|
|
111
|
+
private static applySelfStretchingStrengthVertical;
|
|
102
112
|
private static applyContentWrapping;
|
|
103
113
|
private static applyOverlayVisible;
|
|
104
114
|
static applySealed<T extends Element>(element: El<T, any>, value: Direction | undefined): void;
|
|
@@ -151,4 +161,10 @@ export declare const Constants: {
|
|
|
151
161
|
kindAttrName: string;
|
|
152
162
|
ownReactiveTreeNodeKey: symbol;
|
|
153
163
|
};
|
|
164
|
+
export declare const StylingClassNameByAlignmentHorizontal: Array<string>;
|
|
165
|
+
export declare const StylingClassNameByAlignmentVertical: Array<string>;
|
|
166
|
+
export declare const StylingClassNameByAlignmentVerticalRowWise: Array<string>;
|
|
167
|
+
export declare const StylingClassNameBySelfAlignmentHorizontal: Array<string>;
|
|
168
|
+
export declare const StylingClassNameBySelfAlignmentVertical: Array<string>;
|
|
169
|
+
export declare const StylingClassNameByPartitionAlignmentVertical: Array<string>;
|
|
154
170
|
export {};
|