@evolu/react-web 1.0.1-preview.3 → 1.0.1-preview.5

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,8 @@
1
+ import type { OwnerId } from "@evolu/common";
2
+ import { FC } from "react";
3
+ export declare const EvoluAvatar: FC<{
4
+ id: OwnerId;
5
+ size?: number;
6
+ borderRadius?: number;
7
+ }>;
8
+ //# sourceMappingURL=EvoluAvatar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EvoluAvatar.d.ts","sourceRoot":"","sources":["../src/EvoluAvatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAE,EAAE,EAAW,MAAM,OAAO,CAAC;AAEpC,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC;IAC3B,EAAE,EAAE,OAAO,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAUA,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { blo } from "blo";
3
+ import { useMemo } from "react";
4
+ export const EvoluAvatar = ({ id, size = 32, borderRadius = 3 }) => {
5
+ const uri = useMemo(() => blo(`0x${id}`), [id]);
6
+ return (_jsx("img", { src: uri, width: size, height: size, style: { width: size, height: size, borderRadius } }));
7
+ };
package/dist/index.d.ts CHANGED
@@ -1,3 +1,6 @@
1
1
  import { EvoluDeps } from "@evolu/common/evolu";
2
+ import { localAuth } from "@evolu/web";
3
+ export * from "./EvoluAvatar.js";
4
+ export { localAuth };
2
5
  export declare const evoluReactWebDeps: EvoluDeps;
3
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAIhD,eAAO,MAAM,iBAAiB,EAAE,SAG/B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAgB,SAAS,EAAE,MAAM,YAAY,CAAC;AAGrD,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,CAAC;AAErB,eAAO,MAAM,iBAAiB,EAAE,SAG/B,CAAC"}
package/dist/index.js CHANGED
@@ -1,5 +1,7 @@
1
- import { evoluWebDeps } from "@evolu/web";
1
+ import { evoluWebDeps, localAuth } from "@evolu/web";
2
2
  import { flushSync } from "react-dom";
3
+ export * from "./EvoluAvatar.js";
4
+ export { localAuth };
3
5
  export const evoluReactWebDeps = {
4
6
  ...evoluWebDeps,
5
7
  flushSync,
package/package.json CHANGED
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "name": "@evolu/react-web",
3
- "version": "1.0.1-preview.3",
3
+ "version": "1.0.1-preview.5",
4
4
  "description": "Evolu for React (web platform)",
5
5
  "keywords": [
6
6
  "evolu",
7
7
  "react",
8
8
  "web"
9
9
  ],
10
- "author": "Daniel Steigerwald <daniel@steigerwald.cz>",
11
- "license": "MIT",
12
- "repository": "evoluhq/evolu",
10
+ "homepage": "https://evolu.dev",
13
11
  "bugs": {
14
12
  "url": "https://github.com/evoluhq/evolu/issues"
15
13
  },
16
- "homepage": "https://evolu.dev",
14
+ "repository": "evoluhq/evolu",
15
+ "license": "MIT",
16
+ "author": "Daniel Steigerwald <daniel@steigerwald.cz>",
17
+ "sideEffects": [],
17
18
  "type": "module",
18
- "types": "./dist/index.d.ts",
19
19
  "exports": {
20
20
  ".": {
21
21
  "types": "./dist/index.d.ts",
@@ -23,35 +23,44 @@
23
23
  "browser": "./dist/index.js"
24
24
  }
25
25
  },
26
+ "types": "./dist/index.d.ts",
26
27
  "files": [
27
28
  "dist/**",
28
29
  "src/**",
29
30
  "README.md"
30
31
  ],
32
+ "dependencies": {
33
+ "blo": "^2.0.0"
34
+ },
31
35
  "devDependencies": {
32
- "react-dom": "^19.1.1",
36
+ "@types/react": "~19.1.13",
37
+ "@types/react-dom": "~19.1.9",
38
+ "react": "19.1.0",
39
+ "react-dom": "19.1.0",
40
+ "shx": "^0.4.0",
33
41
  "typescript": "^5.9.2",
34
- "vitest": "^3.2.3",
42
+ "user-agent-data-types": "^0.4.2",
43
+ "vitest": "^4.0.4",
44
+ "@evolu/common": "6.0.1-preview.23",
35
45
  "@evolu/tsconfig": "0.0.2",
36
- "@evolu/common": "6.0.1-preview.18",
37
- "@evolu/web": "1.0.1-preview.4"
46
+ "@evolu/web": "1.0.1-preview.7"
38
47
  },
39
48
  "peerDependencies": {
40
- "@evolu/common": "^6.0.1-preview.18",
41
- "@evolu/web": "^1.0.1-preview.4",
42
- "react-dom": "^19.0.0"
43
- },
44
- "publishConfig": {
45
- "access": "public"
49
+ "@evolu/common": "^6.0.1-preview.23",
50
+ "@evolu/web": "^1.0.1-preview.7",
51
+ "react": ">=19",
52
+ "react-dom": ">=19"
46
53
  },
47
54
  "engines": {
48
55
  "node": ">=22.0.0"
49
56
  },
50
- "sideEffects": [],
57
+ "publishConfig": {
58
+ "access": "public"
59
+ },
51
60
  "scripts": {
52
- "dev": "tsc --watch",
53
61
  "build": "shx rm -rf dist && tsc",
54
62
  "clean": "shx rm -rf .turbo node_modules dist",
63
+ "dev": "tsc --watch",
55
64
  "format": "prettier --write \"src/*.{ts,tsx,md}\""
56
65
  }
57
66
  }
@@ -0,0 +1,19 @@
1
+ import type { OwnerId } from "@evolu/common";
2
+ import { blo } from "blo";
3
+ import { FC, useMemo } from "react";
4
+
5
+ export const EvoluAvatar: FC<{
6
+ id: OwnerId;
7
+ size?: number;
8
+ borderRadius?: number;
9
+ }> = ({ id, size = 32, borderRadius = 3 }) => {
10
+ const uri = useMemo(() => blo(`0x${id}`), [id]);
11
+ return (
12
+ <img
13
+ src={uri}
14
+ width={size}
15
+ height={size}
16
+ style={{ width: size, height: size, borderRadius }}
17
+ />
18
+ );
19
+ };
package/src/index.ts CHANGED
@@ -1,7 +1,10 @@
1
1
  import { EvoluDeps } from "@evolu/common/evolu";
2
- import { evoluWebDeps } from "@evolu/web";
2
+ import { evoluWebDeps, localAuth } from "@evolu/web";
3
3
  import { flushSync } from "react-dom";
4
4
 
5
+ export * from "./EvoluAvatar.js";
6
+ export { localAuth };
7
+
5
8
  export const evoluReactWebDeps: EvoluDeps = {
6
9
  ...evoluWebDeps,
7
10
  flushSync,