@oxy.so/bloom 3.2.1 → 3.4.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.
- package/docs/adoption-matrix.mdx +3 -3
- package/docs/ai-chat.mdx +31 -3
- package/docs/composer-panel.mdx +41 -6
- package/lib/commonjs/ai-chat/AiChatContainer.js +122 -14
- package/lib/commonjs/ai-chat/AiChatContainer.js.map +1 -1
- package/lib/commonjs/ai-chat/AiChatShell.js +46 -6
- package/lib/commonjs/ai-chat/AiChatShell.js.map +1 -1
- package/lib/commonjs/ai-chat/context.js +5 -1
- package/lib/commonjs/ai-chat/context.js.map +1 -1
- package/lib/commonjs/ai-chat/index.js +7 -0
- package/lib/commonjs/ai-chat/index.js.map +1 -1
- package/lib/commonjs/ai-chat/index.web.js +7 -0
- package/lib/commonjs/ai-chat/index.web.js.map +1 -1
- package/lib/commonjs/composer-panel/ComposerControls.js +61 -0
- package/lib/commonjs/composer-panel/ComposerControls.js.map +1 -1
- package/lib/commonjs/composer-panel/ComposerPanelBase.js +12 -4
- package/lib/commonjs/composer-panel/ComposerPanelBase.js.map +1 -1
- package/lib/commonjs/composer-panel/ComposerPillBase.js +186 -85
- package/lib/commonjs/composer-panel/ComposerPillBase.js.map +1 -1
- package/lib/commonjs/composer-panel/EffortSlider.js +24 -15
- package/lib/commonjs/composer-panel/EffortSlider.js.map +1 -1
- package/lib/commonjs/composer-panel/ModelPickerBase.js +15 -4
- package/lib/commonjs/composer-panel/ModelPickerBase.js.map +1 -1
- package/lib/module/ai-chat/AiChatContainer.js +122 -14
- package/lib/module/ai-chat/AiChatContainer.js.map +1 -1
- package/lib/module/ai-chat/AiChatShell.js +46 -6
- package/lib/module/ai-chat/AiChatShell.js.map +1 -1
- package/lib/module/ai-chat/context.js +5 -1
- package/lib/module/ai-chat/context.js.map +1 -1
- package/lib/module/ai-chat/index.js +1 -0
- package/lib/module/ai-chat/index.js.map +1 -1
- package/lib/module/ai-chat/index.web.js +1 -0
- package/lib/module/ai-chat/index.web.js.map +1 -1
- package/lib/module/composer-panel/ComposerControls.js +60 -0
- package/lib/module/composer-panel/ComposerControls.js.map +1 -1
- package/lib/module/composer-panel/ComposerPanelBase.js +13 -5
- package/lib/module/composer-panel/ComposerPanelBase.js.map +1 -1
- package/lib/module/composer-panel/ComposerPillBase.js +187 -86
- package/lib/module/composer-panel/ComposerPillBase.js.map +1 -1
- package/lib/module/composer-panel/EffortSlider.js +24 -15
- package/lib/module/composer-panel/EffortSlider.js.map +1 -1
- package/lib/module/composer-panel/ModelPickerBase.js +15 -4
- package/lib/module/composer-panel/ModelPickerBase.js.map +1 -1
- package/lib/typescript/commonjs/ai-chat/AiChatContainer.d.ts +28 -5
- package/lib/typescript/commonjs/ai-chat/AiChatContainer.d.ts.map +1 -1
- package/lib/typescript/commonjs/ai-chat/AiChatShell.d.ts +11 -2
- package/lib/typescript/commonjs/ai-chat/AiChatShell.d.ts.map +1 -1
- package/lib/typescript/commonjs/ai-chat/context.d.ts +19 -1
- package/lib/typescript/commonjs/ai-chat/context.d.ts.map +1 -1
- package/lib/typescript/commonjs/ai-chat/index.d.ts +3 -1
- package/lib/typescript/commonjs/ai-chat/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ai-chat/index.web.d.ts +3 -1
- package/lib/typescript/commonjs/ai-chat/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/ai-chat/types.d.ts +101 -3
- package/lib/typescript/commonjs/ai-chat/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/composer-panel/ComposerControls.d.ts +14 -0
- package/lib/typescript/commonjs/composer-panel/ComposerControls.d.ts.map +1 -1
- package/lib/typescript/commonjs/composer-panel/ComposerPanelBase.d.ts +3 -2
- package/lib/typescript/commonjs/composer-panel/ComposerPanelBase.d.ts.map +1 -1
- package/lib/typescript/commonjs/composer-panel/ComposerPillBase.d.ts +3 -2
- package/lib/typescript/commonjs/composer-panel/ComposerPillBase.d.ts.map +1 -1
- package/lib/typescript/commonjs/composer-panel/EffortSlider.d.ts +10 -2
- package/lib/typescript/commonjs/composer-panel/EffortSlider.d.ts.map +1 -1
- package/lib/typescript/commonjs/composer-panel/ModelPickerBase.d.ts.map +1 -1
- package/lib/typescript/commonjs/composer-panel/types.d.ts +70 -20
- package/lib/typescript/commonjs/composer-panel/types.d.ts.map +1 -1
- package/lib/typescript/module/ai-chat/AiChatContainer.d.ts +28 -5
- package/lib/typescript/module/ai-chat/AiChatContainer.d.ts.map +1 -1
- package/lib/typescript/module/ai-chat/AiChatShell.d.ts +11 -2
- package/lib/typescript/module/ai-chat/AiChatShell.d.ts.map +1 -1
- package/lib/typescript/module/ai-chat/context.d.ts +19 -1
- package/lib/typescript/module/ai-chat/context.d.ts.map +1 -1
- package/lib/typescript/module/ai-chat/index.d.ts +3 -1
- package/lib/typescript/module/ai-chat/index.d.ts.map +1 -1
- package/lib/typescript/module/ai-chat/index.web.d.ts +3 -1
- package/lib/typescript/module/ai-chat/index.web.d.ts.map +1 -1
- package/lib/typescript/module/ai-chat/types.d.ts +101 -3
- package/lib/typescript/module/ai-chat/types.d.ts.map +1 -1
- package/lib/typescript/module/composer-panel/ComposerControls.d.ts +14 -0
- package/lib/typescript/module/composer-panel/ComposerControls.d.ts.map +1 -1
- package/lib/typescript/module/composer-panel/ComposerPanelBase.d.ts +3 -2
- package/lib/typescript/module/composer-panel/ComposerPanelBase.d.ts.map +1 -1
- package/lib/typescript/module/composer-panel/ComposerPillBase.d.ts +3 -2
- package/lib/typescript/module/composer-panel/ComposerPillBase.d.ts.map +1 -1
- package/lib/typescript/module/composer-panel/EffortSlider.d.ts +10 -2
- package/lib/typescript/module/composer-panel/EffortSlider.d.ts.map +1 -1
- package/lib/typescript/module/composer-panel/ModelPickerBase.d.ts.map +1 -1
- package/lib/typescript/module/composer-panel/types.d.ts +70 -20
- package/lib/typescript/module/composer-panel/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/support/adoption-matrix.ts +664 -0
- package/src/__tests__/support/collision-fixture-barrel.ts +20 -0
- package/src/__tests__/support/composite.ts +68 -0
- package/src/__tests__/support/constructed-style-sheets.ts +68 -0
- package/src/__tests__/support/press-host.ts +30 -0
- package/src/__tests__/support/rendered-style.ts +99 -0
- package/src/__tests__/support/unread-hook-fixture.ts +33 -0
- package/src/ai-chat/AiChatContainer.tsx +137 -16
- package/src/ai-chat/AiChatShell.tsx +59 -5
- package/src/ai-chat/context.ts +19 -1
- package/src/ai-chat/index.ts +3 -0
- package/src/ai-chat/index.web.ts +3 -0
- package/src/ai-chat/types.ts +104 -3
- package/src/composer-panel/ComposerControls.tsx +54 -0
- package/src/composer-panel/ComposerPanelBase.tsx +13 -5
- package/src/composer-panel/ComposerPillBase.tsx +178 -66
- package/src/composer-panel/EffortSlider.tsx +38 -18
- package/src/composer-panel/ModelPickerBase.tsx +23 -7
- package/src/composer-panel/types.ts +71 -20
- package/src/theme/__tests__/__fixtures__/golden-resolved-tokens.json +7682 -0
- package/src/theme/__tests__/fixtures/color-engine-golden.json +1 -0
|
@@ -121,6 +121,8 @@ export interface ModelPickerLabels {
|
|
|
121
121
|
providers?: string;
|
|
122
122
|
/** Default `'Effort'`. */
|
|
123
123
|
effort?: string;
|
|
124
|
+
/** Default `'Auto'` — the effort chip with no stop chosen. */
|
|
125
|
+
effortAuto?: string;
|
|
124
126
|
/** Default `'Faster'`. */
|
|
125
127
|
faster?: string;
|
|
126
128
|
/** Default `'Smarter'`. */
|
|
@@ -135,12 +137,17 @@ export interface ModelPickerProps {
|
|
|
135
137
|
/** Initial model id when uncontrolled. Defaults to the first provider's first model. */
|
|
136
138
|
defaultValue?: string;
|
|
137
139
|
onValueChange?: (modelId: string) => void;
|
|
138
|
-
/**
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
140
|
+
/**
|
|
141
|
+
* Controlled effort stop, an index into `effortLevels`. `null` is "no stop
|
|
142
|
+
* chosen" — the chip reads `labels.effortAuto`, the slider commits nothing and
|
|
143
|
+
* the thumb is drawn hollow, so the absence of a choice never looks like one.
|
|
144
|
+
*/
|
|
145
|
+
effort?: number | null;
|
|
146
|
+
/** Initial stop when uncontrolled. Default `1` ("Medium"); `null` for no choice. */
|
|
147
|
+
defaultEffort?: number | null;
|
|
148
|
+
/** A stop the reader chose. The picker has no way back to `null`, so it never reports one. */
|
|
142
149
|
onEffortChange?: (effort: number) => void;
|
|
143
|
-
/** The effort stops, "Faster" → "Smarter". Defaults to six stops. */
|
|
150
|
+
/** The effort stops, "Faster" → "Smarter". Defaults to six stops; `[]` drops the effort axis entirely. */
|
|
144
151
|
effortLevels?: ReadonlyArray<string>;
|
|
145
152
|
labels?: ModelPickerLabels;
|
|
146
153
|
style?: StyleProp<ViewStyle>;
|
|
@@ -169,6 +176,8 @@ export interface ComposerPanelLabels {
|
|
|
169
176
|
voice?: string;
|
|
170
177
|
/** Default `'Send message'`. */
|
|
171
178
|
send?: string;
|
|
179
|
+
/** Default `'Stop generating'` — send's stop state while `busy`. */
|
|
180
|
+
stop?: string;
|
|
172
181
|
/** Default `'Remove'` — prefixed to the file name on a tile's dismiss. */
|
|
173
182
|
remove?: string;
|
|
174
183
|
}
|
|
@@ -181,7 +190,15 @@ export interface ComposerPanelProps {
|
|
|
181
190
|
onValueChange?: (value: string) => void;
|
|
182
191
|
/** Fires on the send button and on Enter (web; Shift+Enter breaks the line). */
|
|
183
192
|
onSubmit?: (value: string) => void;
|
|
184
|
-
/**
|
|
193
|
+
/**
|
|
194
|
+
* Stop the turn in flight. With `busy`, send becomes a stop control that
|
|
195
|
+
* ignores `disabled` — cancelling has to stay possible while typing is not.
|
|
196
|
+
* Without a handler `busy` draws no stop, so the control is never inert.
|
|
197
|
+
*/
|
|
198
|
+
onStop?: () => void;
|
|
199
|
+
/** A turn is running: send becomes stop (given `onStop`) and Enter no longer submits. */
|
|
200
|
+
busy?: boolean;
|
|
201
|
+
/** Greys out send while a turn is in flight. Never reaches the stop control. */
|
|
185
202
|
disabled?: boolean;
|
|
186
203
|
/** Default `'Hi, what do you need today?'`. */
|
|
187
204
|
placeholder?: string;
|
|
@@ -207,10 +224,11 @@ export interface ComposerPanelProps {
|
|
|
207
224
|
model?: string;
|
|
208
225
|
defaultModel?: string;
|
|
209
226
|
onModelChange?: (modelId: string) => void;
|
|
210
|
-
/** Controlled effort stop. */
|
|
211
|
-
effort?: number;
|
|
212
|
-
defaultEffort?: number;
|
|
227
|
+
/** Controlled effort stop; `null` is "no stop chosen". See `ModelPicker`. */
|
|
228
|
+
effort?: number | null;
|
|
229
|
+
defaultEffort?: number | null;
|
|
213
230
|
onEffortChange?: (effort: number) => void;
|
|
231
|
+
/** `[]` drops the effort axis from the picker. */
|
|
214
232
|
effortLevels?: ReadonlyArray<string>;
|
|
215
233
|
modelPickerLabels?: ModelPickerLabels;
|
|
216
234
|
|
|
@@ -293,6 +311,8 @@ export interface ComposerPillLabels {
|
|
|
293
311
|
modelGroup?: string;
|
|
294
312
|
/** Default `'Effort'`. */
|
|
295
313
|
effort?: string;
|
|
314
|
+
/** Default `'Auto'` — the effort value with no stop chosen. */
|
|
315
|
+
effortAuto?: string;
|
|
296
316
|
/** Default `'Faster'`. */
|
|
297
317
|
faster?: string;
|
|
298
318
|
/** Default `'Smarter'`. */
|
|
@@ -301,6 +321,8 @@ export interface ComposerPillLabels {
|
|
|
301
321
|
voice?: string;
|
|
302
322
|
/** Default `'Send message'`. */
|
|
303
323
|
send?: string;
|
|
324
|
+
/** Default `'Stop generating'` — send's stop state while `busy`. */
|
|
325
|
+
stop?: string;
|
|
304
326
|
}
|
|
305
327
|
|
|
306
328
|
export interface ComposerPillProps {
|
|
@@ -311,7 +333,15 @@ export interface ComposerPillProps {
|
|
|
311
333
|
onValueChange?: (value: string) => void;
|
|
312
334
|
/** Fires on the send button and on Enter. */
|
|
313
335
|
onSubmit?: (value: string) => void;
|
|
314
|
-
/**
|
|
336
|
+
/**
|
|
337
|
+
* Stop the turn in flight. With `busy`, send becomes a stop control that
|
|
338
|
+
* ignores `disabled` — cancelling has to stay possible while typing is not.
|
|
339
|
+
* Without a handler `busy` draws no stop, so the control is never inert.
|
|
340
|
+
*/
|
|
341
|
+
onStop?: () => void;
|
|
342
|
+
/** A turn is running: send becomes stop (given `onStop`) and Enter no longer submits. */
|
|
343
|
+
busy?: boolean;
|
|
344
|
+
/** Greys out send (40%) while a turn is in flight. Never reaches the stop control. */
|
|
315
345
|
disabled?: boolean;
|
|
316
346
|
/** Default `'Ask me anything'`. */
|
|
317
347
|
placeholder?: string;
|
|
@@ -322,19 +352,30 @@ export interface ComposerPillProps {
|
|
|
322
352
|
addMenu?: ReadonlyArray<ComposerPanelAddMenuGroup>;
|
|
323
353
|
onAddMenuSelect?: (rowId: string) => void;
|
|
324
354
|
|
|
325
|
-
/**
|
|
326
|
-
|
|
327
|
-
|
|
355
|
+
/**
|
|
356
|
+
* The model menu's lineup. Omit to hide the model button.
|
|
357
|
+
*
|
|
358
|
+
* `{ id, name }` entries are the identity contract `ModelPicker` uses: the
|
|
359
|
+
* menu keys, matches and reports the **id**, and draws the `name`. A bare
|
|
360
|
+
* string is shorthand for `{ id: name, name }` — kept so the display-name form
|
|
361
|
+
* still works, and the only form in which a routing id is a display string.
|
|
362
|
+
*/
|
|
363
|
+
models?: ReadonlyArray<string | ModelPickerModel>;
|
|
364
|
+
/** Controlled model **id** (a string entry's id is its name). */
|
|
328
365
|
model?: string;
|
|
329
|
-
/** Initial model when uncontrolled. Default the first. */
|
|
366
|
+
/** Initial model id when uncontrolled. Default the first entry's. */
|
|
330
367
|
defaultModel?: string;
|
|
331
|
-
onModelChange?: (
|
|
332
|
-
/**
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
368
|
+
onModelChange?: (modelId: string) => void;
|
|
369
|
+
/**
|
|
370
|
+
* Controlled effort stop, an index into `effortLevels`. `null` is "no stop
|
|
371
|
+
* chosen" — the value reads `labels.effortAuto` and the thumb is drawn hollow.
|
|
372
|
+
*/
|
|
373
|
+
effort?: number | null;
|
|
374
|
+
/** Default `1` ("Medium"); `null` for no choice. */
|
|
375
|
+
defaultEffort?: number | null;
|
|
376
|
+
/** A stop the reader chose. The menu has no way back to `null`, so it never reports one. */
|
|
336
377
|
onEffortChange?: (effort: number) => void;
|
|
337
|
-
/** Default `MODEL_PICKER_EFFORT_LEVELS
|
|
378
|
+
/** Default `MODEL_PICKER_EFFORT_LEVELS`; `[]` drops the effort half of the menu. */
|
|
338
379
|
effortLevels?: ReadonlyArray<string>;
|
|
339
380
|
|
|
340
381
|
/** Controlled voice-input state (the mic swaps to equalizer bars). */
|
|
@@ -354,6 +395,16 @@ export interface ComposerPillProps {
|
|
|
354
395
|
*/
|
|
355
396
|
glass?: boolean;
|
|
356
397
|
|
|
398
|
+
/**
|
|
399
|
+
* How many lines the pill grows to before the field scrolls instead. Default
|
|
400
|
+
* `8`.
|
|
401
|
+
*
|
|
402
|
+
* The pill is one line at rest and measures its own content as the draft
|
|
403
|
+
* wraps — a composer for an assistant has to hold a paragraph. `1` keeps the
|
|
404
|
+
* fixed single-line box this had before it could grow.
|
|
405
|
+
*/
|
|
406
|
+
maxLines?: number;
|
|
407
|
+
|
|
357
408
|
/** The field itself, for focus or a scripted demo. */
|
|
358
409
|
inputRef?: RefObject<TextInput | null>;
|
|
359
410
|
labels?: ComposerPillLabels;
|