import { LitElement, PropertyValues, TemplateResult } from "lit"; import { CallbackHitType, CallbackHits, ForesightElement, ForesightElementState, ForesightEvent, ForesightManagerData, ForesightManagerSettings, ForesightPoint, HitSlop, ScrollDirection, UpdatedManagerSetting } from "js.foresight"; //#region src/types/types.d.ts type DeepPartial = T extends object ? { [P in keyof T]?: DeepPartial } : T; type ShowSettings = { /** * Show the debugger control panel. * @default true */ controlPanel: boolean; /** * Show name tags above each registered element. * @default true */ nameTags: boolean; /** * Show element hit-slop overlays (the expanded boundary around each registered element). * * Note: turning this off also hides name tags, since the labels live inside * the same overlay host. * * @default true */ elementOverlays: boolean; /** * Show the predicted mouse trajectory line. * @default true */ mouseTrajectory: boolean; /** * Show the predicted scroll trajectory line. * @default true */ scrollTrajectory: boolean; }; type ShowKey = keyof ShowSettings; type DevtoolsSettings = { /** * Granular visibility flags for the devtools UI. * * @link https://foresightjs.com/docs/getting_started/debug */ show: ShowSettings; /** * Determines if the debugger control panel should be initialized in a minimized state. * * @link https://foresightjs.com/docs/getting_started/debug * * @default false */ isControlPanelDefaultMinimized: boolean; /** * Specifies the default sorting order for the list of registered elements in the debugger panel. * - `'visibility'`: Sorts elements by their viewport visibility (visible elements first), * with a secondary documentOrder sort. * - `'documentOrder'`: Sorts elements based on their order of appearance in the * document's structure (matching the HTML source). * - `'insertionOrder'`: Sorts by registration order. * * * @link https://foresightjs.com/docs/getting_started/debug * * @default 'visibility' * */ sortElementList: SortElementList; logging: LogEvents & { logLocation: LoggingLocations; }; }; type LogEvents = { [K in ForesightEvent]: boolean }; type LoggingLocations = "controlPanel" | "console" | "both" | "none"; type SortElementList = "documentOrder" | "visibility" | "insertionOrder"; type DebuggerBooleanSettingKeys = ShowKey; //#endregion //#region src/lit-entry/control-panel/base-tab/chip.d.ts declare class ChipElement extends LitElement { static styles: any[]; title: string; render(): any; } declare global { interface HTMLElementTagNameMap { "chip-element": ChipElement; } } //# sourceMappingURL=chip.d.ts.map //#endregion //#region src/lit-entry/control-panel/base-tab/tab-content.d.ts declare class TabContent extends LitElement { static styles: any[]; noContentMessage: string; hasContent: boolean; render(): any; } declare global { interface HTMLElementTagNameMap { "tab-content": TabContent; } } //# sourceMappingURL=tab-content.d.ts.map //#endregion //#region src/lit-entry/control-panel/base-tab/tab-header.d.ts declare class TabHeader extends LitElement { static styles: any[]; render(): any; } declare global { interface HTMLElementTagNameMap { "tab-header": TabHeader; } } //# sourceMappingURL=tab-header.d.ts.map //#endregion //#region src/lit-entry/control-panel/dropdown/base-dropdown.d.ts type DropdownOption = { value: string; label: string; title: string; icon: TemplateResult; }; declare abstract class BaseDropdown extends LitElement { private static currentlyOpen; static styles: any[]; protected isDropdownOpen: boolean; dropdownOptions: DropdownOption[]; connectedCallback(): void; disconnectedCallback(): void; protected _toggleDropdown: (event: MouseEvent) => void; protected _closeDropdown(): void; protected _positionDropdown(): void; protected _handleOutsideClick: (event: MouseEvent) => void; protected abstract _handleOptionClick(option: DropdownOption): void; protected abstract _getTriggerIcon(): TemplateResult; protected abstract _isOptionSelected(option: DropdownOption): boolean; protected abstract _getTriggerTitle(): string; protected abstract _getTriggerLabel(): string; render(): any; } //#endregion //#region src/lit-entry/control-panel/dropdown/single-select-dropdown.d.ts declare class SingleSelectDropdown extends BaseDropdown { selectedOptionValue: string; onSelectionChange?: (value: string) => void; connectedCallback(): void; willUpdate(changedProperties: Map): void; protected _handleOptionClick(option: DropdownOption): void; protected _getTriggerIcon(): TemplateResult; protected _isOptionSelected(option: DropdownOption): boolean; protected _getTriggerTitle(): string; protected _getTriggerLabel(): string; private _getSelectedOption; } declare global { interface HTMLElementTagNameMap { "single-select-dropdown": SingleSelectDropdown; } } //# sourceMappingURL=single-select-dropdown.d.ts.map //#endregion //#region src/lit-entry/control-panel/copy-icon/copy-icon.d.ts declare class CopyIcon extends LitElement { static styles: any; title: string; onCopy?: (event: MouseEvent) => Promise | void; private isCopied; private copyTimeout; private handleClick; disconnectedCallback(): void; render(): any; } declare global { interface HTMLElementTagNameMap { "copy-icon": CopyIcon; } } //# sourceMappingURL=copy-icon.d.ts.map //#endregion //#region src/lit-entry/control-panel/base-tab/expandable-item.d.ts declare class ExpandableItem extends LitElement { static styles: any[]; borderColor: string; showCopyButton: boolean; itemId: string; isExpanded: boolean; onToggle: ((itemId: string) => void) | undefined; private toggleExpand; private handleCopy; render(): any; } declare global { interface HTMLElementTagNameMap { "expandable-item": ExpandableItem; } } //# sourceMappingURL=expandable-item.d.ts.map //#endregion //#region src/lit-entry/control-panel/element-tab/reactivate-countdown.d.ts declare class ReactivateCountdown extends LitElement { static styles: any[]; element: ForesightElement; state: ForesightElementState; private remainingTime; private isCountdownActive; private intervalId; private startTime; private lastDisplayedTime; private countdownForElement; private countdownReactivateAfter; connectedCallback(): void; disconnectedCallback(): void; willUpdate(changedProperties: Map): void; private checkAndStartCountdown; private startCountdown; private clearCountdown; private handleTimerClick; private formatTime; render(): any; } declare global { interface HTMLElementTagNameMap { "reactivate-countdown": ReactivateCountdown; } } //# sourceMappingURL=reactivate-countdown.d.ts.map //#endregion //#region src/lit-entry/control-panel/element-tab/single-element.d.ts declare class SingleElement extends LitElement { static styles: any[]; element: ForesightElement; state: ForesightElementState; isExpanded: boolean; onToggle: ((elementId: string) => void) | undefined; private currentDeviceStrategy; private _abortController; connectedCallback(): void; disconnectedCallback(): void; private getInactiveReasons; private getBorderColor; private getStatusIndicatorClass; private getStatusText; private formatElementDetails; private handleUnregister; private handleToggleEnabled; render(): any; } declare global { interface HTMLElementTagNameMap { "single-element": SingleElement; } } //# sourceMappingURL=single-element.d.ts.map //#endregion //#region src/lit-entry/control-panel/element-tab/element-tab.d.ts declare class ElementTab extends LitElement { static styles: any; private get hitCount(); private sortDropdown; private sortOrder; private elementListItems; private noContentMessage; private expandedElementIds; private activeSectionCollapsed; private inactiveSectionCollapsed; private _abortController; private _elementSubscriptions; private _pendingElementUpdates; private _updateDebounceId; private _cachedActiveElements; private _cachedInactiveElements; private _elementsCacheDirty; constructor(); private handleSortChange; private handleElementToggle; private _generateHitsChipTitle; private _subscribeToElement; private _unsubscribeFromElement; connectedCallback(): void; disconnectedCallback(): void; private _scheduleDebouncedUpdate; private _flushPendingUpdates; private updateElementListFromManager; private getSortedElements; private _recomputeElementsCache; private get activeElements(); private get inactiveElements(); private sortByDocumentPosition; private renderElementSection; render(): any; } declare global { interface HTMLElementTagNameMap { "element-tab": ElementTab; } } //# sourceMappingURL=element-tab.d.ts.map //#endregion //#region src/lit-entry/control-panel/dropdown/multi-select-dropdown.d.ts declare class MultiSelectDropdown extends BaseDropdown { static styles: any[]; selectedValues: string[]; onSelectionChange?: (changedValue: string, isSelected: boolean) => void; protected _handleOptionClick(option: DropdownOption): void; protected _getTriggerIcon(): TemplateResult; protected _isOptionSelected(option: DropdownOption): boolean; protected _getTriggerTitle(): string; protected _getTriggerLabel(): string; render(): any; } declare global { interface HTMLElementTagNameMap { "multi-select-dropdown": MultiSelectDropdown; } } //# sourceMappingURL=multi-select-dropdown.d.ts.map //#endregion //#region src/helpers/safeSerializeEventData.d.ts type SerializedEventType = ForesightEvent | "serializationError" | "managerDataPayload"; interface PayloadBase { type: SerializedEventType; localizedTimestamp: string; summary: string; logId: string; } interface ElementRegisteredPayload extends PayloadBase { type: "elementRegistered"; name: string; id: string; state: ForesightElementState; hitslop: HitSlop; meta: Record; } interface ElementUnregisteredEvent extends PayloadBase { type: "elementUnregistered"; name: string; id: string; state: ForesightElementState; meta: Record; wasLastRegisteredElement: boolean; } interface CallbackInvokedPayload extends PayloadBase { type: "callbackInvoked"; name: string; hitType: CallbackHitType; state: ForesightElementState; meta: Record; } interface CallbackCompletedPayload extends PayloadBase { type: "callbackCompleted"; elapsed: string; name: string; hitType: CallbackHitType; status: "success" | "error" | undefined; errorMessage: string | undefined | null; state: ForesightElementState; wasLastActiveElement: boolean; meta: Record; } interface MouseTrajectoryUpdatePayload extends PayloadBase { type: "mouseTrajectoryUpdate"; currentPoint: ForesightPoint; predictedPoint: ForesightPoint; positionCount: number; mousePredictionEnabled: boolean; } interface ScrollTrajectoryUpdatePayload extends PayloadBase { type: "scrollTrajectoryUpdate"; currentPoint: ForesightPoint; predictedPoint: ForesightPoint; scrollDirection: ScrollDirection; } interface ManagerSettingsChangedPayload extends PayloadBase { type: "managerSettingsChanged"; globalSettings: ForesightManagerSettings; settingsChanged: UpdatedManagerSetting[]; } interface DeviceStrategyChangedPayload extends PayloadBase { type: "deviceStrategyChanged"; oldStrategy: string; newStrategy: string; } interface SerializationErrorPayload extends PayloadBase { type: "serializationError"; error: "Failed to serialize event data"; errorMessage: string; } interface ManagerDataPayload extends PayloadBase { type: "managerDataPayload"; warning: string; globalCallbackHits: CallbackHits; eventListenerCount: Record; managerSettings: ForesightManagerSettings; registeredElements: Array; loadedModules: ForesightManagerData["loadedModules"]; } type SerializedEventData = ElementRegisteredPayload | ElementUnregisteredEvent | CallbackInvokedPayload | CallbackCompletedPayload | MouseTrajectoryUpdatePayload | ScrollTrajectoryUpdatePayload | ManagerSettingsChangedPayload | DeviceStrategyChangedPayload | ManagerDataPayload | SerializationErrorPayload; //#endregion //#region src/lit-entry/control-panel/log-tab/single-log.d.ts declare class SingleLog extends LitElement { static styles: any[]; log: SerializedEventData; constructor(log: SerializedEventData); isExpanded: boolean; onToggle: ((logId: string) => void) | undefined; protected updated(changedProperties: PropertyValues): void; private serializeLogDataWithoutSummary; private getLogTypeColor; private getEventDisplayName; private truncateLogSummary; render(): any; } declare global { interface HTMLElementTagNameMap { "single-log": SingleLog; } } //# sourceMappingURL=single-log.d.ts.map //#endregion //#region src/lit-entry/control-panel/log-tab/log-tab.d.ts declare class LogTab extends LitElement { static styles: any[]; private store; private logDropdown; private filterDropdown; private expandedLogIds; noContentMessage: string; private _unsubscribeStore; constructor(); private handleLogLocationChange; private handleFilterChange; private getSelectedEventFilters; private shouldShowPerformanceWarning; private getNoLogsMessage; private handleLogToggle; private clearLogs; private logManagerData; connectedCallback(): void; disconnectedCallback(): void; render(): any; } declare global { interface HTMLElementTagNameMap { "log-tab": LogTab; } } //# sourceMappingURL=log-tab.d.ts.map //#endregion //#region src/lit-entry/control-panel/settings-tab/setting-item/setting-item.d.ts declare class SettingItem extends LitElement { static styles: any[]; header: string; description: string; render(): any; } declare global { interface HTMLElementTagNameMap { "setting-item": SettingItem; } } //# sourceMappingURL=setting-item.d.ts.map //#endregion //#region src/lit-entry/control-panel/settings-tab/setting-item/setting-item-checkbox.d.ts type ShowSettingKey = `show.${ShowKey}`; declare class SettingItemCheckbox extends LitElement { static styles: any[]; isChecked: boolean; header: string; description: string; setting: keyof ForesightManagerSettings | keyof DevtoolsSettings | ShowSettingKey; private handleCheckboxChange; render(): any; } declare global { interface HTMLElementTagNameMap { "setting-item-checkbox": SettingItemCheckbox; } } //#endregion //#region src/lit-entry/control-panel/settings-tab/setting-item/setting-item-range.d.ts declare class SettingItemRange extends LitElement { static styles: any[]; minValue: number; maxValue: number; currentValue: number; unit: string; header: string; description: string; setting: keyof ForesightManagerSettings; private displayValue; private handleRangeInput; private handleRangeChange; willUpdate(changedProperties: PropertyValues): void; render(): any; } declare global { interface HTMLElementTagNameMap { "setting-item-range": SettingItemRange; } } //# sourceMappingURL=setting-item-range.d.ts.map //#endregion //#region src/lit-entry/control-panel/settings-tab/settings-tab.d.ts declare class SettingsTab extends LitElement { static styles: any; private managerSettings; private initialSettings; private devtoolsSettings; private changedSettings; private currentCorner; private touchDeviceStrategyOptions; private minimumConnectionTypeOptions; private cornerOptions; private _abortController; constructor(); connectedCallback(): void; disconnectedCallback(): void; private _updateChangedSettings; private _checkManagerSettingsChanges; private _checkDevtoolsSettingsChanges; private _handleDevtoolsSettingChange; private _handleTouchDeviceStrategyChange; private _handleMinimumConnectionTypeChange; private _handleCornerChange; private getCurrentCorner; private handleCopySettings; private generateSettingsCode; render(): any; } declare global { interface HTMLElementTagNameMap { "settings-tab": SettingsTab; } } //# sourceMappingURL=settings-tab.d.ts.map //#endregion //#region src/lit-entry/debug-overlay/element-overlays.d.ts declare class ElementOverlays extends LitElement { private overlayMap; private callbackAnimations; private _elementSubscriptions; private containerElement; showNameTags: boolean; static styles: any[]; private _abortController; connectedCallback(): void; protected willUpdate(changed: PropertyValues): void; private _subscribeToElement; private _unsubscribeFromElement; private createOverlay; /** * The slop area is the element's own shape offset outward by the hit slop: * every corner keeps the element's border radius, grown by the slop on each * axis. Sharp corners stay sharp, since offsetting a rectangle outward does * not round its corners. */ private expandedBorderRadius; private updateSlopArea; private updateNameLabel; private createOrUpdateElementOverlay; private removeElementOverlay; private clearCallbackAnimationTimeout; private highlightElementCallback; private unhighlightElementCallback; updateNameTagVisibility(showNameTags: boolean): void; disconnectedCallback(): void; render(): any; } declare global { interface HTMLElementTagNameMap { "element-overlays": ElementOverlays; } } //# sourceMappingURL=element-overlays.d.ts.map //#endregion //#region src/lit-entry/debug-overlay/debug-overlay.d.ts declare class DebugOverlay extends LitElement { static styles: any[]; private _abortController; private _strategy; showElementOverlays: boolean; showMouseTrajectory: boolean; showScrollTrajectory: boolean; showNameTags: boolean; connectedCallback(): void; private handleDeviceStrategyChange; disconnectedCallback(): void; render(): any; } declare global { interface HTMLElementTagNameMap { "debug-overlay": DebugOverlay; } } //# sourceMappingURL=debug-overlay.d.ts.map //#endregion //#region src/lit-entry/foresight-devtools.d.ts declare class ForesightDevtools extends LitElement { static styles: any[]; private isInitialized; private static _instance; devtoolsSettings: Required; private constructor(); private static createAndAppendInstance; static initialize(props?: DeepPartial): ForesightDevtools; static get instance(): ForesightDevtools; disconnectedCallback(): void; private shouldUpdateSetting; private updateLoggingSetting; private updateShowSetting; /** * Set every flag inside `show` to the same value. Useful for "turn the * entire devtools UI off" without listing each key. */ setAllShow(value: boolean): void; alterDevtoolsSettings(props?: DeepPartial): void; private cleanup; render(): any; } declare global { interface HTMLElementTagNameMap { "foresight-devtools": ForesightDevtools; } } //# sourceMappingURL=foresight-devtools.d.ts.map //#endregion export { type DebuggerBooleanSettingKeys, type DevtoolsSettings, ForesightDevtools, type SortElementList }; //# sourceMappingURL=index.d.mts.map