@liascript/editor 1.1.7--0.16.7 → 1.1.8--0.16.8

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.
Files changed (42) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/Worker.c04a8a05.js +1 -0
  3. package/dist/ace.js +1 -1
  4. package/dist/ext-code_lens.js +1 -1
  5. package/dist/ext-inline_autocomplete.js +1 -1
  6. package/dist/ext-language_tools.js +1 -1
  7. package/dist/ext-modelist.js +1 -1
  8. package/dist/ext-options.js +1 -1
  9. package/dist/ext-prompt.js +1 -1
  10. package/dist/ext-settings_menu.js +1 -1
  11. package/dist/index.35802a0e.js +6 -0
  12. package/dist/index.45c7d25b.js +1 -0
  13. package/dist/index.78fa4e96.js +1 -0
  14. package/dist/index.7a6c2cd7.js +1 -0
  15. package/dist/{index.b598fbf1.css → index.a7f8120a.css} +1 -1
  16. package/dist/{index.a5e28e41.js → index.de102c9d.js} +1 -1
  17. package/dist/index.html +1 -1
  18. package/dist/katex.min.css +1 -1
  19. package/dist/keybinding-vim.js +1 -1
  20. package/dist/mode-basic.js +1 -0
  21. package/dist/mode-java.js +1 -1
  22. package/dist/mode-scala.js +1 -1
  23. package/dist/mode-vue.js +1 -1
  24. package/dist/mode-wollok.js +1 -1
  25. package/dist/snippets/basic.js +1 -0
  26. package/package.json +4 -4
  27. package/dist/Base.d8e1fc60.js +0 -1
  28. package/dist/Worker.12f8469e.js +0 -1
  29. package/dist/index.04ffda95.js +0 -1
  30. package/dist/index.11db52ff.js +0 -1
  31. package/dist/index.2aba4af3.js +0 -1
  32. package/dist/index.2fe8b0a8.js +0 -1
  33. package/dist/index.4ae92b65.js +0 -1
  34. package/dist/index.521670e0.js +0 -1
  35. package/dist/index.6108e64a.js +0 -1
  36. package/dist/index.8c310518.js +0 -1
  37. package/dist/index.93e7ade3.js +0 -1
  38. package/dist/index.a8c5f041.js +0 -6
  39. package/dist/index.b5bb4a4e.js +0 -34
  40. package/dist/index.ce81be0a.js +0 -1
  41. package/dist/index.e92897e0.js +0 -6
  42. package/dist/pako.esm.e6a51df7.js +0 -1
