@oxy.so/bloom 3.2.1 → 3.3.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 (111) hide show
  1. package/docs/adoption-matrix.mdx +2 -2
  2. package/docs/ai-chat.mdx +31 -3
  3. package/docs/composer-panel.mdx +23 -6
  4. package/lib/commonjs/ai-chat/AiChatContainer.js +122 -14
  5. package/lib/commonjs/ai-chat/AiChatContainer.js.map +1 -1
  6. package/lib/commonjs/ai-chat/AiChatShell.js +46 -6
  7. package/lib/commonjs/ai-chat/AiChatShell.js.map +1 -1
  8. package/lib/commonjs/ai-chat/context.js +5 -1
  9. package/lib/commonjs/ai-chat/context.js.map +1 -1
  10. package/lib/commonjs/ai-chat/index.js +7 -0
  11. package/lib/commonjs/ai-chat/index.js.map +1 -1
  12. package/lib/commonjs/ai-chat/index.web.js +7 -0
  13. package/lib/commonjs/ai-chat/index.web.js.map +1 -1
  14. package/lib/commonjs/composer-panel/ComposerControls.js +61 -0
  15. package/lib/commonjs/composer-panel/ComposerControls.js.map +1 -1
  16. package/lib/commonjs/composer-panel/ComposerPanelBase.js +12 -4
  17. package/lib/commonjs/composer-panel/ComposerPanelBase.js.map +1 -1
  18. package/lib/commonjs/composer-panel/ComposerPillBase.js +114 -79
  19. package/lib/commonjs/composer-panel/ComposerPillBase.js.map +1 -1
  20. package/lib/commonjs/composer-panel/EffortSlider.js +24 -15
  21. package/lib/commonjs/composer-panel/EffortSlider.js.map +1 -1
  22. package/lib/commonjs/composer-panel/ModelPickerBase.js +15 -4
  23. package/lib/commonjs/composer-panel/ModelPickerBase.js.map +1 -1
  24. package/lib/module/ai-chat/AiChatContainer.js +122 -14
  25. package/lib/module/ai-chat/AiChatContainer.js.map +1 -1
  26. package/lib/module/ai-chat/AiChatShell.js +46 -6
  27. package/lib/module/ai-chat/AiChatShell.js.map +1 -1
  28. package/lib/module/ai-chat/context.js +5 -1
  29. package/lib/module/ai-chat/context.js.map +1 -1
  30. package/lib/module/ai-chat/index.js +1 -0
  31. package/lib/module/ai-chat/index.js.map +1 -1
  32. package/lib/module/ai-chat/index.web.js +1 -0
  33. package/lib/module/ai-chat/index.web.js.map +1 -1
  34. package/lib/module/composer-panel/ComposerControls.js +60 -0
  35. package/lib/module/composer-panel/ComposerControls.js.map +1 -1
  36. package/lib/module/composer-panel/ComposerPanelBase.js +13 -5
  37. package/lib/module/composer-panel/ComposerPanelBase.js.map +1 -1
  38. package/lib/module/composer-panel/ComposerPillBase.js +115 -80
  39. package/lib/module/composer-panel/ComposerPillBase.js.map +1 -1
  40. package/lib/module/composer-panel/EffortSlider.js +24 -15
  41. package/lib/module/composer-panel/EffortSlider.js.map +1 -1
  42. package/lib/module/composer-panel/ModelPickerBase.js +15 -4
  43. package/lib/module/composer-panel/ModelPickerBase.js.map +1 -1
  44. package/lib/typescript/commonjs/ai-chat/AiChatContainer.d.ts +28 -5
  45. package/lib/typescript/commonjs/ai-chat/AiChatContainer.d.ts.map +1 -1
  46. package/lib/typescript/commonjs/ai-chat/AiChatShell.d.ts +11 -2
  47. package/lib/typescript/commonjs/ai-chat/AiChatShell.d.ts.map +1 -1
  48. package/lib/typescript/commonjs/ai-chat/context.d.ts +19 -1
  49. package/lib/typescript/commonjs/ai-chat/context.d.ts.map +1 -1
  50. package/lib/typescript/commonjs/ai-chat/index.d.ts +3 -1
  51. package/lib/typescript/commonjs/ai-chat/index.d.ts.map +1 -1
  52. package/lib/typescript/commonjs/ai-chat/index.web.d.ts +3 -1
  53. package/lib/typescript/commonjs/ai-chat/index.web.d.ts.map +1 -1
  54. package/lib/typescript/commonjs/ai-chat/types.d.ts +101 -3
  55. package/lib/typescript/commonjs/ai-chat/types.d.ts.map +1 -1
  56. package/lib/typescript/commonjs/composer-panel/ComposerControls.d.ts +14 -0
  57. package/lib/typescript/commonjs/composer-panel/ComposerControls.d.ts.map +1 -1
  58. package/lib/typescript/commonjs/composer-panel/ComposerPanelBase.d.ts +3 -2
  59. package/lib/typescript/commonjs/composer-panel/ComposerPanelBase.d.ts.map +1 -1
  60. package/lib/typescript/commonjs/composer-panel/ComposerPillBase.d.ts +3 -2
  61. package/lib/typescript/commonjs/composer-panel/ComposerPillBase.d.ts.map +1 -1
  62. package/lib/typescript/commonjs/composer-panel/EffortSlider.d.ts +10 -2
  63. package/lib/typescript/commonjs/composer-panel/EffortSlider.d.ts.map +1 -1
  64. package/lib/typescript/commonjs/composer-panel/ModelPickerBase.d.ts.map +1 -1
  65. package/lib/typescript/commonjs/composer-panel/types.d.ts +61 -20
  66. package/lib/typescript/commonjs/composer-panel/types.d.ts.map +1 -1
  67. package/lib/typescript/module/ai-chat/AiChatContainer.d.ts +28 -5
  68. package/lib/typescript/module/ai-chat/AiChatContainer.d.ts.map +1 -1
  69. package/lib/typescript/module/ai-chat/AiChatShell.d.ts +11 -2
  70. package/lib/typescript/module/ai-chat/AiChatShell.d.ts.map +1 -1
  71. package/lib/typescript/module/ai-chat/context.d.ts +19 -1
  72. package/lib/typescript/module/ai-chat/context.d.ts.map +1 -1
  73. package/lib/typescript/module/ai-chat/index.d.ts +3 -1
  74. package/lib/typescript/module/ai-chat/index.d.ts.map +1 -1
  75. package/lib/typescript/module/ai-chat/index.web.d.ts +3 -1
  76. package/lib/typescript/module/ai-chat/index.web.d.ts.map +1 -1
  77. package/lib/typescript/module/ai-chat/types.d.ts +101 -3
  78. package/lib/typescript/module/ai-chat/types.d.ts.map +1 -1
  79. package/lib/typescript/module/composer-panel/ComposerControls.d.ts +14 -0
  80. package/lib/typescript/module/composer-panel/ComposerControls.d.ts.map +1 -1
  81. package/lib/typescript/module/composer-panel/ComposerPanelBase.d.ts +3 -2
  82. package/lib/typescript/module/composer-panel/ComposerPanelBase.d.ts.map +1 -1
  83. package/lib/typescript/module/composer-panel/ComposerPillBase.d.ts +3 -2
  84. package/lib/typescript/module/composer-panel/ComposerPillBase.d.ts.map +1 -1
  85. package/lib/typescript/module/composer-panel/EffortSlider.d.ts +10 -2
  86. package/lib/typescript/module/composer-panel/EffortSlider.d.ts.map +1 -1
  87. package/lib/typescript/module/composer-panel/ModelPickerBase.d.ts.map +1 -1
  88. package/lib/typescript/module/composer-panel/types.d.ts +61 -20
  89. package/lib/typescript/module/composer-panel/types.d.ts.map +1 -1
  90. package/package.json +1 -1
  91. package/src/__tests__/support/adoption-matrix.ts +664 -0
  92. package/src/__tests__/support/collision-fixture-barrel.ts +20 -0
  93. package/src/__tests__/support/composite.ts +68 -0
  94. package/src/__tests__/support/constructed-style-sheets.ts +68 -0
  95. package/src/__tests__/support/press-host.ts +30 -0
  96. package/src/__tests__/support/rendered-style.ts +99 -0
  97. package/src/__tests__/support/unread-hook-fixture.ts +33 -0
  98. package/src/ai-chat/AiChatContainer.tsx +137 -16
  99. package/src/ai-chat/AiChatShell.tsx +59 -5
  100. package/src/ai-chat/context.ts +19 -1
  101. package/src/ai-chat/index.ts +3 -0
  102. package/src/ai-chat/index.web.ts +3 -0
  103. package/src/ai-chat/types.ts +104 -3
  104. package/src/composer-panel/ComposerControls.tsx +54 -0
  105. package/src/composer-panel/ComposerPanelBase.tsx +13 -5
  106. package/src/composer-panel/ComposerPillBase.tsx +101 -59
  107. package/src/composer-panel/EffortSlider.tsx +38 -18
  108. package/src/composer-panel/ModelPickerBase.tsx +23 -7
  109. package/src/composer-panel/types.ts +61 -20
  110. package/src/theme/__tests__/__fixtures__/golden-resolved-tokens.json +7682 -0
  111. package/src/theme/__tests__/fixtures/color-engine-golden.json +1 -0
