@spotlightjs/overlay 2.6.0 → 2.7.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 (74) hide show
  1. package/dist/App.d.ts +2 -1
  2. package/dist/components/CardList.d.ts +1 -0
  3. package/dist/components/CopyToClipboard.d.ts +3 -0
  4. package/dist/components/Debugger.d.ts +3 -2
  5. package/dist/{integrations/sentry/components/developerInfo → components}/JsonViewer.d.ts +4 -4
  6. package/dist/components/OpenInEditor.d.ts +3 -0
  7. package/dist/components/Overview.d.ts +3 -2
  8. package/dist/components/Tabs.d.ts +2 -1
  9. package/dist/components/Time.d.ts +0 -1
  10. package/dist/components/TimeSince.d.ts +0 -1
  11. package/dist/components/Trigger.d.ts +2 -1
  12. package/dist/constants.d.ts +2 -1
  13. package/dist/index.d.ts +4 -3
  14. package/dist/integrations/console/console-tab.d.ts +2 -1
  15. package/dist/integrations/console/index.d.ts +4 -3
  16. package/dist/integrations/hydration-error/index.d.ts +2 -1
  17. package/dist/integrations/integration.d.ts +4 -2
  18. package/dist/integrations/sentry/components/DateTime.d.ts +0 -1
  19. package/dist/integrations/sentry/components/HiddenItemsButton.d.ts +2 -1
  20. package/dist/integrations/sentry/components/PlatformIcon.d.ts +1 -0
  21. package/dist/integrations/sentry/components/developerInfo/EnvelopeDetails.d.ts +3 -2
  22. package/dist/integrations/sentry/components/events/Event.d.ts +2 -1
  23. package/dist/integrations/sentry/components/events/EventBreadcrumbs.d.ts +1 -0
  24. package/dist/integrations/sentry/components/events/EventContexts.d.ts +1 -0
  25. package/dist/integrations/sentry/components/events/EventList.d.ts +3 -1
  26. package/dist/integrations/sentry/components/events/error/Error.d.ts +2 -1
  27. package/dist/integrations/sentry/components/events/error/Frame.d.ts +1 -0
  28. package/dist/integrations/sentry/components/performance/webVitals/PerformanceChart.d.ts +2 -1
  29. package/dist/integrations/sentry/components/traces/TraceDetails/components/TraceContext.d.ts +5 -0
  30. package/dist/integrations/sentry/components/traces/TraceDetails/components/TraceDetailHeader.d.ts +7 -0
  31. package/dist/integrations/sentry/components/traces/TraceDetails/components/TraceTreeview.d.ts +6 -0
  32. package/dist/integrations/sentry/components/traces/TraceIcon.d.ts +2 -1
  33. package/dist/integrations/sentry/components/traces/spans/SpanDetails.d.ts +1 -0
  34. package/dist/integrations/sentry/components/traces/spans/SpanItem.d.ts +6 -5
  35. package/dist/integrations/sentry/components/traces/spans/SpanTree.d.ts +1 -0
  36. package/dist/integrations/sentry/constants.d.ts +1 -0
  37. package/dist/integrations/sentry/data/sentryDataCache.d.ts +2 -1
  38. package/dist/integrations/sentry/data/sentryEventsContext.d.ts +3 -3
  39. package/dist/integrations/sentry/data/useSentryEnvelopes.d.ts +2 -2
  40. package/dist/integrations/sentry/data/useSentryEvents.d.ts +1 -1
  41. package/dist/integrations/sentry/data/useSentrySdks.d.ts +1 -1
  42. package/dist/integrations/sentry/data/useSentrySpans.d.ts +1 -0
  43. package/dist/integrations/sentry/data/useSentryTraces.d.ts +1 -1
  44. package/dist/integrations/sentry/hooks/useMouseTracking.d.ts +159 -160
  45. package/dist/integrations/sentry/index.d.ts +7 -7
  46. package/dist/integrations/sentry/sentry-integration.d.ts +3 -2
  47. package/dist/integrations/sentry/types.d.ts +4 -3
  48. package/dist/integrations/sentry/utils/traces.d.ts +1 -0
  49. package/dist/integrations/sentry/utils/webVitals.d.ts +2 -1
  50. package/dist/integrations/vite-inspect/index.d.ts +2 -1
  51. package/dist/lib/useSpotlightContext.d.ts +10 -3
  52. package/dist/react-instance.d.ts +3 -2
  53. package/dist/sentry-spotlight.iife.js +129 -128
  54. package/dist/sentry-spotlight.iife.js.map +1 -1
  55. package/dist/sentry-spotlight.js +29593 -23
  56. package/dist/sentry-spotlight.js.map +1 -1
  57. package/dist/sidecar.d.ts +2 -1
  58. package/dist/types.d.ts +2 -1
  59. package/dist/ui/Badge/Badge.d.ts +2 -1
  60. package/dist/ui/Chart/RingChart/RingChart.d.ts +0 -1
  61. package/dist/ui/SidePanel/SidePanel.d.ts +2 -1
  62. package/dist/ui/Tooltip/Tooltip.d.ts +2 -1
  63. package/dist/utils/remvoveURLSuffix.d.ts +1 -0
  64. package/package.json +28 -28
  65. package/dist/index-1149361f.js +0 -27326
  66. package/dist/index-1149361f.js.map +0 -1
  67. package/dist/integrations/sentry/components/traces/TraceDetails.d.ts +0 -1
  68. package/dist/integrations/sentry/components/traces/traceDetail/TraceDetailHeader.d.ts +0 -4
  69. package/dist/integrations/sentry/components/traces/traceInfo/TraceGeneralInfo.d.ts +0 -6
  70. package/dist/integrations/sentry/components/traces/traceInfo/TraceTags.d.ts +0 -6
  71. package/dist/integrations/sentry/components/traces/traceInfo/index.d.ts +0 -6
  72. package/dist/main-75aabe1c.js +0 -2784
  73. package/dist/main-75aabe1c.js.map +0 -1
  74. /package/dist/integrations/sentry/components/traces/{traceDetail → TraceDetails}/index.d.ts +0 -0
