@evolu/react-web 1.0.1-preview.4 → 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.
@@ -1,8 +1,8 @@
1
1
  import type { OwnerId } from "@evolu/common";
2
2
  import { FC } from "react";
3
- export declare const EvoluOwnerIdIdenticon: FC<{
3
+ export declare const EvoluAvatar: FC<{
4
4
  id: OwnerId;
5
5
  size?: number;
6
6
  borderRadius?: number;
7
7
  }>;
8
- //# sourceMappingURL=EvoluOwnerIdIdenticon.d.ts.map
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"}
@@ -1,6 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { blo } from "blo";
3
- export const EvoluOwnerIdIdenticon = ({ id, size = 32, borderRadius = 3 }) => {
4
- const uri = blo(`0x${id}`);
3
+ import { useMemo } from "react";
4
+ export const EvoluAvatar = ({ id, size = 32, borderRadius = 3 }) => {
5
+ const uri = useMemo(() => blo(`0x${id}`), [id]);
5
6
  return (_jsx("img", { src: uri, width: size, height: size, style: { width: size, height: size, borderRadius } }));
6
7
  };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  import { EvoluDeps } from "@evolu/common/evolu";
2
- export * from "./EvoluOwnerIdIdenticon.js";
2
+ import { localAuth } from "@evolu/web";
3
+ export * from "./EvoluAvatar.js";
4
+ export { localAuth };
3
5
  export declare const evoluReactWebDeps: EvoluDeps;
4
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,cAAc,4BAA4B,CAAC;AAE3C,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,6 +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 "./EvoluOwnerIdIdenticon.js";
3
+ export * from "./EvoluAvatar.js";
4
+ export { localAuth };
4
5
  export const evoluReactWebDeps = {
5
6
  ...evoluWebDeps,
6
7
  flushSync,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evolu/react-web",
3
- "version": "1.0.1-preview.4",
3
+ "version": "1.0.1-preview.5",
4
4
  "description": "Evolu for React (web platform)",
5
5
  "keywords": [
6
6
  "evolu",
@@ -41,13 +41,13 @@
41
41
  "typescript": "^5.9.2",
42
42
  "user-agent-data-types": "^0.4.2",
43
43
  "vitest": "^4.0.4",
44
- "@evolu/common": "6.0.1-preview.20",
44
+ "@evolu/common": "6.0.1-preview.23",
45
45
  "@evolu/tsconfig": "0.0.2",
46
- "@evolu/web": "1.0.1-preview.6"
46
+ "@evolu/web": "1.0.1-preview.7"
47
47
  },
48
48
  "peerDependencies": {
49
- "@evolu/common": "^6.0.1-preview.20",
50
- "@evolu/web": "^1.0.1-preview.6",
49
+ "@evolu/common": "^6.0.1-preview.23",
50
+ "@evolu/web": "^1.0.1-preview.7",
51
51
  "react": ">=19",
52
52
  "react-dom": ">=19"
53
53
  },
@@ -1,14 +1,13 @@
1
1
  import type { OwnerId } from "@evolu/common";
2
2
  import { blo } from "blo";
3
- import { FC } from "react";
3
+ import { FC, useMemo } from "react";
4
4
 
5
- export const EvoluOwnerIdIdenticon: FC<{
5
+ export const EvoluAvatar: FC<{
6
6
  id: OwnerId;
7
7
  size?: number;
8
8
  borderRadius?: number;
9
9
  }> = ({ id, size = 32, borderRadius = 3 }) => {
10
- const uri = blo(`0x${id}`);
11
-
10
+ const uri = useMemo(() => blo(`0x${id}`), [id]);
12
11
  return (
13
12
  <img
14
13
  src={uri}
package/src/index.ts CHANGED
@@ -1,8 +1,9 @@
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 "./EvoluOwnerIdIdenticon.js";
5
+ export * from "./EvoluAvatar.js";
6
+ export { localAuth };
6
7
 
7
8
  export const evoluReactWebDeps: EvoluDeps = {
8
9
  ...evoluWebDeps,
@@ -1 +0,0 @@
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"}