@praxisjs/devtools 0.1.1 → 0.2.1

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.
Files changed (33) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/dist/index.d.ts +15 -10
  3. package/dist/index.js +1046 -852
  4. package/package.json +8 -7
  5. package/src/decorators/debug.ts +153 -78
  6. package/src/decorators/trace.ts +15 -11
  7. package/src/icons/ellipsis-vertical.tsx +25 -19
  8. package/src/icons/panel-bottom.tsx +24 -18
  9. package/src/icons/panel-left.tsx +24 -18
  10. package/src/icons/panel-right.tsx +24 -18
  11. package/src/icons/panel-top.tsx +24 -18
  12. package/src/icons/x.tsx +24 -18
  13. package/src/plugins/components/components/component-detail.tsx +59 -54
  14. package/src/plugins/components/components/component-row.tsx +36 -33
  15. package/src/plugins/components/components/detail-row.tsx +21 -18
  16. package/src/plugins/components/components/detail-section.tsx +14 -12
  17. package/src/plugins/components/components/status-dot.tsx +20 -11
  18. package/src/plugins/components/components-tab.tsx +66 -61
  19. package/src/plugins/signals/components/signal-detail.tsx +35 -27
  20. package/src/plugins/signals/components/signal-row.tsx +32 -28
  21. package/src/plugins/signals/signals-tab.tsx +92 -79
  22. package/src/plugins/timeline/components/badge.tsx +15 -9
  23. package/src/plugins/timeline/components/timeline-row.tsx +52 -45
  24. package/src/plugins/timeline/timeline-tab.tsx +90 -77
  25. package/src/plugins/types.ts +2 -2
  26. package/src/ui/dev-tools.tsx +45 -39
  27. package/src/ui/panel.tsx +152 -146
  28. package/src/ui/shared/empty-state.tsx +17 -11
  29. package/src/ui/shared/icon-button.tsx +28 -25
  30. package/src/ui/shared/panel-section.tsx +14 -12
  31. package/src/ui/shared/search-input.tsx +19 -15
  32. package/src/ui/shared/side-panel.tsx +16 -13
  33. package/vite.config.ts +3 -9
