@xyo-network/react-chain-blockies 1.23.0 → 1.23.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,13 +1,8 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
-
4
1
  // src/components/blockies/Account.tsx
5
- import React, { useMemo } from "react";
2
+ import { useMemo } from "react";
6
3
 
7
4
  // src/components/blockies/blockies.ts
8
- var randomSeed = Array.from({
9
- length: 4
10
- });
5
+ var randomSeed = Array.from({ length: 4 });
11
6
  function seedRandom(seed) {
12
7
  for (let i = 0; i < randomSeed.length; i++) {
13
8
  randomSeed[i] = 0;
@@ -16,7 +11,6 @@ function seedRandom(seed) {
16
11
  randomSeed[i % 4] = (randomSeed[i % 4] << 5) - randomSeed[i % 4] + seed.codePointAt(i);
17
12
  }
18
13
  }
19
- __name(seedRandom, "seedRandom");
20
14
  function rand() {
21
15
  const t = randomSeed[0] ^ randomSeed[0] << 11;
22
16
  randomSeed[0] = randomSeed[1];
@@ -25,14 +19,12 @@ function rand() {
25
19
  randomSeed[3] = randomSeed[3] ^ randomSeed[3] >> 19 ^ t ^ t >> 8;
26
20
  return (randomSeed[3] >>> 0) / (1 << 31 >>> 0);
27
21
  }
28
- __name(rand, "rand");
29
22
  function createColor() {
30
23
  const h = Math.floor(rand() * 360);
31
24
  const s = rand() * 60 + 40 + "%";
32
25
  const l = (rand() + rand() + rand() + rand()) * 25 + "%";
33
26
  return "hsl(" + h + "," + s + "," + l + ")";
34
27
  }
35
- __name(createColor, "createColor");
36
28
  function createImageData(size) {
37
29
  const width = size;
38
30
  const height = size;
@@ -46,17 +38,13 @@ function createImageData(size) {
46
38
  }
47
39
  const r = row.slice(0, mirrorWidth);
48
40
  r.reverse();
49
- row = [
50
- ...row,
51
- ...r
52
- ];
41
+ row = [...row, ...r];
53
42
  for (const element of row) {
54
43
  data.push(element);
55
44
  }
56
45
  }
57
46
  return data;
58
47
  }
59
- __name(createImageData, "createImageData");
60
48
  function buildOpts(opts) {
61
49
  const newOpts = {};
62
50
  newOpts.seed = opts.seed ?? Math.floor(Math.random() * Math.pow(10, 16)).toString(16);
@@ -68,7 +56,6 @@ function buildOpts(opts) {
68
56
  newOpts.spotcolor = opts.spotcolor ?? createColor();
69
57
  return newOpts;
70
58
  }
71
- __name(buildOpts, "buildOpts");
72
59
  function renderIcon(opts, canvas) {
73
60
  const updatedOptions = buildOpts(opts ?? {});
74
61
  const imageData = createImageData(updatedOptions.size);
@@ -89,93 +76,97 @@ function renderIcon(opts, canvas) {
89
76
  }
90
77
  return canvas;
91
78
  }
92
- __name(renderIcon, "renderIcon");
93
79
  function createIcon(opts) {
94
80
  const canvas = document.createElement("canvas");
95
81
  renderIcon(opts, canvas);
96
82
  return canvas;
97
83
  }
98
- __name(createIcon, "createIcon");
99
84
 
100
85
  // src/components/blockies/Account.tsx
101
- var BlockiesAccount = /* @__PURE__ */ __name(({ ...options }) => {
86
+ import { jsx } from "react/jsx-runtime";
87
+ var BlockiesAccount = ({ ...options }) => {
102
88
  const img = useMemo(() => {
103
89
  if (options.seed !== void 0) {
104
90
  return createIcon(options).toDataURL();
105
91
  }
106
- }, [
107
- options
108
- ]);
109
- return /* @__PURE__ */ React.createElement("img", {
110
- src: img
111
- });
112
- }, "BlockiesAccount");
92
+ }, [options]);
93
+ return /* @__PURE__ */ jsx("img", { src: img });
94
+ };
113
95
 
114
96
  // src/components/blockies/Avatar.tsx
115
97
  import { Circle } from "@mui/icons-material";
116
- import { Avatar, Badge, useTheme } from "@mui/material";
98
+ import {
99
+ Avatar,
100
+ Badge,
101
+ useTheme
102
+ } from "@mui/material";
117
103
  import { grey } from "@mui/material/colors";
118
104
  import { alphaCss } from "@xylabs/react-theme";
