@towns-protocol/react-sdk 0.0.231 → 0.0.234
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useReactions.js","sourceRoot":"","sources":["../../src/useReactions.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"useReactions.js","sourceRoot":"","sources":["../../src/useReactions.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAyB,aAAa,EAAE,MAAM,iBAAiB,CAAA;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAEjC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CACxB,QAAgB,EAChB,MAAqD,EACvD,EAAE;IACA,MAAM,IAAI,GAAG,YAAY,EAAE,CAAA;IAC3B,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;IACpC,MAAM,CAAC,CAAC,CAAC,IAAI,YAAY,KAAK,CAAC,EAAE,+BAA+B,CAAC,CAAA;IAEjE,OAAO,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC,CAAA;AACzD,CAAC,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ReactionsMapModel } from '@towns-protocol/sdk';
|
|
2
2
|
import { type ObservableConfig } from './useObservable';
|
|
3
3
|
/**
|
|
4
4
|
* Hook to get the reactions of a specific stream.
|
|
@@ -6,5 +6,5 @@ import { type ObservableConfig } from './useObservable';
|
|
|
6
6
|
* @param config - Configuration options for the observable.
|
|
7
7
|
* @returns The reactions of the stream as a map from the message eventId to the reaction.
|
|
8
8
|
*/
|
|
9
|
-
export declare const useReactions: (streamId: string, config?: ObservableConfig.FromData<
|
|
9
|
+
export declare const useReactions: (streamId: string, config?: ObservableConfig.FromData<ReactionsMapModel>) => import("./useObservable").ObservableValue<ReactionsMapModel>;
|
|
10
10
|
//# sourceMappingURL=useReactions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useReactions.d.ts","sourceRoot":"","sources":["../../src/useReactions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"useReactions.d.ts","sourceRoot":"","sources":["../../src/useReactions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAiB,MAAM,qBAAqB,CAAA;AAE3E,OAAO,EAAE,KAAK,gBAAgB,EAAiB,MAAM,iBAAiB,CAAA;AAGtE;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GACrB,UAAU,MAAM,EAChB,SAAS,gBAAgB,CAAC,QAAQ,CAAC,iBAAiB,CAAC,iEAOxD,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@towns-protocol/react-sdk",
|
|
3
3
|
"description": "React Hooks for Towns Protocol SDK",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.234",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/esm/index.js",
|
|
7
7
|
"types": "./dist/types/index.d.ts",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"watch": "yarn build -w"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@towns-protocol/sdk": "^0.0.
|
|
24
|
+
"@towns-protocol/sdk": "^0.0.234",
|
|
25
25
|
"ethers": "^5.7.2"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
},
|
|
71
71
|
"sideEffects": false,
|
|
72
72
|
"typings": "./dist/types/index.d.ts",
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "e9a17c45dd217b64ede2e0ab3b62c25ca1ebe5a4"
|
|
74
74
|
}
|
package/src/useReactions.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ReactionsMapModel, Space, assert } from '@towns-protocol/sdk'
|
|
2
2
|
import { useSyncAgent } from './useSyncAgent'
|
|
3
3
|
import { type ObservableConfig, useObservable } from './useObservable'
|
|
4
4
|
import { getRoom } from './utils'
|
|
@@ -11,7 +11,7 @@ import { getRoom } from './utils'
|
|
|
11
11
|
*/
|
|
12
12
|
export const useReactions = (
|
|
13
13
|
streamId: string,
|
|
14
|
-
config?: ObservableConfig.FromData<
|
|
14
|
+
config?: ObservableConfig.FromData<ReactionsMapModel>,
|
|
15
15
|
) => {
|
|
16
16
|
const sync = useSyncAgent()
|
|
17
17
|
const room = getRoom(sync, streamId)
|