verstak 0.23.122 → 0.23.123
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/core/Interfaces.d.ts +29 -32
- package/build/dist/source/core/Utils.js +1 -1
- package/build/dist/source/core/Verstak.d.ts +10 -19
- package/build/dist/source/core/Verstak.js +159 -161
- package/build/dist/source/html/Elements.d.ts +7 -7
- package/build/dist/source/html/Elements.js +22 -22
- package/build/dist/source/html/HtmlDriver.d.ts +4 -13
- package/build/dist/source/html/HtmlDriver.js +18 -18
- package/build/dist/source/html/HtmlElements.d.ts +175 -175
- package/build/dist/source/html/HtmlElements.js +175 -175
- package/package.json +8 -8
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MergeListReader, MergeItem, MemberOptions } from "reactronic";
|
|
2
2
|
export type Callback<T = unknown> = (native: T) => void;
|
|
3
|
-
export type Delegate<T
|
|
3
|
+
export type Delegate<T> = (element: T, base: () => void) => void;
|
|
4
4
|
export type AsyncDelegate<T = unknown, M = unknown> = (element: El<T, M, Promise<void>>) => Promise<void>;
|
|
5
5
|
export type SimpleDelegate<T = unknown> = (element: El<T, any, any, any>) => void;
|
|
6
6
|
export declare enum ElKind {
|
|
@@ -13,10 +13,10 @@ export declare enum ElKind {
|
|
|
13
13
|
Native = 6
|
|
14
14
|
}
|
|
15
15
|
export interface El<T = unknown, M = unknown, C = unknown, R = void> {
|
|
16
|
-
readonly node:
|
|
17
|
-
readonly native: T;
|
|
16
|
+
readonly node: RxNode<T, M, C, R>;
|
|
18
17
|
readonly isSection: boolean;
|
|
19
18
|
readonly isTable: boolean;
|
|
19
|
+
native: T;
|
|
20
20
|
model: M;
|
|
21
21
|
controller: C;
|
|
22
22
|
kind: ElKind;
|
|
@@ -31,52 +31,49 @@ export interface El<T = unknown, M = unknown, C = unknown, R = void> {
|
|
|
31
31
|
elementAlignment: Align;
|
|
32
32
|
contentWrapping: boolean;
|
|
33
33
|
overlayVisible: boolean | undefined;
|
|
34
|
-
updatePriority?: Priority;
|
|
35
|
-
childrenShuffling: boolean;
|
|
36
|
-
strictOrder: boolean;
|
|
37
|
-
readonly isInitialUpdate: boolean;
|
|
38
34
|
useStyle(styleName: string, enabled?: boolean): void;
|
|
39
35
|
configureReactronic(options: Partial<MemberOptions>): MemberOptions;
|
|
40
|
-
hasMode(mode: Mode): boolean;
|
|
41
36
|
}
|
|
42
|
-
export interface
|
|
37
|
+
export interface RxNode<T = unknown, M = unknown, C = unknown, R = void> {
|
|
43
38
|
readonly key: string;
|
|
44
|
-
readonly driver:
|
|
45
|
-
readonly
|
|
39
|
+
readonly driver: RxNodeDriver<T>;
|
|
40
|
+
readonly spec: Readonly<RxNodeSpec<El<T, M, C, R>>>;
|
|
46
41
|
readonly level: number;
|
|
47
|
-
readonly owner:
|
|
48
|
-
readonly host:
|
|
42
|
+
readonly owner: RxNode;
|
|
43
|
+
readonly host: RxNode;
|
|
49
44
|
readonly children: MergeListReader<El>;
|
|
50
|
-
readonly
|
|
45
|
+
readonly slot: MergeItem<El> | undefined;
|
|
51
46
|
readonly stamp: number;
|
|
52
|
-
readonly outer:
|
|
53
|
-
readonly context:
|
|
47
|
+
readonly outer: RxNode;
|
|
48
|
+
readonly context: RxNodeCtx | undefined;
|
|
49
|
+
readonly isInitialUpdate: boolean;
|
|
50
|
+
priority?: Priority;
|
|
51
|
+
childrenShuffling: boolean;
|
|
52
|
+
strictOrder: boolean;
|
|
53
|
+
has(mode: Mode): boolean;
|
|
54
54
|
}
|
|
55
|
-
export interface
|
|
56
|
-
base?:
|
|
55
|
+
export interface RxNodeSpec<T = unknown> {
|
|
56
|
+
base?: RxNodeSpec<T>;
|
|
57
57
|
key?: string;
|
|
58
58
|
mode?: Mode;
|
|
59
59
|
triggers?: unknown;
|
|
60
|
-
|
|
61
|
-
create?: Delegate<T
|
|
62
|
-
initialize?: Delegate<T
|
|
63
|
-
update?: Delegate<T
|
|
64
|
-
finalize?: Delegate<T
|
|
60
|
+
specify?: Delegate<T>;
|
|
61
|
+
create?: Delegate<T>;
|
|
62
|
+
initialize?: Delegate<T>;
|
|
63
|
+
update?: Delegate<T>;
|
|
64
|
+
finalize?: Delegate<T>;
|
|
65
65
|
}
|
|
66
|
-
export interface
|
|
66
|
+
export interface RxNodeCtx<T extends Object = Object> {
|
|
67
67
|
value: T;
|
|
68
68
|
}
|
|
69
|
-
export interface
|
|
69
|
+
export interface RxNodeDriver<T, C = unknown> {
|
|
70
70
|
readonly name: string;
|
|
71
|
-
readonly
|
|
71
|
+
readonly isSeparator: boolean;
|
|
72
72
|
readonly preset?: SimpleDelegate<T>;
|
|
73
|
-
|
|
74
|
-
create(element: El<T, unknown, C
|
|
75
|
-
native?: T;
|
|
76
|
-
controller?: C;
|
|
77
|
-
}): void;
|
|
73
|
+
specify(element: El<T, unknown, C>): void;
|
|
74
|
+
create(element: El<T, unknown, C>): void;
|
|
78
75
|
initialize(element: El<T, unknown, C>): void;
|
|
79
|
-
mount(element: El<T, unknown, C
|
|
76
|
+
mount(element: El<T, unknown, C>): void;
|
|
80
77
|
update(element: El<T, unknown, C>): void | Promise<void>;
|
|
81
78
|
finalize(element: El<T, unknown, C>, isLeader: boolean): boolean;
|
|
82
79
|
applyKind(element: El<T, any, C, any>, value: ElKind): void;
|
|
@@ -183,7 +183,7 @@ export function getCallerInfo(prefix) {
|
|
|
183
183
|
const stack = error.stack || "";
|
|
184
184
|
Error.stackTraceLimit = restore;
|
|
185
185
|
const lines = stack.split("\n");
|
|
186
|
-
let i = lines.findIndex(x => x.indexOf(".
|
|
186
|
+
let i = lines.findIndex(x => x.indexOf(".specify") >= 0);
|
|
187
187
|
i = i >= 0 ? i + 2 : 5;
|
|
188
188
|
let caller = extractFunctionAndLocation(lines[i]);
|
|
189
189
|
let location = caller;
|
|
@@ -1,30 +1,27 @@
|
|
|
1
1
|
import { LoggingOptions } from "reactronic";
|
|
2
|
-
import { ElCoords, ElKind, Priority, Align,
|
|
2
|
+
import { ElCoords, ElKind, Priority, Align, RxNodeSpec, El, RxNodeDriver, SimpleDelegate } from "./Interfaces.js";
|
|
3
3
|
export declare class Verstak {
|
|
4
4
|
static readonly shortFrameDuration = 16;
|
|
5
5
|
static readonly longFrameDuration = 300;
|
|
6
6
|
static currentUpdatePriority: Priority;
|
|
7
7
|
static frameDuration: number;
|
|
8
|
-
static
|
|
8
|
+
static specify<T = undefined, M = unknown, C = unknown, R = void>(driver: RxNodeDriver<T>, spec?: RxNodeSpec<El<T, M, C, R>>, base?: RxNodeSpec<El<T, M, C, R>>): El<T, M, C, R>;
|
|
9
9
|
static get element(): El;
|
|
10
10
|
static triggerUpdate(element: El<any, any, any, void>, triggers: unknown): void;
|
|
11
11
|
static updateNestedTreesThenDo(action: (error: unknown) => void): void;
|
|
12
12
|
static getDefaultLoggingOptions(): LoggingOptions | undefined;
|
|
13
13
|
static setDefaultLoggingOptions(logging?: LoggingOptions): void;
|
|
14
14
|
}
|
|
15
|
-
export declare class BaseDriver<T, C = unknown> implements
|
|
15
|
+
export declare class BaseDriver<T, C = unknown> implements RxNodeDriver<T, C> {
|
|
16
16
|
readonly name: string;
|
|
17
|
-
readonly
|
|
17
|
+
readonly isSeparator: boolean;
|
|
18
18
|
readonly preset?: SimpleDelegate<T> | undefined;
|
|
19
19
|
static readonly fragment: BaseDriver<any, unknown>;
|
|
20
|
-
constructor(name: string,
|
|
21
|
-
|
|
22
|
-
create(element: El<T, unknown, C
|
|
23
|
-
native?: T;
|
|
24
|
-
controller?: C;
|
|
25
|
-
}): void;
|
|
20
|
+
constructor(name: string, isSeparator: boolean, preset?: SimpleDelegate<T> | undefined);
|
|
21
|
+
specify(element: El<T, unknown, C>): void;
|
|
22
|
+
create(element: El<T, unknown, C>): void;
|
|
26
23
|
initialize(element: El<T, unknown, C>): void;
|
|
27
|
-
mount(element: El<T, unknown, C
|
|
24
|
+
mount(element: El<T, unknown, C>): void;
|
|
28
25
|
update(element: El<T, unknown, C>): void | Promise<void>;
|
|
29
26
|
finalize(element: El<T, unknown, C>, isLeader: boolean): boolean;
|
|
30
27
|
applyKind(element: El<T, any, C, any>, value: ElKind): void;
|
|
@@ -44,10 +41,7 @@ export declare class BaseDriver<T, C = unknown> implements Driver<T, C> {
|
|
|
44
41
|
export declare class StaticDriver<T> extends BaseDriver<T> {
|
|
45
42
|
readonly native: T;
|
|
46
43
|
constructor(native: T, name: string, isRow: boolean, preset?: SimpleDelegate<T>);
|
|
47
|
-
create(element: El<T, unknown, unknown, void
|
|
48
|
-
native?: T;
|
|
49
|
-
controller?: unknown;
|
|
50
|
-
}): void;
|
|
44
|
+
create(element: El<T, unknown, unknown, void>): void;
|
|
51
45
|
}
|
|
52
46
|
export declare class CursorCommand {
|
|
53
47
|
absolute?: string;
|
|
@@ -56,10 +50,7 @@ export declare class CursorCommand {
|
|
|
56
50
|
}
|
|
57
51
|
export declare class CursorCommandDriver extends BaseDriver<CursorCommand, void> {
|
|
58
52
|
constructor();
|
|
59
|
-
create(element: El<CursorCommand, unknown, void, void
|
|
60
|
-
native?: CursorCommand;
|
|
61
|
-
controller?: void;
|
|
62
|
-
}): void;
|
|
53
|
+
create(element: El<CursorCommand, unknown, void, void>): void;
|
|
63
54
|
}
|
|
64
55
|
export declare class SubTreeVariable<T extends Object = Object> {
|
|
65
56
|
readonly defaultValue: T | undefined;
|