Skip to content

Commit

Permalink
components & types
Browse files Browse the repository at this point in the history
  • Loading branch information
devjiwonchoi committed Feb 20, 2025
1 parent 6ed6c05 commit e499371
Show file tree
Hide file tree
Showing 38 changed files with 39 additions and 1,250 deletions.
2 changes: 1 addition & 1 deletion packages/next/src/build/output/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { bold, red, yellow } from '../../lib/picocolors'
import stripAnsi from 'next/dist/compiled/strip-ansi'
import textTable from 'next/dist/compiled/text-table'
import createStore from 'next/dist/compiled/unistore'
import formatWebpackMessages from '../../client/components/react-dev-overlay/internal/helpers/format-webpack-messages'
import formatWebpackMessages from '../../client/components/react-dev-overlay/_experimental/internal/helpers/format-webpack-messages'
import { store as consoleStore } from './store'
import type { OutputState } from './store'
import type { webpack } from 'next/dist/compiled/webpack/webpack'
Expand Down
2 changes: 1 addition & 1 deletion packages/next/src/build/webpack-build/impl.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { webpack } from 'next/dist/compiled/webpack/webpack'
import { stringBufferUtils } from 'next/dist/compiled/webpack-sources3'
import { red } from '../../lib/picocolors'
import formatWebpackMessages from '../../client/components/react-dev-overlay/internal/helpers/format-webpack-messages'
import formatWebpackMessages from '../../client/components/react-dev-overlay/_experimental/internal/helpers/format-webpack-messages'
import { nonNullable } from '../../lib/non-nullable'
import type { COMPILER_INDEXES } from '../../shared/lib/constants'
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { StackFrame } from 'next/dist/compiled/stacktrace-parser'
import type { OriginalStackFrame } from '../../../../internal/helpers/stack-frame'
import type { OriginalStackFrame } from '../../helpers/stack-frame'

import { HotlinkedText } from '../hot-linked-text'
import { ExternalIcon } from '../../icons/external'
import { getFrameSource } from '../../../../internal/helpers/stack-frame'
import { getFrameSource } from '../../helpers/stack-frame'
import { useOpenInEditor } from '../../helpers/use-open-in-editor'
import { noop as css } from '../../helpers/noop-template'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import stripAnsi from 'next/dist/compiled/strip-ansi'

import { useMemo } from 'react'
import { HotlinkedText } from '../hot-linked-text'
import { getFrameSource } from '../../../../internal/helpers/stack-frame'
import { getFrameSource } from '../../helpers/stack-frame'
import { useOpenInEditor } from '../../helpers/use-open-in-editor'
import { noop as css } from '../../helpers/noop-template'
import { ExternalIcon } from '../../icons/external'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { OriginalStackFrame } from '../../../../../internal/helpers/stack-frame'
import type { OriginalStackFrame } from '../../../helpers/stack-frame'
import { useMemo, useState, useRef } from 'react'
import { CallStackFrame } from '../../call-stack-frame/call-stack-frame'
import { noop as css } from '../../../helpers/noop-template'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { forwardRef, useEffect, useRef, useState } from 'react'
import { noop as css } from '../../../../../../internal/helpers/noop-template'
import { noop as css } from '../../../../helpers/noop-template'
import mergeRefs from '../../../../helpers/merge-refs'
import { useMinimumLoadingTimeMultiple } from './use-minimum-loading-time-multiple'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import { CALL_STACK_STYLES } from '../call-stack/call-stack'
import { OVERLAY_STYLES, ErrorOverlayOverlay } from '../overlay/overlay'
import { ErrorOverlayBottomStack } from '../error-overlay-bottom-stack'
import type { ErrorBaseProps } from '../error-overlay/error-overlay'
import type { ReadyRuntimeError } from '../../../../../internal/helpers/get-error-by-type'
import type { ReadyRuntimeError } from '../../../helpers/get-error-by-type'
import { EnvironmentNameLabel } from '../environment-name-label/environment-name-label'

interface ErrorOverlayLayoutProps extends ErrorBaseProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { VersionInfo } from '../../../../../../../../server/dev/parse-versi
import { ErrorOverlayPagination } from '../error-overlay-pagination/error-overlay-pagination'
import { VersionStalenessInfo } from '../../version-staleness-info/version-staleness-info'
import { noop as css } from '../../../helpers/noop-template'
import type { ReadyRuntimeError } from '../../../../../internal/helpers/get-error-by-type'
import type { ReadyRuntimeError } from '../../../helpers/get-error-by-type'

