verstak 0.22.512 → 0.22.515

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.
@@ -12,6 +12,7 @@ export declare const enum Priority {
12
12
  export declare type Type<T> = new (...args: any[]) => T;
13
13
  export declare type BlockBody<T = unknown, M = unknown, R = void> = Render<T, M, R> | BlockVmt<T, M, R>;
14
14
  export interface BlockVmt<T = unknown, M = unknown, R = void> {
15
+ key?: string;
15
16
  reacting?: boolean;
16
17
  triggers?: unknown;
17
18
  initialize?: Render<T, M, R>;
@@ -19,7 +20,7 @@ export interface BlockVmt<T = unknown, M = unknown, R = void> {
19
20
  render?: Render<T, M, R>;
20
21
  finalize?: Render<T, M, R>;
21
22
  }
22
- export declare function asComponent<T, M, R>(outer: BlockBody<T, M, R> | undefined, base: BlockBody<T, M, R>): BlockVmt<T, M, R>;
23
+ export declare function asBaseFor<T, M, R>(outer: BlockBody<T, M, R> | undefined, base: BlockBody<T, M, R>): BlockVmt<T, M, R>;
23
24
  export declare function setContext<T extends Object>(type: Type<T>, context: T): void;
24
25
  export declare function use<T extends Object>(type: Type<T>): T;
25
26
  export declare abstract class VBlock<T = unknown, M = unknown, R = void> {
@@ -27,22 +28,22 @@ export declare abstract class VBlock<T = unknown, M = unknown, R = void> {
27
28
  static readonly longFrameDuration = 300;
28
29
  static currentRenderingPriority: Priority;
29
30
  static frameDuration: number;
30
- abstract readonly name: string;
31
+ abstract readonly key: string;
31
32
  abstract readonly driver: AbstractDriver<T>;
32
33
  abstract readonly body: Readonly<BlockVmt<T, M, R>>;
33
34
  abstract model: M;
34
35
  abstract cells: Cells;
35
36
  abstract widthGrowth: number;
36
- abstract widthMin: string;
37
- abstract widthMax: string;
37
+ abstract minWidth: string;
38
+ abstract maxWidth: string;
38
39
  abstract heightGrowth: number;
39
- abstract heightMin: string;
40
- abstract heightMax: string;
41
- abstract alignContent: Align;
42
- abstract alignFrame: Align;
43
- abstract wrapContent: boolean;
44
- abstract dangling: boolean;
45
- abstract shuffleChildren: boolean;
40
+ abstract minHeight: string;
41
+ abstract maxHeight: string;
42
+ abstract contentAlignment: Align;
43
+ abstract frameAlignment: Align;
44
+ abstract contentWrapping: boolean;
45
+ abstract floating: boolean;
46
+ abstract childrenShuffling: boolean;
46
47
  abstract renderingPriority?: Priority;
47
48
  abstract readonly level: number;
48
49
  abstract readonly host: VBlock;
@@ -56,7 +57,7 @@ export declare abstract class VBlock<T = unknown, M = unknown, R = void> {
56
57
  static get current(): VBlock;
57
58
  static renderNestedTreesThenDo(action: (error: unknown) => void): void;
58
59
  static runForAllBlocks<T>(action: (e: T) => void): void;
59
- static claim<T = undefined, M = unknown, R = void>(name: string, driver: AbstractDriver<T> | undefined, body: BlockBody<T, M, R>): VBlock<T, M, R>;
60
+ static claim<T = undefined, M = unknown, R = void>(driver: AbstractDriver<T> | undefined, body: BlockBody<T, M, R>): VBlock<T, M, R>;
60
61
  static getDefaultLoggingOptions(): LoggingOptions | undefined;
61
62
  static setDefaultLoggingOptions(logging?: LoggingOptions): void;
62
63
  }
@@ -83,15 +84,15 @@ export declare class AbstractDriver<T> {
83
84
  deploy(block: VBlock<T>, sequential: boolean): void;
84
85
  applyCellRange(block: VBlock<T, any, any>, cellRange: CellRange | undefined): void;
85
86
  applyWidthGrowth(block: VBlock<T, any, any>, widthGrowth: number): void;
86
- applyWidthMin(block: VBlock<T, any, any>, widthMin: string): void;
87
- applyWidthMax(block: VBlock<T, any, any>, widthMax: string): void;
87
+ applyMinWidth(block: VBlock<T, any, any>, minWidth: string): void;
88
+ applyMaxWidth(block: VBlock<T, any, any>, maxWidth: string): void;
88
89
  applyHeightGrowth(block: VBlock<T, any, any>, heightGrowth: number): void;
89
- applyHeightMin(block: VBlock<T, any, any>, heightMin: string): void;
90
- applyHeightMax(block: VBlock<T, any, any>, heightMax: string): void;
91
- applyAlignContent(block: VBlock<T, any, any>, alignContent: Align): void;
92
- applyAlignFrame(block: VBlock<T, any, any>, alignFrame: Align): void;
93
- applyWrapContent(block: VBlock<T, any, any>, wrapContent: boolean): void;
94
- applyDangling(block: VBlock<T, any, any>, dangling: boolean): void;
90
+ applyMinHeight(block: VBlock<T, any, any>, minHeight: string): void;
91
+ applyMaxHeight(block: VBlock<T, any, any>, maxHeight: string): void;
92
+ applyContentAlignment(block: VBlock<T, any, any>, contentAlignment: Align): void;
93
+ applyFrameAlignment(block: VBlock<T, any, any>, frameAlignment: Align): void;
94
+ applyContentWrapping(block: VBlock<T, any, any>, contentWrapping: boolean): void;
95
+ applyFloating(block: VBlock<T, any, any>, floating: boolean): void;
95
96
  render(block: VBlock<T>): void | Promise<void>;
96
97
  }
97
98
  export declare class StaticDriver<T> extends AbstractDriver<T> {
@@ -25,7 +25,7 @@ export var Priority;
25
25
  Priority[Priority["AsyncP1"] = 1] = "AsyncP1";
26
26
  Priority[Priority["AsyncP2"] = 2] = "AsyncP2";
27
27
  })(Priority || (Priority = {}));
28
- export function asComponent(outer, base) {
28
+ export function asBaseFor(outer, base) {
29
29
  if (outer instanceof Function)
30
30
  outer = { render: outer };
31
31
  if (base instanceof Function)
@@ -60,22 +60,22 @@ export class VBlock {
60
60
  static runForAllBlocks(action) {
61
61
  forEachChildRecursively(gSysRoot, action);
62
62
  }
63
- static claim(name, driver, body) {
63
+ static claim(driver, body) {
64
64
  var _a, _b;
65
- if (body instanceof Function)
66
- body = { render: body };
67
65
  let result;
68
66
  const owner = gCurrent.instance;
69
67
  const children = owner.children;
70
68
  let ex = undefined;
71
69
  driver !== null && driver !== void 0 ? driver : (driver = AbstractDriver.group);
72
- name || (name = `${++owner.numerator}`);
70
+ if (body instanceof Function)
71
+ body = { render: body };
72
+ let key = body.key;
73
73
  if (driver.isRow) {
74
74
  const last = children.lastClaimedItem();
75
75
  if (((_a = last === null || last === void 0 ? void 0 : last.instance) === null || _a === void 0 ? void 0 : _a.driver) === driver)
76
76
  ex = last;
77
77
  }
78
- ex !== null && ex !== void 0 ? ex : (ex = children.claim(name, undefined, "nested blocks can be declared inside render function only"));
78
+ ex !== null && ex !== void 0 ? ex : (ex = children.claim(key = key || `${++owner.numerator}!`, undefined, "nested blocks can be declared inside render function only"));
79
79
  if (ex) {
80
80
  result = ex.instance;
81
81
  if (result.driver !== driver && driver !== undefined)
@@ -86,7 +86,7 @@ export class VBlock {
86
86
  result.body = body;
87
87
  }
88
88
  else {
89
- result = new VBlockImpl(name, driver, owner, body);
89
+ result = new VBlockImpl(key || `${++owner.numerator}!`, driver, owner, body);
90
90
  result.item = children.add(result);
91
91
  VBlockImpl.grandCount++;
92
92
  if (body.reacting)
@@ -144,23 +144,23 @@ export class AbstractDriver {
144
144
  }
145
145
  applyWidthGrowth(block, widthGrowth) {
146
146
  }
147
- applyWidthMin(block, widthMin) {
147
+ applyMinWidth(block, minWidth) {
148
148
  }
149
- applyWidthMax(block, widthMax) {
149
+ applyMaxWidth(block, maxWidth) {
150
150
  }
151
151
  applyHeightGrowth(block, heightGrowth) {
152
152
  }
153
- applyHeightMin(block, heightMin) {
153
+ applyMinHeight(block, minHeight) {
154
154
  }
155
- applyHeightMax(block, heightMax) {
155
+ applyMaxHeight(block, maxHeight) {
156
156
  }
157
- applyAlignContent(block, alignContent) {
157
+ applyContentAlignment(block, contentAlignment) {
158
158
  }
159
- applyAlignFrame(block, alignFrame) {
159
+ applyFrameAlignment(block, frameAlignment) {
160
160
  }
161
- applyWrapContent(block, wrapContent) {
161
+ applyContentWrapping(block, contentWrapping) {
162
162
  }
163
- applyDangling(block, dangling) {
163
+ applyFloating(block, floating) {
164
164
  }
165
165
  render(block) {
166
166
  var _a;
@@ -188,8 +188,8 @@ export class StaticDriver extends AbstractDriver {
188
188
  super.initialize(block, this.element);
189
189
  }
190
190
  }
191
- function getBlockName(block) {
192
- return block.stamp >= 0 ? block.name : undefined;
191
+ function getBlockKey(block) {
192
+ return block.stamp >= 0 ? block.key : undefined;
193
193
  }
194
194
  class VBlockContext extends ObservableObject {
195
195
  constructor(type, instance) {
@@ -203,29 +203,29 @@ __decorate([
203
203
  __metadata("design:type", Object)
204
204
  ], VBlockContext.prototype, "type", void 0);
205
205
  class VBlockImpl extends VBlock {
206
- constructor(name, driver, owner, body) {
206
+ constructor(key, driver, owner, body) {
207
207
  super();
208
- this.name = name;
208
+ this.key = key;
209
209
  this.driver = driver;
210
210
  this.body = body;
211
211
  this.model = undefined;
212
212
  this.assignedCells = undefined;
213
213
  this.appliedCellRange = Cursor.UndefinedCellRange;
214
214
  this.appliedWidthGrowth = 0;
215
- this.appliedWidthMin = "";
216
- this.appliedWidthMax = "";
215
+ this.appliedMinWidth = "";
216
+ this.appliedMaxWidth = "";
217
217
  this.appliedHeightGrowth = 0;
218
- this.appliedHeightMin = "";
219
- this.appliedHeightMax = "";
220
- this.appliedAlignContent = Align.Default;
221
- this.appliedAlignFrame = Align.Default;
222
- this.appliedWrapContent = false;
223
- this.appliedDangling = false;
224
- this.shuffleChildren = false;
218
+ this.appliedMinHeight = "";
219
+ this.appliedMaxHeight = "";
220
+ this.appliedContentAlignment = Align.Default;
221
+ this.appliedFrameAlignment = Align.Default;
222
+ this.appliedContentWrapping = false;
223
+ this.appliedFloating = false;
224
+ this.childrenShuffling = false;
225
225
  this.renderingPriority = Priority.SyncP0;
226
226
  this.level = owner.level + 1;
227
227
  this.host = owner;
228
- this.children = new Collection(driver.isSequential, getBlockName);
228
+ this.children = new Collection(driver.isSequential, getBlockKey);
229
229
  this.numerator = 0;
230
230
  this.item = undefined;
231
231
  this.stamp = 0;
@@ -255,18 +255,18 @@ class VBlockImpl extends VBlock {
255
255
  this.appliedWidthGrowth = value;
256
256
  }
257
257
  }
258
- get widthMin() { return this.appliedWidthMin; }
259
- set widthMin(value) {
260
- if (value !== this.appliedWidthMin) {
261
- this.driver.applyWidthMin(this, value);
262
- this.appliedWidthMin = value;
258
+ get minWidth() { return this.appliedMinWidth; }
259
+ set minWidth(value) {
260
+ if (value !== this.appliedMinWidth) {
261
+ this.driver.applyMinWidth(this, value);
262
+ this.appliedMinWidth = value;
263
263
  }
264
264
  }
265
- get widthMax() { return this.appliedWidthMax; }
266
- set widthMax(value) {
267
- if (value !== this.appliedWidthMax) {
268
- this.driver.applyWidthMax(this, value);
269
- this.appliedWidthMax = value;
265
+ get maxWidth() { return this.appliedMaxWidth; }
266
+ set maxWidth(value) {
267
+ if (value !== this.appliedMaxWidth) {
268
+ this.driver.applyMaxWidth(this, value);
269
+ this.appliedMaxWidth = value;
270
270
  }
271
271
  }
272
272
  get heightGrowth() { return this.appliedHeightGrowth; }
@@ -276,46 +276,46 @@ class VBlockImpl extends VBlock {
276
276
  this.appliedHeightGrowth = value;
277
277
  }
278
278
  }
279
- get heightMin() { return this.appliedHeightMin; }
280
- set heightMin(value) {
281
- if (value !== this.appliedWidthMin) {
282
- this.driver.applyWidthMin(this, value);
283
- this.appliedWidthMin = value;
279
+ get minHeight() { return this.appliedMinHeight; }
280
+ set minHeight(value) {
281
+ if (value !== this.appliedMinWidth) {
282
+ this.driver.applyMinWidth(this, value);
283
+ this.appliedMinWidth = value;
284
284
  }
285
285
  }
286
- get heightMax() { return this.appliedHeightMax; }
287
- set heightMax(value) {
288
- if (value !== this.appliedWidthMax) {
289
- this.driver.applyWidthMax(this, value);
290
- this.appliedWidthMax = value;
286
+ get maxHeight() { return this.appliedMaxHeight; }
287
+ set maxHeight(value) {
288
+ if (value !== this.appliedMaxWidth) {
289
+ this.driver.applyMaxWidth(this, value);
290
+ this.appliedMaxWidth = value;
291
291
  }
292
292
  }
293
- get alignContent() { return this.appliedAlignContent; }
294
- set alignContent(value) {
295
- if (value !== this.appliedAlignContent) {
296
- this.driver.applyAlignContent(this, value);
297
- this.appliedAlignContent = value;
293
+ get contentAlignment() { return this.appliedContentAlignment; }
294
+ set contentAlignment(value) {
295
+ if (value !== this.appliedContentAlignment) {
296
+ this.driver.applyContentAlignment(this, value);
297
+ this.appliedContentAlignment = value;
298
298
  }
299
299
  }
300
- get alignFrame() { return this.appliedAlignFrame; }
301
- set alignFrame(value) {
302
- if (value !== this.appliedAlignFrame) {
303
- this.driver.applyAlignFrame(this, value);
304
- this.appliedAlignFrame = value;
300
+ get frameAlignment() { return this.appliedFrameAlignment; }
301
+ set frameAlignment(value) {
302
+ if (value !== this.appliedFrameAlignment) {
303
+ this.driver.applyFrameAlignment(this, value);
304
+ this.appliedFrameAlignment = value;
305
305
  }
306
306
  }
307
- get wrapContent() { return this.appliedWrapContent; }
308
- set wrapContent(value) {
309
- if (value !== this.appliedWrapContent) {
310
- this.driver.applyWrapContent(this, value);
311
- this.appliedWrapContent = value;
307
+ get contentWrapping() { return this.appliedContentWrapping; }
308
+ set contentWrapping(value) {
309
+ if (value !== this.appliedContentWrapping) {
310
+ this.driver.applyContentWrapping(this, value);
311
+ this.appliedContentWrapping = value;
312
312
  }
313
313
  }
314
- get dangling() { return this.appliedDangling; }
315
- set dangling(value) {
316
- if (value !== this.appliedDangling) {
317
- this.driver.applyDangling(this, value);
318
- this.appliedDangling = value;
314
+ get floating() { return this.appliedFloating; }
315
+ set floating(value) {
316
+ if (value !== this.appliedFloating) {
317
+ this.driver.applyFloating(this, value);
318
+ this.appliedFloating = value;
319
319
  }
320
320
  }
321
321
  configureReactronic(options) {
@@ -380,8 +380,12 @@ function runRenderNestedTreesThenDo(error, action) {
380
380
  let promised = undefined;
381
381
  try {
382
382
  children.endMerge(error);
383
- for (const item of children.removedItems(true))
383
+ for (const item of children.removedItems(true)) {
384
+ const b = item.instance;
385
+ if (b.key !== b.body.key)
386
+ console.warn(`every conditionally rendered block requires explicit key: ${b.key}, ${b.driver.name}`);
384
387
  runFinalize(item, true);
388
+ }
385
389
  if (!error) {
386
390
  const ownerIsBlock = owner.driver.isBlock;
387
391
  const sequential = children.strict;
@@ -449,7 +453,7 @@ function renderIncrementally(owner, stamp, allChildren, items, priority) {
449
453
  VBlock.currentRenderingPriority = priority;
450
454
  try {
451
455
  const sequential = block.children.strict;
452
- if (block.shuffleChildren)
456
+ if (block.childrenShuffling)
453
457
  shuffle(items);
454
458
  const frameDurationLimit = priority === Priority.AsyncP2 ? VBlock.shortFrameDuration : Infinity;
455
459
  let frameDuration = Math.min(frameDurationLimit, Math.max(VBlock.frameDuration / 4, VBlock.shortFrameDuration));
@@ -493,7 +497,7 @@ function prepareRender(item, redeploy, sequential) {
493
497
  if ((_a = block.body) === null || _a === void 0 ? void 0 : _a.reacting) {
494
498
  Transaction.outside(() => {
495
499
  if (Rx.isLogging)
496
- Rx.setLoggingHint(block, block.name);
500
+ Rx.setLoggingHint(block, block.key);
497
501
  Rx.getController(block.rerender).configure({
498
502
  order: block.level,
499
503
  });
@@ -530,7 +534,7 @@ function runRender(item) {
530
534
  }
531
535
  catch (e) {
532
536
  runRenderNestedTreesThenDo(e, NOP);
533
- console.log(`Rendering failed: ${block.name}`);
537
+ console.log(`Rendering failed: ${block.key}`);
534
538
  console.log(`${e}`);
535
539
  }
536
540
  });
@@ -550,7 +554,7 @@ function runFinalize(item, isLeader) {
550
554
  else
551
555
  gFirstToDispose = gLastToDispose = item;
552
556
  if (gFirstToDispose === item)
553
- Transaction.run({ separation: "disposal", hint: `runDisposalLoop(initiator=${item.instance.name})` }, () => {
557
+ Transaction.run({ separation: "disposal", hint: `runDisposalLoop(initiator=${item.instance.key})` }, () => {
554
558
  void runDisposalLoop().then(NOP, error => console.log(error));
555
559
  });
556
560
  }
@@ -648,7 +652,7 @@ function defaultReject(error) {
648
652
  Promise.prototype.then = reactronicDomHookedThen;
649
653
  const NOP = (...args) => { };
650
654
  const gSysDriver = new StaticDriver(null, "SYSTEM", LayoutKind.Group);
651
- const gSysRoot = Collection.createItem(new VBlockImpl("SYSTEM", gSysDriver, { level: 0 }, { reacting: true, render: NOP }));
655
+ const gSysRoot = Collection.createItem(new VBlockImpl(gSysDriver.name, gSysDriver, { level: 0 }, { reacting: true, render: NOP }));
652
656
  gSysRoot.instance.item = gSysRoot;
653
657
  Object.defineProperty(gSysRoot.instance, "host", {
654
658
  value: gSysRoot.instance,
@@ -1,23 +1,23 @@
1
1
  import { VBlock, BlockBody, Align, CellRange } from "../core/api";
2
2
  import { HtmlDriver } from "./HtmlDriver";
3
- export declare function Block<M = unknown, R = void>(name: string, args: BlockBody<HTMLElement, M, R>): VBlock<HTMLElement, M, R>;
4
- export declare function PlainText(content: string, name?: string, args?: BlockBody<HTMLElement, void, void>): VBlock<HTMLElement, void, void>;
5
- export declare function HtmlText(content: string, name?: string, args?: BlockBody<HTMLElement, void, void>): VBlock<HTMLElement, void, void>;
6
- export declare function Grid<M = unknown, R = void>(name: string, body: BlockBody<HTMLElement, M, R>): VBlock<HTMLElement, M, R>;
7
- export declare function Line<T = void>(claim: (x: void) => T): VBlock<HTMLElement>;
8
- export declare function lineFeed(body?: BlockBody<HTMLElement, void, void>, noCoalescing?: boolean): VBlock<HTMLElement>;
9
- export declare function Group<M = unknown, R = void>(name: string, body: BlockBody<HTMLElement, M, R>): VBlock<HTMLElement, M, R>;
3
+ export declare function Block<M = unknown, R = void>(body: BlockBody<HTMLElement, M, R>): VBlock<HTMLElement, M, R>;
4
+ export declare function PlainText(content: string, body?: BlockBody<HTMLElement, void, void>): VBlock<HTMLElement, void, void>;
5
+ export declare function HtmlText(content: string, body?: BlockBody<HTMLElement, void, void>): VBlock<HTMLElement, void, void>;
6
+ export declare function Grid<M = unknown, R = void>(body: BlockBody<HTMLElement, M, R>): VBlock<HTMLElement, M, R>;
7
+ export declare function Line<T = void>(body: (block: void) => T): void;
8
+ export declare function lineFeed(noCoalescing?: boolean, key?: string): VBlock<HTMLElement>;
9
+ export declare function Group<M = unknown, R = void>(body: BlockBody<HTMLElement, M, R>): VBlock<HTMLElement, M, R>;
10
10
  export declare class VerstakDriver<T extends HTMLElement> extends HtmlDriver<T> {
11
11
  applyCellRange(block: VBlock<T>, cellRange: CellRange | undefined): void;
12
12
  applyWidthGrowth(block: VBlock<T>, widthGrowth: number): void;
13
- applyWidthMin(block: VBlock<T>, widthMin: string): void;
14
- applyWidthMax(block: VBlock<T>, widthMax: string): void;
13
+ applyMinWidth(block: VBlock<T>, minWidth: string): void;
14
+ applyMaxWidth(block: VBlock<T>, maxWidth: string): void;
15
15
  applyHeightGrowth(block: VBlock<T>, heightGrowth: number): void;
16
- applyHeightMin(block: VBlock<T>, heightMin: string): void;
17
- applyHeightMax(block: VBlock<T>, heightMax: string): void;
18
- applyAlignContent(block: VBlock<T>, alignContent: Align): void;
19
- applyAlignFrame(block: VBlock<T>, alignFrame: Align): void;
20
- applyWrapContent(block: VBlock<T>, wrapContent: boolean): void;
21
- applyDangling(block: VBlock<T>, dangling: boolean): void;
16
+ applyMinHeight(block: VBlock<T>, minHeight: string): void;
17
+ applyMaxHeight(block: VBlock<T>, maxHeight: string): void;
18
+ applyContentAlignment(block: VBlock<T>, contentAlign: Align): void;
19
+ applyFrameAlignment(block: VBlock<T>, frameAlign: Align): void;
20
+ applyContentWrapping(block: VBlock<T>, contentWrapping: boolean): void;
21
+ applyFloating(block: VBlock<T>, floating: boolean): void;
22
22
  render(block: VBlock<T>): void | Promise<void>;
23
23
  }
@@ -1,36 +1,35 @@
1
- import { VBlock, LayoutKind, Align, GridCursor, asComponent } from "../core/api";
1
+ import { VBlock, LayoutKind, Align, GridCursor, asBaseFor } from "../core/api";
2
2
  import { HtmlDriver } from "./HtmlDriver";
3
- export function Block(name, args) {
4
- return VBlock.claim(name, VerstakTags.block, args);
3
+ export function Block(body) {
4
+ return VBlock.claim(VerstakTags.block, body);
5
5
  }
6
- export function PlainText(content, name, args) {
7
- return VBlock.claim(name !== null && name !== void 0 ? name : "", VerstakTags.text, asComponent(args, {
6
+ export function PlainText(content, body) {
7
+ return VBlock.claim(VerstakTags.text, asBaseFor(body, {
8
8
  render(b) {
9
9
  b.native.innerText = content;
10
10
  },
11
11
  }));
12
12
  }
13
- export function HtmlText(content, name, args) {
14
- return VBlock.claim(name !== null && name !== void 0 ? name : "", VerstakTags.text, asComponent(args, {
13
+ export function HtmlText(content, body) {
14
+ return VBlock.claim(VerstakTags.text, asBaseFor(body, {
15
15
  render(b) {
16
16
  b.native.innerHTML = content;
17
17
  },
18
18
  }));
19
19
  }
20
- export function Grid(name, body) {
21
- return VBlock.claim(name, VerstakTags.grid, body);
20
+ export function Grid(body) {
21
+ return VBlock.claim(VerstakTags.grid, body);
22
22
  }
23
- export function Line(claim) {
24
- const result = VBlock.claim("", VerstakTags.row, EMPTY_BLOCK_BODY);
25
- claim();
26
- VBlock.claim("", VerstakTags.row, EMPTY_BLOCK_BODY);
27
- return result;
23
+ export function Line(body) {
24
+ lineFeed();
25
+ body();
26
+ lineFeed();
28
27
  }
29
- export function lineFeed(body, noCoalescing) {
30
- return VBlock.claim("", VerstakTags.row, body !== null && body !== void 0 ? body : EMPTY_BLOCK_BODY);
28
+ export function lineFeed(noCoalescing, key) {
29
+ return VBlock.claim(VerstakTags.row, { key });
31
30
  }
32
- export function Group(name, body) {
33
- return VBlock.claim(name, VerstakTags.group, body);
31
+ export function Group(body) {
32
+ return VBlock.claim(VerstakTags.group, body);
34
33
  }
35
34
  export class VerstakDriver extends HtmlDriver {
36
35
  applyCellRange(block, cellRange) {
@@ -57,11 +56,11 @@ export class VerstakDriver extends HtmlDriver {
57
56
  css.flexBasis = "";
58
57
  }
59
58
  }
60
- applyWidthMin(block, widthMin) {
61
- block.native.style.minWidth = `${widthMin}`;
59
+ applyMinWidth(block, minWidth) {
60
+ block.native.style.minWidth = `${minWidth}`;
62
61
  }
63
- applyWidthMax(block, widthMax) {
64
- block.native.style.maxWidth = `${widthMax}`;
62
+ applyMaxWidth(block, maxWidth) {
63
+ block.native.style.maxWidth = `${maxWidth}`;
65
64
  }
66
65
  applyHeightGrowth(block, heightGrowth) {
67
66
  if (block.driver.isRow) {
@@ -72,22 +71,22 @@ export class VerstakDriver extends HtmlDriver {
72
71
  css.flexGrow = "";
73
72
  }
74
73
  else if (block.host.driver.isRow) {
75
- block.driver.applyAlignFrame(block, Align.Stretch);
74
+ block.driver.applyFrameAlignment(block, Align.Stretch);
76
75
  block.host.driver.applyHeightGrowth(block.host, heightGrowth);
77
76
  }
78
77
  }
79
- applyHeightMin(block, heightMin) {
80
- block.native.style.minHeight = `${heightMin}`;
78
+ applyMinHeight(block, minHeight) {
79
+ block.native.style.minHeight = `${minHeight}`;
81
80
  }
82
- applyHeightMax(block, heightMax) {
83
- block.native.style.maxHeight = `${heightMax}`;
81
+ applyMaxHeight(block, maxHeight) {
82
+ block.native.style.maxHeight = `${maxHeight}`;
84
83
  }
85
- applyAlignContent(block, alignContent) {
84
+ applyContentAlignment(block, contentAlign) {
86
85
  const css = block.native.style;
87
- if ((alignContent & Align.Default) === 0) {
88
- const v = AlignToCss[(alignContent >> 2) & 0b11];
89
- const h = AlignToCss[alignContent & 0b11];
90
- const t = TextAlignCss[alignContent & 0b11];
86
+ if ((contentAlign & Align.Default) === 0) {
87
+ const v = AlignToCss[(contentAlign >> 2) & 0b11];
88
+ const h = AlignToCss[contentAlign & 0b11];
89
+ const t = TextAlignCss[contentAlign & 0b11];
91
90
  css.justifyContent = v;
92
91
  css.alignItems = h;
93
92
  css.textAlign = t;
@@ -95,32 +94,32 @@ export class VerstakDriver extends HtmlDriver {
95
94
  else
96
95
  css.justifyContent = css.alignContent = css.textAlign = "";
97
96
  }
98
- applyAlignFrame(block, alignFrame) {
97
+ applyFrameAlignment(block, frameAlign) {
99
98
  const css = block.native.style;
100
- if ((alignFrame & Align.Default) === 0) {
101
- const v = AlignToCss[(alignFrame >> 2) & 0b11];
102
- const h = AlignToCss[alignFrame & 0b11];
99
+ if ((frameAlign & Align.Default) === 0) {
100
+ const v = AlignToCss[(frameAlign >> 2) & 0b11];
101
+ const h = AlignToCss[frameAlign & 0b11];
103
102
  css.alignSelf = v;
104
103
  css.justifySelf = h;
105
104
  }
106
105
  else
107
106
  css.alignSelf = css.justifySelf = "";
108
107
  }
109
- applyWrapContent(block, wrapContent) {
110
- if (wrapContent)
108
+ applyContentWrapping(block, contentWrapping) {
109
+ if (contentWrapping)
111
110
  block.native.setAttribute("wrapping", "true");
112
111
  else
113
112
  block.native.removeAttribute("wrapping");
114
113
  }
115
- applyDangling(block, dangling) {
116
- if (dangling)
117
- block.native.setAttribute("dangling", "true");
114
+ applyFloating(block, floating) {
115
+ if (floating)
116
+ block.native.setAttribute("floating", "true");
118
117
  else
119
- block.native.removeAttribute("dangling");
118
+ block.native.removeAttribute("floating");
120
119
  }
121
120
  render(block) {
122
121
  if (block.driver.layout < LayoutKind.Row)
123
- VBlock.claim("", VerstakTags.row, EMPTY_BLOCK_BODY);
122
+ VBlock.claim(VerstakTags.row, {});
124
123
  return super.render(block);
125
124
  }
126
125
  }
@@ -131,6 +130,5 @@ const VerstakTags = {
131
130
  row: new VerstakDriver("v-row", LayoutKind.Row),
132
131
  group: new VerstakDriver("v-group", LayoutKind.Group),
133
132
  };
134
- const EMPTY_BLOCK_BODY = { render() { } };
135
133
  const AlignToCss = ["stretch", "start", "center", "end"];
136
134
  const TextAlignCss = ["justify", "left", "center", "right"];