guideai-app 0.4.3 → 0.5.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 (73) hide show
  1. package/README.md +86 -5
  2. package/dist/GuideAI.d.ts +1 -1
  3. package/dist/GuideAI.js +1 -1
  4. package/dist/GuideAI.js.map +1 -1
  5. package/dist/components/AnimatedSettingsItem.d.ts +9 -0
  6. package/dist/components/Microphone.d.ts +19 -0
  7. package/dist/components/MuteButton.d.ts +11 -0
  8. package/dist/components/ResetButton.d.ts +9 -0
  9. package/dist/components/SettingsMenu.d.ts +16 -0
  10. package/dist/components/SettingsToggle.d.ts +7 -0
  11. package/dist/components/TranscriptBox.d.ts +19 -12
  12. package/dist/components/TranscriptMessages.d.ts +8 -0
  13. package/dist/components/TranscriptTextInput.d.ts +11 -0
  14. package/dist/components/TranscriptToggle.d.ts +7 -0
  15. package/dist/hooks/index.d.ts +3 -0
  16. package/dist/hooks/useGuideAIAPI.d.ts +22 -0
  17. package/dist/hooks/useTranscriptState.d.ts +21 -0
  18. package/dist/hooks/useWebRTC.d.ts +63 -0
  19. package/dist/index.d.ts +2 -1
  20. package/dist/styles/GuideAI.styles.d.ts +7 -1
  21. package/dist/types/GuideAI.types.d.ts +19 -21
  22. package/dist/utils/api.d.ts +17 -18
  23. package/dist/utils/constants.d.ts +20 -5
  24. package/dist/utils/conversationManager.d.ts +89 -0
  25. package/dist/utils/dataChannel.d.ts +85 -0
  26. package/dist/utils/elementInteractions.d.ts +38 -2
  27. package/dist/utils/highlightThenClick.d.ts +2 -1
  28. package/dist/utils/hover.d.ts +2 -0
  29. package/dist/utils/hoverThenClick.d.ts +2 -1
  30. package/dist/utils/isChromeExtension.d.ts +5 -0
  31. package/dist/utils/localStorageHelper.d.ts +57 -0
  32. package/dist/utils/logger.d.ts +50 -9
  33. package/dist/utils/messageStorage.d.ts +16 -3
  34. package/dist/utils/positionUtils.d.ts +39 -0
  35. package/dist/utils/webrtcConnection.d.ts +56 -0
  36. package/dist/visualContext/VisualContextScheduler.d.ts +11 -14
  37. package/dist/visualContext/domChangeTracker.d.ts +16 -0
  38. package/dist/visualContext/index.d.ts +8 -1
  39. package/dist/visualContext/types.d.ts +4 -0
  40. package/dist/visualContext/useVisualContext.d.ts +32 -0
  41. package/package.json +12 -6
  42. package/.workflow-test +0 -1
  43. package/API_DATA_CONTRACTS.md +0 -516
  44. package/API_SESSIONID_TESTING.md +0 -215
  45. package/GuideAI.d.ts +0 -19
  46. package/GuideAI.js +0 -1
  47. package/GuideAI.js.LICENSE.txt +0 -16
  48. package/GuideAI.js.map +0 -1
  49. package/PII_HASHING_EPIC.md +0 -886
  50. package/PII_HASHING_STORIES_SUMMARY.md +0 -275
  51. package/PRODUCTION_RELEASE.md +0 -126
  52. package/SESSION_ID_VERIFICATION.md +0 -122
  53. package/VISIT_COUNT_TESTING.md +0 -453
  54. package/dist/metric/event-listner.d.ts +0 -143
  55. package/dist/metric/index.d.ts +0 -2
  56. package/dist/metric/metadata-tracker.d.ts +0 -50
  57. package/dist/types/metadata.types.d.ts +0 -48
  58. package/dist/utils/gemini.d.ts +0 -5
  59. package/dist/utils/highlightAndClick.d.ts +0 -3
  60. package/dist/utils/hoverAndClick.d.ts +0 -4
  61. package/index.d.ts +0 -7
  62. package/jest.config.js +0 -26
  63. package/jest.setup.js +0 -21
  64. package/metadata-tracking-example.md +0 -324
  65. package/obfuscate.js +0 -40
  66. package/obfuscator.prod.json +0 -24
  67. package/rollup.config.js +0 -34
  68. package/structure.md +0 -128
  69. package/text-input-usage.md +0 -321
  70. package/transcript-toggle-usage.md +0 -267
  71. package/visit-tracking-usage.md +0 -134
  72. package/webpack.config.js +0 -55
  73. package/workflow-trigger-usage.md +0 -398
