@shuvi/error-overlay 1.0.62 → 2.0.0-dev.4

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/lib/client.js +6 -0
  2. package/lib/middleware/helper/createOriginalStackFrame.d.ts +2 -2
  3. package/lib/middleware/helper/createOriginalStackFrame.js +4 -0
  4. package/lib/middleware/helper/getModuleById.d.ts +2 -2
  5. package/lib/middleware/helper/getModuleById.js +8 -0
  6. package/lib/middleware/helper/getOriginalStackFrame.d.ts +2 -2
  7. package/lib/middleware/helper/getOriginalStackFrame.js +16 -7
  8. package/lib/middleware/helper/getSourceById.d.ts +2 -2
  9. package/lib/middleware/helper/getSourceById.js +12 -0
  10. package/lib/middleware/stackFrameMiddleware.js +5 -1
  11. package/package.json +3 -3
  12. package/umd/index.js +6 -0
  13. package/umd/client.d.ts +0 -15
  14. package/umd/constants.d.ts +0 -7
  15. package/umd/iframeScript.d.ts +0 -1
  16. package/umd/index.d.ts +0 -2
  17. package/umd/middleware/helper/createOriginalStackFrame.d.ts +0 -15
  18. package/umd/middleware/helper/findOriginalSourcePositionAndContent.d.ts +0 -7
  19. package/umd/middleware/helper/getModuleById.d.ts +0 -2
  20. package/umd/middleware/helper/getOriginalStackFrame.d.ts +0 -6
  21. package/umd/middleware/helper/getSourceById.d.ts +0 -6
  22. package/umd/middleware/helper/getSourceMapUrl.d.ts +0 -1
  23. package/umd/middleware/helper/getSourcePath.d.ts +0 -1
  24. package/umd/middleware/index.d.ts +0 -2
  25. package/umd/middleware/launchEditorMiddleware.d.ts +0 -2
  26. package/umd/middleware/stackFrameMiddleware.d.ts +0 -2
  27. package/umd/view/ErrorOverlay.d.ts +0 -2
  28. package/umd/view/components/Dialog/Dialog.d.ts +0 -10
  29. package/umd/view/components/Dialog/DialogBody.d.ts +0 -7
  30. package/umd/view/components/Dialog/DialogContent.d.ts +0 -7
  31. package/umd/view/components/Dialog/DialogHeader.d.ts +0 -7
  32. package/umd/view/components/Dialog/index.d.ts +0 -5
  33. package/umd/view/components/Dialog/styles.d.ts +0 -2
  34. package/umd/view/components/Errors/CallStackFrame/CallStackFrame.d.ts +0 -10
  35. package/umd/view/components/Errors/CallStackFrame/index.d.ts +0 -1
  36. package/umd/view/components/Errors/CodeFrame/CodeFrame.d.ts +0 -7
  37. package/umd/view/components/Errors/CodeFrame/index.d.ts +0 -1
  38. package/umd/view/components/Errors/Errors.d.ts +0 -7
  39. package/umd/view/components/Errors/index.d.ts +0 -2
  40. package/umd/view/components/Errors/styles.d.ts +0 -1
  41. package/umd/view/components/Icons/ArrowLeftIcon.d.ts +0 -3
  42. package/umd/view/components/Icons/ArrowRightIcon.d.ts +0 -3
  43. package/umd/view/components/Icons/CloseIcon.d.ts +0 -3
  44. package/umd/view/components/Icons/ExternalLinkIcon.d.ts +0 -3
  45. package/umd/view/components/Icons/WarningIcon.d.ts +0 -3
  46. package/umd/view/components/Icons/index.d.ts +0 -5
  47. package/umd/view/components/NavigationBar/NavigationBar.d.ts +0 -10
  48. package/umd/view/components/NavigationBar/index.d.ts +0 -2
  49. package/umd/view/components/NavigationBar/styles.d.ts +0 -2
  50. package/umd/view/components/Overlay/Overlay.d.ts +0 -8
  51. package/umd/view/components/Overlay/body-locker.d.ts +0 -2
  52. package/umd/view/components/Overlay/index.d.ts +0 -2
  53. package/umd/view/components/Overlay/styles.d.ts +0 -2
  54. package/umd/view/components/ShadowPortal.d.ts +0 -5
  55. package/umd/view/components/Terminal/Terminal.d.ts +0 -5
  56. package/umd/view/components/Terminal/index.d.ts +0 -2
  57. package/umd/view/components/Terminal/styles.d.ts +0 -2
  58. package/umd/view/components/Toast/Toast.d.ts +0 -7
  59. package/umd/view/components/Toast/index.d.ts +0 -2
  60. package/umd/view/components/Toast/styles.d.ts +0 -2
  61. package/umd/view/container/BuildError.d.ts +0 -6
  62. package/umd/view/container/RuntimeError.d.ts +0 -11
  63. package/umd/view/container/index.d.ts +0 -2
  64. package/umd/view/errorTypeHandler.d.ts +0 -27
  65. package/umd/view/helpers/getErrorByType.d.ts +0 -9
  66. package/umd/view/helpers/nodeStackFrames.d.ts +0 -7
  67. package/umd/view/helpers/noop-template.d.ts +0 -1
  68. package/umd/view/helpers/parseStack.d.ts +0 -3
  69. package/umd/view/helpers/stack-frame.d.ts +0 -12
  70. package/umd/view/hooks/use-on-click-outside.d.ts +0 -1
  71. package/umd/view/styles/Base.d.ts +0 -2
  72. package/umd/view/styles/ComponentStyles.d.ts +0 -2
  73. package/umd/view/styles/CssReset.d.ts +0 -2
  74. package/umd/view/styles/index.d.ts +0 -3
