UNPKG

@palette.dev/browser

Version:

Monitor your web app's performance

91 lines (82 loc) 2.69 kB
import * as __helpers_core from '~/helpers/core'; import { InitFn } from '~/helpers/core'; export { debounce, tag } from '~/helpers/core'; import * as __helpers_queue from '~/helpers/queue'; import { Q } from '~/helpers/queue'; declare const init$6: __helpers_core.Plugin<unknown, ({ q }: { q: Q; }) => void>; declare const init$5: __helpers_core.Plugin<unknown, ({ q }: { q: __helpers_queue.Q; }) => void>; declare const measure: { start: (name: string) => void; end: (name: string) => void; }; /** * Track DOM events like clicks, scroll, and keypress events */ declare const init$4: __helpers_core.Plugin<unknown, ({ q }: { q: Q; }) => void>; declare global { interface ProfilerFrame { name: string; resourceId?: number; line?: number; column?: number; } interface ProfilerStack { frameId: number; parentId?: number; } type ProfilerResource = string; interface ProfilerResult { resources: ProfilerResource[]; frames: ProfilerFrame[]; stacks: ProfilerStack[]; samples: ProfilerSample[]; } interface ProfilerSample { timestamp: DOMHighResTimeStamp; stackId?: number; } interface ProfilerInterface extends EventTarget { new (opts: ProfilerInitOptions): ProfilerInterface; stop(): Promise<ProfilerResult>; readonly stopped: boolean; } interface ProfilerInitOptions { sampleInterval: DOMHighResTimeStamp; maxBufferSize: number; } const Profiler: ProfilerInterface | undefined; } type Opts$1 = { sampleInterval: number; maxBufferSize: number; }; type Ext = { start: typeof start; stop: typeof stop; on: typeof on; off: typeof off; }; declare const start: (opts: ProfilerInitOptions) => void; declare const stop: () => Promise<void>; type ProfileTransactions = "paint.click" | "paint.keydown" | "paint.scroll" | "paint.mousemove" | "markers.measure" | "events.load" | "events.dcl"; declare const on: (events: ProfileTransactions[], opts: ProfilerInitOptions) => void; declare const off: () => void; declare const init$3: __helpers_core.Plugin<Opts$1, Ext>; declare const init$2: __helpers_core.Plugin<unknown, ({ q }: { q: __helpers_queue.Q; }) => void>; type Opts = { componentPaint?: boolean; }; declare const markToPaint: (name: string) => void; declare const init$1: __helpers_core.Plugin<Opts, (queue: { q: Q; }, opts: Opts) => void | (() => void)>; declare const init: InitFn; export { init$4 as events, init, markToPaint, init$5 as markers, measure, init$2 as network, init$1 as paint, init$3 as profiler, init$6 as vitals };