@@ -8,9 +8,10 @@ import type { ComposerPanelProps } from './types';
8
8
  * body pt 6, prompt → controls 20
9
9
  * prompt px 6, body-regular, grows 20px a line up to 200 then scrolls
10
10
  * controls left: add + permission (8 apart); right: model picker, 16,
11
- * then mic + send (8 apart)
11
+ * then mic + send (8 apart); `busy` + `onStop` puts the stop
12
+ * control where send was, outside `disabled`'s reach
12
13
  *
13
14
  * Takes its panel implementation from the family's platform binding.
14
15
  */
15
- export declare function ComposerPanelBase({ value, defaultValue, onValueChange, onSubmit, disabled, placeholder, permissions, permission, defaultPermission, onPermissionChange, onLearnMore, addMenu, onAddMenuSelect, providers, model, defaultModel, onModelChange, effort, defaultEffort, onEffortChange, effortLevels, modelPickerLabels, listening, defaultListening, onListeningChange, attachments, onRemoveAttachment, status, inputRef, labels: labelOverrides, style, testID, }: ComposerPanelProps): import("react/jsx-runtime").JSX.Element;
16
+ export declare function ComposerPanelBase({ value, defaultValue, onValueChange, onSubmit, onStop, busy, disabled, placeholder, permissions, permission, defaultPermission, onPermissionChange, onLearnMore, addMenu, onAddMenuSelect, providers, model, defaultModel, onModelChange, effort, defaultEffort, onEffortChange, effortLevels, modelPickerLabels, listening, defaultListening, onListeningChange, attachments, onRemoveAttachment, status, inputRef, labels: labelOverrides, style, testID, }: ComposerPanelProps): import("react/jsx-runtime").JSX.Element;
16
17
  //# sourceMappingURL=ComposerPanelBase.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ComposerPanelBase.d.ts","sourceRoot":"","sources":["../../../../src/composer-panel/ComposerPanelBase.tsx"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAuB,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAgEvE;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,YAAiB,EACjB,aAAa,EACb,QAAQ,EACR,QAAgB,EAChB,WAA2C,EAC3C,WAAwC,EACxC,UAAU,EACV,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,EACX,OAAiC,EACjC,eAAe,EACf,SAAS,EACT,KAAK,EACL,YAAY,EACZ,aAAa,EACb,MAAM,EACN,aAAa,EACb,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,gBAAwB,EACxB,iBAAiB,EACjB,WAAW,EACX,kBAAkB,EAClB,MAAM,EACN,QAAQ,EACR,MAAM,EAAE,cAAc,EACtB,KAAK,EACL,MAAM,GACP,EAAE,kBAAkB,2CA8KpB"}
