openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
1 lines • 4.63 kB
JavaScript
import{n as e,r as t}from"./rolldown-runtime-CNOWq4Kh.js";import{lo as n}from"./control-ui-connection-Bfj9beF_.js";import{By as r,Fj as i,Fv as a,Gy as o,Jy as s,Ky as c,Pv as l,Qy as u,Uy as d,Vy as f,Wy as p,Yy as m,Zy as h,jA as g,kA as _}from"./control-ui-boot-shared-DFTSUQQ0.js";import{Rt as v,u as y,x as b,y as x}from"./solid-runtime-C416s-HC.js";var S;function C(){return(C=e((()=>{S=`:host,openclaw-tooltip,openclaw-tooltip-provider{display:contents}.tooltip-surface{--oc-overlay-distance:8px;max-width:var(--openclaw-tooltip-max-width,min(260px, calc(100vw - 16px)));border:1px solid var(--openclaw-tooltip-border-color,var(--overlay-border,var(--border-strong)));border-radius:var(--openclaw-tooltip-border-radius,var(--radius-md));max-height:min(420px,100dvh - 16px);padding:var(--openclaw-tooltip-padding,5px 7px);background:var(--openclaw-tooltip-background-color,color-mix(in srgb, var(--bg-elevated) 97%, var(--text) 3%));color:var(--text);box-shadow:var(--openclaw-tooltip-shadow,var(--overlay-shadow,var(--shadow-md)));font-family:var(--font-body);overflow-wrap:anywhere;pointer-events:none;-webkit-user-select:none;user-select:none;opacity:0;transition:opacity var(--openclaw-tooltip-popup-hide-duration,var(--control-ui-transition-fast)) ease, scale var(--openclaw-tooltip-popup-hide-duration,var(--control-ui-transition-fast)) ease, display var(--openclaw-tooltip-popup-hide-duration,var(--control-ui-transition-fast)) allow-discrete, overlay var(--openclaw-tooltip-popup-hide-duration,var(--control-ui-transition-fast)) allow-discrete;font-size:11px;font-weight:500;line-height:1.25;position:fixed;inset:auto;overflow:auto;scale:.9}.tooltip-surface:popover-open:where(:not([data-phase=closing])){opacity:1;transition-duration:var(--openclaw-tooltip-popup-show-duration,var(--control-ui-transition-fast));scale:1}@starting-style{.tooltip-surface:popover-open{opacity:0;scale:.9}}:host(.sidebar-hover-tooltip) .tooltip-surface[data-phase=opening]{animation:var(--openclaw-tooltip-open-animation)}.tooltip-content{text-align:center;white-space:pre-line;display:block}.tooltip-rich-content{pointer-events:inherit;text-align:left;display:block}@media (prefers-reduced-motion:reduce){.tooltip-surface{--openclaw-tooltip-popup-show-duration:0s;--openclaw-tooltip-popup-hide-duration:0s;transition:none}.tooltip-surface[data-phase=opening],.tooltip-surface[data-phase=closing],:host(.sidebar-hover-tooltip) .tooltip-surface[data-phase=opening]{animation:none}}@keyframes openclaw-tooltip-hover-card-in{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}`})))()}var w=t({mountTooltipView:()=>T});function T(e,t,r,c){let l=e.ownerDocument.createElement(`span`);l.className=`tooltip-content`,t.insertBefore(l,r),l.textContent=e.content;let u,d=null,m,g=o(`tooltip`,void 0,{exclusiveGroup:`tooltip`,dismissOutsidePointer:!1,dismissOutsideFocus:!1,dismissEscape:!1,reflectTriggerExpanded:!1,isValid:()=>!e.disabled&&!!c.trigger?.isConnected,acquireOcclusion:h,onInteraction:(e,t)=>c.handleInteraction(e,t),interactionElements:()=>c.trigger?[c.trigger]:[],onRootChange:t=>t===e.shadowRoot?p(t,[f,S,a]):void 0});g.bindSurface(t),g.setParent(i(c.trigger??e));let _=g.subscribe(e=>c.acceptedOpen(e)),v=[`overlay-after-show`,`overlay-after-hide`].map(r=>n(t,r,n=>{n.target===t&&(n.stopPropagation(),e.dispatchEvent(new CustomEvent(r,{bubbles:!0,composed:!0,cancelable:n.cancelable}))||n.preventDefault())})),y=()=>{let e=c.trigger;if(!e)return;let n=c.resolvedPlacement;(e!==d||n!==m)&&(u??=s(t),u.update(e,n),d=e,m=n),t.setAttribute(`placement`,n)};return{request(e){let t=c.trigger;return e&&t&&g.setParent(i(t)),g.bindTrigger(t instanceof HTMLElement?t:void 0),y(),g.request(e)},update(){l.textContent=e.content,g.open&&y()},retire:()=>g.retire(),dispose(){_(),g.dispose(),u?.dispose(),l.remove();for(let e of v)e()}}}var E,D;function O(){return(O=e((()=>{y(),u(),m(),c(),g(),d(),l(),r(),C(),E=b(`<openclaw-tooltip>`,1),D=Object.assign(function(e){var t=E();return x(t,[e,{get"prop:content"(){return e.content??``},get"prop:placement"(){return e.placement},get"prop:closeDelay"(){return e.closeDelay??100},get"prop:hoverDismissDelay"(){return e.hoverDismissDelay},get"prop:delay"(){return e.delay},get"prop:describe"(){return e.describe??!0},get"prop:descriptionTarget"(){return e.descriptionTarget},get"prop:pointerThrough"(){return e.pointerThrough??!1},get"prop:autoSize"(){return e.autoSize??!1},get"prop:disabled"(){return e.disabled??!1},get"prop:openOnClick"(){return e.openOnClick??!1},get"prop:anchor"(){return e.anchor??null}}],!1),t._$owner=v(),t},{Element:_})})))()}export{O as n,w as r,D as t};