@absolutejs/beacon 0.7.0-beta.1 → 0.7.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -0
- package/dist/early.d.ts +58 -0
- package/dist/early.js +134 -0
- package/dist/early.js.map +10 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +295 -87
- package/dist/index.js.map +5 -4
- package/package.json +7 -2
package/README.md
CHANGED
|
@@ -65,6 +65,24 @@ beacon.setUser({ id: currentUserId });
|
|
|
65
65
|
beacon.captureMessage("checkout started", "info");
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
+
### Preserve pre-hydration layout shifts
|
|
69
|
+
|
|
70
|
+
If Beacon itself is loaded lazily, install its zero-configuration early buffer
|
|
71
|
+
from the synchronous application entry before framework hydration:
|
|
72
|
+
|
|
73
|
+
```ts
|
|
74
|
+
import { installEarlyLayoutShiftBuffer } from "@absolutejs/beacon/early";
|
|
75
|
+
|
|
76
|
+
installEarlyLayoutShiftBuffer();
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
The full Beacon instance consumes this buffer automatically when disruptive
|
|
80
|
+
layout-shift signals are enabled. It retains the entry's original performance
|
|
81
|
+
time, observation time, source rectangles, viewport and document state, plus
|
|
82
|
+
resize and privacy-safe interaction timing. This avoids misclassifying a
|
|
83
|
+
buffered startup entry using only state observed after hydration. The early
|
|
84
|
+
entry point does not initialize Beacon, send telemetry, or import the main SDK.
|
|
85
|
+
|
|
68
86
|
## What it does
|
|
69
87
|
|
|
70
88
|
- **Auto-capture** — `window.onerror` + `unhandledrejection` (toggle via `instrument`).
|
package/dist/early.d.ts
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/** Lightweight pre-hydration layout-shift recorder. */
|
|
2
|
+
export type EarlyLayoutShiftRect = {
|
|
3
|
+
bottom: number;
|
|
4
|
+
height: number;
|
|
5
|
+
left: number;
|
|
6
|
+
right: number;
|
|
7
|
+
top: number;
|
|
8
|
+
width: number;
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
};
|
|
12
|
+
export type EarlyLayoutShiftViewport = {
|
|
13
|
+
documentHeight: number;
|
|
14
|
+
documentWidth: number;
|
|
15
|
+
innerHeight: number;
|
|
16
|
+
innerWidth: number;
|
|
17
|
+
visualHeight?: number;
|
|
18
|
+
visualOffsetLeft?: number;
|
|
19
|
+
visualOffsetTop?: number;
|
|
20
|
+
visualScale?: number;
|
|
21
|
+
visualWidth?: number;
|
|
22
|
+
};
|
|
23
|
+
export type EarlyLayoutShiftSource = {
|
|
24
|
+
currentRect?: EarlyLayoutShiftRect;
|
|
25
|
+
node?: Node;
|
|
26
|
+
previousRect?: EarlyLayoutShiftRect;
|
|
27
|
+
target: string;
|
|
28
|
+
};
|
|
29
|
+
export type EarlyLayoutShiftEntry = {
|
|
30
|
+
documentReadyState: DocumentReadyState;
|
|
31
|
+
hadRecentInput: boolean;
|
|
32
|
+
observedAt: number;
|
|
33
|
+
sources: EarlyLayoutShiftSource[];
|
|
34
|
+
startTime: number;
|
|
35
|
+
value: number;
|
|
36
|
+
viewport: EarlyLayoutShiftViewport;
|
|
37
|
+
};
|
|
38
|
+
export type EarlyLayoutShiftBuffer = {
|
|
39
|
+
entries: EarlyLayoutShiftEntry[];
|
|
40
|
+
interactionTimes: number[];
|
|
41
|
+
observerStartedAt: number;
|
|
42
|
+
resizeTimes: number[];
|
|
43
|
+
};
|
|
44
|
+
type InstalledEarlyLayoutShiftBuffer = EarlyLayoutShiftBuffer & {
|
|
45
|
+
cleanup: () => void;
|
|
46
|
+
observer: PerformanceObserver;
|
|
47
|
+
recordEntries: (entries: PerformanceEntry[]) => void;
|
|
48
|
+
};
|
|
49
|
+
declare global {
|
|
50
|
+
interface Window {
|
|
51
|
+
__absoluteBeaconEarlyLayoutShift?: InstalledEarlyLayoutShiftBuffer;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
/** Install once from the application's synchronous entry module. SSR-safe. */
|
|
55
|
+
export declare const installEarlyLayoutShiftBuffer: () => void;
|
|
56
|
+
/** Consume and remove the pre-hydration recorder, if one was installed. */
|
|
57
|
+
export declare const consumeEarlyLayoutShiftBuffer: () => EarlyLayoutShiftBuffer | undefined;
|
|
58
|
+
export {};
|
package/dist/early.js
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
2
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
3
|
+
}) : x)(function(x) {
|
|
4
|
+
if (typeof require !== "undefined")
|
|
5
|
+
return require.apply(this, arguments);
|
|
6
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
// src/early.ts
|
|
10
|
+
var HISTORY_LIMIT = 16;
|
|
11
|
+
var ENTRY_LIMIT = 50;
|
|
12
|
+
var now = () => typeof performance === "undefined" ? 0 : performance.now();
|
|
13
|
+
var describeNode = (node) => {
|
|
14
|
+
if (!(node instanceof Element))
|
|
15
|
+
return "unknown";
|
|
16
|
+
const id = node.id === "" ? "" : `#${node.id}`;
|
|
17
|
+
const classes = [...node.classList].slice(0, 3).map((name) => `.${name}`).join("");
|
|
18
|
+
return `${node.tagName.toLowerCase()}${id}${classes}`;
|
|
19
|
+
};
|
|
20
|
+
var copyRect = (rect) => rect === undefined ? undefined : {
|
|
21
|
+
bottom: rect.bottom,
|
|
22
|
+
height: rect.height,
|
|
23
|
+
left: rect.left,
|
|
24
|
+
right: rect.right,
|
|
25
|
+
top: rect.top,
|
|
26
|
+
width: rect.width,
|
|
27
|
+
x: rect.x,
|
|
28
|
+
y: rect.y
|
|
29
|
+
};
|
|
30
|
+
var viewportSnapshot = () => {
|
|
31
|
+
const visual = window.visualViewport;
|
|
32
|
+
return {
|
|
33
|
+
documentHeight: document.documentElement.scrollHeight,
|
|
34
|
+
documentWidth: document.documentElement.scrollWidth,
|
|
35
|
+
innerHeight: window.innerHeight,
|
|
36
|
+
innerWidth: window.innerWidth,
|
|
37
|
+
...visual == null ? {} : {
|
|
38
|
+
visualHeight: visual.height,
|
|
39
|
+
visualOffsetLeft: visual.offsetLeft,
|
|
40
|
+
visualOffsetTop: visual.offsetTop,
|
|
41
|
+
visualScale: visual.scale,
|
|
42
|
+
visualWidth: visual.width
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
var appendLimited = (values, value) => {
|
|
47
|
+
values.push(value);
|
|
48
|
+
if (values.length > HISTORY_LIMIT)
|
|
49
|
+
values.splice(0, values.length - HISTORY_LIMIT);
|
|
50
|
+
};
|
|
51
|
+
var installEarlyLayoutShiftBuffer = () => {
|
|
52
|
+
if (typeof window === "undefined" || typeof document === "undefined" || typeof PerformanceObserver === "undefined" || window.__absoluteBeaconEarlyLayoutShift !== undefined)
|
|
53
|
+
return;
|
|
54
|
+
const interactionTimes = [];
|
|
55
|
+
const resizeTimes = [];
|
|
56
|
+
const entries = [];
|
|
57
|
+
const recordInteraction = () => appendLimited(interactionTimes, now());
|
|
58
|
+
const recordResize = () => appendLimited(resizeTimes, now());
|
|
59
|
+
const recordEntries = (rawEntries) => {
|
|
60
|
+
for (const raw of rawEntries) {
|
|
61
|
+
const entry = raw;
|
|
62
|
+
entries.push({
|
|
63
|
+
documentReadyState: document.readyState,
|
|
64
|
+
hadRecentInput: entry.hadRecentInput === true,
|
|
65
|
+
observedAt: now(),
|
|
66
|
+
sources: (entry.sources ?? []).slice(0, 5).map((source) => ({
|
|
67
|
+
...source.currentRect === undefined ? {} : { currentRect: copyRect(source.currentRect) },
|
|
68
|
+
...source.node === undefined || source.node === null ? {} : { node: source.node },
|
|
69
|
+
...source.previousRect === undefined ? {} : { previousRect: copyRect(source.previousRect) },
|
|
70
|
+
target: describeNode(source.node)
|
|
71
|
+
})),
|
|
72
|
+
startTime: entry.startTime,
|
|
73
|
+
value: entry.value ?? 0,
|
|
74
|
+
viewport: viewportSnapshot()
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
if (entries.length > ENTRY_LIMIT)
|
|
78
|
+
entries.splice(0, entries.length - ENTRY_LIMIT);
|
|
79
|
+
};
|
|
80
|
+
try {
|
|
81
|
+
const observerStartedAt = now();
|
|
82
|
+
const observer = new PerformanceObserver((list) => recordEntries(list.getEntries()));
|
|
83
|
+
const interactionEvents = [
|
|
84
|
+
"click",
|
|
85
|
+
"keydown",
|
|
86
|
+
"pointerdown",
|
|
87
|
+
"submit"
|
|
88
|
+
];
|
|
89
|
+
for (const event of interactionEvents)
|
|
90
|
+
window.addEventListener(event, recordInteraction, true);
|
|
91
|
+
window.addEventListener("resize", recordResize);
|
|
92
|
+
window.visualViewport?.addEventListener("resize", recordResize);
|
|
93
|
+
const cleanup = () => {
|
|
94
|
+
for (const event of interactionEvents)
|
|
95
|
+
window.removeEventListener(event, recordInteraction, true);
|
|
96
|
+
window.removeEventListener("resize", recordResize);
|
|
97
|
+
window.visualViewport?.removeEventListener("resize", recordResize);
|
|
98
|
+
};
|
|
99
|
+
window.__absoluteBeaconEarlyLayoutShift = {
|
|
100
|
+
cleanup,
|
|
101
|
+
entries,
|
|
102
|
+
interactionTimes,
|
|
103
|
+
observer,
|
|
104
|
+
observerStartedAt,
|
|
105
|
+
recordEntries,
|
|
106
|
+
resizeTimes
|
|
107
|
+
};
|
|
108
|
+
observer.observe({ buffered: true, type: "layout-shift" });
|
|
109
|
+
} catch {}
|
|
110
|
+
};
|
|
111
|
+
var consumeEarlyLayoutShiftBuffer = () => {
|
|
112
|
+
if (typeof window === "undefined")
|
|
113
|
+
return;
|
|
114
|
+
const installed = window.__absoluteBeaconEarlyLayoutShift;
|
|
115
|
+
if (installed === undefined)
|
|
116
|
+
return;
|
|
117
|
+
installed.recordEntries(installed.observer.takeRecords());
|
|
118
|
+
installed.observer.disconnect();
|
|
119
|
+
installed.cleanup();
|
|
120
|
+
delete window.__absoluteBeaconEarlyLayoutShift;
|
|
121
|
+
return {
|
|
122
|
+
entries: installed.entries,
|
|
123
|
+
interactionTimes: installed.interactionTimes,
|
|
124
|
+
observerStartedAt: installed.observerStartedAt,
|
|
125
|
+
resizeTimes: installed.resizeTimes
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
export {
|
|
129
|
+
consumeEarlyLayoutShiftBuffer,
|
|
130
|
+
installEarlyLayoutShiftBuffer
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
//# debugId=197271DDFBB42C0164756E2164756E21
|
|
134
|
+
//# sourceMappingURL=early.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/early.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"/** Lightweight pre-hydration layout-shift recorder. */\n\nexport type EarlyLayoutShiftRect = {\n bottom: number;\n height: number;\n left: number;\n right: number;\n top: number;\n width: number;\n x: number;\n y: number;\n};\n\nexport type EarlyLayoutShiftViewport = {\n documentHeight: number;\n documentWidth: number;\n innerHeight: number;\n innerWidth: number;\n visualHeight?: number;\n visualOffsetLeft?: number;\n visualOffsetTop?: number;\n visualScale?: number;\n visualWidth?: number;\n};\n\nexport type EarlyLayoutShiftSource = {\n currentRect?: EarlyLayoutShiftRect;\n node?: Node;\n previousRect?: EarlyLayoutShiftRect;\n target: string;\n};\n\nexport type EarlyLayoutShiftEntry = {\n documentReadyState: DocumentReadyState;\n hadRecentInput: boolean;\n observedAt: number;\n sources: EarlyLayoutShiftSource[];\n startTime: number;\n value: number;\n viewport: EarlyLayoutShiftViewport;\n};\n\nexport type EarlyLayoutShiftBuffer = {\n entries: EarlyLayoutShiftEntry[];\n interactionTimes: number[];\n observerStartedAt: number;\n resizeTimes: number[];\n};\n\ntype LayoutShiftSourceLike = {\n currentRect?: DOMRectReadOnly;\n node?: Node | null;\n previousRect?: DOMRectReadOnly;\n};\ntype LayoutShiftEntryLike = PerformanceEntry & {\n hadRecentInput?: boolean;\n sources?: LayoutShiftSourceLike[];\n value?: number;\n};\ntype InstalledEarlyLayoutShiftBuffer = EarlyLayoutShiftBuffer & {\n cleanup: () => void;\n observer: PerformanceObserver;\n recordEntries: (entries: PerformanceEntry[]) => void;\n};\n\ndeclare global {\n interface Window {\n __absoluteBeaconEarlyLayoutShift?: InstalledEarlyLayoutShiftBuffer;\n }\n}\n\nconst HISTORY_LIMIT = 16;\nconst ENTRY_LIMIT = 50;\nconst now = (): number =>\n typeof performance === \"undefined\" ? 0 : performance.now();\n\nconst describeNode = (node: Node | null | undefined): string => {\n if (!(node instanceof Element)) return \"unknown\";\n const id = node.id === \"\" ? \"\" : `#${node.id}`;\n const classes = [...node.classList]\n .slice(0, 3)\n .map((name) => `.${name}`)\n .join(\"\");\n return `${node.tagName.toLowerCase()}${id}${classes}`;\n};\n\nconst copyRect = (\n rect: DOMRectReadOnly | undefined,\n): EarlyLayoutShiftRect | undefined =>\n rect === undefined\n ? undefined\n : {\n bottom: rect.bottom,\n height: rect.height,\n left: rect.left,\n right: rect.right,\n top: rect.top,\n width: rect.width,\n x: rect.x,\n y: rect.y,\n };\n\nconst viewportSnapshot = (): EarlyLayoutShiftViewport => {\n const visual = window.visualViewport;\n return {\n documentHeight: document.documentElement.scrollHeight,\n documentWidth: document.documentElement.scrollWidth,\n innerHeight: window.innerHeight,\n innerWidth: window.innerWidth,\n ...(visual == null\n ? {}\n : {\n visualHeight: visual.height,\n visualOffsetLeft: visual.offsetLeft,\n visualOffsetTop: visual.offsetTop,\n visualScale: visual.scale,\n visualWidth: visual.width,\n }),\n };\n};\n\nconst appendLimited = (values: number[], value: number): void => {\n values.push(value);\n if (values.length > HISTORY_LIMIT)\n values.splice(0, values.length - HISTORY_LIMIT);\n};\n\n/** Install once from the application's synchronous entry module. SSR-safe. */\nexport const installEarlyLayoutShiftBuffer = (): void => {\n if (\n typeof window === \"undefined\" ||\n typeof document === \"undefined\" ||\n typeof PerformanceObserver === \"undefined\" ||\n window.__absoluteBeaconEarlyLayoutShift !== undefined\n )\n return;\n\n const interactionTimes: number[] = [];\n const resizeTimes: number[] = [];\n const entries: EarlyLayoutShiftEntry[] = [];\n const recordInteraction = (): void => appendLimited(interactionTimes, now());\n const recordResize = (): void => appendLimited(resizeTimes, now());\n const recordEntries = (rawEntries: PerformanceEntry[]): void => {\n for (const raw of rawEntries) {\n const entry = raw as LayoutShiftEntryLike;\n entries.push({\n documentReadyState: document.readyState,\n hadRecentInput: entry.hadRecentInput === true,\n observedAt: now(),\n sources: (entry.sources ?? []).slice(0, 5).map((source) => ({\n ...(source.currentRect === undefined\n ? {}\n : { currentRect: copyRect(source.currentRect) }),\n ...(source.node === undefined || source.node === null\n ? {}\n : { node: source.node }),\n ...(source.previousRect === undefined\n ? {}\n : { previousRect: copyRect(source.previousRect) }),\n target: describeNode(source.node),\n })),\n startTime: entry.startTime,\n value: entry.value ?? 0,\n viewport: viewportSnapshot(),\n });\n }\n if (entries.length > ENTRY_LIMIT)\n entries.splice(0, entries.length - ENTRY_LIMIT);\n };\n\n try {\n const observerStartedAt = now();\n const observer = new PerformanceObserver((list) =>\n recordEntries(list.getEntries()),\n );\n const interactionEvents = [\n \"click\",\n \"keydown\",\n \"pointerdown\",\n \"submit\",\n ] as const;\n for (const event of interactionEvents)\n window.addEventListener(event, recordInteraction, true);\n window.addEventListener(\"resize\", recordResize);\n window.visualViewport?.addEventListener(\"resize\", recordResize);\n const cleanup = (): void => {\n for (const event of interactionEvents)\n window.removeEventListener(event, recordInteraction, true);\n window.removeEventListener(\"resize\", recordResize);\n window.visualViewport?.removeEventListener(\"resize\", recordResize);\n };\n window.__absoluteBeaconEarlyLayoutShift = {\n cleanup,\n entries,\n interactionTimes,\n observer,\n observerStartedAt,\n recordEntries,\n resizeTimes,\n };\n observer.observe({ buffered: true, type: \"layout-shift\" });\n } catch {\n // Unsupported browsers must not have their startup affected by telemetry.\n }\n};\n\n/** Consume and remove the pre-hydration recorder, if one was installed. */\nexport const consumeEarlyLayoutShiftBuffer = ():\n EarlyLayoutShiftBuffer | undefined => {\n if (typeof window === \"undefined\") return undefined;\n const installed = window.__absoluteBeaconEarlyLayoutShift;\n if (installed === undefined) return undefined;\n installed.recordEntries(installed.observer.takeRecords());\n installed.observer.disconnect();\n installed.cleanup();\n delete window.__absoluteBeaconEarlyLayoutShift;\n return {\n entries: installed.entries,\n interactionTimes: installed.interactionTimes,\n observerStartedAt: installed.observerStartedAt,\n resizeTimes: installed.resizeTimes,\n };\n};\n"
|
|
6
|
+
],
|
|
7
|
+
"mappings": ";;;;;;;;;AAuEA,IAAM,gBAAgB;AACtB,IAAM,cAAc;AACpB,IAAM,MAAM,MACV,OAAO,gBAAgB,cAAc,IAAI,YAAY,IAAI;AAE3D,IAAM,eAAe,CAAC,SAA0C;AAAA,EAC9D,IAAI,EAAE,gBAAgB;AAAA,IAAU,OAAO;AAAA,EACvC,MAAM,KAAK,KAAK,OAAO,KAAK,KAAK,IAAI,KAAK;AAAA,EAC1C,MAAM,UAAU,CAAC,GAAG,KAAK,SAAS,EAC/B,MAAM,GAAG,CAAC,EACV,IAAI,CAAC,SAAS,IAAI,MAAM,EACxB,KAAK,EAAE;AAAA,EACV,OAAO,GAAG,KAAK,QAAQ,YAAY,IAAI,KAAK;AAAA;AAG9C,IAAM,WAAW,CACf,SAEA,SAAS,YACL,YACA;AAAA,EACE,QAAQ,KAAK;AAAA,EACb,QAAQ,KAAK;AAAA,EACb,MAAM,KAAK;AAAA,EACX,OAAO,KAAK;AAAA,EACZ,KAAK,KAAK;AAAA,EACV,OAAO,KAAK;AAAA,EACZ,GAAG,KAAK;AAAA,EACR,GAAG,KAAK;AACV;AAEN,IAAM,mBAAmB,MAAgC;AAAA,EACvD,MAAM,SAAS,OAAO;AAAA,EACtB,OAAO;AAAA,IACL,gBAAgB,SAAS,gBAAgB;AAAA,IACzC,eAAe,SAAS,gBAAgB;AAAA,IACxC,aAAa,OAAO;AAAA,IACpB,YAAY,OAAO;AAA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QAAQ;AAAA,EAClB,OAAO,OAAO;AAAA,EACd,OAAO;AAAA,IACL,SAAS,UAAU;AAAA,IACnB,kBAAkB,UAAU;AAAA,IAC5B,mBAAmB,UAAU;AAAA,IAC7B,aAAa,UAAU;AAAA,EACzB;AAAA;",
|
|
8
|
+
"debugId": "197271DDFBB42C0164756E2164756E21",
|
|
9
|
+
"names": []
|
|
10
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export type BeaconLevel = "fatal" | "error" | "warning" | "info";
|
|
|
25
25
|
/** Response header used to correlate a browser signal with its server request. */
|
|
26
26
|
export declare const BEACON_TRACE_HEADER = "x-absolute-trace-id";
|
|
27
27
|
/** Beacon package version retained with every captured event. */
|
|
28
|
-
export declare const BEACON_SDK_VERSION = "0.7.0-beta.
|
|
28
|
+
export declare const BEACON_SDK_VERSION = "0.7.0-beta.2";
|
|
29
29
|
/** Arbitrary event tags, with Beacon's reserved `signal` tag type-checked. */
|
|
30
30
|
export type BeaconTags = Record<string, string> & {
|
|
31
31
|
signal?: BeaconSignal;
|
|
@@ -458,6 +458,8 @@ export type WebVital = {
|
|
|
458
458
|
navigationType: string;
|
|
459
459
|
/** Beacon project identifier, used by authenticated relays for tenant fencing. */
|
|
460
460
|
project: string;
|
|
461
|
+
/** Per-page Beacon session identifier for cross-signal correlation. */
|
|
462
|
+
sessionId: string;
|
|
461
463
|
/** Optional application release copied from the Beacon configuration. */
|
|
462
464
|
release?: string;
|
|
463
465
|
/** Optional privacy-masked replay correlation. */
|