package/README.md CHANGED
@@ -25,7 +25,6 @@ function App() {
25
25
  React={React}
26
26
  ReactDOM={ReactDOM}
27
27
  position={{ bottom: '20px', right: '20px' }}
28
- onError={(error) => console.error(error)}
29
28
  />
30
29
  </div>
31
30
  );
@@ -40,14 +39,14 @@ function App() {
40
39
  | `React` | `React` | Yes | React instance from your application |
41
40
  | `ReactDOM` | `ReactDOM` | Yes | ReactDOM instance from your application |
42
41
  | `position` | `object` | No | CSS positioning for the component (see below) |
43
- | `onError` | `function` | No | Error handler callback: `(error: string \| Error) => void` |
44
42
 
45
43
  ## Position Object
46
44
 
47
- The `position` prop accepts an object with CSS positioning properties to control where the Guide AI button appears on your page:
45
+ 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
46
 
49
47
  ```typescript
50
48
  position?: {
49
+ // CSS positioning (applies to microphone button)
51
50
  top?: string;
52
51
  right?: string;
53
52
  bottom?: string;
@@ -57,6 +56,11 @@ position?: {
57
56
  marginBottom?: string;
58
57
  marginLeft?: string;
59
58
  transform?: string;
59
+
60
+ // Z-index configuration (applies to all GuideAI components)
61
+ // All component z-indexes are calculated from this base value
62
+ zIndex?: number; // Base z-index for all components (default: 1300)
63
+ // Onboarding modal will be set to zIndex + 1
60
64
  }
61
65
  ```
62
66
 
@@ -98,7 +102,7 @@ position?: {
98
102
 
99
103
  **Top-right corner:**
100
104
  ```jsx
101
- <GuideAI
105
+ <GuideAI
102
106
  organizationKey="your-org-key"
103
107
  React={React}
104
108
  ReactDOM={ReactDOM}
@@ -106,6 +110,84 @@ position?: {
106
110
  />
107
111
  ```
108
112
 
113
+ ## Customizing Colors
114
+
115
+ 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.
116
+
117
+ ### Available CSS Variable
118
+
119
+ | Variable | Default | Description |
120
+ |----------|---------|-------------|
121
+ | `--guideai-mic-color` | `#0000FF` | Microphone icon color |
122
+
123
+ ### Customization Example
124
+
125
+ Add this style to your application's CSS file to override the default color:
126
+
127
+ ```css
128
+ /* Match your brand color */
129
+ .guideai-icon-wrapper {
130
+ --guideai-mic-color: #6366f1; /* Your primary brand color */
131
+ }
132
+ ```
133
+
134
+ ### Brand Matching Examples
135
+
136
+ **Purple/Indigo Theme:**
137
+ ```css
138
+ .guideai-icon-wrapper {
139
+ --guideai-mic-color: #8b5cf6;
140
+ }
141
+ ```
142
+
143
+ **Green/Eco Theme:**
144
+ ```css
145
+ .guideai-icon-wrapper {
146
+ --guideai-mic-color: #059669;
147
+ }
148
+ ```
149
+
150
+ **Dark/Monochrome Theme:**
151
+ ```css
152
+ .guideai-icon-wrapper {
153
+ --guideai-mic-color: #ffffff;
154
+ }
155
+ ```
156
+
157
+ ### Z-Index Configuration
158
+
159
+ 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).
160
+
161
+ **Custom z-index value:**
162
+ ```jsx
163
+ <GuideAI
164
+ organizationKey="your-org-key"
165
+ React={React}
166
+ ReactDOM={ReactDOM}
167
+ position={{
168
+ bottom: '20px',
169
+ right: '20px',
170
+ zIndex: 5000 // All components use 5000, onboarding modal uses 5001
171
+ }}
172
+ />
173
+ ```
174
+
175
+ **Positioning with z-index configuration:**
176
+ ```jsx
177
+ <GuideAI
178
+ organizationKey="your-org-key"
179
+ React={React}
180
+ ReactDOM={ReactDOM}
181
+ position={{
182
+ bottom: '40px',
183
+ right: '40px',
184
+ zIndex: 2000 // Set base z-index to 2000
185
+ }}
186
+ />
187
+ ```
188
+
189
+ > **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.
190
+
109
191
  ## Complete Example
110
192
 
111
193
  ```jsx
@@ -128,7 +210,6 @@ function App() {
128
210
  React={React}
129
211
  ReactDOM={ReactDOM}
130
212
  position={{ bottom: '40px', right: '40px' }}
131
- onError={handleError}
132
213
  />
133
214
  </div>
134
215
  );
package/dist/GuideAI.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  import { GuideAIProps } from './types/GuideAI.types';
2
- declare const GuideAI: (props: GuideAIProps) => import("react").JSX.Element | null;
2
+ declare const GuideAI: (props: GuideAIProps) => import("react").JSX.Element;
3
3
  export default GuideAI;