@contember/echo 0.0.23 → 0.0.24
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/echo.es.js +11 -9
- package/dist/echo.umd.js +1 -1
- package/package.json +1 -1
package/dist/echo.es.js
CHANGED
|
@@ -6904,26 +6904,28 @@ function tf(e) {
|
|
|
6904
6904
|
primaryColor: t = "#6227dc",
|
|
6905
6905
|
onSubmit: r,
|
|
6906
6906
|
textConfig: n = {}
|
|
6907
|
-
} = e, s = ms(Af, n), i =
|
|
6907
|
+
} = e, s = ms(Af, n), i = document.createElement("div");
|
|
6908
|
+
i.id = "echo-container", document.body.appendChild(i);
|
|
6909
|
+
const o = Ji(() => p(zu, {
|
|
6908
6910
|
position: A,
|
|
6909
6911
|
primaryColor: t,
|
|
6910
6912
|
textConfig: s,
|
|
6911
|
-
onSubmit: async (
|
|
6913
|
+
onSubmit: async (B) => {
|
|
6912
6914
|
try {
|
|
6913
6915
|
await r({
|
|
6914
|
-
...
|
|
6916
|
+
...B,
|
|
6915
6917
|
console: Hs()
|
|
6916
6918
|
});
|
|
6917
|
-
} catch (
|
|
6918
|
-
throw console.error("Error in Echo onSubmit handler:",
|
|
6919
|
+
} catch (c) {
|
|
6920
|
+
throw console.error("Error in Echo onSubmit handler:", c), c;
|
|
6919
6921
|
}
|
|
6920
6922
|
}
|
|
6921
|
-
}),
|
|
6922
|
-
i(), ua(), Qt = null;
|
|
6923
|
+
}), i), a = () => {
|
|
6924
|
+
o(), i.remove(), ua(), Qt = null;
|
|
6923
6925
|
};
|
|
6924
|
-
return window.addEventListener("unload",
|
|
6926
|
+
return window.addEventListener("unload", a, {
|
|
6925
6927
|
once: !0
|
|
6926
|
-
}), Qt =
|
|
6928
|
+
}), Qt = a, a;
|
|
6927
6929
|
} catch (A) {
|
|
6928
6930
|
throw console.error("Echo initialization failed:", A), A;
|
|
6929
6931
|
}
|
package/dist/echo.umd.js
CHANGED
|
@@ -26,4 +26,4 @@ Location: ${t}:${r}:${n}`,timestamp:new Date().toISOString()})}))},Zs=()=>{cA&&(
|
|
|
26
26
|
--primary-color: ${e.primaryColor};
|
|
27
27
|
--primary-text-color: ${Ys(e.primaryColor)};
|
|
28
28
|
}
|
|
29
|
-
`;t(r)}),(()=>{var r=yu();return y(r,Lg,null),y(r,A,null),r})()},Su=()=>{const e=sA();return[(()=>{var A=Iu();return y(A,u.createComponent(cu,{}),null),y(A,u.createComponent(fu,{}),null),y(A,u.createComponent(gu,{}),null),u.createRenderEffect(()=>d(A,"data-hidden",e.widget.state.isOpen)),A})(),(()=>{var A=bu();return y(A,u.createComponent(Hu,{}),null),y(A,u.createComponent(Au,{}),null),y(A,u.createComponent(mu,{}),null),u.createRenderEffect(()=>d(A,"data-hidden",!e.widget.state.isOpen)),A})()]},Du=e=>{let A;const t=sA(),r=()=>{requestAnimationFrame(()=>{A&&(A.style.height="0px",A.style.height=`${document.documentElement.scrollHeight}px`,t.widget.setState({dimensions:{width:document.documentElement.clientWidth,height:document.documentElement.scrollHeight}}))})};return JA({event:"resize",callback:r,onMount:r}),Rs("Escape",()=>{t.widget.setState({isOpen:!1})}),Nt({target:document.documentElement,options:{childList:!0,subtree:!0,attributes:!0},callback:()=>{r()}}),(()=>{var n=xu(),a=A;return typeof a=="function"?ue(a,n):A=n,y(n,()=>e.children),u.createRenderEffect(s=>{var o=t.drawing.state.isDrawing,i=`${t.widget.state.dimensions.height}px`,B=`${t.widget.state.dimensions.width}px`;return o!==s.e&&d(n,"data-drawing",s.e=o),i!==s.t&&((s.t=i)!=null?n.style.setProperty("height",i):n.style.removeProperty("height")),B!==s.a&&((s.a=B)!=null?n.style.setProperty("width",B):n.style.removeProperty("width")),s},{e:void 0,t:void 0,a:void 0}),n})()},Tu={welcomeMessage:{text:"Click here to leave feedback",closeAriaLabel:"Close welcome message"},feedbackForm:{title:"Send Feedback",placeholder:"What's on your mind? We'd love to hear your feedback...",screenshotAlt:"Screenshot Preview",submitButton:"Send Feedback",minimizeTitle:"Minimize",expandTitle:"Expand",closeTitle:"Close",showFormTitle:"Show Feedback Form"},notification:{successTitle:"Thank you for your feedback!",errorTitle:"Something went wrong.",errorMessage:"Failed to send feedback. Please try again.",hideTitle:"Hide notification"},drawingTooltip:{text:"Click & drag to draw"}};let kt=null;function Ou(e){kt&&(console.warn("Echo widget is already initialized. Cleaning up previous instance..."),kt());try{Hg(e),Ws();const{position:A="bottom-right",primaryColor:t="#6227dc",onSubmit:r,textConfig:n={}}=e,a=sn(Tu,n),s=ys(()=>u.createComponent(Ku,{position:A,primaryColor:t,textConfig:a,onSubmit:async
|
|
29
|
+
`;t(r)}),(()=>{var r=yu();return y(r,Lg,null),y(r,A,null),r})()},Su=()=>{const e=sA();return[(()=>{var A=Iu();return y(A,u.createComponent(cu,{}),null),y(A,u.createComponent(fu,{}),null),y(A,u.createComponent(gu,{}),null),u.createRenderEffect(()=>d(A,"data-hidden",e.widget.state.isOpen)),A})(),(()=>{var A=bu();return y(A,u.createComponent(Hu,{}),null),y(A,u.createComponent(Au,{}),null),y(A,u.createComponent(mu,{}),null),u.createRenderEffect(()=>d(A,"data-hidden",!e.widget.state.isOpen)),A})()]},Du=e=>{let A;const t=sA(),r=()=>{requestAnimationFrame(()=>{A&&(A.style.height="0px",A.style.height=`${document.documentElement.scrollHeight}px`,t.widget.setState({dimensions:{width:document.documentElement.clientWidth,height:document.documentElement.scrollHeight}}))})};return JA({event:"resize",callback:r,onMount:r}),Rs("Escape",()=>{t.widget.setState({isOpen:!1})}),Nt({target:document.documentElement,options:{childList:!0,subtree:!0,attributes:!0},callback:()=>{r()}}),(()=>{var n=xu(),a=A;return typeof a=="function"?ue(a,n):A=n,y(n,()=>e.children),u.createRenderEffect(s=>{var o=t.drawing.state.isDrawing,i=`${t.widget.state.dimensions.height}px`,B=`${t.widget.state.dimensions.width}px`;return o!==s.e&&d(n,"data-drawing",s.e=o),i!==s.t&&((s.t=i)!=null?n.style.setProperty("height",i):n.style.removeProperty("height")),B!==s.a&&((s.a=B)!=null?n.style.setProperty("width",B):n.style.removeProperty("width")),s},{e:void 0,t:void 0,a:void 0}),n})()},Tu={welcomeMessage:{text:"Click here to leave feedback",closeAriaLabel:"Close welcome message"},feedbackForm:{title:"Send Feedback",placeholder:"What's on your mind? We'd love to hear your feedback...",screenshotAlt:"Screenshot Preview",submitButton:"Send Feedback",minimizeTitle:"Minimize",expandTitle:"Expand",closeTitle:"Close",showFormTitle:"Show Feedback Form"},notification:{successTitle:"Thank you for your feedback!",errorTitle:"Something went wrong.",errorMessage:"Failed to send feedback. Please try again.",hideTitle:"Hide notification"},drawingTooltip:{text:"Click & drag to draw"}};let kt=null;function Ou(e){kt&&(console.warn("Echo widget is already initialized. Cleaning up previous instance..."),kt());try{Hg(e),Ws();const{position:A="bottom-right",primaryColor:t="#6227dc",onSubmit:r,textConfig:n={}}=e,a=sn(Tu,n),s=document.createElement("div");s.id="echo-container",document.body.appendChild(s);const o=ys(()=>u.createComponent(Ku,{position:A,primaryColor:t,textConfig:a,onSubmit:async B=>{try{await r({...B,console:on()})}catch(c){throw console.error("Error in Echo onSubmit handler:",c),c}}}),s),i=()=>{o(),s.remove(),Zs(),kt=null};return window.addEventListener("unload",i,{once:!0}),kt=i,i}catch(A){throw console.error("Echo initialization failed:",A),A}}MA.initEcho=Ou,Object.defineProperty(MA,Symbol.toStringTag,{value:"Module"})});
|