@kaena1/mm-ui-shared-utils 1.25.0-f-poc-EC-3301.4 → 1.25.0-f-poc-EC-3301.5
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.
|
@@ -2,7 +2,6 @@ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import "react";
|
|
3
3
|
import "react-dom";
|
|
4
4
|
import { generateImportMapJson } from "../services/ImportMapService.js";
|
|
5
|
-
import "next/script";
|
|
6
5
|
const ImportMapScripts = () => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
7
6
|
/* @__PURE__ */ jsx(
|
|
8
7
|
"script",
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
|
|
3
1
|
import { default as default_2 } from 'react';
|
|
4
2
|
|
|
5
3
|
export declare interface ComponentManifest {
|
|
@@ -42,15 +40,6 @@ export declare interface ImportMapConfig {
|
|
|
42
40
|
customImports?: Record<string, string>;
|
|
43
41
|
}
|
|
44
42
|
|
|
45
|
-
export declare const ImportMapScript: React.FC<ImportMapScriptProps>;
|
|
46
|
-
|
|
47
|
-
declare interface ImportMapScriptProps {
|
|
48
|
-
reactVersion?: string;
|
|
49
|
-
reactDomVersion?: string;
|
|
50
|
-
customImports?: Record<string, string>;
|
|
51
|
-
strategy?: 'beforeInteractive' | 'afterInteractive' | 'lazyOnload';
|
|
52
|
-
}
|
|
53
|
-
|
|
54
43
|
export declare const ImportMapScripts: default_2.FC;
|
|
55
44
|
|
|
56
45
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { fetchManifest } from "./services/fetchManifest.js";
|
|
2
2
|
import { ModuleLoader, moduleLoader } from "./services/moduleLoader.js";
|
|
3
3
|
import { generateImportMap, generateImportMapJson, getImportMapScriptProps, isImportMapSupported } from "./services/ImportMapService.js";
|
|
4
|
-
import { ImportMapScript } from "./services/ImportMapScript.js";
|
|
5
4
|
import { useRemoteComponent } from "./hooks/useRemoteComponent.js";
|
|
6
5
|
import { RemoteRenderer } from "./components/RemoteRenderer.js";
|
|
7
6
|
import { RemoteLinks } from "./components/RemoteLinks.js";
|
|
8
7
|
import { ImportMapScripts } from "./components/ImportMapScripts.js";
|
|
9
8
|
export {
|
|
10
|
-
ImportMapScript,
|
|
11
9
|
ImportMapScripts,
|
|
12
10
|
ModuleLoader,
|
|
13
11
|
RemoteLinks,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kaena1/mm-ui-shared-utils",
|
|
3
|
-
"version": "1.25.0-f-poc-EC-3301.
|
|
3
|
+
"version": "1.25.0-f-poc-EC-3301.5",
|
|
4
4
|
"description": "Shared utilities for loading remote React components in Mint Mobile microfrontends",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import Script from "next/script";
|
|
3
|
-
import { getImportMapScriptProps } from "./ImportMapService.js";
|
|
4
|
-
const ImportMapScript = ({
|
|
5
|
-
reactVersion,
|
|
6
|
-
reactDomVersion,
|
|
7
|
-
customImports,
|
|
8
|
-
strategy = "beforeInteractive"
|
|
9
|
-
}) => {
|
|
10
|
-
const scriptProps = getImportMapScriptProps({
|
|
11
|
-
reactVersion,
|
|
12
|
-
reactDomVersion,
|
|
13
|
-
customImports
|
|
14
|
-
});
|
|
15
|
-
return /* @__PURE__ */ jsx(
|
|
16
|
-
Script,
|
|
17
|
-
{
|
|
18
|
-
id: "remote-components-import-map",
|
|
19
|
-
strategy,
|
|
20
|
-
...scriptProps
|
|
21
|
-
}
|
|
22
|
-
);
|
|
23
|
-
};
|
|
24
|
-
export {
|
|
25
|
-
ImportMapScript
|
|
26
|
-
};
|