@evolu/react-native 5.0.1 → 5.0.2

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.
@@ -1,8 +1,8 @@
1
1
  import { AppState, Bip39, FlushSync, PlatformName, SyncLock } from "@evolu/common";
2
2
  import * as Layer from "effect/Layer";
3
- export declare const PlatformNameLive: Layer.Layer<never, never, PlatformName>;
4
- export declare const FlushSyncLive: Layer.Layer<never, never, FlushSync>;
5
- export declare const SyncLockLive: Layer.Layer<never, never, SyncLock>;
6
- export declare const AppStateLive: Layer.Layer<never, never, AppState>;
7
- export declare const Bip39Live: Layer.Layer<never, never, Bip39>;
3
+ export declare const PlatformNameLive: Layer.Layer<PlatformName, never, never>;
4
+ export declare const FlushSyncLive: Layer.Layer<FlushSync, never, never>;
5
+ export declare const SyncLockLive: Layer.Layer<SyncLock, never, never>;
6
+ export declare const AppStateLive: Layer.Layer<AppState, never, never>;
7
+ export declare const Bip39Live: Layer.Layer<Bip39, never, never>;
8
8
  //# sourceMappingURL=PlatformLive.d.ts.map
@@ -1,4 +1,4 @@
1
1
  import { Sqlite } from "@evolu/common";
2
2
  import * as Layer from "effect/Layer";
3
- export declare const SqliteLive: Layer.Layer<never, never, Sqlite>;
3
+ export declare const SqliteLive: Layer.Layer<Sqlite, never, never>;
4
4
  //# sourceMappingURL=SqliteLive.d.ts.map
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { Config, Evolu, InvalidMnemonicError, Mnemonic } from "@evolu/common";
1
+ import { InvalidMnemonicError, Mnemonic } from "@evolu/common";
2
2
  import * as Effect from "effect/Effect";
3
3
  export { Id, NonEmptyString1000, PositiveInt, SqliteBoolean, SqliteDate, String, String1000, canUseDom, cast, database, id, table, } from "@evolu/common";
4
- export type { EvoluError, ExtractRow, InvalidMnemonicError, Mnemonic, Owner, OwnerId, QueryResult, SyncState, Timestamp, TimestampError, UnexpectedError, NotNull, } from "@evolu/common";
4
+ export type { EvoluError, ExtractRow, InvalidMnemonicError, Mnemonic, NotNull, Owner, OwnerId, QueryResult, SyncState, Timestamp, TimestampError, UnexpectedError, } from "@evolu/common";
5
5
  export { jsonArrayFrom, jsonObjectFrom } from "kysely/helpers/sqlite";
6
6
  export * from "@evolu/common-react";
7
7
  /**
@@ -35,7 +35,7 @@ export * from "@evolu/common-react";
35
35
  *
36
36
  * const evolu = createEvolu(Database);
37
37
  */
38
- export declare const createEvolu: <From, To extends import("@evolu/common").DatabaseSchema>(schema: import("@effect/schema/Schema").Schema<never, From, To>, config?: Partial<Config> | undefined) => Evolu<To>;
38
+ export declare const createEvolu: <From, To extends import("@evolu/common").DatabaseSchema>(schema: import("@effect/schema/Schema").Schema<To, From, never>, config?: Partial<import("@evolu/common").Config> | undefined) => import("@evolu/common").Evolu<To>;
39
39
  /** Parse a string to {@link Mnemonic}. */
40
- export declare const parseMnemonic: (mnemonic: string) => Effect.Effect<never, InvalidMnemonicError, Mnemonic>;
40
+ export declare const parseMnemonic: (mnemonic: string) => Effect.Effect<Mnemonic, InvalidMnemonicError>;
41
41
  //# sourceMappingURL=index.d.ts.map
