@stream-io/feeds-client 0.3.26 → 0.3.28

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.
Files changed (171) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/index.js +1 -1
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/cjs/react-bindings.js +60 -931
  5. package/dist/cjs/react-bindings.js.map +1 -1
  6. package/dist/es/index.mjs +2 -2
  7. package/dist/es/index.mjs.map +1 -1
  8. package/dist/es/react-bindings.mjs +9 -885
  9. package/dist/es/react-bindings.mjs.map +1 -1
  10. package/dist/{feeds-client-BNiazJbH.mjs → feeds-client-Dr24iZo9.mjs} +8 -9
  11. package/dist/{feeds-client-BNiazJbH.mjs.map → feeds-client-Dr24iZo9.mjs.map} +1 -1
  12. package/dist/{feeds-client-K0WzrfH-.js → feeds-client-c90oNdsU.js} +8 -9
  13. package/dist/{feeds-client-K0WzrfH-.js.map → feeds-client-c90oNdsU.js.map} +1 -1
  14. package/dist/tsconfig.lib.tsbuildinfo +1 -0
  15. package/dist/types/activity-with-state-updates/activity-with-state-updates.d.ts +4 -4
  16. package/dist/types/activity-with-state-updates/activity-with-state-updates.d.ts.map +1 -1
  17. package/dist/types/activity-with-state-updates/get-feed.d.ts +2 -2
  18. package/dist/types/bindings/react/contexts/StreamFeedContext.d.ts +2 -2
  19. package/dist/types/bindings/react/contexts/StreamFeedContext.d.ts.map +1 -1
  20. package/dist/types/bindings/react/contexts/StreamFeedsContext.d.ts +2 -2
  21. package/dist/types/bindings/react/contexts/StreamFeedsContext.d.ts.map +1 -1
  22. package/dist/types/bindings/react/contexts/StreamSearchContext.d.ts +2 -2
  23. package/dist/types/bindings/react/contexts/StreamSearchContext.d.ts.map +1 -1
  24. package/dist/types/bindings/react/contexts/StreamSearchResultsContext.d.ts +2 -2
  25. package/dist/types/bindings/react/contexts/StreamSearchResultsContext.d.ts.map +1 -1
  26. package/dist/types/bindings/react/hooks/client-state-hooks/useClientConnectedUser.d.ts +1 -1
  27. package/dist/types/bindings/react/hooks/client-state-hooks/useClientConnectedUser.d.ts.map +1 -1
  28. package/dist/types/bindings/react/hooks/client-state-hooks/useWsConnectionState.d.ts.map +1 -1
  29. package/dist/types/bindings/react/hooks/feed-state-hooks/useActivityComments.d.ts +5 -3
  30. package/dist/types/bindings/react/hooks/feed-state-hooks/useActivityComments.d.ts.map +1 -1
  31. package/dist/types/bindings/react/hooks/feed-state-hooks/useAggregatedActivities.d.ts +2 -2
  32. package/dist/types/bindings/react/hooks/feed-state-hooks/useAggregatedActivities.d.ts.map +1 -1
  33. package/dist/types/bindings/react/hooks/feed-state-hooks/useComments.d.ts +3 -1
  34. package/dist/types/bindings/react/hooks/feed-state-hooks/useComments.d.ts.map +1 -1
  35. package/dist/types/bindings/react/hooks/feed-state-hooks/useFeedActivities.d.ts +3 -3
  36. package/dist/types/bindings/react/hooks/feed-state-hooks/useFeedActivities.d.ts.map +1 -1
  37. package/dist/types/bindings/react/hooks/feed-state-hooks/useFeedMetadata.d.ts +2 -2
  38. package/dist/types/bindings/react/hooks/feed-state-hooks/useFeedMetadata.d.ts.map +1 -1
  39. package/dist/types/bindings/react/hooks/feed-state-hooks/useFollowers.d.ts +4 -4
  40. package/dist/types/bindings/react/hooks/feed-state-hooks/useFollowers.d.ts.map +1 -1
  41. package/dist/types/bindings/react/hooks/feed-state-hooks/useFollowing.d.ts +4 -4
  42. package/dist/types/bindings/react/hooks/feed-state-hooks/useFollowing.d.ts.map +1 -1
  43. package/dist/types/bindings/react/hooks/feed-state-hooks/useIsAggregatedActivityRead.d.ts +2 -1
  44. package/dist/types/bindings/react/hooks/feed-state-hooks/useIsAggregatedActivityRead.d.ts.map +1 -1
  45. package/dist/types/bindings/react/hooks/feed-state-hooks/useIsAggregatedActivitySeen.d.ts +2 -1
  46. package/dist/types/bindings/react/hooks/feed-state-hooks/useIsAggregatedActivitySeen.d.ts.map +1 -1
  47. package/dist/types/bindings/react/hooks/feed-state-hooks/useNotificationStatus.d.ts +1 -1
  48. package/dist/types/bindings/react/hooks/feed-state-hooks/useNotificationStatus.d.ts.map +1 -1
  49. package/dist/types/bindings/react/hooks/feed-state-hooks/useOwnCapabilities.d.ts +2 -1
  50. package/dist/types/bindings/react/hooks/feed-state-hooks/useOwnCapabilities.d.ts.map +1 -1
  51. package/dist/types/bindings/react/hooks/feed-state-hooks/useOwnFollows.d.ts +2 -2
  52. package/dist/types/bindings/react/hooks/feed-state-hooks/useOwnFollows.d.ts.map +1 -1
  53. package/dist/types/bindings/react/hooks/search-state-hooks/useSearchQuery.d.ts +1 -1
  54. package/dist/types/bindings/react/hooks/search-state-hooks/useSearchQuery.d.ts.map +1 -1
  55. package/dist/types/bindings/react/hooks/search-state-hooks/useSearchResult.d.ts +2 -2
  56. package/dist/types/bindings/react/hooks/search-state-hooks/useSearchResult.d.ts.map +1 -1
  57. package/dist/types/bindings/react/hooks/search-state-hooks/useSearchSources.d.ts +2 -2
  58. package/dist/types/bindings/react/hooks/search-state-hooks/useSearchSources.d.ts.map +1 -1
  59. package/dist/types/bindings/react/hooks/useCreateFeedsClient.d.ts +4 -1
  60. package/dist/types/bindings/react/hooks/useCreateFeedsClient.d.ts.map +1 -1
  61. package/dist/types/bindings/react/wrappers/StreamFeed.d.ts +2 -2
  62. package/dist/types/bindings/react/wrappers/StreamFeed.d.ts.map +1 -1
  63. package/dist/types/bindings/react/wrappers/StreamFeeds.d.ts +2 -2
  64. package/dist/types/bindings/react/wrappers/StreamSearch.d.ts +2 -2
  65. package/dist/types/bindings/react/wrappers/StreamSearch.d.ts.map +1 -1
  66. package/dist/types/bindings/react/wrappers/StreamSearchResults.d.ts +2 -2
  67. package/dist/types/bindings/react/wrappers/StreamSearchResults.d.ts.map +1 -1
  68. package/dist/types/common/ApiClient.d.ts +3 -3
  69. package/dist/types/common/EventDispatcher.d.ts +1 -1
  70. package/dist/types/common/Poll.d.ts +2 -2
  71. package/dist/types/common/rate-limit.d.ts +1 -1
  72. package/dist/types/common/real-time/StableWSConnection.d.ts +6 -6
  73. package/dist/types/common/real-time/event-models.d.ts +2 -1
  74. package/dist/types/common/real-time/event-models.d.ts.map +1 -1
  75. package/dist/types/common/search/ActivitySearchSource.d.ts +3 -3
  76. package/dist/types/common/search/BaseSearchSource.d.ts +2 -2
  77. package/dist/types/common/search/FeedSearchSource.d.ts +3 -3
  78. package/dist/types/common/search/SearchController.d.ts +1 -1
  79. package/dist/types/common/search/UserSearchSource.d.ts +4 -4
  80. package/dist/types/common/types.d.ts +1 -1
  81. package/dist/types/feed/event-handlers/activity/handle-activity-added.d.ts +3 -3
  82. package/dist/types/feed/event-handlers/activity/handle-activity-deleted.d.ts +3 -3
  83. package/dist/types/feed/event-handlers/activity/handle-activity-feedback.d.ts +2 -2
  84. package/dist/types/feed/event-handlers/activity/handle-activity-feedback.d.ts.map +1 -1
  85. package/dist/types/feed/event-handlers/activity/handle-activity-marked.d.ts +3 -3
  86. package/dist/types/feed/event-handlers/activity/handle-activity-pinned.d.ts +2 -2
  87. package/dist/types/feed/event-handlers/activity/handle-activity-reaction-added.d.ts +3 -3
  88. package/dist/types/feed/event-handlers/activity/handle-activity-reaction-deleted.d.ts +3 -3
  89. package/dist/types/feed/event-handlers/activity/handle-activity-reaction-updated.d.ts +3 -3
  90. package/dist/types/feed/event-handlers/activity/handle-activity-removed-from-feed.d.ts +2 -2
  91. package/dist/types/feed/event-handlers/activity/handle-activity-unpinned.d.ts +2 -2
  92. package/dist/types/feed/event-handlers/activity/handle-activity-updated.d.ts +3 -3
  93. package/dist/types/feed/event-handlers/activity-updater.d.ts +15 -15
  94. package/dist/types/feed/event-handlers/add-aggregated-activities-to-state.d.ts +2 -2
  95. package/dist/types/feed/event-handlers/bookmark/handle-bookmark-added.d.ts +3 -3
  96. package/dist/types/feed/event-handlers/bookmark/handle-bookmark-deleted.d.ts +3 -3
  97. package/dist/types/feed/event-handlers/bookmark/handle-bookmark-updated.d.ts +3 -3
  98. package/dist/types/feed/event-handlers/comment/handle-comment-added.d.ts +2 -2
  99. package/dist/types/feed/event-handlers/comment/handle-comment-deleted.d.ts +3 -2
  100. package/dist/types/feed/event-handlers/comment/handle-comment-reaction-added.d.ts +3 -2
  101. package/dist/types/feed/event-handlers/comment/handle-comment-reaction-deleted.d.ts +3 -2
  102. package/dist/types/feed/event-handlers/comment/handle-comment-reaction-updated.d.ts +3 -2
  103. package/dist/types/feed/event-handlers/comment/handle-comment-updated.d.ts +3 -2
  104. package/dist/types/feed/event-handlers/comment/utils/update-comment-count.d.ts +2 -1
  105. package/dist/types/feed/event-handlers/comment/utils/update-comment-count.d.ts.map +1 -1
  106. package/dist/types/feed/event-handlers/feed/handle-feed-updated.d.ts +2 -2
  107. package/dist/types/feed/event-handlers/feed-member/handle-feed-member-added.d.ts +2 -2
  108. package/dist/types/feed/event-handlers/feed-member/handle-feed-member-removed.d.ts +2 -2
  109. package/dist/types/feed/event-handlers/feed-member/handle-feed-member-updated.d.ts +2 -2
  110. package/dist/types/feed/event-handlers/follow/handle-follow-created.d.ts +3 -3
  111. package/dist/types/feed/event-handlers/follow/handle-follow-deleted.d.ts +3 -3
  112. package/dist/types/feed/event-handlers/follow/handle-follow-updated.d.ts +2 -2
  113. package/dist/types/feed/event-handlers/is-activity-pin.d.ts +1 -1
  114. package/dist/types/feed/event-handlers/notification-feed/handle-notification-feed-updated.d.ts +3 -3
  115. package/dist/types/feed/event-handlers/story-feeds/handle-story-feeds-updated.d.ts +3 -3
  116. package/dist/types/feed/event-handlers/watch/handle-watch-started.d.ts +1 -1
  117. package/dist/types/feed/event-handlers/watch/handle-watch-stopped.d.ts +1 -1
  118. package/dist/types/feed/feed.d.ts +9 -9
  119. package/dist/types/feeds-client/active-activity.d.ts +1 -1
  120. package/dist/types/feeds-client/event-handlers/user/handle-user-updated.d.ts +2 -2
  121. package/dist/types/feeds-client/feeds-client.d.ts +22 -22
  122. package/dist/types/feeds-client/feeds-client.d.ts.map +1 -1
  123. package/dist/types/feeds-client/get-or-create-active-feed.d.ts +2 -2
  124. package/dist/types/gen/feeds/FeedApi.d.ts +2 -2
  125. package/dist/types/gen/feeds/FeedsApi.d.ts +2 -2
  126. package/dist/types/gen/model-decoders/event-decoder-mapping.d.ts +1 -1
  127. package/dist/types/gen/models/index.d.ts +1 -1
  128. package/dist/types/gen/models/index.d.ts.map +1 -1
  129. package/dist/types/gen/moderation/ModerationApi.d.ts +2 -2
  130. package/dist/types/types-internal.d.ts +1 -1
  131. package/dist/types/types.d.ts +5 -4
  132. package/dist/types/utils/check-own-fields-equality.d.ts +2 -2
  133. package/dist/types/utils/event-triggered-by-connected-user.d.ts +2 -2
  134. package/dist/types/utils/own-feed-fields.d.ts +1 -1
  135. package/dist/types/utils/state-update-queue.d.ts +4 -4
  136. package/dist/types/utils/throttling/throttled-get-batched-own-capabilities.d.ts +2 -2
  137. package/dist/types/utils/throttling/throttled-get-batched-own-capabilities.d.ts.map +1 -1
  138. package/dist/types/utils/type-assertions.d.ts +2 -2
  139. package/package.json +11 -12
  140. package/src/activity-with-state-updates/activity-with-state-updates.ts +2 -2
  141. package/src/bindings/react/contexts/StreamFeedContext.tsx +2 -1
  142. package/src/bindings/react/contexts/StreamFeedsContext.tsx +2 -1
  143. package/src/bindings/react/contexts/StreamSearchContext.tsx +2 -1
  144. package/src/bindings/react/contexts/StreamSearchResultsContext.tsx +2 -1
  145. package/src/bindings/react/hooks/client-state-hooks/useClientConnectedUser.ts +2 -1
  146. package/src/bindings/react/hooks/client-state-hooks/useWsConnectionState.ts +2 -1
  147. package/src/bindings/react/hooks/feed-state-hooks/useActivityComments.ts +7 -11
  148. package/src/bindings/react/hooks/feed-state-hooks/useAggregatedActivities.ts +3 -2
  149. package/src/bindings/react/hooks/feed-state-hooks/useComments.ts +5 -9
  150. package/src/bindings/react/hooks/feed-state-hooks/useFeedActivities.ts +4 -3
  151. package/src/bindings/react/hooks/feed-state-hooks/useFeedMetadata.ts +3 -2
  152. package/src/bindings/react/hooks/feed-state-hooks/useFollowers.ts +2 -1
  153. package/src/bindings/react/hooks/feed-state-hooks/useFollowing.ts +3 -1
  154. package/src/bindings/react/hooks/feed-state-hooks/useIsAggregatedActivityRead.ts +4 -2
  155. package/src/bindings/react/hooks/feed-state-hooks/useIsAggregatedActivitySeen.ts +4 -2
  156. package/src/bindings/react/hooks/feed-state-hooks/useNotificationStatus.ts +3 -1
  157. package/src/bindings/react/hooks/feed-state-hooks/useOwnCapabilities.ts +5 -2
  158. package/src/bindings/react/hooks/feed-state-hooks/useOwnFollows.ts +3 -2
  159. package/src/bindings/react/hooks/search-state-hooks/useSearchQuery.ts +6 -2
  160. package/src/bindings/react/hooks/search-state-hooks/useSearchResult.ts +4 -2
  161. package/src/bindings/react/hooks/search-state-hooks/useSearchSources.ts +3 -5
  162. package/src/bindings/react/hooks/useCreateFeedsClient.ts +5 -6
  163. package/src/bindings/react/wrappers/StreamFeed.tsx +2 -1
  164. package/src/bindings/react/wrappers/StreamSearch.tsx +2 -1
  165. package/src/bindings/react/wrappers/StreamSearchResults.tsx +2 -1
  166. package/src/common/real-time/event-models.ts +2 -2
  167. package/src/feed/event-handlers/activity/handle-activity-feedback.ts +4 -8
  168. package/src/feed/event-handlers/comment/utils/update-comment-count.ts +2 -2
  169. package/src/feeds-client/feeds-client.ts +10 -12
  170. package/src/gen/models/index.ts +2 -2
  171. package/src/utils/throttling/throttled-get-batched-own-capabilities.ts +1 -1
