@paroicms/public-menu-plugin 0.9.0 → 0.10.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paroicms/public-menu-plugin",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "Public menu plugin for ParoiCMS",
5
5
  "keywords": [
6
6
  "paroicms",
@@ -33,17 +33,17 @@
33
33
  },
34
34
  "devDependencies": {
35
35
  "@paroicms/public-anywhere-lib": "0.19.0",
36
- "@paroicms/public-server-lib": "0.26.0",
37
- "@paroicms/tiny-modal": "0.3.0",
36
+ "@paroicms/public-server-lib": "0.27.0",
37
+ "@paroicms/tiny-modal": "0.4.0",
38
38
  "@types/node": "~22.13.10",
39
39
  "rimraf": "~6.0.1",
40
- "sass": "~1.84.0",
40
+ "sass": "~1.85.1",
41
41
  "solid-devtools": "~0.33.0",
42
- "solid-js": "1.9.4",
42
+ "solid-js": "1.9.5",
43
43
  "typescript": "~5.8.2",
44
- "vite": "~6.1.0",
45
- "vite-plugin-solid": "~2.11.0",
46
- "terser": "~5.37.0"
44
+ "vite": "~6.2.2",
45
+ "vite-plugin-solid": "~2.11.6",
46
+ "terser": "~5.39.0"
47
47
  },
48
48
  "type": "module",
49
49
  "main": "backend/dist/plugin.js",
