@paroicms/public-menu-plugin 0.19.2 → 0.19.3

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
- @charset "UTF-8";.TinyModal{background:transparent;border:none;margin:auto;padding:0;position:fixed;overflow:visible;max-width:100vw;max-height:100vh}.TinyModal::backdrop{background-color:#222b}.TinyModal-body{overflow:scroll}.TinyModal-closeButton{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:-30px;top:-30px;width:40px;z-index:2}.TinyModal-closeButton:before{content:"×"}@media (max-width: 400px){.TinyModal-closeButton{right:-18px}}.TinyModalHidden{display:none!important}.PaMobileMenu{height:94vh;padding:20px;max-height:100vh;max-width:500px;width:90vw;background-color:#fff}._paMobileMenu .TinyModal-closeButton{top:5px;right:5px}
1
+ @charset "UTF-8";.TinyModal{background:transparent;border:none;margin:auto;padding:0;position:fixed;overflow:visible;max-width:100vw;max-height:100vh}.TinyModal::backdrop{background-color:#222b}.TinyModal-body{overflow:scroll}.TinyModal-closeButton{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:-30px;top:-30px;width:40px;z-index:2}.TinyModal-closeButton:before{content:"×"}@media(max-width:400px){.TinyModal-closeButton{right:-18px}}.TinyModalHidden{display:none!important}.PaMobileMenu{height:94vh;padding:20px;max-height:100vh;max-width:500px;width:90vw;background-color:#fff}._paMobileMenu .TinyModal-closeButton{top:5px;right:5px}
@@ -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 d,insert as u}from"https://esm.sh/solid-js@1.9.9/web";import r from"https://esm.sh/@paroicms/tiny-modal@0.7.0";function m(t){const n=t.dataset.activateMenuItems?.trim();if(!n)return;const{id:e,parents:a}=JSON.parse(n),i=new Set(a);i.add(e);const o=t.querySelectorAll("[data-menu-item-id]");for(const c of o){const l=c.dataset.menuItemId;l!==void 0&&i.has(l)&&c.classList.add("active")}}var p=d("<div class=PaMobileMenu>"),f=d('<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 M(t,n){if(!window.matchMedia("(max-width: 992px)").matches)return;const a=document.querySelector('[data-mobile-menu="button"]');if(!a)return;b(t);const i=(()=>{var l=p();return u(l,t),l})();t.style.display==="none"&&t.style.removeProperty("display");const o=f();a.appendChild(o);const c=r({openButton:o,dialogContent:i,modalClass:"_paMobileMenu"});window.paMobileMenu=c}function b(t){const n=document.querySelectorAll("[data-mobile-menu-part]");for(const e of n){const a=e.dataset.mobileMenuPart,i=e.dataset.mobileMenuAction!=="move",o=t.querySelector(`[data-inject="${a}"]`);o&&(o.appendChild(i?e.cloneNode(!0):e),e.removeAttribute("data-mobile-menu-action"))}}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",s):s();function s(){document.documentElement.lang;const t=document.querySelectorAll("[data-effect='paMobileMenu']");for(const e of t)M(e);const n=document.querySelectorAll("[data-activate-menu-items]");for(const e of n)m(e)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paroicms/public-menu-plugin",
3
- "version": "0.19.2",
3
+ "version": "0.19.3",
4
4
  "description": "Public menu plugin for ParoiCMS",
5
5
  "keywords": [
6
6
  "paroicms",
@@ -24,19 +24,19 @@
24
24
  "clear": "rimraf backend/dist/* frontend/dist/*"
25
25
  },
26
26
  "dependencies": {
27
- "@paroicms/script-lib": "0.3.2",
28
- "arktype": "~2.1.20"
27
+ "@paroicms/script-lib": "0.3.3",
28
+ "arktype": "~2.1.23"
29
29
  },
30
30
  "peerDependencies": {
31
31
  "@paroicms/public-anywhere-lib": "0",
32
32
  "@paroicms/public-server-lib": "0"
33
33
  },
34
34
  "devDependencies": {
35
- "@paroicms/public-anywhere-lib": "0.37.0",
36
- "@paroicms/public-server-lib": "0.47.0",
37
- "@types/node": "~24.0.1",
35
+ "@paroicms/public-anywhere-lib": "0.37.1",
36
+ "@paroicms/public-server-lib": "0.47.1",
37
+ "@types/node": "~24.8.1",
38
38
  "rimraf": "~6.0.1",
39
- "typescript": "~5.9.2"
39
+ "typescript": "~5.9.3"
40
40
  },
41
41
  "type": "module",
42
42
  "main": "backend/dist/index.js",