verstak 0.23.106 → 0.23.107
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/README.md +1 -1
- package/build/dist/source/archive/RxDomV1.js +4 -3
- package/build/dist/source/core/Cursor.d.ts +10 -9
- package/build/dist/source/core/Cursor.js +15 -19
- package/build/dist/source/core/VBlock.d.ts +57 -49
- package/build/dist/source/core/VBlock.js +151 -118
- package/build/dist/source/html/Blocks.d.ts +22 -21
- package/build/dist/source/html/Blocks.js +146 -75
- package/build/dist/source/html/HtmlBlocks.d.ts +175 -175
- package/build/dist/source/html/HtmlBlocks.js +350 -350
- package/build/dist/source/html/HtmlDriver.d.ts +20 -12
- package/build/dist/source/html/HtmlDriver.js +15 -14
- package/package.json +2 -2
|
@@ -1,20 +1,28 @@
|
|
|
1
1
|
import { Item } from "reactronic";
|
|
2
|
-
import { VBlock,
|
|
3
|
-
export declare abstract class BaseHtmlDriver<T extends Element> extends
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
import { VBlock, Driver } from "../core/api";
|
|
3
|
+
export declare abstract class BaseHtmlDriver<T extends Element, C = unknown> extends Driver<T, C> {
|
|
4
|
+
create(block: VBlock<T, unknown, C, void>, b: {
|
|
5
|
+
native?: T;
|
|
6
|
+
controller?: C;
|
|
7
|
+
}): void;
|
|
8
|
+
finalize(block: VBlock<T, unknown, C>, isLeader: boolean): boolean;
|
|
9
|
+
deploy(block: VBlock<T, unknown, C>): void;
|
|
10
|
+
relocate(block: VBlock<T, unknown, C>): void;
|
|
11
|
+
render(block: VBlock<T, unknown, C>): void | Promise<void>;
|
|
9
12
|
static get blinkingEffect(): string | undefined;
|
|
10
13
|
static set blinkingEffect(value: string | undefined);
|
|
11
14
|
static findNearestParentHtmlBlock(block: VBlock<any>): VBlock<HTMLElement>;
|
|
12
15
|
static findPrevSiblingHtmlBlock(item: Item<VBlock<any>>): Item<VBlock<HTMLElement>> | undefined;
|
|
13
|
-
protected abstract createElement(block: VBlock<T>): T;
|
|
14
16
|
}
|
|
15
|
-
export declare class HtmlDriver<T extends HTMLElement> extends BaseHtmlDriver<T> {
|
|
16
|
-
|
|
17
|
+
export declare class HtmlDriver<T extends HTMLElement, C = unknown> extends BaseHtmlDriver<T, C> {
|
|
18
|
+
create(block: VBlock<T, unknown, C, void>, b: {
|
|
19
|
+
native?: T | undefined;
|
|
20
|
+
controller?: C | undefined;
|
|
21
|
+
}): void;
|
|
17
22
|
}
|
|
18
|
-
export declare class SvgDriver<T extends SVGElement> extends BaseHtmlDriver<T> {
|
|
19
|
-
|
|
23
|
+
export declare class SvgDriver<T extends SVGElement, C = unknown> extends BaseHtmlDriver<T, C> {
|
|
24
|
+
create(block: VBlock<T, unknown, C, void>, b: {
|
|
25
|
+
native?: T | undefined;
|
|
26
|
+
controller?: C | undefined;
|
|
27
|
+
}): void;
|
|
20
28
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { Rx } from "reactronic";
|
|
2
|
-
import { VBlock,
|
|
3
|
-
export class BaseHtmlDriver extends
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
super.initialize(block, element);
|
|
2
|
+
import { VBlock, Driver } from "../core/api";
|
|
3
|
+
export class BaseHtmlDriver extends Driver {
|
|
4
|
+
create(block, b) {
|
|
5
|
+
if (Rx.isLogging && !block.driver.isRow)
|
|
6
|
+
block.native.setAttribute("key", block.key);
|
|
7
|
+
super.create(block, b);
|
|
9
8
|
}
|
|
10
9
|
finalize(block, isLeader) {
|
|
11
10
|
var _a;
|
|
@@ -21,12 +20,12 @@ export class BaseHtmlDriver extends AbstractDriver {
|
|
|
21
20
|
deploy(block) {
|
|
22
21
|
const e = block.native;
|
|
23
22
|
if (e) {
|
|
24
|
-
const sequential = block.host.children.
|
|
23
|
+
const sequential = block.host.children.isStrict;
|
|
25
24
|
const nativeParent = BaseHtmlDriver.findNearestParentHtmlBlock(block).native;
|
|
26
25
|
if (nativeParent) {
|
|
27
|
-
if (sequential && !block.driver.
|
|
26
|
+
if (sequential && !block.driver.isRow) {
|
|
28
27
|
const after = BaseHtmlDriver.findPrevSiblingHtmlBlock(block.item);
|
|
29
|
-
if (after === undefined || after.instance.driver.
|
|
28
|
+
if (after === undefined || after.instance.driver.isRow) {
|
|
30
29
|
if (nativeParent !== e.parentNode || !e.previousSibling)
|
|
31
30
|
nativeParent.prepend(e);
|
|
32
31
|
}
|
|
@@ -81,13 +80,15 @@ export class BaseHtmlDriver extends AbstractDriver {
|
|
|
81
80
|
}
|
|
82
81
|
}
|
|
83
82
|
export class HtmlDriver extends BaseHtmlDriver {
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
create(block, b) {
|
|
84
|
+
b.native = document.createElement(block.driver.name);
|
|
85
|
+
super.create(block, b);
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
export class SvgDriver extends BaseHtmlDriver {
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
create(block, b) {
|
|
90
|
+
b.native = document.createElementNS("http://www.w3.org/2000/svg", block.driver.name);
|
|
91
|
+
super.create(block, b);
|
|
91
92
|
}
|
|
92
93
|
}
|
|
93
94
|
function blink(e, priority, revision) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "verstak",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.107",
|
|
4
4
|
"description": "Verstak - Front-End Library",
|
|
5
5
|
"publisher": "Nezaboodka Software",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"homepage": "https://github.com/nezaboodka/verstak/blob/master/README.md#readme",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"reactronic": "^0.23.
|
|
34
|
+
"reactronic": "^0.23.103"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/node": "18.11.18",
|