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.
@@ -1,6 +1,6 @@
1
1
  import { ReactiveTreeNode, Mode, derivative } from "reactronic";
2
2
  import { Block, JustText, OnClick } from "verstak";
3
- import { sxModel } from "./common/Utils.js";
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 = sxModel({
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 { sxModel } from "./common/Utils.js";
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 = sxModel({ source: undefined }));
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 { sxModel } from "./common/Utils.js";
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 sxModel({
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 : [],
@@ -1,5 +1,5 @@
1
- import { SxObject } from "reactronic";
2
- export declare class RealTimeClock extends SxObject {
1
+ import { RxObject } from "reactronic";
2
+ export declare class RealTimeClock extends RxObject {
3
3
  hour: number;
4
4
  minute: number;
5
5
  second: number;
@@ -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 { SxObject, transaction, reaction } from "reactronic";
11
- export class RealTimeClock extends SxObject {
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 { sxModel } from "./common/Utils.js";
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 sxModel({
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 { sxModel } from "./common/Utils.js";
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 = sxModel({
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 { sxModel } from "./common/Utils.js";
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 { sxModel } from "./common/Utils.js";
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 sxModel<T extends Object>(modelProps: ValuesOrRefs<T>): T;
5
+ export declare function rxModel<T extends Object>(modelProps: ValuesOrRefs<T>): T;
@@ -1,8 +1,8 @@
1
- import { SxObject, Ref, runTransactional, Isolation } from "reactronic";
2
- export function sxModel(modelProps) {
3
- return runTransactional({ isolation: Isolation.disjoinFromOuterTransaction }, () => new SxComposition(modelProps));
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 SxComposition extends SxObject {
5
+ class RxComposition extends RxObject {
6
6
  constructor(composition) {
7
7
  super();
8
8
  convertValuesToFieldsAndRefsToGetSet(this, composition);
@@ -1,4 +1,4 @@
1
- import { SxObject } from "reactronic";
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 SxObject {
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 { SxObject, signal } from "reactronic";
11
- export class Styling extends SxObject {
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, SxObject } from "reactronic";
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 SxObject {
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): SxStyles<T>;
2
- export declare class SxStyles<T> {
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 SxStyles(restyle));
12
+ return runTransactional(() => new RxStyles(restyle));
13
13
  }
14
- export class SxStyles {
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
- ], SxStyles.prototype, "cache", null);
30
+ ], RxStyles.prototype, "cache", null);
@@ -1,5 +1,5 @@
1
- import { SxObject } from "reactronic";
2
- export declare class Sensor extends SxObject {
1
+ import { RxObject } from "reactronic";
2
+ export declare class Sensor extends RxObject {
3
3
  revision: number;
4
4
  elementDataList: unknown[];
5
5
  get topElementData(): unknown;
@@ -1,5 +1,5 @@
1
- import { SxObject } from "reactronic";
2
- export class Sensor extends SxObject {
1
+ import { RxObject } from "reactronic";
2
+ export class Sensor extends RxObject {
3
3
  constructor() {
4
4
  super(...arguments);
5
5
  this.revision = 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "verstak",
3
- "version": "0.95.25045",
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.25045"
45
+ "reactronic": "^0.95.25047"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@types/markdown-it": "14.1.2",