@aevantec/litevue 0.5.9 → 0.5.11
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 +2 -2
- package/dist/litevue-devtools.iife.js +1 -1
- package/dist/litevue-devtools.mjs +1 -1
- package/dist/litevue-devtools.umd.js +1 -1
- package/dist/litevue-plugins.dev.iife.js +23 -8
- package/dist/litevue-plugins.dev.mjs +23 -8
- package/dist/litevue-plugins.iife.js +1 -1
- package/dist/litevue-plugins.mjs +1 -1
- package/dist/litevue-plugins.umd.js +1 -1
- package/dist/litevue.dev.iife.js +60 -28
- package/dist/litevue.dev.mjs +60 -28
- package/dist/litevue.iife.js +1 -1
- package/dist/litevue.mjs +1 -1
- package/dist/litevue.umd.js +1 -1
- package/dist/plugins/morph.dev.iife.js +10 -5
- package/dist/plugins/morph.dev.mjs +10 -5
- package/dist/plugins/morph.iife.js +1 -1
- package/dist/plugins/morph.mjs +1 -1
- package/dist/plugins/morph.umd.js +1 -1
- package/dist/plugins/popover.iife.js +1 -0
- package/dist/plugins/popover.mjs +1 -0
- package/dist/plugins/popover.umd.js +1 -0
- package/dist/plugins/resize.iife.js +1 -1
- package/dist/plugins/resize.mjs +1 -1
- package/dist/plugins/resize.umd.js +1 -1
- package/dist/types/context.d.mts +0 -1
- package/dist/types/context.d.ts +0 -1
- package/dist/types/devtools-panel/plugins.d.mts +10 -0
- package/dist/types/devtools-panel/plugins.d.ts +10 -0
- package/dist/types/devtools-panel/styles.d.mts +4 -1
- package/dist/types/devtools-panel/styles.d.ts +4 -1
- package/dist/types/devtools.d.mts +28 -1
- package/dist/types/devtools.d.ts +28 -1
- package/dist/types/plugins/morph/index.d.mts +6 -0
- package/dist/types/plugins/morph/index.d.ts +6 -0
- package/dist/types/plugins/popover/index.d.mts +2 -0
- package/dist/types/plugins/popover/index.d.ts +2 -0
- package/dist/types/plugins/resize/index.d.mts +5 -2
- package/dist/types/plugins/resize/index.d.ts +5 -2
- package/package.json +14 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t={top:"top","top-start":"top span-right","top-end":"top span-left",bottom:"bottom","bottom-start":"bottom span-right","bottom-end":"bottom span-left",left:"left","left-start":"left span-bottom","left-end":"left span-top",right:"right","right-start":"right span-bottom","right-end":"right span-top"},e={top:"bottom",bottom:"top",left:"right",right:"left"},o=0,r=r=>{r.directive("popover",({el:t,get:e,effect:o,exp:r})=>{const s=t;s.popover||(s.popover="auto");const n=e(`(val) => { ${r} = val }`),p=t=>n("open"===t.newState);return s.addEventListener("toggle",p),o(()=>{const t=!!e();t!==s.matches(":popover-open")&&(t?s.showPopover():s.hidePopover())}),()=>s.removeEventListener("toggle",p)}),r.directive("anchor",({el:r,get:s,effect:n,modifiers:p})=>{const i=r;let l="bottom",a=0;for(const e in p||{}){e in t&&(l=e);const o=/^offset-(\d+)$/.exec(e);o&&(a=+o[1])}const f=i.style.cssText,h=/^(top|bottom)/.test(l);let c;if(i.style.position="fixed",i.style.inset="auto",i.style.margin="0",CSS.supports("anchor-name: --a")){const e="--litevue-anchor-"+ ++o;return i.style.margin=h?`${a}px 0`:`0 ${a}px`,i.style.setProperty("position-anchor",e),i.style.setProperty("position-area",t[l]),i.style.setProperty("position-try-fallbacks","flip-block, flip-inline"),n(()=>{c?.style.removeProperty("anchor-name"),c=s(),c?.style.setProperty("anchor-name",e)}),()=>{c?.style.removeProperty("anchor-name"),i.style.cssText=f}}const m=()=>{!c||i.popover&&!i.matches(":popover-open")||((t,o,r,s)=>{const[n,p]=r.split("-"),i=o.getBoundingClientRect(),l=t.offsetWidth+s,a=t.offsetHeight+s,f={top:i.top-a,bottom:innerHeight-i.bottom-a,left:i.left-l,right:innerWidth-i.right-l},h=f[n]<0&&f[e[n]]>=0?e[n]:n,c="top"===h||"bottom"===h,[m,g,v]=c?[i.left,i.width,t.offsetWidth]:[i.top,i.height,t.offsetHeight],d="start"===p?m:"end"===p?m+g-v:m+(g-v)/2,y="top"===h?i.top-a:"bottom"===h?i.bottom+s:"left"===h?i.left-l:i.right+s;t.style.left=(c?d:y)+"px",t.style.top=(c?y:d)+"px"})(i,c,l,a)};return n(()=>{c=s(),m()}),addEventListener("scroll",m,!0),addEventListener("resize",m),i.addEventListener("toggle",m),()=>{removeEventListener("scroll",m,!0),removeEventListener("resize",m),i.removeEventListener("toggle",m),i.style.cssText=f}})};export{r as popover};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).LiteVuePopover={})}(this,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});var e={top:"top","top-start":"top span-right","top-end":"top span-left",bottom:"bottom","bottom-start":"bottom span-right","bottom-end":"bottom span-left",left:"left","left-start":"left span-bottom","left-end":"left span-top",right:"right","right-start":"right span-bottom","right-end":"right span-top"},o={top:"bottom",bottom:"top",left:"right",right:"left"},n=0;t.popover=t=>{t.directive("popover",({el:t,get:e,effect:o,exp:n})=>{const r=t;r.popover||(r.popover="auto");const s=e(`(val) => { ${n} = val }`),i=t=>s("open"===t.newState);return r.addEventListener("toggle",i),o(()=>{const t=!!e();t!==r.matches(":popover-open")&&(t?r.showPopover():r.hidePopover())}),()=>r.removeEventListener("toggle",i)}),t.directive("anchor",({el:t,get:r,effect:s,modifiers:i})=>{const p=t;let l="bottom",f=0;for(const o in i||{}){o in e&&(l=o);const t=/^offset-(\d+)$/.exec(o);t&&(f=+t[1])}const a=p.style.cssText,c=/^(top|bottom)/.test(l);let h;if(p.style.position="fixed",p.style.inset="auto",p.style.margin="0",CSS.supports("anchor-name: --a")){const t="--litevue-anchor-"+ ++n;return p.style.margin=c?`${f}px 0`:`0 ${f}px`,p.style.setProperty("position-anchor",t),p.style.setProperty("position-area",e[l]),p.style.setProperty("position-try-fallbacks","flip-block, flip-inline"),s(()=>{h?.style.removeProperty("anchor-name"),h=r(),h?.style.setProperty("anchor-name",t)}),()=>{h?.style.removeProperty("anchor-name"),p.style.cssText=a}}const d=()=>{!h||p.popover&&!p.matches(":popover-open")||((t,e,n,r)=>{const[s,i]=n.split("-"),p=e.getBoundingClientRect(),l=t.offsetWidth+r,f=t.offsetHeight+r,a={top:p.top-f,bottom:innerHeight-p.bottom-f,left:p.left-l,right:innerWidth-p.right-l},c=a[s]<0&&a[o[s]]>=0?o[s]:s,h="top"===c||"bottom"===c,[d,g,m]=h?[p.left,p.width,t.offsetWidth]:[p.top,p.height,t.offsetHeight],v="start"===i?d:"end"===i?d+g-m:d+(g-m)/2,y="top"===c?p.top-f:"bottom"===c?p.bottom+r:"left"===c?p.left-l:p.right+r;t.style.left=(h?v:y)+"px",t.style.top=(h?y:v)+"px"})(p,h,l,f)};return s(()=>{h=r(),d()}),addEventListener("scroll",d,!0),addEventListener("resize",d),p.addEventListener("toggle",d),()=>{removeEventListener("scroll",d,!0),removeEventListener("resize",d),p.removeEventListener("toggle",d),p.style.cssText=a}})}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var LiteVueResize=function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});return e.resize=e=>{e.directive("resize",({el:e,get:
|
|
1
|
+
var LiteVueResize=function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});return e.resize=e=>{e.directive("resize",({el:e,get:i,exp:t,modifiers:n})=>{const r=i(`(($width, $height) => { ${t} })`);if(n?.window||n?.visual){const e=n.visual&&window.visualViewport||window,i=()=>r(e.width||innerWidth,e.height||innerHeight);return e.addEventListener("resize",i),i(),()=>e.removeEventListener("resize",i)}const o=new ResizeObserver(e=>{for(const i of e){const e=i.contentRect;r(e.width,e.height)}});return o.observe(e),()=>o.disconnect()})},e}({});
|
package/dist/plugins/resize.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=e=>{e.directive("resize",({el:e,get:
|
|
1
|
+
var e=e=>{e.directive("resize",({el:e,get:i,exp:t,modifiers:n})=>{const r=i(`(($width, $height) => { ${t} })`);if(n?.window||n?.visual){const e=n.visual&&window.visualViewport||window,i=()=>r(e.width||innerWidth,e.height||innerHeight);return e.addEventListener("resize",i),i(),()=>e.removeEventListener("resize",i)}const s=new ResizeObserver(e=>{for(const i of e){const e=i.contentRect;r(e.width,e.height)}});return s.observe(e),()=>s.disconnect()})};export{e as resize};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,
|
|
1
|
+
!function(e,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i((e="undefined"!=typeof globalThis?globalThis:e||self).LiteVueResize={})}(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});e.resize=e=>{e.directive("resize",({el:e,get:i,exp:t,modifiers:n})=>{const o=i(`(($width, $height) => { ${t} })`);if(n?.window||n?.visual){const e=n.visual&&window.visualViewport||window,i=()=>o(e.width||innerWidth,e.height||innerHeight);return e.addEventListener("resize",i),i(),()=>e.removeEventListener("resize",i)}const s=new ResizeObserver(e=>{for(const i of e){const e=i.contentRect;o(e.width,e.height)}});return s.observe(e),()=>s.disconnect()})}});
|
package/dist/types/context.d.mts
CHANGED
|
@@ -2,7 +2,6 @@ import { effect as rawEffect, ReactiveEffectRunner } from '@vue/reactivity';
|
|
|
2
2
|
import { Block } from './block.mjs';
|
|
3
3
|
import { Directive } from './directives/index.mjs';
|
|
4
4
|
export interface Context {
|
|
5
|
-
key?: any;
|
|
6
5
|
scope: Record<string, any>;
|
|
7
6
|
dirs: Record<string, Directive>;
|
|
8
7
|
blocks: Block[];
|
package/dist/types/context.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { effect as rawEffect, ReactiveEffectRunner } from '@vue/reactivity';
|
|
|
2
2
|
import { Block } from './block';
|
|
3
3
|
import { Directive } from './directives';
|
|
4
4
|
export interface Context {
|
|
5
|
-
key?: any;
|
|
6
5
|
scope: Record<string, any>;
|
|
7
6
|
dirs: Record<string, Directive>;
|
|
8
7
|
blocks: Block[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { LiteVueDevtools } from '../devtools.mjs';
|
|
2
|
+
/**
|
|
3
|
+
* Plugins describe the app, not a scope, so the view opens from the panel bar
|
|
4
|
+
* and takes the whole body rather than a third sidebar tab.
|
|
5
|
+
*/
|
|
6
|
+
export declare const createPluginsView: (devtools: LiteVueDevtools) => {
|
|
7
|
+
btn: HTMLElement;
|
|
8
|
+
el: HTMLElement;
|
|
9
|
+
render: () => void;
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { LiteVueDevtools } from '../devtools';
|
|
2
|
+
/**
|
|
3
|
+
* Plugins describe the app, not a scope, so the view opens from the panel bar
|
|
4
|
+
* and takes the whole body rather than a third sidebar tab.
|
|
5
|
+
*/
|
|
6
|
+
export declare const createPluginsView: (devtools: LiteVueDevtools) => {
|
|
7
|
+
btn: HTMLElement;
|
|
8
|
+
el: HTMLElement;
|
|
9
|
+
render: () => void;
|
|
10
|
+
};
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
* Panel stylesheet. Note the template below is a *string* — comments inside it
|
|
3
3
|
* ship verbatim, so explanations belong out here where terser strips them.
|
|
4
4
|
*
|
|
5
|
+
* `[hidden]` is forced with `!important` because an author `display`, such as
|
|
6
|
+
* `.side`'s flex, beats the UA rule, and the plugins view hides by `hidden`.
|
|
7
|
+
*
|
|
5
8
|
* Docked layouts (`.dock-bottom` / `.dock-right`) give the tree a full viewport
|
|
6
9
|
* edge, as browser devtools do; only the cross-axis stays resizable, since the
|
|
7
10
|
* other would fight the dock.
|
|
@@ -14,4 +17,4 @@
|
|
|
14
17
|
* always bottom-right — the wrong corner once docked, where dragging down would
|
|
15
18
|
* grow the panel upward. Each mode gets a handle on the edge that moves.
|
|
16
19
|
*/
|
|
17
|
-
export declare const css = "\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";
|
|
20
|
+
export declare const css = "\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[hidden] {\n display: none !important;\n}\n.plugins {\n flex: 1;\n overflow: auto;\n padding: 4px 0;\n}\n.plugin {\n display: flex;\n gap: 8px;\n padding: 3px 10px;\n align-items: baseline;\n}\n.plugin .name {\n min-width: 120px;\n}\n.plugin .gave {\n flex: 1;\n color: var(--muted);\n word-break: break-word;\n}\n.plugin .flag {\n color: var(--muted);\n opacity: 0.7;\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";
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
* Panel stylesheet. Note the template below is a *string* — comments inside it
|
|
3
3
|
* ship verbatim, so explanations belong out here where terser strips them.
|
|
4
4
|
*
|
|
5
|
+
* `[hidden]` is forced with `!important` because an author `display`, such as
|
|
6
|
+
* `.side`'s flex, beats the UA rule, and the plugins view hides by `hidden`.
|
|
7
|
+
*
|
|
5
8
|
* Docked layouts (`.dock-bottom` / `.dock-right`) give the tree a full viewport
|
|
6
9
|
* edge, as browser devtools do; only the cross-axis stays resizable, since the
|
|
7
10
|
* other would fight the dock.
|
|
@@ -14,4 +17,4 @@
|
|
|
14
17
|
* always bottom-right — the wrong corner once docked, where dragging down would
|
|
15
18
|
* grow the panel upward. Each mode gets a handle on the edge that moves.
|
|
16
19
|
*/
|
|
17
|
-
export declare const css = "\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";
|
|
20
|
+
export declare const css = "\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[hidden] {\n display: none !important;\n}\n.plugins {\n flex: 1;\n overflow: auto;\n padding: 4px 0;\n}\n.plugin {\n display: flex;\n gap: 8px;\n padding: 3px 10px;\n align-items: baseline;\n}\n.plugin .name {\n min-width: 120px;\n}\n.plugin .gave {\n flex: 1;\n color: var(--muted);\n word-break: break-word;\n}\n.plugin .flag {\n color: var(--muted);\n opacity: 0.7;\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";
|
|
@@ -1,5 +1,23 @@
|
|
|
1
|
-
export type DevtoolsEvent = 'scope:mount' | 'scope:unmount' | 'store:register' | 'flush';
|
|
1
|
+
export type DevtoolsEvent = 'scope:mount' | 'scope:unmount' | 'store:register' | 'plugin:install' | 'flush';
|
|
2
2
|
type Listener = (...args: any[]) => void;
|
|
3
|
+
/**
|
|
4
|
+
* What one `app.use()` contributed.
|
|
5
|
+
*
|
|
6
|
+
* `directives` and `magics` carry the weight, not `name`: minifiers rename
|
|
7
|
+
* plugin functions, so `Function.name` is an empty string in every production
|
|
8
|
+
* build — the builds an inspector is actually pointed at. What a plugin added
|
|
9
|
+
* survives minification and is what someone debugging wants anyway.
|
|
10
|
+
*/
|
|
11
|
+
export interface PluginInfo {
|
|
12
|
+
/** The plugin function's name where a build kept it, else `plugin <n>`. */
|
|
13
|
+
name: string;
|
|
14
|
+
/** Directives it registered, e.g. `["intersect"]`. */
|
|
15
|
+
directives: string[];
|
|
16
|
+
/** Root-scope magics it added, e.g. `["$morph"]`. */
|
|
17
|
+
magics: string[];
|
|
18
|
+
/** Whether it returned a teardown, so a full unmount releases it. */
|
|
19
|
+
teardown: boolean;
|
|
20
|
+
}
|
|
3
21
|
export interface LiteVueDevtools {
|
|
4
22
|
/**
|
|
5
23
|
* Live map of scope root elements (app roots and v-scope elements) to
|
|
@@ -27,6 +45,10 @@ export interface LiteVueDevtools {
|
|
|
27
45
|
* `<Cart>` rather than by tag or id.
|
|
28
46
|
*/
|
|
29
47
|
components: Set<string>;
|
|
48
|
+
/**
|
|
49
|
+
* Plugins passed to app.use(), in install order.
|
|
50
|
+
*/
|
|
51
|
+
plugins: PluginInfo[];
|
|
30
52
|
/**
|
|
31
53
|
* Find the scope governing a node by walking up the DOM to the nearest
|
|
32
54
|
* registered scope root. Usable from the console: __LITE_VUE__.getScope($0)
|
|
@@ -43,6 +65,7 @@ export interface LiteVueDevtools {
|
|
|
43
65
|
* the same element (upsert semantics).
|
|
44
66
|
* - 'scope:unmount' (el): a scope root was torn down.
|
|
45
67
|
* - 'store:register' (name, store): a global store was registered.
|
|
68
|
+
* - 'plugin:install' (info): a plugin was installed via app.use().
|
|
46
69
|
* - 'flush': the reactive job queue flushed; state may have changed.
|
|
47
70
|
*/
|
|
48
71
|
on(event: DevtoolsEvent, fn: Listener): () => void;
|
|
@@ -51,6 +74,10 @@ export interface LiteVueDevtools {
|
|
|
51
74
|
export declare const registerScope: (el: Element, scope: Record<string, any>, exp?: string, name?: string) => (() => void);
|
|
52
75
|
export declare const registerStore: (name: string, store: Record<string, any>) => void;
|
|
53
76
|
export declare const registerComponent: (name: string) => void;
|
|
77
|
+
/** Registers a plugin and returns a deregister, as registerScope does. */
|
|
78
|
+
export declare const registerPlugin: (info: PluginInfo) => (() => void) | undefined;
|
|
79
|
+
/** True when something is listening, so app.use() can skip the diff. */
|
|
80
|
+
export declare const pluginsWatched: () => boolean;
|
|
54
81
|
export declare const emitFlush: () => void;
|
|
55
82
|
export declare const devtools: LiteVueDevtools;
|
|
56
83
|
/**
|
package/dist/types/devtools.d.ts
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
|
-
export type DevtoolsEvent = 'scope:mount' | 'scope:unmount' | 'store:register' | 'flush';
|
|
1
|
+
export type DevtoolsEvent = 'scope:mount' | 'scope:unmount' | 'store:register' | 'plugin:install' | 'flush';
|
|
2
2
|
type Listener = (...args: any[]) => void;
|
|
3
|
+
/**
|
|
4
|
+
* What one `app.use()` contributed.
|
|
5
|
+
*
|
|
6
|
+
* `directives` and `magics` carry the weight, not `name`: minifiers rename
|
|
7
|
+
* plugin functions, so `Function.name` is an empty string in every production
|
|
8
|
+
* build — the builds an inspector is actually pointed at. What a plugin added
|
|
9
|
+
* survives minification and is what someone debugging wants anyway.
|
|
10
|
+
*/
|
|
11
|
+
export interface PluginInfo {
|
|
12
|
+
/** The plugin function's name where a build kept it, else `plugin <n>`. */
|
|
13
|
+
name: string;
|
|
14
|
+
/** Directives it registered, e.g. `["intersect"]`. */
|
|
15
|
+
directives: string[];
|
|
16
|
+
/** Root-scope magics it added, e.g. `["$morph"]`. */
|
|
17
|
+
magics: string[];
|
|
18
|
+
/** Whether it returned a teardown, so a full unmount releases it. */
|
|
19
|
+
teardown: boolean;
|
|
20
|
+
}
|
|
3
21
|
export interface LiteVueDevtools {
|
|
4
22
|
/**
|
|
5
23
|
* Live map of scope root elements (app roots and v-scope elements) to
|
|
@@ -27,6 +45,10 @@ export interface LiteVueDevtools {
|
|
|
27
45
|
* `<Cart>` rather than by tag or id.
|
|
28
46
|
*/
|
|
29
47
|
components: Set<string>;
|
|
48
|
+
/**
|
|
49
|
+
* Plugins passed to app.use(), in install order.
|
|
50
|
+
*/
|
|
51
|
+
plugins: PluginInfo[];
|
|
30
52
|
/**
|
|
31
53
|
* Find the scope governing a node by walking up the DOM to the nearest
|
|
32
54
|
* registered scope root. Usable from the console: __LITE_VUE__.getScope($0)
|
|
@@ -43,6 +65,7 @@ export interface LiteVueDevtools {
|
|
|
43
65
|
* the same element (upsert semantics).
|
|
44
66
|
* - 'scope:unmount' (el): a scope root was torn down.
|
|
45
67
|
* - 'store:register' (name, store): a global store was registered.
|
|
68
|
+
* - 'plugin:install' (info): a plugin was installed via app.use().
|
|
46
69
|
* - 'flush': the reactive job queue flushed; state may have changed.
|
|
47
70
|
*/
|
|
48
71
|
on(event: DevtoolsEvent, fn: Listener): () => void;
|
|
@@ -51,6 +74,10 @@ export interface LiteVueDevtools {
|
|
|
51
74
|
export declare const registerScope: (el: Element, scope: Record<string, any>, exp?: string, name?: string) => (() => void);
|
|
52
75
|
export declare const registerStore: (name: string, store: Record<string, any>) => void;
|
|
53
76
|
export declare const registerComponent: (name: string) => void;
|
|
77
|
+
/** Registers a plugin and returns a deregister, as registerScope does. */
|
|
78
|
+
export declare const registerPlugin: (info: PluginInfo) => (() => void) | undefined;
|
|
79
|
+
/** True when something is listening, so app.use() can skip the diff. */
|
|
80
|
+
export declare const pluginsWatched: () => boolean;
|
|
54
81
|
export declare const emitFlush: () => void;
|
|
55
82
|
export declare const devtools: LiteVueDevtools;
|
|
56
83
|
/**
|
|
@@ -33,6 +33,12 @@ export interface MorphOptions {
|
|
|
33
33
|
* released — so what arrives here is inert, not a live subtree.
|
|
34
34
|
*/
|
|
35
35
|
afterNodeRemoved?: (node: Node) => void;
|
|
36
|
+
/**
|
|
37
|
+
* Patch inside `document.startViewTransition()` where supported. The patch
|
|
38
|
+
* then runs once the browser has captured the old view, not before `morph`
|
|
39
|
+
* returns. Without the API it patches immediately, as if the option were off.
|
|
40
|
+
*/
|
|
41
|
+
transition?: boolean;
|
|
36
42
|
}
|
|
37
43
|
/**
|
|
38
44
|
* morph(from, to) — patch `from` in place so it matches `to`, which may be an
|
|
@@ -33,6 +33,12 @@ export interface MorphOptions {
|
|
|
33
33
|
* released — so what arrives here is inert, not a live subtree.
|
|
34
34
|
*/
|
|
35
35
|
afterNodeRemoved?: (node: Node) => void;
|
|
36
|
+
/**
|
|
37
|
+
* Patch inside `document.startViewTransition()` where supported. The patch
|
|
38
|
+
* then runs once the browser has captured the old view, not before `morph`
|
|
39
|
+
* returns. Without the API it patches immediately, as if the option were off.
|
|
40
|
+
*/
|
|
41
|
+
transition?: boolean;
|
|
36
42
|
}
|
|
37
43
|
/**
|
|
38
44
|
* morph(from, to) — patch `from` in place so it matches `to`, which may be an
|
|
@@ -4,7 +4,10 @@ import type { Plugin } from '../../app.mjs';
|
|
|
4
4
|
* queries cannot hand to JavaScript. The expression runs with `$width` and
|
|
5
5
|
* `$height` in scope.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* `.window` measures the viewport instead, from `innerWidth`/`innerHeight`.
|
|
8
|
+
* A ResizeObserver cannot do this: on `documentElement` it reports the
|
|
9
|
+
* *document* height, so a 3000px page under a 700px viewport reports 3000.
|
|
10
|
+
* `.visual` measures the visual viewport, which shrinks for an on-screen
|
|
11
|
+
* keyboard where `innerHeight` does not.
|
|
9
12
|
*/
|
|
10
13
|
export declare const resize: Plugin;
|
|
@@ -4,7 +4,10 @@ import type { Plugin } from '../../app';
|
|
|
4
4
|
* queries cannot hand to JavaScript. The expression runs with `$width` and
|
|
5
5
|
* `$height` in scope.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* `.window` measures the viewport instead, from `innerWidth`/`innerHeight`.
|
|
8
|
+
* A ResizeObserver cannot do this: on `documentElement` it reports the
|
|
9
|
+
* *document* height, so a 3000px page under a 700px viewport reports 3000.
|
|
10
|
+
* `.visual` measures the visual viewport, which shrinks for an on-screen
|
|
11
|
+
* keyboard where `innerHeight` does not.
|
|
9
12
|
*/
|
|
10
13
|
export declare const resize: Plugin;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aevantec/litevue",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.11",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -124,6 +124,16 @@
|
|
|
124
124
|
"default": "./dist/plugins/persist.umd.js"
|
|
125
125
|
}
|
|
126
126
|
},
|
|
127
|
+
"./plugins/popover": {
|
|
128
|
+
"import": {
|
|
129
|
+
"types": "./dist/types/plugins/popover/index.d.mts",
|
|
130
|
+
"default": "./dist/plugins/popover.mjs"
|
|
131
|
+
},
|
|
132
|
+
"require": {
|
|
133
|
+
"types": "./dist/types/plugins/popover/index.d.ts",
|
|
134
|
+
"default": "./dist/plugins/popover.umd.js"
|
|
135
|
+
}
|
|
136
|
+
},
|
|
127
137
|
"./plugins/resize": {
|
|
128
138
|
"import": {
|
|
129
139
|
"types": "./dist/types/plugins/resize/index.d.mts",
|
|
@@ -176,6 +186,9 @@
|
|
|
176
186
|
"plugins/persist": [
|
|
177
187
|
"./dist/types/plugins/persist/index.d.ts"
|
|
178
188
|
],
|
|
189
|
+
"plugins/popover": [
|
|
190
|
+
"./dist/types/plugins/popover/index.d.ts"
|
|
191
|
+
],
|
|
179
192
|
"plugins/resize": [
|
|
180
193
|
"./dist/types/plugins/resize/index.d.ts"
|
|
181
194
|
],
|