guideai-app 0.4.3-2 → 0.4.3-4
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/README.md +86 -2
- package/dist/GuideAI.d.ts +1 -1
- package/dist/GuideAI.js +1 -1
- package/dist/GuideAI.js.map +1 -1
- package/dist/components/Microphone.d.ts +3 -1
- package/dist/components/MuteButton.d.ts +15 -0
- package/dist/components/ResetButton.d.ts +13 -0
- package/dist/components/TranscriptBox.d.ts +14 -8
- package/dist/components/TranscriptMessages.d.ts +2 -2
- package/dist/components/TranscriptTextInput.d.ts +5 -4
- package/dist/components/TranscriptToggle.d.ts +3 -3
- package/dist/styles/GuideAI.styles.d.ts +7 -1
- package/dist/types/GuideAI.types.d.ts +4 -8
- package/dist/utils/api.d.ts +1 -7
- package/dist/utils/constants.d.ts +0 -2
- package/dist/utils/elementInteractions.d.ts +32 -1
- package/dist/utils/hover.d.ts +2 -0
- package/dist/utils/logger.d.ts +1 -5
- package/dist/utils/messageStorage.d.ts +16 -1
- package/package.json +6 -5
package/README.md
CHANGED
|
@@ -44,10 +44,11 @@ function App() {
|
|
|
44
44
|
|
|
45
45
|
## Position Object
|
|
46
46
|
|
|
47
|
-
The `position` prop accepts an object with CSS positioning properties to control where the Guide AI button appears on your page:
|
|
47
|
+
The `position` prop accepts an object with CSS positioning properties to control where the Guide AI button appears on your page, as well as z-index configuration for all Guide AI components:
|
|
48
48
|
|
|
49
49
|
```typescript
|
|
50
50
|
position?: {
|
|
51
|
+
// CSS positioning (applies to microphone button)
|
|
51
52
|
top?: string;
|
|
52
53
|
right?: string;
|
|
53
54
|
bottom?: string;
|
|
@@ -57,6 +58,11 @@ position?: {
|
|
|
57
58
|
marginBottom?: string;
|
|
58
59
|
marginLeft?: string;
|
|
59
60
|
transform?: string;
|
|
61
|
+
|
|
62
|
+
// Z-index configuration (applies to all GuideAI components)
|
|
63
|
+
// All component z-indexes are calculated from this base value
|
|
64
|
+
zIndex?: number; // Base z-index for all components (default: 1300)
|
|
65
|
+
// Onboarding modal will be set to zIndex + 1
|
|
60
66
|
}
|
|
61
67
|
```
|
|
62
68
|
|
|
@@ -98,7 +104,7 @@ position?: {
|
|
|
98
104
|
|
|
99
105
|
**Top-right corner:**
|
|
100
106
|
```jsx
|
|
101
|
-
<GuideAI
|
|
107
|
+
<GuideAI
|
|
102
108
|
organizationKey="your-org-key"
|
|
103
109
|
React={React}
|
|
104
110
|
ReactDOM={ReactDOM}
|
|
@@ -106,6 +112,84 @@ position?: {
|
|
|
106
112
|
/>
|
|
107
113
|
```
|
|
108
114
|
|
|
115
|
+
## Customizing Colors
|
|
116
|
+
|
|
117
|
+
Guide AI allows you to customize the microphone button color to match your application's branding. You can override the default color using CSS variables in your own stylesheet.
|
|
118
|
+
|
|
119
|
+
### Available CSS Variable
|
|
120
|
+
|
|
121
|
+
| Variable | Default | Description |
|
|
122
|
+
|----------|---------|-------------|
|
|
123
|
+
| `--guideai-mic-color` | `#0000FF` | Microphone icon color |
|
|
124
|
+
|
|
125
|
+
### Customization Example
|
|
126
|
+
|
|
127
|
+
Add this style to your application's CSS file to override the default color:
|
|
128
|
+
|
|
129
|
+
```css
|
|
130
|
+
/* Match your brand color */
|
|
131
|
+
.guideai-icon-wrapper {
|
|
132
|
+
--guideai-mic-color: #6366f1; /* Your primary brand color */
|
|
133
|
+
}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Brand Matching Examples
|
|
137
|
+
|
|
138
|
+
**Purple/Indigo Theme:**
|
|
139
|
+
```css
|
|
140
|
+
.guideai-icon-wrapper {
|
|
141
|
+
--guideai-mic-color: #8b5cf6;
|
|
142
|
+
}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
**Green/Eco Theme:**
|
|
146
|
+
```css
|
|
147
|
+
.guideai-icon-wrapper {
|
|
148
|
+
--guideai-mic-color: #059669;
|
|
149
|
+
}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
**Dark/Monochrome Theme:**
|
|
153
|
+
```css
|
|
154
|
+
.guideai-icon-wrapper {
|
|
155
|
+
--guideai-mic-color: #ffffff;
|
|
156
|
+
}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### Z-Index Configuration
|
|
160
|
+
|
|
161
|
+
If Guide AI components conflict with modals or other overlays on your site, you can customize the z-index value for all components using a single `zIndex` parameter. All GuideAI components will use this base value, with the onboarding modal appearing one level above (zIndex + 1).
|
|
162
|
+
|
|
163
|
+
**Custom z-index value:**
|
|
164
|
+
```jsx
|
|
165
|
+
<GuideAI
|
|
166
|
+
organizationKey="your-org-key"
|
|
167
|
+
React={React}
|
|
168
|
+
ReactDOM={ReactDOM}
|
|
169
|
+
position={{
|
|
170
|
+
bottom: '20px',
|
|
171
|
+
right: '20px',
|
|
172
|
+
zIndex: 5000 // All components use 5000, onboarding modal uses 5001
|
|
173
|
+
}}
|
|
174
|
+
/>
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
**Positioning with z-index configuration:**
|
|
178
|
+
```jsx
|
|
179
|
+
<GuideAI
|
|
180
|
+
organizationKey="your-org-key"
|
|
181
|
+
React={React}
|
|
182
|
+
ReactDOM={ReactDOM}
|
|
183
|
+
position={{
|
|
184
|
+
bottom: '40px',
|
|
185
|
+
right: '40px',
|
|
186
|
+
zIndex: 2000 // Set base z-index to 2000
|
|
187
|
+
}}
|
|
188
|
+
/>
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
> **Note:** You only need to specify a z-index value if the default (1300) conflicts with your existing UI. The onboarding modal will automatically appear at zIndex + 1 to stay above other GuideAI components.
|
|
192
|
+
|
|
109
193
|
## Complete Example
|
|
110
194
|
|
|
111
195
|
```jsx
|
package/dist/GuideAI.d.ts
CHANGED