@equinor/fusion-framework-react-module-signalr 4.0.0-next.0 → 4.0.1

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,16 +1,37 @@
1
1
  # Change Log
2
2
 
3
- ## 4.0.0-next.0
3
+ ## 4.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - @equinor/fusion-framework-module-signalr@12.0.0
8
+
9
+ ## 4.0.0
4
10
 
5
11
  ### Major Changes
6
12
 
7
- - [#3820](https://github.com/equinor/fusion-framework/pull/3820) [`9f7597e`](https://github.com/equinor/fusion-framework/commit/9f7597ee237ef069dc24cbe39c73b5b26db157dd) Thanks [@odinr](https://github.com/odinr)! - Require React 18+ as peer dependency. React 17 is no longer supported.
13
+ - abffa53: Major version bump for Fusion Framework React 19 release.
14
+
15
+ All packages are bumped to the next major version as part of the React 19 upgrade. This release drops support for React versions below 18 and includes breaking changes across the framework.
16
+
17
+ **Breaking changes:**
18
+ - Peer dependencies now require React 18 or 19 (`^18.0.0 || ^19.0.0`)
19
+ - React Router upgraded from v6 to v7
20
+ - Navigation module refactored with new history API
21
+ - `renderComponent` and `renderApp` now use `createRoot` API
22
+
23
+ **Migration:**
24
+ - Update your React version to 18.0.0 or higher before upgrading
25
+ - Replace `NavigationProvider.createRouter()` with `@equinor/fusion-framework-react-router`
26
+ - See individual package changelogs for package-specific migration steps
27
+
28
+ - abffa53: Require React 18+ as peer dependency. React 17 is no longer supported.
8
29
 
9
30
  **Migration:** Update your application to React 18+ to continue using these packages.
10
31
 
11
32
  Closes https://github.com/equinor/fusion-framework/issues/3504
12
33
 
13
- - [#3820](https://github.com/equinor/fusion-framework/pull/3820) [`75c068f`](https://github.com/equinor/fusion-framework/commit/75c068fea13c32435ac26bd9043cc156482bfaf1) Thanks [@odinr](https://github.com/odinr)! - Upgrade to React 19 and remove support for React versions lower than 18.
34
+ - abffa53: Upgrade to React 19 and remove support for React versions lower than 18.
14
35
 
15
36
  **Breaking changes:**
16
37
  - Peer dependencies now require React 18 or 19 (`^18.0.0 || ^19.0.0`)
@@ -21,13 +42,33 @@
21
42
  - Update your React version to 18.0.0 or higher before upgrading these packages
22
43
  - If using React 16 or 17, upgrade to React 18 or 19 first
23
44
 
45
+ Closes https://github.com/equinor/fusion-framework/issues/3504
46
+
47
+ ### Patch Changes
48
+
49
+ - Updated dependencies [abffa53]
50
+ - Updated dependencies [abffa53]
51
+ - Updated dependencies [abffa53]
52
+ - Updated dependencies [abffa53]
53
+ - @equinor/fusion-framework-module-signalr@11.0.0
54
+ - @equinor/fusion-framework-react-module@4.0.0
55
+
56
+ ## 3.0.37
57
+
24
58
  ### Patch Changes
25
59
 
26
- - [#3820](https://github.com/equinor/fusion-framework/pull/3820) [`265bb76`](https://github.com/equinor/fusion-framework/commit/265bb767249989eeb1971e83f3fba94879e0813b) Thanks [@odinr](https://github.com/odinr)! - relase next
60
+ - [#4157](https://github.com/equinor/fusion-framework/pull/4157) [`6aa8e1f`](https://github.com/equinor/fusion-framework/commit/6aa8e1f5c9d852b25e97aa7d98a63008c64d4581) Thanks [@Noggling](https://github.com/Noggling)! - Internal: patch release to align TypeScript types across packages for consistent type compatibility.
27
61
 
28
- - Updated dependencies [[`265bb76`](https://github.com/equinor/fusion-framework/commit/265bb767249989eeb1971e83f3fba94879e0813b), [`d252b0d`](https://github.com/equinor/fusion-framework/commit/d252b0d442b7c8c1b50bf2768cf9ecbbb55a76f8), [`9f7597e`](https://github.com/equinor/fusion-framework/commit/9f7597ee237ef069dc24cbe39c73b5b26db157dd), [`75c068f`](https://github.com/equinor/fusion-framework/commit/75c068fea13c32435ac26bd9043cc156482bfaf1)]:
29
- - @equinor/fusion-framework-react-module@4.0.0-next.0
30
- - @equinor/fusion-framework-module-signalr@10.0.0-next.0
62
+ - Updated dependencies [[`6aa8e1f`](https://github.com/equinor/fusion-framework/commit/6aa8e1f5c9d852b25e97aa7d98a63008c64d4581)]:
63
+ - @equinor/fusion-framework-module-signalr@10.0.1
64
+ - @equinor/fusion-framework-react-module@3.1.14
65
+
66
+ ## 3.0.36
67
+
68
+ ### Patch Changes
69
+
70
+ - Updated dependencies []:
71
+ - @equinor/fusion-framework-module-signalr@10.0.0
31
72
 
32
73
  ## 3.0.35
33
74
 
package/README.md ADDED
@@ -0,0 +1,57 @@
1
+ # @equinor/fusion-framework-react-module-signalr
2
+
3
+ React hooks for the Fusion SignalR module. Subscribe to real-time SignalR hub topics from React components with automatic connection management.
4
+
5
+ **Import:**
6
+
7
+ ```ts
8
+ import { useTopic, enableSignalR } from '@equinor/fusion-framework-react-module-signalr';
9
+ ```
10
+
11
+ ## Exports
12
+
13
+ | Export | Type | Description |
14
+ | --------------------- | -------- | --------------------------------------------------------- |
15
+ | `useTopic` | Hook | Subscribe to a SignalR topic using the closest module scope |
16
+ | `useProviderTopic` | Hook | Subscribe to a SignalR topic with an explicit provider |
17
+ | `enableSignalR` | Function | Enable the SignalR module in a configurator |
18
+ | `Topic` | Class | A SignalR topic instance for pub/sub messaging |
19
+ | `ISignalRConfigurator`| Type | Configurator interface |
20
+ | `SignalRHubConfig` | Type | Hub connection configuration |
21
+ | `SignalRModule` | Type | Module type definition |
22
+
23
+ ## useTopic
24
+
25
+ Subscribe to a SignalR hub topic. Returns a `Topic<T>` instance that exposes an observable message stream.
26
+
27
+ ```tsx
28
+ import { useTopic } from '@equinor/fusion-framework-react-module-signalr';
29
+
30
+ type NotificationPayload = { message: string; severity: 'info' | 'warning' };
31
+
32
+ const Notifications = () => {
33
+ const topic = useTopic<NotificationPayload>('notifications-hub', 'alerts');
34
+
35
+ // topic.message$ is an Observable<NotificationPayload>
36
+ // topic.send(payload) publishes to the hub
37
+
38
+ return <div>Listening for alerts…</div>;
39
+ };
40
+ ```
41
+
42
+ ## useProviderTopic
43
+
44
+ Same as `useTopic`, but accepts an explicit `ISignalRProvider` instead of resolving from the module scope. Use this in libraries or when multiple providers are available.
45
+
46
+ ```ts
47
+ import { useProviderTopic } from '@equinor/fusion-framework-react-module-signalr';
48
+ import type { ISignalRProvider } from '@equinor/fusion-framework-module-signalr';
49
+
50
+ declare const provider: ISignalRProvider;
51
+
52
+ const topic = useProviderTopic<MyPayload>(provider, 'hub-id', 'topic-id');
53
+ ```
54
+
55
+ ## Related
56
+
57
+ - [`@equinor/fusion-framework-module-signalr`](../../../modules/signalr/README.md) — the underlying SignalR module
package/dist/esm/index.js CHANGED
@@ -1,3 +1,14 @@
1
+ /**
2
+ * React integration for the Fusion SignalR module.
3
+ *
4
+ * Provides hooks for subscribing to SignalR hub topics from React components.
5
+ * Use {@link useTopic} for module-scoped access or {@link useProviderTopic}
6
+ * when injecting a provider explicitly.
7
+ *
8
+ * @see {@link enableSignalR} to enable the module in a configurator.
9
+ *
10
+ * @packageDocumentation
11
+ */
1
12
  export { useSignalRProvider as useProviderTopic } from './use-signalr-provider';
2
13
  export { useTopic } from './use-signalr';
3
14
  export { Topic, enableSignalR } from '@equinor/fusion-framework-module-signalr';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,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,wBAAwB,CAAC;AAChF,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC"}
@@ -1,3 +1,3 @@
1
1
  // Generated by genversion.
2
- export const version = '4.0.0-next.0';
2
+ export const version = '4.0.1';
3
3
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,MAAM,CAAC,MAAM,OAAO,GAAG,cAAc,CAAC"}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC"}