@evolu/react-native 3.0.0 → 3.0.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/index.d.ts CHANGED
@@ -5,11 +5,18 @@ export type { EvoluError, InvalidMnemonicError, Mnemonic, Owner, OwnerId, SyncSt
5
5
  export { jsonArrayFrom, jsonObjectFrom } from "kysely/helpers/sqlite";
6
6
  export * from "@evolu/common-react";
7
7
  /**
8
- * Create Evolu for web.
8
+ * Create Evolu for React Native.
9
+ *
10
+ * Tables with a name prefixed with `_` are local-only, which means they are
11
+ * never synced. It's useful for device-specific or temporal data.
9
12
  *
10
13
  * @example
11
14
  * import * as S from "@effect/schema/Schema";
12
- * import { NonEmptyString1000, createEvolu, id } from "@evolu/react";
15
+ * import {
16
+ * NonEmptyString1000,
17
+ * createEvolu,
18
+ * id,
19
+ * } from "@evolu/react-native";
13
20
  *
14
21
  * const TodoId = id("Todo");
15
22
  * type TodoId = S.Schema.To<typeof TodoId>;
@@ -21,6 +28,7 @@ export * from "@evolu/common-react";
21
28
  * type TodoTable = S.Schema.To<typeof TodoTable>;
22
29
  *
23
30
  * const Database = S.struct({
31
+ * // _todo is local-only table
24
32
  * todo: TodoTable,
25
33
  * });
26
34
  * type Database = S.Schema.To<typeof Database>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EAEN,KAAK,EAGL,oBAAoB,EACpB,QAAQ,EAER,MAAM,EAIP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,MAAM,EAAS,MAAM,QAAQ,CAAC;AAavC,OAAO,EACL,EAAE,EACF,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,UAAU,EACV,MAAM,EACN,UAAU,EACV,SAAS,EACT,IAAI,EACJ,EAAE,GACH,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,UAAU,EACV,oBAAoB,EACpB,QAAQ,E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package/dist/index.js CHANGED
@@ -12,11 +12,18 @@ export * from "@evolu/common-react";
12
12
  /** Evolu for native platform. */
13
13
  const EvoluNativeLive = EvoluCommonLive.pipe(Layer.provide(Layer.mergeAll(FlushSyncLive, AppStateLive, DbWorkerLive)), Layer.provide(Layer.mergeAll(Bip39Live, NanoIdLive, SqliteLive, SyncWorkerLive)), Layer.provide(Layer.mergeAll(SecretBoxLive, SyncLockLive, FetchLive)));
14
14
  /**
15
- * Create Evolu for web.
15
+ * Create Evolu for React Native.
16
+ *
17
+ * Tables with a name prefixed with `_` are local-only, which means they are
18
+ * never synced. It's useful for device-specific or temporal data.
16
19
  *
17
20
  * @example
18
21
  * import * as S from "@effect/schema/Schema";
19
- * import { NonEmptyString1000, createEvolu, id } from "@evolu/react";
22
+ * import {
23
+ * NonEmptyString1000,
24
+ * createEvolu,
25
+ * id,
26
+ * } from "@evolu/react-native";
20
27
  *
21
28
  * const TodoId = id("Todo");
22
29
  * type TodoId = S.Schema.To<typeof TodoId>;
@@ -28,6 +35,7 @@ const EvoluNativeLive = EvoluCommonLive.pipe(Layer.provide(Layer.mergeAll(FlushS
28
35
  * type TodoTable = S.Schema.To<typeof TodoTable>;
29
36
  *
30
37
  * const Database = S.struct({
38
+ * // _todo is local-only table
31
39
  * todo: TodoTable,
32
40
  * });
33
41
  * type Database = S.Schema.To<typeof Database>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evolu/react-native",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "Evolu for React Native",
5
5
  "keywords": [
6
6
  "evolu",
@@ -39,10 +39,10 @@
39
39
  "expo-sqlite": "~11.3.3",
40
40
  "react-native": "^0.72.6",
41
41
  "typescript": "^5.3.2",
42
- "vitest": "^0.34.6",
42
+ "vitest": "^1.0.1",
43
43
  "@evolu/common": "2.1.0",
44
- "@evolu/common-react": "3.0.0",
45
44
  "@evolu/tsconfig": "0.0.2",
45
+ "@evolu/common-react": "3.0.0",
46
46
  "eslint-config-evolu": "1.0.0"
47
47
  },
48
48
  "peerDependencies": {
package/src/index.ts CHANGED
@@ -67,11 +67,18 @@ const EvoluNativeLive: Layer.Layer<
67
67
  );
68
68
 
69
69
  /**
70
- * Create Evolu for web.
70
+ * Create Evolu for React Native.
71
+ *
72
+ * Tables with a name prefixed with `_` are local-only, which means they are
73
+ * never synced. It's useful for device-specific or temporal data.
71
74
  *
72
75
  * @example
73
76
  * import * as S from "@effect/schema/Schema";
74
- * import { NonEmptyString1000, createEvolu, id } from "@evolu/react";
77
+ * import {
78
+ * NonEmptyString1000,
79
+ * createEvolu,
80
+ * id,
81
+ * } from "@evolu/react-native";
75
82
  *
76
83
  * const TodoId = id("Todo");
77
84
  * type TodoId = S.Schema.To<typeof TodoId>;
@@ -83,6 +90,7 @@ const EvoluNativeLive: Layer.Layer<
83
90
  * type TodoTable = S.Schema.To<typeof TodoTable>;
84
91
  *
85
92
  * const Database = S.struct({
93
+ * // _todo is local-only table
86
94
  * todo: TodoTable,
87
95
  * });
88
96
  * type Database = S.Schema.To<typeof Database>;