type ErrorOverlayNavProps = {
runtimeErrors?: ReadyRuntimeError[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
import { noop as css } from '../../../helpers/noop-template'
import { LeftArrow } from '../../../icons/left-arrow'
import { RightArrow } from '../../../icons/right-arrow'
import type { ReadyRuntimeError } from '../../../../../internal/helpers/get-error-by-type'
import type { ReadyRuntimeError } from '../../../helpers/get-error-by-type'

type ErrorPaginationProps = {
runtimeErrors: ReadyRuntimeError[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { BuildError } from '../../../container/build-error'
import { Errors } from '../../../container/errors'
import { RootLayoutMissingTagsError } from '../../../container/root-layout-missing-tags-error'
import { useDelayedRender } from '../../../hooks/use-delayed-render'
import type { ReadyRuntimeError } from '../../../../../internal/helpers/get-error-by-type'
import type { ReadyRuntimeError } from '../../../helpers/get-error-by-type'

const transitionDurationMs = 200

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { HotlinkedText } from '../hot-linked-text'
import { EditorLink } from './editor-link'
import { ExternalIcon } from '../../icons/external'
import { noop as css } from '../../helpers/noop-template'
import { getFrameSource } from '../../../../internal/helpers/stack-frame'
import { getFrameSource } from '../../helpers/stack-frame'
import { useOpenInEditor } from '../../helpers/use-open-in-editor'
import { FileIcon } from '../../icons/file'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react'

import { Errors } from './errors'
import { withShadowPortal } from '../storybook/with-shadow-portal'
import type { ReadyRuntimeError } from '../../../internal/helpers/get-error-by-type'
import type { ReadyRuntimeError } from '../helpers/get-error-by-type'
import { lorem } from '../utils/lorem'

const meta: Meta<typeof Errors> = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
} from '../../../../errors/console-error'
import { extractNextErrorCode } from '../../../../../../lib/error-telemetry-utils'
import { ErrorOverlayLayout } from '../components/errors/error-overlay-layout/error-overlay-layout'
import type { ReadyRuntimeError } from '../../../internal/helpers/get-error-by-type'
import type { ReadyRuntimeError } from '../helpers/get-error-by-type'
import type { ErrorBaseProps } from '../components/errors/error-overlay/error-overlay'

export interface ErrorsProps extends ErrorBaseProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { PSEUDO_HTML_DIFF_STYLES } from './component-stack-pseudo-html'
import {
useFrames,
type ReadyRuntimeError,
} from '../../../../internal/helpers/get-error-by-type'
} from '../../helpers/get-error-by-type'

export type RuntimeErrorProps = {
error: ReadyRuntimeError
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
import {
getErrorByType,
type ReadyRuntimeError,
} from '../../../../internal/helpers/get-error-by-type'
} from '../../helpers/get-error-by-type'

export type SupportedErrorEvent = {
id: number
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import {
ACTION_UNHANDLED_ERROR,
ACTION_UNHANDLED_REJECTION,
} from '../../shared'
import type { SupportedErrorEvent } from '../../_experimental/internal/container/runtime-error/render-error'
} from '../../../shared'
import type { SupportedErrorEvent } from '../container/runtime-error/render-error'
import { getOriginalStackFrames } from './stack-frame'
import type { OriginalStackFrame } from './stack-frame'
import type { ComponentStackFrame } from './parse-component-stack'
import { getErrorSource } from '../../../../../shared/lib/error-source'
import { getErrorSource } from '../../../../../../shared/lib/error-source'
import React from 'react'

export type ReadyRuntimeError = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type {
OriginalStackFrameResponse,
OriginalStackFrameResponseResult,
OriginalStackFramesRequest,
} from '../../server/shared'
} from '../../../server/shared'
import {
isWebpackInternalResource,
formatFrameSourceFile,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import ReactDevOverlay from './react-dev-overlay'
import { getSocketUrl } from '../internal/helpers/get-socket-url'
import { getSocketUrl } from '../_experimental/internal/helpers/get-socket-url'
import { INITIAL_OVERLAY_STATE } from '../shared'
import { HMR_ACTIONS_SENT_TO_BROWSER } from '../../../../server/dev/hot-reloader-types'
import GlobalError from '../../error-boundary'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
useSyncExternalStore,
} from 'react'
import stripAnsi from 'next/dist/compiled/strip-ansi'
import formatWebpackMessages from '../internal/helpers/format-webpack-messages'
import formatWebpackMessages from '../_experimental/internal/helpers/format-webpack-messages'
import { useRouter } from '../../navigation'
import {
ACTION_BEFORE_REFRESH,
Expand All @@ -22,7 +22,7 @@ import {
ACTION_VERSION_INFO,
useErrorOverlayReducer,
} from '../shared'
import { parseStack } from '../internal/helpers/parse-stack'
import { parseStack } from '../_experimental/internal/helpers/parse-stack'
import ReactDevOverlay from './react-dev-overlay'
import { useErrorHandler } from '../../errors/use-error-handler'
import { RuntimeErrorHandler } from '../../errors/runtime-error-handler'
Expand All @@ -31,8 +31,8 @@ import {
useTurbopack,
useWebsocket,
useWebsocketPing,
} from '../internal/helpers/use-websocket'
import { parseComponentStack } from '../internal/helpers/parse-component-stack'
} from '../_experimental/internal/helpers/use-websocket'
import { parseComponentStack } from '../_experimental/internal/helpers/parse-component-stack'
import type { VersionInfo } from '../../../../server/dev/parse-version-info'
import { HMR_ACTIONS_SENT_TO_BROWSER } from '../../../../server/dev/hot-reloader-types'
import type {
Expand Down
Loading

0 comments on commit e499371

Please # to comment.