@aevantec/litevue 0.5.4 → 0.5.6
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/README.md +3 -2
- package/dist/litevue-devtools.iife.js +1 -1
- package/dist/litevue-devtools.mjs +1 -853
- package/dist/litevue-devtools.umd.js +1 -1
- package/dist/litevue-plugins.iife.js +1 -1
- package/dist/litevue-plugins.mjs +1 -717
- package/dist/litevue-plugins.umd.js +1 -1
- package/dist/litevue.iife.js +1 -12
- package/dist/litevue.mjs +1 -1890
- package/dist/litevue.umd.js +1 -12
- package/dist/plugins/collapse.iife.js +1 -1
- package/dist/plugins/collapse.mjs +1 -46
- package/dist/plugins/collapse.umd.js +1 -1
- package/dist/plugins/focus.iife.js +1 -1
- package/dist/plugins/focus.mjs +1 -69
- package/dist/plugins/focus.umd.js +1 -1
- package/dist/plugins/intersect.iife.js +1 -1
- package/dist/plugins/intersect.mjs +1 -20
- package/dist/plugins/intersect.umd.js +1 -1
- package/dist/plugins/mask.iife.js +1 -1
- package/dist/plugins/mask.mjs +1 -37
- package/dist/plugins/mask.umd.js +1 -1
- package/dist/plugins/media.iife.js +1 -1
- package/dist/plugins/media.mjs +1 -204
- package/dist/plugins/media.umd.js +1 -1
- package/dist/plugins/morph.iife.js +1 -1
- package/dist/plugins/morph.mjs +1 -174
- package/dist/plugins/morph.umd.js +1 -1
- package/dist/plugins/persist.iife.js +1 -1
- package/dist/plugins/persist.mjs +1 -86
- package/dist/plugins/persist.umd.js +1 -1
- package/dist/plugins/resize.iife.js +1 -1
- package/dist/plugins/resize.mjs +1 -15
- package/dist/plugins/resize.umd.js +1 -1
- package/dist/plugins/transition.iife.js +1 -1
- package/dist/plugins/transition.mjs +1 -76
- package/dist/plugins/transition.umd.js +1 -1
- package/dist/types/app.d.mts +20 -2
- package/dist/types/app.d.ts +20 -2
- package/dist/types/block.d.mts +6 -0
- package/dist/types/block.d.ts +6 -0
- package/dist/types/context.d.mts +8 -4
- package/dist/types/context.d.ts +8 -4
- package/dist/types/devtools.d.mts +7 -0
- package/dist/types/devtools.d.ts +7 -0
- package/dist/types/effect.d.mts +6 -10
- package/dist/types/effect.d.ts +6 -10
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/magics.d.mts +5 -6
- package/dist/types/magics.d.ts +5 -6
- package/dist/types/ownership.d.mts +23 -0
- package/dist/types/ownership.d.ts +23 -0
- package/dist/types/plugins/focus/index.d.mts +6 -8
- package/dist/types/plugins/focus/index.d.ts +6 -8
- package/dist/types/plugins/media/index.d.mts +6 -11
- package/dist/types/plugins/media/index.d.ts +6 -11
- package/dist/types/plugins/morph/index.d.mts +21 -10
- package/dist/types/plugins/morph/index.d.ts +21 -10
- package/dist/types/plugins/persist/index.d.mts +12 -19
- package/dist/types/plugins/persist/index.d.ts +12 -19
- package/dist/types/plugins/resize/index.d.mts +5 -7
- package/dist/types/plugins/resize/index.d.ts +5 -7
- package/dist/types/plugins/transition/index.d.mts +7 -12
- package/dist/types/plugins/transition/index.d.ts +7 -12
- package/dist/types/scheduler.d.mts +3 -0
- package/dist/types/scheduler.d.ts +3 -0
- package/dist/types/store.d.mts +3 -6
- package/dist/types/store.d.ts +3 -6
- package/dist/types/utils.d.mts +3 -3
- package/dist/types/utils.d.ts +3 -3
- package/dist/types/warn.d.mts +14 -0
- package/dist/types/warn.d.ts +14 -0
- package/package.json +16 -8
package/README.md
CHANGED
|
@@ -6,11 +6,12 @@ Published on npm as **[`@aevantec/litevue`](https://www.npmjs.com/package/@aevan
|
|
|
6
6
|
unscoped name is blocked by an unrelated `lite-vue` package. The IIFE/UMD global
|
|
7
7
|
stays `LiteVue`.
|
|
8
8
|
|
|
9
|
-
- **~9kb
|
|
9
|
+
- **~9kb**<!-- size:dist/litevue.iife.js --> gzipped core, driven by the real `@vue/reactivity`
|
|
10
10
|
- Vue-compatible syntax: `{{ }}`, `v-if`/`v-for` (keyed), `v-model`, `v-show`, …
|
|
11
11
|
- **Built-in devtools** — in-page inspector panel + browser extension, one line to disable in production
|
|
12
12
|
- **Transitions** that work with `v-show` *and* `v-if` (deferred unmount)
|
|
13
|
-
- **Plugin system** with first-party plugins: intersect, persist, focus (+trap), collapse, transition, mask, morph
|
|
13
|
+
- **Plugin system** with nine first-party plugins: intersect, persist, focus (+trap), collapse, transition, mask, morph, media, resize
|
|
14
|
+
- **Components** registered by name with `app.component()`, usable from `v-scope`
|
|
14
15
|
- **Global store** (`store()` / `$store`) and magic properties (`$dispatch`, `$watch`, `$id`, `$root`, …)
|
|
15
16
|
- **Cached derived state** with `computed()`, alongside `reactive()` and `watchEffect()`
|
|
16
17
|
- Extra event modifiers: `.outside`, `.window`, `.debounce`, `.throttle`, animation-event filters
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var LiteVueDevtoolsPanel=function(e){"use strict";let n,t,o,r,i,l,d,a,s,p,c,h=null,u=null,v=!1,g="",x="Elements";const f=e=>'<svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">'+e+"</svg>",y="litevue-devtools-theme",m="litevue-devtools-ui",b=()=>{try{return JSON.parse(localStorage.getItem(m)||"{}")}catch{return{}}},w=e=>{try{localStorage.setItem(m,JSON.stringify({...b(),...e}))}catch{}},k={dark:f('<path d="M21 12.8A9 9 0 1 1 11.2 3 7 7 0 0 0 21 12.8z"/>'),light:f('<circle cx="12" cy="12" r="5"/><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/><line x1="4.2" y1="4.2" x2="5.6" y2="5.6"/><line x1="18.4" y1="18.4" x2="19.8" y2="19.8"/><line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/><line x1="4.2" y1="19.8" x2="5.6" y2="18.4"/><line x1="18.4" y1="5.6" x2="19.8" y2="4.2"/>'),system:f('<rect x="2" y="3" width="20" height="14" rx="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/>')},C={dark:"light",light:"system",system:"dark"};let E="dark";try{const e=localStorage.getItem(y);"light"!==e&&"system"!==e||(E=e)}catch{}const L=matchMedia("(prefers-color-scheme: light)"),O=()=>{const e="light"===E||"system"===E&&L.matches;t.host.classList.toggle("light",e),a.innerHTML=k[E],a.title="theme: "+E},S=new Set,_=(e,n,t)=>{const o=document.createElement(e);return o.className=n,null!=t&&(o.textContent=t),o},N=e=>{const n=_("span","label");return n.appendChild(_("span","punct","<")),n.appendChild(_("span","name",D(e))),n.appendChild(_("span","punct",">")),n},$=e=>{let t=0,o=e.parentElement;for(;o;)n.scopes.has(o)&&t++,o=o.parentElement;return t},j=e=>{let n;try{n=void 0===e?"undefined":JSON.stringify(e)??String(e)}catch(t){n=String(e)}return n.length>60?n.slice(0,60)+"\u2026":n},T=e=>{const n=e.getBoundingClientRect();s.style.cssText=`display:block;left:${n.left}px;top:${n.top}px;width:${n.width}px;height:${n.height}px`},z=()=>{s.style.display="none"},I=e=>{e!==h&&S.clear(),u=null,h=e,x="Elements",window.$scope=e?n.scopes.get(e):void 0,V(),R()},P=e=>{e!==u&&S.clear(),h=null,u=e,x="Stores",window.$scope=n.stores.get(e),V(),R()},M=e=>{x=e,V()},D=e=>n.names.get(e)||e.id||e.tagName.toLowerCase(),V=()=>{if((()=>{const e=n.stores?n.stores.size:0;p.textContent=`Elements (${n.scopes.size})`,p.className="Elements"===x?"tab active":"tab",c.textContent=`Stores (${e})`,c.className="Stores"===x?"tab active":"tab"})(),i.textContent="","Elements"===x){const e=[...n.scopes.keys()].filter(e=>D(e).toLowerCase().includes(g)).sort((e,n)=>e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1);if(!e.length)return void i.appendChild(_("div","empty",g?"no matching scopes":"no scopes mounted"));for(const t of e){const e=_("div",t===h?"row sel":"row");e.style.paddingLeft=8+12*$(t)+"px",e.appendChild(N(t));const o=n.exps.get(t);o&&e.appendChild(_("span","exp"," "+o)),e.onclick=()=>I(t),e.onmouseenter=()=>T(t),e.onmouseleave=z,i.appendChild(e)}return}const e=[...n.stores?n.stores.keys():[]].filter(e=>e.toLowerCase().includes(g));if(e.length)for(const n of e){const e=_("div",n===u?"row sel":"row"),t=_("span","label");t.appendChild(_("span","punct","$store.")),t.appendChild(_("span","name",n)),e.appendChild(t),e.onclick=()=>P(n),i.appendChild(e)}else i.appendChild(_("div","empty",g?"no matching stores":"no stores registered"))},R=()=>{if(l.contains(t.activeElement))return;l.textContent="";const e=u?n.stores.get(u):h?n.scopes.get(h):void 0;if(!e)return void l.appendChild(_("div","empty","Select a scope"));const{own:o,inherited:r}=(e=>{const n=(e,n)=>"$"!==n[0]&&"function"!=typeof e[n],t=Object.keys(e).filter(t=>n(e,t)),o=new Set(t),r=[];let i=Object.getPrototypeOf(e);for(;i&&i!==Object.prototype;){for(const e of Object.keys(i))!o.has(e)&&n(i,e)&&(o.add(e),r.push(e));i=Object.getPrototypeOf(i)}return{own:t,inherited:r}})(e);o.forEach(n=>W(n,e,n,0,"prop",[])),r.length&&(l.appendChild(_("div","divider","inherited")),r.forEach(n=>W(n,e,n,0,"prop inherited",[]))),o.length||r.length||l.appendChild(_("div","empty","empty scope")),l.appendChild(H(e))},H=e=>{const n=_("div","prop adder");n.appendChild(_("span","spacer"));const t=_("input","val key-in");t.placeholder="key";const o=_("input","val");o.placeholder="value";return t.onkeydown=o.onkeydown=n=>{"Enter"===n.key&&(()=>{const n=t.value.trim();if(!n)return;const r=o.value;let i=r;"true"===r?i=!0:"false"===r?i=!1:""===r||isNaN(+r)||(i=+r),e[n]=i,t.blur(),o.blur(),X(),setTimeout(()=>{const e=l.querySelector(".adder .key-in");e&&e.focus()})})()},n.appendChild(t),n.appendChild(o),n},W=(e,n,t,o,r,i)=>{const d=n[e],a=_("div",r);if(a.style.paddingLeft=8+14*o+"px",null!==d&&"object"==typeof d){const s=i.indexOf(d)>-1,p=!s&&S.has(t);if(a.appendChild(_("span",p?"arrow open":"arrow","\u25b6")),a.appendChild(_("span","key",e)),a.appendChild(_("span","preview",s?"(circular)":(e=>Array.isArray(e)?`(${e.length}) ${j(e)}`:j(e))(d))),s||(a.classList.add("toggle"),a.onclick=()=>{p?S.delete(t):S.add(t),R()}),A(a,n,e,o,r),l.appendChild(a),p){const e=Object.keys(d);if(!e.length){const e=_("div","muted","(empty)");e.style.paddingLeft=22+14*(o+1)+"px",l.appendChild(e)}for(const n of e)W(n,d,t+"."+n,o+1,r,i.concat([d]))}return}a.appendChild(_("span","spacer")),a.appendChild(_("span","key",e));const s=((e,n)=>{for(let t=e;t&&t!==Object.prototype;t=Object.getPrototypeOf(t)){const e=Object.getOwnPropertyDescriptor(t,n);if(e)return e}})(n,e);if("function"==typeof d)a.appendChild(_("span","preview","\u0192"));else if((e=>{if(!e)return!1;if(e.get&&!e.set)return!0;const n=e.value;return!!n&&!0===n.__v_isRef&&!0===n.__v_isReadonly})(s))a.appendChild(_("span","preview",j(d)));else if("boolean"==typeof d){a.appendChild(_("span","bool",String(d)));const t=_("input","check");t.type="checkbox",t.checked=d,t.onchange=()=>{n[e]=t.checked,t.blur(),X()},a.appendChild(t)}else{const t=_("input","val");t.value=j(d),t.onfocus=()=>{t.value="string"==typeof d?d:String(d)},t.onkeydown=e=>{"Enter"===e.key&&t.blur(),"Escape"===e.key&&(t.value=j(d),t.blur())},t.onblur=()=>{const o=((e,n)=>{if("number"==typeof n){const n=parseFloat(e);return isNaN(n)?e:n}return e})(t.value,d);o!==d?(n[e]=o,X()):t.value=j(d)},a.appendChild(t)}A(a,n,e,o,r),l.appendChild(a)},A=(e,n,o,r,i)=>{if(0!==r||"prop"!==i)return;const l=Object.getOwnPropertyDescriptor(n,o);if(l&&l.get)return;const d=_("button","del","\u2715");d.title=`delete "${o}"`,d.onclick=e=>{e.stopPropagation();const r=t.activeElement;r&&r.blur&&r.blur(),delete n[o],X()},e.appendChild(d)},B=e=>{const o=e.target;if(o===t.host)return;e.preventDefault(),e.stopPropagation(),J();let r=o;for(;r&&!n.scopes.has(r);)r=r.parentElement;r&&I(r)},F=e=>{let o=e.target;if(o!==t.host){for(;o&&!n.scopes.has(o);)o=o.parentElement;o?T(o):z()}},J=()=>{v=!1,d.classList.remove("active"),z(),document.removeEventListener("click",B,!0),document.removeEventListener("mousemove",F,!0)};let U=!1;const X=()=>{U||(U=!0,setTimeout(()=>{U=!1,"none"!==o.style.display&&(V(),R())}))},Y=()=>{const e=document.createElement("div");t=e.attachShadow({mode:"open"});const u=document.createElement("style");u.textContent="\n:host {\n all: initial;\n --bg: #1e1e1e;\n --bg2: #252526;\n --hover: #2a2d2e;\n --border: #3c3c3c;\n --fg: #d4d4d4;\n --muted: #808080;\n --accent: #42b883;\n --sel: #094771;\n --key: #9cdcfe;\n --val: #ce9178;\n --exp: #6a9955;\n}\n:host(.light) {\n --bg: #ffffff;\n --bg2: #f3f3f3;\n --hover: #ececec;\n --border: #d0d0d0;\n --fg: #383a42;\n --muted: #8e8e90;\n --sel: #d2e5f5;\n --key: #0451a5;\n --val: #a31515;\n --exp: #22863a;\n}\n* {\n box-sizing: border-box;\n}\n.pill, .panel {\n position: fixed;\n right: 12px;\n bottom: 12px;\n z-index: 2147483646;\n font: 11px/1.5 ui-monospace, Menlo, Consolas, monospace;\n color: var(--fg);\n}\n.pill {\n background: var(--bg);\n border: 1px solid var(--border);\n border-radius: 999px;\n padding: 4px 10px;\n cursor: pointer;\n user-select: none;\n}\n.pill:hover {\n border-color: var(--accent);\n}\n.panel {\n display: flex;\n flex-direction: column;\n width: 640px;\n max-width: calc(100vw - 24px);\n height: 440px;\n max-height: calc(100vh - 24px);\n min-width: 320px;\n min-height: 200px;\n background: var(--bg);\n border: 1px solid var(--border);\n border-radius: 6px;\n overflow: hidden;\n resize: both;\n box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);\n}\n.header {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 4px 8px;\n background: var(--bg2);\n border-bottom: 1px solid var(--border);\n user-select: none;\n cursor: move;\n}\n.title {\n color: var(--accent);\n font-weight: bold;\n margin-right: auto;\n}\n.btn {\n display: flex;\n align-items: center;\n background: none;\n border: 1px solid var(--border);\n border-radius: 3px;\n color: var(--fg);\n font: inherit;\n padding: 3px 7px;\n cursor: pointer;\n}\n.btn svg {\n display: block;\n}\n.btn:hover {\n border-color: var(--accent);\n}\n.btn.active {\n background: var(--accent);\n border-color: var(--accent);\n color: var(--bg);\n}\n.body {\n display: flex;\n flex: 1;\n min-height: 0;\n}\n.side {\n display: flex;\n flex-direction: column;\n width: 40%;\n min-width: 0;\n border-right: 1px solid var(--border);\n}\n.tabs {\n display: flex;\n border-bottom: 1px solid var(--border);\n user-select: none;\n}\n.tab {\n flex: 1;\n padding: 4px 0;\n text-align: center;\n color: var(--muted);\n border-bottom: 2px solid transparent;\n cursor: pointer;\n}\n.tab:hover {\n color: var(--fg);\n}\n.tab.active {\n color: var(--fg);\n border-bottom-color: var(--accent);\n}\n.filter {\n margin: 6px 6px 2px;\n background: var(--bg2);\n border: 1px solid var(--border);\n border-radius: 3px;\n color: var(--fg);\n font: inherit;\n padding: 2px 6px;\n outline: none;\n}\n.filter:focus {\n border-color: var(--accent);\n}\n.filter::placeholder {\n color: var(--muted);\n}\n.tree {\n flex: 1;\n overflow: auto;\n padding: 4px 0;\n}\n.state {\n flex: 1;\n overflow: auto;\n padding: 4px 0;\n}\n.row {\n padding: 2px 8px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n cursor: pointer;\n}\n.row:hover {\n background: var(--hover);\n}\n.row.sel {\n background: var(--sel);\n}\n.row .name {\n color: var(--key);\n}\n.row .punct {\n color: var(--muted);\n}\n.row .exp {\n color: var(--exp);\n}\n.prop {\n display: flex;\n gap: 6px;\n padding: 2px 8px;\n align-items: center;\n}\n.prop .key {\n color: var(--key);\n flex-shrink: 0;\n}\n.arrow {\n width: 12px;\n flex-shrink: 0;\n color: var(--muted);\n font-size: 9px;\n transition: transform 0.1s;\n}\n.arrow.open {\n transform: rotate(90deg);\n}\n.spacer {\n width: 12px;\n flex-shrink: 0;\n}\n.prop.toggle {\n cursor: pointer;\n user-select: none;\n}\n.prop.toggle:hover {\n background: var(--hover);\n}\n.preview {\n flex: 1;\n min-width: 0;\n color: var(--muted);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.muted {\n color: var(--muted);\n padding: 2px 8px;\n}\n.check {\n margin: 0;\n flex-shrink: 0;\n accent-color: var(--accent);\n cursor: pointer;\n}\n.del {\n visibility: hidden;\n flex-shrink: 0;\n background: none;\n border: none;\n padding: 0 2px;\n color: var(--muted);\n font: inherit;\n cursor: pointer;\n}\n.prop:hover .del {\n visibility: visible;\n}\n.del:hover {\n color: #e5534b;\n}\n.adder .key-in {\n flex: 0 0 30%;\n color: var(--key);\n}\n.adder input::placeholder {\n color: var(--muted);\n}\n.adder input {\n border-color: var(--border);\n}\n.bool {\n color: var(--val);\n}\n.prop.inherited .key {\n color: var(--muted);\n}\n.prop .val {\n flex: 1;\n min-width: 0;\n background: none;\n border: 1px solid transparent;\n border-radius: 3px;\n color: var(--val);\n font: inherit;\n padding: 0 3px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\ninput.val:hover, input.val:focus {\n border-color: var(--border);\n outline: none;\n background: var(--bg2);\n}\n.divider {\n padding: 4px 8px 1px;\n color: var(--muted);\n font-size: 10px;\n text-transform: uppercase;\n user-select: none;\n}\n.empty {\n padding: 8px;\n color: var(--muted);\n}\n.highlight {\n position: fixed;\n z-index: 2147483645;\n background: rgba(66, 184, 131, 0.25);\n border: 1px solid var(--accent);\n pointer-events: none;\n display: none;\n}\n",t.appendChild(u),s=_("div","highlight"),t.appendChild(s),r=_("div","pill","\u26a1 LiteVue"),r.onclick=()=>{r.style.display="none",o.style.display="flex",w({open:!0}),X()},t.appendChild(r),o=_("div","panel"),o.style.display="none";const x=_("div","header");x.appendChild(_("span","title","\u26a1 LiteVue")),x.addEventListener("mousedown",e=>{if(e.target.closest(".btn"))return;e.preventDefault();const n=o.getBoundingClientRect(),t=window.innerWidth-n.right,r=window.innerHeight-n.bottom,i=e.clientX,l=e.clientY,d=e=>{o.style.right=Math.max(0,t-(e.clientX-i))+"px",o.style.bottom=Math.max(0,r-(e.clientY-l))+"px"},a=()=>{document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",a),w({right:parseInt(o.style.right)||12,bottom:parseInt(o.style.bottom)||12})};document.addEventListener("mousemove",d),document.addEventListener("mouseup",a)}),a=_("button","btn"),a.onclick=()=>{E=C[E];try{localStorage.setItem(y,E)}catch{}O()},x.appendChild(a),L.addEventListener("change",()=>{"system"===E&&O()}),O(),d=_("button","btn"),d.title="pick an element on the page",d.innerHTML=f('<circle cx="12" cy="12" r="7"/><line x1="12" y1="1" x2="12" y2="6"/><line x1="12" y1="18" x2="12" y2="23"/><line x1="1" y1="12" x2="6" y2="12"/><line x1="18" y1="12" x2="23" y2="12"/>'),d.onclick=()=>v?J():(v=!0,d.classList.add("active"),document.addEventListener("click",B,!0),void document.addEventListener("mousemove",F,!0)),x.appendChild(d);const m=_("button","btn","\u2715");m.onclick=()=>{v&&J(),o.style.display="none",r.style.display="",w({open:!1})},x.appendChild(m),o.appendChild(x);const k=_("div","body"),S=_("div","side"),N=_("div","tabs");p=_("div","tab active"),p.onclick=()=>M("Elements"),c=_("div","tab"),c.onclick=()=>M("Stores"),N.appendChild(p),N.appendChild(c),S.appendChild(N);const $=_("input","filter");$.placeholder="Filter by name",$.oninput=()=>{g=$.value.trim().toLowerCase(),V()},$.onkeydown=e=>{"Escape"===e.key&&($.value="",g="",V())},S.appendChild($),i=_("div","tree"),S.appendChild(i),l=_("div","state"),k.appendChild(S),k.appendChild(l),o.appendChild(k),t.appendChild(o);const j=b();if(null!=j.right&&(o.style.right=j.right+"px"),null!=j.bottom&&(o.style.bottom=j.bottom+"px"),j.w&&(o.style.width=j.w+"px"),j.h&&(o.style.height=j.h+"px"),j.open&&(r.style.display="none",o.style.display="flex",X()),"undefined"!=typeof ResizeObserver){let e;new ResizeObserver(()=>{clearTimeout(e),e=setTimeout(()=>{"none"!==o.style.display&&o.offsetWidth&&w({w:o.offsetWidth,h:o.offsetHeight})},300)}).observe(o)}document.body.appendChild(e),n.on("scope:mount",X),n.on("scope:unmount",e=>{e===h&&(h=null),X()}),n.stores&&n.on("store:register",X),n.on("flush",X)},q=()=>{const e=window.__LITE_VUE__;e?(n=e,document.body?Y():addEventListener("DOMContentLoaded",Y)):console.warn("[LiteVue devtools] window.__LITE_VUE__ not found \u2014 load LiteVue before the devtools panel script.")};return q(),e.init=q,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e}({});
|
|
1
|
+
var LiteVueDevtoolsPanel=function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});var n,t,o,r,i,l,d,a,s,p,c,h,u=null,g=null,v=!1,f="",x="Elements",b="float",m="",y="",w="",k="",C="",L="",E=(e,n,t)=>Math.min(Math.max(e,n),Math.max(n,t)),O=e=>'<svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">'+e+"</svg>",S="litevue-devtools-theme",_="litevue-devtools-ui",$=()=>{try{return JSON.parse(localStorage.getItem(_)||"{}")}catch{return{}}},M=e=>{try{localStorage.setItem(_,JSON.stringify({...$(),...e}))}catch{}},z={dark:O('<path d="M21 12.8A9 9 0 1 1 11.2 3 7 7 0 0 0 21 12.8z"/>'),light:O('<circle cx="12" cy="12" r="5"/><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/><line x1="4.2" y1="4.2" x2="5.6" y2="5.6"/><line x1="18.4" y1="18.4" x2="19.8" y2="19.8"/><line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/><line x1="4.2" y1="19.8" x2="5.6" y2="18.4"/><line x1="18.4" y1="5.6" x2="19.8" y2="4.2"/>'),system:O('<rect x="2" y="3" width="20" height="14" rx="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/>')},I={float:O('<rect x="2" y="4" width="14" height="11" rx="1"/><rect x="9" y="10" width="13" height="10" rx="1" fill="currentColor"/>'),bottom:O('<rect x="2" y="3" width="20" height="18" rx="1"/><rect x="2" y="14" width="20" height="7" fill="currentColor"/>'),right:O('<rect x="2" y="3" width="20" height="18" rx="1"/><rect x="14" y="3" width="8" height="18" fill="currentColor"/>')},N={float:"bottom",bottom:"right",right:"float"},j={float:"floating",bottom:"docked to bottom",right:"docked to right"},P={dark:"light",light:"system",system:"dark"},T="dark";try{const e=localStorage.getItem(S);"light"!==e&&"system"!==e||(T=e)}catch{}var D=matchMedia("(prefers-color-scheme: light)"),H=()=>{const e="light"===T||"system"===T&&D.matches;t.host.classList.toggle("light",e),a.innerHTML=z[T],a.title="theme: "+T},W=new Set,V=new WeakSet,R=()=>{if("float"!==b)return;const e=parseInt(o.style.right)||0,n=parseInt(o.style.bottom)||0;w=o.style.right=E(e,0,window.innerWidth-o.offsetWidth)+"px",k=o.style.bottom=E(n,0,window.innerHeight-o.offsetHeight)+"px"},X=e=>{"float"===b?(m=o.style.width||m,y=o.style.height||y,w=o.style.right||w,k=o.style.bottom||k):"bottom"===b?C=o.style.height||C:L=o.style.width||L,b=e;const n="float"!==e;o.classList.toggle("dock-bottom","bottom"===e),o.classList.toggle("dock-right","right"===e),o.style.right=n?"":w,o.style.bottom=n?"":k,o.style.width="bottom"===e?"":"right"===e?L:m,o.style.height="right"===e?"":"bottom"===e?C:y,p.innerHTML=I[e],p.title="panel: "+j[e]},Y=(e,n,t)=>{const o=document.createElement(e);return o.className=n,null!=t&&(o.textContent=t),o},A=e=>{const n=Y("span","label");return n.appendChild(Y("span","punct","<")),n.appendChild(Y("span","name",ee(e))),n.appendChild(Y("span","punct",">")),n},B=e=>{let t=e.parentElement;for(;t;){if(n.scopes.has(t))return t;t=t.parentElement}return null},F=(e,n)=>{const t=new Set,o=(e,r,i)=>{if(null!=e){if("object"!=typeof e)return String(e).toLowerCase().includes(n)?r:void 0;if(i>4||t.has(e))return;t.add(e);for(const t of Object.keys(e)){if("$"===t[0])continue;let l;try{l=e[t]}catch{continue}if("function"==typeof l)continue;const d=r?`${r}.${t}`:t;if(t.toLowerCase().includes(n))return d;const a=o(l,d,i+1);if(a)return a}}};return o(e,"",0)},J=e=>{let n;try{n=void 0===e?"undefined":JSON.stringify(e)??String(e)}catch(t){n=String(e)}return n.length>60?n.slice(0,60)+"\u2026":n},U=e=>{const n=e.getBoundingClientRect();s.style.cssText=`display:block;left:${n.left}px;top:${n.top}px;width:${n.width}px;height:${n.height}px`},q=()=>{s.style.display="none"},G=e=>{e!==u&&W.clear(),g=null,u=e,x="Elements",window.$scope=e?n.scopes.get(e):void 0,ne(),te()},Z=e=>{e!==g&&W.clear(),u=null,g=e,x="Stores",window.$scope=n.stores.get(e),ne(),te()},K=e=>{x=e,ne()},Q=/^\s*([A-Za-z_$][\w$]*)\s*\(/,ee=e=>n.names.get(e)||(e=>{const t=Q.exec(n.exps.get(e)||"")?.[1];return t&&n.components?.has(t)?t:void 0})(e)||e.id||e.tagName.toLowerCase(),ne=()=>{if((()=>{const e=n.stores?n.stores.size:0;c.textContent=`Elements (${n.scopes.size})`,c.className="Elements"===x?"tab active":"tab",h.textContent=`Stores (${e})`,h.className="Stores"===x?"tab active":"tab"})(),i.textContent="","Elements"===x){const e=[...n.scopes.keys()].sort((e,n)=>e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1),t=new Map;for(const i of e)if(!f||ee(i).toLowerCase().includes(f))t.set(i,void 0);else{const e=F(n.scopes.get(i),f);e&&t.set(i,e)}if(!t.size)return void i.appendChild(Y("div","empty",f?"no matching scopes":"no scopes mounted"));const o=new Set;for(const n of t.keys()){o.add(n);for(let e=B(n);e;e=B(e))o.add(e)}const r=new Map,l=new Map,d=new Map;for(const n of e){if(!o.has(n))continue;const e=B(n);r.set(n,e),d.set(n,e?(d.get(e)??0)+1:0),e&&l.set(e,(l.get(e)||0)+1)}const a=e=>{for(let n=r.get(e);n;n=r.get(n)??null)if(V.has(n))return!0;return!1};for(const s of e){if(!o.has(s)||a(s))continue;const e=Y("div",s===u?"row sel":"row");e.style.paddingLeft=8+12*(d.get(s)??0)+"px";const r=V.has(s);if(l.get(s)){const n=Y("span",r?"arrow":"arrow open","\u25b6");n.onclick=e=>{e.stopPropagation(),r?V.delete(s):V.add(s),ne()},e.appendChild(n)}else e.appendChild(Y("span","spacer"));e.appendChild(A(s));const p=n.exps.get(s);p&&e.appendChild(Y("span","exp"," "+p));const c=t.get(s);c&&e.appendChild(Y("span","hit"," "+c)),e.onclick=()=>G(s),e.onmouseenter=()=>U(s),e.onmouseleave=q,i.appendChild(e)}return}const e=new Map;for(const o of n.stores?n.stores.keys():[])if(!f||o.toLowerCase().includes(f))e.set(o,void 0);else{const t=F(n.stores.get(o),f);t&&e.set(o,t)}const t=[...e.keys()];if(t.length)for(const n of t){const t=Y("div",n===g?"row sel":"row"),o=Y("span","label");o.appendChild(Y("span","punct","$store.")),o.appendChild(Y("span","name",n)),t.appendChild(o);const r=e.get(n);r&&t.appendChild(Y("span","hit"," "+r)),t.onclick=()=>Z(n),i.appendChild(t)}else i.appendChild(Y("div","empty",f?"no matching stores":"no stores registered"))},te=()=>{if(l.contains(t.activeElement))return;l.textContent="";const e=g?n.stores.get(g):u?n.scopes.get(u):void 0;if(!e)return void l.appendChild(Y("div","empty","Select a scope"));const{own:o,inherited:r}=(e=>{const n=(e,n)=>"$"!==n[0]&&"function"!=typeof e[n],t=Object.keys(e).filter(t=>n(e,t)),o=new Set(t),r=[];let i=Object.getPrototypeOf(e);for(;i&&i!==Object.prototype;){for(const e of Object.keys(i))!o.has(e)&&n(i,e)&&(o.add(e),r.push(e));i=Object.getPrototypeOf(i)}return{own:t,inherited:r}})(e);o.forEach(n=>re(n,e,n,0,"prop",[])),r.length&&(l.appendChild(Y("div","divider","inherited")),r.forEach(n=>re(n,e,n,0,"prop inherited",[]))),o.length||r.length||l.appendChild(Y("div","empty","empty scope")),l.appendChild(oe(e))},oe=e=>{const n=Y("div","prop adder");n.appendChild(Y("span","spacer"));const t=Y("input","val key-in");t.placeholder="key";const o=Y("input","val");o.placeholder="value";return t.onkeydown=o.onkeydown=n=>{"Enter"===n.key&&(()=>{const n=t.value.trim();if(!n)return;const r=o.value;let i=r;"true"===r?i=!0:"false"===r?i=!1:""===r||isNaN(+r)||(i=+r),e[n]=i,t.blur(),o.blur(),pe(),setTimeout(()=>{const e=l.querySelector(".adder .key-in");e&&e.focus()})})()},n.appendChild(t),n.appendChild(o),n},re=(e,n,t,o,r,i)=>{const d=n[e],a=Y("div",r);if(a.style.paddingLeft=8+14*o+"px",null!==d&&"object"==typeof d){const s=i.indexOf(d)>-1,p=!s&&W.has(t);if(a.appendChild(Y("span",p?"arrow open":"arrow","\u25b6")),a.appendChild(Y("span","key",e)),a.appendChild(Y("span","preview",s?"(circular)":(e=>Array.isArray(e)?`(${e.length}) ${J(e)}`:J(e))(d))),s||(a.classList.add("toggle"),a.onclick=()=>{p?W.delete(t):W.add(t),te()}),ie(a,n,e,o,r),l.appendChild(a),p){const e=Object.keys(d);if(!e.length){const e=Y("div","muted","(empty)");e.style.paddingLeft=22+14*(o+1)+"px",l.appendChild(e)}for(const n of e)re(n,d,t+"."+n,o+1,r,i.concat([d]))}return}a.appendChild(Y("span","spacer")),a.appendChild(Y("span","key",e));const s=((e,n)=>{for(let t=e;t&&t!==Object.prototype;t=Object.getPrototypeOf(t)){const e=Object.getOwnPropertyDescriptor(t,n);if(e)return e}})(n,e);if("function"==typeof d)a.appendChild(Y("span","preview","\u0192"));else if((e=>{if(!e)return!1;if(e.get&&!e.set)return!0;const n=e.value;return!!n&&!0===n.__v_isRef&&!0===n.__v_isReadonly})(s))a.appendChild(Y("span","preview",J(d)));else if("boolean"==typeof d){a.appendChild(Y("span","bool",String(d)));const t=Y("input","check");t.type="checkbox",t.checked=d,t.onchange=()=>{n[e]=t.checked,t.blur(),pe()},a.appendChild(t)}else{const t=Y("input","val");t.value=J(d),t.onfocus=()=>{t.value="string"==typeof d?d:String(d)},t.onkeydown=e=>{"Enter"===e.key&&t.blur(),"Escape"===e.key&&(t.value=J(d),t.blur())},t.onblur=()=>{const o=((e,n)=>{if("number"==typeof n){const n=parseFloat(e);return isNaN(n)?e:n}return e})(t.value,d);o!==d?(n[e]=o,pe()):t.value=J(d)},a.appendChild(t)}ie(a,n,e,o,r),l.appendChild(a)},ie=(e,n,o,r,i)=>{if(0!==r||"prop"!==i)return;const l=Object.getOwnPropertyDescriptor(n,o);if(l&&l.get)return;const d=Y("button","del","\u2715");d.title=`delete "${o}"`,d.onclick=e=>{e.stopPropagation();const r=t.activeElement;r&&r.blur&&r.blur(),delete n[o],pe()},e.appendChild(d)},le=e=>{const o=e.target;if(o===t.host)return;e.preventDefault(),e.stopPropagation(),ae();let r=o;for(;r&&!n.scopes.has(r);)r=r.parentElement;r&&G(r)},de=e=>{let o=e.target;if(o!==t.host){for(;o&&!n.scopes.has(o);)o=o.parentElement;o?U(o):q()}},ae=()=>{v=!1,d.classList.remove("active"),q(),document.removeEventListener("click",le,!0),document.removeEventListener("mousemove",de,!0)},se=!1,pe=()=>{se||(se=!0,setTimeout(()=>{se=!1,"none"!==o.style.display&&(ne(),te())}))},ce=()=>{const e=document.createElement("div");t=e.attachShadow({mode:"open"});const g=document.createElement("style");g.textContent="\n:host {\n all: initial;\n --bg: #1e1e1e;\n --bg2: #252526;\n --hover: #2a2d2e;\n --border: #3c3c3c;\n --fg: #d4d4d4;\n --muted: #808080;\n --accent: #42b883;\n --sel: #094771;\n --key: #9cdcfe;\n --val: #ce9178;\n --exp: #6a9955;\n}\n:host(.light) {\n --bg: #ffffff;\n --bg2: #f3f3f3;\n --hover: #ececec;\n --border: #d0d0d0;\n --fg: #383a42;\n --muted: #8e8e90;\n --sel: #d2e5f5;\n --key: #0451a5;\n --val: #a31515;\n --exp: #22863a;\n}\n* {\n box-sizing: border-box;\n}\n.pill, .panel {\n position: fixed;\n right: 12px;\n bottom: 12px;\n z-index: 2147483646;\n font: 11px/1.5 ui-monospace, Menlo, Consolas, monospace;\n color: var(--fg);\n}\n.pill {\n background: var(--bg);\n border: 1px solid var(--border);\n border-radius: 999px;\n padding: 4px 10px;\n cursor: pointer;\n user-select: none;\n}\n.pill:hover {\n border-color: var(--accent);\n}\n.panel {\n display: flex;\n flex-direction: column;\n width: 760px;\n max-width: calc(100vw - 24px);\n height: 450px;\n max-height: calc(100vh - 24px);\n min-width: 320px;\n min-height: 320px;\n background: var(--bg);\n border: 1px solid var(--border);\n border-radius: 6px;\n overflow: hidden;\n box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);\n}\n.panel.dock-bottom {\n right: 0;\n bottom: 0;\n left: 0;\n width: 100%;\n max-width: none;\n border-radius: 0;\n border-left: 0;\n border-right: 0;\n border-bottom: 0;\n}\n.panel.dock-right {\n top: 0;\n right: 0;\n bottom: 0;\n height: 100%;\n max-height: none;\n border-radius: 0;\n border-top: 0;\n border-right: 0;\n border-bottom: 0;\n}\n.panel.dock-bottom .header,\n.panel.dock-right .header {\n cursor: default;\n}\n.grip {\n position: absolute;\n z-index: 1;\n touch-action: none;\n right: 0;\n bottom: 0;\n width: 14px;\n height: 14px;\n cursor: nwse-resize;\n background: linear-gradient(135deg, transparent 50%, var(--border) 50%);\n}\n.panel.dock-bottom .grip {\n top: 0;\n left: 0;\n width: auto;\n height: 5px;\n cursor: ns-resize;\n background: none;\n}\n.panel.dock-right .grip {\n top: 0;\n left: 0;\n width: 5px;\n height: auto;\n cursor: ew-resize;\n background: none;\n}\n.panel.dock-bottom .grip:hover,\n.panel.dock-bottom .grip.active,\n.panel.dock-right .grip:hover,\n.panel.dock-right .grip.active {\n background: var(--accent);\n}\n.header {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 4px 8px;\n background: var(--bg2);\n border-bottom: 1px solid var(--border);\n user-select: none;\n cursor: move;\n}\n.title {\n color: var(--accent);\n font-weight: bold;\n margin-right: auto;\n}\n.btn {\n display: flex;\n align-items: center;\n background: none;\n border: 1px solid var(--border);\n border-radius: 3px;\n color: var(--fg);\n font: inherit;\n padding: 3px 7px;\n cursor: pointer;\n}\n.btn svg {\n display: block;\n}\n.btn:hover {\n border-color: var(--accent);\n}\n.btn.active {\n background: var(--accent);\n border-color: var(--accent);\n color: var(--bg);\n}\n.body {\n display: flex;\n flex: 1;\n min-height: 0;\n}\n.side {\n display: flex;\n flex-direction: column;\n width: 40%;\n min-width: 0;\n border-right: 1px solid var(--border);\n}\n.tabs {\n display: flex;\n border-bottom: 1px solid var(--border);\n user-select: none;\n}\n.tab {\n flex: 1;\n padding: 4px 0;\n text-align: center;\n color: var(--muted);\n border-bottom: 2px solid transparent;\n cursor: pointer;\n}\n.tab:hover {\n color: var(--fg);\n}\n.tab.active {\n color: var(--fg);\n border-bottom-color: var(--accent);\n}\n.filter {\n margin: 6px 6px 2px;\n background: var(--bg2);\n border: 1px solid var(--border);\n border-radius: 3px;\n color: var(--fg);\n font: inherit;\n padding: 2px 6px;\n outline: none;\n}\n.filter:focus {\n border-color: var(--accent);\n}\n.filter::placeholder {\n color: var(--muted);\n}\n.tree {\n flex: 1;\n overflow: auto;\n padding: 4px 0;\n}\n.state {\n flex: 1;\n overflow: auto;\n padding: 4px 0;\n}\n.row {\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 2px 8px;\n white-space: nowrap;\n overflow: hidden;\n cursor: pointer;\n}\n.row .label {\n flex-shrink: 0;\n}\n.row .arrow {\n cursor: pointer;\n padding: 3px 4px;\n margin: -3px -4px;\n box-sizing: content-box;\n}\n.row .arrow:hover {\n color: var(--key);\n}\n.row .hit {\n color: var(--exp);\n opacity: 0.75;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.row:hover {\n background: var(--hover);\n}\n.row.sel {\n background: var(--sel);\n}\n.row .name {\n color: var(--key);\n}\n.row .punct {\n color: var(--muted);\n}\n.row .exp {\n color: var(--exp);\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.prop {\n display: flex;\n gap: 6px;\n padding: 2px 8px;\n align-items: center;\n}\n.prop .key {\n color: var(--key);\n flex-shrink: 0;\n}\n.arrow {\n width: 12px;\n flex-shrink: 0;\n color: var(--muted);\n font-size: 9px;\n transition: transform 0.1s;\n}\n.arrow.open {\n transform: rotate(90deg);\n}\n.spacer {\n width: 12px;\n flex-shrink: 0;\n}\n.prop.toggle {\n cursor: pointer;\n user-select: none;\n}\n.prop.toggle:hover {\n background: var(--hover);\n}\n.preview {\n flex: 1;\n min-width: 0;\n color: var(--muted);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.muted {\n color: var(--muted);\n padding: 2px 8px;\n}\n.check {\n margin: 0;\n flex-shrink: 0;\n accent-color: var(--accent);\n cursor: pointer;\n}\n.del {\n visibility: hidden;\n flex-shrink: 0;\n background: none;\n border: none;\n padding: 0 2px;\n color: var(--muted);\n font: inherit;\n cursor: pointer;\n}\n.prop:hover .del {\n visibility: visible;\n}\n.del:hover {\n color: #e5534b;\n}\n.adder .key-in {\n flex: 0 0 30%;\n color: var(--key);\n}\n.adder input::placeholder {\n color: var(--muted);\n}\n.adder input {\n border-color: var(--border);\n}\n.bool {\n color: var(--val);\n}\n.prop.inherited .key {\n color: var(--muted);\n}\n.prop .val {\n flex: 1;\n min-width: 0;\n background: none;\n border: 1px solid transparent;\n border-radius: 3px;\n color: var(--val);\n font: inherit;\n padding: 0 3px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\ninput.val:hover, input.val:focus {\n border-color: var(--border);\n outline: none;\n background: var(--bg2);\n}\n.divider {\n padding: 4px 8px 1px;\n color: var(--muted);\n font-size: 10px;\n text-transform: uppercase;\n user-select: none;\n}\n.empty {\n padding: 8px;\n color: var(--muted);\n}\n.highlight {\n position: fixed;\n z-index: 2147483645;\n background: rgba(66, 184, 131, 0.25);\n border: 1px solid var(--accent);\n pointer-events: none;\n display: none;\n}\n",t.appendChild(g),s=Y("div","highlight"),t.appendChild(s),(r=Y("div","pill","\u26a1 LiteVue")).onclick=()=>{r.style.display="none",o.style.display="flex",R(),M({open:!0}),pe()},t.appendChild(r),(o=Y("div","panel")).style.display="none";const x=Y("div","header");x.appendChild(Y("span","title","\u26a1 LiteVue")),x.addEventListener("mousedown",e=>{if(e.target.closest(".btn"))return;if("float"!==b)return;e.preventDefault();const n=o.getBoundingClientRect(),t=window.innerWidth-n.right,r=window.innerHeight-n.bottom,i=e.clientX,l=e.clientY,d=e=>{o.style.right=E(t-(e.clientX-i),0,window.innerWidth-o.offsetWidth)+"px",o.style.bottom=E(r-(e.clientY-l),0,window.innerHeight-o.offsetHeight)+"px"},a=()=>{document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",a),M({right:parseInt(o.style.right)||12,bottom:parseInt(o.style.bottom)||12})};document.addEventListener("mousemove",d),document.addEventListener("mouseup",a)});const _=Y("div","grip");_.addEventListener("mousedown",e=>{e.preventDefault(),_.classList.add("active");const n=o.getBoundingClientRect(),t=e.clientX,r=e.clientY,i=n.width,l=n.height,d=e=>{if("right"!==b){const n="bottom"===b?r-e.clientY:e.clientY-r;o.style.height=E(l+n,320,window.innerHeight-24)+"px"}if("bottom"!==b){const n="right"===b?t-e.clientX:e.clientX-t;o.style.width=E(i+n,320,window.innerWidth-24)+"px"}},a=()=>{document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",a),_.classList.remove("active");const e=parseInt(o.style.width),n=parseInt(o.style.height);M("float"===b?{w:e,h:n}:"bottom"===b?{bh:n}:{rw:e})};document.addEventListener("mousemove",d),document.addEventListener("mouseup",a)}),(p=Y("button","btn")).onclick=()=>{X(N[b]),M({dock:b})},x.appendChild(p),(a=Y("button","btn")).onclick=()=>{T=P[T];try{localStorage.setItem(S,T)}catch{}H()},x.appendChild(a),D.addEventListener("change",()=>{"system"===T&&H()}),H(),(d=Y("button","btn")).title="pick an element on the page",d.innerHTML=O('<circle cx="12" cy="12" r="7"/><line x1="12" y1="1" x2="12" y2="6"/><line x1="12" y1="18" x2="12" y2="23"/><line x1="1" y1="12" x2="6" y2="12"/><line x1="18" y1="12" x2="23" y2="12"/>'),d.onclick=()=>v?ae():(v=!0,d.classList.add("active"),document.addEventListener("click",le,!0),void document.addEventListener("mousemove",de,!0)),x.appendChild(d);const z=Y("button","btn","\u2715");z.onclick=()=>{v&&ae(),o.style.display="none",r.style.display="",M({open:!1})},x.appendChild(z),o.appendChild(x);const I=Y("div","body"),j=Y("div","side"),W=Y("div","tabs");(c=Y("div","tab active")).onclick=()=>K("Elements"),(h=Y("div","tab")).onclick=()=>K("Stores"),W.appendChild(c),W.appendChild(h),j.appendChild(W);const V=Y("input","filter");V.placeholder="Filter by name or state",V.oninput=()=>{f=V.value.trim().toLowerCase(),ne()},V.onkeydown=e=>{"Escape"===e.key&&(V.value="",f="",ne())},j.appendChild(V),i=Y("div","tree"),j.appendChild(i),l=Y("div","state"),I.appendChild(j),I.appendChild(l),o.appendChild(I),o.appendChild(_),t.appendChild(o);const A=$();A.w&&(m=o.style.width=A.w+"px"),A.h&&(y=o.style.height=A.h+"px"),null!=A.right&&(w=o.style.right=A.right+"px"),null!=A.bottom&&(k=o.style.bottom=A.bottom+"px"),A.bh&&(C=A.bh+"px"),A.rw&&(L=A.rw+"px"),X(A.dock||"float"),document.body.appendChild(e),A.open&&(r.style.display="none",o.style.display="flex",R(),pe()),n.on("scope:mount",pe),n.on("scope:unmount",e=>{e===u&&(u=null),pe()}),n.stores&&n.on("store:register",pe),n.on("flush",pe)},he=()=>{const e=window.__LITE_VUE__;e?(n=e,document.body?ce():addEventListener("DOMContentLoaded",ce)):console.warn("[LiteVue devtools] window.__LITE_VUE__ not found \u2014 load LiteVue before the devtools panel script.")};return he(),e.init=he,e}({});
|