verstak 0.24.508 → 0.91.25002
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/Elements.d.ts +10 -10
- package/build/dist/source/core/Elements.js +25 -25
- package/build/dist/source/core/WebDriver.d.ts +4 -4
- package/build/dist/source/core/WebDriver.js +7 -7
- package/build/dist/source/express/Button.v.js +3 -3
- package/build/dist/source/express/Field.v.js +4 -4
- package/build/dist/source/express/Icon.v.js +1 -1
- package/build/dist/source/express/Image.v.js +1 -1
- package/build/dist/source/express/Spinner.v.js +1 -1
- package/build/dist/source/express/Toggle.v.js +3 -3
- package/build/dist/source/html/DraggableArea.view.js +1 -1
- package/build/dist/source/sensors/Handlers.js +4 -4
- package/package.json +8 -8
|
@@ -2,31 +2,31 @@ import { ReactiveNodeDecl, ReactiveNodeDriver, ReactiveNode, Script, Mode, Merge
|
|
|
2
2
|
import { El, ElPlace } from "./El.js";
|
|
3
3
|
import { CursorCommandDriver } from "./ElDriver.js";
|
|
4
4
|
import { HtmlDriver } from "./WebDriver.js";
|
|
5
|
-
export declare function Window(
|
|
5
|
+
export declare function Window(script?: Script<El<HTMLBodyElement>>, scriptAsync?: ScriptAsync<El<HTMLBodyElement>>, key?: string, mode?: Mode, preparation?: Script<El<HTMLBodyElement>>, preparationAsync?: ScriptAsync<El<HTMLBodyElement>>, finalization?: Script<El<HTMLBodyElement>>, triggers?: unknown, basis?: ReactiveNodeDecl<El<HTMLBodyElement>>): ReactiveNode<El<HTMLBodyElement>>;
|
|
6
6
|
export declare function Window(declaration?: ReactiveNodeDecl<El<HTMLBodyElement>>): ReactiveNode<El<HTMLBodyElement>>;
|
|
7
|
-
export declare function Panel<M = unknown>(
|
|
7
|
+
export declare function Panel<M = unknown>(script?: Script<El<HTMLElement, M>>, scriptAsync?: 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>>;
|
|
8
8
|
export declare function Panel<M = unknown>(declaration?: ReactiveNodeDecl<El<HTMLElement, M>>): ReactiveNode<El<HTMLElement, M>>;
|
|
9
|
-
export declare function Table<M = unknown>(
|
|
9
|
+
export declare function Table<M = unknown>(script?: Script<El<HTMLElement, M>>, scriptAsync?: 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 Table<M = unknown>(declaration?: ReactiveNodeDecl<El<HTMLElement, M>>): ReactiveNode<El<HTMLElement, M>>;
|
|
11
11
|
export declare function row<T = void>(builder?: (element: void) => T, shiftCursorDown?: number): void;
|
|
12
|
-
export declare function Splitter<M = unknown>(
|
|
12
|
+
export declare function Splitter<M = unknown>(script?: Script<El<HTMLElement, M>>, scriptAsync?: 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>>;
|
|
13
13
|
export declare function Splitter<M = unknown>(declaration?: ReactiveNodeDecl<El<HTMLElement, M>>): ReactiveNode<El<HTMLElement, M>>;
|
|
14
14
|
export declare function rowBreak(shiftCursorDown?: number): void;
|
|
15
15
|
export declare function declareSplitter<T>(index: number, splitViewNode: ReactiveNode<El<T>>): ReactiveNode<El<HTMLElement>>;
|
|
16
16
|
export declare function cursor(areaParams: ElPlace): void;
|
|
17
17
|
export declare function Note(content: string, formatted?: boolean, declaration?: ReactiveNodeDecl<El<HTMLElement, void>>): ReactiveNode<El<HTMLElement, void>>;
|
|
18
|
-
export declare function Group<M = unknown>(
|
|
18
|
+
export declare function Group<M = unknown>(script?: Script<El<HTMLElement, M>>, scriptAsync?: 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>>;
|
|
19
19
|
export declare function Group<M = unknown>(declaration?: ReactiveNodeDecl<El<HTMLElement, M>>): ReactiveNode<El<HTMLElement, M>>;
|
|
20
|
-
export declare function Handling<M = unknown>(
|
|
21
|
-
export declare function SyntheticElement<M = unknown>(
|
|
20
|
+
export declare function Handling<M = unknown>(script: Script<El<void, M>>): ReactiveNode<El<void, M>>;
|
|
21
|
+
export declare function SyntheticElement<M = unknown>(script?: Script<El<void, M>>, scriptAsync?: 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>>;
|
|
22
22
|
export declare function SyntheticElement<M = unknown>(declaration?: ReactiveNodeDecl<El<void, M>>): ReactiveNode<El<void, M>>;
|
|
23
23
|
export declare class PanelDriver<T extends HTMLElement> extends HtmlDriver<T> {
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
runScript(node: ReactiveNode<El<T>>): void | Promise<void>;
|
|
25
|
+
declareChild(ownerNode: ReactiveNode<El<T, any>>, childDriver: ReactiveNodeDriver<any>, childDeclaration?: ReactiveNodeDecl<any> | undefined, childBasis?: ReactiveNodeDecl<any> | undefined): MergedItem<ReactiveNode> | undefined;
|
|
26
26
|
}
|
|
27
27
|
export declare function isSplitViewPartition(childDriver: ReactiveNodeDriver): boolean;
|
|
28
28
|
export declare class PartitionDriver<T extends HTMLElement> extends HtmlDriver<T> {
|
|
29
|
-
|
|
29
|
+
runScript(node: ReactiveNode<El<T>>): void | Promise<void>;
|
|
30
30
|
provideHost(node: ReactiveNode<El<T, any>>): ReactiveNode<El<T, any>>;
|
|
31
31
|
}
|
|
32
32
|
export declare const Drivers: {
|
|
@@ -5,22 +5,22 @@ import { Constants, CursorCommandDriver, ElDriver, ElLayoutInfo, InitialElLayout
|
|
|
5
5
|
import { getPrioritiesForEmptySpaceDistribution, getPrioritiesForSizeChanging, relayout, relayoutUsingSplitter } from "./SplitViewMath.js";
|
|
6
6
|
import { Axis, BodyFontSize, Dimension, toPx } from "./Sizes.js";
|
|
7
7
|
import { HtmlDriver, StaticDriver } from "./WebDriver.js";
|
|
8
|
-
export function Window(
|
|
8
|
+
export function Window(scriptOrDeclaration, scriptAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis) {
|
|
9
9
|
const driver = new StaticDriver(global.document.body, "Page", false, el => el.kind = ElKind.panel);
|
|
10
|
-
return ReactiveNode.declare(driver,
|
|
10
|
+
return ReactiveNode.declare(driver, scriptOrDeclaration, scriptAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis);
|
|
11
11
|
}
|
|
12
|
-
export function Panel(
|
|
13
|
-
return ReactiveNode.declare(Drivers.panel,
|
|
12
|
+
export function Panel(scriptOrDeclaration, scriptAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis) {
|
|
13
|
+
return ReactiveNode.declare(Drivers.panel, scriptOrDeclaration, scriptAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis);
|
|
14
14
|
}
|
|
15
|
-
export function Table(
|
|
16
|
-
return ReactiveNode.declare(Drivers.table,
|
|
15
|
+
export function Table(scriptOrDeclaration, scriptAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis) {
|
|
16
|
+
return ReactiveNode.declare(Drivers.table, scriptOrDeclaration, scriptAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis);
|
|
17
17
|
}
|
|
18
18
|
export function row(builder, shiftCursorDown) {
|
|
19
19
|
rowBreak(shiftCursorDown);
|
|
20
20
|
builder === null || builder === void 0 ? void 0 : builder();
|
|
21
21
|
}
|
|
22
|
-
export function Splitter(
|
|
23
|
-
return ReactiveNode.declare(Drivers.splitter,
|
|
22
|
+
export function Splitter(scriptOrDeclaration, scriptAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis) {
|
|
23
|
+
return ReactiveNode.declare(Drivers.splitter, scriptOrDeclaration, scriptAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis);
|
|
24
24
|
}
|
|
25
25
|
export function rowBreak(shiftCursorDown) {
|
|
26
26
|
ReactiveNode.declare(Drivers.partition);
|
|
@@ -31,7 +31,7 @@ export function declareSplitter(index, splitViewNode) {
|
|
|
31
31
|
key,
|
|
32
32
|
mode: Mode.autonomous,
|
|
33
33
|
preparation: el => el.native.className = `splitter ${key}`,
|
|
34
|
-
|
|
34
|
+
script: b => {
|
|
35
35
|
const e = b.native;
|
|
36
36
|
const model = b.model;
|
|
37
37
|
const dataForSensor = e.dataForSensor;
|
|
@@ -80,14 +80,14 @@ export function declareSplitter(index, splitViewNode) {
|
|
|
80
80
|
}
|
|
81
81
|
export function cursor(areaParams) {
|
|
82
82
|
ReactiveNode.declare(Drivers.cursor, {
|
|
83
|
-
|
|
83
|
+
script: el => {
|
|
84
84
|
el.place = areaParams;
|
|
85
85
|
},
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
88
|
export function Note(content, formatted, declaration) {
|
|
89
89
|
return ReactiveNode.declare(Drivers.note, ReactiveNode.withBasis(declaration, {
|
|
90
|
-
|
|
90
|
+
script: el => {
|
|
91
91
|
if (formatted)
|
|
92
92
|
el.native.innerHTML = content;
|
|
93
93
|
else
|
|
@@ -95,20 +95,20 @@ export function Note(content, formatted, declaration) {
|
|
|
95
95
|
},
|
|
96
96
|
}));
|
|
97
97
|
}
|
|
98
|
-
export function Group(
|
|
99
|
-
return ReactiveNode.declare(Drivers.group,
|
|
98
|
+
export function Group(scriptOrDeclaration, scriptAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis) {
|
|
99
|
+
return ReactiveNode.declare(Drivers.group, scriptOrDeclaration, scriptAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis);
|
|
100
100
|
}
|
|
101
|
-
export function Handling(
|
|
102
|
-
return SyntheticElement({ mode: Mode.autonomous,
|
|
101
|
+
export function Handling(script) {
|
|
102
|
+
return SyntheticElement({ mode: Mode.autonomous, script });
|
|
103
103
|
}
|
|
104
|
-
export function SyntheticElement(
|
|
105
|
-
return ReactiveNode.declare(Drivers.synthetic,
|
|
104
|
+
export function SyntheticElement(scriptOrDeclaration, scriptAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis) {
|
|
105
|
+
return ReactiveNode.declare(Drivers.synthetic, scriptOrDeclaration, scriptAsync, key, mode, preparation, preparationAsync, finalization, triggers, basis);
|
|
106
106
|
}
|
|
107
107
|
export class PanelDriver extends HtmlDriver {
|
|
108
|
-
|
|
108
|
+
runScript(node) {
|
|
109
109
|
rowBreak();
|
|
110
110
|
const el = node.element;
|
|
111
|
-
const result = super.
|
|
111
|
+
const result = super.runScript(node);
|
|
112
112
|
if (el.splitView !== undefined) {
|
|
113
113
|
if (el.layoutInfo === undefined)
|
|
114
114
|
el.layoutInfo = new ElLayoutInfo(InitialElLayoutInfo);
|
|
@@ -128,7 +128,7 @@ export class PanelDriver extends HtmlDriver {
|
|
|
128
128
|
});
|
|
129
129
|
const relayoutEl = SyntheticElement({
|
|
130
130
|
mode: Mode.autonomous,
|
|
131
|
-
|
|
131
|
+
script: () => {
|
|
132
132
|
const native = el.native;
|
|
133
133
|
const isHorizontal = el.splitView === Direction.horizontal;
|
|
134
134
|
if (layoutInfo.isUpdateFinished) {
|
|
@@ -179,7 +179,7 @@ export class PanelDriver extends HtmlDriver {
|
|
|
179
179
|
}
|
|
180
180
|
return result;
|
|
181
181
|
}
|
|
182
|
-
|
|
182
|
+
declareChild(ownerNode, childDriver, childDeclaration, childBasis) {
|
|
183
183
|
var _a;
|
|
184
184
|
let result = undefined;
|
|
185
185
|
const el = ownerNode.element;
|
|
@@ -195,7 +195,7 @@ export class PanelDriver extends HtmlDriver {
|
|
|
195
195
|
if (childDeclaration.triggers === undefined)
|
|
196
196
|
childDeclaration.triggers = {};
|
|
197
197
|
Object.defineProperty(childDeclaration.triggers, "index", { value: partCount });
|
|
198
|
-
overrideMethod(childDeclaration, "
|
|
198
|
+
overrideMethod(childDeclaration, "script", el => {
|
|
199
199
|
if (isHorizontal)
|
|
200
200
|
el.style.gridColumn = `${partCount + 1}`;
|
|
201
201
|
else
|
|
@@ -226,13 +226,13 @@ function overrideMethod(declaration, method, func) {
|
|
|
226
226
|
: (el, base) => { base(); func(el); };
|
|
227
227
|
}
|
|
228
228
|
export class PartitionDriver extends HtmlDriver {
|
|
229
|
-
|
|
230
|
-
const result = super.
|
|
229
|
+
runScript(node) {
|
|
230
|
+
const result = super.runScript(node);
|
|
231
231
|
const ownerEl = node.owner.element;
|
|
232
232
|
if (ownerEl.sealed !== undefined) {
|
|
233
233
|
node.element.style.flexGrow = "1";
|
|
234
234
|
ReactiveNode.declare(Drivers.wrapper, {
|
|
235
|
-
|
|
235
|
+
script: el => {
|
|
236
236
|
const ownerEl = el.node.owner.owner.element;
|
|
237
237
|
if (ownerEl.splitView !== undefined) {
|
|
238
238
|
el.style.display = "grid";
|
|
@@ -3,10 +3,10 @@ import { El } from "./El.js";
|
|
|
3
3
|
import { ElDriver } from "./ElDriver.js";
|
|
4
4
|
export declare class WebDriver<T extends Element, M = unknown> extends ElDriver<T, M> {
|
|
5
5
|
setNativeElement(node: ReactiveNode<El<T, M>>): void;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
runPreparation(node: ReactiveNode<El<T, M>>): void | Promise<void>;
|
|
7
|
+
runFinalization(node: ReactiveNode<El<T, M>>, isLeader: boolean): boolean;
|
|
8
|
+
runMount(node: ReactiveNode<El<T, M>>): void;
|
|
9
|
+
runScript(node: ReactiveNode<El<T, M>>): void | Promise<void>;
|
|
10
10
|
static findBrotherlyHost<T, R>(node: ReactiveNode<El<T>>): ReactiveNode<El<R>> | undefined;
|
|
11
11
|
static findBrotherlyPrevSibling<T, R>(node: ReactiveNode<El<T>>): ReactiveNode<El<R>> | undefined;
|
|
12
12
|
static get blinkingEffectMarker(): string | undefined;
|
|
@@ -3,17 +3,17 @@ import { Constants, ElDriver, ElImpl } from "./ElDriver.js";
|
|
|
3
3
|
export class WebDriver extends ElDriver {
|
|
4
4
|
setNativeElement(node) {
|
|
5
5
|
}
|
|
6
|
-
|
|
6
|
+
runPreparation(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.runPreparation(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
|
+
runFinalization(node, isLeader) {
|
|
17
17
|
var _a;
|
|
18
18
|
const element = node.element;
|
|
19
19
|
const native = element.native;
|
|
@@ -22,11 +22,11 @@ export class WebDriver extends ElDriver {
|
|
|
22
22
|
if (isLeader)
|
|
23
23
|
native.remove();
|
|
24
24
|
}
|
|
25
|
-
super.
|
|
25
|
+
super.runFinalization(node, isLeader);
|
|
26
26
|
element.native = null;
|
|
27
27
|
return false;
|
|
28
28
|
}
|
|
29
|
-
|
|
29
|
+
runMount(node) {
|
|
30
30
|
const element = node.element;
|
|
31
31
|
const native = element.native;
|
|
32
32
|
if (native) {
|
|
@@ -55,11 +55,11 @@ export class WebDriver extends ElDriver {
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
|
|
58
|
+
runScript(node) {
|
|
59
59
|
const element = node.element;
|
|
60
60
|
if (element instanceof ElImpl)
|
|
61
61
|
element.prepareForUpdate();
|
|
62
|
-
let result = super.
|
|
62
|
+
let result = super.runScript(node);
|
|
63
63
|
result = proceedSyncOrAsync(result, v => {
|
|
64
64
|
if (element.place === undefined) {
|
|
65
65
|
const oel = node.owner.element;
|
|
@@ -13,13 +13,13 @@ export function Button(declaration) {
|
|
|
13
13
|
label: ReactiveNode.key,
|
|
14
14
|
}));
|
|
15
15
|
},
|
|
16
|
-
|
|
16
|
+
script: el => {
|
|
17
17
|
const m = el.model;
|
|
18
18
|
const theme = Theme.current.button;
|
|
19
19
|
el.useStylingPreset(theme.main);
|
|
20
20
|
if (m.icon) {
|
|
21
21
|
Icon(m.icon, {
|
|
22
|
-
|
|
22
|
+
script: (el, base) => {
|
|
23
23
|
base();
|
|
24
24
|
el.useStylingPreset(theme.icon);
|
|
25
25
|
},
|
|
@@ -27,7 +27,7 @@ export function Button(declaration) {
|
|
|
27
27
|
}
|
|
28
28
|
if (m.label) {
|
|
29
29
|
Note(m.label, false, {
|
|
30
|
-
|
|
30
|
+
script: (el, base) => {
|
|
31
31
|
base();
|
|
32
32
|
el.useStylingPreset(theme.label);
|
|
33
33
|
},
|
|
@@ -11,13 +11,13 @@ export function Field(declaration) {
|
|
|
11
11
|
(_a = el.model) !== null && _a !== void 0 ? _a : (el.model = composeFieldModel());
|
|
12
12
|
el.native.dataForSensor.focus = el.model;
|
|
13
13
|
},
|
|
14
|
-
|
|
14
|
+
script: el => {
|
|
15
15
|
const m = el.model;
|
|
16
16
|
const theme = Theme.current.field;
|
|
17
17
|
el.useStylingPreset(theme.main);
|
|
18
18
|
if (m.icon)
|
|
19
19
|
Icon(m.icon, {
|
|
20
|
-
|
|
20
|
+
script: (el, base) => {
|
|
21
21
|
base();
|
|
22
22
|
el.useStylingPreset(theme.icon);
|
|
23
23
|
},
|
|
@@ -55,7 +55,7 @@ function FieldInput(model, s) {
|
|
|
55
55
|
e.dataForSensor.focus = model;
|
|
56
56
|
base();
|
|
57
57
|
},
|
|
58
|
-
|
|
58
|
+
script: el => {
|
|
59
59
|
const e = el.native;
|
|
60
60
|
if (!model.isEditMode)
|
|
61
61
|
e.innerText = model.text;
|
|
@@ -81,7 +81,7 @@ function FieldInput(model, s) {
|
|
|
81
81
|
function FieldPopup(model, s) {
|
|
82
82
|
return (Panel({
|
|
83
83
|
key: FieldPopup.name,
|
|
84
|
-
|
|
84
|
+
script: el => {
|
|
85
85
|
el.useStylingPreset(s.popup);
|
|
86
86
|
Handling(() => model.position = el.native.sensors.scroll.y);
|
|
87
87
|
const visible = el.overlayVisible = model.isEditMode;
|
|
@@ -5,7 +5,7 @@ export function Icon(name, declaration) {
|
|
|
5
5
|
return (Panel(ReactiveNode.withBasis(declaration, {
|
|
6
6
|
mode: Mode.autonomous,
|
|
7
7
|
triggers: { name },
|
|
8
|
-
|
|
8
|
+
script: el => {
|
|
9
9
|
const theme = Theme.current.icon;
|
|
10
10
|
el.useStylingPreset(name);
|
|
11
11
|
el.useStylingPreset(theme.main);
|
|
@@ -8,7 +8,7 @@ export function Image(declaration) {
|
|
|
8
8
|
var _a;
|
|
9
9
|
(_a = el.model) !== null && _a !== void 0 ? _a : (el.model = observableModel({ source: undefined }));
|
|
10
10
|
},
|
|
11
|
-
|
|
11
|
+
script: el => {
|
|
12
12
|
const m = el.model;
|
|
13
13
|
el.style.backgroundImage = `url(${m.source})`;
|
|
14
14
|
el.style.backgroundSize = "contain";
|
|
@@ -15,13 +15,13 @@ export function Toggle(declaration) {
|
|
|
15
15
|
}));
|
|
16
16
|
el.native.onclick = () => Transaction.run(null, () => el.model.checked = !el.model.checked);
|
|
17
17
|
},
|
|
18
|
-
|
|
18
|
+
script: el => {
|
|
19
19
|
const m = el.model;
|
|
20
20
|
const theme = Theme.current;
|
|
21
21
|
const toggleTheme = theme.toggle;
|
|
22
22
|
el.useStylingPreset(toggleTheme.main);
|
|
23
23
|
Icon(`fa-solid fa-toggle-${m.checked ? "on" : "off"}`, {
|
|
24
|
-
|
|
24
|
+
script: (el, base) => {
|
|
25
25
|
var _a;
|
|
26
26
|
base();
|
|
27
27
|
el.useStylingPreset(toggleTheme.icon);
|
|
@@ -30,7 +30,7 @@ export function Toggle(declaration) {
|
|
|
30
30
|
});
|
|
31
31
|
if (m.label)
|
|
32
32
|
Note(m.label, false, {
|
|
33
|
-
|
|
33
|
+
script: (el, base) => {
|
|
34
34
|
base();
|
|
35
35
|
el.useStylingPreset(toggleTheme.label);
|
|
36
36
|
},
|
|
@@ -4,7 +4,7 @@ import { Handling } from "../core/Elements.js";
|
|
|
4
4
|
export function DraggableArea(draggingId, builder) {
|
|
5
5
|
return (Div(ReactiveNode.withBasis(builder, {
|
|
6
6
|
mode: Mode.autonomous,
|
|
7
|
-
|
|
7
|
+
script: b => {
|
|
8
8
|
const e = b.native;
|
|
9
9
|
const model = b.model;
|
|
10
10
|
const dataForSensor = e.dataForSensor;
|
|
@@ -15,7 +15,7 @@ export function OnClick(target, action, key) {
|
|
|
15
15
|
key,
|
|
16
16
|
mode: Mode.autonomous,
|
|
17
17
|
triggers: { target },
|
|
18
|
-
|
|
18
|
+
script: el => {
|
|
19
19
|
const pointer = target.sensors.pointer;
|
|
20
20
|
if (target.dataForSensor.click !== undefined && pointer.clicked === target.dataForSensor.click || target.dataForSensor.click === undefined && pointer.clicked) {
|
|
21
21
|
if (action instanceof Function) {
|
|
@@ -35,7 +35,7 @@ export function OnClickAsync(target, action, key) {
|
|
|
35
35
|
key,
|
|
36
36
|
mode: Mode.autonomous,
|
|
37
37
|
triggers: { target },
|
|
38
|
-
|
|
38
|
+
scriptAsync: (el) => __awaiter(this, void 0, void 0, function* () {
|
|
39
39
|
const pointer = target.sensors.pointer;
|
|
40
40
|
if (target.dataForSensor.click !== undefined && pointer.clicked === target.dataForSensor.click || target.dataForSensor.click === undefined && pointer.clicked) {
|
|
41
41
|
if (action instanceof Function) {
|
|
@@ -55,7 +55,7 @@ export function OnResize(target, action, key) {
|
|
|
55
55
|
key,
|
|
56
56
|
mode: Mode.autonomous,
|
|
57
57
|
triggers: { target },
|
|
58
|
-
|
|
58
|
+
script: el => {
|
|
59
59
|
const resize = target.sensors.resize;
|
|
60
60
|
resize.resizedElements.forEach(x => {
|
|
61
61
|
action(x);
|
|
@@ -72,7 +72,7 @@ export function OnFocus(target, model, switchEditMode = undefined, key) {
|
|
|
72
72
|
preparation: el => {
|
|
73
73
|
el.node.configureReactronic({ throttling: 0 });
|
|
74
74
|
},
|
|
75
|
-
|
|
75
|
+
script: el => {
|
|
76
76
|
if (switchEditMode === undefined && !(target instanceof HTMLInputElement || target.hasAttribute("tabindex")))
|
|
77
77
|
console.warn(`"${key !== null && key !== void 0 ? key : "noname"}" element must have "tabindex" attribute set in order to be focusable`);
|
|
78
78
|
if (switchEditMode !== undefined) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "verstak",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.91.25002",
|
|
4
4
|
"description": "Verstak - Front-End Library",
|
|
5
5
|
"publisher": "Nezaboodka Software",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -37,21 +37,21 @@
|
|
|
37
37
|
"homepage": "https://github.com/nezaboodka/verstak/blob/master/README.md#readme",
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@types/linkify-it": "^3.0.5",
|
|
40
|
-
"@emotion/css": "^11.13.
|
|
40
|
+
"@emotion/css": "^11.13.5",
|
|
41
41
|
"markdown-it": "^14.1.0",
|
|
42
42
|
"markdown-it-prism": "^2.3.0",
|
|
43
43
|
"prismjs": "^1.29.0",
|
|
44
|
-
"reactronic": "^0.
|
|
44
|
+
"reactronic": "^0.91.25002"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/markdown-it": "14.1.2",
|
|
48
|
-
"@types/node": "22.
|
|
48
|
+
"@types/node": "22.13.0",
|
|
49
49
|
"@types/prismjs": "1.26.5",
|
|
50
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
51
|
-
"@typescript-eslint/parser": "8.
|
|
50
|
+
"@typescript-eslint/eslint-plugin": "8.22.0",
|
|
51
|
+
"@typescript-eslint/parser": "8.22.0",
|
|
52
52
|
"ava": "6.2.0",
|
|
53
|
-
"c8": "10.1.
|
|
54
|
-
"eslint": "9.
|
|
53
|
+
"c8": "10.1.3",
|
|
54
|
+
"eslint": "9.19.0",
|
|
55
55
|
"ts-node": "10.9.2",
|
|
56
56
|
"tsconfig-paths": "4.2.0",
|
|
57
57
|
"typescript": "5.5.4"
|