@equinor/fusion-framework-react-module-signalr 4.0.2 → 4.0.3
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/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/useSignalRProvider.js +15 -0
- package/dist/esm/useSignalRProvider.js.map +1 -0
- package/dist/esm/useTopic.js +14 -0
- package/dist/esm/useTopic.js.map +1 -0
- package/dist/esm/version.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/useSignalRProvider.d.ts +11 -0
- package/dist/types/useTopic.d.ts +11 -0
- package/dist/types/version.d.ts +1 -1
- package/package.json +5 -5
- package/src/index.ts +2 -2
- package/src/useSignalRProvider.ts +20 -0
- package/src/useTopic.ts +20 -0
- package/src/version.ts +1 -1
- package/dist/esm/use-signalr-provider.js +0 -6
- package/dist/esm/use-signalr-provider.js.map +0 -1
- package/dist/esm/use-signalr.js +0 -6
- package/dist/esm/use-signalr.js.map +0 -1
- package/dist/types/use-signalr-provider.d.ts +0 -2
- package/dist/types/use-signalr.d.ts +0 -3
- package/src/use-signalr-provider.ts +0 -11
- package/src/use-signalr.ts +0 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 4.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 80c3e4a: Internal: align source filenames with their exports (`use-signalr-provider.ts` → `useSignalRProvider.ts`, `use-signalr.ts` → `useTopic.ts`) while preserving existing public entrypoints; no public API changes.
|
|
8
|
+
- 80c3e4a: Internal: add missing TSDoc comments to `useSignalRProvider` and `useTopic` to satisfy the `require-hook-tsdoc` lint rule. No functional change.
|
|
9
|
+
|
|
3
10
|
## 4.0.2
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
package/dist/esm/index.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* @packageDocumentation
|
|
11
11
|
*/
|
|
12
|
-
export { useSignalRProvider as useProviderTopic } from './
|
|
13
|
-
export { useTopic } from './
|
|
12
|
+
export { useSignalRProvider as useProviderTopic } from './useSignalRProvider';
|
|
13
|
+
export { useTopic } from './useTopic';
|
|
14
14
|
export { Topic, enableSignalR } from '@equinor/fusion-framework-module-signalr';
|
|
15
15
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,kBAAkB,IAAI,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,kBAAkB,IAAI,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Hook for connecting to a SignalR hub topic via the given provider.
|
|
4
|
+
*
|
|
5
|
+
* @template T - The type of data emitted by the topic
|
|
6
|
+
* @param provider - The SignalR provider used to establish the connection
|
|
7
|
+
* @param hubId - The id of the hub to connect to
|
|
8
|
+
* @param topicId - The id of the topic within the hub to subscribe to
|
|
9
|
+
* @returns The connected topic
|
|
10
|
+
*/
|
|
11
|
+
export const useSignalRProvider = (provider, hubId, topicId) => {
|
|
12
|
+
const topic = useMemo(() => provider.connect(hubId, topicId), [provider, hubId, topicId]);
|
|
13
|
+
return topic;
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=useSignalRProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSignalRProvider.js","sourceRoot":"","sources":["../../src/useSignalRProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAGhC;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,QAA0B,EAC1B,KAAa,EACb,OAAe,EACL,EAAE;IACZ,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAI,KAAK,EAAE,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;IAC7F,OAAO,KAAK,CAAC;AACf,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useModule } from '@equinor/fusion-framework-react-module';
|
|
2
|
+
import { moduleKey } from '@equinor/fusion-framework-module-signalr';
|
|
3
|
+
import { useSignalRProvider } from './useSignalRProvider';
|
|
4
|
+
/**
|
|
5
|
+
* Hook for connecting to a SignalR hub topic, resolving the provider from the framework automatically.
|
|
6
|
+
*
|
|
7
|
+
* @template T - The type of data emitted by the topic
|
|
8
|
+
* @param hubId - The id of the hub to connect to
|
|
9
|
+
* @param topicId - The id of the topic within the hub to subscribe to
|
|
10
|
+
* @returns The connected topic
|
|
11
|
+
*/
|
|
12
|
+
export const useTopic = (hubId, topicId) => useSignalRProvider(useModule(moduleKey), hubId, topicId);
|
|
13
|
+
export default useTopic;
|
|
14
|
+
//# sourceMappingURL=useTopic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTopic.js","sourceRoot":"","sources":["../../src/useTopic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AAErE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CACtB,KAAa,EACb,OAAe,EAC2B,EAAE,CAC5C,kBAAkB,CAAC,SAAS,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AAE3D,eAAe,QAAQ,CAAC"}
|
package/dist/esm/version.js
CHANGED