app-tutor-ai-consumer 1.42.0 → 1.43.0

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/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # [1.43.0](https://github.com/Hotmart-Org/app-tutor-ai-consumer/compare/v1.42.0...v1.43.0) (2025-12-02)
2
+
3
+ ### Features
4
+
5
+ - add tutor avatar ([f287d28](https://github.com/Hotmart-Org/app-tutor-ai-consumer/commit/f287d282f8693faeb36af7a097ef80ee6073464d))
6
+
1
7
  # [1.42.0](https://github.com/Hotmart-Org/app-tutor-ai-consumer/compare/v1.41.0...v1.42.0) (2025-12-02)
2
8
 
3
9
  ### Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "app-tutor-ai-consumer",
3
- "version": "1.42.0",
3
+ "version": "1.43.0",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "dev": "rspack serve --env=development --config config/rspack/rspack.config.js",
@@ -11,6 +11,24 @@ function AIAvatar({
11
11
  }: AIAvatarProps) {
12
12
  const settings = useWidgetSettingsAtomValue()
13
13
  const isDarkTheme = settings?.config?.theme === 'dark'
14
+ const customAvatarImg = settings?.avatar
15
+
16
+ if (customAvatarImg) {
17
+ return (
18
+ <picture>
19
+ <source srcSet={customAvatarImg.webp} type='image/webp' />
20
+ <img
21
+ src={customAvatarImg.original}
22
+ alt='Avatar'
23
+ className={clsx('rounded-full object-cover', {
24
+ 'h-9 w-9': size === 'sm',
25
+ 'h-14 w-14': size === 'lg'
26
+ })}
27
+ />
28
+ </picture>
29
+ )
30
+ }
31
+
14
32
  return (
15
33
  <figure
16
34
  className={clsx(
package/src/types.ts CHANGED
@@ -46,6 +46,10 @@ export type WidgetSettingProps = {
46
46
  membershipSlug?: string
47
47
  userId?: string
48
48
  tutorName?: string
49
+ avatar?: {
50
+ original: string
51
+ webp: string
52
+ }
49
53
  user?: User
50
54
  classHashId?: string
51
55
  owner_id?: string