@spotlightjs/overlay 2.4.0 → 2.5.1

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.
@@ -1,4 +1,4 @@
1
- import { C as t, D as o, a as e, b as n, R as i, d as E, h as r, m as p, n as l, l as S, o as D, e as R, i as T, j as g, k as h, f as N, s as _, p as c, t as v, v as A } from "./index-4cc92fd8.js";
1
+ import { C as t, D as o, a as e, b as n, R as i, d as E, h as r, m as p, n as l, l as S, o as D, e as R, i as T, j as g, k as h, f as N, s as _, p as c, t as v, v as A } from "./index-32570745.js";
2
2
  window.Spotlight && Spotlight.init();
3
3
  export {
4
4
  t as CONTEXT_LINES_ENDPOINT,
package/dist/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { type Integration } from './integrations/integration';
1
+ import type { Integration } from './integrations/integration';
2
2
  export type ExperimentName = 'sentry:focus-local-events';
3
3
  export type ExperimentsConfig = Record<ExperimentName, boolean>;
4
4
  export type AnchorConfig = 'bottomRight' | 'bottomLeft' | 'centerRight' | 'centerLeft' | 'topLeft' | 'topRight';
@@ -73,7 +73,7 @@ export type SpotlightOverlayOptions = {
73
73
  /**
74
74
  * If set to `true`, the Spotlight overlay will be rendered in full page mode.
75
75
  * It can't be closed nor minimized.
76
- * This is useful for replaceing error page or in when directly rendered as an html page
76
+ * This is useful for replacing error page or in when directly rendered as an html page
77
77
  */
78
78
  fullPage?: boolean;
79
79
  /**
@@ -83,6 +83,12 @@ export type SpotlightOverlayOptions = {
83
83
  * @default true
84
84
  */
85
85
  showClearEventsButton?: boolean;
86
+ /**
87
+ * Events to be sent into Spotlight (bypassing the sidecar) right after init
88
+ *
89
+ * This is useful when replacing error pages of frameworks etc. Implies "injectImmediately".
90
+ */
91
+ initialEvents?: Record<string, (string | Uint8Array)[]>;
86
92
  };
87
93
  export type NotificationCount = {
88
94
  /**
@@ -98,5 +104,6 @@ export type NotificationCount = {
98
104
  export type WindowWithSpotlight = Window & {
99
105
  __spotlight?: {
100
106
  eventTarget?: EventTarget;
107
+ initOptions?: SpotlightOverlayOptions;
101
108
  };
102
109
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@spotlightjs/overlay",
3
3
  "description": "The overlay of Spotlight to add debug interface to your web app.",
4
- "version": "2.4.0",
4
+ "version": "2.5.1",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "files": [
@@ -51,7 +51,7 @@
51
51
  "@types/beautify": "^0.0.3",
52
52
  "react-json-view": "^1.21.3",
53
53
  "@spotlightjs/tsconfig": "1.0.0",
54
- "@spotlightjs/sidecar": "1.7.0"
54
+ "@spotlightjs/sidecar": "1.8.0"
55
55
  },
56
56
  "volta": {
57
57
  "extends": "../../package.json"