solid-ctrl-flow 1.0.13 → 1.0.15
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 +2 -2
- package/dist/index.mjs +2 -2
- package/dist/index.umd.js +2 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -72,7 +72,7 @@ export declare function createExtractor(name?: string): {
|
|
|
72
72
|
* Gets an {@link Accessor} that tells if the context in which THIS getter has been executed has been extracted (Is inside of a {@link Dest})
|
|
73
73
|
* @returns Returns `null` if there is no parent {@link Joint}, the number of {@link Dest}s in which this component is being displayed otherwise (Usually 1)
|
|
74
74
|
*/
|
|
75
|
-
readonly
|
|
75
|
+
readonly extracting: () => number | null;
|
|
76
76
|
};
|
|
77
77
|
|
|
78
78
|
/**
|
|
@@ -120,7 +120,7 @@ export declare function memoProps<T, K extends readonly (keyof T)[] = (keyof T)[
|
|
|
120
120
|
* @param f The function to run
|
|
121
121
|
* @returns The same thing {@link f} returned
|
|
122
122
|
*/
|
|
123
|
-
export declare function runWithContext<T, R>(ctx: Context<T>, value: T, f: (x: T) => R):
|
|
123
|
+
export declare function runWithContext<T, R>(ctx: Context<T>, value: T, f: (x: T) => R): R;
|
|
124
124
|
|
|
125
125
|
/**
|
|
126
126
|
* Esecutes {@link splitProps} and memoizes the first of the two returned objects
|
package/dist/index.mjs
CHANGED
|
@@ -33,7 +33,7 @@ function createOption(init, def = init, name) {
|
|
|
33
33
|
return provider;
|
|
34
34
|
}
|
|
35
35
|
function runWithContext(ctx2, value, f) {
|
|
36
|
-
return createRoot(
|
|
36
|
+
return createRoot((d) => {
|
|
37
37
|
try {
|
|
38
38
|
getOwner().context = {
|
|
39
39
|
[ctx2.id]: value
|
|
@@ -84,7 +84,7 @@ function createExtractor(name = "extractor") {
|
|
|
84
84
|
* Gets an {@link Accessor} that tells if the context in which THIS getter has been executed has been extracted (Is inside of a {@link Dest})
|
|
85
85
|
* @returns Returns `null` if there is no parent {@link Joint}, the number of {@link Dest}s in which this component is being displayed otherwise (Usually 1)
|
|
86
86
|
*/
|
|
87
|
-
get
|
|
87
|
+
get extracting() {
|
|
88
88
|
const obj = useContext(ctx2);
|
|
89
89
|
return () => obj?.attached ?? null;
|
|
90
90
|
}
|
package/dist/index.umd.js
CHANGED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
return provider;
|
|
36
36
|
}
|
|
37
37
|
function runWithContext(ctx2, value, f) {
|
|
38
|
-
return solidJs.createRoot(
|
|
38
|
+
return solidJs.createRoot((d) => {
|
|
39
39
|
try {
|
|
40
40
|
solidJs.getOwner().context = {
|
|
41
41
|
[ctx2.id]: value
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
* Gets an {@link Accessor} that tells if the context in which THIS getter has been executed has been extracted (Is inside of a {@link Dest})
|
|
87
87
|
* @returns Returns `null` if there is no parent {@link Joint}, the number of {@link Dest}s in which this component is being displayed otherwise (Usually 1)
|
|
88
88
|
*/
|
|
89
|
-
get
|
|
89
|
+
get extracting() {
|
|
90
90
|
const obj = solidJs.useContext(ctx2);
|
|
91
91
|
return () => obj?.attached ?? null;
|
|
92
92
|
}
|