scordi-extension 1.15.10 → 1.15.12
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/.vite/manifest.json +15 -15
- package/dist/assets/index-BqQ8JinV.js +1 -0
- package/dist/assets/index-CVzjlC_s.js +1 -0
- package/dist/assets/index.ts-CD2jVezi.js +256 -0
- package/dist/assets/index.ts-mAOhzdZJ.js +238 -0
- package/dist/assets/internal-messages-BS1uEgeS.js +1 -0
- package/dist/assets/internal-messages-CP1ANEcL.js +1 -0
- package/dist/assets/main.tsx-CHn9k-P7.js +38 -0
- package/dist/assets/main.tsx-UFslEqbd.js +38 -0
- package/dist/assets/main.tsx-loader-CuF0J02t.js +13 -0
- package/dist/assets/main.tsx-loader-sjxNXQPw.js +13 -0
- package/dist/assets/types-Dzn4eD9c.js +22 -0
- package/dist/assets/types-q2_wITfk.js +4 -0
- package/dist/blocks/ExportDataBlock.d.ts +71 -0
- package/dist/blocks/ExportDataBlock.d.ts.map +1 -0
- package/dist/blocks/index.d.ts +41 -0
- package/dist/blocks/index.d.ts.map +1 -1
- package/dist/manifest.json +3 -2
- package/dist/sdk/index.cjs +4 -4
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +453 -406
- package/dist/src/blocks/AiParseDataBlock.ts.js +1 -1
- package/dist/src/blocks/ClearValueFormBlock.ts.js +1 -1
- package/dist/src/blocks/ElementExistsBlock.ts.js +1 -1
- package/dist/src/blocks/EventClickBlock.ts.js +1 -1
- package/dist/src/blocks/ExportDataBlock.ts.js +47 -0
- package/dist/src/blocks/FetchApiBlock.ts.js +1 -1
- package/dist/src/blocks/GetAttributeValueBlock.ts.js +1 -1
- package/dist/src/blocks/GetElementDataBlock.ts.js +1 -1
- package/dist/src/blocks/GetTextBlock.ts.js +1 -1
- package/dist/src/blocks/GetValueFormBlock.ts.js +1 -1
- package/dist/src/blocks/KeypressBlock.ts.js +1 -1
- package/dist/src/blocks/NavigateBlock.ts.js +1 -1
- package/dist/src/blocks/SaveAssetsBlock.ts.js +1 -1
- package/dist/src/blocks/ScrollBlock.ts.js +1 -1
- package/dist/src/blocks/SetValueFormBlock.ts.js +1 -1
- package/dist/src/blocks/TransformDataBlock.ts.js +2 -2
- package/dist/src/blocks/WaitBlock.ts.js +1 -1
- package/dist/src/blocks/WaitForConditionBlock.ts.js +1 -1
- package/dist/src/blocks/index.ts.js +9 -1
- package/dist/src/blocks/types.ts.js +1 -1
- package/dist/src/content/components/ConfirmationUI.tsx.js +3 -3
- package/dist/src/content/components/ExecutionStatusUI.tsx.js +3 -3
- package/dist/src/content/main.tsx.js +2 -2
- package/dist/src/types/internal-messages.ts.js +3 -0
- package/dist/types/internal-messages.d.ts +14 -1
- package/dist/types/internal-messages.d.ts.map +1 -1
- package/dist/vendor/.vite-deps-chunk-2TUXWMP5.js__v--29d58732.js +45 -0
- package/dist/vendor/.vite-deps-chunk-2TUXWMP5.js__v--34285d49.js +45 -0
- package/dist/vendor/.vite-deps-chunk-EL3BNLGW.js__v--29d58732.js +975 -0
- package/dist/vendor/.vite-deps-chunk-EL3BNLGW.js__v--34285d49.js +975 -0
- package/dist/vendor/.vite-deps-chunk-UW5CEYRC.js__v--29d58732.js +4154 -0
- package/dist/vendor/.vite-deps-chunk-UW5CEYRC.js__v--34285d49.js +4154 -0
- package/dist/vendor/.vite-deps-chunk-XHY3JSIG.js__v--29d58732.js +280 -0
- package/dist/vendor/.vite-deps-chunk-XHY3JSIG.js__v--34285d49.js +280 -0
- package/dist/vendor/.vite-deps-jsonata.js__v--34285d49.js +5761 -0
- package/dist/vendor/.vite-deps-jsonata.js__v--7496ecd5.js +5761 -0
- package/dist/vendor/.vite-deps-react-dom.js__v--1217aa43.js +6 -0
- package/dist/vendor/.vite-deps-react-dom.js__v--34285d49.js +6 -0
- package/dist/vendor/.vite-deps-react-dom_client.js__v--34285d49.js +18108 -0
- package/dist/vendor/.vite-deps-react-dom_client.js__v--8ec6d0f4.js +18108 -0
- package/dist/vendor/.vite-deps-react.js__v--1217aa43.js +5 -0
- package/dist/vendor/.vite-deps-react.js__v--34285d49.js +5 -0
- package/dist/vendor/.vite-deps-react_jsx-dev-runtime.js__v--1217aa43.js +281 -0
- package/dist/vendor/.vite-deps-react_jsx-dev-runtime.js__v--34285d49.js +281 -0
- package/dist/vendor/.vite-deps-zod.js__v--34285d49.js +222 -0
- package/dist/vendor/.vite-deps-zod.js__v--e4714212.js +222 -0
- package/dist/vendor/vite-client.js +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(t){return t&&t.isBlock===!0&&t.type==="EXECUTE_BLOCK"}function n(t){return t&&t.type==="CDP_CLICK"}function r(t){return t&&t.type==="CDP_KEYPRESS"}function i(t){return t&&t.type==="FETCH_API"}function u(t){return t&&t.type==="SHOW_EXECUTION_STATUS"}function s(t){return t&&t.type==="HIDE_EXECUTION_STATUS"}function E(t){return t&&t.$isError===!0}export{e as a,u as b,s as c,n as d,r as e,i as f,E as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function n(t){return t&&t.isBlock===!0&&t.type==="EXECUTE_BLOCK"}function r(t){return t&&t.type==="CDP_CLICK"}function e(t){return t&&t.type==="CDP_KEYPRESS"}function i(t){return t&&t.type==="FETCH_API"}function u(t){return t&&t.type==="EXPORT_DATA"}function s(t){return t&&t.type==="SHOW_EXECUTION_STATUS"}function E(t){return t&&t.type==="HIDE_EXECUTION_STATUS"}function o(t){return t&&t.$isError===!0}export{n as a,s as b,E as c,r as d,e,i as f,u as g,o as i};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CVzjlC_s.js","assets/types-q2_wITfk.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as k,a as h,j as l,c as g}from"./index-B45Q7XiR.js";import{i as b,a as v,b as S,c as C}from"./internal-messages-CP1ANEcL.js";const L="modulepreload",R=function(i){return"/"+i},w={},E=function(e,t,o){let n=Promise.resolve();if(t&&t.length>0){let a=function(c){return Promise.all(c.map(u=>Promise.resolve(u).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),d=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));n=a(t.map(c=>{if(c=R(c),c in w)return;w[c]=!0;const u=c.endsWith(".css"),m=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${m}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":L,u||(f.as="script"),f.crossOrigin="",f.href=c,d&&f.setAttribute("nonce",d),document.head.appendChild(f),u)return new Promise((p,x)=>{f.addEventListener("load",p),f.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${c}`)))})}))}function r(a){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=a,window.dispatchEvent(s),!s.defaultPrevented)throw a}return n.then(a=>{for(const s of a||[])s.status==="rejected"&&r(s.reason);return e().catch(r)})};class T{async sendToBackground(e){return new Promise((t,o)=>{chrome.runtime.sendMessage(e,n=>{chrome.runtime.lastError?o(new Error(chrome.runtime.lastError.message||"Communication error")):b(n)?o(new Error(n.message)):t(n)})})}async executeBlock(e){const{BlockHandler:t}=await E(async()=>{const{BlockHandler:n}=await import("./index-CVzjlC_s.js");return{BlockHandler:n}},__vite__mapDeps([0,1])),{synchronizedLock:o}=await E(async()=>{const{synchronizedLock:n}=await import("./index-CYVwV_2L.js");return{synchronizedLock:n}},[]);await o.getLock();try{return await t.executeBlock(e)}finally{o.releaseLock()}}async handleRuntimeMessage(e){if(e!=null&&e.isBlock&&(e==null?void 0:e.type)==="EXECUTE_BLOCK")try{return await this.executeBlock(e.data)}catch(t){return{$isError:!0,message:t instanceof Error?t.message:"Unknown error",data:{}}}throw new Error("Invalid message type")}sendToWebpage(e){window.postMessage(e,"*")}createErrorResponse(e,t){return{type:"8G_COLLECT_RESPONSE",requestId:e,success:!1,result:{error:t instanceof Error?t.message:"Unknown error",timestamp:new Date().toISOString()}}}createSuccessResponse(e,t){return{type:"8G_COLLECT_RESPONSE",requestId:e,success:!0,result:t}}}class I{constructor(e){this.kernel=e}initializeMessageListener(){chrome.runtime.onMessage.addListener((e,t,o)=>v(e)?(this.kernel.handleRuntimeMessage(e).then(n=>o(n)).catch(n=>o(this.kernel.createErrorResponse("",n))),!0):S(e)?(console.log("[InternalMessageHandler] Show execution status:",e.data),window.dispatchEvent(new CustomEvent("8g-show-execution-status",{detail:{message:e.data.message||"워크플로우 실행 중"}})),o({success:!0}),!1):(C(e)&&(console.log("[InternalMessageHandler] Hide execution status"),window.dispatchEvent(new CustomEvent("8g-hide-execution-status")),o({success:!0})),!1))}}class U{constructor(e){this.kernel=e}initializeMessageListener(){window.addEventListener("message",this.handleWindowMessage.bind(this))}async handleWindowMessage(e){if(e.source!==window)return;const t=e.data;switch(t.type){case"8G_EXTENSION_CHECK":this.handleExtensionCheck();break;case"8G_COLLECT_WORKFLOW":await this.handleCollectWorkflow(t);break}}handleExtensionCheck(){const e={type:"8G_EXTENSION_RESPONSE",installed:!0,version:"1.0.0"};this.kernel.sendToWebpage(e)}async handleCollectWorkflow(e){try{this.validateCollectWorkflowMessage(e);const t={type:"COLLECT_WORKFLOW_NEW_TAB",data:{targetUrl:e.targetUrl,workflow:e.workflow,closeTabAfterCollection:e.closeTabAfterCollection!==!1,activateTab:e.activateTab===!0}};try{const o=await this.kernel.sendToBackground(t),n=this.kernel.createSuccessResponse(e.requestId,o);this.kernel.sendToWebpage(n)}catch(o){const n=this.kernel.createErrorResponse(e.requestId,o);this.kernel.sendToWebpage(n)}}catch(t){const o=this.kernel.createErrorResponse(e.requestId,t);this.kernel.sendToWebpage(o)}}validateCollectWorkflowMessage(e){if(!e.targetUrl)throw new Error("Target URL is required");if(!e.workflow)throw new Error("Workflow is required");if(!e.workflow.start||!Array.isArray(e.workflow.steps))throw new Error("Workflow must have start and steps")}}var y=k();const _={"top-left":{top:"20px",left:"20px"},"top-right":{top:"20px",right:"20px"},"bottom-left":{bottom:"20px",left:"20px"},"bottom-right":{bottom:"20px",right:"20px"}};function M({message:i,buttonText:e,position:t,onConfirm:o,visible:n}){const[r,a]=h.useState(!1);h.useEffect(()=>{n?setTimeout(()=>a(!0),10):a(!1)},[n]);const s=()=>{const p=window.location.href.toLowerCase();return p.includes("login")||p.includes("signin")?"로그인 완료 후 확인 버튼을 클릭해주세요.":i};if(!n)return null;const d=()=>{a(!1),setTimeout(()=>{o()},200)},c={position:"fixed",..._[t],zIndex:2147483647,backgroundColor:"#ffffff",border:"2px solid #4f46e5",borderRadius:"12px",padding:"16px 20px",boxShadow:"0 10px 25px rgba(0, 0, 0, 0.2)",display:"flex",flexDirection:"column",gap:"12px",minWidth:"280px",maxWidth:"400px",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',transform:r?"scale(1)":"scale(0.9)",opacity:r?1:0,transition:"transform 0.2s ease-out, opacity 0.2s ease-out"},u={margin:0,fontSize:"14px",lineHeight:"1.5",color:"#1f2937",fontWeight:500},m={backgroundColor:"#4f46e5",color:"#ffffff",border:"none",borderRadius:"8px",padding:"10px 16px",fontSize:"14px",fontWeight:600,cursor:"pointer",transition:"background-color 0.2s ease",outline:"none"},f={backgroundColor:"#4338ca"};return y.createPortal(l.jsxs("div",{style:c,onClick:p=>p.stopPropagation(),children:[l.jsx("p",{style:u,children:s()}),l.jsx("button",{style:m,onMouseEnter:p=>{p.currentTarget.style.backgroundColor=f.backgroundColor},onMouseLeave:p=>{p.currentTarget.style.backgroundColor=m.backgroundColor},onClick:d,children:e})]}),document.body)}function W(){const[i,e]=h.useState({visible:!1,message:"",buttonText:"",position:"bottom-right",onConfirm:null});h.useEffect(()=>{const o=r=>{const a=r,{message:s,buttonText:d,position:c,onConfirm:u}=a.detail;console.log("[ConfirmationUI] Show event received:",{message:s,buttonText:d,position:c}),e({visible:!0,message:s,buttonText:d,position:c,onConfirm:u})},n=()=>{console.log("[ConfirmationUI] Hide event received"),e(r=>({...r,visible:!1}))};return window.addEventListener("8g-show-confirmation-ui",o),window.addEventListener("8g-hide-confirmation-ui",n),()=>{window.removeEventListener("8g-show-confirmation-ui",o),window.removeEventListener("8g-hide-confirmation-ui",n)}},[]);const t=()=>{console.log("[ConfirmationUI] User confirmed"),i.onConfirm&&i.onConfirm(),e(o=>({...o,visible:!1}))};return l.jsx(M,{message:i.message,buttonText:i.buttonText,position:i.position,onConfirm:t,visible:i.visible})}function j({visible:i,message:e="실행 중"}){const[t,o]=h.useState(!1);if(h.useEffect(()=>{i?setTimeout(()=>o(!0),10):o(!1)},[i]),!i)return null;const n={position:"fixed",top:"20px",left:"20px",zIndex:2147483647,backgroundColor:"#ffffff",border:"2px solid #818cf8",borderRadius:"12px",padding:"16px 20px",boxShadow:"0 10px 25px rgba(0, 0, 0, 0.2)",display:"flex",alignItems:"center",gap:"12px",minWidth:"200px",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',transform:t?"scale(1)":"scale(0.9)",opacity:t?1:0,transition:"transform 0.2s ease-out, opacity 0.2s ease-out"},r={position:"relative",width:"40px",height:"30px",overflow:"hidden"},a={fontSize:"24px",animation:"walkCat 2s ease-in-out infinite"},s={margin:0,fontSize:"14px",fontWeight:600,color:"#1f2937",display:"flex",alignItems:"center",gap:"4px"},d={display:"inline-block",width:"20px"};return y.createPortal(l.jsxs(l.Fragment,{children:[l.jsx("style",{children:`
|
|
3
|
+
@keyframes walkCat {
|
|
4
|
+
0%, 100% {
|
|
5
|
+
transform: translateX(0px);
|
|
6
|
+
}
|
|
7
|
+
50% {
|
|
8
|
+
transform: translateX(10px);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@keyframes dotBlink {
|
|
13
|
+
0%, 20% {
|
|
14
|
+
opacity: 0;
|
|
15
|
+
}
|
|
16
|
+
40% {
|
|
17
|
+
opacity: 1;
|
|
18
|
+
}
|
|
19
|
+
100% {
|
|
20
|
+
opacity: 0;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.dot-1 {
|
|
25
|
+
animation: dotBlink 1.5s infinite;
|
|
26
|
+
animation-delay: 0s;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.dot-2 {
|
|
30
|
+
animation: dotBlink 1.5s infinite;
|
|
31
|
+
animation-delay: 0.3s;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.dot-3 {
|
|
35
|
+
animation: dotBlink 1.5s infinite;
|
|
36
|
+
animation-delay: 0.6s;
|
|
37
|
+
}
|
|
38
|
+
`}),l.jsxs("div",{style:n,onClick:c=>c.stopPropagation(),children:[l.jsx("div",{style:r,children:l.jsx("span",{style:a,children:"🐱"})}),l.jsxs("p",{style:s,children:[e,l.jsxs("span",{style:d,children:[l.jsx("span",{className:"dot-1",children:"."}),l.jsx("span",{className:"dot-2",children:"."}),l.jsx("span",{className:"dot-3",children:"."})]})]})]})]}),document.body)}function H(){const[i,e]=h.useState({visible:!1,message:"실행 중"});return h.useEffect(()=>{const t=n=>{const r=n,{message:a}=r.detail||{};console.log("[ExecutionStatusUI] Show event received:",{message:a}),e({visible:!0,message:a||"실행 중"})},o=()=>{console.log("[ExecutionStatusUI] Hide event received"),e(n=>({...n,visible:!1}))};return window.addEventListener("8g-show-execution-status",t),window.addEventListener("8g-hide-execution-status",o),()=>{window.removeEventListener("8g-show-execution-status",t),window.removeEventListener("8g-hide-execution-status",o)}},[]),l.jsx(j,{visible:i.visible,message:i.message})}(()=>{if(window.is8gExtensionInjected)return;window.is8gExtensionInjected=!0,console.log("[8G Extension] Content script initialized on:",window.location.href);const i=new T,e=new I(i),t=new U(i);if(e.initializeMessageListener(),t.initializeMessageListener(),window.self===window.top){const n=()=>{const r=document.createElement("div");r.id="8g-confirmation-ui-root",r.style.cssText="all: initial; position: fixed; z-index: 2147483647;",document.body.appendChild(r),g.createRoot(r).render(l.jsx(W,{}));const s=document.createElement("div");s.id="8g-execution-status-ui-root",s.style.cssText="all: initial; position: fixed; z-index: 2147483647;",document.body.appendChild(s),g.createRoot(s).render(l.jsx(H,{})),console.log("[8G Extension] UI Components mounted (top frame only)")};document.body?n():document.addEventListener("DOMContentLoaded",n)}else console.log("[8G Extension] Skipping UI mount (inside iframe)")})();
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BqQ8JinV.js","assets/types-Dzn4eD9c.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as k,a as h,j as l,c as g}from"./index-B45Q7XiR.js";import{i as b,a as v,b as S,c as C}from"./internal-messages-BS1uEgeS.js";const L="modulepreload",R=function(i){return"/"+i},w={},E=function(e,t,o){let n=Promise.resolve();if(t&&t.length>0){let a=function(c){return Promise.all(c.map(u=>Promise.resolve(u).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),d=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));n=a(t.map(c=>{if(c=R(c),c in w)return;w[c]=!0;const u=c.endsWith(".css"),m=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${m}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":L,u||(f.as="script"),f.crossOrigin="",f.href=c,d&&f.setAttribute("nonce",d),document.head.appendChild(f),u)return new Promise((p,x)=>{f.addEventListener("load",p),f.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${c}`)))})}))}function r(a){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=a,window.dispatchEvent(s),!s.defaultPrevented)throw a}return n.then(a=>{for(const s of a||[])s.status==="rejected"&&r(s.reason);return e().catch(r)})};class T{async sendToBackground(e){return new Promise((t,o)=>{chrome.runtime.sendMessage(e,n=>{chrome.runtime.lastError?o(new Error(chrome.runtime.lastError.message||"Communication error")):b(n)?o(new Error(n.message)):t(n)})})}async executeBlock(e){const{BlockHandler:t}=await E(async()=>{const{BlockHandler:n}=await import("./index-BqQ8JinV.js");return{BlockHandler:n}},__vite__mapDeps([0,1])),{synchronizedLock:o}=await E(async()=>{const{synchronizedLock:n}=await import("./index-CYVwV_2L.js");return{synchronizedLock:n}},[]);await o.getLock();try{return await t.executeBlock(e)}finally{o.releaseLock()}}async handleRuntimeMessage(e){if(e!=null&&e.isBlock&&(e==null?void 0:e.type)==="EXECUTE_BLOCK")try{return await this.executeBlock(e.data)}catch(t){return{$isError:!0,message:t instanceof Error?t.message:"Unknown error",data:{}}}throw new Error("Invalid message type")}sendToWebpage(e){window.postMessage(e,"*")}createErrorResponse(e,t){return{type:"8G_COLLECT_RESPONSE",requestId:e,success:!1,result:{error:t instanceof Error?t.message:"Unknown error",timestamp:new Date().toISOString()}}}createSuccessResponse(e,t){return{type:"8G_COLLECT_RESPONSE",requestId:e,success:!0,result:t}}}class I{constructor(e){this.kernel=e}initializeMessageListener(){chrome.runtime.onMessage.addListener((e,t,o)=>v(e)?(this.kernel.handleRuntimeMessage(e).then(n=>o(n)).catch(n=>o(this.kernel.createErrorResponse("",n))),!0):S(e)?(console.log("[InternalMessageHandler] Show execution status:",e.data),window.dispatchEvent(new CustomEvent("8g-show-execution-status",{detail:{message:e.data.message||"워크플로우 실행 중"}})),o({success:!0}),!1):(C(e)&&(console.log("[InternalMessageHandler] Hide execution status"),window.dispatchEvent(new CustomEvent("8g-hide-execution-status")),o({success:!0})),!1))}}class U{constructor(e){this.kernel=e}initializeMessageListener(){window.addEventListener("message",this.handleWindowMessage.bind(this))}async handleWindowMessage(e){if(e.source!==window)return;const t=e.data;switch(t.type){case"8G_EXTENSION_CHECK":this.handleExtensionCheck();break;case"8G_COLLECT_WORKFLOW":await this.handleCollectWorkflow(t);break}}handleExtensionCheck(){const e={type:"8G_EXTENSION_RESPONSE",installed:!0,version:"1.0.0"};this.kernel.sendToWebpage(e)}async handleCollectWorkflow(e){try{this.validateCollectWorkflowMessage(e);const t={type:"COLLECT_WORKFLOW_NEW_TAB",data:{targetUrl:e.targetUrl,workflow:e.workflow,closeTabAfterCollection:e.closeTabAfterCollection!==!1,activateTab:e.activateTab===!0}};try{const o=await this.kernel.sendToBackground(t),n=this.kernel.createSuccessResponse(e.requestId,o);this.kernel.sendToWebpage(n)}catch(o){const n=this.kernel.createErrorResponse(e.requestId,o);this.kernel.sendToWebpage(n)}}catch(t){const o=this.kernel.createErrorResponse(e.requestId,t);this.kernel.sendToWebpage(o)}}validateCollectWorkflowMessage(e){if(!e.targetUrl)throw new Error("Target URL is required");if(!e.workflow)throw new Error("Workflow is required");if(!e.workflow.start||!Array.isArray(e.workflow.steps))throw new Error("Workflow must have start and steps")}}var y=k();const _={"top-left":{top:"20px",left:"20px"},"top-right":{top:"20px",right:"20px"},"bottom-left":{bottom:"20px",left:"20px"},"bottom-right":{bottom:"20px",right:"20px"}};function M({message:i,buttonText:e,position:t,onConfirm:o,visible:n}){const[r,a]=h.useState(!1);h.useEffect(()=>{n?setTimeout(()=>a(!0),10):a(!1)},[n]);const s=()=>{const p=window.location.href.toLowerCase();return p.includes("login")||p.includes("signin")?"로그인 완료 후 확인 버튼을 클릭해주세요.":i};if(!n)return null;const d=()=>{a(!1),setTimeout(()=>{o()},200)},c={position:"fixed",..._[t],zIndex:2147483647,backgroundColor:"#ffffff",border:"2px solid #4f46e5",borderRadius:"12px",padding:"16px 20px",boxShadow:"0 10px 25px rgba(0, 0, 0, 0.2)",display:"flex",flexDirection:"column",gap:"12px",minWidth:"280px",maxWidth:"400px",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',transform:r?"scale(1)":"scale(0.9)",opacity:r?1:0,transition:"transform 0.2s ease-out, opacity 0.2s ease-out"},u={margin:0,fontSize:"14px",lineHeight:"1.5",color:"#1f2937",fontWeight:500},m={backgroundColor:"#4f46e5",color:"#ffffff",border:"none",borderRadius:"8px",padding:"10px 16px",fontSize:"14px",fontWeight:600,cursor:"pointer",transition:"background-color 0.2s ease",outline:"none"},f={backgroundColor:"#4338ca"};return y.createPortal(l.jsxs("div",{style:c,onClick:p=>p.stopPropagation(),children:[l.jsx("p",{style:u,children:s()}),l.jsx("button",{style:m,onMouseEnter:p=>{p.currentTarget.style.backgroundColor=f.backgroundColor},onMouseLeave:p=>{p.currentTarget.style.backgroundColor=m.backgroundColor},onClick:d,children:e})]}),document.body)}function W(){const[i,e]=h.useState({visible:!1,message:"",buttonText:"",position:"bottom-right",onConfirm:null});h.useEffect(()=>{const o=r=>{const a=r,{message:s,buttonText:d,position:c,onConfirm:u}=a.detail;console.log("[ConfirmationUI] Show event received:",{message:s,buttonText:d,position:c}),e({visible:!0,message:s,buttonText:d,position:c,onConfirm:u})},n=()=>{console.log("[ConfirmationUI] Hide event received"),e(r=>({...r,visible:!1}))};return window.addEventListener("8g-show-confirmation-ui",o),window.addEventListener("8g-hide-confirmation-ui",n),()=>{window.removeEventListener("8g-show-confirmation-ui",o),window.removeEventListener("8g-hide-confirmation-ui",n)}},[]);const t=()=>{console.log("[ConfirmationUI] User confirmed"),i.onConfirm&&i.onConfirm(),e(o=>({...o,visible:!1}))};return l.jsx(M,{message:i.message,buttonText:i.buttonText,position:i.position,onConfirm:t,visible:i.visible})}function j({visible:i,message:e="실행 중"}){const[t,o]=h.useState(!1);if(h.useEffect(()=>{i?setTimeout(()=>o(!0),10):o(!1)},[i]),!i)return null;const n={position:"fixed",top:"20px",left:"20px",zIndex:2147483647,backgroundColor:"#ffffff",border:"2px solid #818cf8",borderRadius:"12px",padding:"16px 20px",boxShadow:"0 10px 25px rgba(0, 0, 0, 0.2)",display:"flex",alignItems:"center",gap:"12px",minWidth:"200px",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',transform:t?"scale(1)":"scale(0.9)",opacity:t?1:0,transition:"transform 0.2s ease-out, opacity 0.2s ease-out"},r={position:"relative",width:"40px",height:"30px",overflow:"hidden"},a={fontSize:"24px",animation:"walkCat 2s ease-in-out infinite"},s={margin:0,fontSize:"14px",fontWeight:600,color:"#1f2937",display:"flex",alignItems:"center",gap:"4px"},d={display:"inline-block",width:"20px"};return y.createPortal(l.jsxs(l.Fragment,{children:[l.jsx("style",{children:`
|
|
3
|
+
@keyframes walkCat {
|
|
4
|
+
0%, 100% {
|
|
5
|
+
transform: translateX(0px);
|
|
6
|
+
}
|
|
7
|
+
50% {
|
|
8
|
+
transform: translateX(10px);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@keyframes dotBlink {
|
|
13
|
+
0%, 20% {
|
|
14
|
+
opacity: 0;
|
|
15
|
+
}
|
|
16
|
+
40% {
|
|
17
|
+
opacity: 1;
|
|
18
|
+
}
|
|
19
|
+
100% {
|
|
20
|
+
opacity: 0;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.dot-1 {
|
|
25
|
+
animation: dotBlink 1.5s infinite;
|
|
26
|
+
animation-delay: 0s;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.dot-2 {
|
|
30
|
+
animation: dotBlink 1.5s infinite;
|
|
31
|
+
animation-delay: 0.3s;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.dot-3 {
|
|
35
|
+
animation: dotBlink 1.5s infinite;
|
|
36
|
+
animation-delay: 0.6s;
|
|
37
|
+
}
|
|
38
|
+
`}),l.jsxs("div",{style:n,onClick:c=>c.stopPropagation(),children:[l.jsx("div",{style:r,children:l.jsx("span",{style:a,children:"🐱"})}),l.jsxs("p",{style:s,children:[e,l.jsxs("span",{style:d,children:[l.jsx("span",{className:"dot-1",children:"."}),l.jsx("span",{className:"dot-2",children:"."}),l.jsx("span",{className:"dot-3",children:"."})]})]})]})]}),document.body)}function H(){const[i,e]=h.useState({visible:!1,message:"실행 중"});return h.useEffect(()=>{const t=n=>{const r=n,{message:a}=r.detail||{};console.log("[ExecutionStatusUI] Show event received:",{message:a}),e({visible:!0,message:a||"실행 중"})},o=()=>{console.log("[ExecutionStatusUI] Hide event received"),e(n=>({...n,visible:!1}))};return window.addEventListener("8g-show-execution-status",t),window.addEventListener("8g-hide-execution-status",o),()=>{window.removeEventListener("8g-show-execution-status",t),window.removeEventListener("8g-hide-execution-status",o)}},[]),l.jsx(j,{visible:i.visible,message:i.message})}(()=>{if(window.is8gExtensionInjected)return;window.is8gExtensionInjected=!0,console.log("[8G Extension] Content script initialized on:",window.location.href);const i=new T,e=new I(i),t=new U(i);if(e.initializeMessageListener(),t.initializeMessageListener(),window.self===window.top){const n=()=>{const r=document.createElement("div");r.id="8g-confirmation-ui-root",r.style.cssText="all: initial; position: fixed; z-index: 2147483647;",document.body.appendChild(r),g.createRoot(r).render(l.jsx(W,{}));const s=document.createElement("div");s.id="8g-execution-status-ui-root",s.style.cssText="all: initial; position: fixed; z-index: 2147483647;",document.body.appendChild(s),g.createRoot(s).render(l.jsx(H,{})),console.log("[8G Extension] UI Components mounted (top frame only)")};document.body?n():document.addEventListener("DOMContentLoaded",n)}else console.log("[8G Extension] Skipping UI mount (inside iframe)")})();
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
(function () {
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const injectTime = performance.now();
|
|
5
|
+
(async () => {
|
|
6
|
+
const { onExecute } = await import(
|
|
7
|
+
/* @vite-ignore */
|
|
8
|
+
chrome.runtime.getURL("assets/main.tsx-UFslEqbd.js")
|
|
9
|
+
);
|
|
10
|
+
onExecute?.({ perf: { injectTime, loadTime: performance.now() - injectTime } });
|
|
11
|
+
})().catch(console.error);
|
|
12
|
+
|
|
13
|
+
})();
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
(function () {
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const injectTime = performance.now();
|
|
5
|
+
(async () => {
|
|
6
|
+
const { onExecute } = await import(
|
|
7
|
+
/* @vite-ignore */
|
|
8
|
+
chrome.runtime.getURL("assets/main.tsx-CHn9k-P7.js")
|
|
9
|
+
);
|
|
10
|
+
onExecute?.({ perf: { injectTime, loadTime: performance.now() - injectTime } });
|
|
11
|
+
})().catch(console.error);
|
|
12
|
+
|
|
13
|
+
})();
|