verstak 0.23.107 → 0.23.109

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.
@@ -1,116 +0,0 @@
1
- import { LoggingOptions, Item, CollectionReader, MemberOptions } from "reactronic";
2
- import { CellRange } from "./CellRange";
3
- import { Align, Placement } from "./Cursor";
4
- export type Callback<T = unknown> = (native: T) => void;
5
- export type Operation<T = unknown, M = unknown, C = unknown, R = void> = (block: VBlock<T, M, C, R>, base: () => R) => R;
6
- export type AsyncOperation<T = unknown, M = unknown> = (block: VBlock<T, M, Promise<void>>) => Promise<void>;
7
- export type SimpleOperation<T = unknown> = (block: VBlock<T, any, any, any>) => void;
8
- export declare const enum Priority {
9
- Realtime = 0,
10
- Normal = 1,
11
- Background = 2
12
- }
13
- export interface BlockBuilder<T = unknown, M = unknown, C = unknown, R = void> {
14
- base?: BlockBuilder<T, M, C, R>;
15
- key?: string;
16
- reaction?: boolean;
17
- triggers?: unknown;
18
- claim?: Operation<T, M, C, R>;
19
- initialize?: Operation<T, M, C, R>;
20
- render?: Operation<T, M, C, R>;
21
- finalize?: Operation<T, M, C, R>;
22
- }
23
- export declare function Fragment<M = unknown, R = void>(builder?: BlockBuilder<void, M, R>, base?: BlockBuilder<void, M, R>): VBlock<void, M, R>;
24
- export declare abstract class VBlock<T = unknown, M = unknown, C = unknown, R = void> {
25
- static readonly shortFrameDuration = 16;
26
- static readonly longFrameDuration = 300;
27
- static currentRenderingPriority: Priority;
28
- static frameDuration: number;
29
- abstract readonly key: string;
30
- abstract readonly driver: Driver<T>;
31
- abstract readonly builder: Readonly<BlockBuilder<T, M, C, R>>;
32
- abstract model: M;
33
- abstract childrenLayout: Layout;
34
- abstract placement: Placement;
35
- abstract widthGrowth: number;
36
- abstract minWidth: string;
37
- abstract maxWidth: string;
38
- abstract heightGrowth: number;
39
- abstract minHeight: string;
40
- abstract maxHeight: string;
41
- abstract contentAlignment: Align;
42
- abstract blockAlignment: Align;
43
- abstract contentWrapping: boolean;
44
- abstract overlayVisible: boolean | undefined;
45
- abstract childrenShuffling: boolean;
46
- abstract renderingPriority?: Priority;
47
- abstract style(styleName: string, enabled?: boolean): void;
48
- abstract readonly level: number;
49
- abstract readonly host: VBlock;
50
- abstract readonly children: CollectionReader<VBlock>;
51
- abstract readonly item: Item<VBlock> | undefined;
52
- abstract readonly stamp: number;
53
- abstract readonly native: T;
54
- abstract readonly controller: C;
55
- get isInitialRendering(): boolean;
56
- abstract configureReactronic(options: Partial<MemberOptions>): MemberOptions;
57
- static root(render: () => void): void;
58
- static get current(): VBlock;
59
- static renderNestedTreesThenDo(action: (error: unknown) => void): void;
60
- static runForAllBlocks<T>(action: (e: T) => void): void;
61
- static claim<T = undefined, M = unknown, C = unknown, R = void>(driver: Driver<T>, builder?: BlockBuilder<T, M, C, R>, base?: BlockBuilder<T, M, C, R>): VBlock<T, M, C, R>;
62
- private static generateKey;
63
- static getDefaultLoggingOptions(): LoggingOptions | undefined;
64
- static setDefaultLoggingOptions(logging?: LoggingOptions): void;
65
- }
66
- export declare enum Layout {
67
- Section = 0,
68
- Table = 1,
69
- Row = 2,
70
- Group = 3,
71
- Note = 4
72
- }
73
- export declare class Driver<T, C = unknown> {
74
- readonly name: string;
75
- readonly isRow: boolean;
76
- readonly preset?: SimpleOperation<T> | undefined;
77
- static readonly fragment: Driver<any, unknown>;
78
- constructor(name: string, isRow: boolean, preset?: SimpleOperation<T> | undefined);
79
- create(block: VBlock<T, unknown, C>, b: {
80
- native?: T;
81
- controller?: C;
82
- }): void;
83
- claim(block: VBlock<T, unknown, C>): void;
84
- initialize(block: VBlock<T, unknown, C>): void;
85
- deploy(block: VBlock<T, unknown, C>): void;
86
- render(block: VBlock<T, unknown, C>): void | Promise<void>;
87
- finalize(block: VBlock<T, unknown, C>, isLeader: boolean): boolean;
88
- applyChildrenLayout(block: VBlock<T, any, C, any>, value: Layout): void;
89
- applyCellRange(block: VBlock<T, any, C, any>, value: CellRange | undefined): void;
90
- applyWidthGrowth(block: VBlock<T, any, C, any>, value: number): void;
91
- applyMinWidth(block: VBlock<T, any, C, any>, value: string): void;
92
- applyMaxWidth(block: VBlock<T, any, C, any>, value: string): void;
93
- applyHeightGrowth(block: VBlock<T, any, C, any>, value: number): void;
94
- applyMinHeight(block: VBlock<T, any, C, any>, value: string): void;
95
- applyMaxHeight(block: VBlock<T, any, C, any>, value: string): void;
96
- applyContentAlignment(block: VBlock<T, any, C, any>, value: Align): void;
97
- applyBlockAlignment(block: VBlock<T, any, C, any>, value: Align): void;
98
- applyContentWrapping(block: VBlock<T, any, C, any>, value: boolean): void;
99
- applyOverlayVisible(block: VBlock<T, any, C, any>, value: boolean | undefined): void;
100
- applyStyle(block: VBlock<T, any, C, any>, secondary: boolean, styleName: string, enabled?: boolean): void;
101
- }
102
- export declare class StaticDriver<T> extends Driver<T> {
103
- readonly element: T;
104
- constructor(element: T, name: string, isRow: boolean, preset?: SimpleOperation<T>);
105
- create(block: VBlock<T, unknown, unknown, void>, b: {
106
- native?: T;
107
- controller?: unknown;
108
- }): void;
109
- }
110
- export declare class ContextVariable<T extends Object = Object> {
111
- readonly defaultValue: T | undefined;
112
- constructor(defaultValue?: T);
113
- set value(value: T);
114
- get value(): T;
115
- get valueOrUndefined(): T | undefined;
116
- }