@evolu/react-native 12.0.1-preview.7 → 12.0.1-preview.8

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.
@@ -0,0 +1,9 @@
1
+ import { FC } from "react";
2
+ import { IdenticonStyle, OwnerId } from "@evolu/common";
3
+ export declare const EvoluIdenticon: FC<{
4
+ id: OwnerId;
5
+ size?: number;
6
+ borderRadius?: number;
7
+ style?: IdenticonStyle;
8
+ }>;
9
+ //# sourceMappingURL=EvoluIdenticon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EvoluIdenticon.d.ts","sourceRoot":"","sources":["../../src/components/EvoluIdenticon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAW,MAAM,OAAO,CAAC;AACpC,OAAO,EAAmB,cAAc,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAEzE,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC;IAC9B,EAAE,EAAE,OAAO,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,cAAc,CAAC;CACxB,CAcA,CAAC"}
@@ -2,9 +2,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { View } from "react-native";
3
3
  import { SvgXml } from "react-native-svg";
4
4
  import { useMemo } from "react";
5
- import { bloSvg } from "blo";
6
- export const EvoluAvatar = ({ id, size = 32, borderRadius = 3 }) => {
7
- const svg = useMemo(() => bloSvg(`0x${id}`), [id]);
5
+ import { createIdenticon } from "@evolu/common";
6
+ export const EvoluIdenticon = ({ id, size = 32, borderRadius = 3, style }) => {
7
+ const svg = useMemo(() => createIdenticon(id, style), [id, style]);
8
8
  return id ? (_jsx(View, { style: {
9
9
  width: size,
10
10
  height: size,
@@ -1,5 +1,4 @@
1
1
  import { EvoluDeps } from "@evolu/common/evolu";
2
- export * from "./components/EvoluAvatar.js";
3
2
  export declare const localAuth: import("@evolu/common").LocalAuth;
4
3
  export declare const evoluReactNativeDeps: EvoluDeps;
5
4
  //# sourceMappingURL=expo-sqlite.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"expo-sqlite.d.ts","sourceRoot":"","sources":["../src/expo-sqlite.ts"],"names":[],"mappings":"AASA,OAAO,EAGL,SAAS,EAEV,MAAM,qBAAqB,CAAC;AA2B7B,cAAc,6BAA6B,CAAC;AAE5C,eAAO,MAAM,SAAS,mCAGpB,CAAC;AAEH,eAAO,MAAM,oBAAoB,EAAE,SAMlC,CAAC"}
1
+ {"version":3,"file":"expo-sqlite.d.ts","sourceRoot":"","sources":["../src/expo-sqlite.ts"],"names":[],"mappings":"AASA,OAAO,EAGL,SAAS,EAEV,MAAM,qBAAqB,CAAC;AA2B7B,eAAO,MAAM,SAAS,mCAGpB,CAAC;AAEH,eAAO,MAAM,oBAAoB,EAAE,SAMlC,CAAC"}
@@ -19,7 +19,6 @@ const createDbWorker = () => createDbWorkerForPlatform({
19
19
  const reloadApp = () => {
20
20
  void Expo.reloadAppAsync();
21
21
  };
22
- export * from "./components/EvoluAvatar.js";
23
22
  export const localAuth = createLocalAuth({
24
23
  randomBytes: randomBytes,
25
24
  secureStorage: createSecureStore(),
@@ -0,0 +1,2 @@
1
+ export * from "./components/EvoluIdenticon.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ export * from "./components/EvoluIdenticon.js";
@@ -1,5 +1,4 @@
1
1
  import { EvoluDeps } from "@evolu/common/evolu";
2
- export * from "./components/EvoluAvatar.js";
3
2
  export declare const localAuth: import("@evolu/common").LocalAuth;
4
3
  export declare const evoluReactNativeDeps: EvoluDeps;
5
4
  //# sourceMappingURL=op-sqlite.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"op-sqlite.d.ts","sourceRoot":"","sources":["../src/op-sqlite.ts"],"names":[],"mappings":"AASA,OAAO,EAGL,SAAS,EAEV,MAAM,qBAAqB,CAAC;AA+B7B,cAAc,6BAA6B,CAAC;AAE5C,eAAO,MAAM,SAAS,mCAGpB,CAAC;AAEH,eAAO,MAAM,oBAAoB,EAAE,SAMlC,CAAC"}
1
+ {"version":3,"file":"op-sqlite.d.ts","sourceRoot":"","sources":["../src/op-sqlite.ts"],"names":[],"mappings":"AASA,OAAO,EAGL,SAAS,EAEV,MAAM,qBAAqB,CAAC;AA+B7B,eAAO,MAAM,SAAS,mCAGpB,CAAC;AAEH,eAAO,MAAM,oBAAoB,EAAE,SAMlC,CAAC"}
package/dist/op-sqlite.js CHANGED
@@ -24,7 +24,6 @@ const reloadApp = () => {
24
24
  // TODO: reload not implemented for bare rn
25
25
  }
26
26
  };
27
- export * from "./components/EvoluAvatar.js";
28
27
  export const localAuth = createLocalAuth({
29
28
  randomBytes: randomBytes,
30
29
  secureStorage: SensitiveInfo,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evolu/react-native",
3
- "version": "12.0.1-preview.7",
3
+ "version": "12.0.1-preview.8",
4
4
  "description": "Evolu for React Native and Expo",
5
5
  "keywords": [
6
6
  "evolu",
@@ -19,6 +19,11 @@
19
19
  "homepage": "https://evolu.dev",
20
20
  "type": "module",
21
21
  "exports": {
22
+ ".": {
23
+ "types": "./dist/index.d.ts",
24
+ "default": "./dist/index.js",
25
+ "react-native": "./dist/index.js"
26
+ },
22
27
  "./expo-sqlite": {
23
28
  "types": "./dist/expo-sqlite.d.ts",
24
29
  "default": "./dist/expo-sqlite.js",
@@ -34,6 +39,9 @@
34
39
  },
35
40
  "typesVersions": {
36
41
  "*": {
42
+ ".": [
43
+ "./dist/index.d.ts"
44
+ ],
37
45
  "expo-sqlite": [
38
46
  "./dist/expo-sqlite.d.ts"
39
47
  ],
@@ -62,12 +70,12 @@
62
70
  "shx": "^0.4.0",
63
71
  "typescript": "^5.9.2",
64
72
  "vitest": "^4.0.4",
65
- "@evolu/common": "6.0.1-preview.25",
73
+ "@evolu/common": "6.0.1-preview.26",
66
74
  "@evolu/react": "9.0.1-preview.6",
67
75
  "@evolu/tsconfig": "0.0.2"
68
76
  },
69
77
  "peerDependencies": {
70
- "@evolu/common": "^6.0.1-preview.25",
78
+ "@evolu/common": "^6.0.1-preview.26",
71
79
  "@evolu/react": "^9.0.1-preview.6",
72
80
  "@op-engineering/op-sqlite": ">=12",
73
81
  "expo": ">=54",
@@ -1,15 +1,15 @@
1
1
  import { View } from "react-native";
2
2
  import { SvgXml } from "react-native-svg";
3
3
  import { FC, useMemo } from "react";
4
- import { bloSvg } from "blo";
5
- import { OwnerId } from "@evolu/common";
4
+ import { createIdenticon, IdenticonStyle, OwnerId } from "@evolu/common";
6
5
 
7
- export const EvoluAvatar: FC<{
6
+ export const EvoluIdenticon: FC<{
8
7
  id: OwnerId;
9
8
  size?: number;
10
9
  borderRadius?: number;
11
- }> = ({ id, size = 32, borderRadius = 3 }) => {
12
- const svg = useMemo(() => bloSvg(`0x${id}`), [id]);
10
+ style?: IdenticonStyle;
11
+ }> = ({ id, size = 32, borderRadius = 3, style }) => {
12
+ const svg = useMemo(() => createIdenticon(id, style), [id, style]);
13
13
  return id ? (
14
14
  <View
15
15
  style={{
@@ -39,8 +39,6 @@ const reloadApp: ReloadApp = () => {
39
39
  void Expo.reloadAppAsync();
40
40
  };
41
41
 
42
- export * from "./components/EvoluAvatar.js";
43
-
44
42
  export const localAuth = createLocalAuth({
45
43
  randomBytes: randomBytes,
46
44
  secureStorage: createSecureStore(),
package/src/index.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "./components/EvoluIdenticon.js";
package/src/op-sqlite.ts CHANGED
@@ -43,8 +43,6 @@ const reloadApp: ReloadApp = () => {
43
43
  }
44
44
  };
45
45
 
46
- export * from "./components/EvoluAvatar.js";
47
-
48
46
  export const localAuth = createLocalAuth({
49
47
  randomBytes: randomBytes,
50
48
  secureStorage: SensitiveInfo,
@@ -1,8 +0,0 @@
1
- import { FC } from "react";
2
- import { OwnerId } from "@evolu/common";
3
- export declare const EvoluAvatar: FC<{
4
- id: OwnerId;
5
- size?: number;
6
- borderRadius?: number;
7
- }>;
8
- //# sourceMappingURL=EvoluAvatar.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EvoluAvatar.d.ts","sourceRoot":"","sources":["../../src/components/EvoluAvatar.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAW,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC;IAC3B,EAAE,EAAE,OAAO,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAcA,CAAC"}