@livestore/solid 0.4.0 → 0.5.0-dev.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.
Files changed (45) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/StoreRegistryContext.d.ts +1 -1
  3. package/dist/StoreRegistryContext.d.ts.map +1 -1
  4. package/dist/StoreRegistryContext.jsx.map +1 -1
  5. package/dist/__tests__/fixture.d.ts +2 -2
  6. package/dist/__tests__/fixture.d.ts.map +1 -1
  7. package/dist/__tests__/fixture.jsx +1 -1
  8. package/dist/__tests__/fixture.jsx.map +1 -1
  9. package/dist/experimental/components/LiveList.d.ts +1 -1
  10. package/dist/experimental/components/LiveList.d.ts.map +1 -1
  11. package/dist/experimental/components/LiveList.jsx +1 -1
  12. package/dist/experimental/components/LiveList.jsx.map +1 -1
  13. package/dist/useClientDocument.client.test.jsx +6 -6
  14. package/dist/useClientDocument.client.test.jsx.map +1 -1
  15. package/dist/useClientDocument.d.ts +1 -1
  16. package/dist/useClientDocument.d.ts.map +1 -1
  17. package/dist/useClientDocument.js +1 -1
  18. package/dist/useClientDocument.js.map +1 -1
  19. package/dist/useClientDocument.server.test.jsx +2 -2
  20. package/dist/useClientDocument.server.test.jsx.map +1 -1
  21. package/dist/useQuery.client.test.jsx +8 -8
  22. package/dist/useQuery.client.test.jsx.map +1 -1
  23. package/dist/useQuery.d.ts +2 -2
  24. package/dist/useQuery.d.ts.map +1 -1
  25. package/dist/useQuery.js +1 -1
  26. package/dist/useQuery.js.map +1 -1
  27. package/dist/useQuery.server.test.jsx +2 -2
  28. package/dist/useQuery.server.test.jsx.map +1 -1
  29. package/dist/useStore.d.ts +2 -2
  30. package/dist/useStore.d.ts.map +1 -1
  31. package/dist/useStore.js.map +1 -1
  32. package/dist/useStore.server.test.jsx +2 -2
  33. package/dist/useStore.server.test.jsx.map +1 -1
  34. package/package.json +28 -38
  35. package/src/StoreRegistryContext.tsx +1 -2
  36. package/src/__tests__/fixture.tsx +3 -4
  37. package/src/experimental/components/LiveList.tsx +2 -3
  38. package/src/useClientDocument.client.test.tsx +6 -6
  39. package/src/useClientDocument.server.test.tsx +2 -3
  40. package/src/useClientDocument.ts +1 -2
  41. package/src/useQuery.client.test.tsx +8 -8
  42. package/src/useQuery.server.test.tsx +2 -3
  43. package/src/useQuery.ts +2 -3
  44. package/src/useStore.server.test.tsx +2 -3
  45. package/src/useStore.ts +2 -3
