@stackone/malachite 2.14.0 → 2.16.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/dist/index.d.ts CHANGED
@@ -217,6 +217,7 @@ declare interface BaseFormComponentProps {
217
217
  labelId?: string;
218
218
  descriptionId?: string;
219
219
  hintId?: string;
220
+ fullWidth?: boolean;
220
221
  }
221
222
 
222
223
  declare interface BaseSkeletonProps {
@@ -304,7 +305,13 @@ export declare type ButtonRadius = 'md' | 'lg' | 'xl';
304
305
 
305
306
  export declare type ButtonSize = 'xsmall' | 'small' | 'medium' | 'large';
306
307
 
307
- export declare type ButtonVariant = 'filled' | 'outline' | 'destructive' | 'success' | 'warning' | 'error' | 'ghost' | 'no-style';
308
+ export declare type ButtonVariant = 'filled' | 'outline'
309
+ /**
310
+ * `outline`'s geometry on a ground of its own. For a button sitting on a tinted or
311
+ * patterned surface, where `outline`'s transparent background lets that surface through
312
+ * and the control stops reading as a button.
313
+ */
314
+ | 'surface' | 'destructive' | 'success' | 'warning' | 'error' | 'ghost' | 'no-style';
308
315
 
309
316
  export declare const Card: default_2.FC<CardProps>;
310
317
 
@@ -382,6 +389,362 @@ export declare interface CardStripProps {
382
389
  /** Palette for the strip's rule. Pass the tone of whatever card is selected. */
383
390
  export declare type CardStripTone = 'profile' | 'library' | 'editing';
384
391
 
392
+ export declare type ChangeKind = 'changed' | 'added' | 'removed';
393
+
394
+ /**
395
+ * Reviewing changes a machine made: one note per changed thing, a card for what it removed
396
+ * outright, a bar counting what is still outstanding, and a chip pointing at any of it from
397
+ * elsewhere on the page.
398
+ */
399
+ export declare const ChangeReview: {
400
+ Item: FC<ChangeReviewItemProps>;
401
+ Summary: FC<ChangeReviewSummaryProps>;
402
+ Removed: FC<ChangeReviewRemovedProps>;
403
+ Jump: FC<ChangeReviewJumpProps>;
404
+ };
405
+
406
+ export declare interface ChangeReviewItemProps {
407
+ /**
408
+ * What changed — a field name, or the name of a group of them. Omit it when the field this
409
+ * item annotates already carries its own visible heading elsewhere on the page (so the name
410
+ * doesn't render twice) — pass `fieldName` instead, so the badge and actions still know what
411
+ * they belong to.
412
+ */
413
+ label?: string;
414
+ /**
415
+ * Names the field the badge and actions act on, for assistive tech. Defaults to `label`, so
416
+ * passing only `label` keeps working as before. Set it explicitly when `label` is omitted —
417
+ * otherwise "Accept"/"Revert" would have nothing telling a screen reader which field they act
418
+ * on.
419
+ */
420
+ fieldName?: string;
421
+ /** How it read before. A node, so a caller can show chips or code rather than a string. */
422
+ before?: default_2.ReactNode;
423
+ /** How it reads now. Usually omitted: the field itself is showing it. */
424
+ after?: default_2.ReactNode;
425
+ kind?: ChangeKind;
426
+ /** What made the change. Names the assistant by default. */
427
+ origin?: string;
428
+ /**
429
+ * The field the change is annotating. When given, the tag/label/actions form a header band
430
+ * above it and the before/after line moves below it, so "Was …" reads next to the value it
431
+ * describes instead of stacked with the header. Omit it for the standalone card.
432
+ */
433
+ children?: default_2.ReactNode;
434
+ onApprove: () => void;
435
+ onDeny: () => void;
436
+ /**
437
+ * Fires while the revert control is hovered or focused, and again when it stops being
438
+ * either. A callback rather than internal state because the thing being previewed — the
439
+ * field this change came from — lives elsewhere on the page, outside what `Item` renders;
440
+ * only the caller can swap what that field shows.
441
+ */
442
+ onPreviewRevert?: (previewing: boolean) => void;
443
+ disabled?: boolean;
444
+ className?: string;
445
+ }
446
+
447
+ export declare interface ChangeReviewJumpProps {
448
+ /** What the chip points at, e.g. a field or capability name. */
449
+ label: string;
450
+ /** Jumps the page to what changed. Without it the chip only names the change. */
451
+ onClick?: () => void;
452
+ disabled?: boolean;
453
+ className?: string;
454
+ }
455
+
456
+ export declare interface ChangeReviewRemovedDetail {
457
+ label: string;
458
+ /** A node, so a caller can show a chip or code rather than a string. */
459
+ value: default_2.ReactNode;
460
+ }
461
+
462
+ export declare interface ChangeReviewRemovedProps {
463
+ /** The noun for what was removed. Defaults to a capability, but the component isn't
464
+ * policy-specific — a caller reviewing something else names it. */
465
+ title?: string;
466
+ /** Field/value pairs describing the removed thing, so the admin can see what they would
467
+ * lose before deciding. */
468
+ details: ChangeReviewRemovedDetail[];
469
+ onRestore: () => void;
470
+ onDiscard: () => void;
471
+ /** What made the removal. Names the assistant by default. */
472
+ origin?: string;
473
+ disabled?: boolean;
474
+ className?: string;
475
+ }
476
+
477
+ export declare interface ChangeReviewSummaryProps {
478
+ /** How many changes are still undecided. */
479
+ count: number;
480
+ /** What made them. Names the assistant by default. */
481
+ origin?: string;
482
+ onApproveAll: () => void;
483
+ onDenyAll: () => void;
484
+ disabled?: boolean;
485
+ /**
486
+ * What to say once nothing is outstanding. Omit and the bar renders nothing, which is what
487
+ * a caller wants when the space should collapse rather than reassure.
488
+ */
489
+ settledMessage?: string;
490
+ className?: string;
491
+ }
492
+
493
+ export declare const Chat: ChatComponent;
494
+
495
+ declare interface ChatComponent extends default_2.FC<ChatProps> {
496
+ Header: default_2.FC<ChatHeaderProps>;
497
+ Thread: default_2.FC<ChatThreadProps>;
498
+ Message: default_2.FC<ChatMessageProps>;
499
+ ToolCall: default_2.FC<ChatToolCallProps>;
500
+ Thinking: default_2.FC<ChatThinkingProps>;
501
+ Composer: default_2.FC<ChatComposerProps>;
502
+ ComposerChip: default_2.FC<ChatComposerChipProps>;
503
+ Context: default_2.FC<ChatContextProps>;
504
+ ContextMeter: default_2.FC<ChatContextMeterProps>;
505
+ ModelPicker: default_2.FC<ChatModelPickerProps>;
506
+ Suggestion: default_2.FC<ChatSuggestionProps>;
507
+ }
508
+
509
+ export declare interface ChatComposerChipProps {
510
+ label: string;
511
+ icon?: default_2.ReactNode;
512
+ /** Sits after the label — a caret on a chip that opens a menu. */
513
+ trailingIcon?: default_2.ReactNode;
514
+ /** Makes the chip a control. Without it, the chip reports rather than acts. */
515
+ onClick?: () => void;
516
+ disabled?: boolean;
517
+ className?: string;
518
+ }
519
+
520
+ export declare interface ChatComposerProps {
521
+ value: string;
522
+ onChange: (value: string) => void;
523
+ onSend: () => void;
524
+ /** Offered in place of send while `busy`. Without it, send is simply disabled. */
525
+ onStop?: () => void;
526
+ /** A reply is streaming. */
527
+ busy?: boolean;
528
+ disabled?: boolean;
529
+ placeholder?: string;
530
+ maxLength?: number;
531
+ rows?: number;
532
+ /**
533
+ * How many lines the field grows to before it scrolls internally instead of growing
534
+ * further. Defaults well above `rows` so the field grows by default rather than staying
535
+ * fixed at its starting height — a consumer that genuinely wants a static box passes
536
+ * `maxRows` equal to `rows`.
537
+ */
538
+ maxRows?: number;
539
+ /**
540
+ * `'in-field'` (the default, so no existing consumer moves) nests a round send button
541
+ * inside the field, trailing the text. `'beside'` matches the policy design instead: a
542
+ * plain field with a labelled `Send` button to its right. Either way the field stays a
543
+ * `TextArea` — the mock draws a single-line input, but a composer that cannot take a
544
+ * second line is a downgrade, and `TextArea` already owns the Enter-to-send convention.
545
+ */
546
+ sendPlacement?: 'in-field' | 'beside';
547
+ /**
548
+ * `'assistant'` marks the field itself as AI-owned chrome: its focus border recolours to
549
+ * the assistant violet instead of the default accent. Defaults to `'default'` — an AI
550
+ * surface (e.g. the playground) opts in deliberately rather than inheriting it silently.
551
+ */
552
+ tone?: 'default' | 'assistant';
553
+ /** Controls belonging with the composer — a model picker, a token meter. */
554
+ children?: default_2.ReactNode;
555
+ 'aria-label'?: string;
556
+ className?: string;
557
+ }
558
+
559
+ export declare interface ChatContextItem {
560
+ id: string;
561
+ label: string;
562
+ /** Shows a remove control on the item. Without it, the item reports rather than can be dropped. */
563
+ onRemove?: () => void;
564
+ }
565
+
566
+ export declare interface ChatContextMeterProps {
567
+ /** Tokens spent. Absent reads as a dash: nothing has been measured yet. */
568
+ used?: number | null;
569
+ /** The model's context window. */
570
+ limit: number;
571
+ /** Tokens served from cache, when the provider reports them. */
572
+ cached?: number | null;
573
+ label?: string;
574
+ className?: string;
575
+ }
576
+
577
+ export declare interface ChatContextProps {
578
+ label?: string;
579
+ items: ChatContextItem[];
580
+ /** Renders the "Add context" control. Without it, the row only lists what is already in scope. */
581
+ onAdd?: () => void;
582
+ className?: string;
583
+ }
584
+
585
+ export declare type ChatFeedback = 'up' | 'down';
586
+
587
+ export declare interface ChatHeaderProps {
588
+ /** Names the surface, e.g. "Policy chat". */
589
+ title: string;
590
+ /**
591
+ * Marks the surface as AI-owned: the title takes the assistant violet and a sparkle
592
+ * leads it. Defaults to `'default'`, so a chat that is not assistant-authored does not
593
+ * inherit the treatment.
594
+ */
595
+ tone?: 'default' | 'assistant';
596
+ /** Sits opposite the title — a model name, a token count. */
597
+ trailing?: default_2.ReactNode;
598
+ /** Rows travelling with the header, e.g. `Chat.Context`. Pinned along with it. */
599
+ children?: default_2.ReactNode;
600
+ className?: string;
601
+ }
602
+
603
+ export declare interface ChatMessageProps {
604
+ role: ChatRole;
605
+ /**
606
+ * `card` frames the turn with a header and a footer — for a surface where a reply carries
607
+ * its own status and cost. `plain` is the bare turn. `bubble` wraps the turn in a coloured,
608
+ * asymmetrically-rounded bubble instead — no header, no footer, just the shape.
609
+ */
610
+ variant?: ChatMessageVariant;
611
+ /** Markdown. Rendered through `Typography.MarkdownBlock`, so a reply may carry formatting. */
612
+ content?: string;
613
+ /** Anything belonging with the message — tool calls, reasoning, a busy indicator. */
614
+ children?: default_2.ReactNode;
615
+ /** Names a user turn and its avatar; labels an assistant turn's header. */
616
+ name?: string;
617
+ avatarSrc?: string;
618
+ /** Shown in a `card` header. Omitted means the turn reports no state. */
619
+ status?: ChatMessageStatus;
620
+ /**
621
+ * The reply has been asked for but nothing has arrived. Renders the same placeholder
622
+ * `Chat.Thinking` does, in the body's place, so the turn does not jump when text lands.
623
+ */
624
+ loading?: boolean;
625
+ /**
626
+ * Offers a copy control. The handler decides what to copy: a turn may hold tool calls and
627
+ * reasoning this component never sees, so it cannot honestly claim to know the text.
628
+ */
629
+ onCopy?: () => void;
630
+ /** Offers thumbs up and down. */
631
+ onFeedback?: (feedback: ChatFeedback) => void;
632
+ usage?: ChatMessageUsage;
633
+ className?: string;
634
+ }
635
+
636
+ export declare type ChatMessageStatus = 'streaming' | 'completed' | 'error';
637
+
638
+ export declare interface ChatMessageUsage {
639
+ /** The model as a reader would name it, e.g. "Claude Haiku 4.5". */
640
+ model: string;
641
+ inputTokens?: number;
642
+ outputTokens?: number;
643
+ totalTokens?: number;
644
+ }
645
+
646
+ /**
647
+ * Three distinct treatments, not two plus a repaint of one: `plain` is the bare turn, `card`
648
+ * frames a reply with its own status, copy/rating actions and a token line, and `bubble` is a
649
+ * message-app chat style with no chrome beyond the bubble itself. All three appear in the
650
+ * design-sync previews — keep them that way rather than folding `bubble` back into `card`.
651
+ */
652
+ export declare type ChatMessageVariant = 'plain' | 'card' | 'bubble';
653
+
654
+ export declare interface ChatModelOption {
655
+ value: string;
656
+ label: string;
657
+ /** The provider's mark. A URL, since providers ship logos rather than icon fonts. */
658
+ iconSrc?: string;
659
+ /** A second choice the model offers, e.g. how long it may think. */
660
+ options?: ChatModelSubOption[];
661
+ }
662
+
663
+ export declare interface ChatModelPickerProps {
664
+ models: ChatModelOption[];
665
+ value: string;
666
+ /** The chosen sub-option, when the current model offers them. */
667
+ optionValue?: string;
668
+ /** Called with the model, and its sub-option when it has them. */
669
+ onChange: (model: string, option?: string) => void;
670
+ disabled?: boolean;
671
+ /**
672
+ * Opens upward. On by default: this sits under a composer at the bottom of a column, so
673
+ * downward is almost always off-screen.
674
+ */
675
+ openUp?: boolean;
676
+ 'aria-label'?: string;
677
+ }
678
+
679
+ export declare interface ChatModelSubOption {
680
+ value: string;
681
+ label: string;
682
+ description?: string;
683
+ }
684
+
685
+ export declare interface ChatProps {
686
+ children?: default_2.ReactNode;
687
+ className?: string;
688
+ }
689
+
690
+ export declare type ChatRole = 'user' | 'assistant';
691
+
692
+ export declare interface ChatSuggestionProps {
693
+ text: string;
694
+ /** Fills the composer — never sends. A suggestion is a starting point the reader edits,
695
+ * not a message the component decides to submit on their behalf. */
696
+ onPick: (text: string) => void;
697
+ disabled?: boolean;
698
+ className?: string;
699
+ }
700
+
701
+ export declare interface ChatThinkingProps {
702
+ /** Names what is happening, when that is worth saying. Omitted, the bars speak alone. */
703
+ label?: string;
704
+ className?: string;
705
+ }
706
+
707
+ export declare interface ChatThreadProps {
708
+ children?: default_2.ReactNode;
709
+ /** Names the transcript for assistive tech, e.g. "Policy assistant conversation". */
710
+ 'aria-label'?: string;
711
+ /** Shown, centred, while the transcript holds nothing. Ignored when `emptyContent` is
712
+ * supplied. */
713
+ emptyTitle?: string;
714
+ /** The lines under the title. A node, because guidance is rarely one sentence. Ignored
715
+ * when `emptyContent` is supplied. */
716
+ emptyDescription?: default_2.ReactNode;
717
+ /** Ignored when `emptyContent` is supplied. */
718
+ emptyIcon?: default_2.ReactNode;
719
+ /**
720
+ * Replaces the `emptyTitle`/`emptyDescription`/`emptyIcon` composition. Renders
721
+ * left-aligned at the bottom of the transcript, directly above the composer — an empty
722
+ * conversation should read as ready to start, not as a decorated void.
723
+ */
724
+ emptyContent?: default_2.ReactNode;
725
+ className?: string;
726
+ }
727
+
728
+ export declare interface ChatToolCallProps {
729
+ /** The tool the assistant called, e.g. `update_policy_draft`. */
730
+ name: string;
731
+ status?: ChatToolCallStatus;
732
+ /**
733
+ * The provider's id for this call. Shown once the card is expanded, not on the collapsed
734
+ * row: it is a long opaque string nobody reads at a glance, and beside the tool name it
735
+ * was taking two lines of the transcript to say nothing a reader wanted.
736
+ */
737
+ callId?: string;
738
+ /** Arguments the assistant sent. */
739
+ input?: object;
740
+ /** What the call returned. Absent while it is still running. */
741
+ output?: object;
742
+ defaultExpanded?: boolean;
743
+ className?: string;
744
+ }
745
+
746
+ export declare type ChatToolCallStatus = 'running' | 'completed' | 'error';
747
+
385
748
  export declare const Checkbox: default_2.FC<CheckboxProps>;
386
749
 
387
750
  export declare interface CheckboxProps {
@@ -453,6 +816,24 @@ declare interface CodeBlockProps {
453
816
  language?: 'yaml' | 'cedar';
454
817
  /** How much of a `json` tree starts collapsed: `true` all of it, a number below that depth. */
455
818
  collapsed?: boolean | number;
819
+ /**
820
+ * Renders the change between two texts rather than one text, and takes precedence over
821
+ * `code` and `json`. Only the changed lines are shown, with `context` unchanged ones either
822
+ * side, so a small edit to a long document reads as a few hunks instead of the whole thing.
823
+ */
824
+ diff?: {
825
+ before: string;
826
+ after: string;
827
+ /** Unchanged lines kept either side of each change. Three by convention. */
828
+ context?: number;
829
+ /**
830
+ * Swaps the `+`/`-` gutter and tinted rows for the palette a mock specified for
831
+ * AI-authored changes: star, minus-sign and middle-dot markers, and a struck-through
832
+ * removal. Omit to keep the neutral markers; there is no default consumer for the
833
+ * assistant look yet.
834
+ */
835
+ origin?: 'assistant';
836
+ };
456
837
  }
457
838
 
458
839
  export declare interface CodeTextProps {
@@ -570,6 +951,7 @@ export declare const CustomIcons: {
570
951
  ApiKeysIcon: FC<IconProps>;
571
952
  ArchiveIcon: FC<IconProps>;
572
953
  ArrowLeftIcon: FC<IconProps>;
954
+ ArrowUpIcon: FC<IconProps>;
573
955
  ArrowUpRightIcon: FC<IconProps>;
574
956
  AuthenticationIcon: FC<IconProps>;
575
957
  BellIcon: FC<IconProps>;
@@ -652,10 +1034,13 @@ export declare const CustomIcons: {
652
1034
  SliderIcon: FC<IconProps>;
653
1035
  SortIcon: FC<IconProps>;
654
1036
  SourceIcon: FC<IconProps>;
1037
+ SparkleIcon: FC<IconProps>;
655
1038
  StarIcon: FC<IconProps>;
656
1039
  StepCurrentIcon: FC<IconProps>;
657
1040
  StepUpcomingIcon: FC<IconProps>;
658
1041
  SyntheticWebhookIcon: FC<IconProps>;
1042
+ ThumbsDownIcon: FC<IconProps>;
1043
+ ThumbsUpIcon: FC<IconProps>;
659
1044
  TrashIcon: FC<IconProps>;
660
1045
  TriangleDownIcon: FC<IconProps>;
661
1046
  TriangleRightIcon: FC<IconProps>;
@@ -710,7 +1095,7 @@ export declare enum DividerVariant {
710
1095
  Emphasis = "emphasis"
711
1096
  }
712
1097
 
713
- export declare const Dropdown: ({ items, onItemSelected, defaultValue, value, disabled, error, tone, label, hint, tooltip, name, required, requiredIndicator, loading, menuLoading, formControl, description, helperText, placeholder, search, showSubtitleInTrigger, subtitleLayout, clearable, size, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, }: DropdownProps) => JSX_2.Element;
1098
+ export declare const Dropdown: ({ items, onItemSelected, defaultValue, value, disabled, error, tone, label, hint, tooltip, name, required, requiredIndicator, loading, menuLoading, formControl, description, helperText, placeholder, search, showSubtitleInTrigger, subtitleLayout, clearable, size, fullWidth, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, }: DropdownProps) => JSX_2.Element;
714
1099
 
715
1100
  declare interface DropdownBaseProps {
716
1101
  label?: string;
@@ -741,6 +1126,8 @@ declare interface DropdownBaseProps {
741
1126
  clearable?: boolean;
742
1127
  /** 'large' (42px) for form inputs; 'medium' (32px) for toolbar chips; 'small' (28px) beside a title. */
743
1128
  size?: DropdownSize;
1129
+ /** Fills the container instead of sizing to content, and matches the panel to the trigger. */
1130
+ fullWidth?: boolean;
744
1131
  /** Names the trigger from the light DOM, where `htmlFor` cannot reach into the shadow root. */
745
1132
  id?: string;
746
1133
  'aria-label'?: string;
@@ -1154,6 +1541,16 @@ export declare const MalachiteContext: default_2.FC<MalachiteContextProps>;
1154
1541
  declare interface MalachiteContextProps {
1155
1542
  children: default_2.ReactNode;
1156
1543
  className?: string;
1544
+ /**
1545
+ * Stretches the shadow host, and every plain div between it and `children`, to 100% of
1546
+ * the height available from this component's own parent. Without it, the host sizes to
1547
+ * its content: a percentage height set further down (inside `children`) has nothing
1548
+ * non-`auto` to resolve against, and a chain of plain `<div>`s does not propagate a
1549
+ * parent's height to its children on its own. Off by default: every existing consumer
1550
+ * relies on the host hugging its content, and turning this on for all of them would
1551
+ * change how much space they take up.
1552
+ */
1553
+ fillHeight?: boolean;
1157
1554
  }
1158
1555
 
1159
1556
  export declare interface MalachiteTheme {
@@ -1466,6 +1863,12 @@ export declare interface MalachiteTheme {
1466
1863
  border: string;
1467
1864
  shadow: string;
1468
1865
  };
1866
+ assistant: {
1867
+ background: string;
1868
+ foreground: string;
1869
+ border: string;
1870
+ shadow: string;
1871
+ };
1469
1872
  };
1470
1873
  numberTag: {
1471
1874
  background: string;
@@ -1554,6 +1957,33 @@ export declare interface MalachiteTheme {
1554
1957
  string: string;
1555
1958
  number: string;
1556
1959
  type: string;
1960
+ diffAddedBackground: string;
1961
+ diffRemovedBackground: string;
1962
+ diffAssistantBackground: string;
1963
+ diffAssistantForeground: string;
1964
+ diffAssistantRemovedBackground: string;
1965
+ diffRemovedForeground: string;
1966
+ diffContextForeground: string;
1967
+ diffContextText: string;
1968
+ };
1969
+ /** The conversation's own surfaces — message bubbles, not chrome around them. */
1970
+ chat: {
1971
+ userBubbleBackground: string;
1972
+ userBubbleBorder: string;
1973
+ assistantBubbleBackground: string;
1974
+ assistantBubbleBorder: string;
1975
+ assistantBubbleForeground: string;
1976
+ };
1977
+ /** Chrome marking machine-authored content outside the conversation itself
1978
+ * (badges, diff callouts) — distinct from `chat`, which is the conversation's
1979
+ * own bubbles. */
1980
+ assistant: {
1981
+ foreground: string;
1982
+ surfaceBackground: string;
1983
+ surfaceBorder: string;
1984
+ /** Body text sitting on `surfaceBackground` — darker/muted so a run of it reads,
1985
+ * unlike `foreground`, which is the vivid accent. */
1986
+ surfaceForeground: string;
1557
1987
  };
1558
1988
  };
1559
1989
  }
@@ -1849,6 +2279,8 @@ export declare interface PartialMalachiteTheme {
1849
2279
  rightSideText?: Partial<MalachiteTheme['colors']['text']['rightSideText']>;
1850
2280
  };
1851
2281
  codeBlock?: Partial<MalachiteTheme['colors']['codeBlock']>;
2282
+ chat?: Partial<MalachiteTheme['colors']['chat']>;
2283
+ assistant?: Partial<MalachiteTheme['colors']['assistant']>;
1852
2284
  };
1853
2285
  }
1854
2286
 
@@ -1868,10 +2300,26 @@ declare interface PillButtonProps {
1868
2300
  interactive?: boolean;
1869
2301
  size?: PillButtonSize;
1870
2302
  variant?: PillButtonVariant;
2303
+ shape?: PillButtonShape;
2304
+ tone?: PillButtonTone;
2305
+ /** Sits after the label — a caret on a pill that opens a menu. */
2306
+ trailingIcon?: default_2.ReactNode;
1871
2307
  onClick?: () => void;
1872
2308
  }
1873
2309
 
1874
- declare type PillButtonSize = 'small' | 'medium';
2310
+ /**
2311
+ * `tab` squares the top corners so the pill reads as attached to whatever sits above it —
2312
+ * a row of controls hanging under an input, rather than free-floating pills.
2313
+ */
2314
+ declare type PillButtonShape = 'pill' | 'tab';
2315
+
2316
+ declare type PillButtonSize = 'xsmall' | 'small' | 'medium';
2317
+
2318
+ /**
2319
+ * `assistant` is the chrome for AI-authored chips (e.g. `ChangeReview.Jump`): a fixed
2320
+ * violet-on-white look with its own border, independent of `variant`/`selected`.
2321
+ */
2322
+ declare type PillButtonTone = 'default' | 'assistant';
1875
2323
 
1876
2324
  declare type PillButtonVariant = 'default' | 'inverted';
1877
2325
 
@@ -2698,7 +3146,9 @@ export declare interface TagProps {
2698
3146
  className?: string;
2699
3147
  }
2700
3148
 
2701
- export declare type TagType = 'primary' | 'secondary' | 'default' | 'error' | 'warning' | 'success' | 'emphasis' | 'info';
3149
+ export declare type TagType = 'primary' | 'secondary' | 'default' | 'error' | 'warning' | 'success' | 'emphasis' | 'info'
3150
+ /** Marks content a machine produced rather than a person — provenance, not severity. */
3151
+ | 'assistant';
2702
3152
 
2703
3153
  declare interface TerminalTextProps {
2704
3154
  bold?: boolean;
@@ -2736,8 +3186,23 @@ declare interface TextAreaProps {
2736
3186
  onChange?: (value: string) => void;
2737
3187
  value?: string;
2738
3188
  onBlur?: () => void;
3189
+ /** Key handling the control cannot own, e.g. Enter-to-submit in a chat composer. */
3190
+ onKeyDown?: (event: default_2.KeyboardEvent<HTMLTextAreaElement>) => void;
3191
+ /**
3192
+ * A control that belongs inside the field, pinned bottom-right — a chat composer's send.
3193
+ * The field reserves room for it, so text cannot run underneath.
3194
+ */
3195
+ inFieldAction?: default_2.ReactNode;
3196
+ /** See `TextAreaTone`. Defaults to `'default'`, so no existing field changes. */
3197
+ tone?: TextAreaTone;
2739
3198
  helperText?: string;
2740
3199
  rows?: number;
3200
+ /**
3201
+ * Grows the field from `rows` up to this many lines as content is typed, then scrolls
3202
+ * internally rather than growing further. Omitted keeps the field at a fixed `rows`
3203
+ * height, the pre-existing behaviour.
3204
+ */
3205
+ maxRows?: number;
2741
3206
  maxLength?: number;
2742
3207
  resize?: 'none' | 'vertical' | 'horizontal' | 'both';
2743
3208
  /**
@@ -2753,6 +3218,14 @@ declare interface TextAreaProps {
2753
3218
 
2754
3219
  declare type TextAreaSize = 'small' | 'medium' | 'large';
2755
3220
 
3221
+ /**
3222
+ * `assistant` is the chrome for a field sitting in an AI context (e.g. `Chat.Composer`'s
3223
+ * policy-assistant tone): the field's own focus border recolours to the assistant violet
3224
+ * instead of the default accent — same indicator, different colour, not an extra one. Same
3225
+ * naming precedent as `PillButton`'s own `tone`.
3226
+ */
3227
+ declare type TextAreaTone = 'default' | 'assistant';
3228
+
2756
3229
  export declare type TextColor = 'primary' | 'secondary' | 'dimmed' | 'placeholder' | 'emphasis' | 'muted' | 'destructive' | 'success' | 'highlight' | 'warning' | 'error' | 'info' | 'link' | 'inherit';
2757
3230
 
2758
3231
  export declare interface TextProps {