@glodon-aiot/embed 1.3.4-beta.0
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/README.md +1 -0
- package/dist/embed.js +103 -0
- package/dist/embed.umd.cjs +17 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/utils/index.d.ts +5 -0
- package/package.json +77 -0
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
README
|
package/dist/embed.js
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var n=document.createElement("style");n.appendChild(document.createTextNode(".handler-btn{width:100%;height:100%}.handler-btn .minify-btn{width:10px;height:10px;background:rgba(0,0,0,.3);display:none;border-radius:5px;font-size:8px;text-align:center;position:absolute;left:0;top:0;line-height:10px}.handler-btn .minify-btn:hover,.handler-btn .minify-btn:active{background:rgba(0,0,0,.6)}.handler-btn .action-btn:has(.minify-right)+.minify-btn{display:none}.handler-btn:hover,.handler-btn:hover .minify-btn{display:block}")),document.head.appendChild(n)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
+
const M = `<svg xmlns="http://www.w3.org/2000/svg" width="26" height="26" viewBox="0 0 26 26" fill="none">
|
|
3
|
+
<path d="M21.4914 2.03125H10.482C8.45078 2.03125 6.78516 3.69687 6.78516 5.76875V14.1781C6.78516 16.25 8.45078 17.9156 10.482 17.9156H16.982L19.582 20.3125C20.3133 21.0031 21.5727 20.5156 21.5727 19.5V17.875C23.5633 17.875 25.1883 16.2094 25.1883 14.1781V5.76875C25.1883 3.69687 23.5227 2.03125 21.4914 2.03125Z" fill="#9C24F2"/>
|
|
4
|
+
<path d="M15.5187 5.36249H4.50937C2.47812 5.36249 0.8125 7.02811 0.8125 9.09999V17.5094C0.8125 19.5406 2.4375 21.2062 4.42812 21.2469V22.8719C4.42812 23.8875 5.6875 24.375 6.41875 23.6844L9.01875 21.2875H15.5187C17.55 21.2875 19.2156 19.6219 19.2156 17.55V9.09999C19.2156 7.02811 17.55 5.36249 15.5187 5.36249Z" fill="#C47DFF"/>
|
|
5
|
+
<path d="M10.5619 11.7406H5.72754C5.28066 11.7406 4.91504 11.375 4.91504 10.9281V10.6844C4.91504 10.2375 5.28066 9.87189 5.72754 9.87189H10.5619C11.0088 9.87189 11.3744 10.2375 11.3744 10.6844V10.9281C11.3744 11.375 11.0088 11.7406 10.5619 11.7406ZM13.3244 15.6H5.72754C5.28066 15.6 4.91504 15.2344 4.91504 14.7875V14.5438C4.91504 14.0969 5.28066 13.7313 5.72754 13.7313H13.2838C13.7307 13.7313 14.0963 14.0969 14.0963 14.5438V14.7875C14.1369 15.2344 13.7713 15.6 13.3244 15.6Z" fill="white"/>
|
|
6
|
+
</svg>`, $ = '<svg t="1728647045306" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2120" width="16" height="16"><path d="M489.344 705.28L148.032 363.968l45.248-45.248L512 637.44l318.72-318.72 45.248 45.248-341.376 341.312a32 32 0 0 1-45.248 0z" p-id="2121"></path></svg>', V = '<svg t="1728647093338" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2262" width="16" height="16"><path d="M534.656 318.72l341.312 341.312-45.248 45.248L512 386.56 193.28 705.28l-45.248-45.248L489.408 318.72a32 32 0 0 1 45.248 0z" p-id="2263"></path></svg>', D = '<svg t="1728647153848" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1960" width="16" height="16"><path d="M318.72 489.344L660.032 148.032l45.248 45.248L386.56 512l318.72 318.72-45.248 45.248-341.312-341.376a32 32 0 0 1 0-45.248z" p-id="1961"></path></svg>', z = '<svg t="1728647222368" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1851" width="16" height="16"><path d="M705.28 534.656L363.968 875.968l-45.248-45.248L637.44 512l-318.72-318.72 45.248-45.248 341.312 341.376a32 32 0 0 1 0 45.248z" p-id="1852"></path></svg>';
|
|
7
|
+
let L = !1;
|
|
8
|
+
function E(t, a, d) {
|
|
9
|
+
t.addEventListener ? t.addEventListener(a, d, !1) : t.attachEvent("on" + a, function(p) {
|
|
10
|
+
return d.call(t, p);
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
const N = (t, a) => {
|
|
14
|
+
let d, p, b, C, g, w, x, r, h, f, u, y = function(n) {
|
|
15
|
+
n = n || event, d = n.currentTarget.offsetLeft, p = n.currentTarget.offsetTop, b = n.clientX, C = n.clientY, g = !0, w = 0, x = document.documentElement.clientWidth, r = 0, h = document.documentElement.clientHeight, f = t.offsetHeight, u = t.offsetWidth, n.stopPropagation(), n.preventDefault();
|
|
16
|
+
}, o = function(n) {
|
|
17
|
+
if (!g)
|
|
18
|
+
return;
|
|
19
|
+
f = t.offsetHeight, u = t.offsetWidth;
|
|
20
|
+
const l = document.getElementById("ai-chat-window-ele");
|
|
21
|
+
l && l.style && l.style.display !== "none" && (l.style.display = "none"), L = !0, n = n || event;
|
|
22
|
+
let i = n.clientX, e = n.clientY, s = d + (i - b), v = p + (e - C), I = s, T = s + u, B = v, k = v + f;
|
|
23
|
+
x - T < 0 ? (s = x - u + 20, a("right")) : a(""), I - w < 0 && (s = w), B - r < 0 ? v = r : h - k < 0 && (v = h - f), t.style.left = s + "px", t.style.top = v + "px";
|
|
24
|
+
}, m = function(n) {
|
|
25
|
+
g = !1, t.releaseCapture && t.releaseCapture(), setTimeout(() => {
|
|
26
|
+
L = !1;
|
|
27
|
+
}, 100);
|
|
28
|
+
}, c = function(n) {
|
|
29
|
+
n = n || event, n.preventDefault ? n.preventDefault() : n.returnValue = !1, t.setCapture && t.setCapture();
|
|
30
|
+
};
|
|
31
|
+
E(t, "mousedown", y), E(t, "mousedown", c), E(document, "mousemove", o), E(document, "mouseup", m);
|
|
32
|
+
}, H = () => {
|
|
33
|
+
const t = window.chatConfig;
|
|
34
|
+
if (!t)
|
|
35
|
+
return;
|
|
36
|
+
const a = t.token;
|
|
37
|
+
t.applicationId;
|
|
38
|
+
const d = t.iconUrl, p = t.isDev, b = t.isTest;
|
|
39
|
+
t.type;
|
|
40
|
+
const C = t.header, g = p ? "cvforcepd" : "cvforce", w = window.location.hash.includes("/embed/application") || window.location.hash.includes("/agent/application") || window.location.hash.includes("/aecpilot/application");
|
|
41
|
+
if (a) {
|
|
42
|
+
if (w)
|
|
43
|
+
return;
|
|
44
|
+
const x = t.url, r = t.width || "380px", h = t.height || "600px", f = p || b ? "aiot-dev" : "copilot", u = t.baseUrl || `https://${f}.glodon.com`, y = d ? `<img style='width: 100%' src='${d}' />` : M;
|
|
45
|
+
if (!document.getElementById("ai-chat-pannel-ele")) {
|
|
46
|
+
const o = document.createElement("div");
|
|
47
|
+
o.id = "ai-chat-pannel-ele", o.style.cssText = "position: fixed; bottom: 72px; right: 24px; width: 40px; height: 40px; border-radius: 20px; background-color: #fff; filter: drop-shadow(0px 1px 10px rgba(0, 0, 0, 0.05)) drop-shadow(0px 4px 5px rgba(0, 0, 0, 0.08)) drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.12)); cursor: pointer; z-index: 2147483647";
|
|
48
|
+
const m = document.createElement("div");
|
|
49
|
+
m.className = "handler-btn";
|
|
50
|
+
const c = document.createElement("div");
|
|
51
|
+
c.className = "action-btn", c.style.cssText = "display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;box-sizing: border-box; padding: 6px;", c.innerHTML = y, m.appendChild(c);
|
|
52
|
+
const n = (i) => {
|
|
53
|
+
let e;
|
|
54
|
+
switch (i) {
|
|
55
|
+
case "left":
|
|
56
|
+
e = z;
|
|
57
|
+
break;
|
|
58
|
+
case "right":
|
|
59
|
+
e = D;
|
|
60
|
+
break;
|
|
61
|
+
case "top":
|
|
62
|
+
e = $;
|
|
63
|
+
break;
|
|
64
|
+
case "bottom":
|
|
65
|
+
e = V;
|
|
66
|
+
break;
|
|
67
|
+
default:
|
|
68
|
+
e = y;
|
|
69
|
+
}
|
|
70
|
+
c.innerHTML = i ? `<div class="minify-${i}" style="display: flex;left: 2px;position: absolute;">${e}</div>` : e;
|
|
71
|
+
}, l = document.createElement("div");
|
|
72
|
+
l.innerHTML = "x", l.className = "minify-btn", l.addEventListener("click", (i) => {
|
|
73
|
+
o.style.left = document.body.clientWidth - parseInt(o.style.width) / 2 + "px", n("right");
|
|
74
|
+
const e = document.getElementById("ai-chat-window-ele");
|
|
75
|
+
e && e.style && e.style.display !== "none" && (e.style.display = "none"), i.stopPropagation();
|
|
76
|
+
}), m.appendChild(l), o.appendChild(m), document.body.appendChild(o), o.addEventListener("click", function() {
|
|
77
|
+
if (L)
|
|
78
|
+
return;
|
|
79
|
+
const i = o.getBoundingClientRect(), e = document.getElementById("ai-chat-window-ele");
|
|
80
|
+
if (e)
|
|
81
|
+
e.style.display === "none" ? (e.style.display = "block", i.top < parseInt(h.toString()) ? (e.style.top = "55px", e.style.bottom = "") : (e.style.bottom = "55px", e.style.top = ""), i.left < parseInt(r.toString()) ? (e.style.left = "0", e.style.right = "") : (e.style.left = "", e.style.right = "0")) : e.style.display = "none";
|
|
82
|
+
else {
|
|
83
|
+
const s = document.createElement("iframe");
|
|
84
|
+
s.id = "ai-chat-window-ele", s.src = x || `${u}/portal/_/${g}/fe/embedaecpilot/?token=${a}${C === !1 ? "&header=false" : ""}&t=${Date.now()}`, s.style.cssText = `
|
|
85
|
+
border: none;
|
|
86
|
+
position: absolute;
|
|
87
|
+
${i.top < Number(h) ? "top: 55px;" : "bottom: 55px;"}
|
|
88
|
+
${i.left < Number(r) ? "left: 0;" : "right: 0;"}
|
|
89
|
+
border-radius: 4px;
|
|
90
|
+
width: ${r};
|
|
91
|
+
height: ${h};
|
|
92
|
+
box-shadow: 0px 1px 10px 0px rgba(0, 0, 0, 0.05), 0px 4px 5px 0px rgba(0, 0, 0, 0.08), 0px 2px 4px -1px rgba(0, 0, 0, 0.12);
|
|
93
|
+
user-select: none;
|
|
94
|
+
background: #fff;
|
|
95
|
+
z-index: 2147483647;`, s.allowFullscreen = !0, o.appendChild(s);
|
|
96
|
+
}
|
|
97
|
+
c.innerHTML = y, parseInt(o.style.left) + parseInt(o.style.width) > document.body.clientWidth && (o.style.left = "");
|
|
98
|
+
}), N(o, n);
|
|
99
|
+
}
|
|
100
|
+
} else
|
|
101
|
+
console.error("请配置token和applicationId");
|
|
102
|
+
};
|
|
103
|
+
document.readyState == "complete" ? H() : document.body.onload = H;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var n=document.createElement("style");n.appendChild(document.createTextNode(".handler-btn{width:100%;height:100%}.handler-btn .minify-btn{width:10px;height:10px;background:rgba(0,0,0,.3);display:none;border-radius:5px;font-size:8px;text-align:center;position:absolute;left:0;top:0;line-height:10px}.handler-btn .minify-btn:hover,.handler-btn .minify-btn:active{background:rgba(0,0,0,.6)}.handler-btn .action-btn:has(.minify-right)+.minify-btn{display:none}.handler-btn:hover,.handler-btn:hover .minify-btn{display:block}")),document.head.appendChild(n)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
+
(function(b){typeof define=="function"&&define.amd?define(b):b()})(function(){"use strict";const b=`<svg xmlns="http://www.w3.org/2000/svg" width="26" height="26" viewBox="0 0 26 26" fill="none">
|
|
3
|
+
<path d="M21.4914 2.03125H10.482C8.45078 2.03125 6.78516 3.69687 6.78516 5.76875V14.1781C6.78516 16.25 8.45078 17.9156 10.482 17.9156H16.982L19.582 20.3125C20.3133 21.0031 21.5727 20.5156 21.5727 19.5V17.875C23.5633 17.875 25.1883 16.2094 25.1883 14.1781V5.76875C25.1883 3.69687 23.5227 2.03125 21.4914 2.03125Z" fill="#9C24F2"/>
|
|
4
|
+
<path d="M15.5187 5.36249H4.50937C2.47812 5.36249 0.8125 7.02811 0.8125 9.09999V17.5094C0.8125 19.5406 2.4375 21.2062 4.42812 21.2469V22.8719C4.42812 23.8875 5.6875 24.375 6.41875 23.6844L9.01875 21.2875H15.5187C17.55 21.2875 19.2156 19.6219 19.2156 17.55V9.09999C19.2156 7.02811 17.55 5.36249 15.5187 5.36249Z" fill="#C47DFF"/>
|
|
5
|
+
<path d="M10.5619 11.7406H5.72754C5.28066 11.7406 4.91504 11.375 4.91504 10.9281V10.6844C4.91504 10.2375 5.28066 9.87189 5.72754 9.87189H10.5619C11.0088 9.87189 11.3744 10.2375 11.3744 10.6844V10.9281C11.3744 11.375 11.0088 11.7406 10.5619 11.7406ZM13.3244 15.6H5.72754C5.28066 15.6 4.91504 15.2344 4.91504 14.7875V14.5438C4.91504 14.0969 5.28066 13.7313 5.72754 13.7313H13.2838C13.7307 13.7313 14.0963 14.0969 14.0963 14.5438V14.7875C14.1369 15.2344 13.7713 15.6 13.3244 15.6Z" fill="white"/>
|
|
6
|
+
</svg>`,T='<svg t="1728647045306" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2120" width="16" height="16"><path d="M489.344 705.28L148.032 363.968l45.248-45.248L512 637.44l318.72-318.72 45.248 45.248-341.376 341.312a32 32 0 0 1-45.248 0z" p-id="2121"></path></svg>',B='<svg t="1728647093338" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2262" width="16" height="16"><path d="M534.656 318.72l341.312 341.312-45.248 45.248L512 386.56 193.28 705.28l-45.248-45.248L489.408 318.72a32 32 0 0 1 45.248 0z" p-id="2263"></path></svg>',k='<svg t="1728647153848" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1960" width="16" height="16"><path d="M318.72 489.344L660.032 148.032l45.248 45.248L386.56 512l318.72 318.72-45.248 45.248-341.312-341.376a32 32 0 0 1 0-45.248z" p-id="1961"></path></svg>',M='<svg t="1728647222368" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1851" width="16" height="16"><path d="M705.28 534.656L363.968 875.968l-45.248-45.248L637.44 512l-318.72-318.72 45.248-45.248 341.312 341.376a32 32 0 0 1 0 45.248z" p-id="1852"></path></svg>',W="";let H=!1;function C(e,a,d){e.addEventListener?e.addEventListener(a,d,!1):e.attachEvent("on"+a,function(p){return d.call(e,p)})}const $=(e,a)=>{let d,p,E,L,g,w,x,r,f,h,u,y=function(n){n=n||event,d=n.currentTarget.offsetLeft,p=n.currentTarget.offsetTop,E=n.clientX,L=n.clientY,g=!0,w=0,x=document.documentElement.clientWidth,r=0,f=document.documentElement.clientHeight,h=e.offsetHeight,u=e.offsetWidth,n.stopPropagation(),n.preventDefault()},o=function(n){if(!g)return;h=e.offsetHeight,u=e.offsetWidth;const l=document.getElementById("ai-chat-window-ele");l&&l.style&&l.style.display!=="none"&&(l.style.display="none"),H=!0,n=n||event;let i=n.clientX,t=n.clientY,s=d+(i-E),v=p+(t-L),V=s,D=s+u,z=v,N=v+h;x-D<0?(s=x-u+20,a("right")):a(""),V-w<0&&(s=w),z-r<0?v=r:f-N<0&&(v=f-h),e.style.left=s+"px",e.style.top=v+"px"},m=function(n){g=!1,e.releaseCapture&&e.releaseCapture(),setTimeout(()=>{H=!1},100)},c=function(n){n=n||event,n.preventDefault?n.preventDefault():n.returnValue=!1,e.setCapture&&e.setCapture()};C(e,"mousedown",y),C(e,"mousedown",c),C(document,"mousemove",o),C(document,"mouseup",m)},I=()=>{const e=window.chatConfig;if(!e)return;const a=e.token;e.applicationId;const d=e.iconUrl,p=e.isDev,E=e.isTest;e.type;const L=e.header,g=p?"cvforcepd":"cvforce",w=window.location.hash.includes("/embed/application")||window.location.hash.includes("/agent/application")||window.location.hash.includes("/aecpilot/application");if(a){if(w)return;const x=e.url,r=e.width||"380px",f=e.height||"600px",h=p||E?"aiot-dev":"copilot",u=e.baseUrl||`https://${h}.glodon.com`,y=d?`<img style='width: 100%' src='${d}' />`:b;if(!document.getElementById("ai-chat-pannel-ele")){const o=document.createElement("div");o.id="ai-chat-pannel-ele",o.style.cssText="position: fixed; bottom: 72px; right: 24px; width: 40px; height: 40px; border-radius: 20px; background-color: #fff; filter: drop-shadow(0px 1px 10px rgba(0, 0, 0, 0.05)) drop-shadow(0px 4px 5px rgba(0, 0, 0, 0.08)) drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.12)); cursor: pointer; z-index: 2147483647";const m=document.createElement("div");m.className="handler-btn";const c=document.createElement("div");c.className="action-btn",c.style.cssText="display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;box-sizing: border-box; padding: 6px;",c.innerHTML=y,m.appendChild(c);const n=i=>{let t;switch(i){case"left":t=M;break;case"right":t=k;break;case"top":t=T;break;case"bottom":t=B;break;default:t=y}c.innerHTML=i?`<div class="minify-${i}" style="display: flex;left: 2px;position: absolute;">${t}</div>`:t},l=document.createElement("div");l.innerHTML="x",l.className="minify-btn",l.addEventListener("click",i=>{o.style.left=document.body.clientWidth-parseInt(o.style.width)/2+"px",n("right");const t=document.getElementById("ai-chat-window-ele");t&&t.style&&t.style.display!=="none"&&(t.style.display="none"),i.stopPropagation()}),m.appendChild(l),o.appendChild(m),document.body.appendChild(o),o.addEventListener("click",function(){if(H)return;const i=o.getBoundingClientRect(),t=document.getElementById("ai-chat-window-ele");if(t)t.style.display==="none"?(t.style.display="block",i.top<parseInt(f.toString())?(t.style.top="55px",t.style.bottom=""):(t.style.bottom="55px",t.style.top=""),i.left<parseInt(r.toString())?(t.style.left="0",t.style.right=""):(t.style.left="",t.style.right="0")):t.style.display="none";else{const s=document.createElement("iframe");s.id="ai-chat-window-ele",s.src=x||`${u}/portal/_/${g}/fe/embedaecpilot/?token=${a}${L===!1?"&header=false":""}&t=${Date.now()}`,s.style.cssText=`
|
|
7
|
+
border: none;
|
|
8
|
+
position: absolute;
|
|
9
|
+
${i.top<Number(f)?"top: 55px;":"bottom: 55px;"}
|
|
10
|
+
${i.left<Number(r)?"left: 0;":"right: 0;"}
|
|
11
|
+
border-radius: 4px;
|
|
12
|
+
width: ${r};
|
|
13
|
+
height: ${f};
|
|
14
|
+
box-shadow: 0px 1px 10px 0px rgba(0, 0, 0, 0.05), 0px 4px 5px 0px rgba(0, 0, 0, 0.08), 0px 2px 4px -1px rgba(0, 0, 0, 0.12);
|
|
15
|
+
user-select: none;
|
|
16
|
+
background: #fff;
|
|
17
|
+
z-index: 2147483647;`,s.allowFullscreen=!0,o.appendChild(s)}c.innerHTML=y,parseInt(o.style.left)+parseInt(o.style.width)>document.body.clientWidth&&(o.style.left="")}),$(o,n)}}else console.error("请配置token和applicationId")};document.readyState=="complete"?I():document.body.onload=I});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const defaultIcon = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"26\" height=\"26\" viewBox=\"0 0 26 26\" fill=\"none\">\n <path d=\"M21.4914 2.03125H10.482C8.45078 2.03125 6.78516 3.69687 6.78516 5.76875V14.1781C6.78516 16.25 8.45078 17.9156 10.482 17.9156H16.982L19.582 20.3125C20.3133 21.0031 21.5727 20.5156 21.5727 19.5V17.875C23.5633 17.875 25.1883 16.2094 25.1883 14.1781V5.76875C25.1883 3.69687 23.5227 2.03125 21.4914 2.03125Z\" fill=\"#9C24F2\"/>\n <path d=\"M15.5187 5.36249H4.50937C2.47812 5.36249 0.8125 7.02811 0.8125 9.09999V17.5094C0.8125 19.5406 2.4375 21.2062 4.42812 21.2469V22.8719C4.42812 23.8875 5.6875 24.375 6.41875 23.6844L9.01875 21.2875H15.5187C17.55 21.2875 19.2156 19.6219 19.2156 17.55V9.09999C19.2156 7.02811 17.55 5.36249 15.5187 5.36249Z\" fill=\"#C47DFF\"/>\n <path d=\"M10.5619 11.7406H5.72754C5.28066 11.7406 4.91504 11.375 4.91504 10.9281V10.6844C4.91504 10.2375 5.28066 9.87189 5.72754 9.87189H10.5619C11.0088 9.87189 11.3744 10.2375 11.3744 10.6844V10.9281C11.3744 11.375 11.0088 11.7406 10.5619 11.7406ZM13.3244 15.6H5.72754C5.28066 15.6 4.91504 15.2344 4.91504 14.7875V14.5438C4.91504 14.0969 5.28066 13.7313 5.72754 13.7313H13.2838C13.7307 13.7313 14.0963 14.0969 14.0963 14.5438V14.7875C14.1369 15.2344 13.7713 15.6 13.3244 15.6Z\" fill=\"white\"/>\n </svg>";
|
|
2
|
+
export declare const minifyIconTop = "<svg t=\"1728647045306\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"2120\" width=\"16\" height=\"16\"><path d=\"M489.344 705.28L148.032 363.968l45.248-45.248L512 637.44l318.72-318.72 45.248 45.248-341.376 341.312a32 32 0 0 1-45.248 0z\" p-id=\"2121\"></path></svg>";
|
|
3
|
+
export declare const minifyIconBottom = "<svg t=\"1728647093338\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"2262\" width=\"16\" height=\"16\"><path d=\"M534.656 318.72l341.312 341.312-45.248 45.248L512 386.56 193.28 705.28l-45.248-45.248L489.408 318.72a32 32 0 0 1 45.248 0z\" p-id=\"2263\"></path></svg>";
|
|
4
|
+
export declare const minifyIconRight = "<svg t=\"1728647153848\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"1960\" width=\"16\" height=\"16\"><path d=\"M318.72 489.344L660.032 148.032l45.248 45.248L386.56 512l318.72 318.72-45.248 45.248-341.312-341.376a32 32 0 0 1 0-45.248z\" p-id=\"1961\"></path></svg>";
|
|
5
|
+
export declare const minifyIconLeft = "<svg t=\"1728647222368\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"1851\" width=\"16\" height=\"16\"><path d=\"M705.28 534.656L363.968 875.968l-45.248-45.248L637.44 512l-318.72-318.72 45.248-45.248 341.312 341.376a32 32 0 0 1 0 45.248z\" p-id=\"1852\"></path></svg>";
|
package/package.json
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@glodon-aiot/embed",
|
|
3
|
+
"version": "1.3.4-beta.0",
|
|
4
|
+
"author": "glodoncv",
|
|
5
|
+
"description": "aiot libembeds",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"aiot",
|
|
9
|
+
"aiot-embed"
|
|
10
|
+
],
|
|
11
|
+
"files": [
|
|
12
|
+
"dist"
|
|
13
|
+
],
|
|
14
|
+
"module": "./dist/embed.js",
|
|
15
|
+
"main": "./dist/embed.umd.cjs",
|
|
16
|
+
"typings": "./dist/src/index.d.ts",
|
|
17
|
+
"exports": {
|
|
18
|
+
"import": "./dist/embed.js",
|
|
19
|
+
"require": "./dist/embed.umd.cjs",
|
|
20
|
+
"types": "./dist/dist/src/index.d.ts"
|
|
21
|
+
},
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"scripts": {
|
|
24
|
+
"dev": "vite",
|
|
25
|
+
"start": "vite",
|
|
26
|
+
"build": "tsc && vite build --mode prod",
|
|
27
|
+
"watch": "tsc && vite build --mode prod --watch",
|
|
28
|
+
"preview": "vite preview",
|
|
29
|
+
"check": "yarn prettier --check .",
|
|
30
|
+
"write": "yarn prettier --write .",
|
|
31
|
+
"lint": "eslint --ext .tsx,.ts --fix ./example -c .eslintrc.js",
|
|
32
|
+
"storybook": "start-storybook -p 6006",
|
|
33
|
+
"docs": "start-storybook -p 6006",
|
|
34
|
+
"build-storybook": "build-storybook",
|
|
35
|
+
"cy-open": "yarn run cypress open"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@babel/core": "^7.20.12",
|
|
39
|
+
"@commitlint/cli": "^17.0.3",
|
|
40
|
+
"@commitlint/config-conventional": "^17.0.3",
|
|
41
|
+
"@rollup/plugin-typescript": "^11.0.0",
|
|
42
|
+
"@storybook/addon-actions": "^6.5.16",
|
|
43
|
+
"@storybook/addon-essentials": "^6.5.16",
|
|
44
|
+
"@storybook/addon-interactions": "^6.5.16",
|
|
45
|
+
"@storybook/addon-links": "6.5.16",
|
|
46
|
+
"@storybook/builder-vite": "^0.4.0",
|
|
47
|
+
"@storybook/react": "^6.5.16",
|
|
48
|
+
"@storybook/testing-library": "^0.0.13",
|
|
49
|
+
"@types/react": "^17.0.44",
|
|
50
|
+
"@types/react-dom": "^17.0.17",
|
|
51
|
+
"@typescript-eslint/eslint-plugin": "^5.35.1",
|
|
52
|
+
"@typescript-eslint/parser": "^5.35.1",
|
|
53
|
+
"@vitejs/plugin-react": "^3.1.0",
|
|
54
|
+
"babel-loader": "^8.3.0",
|
|
55
|
+
"cypress": "^12.5.1",
|
|
56
|
+
"eslint": "^8.0.1",
|
|
57
|
+
"eslint-config-prettier": "^8.5.0",
|
|
58
|
+
"eslint-config-standard-with-typescript": "^22.0.0",
|
|
59
|
+
"eslint-plugin-import": "^2.25.2",
|
|
60
|
+
"eslint-plugin-n": "^15.0.0",
|
|
61
|
+
"eslint-plugin-promise": "^6.0.0",
|
|
62
|
+
"eslint-plugin-react": "^7.31.0",
|
|
63
|
+
"eslint-plugin-storybook": "^0.6.10",
|
|
64
|
+
"less": "^4.1.2",
|
|
65
|
+
"prettier": "2.7.1",
|
|
66
|
+
"require-from-string": "^2.0.2",
|
|
67
|
+
"typescript": "*",
|
|
68
|
+
"vite": "^4.1.1"
|
|
69
|
+
},
|
|
70
|
+
"publishConfig": {
|
|
71
|
+
"access": "public",
|
|
72
|
+
"registry": "https://registry.npmjs.org/"
|
|
73
|
+
},
|
|
74
|
+
"lint-staged": {
|
|
75
|
+
"*.{js,css,md,jsx,less,ts,tsx,json}": "prettier --write"
|
|
76
|
+
}
|
|
77
|
+
}
|