@equinor/fusion-framework-react-module 4.0.1 → 4.0.3-next.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 CHANGED
@@ -1,5 +1,31 @@
1
1
  # Change Log
2
2
 
3
+ ## 4.0.3-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - e8aae1f: Internal: publish every package on the `next` pre-release tag so the whole framework can be installed as a coherent set.
8
+
9
+ Packages without their own changes are bumped only to receive a `-next.N` version and the `next` dist-tag on npm. Install with:
10
+
11
+ ```bash
12
+ pnpm add @equinor/fusion-framework-react-app@next
13
+ ```
14
+
15
+ - Updated dependencies [e8aae1f]
16
+ - Updated dependencies [2836e0b]
17
+ - Updated dependencies [2836e0b]
18
+ - Updated dependencies [2836e0b]
19
+ - Updated dependencies [2836e0b]
20
+ - @equinor/fusion-framework-module@6.1.3-next.0
21
+
22
+ ## 4.0.2
23
+
24
+ ### Patch Changes
25
+
26
+ - 80c3e4a: Internal: align source filenames with their exports (`context.ts` → `module-context.ts`, `ModuleProvider.tsx` → `create-module-provider.tsx`) while preserving existing public entrypoints; no public API changes.
27
+ - 80c3e4a: Internal: split multi-export files into one export per file and convert pure interop re-exports to `export { X } from 'y'` syntax, per `fusion-lint`'s `single-export-per-file` rule. Also removed `modules/event/src/EventProvider.tsx`, a fully dead duplicate of `eventContext.ts`/`useEventProvider.ts`/`useModulesEventProvider.ts` with no remaining consumers. No behavior changes.
28
+
3
29
  ## 4.0.1
4
30
 
5
31
  ### Patch Changes
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  /* eslint-disable @typescript-eslint/no-explicit-any */
3
3
  import { lazy, useEffect, } from 'react';
4
4
  import { initializeModules, } from '@equinor/fusion-framework-module';
5
- import moduleContext from './context.js';
5
+ import { ModuleProvider } from './module-provider.js';
6
6
  /**
7
7
  * Function for creating a `ModuleProvider` component.
8
8
  *
@@ -47,6 +47,4 @@ export const createModuleProvider = async (configurator, ref) => {
47
47
  });
48
48
  return Component;
49
49
  };
50
- export const ModuleProvider = moduleContext.Provider;
51
- export default ModuleProvider;
52
- //# sourceMappingURL=ModuleProvider.js.map
50
+ //# sourceMappingURL=create-module-provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-module-provider.js","sourceRoot":"","sources":["../../src/create-module-provider.tsx"],"names":[],"mappings":";AAAA,uDAAuD;AACvD,OAAO,EACL,IAAI,EACJ,SAAS,GAIV,MAAM,OAAO,CAAC;AAEf,OAAO,EACL,iBAAiB,GAIlB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAWtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAA0B,KAAK,EAK9D,YAAiD,EACjD,GAAU,EACuC,EAAE;IACnD,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE;QAChC,MAAM,EAAE,OAAO,EAAE,GAAG,QAAQ,EAAE,GAAG,MAAM,iBAAiB,CAAiB,YAAY,EAAE,GAAG,CAAC,CAAC;QAC5F,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,QAAQ,EAA4B,EAAE,EAAE;gBAClD,wGAAwG;gBACxG,SAAS,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;gBACrC,OAAO,KAAC,cAAc,IAAC,KAAK,EAAE,QAAQ,YAAG,QAAQ,GAAkB,CAAC;YACtE,CAAC;SACF,CAAC;IACJ,CAAC,CAAC,CAAC;IACH,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC"}
package/dist/esm/index.js CHANGED
@@ -1,3 +1,5 @@
1
- export { ModuleProvider, createModuleProvider } from './ModuleProvider.js';
2
- export { useModules, useModule } from './useModules.js';
1
+ export { createModuleProvider } from './create-module-provider.js';
2
+ export { ModuleProvider } from './module-provider.js';
3
+ export { useModules } from './useModules.js';
4
+ export { useModule } from './useModule.js';
3
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC"}
@@ -1,4 +1,4 @@
1
1
  import { createContext } from 'react';
2
2
  export const moduleContext = createContext({});
3
3
  export default moduleContext;
4
- //# sourceMappingURL=context.js.map
4
+ //# sourceMappingURL=module-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module-context.js","sourceRoot":"","sources":["../../src/module-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CAA0B,EAAE,CAAC,CAAC;AAExE,eAAe,aAAa,CAAC"}
@@ -0,0 +1,4 @@
1
+ import moduleContext from './module-context.js';
2
+ export const ModuleProvider = moduleContext.Provider;
3
+ export default ModuleProvider;
4
+ //# sourceMappingURL=module-provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module-provider.js","sourceRoot":"","sources":["../../src/module-provider.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,qBAAqB,CAAC;AAEhD,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAAC,QAAQ,CAAC;AAErD,eAAe,cAAc,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { useModules } from './useModules.js';
2
+ /**
3
+ * Hook for accessing a single module instance from the current context scope.
4
+ *
5
+ * Convenience hook that retrieves a single module by its key/name. This is useful
6
+ * when you only need one module and want to avoid destructuring from `useModules`.
7
+ *
8
+ * @template T - The type of the module to retrieve. Defaults to any module from the available `Modules`.
9
+ * @template TKey - The string key/name of the module. Automatically inferred from `T` when possible.
10
+ * @param key - The name/key of the module to retrieve from the context.
11
+ * @returns The initialized instance of the requested module, with proper type inference.
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * // Get a specific module by name
16
+ * const navigation = useModule('navigation');
17
+ *
18
+ * // With explicit type
19
+ * const navigation = useModule<NavigationModule>('navigation');
20
+ * ```
21
+ */
22
+ export const useModule = (key) => {
23
+ const modules = useModules();
24
+ return modules[key];
25
+ };
26
+ //# sourceMappingURL=useModule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useModule.js","sourceRoot":"","sources":["../../src/useModule.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAIvB,GAAS,EACmD,EAAE;IAC9D,MAAM,OAAO,GAAG,UAAU,EAA6B,CAAC;IACxD,OAAQ,OAAmC,CAAC,GAAG,CAE9C,CAAC;AACJ,CAAC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { useContext } from 'react';
2
- import { moduleContext } from './context.js';
2
+ import { moduleContext } from './module-context.js';
3
3
  /**
4
4
  * Hook for accessing module instances from the current context scope.
5
5
  *
@@ -20,29 +20,5 @@ import { moduleContext } from './context.js';
20
20
  * ```
21
21
  */
