react-instantsearch-core 7.39.1 → 7.41.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/cjs/hooks/useConnector.js +4 -1
- package/dist/cjs/lib/InstantSearchRSCContext.js +3 -0
- package/dist/cjs/server/getServerState.js +7 -0
- package/dist/cjs/version.js +1 -1
- package/dist/es/hooks/useConnector.js +4 -1
- package/dist/es/lib/InstantSearchRSCContext.d.ts +1 -0
- package/dist/es/lib/InstantSearchRSCContext.js +3 -0
- package/dist/es/server/getServerState.js +7 -0
- package/dist/es/version.d.ts +1 -1
- package/dist/es/version.js +1 -1
- package/dist/umd/ReactInstantSearchCore.js +724 -426
- package/dist/umd/ReactInstantSearchCore.min.js +3 -3
- package/package.json +3 -3
|
@@ -126,7 +126,10 @@ function useConnector(connector) {
|
|
|
126
126
|
(0, _useWidget.useWidget)({
|
|
127
127
|
widget: widget,
|
|
128
128
|
parentIndex: parentIndex,
|
|
129
|
-
props:
|
|
129
|
+
props: [
|
|
130
|
+
stableProps,
|
|
131
|
+
stableAdditionalWidgetProperties
|
|
132
|
+
],
|
|
130
133
|
shouldSsr: Boolean(serverContext),
|
|
131
134
|
skipSuspense: skipSuspense
|
|
132
135
|
});
|
|
@@ -42,6 +42,13 @@ function getServerState(children, param) {
|
|
|
42
42
|
var shouldRefetch = false;
|
|
43
43
|
// Two-pass widgets require another query to discover and mount child widgets.
|
|
44
44
|
(0, _utils.walkIndex)(searchRef.current.mainIndex, function(index) {
|
|
45
|
+
var current = index;
|
|
46
|
+
while(current){
|
|
47
|
+
if (current._isolated) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
current = current.getParent();
|
|
51
|
+
}
|
|
45
52
|
shouldRefetch = shouldRefetch || index.getWidgets().some(_utils.isTwoPassWidget);
|
|
46
53
|
});
|
|
47
54
|
if (shouldRefetch) {
|
package/dist/cjs/version.js
CHANGED
|
@@ -116,7 +116,10 @@ function useConnector(connector) {
|
|
|
116
116
|
useWidget({
|
|
117
117
|
widget: widget,
|
|
118
118
|
parentIndex: parentIndex,
|
|
119
|
-
props:
|
|
119
|
+
props: [
|
|
120
|
+
stableProps,
|
|
121
|
+
stableAdditionalWidgetProperties
|
|
122
|
+
],
|
|
120
123
|
shouldSsr: Boolean(serverContext),
|
|
121
124
|
skipSuspense: skipSuspense
|
|
122
125
|
});
|
|
@@ -2,6 +2,7 @@ import type { PromiseWithState } from './wrapPromiseWithState';
|
|
|
2
2
|
import type { RefObject } from 'react';
|
|
3
3
|
export type InstantSearchRSCContextApi = {
|
|
4
4
|
waitForResultsRef: RefObject<PromiseWithState<void> | null> | null;
|
|
5
|
+
resolveWaitForResultsRef?: RefObject<(() => void) | null>;
|
|
5
6
|
countRef: RefObject<number>;
|
|
6
7
|
ignoreMultipleHooksWarning: boolean;
|
|
7
8
|
};
|
|
@@ -33,6 +33,13 @@ import { InstantSearchSSRProvider } from '../components/InstantSearchSSRProvider
|
|
|
33
33
|
var shouldRefetch = false;
|
|
34
34
|
// Two-pass widgets require another query to discover and mount child widgets.
|
|
35
35
|
walkIndex(searchRef.current.mainIndex, function(index) {
|
|
36
|
+
var current = index;
|
|
37
|
+
while(current){
|
|
38
|
+
if (current._isolated) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
current = current.getParent();
|
|
42
|
+
}
|
|
36
43
|
shouldRefetch = shouldRefetch || index.getWidgets().some(isTwoPassWidget);
|
|
37
44
|
});
|
|
38
45
|
if (shouldRefetch) {
|
package/dist/es/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "7.
|
|
1
|
+
declare const _default: "7.41.0";
|
|
2
2
|
export default _default;
|
package/dist/es/version.js
CHANGED