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

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 EvoluOwnerIdIdenticon: FC<{
4
+ id: OwnerId;
5
+ size?: number;
6
+ borderRadius?: number;
7
+ }>;
8
+ //# sourceMappingURL=EvoluOwnerIdIdenticon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EvoluOwnerIdIdenticon.d.ts","sourceRoot":"","sources":["../src/EvoluOwnerIdIdenticon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAE3B,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC;IACrC,EAAE,EAAE,OAAO,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAWA,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { blo } from "blo";
3
+ export const EvoluOwnerIdIdenticon = ({ id, size = 32, borderRadius = 3 }) => {
4
+ const uri = blo(`0x${id}`);
5
+ return (_jsx("img", { src: uri, width: size, height: size, style: { width: size, height: size, borderRadius } }));
6
+ };
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  import { EvoluDeps } from "@evolu/common/evolu";
2
+ export * from "./EvoluOwnerIdIdenticon.js";
2
3
  export declare const evoluReactWebDeps: EvoluDeps;
3
4
  //# 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;AAIhD,cAAc,4BAA4B,CAAC;AAE3C,eAAO,MAAM,iBAAiB,EAAE,SAG/B,CAAC"}
package/dist/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { evoluWebDeps } from "@evolu/web";
2
2
  import { flushSync } from "react-dom";
3
+ export * from "./EvoluOwnerIdIdenticon.js";
3
4
  export const evoluReactWebDeps = {
4
5
  ...evoluWebDeps,
5
6
  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.4",
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.20",
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.6"
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.20",
50
+ "@evolu/web": "^1.0.1-preview.6",
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,20 @@
1
+ import type { OwnerId } from "@evolu/common";
2
+ import { blo } from "blo";
3
+ import { FC } from "react";
4
+
5
+ export const EvoluOwnerIdIdenticon: FC<{
6
+ id: OwnerId;
7
+ size?: number;
8
+ borderRadius?: number;
9
+ }> = ({ id, size = 32, borderRadius = 3 }) => {
10
+ const uri = blo(`0x${id}`);
11
+
12
+ return (
13
+ <img
14
+ src={uri}
15
+ width={size}
16
+ height={size}
17
+ style={{ width: size, height: size, borderRadius }}
18
+ />
19
+ );
20
+ };
package/src/index.ts CHANGED
@@ -2,6 +2,8 @@ import { EvoluDeps } from "@evolu/common/evolu";
2
2
  import { evoluWebDeps } from "@evolu/web";
3
3
  import { flushSync } from "react-dom";
4
4
 
5
+ export * from "./EvoluOwnerIdIdenticon.js";
6
+
5
7
  export const evoluReactWebDeps: EvoluDeps = {
6
8
  ...evoluWebDeps,
7
9
  flushSync,