@mintjamsinc/ichigojs 0.1.45 → 0.1.46
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/ichigo.cjs +14 -14
- package/dist/ichigo.cjs.map +1 -1
- package/dist/ichigo.esm.js +14 -14
- package/dist/ichigo.esm.js.map +1 -1
- package/dist/ichigo.esm.min.js +1 -1
- package/dist/ichigo.min.cjs +1 -1
- package/dist/ichigo.umd.js +14 -14
- package/dist/ichigo.umd.js.map +1 -1
- package/dist/ichigo.umd.min.js +1 -1
- package/package.json +1 -1
package/dist/ichigo.esm.js
CHANGED
|
@@ -12620,7 +12620,7 @@ class VApplication {
|
|
|
12620
12620
|
#initializeBindings() {
|
|
12621
12621
|
// Create bindings with change tracking
|
|
12622
12622
|
this.#bindings = new VBindings({
|
|
12623
|
-
onChange: (
|
|
12623
|
+
onChange: () => {
|
|
12624
12624
|
this.#scheduleUpdate();
|
|
12625
12625
|
},
|
|
12626
12626
|
vApplication: this
|
|
@@ -12798,17 +12798,20 @@ class VApplication {
|
|
|
12798
12798
|
processing.add(key);
|
|
12799
12799
|
// Get the dependencies for this computed property
|
|
12800
12800
|
const deps = this.#computedDependencies[key] || [];
|
|
12801
|
-
//
|
|
12802
|
-
|
|
12803
|
-
|
|
12804
|
-
return;
|
|
12805
|
-
}
|
|
12806
|
-
// First, recursively compute any dependent computed properties
|
|
12801
|
+
// First, recursively compute any dependent computed properties.
|
|
12802
|
+
// This must happen before the change check so that computed→computed
|
|
12803
|
+
// dependency chains are resolved and allChanges is up-to-date.
|
|
12807
12804
|
for (const dep of deps) {
|
|
12808
12805
|
if (this.#options.computed[dep]) {
|
|
12809
12806
|
compute(dep);
|
|
12810
12807
|
}
|
|
12811
12808
|
}
|
|
12809
|
+
// If none of the dependencies have changed, skip recomputation (unless it's initialization).
|
|
12810
|
+
// Checked after recursive computation to detect transitive changes through computed properties.
|
|
12811
|
+
if (!isInitialization && !deps.some(dep => allChanges.has(dep))) {
|
|
12812
|
+
computed.add(key);
|
|
12813
|
+
return;
|
|
12814
|
+
}
|
|
12812
12815
|
// Now compute this property
|
|
12813
12816
|
const computedFn = this.#options.computed[key];
|
|
12814
12817
|
try {
|
|
@@ -12850,13 +12853,10 @@ class VApplication {
|
|
|
12850
12853
|
computed.add(key);
|
|
12851
12854
|
processing.delete(key);
|
|
12852
12855
|
};
|
|
12853
|
-
//
|
|
12854
|
-
|
|
12855
|
-
|
|
12856
|
-
|
|
12857
|
-
if (isInitialization || deps.some(dep => allChanges.has(dep))) {
|
|
12858
|
-
compute(key);
|
|
12859
|
-
}
|
|
12856
|
+
// Compute all properties; the recursive logic inside compute() handles
|
|
12857
|
+
// dependency ordering and skips properties whose dependencies did not change.
|
|
12858
|
+
for (const key of Object.keys(this.#computedDependencies)) {
|
|
12859
|
+
compute(key);
|
|
12860
12860
|
}
|
|
12861
12861
|
}
|
|
12862
12862
|
/**
|