@@ -1,383 +1,8 @@
1
- import require$$0, { useCallback, useMemo, useState, useEffect, createContext, useContext, useRef } from "react";
2
- import "@stream-io/state-store";
3
- import { F as FeedsClient, g as isCommentResponse, c as checkHasAnotherPage } from "../feeds-client-BNiazJbH.mjs";
4
- var shim = { exports: {} };
5
- var useSyncExternalStoreShim_production = {};
6
- /**
7
- * @license React
8
- * use-sync-external-store-shim.production.js
9
- *
10
- * Copyright (c) Meta Platforms, Inc. and affiliates.
11
- *
12
- * This source code is licensed under the MIT license found in the
13
- * LICENSE file in the root directory of this source tree.
14
- */
15
- var hasRequiredUseSyncExternalStoreShim_production;
16
- function requireUseSyncExternalStoreShim_production() {
17
- if (hasRequiredUseSyncExternalStoreShim_production) return useSyncExternalStoreShim_production;
18
- hasRequiredUseSyncExternalStoreShim_production = 1;
19
- var React = require$$0;
20
- function is(x, y) {
21
- return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
22
- }
23
- var objectIs = "function" === typeof Object.is ? Object.is : is, useState2 = React.useState, useEffect2 = React.useEffect, useLayoutEffect = React.useLayoutEffect, useDebugValue = React.useDebugValue;
24
- function useSyncExternalStore$2(subscribe, getSnapshot) {
25
- var value = getSnapshot(), _useState = useState2({ inst: { value, getSnapshot } }), inst = _useState[0].inst, forceUpdate = _useState[1];
26
- useLayoutEffect(
27
- function() {
28
- inst.value = value;
29
- inst.getSnapshot = getSnapshot;
30
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
31
- },
32
- [subscribe, value, getSnapshot]
33
- );
34
- useEffect2(
35
- function() {
36
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
37
- return subscribe(function() {
38
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
39
- });
40
- },
41
- [subscribe]
42
- );
43
- useDebugValue(value);
44
- return value;
45
- }
46
- function checkIfSnapshotChanged(inst) {
47
- var latestGetSnapshot = inst.getSnapshot;
48
- inst = inst.value;
49
- try {
50
- var nextValue = latestGetSnapshot();
51
- return !objectIs(inst, nextValue);
52
- } catch (error) {
53
- return true;
54
- }
55
- }
56
- function useSyncExternalStore$1(subscribe, getSnapshot) {
57
- return getSnapshot();
58
- }
59
- var shim2 = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
60
- useSyncExternalStoreShim_production.useSyncExternalStore = void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim2;
61
- return useSyncExternalStoreShim_production;
62
- }
63
- var useSyncExternalStoreShim_development = {};
64
- /**
65
- * @license React
66
- * use-sync-external-store-shim.development.js
67
- *
68
- * Copyright (c) Meta Platforms, Inc. and affiliates.
69
- *
70
- * This source code is licensed under the MIT license found in the
71
- * LICENSE file in the root directory of this source tree.
72
- */
73
- var hasRequiredUseSyncExternalStoreShim_development;
74
- function requireUseSyncExternalStoreShim_development() {
75
- if (hasRequiredUseSyncExternalStoreShim_development) return useSyncExternalStoreShim_development;
76
- hasRequiredUseSyncExternalStoreShim_development = 1;
77
- "production" !== process.env.NODE_ENV && function() {
78
- function is(x, y) {
79
- return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
80
- }
81
- function useSyncExternalStore$2(subscribe, getSnapshot) {
82
- didWarnOld18Alpha || void 0 === React.startTransition || (didWarnOld18Alpha = true, console.error(
83
- "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
84
- ));
85
- var value = getSnapshot();
86
- if (!didWarnUncachedGetSnapshot) {
87
- var cachedValue = getSnapshot();
88
- objectIs(value, cachedValue) || (console.error(
89
- "The result of getSnapshot should be cached to avoid an infinite loop"
90
- ), didWarnUncachedGetSnapshot = true);
91
- }
92
- cachedValue = useState2({
93
- inst: { value, getSnapshot }
94
- });
95
- var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
96
- useLayoutEffect(
97
- function() {
98
- inst.value = value;
99
- inst.getSnapshot = getSnapshot;
100
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
101
- },
102
- [subscribe, value, getSnapshot]
103
- );
104
- useEffect2(
105
- function() {
106
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
107
- return subscribe(function() {
108
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
109
- });
110
- },
111
- [subscribe]
112
- );
113
- useDebugValue(value);
114
- return value;
115
- }
116
- function checkIfSnapshotChanged(inst) {
117
- var latestGetSnapshot = inst.getSnapshot;
118
- inst = inst.value;
119
- try {
120
- var nextValue = latestGetSnapshot();
121
- return !objectIs(inst, nextValue);
122
- } catch (error) {
123
- return true;
124
- }
125
- }
126
- function useSyncExternalStore$1(subscribe, getSnapshot) {
127
- return getSnapshot();
128
- }
129
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
130
- var React = require$$0, objectIs = "function" === typeof Object.is ? Object.is : is, useState2 = React.useState, useEffect2 = React.useEffect, useLayoutEffect = React.useLayoutEffect, useDebugValue = React.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim2 = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
131
- useSyncExternalStoreShim_development.useSyncExternalStore = void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim2;
132
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
133
- }();
134
- return useSyncExternalStoreShim_development;
135
- }
136
- var hasRequiredShim;
137
- function requireShim() {
138
- if (hasRequiredShim) return shim.exports;
139
- hasRequiredShim = 1;
140
- if (process.env.NODE_ENV === "production") {
141
- shim.exports = requireUseSyncExternalStoreShim_production();
142
- } else {
143
- shim.exports = requireUseSyncExternalStoreShim_development();
144
- }
145
- return shim.exports;
146
- }
147
- var shimExports = requireShim();
148
- const isPatch = (value) => typeof value === "function";
149
- const noop$1 = () => {
150
- };
151
- class StateStore {
152
- constructor(value) {
153
- this.value = value;
154
- this.handlers = /* @__PURE__ */ new Set();
155
- this.preprocessors = /* @__PURE__ */ new Set();
156
- this.partialNext = (partial) => this.next((current) => ({ ...current, ...partial }));
157
- this.subscribeWithSelector = (selector2, handler) => {
158
- let previouslySelectedValues;
159
- const wrappedHandler = (nextValue) => {
160
- const newlySelectedValues = selector2(nextValue);
161
- const selectionsAreEqual = StateStore.doSelectionsEqual(previouslySelectedValues, newlySelectedValues);
162
- if (selectionsAreEqual)
163
- return;
164
- const previouslySelectedValuesCopy = previouslySelectedValues;
165
- previouslySelectedValues = newlySelectedValues;
166
- handler(newlySelectedValues, previouslySelectedValuesCopy);
167
- };
168
- return this.subscribe(wrappedHandler);
169
- };
170
- }
171
- /**
172
- * Allows merging two stores only if their keys differ otherwise there's no way to ensure the data type stability.
173
- * @experimental
174
- * This method is experimental and may change in future versions.
175
- */
176
- merge(stateStore) {
177
- return new MergedStateStore({
178
- original: this,
179
- merged: stateStore
180
- });
181
- }
182
- next(newValueOrPatch) {
183
- const newValue = isPatch(newValueOrPatch) ? newValueOrPatch(this.value) : newValueOrPatch;
184
- if (Object.is(newValue, this.value))
185
- return;
186
- this.preprocessors.forEach((preprocessor) => preprocessor(newValue, this.value));
187
- const oldValue = this.value;
188
- this.value = newValue;
189
- this.handlers.forEach((handler) => handler(this.value, oldValue));
190
- }
191
- getLatestValue() {
192
- return this.value;
193
- }
194
- subscribe(handler) {
195
- handler(this.value, void 0);
196
- this.handlers.add(handler);
197
- return () => {
198
- this.handlers.delete(handler);
199
- };
200
- }
201
- static doSelectionsEqual(previouslySelectedValues, newlySelectedValues) {
202
- let selectionsAreEqual;
203
- if (selectionsAreEqual = typeof previouslySelectedValues !== "undefined") {
204
- for (const key in newlySelectedValues) {
205
- if (Object.is(previouslySelectedValues[key], newlySelectedValues[key])) {
206
- continue;
207
- }
208
- selectionsAreEqual = false;
209
- break;
210
- }
211
- }
212
- return selectionsAreEqual;
213
- }
214
- /**
215
- * Registers a preprocessor function that will be called before the state is updated.
216
- *
217
- * Preprocessors are invoked with the new and previous values whenever `next` or `partialNext` methods
218
- * are called, allowing you to mutate or react to the new value before it is set. Preprocessors run in the
219
- * order they were registered.
220
- *
221
- * @example
222
- * ```ts
223
- * const store = new StateStore<{ count: number; isMaxValue: bool; }>({ count: 0, isMaxValue: false });
224
- *
225
- * store.addPreprocessor((nextValue, prevValue) => {
226
- * if (nextValue.count > 10) {
227
- * nextValue.count = 10; // Clamp the value to a maximum of 10
228
- * }
229
- *
230
- * if (nextValue.count === 10) {
231
- * nextValue.isMaxValue = true; // Set isMaxValue to true if count is 10
232
- * } else {
233
- * nextValue.isMaxValue = false; // Reset isMaxValue otherwise
234
- * }
235
- * });
236
- *
237
- * store.partialNext({ count: 15 });
238
- *
239
- * store.getLatestValue(); // { count: 10, isMaxValue: true }
240
- *
241
- * store.partialNext({ count: 5 });
242
- *
243
- * store.getLatestValue(); // { count: 5, isMaxValue: false }
244
- * ```
245
- *
246
- * @param preprocessor - The function to be called with the next and previous values before the state is updated.
247
- * @returns A `RemovePreprocessor` function that removes the preprocessor when called.
248
- */
249
- addPreprocessor(preprocessor) {
250
- this.preprocessors.add(preprocessor);
251
- return () => {
252
- this.preprocessors.delete(preprocessor);
253
- };
254
- }
255
- }
256
- class MergedStateStore extends StateStore {
257
- constructor({ original, merged }) {
258
- const originalValue = original.getLatestValue();
259
- const mergedValue = merged.getLatestValue();
260
- super({
261
- ...originalValue,
262
- ...mergedValue
263
- });
264
- this.next = () => {
265
- console.warn(`${MergedStateStore.name}.next is disabled, call original.next or merged.next instead`);
266
- };
267
- this.partialNext = () => {
268
- console.warn(`${MergedStateStore.name}.partialNext is disabled, call original.partialNext or merged.partialNext instead`);
269
- };
270
- this.cachedOriginalValue = originalValue;
271
- this.cachedMergedValue = mergedValue;
272
- this.original = original;
273
- this.merged = merged;
274
- }
275
- /**
276
- * Subscribes to changes in the merged state store.
277
- *
278
- * This method extends the base subscribe functionality to handle the merged nature of this store:
279
- * 1. The first subscriber triggers registration of helper subscribers that listen to both source stores
280
- * 2. Changes from either source store are propagated to this merged store
281
- * 3. Source store values are cached to prevent unnecessary updates
282
- *
283
- * When the first subscriber is added, the method sets up listeners on both original and merged stores.
284
- * These listeners update the combined store value whenever either source store changes.
285
- * All subscriptions (helpers and the actual handler) are tracked so they can be properly cleaned up.
286
- *
287
- * @param handler - The callback function that will be executed when the state changes
288
- * @returns An unsubscribe function that, when called, removes the subscription and any helper subscriptions
289
- */
290
- subscribe(handler) {
291
- const unsubscribeFunctions = [];
292
- if (!this.handlers.size) {
293
- const base = (nextValue) => {
294
- super.next((currentValue) => ({
295
- ...currentValue,
296
- ...nextValue
297
- }));
298
- };
299
- unsubscribeFunctions.push(this.original.subscribe((nextValue) => {
300
- if (nextValue === this.cachedOriginalValue)
301
- return;
302
- this.cachedOriginalValue = nextValue;
303
- base(nextValue);
304
- }), this.merged.subscribe((nextValue) => {
305
- if (nextValue === this.cachedMergedValue)
306
- return;
307
- this.cachedMergedValue = nextValue;
308
- base(nextValue);
309
- }));
310
- }
311
- unsubscribeFunctions.push(super.subscribe(handler));
312
- return () => {
313
- unsubscribeFunctions.forEach((unsubscribe) => unsubscribe());
314
- };
315
- }
316
- /**
317
- * Retrieves the latest combined state from both original and merged stores.
318
- *
319
- * This method extends the base getLatestValue functionality to ensure the merged store
320
- * remains in sync with its source stores even when there are no active subscribers.
321
- *
322
- * When there are no handlers registered, the method:
323
- * 1. Fetches the latest values from both source stores
324
- * 2. Compares them with the cached values to detect changes
325
- * 3. If changes are detected, updates the internal value and caches
326
- * the new source values to maintain consistency
327
- *
328
- * This approach ensures that calling getLatestValue() always returns the most
329
- * up-to-date combined state, even if the merged store hasn't been actively
330
- * receiving updates through subscriptions.
331
- *
332
- * @returns The latest combined state from both original and merged stores
333
- */
334
- getLatestValue() {
335
- if (!this.handlers.size) {
336
- const originalValue = this.original.getLatestValue();
337
- const mergedValue = this.merged.getLatestValue();
338
- if (originalValue !== this.cachedOriginalValue || mergedValue !== this.cachedMergedValue) {
339
- this.value = {
340
- ...originalValue,
341
- ...mergedValue
342
- };
343
- this.cachedMergedValue = mergedValue;
344
- this.cachedOriginalValue = originalValue;
345
- }
346
- }
347
- return super.getLatestValue();
348
- }
349
- addPreprocessor() {
350
- console.warn(`${MergedStateStore.name}.addPreprocessor is disabled, call original.addPreprocessor or merged.addPreprocessor instead`);
351
- return noop$1;
352
- }
353
- }
354
- const noop = () => {
355
- };
356
- function useStateStore(store, selector2) {
357
- const wrappedSubscription = useCallback((onStoreChange) => {
358
- const unsubscribe = store?.subscribeWithSelector(selector2, onStoreChange);
359
- return unsubscribe ?? noop;
360
- }, [store, selector2]);
361
- const wrappedSnapshot = useMemo(() => {
362
- let cachedTuple;
363
- return () => {
364
- const currentValue = store?.getLatestValue();
365
- if (!currentValue)
366
- return void 0;
367
- if (cachedTuple && Object.is(cachedTuple[0], currentValue)) {
368
- return cachedTuple[1];
369
- }
370
- const newlySelected = selector2(currentValue);
371
- const selectionsAreEqual = StateStore.doSelectionsEqual(cachedTuple?.[1], newlySelected);
372
- if (selectionsAreEqual)
373
- return cachedTuple[1];
374
- cachedTuple = [currentValue, newlySelected];
375
- return cachedTuple[1];
376
- };
377
- }, [store, selector2]);
378
- const state = shimExports.useSyncExternalStore(wrappedSubscription, wrappedSnapshot);
379
- return state;
380
- }
1
+ import { useStateStore } from "@stream-io/state-store/react-bindings";
2
+ export * from "@stream-io/state-store/react-bindings";
3
+ import { useState, useEffect, createContext, useContext, useRef, useCallback, useMemo } from "react";
4
+ import { F as FeedsClient, g as isCommentResponse, c as checkHasAnotherPage } from "../feeds-client-Dr24iZo9.mjs";
5
+ import { jsx } from "react/jsx-runtime";
381
6
  const useCreateFeedsClient = ({
382
7
  apiKey,
383
8
  tokenOrProvider,
@@ -792,529 +417,29 @@ const useSearchSources = (controllerFromProps) => {
792
417
  const selector = ({ sources }) => ({
793
418
  sources
794
419
  });
795
- var jsxRuntime = { exports: {} };
796
- var reactJsxRuntime_production = {};
797
- /**
798
- * @license React
799
- * react-jsx-runtime.production.js
800
- *
801
- * Copyright (c) Meta Platforms, Inc. and affiliates.
802
- *
803
- * This source code is licensed under the MIT license found in the
804
- * LICENSE file in the root directory of this source tree.
805
- */
806
- var hasRequiredReactJsxRuntime_production;
807
- function requireReactJsxRuntime_production() {
808
- if (hasRequiredReactJsxRuntime_production) return reactJsxRuntime_production;
809
- hasRequiredReactJsxRuntime_production = 1;
810
- var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
811
- function jsxProd(type, config, maybeKey) {
812
- var key = null;
813
- void 0 !== maybeKey && (key = "" + maybeKey);
814
- void 0 !== config.key && (key = "" + config.key);
815
- if ("key" in config) {
816
- maybeKey = {};
817
- for (var propName in config)
818
- "key" !== propName && (maybeKey[propName] = config[propName]);
819
- } else maybeKey = config;
820
- config = maybeKey.ref;
821
- return {
822
- $$typeof: REACT_ELEMENT_TYPE,
823
- type,
824
- key,
825
- ref: void 0 !== config ? config : null,
826
- props: maybeKey
827
- };
828
- }
829
- reactJsxRuntime_production.Fragment = REACT_FRAGMENT_TYPE;
830
- reactJsxRuntime_production.jsx = jsxProd;
831
- reactJsxRuntime_production.jsxs = jsxProd;
832
- return reactJsxRuntime_production;
833
- }
834
- var reactJsxRuntime_development = {};
835
- /**
836
- * @license React
837
- * react-jsx-runtime.development.js
838
- *
839
- * Copyright (c) Meta Platforms, Inc. and affiliates.
840
- *
841
- * This source code is licensed under the MIT license found in the
842
- * LICENSE file in the root directory of this source tree.
843
- */
844
- var hasRequiredReactJsxRuntime_development;
845
- function requireReactJsxRuntime_development() {
846
- if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
847
- hasRequiredReactJsxRuntime_development = 1;
848
- "production" !== process.env.NODE_ENV && function() {
849
- function getComponentNameFromType(type) {
850
- if (null == type) return null;
851
- if ("function" === typeof type)
852
- return type.$$typeof === REACT_CLIENT_REFERENCE$2 ? null : type.displayName || type.name || null;
853
- if ("string" === typeof type) return type;
854
- switch (type) {
855
- case REACT_FRAGMENT_TYPE:
856
- return "Fragment";
857
- case REACT_PORTAL_TYPE:
858
- return "Portal";
859
- case REACT_PROFILER_TYPE:
860
- return "Profiler";
861
- case REACT_STRICT_MODE_TYPE:
862
- return "StrictMode";
863
- case REACT_SUSPENSE_TYPE:
864
- return "Suspense";
865
- case REACT_SUSPENSE_LIST_TYPE:
866
- return "SuspenseList";
867
- }
868
- if ("object" === typeof type)
869
- switch ("number" === typeof type.tag && console.error(
870
- "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
871
- ), type.$$typeof) {
872
- case REACT_CONTEXT_TYPE:
873
- return (type.displayName || "Context") + ".Provider";
874
- case REACT_CONSUMER_TYPE:
875
- return (type._context.displayName || "Context") + ".Consumer";
876
- case REACT_FORWARD_REF_TYPE:
877
- var innerType = type.render;
878
- type = type.displayName;
879
- type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
880
- return type;
881
- case REACT_MEMO_TYPE:
882
- return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
883
- case REACT_LAZY_TYPE:
884
- innerType = type._payload;
885
- type = type._init;
886
- try {
887
- return getComponentNameFromType(type(innerType));
888
- } catch (x) {
889
- }
890
- }
891
- return null;
892
- }
893
- function testStringCoercion(value) {
894
- return "" + value;
895
- }
896
- function checkKeyStringCoercion(value) {
897
- try {
898
- testStringCoercion(value);
899
- var JSCompiler_inline_result = false;
900
- } catch (e) {
901
- JSCompiler_inline_result = true;
902
- }
903
- if (JSCompiler_inline_result) {
904
- JSCompiler_inline_result = console;
905
- var JSCompiler_temp_const = JSCompiler_inline_result.error;
906
- var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
907
- JSCompiler_temp_const.call(
908
- JSCompiler_inline_result,
909
- "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
910
- JSCompiler_inline_result$jscomp$0
911
- );
912
- return testStringCoercion(value);
913
- }
914
- }
915
- function disabledLog() {
916
- }
917
- function disableLogs() {
918
- if (0 === disabledDepth) {
919
- prevLog = console.log;
920
- prevInfo = console.info;
921
- prevWarn = console.warn;
922
- prevError = console.error;
923
- prevGroup = console.group;
924
- prevGroupCollapsed = console.groupCollapsed;
925
- prevGroupEnd = console.groupEnd;
926
- var props = {
927
- configurable: true,
928
- enumerable: true,
929
- value: disabledLog,
930
- writable: true
931
- };
932
- Object.defineProperties(console, {
933
- info: props,
934
- log: props,
935
- warn: props,
936
- error: props,
937
- group: props,
938
- groupCollapsed: props,
939
- groupEnd: props
940
- });
941
- }
942
- disabledDepth++;
943
- }
944
- function reenableLogs() {
945
- disabledDepth--;
946
- if (0 === disabledDepth) {
947
- var props = { configurable: true, enumerable: true, writable: true };
948
- Object.defineProperties(console, {
949
- log: assign({}, props, { value: prevLog }),
950
- info: assign({}, props, { value: prevInfo }),
951
- warn: assign({}, props, { value: prevWarn }),
952
- error: assign({}, props, { value: prevError }),
953
- group: assign({}, props, { value: prevGroup }),
954
- groupCollapsed: assign({}, props, { value: prevGroupCollapsed }),
955
- groupEnd: assign({}, props, { value: prevGroupEnd })
956
- });
957
- }
958
- 0 > disabledDepth && console.error(
959
- "disabledDepth fell below zero. This is a bug in React. Please file an issue."
960
- );
961
- }
962
- function describeBuiltInComponentFrame(name) {
963
- if (void 0 === prefix)
964
- try {
965
- throw Error();
966
- } catch (x) {
967
- var match = x.stack.trim().match(/\n( *(at )?)/);
968
- prefix = match && match[1] || "";
969
- suffix = -1 < x.stack.indexOf("\n at") ? " (<anonymous>)" : -1 < x.stack.indexOf("@") ? "@unknown:0:0" : "";
970
- }
971
- return "\n" + prefix + name + suffix;
972
- }
973
- function describeNativeComponentFrame(fn, construct) {
974
- if (!fn || reentry) return "";
975
- var frame = componentFrameCache.get(fn);
976
- if (void 0 !== frame) return frame;
977
- reentry = true;
978
- frame = Error.prepareStackTrace;
979
- Error.prepareStackTrace = void 0;
980
- var previousDispatcher = null;
981
- previousDispatcher = ReactSharedInternals.H;
982
- ReactSharedInternals.H = null;
983
- disableLogs();
984
- try {
985
- var RunInRootFrame = {
986
- DetermineComponentFrameRoot: function() {
987
- try {
988
- if (construct) {
989
- var Fake = function() {
990
- throw Error();
991
- };
992
- Object.defineProperty(Fake.prototype, "props", {
993
- set: function() {
994
- throw Error();
995
- }
996
- });
997
- if ("object" === typeof Reflect && Reflect.construct) {
998
- try {
999
- Reflect.construct(Fake, []);
1000
- } catch (x) {
1001
- var control = x;
1002
- }
1003
- Reflect.construct(fn, [], Fake);
1004
- } else {
1005
- try {
1006
- Fake.call();
1007
- } catch (x$0) {
1008
- control = x$0;
1009
- }
1010
- fn.call(Fake.prototype);
1011
- }
1012
- } else {
1013
- try {
1014
- throw Error();
1015
- } catch (x$1) {
1016
- control = x$1;
1017
- }
1018
- (Fake = fn()) && "function" === typeof Fake.catch && Fake.catch(function() {
1019
- });
1020
- }
1021
- } catch (sample) {
1022
- if (sample && control && "string" === typeof sample.stack)
1023
- return [sample.stack, control.stack];
1024
- }
1025
- return [null, null];
1026
- }
1027
- };
1028
- RunInRootFrame.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot";
1029
- var namePropDescriptor = Object.getOwnPropertyDescriptor(
1030
- RunInRootFrame.DetermineComponentFrameRoot,
1031
- "name"
1032
- );
1033
- namePropDescriptor && namePropDescriptor.configurable && Object.defineProperty(
1034
- RunInRootFrame.DetermineComponentFrameRoot,
1035
- "name",
1036
- { value: "DetermineComponentFrameRoot" }
1037
- );
1038
- var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(), sampleStack = _RunInRootFrame$Deter[0], controlStack = _RunInRootFrame$Deter[1];
1039
- if (sampleStack && controlStack) {
1040
- var sampleLines = sampleStack.split("\n"), controlLines = controlStack.split("\n");
1041
- for (_RunInRootFrame$Deter = namePropDescriptor = 0; namePropDescriptor < sampleLines.length && !sampleLines[namePropDescriptor].includes(
1042
- "DetermineComponentFrameRoot"
1043
- ); )
1044
- namePropDescriptor++;
1045
- for (; _RunInRootFrame$Deter < controlLines.length && !controlLines[_RunInRootFrame$Deter].includes(
1046
- "DetermineComponentFrameRoot"
1047
- ); )
1048
- _RunInRootFrame$Deter++;
1049
- if (namePropDescriptor === sampleLines.length || _RunInRootFrame$Deter === controlLines.length)
1050
- for (namePropDescriptor = sampleLines.length - 1, _RunInRootFrame$Deter = controlLines.length - 1; 1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter && sampleLines[namePropDescriptor] !== controlLines[_RunInRootFrame$Deter]; )
1051
- _RunInRootFrame$Deter--;
1052
- for (; 1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter; namePropDescriptor--, _RunInRootFrame$Deter--)
1053
- if (sampleLines[namePropDescriptor] !== controlLines[_RunInRootFrame$Deter]) {
1054
- if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) {
1055
- do
1056
- if (namePropDescriptor--, _RunInRootFrame$Deter--, 0 > _RunInRootFrame$Deter || sampleLines[namePropDescriptor] !== controlLines[_RunInRootFrame$Deter]) {
1057
- var _frame = "\n" + sampleLines[namePropDescriptor].replace(
1058
- " at new ",
1059
- " at "
1060
- );
1061
- fn.displayName && _frame.includes("<anonymous>") && (_frame = _frame.replace("<anonymous>", fn.displayName));
1062
- "function" === typeof fn && componentFrameCache.set(fn, _frame);
1063
- return _frame;
1064
- }
1065
- while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter);
1066
- }
1067
- break;
1068
- }
1069
- }
1070
- } finally {
1071
- reentry = false, ReactSharedInternals.H = previousDispatcher, reenableLogs(), Error.prepareStackTrace = frame;
1072
- }
1073
- sampleLines = (sampleLines = fn ? fn.displayName || fn.name : "") ? describeBuiltInComponentFrame(sampleLines) : "";
1074
- "function" === typeof fn && componentFrameCache.set(fn, sampleLines);
1075
- return sampleLines;
1076
- }
1077
- function describeUnknownElementTypeFrameInDEV(type) {
1078
- if (null == type) return "";
1079
- if ("function" === typeof type) {
1080
- var prototype = type.prototype;
1081
- return describeNativeComponentFrame(
1082
- type,
1083
- !(!prototype || !prototype.isReactComponent)
1084
- );
1085
- }
1086
- if ("string" === typeof type) return describeBuiltInComponentFrame(type);
1087
- switch (type) {
1088
- case REACT_SUSPENSE_TYPE:
1089
- return describeBuiltInComponentFrame("Suspense");
1090
- case REACT_SUSPENSE_LIST_TYPE:
1091
- return describeBuiltInComponentFrame("SuspenseList");
1092
- }
1093
- if ("object" === typeof type)
1094
- switch (type.$$typeof) {
1095
- case REACT_FORWARD_REF_TYPE:
1096
- return type = describeNativeComponentFrame(type.render, false), type;
1097
- case REACT_MEMO_TYPE:
1098
- return describeUnknownElementTypeFrameInDEV(type.type);
1099
- case REACT_LAZY_TYPE:
1100
- prototype = type._payload;
1101
- type = type._init;
1102
- try {
1103
- return describeUnknownElementTypeFrameInDEV(type(prototype));
1104
- } catch (x) {
1105
- }
1106
- }
1107
- return "";
1108
- }
1109
- function getOwner() {
1110
- var dispatcher = ReactSharedInternals.A;
1111
- return null === dispatcher ? null : dispatcher.getOwner();
1112
- }
1113
- function hasValidKey(config) {
1114
- if (hasOwnProperty.call(config, "key")) {
1115
- var getter = Object.getOwnPropertyDescriptor(config, "key").get;
1116
- if (getter && getter.isReactWarning) return false;
1117
- }
1118
- return void 0 !== config.key;
1119
- }
1120
- function defineKeyPropWarningGetter(props, displayName) {
1121
- function warnAboutAccessingKey() {
1122
- specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error(
1123
- "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
1124
- displayName
1125
- ));
1126
- }
1127
- warnAboutAccessingKey.isReactWarning = true;
1128
- Object.defineProperty(props, "key", {
1129
- get: warnAboutAccessingKey,
1130
- configurable: true
1131
- });
1132
- }
1133
- function elementRefGetterWithDeprecationWarning() {
1134
- var componentName = getComponentNameFromType(this.type);
1135
- didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error(
1136
- "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
1137
- ));
1138
- componentName = this.props.ref;
1139
- return void 0 !== componentName ? componentName : null;
1140
- }
1141
- function ReactElement(type, key, self, source, owner, props) {
1142
- self = props.ref;
1143
- type = {
1144
- $$typeof: REACT_ELEMENT_TYPE,
1145
- type,
1146
- key,
1147
- props,
1148
- _owner: owner
1149
- };
1150
- null !== (void 0 !== self ? self : null) ? Object.defineProperty(type, "ref", {
1151
- enumerable: false,
1152
- get: elementRefGetterWithDeprecationWarning
1153
- }) : Object.defineProperty(type, "ref", { enumerable: false, value: null });
1154
- type._store = {};
1155
- Object.defineProperty(type._store, "validated", {
1156
- configurable: false,
1157
- enumerable: false,
1158
- writable: true,
1159
- value: 0
1160
- });
1161
- Object.defineProperty(type, "_debugInfo", {
1162
- configurable: false,
1163
- enumerable: false,
1164
- writable: true,
1165
- value: null
1166
- });
1167
- Object.freeze && (Object.freeze(type.props), Object.freeze(type));
1168
- return type;
1169
- }
1170
- function jsxDEVImpl(type, config, maybeKey, isStaticChildren, source, self) {
1171
- if ("string" === typeof type || "function" === typeof type || type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_OFFSCREEN_TYPE || "object" === typeof type && null !== type && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_CONSUMER_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_CLIENT_REFERENCE$1 || void 0 !== type.getModuleId)) {
1172
- var children = config.children;
1173
- if (void 0 !== children)
1174
- if (isStaticChildren)
1175
- if (isArrayImpl(children)) {
1176
- for (isStaticChildren = 0; isStaticChildren < children.length; isStaticChildren++)
1177
- validateChildKeys(children[isStaticChildren], type);
1178
- Object.freeze && Object.freeze(children);
1179
- } else
1180
- console.error(
1181
- "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
1182
- );
1183
- else validateChildKeys(children, type);
1184
- } else {
1185
- children = "";
1186
- if (void 0 === type || "object" === typeof type && null !== type && 0 === Object.keys(type).length)
1187
- children += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
1188
- null === type ? isStaticChildren = "null" : isArrayImpl(type) ? isStaticChildren = "array" : void 0 !== type && type.$$typeof === REACT_ELEMENT_TYPE ? (isStaticChildren = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />", children = " Did you accidentally export a JSX literal instead of a component?") : isStaticChildren = typeof type;
1189
- console.error(
1190
- "React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",
1191
- isStaticChildren,
1192
- children
1193
- );
1194
- }
1195
- if (hasOwnProperty.call(config, "key")) {
1196
- children = getComponentNameFromType(type);
1197
- var keys = Object.keys(config).filter(function(k) {
1198
- return "key" !== k;
1199
- });
1200
- isStaticChildren = 0 < keys.length ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
1201
- didWarnAboutKeySpread[children + isStaticChildren] || (keys = 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}", console.error(
1202
- 'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
1203
- isStaticChildren,
1204
- children,
1205
- keys,
1206
- children
1207
- ), didWarnAboutKeySpread[children + isStaticChildren] = true);
1208
- }
1209
- children = null;
1210
- void 0 !== maybeKey && (checkKeyStringCoercion(maybeKey), children = "" + maybeKey);
1211
- hasValidKey(config) && (checkKeyStringCoercion(config.key), children = "" + config.key);
1212
- if ("key" in config) {
1213
- maybeKey = {};
1214
- for (var propName in config)
1215
- "key" !== propName && (maybeKey[propName] = config[propName]);
1216
- } else maybeKey = config;
1217
- children && defineKeyPropWarningGetter(
1218
- maybeKey,
1219
- "function" === typeof type ? type.displayName || type.name || "Unknown" : type
1220
- );
1221
- return ReactElement(type, children, self, source, getOwner(), maybeKey);
1222
- }
1223
- function validateChildKeys(node, parentType) {
1224
- if ("object" === typeof node && node && node.$$typeof !== REACT_CLIENT_REFERENCE) {
1225
- if (isArrayImpl(node))
1226
- for (var i = 0; i < node.length; i++) {
1227
- var child = node[i];
1228
- isValidElement(child) && validateExplicitKey(child, parentType);
1229
- }
1230
- else if (isValidElement(node))
1231
- node._store && (node._store.validated = 1);
1232
- else if (null === node || "object" !== typeof node ? i = null : (i = MAYBE_ITERATOR_SYMBOL && node[MAYBE_ITERATOR_SYMBOL] || node["@@iterator"], i = "function" === typeof i ? i : null), "function" === typeof i && i !== node.entries && (i = i.call(node), i !== node))
1233
- for (; !(node = i.next()).done; )
1234
- isValidElement(node.value) && validateExplicitKey(node.value, parentType);
1235
- }
1236
- }
1237
- function isValidElement(object) {
1238
- return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
1239
- }
1240
- function validateExplicitKey(element, parentType) {
1241
- if (element._store && !element._store.validated && null == element.key && (element._store.validated = 1, parentType = getCurrentComponentErrorInfo(parentType), !ownerHasKeyUseWarning[parentType])) {
1242
- ownerHasKeyUseWarning[parentType] = true;
1243
- var childOwner = "";
1244
- element && null != element._owner && element._owner !== getOwner() && (childOwner = null, "number" === typeof element._owner.tag ? childOwner = getComponentNameFromType(element._owner.type) : "string" === typeof element._owner.name && (childOwner = element._owner.name), childOwner = " It was passed a child from " + childOwner + ".");
1245
- var prevGetCurrentStack = ReactSharedInternals.getCurrentStack;
1246
- ReactSharedInternals.getCurrentStack = function() {
1247
- var stack = describeUnknownElementTypeFrameInDEV(element.type);
1248
- prevGetCurrentStack && (stack += prevGetCurrentStack() || "");
1249
- return stack;
1250
- };
1251
- console.error(
1252
- 'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
1253
- parentType,
1254
- childOwner
1255
- );
1256
- ReactSharedInternals.getCurrentStack = prevGetCurrentStack;
1257
- }
1258
- }
1259
- function getCurrentComponentErrorInfo(parentType) {
1260
- var info = "", owner = getOwner();
1261
- owner && (owner = getComponentNameFromType(owner.type)) && (info = "\n\nCheck the render method of `" + owner + "`.");
1262
- info || (parentType = getComponentNameFromType(parentType)) && (info = "\n\nCheck the top-level render call using <" + parentType + ">.");
1263
- return info;
1264
- }
1265
- var React = require$$0, REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler");
1266
- var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, REACT_CLIENT_REFERENCE$2 = Symbol.for("react.client.reference"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, assign = Object.assign, REACT_CLIENT_REFERENCE$1 = Symbol.for("react.client.reference"), isArrayImpl = Array.isArray, disabledDepth = 0, prevLog, prevInfo, prevWarn, prevError, prevGroup, prevGroupCollapsed, prevGroupEnd;
1267
- disabledLog.__reactDisabledLog = true;
1268
- var prefix, suffix, reentry = false;
1269
- var componentFrameCache = new ("function" === typeof WeakMap ? WeakMap : Map)();
1270
- var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), specialPropKeyWarningShown;
1271
- var didWarnAboutElementRef = {};
1272
- var didWarnAboutKeySpread = {}, ownerHasKeyUseWarning = {};
1273
- reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
1274
- reactJsxRuntime_development.jsx = function(type, config, maybeKey, source, self) {
1275
- return jsxDEVImpl(type, config, maybeKey, false, source, self);
1276
- };
1277
- reactJsxRuntime_development.jsxs = function(type, config, maybeKey, source, self) {
1278
- return jsxDEVImpl(type, config, maybeKey, true, source, self);
1279
- };
1280
- }();
1281
- return reactJsxRuntime_development;
1282
- }
1283
- var hasRequiredJsxRuntime;
1284
- function requireJsxRuntime() {
1285
- if (hasRequiredJsxRuntime) return jsxRuntime.exports;
1286
- hasRequiredJsxRuntime = 1;
1287
- if (process.env.NODE_ENV === "production") {
1288
- jsxRuntime.exports = requireReactJsxRuntime_production();
1289
- } else {
1290
- jsxRuntime.exports = requireReactJsxRuntime_development();
1291
- }
1292
- return jsxRuntime.exports;
1293
- }
1294
- var jsxRuntimeExports = requireJsxRuntime();
1295
420
  const StreamFeeds = ({ client, children }) => {
1296
- return /* @__PURE__ */ jsxRuntimeExports.jsx(StreamFeedsContext.Provider, { value: client, children });
421
+ return /* @__PURE__ */ jsx(StreamFeedsContext.Provider, { value: client, children });
1297
422
  };
