@paroicms/public-menu-plugin 0.19.0 → 0.19.2

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{template as y,insert as h}from"https://esm.sh/solid-js@1.9.7/web";function v(e){const c=e.dataset.activateMenuItems?.trim();if(!c)return;const{id:n,parents:i}=JSON.parse(c),o=new Set(i);o.add(n);const t=e.querySelectorAll("[data-menu-item-id]");for(const d of t){const l=d.dataset.menuItemId;l!==void 0&&o.has(l)&&d.classList.add("active")}}function b({openButton:e,dialogContent:c,modalClass:n}){const i=e?typeof e=="string"?document.querySelector(e):e:void 0,o=typeof c=="string"?document.querySelector(c):c;if(!o)return;o instanceof HTMLTemplateElement||o.classList.remove("TinyModalHidden");const t=document.createElement("dialog");t.classList.add("TinyModal"),t.classList.add(n);const d=document.createElement("button");d.classList.add("TinyModal-closeButton"),t.appendChild(d);const l=document.createElement("div");l.classList.add("TinyModal-body"),l.appendChild(o instanceof HTMLTemplateElement?o.content.cloneNode(!0):o),t.appendChild(l),document.body.appendChild(t);const s=new Map;function M(a,r){s.has(a)||s.set(a,[]),s.get(a)?.push(r)}function u(a){s.has(a)&&s.get(a)?.forEach((r=>r()))}function m(){t.showModal(),document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden",u("open")}function f(){t.close()}return i?.addEventListener("click",m),d.addEventListener("click",f),t.addEventListener("close",(()=>{document.body.style.removeProperty("overflow"),document.documentElement.style.removeProperty("overflow"),u("close")})),{open:m,close:f,on:M}}var E=y("<div class=PaMobileMenu>"),w=y('<button class=PaMobileMenuButton type=button><svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor width=35 height=35><title>BurgerIcon</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(e,c){if(!window.matchMedia("(max-width: 992px)").matches)return;const i=document.querySelector('[data-mobile-menu="button"]');if(!i)return;L(e);const o=(()=>{var l=E();return h(l,e),l})();e.style.display==="none"&&e.style.removeProperty("display");const t=w();i.appendChild(t);const d=b({openButton:t,dialogContent:o,modalClass:"_paMobileMenu"});window.paMobileMenu=d}function L(e){const c=document.querySelectorAll("[data-mobile-menu-part]");for(const n of c){const i=n.dataset.mobileMenuPart,o=n.dataset.mobileMenuAction!=="move",t=e.querySelector(`[data-inject="${i}"]`);t&&(t.appendChild(o?n.cloneNode(!0):n),n.removeAttribute("data-mobile-menu-action"))}}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",p):p();function p(){document.documentElement.lang;const e=document.querySelectorAll("[data-effect='paMobileMenu']");for(const n of e)g(n);const c=document.querySelectorAll("[data-activate-menu-items]");for(const n of c)v(n)}
1
+ import{template as y,insert as h}from"https://esm.sh/solid-js@1.9.7/web";function v(e){const c=e.dataset.activateMenuItems?.trim();if(!c)return;const{id:n,parents:i}=JSON.parse(c),o=new Set(i);o.add(n);const t=e.querySelectorAll("[data-menu-item-id]");for(const d of t){const l=d.dataset.menuItemId;l!==void 0&&o.has(l)&&d.classList.add("active")}}function b({openButton:e,dialogContent:c,modalClass:n}){const i=e?typeof e=="string"?document.querySelector(e):e:void 0,o=typeof c=="string"?document.querySelector(c):c;if(!o)return;o instanceof HTMLTemplateElement||o.classList.remove("TinyModalHidden");const t=document.createElement("dialog");t.classList.add("TinyModal"),t.classList.add(n);const d=document.createElement("button");d.classList.add("TinyModal-closeButton"),t.appendChild(d);const l=document.createElement("div");l.classList.add("TinyModal-body"),l.appendChild(o instanceof HTMLTemplateElement?o.content.cloneNode(!0):o),t.appendChild(l),document.body.appendChild(t);const s=new Map;function M(a,r){s.has(a)||s.set(a,[]),s.get(a)?.push(r)}function u(a){s.has(a)&&s.get(a)?.forEach(r=>r())}function m(){t.showModal(),document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden",u("open")}function f(){t.close()}return i?.addEventListener("click",m),d.addEventListener("click",f),t.addEventListener("close",()=>{document.body.style.removeProperty("overflow"),document.documentElement.style.removeProperty("overflow"),u("close")}),{open:m,close:f,on:M}}var E=y("<div class=PaMobileMenu>"),w=y('<button class=PaMobileMenuButton type=button><svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor width=35 height=35><title>BurgerIcon</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(e,c){if(!window.matchMedia("(max-width: 992px)").matches)return;const i=document.querySelector('[data-mobile-menu="button"]');if(!i)return;L(e);const o=(()=>{var l=E();return h(l,e),l})();e.style.display==="none"&&e.style.removeProperty("display");const t=w();i.appendChild(t);const d=b({openButton:t,dialogContent:o,modalClass:"_paMobileMenu"});window.paMobileMenu=d}function L(e){const c=document.querySelectorAll("[data-mobile-menu-part]");for(const n of c){const i=n.dataset.mobileMenuPart,o=n.dataset.mobileMenuAction!=="move",t=e.querySelector(`[data-inject="${i}"]`);t&&(t.appendChild(o?n.cloneNode(!0):n),n.removeAttribute("data-mobile-menu-action"))}}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",p):p();function p(){document.documentElement.lang;const e=document.querySelectorAll("[data-effect='paMobileMenu']");for(const n of e)g(n);const c=document.querySelectorAll("[data-activate-menu-items]");for(const n of c)v(n)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paroicms/public-menu-plugin",
3
- "version": "0.19.0",
3
+ "version": "0.19.2",
4
4
  "description": "Public menu plugin for ParoiCMS",
5
5
  "keywords": [
6
6
  "paroicms",
@@ -24,7 +24,7 @@
24
24
  "clear": "rimraf backend/dist/* frontend/dist/*"
25
25
  },
26
26
  "dependencies": {
27
- "@paroicms/script-lib": "0.3.0",
27
+ "@paroicms/script-lib": "0.3.2",
28
28
  "arktype": "~2.1.20"
29
29
  },
30
30
  "peerDependencies": {
@@ -32,8 +32,8 @@
32
32
  "@paroicms/public-server-lib": "0"
33
33
  },
34
34
  "devDependencies": {
35
- "@paroicms/public-anywhere-lib": "0.36.0",
36
- "@paroicms/public-server-lib": "0.46.0",
35
+ "@paroicms/public-anywhere-lib": "0.37.0",
36
+ "@paroicms/public-server-lib": "0.47.0",
37
37
  "@types/node": "~24.0.1",
38
38
  "rimraf": "~6.0.1",
39
39
  "typescript": "~5.9.2"