atom.io 0.28.1 → 0.29.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.
- package/dist/{chunk-6WL4RQMQ.js → chunk-XPYU2HY2.js} +22 -57
- package/eslint-plugin/dist/index.js +0 -1
- package/eslint-plugin/src/walk.ts +0 -1
- package/internal/dist/index.d.ts +4 -4
- package/internal/dist/index.js +1 -1
- package/internal/src/atom/dispose-atom.ts +0 -11
- package/internal/src/ingest-updates/ingest-creation-disposal.ts +16 -25
- package/internal/src/operation.ts +7 -7
- package/internal/src/selector/create-writable-selector.ts +1 -1
- package/internal/src/selector/dispose-selector.ts +0 -13
- package/internal/src/set-state/become.ts +1 -3
- package/internal/src/set-state/evict-downstream.ts +2 -2
- package/internal/src/set-state/set-atom.ts +1 -1
- package/internal/src/set-state/set-into-store.ts +1 -1
- package/internal/src/set-state/stow-update.ts +2 -2
- package/internal/src/store/store.ts +1 -1
- package/introspection/dist/index.d.ts +15 -6
- package/introspection/dist/index.js +620 -1
- package/introspection/src/attach-atom-index.ts +5 -6
- package/introspection/src/attach-introspection-states.ts +5 -6
- package/introspection/src/attach-selector-index.ts +6 -7
- package/introspection/src/attach-timeline-family.ts +3 -4
- package/introspection/src/attach-timeline-index.ts +4 -8
- package/introspection/src/attach-transaction-index.ts +4 -8
- package/introspection/src/attach-transaction-logs.ts +4 -8
- package/introspection/src/attach-type-selectors.ts +13 -6
- package/introspection/src/differ.ts +1 -1
- package/introspection/src/index.ts +1 -0
- package/introspection/src/refinery.ts +9 -7
- package/introspection/src/sprawl.ts +42 -0
- package/json/dist/index.d.ts +12 -1
- package/json/dist/index.js +111 -2
- package/json/src/index.ts +29 -0
- package/package.json +12 -12
- package/react-devtools/dist/index.d.ts +159 -2
- package/react-devtools/dist/index.js +260 -663
- package/react-devtools/src/AtomIODevtools.tsx +24 -13
- package/react-devtools/src/StateEditor.tsx +5 -47
- package/react-devtools/src/StateIndex.tsx +15 -9
- package/react-devtools/src/TimelineIndex.tsx +9 -6
- package/react-devtools/src/TransactionIndex.tsx +9 -11
- package/react-devtools/src/elastic-input/ElasticInput.tsx +86 -0
- package/react-devtools/src/elastic-input/NumberInput.tsx +199 -0
- package/react-devtools/src/elastic-input/TextInput.tsx +47 -0
- package/react-devtools/src/elastic-input/index.ts +3 -0
- package/react-devtools/src/error-boundary/DefaultFallback.tsx +49 -0
- package/react-devtools/src/error-boundary/ReactErrorBoundary.tsx +56 -0
- package/react-devtools/src/error-boundary/index.ts +2 -0
- package/react-devtools/src/index.ts +3 -0
- package/react-devtools/src/json-editor/assets/Untitled-1.ai +1436 -2
- package/react-devtools/src/json-editor/assets/data-vis.ai +1548 -1
- package/react-devtools/src/json-editor/comp/json-editor-sketches.ai +1451 -3
- package/react-devtools/src/json-editor/default-components.tsx +101 -0
- package/react-devtools/src/json-editor/developer-interface.tsx +81 -0
- package/react-devtools/src/json-editor/editors-by-type/array-editor.tsx +38 -0
- package/react-devtools/src/json-editor/editors-by-type/non-json.tsx +23 -0
- package/react-devtools/src/json-editor/editors-by-type/object-editor.tsx +128 -0
- package/react-devtools/src/json-editor/editors-by-type/primitive-editors.tsx +73 -0
- package/react-devtools/src/json-editor/editors-by-type/utilities/array-elements.ts +16 -0
- package/react-devtools/src/json-editor/editors-by-type/utilities/cast-json.ts +57 -0
- package/react-devtools/src/json-editor/editors-by-type/utilities/cast-to-json.ts +156 -0
- package/react-devtools/src/json-editor/editors-by-type/utilities/object-properties.ts +106 -0
- package/react-devtools/src/json-editor/index.ts +32 -0
- package/react-devtools/src/json-editor/json-editor-internal.tsx +128 -0
- package/react-devtools/src/json-editor/todo.md +7 -0
- package/react-devtools/src/store.ts +70 -46
- package/dist/chunk-D52JNVER.js +0 -721
- package/dist/chunk-YQ46F5O2.js +0 -95
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { ErrorInfo, FC, ReactNode } from "react"
|
|
2
|
+
import { Component, useState } from "react"
|
|
3
|
+
|
|
4
|
+
import type { FallbackProps } from "./DefaultFallback"
|
|
5
|
+
import { DefaultFallback } from "./DefaultFallback"
|
|
6
|
+
|
|
7
|
+
export type ErrorBoundaryState = {
|
|
8
|
+
error?: Error | string
|
|
9
|
+
errorInfo?: ErrorInfo
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type ErrorBoundaryProps = {
|
|
13
|
+
children: ReactNode
|
|
14
|
+
onError?: ((error: Error | string, errorInfo: ErrorInfo) => void) | undefined
|
|
15
|
+
Fallback?: FC<FallbackProps> | undefined
|
|
16
|
+
useResetErrorState?: () => () => void
|
|
17
|
+
useErrorState?: () => [
|
|
18
|
+
ErrorBoundaryState,
|
|
19
|
+
(
|
|
20
|
+
newState:
|
|
21
|
+
| ErrorBoundaryState
|
|
22
|
+
| ((currState: ErrorBoundaryState) => ErrorBoundaryState),
|
|
23
|
+
) => void,
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export class ErrorBoundary extends Component<
|
|
28
|
+
ErrorBoundaryProps,
|
|
29
|
+
ErrorBoundaryState
|
|
30
|
+
> {
|
|
31
|
+
public constructor(props: ErrorBoundaryProps) {
|
|
32
|
+
super(props)
|
|
33
|
+
this.state = {}
|
|
34
|
+
// We can filter or add information
|
|
35
|
+
// to airbrake notifications here:
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
public override componentDidCatch(error: Error, errorInfo: ErrorInfo): void {
|
|
39
|
+
this.props.onError?.(error, errorInfo)
|
|
40
|
+
this.setState({
|
|
41
|
+
error,
|
|
42
|
+
errorInfo,
|
|
43
|
+
})
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
public override render(): ReactNode {
|
|
47
|
+
const { error, errorInfo } = this.state
|
|
48
|
+
const { children, Fallback = DefaultFallback } = this.props
|
|
49
|
+
|
|
50
|
+
return errorInfo ? (
|
|
51
|
+
<Fallback error={error} errorInfo={errorInfo} />
|
|
52
|
+
) : (
|
|
53
|
+
children
|
|
54
|
+
)
|
|
55
|
+
}
|
|
56
|
+
}
|