verstak 0.95.25044 → 0.95.25046
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/components/Button.v.js +2 -2
- package/build/dist/source/components/Image.v.js +2 -2
- package/build/dist/source/components/Input.v.js +2 -2
- package/build/dist/source/components/Spinner.v.js +2 -2
- package/build/dist/source/components/Toggle.v.js +2 -2
- package/build/dist/source/components/api.d.ts +1 -1
- package/build/dist/source/components/api.js +1 -1
- package/build/dist/source/components/common/Utils.d.ts +1 -1
- package/build/dist/source/components/common/Utils.js +3 -3
- package/build/dist/source/core/Elements.js +2 -2
- package/build/dist/source/core/Restyler.d.ts +2 -2
- package/build/dist/source/core/Restyler.js +3 -3
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactiveTreeNode, Mode, derivative } from "reactronic";
|
|
2
2
|
import { Block, JustText, OnClick } from "verstak";
|
|
3
|
-
import {
|
|
3
|
+
import { sxModel } from "./common/Utils.js";
|
|
4
4
|
import { Theme } from "./Theme.js";
|
|
5
5
|
import { Icon } from "./Icon.v.js";
|
|
6
6
|
export function Button(declaration) {
|
|
@@ -8,7 +8,7 @@ export function Button(declaration) {
|
|
|
8
8
|
mode: Mode.autonomous,
|
|
9
9
|
preparation: el => {
|
|
10
10
|
var _a;
|
|
11
|
-
(_a = el.model) !== null && _a !== void 0 ? _a : (el.model =
|
|
11
|
+
(_a = el.model) !== null && _a !== void 0 ? _a : (el.model = sxModel({
|
|
12
12
|
icon: "fa-solid fa-square",
|
|
13
13
|
label: ReactiveTreeNode.current.key,
|
|
14
14
|
}));
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Mode, derivative } from "reactronic";
|
|
2
2
|
import { Block } from "verstak";
|
|
3
|
-
import {
|
|
3
|
+
import { sxModel } from "./common/Utils.js";
|
|
4
4
|
export function Image(declaration) {
|
|
5
5
|
return (Block(derivative(declaration, {
|
|
6
6
|
mode: Mode.autonomous,
|
|
7
7
|
preparation: el => {
|
|
8
8
|
var _a;
|
|
9
|
-
(_a = el.model) !== null && _a !== void 0 ? _a : (el.model =
|
|
9
|
+
(_a = el.model) !== null && _a !== void 0 ? _a : (el.model = sxModel({ source: undefined }));
|
|
10
10
|
},
|
|
11
11
|
script: el => {
|
|
12
12
|
const m = el.model;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Mode, derivative } from "reactronic";
|
|
2
2
|
import { Block, JustText, OnFocus, rowBreak, Fragment, KeyboardModifiers, Horizontal, Vertical } from "verstak";
|
|
3
|
-
import {
|
|
3
|
+
import { sxModel } from "./common/Utils.js";
|
|
4
4
|
import { Theme } from "./Theme.js";
|
|
5
5
|
import { Icon } from "./Icon.v.js";
|
|
6
6
|
export function Input(declaration) {
|
|
@@ -29,7 +29,7 @@ export function Input(declaration) {
|
|
|
29
29
|
}
|
|
30
30
|
export function composeInputModel(props) {
|
|
31
31
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
32
|
-
return
|
|
32
|
+
return sxModel({
|
|
33
33
|
icon: props === null || props === void 0 ? void 0 : props.icon,
|
|
34
34
|
text: (_a = props === null || props === void 0 ? void 0 : props.text) !== null && _a !== void 0 ? _a : "",
|
|
35
35
|
options: (_b = props === null || props === void 0 ? void 0 : props.options) !== null && _b !== void 0 ? _b : [],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Mode, derivative } from "reactronic";
|
|
2
2
|
import { Block, JustText } from "verstak";
|
|
3
|
-
import {
|
|
3
|
+
import { sxModel } from "./common/Utils.js";
|
|
4
4
|
export function Spinner(declaration) {
|
|
5
5
|
return (Block(derivative(declaration, {
|
|
6
6
|
mode: Mode.autonomous,
|
|
@@ -16,7 +16,7 @@ export function Spinner(declaration) {
|
|
|
16
16
|
}
|
|
17
17
|
export function composeSpinnerModel(props) {
|
|
18
18
|
var _a, _b;
|
|
19
|
-
return
|
|
19
|
+
return sxModel({
|
|
20
20
|
active: (_a = props === null || props === void 0 ? void 0 : props.active) !== null && _a !== void 0 ? _a : false,
|
|
21
21
|
color: (_b = props === null || props === void 0 ? void 0 : props.color) !== null && _b !== void 0 ? _b : "",
|
|
22
22
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactiveTreeNode, Mode, derivative } from "reactronic";
|
|
2
2
|
import { Block, JustText, OnClick } from "verstak";
|
|
3
|
-
import {
|
|
3
|
+
import { sxModel } from "./common/Utils.js";
|
|
4
4
|
import { Theme } from "./Theme.js";
|
|
5
5
|
import { Icon } from "./Icon.v.js";
|
|
6
6
|
export function Toggle(declaration) {
|
|
@@ -8,7 +8,7 @@ export function Toggle(declaration) {
|
|
|
8
8
|
mode: Mode.autonomous,
|
|
9
9
|
preparation: el => {
|
|
10
10
|
var _a;
|
|
11
|
-
(_a = el.model) !== null && _a !== void 0 ? _a : (el.model =
|
|
11
|
+
(_a = el.model) !== null && _a !== void 0 ? _a : (el.model = sxModel({
|
|
12
12
|
label: ReactiveTreeNode.current.key,
|
|
13
13
|
checked: true,
|
|
14
14
|
color: "green"
|
|
@@ -6,5 +6,5 @@ export * from "./Spinner.v.js";
|
|
|
6
6
|
export * from "./Toggle.v.js";
|
|
7
7
|
export * from "./Markdown.v.js";
|
|
8
8
|
export * from "./Theme.js";
|
|
9
|
-
export {
|
|
9
|
+
export { sxModel } from "./common/Utils.js";
|
|
10
10
|
export { RealTimeClock } from "./RealTimeClock.js";
|
|
@@ -6,5 +6,5 @@ export * from "./Spinner.v.js";
|
|
|
6
6
|
export * from "./Toggle.v.js";
|
|
7
7
|
export * from "./Markdown.v.js";
|
|
8
8
|
export * from "./Theme.js";
|
|
9
|
-
export {
|
|
9
|
+
export { sxModel } from "./common/Utils.js";
|
|
10
10
|
export { RealTimeClock } from "./RealTimeClock.js";
|
|
@@ -2,4 +2,4 @@ import { Ref } from "reactronic";
|
|
|
2
2
|
export type ValuesOrRefs<T> = {
|
|
3
3
|
[K in keyof T]: T[K] | Ref<T[K]>;
|
|
4
4
|
};
|
|
5
|
-
export declare function
|
|
5
|
+
export declare function sxModel<T extends Object>(modelProps: ValuesOrRefs<T>): T;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SxObject, Ref, runTransactional, Isolation } from "reactronic";
|
|
2
|
-
export function
|
|
3
|
-
return runTransactional({ isolation: Isolation.disjoinFromOuterTransaction }, () => new
|
|
2
|
+
export function sxModel(modelProps) {
|
|
3
|
+
return runTransactional({ isolation: Isolation.disjoinFromOuterTransaction }, () => new SxComposition(modelProps));
|
|
4
4
|
}
|
|
5
|
-
class
|
|
5
|
+
class SxComposition extends SxObject {
|
|
6
6
|
constructor(composition) {
|
|
7
7
|
super();
|
|
8
8
|
convertValuesToFieldsAndRefsToGetSet(this, composition);
|
|
@@ -222,8 +222,8 @@ export function isSplitViewPartition(childDriver) {
|
|
|
222
222
|
function overrideMethod(declaration, method, func) {
|
|
223
223
|
const baseScript = declaration[method];
|
|
224
224
|
declaration[method] = baseScript !== undefined
|
|
225
|
-
? (el, base) => { baseScript(el, base); func(el); }
|
|
226
|
-
: (el, base) => { base(); func(el); };
|
|
225
|
+
? (el, base) => { baseScript.call(el, el, base); func.call(el, el); }
|
|
226
|
+
: (el, base) => { base(); func.call(el, el); };
|
|
227
227
|
}
|
|
228
228
|
export class PartitionDriver extends HtmlDriver {
|
|
229
229
|
runScript(node) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare function restyler<T>(restyle: () => T):
|
|
2
|
-
export declare class
|
|
1
|
+
export declare function restyler<T>(restyle: () => T): SxStyles<T>;
|
|
2
|
+
export declare class SxStyles<T> {
|
|
3
3
|
private readonly restyle;
|
|
4
4
|
constructor(restyle: () => T);
|
|
5
5
|
protected cache(): T;
|
|
@@ -9,9 +9,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
};
|
|
10
10
|
import { cache, runTransactional } from "reactronic";
|
|
11
11
|
export function restyler(restyle) {
|
|
12
|
-
return runTransactional(() => new
|
|
12
|
+
return runTransactional(() => new SxStyles(restyle));
|
|
13
13
|
}
|
|
14
|
-
export class
|
|
14
|
+
export class SxStyles {
|
|
15
15
|
constructor(restyle) {
|
|
16
16
|
this.restyle = restyle;
|
|
17
17
|
}
|
|
@@ -27,4 +27,4 @@ __decorate([
|
|
|
27
27
|
__metadata("design:type", Function),
|
|
28
28
|
__metadata("design:paramtypes", []),
|
|
29
29
|
__metadata("design:returntype", Object)
|
|
30
|
-
],
|
|
30
|
+
], SxStyles.prototype, "cache", null);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "verstak",
|
|
3
|
-
"version": "0.95.
|
|
3
|
+
"version": "0.95.25046",
|
|
4
4
|
"description": "Verstak - Front-End Library",
|
|
5
5
|
"publisher": "Nezaboodka Software",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"markdown-it": "^14.1.0",
|
|
43
43
|
"markdown-it-prism": "^2.3.0",
|
|
44
44
|
"prismjs": "^1.30.0",
|
|
45
|
-
"reactronic": "^0.95.
|
|
45
|
+
"reactronic": "^0.95.25046"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/markdown-it": "14.1.2",
|