@stream-io/feeds-client 0.3.26 → 0.3.27
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/CHANGELOG.md +7 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/react-bindings.js +60 -931
- package/dist/cjs/react-bindings.js.map +1 -1
- package/dist/es/index.mjs +2 -2
- package/dist/es/react-bindings.mjs +9 -885
- package/dist/es/react-bindings.mjs.map +1 -1
- package/dist/{feeds-client-BNiazJbH.mjs → feeds-client-Db36zlJs.mjs} +8 -9
- package/dist/{feeds-client-BNiazJbH.mjs.map → feeds-client-Db36zlJs.mjs.map} +1 -1
- package/dist/{feeds-client-K0WzrfH-.js → feeds-client-DwFyePYB.js} +8 -9
- package/dist/{feeds-client-K0WzrfH-.js.map → feeds-client-DwFyePYB.js.map} +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -0
- package/dist/types/activity-with-state-updates/activity-with-state-updates.d.ts +4 -4
- package/dist/types/activity-with-state-updates/activity-with-state-updates.d.ts.map +1 -1
- package/dist/types/activity-with-state-updates/get-feed.d.ts +2 -2
- package/dist/types/bindings/react/contexts/StreamFeedContext.d.ts +2 -2
- package/dist/types/bindings/react/contexts/StreamFeedContext.d.ts.map +1 -1
- package/dist/types/bindings/react/contexts/StreamFeedsContext.d.ts +2 -2
- package/dist/types/bindings/react/contexts/StreamFeedsContext.d.ts.map +1 -1
- package/dist/types/bindings/react/contexts/StreamSearchContext.d.ts +2 -2
- package/dist/types/bindings/react/contexts/StreamSearchContext.d.ts.map +1 -1
- package/dist/types/bindings/react/contexts/StreamSearchResultsContext.d.ts +2 -2
- package/dist/types/bindings/react/contexts/StreamSearchResultsContext.d.ts.map +1 -1
- package/dist/types/bindings/react/hooks/client-state-hooks/useClientConnectedUser.d.ts +1 -1
- package/dist/types/bindings/react/hooks/client-state-hooks/useClientConnectedUser.d.ts.map +1 -1
- package/dist/types/bindings/react/hooks/client-state-hooks/useWsConnectionState.d.ts.map +1 -1
- package/dist/types/bindings/react/hooks/feed-state-hooks/useActivityComments.d.ts +5 -3
- package/dist/types/bindings/react/hooks/feed-state-hooks/useActivityComments.d.ts.map +1 -1
- package/dist/types/bindings/react/hooks/feed-state-hooks/useAggregatedActivities.d.ts +2 -2
- package/dist/types/bindings/react/hooks/feed-state-hooks/useAggregatedActivities.d.ts.map +1 -1
- package/dist/types/bindings/react/hooks/feed-state-hooks/useComments.d.ts +3 -1
- package/dist/types/bindings/react/hooks/feed-state-hooks/useComments.d.ts.map +1 -1
- package/dist/types/bindings/react/hooks/feed-state-hooks/useFeedActivities.d.ts +3 -3
- package/dist/types/bindings/react/hooks/feed-state-hooks/useFeedActivities.d.ts.map +1 -1
- package/dist/types/bindings/react/hooks/feed-state-hooks/useFeedMetadata.d.ts +2 -2
- package/dist/types/bindings/react/hooks/feed-state-hooks/useFeedMetadata.d.ts.map +1 -1
- package/dist/types/bindings/react/hooks/feed-state-hooks/useFollowers.d.ts +4 -4
- package/dist/types/bindings/react/hooks/feed-state-hooks/useFollowers.d.ts.map +1 -1
- package/dist/types/bindings/react/hooks/feed-state-hooks/useFollowing.d.ts +4 -4
- package/dist/types/bindings/react/hooks/feed-state-hooks/useFollowing.d.ts.map +1 -1
- package/dist/types/bindings/react/hooks/feed-state-hooks/useIsAggregatedActivityRead.d.ts +2 -1
- package/dist/types/bindings/react/hooks/feed-state-hooks/useIsAggregatedActivityRead.d.ts.map +1 -1
- package/dist/types/bindings/react/hooks/feed-state-hooks/useIsAggregatedActivitySeen.d.ts +2 -1
- package/dist/types/bindings/react/hooks/feed-state-hooks/useIsAggregatedActivitySeen.d.ts.map +1 -1
- package/dist/types/bindings/react/hooks/feed-state-hooks/useNotificationStatus.d.ts +1 -1
- package/dist/types/bindings/react/hooks/feed-state-hooks/useNotificationStatus.d.ts.map +1 -1
- package/dist/types/bindings/react/hooks/feed-state-hooks/useOwnCapabilities.d.ts +2 -1
- package/dist/types/bindings/react/hooks/feed-state-hooks/useOwnCapabilities.d.ts.map +1 -1
- package/dist/types/bindings/react/hooks/feed-state-hooks/useOwnFollows.d.ts +2 -2
- package/dist/types/bindings/react/hooks/feed-state-hooks/useOwnFollows.d.ts.map +1 -1
- package/dist/types/bindings/react/hooks/search-state-hooks/useSearchQuery.d.ts +1 -1
- package/dist/types/bindings/react/hooks/search-state-hooks/useSearchQuery.d.ts.map +1 -1
- package/dist/types/bindings/react/hooks/search-state-hooks/useSearchResult.d.ts +2 -2
- package/dist/types/bindings/react/hooks/search-state-hooks/useSearchResult.d.ts.map +1 -1
- package/dist/types/bindings/react/hooks/search-state-hooks/useSearchSources.d.ts +2 -2
- package/dist/types/bindings/react/hooks/search-state-hooks/useSearchSources.d.ts.map +1 -1
- package/dist/types/bindings/react/hooks/useCreateFeedsClient.d.ts +4 -1
- package/dist/types/bindings/react/hooks/useCreateFeedsClient.d.ts.map +1 -1
- package/dist/types/bindings/react/wrappers/StreamFeed.d.ts +2 -2
- package/dist/types/bindings/react/wrappers/StreamFeed.d.ts.map +1 -1
- package/dist/types/bindings/react/wrappers/StreamFeeds.d.ts +2 -2
- package/dist/types/bindings/react/wrappers/StreamSearch.d.ts +2 -2
- package/dist/types/bindings/react/wrappers/StreamSearch.d.ts.map +1 -1
- package/dist/types/bindings/react/wrappers/StreamSearchResults.d.ts +2 -2
- package/dist/types/bindings/react/wrappers/StreamSearchResults.d.ts.map +1 -1
- package/dist/types/common/ApiClient.d.ts +3 -3
- package/dist/types/common/EventDispatcher.d.ts +1 -1
- package/dist/types/common/Poll.d.ts +2 -2
- package/dist/types/common/rate-limit.d.ts +1 -1
- package/dist/types/common/real-time/StableWSConnection.d.ts +6 -6
- package/dist/types/common/real-time/event-models.d.ts +2 -1
- package/dist/types/common/real-time/event-models.d.ts.map +1 -1
- package/dist/types/common/search/ActivitySearchSource.d.ts +3 -3
- package/dist/types/common/search/BaseSearchSource.d.ts +2 -2
- package/dist/types/common/search/FeedSearchSource.d.ts +3 -3
- package/dist/types/common/search/SearchController.d.ts +1 -1
- package/dist/types/common/search/UserSearchSource.d.ts +4 -4
- package/dist/types/common/types.d.ts +1 -1
- package/dist/types/feed/event-handlers/activity/handle-activity-added.d.ts +3 -3
- package/dist/types/feed/event-handlers/activity/handle-activity-deleted.d.ts +3 -3
- package/dist/types/feed/event-handlers/activity/handle-activity-feedback.d.ts +2 -2
- package/dist/types/feed/event-handlers/activity/handle-activity-feedback.d.ts.map +1 -1
- package/dist/types/feed/event-handlers/activity/handle-activity-marked.d.ts +3 -3
- package/dist/types/feed/event-handlers/activity/handle-activity-pinned.d.ts +2 -2
- package/dist/types/feed/event-handlers/activity/handle-activity-reaction-added.d.ts +3 -3
- package/dist/types/feed/event-handlers/activity/handle-activity-reaction-deleted.d.ts +3 -3
- package/dist/types/feed/event-handlers/activity/handle-activity-reaction-updated.d.ts +3 -3
- package/dist/types/feed/event-handlers/activity/handle-activity-removed-from-feed.d.ts +2 -2
- package/dist/types/feed/event-handlers/activity/handle-activity-unpinned.d.ts +2 -2
- package/dist/types/feed/event-handlers/activity/handle-activity-updated.d.ts +3 -3
- package/dist/types/feed/event-handlers/activity-updater.d.ts +15 -15
- package/dist/types/feed/event-handlers/add-aggregated-activities-to-state.d.ts +2 -2
- package/dist/types/feed/event-handlers/bookmark/handle-bookmark-added.d.ts +3 -3
- package/dist/types/feed/event-handlers/bookmark/handle-bookmark-deleted.d.ts +3 -3
- package/dist/types/feed/event-handlers/bookmark/handle-bookmark-updated.d.ts +3 -3
- package/dist/types/feed/event-handlers/comment/handle-comment-added.d.ts +2 -2
- package/dist/types/feed/event-handlers/comment/handle-comment-deleted.d.ts +3 -2
- package/dist/types/feed/event-handlers/comment/handle-comment-reaction-added.d.ts +3 -2
- package/dist/types/feed/event-handlers/comment/handle-comment-reaction-deleted.d.ts +3 -2
- package/dist/types/feed/event-handlers/comment/handle-comment-reaction-updated.d.ts +3 -2
- package/dist/types/feed/event-handlers/comment/handle-comment-updated.d.ts +3 -2
- package/dist/types/feed/event-handlers/comment/utils/update-comment-count.d.ts +2 -1
- package/dist/types/feed/event-handlers/comment/utils/update-comment-count.d.ts.map +1 -1
- package/dist/types/feed/event-handlers/feed/handle-feed-updated.d.ts +2 -2
- package/dist/types/feed/event-handlers/feed-member/handle-feed-member-added.d.ts +2 -2
- package/dist/types/feed/event-handlers/feed-member/handle-feed-member-removed.d.ts +2 -2
- package/dist/types/feed/event-handlers/feed-member/handle-feed-member-updated.d.ts +2 -2
- package/dist/types/feed/event-handlers/follow/handle-follow-created.d.ts +3 -3
- package/dist/types/feed/event-handlers/follow/handle-follow-deleted.d.ts +3 -3
- package/dist/types/feed/event-handlers/follow/handle-follow-updated.d.ts +2 -2
- package/dist/types/feed/event-handlers/is-activity-pin.d.ts +1 -1
- package/dist/types/feed/event-handlers/notification-feed/handle-notification-feed-updated.d.ts +3 -3
- package/dist/types/feed/event-handlers/story-feeds/handle-story-feeds-updated.d.ts +3 -3
- package/dist/types/feed/event-handlers/watch/handle-watch-started.d.ts +1 -1
- package/dist/types/feed/event-handlers/watch/handle-watch-stopped.d.ts +1 -1
- package/dist/types/feed/feed.d.ts +9 -9
- package/dist/types/feeds-client/active-activity.d.ts +1 -1
- package/dist/types/feeds-client/event-handlers/user/handle-user-updated.d.ts +2 -2
- package/dist/types/feeds-client/feeds-client.d.ts +22 -22
- package/dist/types/feeds-client/feeds-client.d.ts.map +1 -1
- package/dist/types/feeds-client/get-or-create-active-feed.d.ts +2 -2
- package/dist/types/gen/feeds/FeedApi.d.ts +2 -2
- package/dist/types/gen/feeds/FeedsApi.d.ts +2 -2
- package/dist/types/gen/model-decoders/event-decoder-mapping.d.ts +1 -1
- package/dist/types/gen/moderation/ModerationApi.d.ts +2 -2
- package/dist/types/types-internal.d.ts +1 -1
- package/dist/types/types.d.ts +5 -4
- package/dist/types/utils/check-own-fields-equality.d.ts +2 -2
- package/dist/types/utils/event-triggered-by-connected-user.d.ts +2 -2
- package/dist/types/utils/own-feed-fields.d.ts +1 -1
- package/dist/types/utils/state-update-queue.d.ts +4 -4
- package/dist/types/utils/throttling/throttled-get-batched-own-capabilities.d.ts +2 -2
- package/dist/types/utils/throttling/throttled-get-batched-own-capabilities.d.ts.map +1 -1
- package/dist/types/utils/type-assertions.d.ts +2 -2
- package/package.json +11 -12
- package/src/activity-with-state-updates/activity-with-state-updates.ts +2 -2
- package/src/bindings/react/contexts/StreamFeedContext.tsx +2 -1
- package/src/bindings/react/contexts/StreamFeedsContext.tsx +2 -1
- package/src/bindings/react/contexts/StreamSearchContext.tsx +2 -1
- package/src/bindings/react/contexts/StreamSearchResultsContext.tsx +2 -1
- package/src/bindings/react/hooks/client-state-hooks/useClientConnectedUser.ts +2 -1
- package/src/bindings/react/hooks/client-state-hooks/useWsConnectionState.ts +2 -1
- package/src/bindings/react/hooks/feed-state-hooks/useActivityComments.ts +7 -11
- package/src/bindings/react/hooks/feed-state-hooks/useAggregatedActivities.ts +3 -2
- package/src/bindings/react/hooks/feed-state-hooks/useComments.ts +5 -9
- package/src/bindings/react/hooks/feed-state-hooks/useFeedActivities.ts +4 -3
- package/src/bindings/react/hooks/feed-state-hooks/useFeedMetadata.ts +3 -2
- package/src/bindings/react/hooks/feed-state-hooks/useFollowers.ts +2 -1
- package/src/bindings/react/hooks/feed-state-hooks/useFollowing.ts +3 -1
- package/src/bindings/react/hooks/feed-state-hooks/useIsAggregatedActivityRead.ts +4 -2
- package/src/bindings/react/hooks/feed-state-hooks/useIsAggregatedActivitySeen.ts +4 -2
- package/src/bindings/react/hooks/feed-state-hooks/useNotificationStatus.ts +3 -1
- package/src/bindings/react/hooks/feed-state-hooks/useOwnCapabilities.ts +5 -2
- package/src/bindings/react/hooks/feed-state-hooks/useOwnFollows.ts +3 -2
- package/src/bindings/react/hooks/search-state-hooks/useSearchQuery.ts +6 -2
- package/src/bindings/react/hooks/search-state-hooks/useSearchResult.ts +4 -2
- package/src/bindings/react/hooks/search-state-hooks/useSearchSources.ts +3 -5
- package/src/bindings/react/hooks/useCreateFeedsClient.ts +5 -6
- package/src/bindings/react/wrappers/StreamFeed.tsx +2 -1
- package/src/bindings/react/wrappers/StreamSearch.tsx +2 -1
- package/src/bindings/react/wrappers/StreamSearchResults.tsx +2 -1
- package/src/common/real-time/event-models.ts +2 -2
- package/src/feed/event-handlers/activity/handle-activity-feedback.ts +4 -8
- package/src/feed/event-handlers/comment/utils/update-comment-count.ts +2 -2
- package/src/feeds-client/feeds-client.ts +10 -12
- package/src/utils/throttling/throttled-get-batched-own-capabilities.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-bindings.mjs","sources":["../../../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js","../../../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js","../../../../node_modules/use-sync-external-store/shim/index.js","../../node_modules/@stream-io/state-store/dist/esm/state-store.js","../../node_modules/@stream-io/state-store/dist/esm/bindings/react/use-state-store.js","../../src/bindings/react/hooks/useCreateFeedsClient.ts","../../src/bindings/react/contexts/StreamFeedsContext.tsx","../../src/bindings/react/hooks/client-state-hooks/useClientConnectedUser.ts","../../src/bindings/react/hooks/client-state-hooks/useWsConnectionState.ts","../../src/bindings/react/contexts/StreamFeedContext.tsx","../../src/bindings/react/hooks/internal/useStableCallback.ts","../../src/bindings/react/hooks/feed-state-hooks/useFeedActivities.ts","../../src/bindings/react/hooks/feed-state-hooks/useComments.ts","../../src/bindings/react/hooks/feed-state-hooks/useOwnCapabilities.ts","../../src/bindings/react/hooks/feed-state-hooks/useFollowers.ts","../../src/bindings/react/hooks/feed-state-hooks/useFollowing.ts","../../src/bindings/react/hooks/feed-state-hooks/useFeedMetadata.ts","../../src/bindings/react/hooks/feed-state-hooks/useOwnFollows.ts","../../src/bindings/react/hooks/feed-state-hooks/useNotificationStatus.ts","../../src/bindings/react/hooks/feed-state-hooks/useAggregatedActivities.ts","../../src/bindings/react/hooks/feed-state-hooks/useIsAggregatedActivityRead.ts","../../src/bindings/react/hooks/feed-state-hooks/useIsAggregatedActivitySeen.ts","../../src/bindings/react/hooks/feed-state-hooks/useActivityComments.ts","../../src/bindings/react/contexts/StreamSearchResultsContext.tsx","../../src/bindings/react/hooks/search-state-hooks/useSearchResult.ts","../../src/bindings/react/contexts/StreamSearchContext.tsx","../../src/bindings/react/hooks/search-state-hooks/useSearchQuery.ts","../../src/bindings/react/hooks/search-state-hooks/useSearchSources.ts","../../node_modules/react/cjs/react-jsx-runtime.production.js","../../node_modules/react/cjs/react-jsx-runtime.development.js","../../node_modules/react/jsx-runtime.js","../../src/bindings/react/wrappers/StreamFeeds.tsx","../../src/bindings/react/wrappers/StreamFeed.tsx","../../src/bindings/react/wrappers/StreamSearch.tsx","../../src/bindings/react/wrappers/StreamSearchResults.tsx"],"sourcesContent":["/**\n * @license React\n * use-sync-external-store-shim.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar React = require(\"react\");\nfunction is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue;\nfunction useSyncExternalStore$2(subscribe, getSnapshot) {\n var value = getSnapshot(),\n _useState = useState({ inst: { value: value, getSnapshot: getSnapshot } }),\n inst = _useState[0].inst,\n forceUpdate = _useState[1];\n useLayoutEffect(\n function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n },\n [subscribe, value, getSnapshot]\n );\n useEffect(\n function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n });\n },\n [subscribe]\n );\n useDebugValue(value);\n return value;\n}\nfunction checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n}\nfunction useSyncExternalStore$1(subscribe, getSnapshot) {\n return getSnapshot();\n}\nvar shim =\n \"undefined\" === typeof window ||\n \"undefined\" === typeof window.document ||\n \"undefined\" === typeof window.document.createElement\n ? useSyncExternalStore$1\n : useSyncExternalStore$2;\nexports.useSyncExternalStore =\n void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;\n","/**\n * @license React\n * use-sync-external-store-shim.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n }\n function useSyncExternalStore$2(subscribe, getSnapshot) {\n didWarnOld18Alpha ||\n void 0 === React.startTransition ||\n ((didWarnOld18Alpha = !0),\n console.error(\n \"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.\"\n ));\n var value = getSnapshot();\n if (!didWarnUncachedGetSnapshot) {\n var cachedValue = getSnapshot();\n objectIs(value, cachedValue) ||\n (console.error(\n \"The result of getSnapshot should be cached to avoid an infinite loop\"\n ),\n (didWarnUncachedGetSnapshot = !0));\n }\n cachedValue = useState({\n inst: { value: value, getSnapshot: getSnapshot }\n });\n var inst = cachedValue[0].inst,\n forceUpdate = cachedValue[1];\n useLayoutEffect(\n function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n },\n [subscribe, value, getSnapshot]\n );\n useEffect(\n function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n });\n },\n [subscribe]\n );\n useDebugValue(value);\n return value;\n }\n function checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n }\n function useSyncExternalStore$1(subscribe, getSnapshot) {\n return getSnapshot();\n }\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n var React = require(\"react\"),\n objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue,\n didWarnOld18Alpha = !1,\n didWarnUncachedGetSnapshot = !1,\n shim =\n \"undefined\" === typeof window ||\n \"undefined\" === typeof window.document ||\n \"undefined\" === typeof window.document.createElement\n ? useSyncExternalStore$1\n : useSyncExternalStore$2;\n exports.useSyncExternalStore =\n void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim.development.js');\n}\n","export const isPatch = (value) => typeof value === \"function\";\nconst noop = () => { };\nexport class StateStore {\n constructor(value) {\n this.value = value;\n this.handlers = new Set();\n this.preprocessors = new Set();\n this.partialNext = (partial) => this.next((current) => ({ ...current, ...partial }));\n this.subscribeWithSelector = (selector, handler) => {\n // begin with undefined to reduce amount of selector calls\n let previouslySelectedValues;\n const wrappedHandler = (nextValue) => {\n const newlySelectedValues = selector(nextValue);\n // shallow comparison of previouslySelectedValues and newlySelectedValues\n const selectionsAreEqual = StateStore.doSelectionsEqual(previouslySelectedValues, newlySelectedValues);\n if (selectionsAreEqual)\n return;\n // save a copy of previouslySelectedValues before running\n // handler - if previouslySelectedValues are set to\n // newlySelectedValues after the handler call, there's a chance\n // that it'll never get set as handler can throw and flow might\n // go out of sync\n const previouslySelectedValuesCopy = previouslySelectedValues;\n previouslySelectedValues = newlySelectedValues;\n handler(newlySelectedValues, previouslySelectedValuesCopy);\n };\n return this.subscribe(wrappedHandler);\n };\n }\n /**\n * Allows merging two stores only if their keys differ otherwise there's no way to ensure the data type stability.\n * @experimental\n * This method is experimental and may change in future versions.\n */\n merge(stateStore) {\n return new MergedStateStore({\n original: this,\n merged: stateStore,\n });\n }\n next(newValueOrPatch) {\n // newValue (or patch output) should never be a mutated previous value\n const newValue = isPatch(newValueOrPatch)\n ? newValueOrPatch(this.value)\n : newValueOrPatch;\n // do not notify subscribers if the value hasn't changed\n if (Object.is(newValue, this.value))\n return;\n this.preprocessors.forEach((preprocessor) => preprocessor(newValue, this.value));\n const oldValue = this.value;\n this.value = newValue;\n this.handlers.forEach((handler) => handler(this.value, oldValue));\n }\n getLatestValue() {\n return this.value;\n }\n subscribe(handler) {\n handler(this.value, undefined);\n this.handlers.add(handler);\n return () => {\n this.handlers.delete(handler);\n };\n }\n static doSelectionsEqual(previouslySelectedValues, newlySelectedValues) {\n let selectionsAreEqual;\n if ((selectionsAreEqual = typeof previouslySelectedValues !== \"undefined\")) {\n for (const key in newlySelectedValues) {\n if (Object.is(previouslySelectedValues[key], newlySelectedValues[key])) {\n continue;\n }\n selectionsAreEqual = false;\n break;\n }\n }\n return selectionsAreEqual;\n }\n /**\n * Registers a preprocessor function that will be called before the state is updated.\n *\n * Preprocessors are invoked with the new and previous values whenever `next` or `partialNext` methods\n * are called, allowing you to mutate or react to the new value before it is set. Preprocessors run in the\n * order they were registered.\n *\n * @example\n * ```ts\n * const store = new StateStore<{ count: number; isMaxValue: bool; }>({ count: 0, isMaxValue: false });\n *\n * store.addPreprocessor((nextValue, prevValue) => {\n * if (nextValue.count > 10) {\n * nextValue.count = 10; // Clamp the value to a maximum of 10\n * }\n *\n * if (nextValue.count === 10) {\n * nextValue.isMaxValue = true; // Set isMaxValue to true if count is 10\n * } else {\n * nextValue.isMaxValue = false; // Reset isMaxValue otherwise\n * }\n * });\n *\n * store.partialNext({ count: 15 });\n *\n * store.getLatestValue(); // { count: 10, isMaxValue: true }\n *\n * store.partialNext({ count: 5 });\n *\n * store.getLatestValue(); // { count: 5, isMaxValue: false }\n * ```\n *\n * @param preprocessor - The function to be called with the next and previous values before the state is updated.\n * @returns A `RemovePreprocessor` function that removes the preprocessor when called.\n */\n addPreprocessor(preprocessor) {\n this.preprocessors.add(preprocessor);\n return () => {\n this.preprocessors.delete(preprocessor);\n };\n }\n}\n/**\n * Represents a merged state store that combines two separate state stores into one.\n *\n * The MergedStateStore allows combining two stores with non-overlapping keys.\n * It extends StateStore with the combined type of both source stores.\n * Changes to either the original or merged store will propagate to the combined store.\n *\n * Note: Direct mutations (next, partialNext, addPreprocessor) are disabled on the merged store.\n * You should instead call these methods on the original or merged stores.\n *\n * @template O The type of the original state store\n * @template M The type of the merged state store\n *\n * @experimental\n * This class is experimental and may change in future versions.\n */\nexport class MergedStateStore extends StateStore {\n constructor({ original, merged }) {\n const originalValue = original.getLatestValue();\n const mergedValue = merged.getLatestValue();\n super({\n ...originalValue,\n ...mergedValue,\n });\n // override original methods and \"disable\" them\n this.next = () => {\n console.warn(`${MergedStateStore.name}.next is disabled, call original.next or merged.next instead`);\n };\n this.partialNext = () => {\n console.warn(`${MergedStateStore.name}.partialNext is disabled, call original.partialNext or merged.partialNext instead`);\n };\n this.cachedOriginalValue = originalValue;\n this.cachedMergedValue = mergedValue;\n this.original = original;\n this.merged = merged;\n }\n /**\n * Subscribes to changes in the merged state store.\n *\n * This method extends the base subscribe functionality to handle the merged nature of this store:\n * 1. The first subscriber triggers registration of helper subscribers that listen to both source stores\n * 2. Changes from either source store are propagated to this merged store\n * 3. Source store values are cached to prevent unnecessary updates\n *\n * When the first subscriber is added, the method sets up listeners on both original and merged stores.\n * These listeners update the combined store value whenever either source store changes.\n * All subscriptions (helpers and the actual handler) are tracked so they can be properly cleaned up.\n *\n * @param handler - The callback function that will be executed when the state changes\n * @returns An unsubscribe function that, when called, removes the subscription and any helper subscriptions\n */\n subscribe(handler) {\n const unsubscribeFunctions = [];\n // first subscriber will also register helpers which listen to changes of the\n // \"original\" and \"merged\" stores, combined outputs will be emitted through super.next\n // whenever cached values do not equal (always apart from the initial subscription)\n // since the actual handler subscription is registered after helpers, the actual\n // handler will run only once\n if (!this.handlers.size) {\n const base = (nextValue) => {\n super.next((currentValue) => ({\n ...currentValue,\n ...nextValue,\n }));\n };\n unsubscribeFunctions.push(this.original.subscribe((nextValue) => {\n if (nextValue === this.cachedOriginalValue)\n return;\n this.cachedOriginalValue = nextValue;\n base(nextValue);\n }), this.merged.subscribe((nextValue) => {\n if (nextValue === this.cachedMergedValue)\n return;\n this.cachedMergedValue = nextValue;\n base(nextValue);\n }));\n }\n unsubscribeFunctions.push(super.subscribe(handler));\n return () => {\n unsubscribeFunctions.forEach((unsubscribe) => unsubscribe());\n };\n }\n /**\n * Retrieves the latest combined state from both original and merged stores.\n *\n * This method extends the base getLatestValue functionality to ensure the merged store\n * remains in sync with its source stores even when there are no active subscribers.\n *\n * When there are no handlers registered, the method:\n * 1. Fetches the latest values from both source stores\n * 2. Compares them with the cached values to detect changes\n * 3. If changes are detected, updates the internal value and caches\n * the new source values to maintain consistency\n *\n * This approach ensures that calling getLatestValue() always returns the most\n * up-to-date combined state, even if the merged store hasn't been actively\n * receiving updates through subscriptions.\n *\n * @returns The latest combined state from both original and merged stores\n */\n getLatestValue() {\n // if there are no handlers registered to MergedStore then the local value might be out-of-sync\n // pull latest and compare against cached - if they differ, cache latest and produce new combined\n if (!this.handlers.size) {\n const originalValue = this.original.getLatestValue();\n const mergedValue = this.merged.getLatestValue();\n if (originalValue !== this.cachedOriginalValue ||\n mergedValue !== this.cachedMergedValue) {\n this.value = {\n ...originalValue,\n ...mergedValue,\n };\n this.cachedMergedValue = mergedValue;\n this.cachedOriginalValue = originalValue;\n }\n }\n return super.getLatestValue();\n }\n addPreprocessor() {\n console.warn(`${MergedStateStore.name}.addPreprocessor is disabled, call original.addPreprocessor or merged.addPreprocessor instead`);\n return noop;\n }\n}\n//# sourceMappingURL=state-store.js.map","import { useCallback, useMemo } from \"react\";\nimport { useSyncExternalStore } from \"use-sync-external-store/shim\";\nimport { StateStore } from \"../../state-store.js\";\nconst noop = () => { };\nexport function useStateStore(store, selector) {\n const wrappedSubscription = useCallback((onStoreChange) => {\n const unsubscribe = store?.subscribeWithSelector(selector, onStoreChange);\n return unsubscribe ?? noop;\n }, [store, selector]);\n const wrappedSnapshot = useMemo(() => {\n let cachedTuple;\n return () => {\n const currentValue = store?.getLatestValue();\n if (!currentValue)\n return undefined;\n // store value hasn't changed, no need to compare individual values\n if (cachedTuple && Object.is(cachedTuple[0], currentValue)) {\n return cachedTuple[1];\n }\n const newlySelected = selector(currentValue);\n // store value changed but selected values wouldn't have to, double-check selected\n const selectionsAreEqual = StateStore.doSelectionsEqual(cachedTuple?.[1], newlySelected);\n if (selectionsAreEqual)\n return cachedTuple[1];\n cachedTuple = [currentValue, newlySelected];\n return cachedTuple[1];\n };\n }, [store, selector]);\n const state = useSyncExternalStore(wrappedSubscription, wrappedSnapshot);\n return state;\n}\n//# sourceMappingURL=use-state-store.js.map","import { useEffect, useState } from 'react';\nimport {\n FeedsClient,\n type FeedsClientOptions,\n type UserRequest,\n type TokenOrProvider,\n} from '@self';\n\n/**\n * A React hook to create, connect and return an instance of `FeedsClient`.\n */\nexport const useCreateFeedsClient = ({\n apiKey,\n tokenOrProvider,\n userData,\n options,\n}: {\n apiKey: string;\n tokenOrProvider: TokenOrProvider;\n userData: UserRequest;\n options?: FeedsClientOptions;\n}) => {\n const [client, setClient] = useState<FeedsClient | null>(\n () => new FeedsClient(apiKey, options),\n );\n const [error, setError] = useState<Error | null>(null);\n const [cachedUserData, setCachedUserData] = useState(userData);\n\n const [cachedOptions] = useState(options);\n\n if (error) {\n throw error;\n }\n\n if (userData.id !== cachedUserData.id) {\n setCachedUserData(userData);\n }\n\n useEffect(() => {\n const _client = new FeedsClient(apiKey, cachedOptions);\n\n const connectionPromise = _client\n .connectUser(cachedUserData, tokenOrProvider)\n .then(() => {\n setError(null);\n })\n .catch((err) => {\n setError(err);\n });\n\n setClient(_client);\n\n return () => {\n setClient(null);\n connectionPromise\n .then(() => {\n setError(null);\n return _client.disconnectUser();\n })\n .catch((err) => {\n setError(err);\n });\n };\n }, [apiKey, cachedUserData, cachedOptions, tokenOrProvider]);\n\n return client;\n};\n","import { createContext, useContext } from 'react';\nimport type { FeedsClient } from '@self';\n\nexport const StreamFeedsContext = createContext<FeedsClient | undefined>(undefined);\n\n/**\n * The props for the StreamFeedsProvider component.\n */\nexport type StreamFeedsContextProps = {\n /**\n * The client instance to provide to the component tree.\n */\n client: FeedsClient;\n};\n\n/**\n * Hook to access the nearest FeedsClient instance.\n */\nexport const useFeedsClient = () => {\n return useContext(StreamFeedsContext);\n};\n","import type { FeedsClientState } from '@self';\nimport { useStateStore } from '@stream-io/state-store/react-bindings';\nimport { useFeedsClient } from '../../contexts/StreamFeedsContext';\n\n/**\n * A React hook that returns the currently connected user on a `FeedsClient` instance and null otherwise.\n */\nexport const useClientConnectedUser = () => {\n const client = useFeedsClient();\n\n const { user } = useStateStore(client?.state, selector) ?? {};\n\n return user;\n};\n\nconst selector = (nextState: FeedsClientState) => ({\n user: nextState.connected_user,\n});\n","import type { FeedsClientState } from '@self';\nimport { useStateStore } from '@stream-io/state-store/react-bindings';\nimport { useFeedsClient } from '../../contexts/StreamFeedsContext';\n\n/**\n * A React hook that returns the websocket connection state of `FeedsClient`.\n */\nexport const useWsConnectionState = () => {\n const client = useFeedsClient();\n\n const { is_healthy } = useStateStore(client?.state, selector) ?? {}\n\n return { is_healthy };\n};\n\nconst selector = (nextState: FeedsClientState) => ({\n is_healthy: nextState.is_ws_connection_healthy,\n});\n","import { createContext, useContext } from 'react';\nimport type { Feed } from '@self';\n\nexport const StreamFeedContext = createContext<Feed | undefined>(undefined);\n\n/**\n * The props for the StreamFeedProvider component.\n */\nexport type StreamFeedContextProps = {\n feed: Feed;\n};\n\n/**\n * Hook to access the nearest Feed instance.\n */\nexport const useFeedContext = () => {\n return useContext(StreamFeedContext);\n};\n","import { useCallback, useRef } from 'react';\n\nexport type StableCallback<A extends unknown[], R> = (...args: A) => R;\n\n/**\n * A utility hook implementing a stable callback. It takes in an unstable method that\n * is supposed to be invoked somewhere deeper in the DOM tree without making it\n * change its reference every time the parent component rerenders. It will also return\n * the value of the callback if it does return one.\n * A common use-case would be having a function whose invocation depends on state\n * somewhere high up in the DOM tree and wanting to use the same function deeper\n * down, for example in a leaf node and simply using useCallback results in\n * cascading dependency hell. If we wrap it in useStableCallback, we would be able\n * to:\n * - Use the same function as a dependency of another hook (since it is stable)\n * - Still invoke it and get the latest state\n *\n * **Caveats:**\n * - Never wrap a function that is supposed to return a React.ReactElement in\n * useStableCallback, since React will not know that the DOM needs to be updated\n * whenever the callback value changes (for example, renderItem from FlatList must\n * never be wrapped in this hook)\n * - Always prefer using a standard useCallback/stable function wherever possible\n * (the purpose of useStableCallback is to bridge the gap between top level contexts\n * and cascading rereders in downstream components - **not** as an escape hatch)\n * @param callback - the callback we want to stabilize\n */\nexport const useStableCallback = <A extends unknown[], R>(\n callback: StableCallback<A, R>,\n): StableCallback<A, R> => {\n const ref = useRef(callback);\n ref.current = callback;\n\n return useCallback<StableCallback<A, R>>((...args) => {\n return ref.current(...args);\n }, []);\n};\n","import { useFeedContext } from '../../contexts/StreamFeedContext';\nimport type { Feed, FeedState } from '@self';\nimport { useStateStore } from '@stream-io/state-store/react-bindings';\nimport { useMemo } from 'react';\nimport { useStableCallback } from '../internal';\n\n/**\n * A React hook that returns a reactive object containing the current activities,\n * loading state and whether there is a next page to paginate to or not.\n */\nexport const useFeedActivities = (feedFromProps?: Feed) => {\n const feedFromContext = useFeedContext();\n const feed = feedFromProps ?? feedFromContext;\n\n const data = useStateStore(feed?.state, selector);\n\n const loadNextPage = useStableCallback(async () => {\n if (!feed || !data?.has_next_page || data?.is_loading) {\n return;\n }\n\n await feed.getNextPage();\n });\n\n return useMemo(() => ({ ...data, loadNextPage }), [data, loadNextPage]);\n};\n\nconst selector = ({\n is_loading_activities,\n next,\n activities = [],\n}: FeedState) => ({\n is_loading: is_loading_activities,\n has_next_page: typeof next !== 'undefined',\n activities,\n});\n","import { useCallback, useMemo } from 'react';\nimport {\n type ActivityResponse,\n type CommentResponse,\n type CommentParent,\n type Feed,\n type FeedState,\n checkHasAnotherPage,\n isCommentResponse,\n} from '@self';\nimport { useStateStore } from '@stream-io/state-store/react-bindings';\nimport { useFeedContext } from '../../contexts/StreamFeedContext';\n\ntype UseCommentsReturnType<T extends ActivityResponse | CommentResponse> = {\n comments: NonNullable<\n FeedState['comments_by_entity_id'][T['id']]\n >['comments'];\n comments_pagination: NonNullable<\n FeedState['comments_by_entity_id'][T['id']]\n >['pagination'];\n has_next_page: boolean;\n is_loading_next_page: boolean;\n loadNextPage: (\n request?: T extends CommentResponse\n ? Parameters<Feed['loadNextPageCommentReplies']>[1]\n : Parameters<Feed['loadNextPageActivityComments']>[1],\n ) => Promise<void>;\n};\n\n/**\n * @deprecated Use `useActivityComments` instead.\n * @param\n */\nexport function useComments<T extends CommentParent>(_: {\n feed: Feed;\n parent: T;\n}): UseCommentsReturnType<T>;\nexport function useComments<T extends CommentParent>(_: {\n feed?: Feed;\n parent: T;\n}): UseCommentsReturnType<T> | undefined;\nexport function useComments<T extends CommentParent>({\n feed: feedFromProps,\n parent,\n}: {\n feed?: Feed;\n /**\n * The parent (activity or comment) for which to fetch comments.\n */\n parent: T;\n}) {\n const feedFromContext = useFeedContext();\n const feed = feedFromProps ?? feedFromContext;\n\n const selector = useCallback(\n (state: FeedState) => ({\n comments: state.comments_by_entity_id?.[parent.id]?.comments,\n comments_pagination: state.comments_by_entity_id?.[parent.id]?.pagination,\n }),\n [parent.id],\n );\n\n const data = useStateStore(feed?.state, selector);\n\n const loadNextPage = useMemo<\n UseCommentsReturnType<T>['loadNextPage'] | undefined\n >(() => {\n if (!feed) return undefined;\n\n return (request) => {\n if (isCommentResponse(parent)) {\n return feed.loadNextPageCommentReplies(parent, request);\n } else {\n return feed.loadNextPageActivityComments(parent, request);\n }\n };\n }, [feed, parent]);\n\n return useMemo(() => {\n if (!data) {\n return undefined;\n }\n\n return {\n ...data,\n has_next_page: checkHasAnotherPage(\n data.comments,\n data.comments_pagination?.next,\n ),\n is_loading_next_page:\n data?.comments_pagination?.loading_next_page ?? false,\n loadNextPage,\n };\n }, [data, loadNextPage]);\n}\n","import type { FeedOwnCapability, Feed, FeedsClientState } from '@self';\nimport { useStateStore } from '@stream-io/state-store/react-bindings';\nimport { useFeedContext } from '../../contexts/StreamFeedContext';\nimport { useFeedsClient } from '../../contexts/StreamFeedsContext';\nimport { useCallback } from 'react';\n\nconst stableEmptyArray: readonly FeedOwnCapability[] = [];\n\nexport const useOwnCapabilities = (feedFromProps?: Feed | string) => {\n const client = useFeedsClient();\n const feedFromContext = useFeedContext();\n const feed = feedFromProps ?? feedFromContext;\n const fid = typeof feed === 'string' ? feed : feed?.feed;\n\n const selector = useCallback(\n (currentState: FeedsClientState) => {\n if (!fid) {\n return { feedOwnCapabilities: stableEmptyArray };\n }\n\n return {\n feedOwnCapabilities:\n currentState.own_capabilities_by_fid[fid] ?? stableEmptyArray,\n };\n },\n [fid],\n );\n\n const { feedOwnCapabilities = stableEmptyArray } =\n useStateStore(client?.state, selector) ?? {};\n\n // console.log('GETTING CAPA: ', feed?.feed, feedOwnCapabilities);\n\n return feedOwnCapabilities;\n};\n","import { useCallback, useMemo } from 'react';\nimport { type Feed, type FeedState, checkHasAnotherPage } from '@self';\nimport { useStateStore } from '@stream-io/state-store/react-bindings';\nimport { useFeedContext } from '../../contexts/StreamFeedContext';\n\nconst selector = ({\n follower_count,\n followers,\n followers_pagination,\n}: FeedState) => ({\n follower_count,\n followers,\n followers_pagination,\n});\n\ntype UseFollowersReturnType = ReturnType<typeof selector> & {\n is_loading_next_page: boolean;\n has_next_page: boolean;\n loadNextPage: (\n ...options: Parameters<Feed['loadNextPageFollowers']>\n ) => Promise<void>;\n};\n\nexport function useFollowers(feed: Feed): UseFollowersReturnType;\nexport function useFollowers(feed?: Feed): UseFollowersReturnType | undefined;\nexport function useFollowers(feedFromProps?: Feed) {\n const feedFromContext = useFeedContext();\n const feed = feedFromProps ?? feedFromContext;\n\n const data = useStateStore(feed?.state, selector);\n\n const loadNextPage = useCallback(\n (...options: Parameters<Feed['loadNextPageFollowers']>) =>\n feed?.loadNextPageFollowers(...options),\n [feed],\n );\n\n return useMemo(() => {\n if (!data) {\n return undefined;\n }\n\n return {\n ...data,\n is_loading_next_page:\n data.followers_pagination?.loading_next_page ?? false,\n has_next_page: checkHasAnotherPage(\n data.followers,\n data.followers_pagination?.next,\n ),\n loadNextPage,\n };\n }, [data, loadNextPage]);\n}\n","import { useCallback, useMemo } from 'react';\nimport { type Feed, type FeedState, checkHasAnotherPage } from '@self';\nimport { useStateStore } from '@stream-io/state-store/react-bindings';\nimport { useFeedContext } from '../../contexts/StreamFeedContext';\n\nconst selector = ({\n following_count,\n following,\n following_pagination,\n}: FeedState) => ({\n following_count,\n following,\n following_pagination,\n});\n\ntype UseFollowingReturnType = ReturnType<typeof selector> & {\n is_loading_next_page: boolean;\n has_next_page: boolean;\n loadNextPage: (\n ...options: Parameters<Feed['loadNextPageFollowers']>\n ) => Promise<void>;\n};\n\nexport function useFollowing(feed: Feed): UseFollowingReturnType;\nexport function useFollowing(feed?: Feed): UseFollowingReturnType | undefined;\nexport function useFollowing(feedFromProps?: Feed) {\n const feedFromContext = useFeedContext();\n const feed = feedFromProps ?? feedFromContext;\n\n const data = useStateStore(feed?.state, selector);\n\n const loadNextPage = useCallback(\n (...options: Parameters<Feed['loadNextPageFollowing']>) =>\n feed?.loadNextPageFollowing(...options),\n [feed],\n );\n\n return useMemo(() => {\n if (!data) {\n return undefined;\n }\n\n return {\n ...data,\n is_loading_next_page:\n data.following_pagination?.loading_next_page ?? false,\n has_next_page: checkHasAnotherPage(\n data.following,\n data.following_pagination?.next,\n ),\n loadNextPage,\n };\n }, [data, loadNextPage]);\n}\n","import type { Feed, FeedState } from '@self';\nimport { useFeedContext } from '../../contexts/StreamFeedContext';\nimport { useStateStore } from '@stream-io/state-store/react-bindings';\n\n/**\n * A React hook that returns a reactive object containing some often used\n * metadata for a feed.\n */\nexport const useFeedMetadata = (feedFromProps?: Feed) => {\n const feedFromContext = useFeedContext();\n const feed = feedFromProps ?? feedFromContext;\n\n return useStateStore(feed?.state, selector);\n};\n\nconst selector = ({\n follower_count = 0,\n following_count = 0,\n created_by,\n created_at,\n updated_at,\n}: FeedState) => ({\n created_by,\n follower_count,\n following_count,\n created_at,\n updated_at,\n});\n","import type { Feed, FeedState } from '@self';\nimport { useFeedContext } from '../../contexts/StreamFeedContext';\nimport { useStateStore } from '@stream-io/state-store/react-bindings';\n\n/**\n * A React hook that returns a reactive array of feeds that the current user\n * owns and are following the respective feed that we are observing.\n */\nexport const useOwnFollows = (feedFromProps?: Feed) => {\n const feedFromContext = useFeedContext();\n const feed = feedFromProps ?? feedFromContext;\n\n return useStateStore(feed?.state, selector);\n};\n\nconst selector = ({ own_follows }: FeedState) => ({\n own_follows,\n});\n","import type { Feed, FeedState, NotificationStatusResponse } from '@self';\nimport { useStateStore } from '@stream-io/state-store/react-bindings';\nimport { useFeedContext } from '../../contexts/StreamFeedContext';\n\nconst selector = ({ notification_status }: FeedState) =>\n ({\n unread: notification_status?.unread ?? 0,\n unseen: notification_status?.unseen ?? 0,\n last_read_at: notification_status?.last_read_at,\n last_seen_at: notification_status?.last_seen_at,\n read_activities: notification_status?.read_activities,\n seen_activities: notification_status?.seen_activities,\n }) satisfies NotificationStatusResponse;\n\ntype UseNotificationStatusReturnType = ReturnType<typeof selector>;\n\nexport function useNotificationStatus(\n feed: Feed,\n): UseNotificationStatusReturnType;\nexport function useNotificationStatus(\n feed?: Feed,\n): UseNotificationStatusReturnType | undefined;\nexport function useNotificationStatus(feedFromProps?: Feed) {\n const feedFromContext = useFeedContext();\n const feed = feedFromProps ?? feedFromContext;\n\n return useStateStore(feed?.state, selector);\n}\n","import type { Feed, FeedState } from '@self';\nimport { useStateStore } from '@stream-io/state-store/react-bindings';\nimport { useFeedContext } from '../../contexts/StreamFeedContext';\nimport { useMemo } from 'react';\nimport { useStableCallback } from '../internal';\n\nconst selector = ({\n is_loading_activities,\n next,\n aggregated_activities = [],\n}: FeedState) => ({\n is_loading: is_loading_activities,\n has_next_page: typeof next !== 'undefined',\n aggregated_activities,\n});\n\ntype UseAggregatedActivitiesReturnType = ReturnType<typeof selector> & {\n loadNextPage: () => Promise<void>;\n};\n\n/**\n * A React hook that returns a reactive object containing the current aggregated activities,\n * loading state and whether there is a next page to paginate to or not.\n */\nexport function useAggregatedActivities(\n feedFromProps: Feed,\n): UseAggregatedActivitiesReturnType;\nexport function useAggregatedActivities(\n feedFromProps?: Feed,\n): UseAggregatedActivitiesReturnType | undefined;\nexport function useAggregatedActivities(feedFromProps?: Feed) {\n const feedFromContext = useFeedContext();\n const feed = feedFromProps ?? feedFromContext;\n\n const data = useStateStore(feed?.state, selector);\n\n const loadNextPage = useStableCallback(async () => {\n if (!feed || !data?.has_next_page || data?.is_loading) {\n return;\n }\n\n await feed.getNextPage();\n });\n\n return useMemo(\n () => (data ? { ...data, loadNextPage } : undefined),\n [data, loadNextPage],\n );\n}\n","import { useFeedContext } from '../../contexts/StreamFeedContext';\nimport { useNotificationStatus } from './useNotificationStatus';\nimport { useMemo } from 'react';\nimport type { AggregatedActivityResponse, Feed } from '@self';\n\nexport const useIsAggregatedActivityRead = ({\n feed: feedFromProps,\n aggregatedActivity,\n}: {\n feed?: Feed;\n aggregatedActivity: AggregatedActivityResponse;\n}) => {\n const feedFromContext = useFeedContext();\n const feed = feedFromProps ?? feedFromContext;\n\n const { read_activities: readActivities, last_read_at: lastReadAt } =\n useNotificationStatus(feed) ?? {};\n\n const group = aggregatedActivity.group;\n\n return useMemo(\n () =>\n (lastReadAt &&\n aggregatedActivity.updated_at.getTime() <= lastReadAt.getTime()) ||\n (readActivities ?? []).includes(group),\n [lastReadAt, aggregatedActivity.updated_at, readActivities, group],\n );\n};\n","import { useFeedContext } from '../../contexts/StreamFeedContext';\nimport { useNotificationStatus } from './useNotificationStatus';\nimport { useMemo } from 'react';\nimport type { AggregatedActivityResponse, Feed } from '@self';\n\nexport const useIsAggregatedActivitySeen = ({\n feed: feedFromProps,\n aggregatedActivity,\n}: {\n feed?: Feed;\n aggregatedActivity: AggregatedActivityResponse;\n}) => {\n const feedFromContext = useFeedContext();\n const feed = feedFromProps ?? feedFromContext;\n\n const { seen_activities: seenActivities, last_seen_at: lastSeenAt } =\n useNotificationStatus(feed) ?? {};\n\n const group = aggregatedActivity.group;\n\n return useMemo(\n () =>\n (lastSeenAt &&\n aggregatedActivity.updated_at.getTime() < lastSeenAt.getTime()) ||\n (seenActivities ?? []).includes(group),\n [lastSeenAt, aggregatedActivity.updated_at, seenActivities, group],\n );\n};\n","import { useCallback, useMemo } from 'react';\nimport {\n type ActivityResponse,\n type CommentResponse,\n type Feed,\n type FeedState,\n checkHasAnotherPage,\n type ActivityWithStateUpdates,\n type ActivityState,\n type StateStore,\n} from '@self';\nimport { useFeedContext } from '../../contexts/StreamFeedContext';\nimport { useStateStore } from '@stream-io/state-store/react-bindings';\n\nconst canLoadComments = (\n feedOrActivity: Feed | ActivityResponse | ActivityWithStateUpdates,\n): feedOrActivity is ActivityWithStateUpdates | Feed => {\n return (\n 'loadNextPageCommentReplies' in feedOrActivity &&\n 'loadNextPageActivityComments' in feedOrActivity\n );\n};\n\ntype UseCommentsReturnType<T extends ActivityResponse | CommentResponse> = {\n comments: NonNullable<\n FeedState['comments_by_entity_id'][T['id']]\n >['comments'];\n comments_pagination: NonNullable<\n FeedState['comments_by_entity_id'][T['id']]\n >['pagination'];\n has_next_page: boolean;\n is_loading_next_page: boolean;\n loadNextPage: (\n request?: T extends CommentResponse\n ? Parameters<Feed['loadNextPageCommentReplies']>[1]\n : Parameters<Feed['loadNextPageActivityComments']>[1],\n ) => Promise<void>;\n};\n\nexport function useActivityComments({\n feed: feedFromProps,\n parentComment,\n activity,\n}: {\n feed?: Feed;\n parentComment?: CommentResponse;\n activity?: ActivityResponse | ActivityWithStateUpdates;\n}) {\n const feedFromContext = useFeedContext();\n const feed = feedFromProps ?? feedFromContext;\n const feedOrActivity = feed ?? activity;\n\n if (!feedOrActivity) {\n throw new Error('Feed or activity is required');\n }\n\n if (!canLoadComments(feedOrActivity)) {\n throw new Error('Feed or activity does not support loading comments');\n }\n\n if (!(activity || parentComment)) {\n throw new Error('Activity or parent comment is required');\n }\n\n const entityId = parentComment?.id ?? activity?.id ?? '';\n const selector = useCallback(\n (state: FeedState | ActivityState) => ({\n comments: state.comments_by_entity_id?.[entityId]?.comments,\n comments_pagination: state.comments_by_entity_id?.[entityId]?.pagination,\n }),\n [entityId],\n );\n\n const data = useStateStore(\n feedOrActivity.state as StateStore<FeedState | ActivityState>,\n selector,\n );\n\n const loadNextPage = useCallback<\n UseCommentsReturnType<ActivityResponse | CommentResponse>['loadNextPage']\n >(\n (request) => {\n if (parentComment) {\n return feedOrActivity.loadNextPageCommentReplies(\n parentComment,\n request,\n );\n } else {\n if (activity && canLoadComments(activity)) {\n return activity.loadNextPageActivityComments(request);\n } else if (feed) {\n return feed.loadNextPageActivityComments(activity?.id ?? '', request);\n } else {\n throw new Error('Activity or feed is required');\n }\n }\n },\n [feedOrActivity, feed, parentComment, activity],\n );\n\n return useMemo(() => {\n return {\n ...data,\n has_next_page: checkHasAnotherPage(\n data.comments,\n data.comments_pagination?.next,\n ),\n is_loading_next_page:\n data?.comments_pagination?.loading_next_page ?? false,\n loadNextPage,\n };\n }, [data, loadNextPage]);\n}\n","import { createContext, useContext } from 'react';\nimport type { SearchSource } from '@self';\n\nexport const StreamSearchResultsContext = createContext<\n SearchSource | undefined\n>(undefined);\n\n/**\n * The props for the StreamSearchResultsProvider component.\n */\nexport type StreamSearchResultsContextProps = {\n source: SearchSource;\n};\n\n/**\n * Hook to access the nearest SearchSource instance.\n */\nexport const useSearchResultsContext = () => {\n return useContext(StreamSearchResultsContext);\n};\n","import type { SearchSource, SearchSourceState } from '@self';\nimport { useMemo } from 'react';\nimport { useSearchResultsContext } from '../../contexts/StreamSearchResultsContext';\nimport { useStateStore } from '@stream-io/state-store/react-bindings';\nimport { useStableCallback } from '../internal';\n\nexport const useSearchResult = (sourceFromProps?: SearchSource) => {\n const sourceFromContext = useSearchResultsContext();\n const source = sourceFromProps ?? sourceFromContext;\n\n const { items, error, isLoading, hasNext } =\n useStateStore(source?.state, selector) ?? {};\n\n const loadMore = useStableCallback(async () => {\n if (hasNext) {\n source?.search();\n }\n });\n\n return useMemo(\n () => ({ items, error, isLoading, hasNext, loadMore }),\n [error, hasNext, isLoading, items, loadMore],\n );\n};\n\nconst selector = ({\n items,\n isLoading,\n hasNext,\n lastQueryError,\n}: SearchSourceState) => ({\n items,\n isLoading,\n hasNext,\n error: lastQueryError,\n});\n","import { createContext, useContext } from 'react';\nimport type { SearchController } from '@self';\n\nexport const StreamSearchContext = createContext<SearchController | undefined>(undefined);\n\n/**\n * The props for the StreamSearchProvider component.\n */\nexport type StreamSearchContextProps = {\n searchController: SearchController;\n};\n\n/**\n * Hook to access the nearest SearchController instance.\n */\nexport const useSearchContext = () => {\n return useContext(StreamSearchContext);\n};\n","import type { SearchController, SearchControllerState } from '@self';\nimport { useSearchContext } from '../../contexts/StreamSearchContext';\nimport { useStateStore } from '@stream-io/state-store/react-bindings';\n\nexport const useSearchQuery = (controllerFromProps?: SearchController) => {\n const controllerFromState = useSearchContext();\n const controller = controllerFromProps ?? controllerFromState;\n\n return useStateStore(controller?.state, selector);\n};\n\nconst selector = ({ searchQuery }: SearchControllerState) => ({\n searchQuery,\n});\n","import type {\n SearchController,\n SearchControllerState,\n} from '@self';\nimport { useSearchContext } from '../../contexts/StreamSearchContext';\nimport { useStateStore } from '@stream-io/state-store/react-bindings';\n\nexport const useSearchSources = (controllerFromProps?: SearchController) => {\n const controllerFromState = useSearchContext();\n const controller = controllerFromProps ?? controllerFromState;\n\n return useStateStore(controller?.state, selector);\n};\n\nconst selector = ({ sources }: SearchControllerState) => ({\n sources,\n});\n","/**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\nfunction jsxProd(type, config, maybeKey) {\n var key = null;\n void 0 !== maybeKey && (key = \"\" + maybeKey);\n void 0 !== config.key && (key = \"\" + config.key);\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n config = maybeKey.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== config ? config : null,\n props: maybeKey\n };\n}\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsxProd;\nexports.jsxs = jsxProd;\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE$2\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_CONTEXT_TYPE:\n return (type.displayName || \"Context\") + \".Provider\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function disabledLog() {}\n function disableLogs() {\n if (0 === disabledDepth) {\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd;\n var props = {\n configurable: !0,\n enumerable: !0,\n value: disabledLog,\n writable: !0\n };\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n }\n disabledDepth++;\n }\n function reenableLogs() {\n disabledDepth--;\n if (0 === disabledDepth) {\n var props = { configurable: !0, enumerable: !0, writable: !0 };\n Object.defineProperties(console, {\n log: assign({}, props, { value: prevLog }),\n info: assign({}, props, { value: prevInfo }),\n warn: assign({}, props, { value: prevWarn }),\n error: assign({}, props, { value: prevError }),\n group: assign({}, props, { value: prevGroup }),\n groupCollapsed: assign({}, props, { value: prevGroupCollapsed }),\n groupEnd: assign({}, props, { value: prevGroupEnd })\n });\n }\n 0 > disabledDepth &&\n console.error(\n \"disabledDepth fell below zero. This is a bug in React. Please file an issue.\"\n );\n }\n function describeBuiltInComponentFrame(name) {\n if (void 0 === prefix)\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = (match && match[1]) || \"\";\n suffix =\n -1 < x.stack.indexOf(\"\\n at\")\n ? \" (<anonymous>)\"\n : -1 < x.stack.indexOf(\"@\")\n ? \"@unknown:0:0\"\n : \"\";\n }\n return \"\\n\" + prefix + name + suffix;\n }\n function describeNativeComponentFrame(fn, construct) {\n if (!fn || reentry) return \"\";\n var frame = componentFrameCache.get(fn);\n if (void 0 !== frame) return frame;\n reentry = !0;\n frame = Error.prepareStackTrace;\n Error.prepareStackTrace = void 0;\n var previousDispatcher = null;\n previousDispatcher = ReactSharedInternals.H;\n ReactSharedInternals.H = null;\n disableLogs();\n try {\n var RunInRootFrame = {\n DetermineComponentFrameRoot: function () {\n try {\n if (construct) {\n var Fake = function () {\n throw Error();\n };\n Object.defineProperty(Fake.prototype, \"props\", {\n set: function () {\n throw Error();\n }\n });\n if (\"object\" === typeof Reflect && Reflect.construct) {\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n var control = x;\n }\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x$0) {\n control = x$0;\n }\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x$1) {\n control = x$1;\n }\n (Fake = fn()) &&\n \"function\" === typeof Fake.catch &&\n Fake.catch(function () {});\n }\n } catch (sample) {\n if (sample && control && \"string\" === typeof sample.stack)\n return [sample.stack, control.stack];\n }\n return [null, null];\n }\n };\n RunInRootFrame.DetermineComponentFrameRoot.displayName =\n \"DetermineComponentFrameRoot\";\n var namePropDescriptor = Object.getOwnPropertyDescriptor(\n RunInRootFrame.DetermineComponentFrameRoot,\n \"name\"\n );\n namePropDescriptor &&\n namePropDescriptor.configurable &&\n Object.defineProperty(\n RunInRootFrame.DetermineComponentFrameRoot,\n \"name\",\n { value: \"DetermineComponentFrameRoot\" }\n );\n var _RunInRootFrame$Deter =\n RunInRootFrame.DetermineComponentFrameRoot(),\n sampleStack = _RunInRootFrame$Deter[0],\n controlStack = _RunInRootFrame$Deter[1];\n if (sampleStack && controlStack) {\n var sampleLines = sampleStack.split(\"\\n\"),\n controlLines = controlStack.split(\"\\n\");\n for (\n _RunInRootFrame$Deter = namePropDescriptor = 0;\n namePropDescriptor < sampleLines.length &&\n !sampleLines[namePropDescriptor].includes(\n \"DetermineComponentFrameRoot\"\n );\n\n )\n namePropDescriptor++;\n for (\n ;\n _RunInRootFrame$Deter < controlLines.length &&\n !controlLines[_RunInRootFrame$Deter].includes(\n \"DetermineComponentFrameRoot\"\n );\n\n )\n _RunInRootFrame$Deter++;\n if (\n namePropDescriptor === sampleLines.length ||\n _RunInRootFrame$Deter === controlLines.length\n )\n for (\n namePropDescriptor = sampleLines.length - 1,\n _RunInRootFrame$Deter = controlLines.length - 1;\n 1 <= namePropDescriptor &&\n 0 <= _RunInRootFrame$Deter &&\n sampleLines[namePropDescriptor] !==\n controlLines[_RunInRootFrame$Deter];\n\n )\n _RunInRootFrame$Deter--;\n for (\n ;\n 1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter;\n namePropDescriptor--, _RunInRootFrame$Deter--\n )\n if (\n sampleLines[namePropDescriptor] !==\n controlLines[_RunInRootFrame$Deter]\n ) {\n if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) {\n do\n if (\n (namePropDescriptor--,\n _RunInRootFrame$Deter--,\n 0 > _RunInRootFrame$Deter ||\n sampleLines[namePropDescriptor] !==\n controlLines[_RunInRootFrame$Deter])\n ) {\n var _frame =\n \"\\n\" +\n sampleLines[namePropDescriptor].replace(\n \" at new \",\n \" at \"\n );\n fn.displayName &&\n _frame.includes(\"<anonymous>\") &&\n (_frame = _frame.replace(\"<anonymous>\", fn.displayName));\n \"function\" === typeof fn &&\n componentFrameCache.set(fn, _frame);\n return _frame;\n }\n while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter);\n }\n break;\n }\n }\n } finally {\n (reentry = !1),\n (ReactSharedInternals.H = previousDispatcher),\n reenableLogs(),\n (Error.prepareStackTrace = frame);\n }\n sampleLines = (sampleLines = fn ? fn.displayName || fn.name : \"\")\n ? describeBuiltInComponentFrame(sampleLines)\n : \"\";\n \"function\" === typeof fn && componentFrameCache.set(fn, sampleLines);\n return sampleLines;\n }\n function describeUnknownElementTypeFrameInDEV(type) {\n if (null == type) return \"\";\n if (\"function\" === typeof type) {\n var prototype = type.prototype;\n return describeNativeComponentFrame(\n type,\n !(!prototype || !prototype.isReactComponent)\n );\n }\n if (\"string\" === typeof type) return describeBuiltInComponentFrame(type);\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame(\"Suspense\");\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame(\"SuspenseList\");\n }\n if (\"object\" === typeof type)\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return (type = describeNativeComponentFrame(type.render, !1)), type;\n case REACT_MEMO_TYPE:\n return describeUnknownElementTypeFrameInDEV(type.type);\n case REACT_LAZY_TYPE:\n prototype = type._payload;\n type = type._init;\n try {\n return describeUnknownElementTypeFrameInDEV(type(prototype));\n } catch (x) {}\n }\n return \"\";\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%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)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"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.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(type, key, self, source, owner, props) {\n self = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== self ? self : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function jsxDEVImpl(\n type,\n config,\n maybeKey,\n isStaticChildren,\n source,\n self\n ) {\n if (\n \"string\" === typeof type ||\n \"function\" === typeof type ||\n type === REACT_FRAGMENT_TYPE ||\n type === REACT_PROFILER_TYPE ||\n type === REACT_STRICT_MODE_TYPE ||\n type === REACT_SUSPENSE_TYPE ||\n type === REACT_SUSPENSE_LIST_TYPE ||\n type === REACT_OFFSCREEN_TYPE ||\n (\"object\" === typeof type &&\n null !== type &&\n (type.$$typeof === REACT_LAZY_TYPE ||\n type.$$typeof === REACT_MEMO_TYPE ||\n type.$$typeof === REACT_CONTEXT_TYPE ||\n type.$$typeof === REACT_CONSUMER_TYPE ||\n type.$$typeof === REACT_FORWARD_REF_TYPE ||\n type.$$typeof === REACT_CLIENT_REFERENCE$1 ||\n void 0 !== type.getModuleId))\n ) {\n var children = config.children;\n if (void 0 !== children)\n if (isStaticChildren)\n if (isArrayImpl(children)) {\n for (\n isStaticChildren = 0;\n isStaticChildren < children.length;\n isStaticChildren++\n )\n validateChildKeys(children[isStaticChildren], type);\n Object.freeze && Object.freeze(children);\n } else\n console.error(\n \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n );\n else validateChildKeys(children, type);\n } else {\n children = \"\";\n if (\n void 0 === type ||\n (\"object\" === typeof type &&\n null !== type &&\n 0 === Object.keys(type).length)\n )\n children +=\n \" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.\";\n null === type\n ? (isStaticChildren = \"null\")\n : isArrayImpl(type)\n ? (isStaticChildren = \"array\")\n : void 0 !== type && type.$$typeof === REACT_ELEMENT_TYPE\n ? ((isStaticChildren =\n \"<\" +\n (getComponentNameFromType(type.type) || \"Unknown\") +\n \" />\"),\n (children =\n \" Did you accidentally export a JSX literal instead of a component?\"))\n : (isStaticChildren = typeof type);\n console.error(\n \"React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s\",\n isStaticChildren,\n children\n );\n }\n if (hasOwnProperty.call(config, \"key\")) {\n children = getComponentNameFromType(type);\n var keys = Object.keys(config).filter(function (k) {\n return \"key\" !== k;\n });\n isStaticChildren =\n 0 < keys.length\n ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n : \"{key: someKey}\";\n didWarnAboutKeySpread[children + isStaticChildren] ||\n ((keys =\n 0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n console.error(\n '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} />',\n isStaticChildren,\n children,\n keys,\n children\n ),\n (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n }\n children = null;\n void 0 !== maybeKey &&\n (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n children &&\n defineKeyPropWarningGetter(\n maybeKey,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n return ReactElement(type, children, self, source, getOwner(), maybeKey);\n }\n function validateChildKeys(node, parentType) {\n if (\n \"object\" === typeof node &&\n node &&\n node.$$typeof !== REACT_CLIENT_REFERENCE\n )\n if (isArrayImpl(node))\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n isValidElement(child) && validateExplicitKey(child, parentType);\n }\n else if (isValidElement(node))\n node._store && (node._store.validated = 1);\n else if (\n (null === node || \"object\" !== typeof node\n ? (i = null)\n : ((i =\n (MAYBE_ITERATOR_SYMBOL && node[MAYBE_ITERATOR_SYMBOL]) ||\n node[\"@@iterator\"]),\n (i = \"function\" === typeof i ? i : null)),\n \"function\" === typeof i &&\n i !== node.entries &&\n ((i = i.call(node)), i !== node))\n )\n for (; !(node = i.next()).done; )\n isValidElement(node.value) &&\n validateExplicitKey(node.value, parentType);\n }\n function isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n }\n function validateExplicitKey(element, parentType) {\n if (\n element._store &&\n !element._store.validated &&\n null == element.key &&\n ((element._store.validated = 1),\n (parentType = getCurrentComponentErrorInfo(parentType)),\n !ownerHasKeyUseWarning[parentType])\n ) {\n ownerHasKeyUseWarning[parentType] = !0;\n var childOwner = \"\";\n element &&\n null != element._owner &&\n element._owner !== getOwner() &&\n ((childOwner = null),\n \"number\" === typeof element._owner.tag\n ? (childOwner = getComponentNameFromType(element._owner.type))\n : \"string\" === typeof element._owner.name &&\n (childOwner = element._owner.name),\n (childOwner = \" It was passed a child from \" + childOwner + \".\"));\n var prevGetCurrentStack = ReactSharedInternals.getCurrentStack;\n ReactSharedInternals.getCurrentStack = function () {\n var stack = describeUnknownElementTypeFrameInDEV(element.type);\n prevGetCurrentStack && (stack += prevGetCurrentStack() || \"\");\n return stack;\n };\n console.error(\n 'Each child in a list should have a unique \"key\" prop.%s%s See https://react.dev/link/warning-keys for more information.',\n parentType,\n childOwner\n );\n ReactSharedInternals.getCurrentStack = prevGetCurrentStack;\n }\n }\n function getCurrentComponentErrorInfo(parentType) {\n var info = \"\",\n owner = getOwner();\n owner &&\n (owner = getComponentNameFromType(owner.type)) &&\n (info = \"\\n\\nCheck the render method of `\" + owner + \"`.\");\n info ||\n ((parentType = getComponentNameFromType(parentType)) &&\n (info =\n \"\\n\\nCheck the top-level render call using <\" + parentType + \">.\"));\n return info;\n }\n var React = require(\"react\"),\n REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\");\n Symbol.for(\"react.provider\");\n var REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_OFFSCREEN_TYPE = Symbol.for(\"react.offscreen\"),\n MAYBE_ITERATOR_SYMBOL = Symbol.iterator,\n REACT_CLIENT_REFERENCE$2 = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n hasOwnProperty = Object.prototype.hasOwnProperty,\n assign = Object.assign,\n REACT_CLIENT_REFERENCE$1 = Symbol.for(\"react.client.reference\"),\n isArrayImpl = Array.isArray,\n disabledDepth = 0,\n prevLog,\n prevInfo,\n prevWarn,\n prevError,\n prevGroup,\n prevGroupCollapsed,\n prevGroupEnd;\n disabledLog.__reactDisabledLog = !0;\n var prefix,\n suffix,\n reentry = !1;\n var componentFrameCache = new (\n \"function\" === typeof WeakMap ? WeakMap : Map\n )();\n var REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n specialPropKeyWarningShown;\n var didWarnAboutElementRef = {};\n var didWarnAboutKeySpread = {},\n ownerHasKeyUseWarning = {};\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.jsx = function (type, config, maybeKey, source, self) {\n return jsxDEVImpl(type, config, maybeKey, !1, source, self);\n };\n exports.jsxs = function (type, config, maybeKey, source, self) {\n return jsxDEVImpl(type, config, maybeKey, !0, source, self);\n };\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","import type { PropsWithChildren } from 'react';\nimport { StreamFeedsContext } from '../contexts/StreamFeedsContext';\nimport type { StreamFeedsContextProps } from '../contexts/StreamFeedsContext';\n\nexport const StreamFeeds = ({ client, children }: PropsWithChildren<StreamFeedsContextProps>) => {\n return (\n <StreamFeedsContext.Provider value={client}>\n {children}\n </StreamFeedsContext.Provider>\n );\n};\n\nStreamFeeds.displayName = 'StreamFeeds';\n","import type { PropsWithChildren } from 'react';\nimport { StreamFeedContext } from '../contexts/StreamFeedContext';\nimport type { Feed } from '@self';\n\n/**\n * The props for the StreamFeed component. It accepts a `Feed` instance.\n */\nexport type StreamFeedProps = {\n feed: Feed;\n};\n\nexport const StreamFeed = ({\n feed,\n children,\n}: PropsWithChildren<StreamFeedProps>) => {\n return (\n <StreamFeedContext.Provider value={feed}>\n {children}\n </StreamFeedContext.Provider>\n );\n};\n\nStreamFeed.displayName = 'StreamFeed';\n","import type { PropsWithChildren } from 'react';\nimport { StreamSearchContext } from '../contexts/StreamSearchContext';\nimport type { SearchController } from '@self';\n\n/**\n * The props for the StreamSearch component. It accepts a `SearchController` instance.\n */\nexport type StreamSearchProps = {\n searchController: SearchController | undefined;\n};\n\nexport const StreamSearch = ({\n searchController,\n children,\n}: PropsWithChildren<StreamSearchProps>) => {\n return (\n <StreamSearchContext.Provider value={searchController}>\n {children}\n </StreamSearchContext.Provider>\n );\n};\n\nStreamSearch.displayName = 'StreamSearch';\n","import type { PropsWithChildren } from 'react';\nimport { StreamSearchResultsContext } from '../contexts/StreamSearchResultsContext';\nimport type { SearchSource } from '@self';\n\n/**\n * The props for the StreamSearchResults component. It accepts a `SearchSource` instance.\n */\nexport type StreamSearchResultsProps = {\n source: SearchSource;\n};\n\nexport const StreamSearchResults = ({\n source,\n children,\n}: PropsWithChildren<StreamSearchResultsProps>) => {\n return (\n <StreamSearchResultsContext.Provider value={source}>\n {children}\n </StreamSearchResultsContext.Provider>\n );\n};\n\nStreamSearchResults.displayName = 'StreamSearchResults';\n"],"names":["useState","useEffect","shim","shimModule","require$$0","require$$1","noop","selector","useSyncExternalStore","jsxRuntimeModule"],"mappings":";;;;;;;;;;;;;;;;;;AAWA,MAAI,QAAQ;AACZ,WAAS,GAAG,GAAG,GAAG;AAChB,WAAQ,MAAM,MAAM,MAAM,KAAK,IAAI,MAAM,IAAI,MAAQ,MAAM,KAAK,MAAM;AAAA,EACxE;AACA,MAAI,WAAW,eAAe,OAAO,OAAO,KAAK,OAAO,KAAK,IAC3DA,YAAW,MAAM,UACjBC,aAAY,MAAM,WAClB,kBAAkB,MAAM,iBACxB,gBAAgB,MAAM;AACxB,WAAS,uBAAuB,WAAW,aAAa;AACtD,QAAI,QAAQ,YAAW,GACrB,YAAYD,UAAS,EAAE,MAAM,EAAE,OAAc,YAAwB,GAAI,GACzE,OAAO,UAAU,CAAC,EAAE,MACpB,cAAc,UAAU,CAAC;AAC3B;AAAA,MACE,WAAY;AACV,aAAK,QAAQ;AACb,aAAK,cAAc;AACnB,+BAAuB,IAAI,KAAK,YAAY,EAAE,KAAU,CAAE;AAAA,MAChE;AAAA,MACI,CAAC,WAAW,OAAO,WAAW;AAAA;AAEhC,IAAAC;AAAA,MACE,WAAY;AACV,+BAAuB,IAAI,KAAK,YAAY,EAAE,KAAU,CAAE;AAC1D,eAAO,UAAU,WAAY;AAC3B,iCAAuB,IAAI,KAAK,YAAY,EAAE,KAAU,CAAE;AAAA,QAClE,CAAO;AAAA,MACP;AAAA,MACI,CAAC,SAAS;AAAA;AAEZ,kBAAc,KAAK;AACnB,WAAO;AAAA,EACT;AACA,WAAS,uBAAuB,MAAM;AACpC,QAAI,o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,IAAI,aAAa,cAAc;AACzCE,eAAA,UAAiBL,kCAAA;AAAA,EACnB,OAAO;AACLK,eAAA,UAAiBJ,mCAAA;AAAA,EACnB;;;;ACFO,MAAM,cAAc,CAAC,EAAE,QAAQ,eAA2D;AAC/F,+CACG,mBAAmB,UAAnB,EAA4B,OAAO,QACjC,UACH;AAEJ;AAEA,YAAY,cAAc;ACDnB,MAAM,aAAa,CAAC;AAAA,EACzB;AAAA,EACA;AACF,MAA0C;AACxC,+CACG,kBAAkB,UAAlB,EAA2B,OAAO,MAChC,UACH;AAEJ;AAEA,WAAW,cAAc;ACXlB,MAAM,eAAe,CAAC;AAAA,EAC3B;AAAA,EACA;AACF,MAA4C;AAC1C,+CACG,oBAAoB,UAApB,EAA6B,OAAO,kBAClC,UACH;AAEJ;AAEA,aAAa,cAAc;ACXpB,MAAM,sBAAsB,CAAC;AAAA,EAClC;AAAA,EACA;AACF,MAAmD;AACjD,+CACG,2BAA2B,UAA3B,EAAoC,OAAO,QACzC,UACH;AAEJ;AAEA,oBAAoB,cAAc;","x_google_ignoreList":[0,1,2,3,4,28,29,30]}
|
|
1
|
+
{"version":3,"file":"react-bindings.mjs","sources":["../../src/bindings/react/hooks/useCreateFeedsClient.ts","../../src/bindings/react/contexts/StreamFeedsContext.tsx","../../src/bindings/react/hooks/client-state-hooks/useClientConnectedUser.ts","../../src/bindings/react/hooks/client-state-hooks/useWsConnectionState.ts","../../src/bindings/react/contexts/StreamFeedContext.tsx","../../src/bindings/react/hooks/internal/useStableCallback.ts","../../src/bindings/react/hooks/feed-state-hooks/useFeedActivities.ts","../../src/bindings/react/hooks/feed-state-hooks/useComments.ts","../../src/bindings/react/hooks/feed-state-hooks/useOwnCapabilities.ts","../../src/bindings/react/hooks/feed-state-hooks/useFollowers.ts","../../src/bindings/react/hooks/feed-state-hooks/useFollowing.ts","../../src/bindings/react/hooks/feed-state-hooks/useFeedMetadata.ts","../../src/bindings/react/hooks/feed-state-hooks/useOwnFollows.ts","../../src/bindings/react/hooks/feed-state-hooks/useNotificationStatus.ts","../../src/bindings/react/hooks/feed-state-hooks/useAggregatedActivities.ts","../../src/bindings/react/hooks/feed-state-hooks/useIsAggregatedActivityRead.ts","../../src/bindings/react/hooks/feed-state-hooks/useIsAggregatedActivitySeen.ts","../../src/bindings/react/hooks/feed-state-hooks/useActivityComments.ts","../../src/bindings/react/contexts/StreamSearchResultsContext.tsx","../../src/bindings/react/hooks/search-state-hooks/useSearchResult.ts","../../src/bindings/react/contexts/StreamSearchContext.tsx","../../src/bindings/react/hooks/search-state-hooks/useSearchQuery.ts","../../src/bindings/react/hooks/search-state-hooks/useSearchSources.ts","../../src/bindings/react/wrappers/StreamFeeds.tsx","../../src/bindings/react/wrappers/StreamFeed.tsx","../../src/bindings/react/wrappers/StreamSearch.tsx","../../src/bindings/react/wrappers/StreamSearchResults.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nimport { FeedsClient } from '../../../feeds-client';\nimport type { TokenOrProvider } from '../../../types';\nimport type { UserRequest } from '../../../gen/models';\nimport type { FeedsClientOptions } from '../../../common/types';\n\n/**\n * A React hook to create, connect and return an instance of `FeedsClient`.\n */\nexport const useCreateFeedsClient = ({\n apiKey,\n tokenOrProvider,\n userData,\n options,\n}: {\n apiKey: string;\n tokenOrProvider: TokenOrProvider;\n userData: UserRequest;\n options?: FeedsClientOptions;\n}) => {\n const [client, setClient] = useState<FeedsClient | null>(\n () => new FeedsClient(apiKey, options),\n );\n const [error, setError] = useState<Error | null>(null);\n const [cachedUserData, setCachedUserData] = useState(userData);\n\n const [cachedOptions] = useState(options);\n\n if (error) {\n throw error;\n }\n\n if (userData.id !== cachedUserData.id) {\n setCachedUserData(userData);\n }\n\n useEffect(() => {\n const _client = new FeedsClient(apiKey, cachedOptions);\n\n const connectionPromise = _client\n .connectUser(cachedUserData, tokenOrProvider)\n .then(() => {\n setError(null);\n })\n .catch((err) => {\n setError(err);\n });\n\n setClient(_client);\n\n return () => {\n setClient(null);\n connectionPromise\n .then(() => {\n setError(null);\n return _client.disconnectUser();\n })\n .catch((err) => {\n setError(err);\n });\n };\n }, [apiKey, cachedUserData, cachedOptions, tokenOrProvider]);\n\n return client;\n};\n","import { createContext, useContext } from 'react';\n\nimport type { FeedsClient } from '../../../feeds-client';\n\nexport const StreamFeedsContext = createContext<FeedsClient | undefined>(undefined);\n\n/**\n * The props for the StreamFeedsProvider component.\n */\nexport type StreamFeedsContextProps = {\n /**\n * The client instance to provide to the component tree.\n */\n client: FeedsClient;\n};\n\n/**\n * Hook to access the nearest FeedsClient instance.\n */\nexport const useFeedsClient = () => {\n return useContext(StreamFeedsContext);\n};\n","import { useStateStore } from '@stream-io/state-store/react-bindings';\n\nimport { useFeedsClient } from '../../contexts/StreamFeedsContext';\nimport type { FeedsClientState } from '../../../../feeds-client';\n\n/**\n * A React hook that returns the currently connected user on a `FeedsClient` instance and null otherwise.\n */\nexport const useClientConnectedUser = () => {\n const client = useFeedsClient();\n\n const { user } = useStateStore(client?.state, selector) ?? {};\n\n return user;\n};\n\nconst selector = (nextState: FeedsClientState) => ({\n user: nextState.connected_user,\n});\n","import { useStateStore } from '@stream-io/state-store/react-bindings';\n\nimport { useFeedsClient } from '../../contexts/StreamFeedsContext';\nimport type { FeedsClientState } from '../../../../feeds-client';\n\n/**\n * A React hook that returns the websocket connection state of `FeedsClient`.\n */\nexport const useWsConnectionState = () => {\n const client = useFeedsClient();\n\n const { is_healthy } = useStateStore(client?.state, selector) ?? {}\n\n return { is_healthy };\n};\n\nconst selector = (nextState: FeedsClientState) => ({\n is_healthy: nextState.is_ws_connection_healthy,\n});\n","import { createContext, useContext } from 'react';\n\nimport type { Feed } from '../../../feed';\n\nexport const StreamFeedContext = createContext<Feed | undefined>(undefined);\n\n/**\n * The props for the StreamFeedProvider component.\n */\nexport type StreamFeedContextProps = {\n feed: Feed;\n};\n\n/**\n * Hook to access the nearest Feed instance.\n */\nexport const useFeedContext = () => {\n return useContext(StreamFeedContext);\n};\n","import { useCallback, useRef } from 'react';\n\nexport type StableCallback<A extends unknown[], R> = (...args: A) => R;\n\n/**\n * A utility hook implementing a stable callback. It takes in an unstable method that\n * is supposed to be invoked somewhere deeper in the DOM tree without making it\n * change its reference every time the parent component rerenders. It will also return\n * the value of the callback if it does return one.\n * A common use-case would be having a function whose invocation depends on state\n * somewhere high up in the DOM tree and wanting to use the same function deeper\n * down, for example in a leaf node and simply using useCallback results in\n * cascading dependency hell. If we wrap it in useStableCallback, we would be able\n * to:\n * - Use the same function as a dependency of another hook (since it is stable)\n * - Still invoke it and get the latest state\n *\n * **Caveats:**\n * - Never wrap a function that is supposed to return a React.ReactElement in\n * useStableCallback, since React will not know that the DOM needs to be updated\n * whenever the callback value changes (for example, renderItem from FlatList must\n * never be wrapped in this hook)\n * - Always prefer using a standard useCallback/stable function wherever possible\n * (the purpose of useStableCallback is to bridge the gap between top level contexts\n * and cascading rereders in downstream components - **not** as an escape hatch)\n * @param callback - the callback we want to stabilize\n */\nexport const useStableCallback = <A extends unknown[], R>(\n callback: StableCallback<A, R>,\n): StableCallback<A, R> => {\n const ref = useRef(callback);\n ref.current = callback;\n\n return useCallback<StableCallback<A, R>>((...args) => {\n return ref.current(...args);\n }, []);\n};\n","import { useMemo } from 'react';\nimport { useStateStore } from '@stream-io/state-store/react-bindings';\n\nimport { useFeedContext } from '../../contexts/StreamFeedContext';\nimport { useStableCallback } from '../internal';\nimport type { Feed, FeedState } from '../../../../feed';\n\n/**\n * A React hook that returns a reactive object containing the current activities,\n * loading state and whether there is a next page to paginate to or not.\n */\nexport const useFeedActivities = (feedFromProps?: Feed) => {\n const feedFromContext = useFeedContext();\n const feed = feedFromProps ?? feedFromContext;\n\n const data = useStateStore(feed?.state, selector);\n\n const loadNextPage = useStableCallback(async () => {\n if (!feed || !data?.has_next_page || data?.is_loading) {\n return;\n }\n\n await feed.getNextPage();\n });\n\n return useMemo(() => ({ ...data, loadNextPage }), [data, loadNextPage]);\n};\n\nconst selector = ({\n is_loading_activities,\n next,\n activities = [],\n}: FeedState) => ({\n is_loading: is_loading_activities,\n has_next_page: typeof next !== 'undefined',\n activities,\n});\n","import { useCallback, useMemo } from 'react';\nimport { useStateStore } from '@stream-io/state-store/react-bindings';\n\nimport { useFeedContext } from '../../contexts/StreamFeedContext';\nimport { checkHasAnotherPage, isCommentResponse } from '../../../../utils';\nimport type { ActivityResponse, CommentResponse } from '../../../../gen/models';\nimport type { Feed, FeedState } from '../../../../feed';\nimport type { CommentParent } from '../../../../types';\n\ntype UseCommentsReturnType<T extends ActivityResponse | CommentResponse> = {\n comments: NonNullable<\n FeedState['comments_by_entity_id'][T['id']]\n >['comments'];\n comments_pagination: NonNullable<\n FeedState['comments_by_entity_id'][T['id']]\n >['pagination'];\n has_next_page: boolean;\n is_loading_next_page: boolean;\n loadNextPage: (\n request?: T extends CommentResponse\n ? Parameters<Feed['loadNextPageCommentReplies']>[1]\n : Parameters<Feed['loadNextPageActivityComments']>[1],\n ) => Promise<void>;\n};\n\n/**\n * @deprecated Use `useActivityComments` instead.\n * @param\n */\nexport function useComments<T extends CommentParent>(_: {\n feed: Feed;\n parent: T;\n}): UseCommentsReturnType<T>;\nexport function useComments<T extends CommentParent>(_: {\n feed?: Feed;\n parent: T;\n}): UseCommentsReturnType<T> | undefined;\nexport function useComments<T extends CommentParent>({\n feed: feedFromProps,\n parent,\n}: {\n feed?: Feed;\n /**\n * The parent (activity or comment) for which to fetch comments.\n */\n parent: T;\n}) {\n const feedFromContext = useFeedContext();\n const feed = feedFromProps ?? feedFromContext;\n\n const selector = useCallback(\n (state: FeedState) => ({\n comments: state.comments_by_entity_id?.[parent.id]?.comments,\n comments_pagination: state.comments_by_entity_id?.[parent.id]?.pagination,\n }),\n [parent.id],\n );\n\n const data = useStateStore(feed?.state, selector);\n\n const loadNextPage = useMemo<\n UseCommentsReturnType<T>['loadNextPage'] | undefined\n >(() => {\n if (!feed) return undefined;\n\n return (request) => {\n if (isCommentResponse(parent)) {\n return feed.loadNextPageCommentReplies(parent, request);\n } else {\n return feed.loadNextPageActivityComments(parent, request);\n }\n };\n }, [feed, parent]);\n\n return useMemo(() => {\n if (!data) {\n return undefined;\n }\n\n return {\n ...data,\n has_next_page: checkHasAnotherPage(\n data.comments,\n data.comments_pagination?.next,\n ),\n is_loading_next_page:\n data?.comments_pagination?.loading_next_page ?? false,\n loadNextPage,\n };\n }, [data, loadNextPage]);\n}\n","import { useCallback } from 'react';\nimport { useStateStore } from '@stream-io/state-store/react-bindings';\n\nimport { useFeedContext } from '../../contexts/StreamFeedContext';\nimport { useFeedsClient } from '../../contexts/StreamFeedsContext';\nimport type { Feed } from '../../../../feed';\nimport type { FeedOwnCapability } from '../../../../gen/models';\nimport type { FeedsClientState } from '../../../../feeds-client';\n\nconst stableEmptyArray: readonly FeedOwnCapability[] = [];\n\nexport const useOwnCapabilities = (feedFromProps?: Feed | string) => {\n const client = useFeedsClient();\n const feedFromContext = useFeedContext();\n const feed = feedFromProps ?? feedFromContext;\n const fid = typeof feed === 'string' ? feed : feed?.feed;\n\n const selector = useCallback(\n (currentState: FeedsClientState) => {\n if (!fid) {\n return { feedOwnCapabilities: stableEmptyArray };\n }\n\n return {\n feedOwnCapabilities:\n currentState.own_capabilities_by_fid[fid] ?? stableEmptyArray,\n };\n },\n [fid],\n );\n\n const { feedOwnCapabilities = stableEmptyArray } =\n useStateStore(client?.state, selector) ?? {};\n\n // console.log('GETTING CAPA: ', feed?.feed, feedOwnCapabilities);\n\n return feedOwnCapabilities;\n};\n","import { useCallback, useMemo } from 'react';\nimport { useStateStore } from '@stream-io/state-store/react-bindings';\nimport { useFeedContext } from '../../contexts/StreamFeedContext';\nimport type { Feed, FeedState } from '../../../../feed';\nimport { checkHasAnotherPage } from '../../../../utils';\n\nconst selector = ({\n follower_count,\n followers,\n followers_pagination,\n}: FeedState) => ({\n follower_count,\n followers,\n followers_pagination,\n});\n\ntype UseFollowersReturnType = ReturnType<typeof selector> & {\n is_loading_next_page: boolean;\n has_next_page: boolean;\n loadNextPage: (\n ...options: Parameters<Feed['loadNextPageFollowers']>\n ) => Promise<void>;\n};\n\nexport function useFollowers(feed: Feed): UseFollowersReturnType;\nexport function useFollowers(feed?: Feed): UseFollowersReturnType | undefined;\nexport function useFollowers(feedFromProps?: Feed) {\n const feedFromContext = useFeedContext();\n const feed = feedFromProps ?? feedFromContext;\n\n const data = useStateStore(feed?.state, selector);\n\n const loadNextPage = useCallback(\n (...options: Parameters<Feed['loadNextPageFollowers']>) =>\n feed?.loadNextPageFollowers(...options),\n [feed],\n );\n\n return useMemo(() => {\n if (!data) {\n return undefined;\n }\n\n return {\n ...data,\n is_loading_next_page:\n data.followers_pagination?.loading_next_page ?? false,\n has_next_page: checkHasAnotherPage(\n data.followers,\n data.followers_pagination?.next,\n ),\n loadNextPage,\n };\n }, [data, loadNextPage]);\n}\n","import { useCallback, useMemo } from 'react';\nimport { useStateStore } from '@stream-io/state-store/react-bindings';\n\nimport { useFeedContext } from '../../contexts/StreamFeedContext';\nimport { checkHasAnotherPage } from '../../../../utils';\nimport type { Feed, FeedState } from '../../../../feed';\n\nconst selector = ({\n following_count,\n following,\n following_pagination,\n}: FeedState) => ({\n following_count,\n following,\n following_pagination,\n});\n\ntype UseFollowingReturnType = ReturnType<typeof selector> & {\n is_loading_next_page: boolean;\n has_next_page: boolean;\n loadNextPage: (\n ...options: Parameters<Feed['loadNextPageFollowers']>\n ) => Promise<void>;\n};\n\nexport function useFollowing(feed: Feed): UseFollowingReturnType;\nexport function useFollowing(feed?: Feed): UseFollowingReturnType | undefined;\nexport function useFollowing(feedFromProps?: Feed) {\n const feedFromContext = useFeedContext();\n const feed = feedFromProps ?? feedFromContext;\n\n const data = useStateStore(feed?.state, selector);\n\n const loadNextPage = useCallback(\n (...options: Parameters<Feed['loadNextPageFollowing']>) =>\n feed?.loadNextPageFollowing(...options),\n [feed],\n );\n\n return useMemo(() => {\n if (!data) {\n return undefined;\n }\n\n return {\n ...data,\n is_loading_next_page:\n data.following_pagination?.loading_next_page ?? false,\n has_next_page: checkHasAnotherPage(\n data.following,\n data.following_pagination?.next,\n ),\n loadNextPage,\n };\n }, [data, loadNextPage]);\n}\n","import { useStateStore } from '@stream-io/state-store/react-bindings';\n\nimport { useFeedContext } from '../../contexts/StreamFeedContext';\nimport type { Feed, FeedState } from '../../../../feed';\n\n/**\n * A React hook that returns a reactive object containing some often used\n * metadata for a feed.\n */\nexport const useFeedMetadata = (feedFromProps?: Feed) => {\n const feedFromContext = useFeedContext();\n const feed = feedFromProps ?? feedFromContext;\n\n return useStateStore(feed?.state, selector);\n};\n\nconst selector = ({\n follower_count = 0,\n following_count = 0,\n created_by,\n created_at,\n updated_at,\n}: FeedState) => ({\n created_by,\n follower_count,\n following_count,\n created_at,\n updated_at,\n});\n","import { useStateStore } from '@stream-io/state-store/react-bindings';\n\nimport { useFeedContext } from '../../contexts/StreamFeedContext';\nimport type { Feed, FeedState } from '../../../../feed';\n\n/**\n * A React hook that returns a reactive array of feeds that the current user\n * owns and are following the respective feed that we are observing.\n */\nexport const useOwnFollows = (feedFromProps?: Feed) => {\n const feedFromContext = useFeedContext();\n const feed = feedFromProps ?? feedFromContext;\n\n return useStateStore(feed?.state, selector);\n};\n\nconst selector = ({ own_follows }: FeedState) => ({\n own_follows,\n});\n","import { useStateStore } from '@stream-io/state-store/react-bindings';\n\nimport { useFeedContext } from '../../contexts/StreamFeedContext';\nimport type { Feed, FeedState } from '../../../../feed';\nimport type { NotificationStatusResponse } from '../../../../gen/models';\n\nconst selector = ({ notification_status }: FeedState) =>\n ({\n unread: notification_status?.unread ?? 0,\n unseen: notification_status?.unseen ?? 0,\n last_read_at: notification_status?.last_read_at,\n last_seen_at: notification_status?.last_seen_at,\n read_activities: notification_status?.read_activities,\n seen_activities: notification_status?.seen_activities,\n }) satisfies NotificationStatusResponse;\n\ntype UseNotificationStatusReturnType = ReturnType<typeof selector>;\n\nexport function useNotificationStatus(\n feed: Feed,\n): UseNotificationStatusReturnType;\nexport function useNotificationStatus(\n feed?: Feed,\n): UseNotificationStatusReturnType | undefined;\nexport function useNotificationStatus(feedFromProps?: Feed) {\n const feedFromContext = useFeedContext();\n const feed = feedFromProps ?? feedFromContext;\n\n return useStateStore(feed?.state, selector);\n}\n","import { useMemo } from 'react';\nimport { useStateStore } from '@stream-io/state-store/react-bindings';\n\nimport { useFeedContext } from '../../contexts/StreamFeedContext';\nimport { useStableCallback } from '../internal';\nimport type { Feed, FeedState } from '../../../../feed';\n\nconst selector = ({\n is_loading_activities,\n next,\n aggregated_activities = [],\n}: FeedState) => ({\n is_loading: is_loading_activities,\n has_next_page: typeof next !== 'undefined',\n aggregated_activities,\n});\n\ntype UseAggregatedActivitiesReturnType = ReturnType<typeof selector> & {\n loadNextPage: () => Promise<void>;\n};\n\n/**\n * A React hook that returns a reactive object containing the current aggregated activities,\n * loading state and whether there is a next page to paginate to or not.\n */\nexport function useAggregatedActivities(\n feedFromProps: Feed,\n): UseAggregatedActivitiesReturnType;\nexport function useAggregatedActivities(\n feedFromProps?: Feed,\n): UseAggregatedActivitiesReturnType | undefined;\nexport function useAggregatedActivities(feedFromProps?: Feed) {\n const feedFromContext = useFeedContext();\n const feed = feedFromProps ?? feedFromContext;\n\n const data = useStateStore(feed?.state, selector);\n\n const loadNextPage = useStableCallback(async () => {\n if (!feed || !data?.has_next_page || data?.is_loading) {\n return;\n }\n\n await feed.getNextPage();\n });\n\n return useMemo(\n () => (data ? { ...data, loadNextPage } : undefined),\n [data, loadNextPage],\n );\n}\n","import { useMemo } from 'react';\n\nimport { useFeedContext } from '../../contexts/StreamFeedContext';\nimport { useNotificationStatus } from './useNotificationStatus';\nimport type { Feed } from '../../../../feed';\nimport type { AggregatedActivityResponse } from '../../../../gen/models';\n\nexport const useIsAggregatedActivityRead = ({\n feed: feedFromProps,\n aggregatedActivity,\n}: {\n feed?: Feed;\n aggregatedActivity: AggregatedActivityResponse;\n}) => {\n const feedFromContext = useFeedContext();\n const feed = feedFromProps ?? feedFromContext;\n\n const { read_activities: readActivities, last_read_at: lastReadAt } =\n useNotificationStatus(feed) ?? {};\n\n const group = aggregatedActivity.group;\n\n return useMemo(\n () =>\n (lastReadAt &&\n aggregatedActivity.updated_at.getTime() <= lastReadAt.getTime()) ||\n (readActivities ?? []).includes(group),\n [lastReadAt, aggregatedActivity.updated_at, readActivities, group],\n );\n};\n","import { useMemo } from 'react';\n\nimport { useFeedContext } from '../../contexts/StreamFeedContext';\nimport { useNotificationStatus } from './useNotificationStatus';\nimport type { Feed } from '../../../../feed';\nimport type { AggregatedActivityResponse } from '../../../../gen/models';\n\nexport const useIsAggregatedActivitySeen = ({\n feed: feedFromProps,\n aggregatedActivity,\n}: {\n feed?: Feed;\n aggregatedActivity: AggregatedActivityResponse;\n}) => {\n const feedFromContext = useFeedContext();\n const feed = feedFromProps ?? feedFromContext;\n\n const { seen_activities: seenActivities, last_seen_at: lastSeenAt } =\n useNotificationStatus(feed) ?? {};\n\n const group = aggregatedActivity.group;\n\n return useMemo(\n () =>\n (lastSeenAt &&\n aggregatedActivity.updated_at.getTime() < lastSeenAt.getTime()) ||\n (seenActivities ?? []).includes(group),\n [lastSeenAt, aggregatedActivity.updated_at, seenActivities, group],\n );\n};\n","import { useCallback, useMemo } from 'react';\nimport { useStateStore } from '@stream-io/state-store/react-bindings';\nimport type { StateStore } from '@stream-io/state-store';\n\nimport { useFeedContext } from '../../contexts/StreamFeedContext';\nimport { checkHasAnotherPage } from '../../../../utils';\nimport type { Feed, FeedState } from '../../../../feed';\nimport type { ActivityState, ActivityWithStateUpdates } from '../../../../activity-with-state-updates/activity-with-state-updates';\nimport type { ActivityResponse, CommentResponse } from '../../../../gen/models';\n\nconst canLoadComments = (\n feedOrActivity: Feed | ActivityResponse | ActivityWithStateUpdates,\n): feedOrActivity is ActivityWithStateUpdates | Feed => {\n return (\n 'loadNextPageCommentReplies' in feedOrActivity &&\n 'loadNextPageActivityComments' in feedOrActivity\n );\n};\n\ntype UseCommentsReturnType<T extends ActivityResponse | CommentResponse> = {\n comments: NonNullable<\n FeedState['comments_by_entity_id'][T['id']]\n >['comments'];\n comments_pagination: NonNullable<\n FeedState['comments_by_entity_id'][T['id']]\n >['pagination'];\n has_next_page: boolean;\n is_loading_next_page: boolean;\n loadNextPage: (\n request?: T extends CommentResponse\n ? Parameters<Feed['loadNextPageCommentReplies']>[1]\n : Parameters<Feed['loadNextPageActivityComments']>[1],\n ) => Promise<void>;\n};\n\nexport function useActivityComments({\n feed: feedFromProps,\n parentComment,\n activity,\n}: {\n feed?: Feed;\n parentComment?: CommentResponse;\n activity?: ActivityResponse | ActivityWithStateUpdates;\n}) {\n const feedFromContext = useFeedContext();\n const feed = feedFromProps ?? feedFromContext;\n const feedOrActivity = feed ?? activity;\n\n if (!feedOrActivity) {\n throw new Error('Feed or activity is required');\n }\n\n if (!canLoadComments(feedOrActivity)) {\n throw new Error('Feed or activity does not support loading comments');\n }\n\n if (!(activity || parentComment)) {\n throw new Error('Activity or parent comment is required');\n }\n\n const entityId = parentComment?.id ?? activity?.id ?? '';\n const selector = useCallback(\n (state: FeedState | ActivityState) => ({\n comments: state.comments_by_entity_id?.[entityId]?.comments,\n comments_pagination: state.comments_by_entity_id?.[entityId]?.pagination,\n }),\n [entityId],\n );\n\n const data = useStateStore(\n feedOrActivity.state as StateStore<FeedState | ActivityState>,\n selector,\n );\n\n const loadNextPage = useCallback<\n UseCommentsReturnType<ActivityResponse | CommentResponse>['loadNextPage']\n >(\n (request) => {\n if (parentComment) {\n return feedOrActivity.loadNextPageCommentReplies(\n parentComment,\n request,\n );\n } else {\n if (activity && canLoadComments(activity)) {\n return activity.loadNextPageActivityComments(request);\n } else if (feed) {\n return feed.loadNextPageActivityComments(activity?.id ?? '', request);\n } else {\n throw new Error('Activity or feed is required');\n }\n }\n },\n [feedOrActivity, feed, parentComment, activity],\n );\n\n return useMemo(() => {\n return {\n ...data,\n has_next_page: checkHasAnotherPage(\n data.comments,\n data.comments_pagination?.next,\n ),\n is_loading_next_page:\n data?.comments_pagination?.loading_next_page ?? false,\n loadNextPage,\n };\n }, [data, loadNextPage]);\n}\n","import { createContext, useContext } from 'react';\n\nimport type { SearchSource } from '../../../common/search';\n\nexport const StreamSearchResultsContext = createContext<\n SearchSource | undefined\n>(undefined);\n\n/**\n * The props for the StreamSearchResultsProvider component.\n */\nexport type StreamSearchResultsContextProps = {\n source: SearchSource;\n};\n\n/**\n * Hook to access the nearest SearchSource instance.\n */\nexport const useSearchResultsContext = () => {\n return useContext(StreamSearchResultsContext);\n};\n","import { useMemo } from 'react';\nimport { useStateStore } from '@stream-io/state-store/react-bindings';\n\nimport { useSearchResultsContext } from '../../contexts/StreamSearchResultsContext';\nimport { useStableCallback } from '../internal';\nimport type { SearchSourceState } from '../../../../common/types';\nimport type { SearchSource } from '../../../../common/search';\n\nexport const useSearchResult = (sourceFromProps?: SearchSource) => {\n const sourceFromContext = useSearchResultsContext();\n const source = sourceFromProps ?? sourceFromContext;\n\n const { items, error, isLoading, hasNext } =\n useStateStore(source?.state, selector) ?? {};\n\n const loadMore = useStableCallback(async () => {\n if (hasNext) {\n source?.search();\n }\n });\n\n return useMemo(\n () => ({ items, error, isLoading, hasNext, loadMore }),\n [error, hasNext, isLoading, items, loadMore],\n );\n};\n\nconst selector = ({\n items,\n isLoading,\n hasNext,\n lastQueryError,\n}: SearchSourceState) => ({\n items,\n isLoading,\n hasNext,\n error: lastQueryError,\n});\n","import { createContext, useContext } from 'react';\n\nimport type { SearchController } from '../../../common/search';\n\nexport const StreamSearchContext = createContext<SearchController | undefined>(undefined);\n\n/**\n * The props for the StreamSearchProvider component.\n */\nexport type StreamSearchContextProps = {\n searchController: SearchController;\n};\n\n/**\n * Hook to access the nearest SearchController instance.\n */\nexport const useSearchContext = () => {\n return useContext(StreamSearchContext);\n};\n","import { useStateStore } from '@stream-io/state-store/react-bindings';\n\nimport type {\n SearchController,\n SearchControllerState,\n} from '../../../../common/search';\nimport { useSearchContext } from '../../contexts/StreamSearchContext';\n\nexport const useSearchQuery = (controllerFromProps?: SearchController) => {\n const controllerFromState = useSearchContext();\n const controller = controllerFromProps ?? controllerFromState;\n\n return useStateStore(controller?.state, selector);\n};\n\nconst selector = ({ searchQuery }: SearchControllerState) => ({\n searchQuery,\n});\n","import { useStateStore } from '@stream-io/state-store/react-bindings';\n\nimport { useSearchContext } from '../../contexts/StreamSearchContext';\nimport type { SearchController, SearchControllerState } from '../../../../common/search';\n\nexport const useSearchSources = (controllerFromProps?: SearchController) => {\n const controllerFromState = useSearchContext();\n const controller = controllerFromProps ?? controllerFromState;\n\n return useStateStore(controller?.state, selector);\n};\n\nconst selector = ({ sources }: SearchControllerState) => ({\n sources,\n});\n","import type { PropsWithChildren } from 'react';\nimport { StreamFeedsContext } from '../contexts/StreamFeedsContext';\nimport type { StreamFeedsContextProps } from '../contexts/StreamFeedsContext';\n\nexport const StreamFeeds = ({ client, children }: PropsWithChildren<StreamFeedsContextProps>) => {\n return (\n <StreamFeedsContext.Provider value={client}>\n {children}\n </StreamFeedsContext.Provider>\n );\n};\n\nStreamFeeds.displayName = 'StreamFeeds';\n","import type { PropsWithChildren } from 'react';\n\nimport { StreamFeedContext } from '../contexts/StreamFeedContext';\nimport type { Feed } from '../../../feed';\n\n/**\n * The props for the StreamFeed component. It accepts a `Feed` instance.\n */\nexport type StreamFeedProps = {\n feed: Feed;\n};\n\nexport const StreamFeed = ({\n feed,\n children,\n}: PropsWithChildren<StreamFeedProps>) => {\n return (\n <StreamFeedContext.Provider value={feed}>\n {children}\n </StreamFeedContext.Provider>\n );\n};\n\nStreamFeed.displayName = 'StreamFeed';\n","import type { PropsWithChildren } from 'react';\n\nimport { StreamSearchContext } from '../contexts/StreamSearchContext';\nimport type { SearchController } from '../../../common/search';\n\n/**\n * The props for the StreamSearch component. It accepts a `SearchController` instance.\n */\nexport type StreamSearchProps = {\n searchController: SearchController | undefined;\n};\n\nexport const StreamSearch = ({\n searchController,\n children,\n}: PropsWithChildren<StreamSearchProps>) => {\n return (\n <StreamSearchContext.Provider value={searchController}>\n {children}\n </StreamSearchContext.Provider>\n );\n};\n\nStreamSearch.displayName = 'StreamSearch';\n","import type { PropsWithChildren } from 'react';\n\nimport { StreamSearchResultsContext } from '../contexts/StreamSearchResultsContext';\nimport type { SearchSource } from '../../../common/search';\n\n/**\n * The props for the StreamSearchResults component. It accepts a `SearchSource` instance.\n */\nexport type StreamSearchResultsProps = {\n source: SearchSource;\n};\n\nexport const StreamSearchResults = ({\n source,\n children,\n}: PropsWithChildren<StreamSearchResultsProps>) => {\n return (\n <StreamSearchResultsContext.Provider value={source}>\n {children}\n </StreamSearchResultsContext.Provider>\n );\n};\n\nStreamSearchResults.displayName = 'StreamSearchResults';\n"],"names":["selector"],"mappings":";;;;;AAUO,MAAM,uBAAuB,CAAC;AAAA,EACnC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAKM;AACJ,QAAM,CAAC,QAAQ,SAAS,IAAI;AAAA,IAC1B,MAAM,IAAI,YAAY,QAAQ,OAAO;AAAA,EAAA;AAEvC,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAuB,IAAI;AACrD,QAAM,CAAC,gBAAgB,iBAAiB,IAAI,SAAS,QAAQ;AAE7D,QAAM,CAAC,aAAa,IAAI,SAAS,OAAO;AAExC,MAAI,OAAO;AACT,UAAM;AAAA,EACR;AAEA,MAAI,SAAS,OAAO,eAAe,IAAI;AACrC,sBAAkB,QAAQ;AAAA,EAC5B;AAEA,YAAU,MAAM;AACd,UAAM,UAAU,IAAI,YAAY,QAAQ,aAAa;AAErD,UAAM,oBAAoB,QACvB,YAAY,gBAAgB,eAAe,EAC3C,KAAK,MAAM;AACV,eAAS,IAAI;AAAA,IACf,CAAC,EACA,MAAM,CAAC,QAAQ;AACd,eAAS,GAAG;AAAA,IACd,CAAC;AAEH,cAAU,OAAO;AAEjB,WAAO,MAAM;AACX,gBAAU,IAAI;AACd,wBACG,KAAK,MAAM;AACV,iBAAS,IAAI;AACb,eAAO,QAAQ,eAAA;AAAA,MACjB,CAAC,EACA,MAAM,CAAC,QAAQ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BAA0C;AAAA,EAC5D;AACF;ACZO,MAAM,mBAAmB,CAAC,wBAA2C;AAC1E,QAAM,sBAAsB,iBAAA;AAC5B,QAAM,aAAa,uBAAuB;AAE1C,SAAO,cAAc,YAAY,OAAO,QAAQ;AAClD;AAEA,MAAM,WAAW,CAAC,EAAE,eAAsC;AAAA,EACxD;AACF;ACVO,MAAM,cAAc,CAAC,EAAE,QAAQ,eAA2D;AAC/F,6BACG,mBAAmB,UAAnB,EAA4B,OAAO,QACjC,UACH;AAEJ;AAEA,YAAY,cAAc;ACAnB,MAAM,aAAa,CAAC;AAAA,EACzB;AAAA,EACA;AACF,MAA0C;AACxC,6BACG,kBAAkB,UAAlB,EAA2B,OAAO,MAChC,UACH;AAEJ;AAEA,WAAW,cAAc;ACXlB,MAAM,eAAe,CAAC;AAAA,EAC3B;AAAA,EACA;AACF,MAA4C;AAC1C,6BACG,oBAAoB,UAApB,EAA6B,OAAO,kBAClC,UACH;AAEJ;AAEA,aAAa,cAAc;ACXpB,MAAM,sBAAsB,CAAC;AAAA,EAClC;AAAA,EACA;AACF,MAAmD;AACjD,6BACG,2BAA2B,UAA3B,EAAoC,OAAO,QACzC,UACH;AAEJ;AAEA,oBAAoB,cAAc;"}
|
|
@@ -3918,7 +3918,7 @@ const getRateLimitFromResponseHeader = (response_headers) => {
|
|
|
3918
3918
|
};
|
|
3919
3919
|
return result;
|
|
3920
3920
|
};
|
|
3921
|
-
const version = "0.3.
|
|
3921
|
+
const version = "0.3.27";
|
|
3922
3922
|
const axios = axiosImport.default ?? axiosImport;
|
|
3923
3923
|
class ApiClient {
|
|
3924
3924
|
constructor(apiKey, tokenManager, connectionIdManager, options) {
|
|
@@ -7116,7 +7116,7 @@ class ActivityWithStateUpdates {
|
|
|
7116
7116
|
initialState
|
|
7117
7117
|
}) {
|
|
7118
7118
|
this.feed = connectActivityToFeed.call(this.feedsClient, { fid });
|
|
7119
|
-
this.feed
|
|
7119
|
+
this.feed?.state.partialNext({
|
|
7120
7120
|
activities: [initialState]
|
|
7121
7121
|
});
|
|
7122
7122
|
}
|
|
@@ -7275,16 +7275,15 @@ class FeedsClient extends FeedsApi {
|
|
|
7275
7275
|
};
|
|
7276
7276
|
this.uploadFile = (request) => {
|
|
7277
7277
|
return super.uploadFile({
|
|
7278
|
-
|
|
7279
|
-
file: request.file
|
|
7278
|
+
file: request?.file
|
|
7280
7279
|
});
|
|
7281
7280
|
};
|
|
7282
7281
|
this.uploadImage = (request) => {
|
|
7283
7282
|
return super.uploadImage({
|
|
7284
|
-
|
|
7285
|
-
|
|
7286
|
-
|
|
7287
|
-
|
|
7283
|
+
file: request?.file,
|
|
7284
|
+
upload_sizes: JSON.stringify(
|
|
7285
|
+
request?.upload_sizes
|
|
7286
|
+
)
|
|
7288
7287
|
});
|
|
7289
7288
|
};
|
|
7290
7289
|
this.updateActivity = async (request) => {
|
|
@@ -7855,4 +7854,4 @@ export {
|
|
|
7855
7854
|
shouldUpdateState as s,
|
|
7856
7855
|
uniqueArrayMerge as u
|
|
7857
7856
|
};
|
|
7858
|
-
//# sourceMappingURL=feeds-client-
|
|
7857
|
+
//# sourceMappingURL=feeds-client-Db36zlJs.mjs.map
|