solid-ctrl-flow 1.0.25 → 1.0.26

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.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { untrack, createMemo, splitProps, createEffect, on, createResource, createContext, createRoot, getOwner, createComponent, useContext, onCleanup, Match, mergeProps, For, Show } from "solid-js";
1
+ import { untrack, createMemo, splitProps, createEffect, on, createResource, createContext, createRoot, getOwner, createComponent, useContext, createRenderEffect, onCleanup, Match, mergeProps, For, Show } from "solid-js";
2
2
  import { createMutable } from "solid-js/store";
3
3
  function untrackCall(f, ...args) {
4
4
  return untrack(() => f.apply(this, args));
@@ -59,8 +59,8 @@ function runWithContext(ctx2, value, f) {
59
59
  });
60
60
  }
61
61
  const IDENTITY = (x) => x;
62
- function bind(source, dest, to = IDENTITY) {
63
- const d = createRoot((d2) => (createEffect(on(source[0], (x) => dest[1]((prev) => to(x, prev)))), d2));
62
+ function bind([get], [, set], to = IDENTITY) {
63
+ const d = createRoot((d2) => (createRenderEffect(on(get, (x) => set((prev) => to(x, prev)))), d2));
64
64
  return onCleanup(d), d;
65
65
  }
66
66
  function bindTwoWay(source, dest, to = IDENTITY, from = IDENTITY) {
package/dist/index.umd.js CHANGED
@@ -61,8 +61,8 @@
61
61
  });
62
62
  }
63
63
  const IDENTITY = (x) => x;
64
- function bind(source, dest, to = IDENTITY) {
65
- const d = solidJs.createRoot((d2) => (solidJs.createEffect(solidJs.on(source[0], (x) => dest[1]((prev) => to(x, prev)))), d2));
64
+ function bind([get], [, set], to = IDENTITY) {
65
+ const d = solidJs.createRoot((d2) => (solidJs.createRenderEffect(solidJs.on(get, (x) => set((prev) => to(x, prev)))), d2));
66
66
  return solidJs.onCleanup(d), d;
67
67
  }
68
68
  function bindTwoWay(source, dest, to = IDENTITY, from = IDENTITY) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "solid-ctrl-flow",
3
- "version": "1.0.25",
3
+ "version": "1.0.26",
4
4
  "description": "Control flow components for solid-js",
5
5
  "author": "AFatNiBBa",
6
6
  "license": "ISC",