openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
1 lines • 6.01 kB
JavaScript
import{n as e}from"./rolldown-runtime-CNOWq4Kh.js";import{F as t,U as n,d as r,f as i,gt as a,j as o,u as s,x as c}from"./solid-runtime-C416s-HC.js";import{n as l,r as u}from"./tabs-B8AO2cOS.js";function d(){return(d=e((()=>{})))()}function f(e,t,n){h={hubId:e,tab:t,at:Date.now(),source:n}}function p(e,t,n){if(!(n instanceof HTMLElement)||h?.hubId!==e||h.tab!==t)return;let r=h;Date.now()-r.at>m?h=null:queueMicrotask(()=>{if(h!==r)return;h=null;let e=n.ownerDocument.activeElement;n.isConnected&&Date.now()-r.at<=m&&(e===r.source||e===n.ownerDocument.body||e===n.ownerDocument.documentElement)&&n.focus()})}var m,h;function g(){return(g=e((()=>{m=2e3,h=null})))()}var _;function v(){return(v=e((()=>{_=`.hub-tabs{--track-color:color-mix(in srgb, var(--border) 60%, transparent);--indicator-color:var(--accent);min-block-size:min-content;box-shadow:inset 0 -2px 0 var(--track-color);align-items:stretch;gap:var(--space-2);padding-block-end:2px;display:flex;overflow-x:auto}.hub-tabs--sub{gap:var(--space-1)}.hub-tab{font-size:var(--control-ui-text-sm);color:var(--muted);transition:color var(--duration-normal) var(--ease-out);padding:var(--space-1) var(--space-2) var(--space-2);align-items:center;gap:6px;font-weight:550;display:inline-flex}.hub-tabs--sub .hub-tab{font-size:var(--control-ui-text-xs);padding:3px var(--space-2) var(--space-1);font-weight:550}.hub-tab__badge{border-radius:var(--radius-full);background:var(--bg-hover);min-height:16px;color:var(--muted);align-items:center;padding:0 5px;font-size:10px;font-weight:700;line-height:1;display:inline-flex}.hub-tab[active] .hub-tab__badge{background:var(--accent-subtle);color:var(--accent)}@media (hover:hover){.hub-tab:hover{color:var(--text)}}.hub-tab[active]{color:var(--text-strong);box-shadow:0 2px 0 var(--indicator-color)}.hub-tab:focus-visible{border-radius:var(--radius-sm);box-shadow:0 0 0 2px color-mix(in srgb, var(--accent) 22%, transparent);outline:none}.hub-tab[active]:focus-visible{box-shadow:0 2px 0 var(--indicator-color), 0 0 0 2px color-mix(in srgb, var(--accent) 22%, transparent)}@media (forced-colors:active){.hub-tab[active]{text-underline-offset:4px;text-decoration-line:underline;text-decoration-thickness:2px}.hub-tab:focus-visible{outline-offset:-2px;outline:2px solid highlight}}.content-header.hub-page-header{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);display:grid}.content-header.hub-page-header--stacked{align-items:end;row-gap:var(--space-2);width:100%;max-width:1120px;max-height:none;padding-inline:var(--settings-header-inline-padding,var(--space-4));grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"title actions""tabs tabs";margin-inline:auto}.content-header.hub-page-header--untabbed{grid-template-areas:"title actions"}.content-header.hub-page-header--wide{max-width:none;padding-inline:0}.content-header.hub-page-header--stacked .hub-page-header__title{grid-area:title;justify-self:start}.content-header.hub-page-header--stacked .page-title{font-size:26px}.content-header.hub-page-header--stacked .hub-page-header__tabs{padding-block:var(--space-2);grid-area:tabs;justify-self:start}.content-header.hub-page-header--stacked .hub-page-header__actions{grid-area:actions}.content-header.hub-page-header--stacked+.settings-workspace{margin-top:0}.hub-page-header__title,.hub-page-header__actions{min-width:0}.hub-page-header__actions{justify-self:end}@media (width>=769px) and (width<=1100px){.content-header.hub-page-header{row-gap:var(--space-2);grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"title actions""tabs tabs";max-height:none}.hub-page-header__title{grid-area:title}.hub-page-header__tabs{grid-area:tabs;justify-self:center}.hub-page-header__actions{grid-area:actions}}@media (width<=768px),(width<=932px) and (height<=500px) and (orientation:landscape){.content-header.hub-page-header{justify-items:center;row-gap:var(--space-2);grid-template-columns:minmax(0,1fr);grid-template-areas:"intro""tabs""actions";max-height:none;display:grid}.hub-page-header .hub-page-header__title{grid-area:intro;justify-self:stretch}.hub-page-header .hub-page-header__tabs{grid-area:tabs}.hub-page-header .hub-page-header__actions{grid-area:actions;justify-self:center}.content-header.hub-page-header--stacked{grid-template-areas:"title""tabs""actions";justify-items:stretch}.content-header.hub-page-header--untabbed{grid-template-areas:"title""actions"}.content-header.hub-page-header--stacked .hub-page-header__title{grid-area:title}.content-header.hub-page-header--stacked .hub-page-header__actions{justify-self:end}.content-header.hub-page-header--stacked .page-title{font-size:22px}}@media (width<=640px){.content.content--hub-header{--content-inline-padding:var(--space-3);--settings-header-inline-padding:0;padding:var(--space-3) var(--space-3) var(--space-4)}.content.content--hub-header .content-header.hub-page-header{padding-inline:0}}`})))()}function y(e){let n=t(()=>e.tabs.map(t=>({value:t.value,id:`${e.id}-tab-${t.value}`,panelId:e.panelId,disabled:t.disabled,testId:t.testId,className:[`hub-tab`,{"oc-segmented-item":e.carapace}],label:[i(()=>t.label),i(()=>i(()=>t.count==null)()?null:(()=>{var e=b();return r(e,()=>t.count),e})()),i(()=>i(()=>t.badge==null)()?null:(()=>{var e=x();return r(e,()=>t.badge),e})())]}))),s;return a(()=>{e.active!==null&&p(e.id,e.active,s(e.active))}),o(l,{ref:(e,t)=>{s=t},get id(){return`${e.id}-tabs`},shadowStyles:[_],get items(){return n()},get active(){return e.active},activation:`manual`,get ariaLabel(){return e.ariaLabel},get class(){return[`hub-tabs`,`hub-tabs--${e.variant??`primary`}`,`${e.id}-hub-tabs`,{"oc-segmented":e.carapace},e.class]},onActivate:(t,n,r)=>{let i=e.tabs.find(e=>e.value===t);return!i||i.value===e.active||(r instanceof KeyboardEvent&&f(e.id,i.value,n),e.onSelect(i.value),e.onActivate?.(n)),!1}})}var b,x;function S(){return(S=e((()=>{s(),n(),g(),u(),v(),b=c(`<span class="hub-tab__badge hub-tab__badge--count">`),x=c(`<span class=hub-tab__badge>`)})))()}export{S as n,d as r,y as t};