@@ -1 +1 @@
1
- @charset "UTF-8";.TinyModal{background:transparent;border:none;margin:0;max-width:none;padding:0}.TinyModal::backdrop{background-color:transparent}.TinyModal-closeBtn{align-items:center;background-color:#bbb;border-radius:50%;cursor:pointer;display:flex;font-size:30px;font-weight:700;height:40px;justify-content:center;line-height:1;position:absolute;right:50px;top:10px;width:40px;z-index:2}.TinyModal-closeBtn:before{content:"×"}.TinyModal-closeBtn:hover,.TinyModal-closeBtn:focus{background-color:#888}.HiddenForTinyModal{display:none!important}.MobileMenu{height:100vh;padding:20px;max-height:100vh;max-width:500px;width:100vw;background-color:#fff}
1
+ @import"https://cdn.jsdelivr.net/npm/@paroicms/tiny-modal@0.4.0/dist/tiny-modal.css";.PaMobileMenu{height:100vh;padding:20px;max-height:100vh;max-width:500px;width:100vw;background-color:#fff}.PaMobileMenuModal .TinyModal-closeButton{top:5px;right:5px}
@@ -1 +1 @@
1
- import{template as p,insert as M}from"https://esm.sh/solid-js@1.9.4/web";function y(t){const c=t.dataset.activateMenuItems?.trim();if(!c)return;const{id:s,parents:n}=JSON.parse(c),e=new Set(n);e.add(s);const o=t.querySelectorAll("[data-menu-item-id]");for(const i of o){const l=i.dataset.menuItemId;l!==void 0&&e.has(l)&&i.classList.add("active")}}function h({openButton:t,dialogContent:c}){const s=t?typeof t=="string"?document.querySelector(t):t:void 0,n=typeof c=="string"?document.querySelector(c):c;if(!n)return;n instanceof HTMLTemplateElement||n.classList.remove("HiddenForTinyModal");const e=document.createElement("dialog");e.classList.add("TinyModal");const o=document.createElement("button");o.classList.add("TinyModal-closeBtn"),e.appendChild(o);const i=document.createElement("div");i.classList.add("TinyModal-wrapper"),i.appendChild(n instanceof HTMLTemplateElement?n.content.cloneNode(!0):n),e.appendChild(i),document.body.appendChild(e);const l=new Map;function d(a,r){l.has(a)||l.set(a,[]),l.get(a)?.push(r)}function u(a){l.has(a)&&l.get(a)?.forEach((r=>r()))}function m(){e.showModal(),document.body.style.overflow="hidden",u("open")}function f(){e.close()}return s?.addEventListener("click",m),o.addEventListener("click",f),e.addEventListener("close",(()=>{document.body.style.overflow="",u("close")})),{open:m,close:f,on:d}}var v=p("<div class=MobileMenu>"),b=p('<button class=MobileMenuBtn type=button><svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor data-testid=IconBurger width=35 height=35><title>IconBurger</title><path d="M4 18h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1zm0-5h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1zM3 7c0 .55.45 1 1 1h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1z">');function g(t,c){const n=window.getComputedStyle(t).getPropertyValue("--siteAppMobileMenuMaxWidth");if(!window.matchMedia(`(max-width: ${n})`).matches)return;const o=document.querySelector('[data-mobile-menu="button"]');if(!o)return;E(t);const i=(()=>{var d=v();return M(d,t),d})();t.style.display==="none"&&t.style.removeProperty("display");const l=b();o.appendChild(l),h({openButton:l,dialogContent:i})}function E(t){const c=document.querySelectorAll("[data-mobile-menu-part]");for(const s of c){const n=s.dataset.mobileMenuPart,e=s.dataset.mobileMenuAction!=="move",o=t.querySelector(`[data-inject="${n}"]`);o&&o.appendChild(e?s.cloneNode(!0):s)}}document.addEventListener("DOMContentLoaded",(()=>{const t=document.documentElement.lang,c={mobileMenu:g},s=document.querySelectorAll("[data-effect]");for(const e of s){const o=e.dataset.effect;if(!o)continue;const i=c[o];i&&i(e,{language:t})}const n=document.querySelectorAll("[data-activate-menu-items]");for(const e of n)y(e)}));
1
+ import{template as p,insert as M}from"https://esm.sh/solid-js@1.9.5/web";function v(n){const c=n.dataset.activateMenuItems?.trim();if(!c)return;const{id:s,parents:l}=JSON.parse(c),t=new Set(l);t.add(s);const e=n.querySelectorAll("[data-menu-item-id]");for(const o of e){const d=o.dataset.menuItemId;d!==void 0&&t.has(d)&&o.classList.add("active")}}function h({openButton:n,dialogContent:c,modalClass:s}){const l=n?typeof n=="string"?document.querySelector(n):n:void 0,t=typeof c=="string"?document.querySelector(c):c;if(!t)return;t instanceof HTMLTemplateElement||t.classList.remove("TinyModalHidden");const e=document.createElement("dialog");e.classList.add("TinyModal"),e.classList.add(s);const o=document.createElement("button");o.classList.add("TinyModal-closeButton"),e.appendChild(o);const d=document.createElement("div");d.classList.add("TinyModal-body"),d.appendChild(t instanceof HTMLTemplateElement?t.content.cloneNode(!0):t),e.appendChild(d),document.body.appendChild(e);const i=new Map;function y(a,r){i.has(a)||i.set(a,[]),i.get(a)?.push(r)}function u(a){i.has(a)&&i.get(a)?.forEach((r=>r()))}function m(){e.showModal(),document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden",u("open")}function f(){e.close()}return l?.addEventListener("click",m),o.addEventListener("click",f),e.addEventListener("close",(()=>{document.body.style.removeProperty("overflow"),document.documentElement.style.removeProperty("overflow"),u("close")})),{open:m,close:f,on:y}}var b=p("<div class=PaMobileMenu>"),E=p('<button class=PaMobileMenuButton type=button><svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor data-testid=IconBurger width=35 height=35><title>IconBurger</title><path d="M4 18h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1zm0-5h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1zM3 7c0 .55.45 1 1 1h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1z">');function g(n,c){if(!window.matchMedia("(max-width: 992px)").matches)return;const l=document.querySelector('[data-mobile-menu="button"]');if(!l)return;w(n);const t=(()=>{var o=b();return M(o,n),o})();n.style.display==="none"&&n.style.removeProperty("display");const e=E();l.appendChild(e),h({openButton:e,dialogContent:t,modalClass:"PaMobileMenuModal"})}function w(n){const c=document.querySelectorAll("[data-mobile-menu-part]");for(const s of c){const l=s.dataset.mobileMenuPart,t=s.dataset.mobileMenuAction!=="move",e=n.querySelector(`[data-inject="${l}"]`);e&&e.appendChild(t?s.cloneNode(!0):s)}}document.addEventListener("DOMContentLoaded",(()=>{const n=document.documentElement.lang,c={paMobileMenu:g},s=document.querySelectorAll("[data-effect]");for(const t of s){const e=t.dataset.effect;if(!e)continue;const o=c[e];o&&o(t,{language:n})}const l=document.querySelectorAll("[data-activate-menu-items]");for(const t of l)v(t)}));