@equinor/fusion-framework-react-module-signalr 4.0.1 → 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 CHANGED
@@ -1,5 +1,18 @@
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
+
10
+ ## 4.0.2
11
+
12
+ ### Patch Changes
13
+
14
+ - @equinor/fusion-framework-module-signalr@13.0.0
15
+
3
16
  ## 4.0.1
4
17
 
5
18
  ### 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 './use-signalr-provider';
13
- export { useTopic } from './use-signalr';
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
@@ -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,wBAAwB,CAAC;AAChF,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC"}
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"}
@@ -1,3 +1,3 @@
1
1
  // Generated by genversion.
2
- export const version = '4.0.1';
2
+ export const version = '4.0.3';
3
3
  //# sourceMappingURL=version.js.map