@agrotools1/at-mf-utils 0.1.5 → 0.1.7

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,11 +1,13 @@
1
1
  declare type IResponse = {
2
- mount: (tag: string) => void;
2
+ mount: (tag: string, props?: Record<string, any>) => void;
3
3
  unmount: () => void;
4
4
  defaultImport: any;
5
5
  };
6
6
  /**
7
7
  * @param moduleId Valor da propriedade `name` do `package.json` do módulo
8
8
  * @param url URL do módulo
9
+ *
10
+ * Não cacheie o objeto de retorno da `getModule`. Se precisar de um valor do objeto, chame a função novamente.
9
11
  */
10
12
  export default function getModule(moduleId: string, url: string): Promise<IResponse>;
11
13
  export {};
@@ -1 +1 @@
1
- function r(){const e=document.querySelectorAll('link[from="athost"]');for(let t=0;t<e.length;t++)e[t].remove()}function i(e){const t=document.getElementById(e);t&&t.remove()}async function d(e,t){return await __webpack_init_sharing__?.("default"),new Promise(c=>{const s=`remote-entry-${e}`,n=document.createElement("script");r(),i(s),n.type="text/javascript",n.src=t,n.defer=!0,n.async=!0,n.id=s,document.head.appendChild(n),n.onload=async()=>{const a=window[e],u=typeof __webpack_share_scopes__<"u"?__webpack_share_scopes__:null;await a?.init(u?.default);const o=(await(await a.get?.(e))().default)?.default,l={...o||{},defaultImport:o,unmount:()=>{o?.unmount&&o.unmount(),r(),i(s)}};c(l)}})}export{d as default};
1
+ function r(){const e=document.querySelectorAll('link[from="athost"]');for(let t=0;t<e.length;t++)e[t].remove()}function i(e){const t=document.getElementById(e);t&&t.remove()}async function d(e,t){return await __webpack_init_sharing__?.("default"),new Promise(c=>{const o=`remote-entry-${e}`,n=document.createElement("script");r(),i(o),n.type="text/javascript",n.src=t,n.defer=!0,n.async=!0,n.id=o,document.head.appendChild(n),n.onload=async()=>{const s=window[e],l=typeof __webpack_share_scopes__<"u"?__webpack_share_scopes__:null;await s?.init(l?.default);const a=(await(await s.get?.(e))().default)?.default,p={...a||{},defaultImport:a,unmount:()=>{document.getElementById("agrotools-app")?.remove(),r(),i(o)}};c(p)}})}export{d as default};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@agrotools1/at-mf-utils",
3
3
  "type": "module",
4
- "version": "0.1.5",
4
+ "version": "0.1.7",
5
5
  "private": false,
6
6
  "packageManager": "pnpm@9.1.0",
7
7
  "description": "Métodos utilitários de MF da Agrotools",