verstak 0.24.263 → 0.24.265

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.
@@ -10,10 +10,10 @@ export type El<T = any, M = any> = {
10
10
  area: ElArea;
11
11
  width: Range;
12
12
  widthJustMin: string;
13
- widthJustGrowth: number;
13
+ widthGrowth: number | undefined;
14
14
  height: Range;
15
15
  heightJustMin: string;
16
- heightJustGrowth: number;
16
+ heightGrowth: number | undefined;
17
17
  contentAlignment: Align;
18
18
  boundsAlignment: Align;
19
19
  contentWrapping: boolean;
@@ -50,7 +50,6 @@ export declare enum Align {
50
50
  export type Range = {
51
51
  readonly min?: string;
52
52
  readonly max?: string;
53
- readonly growth?: number;
54
53
  };
55
54
  export type MarkedRange = Range & {
56
55
  readonly marker?: string;
@@ -70,7 +69,9 @@ export declare class ElImpl<T extends Element = any, M = any> implements El<T, M
70
69
  private _area;
71
70
  private _coords;
72
71
  private _width;
72
+ private _widthGrowth;
73
73
  private _height;
74
+ private _heightGrowth;
74
75
  private _contentAlignment;
75
76
  private _boundsAlignment;
76
77
  private _contentWrapping;
@@ -89,14 +90,14 @@ export declare class ElImpl<T extends Element = any, M = any> implements El<T, M
89
90
  set width(value: Range);
90
91
  get widthJustMin(): string;
91
92
  set widthJustMin(value: string);
92
- get widthJustGrowth(): number;
93
- set widthJustGrowth(value: number);
93
+ get widthGrowth(): number | undefined;
94
+ set widthGrowth(value: number | undefined);
94
95
  get height(): Range;
95
96
  set height(value: Range);
96
97
  get heightJustMin(): string;
97
98
  set heightJustMin(value: string);
98
- get heightJustGrowth(): number;
99
- set heightJustGrowth(value: number);
99
+ get heightGrowth(): number | undefined;
100
+ set heightGrowth(value: number | undefined);
100
101
  get contentAlignment(): Align;
101
102
  set contentAlignment(value: Align);
102
103
  get boundsAlignment(): Align;
@@ -38,8 +38,10 @@ export class ElImpl {
38
38
  this._kind = ElKind.part;
39
39
  this._area = undefined;
40
40
  this._coords = UndefinedElCoords;
41
- this._width = { min: "", max: "", growth: 0 };
42
- this._height = { min: "", max: "", growth: 0 };
41
+ this._width = { min: "", max: "" };
42
+ this._widthGrowth = undefined;
43
+ this._height = { min: "", max: "" };
44
+ this._heightGrowth = undefined;
43
45
  this._contentAlignment = Align.default;
44
46
  this._boundsAlignment = Align.default;
45
47
  this._contentWrapping = true;
@@ -66,7 +68,7 @@ export class ElImpl {
66
68
  var _a, _b;
67
69
  const node = this.node;
68
70
  const driver = node.driver;
69
- if (!driver.isPartitionSeparator) {
71
+ if (!driver.isPartition) {
70
72
  const owner = node.owner;
71
73
  const ownerEl = owner.element;
72
74
  const prevEl = (_a = node.seat.prev) === null || _a === void 0 ? void 0 : _a.instance.element;
@@ -86,7 +88,7 @@ export class ElImpl {
86
88
  }
87
89
  get width() { return this._width; }
88
90
  set width(value) {
89
- var _a, _b, _c;
91
+ var _a, _b;
90
92
  const w = this._width;
91
93
  let updated = false;
92
94
  if (value.min !== w.min) {
@@ -97,20 +99,21 @@ export class ElImpl {
97
99
  Apply.maxWidth(this, (_b = value.max) !== null && _b !== void 0 ? _b : "");
98
100
  updated = true;
99
101
  }
100
- if (value.growth !== w.growth) {
101
- Apply.widthGrowth(this, (_c = value.growth) !== null && _c !== void 0 ? _c : 0);
102
- updated = true;
103
- }
104
102
  if (updated)
105
103
  this._width = value;
106
104
  }
107
105
  get widthJustMin() { var _a; return (_a = this._width.min) !== null && _a !== void 0 ? _a : ""; }
108
106
  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 }; }
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
+ }
111
114
  get height() { return this._height; }
112
115
  set height(value) {
113
- var _a, _b, _c;
116
+ var _a, _b;
114
117
  const w = this._height;
115
118
  let updated = false;
116
119
  if (value.min !== w.min) {
@@ -121,17 +124,18 @@ export class ElImpl {
121
124
  Apply.maxHeight(this, (_b = value.max) !== null && _b !== void 0 ? _b : "");
122
125
  updated = true;
123
126
  }
124
- if (value.growth !== w.growth) {
125
- Apply.heightGrowth(this, (_c = value.growth) !== null && _c !== void 0 ? _c : 0);
126
- updated = true;
127
- }
128
127
  if (updated)
129
128
  this._height = value;
130
129
  }
131
130
  get heightJustMin() { var _a; return (_a = this._height.min) !== null && _a !== void 0 ? _a : ""; }
132
131
  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 }; }
132
+ get heightGrowth() { return this._heightGrowth; }
133
+ set heightGrowth(value) {
134
+ if (value !== this._heightGrowth) {
135
+ Apply.heightGrowth(this, value !== null && value !== void 0 ? value : 0);
136
+ this._heightGrowth = value;
137
+ }
138
+ }
135
139
  get contentAlignment() { return this._contentAlignment; }
136
140
  set contentAlignment(value) {
137
141
  if (value !== this._contentAlignment) {
@@ -345,7 +349,7 @@ export class Apply {
345
349
  static heightGrowth(element, value) {
346
350
  const bNode = element.node;
347
351
  const driver = bNode.driver;
348
- if (driver.isPartitionSeparator) {
352
+ if (driver.isPartition) {
349
353
  if (element.native instanceof HTMLElement) {
350
354
  const s = element.native.style;
351
355
  if (value > 0)
@@ -356,7 +360,7 @@ export class Apply {
356
360
  }
357
361
  else {
358
362
  const hostDriver = bNode.host.driver;
359
- if (hostDriver.isPartitionSeparator) {
363
+ if (hostDriver.isPartition) {
360
364
  const host = bNode.host.seat.instance;
361
365
  Apply.boundsAlignment(element, Align.stretch);
362
366
  Apply.heightGrowth(host.element, value);
@@ -458,8 +462,8 @@ export class Apply {
458
462
  }
459
463
  }
460
464
  export const Constants = {
461
- element: "element",
462
- partition: "partition",
465
+ element: "el",
466
+ partition: "part",
463
467
  group: "group",
464
468
  layouts: ["section", "table", "note", "group", "", ""],
465
469
  keyAttrName: "key",
@@ -4,7 +4,7 @@ import { HtmlElementDriver } from "./HtmlDriver.js";
4
4
  export declare function Section<M = unknown>(declaration?: RxNodeDecl<El<HTMLElement, M>>, preset?: RxNodeDecl<El<HTMLElement, M>>): RxNode<El<HTMLElement, M>>;
5
5
  export declare function Table<M = unknown, R = void>(declaration?: RxNodeDecl<El<HTMLElement, M>>, preset?: RxNodeDecl<El<HTMLElement, M>>): RxNode<El<HTMLElement, M>>;
6
6
  export declare function row<T = void>(builder?: (element: void) => T, shiftCursorDown?: number): void;
7
- export declare function startNewRow(shiftCursorDown?: number): void;
7
+ export declare function rowBreak(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>>;
@@ -8,10 +8,10 @@ export function Table(declaration, preset) {
8
8
  return RxNode.declare(Drivers.table, declaration, preset);
9
9
  }
10
10
  export function row(builder, shiftCursorDown) {
11
- startNewRow(shiftCursorDown);
11
+ rowBreak(shiftCursorDown);
12
12
  builder === null || builder === void 0 ? void 0 : builder();
13
13
  }
14
- export function startNewRow(shiftCursorDown) {
14
+ export function rowBreak(shiftCursorDown) {
15
15
  RxNode.declare(Drivers.partition);
16
16
  }
17
17
  export function cursor(areaParams) {
@@ -44,7 +44,7 @@ export class VerstakElementDriver extends HtmlElementDriver {
44
44
  update(node) {
45
45
  const element = node.element;
46
46
  if (element.kind === ElKind.section)
47
- startNewRow();
47
+ rowBreak();
48
48
  return super.update(node);
49
49
  }
50
50
  }
@@ -6,10 +6,10 @@ export class WebDriver extends ElDriver {
6
6
  create(node) {
7
7
  this.setNativeElement(node);
8
8
  const e = node.element.native;
9
- if (RxSystem.isLogging && e !== undefined && !node.driver.isPartitionSeparator)
9
+ if (RxSystem.isLogging && e !== undefined && !node.driver.isPartition)
10
10
  e.setAttribute(Constants.keyAttrName, node.key);
11
11
  super.create(node);
12
- if (e == undefined && RxSystem.isLogging && !node.driver.isPartitionSeparator)
12
+ if (e == undefined && RxSystem.isLogging && !node.driver.isPartition)
13
13
  node.element.native.setAttribute(Constants.keyAttrName, node.key);
14
14
  }
15
15
  destroy(node, isLeader) {
@@ -33,9 +33,9 @@ export class WebDriver extends ElDriver {
33
33
  const automaticHost = RxNode.findMatchingHost(node, n => n.element.native instanceof HTMLElement || n.element.native instanceof SVGElement);
34
34
  const automaticNativeHost = automaticHost === null || automaticHost === void 0 ? void 0 : automaticHost.element.native;
35
35
  if (automaticNativeHost) {
36
- if (sequential && !node.driver.isPartitionSeparator) {
36
+ if (sequential && !node.driver.isPartition) {
37
37
  const after = RxNode.findMatchingPrevSibling(node, n => n.element.native instanceof HTMLElement || n.element.native instanceof SVGElement);
38
- if (after === undefined || after.driver.isPartitionSeparator) {
38
+ if (after === undefined || after.driver.isPartition) {
39
39
  if (automaticNativeHost !== native.parentNode || !native.previousSibling)
40
40
  automaticNativeHost.prepend(native);
41
41
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "verstak",
3
- "version": "0.24.263",
3
+ "version": "0.24.265",
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.263"
34
+ "reactronic": "^0.24.265"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/node": "20.11.17",