@oxy.so/bloom 4.13.0 → 4.13.2
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/docs/ai-chat.mdx +3 -3
- package/lib/commonjs/ai-chat/AiChat.js +5 -2
- package/lib/commonjs/ai-chat/AiChat.js.map +1 -1
- package/lib/commonjs/ai-chat/AiChat.web.js +8 -5
- package/lib/commonjs/ai-chat/AiChat.web.js.map +1 -1
- package/lib/commonjs/ai-chat/AiChatContainer.js +80 -41
- package/lib/commonjs/ai-chat/AiChatContainer.js.map +1 -1
- package/lib/commonjs/ai-chat/bindAiChat.js +12 -1
- package/lib/commonjs/ai-chat/bindAiChat.js.map +1 -1
- package/lib/commonjs/ai-chat/context.js.map +1 -1
- package/lib/commonjs/ai-chat/index.js +1 -1
- package/lib/commonjs/ai-chat/index.js.map +1 -1
- package/lib/commonjs/ai-chat/index.web.js +1 -1
- package/lib/commonjs/ai-chat/index.web.js.map +1 -1
- package/lib/commonjs/ai-chat/shared.js +12 -8
- package/lib/commonjs/ai-chat/shared.js.map +1 -1
- package/lib/module/ai-chat/AiChat.js +4 -1
- package/lib/module/ai-chat/AiChat.js.map +1 -1
- package/lib/module/ai-chat/AiChat.web.js +4 -1
- package/lib/module/ai-chat/AiChat.web.js.map +1 -1
- package/lib/module/ai-chat/AiChatContainer.js +81 -42
- package/lib/module/ai-chat/AiChatContainer.js.map +1 -1
- package/lib/module/ai-chat/bindAiChat.js +12 -1
- package/lib/module/ai-chat/bindAiChat.js.map +1 -1
- package/lib/module/ai-chat/context.js.map +1 -1
- package/lib/module/ai-chat/index.js +2 -2
- package/lib/module/ai-chat/index.js.map +1 -1
- package/lib/module/ai-chat/index.web.js +2 -2
- package/lib/module/ai-chat/index.web.js.map +1 -1
- package/lib/module/ai-chat/shared.js +11 -7
- package/lib/module/ai-chat/shared.js.map +1 -1
- package/lib/typescript/commonjs/ai-chat/AiChat.d.ts +4 -0
- package/lib/typescript/commonjs/ai-chat/AiChat.d.ts.map +1 -1
- package/lib/typescript/commonjs/ai-chat/AiChat.web.d.ts +4 -0
- package/lib/typescript/commonjs/ai-chat/AiChat.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/ai-chat/AiChatContainer.d.ts +7 -5
- package/lib/typescript/commonjs/ai-chat/AiChatContainer.d.ts.map +1 -1
- package/lib/typescript/commonjs/ai-chat/bindAiChat.d.ts +5 -1
- package/lib/typescript/commonjs/ai-chat/bindAiChat.d.ts.map +1 -1
- package/lib/typescript/commonjs/ai-chat/context.d.ts +6 -0
- package/lib/typescript/commonjs/ai-chat/context.d.ts.map +1 -1
- package/lib/typescript/commonjs/ai-chat/index.d.ts +2 -2
- package/lib/typescript/commonjs/ai-chat/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ai-chat/index.web.d.ts +2 -2
- package/lib/typescript/commonjs/ai-chat/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/ai-chat/shared.d.ts +9 -6
- package/lib/typescript/commonjs/ai-chat/shared.d.ts.map +1 -1
- package/lib/typescript/module/ai-chat/AiChat.d.ts +4 -0
- package/lib/typescript/module/ai-chat/AiChat.d.ts.map +1 -1
- package/lib/typescript/module/ai-chat/AiChat.web.d.ts +4 -0
- package/lib/typescript/module/ai-chat/AiChat.web.d.ts.map +1 -1
- package/lib/typescript/module/ai-chat/AiChatContainer.d.ts +7 -5
- package/lib/typescript/module/ai-chat/AiChatContainer.d.ts.map +1 -1
- package/lib/typescript/module/ai-chat/bindAiChat.d.ts +5 -1
- package/lib/typescript/module/ai-chat/bindAiChat.d.ts.map +1 -1
- package/lib/typescript/module/ai-chat/context.d.ts +6 -0
- package/lib/typescript/module/ai-chat/context.d.ts.map +1 -1
- package/lib/typescript/module/ai-chat/index.d.ts +2 -2
- package/lib/typescript/module/ai-chat/index.d.ts.map +1 -1
- package/lib/typescript/module/ai-chat/index.web.d.ts +2 -2
- package/lib/typescript/module/ai-chat/index.web.d.ts.map +1 -1
- package/lib/typescript/module/ai-chat/shared.d.ts +9 -6
- package/lib/typescript/module/ai-chat/shared.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/ai-chat/AiChat.tsx +3 -1
- package/src/ai-chat/AiChat.web.tsx +3 -1
- package/src/ai-chat/AiChatContainer.tsx +68 -40
- package/src/ai-chat/bindAiChat.tsx +12 -1
- package/src/ai-chat/context.ts +6 -0
- package/src/ai-chat/index.ts +2 -1
- package/src/ai-chat/index.web.ts +2 -1
- package/src/ai-chat/shared.ts +11 -7
package/src/ai-chat/index.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
export {
|
|
2
2
|
AiChatAssistantMessage,
|
|
3
|
+
AiChatContainer,
|
|
3
4
|
AiChatFeedbackRow,
|
|
4
5
|
AiChatGalleryPanel,
|
|
5
6
|
AiChatImageGeneration,
|
|
6
7
|
} from './AiChat';
|
|
7
8
|
export { AiChatCodePanel } from './AiChatCodePanel';
|
|
8
|
-
export {
|
|
9
|
+
export { AiChatThread } from './AiChatContainer';
|
|
9
10
|
export {
|
|
10
11
|
AiChatBullet,
|
|
11
12
|
AiChatBulletList,
|
package/src/ai-chat/index.web.ts
CHANGED
|
@@ -5,12 +5,13 @@
|
|
|
5
5
|
|
|
6
6
|
export {
|
|
7
7
|
AiChatAssistantMessage,
|
|
8
|
+
AiChatContainer,
|
|
8
9
|
AiChatFeedbackRow,
|
|
9
10
|
AiChatGalleryPanel,
|
|
10
11
|
AiChatImageGeneration,
|
|
11
12
|
} from './AiChat.web';
|
|
12
13
|
export { AiChatCodePanel } from './AiChatCodePanel';
|
|
13
|
-
export {
|
|
14
|
+
export { AiChatThread } from './AiChatContainer';
|
|
14
15
|
export {
|
|
15
16
|
AiChatBullet,
|
|
16
17
|
AiChatBulletList,
|
package/src/ai-chat/shared.ts
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
type Ramp,
|
|
8
8
|
} from '../button/shared';
|
|
9
9
|
import { adoptStyleSheet } from '../styles/adopt-style-sheet';
|
|
10
|
+
import { borderRadius } from '../styles/tokens';
|
|
10
11
|
import {
|
|
11
12
|
WEB_POSITION_STICKY,
|
|
12
13
|
webViewportHeightMinus,
|
|
@@ -130,19 +131,25 @@ export const DOCUMENT_RAIL: WebCssStyle = {
|
|
|
130
131
|
flexShrink: 0,
|
|
131
132
|
};
|
|
132
133
|
|
|
134
|
+
/**
|
|
135
|
+
* `scroll="document"`: the card is a `ContentPanel`, and this is its radius.
|
|
136
|
+
*/
|
|
137
|
+
export const DOCUMENT_CARD_RADIUS = borderRadius._3xl;
|
|
138
|
+
|
|
133
139
|
/**
|
|
134
140
|
* `scroll="document"`: a layer the size of the visible card that takes no room
|
|
135
141
|
* in the flow — pinned like the rail, then pulled back out of the layout by an
|
|
136
142
|
* equal negative margin, so what follows it starts where it does. The card's
|
|
137
|
-
*
|
|
138
|
-
*
|
|
143
|
+
* `background` slot is drawn on it: the card grows with the conversation, the
|
|
144
|
+
* layer stays the size of the screen — the same geometry as the panel's own
|
|
145
|
+
* sticky frame.
|
|
139
146
|
*/
|
|
140
147
|
export const DOCUMENT_LAYER: WebCssStyle = {
|
|
141
148
|
position: WEB_POSITION_STICKY,
|
|
142
149
|
top: SHELL_GUTTER,
|
|
143
150
|
height: webViewportHeightMinus(SHELL_GUTTER * 2),
|
|
144
151
|
marginBottom: `calc(-100dvh + ${SHELL_GUTTER * 2}px)` as ViewStyle['marginBottom'],
|
|
145
|
-
borderRadius:
|
|
152
|
+
borderRadius: DOCUMENT_CARD_RADIUS,
|
|
146
153
|
};
|
|
147
154
|
|
|
148
155
|
// ---------------------------------------------------------------------------
|
|
@@ -171,9 +178,7 @@ const STYLE_ID = 'bloom-ai-chat-web-css';
|
|
|
171
178
|
* percentage transitioning 0% → 132% over 1550ms;
|
|
172
179
|
* - the resize grip's hover reveal;
|
|
173
180
|
* - the composer field's placeholder colour;
|
|
174
|
-
* -
|
|
175
|
-
* `clip-path` from `style`), and its thread out of the browser's scroll
|
|
176
|
-
* anchoring.
|
|
181
|
+
* - a document-scrolled thread out of the browser's scroll anchoring.
|
|
177
182
|
*/
|
|
178
183
|
export const AI_CHAT_WEB_CSS = `
|
|
179
184
|
@property --bloom-ai-reveal {
|
|
@@ -199,7 +204,6 @@ export const AI_CHAT_WEB_CSS = `
|
|
|
199
204
|
[data-bloom-ai-chat-zoom="in"] { cursor: zoom-in; }
|
|
200
205
|
[data-bloom-ai-chat-zoom="out"] { cursor: zoom-out; }
|
|
201
206
|
[data-bloom-ai-chat-zoom]:focus-visible { box-shadow: inset 0 0 0 2px var(--bloom-ai-chat-ring); }
|
|
202
|
-
[data-bloom-ai-chat-frame] { clip-path: inset(-${SHELL_GUTTER}px -1px); }
|
|
203
207
|
[data-bloom-ai-chat-thread] { overflow-anchor: none; }
|
|
204
208
|
[data-bloom-ai-chat-scroll="thin"] { scrollbar-width: thin; }
|
|
205
209
|
[data-bloom-ai-chat-scroll="none"] { scrollbar-width: none; }
|