@paroicms/public-menu-plugin 0.8.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.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Public menu plugin for ParoiCMS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"paroicms",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"build": "npm run build:backend && npm run build:public",
|
|
21
21
|
"build:backend": "(cd backend && tsc)",
|
|
22
22
|
"build:public": "(cd public-front && tsc && vite build && npm run minify:public)",
|
|
23
|
-
"minify:public": "terser
|
|
23
|
+
"minify:public": "terser public-front/dist/public-front-plugin.mjs --output public-front/dist/public-front-plugin.mjs",
|
|
24
24
|
"build:public:watch": "(cd public-front && tsc && vite build --watch)",
|
|
25
25
|
"clear": "rimraf backend/dist/* public-front/dist/*"
|
|
26
26
|
},
|
|
@@ -32,18 +32,18 @@
|
|
|
32
32
|
"@paroicms/public-server-lib": "0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@paroicms/public-anywhere-lib": "0.
|
|
36
|
-
"@paroicms/public-server-lib": "0.
|
|
37
|
-
"@paroicms/tiny-modal": "0.
|
|
38
|
-
"@types/node": "~22.10
|
|
35
|
+
"@paroicms/public-anywhere-lib": "0.19.0",
|
|
36
|
+
"@paroicms/public-server-lib": "0.27.0",
|
|
37
|
+
"@paroicms/tiny-modal": "0.4.0",
|
|
38
|
+
"@types/node": "~22.13.10",
|
|
39
39
|
"rimraf": "~6.0.1",
|
|
40
|
-
"sass": "~1.
|
|
40
|
+
"sass": "~1.85.1",
|
|
41
41
|
"solid-devtools": "~0.33.0",
|
|
42
|
-
"solid-js": "1.9.
|
|
43
|
-
"typescript": "~5.
|
|
44
|
-
"vite": "~6.
|
|
45
|
-
"vite-plugin-solid": "~2.11.
|
|
46
|
-
"terser": "~5.
|
|
42
|
+
"solid-js": "1.9.5",
|
|
43
|
+
"typescript": "~5.8.2",
|
|
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
|
-
@
|
|
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{
|
|
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)}));
|