verstak 0.23.118 → 0.23.120

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.
@@ -16,7 +16,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
16
16
  step((generator = generator.apply(thisArg, _arguments || [])).next());
17
17
  });
18
18
  };
19
- import { reactive, nonreactive, Transaction, Rx, options, Reentrance } from "reactronic";
19
+ import { reactive, unobs, Transaction, Rx, options, Reentrance } from "reactronic";
20
20
  import { RxNode } from "./RxDomV1.Types.js";
21
21
  export class BasicNodeType {
22
22
  constructor(name, sequential) {
@@ -423,7 +423,7 @@ function tryToRender(node) {
423
423
  if (node.inline)
424
424
  invokeRender(node, node.args);
425
425
  else
426
- nonreactive(inst.rerender, node);
426
+ unobs(inst.rerender, node);
427
427
  }
428
428
  function tryToInitialize(node) {
429
429
  var _a, _b;
@@ -109,15 +109,15 @@ export declare enum Mode {
109
109
  ManualMount = 2
110
110
  }
111
111
  export declare enum Align {
112
- Stretch = 0,
113
- Left = 1,
114
- CenterX = 2,
115
- Right = 3,
116
- Top = 4,
117
- CenterY = 8,
118
- Bottom = 12,
119
112
  Default = 16,
120
- Center = 10
113
+ ToBounds = 0,
114
+ ToLeft = 1,
115
+ ToCenterX = 2,
116
+ ToRight = 3,
117
+ ToTop = 4,
118
+ ToCenterY = 8,
119
+ ToBottom = 12,
120
+ ToCenter = 10
121
121
  }
122
122
  export interface ElasticSize {
123
123
  cells?: number;
@@ -22,13 +22,13 @@ export var Mode;
22
22
  })(Mode || (Mode = {}));
23
23
  export var Align;
24
24
  (function (Align) {
25
- Align[Align["Stretch"] = 0] = "Stretch";
26
- Align[Align["Left"] = 1] = "Left";
27
- Align[Align["CenterX"] = 2] = "CenterX";
28
- Align[Align["Right"] = 3] = "Right";
29
- Align[Align["Top"] = 4] = "Top";
30
- Align[Align["CenterY"] = 8] = "CenterY";
31
- Align[Align["Bottom"] = 12] = "Bottom";
32
25
  Align[Align["Default"] = 16] = "Default";
33
- Align[Align["Center"] = 10] = "Center";
26
+ Align[Align["ToBounds"] = 0] = "ToBounds";
27
+ Align[Align["ToLeft"] = 1] = "ToLeft";
28
+ Align[Align["ToCenterX"] = 2] = "ToCenterX";
29
+ Align[Align["ToRight"] = 3] = "ToRight";
30
+ Align[Align["ToTop"] = 4] = "ToTop";
31
+ Align[Align["ToCenterY"] = 8] = "ToCenterY";
32
+ Align[Align["ToBottom"] = 12] = "ToBottom";
33
+ Align[Align["ToCenter"] = 10] = "ToCenter";
34
34
  })(Align || (Align = {}));
@@ -16,7 +16,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
16
16
  step((generator = generator.apply(thisArg, _arguments || [])).next());
17
17
  });
18
18
  };
19
- import { reactive, nonreactive, Transaction, options, Reentrance, Rx, MergeList, ObservableObject, raw } from "reactronic";
19
+ import { reactive, unobs, Transaction, options, Reentrance, Rx, MergeList, ObservableObject, raw } from "reactronic";
20
20
  import { BlockKind, Priority, Mode, Align } from "./Interfaces.js";
21
21
  import { emitLetters, equalBlockCoords, parseBlockCoords, getCallerInfo } from "./Utils.js";
