@archilogic/plugin-container 0.0.0-20240209175834
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/dist/assets/index-WgfBxxC8.js +7 -0
- package/dist/index.html +12 -0
- package/package.json +19 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))s(e);new MutationObserver(e=>{for(const t of e)if(t.type==="childList")for(const r of t.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&s(r)}).observe(document,{childList:!0,subtree:!0});function o(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?t.credentials="include":e.crossOrigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function s(e){if(e.ep)return;e.ep=!0;const t=o(e);fetch(e.href,t)}})();const p="modulepreload",y=function(n){return"/"+n},m={},P=function(i,o,s){let e=Promise.resolve();if(o&&o.length>0){const t=document.getElementsByTagName("link");e=Promise.all(o.map(r=>{if(r=y(r),r in m)return;m[r]=!0;const c=r.endsWith(".css"),g=c?'[rel="stylesheet"]':"";if(!!s)for(let u=t.length-1;u>=0;u--){const f=t[u];if(f.href===r&&(!c||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${r}"]${g}`))return;const l=document.createElement("link");if(l.rel=c?"stylesheet":p,c||(l.as="script",l.crossOrigin=""),l.href=r,document.head.appendChild(l),c)return new Promise((u,f)=>{l.addEventListener("load",u),l.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${r}`)))})}))}return e.then(()=>i()).catch(t=>{const r=new Event("vite:preloadError",{cancelable:!0});if(r.payload=t,window.dispatchEvent(r),!r.defaultPrevented)throw t})},h=new URLSearchParams(window.location.search),a=h.get("pluginUrl"),d=h.get("pluginName"),v=({pluginModule:n,container:i,url:o,name:s})=>{if(typeof n.runPlugin!="function")throw new Error(`${s}: could not find plugin method ${pluginMethod} in ${o}`);n.runPlugin({pluginModule:n,container:i,url:o,name:s})};try{console.info(`${d}: loading plugin from ${a}`),P(()=>import(a),__vite__mapDeps([])).then(n=>{console.info(`${d}: loaded plugin from ${a}`),v({pluginModule:n,container:document.getElementById("app"),url:a,name:d})})}catch(n){console.error(`${d}: error loading plugin from ${a}`,n)}
|
|
2
|
+
function __vite__mapDeps(indexes) {
|
|
3
|
+
if (!__vite__mapDeps.viteFileDeps) {
|
|
4
|
+
__vite__mapDeps.viteFileDeps = []
|
|
5
|
+
}
|
|
6
|
+
return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
|
|
7
|
+
}
|
package/dist/index.html
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>Archilogic Plugin Container</title>
|
|
7
|
+
<script type="module" crossorigin src="/assets/index-WgfBxxC8.js"></script>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div id="app"></div>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
package/package.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@archilogic/plugin-container",
|
|
3
|
+
"description": "An HTML container for Archilogic plugins",
|
|
4
|
+
"version": "0.0.0-20240209175834",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
12
|
+
"scripts": {
|
|
13
|
+
"dev": "vite",
|
|
14
|
+
"build": "vite build"
|
|
15
|
+
},
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"vite": "^5.1.0"
|
|
18
|
+
}
|
|
19
|
+
}
|