@liascript/editor 1.1.34--0.17.9 → 1.1.34--1.0.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.
Files changed (49) hide show
  1. package/CHANGELOG.md +17 -1
  2. package/dist/ace.js +1 -1
  3. package/dist/ext-diff.js +1 -1
  4. package/dist/ext-inline_autocomplete.js +1 -1
  5. package/dist/ext-language_tools.js +1 -1
  6. package/dist/ext-options.js +1 -1
  7. package/dist/ext-prompt.js +1 -1
  8. package/dist/ext-settings_menu.js +1 -1
  9. package/dist/icon.1234bfbe.svg +1 -0
  10. package/dist/{icon.1775260a.ttf → icon.66170d1c.ttf} +0 -0
  11. package/dist/icon.7f5db96d.woff +0 -0
  12. package/dist/{icon.eecda2c2.eot → icon.86e0e5ca.eot} +0 -0
  13. package/dist/icon.b0b6f2f3.woff2 +0 -0
  14. package/dist/{index.2e6af433.js → index.0adf7e2c.js} +1 -1
  15. package/dist/index.17bf0eed.js +1 -0
  16. package/dist/index.2c23dc71.js +1 -0
  17. package/dist/index.2d71cf3d.js +6 -0
  18. package/dist/index.50dfbedd.js +1 -0
  19. package/dist/{index.68c6e58b.js → index.571c392b.js} +1 -1
  20. package/dist/index.646a7ae0.js +1 -0
  21. package/dist/index.6bb82f82.js +1 -0
  22. package/dist/{index.04f78d29.js → index.7d5de7ec.js} +1 -1
  23. package/dist/index.aa2791ec.css +1 -0
  24. package/dist/index.c76f8851.js +1 -0
  25. package/dist/index.cb6253c2.js +1 -0
  26. package/dist/index.ce849469.js +6 -0
  27. package/dist/index.d3b39202.js +1 -0
  28. package/dist/index.db4bd5ae.js +1 -0
  29. package/dist/index.f04edc19.css +1 -0
  30. package/dist/index.html +1 -1
  31. package/dist/mode-plsql.js +1 -1
  32. package/dist/theme-cloud_editor.js +1 -1
  33. package/dist/theme-cloud_editor_dark.js +1 -1
  34. package/package.json +16 -15
  35. package/dist/icon.4c409dfc.woff +0 -0
  36. package/dist/icon.5d3b24ed.woff2 +0 -0
  37. package/dist/icon.854409f5.svg +0 -1
  38. package/dist/index.0552aff9.js +0 -1
  39. package/dist/index.0f7cccdb.js +0 -1
  40. package/dist/index.291c6225.js +0 -6
  41. package/dist/index.2aba4af3.js +0 -1
  42. package/dist/index.3a9c93a4.js +0 -1
  43. package/dist/index.523280ee.js +0 -6
  44. package/dist/index.60b27406.js +0 -1
  45. package/dist/index.7ac5d5e2.js +0 -1
  46. package/dist/index.8bb880f2.js +0 -1
  47. package/dist/index.d749f1d9.js +0 -1
  48. package/dist/index.d87d2002.css +0 -1
  49. package/dist/index.fffa7b8a.js +0 -1
