UNPKG

@kontent-ai/smart-link

Version:

Kontent.ai Smart Link SDK allowing to automatically inject [smart links](https://docs.kontent.ai/tutorials/develop-apps/build-strong-foundation/set-up-editing-from-preview#a-using-smart-links) to Kontent.ai according to manually specified [HTML data attri

37 lines (36 loc) 1.32 kB
import { HighlightType } from "../utils/dataAttributes/elementHighlight"; import { type ParseResult } from "../utils/dataAttributes/parser"; import { KSLPositionedElement } from "./abstract/KSLPositionedElement"; interface IKSLHighlightElementEventData { readonly data: ParseResult; readonly targetNode: HTMLElement; } export type KSLHighlightElementEvent = CustomEvent<IKSLHighlightElementEventData>; declare global { interface WindowEventMap { "ksl:highlight:edit": KSLHighlightElementEvent; } interface HTMLElementEventMap { "ksl:highlight:edit": KSLHighlightElementEvent; } } export declare class KSLHighlightElement extends KSLPositionedElement { static get is(): "ksl-highlight"; get type(): HighlightType; get selected(): boolean; set selected(value: boolean); private readonly editButtonRef; constructor(); static initializeTemplate(): HTMLTemplateElement; private static getEditButtonTooltip; connectedCallback(): void; disconnectedCallback(): void; attachTo: (node: HTMLElement) => void; adjustPosition: () => void; private unregisterTargetNodeListeners; private handleTargetNodeMouseEnter; private handleTargetNodeMouseLeave; private handleEditButtonClick; private dispatchEditEvent; } export {};