verstak 0.22.516 → 0.23.101
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/archive/RxDomV1.Types.d.ts +5 -5
- package/build/dist/source/archive/RxDomV1.Types.js +5 -5
- package/build/dist/source/core/Cursor.d.ts +1 -1
- package/build/dist/source/core/Utils.js +2 -2
- package/build/dist/source/core/VBlock.d.ts +28 -24
- package/build/dist/source/core/VBlock.js +160 -132
- package/build/dist/source/html/Blocks.d.ts +5 -4
- package/build/dist/source/html/Blocks.js +39 -18
- package/build/dist/source/html/HtmlBlocks.d.ts +174 -174
- package/build/dist/source/html/HtmlBlocks.js +1 -1
- package/build/dist/source/html/HtmlDriver.d.ts +3 -3
- package/build/dist/source/html/HtmlDriver.js +5 -4
- package/build/dist/source/html/ReactingFocuser.js +3 -3
- package/build/dist/source/html/sensors/HtmlDragSensor.d.ts +2 -2
- package/package.json +8 -8
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
1
|
+
export type Render<E = unknown, O = void> = (element: E, options: O) => void | Promise<void>;
|
|
2
|
+
export type SuperRender<E = unknown, O = void> = ((render: (options: O) => void, element: E) => void);
|
|
3
|
+
export type AsyncSuperRender<O = unknown, E = void> = ((render: (options: O) => Promise<void>, element: E) => Promise<void>);
|
|
4
|
+
export type Customize<E = unknown, O = void> = (element: E, options: O) => void;
|
|
5
|
+
export type AsyncCustomize<E = unknown, O = void> = (element: E, options: O) => Promise<void>;
|
|
6
6
|
export interface RxNodeType<E = unknown, O = void> {
|
|
7
7
|
readonly name: string;
|
|
8
8
|
readonly sequential: boolean;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
export class RxNode {
|
|
2
|
+
get parent() { return this.host; }
|
|
3
|
+
get revision() { var _a, _b; return (_b = (_a = this.instance) === null || _a === void 0 ? void 0 : _a.revision) !== null && _b !== void 0 ? _b : ~0; }
|
|
4
|
+
get native() { var _a; return (_a = this.instance) === null || _a === void 0 ? void 0 : _a.native; }
|
|
5
|
+
set native(e) { this.instance.native = e; }
|
|
6
|
+
get resizeObserver() { var _a; return (_a = this.instance) === null || _a === void 0 ? void 0 : _a.resizeObserver; }
|
|
2
7
|
constructor(id, args, render, superRender, priority, childrenShuffling, type, inline, creator, host, instance) {
|
|
3
8
|
this.id = id;
|
|
4
9
|
this.args = args;
|
|
@@ -14,9 +19,4 @@ export class RxNode {
|
|
|
14
19
|
this.old = undefined;
|
|
15
20
|
this.prevSibling = undefined;
|
|
16
21
|
}
|
|
17
|
-
get parent() { return this.host; }
|
|
18
|
-
get revision() { var _a, _b; return (_b = (_a = this.instance) === null || _a === void 0 ? void 0 : _a.revision) !== null && _b !== void 0 ? _b : ~0; }
|
|
19
|
-
get native() { var _a; return (_a = this.instance) === null || _a === void 0 ? void 0 : _a.native; }
|
|
20
|
-
set native(e) { this.instance.native = e; }
|
|
21
|
-
get resizeObserver() { var _a; return (_a = this.instance) === null || _a === void 0 ? void 0 : _a.resizeObserver; }
|
|
22
22
|
}
|
|
@@ -18,7 +18,7 @@ export interface ElasticSize {
|
|
|
18
18
|
export interface TrackSize extends ElasticSize {
|
|
19
19
|
track?: string | number;
|
|
20
20
|
}
|
|
21
|
-
export
|
|
21
|
+
export type Cells = undefined | string | number | {
|
|
22
22
|
right?: number;
|
|
23
23
|
horizontalOverlap?: boolean;
|
|
24
24
|
down?: number;
|
|
@@ -11,7 +11,7 @@ export function getCallerInfo(prefix) {
|
|
|
11
11
|
i = i >= 0 ? i + 2 : 5;
|
|
12
12
|
let caller = extractFunctionAndLocation(lines[i]);
|
|
13
13
|
let location = caller;
|
|
14
|
-
if (caller.func
|
|
14
|
+
if (caller.func.endsWith(".render")) {
|
|
15
15
|
i = i - 1;
|
|
16
16
|
caller = extractFunctionAndLocation(lines[i]);
|
|
17
17
|
location = extractFunctionAndLocation(lines[i + 1]);
|
|
@@ -23,7 +23,7 @@ export function getCallerInfo(prefix) {
|
|
|
23
23
|
}
|
|
24
24
|
location = extractFunctionAndLocation(lines[i + 1]);
|
|
25
25
|
}
|
|
26
|
-
const result = `${prefix}
|
|
26
|
+
const result = `${prefix}·${caller.func}@${location.file}`;
|
|
27
27
|
return result;
|
|
28
28
|
}
|
|
29
29
|
function extractFunctionAndLocation(s) {
|
|
@@ -1,28 +1,23 @@
|
|
|
1
1
|
import { LoggingOptions, Item, CollectionReader, MemberOptions } from "reactronic";
|
|
2
2
|
import { CellRange } from "./CellRange";
|
|
3
3
|
import { Cursor, Align, Cells } from "./Cursor";
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
4
|
+
export type Callback<T = unknown> = (native: T) => void;
|
|
5
|
+
export type Operation<T = unknown, M = unknown, R = void> = (block: VBlock<T, M, R>, base: () => R) => R;
|
|
6
|
+
export type AsyncOperation<T = unknown, M = unknown> = (block: VBlock<T, M, Promise<void>>) => Promise<void>;
|
|
7
7
|
export declare const enum Priority {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
Realtime = 0,
|
|
9
|
+
Normal = 1,
|
|
10
|
+
Background = 2
|
|
11
11
|
}
|
|
12
|
-
export
|
|
13
|
-
|
|
14
|
-
export interface BlockVmt<T = unknown, M = unknown, R = void> {
|
|
12
|
+
export interface BlockBody<T = unknown, M = unknown, R = void> {
|
|
13
|
+
base?: BlockBody<T, M, R>;
|
|
15
14
|
key?: string;
|
|
16
|
-
|
|
15
|
+
reaction?: boolean;
|
|
17
16
|
triggers?: unknown;
|
|
18
|
-
initialize?:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
finalize?: Render<T, M, R>;
|
|
17
|
+
initialize?: Operation<T, M, R>;
|
|
18
|
+
render?: Operation<T, M, R>;
|
|
19
|
+
finalize?: Operation<T, M, R>;
|
|
22
20
|
}
|
|
23
|
-
export declare function asBaseFor<T, M, R>(outer: BlockBody<T, M, R> | undefined, base: BlockBody<T, M, R>): BlockVmt<T, M, R>;
|
|
24
|
-
export declare function nestedContext<T extends Object>(type: Type<T>, context: T): void;
|
|
25
|
-
export declare function useContext<T extends Object>(type: Type<T>): T;
|
|
26
21
|
export declare abstract class VBlock<T = unknown, M = unknown, R = void> {
|
|
27
22
|
static readonly shortFrameDuration = 16;
|
|
28
23
|
static readonly longFrameDuration = 300;
|
|
@@ -30,7 +25,7 @@ export declare abstract class VBlock<T = unknown, M = unknown, R = void> {
|
|
|
30
25
|
static frameDuration: number;
|
|
31
26
|
abstract readonly key: string;
|
|
32
27
|
abstract readonly driver: AbstractDriver<T>;
|
|
33
|
-
abstract readonly body: Readonly<
|
|
28
|
+
abstract readonly body: Readonly<BlockBody<T, M, R>>;
|
|
34
29
|
abstract model: M;
|
|
35
30
|
abstract cells: Cells;
|
|
36
31
|
abstract widthGrowth: number;
|
|
@@ -42,9 +37,10 @@ export declare abstract class VBlock<T = unknown, M = unknown, R = void> {
|
|
|
42
37
|
abstract contentAlignment: Align;
|
|
43
38
|
abstract frameAlignment: Align;
|
|
44
39
|
abstract contentWrapping: boolean;
|
|
45
|
-
abstract
|
|
40
|
+
abstract overlayVisible: boolean | undefined;
|
|
46
41
|
abstract childrenShuffling: boolean;
|
|
47
42
|
abstract renderingPriority?: Priority;
|
|
43
|
+
abstract style(styleName: string, enabled?: boolean): void;
|
|
48
44
|
abstract readonly level: number;
|
|
49
45
|
abstract readonly host: VBlock;
|
|
50
46
|
abstract readonly children: CollectionReader<VBlock>;
|
|
@@ -57,7 +53,7 @@ export declare abstract class VBlock<T = unknown, M = unknown, R = void> {
|
|
|
57
53
|
static get current(): VBlock;
|
|
58
54
|
static renderNestedTreesThenDo(action: (error: unknown) => void): void;
|
|
59
55
|
static runForAllBlocks<T>(action: (e: T) => void): void;
|
|
60
|
-
static claim<T = undefined, M = unknown, R = void>(driver: AbstractDriver<T> | undefined, body
|
|
56
|
+
static claim<T = undefined, M = unknown, R = void>(driver: AbstractDriver<T> | undefined, body?: BlockBody<T, M, R>, base?: BlockBody<T, M, R>): VBlock<T, M, R>;
|
|
61
57
|
private static generateKey;
|
|
62
58
|
static getDefaultLoggingOptions(): LoggingOptions | undefined;
|
|
63
59
|
static setDefaultLoggingOptions(logging?: LoggingOptions): void;
|
|
@@ -66,7 +62,7 @@ export declare enum LayoutKind {
|
|
|
66
62
|
Block = 0,
|
|
67
63
|
Grid = 1,
|
|
68
64
|
Line = 2,
|
|
69
|
-
|
|
65
|
+
Fragment = 3,
|
|
70
66
|
Text = 4
|
|
71
67
|
}
|
|
72
68
|
export declare class AbstractDriver<T> {
|
|
@@ -81,8 +77,9 @@ export declare class AbstractDriver<T> {
|
|
|
81
77
|
get isLine(): boolean;
|
|
82
78
|
constructor(name: string, layout: LayoutKind, createCursor?: () => Cursor);
|
|
83
79
|
initialize(block: VBlock<T>, native: T): void;
|
|
80
|
+
deploy(block: VBlock<T>): void;
|
|
81
|
+
render(block: VBlock<T>): void | Promise<void>;
|
|
84
82
|
finalize(block: VBlock<T>, isLeader: boolean): boolean;
|
|
85
|
-
deploy(block: VBlock<T>, sequential: boolean): void;
|
|
86
83
|
applyCellRange(block: VBlock<T, any, any>, cellRange: CellRange | undefined): void;
|
|
87
84
|
applyWidthGrowth(block: VBlock<T, any, any>, widthGrowth: number): void;
|
|
88
85
|
applyMinWidth(block: VBlock<T, any, any>, minWidth: string): void;
|
|
@@ -93,11 +90,18 @@ export declare class AbstractDriver<T> {
|
|
|
93
90
|
applyContentAlignment(block: VBlock<T, any, any>, contentAlignment: Align): void;
|
|
94
91
|
applyFrameAlignment(block: VBlock<T, any, any>, frameAlignment: Align): void;
|
|
95
92
|
applyContentWrapping(block: VBlock<T, any, any>, contentWrapping: boolean): void;
|
|
96
|
-
|
|
97
|
-
|
|
93
|
+
applyOverlayVisible(block: VBlock<T, any, any>, overlayVisible: boolean | undefined): void;
|
|
94
|
+
applyStyling(block: VBlock<T, any, any>, secondary: boolean, styleName: string, enabled?: boolean): void;
|
|
98
95
|
}
|
|
99
96
|
export declare class StaticDriver<T> extends AbstractDriver<T> {
|
|
100
97
|
readonly element: T;
|
|
101
98
|
constructor(element: T, name: string, layout: LayoutKind, createCursor?: () => Cursor);
|
|
102
99
|
initialize(block: VBlock<T>, element: T): void;
|
|
103
100
|
}
|
|
101
|
+
export declare class ContextVariable<T extends Object = Object> {
|
|
102
|
+
readonly defaultValue: T | undefined;
|
|
103
|
+
constructor(defaultValue?: T);
|
|
104
|
+
set value(value: T);
|
|
105
|
+
get value(): T;
|
|
106
|
+
get valueOrUndefined(): T | undefined;
|
|
107
|
+
}
|