@@ -1 +0,0 @@
1
- function t(t,e,i,s){Object.defineProperty(t,e,{get:i,set:s,enumerable:!0,configurable:!0})}var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i={},s={},n=e.parcelRequirea18f;null==n&&((n=function(t){if(t in i)return i[t].exports;if(t in s){var e=s[t];delete s[t];var n={id:t,exports:{}};return i[t]=n,e.call(n.exports,n,n.exports),n.exports}var r=new Error("Cannot find module '"+t+"'");throw r.code="MODULE_NOT_FOUND",r}).register=function(t,e){s[t]=e},e.parcelRequirea18f=n),n.register("b6fDG",(function(e,i){t(e.exports,"initTooltip",(()=>f));var s=n("1fvgI"),r=n("aRjZm"),o=n("8kr9p"),c=n("eU0x9");const h="lia-tooltip",l=/(?:https?:)(?:\/\/)liascript\.github\.io\/course\/\?(.+\.md)/i;var a=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(h)||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(a[this.sourceUrl])this.cache=a[this.sourceUrl],this.show();else if(!this.isFetching){this.isFetching=!0;let e=this,i=this.sourceUrl.match(l);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{const e=/\/\/([a-z]+)\.wikipedia\.org\/wiki\/([^#?\s]+(?:\([^#?\s]*\)[^#?\s]*)*)/i,i=this.sourceUrl.match(e);if(i){let e=i[1],n=i[2];try{n=decodeURIComponent(n)}catch(t){console.error("Error decoding title:",t)}let r=`https://${e}.wikipedia.org/api/rest_v1/page/summary/${encodeURIComponent(n)}`;window.fetch(r,{headers:{Accept:"application/json"}}).then((t=>{if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);return t.json()})).then((t=>{this.cache=d(this.sourceUrl,t.title,t.extract,t.thumbnail?.source,t.thumbnail?.caption),this.show()})).catch((t=>{console.error("Wikipedia API error:",t),s.extract(this.sourceUrl,{}).then((t=>{this.cache=d(this.sourceUrl,t.title,void 0,t.thumbnail_url),this.show()})).catch((t=>{g(this.sourceUrl,function(t){this.parse(t)}.bind(this))}))}))}else try{s.extract(this.sourceUrl,{}).then((t=>{this.cache=d(this.sourceUrl,t.title,void 0,t.thumbnail_url),this.show()})).catch((t=>{g(this.sourceUrl,function(t){this.parse(t)}.bind(this))}))}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,s,n){if(!t)return"";t=t.replace(o.PROXY,"");let r="";if(s)try{o.allowedProtocol(s)||(s=new URL(s,t).toString()),r+=`<img src="${s}" ${n=n?`alt="${n}"`:""} 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>`),a[t]=r,r}function f(){document.getElementById(h)||setTimeout((function(){const t=document.createElement("div");t.id=h,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 s=new XMLHttpRequest;s.open("GET",t,!0),s.onload=function(t){if(4===s.readyState&&200===s.status)try{let i=s.responseText;try{i=JSON.parse(i).contents}catch(t){}e(i)}catch(t){console.warn("fetching",t)}},s.onerror=function(s){0===i&&g(o.PROXY+t,e,1)},s.send()}customElements.define("preview-link",u)})),n.register("eU0x9",(function(e,i){t(e.exports,"parse",(()=>u));var s=n("8kr9p");const r=/href=[\"'](.*?)[\"']/gi,o=/src=[\"'](.*?)[\"']/gi,c=/alt=[\"'](.*?)[\"']/gi,h=/<h1.*?>(.*?)<\/h1>/gi,l=/<h2.*?>(.*?)<\/h2>/gi,a=/<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 s=p("twitter:image",t);if(s)return{url:s,alt:p("twitter:image:alt",t)};const n=g(/<img .*?>/gi,t);return n?{url:g(o,n),alt:g(c,n)}:{}}(e),s=new URL(function(t){return g(/<base.*?href\s*=\s*[\"'](.*?)[\"']>/gi,t)}(e)||t);return{url:t,title:d(e),description:f(s,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 s=g(a,t);if(s&&s.length>0)return s;const n=g(h,t);if(n&&n.length>0)return n;const r=g(l,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 n=p("twitter:description",e);if(n&&n.length>0)return n;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 n=e.slice(0,i+1),r=e.slice(i+1);return s.allowedProtocol(n)||r.startsWith("//")?e:r.startsWith("/")?n+t.origin+r:r.startsWith("#")?n+t.href+r:n+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)}})),n("b6fDG");