@@ -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,EAKT,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAcxC,OAAO,EACL,EAAE,EACF,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,UAAU,EACV,MAAM,EACN,UAAU,EACV,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,EAAE,EACF,KAAK,GACN,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,UAAU,EACV,UAAU,EACV,oBAAoB,EACpB,QAAQ,EACR,KAAK,EACL,OAAO,EACP,WAAW,EACX,SAAS,EACT,SAAS,EACT,cAAc,EACd,eAAe,EACf,OAAO,GACR,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEtE,cAAc,qBAAqB,CAAC;AAWpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,WAAW,+KAAmC,CAAC;AAE5D,0CAA0C;AAC1C,eAAO,MAAM,aAAa,EAAE,CAC1B,QAAQ,EAAE,MAAM,KACb,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,oBAAoB,EAAE,QAAQ,CAGjD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,oBAAoB,EACpB,QAAQ,EAKT,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAcxC,OAAO,EACL,EAAE,EACF,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,UAAU,EACV,MAAM,EACN,UAAU,EACV,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,EAAE,EACF,KAAK,GACN,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,UAAU,EACV,UAAU,EACV,oBAAoB,EACpB,QAAQ,EACR,OAAO,EACP,KAAK,EACL,OAAO,EACP,WAAW,EACX,SAAS,EACT,SAAS,EACT,cAAc,EACd,eAAe,GAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEtE,cAAc,qBAAqB,CAAC;AAWpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,WAAW,+NAAmC,CAAC;AAE5D,0CAA0C;AAC1C,eAAO,MAAM,aAAa,EAAE,CAC1B,QAAQ,EAAE,MAAM,KACb,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,oBAAoB,CAG1C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evolu/react-native",
3
- "version": "5.0.1",
3
+ "version": "5.0.2",
4
4
  "description": "Evolu for React Native",
5
5
  "keywords": [
6
6
  "evolu",
@@ -40,13 +40,13 @@
40
40
  "react-native": "0.72.6",
41
41
  "typescript": "^5.3.3",
42
42
  "vitest": "^1.2.2",
43
- "@evolu/common": "3.1.1",
44
- "@evolu/common-react": "5.0.1",
43
+ "@evolu/common": "3.1.3",
44
+ "@evolu/common-react": "5.0.2",
45
45
  "@evolu/tsconfig": "0.0.2",
46
46
  "eslint-config-evolu": "1.0.0"
47
47
  },
48
48
  "peerDependencies": {
49
- "@evolu/common-react": "^5.0.1",
49
+ "@evolu/common-react": "^5.0.2",
50
50
  "expo": "^49.0.20",
51
51
  "expo-sqlite": "~11.3.3",
52
52
  "react-native": "^0.72.4"
package/src/index.ts CHANGED
@@ -1,8 +1,6 @@
1
1
  import {
2
2
  Bip39,
3
- Config,
4
3
  DbWorkerLive,
5
- Evolu,
6
4
  EvoluCommonLive,
7
5
  FetchLive,
8
6
  InvalidMnemonicError,
@@ -45,6 +43,7 @@ export type {
45
43
  ExtractRow,
46
44
  InvalidMnemonicError,
47
45
  Mnemonic,
46
+ NotNull,
48
47
  Owner,
49
48
  OwnerId,
50
49
  QueryResult,
@@ -52,14 +51,13 @@ export type {
52
51
  Timestamp,
53
52
  TimestampError,
54
53
  UnexpectedError,
55
- NotNull,
56
54
  } from "@evolu/common";
57
55
  export { jsonArrayFrom, jsonObjectFrom } from "kysely/helpers/sqlite";
58
56
 
59
57
  export * from "@evolu/common-react";
60
58
 
61
59
  /** Evolu for native platform. */
62
- const EvoluNativeLive: Layer.Layer<Config, never, Evolu> = EvoluCommonLive.pipe(
60
+ const EvoluNativeLive = EvoluCommonLive.pipe(
63
61
  Layer.provide(Layer.mergeAll(FlushSyncLive, AppStateLive, DbWorkerLive)),
64
62
  Layer.provide(
65
63
  Layer.mergeAll(Bip39Live, NanoIdLive, SqliteLive, SyncWorkerLive),
@@ -103,7 +101,7 @@ export const createEvolu = makeCreateEvolu(EvoluNativeLive);
103
101
  /** Parse a string to {@link Mnemonic}. */
104
102
  export const parseMnemonic: (
105
103
  mnemonic: string,
106
- ) => Effect.Effect<never, InvalidMnemonicError, Mnemonic> = Bip39.pipe(
104
+ ) => Effect.Effect<Mnemonic, InvalidMnemonicError> = Bip39.pipe(
107
105
  Effect.provide(Bip39Live),
108
106
  Effect.runSync,
109
107
  ).parse;