@grasp-labs/ds-microfrontends-integration 0.13.0 → 0.14.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.
@@ -1,4 +1,4 @@
1
- import { c as o } from "./index-CKzqMU2P.js";
1
+ import { c as o } from "./index-DFqk0a9d.js";
2
2
  import { useState as J, useEffect as De, createContext as Zt, useRef as ce, useContext as Gt, useMemo as le, useCallback as Re } from "react";
3
3
  const $e = (e, t, n, r, a) => {
4
4
  if (!r) throw new Error(a ?? `Invalid property path: ${t}
package/dist/index.js CHANGED
@@ -1,38 +1,35 @@
1
- import { A as s, B as l, E as t, F as r, J as i, L as u, N as o, S as d, T as n, a as F, h as g, V as m, e as c, f as V, b as p, g as T, v as h, x as v, m as S, n as b, w as x, o as y, k as P, z as f, p as D, q as E, s as L, t as A, y as I, r as N, l as j, u as B, i as C, j as J, d as O } from "./index-CKzqMU2P.js";
1
+ import { A as s, B as l, E as t, F as i, J as r, L as u, N as d, S as o, T as F, a as g, V as n, e as m, f as c, b as V, g as p, q as h, t as S, j as v, k as b, s as T, l as f, h as y, w as D, m as E, n as L, o as P, p as x, v as A, r as I, i as N, u as j, d as B } from "./index-DFqk0a9d.js";
2
2
  export {
3
3
  s as ArrayField,
4
4
  l as BooleanField,
5
5
  t as EnumField,
6
- r as FieldError,
7
- i as JsonField,
6
+ i as FieldError,
7
+ r as JsonField,
8
8
  u as LanguageProvider,
9
- o as NumberField,
10
- d as SchemaFields,
11
- n as TextField,
12
- F as ToastProvider,
13
- g as TranslationProvider,
14
- m as VaultField,
15
- c as VaultInput,
16
- V as VaultInputField,
17
- p as VaultProvider,
18
- T as VaultSecretDialog,
9
+ d as NumberField,
10
+ o as SchemaFields,
11
+ F as TextField,
12
+ g as ToastProvider,
13
+ n as VaultField,
14
+ m as VaultInput,
15
+ c as VaultInputField,
16
+ V as VaultProvider,
17
+ p as VaultSecretDialog,
19
18
  h as buildDefaultValues,
20
- v as createFieldDescriptor,
21
- S as extractConstraints,
19
+ S as createFieldDescriptor,
20
+ v as extractConstraints,
22
21
  b as getArrayItemsSchema,
23
- x as getDefaultValue,
24
- y as getFieldType,
25
- P as getLanguage,
26
- f as getSchemaResolver,
27
- D as isEnumField,
28
- E as isNullable,
29
- L as isObjectWithoutProperties,
30
- A as isReadOnly,
31
- I as parseSchemaFields,
32
- N as resolveSchema,
33
- j as useLanguage,
34
- B as useToast,
35
- C as useTranslation,
36
- J as useTranslationContext,
37
- O as useVault
22
+ T as getDefaultValue,
23
+ f as getFieldType,
24
+ y as getLanguage,
25
+ D as getSchemaResolver,
26
+ E as isEnumField,
27
+ L as isNullable,
28
+ P as isObjectWithoutProperties,
29
+ x as isReadOnly,
30
+ A as parseSchemaFields,
31
+ I as resolveSchema,
32
+ N as useLanguage,
33
+ j as useToast,
34
+ B as useVault
38
35
  };
@@ -1,5 +1,8 @@
1
1
  import { IconName } from '@grasp-labs/ds-react-components';
2
2
  import { ModuleFederationOptions } from '@module-federation/vite/lib/utils/normalizeModuleFederationOptions';
3
+ /**
4
+ * @deprecated Use @grasp-labs/ds-web-microfrontends-common-lib instead
5
+ */
3
6
  export type RouteConfig = {
4
7
  label: string;
5
8
  path: string;
@@ -8,16 +11,29 @@ export type RouteConfig = {
8
11
  };
9
12
  /**
10
13
  * INDEX is a mandatory route representing the root of the microfrontend, used as the parent navigation item in the sidebar
14
+ * @deprecated Use @grasp-labs/ds-web-microfrontends-common-lib instead
11
15
  */
12
16
  export type IndexNavigationConfig = {
13
17
  INDEX: RouteConfig;
14
18
  };
19
+ /**
20
+ * @deprecated Use @grasp-labs/ds-web-microfrontends-common-lib instead
21
+ */
15
22
  export type NavigationConfig<TKeys extends string = string> = IndexNavigationConfig & Record<TKeys, RouteConfig>;
23
+ /**
24
+ * @deprecated Use @grasp-labs/ds-web-microfrontends-common-lib instead
25
+ */
16
26
  export type MicrofrontendExposes = {
17
27
  ".": string;
18
28
  "./navigationConfig": string;
19
29
  } & Record<string, string>;
30
+ /**
31
+ * @deprecated Use @grasp-labs/ds-web-microfrontends-common-lib instead
32
+ */
20
33
  export declare const createModuleFederationConfig: (name: string, overrides?: Partial<ModuleFederationOptions>) => ModuleFederationOptions;
34
+ /**
35
+ * @deprecated Use @grasp-labs/ds-web-microfrontends-common-lib instead
36
+ */
21
37
  export declare const COMMON_SHARED_DEPS: {
22
38
  react: {
23
39
  singleton: boolean;
@@ -40,5 +56,17 @@ export declare const COMMON_SHARED_DEPS: {
40
56
  requiredVersion: string;
41
57
  };
42
58
  };
59
+ /**
60
+ * @deprecated Use @grasp-labs/ds-web-microfrontends-common-lib instead
61
+ */
43
62
  export declare const createMicrofrontendsBase: (name: string) => string;
63
+ /**
64
+ * @deprecated This file is deprecated and will be removed in a future release.
65
+ * Please use @grasp-labs/ds-web-microfrontends-common-lib package instead.
66
+ * All exports from this file are now available in the external package.
67
+ *
68
+ * Migration guide:
69
+ * - Replace imports from './mf-common' with '@grasp-labs/ds-web-microfrontends-common-lib'
70
+ * - Install the package: npm install @grasp-labs/ds-web-microfrontends-common-lib
71
+ */
44
72
  export declare const dsFederation: (name: string, overrides?: Partial<ModuleFederationOptions>) => import('vite').Plugin<any>[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grasp-labs/ds-microfrontends-integration",
3
- "version": "0.13.0",
3
+ "version": "0.14.1",
4
4
  "private": false,
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -60,46 +60,46 @@
60
60
  },
61
61
  "devDependencies": {
62
62
  "@eslint/js": "^9.32.0",
63
- "@grasp-labs/ds-react-components": "^0.13.0",
63
+ "@grasp-labs/ds-react-components": "^0.15.1",
64
64
  "@hookform/resolvers": "^5.2.2",
65
65
  "@module-federation/vite": "^1.9.0",
66
- "@storybook/addon-a11y": "^9.1.0",
67
- "@storybook/addon-themes": "^9.1.0",
68
- "@storybook/react-vite": "^9.1.0",
66
+ "@storybook/addon-a11y": "^10.1.11",
67
+ "@storybook/addon-themes": "^10.1.11",
68
+ "@storybook/react-vite": "^10.1.11",
69
69
  "@tailwindcss/vite": "^4.1.11",
70
70
  "@testing-library/jest-dom": "^6.6.3",
71
71
  "@testing-library/react": "^16.3.0",
72
72
  "@testing-library/user-event": "^14.6.1",
73
73
  "@types/express": "^5.0.5",
74
- "@types/node": "^22.16.5",
74
+ "@types/node": "^24.0.5",
75
75
  "@types/react": "^19.1.10",
76
76
  "@types/react-dom": "^19.1.7",
77
- "@vitejs/plugin-react": "^4.6.0",
78
- "@vitest/coverage-v8": "^3.2.4",
77
+ "@vitejs/plugin-react": "^5.1.2",
78
+ "@vitest/coverage-v8": "^4.0.16",
79
79
  "eslint": "^9.32.0",
80
80
  "eslint-config-prettier": "^10.1.8",
81
81
  "eslint-plugin-prettier": "^5.5.3",
82
- "eslint-plugin-react-hooks": "^5.2.0",
83
- "eslint-plugin-storybook": "^9.1.0",
82
+ "eslint-plugin-react-hooks": "^7.0.1",
83
+ "eslint-plugin-storybook": "^10.1.11",
84
84
  "express": "^5.1.0",
85
- "globals": "^16.2.0",
85
+ "globals": "^17.0.0",
86
86
  "i18next": "^25.7.3",
87
- "jsdom": "^26.1.0",
87
+ "jsdom": "^27.4.0",
88
88
  "json-edit-react": "^1.29.0",
89
89
  "prettier": "^3.6.2",
90
- "prettier-plugin-tailwindcss": "^0.6.14",
90
+ "prettier-plugin-tailwindcss": "^0.7.2",
91
91
  "react": "19.2.3",
92
92
  "react-dom": "19.2.3",
93
93
  "react-hook-form": "^7.66.0",
94
- "storybook": "^9.1.0",
94
+ "storybook": "^10.1.11",
95
95
  "tailwind-merge": "^3.3.1",
96
96
  "tailwindcss": "^4.1.11",
97
- "typescript": "~5.8.3",
97
+ "typescript": "^5.9.3",
98
98
  "typescript-eslint": "^8.35.0",
99
99
  "vite": "^7.0.6",
100
100
  "vite-plugin-dts": "^4.5.4",
101
- "vite-tsconfig-paths": "^5.1.4",
102
- "vitest": "^3.2.4",
101
+ "vite-tsconfig-paths": "^6.0.3",
102
+ "vitest": "^4.0.16",
103
103
  "zod": "4.2.1"
104
104
  }
105
105
  }
@@ -1,34 +0,0 @@
1
- import { InitOptions, Resource } from 'i18next';
2
- import { ReactNode } from 'react';
3
- import { TranslationFn } from '../../../types';
4
- type TranslationContextValue = {
5
- t: TranslationFn;
6
- language: string;
7
- addResources: (language: string, namespace: string, resources: Record<string, string>) => void;
8
- };
9
- export type TranslationProviderProps = {
10
- children: ReactNode;
11
- language?: string;
12
- fallbackLanguage?: string;
13
- namespace?: string;
14
- resources?: Resource;
15
- i18nOptions?: InitOptions;
16
- };
17
- /**
18
- * Translation provider with simple reactive updates.
19
- *
20
- * @deprecated Applications should handle their translations independently.
21
- * Use LanguageProvider for shared language state management across microfrontends,
22
- * and implement translation handling individually within each microfrontend.
23
- *
24
- * @example
25
- * ```tsx
26
- * <TranslationProvider language="en" resources={customResources}>
27
- * <App />
28
- * </TranslationProvider>
29
- * ```
30
- */
31
- export declare const TranslationProvider: ({ children, language, fallbackLanguage, namespace, resources, i18nOptions, }: TranslationProviderProps) => import("react/jsx-runtime").JSX.Element;
32
- export declare const useTranslation: () => TranslationFn;
33
- export declare const useTranslationContext: () => TranslationContextValue;
34
- export {};
@@ -1,2 +0,0 @@
1
- export { TranslationProvider, useTranslation, useTranslationContext, } from './TranslationProvider';
2
- export type { TranslationProviderProps } from './TranslationProvider';
@@ -1 +0,0 @@
1
- export * from './TranslationProvider';
@@ -1,24 +0,0 @@
1
- declare const _default: {
2
- "vaultSecretDialog": {
3
- "addTitle": "Add New Secret",
4
- "editTitle": "Edit Secret",
5
- "cancel": "Cancel",
6
- "delete": "Delete Secret",
7
- "deleting": "Deleting...",
8
- "create": "Create Secret",
9
- "save": "Save Changes",
10
- "creating": "Creating...",
11
- "saving": "Saving...",
12
- "createError": "Failed to generate secret. Please try again.",
13
- "updateError": "Failed to update secret. Please try again.",
14
- "deleteError": "Failed to delete secret. Please try again."
15
- },
16
- "vaultInput": {
17
- "placeholder": "Select a secret",
18
- "addAriaLabel": "Add new secret",
19
- "toggleAriaLabel": "Toggle options menu"
20
- }
21
- }
22
- ;
23
-
24
- export default _default;
@@ -1,24 +0,0 @@
1
- declare const _default: {
2
- "vaultSecretDialog": {
3
- "addTitle": "Legg til ny hemmelighet",
4
- "editTitle": "Rediger hemmelighet",
5
- "cancel": "Avbryt",
6
- "delete": "Slett hemmelighet",
7
- "deleting": "Sletter...",
8
- "create": "Opprett hemmelighet",
9
- "save": "Lagre endringer",
10
- "creating": "Oppretter...",
11
- "saving": "Lagrer...",
12
- "createError": "Kunne ikke opprette hemmelighet. Prøv igjen.",
13
- "updateError": "Kunne ikke oppdatere hemmeligheten. Prøv igjen.",
14
- "deleteError": "Kunne ikke slette hemmeligheten. Prøv igjen."
15
- },
16
- "vaultInput": {
17
- "placeholder": "Velg en hemmelighet",
18
- "addAriaLabel": "Legg til ny hemmelighet",
19
- "toggleAriaLabel": "Vis eller skjul alternativer"
20
- }
21
- }
22
- ;
23
-
24
- export default _default;