solid-ctrl-flow 1.0.47 → 1.0.48

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
@@ -127,14 +127,6 @@ export declare function createReactiveResource<R>(f: EffectFunction<R | undefine
127
127
  /** Built-in {@link ReactiveContext} which allows you to display different things in debug mode */
128
128
  export declare const debug: ReactiveContext<boolean>;
129
129
 
130
- /**
131
- * Utility function that makes you use an {@link Accessor} of a {@link JSX.Element} as a {@link JSX.Element} itself.
132
- * Used to defer the execution of {@link f} until it gets rendered.
133
- * Using {@link Function}s as {@link JSX.Element} is supported by default but is forbidden by the types
134
- * @param f The {@link Accessor} to the actual content
135
- */
136
- export declare const deferCall: (f: Accessor<JSX.Element>) => JSX.Element;
137
-
138
130
  /**
139
131
  * Eventually wraps its content into a template if a certain condition is met.
140
132
  * The content is memoized in the beginning and will be recycled even if the wrapper changes.
package/dist/index.mjs CHANGED
@@ -64,7 +64,6 @@ function runWithContext(ctx2, value, f) {
64
64
  }
65
65
  });
66
66
  }
67
- const deferCall = (f) => f;
68
67
  function untrackCall(f, ...args) {
69
68
  return untrack(() => f.apply(this, args));
70
69
  }
@@ -107,7 +106,7 @@ function Enfold(props) {
107
106
  get fallback() {
108
107
  return children();
109
108
  },
110
- children: (x) => createMemo(() => untrackCall(props.template, deferCall(children), x))
109
+ children: (x) => createMemo(() => untrackCall(props.template, createMemo(children), x))
111
110
  });
112
111
  }
113
112
  var Slot;
@@ -222,7 +221,7 @@ function Nest(props) {
222
221
  const memo = memoProps(props, ["template", "children"]);
223
222
  const content = mapArray(() => props.each, (x, i) => {
224
223
  const [get, set] = createSignal();
225
- const out = createMemo(() => untrackCall(memo.template, deferCall(get), x, i));
224
+ const out = createMemo(() => untrackCall(memo.template, createMemo(get), x, i));
226
225
  return (x2) => {
227
226
  onMount(() => set(() => x2));
228
227
  onCleanup(() => set(void 0));
@@ -303,7 +302,6 @@ export {
303
302
  createExtractor,
304
303
  createReactiveResource,
305
304
  debug,
306
- deferCall,
307
305
  memoProps,
308
306
  runWithContext,
309
307
  splitAndMemoProps,
package/dist/index.umd.js CHANGED
@@ -66,7 +66,6 @@
66
66
  }
67
67
  });
68
68
  }
69
- const deferCall = (f) => f;
70
69
  function untrackCall(f, ...args) {
71
70
  return solidJs.untrack(() => f.apply(this, args));
72
71
  }
@@ -109,7 +108,7 @@
109
108
  get fallback() {
110
109
  return children();
111
110
  },
112
- children: (x) => solidJs.createMemo(() => untrackCall(props.template, deferCall(children), x))
111
+ children: (x) => solidJs.createMemo(() => untrackCall(props.template, solidJs.createMemo(children), x))
113
112
  });
114
113
  }
115
114
  exports2.Slot = void 0;
@@ -224,7 +223,7 @@
224
223
  const memo = memoProps(props, ["template", "children"]);
225
224
  const content = solidJs.mapArray(() => props.each, (x, i) => {
226
225
  const [get, set] = solidJs.createSignal();
227
- const out = solidJs.createMemo(() => untrackCall(memo.template, deferCall(get), x, i));
226
+ const out = solidJs.createMemo(() => untrackCall(memo.template, solidJs.createMemo(get), x, i));
228
227
  return (x2) => {
229
228
  solidJs.onMount(() => set(() => x2));
230
229
  solidJs.onCleanup(() => set(void 0));
@@ -303,7 +302,6 @@
303
302
  exports2.createExtractor = createExtractor;
304
303
  exports2.createReactiveResource = createReactiveResource;
305
304
  exports2.debug = debug;
306
- exports2.deferCall = deferCall;
307
305
  exports2.memoProps = memoProps;
308
306
  exports2.runWithContext = runWithContext;
309
307
  exports2.splitAndMemoProps = splitAndMemoProps;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "solid-ctrl-flow",
3
- "version": "1.0.47",
3
+ "version": "1.0.48",
4
4
  "description": "Control flow components for solid-js",
5
5
  "author": "AFatNiBBa",
6
6
  "license": "ISC",
package/readMe.md CHANGED
@@ -234,9 +234,6 @@ return <>
234
234
  </>
235
235
  ```
236
236
 
237
- ### `deferCall()`
238
- Utility function that makes you use an `Accessor` of a `JSX.Element` as a `JSX.Element` itself
239
-
240
237
  ### `untrackCall()`
241
238
  Calls a function untracking what happens inside of it but not what gets passed as its argument
242
239