@evolu/react 2.0.8 → 3.0.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/index.d.ts +2 -28
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -31
- package/package.json +7 -7
- package/src/index.ts +2 -36
package/dist/index.d.ts
CHANGED
|
@@ -1,30 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from "@evolu/common-react";
|
|
2
|
+
export * from "@evolu/common-web";
|
|
2
3
|
export * from "@evolu/common/public";
|
|
3
|
-
/**
|
|
4
|
-
* Create Evolu for React.
|
|
5
|
-
*
|
|
6
|
-
* ### Example
|
|
7
|
-
*
|
|
8
|
-
* ```ts
|
|
9
|
-
* import * as S from "@effect/schema/Schema";
|
|
10
|
-
* import * as Evolu from "@evolu/react";
|
|
11
|
-
*
|
|
12
|
-
* const TodoId = Evolu.id("Todo");
|
|
13
|
-
* type TodoId = S.Schema.To<typeof TodoId>;
|
|
14
|
-
*
|
|
15
|
-
* const TodoTable = S.struct({
|
|
16
|
-
* id: TodoId,
|
|
17
|
-
* title: Evolu.NonEmptyString1000,
|
|
18
|
-
* });
|
|
19
|
-
* type TodoTable = S.Schema.To<typeof TodoTable>;
|
|
20
|
-
*
|
|
21
|
-
* const Database = S.struct({
|
|
22
|
-
* todo: TodoTable,
|
|
23
|
-
* });
|
|
24
|
-
*
|
|
25
|
-
* const { useEvolu, useEvoluError, useQuery, useOwner } =
|
|
26
|
-
* Evolu.create(Database);
|
|
27
|
-
* ```
|
|
28
|
-
*/
|
|
29
|
-
export declare const create: <From, To extends import("@evolu/common").Schema>(schema: import("@effect/schema/Schema").Schema<From, To>, config?: Partial<import("@evolu/common").Config> | undefined) => import("@evolu/common-react").EvoluReact<To>;
|
|
30
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,32 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { Layer } from "effect";
|
|
4
|
-
export { parseMnemonic } from "@evolu/common-web";
|
|
1
|
+
export * from "@evolu/common-react";
|
|
2
|
+
export * from "@evolu/common-web";
|
|
5
3
|
export * from "@evolu/common/public";
|
|
6
|
-
/**
|
|
7
|
-
* Create Evolu for React.
|
|
8
|
-
*
|
|
9
|
-
* ### Example
|
|
10
|
-
*
|
|
11
|
-
* ```ts
|
|
12
|
-
* import * as S from "@effect/schema/Schema";
|
|
13
|
-
* import * as Evolu from "@evolu/react";
|
|
14
|
-
*
|
|
15
|
-
* const TodoId = Evolu.id("Todo");
|
|
16
|
-
* type TodoId = S.Schema.To<typeof TodoId>;
|
|
17
|
-
*
|
|
18
|
-
* const TodoTable = S.struct({
|
|
19
|
-
* id: TodoId,
|
|
20
|
-
* title: Evolu.NonEmptyString1000,
|
|
21
|
-
* });
|
|
22
|
-
* type TodoTable = S.Schema.To<typeof TodoTable>;
|
|
23
|
-
*
|
|
24
|
-
* const Database = S.struct({
|
|
25
|
-
* todo: TodoTable,
|
|
26
|
-
* });
|
|
27
|
-
*
|
|
28
|
-
* const { useEvolu, useEvoluError, useQuery, useOwner } =
|
|
29
|
-
* Evolu.create(Database);
|
|
30
|
-
* ```
|
|
31
|
-
*/
|
|
32
|
-
export const create = EvoluReactLive.pipe(Layer.provide(EvoluWebLive), makeCreateEvoluReact);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evolu/react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Evolu for React",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"evolu",
|
|
@@ -34,16 +34,16 @@
|
|
|
34
34
|
"react-dom": "^18.2.0",
|
|
35
35
|
"typescript": "^5.3.2",
|
|
36
36
|
"vitest": "^0.34.6",
|
|
37
|
-
"@evolu/common": "2.0
|
|
38
|
-
"@evolu/common-react": "
|
|
39
|
-
"@evolu/common-web": "
|
|
37
|
+
"@evolu/common": "2.1.0",
|
|
38
|
+
"@evolu/common-react": "3.0.0",
|
|
39
|
+
"@evolu/common-web": "3.0.0",
|
|
40
40
|
"@evolu/tsconfig": "0.0.2",
|
|
41
41
|
"eslint-config-evolu": "1.0.0"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@evolu/common": "^2.0
|
|
45
|
-
"@evolu/common-react": "^
|
|
46
|
-
"@evolu/common-web": "^
|
|
44
|
+
"@evolu/common": "^2.1.0",
|
|
45
|
+
"@evolu/common-react": "^3.0.0",
|
|
46
|
+
"@evolu/common-web": "^3.0.0",
|
|
47
47
|
"@types/react-dom": "^18.2.7",
|
|
48
48
|
"react-dom": "^18.2.0"
|
|
49
49
|
},
|
package/src/index.ts
CHANGED
|
@@ -1,37 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { Layer } from "effect";
|
|
4
|
-
|
|
5
|
-
export { parseMnemonic } from "@evolu/common-web";
|
|
1
|
+
export * from "@evolu/common-react";
|
|
2
|
+
export * from "@evolu/common-web";
|
|
6
3
|
export * from "@evolu/common/public";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Create Evolu for React.
|
|
10
|
-
*
|
|
11
|
-
* ### Example
|
|
12
|
-
*
|
|
13
|
-
* ```ts
|
|
14
|
-
* import * as S from "@effect/schema/Schema";
|
|
15
|
-
* import * as Evolu from "@evolu/react";
|
|
16
|
-
*
|
|
17
|
-
* const TodoId = Evolu.id("Todo");
|
|
18
|
-
* type TodoId = S.Schema.To<typeof TodoId>;
|
|
19
|
-
*
|
|
20
|
-
* const TodoTable = S.struct({
|
|
21
|
-
* id: TodoId,
|
|
22
|
-
* title: Evolu.NonEmptyString1000,
|
|
23
|
-
* });
|
|
24
|
-
* type TodoTable = S.Schema.To<typeof TodoTable>;
|
|
25
|
-
*
|
|
26
|
-
* const Database = S.struct({
|
|
27
|
-
* todo: TodoTable,
|
|
28
|
-
* });
|
|
29
|
-
*
|
|
30
|
-
* const { useEvolu, useEvoluError, useQuery, useOwner } =
|
|
31
|
-
* Evolu.create(Database);
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
34
|
-
export const create = EvoluReactLive.pipe(
|
|
35
|
-
Layer.provide(EvoluWebLive),
|
|
36
|
-
makeCreateEvoluReact,
|
|
37
|
-
);
|