package/lib/client.js CHANGED
@@ -123,6 +123,12 @@ function applyStyles(element, styles) {
123
123
  }
124
124
  }
125
125
  function update() {
126
+ // extensions does not support inline scripts, error overlay will be blank and block interaction in extensions
127
+ // so we need to remove it
128
+ // protocols list of extensions: moz-extension|chrome-extension|extension|safari-extension|safari-web-extension
129
+ if (window.location.protocol.endsWith('extension:')) {
130
+ return;
131
+ }
126
132
  // Loading iframe can be either sync or async depending on the browser.
127
133
  if (isLoadingIframe) {
128
134
  // Iframe is loading.
@@ -1,5 +1,5 @@
1
1
  import { StackFrame } from 'stacktrace-parser';
2
- import type webpack from '@shuvi/toolpack/lib/webpack';
2
+ import * as Rspack from '@shuvi/toolpack/lib/webpack';
3
3
  export type OriginalStackFrameResponse = {
4
4
  originalStackFrame: StackFrame;
5
5
  originalCodeFrame: string | null;
@@ -11,5 +11,5 @@ export declare function createOriginalStackFrame({ line, column, source, moduleP
11
11
  modulePath?: string;
12
12
  frame: any;
13
13
  errorMessage?: string;
14
- compilation?: webpack.Compilation;
14
+ compilation?: Rspack.Compilation;
15
15
  }): Promise<OriginalStackFrameResponse | null>;
@@ -19,6 +19,10 @@ function createOriginalStackFrame(_a) {
19
19
  var _b, _c, _d, _e, _f, _g, _h;
20
20
  const match = errorMessage === null || errorMessage === void 0 ? void 0 : errorMessage.match(/'([^']+)' module/);
21
21
  const moduleNotFound = match && match[1];
22
+ /**
23
+ * @unsupported Rspack does not support buildInfo.importLocByPath API in the same way as Webpack.
24
+ * TODO: Use Rspack's equivalent API when available or implement alternative import location lookup.
25
+ */
22
26
  const result = moduleNotFound && compilation
23
27
  ? (_e = (_d = (_c = (_b = (0, getModuleById_1.getModuleById)(modulePath, compilation)) === null || _b === void 0 ? void 0 : _b.buildInfo) === null || _c === void 0 ? void 0 : _c.importLocByPath) === null || _d === void 0 ? void 0 : _d.get(moduleNotFound)) !== null && _e !== void 0 ? _e : null
24
28
  : yield (0, findOriginalSourcePositionAndContent_1.findOriginalSourcePositionAndContent)(source, {
@@ -1,2 +1,2 @@
1
- import type webpack from '@shuvi/toolpack/lib/webpack';
2
- export declare function getModuleById(id: string | undefined, compilation: webpack.Compilation): webpack.Module | undefined;
1
+ import * as Rspack from '@shuvi/toolpack/lib/webpack';
2
+ export declare function getModuleById(id: string | undefined, compilation: Rspack.Compilation): Rspack.Module | undefined;
@@ -2,5 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getModuleById = getModuleById;
4
4
  function getModuleById(id, compilation) {
5
+ /**
6
+ * @unsupported Rspack does not support ChunkGraph API in the same way as Webpack.
7
+ * TODO: Use Rspack's equivalent API when available or implement alternative module lookup.
8
+ */
9
+ // return [...compilation.modules].find(
10
+ // searchModule => compilation.chunkGraph.getModuleId(searchModule) === id
11
+ // );
12
+ // Fallback implementation for Rspack
5
13
  return [...compilation.modules].find(searchModule => compilation.chunkGraph.getModuleId(searchModule) === id);
6
14
  }
@@ -1,6 +1,6 @@
1
1
  import type { StackFrame } from 'stacktrace-parser';
2
- import type webpack from '@shuvi/toolpack/lib/webpack';
2
+ import * as Rspack from '@shuvi/toolpack/lib/webpack';
3
3
  import type { Source } from './getSourceById';
4
4
  import type { OriginalStackFrame } from '../../view/helpers/stack-frame';
5
5
  export { OriginalStackFrame };
6
- export declare function getOriginalStackFrame(frame: StackFrame, cache: Map<string, Source | null>, resolveBuildFile: (...paths: string[]) => string, buildDir: string, errorMessage?: string, compilation?: webpack.Compilation): Promise<OriginalStackFrame>;
6
+ export declare function getOriginalStackFrame(frame: StackFrame, cache: Map<string, Source | null>, resolveBuildFile: (...paths: string[]) => string, buildDir: string, errorMessage?: string, compilation?: Rspack.Compilation): Promise<OriginalStackFrame>;
@@ -13,9 +13,14 @@ exports.getOriginalStackFrame = getOriginalStackFrame;
13
13
  const createOriginalStackFrame_1 = require("./createOriginalStackFrame");
14
14
  function getOriginalStackFrame(frame, cache, resolveBuildFile, buildDir, errorMessage, compilation) {
15
15
  return __awaiter(this, void 0, void 0, function* () {
16
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
16
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
17
+ /**
18
+ * @unsupported Rspack may use different internal URL patterns than webpack-internal:.
19
+ * TODO: Update URL pattern detection to match Rspack's internal URL format when available.
20
+ */
17
21
  if (!(((_a = frame.file) === null || _a === void 0 ? void 0 : _a.startsWith('webpack-internal:')) ||
18
- ((_b = frame.file) === null || _b === void 0 ? void 0 : _b.startsWith('file:')))) {
22
+ ((_b = frame.file) === null || _b === void 0 ? void 0 : _b.startsWith('rspack-internal:')) ||
23
+ ((_c = frame.file) === null || _c === void 0 ? void 0 : _c.startsWith('file:')))) {
19
24
  return {
20
25
  error: false,
21
26
  reason: null,
@@ -37,17 +42,21 @@ function getOriginalStackFrame(frame, cache, resolveBuildFile, buildDir, errorMe
37
42
  originalCodeFrame: null
38
43
  };
39
44
  }
40
- const frameLine = parseInt((_d = (_c = frame.lineNumber) === null || _c === void 0 ? void 0 : _c.toString()) !== null && _d !== void 0 ? _d : '', 10);
41
- let frameColumn = parseInt((_f = (_e = frame.column) === null || _e === void 0 ? void 0 : _e.toString()) !== null && _f !== void 0 ? _f : '', 10);
45
+ const frameLine = parseInt((_e = (_d = frame.lineNumber) === null || _d === void 0 ? void 0 : _d.toString()) !== null && _e !== void 0 ? _e : '', 10);
46
+ let frameColumn = parseInt((_g = (_f = frame.column) === null || _f === void 0 ? void 0 : _f.toString()) !== null && _g !== void 0 ? _g : '', 10);
42
47
  if (!frameColumn) {
43
48
  frameColumn = null;
44
49
  }
50
+ /**
51
+ * @unsupported Rspack may use different internal URL patterns than webpack-internal:.
52
+ * TODO: Update URL pattern replacement to match Rspack's internal URL format when available.
53
+ */
45
54
  const originalStackFrameResponse = yield (0, createOriginalStackFrame_1.createOriginalStackFrame)({
46
55
  line: frameLine,
47
56
  column: frameColumn,
48
57
  source: cache.get(frame.file),
49
58
  frame,
50
- modulePath: resolveBuildFile(buildDir, frame.file.replace(/^(webpack-internal:\/\/\/|file:\/\/)/, '')),
59
+ modulePath: resolveBuildFile(buildDir, frame.file.replace(/^(webpack-internal:\/\/\/|rspack-internal:\/\/\/|file:\/\/)/, '')),
51
60
  errorMessage,
52
61
  compilation
53
62
  });
@@ -68,8 +77,8 @@ function getOriginalStackFrame(frame, cache, resolveBuildFile, buildDir, errorMe
68
77
  external: false,
69
78
  expanded: !Boolean(
70
79
  /* collapsed */
71
- (_k = (((_g = frame.file) === null || _g === void 0 ? void 0 : _g.includes('node_modules')) ||
72
- ((_j = (_h = originalStackFrameResponse.originalStackFrame) === null || _h === void 0 ? void 0 : _h.file) === null || _j === void 0 ? void 0 : _j.includes('node_modules')))) !== null && _k !== void 0 ? _k : true),
80
+ (_l = (((_h = frame.file) === null || _h === void 0 ? void 0 : _h.includes('node_modules')) ||
81
+ ((_k = (_j = originalStackFrameResponse.originalStackFrame) === null || _j === void 0 ? void 0 : _j.file) === null || _k === void 0 ? void 0 : _k.includes('node_modules')))) !== null && _l !== void 0 ? _l : true),
73
82
  sourceStackFrame: frame,
74
83
  originalStackFrame: originalStackFrameResponse.originalStackFrame,
75
84
  originalCodeFrame: originalStackFrameResponse.originalCodeFrame || null
@@ -1,6 +1,6 @@
1
1
  import { RawSourceMap } from 'source-map';
2
- import type { webpack } from '@shuvi/toolpack/lib/webpack';
2
+ import * as Rspack from '@shuvi/toolpack/lib/webpack';
3
3
  export type Source = {
4
4
  map: () => RawSourceMap;
5
5
  } | null;
6
- export declare function getSourceById(isFile: boolean, id: string, compiler: webpack.Compiler, resolveBuildFile: (...paths: string[]) => string, buildDir: string, compilation?: webpack.Compilation): Promise<Source>;
6
+ export declare function getSourceById(isFile: boolean, id: string, compiler: Rspack.Compiler, resolveBuildFile: (...paths: string[]) => string, buildDir: string, compilation?: Rspack.Compilation): Promise<Source>;
@@ -42,6 +42,14 @@ const getSourceMapUrl_1 = require("./getSourceMapUrl");
42
42
  const getModuleById_1 = require("./getModuleById");
43
43
  const readFileWrapper = (url, compiler) => {
44
44
  return new Promise(resolve => {
45
+ /**
46
+ * @unsupported Rspack may have different outputFileSystem API.
47
+ * TODO: Verify Rspack's outputFileSystem implementation and update accordingly.
48
+ */
49
+ if (!compiler.outputFileSystem) {
50
+ resolve(null);
51
+ return;
52
+ }
45
53
  compiler.outputFileSystem.readFile(url, (err, res) => {
46
54
  if (err) {
47
55
  resolve(null);
@@ -116,6 +124,10 @@ function getSourceById(isFile, id, compiler, resolveBuildFile, buildDir, compila
116
124
  return null;
117
125
  }
118
126
  const module = (0, getModuleById_1.getModuleById)(id, compilation);
127
+ /**
128
+ * @unsupported Rspack does not support codeGenerationResults API in the same way as Webpack.
129
+ * TODO: Use Rspack's equivalent API when available or implement alternative source extraction.
130
+ */
119
131
  return ((_b = (module &&
120
132
  ((_a = compilation.codeGenerationResults
121
133
  .get(module)) === null || _a === void 0 ? void 0 : _a.sources.get('javascript')))) !== null && _b !== void 0 ? _b : null);
@@ -32,7 +32,11 @@ function stackFrameMiddleware(originalStackFrameEndpoint, bundler, resolveBuildF
32
32
  const collectSourceMaps = (files, compiler, compilation, cache, buildDir) => __awaiter(this, void 0, void 0, function* () {
33
33
  yield Promise.all(files.map((fileName) => __awaiter(this, void 0, void 0, function* () {
34
34
  try {
35
- const moduleId = fileName.replace(/^(webpack-internal:\/\/\/|file:\/\/)/, '');
35
+ /**
36
+ * @unsupported Rspack may use different module resolution patterns than webpack-internal:///.
37
+ * TODO: Update module resolution pattern after confirming Rspack's internal module format.
38
+ */
39
+ const moduleId = fileName.replace(/^(webpack-internal:\/\/\/|file:\/\/|rspack-internal:\/\/\/)/, '');
36
40
  const source = yield (0, getSourceById_1.getSourceById)(fileName.startsWith('file:'), moduleId, compiler, resolveBuildFile, buildDir, compilation);
37
41
  cache.set(fileName, source);
38
42
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shuvi/error-overlay",
3
- "version": "1.0.62",
3
+ "version": "2.0.0-dev.4",
4
4
  "main": "umd/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "files": [
@@ -23,8 +23,8 @@
23
23
  },
24
24
  "dependencies": {
25
25
  "@babel/code-frame": "7.14.5",
26
- "@shuvi/shared": "1.0.62",
27
- "@shuvi/toolpack": "1.0.62",
26
+ "@shuvi/shared": "2.0.0-dev.4",
27
+ "@shuvi/toolpack": "2.0.0-dev.4",
28
28
  "anser": "1.4.9",
29
29
  "data-uri-to-buffer": "3.0.1",
30
30
  "html-entities": "2.3.2",
package/umd/index.js CHANGED
@@ -884,6 +884,12 @@
884
884
  }
885
885
  }
886
886
  function update() {
887
+ // extensions does not support inline scripts, error overlay will be blank and block interaction in extensions
888
+ // so we need to remove it
889
+ // protocols list of extensions: moz-extension|chrome-extension|extension|safari-extension|safari-web-extension
890
+ if (window.location.protocol.endsWith('extension:')) {
891
+ return;
892
+ }
887
893
  // Loading iframe can be either sync or async depending on the browser.
888
894
  if (isLoadingIframe) {
889
895
  // Iframe is loading.
package/umd/client.d.ts DELETED
@@ -1,15 +0,0 @@
1
- declare global {
2
- interface Window {
3
- __SHUVI_ERROR_OVERLAY_GLOBAL_HOOK__: string | {};
4
- }
5
- }
6
- declare function startReportingRuntimeErrors({ onError }: {
7
- onError: () => void;
8
- }): void;
9
- declare function stopReportingRuntimeErrors(): void;
10
- declare function onBuildOk(): void;
11
- declare function onBuildError(message: string): void;
12
- declare function onRefresh(): void;
13
- export { getErrorByType } from './view/helpers/getErrorByType';
14
- export { getServerError } from './view/helpers/nodeStackFrames';
15
- export { onBuildError, onBuildOk, onRefresh, startReportingRuntimeErrors, stopReportingRuntimeErrors };
@@ -1,7 +0,0 @@
1
- export declare const SERVER_TYPE_ERROR = "server";
2
- export declare const TYPE_BUILD_OK = "build-ok";
3
- export declare const TYPE_REFRESH = "fast-refresh";
4
- export declare const TYPE_BUILD_ERROR = "build-error";
5
- export declare const TYPE_UNHANDLED_ERROR = "unhandled-error";
6
- export declare const TYPE_UNHANDLED_REJECTION = "unhandled-rejection";
7
- export declare const STACK_TRACE_LIMIT = 50;
@@ -1 +0,0 @@
1
- export {};
package/umd/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from './client';
2
- export { getServerError } from './view/helpers/nodeStackFrames';
@@ -1,15 +0,0 @@
1
- import { StackFrame } from 'stacktrace-parser';
2
- import type webpack from '@shuvi/toolpack/lib/webpack';
3
- export declare type OriginalStackFrameResponse = {
4
- originalStackFrame: StackFrame;
5
- originalCodeFrame: string | null;
6
- };
7
- export declare function createOriginalStackFrame({ line, column, source, modulePath, frame, errorMessage, compilation }: {
8
- line: number;
9
- column: number | null;
10
- source: any;
11
- modulePath?: string;
12
- frame: any;
13
- errorMessage?: string;
14
- compilation?: webpack.Compilation;
15
- }): Promise<OriginalStackFrameResponse | null>;
@@ -1,7 +0,0 @@
1
- export declare function findOriginalSourcePositionAndContent(webpackSource: any, position: {
2
- line: number;
3
- column: number | null;
4
- }): Promise<{
5
- sourcePosition: NullableMappedPosition;
6
- sourceContent: string | null;
7
- } | null>;
@@ -1,2 +0,0 @@
1
- import type webpack from '@shuvi/toolpack/lib/webpack';
2
- export declare function getModuleById(id: string | undefined, compilation: webpack.Compilation): webpack.Module | undefined;
@@ -1,6 +0,0 @@
1
- import type { StackFrame } from 'stacktrace-parser';
2
- import type webpack from '@shuvi/toolpack/lib/webpack';
3
- import type { Source } from './getSourceById';
4
- import type { OriginalStackFrame } from '../../view/helpers/stack-frame';
5
- export { OriginalStackFrame };
6
- export declare function getOriginalStackFrame(frame: StackFrame, cache: Map<string, Source | null>, resolveBuildFile: (...paths: string[]) => string, buildDir: string, errorMessage?: string, compilation?: webpack.Compilation): Promise<OriginalStackFrame>;
@@ -1,6 +0,0 @@
1
- import { RawSourceMap } from 'source-map';
2
- import type { webpack } from '@shuvi/toolpack/lib/webpack';
3
- export declare type Source = {
4
- map: () => RawSourceMap;
5
- } | null;
6
- export declare function getSourceById(isFile: boolean, id: string, compiler: webpack.Compiler, resolveBuildFile: (...paths: string[]) => string, buildDir: string, compilation?: webpack.Compilation): Promise<Source>;
@@ -1 +0,0 @@
1
- export declare function getSourceMapUrl(fileContents: string): string | null;
@@ -1 +0,0 @@
1
- export declare function getSourcePath(source: string): string;
@@ -1,2 +0,0 @@
1
- export { launchEditorMiddleware } from './launchEditorMiddleware';
2
- export { stackFrameMiddleware } from './stackFrameMiddleware';
@@ -1,2 +0,0 @@
1
- import { IncomingMessage, ServerResponse } from 'http';
2
- export declare function launchEditorMiddleware(launchEditorEndpoint: string, rootDir: string): (req: IncomingMessage, res: ServerResponse, next: Function) => void;
@@ -1,2 +0,0 @@
1
- import { IncomingMessage, ServerResponse } from 'http';
2
- export declare function stackFrameMiddleware(originalStackFrameEndpoint: string, bundler: any, resolveBuildFile: (...paths: string[]) => string, buildDefaultDir: string, buildServerDir: string): (req: IncomingMessage, res: ServerResponse, next: Function) => Promise<any>;
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const ErrorOverlay: () => JSX.Element;
@@ -1,10 +0,0 @@
1
- import * as React from 'react';
2
- export declare type DialogProps = {
3
- type: 'error' | 'warning';
4
- 'aria-labelledby': string;
5
- 'aria-describedby': string;
6
- onClose?: (e: MouseEvent | TouchEvent) => void;
7
- children: React.ReactNode;
8
- };
9
- declare const Dialog: React.FC<DialogProps>;
10
- export { Dialog };
@@ -1,7 +0,0 @@
1
- import * as React from 'react';
2
- export declare type DialogBodyProps = {
3
- className?: string;
4
- children: React.ReactNode;
5
- };
6
- declare const DialogBody: React.FC<DialogBodyProps>;
7
- export { DialogBody };
@@ -1,7 +0,0 @@
1
- import * as React from 'react';
2
- export declare type DialogContentProps = {
3
- className?: string;
4
- children: React.ReactNode;
5
- };
6
- declare const DialogContent: React.FC<DialogContentProps>;
7
- export { DialogContent };
@@ -1,7 +0,0 @@
1
- import * as React from 'react';
2
- export declare type DialogHeaderProps = {
3
- className?: string;
4
- children: React.ReactNode;
5
- };
6
- declare const DialogHeader: React.FC<DialogHeaderProps>;
7
- export { DialogHeader };
@@ -1,5 +0,0 @@
1
- export { Dialog } from './Dialog';
2
- export { DialogBody } from './DialogBody';
3
- export { DialogContent } from './DialogContent';
4
- export { DialogHeader } from './DialogHeader';
5
- export { styles } from './styles';
@@ -1,2 +0,0 @@
1
- declare const styles: string;
2
- export { styles };
@@ -1,10 +0,0 @@
1
- import * as React from 'react';
2
- import { StackFrame } from 'stacktrace-parser';
3
- import { OriginalStackFrame } from '../../../helpers/stack-frame';
4
- export declare type CallStackFrameProps = {
5
- stackFrame: StackFrame;
6
- codeFrame: string;
7
- };
8
- export declare const CallStackFrame: React.FC<{
9
- frame: OriginalStackFrame;
10
- }>;
@@ -1 +0,0 @@
1
- export { CallStackFrame } from './CallStackFrame';
@@ -1,7 +0,0 @@
1
- import * as React from 'react';
2
- import { StackFrame } from 'stacktrace-parser';
3
- export declare type CodeFrameProps = {
4
- stackFrame: StackFrame;
5
- codeFrame: string;
6
- };
7
- export declare const CodeFrame: React.FC<CodeFrameProps>;
@@ -1 +0,0 @@
1
- export { CodeFrame } from './CodeFrame';
@@ -1,7 +0,0 @@
1
- import * as React from 'react';
2
- import { ReadyRuntimeError } from '../../helpers/getErrorByType';
3
- export declare type ErrorsProps = {
4
- error: ReadyRuntimeError;
5
- };
6
- declare const Errors: React.FC<ErrorsProps>;
7
- export { Errors };
@@ -1,2 +0,0 @@
1
- export { Errors } from './Errors';
2
- export { styles } from './styles';
@@ -1 +0,0 @@
1
- export declare const styles: string;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- declare const ArrowLeftIcon: () => JSX.Element;
3
- export { ArrowLeftIcon };
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- declare const ArrowRightIcon: () => JSX.Element;
3
- export { ArrowRightIcon };
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- declare const CloseIcon: () => JSX.Element;
3
- export { CloseIcon };
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- declare const ExternalLinkIcon: () => JSX.Element;
3
- export { ExternalLinkIcon };
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- declare const WarningIcon: () => JSX.Element;
3
- export { WarningIcon };
@@ -1,5 +0,0 @@
1
- export { CloseIcon } from './CloseIcon';
2
- export { WarningIcon } from './WarningIcon';
3
- export { ExternalLinkIcon } from './ExternalLinkIcon';
4
- export { ArrowLeftIcon } from './ArrowLeftIcon';
5
- export { ArrowRightIcon } from './ArrowRightIcon';
@@ -1,10 +0,0 @@
1
- import * as React from 'react';
2
- export declare type NavigationBarProps = {
3
- className?: string;
4
- previous: (() => void) | null;
5
- next: (() => void) | null;
6
- close?: () => void;
7
- children: React.ReactNode;
8
- };
9
- declare const NavigationBar: React.FC<NavigationBarProps>;
10
- export { NavigationBar };
@@ -1,2 +0,0 @@
1
- export { NavigationBar } from './NavigationBar';
2
- export { styles } from './styles';
@@ -1,2 +0,0 @@
1
- declare const styles: string;
2
- export { styles };
@@ -1,8 +0,0 @@
1
- import * as React from 'react';
2
- export declare type OverlayProps = {
3
- className?: string;
4
- fixed?: boolean;
5
- children?: React.ReactNode;
6
- };
7
- declare const Overlay: React.FC<OverlayProps>;
8
- export { Overlay };
@@ -1,2 +0,0 @@
1
- export declare function lock(): void;
2
- export declare function unlock(): void;
@@ -1,2 +0,0 @@
1
- export { Overlay } from './Overlay';
2
- export { styles } from './styles';
@@ -1,2 +0,0 @@
1
- declare const styles: string;
2
- export { styles };
@@ -1,5 +0,0 @@
1
- import * as React from 'react';
2
- export declare type ShadowPortalProps = {
3
- children: React.ReactNode;
4
- };
5
- export declare const ShadowPortal: React.FC<ShadowPortalProps>;
@@ -1,5 +0,0 @@
1
- import * as React from 'react';
2
- export declare type TerminalProps = {
3
- content: string;
4
- };
5
- export declare const Terminal: React.FC<TerminalProps>;
@@ -1,2 +0,0 @@
1
- export { Terminal } from './Terminal';
2
- export { styles } from './styles';
@@ -1,2 +0,0 @@
1
- declare const styles: string;
2
- export { styles };
@@ -1,7 +0,0 @@
1
- import * as React from 'react';
2
- export declare type ToastProps = {
3
- onClick?: (ev: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
4
- className?: string;
5
- children: React.ReactNode;
6
- };
7
- export declare const Toast: React.FC<ToastProps>;
@@ -1,2 +0,0 @@
1
- export { Toast } from './Toast';
2
- export { styles } from './styles';
@@ -1,2 +0,0 @@
1
- declare const styles: string;
2
- export { styles };
@@ -1,6 +0,0 @@
1
- import * as React from 'react';
2
- export declare type BuildErrorProps = {
3
- error: string;
4
- };
5
- export declare const BuildError: React.FC<BuildErrorProps>;
6
- export declare const styles: string;
@@ -1,11 +0,0 @@
1
- import * as React from 'react';
2
- import { UnhandledError, UnhandledRejection } from '../errorTypeHandler';
3
- export declare type SupportedErrorEvent = {
4
- id: number;
5
- event: UnhandledError | UnhandledRejection;
6
- };
7
- export declare type RuntimeErrorProps = {
8
- errors: SupportedErrorEvent[];
9
- };
10
- export declare const RuntimeError: React.FC<RuntimeErrorProps>;
11
- export declare const styles: string;
@@ -1,2 +0,0 @@
1
- export { BuildError } from './BuildError';
2
- export { RuntimeError } from './RuntimeError';
@@ -1,27 +0,0 @@
1
- import { StackFrame } from 'stacktrace-parser';
2
- import { TYPE_BUILD_OK, TYPE_REFRESH, TYPE_BUILD_ERROR, TYPE_UNHANDLED_ERROR, TYPE_UNHANDLED_REJECTION } from '../constants';
3
- export declare type BuildOk = {
4
- type: typeof TYPE_BUILD_OK;
5
- };
6
- export declare type FastRefresh = {
7
- type: typeof TYPE_REFRESH;
8
- };
9
- export declare type BuildError = {
10
- type: typeof TYPE_BUILD_ERROR;
11
- message: string;
12
- };
13
- export declare type UnhandledError = {
14
- type: typeof TYPE_UNHANDLED_ERROR;
15
- reason: Error;
16
- frames: StackFrame[];
17
- };
18
- export declare type UnhandledRejection = {
19
- type: typeof TYPE_UNHANDLED_REJECTION;
20
- reason: Error;
21
- frames: StackFrame[];
22
- };
23
- export declare type ErrorTypeEvent = BuildOk | FastRefresh | BuildError | UnhandledError | UnhandledRejection;
24
- export declare type ErrorTypeEventHandler = (ev: ErrorTypeEvent) => void;
25
- export declare function emit(ev: ErrorTypeEvent): void;
26
- export declare function on(fn: ErrorTypeEventHandler): boolean;
27
- export declare function off(fn: ErrorTypeEventHandler): boolean;
@@ -1,9 +0,0 @@
1
- import { SupportedErrorEvent } from '../container/RuntimeError';
2
- import { OriginalStackFrame } from './stack-frame';
3
- export declare type ReadyRuntimeError = {
4
- id: number;
5
- runtime: true;
6
- error: Error;
7
- frames: OriginalStackFrame[];
8
- };
9
- export declare function getErrorByType(ev: SupportedErrorEvent): Promise<ReadyRuntimeError>;
@@ -1,7 +0,0 @@
1
- import { StackFrame } from 'stacktrace-parser';
2
- declare type ErrorType = 'server';
3
- export declare function getFilesystemFrame(frame: StackFrame): StackFrame;
4
- export declare function decorateServerError(error: Error): void;
5
- export declare function getServerError(error: Error): Error;
6
- export declare function getErrorSource(error: Error): ErrorType | null;
7
- export {};
@@ -1 +0,0 @@
1
- export declare function noop(strings: TemplateStringsArray, ...keys: readonly string[]): string;
@@ -1,3 +0,0 @@
1
- import { StackFrame } from 'stacktrace-parser';
2
- export declare function parseError(stack: string): string;
3
- export declare function parseStack(stack: string): StackFrame[];
@@ -1,12 +0,0 @@
1
- import { StackFrame } from 'stacktrace-parser';
2
- export declare type OriginalStackFrame = {
3
- error: boolean;
4
- reason: string | null;
5
- external: boolean;
6
- expanded: boolean;
7
- sourceStackFrame: StackFrame;
8
- originalStackFrame: StackFrame | null;
9
- originalCodeFrame: string | null;
10
- };
11
- export declare function getOriginalStackFrames(frames: StackFrame[], type: 'server' | null, errorMessage: string): Promise<OriginalStackFrame[]>;
12
- export declare function getFrameSource(frame: StackFrame): string;
@@ -1 +0,0 @@
1
- export declare function useOnClickOutside(el: Node | null, handler: ((e: MouseEvent | TouchEvent) => void) | undefined): void;
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare function Base(): JSX.Element;
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare function ComponentStyles(): JSX.Element;
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare function CssReset(): JSX.Element;
@@ -1,3 +0,0 @@
1
- export { Base } from './Base';
2
- export { ComponentStyles } from './ComponentStyles';
3
- export { CssReset } from './CssReset';