solid-ctrl-flow 1.0.56 → 1.0.57
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 +0 -10
- package/dist/index.mjs +1 -9
- package/dist/index.umd.js +0 -8
- package/package.json +1 -1
- package/readMe.md +0 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { Accessor } from 'solid-js';
|
|
2
2
|
import { Context } from 'solid-js';
|
|
3
|
-
import { EffectFunction } from 'solid-js';
|
|
4
3
|
import { JSX } from 'solid-js';
|
|
5
4
|
import { MemoOptions } from 'solid-js';
|
|
6
5
|
import { Owner } from 'solid-js';
|
|
7
6
|
import { ParentProps } from 'solid-js';
|
|
8
|
-
import { Resource } from 'solid-js';
|
|
9
7
|
import { Setter } from 'solid-js';
|
|
10
8
|
import { Signal } from 'solid-js';
|
|
11
9
|
|
|
@@ -107,14 +105,6 @@ export declare function createExtractor(name?: string): {
|
|
|
107
105
|
readonly extracting: () => number | null;
|
|
108
106
|
};
|
|
109
107
|
|
|
110
|
-
/**
|
|
111
|
-
* Creates a {@link Resource} from the function {@link f}.
|
|
112
|
-
* The resource will be refetched each time one of the dependencies of {@link f} changes.
|
|
113
|
-
* The only dependant signals that will be tracked are the ones before the first `await`
|
|
114
|
-
* @param f A reactive resource fetcher
|
|
115
|
-
*/
|
|
116
|
-
export declare function createReactiveResource<R>(f: EffectFunction<R | undefined, R>): Resource<Awaited<R>>;
|
|
117
|
-
|
|
118
108
|
/** Built-in {@link ReactiveContext} which allows you to display different things in debug mode */
|
|
119
109
|
export declare const debug: ReactiveContext<boolean>;
|
|
120
110
|
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useContext, createMemo, createComponent, createContext, createRoot, getOwner, untrack,
|
|
1
|
+
import { useContext, createMemo, createComponent, createContext, createRoot, getOwner, untrack, splitProps, Show, onCleanup, For, Match, mergeProps, createComputed, on, createSignal } from "solid-js";
|
|
2
2
|
import { createMutable } from "solid-js/store";
|
|
3
3
|
const BASE_CTOR = Function;
|
|
4
4
|
class ReactiveContext extends BASE_CTOR {
|
|
@@ -67,13 +67,6 @@ function runWithContext(ctx2, value, f) {
|
|
|
67
67
|
function untrackCall(f, ...args) {
|
|
68
68
|
return untrack(() => f.apply(this, args));
|
|
69
69
|
}
|
|
70
|
-
function createReactiveResource(f) {
|
|
71
|
-
var refetch;
|
|
72
|
-
const memo = createMemo(f);
|
|
73
|
-
createEffect(on(memo, () => refetch?.()));
|
|
74
|
-
const [get] = [, { refetch }] = createResource(memo);
|
|
75
|
-
return get;
|
|
76
|
-
}
|
|
77
70
|
function memoProps(obj, keys = Object.keys(obj), equals = false) {
|
|
78
71
|
const out = {};
|
|
79
72
|
for (const elm of keys)
|
|
@@ -281,7 +274,6 @@ export {
|
|
|
281
274
|
bind,
|
|
282
275
|
bindTwoWay,
|
|
283
276
|
createExtractor,
|
|
284
|
-
createReactiveResource,
|
|
285
277
|
debug,
|
|
286
278
|
forceSignal,
|
|
287
279
|
memoProps,
|
package/dist/index.umd.js
CHANGED
|
@@ -69,13 +69,6 @@
|
|
|
69
69
|
function untrackCall(f, ...args) {
|
|
70
70
|
return solidJs.untrack(() => f.apply(this, args));
|
|
71
71
|
}
|
|
72
|
-
function createReactiveResource(f) {
|
|
73
|
-
var refetch;
|
|
74
|
-
const memo = solidJs.createMemo(f);
|
|
75
|
-
solidJs.createEffect(solidJs.on(memo, () => refetch?.()));
|
|
76
|
-
const [get] = [, { refetch }] = solidJs.createResource(memo);
|
|
77
|
-
return get;
|
|
78
|
-
}
|
|
79
72
|
function memoProps(obj, keys = Object.keys(obj), equals = false) {
|
|
80
73
|
const out = {};
|
|
81
74
|
for (const elm of keys)
|
|
@@ -281,7 +274,6 @@
|
|
|
281
274
|
exports2.bind = bind;
|
|
282
275
|
exports2.bindTwoWay = bindTwoWay;
|
|
283
276
|
exports2.createExtractor = createExtractor;
|
|
284
|
-
exports2.createReactiveResource = createReactiveResource;
|
|
285
277
|
exports2.debug = debug;
|
|
286
278
|
exports2.forceSignal = forceSignal;
|
|
287
279
|
exports2.memoProps = memoProps;
|
package/package.json
CHANGED
package/readMe.md
CHANGED
|
@@ -215,9 +215,6 @@ return <>
|
|
|
215
215
|
### `untrackCall()`
|
|
216
216
|
Calls a function untracking what happens inside of it but not what gets passed as its argument
|
|
217
217
|
|
|
218
|
-
### `createReactiveResource()`
|
|
219
|
-
Like `createResource()` but the provided function will be reactive
|
|
220
|
-
|
|
221
218
|
### `memoProps()`
|
|
222
219
|
Creates a partial version of an object with memoized remaining properties
|
|
223
220
|
|