@@ -1 +0,0 @@
1
- !function(){function t(t,e,i,n){Object.defineProperty(t,e,{get:i,set:n,enumerable:!0,configurable:!0})}var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i={},n={},s=e.parcelRequirea18f;null==s&&((s=function(t){if(t in i)return i[t].exports;if(t in n){var e=n[t];delete n[t];var s={id:t,exports:{}};return i[t]=s,e.call(s.exports,s,s.exports),s.exports}var r=new Error("Cannot find module '"+t+"'");throw r.code="MODULE_NOT_FOUND",r}).register=function(t,e){n[t]=e},e.parcelRequirea18f=s),s.register("3gU5S",(function(e,i){t(e.exports,"initTooltip",(function(){return f}));var n=s("iLAck"),r=s("eWsJW"),o=s("axlxN"),c=s("7YIDk");const l="lia-tooltip",a=/(?:https?:)(?:\/\/)liascript\.github\.io\/course\/\?(.+\.md)/i;var h=Object();class u extends HTMLElement{sourceUrl="";cache=null;isFetching=!1;isClicked=!1;isActive=!1;lightMode=!0;constructor(){super()}connectedCallback(){this.sourceUrl=this.getAttribute("src")||"",this.sourceUrl&&(this.sourceUrl.endsWith("/")&&(this.sourceUrl=this.sourceUrl.slice(0,-1)),this.container=document.getElementById(l)||void 0,this.container&&this.firstChild&&(this.firstChild.addEventListener("mouseenter",this._onmouseenter),this.firstChild.addEventListener("mouseout",this._onmouseout),this.firstChild.addEventListener("click",this._onclick),this.firstChild.addEventListener("focus",this._onfocus),this.firstChild.addEventListener("focusout",this._onfocusout),this.firstChild.addEventListener("keyup",this._onescape)))}disconnectedCallback(){this.firstChild&&(this.firstChild.removeEventListener("mouseenter",this._onmouseenter),this.firstChild.removeEventListener("mouseout",this._onmouseout),this.firstChild.removeEventListener("click",this._onclick),this.firstChild.removeEventListener("focus",this._onfocus),this.firstChild.removeEventListener("focusout",this._onfocusout),this.firstChild.removeEventListener("keyup",this._onescape))}_onclick(){const t=this.parentElement;t.isActive=!1,t.isClicked=!0}_onescape(t){if("Escape"===t.code){const t=this.parentElement;t.setAttribute("data-active","false"),t.deactivate()}}_onmouseenter(){this.style.cursor="progress";const t=this.getBoundingClientRect();this.parentElement.activate(t.left+t.width/2,t.top+t.height/2)}_onmouseout(){this.parentElement.deactivate()}_onfocus(t){const e=this.getBoundingClientRect();this.parentElement.activate(e.left+e.width/2,e.top+e.height/2)}_onfocusout(){const t=this.parentElement;t.container&&t.container.setAttribute("data-active","false"),t.deactivate()}activate(t,e){if(this.container){if(this.isActive=!0,this.isClicked)return void(this.isClicked=!1);if(this.container.style.left=t-425*t/window.innerWidth+"px",1.5*e>window.innerHeight?(this.container.style.top="",this.container.style.bottom=window.innerHeight-e+10+"px"):(this.container.style.top=`${e+10}px`,this.container.style.bottom=""),this.cache)this.show();else if(h[this.sourceUrl])this.cache=h[this.sourceUrl],this.show();else if(!this.isFetching){this.isFetching=!0;let e=this,i=this.sourceUrl.match(a);if(i)r.fetch(i[1],(function(t,i){e.cache=d(e.sourceUrl,i.title,i.description,i.logo,i.logo_alt),e.show()}));else try{n.extract(this.sourceUrl,{}).then((t=>{e.cache=d(e.sourceUrl,t.title,void 0,t.thumbnail_url),e.show()})).catch((t=>{g(this.sourceUrl,(function(t){e.parse(t)}))}))}catch(t){}}}}deactivate(){this.container&&"false"===this.container.getAttribute("data-active")&&(this.isActive=!1,this.container.style.display="none",this.container.style.zIndex="-1000")}parse(t){if(null!==this.cache)return void this.show();let e=c.parse(this.sourceUrl,t);if("string"==typeof e.image){const t=e.image.match(/.*?%22(.*)\/%22/);t&&2==t.length&&(e.image=t[1])}this.cache=d(e.url,e.title,e.description,e.image,e.image_alt),""===this.cache&&(this.container=void 0),this.show()}show(){this.container&&this.cache&&this.isActive&&(this.lightMode?(this.container.style.background="white",this.container.style.boxShadow="0 30px 90px -20px rgba(0, 0, 0, 0.3)"):(this.container.style.background="#202020",this.container.style.boxShadow="0 30px 90px -20px rgba(120, 120, 120, 0.3)"),this.container.style.zIndex="20000",this.container.style.display="inline-block",this.container.innerHTML=this.cache),this.firstChild&&(this.firstChild.style.cursor="")}set light(t){this.lightMode!==t&&(this.lightMode=t,this.show())}get light(){return this.lightMode}}function d(t,e,i,n,s){if(!t)return"";t=t.replace(o.PROXY,"");let r="";if(n)try{o.allowedProtocol(n)||(n=new URL(n,t).toString()),r+=`<img src="${n}" ${s=s?`alt="${s}"`:""} style="background-color:white; margin-bottom: 1.5rem;">`}catch(t){}return e&&(r+=`<h4>${e}</h4>`),i&&(r+=i),""!=r&&(r+=`<hr style="border: 0px; height:1px; background:#888;"/><a style="font-size:x-small; display:block" href="${t}" target="_blank">${t}</a>`),h[t]=r,r}function f(){document.getElementById(l)||setTimeout((function(){const t=document.createElement("div");t.id=l,t.style.zIndex="-1000",t.style.width="425px",t.style.padding="15px",t.style.background="white",t.style.boxShadow="0 30px 90px -20px rgba(0, 0, 0, 0.3)",t.style.position="fixed",t.style.display="none",t.style.maxHeight="480px",t.style.overflow="auto",t.setAttribute("data-active","true"),t.addEventListener("mouseenter",(()=>{t.style.display="inline-block",t.style.zIndex="20000",t.setAttribute("data-active","true")})),t.addEventListener("mouseleave",(()=>{t.style.display="none",t.style.zIndex="-1000",t.setAttribute("data-active","false")})),document.body.appendChild(t)}),0)}function g(t,e,i=0){if(0==i&&function(t){return!!t.search(/wikipedia\.org/gi)}(t))return void g(o.PROXY+t,e,1);let n=new XMLHttpRequest;n.open("GET",t,!0),n.onload=function(t){if(4===n.readyState&&200===n.status)try{let i=n.responseText;try{i=JSON.parse(i).contents}catch(t){}e(i)}catch(t){console.warn("fetching",t)}},n.onerror=function(n){0===i&&g(o.PROXY+t,e,1)},n.send()}customElements.define("preview-link",u)})),s.register("7YIDk",(function(e,i){t(e.exports,"parse",(function(){return u}));var n=s("axlxN");const r=/href=[\"'](.*?)[\"']/gi,o=/src=[\"'](.*?)[\"']/gi,c=/alt=[\"'](.*?)[\"']/gi,l=/<h1.*?>(.*?)<\/h1>/gi,a=/<h2.*?>(.*?)<\/h2>/gi,h=/<title>(.*?)<\/title>/gi;function u(t,e){const i=function(t){const e=p("og:image",t);if(e)return{url:e,alt:p("og:image:alt",t)};const i=g(/<link.*?rel=[\"']image_src[\"'].*?>/gi,t);if(i)return{url:g(r,i)};const n=p("twitter:image",t);if(n)return{url:n,alt:p("twitter:image:alt",t)};const s=g(/<img .*?>/gi,t);return s?{url:g(o,s),alt:g(c,s)}:{}}(e),n=new URL(function(t){return g(/<base.*?href\s*=\s*[\"'](.*?)[\"']>/gi,t)}(e)||t);return{url:t,title:d(e),description:f(n,e),image:i.url,image_alt:i.alt}}function d(t){const e=p("og:title",t);if(e&&e.length>0)return e;const i=p("twitter:title",t);if(i&&i.length>0)return i;const n=g(h,t);if(n&&n.length>0)return n;const s=g(l,t);if(s&&s.length>0)return s;const r=g(a,t);return r&&r.length>0?r:void 0}function f(t,e){const i=p("og:description",e);if(i&&i.length>0)return i;const s=p("twitter:description",e);if(s&&s.length>0)return s;const r=g(/<meta.*?name=[\"']description[\"'].*?>/gi,e);if(r){const t=g(/content=[\"'](.*?)[\"']/gi,r);if(t&&t.length>0)return t}let o=g(/<p>([\s\S]+?)<\/p>/gi,e);return o?(o=o.replace(/(href|src)\s*=\s*[\"'].*?[\"']/g,(function(e){return function(t,e){const i=e.search(/[\"']/);e.startsWith("href")&&(e+=' target="blank_"');const s=e.slice(0,i+1),r=e.slice(i+1);return n.allowedProtocol(s)||r.startsWith("//")?e:r.startsWith("/")?s+t.origin+r:r.startsWith("#")?s+t.href+r:s+t.origin+"/"+r}(t,e)})),o):void 0}function g(t,e){const i=e.matchAll(t).next();return i.value?i.value[i.value.length-1]:void 0}function p(t,e){const i=g(new RegExp(`<meta[^>]+?property=["']${t}["'][^>]*?>`,"gi"),e);if(i)return g(/content=[\"'](.*?)[\"']/gi,i)}})),s("3gU5S")}();