@liascript/editor 1.1.43--2.1.0 → 1.1.43--2.1.1

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/CHANGELOG.md CHANGED
@@ -4,6 +4,22 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [2.1.1] - 07/10/2026
8
+
9
+ - feat: code blocks accept `data-ace-options` (e.g. `data-ace-options="spellcheck hardWrap=80, tabSize=8"`), required ace extensions are loaded on demand
10
+ - fix: autocompletion and snippets in the code editor were never enabled
11
+ - fix: app stuck on the loading screen on KaiOS 2.x (`globalThis` in drag & drop touch polyfill)
12
+ - fix: service worker errors on legacy browsers, only registered where module bundles are loaded
13
+ - fix: classroom opened from a URL (reload, bookmark, history) keeps using its local cache
14
+ - fix: oEmbed provider matching (27 endpoint schemas never matched), aspect ratio of embeds, photo embeds, slow proxy fallback with timeout
15
+ - fix: link tooltips – XSS, hover state, stuck loading cursor, proxy only on CORS errors
16
+ - improve: quizzes with text input are checked on Enter
17
+ - improve: rendering performance – lazy rendering of ASCII diagrams, QR codes, table of contents, top bar menus and hidden sections; quizzes labelled by id instead of an MD5 hash per frame
18
+ - improve: parser performance – early skipping of macros, annotations, scripts and references, setext headers only tried if an underline can follow, inline parser built only once
19
+ - test: HTML snapshot and characterization tests for gallery, tasks, sessions, URL resolution, sync decoding and identicons
20
+ - chore: parser-combinators 7.1.0, updated oEmbed provider list
21
+
22
+
7
23
  ## [2.1.0] - 29/09/2026
8
24
 
9
25
  - feat: surveys can be shuffled via `data-randomize`