1
+ {"version":3,"file":"ComposerPanelBase.d.ts","sourceRoot":"","sources":["../../../../src/composer-panel/ComposerPanelBase.tsx"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAuB,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAiEvE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,YAAiB,EACjB,aAAa,EACb,QAAQ,EACR,MAAM,EACN,IAAY,EACZ,QAAgB,EAChB,WAA2C,EAC3C,WAAwC,EACxC,UAAU,EACV,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,EACX,OAAiC,EACjC,eAAe,EACf,SAAS,EACT,KAAK,EACL,YAAY,EACZ,aAAa,EACb,MAAM,EACN,aAAa,EACb,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,gBAAwB,EACxB,iBAAiB,EACjB,WAAW,EACX,kBAAkB,EAClB,MAAM,EACN,QAAQ,EACR,MAAM,EAAE,cAAc,EACtB,KAAK,EACL,MAAM,GACP,EAAE,kBAAkB,2CAkLpB"}
@@ -11,10 +11,11 @@ import type { ComposerPillProps } from './types';
11
11
  * unfocused on web, its last 32px fade into the pill
12
12
  * model the model menu trigger (see `ModelMenu`)
13
13
  * controls pl 6, gap 8: the bordered mic (dancing accent bars while
14
- * listening) and the `bg-button-primary` send disc
14
+ * listening) and the `bg-button-primary` send disc — which becomes
15
+ * the stop disc while `busy`, outside `disabled`'s reach
15
16
  *
16
17
  * `glass` drops the add, model and mic paint (480ms) onto frosted chips, so an
17
18
  * active `ComposerLoader` behind the pill shows through them.
18
19
  */
19
- export declare function ComposerPillBase({ value, defaultValue, onValueChange, onSubmit, disabled, placeholder, compactPlaceholder, addMenu, onAddMenuSelect, models, model, defaultModel, onModelChange, effort, defaultEffort, onEffortChange, effortLevels, listening, defaultListening, onListeningChange, surface, glass, inputRef, labels: labelOverrides, style, testID, }: ComposerPillProps): import("react/jsx-runtime").JSX.Element;
20
+ export declare function ComposerPillBase({ value, defaultValue, onValueChange, onSubmit, onStop, busy, disabled, placeholder, compactPlaceholder, addMenu, onAddMenuSelect, models, model, defaultModel, onModelChange, effort, defaultEffort, onEffortChange, effortLevels, listening, defaultListening, onListeningChange, surface, glass, inputRef, labels: labelOverrides, style, testID, }: ComposerPillProps): import("react/jsx-runtime").JSX.Element;
20
21
  //# sourceMappingURL=ComposerPillBase.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ComposerPillBase.d.ts","sourceRoot":"","sources":["../../../../src/composer-panel/ComposerPillBase.tsx"],"names":[],"mappings":"AAqCA,OAAO,KAAK,EAAsB,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAoTrE;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,YAAiB,EACjB,aAAa,EACb,QAAQ,EACR,QAAgB,EAChB,WAA+B,EAC/B,kBAA6B,EAC7B,OAAiC,EACjC,eAAe,EACf,MAAM,EACN,KAAK,EACL,YAAY,EACZ,aAAa,EACb,MAAM,EACN,aAA8B,EAC9B,cAAc,EACd,YAAyC,EACzC,SAAS,EACT,gBAAwB,EACxB,iBAAiB,EACjB,OAAc,EACd,KAAa,EACb,QAAQ,EACR,MAAM,EAAE,cAAc,EACtB,KAAK,EACL,MAAM,GACP,EAAE,iBAAiB,2CAoKnB"}
1
+ {"version":3,"file":"ComposerPillBase.d.ts","sourceRoot":"","sources":["../../../../src/composer-panel/ComposerPillBase.tsx"],"names":[],"mappings":"AAqCA,OAAO,KAAK,EAAsB,iBAAiB,EAAoB,MAAM,SAAS,CAAC;AAwUvF;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,YAAiB,EACjB,aAAa,EACb,QAAQ,EACR,MAAM,EACN,IAAY,EACZ,QAAgB,EAChB,WAA+B,EAC/B,kBAA6B,EAC7B,OAAiC,EACjC,eAAe,EACf,MAAM,EACN,KAAK,EACL,YAAY,EACZ,aAAa,EACb,MAAM,EACN,aAA8B,EAC9B,cAAc,EACd,YAAyC,EACzC,SAAS,EACT,gBAAwB,EACxB,iBAAiB,EACjB,OAAc,EACd,KAAa,EACb,QAAQ,EACR,MAAM,EAAE,cAAc,EACtB,KAAK,EACL,MAAM,GACP,EAAE,iBAAiB,2CA4KnB"}
@@ -1,9 +1,12 @@
1
1
  import type { ComposerPalette } from './shared';
2
2
  interface EffortSliderProps {
3
- value: number;
3
+ /** The chosen stop, or `null` for no choice yet. */
4
+ value: number | null;
4
5
  onChange: (value: number) => void;
5
6
  levels: ReadonlyArray<string>;
6
7
  label: string;
8
+ /** What `aria-valuetext` reads with no stop chosen (the "Auto" label). */
9
+ unsetLabel: string;
7
10
  palette: ComposerPalette;
8
11
  testID?: string;
9
12
  }
@@ -15,6 +18,11 @@ interface EffortSliderProps {
15
18
  * past the value fade their tick to 30% over 300ms; the fill follows the thumb
16
19
  * over 150ms.
17
20
  *
21
+ * With `value` `null` nothing is committed: the fill is empty, every tick is
22
+ * faded and the thumb is hollow and dashed, so "no stop chosen" cannot be read
23
+ * as "the first stop". The first press or key commits a stop, and there is no
24
+ * way back — the caller owns the `null`.
25
+ *
18
26
  * Drag or press anywhere on the track (PanResponder on both platforms); on web
19
27
  * the thumb is focusable and answers the arrow keys, Home and End.
20
28
  *
@@ -22,6 +30,6 @@ interface EffortSliderProps {
22
30
  * starfield, with the ticks blown off the track) has no native counterpart,
23
31
  * so at Max the slider simply rests at its last stop.
24
32
  */
25
- export declare function EffortSlider({ value, onChange, levels, label, palette, testID }: EffortSliderProps): import("react/jsx-runtime").JSX.Element;
33
+ export declare function EffortSlider({ value, onChange, levels, label, unsetLabel, palette, testID }: EffortSliderProps): import("react/jsx-runtime").JSX.Element;
26
34
  export {};
27
35
  //# sourceMappingURL=EffortSlider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EffortSlider.d.ts","sourceRoot":"","sources":["../../../../src/composer-panel/EffortSlider.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAMhD,UAAU,iBAAiB;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,eAAe,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,iBAAiB,2CAwJlG"}
1
+ {"version":3,"file":"EffortSlider.d.ts","sourceRoot":"","sources":["../../../../src/composer-panel/EffortSlider.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAMhD,UAAU,iBAAiB;IACzB,oDAAoD;IACpD,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,0EAA0E;IAC1E,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,eAAe,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,iBAAiB,2CAoK9G"}
@@ -1 +1 @@
1
- {"version":3,"file":"ModelPickerBase.d.ts","sourceRoot":"","sources":["../../../../src/composer-panel/ModelPickerBase.tsx"],"names":[],"mappings":"AAsCA,OAAO,KAAK,EAAuC,gBAAgB,EAAuB,MAAM,SAAS,CAAC;AA0W1G;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,KAAK,EACL,YAAY,EACZ,aAAa,EACb,MAAM,EACN,aAA8B,EAC9B,cAAc,EACd,YAAyC,EACzC,MAAM,EAAE,cAAc,EACtB,KAAK,EACL,MAAM,GACP,EAAE,gBAAgB,2CAwTlB"}
1
+ {"version":3,"file":"ModelPickerBase.d.ts","sourceRoot":"","sources":["../../../../src/composer-panel/ModelPickerBase.tsx"],"names":[],"mappings":"AAsCA,OAAO,KAAK,EAAuC,gBAAgB,EAAuB,MAAM,SAAS,CAAC;AAuX1G;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,KAAK,EACL,YAAY,EACZ,aAAa,EACb,MAAM,EACN,aAA8B,EAC9B,cAAc,EACd,YAAyC,EACzC,MAAM,EAAE,cAAc,EACtB,KAAK,EACL,MAAM,GACP,EAAE,gBAAgB,2CA2TlB"}
@@ -88,6 +88,8 @@ export interface ModelPickerLabels {
88
88
  providers?: string;
89
89
  /** Default `'Effort'`. */
90
90
  effort?: string;
91
+ /** Default `'Auto'` — the effort chip with no stop chosen. */
92
+ effortAuto?: string;
91
93
  /** Default `'Faster'`. */
92
94
  faster?: string;
93
95
  /** Default `'Smarter'`. */
@@ -101,12 +103,17 @@ export interface ModelPickerProps {
101
103
  /** Initial model id when uncontrolled. Defaults to the first provider's first model. */
102
104
  defaultValue?: string;
103
105
  onValueChange?: (modelId: string) => void;
104
- /** Controlled effort stop, an index into `effortLevels`. */
105
- effort?: number;
106
- /** Initial stop when uncontrolled. Default `1` ("Medium"). */
107
- defaultEffort?: number;
106
+ /**
107
+ * Controlled effort stop, an index into `effortLevels`. `null` is "no stop
108
+ * chosen" — the chip reads `labels.effortAuto`, the slider commits nothing and
109
+ * the thumb is drawn hollow, so the absence of a choice never looks like one.
110
+ */
111
+ effort?: number | null;
112
+ /** Initial stop when uncontrolled. Default `1` ("Medium"); `null` for no choice. */
113
+ defaultEffort?: number | null;
114
+ /** A stop the reader chose. The picker has no way back to `null`, so it never reports one. */
108
115
  onEffortChange?: (effort: number) => void;
109
- /** The effort stops, "Faster" → "Smarter". Defaults to six stops. */
116
+ /** The effort stops, "Faster" → "Smarter". Defaults to six stops; `[]` drops the effort axis entirely. */
110
117
  effortLevels?: ReadonlyArray<string>;
111
118
  labels?: ModelPickerLabels;
112
119
  style?: StyleProp<ViewStyle>;
@@ -130,6 +137,8 @@ export interface ComposerPanelLabels {
130
137
  voice?: string;
131
138
  /** Default `'Send message'`. */
132
139
  send?: string;
140
+ /** Default `'Stop generating'` — send's stop state while `busy`. */
141
+ stop?: string;
133
142
  /** Default `'Remove'` — prefixed to the file name on a tile's dismiss. */
134
143
  remove?: string;
135
144
  }
@@ -141,7 +150,15 @@ export interface ComposerPanelProps {
141
150
  onValueChange?: (value: string) => void;
142
151
  /** Fires on the send button and on Enter (web; Shift+Enter breaks the line). */
143
152
  onSubmit?: (value: string) => void;
144
- /** Greys out send while a turn is in flight. */
153
+ /**
154
+ * Stop the turn in flight. With `busy`, send becomes a stop control that
155
+ * ignores `disabled` — cancelling has to stay possible while typing is not.
156
+ * Without a handler `busy` draws no stop, so the control is never inert.
157
+ */
158
+ onStop?: () => void;
159
+ /** A turn is running: send becomes stop (given `onStop`) and Enter no longer submits. */
160
+ busy?: boolean;
161
+ /** Greys out send while a turn is in flight. Never reaches the stop control. */
145
162
  disabled?: boolean;
146
163
  /** Default `'Hi, what do you need today?'`. */
147
164
  placeholder?: string;
@@ -164,10 +181,11 @@ export interface ComposerPanelProps {
164
181
  model?: string;
165
182
  defaultModel?: string;
166
183
  onModelChange?: (modelId: string) => void;
167
- /** Controlled effort stop. */
168
- effort?: number;
169
- defaultEffort?: number;
184
+ /** Controlled effort stop; `null` is "no stop chosen". See `ModelPicker`. */
185
+ effort?: number | null;
186
+ defaultEffort?: number | null;
170
187
  onEffortChange?: (effort: number) => void;
188
+ /** `[]` drops the effort axis from the picker. */
171
189
  effortLevels?: ReadonlyArray<string>;
172
190
  modelPickerLabels?: ModelPickerLabels;
173
191
  /** Controlled voice-input state (the mic swaps to equalizer bars). */
@@ -234,6 +252,8 @@ export interface ComposerPillLabels {
234
252
  modelGroup?: string;
235
253
  /** Default `'Effort'`. */
236
254
  effort?: string;
255
+ /** Default `'Auto'` — the effort value with no stop chosen. */
256
+ effortAuto?: string;
237
257
  /** Default `'Faster'`. */
238
258
  faster?: string;
239
259
  /** Default `'Smarter'`. */
@@ -242,6 +262,8 @@ export interface ComposerPillLabels {
242
262
  voice?: string;
243
263
  /** Default `'Send message'`. */
244
264
  send?: string;
265
+ /** Default `'Stop generating'` — send's stop state while `busy`. */
266
+ stop?: string;
245
267
  }
246
268
  export interface ComposerPillProps {
247
269
  /** Controlled field value. */
@@ -251,7 +273,15 @@ export interface ComposerPillProps {
251
273
  onValueChange?: (value: string) => void;
252
274
  /** Fires on the send button and on Enter. */
253
275
  onSubmit?: (value: string) => void;
254
- /** Greys out send (40%) while a turn is in flight. */
276
+ /**
277
+ * Stop the turn in flight. With `busy`, send becomes a stop control that
278
+ * ignores `disabled` — cancelling has to stay possible while typing is not.
279
+ * Without a handler `busy` draws no stop, so the control is never inert.
280
+ */
281
+ onStop?: () => void;
282
+ /** A turn is running: send becomes stop (given `onStop`) and Enter no longer submits. */
283
+ busy?: boolean;
284
+ /** Greys out send (40%) while a turn is in flight. Never reaches the stop control. */
255
285
  disabled?: boolean;
256
286
  /** Default `'Ask me anything'`. */
257
287
  placeholder?: string;
@@ -260,19 +290,30 @@ export interface ComposerPillProps {
260
290
  /** The add menu's groups. Default the Composer Panel's "Add" and "Plugins" rows; `[]` hides the button. */
261
291
  addMenu?: ReadonlyArray<ComposerPanelAddMenuGroup>;
262
292
  onAddMenuSelect?: (rowId: string) => void;
263
- /** Model names for the model menu. Omit to hide the model button. */
264
- models?: ReadonlyArray<string>;
265
- /** Controlled model name. */
293
+ /**
294
+ * The model menu's lineup. Omit to hide the model button.
295
+ *
296
+ * `{ id, name }` entries are the identity contract `ModelPicker` uses: the
297
+ * menu keys, matches and reports the **id**, and draws the `name`. A bare
298
+ * string is shorthand for `{ id: name, name }` — kept so the display-name form
299
+ * still works, and the only form in which a routing id is a display string.
300
+ */
301
+ models?: ReadonlyArray<string | ModelPickerModel>;
302
+ /** Controlled model **id** (a string entry's id is its name). */
266
303
  model?: string;
267
- /** Initial model when uncontrolled. Default the first. */
304
+ /** Initial model id when uncontrolled. Default the first entry's. */
268
305
  defaultModel?: string;
269
- onModelChange?: (model: string) => void;
270
- /** Controlled effort stop, an index into `effortLevels`. */
271
- effort?: number;
272
- /** Default `1` ("Medium"). */
273
- defaultEffort?: number;
306
+ onModelChange?: (modelId: string) => void;
307
+ /**
308
+ * Controlled effort stop, an index into `effortLevels`. `null` is "no stop
309
+ * chosen" — the value reads `labels.effortAuto` and the thumb is drawn hollow.
310
+ */
311
+ effort?: number | null;
312
+ /** Default `1` ("Medium"); `null` for no choice. */
313
+ defaultEffort?: number | null;
314
+ /** A stop the reader chose. The menu has no way back to `null`, so it never reports one. */
274
315
  onEffortChange?: (effort: number) => void;
275
- /** Default `MODEL_PICKER_EFFORT_LEVELS`. */
316
+ /** Default `MODEL_PICKER_EFFORT_LEVELS`; `[]` drops the effort half of the menu. */
276
317
  effortLevels?: ReadonlyArray<string>;
277
318
  /** Controlled voice-input state (the mic swaps to equalizer bars). */
278
319
  listening?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/composer-panel/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpE,OAAO,KAAK,EAAE,KAAK,IAAI,SAAS,EAA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CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;IACvC,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAMD,MAAM,WAAW,uBAAuB;IACtC,gDAAgD;IAChD,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,uBAAuB;IACtC,iCAAiC;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sDAAsD;IACtD,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;CACvC;AAED,MAAM,WAAW,sBAAsB;IACrC,iEAAiE;IACjE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,6DAA6D;IAC7D,OAAO,CAAC,EAAE,aAAa,CAAC,uBAAuB,CAAC,CAAC;IACjD,qCAAqC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,2DAA2D;IAC3D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,oEAAoE;IACpE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,+DAA+D;IAC/D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,uBAAuB,CAAC;IACjC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
@@ -1,8 +1,12 @@
1
- import type { AiChatContainerProps, AiChatThreadProps } from './types';
1
+ import React from 'react';
2
+ import type { AiChatContainerProps, AiChatThreadHandle, AiChatThreadProps } from './types';
2
3
  /**
3
4
  * The AI chat's centre column: the centre column of the AI chat template.
4
5
  *
5
6
  * section fills its parent, radius 24, background-secondary, clipped
7
+ * layer the `background` slot, filling the section above its own paint
8
+ * and below everything else, clipped to the same radius;
9
+ * `surface={false}` drops that paint
6
10
  * header px 16 / pt 16, gap 8: the project › chat breadcrumb (flex 1) and
7
11
  * the 16px share / more glyphs, 8 apart
8
12
  * thread the `children` — usually an `AiChatThread`
@@ -10,13 +14,32 @@ import type { AiChatContainerProps, AiChatThreadProps } from './types';
10
14
  * while `working`, then the `composer`
11
15
  *
12
16
  * `header` renders above all of it: the shell's `AiChatMobileHeader`.
17
+ *
18
+ * `project` is optional: without one the breadcrumb is the chat's own crumb
19
+ * alone, since a chat that belongs to nothing must not have to invent a folder.
13
20
  */
14
- export declare function AiChatContainer({ project, title, projectIcon, onProjectPress, onShare, onMore, header, children, composer, working, workingLabel, labels, style, testID, }: AiChatContainerProps): import("react/jsx-runtime").JSX.Element;
21
+ export declare function AiChatContainer({ project, title, projectIcon, onProjectPress, onShare, onMore, header, children, composer, working, workingLabel, background, surface, labels, style, testID, }: AiChatContainerProps): import("react/jsx-runtime").JSX.Element;
15
22
  /**
16
23
  * The thread: the scrolling conversation, anchored to the bottom
17
24
  * so a short exchange sits just above the composer and grows upward — px 16 /
18
- * pt 16, turns 12 apart, a thin scrollbar. It follows the newest turn with a
19
- * smooth scroll whenever the content grows.
25
+ * pt 16, turns 12 apart, a thin scrollbar.
26
+ *
27
+ * It follows the newest turn with a smooth scroll whenever the content grows.
28
+ * That is the default and nothing else changes it; the timeline props are the
29
+ * ones a host with history needs and are each off unless asked for:
30
+ *
31
+ * autoFollow / followAnimated / followThreshold whether, how, and from how
32
+ * close to the bottom the follow happens
33
+ * onStartReached a chat pages UPWARD; this
34
+ * fires near the TOP, once per approach, re-arming when the reader leaves
35
+ * maintainStartPosition the growth that answers an
36
+ * `onStartReached` is added to the offset, so a page landing above the
37
+ * reader does not move the turn they are reading
38
+ * ref (`AiChatThreadHandle`) scrollToEnd /
39
+ * scrollToOffset / the ScrollView, for a cursor jump or a restore
40
+ *
41
+ * There is no virtualization and no `scrollToIndex`: a host jumping to a turn
42
+ * measures its row (`onLayout`) and calls `scrollToOffset`.
20
43
  */
21
- export declare function AiChatThread({ children, style, testID }: AiChatThreadProps): import("react/jsx-runtime").JSX.Element;
44
+ export declare const AiChatThread: React.ForwardRefExoticComponent<AiChatThreadProps & React.RefAttributes<AiChatThreadHandle>>;
22
45
  //# sourceMappingURL=AiChatContainer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AiChatContainer.d.ts","sourceRoot":"","sources":["../../../../src/ai-chat/AiChatContainer.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAQvE;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,EAC9B,OAAO,EACP,KAAK,EACL,WAA0B,EAC1B,cAAc,EACd,OAAO,EACP,MAAM,EACN,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,OAAe,EACf,YAAY,EACZ,MAAM,EACN,KAAK,EACL,MAAM,GACP,EAAE,oBAAoB,2CAqDtB;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,iBAAiB,2CA+B1E"}
1
+ {"version":3,"file":"AiChatContainer.d.ts","sourceRoot":"","sources":["../../../../src/ai-chat/AiChatContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwE,MAAM,OAAO,CAAC;AAgB7F,OAAO,KAAK,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAQ3F;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,eAAe,CAAC,EAC9B,OAAO,EACP,KAAK,EACL,WAA0B,EAC1B,cAAc,EACd,OAAO,EACP,MAAM,EACN,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,OAAe,EACf,YAAY,EACZ,UAAU,EACV,OAAc,EACd,MAAM,EACN,KAAK,EACL,MAAM,GACP,EAAE,oBAAoB,2CA4DtB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,YAAY,8FAmHvB,CAAC"}
@@ -21,7 +21,9 @@ export declare function AiChatMobileHeader({ title, style, testID }: AiChatMobil
21
21
  * The AI chat shell: the full AI chat
22
22
  * screen on background-full with a 12px frame.
23
23
  *
24
- * lg and up the floating `sidebar` in flow, 16 from the workspace
24
+ * lg and up the floating `sidebar` in flow, 16 from the workspace, at
25
+ * `sidebarWidth` (or its own width) — `sidebarCollapsed` narrows
26
+ * the column to `collapsedSidebarWidth` (56) for an icon rail
25
27
  * workspace the chat container flexing, then (xl and up) the `panel` 12 to
26
28
  * its right at `panelWidth`; the resize grip on the chat's right
27
29
  * edge trades width between them, clamped 320–560
@@ -36,7 +38,14 @@ export declare function AiChatMobileHeader({ title, style, testID }: AiChatMobil
36
38
  * over the workspace closes it
37
39
  *
38
40
  * The chat container reads the drawer controls through `AiChatMobileHeader`.
41
+ * Everything the shell knows — including `navPresented`, which says whether the
42
+ * nav is on screen at all — is published to any descendant through
43
+ * `useAiChatShell()`.
44
+ *
45
+ * `background` is a layer drawn above the shell's own paint and below all of
46
+ * it; with `surface={false}` neither the root nor the workspace paints, so the
47
+ * layer reaches the chat.
39
48
  */
40
- export declare function AiChatShell({ sidebar, mobileSidebar, children, panel, panelLabel, panelIcon, defaultPanelWidth, minPanelWidth, maxPanelWidth, navOpen: navOpenProp, onNavOpenChange, panelOpen: panelOpenProp, onPanelOpenChange, labels, style, testID, }: AiChatShellProps): import("react/jsx-runtime").JSX.Element;
49
+ export declare function AiChatShell({ sidebar, sidebarWidth, sidebarCollapsed, collapsedSidebarWidth, mobileSidebar, children, panel, panelLabel, panelIcon, defaultPanelWidth, minPanelWidth, maxPanelWidth, navOpen: navOpenProp, onNavOpenChange, panelOpen: panelOpenProp, onPanelOpenChange, background, surface, labels, style, testID, }: AiChatShellProps): import("react/jsx-runtime").JSX.Element;
41
50
  export type { GestureResponderEvent };
42
51
  //# sourceMappingURL=AiChatShell.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AiChatShell.d.ts","sourceRoot":"","sources":["../../../../src/ai-chat/AiChatShell.tsx"],"names":[],"mappings":"AACA,OAAO,EAKL,KAAK,qBAAqB,EAG3B,MAAM,cAAc,CAAC;AAyBtB,OAAO,KAAK,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAoBlG;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,aAAa,EACb,QAAQ,EACR,WAAW,EACX,KAA6B,EAC7B,OAAO,EACP,KAAK,EACL,MAAM,GACP,EAAE,uBAAuB,2CAoHzB;AAMD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,uBAAuB,kDAkDnF;AAMD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,aAAa,EACb,QAAQ,EACR,KAAK,EACL,UAAmB,EACnB,SAAuB,EACvB,iBAAuB,EACvB,aAAmB,EACnB,aAAmB,EACnB,OAAO,EAAE,WAAW,EACpB,eAAe,EACf,SAAS,EAAE,aAAa,EACxB,iBAAiB,EACjB,MAAM,EACN,KAAK,EACL,MAAM,GACP,EAAE,gBAAgB,2CAsOlB;AAED,YAAY,EAAE,qBAAqB,EAAE,CAAC"}
1
+ {"version":3,"file":"AiChatShell.d.ts","sourceRoot":"","sources":["../../../../src/ai-chat/AiChatShell.tsx"],"names":[],"mappings":"AACA,OAAO,EAKL,KAAK,qBAAqB,EAG3B,MAAM,cAAc,CAAC;AAyBtB,OAAO,KAAK,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAsBlG;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,aAAa,EACb,QAAQ,EACR,WAAW,EACX,KAA6B,EAC7B,OAAO,EACP,KAAK,EACL,MAAM,GACP,EAAE,uBAAuB,2CAoHzB;AAMD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,uBAAuB,kDAkDnF;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,YAAY,EACZ,gBAAwB,EACxB,qBAA+C,EAC/C,aAAa,EACb,QAAQ,EACR,KAAK,EACL,UAAmB,EACnB,SAAuB,EACvB,iBAAuB,EACvB,aAAmB,EACnB,aAAmB,EACnB,OAAO,EAAE,WAAW,EACpB,eAAe,EACf,SAAS,EAAE,aAAa,EACxB,iBAAiB,EACjB,UAAU,EACV,OAAc,EACd,MAAM,EACN,KAAK,EACL,MAAM,GACP,EAAE,gBAAgB,2CA4QlB;AAED,YAAY,EAAE,qBAAqB,EAAE,CAAC"}
@@ -27,7 +27,11 @@ export interface AiChatPlatform {
27
27
  }
28
28
  export declare const AiChatPlatformContext: import("react").Context<AiChatPlatform | null>;
29
29
  export declare function useAiChatPlatform(): AiChatPlatform;
30
- /** What `AiChatShell` hands the chat container's mobile header. */
30
+ /**
31
+ * What `AiChatShell` publishes: read it with `useAiChatShell()`. The chat
32
+ * container's mobile header runs on it, and so does anything a host needs to
33
+ * know about the frame around its own nav.
34
+ */
31
35
  export interface AiChatShellState {
32
36
  /** Below `xl`: the panel is a drawer and the mobile header shows. */
33
37
  compact: boolean;
@@ -35,7 +39,21 @@ export interface AiChatShellState {
35
39
  navCollapsed: boolean;
36
40
  hasNav: boolean;
37
41
  hasPanel: boolean;
42
+ /**
43
+ * Whether the nav is on screen at all: `true` from `lg` up (in flow) and,
44
+ * below it, only while the drawer is open.
45
+ *
46
+ * A closed drawer stays MOUNTED — it is translated offscreen, not removed —
47
+ * so a nav rendered into `mobileSidebar` is still focusable and still read by
48
+ * a screen reader unless its own tree says otherwise. This is the signal to
49
+ * hide it by: skip the tab order and mark the subtree hidden while it is
50
+ * `false`.
51
+ */
52
+ navPresented: boolean;
53
+ /** The in-flow sidebar is narrowed to its rail width (`sidebarCollapsed`). */
54
+ sidebarCollapsed: boolean;
38
55
  openNav: () => void;
56
+ closeNav: () => void;
39
57
  openPanel: () => void;
40
58
  panelLabel: string;
41
59
  panelIcon: AiChatShellIcon;
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/ai-chat/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE;;;;;;;;GAQG;AACH,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,aAAa,CAAC;QACrB,QAAQ,EAAE,SAAS,CAAC;QACpB,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;QAC5B,OAAO,EAAE,OAAO,CAAC;QACjB,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;KAC7C,CAAC,CAAC;IACH,cAAc,EAAE,aAAa,CAAC;QAAE,QAAQ,EAAE,SAAS,CAAA;KAAE,CAAC,CAAC;IACvD,iBAAiB,EAAE,aAAa,CAAC;QAAE,QAAQ,EAAE,SAAS,CAAC;QAAC,IAAI,CAAC,EAAE,WAAW,CAAA;KAAE,CAAC,CAAC;CAC/E;AAED,eAAO,MAAM,qBAAqB,gDAA6C,CAAC;AAEhF,wBAAgB,iBAAiB,IAAI,cAAc,CAQlD;AAED,mEAAmE;AACnE,MAAM,WAAW,gBAAgB;IAC/B,qEAAqE;IACrE,OAAO,EAAE,OAAO,CAAC;IACjB,gDAAgD;I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C;CAC/E;AAED,eAAO,MAAM,qBAAqB,gDAA6C,CAAC;AAEhF,wBAAgB,iBAAiB,IAAI,cAAc,CAQlD;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,qEAAqE;IACrE,OAAO,EAAE,OAAO,CAAC;IACjB,gDAAgD;IAChD,YAAY,EAAE,OAAO,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB;;;;;;;;;OASG;IACH,YAAY,EAAE,OAAO,CAAC;IACtB,8EAA8E;IAC9E,gBAAgB,EAAE,OAAO,CAAC;IAC1B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,eAAe,CAAC;IAC3B,MAAM,EAAE;QACN,cAAc,EAAE,MAAM,CAAC;QACvB,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;KACtC,CAAC;CACH;AAED,+FAA+F;AAC/F,MAAM,MAAM,eAAe,GAAG,kBAAkB,CAAC;AAEjD,eAAO,MAAM,kBAAkB,kDAA+C,CAAC;AAE/E,wBAAgB,cAAc,IAAI,gBAAgB,GAAG,IAAI,CAExD"}
@@ -3,5 +3,7 @@ export { AiChatCodePanel } from './AiChatCodePanel';
3
3
  export { AiChatContainer, AiChatThread } from './AiChatContainer';
4
4
  export { AiChatBullet, AiChatBulletList, AiChatLinkChip, AiChatMessageLine, AiChatStrong, AiChatUserMessage, } from './AiChatMessages';
5
5
  export { AiChatMobileHeader, AiChatResizeHandle, AiChatShell } from './AiChatShell';
6
- export type { AiChatAssistantMessageProps, AiChatBulletListProps, AiChatBulletProps, AiChatChangedFile, AiChatCodePanelLabels, AiChatCodePanelProps, AiChatContainerLabels, AiChatContainerProps, AiChatFeedbackLabels, AiChatFeedbackRowProps, AiChatGalleryPanelLabels, AiChatGalleryPanelProps, AiChatGeneration, AiChatIconComponent, AiChatImageGenerationLabels, AiChatImageGenerationProps, AiChatLinkChipProps, AiChatMessageLineProps, AiChatMobileHeaderProps, AiChatPanelAction, AiChatPanelTab, AiChatResizeHandleProps, AiChatShellLabels, AiChatShellProps, AiChatStrongProps, AiChatThreadProps, AiChatUserMessageProps, } from './types';
6
+ export { useAiChatShell } from './context';
7
+ export type { AiChatShellState } from './context';
8
+ export type { AiChatAssistantMessageProps, AiChatBulletListProps, AiChatBulletProps, AiChatChangedFile, AiChatCodePanelLabels, AiChatCodePanelProps, AiChatContainerLabels, AiChatContainerProps, AiChatFeedbackLabels, AiChatFeedbackRowProps, AiChatGalleryPanelLabels, AiChatGalleryPanelProps, AiChatGeneration, AiChatIconComponent, AiChatImageGenerationLabels, AiChatImageGenerationProps, AiChatLinkChipProps, AiChatMessageLineProps, AiChatMobileHeaderProps, AiChatPanelAction, AiChatPanelTab, AiChatResizeHandleProps, AiChatShellLabels, AiChatShellProps, AiChatStrongProps, AiChatThreadHandle, AiChatThreadProps, AiChatUserMessageProps, } from './types';
7
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ai-chat/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,GAClB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACpF,YAAY,EACV,2BAA2B,EAC3B,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,wBAAwB,EACxB,uBAAuB,EACvB,gBAAgB,EAChB,mBAAmB,EACnB,2BAA2B,EAC3B,0BAA0B,EAC1B,mBAAmB,EACnB,sBAAsB,EACtB,uBAAuB,EACvB,iBAAiB,EACjB,cAAc,EACd,uBAAuB,EACvB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ai-chat/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,GAClB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,YAAY,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAClD,YAAY,EACV,2BAA2B,EAC3B,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,wBAAwB,EACxB,uBAAuB,EACvB,gBAAgB,EAChB,mBAAmB,EACnB,2BAA2B,EAC3B,0BAA0B,EAC1B,mBAAmB,EACnB,sBAAsB,EACtB,uBAAuB,EACvB,iBAAiB,EACjB,cAAc,EACd,uBAAuB,EACvB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,SAAS,CAAC"}
@@ -3,5 +3,7 @@ export { AiChatCodePanel } from './AiChatCodePanel';
3
3
  export { AiChatContainer, AiChatThread } from './AiChatContainer';
4
4
  export { AiChatBullet, AiChatBulletList, AiChatLinkChip, AiChatMessageLine, AiChatStrong, AiChatUserMessage, } from './AiChatMessages';
5
5
  export { AiChatMobileHeader, AiChatResizeHandle, AiChatShell } from './AiChatShell';
6
- export type { AiChatAssistantMessageProps, AiChatBulletListProps, AiChatBulletProps, AiChatChangedFile, AiChatCodePanelLabels, AiChatCodePanelProps, AiChatContainerLabels, AiChatContainerProps, AiChatFeedbackLabels, AiChatFeedbackRowProps, AiChatGalleryPanelLabels, AiChatGalleryPanelProps, AiChatGeneration, AiChatIconComponent, AiChatImageGenerationLabels, AiChatImageGenerationProps, AiChatLinkChipProps, AiChatMessageLineProps, AiChatMobileHeaderProps, AiChatPanelAction, AiChatPanelTab, AiChatResizeHandleProps, AiChatShellLabels, AiChatShellProps, AiChatStrongProps, AiChatThreadProps, AiChatUserMessageProps, } from './types';
6
+ export { useAiChatShell } from './context';
7
+ export type { AiChatShellState } from './context';
8
+ export type { AiChatAssistantMessageProps, AiChatBulletListProps, AiChatBulletProps, AiChatChangedFile, AiChatCodePanelLabels, AiChatCodePanelProps, AiChatContainerLabels, AiChatContainerProps, AiChatFeedbackLabels, AiChatFeedbackRowProps, AiChatGalleryPanelLabels, AiChatGalleryPanelProps, AiChatGeneration, AiChatIconComponent, AiChatImageGenerationLabels, AiChatImageGenerationProps, AiChatLinkChipProps, AiChatMessageLineProps, AiChatMobileHeaderProps, AiChatPanelAction, AiChatPanelTab, AiChatResizeHandleProps, AiChatShellLabels, AiChatShellProps, AiChatStrongProps, AiChatThreadHandle, AiChatThreadProps, AiChatUserMessageProps, } from './types';
7
9
  //# sourceMappingURL=index.web.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/ai-chat/index.web.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,GAClB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACpF,YAAY,EACV,2BAA2B,EAC3B,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,wBAAwB,EACxB,uBAAuB,EACvB,gBAAgB,EAChB,mBAAmB,EACnB,2BAA2B,EAC3B,0BAA0B,EAC1B,mBAAmB,EACnB,sBAAsB,EACtB,uBAAuB,EACvB,iBAAiB,EACjB,cAAc,EACd,uBAAuB,EACvB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/ai-chat/index.web.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,GAClB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,YAAY,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAClD,YAAY,EACV,2BAA2B,EAC3B,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,wBAAwB,EACxB,uBAAuB,EACvB,gBAAgB,EAChB,mBAAmB,EACnB,2BAA2B,EAC3B,0BAA0B,EAC1B,mBAAmB,EACnB,sBAAsB,EACtB,uBAAuB,EACvB,iBAAiB,EACjB,cAAc,EACd,uBAAuB,EACvB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,SAAS,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { ComponentType, ReactNode } from 'react';
2
- import type { ImageSourcePropType, StyleProp, ViewStyle } from 'react-native';
2
+ import type { ImageSourcePropType, NativeScrollEvent, NativeSyntheticEvent, ScrollView, StyleProp, ViewStyle } from 'react-native';
3
3
  import type { CodeLanguage } from '../code';
4
4
  import type { BloomIconComponent } from '../icons/icon-component';
5
5
  import type { Props as IconProps } from '../icons/shared';
@@ -227,8 +227,12 @@ export interface AiChatContainerLabels {
227
227
  more?: string;
228
228
  }
229
229
  export interface AiChatContainerProps {
230
- /** The project crumb, after its folder glyph. */
231
- project: string;
230
+ /**
231
+ * The project crumb, after its folder glyph. Omit it for a chat that belongs
232
+ * to no project: the breadcrumb is then the title alone, with no empty crumb
233
+ * and no folder glyph.
234
+ */
235
+ project?: string;
232
236
  /** The current chat crumb. */
233
237
  title: string;
234
238
  /** The project crumb's glyph. Default `RiFolderLine`. */
@@ -246,13 +250,81 @@ export interface AiChatContainerProps {
246
250
  working?: boolean;
247
251
  /** `AgentThinking`'s label. Default `'Thinking'`. */
248
252
  workingLabel?: string;
253
+ /**
254
+ * A layer filling the container, drawn ABOVE its own surface and BELOW every
255
+ * turn, header and composer — a host's wallpaper, gradient or animated field.
256
+ * It is clipped to the container's radius and never interactive
257
+ * (`pointerEvents: 'none'`), so an opaque node needs nothing else.
258
+ *
259
+ * Set `surface={false}` beside it when the node is translucent and should
260
+ * show what the container is sitting on rather than background-secondary.
261
+ */
262
+ background?: ReactNode;
263
+ /**
264
+ * Paint the container's own background-secondary surface. Default `true`;
265
+ * `false` leaves the root transparent.
266
+ */
267
+ surface?: boolean;
249
268
  labels?: AiChatContainerLabels;
250
269
  style?: StyleProp<ViewStyle>;
251
270
  testID?: string;
252
271
  }
272
+ /**
273
+ * What a `ref` on `AiChatThread` hands back: enough to drive the scroll a host
274
+ * cannot drive from props — a cursor jump, a restore, a follow of its own.
275
+ */
276
+ export interface AiChatThreadHandle {
277
+ /** Jump to the newest turn. `animated` defaults to `true`. */
278
+ scrollToEnd: (options?: {
279
+ animated?: boolean;
280
+ }) => void;
281
+ /** Scroll to an absolute offset, px from the top. `animated` defaults to `false`. */
282
+ scrollToOffset: (options: {
283
+ offset: number;
284
+ animated?: boolean;
285
+ }) => void;
286
+ /** The `ScrollView` itself, for anything this handle does not cover. */
287
+ getScrollView: () => ScrollView | null;
288
+ }
253
289
  export interface AiChatThreadProps {
254
290
  /** The turns. The thread follows the newest one with a smooth scroll as it grows. */
255
291
  children: ReactNode;
292
+ /**
293
+ * Follow the newest turn as the content grows. Default `true` — the thread's
294
+ * behaviour since it shipped. `false` leaves every scroll to the host (and to
295
+ * the `ref`).
296
+ */
297
+ autoFollow?: boolean;
298
+ /** Animate the follow. Default `true`; `false` for a restore that must not be seen travelling. */
299
+ followAnimated?: boolean;
300
+ /**
301
+ * Follow only while the reader is within this many px of the bottom, measured
302
+ * before the growth. Omit to follow every growth (the default), which is what
303
+ * the thread has always done.
304
+ */
305
+ followThreshold?: number;
306
+ /**
307
+ * The reader came within `onStartReachedThreshold` of the top — a chat pages
308
+ * UPWARD, so this is its pagination signal, not `onEndReached`. It fires once
309
+ * per approach and re-arms when the reader leaves the zone.
310
+ */
311
+ onStartReached?: () => void;
312
+ /** Distance from the top that fires `onStartReached`, px. Default `300`. */
313
+ onStartReachedThreshold?: number;
314
+ /**
315
+ * Keep the reader on the same turn while a page lands ABOVE them: the growth
316
+ * that follows an `onStartReached` is added to the offset instead of moving
317
+ * the content under the reader. Default `false`, and inert without
318
+ * `onStartReached` — the thread only anchors growth it asked for.
319
+ *
320
+ * This is the web-safe half of `maintainVisibleContentPosition`, which
321
+ * react-native-web ignores.
322
+ */
323
+ maintainStartPosition?: boolean;
324
+ /** The raw scroll event, for a host tracking its own position. */
325
+ onScroll?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
326
+ /** Default `16`. Only applied when something is listening to the scroll. */
327
+ scrollEventThrottle?: number;
256
328
  style?: StyleProp<ViewStyle>;
257
329
  testID?: string;
258
330
  }
@@ -271,6 +343,15 @@ export interface AiChatShellLabels {
271
343
  export interface AiChatShellProps {
272
344
  /** The floating sidebar shown from `lg` (1024). */
273
345
  sidebar: ReactNode;
346
+ /**
347
+ * The in-flow sidebar's column width from `lg` up. Omit and the sidebar sizes
348
+ * itself, as it always has.
349
+ */
350
+ sidebarWidth?: number;
351
+ /** Narrow the in-flow sidebar to `collapsedSidebarWidth` — a host's icon rail. Default `false`. */
352
+ sidebarCollapsed?: boolean;
353
+ /** The collapsed column's width. Default `56`. */
354
+ collapsedSidebarWidth?: number;
274
355
  /** The flat sidebar revealed under the workspace below `lg`. Default: none (no nav drawer). */
275
356
  mobileSidebar?: ReactNode;
276
357
  /** The chat container. */
@@ -291,6 +372,23 @@ export interface AiChatShellProps {
291
372
  /** Controlled panel drawer (below `xl`). */
292
373
  panelOpen?: boolean;
293
374
  onPanelOpenChange?: (open: boolean) => void;
375
+ /**
376
+ * A layer filling the shell, drawn ABOVE its own background-full and BELOW
377
+ * the sidebar, workspace and drawers. Not interactive
378
+ * (`pointerEvents: 'none'`).
379
+ *
380
+ * The workspace paints background-full of its own, so a shell background is
381
+ * covered wherever the chat sits: pass `surface={false}` with it, which drops
382
+ * the paint on both, and let the chat's own `AiChatContainer` decide what it
383
+ * paints. A `background` on the container is the closer slot when the layer
384
+ * belongs to the chat rather than to the page.
385
+ */
386
+ background?: ReactNode;
387
+ /**
388
+ * Paint the shell's own background-full, on its root and on the workspace.
389
+ * Default `true`; `false` leaves both transparent.
390
+ */
391
+ surface?: boolean;
294
392
  labels?: AiChatShellLabels;
295
393
  style?: StyleProp<ViewStyle>;
296
394
  testID?: string;