app-tutor-ai-consumer 1.1.0 → 1.3.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.
Files changed (65) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/config/vitest/__mocks__/sparkie.tsx +12 -0
  3. package/config/vitest/vitest.config.mts +1 -0
  4. package/environments/.env.test +2 -2
  5. package/package.json +3 -1
  6. package/public/assets/svg/tutor-onboarding.svg +128 -0
  7. package/src/@types/declarations.d.ts +4 -3
  8. package/src/config/optimizely/index.ts +1 -0
  9. package/src/config/optimizely/optimizely-provider.tsx +31 -0
  10. package/src/config/optimizely/optimizely.ts +9 -0
  11. package/src/config/styles/global.css +1 -0
  12. package/src/config/styles/utilities/bg-utilities.module.css +11 -0
  13. package/src/config/styles/utilities/text-utilities.module.css +6 -0
  14. package/src/config/tests/handlers.ts +3 -0
  15. package/src/lib/components/button/button.tsx +86 -0
  16. package/src/lib/components/button/index.ts +1 -0
  17. package/src/lib/components/index.ts +1 -0
  18. package/src/lib/hooks/index.ts +1 -0
  19. package/src/lib/hooks/use-ref-event-listener/index.ts +2 -0
  20. package/src/lib/hooks/use-ref-event-listener/use-ref-event-listener.tsx +32 -0
  21. package/src/lib/utils/constants.ts +2 -0
  22. package/src/main/main.spec.tsx +17 -7
  23. package/src/main/main.tsx +7 -23
  24. package/src/modules/global-providers/global-providers.tsx +16 -6
  25. package/src/modules/messages/components/chat-input/chat-input.atom.ts +12 -0
  26. package/src/modules/{create-message → messages}/components/chat-input/chat-input.tsx +6 -2
  27. package/src/modules/{create-message → messages}/components/chat-input/index.ts +1 -0
  28. package/src/modules/{create-message → messages}/components/chat-input/types.ts +1 -0
  29. package/src/modules/messages/components/index.ts +2 -0
  30. package/src/modules/messages/components/messages-list/index.ts +2 -0
  31. package/src/modules/messages/components/messages-list/messages-list.tsx +24 -0
  32. package/src/modules/messages/constants.ts +1 -0
  33. package/src/modules/messages/index.ts +3 -0
  34. package/src/modules/messages/service.ts +63 -0
  35. package/src/modules/messages/types.ts +47 -0
  36. package/src/modules/sparkie/constants.ts +21 -0
  37. package/src/modules/sparkie/index.ts +3 -0
  38. package/src/modules/sparkie/service.ts +94 -0
  39. package/src/modules/sparkie/types.ts +47 -0
  40. package/src/modules/sparkie/utils/validate-firebase-config.spec.ts +17 -0
  41. package/src/modules/sparkie/utils/validate-firebase-config.ts +12 -0
  42. package/src/modules/widget/__tests__/widget-settings-props.builder.ts +121 -0
  43. package/src/modules/widget/components/chat-page/chat-page.tsx +20 -0
  44. package/src/modules/widget/components/chat-page/index.ts +2 -0
  45. package/src/modules/widget/components/constants.tsx +9 -0
  46. package/src/modules/widget/components/container/container.tsx +32 -0
  47. package/src/modules/widget/components/container/index.ts +2 -0
  48. package/src/{main → modules/widget/components/container}/styles.module.css +1 -5
  49. package/src/modules/widget/components/container/types.ts +3 -0
  50. package/src/modules/widget/components/greetings-card/greetings-card.tsx +1 -1
  51. package/src/modules/widget/components/greetings-card/styles.module.css +1 -3
  52. package/src/modules/widget/components/index.ts +3 -0
  53. package/src/modules/widget/components/onboarding-page/index.ts +1 -0
  54. package/src/modules/widget/components/onboarding-page/onboarding-page.tsx +38 -0
  55. package/src/modules/widget/components/onboarding-page/styles.module.css +7 -0
  56. package/src/modules/widget/components/starter-page/index.ts +1 -0
  57. package/src/modules/widget/components/starter-page/starter-page.tsx +41 -0
  58. package/src/modules/widget/hooks/index.ts +1 -0
  59. package/src/modules/widget/hooks/use-init-sparkie/index.ts +1 -0
  60. package/src/modules/widget/hooks/use-init-sparkie/use-init-sparkie.tsx +18 -0
  61. package/src/modules/widget/store/index.ts +1 -0
  62. package/src/modules/widget/store/widget-tabs.atom.ts +53 -0
  63. package/tailwind.config.js +95 -1
  64. package/config/vitest/index.ts +0 -1
  65. package/src/modules/create-message/components/index.ts +0 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,20 @@
