@paroicms/quill-editor-plugin 1.42.0 → 1.43.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
import{delegateEvents as $,template as w,setAttribute as c,effect as Z}from"https://esm.sh/solid-js@1.9.7/web";function k(o){let e=o;const t=e.indexOf("?");t!==-1&&(e=e.substring(0,t));const r=e.indexOf("#");r!==-1&&(e=e.substring(0,r));const n=e.lastIndexOf("/");return n===-1?void 0:e.slice(0,n)}const b=k(import.meta.url),E="/api/plugin/quill-editor-plugin",P=E;var V=w('<div class=PaZoomableViewer><button type=button class="PaZoomableViewer-closeButton PaButton"><img alt=⨯ width=30 height=30></button><div class=PaZoomableViewer-spinner>'),x=w('<div class=PaZoomableViewer><button type=button class="PaZoomableViewer-closeButton PaButton"><img alt=⨯ width=30 height=30></button><img class=PaZoomableViewer-img alt>');function L(){const o=document.querySelectorAll("[data-zoomable]");for(const e of o){if(!(e instanceof HTMLElement))continue;const t=e.dataset.zoomable?.trim();t&&C(e,{mediaId:t})}}function C(o,{mediaId:e}){o.classList.add("PaZoomable"),o.setAttribute("tabindex","0"),o.addEventListener("click",
|
|
1
|
+
import{delegateEvents as $,template as w,setAttribute as c,effect as Z}from"https://esm.sh/solid-js@1.9.7/web";function k(o){let e=o;const t=e.indexOf("?");t!==-1&&(e=e.substring(0,t));const r=e.indexOf("#");r!==-1&&(e=e.substring(0,r));const n=e.lastIndexOf("/");return n===-1?void 0:e.slice(0,n)}const b=k(import.meta.url),E="/api/plugin/quill-editor-plugin",P=E;var V=w('<div class=PaZoomableViewer><button type=button class="PaZoomableViewer-closeButton PaButton"><img alt=⨯ width=30 height=30></button><div class=PaZoomableViewer-spinner>'),x=w('<div class=PaZoomableViewer><button type=button class="PaZoomableViewer-closeButton PaButton"><img alt=⨯ width=30 height=30></button><img class=PaZoomableViewer-img alt>');function L(){const o=document.querySelectorAll("[data-zoomable]");for(const e of o){if(!(e instanceof HTMLElement))continue;const t=e.dataset.zoomable?.trim();t&&C(e,{mediaId:t})}}function C(o,{mediaId:e}){o.classList.add("PaZoomable"),o.setAttribute("tabindex","0"),o.addEventListener("click",async t=>{t.preventDefault(),await _(e)})}async function _(o){const e=document.body,t=(()=>{var i=V(),s=i.firstChild,l=s.firstChild;return s.$$click=n,c(l,"src",`${b}/cross.svg`),i})();function r(i){i.key==="Escape"&&n()}function n(){t.remove(),e.removeEventListener("keyup",r)}e.addEventListener("keyup",r),e.appendChild(t);try{let i=function(d){d.key==="Escape"&&s()},s=function(){p.remove(),e.removeEventListener("keyup",i)};const l=await fetch(`${P}/zoom-image?mediaId=${encodeURIComponent(o)}`);if(!l.ok){console.error("Failed to fetch zoom image:",l.statusText),n();return}const m=await l.json();n();const p=(()=>{var d=x(),u=d.firstChild,y=u.firstChild,f=u.nextSibling;return u.$$click=s,c(y,"src",`${b}/cross.svg`),Z(a=>{var h=m.url,v=m.width,g=m.height;return h!==a.e&&c(f,"src",a.e=h),v!==a.t&&c(f,"width",a.t=v),g!==a.a&&c(f,"height",a.a=g),a},{e:void 0,t:void 0,a:void 0}),d})();e.addEventListener("keyup",i),e.appendChild(p)}catch(i){console.error("Error fetching zoom image:",i),n()}}$(["click"]);L();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paroicms/quill-editor-plugin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.43.0",
|
|
4
4
|
"description": "Quill Editor plugin for ParoiCMS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"paroicms",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@paroi/quill-delta-to-html": "~0.12.3",
|
|
31
|
-
"@paroicms/script-lib": "0.3.
|
|
31
|
+
"@paroicms/script-lib": "0.3.2",
|
|
32
32
|
"arktype": "~2.1.20"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"@paroicms/public-server-lib": "0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@paroicms/public-anywhere-lib": "0.
|
|
40
|
-
"@paroicms/public-server-lib": "0.
|
|
39
|
+
"@paroicms/public-anywhere-lib": "0.37.0",
|
|
40
|
+
"@paroicms/public-server-lib": "0.47.0",
|
|
41
41
|
"@types/node": "~24.0.1",
|
|
42
42
|
"rimraf": "~6.0.1",
|
|
43
43
|
"typescript": "~5.9.2"
|