verstak 0.22.500 → 0.22.504

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.
Files changed (66) hide show
  1. package/build/dist/source/api.d.ts +2 -2
  2. package/build/dist/source/api.js +2 -2
  3. package/build/dist/source/archive/RxDomV1.d.ts +1 -1
  4. package/build/dist/source/archive/RxDomV1.js +13 -13
  5. package/build/dist/source/core/Allocator.d.ts +64 -0
  6. package/build/dist/source/core/Allocator.js +141 -0
  7. package/build/dist/source/core/CellRange.d.ts +8 -0
  8. package/build/dist/source/core/CellRange.js +173 -0
  9. package/build/dist/source/core/Kernel.d.ts +82 -0
  10. package/build/dist/source/core/Kernel.js +559 -0
  11. package/build/dist/source/core/Restyler.js +1 -1
  12. package/build/dist/source/core/api.d.ts +5 -5
  13. package/build/dist/source/core/api.js +5 -5
  14. package/build/dist/source/html/Blocks.d.ts +13 -0
  15. package/build/dist/source/html/Blocks.js +121 -0
  16. package/build/dist/source/html/HtmlApiExt.d.ts +1 -1
  17. package/build/dist/source/html/HtmlApiExt.js +3 -3
  18. package/build/dist/source/html/HtmlBlocks.d.ts +175 -0
  19. package/build/dist/source/html/HtmlBlocks.js +356 -0
  20. package/build/dist/source/html/HtmlDriver.d.ts +20 -0
  21. package/build/dist/source/html/{HtmlNodeFactory.js → HtmlDriver.js} +25 -23
  22. package/build/dist/source/html/ReactingFocuser.d.ts +2 -0
  23. package/build/dist/source/html/ReactingFocuser.js +16 -0
  24. package/build/dist/source/html/api.d.ts +18 -17
  25. package/build/dist/source/html/api.js +18 -17
  26. package/build/dist/source/html/sensors/BasePointerSensor.d.ts +4 -4
  27. package/build/dist/source/html/sensors/BasePointerSensor.js +2 -2
  28. package/build/dist/source/html/sensors/ButtonSensor.d.ts +3 -3
  29. package/build/dist/source/html/sensors/ButtonSensor.js +17 -17
  30. package/build/dist/source/html/sensors/DataForSensor.js +6 -6
  31. package/build/dist/source/html/sensors/FocusSensor.d.ts +3 -3
  32. package/build/dist/source/html/sensors/FocusSensor.js +27 -27
  33. package/build/dist/source/html/sensors/HoverSensor.d.ts +1 -1
  34. package/build/dist/source/html/sensors/HoverSensor.js +9 -9
  35. package/build/dist/source/html/sensors/HtmlDragSensor.d.ts +6 -6
  36. package/build/dist/source/html/sensors/HtmlDragSensor.js +28 -28
  37. package/build/dist/source/html/sensors/HtmlElementSensor.d.ts +3 -3
  38. package/build/dist/source/html/sensors/HtmlElementSensor.js +4 -4
  39. package/build/dist/source/html/sensors/HtmlSensors.d.ts +9 -9
  40. package/build/dist/source/html/sensors/HtmlSensors.js +10 -10
  41. package/build/dist/source/html/sensors/KeyboardSensor.d.ts +1 -1
  42. package/build/dist/source/html/sensors/KeyboardSensor.js +18 -18
  43. package/build/dist/source/html/sensors/PointerSensor.d.ts +4 -4
  44. package/build/dist/source/html/sensors/PointerSensor.js +20 -20
  45. package/build/dist/source/html/sensors/ResizeSensor.d.ts +3 -3
  46. package/build/dist/source/html/sensors/ResizeSensor.js +13 -13
  47. package/build/dist/source/html/sensors/Sensor.d.ts +1 -1
  48. package/build/dist/source/html/sensors/Sensor.js +1 -1
  49. package/build/dist/source/html/sensors/WheelSensor.d.ts +1 -1
  50. package/build/dist/source/html/sensors/WheelSensor.js +7 -7
  51. package/build/dist/source/html/sensors/WindowSensor.d.ts +2 -2
  52. package/build/dist/source/html/sensors/WindowSensor.js +5 -5
  53. package/package.json +7 -7
  54. package/build/dist/source/core/Block.d.ts +0 -62
  55. package/build/dist/source/core/Block.js +0 -431
  56. package/build/dist/source/core/Elements.d.ts +0 -3
  57. package/build/dist/source/core/Elements.js +0 -7
  58. package/build/dist/source/core/Layout.d.ts +0 -27
  59. package/build/dist/source/core/Layout.js +0 -259
  60. package/build/dist/source/html/Cluster.d.ts +0 -11
  61. package/build/dist/source/html/Cluster.js +0 -14
  62. package/build/dist/source/html/HtmlElements.d.ts +0 -349
  63. package/build/dist/source/html/HtmlElements.js +0 -529
  64. package/build/dist/source/html/HtmlNodeFactory.d.ts +0 -19
  65. package/build/dist/source/html/RxFocuser.d.ts +0 -2
  66. package/build/dist/source/html/RxFocuser.js +0 -11
