@spotlightjs/overlay 2.2.1 → 2.4.0-next.0

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.
Files changed (34) hide show
  1. package/dist/index-b5d12201.js +27243 -0
  2. package/dist/index-b5d12201.js.map +1 -0
  3. package/dist/{main-74c7f044.js → main-1dfdd51f.js} +708 -708
  4. package/dist/main-1dfdd51f.js.map +1 -0
  5. package/dist/sentry-spotlight.iife.js +187 -0
  6. package/dist/sentry-spotlight.iife.js.map +1 -0
  7. package/dist/sentry-spotlight.js +20 -19
  8. package/dist/sentry-spotlight.js.map +1 -1
  9. package/dist/src/App.d.ts +1 -1
  10. package/dist/src/components/Debugger.d.ts +2 -2
  11. package/dist/src/components/Overview.d.ts +2 -2
  12. package/dist/src/index.d.ts +1 -1
  13. package/dist/src/integrations/console/console-tab.d.ts +1 -1
  14. package/dist/src/integrations/sentry/components/HiddenItemsButton.d.ts +1 -1
  15. package/dist/src/integrations/sentry/components/developerInfo/EnvelopeDetails.d.ts +2 -2
  16. package/dist/src/integrations/sentry/components/events/Event.d.ts +1 -1
  17. package/dist/src/integrations/sentry/components/events/error/Error.d.ts +2 -2
  18. package/dist/src/integrations/sentry/components/performance/webVitals/PerformanceChart.d.ts +1 -1
  19. package/dist/src/integrations/sentry/components/performance/webVitals/index.d.ts +1 -3
  20. package/dist/src/integrations/sentry/components/traces/TraceIcon.d.ts +1 -1
  21. package/dist/src/integrations/sentry/components/traces/spans/SpanItem.d.ts +1 -1
  22. package/dist/src/integrations/sentry/components/traces/traceInfo/TraceGeneralInfo.d.ts +1 -1
  23. package/dist/src/integrations/sentry/components/traces/traceInfo/TraceTags.d.ts +1 -1
  24. package/dist/src/integrations/sentry/components/traces/traceInfo/index.d.ts +1 -1
  25. package/dist/src/integrations/sentry/sentry-integration.d.ts +3 -5
  26. package/dist/src/sidecar.d.ts +2 -2
  27. package/dist/src/ui/Chart/RingChart/RingChart.d.ts +2 -2
  28. package/dist/src/ui/Tooltip/Tooltip.d.ts +1 -1
  29. package/package.json +1 -1
  30. package/dist/index-7016b54e.js +0 -36755
  31. package/dist/index-7016b54e.js.map +0 -1
  32. package/dist/main-74c7f044.js.map +0 -1
  33. package/dist/sentry-spotlight.umd.cjs +0 -354
  34. package/dist/sentry-spotlight.umd.cjs.map +0 -1
@@ -1,23 +1,24 @@
1
- import { C as e, D as o, a as t, b as n, R as E, d as r, h as i, m as D, n as R, l as T, o as l, e as p, i as N, j as S, k as _, f as c, s as A, t as C, v as I } from "./index-7016b54e.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-b5d12201.js";
2
+ window.Spotlight && Spotlight.init();
2
3
  export {
3
- e as CONTEXT_LINES_ENDPOINT,
4
- o as DEFAULT_ANCHOR,
5
- t as DEFAULT_EXPERIMENTS,
4
+ o as CONTEXT_LINES_ENDPOINT,
5
+ t as DEFAULT_ANCHOR,
6
+ e as DEFAULT_EXPERIMENTS,
6
7
  n as DEFAULT_SIDECAR_URL,
7
- E as React,
8
- r as ReactDOM,
9
- i as closeSpotlight,
10
- D as console,
11
- R as hydrationError,
12
- T as init,
13
- l as off,
14
- p as on,
15
- N as onClose,
16
- S as onOpen,
17
- _ as onSevereEvent,
18
- c as openSpotlight,
19
- A as sentry,
20
- C as trigger,
21
- I as viteInspect
8
+ i as React,
9
+ E as ReactDOM,
10
+ r as closeSpotlight,
11
+ l as console,
12
+ p as hydrationError,
13
+ S as init,
14
+ D as off,
15
+ R as on,
16
+ T as onClose,
17
+ g as onOpen,
18
+ h as onSevereEvent,
19
+ N as openSpotlight,
20
+ _ as sentry,
21
+ c as trigger,
22
+ A as viteInspect
22
23
  };
