solid-ctrl-flow 1.0.54 → 1.0.55

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 CHANGED
@@ -14,10 +14,9 @@ declare const BASE_CTOR: new <T>() => Accessor<T>;
14
14
 
15
15
  /**
16
16
  * Creates a one-way binding between two {@link Signal}s.
17
- * The function uses {@link createRenderEffect}, which means that:
17
+ * The function uses {@link createComputed}, which means that:
18
18
  * - As soon as the function is done executing the two {@link Signal}s will have the same value
19
- * - If {@link source} changes, {@link dest} wont be instantly updated
20
- * - If the current owner gets disposed before {@link dest} is updated, it never will
19
+ * - If {@link source} changes, {@link dest} will be instantly updated
21
20
  * @param source The getter of the source of the binding
22
21
  * @param dest The setter of the destination of the binding
23
22
  * @param to Conversion function from {@link S} to {@link D}
@@ -46,19 +45,19 @@ export declare function Case(props: ParentProps<{
46
45
  }>): JSX.Element;
47
46
 
48
47
  export declare function Case(props: ParentProps<{
49
- pred: (x: any) => unknown;
48
+ pred(x: any): unknown;
50
49
  }>): JSX.Element;
51
50
 
52
51
  export declare function Case<T>(props: {
53
- pred: (x: any) => T;
52
+ pred(x: any): T;
54
53
  keyed?: false;
55
- children: (x: Accessor<NonNullable<T>>) => JSX.Element;
54
+ children(x: Accessor<NonNullable<T>>): JSX.Element;
56
55
  }): JSX.Element;
57
56
 
58
57
  export declare function Case<T>(props: {
59
- pred: (x: any) => T;
58
+ pred(x: any): T;
60
59
  keyed: true;
61
- children: (x: NonNullable<T>) => JSX.Element;
60
+ children(x: NonNullable<T>): JSX.Element;
62
61
  }): JSX.Element;
63
62
 
64
63
  /**
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { useContext, createMemo, createComponent, createContext, createRoot, getOwner, untrack, createEffect, on, createResource, splitProps, Show, onCleanup, For, Match, mergeProps, createRenderEffect, createSignal, getListener } from "solid-js";
1
+ import { useContext, createMemo, createComponent, createContext, createRoot, getOwner, untrack, createEffect, on, createResource, splitProps, Show, onCleanup, For, Match, mergeProps, createComputed, createSignal, getListener } from "solid-js";
2
2
  import { createMutable } from "solid-js/store";
3
3
  const BASE_CTOR = Function;
4
4
  class ReactiveContext extends BASE_CTOR {
@@ -233,7 +233,7 @@ function Case(props) {
233
233
  }
234
234
  const IDENTITY = (x) => x;
235
235
  function bind(source, dest, to = IDENTITY, skip = false) {
236
- const d = createRoot((d2) => (createRenderEffect(on(source, (x) => skip ? skip = false : dest((prev) => to(x, prev)))), d2));
236
+ const d = createRoot((d2) => (createComputed(on(source, (x) => skip ? skip = false : dest((prev) => to(x, prev)))), d2));
237
237
  return onCleanup(d), d;
238
238
  }
239
239
  function bindTwoWay(source, dest, to, from) {
package/dist/index.umd.js CHANGED
@@ -235,7 +235,7 @@
235
235
  }
236
236
  const IDENTITY = (x) => x;
237
237
  function bind(source, dest, to = IDENTITY, skip = false) {
238
- const d = solidJs.createRoot((d2) => (solidJs.createRenderEffect(solidJs.on(source, (x) => skip ? skip = false : dest((prev) => to(x, prev)))), d2));
238
+ const d = solidJs.createRoot((d2) => (solidJs.createComputed(solidJs.on(source, (x) => skip ? skip = false : dest((prev) => to(x, prev)))), d2));
239
239
  return solidJs.onCleanup(d), d;
240
240
  }
241
241
  function bindTwoWay(source, dest, to, from) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "solid-ctrl-flow",
3
- "version": "1.0.54",
3
+ "version": "1.0.55",
4
4
  "description": "Control flow components for solid-js",
5
5
  "author": "AFatNiBBa",
6
6
  "license": "ISC",
@@ -16,7 +16,6 @@
16
16
  },
17
17
  "devDependencies": {
18
18
  "@types/node": "^20.6.0",
19
- "logic-types": "^1.3.2",
20
19
  "vite": "^4.4.9",
21
20
  "vite-plugin-dts": "^3.5.3",
22
21
  "vite-plugin-solid": "^2.7.0"