verstak 0.95.25045 → 0.95.25047
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/RealTimeClock.d.ts +2 -2
- package/build/dist/source/components/RealTimeClock.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 +4 -4
- package/build/dist/source/components/theme/Styling.d.ts +2 -2
- package/build/dist/source/components/theme/Styling.js +2 -2
- package/build/dist/source/core/ElDriver.js +2 -2
- 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/build/dist/source/core/sensors/Sensor.d.ts +2 -2
- package/build/dist/source/core/sensors/Sensor.js +2 -2
- 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 { rxModel } 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 = rxModel({
|
|
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 { rxModel } 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 = rxModel({ 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 { rxModel } 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 rxModel({
|
|
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 : [],
|
|
@@ -7,8 +7,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
|
-
import {
|
|
11
|
-
export class RealTimeClock extends
|
|
10
|
+
import { RxObject, transaction, reaction } from "reactronic";
|
|
11
|
+
export class RealTimeClock extends RxObject {
|
|
12
12
|
constructor(interval = 1000) {
|
|
13
13
|
super();
|
|
14
14
|
this.hour = 0;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Mode, derivative } from "reactronic";
|
|
2
2
|
import { Block, JustText } from "verstak";
|
|
3
|
-
import {
|
|
3
|
+
import { rxModel } 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 rxModel({
|
|
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 { rxModel } 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 = rxModel({
|
|
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 { rxModel } 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 { rxModel } 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 rxModel<T extends Object>(modelProps: ValuesOrRefs<T>): T;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export function
|
|
3
|
-
return runTransactional({ isolation: Isolation.disjoinFromOuterTransaction }, () => new
|
|
1
|
+
import { RxObject, Ref, runTransactional, Isolation } from "reactronic";
|
|
2
|
+
export function rxModel(modelProps) {
|
|
3
|
+
return runTransactional({ isolation: Isolation.disjoinFromOuterTransaction }, () => new RxComposition(modelProps));
|
|
4
4
|
}
|
|
5
|
-
class
|
|
5
|
+
class RxComposition extends RxObject {
|
|
6
6
|
constructor(composition) {
|
|
7
7
|
super();
|
|
8
8
|
convertValuesToFieldsAndRefsToGetSet(this, composition);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RxObject } from "reactronic";
|
|
2
2
|
export type BasicAbstractTheme = {
|
|
3
3
|
fillColor: string;
|
|
4
4
|
textColor: string;
|
|
@@ -10,7 +10,7 @@ export type BasicAbstractTheme = {
|
|
|
10
10
|
outlinePadding: string;
|
|
11
11
|
shadow: string;
|
|
12
12
|
};
|
|
13
|
-
export declare class Styling extends
|
|
13
|
+
export declare class Styling extends RxObject {
|
|
14
14
|
protected readonly $: BasicAbstractTheme;
|
|
15
15
|
constructor($: BasicAbstractTheme);
|
|
16
16
|
}
|
|
@@ -7,8 +7,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
|
-
import {
|
|
11
|
-
export class Styling extends
|
|
10
|
+
import { RxObject, signal } from "reactronic";
|
|
11
|
+
export class Styling extends RxObject {
|
|
12
12
|
constructor($) {
|
|
13
13
|
super();
|
|
14
14
|
this.$ = $;
|
|
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
|
-
import { ReactiveTreeNode, BaseDriver, Transaction, signal,
|
|
10
|
+
import { ReactiveTreeNode, BaseDriver, Transaction, signal, RxObject } from "reactronic";
|
|
11
11
|
import { ElKind, Horizontal, Vertical, Direction } from "./El.js";
|
|
12
12
|
import { equalElCoords, parseElCoords } from "./ElUtils.js";
|
|
13
13
|
export class ElDriver extends BaseDriver {
|
|
@@ -535,7 +535,7 @@ export class ElImpl {
|
|
|
535
535
|
native.className = enabled ? styleName : "";
|
|
536
536
|
}
|
|
537
537
|
}
|
|
538
|
-
class Size extends
|
|
538
|
+
class Size extends RxObject {
|
|
539
539
|
constructor() {
|
|
540
540
|
super();
|
|
541
541
|
this.raw = { min: "", max: "" };
|
|
@@ -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): RxStyles<T>;
|
|
2
|
+
export declare class RxStyles<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 RxStyles(restyle));
|
|
13
13
|
}
|
|
14
|
-
export class
|
|
14
|
+
export class RxStyles {
|
|
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
|
+
], RxStyles.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.25047",
|
|
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.25047"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/markdown-it": "14.1.2",
|