@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.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: getLanguageFromStore(storageData),
1745
- state: getStateAtCtx(ctx)
1746
+ lang,
1747
+ state
1746
1748
  });
1747
1749
  const visibleValue = !visible || visible({
1748
- lang: getLanguageFromStore(storageData),
1749
- state: getStateAtCtx(ctx)
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 = async () => {
1757
- await onSelectGuarded();
1758
- update();
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];