guideai-app 0.5.1 → 0.5.3-1
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 +179 -80
- package/dist/GuideAI.d.ts +1 -1
- package/dist/GuideAI.js +1 -1
- package/dist/GuideAI.js.LICENSE.txt +7 -0
- package/dist/GuideAI.js.map +1 -1
- package/dist/__mocks__/fileMock.d.ts +2 -0
- package/dist/components/AudioConfigDialog.d.ts +22 -0
- package/dist/components/MicGlyphs.d.ts +9 -0
- package/dist/components/Microphone.d.ts +4 -2
- package/dist/components/MuteButton.d.ts +3 -1
- package/dist/components/NoisyPresetSuggestBanner.d.ts +12 -0
- package/dist/components/PlaybackInterruptLockDebugOverlay.d.ts +19 -0
- package/dist/components/PlaybackLockDebugOverlayRoot.d.ts +14 -0
- package/dist/components/ResetGlyph.d.ts +5 -0
- package/dist/components/TranscriptBox.d.ts +62 -8
- package/dist/components/TranscriptMessages.d.ts +8 -1
- package/dist/components/TranscriptTextInput.d.ts +39 -2
- package/dist/components/TranscriptToolbar.d.ts +23 -0
- package/dist/components/TranscriptWorkflowDrawer.d.ts +39 -0
- package/dist/components/WelcomeBubble.d.ts +6 -1
- package/dist/components/WorkspaceStubIcon.d.ts +6 -0
- package/dist/devtools/visualContextInspector/BufferIndicator.d.ts +15 -0
- package/dist/devtools/visualContextInspector/ConfigSection.d.ts +18 -0
- package/dist/devtools/visualContextInspector/ScreenshotList.d.ts +13 -0
- package/dist/devtools/visualContextInspector/VisualContextInspector.d.ts +35 -0
- package/dist/devtools/visualContextInspector/fieldInfo.d.ts +7 -0
- package/dist/devtools/visualContextInspector/index.d.ts +13 -0
- package/dist/devtools/visualContextInspector/inspectorStore.d.ts +35 -0
- package/dist/devtools/visualContextInspector/inspectorStyles.d.ts +13 -0
- package/dist/devtools/visualContextInspector/types.d.ts +27 -0
- package/dist/hooks/index.d.ts +6 -0
- package/dist/hooks/useAudioConfigSurface.d.ts +20 -0
- package/dist/hooks/useConversationSession.d.ts +67 -0
- package/dist/hooks/useDocToFormDropFlow.d.ts +31 -0
- package/dist/hooks/useGuideAIAPI.d.ts +3 -6
- package/dist/hooks/useGuideAILayout.d.ts +38 -0
- package/dist/hooks/useGuideAILocalStorageSync.d.ts +17 -0
- package/dist/hooks/useHiddenRealtimeSteers.d.ts +22 -0
- package/dist/hooks/useMicMute.d.ts +20 -0
- package/dist/hooks/useMicPreset.d.ts +19 -0
- package/dist/hooks/useMicPromptHook.d.ts +28 -0
- package/dist/hooks/useNoisyPresetSuggest.d.ts +19 -0
- package/dist/hooks/usePlaybackLockDebugOverlay.d.ts +12 -0
- package/dist/hooks/useProtectedPlayback.d.ts +36 -0
- package/dist/hooks/useTranscriptChrome.d.ts +39 -0
- package/dist/hooks/useTranscriptState.d.ts +1 -1
- package/dist/hooks/useWebRTC.d.ts +41 -6
- package/dist/hooks/useWidgetWorkflowSession.d.ts +35 -0
- package/dist/hooks/useWorkspaceCatalog.d.ts +30 -0
- package/dist/index.d.ts +5 -1
- package/dist/lib/workspaceEmbedIcons.d.ts +57 -0
- package/dist/micPrompt.defaults.d.ts +25 -0
- package/dist/playwrightToolHarness.d.ts +8 -0
- package/dist/playwrightToolHarness.js +3 -0
- package/dist/playwrightToolHarness.js.LICENSE.txt +16 -0
- package/dist/playwrightToolHarness.js.map +1 -0
- package/dist/stubs/workspaces.d.ts +36 -0
- package/dist/styles/GuideAI.styles.d.ts +2 -6
- package/dist/styles/GuideAI.styles.types.d.ts +6 -0
- package/dist/styles/guideAIStylesCore.d.ts +2 -0
- package/dist/styles/guideAIStylesDialogs.d.ts +2 -0
- package/dist/styles/guideAIStylesMicPrompt.d.ts +2 -0
- package/dist/styles/guideAIStylesTranscript.d.ts +2 -0
- package/dist/types/GuideAI.types.d.ts +55 -2
- package/dist/types/audioConfig.types.d.ts +78 -0
- package/dist/utils/api.d.ts +61 -15
- package/dist/utils/confettiBurst.d.ts +6 -0
- package/dist/utils/constants.d.ts +7 -1
- package/dist/utils/conversationManager.d.ts +12 -2
- package/dist/utils/dataChannel.d.ts +45 -6
- package/dist/utils/dataChannelHelpers.d.ts +28 -0
- package/dist/utils/dataTransferHasFiles.d.ts +2 -0
- package/dist/utils/date.d.ts +11 -0
- package/dist/utils/embedConversationNamespace.d.ts +10 -0
- package/dist/utils/isMobileBrowser.d.ts +5 -0
- package/dist/utils/localStorageHelper.d.ts +78 -0
- package/dist/utils/logger.d.ts +17 -20
- package/dist/utils/messageStorage.d.ts +12 -11
- package/dist/utils/micPromptThrottle.d.ts +13 -0
- package/dist/utils/positionUtils.d.ts +8 -7
- package/dist/utils/reactHooks.d.ts +14 -0
- package/dist/utils/reducedMotion.d.ts +17 -0
- package/dist/utils/tools/back.d.ts +19 -0
- package/dist/utils/tools/clickElement.d.ts +32 -0
- package/dist/utils/tools/docToForm.d.ts +54 -0
- package/dist/utils/tools/docUploadPrompt.d.ts +11 -0
- package/dist/utils/tools/elementInteractions.d.ts +40 -0
- package/dist/utils/tools/fillField.d.ts +41 -0
- package/dist/utils/tools/fillForm.d.ts +49 -0
- package/dist/utils/tools/goToAElmLink.d.ts +27 -0
- package/dist/utils/tools/highlight.d.ts +23 -0
- package/dist/utils/tools/highlightThenClick.d.ts +31 -0
- package/dist/utils/tools/hover.d.ts +23 -0
- package/dist/utils/tools/hoverThenClick.d.ts +37 -0
- package/dist/utils/tools/markWorkflowComplete.d.ts +18 -0
- package/dist/utils/tools/navigateTo.d.ts +23 -0
- package/dist/utils/tools/refresh.d.ts +19 -0
- package/dist/utils/tools/scroll.d.ts +32 -0
- package/dist/utils/tools/toolRegistry.d.ts +53 -0
- package/dist/utils/tools/workflowToolBridge.d.ts +15 -0
- package/dist/utils/webrtcConnection.d.ts +9 -2
- package/dist/utils/widgetAuthStore.d.ts +9 -0
- package/dist/utils/widgetBearerStorage.d.ts +16 -0
- package/dist/utils/widgetSession.d.ts +20 -0
- package/dist/utils/widgetWorkspaces.d.ts +10 -0
- package/dist/utils/workflowSteer.d.ts +6 -0
- package/dist/utils/workspaceCatalog.d.ts +24 -0
- package/dist/visualContext/VisualContextScheduler.d.ts +48 -2
- package/dist/visualContext/domChangeTracker.d.ts +29 -0
- package/dist/visualContext/imageHash.d.ts +19 -0
- package/dist/visualContext/index.d.ts +3 -3
- package/dist/visualContext/types.d.ts +32 -2
- package/dist/visualContext/useVisualContext.d.ts +23 -8
- package/package.json +73 -69
- package/dist/components/AnimatedSettingsItem.d.ts +0 -9
- package/dist/components/ResetButton.d.ts +0 -9
- package/dist/components/SettingsMenu.d.ts +0 -16
- package/dist/components/SettingsToggle.d.ts +0 -7
- package/dist/components/TranscriptToggle.d.ts +0 -7
- package/dist/utils/elementInteractions.d.ts +0 -127
- package/dist/utils/goToAElmLink.d.ts +0 -1
- package/dist/utils/highlightThenClick.d.ts +0 -2
- package/dist/utils/hover.d.ts +0 -2
- package/dist/utils/hoverThenClick.d.ts +0 -2
- package/dist/utils/toolRegistry.d.ts +0 -33
- package/dist/utils/workflow.d.ts +0 -62
- package/dist/visualContext/debug-overlay.d.ts +0 -10
package/README.md
CHANGED
|
@@ -18,27 +18,35 @@ import ReactDOM from 'react-dom';
|
|
|
18
18
|
import GuideAI from 'guideai-app';
|
|
19
19
|
|
|
20
20
|
function App() {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
21
|
+
return (
|
|
22
|
+
<div>
|
|
23
|
+
<GuideAI
|
|
24
|
+
authKey="your-access-key"
|
|
25
|
+
workspace="your-workspace"
|
|
26
|
+
React={React}
|
|
27
|
+
ReactDOM={ReactDOM}
|
|
28
|
+
position={{ bottom: '20px', right: '20px' }}
|
|
29
|
+
/>
|
|
30
|
+
</div>
|
|
31
|
+
);
|
|
31
32
|
}
|
|
32
33
|
```
|
|
33
34
|
|
|
34
35
|
## Props
|
|
35
36
|
|
|
36
|
-
| Prop
|
|
37
|
-
|
|
38
|
-
| `
|
|
39
|
-
| `
|
|
40
|
-
| `
|
|
41
|
-
| `
|
|
37
|
+
| Prop | Type | Required | Description |
|
|
38
|
+
| --------------------------------- | ---------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
39
|
+
| `authKey` | `string` | Yes (customer embed) | Widget access key; **not** persisted by the package. Exchanged once for a JWT via `POST /widget/session`. **Do not use React’s reserved `key` attribute** — use this prop name. |
|
|
40
|
+
| `workspace` | `string` | No | Workspace slug when using `authKey` |
|
|
41
|
+
| `adminConversationPersistenceKey` | `string` | No | Optional stable key for transcript `localStorage` isolation. Omit to use a non-secret default from the page **origin** (same across SPA routes). Never use the raw access key here. |
|
|
42
|
+
| `React` | `React` | Yes | React instance from your application |
|
|
43
|
+
| `ReactDOM` | `ReactDOM` | Yes | ReactDOM instance from your application |
|
|
44
|
+
| `position` | `object` | No | CSS positioning for the component (see below) |
|
|
45
|
+
| `environment` | `string` | No | API environment: `'production'` (default), `'development'`, or `'local'` |
|
|
46
|
+
| `transcript` | `object` | No | Transcript panel configuration (see below) |
|
|
47
|
+
| `input` | `object` | No | Text/voice input configuration (see below) |
|
|
48
|
+
|
|
49
|
+
You must pass **`authKey`** (customer integration). For authentication details, see **`AUTHENTICATION.md`** in this package.
|
|
42
50
|
|
|
43
51
|
## Position Object
|
|
44
52
|
|
|
@@ -67,46 +75,133 @@ position?: {
|
|
|
67
75
|
### Position Examples
|
|
68
76
|
|
|
69
77
|
**Bottom-right corner:**
|
|
78
|
+
|
|
70
79
|
```jsx
|
|
71
|
-
<GuideAI
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
80
|
+
<GuideAI
|
|
81
|
+
authKey="your-access-key"
|
|
82
|
+
React={React}
|
|
83
|
+
ReactDOM={ReactDOM}
|
|
84
|
+
position={{ bottom: '20px', right: '20px' }}
|
|
76
85
|
/>
|
|
77
86
|
```
|
|
78
87
|
|
|
79
88
|
**Bottom-left corner:**
|
|
89
|
+
|
|
80
90
|
```jsx
|
|
81
|
-
<GuideAI
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
91
|
+
<GuideAI
|
|
92
|
+
authKey="your-access-key"
|
|
93
|
+
React={React}
|
|
94
|
+
ReactDOM={ReactDOM}
|
|
95
|
+
position={{ bottom: '20px', left: '20px' }}
|
|
86
96
|
/>
|
|
87
97
|
```
|
|
88
98
|
|
|
89
99
|
**Centered at bottom:**
|
|
100
|
+
|
|
90
101
|
```jsx
|
|
91
|
-
<GuideAI
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
102
|
+
<GuideAI
|
|
103
|
+
authKey="your-access-key"
|
|
104
|
+
React={React}
|
|
105
|
+
ReactDOM={ReactDOM}
|
|
106
|
+
position={{
|
|
107
|
+
bottom: '20px',
|
|
108
|
+
left: '50%',
|
|
109
|
+
transform: 'translateX(-50%)',
|
|
110
|
+
}}
|
|
100
111
|
/>
|
|
101
112
|
```
|
|
102
113
|
|
|
103
114
|
**Top-right corner:**
|
|
115
|
+
|
|
104
116
|
```jsx
|
|
105
117
|
<GuideAI
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
118
|
+
authKey="your-access-key"
|
|
119
|
+
React={React}
|
|
120
|
+
ReactDOM={ReactDOM}
|
|
121
|
+
position={{ top: '20px', right: '20px' }}
|
|
122
|
+
/>
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Transcript Object
|
|
126
|
+
|
|
127
|
+
The `transcript` prop controls the conversation transcript panel:
|
|
128
|
+
|
|
129
|
+
```typescript
|
|
130
|
+
transcript?: {
|
|
131
|
+
enabled?: boolean; // Whether to show transcript (default: true)
|
|
132
|
+
position?: 'right' | 'left'; // Which side of the button (default: 'right')
|
|
133
|
+
}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Transcript Examples
|
|
137
|
+
|
|
138
|
+
**Disable transcript panel:**
|
|
139
|
+
|
|
140
|
+
```jsx
|
|
141
|
+
<GuideAI
|
|
142
|
+
authKey="your-access-key"
|
|
143
|
+
React={React}
|
|
144
|
+
ReactDOM={ReactDOM}
|
|
145
|
+
transcript={{ enabled: false }}
|
|
146
|
+
/>
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
**Show transcript on the left:**
|
|
150
|
+
|
|
151
|
+
```jsx
|
|
152
|
+
<GuideAI
|
|
153
|
+
authKey="your-access-key"
|
|
154
|
+
React={React}
|
|
155
|
+
ReactDOM={ReactDOM}
|
|
156
|
+
transcript={{ position: 'left' }}
|
|
157
|
+
/>
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
## Input Object
|
|
161
|
+
|
|
162
|
+
The `input` prop configures text and voice input options:
|
|
163
|
+
|
|
164
|
+
```typescript
|
|
165
|
+
input?: {
|
|
166
|
+
enableTextInput?: boolean; // Show text input option (default: true)
|
|
167
|
+
showInputToggle?: boolean; // Show voice/text toggle button (default: true)
|
|
168
|
+
defaultMode?: 'voice' | 'text'; // Default input mode (default: 'voice')
|
|
169
|
+
placeholder?: string; // Placeholder text for text input (default: 'Type your message...')
|
|
170
|
+
}
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Input Examples
|
|
174
|
+
|
|
175
|
+
**Text-only mode:**
|
|
176
|
+
|
|
177
|
+
```jsx
|
|
178
|
+
<GuideAI
|
|
179
|
+
authKey="your-access-key"
|
|
180
|
+
React={React}
|
|
181
|
+
ReactDOM={ReactDOM}
|
|
182
|
+
input={{ defaultMode: 'text', showInputToggle: false }}
|
|
183
|
+
/>
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
**Disable text input (voice only):**
|
|
187
|
+
|
|
188
|
+
```jsx
|
|
189
|
+
<GuideAI
|
|
190
|
+
authKey="your-access-key"
|
|
191
|
+
React={React}
|
|
192
|
+
ReactDOM={ReactDOM}
|
|
193
|
+
input={{ enableTextInput: false }}
|
|
194
|
+
/>
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
**Custom placeholder text:**
|
|
198
|
+
|
|
199
|
+
```jsx
|
|
200
|
+
<GuideAI
|
|
201
|
+
authKey="your-access-key"
|
|
202
|
+
React={React}
|
|
203
|
+
ReactDOM={ReactDOM}
|
|
204
|
+
input={{ placeholder: 'Ask me anything...' }}
|
|
110
205
|
/>
|
|
111
206
|
```
|
|
112
207
|
|
|
@@ -116,8 +211,8 @@ Guide AI allows you to customize the microphone button color to match your appli
|
|
|
116
211
|
|
|
117
212
|
### Available CSS Variable
|
|
118
213
|
|
|
119
|
-
| Variable
|
|
120
|
-
|
|
214
|
+
| Variable | Default | Description |
|
|
215
|
+
| --------------------- | --------- | --------------------- |
|
|
121
216
|
| `--guideai-mic-color` | `#0000FF` | Microphone icon color |
|
|
122
217
|
|
|
123
218
|
### Customization Example
|
|
@@ -127,30 +222,33 @@ Add this style to your application's CSS file to override the default color:
|
|
|
127
222
|
```css
|
|
128
223
|
/* Match your brand color */
|
|
129
224
|
.guideai-icon-wrapper {
|
|
130
|
-
|
|
225
|
+
--guideai-mic-color: #6366f1; /* Your primary brand color */
|
|
131
226
|
}
|
|
132
227
|
```
|
|
133
228
|
|
|
134
229
|
### Brand Matching Examples
|
|
135
230
|
|
|
136
231
|
**Purple/Indigo Theme:**
|
|
232
|
+
|
|
137
233
|
```css
|
|
138
234
|
.guideai-icon-wrapper {
|
|
139
|
-
|
|
235
|
+
--guideai-mic-color: #8b5cf6;
|
|
140
236
|
}
|
|
141
237
|
```
|
|
142
238
|
|
|
143
239
|
**Green/Eco Theme:**
|
|
240
|
+
|
|
144
241
|
```css
|
|
145
242
|
.guideai-icon-wrapper {
|
|
146
|
-
|
|
243
|
+
--guideai-mic-color: #059669;
|
|
147
244
|
}
|
|
148
245
|
```
|
|
149
246
|
|
|
150
247
|
**Dark/Monochrome Theme:**
|
|
248
|
+
|
|
151
249
|
```css
|
|
152
250
|
.guideai-icon-wrapper {
|
|
153
|
-
|
|
251
|
+
--guideai-mic-color: #ffffff;
|
|
154
252
|
}
|
|
155
253
|
```
|
|
156
254
|
|
|
@@ -159,30 +257,32 @@ Add this style to your application's CSS file to override the default color:
|
|
|
159
257
|
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
258
|
|
|
161
259
|
**Custom z-index value:**
|
|
260
|
+
|
|
162
261
|
```jsx
|
|
163
262
|
<GuideAI
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
263
|
+
authKey="your-access-key"
|
|
264
|
+
React={React}
|
|
265
|
+
ReactDOM={ReactDOM}
|
|
266
|
+
position={{
|
|
267
|
+
bottom: '20px',
|
|
268
|
+
right: '20px',
|
|
269
|
+
zIndex: 5000, // All components use 5000, onboarding modal uses 5001
|
|
270
|
+
}}
|
|
172
271
|
/>
|
|
173
272
|
```
|
|
174
273
|
|
|
175
274
|
**Positioning with z-index configuration:**
|
|
275
|
+
|
|
176
276
|
```jsx
|
|
177
277
|
<GuideAI
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
278
|
+
authKey="your-access-key"
|
|
279
|
+
React={React}
|
|
280
|
+
ReactDOM={ReactDOM}
|
|
281
|
+
position={{
|
|
282
|
+
bottom: '40px',
|
|
283
|
+
right: '40px',
|
|
284
|
+
zIndex: 2000, // Set base z-index to 2000
|
|
285
|
+
}}
|
|
186
286
|
/>
|
|
187
287
|
```
|
|
188
288
|
|
|
@@ -196,31 +296,30 @@ import ReactDOM from 'react-dom';
|
|
|
196
296
|
import GuideAI from 'guideai-app';
|
|
197
297
|
|
|
198
298
|
function App() {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
);
|
|
299
|
+
return (
|
|
300
|
+
<div className="app">
|
|
301
|
+
<h1>My Application</h1>
|
|
302
|
+
|
|
303
|
+
<GuideAI
|
|
304
|
+
authKey="your-access-key"
|
|
305
|
+
workspace="your-workspace"
|
|
306
|
+
environment="production"
|
|
307
|
+
React={React}
|
|
308
|
+
ReactDOM={ReactDOM}
|
|
309
|
+
position={{ bottom: '40px', right: '40px' }}
|
|
310
|
+
transcript={{ position: 'right' }}
|
|
311
|
+
input={{ defaultMode: 'voice' }}
|
|
312
|
+
/>
|
|
313
|
+
</div>
|
|
314
|
+
);
|
|
216
315
|
}
|
|
217
316
|
|
|
218
317
|
export default App;
|
|
219
318
|
```
|
|
220
319
|
|
|
221
|
-
## Getting Your
|
|
320
|
+
## Getting Your Access Key
|
|
222
321
|
|
|
223
|
-
To use Guide AI, you'll need an
|
|
322
|
+
To use Guide AI, you'll need an access key and workspace slug. Contact the Guide AI team to get set up.
|
|
224
323
|
|
|
225
324
|
## Support
|
|
226
325
|
|
package/dist/GuideAI.d.ts
CHANGED