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

36 lines (35 loc) 1.27 kB
export type KSLPublicConfiguration = Readonly<{ /** * When it's set to `true`, enables all debug logs. */ debug: boolean; /** * Default values for data attributes, which are only used when those data attributes * are not found in DOM during data attributes parsing process. */ defaultDataAttributes: DefaultDataAttributes; /** * When it's set to `true`, iframe communication will always be enabled, * even when outside Web Spotlight. */ forceWebSpotlightMode: boolean; /** * Name of the query parameter that should be present in the URL to enable the SDK. Query parameter is only used * outside Web Spotlight. */ queryParam: string; }>; export type KSLPrivateConfiguration = Readonly<{ /** * When it's set to `true`, enables iframe communication instead of redirects. */ isInsideWebSpotlight: boolean; }>; export type KSLConfiguration = KSLPublicConfiguration & KSLPrivateConfiguration; type DefaultDataAttributes = Readonly<{ languageCodename?: string; environmentId?: string; }>; export declare const defaultConfiguration: KSLConfiguration; export declare function isInsideWebSpotlightPreviewIFrame(configuration: KSLConfiguration): boolean; export {};