1298
423
  StreamFeeds.displayName = "StreamFeeds";
1299
424
  const StreamFeed = ({
1300
425
  feed,
1301
426
  children
1302
427
  }) => {
1303
- return /* @__PURE__ */ jsxRuntimeExports.jsx(StreamFeedContext.Provider, { value: feed, children });
428
+ return /* @__PURE__ */ jsx(StreamFeedContext.Provider, { value: feed, children });
1304
429
  };
1305
430
  StreamFeed.displayName = "StreamFeed";
1306
431
  const StreamSearch = ({
1307
432
  searchController,
1308
433
  children
1309
434
  }) => {
1310
- return /* @__PURE__ */ jsxRuntimeExports.jsx(StreamSearchContext.Provider, { value: searchController, children });
435
+ return /* @__PURE__ */ jsx(StreamSearchContext.Provider, { value: searchController, children });
1311
436
  };
1312
437
  StreamSearch.displayName = "StreamSearch";
1313
438
  const StreamSearchResults = ({
1314
439
  source,
1315
440
  children
1316
441
  }) => {
1317
- return /* @__PURE__ */ jsxRuntimeExports.jsx(StreamSearchResultsContext.Provider, { value: source, children });
442
+ return /* @__PURE__ */ jsx(StreamSearchResultsContext.Provider, { value: source, children });
1318
443
  };
1319
444
  StreamSearchResults.displayName = "StreamSearchResults";
1320
445
  export {
@@ -1347,7 +472,6 @@ export {
1347
472
  useSearchResult,
1348
473
  useSearchResultsContext,
1349
474
  useSearchSources,
1350
- useStateStore,
1351
475
  useWsConnectionState
1352
476
  };
1353
477
  //# sourceMappingURL=react-bindings.mjs.map