@novely/core 0.45.0 → 0.45.1
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/index.d.ts +9 -3
- package/dist/index.global.js +10 -7
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +10 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1740,22 +1740,25 @@ var novely = ({
|
|
|
1740
1740
|
const active$ = store(false);
|
|
1741
1741
|
const visible$ = store(false);
|
|
1742
1742
|
const update = () => {
|
|
1743
|
+
const lang = getLanguageFromStore(storageData);
|
|
1744
|
+
const state = getStateAtCtx(ctx);
|
|
1743
1745
|
const activeValue = !active || active({
|
|
1744
|
-
lang
|
|
1745
|
-
state
|
|
1746
|
+
lang,
|
|
1747
|
+
state
|
|
1746
1748
|
});
|
|
1747
1749
|
const visibleValue = !visible || visible({
|
|
1748
|
-
lang
|
|
1749
|
-
state
|
|
1750
|
+
lang,
|
|
1751
|
+
state
|
|
1750
1752
|
});
|
|
1751
1753
|
active$.set(activeValue);
|
|
1752
1754
|
visible$.set(visibleValue);
|
|
1753
1755
|
};
|
|
1754
1756
|
update();
|
|
1755
1757
|
const onSelectGuarded = onSelect || noop;
|
|
1756
|
-
const onSelectWrapped =
|
|
1757
|
-
|
|
1758
|
-
|
|
1758
|
+
const onSelectWrapped = () => {
|
|
1759
|
+
onSelectGuarded({
|
|
1760
|
+
recompute: update
|
|
1761
|
+
});
|
|
1759
1762
|
};
|
|
1760
1763
|
const imageValue = image ? handleImageAsset(image) : "";
|
|
1761
1764
|
return [templateReplace(content, data2), active$, visible$, onSelectWrapped, imageValue];
|