verstak 0.24.401 → 0.24.501
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/html/Elements.d.ts +6 -6
- package/build/dist/source/html/Elements.js +12 -12
- package/build/dist/source/html/Handlers.js +1 -1
- package/build/dist/source/html/HtmlDriver.d.ts +2 -2
- package/build/dist/source/html/HtmlDriver.js +5 -5
- package/build/dist/source/html/HtmlElements.d.ts +2 -2
- package/build/dist/source/html/HtmlElements.js +2 -2
- package/package.json +4 -4
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { ReactiveNodeDecl, ReactiveNodeDriver, ReactiveNode, Script, Mode, MergedItem, ScriptAsync } from "reactronic";
|
|
2
2
|
import { CursorCommandDriver, El, ElPlace } from "./El.js";
|
|
3
3
|
import { HtmlDriver } from "./HtmlDriver.js";
|
|
4
|
-
export declare function Panel<M = unknown>(content?: Script<El<HTMLElement, M>>, contentAsync?: ScriptAsync<El<HTMLElement, M>>, key?: string, mode?: Mode,
|
|
4
|
+
export declare function Panel<M = unknown>(content?: Script<El<HTMLElement, M>>, contentAsync?: ScriptAsync<El<HTMLElement, M>>, key?: string, mode?: Mode, preparation?: Script<El<HTMLElement, M>>, preparationAsync?: ScriptAsync<El<HTMLElement, M>>, finalization?: Script<El<HTMLElement, M>>, triggers?: unknown, basis?: ReactiveNodeDecl<El<HTMLElement, M>>): ReactiveNode<El<HTMLElement, M>>;
|
|
5
5
|
export declare function Panel<M = unknown>(declaration?: ReactiveNodeDecl<El<HTMLElement, M>>): ReactiveNode<El<HTMLElement, M>>;
|
|
6
|
-
export declare function Table<M = unknown>(content?: Script<El<HTMLElement, M>>, contentAsync?: ScriptAsync<El<HTMLElement, M>>, key?: string, mode?: Mode,
|
|
6
|
+
export declare function Table<M = unknown>(content?: Script<El<HTMLElement, M>>, contentAsync?: ScriptAsync<El<HTMLElement, M>>, key?: string, mode?: Mode, preparation?: Script<El<HTMLElement, M>>, preparationAsync?: ScriptAsync<El<HTMLElement, M>>, finalization?: Script<El<HTMLElement, M>>, triggers?: unknown, basis?: ReactiveNodeDecl<El<HTMLElement, M>>): ReactiveNode<El<HTMLElement, M>>;
|
|
7
7
|
export declare function Table<M = unknown>(declaration?: ReactiveNodeDecl<El<HTMLElement, M>>): ReactiveNode<El<HTMLElement, M>>;
|
|
8
8
|
export declare function row<T = void>(builder?: (element: void) => T, shiftCursorDown?: number): void;
|
|
9
|
-
export declare function Splitter<M = unknown>(content?: Script<El<HTMLElement, M>>, contentAsync?: ScriptAsync<El<HTMLElement, M>>, key?: string, mode?: Mode,
|
|
9
|
+
export declare function Splitter<M = unknown>(content?: Script<El<HTMLElement, M>>, contentAsync?: ScriptAsync<El<HTMLElement, M>>, key?: string, mode?: Mode, preparation?: Script<El<HTMLElement, M>>, preparationAsync?: ScriptAsync<El<HTMLElement, M>>, finalization?: Script<El<HTMLElement, M>>, triggers?: unknown, basis?: ReactiveNodeDecl<El<HTMLElement, M>>): ReactiveNode<El<HTMLElement, M>>;
|
|
10
10
|
export declare function Splitter<M = unknown>(declaration?: ReactiveNodeDecl<El<HTMLElement, M>>): ReactiveNode<El<HTMLElement, M>>;
|
|
11
11
|
export declare function rowBreak(shiftCursorDown?: number): void;
|
|
12
12
|
export declare function declareSplitter<T>(index: number, splitViewNode: ReactiveNode<El<T>>): ReactiveNode<El<HTMLElement>>;
|
|
13
13
|
export declare function cursor(areaParams: ElPlace): void;
|
|
14
14
|
export declare function Note(content: string, formatted?: boolean, declaration?: ReactiveNodeDecl<El<HTMLElement, void>>): ReactiveNode<El<HTMLElement, void>>;
|
|
15
|
-
export declare function Group<M = unknown>(content?: Script<El<HTMLElement, M>>, contentAsync?: ScriptAsync<El<HTMLElement, M>>, key?: string, mode?: Mode,
|
|
15
|
+
export declare function Group<M = unknown>(content?: Script<El<HTMLElement, M>>, contentAsync?: ScriptAsync<El<HTMLElement, M>>, key?: string, mode?: Mode, preparation?: Script<El<HTMLElement, M>>, preparationAsync?: ScriptAsync<El<HTMLElement, M>>, finalization?: Script<El<HTMLElement, M>>, triggers?: unknown, basis?: ReactiveNodeDecl<El<HTMLElement, M>>): ReactiveNode<El<HTMLElement, M>>;
|
|
16
16
|
export declare function Group<M = unknown>(declaration?: ReactiveNodeDecl<El<HTMLElement, M>>): ReactiveNode<El<HTMLElement, M>>;
|
|
17
17
|
export declare function Handling<M = unknown>(content: Script<El<void, M>>): ReactiveNode<El<void, M>>;
|
|
18
|
-
export declare function SyntheticElement<M = unknown>(content?: Script<El<void, M>>, contentAsync?: ScriptAsync<El<void, M>>, key?: string, mode?: Mode,
|
|
18
|
+
export declare function SyntheticElement<M = unknown>(content?: Script<El<void, M>>, contentAsync?: ScriptAsync<El<void, M>>, key?: string, mode?: Mode, preparation?: Script<El<void, M>>, preparationAsync?: ScriptAsync<El<void, M>>, finalization?: Script<El<void, M>>, triggers?: unknown, basis?: ReactiveNodeDecl<El<void, M>>): ReactiveNode<El<void, M>>;
|
|
19
19
|
export declare function SyntheticElement<M = unknown>(declaration?: ReactiveNodeDecl<El<void, M>>): ReactiveNode<El<void, M>>;
|
|
20
20
|
export declare class PanelDriver<T extends HTMLElement> extends HtmlDriver<T> {
|
|
21
21
|
update(node: ReactiveNode<El<T>>): void | Promise<void>;
|
|
@@ -24,7 +24,7 @@ export declare class PanelDriver<T extends HTMLElement> extends HtmlDriver<T> {
|
|
|
24
24
|
export declare function isSplitViewPartition(childDriver: ReactiveNodeDriver): boolean;
|
|
25
25
|
export declare class PartitionDriver<T extends HTMLElement> extends HtmlDriver<T> {
|
|
26
26
|
update(node: ReactiveNode<El<T>>): void | Promise<void>;
|
|
27
|
-
|
|
27
|
+
provideHost(node: ReactiveNode<El<T, any>>): ReactiveNode<El<T, any>>;
|
|
28
28
|
}
|
|
29
29
|
export declare const Drivers: {
|
|
30
30
|
panel: PanelDriver<HTMLElement>;
|
|
@@ -4,18 +4,18 @@ import { getPrioritiesForEmptySpaceDistribution, getPrioritiesForSizeChanging, r
|
|
|
4
4
|
import { Axis, BodyFontSize, Dimension, toPx } from "./Sizes.js";
|
|
5
5
|
import { HtmlDriver } from "./HtmlDriver.js";
|
|
6
6
|
import { clamp } from "./ElUtils.js";
|
|
7
|
-
export function Panel(contentOrDeclaration, contentAsync, key, mode,
|
|
8
|
-
return ReactiveNode.declare(Drivers.panel, contentOrDeclaration, contentAsync, key, mode,
|
|
7
|
+
export function Panel(contentOrDeclaration, contentAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis) {
|
|
8
|
+
return ReactiveNode.declare(Drivers.panel, contentOrDeclaration, contentAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis);
|
|
9
9
|
}
|
|
10
|
-
export function Table(contentOrDeclaration, contentAsync, key, mode,
|
|
11
|
-
return ReactiveNode.declare(Drivers.table, contentOrDeclaration, contentAsync, key, mode,
|
|
10
|
+
export function Table(contentOrDeclaration, contentAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis) {
|
|
11
|
+
return ReactiveNode.declare(Drivers.table, contentOrDeclaration, contentAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis);
|
|
12
12
|
}
|
|
13
13
|
export function row(builder, shiftCursorDown) {
|
|
14
14
|
rowBreak(shiftCursorDown);
|
|
15
15
|
builder === null || builder === void 0 ? void 0 : builder();
|
|
16
16
|
}
|
|
17
|
-
export function Splitter(contentOrDeclaration, contentAsync, key, mode,
|
|
18
|
-
return ReactiveNode.declare(Drivers.splitter, contentOrDeclaration, contentAsync, key, mode,
|
|
17
|
+
export function Splitter(contentOrDeclaration, contentAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis) {
|
|
18
|
+
return ReactiveNode.declare(Drivers.splitter, contentOrDeclaration, contentAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis);
|
|
19
19
|
}
|
|
20
20
|
export function rowBreak(shiftCursorDown) {
|
|
21
21
|
ReactiveNode.declare(Drivers.partition);
|
|
@@ -25,7 +25,7 @@ export function declareSplitter(index, splitViewNode) {
|
|
|
25
25
|
return (Splitter({
|
|
26
26
|
key,
|
|
27
27
|
mode: Mode.autonomous,
|
|
28
|
-
|
|
28
|
+
preparation: el => el.native.className = `splitter ${key}`,
|
|
29
29
|
content: b => {
|
|
30
30
|
const e = b.native;
|
|
31
31
|
const model = b.model;
|
|
@@ -90,14 +90,14 @@ export function Note(content, formatted, declaration) {
|
|
|
90
90
|
},
|
|
91
91
|
}));
|
|
92
92
|
}
|
|
93
|
-
export function Group(contentOrDeclaration, contentAsync, key, mode,
|
|
94
|
-
return ReactiveNode.declare(Drivers.group, contentOrDeclaration, contentAsync, key, mode,
|
|
93
|
+
export function Group(contentOrDeclaration, contentAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis) {
|
|
94
|
+
return ReactiveNode.declare(Drivers.group, contentOrDeclaration, contentAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis);
|
|
95
95
|
}
|
|
96
96
|
export function Handling(content) {
|
|
97
97
|
return SyntheticElement({ mode: Mode.autonomous, content });
|
|
98
98
|
}
|
|
99
|
-
export function SyntheticElement(contentOrDeclaration, contentAsync, key, mode,
|
|
100
|
-
return ReactiveNode.declare(Drivers.synthetic, contentOrDeclaration, contentAsync, key, mode,
|
|
99
|
+
export function SyntheticElement(contentOrDeclaration, contentAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis) {
|
|
100
|
+
return ReactiveNode.declare(Drivers.synthetic, contentOrDeclaration, contentAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis);
|
|
101
101
|
}
|
|
102
102
|
export class PanelDriver extends HtmlDriver {
|
|
103
103
|
update(node) {
|
|
@@ -252,7 +252,7 @@ export class PartitionDriver extends HtmlDriver {
|
|
|
252
252
|
}
|
|
253
253
|
return result;
|
|
254
254
|
}
|
|
255
|
-
|
|
255
|
+
provideHost(node) {
|
|
256
256
|
let host;
|
|
257
257
|
const ownerEl = node.owner.element;
|
|
258
258
|
if (ownerEl.sealed !== undefined)
|
|
@@ -69,7 +69,7 @@ export function OnFocus(target, model, switchEditMode = undefined, key) {
|
|
|
69
69
|
key,
|
|
70
70
|
mode: Mode.autonomous,
|
|
71
71
|
triggers: { target, model },
|
|
72
|
-
|
|
72
|
+
preparation: el => {
|
|
73
73
|
el.node.configureReactronic({ throttling: 0 });
|
|
74
74
|
},
|
|
75
75
|
content: el => {
|
|
@@ -2,8 +2,8 @@ import { ReactiveNode, Handler } from "reactronic";
|
|
|
2
2
|
import { El, ElDriver } from "./El.js";
|
|
3
3
|
export declare class WebDriver<T extends Element, M = unknown> extends ElDriver<T, M> {
|
|
4
4
|
setNativeElement(node: ReactiveNode<El<T, M>>): void;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
prepare(node: ReactiveNode<El<T, M>>): void | Promise<void>;
|
|
6
|
+
finalize(node: ReactiveNode<El<T, M>>, isLeader: boolean): boolean;
|
|
7
7
|
mount(node: ReactiveNode<El<T, M>>): void;
|
|
8
8
|
update(node: ReactiveNode<El<T, M>>): void | Promise<void>;
|
|
9
9
|
static findBrotherlyHost<T, R>(node: ReactiveNode<El<T>>): ReactiveNode<El<R>> | undefined;
|
|
@@ -3,17 +3,17 @@ import { Constants, ElDriver, ElImpl } from "./El.js";
|
|
|
3
3
|
export class WebDriver extends ElDriver {
|
|
4
4
|
setNativeElement(node) {
|
|
5
5
|
}
|
|
6
|
-
|
|
6
|
+
prepare(node) {
|
|
7
7
|
this.setNativeElement(node);
|
|
8
8
|
const e = node.element.native;
|
|
9
9
|
if (ReactiveSystem.isLogging && e !== undefined && !node.driver.isPartition)
|
|
10
10
|
e.setAttribute(Constants.keyAttrName, node.key);
|
|
11
|
-
const result = super.
|
|
11
|
+
const result = super.prepare(node);
|
|
12
12
|
if (e == undefined && ReactiveSystem.isLogging && !node.driver.isPartition)
|
|
13
13
|
node.element.native.setAttribute(Constants.keyAttrName, node.key);
|
|
14
14
|
return result;
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
finalize(node, isLeader) {
|
|
17
17
|
var _a;
|
|
18
18
|
const element = node.element;
|
|
19
19
|
const native = element.native;
|
|
@@ -22,7 +22,7 @@ export class WebDriver extends ElDriver {
|
|
|
22
22
|
if (isLeader)
|
|
23
23
|
native.remove();
|
|
24
24
|
}
|
|
25
|
-
super.
|
|
25
|
+
super.finalize(node, isLeader);
|
|
26
26
|
element.native = null;
|
|
27
27
|
return false;
|
|
28
28
|
}
|
|
@@ -33,7 +33,7 @@ export class WebDriver extends ElDriver {
|
|
|
33
33
|
const sequential = node.owner.children.isStrict;
|
|
34
34
|
const automaticHost = ReactiveNode.findMatchingHost(node, n => n.element.native instanceof HTMLElement || n.element.native instanceof SVGElement);
|
|
35
35
|
const automaticNativeHost = automaticHost !== node.owner
|
|
36
|
-
? automaticHost === null || automaticHost === void 0 ? void 0 : automaticHost.driver.
|
|
36
|
+
? automaticHost === null || automaticHost === void 0 ? void 0 : automaticHost.driver.provideHost(automaticHost).element.native
|
|
37
37
|
: automaticHost === null || automaticHost === void 0 ? void 0 : automaticHost.element.native;
|
|
38
38
|
if (automaticNativeHost) {
|
|
39
39
|
if (sequential && !node.driver.isPartition) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactiveNode, ReactiveNodeDecl, Script as Scr, ScriptAsync as ScrAsync, Mode } from "reactronic";
|
|
2
2
|
import { El } from "./El.js";
|
|
3
|
-
export declare function
|
|
4
|
-
export declare function
|
|
3
|
+
export declare function Window(content?: Scr<El<HTMLBodyElement>>, contentAsync?: ScrAsync<El<HTMLBodyElement>>, key?: string, mode?: Mode, preparation?: Scr<El<HTMLBodyElement>>, preparationAsync?: ScrAsync<El<HTMLBodyElement>>, finalization?: Scr<El<HTMLBodyElement>>, triggers?: unknown, basis?: ReactiveNodeDecl<El<HTMLBodyElement>>): ReactiveNode<El<HTMLBodyElement>>;
|
|
4
|
+
export declare function Window(declaration?: ReactiveNodeDecl<El<HTMLBodyElement>>): ReactiveNode<El<HTMLBodyElement>>;
|
|
5
5
|
export declare function A<M = unknown>(declaration?: ReactiveNodeDecl<El<HTMLAnchorElement, M>>): ReactiveNode<El<HTMLAnchorElement, M>>;
|
|
6
6
|
export declare function Abbr<M = unknown>(declaration?: ReactiveNodeDecl<El<HTMLElement, M>>): ReactiveNode<El<HTMLElement, M>>;
|
|
7
7
|
export declare function Address<M = unknown>(declaration?: ReactiveNodeDecl<El<HTMLElement, M>>): ReactiveNode<El<HTMLElement, M>>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ReactiveNode } from "reactronic";
|
|
2
2
|
import { ElKind } from "./El.js";
|
|
3
3
|
import { StaticDriver, HtmlDriver, SvgDriver } from "./HtmlDriver.js";
|
|
4
|
-
export function
|
|
4
|
+
export function Window(contentOrDeclaration, contentAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis) {
|
|
5
5
|
const driver = new StaticDriver(global.document.body, "Page", false, el => el.kind = ElKind.panel);
|
|
6
|
-
return ReactiveNode.declare(driver, contentOrDeclaration, contentAsync, key, mode,
|
|
6
|
+
return ReactiveNode.declare(driver, contentOrDeclaration, contentAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis);
|
|
7
7
|
}
|
|
8
8
|
export function A(declaration) { return ReactiveNode.declare(HtmlTags.a, declaration); }
|
|
9
9
|
export function Abbr(declaration) { return ReactiveNode.declare(HtmlTags.abbr, declaration); }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "verstak",
|
|
3
|
-
"version": "0.24.
|
|
3
|
+
"version": "0.24.501",
|
|
4
4
|
"description": "Verstak - Front-End Library",
|
|
5
5
|
"publisher": "Nezaboodka Software",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -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.24.
|
|
34
|
+
"reactronic": "^0.24.500"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@types/node": "22.8.
|
|
37
|
+
"@types/node": "22.8.6",
|
|
38
38
|
"@typescript-eslint/eslint-plugin": "8.12.2",
|
|
39
39
|
"@typescript-eslint/parser": "8.12.2",
|
|
40
40
|
"ava": "6.2.0",
|
|
41
41
|
"c8": "10.1.2",
|
|
42
|
-
"eslint": "9.
|
|
42
|
+
"eslint": "9.14.0",
|
|
43
43
|
"ts-node": "10.9.2",
|
|
44
44
|
"tsconfig-paths": "4.2.0",
|
|
45
45
|
"typescript": "5.5.4"
|