package/dist/index.js CHANGED
@@ -1,115 +1,141 @@
1
- import { jsxs as d, jsx as n } from "@praxisjs/jsx/jsx-runtime";
2
- import { signal as b, effect as P, onMount as C, onUnmount as I, peek as U } from "@praxisjs/core";
3
- import { render as j } from "@praxisjs/runtime";
4
- const N = "data:image/svg+xml,%3csvg%20width='1024'%20height='1024'%20viewBox='0%200%201024%201024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M605.411%20445.66L641.322%20498.293L641.342%20498.278L697.538%20578.57L742.673%20512.806L512.5%20178.878L281.327%20512.806L512.5%20848.182L603.519%20715.561L650.559%20782.134L512.701%20983L187%20510.478L512.701%2040L837%20510.478L698.206%20712.709L668.895%20671.104L604.033%20578.775L512%20712.504L373.199%20511.5L512.233%20309.092L584.13%20414.469L536.746%20480.456L513.69%20445.66L466.305%20511.5L512.166%20577.425L556.48%20513.91L605.411%20445.66Z'%20fill='url(%23paint0_linear_3024_20)'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_3024_20'%20x1='512'%20y1='40'%20x2='512'%20y2='983'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%239B76FF'%20stop-opacity='0.86'/%3e%3cstop%20offset='1'%20stop-color='%232D246B'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e", F = '*,:before,:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }:host{all:initial;display:block;font-family:Inter,ui-sans-serif,system-ui,-apple-system,sans-serif}*{box-sizing:border-box}input::placeholder{color:#6f6a8f}input:focus{outline:none;box-shadow:0 0 0 2px #9b90e64d}::-webkit-scrollbar{width:4px;height:4px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:#9b90e633;border-radius:2px}::-webkit-scrollbar-thumb:hover{background:#9b90e666}.container{width:100%}@media(min-width:640px){.container{max-width:640px}}@media(min-width:768px){.container{max-width:768px}}@media(min-width:1024px){.container{max-width:1024px}}@media(min-width:1280px){.container{max-width:1280px}}@media(min-width:1536px){.container{max-width:1536px}}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.bottom-0{bottom:0}.bottom-5{bottom:1.25rem}.left-0{left:0}.right-0{right:0}.right-5{right:1.25rem}.top-0{top:0}.top-full{top:100%}.z-\\[2147483647\\]{z-index:2147483647}.z-10{z-index:10}.grid{display:grid}.grid-cols-\\[1\\.2fr_0\\.8fr_1fr_auto\\]{grid-template-columns:1.2fr .8fr 1fr auto}.m6{margin:1.5rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mr-\\[2px\\]{margin-right:2px}.ms{margin-inline-start:1rem}.mt-1{margin-top:.25rem}.box-border{box-sizing:border-box}.inline-block{display:inline-block}.h-\\[13px\\]{height:13px}.h-\\[22px\\]{height:22px}.h-\\[2px\\]{height:2px}.h-\\[32px\\]{height:32px}.h-\\[6px\\]{height:6px}.h-1{height:.25rem}.h-10{height:2.5rem}.h-3{height:.75rem}.h-7{height:1.75rem}.h-full{height:100%}.h-screen{height:100vh}.max-w-\\[200px\\]{max-width:200px}.min-w-0{min-width:0}.w-\\[13px\\]{width:13px}.w-\\[22px\\]{width:22px}.w-\\[2px\\]{width:2px}.w-\\[6px\\]{width:6px}.w-1{width:.25rem}.w-10{width:2.5rem}.w-12{width:3rem}.w-4{width:1rem}.w-full{width:100%}.w-px{width:1px}.flex{display:flex}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.cursor-\\[ew-resize\\]{cursor:ew-resize}.cursor-\\[ns-resize\\]{cursor:ns-resize}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;user-select:none}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-\\[2px\\]{gap:2px}.gap-\\[3px\\]{gap:3px}.gap-\\[6px\\]{gap:6px}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-border{--un-border-opacity:.25;border-color:rgba(155,144,230,var(--un-border-opacity))}.border-warn{--un-border-opacity:1;border-color:rgb(217 119 6 / var(--un-border-opacity))}.hover\\:border-accent:hover{--un-border-opacity:1;border-color:rgb(155 144 230 / var(--un-border-opacity))}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.bg-\\[rgba\\(124\\,109\\,214\\,0\\.14\\)\\]{--un-bg-opacity:.14;background-color:rgba(124,109,214,var(--un-bg-opacity))}.bg-\\[rgba\\(14\\,165\\,122\\,0\\.14\\)\\]{--un-bg-opacity:.14;background-color:rgba(14,165,122,var(--un-bg-opacity))}.bg-\\[rgba\\(155\\,144\\,230\\,0\\.14\\)\\]{--un-bg-opacity:.14;background-color:rgba(155,144,230,var(--un-bg-opacity))}.bg-\\[rgba\\(217\\,119\\,6\\,0\\.14\\)\\]{--un-bg-opacity:.14;background-color:rgba(217,119,6,var(--un-bg-opacity))}.bg-\\[rgba\\(220\\,38\\,38\\,0\\.14\\)\\]{--un-bg-opacity:.14;background-color:rgba(220,38,38,var(--un-bg-opacity))}.bg-\\[rgba\\(74\\,222\\,128\\,0\\.12\\)\\]{--un-bg-opacity:.12;background-color:rgba(74,222,128,var(--un-bg-opacity))}.bg-accent{--un-bg-opacity:1;background-color:rgb(155 144 230 / var(--un-bg-opacity))}.bg-bg{--un-bg-opacity:1;background-color:rgb(15 13 23 / var(--un-bg-opacity))}.bg-border{--un-bg-opacity:.25;background-color:rgba(155,144,230,var(--un-bg-opacity))}.bg-header{--un-bg-opacity:1;background-color:rgb(22 19 38 / var(--un-bg-opacity))}.bg-input,.bg-section{--un-bg-opacity:1;background-color:rgb(27 24 48 / var(--un-bg-opacity))}.bg-selected{--un-bg-opacity:1;background-color:rgb(34 30 61 / var(--un-bg-opacity))}.bg-soft{--un-bg-opacity:.18;background-color:rgba(155,144,230,var(--un-bg-opacity))}.bg-subtle{--un-bg-opacity:1;background-color:rgb(111 106 143 / var(--un-bg-opacity))}.bg-success{--un-bg-opacity:1;background-color:rgb(14 165 122 / var(--un-bg-opacity))}.bg-transparent{background-color:transparent}.hover\\:bg-accent:hover{--un-bg-opacity:1;background-color:rgb(155 144 230 / var(--un-bg-opacity))}.hover\\:bg-section:hover{--un-bg-opacity:1;background-color:rgb(27 24 48 / var(--un-bg-opacity))}.hover\\:bg-soft:hover{--un-bg-opacity:.18;background-color:rgba(155,144,230,var(--un-bg-opacity))}.p-1{padding:.25rem}.px{padding-left:1rem;padding-right:1rem}.px-\\[6px\\]{padding-left:6px;padding-right:6px}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-\\[2px\\]{padding-top:2px;padding-bottom:2px}.py-\\[3px\\]{padding-top:3px;padding-bottom:3px}.py-\\[4px\\]{padding-top:4px;padding-bottom:4px}.py-\\[5px\\]{padding-top:5px;padding-bottom:5px}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pl-\\[10px\\]{padding-left:10px}.pl-\\[56px\\]{padding-left:56px}.pl-1{padding-left:.25rem}.pr-\\[14px\\]{padding-right:14px}.pr-3{padding-right:.75rem}.text-center{text-align:center}.text-right{text-align:right}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.text-\\[20px\\]{font-size:20px}.text-\\[9px\\]{font-size:9px}.text-\\[\\#0ea57a\\]{--un-text-opacity:1;color:rgb(14 165 122 / var(--un-text-opacity))}.text-\\[\\#4ade80\\]{--un-text-opacity:1;color:rgb(74 222 128 / var(--un-text-opacity))}.text-\\[\\#7c6dd6\\]{--un-text-opacity:1;color:rgb(124 109 214 / var(--un-text-opacity))}.text-\\[\\#9b90e6\\],.text-accent{--un-text-opacity:1;color:rgb(155 144 230 / var(--un-text-opacity))}.text-\\[\\#d97706\\],.text-warn{--un-text-opacity:1;color:rgb(217 119 6 / var(--un-text-opacity))}.text-\\[\\#dc2626\\]{--un-text-opacity:1;color:rgb(220 38 38 / var(--un-text-opacity))}.text-muted{--un-text-opacity:1;color:rgb(199 195 230 / var(--un-text-opacity))}.text-subtle{--un-text-opacity:1;color:rgb(111 106 143 / var(--un-text-opacity))}.text-text,.hover\\:text-text:hover{--un-text-opacity:1;color:rgb(244 242 255 / var(--un-text-opacity))}.color-white{--un-text-opacity:1;color:rgb(255 255 255 / var(--un-text-opacity))}.hover\\:color-muted:hover{--un-text-opacity:1;color:rgb(199 195 230 / var(--un-text-opacity))}.font-bold{font-weight:700}.font-semibold{font-weight:600}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.tracking-\\[0\\.07em\\]{letter-spacing:.07em}.tracking-\\[0\\.12em\\]{letter-spacing:.12em}.tracking-widest{letter-spacing:.1em}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.uppercase{text-transform:uppercase}.tabular-nums{--un-numeric-spacing:tabular-nums;font-variant-numeric:var(--un-ordinal) var(--un-slashed-zero) var(--un-numeric-figure) var(--un-numeric-spacing) var(--un-numeric-fraction)}.shadow{--un-shadow:var(--un-shadow-inset) 0 1px 3px 0 var(--un-shadow-color, rgb(0 0 0 / .1)),var(--un-shadow-inset) 0 1px 2px -1px var(--un-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.shadow-\\[0_8px_32px_rgba\\(0\\,0\\,0\\,0\\.7\\)\\]{--un-shadow:0 8px 32px var(--un-shadow-color, rgba(0, 0, 0, .7));box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.shadow-lg{--un-shadow:var(--un-shadow-inset) 0 10px 15px -3px var(--un-shadow-color, rgb(0 0 0 / .1)),var(--un-shadow-inset) 0 4px 6px -4px var(--un-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.hover\\:shadow-\\[0_8px_32px_rgba\\(56\\,189\\,248\\,0\\.1\\)\\]:hover{--un-shadow:0 8px 32px var(--un-shadow-color, rgba(56, 189, 248, .1));box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.filter{filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}';
5
- class O {
6
- constructor() {
7
- this.handlers = /* @__PURE__ */ new Map();
8
- }
9
- on(e, o) {
10
- return this.handlers.has(e) || this.handlers.set(e, /* @__PURE__ */ new Set()), this.handlers.get(e).add(o), () => this.handlers.get(e)?.delete(o);
1
+ var Bt = Object.create;
2
+ var pe = Object.defineProperty;
3
+ var Ht = Object.getOwnPropertyDescriptor;
4
+ var Ae = (r, t) => (t = Symbol[r]) ? t : /* @__PURE__ */ Symbol.for("Symbol." + r), J = (r) => {
5
+ throw TypeError(r);
6
+ };
7
+ var Fe = (r, t, e) => t in r ? pe(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
8
+ var Ne = (r, t) => pe(r, "name", { value: t, configurable: !0 });
9
+ var b = (r) => [, , , Bt(r?.[Ae("metadata")] ?? null)], Be = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], Y = (r) => r !== void 0 && typeof r != "function" ? J("Function expected") : r, Gt = (r, t, e, n, i) => ({ kind: Be[r], name: t, metadata: n, addInitializer: (s) => e._ ? J("Already initialized") : i.push(Y(s || null)) }), Tt = (r, t) => Fe(t, Ae("metadata"), r[3]), a = (r, t, e, n) => {
10
+ for (var i = 0, s = r[t >> 1], l = s && s.length; i < l; i++) t & 1 ? s[i].call(e) : n = s[i].call(e, n);
11
+ return n;
12
+ }, d = (r, t, e, n, i, s) => {
13
+ var l, p, g, h, m, u = t & 7, k = !!(t & 8), z = !!(t & 16), _ = u > 3 ? r.length + 1 : u ? k ? 1 : 2 : 0, U = Be[u + 5], W = u > 3 && (r[_ - 1] = []), Ft = r[_] || (r[_] = []), L = u && (!z && !k && (i = i.prototype), u < 5 && (u > 3 || !z) && Ht(u < 4 ? i : { get [e]() {
14
+ return Ue(this, s);
15
+ }, set [e](C) {
16
+ return Oe(this, s, C);
17
+ } }, e));
18
+ u ? z && u < 4 && Ne(s, (u > 2 ? "set " : u > 1 ? "get " : "") + e) : Ne(i, e);
19
+ for (var ce = n.length - 1; ce >= 0; ce--)
20
+ h = Gt(u, e, g = {}, r[3], Ft), u && (h.static = k, h.private = z, m = h.access = { has: z ? (C) => Rt(i, C) : (C) => e in C }, u ^ 3 && (m.get = z ? (C) => (u ^ 1 ? Ue : Wt)(C, i, u ^ 4 ? s : L.get) : (C) => C[e]), u > 2 && (m.set = z ? (C, de) => Oe(C, i, de, u ^ 4 ? s : L.set) : (C, de) => C[e] = de)), p = (0, n[ce])(u ? u < 4 ? z ? s : L[U] : u > 4 ? void 0 : { get: L.get, set: L.set } : i, h), g._ = 1, u ^ 4 || p === void 0 ? Y(p) && (u > 4 ? W.unshift(p) : u ? z ? s = p : L[U] = p : i = p) : typeof p != "object" || p === null ? J("Object expected") : (Y(l = p.get) && (L.get = l), Y(l = p.set) && (L.set = l), Y(l = p.init) && W.unshift(l));
21
+ return u || Tt(r, i), L && pe(i, e, L), z ? u ^ 4 ? s : L : i;
22
+ }, f = (r, t, e) => Fe(r, typeof t != "symbol" ? t + "" : t, e), ue = (r, t, e) => t.has(r) || J("Cannot " + e), Rt = (r, t) => Object(t) !== t ? J('Cannot use the "in" operator on this value') : r.has(t), Ue = (r, t, e) => (ue(r, t, "read from private field"), e ? e.call(r) : t.get(r));
23
+ var Oe = (r, t, e, n) => (ue(r, t, "write to private field"), n ? n.call(r, e) : t.set(r, e), e), Wt = (r, t, e) => (ue(r, t, "access private method"), e);
24
+ import { jsxs as c, jsx as o } from "@praxisjs/jsx/jsx-runtime";
25
+ import { StatelessComponent as w, StatefulComponent as R } from "@praxisjs/core";
26
+ import { Component as x, State as M } from "@praxisjs/decorators";
27
+ import { render as He } from "@praxisjs/runtime";
28
+ import { computed as Yt } from "@praxisjs/core/internal";
29
+ const At = "data:image/svg+xml,%3csvg%20width='1024'%20height='1024'%20viewBox='0%200%201024%201024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M605.411%20445.66L641.322%20498.293L641.342%20498.278L697.538%20578.57L742.673%20512.806L512.5%20178.878L281.327%20512.806L512.5%20848.182L603.519%20715.561L650.559%20782.134L512.701%20983L187%20510.478L512.701%2040L837%20510.478L698.206%20712.709L668.895%20671.104L604.033%20578.775L512%20712.504L373.199%20511.5L512.233%20309.092L584.13%20414.469L536.746%20480.456L513.69%20445.66L466.305%20511.5L512.166%20577.425L556.48%20513.91L605.411%20445.66Z'%20fill='url(%23paint0_linear_3024_20)'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_3024_20'%20x1='512'%20y1='40'%20x2='512'%20y2='983'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%239B76FF'%20stop-opacity='0.86'/%3e%3cstop%20offset='1'%20stop-color='%232D246B'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e", Jt = '*,:before,:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }:host{all:initial;display:block;font-family:Inter,ui-sans-serif,system-ui,-apple-system,sans-serif}*{box-sizing:border-box}input::placeholder{color:#6f6a8f}input:focus{outline:none;box-shadow:0 0 0 2px #9b90e64d}::-webkit-scrollbar{width:4px;height:4px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:#9b90e633;border-radius:2px}::-webkit-scrollbar-thumb:hover{background:#9b90e666}.container{width:100%}@media(min-width:640px){.container{max-width:640px}}@media(min-width:768px){.container{max-width:768px}}@media(min-width:1024px){.container{max-width:1024px}}@media(min-width:1280px){.container{max-width:1280px}}@media(min-width:1536px){.container{max-width:1536px}}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.bottom-0{bottom:0}.bottom-5{bottom:1.25rem}.left-0{left:0}.right-0{right:0}.right-5{right:1.25rem}.top-0{top:0}.top-full{top:100%}.z-\\[2147483647\\]{z-index:2147483647}.z-10{z-index:10}.grid{display:grid}.grid-cols-\\[1\\.2fr_0\\.8fr_1fr_auto\\]{grid-template-columns:1.2fr .8fr 1fr auto}.m6{margin:1.5rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mr-\\[2px\\]{margin-right:2px}.ms{margin-inline-start:1rem}.mt-1{margin-top:.25rem}.box-border{box-sizing:border-box}.inline-block{display:inline-block}.h-\\[13px\\]{height:13px}.h-\\[22px\\]{height:22px}.h-\\[2px\\]{height:2px}.h-\\[32px\\]{height:32px}.h-\\[6px\\]{height:6px}.h-1{height:.25rem}.h-10{height:2.5rem}.h-3{height:.75rem}.h-7{height:1.75rem}.h-full{height:100%}.h-screen{height:100vh}.max-w-\\[200px\\]{max-width:200px}.min-w-0{min-width:0}.w-\\[13px\\]{width:13px}.w-\\[22px\\]{width:22px}.w-\\[2px\\]{width:2px}.w-\\[6px\\]{width:6px}.w-1{width:.25rem}.w-10{width:2.5rem}.w-12{width:3rem}.w-4{width:1rem}.w-full{width:100%}.w-px{width:1px}.flex{display:flex}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.cursor-\\[ew-resize\\]{cursor:ew-resize}.cursor-\\[ns-resize\\]{cursor:ns-resize}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;user-select:none}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-\\[2px\\]{gap:2px}.gap-\\[3px\\]{gap:3px}.gap-\\[6px\\]{gap:6px}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-border{--un-border-opacity:.25;border-color:rgba(155,144,230,var(--un-border-opacity))}.border-warn{--un-border-opacity:1;border-color:rgb(217 119 6 / var(--un-border-opacity))}.hover\\:border-accent:hover{--un-border-opacity:1;border-color:rgb(155 144 230 / var(--un-border-opacity))}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.bg-\\[rgba\\(124\\,109\\,214\\,0\\.14\\)\\]{--un-bg-opacity:.14;background-color:rgba(124,109,214,var(--un-bg-opacity))}.bg-\\[rgba\\(14\\,165\\,122\\,0\\.14\\)\\]{--un-bg-opacity:.14;background-color:rgba(14,165,122,var(--un-bg-opacity))}.bg-\\[rgba\\(155\\,144\\,230\\,0\\.14\\)\\]{--un-bg-opacity:.14;background-color:rgba(155,144,230,var(--un-bg-opacity))}.bg-\\[rgba\\(217\\,119\\,6\\,0\\.14\\)\\]{--un-bg-opacity:.14;background-color:rgba(217,119,6,var(--un-bg-opacity))}.bg-\\[rgba\\(220\\,38\\,38\\,0\\.14\\)\\]{--un-bg-opacity:.14;background-color:rgba(220,38,38,var(--un-bg-opacity))}.bg-\\[rgba\\(74\\,222\\,128\\,0\\.12\\)\\]{--un-bg-opacity:.12;background-color:rgba(74,222,128,var(--un-bg-opacity))}.bg-accent{--un-bg-opacity:1;background-color:rgb(155 144 230 / var(--un-bg-opacity))}.bg-bg{--un-bg-opacity:1;background-color:rgb(15 13 23 / var(--un-bg-opacity))}.bg-border{--un-bg-opacity:.25;background-color:rgba(155,144,230,var(--un-bg-opacity))}.bg-header{--un-bg-opacity:1;background-color:rgb(22 19 38 / var(--un-bg-opacity))}.bg-input,.bg-section{--un-bg-opacity:1;background-color:rgb(27 24 48 / var(--un-bg-opacity))}.bg-selected{--un-bg-opacity:1;background-color:rgb(34 30 61 / var(--un-bg-opacity))}.bg-soft{--un-bg-opacity:.18;background-color:rgba(155,144,230,var(--un-bg-opacity))}.bg-subtle{--un-bg-opacity:1;background-color:rgb(111 106 143 / var(--un-bg-opacity))}.bg-success{--un-bg-opacity:1;background-color:rgb(14 165 122 / var(--un-bg-opacity))}.bg-transparent{background-color:transparent}.hover\\:bg-accent:hover{--un-bg-opacity:1;background-color:rgb(155 144 230 / var(--un-bg-opacity))}.hover\\:bg-section:hover{--un-bg-opacity:1;background-color:rgb(27 24 48 / var(--un-bg-opacity))}.hover\\:bg-soft:hover{--un-bg-opacity:.18;background-color:rgba(155,144,230,var(--un-bg-opacity))}.p-1{padding:.25rem}.px{padding-left:1rem;padding-right:1rem}.px-\\[6px\\]{padding-left:6px;padding-right:6px}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-\\[2px\\]{padding-top:2px;padding-bottom:2px}.py-\\[3px\\]{padding-top:3px;padding-bottom:3px}.py-\\[4px\\]{padding-top:4px;padding-bottom:4px}.py-\\[5px\\]{padding-top:5px;padding-bottom:5px}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pl-\\[10px\\]{padding-left:10px}.pl-\\[56px\\]{padding-left:56px}.pl-1{padding-left:.25rem}.pr-\\[14px\\]{padding-right:14px}.pr-3{padding-right:.75rem}.text-center{text-align:center}.text-right{text-align:right}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.text-\\[20px\\]{font-size:20px}.text-\\[9px\\]{font-size:9px}.text-\\[\\#0ea57a\\]{--un-text-opacity:1;color:rgb(14 165 122 / var(--un-text-opacity))}.text-\\[\\#4ade80\\]{--un-text-opacity:1;color:rgb(74 222 128 / var(--un-text-opacity))}.text-\\[\\#7c6dd6\\]{--un-text-opacity:1;color:rgb(124 109 214 / var(--un-text-opacity))}.text-\\[\\#9b90e6\\],.text-accent{--un-text-opacity:1;color:rgb(155 144 230 / var(--un-text-opacity))}.text-\\[\\#d97706\\],.text-warn{--un-text-opacity:1;color:rgb(217 119 6 / var(--un-text-opacity))}.text-\\[\\#dc2626\\]{--un-text-opacity:1;color:rgb(220 38 38 / var(--un-text-opacity))}.text-muted{--un-text-opacity:1;color:rgb(199 195 230 / var(--un-text-opacity))}.text-subtle{--un-text-opacity:1;color:rgb(111 106 143 / var(--un-text-opacity))}.text-text,.hover\\:text-text:hover{--un-text-opacity:1;color:rgb(244 242 255 / var(--un-text-opacity))}.color-white{--un-text-opacity:1;color:rgb(255 255 255 / var(--un-text-opacity))}.hover\\:color-muted:hover{--un-text-opacity:1;color:rgb(199 195 230 / var(--un-text-opacity))}.font-bold{font-weight:700}.font-semibold{font-weight:600}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.tracking-\\[0\\.07em\\]{letter-spacing:.07em}.tracking-\\[0\\.12em\\]{letter-spacing:.12em}.tracking-widest{letter-spacing:.1em}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.uppercase{text-transform:uppercase}.tabular-nums{--un-numeric-spacing:tabular-nums;font-variant-numeric:var(--un-ordinal) var(--un-slashed-zero) var(--un-numeric-figure) var(--un-numeric-spacing) var(--un-numeric-fraction)}.shadow{--un-shadow:var(--un-shadow-inset) 0 1px 3px 0 var(--un-shadow-color, rgb(0 0 0 / .1)),var(--un-shadow-inset) 0 1px 2px -1px var(--un-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.shadow-\\[0_8px_32px_rgba\\(0\\,0\\,0\\,0\\.7\\)\\]{--un-shadow:0 8px 32px var(--un-shadow-color, rgba(0, 0, 0, .7));box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.shadow-lg{--un-shadow:var(--un-shadow-inset) 0 10px 15px -3px var(--un-shadow-color, rgb(0 0 0 / .1)),var(--un-shadow-inset) 0 4px 6px -4px var(--un-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.hover\\:shadow-\\[0_8px_32px_rgba\\(56\\,189\\,248\\,0\\.1\\)\\]:hover{--un-shadow:0 8px 32px var(--un-shadow-color, rgba(56, 189, 248, .1));box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.filter{filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}';
30
+ class qt {
31
+ handlers = /* @__PURE__ */ new Map();
32
+ on(t, e) {
33
+ return this.handlers.has(t) || this.handlers.set(t, /* @__PURE__ */ new Set()), this.handlers.get(t).add(e), () => this.handlers.get(t)?.delete(e);
11
34
  }
12
- emit(e, o) {
13
- this.handlers.get(e)?.forEach((r) => {
14
- r(o);
35
+ emit(t, e) {
36
+ this.handlers.get(t)?.forEach((n) => {
37
+ n(e);
15
38
  });
16
39
  }
17
40
  }
18
- const H = 200;
19
- let W = 0;
20
- function T() {
21
- return `v${(++W).toString()}_${Date.now().toString(36)}`;
41
+ const Xt = 200;
42
+ let Kt = 0;
43
+ function Ge() {
44
+ return `v${(++Kt).toString()}_${Date.now().toString(36)}`;
22
45
  }
23
- const f = class f {
24
- constructor() {
25
- this.bus = new O(), this.instanceIds = /* @__PURE__ */ new WeakMap(), this.signals = /* @__PURE__ */ new Map(), this.components = /* @__PURE__ */ new Map(), this.timeline = [];
26
- }
46
+ class v {
47
+ static _instance = null;
27
48
  static get instance() {
28
- return f._instance ??= new f(), f._instance;
49
+ return v._instance ??= new v(), v._instance;
29
50
  }
30
- getInstanceId(e) {
31
- return this.instanceIds.has(e) || this.instanceIds.set(e, T()), this.instanceIds.get(e);
51
+ bus = new qt();
52
+ instanceIds = /* @__PURE__ */ new WeakMap();
53
+ signals = /* @__PURE__ */ new Map();
54
+ components = /* @__PURE__ */ new Map();
55
+ timeline = [];
56
+ getInstanceId(t) {
57
+ return this.instanceIds.has(t) || this.instanceIds.set(t, Ge()), this.instanceIds.get(t);
32
58
  }
33
- registerSignal(e, o, r, i) {
34
- const a = this.getInstanceId(e), l = `${a}:${o}`, s = {
59
+ registerSignal(t, e, n, i) {
60
+ const s = this.getInstanceId(t), l = `${s}:${e}`, p = {
35
61
  id: l,
36
- label: o,
37
- componentId: a,
62
+ label: e,
63
+ componentId: s,
38
64
  componentName: i,
39
- value: r,
40
- history: [{ value: r, timestamp: Date.now() }],
65
+ value: n,
66
+ history: [{ value: n, timestamp: Date.now() }],
41
67
  changedAt: Date.now()
42
68
  };
43
- this.signals.set(l, s), this.bus.emit("signal:registered", s);
69
+ this.signals.set(l, p), this.bus.emit("signal:registered", p);
44
70
  }
45
- updateSignal(e, o, r, i) {
46
- const l = `${this.getInstanceId(e)}:${o}`, s = this.signals.get(l);
47
- if (!s) return;
48
- const u = [
49
- ...s.history,
50
- { value: r, timestamp: Date.now() }
51
- ].slice(-20), c = {
52
- ...s,
53
- value: r,
54
- history: u,
71
+ updateSignal(t, e, n, i) {
72
+ const l = `${this.getInstanceId(t)}:${e}`, p = this.signals.get(l);
73
+ if (!p) return;
74
+ const g = [
75
+ ...p.history,
76
+ { value: n, timestamp: Date.now() }
77
+ ].slice(-20), h = {
78
+ ...p,
79
+ value: n,
80
+ history: g,
55
81
  changedAt: Date.now()
56
82
  };
57
- this.signals.set(l, c), this.bus.emit("signal:changed", { entry: c, oldValue: i }), this.pushTimeline({
83
+ this.signals.set(l, h), this.bus.emit("signal:changed", { entry: h, oldValue: i }), this.pushTimeline({
58
84
  type: "signal:change",
59
- label: `${s.componentName}.${o}`,
60
- data: { old: i, new: r, signalId: l }
85
+ label: `${p.componentName}.${e}`,
86
+ data: { old: i, new: n, signalId: l }
61
87
  });
62
88
  }
63
- registerComponent(e, o) {
64
- const r = this.getInstanceId(e), i = {
65
- id: r,
66
- name: o,
89
+ registerComponent(t, e) {
90
+ const n = this.getInstanceId(t), i = {
91
+ id: n,
92
+ name: e,
67
93
  renderCount: 0,
68
94
  lastRenderDuration: 0,
69
95
  mountedAt: Date.now(),
70
96
  status: "mounted",
71
97
  lifecycle: []
72
98
  };
73
- this.components.set(r, i), this.bus.emit("component:registered", i);
99
+ this.components.set(n, i), this.bus.emit("component:registered", i);
74
100
  }
75
- recordRender(e, o) {
76
- const r = this.getInstanceId(e), i = this.components.get(r);
77
- i && (i.renderCount++, i.lastRenderDuration = o, this.bus.emit("component:render", { ...i }), this.pushTimeline({
101
+ recordRender(t, e) {
102
+ const n = this.getInstanceId(t), i = this.components.get(n);
103
+ i && (i.renderCount++, i.lastRenderDuration = e, this.bus.emit("component:render", { ...i }), this.pushTimeline({
78
104
  type: "component:render",
79
105
  label: `<${i.name}>`,
80
106
  data: {
81
- componentId: r,
82
- duration: +o.toFixed(3),
107
+ componentId: n,
108
+ duration: +e.toFixed(3),
83
109
  renderCount: i.renderCount
84
110
  }
85
111
  }));
86
112
  }
87
- recordLifecycle(e, o) {
88
- const r = this.getInstanceId(e), i = this.components.get(r);
113
+ recordLifecycle(t, e) {
114
+ const n = this.getInstanceId(t), i = this.components.get(n);
89
115
  if (!i) return;
90
- const a = { hook: o, timestamp: Date.now() };
91
- i.lifecycle.push(a), this.bus.emit("lifecycle", { componentId: r, name: i.name, hook: o });
92
- const l = o === "onUnmount" ? "component:unmount" : o === "onBeforeMount" ? "component:mount" : "lifecycle";
116
+ const s = { hook: e, timestamp: Date.now() };
117
+ i.lifecycle.push(s), this.bus.emit("lifecycle", { componentId: n, name: i.name, hook: e });
118
+ const l = e === "onUnmount" ? "component:unmount" : e === "onBeforeMount" ? "component:mount" : "lifecycle";
93
119
  if (this.pushTimeline({
94
120
  type: l,
95
- label: `<${i.name}>.${o}`,
96
- data: { componentId: r, hook: o }
97
- }), o === "onUnmount") {
98
- i.status = "unmounted", this.bus.emit("component:unmount", { ...i }), this.components.delete(r);
99
- for (const [s, u] of this.signals)
100
- u.componentId === r && this.signals.delete(s);
121
+ label: `<${i.name}>.${e}`,
122
+ data: { componentId: n, hook: e }
123
+ }), e === "onUnmount") {
124
+ i.status = "unmounted", this.bus.emit("component:unmount", { ...i }), this.components.delete(n);
125
+ for (const [p, g] of this.signals)
126
+ g.componentId === n && this.signals.delete(p);
101
127
  }
102
128
  }
103
- recordMethodCall(e, o, r, i, a, l) {
104
- const s = this.getInstanceId(e);
129
+ recordMethodCall(t, e, n, i, s, l) {
130
+ const p = this.getInstanceId(t);
105
131
  this.pushTimeline({
106
132
  type: "method:call",
107
- label: `${l}.${o}()`,
133
+ label: `${l}.${e}()`,
108
134
  data: {
109
- componentId: s,
110
- args: r,
135
+ componentId: p,
136
+ args: n,
111
137
  result: i,
112
- duration: +a.toFixed(3)
138
+ duration: +s.toFixed(3)
113
139
  }
114
140
  });
115
141
  }
@@ -122,361 +148,421 @@ const f = class f {
122
148
  getTimeline() {
123
149
  return [...this.timeline];
124
150
  }
125
- getSignalsByComponent(e) {
126
- return this.getSignals().filter((o) => o.componentId === e);
151
+ getSignalsByComponent(t) {
152
+ return this.getSignals().filter((e) => e.componentId === t);
127
153
  }
128
- pushTimeline(e) {
129
- const o = {
130
- id: T(),
154
+ pushTimeline(t) {
155
+ const e = {
156
+ id: Ge(),
131
157
  timestamp: Date.now(),
132
- ...e
158
+ ...t
133
159
  };
134
- this.timeline.push(o), this.timeline.length > H && this.timeline.shift(), this.bus.emit("timeline:push", o);
160
+ this.timeline.push(e), this.timeline.length > Xt && this.timeline.shift(), this.bus.emit("timeline:push", e);
135
161
  }
136
- };
137
- f._instance = null;
138
- let g = f;
139
- function z({ message: t }) {
140
- return /* @__PURE__ */ d("div", { class: "flex flex-col items-center justify-center gap-2 py-12", children: [
141
- /* @__PURE__ */ n("span", { class: "text-subtle text-[20px] leading-none select-none font-mono", children: "—" }),
142
- /* @__PURE__ */ n("p", { class: "text-subtle text-[11px] text-center leading-relaxed max-w-[200px]", children: t })
143
- ] });
144
162
  }
145
- function A({
146
- children: t,
147
- width: e = "280px"
148
- }) {
149
- return /* @__PURE__ */ n(
150
- "div",
151
- {
152
- class: "shrink-0 border-l border-border flex flex-col overflow-hidden",
153
- style: { width: e },
154
- children: t
155
- }
156
- );
163
+ var Ye, he, an;
164
+ Ye = [x()];
165
+ class H extends (an = w) {
166
+ render() {
167
+ return /* @__PURE__ */ c("div", { class: "flex flex-col items-center justify-center gap-2 py-12", children: [
168
+ /* @__PURE__ */ o("span", { class: "text-subtle text-[20px] leading-none select-none font-mono", children: "—" }),
169
+ /* @__PURE__ */ o("p", { class: "text-subtle text-[11px] text-center leading-relaxed max-w-[200px]", children: this.props.message })
170
+ ] });
171
+ }
157
172
  }
158
- function M(t) {
159
- if (t === null) return "null";
160
- if (t === void 0) return "undefined";
161
- if (typeof t == "string") return `"${t}"`;
162
- if (typeof t == "object")
173
+ he = b(an), H = d(he, 0, "EmptyState", Ye, H), a(he, 1, H);
174
+ var Je, ge, ln;
175
+ Je = [x()];
176
+ class X extends (ln = w) {
177
+ render() {
178
+ const { children: t, width: e = "280px" } = this.props;
179
+ return /* @__PURE__ */ o(
180
+ "div",
181
+ {
182
+ class: "shrink-0 border-l border-border flex flex-col overflow-hidden",
183
+ style: { width: e },
184
+ children: t
185
+ }
186
+ );
187
+ }
188
+ }
189
+ ge = b(ln), X = d(ge, 0, "SidePanel", Je, X), a(ge, 1, X);
190
+ function Ee(r) {
191
+ if (r === null) return "null";
192
+ if (r === void 0) return "undefined";
193
+ if (typeof r == "string") return `"${r}"`;
194
+ if (typeof r == "object")
163
195
  try {
164
- return JSON.stringify(t);
196
+ return JSON.stringify(r);
165
197
  } catch {
166
198
  return "[object]";
167
199
  }
168
- return String(t);
200
+ return String(r);
201
+ }
202
+ var qe, be, cn;
203
+ qe = [x()];
204
+ class N extends (cn = w) {
205
+ render() {
206
+ const { k: t, v: e, signal: n } = this.props;
207
+ return /* @__PURE__ */ c("div", { class: "flex justify-between items-center px-3 py-2 border-b border-border gap-3", children: [
208
+ /* @__PURE__ */ o(
209
+ "span",
210
+ {
211
+ class: `text-[11px] font-mono shrink-0 ${n ? "text-accent" : "text-muted"}`,
212
+ children: t
213
+ }
214
+ ),
215
+ /* @__PURE__ */ o("span", { class: "text-[11px] text-text font-mono truncate text-right", children: e })
216
+ ] });
217
+ }
218
+ }
219
+ be = b(cn), N = d(be, 0, "DetailRow", qe, N), a(be, 1, N);
220
+ var Xe, xe, dn;
221
+ Xe = [x()];
222
+ class G extends (dn = w) {
223
+ render() {
224
+ return /* @__PURE__ */ c("div", { class: "border-b border-border", children: [
225
+ /* @__PURE__ */ o("div", { class: "px-3 py-[4px] text-[9px] text-subtle font-bold tracking-[0.12em] uppercase bg-section border-b border-border", children: this.props.label }),
226
+ this.props.children
227
+ ] });
228
+ }
169
229
  }
170
- function v({
171
- k: t,
172
- v: e,
173
- signal: o
174
- }) {
175
- return /* @__PURE__ */ d("div", { class: "flex justify-between items-center px-3 py-2 border-b border-border gap-3", children: [
176
- /* @__PURE__ */ n(
230
+ xe = b(dn), G = d(xe, 0, "DetailSection", Xe, G), a(xe, 1, G);
231
+ var Ke, me, pn;
232
+ Ke = [x()];
233
+ class K extends (pn = w) {
234
+ render() {
235
+ const { status: t } = this.props;
236
+ return /* @__PURE__ */ o(
177
237
  "span",
178
238
  {
179
- class: `text-[11px] font-mono shrink-0 ${o ? "text-accent" : "text-muted"}`,
180
- children: t
239
+ class: `inline-block w-[6px] h-[6px] rounded-full shrink-0 ${t === "mounted" ? "bg-success" : "bg-subtle"}`,
240
+ style: t === "mounted" ? { boxShadow: "0 0 6px rgba(14,165,122,0.7)" } : void 0
181
241
  }
182
- ),
183
- /* @__PURE__ */ n("span", { class: "text-[11px] text-text font-mono truncate text-right", children: e })
184
- ] });
185
- }
186
- function k({
187
- label: t,
188
- children: e
189
- }) {
190
- return /* @__PURE__ */ d("div", { class: "border-b border-border", children: [
191
- /* @__PURE__ */ n("div", { class: "px-3 py-[4px] text-[9px] text-subtle font-bold tracking-[0.12em] uppercase bg-section border-b border-border", children: t }),
192
- e
193
- ] });
194
- }
195
- function R({ status: t }) {
196
- return /* @__PURE__ */ n(
197
- "span",
198
- {
199
- class: `inline-block w-[6px] h-[6px] rounded-full shrink-0 ${t === "mounted" ? "bg-success" : "bg-subtle"}`,
200
- style: t === "mounted" ? { boxShadow: "0 0 6px rgba(14,165,122,0.7)" } : void 0
201
- }
202
- );
203
- }
204
- function G({
205
- entry: t,
206
- signals: e
207
- }) {
208
- return /* @__PURE__ */ d(A, { children: [
209
- /* @__PURE__ */ d("div", { class: "px-3 py-2 border-b border-border flex items-center gap-2 bg-bg shrink-0", children: [
210
- /* @__PURE__ */ n(R, { status: t.status }),
211
- /* @__PURE__ */ d("span", { class: "text-accent font-mono text-[11px] font-semibold truncate pl-1", children: [
212
- "<",
213
- t.name,
214
- ">"
215
- ] })
216
- ] }),
217
- /* @__PURE__ */ d("div", { class: "flex-1 overflow-y-auto", children: [
218
- /* @__PURE__ */ d(k, { label: "Stats", children: [
219
- /* @__PURE__ */ n(v, { k: "renders", v: String(t.renderCount) }),
220
- /* @__PURE__ */ n(
221
- v,
222
- {
223
- k: "last render",
224
- v: `${t.lastRenderDuration.toFixed(3)}ms`
225
- }
226
- ),
227
- /* @__PURE__ */ n(v, { k: "status", v: t.status })
228
- ] }),
229
- e.length > 0 && /* @__PURE__ */ n(k, { label: "State", children: e.map((o) => /* @__PURE__ */ n(
230
- v,
231
- {
232
- k: o.label,
233
- v: M(o.value),
234
- signal: !0
235
- },
236
- o.id
237
- )) }),
238
- t.lifecycle.length > 0 && /* @__PURE__ */ n(k, { label: "Lifecycle", children: [...t.lifecycle].reverse().slice(0, 20).map((o, r) => /* @__PURE__ */ d(
239
- "div",
240
- {
241
- class: "px-3 py-2 flex justify-between items-center border-b border-border",
242
- children: [
243
- /* @__PURE__ */ n("span", { class: "text-[11px] text-text font-mono", children: o.hook }),
244
- /* @__PURE__ */ n("span", { class: "text-[10px] text-subtle tabular-nums", children: new Date(o.timestamp).toLocaleTimeString() })
245
- ]
246
- },
247
- String(r)
248
- )) })
249
- ] })
250
- ] });
242
+ );
243
+ }
251
244
  }
252
- function X({
253
- entry: t,
254
- selected: e,
255
- onClick: o
256
- }) {
257
- return /* @__PURE__ */ d(
258
- "div",
259
- {
260
- onClick: o,
261
- class: () => `relative flex items-center gap-2 px-3 py-2 cursor-pointer border-b border-border transition-colors duration-100 ${e() ? "bg-selected" : "hover:bg-section"}`,
262
- children: [
263
- () => e() && /* @__PURE__ */ n("span", { class: "absolute left-0 top-0 bottom-0 w-[2px] bg-accent rounded-r" }),
264
- /* @__PURE__ */ n(R, { status: t.status }),
265
- /* @__PURE__ */ d("span", { class: "text-accent font-mono text-[11px] flex-1 truncate pl-1", children: [
245
+ me = b(pn), K = d(me, 0, "StatusDot", Ke, K), a(me, 1, K);
246
+ var Ze, fe, un;
247
+ Ze = [x()];
248
+ class Z extends (un = w) {
249
+ render() {
250
+ const { entry: t, signals: e } = this.props;
251
+ return /* @__PURE__ */ c(X, { children: [
252
+ /* @__PURE__ */ c("div", { class: "px-3 py-2 border-b border-border flex items-center gap-2 bg-bg shrink-0", children: [
253
+ /* @__PURE__ */ o(K, { status: t.status }),
254
+ /* @__PURE__ */ c("span", { class: "text-accent font-mono text-[11px] font-semibold truncate pl-1", children: [
266
255
  "<",
267
256
  t.name,
268
257
  ">"
258
+ ] })
259
+ ] }),
260
+ /* @__PURE__ */ c("div", { class: "flex-1 overflow-y-auto", children: [
261
+ /* @__PURE__ */ c(G, { label: "Stats", children: [
262
+ /* @__PURE__ */ o(N, { k: "renders", v: String(t.renderCount) }),
263
+ /* @__PURE__ */ o(
264
+ N,
265
+ {
266
+ k: "last render",
267
+ v: `${t.lastRenderDuration.toFixed(3)}ms`
268
+ }
269
+ ),
270
+ /* @__PURE__ */ o(N, { k: "status", v: t.status })
269
271
  ] }),
270
- /* @__PURE__ */ d("span", { class: "text-muted text-[11px] tabular-nums", children: [
271
- "×",
272
- t.renderCount
273
- ] }),
274
- /* @__PURE__ */ d(
275
- "span",
272
+ e.length > 0 && /* @__PURE__ */ o(G, { label: "State", children: e.map((n) => /* @__PURE__ */ o(
273
+ N,
276
274
  {
277
- class: `text-[10px] tabular-nums w-12 text-right ${t.lastRenderDuration > 16 ? "text-warn" : "text-subtle"}`,
275
+ k: n.label,
276
+ v: Ee(n.value),
277
+ signal: !0
278
+ },
279
+ n.id
280
+ )) }),
281
+ t.lifecycle.length > 0 && /* @__PURE__ */ o(G, { label: "Lifecycle", children: [...t.lifecycle].reverse().slice(0, 20).map((n, i) => /* @__PURE__ */ c(
282
+ "div",
283
+ {
284
+ class: "px-3 py-2 flex justify-between items-center border-b border-border",
278
285
  children: [
279
- t.lastRenderDuration.toFixed(1),
280
- "ms"
286
+ /* @__PURE__ */ o("span", { class: "text-[11px] text-text font-mono", children: n.hook }),
287
+ /* @__PURE__ */ o("span", { class: "text-[10px] text-subtle tabular-nums", children: new Date(n.timestamp).toLocaleTimeString() })
281
288
  ]
282
- }
283
- )
284
- ]
285
- }
286
- );
289
+ },
290
+ String(i)
291
+ )) })
292
+ ] })
293
+ ] });
294
+ }
295
+ }
296
+ fe = b(un), Z = d(fe, 0, "ComponentDetail", Ze, Z), a(fe, 1, Z);
297
+ var Qe, we, hn;
298
+ Qe = [x()];
299
+ class Q extends (hn = w) {
300
+ render() {
301
+ const { entry: t, selected: e, onClick: n } = this.props;
302
+ return /* @__PURE__ */ c(
303
+ "div",
304
+ {
305
+ onClick: n,
306
+ class: () => `relative flex items-center gap-2 px-3 py-2 cursor-pointer border-b border-border transition-colors duration-100 ${e() ? "bg-selected" : "hover:bg-section"}`,
307
+ children: [
308
+ () => e() && /* @__PURE__ */ o("span", { class: "absolute left-0 top-0 bottom-0 w-[2px] bg-accent rounded-r" }),
309
+ /* @__PURE__ */ o(K, { status: t.status }),
310
+ /* @__PURE__ */ c("span", { class: "text-accent font-mono text-[11px] flex-1 truncate pl-1", children: [
311
+ "<",
312
+ t.name,
313
+ ">"
314
+ ] }),
315
+ /* @__PURE__ */ c("span", { class: "text-muted text-[11px] tabular-nums", children: [
316
+ "×",
317
+ t.renderCount
318
+ ] }),
319
+ /* @__PURE__ */ c(
320
+ "span",
321
+ {
322
+ class: `text-[10px] tabular-nums w-12 text-right ${t.lastRenderDuration > 16 ? "text-warn" : "text-subtle"}`,
323
+ children: [
324
+ t.lastRenderDuration.toFixed(1),
325
+ "ms"
326
+ ]
327
+ }
328
+ )
329
+ ]
330
+ }
331
+ );
332
+ }
287
333
  }
288
- function Y({ registry: t }) {
289
- const e = b(t.getComponents()), o = b(null), r = b([]), i = P(() => {
290
- const l = o();
291
- r.set(l ? t.getSignalsByComponent(l) : []);
292
- });
293
- let a = [];
294
- return C(() => {
295
- const l = () => {
296
- e.set(t.getComponents());
297
- const s = U(o);
298
- s && r.set(t.getSignalsByComponent(s));
334
+ we = b(hn), Q = d(we, 0, "ComponentRow", Qe, Q), a(we, 1, Q);
335
+ var Pe, Ve, et, tt, $;
336
+ tt = [x()];
337
+ class F extends (et = R, Ve = [M()], Pe = [M()], et) {
338
+ constructor() {
339
+ super(...arguments);
340
+ f(this, "components", a($, 8, this, [])), a($, 11, this);
341
+ f(this, "selectedId", a($, 12, this, null)), a($, 15, this);
342
+ f(this, "_handlers", []);
343
+ }
344
+ get registry() {
345
+ return this.props.registry;
346
+ }
347
+ onMount() {
348
+ this.components = this.registry.getComponents();
349
+ const e = () => {
350
+ this.components = this.registry.getComponents();
299
351
  };
300
- a = [
352
+ this._handlers = [
301
353
  "component:registered",
302
354
  "component:render",
303
355
  "component:unmount",
304
356
  "lifecycle",
305
357
  "signal:registered",
306
358
  "signal:changed"
307
- ].map((s) => t.bus.on(s, l));
308
- }), I(() => {
309
- i(), a.forEach((l) => {
310
- l();
359
+ ].map((n) => this.registry.bus.on(n, e));
360
+ }
361
+ onUnmount() {
362
+ this._handlers.forEach((e) => {
363
+ e();
311
364
  });
312
- }), /* @__PURE__ */ d("div", { class: "flex h-full overflow-hidden", children: [
313
- /* @__PURE__ */ d("div", { class: "flex-1 flex flex-col overflow-hidden min-w-0", children: [
314
- /* @__PURE__ */ d("div", { class: "flex items-center px-3 h-7 text-[9px] text-subtle font-bold tracking-[0.12em] uppercase border-b border-border bg-section gap-2 shrink-0", children: [
315
- /* @__PURE__ */ n("span", { class: "flex-1", children: "Component" }),
316
- /* @__PURE__ */ n("span", { children: "Renders" }),
317
- /* @__PURE__ */ n("span", { class: "w-12 text-right", children: "Last" })
365
+ }
366
+ render() {
367
+ const { registry: e } = this;
368
+ return /* @__PURE__ */ c("div", { class: "flex h-full overflow-hidden", children: [
369
+ /* @__PURE__ */ c("div", { class: "flex-1 flex flex-col overflow-hidden min-w-0", children: [
370
+ /* @__PURE__ */ c("div", { class: "flex items-center px-3 h-7 text-[9px] text-subtle font-bold tracking-[0.12em] uppercase border-b border-border bg-section gap-2 shrink-0", children: [
371
+ /* @__PURE__ */ o("span", { class: "flex-1", children: "Component" }),
372
+ /* @__PURE__ */ o("span", { children: "Renders" }),
373
+ /* @__PURE__ */ o("span", { class: "w-12 text-right", children: "Last" })
374
+ ] }),
375
+ /* @__PURE__ */ o("div", { class: "flex-1 overflow-y-auto", children: () => this.components.length === 0 ? /* @__PURE__ */ o(H, { message: "No components tracked. Add @Trace() to component classes." }) : this.components.map((n) => /* @__PURE__ */ o(
376
+ Q,
377
+ {
378
+ entry: n,
379
+ selected: () => this.selectedId === n.id,
380
+ onClick: () => {
381
+ this.selectedId = this.selectedId === n.id ? null : n.id;
382
+ }
383
+ },
384
+ n.id
385
+ )) })
318
386
  ] }),
319
- /* @__PURE__ */ n("div", { class: "flex-1 overflow-y-auto", children: () => e().length === 0 ? /* @__PURE__ */ n(z, { message: "No components tracked. Add @Trace() to component classes." }) : e().map((l) => /* @__PURE__ */ n(
320
- X,
321
- {
322
- entry: l,
323
- selected: () => o() === l.id,
324
- onClick: () => {
325
- o.update((s) => s === l.id ? null : l.id);
326
- }
327
- },
328
- l.id
329
- )) })
330
- ] }),
331
- () => {
332
- const l = o(), s = l ? e().find((u) => u.id === l) ?? null : null;
333
- return s ? /* @__PURE__ */ n(G, { entry: s, signals: r() }) : null;
334
- }
335
- ] });
387
+ () => {
388
+ const n = this.selectedId, i = n ? this.components.find((l) => l.id === n) ?? null : null, s = n ? e.getSignalsByComponent(n) : [];
389
+ return i ? /* @__PURE__ */ o(Z, { entry: i, signals: s }) : null;
390
+ }
391
+ ] });
392
+ }
336
393
  }
337
- const J = {
394
+ $ = b(et), d($, 5, "components", Ve, F), d($, 5, "selectedId", Pe, F), F = d($, 0, "ComponentsTab", tt, F), a($, 1, F);
395
+ const Zt = {
338
396
  id: "components",
339
397
  label: "Components",
340
- component: Y
398
+ component: F
341
399
  };
342
- function q({
343
- placeholder: t,
344
- onInput: e
345
- }) {
346
- return /* @__PURE__ */ n(
347
- "input",
348
- {
349
- type: "text",
350
- placeholder: t,
351
- class: "w-full bg-input border border-border rounded-lg text-text text-[11px] px-3 py-[5px] outline-none box-border transition-shadow duration-150",
352
- onInput: (o) => {
353
- e(o.target.value);
400
+ var nt, ye, gn;
401
+ nt = [x()];
402
+ class P extends (gn = w) {
403
+ render() {
404
+ const { placeholder: t, onInput: e } = this.props;
405
+ return /* @__PURE__ */ o(
406
+ "input",
407
+ {
408
+ type: "text",
409
+ placeholder: t,
410
+ class: "w-full bg-input border border-border rounded-lg text-text text-[11px] px-3 py-[5px] outline-none box-border transition-shadow duration-150",
411
+ onInput: (n) => {
412
+ e(n.target.value);
413
+ }
354
414
  }
355
- }
356
- );
415
+ );
416
+ }
357
417
  }
358
- function K({
359
- label: t,
360
- children: e
361
- }) {
362
- return /* @__PURE__ */ d("div", { class: "border-b border-border", children: [
363
- /* @__PURE__ */ n("div", { class: "px-3 py-[4px] text-[9px] text-subtle font-bold tracking-[0.12em] uppercase bg-section border-b border-border", children: t }),
364
- e
365
- ] });
418
+ ye = b(gn), P = d(ye, 0, "SearchInput", nt, P), a(ye, 1, P);
419
+ var rt, ve, bn;
420
+ rt = [x()];
421
+ class V extends (bn = w) {
422
+ render() {
423
+ return /* @__PURE__ */ c("div", { class: "border-b border-border", children: [
424
+ /* @__PURE__ */ o("div", { class: "px-3 py-[4px] text-[9px] text-subtle font-bold tracking-[0.12em] uppercase bg-section border-b border-border", children: this.props.label }),
425
+ this.props.children
426
+ ] });
427
+ }
428
+ }
429
+ ve = b(bn), V = d(ve, 0, "PanelSection", rt, V), a(ve, 1, V);
430
+ function De(r, t) {
431
+ const e = t ? ` ${t}` : "", n = Date.now() - r;
432
+ return n < 1e3 ? `${n.toString()}ms${e}` : n < 6e4 ? `${(n / 1e3).toFixed(1)}s${e}` : `${Math.floor(n / 6e4).toString()}m${e}`;
366
433
  }
367
- function L(t, e) {
368
- const o = e ? ` ${e}` : "", r = Date.now() - t;
369
- return r < 1e3 ? `${r.toString()}ms${o}` : r < 6e4 ? `${(r / 1e3).toFixed(1)}s${o}` : `${Math.floor(r / 6e4).toString()}m${o}`;
434
+ var ot, ke, xn;
435
+ ot = [x()];
436
+ class ee extends (xn = w) {
437
+ render() {
438
+ const { entry: t } = this.props;
439
+ return /* @__PURE__ */ o(X, { width: "260px", children: /* @__PURE__ */ o(V, { label: "History", children: /* @__PURE__ */ c("div", { class: "overflow-y-auto", children: [
440
+ [...t.history].reverse().map((e, n) => /* @__PURE__ */ c(
441
+ "div",
442
+ {
443
+ class: "px-3 py-2 border-b border-border flex justify-between items-center gap-3",
444
+ children: [
445
+ /* @__PURE__ */ o("span", { class: "font-mono text-[11px] text-text truncate", children: Ee(e.value) }),
446
+ /* @__PURE__ */ o("span", { class: "text-[10px] text-subtle shrink-0 tabular-nums", children: De(e.timestamp, "ago") })
447
+ ]
448
+ },
449
+ String(n)
450
+ )),
451
+ t.history.length === 0 && /* @__PURE__ */ o("p", { class: "px-3 py-6 text-[11px] text-subtle text-center", children: "No history yet." })
452
+ ] }) }) });
453
+ }
370
454
  }
371
- function Z({ entry: t }) {
372
- return /* @__PURE__ */ n(A, { width: "260px", children: /* @__PURE__ */ n(K, { label: "History", children: /* @__PURE__ */ d("div", { class: "overflow-y-auto", children: [
373
- [...t.history].reverse().map((e, o) => /* @__PURE__ */ d(
455
+ ke = b(xn), ee = d(ke, 0, "SignalDetail", ot, ee), a(ke, 1, ee);
456
+ var it, ze, mn;
457
+ it = [x()];
458
+ class te extends (mn = w) {
459
+ render() {
460
+ const { entry: t, selected: e, onClick: n } = this.props;
461
+ return /* @__PURE__ */ c(
374
462
  "div",
375
463
  {
376
- class: "px-3 py-2 border-b border-border flex justify-between items-center gap-3",
464
+ onClick: n,
465
+ class: `relative grid grid-cols-[1.2fr_0.8fr_1fr_auto] items-center px-3 py-2 cursor-pointer border-b border-border transition-colors duration-100 ${e ? "bg-selected" : "hover:bg-section"}`,
377
466
  children: [
378
- /* @__PURE__ */ n("span", { class: "font-mono text-[11px] text-text truncate", children: M(e.value) }),
379
- /* @__PURE__ */ n("span", { class: "text-[10px] text-subtle shrink-0 tabular-nums", children: L(e.timestamp, "ago") })
467
+ e && /* @__PURE__ */ o("span", { class: "absolute left-0 top-0 bottom-0 w-[2px] bg-accent rounded-r" }),
468
+ /* @__PURE__ */ o("span", { class: "text-accent font-mono text-[11px] truncate pl-1", children: t.label }),
469
+ /* @__PURE__ */ o("span", { class: "text-muted text-[11px] truncate", children: t.componentName }),
470
+ /* @__PURE__ */ o("span", { class: "text-text font-mono text-[11px] truncate", children: Ee(t.value) }),
471
+ /* @__PURE__ */ o("span", { class: "text-subtle text-[10px] text-right tabular-nums", children: De(t.changedAt, "ago") })
380
472
  ]
381
- },
382
- String(o)
383
- )),
384
- t.history.length === 0 && /* @__PURE__ */ n("p", { class: "px-3 py-6 text-[11px] text-subtle text-center", children: "No history yet." })
385
- ] }) }) });
386
- }
387
- function Q({
388
- entry: t,
389
- selected: e,
390
- onClick: o
391
- }) {
392
- return /* @__PURE__ */ d(
393
- "div",
394
- {
395
- onClick: o,
396
- class: `relative grid grid-cols-[1.2fr_0.8fr_1fr_auto] items-center px-3 py-2 cursor-pointer border-b border-border transition-colors duration-100 ${e ? "bg-selected" : "hover:bg-section"}`,
397
- children: [
398
- e && /* @__PURE__ */ n("span", { class: "absolute left-0 top-0 bottom-0 w-[2px] bg-accent rounded-r" }),
399
- /* @__PURE__ */ n("span", { class: "text-accent font-mono text-[11px] truncate pl-1", children: t.label }),
400
- /* @__PURE__ */ n("span", { class: "text-muted text-[11px] truncate", children: t.componentName }),
401
- /* @__PURE__ */ n("span", { class: "text-text font-mono text-[11px] truncate", children: M(t.value) }),
402
- /* @__PURE__ */ n("span", { class: "text-subtle text-[10px] text-right tabular-nums", children: L(t.changedAt, "ago") })
403
- ]
404
- }
405
- );
473
+ }
474
+ );
475
+ }
406
476
  }
407
- function V({ registry: t }) {
408
- const e = b(t.getSignals()), o = b(""), r = b(null);
409
- let i = [];
410
- return C(() => {
411
- i = [
412
- t.bus.on("signal:registered", () => {
413
- e.set(t.getSignals());
477
+ ze = b(mn), te = d(ze, 0, "SignalRow", it, te), a(ze, 1, te);
478
+ var st, at, lt, ct, dt, S;
479
+ dt = [x()];
480
+ class E extends (ct = R, lt = [M()], at = [M()], st = [M()], ct) {
481
+ constructor() {
482
+ super(...arguments);
483
+ f(this, "signals", a(S, 8, this, [])), a(S, 11, this);
484
+ f(this, "search", a(S, 12, this, "")), a(S, 15, this);
485
+ f(this, "selectedId", a(S, 16, this, null)), a(S, 19, this);
486
+ f(this, "_handlers", []);
487
+ }
488
+ get registry() {
489
+ return this.props.registry;
490
+ }
491
+ onMount() {
492
+ this.signals = this.registry.getSignals(), this._handlers = [
493
+ this.registry.bus.on("signal:registered", () => {
494
+ this.signals = this.registry.getSignals();
414
495
  }),
415
- t.bus.on("signal:changed", () => {
416
- e.set(t.getSignals());
496
+ this.registry.bus.on("signal:changed", () => {
497
+ this.signals = this.registry.getSignals();
417
498
  })
418
499
  ];
419
- }), I(() => {
420
- i.forEach((a) => {
421
- a();
500
+ }
501
+ onUnmount() {
502
+ this._handlers.forEach((e) => {
503
+ e();
422
504
  });
423
- }), /* @__PURE__ */ d("div", { class: "flex h-full overflow-hidden", children: [
424
- /* @__PURE__ */ d("div", { class: "flex-1 flex flex-col overflow-hidden min-w-0", children: [
425
- /* @__PURE__ */ n("div", { class: "px-3 py-2 border-b border-border bg-bg shrink-0", children: /* @__PURE__ */ n(
426
- q,
427
- {
428
- placeholder: "Search signals…",
429
- onInput: (a) => {
430
- o.set(a);
431
- }
432
- }
433
- ) }),
434
- /* @__PURE__ */ d("div", { class: "grid grid-cols-[1.2fr_0.8fr_1fr_auto] items-center px-3 h-7 text-[9px] text-subtle font-bold tracking-[0.12em] uppercase border-b border-border bg-section gap-2 shrink-0", children: [
435
- /* @__PURE__ */ n("span", { children: "Signal" }),
436
- /* @__PURE__ */ n("span", { children: "Component" }),
437
- /* @__PURE__ */ n("span", { children: "Value" }),
438
- /* @__PURE__ */ n("span", { children: "Age" })
439
- ] }),
440
- /* @__PURE__ */ n("div", { class: "flex-1 overflow-y-auto", children: () => {
441
- const a = o().toLowerCase(), l = a === "" ? e() : e().filter(
442
- (s) => s.label.toLowerCase().includes(a) || s.componentName.toLowerCase().includes(a)
443
- );
444
- return l.length === 0 ? /* @__PURE__ */ n(
445
- z,
505
+ }
506
+ render() {
507
+ return /* @__PURE__ */ c("div", { class: "flex h-full overflow-hidden", children: [
508
+ /* @__PURE__ */ c("div", { class: "flex-1 flex flex-col overflow-hidden min-w-0", children: [
509
+ /* @__PURE__ */ o("div", { class: "px-3 py-2 border-b border-border bg-bg shrink-0", children: /* @__PURE__ */ o(
510
+ P,
446
511
  {
447
- message: e().length === 0 ? "No signals tracked. Add @Debug() on top of @State() properties." : "No signals match your search."
512
+ placeholder: "Search signals",
513
+ onInput: (e) => {
514
+ this.search = e;
515
+ }
448
516
  }
449
- ) : l.map((s) => /* @__PURE__ */ n(
450
- Q,
451
- {
452
- entry: s,
453
- selected: r() === s.id,
454
- onClick: () => {
455
- r.update((u) => u === s.id ? null : s.id);
517
+ ) }),
518
+ /* @__PURE__ */ c("div", { class: "grid grid-cols-[1.2fr_0.8fr_1fr_auto] items-center px-3 h-7 text-[9px] text-subtle font-bold tracking-[0.12em] uppercase border-b border-border bg-section gap-2 shrink-0", children: [
519
+ /* @__PURE__ */ o("span", { children: "Signal" }),
520
+ /* @__PURE__ */ o("span", { children: "Component" }),
521
+ /* @__PURE__ */ o("span", { children: "Value" }),
522
+ /* @__PURE__ */ o("span", { children: "Age" })
523
+ ] }),
524
+ /* @__PURE__ */ o("div", { class: "flex-1 overflow-y-auto", children: () => {
525
+ const e = this.search.toLowerCase(), n = e === "" ? this.signals : this.signals.filter(
526
+ (i) => i.label.toLowerCase().includes(e) || i.componentName.toLowerCase().includes(e)
527
+ );
528
+ return n.length === 0 ? /* @__PURE__ */ o(
529
+ H,
530
+ {
531
+ message: this.signals.length === 0 ? "No signals tracked. Add @Debug() on top of @State() properties." : "No signals match your search."
456
532
  }
457
- },
458
- s.id
459
- ));
460
- } })
461
- ] }),
462
- () => {
463
- const a = r(), l = a ? e().find((s) => s.id === a) ?? null : null;
464
- return l ? /* @__PURE__ */ n(Z, { entry: l }) : null;
465
- }
466
- ] });
533
+ ) : n.map((i) => /* @__PURE__ */ o(
534
+ te,
535
+ {
536
+ entry: i,
537
+ selected: this.selectedId === i.id,
538
+ onClick: () => {
539
+ this.selectedId = this.selectedId === i.id ? null : i.id;
540
+ }
541
+ },
542
+ i.id
543
+ ));
544
+ } })
545
+ ] }),
546
+ () => {
547
+ const e = this.selectedId, n = e ? this.signals.find((i) => i.id === e) ?? null : null;
548
+ return n ? /* @__PURE__ */ o(ee, { entry: n }) : null;
549
+ }
550
+ ] });
551
+ }
467
552
  }
468
- const ee = {
553
+ S = b(ct), d(S, 5, "signals", lt, E), d(S, 5, "search", at, E), d(S, 5, "selectedId", st, E), E = d(S, 0, "SignalsTab", dt, E), a(S, 1, E);
554
+ const Qt = {
469
555
  id: "signals",
470
556
  label: "Signals",
471
- component: V
472
- }, te = {
557
+ component: E
558
+ }, Pt = {
473
559
  "signal:change": { label: "signal", cls: "text-[#9b90e6] bg-[rgba(155,144,230,0.14)]" },
474
560
  "component:render": { label: "render", cls: "text-[#4ade80] bg-[rgba(74,222,128,0.12)]" },
475
561
  "component:mount": { label: "mount", cls: "text-[#0ea57a] bg-[rgba(14,165,122,0.14)]" },
476
562
  "component:unmount": { label: "unmount", cls: "text-[#dc2626] bg-[rgba(220,38,38,0.14)]" },
477
563
  lifecycle: { label: "lifecycle", cls: "text-[#d97706] bg-[rgba(217,119,6,0.14)]" },
478
564
  "method:call": { label: "method", cls: "text-[#7c6dd6] bg-[rgba(124,109,214,0.14)]" }
479
- }, ne = [
565
+ }, Vt = [
480
566
  { value: "all", label: "All" },
481
567
  { value: "signal:change", label: "Signals" },
482
568
  { value: "component:render", label: "Renders" },
@@ -484,568 +570,676 @@ const ee = {
484
570
  { value: "lifecycle", label: "Lifecycle" },
485
571
  { value: "method:call", label: "Methods" }
486
572
  ];
487
- function oe({ type: t }) {
488
- const e = te[t];
489
- return /* @__PURE__ */ n(
490
- "span",
491
- {
492
- class: `text-[9px] px-[6px] py-[2px] rounded font-bold uppercase tracking-[0.07em] shrink-0 ${e.cls}`,
493
- children: e.label
494
- }
495
- );
496
- }
497
- function re({ entry: t }) {
498
- const e = b(!1), o = Object.keys(t.data).length > 0;
499
- return /* @__PURE__ */ d("div", { class: "border-b border-border", children: [
500
- /* @__PURE__ */ d(
501
- "div",
573
+ var pt, Me, fn;
574
+ pt = [x()];
575
+ class ne extends (fn = w) {
576
+ render() {
577
+ const t = Pt[this.props.type];
578
+ return /* @__PURE__ */ o(
579
+ "span",
502
580
  {
503
- onClick: () => {
504
- o && e.update((r) => !r);
505
- },
506
- class: `flex items-center gap-2 px-3 py-2 transition-colors duration-100 ${o ? "cursor-pointer hover:bg-section" : "cursor-default"}`,
507
- children: [
508
- /* @__PURE__ */ n("span", { class: "text-subtle text-[10px] w-10 shrink-0 text-right tabular-nums font-mono", children: L(t.timestamp) }),
509
- /* @__PURE__ */ n(oe, { type: t.type }),
510
- /* @__PURE__ */ n("span", { class: "flex-1 text-text font-mono text-[11px] truncate", children: t.label }),
511
- o && /* @__PURE__ */ n("span", { class: "text-subtle text-[11px] shrink-0 w-4 text-center", children: () => e() ? "▾" : "▸" })
512
- ]
581
+ class: `text-[9px] px-[6px] py-[2px] rounded font-bold uppercase tracking-[0.07em] shrink-0 ${t.cls}`,
582
+ children: t.label
513
583
  }
514
- ),
515
- () => e() && o ? /* @__PURE__ */ n("div", { class: "px-3 py-2 pl-[56px] font-mono text-[11px] bg-section border-t border-border", children: Object.entries(t.data).map(([r, i]) => /* @__PURE__ */ d("div", { class: "flex gap-3 py-[3px]", children: [
516
- /* @__PURE__ */ d("span", { class: "text-accent shrink-0", children: [
517
- r,
518
- ":"
519
- ] }),
520
- /* @__PURE__ */ n("span", { class: "text-muted truncate", children: typeof i == "object" ? JSON.stringify(i) : String(i) })
521
- ] }, r)) }) : null
522
- ] });
584
+ );
585
+ }
523
586
  }
524
- function ie({ registry: t }) {
525
- const e = b(t.getTimeline()), o = b("all"), r = b(!1);
526
- let i = [];
527
- return C(() => {
528
- i = [
529
- t.bus.on("timeline:push", () => {
530
- r() || e.set(t.getTimeline());
531
- })
532
- ];
533
- }), I(() => {
534
- i.forEach((a) => {
535
- a();
536
- });
537
- }), /* @__PURE__ */ d("div", { class: "flex flex-col h-full overflow-hidden", children: [
538
- /* @__PURE__ */ d("div", { class: "flex items-center gap-[3px] px-2 py-2 border-b border-border bg-bg shrink-0 flex-wrap", children: [
539
- ne.map((a) => /* @__PURE__ */ n(
540
- "button",
541
- {
542
- onClick: () => {
543
- o.set(a.value);
544
- },
545
- class: () => o() === a.value ? "text-[11px] px-2 py-[3px] rounded cursor-pointer font-sans bg-soft text-accent font-semibold" : "text-[11px] px-2 py-[3px] rounded cursor-pointer font-sans text-muted hover:text-text hover:bg-section transition-colors duration-150",
546
- children: a.label
547
- },
548
- a.value
549
- )),
550
- /* @__PURE__ */ n("div", { class: "flex-1" }),
551
- /* @__PURE__ */ n(
552
- "button",
587
+ Me = b(fn), ne = d(Me, 0, "Badge", pt, ne), a(Me, 1, ne);
588
+ var ut, ht, gt, O;
589
+ gt = [x()];
590
+ class q extends (ht = R, ut = [M()], ht) {
591
+ constructor() {
592
+ super(...arguments);
593
+ f(this, "open", a(O, 8, this, !1)), a(O, 11, this);
594
+ }
595
+ render() {
596
+ const { entry: e } = this.props, n = Object.keys(e.data).length > 0;
597
+ return /* @__PURE__ */ c("div", { class: "border-b border-border", children: [
598
+ /* @__PURE__ */ c(
599
+ "div",
553
600
  {
554
601
  onClick: () => {
555
- r() && e.set(t.getTimeline()), r.update((a) => !a);
602
+ n && (this.open = !this.open);
556
603
  },
557
- class: () => `text-[11px] px-2 py-[3px] rounded cursor-pointer font-sans border border-border transition-colors duration-150 ${r() ? "text-warn border-warn" : "text-muted hover:text-text"}`,
558
- children: () => r() ? "Resume" : "Pause"
604
+ class: `flex items-center gap-2 px-3 py-2 transition-colors duration-100 ${n ? "cursor-pointer hover:bg-section" : "cursor-default"}`,
605
+ children: [
606
+ /* @__PURE__ */ o("span", { class: "text-subtle text-[10px] w-10 shrink-0 text-right tabular-nums font-mono", children: De(e.timestamp) }),
607
+ /* @__PURE__ */ o(ne, { type: e.type }),
608
+ /* @__PURE__ */ o("span", { class: "flex-1 text-text font-mono text-[11px] truncate", children: e.label }),
609
+ n && /* @__PURE__ */ o("span", { class: "text-subtle text-[11px] shrink-0 w-4 text-center", children: () => this.open ? "▾" : "▸" })
610
+ ]
559
611
  }
560
612
  ),
561
- /* @__PURE__ */ n(
562
- "button",
563
- {
564
- onClick: () => {
565
- e.set([]);
613
+ () => this.open && n ? /* @__PURE__ */ o("div", { class: "px-3 py-2 pl-[56px] font-mono text-[11px] bg-section border-t border-border", children: Object.entries(e.data).map(([i, s]) => /* @__PURE__ */ c("div", { class: "flex gap-3 py-[3px]", children: [
614
+ /* @__PURE__ */ c("span", { class: "text-accent shrink-0", children: [
615
+ i,
616
+ ":"
617
+ ] }),
618
+ /* @__PURE__ */ o("span", { class: "text-muted truncate", children: typeof s == "object" ? JSON.stringify(s) : String(s) })
619
+ ] }, i)) }) : null
620
+ ] });
621
+ }
622
+ }
623
+ O = b(ht), d(O, 5, "open", ut, q), q = d(O, 0, "TimelineRow", gt, q), a(O, 1, q);
624
+ var bt, xt, mt, ft, wt, I;
625
+ wt = [x()];
626
+ class D extends (ft = R, mt = [M()], xt = [M()], bt = [M()], ft) {
627
+ constructor() {
628
+ super(...arguments);
629
+ f(this, "entries", a(I, 8, this, [])), a(I, 11, this);
630
+ f(this, "filter", a(I, 12, this, "all")), a(I, 15, this);
631
+ f(this, "paused", a(I, 16, this, !1)), a(I, 19, this);
632
+ f(this, "_handlers", []);
633
+ }
634
+ get registry() {
635
+ return this.props.registry;
636
+ }
637
+ onMount() {
638
+ this.entries = this.registry.getTimeline(), this._handlers = [
639
+ this.registry.bus.on("timeline:push", () => {
640
+ this.paused || (this.entries = this.registry.getTimeline());
641
+ })
642
+ ];
643
+ }
644
+ onUnmount() {
645
+ this._handlers.forEach((e) => {
646
+ e();
647
+ });
648
+ }
649
+ render() {
650
+ return /* @__PURE__ */ c("div", { class: "flex flex-col h-full overflow-hidden", children: [
651
+ /* @__PURE__ */ c("div", { class: "flex items-center gap-[3px] px-2 py-2 border-b border-border bg-bg shrink-0 flex-wrap", children: [
652
+ Vt.map((e) => /* @__PURE__ */ o(
653
+ "button",
654
+ {
655
+ onClick: () => {
656
+ this.filter = e.value;
657
+ },
658
+ class: () => this.filter === e.value ? "text-[11px] px-2 py-[3px] rounded cursor-pointer font-sans bg-soft text-accent font-semibold" : "text-[11px] px-2 py-[3px] rounded cursor-pointer font-sans text-muted hover:text-text hover:bg-section transition-colors duration-150",
659
+ children: e.label
566
660
  },
567
- class: "text-[11px] px-2 py-[3px] rounded cursor-pointer font-sans border border-border text-muted hover:text-text transition-colors duration-150",
568
- children: "Clear"
569
- }
570
- )
571
- ] }),
572
- /* @__PURE__ */ n("div", { class: "flex-1 overflow-y-auto", children: () => {
573
- const a = o(), l = a === "all" ? e() : e().filter(
574
- (s) => s.type === a || a === "component:mount" && s.type === "component:unmount"
575
- );
576
- return l.length === 0 ? /* @__PURE__ */ n(z, { message: "No events yet. Interact with your app to see the timeline." }) : [...l].reverse().map((s) => /* @__PURE__ */ n(re, { entry: s }, s.id));
577
- } })
578
- ] });
661
+ e.value
662
+ )),
663
+ /* @__PURE__ */ o("div", { class: "flex-1" }),
664
+ /* @__PURE__ */ o(
665
+ "button",
666
+ {
667
+ onClick: () => {
668
+ this.paused && (this.entries = this.registry.getTimeline()), this.paused = !this.paused;
669
+ },
670
+ class: () => `text-[11px] px-2 py-[3px] rounded cursor-pointer font-sans border border-border transition-colors duration-150 ${this.paused ? "text-warn border-warn" : "text-muted hover:text-text"}`,
671
+ children: () => this.paused ? "Resume" : "Pause"
672
+ }
673
+ ),
674
+ /* @__PURE__ */ o(
675
+ "button",
676
+ {
677
+ onClick: () => {
678
+ this.entries = [];
679
+ },
680
+ class: "text-[11px] px-2 py-[3px] rounded cursor-pointer font-sans border border-border text-muted hover:text-text transition-colors duration-150",
681
+ children: "Clear"
682
+ }
683
+ )
684
+ ] }),
685
+ /* @__PURE__ */ o("div", { class: "flex-1 overflow-y-auto", children: () => {
686
+ const e = this.filter, n = e === "all" ? this.entries : this.entries.filter(
687
+ (i) => i.type === e || e === "component:mount" && i.type === "component:unmount"
688
+ );
689
+ return n.length === 0 ? /* @__PURE__ */ o(H, { message: "No events yet. Interact with your app to see the timeline." }) : [...n].reverse().map((i) => /* @__PURE__ */ o(q, { entry: i }, i.id));
690
+ } })
691
+ ] });
692
+ }
579
693
  }
580
- const se = {
694
+ I = b(ft), d(I, 5, "entries", mt, D), d(I, 5, "filter", xt, D), d(I, 5, "paused", bt, D), D = d(I, 0, "TimelineTab", wt, D), a(I, 1, D);
695
+ const en = {
581
696
  id: "timeline",
582
697
  label: "Timeline",
583
- component: ie
584
- }, ae = '*,:after,:before,::backdrop,::file-selector-button{box-sizing:border-box;margin:0;padding:0;border:0 solid}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea,::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]),::file-selector-button{appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}';
585
- function le() {
586
- return /* @__PURE__ */ d(
587
- "svg",
588
- {
589
- xmlns: "http://www.w3.org/2000/svg",
590
- width: "24",
591
- height: "24",
592
- viewBox: "0 0 24 24",
593
- fill: "none",
594
- stroke: "currentColor",
595
- "stroke-width": "2",
596
- "stroke-linecap": "round",
597
- "stroke-linejoin": "round",
598
- class: "lucide lucide-ellipsis-vertical-icon lucide-ellipsis-vertical",
599
- children: [
600
- /* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "1" }),
601
- /* @__PURE__ */ n("circle", { cx: "12", cy: "5", r: "1" }),
602
- /* @__PURE__ */ n("circle", { cx: "12", cy: "19", r: "1" })
603
- ]
604
- }
605
- );
698
+ component: D
699
+ }, tn = '*,:after,:before,::backdrop,::file-selector-button{box-sizing:border-box;margin:0;padding:0;border:0 solid}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea,::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]),::file-selector-button{appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}';
700
+ var yt, Ce, wn;
701
+ yt = [x()];
702
+ class re extends (wn = w) {
703
+ render() {
704
+ return /* @__PURE__ */ c(
705
+ "svg",
706
+ {
707
+ xmlns: "http://www.w3.org/2000/svg",
708
+ width: "24",
709
+ height: "24",
710
+ viewBox: "0 0 24 24",
711
+ fill: "none",
712
+ stroke: "currentColor",
713
+ "stroke-width": "2",
714
+ "stroke-linecap": "round",
715
+ "stroke-linejoin": "round",
716
+ class: "lucide lucide-ellipsis-vertical-icon lucide-ellipsis-vertical",
717
+ children: [
718
+ /* @__PURE__ */ o("circle", { cx: "12", cy: "12", r: "1" }),
719
+ /* @__PURE__ */ o("circle", { cx: "12", cy: "5", r: "1" }),
720
+ /* @__PURE__ */ o("circle", { cx: "12", cy: "19", r: "1" })
721
+ ]
722
+ }
723
+ );
724
+ }
606
725
  }
607
- function ce() {
608
- return /* @__PURE__ */ d(
609
- "svg",
610
- {
611
- xmlns: "http://www.w3.org/2000/svg",
612
- width: "24",
613
- height: "24",
614
- viewBox: "0 0 24 24",
615
- fill: "none",
616
- stroke: "currentColor",
617
- "stroke-width": "2",
618
- "stroke-linecap": "round",
619
- "stroke-linejoin": "round",
620
- class: "lucide lucide-panel-bottom-icon lucide-panel-bottom",
621
- children: [
622
- /* @__PURE__ */ n("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
623
- /* @__PURE__ */ n("path", { d: "M3 15h18" })
624
- ]
625
- }
626
- );
726
+ Ce = b(wn), re = d(Ce, 0, "EllipsisVerticalIcon", yt, re), a(Ce, 1, re);
727
+ var vt, Se, yn;
728
+ vt = [x()];
729
+ class oe extends (yn = w) {
730
+ render() {
731
+ return /* @__PURE__ */ c(
732
+ "svg",
733
+ {
734
+ xmlns: "http://www.w3.org/2000/svg",
735
+ width: "24",
736
+ height: "24",
737
+ viewBox: "0 0 24 24",
738
+ fill: "none",
739
+ stroke: "currentColor",
740
+ "stroke-width": "2",
741
+ "stroke-linecap": "round",
742
+ "stroke-linejoin": "round",
743
+ class: "lucide lucide-panel-bottom-icon lucide-panel-bottom",
744
+ children: [
745
+ /* @__PURE__ */ o("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
746
+ /* @__PURE__ */ o("path", { d: "M3 15h18" })
747
+ ]
748
+ }
749
+ );
750
+ }
627
751
  }
628
- function de() {
629
- return /* @__PURE__ */ d(
630
- "svg",
631
- {
632
- xmlns: "http://www.w3.org/2000/svg",
633
- width: "24",
634
- height: "24",
635
- viewBox: "0 0 24 24",
636
- fill: "none",
637
- stroke: "currentColor",
638
- "stroke-width": "2",
639
- "stroke-linecap": "round",
640
- "stroke-linejoin": "round",
641
- class: "lucide lucide-panel-left-icon lucide-panel-left",
642
- children: [
643
- /* @__PURE__ */ n("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
644
- /* @__PURE__ */ n("path", { d: "M9 3v18" })
645
- ]
646
- }
647
- );
752
+ Se = b(yn), oe = d(Se, 0, "PanelBottomIcon", vt, oe), a(Se, 1, oe);
753
+ var kt, Ie, vn;
754
+ kt = [x()];
755
+ class ie extends (vn = w) {
756
+ render() {
757
+ return /* @__PURE__ */ c(
758
+ "svg",
759
+ {
760
+ xmlns: "http://www.w3.org/2000/svg",
761
+ width: "24",
762
+ height: "24",
763
+ viewBox: "0 0 24 24",
764
+ fill: "none",
765
+ stroke: "currentColor",
766
+ "stroke-width": "2",
767
+ "stroke-linecap": "round",
768
+ "stroke-linejoin": "round",
769
+ class: "lucide lucide-panel-left-icon lucide-panel-left",
770
+ children: [
771
+ /* @__PURE__ */ o("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
772
+ /* @__PURE__ */ o("path", { d: "M9 3v18" })
773
+ ]
774
+ }
775
+ );
776
+ }
648
777
  }
649
- function ue() {
650
- return /* @__PURE__ */ d(
651
- "svg",
652
- {
653
- xmlns: "http://www.w3.org/2000/svg",
654
- width: "24",
655
- height: "24",
656
- viewBox: "0 0 24 24",
657
- fill: "none",
658
- stroke: "currentColor",
659
- "stroke-width": "2",
660
- "stroke-linecap": "round",
661
- "stroke-linejoin": "round",
662
- class: "lucide lucide-panel-right-icon lucide-panel-right",
663
- children: [
664
- /* @__PURE__ */ n("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
665
- /* @__PURE__ */ n("path", { d: "M15 3v18" })
666
- ]
667
- }
668
- );
778
+ Ie = b(vn), ie = d(Ie, 0, "PanelLeftIcon", kt, ie), a(Ie, 1, ie);
779
+ var zt, Le, kn;
780
+ zt = [x()];
781
+ class se extends (kn = w) {
782
+ render() {
783
+ return /* @__PURE__ */ c(
784
+ "svg",
785
+ {
786
+ xmlns: "http://www.w3.org/2000/svg",
787
+ width: "24",
788
+ height: "24",
789
+ viewBox: "0 0 24 24",
790
+ fill: "none",
791
+ stroke: "currentColor",
792
+ "stroke-width": "2",
793
+ "stroke-linecap": "round",
794
+ "stroke-linejoin": "round",
795
+ class: "lucide lucide-panel-right-icon lucide-panel-right",
796
+ children: [
797
+ /* @__PURE__ */ o("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
798
+ /* @__PURE__ */ o("path", { d: "M15 3v18" })
799
+ ]
800
+ }
801
+ );
802
+ }
669
803
  }
670
- function pe() {
671
- return /* @__PURE__ */ d(
672
- "svg",
673
- {
674
- xmlns: "http://www.w3.org/2000/svg",
675
- width: "24",
676
- height: "24",
677
- viewBox: "0 0 24 24",
678
- fill: "none",
679
- stroke: "currentColor",
680
- "stroke-width": "2",
681
- "stroke-linecap": "round",
682
- "stroke-linejoin": "round",
683
- class: "lucide lucide-panel-top-icon lucide-panel-top",
684
- children: [
685
- /* @__PURE__ */ n("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
686
- /* @__PURE__ */ n("path", { d: "M3 9h18" })
687
- ]
688
- }
689
- );
804
+ Le = b(kn), se = d(Le, 0, "PanelRightIcon", zt, se), a(Le, 1, se);
805
+ var Mt, _e, zn;
806
+ Mt = [x()];
807
+ class ae extends (zn = w) {
808
+ render() {
809
+ return /* @__PURE__ */ c(
810
+ "svg",
811
+ {
812
+ xmlns: "http://www.w3.org/2000/svg",
813
+ width: "24",
814
+ height: "24",
815
+ viewBox: "0 0 24 24",
816
+ fill: "none",
817
+ stroke: "currentColor",
818
+ "stroke-width": "2",
819
+ "stroke-linecap": "round",
820
+ "stroke-linejoin": "round",
821
+ class: "lucide lucide-panel-top-icon lucide-panel-top",
822
+ children: [
823
+ /* @__PURE__ */ o("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
824
+ /* @__PURE__ */ o("path", { d: "M3 9h18" })
825
+ ]
826
+ }
827
+ );
828
+ }
690
829
  }
691
- function he() {
692
- return /* @__PURE__ */ d(
693
- "svg",
694
- {
695
- xmlns: "http://www.w3.org/2000/svg",
696
- width: "24",
697
- height: "24",
698
- viewBox: "0 0 24 24",
699
- fill: "none",
700
- stroke: "currentColor",
701
- "stroke-width": "2",
702
- "stroke-linecap": "round",
703
- "stroke-linejoin": "round",
704
- class: "lucide lucide-x-icon lucide-x",
705
- children: [
706
- /* @__PURE__ */ n("path", { d: "M18 6 6 18" }),
707
- /* @__PURE__ */ n("path", { d: "m6 6 12 12" })
708
- ]
709
- }
710
- );
830
+ _e = b(zn), ae = d(_e, 0, "PanelTopIcon", Mt, ae), a(_e, 1, ae);
831
+ var Ct, $e, Mn;
832
+ Ct = [x()];
833
+ class le extends (Mn = w) {
834
+ render() {
835
+ return /* @__PURE__ */ c(
836
+ "svg",
837
+ {
838
+ xmlns: "http://www.w3.org/2000/svg",
839
+ width: "24",
840
+ height: "24",
841
+ viewBox: "0 0 24 24",
842
+ fill: "none",
843
+ stroke: "currentColor",
844
+ "stroke-width": "2",
845
+ "stroke-linecap": "round",
846
+ "stroke-linejoin": "round",
847
+ class: "lucide lucide-x-icon lucide-x",
848
+ children: [
849
+ /* @__PURE__ */ o("path", { d: "M18 6 6 18" }),
850
+ /* @__PURE__ */ o("path", { d: "m6 6 12 12" })
851
+ ]
852
+ }
853
+ );
854
+ }
711
855
  }
712
- function S({
713
- title: t,
714
- active: e,
715
- icon: o,
716
- onClick: r
717
- }) {
718
- return /* @__PURE__ */ n(
719
- "button",
720
- {
721
- title: t,
722
- onClick: r,
723
- class: () => `w-[22px] h-[22px] flex items-center justify-center rounded-md text-[11px] cursor-pointer transition-colors duration-150 ${(typeof e == "function" ? e() : e) ? "text-accent bg-soft color-white" : "text-subtle hover:color-muted hover:bg-section"}`,
724
- children: /* @__PURE__ */ n(o, {})
725
- }
726
- );
856
+ $e = b(Mn), le = d($e, 0, "XIcon", Ct, le), a($e, 1, le);
857
+ var St, je, Cn;
858
+ St = [x()];
859
+ class T extends (Cn = w) {
860
+ render() {
861
+ const { title: t, active: e, icon: n, onClick: i } = this.props;
862
+ return /* @__PURE__ */ o(
863
+ "button",
864
+ {
865
+ title: t,
866
+ onClick: i,
867
+ class: () => `w-[22px] h-[22px] flex items-center justify-center rounded-md text-[11px] cursor-pointer transition-colors duration-150 ${(typeof e == "function" ? e() : e) ? "text-accent bg-soft color-white" : "text-subtle hover:color-muted hover:bg-section"}`,
868
+ children: /* @__PURE__ */ o(n, {})
869
+ }
870
+ );
871
+ }
727
872
  }
728
- const _ = 180, be = 300, E = 240, ge = 380, xe = {
729
- bottom: ce,
730
- top: pe,
731
- left: de,
732
- right: ue
873
+ je = b(Cn), T = d(je, 0, "IconButton", St, T), a(je, 1, T);
874
+ const Te = 180, nn = 300, Re = 240, rn = 380, on = {
875
+ bottom: oe,
876
+ top: ae,
877
+ left: ie,
878
+ right: se
733
879
  };
734
- function me({ plugins: t, registry: e, onClose: o }) {
735
- const r = b(t[0]?.id ?? ""), i = b("bottom"), a = b(!1), l = b(be), s = b(ge);
736
- return /* @__PURE__ */ d(
737
- "div",
738
- {
739
- class: () => {
740
- const c = i();
741
- return c === "top" ? "flex flex-col-reverse fixed top-0 left-0 w-full z-[2147483647]" : c === "left" ? "flex flex-row-reverse fixed left-0 top-0 h-screen z-[2147483647]" : c === "right" ? "flex fixed right-0 top-0 h-screen z-[2147483647]" : "flex flex-col fixed bottom-0 left-0 w-full z-[2147483647]";
742
- },
743
- children: [
744
- /* @__PURE__ */ n(
745
- "div",
746
- {
747
- class: () => {
748
- const c = i();
749
- return c === "bottom" || c === "top" ? "h-1 cursor-[ns-resize] bg-transparent hover:bg-accent transition-colors duration-200" : "w-1 cursor-[ew-resize] bg-transparent hover:bg-accent transition-colors duration-200";
750
- },
751
- onMouseDown: (c) => {
752
- c.preventDefault();
753
- const h = c.clientX, p = c.clientY, x = i(), m = x === "bottom" || x === "top" ? l() : s(), D = (w) => {
754
- const y = i();
755
- y === "bottom" ? l.set(
756
- Math.max(
757
- _,
758
- Math.min(
759
- window.innerHeight * 0.85,
760
- m + (p - w.clientY)
761
- )
762
- )
763
- ) : y === "top" ? l.set(
764
- Math.max(
765
- _,
766
- Math.min(
767
- window.innerHeight * 0.85,
768
- m + (w.clientY - p)
769
- )
770
- )
771
- ) : y === "left" ? s.set(
772
- Math.max(
773
- E,
774
- Math.min(
775
- window.innerWidth * 0.6,
776
- m + (w.clientX - h)
777
- )
778
- )
779
- ) : s.set(
780
- Math.max(
781
- E,
782
- Math.min(
783
- window.innerWidth * 0.6,
784
- m + (h - w.clientX)
785
- )
786
- )
787
- );
788
- }, $ = () => {
789
- document.removeEventListener("mousemove", D), document.removeEventListener("mouseup", $);
790
- };
791
- document.addEventListener("mousemove", D), document.addEventListener("mouseup", $);
880
+ var It, Lt, _t, $t, jt, Et, Dt, y;
881
+ Dt = [x()];
882
+ class j extends (Et = R, jt = [M()], $t = [M()], _t = [M()], Lt = [M()], It = [M()], Et) {
883
+ constructor() {
884
+ super(...arguments);
885
+ f(this, "activeTab", a(y, 8, this, "")), a(y, 11, this);
886
+ f(this, "dock", a(y, 12, this, "bottom")), a(y, 15, this);
887
+ f(this, "dockMenuOpen", a(y, 16, this, !1)), a(y, 19, this);
888
+ f(this, "bottomSize", a(y, 20, this, nn)), a(y, 23, this);
889
+ f(this, "vertSize", a(y, 24, this, rn)), a(y, 27, this);
890
+ }
891
+ get p() {
892
+ return this.props;
893
+ }
894
+ onBeforeMount() {
895
+ this.activeTab = this.p.plugins[0]?.id ?? "";
896
+ }
897
+ handleMouseDown(e) {
898
+ e.preventDefault();
899
+ const n = e.clientX, i = e.clientY, s = this.dock, l = s === "bottom" || s === "top" ? this.bottomSize : this.vertSize, p = (h) => {
900
+ const m = this.dock;
901
+ m === "bottom" ? this.bottomSize = Math.max(
902
+ Te,
903
+ Math.min(
904
+ window.innerHeight * 0.85,
905
+ l + (i - h.clientY)
906
+ )
907
+ ) : m === "top" ? this.bottomSize = Math.max(
908
+ Te,
909
+ Math.min(
910
+ window.innerHeight * 0.85,
911
+ l + (h.clientY - i)
912
+ )
913
+ ) : m === "left" ? this.vertSize = Math.max(
914
+ Re,
915
+ Math.min(
916
+ window.innerWidth * 0.6,
917
+ l + (h.clientX - n)
918
+ )
919
+ ) : this.vertSize = Math.max(
920
+ Re,
921
+ Math.min(
922
+ window.innerWidth * 0.6,
923
+ l + (n - h.clientX)
924
+ )
925
+ );
926
+ }, g = () => {
927
+ document.removeEventListener("mousemove", p), document.removeEventListener("mouseup", g);
928
+ };
929
+ document.addEventListener("mousemove", p), document.addEventListener("mouseup", g);
930
+ }
931
+ render() {
932
+ const { plugins: e, registry: n, onClose: i } = this.p;
933
+ return /* @__PURE__ */ c(
934
+ "div",
935
+ {
936
+ class: () => {
937
+ const s = this.dock;
938
+ return s === "top" ? "flex flex-col-reverse fixed top-0 left-0 w-full z-[2147483647]" : s === "left" ? "flex flex-row-reverse fixed left-0 top-0 h-screen z-[2147483647]" : s === "right" ? "flex fixed right-0 top-0 h-screen z-[2147483647]" : "flex flex-col fixed bottom-0 left-0 w-full z-[2147483647]";
939
+ },
940
+ children: [
941
+ /* @__PURE__ */ o(
942
+ "div",
943
+ {
944
+ class: () => {
945
+ const s = this.dock;
946
+ return s === "bottom" || s === "top" ? "h-1 cursor-[ns-resize] bg-transparent hover:bg-accent transition-colors duration-200" : "w-1 cursor-[ew-resize] bg-transparent hover:bg-accent transition-colors duration-200";
947
+ },
948
+ onMouseDown: (s) => {
949
+ this.handleMouseDown(s);
950
+ }
792
951
  }
793
- }
794
- ),
795
- /* @__PURE__ */ n(
796
- "div",
797
- {
798
- class: () => {
799
- const c = i();
800
- return c === "top" ? "w-full h-full bg-bg border-b border-border" : c === "left" ? "w-full h-full bg-bg border-r border-border" : c === "right" ? "w-full h-full bg-bg border-l border-border" : "w-full h-full bg-bg border-t border-border";
801
- },
802
- style: () => {
803
- const c = i();
804
- return c === "bottom" || c === "top" ? { height: `${l().toString()}px` } : { width: `${s().toString()}px` };
805
- },
806
- children: /* @__PURE__ */ d("div", { class: "flex flex-col flex-1 w-full h-full overflow-hidden", children: [
807
- /* @__PURE__ */ d("div", { class: "flex h-10 items-stretch border-b border-border bg-header shrink-0 px-2 gap-[2px]", children: [
808
- /* @__PURE__ */ d("div", { class: "flex items-center gap-[6px] pr-3 mr-[2px] border-r border-border shrink-0", children: [
809
- /* @__PURE__ */ n("img", { class: "h-[13px] w-[13px]", src: N }),
810
- /* @__PURE__ */ n("span", { class: "text-[10px] font-bold text-accent tracking-widest uppercase", children: "praxisjs" })
811
- ] }),
812
- /* @__PURE__ */ n("div", { class: "flex items-stretch flex-1", children: t.map((c) => /* @__PURE__ */ d(
813
- "button",
814
- {
815
- class: () => r() === c.id ? "relative flex items-center px-3 text-[11px] font-semibold text-accent cursor-pointer" : "flex items-center px-3 text-[11px] text-muted cursor-pointer hover:text-text transition-colors duration-150",
816
- onClick: () => {
817
- r.set(c.id);
952
+ ),
953
+ /* @__PURE__ */ o(
954
+ "div",
955
+ {
956
+ class: () => {
957
+ const s = this.dock;
958
+ return s === "top" ? "w-full h-full bg-bg border-b border-border" : s === "left" ? "w-full h-full bg-bg border-r border-border" : s === "right" ? "w-full h-full bg-bg border-l border-border" : "w-full h-full bg-bg border-t border-border";
959
+ },
960
+ style: () => {
961
+ const s = this.dock;
962
+ return s === "bottom" || s === "top" ? { height: `${this.bottomSize.toString()}px` } : { width: `${this.vertSize.toString()}px` };
963
+ },
964
+ children: /* @__PURE__ */ c("div", { class: "flex flex-col flex-1 w-full h-full overflow-hidden", children: [
965
+ /* @__PURE__ */ c("div", { class: "flex h-10 items-stretch border-b border-border bg-header shrink-0 px-2 gap-[2px]", children: [
966
+ /* @__PURE__ */ c("div", { class: "flex items-center gap-[6px] pr-3 mr-[2px] border-r border-border shrink-0", children: [
967
+ /* @__PURE__ */ o("img", { class: "h-[13px] w-[13px]", src: At }),
968
+ /* @__PURE__ */ o("span", { class: "text-[10px] font-bold text-accent tracking-widest uppercase", children: "praxisjs" })
969
+ ] }),
970
+ /* @__PURE__ */ o("div", { class: "flex items-stretch flex-1", children: e.map((s) => /* @__PURE__ */ c(
971
+ "button",
972
+ {
973
+ class: () => this.activeTab === s.id ? "relative flex items-center px-3 text-[11px] font-semibold text-accent cursor-pointer" : "flex items-center px-3 text-[11px] text-muted cursor-pointer hover:text-text transition-colors duration-150",
974
+ onClick: () => {
975
+ this.activeTab = s.id;
976
+ },
977
+ children: [
978
+ s.label,
979
+ () => this.activeTab === s.id ? /* @__PURE__ */ o("span", { class: "absolute bottom-0 left-0 right-0 h-[2px] bg-accent" }) : null
980
+ ]
818
981
  },
819
- children: [
820
- c.label,
821
- () => r() === c.id ? /* @__PURE__ */ n("span", { class: "absolute bottom-0 left-0 right-0 h-[2px] bg-accent" }) : null
822
- ]
823
- },
824
- c.id
825
- )) }),
826
- /* @__PURE__ */ d("div", { class: "flex items-center gap-[2px] shrink-0", children: [
827
- /* @__PURE__ */ d("div", { class: "relative", children: [
828
- /* @__PURE__ */ n(
829
- S,
830
- {
831
- title: "Dock position",
832
- icon: le,
833
- active: () => a(),
834
- onClick: () => {
835
- a.set(!a());
836
- }
837
- }
838
- ),
839
- () => a() ? /* @__PURE__ */ n("div", { class: "absolute right-0 top-full mt-1 flex gap-[2px] bg-bg border border-border rounded-md shadow-lg p-1 z-10", children: ["bottom", "top", "left", "right"].map(
840
- (c) => /* @__PURE__ */ n(
841
- S,
982
+ s.id
983
+ )) }),
984
+ /* @__PURE__ */ c("div", { class: "flex items-center gap-[2px] shrink-0", children: [
985
+ /* @__PURE__ */ c("div", { class: "relative", children: [
986
+ /* @__PURE__ */ o(
987
+ T,
842
988
  {
843
- title: `Dock ${c}`,
844
- active: () => i() === c,
845
- icon: xe[c],
989
+ title: "Dock position",
990
+ icon: re,
991
+ active: () => this.dockMenuOpen,
846
992
  onClick: () => {
847
- i.set(c), a.set(!1);
993
+ this.dockMenuOpen = !this.dockMenuOpen;
848
994
  }
849
- },
850
- c
851
- )
852
- ) }) : null
853
- ] }),
854
- /* @__PURE__ */ n("div", { class: "w-px h-3 bg-border mx-1" }),
855
- /* @__PURE__ */ n(S, { title: "Close", icon: he, onClick: o })
856
- ] })
857
- ] }),
858
- /* @__PURE__ */ n("div", { class: "flex-1 overflow-hidden flex flex-col", children: () => {
859
- const h = t.find((p) => p.id === r())?.component;
860
- return h ? /* @__PURE__ */ n(h, { registry: e }) : null;
861
- } })
862
- ] })
863
- }
864
- )
865
- ]
866
- }
867
- );
995
+ }
996
+ ),
997
+ () => this.dockMenuOpen ? /* @__PURE__ */ o("div", { class: "absolute right-0 top-full mt-1 flex gap-[2px] bg-bg border border-border rounded-md shadow-lg p-1 z-10", children: ["bottom", "top", "left", "right"].map(
998
+ (s) => /* @__PURE__ */ o(
999
+ T,
1000
+ {
1001
+ title: `Dock ${s}`,
1002
+ active: () => this.dock === s,
1003
+ icon: on[s],
1004
+ onClick: () => {
1005
+ this.dock = s, this.dockMenuOpen = !1;
1006
+ }
1007
+ },
1008
+ s
1009
+ )
1010
+ ) }) : null
1011
+ ] }),
1012
+ /* @__PURE__ */ o("div", { class: "w-px h-3 bg-border mx-1" }),
1013
+ /* @__PURE__ */ o(T, { title: "Close", icon: le, onClick: i })
1014
+ ] })
1015
+ ] }),
1016
+ /* @__PURE__ */ o("div", { class: "flex-1 overflow-hidden flex flex-col", children: () => {
1017
+ const l = e.find((p) => p.id === this.activeTab)?.component;
1018
+ return l ? /* @__PURE__ */ o(l, { registry: n }) : null;
1019
+ } })
1020
+ ] })
1021
+ }
1022
+ )
1023
+ ]
1024
+ }
1025
+ );
1026
+ }
868
1027
  }
869
- const fe = [
870
- ee,
871
- J,
872
- se
1028
+ y = b(Et), d(y, 5, "activeTab", jt, j), d(y, 5, "dock", $t, j), d(y, 5, "dockMenuOpen", _t, j), d(y, 5, "bottomSize", Lt, j), d(y, 5, "vertSize", It, j), j = d(y, 0, "Panel", Dt, j), a(y, 1, j);
1029
+ const sn = [
1030
+ Qt,
1031
+ Zt,
1032
+ en
873
1033
  ];
874
- function B({
875
- plugins: t,
876
- registry: e
877
- }) {
878
- const o = b(!1);
879
- return /* @__PURE__ */ n("div", { children: () => o() ? /* @__PURE__ */ n(
880
- me,
881
- {
882
- plugins: t,
883
- registry: e,
884
- onClose: () => {
885
- o.set(!1);
1034
+ var Nt, Ut, Ot, A;
1035
+ Ot = [x()];
1036
+ class B extends (Ut = R, Nt = [M()], Ut) {
1037
+ constructor() {
1038
+ super(...arguments);
1039
+ f(this, "open", a(A, 8, this, !1)), a(A, 11, this);
1040
+ }
1041
+ get p() {
1042
+ return this.props;
1043
+ }
1044
+ render() {
1045
+ const { plugins: e, registry: n } = this.p;
1046
+ return /* @__PURE__ */ o("div", { children: () => this.open ? /* @__PURE__ */ o(
1047
+ j,
1048
+ {
1049
+ plugins: e,
1050
+ registry: n,
1051
+ onClose: () => {
1052
+ this.open = !1;
1053
+ }
886
1054
  }
887
- }
888
- ) : /* @__PURE__ */ d(
889
- "button",
890
- {
891
- onClick: () => {
892
- o.set(!0);
893
- },
894
- class: "fixed bottom-5 right-5 z-[2147483647] flex items-center gap-1 pl-[10px] pr-[14px] h-[32px] rounded-xl font-sans font-semibold text-[12px] text-accent bg-header border border-border cursor-pointer select-none shadow-[0_8px_32px_rgba(0,0,0,0.7)] transition-all duration-200 hover:border-accent hover:bg-soft hover:shadow-[0_8px_32px_rgba(56,189,248,0.1)]",
895
- children: [
896
- /* @__PURE__ */ n("img", { class: "h-[13px] w-[13px]", src: N }),
897
- /* @__PURE__ */ n("span", { class: "text-[10px] font-bold text-accent tracking-widest uppercase", children: "devtools" })
898
- ]
899
- }
900
- ) });
1055
+ ) : /* @__PURE__ */ c(
1056
+ "button",
1057
+ {
1058
+ onClick: () => {
1059
+ this.open = !0;
1060
+ },
1061
+ class: "fixed bottom-5 right-5 z-[2147483647] flex items-center gap-1 pl-[10px] pr-[14px] h-[32px] rounded-xl font-sans font-semibold text-[12px] text-accent bg-header border border-border cursor-pointer select-none shadow-[0_8px_32px_rgba(0,0,0,0.7)] transition-all duration-200 hover:border-accent hover:bg-soft hover:shadow-[0_8px_32px_rgba(56,189,248,0.1)]",
1062
+ children: [
1063
+ /* @__PURE__ */ o("img", { class: "h-[13px] w-[13px]", src: At }),
1064
+ /* @__PURE__ */ o("span", { class: "text-[10px] font-bold text-accent tracking-widest uppercase", children: "devtools" })
1065
+ ]
1066
+ }
1067
+ ) });
1068
+ }
901
1069
  }
902
- const Se = {
903
- plugins: [...fe],
1070
+ A = b(Ut), d(A, 5, "open", Nt, B), B = d(A, 0, "DevToolsApp", Ot, B), a(A, 1, B);
1071
+ const En = {
1072
+ plugins: [...sn],
904
1073
  host: null,
905
1074
  cleanup: null,
906
- init(t = {}) {
1075
+ init(r = {}) {
907
1076
  if (this.host) return;
908
- t.plugins && (this.plugins = t.plugins), this.plugins.forEach((a) => a.setup?.(g.instance));
909
- const e = document.createElement("div");
910
- e.id = "praxisjs-devtools", document.body.appendChild(e), this.host = e;
911
- const o = e.attachShadow({ mode: "open" }), r = document.createElement("style");
912
- r.textContent = ae + F, o.appendChild(r);
1077
+ r.plugins && (this.plugins = r.plugins), this.plugins.forEach((s) => s.setup?.(v.instance));
1078
+ const t = document.createElement("div");
1079
+ t.id = "praxisjs-devtools", document.body.appendChild(t), this.host = t;
1080
+ const e = t.attachShadow({ mode: "open" }), n = document.createElement("style");
1081
+ n.textContent = tn + Jt, e.appendChild(n);
913
1082
  const i = document.createElement("div");
914
- o.appendChild(i), this.cleanup = j(
915
- /* @__PURE__ */ n(B, { plugins: this.plugins, registry: g.instance }),
1083
+ e.appendChild(i), this.cleanup = He(
1084
+ () => /* @__PURE__ */ o(B, { plugins: this.plugins, registry: v.instance }),
916
1085
  i
917
1086
  );
918
1087
  },
919
- registerPlugin(t) {
920
- this.plugins.find((e) => e.id === t.id) || (t.setup?.(g.instance), this.plugins.push(t), this.remount());
1088
+ registerPlugin(r) {
1089
+ this.plugins.find((t) => t.id === r.id) || (r.setup?.(v.instance), this.plugins.push(r), this.remount());
921
1090
  },
922
1091
  get registry() {
923
- return g.instance;
1092
+ return v.instance;
924
1093
  },
925
1094
  remount() {
926
1095
  if (!this.host) return;
927
- const e = this.host.shadowRoot.querySelector("div:last-child");
928
- this.cleanup?.(), this.cleanup = j(
929
- /* @__PURE__ */ n(B, { plugins: this.plugins, registry: g.instance }),
930
- e
1096
+ const t = this.host.shadowRoot.querySelector("div:last-child");
1097
+ this.cleanup?.(), this.cleanup = He(
1098
+ () => /* @__PURE__ */ o(B, { plugins: this.plugins, registry: v.instance }),
1099
+ t
931
1100
  );
932
1101
  }
933
1102
  };
934
- function we(t) {
935
- return typeof t == "function" && typeof t.subscribe == "function" && !("set" in t);
1103
+ function We(r) {
1104
+ return typeof r == "function" && typeof r.subscribe == "function" && !("set" in r);
936
1105
  }
937
- function Ce(t = {}) {
938
- return function(e, o, r) {
939
- const i = e.constructor.name, a = t.label ?? o;
940
- if (r && typeof r.value == "function") {
941
- const u = r.value;
942
- r.value = function(...c) {
943
- const h = performance.now();
944
- let p, x = !1;
1106
+ function Dn(r = {}) {
1107
+ return function(e, n) {
1108
+ const i = r.label ?? n.name;
1109
+ if (n.kind === "method") {
1110
+ const s = e;
1111
+ return function(...l) {
1112
+ const p = this.constructor.name, g = performance.now();
1113
+ let h, m = !1;
945
1114
  try {
946
- p = u.apply(this, c);
947
- } catch (m) {
948
- throw x = !0, p = m, m;
1115
+ h = s.apply(this, l);
1116
+ } catch (u) {
1117
+ throw m = !0, h = u, u;
949
1118
  } finally {
950
- const m = performance.now() - h;
951
- g.instance.recordMethodCall(
1119
+ const u = performance.now() - g;
1120
+ v.instance.recordMethodCall(
952
1121
  this,
953
- a,
954
- c,
955
- x ? `throw ${String(p)}` : p,
956
- m,
957
- i
1122
+ i,
1123
+ l,
1124
+ m ? `throw ${String(h)}` : h,
1125
+ u,
1126
+ p
958
1127
  );
959
1128
  }
960
- return p;
1129
+ return h;
961
1130
  };
1131
+ }
1132
+ if (n.kind === "getter") {
1133
+ const s = e;
1134
+ n.addInitializer(function() {
1135
+ const l = this, p = l.constructor.name;
1136
+ queueMicrotask(() => {
1137
+ const g = Yt(() => s.call(l));
1138
+ let h = !0, m = g();
1139
+ v.instance.registerSignal(l, i, m, p), g.subscribe((u) => {
1140
+ if (h) {
1141
+ h = !1;
1142
+ return;
1143
+ }
1144
+ v.instance.updateSignal(l, i, u, m), m = u;
1145
+ });
1146
+ });
1147
+ });
962
1148
  return;
963
1149
  }
964
- const l = Object.getOwnPropertyDescriptor(e, o);
965
- if (l?.get && l.set) {
966
- const u = l.get.bind(l), c = l.set.bind(l), h = /* @__PURE__ */ new WeakSet();
967
- Object.defineProperty(e, o, {
1150
+ n.addInitializer(function() {
1151
+ const s = this, l = n.name, p = s.constructor.name, g = Object.getOwnPropertyDescriptor(s, l);
1152
+ if (g?.get && g.set) {
1153
+ const k = g.get, z = g.set;
1154
+ v.instance.registerSignal(
1155
+ s,
1156
+ i,
1157
+ k.call(s),
1158
+ p
1159
+ ), Object.defineProperty(s, l, {
1160
+ get() {
1161
+ return k.call(this);
1162
+ },
1163
+ set(_) {
1164
+ const U = k.call(this);
1165
+ z.call(this, _), v.instance.updateSignal(this, i, _, U);
1166
+ },
1167
+ enumerable: !0,
1168
+ configurable: !0
1169
+ });
1170
+ return;
1171
+ }
1172
+ const h = s[l];
1173
+ if (Reflect.deleteProperty(s, l), !We(h)) {
1174
+ h !== void 0 && console.warn(
1175
+ `[PraxisJS DevTools] @Debug() on "${p}.${l}": expected a computed() value but got ${typeof h}. Skipping.`
1176
+ ), s[l] = h;
1177
+ return;
1178
+ }
1179
+ let m;
1180
+ function u(k) {
1181
+ let z = !0, _ = k();
1182
+ const U = k.subscribe((W) => {
1183
+ if (z) {
1184
+ z = !1;
1185
+ return;
1186
+ }
1187
+ v.instance.updateSignal(s, i, W, _), _ = W;
1188
+ });
1189
+ return v.instance.registerSignal(s, i, _, p), U;
1190
+ }
1191
+ m = { computed: h, unsub: u(h) }, Object.defineProperty(s, l, {
968
1192
  get() {
969
- return u.call(this);
1193
+ return m.computed;
970
1194
  },
971
- set(p) {
972
- if (!h.has(this))
973
- h.add(this), c.call(this, p), g.instance.registerSignal(
974
- this,
975
- a,
976
- p,
977
- i
1195
+ set(k) {
1196
+ if (m.unsub(), !We(k)) {
1197
+ console.warn(
1198
+ `[PraxisJS DevTools] @Debug() on "${p}.${l}": expected a computed() value but got ${typeof k}. Skipping.`
978
1199
  );
979
- else {
980
- const x = u.call(this);
981
- c.call(this, p), g.instance.updateSignal(this, a, p, x);
1200
+ return;
982
1201
  }
1202
+ m = { computed: k, unsub: u(k) };
983
1203
  },
984
1204
  enumerable: !0,
985
1205
  configurable: !0
986
1206
  });
987
- return;
988
- }
989
- const s = /* @__PURE__ */ new WeakMap();
990
- Object.defineProperty(e, o, {
991
- get() {
992
- return s.get(this)?.computed;
993
- },
994
- set(u) {
995
- if (s.get(this)?.unsub(), !we(u)) {
996
- console.warn(
997
- `[PraxisJS DevTools] @Debug() on "${i}.${o}": expected a computed() value but got ${typeof u}. Skipping.`
998
- );
999
- return;
1000
- }
1001
- let c = !0, h = u();
1002
- const p = u.subscribe((x) => {
1003
- if (c) {
1004
- c = !1;
1005
- return;
1006
- }
1007
- g.instance.updateSignal(this, a, x, h), h = x;
1008
- });
1009
- s.set(this, { computed: u, unsub: p }), g.instance.registerSignal(this, a, h, i);
1010
- },
1011
- enumerable: !0,
1012
- configurable: !0
1013
1207
  });
1014
1208
  };
1015
1209
  }
1016
- function Ie() {
1017
- return function(t) {
1018
- const e = t.name, o = g.instance, r = t.prototype, i = r.render;
1019
- i && (r.render = function(...s) {
1020
- const u = performance.now(), c = i.call(this, ...s), h = performance.now() - u;
1021
- return o.recordRender(this, h), c;
1210
+ function Nn() {
1211
+ return function(r, t) {
1212
+ const e = r.name, n = v.instance, i = r.prototype, s = i.render;
1213
+ s && (i.render = function(...g) {
1214
+ const h = performance.now(), m = s.call(this, ...g), u = performance.now() - h;
1215
+ return n.recordRender(this, u), m;
1022
1216
  });
1023
- const a = r.onBeforeMount;
1024
- r.onBeforeMount = function(...s) {
1025
- return o.registerComponent(this, e), o.recordLifecycle(this, "onBeforeMount"), a?.call(this, ...s);
1217
+ const l = i.onBeforeMount;
1218
+ i.onBeforeMount = function(...g) {
1219
+ return n.registerComponent(this, e), n.recordLifecycle(this, "onBeforeMount"), l?.call(this, ...g);
1026
1220
  };
1027
- const l = [
1221
+ const p = [
1028
1222
  "onMount",
1029
1223
  "onUnmount",
1030
1224
  "onBeforeUpdate",
1031
1225
  "onUpdate",
1032
1226
  "onAfterUpdate"
1033
1227
  ];
1034
- for (const s of l) {
1035
- const u = r[s];
1036
- r[s] = function(...c) {
1037
- return o.recordLifecycle(this, s), u?.call(this, ...c);
1228
+ for (const g of p) {
1229
+ const h = i[g];
1230
+ i[g] = function(...m) {
1231
+ return n.recordLifecycle(this, g), h?.call(this, ...m);
1038
1232
  };
1039
1233
  }
1040
- return t;
1234
+ return r;
1041
1235
  };
1042
1236
  }
1043
1237
  export {
1044
- J as ComponentsPlugin,
1045
- Ce as Debug,
1046
- Se as DevTools,
1047
- g as Registry,
1048
- ee as SignalsPlugin,
1049
- se as TimelinePlugin,
1050
- Ie as Trace
1238
+ Zt as ComponentsPlugin,
1239
+ Dn as Debug,
1240
+ En as DevTools,
1241
+ v as Registry,
1242
+ Qt as SignalsPlugin,
1243
+ en as TimelinePlugin,
1244
+ Nn as Trace
1051
1245
  };