solid-ctrl-flow 1.0.2 → 1.0.3
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/flow.d.ts +2 -2
- package/dist/flow.mjs +4 -6
- package/dist/flow.umd.js +4 -6
- package/package.json +1 -1
- package/readme.md +1 -1
package/dist/flow.d.ts
CHANGED
|
@@ -70,9 +70,9 @@ export declare function createExtractor(name?: string): {
|
|
|
70
70
|
}) => JSX.Element;
|
|
71
71
|
/**
|
|
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
|
-
* @returns Returns `null` if there is no parent {@link Joint},
|
|
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 isExtracted: () =>
|
|
75
|
+
readonly isExtracted: () => number | null;
|
|
76
76
|
};
|
|
77
77
|
|
|
78
78
|
/** Sets the value that will be returned by {@link Debug.isDebug} for the children of the current component */
|
package/dist/flow.mjs
CHANGED
|
@@ -51,7 +51,7 @@ function createExtractor(name = "extractor") {
|
|
|
51
51
|
Joint: Joint.bind(ctx2),
|
|
52
52
|
/**
|
|
53
53
|
* 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})
|
|
54
|
-
* @returns Returns `null` if there is no parent {@link Joint},
|
|
54
|
+
* @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)
|
|
55
55
|
*/
|
|
56
56
|
get isExtracted() {
|
|
57
57
|
const obj = useContext(ctx2);
|
|
@@ -63,10 +63,8 @@ function Dest() {
|
|
|
63
63
|
const obj = useContext(this);
|
|
64
64
|
if (!obj)
|
|
65
65
|
return;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
obj.attached = true;
|
|
69
|
-
onCleanup(() => obj.attached = false);
|
|
66
|
+
obj.attached++;
|
|
67
|
+
onCleanup(() => obj.attached--);
|
|
70
68
|
return createMemo(() => obj.source);
|
|
71
69
|
}
|
|
72
70
|
function Source(props) {
|
|
@@ -92,7 +90,7 @@ function Joint(props) {
|
|
|
92
90
|
Provider
|
|
93
91
|
} = this;
|
|
94
92
|
const obj = createMutable({
|
|
95
|
-
attached:
|
|
93
|
+
attached: 0
|
|
96
94
|
});
|
|
97
95
|
return createComponent(Provider, {
|
|
98
96
|
value: obj,
|
package/dist/flow.umd.js
CHANGED
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
Joint: Joint.bind(ctx2),
|
|
54
54
|
/**
|
|
55
55
|
* 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})
|
|
56
|
-
* @returns Returns `null` if there is no parent {@link Joint},
|
|
56
|
+
* @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)
|
|
57
57
|
*/
|
|
58
58
|
get isExtracted() {
|
|
59
59
|
const obj = solidJs.useContext(ctx2);
|
|
@@ -65,10 +65,8 @@
|
|
|
65
65
|
const obj = solidJs.useContext(this);
|
|
66
66
|
if (!obj)
|
|
67
67
|
return;
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
obj.attached = true;
|
|
71
|
-
solidJs.onCleanup(() => obj.attached = false);
|
|
68
|
+
obj.attached++;
|
|
69
|
+
solidJs.onCleanup(() => obj.attached--);
|
|
72
70
|
return solidJs.createMemo(() => obj.source);
|
|
73
71
|
}
|
|
74
72
|
function Source(props) {
|
|
@@ -94,7 +92,7 @@
|
|
|
94
92
|
Provider
|
|
95
93
|
} = this;
|
|
96
94
|
const obj = store.createMutable({
|
|
97
|
-
attached:
|
|
95
|
+
attached: 0
|
|
98
96
|
});
|
|
99
97
|
return solidJs.createComponent(Provider, {
|
|
100
98
|
value: obj,
|
package/package.json
CHANGED