@stainless-api/docs-ai-chat 0.1.0-beta.1 → 0.1.0-beta.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @stainless-api/docs-ai-chat
2
2
 
3
+ ## 0.1.0-beta.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 77c0d47: steelie: submit on enter
8
+
9
+ ## 0.1.0-beta.2
10
+
11
+ ### Patch Changes
12
+
13
+ - a1502cf: fix: close AIChat when clicking on SVG elements outside its bounds
14
+ - 88a9894: patch vite optimizeDeps for docs-ai-chat
15
+ - Updated dependencies [2a79bae]
16
+ - Updated dependencies [88a9894]
17
+ - @stainless-api/ui-primitives@0.1.0-beta.38
18
+ - @stainless-api/docs@0.1.0-beta.61
19
+ - @stainless-api/docs-ui@0.1.0-beta.51
20
+
3
21
  ## 0.1.0-beta.1
4
22
 
5
23
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stainless-api/docs-ai-chat",
3
- "version": "0.1.0-beta.1",
3
+ "version": "0.1.0-beta.3",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -8,9 +8,9 @@
8
8
  "peerDependencies": {
9
9
  "react": ">=19.0.0",
10
10
  "react-dom": ">=19.0.0",
11
- "@stainless-api/docs": "0.1.0-beta.60",
12
- "@stainless-api/docs-ui": "0.1.0-beta.50",
13
- "@stainless-api/ui-primitives": "0.1.0-beta.37"
11
+ "@stainless-api/docs": "0.1.0-beta.61",
12
+ "@stainless-api/docs-ui": "0.1.0-beta.51",
13
+ "@stainless-api/ui-primitives": "0.1.0-beta.38"
14
14
  },
15
15
  "dependencies": {
16
16
  "@streamparser/json-whatwg": "^0.0.22",
@@ -33,6 +33,9 @@
33
33
  "exports": {
34
34
  "./plugin": {
35
35
  "import": "./plugin.tsx"
36
+ },
37
+ "./src/AiChat.tsx": {
38
+ "import": "./src/AiChat.tsx"
36
39
  }
37
40
  },
38
41
  "scripts": {
package/plugin.tsx CHANGED
@@ -1,5 +1,3 @@
1
- import { fileURLToPath } from 'node:url';
2
-
3
1
  export default function aiChatPlugin() {
4
- return { chatComponentPath: fileURLToPath(new URL('./src/AiChat.tsx', import.meta.url)) };
2
+ return { chatComponentPath: '@stainless-api/docs-ai-chat/src/AiChat.tsx' };
5
3
  }
package/src/AiChat.tsx CHANGED
@@ -30,7 +30,7 @@ export default function DocsChat({
30
30
  const ac = new AbortController();
31
31
  // “focus” in/out with click
32
32
  window.addEventListener('click', (e) => {
33
- if (!(e.target instanceof HTMLElement)) return;
33
+ if (!(e.target instanceof Element)) return;
34
34
  if (baseRef.current?.contains(e.target)) { setFocused(true); }
35
35
  else { setFocused(false); }
36
36
  }, { signal: ac.signal });
package/src/Trigger.tsx CHANGED
@@ -101,7 +101,7 @@ export default function AiChatTrigger({
101
101
  }}
102
102
  // Submit on Cmd+Enter
103
103
  onKeyDown={(e: React.KeyboardEvent<HTMLTextAreaElement>) => {
104
- if (e.key === 'Enter' && (e.metaKey || e.ctrlKey)) {
104
+ if (e.key === 'Enter' && !e.shiftKey) {
105
105
  e.preventDefault();
106
106
  e.currentTarget.form?.requestSubmit();
107
107
  }