@mintjamsinc/ichigojs 0.1.44 → 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 +22 -15
- package/dist/ichigo.cjs.map +1 -1
- package/dist/ichigo.esm.js +22 -15
- 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 +22 -15
- package/dist/ichigo.umd.js.map +1 -1
- package/dist/ichigo.umd.min.js +1 -1
- package/package.json +1 -1
package/dist/ichigo.cjs
CHANGED
|
@@ -7573,9 +7573,16 @@
|
|
|
7573
7573
|
}
|
|
7574
7574
|
/**
|
|
7575
7575
|
* Updates a DOM property.
|
|
7576
|
+
* For value-like properties (value, textContent, innerHTML), null/undefined is converted to empty string
|
|
7577
|
+
* to match Vue.js behavior and prevent "undefined" from being displayed.
|
|
7576
7578
|
*/
|
|
7577
7579
|
#updateProperty(element, name, value) {
|
|
7578
|
-
|
|
7580
|
+
if (value == null && (name === 'value' || name === 'textContent' || name === 'innerHTML')) {
|
|
7581
|
+
element[name] = '';
|
|
7582
|
+
}
|
|
7583
|
+
else {
|
|
7584
|
+
element[name] = value;
|
|
7585
|
+
}
|
|
7579
7586
|
}
|
|
7580
7587
|
/**
|
|
7581
7588
|
* Updates a boolean attribute.
|
|
@@ -12619,7 +12626,7 @@
|
|
|
12619
12626
|
#initializeBindings() {
|
|
12620
12627
|
// Create bindings with change tracking
|
|
12621
12628
|
this.#bindings = new VBindings({
|
|
12622
|
-
onChange: (
|
|
12629
|
+
onChange: () => {
|
|
12623
12630
|
this.#scheduleUpdate();
|
|
12624
12631
|
},
|
|
12625
12632
|
vApplication: this
|
|
@@ -12797,17 +12804,20 @@
|
|
|
12797
12804
|
processing.add(key);
|
|
12798
12805
|
// Get the dependencies for this computed property
|
|
12799
12806
|
const deps = this.#computedDependencies[key] || [];
|
|
12800
|
-
//
|
|
12801
|
-
|
|
12802
|
-
|
|
12803
|
-
return;
|
|
12804
|
-
}
|
|
12805
|
-
// First, recursively compute any dependent computed properties
|
|
12807
|
+
// First, recursively compute any dependent computed properties.
|
|
12808
|
+
// This must happen before the change check so that computed→computed
|
|
12809
|
+
// dependency chains are resolved and allChanges is up-to-date.
|
|
12806
12810
|
for (const dep of deps) {
|
|
12807
12811
|
if (this.#options.computed[dep]) {
|
|
12808
12812
|
compute(dep);
|
|
12809
12813
|
}
|
|
12810
12814
|
}
|
|
12815
|
+
// If none of the dependencies have changed, skip recomputation (unless it's initialization).
|
|
12816
|
+
// Checked after recursive computation to detect transitive changes through computed properties.
|
|
12817
|
+
if (!isInitialization && !deps.some(dep => allChanges.has(dep))) {
|
|
12818
|
+
computed.add(key);
|
|
12819
|
+
return;
|
|
12820
|
+
}
|
|
12811
12821
|
// Now compute this property
|
|
12812
12822
|
const computedFn = this.#options.computed[key];
|
|
12813
12823
|
try {
|
|
@@ -12849,13 +12859,10 @@
|
|
|
12849
12859
|
computed.add(key);
|
|
12850
12860
|
processing.delete(key);
|
|
12851
12861
|
};
|
|
12852
|
-
//
|
|
12853
|
-
|
|
12854
|
-
|
|
12855
|
-
|
|
12856
|
-
if (isInitialization || deps.some(dep => allChanges.has(dep))) {
|
|
12857
|
-
compute(key);
|
|
12858
|
-
}
|
|
12862
|
+
// Compute all properties; the recursive logic inside compute() handles
|
|
12863
|
+
// dependency ordering and skips properties whose dependencies did not change.
|
|
12864
|
+
for (const key of Object.keys(this.#computedDependencies)) {
|
|
12865
|
+
compute(key);
|
|
12859
12866
|
}
|
|
12860
12867
|
}
|
|
12861
12868
|
/**
|