juneau 0.14.0 → 0.15.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/README.md CHANGED
@@ -516,6 +516,7 @@ The sidebar anchors to the bottom-right of the viewport and opens at 60% screen
516
516
  | `renderPart` | `RenderPartFn` | Custom part renderer — see below. |
517
517
  | `onEntityClick` | `(entity, entityType?) => void` | Makes entity cards clickable — e.g. navigate to the record. |
518
518
  | `headerActions` | `ReactNode` | Extra controls in the header, left of reset/minimize. Rendered as given — Juneau never interprets them. |
519
+ | `aboveInput` | `ReactNode` | Content rendered directly above the input (e.g. a feedback prompt). Forwarded to `AiChat`; hidden while minimized. |
519
520
 
520
521
  **Header chrome (`headerActions`):**
521
522
 
@@ -581,6 +582,19 @@ function MyPage() {
581
582
  | `placeholder` | `string` | Input placeholder text. |
582
583
  | `renderPart` | `RenderPartFn` | Custom part renderer — see below. |
583
584
  | `onEntityClick` | `(entity, entityType?) => void` | Makes entity cards clickable — e.g. navigate to the record. |
585
+ | `aboveInput` | `ReactNode` | Content rendered between the messages / error banner and the input. See below. |
586
+
587
+ **Slot above the input (`aboveInput`):**
588
+
589
+ Renders consumer content — a feedback prompt, a notice, anything — between the message list (and error banner) and the input. The wrapper carries `data-juneau="above-input"` and `data-juneau-above-input`, never shrinks, and spans the full width; the message list keeps scrolling and the input stays at the bottom. When the prop is `undefined` or `null`, nothing is rendered — not even the wrapper.
590
+
591
+ ```tsx
592
+ <AiSidebar
593
+ aboveInput={
594
+ <MyFeedbackPrompt onSubmit={sendFeedback} />
595
+ }
596
+ />
597
+ ```
584
598
 
585
599
  ---
586
600
 
@@ -1018,6 +1032,7 @@ Beyond tokens, key elements carry stable `data-juneau` attributes so you can tar
1018
1032
  | `data-juneau="message"` + `data-juneau-role="user\|assistant"` | Each message row |
1019
1033
  | `data-juneau-segment="bubble\|card"` | Bubble / card segment inside a message |
1020
1034
  | `data-juneau="typing-indicator"` | Typing indicator |
1035
+ | `data-juneau="above-input"` (also `data-juneau-above-input`) | `aboveInput` slot wrapper in `AiChat` — only rendered when the prop is set |
1021
1036
  | `data-juneau="input"` | `AiInput` wrapper |
1022
1037
  | `data-juneau="input-textarea"` | `AiInput` textarea |
1023
1038
  | `data-juneau="error"` | `AiError` banner |
@@ -38,6 +38,12 @@ type Props = {
38
38
  * Use it for a rich "get started" hero — headline, suggestion chips, anything.
39
39
  */
40
40
  emptyState?: ReactNode;
41
+ /**
42
+ * Consumer content rendered between the message list / error banner and the
43
+ * input, e.g. a feedback prompt. When omitted nothing renders — not even the
44
+ * wrapper — so the default layout is unaffected.
45
+ */
46
+ aboveInput?: ReactNode;
41
47
  className?: string;
42
48
  style?: CSSProperties;
43
49
  };
@@ -49,6 +55,6 @@ type Props = {
49
55
  * Used by AiSidebar (inside the sidebar chrome) and directly in dashboard
50
56
  * or any other layout where you want chat without the sidebar wrapper.
51
57
  */
52
- export declare function AiChat({ messages, input, isLoading, isConnecting, error, onInputChange, onSend, onStop, onProposalConfirm, onProposalCancel, onEntityClick, placeholder, assistantIcon, actions, sendIcon, renderPart, emptyState, className, style, }: Props): import("react").JSX.Element;
58
+ export declare function AiChat({ messages, input, isLoading, isConnecting, error, onInputChange, onSend, onStop, onProposalConfirm, onProposalCancel, onEntityClick, placeholder, assistantIcon, actions, sendIcon, renderPart, emptyState, aboveInput, className, style, }: Props): import("react").JSX.Element;
53
59
  export {};
54
60
  //# sourceMappingURL=AiChat.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AiChat.d.ts","sourceRoot":"","sources":["../../../src/components/AiChat/AiChat.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAIxD,OAAO,KAAK,EAAE,YAAY,EA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ACH,UAAU,CAAC,EAAE,YAAY,CAAC;IAC1B;;;OAGG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB;;;;OAIG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,MAAM,CAAC,EACrB,QAAQ,EACR,KAAK,EACL,SAAS,EACT,YAAY,EACZ,KAAK,EACL,aAAa,EACb,MAAM,EACN,MAAM,EACN,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,WAAW,EACX,aAAa,EACb,OAAO,EACP,QAAQ,EACR,UAAU,EACV,UAAU,EACV,UAAU,EACV,SAAS,EACT,KAAK,GACN,EAAE,KAAK,+BAuCP"}
@@ -64,7 +64,12 @@ type Props = {
64
64
  * Use it for a rich "get started" hero — headline, suggestion chips, anything.
65
65
  */
66
66
  emptyState?: ReactNode;
67
+ /**
68
+ * Consumer content rendered directly above the input, e.g. a feedback prompt.
69
+ * Forwarded to `AiChat`; hidden together with the chat body while minimized.
70
+ */
71
+ aboveInput?: ReactNode;
67
72
  };
68
- export declare function AiSidebar({ title, icon, assistantIcon, actions, sendIcon, height, className, style, onReset, confirmReset, renderPart, onEntityClick, headerActions, badge, minimized, onMinimizedChange, emptyState, }: Props): import("react").JSX.Element;
73
+ export declare function AiSidebar({ title, icon, assistantIcon, actions, sendIcon, height, className, style, onReset, confirmReset, renderPart, onEntityClick, headerActions, badge, minimized, onMinimizedChange, emptyState, aboveInput, }: Props): import("react").JSX.Element;
69
74
  export {};
70
75
  //# sourceMappingURL=AiSidebar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AiSidebar.d.ts","sourceRoot":"","sources":["../../../src/components/AiSidebar/AiSidebar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtD,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