@@ -1,7 +1,7 @@
1
- import { PointerButton, BasePointerSensor } from './BasePointerSensor';
2
- import { FocusSensor } from './FocusSensor';
3
- import { KeyboardModifiers } from './KeyboardSensor';
4
- import { WindowSensor } from './WindowSensor';
1
+ import { PointerButton, BasePointerSensor } from "./BasePointerSensor";
2
+ import { FocusSensor } from "./FocusSensor";
3
+ import { KeyboardModifiers } from "./KeyboardSensor";
4
+ import { WindowSensor } from "./WindowSensor";
5
5
  export declare class PointerSensor extends BasePointerSensor {
6
6
  pointerButton: PointerButton;
7
7
  private clickable;
@@ -7,10 +7,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
- import { options, reactive, Reentrance, transactional, raw, Transaction, LoggingLevel } from 'reactronic';
11
- import { extractPointerButton, isPointerButtonDown, PointerButton, BasePointerSensor } from './BasePointerSensor';
12
- import { findTargetElementData, SymDataForSensor } from './DataForSensor';
13
- import { extractModifierKeys, KeyboardModifiers } from './KeyboardSensor';
10
+ import { options, reactive, Reentrance, transactional, raw, Transaction, LoggingLevel } from "reactronic";
11
+ import { extractPointerButton, isPointerButtonDown, PointerButton, BasePointerSensor } from "./BasePointerSensor";
12
+ import { findTargetElementData, SymDataForSensor } from "./DataForSensor";
13
+ import { extractModifierKeys, KeyboardModifiers } from "./KeyboardSensor";
14
14
  export class PointerSensor extends BasePointerSensor {
15
15
  constructor(focusSensor, windowSensor) {
16
16
  super(focusSensor, windowSensor);
@@ -55,19 +55,19 @@ export class PointerSensor extends BasePointerSensor {
55
55
  const existing = this.sourceElement;
56
56
  if (element !== existing) {
57
57
  if (existing) {
58
- existing.removeEventListener('pointerdown', this.onPointerDown.bind(this), { capture: true });
59
- existing.removeEventListener('pointermove', this.onPointerMove.bind(this), { capture: true });
60
- existing.removeEventListener('pointerup', this.onPointerUp.bind(this), { capture: true });
61
- existing.removeEventListener('lostpointercapture', this.onLostPointerCapture.bind(this), { capture: true });
62
- existing.removeEventListener('keydown', this.onKeyDown.bind(this), { capture: true });
58
+ existing.removeEventListener("pointerdown", this.onPointerDown.bind(this), { capture: true });
59
+ existing.removeEventListener("pointermove", this.onPointerMove.bind(this), { capture: true });
60
+ existing.removeEventListener("pointerup", this.onPointerUp.bind(this), { capture: true });
61
+ existing.removeEventListener("lostpointercapture", this.onLostPointerCapture.bind(this), { capture: true });
62
+ existing.removeEventListener("keydown", this.onKeyDown.bind(this), { capture: true });
63
63
  }
64
64
  this.sourceElement = element;
65
65
  if (element && enabled) {
66
- element.addEventListener('pointerdown', this.onPointerDown.bind(this), { capture: true });
67
- element.addEventListener('pointermove', this.onPointerMove.bind(this), { capture: true });
68
- element.addEventListener('pointerup', this.onPointerUp.bind(this), { capture: true });
69
- element.addEventListener('lostpointercapture', this.onLostPointerCapture.bind(this), { capture: true });
70
- element.addEventListener('keydown', this.onKeyDown.bind(this), { capture: true });
66
+ element.addEventListener("pointerdown", this.onPointerDown.bind(this), { capture: true });
67
+ element.addEventListener("pointermove", this.onPointerMove.bind(this), { capture: true });
68
+ element.addEventListener("pointerup", this.onPointerUp.bind(this), { capture: true });
69
+ element.addEventListener("lostpointercapture", this.onLostPointerCapture.bind(this), { capture: true });
70
+ element.addEventListener("keydown", this.onKeyDown.bind(this), { capture: true });
71
71
  }
72
72
  }
73
73
  }
@@ -124,7 +124,7 @@ export class PointerSensor extends BasePointerSensor {
124
124
  }
125
125
  }
126
126
  onKeyDown(e) {
127
- if (e.key === 'Escape' && (this.dragStarted || this.clickable)) {
127
+ if (e.key === "Escape" && (this.dragStarted || this.clickable)) {
128
128
  this.cancelDragging();
129
129
  this.reset();
130
130
  }
@@ -139,7 +139,7 @@ export class PointerSensor extends BasePointerSensor {
139
139
  this.stopPropagation = false;
140
140
  const targetPath = e.composedPath();
141
141
  const underPointer = document.elementsFromPoint(e.clientX, e.clientY);
142
- const { data, window } = findTargetElementData(targetPath, underPointer, SymDataForSensor, ['click', 'draggable']);
142
+ const { data, window } = findTargetElementData(targetPath, underPointer, SymDataForSensor, ["click", "draggable"]);
143
143
  const clickable = data === null || data === void 0 ? void 0 : data.click;
144
144
  const draggable = data === null || data === void 0 ? void 0 : data.draggable;
145
145
  if (clickable || draggable) {
@@ -147,7 +147,7 @@ export class PointerSensor extends BasePointerSensor {
147
147
  this.clicking = clickable;
148
148
  this.draggableData = draggable;
149
149
  this.tryingDragging = draggable !== undefined;
150
- this.dragSource = (_a = findTargetElementData(targetPath, underPointer, SymDataForSensor, ['drag'], true).data) === null || _a === void 0 ? void 0 : _a.drag;
150
+ this.dragSource = (_a = findTargetElementData(targetPath, underPointer, SymDataForSensor, ["drag"], true).data) === null || _a === void 0 ? void 0 : _a.drag;
151
151
  this.pointerButton = extractPointerButton(e);
152
152
  this.startX = e.clientX;
153
153
  this.startY = e.clientY;
@@ -160,7 +160,7 @@ export class PointerSensor extends BasePointerSensor {
160
160
  this.previousDragTarget = undefined;
161
161
  Transaction.separate(() => {
162
162
  var _a;
163
- (_a = this.windowSensor) === null || _a === void 0 ? void 0 : _a.setActiveWindow(window, 'pointer');
163
+ (_a = this.windowSensor) === null || _a === void 0 ? void 0 : _a.setActiveWindow(window, "pointer");
164
164
  });
165
165
  }
166
166
  this.revision++;
@@ -248,7 +248,7 @@ export class PointerSensor extends BasePointerSensor {
248
248
  var _a;
249
249
  const targetPath = e.composedPath();
250
250
  const underPointer = document.elementsFromPoint(e.clientX, e.clientY);
251
- const clickable = (_a = findTargetElementData(targetPath, underPointer, SymDataForSensor, ['click']).data) === null || _a === void 0 ? void 0 : _a.click;
251
+ const clickable = (_a = findTargetElementData(targetPath, underPointer, SymDataForSensor, ["click"]).data) === null || _a === void 0 ? void 0 : _a.click;
252
252
  const isSameClickable = this.clickable === clickable;
253
253
  if (isSameClickable)
254
254
  this.clicking = clickable;
@@ -260,7 +260,7 @@ export class PointerSensor extends BasePointerSensor {
260
260
  updateDragTarget(e) {
261
261
  const targetPath = e.composedPath();
262
262
  const underPointer = document.elementsFromPoint(e.clientX, e.clientY);
263
- const { data, window } = findTargetElementData(targetPath, underPointer, SymDataForSensor, ['drag']);
263
+ const { data, window } = findTargetElementData(targetPath, underPointer, SymDataForSensor, ["drag"]);
264
264
  const dragTarget = data === null || data === void 0 ? void 0 : data.drag;
265
265
  if (dragTarget !== this.dragTarget) {
266
266
  this.previousDragTarget = this.dragTarget;
@@ -1,5 +1,5 @@
1
- import { Block } from '../../core/api';
2
- import { Sensor } from './Sensor';
1
+ import { VBlock } from "../../core/api";
2
+ import { Sensor } from "./Sensor";
3
3
  export interface ResizedElement {
4
4
  readonly borderBoxSize: ReadonlyArray<ResizeObserverSize>;
5
5
  readonly contentBoxSize: ReadonlyArray<ResizeObserverSize>;
@@ -11,7 +11,7 @@ export declare class ResizeSensor extends Sensor {
11
11
  resizedElements: Array<ResizedElement>;
12
12
  constructor();
13
13
  reset(): void;
14
- observeResizing(block: Block<any, any, any>, value: boolean, boxSizing?: ResizeObserverBoxOptions): void;
14
+ observeResizing(block: VBlock<any, any, any>, value: boolean, boxSizing?: ResizeObserverBoxOptions): void;
15
15
  protected onResize(entries: Array<ResizeObserverEntry>): void;
16
16
  protected resize(entries: Array<ResizeObserverEntry>): void;
17
17
  protected doReset(): void;
@@ -7,8 +7,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
- import { options, transactional, LoggingLevel } from 'reactronic';
11
- import { Sensor } from './Sensor';
10
+ import { options, transactional, LoggingLevel } from "reactronic";
11
+ import { Sensor } from "./Sensor";
12
12
  export class ResizeSensor extends Sensor {
13
13
  constructor() {
14
14
  super();
@@ -18,24 +18,24 @@ export class ResizeSensor extends Sensor {
18
18
  reset() {
19
19
  this.doReset();
20
20
  }
21
- observeResizing(block, value, boxSizing = 'content-box') {
22
- const impl = block.impl;
23
- if (impl instanceof Element) {
21
+ observeResizing(block, value, boxSizing = "content-box") {
22
+ const native = block.native;
23
+ if (native instanceof Element) {
24
24
  if (value) {
25
- if (impl.resizeObserver !== undefined && impl.resizeObserver !== this.observer)
26
- impl.resizeObserver.unobserve(impl);
27
- impl.resizeObserver = this.observer;
28
- this.observer.observe(impl, { box: boxSizing });
25
+ if (native.resizeObserver !== undefined && native.resizeObserver !== this.observer)
26
+ native.resizeObserver.unobserve(native);
27
+ native.resizeObserver = this.observer;
28
+ this.observer.observe(native, { box: boxSizing });
29
29
  }
30
30
  else {
31
- if (impl.resizeObserver === this.observer) {
32
- this.observer.unobserve(impl);
33
- impl.resizeObserver = undefined;
31
+ if (native.resizeObserver === this.observer) {
32
+ this.observer.unobserve(native);
33
+ native.resizeObserver = undefined;
34
34
  }
35
35
  }
36
36
  }
37
37
  else
38
- throw new Error('cannot observe resizing of non-HTML block');
38
+ throw new Error("cannot observe resizing of non-HTML block");
39
39
  }
40
40
  onResize(entries) {
41
41
  this.resize(entries);
@@ -1,4 +1,4 @@
1
- import { ObservableObject } from 'reactronic';
1
+ import { ObservableObject } from "reactronic";
2
2
  export declare class Sensor extends ObservableObject {
3
3
  revision: number;
4
4
  elementDataList: unknown[];
@@ -1,4 +1,4 @@
1
- import { ObservableObject } from 'reactronic';
1
+ import { ObservableObject } from "reactronic";
2
2
  export class Sensor extends ObservableObject {
3
3
  constructor() {
4
4
  super(...arguments);
@@ -1,4 +1,4 @@
1
- import { BasePointerSensor } from './BasePointerSensor';
1
+ import { BasePointerSensor } from "./BasePointerSensor";
2
2
  export declare class WheelSensor extends BasePointerSensor {
3
3
  target: unknown;
4
4
  deltaX: number;
@@ -7,10 +7,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
- import { options, Reentrance, transactional, LoggingLevel } from 'reactronic';
11
- import { findTargetElementData, SymDataForSensor } from './DataForSensor';
12
- import { extractModifierKeys, KeyboardModifiers } from './KeyboardSensor';
13
- import { BasePointerSensor } from './BasePointerSensor';
10
+ import { options, Reentrance, transactional, LoggingLevel } from "reactronic";
11
+ import { findTargetElementData, SymDataForSensor } from "./DataForSensor";
12
+ import { extractModifierKeys, KeyboardModifiers } from "./KeyboardSensor";
13
+ import { BasePointerSensor } from "./BasePointerSensor";
14
14
  export class WheelSensor extends BasePointerSensor {
15
15
  constructor() {
16
16
  super();
@@ -23,11 +23,11 @@ export class WheelSensor extends BasePointerSensor {
23
23
  const existing = this.sourceElement;
24
24
  if (element !== existing) {
25
25
  if (existing) {
26
- existing.removeEventListener('wheel', this.onWheel.bind(this), { capture: true });
26
+ existing.removeEventListener("wheel", this.onWheel.bind(this), { capture: true });
27
27
  }
28
28
  this.sourceElement = element;
29
29
  if (element && enabled) {
30
- element.addEventListener('wheel', this.onWheel.bind(this), { capture: true, passive: true });
30
+ element.addEventListener("wheel", this.onWheel.bind(this), { capture: true, passive: true });
31
31
  }
32
32
  }
33
33
  }
@@ -56,7 +56,7 @@ export class WheelSensor extends BasePointerSensor {
56
56
  this.stopPropagation = false;
57
57
  const targetPath = e.composedPath();
58
58
  const underPointer = document.elementsFromPoint(e.clientX, e.clientY);
59
- this.target = (_a = findTargetElementData(targetPath, underPointer, SymDataForSensor, ['wheel']).data) === null || _a === void 0 ? void 0 : _a.wheel;
59
+ this.target = (_a = findTargetElementData(targetPath, underPointer, SymDataForSensor, ["wheel"]).data) === null || _a === void 0 ? void 0 : _a.wheel;
60
60
  this.modifiers = extractModifierKeys(e);
61
61
  this.positionX = e.clientX;
62
62
  this.positionY = e.clientY;
@@ -1,5 +1,5 @@
1
- import { ToggleRef } from 'reactronic';
2
- import { Sensor } from './Sensor';
1
+ import { ToggleRef } from "reactronic";
2
+ import { Sensor } from "./Sensor";
3
3
  export interface WindowModel {
4
4
  popupToggle?: ToggleRef;
5
5
  }
@@ -7,19 +7,19 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
- import { ToggleRef, transactional } from 'reactronic';
11
- import { objectHasMember } from '../../core/Utils';
12
- import { Sensor } from './Sensor';
10
+ import { ToggleRef, transactional } from "reactronic";
11
+ import { objectHasMember } from "../../core/Utils";
12
+ import { Sensor } from "./Sensor";
13
13
  export class WindowSensor extends Sensor {
14
14
  constructor() {
15
15
  super(...arguments);
16
16
  this.activeData = undefined;
17
17
  this.previousActiveData = undefined;
18
18
  }
19
- setActiveWindow(window, debugHint = '') {
19
+ setActiveWindow(window, debugHint = "") {
20
20
  if (window !== this.activeData) {
21
21
  const activeData = this.activeData;
22
- if (activeData && objectHasMember(activeData, 'popupToggle')) {
22
+ if (activeData && objectHasMember(activeData, "popupToggle")) {
23
23
  const popupToggle = activeData.popupToggle;
24
24
  if (popupToggle instanceof ToggleRef) {
25
25
  popupToggle.variable = popupToggle.valueOff;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "verstak",
3
- "version": "0.22.500",
4
- "description": "Verstak - Transactional Reactive Front-End Development Framework",
3
+ "version": "0.22.504",
4
+ "description": "Verstak - Front-End Library",
5
5
  "publisher": "Nezaboodka Software",
6
6
  "license": "Apache-2.0",
7
7
  "type": "module",
@@ -31,15 +31,15 @@
31
31
  },
32
32
  "homepage": "https://github.com/nezaboodka/verstak/blob/master/README.md#readme",
33
33
  "dependencies": {
34
- "reactronic": "^0.22.411"
34
+ "reactronic": "^0.22.504"
35
35
  },
36
36
  "devDependencies": {
37
- "@types/node": "18.11.7",
38
- "@typescript-eslint/eslint-plugin": "5.41.0",
39
- "@typescript-eslint/parser": "5.41.0",
37
+ "@types/node": "18.11.9",
38
+ "@typescript-eslint/eslint-plugin": "5.42.1",
39
+ "@typescript-eslint/parser": "5.42.1",
40
40
  "ava": "4.3.3",
41
41
  "c8": "7.12.0",
42
- "eslint": "8.26.0",
42
+ "eslint": "8.27.0",
43
43
  "ts-node": "10.9.1",
44
44
  "tsconfig-paths": "4.1.0",
45
45
  "typescript": "4.8.4"
@@ -1,62 +0,0 @@
1
- import { Monitor, LoggingOptions, Item, CollectionReader } from 'reactronic';
2
- export declare type Callback<T = unknown> = (impl: T) => void;
3
- export declare type Render<T = unknown, M = unknown, P = void, R = void> = (impl: T, block: Block<T, M, P, R>) => R;
4
- export declare type AsyncRender<T = unknown, M = unknown, P = void> = (impl: T, block: Block<T, M, P, Promise<void>>) => Promise<void>;
5
- export declare const enum Priority {
6
- SyncP0 = 0,
7
- AsyncP1 = 1,
8
- AsyncP2 = 2
9
- }
10
- export interface BlockOptions<P = void> {
11
- place?: P;
12
- triggers?: unknown;
13
- priority?: Priority;
14
- monitor?: Monitor;
15
- throttling?: number;
16
- logging?: Partial<LoggingOptions>;
17
- shuffle?: boolean;
18
- }
19
- export declare abstract class Block<T = unknown, M = unknown, P = void, R = void> {
20
- static readonly shortFrameDuration = 16;
21
- static readonly longFrameDuration = 300;
22
- static currentRenderingPriority: Priority;
23
- static frameDuration: number;
24
- abstract readonly name: string;
25
- abstract readonly factory: BlockFactory<T>;
26
- abstract readonly inline: boolean;
27
- abstract readonly renderer: Render<T, M, P, R>;
28
- abstract readonly wrapper: Render<T, M, P, R> | undefined;
29
- abstract readonly options: Readonly<BlockOptions<P>> | undefined;
30
- abstract model?: M;
31
- abstract readonly level: number;
32
- abstract readonly parent: Block;
33
- abstract readonly children: CollectionReader<Block>;
34
- abstract readonly item: Item<Block> | undefined;
35
- abstract readonly stamp: number;
36
- abstract readonly impl?: T;
37
- render(): R;
38
- get isInitialRendering(): boolean;
39
- abstract wrapBy(renderer: Render<T, M, P, R> | undefined): this;
40
- static root(render: () => void): void;
41
- static get current(): Block;
42
- static renderChildrenThenDo(action: (error: unknown) => void): void;
43
- static forAllBlocksDo<T>(action: (e: T) => void): void;
44
- static claim<T = undefined, M = unknown, P = void, R = void>(name: string, inline: boolean, options: BlockOptions<P> | undefined, renderer: Render<T, M, P, R>, factory?: BlockFactory<T>): Block<T, M, P, R>;
45
- static getDefaultLoggingOptions(): LoggingOptions | undefined;
46
- static setDefaultLoggingOptions(logging?: LoggingOptions): void;
47
- }
48
- export declare class BlockFactory<T> {
49
- static readonly default: BlockFactory<any>;
50
- readonly name: string;
51
- readonly strict: boolean;
52
- constructor(name: string, strict: boolean);
53
- initialize(block: Block<T>, impl: T | undefined): void;
54
- finalize(block: Block<T>, isLeader: boolean): boolean;
55
- layout(block: Block<T>, strict: boolean): void;
56
- render(block: Block<T>): void | Promise<void>;
57
- }
58
- export declare class StaticBlockFactory<T> extends BlockFactory<T> {
59
- readonly element: T;
60
- constructor(name: string, sequential: boolean, element: T);
61
- initialize(block: Block<T>, element: T | undefined): void;
62
- }