@vistagenic/vista 0.3.0 → 0.3.2

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.
@@ -4,18 +4,32 @@
4
4
  * Standalone dev error UI with Next.js-style pagination and controls.
5
5
  */
6
6
  import React from 'react';
7
+ export interface VistaErrorLocation {
8
+ file: string;
9
+ line?: number;
10
+ column?: number;
11
+ codeFrame?: string;
12
+ kind?: 'source' | 'server' | 'client' | 'log';
13
+ }
7
14
  export interface VistaError {
8
15
  type: 'build' | 'runtime' | 'hydration';
16
+ source?: 'server' | 'client';
9
17
  message: string;
10
18
  stack?: string;
11
19
  file?: string;
12
20
  line?: number;
13
21
  column?: number;
14
22
  codeFrame?: string;
23
+ related?: VistaErrorLocation[];
24
+ hint?: string;
15
25
  }
16
26
  interface ErrorOverlayProps {
17
27
  errors: VistaError[];
18
28
  }
29
+ export declare function fromCaughtError(error: unknown, options?: {
30
+ type?: VistaError['type'];
31
+ source?: 'server' | 'client';
32
+ }): VistaError;
19
33
  /**
20
34
  * Render a full HTML error page.
21
35
  * Engines should send this directly: `res.status(500).send(renderErrorHTML(...))`.