@mtchat/vue-primevue 0.4.6 → 0.4.8

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 (2) hide show
  1. package/README.md +101 -0
  2. package/package.json +2 -2
package/README.md ADDED
@@ -0,0 +1,101 @@
1
+ # @mtchat/vue-primevue
2
+
3
+ PrimeVue integration layer for MTChat.
4
+
5
+ Use `@mtchat/vue-primevue` when your application already uses PrimeVue 4.x and you want MTChat to reuse PrimeVue primitives and theme tokens instead of the default SDK UI primitives.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install @mtchat/vue @mtchat/vue-primevue primevue
11
+ ```
12
+
13
+ Peer dependencies:
14
+
15
+ - `vue` `^3.4.0`
16
+ - `primevue` `^4.0.0`
17
+ - `@mtchat/vue` `^0.4.0`
18
+
19
+ ## Quick Start
20
+
21
+ ```vue
22
+ <script setup lang="ts">
23
+ import { MTChatPrime, type MTChatConfig } from '@mtchat/vue-primevue'
24
+
25
+ const config: MTChatConfig = {
26
+ baseUrl: 'https://chat.example.com',
27
+ userId: currentUser.id,
28
+ scopeConfig: {
29
+ scopeLevel0: [currentUser.tenantId],
30
+ scopeLevel1: currentUser.departments,
31
+ scopeLevel2: currentUser.permissions,
32
+ },
33
+ userProfile: {
34
+ displayName: currentUser.name,
35
+ company: currentUser.company,
36
+ },
37
+ locale: 'en',
38
+ }
39
+ </script>
40
+
41
+ <template>
42
+ <div style="height: 600px;">
43
+ <MTChatPrime :config="config" theme="light" />
44
+ </div>
45
+ </template>
46
+ ```
47
+
48
+ `MTChatPrime` uses the same config, props, events, composables, and SDK classes as `@mtchat/vue`.
49
+
50
+ ## What This Package Adds
51
+
52
+ - `MTChatPrime` - preconfigured component with PrimeVue-backed registry
53
+ - `primevueRegistry` - registry for manual setup with base `MTChat`
54
+ - PrimeVue adapter primitives such as `PrimeButton`, `PrimeDialog`, `PrimeInput`
55
+ - re-exports of types, composables, and SDK classes from `@mtchat/vue`
56
+
57
+ ## Manual Registry Setup
58
+
59
+ If you want to keep using the base `MTChat` component, provide the PrimeVue registry manually:
60
+
61
+ ```vue
62
+ <script setup lang="ts">
63
+ import { MTChat, provideRegistry } from '@mtchat/vue'
64
+ import { primevueRegistry } from '@mtchat/vue-primevue'
65
+ import '@mtchat/vue-primevue/theme/aura.css'
66
+
67
+ provideRegistry(primevueRegistry)
68
+ </script>
69
+
70
+ <template>
71
+ <div style="height: 600px;">
72
+ <MTChat :config="config" />
73
+ </div>
74
+ </template>
75
+ ```
76
+
77
+ Use the manual setup path when you want to mix PrimeVue primitives with custom ones.
78
+
79
+ ## Theme Notes
80
+
81
+ - `MTChatPrime` already imports the bundled PrimeVue token mapping theme.
82
+ - For manual registry usage, import `@mtchat/vue-primevue/theme/aura.css`.
83
+ - You can override MTChat variables on `.mtchat-prime` and PrimeVue tokens through your normal PrimeVue theme setup.
84
+
85
+ ## Documentation
86
+
87
+ - Installation: [`../docs/sdk/installation.md`](../docs/sdk/installation.md)
88
+ - PrimeVue guide: [`../docs/sdk/primevue.md`](../docs/sdk/primevue.md)
89
+ - Base SDK config: [`../docs/sdk/configuration.md`](../docs/sdk/configuration.md)
90
+
91
+ ## Publishing Checklist
92
+
93
+ Before publishing:
94
+
95
+ - `npm run typecheck`
96
+ - `npm run build`
97
+ - `npm pack --dry-run`
98
+
99
+ ## License
100
+
101
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mtchat/vue-primevue",
3
- "version": "0.4.6",
3
+ "version": "0.4.8",
4
4
  "description": "MTChat Vue.js SDK - PrimeVue UI integration",
5
5
  "type": "module",
6
6
  "main": "./dist/mtchat-vue-primevue.umd.cjs",
@@ -40,7 +40,7 @@
40
40
  },
41
41
  "repository": {
42
42
  "type": "git",
43
- "url": "https://github.com/example/mtchat-vue"
43
+ "url": "https://github.com/pohodnya/mtchat"
44
44
  },
45
45
  "keywords": [
46
46
  "chat",