verstak 0.24.265 → 0.24.266
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/html/El.d.ts +28 -26
- package/build/dist/source/html/El.js +79 -77
- package/package.json +1 -1
|
@@ -10,12 +10,12 @@ export type El<T = any, M = any> = {
|
|
|
10
10
|
area: ElArea;
|
|
11
11
|
width: Range;
|
|
12
12
|
widthJustMin: string;
|
|
13
|
-
widthGrowth: number | undefined;
|
|
14
13
|
height: Range;
|
|
15
14
|
heightJustMin: string;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
alignment: Align;
|
|
16
|
+
extraAlignment: Align;
|
|
17
|
+
stretchFactorX: number | undefined;
|
|
18
|
+
stretchFactorY: number | undefined;
|
|
19
19
|
contentWrapping: boolean;
|
|
20
20
|
overlayVisible: boolean | undefined;
|
|
21
21
|
readonly style: CSSStyleDeclaration;
|
|
@@ -37,15 +37,17 @@ export type ElCoords = {
|
|
|
37
37
|
y2: number;
|
|
38
38
|
};
|
|
39
39
|
export declare enum Align {
|
|
40
|
-
default = 16,
|
|
41
|
-
stretch = 0,
|
|
42
40
|
left = 1,
|
|
43
41
|
centerX = 2,
|
|
44
42
|
right = 3,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
stretchX = 4,
|
|
44
|
+
top = 8,
|
|
45
|
+
centerY = 16,
|
|
46
|
+
bottom = 24,
|
|
47
|
+
stretchY = 32,
|
|
48
|
+
center = 18,
|
|
49
|
+
stretch = 36,
|
|
50
|
+
default = 0
|
|
49
51
|
}
|
|
50
52
|
export type Range = {
|
|
51
53
|
readonly min?: string;
|
|
@@ -69,11 +71,11 @@ export declare class ElImpl<T extends Element = any, M = any> implements El<T, M
|
|
|
69
71
|
private _area;
|
|
70
72
|
private _coords;
|
|
71
73
|
private _width;
|
|
72
|
-
private _widthGrowth;
|
|
73
74
|
private _height;
|
|
74
|
-
private
|
|
75
|
-
private
|
|
76
|
-
private
|
|
75
|
+
private _alignment;
|
|
76
|
+
private _extraAlignment;
|
|
77
|
+
private _stretchFactorX;
|
|
78
|
+
private _stretchFactorY;
|
|
77
79
|
private _contentWrapping;
|
|
78
80
|
private _overlayVisible;
|
|
79
81
|
private _hasStylingPresets;
|
|
@@ -90,18 +92,18 @@ export declare class ElImpl<T extends Element = any, M = any> implements El<T, M
|
|
|
90
92
|
set width(value: Range);
|
|
91
93
|
get widthJustMin(): string;
|
|
92
94
|
set widthJustMin(value: string);
|
|
93
|
-
get widthGrowth(): number | undefined;
|
|
94
|
-
set widthGrowth(value: number | undefined);
|
|
95
95
|
get height(): Range;
|
|
96
96
|
set height(value: Range);
|
|
97
97
|
get heightJustMin(): string;
|
|
98
98
|
set heightJustMin(value: string);
|
|
99
|
-
get
|
|
100
|
-
set
|
|
101
|
-
get
|
|
102
|
-
set
|
|
103
|
-
get
|
|
104
|
-
set
|
|
99
|
+
get alignment(): Align;
|
|
100
|
+
set alignment(value: Align);
|
|
101
|
+
get extraAlignment(): Align;
|
|
102
|
+
set extraAlignment(value: Align);
|
|
103
|
+
get stretchFactorX(): number | undefined;
|
|
104
|
+
set stretchFactorX(value: number | undefined);
|
|
105
|
+
get stretchFactorY(): number | undefined;
|
|
106
|
+
set stretchFactorY(value: number | undefined);
|
|
105
107
|
get contentWrapping(): boolean;
|
|
106
108
|
set contentWrapping(value: boolean);
|
|
107
109
|
get overlayVisible(): boolean | undefined;
|
|
@@ -135,14 +137,14 @@ export declare class CursorCommandDriver extends ElDriver<Element, unknown> {
|
|
|
135
137
|
export declare class Apply {
|
|
136
138
|
static kind<T extends Element>(element: El<T, any>, value: ElKind): void;
|
|
137
139
|
static coords<T extends Element>(element: El<T, any>, value: ElCoords | undefined): void;
|
|
138
|
-
static widthGrowth<T extends Element>(element: El<T, any>, value: number): void;
|
|
139
140
|
static minWidth<T extends Element>(element: El<T, any>, value: string): void;
|
|
140
141
|
static maxWidth<T extends Element>(element: El<T, any>, value: string): void;
|
|
141
|
-
static heightGrowth<T extends Element>(element: El<T, any>, value: number): void;
|
|
142
142
|
static minHeight<T extends Element>(element: El<T, any>, value: string): void;
|
|
143
143
|
static maxHeight<T extends Element>(element: El<T, any>, value: string): void;
|
|
144
|
-
static
|
|
145
|
-
static
|
|
144
|
+
static alignment<T extends Element>(element: El<T, any>, value: Align): void;
|
|
145
|
+
static extraAlignment<T extends Element>(element: El<T, any>, value: Align): void;
|
|
146
|
+
static stretchFactorX<T extends Element>(element: El<T, any>, value: number): void;
|
|
147
|
+
static stretchFactorY<T extends Element>(element: El<T, any>, value: number): void;
|
|
146
148
|
static contentWrapping<T extends Element>(element: El<T, any>, value: boolean): void;
|
|
147
149
|
static overlayVisible<T extends Element>(element: El<T, any>, value: boolean | undefined): void;
|
|
148
150
|
static stylingPreset<T extends Element>(element: El<T, any>, secondary: boolean, styleName: string, enabled?: boolean): void;
|
|
@@ -17,15 +17,17 @@ export var ElKind;
|
|
|
17
17
|
})(ElKind || (ElKind = {}));
|
|
18
18
|
export var Align;
|
|
19
19
|
(function (Align) {
|
|
20
|
-
Align[Align["default"] = 16] = "default";
|
|
21
|
-
Align[Align["stretch"] = 0] = "stretch";
|
|
22
20
|
Align[Align["left"] = 1] = "left";
|
|
23
21
|
Align[Align["centerX"] = 2] = "centerX";
|
|
24
22
|
Align[Align["right"] = 3] = "right";
|
|
25
|
-
Align[Align["
|
|
26
|
-
Align[Align["
|
|
27
|
-
Align[Align["
|
|
28
|
-
Align[Align["
|
|
23
|
+
Align[Align["stretchX"] = 4] = "stretchX";
|
|
24
|
+
Align[Align["top"] = 8] = "top";
|
|
25
|
+
Align[Align["centerY"] = 16] = "centerY";
|
|
26
|
+
Align[Align["bottom"] = 24] = "bottom";
|
|
27
|
+
Align[Align["stretchY"] = 32] = "stretchY";
|
|
28
|
+
Align[Align["center"] = 18] = "center";
|
|
29
|
+
Align[Align["stretch"] = 36] = "stretch";
|
|
30
|
+
Align[Align["default"] = 0] = "default";
|
|
29
31
|
})(Align || (Align = {}));
|
|
30
32
|
export class ElImpl {
|
|
31
33
|
constructor(node) {
|
|
@@ -39,11 +41,11 @@ export class ElImpl {
|
|
|
39
41
|
this._area = undefined;
|
|
40
42
|
this._coords = UndefinedElCoords;
|
|
41
43
|
this._width = { min: "", max: "" };
|
|
42
|
-
this._widthGrowth = undefined;
|
|
43
44
|
this._height = { min: "", max: "" };
|
|
44
|
-
this.
|
|
45
|
-
this.
|
|
46
|
-
this.
|
|
45
|
+
this._alignment = Align.default;
|
|
46
|
+
this._extraAlignment = Align.default;
|
|
47
|
+
this._stretchFactorX = undefined;
|
|
48
|
+
this._stretchFactorY = undefined;
|
|
47
49
|
this._contentWrapping = true;
|
|
48
50
|
this._overlayVisible = undefined;
|
|
49
51
|
this._hasStylingPresets = false;
|
|
@@ -104,13 +106,6 @@ export class ElImpl {
|
|
|
104
106
|
}
|
|
105
107
|
get widthJustMin() { var _a; return (_a = this._width.min) !== null && _a !== void 0 ? _a : ""; }
|
|
106
108
|
set widthJustMin(value) { this.width = { min: value }; }
|
|
107
|
-
get widthGrowth() { return this._widthGrowth; }
|
|
108
|
-
set widthGrowth(value) {
|
|
109
|
-
if (value !== this._widthGrowth) {
|
|
110
|
-
Apply.widthGrowth(this, value !== null && value !== void 0 ? value : 0);
|
|
111
|
-
this._widthGrowth = value;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
109
|
get height() { return this._height; }
|
|
115
110
|
set height(value) {
|
|
116
111
|
var _a, _b;
|
|
@@ -129,25 +124,32 @@ export class ElImpl {
|
|
|
129
124
|
}
|
|
130
125
|
get heightJustMin() { var _a; return (_a = this._height.min) !== null && _a !== void 0 ? _a : ""; }
|
|
131
126
|
set heightJustMin(value) { this.height = { min: value }; }
|
|
132
|
-
get
|
|
133
|
-
set
|
|
134
|
-
if (value !== this.
|
|
135
|
-
Apply.
|
|
136
|
-
this.
|
|
127
|
+
get alignment() { return this._alignment; }
|
|
128
|
+
set alignment(value) {
|
|
129
|
+
if (value !== this._alignment) {
|
|
130
|
+
Apply.alignment(this, value);
|
|
131
|
+
this._alignment = value;
|
|
137
132
|
}
|
|
138
133
|
}
|
|
139
|
-
get
|
|
140
|
-
set
|
|
141
|
-
if (value !== this.
|
|
142
|
-
Apply.
|
|
143
|
-
this.
|
|
134
|
+
get extraAlignment() { return this._extraAlignment; }
|
|
135
|
+
set extraAlignment(value) {
|
|
136
|
+
if (value !== this._extraAlignment) {
|
|
137
|
+
Apply.extraAlignment(this, value);
|
|
138
|
+
this._extraAlignment = value;
|
|
144
139
|
}
|
|
145
140
|
}
|
|
146
|
-
get
|
|
147
|
-
set
|
|
148
|
-
if (value !== this.
|
|
149
|
-
Apply.
|
|
150
|
-
this.
|
|
141
|
+
get stretchFactorX() { return this._stretchFactorX; }
|
|
142
|
+
set stretchFactorX(value) {
|
|
143
|
+
if (value !== this._stretchFactorX) {
|
|
144
|
+
Apply.stretchFactorX(this, value !== null && value !== void 0 ? value : 0);
|
|
145
|
+
this._stretchFactorX = value;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
get stretchFactorY() { return this._stretchFactorY; }
|
|
149
|
+
set stretchFactorY(value) {
|
|
150
|
+
if (value !== this._stretchFactorY) {
|
|
151
|
+
Apply.stretchFactorY(this, value !== null && value !== void 0 ? value : 0);
|
|
152
|
+
this._stretchFactorY = value;
|
|
151
153
|
}
|
|
152
154
|
}
|
|
153
155
|
get contentWrapping() { return this._contentWrapping; }
|
|
@@ -325,19 +327,6 @@ export class Apply {
|
|
|
325
327
|
s.gridArea = "";
|
|
326
328
|
}
|
|
327
329
|
}
|
|
328
|
-
static widthGrowth(element, value) {
|
|
329
|
-
if (element.native instanceof HTMLElement) {
|
|
330
|
-
const s = element.native.style;
|
|
331
|
-
if (value > 0) {
|
|
332
|
-
s.flexGrow = `${value}`;
|
|
333
|
-
s.flexBasis = "0";
|
|
334
|
-
}
|
|
335
|
-
else {
|
|
336
|
-
s.flexGrow = "";
|
|
337
|
-
s.flexBasis = "";
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
330
|
static minWidth(element, value) {
|
|
342
331
|
if (element.native instanceof HTMLElement)
|
|
343
332
|
element.native.style.minWidth = `${value}`;
|
|
@@ -346,27 +335,6 @@ export class Apply {
|
|
|
346
335
|
if (element.native instanceof HTMLElement)
|
|
347
336
|
element.native.style.maxWidth = `${value}`;
|
|
348
337
|
}
|
|
349
|
-
static heightGrowth(element, value) {
|
|
350
|
-
const bNode = element.node;
|
|
351
|
-
const driver = bNode.driver;
|
|
352
|
-
if (driver.isPartition) {
|
|
353
|
-
if (element.native instanceof HTMLElement) {
|
|
354
|
-
const s = element.native.style;
|
|
355
|
-
if (value > 0)
|
|
356
|
-
s.flexGrow = `${value}`;
|
|
357
|
-
else
|
|
358
|
-
s.flexGrow = "";
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
else {
|
|
362
|
-
const hostDriver = bNode.host.driver;
|
|
363
|
-
if (hostDriver.isPartition) {
|
|
364
|
-
const host = bNode.host.seat.instance;
|
|
365
|
-
Apply.boundsAlignment(element, Align.stretch);
|
|
366
|
-
Apply.heightGrowth(host.element, value);
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
338
|
static minHeight(element, value) {
|
|
371
339
|
if (element.native instanceof HTMLElement)
|
|
372
340
|
element.native.style.minHeight = `${value}`;
|
|
@@ -375,11 +343,24 @@ export class Apply {
|
|
|
375
343
|
if (element.native instanceof HTMLElement)
|
|
376
344
|
element.native.style.maxHeight = `${value}`;
|
|
377
345
|
}
|
|
378
|
-
static
|
|
346
|
+
static alignment(element, value) {
|
|
347
|
+
if (element.native instanceof HTMLElement) {
|
|
348
|
+
const s = element.native.style;
|
|
349
|
+
if (value !== Align.default) {
|
|
350
|
+
const v = AlignToCss[(value >> 3) & 0b11];
|
|
351
|
+
const h = AlignToCss[value & 0b11];
|
|
352
|
+
s.alignSelf = v;
|
|
353
|
+
s.justifySelf = h;
|
|
354
|
+
}
|
|
355
|
+
else
|
|
356
|
+
s.alignSelf = s.justifySelf = "";
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
static extraAlignment(element, value) {
|
|
379
360
|
if (element.native instanceof HTMLElement) {
|
|
380
361
|
const s = element.native.style;
|
|
381
|
-
if (
|
|
382
|
-
const v = AlignToCss[(value >>
|
|
362
|
+
if (value !== Align.default) {
|
|
363
|
+
const v = AlignToCss[(value >> 3) & 0b11];
|
|
383
364
|
const h = AlignToCss[value & 0b11];
|
|
384
365
|
const t = TextAlignCss[value & 0b11];
|
|
385
366
|
s.justifyContent = v;
|
|
@@ -390,17 +371,38 @@ export class Apply {
|
|
|
390
371
|
s.justifyContent = s.alignContent = s.textAlign = "";
|
|
391
372
|
}
|
|
392
373
|
}
|
|
393
|
-
static
|
|
374
|
+
static stretchFactorX(element, value) {
|
|
394
375
|
if (element.native instanceof HTMLElement) {
|
|
395
376
|
const s = element.native.style;
|
|
396
|
-
if (
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
377
|
+
if (value > 0) {
|
|
378
|
+
s.flexGrow = `${value}`;
|
|
379
|
+
s.flexBasis = "0";
|
|
380
|
+
}
|
|
381
|
+
else {
|
|
382
|
+
s.flexGrow = "";
|
|
383
|
+
s.flexBasis = "";
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
static stretchFactorY(element, value) {
|
|
388
|
+
const bNode = element.node;
|
|
389
|
+
const driver = bNode.driver;
|
|
390
|
+
if (driver.isPartition) {
|
|
391
|
+
if (element.native instanceof HTMLElement) {
|
|
392
|
+
const s = element.native.style;
|
|
393
|
+
if (value > 0)
|
|
394
|
+
s.flexGrow = `${value}`;
|
|
395
|
+
else
|
|
396
|
+
s.flexGrow = "";
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
else {
|
|
400
|
+
const hostDriver = bNode.host.driver;
|
|
401
|
+
if (hostDriver.isPartition) {
|
|
402
|
+
const host = bNode.host.seat.instance;
|
|
403
|
+
Apply.alignment(element, Align.stretch);
|
|
404
|
+
Apply.stretchFactorY(host.element, value);
|
|
401
405
|
}
|
|
402
|
-
else
|
|
403
|
-
s.alignSelf = s.justifySelf = "";
|
|
404
406
|
}
|
|
405
407
|
}
|
|
406
408
|
static contentWrapping(element, value) {
|