/** @license Copyright (c) 2025 trading_peter This program is available under Apache License Version 2.0 */ import '@tp/tp-timeout-strip/tp-timeout-strip.js'; import { LitElement, html, css } from 'lit'; class TpFlowNodePort extends LitElement { static get styles() { return [ css` :host { display: block; position: relative; } .connectionPoint { width: 12px; height: 12px; background: #666; border-radius: 50%; cursor: pointer; } .connectionPoint:hover { background: #888; } .tag { position: absolute; background: #888; visibility: hidden; pointer-events: none; } :host([portType="input"]) .tag { left: 0; top: 0; transform: translateX(calc(-100% - 10px)); } :host([portType="output"]) .tag { right: 0; top: 0; transform: translateX(calc(100% + 10px)); } :host(:hover) .tag, .tag[visible] { visibility: visible; pointer-events: all; } ` ]; } render() { const { showTag, errorMsg, tagContent } = this; return html`
${showTag || Boolean(tagContent) ? html`