@stream-io/feeds-client 0.2.21 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/react-bindings.js +1 -57
- package/dist/cjs/react-bindings.js.map +1 -1
- package/dist/es/index.mjs +2 -2
- package/dist/es/react-bindings.mjs +1 -57
- package/dist/es/react-bindings.mjs.map +1 -1
- package/dist/{feeds-client--EbdwYrY.js → feeds-client-DmA8dntK.js} +2 -2
- package/dist/{feeds-client--EbdwYrY.js.map → feeds-client-DmA8dntK.js.map} +1 -1
- package/dist/{feeds-client-5nGcdeuG.mjs → feeds-client-DuLOUu6_.mjs} +2 -2
- package/dist/{feeds-client-5nGcdeuG.mjs.map → feeds-client-DuLOUu6_.mjs.map} +1 -1
- package/dist/types/bindings/react/index.d.ts +0 -1
- package/dist/types/bindings/react/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/bindings/react/index.ts +0 -1
- package/dist/types/bindings/react/hooks/util/index.d.ts +0 -3
- package/dist/types/bindings/react/hooks/util/index.d.ts.map +0 -1
- package/dist/types/bindings/react/hooks/util/useBookmarkActions.d.ts +0 -14
- package/dist/types/bindings/react/hooks/util/useBookmarkActions.d.ts.map +0 -1
- package/dist/types/bindings/react/hooks/util/useReactionActions.d.ts +0 -18
- package/dist/types/bindings/react/hooks/util/useReactionActions.d.ts.map +0 -1
- package/src/bindings/react/hooks/util/index.ts +0 -2
- package/src/bindings/react/hooks/util/useBookmarkActions.ts +0 -40
- package/src/bindings/react/hooks/util/useReactionActions.ts +0 -57
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [0.3.0](https://github.com/GetStream/stream-feeds-js/compare/@stream-io/feeds-client-0.2.21...@stream-io/feeds-client-0.3.0) (2025-10-22)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### ⚠ BREAKING CHANGES
|
|
9
|
+
|
|
10
|
+
* remove unstable util hooks (#146)
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* remove unstable util hooks ([#146](https://github.com/GetStream/stream-feeds-js/issues/146)) ([ac2f6b2](https://github.com/GetStream/stream-feeds-js/commit/ac2f6b26887286695f1c6a31a5616ef4fc0166e0))
|
|
15
|
+
|
|
5
16
|
## [0.2.21](https://github.com/GetStream/stream-feeds-js/compare/@stream-io/feeds-client-0.2.20...@stream-io/feeds-client-0.2.21) (2025-10-22)
|
|
6
17
|
|
|
7
18
|
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const stateStore = require("@stream-io/state-store");
|
|
4
|
-
const feedsClient = require("../feeds-client
|
|
4
|
+
const feedsClient = require("../feeds-client-DmA8dntK.js");
|
|
5
5
|
const loggerInternal = require("@stream-io/logger");
|
|
6
6
|
const ChannelOwnCapability = {
|
|
7
7
|
BAN_CHANNEL_MEMBERS: "ban-channel-members",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const require$$0 = require("react");
|
|
4
4
|
require("@stream-io/state-store");
|
|
5
|
-
const feedsClient = require("../feeds-client
|
|
5
|
+
const feedsClient = require("../feeds-client-DmA8dntK.js");
|
|
6
6
|
require("@stream-io/logger");
|
|
7
7
|
require("axios");
|
|
8
8
|
var shim = { exports: {} };
|
|
@@ -735,60 +735,6 @@ const useSearchSources = (controllerFromProps) => {
|
|
|
735
735
|
const selector = ({ sources }) => ({
|
|
736
736
|
sources
|
|
737
737
|
});
|
|
738
|
-
const useReactionActions = ({
|
|
739
|
-
entity,
|
|
740
|
-
type
|
|
741
|
-
}) => {
|
|
742
|
-
const client = useFeedsClient();
|
|
743
|
-
const isComment = feedsClient.isCommentResponse(entity);
|
|
744
|
-
const hasOwnReaction = require$$0.useMemo(
|
|
745
|
-
() => !!entity.own_reactions?.find((r) => r.type === type),
|
|
746
|
-
[entity.own_reactions, type]
|
|
747
|
-
);
|
|
748
|
-
const addReaction = useStableCallback(async () => {
|
|
749
|
-
await (isComment ? client?.addCommentReaction({ id: entity.id, type }) : client?.addActivityReaction({ activity_id: entity.id, type }));
|
|
750
|
-
});
|
|
751
|
-
const removeReaction = useStableCallback(async () => {
|
|
752
|
-
await (isComment ? client?.deleteCommentReaction({ id: entity.id, type }) : client?.deleteActivityReaction({
|
|
753
|
-
activity_id: entity.id,
|
|
754
|
-
type
|
|
755
|
-
}));
|
|
756
|
-
});
|
|
757
|
-
const toggleReaction = useStableCallback(async () => {
|
|
758
|
-
if (hasOwnReaction) {
|
|
759
|
-
await removeReaction();
|
|
760
|
-
} else {
|
|
761
|
-
await addReaction();
|
|
762
|
-
}
|
|
763
|
-
});
|
|
764
|
-
return require$$0.useMemo(
|
|
765
|
-
() => ({ addReaction, removeReaction, toggleReaction }),
|
|
766
|
-
[addReaction, removeReaction, toggleReaction]
|
|
767
|
-
);
|
|
768
|
-
};
|
|
769
|
-
const useBookmarkActions = ({
|
|
770
|
-
entity
|
|
771
|
-
}) => {
|
|
772
|
-
const client = useFeedsClient();
|
|
773
|
-
const hasOwnBookmark = entity.own_bookmarks?.length > 0;
|
|
774
|
-
const addBookmark = useStableCallback(async () => {
|
|
775
|
-
await client?.addBookmark({ activity_id: entity.id });
|
|
776
|
-
});
|
|
777
|
-
const removeBookmark = useStableCallback(async () => {
|
|
778
|
-
await client?.deleteBookmark({ activity_id: entity.id });
|
|
779
|
-
});
|
|
780
|
-
const toggleBookmark = useStableCallback(async () => {
|
|
781
|
-
if (hasOwnBookmark) {
|
|
782
|
-
await removeBookmark();
|
|
783
|
-
} else {
|
|
784
|
-
await addBookmark();
|
|
785
|
-
}
|
|
786
|
-
});
|
|
787
|
-
return require$$0.useMemo(
|
|
788
|
-
() => ({ addBookmark, removeBookmark, toggleBookmark }),
|
|
789
|
-
[addBookmark, removeBookmark, toggleBookmark]
|
|
790
|
-
);
|
|
791
|
-
};
|
|
792
738
|
var jsxRuntime = { exports: {} };
|
|
793
739
|
var reactJsxRuntime_production = {};
|
|
794
740
|
/**
|
|
@@ -1323,7 +1269,6 @@ exports.StreamSearchContext = StreamSearchContext;
|
|
|
1323
1269
|
exports.StreamSearchResults = StreamSearchResults;
|
|
1324
1270
|
exports.StreamSearchResultsContext = StreamSearchResultsContext;
|
|
1325
1271
|
exports.useAggregatedActivities = useAggregatedActivities;
|
|
1326
|
-
exports.useBookmarkActions = useBookmarkActions;
|
|
1327
1272
|
exports.useClientConnectedUser = useClientConnectedUser;
|
|
1328
1273
|
exports.useComments = useComments;
|
|
1329
1274
|
exports.useCreateFeedsClient = useCreateFeedsClient;
|
|
@@ -1338,7 +1283,6 @@ exports.useIsAggregatedActivitySeen = useIsAggregatedActivitySeen;
|
|
|
1338
1283
|
exports.useNotificationStatus = useNotificationStatus;
|
|
1339
1284
|
exports.useOwnCapabilities = useOwnCapabilities;
|
|
1340
1285
|
exports.useOwnFollows = useOwnFollows;
|
|
1341
|
-
exports.useReactionActions = useReactionActions;
|
|
1342
1286
|
exports.useSearchContext = useSearchContext;
|
|
1343
1287
|
exports.useSearchQuery = useSearchQuery;
|
|
1344
1288
|
exports.useSearchResult = useSearchResult;
|