verstak 0.24.204 → 0.24.250
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.
|
@@ -9,11 +9,11 @@ export type El<T = any, M = any> = {
|
|
|
9
9
|
kind: ElKind;
|
|
10
10
|
area: ElArea;
|
|
11
11
|
width: Range;
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
widthJustMin: string;
|
|
13
|
+
widthJustGrowth: number;
|
|
14
14
|
height: Range;
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
heightJustMin: string;
|
|
16
|
+
heightJustGrowth: number;
|
|
17
17
|
contentAlignment: Align;
|
|
18
18
|
boundsAlignment: Align;
|
|
19
19
|
contentWrapping: boolean;
|
|
@@ -87,16 +87,16 @@ export declare class ElImpl<T extends Element = any, M = any> implements El<T, M
|
|
|
87
87
|
set area(value: ElArea);
|
|
88
88
|
get width(): Range;
|
|
89
89
|
set width(value: Range);
|
|
90
|
-
get
|
|
91
|
-
set
|
|
92
|
-
get
|
|
93
|
-
set
|
|
90
|
+
get widthJustMin(): string;
|
|
91
|
+
set widthJustMin(value: string);
|
|
92
|
+
get widthJustGrowth(): number;
|
|
93
|
+
set widthJustGrowth(value: number);
|
|
94
94
|
get height(): Range;
|
|
95
95
|
set height(value: Range);
|
|
96
|
-
get
|
|
97
|
-
set
|
|
98
|
-
get
|
|
99
|
-
set
|
|
96
|
+
get heightJustMin(): string;
|
|
97
|
+
set heightJustMin(value: string);
|
|
98
|
+
get heightJustGrowth(): number;
|
|
99
|
+
set heightJustGrowth(value: number);
|
|
100
100
|
get contentAlignment(): Align;
|
|
101
101
|
set contentAlignment(value: Align);
|
|
102
102
|
get boundsAlignment(): Align;
|
|
@@ -104,10 +104,10 @@ export class ElImpl {
|
|
|
104
104
|
if (updated)
|
|
105
105
|
this._width = value;
|
|
106
106
|
}
|
|
107
|
-
get
|
|
108
|
-
set
|
|
109
|
-
get
|
|
110
|
-
set
|
|
107
|
+
get widthJustMin() { var _a; return (_a = this._width.min) !== null && _a !== void 0 ? _a : ""; }
|
|
108
|
+
set widthJustMin(value) { this.width = { min: value }; }
|
|
109
|
+
get widthJustGrowth() { var _a; return (_a = this._width.growth) !== null && _a !== void 0 ? _a : 0; }
|
|
110
|
+
set widthJustGrowth(value) { this.width = { growth: value }; }
|
|
111
111
|
get height() { return this._height; }
|
|
112
112
|
set height(value) {
|
|
113
113
|
var _a, _b, _c;
|
|
@@ -128,10 +128,10 @@ export class ElImpl {
|
|
|
128
128
|
if (updated)
|
|
129
129
|
this._height = value;
|
|
130
130
|
}
|
|
131
|
-
get
|
|
132
|
-
set
|
|
133
|
-
get
|
|
134
|
-
set
|
|
131
|
+
get heightJustMin() { var _a; return (_a = this._height.min) !== null && _a !== void 0 ? _a : ""; }
|
|
132
|
+
set heightJustMin(value) { this.height = { min: value }; }
|
|
133
|
+
get heightJustGrowth() { var _a; return (_a = this._height.growth) !== null && _a !== void 0 ? _a : 0; }
|
|
134
|
+
set heightJustGrowth(value) { this.height = { growth: value }; }
|
|
135
135
|
get contentAlignment() { return this._contentAlignment; }
|
|
136
136
|
set contentAlignment(value) {
|
|
137
137
|
if (value !== this._contentAlignment) {
|
|
@@ -8,7 +8,7 @@ export declare function startNewRow(shiftCursorDown?: number): void;
|
|
|
8
8
|
export declare function cursor(areaParams: ElArea): void;
|
|
9
9
|
export declare function Note(content: string, formatted?: boolean, declaration?: RxNodeDecl<El<HTMLElement, void>>): RxNode<El<HTMLElement, void>>;
|
|
10
10
|
export declare function Group<M = unknown, R = void>(declaration?: RxNodeDecl<El<HTMLElement, M>>, preset?: RxNodeDecl<El<HTMLElement, M>>): RxNode<El<HTMLElement, M>>;
|
|
11
|
-
export declare function Handling<M = unknown>(
|
|
11
|
+
export declare function Handling<M = unknown>(autorun: Delegate<El<void, M>>): RxNode<El<void, M>>;
|
|
12
12
|
export declare function SyntheticElement<M = unknown>(declaration?: RxNodeDecl<El<void, M>>, preset?: RxNodeDecl<El<void, M>>): RxNode<El<void, M>>;
|
|
13
13
|
export declare class VerstakElementDriver<T extends HTMLElement> extends HtmlElementDriver<T> {
|
|
14
14
|
update(node: RxNode<El<T>>): void | Promise<void>;
|
|
@@ -16,26 +16,26 @@ export function startNewRow(shiftCursorDown) {
|
|
|
16
16
|
}
|
|
17
17
|
export function cursor(areaParams) {
|
|
18
18
|
RxNode.declare(Drivers.cursor, {
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
autorun: el => {
|
|
20
|
+
el.area = areaParams;
|
|
21
21
|
},
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
export function Note(content, formatted, declaration) {
|
|
25
25
|
return RxNode.declare(Drivers.note, declaration, {
|
|
26
|
-
|
|
26
|
+
autorun: el => {
|
|
27
27
|
if (formatted)
|
|
28
|
-
|
|
28
|
+
el.native.innerHTML = content;
|
|
29
29
|
else
|
|
30
|
-
|
|
30
|
+
el.native.innerText = content;
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
export function Group(declaration, preset) {
|
|
35
35
|
return RxNode.declare(Drivers.group, declaration, preset);
|
|
36
36
|
}
|
|
37
|
-
export function Handling(
|
|
38
|
-
return SyntheticElement({ mode: Mode.independentUpdate,
|
|
37
|
+
export function Handling(autorun) {
|
|
38
|
+
return SyntheticElement({ mode: Mode.independentUpdate, autorun });
|
|
39
39
|
}
|
|
40
40
|
export function SyntheticElement(declaration, preset) {
|
|
41
41
|
return RxNode.declare(Drivers.synthetic, declaration, preset);
|
|
@@ -6,7 +6,7 @@ export function OnClick(target, action, key) {
|
|
|
6
6
|
key,
|
|
7
7
|
mode: Mode.independentUpdate,
|
|
8
8
|
triggers: { target },
|
|
9
|
-
|
|
9
|
+
autorun: el => {
|
|
10
10
|
const pointer = target.sensors.pointer;
|
|
11
11
|
if (pointer.clicked) {
|
|
12
12
|
if (action instanceof Function) {
|
|
@@ -26,7 +26,7 @@ export function OnResize(target, action, key) {
|
|
|
26
26
|
key,
|
|
27
27
|
mode: Mode.independentUpdate,
|
|
28
28
|
triggers: { target },
|
|
29
|
-
|
|
29
|
+
autorun: el => {
|
|
30
30
|
const resize = target.sensors.resize;
|
|
31
31
|
resize.resizedElements.forEach(x => {
|
|
32
32
|
action(x);
|
|
@@ -40,10 +40,10 @@ export function OnFocus(target, model, switchEditMode = undefined, key) {
|
|
|
40
40
|
key,
|
|
41
41
|
mode: Mode.independentUpdate,
|
|
42
42
|
triggers: { target, model },
|
|
43
|
-
activation:
|
|
44
|
-
|
|
43
|
+
activation: el => {
|
|
44
|
+
el.node.configureReactronic({ throttling: 0 });
|
|
45
45
|
},
|
|
46
|
-
|
|
46
|
+
autorun: el => {
|
|
47
47
|
if (switchEditMode !== undefined) {
|
|
48
48
|
switchEditMode(model);
|
|
49
49
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "verstak",
|
|
3
|
-
"version": "0.24.
|
|
3
|
+
"version": "0.24.250",
|
|
4
4
|
"description": "Verstak - Front-End Library",
|
|
5
5
|
"publisher": "Nezaboodka Software",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"homepage": "https://github.com/nezaboodka/verstak/blob/master/README.md#readme",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"reactronic": "^0.24.
|
|
34
|
+
"reactronic": "^0.24.250"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/node": "20.11.17",
|