@spotlightjs/overlay 2.3.0 → 2.4.0-next.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 o, D as t, a as e, b as n, R as i, d as E, h as r, m as l, n as p, l as S, o as D, e as R, i as T, j as g, k as h, f as N, s as _, t as c, v as A } from "./index-b149f078.js";
1
+ import { C as o, D as t, a as e, b as n, R as i, d as E, h as r, m as l, n as p, l as S, o as D, e as R, i as T, j as g, k as h, f as N, s as _, t as c, v as A } from "./index-047a72e8.js";
2
2
  window.Spotlight && Spotlight.init();
3
3
  export {
4
4
  o as CONTEXT_LINES_ENDPOINT,
package/dist/src/App.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import type { SpotlightOverlayOptions } from './types';
2
2
  type AppProps = Omit<SpotlightOverlayOptions, 'debug' | 'injectImmediately'> & Required<Pick<SpotlightOverlayOptions, 'sidecarUrl'>>;
3
- export default function App({ openOnInit, showTriggerButton, integrations, sidecarUrl, anchor, fullPage, showClearEventsButton, }: AppProps): import("react/jsx-runtime").JSX.Element;
3
+ export default function App({ openOnInit, showTriggerButton, integrations, sidecarUrl, anchor, fullPage, showClearEventsButton, skipSidecar, }: AppProps): import("react/jsx-runtime").JSX.Element;
4
4
  export {};
@@ -1,6 +1,6 @@
1
1
  import type { Integration, IntegrationData } from '../integrations/integration';
2
2
  import type { NotificationCount } from '../types';
3
- export default function Debugger({ integrations, isOpen, setOpen, integrationData, isOnline, setTriggerButtonCount: setNotificationCount, fullPage, showClearEventsButton, }: {
3
+ export default function Debugger({ integrations, isOpen, setOpen, integrationData, isOnline, setTriggerButtonCount: setNotificationCount, fullPage, showClearEventsButton, skipSidecar, }: {
4
4
  integrations: Integration[];
5
5
  isOpen: boolean;
6
6
  setOpen: (value: boolean) => void;
@@ -9,4 +9,5 @@ export default function Debugger({ integrations, isOpen, setOpen, integrationDat
9
9
  setTriggerButtonCount: (count: NotificationCount) => void;
10
10
  fullPage: boolean;
11
11
  showClearEventsButton: boolean;
12
+ skipSidecar: boolean;
12
13
  }): import("react/jsx-runtime").JSX.Element;
@@ -31,4 +31,4 @@ export declare function onOpen(cb: EventListener): Promise<void>;
31
31
  * A count of the number of collected severe events is passed to the callback.
32
32
  */
33
33
  export declare function onSevereEvent(cb: (count: number) => void): Promise<void>;
34
- export declare function init({ openOnInit, showTriggerButton, injectImmediately, sidecarUrl, anchor, debug, integrations, experiments, fullPage, showClearEventsButton, }?: SpotlightOverlayOptions): Promise<void>;
34
+ export declare function init({ openOnInit, showTriggerButton, injectImmediately, sidecarUrl, anchor, debug, integrations, experiments, fullPage, showClearEventsButton, skipSidecar, }?: SpotlightOverlayOptions): Promise<void>;
@@ -1,4 +1,4 @@
1
- import { Client, Event } from '@sentry/types';
1
+ import type { Client, Event } from '@sentry/types';
2
2
  type SpotlightBrowserIntegrationOptions = {
3
3
  /**
4
4
  * The URL of the Sidecar instance to connect and forward events to.
@@ -10,10 +10,8 @@ type SpotlightBrowserIntegrationOptions = {
10
10
  };
11
11
  /**
12
12
  * A Sentry integration for Spotlight integration that the Overlay will inject automatically.
13
- * This integration does a couple of things:
13
+ * This integration does the following:
14
14
  *
15
- * - Try to enrich stack traces by querying a potentially existing context lines integration
16
- * on the server side (@see packages/astro/src/vite/source-context.ts)
17
15
  * - Drop transactions created from interactions with the Spotlight UI
18
16
  * - Forward Sentry events sent from the browser SDK to the Sidecar instance running on
19
17
  * either on http://localhost:8969/stream or on the supplied `sidecarUrl` option.
@@ -26,7 +24,7 @@ export declare const spotlightIntegration: (options?: SpotlightBrowserIntegratio
26
24
  name: string;
27
25
  setupOnce: () => void;
28
26
  setup: () => void;
29
- processEvent: (event: Event) => Promise<Event | null>;
27
+ processEvent: (event: Event) => Event | null;
30
28
  afterAllSetup: (client: Client) => void;
31
29
  };
32
30
  export {};
@@ -83,6 +83,13 @@ export type SpotlightOverlayOptions = {
83
83
  * @default true
84
84
  */
85
85
  showClearEventsButton?: boolean;
86
+ /**
87
+ * If set to `true`, the Spotlight overlay will not connect to the sidecar.
88
+ * This is useful if you want to add data manually to Spotlight.
89
+ *
90
+ * @default false
91
+ */
92
+ skipSidecar?: boolean;
86
93
  };
87
94
  export type NotificationCount = {
88
95
  /**
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.3.0",
4
+ "version": "2.4.0-next.1",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "files": [