verstak 0.24.264 → 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;
@@ -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) {
@@ -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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "verstak",
3
- "version": "0.24.264",
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.264"
34
+ "reactronic": "^0.24.265"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/node": "20.11.17",