@plitzi/plitzi-sdk 0.37.10 → 0.38.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.
@@ -362,7 +362,7 @@ return te("div",e?N?{className:"flex h-full min-h-0 w-full flex-col",onKeyDown:L
362
362
  /* @__PURE__ */te("span",{className:"max-w-md text-xs leading-relaxed",children:["This page was rendered on the server first. React's Profiler doesn't run during server rendering, so there's no per-element timing for it — this commit marks that baseline. Commit #",y," ","is the client ",
363
363
  /* @__PURE__ */ee("span",{className:"font-medium text-violet-600 dark:text-violet-400",children:"hydration"})," of this tree."]}),
364
364
  /* @__PURE__ */te("span",{className:"text-[11px] opacity-70",children:[N.elementCount," elements in the rendered tree"]})]}),"ranked"===s&&w&&/* @__PURE__ */ee(ao,{commit:N,model:w,active:C,origin:$,sidebarOpen:m,onSelectElement:T,onToggleSidebar:I}),"flamegraph"===s&&w&&/* @__PURE__ */ee(_s,{commit:N,model:w,active:C,origin:$,sidebarOpen:m,onSelectElement:T,onToggleSidebar:I}),"hotspots"===s&&/* @__PURE__ */ee(Ys,{commits:a,tree:r,flat:i,selectedId:x,onSelectElement:T})]}:{className:"flex h-full min-h-0 w-full flex-col",children:[/* @__PURE__ */ee(no,{view:s,persist:d,commitCount:a.length,onClear:n,onViewChange:o,onPersistChange:c}),/* @__PURE__ */te("div",{className:"flex grow flex-col items-center justify-center gap-2 text-zinc-400 dark:text-zinc-500",children:[/* @__PURE__ */ee("i",{className:"fa-solid fa-chart-column text-3xl opacity-20"}),/* @__PURE__ */ee("span",{className:"text-xs",children:"No commits recorded yet — interact with the page"})]})]}:{className:"flex h-full w-full flex-col items-center justify-center gap-2 text-zinc-400 dark:text-zinc-500",children:[/* @__PURE__ */ee("i",{className:"fa-solid fa-gauge-high text-3xl opacity-20"}),/* @__PURE__ */ee("span",{className:"text-xs",children:"Enable debugMode to record render tracing"})]})},lo=({className:e,type:t,preffix:a,value:r})=>/* @__PURE__ */te("div",{className:p("flex items-center gap-1.5",e),children:[a&&/* @__PURE__ */ee("span",{className:"shrink-0 text-[10px] font-medium tracking-wider text-zinc-400 uppercase dark:text-zinc-500",children:a}),"color"===t&&/* @__PURE__ */ee("div",{className:"h-3.5 w-3.5 shrink-0 rounded-sm border border-zinc-300 dark:border-zinc-600",title:r,style:{backgroundColor:r}}),
365
- /* @__PURE__ */ee("span",{className:p("truncate font-mono",{"text-zinc-700 dark:text-zinc-300":"color"===t,"text-violet-700 dark:text-violet-300":"color"!==t}),title:r,children:r??"—"})]}),so=({name:e,type:t,value:a=""})=>/* @__PURE__ */te("div",{className:"grid grid-cols-[1fr_1.5fr] items-center border-b border-zinc-100 px-3 py-1.5 transition-colors hover:bg-zinc-50 dark:border-zinc-800 dark:hover:bg-zinc-800/60",children:[/* @__PURE__ */te("div",{className:"flex min-w-0 flex-col gap-0.5 pr-2",children:[/* @__PURE__ */ee("span",{className:"truncate font-medium text-zinc-800 dark:text-zinc-200",title:e,children:e}),/* @__PURE__ */ee("span",{className:"text-[10px] tracking-wider text-zinc-400 uppercase dark:text-zinc-600",children:t})]}),/* @__PURE__ */te("div",{className:"flex min-w-0 flex-col gap-0.5",children:[("string"==typeof a||"number"==typeof a)&&/* @__PURE__ */ee(lo,{type:t,value:a}),"object"==typeof a&&Object.keys(a).map((e,r)=>/* @__PURE__ */ee(lo,{type:t,preffix:`${e}:`,value:a[e]},r))]})]}),oo=({variables:e,variablesParsed:t})=>e&&0!==e.length?/* @__PURE__ */te("div",{className:"w-full overflow-hidden rounded border border-zinc-200 dark:border-zinc-700",children:[/* @__PURE__ */te("div",{className:"grid grid-cols-[1fr_1.5fr] border-b border-zinc-200 bg-zinc-50 px-3 py-1 text-zinc-400 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-500",children:[/* @__PURE__ */ee("span",{className:"text-[10px] font-semibold tracking-wider uppercase",children:"Name"}),/* @__PURE__ */ee("span",{className:"text-[10px] font-semibold tracking-wider uppercase",children:"Value"})]}),e.map((e,a)=>/* @__PURE__ */ee(so,{name:e.name,type:e.type,value:t?.[e.name]},a))]}):/* @__PURE__ */ee("div",{className:"py-4 text-center text-xs text-zinc-400 italic dark:text-zinc-600",children:"No variables defined"}),co=({variables:e})=>{let t=Q(()=>Object.keys(e??{}).reduce((t,a)=>{let r=e?.[a];return r&&Object.keys(r).forEach(e=>{t.push({name:e,type:"color"===a?"color":"text",value:r[e]})}),t},[]),[e]);return 0===t.length?/* @__PURE__ */ee("div",{className:"py-4 text-center text-xs text-zinc-400 italic dark:text-zinc-600",children:"No style variables defined"}):/* @__PURE__ */te("div",{className:"w-full overflow-hidden rounded border border-zinc-200 dark:border-zinc-700",children:[/* @__PURE__ */te("div",{className:"grid grid-cols-[1fr_1.5fr] border-b border-zinc-200 bg-zinc-50 px-3 py-1 text-zinc-400 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-500",children:[/* @__PURE__ */ee("span",{className:"text-[10px] font-semibold tracking-wider uppercase",children:"Name"}),/* @__PURE__ */ee("span",{className:"text-[10px] font-semibold tracking-wider uppercase",children:"Value"})]}),t.map((e,t)=>/* @__PURE__ */ee(so,{name:e.name,type:e.type,value:e.value},t))]})},mo=()=>{let[[e,t,a]]=S(["schema.variables","style.variables","runtime.sources.variables"]);/* @__PURE__ */
365
+ /* @__PURE__ */ee("span",{className:p("truncate font-mono",{"text-zinc-700 dark:text-zinc-300":"color"===t,"text-violet-700 dark:text-violet-300":"color"!==t}),title:r,children:r??"—"})]}),so=({name:e,type:t,value:a=""})=>/* @__PURE__ */te("div",{className:"grid grid-cols-[1fr_1.5fr] items-center border-b border-zinc-100 px-3 py-1.5 transition-colors hover:bg-zinc-50 dark:border-zinc-800 dark:hover:bg-zinc-800/60",children:[/* @__PURE__ */te("div",{className:"flex min-w-0 flex-col gap-0.5 pr-2",children:[/* @__PURE__ */ee("span",{className:"truncate font-medium text-zinc-800 dark:text-zinc-200",title:e,children:e}),/* @__PURE__ */ee("span",{className:"text-[10px] tracking-wider text-zinc-400 uppercase dark:text-zinc-600",children:t})]}),/* @__PURE__ */te("div",{className:"flex min-w-0 flex-col gap-0.5",children:[("string"==typeof a||"number"==typeof a)&&/* @__PURE__ */ee(lo,{type:t,value:a}),"object"==typeof a&&Object.keys(a).map((e,r)=>/* @__PURE__ */ee(lo,{type:t,preffix:`${e}:`,value:a[e]},r))]})]}),oo=({variables:e,variablesParsed:t})=>e&&0!==e.length?/* @__PURE__ */te("div",{className:"w-full overflow-hidden rounded border border-zinc-200 dark:border-zinc-700",children:[/* @__PURE__ */te("div",{className:"grid grid-cols-[1fr_1.5fr] border-b border-zinc-200 bg-zinc-50 px-3 py-1 text-zinc-400 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-500",children:[/* @__PURE__ */ee("span",{className:"text-[10px] font-semibold tracking-wider uppercase",children:"Name"}),/* @__PURE__ */ee("span",{className:"text-[10px] font-semibold tracking-wider uppercase",children:"Value"})]}),e.map((e,a)=>/* @__PURE__ */ee(so,{name:e.name,type:e.type,value:t?.[e.name]},a))]}):/* @__PURE__ */ee("div",{className:"py-4 text-center text-xs text-zinc-400 italic dark:text-zinc-600",children:"No variables defined"}),co=({variables:e})=>{let t=Q(()=>Object.entries(e??{}).reduce((e,[t,a])=>(Object.keys(a).forEach(r=>{e.push({name:r,type:"color"===t?"color":"text",value:a[r]})}),e),[]),[e]);return 0===t.length?/* @__PURE__ */ee("div",{className:"py-4 text-center text-xs text-zinc-400 italic dark:text-zinc-600",children:"No style variables defined"}):/* @__PURE__ */te("div",{className:"w-full overflow-hidden rounded border border-zinc-200 dark:border-zinc-700",children:[/* @__PURE__ */te("div",{className:"grid grid-cols-[1fr_1.5fr] border-b border-zinc-200 bg-zinc-50 px-3 py-1 text-zinc-400 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-500",children:[/* @__PURE__ */ee("span",{className:"text-[10px] font-semibold tracking-wider uppercase",children:"Name"}),/* @__PURE__ */ee("span",{className:"text-[10px] font-semibold tracking-wider uppercase",children:"Value"})]}),t.map((e,t)=>/* @__PURE__ */ee(so,{name:e.name,type:e.type,value:e.value},t))]})},mo=()=>{let[[e,t,a]]=S(["schema.variables","style.variables","runtime.sources.variables"]);/* @__PURE__ */
366
366
  return te("div",{className:"flex w-full flex-col gap-4 overflow-y-auto p-3",children:[/* @__PURE__ */te("section",{className:"flex flex-col gap-1.5",children:[/* @__PURE__ */te("div",{className:"flex items-center gap-2 text-[10px] font-semibold tracking-wider text-zinc-400 uppercase dark:text-zinc-500",children:[/* @__PURE__ */ee("i",{className:"fa-solid fa-code"}),"Schema Variables"]}),/* @__PURE__ */ee(oo,{variables:e,variablesParsed:a})]}),/* @__PURE__ */te("section",{className:"flex flex-col gap-1.5",children:[/* @__PURE__ */te("div",{className:"flex items-center gap-2 text-[10px] font-semibold tracking-wider text-zinc-400 uppercase dark:text-zinc-500",children:[/* @__PURE__ */ee("i",{className:"fa-solid fa-palette"}),"Style Variables"]}),/* @__PURE__ */ee(co,{variables:t})]})]})},po=({className:e,tabSelected:t,orientation:a,logTypeFilter:r,elementSelected:n,onSelectElement:i,qa:l=!1})=>{let{logs:s,clearLogs:o}=q(M);/* @__PURE__ */
367
367
  return ee("div",{className:p("flex h-full w-full grow overflow-auto bg-white dark:bg-zinc-900",e),children:/* @__PURE__ */te("div",{className:"flex w-full flex-col",children:["logs"===t&&/* @__PURE__ */ee(Tl,{items:s,orientation:a,logTypeFilter:r,onClear:o}),"store"===t&&/* @__PURE__ */ee(fs,{elementSelected:n}),"cache"===t&&/* @__PURE__ */ee(ni,{}),"history"===t&&/* @__PURE__ */ee(Di,{}),"variables"===t&&/* @__PURE__ */ee(mo,{}),"flags"===t&&/* @__PURE__ */ee(Li,{}),"elements"===t&&/* @__PURE__ */ee($i,{elementSelected:n,onSelectElement:i}),"plugins"===t&&/* @__PURE__ */ee(Ml,{}),"tracing"===t&&/* @__PURE__ */ee(io,{}),"actions"===t&&/* @__PURE__ */ee(On,{}),l&&"qa"===t&&/* @__PURE__ */ee(is,{})]})})},uo=({className:e,iconClassName:t,title:a,isSelected:r=!1,onClick:n})=>/* @__PURE__ */ee("button",{className:p("flex h-6 w-6 cursor-pointer items-center justify-center rounded transition-colors",{"bg-violet-500/10 text-violet-600 dark:bg-violet-500/20 dark:text-violet-400":r,"text-zinc-500 hover:bg-zinc-200 hover:text-zinc-900 dark:text-zinc-400 dark:hover:bg-zinc-700 dark:hover:text-zinc-100":!r},e),title:a,onClick:n,children:/* @__PURE__ */ee("i",{className:p("text-xs",t)})}),ho={system:"light",light:"dark",dark:"system"},xo={system:"fa-solid fa-desktop",light:"fa-solid fa-sun",dark:"fa-solid fa-moon"},fo={system:"System",light:"Light",dark:"Dark"},go=()=>{let{theme:e,setTheme:t}=$(),a=U(()=>t(ho[e]),[e,t]);/* @__PURE__ */
368
368
  return ee(uo,{iconClassName:xo[e],title:`Theme: ${fo[e]} — click for ${fo[ho[e]]}`,onClick:a})},vo=[{id:"logs",label:"Logs",icon:"fa-solid fa-terminal"},{id:"store",label:"Store",icon:"fa-solid fa-database"},{id:"cache",label:"Cache",icon:"fa-solid fa-hourglass-half"},{id:"history",label:"History",icon:"fa-solid fa-clock-rotate-left"},{id:"elements",label:"Elements",icon:"fa-solid fa-layer-group"},{id:"variables",label:"Variables",icon:"fa-solid fa-code"},{id:"flags",label:"Flags",icon:"fa-solid fa-flag"},{id:"plugins",label:"Plugins",icon:"fa-solid fa-puzzle-piece"},{id:"tracing",label:"Tracing",icon:"fa-solid fa-gauge-high"},{id:"actions",label:"Actions",icon:"fa-solid fa-bolt"},{id:"qa",label:"QA",icon:"fa-solid fa-ruler-combined"}],bo=({tabSelected:e,orientation:t="vertical",onChangeOrientation:a,onCollapse:r,onTabSelect:n,qa:i=!1})=>{let l=i?vo:vo.filter(e=>"qa"!==e.id),{options:s,value:o,onSelect:d}=ai(),c=U(()=>{a?.("horizontal"===t?"vertical":"horizontal")},[t,a]),m=U(e=>()=>n?.(e),[n]),u=U(e=>d(e.target.value),[d]);/* @__PURE__ */