import { html, GemElement, customElement, connectStore } from '@mantou/gem'; import { WINDOW_HOVER_DETECT_BORDER, WINDOW_HOVER_DETECT_HEADER_HEIGHT } from '../lib/const'; import { store } from '../lib/store'; import { theme } from '../lib/theme'; const sides = ['top', 'right', 'bottom', 'left'] as const; export type HoverWindowPosition = typeof sides[number] | 'center' | 'header'; @customElement('gem-panel-mask') @connectStore(store) export class GemPanelMaskElement extends GemElement { render = () => { const position = store.hoverWindowPosition; const headerHeight = store.hoverWindow?.engross ? 0 : WINDOW_HOVER_DETECT_HEADER_HEIGHT; return html` ${position === 'header' || position === 'center' ? html`
` : html` ${sides.map((e) => html``)} `} `; }; }