verstak 0.23.103 → 0.23.104
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/VBlock.d.ts +3 -2
- package/build/dist/source/core/VBlock.js +4 -2
- package/build/dist/source/html/Blocks.d.ts +1 -1
- package/build/dist/source/html/Blocks.js +3 -3
- package/build/dist/source/html/ReactingFocuser.d.ts +1 -1
- package/build/dist/source/html/ReactingFocuser.js +3 -2
- package/package.json +1 -1
|
@@ -18,6 +18,7 @@ export interface BlockBody<T = unknown, M = unknown, R = void> {
|
|
|
18
18
|
render?: Operation<T, M, R>;
|
|
19
19
|
finalize?: Operation<T, M, R>;
|
|
20
20
|
}
|
|
21
|
+
export declare function Fragment<M = unknown, R = void>(body?: BlockBody<void, M, R>, base?: BlockBody<void, M, R>): VBlock<void, M, R>;
|
|
21
22
|
export declare abstract class VBlock<T = unknown, M = unknown, R = void> {
|
|
22
23
|
static readonly shortFrameDuration = 16;
|
|
23
24
|
static readonly longFrameDuration = 300;
|
|
@@ -53,7 +54,7 @@ export declare abstract class VBlock<T = unknown, M = unknown, R = void> {
|
|
|
53
54
|
static get current(): VBlock;
|
|
54
55
|
static renderNestedTreesThenDo(action: (error: unknown) => void): void;
|
|
55
56
|
static runForAllBlocks<T>(action: (e: T) => void): void;
|
|
56
|
-
static claim<T = undefined, M = unknown, R = void>(driver: AbstractDriver<T
|
|
57
|
+
static claim<T = undefined, M = unknown, R = void>(driver: AbstractDriver<T>, body?: BlockBody<T, M, R>, base?: BlockBody<T, M, R>): VBlock<T, M, R>;
|
|
57
58
|
private static generateKey;
|
|
58
59
|
static getDefaultLoggingOptions(): LoggingOptions | undefined;
|
|
59
60
|
static setDefaultLoggingOptions(logging?: LoggingOptions): void;
|
|
@@ -66,7 +67,7 @@ export declare enum LayoutKind {
|
|
|
66
67
|
Text = 4
|
|
67
68
|
}
|
|
68
69
|
export declare class AbstractDriver<T> {
|
|
69
|
-
static readonly
|
|
70
|
+
static readonly fragment: AbstractDriver<any>;
|
|
70
71
|
readonly name: string;
|
|
71
72
|
readonly layout: LayoutKind;
|
|
72
73
|
readonly createCursor: () => Cursor;
|
|
@@ -26,6 +26,9 @@ export var Priority;
|
|
|
26
26
|
Priority[Priority["Normal"] = 1] = "Normal";
|
|
27
27
|
Priority[Priority["Background"] = 2] = "Background";
|
|
28
28
|
})(Priority || (Priority = {}));
|
|
29
|
+
export function Fragment(body, base) {
|
|
30
|
+
return VBlock.claim(AbstractDriver.fragment, body, base);
|
|
31
|
+
}
|
|
29
32
|
export class VBlock {
|
|
30
33
|
get isInitialRendering() {
|
|
31
34
|
return this.stamp === 2;
|
|
@@ -53,7 +56,6 @@ export class VBlock {
|
|
|
53
56
|
body.base = base;
|
|
54
57
|
else
|
|
55
58
|
body = base !== null && base !== void 0 ? base : {};
|
|
56
|
-
driver !== null && driver !== void 0 ? driver : (driver = AbstractDriver.group);
|
|
57
59
|
let key = body.key;
|
|
58
60
|
if (driver.isLine) {
|
|
59
61
|
const last = children.lastClaimedItem();
|
|
@@ -161,7 +163,7 @@ export class AbstractDriver {
|
|
|
161
163
|
applyStyling(block, secondary, styleName, enabled) {
|
|
162
164
|
}
|
|
163
165
|
}
|
|
164
|
-
AbstractDriver.
|
|
166
|
+
AbstractDriver.fragment = new AbstractDriver("fragment", LayoutKind.Fragment);
|
|
165
167
|
function isReaction(body) {
|
|
166
168
|
var _a;
|
|
167
169
|
return (_a = body === null || body === void 0 ? void 0 : body.reaction) !== null && _a !== void 0 ? _a : ((body === null || body === void 0 ? void 0 : body.base) ? isReaction(body === null || body === void 0 ? void 0 : body.base) : false);
|
|
@@ -6,7 +6,7 @@ export declare function HtmlText(content: string, body?: BlockBody<HTMLElement,
|
|
|
6
6
|
export declare function Grid<M = unknown, R = void>(body?: BlockBody<HTMLElement, M, R>, base?: BlockBody<HTMLElement, M, R>): VBlock<HTMLElement, M, R>;
|
|
7
7
|
export declare function line<T = void>(body: (block: void) => T): void;
|
|
8
8
|
export declare function lineFeed(noCoalescing?: boolean, key?: string): VBlock<HTMLElement>;
|
|
9
|
-
export declare function
|
|
9
|
+
export declare function Group<M = unknown, R = void>(body?: BlockBody<HTMLElement, M, R>, base?: 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;
|
|
@@ -27,8 +27,8 @@ export function line(body) {
|
|
|
27
27
|
export function lineFeed(noCoalescing, key) {
|
|
28
28
|
return VBlock.claim(VerstakTags.line, { key });
|
|
29
29
|
}
|
|
30
|
-
export function
|
|
31
|
-
return VBlock.claim(VerstakTags.
|
|
30
|
+
export function Group(body, base) {
|
|
31
|
+
return VBlock.claim(VerstakTags.group, body, base);
|
|
32
32
|
}
|
|
33
33
|
export class VerstakDriver extends HtmlDriver {
|
|
34
34
|
applyCellRange(block, cellRange) {
|
|
@@ -148,7 +148,7 @@ const VerstakTags = {
|
|
|
148
148
|
text: new VerstakDriver("v-text", LayoutKind.Text),
|
|
149
149
|
grid: new VerstakDriver("v-grid", LayoutKind.Grid, () => new GridCursor()),
|
|
150
150
|
line: new VerstakDriver("v-line", LayoutKind.Line),
|
|
151
|
-
|
|
151
|
+
group: new VerstakDriver("v-group", LayoutKind.Fragment),
|
|
152
152
|
};
|
|
153
153
|
const AlignToCss = ["stretch", "start", "center", "end"];
|
|
154
154
|
const TextAlignCss = ["justify", "left", "center", "right"];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { FocusModel } from "./sensors/FocusSensor";
|
|
2
|
-
export declare function ReactingFocuser(target: HTMLElement, model: FocusModel, switchEditMode?: ((model?: FocusModel) => void) | undefined): void;
|
|
2
|
+
export declare function ReactingFocuser(key: string, target: HTMLElement, model: FocusModel, switchEditMode?: ((model?: FocusModel) => void) | undefined): void;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Fragment } from "
|
|
2
|
-
export function ReactingFocuser(target, model, switchEditMode = undefined) {
|
|
1
|
+
import { Fragment } from "../core/api";
|
|
2
|
+
export function ReactingFocuser(key, target, model, switchEditMode = undefined) {
|
|
3
3
|
Fragment({
|
|
4
|
+
key,
|
|
4
5
|
reaction: true,
|
|
5
6
|
triggers: { target, model },
|
|
6
7
|
initialize(b) {
|