1
+ # [1.3.0](https://github.com/Hotmart-Org/app-tutor-ai-consumer/compare/v1.2.0...v1.3.0) (2025-06-24)
2
+
3
+ ### Bug Fixes
4
+
5
+ - pr issues ([21c2773](https://github.com/Hotmart-Org/app-tutor-ai-consumer/commit/21c2773cdf54babfec739d8684e86b2e3e220765))
6
+
7
+ ### Features
8
+
9
+ - add first UI components ([9e2a612](https://github.com/Hotmart-Org/app-tutor-ai-consumer/commit/9e2a6122686004446edf9b2e65cc15bc7a931fc3))
10
+ - enhance initial components ([eca9290](https://github.com/Hotmart-Org/app-tutor-ai-consumer/commit/eca92903035036e27cb7fd405d9d0662971e7016))
11
+
12
+ # [1.2.0](https://github.com/Hotmart-Org/app-tutor-ai-consumer/compare/v1.1.0...v1.2.0) (2025-06-20)
13
+
14
+ ### Features
15
+
16
+ - add Optimizely Config ([ad2162f](https://github.com/Hotmart-Org/app-tutor-ai-consumer/commit/ad2162f6e92b606cb72078d75a972067a8988e6f))
17
+
1
18
  # [1.1.0](https://github.com/Hotmart-Org/app-tutor-ai-consumer/compare/v1.0.1...v1.1.0) (2025-06-18)
2
19
 
3
20
  ### Bug Fixes
@@ -0,0 +1,12 @@
1
+ vi.mock('@hotmart/sparkie', () => {
2
+ const Sparkie = vi.fn()
3
+
4
+ Sparkie.prototype.destroy = vi.fn()
5
+ Sparkie.prototype.init = vi.fn()
6
+ Sparkie.prototype.off = vi.fn()
7
+ Sparkie.prototype.on = vi.fn()
8
+ Sparkie.prototype.listener = { trackTyping: vi.fn() }
9
+ Sparkie.prototype.setAPIToken = vi.fn()
10
+
11
+ return { default: Sparkie }
12
+ })
@@ -11,6 +11,7 @@ export default defineConfig({
11
11
  setupFiles: [
12
12
  './config/vitest/setupTests.ts',
13
13
  './config/vitest/__mocks__/i18n.tsx',
14
+ './config/vitest/__mocks__/sparkie.tsx',
14
15
  './config/vitest/polyfills/global.js',
15
16
  ],
16
17
  coverage: {
@@ -28,8 +28,8 @@ FIREBASE_PROJECT_ID=omnichat-cad8c
28
28
  FIREBASE_STORAGE_BUCKET=omnichat-cad8c.appspot.com
29
29
 
30
30
  # C3PO
31
- API_CONVERSATION_URL=
32
- API_AUTH_URL=
31
+ API_CONVERSATION_URL=https://c3po-api-conversations.buildstaging.com
32
+ API_AUTH_URL=https://c3po-api-auth.buildstaging.com/v1
33
33
 
34
34
  # VLC
35
35
  USER_VLC=
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "app-tutor-ai-consumer",
3
- "version": "1.1.0",
3
+ "version": "1.3.0",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "dev": "rspack serve --env=development --config config/rspack/rspack.config.js",
@@ -101,6 +101,8 @@
101
101
  },
102
102
  "dependencies": {
103
103
  "@hot-observability-js/react": "~1.1.0",
104
+ "@hotmart/sparkie": "~5.1.0",
105
+ "@optimizely/react-sdk": "~3.2.4",
104
106
  "@tanstack/query-sync-storage-persister": "~5.80.7",
105
107
  "@tanstack/react-query": "~5.80.6",
106
108
  "@tanstack/react-query-persist-client": "~5.80.7",