@kahitsan/ksui 0.15.1 → 0.15.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kahitsan/ksui",
3
- "version": "0.15.1",
3
+ "version": "0.15.2",
4
4
  "description": "ksui is a standalone set of SolidJS UI components for KahitSan/Hilinga and any SolidJS app. Published to the public npm registry and consumed as a normal dependency. Ships source under a `solid` export condition so the consumer's vite-plugin-solid compiles it with only solid-js externalized; it depends on nothing but solid-js + lucide-solid and injects its own CSS.",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -20,11 +20,18 @@ const sizeMap: Record<string, number> = {
20
20
  * people; use AccountAvatar directly for financial accounts.
21
21
  */
22
22
  export default function Avatar(props: AvatarProps) {
23
+ // Getter-backed so name/image stay reactive: a parent rebinding them on a live
24
+ // Avatar (e.g. an in-session profile update) re-renders, rather than snapshotting
25
+ // the values once at component init.
23
26
  const account: AvatarAccount = {
24
27
  id: 0,
25
28
  type: "user",
26
- name: props.name,
27
- image: props.image,
29
+ get name() {
30
+ return props.name;
31
+ },
32
+ get image() {
33
+ return props.image;
34
+ },
28
35
  };
29
36
 
30
37
  return <AccountAvatar account={account} size={sizeMap[props.size ?? "md"]} class={props.class} />;