package/dist/App.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import type { SpotlightOverlayOptions } from './types';
1
+ import { SpotlightOverlayOptions } from './types';
2
+
2
3
  type AppProps = Omit<SpotlightOverlayOptions, 'debug' | 'injectImmediately'> & Required<Pick<SpotlightOverlayOptions, 'sidecarUrl'>>;
3
4
  export default function App({ openOnInit, showTriggerButton, integrations, sidecarUrl, anchor, fullPage, showClearEventsButton, initialEvents, }: AppProps): import("react/jsx-runtime").JSX.Element;
4
5
  export {};
@@ -1,2 +1,3 @@
1
1
  import { ComponentPropsWithoutRef } from 'react';
2
+
2
3
  export default function CardList(props: Omit<ComponentPropsWithoutRef<'div'>, 'className'>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export default function CopyToClipboard({ data }: {
2
+ data: string;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,6 @@
1
- import type { Integration, IntegrationData } from '../integrations/integration';
2
- import type { NotificationCount } from '../types';
1
+ import { Integration, IntegrationData } from '../integrations/integration';
2
+ import { NotificationCount } from '../types';
3
+
3
4
  export default function Debugger({ integrations, isOpen, setOpen, integrationData, isOnline, setTriggerButtonCount: setNotificationCount, fullPage, showClearEventsButton, }: {
4
5
  integrations: Integration[];
5
6
  isOpen: boolean;
@@ -1,10 +1,10 @@
1
- import { Envelope, EnvelopeItem } from '@sentry/types';
2
- import { RawEventContext } from '../../../../integrations/integration';
3
- export default function JsonViewer({ data, onUpdateData, editingEnabled, clipboardEnabled, displayDataTypes, quotesOnKeys, }: {
4
- data: Envelope[0] | EnvelopeItem | RawEventContext;
1
+ export default function JsonViewer({ data, onUpdateData, editingEnabled, clipboardEnabled, displayDataTypes, quotesOnKeys, name, collapseStringsAfterLength, }: {
2
+ data: object;
5
3
  onUpdateData?: (value: unknown) => void;
6
4
  editingEnabled?: boolean;
7
5
  clipboardEnabled?: boolean;
8
6
  displayDataTypes?: boolean;
9
7
  quotesOnKeys?: boolean;
8
+ name?: string | null | false;
9
+ collapseStringsAfterLength?: number;
10
10
  }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export default function OpenInEditor({ file }: {
2
+ file: string;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,6 @@
1
- import type { Integration, IntegrationData } from '../integrations/integration';
2
- import type { NotificationCount } from '../types';
1
+ import { Integration, IntegrationData } from '../integrations/integration';
2
+ import { NotificationCount } from '../types';
3
+
3
4
  export default function Overview({ integrations, integrationData, setTriggerButtonCount, setOpen, }: {
4
5
  integrations: Integration[];
5
6
  integrationData: IntegrationData<unknown>;
@@ -1,4 +1,5 @@
1
- import { type IntegrationTab } from '../integrations/integration';
1
+ import { IntegrationTab } from '../integrations/integration';
2
+
2
3
  export type Props = {
3
4
  /**
4
5
  * Array of tabs to display.
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export default function Time({ date, ...props }: {
3
2
  date: string | number | Date;
4
3
  format?: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export default function TimeSince({ date, ...props }: {
3
2
  date: string | number | Date;
4
3
  } & React.ComponentProps<'time'>): import("react/jsx-runtime").JSX.Element | null;
@@ -1,4 +1,5 @@
1
- import { NotificationCount, type AnchorConfig } from '../types';
1
+ import { NotificationCount, AnchorConfig } from '../types';
2
+
2
3
  export default function Trigger({ isOpen, setOpen, notificationCount, anchor, }: {
3
4
  isOpen: boolean;
4
5
  setOpen: (value: boolean) => void;
@@ -1,4 +1,5 @@
1
- export declare const DEFAULT_SIDECAR_URL = "http://localhost:8969/stream";
1
+ export declare const DEFAULT_SIDECAR_URL = "http://localhost:8969";
2
+ export declare const DEFAULT_SIDECAR_STREAM_URL: string;
2
3
  export declare const DEFAULT_EXPERIMENTS: {
3
4
  'sentry:focus-local-events': boolean;
4
5
  };
package/dist/index.d.ts CHANGED
@@ -1,14 +1,15 @@
1
1
  import { CONTEXT_LINES_ENDPOINT } from '@spotlightjs/sidecar/constants';
2
- import { DEFAULT_ANCHOR, DEFAULT_EXPERIMENTS, DEFAULT_SIDECAR_URL } from './constants';
2
+ import { DEFAULT_ANCHOR, DEFAULT_EXPERIMENTS, DEFAULT_SIDECAR_STREAM_URL } from './constants';
3
3
  import { off, on, trigger } from './lib/eventTarget';
4
4
  import { React, ReactDOM } from './react-instance';
5
- import type { SpotlightOverlayOptions } from './types';
5
+ import { SpotlightOverlayOptions } from './types';
6
+
6
7
  export { default as console } from './integrations/console/index';
7
8
  export { default as hydrationError } from './integrations/hydration-error/index';
8
9
  export { default as sentry } from './integrations/sentry/index';
9
10
  export { default as viteInspect } from './integrations/vite-inspect/index';
10
11
  export type { SpotlightOverlayOptions, WindowWithSpotlight } from './types';
11
- export { CONTEXT_LINES_ENDPOINT, DEFAULT_ANCHOR, DEFAULT_EXPERIMENTS, DEFAULT_SIDECAR_URL, React, ReactDOM, off, on, trigger, };
12
+ export { CONTEXT_LINES_ENDPOINT, DEFAULT_ANCHOR, DEFAULT_EXPERIMENTS, DEFAULT_SIDECAR_STREAM_URL as DEFAULT_SIDECAR_URL, off, on, React, ReactDOM, trigger, };
12
13
  /**
13
14
  * Open the Spotlight debugger Window
14
15
  */
@@ -1,4 +1,5 @@
1
- import type { ConsoleMessage } from './types';
1
+ import { ConsoleMessage } from './types';
2
+
2
3
  type Props = {
3
4
  processedEvents?: ConsoleMessage[];
4
5
  };
@@ -1,5 +1,6 @@
1
- import ConsoleTab from './console-tab';
2
- import type { ConsoleMessage } from './types';
1
+ import { default as ConsoleTab } from './console-tab';
2
+ import { ConsoleMessage } from './types';
3
+
3
4
  /**
4
5
  * This integration is meant to run on the same page where
5
6
  * the Spotlight UI is running. For standalone UI cases such
@@ -21,7 +22,7 @@ export default function consoleIntegration(): {
21
22
  content: typeof ConsoleTab;
22
23
  }[];
23
24
  setup: () => void;
24
- processEvent({ data }: import("../integration").RawEventContext): {
25
+ processEvent({ data }: import('../integration').RawEventContext): {
25
26
  event: ConsoleMessage;
26
27
  };
27
28
  };
@@ -1,4 +1,5 @@
1
- import HydrationErrorDisplay from './HydrationErrorDisplay';
1
+ import { default as HydrationErrorDisplay } from './HydrationErrorDisplay';
2
+
2
3
  export default function hydrationErrorIntegration(): {
3
4
  name: string;
4
5
  tabs: () => {
@@ -1,9 +1,11 @@
1
- import type { ComponentType } from 'react';
2
- import type { ExperimentsConfig, NotificationCount } from '../types';
1
+ import { ComponentType } from 'react';
2
+ import { ExperimentsConfig, NotificationCount } from '../types';
3
+
3
4
  export type SpotlightContext = {
4
5
  open: (path: string | undefined) => void;
5
6
  close: () => void;
6
7
  experiments: ExperimentsConfig;
8
+ sidecarUrl: string;
7
9
  };
8
10
  export type Integration<T = any> = {
9
11
  /**
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export default function DateTime({ date, ...props }: {
3
2
  date: string | number | Date;
4
3
  } & React.ComponentProps<'time'>): import("react/jsx-runtime").JSX.Element | null;
@@ -1,4 +1,5 @@
1
- import type { ComponentProps } from 'react';
1
+ import { ComponentProps } from 'react';
2
+
2
3
  export default function HiddenItemsButton({ itemCount, ...props }: Omit<ComponentProps<'button'>, 'className' | 'children'> & {
3
4
  itemCount: number;
4
5
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,6 @@
1
1
  import { SentryEvent } from '../types';
2
2
  import { ComponentPropsWithoutRef } from 'react';
3
+
3
4
  type Platform = 'python' | 'javascript' | 'node' | 'ruby' | 'csharp' | string;
4
5
  export default function PlatformIcon({ platform, event, size, width, height, title, ...props }: ComponentPropsWithoutRef<'svg'> & {
5
6
  size?: number;
@@ -1,5 +1,6 @@
1
- import type { Envelope } from '@sentry/types';
2
- import type { RawEventContext } from '../../../../integrations/integration';
1
+ import { Envelope } from '@sentry/types';
2
+ import { RawEventContext } from '../../../integration';
3
+
3
4
  export default function EnvelopeDetails({ data }: {
4
5
  data: {
5
6
  envelope: Envelope;
@@ -1,4 +1,5 @@
1
- import type { SentryEvent } from '../../types';
1
+ import { SentryEvent } from '../../types';
2
+
2
3
  export declare function EventTitle({ event }: {
3
4
  event: SentryEvent;
4
5
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,5 @@
1
1
  import { SentryEvent } from '../../types';
2
+
2
3
  export default function EventBreadcrumbs({ event }: {
3
4
  event: SentryEvent;
4
5
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,5 @@
1
1
  import { SentryEvent } from '../../types';
2
+
2
3
  export default function EventContexts({ event }: {
3
4
  event: SentryEvent;
4
5
  }): import("react/jsx-runtime").JSX.Element;
@@ -1 +1,3 @@
1
- export default function EventList(): import("react/jsx-runtime").JSX.Element;
1
+ export default function EventList({ traceId }: {
2
+ traceId?: string;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,5 @@
1
- import type { SentryErrorEvent } from '../../../types';
1
+ import { SentryErrorEvent } from '../../../types';
2
+
2
3
  export declare function ErrorTitle({ event }: {
3
4
  event: SentryErrorEvent;
4
5
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,5 @@
1
1
  import { EventFrame } from '../../../types';
2
+
2
3
  export default function Frame({ frame, defaultExpand, platform, }: {
3
4
  frame: EventFrame;
4
5
  defaultExpand: boolean;
@@ -1,4 +1,5 @@
1
- import type { MetricScoreProps, MetricWeightsProps } from '../../../../../integrations/sentry/types';
1
+ import { MetricScoreProps, MetricWeightsProps } from '../../../types';
2
+
2
3
  type PerformanceChartProps = {
3
4
  metricScore: MetricScoreProps;
4
5
  metricWeights: MetricWeightsProps;
@@ -0,0 +1,5 @@
1
+ type TraceContextProps = {
2
+ traceId: string;
3
+ };
4
+ export default function TraceContext({ traceId }: TraceContextProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,7 @@
1
+ import { Trace } from '../../../../types';
2
+
3
+ type TraceDetailHeaderProps = {
4
+ trace: Trace;
5
+ };
6
+ export default function TraceDetailHeader({ trace }: TraceDetailHeaderProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,6 @@
1
+ type TraceTreeViewProps = {
2
+ traceId: string;
3
+ };
4
+ export declare const DEFAULT_SPAN_NODE_WIDTH = 50;
5
+ export default function TraceTreeview({ traceId }: TraceTreeViewProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -1,4 +1,5 @@
1
- import type { Trace } from '../../types';
1
+ import { Trace } from '../../types';
2
+
2
3
  export type TraceIconProps = {
3
4
  trace: Trace;
4
5
  };
@@ -1,4 +1,5 @@
1
1
  import { Span, TraceContext } from '../../../types';
2
+
2
3
  export default function SpanDetails({ traceContext, span, startTimestamp, totalDuration, totalTransactions, }: {
3
4
  traceContext: TraceContext;
4
5
  span: Span;
@@ -1,13 +1,14 @@
1
- import type { Span, TraceContext } from '../../../types';
1
+ import { Span, TraceContext } from '../../../types';
2
+
2
3
  declare const SpanItem: ({ span, startTimestamp, totalDuration, depth, traceContext, totalTransactions, spanNodeWidth, setSpanNodeWidth, query, }: {
3
4
  span: Span;
4
5
  startTimestamp: number;
5
6
  totalDuration: number;
6
- depth?: number | undefined;
7
+ depth?: number;
7
8
  traceContext: TraceContext;
8
- totalTransactions?: number | undefined;
9
+ totalTransactions?: number;
9
10
  spanNodeWidth: number;
10
- setSpanNodeWidth?: ((val: number) => void) | undefined;
11
- query?: string | undefined;
11
+ setSpanNodeWidth?: (val: number) => void;
12
+ query?: string;
12
13
  }) => import("react/jsx-runtime").JSX.Element;
13
14
  export default SpanItem;
@@ -1,4 +1,5 @@
1
1
  import { Span, TraceContext } from '../../../types';
2
+
2
3
  export default function SpanTree({ traceContext, tree, startTimestamp, totalDuration, depth, totalTransactions, spanNodeWidth, setSpanNodeWidth, query, }: {
3
4
  traceContext: TraceContext;
4
5
  tree: Span[];
@@ -1,3 +1,4 @@
1
+ export declare const DB_SPAN_REGEX: RegExp;
1
2
  export declare const RESOURCES_SORT_KEYS: {
2
3
  avgDuration: string;
3
4
  timeSpent: string;
@@ -1,6 +1,7 @@
1
1
  import { Envelope } from '@sentry/types';
2
- import { RawEventContext } from '../../../integrations/integration';
2
+ import { RawEventContext } from '../../integration';
3
3
  import { Sdk, SentryErrorEvent, SentryEvent, Span, Trace } from '../types';
4
+
4
5
  type OnlineSubscription = ['online', (status: boolean) => void];
5
6
  type EventSubscription = ['event', (event: SentryEvent) => void];
6
7
  type TraceSubscription = ['trace', (trace: Trace) => void];
@@ -1,6 +1,6 @@
1
- import type { ReactNode } from 'react';
2
- import React from 'react';
3
- import type { SentryEvent } from '../types';
1
+ import { ReactNode, default as React } from 'react';
2
+ import { SentryEvent } from '../types';
3
+
4
4
  interface SetEventsAction {
5
5
  e: SentryEvent | SentryEvent[];
6
6
  action: string;
@@ -1,4 +1,4 @@
1
1
  export declare const useSentryEnvelopes: () => {
2
- envelope: import("@sentry/types").Envelope;
3
- rawEnvelope: import("../../integration").RawEventContext;
2
+ envelope: import('@sentry/types').Envelope;
3
+ rawEnvelope: import('../../integration').RawEventContext;
4
4
  }[][];
@@ -1 +1 @@
1
- export declare const useSentryEvents: () => import("../types").SentryEvent[];
1
+ export declare const useSentryEvents: (traceId?: string) => import('../types').SentryEvent[];
@@ -1 +1 @@
1
- export declare const useSentrySdks: () => import("../types").Sdk[];
1
+ export declare const useSentrySdks: () => import('../types').Sdk[];
@@ -1,2 +1,3 @@
1
1
  import { Span } from '../types';
2
+
2
3
  export declare const useSentrySpans: () => Span[][];
@@ -1 +1 @@
1
- export declare const useSentryTraces: () => import("../types").Trace[];
1
+ export declare const useSentryTraces: () => import('../types').Trace[];