22
22
  export class Verstak {
@@ -455,7 +455,7 @@ class BlockImpl {
455
455
  const b = BlockImpl.curr.instance;
456
456
  const node = b.node;
457
457
  const owner = node.owner;
458
- const hostCtx = nonreactive(() => { var _a; return (_a = owner.node.context) === null || _a === void 0 ? void 0 : _a.value; });
458
+ const hostCtx = unobs(() => { var _a; return (_a = owner.node.context) === null || _a === void 0 ? void 0 : _a.value; });
459
459
  if (value && value !== hostCtx) {
460
460
  if (hostCtx)
461
461
  node.outer = owner;
@@ -693,7 +693,7 @@ function triggerRebuild(ties) {
693
693
  });
694
694
  });
695
695
  }
696
- nonreactive(b.rebuild, node.builder.triggers);
696
+ unobs(b.rebuild, node.builder.triggers);
697
697
  }
698
698
  else
699
699
  rebuildNow(ties);
@@ -704,7 +704,7 @@ function mountIfNecessary(block) {
704
704
  const driver = node.driver;
705
705
  if (node.stamp === 0) {
706
706
  node.stamp = 1;
707
- nonreactive(() => {
707
+ unobs(() => {
708
708
  driver.create(block, block);
709
709
  driver.initialize(block);
710
710
  if (block.isAutoMountEnabled)
@@ -712,7 +712,7 @@ function mountIfNecessary(block) {
712
712
  });
713
713
  }
714
714
  else if (block.isMoved && block.isAutoMountEnabled)
715
- nonreactive(() => driver.mount(block));
715
+ unobs(() => driver.mount(block));
716
716
  }
717
717
  function rebuildNow(ties) {
718
718
  const b = ties.instance;
@@ -751,7 +751,7 @@ function triggerFinalization(ties, isLeader, individual) {
751
751
  if (individual && node.key !== node.builder.key && !driver.isRow)
752
752
  console.log(`WARNING: it is recommended to assign explicit key for conditional block in order to avoid unexpected side effects: ${node.key}`);
753
753
  node.stamp = ~node.stamp;
754
- const childrenAreLeaders = nonreactive(() => driver.finalize(b, isLeader));
754
+ const childrenAreLeaders = unobs(() => driver.finalize(b, isLeader));
755
755
  b.native = null;
756
756
  b.controller = null;
757
757
  if (b.isOn(Mode.PinpointRebuild)) {
@@ -90,7 +90,7 @@ export class VerstakHtmlDriver extends HtmlDriver {
90
90
  else {
91
91
  const hostDriver = bNode.host.node.driver;
92
92
  if (hostDriver.isRow) {
93
- driver.applyBlockAlignment(block, Align.Stretch);
93
+ driver.applyBlockAlignment(block, Align.ToBounds);
94
94
  hostDriver.applyHeightGrowth(bNode.host, value);
95
95
  }
96
96
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "verstak",
3
- "version": "0.23.118",
3
+ "version": "0.23.120",
4
4
  "description": "Verstak - Front-End Library",
5
5
  "publisher": "Nezaboodka Software",
6
6
  "license": "Apache-2.0",
@@ -31,15 +31,15 @@
31
31
  },
32
32
  "homepage": "https://github.com/nezaboodka/verstak/blob/master/README.md#readme",
33
33
  "dependencies": {
34
- "reactronic": "^0.23.109"
34
+ "reactronic": "^0.23.111"
35
35
  },
36
36
  "devDependencies": {
37
- "@types/node": "20.6.3",
38
- "@typescript-eslint/eslint-plugin": "6.7.2",
39
- "@typescript-eslint/parser": "6.7.2",
37
+ "@types/node": "20.8.9",
38
+ "@typescript-eslint/eslint-plugin": "6.9.0",
39
+ "@typescript-eslint/parser": "6.9.0",
40
40
  "ava": "5.3.1",
41
41
  "c8": "8.0.1",
42
- "eslint": "8.49.0",
42
+ "eslint": "8.52.0",
43
43
  "ts-node": "10.9.1",
44
44
  "tsconfig-paths": "4.2.0",
45
45
  "typescript": "5.2.2"