23
24
  //# sourceMappingURL=sentry-spotlight.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sentry-spotlight.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"sentry-spotlight.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
package/dist/src/App.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { SpotlightOverlayOptions } from './types';
1
+ import type { SpotlightOverlayOptions } from './types';
2
2
  type AppProps = Omit<SpotlightOverlayOptions, 'debug' | 'injectImmediately'> & Required<Pick<SpotlightOverlayOptions, 'sidecarUrl'>>;
3
3
  export default function App({ openOnInit, showTriggerButton, integrations, sidecarUrl, anchor, fullPage, showClearEventsButton, }: AppProps): import("react/jsx-runtime").JSX.Element;
4
4
  export {};
@@ -1,5 +1,5 @@
1
- import { Integration, IntegrationData } from '../integrations/integration';
2
- import { NotificationCount } from '../types';
1
+ import type { Integration, IntegrationData } from '../integrations/integration';
2
+ import type { NotificationCount } from '../types';
3
3
  export default function Debugger({ integrations, isOpen, setOpen, integrationData, isOnline, setTriggerButtonCount: setNotificationCount, fullPage, showClearEventsButton, }: {
4
4
  integrations: Integration[];
5
5
  isOpen: boolean;
@@ -1,5 +1,5 @@
1
- import { Integration, IntegrationData } from '../integrations/integration';
2
- import { NotificationCount } from '../types';
1
+ import type { Integration, IntegrationData } from '../integrations/integration';
2
+ import type { NotificationCount } from '../types';
3
3
  export default function Overview({ integrations, integrationData, setTriggerButtonCount, setOpen, }: {
4
4
  integrations: Integration[];
5
5
  integrationData: IntegrationData<unknown>;
@@ -2,7 +2,7 @@ import { CONTEXT_LINES_ENDPOINT } from '@spotlightjs/sidecar/constants';
2
2
  import { DEFAULT_ANCHOR, DEFAULT_EXPERIMENTS, DEFAULT_SIDECAR_URL } from './constants.ts';
3
3
  import { off, on, trigger } from './lib/eventTarget.ts';
4
4
  import { React, ReactDOM } from './react-instance.tsx';
5
- import { SpotlightOverlayOptions } from './types.ts';
5
+ import type { SpotlightOverlayOptions } from './types.ts';
6
6
  export { default as console } from './integrations/console/index.ts';
7
7
  export { default as hydrationError } from './integrations/hydration-error/index.ts';
8
8
  export { default as sentry } from './integrations/sentry/index.ts';
@@ -1,4 +1,4 @@
1
- import { ConsoleMessage } from './types';
1
+ import type { ConsoleMessage } from './types';
2
2
  type Props = {
3
3
  processedEvents?: ConsoleMessage[];
4
4
  };
@@ -1,4 +1,4 @@
1
- import { type ComponentProps } from 'react';
1
+ import type { ComponentProps } from 'react';
2
2
  export default function HiddenItemsButton({ itemCount, ...props }: Omit<ComponentProps<'button'>, 'className' | 'children'> & {
3
3
  itemCount: number;
4
4
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
- import { Envelope } from '@sentry/types';
2
- import { RawEventContext } from '../../../../integrations/integration';
1
+ import type { Envelope } from '@sentry/types';
2
+ import type { RawEventContext } from '../../../../integrations/integration';
3
3
  export default function EnvelopeDetails({ data }: {
4
4
  data: {
5
5
  envelope: Envelope;
@@ -1,4 +1,4 @@
1
- import { SentryEvent } from '../../types';
1
+ import type { SentryEvent } from '../../types';
2
2
  export declare function EventTitle({ event }: {
3
3
  event: SentryEvent;
4
4
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,10 +1,10 @@
1
- import { SentryErrorEvent } from '../../../types';
1
+ import type { SentryErrorEvent } from '../../../types';
2
2
  export declare function ErrorTitle({ event }: {
3
3
  event: SentryErrorEvent;
4
4
  }): import("react/jsx-runtime").JSX.Element;
5
5
  export declare function ErrorSummary({ event }: {
6
6
  event: SentryErrorEvent;
7
7
  }): import("react/jsx-runtime").JSX.Element;
8
- export declare function Error({ event }: {
8
+ export declare function ErrorItem({ event }: {
9
9
  event: SentryErrorEvent;
10
10
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { MetricScoreProps, MetricWeightsProps } from '../../../../../integrations/sentry/types';
1
+ import type { MetricScoreProps, MetricWeightsProps } from '../../../../../integrations/sentry/types';
2
2
  type PerformanceChartProps = {
3
3
  metricScore: MetricScoreProps;
4
4
  metricWeights: MetricWeightsProps;
@@ -1,4 +1,2 @@
1
- declare const WebVitals: ({ showAll }: {
2
- showAll: boolean;
3
- }) => import("react/jsx-runtime").JSX.Element;
1
+ declare const WebVitals: () => import("react/jsx-runtime").JSX.Element;
4
2
  export default WebVitals;
@@ -1,4 +1,4 @@
1
- import { Trace } from '../../types';
1
+ import type { Trace } from '../../types';
2
2
  export type TraceIconProps = {
3
3
  trace: Trace;
4
4
  };
@@ -1,4 +1,4 @@
1
- import { Span, TraceContext } from '../../../types';
1
+ import type { Span, TraceContext } from '../../../types';
2
2
  declare const SpanItem: ({ span, startTimestamp, totalDuration, depth, traceContext, totalTransactions, spanNodeWidth, setSpanNodeWidth, query, }: {
3
3
  span: Span;
4
4
  startTimestamp: number;
@@ -1,4 +1,4 @@
1
- import { Trace } from '../../../../../integrations/sentry/types';
1
+ import type { Trace } from '../../../../../integrations/sentry/types';
2
2
  type TraceGeneralInfoProps = {
3
3
  trace: Trace;
4
4
  };
@@ -1,4 +1,4 @@
1
- import { Trace } from '../../../../../integrations/sentry/types';
1
+ import type { Trace } from '../../../../../integrations/sentry/types';
2
2
  type TraceTagsProps = {
3
3
  trace: Trace;
4
4
  };
@@ -1,4 +1,4 @@
1
- import { TraceContext } from '../../../types';
1
+ import type { TraceContext } from '../../../types';
2
2
  type TraceInfoProps = {
3
3
  traceContext: TraceContext;
4
4
  };
@@ -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 {};
@@ -1,3 +1,3 @@
1
- import React from 'react';
2
- import { Integration, IntegrationData } from './integrations/integration';
1
+ import type React from 'react';
2
+ import type { Integration, IntegrationData } from './integrations/integration';
3
3
  export declare function connectToSidecar(sidecarUrl: string, contentTypeToIntegrations: Map<string, Integration<unknown>[]>, setIntegrationData: React.Dispatch<React.SetStateAction<IntegrationData<unknown>>>, setOnline: React.Dispatch<React.SetStateAction<boolean>>): () => void;
@@ -10,7 +10,7 @@ export type RingChartProps = React.HTMLAttributes<SVGSVGElement> & {
10
10
  */
11
11
  barWidth?: number;
12
12
  onHoverActions?: (() => void)[];
13
- onUnhover?: () => void;
13
+ onBlur?: () => void;
14
14
  /**
15
15
  * Endcaps on the progress bar
16
16
  */
@@ -24,5 +24,5 @@ export type RingChartProps = React.HTMLAttributes<SVGSVGElement> & {
24
24
  x?: number;
25
25
  y?: number;
26
26
  };
27
- declare function RingChart({ values, maxValues, size, barWidth, text, textCss, segmentColors, backgroundColors, progressEndcaps, onHoverActions, onUnhover, ...p }: RingChartProps): import("react/jsx-runtime").JSX.Element;
27
+ declare function RingChart({ values, maxValues, size, barWidth, text, textCss, segmentColors, backgroundColors, progressEndcaps, onHoverActions, onBlur, ...p }: RingChartProps): import("react/jsx-runtime").JSX.Element;
28
28
  export default RingChart;
@@ -1,4 +1,4 @@
1
- import { ReactNode } from 'react';
1
+ import { type ReactNode } from 'react';
2
2
  export type TooltipProps = {
3
3
  content: string | ReactNode;
4
4
  position?: 'top' | 'bottom' | 'left' | 'right';
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.2.1",
4
+ "version": "2.4.0-next.0",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "files": [