@burdenoff/microfe-assethandler 2026.703.3 → 2026.703.4

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 +1 @@
1
- {"version":3,"file":"useAssetHandlerNavigate.js","names":[],"sources":["../../../src/assethandler/hooks/useAssetHandlerNavigate.ts"],"sourcesContent":["import { useCallback } from 'react';\nimport { useNavigate, type NavigateOptions } from 'react-router-dom';\nimport { useAssetHandler } from '../providers/AssetHandlerProvider';\nimport { joinPath } from '../utils/navigation';\n\n/**\n * Base-path-aware navigation for in-MFE links.\n *\n * The AssetHandler MFE is mounted under a host base path (e.g. `/assethandler`)\n * when integrated into an app shell, or at `/` when running standalone. React\n * Router's `navigate('/assets/...')` resolves against the HOST router root, so\n * an absolute in-MFE path would escape the mount and land on a nonexistent host\n * route (which the shell bounces to `/dashboard`).\n *\n * This hook prefixes the active `basePath` onto absolute string targets so\n * `navigate('/assets/asset-create')` correctly resolves to\n * `/assethandler/assets/asset-create` when integrated and `/assets/asset-create`\n * when standalone. Relative paths and numeric deltas (`navigate(-1)`) pass\n * through untouched.\n */\nexport function useAssetHandlerNavigate() {\n const navigate = useNavigate();\n const { basePath = '/' } = useAssetHandler();\n\n return useCallback(\n (to: string | number, options?: NavigateOptions) => {\n if (typeof to === 'number') {\n navigate(to);\n return;\n }\n const resolved = to.startsWith('/') ? joinPath(basePath, to) : to;\n navigate(resolved, options);\n },\n [navigate, basePath],\n );\n}\n"],"mappings":";;;;;AAoBA,SAAgB,IAA0B;CACxC,IAAM,IAAW,GAAa,EACxB,EAAE,cAAW,QAAQ,GAAiB;AAE5C,QAAO,GACJ,GAAqB,MAA8B;AAClD,MAAI,OAAO,KAAO,UAAU;AAC1B,KAAS,EAAG;AACZ;;AAGF,IADiB,EAAG,WAAW,IAAI,GAAG,EAAS,GAAU,EAAG,GAAG,GAC5C,EAAQ;IAE7B,CAAC,GAAU,EAAS,CACrB"}
1
+ {"version":3,"file":"useAssetHandlerNavigate.js","names":[],"sources":["../../../src/assethandler/hooks/useAssetHandlerNavigate.ts"],"sourcesContent":["import { useCallback } from 'react';\nimport { useNavigate, type NavigateOptions } from 'react-router-dom';\nimport { useAssetHandler } from '../providers/AssetHandlerProvider';\nimport { joinPath } from '../utils/navigation';\n\n/**\n * Base-path-aware navigation for in-MFE links.\n *\n * The AssetHandler MFE is mounted under a host base path (e.g. `/assethandler`)\n * when integrated into an app shell, or at `/` when running standalone. React\n * Router's `navigate('/assets/...')` resolves against the HOST router root, so\n * an absolute in-MFE path would escape the mount and land on a nonexistent host\n * route (which the shell bounces to `/dashboard`).\n *\n * This hook prefixes the active `basePath` onto absolute string targets so\n * `navigate('/assets/asset-create')` correctly resolves to\n * `/assethandler/assets/asset-create` when integrated and `/assets/asset-create`\n * when standalone. Relative paths and numeric deltas (`navigate(-1)`) pass\n * through untouched.\n */\nexport function useAssetHandlerNavigate() {\n const navigate = useNavigate();\n const { basePath = '/' } = useAssetHandler();\n\n return useCallback(\n (to: string | number, options?: NavigateOptions) => {\n if (typeof to === 'number') {\n navigate(to);\n return;\n }\n const resolved = to.startsWith('/') ? joinPath(basePath, to) : to;\n navigate(resolved, options);\n },\n [navigate, basePath]\n );\n}\n"],"mappings":";;;;;AAoBA,SAAgB,IAA0B;CACxC,IAAM,IAAW,GAAa,EACxB,EAAE,cAAW,QAAQ,GAAiB;AAE5C,QAAO,GACJ,GAAqB,MAA8B;AAClD,MAAI,OAAO,KAAO,UAAU;AAC1B,KAAS,EAAG;AACZ;;AAGF,IADiB,EAAG,WAAW,IAAI,GAAG,EAAS,GAAU,EAAG,GAAG,GAC5C,EAAQ;IAE7B,CAAC,GAAU,EAAS,CACrB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-assethandler",
3
- "version": "2026.703.3",
3
+ "version": "2026.703.4",
4
4
  "description": "Burdenoff AssetHandler Microfrontend",
5
5
  "type": "module",
6
6
  "files": [