@@ -0,0 +1 @@
1
+ var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},e={},i={},n=t.parcelRequirea18f;null==n&&((n=function(t){if(t in e)return e[t].exports;if(t in i){var n=i[t];delete i[t];var r={id:t,exports:{}};return e[t]=r,n.call(r.exports,r,r.exports),r.exports}var o=new Error("Cannot find module '"+t+"'");throw o.code="MODULE_NOT_FOUND",o}).register=function(t,e){i[t]=e},t.parcelRequirea18f=n),n.register("b6fDG",(function(t,e){var i=n("1fvgI"),r=n("aRjZm"),o=n("eU0x9");const s=/(?:https?:)(?:\/\/)liascript\.github\.io\/course\/\?(.+\.md)/i,a=/\/\/([a-z-]+)(?:\.m)?\.(wikipedia|wiktionary|wikibooks|wikinews|wikiquote|wikisource|wikiversity|wikivoyage|wikimedia|wikidata)\.org\/wiki\/([^#?\s]+)/i,c=new Map;let l,d=0,u=null;class h extends HTMLElement{light=!0;clicked=!1;connectedCallback(){this.addEventListener("mouseenter",this.activate),this.addEventListener("focusin",this.activate),this.addEventListener("mouseleave",this.deactivate),this.addEventListener("focusout",this.deactivate),this.addEventListener("click",this.handleClick)}activate(){if(this.clicked)return void(this.clicked=!1);const t=this.getAttribute("src")?.replace(/\/$/,"");t&&(clearTimeout(d),u=this,this.cursor("progress"),function(t){return c.has(t)||c.set(t,function(t){const e=t.match(s);if(e)return new Promise(((t,i)=>r.fetch(e[1],((e,i)=>t({title:i.title,description:i.description,image:i.logo,image_alt:i.logo_alt})),i)));const n=()=>i.extract(t,{}).then((t=>({title:t.title,image:t.thumbnail_url}))).catch((()=>i.fetchText(t,!0,3e4).then((e=>o.parse(t,e))))),c=t.match(a);return c?async function([,t,e,i]){try{i=decodeURIComponent(i)}catch(t){}const n=await fetch(`https://${t}.${e}.org/api/rest_v1/page/summary/${encodeURIComponent(i)}`,{headers:{Accept:"application/json"}});if(!n.ok)throw new Error(`wikimedia: ${n.status}`);const r=await n.json();return{title:r.title,description:r.extract,image:r.thumbnail?.source}}(c).catch(n):n()}(t).then((e=>function(t,e){if(!e.title&&!e.description&&!e.image)return null;const i=document.createElement("div");if(e.image)try{const n=p(i,"img");n.src=new URL(e.image,t).href,e.image_alt&&(n.alt=e.image_alt),n.style.cssText="background-color:white; margin-bottom:1.5rem"}catch(t){}e.title&&(p(i,"h4").textContent=e.title),e.description&&(p(i,"p").textContent=e.description),p(i,"hr").style.cssText="border:0; height:1px; background:#888";const n=p(i,"a");return n.href=t,n.target="_blank",n.rel="noopener noreferrer",n.textContent=t,n.style.cssText="font-size:x-small; display:block",i}(t,e))).catch((()=>null))),c.get(t)}(t).then((t=>{this.cursor(""),t&&u===this&&function(t,e){const i=(l||(l=document.createElement("div"),l.id="lia-tooltip",l.setAttribute("role","tooltip"),l.style.cssText="position:fixed; z-index:20000; display:none; box-sizing:border-box; padding:15px; max-height:480px; overflow:auto",l.addEventListener("mouseenter",(()=>clearTimeout(d))),l.addEventListener("mouseleave",g),document.body.appendChild(l)),l),n=e.getBoundingClientRect(),r=n.left+n.width/2,o=n.top+n.height/2,s=Math.min(455,window.innerWidth-20);i.style.width=`${s}px`,i.style.left=r*(window.innerWidth-s)/window.innerWidth+"px",1.5*o>window.innerHeight?(i.style.top="",i.style.bottom=window.innerHeight-o+10+"px"):(i.style.top=`${o+10}px`,i.style.bottom=""),i.style.background=e.light?"white":"#202020",i.style.boxShadow=e.light?"0 30px 90px -20px rgba(0, 0, 0, 0.3)":"0 30px 90px -20px rgba(120, 120, 120, 0.3)",i.textContent="",i.appendChild(t),i.style.display="block"}(t,this)})))}deactivate(){u===this&&(u=null),this.cursor(""),g()}handleClick(){this.clicked=!0,this.deactivate(),m()}cursor(t){const e=this.firstElementChild;e&&(e.style.cursor=t)}}function p(t,e){return t.appendChild(document.createElement(e))}function m(){clearTimeout(d),l&&(l.style.display="none")}function g(){clearTimeout(d),d=window.setTimeout(m,300)}document.addEventListener("keyup",(t=>{"Escape"===t.key&&(u=null,m())})),customElements.define("preview-link",h)})),n.register("eU0x9",(function(t,e){var i,n;function r(t,e){const i=(new DOMParser).parseFromString(e,"text/html"),n=t=>i.querySelector(`meta[property="${t}"], meta[name="${t}"]`)?.getAttribute("content")?.trim()||void 0,r=t=>i.querySelector(t)?.textContent?.trim()||void 0,o=i.querySelector("img");let[s,a]=[[n("og:image"),n("og:image:alt")],[i.querySelector('link[rel="image_src"]')?.getAttribute("href")],[n("twitter:image"),n("twitter:image:alt")],[o?.getAttribute("src"),o?.getAttribute("alt")]].find((([t])=>t))||[];if(s)try{const e=i.querySelector("base")?.getAttribute("href");s=new URL(s,e?new URL(e,t):t).href}catch(t){s=void 0}return{title:n("og:title")||n("twitter:title")||i.title.trim()||r("h1")||r("h2"),description:n("og:description")||n("twitter:description")||n("description")||r("p"),image:s||void 0,image_alt:a||void 0}}i=t.exports,n=()=>r,Object.defineProperty(i,"parse",{get:n,set:undefined,enumerable:!0,configurable:!0})})),n("b6fDG");