119
- import React2, { useMemo as useMemo2 } from "react";
120
- var BlockiesAvatar = /* @__PURE__ */ __name(({ blockiesOptions, ...props }) => {
105
+ import { useMemo as useMemo2 } from "react";
106
+ import { jsx as jsx2 } from "react/jsx-runtime";
107
+ var BlockiesAvatar = ({ blockiesOptions, ...props }) => {
121
108
  const img = useMemo2(() => {
122
109
  if (blockiesOptions?.seed !== void 0) {
123
110
  return createIcon(blockiesOptions).toDataURL();
124
111
  }
125
- }, [
126
- blockiesOptions
127
- ]);
128
- return /* @__PURE__ */ React2.createElement(Avatar, {
129
- component: "span",
130
- src: img,
131
- ...props
132
- });
133
- }, "BlockiesAvatar");
134
- var BlockiesAvatarAddress = /* @__PURE__ */ __name(({ address, borderSizeFactor = 0.0833, size = 24, sx, ...props }) => {
112
+ }, [blockiesOptions]);
113
+ return /* @__PURE__ */ jsx2(Avatar, { component: "span", src: img, ...props });
114
+ };
115
+ var BlockiesAvatarAddress = ({
116
+ address,
117
+ borderSizeFactor = 0.0833,
118
+ size = 24,
119
+ sx,
120
+ ...props
121
+ }) => {
135
122
  const theme = useTheme();
136
123
  const options = useMemo2(() => {
137
124
  if (address !== void 0) {
138
- return {
139
- seed: address
140
- };
125
+ return { seed: address };
141
126
  }
142
- }, [
143
- address
144
- ]);
145
- return /* @__PURE__ */ React2.createElement(BlockiesAvatar, {
146
- blockiesOptions: options,
147
- sx: {
148
- width: size,
149
- height: size,
150
- border: `${Math.ceil(size * borderSizeFactor)}px solid ${alphaCss(theme.vars?.palette.text.primary ?? grey[500], 0.8)}`,
151
- ...sx
152
- },
153
- ...props
154
- });
155
- }, "BlockiesAvatarAddress");
156
- var BlockiesAvatarAddressApproved = /* @__PURE__ */ __name(({ approved, badgeVariant, ...props }) => {
127
+ }, [address]);
128
+ return /* @__PURE__ */ jsx2(
129
+ BlockiesAvatar,
130
+ {
131
+ blockiesOptions: options,
132
+ sx: {
133
+ width: size,
134
+ height: size,
135
+ border: `${Math.ceil(size * borderSizeFactor)}px solid ${alphaCss(theme.vars?.palette.text.primary ?? grey[500], 0.8)}`,
136
+ ...sx
137
+ },
138
+ ...props
139
+ }
140
+ );
141
+ };
142
+ var BlockiesAvatarAddressApproved = ({
143
+ approved,
144
+ badgeVariant,
145
+ ...props
146
+ }) => {
157
147
  const sx = badgeVariant === "dot" ? {} : {
158
148
  bgcolor: "white",
159
149
  borderRadius: 12,
160
150
  fontSize: "0.83333rem"
161
151
  };
162
152
  const dotPlacement = badgeVariant === "dot" ? 3 : 5;
163
- return /* @__PURE__ */ React2.createElement(Badge, {
164
- color: badgeVariant === "dot" ? "success" : "default",
165
- variant: badgeVariant,
166
- invisible: !approved,
167
- badgeContent: approved ? /* @__PURE__ */ React2.createElement(Circle, {
168
- color: "success",
169
- sx
170
- }) : "",
171
- sx: {
172
- "& .MuiBadge-badge": {
173
- top: dotPlacement,
174
- right: dotPlacement
175
- }
153
+ return /* @__PURE__ */ jsx2(
154
+ Badge,
155
+ {
156
+ color: badgeVariant === "dot" ? "success" : "default",
157
+ variant: badgeVariant,
158
+ invisible: !approved,
159
+ badgeContent: approved ? /* @__PURE__ */ jsx2(Circle, { color: "success", sx }) : "",
160
+ sx: {
161
+ "& .MuiBadge-badge": {
162
+ top: dotPlacement,
163
+ right: dotPlacement
164
+ }
165
+ },
166
+ children: /* @__PURE__ */ jsx2(BlockiesAvatarAddress, { ...props })
176
167
  }
177
- }, /* @__PURE__ */ React2.createElement(BlockiesAvatarAddress, props));
178
- }, "BlockiesAvatarAddressApproved");
168
+ );
169
+ };
179
170
  export {
180
171
  BlockiesAccount,
181
172
  BlockiesAvatar,
@@ -185,4 +176,4 @@ export {
185
176
  createIcon,
186
177
  renderIcon
187
178
  };
188
- //# sourceMappingURL=index.mjs.map
179
+ //# sourceMappingURL=index.mjs.map
@@ -1 +1,7 @@
1
- {"version":3,"sources":["../../src/components/blockies/Account.tsx","../../src/components/blockies/blockies.ts","../../src/components/blockies/Avatar.tsx"],"sourcesContent":["import React, { useMemo } from 'react'\n\nimport type { BlockiesOptions } from './blockies.ts'\nimport { createIcon } from './blockies.ts'\n\n/**\n * @deprecated Use {@link BlockiesAccountProps} from `@xyo-network/xl1-blockies` instead.\n */\nexport interface BlockiesAccountProps extends Partial<BlockiesOptions> {}\n\n/**\n * @deprecated Use {@link BlockiesAccount} from `@xyo-network/xl1-blockies` instead.\n */\nexport const BlockiesAccount: React.FC<BlockiesAccountProps> = ({ ...options }) => {\n const img = useMemo(() => {\n if (options.seed !== undefined) {\n return createIcon(options).toDataURL()\n }\n }, [options])\n\n return <img src={img} />\n}\n","/**\n * inspired by https://github.com/download13/blockies/blob/master/src/blockies.mjs\n */\n\n// The random number is a js implementation of the Xorshift PRNG\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst randomSeed: any[] = Array.from({ length: 4 }) // Xorshift: [x, y, z, w] 32 bit values\n\nfunction seedRandom(seed: string) {\n for (let i = 0; i < randomSeed.length; i++) {\n randomSeed[i] = 0\n }\n for (let i = 0; i < seed.length; i++) {\n randomSeed[i % 4] = ((randomSeed[i % 4] << 5) - randomSeed[i % 4]) + seed.codePointAt(i)!\n }\n}\n\nfunction rand() {\n // based on Java's String.hashCode(), expanded to 4 32bit values\n const t = randomSeed[0] ^ (randomSeed[0] << 11)\n\n randomSeed[0] = randomSeed[1]\n randomSeed[1] = randomSeed[2]\n randomSeed[2] = randomSeed[3]\n randomSeed[3] = (randomSeed[3] ^ (randomSeed[3] >> 19) ^ t ^ (t >> 8))\n\n return (randomSeed[3] >>> 0) / ((1 << 31) >>> 0)\n}\n\nfunction createColor() {\n // saturation is the whole color spectrum\n const h = Math.floor(rand() * 360)\n // saturation goes from 40 to 100, it avoids greyish colors\n const s = ((rand() * 60) + 40) + '%'\n // lightness can be anything from 0 to 100, but probabilities are a bell curve around 50%\n const l = ((rand() + rand() + rand() + rand()) * 25) + '%'\n\n return 'hsl(' + h + ',' + s + ',' + l + ')'\n}\n\nfunction createImageData(size: number) {\n const width = size // Only support square icons for now\n const height = size\n\n const dataWidth = Math.ceil(width / 2)\n const mirrorWidth = width - dataWidth\n\n const data = []\n for (let y = 0; y < height; y++) {\n let row = []\n for (let x = 0; x < dataWidth; x++) {\n // this makes foreground and background color to have a 43% (1/2.3) probability\n // spot color has 13% chance\n row[x] = Math.floor(rand() * 2.3)\n }\n const r = row.slice(0, mirrorWidth)\n r.reverse()\n row = [...row, ...r]\n\n for (const element of row) {\n data.push(element)\n }\n }\n\n return data\n}\n\n/**\n * @deprecated Use {@link BlockiesOptions} from `@xyo-network/xl1-blockies` instead.\n */\nexport interface BlockiesOptions {\n bgcolor: string\n color: string\n scale: number\n seed: string\n size: number\n spotcolor: string\n}\n\n/**\n * @deprecated Use {@link buildOpts} from `@xyo-network/xl1-blockies` instead.\n */\nexport function buildOpts(opts: Partial<BlockiesOptions>): BlockiesOptions {\n const newOpts = {} as BlockiesOptions\n\n newOpts.seed = opts.seed ?? Math.floor((Math.random() * Math.pow(10, 16))).toString(16)\n\n seedRandom(newOpts.seed)\n\n newOpts.size = opts.size ?? 8\n newOpts.scale = opts.scale ?? 4\n newOpts.color = opts.color ?? createColor()\n newOpts.bgcolor = opts.bgcolor ?? createColor()\n newOpts.spotcolor = opts.spotcolor ?? createColor()\n\n return newOpts\n}\n\n/**\n * @deprecated Use {@link renderIcon} from `@xyo-network/xl1-blockies` instead.\n */\nexport function renderIcon(opts: Partial<BlockiesOptions>, canvas: HTMLCanvasElement) {\n const updatedOptions = buildOpts(opts ?? {})\n const imageData = createImageData(updatedOptions.size)\n const width = Math.sqrt(imageData.length)\n\n canvas.width = canvas.height = updatedOptions.size * updatedOptions.scale\n\n const cc = canvas.getContext('2d')\n if (cc === null) throw new Error('unable to get 2d context')\n cc.fillStyle = updatedOptions.bgcolor\n cc.fillRect(0, 0, canvas.width, canvas.height)\n cc.fillStyle = updatedOptions.color\n\n for (const [i, imageDatum] of imageData.entries()) {\n // if data is 0, leave the background\n if (imageDatum > 0) {\n const row = Math.floor(i / width)\n const col = i % width\n\n // if data is 2, choose spot color, if 1 choose foreground\n cc.fillStyle = (imageDatum == 1) ? updatedOptions.color : updatedOptions.spotcolor\n\n cc.fillRect(col * updatedOptions.scale, row * updatedOptions.scale, updatedOptions.scale, updatedOptions.scale)\n }\n }\n\n return canvas\n}\n\n/**\n * @deprecated Use {@link createIcon} from `@xyo-network/xl1-blockies` instead.\n */\nexport function createIcon(opts: Partial<BlockiesOptions>) {\n const canvas = document.createElement('canvas')\n\n renderIcon(opts, canvas)\n\n return canvas\n}\n","import { Circle } from '@mui/icons-material'\nimport type { AvatarProps, BadgeProps } from '@mui/material'\nimport {\n Avatar, Badge, useTheme,\n} from '@mui/material'\nimport { grey } from '@mui/material/colors'\nimport { alphaCss } from '@xylabs/react-theme'\nimport React, { useMemo } from 'react'\n\nimport type { BlockiesOptions } from './blockies.ts'\nimport { createIcon } from './blockies.ts'\n\n/**\n * @deprecated Use {@link BlockiesAvatarProps} from `@xyo-network/xl1-blockies` instead.\n */\nexport interface BlockiesAvatarProps extends AvatarProps {\n blockiesOptions?: Partial<BlockiesOptions>\n}\n\n/**\n * @deprecated Use {@link BlockiesAvatar} from `@xyo-network/xl1-blockies` instead.\n */\nexport const BlockiesAvatar: React.FC<BlockiesAvatarProps> = ({ blockiesOptions, ...props }) => {\n const img = useMemo(() => {\n if (blockiesOptions?.seed !== undefined) {\n return createIcon(blockiesOptions).toDataURL()\n }\n }, [blockiesOptions])\n\n return (\n <Avatar component=\"span\" src={img} {...props} />\n )\n}\n\n/**\n * @deprecated Use {@link BlockiesAvatarAddressProps} from `@xyo-network/xl1-blockies` instead.\n */\nexport interface BlockiesAvatarAddressProps extends AvatarProps {\n /** The Address to display */\n address?: string\n /** Size of the border is the size prop * borderSizeFactor and rounded up */\n borderSizeFactor?: number\n /** The size of the avatar in pixels, defaults to 24 */\n size?: number\n}\n\n/**\n * @deprecated Use {@link BlockiesAvatarAddress} from `@xyo-network/xl1-blockies` instead.\n */\nexport const BlockiesAvatarAddress: React.FC<BlockiesAvatarAddressProps> = ({\n address, borderSizeFactor = 0.0833, size = 24, sx, ...props\n}) => {\n const theme = useTheme()\n const options = useMemo(() => {\n if (address !== undefined) {\n return { seed: address }\n }\n }, [address])\n\n return (\n <BlockiesAvatar\n blockiesOptions={options}\n sx={{\n width: size,\n height: size,\n border: `${Math.ceil(size * borderSizeFactor)}px solid ${alphaCss(theme.vars?.palette.text.primary ?? grey[500], 0.8)}`,\n ...sx,\n }}\n {...props}\n />\n )\n}\n\n/**\n * @deprecated Use {@link BlockiesAvatarAddressApprovedProps} from `@xyo-network/xl1-blockies` instead.\n */\nexport interface BlockiesAvatarAddressApprovedProps extends BlockiesAvatarAddressProps {\n /** Whether to show the approved badge */\n approved?: boolean\n badgeVariant?: BadgeProps['variant']\n}\n\n/**\n * @deprecated Use {@link BlockiesAvatarAddressApproved} from `@xyo-network/xl1-blockies` instead.\n */\nexport const BlockiesAvatarAddressApproved: React.FC<BlockiesAvatarAddressApprovedProps> = ({\n approved, badgeVariant, ...props\n}) => {\n const sx = badgeVariant === 'dot'\n ? {}\n : {\n bgcolor: 'white', borderRadius: 12, fontSize: '0.83333rem',\n }\n const dotPlacement = badgeVariant === 'dot' ? 3 : 5\n return (\n <Badge\n color={badgeVariant === 'dot' ? 'success' : 'default'}\n variant={badgeVariant}\n invisible={!approved}\n badgeContent={approved ? <Circle color=\"success\" sx={sx} /> : ''}\n sx={{\n '& .MuiBadge-badge': {\n top: dotPlacement,\n right: dotPlacement,\n },\n }}\n >\n <BlockiesAvatarAddress {...props} />\n </Badge>\n )\n}\n"],"mappings":";;;;AAAA,OAAOA,SAASC,eAAe;;;ACM/B,IAAMC,aAAoBC,MAAMC,KAAK;EAAEC,QAAQ;AAAE,CAAA;AAEjD,SAASC,WAAWC,MAAY;AAC9B,WAASC,IAAI,GAAGA,IAAIN,WAAWG,QAAQG,KAAK;AAC1CN,eAAWM,CAAAA,IAAK;EAClB;AACA,WAASA,IAAI,GAAGA,IAAID,KAAKF,QAAQG,KAAK;AACpCN,eAAWM,IAAI,CAAA,KAAON,WAAWM,IAAI,CAAA,KAAM,KAAKN,WAAWM,IAAI,CAAA,IAAMD,KAAKE,YAAYD,CAAAA;EACxF;AACF;AAPSF;AAST,SAASI,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QAAQC,KAAKC,WAAWC,KAAK,GAAA,GAAM,GAAA,CAAA;MACjH,GAAGd;IACL;IACC,GAAGf;;AAGV,GAtB2E;AAoCpE,IAAM8B,gCAA8E,wBAAC,EAC1FC,UAAUC,cAAc,GAAGhC,MAAAA,MAC5B;AACC,QAAMe,KAAKiB,iBAAiB,QACxB,CAAC,IACD;IACEC,SAAS;IAASC,cAAc;IAAIC,UAAU;EAChD;AACJ,QAAMC,eAAeJ,iBAAiB,QAAQ,IAAI;AAClD,SACE,gBAAAzB,OAAA,cAAC8B,OAAAA;IACCC,OAAON,iBAAiB,QAAQ,YAAY;IAC5CO,SAASP;IACTQ,WAAW,CAACT;IACZU,cAAcV,WAAW,gBAAAxB,OAAA,cAACmC,QAAAA;MAAOJ,OAAM;MAAUvB;SAAa;IAC9DA,IAAI;MACF,qBAAqB;QACnB4B,KAAKP;QACLQ,OAAOR;MACT;IACF;KAEA,gBAAA7B,OAAA,cAACI,uBAA0BX,KAAAA,CAAAA;AAGjC,GAzB2F;","names":["React","useMemo","randomSeed","Array","from","length","seedRandom","seed","i","codePointAt","rand","t","createColor","h","Math","floor","s","l","createImageData","size","width","height","dataWidth","ceil","mirrorWidth","data","y","row","x","r","slice","reverse","element","push","buildOpts","opts","newOpts","random","pow","toString","scale","color","bgcolor","spotcolor","renderIcon","canvas","updatedOptions","imageData","sqrt","cc","getContext","Error","fillStyle","fillRect","imageDatum","entries","col","createIcon","document","createElement","BlockiesAccount","options","img","useMemo","seed","undefined","createIcon","toDataURL","src","Circle","Avatar","Badge","useTheme","grey","alphaCss","React","useMemo","BlockiesAvatar","blockiesOptions","props","img","useMemo","seed","undefined","createIcon","toDataURL","React","Avatar","component","src","BlockiesAvatarAddress","address","borderSizeFactor","size","sx","theme","useTheme","options","width","height","border","Math","ceil","alphaCss","vars","palette","text","primary","grey","BlockiesAvatarAddressApproved","approved","badgeVariant","bgcolor","borderRadius","fontSize","dotPlacement","Badge","color","variant","invisible","badgeContent","Circle","top","right"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/components/blockies/Account.tsx", "../../src/components/blockies/blockies.ts", "../../src/components/blockies/Avatar.tsx"],
4
+ "sourcesContent": ["import React, { useMemo } from 'react'\n\nimport type { BlockiesOptions } from './blockies.ts'\nimport { createIcon } from './blockies.ts'\n\n/**\n * @deprecated Use {@link BlockiesAccountProps} from `@xyo-network/xl1-blockies` instead.\n */\nexport interface BlockiesAccountProps extends Partial<BlockiesOptions> {}\n\n/**\n * @deprecated Use {@link BlockiesAccount} from `@xyo-network/xl1-blockies` instead.\n */\nexport const BlockiesAccount: React.FC<BlockiesAccountProps> = ({ ...options }) => {\n const img = useMemo(() => {\n if (options.seed !== undefined) {\n return createIcon(options).toDataURL()\n }\n }, [options])\n\n return <img src={img} />\n}\n", "/**\n * inspired by https://github.com/download13/blockies/blob/master/src/blockies.mjs\n */\n\n// The random number is a js implementation of the Xorshift PRNG\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst randomSeed: any[] = Array.from({ length: 4 }) // Xorshift: [x, y, z, w] 32 bit values\n\nfunction seedRandom(seed: string) {\n for (let i = 0; i < randomSeed.length; i++) {\n randomSeed[i] = 0\n }\n for (let i = 0; i < seed.length; i++) {\n randomSeed[i % 4] = ((randomSeed[i % 4] << 5) - randomSeed[i % 4]) + seed.codePointAt(i)!\n }\n}\n\nfunction rand() {\n // based on Java's String.hashCode(), expanded to 4 32bit values\n const t = randomSeed[0] ^ (randomSeed[0] << 11)\n\n randomSeed[0] = randomSeed[1]\n randomSeed[1] = randomSeed[2]\n randomSeed[2] = randomSeed[3]\n randomSeed[3] = (randomSeed[3] ^ (randomSeed[3] >> 19) ^ t ^ (t >> 8))\n\n return (randomSeed[3] >>> 0) / ((1 << 31) >>> 0)\n}\n\nfunction createColor() {\n // saturation is the whole color spectrum\n const h = Math.floor(rand() * 360)\n // saturation goes from 40 to 100, it avoids greyish colors\n const s = ((rand() * 60) + 40) + '%'\n // lightness can be anything from 0 to 100, but probabilities are a bell curve around 50%\n const l = ((rand() + rand() + rand() + rand()) * 25) + '%'\n\n return 'hsl(' + h + ',' + s + ',' + l + ')'\n}\n\nfunction createImageData(size: number) {\n const width = size // Only support square icons for now\n const height = size\n\n const dataWidth = Math.ceil(width / 2)\n const mirrorWidth = width - dataWidth\n\n const data = []\n for (let y = 0; y < height; y++) {\n let row = []\n for (let x = 0; x < dataWidth; x++) {\n // this makes foreground and background color to have a 43% (1/2.3) probability\n // spot color has 13% chance\n row[x] = Math.floor(rand() * 2.3)\n }\n const r = row.slice(0, mirrorWidth)\n r.reverse()\n row = [...row, ...r]\n\n for (const element of row) {\n data.push(element)\n }\n }\n\n return data\n}\n\n/**\n * @deprecated Use {@link BlockiesOptions} from `@xyo-network/xl1-blockies` instead.\n */\nexport interface BlockiesOptions {\n bgcolor: string\n color: string\n scale: number\n seed: string\n size: number\n spotcolor: string\n}\n\n/**\n * @deprecated Use {@link buildOpts} from `@xyo-network/xl1-blockies` instead.\n */\nexport function buildOpts(opts: Partial<BlockiesOptions>): BlockiesOptions {\n const newOpts = {} as BlockiesOptions\n\n newOpts.seed = opts.seed ?? Math.floor((Math.random() * Math.pow(10, 16))).toString(16)\n\n seedRandom(newOpts.seed)\n\n newOpts.size = opts.size ?? 8\n newOpts.scale = opts.scale ?? 4\n newOpts.color = opts.color ?? createColor()\n newOpts.bgcolor = opts.bgcolor ?? createColor()\n newOpts.spotcolor = opts.spotcolor ?? createColor()\n\n return newOpts\n}\n\n/**\n * @deprecated Use {@link renderIcon} from `@xyo-network/xl1-blockies` instead.\n */\nexport function renderIcon(opts: Partial<BlockiesOptions>, canvas: HTMLCanvasElement) {\n const updatedOptions = buildOpts(opts ?? {})\n const imageData = createImageData(updatedOptions.size)\n const width = Math.sqrt(imageData.length)\n\n canvas.width = canvas.height = updatedOptions.size * updatedOptions.scale\n\n const cc = canvas.getContext('2d')\n if (cc === null) throw new Error('unable to get 2d context')\n cc.fillStyle = updatedOptions.bgcolor\n cc.fillRect(0, 0, canvas.width, canvas.height)\n cc.fillStyle = updatedOptions.color\n\n for (const [i, imageDatum] of imageData.entries()) {\n // if data is 0, leave the background\n if (imageDatum > 0) {\n const row = Math.floor(i / width)\n const col = i % width\n\n // if data is 2, choose spot color, if 1 choose foreground\n cc.fillStyle = (imageDatum == 1) ? updatedOptions.color : updatedOptions.spotcolor\n\n cc.fillRect(col * updatedOptions.scale, row * updatedOptions.scale, updatedOptions.scale, updatedOptions.scale)\n }\n }\n\n return canvas\n}\n\n/**\n * @deprecated Use {@link createIcon} from `@xyo-network/xl1-blockies` instead.\n */\nexport function createIcon(opts: Partial<BlockiesOptions>) {\n const canvas = document.createElement('canvas')\n\n renderIcon(opts, canvas)\n\n return canvas\n}\n", "import { Circle } from '@mui/icons-material'\nimport type { AvatarProps, BadgeProps } from '@mui/material'\nimport {\n Avatar, Badge, useTheme,\n} from '@mui/material'\nimport { grey } from '@mui/material/colors'\nimport { alphaCss } from '@xylabs/react-theme'\nimport React, { useMemo } from 'react'\n\nimport type { BlockiesOptions } from './blockies.ts'\nimport { createIcon } from './blockies.ts'\n\n/**\n * @deprecated Use {@link BlockiesAvatarProps} from `@xyo-network/xl1-blockies` instead.\n */\nexport interface BlockiesAvatarProps extends AvatarProps {\n blockiesOptions?: Partial<BlockiesOptions>\n}\n\n/**\n * @deprecated Use {@link BlockiesAvatar} from `@xyo-network/xl1-blockies` instead.\n */\nexport const BlockiesAvatar: React.FC<BlockiesAvatarProps> = ({ blockiesOptions, ...props }) => {\n const img = useMemo(() => {\n if (blockiesOptions?.seed !== undefined) {\n return createIcon(blockiesOptions).toDataURL()\n }\n }, [blockiesOptions])\n\n return (\n <Avatar component=\"span\" src={img} {...props} />\n )\n}\n\n/**\n * @deprecated Use {@link BlockiesAvatarAddressProps} from `@xyo-network/xl1-blockies` instead.\n */\nexport interface BlockiesAvatarAddressProps extends AvatarProps {\n /** The Address to display */\n address?: string\n /** Size of the border is the size prop * borderSizeFactor and rounded up */\n borderSizeFactor?: number\n /** The size of the avatar in pixels, defaults to 24 */\n size?: number\n}\n\n/**\n * @deprecated Use {@link BlockiesAvatarAddress} from `@xyo-network/xl1-blockies` instead.\n */\nexport const BlockiesAvatarAddress: React.FC<BlockiesAvatarAddressProps> = ({\n address, borderSizeFactor = 0.0833, size = 24, sx, ...props\n}) => {\n const theme = useTheme()\n const options = useMemo(() => {\n if (address !== undefined) {\n return { seed: address }\n }\n }, [address])\n\n return (\n <BlockiesAvatar\n blockiesOptions={options}\n sx={{\n width: size,\n height: size,\n border: `${Math.ceil(size * borderSizeFactor)}px solid ${alphaCss(theme.vars?.palette.text.primary ?? grey[500], 0.8)}`,\n ...sx,\n }}\n {...props}\n />\n )\n}\n\n/**\n * @deprecated Use {@link BlockiesAvatarAddressApprovedProps} from `@xyo-network/xl1-blockies` instead.\n */\nexport interface BlockiesAvatarAddressApprovedProps extends BlockiesAvatarAddressProps {\n /** Whether to show the approved badge */\n approved?: boolean\n badgeVariant?: BadgeProps['variant']\n}\n\n/**\n * @deprecated Use {@link BlockiesAvatarAddressApproved} from `@xyo-network/xl1-blockies` instead.\n */\nexport const BlockiesAvatarAddressApproved: React.FC<BlockiesAvatarAddressApprovedProps> = ({\n approved, badgeVariant, ...props\n}) => {\n const sx = badgeVariant === 'dot'\n ? {}\n : {\n bgcolor: 'white', borderRadius: 12, fontSize: '0.83333rem',\n }\n const dotPlacement = badgeVariant === 'dot' ? 3 : 5\n return (\n <Badge\n color={badgeVariant === 'dot' ? 'success' : 'default'}\n variant={badgeVariant}\n invisible={!approved}\n badgeContent={approved ? <Circle color=\"success\" sx={sx} /> : ''}\n sx={{\n '& .MuiBadge-badge': {\n top: dotPlacement,\n right: dotPlacement,\n },\n }}\n >\n <BlockiesAvatarAddress {...props} />\n </Badge>\n )\n}\n"],
5
+ "mappings": ";AAAA,SAAgB,eAAe;;;ACM/B,IAAM,aAAoB,MAAM,KAAK,EAAE,QAAQ,EAAE,CAAC;AAElD,SAAS,WAAW,MAAc;AAChC,WAAS,IAAI,GA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AAM,MAAM,QAAQ,KAAK,WAAW,KAAK,GAAG,GAAG,GAAG,CAAC;AAAA,QACrH,GAAG;AAAA,MACL;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AAcO,IAAM,gCAA8E,CAAC;AAAA,EAC1F;AAAA,EAAU;AAAA,EAAc,GAAG;AAC7B,MAAM;AACJ,QAAM,KAAK,iBAAiB,QACxB,CAAC,IACD;AAAA,IACE,SAAS;AAAA,IAAS,cAAc;AAAA,IAAI,UAAU;AAAA,EAChD;AACJ,QAAM,eAAe,iBAAiB,QAAQ,IAAI;AAClD,SACE,gBAAAA;AAAA,IAAC;AAAA;AAAA,MACC,OAAO,iBAAiB,QAAQ,YAAY;AAAA,MAC5C,SAAS;AAAA,MACT,WAAW,CAAC;AAAA,MACZ,cAAc,WAAW,gBAAAA,KAAC,UAAO,OAAM,WAAU,IAAQ,IAAK;AAAA,MAC9D,IAAI;AAAA,QACF,qBAAqB;AAAA,UACnB,KAAK;AAAA,UACL,OAAO;AAAA,QACT;AAAA,MACF;AAAA,MAEA,0BAAAA,KAAC,yBAAuB,GAAG,OAAO;AAAA;AAAA,EACpC;AAEJ;",
6
+ "names": ["useMemo", "jsx", "useMemo"]
7
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "http://json.schemastore.org/package.json",
3
3
  "name": "@xyo-network/react-chain-blockies",
4
- "version": "1.23.0",
4
+ "version": "1.23.2",
5
5
  "description": "XYO Layer One React SDK Blockies",
6
6
  "homepage": "https://xylabs.com",
7
7
  "bugs": {
@@ -39,19 +39,19 @@
39
39
  "README.md"
40
40
  ],
41
41
  "devDependencies": {
42
- "@mui/icons-material": "~9.0",
43
- "@mui/material": "~9.0",
42
+ "@mui/icons-material": "~9.0.1",
43
+ "@mui/material": "~9.0.1",
44
44
  "@opentelemetry/api": "^1.9.1",
45
45
  "@opentelemetry/sdk-trace-base": "^2.7.1",
46
46
  "@react-spring/web": "~10.0.3",
47
- "@storybook/react-vite": "^10.3.6",
47
+ "@storybook/react-vite": "^10.4.0",
48
48
  "@types/react": "^19.2.14",
49
- "@xylabs/react-theme": "~8.0",
49
+ "@xylabs/react-theme": "~8.0.2",
50
50
  "@xylabs/sdk-js": "^5.1.2",
51
- "@xylabs/toolchain": "~7.13.24",
52
- "@xylabs/tsconfig": "~7.13.24",
53
- "@xylabs/tsconfig-dom": "~7.13.24",
54
- "@xylabs/tsconfig-react": "~7.13.24",
51
+ "@xylabs/toolchain": "~8.0.4",
52
+ "@xylabs/tsconfig": "~8.0.4",
53
+ "@xylabs/tsconfig-dom": "~8.0.4",
54
+ "@xylabs/tsconfig-react": "~8.0.3",
55
55
  "async-mutex": "^0.5.0",
56
56
  "bn.js": "^5.2.3",
57
57
  "buffer": "^6.0.3",
@@ -62,11 +62,11 @@
62
62
  "react": "^19.2.6",
63
63
  "react-dom": "^19.2.6",
64
64
  "react-is": "^19.2.6",
65
- "react-router-dom": "^7.15.0",
65
+ "react-router-dom": "^7.15.1",
66
66
  "recharts": "~3.8.1",
67
- "storybook": "^10.3.6",
68
- "typescript": "~5.9.3",
69
- "vite": "^8.0.12",
67
+ "storybook": "^10.4.0",
68
+ "typescript": "~6.0.3",
69
+ "vite": "^8.0.13",
70
70
  "zod": "~4.4.3"
71
71
  },
72
72
  "peerDependencies": {