verstak 0.95.25044 → 0.95.25045

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 { observableModel } from "./common/Utils.js";
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 = observableModel({
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 { observableModel } from "./common/Utils.js";
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 = observableModel({ source: undefined }));
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 { observableModel } from "./common/Utils.js";
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 observableModel({
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 { observableModel } from "./common/Utils.js";
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 observableModel({
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 { observableModel } from "./common/Utils.js";
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 = observableModel({
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 { observableModel } from "./common/Utils.js";
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 { observableModel } from "./common/Utils.js";
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 observableModel<T extends Object>(modelProps: ValuesOrRefs<T>): T;
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 observableModel(modelProps) {
3
- return runTransactional({ isolation: Isolation.disjoinFromOuterTransaction }, () => new ObservableComposition(modelProps));
2
+ export function sxModel(modelProps) {
3
+ return runTransactional({ isolation: Isolation.disjoinFromOuterTransaction }, () => new SxComposition(modelProps));
4
4
  }
5
- class ObservableComposition extends SxObject {
5
+ class SxComposition extends SxObject {
6
6
  constructor(composition) {
7
7
  super();
8
8
  convertValuesToFieldsAndRefsToGetSet(this, composition);
@@ -1,5 +1,5 @@
1
- export declare function restyler<T>(restyle: () => T): ObservableStyles<T>;
2
- export declare class ObservableStyles<T> {
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 ObservableStyles(restyle));
12
+ return runTransactional(() => new SxStyles(restyle));
13
13
  }
14
- export class ObservableStyles {
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
- ], ObservableStyles.prototype, "cache", null);
30
+ ], SxStyles.prototype, "cache", null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "verstak",
3
- "version": "0.95.25044",
3
+ "version": "0.95.25045",
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.25043"
45
+ "reactronic": "^0.95.25045"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@types/markdown-it": "14.1.2",