@zenithbuild/runtime 0.6.0 → 0.6.4

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/dist/hydrate.js CHANGED
@@ -13,6 +13,7 @@ import { signal } from './signal.js';
13
13
  import { state } from './state.js';
14
14
  import {
15
15
  zeneffect,
16
+ zenEffect,
16
17
  zenMount,
17
18
  createSideEffectScope,
18
19
  activateSideEffectScope,
@@ -752,7 +753,13 @@ function _evaluateExpression(binding, stateValues, stateKeys, signalMap, compone
752
753
  ssrData,
753
754
  props: props || {},
754
755
  componentBindings,
755
- zenhtml: _zenhtml
756
+ zenhtml: _zenhtml,
757
+ fragment(html) {
758
+ return {
759
+ __zenith_fragment: true,
760
+ html: html === null || html === undefined || html === false ? '' : String(html)
761
+ };
762
+ }
756
763
  });
757
764
  }
758
765
  }
package/dist/signal.js CHANGED
@@ -15,6 +15,7 @@
15
15
  // - No scheduler
16
16
  // - No async queue
17
17
  // ---------------------------------------------------------------------------
18
+ import { _nextReactiveId, _trackDependency } from './zeneffect.js';
18
19
 
19
20
  /**
20
21
  * Create a deterministic signal with explicit subscription semantics.
@@ -25,9 +26,12 @@
25
26
  export function signal(initialValue) {
26
27
  let value = initialValue;
27
28
  const subscribers = new Set();
29
+ const reactiveId = _nextReactiveId();
28
30
 
29
31
  return {
32
+ __zenith_id: reactiveId,
30
33
  get() {
34
+ _trackDependency(this);
31
35
  return value;
32
36
  },
33
37
  set(nextValue) {
package/dist/state.js CHANGED
@@ -37,9 +37,12 @@ function cloneSnapshot(value) {
37
37
  export function state(initialValue) {
38
38
  let current = Object.freeze(cloneSnapshot(initialValue));
39
39
  const subscribers = new Set();
40
+ const reactiveId = _nextReactiveId();
40
41
 
41
42
  return {
43
+ __zenith_id: reactiveId,
42
44
  get() {
45
+ _trackDependency(this);
43
46
  return current;
44
47
  },
45
48
  set(nextPatch) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenithbuild/runtime",
3
- "version": "0.6.0",
3
+ "version": "0.6.4",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "exports": {