atom.io 0.43.2 → 0.44.1
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-CTAAG5j7.js → chunk-Bp6m_JJh.js} +1 -1
- package/dist/eslint-plugin/index.js +1 -1
- package/dist/internal/index.d.ts +270 -270
- package/dist/internal/index.d.ts.map +1 -1
- package/dist/introspection/index.d.ts +3 -3
- package/dist/introspection/index.d.ts.map +1 -1
- package/dist/json/index.d.ts +10 -10
- package/dist/json/index.d.ts.map +1 -1
- package/dist/main/index.d.ts +146 -146
- package/dist/main/index.d.ts.map +1 -1
- package/dist/react/index.js +4 -3
- package/dist/react/index.js.map +1 -1
- package/dist/react-devtools/index.d.ts +12 -12
- package/dist/react-devtools/index.d.ts.map +1 -1
- package/dist/realtime/index.d.ts +3 -3
- package/dist/realtime/index.d.ts.map +1 -1
- package/dist/realtime-server/index.d.ts +3 -3
- package/dist/realtime-server/index.d.ts.map +1 -1
- package/dist/realtime-testing/index.d.ts +4 -4
- package/dist/realtime-testing/index.d.ts.map +1 -1
- package/dist/struct/index.d.ts +1 -1
- package/dist/{utility-types-aZkJVERa.d.ts → utility-types-B6_rGUbz.d.ts} +2 -2
- package/dist/{utility-types-aZkJVERa.d.ts.map → utility-types-B6_rGUbz.d.ts.map} +1 -1
- package/dist/web/index.d.ts +3 -3
- package/dist/web/index.d.ts.map +1 -1
- package/package.json +24 -24
- package/src/react/use-loadable.ts +4 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "atom.io",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.44.1",
|
|
4
4
|
"description": "Composable and testable reactive data library.",
|
|
5
5
|
"homepage": "https://atom.io.fyi",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -60,29 +60,30 @@
|
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@eslint/core": "0.
|
|
64
|
-
"@storybook/addon-docs": "
|
|
65
|
-
"@storybook/addon-onboarding": "
|
|
66
|
-
"@storybook/react-vite": "
|
|
63
|
+
"@eslint/core": "0.17.0",
|
|
64
|
+
"@storybook/addon-docs": "10.0.2",
|
|
65
|
+
"@storybook/addon-onboarding": "10.0.2",
|
|
66
|
+
"@storybook/react-vite": "10.0.2",
|
|
67
67
|
"@testing-library/react": "16.3.0",
|
|
68
|
-
"@types/bun": "npm:bun-types@1.3.
|
|
68
|
+
"@types/bun": "npm:bun-types@1.3.1",
|
|
69
69
|
"@types/eslint": "9.6.1",
|
|
70
70
|
"@types/estree": "1.0.8",
|
|
71
|
-
"@types/http-proxy": "1.17.
|
|
71
|
+
"@types/http-proxy": "1.17.17",
|
|
72
72
|
"@types/npmlog": "7.0.0",
|
|
73
73
|
"@types/react": "19.2.2",
|
|
74
74
|
"@types/tmp": "0.2.6",
|
|
75
|
-
"@typescript-eslint/parser": "8.46.
|
|
76
|
-
"@typescript-eslint/rule-tester": "8.46.
|
|
77
|
-
"@typescript-eslint/utils": "8.46.
|
|
78
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
79
|
-
"@vitest/coverage-v8": "
|
|
80
|
-
"@vitest/ui": "
|
|
75
|
+
"@typescript-eslint/parser": "8.46.2",
|
|
76
|
+
"@typescript-eslint/rule-tester": "8.46.2",
|
|
77
|
+
"@typescript-eslint/utils": "8.46.2",
|
|
78
|
+
"@typescript/native-preview": "7.0.0-dev.20251101.1",
|
|
79
|
+
"@vitest/coverage-v8": "4.0.6",
|
|
80
|
+
"@vitest/ui": "4.0.6",
|
|
81
|
+
"arktype": "2.1.25",
|
|
81
82
|
"concurrently": "9.2.1",
|
|
82
|
-
"drizzle-kit": "0.31.
|
|
83
|
-
"drizzle-orm": "0.44.
|
|
83
|
+
"drizzle-kit": "0.31.6",
|
|
84
|
+
"drizzle-orm": "0.44.7",
|
|
84
85
|
"eslint": "9.38.0",
|
|
85
|
-
"happy-dom": "20.0.
|
|
86
|
+
"happy-dom": "20.0.10",
|
|
86
87
|
"http-proxy": "1.18.1",
|
|
87
88
|
"motion": "12.23.24",
|
|
88
89
|
"npmlog": "7.0.1",
|
|
@@ -91,19 +92,18 @@
|
|
|
91
92
|
"preact": "10.27.2",
|
|
92
93
|
"react": "19.2.0",
|
|
93
94
|
"react-dom": "19.2.0",
|
|
94
|
-
"react-router-dom": "7.9.
|
|
95
|
-
"recoverage": "0.1.
|
|
95
|
+
"react-router-dom": "7.9.5",
|
|
96
|
+
"recoverage": "0.1.12",
|
|
96
97
|
"socket.io": "4.8.1",
|
|
97
98
|
"socket.io-client": "4.8.1",
|
|
98
|
-
"storybook": "
|
|
99
|
+
"storybook": "10.0.2",
|
|
99
100
|
"tmp": "0.2.5",
|
|
100
|
-
"tsdown": "0.15.
|
|
101
|
+
"tsdown": "0.15.12",
|
|
101
102
|
"typescript": "5.9.3",
|
|
102
|
-
"vite": "7.1.
|
|
103
|
+
"vite": "7.1.12",
|
|
103
104
|
"vite-tsconfig-paths": "5.1.4",
|
|
104
|
-
"vitest": "
|
|
105
|
-
"
|
|
106
|
-
"break-check": "0.6.16"
|
|
105
|
+
"vitest": "4.0.6",
|
|
106
|
+
"break-check": "0.6.20"
|
|
107
107
|
},
|
|
108
108
|
"main": "./dist/main/index.js",
|
|
109
109
|
"files": [
|
|
@@ -63,6 +63,7 @@ export function useLoadable(
|
|
|
63
63
|
fallback = params[2]
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
+
const hasFallback = fallback !== undefined
|
|
66
67
|
const isErr = `catch` in state && state.catch.some((E) => value instanceof E)
|
|
67
68
|
|
|
68
69
|
const wrapperRef = useRef<{
|
|
@@ -84,7 +85,7 @@ export function useLoadable(
|
|
|
84
85
|
if (lastLoaded === `LOADING`) {
|
|
85
86
|
return `LOADING`
|
|
86
87
|
}
|
|
87
|
-
if (wasErr &&
|
|
88
|
+
if (wasErr && hasFallback) {
|
|
88
89
|
wrapper = wrapperRef.current = {
|
|
89
90
|
loading: true,
|
|
90
91
|
value: fallback,
|
|
@@ -96,7 +97,7 @@ export function useLoadable(
|
|
|
96
97
|
} else {
|
|
97
98
|
lastLoadedRef.current = value
|
|
98
99
|
if (wrapper.loading === true) {
|
|
99
|
-
if (isErr &&
|
|
100
|
+
if (isErr && hasFallback) {
|
|
100
101
|
wrapper = wrapperRef.current = {
|
|
101
102
|
loading: false,
|
|
102
103
|
value: fallback,
|
|
@@ -106,7 +107,7 @@ export function useLoadable(
|
|
|
106
107
|
wrapper = wrapperRef.current = { loading: false, value: value }
|
|
107
108
|
}
|
|
108
109
|
} else {
|
|
109
|
-
if (isErr &&
|
|
110
|
+
if (isErr && hasFallback) {
|
|
110
111
|
wrapper.loading = false
|
|
111
112
|
wrapper.value = fallback
|
|
112
113
|
wrapper.error = value
|