@aevantec/litevue 0.5.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/LICENSE +22 -0
- package/README.md +73 -0
- package/dist/litevue-devtools.iife.js +1 -0
- package/dist/litevue-devtools.mjs +841 -0
- package/dist/litevue-devtools.umd.js +1 -0
- package/dist/litevue-plugins.iife.js +14 -0
- package/dist/litevue-plugins.mjs +1282 -0
- package/dist/litevue-plugins.umd.js +14 -0
- package/dist/litevue.iife.js +12 -0
- package/dist/litevue.mjs +1781 -0
- package/dist/litevue.umd.js +12 -0
- package/dist/types/app.d.mts +21 -0
- package/dist/types/app.d.ts +21 -0
- package/dist/types/block.d.mts +15 -0
- package/dist/types/block.d.ts +15 -0
- package/dist/types/context.d.mts +17 -0
- package/dist/types/context.d.ts +17 -0
- package/dist/types/devtools-panel.d.mts +1 -0
- package/dist/types/devtools-panel.d.ts +1 -0
- package/dist/types/devtools.d.mts +62 -0
- package/dist/types/devtools.d.ts +62 -0
- package/dist/types/directives/bind.d.mts +4 -0
- package/dist/types/directives/bind.d.ts +4 -0
- package/dist/types/directives/effect.d.mts +2 -0
- package/dist/types/directives/effect.d.ts +2 -0
- package/dist/types/directives/for.d.mts +2 -0
- package/dist/types/directives/for.d.ts +2 -0
- package/dist/types/directives/html.d.mts +2 -0
- package/dist/types/directives/html.d.ts +2 -0
- package/dist/types/directives/if.d.mts +2 -0
- package/dist/types/directives/if.d.ts +2 -0
- package/dist/types/directives/index.d.mts +15 -0
- package/dist/types/directives/index.d.ts +15 -0
- package/dist/types/directives/model.d.mts +2 -0
- package/dist/types/directives/model.d.ts +2 -0
- package/dist/types/directives/on.d.mts +2 -0
- package/dist/types/directives/on.d.ts +2 -0
- package/dist/types/directives/ref.d.mts +2 -0
- package/dist/types/directives/ref.d.ts +2 -0
- package/dist/types/directives/show.d.mts +2 -0
- package/dist/types/directives/show.d.ts +2 -0
- package/dist/types/directives/text.d.mts +3 -0
- package/dist/types/directives/text.d.ts +3 -0
- package/dist/types/effect.d.mts +15 -0
- package/dist/types/effect.d.ts +15 -0
- package/dist/types/eval.d.mts +2 -0
- package/dist/types/eval.d.ts +2 -0
- package/dist/types/index.d.mts +8 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/magics.d.mts +13 -0
- package/dist/types/magics.d.ts +13 -0
- package/dist/types/plugins/collapse.d.mts +10 -0
- package/dist/types/plugins/collapse.d.ts +10 -0
- package/dist/types/plugins/focus.d.mts +15 -0
- package/dist/types/plugins/focus.d.ts +15 -0
- package/dist/types/plugins/index.d.mts +7 -0
- package/dist/types/plugins/index.d.ts +7 -0
- package/dist/types/plugins/intersect.d.mts +11 -0
- package/dist/types/plugins/intersect.d.ts +11 -0
- package/dist/types/plugins/mask.d.mts +8 -0
- package/dist/types/plugins/mask.d.ts +8 -0
- package/dist/types/plugins/persist.d.mts +59 -0
- package/dist/types/plugins/persist.d.ts +59 -0
- package/dist/types/plugins/transition.d.mts +17 -0
- package/dist/types/plugins/transition.d.ts +17 -0
- package/dist/types/scheduler.d.mts +2 -0
- package/dist/types/scheduler.d.ts +2 -0
- package/dist/types/store.d.mts +10 -0
- package/dist/types/store.d.ts +10 -0
- package/dist/types/utils.d.mts +2 -0
- package/dist/types/utils.d.ts +2 -0
- package/dist/types/walk.d.mts +3 -0
- package/dist/types/walk.d.ts +3 -0
- package/package.json +124 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021-present, Yuxi (Evan) You
|
|
4
|
+
Copyright (c) 2026-present, litevue contributors
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in
|
|
14
|
+
all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
22
|
+
THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# litevue
|
|
2
|
+
|
|
3
|
+
`litevue` is a fork of [petite-vue](https://github.com/vuejs/petite-vue) by Evan You — an alternative distribution of [Vue](https://vuejs.org) optimized for progressive enhancement: sprinkling interactivity onto server-rendered HTML with the same template syntax and reactivity mental model as standard Vue.
|
|
4
|
+
|
|
5
|
+
Published on npm as **[`@aevantec/litevue`](https://www.npmjs.com/package/@aevantec/litevue)** — the
|
|
6
|
+
unscoped name is blocked by an unrelated `lite-vue` package. The IIFE/UMD global
|
|
7
|
+
stays `LiteVue`.
|
|
8
|
+
|
|
9
|
+
- **~8kb** gzipped core, driven by the real `@vue/reactivity`
|
|
10
|
+
- Vue-compatible syntax: `{{ }}`, `v-if`/`v-for` (keyed), `v-model`, `v-show`, …
|
|
11
|
+
- **Built-in devtools** — in-page inspector panel + browser extension, one line to disable in production
|
|
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
|
|
14
|
+
- **Global store** (`store()` / `$store`) and magic properties (`$dispatch`, `$watch`, `$id`, `$root`, …)
|
|
15
|
+
- Extra event modifiers: `.outside`, `.window`, `.debounce`, `.throttle`, animation-event filters
|
|
16
|
+
- Safe with dynamic content: injected markup stays inert until explicitly mounted
|
|
17
|
+
|
|
18
|
+
## Quick start
|
|
19
|
+
|
|
20
|
+
```html
|
|
21
|
+
<script src="https://unpkg.com/@aevantec/litevue" defer init></script>
|
|
22
|
+
|
|
23
|
+
<div v-scope="{ count: 0 }">
|
|
24
|
+
{{ count }}
|
|
25
|
+
<button @click="count++">inc</button>
|
|
26
|
+
</div>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Or with a bundler:
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
npm install @aevantec/litevue
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
```js
|
|
36
|
+
import { createApp } from '@aevantec/litevue';
|
|
37
|
+
|
|
38
|
+
createApp({ count: 0 }).mount();
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Documentation
|
|
42
|
+
|
|
43
|
+
Full documentation lives in the **[docs site](https://litevue.pages.dev/)** (source in [`docs/`](docs/), `pnpm docs:dev` to run locally):
|
|
44
|
+
|
|
45
|
+
- [Introduction](https://litevue.pages.dev/start-here/introduction) — what it is, Vue compatibility, limitations, security and CSP
|
|
46
|
+
- [Installation](https://litevue.pages.dev/start-here/installation) — CDN, npm, and mount options
|
|
47
|
+
- [Essentials](https://litevue.pages.dev/essentials/) — state, templating, components, lifecycle, dynamic content
|
|
48
|
+
- [Directives](https://litevue.pages.dev/directives/) — a page per directive, with live demos
|
|
49
|
+
- [Magics](https://litevue.pages.dev/magics/) — `$el`, `$store`, `$dispatch`, `$watch`, `$id`, …
|
|
50
|
+
- [Globals](https://litevue.pages.dev/globals/) — `createApp()`, `store()`, the devtools API
|
|
51
|
+
- [Plugins](https://litevue.pages.dev/plugins/) — the plugin system and all first-party plugins
|
|
52
|
+
- [Devtools](https://litevue.pages.dev/devtools/) — inspector panel, browser extension, production kill-switch
|
|
53
|
+
- [Migrating from petite-vue](https://litevue.pages.dev/migration/from-petite-vue) · [Coming from Alpine](https://litevue.pages.dev/migration/from-alpine)
|
|
54
|
+
|
|
55
|
+
## Development
|
|
56
|
+
|
|
57
|
+
```sh
|
|
58
|
+
pnpm install
|
|
59
|
+
pnpm dev # test pages at localhost:3000
|
|
60
|
+
pnpm test # vitest suite
|
|
61
|
+
pnpm build # core + devtools + plugins bundles
|
|
62
|
+
pnpm docs:dev # documentation site
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
See [CHANGELOG.md](CHANGELOG.md) for the fork's history.
|
|
66
|
+
|
|
67
|
+
## Status
|
|
68
|
+
|
|
69
|
+
`litevue` continues from petite-vue 0.4.1, which is no longer actively maintained upstream. It aims to stay aligned with standard Vue behavior so code can graduate to Vue with minimal friction.
|
|
70
|
+
|
|
71
|
+
## License
|
|
72
|
+
|
|
73
|
+
MIT. Original petite-vue by Evan You; fork additions by the litevue contributors.
|
|
@@ -0,0 +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,x="",g="Elements";const m=e=>'<svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">'+e+"</svg>",y="litevue-devtools-theme",f="litevue-devtools-ui",b=()=>{try{return JSON.parse(localStorage.getItem(f)||"{}")}catch{return{}}},w=e=>{try{localStorage.setItem(f,JSON.stringify({...b(),...e}))}catch{}},k={dark:m('<path d="M21 12.8A9 9 0 1 1 11.2 3 7 7 0 0 0 21 12.8z"/>'),light:m('<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:m('<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,N=(e,n,t)=>{const o=document.createElement(e);return o.className=n,null!=t&&(o.textContent=t),o},$=e=>{const n=N("span","label");return n.appendChild(N("span","punct","<")),n.appendChild(N("span","name",D(e))),n.appendChild(N("span","punct",">")),n},T=e=>{let t=0,o=e.parentElement;for(;o;)n.scopes.has(o)&&t++,o=o.parentElement;return t},_=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},z=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`},I=()=>{s.style.display="none"},j=e=>{e!==h&&S.clear(),u=null,h=e,g="Elements",window.$scope=e?n.scopes.get(e):void 0,V(),H()},M=e=>{e!==u&&S.clear(),h=null,u=e,g="Stores",window.$scope=n.stores.get(e),V(),H()},P=e=>{g=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"===g?"tab active":"tab",c.textContent=`Stores (${e})`,c.className="Stores"===g?"tab active":"tab"})(),i.textContent="","Elements"===g){const e=[...n.scopes.keys()].filter(e=>D(e).toLowerCase().includes(x)).sort((e,n)=>e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1);if(!e.length)return void i.appendChild(N("div","empty",x?"no matching scopes":"no scopes mounted"));for(const t of e){const e=N("div",t===h?"row sel":"row");e.style.paddingLeft=8+12*T(t)+"px",e.appendChild($(t));const o=n.exps.get(t);o&&e.appendChild(N("span","exp"," "+o)),e.onclick=()=>j(t),e.onmouseenter=()=>z(t),e.onmouseleave=I,i.appendChild(e)}return}const e=[...n.stores?n.stores.keys():[]].filter(e=>e.toLowerCase().includes(x));if(e.length)for(const n of e){const e=N("div",n===u?"row sel":"row"),t=N("span","label");t.appendChild(N("span","punct","$store.")),t.appendChild(N("span","name",n)),e.appendChild(t),e.onclick=()=>M(n),i.appendChild(e)}else i.appendChild(N("div","empty",x?"no matching stores":"no stores registered"))},H=()=>{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(N("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(N("div","divider","inherited")),r.forEach(n=>W(n,e,n,0,"prop inherited",[]))),o.length||r.length||l.appendChild(N("div","empty","empty scope")),l.appendChild(R(e))},R=e=>{const n=N("div","prop adder");n.appendChild(N("span","spacer"));const t=N("input","val key-in");t.placeholder="key";const o=N("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=N("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(N("span",p?"arrow open":"arrow","\u25b6")),a.appendChild(N("span","key",e)),a.appendChild(N("span","preview",s?"(circular)":(e=>Array.isArray(e)?`(${e.length}) ${_(e)}`:_(e))(d))),s||(a.classList.add("toggle"),a.onclick=()=>{p?S.delete(t):S.add(t),H()}),A(a,n,e,o,r),l.appendChild(a),p){const e=Object.keys(d);if(!e.length){const e=N("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(N("span","spacer")),a.appendChild(N("span","key",e));const s=Object.getOwnPropertyDescriptor(n,e);if("function"==typeof d)a.appendChild(N("span","preview","\u0192"));else if(s&&s.get&&!s.set)a.appendChild(N("span","preview",_(d)));else if("boolean"==typeof d){a.appendChild(N("span","bool",String(d)));const t=N("input","check");t.type="checkbox",t.checked=d,t.onchange=()=>{n[e]=t.checked,t.blur(),X()},a.appendChild(t)}else{const t=N("input","val");t.value=_(d),t.onfocus=()=>{t.value="string"==typeof d?d:String(d)},t.onkeydown=e=>{"Enter"===e.key&&t.blur(),"Escape"===e.key&&(t.value=_(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=_(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=N("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&&j(r)},F=e=>{let o=e.target;if(o!==t.host){for(;o&&!n.scopes.has(o);)o=o.parentElement;o?z(o):I()}},J=()=>{v=!1,d.classList.remove("active"),I(),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(),H())}))},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=N("div","highlight"),t.appendChild(s),r=N("div","pill","\u26a1 LiteVue"),r.onclick=()=>{r.style.display="none",o.style.display="flex",w({open:!0}),X()},t.appendChild(r),o=N("div","panel"),o.style.display="none";const g=N("div","header");g.appendChild(N("span","title","\u26a1 LiteVue")),g.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=N("button","btn"),a.onclick=()=>{E=C[E];try{localStorage.setItem(y,E)}catch{}O()},g.appendChild(a),L.addEventListener("change",()=>{"system"===E&&O()}),O(),d=N("button","btn"),d.title="pick an element on the page",d.innerHTML=m('<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)),g.appendChild(d);const f=N("button","btn","\u2715");f.onclick=()=>{v&&J(),o.style.display="none",r.style.display="",w({open:!1})},g.appendChild(f),o.appendChild(g);const k=N("div","body"),S=N("div","side"),$=N("div","tabs");p=N("div","tab active"),p.onclick=()=>P("Elements"),c=N("div","tab"),c.onclick=()=>P("Stores"),$.appendChild(p),$.appendChild(c),S.appendChild($);const T=N("input","filter");T.placeholder="Filter by name",T.oninput=()=>{x=T.value.trim().toLowerCase(),V()},T.onkeydown=e=>{"Escape"===e.key&&(T.value="",x="",V())},S.appendChild(T),i=N("div","tree"),S.appendChild(i),l=N("div","state"),k.appendChild(S),k.appendChild(l),o.appendChild(k),t.appendChild(o);const _=b();if(null!=_.right&&(o.style.right=_.right+"px"),null!=_.bottom&&(o.style.bottom=_.bottom+"px"),_.w&&(o.style.width=_.w+"px"),_.h&&(o.style.height=_.h+"px"),_.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}({});
|