22
22
  export const useModules = () => useContext(moduleContext);
23
- /**
24
- * Hook for accessing a single module instance from the current context scope.
25
- *
26
- * Convenience hook that retrieves a single module by its key/name. This is useful
27
- * when you only need one module and want to avoid destructuring from `useModules`.
28
- *
29
- * @template T - The type of the module to retrieve. Defaults to any module from the available `Modules`.
30
- * @template TKey - The string key/name of the module. Automatically inferred from `T` when possible.
31
- * @param key - The name/key of the module to retrieve from the context.
32
- * @returns The initialized instance of the requested module, with proper type inference.
33
- *
34
- * @example
35
- * ```ts
36
- * // Get a specific module by name
37
- * const navigation = useModule('navigation');
38
- *
39
- * // With explicit type
40
- * const navigation = useModule<NavigationModule>('navigation');
41
- * ```
42
- */
43
- export const useModule = (key) => {
44
- const modules = useModules();
45
- return modules[key];
46
- };
47
23
  export default useModules;
48
24
  //# sourceMappingURL=useModules.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useModules.js","sourceRoot":"","sources":["../../src/useModules.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,GAES,EAAE,CAAC,UAAU,CAAC,aAAa,CAAkC,CAAC;AAEjG;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAIvB,GAAS,EACmD,EAAE;IAC9D,MAAM,OAAO,GAAG,UAAU,EAA6B,CAAC;IACxD,OAAQ,OAAmC,CAAC,GAAG,CAE9C,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"useModules.js","sourceRoot":"","sources":["../../src/useModules.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,GAES,EAAE,CAAC,UAAU,CAAC,aAAa,CAAkC,CAAC;AAEjG,eAAe,UAAU,CAAC"}
@@ -1,3 +1,3 @@
1
1
  // Generated by genversion.
2
- export const version = '4.0.1';
2
+ export const version = '4.0.3-next.0';
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,OAAO,CAAC"}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,MAAM,CAAC,MAAM,OAAO,GAAG,cAAc,CAAC"}