@spotlightjs/overlay 0.0.16 → 0.0.18

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.
@@ -0,0 +1,2 @@
1
+ import { ComponentPropsWithoutRef } from 'react';
2
+ export default function CardList(props: Omit<ComponentPropsWithoutRef<'div'>, 'className'>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { ComponentPropsWithoutRef, type ReactNode } from 'react';
2
+ export declare function SidePanelHeader({ title, subtitle, backTo, }: {
3
+ title: ReactNode;
4
+ subtitle?: ReactNode;
5
+ backTo: string;
6
+ }): import("react/jsx-runtime").JSX.Element;
7
+ export default function SidePanel(props: Omit<ComponentPropsWithoutRef<'div'>, 'className'>): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { IntegrationTab } from '../integrations/integration';
1
+ import { type IntegrationTab } from '../integrations/integration';
2
2
  export type Props = {
3
3
  /**
4
4
  * Array of tabs to display.
package/dist/index.d.ts CHANGED
@@ -15,7 +15,17 @@ export declare function closeSpotlight(): Promise<void>;
15
15
  * Invokes the passed in callback when the Spotlight debugger Window is closed
16
16
  */
17
17
  export declare function onClose(cb: () => void): Promise<void>;
18
- export declare function init({ fullScreen, showTriggerButton, integrations, defaultEventId, injectImmediately, sidecar, anchor, debug, }?: {
18
+ /**
19
+ * Invokes the passed in callback when the Spotlight debugger Window is opened
20
+ */
21
+ export declare function onOpen(cb: () => void): Promise<void>;
22
+ /**
23
+ * Register a callback that is invoked when a severe event is processed
24
+ * by a Spotlight integration.
25
+ * A count of the number of collected severe events is passed to the callback.
26
+ */
27
+ export declare function onSevereEvent(cb: (count: number) => void): Promise<void>;
28
+ export declare function init({ fullScreen, showTriggerButton, defaultEventId, injectImmediately, sidecar, anchor, debug, integrations, }?: {
19
29
  integrations?: Integration[];
20
30
  fullScreen?: boolean;
21
31
  defaultEventId?: string;
@@ -57,7 +57,6 @@ export type IntegrationTab<T> = {
57
57
  processedEvents: T[];
58
58
  }>;
59
59
  onSelect?: () => void;
60
- active?: boolean;
61
60
  };
62
61
  export type ProcessedEventContainer<T> = {
63
62
  /**
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  export default function Time({ date, ...props }: {
3
3
  date: string | number | Date;
4
+ format?: string;
4
5
  } & React.ComponentProps<'time'>): import("react/jsx-runtime").JSX.Element | null;
@@ -2,7 +2,10 @@ import type { Envelope } from '@sentry/types';
2
2
  import type { RawEventContext, Severity } from '../integration';
3
3
  import ErrorsTab from './tabs/ErrorsTab';
4
4
  import SdksTab from './tabs/SdksTab';
5
- export default function sentryIntegration(): {
5
+ type SentryIntegrationOptions = {
6
+ sidecarUrl?: string;
7
+ };
8
+ export default function sentryIntegration(options?: SentryIntegrationOptions): {
6
9
  name: string;
7
10
  forwardedContentType: string[];
8
11
  setup: () => void;
@@ -26,3 +29,4 @@ export declare function processEnvelope({ data }: RawEventContext): {
26
29
  event: Envelope;
27
30
  severity: Severity;
28
31
  };
32
+ export {};
@@ -1,5 +1,17 @@
1
1
  import { EventProcessor, Hub, Integration } from '@sentry/types';
2
+ type SpotlightBrowserIntegationOptions = {
3
+ /**
4
+ * The URL of the Sidecar instance to connect and forward events to.
5
+ * If not set, Spotlight will try to connect to the Sidecar running on localhost:8969.
6
+ *
7
+ * @default "http://localhost:8969/stream"
8
+ */
9
+ sidecarUrl?: string;
10
+ };
2
11
  export declare class Spotlight implements Integration {
3
12
  name: string;
13
+ private _sidecarUrl;
14
+ constructor(options?: SpotlightBrowserIntegationOptions);
4
15
  setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void;
5
16
  }
17
+ export {};
@@ -29,18 +29,18 @@ export type EventException = {
29
29
  values: undefined;
30
30
  value: EventExceptionValue;
31
31
  };
32
- export type Breadcrumbs = {
33
- values: {
34
- message: string;
35
- category: string;
36
- timestamp: string;
37
- type: string | 'default';
38
- }[];
32
+ export type Breadcrumb = {
33
+ message: string;
34
+ category: string;
35
+ timestamp: string;
36
+ type: string | 'default';
39
37
  };
40
38
  type CommonEventAttrs = {
41
39
  event_id: string;
42
40
  timestamp: number;
43
- breadcrumbs?: Breadcrumbs;
41
+ breadcrumbs?: Breadcrumb[] | {
42
+ values: Breadcrumb[];
43
+ };
44
44
  transaction?: string;
45
45
  environment?: string;
46
46
  platform?: string;
@@ -74,14 +74,14 @@ export type Tags = {
74
74
  [key: string]: string;
75
75
  };
76
76
  export type SentryErrorEvent = CommonEventAttrs & {
77
- type?: 'error' | 'default';
77
+ type?: 'error' | 'event' | 'default';
78
78
  exception: EventException;
79
79
  };
80
80
  export type Span = {
81
81
  trace_id: string;
82
82
  span_id: string;
83
83
  parent_span_id?: string | null;
84
- op: string;
84
+ op?: string | null;
85
85
  description?: string | null;
86
86
  start_timestamp: number;
87
87
  tags?: Tags | null;
@@ -89,6 +89,7 @@ export type Span = {
89
89
  status: 'ok' | string;
90
90
  transaction?: SentryTransactionEvent;
91
91
  children?: Span[];
92
+ data?: Record<string, unknown>;
92
93
  };
93
94
  export type SentryTransactionEvent = CommonEventAttrs & {
94
95
  type: 'transaction';
@@ -0,0 +1 @@
1
+ export declare function formatBytes(bytes: number, decimals?: number): string;