solid-ctrl-flow 5.1.0 → 6.0.0
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 -11
- package/dist/index.mjs +1 -6
- package/dist/index.umd.js +0 -5
- package/package.json +1 -1
- package/readMe.md +0 -3
package/dist/index.d.ts
CHANGED
|
@@ -151,17 +151,6 @@ export declare class OrderedLinkedListNode<T> extends OrderedLinkedList<T> {
|
|
|
151
151
|
remove(): void;
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
-
/**
|
|
155
|
-
* Adds the {@link f} event listener to the {@link k} event of the {@link obj} emitter and removes it when the current reactive context is disposed
|
|
156
|
-
* @param obj The emitter to which to add the event listener
|
|
157
|
-
* @param k The key of the event for which to add the listener
|
|
158
|
-
* @param f The function to call when the event is emitted
|
|
159
|
-
*/
|
|
160
|
-
export declare function registerEventListener<K, F>(obj: {
|
|
161
|
-
addEventListener(k: K, f: F): void;
|
|
162
|
-
removeEventListener(k: K, f: F): void;
|
|
163
|
-
}, k: K, f: F): void;
|
|
164
|
-
|
|
165
154
|
/**
|
|
166
155
|
* Executes {@link f} with the provided value for the specified {@link Context}.
|
|
167
156
|
* You can pass `undefined` to {@link value} in order to get back the default value for {@link ctx}.
|
package/dist/index.mjs
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
import { untrack,
|
|
1
|
+
import { untrack, createRoot, getOwner, createMemo, Show, createContext, useContext, onCleanup, For, createRenderEffect, on, splitProps, createSignal, createSelector, equalFn, Match, runWithOwner } from "solid-js";
|
|
2
2
|
import { createComponent, memo, mergeProps, spread } from "solid-js/web";
|
|
3
3
|
function untrackCall(f, ...args) {
|
|
4
4
|
return untrack(() => f.apply(this, args));
|
|
5
5
|
}
|
|
6
|
-
function registerEventListener(obj, k, f) {
|
|
7
|
-
obj.addEventListener(k, f);
|
|
8
|
-
onCleanup(() => obj.removeEventListener(k, f));
|
|
9
|
-
}
|
|
10
6
|
function runWithContext(ctx2, value, f) {
|
|
11
7
|
return createRoot((d) => {
|
|
12
8
|
try {
|
|
@@ -274,7 +270,6 @@ export {
|
|
|
274
270
|
SameContext,
|
|
275
271
|
Spread,
|
|
276
272
|
memoProps,
|
|
277
|
-
registerEventListener,
|
|
278
273
|
runWithContext,
|
|
279
274
|
splitAndMemoProps,
|
|
280
275
|
untrackCall,
|
package/dist/index.umd.js
CHANGED
|
@@ -5,10 +5,6 @@
|
|
|
5
5
|
function untrackCall(f, ...args) {
|
|
6
6
|
return solidJs.untrack(() => f.apply(this, args));
|
|
7
7
|
}
|
|
8
|
-
function registerEventListener(obj, k, f) {
|
|
9
|
-
obj.addEventListener(k, f);
|
|
10
|
-
solidJs.onCleanup(() => obj.removeEventListener(k, f));
|
|
11
|
-
}
|
|
12
8
|
function runWithContext(ctx2, value, f) {
|
|
13
9
|
return solidJs.createRoot((d) => {
|
|
14
10
|
try {
|
|
@@ -275,7 +271,6 @@
|
|
|
275
271
|
exports2.SameContext = SameContext;
|
|
276
272
|
exports2.Spread = Spread;
|
|
277
273
|
exports2.memoProps = memoProps;
|
|
278
|
-
exports2.registerEventListener = registerEventListener;
|
|
279
274
|
exports2.runWithContext = runWithContext;
|
|
280
275
|
exports2.splitAndMemoProps = splitAndMemoProps;
|
|
281
276
|
exports2.untrackCall = untrackCall;
|
package/package.json
CHANGED
package/readMe.md
CHANGED
|
@@ -233,8 +233,5 @@ Like `splitProps()` but passes the every part except the last one to [`memoProps
|
|
|
233
233
|
### `untrackCall()`
|
|
234
234
|
Calls a function untracking what happens inside of it but not what gets passed as its argument
|
|
235
235
|
|
|
236
|
-
### `registerEventListener()`
|
|
237
|
-
Adds an event listener and registers its removal
|
|
238
|
-
|
|
239
236
|
### `runWithContext()`
|
|
240
237
|
Creates a context scope that persists for the duration of a function
|