@@ -1 +1 @@
1
- {"version":3,"file":"useStore.server.test.jsx","sourceRoot":"","sources":["../src/useStore.server.test.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAE7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAA;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAEhD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAE5C,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IAC3B,EAAE,CAAC,gBAAgB,EAAE,GAAG,EAAE;QACxB,uEAAuE;QACvE,MAAM,CAAC,QAAQ,IAAI,UAAU,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QAC1C,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC7B,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA;AAEF,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;IAC5B,EAAE,CAAC,oDAAoD,EAAE,KAAK,IAA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,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,WAAW,CAAC;gBAC/B,MAAM;gBACN,OAAO,EAAE,sBAAsB;gBAC/B,OAAO,EAAE,mBAAmB,EAAE;gBAC9B,KAAK,EAAE,EAAE,UAAU,EAAE,sBAAsB,EAAE;aAC9C,CAAC,CAAA;YAEF,MAAM,iBAAiB,GAAG,YAAY,CAAC,KAAK,CAAC,CAAA;YAE7C,MAAM,CAAC,KAAK,CAAC,GAAG,iBAAiB,CAAC,iBAAiB,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAA;YAE1E,MAAM,QAAQ,GAAG,GAAG,EAAE;gBACpB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,QAAQ,IAAI,WAAW,CAAC,EAAE,GAAG,CAAC,CAAA;YAC3D,CAAC,CAAA;YAED,MAAM,IAAI,GAAG,cAAc,CAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,AAAD,EAAG,CAAC,CAAA;YAE/C,MAAM,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAA;QACjC,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,CAAC,CAAA;IAC5D,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@livestore/solid",
3
- "version": "0.4.0",
3
+ "version": "0.5.0-dev.0",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
7
- "url": "git+https://github.com/livestorejs/livestore.git"
7
+ "url": "git+https://github.com/livestorejs/livestore-contrib.git"
8
8
  },
9
9
  "files": [
10
10
  "dist",
@@ -20,63 +20,53 @@
20
20
  "access": "public"
21
21
  },
22
22
  "dependencies": {
23
- "@opentelemetry/api": "1.9.0",
24
- "@livestore/framework-toolkit": "^0.4.0",
25
- "@livestore/utils": "^0.4.0",
26
- "@livestore/common": "^0.4.0",
27
- "@livestore/livestore": "^0.4.0"
23
+ "@livestore/common": "0.5.0-dev.0",
24
+ "@livestore/framework-toolkit": "0.5.0-dev.0",
25
+ "@livestore/livestore": "0.5.0-dev.0",
26
+ "@livestore/utils": "0.5.0-dev.0",
27
+ "@opentelemetry/api": "1.9.0"
28
28
  },
29
29
  "devDependencies": {
30
+ "@livestore/adapter-web": "0.5.0-dev.0",
31
+ "@livestore/utils-dev": "0.5.0-dev.0",
30
32
  "@opentelemetry/sdk-trace-base": "2.2.0",
31
33
  "@solidjs/testing-library": "0.8.10",
32
34
  "@testing-library/jest-dom": "6.6.3",
33
35
  "jsdom": "26.1.0",
34
36
  "solid-js": "1.9.10",
35
- "typescript": "5.9.3",
37
+ "typescript": "6.0.3",
36
38
  "vite": "7.3.1",
37
39
  "vite-plugin-solid": "2.11.10",
38
- "vitest": "3.2.4",
39
- "@livestore/adapter-web": "^0.4.0",
40
- "@livestore/utils-dev": "^0.4.0"
40
+ "vitest": "4.1.9"
41
41
  },
42
42
  "peerDependencies": {
43
- "@effect/ai": "^0.35.0",
44
- "@effect/cli": "^0.75.1",
45
- "@effect/cluster": "^0.58.2",
46
- "@effect/experimental": "^0.60.0",
47
- "@effect/opentelemetry": "^0.63.0",
48
- "@effect/platform": "^0.96.1",
49
- "@effect/platform-browser": "^0.76.0",
50
- "@effect/platform-bun": "^0.89.0",
51
- "@effect/platform-node": "^0.106.0",
52
- "@effect/printer": "^0.49.0",
53
- "@effect/printer-ansi": "^0.49.0",
54
- "@effect/rpc": "^0.75.1",
55
- "@effect/sql": "^0.51.1",
56
- "@effect/typeclass": "^0.40.0",
57
- "@effect/vitest": "^0.29.0",
43
+ "@effect/opentelemetry": "^4.0.0-rc.111",
44
+ "@effect/platform-browser": "^4.0.0-rc.111",
45
+ "@effect/platform-bun": "^4.0.0-rc.111",
46
+ "@effect/platform-node": "^4.0.0-rc.111",
47
+ "@effect/platform-node-shared": "^4.0.0-rc.111",
48
+ "@effect/vitest": "^4.0.0-rc.111",
58
49
  "@opentelemetry/api": "^1.9.0",
59
50
  "@opentelemetry/resources": "^2.2.0",
60
51
  "@standard-schema/spec": "^1.1.0",
61
- "effect": "^3.21.2",
52
+ "effect": "^4.0.0-rc.111",
62
53
  "solid-js": "^1.9.10"
63
54
  },
64
55
  "$genie": {
65
56
  "source": "package.json.genie.ts",
66
57
  "warning": "DO NOT EDIT - changes will be overwritten",
67
58
  "workspaceClosureDirs": [
68
- "packages/@livestore/adapter-web",
69
- "packages/@livestore/common",
70
- "packages/@livestore/common-cf",
71
- "packages/@livestore/devtools-web-common",
72
- "packages/@livestore/framework-toolkit",
73
- "packages/@livestore/livestore",
74
59
  "packages/@livestore/solid",
75
- "packages/@livestore/sqlite-wasm",
76
- "packages/@livestore/utils",
77
- "packages/@livestore/utils-dev",
78
- "packages/@livestore/wa-sqlite",
79
- "packages/@livestore/webmesh"
60
+ "repos/livestore/packages/@livestore/adapter-web",
61
+ "repos/livestore/packages/@livestore/common",
62
+ "repos/livestore/packages/@livestore/common-cf",
63
+ "repos/livestore/packages/@livestore/framework-toolkit",
64
+ "repos/livestore/packages/@livestore/livestore",
65
+ "repos/livestore/packages/@livestore/sqlite-wasm",
66
+ "repos/livestore/packages/@livestore/utils",
67
+ "repos/livestore/packages/@livestore/utils-dev",
68
+ "repos/livestore/packages/@livestore/wa-sqlite",
69
+ "repos/livestore/packages/@livestore/webmesh"
80
70
  ]
81
71
  },
82
72
  "scripts": {
@@ -1,6 +1,5 @@
1
- import * as Solid from 'solid-js'
2
-
3
1
  import type { StoreRegistry } from '@livestore/livestore'
2
+ import * as Solid from 'solid-js'
4
3
 
5
4
  export const StoreRegistryContext = Solid.createContext<StoreRegistry | undefined>(undefined)
6
5
 
@@ -1,5 +1,3 @@
1
- import type * as Solid from 'solid-js'
2
-
3
1
  import type { UnknownError } from '@livestore/common'
4
2
  import {
5
3
  type AppState,
@@ -14,12 +12,13 @@ import {
14
12
  import type { Store } from '@livestore/livestore'
15
13
  import { StoreInternalsSymbol } from '@livestore/livestore'
16
14
  import { Effect, type Scope } from '@livestore/utils/effect'
15
+ import type * as Solid from 'solid-js'
17
16
 
18
17
  import * as LiveStoreSolid from '../mod.ts'
19
18
 
20
- // Re-export shared types, schema, and StoreInternalsSymbol for tests
21
- export { events, schema, StoreInternalsSymbol, tables }
22
19
  export type { AppState, Filter, Todo }
20
+ // Re-export shared types, schema, and StoreInternalsSymbol for tests
21
+ export { events, StoreInternalsSymbol, schema, tables }
23
22
 
24
23
  export const makeTodoMvcSolid = (
25
24
  opts: CreateTodoMvcStoreOptions = {},
@@ -1,8 +1,7 @@
1
- import type { Accessor, JSX } from 'solid-js'
2
- import * as Solid from 'solid-js'
3
-
4
1
  import type { LiveQueryDef, Store } from '@livestore/livestore'
5
2
  import { computed } from '@livestore/livestore'
3
+ import type { Accessor, JSX } from 'solid-js'
4
+ import * as Solid from 'solid-js'
6
5
 
7
6
  import { useQuery } from '../../useQuery.ts'
8
7
 
@@ -16,7 +16,7 @@ import type * as LiveStoreSolid from './mod.ts'
16
16
 
17
17
  // NOTE running tests concurrently doesn't work with the default global db graph
18
18
  Vitest.describe('useClientDocument', () => {
19
- Vitest.scopedLive('should update the data based on component key', () =>
19
+ Vitest.live('should update the data based on component key', () =>
20
20
  Effect.gen(function* () {
21
21
  const { wrapper, store } = yield* makeTodoMvcSolid({})
22
22
 
@@ -45,7 +45,7 @@ Vitest.describe('useClientDocument', () => {
45
45
 
46
46
  // TODO add a test that makes sure Solid doesn't re-render when a setter is used to set the same value
47
47
 
48
- Vitest.scopedLive('should update the data reactively - via setState', () =>
48
+ Vitest.live('should update the data reactively - via setState', () =>
49
49
  Effect.gen(function* () {
50
50
  const { wrapper, store } = yield* makeTodoMvcSolid({})
51
51
 
@@ -67,7 +67,7 @@ Vitest.describe('useClientDocument', () => {
67
67
  }),
68
68
  )
69
69
 
70
- Vitest.scopedLive('should update the data reactively - via raw store commit', () =>
70
+ Vitest.live('should update the data reactively - via raw store commit', () =>
71
71
  Effect.gen(function* () {
72
72
  const { wrapper, store } = yield* makeTodoMvcSolid({})
73
73
 
@@ -89,7 +89,7 @@ Vitest.describe('useClientDocument', () => {
89
89
  }),
90
90
  )
91
91
 
92
- Vitest.scopedLive('should work for a larger app', () =>
92
+ Vitest.live('should work for a larger app', () =>
93
93
  Effect.gen(function* () {
94
94
  const { wrapper, store } = yield* makeTodoMvcSolid({})
95
95
 
@@ -160,7 +160,7 @@ Vitest.describe('useClientDocument', () => {
160
160
  }),
161
161
  )
162
162
 
163
- Vitest.scopedLive('should work for a useClientDocument query chained with a useTemporary query', () =>
163
+ Vitest.live('should work for a useClientDocument query chained with a useTemporary query', () =>
164
164
  Effect.gen(function* () {
165
165
  const { store, wrapper } = yield* makeTodoMvcSolid({})
166
166
 
@@ -201,7 +201,7 @@ Vitest.describe('useClientDocument', () => {
201
201
  }),
202
202
  )
203
203
 
204
- Vitest.scopedLive('kv client document overwrites value (Schema.Any, no partial merge)', () =>
204
+ Vitest.live('kv client document overwrites value (Schema.Any, no partial merge)', () =>
205
205
  Effect.gen(function* () {
206
206
  const { wrapper, store } = yield* makeTodoMvcSolid({})
207
207
 
@@ -3,12 +3,11 @@
3
3
  * These tests run in node environment with SSR JSX transform using renderToString.
4
4
  */
5
5
 
6
- import { isServer, renderToString } from 'solid-js/web'
7
- import { describe, expect, it } from 'vitest'
8
-
9
6
  import { provideOtel } from '@livestore/common'
10
7
  import * as LiveStore from '@livestore/livestore'
11
8
  import { Effect, Schema } from '@livestore/utils/effect'
9
+ import { isServer, renderToString } from 'solid-js/web'
10
+ import { describe, expect, it } from 'vitest'
12
11
 
13
12
  import { events, makeTodoMvcSolid, tables } from './__tests__/fixture.tsx'
14
13
 
@@ -1,11 +1,10 @@
1
- import * as Solid from 'solid-js'
2
-
3
1
  import type { RowQuery } from '@livestore/common'
4
2
  import { SessionIdSymbol } from '@livestore/common'
5
3
  import { State } from '@livestore/common/schema'
6
4
  import { removeUndefinedValues, type StateSetters, validateTableOptions } from '@livestore/framework-toolkit'
7
5
  import type { LiveQuery, LiveQueryDef, Store } from '@livestore/livestore'
8
6
  import { queryDb } from '@livestore/livestore'
7
+ import * as Solid from 'solid-js'
9
8
 
10
9
  import { useQueryRef } from './useQuery.ts'
11
10
  import { type AccessorMaybe, resolve } from './utils.ts'
@@ -31,7 +31,7 @@ Vitest.describe('useQuery', () => {
31
31
  RG.__resetIds()
32
32
  })
33
33
 
34
- Vitest.scopedLive('simple', () =>
34
+ Vitest.live('simple', () =>
35
35
  Effect.gen(function* () {
36
36
  const { wrapper, store } = yield* makeTodoMvcSolid({})
37
37
 
@@ -55,7 +55,7 @@ Vitest.describe('useQuery', () => {
55
55
  }),
56
56
  )
57
57
 
58
- Vitest.scopedLive('same `useQuery` hook invoked with different queries', () =>
58
+ Vitest.live('same `useQuery` hook invoked with different queries', () =>
59
59
  Effect.gen(function* () {
60
60
  const { wrapper, store } = yield* makeTodoMvcSolid({})
61
61
 
@@ -104,7 +104,7 @@ Vitest.describe('useQuery', () => {
104
104
  }),
105
105
  )
106
106
 
107
- Vitest.scopedLive('filtered dependency query', () =>
107
+ Vitest.live('filtered dependency query', () =>
108
108
  Effect.gen(function* () {
109
109
  const { wrapper, store } = yield* makeTodoMvcSolid({})
110
110
 
@@ -141,7 +141,7 @@ Vitest.describe('useQuery', () => {
141
141
  }),
142
142
  )
143
143
 
144
- Vitest.scopedLive('should work for a dynamic list with query swapping', () =>
144
+ Vitest.live('should work for a dynamic list with query swapping', () =>
145
145
  Effect.gen(function* () {
146
146
  const { wrapper, store } = yield* makeTodoMvcSolid({})
147
147
 
@@ -177,7 +177,7 @@ Vitest.describe('useQuery', () => {
177
177
  // NOTE: This test covers special Solid lifecycle patterns similar to react-window
178
178
  // It causes query swapping in reactive computations and cleanup calls
179
179
  // This tests the `_tag: 'destroyed'` state in the `spanAlreadyStartedCache`
180
- Vitest.scopedLive('should work for a virtualized list with @solid-primitives/virtual', () =>
180
+ Vitest.live('should work for a virtualized list with @solid-primitives/virtual', () =>
181
181
  Effect.gen(function* () {
182
182
  const { wrapper, store } = yield* makeTodoMvcSolid({})
183
183
 
@@ -228,7 +228,7 @@ Vitest.describe('useQuery', () => {
228
228
  }),
229
229
  )
230
230
 
231
- Vitest.scopedLive('should work with signal', () =>
231
+ Vitest.live('should work with signal', () =>
232
232
  Effect.gen(function* () {
233
233
  const { wrapper, store } = yield* makeTodoMvcSolid({})
234
234
  const num$ = signal(0)
@@ -243,7 +243,7 @@ Vitest.describe('useQuery', () => {
243
243
  }),
244
244
  )
245
245
 
246
- Vitest.scopedLive('supports query builders directly', () =>
246
+ Vitest.live('supports query builders directly', () =>
247
247
  Effect.gen(function* () {
248
248
  const { wrapper, store } = yield* makeTodoMvcSolid({})
249
249
 
@@ -266,7 +266,7 @@ Vitest.describe('useQuery', () => {
266
266
  }),
267
267
  )
268
268
 
269
- Vitest.scopedLive('union of different result types with useQuery', () =>
269
+ Vitest.live('union of different result types with useQuery', () =>
270
270
  Effect.gen(function* () {
271
271
  const { wrapper, store } = yield* makeTodoMvcSolid({})
272
272
 
@@ -3,12 +3,11 @@
3
3
  * These tests run in node environment with SSR JSX transform using renderToString.
4
4
  */
5
5
 
6
- import { isServer, renderToString } from 'solid-js/web'
7
- import { describe, expect, it } from 'vitest'
8
-
9
6
  import { provideOtel } from '@livestore/common'
10
7
  import { queryDb, signal } from '@livestore/livestore'
11
8
  import { Effect, Schema } from '@livestore/utils/effect'
9
+ import { isServer, renderToString } from 'solid-js/web'
10
+ import { describe, expect, it } from 'vitest'
12
11
 
13
12
  import { events, makeTodoMvcSolid, tables } from './__tests__/fixture.tsx'
14
13
 
package/src/useQuery.ts CHANGED
@@ -1,6 +1,3 @@
1
- import type * as otel from '@opentelemetry/api'
2
- import * as Solid from 'solid-js'
3
-
4
1
  import {
5
2
  captureStackInfo,
6
3
  computeRcRefKey,
@@ -12,6 +9,8 @@ import {
12
9
  import type { LiveQuery, Queryable, Store } from '@livestore/livestore'
13
10
  import type { LiveQueries } from '@livestore/livestore/internal'
14
11
  import { deepEqual } from '@livestore/utils'
12
+ import type * as otel from '@opentelemetry/api'
13
+ import * as Solid from 'solid-js'
15
14
 
16
15
  import { type AccessorMaybe, resolve } from './utils.ts'
17
16
 
@@ -3,13 +3,12 @@
3
3
  * These tests run in node environment with SSR JSX transform using renderToString.
4
4
  */
5
5
 
6
- import { isServer, renderToString } from 'solid-js/web'
7
- import { describe, expect, it } from 'vitest'
8
-
9
6
  import { makeInMemoryAdapter } from '@livestore/adapter-web'
10
7
  import { provideOtel } from '@livestore/common'
11
8
  import { createStore } from '@livestore/livestore'
12
9
  import { Effect } from '@livestore/utils/effect'
10
+ import { isServer, renderToString } from 'solid-js/web'
11
+ import { describe, expect, it } from 'vitest'
13
12
 
14
13
  import { schema, tables } from './__tests__/fixture.tsx'
15
14
  import { withSolidApi } from './useStore.ts'
package/src/useStore.ts CHANGED
@@ -1,9 +1,8 @@
1
- import * as Solid from 'solid-js'
2
-
3
1
  import type { RowQuery, SessionIdSymbol } from '@livestore/common'
4
2
  import type { LiveStoreSchema, State } from '@livestore/common/schema'
5
3
  import type { Queryable, RegistryStoreOptions, Store } from '@livestore/livestore'
6
4
  import type { Schema } from '@livestore/utils/effect'
5
+ import * as Solid from 'solid-js'
7
6
 
8
7
  import { useStoreRegistry } from './StoreRegistryContext.tsx'
9
8
  import { type UseClientDocumentResult, useClientDocument } from './useClientDocument.ts'
@@ -106,7 +105,7 @@ export type SolidApi = {
106
105
  export const useStore = <
107
106
  TSchema extends LiveStoreSchema,
108
107
  TContext = {},
109
- TSyncPayloadSchema extends Schema.Schema<any> = typeof Schema.JsonValue,
108
+ TSyncPayloadSchema extends Schema.Codec<Schema.Json, Schema.Json> = typeof Schema.Json,
110
109
  >(
111
110
  options: AccessorMaybe<RegistryStoreOptions<TSchema, TContext, TSyncPayloadSchema>>,
112
111
  ): Solid.Resource<Store<TSchema, TContext>> & SolidApi => {